protected void initInstance(
            INyARColorPatt i_patt_inst,
            NyARSquareContourDetector i_sqdetect_inst,
            INyARTransMat i_transmat_inst,
            INyARRasterFilter_Rgb2Bin i_filter,
            NyARParam i_ref_param,
            NyARCode i_ref_code,
            double i_marker_width)
        {
            NyARIntSize scr_size = i_ref_param.getScreenSize();

            // 解析オブジェクトを作る
            this._square_detect = i_sqdetect_inst;
            this._transmat      = i_transmat_inst;
            this._tobin_filter  = i_filter;
            //2値画像バッファを作る
            this._bin_raster = new NyARBinRaster(scr_size.w, scr_size.h);
            //パターンの一致検索処理用
            this._inst_patt      = i_patt_inst;
            this._deviation_data = new NyARMatchPattDeviationColorData(i_ref_code.getWidth(), i_ref_code.getHeight());
            this._coordline      = new NyARCoord2Linear(i_ref_param.getScreenSize(), i_ref_param.getDistortionFactor());
            this._match_patt     = new NyARMatchPatt_Color_WITHOUT_PCA(i_ref_code);
            //オフセットを作成
            this._offset = new NyARRectOffset();
            this._offset.setSquare(i_marker_width);
            return;
        }
 public DetectSquareCB(INyARColorPatt i_inst_patt, NyARCode i_ref_code, NyARParam i_param)
 {
     this._inst_patt      = i_inst_patt;
     this._deviation_data = new NyARMatchPattDeviationColorData(i_ref_code.getWidth(), i_ref_code.getHeight());
     this._coordline      = new Coord2Linear(i_param.getScreenSize(), i_param.getDistortionFactor());
     this._match_patt     = new NyARMatchPatt_Color_WITHOUT_PCA(i_ref_code);
     return;
 }
Esempio n. 3
0
 /** */
 public Item(NyARCode i_patt, int i_patt_edge_percentage, double i_patt_size)
 {
     //base();
     this.matchpatt            = new NyARMatchPatt_Color_WITHOUT_PCA(i_patt);
     this.patt_edge_percentage = i_patt_edge_percentage;
     this.marker_offset.setSquare(i_patt_size);
     this.patt_w = i_patt.getWidth();
     this.patt_h = i_patt.getHeight();
     return;
 }
Esempio n. 4
0
 /**
  * コンストラクタです。
  * @param i_max
  * 登録するアイテムの最大数です。
  * @param i_resolution_x
  * 登録するパターンの解像度です。
  * ARToolKit互換の標準値は16です。
  * @param i_resolution_y
  * 登録するパターンの解像度です。
  * ARToolKit互換の標準値は16です。
  * @param i_edge_x
  * エッジ部分の割合です。ARToolKit互換の標準値は25です。
  * @param i_edge_y
  * エッジ部分の割合です。ARToolKit互換の標準値は25です。
  * @param i_sample_per_pix
  * パターン取得の1ピクセルあたりのサンプリング数です。1なら1Pixel=1,2なら1Pixel=4のサンプリングをします。
  * ARToolKit互換の標準値は4です。
  * 高解像度(64以上)のパターンを用いるときは、サンプリング数を低く設定してください。
  * @throws NyARException
  */
 public ARTKMarkerTable(int i_max, int i_resolution_x, int i_resolution_y, int i_edge_x, int i_edge_y, int i_sample_per_pix)
 {
     this._resolution_width  = i_resolution_x;
     this._resolution_height = i_resolution_y;
     this._edge_x            = i_edge_x;
     this._edge_y            = i_edge_y;
     this._sample_per_pix    = i_sample_per_pix;
     this._tmp_raster        = new NyARRgbRaster(i_resolution_x, i_resolution_y, NyARBufferType.INT1D_X8R8G8B8_32);
     this._table             = new MarkerTable(i_max);
     this._deviation_data    = new NyARMatchPattDeviationColorData(i_resolution_x, i_resolution_y);
     this._match_patt        = new NyARMatchPatt_Color_WITHOUT_PCA(i_resolution_x, i_resolution_y);
 }
Esempio n. 5
0
        protected NyARSingleDetectMarker(NyARParam i_ref_param, NyARCode i_ref_code, double i_marker_width)
        {
            this._deviation_data = new NyARMatchPattDeviationColorData(i_ref_code.getWidth(), i_ref_code.getHeight());
            this._match_patt     = new NyARMatchPatt_Color_WITHOUT_PCA(i_ref_code);
            this._offset         = new NyARRectOffset();
            this._offset.setSquare(i_marker_width);
            this._coordline = new NyARCoord2Linear(i_ref_param.getScreenSize(), i_ref_param.getDistortionFactor());
            //2値画像バッファを作る
            NyARIntSize s = i_ref_param.getScreenSize();

            this._bin_raster = new NyARBinRaster(s.w, s.h);
        }