OSDN Git Service

[upadate]NyARToolKit
authornyatla <nyatla@7cac0a50-4618-4814-88d0-24b83990f816>
Sat, 24 Apr 2010 02:41:50 +0000 (02:41 +0000)
committernyatla <nyatla@7cac0a50-4618-4814-88d0-24b83990f816>
Sat, 24 Apr 2010 02:41:50 +0000 (02:41 +0000)
+NyARRasterの引数修正に関する修正
+NyARDoubleMatrixの計算不具合修正
+その他、雑多な修正

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

20 files changed:
trunk/src/jp/nyatla/nyartoolkit/core/labeling/artoolkit/NyARLabelingImage.java
trunk/src/jp/nyatla/nyartoolkit/core/raster/NyARBinRaster.java
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/NyARRaster_BasicClass.java
trunk/src/jp/nyatla/nyartoolkit/core/raster/rgb/NyARRgbRaster.java
trunk/src/jp/nyatla/nyartoolkit/core/raster/rgb/NyARRgbRaster_BasicClass.java
trunk/src/jp/nyatla/nyartoolkit/core/raster/rgb/NyARRgbRaster_Blank.java
trunk/src/jp/nyatla/nyartoolkit/core/rasterreader/NyARRgbPixelReader_BYTE1D_R8G8B8_24.java
trunk/src/jp/nyatla/nyartoolkit/core/squaredetect/NyARCoord2Linear.java
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/matrix/NyARDoubleMatrix22.java
trunk/src/jp/nyatla/nyartoolkit/core/utils/NyARPerspectiveParamGenerator.java
trunk/src/jp/nyatla/nyartoolkit/core/utils/NyARPerspectiveParamGenerator_O1.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

index db69fc0..79c7b81 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),NyARBufferType.INT1D);\r
+               super(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 ba45b09..8166029 100644 (file)
@@ -51,21 +51,21 @@ public class NyARBinRaster extends NyARRaster_BasicClass
         */\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
+               super(i_width,i_height,i_raster_type);\r
                if(!initInstance(this._size,i_raster_type,i_is_alloc)){\r
                        throw new NyARException();\r
                }\r
        }\r
        public NyARBinRaster(int i_width, int i_height,boolean i_is_alloc) throws NyARException\r
        {\r
-               super(new NyARIntSize(i_width,i_height),NyARBufferType.INT1D_BIN_8);\r
+               super(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),NyARBufferType.INT1D_BIN_8);\r
+               super(i_width,i_height,NyARBufferType.INT1D_BIN_8);\r
                if(!initInstance(this._size,NyARBufferType.INT1D_BIN_8,true)){\r
                        throw new NyARException();\r
                }\r
