How to fill the region of interest by white color
Ältere Kommentare anzeigen
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.
Akzeptierte Antwort
Weitere Antworten (2)
Walter Roberson
am 31 Dez. 2013
0 Stimmen
Your gaps are fairly big and are going to cause you problems, I suspect.
9 Kommentare
hamed abdulaziz
am 31 Dez. 2013
Bearbeitet: hamed abdulaziz
am 31 Dez. 2013
hamed abdulaziz
am 31 Dez. 2013
hamed abdulaziz
am 31 Dez. 2013
Bearbeitet: hamed abdulaziz
am 31 Dez. 2013
hamed abdulaziz
am 31 Dez. 2013
Bearbeitet: Walter Roberson
am 31 Dez. 2013
Image Analyst
am 31 Dez. 2013
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
am 31 Dez. 2013
hamed abdulaziz
am 31 Dez. 2013
Walter Roberson
am 31 Dez. 2013
Consider using Alpha Shapes. The effect can be like putting an elastic band around the object, effectively closing the curve.
Image Analyst
am 1 Jan. 2014
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
am 31 Dez. 2013
0 Stimmen
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 Kommentare
hamed abdulaziz
am 31 Dez. 2013
Bearbeitet: Image Analyst
am 31 Dez. 2013
hamed abdulaziz
am 31 Dez. 2013
Verschoben: DGM
am 13 Feb. 2023
hamed abdulaziz
am 31 Dez. 2013
Verschoben: DGM
am 13 Feb. 2023
hamed abdulaziz
am 31 Dez. 2013
Verschoben: DGM
am 13 Feb. 2023
Image Analyst
am 31 Dez. 2013
Verschoben: DGM
am 13 Feb. 2023
Sometimes I have to leave the house to do things like buy food.
Walter Roberson
am 31 Dez. 2013
Verschoben: DGM
am 13 Feb. 2023
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
am 31 Dez. 2013
Verschoben: DGM
am 13 Feb. 2023
So, did you try the concave hull demo I gave you?
Image Analyst
am 31 Dez. 2013
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
am 1 Jan. 2014
Which "ant algorithm" ? Ant Colony Optimization?
Image Analyst
am 1 Jan. 2014
Not sure, but that's what I assumed. It's the only ant algorithm I've ever heard of.
Kategorien
Mehr zu Startup and Shutdown finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!





