at<T> method

T at<T>(
  1. int i0,
  2. int i1, [
  3. int? i2
])

cv::Mat::at<T>(i0, i1, i2) of cv::Mat

example:

var m = cv.Mat.fromScalar(cv.Scalar(2, 4, 1, 0), cv.MatType.CV_32FC3);
m.at<double>(0, 0); // 2.0
m.at<cv.Vec3f>(0, 0); // cv.Vec3f(2, 4, 1)

https://docs.opencv.org/4.x/d3/d63/classcv_1_1Mat.html#a7a6d7e3696b8b19b9dfac3f209118c40

Implementation

T at<T>(int i0, int i1, [int? i2]) {
  if (T == int || T == double || T == num) {
    return atNum(i0, i1, i2) as T;
  } else if (isSubtype<T, CvVec>()) {
    return atVec<T>(i0, i1);
  } else {
    throw UnsupportedError("T must be num or CvVec(e.g., Vec3b), but got $T");
  }
}