diff --git a/nuget/OpenCvSharp-AnyCPU.nuspec b/nuget/OpenCvSharp-AnyCPU.nuspec index 2a1340ef1..64c960f88 100644 --- a/nuget/OpenCvSharp-AnyCPU.nuspec +++ b/nuget/OpenCvSharp-AnyCPU.nuspec @@ -2,7 +2,7 @@ OpenCvSharp-AnyCPU - 2.4.10.20141111 + 2.4.10.20150309 OpenCvSharp shimat http://opensource.org/licenses/BSD-3-Clause @@ -10,8 +10,7 @@ https://raw.githubusercontent.com/shimat/opencvsharp/master/nuget/icon/lenna-icon.png false OpenCV wrapper for .NET Framework - - Fixed Mat bugs -- Fixed bugs of conversion Mat <-> Bitmap/WriteableBitmap + - Fixed bugs Copyright 2008-2014 Image Processing OpenCV Wrapper FFI @@ -57,14 +56,12 @@ - - diff --git a/nuget/OpenCvSharp-WithoutDll.nuspec b/nuget/OpenCvSharp-WithoutDll.nuspec index 5f8596383..5eebfb1fb 100644 --- a/nuget/OpenCvSharp-WithoutDll.nuspec +++ b/nuget/OpenCvSharp-WithoutDll.nuspec @@ -2,7 +2,7 @@ OpenCvSharp-WithoutDll - 2.4.10.20141111 + 2.4.10.20150309 OpenCvSharp (without DLLs) shimat http://opensource.org/licenses/BSD-3-Clause @@ -10,8 +10,7 @@ https://raw.githubusercontent.com/shimat/opencvsharp/master/nuget/icon/lenna-icon.png false OpenCV wrapper for .NET Framework - - Fixed Mat bugs -- Fixed bugs of conversion Mat <-> Bitmap/WriteableBitmap + - Fixed bugs Copyright 2008-2014 Image Processing OpenCV Wrapper FFI diff --git a/src/OpenCvSharp/LICENSE.txt b/src/OpenCvSharp/LICENSE.txt index 65c5ca88a..513efb3d1 100644 --- a/src/OpenCvSharp/LICENSE.txt +++ b/src/OpenCvSharp/LICENSE.txt @@ -1,165 +1,33 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. +By downloading, copying, installing or using the software you agree to this license. +If you do not agree to this license, do not download, install, +copy or use the software. + + + License Agreement + For Open Source Computer Vision Library + (3-clause BSD License) + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met + + Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + andor other materials provided with the distribution. + + Neither the names of the copyright holders nor the names of the contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +This software is provided by the copyright holders and contributors as is and +any express or implied warranties, including, but not limited to, the implied +warranties of merchantability and fitness for a particular purpose are disclaimed. +In no event shall copyright holders or contributors be liable for any direct, +indirect, incidental, special, exemplary, or consequential damages +(including, but not limited to, procurement of substitute goods or services; +loss of use, data, or profits; or business interruption) however caused +and on any theory of liability, whether in contract, strict liability, +or tort (including negligence or otherwise) arising in any way out of +the use of this software, even if advised of the possibility of such damage. \ No newline at end of file diff --git a/src/OpenCvSharp/OpenCvSharp.dll.config b/src/OpenCvSharp/OpenCvSharp.dll.config index a4e1117ff..e2d2e42e4 100644 --- a/src/OpenCvSharp/OpenCvSharp.dll.config +++ b/src/OpenCvSharp/OpenCvSharp.dll.config @@ -1,21 +1,21 @@  - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/OpenCvSharp/Src/Core/Cv_C.cs b/src/OpenCvSharp/Src/Core/Cv_C.cs index 3bce1118f..f834d99bf 100644 --- a/src/OpenCvSharp/Src/Core/Cv_C.cs +++ b/src/OpenCvSharp/Src/Core/Cv_C.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; using System.Runtime.InteropServices; using OpenCvSharp.Utilities; @@ -422,7 +421,7 @@ public static void CalcBayesianProb(CvHistogram[] src, CvHistogram[] dst) /// ベクトル集合の共変動行列を計算する /// /// 入力ベクトル.これらはすべて同じタイプで同じサイズでなくてはならない. - /// 浮動小数点型の正方な出力共変動行列 + /// 浮動小数点型の正方な出力共変動行列 /// 入力または出力配列(フラグに依存する) - 入力ベクトルの平均ベクトル /// 操作フラグ #else @@ -430,16 +429,16 @@ public static void CalcBayesianProb(CvHistogram[] src, CvHistogram[] dst) /// Calculates covariation matrix of the set of vectors /// /// The input vectors. They all must have the same type and the same size. The vectors do not have to be 1D, they can be 2D (e.g. images) etc. - /// The output covariation matrix that should be floating-point and square. + /// The output covariation matrix that should be floating-point and square. /// The input or output (depending on the flags) array - the mean (average) vector of the input vectors. /// The operation flags #endif - public static void CalcCovarMatrix(CvArr[] vects, CvArr cov_mat, CvArr avg, CovarMatrixFlag flags) + public static void CalcCovarMatrix(CvArr[] vects, CvArr covMat, CvArr avg, CovarMatrixFlag flags) { if (vects == null) throw new ArgumentNullException("vects"); - if (cov_mat == null) - throw new ArgumentNullException("cov_mat"); + if (covMat == null) + throw new ArgumentNullException("covMat"); if (avg == null) throw new ArgumentNullException("avg"); IntPtr[] vectsPtr = new IntPtr[vects.Length]; @@ -451,7 +450,7 @@ public static void CalcCovarMatrix(CvArr[] vects, CvArr cov_mat, CvArr avg, Cova } vectsPtr[i] = vects[i].CvPtr; } - NativeMethods.cvCalcCovarMatrix(vectsPtr, vects.Length, cov_mat.CvPtr, avg.CvPtr, flags); + NativeMethods.cvCalcCovarMatrix(vectsPtr, vects.Length, covMat.CvPtr, avg.CvPtr, flags); } #endregion #region CalcCovarMatrixEx @@ -459,38 +458,36 @@ public static void CalcCovarMatrix(CvArr[] vects, CvArr cov_mat, CvArr avg, Cova /// /// 入力オブジェクト集合の正規直交基底と平均オブジェクトを計算する /// - /// 入力オブジェクトの個数. + /// 入力オブジェクトの個数. /// 読み込みコールバック関数へのポインタ. - /// 入出力フラグ. - /// 入出力バッファサイズ. + /// 入出力フラグ. + /// 入出力バッファサイズ. /// 入出力バッファへのポインタ. /// コールバック関数に必要なすべてのデータを含む構造体へのポインタ. /// 平均オブジェクト. - /// 共分散行列. 出力パラメータであるので, 関数が呼ばれる前に確保されてなければならない. + /// 共分散行列. 出力パラメータであるので, 関数が呼ばれる前に確保されてなければならない. #else /// /// Calculates the covariance matrix for a group of input objects. /// - /// Number of source objects. + /// Number of source objects. /// Pointer to the read callback function. - /// Input/output flags. - /// Input/output buffer size. + /// Input/output flags. + /// Input/output buffer size. /// Pointer to the input/output buffer. /// Pointer to the structure that contains all necessary data for the callback functions. /// Averaged object. - /// Covariance matrix. An output parameter; must be allocated before the call. + /// Covariance matrix. An output parameter; must be allocated before the call. #endif - public static void CalcCovarMatrixEx(int object_count, CvCallback input, EigenObjectsIOFlag io_flags, int iobuf_size, byte[] buffer, IntPtr userdata, IplImage avg, float[] covar_matrix) + public static void CalcCovarMatrixEx(int objectCount, CvCallback input, EigenObjectsIOFlag ioFlags, int iobufSize, byte[] buffer, IntPtr userdata, IplImage avg, float[] covarMatrix) { if (avg == null) throw new ArgumentNullException("avg"); - //int iobuf_size = (buffer != null) ? buffer.Length : 0; - - using (ScopedGCHandle inputHandle = ScopedGCHandle.Alloc(input)) - using (ScopedGCHandle bufferHandle = ScopedGCHandle.Alloc(buffer, GCHandleType.Pinned)) + //using (ScopedGCHandle inputHandle = ScopedGCHandle.Alloc(input)) + //using (ScopedGCHandle bufferHandle = ScopedGCHandle.Alloc(buffer, GCHandleType.Pinned)) { - NativeMethods.cvCalcCovarMatrixEx(object_count, input, io_flags, iobuf_size, buffer, userdata, avg.CvPtr, covar_matrix); + NativeMethods.cvCalcCovarMatrixEx(objectCount, input, ioFlags, iobufSize, buffer, userdata, avg.CvPtr, covarMatrix); } } #if LANG_JP @@ -499,16 +496,16 @@ public static void CalcCovarMatrixEx(int object_count, CvCallback input, EigenOb /// /// IplImage 型の入力オブジェクトの配列 /// 平均オブジェクト. - /// 共分散行列. 出力パラメータであるので, 関数が呼ばれる前に確保されてなければならない. + /// 共分散行列. 出力パラメータであるので, 関数が呼ばれる前に確保されてなければならない. #else /// /// Calculates the covariance matrix for a group of input objects. (ioFlags = CV_EIGOBJ_NO_CALLBACK) /// /// Array of IplImage input objects. /// Averaged object. - /// Covariance matrix. An output parameter; must be allocated before the call. + /// Covariance matrix. An output parameter; must be allocated before the call. #endif - public static void CalcCovarMatrixEx(IplImage[] input, IplImage avg, float[] covar_matrix) + public static void CalcCovarMatrixEx(IplImage[] input, IplImage avg, float[] covarMatrix) { if (input == null) throw new ArgumentNullException("input"); @@ -517,7 +514,7 @@ public static void CalcCovarMatrixEx(IplImage[] input, IplImage avg, float[] cov if (avg == null) throw new ArgumentNullException("avg"); - int object_count = input.Length; + int objectCount = input.Length; IntPtr[] inputPtr = new IntPtr[input.Length]; for (int i = 0; i < input.Length; i++) @@ -527,7 +524,7 @@ public static void CalcCovarMatrixEx(IplImage[] input, IplImage avg, float[] cov using (ScopedGCHandle handle = ScopedGCHandle.Alloc(inputPtr, GCHandleType.Pinned)) { - NativeMethods.cvCalcCovarMatrixEx(object_count, handle.AddrOfPinnedObject(), EigenObjectsIOFlag.NoCallback, 0, IntPtr.Zero, IntPtr.Zero, avg.CvPtr, covar_matrix); + NativeMethods.cvCalcCovarMatrixEx(objectCount, handle.AddrOfPinnedObject(), EigenObjectsIOFlag.NoCallback, 0, IntPtr.Zero, IntPtr.Zero, avg.CvPtr, covarMatrix); } } #endregion @@ -1216,12 +1213,12 @@ public static void CalcOpticalFlowBM(CvArr prev, CvArr curr, CvSize blockSize, C /// /// /// - /// + /// /// /// /// - /// - /// + /// + /// /// #else /// @@ -1230,16 +1227,16 @@ public static void CalcOpticalFlowBM(CvArr prev, CvArr curr, CvSize blockSize, C /// /// /// - /// + /// /// /// /// - /// - /// + /// + /// /// #endif public static void CalcOpticalFlowFarneback(CvArr prev, CvArr next, CvArr flow, - double pyr_scale, int levels, int winsize, int iterations, int poly_n, double poly_sigma, LKFlowFlag flags) + double pyrScale, int levels, int winsize, int iterations, int polyN, double polySigma, LKFlowFlag flags) { if (prev == null) throw new ArgumentNullException("prev"); @@ -1248,7 +1245,7 @@ public static void CalcOpticalFlowFarneback(CvArr prev, CvArr next, CvArr flow, if (flow == null) throw new ArgumentNullException("flow"); - NativeMethods.cvCalcOpticalFlowFarneback(prev.CvPtr, next.CvPtr, flow.CvPtr, pyr_scale, levels, winsize, iterations, poly_n, poly_sigma, flags); + NativeMethods.cvCalcOpticalFlowFarneback(prev.CvPtr, next.CvPtr, flow.CvPtr, pyrScale, levels, winsize, iterations, polyN, polySigma, flags); } #endregion #region CalcOpticalFlowHS @@ -1258,7 +1255,7 @@ public static void CalcOpticalFlowFarneback(CvArr prev, CvArr next, CvArr flow, /// /// 1番目の画像,8 ビット,シングルチャンネル. /// 2番目の画像,8 ビット,シングルチャンネル. - /// trueの場合、前の(入力)速度場を用いる. + /// trueの場合、前の(入力)速度場を用いる. /// 入力画像と同じサイズのオプティカルフローの水平成分,32 ビット浮動小数点型,シングルチャンネル. /// 入力画像と同じサイズのオプティカルフローの垂直成分,32 ビット浮動小数点型,シングルチャンネル. /// ラグランジュ乗数 @@ -1269,13 +1266,13 @@ public static void CalcOpticalFlowFarneback(CvArr prev, CvArr next, CvArr flow, /// /// First image, 8-bit, single-channel. /// Second image, 8-bit, single-channel. - /// Uses previous (input) velocity field. + /// Uses previous (input) velocity field. /// Horizontal component of the optical flow of the same size as input images, 32-bit floating-point, single-channel. /// Vertical component of the optical flow of the same size as input images, 32-bit floating-point, single-channel. /// Lagrangian multiplier. /// Criteria of termination of velocity computing. #endif - public static void CalcOpticalFlowHS(CvArr prev, CvArr curr, bool use_previous, CvArr velx, CvArr vely, double lambda, CvTermCriteria criteria) + public static void CalcOpticalFlowHS(CvArr prev, CvArr curr, bool usePrevious, CvArr velx, CvArr vely, double lambda, CvTermCriteria criteria) { if (prev == null) throw new ArgumentNullException("prev"); @@ -1285,7 +1282,7 @@ public static void CalcOpticalFlowHS(CvArr prev, CvArr curr, bool use_previous, throw new ArgumentNullException("velx"); if (vely == null) throw new ArgumentNullException("vely"); - NativeMethods.cvCalcOpticalFlowHS(prev.CvPtr, curr.CvPtr, use_previous, velx.CvPtr, vely.CvPtr, lambda, criteria); + NativeMethods.cvCalcOpticalFlowHS(prev.CvPtr, curr.CvPtr, usePrevious, velx.CvPtr, vely.CvPtr, lambda, criteria); } #endregion #region CalcOpticalFlowLK @@ -1555,99 +1552,99 @@ public static void CalcSubdivVoronoi2D(CvSubdiv2D subdiv) /// /// 内部パラメータと各画像に対する 外部パラメータを推定する. /// - /// オブジェクト(キャリブレーションパターン)上の点群座標の結合行列.3xN または Nx3の配列.Nはすべてのビューでの点の数の合計である. - /// 対応する画像上の点群座標の結合行列. 2xN またはNx2 の配列.Nはすべてのビューでの点の数の合計である. - /// それぞれのビューに含まれる点の数を表すベクトル.サ イズは 1xM または Mx1 でMはビューの数.1xM or Mx1 - /// 画像サイズ.内部カメラ行列の初期化のみに用いられる. - /// 出力されるカメラ行列 (A) [fx 0 cx; 0 fy cy; 0 0 1]. CV_CALIB_USE_INTRINSIC_GUESS や CV_CALIB_FIX_ASPECT_RATION が指定され た場合,fx, fy, cx, cyのパラメータのうち いくつか,またはすべてを初期化する必要がある. - /// 出力される1x4のひずみ係数ベクトル [k1, k2, p1, p2]. + /// オブジェクト(キャリブレーションパターン)上の点群座標の結合行列.3xN または Nx3の配列.Nはすべてのビューでの点の数の合計である. + /// 対応する画像上の点群座標の結合行列. 2xN またはNx2 の配列.Nはすべてのビューでの点の数の合計である. + /// それぞれのビューに含まれる点の数を表すベクトル.サ イズは 1xM または Mx1 でMはビューの数.1xM or Mx1 + /// 画像サイズ.内部カメラ行列の初期化のみに用いられる. + /// 出力されるカメラ行列 (A) [fx 0 cx; 0 fy cy; 0 0 1]. CV_CALIB_USE_INTRINSIC_GUESS や CV_CALIB_FIX_ASPECT_RATION が指定され た場合,fx, fy, cx, cyのパラメータのうち いくつか,またはすべてを初期化する必要がある. + /// 出力される1x4のひずみ係数ベクトル [k1, k2, p1, p2]. #else /// /// Finds intrinsic and extrinsic camera parameters using calibration pattern /// - /// The joint matrix of object points, 3xN or Nx3, where N is the total number of points in all views. - /// The joint matrix of corresponding image points, 2xN or Nx2, where N is the total number of points in all views. - /// Vector containing numbers of points in each particular view, 1xM or Mx1, where M is the number of a scene views. - /// Size of the image, used only to initialize intrinsic camera matrix. - /// The output camera matrix (A) [fx 0 cx; 0 fy cy; 0 0 1]. If CV_CALIB_USE_INTRINSIC_GUESS and/or CV_CALIB_FIX_ASPECT_RATION are specified, some or all of fx, fy, cx, cy must be initialized. - /// The output 4x1 or 1x4 vector of distortion coefficients [k1, k2, p1, p2]. + /// The joint matrix of object points, 3xN or Nx3, where N is the total number of points in all views. + /// The joint matrix of corresponding image points, 2xN or Nx2, where N is the total number of points in all views. + /// Vector containing numbers of points in each particular view, 1xM or Mx1, where M is the number of a scene views. + /// Size of the image, used only to initialize intrinsic camera matrix. + /// The output camera matrix (A) [fx 0 cx; 0 fy cy; 0 0 1]. If CV_CALIB_USE_INTRINSIC_GUESS and/or CV_CALIB_FIX_ASPECT_RATION are specified, some or all of fx, fy, cx, cy must be initialized. + /// The output 4x1 or 1x4 vector of distortion coefficients [k1, k2, p1, p2]. #endif - public static void CalibrateCamera2(CvMat object_points, CvMat image_points, CvMat point_counts, CvSize image_size, CvMat intrinsic_matrix, CvMat distortion_coeffs) + public static void CalibrateCamera2(CvMat objectPoints, CvMat imagePoints, CvMat pointCounts, CvSize imageSize, CvMat intrinsicMatrix, CvMat distortionCoeffs) { - CalibrateCamera2(object_points, image_points, point_counts, image_size, intrinsic_matrix, distortion_coeffs, null, null, CalibrationFlag.Default); + CalibrateCamera2(objectPoints, imagePoints, pointCounts, imageSize, intrinsicMatrix, distortionCoeffs, null, null, CalibrationFlag.Default); } #if LANG_JP /// /// 内部パラメータと各画像に対する 外部パラメータを推定する. /// - /// オブジェクト(キャリブレーションパターン)上の点群座標の結合行列.3xN または Nx3の配列.Nはすべてのビューでの点の数の合計である. - /// 対応する画像上の点群座標の結合行列. 2xN またはNx2 の配列.Nはすべてのビューでの点の数の合計である. - /// それぞれのビューに含まれる点の数を表すベクトル.サ イズは 1xM または Mx1 でMはビューの数.1xM or Mx1 - /// 画像サイズ.内部カメラ行列の初期化のみに用いられる. - /// 出力されるカメラ行列 (A) [fx 0 cx; 0 fy cy; 0 0 1]. CV_CALIB_USE_INTRINSIC_GUESS や CV_CALIB_FIX_ASPECT_RATION が指定され た場合,fx, fy, cx, cyのパラメータのうち いくつか,またはすべてを初期化する必要がある. - /// 出力される1x4のひずみ係数ベクトル [k1, k2, p1, p2]. - /// 出力される3xMの回転ベクトルの配列 (コンパクトな回転行列の表記についてはcvRodrigues2を参照). - /// 出力される3xMの並進ベクトルの配列. + /// オブジェクト(キャリブレーションパターン)上の点群座標の結合行列.3xN または Nx3の配列.Nはすべてのビューでの点の数の合計である. + /// 対応する画像上の点群座標の結合行列. 2xN またはNx2 の配列.Nはすべてのビューでの点の数の合計である. + /// それぞれのビューに含まれる点の数を表すベクトル.サ イズは 1xM または Mx1 でMはビューの数.1xM or Mx1 + /// 画像サイズ.内部カメラ行列の初期化のみに用いられる. + /// 出力されるカメラ行列 (A) [fx 0 cx; 0 fy cy; 0 0 1]. CV_CALIB_USE_INTRINSIC_GUESS や CV_CALIB_FIX_ASPECT_RATION が指定され た場合,fx, fy, cx, cyのパラメータのうち いくつか,またはすべてを初期化する必要がある. + /// 出力される1x4のひずみ係数ベクトル [k1, k2, p1, p2]. + /// 出力される3xMの回転ベクトルの配列 (コンパクトな回転行列の表記についてはcvRodrigues2を参照). + /// 出力される3xMの並進ベクトルの配列. #else /// /// Finds intrinsic and extrinsic camera parameters using calibration pattern /// - /// The joint matrix of object points, 3xN or Nx3, where N is the total number of points in all views. - /// The joint matrix of corresponding image points, 2xN or Nx2, where N is the total number of points in all views. - /// Vector containing numbers of points in each particular view, 1xM or Mx1, where M is the number of a scene views. - /// Size of the image, used only to initialize intrinsic camera matrix. - /// The output camera matrix (A) [fx 0 cx; 0 fy cy; 0 0 1]. If CV_CALIB_USE_INTRINSIC_GUESS and/or CV_CALIB_FIX_ASPECT_RATION are specified, some or all of fx, fy, cx, cy must be initialized. - /// The output 4x1 or 1x4 vector of distortion coefficients [k1, k2, p1, p2]. - /// The output 3xM or Mx3 array of rotation vectors (compact representation of rotation matrices, see cvRodrigues2). - /// The output 3xM or Mx3 array of translation vectors. + /// The joint matrix of object points, 3xN or Nx3, where N is the total number of points in all views. + /// The joint matrix of corresponding image points, 2xN or Nx2, where N is the total number of points in all views. + /// Vector containing numbers of points in each particular view, 1xM or Mx1, where M is the number of a scene views. + /// Size of the image, used only to initialize intrinsic camera matrix. + /// The output camera matrix (A) [fx 0 cx; 0 fy cy; 0 0 1]. If CV_CALIB_USE_INTRINSIC_GUESS and/or CV_CALIB_FIX_ASPECT_RATION are specified, some or all of fx, fy, cx, cy must be initialized. + /// The output 4x1 or 1x4 vector of distortion coefficients [k1, k2, p1, p2]. + /// The output 3xM or Mx3 array of rotation vectors (compact representation of rotation matrices, see cvRodrigues2). + /// The output 3xM or Mx3 array of translation vectors. #endif - public static void CalibrateCamera2(CvMat object_points, CvMat image_points, CvMat point_counts, CvSize image_size, CvMat intrinsic_matrix, CvMat distortion_coeffs, CvMat rotation_vectors, CvMat translation_vectors) + public static void CalibrateCamera2(CvMat objectPoints, CvMat imagePoints, CvMat pointCounts, CvSize imageSize, CvMat intrinsicMatrix, CvMat distortionCoeffs, CvMat rotationVectors, CvMat translationVectors) { - CalibrateCamera2(object_points, image_points, point_counts, image_size, intrinsic_matrix, distortion_coeffs, rotation_vectors, translation_vectors, CalibrationFlag.Default); + CalibrateCamera2(objectPoints, imagePoints, pointCounts, imageSize, intrinsicMatrix, distortionCoeffs, rotationVectors, translationVectors, CalibrationFlag.Default); } #if LANG_JP /// /// 内部パラメータと各画像に対する 外部パラメータを推定する. /// - /// オブジェクト(キャリブレーションパターン)上の点群座標の結合行列.3xN または Nx3の配列.Nはすべてのビューでの点の数の合計である. - /// 対応する画像上の点群座標の結合行列. 2xN またはNx2 の配列.Nはすべてのビューでの点の数の合計である. - /// それぞれのビューに含まれる点の数を表すベクトル.サ イズは 1xM または Mx1 でMはビューの数.1xM or Mx1 - /// 画像サイズ.内部カメラ行列の初期化のみに用いられる. - /// 出力されるカメラ行列 (A) [fx 0 cx; 0 fy cy; 0 0 1]. CV_CALIB_USE_INTRINSIC_GUESS や CV_CALIB_FIX_ASPECT_RATION が指定され た場合,fx, fy, cx, cyのパラメータのうち いくつか,またはすべてを初期化する必要がある. - /// 出力される1x4のひずみ係数ベクトル [k1, k2, p1, p2]. - /// 出力される3xMの回転ベクトルの配列 (コンパクトな回転行列の表記についてはcvRodrigues2を参照). - /// 出力される3xMの並進ベクトルの配列. + /// オブジェクト(キャリブレーションパターン)上の点群座標の結合行列.3xN または Nx3の配列.Nはすべてのビューでの点の数の合計である. + /// 対応する画像上の点群座標の結合行列. 2xN またはNx2 の配列.Nはすべてのビューでの点の数の合計である. + /// それぞれのビューに含まれる点の数を表すベクトル.サ イズは 1xM または Mx1 でMはビューの数.1xM or Mx1 + /// 画像サイズ.内部カメラ行列の初期化のみに用いられる. + /// 出力されるカメラ行列 (A) [fx 0 cx; 0 fy cy; 0 0 1]. CV_CALIB_USE_INTRINSIC_GUESS や CV_CALIB_FIX_ASPECT_RATION が指定され た場合,fx, fy, cx, cyのパラメータのうち いくつか,またはすべてを初期化する必要がある. + /// 出力される1x4のひずみ係数ベクトル [k1, k2, p1, p2]. + /// 出力される3xMの回転ベクトルの配列 (コンパクトな回転行列の表記についてはcvRodrigues2を参照). + /// 出力される3xMの並進ベクトルの配列. /// 処理フラグ #else /// /// Finds intrinsic and extrinsic camera parameters using calibration pattern /// - /// The joint matrix of object points, 3xN or Nx3, where N is the total number of points in all views. - /// The joint matrix of corresponding image points, 2xN or Nx2, where N is the total number of points in all views. - /// Vector containing numbers of points in each particular view, 1xM or Mx1, where M is the number of a scene views. - /// Size of the image, used only to initialize intrinsic camera matrix. - /// The output camera matrix (A) [fx 0 cx; 0 fy cy; 0 0 1]. If CV_CALIB_USE_INTRINSIC_GUESS and/or CV_CALIB_FIX_ASPECT_RATION are specified, some or all of fx, fy, cx, cy must be initialized. - /// The output 4x1 or 1x4 vector of distortion coefficients [k1, k2, p1, p2]. - /// The output 3xM or Mx3 array of rotation vectors (compact representation of rotation matrices, see cvRodrigues2). - /// The output 3xM or Mx3 array of translation vectors. + /// The joint matrix of object points, 3xN or Nx3, where N is the total number of points in all views. + /// The joint matrix of corresponding image points, 2xN or Nx2, where N is the total number of points in all views. + /// Vector containing numbers of points in each particular view, 1xM or Mx1, where M is the number of a scene views. + /// Size of the image, used only to initialize intrinsic camera matrix. + /// The output camera matrix (A) [fx 0 cx; 0 fy cy; 0 0 1]. If CV_CALIB_USE_INTRINSIC_GUESS and/or CV_CALIB_FIX_ASPECT_RATION are specified, some or all of fx, fy, cx, cy must be initialized. + /// The output 4x1 or 1x4 vector of distortion coefficients [k1, k2, p1, p2]. + /// The output 3xM or Mx3 array of rotation vectors (compact representation of rotation matrices, see cvRodrigues2). + /// The output 3xM or Mx3 array of translation vectors. /// Different flags #endif - public static void CalibrateCamera2(CvMat object_points, CvMat image_points, CvMat point_counts, CvSize image_size, CvMat intrinsic_matrix, CvMat distortion_coeffs, CvMat rotation_vectors, CvMat translation_vectors, CalibrationFlag flags) - { - if (object_points == null) - throw new ArgumentNullException("object_points"); - if (image_points == null) - throw new ArgumentNullException("image_points"); - if (point_counts == null) - throw new ArgumentNullException("point_counts"); - if (intrinsic_matrix == null) - throw new ArgumentNullException("intrinsic_matrix"); - if (distortion_coeffs == null) - throw new ArgumentNullException("distortion_coeffs"); + public static void CalibrateCamera2(CvMat objectPoints, CvMat imagePoints, CvMat pointCounts, CvSize imageSize, CvMat intrinsicMatrix, CvMat distortionCoeffs, CvMat rotationVectors, CvMat translationVectors, CalibrationFlag flags) + { + if (objectPoints == null) + throw new ArgumentNullException("objectPoints"); + if (imagePoints == null) + throw new ArgumentNullException("imagePoints"); + if (pointCounts == null) + throw new ArgumentNullException("pointCounts"); + if (intrinsicMatrix == null) + throw new ArgumentNullException("intrinsicMatrix"); + if (distortionCoeffs == null) + throw new ArgumentNullException("distortionCoeffs"); - IntPtr rotation_vectors_ptr = ToPtr(rotation_vectors); - IntPtr translation_vectors_ptr = ToPtr(translation_vectors); - NativeMethods.cvCalibrateCamera2(object_points.CvPtr, image_points.CvPtr, point_counts.CvPtr, image_size, intrinsic_matrix.CvPtr, distortion_coeffs.CvPtr, rotation_vectors_ptr, translation_vectors_ptr, flags); + IntPtr rotationVectorsPtr = ToPtr(rotationVectors); + IntPtr translationVectorsPtr = ToPtr(translationVectors); + NativeMethods.cvCalibrateCamera2(objectPoints.CvPtr, imagePoints.CvPtr, pointCounts.CvPtr, imageSize, intrinsicMatrix.CvPtr, distortionCoeffs.CvPtr, rotationVectorsPtr, translationVectorsPtr, flags); } #endregion #region CalibrationMatrixValues @@ -1655,183 +1652,183 @@ public static void CalibrateCamera2(CvMat object_points, CvMat image_points, CvM /// /// 様々なカメラ特性を計算する /// - /// 内部パラメータ行列(例えば cvCalibrateCamera2 によって求められたもの). - /// 画像のサイズ.ピクセル単位. + /// 内部パラメータ行列(例えば cvCalibrateCamera2 によって求められたもの). + /// 画像のサイズ.ピクセル単位. #else /// /// Finds intrinsic and extrinsic camera parameters using calibration pattern /// - /// The matrix of intrinsic parameters, e.g. computed by cvCalibrateCamera2 - /// Image size in pixels + /// The matrix of intrinsic parameters, e.g. computed by cvCalibrateCamera2 + /// Image size in pixels #endif - public static void CalibrationMatrixValues(CvMat camera_matrix, CvSize image_size) + public static void CalibrationMatrixValues(CvMat cameraMatrix, CvSize imageSize) { double fovx, fovy; - double focal_length; - CvPoint2D64f principal_point; - double pixel_aspect_ratio; - CalibrationMatrixValues(camera_matrix, image_size, 0, 0, - out fovx, out fovy, out focal_length, out principal_point, out pixel_aspect_ratio); + double focalLength; + CvPoint2D64f principalPoint; + double pixelAspectRatio; + CalibrationMatrixValues(cameraMatrix, imageSize, 0, 0, + out fovx, out fovy, out focalLength, out principalPoint, out pixelAspectRatio); } #if LANG_JP /// /// 様々なカメラ特性を計算する /// - /// 内部パラメータ行列(例えば cvCalibrateCamera2 によって求められたもの). - /// 画像のサイズ.ピクセル単位. - /// アパーチャ幅.実際の長さ単位. - /// アパーチャ高さ.実際の長さ単位. + /// 内部パラメータ行列(例えば cvCalibrateCamera2 によって求められたもの). + /// 画像のサイズ.ピクセル単位. + /// アパーチャ幅.実際の長さ単位. + /// アパーチャ高さ.実際の長さ単位. #else /// /// Finds intrinsic and extrinsic camera parameters using calibration pattern /// - /// The matrix of intrinsic parameters, e.g. computed by cvCalibrateCamera2 - /// Image size in pixels - /// Aperture width in realworld units - /// Aperture width in realworld units + /// The matrix of intrinsic parameters, e.g. computed by cvCalibrateCamera2 + /// Image size in pixels + /// Aperture width in realworld units + /// Aperture width in realworld units #endif - public static void CalibrationMatrixValues(CvMat camera_matrix, CvSize image_size, double aperture_width, double aperture_height) + public static void CalibrationMatrixValues(CvMat cameraMatrix, CvSize imageSize, double apertureWidth, double apertureHeight) { double fovx, fovy; - double focal_length; - CvPoint2D64f principal_point; - double pixel_aspect_ratio; - CalibrationMatrixValues(camera_matrix, image_size, aperture_width, aperture_height, - out fovx, out fovy, out focal_length, out principal_point, out pixel_aspect_ratio); + double focalLength; + CvPoint2D64f principalPoint; + double pixelAspectRatio; + CalibrationMatrixValues(cameraMatrix, imageSize, apertureWidth, apertureHeight, + out fovx, out fovy, out focalLength, out principalPoint, out pixelAspectRatio); } #if LANG_JP /// /// 様々なカメラ特性を計算する /// - /// 内部パラメータ行列(例えば cvCalibrateCamera2 によって求められたもの). - /// 画像のサイズ.ピクセル単位. - /// アパーチャ幅.実際の長さ単位. - /// アパーチャ高さ.実際の長さ単位. + /// 内部パラメータ行列(例えば cvCalibrateCamera2 によって求められたもの). + /// 画像のサイズ.ピクセル単位. + /// アパーチャ幅.実際の長さ単位. + /// アパーチャ高さ.実際の長さ単位. /// x-方向の画角.degree単位. /// y-方向の画角.degree単位. #else /// /// Finds intrinsic and extrinsic camera parameters using calibration pattern /// - /// The matrix of intrinsic parameters, e.g. computed by cvCalibrateCamera2 - /// Image size in pixels - /// Aperture width in realworld units - /// Aperture width in realworld units + /// The matrix of intrinsic parameters, e.g. computed by cvCalibrateCamera2 + /// Image size in pixels + /// Aperture width in realworld units + /// Aperture width in realworld units /// Field of view angle in x direction in degrees /// Field of view angle in y direction in degrees #endif public static void CalibrationMatrixValues( - CvMat camera_matrix, CvSize image_size, double aperture_width, double aperture_height, + CvMat cameraMatrix, CvSize imageSize, double apertureWidth, double apertureHeight, out double fovx, out double fovy) { - double focal_length; - CvPoint2D64f principal_point; - double pixel_aspect_ratio; - CalibrationMatrixValues(camera_matrix, image_size, aperture_width, aperture_height, - out fovx, out fovy, out focal_length, out principal_point, out pixel_aspect_ratio); + double focalLength; + CvPoint2D64f principalPoint; + double pixelAspectRatio; + CalibrationMatrixValues(cameraMatrix, imageSize, apertureWidth, apertureHeight, + out fovx, out fovy, out focalLength, out principalPoint, out pixelAspectRatio); } #if LANG_JP /// /// 様々なカメラ特性を計算する /// - /// 内部パラメータ行列(例えば cvCalibrateCamera2 によって求められたもの). - /// 画像のサイズ.ピクセル単位. - /// アパーチャ幅.実際の長さ単位. - /// アパーチャ高さ.実際の長さ単位. + /// 内部パラメータ行列(例えば cvCalibrateCamera2 によって求められたもの). + /// 画像のサイズ.ピクセル単位. + /// アパーチャ幅.実際の長さ単位. + /// アパーチャ高さ.実際の長さ単位. /// x-方向の画角.degree単位. /// y-方向の画角.degree単位. - /// 焦点距離.実際の長さ単位. + /// 焦点距離.実際の長さ単位. #else /// /// Finds intrinsic and extrinsic camera parameters using calibration pattern /// - /// The matrix of intrinsic parameters, e.g. computed by cvCalibrateCamera2 - /// Image size in pixels - /// Aperture width in realworld units - /// Aperture width in realworld units + /// The matrix of intrinsic parameters, e.g. computed by cvCalibrateCamera2 + /// Image size in pixels + /// Aperture width in realworld units + /// Aperture width in realworld units /// Field of view angle in x direction in degrees /// Field of view angle in y direction in degrees - /// Focal length in realworld units + /// Focal length in realworld units #endif public static void CalibrationMatrixValues( - CvMat camera_matrix, CvSize image_size, double aperture_width, double aperture_height, - out double fovx, out double fovy, out double focal_length) + CvMat cameraMatrix, CvSize imageSize, double apertureWidth, double apertureHeight, + out double fovx, out double fovy, out double focalLength) { - CvPoint2D64f principal_point; - double pixel_aspect_ratio; - CalibrationMatrixValues(camera_matrix, image_size, aperture_width, aperture_height, - out fovx, out fovy, out focal_length, out principal_point, out pixel_aspect_ratio); + CvPoint2D64f principalPoint; + double pixelAspectRatio; + CalibrationMatrixValues(cameraMatrix, imageSize, apertureWidth, apertureHeight, + out fovx, out fovy, out focalLength, out principalPoint, out pixelAspectRatio); } #if LANG_JP /// /// 様々なカメラ特性を計算する /// - /// 内部パラメータ行列(例えば cvCalibrateCamera2 によって求められたもの). - /// 画像のサイズ.ピクセル単位. - /// アパーチャ幅.実際の長さ単位. - /// アパーチャ高さ.実際の長さ単位. + /// 内部パラメータ行列(例えば cvCalibrateCamera2 によって求められたもの). + /// 画像のサイズ.ピクセル単位. + /// アパーチャ幅.実際の長さ単位. + /// アパーチャ高さ.実際の長さ単位. /// x-方向の画角.degree単位. /// y-方向の画角.degree単位. - /// 焦点距離.実際の長さ単位. - /// 主点(光学中心)実際の長さ単位. + /// 焦点距離.実際の長さ単位. + /// 主点(光学中心)実際の長さ単位. #else /// /// Finds intrinsic and extrinsic camera parameters using calibration pattern /// - /// The matrix of intrinsic parameters, e.g. computed by cvCalibrateCamera2 - /// Image size in pixels - /// Aperture width in realworld units - /// Aperture width in realworld units + /// The matrix of intrinsic parameters, e.g. computed by cvCalibrateCamera2 + /// Image size in pixels + /// Aperture width in realworld units + /// Aperture width in realworld units /// Field of view angle in x direction in degrees /// Field of view angle in y direction in degrees - /// Focal length in realworld units - /// The principal point in realworld units + /// Focal length in realworld units + /// The principal point in realworld units #endif public static void CalibrationMatrixValues( - CvMat camera_matrix, CvSize image_size, double aperture_width, double aperture_height, - out double fovx, out double fovy, out double focal_length, out CvPoint2D64f principal_point) + CvMat cameraMatrix, CvSize imageSize, double apertureWidth, double apertureHeight, + out double fovx, out double fovy, out double focalLength, out CvPoint2D64f principalPoint) { - double pixel_aspect_ratio; - CalibrationMatrixValues(camera_matrix, image_size, aperture_width, aperture_height, - out fovx, out fovy, out focal_length, out principal_point, out pixel_aspect_ratio); + double pixelAspectRatio; + CalibrationMatrixValues(cameraMatrix, imageSize, apertureWidth, apertureHeight, + out fovx, out fovy, out focalLength, out principalPoint, out pixelAspectRatio); } #if LANG_JP /// /// 様々なカメラ特性を計算する /// - /// 内部パラメータ行列(例えば cvCalibrateCamera2 によって求められたもの). - /// 画像のサイズ.ピクセル単位. - /// アパーチャ幅.実際の長さ単位. - /// アパーチャ高さ.実際の長さ単位. + /// 内部パラメータ行列(例えば cvCalibrateCamera2 によって求められたもの). + /// 画像のサイズ.ピクセル単位. + /// アパーチャ幅.実際の長さ単位. + /// アパーチャ高さ.実際の長さ単位. /// x-方向の画角.degree単位. /// y-方向の画角.degree単位. - /// 焦点距離.実際の長さ単位. - /// 主点(光学中心)実際の長さ単位. - /// ピクセルのアスペクト比 fy/fx + /// 焦点距離.実際の長さ単位. + /// 主点(光学中心)実際の長さ単位. + /// ピクセルのアスペクト比 fy/fx #else /// /// Finds intrinsic and extrinsic camera parameters using calibration pattern /// - /// The matrix of intrinsic parameters, e.g. computed by cvCalibrateCamera2 - /// Image size in pixels - /// Aperture width in realworld units - /// Aperture width in realworld units + /// The matrix of intrinsic parameters, e.g. computed by cvCalibrateCamera2 + /// Image size in pixels + /// Aperture width in realworld units + /// Aperture width in realworld units /// Field of view angle in x direction in degrees /// Field of view angle in y direction in degrees - /// Focal length in realworld units - /// The principal point in realworld units - /// The pixel aspect ratio ~ fy/fx + /// Focal length in realworld units + /// The principal point in realworld units + /// The pixel aspect ratio ~ fy/fx #endif public static void CalibrationMatrixValues( - CvMat camera_matrix, CvSize image_size, double aperture_width, double aperture_height, - out double fovx, out double fovy, out double focal_length, out CvPoint2D64f principal_point, out double pixel_aspect_ratio) + CvMat cameraMatrix, CvSize imageSize, double apertureWidth, double apertureHeight, + out double fovx, out double fovy, out double focalLength, out CvPoint2D64f principalPoint, out double pixelAspectRatio) { - if (camera_matrix == null) - { - throw new ArgumentNullException("camera_matrix"); - } - NativeMethods.cvCalibrationMatrixValues(camera_matrix.CvPtr, image_size, aperture_width, aperture_height, - out fovx, out fovy, out focal_length, out principal_point, out pixel_aspect_ratio); + if (cameraMatrix == null) + throw new ArgumentNullException("cameraMatrix"); + + NativeMethods.cvCalibrationMatrixValues( + cameraMatrix.CvPtr, imageSize, apertureWidth, apertureHeight, + out fovx, out fovy, out focalLength, out principalPoint, out pixelAspectRatio); } #endregion #region CamShift @@ -1839,7 +1836,7 @@ public static void CalibrationMatrixValues( /// /// オブジェクト中心,サイズおよび姿勢を求める /// - /// オブジェクトヒストグラムのバックプロジェクション + /// オブジェクトヒストグラムのバックプロジェクション /// 初期探索ウィンドウ /// ウィンドウ探索を終了するための条件. /// @@ -1847,22 +1844,22 @@ public static void CalibrationMatrixValues( /// /// Finds object center, size, and orientation /// - /// Back projection of object histogram (see cvCalcBackProject). + /// Back projection of object histogram (see cvCalcBackProject). /// Initial search window. /// Criteria applied to determine when the window search should be finished. /// The function returns number of iterations made within cvMeanShift. #endif - public static int CamShift(CvArr prob_image, CvRect window, CvTermCriteria criteria) + public static int CamShift(CvArr probImage, CvRect window, CvTermCriteria criteria) { CvConnectedComp comp; CvBox2D box; - return CamShift(prob_image, window, criteria, out comp, out box); + return CamShift(probImage, window, criteria, out comp, out box); } #if LANG_JP /// /// オブジェクト中心,サイズおよび姿勢を求める /// - /// オブジェクトヒストグラムのバックプロジェクション + /// オブジェクトヒストグラムのバックプロジェクション /// 初期探索ウィンドウ /// ウィンドウ探索を終了するための条件. /// 結果として得られる構造体.収束した探索ウィンドウの座標(comp->rect フィールド),およびウィンドウ内の全ピクセルの合計値(comp->area フィールド)が含まれる. @@ -1871,22 +1868,22 @@ public static int CamShift(CvArr prob_image, CvRect window, CvTermCriteria crite /// /// Finds object center, size, and orientation /// - /// Back projection of object histogram (see cvCalcBackProject). + /// Back projection of object histogram (see cvCalcBackProject). /// Initial search window. /// Criteria applied to determine when the window search should be finished. /// Resultant structure that contains converged search window coordinates (comp->rect field) and sum of all pixels inside the window (comp->area field). /// The function returns number of iterations made within cvMeanShift. #endif - public static int CamShift(CvArr prob_image, CvRect window, CvTermCriteria criteria, out CvConnectedComp comp) + public static int CamShift(CvArr probImage, CvRect window, CvTermCriteria criteria, out CvConnectedComp comp) { CvBox2D box; - return CamShift(prob_image, window, criteria, out comp, out box); + return CamShift(probImage, window, criteria, out comp, out box); } #if LANG_JP /// /// オブジェクト中心,サイズおよび姿勢を求める /// - /// オブジェクトヒストグラムのバックプロジェクション + /// オブジェクトヒストグラムのバックプロジェクション /// 初期探索ウィンドウ /// ウィンドウ探索を終了するための条件. /// 結果として得られる構造体.収束した探索ウィンドウの座標(comp->rect フィールド),およびウィンドウ内の全ピクセルの合計値(comp->area フィールド)が含まれる. @@ -1896,22 +1893,22 @@ public static int CamShift(CvArr prob_image, CvRect window, CvTermCriteria crite /// /// Finds object center, size, and orientation /// - /// Back projection of object histogram (see cvCalcBackProject). + /// Back projection of object histogram (see cvCalcBackProject). /// Initial search window. /// Criteria applied to determine when the window search should be finished. /// Resultant structure that contains converged search window coordinates (comp->rect field) and sum of all pixels inside the window (comp->area field). /// Circumscribed box for the object. If not NULL, contains object size and orientation. /// The function returns number of iterations made within cvMeanShift. #endif - public static int CamShift(CvArr prob_image, CvRect window, CvTermCriteria criteria, out CvConnectedComp comp, out CvBox2D box) + public static int CamShift(CvArr probImage, CvRect window, CvTermCriteria criteria, out CvConnectedComp comp, out CvBox2D box) { - if (prob_image == null) - throw new ArgumentNullException("prob_image"); + if (probImage == null) + throw new ArgumentNullException("probImage"); comp = new CvConnectedComp(); box = new CvBox2D(); - return NativeMethods.cvCamShift(prob_image.CvPtr, window, criteria, comp.CvPtr, ref box); + return NativeMethods.cvCamShift(probImage.CvPtr, window, criteria, comp.CvPtr, ref box); } #endregion #region Canny @@ -1947,7 +1944,7 @@ public static void Canny(CvArr image, CvArr edges, double threshold1, double thr /// この関数によって得られたエッジ画像 /// 1番目の閾値 /// 2番目の閾値 - /// Sobel演算子のアパーチャサイズ + /// Sobel演算子のアパーチャサイズ #else /// /// Finds the edges on the input image image and marks them in the output image edges using the Canny algorithm. @@ -1957,15 +1954,15 @@ public static void Canny(CvArr image, CvArr edges, double threshold1, double thr /// Image to store the edges found by the function. /// The first threshold. /// The second threshold. - /// Aperture parameter for Sobel operator. + /// Aperture parameter for Sobel operator. #endif - public static void Canny(CvArr image, CvArr edges, double threshold1, double threshold2, ApertureSize aperture_size) + public static void Canny(CvArr image, CvArr edges, double threshold1, double threshold2, ApertureSize apertureSize) { if (image == null) throw new ArgumentNullException(); if (edges == null) throw new ArgumentNullException(); - NativeMethods.cvCanny(image.CvPtr, edges.CvPtr, threshold1, threshold2, aperture_size); + NativeMethods.cvCanny(image.CvPtr, edges.CvPtr, threshold1, threshold2, apertureSize); } #endregion #region CartToPolar @@ -2288,8 +2285,8 @@ public static CvTermCriteria CheckTermCriteria(CvTermCriteria criteria, double d /// 円を描画する /// /// 画像 - /// 円の中心のx座標 - /// 円の中心のy座標 + /// 円の中心のx座標 + /// 円の中心のy座標 /// 円の半径 /// 円の色 #else @@ -2297,22 +2294,22 @@ public static CvTermCriteria CheckTermCriteria(CvTermCriteria criteria, double d /// Draws a circle /// /// Image where the circle is drawn. - /// X-coordinate of the center of the circle. - /// Y-coordinate of the center of the circle. + /// X-coordinate of the center of the circle. + /// Y-coordinate of the center of the circle. /// Radius of the circle. /// Circle color. #endif - public static void Circle(CvArr img, int center_x, int center_y, int radius, CvScalar color) + public static void Circle(CvArr img, int centerX, int centerY, int radius, CvScalar color) { - Circle(img, new CvPoint(center_x, center_y), radius, color); + Circle(img, new CvPoint(centerX, centerY), radius, color); } #if LANG_JP /// /// 円を描画する /// /// 画像 - /// 円の中心のx座標 - /// 円の中心のy座標 + /// 円の中心のx座標 + /// 円の中心のy座標 /// 円の半径 /// 円の色 /// 線の幅.負の値を指定した場合は塗りつぶされる. @@ -2321,71 +2318,71 @@ public static void Circle(CvArr img, int center_x, int center_y, int radius, CvS /// Draws a circle /// /// Image where the circle is drawn. - /// X-coordinate of the center of the circle. - /// Y-coordinate of the center of the circle. + /// X-coordinate of the center of the circle. + /// Y-coordinate of the center of the circle. /// Radius of the circle. /// Circle color. /// Thickness of the circle outline if positive, otherwise indicates that a filled circle has to be drawn. #endif - public static void Circle(CvArr img, int center_x, int center_y, int radius, CvScalar color, int thickness) + public static void Circle(CvArr img, int centerX, int centerY, int radius, CvScalar color, int thickness) { - Circle(img, new CvPoint(center_x, center_y), radius, color, thickness); + Circle(img, new CvPoint(centerX, centerY), radius, color, thickness); } #if LANG_JP /// /// 円を描画する /// /// 画像 - /// 円の中心のx座標 - /// 円の中心のy座標 + /// 円の中心のx座標 + /// 円の中心のy座標 /// 円の半径 /// 円の色 /// 線の幅.負の値を指定した場合は塗りつぶされる. - /// 線の種類 + /// 線の種類 #else /// /// Draws a circle /// /// Image where the circle is drawn. - /// X-coordinate of the center of the circle. - /// Y-coordinate of the center of the circle. + /// X-coordinate of the center of the circle. + /// Y-coordinate of the center of the circle. /// Radius of the circle. /// Circle color. /// Thickness of the circle outline if positive, otherwise indicates that a filled circle has to be drawn. - /// Type of the circle boundary. + /// Type of the circle boundary. #endif - public static void Circle(CvArr img, int center_x, int center_y, int radius, CvScalar color, int thickness, LineType line_type) + public static void Circle(CvArr img, int centerX, int centerY, int radius, CvScalar color, int thickness, LineType lineType) { - Circle(img, new CvPoint(center_x, center_y), radius, color, thickness, line_type); + Circle(img, new CvPoint(centerX, centerY), radius, color, thickness, lineType); } #if LANG_JP /// /// 円を描画する /// /// 画像 - /// 円の中心のx座標 - /// 円の中心のy座標 + /// 円の中心のx座標 + /// 円の中心のy座標 /// 円の半径 /// 円の色 /// 線の幅.負の値を指定した場合は塗りつぶされる. - /// 線の種類 + /// 線の種類 /// 中心座標と半径の小数点以下の桁を表すビット数. #else /// /// Draws a circle /// /// Image where the circle is drawn. - /// X-coordinate of the center of the circle. - /// Y-coordinate of the center of the circle. + /// X-coordinate of the center of the circle. + /// Y-coordinate of the center of the circle. /// Radius of the circle. /// Circle color. /// Thickness of the circle outline if positive, otherwise indicates that a filled circle has to be drawn. - /// Type of the circle boundary. + /// Type of the circle boundary. /// Number of fractional bits in the center coordinates and radius value. #endif - public static void Circle(CvArr img, int center_x, int center_y, int radius, CvScalar color, int thickness, LineType line_type, int shift) + public static void Circle(CvArr img, int centerX, int centerY, int radius, CvScalar color, int thickness, LineType lineType, int shift) { - Circle(img, new CvPoint(center_x, center_y), radius, color, thickness, line_type, shift); + Circle(img, new CvPoint(centerX, centerY), radius, color, thickness, lineType, shift); } #if LANG_JP @@ -2441,7 +2438,7 @@ public static void Circle(CvArr img, CvPoint center, int radius, CvScalar color, /// 円の半径 /// 円の色 /// 線の幅.負の値を指定した場合は塗りつぶされる. - /// 線の種類 + /// 線の種類 #else /// /// Draws a circle @@ -2451,11 +2448,11 @@ public static void Circle(CvArr img, CvPoint center, int radius, CvScalar color, /// Radius of the circle. /// Circle color. /// Thickness of the circle outline if positive, otherwise indicates that a filled circle has to be drawn. - /// Type of the circle boundary. + /// Type of the circle boundary. #endif - public static void Circle(CvArr img, CvPoint center, int radius, CvScalar color, int thickness, LineType line_type) + public static void Circle(CvArr img, CvPoint center, int radius, CvScalar color, int thickness, LineType lineType) { - Circle(img, center, radius, color, thickness, line_type, 0); + Circle(img, center, radius, color, thickness, lineType, 0); } #if LANG_JP /// @@ -2466,7 +2463,7 @@ public static void Circle(CvArr img, CvPoint center, int radius, CvScalar color, /// 円の半径 /// 円の色 /// 線の幅.負の値を指定した場合は塗りつぶされる. - /// 線の種類 + /// 線の種類 /// 中心座標と半径の小数点以下の桁を表すビット数. #else /// @@ -2477,24 +2474,24 @@ public static void Circle(CvArr img, CvPoint center, int radius, CvScalar color, /// Radius of the circle. /// Circle color. /// Thickness of the circle outline if positive, otherwise indicates that a filled circle has to be drawn. - /// Type of the circle boundary. + /// Type of the circle boundary. /// Number of fractional bits in the center coordinates and radius value. #endif - public static void Circle(CvArr img, CvPoint center, int radius, CvScalar color, int thickness, LineType line_type, int shift) + public static void Circle(CvArr img, CvPoint center, int radius, CvScalar color, int thickness, LineType lineType, int shift) { if (img == null) { throw new ArgumentNullException("img"); } - NativeMethods.cvCircle(img.CvPtr, center, radius, color, thickness, line_type, shift); + NativeMethods.cvCircle(img.CvPtr, center, radius, color, thickness, lineType, shift); } #if LANG_JP /// /// 円を描画する /// /// 画像 - /// 円の中心のx座標 - /// 円の中心のy座標 + /// 円の中心のx座標 + /// 円の中心のy座標 /// 円の半径 /// 円の色 #else @@ -2502,22 +2499,22 @@ public static void Circle(CvArr img, CvPoint center, int radius, CvScalar color, /// Draws a circle /// /// Image where the circle is drawn. - /// X-coordinate of the center of the circle. - /// Y-coordinate of the center of the circle. + /// X-coordinate of the center of the circle. + /// Y-coordinate of the center of the circle. /// Radius of the circle. /// Circle color. #endif - public static void DrawCircle(CvArr img, int center_x, int center_y, int radius, CvScalar color) + public static void DrawCircle(CvArr img, int centerX, int centerY, int radius, CvScalar color) { - Circle(img, new CvPoint(center_x, center_y), radius, color); + Circle(img, new CvPoint(centerX, centerY), radius, color); } #if LANG_JP /// /// 円を描画する /// /// 画像 - /// 円の中心のx座標 - /// 円の中心のy座標 + /// 円の中心のx座標 + /// 円の中心のy座標 /// 円の半径 /// 円の色 /// 線の幅.負の値を指定した場合は塗りつぶされる. @@ -2526,71 +2523,71 @@ public static void DrawCircle(CvArr img, int center_x, int center_y, int radius, /// Draws a circle /// /// Image where the circle is drawn. - /// X-coordinate of the center of the circle. - /// Y-coordinate of the center of the circle. + /// X-coordinate of the center of the circle. + /// Y-coordinate of the center of the circle. /// Radius of the circle. /// Circle color. /// Thickness of the circle outline if positive, otherwise indicates that a filled circle has to be drawn. #endif - public static void DrawCircle(CvArr img, int center_x, int center_y, int radius, CvScalar color, int thickness) + public static void DrawCircle(CvArr img, int centerX, int centerY, int radius, CvScalar color, int thickness) { - Circle(img, new CvPoint(center_x, center_y), radius, color, thickness); + Circle(img, new CvPoint(centerX, centerY), radius, color, thickness); } #if LANG_JP /// /// 円を描画する /// /// 画像 - /// 円の中心のx座標 - /// 円の中心のy座標 + /// 円の中心のx座標 + /// 円の中心のy座標 /// 円の半径 /// 円の色 /// 線の幅.負の値を指定した場合は塗りつぶされる. - /// 線の種類 + /// 線の種類 #else /// /// Draws a circle /// /// Image where the circle is drawn. - /// X-coordinate of the center of the circle. - /// Y-coordinate of the center of the circle. + /// X-coordinate of the center of the circle. + /// Y-coordinate of the center of the circle. /// Radius of the circle. /// Circle color. /// Thickness of the circle outline if positive, otherwise indicates that a filled circle has to be drawn. - /// Type of the circle boundary. + /// Type of the circle boundary. #endif - public static void DrawCircle(CvArr img, int center_x, int center_y, int radius, CvScalar color, int thickness, LineType line_type) + public static void DrawCircle(CvArr img, int centerX, int centerY, int radius, CvScalar color, int thickness, LineType lineType) { - Circle(img, new CvPoint(center_x, center_y), radius, color, thickness, line_type); + Circle(img, new CvPoint(centerX, centerY), radius, color, thickness, lineType); } #if LANG_JP /// /// 円を描画する /// /// 画像 - /// 円の中心のx座標 - /// 円の中心のy座標 + /// 円の中心のx座標 + /// 円の中心のy座標 /// 円の半径 /// 円の色 /// 線の幅.負の値を指定した場合は塗りつぶされる. - /// 線の種類 + /// 線の種類 /// 中心座標と半径の小数点以下の桁を表すビット数. #else /// /// Draws a circle /// /// Image where the circle is drawn. - /// X-coordinate of the center of the circle. - /// Y-coordinate of the center of the circle. + /// X-coordinate of the center of the circle. + /// Y-coordinate of the center of the circle. /// Radius of the circle. /// Circle color. /// Thickness of the circle outline if positive, otherwise indicates that a filled circle has to be drawn. - /// Type of the circle boundary. + /// Type of the circle boundary. /// Number of fractional bits in the center coordinates and radius value. #endif - public static void DrawCircle(CvArr img, int center_x, int center_y, int radius, CvScalar color, int thickness, LineType line_type, int shift) + public static void DrawCircle(CvArr img, int centerX, int centerY, int radius, CvScalar color, int thickness, LineType lineType, int shift) { - Circle(img, new CvPoint(center_x, center_y), radius, color, thickness, line_type, shift); + Circle(img, new CvPoint(centerX, centerY), radius, color, thickness, lineType, shift); } #if LANG_JP @@ -2646,7 +2643,7 @@ public static void DrawCircle(CvArr img, CvPoint center, int radius, CvScalar co /// 円の半径 /// 円の色 /// 線の幅.負の値を指定した場合は塗りつぶされる. - /// 線の種類 + /// 線の種類 #else /// /// Draws a circle @@ -2656,11 +2653,11 @@ public static void DrawCircle(CvArr img, CvPoint center, int radius, CvScalar co /// Radius of the circle. /// Circle color. /// Thickness of the circle outline if positive, otherwise indicates that a filled circle has to be drawn. - /// Type of the circle boundary. + /// Type of the circle boundary. #endif - public static void DrawCircle(CvArr img, CvPoint center, int radius, CvScalar color, int thickness, LineType line_type) + public static void DrawCircle(CvArr img, CvPoint center, int radius, CvScalar color, int thickness, LineType lineType) { - Circle(img, center, radius, color, thickness, line_type, 0); + Circle(img, center, radius, color, thickness, lineType, 0); } #if LANG_JP /// @@ -2671,7 +2668,7 @@ public static void DrawCircle(CvArr img, CvPoint center, int radius, CvScalar co /// 円の半径 /// 円の色 /// 線の幅.負の値を指定した場合は塗りつぶされる. - /// 線の種類 + /// 線の種類 /// 中心座標と半径の小数点以下の桁を表すビット数. #else /// @@ -2682,12 +2679,12 @@ public static void DrawCircle(CvArr img, CvPoint center, int radius, CvScalar co /// Radius of the circle. /// Circle color. /// Thickness of the circle outline if positive, otherwise indicates that a filled circle has to be drawn. - /// Type of the circle boundary. + /// Type of the circle boundary. /// Number of fractional bits in the center coordinates and radius value. #endif - public static void DrawCircle(CvArr img, CvPoint center, int radius, CvScalar color, int thickness, LineType line_type, int shift) + public static void DrawCircle(CvArr img, CvPoint center, int radius, CvScalar color, int thickness, LineType lineType, int shift) { - Circle(img, center, radius, color, thickness, line_type, shift); + Circle(img, center, radius, color, thickness, lineType, shift); } #endregion #region ClearGraph @@ -3291,6 +3288,7 @@ public static double CompareHist(CvHistogram hist1, CvHistogram hist2, Histogram } #endregion #region ComposeRT +// ReSharper disable InconsistentNaming #if LANG_JP /// /// Computes r3 = rodrigues(rodrigues(r2)*rodrigues(r1)), @@ -3355,6 +3353,7 @@ public static void ComposeRT(CvMat rvec1, CvMat tvec1, CvMat rvec2, CvMat tvec2, NativeMethods.cvComposeRT(rvec1.CvPtr, tvec1.CvPtr, rvec2.CvPtr, tvec2.CvPtr, rvec3Ptr, tvec3Ptr, dr3dr1Ptr, dr3dt1Ptr, dr3dr2Ptr, dr3dt2Ptr, dt3dr1Ptr, dt3dt1Ptr, dt3dr2Ptr, dt3dt2Ptr); } +// ReSharper restore InconsistentNaming #endregion #region ComputeCorrespondEpilines #if LANG_JP @@ -3362,27 +3361,27 @@ public static void ComposeRT(CvMat rvec1, CvMat tvec1, CvMat rvec2, CvMat tvec2, /// 2枚の画像間の点対応から基礎行列(F行列)を計算する /// /// 入力点で大きさは2xN, Nx2, 3xN,また はNx3の配列である (ここで N は 点の数). マルチチャンネルの 1xN,または Nx1 の配列も使用可能. - /// pointsを含む画像のインデックス(1 または 2). - /// 基礎行列 - /// 計算されたエピポーラ線.大きさは3xN また Nx3 の配列. + /// pointsを含む画像のインデックス(1 または 2). + /// 基礎行列 + /// 計算されたエピポーラ線.大きさは3xN また Nx3 の配列. #else /// /// For points in one image of stereo pair computes the corresponding epilines in the other image /// /// The input points. 2xN, Nx2, 3xN or Nx3 array (where N number of points). Multi-channel 1xN or Nx1 array is also acceptable. - /// Index of the image (1 or 2) that contains the points - /// Fundamental matrix - /// Computed epilines, 3xN or Nx3 array + /// Index of the image (1 or 2) that contains the points + /// Fundamental matrix + /// Computed epilines, 3xN or Nx3 array #endif - public static void ComputeCorrespondEpilines(CvMat points, int which_image, CvMat fundamental_matrix, out CvMat correspondent_lines) + public static void ComputeCorrespondEpilines(CvMat points, int whichImage, CvMat fundamentalMatrix, out CvMat correspondentLines) { if (points == null) throw new ArgumentNullException("points"); - if (fundamental_matrix == null) - throw new ArgumentNullException("fundamental_matrix"); + if (fundamentalMatrix == null) + throw new ArgumentNullException("fundamentalMatrix"); int size = Math.Max(points.Rows, points.Cols); - correspondent_lines = new CvMat(3, size, MatrixType.F32C1); - NativeMethods.cvComputeCorrespondEpilines(points.CvPtr, which_image, fundamental_matrix.CvPtr, correspondent_lines.CvPtr); + correspondentLines = new CvMat(3, size, MatrixType.F32C1); + NativeMethods.cvComputeCorrespondEpilines(points.CvPtr, whichImage, fundamentalMatrix.CvPtr, correspondentLines.CvPtr); } #endregion #region ContourArea @@ -4182,8 +4181,8 @@ public static CvSeq ConvexityDefects(CvArr contour, CvArr con throw new ArgumentNullException("contour"); if (convexhull == null) throw new ArgumentNullException("convexhull"); - IntPtr storage_ptr = (storage == null) ? IntPtr.Zero : storage.CvPtr; - return new CvSeq(NativeMethods.cvConvexityDefects(contour.CvPtr, convexhull.CvPtr, storage_ptr)); + IntPtr storagePtr = ToPtr(storage); + return new CvSeq(NativeMethods.cvConvexityDefects(contour.CvPtr, convexhull.CvPtr, storagePtr)); } #if LANG_JP @@ -4354,18 +4353,18 @@ public static void CopyMakeBorder(CvArr src, CvArr dst, CvPoint offset, BorderTy /// /// 入力画像 /// 結果保存用の画像.入力画像の6倍のサイズが必要. - /// 隣接ブロックのサイズ + /// 隣接ブロックのサイズ #else /// /// Calculates eigenvalues and eigenvectors of image blocks for corner detection /// /// Input image. /// Image to store the results. It must be 6 times wider than the input image. - /// Neighborhood size. + /// Neighborhood size. #endif - public static void CornerEigenValsAndVecs(CvArr image, CvArr eigenvv, int block_size) + public static void CornerEigenValsAndVecs(CvArr image, CvArr eigenvv, int blockSize) { - CornerEigenValsAndVecs(image, eigenvv, block_size, ApertureSize.Size3); + CornerEigenValsAndVecs(image, eigenvv, blockSize, ApertureSize.Size3); } #if LANG_JP /// @@ -4373,24 +4372,24 @@ public static void CornerEigenValsAndVecs(CvArr image, CvArr eigenvv, int block_ /// /// 入力画像 /// 結果保存用の画像.入力画像の6倍のサイズが必要. - /// 隣接ブロックのサイズ - /// Sobel演算子のアパーチャサイズ(cvSobel参照). + /// 隣接ブロックのサイズ + /// Sobel演算子のアパーチャサイズ(cvSobel参照). #else /// /// Calculates eigenvalues and eigenvectors of image blocks for corner detection /// /// Input image. /// Image to store the results. It must be 6 times wider than the input image. - /// Neighborhood size. - /// Aperture parameter for Sobel operator + /// Neighborhood size. + /// Aperture parameter for Sobel operator #endif - public static void CornerEigenValsAndVecs(CvArr image, CvArr eigenvv, int block_size, ApertureSize aperture_size) + public static void CornerEigenValsAndVecs(CvArr image, CvArr eigenvv, int blockSize, ApertureSize apertureSize) { if (image == null) throw new ArgumentNullException("image"); if (eigenvv == null) throw new ArgumentNullException("eigenvv"); - NativeMethods.cvCornerEigenValsAndVecs(image.CvPtr, eigenvv.CvPtr, block_size, aperture_size); + NativeMethods.cvCornerEigenValsAndVecs(image.CvPtr, eigenvv.CvPtr, blockSize, apertureSize); } #endregion #region CornerHarris @@ -4403,8 +4402,8 @@ public static void CornerEigenValsAndVecs(CvArr image, CvArr eigenvv, int block_ /// を計算し,検出結果として出力画像に保存する.結果画像の極大値を求めることで,画像のコーナーを検出することができる. /// /// 入力画像 - /// 検出結果を保存する画像.入力画像 image と同じサイズでなくてはならない. - /// 隣接ブロックのサイズ + /// 検出結果を保存する画像.入力画像 image と同じサイズでなくてはならない. + /// 隣接ブロックのサイズ #else /// /// Runs the Harris edge detector on image. @@ -4412,12 +4411,12 @@ public static void CornerEigenValsAndVecs(CvArr image, CvArr eigenvv, int block_ /// for each pixel it calculates 2x2 gradient covariation matrix M over block_size×block_size neighborhood. /// /// Input image. - /// Image to store the Harris detector responces. Should have the same size as image. - /// Neighborhood size. + /// Image to store the Harris detector responces. Should have the same size as image. + /// Neighborhood size. #endif - public static void CornerHarris(CvArr image, CvArr harris_responce, int block_size) + public static void CornerHarris(CvArr image, CvArr harrisResponce, int blockSize) { - CornerHarris(image, harris_responce, block_size, ApertureSize.Size3, 0.04); + CornerHarris(image, harrisResponce, blockSize, ApertureSize.Size3, 0.04); } #if LANG_JP /// @@ -4428,9 +4427,9 @@ public static void CornerHarris(CvArr image, CvArr harris_responce, int block_si /// を計算し,検出結果として出力画像に保存する.結果画像の極大値を求めることで,画像のコーナーを検出することができる. /// /// 入力画像 - /// 検出結果を保存する画像.入力画像 image と同じサイズでなくてはならない. - /// 隣接ブロックのサイズ - /// Sobel演算子のアパーチャサイズ(cvSobel参照).入力画像が浮動小数点型である場合,このパラメータは差分を計算するために用いられる固定小数点型フィルタの数を表す + /// 検出結果を保存する画像.入力画像 image と同じサイズでなくてはならない. + /// 隣接ブロックのサイズ + /// Sobel演算子のアパーチャサイズ(cvSobel参照).入力画像が浮動小数点型である場合,このパラメータは差分を計算するために用いられる固定小数点型フィルタの数を表す #else /// /// Runs the Harris edge detector on image. @@ -4438,13 +4437,13 @@ public static void CornerHarris(CvArr image, CvArr harris_responce, int block_si /// for each pixel it calculates 2x2 gradient covariation matrix M over block_size×block_size neighborhood. /// /// Input image. - /// Image to store the Harris detector responces. Should have the same size as image. - /// Neighborhood size. - /// Aperture parameter for Sobel operator (see cvSobel). format. In the case of floating-point input format this parameter is the number of the fixed float filter used for differencing. + /// Image to store the Harris detector responces. Should have the same size as image. + /// Neighborhood size. + /// Aperture parameter for Sobel operator (see cvSobel). format. In the case of floating-point input format this parameter is the number of the fixed float filter used for differencing. #endif - public static void CornerHarris(CvArr image, CvArr harris_responce, int block_size, ApertureSize aperture_size) + public static void CornerHarris(CvArr image, CvArr harrisResponce, int blockSize, ApertureSize apertureSize) { - CornerHarris(image, harris_responce, block_size, aperture_size, 0.04); + CornerHarris(image, harrisResponce, blockSize, apertureSize, 0.04); } #if LANG_JP /// @@ -4455,9 +4454,9 @@ public static void CornerHarris(CvArr image, CvArr harris_responce, int block_si /// を計算し,検出結果として出力画像に保存する.結果画像の極大値を求めることで,画像のコーナーを検出することができる. /// /// 入力画像 - /// 検出結果を保存する画像.入力画像 image と同じサイズでなくてはならない. - /// 隣接ブロックのサイズ - /// Sobel演算子のアパーチャサイズ(cvSobel参照).入力画像が浮動小数点型である場合,このパラメータは差分を計算するために用いられる固定小数点型フィルタの数を表す + /// 検出結果を保存する画像.入力画像 image と同じサイズでなくてはならない. + /// 隣接ブロックのサイズ + /// Sobel演算子のアパーチャサイズ(cvSobel参照).入力画像が浮動小数点型である場合,このパラメータは差分を計算するために用いられる固定小数点型フィルタの数を表す /// Harris検出器のパラメータ #else /// @@ -4466,18 +4465,18 @@ public static void CornerHarris(CvArr image, CvArr harris_responce, int block_si /// for each pixel it calculates 2x2 gradient covariation matrix M over block_size×block_size neighborhood. /// /// Input image. - /// Image to store the Harris detector responces. Should have the same size as image. - /// Neighborhood size. - /// Aperture parameter for Sobel operator (see cvSobel). format. In the case of floating-point input format this parameter is the number of the fixed float filter used for differencing. + /// Image to store the Harris detector responces. Should have the same size as image. + /// Neighborhood size. + /// Aperture parameter for Sobel operator (see cvSobel). format. In the case of floating-point input format this parameter is the number of the fixed float filter used for differencing. /// Harris detector free parameter. #endif - public static void CornerHarris(CvArr image, CvArr harris_responce, int block_size, ApertureSize aperture_size, double k) + public static void CornerHarris(CvArr image, CvArr harrisResponce, int blockSize, ApertureSize apertureSize, double k) { if (image == null) throw new ArgumentNullException("image"); - if (harris_responce == null) - throw new ArgumentNullException("harris_responce"); - NativeMethods.cvCornerHarris(image.CvPtr, harris_responce.CvPtr, block_size, aperture_size, k); + if (harrisResponce == null) + throw new ArgumentNullException("harrisResponce"); + NativeMethods.cvCornerHarris(image.CvPtr, harrisResponce.CvPtr, blockSize, apertureSize, k); } #endregion #region CornerMinEigenVal @@ -4488,18 +4487,18 @@ public static void CornerHarris(CvArr image, CvArr harris_responce, int block_si /// /// 入力画像 /// 最小固有値を保存する画像.image と同じサイズでなくてはならない. - /// 隣接ブロックのサイズ + /// 隣接ブロックのサイズ #else /// /// Calculates minimal eigenvalue of gradient matrices for corner detection /// /// Input image. /// Image to store the minimal eigen values. Should have the same size as image - /// Neighborhood size. + /// Neighborhood size. #endif - public static void CornerMinEigenVal(CvArr image, CvArr eigenval, int block_size) + public static void CornerMinEigenVal(CvArr image, CvArr eigenval, int blockSize) { - CornerMinEigenVal(image, eigenval, block_size, ApertureSize.Size3); + CornerMinEigenVal(image, eigenval, blockSize, ApertureSize.Size3); } #if LANG_JP /// @@ -4508,24 +4507,24 @@ public static void CornerMinEigenVal(CvArr image, CvArr eigenval, int block_size /// /// 入力画像 /// 最小固有値を保存する画像.image と同じサイズでなくてはならない. - /// 隣接ブロックのサイズ - /// Sobel演算子のアパーチャサイズ(cvSobel参照).入力画像が浮動小数点型である場合,このパラメータは差分を計算するために用いられる固定小数点型フィルタの数を表す + /// 隣接ブロックのサイズ + /// Sobel演算子のアパーチャサイズ(cvSobel参照).入力画像が浮動小数点型である場合,このパラメータは差分を計算するために用いられる固定小数点型フィルタの数を表す #else /// /// Calculates minimal eigenvalue of gradient matrices for corner detection /// /// Input image. /// Image to store the minimal eigen values. Should have the same size as image - /// Neighborhood size. - /// Aperture parameter for Sobel operator (see cvSobel). format. In the case of floating-point input format this parameter is the number of the fixed float filter used for differencing. + /// Neighborhood size. + /// Aperture parameter for Sobel operator (see cvSobel). format. In the case of floating-point input format this parameter is the number of the fixed float filter used for differencing. #endif - public static void CornerMinEigenVal(CvArr image, CvArr eigenval, int block_size, ApertureSize aperture_size) + public static void CornerMinEigenVal(CvArr image, CvArr eigenval, int blockSize, ApertureSize apertureSize) { if (image == null) throw new ArgumentNullException("image"); if (eigenval == null) throw new ArgumentNullException("eigenval"); - NativeMethods.cvCornerMinEigenVal(image.CvPtr, eigenval.CvPtr, block_size, aperture_size); + NativeMethods.cvCornerMinEigenVal(image.CvPtr, eigenval.CvPtr, blockSize, apertureSize); } #endregion #region CorrectMatches @@ -4533,34 +4532,34 @@ public static void CornerMinEigenVal(CvArr image, CvArr eigenval, int block_size /// /// The Optimal Triangulation Method /// - /// 3x3 fundamental matrix + /// 3x3 fundamental matrix /// 2xN matrix containing the first set of points /// 2xN matrix containing the second set of points - /// the optimized points1_. if this is null, the corrected points are placed back in points1_ - /// the optimized points2_. if this is null, the corrected points are placed back in points2_ + /// the optimized points1_. if this is null, the corrected points are placed back in points1_ + /// the optimized points2_. if this is null, the corrected points are placed back in points2_ #else /// /// The Optimal Triangulation Method /// - /// 3x3 fundamental matrix + /// 3x3 fundamental matrix /// 2xN matrix containing the first set of points /// 2xN matrix containing the second set of points - /// the optimized points1_. if this is null, the corrected points are placed back in points1_ - /// the optimized points2_. if this is null, the corrected points are placed back in points2_ + /// the optimized points1_. if this is null, the corrected points are placed back in points1_ + /// the optimized points2_. if this is null, the corrected points are placed back in points2_ #endif - public static void CorrectMatches(CvMat F, CvMat points1, CvMat points2, CvMat new_points1, CvMat new_points2) + public static void CorrectMatches(CvMat f, CvMat points1, CvMat points2, CvMat newPoints1, CvMat newPoints2) { - if (F == null) - throw new ArgumentNullException("F"); + if (f == null) + throw new ArgumentNullException("f"); if (points1 == null) throw new ArgumentNullException("points1"); if (points2 == null) throw new ArgumentNullException("points2"); - IntPtr new_points1_ptr = (new_points1 == null) ? IntPtr.Zero : new_points1.CvPtr; - IntPtr new_points2_ptr = (new_points2 == null) ? IntPtr.Zero : new_points2.CvPtr; + IntPtr newPoints1Ptr = ToPtr(newPoints1); + IntPtr newPoints2Ptr = ToPtr(newPoints2); - NativeMethods.cvCorrectMatches(F.CvPtr, points1.CvPtr, points2.CvPtr, new_points1_ptr, new_points2_ptr); + NativeMethods.cvCorrectMatches(f.CvPtr, points1.CvPtr, points2.CvPtr, newPoints1Ptr, newPoints2Ptr); } #endregion #region CountNonZero @@ -4683,7 +4682,7 @@ public static int CreateButton(string name, CvButtonCallback callback, object us /// ボタンの名前. (これが null の場合,”button <number of boutton>” という名前になります) /// ボタン状態が変更される度に呼び出されるデりゲート /// コールバック関数に渡されるオブジェクト - /// ボタンの種類 + /// ボタンの種類 #else /// /// Create a button on the control panel @@ -4691,11 +4690,11 @@ public static int CreateButton(string name, CvButtonCallback callback, object us /// Name of the button ( if null, the name will be “button <number of boutton>”) /// Pointer to the function to be called every time the button changed its state. /// object passed to the callback function. - /// button type + /// button type #endif - public static int CreateButton(string name, CvButtonCallback callback, object userdata, ButtonType button_type) + public static int CreateButton(string name, CvButtonCallback callback, object userdata, ButtonType buttonType) { - CvButton button = new CvButton(name, callback, userdata, button_type); + CvButton button = new CvButton(name, callback, userdata, buttonType); return button.Result; } #if LANG_JP @@ -4705,8 +4704,8 @@ public static int CreateButton(string name, CvButtonCallback callback, object us /// ボタンの名前. (これが null の場合,”button <number of boutton>” という名前になります) /// ボタン状態が変更される度に呼び出されるデりゲート /// コールバック関数に渡されるオブジェクト - /// ボタンの種類 - /// ボタンのデフォルトの状態.チェックボックスとラジオボックスの場合,これは 0 または 1 になります. + /// ボタンの種類 + /// ボタンのデフォルトの状態.チェックボックスとラジオボックスの場合,これは 0 または 1 になります. #else /// /// Create a button on the control panel @@ -4714,12 +4713,12 @@ public static int CreateButton(string name, CvButtonCallback callback, object us /// Name of the button ( if null, the name will be “button <number of boutton>”) /// Pointer to the function to be called every time the button changed its state. /// object passed to the callback function. - /// button type - /// Default state of the button. Use for checkbox and radiobox, its value could be 0 or 1. + /// button type + /// Default state of the button. Use for checkbox and radiobox, its value could be 0 or 1. #endif - public static int CreateButton(string name, CvButtonCallback callback, object userdata, ButtonType button_type, int initial_button_state) + public static int CreateButton(string name, CvButtonCallback callback, object userdata, ButtonType buttonType, int initialButtonState) { - CvButton button = new CvButton(name, callback, userdata, button_type, initial_button_state); + CvButton button = new CvButton(name, callback, userdata, buttonType, initialButtonState); return button.Result; } #endregion @@ -4990,53 +4989,53 @@ public static CvHistogram CreateHist(int[] sizes, HistogramFormat type, float[][ /// /// 空のグラフを生成する /// - /// 生成したグラフのタイプ.無向グラフの場合,CV_SEQ_KIND_GRAPH,有向グラフの場合,CV_SEQ_KIND_GRAPH | CV_GRAPH_FLAG_ORIENTED. - /// グラフのヘッダサイズ (sizeof(CvGraph)以上) - /// グラフの頂点サイズ + /// 生成したグラフのタイプ.無向グラフの場合,CV_SEQ_KIND_GRAPH,有向グラフの場合,CV_SEQ_KIND_GRAPH | CV_GRAPH_FLAG_ORIENTED. + /// グラフのヘッダサイズ (sizeof(CvGraph)以上) + /// グラフの頂点サイズ /// グラフの辺サイズ /// #else /// /// Creates empty graph /// - /// Type of the created graph. Usually, it is either CV_SEQ_KIND_GRAPH for generic unoriented graphs and CV_SEQ_KIND_GRAPH | CV_GRAPH_FLAG_ORIENTED for generic oriented graphs. - /// Graph vertex size; the custom vertex structure must start with CvGraphVtx (use CV_GRAPH_VERTEX_FIELDS()) - /// Graph edge size; the custom edge structure must start with CvGraphEdge (use CV_GRAPH_EDGE_FIELDS()) + /// Type of the created graph. Usually, it is either CV_SEQ_KIND_GRAPH for generic unoriented graphs and CV_SEQ_KIND_GRAPH | CV_GRAPH_FLAG_ORIENTED for generic oriented graphs. + /// Graph vertex size; the custom vertex structure must start with CvGraphVtx (use CV_GRAPH_VERTEX_FIELDS()) + /// Graph edge size; the custom edge structure must start with CvGraphEdge (use CV_GRAPH_EDGE_FIELDS()) /// The graph container. /// The function cvCreateGraph creates an empty graph and returns it. #endif - public static CvGraph CreateGraph(SeqType graph_flags, int vtx_size, int edge_size, CvMemStorage storage) + public static CvGraph CreateGraph(SeqType graphFlags, int vtxSize, int edgeSize, CvMemStorage storage) { - return CreateGraph(graph_flags, vtx_size, edge_size, storage, CvGraph.SizeOf); + return CreateGraph(graphFlags, vtxSize, edgeSize, storage, CvGraph.SizeOf); } #if LANG_JP /// /// 空のグラフを生成する /// - /// 生成したグラフのタイプ.無向グラフの場合,CV_SEQ_KIND_GRAPH,有向グラフの場合,CV_SEQ_KIND_GRAPH | CV_GRAPH_FLAG_ORIENTED. - /// グラフのヘッダサイズ (sizeof(CvGraph)以上) - /// グラフの頂点サイズ - /// グラフの辺サイズ + /// 生成したグラフのタイプ.無向グラフの場合,CV_SEQ_KIND_GRAPH,有向グラフの場合,CV_SEQ_KIND_GRAPH | CV_GRAPH_FLAG_ORIENTED. + /// グラフのヘッダサイズ (sizeof(CvGraph)以上) + /// グラフの頂点サイズ + /// グラフの辺サイズ /// グラフコンテナ /// #else /// /// Creates empty graph /// - /// Type of the created graph. Usually, it is either CV_SEQ_KIND_GRAPH for generic unoriented graphs and CV_SEQ_KIND_GRAPH | CV_GRAPH_FLAG_ORIENTED for generic oriented graphs. - /// Graph header size; may not be less than sizeof(CvGraph). - /// Graph vertex size; the custom vertex structure must start with CvGraphVtx (use CV_GRAPH_VERTEX_FIELDS()) - /// Graph edge size; the custom edge structure must start with CvGraphEdge (use CV_GRAPH_EDGE_FIELDS()) + /// Type of the created graph. Usually, it is either CV_SEQ_KIND_GRAPH for generic unoriented graphs and CV_SEQ_KIND_GRAPH | CV_GRAPH_FLAG_ORIENTED for generic oriented graphs. + /// Graph header size; may not be less than sizeof(CvGraph). + /// Graph vertex size; the custom vertex structure must start with CvGraphVtx (use CV_GRAPH_VERTEX_FIELDS()) + /// Graph edge size; the custom edge structure must start with CvGraphEdge (use CV_GRAPH_EDGE_FIELDS()) /// The graph container. /// The function cvCreateGraph creates an empty graph and returns it. #endif - public static CvGraph CreateGraph(SeqType graph_flags, int vtx_size, int edge_size, CvMemStorage storage, int header_size) + public static CvGraph CreateGraph(SeqType graphFlags, int vtxSize, int edgeSize, CvMemStorage storage, int headerSize) { if (storage == null) { throw new ArgumentNullException("storage"); } - IntPtr result = NativeMethods.cvCreateGraph(graph_flags, header_size, vtx_size, edge_size, storage.CvPtr); + IntPtr result = NativeMethods.cvCreateGraph(graphFlags, headerSize, vtxSize, edgeSize, storage.CvPtr); if (result == IntPtr.Zero) return null; return new CvGraph(result); @@ -5164,42 +5163,42 @@ public static IplImage CreateImageHeader(CvSize size, BitDepth depth, int channe /// /// カルマンフィルタ構造体の領域確保を行う. /// - /// 状態ベクトルの次元数 - /// 観測ベクトルの次元 + /// 状態ベクトルの次元数 + /// 観測ベクトルの次元 /// #else /// /// Allocates Kalman filter structure /// - /// dimensionality of the state vector - /// dimensionality of the measurement vector + /// dimensionality of the state vector + /// dimensionality of the measurement vector /// Kalman structure #endif - public static CvKalman CreateKalman(int dynam_params, int measure_params) + public static CvKalman CreateKalman(int dynamParams, int measureParams) { - return new CvKalman(dynam_params, measure_params); + return new CvKalman(dynamParams, measureParams); } #if LANG_JP /// /// カルマンフィルタ構造体の領域確保を行う. /// - /// 状態ベクトルの次元数 - /// 観測ベクトルの次元 - /// コントロールベクトルの次元 + /// 状態ベクトルの次元数 + /// 観測ベクトルの次元 + /// コントロールベクトルの次元 /// #else /// /// Allocates Kalman filter structure /// - /// dimensionality of the state vector - /// dimensionality of the measurement vector - /// dimensionality of the control vector + /// dimensionality of the state vector + /// dimensionality of the measurement vector + /// dimensionality of the control vector /// #endif - public static CvKalman CreateKalman(int dynam_params, int measure_params, int control_params) + public static CvKalman CreateKalman(int dynamParams, int measureParams, int controlParams) { - return new CvKalman(dynam_params, measure_params, control_params); + return new CvKalman(dynamParams, measureParams, controlParams); } #endregion #region CreateKDTree diff --git a/src/OpenCvSharp/Src/DisposableObject.cs b/src/OpenCvSharp/Src/DisposableObject.cs index 2b3413cbf..211609faa 100644 --- a/src/OpenCvSharp/Src/DisposableObject.cs +++ b/src/OpenCvSharp/Src/DisposableObject.cs @@ -245,7 +245,7 @@ protected void NotifyMemoryPressure(long size) return; if (size == 0) return; - if (size <= 0) + if (size < 0) throw new ArgumentOutOfRangeException("size"); if (AllocatedMemorySize > 0) diff --git a/src/OpenCvSharp/Src/Enum/ColorConversion.cs b/src/OpenCvSharp/Src/Enum/ColorConversion.cs index b2d6d587e..564ff61be 100644 --- a/src/OpenCvSharp/Src/Enum/ColorConversion.cs +++ b/src/OpenCvSharp/Src/Enum/ColorConversion.cs @@ -119,7 +119,7 @@ public enum ColorConversion : int // BayerBgToGray = CvConst.COLOR_BayerBG2GRAY, - ayerGbToGray = CvConst.COLOR_BayerGB2GRAY, + BayerGbToGray = CvConst.COLOR_BayerGB2GRAY, BayerRGToGray = CvConst.COLOR_BayerRG2GRAY, BayerGRToGray = CvConst.COLOR_BayerGR2GRAY, //YUV 4:2:0 formats family diff --git a/src/OpenCvSharp/Src/Struct/CvRect.cs b/src/OpenCvSharp/Src/Struct/CvRect.cs index a72e40b8a..90e56062c 100644 --- a/src/OpenCvSharp/Src/Struct/CvRect.cs +++ b/src/OpenCvSharp/Src/Struct/CvRect.cs @@ -182,7 +182,7 @@ public bool Equals(CvRect obj) /// 等しければtrue #else /// - /// Compares two CvPoint objects. The result specifies whether the members of each object are equal. + /// Compares two CvRect objects. The result specifies whether the members of each object are equal. /// /// A Point to compare. /// A Point to compare. @@ -201,7 +201,7 @@ public bool Equals(CvRect obj) /// 等しくなければtrue #else /// - /// Compares two CvPoint objects. The result specifies whether the members of each object are unequal. + /// Compares two CvRect objects. The result specifies whether the members of each object are unequal. /// /// A Point to compare. /// A Point to compare. @@ -451,7 +451,7 @@ public CvPoint TopLeft #endif public CvPoint BottomRight { - get { return new CvPoint(X + Width, Y + Height); } + get { return new CvPoint(X + Width - 1, Y + Height - 1); } } #endregion @@ -474,7 +474,7 @@ public CvPoint BottomRight #endif public bool Contains(int x, int y) { - return (X <= x && Y <= y && X + Width > x && Y + Height > y); + return (X <= x && Y <= y && X + Width - 1 > x && Y + Height - 1 > y); } #if LANG_JP /// @@ -508,7 +508,10 @@ public bool Contains(CvPoint pt) #endif public bool Contains(CvRect rect) { - return Contains(rect.TopLeft) && Contains(rect.BottomRight); + return X <= rect.X && + (rect.X + rect.Width) <= (X + Width) && + Y <= rect.Y && + (rect.Y + rect.Height) <= (Y + Height); } #endregion #region Inflate diff --git a/src/OpenCvSharp/Src/Struct/CvTermCriteria.cs b/src/OpenCvSharp/Src/Struct/CvTermCriteria.cs index 68051e991..14acbe7cc 100644 --- a/src/OpenCvSharp/Src/Struct/CvTermCriteria.cs +++ b/src/OpenCvSharp/Src/Struct/CvTermCriteria.cs @@ -60,15 +60,15 @@ public struct CvTermCriteria /// /// 反復回数による終了条件を設定して初期化 /// - /// 反復数の最大値 + /// 反復数の最大値 #else /// /// Constructor /// - /// maximum number of iterations + /// maximum number of iterations #endif - public CvTermCriteria(int max_iter) - : this(CriteriaType.Iteration, max_iter, 0) + public CvTermCriteria(int maxIter) + : this(CriteriaType.Iteration, maxIter, 0) { } #if LANG_JP @@ -90,17 +90,17 @@ public CvTermCriteria(double epsilon) /// /// 繰り返し回数と目標精度による終了条件を設定して初期化 /// yy - /// 反復数の最大値 + /// 反復数の最大値 /// 目標精度 #else /// /// Constructor /// - /// maximum number of iterations + /// maximum number of iterations /// accuracy to achieve #endif - public CvTermCriteria(int max_iter, double epsilon) - : this(CriteriaType.Epsilon | CriteriaType.Iteration, max_iter, epsilon) + public CvTermCriteria(int maxIter, double epsilon) + : this(CriteriaType.Epsilon | CriteriaType.Iteration, maxIter, epsilon) { } #if LANG_JP @@ -108,20 +108,20 @@ public CvTermCriteria(int max_iter, double epsilon) /// すべて指定して初期化 /// /// 終了条件 - /// 反復数の最大値 + /// 反復数の最大値 /// 目標精度 #else /// /// Constructor /// /// a combination of CriteriaType flags - /// maximum number of iterations + /// maximum number of iterations /// accuracy to achieve #endif - public CvTermCriteria(CriteriaType type, int max_iter, double epsilon) + public CvTermCriteria(CriteriaType type, int maxIter, double epsilon) { this.Type = type; - this.MaxIter = max_iter; + this.MaxIter = maxIter; this.Epsilon = epsilon; } #endregion @@ -132,21 +132,21 @@ public CvTermCriteria(CriteriaType type, int max_iter, double epsilon) /// /// 終了条件をチェックし,type= Iteration|Epsilon に設定し,反復数の max_iterとeprilon の両方が有効になるように変換する /// - /// - /// + /// + /// /// 変換結果 #else /// /// Check termination criteria and transform it so that type=CriteriaType.Iteration | CriteriaType.Epsilon, /// and both max_iter and epsilon are valid /// - /// Default epsilon - /// Default maximum number of iteration + /// Default epsilon + /// Default maximum number of iteration /// #endif - public CvTermCriteria Check(double default_eps, int default_max_iters) + public CvTermCriteria Check(double defaultEps, int defaultMaxIters) { - return Cv.CheckTermCriteria(this, default_eps, default_max_iters); + return Cv.CheckTermCriteria(this, defaultEps, defaultMaxIters); } #endregion #endregion diff --git a/src/OpenCvSharpExtern/imgproc.h b/src/OpenCvSharpExtern/imgproc.h index 2d6f0c947..5af906286 100644 --- a/src/OpenCvSharpExtern/imgproc.h +++ b/src/OpenCvSharpExtern/imgproc.h @@ -10,7 +10,7 @@ CVAPI(cv::Mat*) imgproc_getGaborKernel(CvSize ksize, double sigma, double theta, double lambd, double gamma, double psi, int ktype) { - cv::Mat ret = cv::getGaborKernel(ksize, sigma, theta, lambd, gamma, ktype); + cv::Mat ret = cv::getGaborKernel(ksize, sigma, theta, lambd, gamma, psi, ktype); return new cv::Mat(ret); }