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 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; }
/// <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 NyARTransMat(NyARParam i_param) { NyARCameraDistortionFactor dist = i_param.getDistortionFactor(); NyARPerspectiveProjectionMatrix pmat = i_param.getPerspectiveProjectionMatrix(); this._transsolver = new NyARTransportVectorSolver(pmat, 4); //互換性が重要な時は、NyARRotMatrix_ARToolKitを使うこと。 //理屈はNyARRotMatrix_NyARToolKitもNyARRotMatrix_ARToolKitも同じだけど、少しだけ値がずれる。 this._rotmatrix = new NyARRotMatrix(pmat); this._mat_optimize = new NyARPartialDifferentiationOptimize(pmat); this._ref_dist_factor = dist; this._projection_mat_ref = pmat; }
public NyARTransMat(NyARParam i_param) { NyARCameraDistortionFactor dist = i_param.getDistortionFactor(); NyARPerspectiveProjectionMatrix pmat = i_param.getPerspectiveProjectionMatrix(); this._transsolver = new NyARTransportVectorSolver(pmat, 4); //互換性が重要な時は、NyARRotMatrix_ARToolKitを使うこと。 //理屈はNyARRotMatrix_NyARToolKitもNyARRotMatrix_ARToolKitも同じだけど、少しだけ値がずれる。 this._rotmatrix = new NyARRotMatrix(pmat); this._mat_optimize = new NyARPartialDifferentiationOptimize(pmat); this._ref_dist_factor = dist; this._projection_mat_ref = pmat; }
public NyARSurfaceTracker(NyARParam i_param_ref, int i_max_search_feature_num, double i_sim_thresh) { this._candidate = new NyARSurfaceFeatures(NyARSurfaceFeatures.AR2_TRACKING_CANDIDATE_MAX + 1); this._candidate2 = new NyARSurfaceFeatures(NyARSurfaceFeatures.AR2_TRACKING_CANDIDATE_MAX + 1); this._feature_selector = new NyARVisibleFeatureExtractor(i_param_ref.getScreenSize(), i_param_ref.getDistortionFactor()); this.__pcpoints = new PatchImagePositions(i_param_ref.getDistortionFactor()); this._ref_cparam = i_param_ref; this.searchFeatureNum = i_max_search_feature_num; this.simThresh = i_sim_thresh; this._ctrans_log = new NyARSurfaceTransMatrixSetFifo(3); this._prev_selected_features = new NyARFeatureCoordPtrList(this.searchFeatureNum); this.__selected_features = new NyARSurfaceFeaturesPtr(this.searchFeatureNum); return; }
/** * コンストラクタです。 * 座標計算に必要なカメラパラメータの参照値を元に、インスタンスを生成します。 * @param i_param * ARToolKit形式のカメラパラメータです。 * インスタンスは、この中から樽型歪み矯正オブジェクト、射影変換オブジェクトを参照します。 * @ */ public NyARTransMat(NyARParam i_param) { initInstance(i_param.getDistortionFactor(), i_param.getPerspectiveProjectionMatrix()); return; }
public DetectSquare(NyARParam i_param): base(i_param.getScreenSize()) { this._match_patt = null; this._coordline = new NyARCoord2Linear(i_param.getScreenSize(), i_param.getDistortionFactor()); return; }
/** * コンストラクタ。 * 樽型歪みが少ない、または補正済みの画像を入力するときには、{@link #NyARReality(NyARIntSize, double, double, NyARPerspectiveProjectionMatrix, NyARCameraDistortionFactor, int, int)} * のi_dist_factorにnullを指定すると、より高速な動作が期待できます。 * @param i_param * カメラパラメータを指定します。 * @param i_near * 視錐体のnear-pointをmm単位で指定します。 * default値は{@link #FRASTRAM_ARTK_NEAR}です。 * @param i_far * 視錐体のfar-pointをmm単位で指定します。 * default値は{@link #FRASTRAM_ARTK_FAR}です。 * @param i_max_known_target * Knownターゲットの最大数を指定します。 * @param i_max_unknown_target * UnKnownターゲットの最大数を指定します。 * @throws NyARException */ public NyARReality(NyARParam i_param,double i_near,double i_far,int i_max_known_target,int i_max_unknown_target) { //定数とかいろいろ this.MAX_LIMIT_KNOWN=i_max_known_target; this.MAX_LIMIT_UNKNOWN=i_max_unknown_target; this.initInstance(i_param.getScreenSize(),i_near,i_far,i_param.getPerspectiveProjectionMatrix(),i_param.getDistortionFactor()); 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_param * ARToolKit形式のカメラパラメータです。 * インスタンスは、この中から樽型歪み矯正オブジェクト、射影変換オブジェクトを参照します。 * @ */ public NyARTransMat(NyARParam i_param) : this(i_param.getDistortionFactor(), i_param.getPerspectiveProjectionMatrix()) { return; }
/** * コンストラクタです。 * 座標計算に必要なカメラパラメータの参照値を元に、インスタンスを生成します。 * @param i_param * ARToolKit形式のカメラパラメータです。 * インスタンスは、この中から樽型歪み矯正オブジェクト、射影変換オブジェクトを参照します。 * @ */ public NyARTransMat(NyARParam i_param) { initInstance(i_param.getDistortionFactor(), i_param.getPerspectiveProjectionMatrix()); return; }
/** * コンストラクタです。 * 座標計算に必要なカメラパラメータの参照値を元に、インスタンスを生成します。 * @param i_param * ARToolKit形式のカメラパラメータです。 * インスタンスは、この中から樽型歪み矯正オブジェクト、射影変換オブジェクトを参照します。 * @ */ public NyARTransMat(NyARParam i_param) : this(i_param.getDistortionFactor(), i_param.getPerspectiveProjectionMatrix()) { return; }