How to convert a closed curve into a binary mask
Ältere Kommentare anzeigen
I have a set of 2D closed curves represented by their X and Y ordered coordinates in a text file.
I have attached one of the curves as an example.
My goal is to convert the enclosed area into a binary image.
Builtin dunction "poly2mask" generates a completely black square whereas I would like the region inside the closed curve to be black
and the region outside the curve to be white.
Thank you in advance for any suggestion and help.
Regards,
Maura
Akzeptierte Antwort
Weitere Antworten (1)
Rob Campbell
am 30 Mai 2021
1 Stimme
I think you want the built-in function poly2mask
Kategorien
Mehr zu Convert Image Type finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
