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(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; }
/// <summary> /// Initialize a new SquareDetectionListener. /// </summary> /// <param name="patternMatchers">The pattern matchers with the marker data.</param> /// <param name="cameraParameters">The camera calibration data.</param> /// <param name="colorPattern">The used color pattern.</param> /// <param name="patternMatchDeviationData">The pattern match deviation data.</param> public SquareDetectionListener(List <PatternMatcher> patternMatchers, NyARParam cameraParameters, INyARColorPatt colorPattern, NyARMatchPattDeviationColorData patternMatchDeviationData) { this.patternMatchers = patternMatchers; this.colorPattern = colorPattern; this.patternMatchDeviationData = patternMatchDeviationData; this.coordinationMapper = new Coord2Linear(cameraParameters.getScreenSize(), cameraParameters.getDistortionFactor()); this.matrixCalculator = new NyARTransMat(cameraParameters); this.points = NyARIntPoint2d.createArray(4); this.evaluationResult = new NyARMatchPattResult(); Reset(); }
public DetectSquareCB(INyARColorPatt i_inst_patt, NyARCode[] i_ref_code, int i_num_of_code, NyARParam i_param) { int cw = i_ref_code[0].getWidth(); int ch = i_ref_code[0].getHeight(); this._inst_patt = i_inst_patt; this._coordline = new Coord2Linear(i_param.getScreenSize(), i_param.getDistortionFactor()); this._deviation_data = new NyARMatchPattDeviationColorData(cw, ch); //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]); } return; }
public DetectSquareCB(NyARParam i_param) { this._match_patt = null; this._coordline = new Coord2Linear(i_param.getScreenSize(), i_param.getDistortionFactor()); return; }