1) I have a Matrix class
Mat src = imread("/pic.png", 0)
http://i1265.photobucket.com/albums/jj502/anizilla/demo_result.png
I want to replace all the white pixels in the above given image to black.
Is there a way to replace all the pixels with a particular RGB value with another?
2) When I use -
src.col(0).row(0)
I get the proper values. Is there any way to extract value of each RGB channel?
3) When I use -
src.at<Vec2b>(0,0)[0];
I get garbage values (like .
and !
). I get garbage value if I use <Vec2d>
But. When I use
src.at<Vec2s>(0,0)[0];
I get proper value for channel 0, and,
src.at<Vec2s>(0,0)[1];
src.at<Vec2s>(0,0)[2];
returns garbage numbers