1 | initial version |
first: bookmark this ! , and, ofc. this, too !
then we have:
std::vector< int > x;
is all you need.std::vector<cv::Mat> m(mCount);
float v = A.at< float >(row,col);
note that is this is only valid IF the type of the Mat is float, you have to carefully adjust the type in the brackets (and the return value) to that. all in all, code that uses this for the whole image should be avoided !cv::Mat cropped = rotated(yoffset, yoffset + cropSize, xoffset, xoffset + cropSize);
2 | No.2 Revision |
first: bookmark this ! , and, ofc. this, too !
then we have:
std::vector< int > x;
is all you need.std::vector<cv::Mat> m(mCount);
float v = A.at< float >(row,col);
note that is this is only valid IF the type of the Mat is float, usually, for a bgr image it would look like: Vec3b pixel = A.at<Vec3b>(r,c);
you have to carefully adjust the type in the brackets (and the return value) to that. all in all, code that uses this for the whole image should be avoided !cv::Mat cropped = rotated(yoffset, yoffset + cropSize, xoffset, xoffset + cropSize);