How to print regionprops properties on image?
4 views (last 30 days)
Show older comments
sacprasanna
on 7 Dec 2015
Edited: Walter Roberson
on 7 Dec 2015
Dear All,
I want to print each labeled region area on the image it self? I calculated label matrix and regionprops matrix using area.
g=regionprops(LB,'Area');
>> g(19)
ans =
Area: 166
Then I want to print these area on image it self. (pixel width is 0.07).
Like this picture.

Thanks for helping
Regards
Chamara
0 Comments
Accepted Answer
Walter Roberson
on 7 Dec 2015
Edited: Walter Roberson
on 7 Dec 2015
Does the label need to go in the image, or can it go over the image?
If it can go over the image, then as well as asking for the regionprops Area, also ask for the Centroid, and then text() the Area to the location given by the Centroid. text() will draw over the image.
If you need to create a new image that has the text "burned in" then if you have the Computer Vision Toolbox then there is a insertText() function, or you can use the older Vision.TextInserter for now.
1 Comment
More Answers (0)
See Also
Categories
Find more on Computer Vision with Simulink in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!