How to fill the region of interest by white color
Mostrar comentarios más antiguos
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.
Respuesta aceptada
Más respuestas (2)
Walter Roberson
el 31 de Dic. de 2013
0 votos
Your gaps are fairly big and are going to cause you problems, I suspect.
9 comentarios
hamed abdulaziz
el 31 de Dic. de 2013
Editada: hamed abdulaziz
el 31 de Dic. de 2013
hamed abdulaziz
el 31 de Dic. de 2013
hamed abdulaziz
el 31 de Dic. de 2013
Editada: hamed abdulaziz
el 31 de Dic. de 2013
hamed abdulaziz
el 31 de Dic. de 2013
Editada: Walter Roberson
el 31 de Dic. de 2013
Image Analyst
el 31 de Dic. de 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
el 31 de Dic. de 2013
hamed abdulaziz
el 31 de Dic. de 2013
Walter Roberson
el 31 de Dic. de 2013
Consider using Alpha Shapes. The effect can be like putting an elastic band around the object, effectively closing the curve.
Image Analyst
el 1 de En. de 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
el 31 de Dic. de 2013
0 votos
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 comentarios
hamed abdulaziz
el 31 de Dic. de 2013
Editada: Image Analyst
el 31 de Dic. de 2013
hamed abdulaziz
el 31 de Dic. de 2013
Movida: DGM
el 13 de Feb. de 2023
hamed abdulaziz
el 31 de Dic. de 2013
Movida: DGM
el 13 de Feb. de 2023
hamed abdulaziz
el 31 de Dic. de 2013
Movida: DGM
el 13 de Feb. de 2023
Image Analyst
el 31 de Dic. de 2013
Movida: DGM
el 13 de Feb. de 2023
Sometimes I have to leave the house to do things like buy food.
Walter Roberson
el 31 de Dic. de 2013
Movida: DGM
el 13 de Feb. de 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
el 31 de Dic. de 2013
Movida: DGM
el 13 de Feb. de 2023
So, did you try the concave hull demo I gave you?
Image Analyst
el 31 de Dic. de 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
el 1 de En. de 2014
Which "ant algorithm" ? Ant Colony Optimization?
Image Analyst
el 1 de En. de 2014
Not sure, but that's what I assumed. It's the only ant algorithm I've ever heard of.
Categorías
Más información sobre Startup and Shutdown en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!





