Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
11f3c074
Commit
11f3c074
authored
Mar 20, 2017
by
berak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imgproc: move ShapeMatchModes enum from c to c++ header
parent
08c6ffaa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
10 deletions
+17
-10
imgproc.hpp
modules/imgproc/include/opencv2/imgproc.hpp
+15
-1
types_c.h
modules/imgproc/include/opencv2/imgproc/types_c.h
+2
-9
No files found.
modules/imgproc/include/opencv2/imgproc.hpp
View file @
11f3c074
...
...
@@ -452,6 +452,20 @@ enum ContourApproximationModes {
CHAIN_APPROX_TC89_KCOS
=
4
};
/** @brief Shape matching methods
\f$A\f$ denotes object1,\f$B\f$ denotes object2
\f$\begin{array}{l} m^A_i = \mathrm{sign} (h^A_i) \cdot \log{h^A_i} \\ m^B_i = \mathrm{sign} (h^B_i) \cdot \log{h^B_i} \end{array}\f$
and \f$h^A_i, h^B_i\f$ are the Hu moments of \f$A\f$ and \f$B\f$ , respectively.
*/
enum
ShapeMatchModes
{
CONTOURS_MATCH_I1
=
1
,
//!< \f[I_1(A,B) = \sum _{i=1...7} \left | \frac{1}{m^A_i} - \frac{1}{m^B_i} \right |\f]
CONTOURS_MATCH_I2
=
2
,
//!< \f[I_2(A,B) = \sum _{i=1...7} \left | m^A_i - m^B_i \right |\f]
CONTOURS_MATCH_I3
=
3
//!< \f[I_3(A,B) = \max _{i=1...7} \frac{ \left| m^A_i - m^B_i \right| }{ \left| m^A_i \right| }\f]
};
//! @} imgproc_shape
//! Variants of a Hough transform
...
...
@@ -3916,7 +3930,7 @@ The function compares two shapes. All three implemented methods use the Hu invar
@param contour1 First contour or grayscale image.
@param contour2 Second contour or grayscale image.
@param method Comparison method, see ::ShapeMatchModes
@param method Comparison method, see
cv
::ShapeMatchModes
@param parameter Method-specific parameter (not supported now).
*/
CV_EXPORTS_W
double
matchShapes
(
InputArray
contour1
,
InputArray
contour2
,
...
...
modules/imgproc/include/opencv2/imgproc/types_c.h
View file @
11f3c074
...
...
@@ -501,15 +501,8 @@ enum
CV_POLY_APPROX_DP
=
0
};
/** @brief Shape matching methods
\f$A\f$ denotes object1,\f$B\f$ denotes object2
\f$\begin{array}{l} m^A_i = \mathrm{sign} (h^A_i) \cdot \log{h^A_i} \\ m^B_i = \mathrm{sign} (h^B_i) \cdot \log{h^B_i} \end{array}\f$
and \f$h^A_i, h^B_i\f$ are the Hu moments of \f$A\f$ and \f$B\f$ , respectively.
*/
enum
ShapeMatchModes
/** Shape matching methods */
enum
{
CV_CONTOURS_MATCH_I1
=
1
,
//!< \f[I_1(A,B) = \sum _{i=1...7} \left | \frac{1}{m^A_i} - \frac{1}{m^B_i} \right |\f]
CV_CONTOURS_MATCH_I2
=
2
,
//!< \f[I_2(A,B) = \sum _{i=1...7} \left | m^A_i - m^B_i \right |\f]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment