cvtColorAsync function

Future<Mat> cvtColorAsync(
  1. Mat src,
  2. int code, {
  3. Mat? dst,
})

CvtColor converts an image from one color space to another. It converts the src Mat image to the dst Mat using the code param containing the desired ColorConversionCode color space.

For further details, please see: http:///docs.opencv.org/master/d7/d1b/group__imgproc__misc.html#ga4e0972be5de079fed4e3a10e24ef5ef0

Implementation

Future<Mat> cvtColorAsync(Mat src, int code, {Mat? dst}) async {
  dst ??= Mat.empty();
  return cvRunAsync0(
    (callback) => cimgproc.cv_cvtColor(src.ref, dst!.ref, code, callback),
    (c) {
      return c.complete(dst);
    },
  );
}