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 DetectSquare(NyARParam i_param, int i_raster_type) : base(i_param.getScreenSize()) { this._match_patt = null; this._coordline = new NyARCoord2Linear(i_param.getScreenSize(), i_param.getDistortionFactor()); this._raster_type = i_raster_type; return; }
public OnSquareDetect(INyARMarkerSystemConfig i_config, ARMarkerList i_armk_list, NyIdList i_idmk_list, TrackingList i_tracking_list, SquareStack i_ref_sq_stack) { this._coordline = new NyARCoord2Linear(i_config.getNyARParam().getScreenSize(), i_config.getNyARParam().getDistortionFactor()); this._ref_armk_list = i_armk_list; this._ref_idmk_list = i_idmk_list; this._ref_tracking_list = i_tracking_list; //同時に判定待ちにできる矩形の数 this._ref_sq_stack = i_ref_sq_stack; }
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 OnSquareDetect( NyARParam i_params, ARMarkerList i_armk_list, NyIdList i_idmk_list, ARPlayCardList i_psmk_list, TrackingList i_tracking_list, int i_initial_stack_size) { this._coordline = new NyARCoord2Linear(i_params.getScreenSize(), i_params.getDistortionFactor()); this._ref_armk_list = i_armk_list; this._ref_idmk_list = i_idmk_list; this._ref_psmk_list = i_psmk_list; this._ref_tracking_list = i_tracking_list; this._sq_stack = new SquareStack(i_initial_stack_size); }
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); }
public RleDetector(INyARColorPatt i_inst_patt, NyARCode[] i_ref_code, int i_num_of_code, NyARParam i_param) : base(i_param.getScreenSize()) { int cw = i_ref_code[0].getWidth(); int ch = i_ref_code[0].getHeight(); //NyARMatchPatt_Color_WITHOUT_PCA[]の作成 this._match_patt = new NyARMatchPatt_Color_WITHOUT_PCA[i_num_of_code]; this._match_patt[0] = new NyARMatchPatt_Color_WITHOUT_PCA(i_ref_code[0]); for (int i = 1; i < i_num_of_code; i++) { //解像度チェック if (cw != i_ref_code[i].getWidth() || ch != i_ref_code[i].getHeight()) { throw new NyARException(); } this._match_patt[i] = new NyARMatchPatt_Color_WITHOUT_PCA(i_ref_code[i]); } this._inst_patt = i_inst_patt; this._coordline = new NyARCoord2Linear(i_param.getScreenSize(), i_param.getDistortionFactor()); this._deviation_data = new NyARMatchPattDeviationColorData(cw, ch); return; }