Is there a simple reliable way to find out which equivalent type should I use for the .at function for Mat of a given CV type?
For example, how can I say that gaps should be filled ushort, floatand Vec3b?
Mat mat1(1, 2, CV_16UC1, 12345);
std::cout << mat1.at<___>(0, 1) << "\n";
Mat mat2(1, 2, CV_32FC1, 67.89);
std::cout << mat2.at<___>(0, 1) << "\n";
Mat mat3(1, 2, CV_8UC3, Scalar(65, 66, 67));
std::cout << mat3.at<___>(0, 1)[2] << "\n";
source
share