1 | initial version |
Using below code you can easily access image pixel from a Mat, from that R,G,B value you can check your condition and store the pixel value.
or(int i = 0; i < img.rows; i++)
{
for(int j = 0; j < img.cols; j++)
{
Vec3b bgr = foo.at<Vec3b>(i, j);
// using BGR values check the condition and store the pixel value
}
}
2 | No.2 Revision |
Using below code you can easily access image pixel from a Mat, from that R,G,B value you can check your condition and store the pixel value.
or(int i = 0; i < img.rows; i++)
{
for(int j = 0; j < img.cols; j++)
{
Vec3b bgr = foo.at<Vec3b>(i, img.at<Vec3b>(i, j);
// using BGR values check the condition and store the pixel value
}
}
3 | No.3 Revision |
Using below code you can easily access image pixel from a Mat, from that R,G,B value you can check your condition and store the pixel value.
or(int for(int i = 0; i < img.rows; i++)
{
for(int j = 0; j < img.cols; j++)
{
Vec3b bgr = img.at<Vec3b>(i, j);
// using BGR values check the condition and store the pixel value
}
}