OSDN Git Service

[backup]NyARToolkit
[nyartoolkit-and/nyartoolkit-and.git] / trunk / src / jp / nyatla / nyartoolkit / detector / NyARSingleDetectMarker.java
index d9e82e7..59ad941 100644 (file)
@@ -67,13 +67,13 @@ public class NyARSingleDetectMarker extends NyARCustomSingleDetectMarker
        public NyARSingleDetectMarker(NyARParam i_param, NyARCode i_code, double i_marker_width,int i_input_raster_type,int i_profile_id) throws NyARException\r
        {\r
                super();\r
-               initInstance(i_param,i_code,i_marker_width,i_input_raster_type,i_profile_id);\r
+               initialize(i_param,i_code,i_marker_width,i_input_raster_type,i_profile_id);\r
                return;\r
        }\r
        public NyARSingleDetectMarker(NyARParam i_param, NyARCode i_code, double i_marker_width,int i_input_raster_type) throws NyARException\r
        {\r
                super();\r
-               initInstance(i_param,i_code,i_marker_width,i_input_raster_type,PF_NYARTOOLKIT);\r
+               initialize(i_param,i_code,i_marker_width,i_input_raster_type,PF_NYARTOOLKIT);\r
                return;\r
        }\r
        /**\r
@@ -85,7 +85,7 @@ public class NyARSingleDetectMarker extends NyARCustomSingleDetectMarker
         * @param i_profile_id\r
         * @throws NyARException\r
         */\r
-       protected void initInstance(\r
+       private void initialize(\r
                NyARParam       i_ref_param,\r
                NyARCode        i_ref_code,\r
                double          i_marker_width,\r
@@ -94,23 +94,23 @@ public class NyARSingleDetectMarker extends NyARCustomSingleDetectMarker
        {\r
                final NyARRasterFilter_ARToolkitThreshold th=new NyARRasterFilter_ARToolkitThreshold(100,i_input_raster_type);\r
                INyARColorPatt patt_inst;\r
-               INyARSquareDetector sqdetect_inst;\r
+               NyARSquareContourDetector sqdetect_inst;\r
                INyARTransMat transmat_inst;\r
 \r
                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 NyARSquareDetector_ARToolKit(i_ref_param.getDistortionFactor(),i_ref_param.getScreenSize());\r
+                       sqdetect_inst=new NyARSquareContourDetector_ARToolKit(i_ref_param.getDistortionFactor(),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 NyARSquareDetector_Rle(i_ref_param.getDistortionFactor(),i_ref_param.getScreenSize());\r
+                       sqdetect_inst=new NyARSquareContourDetector_Rle(i_ref_param.getDistortionFactor(),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 NyARSquareDetector_Rle(i_ref_param.getDistortionFactor(),i_ref_param.getScreenSize());\r
+                       sqdetect_inst=new NyARSquareContourDetector_Rle(i_ref_param.getDistortionFactor(),i_ref_param.getScreenSize());\r
                        transmat_inst=new NyARTransMat(i_ref_param);\r
                        break;\r
                default:\r