From 221b8322b7c33ff351b91a7b5d35b22504c98efc Mon Sep 17 00:00:00 2001
From: nyatla
Date: Mon, 31 Jan 2011 10:43:39 +0000
Subject: [PATCH] git-svn-id:
http://svn.sourceforge.jp/svnroot/nyartoolkit/NyARToolkit/trunk@809
7cac0a50-4618-4814-88d0-24b83990f816
---
lib/test/jp/nyatla/nyartoolkit/test/NyIdTest.java | 9 ++-
.../jp/nyatla/nyartoolkit/test/RawFileTest.java | 25 ++++++++-
lib/test/jp/nyatla/nyartoolkit/test/RpfTest.java | 19 ++++++-
.../nyartoolkit/test/SingleARMarkerTest.java | 64 ++++++++++++++++++++--
4 files changed, 106 insertions(+), 11 deletions(-)
diff --git a/lib/test/jp/nyatla/nyartoolkit/test/NyIdTest.java b/lib/test/jp/nyatla/nyartoolkit/test/NyIdTest.java
index 16e3507..bb04f1e 100644
--- a/lib/test/jp/nyatla/nyartoolkit/test/NyIdTest.java
+++ b/lib/test/jp/nyatla/nyartoolkit/test/NyIdTest.java
@@ -45,7 +45,14 @@ import jp.nyatla.nyartoolkit.processor.*;
* éæ¢ç»ãã1åã®IDãã¼ã«ãèªã¿åãããã®æ°å¤ãå¾ãåä½ã確èªã§ãã¾ãã
*
* ãã®ããã°ã©ã ã«ã¯çµæã表示ããæ©è½ãããã¾ããã
- * æ°å¤ã®ç¢ºèªã¯ããã¬ã¼ã¯ãã¤ã³ããä»æãããªã©ãã¦è¡ã£ã¦ãã ããã
+ * æ°å¤ã®ç¢ºèªã¯ããã¬ã¼ã¯ãã¤ã³ããä»æãããªã©ãã¦ãã ããã
+ * å¿
è¦ãªãã¡ã¤ã« -
+ * ãã®ããã°ã©ã ã®å®è¡ã«ã¯ã以ä¸ã®å¤é¨ãã¡ã¤ã«ãå¿
è¦ã§ãã
+ *
+ * - camera_para.dat - ARToolKitä»å±ã®ã«ã¡ã©ãã©ã¡ã¼ã¿ãã¡ã¤ã«
+ *
- 320x240NyId.rawã- Idãã¼ã«ãæ®å½±ãããQVGAãµã¤ãºã®R8G8B8å½¢å¼ã®ãµã³ãã«ç»å
+ *
+ *
*/
public class NyIdTest
{
diff --git a/lib/test/jp/nyatla/nyartoolkit/test/RawFileTest.java b/lib/test/jp/nyatla/nyartoolkit/test/RawFileTest.java
index c2aad09..9c846ca 100644
--- a/lib/test/jp/nyatla/nyartoolkit/test/RawFileTest.java
+++ b/lib/test/jp/nyatla/nyartoolkit/test/RawFileTest.java
@@ -45,6 +45,13 @@ import jp.nyatla.nyartoolkit.core.types.*;
* éæ¢ç»ãã1åã®Hiroãã¼ã«ãèªèãã¦ããã®å§¿å¢å¤æè¡åããã¿ã¼ã³ä¸è´çãå¾ãåä½ã確èªã§ãã¾ãã
* åæã«ããã®å¦çã1000åå®è¡ãã¦ãå¦çæéãè¨æ¸¬ãã¾ãããã®æ°å¤ã¯ãNyARToolkitã®åºæ¬æ§è½ã®
* ææ¨ã¨ãã¦ä½¿ããã¨ãã§ãã¾ãã
+ * å¿
è¦ãªãã¡ã¤ã« -
+ * ãã®ããã°ã©ã ã®å®è¡ã«ã¯ã以ä¸ã®å¤é¨ãã¡ã¤ã«ãå¿
è¦ã§ãã
+ *
+ * - camera_para.dat - ARToolKitä»å±ã®ã«ã¡ã©ãã©ã¡ã¼ã¿ãã¡ã¤ã«
+ *
- patt.hiro - ARToolKitä»å±ã®Hiroãã¼ã«ã®ãã¿ã¼ã³ãã¡ã¤ã«
+ *
- 320x240ABGR.rawã- Hiroãã¼ã«ãæ®å½±ãããQVGAãµã¤ãºã®XBGRå½¢å¼ã®ãµã³ãã«ç»å
+ *
*/
public class RawFileTest
{
@@ -54,11 +61,20 @@ public class RawFileTest
private final String camera_file = "../Data/camera_para.dat";
+ /**
+ * ã³ã³ã¹ãã©ã¯ã¿ã§ãã
+ * ããã§ã¯å¦çãè¡ãã¾ããã
+ */
public RawFileTest()
{
}
-
+ /**
+ * ãã®é¢æ°ã¯ããã¹ãé¢æ°ã®æ¬ä½ã§ãã
+ * ã«ã¡ã©è¨å®ãã¡ã¤ã«ãARãã¼ã«ã®ãã¿ã¼ã³èªåºããèªã¿è¾¼ã¿ã試é¨ã¤ã¡ã¼ã¸ã«å¯¾ãã¦ãã¼ã«æ¤åºãå®è¡ãã¾ãã
+ * ãã¼ã«æ¤åºã1000åç¹°ãè¿ãã¦ãçµéããæéãmsåä½ã§è¡¨ç¤ºãã¾ãã
+ * @throws Exception
+ */
public void Test_arDetectMarkerLite() throws Exception
{
// ARç¨ã«ã¡ã©ãã©ã¡ã¿ãã¡ã¤ã«ããã¼ã
@@ -100,7 +116,12 @@ public class RawFileTest
System.out.println(d.getTime() - d2.getTime());
System.out.print( ar.getConfidence());
}
-
+ /**
+ * ããã°ã©ã ã®ã¨ã³ããªã¼ãã¤ã³ãã§ãã
+ * ãµã³ãã«ããã°ã©ã {@link RawFileTest}ãå®è¡ãã¾ãã
+ * @param args
+ * å¼æ°ã¯ããã¾ããã
+ */
public static void main(String[] args)
{
diff --git a/lib/test/jp/nyatla/nyartoolkit/test/RpfTest.java b/lib/test/jp/nyatla/nyartoolkit/test/RpfTest.java
index 45793d5..d8c7d9e 100644
--- a/lib/test/jp/nyatla/nyartoolkit/test/RpfTest.java
+++ b/lib/test/jp/nyatla/nyartoolkit/test/RpfTest.java
@@ -1,14 +1,11 @@
package jp.nyatla.nyartoolkit.test;
-import java.io.File;
import java.io.FileInputStream;
import java.util.Date;
import jp.nyatla.nyartoolkit.core.param.NyARParam;
import jp.nyatla.nyartoolkit.core.types.NyARBufferType;
-import jp.nyatla.nyartoolkit.core.types.NyARDoublePoint3d;
-import jp.nyatla.nyartoolkit.detector.NyARSingleDetectMarker;
import jp.nyatla.nyartoolkit.rpf.reality.nyartk.NyARReality;
import jp.nyatla.nyartoolkit.rpf.reality.nyartk.NyARRealityTarget;
import jp.nyatla.nyartoolkit.rpf.realitysource.nyartk.NyARRealitySource;
@@ -25,6 +22,13 @@ import jp.nyatla.nyartoolkit.rpf.realitysource.nyartk.NyARRealitySource_Referenc
* {@link NyARReality}ãæ£å¸¸ã«åä½ãããã確èªã§ãã¾ãã
* ã¾ãã{@link NyARReality#progress}ã1000åå®è¡ãã¦ãå¦çæéãè¨æ¸¬ãã¾ãã
* ãã®æ°å¤ã¯ã{@link NyARReality}ã®åºæ¬æ§è½ã®ææ¨ã¨ãã¦ä½¿ããã¨ãã§ãã¾ãã
+ * å¿
è¦ãªãã¡ã¤ã« -
+ * ãã®ããã°ã©ã ã®å®è¡ã«ã¯ã以ä¸ã®å¤é¨ãã¡ã¤ã«ãå¿
è¦ã§ãã
+ *
+ * - camera_para.dat - ARToolKitä»å±ã®ã«ã¡ã©ãã©ã¡ã¼ã¿ãã¡ã¤ã«
+ *
- 320x240ABGR.rawã- Hiroãã¼ã«ãæ®å½±ãããQVGAãµã¤ãºã®XBGRå½¢å¼ã®ãµã³ãã«ç»å
+ *
+ *
*/
public class RpfTest
{
@@ -35,7 +39,16 @@ public class RpfTest
/**
* ã¡ã¤ã³é¢æ°ã§ãã
* 次ã®ããã¼ã§å¦çãå®è¡ãã¾ãã
+ *
+ * - {@link NyARParam}ã«ã«ã¡ã©ãã©ã¡ã¿ãèªã¿è¾¼ã¿ãQVGAãµã¤ãºã«åè¨å®ã
+ *
- {@link NyARReality}ãªãã¸ã§ã¯ãã®çæãæªã¿è£æ£ã¯ãªãã
+ *
- {@link NyARRealitySource_Reference}ãªãã¸ã§ã¯ãã®çæããã©ã¼ãããã¯ã{@link NyARBufferType#BYTE1D_B8G8R8X8_32}
+ *
- {@link NyARRealitySource_Reference}ãªãã¸ã§ã¯ãã«ã{@link #DATA_FILE}ã®å
容ãæ¸ãè¾¼ã¿ã
+ *
- {@link NyARReality#progress}ã1000åå®è¡ãå¦çæéãåºåã
+ *
- 0çªç®ã®UnknowntargetãKnownã¿ã¼ã²ããã«ãã¦ã姿å¢è¡åãè¨ç®ãã¦è¡¨ç¤ºã
+ *
* @param args
+ * å¼æ°ã¯å¿
è¦ããã¾ããã
*/
public static void main(String[] args)
{
diff --git a/lib/test/jp/nyatla/nyartoolkit/test/SingleARMarkerTest.java b/lib/test/jp/nyatla/nyartoolkit/test/SingleARMarkerTest.java
index fdd4fa7..8411486 100644
--- a/lib/test/jp/nyatla/nyartoolkit/test/SingleARMarkerTest.java
+++ b/lib/test/jp/nyatla/nyartoolkit/test/SingleARMarkerTest.java
@@ -40,7 +40,21 @@ import jp.nyatla.nyartoolkit.core.squaredetect.NyARSquare;
import jp.nyatla.nyartoolkit.core.transmat.*;
import jp.nyatla.nyartoolkit.core.*;
import jp.nyatla.nyartoolkit.processor.*;
-
+/**
+ * ãã®ããã°ã©ã ã¯ãNyIdãã¼ã«æ¤åºã¯ã©ã¹{@link SingleARMarkerProcesser}ã®åä½ãã§ãã¯ããã°ã©ã ã§ãã
+ * éæ¢ç»ãã1åã®hiroãã¼ã«ãèªèããåä½ã確èªã§ãã¾ãã
+ *
+ * ãã®ããã°ã©ã ã«ã¯çµæã表示ããæ©è½ãããã¾ããã
+ * æ°å¤ã®ç¢ºèªã¯ããã¬ã¼ã¯ãã¤ã³ããä»æãããªã©ãã¦è¡ã£ã¦ãã ããã
+ * å¿
è¦ãªãã¡ã¤ã« -
+ * ãã®ããã°ã©ã ã®å®è¡ã«ã¯ã以ä¸ã®å¤é¨ãã¡ã¤ã«ãå¿
è¦ã§ãã
+ *
+ * - camera_para.dat - ARToolKitä»å±ã®ã«ã¡ã©ãã©ã¡ã¼ã¿ãã¡ã¤ã«
+ *
- patt.hiro - ARToolKitä»å±ã®Hiroãã¼ã«ã®ãã¿ã¼ã³ãã¡ã¤ã«
+ *
- 320x240ABGR.rawã- Hiroãã¼ã«ãæ®å½±ãããQVGAãµã¤ãºã®XBGRå½¢å¼ã®ãµã³ãã«ç»å
+ *
+ *
+ */
public class SingleARMarkerTest
{
class MarkerProcessor extends SingleARMarkerProcesser
@@ -48,7 +62,16 @@ public class SingleARMarkerTest
private Object _sync_object=new Object();
public NyARTransMatResult transmat=null;
public int current_code=-1;
-
+ /**
+ * ã³ã³ã¹ãã©ã¯ã¿ã§ãã
+ * ãã©ã¡ã¼ã¿ã{@link #initInstance}ã¸ã»ãããã¦åæåãã¾ãã
+ * ããã§ã¯ã{@link #initInstance}ã¸å¤ãå¼ã渡ãã ãã§ãã
+ * @param i_cparam
+ * ã«ã¡ã©ãã©ã¡ã¼ã¿ã
+ * @param i_raster_format
+ * å
¥åã©ã¹ã¿ã®ãã©ã¼ãããã
+ * @throws Exception
+ */
public MarkerProcessor(NyARParam i_cparam,int i_raster_format) throws NyARException
{
//ã¢ããªã±ã¼ã·ã§ã³ãã¬ã¼ã ã¯ã¼ã¯ã®åæå
@@ -56,6 +79,11 @@ public class SingleARMarkerTest
initInstance(i_cparam,i_raster_format);
return;
}
+ /**
+ * ãã®é¢æ°ã¯ã{@link #detectMarker}ããå¼ã³åºãããèªå·±ã³ã¼ã«ããã¯é¢æ°ã§ãã
+ * ç»åã«ãã¼ã«ãç¾ãããã¨ãã«å¼ã³åºããã¾ãã
+ * ããã§ã¯ãä¾ã¨ãã¦ããã¼ã«ã®ã¤ã³ãã¯ã¹çªå·ãä¿åããå¦çããã¦ãã¾ãã
+ */
protected void onEnterHandler(int i_code)
{
synchronized(this._sync_object){
@@ -63,6 +91,12 @@ public class SingleARMarkerTest
}
System.out.println("Marker Number:"+i_code);
}
+ /**
+ * ãã®é¢æ°ã¯ã{@link #detectMarker}ããå¼ã³åºãããèªå·±ã³ã¼ã«ããã¯é¢æ°ã§ãã
+ * ç»åãããã¼ã«ãæ¶ãå»ã£ãæã«å¼ã³åºããã¾ãã
+ * ããã§ã¯ããã¼ã«ãæ¶ããå ´åã®å¾å§æ«å¦çããã¾ãã
+ * ãã®ãµã³ãã«ã§ã¯ãã¡ã³ãå¤æ°ããªã»ãããã¦ãã¾ãã
+ */
protected void onLeaveHandler()
{
synchronized(this._sync_object){
@@ -71,7 +105,13 @@ public class SingleARMarkerTest
}
return;
}
-
+ /**
+ * ãã®é¢æ°ã¯ã{@link #detectMarker}ããå¼ã³åºãããèªå·±ã³ã¼ã«ããã¯é¢æ°ã§ãã
+ * ç»åä¸ã®ãã¼ã«ã®ä½ç½®ãå¤åããã¨ãã«å¼ã³åºããã¾ãã
+ * ãã®é¢æ°ã¯ã{@link #onEnterHandler}ç´å¾ã«å¼ã³åºããããã¨ãããã¾ãã
+ *
+ * ãã®ãµã³ãã«ã§ã¯ãå¼æ°ã§éç¥ããããã¼ã«ã®å§¿å¢ããã¡ã³ãå¤æ°ã«ä¿åãã¦ãã¾ãã
+ */
protected void onUpdateHandler(NyARSquare i_square, NyARTransMatResult result)
{
synchronized(this._sync_object){
@@ -82,10 +122,19 @@ public class SingleARMarkerTest
private final static String CARCODE_FILE = "../Data/patt.hiro";
private final static String PARAM_FILE = "../Data/camera_para.dat";
private final String data_file = "../Data/320x240ABGR.raw";
-
+ /**
+ * ã³ã³ã¹ãã©ã¯ã¿ã§ãã
+ * ããã§è¡ãå¦çã¯ããã¾ããã
+ */
public SingleARMarkerTest()
{
}
+ /**
+ * ãã¹ãé¢æ°ã®æ¬ä½ã§ãã
+ * è¨å®ãã¡ã¤ã«ããµã³ãã«ç»åã®èªã¿è¾¼ãã ã®ã¡ã«ãï¼ç¨®é¡ã®ãã¼ã«ãç»é²ãã{@link MarkerProcessor}ãçæãã
+ * ï¼åã ãç»åãå
¥åãã¦ããã¼ã«æ¤åºã試è¡ãã¾ãã
+ * @throws Exception
+ */
public void Test() throws Exception
{
//ARç¨ã«ã¡ã©ãã©ã¡ã¿ãã¡ã¤ã«ããã¼ã
@@ -110,9 +159,14 @@ public class SingleARMarkerTest
pr.detectMarker(ra);
return;
}
+ /**
+ * ããã°ã©ã ã®ã¨ã³ããªã¼ãã¤ã³ãã§ãã
+ * ãµã³ãã«ããã°ã©ã {@link NyIdTest}ãå®è¡ãã¾ãã
+ * @param args
+ * å¼æ°ã¯ããã¾ããã
+ */
public static void main(String[] args)
{
-
try {
SingleARMarkerTest t = new SingleARMarkerTest();
// t.Test_arGetVersion();
--
2.11.0