I have a code for face detection,i have displayed word Face,how how to position in near the bounding box
http://imgur.com/oKQixuN
code
clear
close all
x=imread('test01.jpg');
I=x;
if (size(x,3)>1)%if RGB image make gray scale
try
x=rgb2gray(x);%image toolbox dependent
catch
x=sum(double(x),3)/3;%if no image toolbox do simple sum
end
end
x=double(x);%make sure the input is double format
[output,count,m,svec]=facefind(x);%full scan
imagesc(x), colormap(gray)%show image
plotbox(output,[],3)%plot the detections as red squares
uicontrol('Style','text','Position', [output(1) output(2) 30,...... ....20],'String','FAce')

 채택된 답변

Jan
Jan 2013년 1월 21일

0 개 추천

Do not use an UICONTROL('style', 'text'), because its coordinates are realtive to the figure. Although it is possible to convert the local position of the face relative to the AXES in figure coordniates also, using the text() command is much more direct.
text(output(1), output(2), 'Face')
Play with the background property for a bounding box on demand.

추가 답변 (0개)

카테고리

도움말 센터 및 File Exchange에서 Convert Image Type에 대해 자세히 알아보기

질문:

2013년 1월 21일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by