sqrt function

Mat sqrt(
  1. Mat src, {
  2. Mat? dst,
})

Calculates a square root of array elements.

The function cv::sqrt calculates a square root of each input array element. In case of multi-channel arrays, each channel is processed independently. The accuracy is approximately the same as of the built-in std::sqrt .

https://docs.opencv.org/4.x/d2/de8/group__core__array.html#ga186222c3919657890f88df5a1f64a7d7

Implementation

Mat sqrt(Mat src, {Mat? dst}) {
  final p = dst?.ptr ?? calloc<cvg.Mat>();
  cvRun(() => cffi.Mat_Sqrt(src.ref, p));
  return dst ?? Mat.fromPointer(p);
}