Constructor Moments
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
Moments()
Default constructor. All moment values are set to 0.
public Moments()
Moments(double, double, double, double, double, double, double, double, double, double)
public Moments(double m00, double m10, double m01, double m20, double m11, double m02, double m30, double m21, double m12, double m03)
Parameters
m00doublem10doublem01doublem20doublem11doublem02doublem30doublem21doublem12doublem03double
Moments(InputArray, bool)
Calculates all of the moments up to the third order of a polygon or rasterized shape.
public Moments(InputArray array, bool binaryImage = false)
Parameters
arrayInputArrayA raster image (single-channel, 8-bit or floating-point 2D array) or an array ( 1xN or Nx1 ) of 2D points ( Point or Point2f )
binaryImageboolIf it is true, then all the non-zero image pixels are treated as 1’s
Moments(byte[,], bool)
Calculates all of the moments up to the third order of a polygon or rasterized shape.
public Moments(byte[,] array, bool binaryImage = false)
Parameters
arraybyte[,]A raster image (8-bit) 2D array
binaryImageboolIf it is true, then all the non-zero image pixels are treated as 1’s
Moments(float[,], bool)
Calculates all of the moments up to the third order of a polygon or rasterized shape.
public Moments(float[,] array, bool binaryImage = false)
Parameters
arrayfloat[,]A raster image (floating-point) 2D array
binaryImageboolIf it is true, then all the non-zero image pixels are treated as 1’s
Moments(IEnumerable<Point>, bool)
Calculates all of the moments up to the third order of a polygon or rasterized shape.
public Moments(IEnumerable<Point> array, bool binaryImage = false)
Parameters
arrayIEnumerable<Point>Array of 2D points
binaryImageboolIf it is true, then all the non-zero image pixels are treated as 1’s
Moments(IEnumerable<Point2f>, bool)
Calculates all of the moments up to the third order of a polygon or rasterized shape.
public Moments(IEnumerable<Point2f> array, bool binaryImage = false)
Parameters
arrayIEnumerable<Point2f>Array of 2D points
binaryImageboolIf it is true, then all the non-zero image pixels are treated as 1’s