フィルターのクリア

how can we change particular part of binary image which is in white color to black color

2 ビュー (過去 30 日間)
After converting the gray image to binary, How can we supervise a part of image which is in white to black color
I have attached image which is a binary image. I want to supervise the highlighted part image which is in red to the green line. I want to supervise by changing white color to black.

回答 (2 件)

Walter Roberson
Walter Roberson 2017 年 3 月 30 日
If you have an ROI mask, then
newImage = oldImage;
newImage(ROI) = ~newImage(ROI); %if you want to change white to black and black to white
newImage(ROI) = 0; %if you want to change everything in the ROI to black

Image Analyst
Image Analyst 2017 年 4 月 7 日
I don't know what this means: " which is in red to the green line." There is a green line, but there is red all around it, so which white pixels do you want to turn black? Regardless, once you turn those black, then EVERYTHING will be black. So to do that you simply do:
binaryImage(rectangleMask) = false;
  3 件のコメント
Walter Roberson
Walter Roberson 2017 年 4 月 7 日
The tree shadow appears to have a larger area than the patches. You could do a bwareafilt()
Image Analyst
Image Analyst 2017 年 4 月 8 日
Your segmentation algorithm leading to binarization is not good. Also, I don't think your image capture method is good either. The roadway/asphalt crack detection methods I have seem drive a truck over the pavement and look straight down, not way off into the distance like you're doing. Realize that will never reliably find cracks in the roadway 10 to 50 meters ahead.
Look into publications by Professor Bugao Xu at the University of Texas, who has done work on this. Also you can search VisionBibliography to find papers on the topic: http://www.visionbib.com/bibliography/contents.html I'd advise you to do that because trying to find cracks like you're doing now is doomed.

サインインしてコメントする。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by