Changeset 32699
- Timestamp:
- 04/21/09 16:14:17 (4 years ago)
- Location:
- lang/cpluspluscli/OpenCvSharp2/trunk
- Files:
-
- 4 modified
-
OpenCvSharp.Test/Program.cs (modified) (2 diffs)
-
OpenCvSharp/Src/Class/CvStereoBMState.cs (modified) (4 diffs)
-
OpenCvSharp/Src/Core/Cv_A-C.cs (modified) (5 diffs)
-
OpenCvSharp/Src/Core/Cv_D-G.cs (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp.Test/Program.cs
r32679 r32699 95 95 //new Test.EM(); // EMアルゴリズム 96 96 97 new Test.FaceDetect(); // 顔の検出97 //new Test.FaceDetect(); // 顔の検出 98 98 99 99 //new Test.FileStorage(); // データのファイルストレージへの書き込み・読み込み … … 102 102 103 103 //new Test.FindContours(); // 輪郭の検出と描画 104 104 105 105 //new Test.Histogram(); // ヒストグラムの描画 106 106 -
lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp/Src/Class/CvStereoBMState.cs
r32510 r32699 12 12 { 13 13 /// <summary> 14 /// C++/CLI 側でポインタにアクセスするオブジェクト14 /// C++/CLI wrapper of native CvStereoBMState* pointer 15 15 /// </summary> 16 16 private Extern.WCvStereoBMState data; 17 17 /// <summary> 18 /// データポインタ18 /// data pointer 19 19 /// </summary> 20 20 private IntPtr ptr; 21 21 22 22 23 #region 初期化と解放23 #region Init and Disposal 24 24 /// <summary> 25 /// ステレオブロックマッチング構造体を作成する (cvCreateStereoBMState相当)26 /// </summary>25 /// ステレオブロックマッチング構造体を作成する (cvCreateStereoBMState相当) 26 /// </summary> 27 27 public CvStereoBMState() 28 28 : this(StereoBMPreset.Basic, 0) 29 29 { 30 30 } 31 /// <summary>32 /// ステレオブロックマッチング構造体を作成する (cvCreateStereoBMState相当)33 /// </summary>34 /// <param name="preset">あらかじめ定義されたパラメータのID.構造体を作成した後で,任意のパラメータをオーバーライドできる. </param>31 /// <summary> 32 /// ステレオブロックマッチング構造体を作成する (cvCreateStereoBMState相当) 33 /// </summary> 34 /// <param name="preset">あらかじめ定義されたパラメータのID.構造体を作成した後で,任意のパラメータをオーバーライドできる. </param> 35 35 public CvStereoBMState(StereoBMPreset preset) 36 36 : this(preset, 0) 37 37 { 38 38 } 39 /// <summary>40 /// ステレオブロックマッチング構造体を作成する (cvCreateStereoBMState相当)41 /// </summary>42 /// <param name="preset">あらかじめ定義されたパラメータのID.構造体を作成した後で,任意のパラメータをオーバーライドできる. </param>43 /// <param name="numberOfDisparities">視差数(最大視差-最小視差). このパラメータが 0 の場合,preset から選択される. そうでない場合は,与えられた値が preset の値をオーバーライドする.</param>39 /// <summary> 40 /// ステレオブロックマッチング構造体を作成する (cvCreateStereoBMState相当) 41 /// </summary> 42 /// <param name="preset">あらかじめ定義されたパラメータのID.構造体を作成した後で,任意のパラメータをオーバーライドできる. </param> 43 /// <param name="numberOfDisparities">視差数(最大視差-最小視差). このパラメータが 0 の場合,preset から選択される. そうでない場合は,与えられた値が preset の値をオーバーライドする.</param> 44 44 public CvStereoBMState(StereoBMPreset preset, int numberOfDisparities) 45 45 { … … 53 53 } 54 54 55 #if LANG_JP 55 56 /// <summary> 56 57 /// ポインタから初期化 57 58 /// </summary> 58 59 /// <param name="ptr">CvStereoBMState*</param> 60 #else 61 /// <summary> 62 /// Initializes from native pointer 63 /// </summary> 64 /// <param name="ptr"></param> 65 #endif 59 66 public CvStereoBMState(IntPtr ptr) 60 67 { … … 77 84 78 85 79 #region プロパティ86 #region Properties 80 87 /// <summary> 81 /// sizeof(CvStereoBMState) を取得する88 /// sizeof(CvStereoBMState) 82 89 /// </summary> 83 90 public const int SizeOf = Extern.WCvStereoBMState.SizeOf; 84 91 /// <summary> 85 /// データポインタ(CvStereoBMState*)を取得する92 /// Data pointer (CvStereoBMState*) 86 93 /// </summary> 87 94 public IntPtr CvPtr … … 90 97 } 91 98 92 93 /// <summary>94 /// 事前フィルタのタイプ (現在のところ0)95 /// </summary>96 public int PreFilterType{97 get{ return data.preFilterType; }98 set{ data.preFilterType = value; }99 }100 /// <summary>101 /// 事前フィルタのサイズ (おおよそ5x5から21x21)102 /// </summary>103 public int PreFilterSize{104 get{ return data.preFilterSize; }105 set{ data.preFilterSize = value; }106 }107 /// <summary>108 /// 事前フィルタのキャップ (おおよそ31以下)109 /// </summary>110 public int PreFilterCap{111 get{ return data.preFilterCap; }112 set{ data.preFilterCap = value; }113 }114 99 115 /// <summary> 116 /// SAD(Sum of Absolute Difference)の窓の大きさ (5x5から21x21) 117 /// </summary> 118 public int SADWindowSize{ 119 get{ return data.SADWindowSize; } 120 set{ data.SADWindowSize = value; } 121 } 122 /// <summary> 123 /// SAD(Sum of Absolute Difference)の最小視差 (=0) 124 /// </summary> 125 public int MinDisparity{ 126 get{ return data.minDisparity; } 127 set{ data.minDisparity = value; } 128 } 129 /// <summary> 130 /// SAD(Sum of Absolute Difference)の 最大視差-最小視差 131 /// </summary> 132 public int NumberOfDisparities{ 133 get{ return data.numberOfDisparities; } 134 set{ data.numberOfDisparities = value; } 135 } 100 /// <summary> 101 /// 事前フィルタのタイプ (現在のところ0) 102 /// </summary> 103 public int PreFilterType 104 { 105 get { return data.preFilterType; } 106 set { data.preFilterType = value; } 107 } 108 /// <summary> 109 /// 事前フィルタのサイズ (おおよそ5x5から21x21) 110 /// </summary> 111 public int PreFilterSize 112 { 113 get { return data.preFilterSize; } 114 set { data.preFilterSize = value; } 115 } 116 /// <summary> 117 /// 事前フィルタのキャップ (おおよそ31以下) 118 /// </summary> 119 public int PreFilterCap 120 { 121 get { return data.preFilterCap; } 122 set { data.preFilterCap = value; } 123 } 136 124 137 /// <summary> 138 /// 事後フィルタの、テクスチャの無い領域を無視する際の閾値 139 /// </summary> 140 public int TextureThreshold{ 141 get{ return data.textureThreshold; } 142 set{ data.textureThreshold = value; } 143 } 144 /// <summary> 145 /// 事後フィルタの、異なる視差でのマッチが近辺にある場合にそのピクセルを除外する際の比率? 146 /// </summary> 147 public int UniquenessRatio{ 148 get{ return data.uniquenessRatio; } 149 set{ data.uniquenessRatio = value; } 150 } 151 /// <summary> 152 /// 事後フィルタの視差変化ウィンドウ(利用されない) 153 /// </summary> 154 [Obsolete("", true)] 155 public int SpeckleWindowSize{ 156 get{ return data.speckleWindowSize; } 157 set{ data.speckleWindowSize = value; } 158 } 159 /// <summary> 160 /// 事後フィルタのウィンドウの変化範囲(利用されない) 161 /// </summary> 162 [Obsolete("", true)] 163 public int SpeckleRange{ 164 get{ return data.speckleRange; } 165 set{ data.speckleRange = value; } 166 } 125 /// <summary> 126 /// SAD(Sum of Absolute Difference)の窓の大きさ (5x5から21x21) 127 /// </summary> 128 public int SADWindowSize 129 { 130 get { return data.SADWindowSize; } 131 set { data.SADWindowSize = value; } 132 } 133 /// <summary> 134 /// SAD(Sum of Absolute Difference)の最小視差 (=0) 135 /// </summary> 136 public int MinDisparity 137 { 138 get { return data.minDisparity; } 139 set { data.minDisparity = value; } 140 } 141 /// <summary> 142 /// SAD(Sum of Absolute Difference)の 最大視差-最小視差 143 /// </summary> 144 public int NumberOfDisparities 145 { 146 get { return data.numberOfDisparities; } 147 set { data.numberOfDisparities = value; } 148 } 149 150 /// <summary> 151 /// 事後フィルタの、テクスチャの無い領域を無視する際の閾値 152 /// </summary> 153 public int TextureThreshold 154 { 155 get { return data.textureThreshold; } 156 set { data.textureThreshold = value; } 157 } 158 /// <summary> 159 /// 事後フィルタの、異なる視差でのマッチが近辺にある場合にそのピクセルを除外する際の比率? 160 /// </summary> 161 public int UniquenessRatio 162 { 163 get { return data.uniquenessRatio; } 164 set { data.uniquenessRatio = value; } 165 } 166 /// <summary> 167 /// 事後フィルタの視差変化ウィンドウ(利用されない) 168 /// </summary> 169 [Obsolete("", true)] 170 public int SpeckleWindowSize 171 { 172 get { return data.speckleWindowSize; } 173 set { data.speckleWindowSize = value; } 174 } 175 /// <summary> 176 /// 事後フィルタのウィンドウの変化範囲(利用されない) 177 /// </summary> 178 [Obsolete("", true)] 179 public int SpeckleRange 180 { 181 get { return data.speckleRange; } 182 set { data.speckleRange = value; } 183 } 167 184 #endregion 168 185 169 186 170 187 /// <summary> 171 /// ブロックマッチングアルゴリズムを用いて視差画像を計算する (cvFindStereoCorrespondenceBM相当)172 /// </summary>173 /// <param name="left">左画像.シングルチャンネル,8ビット.</param>174 /// <param name="right">左画像.シングルチャンネル,8ビット.</param>175 /// <param name="disparity">出力の視差配列.シングルチャンネル,16ビット,符号有り整数,入力画像と同サイズ.各要素は,計算された視差であり,16倍されて整数値にまるめられる.</param>176 public void FindStereoCorrespondence( CvArr left, CvArr right, CvArr disparity)177 {178 Cv.FindStereoCorrespondenceBM(left, right, disparity, this);179 }188 /// ブロックマッチングアルゴリズムを用いて視差画像を計算する (cvFindStereoCorrespondenceBM相当) 189 /// </summary> 190 /// <param name="left">左画像.シングルチャンネル,8ビット.</param> 191 /// <param name="right">左画像.シングルチャンネル,8ビット.</param> 192 /// <param name="disparity">出力の視差配列.シングルチャンネル,16ビット,符号有り整数,入力画像と同サイズ.各要素は,計算された視差であり,16倍されて整数値にまるめられる.</param> 193 public void FindStereoCorrespondence(CvArr left, CvArr right, CvArr disparity) 194 { 195 Cv.FindStereoCorrespondenceBM(left, right, disparity, this); 196 } 180 197 } 181 198 } -
lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp/Src/Core/Cv_A-C.cs
r32691 r32699 3166 3166 #endregion 3167 3167 #region ComputeCorrespondEpilines 3168 #if LANG_JP 3168 3169 /// <summary> 3169 3170 /// 2枚の画像間の点対応から基礎行列(F行列)を計算する … … 3173 3174 /// <param name="fundamental_matrix">基礎行列</param> 3174 3175 /// <param name="correspondent_lines">計算されたエピポーラ線.大きさは3xN また Nx3 の配列.</param> 3176 #else 3177 /// <summary> 3178 /// For points in one image of stereo pair computes the corresponding epilines in the other image 3179 /// </summary> 3180 /// <param name="points">The input points. 2xN, Nx2, 3xN or Nx3 array (where N number of points). Multi-channel 1xN or Nx1 array is also acceptable. </param> 3181 /// <param name="which_image">Index of the image (1 or 2) that contains the points</param> 3182 /// <param name="fundamental_matrix">Fundamental matrix </param> 3183 /// <param name="correspondent_lines">Computed epilines, 3xN or Nx3 array </param> 3184 #endif 3175 3185 public static void ComputeCorrespondEpilines(this CvMat points, int which_image, CvMat fundamental_matrix, out CvMat correspondent_lines) 3176 3186 { … … 3340 3350 #endregion 3341 3351 #region ConvertPointsHomogeneous 3352 #if LANG_JP 3342 3353 /// <summary> 3343 3354 /// 2枚の画像間の点対応から基礎行列(F行列)を計算する … … 3345 3356 /// <param name="src">入力点の配列.大きさは2xN, Nx2, 3xN, Nx3, 4xN,またはNx4(ここでNは点の数).マルチチャンネルの1xNまたはNx1の配列も使用可能.</param> 3346 3357 /// <param name="dst">出力点の配列.入力配列と同じ数の点が含まれる次元数は,同じ, あるいは入力より1少ないか1大きい.そして2..4の範囲内でなければならない. </param> 3358 #else 3359 /// <summary> 3360 /// Convert points to/from homogeneous coordinates 3361 /// </summary> 3362 /// <param name="src">The input point array, 2xN, Nx2, 3xN, Nx3, 4xN or Nx4 (where N is the number of points). Multi-channel 1xN or Nx1 array is also acceptable. </param> 3363 /// <param name="dst">The output point array, must contain the same number of points as the input; The dimensionality must be the same, 1 less or 1 more than the input, and also within 2..4. </param> 3364 #endif 3347 3365 public static void ConvertPointsHomogenious(this CvMat src, CvMat dst) 3348 3366 { 3349 3367 ConvertPointsHomogenious(src, dst); 3350 3368 } 3369 #if LANG_JP 3351 3370 /// <summary> 3352 3371 /// 2枚の画像間の点対応から基礎行列(F行列)を計算する … … 3354 3373 /// <param name="src">入力点の配列.大きさは2xN, Nx2, 3xN, Nx3, 4xN,またはNx4(ここでNは点の数).マルチチャンネルの1xNまたはNx1の配列も使用可能.</param> 3355 3374 /// <param name="dst">出力点の配列.入力配列と同じ数の点が含まれる次元数は,同じ, あるいは入力より1少ないか1大きい.そして2..4の範囲内でなければならない. </param> 3375 #else 3376 /// <summary> 3377 /// Convert points to/from homogeneous coordinates 3378 /// </summary> 3379 /// <param name="src">The input point array, 2xN, Nx2, 3xN, Nx3, 4xN or Nx4 (where N is the number of points). Multi-channel 1xN or Nx1 array is also acceptable. </param> 3380 /// <param name="dst">The output point array, must contain the same number of points as the input; The dimensionality must be the same, 1 less or 1 more than the input, and also within 2..4. </param> 3381 #endif 3356 3382 public static void ConvertPointsHomogeneous(this CvMat src, CvMat dst) 3357 3383 { -
lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp/Src/Core/Cv_D-G.cs
r32689 r32699 1336 1336 #endregion 1337 1337 #region FindFundamentalMat 1338 #if LANG_JP 1338 1339 /// <summary> 1339 1340 /// 2枚の画像間の点対応から基礎行列(F行列)を計算する … … 1343 1344 /// <param name="fundamental_matrix">出力される基礎行列.サイズは 3x3, または 9x3(7-point methodは3つの行列を返す).</param> 1344 1345 /// <returns>求めた基礎行列の数(1 または 3).もし行列が求まらないときは0.</returns> 1346 #else 1347 /// <summary> 1348 /// Calculates fundamental matrix from corresponding points in two images 1349 /// </summary> 1350 /// <param name="points1">Array of the first image points of 2xN, Nx2, 3xN or Nx3 size (where N is number of points). Multi-channel 1xN or Nx1 array is also acceptable. The point coordinates should be floating-point (single or double precision) </param> 1351 /// <param name="points2">Array of the second image points of the same size and format as points1</param> 1352 /// <param name="fundamental_matrix">The output fundamental matrix or matrices. The size should be 3x3 or 9x3 (7-point method may return up to 3 matrices). </param> 1353 /// <returns></returns> 1354 #endif 1345 1355 public static int FindFundamentalMat(CvMat points1, CvMat points2, CvMat fundamental_matrix) 1346 1356 { 1347 1357 return FindFundamentalMat(points1, points2, fundamental_matrix, FundamentalMatMethod.Ransac, 3.0, 0.99, null); 1348 1358 } 1359 #if LANG_JP 1349 1360 /// <summary> 1350 1361 /// 2枚の画像間の点対応から基礎行列(F行列)を計算する … … 1355 1366 /// <param name="method">基礎行列の計算手法</param> 1356 1367 /// <returns>求めた基礎行列の数(1 または 3).もし行列が求まらないときは0.</returns> 1368 #else 1369 /// <summary> 1370 /// Calculates fundamental matrix from corresponding points in two images 1371 /// </summary> 1372 /// <param name="points1">Array of the first image points of 2xN, Nx2, 3xN or Nx3 size (where N is number of points). Multi-channel 1xN or Nx1 array is also acceptable. The point coordinates should be floating-point (single or double precision) </param> 1373 /// <param name="points2">Array of the second image points of the same size and format as points1</param> 1374 /// <param name="fundamental_matrix">The output fundamental matrix or matrices. The size should be 3x3 or 9x3 (7-point method may return up to 3 matrices). </param> 1375 /// <param name="method">Method for computing the fundamental matrix </param> 1376 /// <returns></returns> 1377 #endif 1357 1378 public static int FindFundamentalMat(CvMat points1, CvMat points2, CvMat fundamental_matrix, FundamentalMatMethod method) 1358 1379 { 1359 1380 return FindFundamentalMat(points1, points2, fundamental_matrix, method, 3.0, 0.99, null); 1360 1381 } 1382 #if LANG_JP 1361 1383 /// <summary> 1362 1384 /// 2枚の画像間の点対応から基礎行列(F行列)を計算する … … 1369 1391 /// <param name="param2">RANSAC または LMedSメソッドのときにのみ使用されるパラメータ. F行列の推定精度の信頼レベルを示す.</param> 1370 1392 /// <returns>求めた基礎行列の数(1 または 3).もし行列が求まらないときは0.</returns> 1393 #else 1394 /// <summary> 1395 /// Calculates fundamental matrix from corresponding points in two images 1396 /// </summary> 1397 /// <param name="points1">Array of the first image points of 2xN, Nx2, 3xN or Nx3 size (where N is number of points). Multi-channel 1xN or Nx1 array is also acceptable. The point coordinates should be floating-point (single or double precision) </param> 1398 /// <param name="points2">Array of the second image points of the same size and format as points1</param> 1399 /// <param name="fundamental_matrix">The output fundamental matrix or matrices. The size should be 3x3 or 9x3 (7-point method may return up to 3 matrices). </param> 1400 /// <param name="method">Method for computing the fundamental matrix </param> 1401 /// <param name="param1">The parameter is used for RANSAC method only. It is the maximum distance from point to epipolar line in pixels, beyond which the point is considered an outlier and is not used for computing the final fundamental matrix. Usually it is set somewhere from 1 to 3. </param> 1402 /// <param name="param2">The parameter is used for RANSAC or LMedS methods only. It denotes the desirable level of confidence of the fundamental matrix estimate. </param> 1403 /// <returns></returns> 1404 #endif 1371 1405 public static int FindFundamentalMat(CvMat points1, CvMat points2, CvMat fundamental_matrix, FundamentalMatMethod method, double param1, double param2) 1372 1406 { 1373 1407 return FindFundamentalMat(points1, points2, fundamental_matrix, method, param1, param2, null); 1374 1408 } 1409 #if LANG_JP 1375 1410 /// <summary> 1376 1411 /// 2枚の画像間の点対応から基礎行列(F行列)を計算する … … 1384 1419 /// <param name="status">N個の要素からなる出力配列. 各要素は,アウトライア(外れ値)に対しては 0,「インライア」,つまり推定されたエピポーラ幾何に良く適合する値, に対しては 1 にセットされる. この配列は RANSAC または LMedS のときのみ計算される.他の手法では,すべて 1 にセットされる.</param> 1385 1420 /// <returns>求めた基礎行列の数(1 または 3).もし行列が求まらないときは0.</returns> 1421 #else 1422 /// <summary> 1423 /// Calculates fundamental matrix from corresponding points in two images 1424 /// </summary> 1425 /// <param name="points1">Array of the first image points of 2xN, Nx2, 3xN or Nx3 size (where N is number of points). Multi-channel 1xN or Nx1 array is also acceptable. The point coordinates should be floating-point (single or double precision) </param> 1426 /// <param name="points2">Array of the second image points of the same size and format as points1</param> 1427 /// <param name="fundamental_matrix">The output fundamental matrix or matrices. The size should be 3x3 or 9x3 (7-point method may return up to 3 matrices). </param> 1428 /// <param name="method">Method for computing the fundamental matrix </param> 1429 /// <param name="param1">The parameter is used for RANSAC method only. It is the maximum distance from point to epipolar line in pixels, beyond which the point is considered an outlier and is not used for computing the final fundamental matrix. Usually it is set somewhere from 1 to 3. </param> 1430 /// <param name="param2">The parameter is used for RANSAC or LMedS methods only. It denotes the desirable level of confidence of the fundamental matrix estimate. </param> 1431 /// <param name="status">The optional output array of N elements, every element of which is set to 0 for outliers and to 1 for the "inliers", i.e. points that comply well with the estimated epipolar geometry. The array is computed only in RANSAC and LMedS methods. For other methods it is set to all 1’s. </param> 1432 /// <returns></returns> 1433 #endif 1386 1434 public static int FindFundamentalMat(CvMat points1, CvMat points2, CvMat fundamental_matrix, FundamentalMatMethod method, double param1, double param2, CvMat status) 1387 1435 {
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)