c++ - Region detection opencv -
i have probleme detecte principale region of trafic sign probleme how extract interior region in project
have
i wan change black circle white color , other black color tryed function doesn't work
mat mainwindow::region (mat img ){bool chacolbn=false;mat res ;img.copyto(res); for(int =0; i< img.rows; i++) { for(int j=0; j < img.cols; j++) { if (img.at<uchar>(i,j) !=255&&img.at<uchar>(i,j+1) == 255) { chacolbn= true; } if (img.at<uchar>(i,j) ==255&&img.at<uchar>(i,j+1) !=255) { chacolbn= false; } if (chacolbn= true) { if(img.at<uchar>(i,j) ==255) { img.at<uchar>(i,j) =0; } else { img.at<uchar>(i,j) =255; } } } } return img;}
Comments
Post a Comment