OSDN Git Service

[Backup]NyARToolkit for Java
[nyartoolkit-and/nyartoolkit-and.git] / trunk / sample / sandbox / jp / nyatla / nyartoolkit / sandbox / quadx2 / NyARSquareDetector_Quad.java
index 4918bea..5bc4185 100644 (file)
 package jp.nyatla.nyartoolkit.sandbox.quadx2;\r
 import jp.nyatla.nyartoolkit.NyARException;\r
 import jp.nyatla.nyartoolkit.core.labeling.*;\r
+import jp.nyatla.nyartoolkit.core.labeling.artoolkit.NyARLabelingImage;\r
+import jp.nyatla.nyartoolkit.core.labeling.artoolkit.NyARLabelingLabel;\r
+import jp.nyatla.nyartoolkit.core.labeling.artoolkit.NyARLabelingLabelStack;\r
 import jp.nyatla.nyartoolkit.core.raster.*;\r
+import jp.nyatla.nyartoolkit.core.squaredetect.INyARSquareDetector;\r
+import jp.nyatla.nyartoolkit.core.squaredetect.NyARSquare;\r
+import jp.nyatla.nyartoolkit.core.squaredetect.NyARSquareStack;\r
 import jp.nyatla.nyartoolkit.core.types.*;\r
 import jp.nyatla.nyartoolkit.core.param.*;\r
 \r
@@ -59,7 +65,7 @@ public class NyARSquareDetector_Quad implements INyARSquareDetector
     private int _width;\r
     private int _height;\r
 \r
-    private INyARLabeling _labeling;\r
+    private NyARLabeling_ARToolKit_X2 _labeling;\r
 \r
     private NyARLabelingImage _limage;\r
 \r
@@ -123,7 +129,7 @@ public class NyARSquareDetector_Quad implements INyARSquareDetector
      */\r
     public void detectMarker(NyARBinRaster i_raster, NyARSquareStack o_square_stack) throws NyARException\r
     {\r
-        INyARLabeling labeling_proc = this._labeling;\r
+       NyARLabeling_ARToolKit_X2 labeling_proc = this._labeling;\r
         NyARLabelingImage limage = this._limage;\r
 \r
         // 初期化\r
@@ -142,7 +148,7 @@ public class NyARSquareDetector_Quad implements INyARSquareDetector
         }\r
 \r
         NyARLabelingLabelStack stack = limage.getLabelStack();\r
-        NyARLabelingLabel[] labels = (NyARLabelingLabel[])stack.getArray();\r
+        NyARLabelingLabel[] labels = stack.getArray();\r
 \r
 \r
         // ラベルを大きい順に整列\r