1 Mat src=imread("image/color.jpg");
2 imshow("a",src);
3 int i,j;
4 int cPointR,cPointG,cPointB,cPoint;//currentPoint;
5 for(i=1;i<src.rows;i++)
6 for(j=1;j<src.cols;j++)
7 {
8 cPointB=src.at<Vec3b>(i,j)[0];
9 cPointG=src.at<Vec3b>(i,j)[1];
10 cPointR=src.at<Vec3b>(i,j)[2];
11 if(cPointB>100&cPointR<100&cPointG<100)
12 {
13 src.at<Vec3b>(i,j)[0]=0;
14 src.at<Vec3b>(i,j)[1]=0;
15 src.at<Vec3b>(i,j)[2]=0;
16 }
17
18 }
19 imshow("da",src);