OSDN Git Service

[backup]NyARToolkit
authornyatla <nyatla@7cac0a50-4618-4814-88d0-24b83990f816>
Thu, 14 Jan 2010 15:35:53 +0000 (15:35 +0000)
committernyatla <nyatla@7cac0a50-4618-4814-88d0-24b83990f816>
Thu, 14 Jan 2010 15:35:53 +0000 (15:35 +0000)
+INyARRasterからbufferTypeの分離
+インタフェイスINyARSquareDetectorをAbstract Class NyARSquareDetectorへ変更
+2.5.0候補

git-svn-id: http://svn.sourceforge.jp/svnroot/nyartoolkit/NyARToolkit@387 7cac0a50-4618-4814-88d0-24b83990f816

70 files changed:
trunk/sample/jmf/jp/nyatla/nyartoolkit/jmf/sample/LabelingViewer.java
trunk/sample/sandbox/jp/nyatla/nyartoolkit/core/rasteranalyzer/NyARRasterDetector_QrCodeEdge.java
trunk/sample/sandbox/jp/nyatla/nyartoolkit/core/rasteranalyzer/threshold/NyARRasterThresholdAnalyzer_DiffHistogram.java
trunk/sample/sandbox/jp/nyatla/nyartoolkit/core/rasterfilter/NyARRasterFilter_Edge.java
trunk/sample/sandbox/jp/nyatla/nyartoolkit/core/rasterfilter/NyARRasterOperator_Mul.java
trunk/sample/sandbox/jp/nyatla/nyartoolkit/core/rasterfilter/rgb2gs/NyARRasterFilter_Rgb2Gs_CbCrCut.java
trunk/sample/sandbox/jp/nyatla/nyartoolkit/core/rasterfilter/rgb2gs/NyARRasterFilter_Rgb2Gs_RgbOr.java
trunk/sample/sandbox/jp/nyatla/nyartoolkit/sandbox/qrcode/NyARQrCodeDetector.java
trunk/sample/sandbox/jp/nyatla/nyartoolkit/sandbox/qrcode/NyARSingleQrDetector.java
trunk/sample/sandbox/jp/nyatla/nyartoolkit/sandbox/quadx2/NyARRasterFilter_ARTTh_Quad.java
trunk/sample/sandbox/jp/nyatla/nyartoolkit/sandbox/quadx2/NyARSingleDetectMarker_Quad.java
trunk/sample/sandbox/jp/nyatla/nyartoolkit/sandbox/quadx2/NyARSquareDetector_Quad.java
trunk/sample/sandbox/jp/nyatla/nyartoolkit/sandbox/vertexdetect/NyARVertexDetector.java
trunk/sample/sandbox/jp/nyatla/nyartoolkit/sandbox/x2/NyARSingleDetectMarker_X2.java
trunk/sample/sandbox/jp/nyatla/nyartoolkit/sandbox/x2/NyARSquareDetector_X2.java
trunk/sample/sandbox/jp/nyatla/nyartoolkit/sandbox/x2/SingleARMarkerProcesser_X2.java
trunk/sample/sandbox/jp/nyatla/nyartoolkit/utils/j2se/NyARRGBRaster_BufferedImage.java
trunk/src.utils/java3d/jp/nyatla/nyartoolkit/java3d/utils/J3dNyARRaster_RGB.java
trunk/src.utils/jmf/jp/nyatla/nyartoolkit/jmf/utils/JmfNyARRaster_RGB.java
trunk/src.utils/jogl/jp/nyatla/nyartoolkit/jogl/utils/GLNyARRaster_RGB.java
trunk/src.utils/qt/jp/nyatla/nyartoolkit/qt/utils/QtNyARRaster_RGB.java
trunk/src/jp/nyatla/nyartoolkit/core/NyARCode.java
trunk/src/jp/nyatla/nyartoolkit/core/analyzer/raster/NyARRasterAnalyzer_Histogram.java
trunk/src/jp/nyatla/nyartoolkit/core/labeling/artoolkit/NyARLabelingImage.java
trunk/src/jp/nyatla/nyartoolkit/core/labeling/artoolkit/NyARLabeling_ARToolKit.java
trunk/src/jp/nyatla/nyartoolkit/core/labeling/rlelabeling/NyARLabeling_Rle.java
trunk/src/jp/nyatla/nyartoolkit/core/match/NyARMatchPattDeviationColorData.java
trunk/src/jp/nyatla/nyartoolkit/core/pickup/NyARColorPatt_O1.java
trunk/src/jp/nyatla/nyartoolkit/core/pickup/NyARColorPatt_O3.java
trunk/src/jp/nyatla/nyartoolkit/core/pickup/NyARColorPatt_Perspective.java
trunk/src/jp/nyatla/nyartoolkit/core/pickup/NyARColorPatt_PseudoAffine.java
trunk/src/jp/nyatla/nyartoolkit/core/raster/INyARRaster.java
trunk/src/jp/nyatla/nyartoolkit/core/raster/NyARBinRaster.java
trunk/src/jp/nyatla/nyartoolkit/core/raster/NyARBufferType.java [new file with mode: 0644]
trunk/src/jp/nyatla/nyartoolkit/core/raster/NyARGrayscaleRaster.java
trunk/src/jp/nyatla/nyartoolkit/core/raster/NyARHsvRaster.java
trunk/src/jp/nyatla/nyartoolkit/core/raster/NyARRaster.java
trunk/src/jp/nyatla/nyartoolkit/core/raster/rgb/NyARRgbRaster.java
trunk/src/jp/nyatla/nyartoolkit/core/raster/rgb/NyARRgbRaster_BGRA.java
trunk/src/jp/nyatla/nyartoolkit/core/raster/rgb/NyARRgbRaster_Blank.java
trunk/src/jp/nyatla/nyartoolkit/core/raster/rgb/NyARRgbRaster_RGB.java
trunk/src/jp/nyatla/nyartoolkit/core/rasterfilter/NyARRasterFilter_CustomToneTable.java
trunk/src/jp/nyatla/nyartoolkit/core/rasterfilter/NyARRasterFilter_GaussianSmooth.java
trunk/src/jp/nyatla/nyartoolkit/core/rasterfilter/NyARRasterFilter_Reverse.java
trunk/src/jp/nyatla/nyartoolkit/core/rasterfilter/NyARRasterFilter_Rgb2Hsv.java
trunk/src/jp/nyatla/nyartoolkit/core/rasterfilter/NyARRasterFilter_Roberts.java
trunk/src/jp/nyatla/nyartoolkit/core/rasterfilter/NyARRasterFilter_SimpleSmooth.java
trunk/src/jp/nyatla/nyartoolkit/core/rasterfilter/gs2bin/NyARRasterFilter_ConstantThreshold.java
trunk/src/jp/nyatla/nyartoolkit/core/rasterfilter/rgb2bin/NyARRasterFilter_ARToolkitThreshold.java
trunk/src/jp/nyatla/nyartoolkit/core/rasterfilter/rgb2gs/NyARRasterFilter_Rgb2Gs_AveAdd.java
trunk/src/jp/nyatla/nyartoolkit/core/rasterfilter/rgb2gs/NyARRasterFilter_Rgb2Gs_RgbCube.java
trunk/src/jp/nyatla/nyartoolkit/core/rasterfilter/rgb2gs/NyARRasterFilter_Rgb2Gs_YCbCr.java
trunk/src/jp/nyatla/nyartoolkit/core/rasterreader/NyARRgbPixelReader_BYTE1D_B8G8R8X8_32.java
trunk/src/jp/nyatla/nyartoolkit/core/rasterreader/NyARVectorReader_INT1D_GRAY_8.java
trunk/src/jp/nyatla/nyartoolkit/core/squaredetect/ContourPickup.java
trunk/src/jp/nyatla/nyartoolkit/core/squaredetect/NyARSquareContourDetector.java [moved from trunk/src/jp/nyatla/nyartoolkit/core/squaredetect/INyARSquareContourDetector.java with 80% similarity]
trunk/src/jp/nyatla/nyartoolkit/core/squaredetect/NyARSquareContourDetector_ARToolKit.java
trunk/src/jp/nyatla/nyartoolkit/core/squaredetect/NyARSquareContourDetector_Rle.java
trunk/src/jp/nyatla/nyartoolkit/core/types/NyARDoublePoint2d.java
trunk/src/jp/nyatla/nyartoolkit/detector/NyARCustomSingleDetectMarker.java
trunk/src/jp/nyatla/nyartoolkit/detector/NyARDetectMarker.java
trunk/src/jp/nyatla/nyartoolkit/detector/NyARSingleDetectMarker.java
trunk/src/jp/nyatla/nyartoolkit/processor/SingleARMarkerProcesser.java
trunk/src/jp/nyatla/nyartoolkit/processor/SingleNyIdMarkerProcesser.java
trunk/src/jp/nyatla/nyartoolkit/utils/j2se/LabelingBufferdImage.java
trunk/src/jp/nyatla/nyartoolkit/utils/j2se/NyARRasterImageIO.java
trunk/test/jp/nyatla/nyartoolkit/dev/LabelingCamera.java
trunk/test/jp/nyatla/nyartoolkit/dev/LabelingTest.java
trunk/test/jp/nyatla/nyartoolkit/dev/tracking/MarkerTracking_3dTrans.java
trunk/test/jp/nyatla/nyartoolkit/dev/tracking/TrTest.java

index c07a950..885dfc8 100644 (file)
@@ -42,7 +42,7 @@ import jp.nyatla.nyartoolkit.core.labeling.rlelabeling.RleLabelFragmentInfoStack
 import jp.nyatla.nyartoolkit.core.param.NyARParam;
 import jp.nyatla.nyartoolkit.core.raster.NyARBinRaster;
 import jp.nyatla.nyartoolkit.core.rasterfilter.rgb2bin.NyARRasterFilter_ARToolkitThreshold;
-import jp.nyatla.nyartoolkit.core.squaredetect.INyARSquareContourDetector;
+import jp.nyatla.nyartoolkit.core.squaredetect.NyARSquareContourDetector;
 import jp.nyatla.nyartoolkit.core.squaredetect.NyARSquareContourDetector_Rle;
 
 /**
@@ -96,7 +96,7 @@ public class LabelingViewer extends Frame implements JmfCaptureListener
        /**
         * detectMarkerのコールバック関数
         */
-       private class DetectSquareCB implements INyARSquareContourDetector.DetectMarkerCallback
+       private class DetectSquareCB implements NyARSquareContourDetector.DetectMarkerCallback
        {
                public DetectSquareCB()
                {
@@ -106,7 +106,7 @@ public class LabelingViewer extends Frame implements JmfCaptureListener
                 * 矩形が見付かるたびに呼び出されます。
                 * 発見した矩形のパターンを検査して、方位を考慮した頂点データを確保します。
                 */
-               public void onSquareDetect(INyARSquareContourDetector i_sender,int[] i_coordx,int[] i_coordy,int i_coor_num,int[] i_vertex_index) throws NyARException
+               public void onSquareDetect(NyARSquareContourDetector i_sender,int[] i_coordx,int[] i_coordy,int i_coor_num,int[] i_vertex_index) throws NyARException
                {                       
                }
        }
index 2684ef6..ad6db4f 100644 (file)
@@ -86,7 +86,7 @@ public class NyARRasterDetector_QrCodeEdge
        }       \r
        public void analyzeRaster(INyARRaster i_input) throws NyARException\r
        {\r
-               assert (i_input.isEqualBufferType(INyARRaster.BUFFERFORMAT_INT1D_BIN_8));\r
+               assert (i_input.isEqualBufferType(NyARBufferType.INT1D_BIN_8));\r
 \r
                // 結果をクリア\r
                this._result.clear();\r
index 1605c07..0d7e8d3 100644 (file)
@@ -82,7 +82,7 @@ public class NyARRasterThresholdAnalyzer_DiffHistogram implements INyARRasterThr
 \r
        public int analyzeRaster(INyARRaster i_input) throws NyARException\r
        {\r
-               assert (i_input.isEqualBufferType(INyARRaster.BUFFERFORMAT_INT1D_GRAY_8));\r
+               assert (i_input.isEqualBufferType(NyARBufferType.INT1D_GRAY_8));\r
                int[] histogram = new int[256];\r
                return createHistogram((int[])i_input.getBuffer(),i_input.getSize(), histogram);\r
        }\r
@@ -95,8 +95,8 @@ public class NyARRasterThresholdAnalyzer_DiffHistogram implements INyARRasterThr
         */\r
        public void debugDrawHistogramMap(INyARRaster i_input, INyARRaster i_output) throws NyARException\r
        {\r
-               assert (i_input.isEqualBufferType(INyARRaster.BUFFERFORMAT_INT1D_GRAY_8));\r
-               assert (i_output.isEqualBufferType(INyARRaster.BUFFERFORMAT_INT1D_GRAY_8));\r
+               assert (i_input.isEqualBufferType(NyARBufferType.INT1D_GRAY_8));\r
+               assert (i_output.isEqualBufferType(NyARBufferType.INT1D_GRAY_8));\r
                NyARIntSize size = i_output.getSize();\r
 \r
                int[] out_buf = (int[]) i_output.getBuffer();\r
index d3794eb..ed04d31 100644 (file)
@@ -42,8 +42,8 @@ public class NyARRasterFilter_Edge implements INyARRasterFilter
 {\r
        public void doFilter(INyARRaster i_input, INyARRaster i_output) throws NyARException\r
        {\r
-               assert (i_input.isEqualBufferType(INyARRaster.BUFFERFORMAT_INT1D_GRAY_8));\r
-               assert (i_output.isEqualBufferType(INyARRaster.BUFFERFORMAT_INT1D_GRAY_8));\r
+               assert (i_input.isEqualBufferType(NyARBufferType.INT1D_GRAY_8));\r
+               assert (i_output.isEqualBufferType(NyARBufferType.INT1D_GRAY_8));\r
                assert (i_input.getSize().isEqualSize(i_output.getSize()) == true);\r
 \r
                int[] out_buf = (int[]) i_output.getBuffer();\r
index 7fbfbc0..e2b44bb 100644 (file)
@@ -31,7 +31,7 @@
 package jp.nyatla.nyartoolkit.core.rasterfilter;\r
 \r
 import jp.nyatla.nyartoolkit.NyARException;\r
-import jp.nyatla.nyartoolkit.core.raster.INyARRaster;\r
+import jp.nyatla.nyartoolkit.core.raster.*;\r
 import jp.nyatla.nyartoolkit.core.types.NyARIntSize;\r
 \r
 /**\r
@@ -44,7 +44,7 @@ public class NyARRasterOperator_Mul
        public NyARRasterOperator_Mul(int i_raster_type) throws NyARException\r
        {\r
                switch (i_raster_type) {\r
-               case INyARRaster.BUFFERFORMAT_INT1D_GRAY_8:\r
+               case NyARBufferType.INT1D_GRAY_8:\r
                        this._dofilterimpl=new IdoFilterImpl_INT1D_GRAY_8();\r
                        break;\r
                default:\r
@@ -69,9 +69,9 @@ public class NyARRasterOperator_Mul
        {\r
                public void doFilter(INyARRaster i_input_a,INyARRaster i_input_b,INyARRaster i_output,NyARIntSize i_size) throws NyARException\r
                {\r
-                       assert(i_input_a.isEqualBufferType(INyARRaster.BUFFERFORMAT_INT1D_GRAY_8));\r
-                       assert(i_input_b.isEqualBufferType(INyARRaster.BUFFERFORMAT_INT1D_GRAY_8));\r
-                       assert(i_output.isEqualBufferType(INyARRaster.BUFFERFORMAT_INT1D_GRAY_8));\r
+                       assert(i_input_a.isEqualBufferType(NyARBufferType.INT1D_GRAY_8));\r
+                       assert(i_input_b.isEqualBufferType(NyARBufferType.INT1D_GRAY_8));\r
+                       assert(i_output.isEqualBufferType(NyARBufferType.INT1D_GRAY_8));\r
                        \r
                        int[] out_buf = (int[]) i_output.getBuffer();\r
                        int[] in_buf1 = (int[]) i_input_a.getBuffer();\r
index ded1ec8..e5a47df 100644 (file)
@@ -22,10 +22,10 @@ public class NyARRasterFilter_Rgb2Gs_CbCrCut implements INyARRasterFilter_Rgb2Gs
        public NyARRasterFilter_Rgb2Gs_CbCrCut(int i_raster_type,double i_sigma) throws NyARException\r
        {\r
                switch (i_raster_type) {\r
-               case INyARRaster.BUFFERFORMAT_BYTE1D_B8G8R8_24:\r
+               case NyARBufferType.BYTE1D_B8G8R8_24:\r
                        this._dofilterimpl=new IdoFilterImpl_BYTE1D_B8G8R8_24();\r
                        break;\r
-               case INyARRaster.BUFFERFORMAT_BYTE1D_R8G8B8_24:\r
+               case NyARBufferType.BYTE1D_R8G8B8_24:\r
                default:\r
                        throw new NyARException();\r
                }\r
@@ -52,8 +52,8 @@ public class NyARRasterFilter_Rgb2Gs_CbCrCut implements INyARRasterFilter_Rgb2Gs
        {\r
                public void doFilter(INyARRaster i_input, INyARRaster i_output,NyARIntSize i_size) throws NyARException\r
                {\r
-                       assert( i_input.isEqualBufferType(INyARRaster.BUFFERFORMAT_BYTE1D_B8G8R8_24));\r
-                       assert( i_output.isEqualBufferType(INyARRaster.BUFFERFORMAT_INT1D_GRAY_8));\r
+                       assert( i_input.isEqualBufferType(NyARBufferType.BYTE1D_B8G8R8_24));\r
+                       assert( i_output.isEqualBufferType(NyARBufferType.INT1D_GRAY_8));\r
                        \r
                        int[] out_buf = (int[]) i_output.getBuffer();\r
                        byte[] in_buf = (byte[]) i_input.getBuffer();\r
index 381c952..942d849 100644 (file)
@@ -41,7 +41,7 @@ public class NyARRasterFilter_Rgb2Gs_RgbOr implements INyARRasterFilter_Rgb2Gs
        public void doFilter(INyARRgbRaster i_input, NyARGrayscaleRaster i_output) throws NyARException\r
        {\r
                \r
-               assert( i_output.isEqualBufferType(INyARRaster.BUFFERFORMAT_INT1D_GRAY_8));\r
+               assert( i_output.isEqualBufferType(NyARBufferType.INT1D_GRAY_8));\r
                assert (i_input.getSize().isEqualSize(i_output.getSize()) == true);\r
 \r
                final int[] out_buf = (int[]) i_output.getBuffer();\r
@@ -49,8 +49,8 @@ public class NyARRasterFilter_Rgb2Gs_RgbOr implements INyARRasterFilter_Rgb2Gs
 \r
                NyARIntSize size = i_output.getSize();\r
                switch (i_input.getBufferType()) {\r
-               case INyARRaster.BUFFERFORMAT_BYTE1D_B8G8R8_24:\r
-               case INyARRaster.BUFFERFORMAT_BYTE1D_R8G8B8_24:\r
+               case NyARBufferType.BYTE1D_B8G8R8_24:\r
+               case NyARBufferType.BYTE1D_R8G8B8_24:\r
                        convert24BitRgb(in_buf, out_buf, size);\r
                        break;\r
                default:\r
index 6f0cd1c..befc91c 100644 (file)
@@ -8,13 +8,13 @@ import jp.nyatla.nyartoolkit.core.labeling.artoolkit.NyARLabeling_ARToolKit;
 import jp.nyatla.nyartoolkit.core.param.NyARCameraDistortionFactor;\r
 import jp.nyatla.nyartoolkit.core.raster.NyARBinRaster;\r
 import jp.nyatla.nyartoolkit.core.squaredetect.ContourPickup;\r
-import jp.nyatla.nyartoolkit.core.squaredetect.INyARSquareContourDetector;\r
+import jp.nyatla.nyartoolkit.core.squaredetect.NyARSquareContourDetector;\r
 import jp.nyatla.nyartoolkit.core.squaredetect.NyARSquare;\r
 import jp.nyatla.nyartoolkit.core.squaredetect.NyARSquareStack;\r
 import jp.nyatla.nyartoolkit.core.squaredetect.Coord2Linear;\r
 import jp.nyatla.nyartoolkit.core.types.*;\r
 \r
-public class NyARQrCodeDetector implements INyARSquareContourDetector\r
+public class NyARQrCodeDetector extends NyARSquareContourDetector\r
 {\r
        private NyARQrCodeSymbolBinder _binder;\r
 \r
index a265ca7..c8dc364 100644 (file)
@@ -39,7 +39,7 @@ import jp.nyatla.nyartoolkit.core.rasterfilter.*;
 import jp.nyatla.nyartoolkit.core.rasterfilter.rgb2gs.*;\r
 import jp.nyatla.nyartoolkit.core.rasterfilter.gs2bin.*;\r
 import jp.nyatla.nyartoolkit.core.raster.*;\r
-import jp.nyatla.nyartoolkit.core.squaredetect.INyARSquareContourDetector;\r
+import jp.nyatla.nyartoolkit.core.squaredetect.NyARSquareContourDetector;\r
 import jp.nyatla.nyartoolkit.core.squaredetect.NyARSquare;\r
 import jp.nyatla.nyartoolkit.core.squaredetect.NyARSquareStack;\r
 import jp.nyatla.nyartoolkit.core.transmat.*;\r
@@ -54,7 +54,7 @@ public class NyARSingleQrDetector
        private static final int AR_SQUARE_MAX = 100;\r
 \r
        private boolean _is_continue = false;\r
-       private INyARSquareContourDetector _square_detect;\r
+       private NyARSquareContourDetector _square_detect;\r
 \r
        private final NyARSquareStack _square_list = new NyARSquareStack(AR_SQUARE_MAX);\r
 \r
index 2d2fdbe..c131dc7 100644 (file)
@@ -59,7 +59,7 @@ public class NyARRasterFilter_ARTTh_Quad implements INyARRasterFilter_Rgb2Bin
                int in_buf_type=i_input.getBufferType();\r
 \r
                NyARIntSize size = i_output.getSize();\r
-               assert (i_output.isEqualBufferType(INyARRaster.BUFFERFORMAT_INT1D_BIN_8));\r
+               assert (i_output.isEqualBufferType(NyARBufferType.INT1D_BIN_8));\r
                assert (checkInputType(in_buf_type)==true);     \r
                assert (i_input.getSize().isEqualSize(size.w*2,size.h*2) == true);\r
 \r
@@ -67,8 +67,8 @@ public class NyARRasterFilter_ARTTh_Quad implements INyARRasterFilter_Rgb2Bin
                byte[] in_buf = (byte[]) i_input.getBuffer();\r
 \r
                switch (i_input.getBufferType()) {\r
-               case INyARRaster.BUFFERFORMAT_BYTE1D_B8G8R8_24:\r
-               case INyARRaster.BUFFERFORMAT_BYTE1D_R8G8B8_24:\r
+               case NyARBufferType.BYTE1D_B8G8R8_24:\r
+               case NyARBufferType.BYTE1D_R8G8B8_24:\r
                        convert24BitRgb(in_buf, out_buf, size);\r
                        break;\r
 //             case INyARBufferReader.BUFFERFORMAT_BYTE1D_B8G8R8X8_32:\r
@@ -179,10 +179,10 @@ public class NyARRasterFilter_ARTTh_Quad implements INyARRasterFilter_Rgb2Bin
        private boolean checkInputType(int i_input_type) throws NyARException\r
        {\r
                switch(i_input_type){\r
-               case INyARRaster.BUFFERFORMAT_BYTE1D_B8G8R8_24:\r
-               case INyARRaster.BUFFERFORMAT_BYTE1D_R8G8B8_24:\r
-//             case INyARRaster.BUFFERFORMAT_BYTE1D_B8G8R8X8_32:\r
-//             case INyARRaster.BUFFERFORMAT_BYTE1D_R5G6B5_16LE:\r
+               case NyARBufferType.BYTE1D_B8G8R8_24:\r
+               case NyARBufferType.BYTE1D_R8G8B8_24:\r
+//             case NyARBufferType.BYTE1D_B8G8R8X8_32:\r
+//             case NyARBufferType.BYTE1D_R5G6B5_16LE:\r
                        return true;\r
                default:\r
                        return false;\r
index 664f231..1237a2a 100644 (file)
@@ -38,7 +38,7 @@ import jp.nyatla.nyartoolkit.core.param.NyARParam;
 import jp.nyatla.nyartoolkit.core.pickup.*;\r
 import jp.nyatla.nyartoolkit.core.raster.rgb.*;\r
 import jp.nyatla.nyartoolkit.core.raster.*;\r
-import jp.nyatla.nyartoolkit.core.squaredetect.INyARSquareContourDetector;\r
+import jp.nyatla.nyartoolkit.core.squaredetect.NyARSquareContourDetector;\r
 import jp.nyatla.nyartoolkit.core.squaredetect.NyARSquare;\r
 import jp.nyatla.nyartoolkit.core.squaredetect.NyARSquareStack;\r
 import jp.nyatla.nyartoolkit.core.transmat.*;\r
@@ -57,7 +57,7 @@ public class NyARSingleDetectMarker_Quad
 \r
        private boolean _is_continue = false;\r
        private NyARMatchPatt_Color_WITHOUT_PCA _match_patt;\r
-       private INyARSquareContourDetector _square_detect;\r
+       private NyARSquareContourDetector _square_detect;\r
 \r
        private final NyARSquareStack _square_list = new NyARSquareStack(AR_SQUARE_MAX);\r
 \r
index c4737cd..dc8c6ff 100644 (file)
@@ -35,7 +35,7 @@ import jp.nyatla.nyartoolkit.core.labeling.*;
 import jp.nyatla.nyartoolkit.core.labeling.artoolkit.*;\r
 import jp.nyatla.nyartoolkit.core.raster.*;\r
 import jp.nyatla.nyartoolkit.core.squaredetect.ContourPickup;\r
-import jp.nyatla.nyartoolkit.core.squaredetect.INyARSquareContourDetector;\r
+import jp.nyatla.nyartoolkit.core.squaredetect.NyARSquareContourDetector;\r
 import jp.nyatla.nyartoolkit.core.squaredetect.NyARSquare;\r
 import jp.nyatla.nyartoolkit.core.squaredetect.NyARSquareStack;\r
 import jp.nyatla.nyartoolkit.core.squaredetect.Coord2Linear;\r
@@ -49,7 +49,7 @@ import jp.nyatla.nyartoolkit.sandbox.x2.*;
  * 1/4に解像度を落して解析するNyARSquareDetector_X2\r
  * 与えるBinRasterが既に1/4のサイズになっていないといけないことに注意\r
  */\r
-public class NyARSquareDetector_Quad implements INyARSquareContourDetector\r
+public class NyARSquareDetector_Quad extends NyARSquareContourDetector\r
 {\r
     private static int AR_AREA_MAX = 25000;// #define AR_AREA_MAX 100000\r
 \r
index 1a2a70b..3b4ba61 100644 (file)
@@ -41,7 +41,7 @@ import jp.nyatla.nyartoolkit.core.param.*;
  * PCAではなく、頂点座標そのものからSquare位置を計算するクラス\r
  *\r
  */\r
-public class NyARVertexDetector implements INyARSquareContourDetector\r
+public class NyARVertexDetector extends NyARSquareContourDetector\r
 {\r
        private static final int AR_AREA_MAX = 100000;// #define AR_AREA_MAX 100000\r
 \r
index 4531dbf..dace44b 100644 (file)
@@ -42,7 +42,7 @@ import jp.nyatla.nyartoolkit.core.transmat.*;
 import jp.nyatla.nyartoolkit.core.types.NyARIntSize;\r
 import jp.nyatla.nyartoolkit.core.rasterfilter.gs2bin.*;\r
 import jp.nyatla.nyartoolkit.core.rasterfilter.rgb2bin.NyARRasterFilter_ARToolkitThreshold;\r
-import jp.nyatla.nyartoolkit.core.squaredetect.INyARSquareContourDetector;\r
+import jp.nyatla.nyartoolkit.core.squaredetect.NyARSquareContourDetector;\r
 import jp.nyatla.nyartoolkit.core.squaredetect.NyARSquare;\r
 import jp.nyatla.nyartoolkit.core.squaredetect.NyARSquareStack;\r
 \r
@@ -57,7 +57,7 @@ public class NyARSingleDetectMarker_X2
 \r
        private boolean _is_continue = false;\r
        private NyARMatchPatt_Color_WITHOUT_PCA _match_patt;\r
-       private INyARSquareContourDetector _square_detect;\r
+       private NyARSquareContourDetector _square_detect;\r
 \r
        private final NyARSquareStack _square_list = new NyARSquareStack(AR_SQUARE_MAX);\r
 \r
index 0549425..04f85fe 100644 (file)
@@ -45,7 +45,7 @@ import jp.nyatla.nyartoolkit.core.param.*;
  * このクラスは、arDetectMarker2.cとの置き換えになります。\r
  * \r
  */\r
-public class NyARSquareDetector_X2 implements INyARSquareContourDetector\r
+public class NyARSquareDetector_X2 extends NyARSquareContourDetector\r
 {\r
        private final int _width;\r
        private final int _height;\r
index 5ae473c..8c9f34e 100644 (file)
@@ -72,7 +72,7 @@ public abstract class SingleARMarkerProcesser_X2
 \r
        private int _lost_delay = 5;\r
 \r
-       private INyARSquareContourDetector _square_detect;\r
+       private NyARSquareContourDetector _square_detect;\r
 \r
        //<X2 patch>\r
        protected NyARTransMat_X2 _transmat;\r
index 3e5e4c4..4817bff 100644 (file)
@@ -21,14 +21,14 @@ public class NyARRGBRaster_BufferedImage extends NyARRgbRaster_BasicClass
        protected boolean _is_attached_buffer;\r
        public NyARRGBRaster_BufferedImage(int i_width, int i_height,boolean i_is_alloc) throws NyARException\r
        {\r
-               super( new NyARIntSize(i_width,i_height),INyARRaster.BUFFERFORMAT_OBJECT_Java_BufferedImage);\r
+               super( new NyARIntSize(i_width,i_height),NyARBufferType.OBJECT_Java_BufferedImage);\r
                if(!initInstance(this._size,i_is_alloc)){\r
                        throw new NyARException();\r
                }\r
        }\r
        public NyARRGBRaster_BufferedImage(int i_width, int i_height) throws NyARException\r
        {\r
-               super( new NyARIntSize(i_width,i_height),INyARRaster.BUFFERFORMAT_OBJECT_Java_BufferedImage);\r
+               super( new NyARIntSize(i_width,i_height),NyARBufferType.OBJECT_Java_BufferedImage);\r
                if(!initInstance(this._size,true)){\r
                        throw new NyARException();\r
                }\r
index 2c975e8..ea63b41 100644 (file)
@@ -79,7 +79,7 @@ public class J3dNyARRaster_RGB extends JmfNyARRaster_RGB
        {\r
                super(i_cparam.getScreenSize(),i_format);\r
                //bufferdimageの種類を決める\r
-               if(this.getBufferType()!=INyARRaster.BUFFERFORMAT_BYTE1D_B8G8R8_24){\r
+               if(this.getBufferType()!=NyARBufferType.BYTE1D_B8G8R8_24){\r
                        throw new NyARException();\r
                }\r
                //RGBのラスタを作る。\r
index 06fd00b..9c824d4 100644 (file)
@@ -184,9 +184,9 @@ class NyARGLPixelReader_RGB24 extends JmfRGB24RasterHolder
                int r=fm.getRedMask();\r
                int b=fm.getBlueMask();\r
                if(r==1 && b==3){\r
-                       this.buffer_type=INyARRaster.BUFFERFORMAT_BYTE1D_R8G8B8_24;\r
+                       this.buffer_type=NyARBufferType.BYTE1D_R8G8B8_24;\r
                }else if(r==3 && b==1){\r
-                       this.buffer_type=INyARRaster.BUFFERFORMAT_BYTE1D_B8G8R8_24;                     \r
+                       this.buffer_type=NyARBufferType.BYTE1D_B8G8R8_24;                       \r
                }else{\r
                        throw new NyARException();\r
                }\r
@@ -221,12 +221,12 @@ class NyARGLPixelReader_RGB24 extends JmfRGB24RasterHolder
                int bp = (i_x + i_y * this._ref_size.w) * 3;\r
                byte[] ref = this.buffer;\r
                switch(this.buffer_type){\r
-               case INyARRaster.BUFFERFORMAT_BYTE1D_R8G8B8_24:\r
+               case NyARBufferType.BYTE1D_R8G8B8_24:\r
                        o_rgb[0] = (ref[bp + 0] & 0xff);// R\r
                        o_rgb[1] = (ref[bp + 1] & 0xff);// G\r
                        o_rgb[2] = (ref[bp + 2] & 0xff);// B\r
                        break;\r
-               case INyARRaster.BUFFERFORMAT_BYTE1D_B8G8R8_24:\r
+               case NyARBufferType.BYTE1D_B8G8R8_24:\r
                        o_rgb[0] = (ref[bp + 2] & 0xff);// B\r
                        o_rgb[1] = (ref[bp + 1] & 0xff);// G\r
                        o_rgb[2] = (ref[bp + 0] & 0xff);// R\r
@@ -242,7 +242,7 @@ class NyARGLPixelReader_RGB24 extends JmfRGB24RasterHolder
                byte[] ref = this.buffer;\r
                int bp;\r
                switch(this.buffer_type){\r
-               case INyARRaster.BUFFERFORMAT_BYTE1D_R8G8B8_24:\r
+               case NyARBufferType.BYTE1D_R8G8B8_24:\r
                        for (int i = i_num - 1; i >= 0; i--) {\r
                                bp = (i_x[i] + i_y[i] * width) * 3;\r
                                o_rgb[i * 3 + 0] = (ref[bp + 0] & 0xff);// R\r
@@ -250,7 +250,7 @@ class NyARGLPixelReader_RGB24 extends JmfRGB24RasterHolder
                                o_rgb[i * 3 + 2] = (ref[bp + 2] & 0xff);// B\r
                        }\r
                        break;\r
-               case INyARRaster.BUFFERFORMAT_BYTE1D_B8G8R8_24:\r
+               case NyARBufferType.BYTE1D_B8G8R8_24:\r
                        for (int i = i_num - 1; i >= 0; i--) {\r
                                bp = (i_x[i] + i_y[i] * width) * 3;\r
                                o_rgb[i * 3 + 0] = (ref[bp + 2] & 0xff);// B\r
@@ -315,7 +315,7 @@ class NyARGLPixelReader_YUV extends JmfRGB24RasterHolder
        public NyARGLPixelReader_YUV(NyARIntSize i_ref_size,YUVFormat i_input_format) throws NyARException\r
        {\r
                this._ref_size=i_ref_size;\r
-               this.buffer_type=INyARRaster.BUFFERFORMAT_BYTE1D_B8G8R8_24;\r
+               this.buffer_type=NyARBufferType.BYTE1D_B8G8R8_24;\r
                this.buffer=null;\r
                this._yuv2rgb=new YUVToRGB();\r
                this._rgb_buf=new javax.media.Buffer();\r
index 4f3634c..ea7ac68 100644 (file)
@@ -69,10 +69,10 @@ public class GLNyARRaster_RGB extends JmfNyARRaster_RGB
        private void initMember(int i_buffer_type) throws NyARException\r
        {\r
                switch(i_buffer_type){\r
-               case INyARRaster.BUFFERFORMAT_BYTE1D_B8G8R8_24:\r
+               case NyARBufferType.BYTE1D_B8G8R8_24:\r
                        this._gl_flag = GL.GL_BGR;\r
                        break;\r
-               case INyARRaster.BUFFERFORMAT_BYTE1D_R8G8B8_24:\r
+               case NyARBufferType.BYTE1D_R8G8B8_24:\r
                        this._gl_flag = GL.GL_RGB;\r
                        break;\r
                default:\r
index edd972e..ac20221 100644 (file)
@@ -52,7 +52,7 @@ public class QtNyARRaster_RGB implements INyARRgbRaster
        {\r
                this._size=new NyARIntSize(i_width,i_height);\r
                this._buffer= null;\r
-               this._buffer_type=INyARRaster.BUFFERFORMAT_BYTE1D_R8G8B8_24;\r
+               this._buffer_type=NyARBufferType.BYTE1D_R8G8B8_24;\r
                this._reader = new NyARRgbPixelReader_BYTE1D_R8G8B8_24(null,this._size);\r
        }\r
        \r
index 3c53f21..3bddad4 100644 (file)
@@ -56,7 +56,7 @@ class NyARCodeFileReader
                        StreamTokenizer st = new StreamTokenizer(new InputStreamReader(i_stream));\r
                        //GBRAで一度読みだす。\r
                        for (int h = 0; h < 4; h++) {\r
-                               assert o_raster[h].isEqualBufferType(INyARRaster.BUFFERFORMAT_INT1D_X8R8G8B8_32);\r
+                               assert o_raster[h].isEqualBufferType(NyARBufferType.INT1D_X8R8G8B8_32);\r
                                final NyARRaster ra=o_raster[h];\r
                                readBlock(st,ra.getWidth(),ra.getHeight(),(int[])ra.getBuffer());\r
                        }\r
@@ -75,7 +75,7 @@ class NyARCodeFileReader
        {\r
                int width=o_code.getWidth();\r
                int height=o_code.getHeight();\r
-               NyARRaster tmp_raster=new NyARRaster(width,height,INyARRaster.BUFFERFORMAT_INT1D_X8R8G8B8_32);\r
+               NyARRaster tmp_raster=new NyARRaster(width,height, NyARBufferType.INT1D_X8R8G8B8_32);\r
                //4個の要素をラスタにセットする。\r
                try {\r
                        StreamTokenizer st = new StreamTokenizer(new InputStreamReader(i_stream));\r
index 381ac69..40a82bd 100644 (file)
@@ -29,23 +29,23 @@ public class NyARRasterAnalyzer_Histogram
        protected boolean initInstance(int i_raster_format,int i_vertical_interval)\r
        {\r
                switch (i_raster_format) {\r
-               case INyARRaster.BUFFERFORMAT_BYTE1D_B8G8R8_24:\r
-               case INyARRaster.BUFFERFORMAT_BYTE1D_R8G8B8_24:\r
+               case  NyARBufferType.BYTE1D_B8G8R8_24:\r
+               case  NyARBufferType.BYTE1D_R8G8B8_24:\r
                        this._histImpl = new NyARRasterThresholdAnalyzer_Histogram_BYTE1D_RGB_24();\r
                        break;\r
-               case INyARRaster.BUFFERFORMAT_INT1D_GRAY_8:\r
+               case  NyARBufferType.INT1D_GRAY_8:\r
                        this._histImpl = new NyARRasterThresholdAnalyzer_Histogram_INT1D_GRAY_8();\r
                        break;\r
-               case INyARRaster.BUFFERFORMAT_BYTE1D_B8G8R8X8_32:\r
+               case  NyARBufferType.BYTE1D_B8G8R8X8_32:\r
                        this._histImpl = new NyARRasterThresholdAnalyzer_Histogram_BYTE1D_B8G8R8X8_32();\r
                        break;\r
-               case INyARRaster.BUFFERFORMAT_BYTE1D_X8R8G8B8_32:\r
+               case  NyARBufferType.BYTE1D_X8R8G8B8_32:\r
                        this._histImpl = new NyARRasterThresholdAnalyzer_Histogram_BYTE1D_X8R8G8B8_32();\r
                        break;\r
-               case INyARRaster.BUFFERFORMAT_WORD1D_R5G6B5_16LE:\r
+               case  NyARBufferType.WORD1D_R5G6B5_16LE:\r
                        this._histImpl = new NyARRasterThresholdAnalyzer_Histogram_WORD1D_R5G6B5_16LE();\r
                        break;\r
-               case INyARRaster.BUFFERFORMAT_INT1D_X8R8G8B8_32:\r
+               case  NyARBufferType.INT1D_X8R8G8B8_32:\r
                        this._histImpl = new NyARRasterThresholdAnalyzer_Histogram_INT1D_X8R8G8B8_32();\r
                        break;\r
                default:\r
@@ -75,8 +75,8 @@ public class NyARRasterAnalyzer_Histogram
                \r
                final NyARIntSize size=i_input.getSize();\r
                //最大画像サイズの制限\r
-               assert size.w*size.h<0x40000000;\r
-               assert o_histogram.length==256;//現在は固定\r
+               assert(size.w*size.h<0x40000000);\r
+               assert(o_histogram.length==256);//現在は固定\r
 \r
                int[] h=o_histogram.data;\r
                //ヒストグラム初期化\r
@@ -96,7 +96,7 @@ public class NyARRasterAnalyzer_Histogram
        {\r
                public int createHistogram(INyARRaster i_reader,NyARIntSize i_size, int[] o_histogram,int i_skip)\r
                {\r
-                       assert (i_reader.isEqualBufferType(INyARRaster.BUFFERFORMAT_INT1D_GRAY_8));\r
+                       assert (i_reader.isEqualBufferType( NyARBufferType.INT1D_GRAY_8));\r
                        final int[] input=(int[]) i_reader.getBuffer();\r
                        for (int y = i_size.h-1; y >=0 ; y-=i_skip){\r
                                int pt=y*i_size.w;\r
@@ -112,7 +112,7 @@ public class NyARRasterAnalyzer_Histogram
        {\r
                public int createHistogram(INyARRaster i_reader,NyARIntSize i_size, int[] o_histogram,int i_skip)\r
                {\r
-                       assert (i_reader.isEqualBufferType(INyARRaster.BUFFERFORMAT_INT1D_X8R8G8B8_32));\r
+                       assert (i_reader.isEqualBufferType( NyARBufferType.INT1D_X8R8G8B8_32));\r
                        final int[] input=(int[]) i_reader.getBuffer();\r
                        for (int y = i_size.h-1; y >=0 ; y-=i_skip){\r
                                int pt=y*i_size.w;\r
@@ -132,8 +132,8 @@ public class NyARRasterAnalyzer_Histogram
                public int createHistogram(INyARRaster i_reader,NyARIntSize i_size, int[] o_histogram,int i_skip)\r
                {\r
                        assert (\r
-                                       i_reader.isEqualBufferType(INyARRaster.BUFFERFORMAT_BYTE1D_B8G8R8_24)||\r
-                                       i_reader.isEqualBufferType(INyARRaster.BUFFERFORMAT_BYTE1D_R8G8B8_24));\r
+                                       i_reader.isEqualBufferType(NyARBufferType.BYTE1D_B8G8R8_24)||\r
+                                       i_reader.isEqualBufferType(NyARBufferType.BYTE1D_R8G8B8_24));\r
                        final byte[] input=(byte[]) i_reader.getBuffer();\r
                        final int pix_count=i_size.w;\r
                        final int pix_mod_part=pix_count-(pix_count%8);\r
@@ -174,7 +174,7 @@ public class NyARRasterAnalyzer_Histogram
        {\r
                public int createHistogram(INyARRaster i_reader,NyARIntSize i_size, int[] o_histogram,int i_skip)\r
                {\r
-               assert(i_reader.isEqualBufferType(INyARRaster.BUFFERFORMAT_BYTE1D_B8G8R8X8_32));\r
+               assert(i_reader.isEqualBufferType(NyARBufferType.BYTE1D_B8G8R8X8_32));\r
                byte[] input = (byte[])i_reader.getBuffer();\r
                int pix_count = i_size.w;\r
                int pix_mod_part = pix_count - (pix_count % 8);\r
@@ -218,7 +218,7 @@ public class NyARRasterAnalyzer_Histogram
        {\r
                public int createHistogram(INyARRaster i_reader,NyARIntSize i_size, int[] o_histogram,int i_skip)\r
                {\r
-               assert(i_reader.isEqualBufferType(INyARRaster.BUFFERFORMAT_BYTE1D_X8R8G8B8_32));\r
+               assert(i_reader.isEqualBufferType(NyARBufferType.BYTE1D_X8R8G8B8_32));\r
                byte[] input = (byte[])i_reader.getBuffer();\r
                int pix_count = i_size.w;\r
                int pix_mod_part = pix_count - (pix_count % 8);\r
@@ -262,7 +262,7 @@ public class NyARRasterAnalyzer_Histogram
        {\r
                public int createHistogram(INyARRaster i_reader,NyARIntSize i_size, int[] o_histogram,int i_skip)\r
                {\r
-               assert(i_reader.isEqualBufferType(INyARRaster.BUFFERFORMAT_WORD1D_R5G6B5_16LE));\r
+               assert(i_reader.isEqualBufferType(NyARBufferType.WORD1D_R5G6B5_16LE));\r
                short[] input = (short[])i_reader.getBuffer();\r
                int pix_count = i_size.w;\r
                int pix_mod_part = pix_count - (pix_count % 8);\r
index 39731ea..db69fc0 100644 (file)
@@ -47,7 +47,7 @@ public class NyARLabelingImage extends NyARRaster_BasicClass
        protected boolean _is_index_table_enable;\r
        public NyARLabelingImage(int i_width, int i_height) throws NyARException\r
        {\r
-               super(new NyARIntSize(i_width,i_height),INyARRaster.BUFFERFORMAT_INT1D);\r
+               super(new NyARIntSize(i_width,i_height),NyARBufferType.INT1D);\r
                this._ref_buf =new int[i_height*i_width];\r
                this._label_list = new NyARLabelingLabelStack(MAX_LABELS);\r
                this._index_table=new int[MAX_LABELS];\r
index 3cd7bff..860ad86 100644 (file)
@@ -54,7 +54,7 @@ final public class NyARLabeling_ARToolKit
         */\r
        public int labeling(NyARBinRaster i_raster,NyARLabelingImage o_destination) throws NyARException\r
        {\r
-               assert(i_raster.getBufferType()==INyARRaster.BUFFERFORMAT_INT1D_BIN_8);\r
+               assert(i_raster.getBufferType()==NyARBufferType.INT1D_BIN_8);\r
                int label_img_ptr1, label_pixel;\r
                int i, j;\r
                int n, k; /* work */\r
index fc0d1b1..e2cc5fd 100644 (file)
@@ -204,7 +204,7 @@ public class NyARLabeling_Rle
         */\r
        public int labeling(NyARBinRaster i_bin_raster, int i_top, int i_bottom,RleLabelFragmentInfoStack o_stack) throws NyARException\r
        {\r
-               assert(i_bin_raster.isEqualBufferType(INyARRaster.BUFFERFORMAT_INT1D_BIN_8));\r
+               assert(i_bin_raster.isEqualBufferType(NyARBufferType.INT1D_BIN_8));\r
                return this.imple_labeling(i_bin_raster,0,i_top,i_bottom,o_stack);\r
        }\r
        /**\r
@@ -220,7 +220,7 @@ public class NyARLabeling_Rle
         */\r
        public int labeling(NyARGrayscaleRaster i_gs_raster,int i_th, int i_top, int i_bottom,RleLabelFragmentInfoStack o_stack) throws NyARException\r
        {\r
-               assert(i_gs_raster.isEqualBufferType(INyARRaster.BUFFERFORMAT_INT1D_GRAY_8));\r
+               assert(i_gs_raster.isEqualBufferType(NyARBufferType.INT1D_GRAY_8));\r
                return this.imple_labeling(i_gs_raster,i_th,i_top,i_bottom,o_stack);\r
        }\r
        private int imple_labeling(INyARRaster i_raster,int i_th,int i_top, int i_bottom,RleLabelFragmentInfoStack o_stack) throws NyARException\r
index 0e9b85e..1d3555f 100644 (file)
@@ -71,7 +71,7 @@ public class NyARMatchPattDeviationColorData
        public void setRaster(INyARRaster i_raster)\r
        {\r
                //画素フォーマット、サイズ制限\r
-               assert i_raster.isEqualBufferType(INyARRaster.BUFFERFORMAT_INT1D_X8R8G8B8_32);\r
+               assert i_raster.isEqualBufferType(NyARBufferType.INT1D_X8R8G8B8_32);\r
                assert i_raster.getSize().isEqualSize(i_raster.getSize());\r
 \r
                final int[] buf=(int[])i_raster.getBuffer();\r
index c63ca69..a3aede7 100644 (file)
@@ -45,7 +45,7 @@ import jp.nyatla.nyartoolkit.core.raster.*;
 public class NyARColorPatt_O1 implements INyARColorPatt\r
 {\r
        private static final int AR_PATT_SAMPLE_NUM = 64;\r
-       private static final int BUFFER_FORMAT=INyARRaster.BUFFERFORMAT_INT1D_X8R8G8B8_32;\r
+       private static final int BUFFER_FORMAT=NyARBufferType.INT1D_X8R8G8B8_32;\r
        private int[] _patdata;\r
        private NyARRgbPixelReader_INT1D_X8R8G8B8_32 _pixelreader;\r
 \r
index 0225cf2..b2a849d 100644 (file)
@@ -45,7 +45,7 @@ import jp.nyatla.nyartoolkit.core.raster.*;
 public class NyARColorPatt_O3 implements INyARColorPatt\r
 {\r
        private static final int AR_PATT_SAMPLE_NUM = 64;\r
-       private static final int BUFFER_FORMAT=INyARRaster.BUFFERFORMAT_INT1D_X8R8G8B8_32;\r
+       private static final int BUFFER_FORMAT=NyARBufferType.INT1D_X8R8G8B8_32;\r
 \r
        private int[] _patdata;\r
        private NyARIntSize _size;\r
index 5d00f41..12c0a72 100644 (file)
@@ -46,7 +46,7 @@ public class NyARColorPatt_Perspective implements INyARColorPatt
        protected NyARPerspectiveParamGenerator_O1 _perspective_gen;\r
        private NyARRgbPixelReader_INT1D_X8R8G8B8_32 _pixelreader;\r
        private static final int LOCAL_LT=1;\r
-       private static final int BUFFER_FORMAT=INyARRaster.BUFFERFORMAT_INT1D_X8R8G8B8_32;\r
+       private static final int BUFFER_FORMAT=NyARBufferType.INT1D_X8R8G8B8_32;\r
        \r
        private void initializeInstance(int i_width, int i_height,int i_point_per_pix)\r
        {\r
index 7e30847..35d3ec9 100644 (file)
@@ -44,7 +44,7 @@ public class NyARColorPatt_PseudoAffine implements INyARColorPatt
        private int[] _patdata;\r
        private NyARRgbPixelReader_INT1D_X8R8G8B8_32 _pixelreader;\r
        private NyARIntSize _size;\r
-       private static final int BUFFER_FORMAT=INyARRaster.BUFFERFORMAT_INT1D_X8R8G8B8_32;\r
+       private static final int BUFFER_FORMAT=NyARBufferType.INT1D_X8R8G8B8_32;\r
                \r
        public final int getWidth()\r
        {\r
index df0e630..da28172 100644 (file)
@@ -37,120 +37,6 @@ import jp.nyatla.nyartoolkit.core.types.*;
 \r
 public interface INyARRaster\r
 {\r
-       public static final int BYTE1D =0x00010000;\r
-       public static final int INT2D  =0x00020000;\r
-       public static final int SHORT1D=0x00030000;\r
-       public static final int INT1D  =0x00040000;\r
-       public static final int OBJECT =0x00100000;\r
-       public static final int USER   =0x00FF0000;\r
-       //  24-31(8)予約\r
-       //  16-27(8)型ID\r
-       //      00:無効/01:byte[]/02:int[][]/03:short[]\r
-       //  08-15(8)ビットフォーマットID\r
-       //      00:24bit/01:32bit/02:16bit\r
-       //  00-07(8)型番号\r
-       //\r
-       /**\r
-        * RGB24フォーマットで、全ての画素が0\r
-        */\r
-       public static final int BUFFERFORMAT_NULL_ALLZERO = 0x00000001;\r
-       /**\r
-        * USER - USER+0xFFFFはユーザー定義型。実験用に。\r
-        */\r
-       public static final int BUFFERFORMAT_USER         = USER;\r
-\r
-       /**\r
-        * byte[]で、R8G8B8の24ビットで画素が格納されている。\r
-        */\r
-       public static final int BUFFERFORMAT_BYTE1D_R8G8B8_24   = BYTE1D|0x0001;\r
-       /**\r
-        * byte[]で、B8G8R8の24ビットで画素が格納されている。\r
-        */\r
-       public static final int BUFFERFORMAT_BYTE1D_B8G8R8_24   = BYTE1D|0x0002;\r
-       /**\r
-        * byte[]で、R8G8B8X8の32ビットで画素が格納されている。\r
-        */\r
-       public static final int BUFFERFORMAT_BYTE1D_B8G8R8X8_32 = BYTE1D|0x0101;\r
-       /**\r
-        * byte[]で、X8R8G8B8の32ビットで画素が格納されている。\r
-        */\r
-       public static final int BUFFERFORMAT_BYTE1D_X8R8G8B8_32 = BYTE1D|0x0102;\r
-\r
-       /**\r
-        * byte[]で、RGB565の16ビット(little/big endian)で画素が格納されている。\r
-        */\r
-       public static final int BUFFERFORMAT_BYTE1D_R5G6B5_16LE = BYTE1D|0x0201;\r
-    public static final int BUFFERFORMAT_BYTE1D_R5G6B5_16BE = BYTE1D|0x0202;\r
-       /**\r
-        * short[]で、RGB565の16ビット(little/big endian)で画素が格納されている。\r
-        */     \r
-    public static final int BUFFERFORMAT_WORD1D_R5G6B5_16LE = SHORT1D|0x0201;\r
-    public static final int BUFFERFORMAT_WORD1D_R5G6B5_16BE = SHORT1D|0x0202;\r
-\r
-       \r
-       /**\r
-        * int[][]で特に値範囲を定めない\r
-        */\r
-       public static final int BUFFERFORMAT_INT2D        = INT2D|0x0000;\r
-       /**\r
-        * int[][]で0-255のグレイスケール画像\r
-        */\r
-       public static final int BUFFERFORMAT_INT2D_GRAY_8 = INT2D|0x0001;\r
-       /**\r
-        * int[][]で0/1の2値画像\r
-        * これは、階調値1bitのBUFFERFORMAT_INT2D_GRAY_1と同じです。\r
-        */\r
-       public static final int BUFFERFORMAT_INT2D_BIN_8  = INT2D|0x0002;\r
-\r
-       /**\r
-        * int[]で特に値範囲を定めない\r
-        */\r
-       public static final int BUFFERFORMAT_INT1D        = INT1D|0x0000;\r
-       /**\r
-        * int[]で0-255のグレイスケール画像\r
-        */\r
-       public static final int BUFFERFORMAT_INT1D_GRAY_8 = INT1D|0x0001;\r
-       /**\r
-        * int[]で0/1の2値画像\r
-        * これは、階調1bitのBUFFERFORMAT_INT1D_GRAY_1と同じです。\r
-        */\r
-       public static final int BUFFERFORMAT_INT1D_BIN_8  = INT1D|0x0002;\r
-       \r
-       \r
-       /**\r
-        * int[]で、XRGB32の32ビットで画素が格納されている。\r
-        */     \r
-    public static final int BUFFERFORMAT_INT1D_X8R8G8B8_32=INT1D|0x0102;\r
-\r
-       /**\r
-        * H:9bit(0-359),S:8bit(0-255),V(0-255)\r
-        */\r
-       public static final int BUFFERFORMAT_INT1D_X7H9S8V8_32=INT1D|0x0103;\r
-    \r
-\r
-       \r
-       /**\r
-        * JavaのBufferedImageを格納するラスタ\r
-        */\r
-       public static final int BUFFERFORMAT_OBJECT_Java= OBJECT|0x0100;\r
-       public static final int BUFFERFORMAT_OBJECT_Java_BufferedImage= BUFFERFORMAT_OBJECT_Java|0x01;\r
-       \r
-       /**\r
-        * C#のBufferedImageを格納するラスタ\r
-        */\r
-       public static final int BUFFERFORMAT_OBJECT_CS= OBJECT|0x0200;\r
-       \r
-       /**\r
-        * ActionScript3のBitmapDataを格納するラスタ\r
-        */\r
-       public static final int BUFFERFORMAT_OBJECT_AS3= OBJECT|0x0300;\r
-       public static final int BUFFERFORMAT_OBJECT_AS3_BitmapData= BUFFERFORMAT_OBJECT_AS3|0x01;\r
-\r
-       \r
-       \r
-       \r
-       \r
-       \r
        public int getWidth();\r
        public int getHeight();\r
        public NyARIntSize getSize();\r
@@ -166,6 +52,7 @@ public interface INyARRaster
        public int getBufferType();\r
        /**\r
         * バッファのタイプがi_type_valueであるか、チェックします。\r
+        * この値は、NyARBufferTypeに定義された定数値です。\r
         * @param i_type_value\r
         * @return\r
         */\r
index a336ff8..ba45b09 100644 (file)
@@ -40,6 +40,15 @@ public class NyARBinRaster extends NyARRaster_BasicClass
         * バッファオブジェクトがアタッチされていればtrue\r
         */\r
        protected boolean _is_attached_buffer;\r
+       /**\r
+        * \r
+        * @param i_width\r
+        * @param i_height\r
+        * @param i_raster_type\r
+        * NyARBufferTypeに定義された定数値を指定してください。\r
+        * @param i_is_alloc\r
+        * @throws NyARException\r
+        */\r
        public NyARBinRaster(int i_width, int i_height,int i_raster_type,boolean i_is_alloc) throws NyARException\r
        {\r
                super(new NyARIntSize(i_width,i_height),i_raster_type);\r
@@ -49,15 +58,15 @@ public class NyARBinRaster extends NyARRaster_BasicClass
        }\r
        public NyARBinRaster(int i_width, int i_height,boolean i_is_alloc) throws NyARException\r
        {\r
-               super(new NyARIntSize(i_width,i_height),INyARRaster.BUFFERFORMAT_INT1D_BIN_8);\r
-               if(!initInstance(this._size,INyARRaster.BUFFERFORMAT_INT1D_BIN_8,i_is_alloc)){\r
+               super(new NyARIntSize(i_width,i_height),NyARBufferType.INT1D_BIN_8);\r
+               if(!initInstance(this._size,NyARBufferType.INT1D_BIN_8,i_is_alloc)){\r
                        throw new NyARException();\r
                }\r
        }\r
        public NyARBinRaster(int i_width, int i_height) throws NyARException\r
        {\r
-               super(new NyARIntSize(i_width,i_height),INyARRaster.BUFFERFORMAT_INT1D_BIN_8);\r
-               if(!initInstance(this._size,INyARRaster.BUFFERFORMAT_INT1D_BIN_8,true)){\r
+               super(new NyARIntSize(i_width,i_height),NyARBufferType.INT1D_BIN_8);\r
+               if(!initInstance(this._size,NyARBufferType.INT1D_BIN_8,true)){\r
                        throw new NyARException();\r
                }\r
        }       \r
@@ -65,7 +74,7 @@ public class NyARBinRaster extends NyARRaster_BasicClass
        {\r
                switch(i_buf_type)\r
                {\r
-                       case INyARRaster.BUFFERFORMAT_INT1D_BIN_8:\r
+                       case NyARBufferType.INT1D_BIN_8:\r
                                this._buf = i_is_alloc?new int[i_size.w*i_size.h]:null;\r
                                break;\r
                        default:\r
diff --git a/trunk/src/jp/nyatla/nyartoolkit/core/raster/NyARBufferType.java b/trunk/src/jp/nyatla/nyartoolkit/core/raster/NyARBufferType.java
new file mode 100644 (file)
index 0000000..9c581c0
--- /dev/null
@@ -0,0 +1,114 @@
+package jp.nyatla.nyartoolkit.core.raster;\r
+\r
+public class NyARBufferType\r
+{\r
+       private static final int T_BYTE1D =0x00010000;\r
+       private static final int T_INT2D  =0x00020000;\r
+       private static final int T_SHORT1D=0x00030000;\r
+       private static final int T_INT1D  =0x00040000;\r
+       private static final int T_OBJECT =0x00100000;\r
+       private static final int T_USER   =0x00FF0000;\r
+       //  24-31(8)予約\r
+       //  16-27(8)型ID\r
+       //      00:無効/01:byte[]/02:int[][]/03:short[]\r
+       //  08-15(8)ビットフォーマットID\r
+       //      00:24bit/01:32bit/02:16bit\r
+       //  00-07(8)型番号\r
+       //\r
+       /**\r
+        * RGB24フォーマットで、全ての画素が0\r
+        */\r
+       public static final int NULL_ALLZERO = 0x00000001;\r
+       /**\r
+        * USER - USER+0xFFFFはユーザー定義型。実験用に。\r
+        */\r
+       public static final int USER_DEFINE  = T_USER;\r
+\r
+       /**\r
+        * byte[]で、R8G8B8の24ビットで画素が格納されている。\r
+        */\r
+       public static final int BYTE1D_R8G8B8_24   = T_BYTE1D|0x0001;\r
+       /**\r
+        * byte[]で、B8G8R8の24ビットで画素が格納されている。\r
+        */\r
+       public static final int BYTE1D_B8G8R8_24   = T_BYTE1D|0x0002;\r
+       /**\r
+        * byte[]で、R8G8B8X8の32ビットで画素が格納されている。\r
+        */\r
+       public static final int BYTE1D_B8G8R8X8_32 = T_BYTE1D|0x0101;\r
+       /**\r
+        * byte[]で、X8R8G8B8の32ビットで画素が格納されている。\r
+        */\r
+       public static final int BYTE1D_X8R8G8B8_32 = T_BYTE1D|0x0102;\r
+\r
+       /**\r
+        * byte[]で、RGB565の16ビット(little/big endian)で画素が格納されている。\r
+        */\r
+       public static final int BYTE1D_R5G6B5_16LE = T_BYTE1D|0x0201;\r
+    public static final int BYTE1D_R5G6B5_16BE = T_BYTE1D|0x0202;\r
+       /**\r
+        * short[]で、RGB565の16ビット(little/big endian)で画素が格納されている。\r
+        */     \r
+    public static final int WORD1D_R5G6B5_16LE = T_SHORT1D|0x0201;\r
+    public static final int WORD1D_R5G6B5_16BE = T_SHORT1D|0x0202;\r
+\r
+       \r
+       /**\r
+        * int[][]で特に値範囲を定めない\r
+        */\r
+       public static final int INT2D        = T_INT2D|0x0000;\r
+       /**\r
+        * int[][]で0-255のグレイスケール画像\r
+        */\r
+       public static final int INT2D_GRAY_8 = T_INT2D|0x0001;\r
+       /**\r
+        * int[][]で0/1の2値画像\r
+        * これは、階調値1bitのBUFFERFORMAT_INT2D_GRAY_1と同じです。\r
+        */\r
+       public static final int INT2D_BIN_8  = T_INT2D|0x0002;\r
+\r
+       /**\r
+        * int[]で特に値範囲を定めない\r
+        */\r
+       public static final int INT1D        = T_INT1D|0x0000;\r
+       /**\r
+        * int[]で0-255のグレイスケール画像\r
+        */\r
+       public static final int INT1D_GRAY_8 = T_INT1D|0x0001;\r
+       /**\r
+        * int[]で0/1の2値画像\r
+        * これは、階調1bitのINT1D_GRAY_1と同じです。\r
+        */\r
+       public static final int INT1D_BIN_8  = T_INT1D|0x0002;\r
+       \r
+       \r
+       /**\r
+        * int[]で、XRGB32の32ビットで画素が格納されている。\r
+        */     \r
+    public static final int INT1D_X8R8G8B8_32=T_INT1D|0x0102;\r
+\r
+       /**\r
+        * H:9bit(0-359),S:8bit(0-255),V(0-255)\r
+        */\r
+       public static final int INT1D_X7H9S8V8_32=T_INT1D|0x0103;\r
+    \r
+\r
+    /**\r
+     * プラットフォーム固有オブジェクト\r
+     */\r
+       public static final int OBJECT_Java= T_OBJECT|0x0100;\r
+       public static final int OBJECT_CS  = T_OBJECT|0x0200;\r
+       public static final int OBJECT_AS3 = T_OBJECT|0x0300;\r
+       \r
+       /**\r
+        * JavaのBufferedImageを格納するラスタ\r
+        */\r
+       public static final int OBJECT_Java_BufferedImage= OBJECT_Java|0x01;\r
+       \r
+       \r
+       /**\r
+        * ActionScript3のBitmapDataを格納するラスタ\r
+        */\r
+       public static final int OBJECT_AS3_BitmapData= OBJECT_AS3|0x01;\r
+\r
+}\r
index 920d77d..bd36e72 100644 (file)
@@ -33,7 +33,7 @@ package jp.nyatla.nyartoolkit.core.raster;
 import jp.nyatla.nyartoolkit.NyARException;\r
 import jp.nyatla.nyartoolkit.core.types.*;\r
 \r
-public final class NyARGrayscaleRaster extends NyARRaster_BasicClass\r
+public class NyARGrayscaleRaster extends NyARRaster_BasicClass\r
 {\r
 \r
        protected Object _buf;\r
@@ -44,18 +44,26 @@ public final class NyARGrayscaleRaster extends NyARRaster_BasicClass
 \r
        public NyARGrayscaleRaster(int i_width, int i_height) throws NyARException\r
        {\r
-               super(new NyARIntSize(i_width,i_height),INyARRaster.BUFFERFORMAT_INT1D_GRAY_8);\r
-               if(!initInstance(this._size,INyARRaster.BUFFERFORMAT_INT1D_GRAY_8,true)){\r
+               super(new NyARIntSize(i_width,i_height),NyARBufferType.INT1D_GRAY_8);\r
+               if(!initInstance(this._size,NyARBufferType.INT1D_GRAY_8,true)){\r
                        throw new NyARException();\r
                }\r
        }       \r
        public NyARGrayscaleRaster(int i_width, int i_height,boolean i_is_alloc) throws NyARException\r
        {\r
-               super(new NyARIntSize(i_width,i_height),INyARRaster.BUFFERFORMAT_INT1D_GRAY_8);\r
-               if(!initInstance(this._size,INyARRaster.BUFFERFORMAT_INT1D_GRAY_8,i_is_alloc)){\r
+               super(new NyARIntSize(i_width,i_height),NyARBufferType.INT1D_GRAY_8);\r
+               if(!initInstance(this._size,NyARBufferType.INT1D_GRAY_8,i_is_alloc)){\r
                        throw new NyARException();\r
                }\r
-       }       \r
+       }\r
+       /**\r
+        * @param i_width\r
+        * @param i_height\r
+        * @param i_raster_type\r
+        * NyARBufferTypeに定義された定数値を指定してください。\r
+        * @param i_is_alloc\r
+        * @throws NyARException\r
+        */\r
        public NyARGrayscaleRaster(int i_width, int i_height,int i_raster_type,boolean i_is_alloc) throws NyARException\r
        {\r
                super(new NyARIntSize(i_width,i_height),i_raster_type);\r
@@ -67,7 +75,7 @@ public final class NyARGrayscaleRaster extends NyARRaster_BasicClass
        {\r
                switch(i_buf_type)\r
                {\r
-                       case INyARRaster.BUFFERFORMAT_INT1D_GRAY_8:\r
+                       case NyARBufferType.INT1D_GRAY_8:\r
                                this._buf =i_is_alloc?new int[i_size.w*i_size.h]:null;\r
                                break;\r
                        default:\r
index 6bb4386..0d0aaf8 100644 (file)
@@ -36,12 +36,12 @@ import jp.nyatla.nyartoolkit.core.types.*;
 public final class NyARHsvRaster extends NyARRaster_BasicClass\r
 {\r
 \r
-       protected int[] _ref_buf;\r
+       private int[] _ref_buf;\r
        \r
        public NyARHsvRaster(int i_width, int i_height)\r
        {\r
                //このクラスは外部参照バッファ/形式多重化が使えない簡易実装です。\r
-               super(new NyARIntSize(i_width,i_height),INyARRaster.BUFFERFORMAT_INT1D_X7H9S8V8_32);\r
+               super(new NyARIntSize(i_width,i_height),NyARBufferType.INT1D_X7H9S8V8_32);\r
                this._ref_buf = new int[i_height*i_width];\r
        }\r
        public Object getBuffer()\r
index 98f74cd..08425b7 100644 (file)
 package jp.nyatla.nyartoolkit.core.raster;\r
 \r
 import jp.nyatla.nyartoolkit.NyARException;\r
-import jp.nyatla.nyartoolkit.core.rasterreader.*;\r
 import jp.nyatla.nyartoolkit.core.types.*;\r
 \r
 /**このクラスは、単機能のNyARRasterです。\r
  *\r
  */\r
-public final class NyARRaster extends NyARRaster_BasicClass\r
+public class NyARRaster extends NyARRaster_BasicClass\r
 {\r
        protected Object _buf;\r
        protected int _buf_type;\r
@@ -50,6 +49,7 @@ public final class NyARRaster extends NyARRaster_BasicClass
         * @param i_width\r
         * @param i_height\r
         * @param i_buffer_type\r
+        * NyARBufferTypeに定義された定数値を指定してください。\r
         * @param i_is_alloc\r
         * @throws NyARException\r
         */\r
@@ -74,7 +74,7 @@ public final class NyARRaster extends NyARRaster_BasicClass
        {\r
                switch(i_buf_type)\r
                {\r
-                       case INyARRaster.BUFFERFORMAT_INT1D_X8R8G8B8_32:\r
+                       case NyARBufferType.INT1D_X8R8G8B8_32:\r
                                this._buf=i_is_alloc?new int[i_size.w*i_size.h]:null;\r
                                break;\r
                        default:\r
index f0013f5..8290317 100644 (file)
@@ -13,6 +13,15 @@ public class NyARRgbRaster extends NyARRgbRaster_BasicClass
         * バッファオブジェクトがアタッチされていればtrue\r
         */\r
        protected boolean _is_attached_buffer;\r
+       /**\r
+        * \r
+        * @param i_width\r
+        * @param i_height\r
+        * @param i_raster_type\r
+        * NyARBufferTypeに定義された定数値を指定してください。\r
+        * @param i_is_alloc\r
+        * @throws NyARException\r
+        */\r
        public NyARRgbRaster(int i_width, int i_height,int i_raster_type,boolean i_is_alloc) throws NyARException\r
        {\r
                super(new NyARIntSize(i_width,i_height),i_raster_type);\r
@@ -20,6 +29,14 @@ public class NyARRgbRaster extends NyARRgbRaster_BasicClass
                        throw new NyARException();\r
                }\r
        }\r
+       /**\r
+        * \r
+        * @param i_width\r
+        * @param i_height\r
+        * @param i_raster_type\r
+        * NyARBufferTypeに定義された定数値を指定してください。\r
+        * @throws NyARException\r
+        */\r
        public NyARRgbRaster(int i_width, int i_height,int i_raster_type) throws NyARException\r
        {\r
                super(new NyARIntSize(i_width,i_height),i_raster_type);\r
@@ -31,15 +48,15 @@ public class NyARRgbRaster extends NyARRgbRaster_BasicClass
        {\r
                switch(i_raster_type)\r
                {\r
-                       case INyARRaster.BUFFERFORMAT_INT1D_X8R8G8B8_32:\r
+                       case NyARBufferType.INT1D_X8R8G8B8_32:\r
                                this._buf=i_is_alloc?new int[i_size.w*i_size.h]:null;\r
                                this._reader=new NyARRgbPixelReader_INT1D_X8R8G8B8_32((int[])this._buf,i_size);\r
                                break;\r
-                       case INyARRaster.BUFFERFORMAT_BYTE1D_B8G8R8X8_32:\r
+                       case NyARBufferType.BYTE1D_B8G8R8X8_32:\r
                                this._buf=i_is_alloc?new byte[i_size.w*i_size.h*4]:null;\r
                                this._reader=new NyARRgbPixelReader_BYTE1D_B8G8R8X8_32((byte[])this._buf,i_size);\r
                                break;\r
-                       case INyARRaster.BUFFERFORMAT_BYTE1D_R8G8B8_24:\r
+                       case NyARBufferType.BYTE1D_R8G8B8_24:\r
                                this._buf=i_is_alloc?new byte[i_size.w*i_size.h*3]:null;\r
                                this._reader=new NyARRgbPixelReader_BYTE1D_R8G8B8_24((byte[])this._buf,i_size);\r
                                break;\r
index 62d7d8f..a1c1205 100644 (file)
@@ -35,13 +35,13 @@ import jp.nyatla.nyartoolkit.core.raster.*;
 \r
 public class NyARRgbRaster_BGRA extends NyARRgbRaster\r
 {\r
-       public NyARRgbRaster_BGRA(int i_width, int i_height,Boolean i_is_alloc) throws NyARException\r
+       public NyARRgbRaster_BGRA(int i_width, int i_height,boolean i_is_alloc) throws NyARException\r
        {\r
-               super(i_width,i_height,INyARRaster.BUFFERFORMAT_BYTE1D_B8G8R8X8_32,i_is_alloc);\r
+               super(i_width,i_height,NyARBufferType.BYTE1D_B8G8R8X8_32,i_is_alloc);\r
        }       \r
        public NyARRgbRaster_BGRA(int i_width, int i_height) throws NyARException\r
        {\r
-               super(i_width,i_height,INyARRaster.BUFFERFORMAT_BYTE1D_B8G8R8X8_32);\r
+               super(i_width,i_height,NyARBufferType.BYTE1D_B8G8R8X8_32);\r
                return;\r
        }\r
 }\r
index f1e2b49..c487606 100644 (file)
@@ -78,7 +78,7 @@ public class NyARRgbRaster_Blank extends NyARRgbRaster_BasicClass
        \r
        public NyARRgbRaster_Blank(int i_width, int i_height)\r
        {\r
-               super(new NyARIntSize(i_width,i_height),INyARRaster.BUFFERFORMAT_NULL_ALLZERO);\r
+               super(new NyARIntSize(i_width,i_height),NyARBufferType.NULL_ALLZERO);\r
                this._reader = new PixelReader();\r
                return;\r
        }\r
index 7290f2e..2207c7a 100644 (file)
 package jp.nyatla.nyartoolkit.core.raster.rgb;\r
 \r
 import jp.nyatla.nyartoolkit.NyARException;\r
-import jp.nyatla.nyartoolkit.core.raster.INyARRaster;\r
+import jp.nyatla.nyartoolkit.core.raster.*;\r
 \r
 public class NyARRgbRaster_RGB extends NyARRgbRaster\r
 {\r
-       public NyARRgbRaster_RGB(int i_width, int i_height,Boolean i_is_alloc) throws NyARException\r
+       public NyARRgbRaster_RGB(int i_width, int i_height,boolean i_is_alloc) throws NyARException\r
        {\r
-               super(i_width,i_height,INyARRaster.BUFFERFORMAT_BYTE1D_R8G8B8_24,i_is_alloc);\r
+               super(i_width,i_height,NyARBufferType.BYTE1D_R8G8B8_24,i_is_alloc);\r
        }\r
 \r
        public NyARRgbRaster_RGB(int i_width, int i_height) throws NyARException\r
        {\r
-               super(i_width,i_height,INyARRaster.BUFFERFORMAT_BYTE1D_R8G8B8_24);\r
+               super(i_width,i_height,NyARBufferType.BYTE1D_R8G8B8_24);\r
                return;\r
        }\r
 }\r
index d9ed34e..ec005f8 100644 (file)
@@ -25,7 +25,7 @@
 package jp.nyatla.nyartoolkit.core.rasterfilter;\r
 \r
 import jp.nyatla.nyartoolkit.NyARException;\r
-import jp.nyatla.nyartoolkit.core.raster.INyARRaster;\r
+import jp.nyatla.nyartoolkit.core.raster.*;\r
 import jp.nyatla.nyartoolkit.core.types.NyARIntSize;\r
 \r
 /**\r
@@ -39,7 +39,7 @@ public class NyARRasterFilter_CustomToneTable implements INyARRasterFilter
        protected NyARRasterFilter_CustomToneTable(int i_raster_type) throws NyARException\r
        {\r
                switch (i_raster_type) {\r
-               case INyARRaster.BUFFERFORMAT_INT1D_GRAY_8:\r
+               case NyARBufferType.INT1D_GRAY_8:\r
                        this._dofilterimpl=new IdoFilterImpl_INT1D_GRAY_8();\r
                        break;\r
                default:\r
@@ -63,7 +63,7 @@ public class NyARRasterFilter_CustomToneTable implements INyARRasterFilter
        {\r
                public void doFilter(INyARRaster i_input, INyARRaster i_output,NyARIntSize i_size) throws NyARException\r
                {\r
-                       assert(         i_input.isEqualBufferType(INyARRaster.BUFFERFORMAT_INT1D_GRAY_8));\r
+                       assert(         i_input.isEqualBufferType(NyARBufferType.INT1D_GRAY_8));\r
                        \r
                        int[] out_buf = (int[]) i_output.getBuffer();\r
                        int[] in_buf = (int[]) i_input.getBuffer();\r
index 691c4bd..40a0ab8 100644 (file)
@@ -25,7 +25,7 @@
 package jp.nyatla.nyartoolkit.core.rasterfilter;\r
 \r
 import jp.nyatla.nyartoolkit.NyARException;\r
-import jp.nyatla.nyartoolkit.core.raster.INyARRaster;\r
+import jp.nyatla.nyartoolkit.core.raster.*;\r
 import jp.nyatla.nyartoolkit.core.types.NyARIntSize;\r
 \r
 \r
@@ -40,7 +40,7 @@ public class NyARRasterFilter_GaussianSmooth implements INyARRasterFilter
        public NyARRasterFilter_GaussianSmooth(int i_raster_type) throws NyARException\r
        {\r
                switch (i_raster_type) {\r
-               case INyARRaster.BUFFERFORMAT_INT1D_GRAY_8:\r
+               case NyARBufferType.INT1D_GRAY_8:\r
                        this._do_filter_impl=new IdoFilterImpl_GRAY_8();\r
                        break;\r
                default:\r
@@ -61,8 +61,8 @@ public class NyARRasterFilter_GaussianSmooth implements INyARRasterFilter
        {\r
                public void doFilter(INyARRaster i_input, INyARRaster i_output,NyARIntSize i_size) throws NyARException\r
                {\r
-                       assert (i_input.isEqualBufferType(INyARRaster.BUFFERFORMAT_INT1D_GRAY_8));\r
-                       assert (i_output.isEqualBufferType(INyARRaster.BUFFERFORMAT_INT1D_GRAY_8));\r
+                       assert (i_input.isEqualBufferType(NyARBufferType.INT1D_GRAY_8));\r
+                       assert (i_output.isEqualBufferType(NyARBufferType.INT1D_GRAY_8));\r
                        int[] in_ptr =(int[])i_input.getBuffer();\r
                        int[] out_ptr=(int[])i_output.getBuffer();\r
                        int width=i_size.w;\r
index 159616b..8fc765c 100644 (file)
@@ -41,7 +41,7 @@ public class NyARRasterFilter_Reverse implements INyARRasterFilter
        public NyARRasterFilter_Reverse(int i_raster_type) throws NyARException\r
        {\r
                switch (i_raster_type) {\r
-               case INyARRaster.BUFFERFORMAT_INT1D_GRAY_8:\r
+               case NyARBufferType.INT1D_GRAY_8:\r
                        this._do_filter_impl=new IdoFilterImpl_GRAY_8();\r
                        break;\r
                default:\r
@@ -61,8 +61,8 @@ public class NyARRasterFilter_Reverse implements INyARRasterFilter
        {\r
                public void doFilter(INyARRaster i_input, INyARRaster i_output,NyARIntSize i_size) throws NyARException\r
                {\r
-                       assert (i_input.isEqualBufferType(INyARRaster.BUFFERFORMAT_INT1D_GRAY_8));\r
-                       assert (i_output.isEqualBufferType(INyARRaster.BUFFERFORMAT_INT1D_GRAY_8));\r
+                       assert (i_input.isEqualBufferType(NyARBufferType.INT1D_GRAY_8));\r
+                       assert (i_output.isEqualBufferType(NyARBufferType.INT1D_GRAY_8));\r
                        int[] in_ptr =(int[])i_input.getBuffer();\r
                        int[] out_ptr=(int[])i_output.getBuffer();\r
 \r
index 4c1b4c2..443eb7b 100644 (file)
@@ -1,7 +1,7 @@
 package jp.nyatla.nyartoolkit.core.rasterfilter;\r
 \r
 import jp.nyatla.nyartoolkit.NyARException;\r
-import jp.nyatla.nyartoolkit.core.raster.INyARRaster;\r
+import jp.nyatla.nyartoolkit.core.raster.*;\r
 import jp.nyatla.nyartoolkit.core.types.NyARIntSize;\r
 \r
 /**\r
@@ -14,10 +14,10 @@ public class NyARRasterFilter_Rgb2Hsv implements INyARRasterFilter
        public NyARRasterFilter_Rgb2Hsv(int i_raster_type) throws NyARException\r
        {\r
                switch (i_raster_type) {\r
-               case INyARRaster.BUFFERFORMAT_BYTE1D_B8G8R8_24:\r
+               case NyARBufferType.BYTE1D_B8G8R8_24:\r
                        this._dofilterimpl=new IdoFilterImpl_BYTE1D_B8G8R8_24();\r
                        break;\r
-               case INyARRaster.BUFFERFORMAT_BYTE1D_R8G8B8_24:\r
+               case NyARBufferType.BYTE1D_R8G8B8_24:\r
                default:\r
                        throw new NyARException();\r
                }\r
@@ -37,7 +37,7 @@ public class NyARRasterFilter_Rgb2Hsv implements INyARRasterFilter
        {\r
                public void doFilter(INyARRaster i_input, INyARRaster i_output,NyARIntSize i_size) throws NyARException\r
                {\r
-                       assert(         i_input.isEqualBufferType(INyARRaster.BUFFERFORMAT_INT1D_X7H9S8V8_32));\r
+                       assert(         i_input.isEqualBufferType(NyARBufferType.INT1D_X7H9S8V8_32));\r
                        \r
                        int[] out_buf = (int[]) i_output.getBuffer();\r
                        byte[] in_buf = (byte[]) i_input.getBuffer();\r
index d918d4f..9d943fa 100644 (file)
@@ -25,7 +25,7 @@
 package jp.nyatla.nyartoolkit.core.rasterfilter;\r
 \r
 import jp.nyatla.nyartoolkit.NyARException;\r
-import jp.nyatla.nyartoolkit.core.raster.INyARRaster;\r
+import jp.nyatla.nyartoolkit.core.raster.*;\r
 import jp.nyatla.nyartoolkit.core.types.NyARIntSize;\r
 \r
 /**\r
@@ -41,7 +41,7 @@ public class NyARRasterFilter_Roberts implements INyARRasterFilter
        public NyARRasterFilter_Roberts(int i_raster_type) throws NyARException\r
        {\r
                switch (i_raster_type) {\r
-               case INyARRaster.BUFFERFORMAT_INT1D_GRAY_8:\r
+               case NyARBufferType.INT1D_GRAY_8:\r
                        this._do_filter_impl=new IdoFilterImpl_GRAY_8();\r
                        break;\r
                default:\r
@@ -61,8 +61,8 @@ public class NyARRasterFilter_Roberts implements INyARRasterFilter
        {\r
                public void doFilter(INyARRaster i_input, INyARRaster i_output,NyARIntSize i_size) throws NyARException\r
                {\r
-                       assert (i_input.isEqualBufferType(INyARRaster.BUFFERFORMAT_INT1D_GRAY_8));\r
-                       assert (i_output.isEqualBufferType(INyARRaster.BUFFERFORMAT_INT1D_GRAY_8));\r
+                       assert (i_input.isEqualBufferType(NyARBufferType.INT1D_GRAY_8));\r
+                       assert (i_output.isEqualBufferType(NyARBufferType.INT1D_GRAY_8));\r
                        int[] in_ptr =(int[])i_input.getBuffer();\r
                        int[] out_ptr=(int[])i_output.getBuffer();\r
                        int width=i_size.w;\r
index c30646f..61136b1 100644 (file)
@@ -25,7 +25,7 @@
 package jp.nyatla.nyartoolkit.core.rasterfilter;\r
 \r
 import jp.nyatla.nyartoolkit.NyARException;\r
-import jp.nyatla.nyartoolkit.core.raster.INyARRaster;\r
+import jp.nyatla.nyartoolkit.core.raster.*;\r
 import jp.nyatla.nyartoolkit.core.types.NyARIntSize;\r
 \r
 \r
@@ -40,7 +40,7 @@ public class NyARRasterFilter_SimpleSmooth implements INyARRasterFilter
        public NyARRasterFilter_SimpleSmooth(int i_raster_type) throws NyARException\r
        {\r
                switch (i_raster_type) {\r
-               case INyARRaster.BUFFERFORMAT_INT1D_GRAY_8:\r
+               case NyARBufferType.INT1D_GRAY_8:\r
                        this._do_filter_impl=new IdoFilterImpl_GRAY_8();\r
                        break;\r
                default:\r
@@ -61,8 +61,8 @@ public class NyARRasterFilter_SimpleSmooth implements INyARRasterFilter
        {\r
                public void doFilter(INyARRaster i_input, INyARRaster i_output,NyARIntSize i_size) throws NyARException\r
                {\r
-                       assert (i_input.isEqualBufferType(INyARRaster.BUFFERFORMAT_INT1D_GRAY_8));\r
-                       assert (i_output.isEqualBufferType(INyARRaster.BUFFERFORMAT_INT1D_GRAY_8));\r
+                       assert (i_input.isEqualBufferType(NyARBufferType.INT1D_GRAY_8));\r
+                       assert (i_output.isEqualBufferType(NyARBufferType.INT1D_GRAY_8));\r
                        int[] in_ptr =(int[])i_input.getBuffer();\r
                        int[] out_ptr=(int[])i_output.getBuffer();\r
                        /* 画像端は捨てる。\r
index 3350282..5c0aa21 100644 (file)
@@ -10,8 +10,8 @@ public class NyARRasterFilter_ConstantThreshold implements INyARRasterFilter_Gs2
        public int _threshold;\r
        public NyARRasterFilter_ConstantThreshold(int i_initial_threshold,int i_in_raster_type,int i_out_raster_type) throws NyARException\r
        {\r
-               assert(i_in_raster_type==INyARRaster.BUFFERFORMAT_INT1D_GRAY_8);\r
-               assert(i_out_raster_type==INyARRaster.BUFFERFORMAT_INT1D_BIN_8);\r
+               assert(i_in_raster_type==NyARBufferType.INT1D_GRAY_8);\r
+               assert(i_out_raster_type==NyARBufferType.INT1D_BIN_8);\r
                //初期化\r
                this._threshold=i_initial_threshold;\r
                \r
@@ -33,8 +33,8 @@ public class NyARRasterFilter_ConstantThreshold implements INyARRasterFilter_Gs2
        }\r
        public void doFilter(NyARGrayscaleRaster i_input, NyARBinRaster i_output) throws NyARException\r
        {\r
-               assert(i_input.getBufferType()==INyARRaster.BUFFERFORMAT_INT1D_GRAY_8);\r
-               assert(i_output.getBufferType()==INyARRaster.BUFFERFORMAT_INT1D_BIN_8);\r
+               assert(i_input.getBufferType()==NyARBufferType.INT1D_GRAY_8);\r
+               assert(i_output.getBufferType()==NyARBufferType.INT1D_BIN_8);\r
                int[] out_buf = (int[]) i_output.getBuffer();\r
                int[] in_buf = (int[]) i_input.getBuffer();\r
                NyARIntSize s=i_input.getSize();\r
index 47863cc..9f2641d 100644 (file)
@@ -18,7 +18,7 @@ public class NyARRasterFilter_ARToolkitThreshold implements INyARRasterFilter_Rg
 \r
        public NyARRasterFilter_ARToolkitThreshold(int i_threshold,int i_in_raster_type) throws NyARException\r
        {\r
-               if(!initInstance(i_threshold,i_in_raster_type,INyARRaster.BUFFERFORMAT_INT1D_BIN_8)){\r
+               if(!initInstance(i_threshold,i_in_raster_type,NyARBufferType.INT1D_BIN_8)){\r
                        throw new NyARException();\r
                }\r
        }\r
@@ -31,22 +31,22 @@ public class NyARRasterFilter_ARToolkitThreshold implements INyARRasterFilter_Rg
        protected boolean initInstance(int i_threshold,int i_in_raster_type,int i_out_raster_type)\r
        {\r
                switch(i_out_raster_type){\r
-               case INyARRaster.BUFFERFORMAT_INT1D_BIN_8:\r
+               case NyARBufferType.INT1D_BIN_8:\r
                        switch (i_in_raster_type){\r
-                       case INyARRaster.BUFFERFORMAT_BYTE1D_B8G8R8_24:\r
-                       case INyARRaster.BUFFERFORMAT_BYTE1D_R8G8B8_24:\r
+                       case NyARBufferType.BYTE1D_B8G8R8_24:\r
+                       case NyARBufferType.BYTE1D_R8G8B8_24:\r
                                this._do_threshold_impl=new doThFilterImpl_BUFFERFORMAT_BYTE1D_RGB_24();\r
                                break;\r
-                       case INyARRaster.BUFFERFORMAT_BYTE1D_B8G8R8X8_32:\r
+                       case NyARBufferType.BYTE1D_B8G8R8X8_32:\r
                                this._do_threshold_impl=new doThFilterImpl_BUFFERFORMAT_BYTE1D_B8G8R8X8_32();\r
                                break;\r
-                       case INyARRaster.BUFFERFORMAT_BYTE1D_X8R8G8B8_32:\r
+                       case NyARBufferType.BYTE1D_X8R8G8B8_32:\r
                                this._do_threshold_impl=new doThFilterImpl_BUFFERFORMAT_BYTE1D_X8R8G8B8_32();\r
                                break;\r
-                       case INyARRaster.BUFFERFORMAT_INT1D_X8R8G8B8_32:\r
+                       case NyARBufferType.INT1D_X8R8G8B8_32:\r
                                this._do_threshold_impl=new doThFilterImpl_BUFFERFORMAT_INT1D_X8R8G8B8_32();\r
                                break;\r
-                       case INyARRaster.BUFFERFORMAT_WORD1D_R5G6B5_16LE:\r
+                       case NyARBufferType.WORD1D_R5G6B5_16LE:\r
                                this._do_threshold_impl=new doThFilterImpl_BUFFERFORMAT_WORD1D_R5G6B5_16LE();\r
                                break;\r
                        default:\r
@@ -87,7 +87,7 @@ public class NyARRasterFilter_ARToolkitThreshold implements INyARRasterFilter_Rg
        {\r
                public void doThFilter(INyARRaster i_input, INyARRaster i_output,NyARIntSize i_size,int i_threshold)\r
                {\r
-                       assert (i_output.isEqualBufferType(INyARRaster.BUFFERFORMAT_INT1D_BIN_8));\r
+                       assert (i_output.isEqualBufferType(NyARBufferType.INT1D_BIN_8));\r
                        \r
                        int[] out_buf = (int[]) i_output.getBuffer();\r
                        byte[] in_buf = (byte[]) i_input.getBuffer();\r
@@ -146,8 +146,8 @@ public class NyARRasterFilter_ARToolkitThreshold implements INyARRasterFilter_Rg
        {\r
                public void doThFilter(INyARRaster i_input, INyARRaster i_output,NyARIntSize i_size,int i_threshold)\r
                {\r
-                       assert (i_input.isEqualBufferType(INyARRaster.BUFFERFORMAT_BYTE1D_B8G8R8X8_32));\r
-                       assert (i_output.isEqualBufferType(INyARRaster.BUFFERFORMAT_INT1D_BIN_8));\r
+                       assert (i_input.isEqualBufferType(NyARBufferType.BYTE1D_B8G8R8X8_32));\r
+                       assert (i_output.isEqualBufferType(NyARBufferType.INT1D_BIN_8));\r
                        \r
                        int[] out_buf = (int[]) i_output.getBuffer();\r
                        byte[] in_buf = (byte[]) i_input.getBuffer();\r
@@ -205,7 +205,7 @@ public class NyARRasterFilter_ARToolkitThreshold implements INyARRasterFilter_Rg
        {\r
                public void doThFilter(INyARRaster i_input, INyARRaster i_output,NyARIntSize i_size,int i_threshold)\r
                {\r
-                       assert (i_output.isEqualBufferType(INyARRaster.BUFFERFORMAT_INT1D_BIN_8));\r
+                       assert (i_output.isEqualBufferType(NyARBufferType.INT1D_BIN_8));\r
                        \r
                        int[] out_buf = (int[]) i_output.getBuffer();\r
                        byte[] in_buf = (byte[]) i_input.getBuffer();\r
@@ -265,7 +265,7 @@ public class NyARRasterFilter_ARToolkitThreshold implements INyARRasterFilter_Rg
        {\r
                public void doThFilter(INyARRaster i_input, INyARRaster i_output,NyARIntSize i_size,int i_threshold)\r
                {\r
-                       assert (i_output.isEqualBufferType(INyARRaster.BUFFERFORMAT_INT1D_BIN_8));\r
+                       assert (i_output.isEqualBufferType(NyARBufferType.INT1D_BIN_8));\r
                        \r
                        int[] out_buf = (int[]) i_output.getBuffer();\r
                        int[] in_buf = (int[]) i_input.getBuffer();\r
@@ -314,7 +314,7 @@ public class NyARRasterFilter_ARToolkitThreshold implements INyARRasterFilter_Rg
        {\r
                public void doThFilter(INyARRaster i_input, INyARRaster i_output,NyARIntSize i_size,int i_threshold)\r
                {\r
-                       assert (i_output.isEqualBufferType(INyARRaster.BUFFERFORMAT_INT1D_BIN_8));\r
+                       assert (i_output.isEqualBufferType(NyARBufferType.INT1D_BIN_8));\r
                        \r
                        int[] out_buf = (int[]) i_output.getBuffer();\r
                        short[] in_buf = (short[]) i_input.getBuffer();\r
index 661774a..bf7404f 100644 (file)
@@ -52,7 +52,7 @@ public class NyARRasterFilter_Rgb2Gs_AveAdd implements INyARRasterFilter_Rgb2Gs
        }\r
        public NyARRasterFilter_Rgb2Gs_AveAdd(int i_in_raster_type) throws NyARException\r
        {\r
-               if(!initInstance(i_in_raster_type,INyARRaster.BUFFERFORMAT_INT1D_GRAY_8))\r
+               if(!initInstance(i_in_raster_type,NyARBufferType.INT1D_GRAY_8))\r
                {\r
                        throw new NyARException();\r
                }\r
@@ -60,13 +60,13 @@ public class NyARRasterFilter_Rgb2Gs_AveAdd implements INyARRasterFilter_Rgb2Gs
        protected boolean initInstance(int i_in_raster_type,int i_out_raster_type)\r
        {\r
                switch(i_out_raster_type){\r
-               case INyARRaster.BUFFERFORMAT_INT1D_GRAY_8:\r
+               case NyARBufferType.INT1D_GRAY_8:\r
                        switch (i_in_raster_type){\r
-                       case INyARRaster.BUFFERFORMAT_BYTE1D_B8G8R8_24:\r
-                       case INyARRaster.BUFFERFORMAT_BYTE1D_R8G8B8_24:\r
+                       case NyARBufferType.BYTE1D_B8G8R8_24:\r
+                       case NyARBufferType.BYTE1D_R8G8B8_24:\r
                                this._do_filter_impl=new doThFilterImpl_BYTE1D_B8G8R8_24();\r
                                break;\r
-                       case INyARRaster.BUFFERFORMAT_BYTE1D_B8G8R8X8_32:\r
+                       case NyARBufferType.BYTE1D_B8G8R8X8_32:\r
                                this._do_filter_impl=new doThFilterImpl_BYTE1D_B8G8R8X8_32();\r
                                break;\r
                        default:\r
@@ -98,7 +98,7 @@ public class NyARRasterFilter_Rgb2Gs_AveAdd implements INyARRasterFilter_Rgb2Gs
        {\r
                public void doFilter(INyARRaster i_input, INyARRaster i_output,NyARIntSize i_size)\r
                {\r
-                       assert(i_output.isEqualBufferType(INyARRaster.BUFFERFORMAT_INT1D_GRAY_8));\r
+                       assert(i_output.isEqualBufferType(NyARBufferType.INT1D_GRAY_8));\r
                        int[] out_buf = (int[]) i_output.getBuffer();\r
                        byte[] in_buf = (byte[]) i_input.getBuffer();\r
                        \r
@@ -116,7 +116,7 @@ public class NyARRasterFilter_Rgb2Gs_AveAdd implements INyARRasterFilter_Rgb2Gs
        {\r
                public void doFilter(INyARRaster i_input, INyARRaster i_output,NyARIntSize i_size)\r
                {\r
-                       assert(i_output.isEqualBufferType(INyARRaster.BUFFERFORMAT_INT1D_GRAY_8));\r
+                       assert(i_output.isEqualBufferType(NyARBufferType.INT1D_GRAY_8));\r
                        int[] out_buf = (int[]) i_output.getBuffer();\r
                        byte[] in_buf = (byte[]) i_input.getBuffer();\r
 \r
index b05b012..112656e 100644 (file)
@@ -49,7 +49,7 @@ public class NyARRasterFilter_Rgb2Gs_RgbCube implements INyARRasterFilter_Rgb2Gs
        private IdoFilterImpl _dofilterimpl;\r
        public NyARRasterFilter_Rgb2Gs_RgbCube(int i_in_raster_type) throws NyARException\r
        {\r
-               if(!initInstance(i_in_raster_type,INyARRaster.BUFFERFORMAT_INT1D_GRAY_8))\r
+               if(!initInstance(i_in_raster_type,NyARBufferType.INT1D_GRAY_8))\r
                {\r
                        throw new NyARException();\r
                }\r
@@ -64,10 +64,10 @@ public class NyARRasterFilter_Rgb2Gs_RgbCube implements INyARRasterFilter_Rgb2Gs
        protected boolean initInstance(int i_in_raster_type,int i_out_raster_type)\r
        {\r
                switch(i_out_raster_type){\r
-               case INyARRaster.BUFFERFORMAT_INT1D_GRAY_8:\r
+               case NyARBufferType.INT1D_GRAY_8:\r
                        switch (i_in_raster_type) {\r
-                       case INyARRaster.BUFFERFORMAT_BYTE1D_B8G8R8_24:\r
-                       case INyARRaster.BUFFERFORMAT_BYTE1D_R8G8B8_24:\r
+                       case NyARBufferType.BYTE1D_B8G8R8_24:\r
+                       case NyARBufferType.BYTE1D_R8G8B8_24:\r
                                this._dofilterimpl=new IdoFilterImpl_BYTE1D_B8G8R8_24();\r
                                break;\r
                        default:\r
@@ -98,9 +98,9 @@ public class NyARRasterFilter_Rgb2Gs_RgbCube implements INyARRasterFilter_Rgb2Gs
                 */\r
                public void doFilter(INyARRaster i_input, INyARRaster i_output,NyARIntSize i_size) throws NyARException\r
                {\r
-                       assert(         i_input.isEqualBufferType(INyARRaster.BUFFERFORMAT_BYTE1D_B8G8R8_24)\r
-                                       ||      i_input.isEqualBufferType(INyARRaster.BUFFERFORMAT_BYTE1D_R8G8B8_24));\r
-                       assert(i_output.isEqualBufferType(INyARRaster.BUFFERFORMAT_INT1D_GRAY_8));\r
+                       assert(         i_input.isEqualBufferType(NyARBufferType.BYTE1D_B8G8R8_24)\r
+                                       ||      i_input.isEqualBufferType(NyARBufferType.BYTE1D_R8G8B8_24));\r
+                       assert(i_output.isEqualBufferType(NyARBufferType.INT1D_GRAY_8));\r
                        \r
                        int[] out_buf = (int[]) i_output.getBuffer();\r
                        byte[] in_buf = (byte[]) i_input.getBuffer();\r
index b8bb1ae..6c270a2 100644 (file)
@@ -39,7 +39,7 @@ public class NyARRasterFilter_Rgb2Gs_YCbCr implements INyARRasterFilter_Rgb2Gs
        private IdoFilterImpl _dofilterimpl;\r
        public NyARRasterFilter_Rgb2Gs_YCbCr(int i_in_raster_type) throws NyARException\r
        {\r
-               if(!initInstance(i_in_raster_type,INyARRaster.BUFFERFORMAT_INT1D_GRAY_8))\r
+               if(!initInstance(i_in_raster_type,NyARBufferType.INT1D_GRAY_8))\r
                {\r
                        throw new NyARException();\r
                }\r
@@ -54,12 +54,12 @@ public class NyARRasterFilter_Rgb2Gs_YCbCr implements INyARRasterFilter_Rgb2Gs
        protected boolean initInstance(int i_in_raster_type,int i_out_raster_type)\r
        {\r
                switch(i_out_raster_type){\r
-               case INyARRaster.BUFFERFORMAT_INT1D_GRAY_8:\r
+               case NyARBufferType.INT1D_GRAY_8:\r
                        switch (i_in_raster_type) {\r
-                       case INyARRaster.BUFFERFORMAT_BYTE1D_B8G8R8_24:\r
+                       case NyARBufferType.BYTE1D_B8G8R8_24:\r
                                this._dofilterimpl=new IdoFilterImpl_BYTE1D_B8G8R8_24();\r
                                break;\r
-                       case INyARRaster.BUFFERFORMAT_BYTE1D_R8G8B8_24:\r
+                       case NyARBufferType.BYTE1D_R8G8B8_24:\r
                        default:\r
                                return false;\r
                        }\r
@@ -87,8 +87,8 @@ public class NyARRasterFilter_Rgb2Gs_YCbCr implements INyARRasterFilter_Rgb2Gs
                 */\r
                public void doFilter(INyARRaster i_input, INyARRaster i_output,NyARIntSize i_size) throws NyARException\r
                {\r
-                       assert( i_input.isEqualBufferType(INyARRaster.BUFFERFORMAT_BYTE1D_B8G8R8_24));\r
-                       assert(i_output.isEqualBufferType(INyARRaster.BUFFERFORMAT_INT1D_GRAY_8));\r
+                       assert( i_input.isEqualBufferType(NyARBufferType.BYTE1D_B8G8R8_24));\r
+                       assert(i_output.isEqualBufferType(NyARBufferType.INT1D_GRAY_8));\r
                        \r
                        int[] out_buf = (int[]) i_output.getBuffer();\r
                        byte[] in_buf = (byte[]) i_input.getBuffer();\r
index c2f1e7a..71f1b63 100644 (file)
@@ -1,3 +1,33 @@
+/* \r
+ * PROJECT: NyARToolkit\r
+ * --------------------------------------------------------------------------------\r
+ * This work is based on the original ARToolKit developed by\r
+ *   Hirokazu Kato\r
+ *   Mark Billinghurst\r
+ *   HITLab, University of Washington, Seattle\r
+ * http://www.hitl.washington.edu/artoolkit/\r
+ *\r
+ * The NyARToolkit is Java edition ARToolKit class library.\r
+ * Copyright (C)2008-2009 Ryo Iizuka\r
+ *\r
+ * This program is free software: you can redistribute it and/or modify\r
+ * it under the terms of the GNU General Public License as published by\r
+ * the Free Software Foundation, either version 3 of the License, or\r
+ * (at your option) any later version.\r
+ * \r
+ * This program is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.\r
+ * \r
+ * For further information please contact.\r
+ *     http://nyatla.jp/nyatoolkit/\r
+ *     <airmail(at)ebony.plala.or.jp> or <nyatla(at)nyatla.jp>\r
+ * \r
+ */\r
 package jp.nyatla.nyartoolkit.core.rasterreader;\r
 \r
 import jp.nyatla.nyartoolkit.NyARException;\r
index 6b45a14..607709c 100644 (file)
@@ -24,7 +24,7 @@
  */\r
 package jp.nyatla.nyartoolkit.core.rasterreader;\r
 \r
-import jp.nyatla.nyartoolkit.core.raster.INyARRaster;\r
+import jp.nyatla.nyartoolkit.core.raster.*;\r
 import jp.nyatla.nyartoolkit.core.types.NyARIntPoint2d;\r
 import jp.nyatla.nyartoolkit.core.types.NyARIntSize;\r
 \r
@@ -34,7 +34,7 @@ public        class NyARVectorReader_INT1D_GRAY_8
        private NyARIntSize _ref_size;\r
        public NyARVectorReader_INT1D_GRAY_8(INyARRaster i_ref_raster)\r
        {\r
-               assert(i_ref_raster.getBufferType()==INyARRaster.BUFFERFORMAT_INT1D_GRAY_8);\r
+               assert(i_ref_raster.getBufferType()==NyARBufferType.INT1D_GRAY_8);\r
                this._ref_buf=(int[])(i_ref_raster.getBuffer());\r
                this._ref_size=i_ref_raster.getSize();\r
        }\r
index 42fb463..09519f7 100644 (file)
@@ -46,7 +46,7 @@ public class ContourPickup
        protected final static int[] _getContour_ydir = {-1,-1, 0, 1, 1, 1, 0,-1 ,-1,-1, 0, 1, 1, 1, 0};\r
        public int getContour(NyARBinRaster i_raster,int i_entry_x,int i_entry_y,int i_array_size,int[] o_coord_x,int[] o_coord_y) throws NyARException\r
        {\r
-               assert(i_raster.isEqualBufferType(INyARRaster.BUFFERFORMAT_INT1D_BIN_8));\r
+               assert(i_raster.isEqualBufferType(NyARBufferType.INT1D_BIN_8));\r
                return impl_getContour(i_raster,0,i_entry_x,i_entry_y,i_array_size,o_coord_x,o_coord_y);\r
        }\r
        /**\r
@@ -65,7 +65,7 @@ public class ContourPickup
         */\r
        public int getContour(NyARGrayscaleRaster i_raster,int i_th,int i_entry_x,int i_entry_y,int i_array_size,int[] o_coord_x,int[] o_coord_y) throws NyARException\r
        {\r
-               assert(i_raster.isEqualBufferType(INyARRaster.BUFFERFORMAT_INT1D_GRAY_8));\r
+               assert(i_raster.isEqualBufferType(NyARBufferType.INT1D_GRAY_8));\r
                return impl_getContour(i_raster,i_th,i_entry_x,i_entry_y,i_array_size,o_coord_x,o_coord_y);\r
        }\r
 \r
@@ -33,11 +33,11 @@ package jp.nyatla.nyartoolkit.core.squaredetect;
 import jp.nyatla.nyartoolkit.NyARException;\r
 import jp.nyatla.nyartoolkit.core.raster.NyARBinRaster;\r
 \r
-public interface INyARSquareContourDetector\r
+public abstract class NyARSquareContourDetector\r
 {\r
        public interface DetectMarkerCallback\r
        {\r
-               public void onSquareDetect(INyARSquareContourDetector i_sender,int[] i_coordx,int[] i_coordy,int i_coor_num,int[] i_vertex_index)  throws NyARException;\r
+               public void onSquareDetect(NyARSquareContourDetector i_sender,int[] i_coordx,int[] i_coordy,int i_coor_num,int[] i_vertex_index)  throws NyARException;\r
        }\r
        /**\r
         *\r
@@ -45,6 +45,6 @@ public interface INyARSquareContourDetector
         * @param o_square_stack\r
         * @throws NyARException\r
         */\r
-       public void detectMarkerCB(NyARBinRaster i_raster, DetectMarkerCallback i_callback) throws NyARException;\r
+       public abstract void detectMarkerCB(NyARBinRaster i_raster, DetectMarkerCallback i_callback) throws NyARException;\r
 }\r
 \r
index 50c346c..7582f79 100644 (file)
@@ -42,7 +42,7 @@ import jp.nyatla.nyartoolkit.core.types.NyARIntSize;
 \r
 \r
 \r
-public class NyARSquareContourDetector_ARToolKit implements INyARSquareContourDetector\r
+public class NyARSquareContourDetector_ARToolKit extends NyARSquareContourDetector\r
 {\r
        private static final int AR_AREA_MAX = 100000;// #define AR_AREA_MAX 100000\r
        private static final int AR_AREA_MIN = 70;// #define AR_AREA_MIN 70\r
index 1d460d1..30f410b 100644 (file)
@@ -39,7 +39,7 @@ import jp.nyatla.nyartoolkit.core.types.*;
 import java.util.*;\r
 \r
 \r
-public class NyARSquareContourDetector_Rle implements INyARSquareContourDetector\r
+public class NyARSquareContourDetector_Rle extends NyARSquareContourDetector\r
 {\r
        private static final int AR_AREA_MAX = 100000;// #define AR_AREA_MAX 100000\r
        private static final int AR_AREA_MIN = 70;// #define AR_AREA_MIN 70\r
index 128e624..ad86ff1 100644 (file)
@@ -105,8 +105,4 @@ public class NyARDoublePoint2d
        {\r
                return Math.sqrt(this.x*this.x+this.y+this.y);\r
        }\r
-       public final double sqNorm()\r
-       {\r
-               return this.x*this.x+this.y+this.y;\r
-       }\r
 }\r
index 0a5d5fb..9d9dd77 100644 (file)
@@ -56,7 +56,7 @@ public class NyARCustomSingleDetectMarker
        /**\r
         * detectMarkerのコールバック関数\r
         */\r
-       private class DetectSquareCB implements INyARSquareContourDetector.DetectMarkerCallback\r
+       private class DetectSquareCB implements NyARSquareContourDetector.DetectMarkerCallback\r
        {\r
                //公開プロパティ\r
                public double confidence;\r
@@ -84,7 +84,7 @@ public class NyARCustomSingleDetectMarker
                 * 矩形が見付かるたびに呼び出されます。\r
                 * 発見した矩形のパターンを検査して、方位を考慮した頂点データを確保します。\r
                 */\r
-               public void onSquareDetect(INyARSquareContourDetector i_sender,int[] i_coordx,int[] i_coordy,int i_coor_num,int[] i_vertex_index) throws NyARException\r
+               public void onSquareDetect(NyARSquareContourDetector i_sender,int[] i_coordx,int[] i_coordy,int i_coor_num,int[] i_vertex_index) throws NyARException\r
                {\r
                        NyARMatchPattResult mr=this.__detectMarkerLite_mr;\r
                        //輪郭座標から頂点リストに変換\r
@@ -135,7 +135,7 @@ public class NyARCustomSingleDetectMarker
        }\r
        \r
        private boolean _is_continue = false;\r
-       private INyARSquareContourDetector _square_detect;\r
+       private NyARSquareContourDetector _square_detect;\r
        protected INyARTransMat _transmat;\r
        //画処理用\r
        private NyARBinRaster _bin_raster;\r
@@ -150,7 +150,7 @@ public class NyARCustomSingleDetectMarker
        }\r
        protected void initInstance(\r
                INyARColorPatt i_patt_inst,\r
-               INyARSquareContourDetector i_sqdetect_inst,\r
+               NyARSquareContourDetector i_sqdetect_inst,\r
                INyARTransMat i_transmat_inst,\r
                INyARRasterFilter_Rgb2Bin i_filter,\r
                NyARParam       i_ref_param,\r
index 43d2e7b..5a55bf6 100644 (file)
@@ -40,7 +40,7 @@ import jp.nyatla.nyartoolkit.core.raster.rgb.*;
 import jp.nyatla.nyartoolkit.core.transmat.*;\r
 import jp.nyatla.nyartoolkit.core.rasterfilter.rgb2bin.*;\r
 import jp.nyatla.nyartoolkit.core.squaredetect.Coord2Linear;\r
-import jp.nyatla.nyartoolkit.core.squaredetect.INyARSquareContourDetector;\r
+import jp.nyatla.nyartoolkit.core.squaredetect.NyARSquareContourDetector;\r
 import jp.nyatla.nyartoolkit.core.squaredetect.NyARSquare;\r
 import jp.nyatla.nyartoolkit.core.squaredetect.NyARSquareContourDetector_Rle;\r
 import jp.nyatla.nyartoolkit.core.types.*;\r
@@ -78,7 +78,7 @@ public class NyARDetectMarker
        /**\r
         * detectMarkerのコールバック関数\r
         */\r
-       private class DetectSquareCB implements INyARSquareContourDetector.DetectMarkerCallback\r
+       private class DetectSquareCB implements NyARSquareContourDetector.DetectMarkerCallback\r
        {\r
                //公開プロパティ\r
                public NyARDetectMarkerResultStack result_stack=new NyARDetectMarkerResultStack(NyARDetectMarker.AR_SQUARE_MAX);\r
@@ -117,7 +117,7 @@ public class NyARDetectMarker
                 * 矩形が見付かるたびに呼び出されます。\r
                 * 発見した矩形のパターンを検査して、方位を考慮した頂点データを確保します。\r
                 */\r
-               public void onSquareDetect(INyARSquareContourDetector i_sender,int[] i_coordx,int[] i_coordy,int i_coor_num,int[] i_vertex_index) throws NyARException\r
+               public void onSquareDetect(NyARSquareContourDetector i_sender,int[] i_coordx,int[] i_coordy,int i_coor_num,int[] i_vertex_index) throws NyARException\r
                {\r
                        NyARMatchPattResult mr=this.__detectMarkerLite_mr;\r
                        //輪郭座標から頂点リストに変換\r
@@ -186,7 +186,7 @@ public class NyARDetectMarker
        \r
        private static final int AR_SQUARE_MAX = 300;\r
        private boolean _is_continue = false;\r
-       private INyARSquareContourDetector _square_detect;\r
+       private NyARSquareContourDetector _square_detect;\r
        protected INyARTransMat _transmat;\r
        private NyARRectOffset[] _offset;       \r
 \r
index 3db60a1..59ad941 100644 (file)
@@ -94,7 +94,7 @@ public class NyARSingleDetectMarker extends NyARCustomSingleDetectMarker
        {\r
                final NyARRasterFilter_ARToolkitThreshold th=new NyARRasterFilter_ARToolkitThreshold(100,i_input_raster_type);\r
                INyARColorPatt patt_inst;\r
-               INyARSquareContourDetector sqdetect_inst;\r
+               NyARSquareContourDetector sqdetect_inst;\r
                INyARTransMat transmat_inst;\r
 \r
                switch(i_profile_id){\r
index 26306b3..3bf1767 100644 (file)
@@ -54,7 +54,7 @@ public abstract class SingleARMarkerProcesser
        /**\r
         * detectMarkerのコールバック関数\r
         */\r
-       private class DetectSquareCB implements INyARSquareContourDetector.DetectMarkerCallback\r
+       private class DetectSquareCB implements NyARSquareContourDetector.DetectMarkerCallback\r
        {\r
                //公開プロパティ\r
                public final NyARSquare square=new NyARSquare();\r
@@ -103,7 +103,7 @@ public abstract class SingleARMarkerProcesser
                 * 矩形が見付かるたびに呼び出されます。\r
                 * 発見した矩形のパターンを検査して、方位を考慮した頂点データを確保します。\r
                 */\r
-               public void onSquareDetect(INyARSquareContourDetector i_sender,int[] i_coordx,int[] i_coordy,int i_coor_num,int[] i_vertex_index) throws NyARException\r
+               public void onSquareDetect(NyARSquareContourDetector i_sender,int[] i_coordx,int[] i_coordy,int i_coor_num,int[] i_vertex_index) throws NyARException\r
                {\r
                        if (this._match_patt==null) {\r
                                return;\r
@@ -197,7 +197,7 @@ public abstract class SingleARMarkerProcesser
 \r
        private int _lost_delay = 5;\r
 \r
-       private INyARSquareContourDetector _square_detect;\r
+       private NyARSquareContourDetector _square_detect;\r
 \r
        protected INyARTransMat _transmat;\r
 \r
@@ -222,7 +222,7 @@ public abstract class SingleARMarkerProcesser
        protected void initInstance(NyARParam i_param,int i_raster_type) throws NyARException\r
        {\r
                //初期化済?\r
-               assert this._initialized==false;\r
+               assert(this._initialized==false);\r
                \r
                NyARIntSize scr_size = i_param.getScreenSize();\r
                // 解析オブジェクトを作る\r
index 11dbc90..e44a919 100644 (file)
@@ -41,7 +41,7 @@ public abstract class SingleNyIdMarkerProcesser
        /**\r
         * detectMarkerのコールバック関数\r
         */\r
-       private class DetectSquareCB implements INyARSquareContourDetector.DetectMarkerCallback\r
+       private class DetectSquareCB implements NyARSquareContourDetector.DetectMarkerCallback\r
        {\r
                //公開プロパティ\r
                public final NyARSquare square=new NyARSquare();\r
@@ -86,7 +86,7 @@ public abstract class SingleNyIdMarkerProcesser
                 * 矩形が見付かるたびに呼び出されます。\r
                 * 発見した矩形のパターンを検査して、方位を考慮した頂点データを確保します。\r
                 */\r
-               public void onSquareDetect(INyARSquareContourDetector i_sender,int[] i_coordx,int[] i_coordy,int i_coor_num,int[] i_vertex_index) throws NyARException\r
+               public void onSquareDetect(NyARSquareContourDetector i_sender,int[] i_coordx,int[] i_coordy,int i_coor_num,int[] i_vertex_index) throws NyARException\r
                {\r
                        //既に発見済なら終了\r
                        if(this.marker_data!=null){\r
@@ -173,7 +173,7 @@ public abstract class SingleNyIdMarkerProcesser
        protected void initInstance(NyARParam i_param,INyIdMarkerDataEncoder i_encoder,int i_marker_width,int i_raster_format) throws NyARException\r
        {\r
                //初期化済?\r
-               assert this._initialized==false;\r
+               assert(this._initialized==false);\r
                \r
                NyARIntSize scr_size = i_param.getScreenSize();\r
                // 解析オブジェクトを作る\r
index d533e84..b17ed11 100644 (file)
@@ -121,7 +121,7 @@ public class LabelingBufferdImage extends BufferedImage
 \r
        public void drawImage(NyARGrayscaleRaster i_raster) throws NyARException\r
        {\r
-               assert (i_raster.getBufferType() == INyARRaster.BUFFERFORMAT_INT1D_GRAY_8);\r
+               assert (i_raster.getBufferType() == NyARBufferType.INT1D_GRAY_8);\r
 \r
                int w = this.getWidth();\r
                int h = this.getHeight();\r
@@ -148,7 +148,7 @@ public class LabelingBufferdImage extends BufferedImage
         */\r
        public void drawImage(NyARBinRaster i_raster) throws NyARException\r
        {\r
-               assert (i_raster.getBufferType() == INyARRaster.BUFFERFORMAT_INT1D_BIN_8);\r
+               assert (i_raster.getBufferType() == NyARBufferType.INT1D_BIN_8);\r
 \r
                int w = this.getWidth();\r
                int h = this.getHeight();\r
index 380ff6b..6d79bd3 100644 (file)
@@ -73,7 +73,7 @@ public class NyARRasterImageIO
        public static void copy(NyARGrayscaleRaster i_in,BufferedImage o_out) throws NyARException\r
        {\r
                assert i_in.getSize().isEqualSize(o_out.getWidth(), o_out.getHeight());\r
-               if(i_in.isEqualBufferType(INyARRaster.BUFFERFORMAT_INT1D_GRAY_8))\r
+               if(i_in.isEqualBufferType(NyARBufferType.INT1D_GRAY_8))\r
                {\r
                        final int[] buf=(int[])i_in.getBuffer();\r
                        final int w=o_out.getWidth();\r
@@ -95,7 +95,7 @@ public class NyARRasterImageIO
        public static void copy(INyARRaster i_in,BufferedImage o_out) throws NyARException\r
        {\r
                assert i_in.getSize().isEqualSize(o_out.getWidth(), o_out.getHeight());\r
-               if(i_in.isEqualBufferType(INyARRaster.BUFFERFORMAT_INT1D_BIN_8))\r
+               if(i_in.isEqualBufferType(NyARBufferType.INT1D_BIN_8))\r
                {\r
                        final int[] buf=(int[])i_in.getBuffer();\r
                        final int w=o_out.getWidth();\r
@@ -162,7 +162,7 @@ public class NyARRasterImageIO
        public static void copy(BufferedImage i_in,INyARRaster o_out) throws NyARException\r
        {\r
                assert o_out.getSize().isEqualSize(i_in.getWidth(), i_in.getHeight());\r
-               if(o_out.isEqualBufferType(INyARRaster.BUFFERFORMAT_INT1D_BIN_8))\r
+               if(o_out.isEqualBufferType(NyARBufferType.INT1D_BIN_8))\r
                {\r
                        final int[] buf=(int[])o_out.getBuffer();\r
                        final int w=i_in.getWidth();\r
index c99cec5..e3e5d9e 100644 (file)
@@ -29,17 +29,9 @@ import jp.nyatla.nyartoolkit.core.pickup.*;
 import jp.nyatla.nyartoolkit.core.raster.*;
 import jp.nyatla.nyartoolkit.core.raster.rgb.INyARRgbRaster;
 import jp.nyatla.nyartoolkit.core.rasterfilter.*;
-import jp.nyatla.nyartoolkit.core2.rasteranalyzer.*;
-import jp.nyatla.nyartoolkit.core2.rasteranalyzer.threshold.*;
-import jp.nyatla.nyartoolkit.core2.rasterfilter.gs2bin.*;
-import jp.nyatla.nyartoolkit.core2.rasterfilter.rgb2gs.NyARRasterFilter_RgbAve;
-import jp.nyatla.utils.j2se.LabelingBufferdImage;
-import jp.nyatla.nyartoolkit.core.rasterfilter.bin.INyARRasterFilter_RgbToGs;
 import jp.nyatla.nyartoolkit.core.rasterfilter.rgb2bin.*;
-import jp.nyatla.nyartoolkit.core.squaredetect.INyARSquareDetector;
 import jp.nyatla.nyartoolkit.core.squaredetect.NyARSquare;
 import jp.nyatla.nyartoolkit.core.squaredetect.NyARSquareStack;
-import jp.nyatla.nyartoolkit.core.squaredetect.NyARVertexCounter;
 import jp.nyatla.nyartoolkit.core.transmat.*;
 import jp.nyatla.nyartoolkit.core.types.*;
 import jp.nyatla.nyartoolkit.core.types.matrix.NyARDoubleMatrix22;
index 8924170..26cfa87 100644 (file)
@@ -14,7 +14,6 @@ import jp.nyatla.nyartoolkit.NyARException;
 import jp.nyatla.nyartoolkit.core.raster.*;\r
 import jp.nyatla.nyartoolkit.core.raster.rgb.NyARRgbRaster_BGRA;\r
 import jp.nyatla.nyartoolkit.core.rasterfilter.gs2bin.*;\r
-import jp.nyatla.nyartoolkit.core.rasterfilter.rgb2bin.NyARRasterFilterBuilder_RgbToBin;\r
 import jp.nyatla.nyartoolkit.utils.j2se.*;\r
 \r
 \r
index dd6fb32..95a48ff 100644 (file)
@@ -3,7 +3,7 @@ package jp.nyatla.nyartoolkit.dev.tracking;
 import jp.nyatla.nyartoolkit.NyARException;\r
 import jp.nyatla.nyartoolkit.core.NyARCode;\r
 import jp.nyatla.nyartoolkit.core.squaredetect.Coord2Linear;\r
-import jp.nyatla.nyartoolkit.core.squaredetect.INyARSquareContourDetector;\r
+import jp.nyatla.nyartoolkit.core.squaredetect.NyARSquareContourDetector;\r
 import jp.nyatla.nyartoolkit.core.squaredetect.NyARSquare;\r
 import jp.nyatla.nyartoolkit.core.types.*;\r
 import jp.nyatla.nyartoolkit.core.types.matrix.NyARDoubleMatrix33;\r
@@ -27,7 +27,7 @@ public class MarkerTracking_3dTrans
        /**\r
         * detectMarkerのコールバック関数\r
         */\r
-       private class DetectSquareCB implements INyARSquareContourDetector.DetectMarkerCallback\r
+       private class DetectSquareCB implements NyARSquareContourDetector.DetectMarkerCallback\r
        {\r
                //公開プロパティ\r
                public NyARSquare square=new NyARSquare();\r
@@ -71,7 +71,7 @@ public class MarkerTracking_3dTrans
                 * 矩形が見付かるたびに呼び出されます。\r
                 * 発見した矩形のパターンを検査して、方位を考慮した頂点データを確保します。\r
                 */\r
-               public void onSquareDetect(INyARSquareContourDetector i_sender,int[] i_coordx,int[] i_coordy,int i_coor_num,int[] i_vertex_index) throws NyARException\r
+               public void onSquareDetect(NyARSquareContourDetector i_sender,int[] i_coordx,int[] i_coordy,int i_coor_num,int[] i_vertex_index) throws NyARException\r
                {\r
                        //輪郭座標から頂点リストに変換\r
                        NyARIntPoint2d[] vertex=this.__tmp_vertex;\r
@@ -249,7 +249,7 @@ public class MarkerTracking_3dTrans
                        return index==-1?null:items[index];\r
                }               \r
        }\r
-       private INyARSquareContourDetector _square_detect;\r
+       private NyARSquareContourDetector _square_detect;\r
        protected INyARTransMat _transmat;\r
        //画処理用\r
        private NyARBinRaster _bin_raster;\r
@@ -266,7 +266,7 @@ public class MarkerTracking_3dTrans
        }\r
        protected void initInstance(\r
                INyARColorPatt i_patt_inst,\r
-               INyARSquareContourDetector i_sqdetect_inst,\r
+               NyARSquareContourDetector i_sqdetect_inst,\r
                INyARTransMat i_transmat_inst,\r
                INyARRasterFilter_Rgb2Bin i_filter,\r
                NyARParam       i_ref_param,\r
index 07c1363..2424f51 100644 (file)
@@ -13,7 +13,7 @@ import jp.nyatla.nyartoolkit.core.pickup.INyARColorPatt;
 import jp.nyatla.nyartoolkit.core.pickup.NyARColorPatt_Perspective_O2;\r
 import jp.nyatla.nyartoolkit.core.raster.NyARBinRaster;\r
 import jp.nyatla.nyartoolkit.core.rasterfilter.rgb2bin.*;\r
-import jp.nyatla.nyartoolkit.core.squaredetect.INyARSquareContourDetector;\r
+import jp.nyatla.nyartoolkit.core.squaredetect.NyARSquareContourDetector;\r
 import jp.nyatla.nyartoolkit.core.squaredetect.NyARSquareContourDetector_Rle;\r
 import jp.nyatla.nyartoolkit.core.squaredetect.NyARSquareStack;\r
 import jp.nyatla.nyartoolkit.core.transmat.INyARTransMat;\r