how to display string over image for scene labeling?
이전 댓글 표시
how to label the objects in the scene image after performing training and tesing..
답변 (2개)
Walter Roberson
2013년 12월 7일
0 개 추천
text()
댓글 수: 3
sheno39
2013년 12월 7일
Walter Roberson
2013년 12월 7일
xpos = 5;
ypos = 3.9;
text(xpos, ypos, 'this is a label')
sheno39
2013년 12월 7일
chitresh
2013년 12월 7일
>> a = imread('Image_File');
>> binary = im2bw(a);
>> l = bwlabel(a_b,4);% 4 or 8 we can choose according to our requirement
>> [r, c] = find(l==2);
>> rc = [r c];
>> imshow(l == 2)
>> s = regionprops(l, 'Centroid');
>> imshow(a_b)
>> for k = 1:numel(s)
c = s(k).Centroid;
text(c(1), c(2), sprintf('%d', k),'HorizontalAlignment', 'center','VerticalAlignment', 'middle');
end
hold off
if you problem is solved accept the answer :-)
카테고리
도움말 센터 및 File Exchange에서 Ground Truth Labeling에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!