How to adjust TEXT in "regionprops" ?
Mostra commenti meno recenti
I am using "regionprops" with "Perimeter" property. The following outcome I have achieved:

How I can move these texts below each related white line and add unit to it, i.e., 283.04 cm.
Mentioned below is the used code:
j=regionprops(binaryImage,'Perimeter','Centroid');
score= ([j.Perimeter]/(2*3.7));
figure, imshow(binaryImage);
for cnt = 1:length(j)
text(j(cnt).Centroid(1),j(cnt).Centroid(2),num2str(score(cnt)),'FontSize',12,'color','red');
end
Kindly guide.
Risposta accettata
Più risposte (1)
Image Analyst
il 19 Apr 2022
1 voto
For what it's worth, see the attached demo. It explains how the blobs are numbered (labeled), which is a confusing topic for many people.

Categorie
Scopri di più su Region and Image Properties in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!