Struct Moments
Represents all the moments up to the third order of a polygon or rasterized shape.
Namespace: OpenCV.Net
Assembly: OpenCV.Net.dll
Syntax
public struct Moments
Constructors
| Improve this Doc View SourceMoments(CVHandle, Boolean)
Initializes a new instance of the Moments structure from the specified polygon or rasterized shape.
Declaration
public Moments(CVHandle arr, bool binary = false)
Parameters
Type | Name | Description |
---|---|---|
CVHandle | arr | The handle to the polygon (Seq) or rasterized shape (IplImage) from which to compute the moments. |
Boolean | binary | If true, all non-zero image pixels are treated as one. Used for images only. |
Fields
| Improve this Doc View SourceInvSqrtM00
The inverse of the square root of the first spatial moment.
Declaration
public double InvSqrtM00
Field Value
Type | Description |
---|---|
Double |
M00
The spatial moments of the polygon or rasterized shape.
Declaration
public double M00
Field Value
Type | Description |
---|---|
Double |
M01
The spatial moments of the polygon or rasterized shape.
Declaration
public double M01
Field Value
Type | Description |
---|---|
Double |
M02
The spatial moments of the polygon or rasterized shape.
Declaration
public double M02
Field Value
Type | Description |
---|---|
Double |
M03
The spatial moments of the polygon or rasterized shape.
Declaration
public double M03
Field Value
Type | Description |
---|---|
Double |
M10
The spatial moments of the polygon or rasterized shape.
Declaration
public double M10
Field Value
Type | Description |
---|---|
Double |
M11
The spatial moments of the polygon or rasterized shape.
Declaration
public double M11
Field Value
Type | Description |
---|---|
Double |
M12
The spatial moments of the polygon or rasterized shape.
Declaration
public double M12
Field Value
Type | Description |
---|---|
Double |
M20
The spatial moments of the polygon or rasterized shape.
Declaration
public double M20
Field Value
Type | Description |
---|---|
Double |
M21
The spatial moments of the polygon or rasterized shape.
Declaration
public double M21
Field Value
Type | Description |
---|---|
Double |
M30
The spatial moments of the polygon or rasterized shape.
Declaration
public double M30
Field Value
Type | Description |
---|---|
Double |
Mu02
The central moments of the polygon or rasterized shape.
Declaration
public double Mu02
Field Value
Type | Description |
---|---|
Double |
Mu03
The central moments of the polygon or rasterized shape.
Declaration
public double Mu03
Field Value
Type | Description |
---|---|
Double |
Mu11
The central moments of the polygon or rasterized shape.
Declaration
public double Mu11
Field Value
Type | Description |
---|---|
Double |
Mu12
The central moments of the polygon or rasterized shape.
Declaration
public double Mu12
Field Value
Type | Description |
---|---|
Double |
Mu20
The central moments of the polygon or rasterized shape.
Declaration
public double Mu20
Field Value
Type | Description |
---|---|
Double |
Mu21
The central moments of the polygon or rasterized shape.
Declaration
public double Mu21
Field Value
Type | Description |
---|---|
Double |
Mu30
The central moments of the polygon or rasterized shape.
Declaration
public double Mu30
Field Value
Type | Description |
---|---|
Double |
Methods
| Improve this Doc View SourceGetCentralMoment(Int32, Int32)
Gets the central moment with the specified xOrder
and yOrder
.
Declaration
public double GetCentralMoment(int xOrder, int yOrder)
Parameters
Type | Name | Description |
---|---|---|
Int32 | xOrder | The x-order of the retrieved moment. |
Int32 | yOrder | The y-order of the retrieved moment. |
Returns
Type | Description |
---|---|
Double | The central moment with the specified |
GetHuMoments()
Computes the seven Hu moments invariant to image scale, rotation, and reflection except the seventh one, whose sign is changed by reflection.
Declaration
public HuMoments GetHuMoments()
Returns
Type | Description |
---|---|
HuMoments | An instance of HuMoments containing the seven Hu moments. |
GetNormalizedCentralMoment(Int32, Int32)
Gets the normalized central moment with the specified xOrder
and
yOrder
.
Declaration
public double GetNormalizedCentralMoment(int xOrder, int yOrder)
Parameters
Type | Name | Description |
---|---|---|
Int32 | xOrder | The x-order of the retrieved moment. |
Int32 | yOrder | The y-order of the retrieved moment. |
Returns
Type | Description |
---|---|
Double | The normalized central moment with the specified |
GetSpatialMoment(Int32, Int32)
Gets the spatial moment with the specified xOrder
and yOrder
.
Declaration
public double GetSpatialMoment(int xOrder, int yOrder)
Parameters
Type | Name | Description |
---|---|---|
Int32 | xOrder | The x-order of the retrieved moment. |
Int32 | yOrder | The y-order of the retrieved moment. |
Returns
Type | Description |
---|---|
Double | The spatial moment with the specified |