/
ShapeMatchModes.cs
30 lines (25 loc) · 921 Bytes
/
ShapeMatchModes.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using System.Diagnostics.CodeAnalysis;
#pragma warning disable CA1008 // Enums should have zero value
namespace OpenCvSharp;
/// <summary>
/// Comparison methods for cv::matchShapes
/// </summary>
/// <remarks>
/// https://github.com/opencv/opencv/blob/d3bc563c6e01c2bc153f23e7393322a95c7d3974/modules/imgproc/include/opencv2/imgproc.hpp#L453
/// </remarks>
[SuppressMessage("Microsoft.Design", "CA1717: Only FlagsAttribute enums should have plural names")]
public enum ShapeMatchModes
{
/// <summary>
/// \f[I_1(A,B) = \sum _{i=1...7} \left | \frac{1}{m^A_i} - \frac{1}{m^B_i} \right |\f]
/// </summary>
I1 = 1,
/// <summary>
/// \f[I_2(A,B) = \sum _{i=1...7} \left | m^A_i - m^B_i \right |\f]
/// </summary>
I2 = 2,
/// <summary>
/// \f[I_3(A,B) = \max _{i=1...7} \frac{ \left| m^A_i - m^B_i \right| }{ \left| m^A_i \right| }\f]
/// </summary>
I3 = 3,
}