index bd36e72..9e4be67 100644 (file)
@@ -44,14 +44,14 @@ public 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),NyARBufferType.INT1D_GRAY_8);\r
+               super(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),NyARBufferType.INT1D_GRAY_8);\r
+               super(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
@@ -66,7 +66,7 @@ public class NyARGrayscaleRaster extends NyARRaster_BasicClass
         */\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
+               super(i_width,i_height,i_raster_type);\r
                if(!initInstance(this._size,i_raster_type,i_is_alloc)){\r
                        throw new NyARException();\r
                }\r
index 0d0aaf8..90e06f6 100644 (file)
@@ -41,7 +41,7 @@ public final class NyARHsvRaster extends NyARRaster_BasicClass
        public NyARHsvRaster(int i_width, int i_height)\r
        {\r
                //このクラスは外部参照バッファ/形式多重化が使えない簡易実装です。\r
-               super(new NyARIntSize(i_width,i_height),NyARBufferType.INT1D_X7H9S8V8_32);\r
+               super(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 08425b7..e4d55fd 100644 (file)
@@ -55,7 +55,7 @@ public class NyARRaster extends NyARRaster_BasicClass
         */\r
        public NyARRaster(int i_width, int i_height,int i_buffer_type,boolean i_is_alloc) throws NyARException\r
        {\r
-               super(new NyARIntSize(i_width,i_height),i_buffer_type);\r
+               super(i_width,i_height,i_buffer_type);\r
                if(!initInstance(this._size,i_buffer_type,i_is_alloc)){\r
                        throw new NyARException();\r
                }\r
@@ -64,7 +64,7 @@ public class NyARRaster extends NyARRaster_BasicClass
 \r
        public NyARRaster(int i_width, int i_height,int i_buffer_type) throws NyARException\r
        {\r
-               super(new NyARIntSize(i_width,i_height),i_buffer_type);\r
+               super(i_width,i_height,i_buffer_type);\r
                if(!initInstance(this._size,i_buffer_type,true)){\r
                        throw new NyARException();\r
                }\r
index 56397d4..6e2f5fe 100644 (file)
@@ -36,9 +36,9 @@ public abstract class NyARRaster_BasicClass implements INyARRaster
 {\r
        protected NyARIntSize _size;\r
        private int _buffer_type;\r
-       protected NyARRaster_BasicClass(final NyARIntSize i_size,int i_buffer_type)\r
+       protected NyARRaster_BasicClass(int i_width,int i_height,int i_buffer_type)\r
        {\r
-               this._size= i_size;\r
+               this._size= new NyARIntSize(i_width,i_height);\r
                this._buffer_type=i_buffer_type;\r
        }\r
 \r
index 8290317..49f5c66 100644 (file)
@@ -24,7 +24,7 @@ public class NyARRgbRaster extends NyARRgbRaster_BasicClass
         */\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
+               super(i_width,i_height,i_raster_type);\r
                if(!initInstance(this._size,i_raster_type,i_is_alloc)){\r
                        throw new NyARException();\r
                }\r
@@ -39,7 +39,7 @@ public class NyARRgbRaster extends NyARRgbRaster_BasicClass
         */\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
+               super(i_width,i_height,i_raster_type);\r
                if(!initInstance(this._size,i_raster_type,true)){\r
                        throw new NyARException();\r
                }\r
index cc898e0..f2c16e6 100644 (file)
@@ -41,10 +41,9 @@ public abstract class NyARRgbRaster_BasicClass implements INyARRgbRaster
 {\r
        final protected NyARIntSize _size;\r
        private int _buffer_type;\r
-       \r
-       protected NyARRgbRaster_BasicClass(final NyARIntSize i_size,int i_buffer_type)\r
+       protected NyARRgbRaster_BasicClass(int i_width,int i_height,int i_buffer_type)\r
        {\r
-               this._size= i_size;\r
+               this._size= new NyARIntSize(i_width,i_height);\r
                this._buffer_type=i_buffer_type;\r
        }\r
        final public int getWidth()\r
index c487606..4762685 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),NyARBufferType.NULL_ALLZERO);\r
+               super(i_width,i_height,NyARBufferType.NULL_ALLZERO);\r
                this._reader = new PixelReader();\r
                return;\r
        }\r
index c64ec49..a75ea53 100644 (file)
@@ -74,7 +74,11 @@ public class NyARRgbPixelReader_BYTE1D_R8G8B8_24 implements INyARRgbPixelReader
        }\r
        public void setPixel(int i_x, int i_y, int[] i_rgb) throws NyARException\r
        {\r
-               NyARException.notImplement();           \r
+               final byte[] ref_buf = this._ref_buf;\r
+               final int idx=(i_y*this._size.w+i_x)*3;\r
+               ref_buf[idx + 0] = (byte)i_rgb[0];// R\r
+               ref_buf[idx + 1] = (byte)i_rgb[1];// G\r
+               ref_buf[idx + 2] = (byte)i_rgb[2];// B\r
        }\r
        public void setPixels(int[] i_x, int[] i_y, int i_num, int[] i_intrgb) throws NyARException\r
        {\r
index 4eb4808..725f20f 100644 (file)
@@ -98,10 +98,10 @@ public class NyARCoord2Linear
                        ed = (int) (i_ed - w1);\r
                }else{\r
                        //頂点[i]から頂点[i+1]までの輪郭が、2区間に分かれているとき\r
-                       w1 = (double) (i_ed+i_cood_num-i_st+1)%i_cood_num * 0.05 + 0.5;\r
+                       w1 = (double)((i_ed+i_cood_num-i_st+1)%i_cood_num) * 0.05 + 0.5;\r
                        //探索区間の決定\r
-                       st = (int) (i_st+w1)%i_cood_num;\r
-                       ed = (int) (i_ed+i_cood_num-w1)%i_cood_num;\r
+                       st = ((int) (i_st+w1))%i_cood_num;\r
+                       ed = ((int) (i_ed+i_cood_num-w1))%i_cood_num;\r
                }\r
                //探索区間数を確認\r
                if(st<=ed){\r
index 91a42a2..18aac9e 100644 (file)
@@ -36,7 +36,6 @@ import jp.nyatla.nyartoolkit.core.labeling.artoolkit.NyARLabelingImage;
 import jp.nyatla.nyartoolkit.core.labeling.artoolkit.NyARLabelingLabel;\r
 import jp.nyatla.nyartoolkit.core.labeling.artoolkit.NyARLabelingLabelStack;\r
 import jp.nyatla.nyartoolkit.core.labeling.artoolkit.NyARLabeling_ARToolKit;\r
-import jp.nyatla.nyartoolkit.core.param.NyARCameraDistortionFactor;\r
 import jp.nyatla.nyartoolkit.core.raster.NyARBinRaster;\r
 import jp.nyatla.nyartoolkit.core.types.NyARIntSize;\r
 \r
@@ -66,7 +65,7 @@ public class NyARSquareContourDetector_ARToolKit extends NyARSquareContourDetect
         * \r
         * @param i_param\r
         */\r
-       public NyARSquareContourDetector_ARToolKit(NyARCameraDistortionFactor i_dist_factor_ref,NyARIntSize i_size) throws NyARException\r
+       public NyARSquareContourDetector_ARToolKit(NyARIntSize i_size) throws NyARException\r
        {\r
                this._width = i_size.w;\r
                this._height = i_size.h;\r
index c4c29b8..d9a10d1 100644 (file)
@@ -33,10 +33,8 @@ package jp.nyatla.nyartoolkit.core.squaredetect;
 import jp.nyatla.nyartoolkit.NyARException;\r
 import jp.nyatla.nyartoolkit.core.labeling.NyARLabelOverlapChecker;\r
 import jp.nyatla.nyartoolkit.core.labeling.rlelabeling.*;\r
-import jp.nyatla.nyartoolkit.core.param.NyARCameraDistortionFactor;\r
 import jp.nyatla.nyartoolkit.core.raster.NyARBinRaster;\r
 import jp.nyatla.nyartoolkit.core.types.*;\r
-import java.util.*;\r
 \r
 \r
 public class NyARSquareContourDetector_Rle extends NyARSquareContourDetector\r
@@ -61,7 +59,7 @@ public class NyARSquareContourDetector_Rle extends NyARSquareContourDetector
         * \r
         * @param i_param\r
         */\r
-       public NyARSquareContourDetector_Rle(NyARCameraDistortionFactor i_dist_factor_ref,NyARIntSize i_size) throws NyARException\r
+       public NyARSquareContourDetector_Rle(NyARIntSize i_size) throws NyARException\r
        {\r
                this._width = i_size.w;\r
                this._height = i_size.h;\r
index 3c2c313..b44f638 100644 (file)
@@ -66,8 +66,8 @@ public class NyARDoubleMatrix22 implements INyARDoubleMatrix
                det=1/det;\r
                this.m00=a22*det;\r
                this.m01=-a12*det;\r
-               this.m10=a21*det;\r
-               this.m11=-a11*det;\r
+               this.m10=-a21*det;\r
+               this.m11=a11*det;\r
                return true;\r
        }       \r
 }\r
index e132a16..46e8b57 100644 (file)
@@ -25,7 +25,8 @@
 package jp.nyatla.nyartoolkit.core.utils;\r
 \r
 import jp.nyatla.nyartoolkit.NyARException;\r
-import jp.nyatla.nyartoolkit.core.types.NyARIntPoint2d;\r
+import jp.nyatla.nyartoolkit.core.types.*;\r
+import jp.nyatla.nyartoolkit.core.types.matrix.*;\r
 \r
 /**\r
  * 遠近法を用いたPerspectiveパラメータを計算するクラスです。\r
@@ -45,44 +46,68 @@ public class NyARPerspectiveParamGenerator
                this._local_y=i_local_y;\r
                return;\r
        }\r
+\r
+       \r
        public boolean getParam(final NyARIntPoint2d[] i_vertex,double[] o_param)throws NyARException\r
        {\r
-               double[][] la1,la2;\r
-               double[] ra1,ra2;\r
                double ltx=this._local_x;\r
                double lty=this._local_y;\r
                double rbx=ltx+this._width;\r
                double rby=lty+this._height;\r
-               la1=new double[4][5];\r
-               la2=new double[4][5];\r
-               ra1=new double[4];\r
-               ra2=new double[4];\r
-               //A,B,C,(GH)の方程式\r
-               la1[0][0]=ltx;  la1[0][1]=lty;  la1[0][2]=1;    la1[0][3]=-ltx*i_vertex[0].x;   la1[0][4]=-lty*i_vertex[0].x;\r
-               la1[1][0]=rbx;  la1[1][1]=lty;  la1[1][2]=1;    la1[1][3]=-rbx*i_vertex[1].x;   la1[1][4]=-lty*i_vertex[1].x;\r
-               la1[2][0]=rbx;  la1[2][1]=rby;  la1[2][2]=1;    la1[2][3]=-rbx*i_vertex[2].x;   la1[2][4]=-rby*i_vertex[2].x;\r
-               la1[3][0]=ltx;  la1[3][1]=rby;  la1[3][2]=1;    la1[3][3]=-ltx*i_vertex[3].x;   la1[3][4]=-rby*i_vertex[3].x;\r
-               ra1[0]=i_vertex[0].x;ra1[1]=i_vertex[1].x;ra1[2]=i_vertex[2].x;ra1[3]=i_vertex[3].x;\r
-               NyARSystemOfLinearEquationsProcessor.doGaussianElimination(la1,ra1,5,4);\r
+               double x1,x2,x3,x4;\r
+               double y1,y2,y3,y4;\r
+               x1=i_vertex[0].x;\r
+               x2=i_vertex[1].x;\r
+               x3=i_vertex[2].x;\r
+               x4=i_vertex[3].x;\r
+               y1=i_vertex[0].y;\r
+               y2=i_vertex[1].y;\r
+               y3=i_vertex[2].y;\r
+               y4=i_vertex[3].y;\r
+               \r
+               \r
+               NyARDoubleMatrix44 mat_x=new NyARDoubleMatrix44();\r
+               mat_x.m00=ltx;  mat_x.m01=lty;  mat_x.m02=-ltx*x1;      mat_x.m03=-lty*x1;\r
+               mat_x.m10=rbx;  mat_x.m11=lty;  mat_x.m12=-rbx*x2;      mat_x.m13=-lty*x2;\r
+               mat_x.m20=rbx;  mat_x.m21=rby;  mat_x.m22=-rbx*x3;      mat_x.m23=-rby*x3;\r
+               mat_x.m30=ltx;  mat_x.m31=rby;  mat_x.m32=-ltx*x4;      mat_x.m33=-rby*x4;\r
+               mat_x.inverse(mat_x);\r
+               NyARDoubleMatrix44 mat_y=new NyARDoubleMatrix44();\r
+               mat_y.m00=ltx;  mat_y.m01=lty;  mat_y.m02=-ltx*y1;      mat_y.m03=-lty*y1;\r
+               mat_y.m10=rbx;  mat_y.m11=lty;  mat_y.m12=-rbx*y2;      mat_y.m13=-lty*y2;\r
+               mat_y.m20=rbx;  mat_y.m21=rby;  mat_y.m22=-rbx*y3;      mat_y.m23=-rby*y3;\r
+               mat_y.m30=ltx;  mat_y.m31=rby;  mat_y.m32=-ltx*y4;      mat_y.m33=-rby*y4;\r
+               mat_y.inverse(mat_y);\r
+               double a=mat_x.m20*x1+mat_x.m21*x2+mat_x.m22*x3+mat_x.m23*x4;\r
+               double b=mat_x.m20+mat_x.m21+mat_x.m22+mat_x.m23;\r
+               double d=mat_x.m30*x1+mat_x.m31*x2+mat_x.m32*x3+mat_x.m33*x4;\r
+               double f=mat_x.m30+mat_x.m31+mat_x.m32+mat_x.m33;\r
+               \r
+               double g=mat_y.m20*y1+mat_y.m21*y2+mat_y.m22*y3+mat_y.m23*y4;\r
+               double h=mat_y.m20+mat_y.m21+mat_y.m22+mat_y.m23;\r
+               double i=mat_y.m30*y1+mat_y.m31*y2+mat_y.m32*y3+mat_y.m33*y4;\r
+               double j=mat_y.m30+mat_y.m31+mat_y.m32+mat_y.m33;\r
+               \r
+               NyARDoubleMatrix22 tm=new NyARDoubleMatrix22();\r
+               tm.m00=b;\r
+               tm.m01=-h;\r
+               tm.m10=f;\r
+               tm.m11=-j;\r
+               tm.inverse(tm);\r
 \r
-               //D,E,F,(GH)の方程式\r
-               la2[0][0]=ltx;  la2[0][1]=lty;  la2[0][2]=1;    la2[0][3]=-ltx*i_vertex[0].y;   la2[0][4]=-lty*i_vertex[0].y;\r
-               la2[1][0]=rbx;  la2[1][1]=lty;  la2[1][2]=1;    la2[1][3]=-rbx*i_vertex[1].y;   la2[1][4]=-lty*i_vertex[1].y;\r
-               la2[2][0]=rbx;  la2[2][1]=rby;  la2[2][2]=1;    la2[2][3]=-rbx*i_vertex[2].y;   la2[2][4]=-rby*i_vertex[2].y;\r
-               la2[3][0]=ltx;  la2[3][1]=rby;  la2[3][2]=1;    la2[3][3]=-ltx*i_vertex[3].y;   la2[3][4]=-rby*i_vertex[3].y;\r
-               ra2[0]=i_vertex[0].y;ra2[1]=i_vertex[1].y;ra2[2]=i_vertex[2].y;ra2[3]=i_vertex[3].y;\r
-               NyARSystemOfLinearEquationsProcessor.doGaussianElimination(la2,ra2,5,4);\r
-               //GHを計算\r
+               \r
                double A,B,C,D,E,F,G,H;\r
-               H=(ra2[3]-ra1[3])/(la2[3][4]-la1[3][4]);\r
-               G=ra2[3]-la2[3][4]*H;\r
-               //残りを計算\r
-               F=ra2[2]-H*la2[2][4]-G*la2[2][3];\r
-               E=ra2[1]-H*la2[1][4]-G*la2[1][3]-F*la2[1][2];\r
-               D=ra2[0]-H*la2[0][4]-G*la2[0][3]-F*la2[0][2]-E*la2[0][1];\r
-               C=ra1[2]-H*la1[2][4]-G*la1[2][3];\r
-               B=ra1[1]-H*la1[1][4]-G*la1[1][3]-C*la1[1][2];\r
-               A=ra1[0]-H*la1[0][4]-G*la1[0][3]-C*la1[0][2]-B*la1[0][1];\r
+\r
+               C=tm.m00*(a-g)+tm.m01*(d-i);    //C\r
+               F=tm.m10*(a-g)+tm.m11*(d-i);    //F\r
+               G=a-C*b;\r
+               H=d-C*f;\r
+               A=(mat_x.m00*x1+mat_x.m01*x2+mat_x.m02*x3+mat_x.m03*x4)-C*(mat_x.m00+mat_x.m01+mat_x.m02+mat_x.m03);\r
+               B=(mat_x.m10*x1+mat_x.m11*x2+mat_x.m12*x3+mat_x.m13*x4)-C*(mat_x.m10+mat_x.m11+mat_x.m12+mat_x.m13);\r
+               D=(mat_y.m00*y1+mat_y.m01*y2+mat_y.m02*y3+mat_y.m03*y4)-F*(mat_y.m00+mat_y.m01+mat_y.m02+mat_y.m03);\r
+               E=(mat_y.m10*y1+mat_y.m11*y2+mat_y.m12*y3+mat_y.m13*y4)-F*(mat_y.m10+mat_y.m11+mat_y.m12+mat_y.m13);\r
+\r
+\r
                o_param[0]=A;\r
                o_param[1]=B;\r
                o_param[2]=C;\r
@@ -91,6 +116,9 @@ public class NyARPerspectiveParamGenerator
                o_param[5]=F;\r
                o_param[6]=G;\r
                o_param[7]=H;\r
+               \r
+\r
                return true;\r
+\r
        }\r
 }\r
index 326a0ee..3922868 100644 (file)
@@ -36,7 +36,7 @@ public class NyARPerspectiveParamGenerator_O1 extends NyARPerspectiveParamGenera
        {\r
                super(i_local_x,i_local_y,i_width,i_height);\r
                return;\r
-       }\r
+       }/*\r
        final public boolean getParam(final NyARIntPoint2d[] i_vertex,double[] o_param)throws NyARException\r
        {\r
                double G,H;\r
@@ -87,5 +87,5 @@ public class NyARPerspectiveParamGenerator_O1 extends NyARPerspectiveParamGenera
                o_param[1]=w1;\r
                o_param[0]=w2;\r
                return true;\r
-       }\r
+       }*/\r
 }\r
index e2a1db2..b5bee63 100644 (file)
@@ -232,7 +232,7 @@ public class NyARDetectMarker
                        i_ref_code,i_number_of_code,i_ref_param);\r
                this._transmat = new NyARTransMat(i_ref_param);\r
                //NyARToolkitプロファイル\r
-               this._square_detect =new NyARSquareContourDetector_Rle(i_ref_param.getDistortionFactor(),i_ref_param.getScreenSize());\r
+               this._square_detect =new NyARSquareContourDetector_Rle(i_ref_param.getScreenSize());\r
                this._tobin_filter=new NyARRasterFilter_ARToolkitThreshold(100,i_input_raster_type);\r
 \r
                //実サイズ保存\r
index 59ad941..1fef96c 100644 (file)
@@ -100,17 +100,17 @@ public class NyARSingleDetectMarker extends NyARCustomSingleDetectMarker
                switch(i_profile_id){\r
                case PF_ARTOOLKIT_COMPATIBLE:\r
                        patt_inst=new NyARColorPatt_O3(i_ref_code.getWidth(), i_ref_code.getHeight());\r
-                       sqdetect_inst=new NyARSquareContourDetector_ARToolKit(i_ref_param.getDistortionFactor(),i_ref_param.getScreenSize());\r
+                       sqdetect_inst=new NyARSquareContourDetector_ARToolKit(i_ref_param.getScreenSize());\r
                        transmat_inst=new NyARTransMat_ARToolKit(i_ref_param);\r
                        break;\r
                case PF_NYARTOOLKIT_ARTOOLKIT_FITTING:\r
                        patt_inst=new NyARColorPatt_Perspective_O2(i_ref_code.getWidth(), i_ref_code.getHeight(),4,25);\r
-                       sqdetect_inst=new NyARSquareContourDetector_Rle(i_ref_param.getDistortionFactor(),i_ref_param.getScreenSize());\r
+                       sqdetect_inst=new NyARSquareContourDetector_Rle(i_ref_param.getScreenSize());\r
                        transmat_inst=new NyARTransMat_ARToolKit(i_ref_param);\r
                        break;\r
                case PF_NYARTOOLKIT://default\r
                        patt_inst=new NyARColorPatt_Perspective_O2(i_ref_code.getWidth(), i_ref_code.getHeight(),4,25);\r
-                       sqdetect_inst=new NyARSquareContourDetector_Rle(i_ref_param.getDistortionFactor(),i_ref_param.getScreenSize());\r
+                       sqdetect_inst=new NyARSquareContourDetector_Rle(i_ref_param.getScreenSize());\r
                        transmat_inst=new NyARTransMat(i_ref_param);\r
                        break;\r
                default:\r
index 7341d7c..6fb87e6 100644 (file)
@@ -229,7 +229,7 @@ public abstract class SingleARMarkerProcesser
                \r
                NyARIntSize scr_size = i_param.getScreenSize();\r
                // 解析オブジェクトを作る\r
-               this._square_detect = new NyARSquareContourDetector_Rle(i_param.getDistortionFactor(), scr_size);\r
+               this._square_detect = new NyARSquareContourDetector_Rle(scr_size);\r
                this._transmat = new NyARTransMat(i_param);\r
                this._tobin_filter=new NyARRasterFilter_ARToolkitThreshold(110,i_raster_type);\r
 \r
@@ -290,7 +290,7 @@ public abstract class SingleARMarkerProcesser
                this._square_detect.detectMarkerCB(this._bin_raster,this._detectmarker_cb);\r
                \r
                // 認識状態を更新\r
-               final boolean is_id_found=updateStatus(this._detectmarker_cb.square,this._detectmarker_cb.code_index);\r
+               final boolean is_id_found=this.updateStatus(this._detectmarker_cb.square,this._detectmarker_cb.code_index);\r
                //閾値フィードバック(detectExistMarkerにもあるよ)\r
                if(!is_id_found){\r
                        //マーカがなければ、探索+DualPTailで基準輝度検索\r
index c6ab0f4..e06399b 100644 (file)
@@ -170,14 +170,14 @@ public abstract class SingleNyIdMarkerProcesser
                return;\r
        }\r
        private boolean _initialized=false;\r
-       protected void initInstance(NyARParam i_param,INyIdMarkerDataEncoder i_encoder,int i_marker_width,int i_raster_format) throws NyARException\r
+       protected void initInstance(NyARParam i_param,INyIdMarkerDataEncoder i_encoder,double i_marker_width,int i_raster_format) throws NyARException\r
        {\r
                //初期化済?\r
                assert(this._initialized==false);\r
                \r
                NyARIntSize scr_size = i_param.getScreenSize();\r
                // 解析オブジェクトを作る\r
-               this._square_detect = new NyARSquareContourDetector_Rle(i_param.getDistortionFactor(), scr_size);\r
+               this._square_detect = new NyARSquareContourDetector_Rle(scr_size);\r
                this._transmat = new NyARTransMat(i_param);\r
                this._callback=new DetectSquareCB(i_param,i_encoder);\r
 \r