moments function

Moments moments(
  1. Mat src, {
  2. bool binaryImage = false,
})

Moments calculates all of the moments up to the third order of a polygon or rasterized shape.

For further details, please see: https:///docs.opencv.org/master/d3/dc0/group__imgproc__shape.html#ga556a180f43cab22649c23ada36a8a139

Implementation

Moments moments(Mat src, {bool binaryImage = false}) {
  final m = calloc<cvg.Moment>();
  cvRun(() => cffi.Moments(src.ref, binaryImage, m));
  return Moments.fromPointer(m);
}