public NyARSingleDetectMarker_NyARTK_FITTING_ARTKv2(NyARParam i_ref_param, NyARCode i_ref_code, double i_marker_width) : base(i_ref_param, i_ref_code, i_marker_width) { this._inst_patt = new NyARColorPatt_Perspective(i_ref_code.getWidth(), i_ref_code.getHeight(), 4, 25); this._transmat = new NyARTransMat_ARToolKit(i_ref_param); this._square_detect = new NyARSingleDetectMarker_ARTKv2.ARTKDetector(this, i_ref_param.getScreenSize()); }
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; }
/** */ 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; }
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); }
/** * コンストラクタから呼び出す関数です。 * @param i_ref_param * @param i_ref_code * @param i_marker_width * @param i_input_raster_type * @param i_profile_id * @throws NyARException */ protected void initialize( NyARParam i_ref_param, NyARCode i_ref_code, double i_marker_width, int i_input_raster_type, int i_profile_id) { NyARRasterFilter_ARToolkitThreshold th = new NyARRasterFilter_ARToolkitThreshold(100, i_input_raster_type); INyARColorPatt patt_inst; NyARSquareContourDetector sqdetect_inst; INyARTransMat transmat_inst; switch (i_profile_id) { case PF_ARTOOLKIT_COMPATIBLE: patt_inst = new NyARColorPatt_O3(i_ref_code.getWidth(), i_ref_code.getHeight()); sqdetect_inst = new NyARSquareContourDetector_ARToolKit(i_ref_param.getScreenSize()); transmat_inst = new NyARTransMat_ARToolKit(i_ref_param); break; case PF_NYARTOOLKIT_ARTOOLKIT_FITTING: patt_inst = new NyARColorPatt_Perspective_O2(i_ref_code.getWidth(), i_ref_code.getHeight(), 4, 25); sqdetect_inst = new NyARSquareContourDetector_Rle(i_ref_param.getScreenSize()); transmat_inst = new NyARTransMat_ARToolKit(i_ref_param); break; case PF_NYARTOOLKIT: //default patt_inst = new NyARColorPatt_Perspective_O2(i_ref_code.getWidth(), i_ref_code.getHeight(), 4, 25); sqdetect_inst = new NyARSquareContourDetector_Rle(i_ref_param.getScreenSize()); transmat_inst = new NyARTransMat(i_ref_param); break; default: throw new NyARException(); } base.initInstance(patt_inst, sqdetect_inst, transmat_inst, th, i_ref_param, i_ref_code, i_marker_width); return; }