필터 지우기
필터 지우기

HELP...How to detect corners using Harris corner detection Algorithm?

조회 수: 3 (최근 30일)
Anand
Anand 2013년 11월 17일
댓글: Anand 2013년 11월 21일
Hi, I am having trouble with getting this corner detection code to work properly. It works fine but points are scattered all over the place, i want the corner points to be detected within the bounding box. is there anything i need to add or edit?
This is the code i have so far:-
faceDetector = vision.CascadeObjectDetector('FrontalFaceCART');
cornerDetector = vision.CornerDetector('Method','Harris corner detection (Harris & Stephens)');
Irgb2gray=rgb2gray(Iface);
bboxes = step(faceDetector, Irgb2gray);
corners = detectHarrisFeatures(Irgb2gray);
Irgb2gray = insertObjectAnnotation(Iface, 'rectangle', bboxes, 'Face');
figure, imshow(Irgb2gray), title('Detected faces'); hold on;
plot(points.selectStrongest(50));
Thank you in advance.
  댓글 수: 2
Anand
Anand 2013년 11월 17일
Is there anyone that can help me on this problem?
Anand
Anand 2013년 11월 17일
Any suggestions on how to approach this problem? as you can see from the image below the 50 strongest points are not detected inside the bounding box.

댓글을 달려면 로그인하십시오.

채택된 답변

Anand
Anand 2013년 11월 17일
Try the syntax with the 'ROI' parameter, something like this:
corners = detectHarrisFeatures(Irgb2gray,'ROI',bboxes(1,:));
This will detect Harris corners within the first bounding box in bboxes.
  댓글 수: 9
Anand
Anand 2013년 11월 21일
so this is the code for it:-
the points are not detected inside the bounding box and they are not covering the corners of the mouth. is there anything that is wrong?
this is the result
Anand
Anand 2013년 11월 21일
so this is the code for it:-
for i = 1 : size(mouth,1)
corners = detectHarrisFeatures(rgb2gray(I),'ROI',faces(i,:),'MinQuality',0.05);
hold on;
plot(corners.selectStrongest(10))
end
hold off;

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by