How to fill the region of interest by white color
이전 댓글 표시
Hi All,
I have this Black and white mask

I want to fill the region of interest to be like this

approximatlly by white color to use it for segmentation later,please any could help by a Matlab code to do this job,thanks in advance.
채택된 답변
추가 답변 (2개)
Walter Roberson
2013년 12월 31일
0 개 추천
Your gaps are fairly big and are going to cause you problems, I suspect.
댓글 수: 9
hamed abdulaziz
2013년 12월 31일
편집: hamed abdulaziz
2013년 12월 31일
hamed abdulaziz
2013년 12월 31일
hamed abdulaziz
2013년 12월 31일
편집: hamed abdulaziz
2013년 12월 31일
hamed abdulaziz
2013년 12월 31일
편집: Walter Roberson
2013년 12월 31일
Image Analyst
2013년 12월 31일
Link doesn't work. Please fix it. Did you adjust the threshold to the best value as you were following the demo? I also have an app for that in my File Exchange.
hamed abdulaziz
2013년 12월 31일
hamed abdulaziz
2013년 12월 31일
Walter Roberson
2013년 12월 31일
Consider using Alpha Shapes. The effect can be like putting an elastic band around the object, effectively closing the curve.
Image Analyst
2014년 1월 1일
Alpha shapes might be good. Sometimes the boundary can go inside the points so you have to be aware of how you do it to make sure it gives you a boundary you are happy with. Concave hull doesn't go inside points (I don't think) though it can jump gaps. I don't have experience with alpha shapes (though I'd like to) but I do have experience with concave hulls.
Image Analyst
2013년 12월 31일
0 개 추천
How did you get that bad mask in the first place? I think it might be better to improve it from the start than to try to fix up a bad one. If you need to use that one I'd just close with a bigger disk, or use imline to burn a line into the images manually, or use edge linking methods, or use the concave hull (restricted convex hull, demo attached).
댓글 수: 10
hamed abdulaziz
2013년 12월 31일
편집: Image Analyst
2013년 12월 31일
hamed abdulaziz
2013년 12월 31일
이동: DGM
2023년 2월 13일
hamed abdulaziz
2013년 12월 31일
이동: DGM
2023년 2월 13일
hamed abdulaziz
2013년 12월 31일
이동: DGM
2023년 2월 13일
Image Analyst
2013년 12월 31일
이동: DGM
2023년 2월 13일
Sometimes I have to leave the house to do things like buy food.
Walter Roberson
2013년 12월 31일
이동: DGM
2023년 2월 13일
hamed, it is New Years Eve in North America. We have celebration preparations to make. And house-work to do. And other people to answer here. And several other forums on various topics that we are dealing with as well.
Also with the effect of the wind, the temperature outside my house is -40C at the moment (-48C last night) so I am on edge about whether my furnace will break or not.
Image Analyst
2013년 12월 31일
이동: DGM
2023년 2월 13일
So, did you try the concave hull demo I gave you?
Image Analyst
2013년 12월 31일
Why do you have to use ant? What is the original image? What is the bottom image in your original question? It looks masked - how did you do that if your edges are broken? What's the original unmasked image look like, so I can see if edge detection is best or if you can get by with simple thresholding? Did you try anything I suggested? I'm not inclined to offer more until I get my questions answered.
Walter Roberson
2014년 1월 1일
Which "ant algorithm" ? Ant Colony Optimization?
Image Analyst
2014년 1월 1일
Not sure, but that's what I assumed. It's the only ant algorithm I've ever heard of.
카테고리
도움말 센터 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!





