![]() The cv::Vec3f object represents a triplet of float values. For CV_32FC3: cv::Vec3f pixelColor = image.at(r,c).For CV_32FC1: float pixelGrayValue = image.at(r,c).The cv::Vec3b object represents a triplet of uchar values (integers between 0 and 255). For CV_8UC3: cv::Vec3b pixelColor = image.at(r,c).For CV_8UC1: uchar pixelGrayValue = image.at(r,c).According to its type, the access method and the pixel color type will be different. The template argument depends on the type of the matrix. To access individual pixels, the safest way, though not the most efficient, is to use cv::Mat::at(r,c) method where r is the row of the matrix and c is the column. The default setting with cv::imread will create a CV_8UC3 matrix. ![]()
0 Comments
Leave a Reply. |