1 | initial version |
Just,
Convert to GRAY using cvtColor()
Mat src= imread("src.jpg",1); // load source image
Mat gray;
cvtColor(src, gray, CV_BGR2GRAY); //perform gray scale conversion.
Now threshold the image to get the desired result
threshold( gray, thr, 100,255,THRESH_BINARY );
You can start from tutorial page.
2 | No.2 Revision |
Just,
Convert source to GRAY using cvtColor()
Mat src= imread("src.jpg",1); // load source image
Mat gray;
cvtColor(src, gray, CV_BGR2GRAY); //perform gray scale conversion.
Now threshold the image to get the desired result
threshold( gray, thr, 100,255,THRESH_BINARY );
You can start from tutorial page.