'Image' or 'ConvexImage' of regionprops into a grayscale instead of a binary one
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
marco mendez
am 11 Sep. 2019
Kommentiert: marco mendez
am 11 Sep. 2019
How can i create the image that makes the propertie 'Image' or 'ConvexImage' of regionprops into a grayscale instead of a binary one? I have tryed with PixelValues but it doesn't give me the same number of pixels...
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 11 Sep. 2019
You cannot. regionprops defines both of those properties as returning a binary mask.
One way to proceed is to ask for BoundingBox as well as Image, and imcrop() your original image according to the bounding box, and then .* the result with the binary mask from the Image property. The result would be 0 for locations that were 0 originally or were outside the boundary, and the grayscale value otherwise.
Weitere Antworten (0)
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!