/**
         * この関数は、インスタンスを初期化します。
         * 継承先のクラスから呼び出してください。
         * @param i_param
         * カメラパラメータオブジェクト。このサイズは、{@link #detectMarker}に入力する画像と同じサイズである必要があります。
         * @param i_encoder
         * IDマーカの値エンコーダを指定します。
         * @param i_marker_width
         * マーカの物理縦横サイズをmm単位で指定します。
         * @
         */
        protected void initInstance(NyARParam i_param, INyIdMarkerDataEncoder i_encoder, double i_marker_width)
        {
            //初期化済?
            Debug.Assert(this._initialized == false);

            NyARIntSize scr_size = i_param.getScreenSize();

            // 解析オブジェクトを作る
            this._square_detect = new RleDetector(
                i_param,
                i_encoder,
                new NyIdMarkerPickup());
            this._transmat = new NyARTransMat(i_param);

            // 2値画像バッファを作る
            this._gs_raster = new NyARGrayscaleRaster(scr_size.w, scr_size.h);
            this._histmaker = (INyARHistogramFromRaster)this._gs_raster.createInterface(typeof(INyARHistogramFromRaster));
            //ワーク用のデータオブジェクトを2個作る
            this._data_current     = i_encoder.createDataInstance();
            this._threshold_detect = new NyARHistogramAnalyzer_SlidePTile(15);
            this._initialized      = true;
            this._is_active        = false;
            this._offset           = new NyARRectOffset();
            this._offset.setSquare(i_marker_width);
            return;
        }
 public DetectSquareCB(NyARParam i_param, INyIdMarkerDataEncoder i_encoder)
 {
     this._coordline    = new Coord2Linear(i_param.getScreenSize(), i_param.getDistortionFactor());
     this._data_temp    = i_encoder.createDataInstance();
     this._current_data = i_encoder.createDataInstance();
     this._encoder      = i_encoder;
     return;
 }
 public DetectSquareCB(NyARParam i_param, INyIdMarkerDataEncoder i_encoder)
 {
     this._coordline = new Coord2Linear(i_param.getScreenSize(), i_param.getDistortionFactor());
     this._data_temp = i_encoder.createDataInstance();
     this._current_data = i_encoder.createDataInstance();
     this._encoder = i_encoder;
     return;
 }
 public RleDetector(NyARParam i_param, INyIdMarkerDataEncoder i_encoder, NyIdMarkerPickup i_id_pickup) : base(i_param.getScreenSize())
 {
     this._coordline    = new NyARCoord2Linear(i_param.getScreenSize(), i_param.getDistortionFactor());
     this._data_temp    = i_encoder.createDataInstance();
     this._current_data = i_encoder.createDataInstance();
     this._encoder      = i_encoder;
     this._id_pickup    = i_id_pickup;
     return;
 }
 public RleDetector(NyARParam i_param, INyIdMarkerDataEncoder i_encoder, NyIdMarkerPickup i_id_pickup): base(i_param.getScreenSize())
 {
    
     this._coordline = new NyARCoord2Linear(i_param.getScreenSize(), i_param.getDistortionFactor());
     this._data_temp = i_encoder.createDataInstance();
     this._current_data = i_encoder.createDataInstance();
     this._encoder = i_encoder;
     this._id_pickup = i_id_pickup;
     return;
 }
        protected void initInstance(NyARParam i_param, INyIdMarkerDataEncoder i_encoder, double i_marker_width, int i_raster_format)
        {
            //初期化済?
            Debug.Assert(this._initialized == false);

            NyARIntSize scr_size = i_param.getScreenSize();

            // 解析オブジェクトを作る
            this._square_detect = new RleDetector(i_param, i_encoder);
            this._transmat      = new NyARTransMat(i_param);

            // 2値画像バッファを作る
            this._bin_raster = new NyARBinRaster(scr_size.w, scr_size.h);
            //ワーク用のデータオブジェクトを2個作る
            this._data_current     = i_encoder.createDataInstance();
            this._tobin_filter     = new NyARRasterFilter_ARToolkitThreshold(110, i_raster_format);
            this._threshold_detect = new NyARRasterThresholdAnalyzer_SlidePTile(15, i_raster_format, 4);
            this._initialized      = true;
            this._is_active        = false;
            this._offset           = new NyARRectOffset();
            this._offset.setSquare(i_marker_width);
            return;
        }
        /**
         * この関数は、インスタンスを初期化します。
         * 継承先のクラスから呼び出してください。
         * @param i_param
         * カメラパラメータオブジェクト。このサイズは、{@link #detectMarker}に入力する画像と同じサイズである必要があります。
         * @param i_encoder
         * IDマーカの値エンコーダを指定します。
         * @param i_marker_width
         * マーカの物理縦横サイズをmm単位で指定します。
         * @
         */
        protected void initInstance(NyARParam i_param, INyIdMarkerDataEncoder i_encoder, double i_marker_width)
        {
            //初期化済?
            Debug.Assert(this._initialized == false);

            NyARIntSize scr_size = i_param.getScreenSize();
            // 解析オブジェクトを作る
            this._square_detect = new RleDetector(
                i_param,
                i_encoder,
                new NyIdMarkerPickup());
            this._transmat = new NyARTransMat(i_param);

            // 2値画像バッファを作る
            this._gs_raster = new NyARGrayscaleRaster(scr_size.w, scr_size.h);
            this._histmaker = (INyARHistogramFromRaster)this._gs_raster.createInterface(typeof(INyARHistogramFromRaster));
            //ワーク用のデータオブジェクトを2個作る
            this._data_current = i_encoder.createDataInstance();
            this._threshold_detect = new NyARHistogramAnalyzer_SlidePTile(15);
            this._initialized = true;
            this._is_active = false;
            this._offset = new NyARRectOffset();
            this._offset.setSquare(i_marker_width);
            return;

        }
        protected void initInstance(NyARParam i_param, INyIdMarkerDataEncoder i_encoder, double i_marker_width, int i_raster_format)
        {
            //初期化済?
            Debug.Assert(this._initialized == false);

            NyARIntSize scr_size = i_param.getScreenSize();
            // 解析オブジェクトを作る
            this._square_detect = new NyARSquareContourDetector_Rle(scr_size);
            this._transmat = new NyARTransMat(i_param);
            this._callback = new DetectSquareCB(i_param, i_encoder);

            // 2値画像バッファを作る
            this._bin_raster = new NyARBinRaster(scr_size.w, scr_size.h);
            //ワーク用のデータオブジェクトを2個作る
            this._data_current = i_encoder.createDataInstance();
            this._tobin_filter = new NyARRasterFilter_ARToolkitThreshold(110, i_raster_format);
            this._threshold_detect = new NyARRasterThresholdAnalyzer_SlidePTile(15, i_raster_format, 4);
            this._initialized = true;
            this._is_active = false;
            this._offset = new NyARRectOffset();
            this._offset.setSquare(i_marker_width);
            return;

        }