Class Moments
Raster image moments
Inheritance
Inherited Members
Namespace: OpenCvSharp
Assembly: OpenCvSharp.dll
Syntax
public class Moments
Constructors
| Improve this Doc View SourceMoments()
Default constructor. All moment values are set to 0.
Declaration
public Moments()
Moments(IEnumerable<Point>, Boolean)
Calculates all of the moments up to the third order of a polygon or rasterized shape.
Declaration
public Moments(IEnumerable<Point> array, bool binaryImage = false)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<OpenCvSharp.Point> | array | Array of 2D points |
System.Boolean | binaryImage | If it is true, then all the non-zero image pixels are treated as 1’s |
Moments(IEnumerable<Point2f>, Boolean)
Calculates all of the moments up to the third order of a polygon or rasterized shape.
Declaration
public Moments(IEnumerable<Point2f> array, bool binaryImage = false)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<OpenCvSharp.Point2f> | array | Array of 2D points |
System.Boolean | binaryImage | If it is true, then all the non-zero image pixels are treated as 1’s |
Moments(InputArray, Boolean)
Calculates all of the moments up to the third order of a polygon or rasterized shape.
Declaration
public Moments(InputArray array, bool binaryImage = false)
Parameters
Type | Name | Description |
---|---|---|
InputArray | array | A raster image (single-channel, 8-bit or floating-point 2D array) or an array ( 1xN or Nx1 ) of 2D points ( Point or Point2f ) |
System.Boolean | binaryImage | If it is true, then all the non-zero image pixels are treated as 1’s |
Moments(Byte[,], Boolean)
Calculates all of the moments up to the third order of a polygon or rasterized shape.
Declaration
public Moments(byte[, ] array, bool binaryImage = false)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[,] | array | A raster image (8-bit) 2D array |
System.Boolean | binaryImage | If it is true, then all the non-zero image pixels are treated as 1’s |
Moments(Double, Double, Double, Double, Double, Double, Double, Double, Double, Double)
Declaration
public Moments(double m00, double m10, double m01, double m20, double m11, double m02, double m30, double m21, double m12, double m03)
Parameters
Type | Name | Description |
---|---|---|
System.Double | m00 | |
System.Double | m10 | |
System.Double | m01 | |
System.Double | m20 | |
System.Double | m11 | |
System.Double | m02 | |
System.Double | m30 | |
System.Double | m21 | |
System.Double | m12 | |
System.Double | m03 |
Moments(Single[,], Boolean)
Calculates all of the moments up to the third order of a polygon or rasterized shape.
Declaration
public Moments(float[, ] array, bool binaryImage = false)
Parameters
Type | Name | Description |
---|---|---|
System.Single[,] | array | A raster image (floating-point) 2D array |
System.Boolean | binaryImage | If it is true, then all the non-zero image pixels are treated as 1’s |
Fields
| Improve this Doc View SourceM00
spatial moments
Declaration
public double M00
Field Value
Type | Description |
---|---|
System.Double |
M01
spatial moments
Declaration
public double M01
Field Value
Type | Description |
---|---|
System.Double |
M02
spatial moments
Declaration
public double M02
Field Value
Type | Description |
---|---|
System.Double |
M03
spatial moments
Declaration
public double M03
Field Value
Type | Description |
---|---|
System.Double |
M10
spatial moments
Declaration
public double M10
Field Value
Type | Description |
---|---|
System.Double |
M11
spatial moments
Declaration
public double M11
Field Value
Type | Description |
---|---|
System.Double |
M12
spatial moments
Declaration
public double M12
Field Value
Type | Description |
---|---|
System.Double |
M20
spatial moments
Declaration
public double M20
Field Value
Type | Description |
---|---|
System.Double |
M21
spatial moments
Declaration
public double M21
Field Value
Type | Description |
---|---|
System.Double |
M30
spatial moments
Declaration
public double M30
Field Value
Type | Description |
---|---|
System.Double |
Mu02
central moments
Declaration
public double Mu02
Field Value
Type | Description |
---|---|
System.Double |
Mu03
central moments
Declaration
public double Mu03
Field Value
Type | Description |
---|---|
System.Double |
Mu11
central moments
Declaration
public double Mu11
Field Value
Type | Description |
---|---|
System.Double |
Mu12
central moments
Declaration
public double Mu12
Field Value
Type | Description |
---|---|
System.Double |
Mu20
central moments
Declaration
public double Mu20
Field Value
Type | Description |
---|---|
System.Double |
Mu21
central moments
Declaration
public double Mu21
Field Value
Type | Description |
---|---|
System.Double |
Mu30
central moments
Declaration
public double Mu30
Field Value
Type | Description |
---|---|
System.Double |
Nu02
central normalized moments
Declaration
public double Nu02
Field Value
Type | Description |
---|---|
System.Double |
Nu03
central normalized moments
Declaration
public double Nu03
Field Value
Type | Description |
---|---|
System.Double |
Nu11
central normalized moments
Declaration
public double Nu11
Field Value
Type | Description |
---|---|
System.Double |
Nu12
central normalized moments
Declaration
public double Nu12
Field Value
Type | Description |
---|---|
System.Double |
Nu20
central normalized moments
Declaration
public double Nu20
Field Value
Type | Description |
---|---|
System.Double |
Nu21
central normalized moments
Declaration
public double Nu21
Field Value
Type | Description |
---|---|
System.Double |
Nu30
central normalized moments
Declaration
public double Nu30
Field Value
Type | Description |
---|---|
System.Double |
Methods
| Improve this Doc View SourceHuMoments()
computes 7 Hu invariants from the moments
Declaration
public double[] HuMoments()
Returns
Type | Description |
---|---|
System.Double[] |