Slide 16
Slide 16 text
Segementation in OpenCV
// Create new image to store greyscale
cv::Mat imgGray, imgThresh;
cv::cvtColor( img, imgGray, cv::CV_BGR2GRAY );
// Threshold
int value = 20;
int maxval = 255;
cv::threshold( imgGray, imgThresh, value, maxval,
cv::THRESH_BINARY);
dst(x, y) =
{
maxval, if src(x, y) > value
0, else
(4)
It seeeeeez! Computer Vision with OpenCV 10 / 1