Shift features of cropped image

1 Ansicht (letzte 30 Tage)
Ömer Faruk Kurular
Ömer Faruk Kurular am 10 Nov. 2019
Kommentiert: Image Analyst am 10 Nov. 2019
I first detect face in an image and then extract features of face part. Then I wanto plot points on whole image but feature points are shifted as I found features on cropped image. How can I handle this issue?
face = imcrop(grayimage,[x,y,width,height]);
points = detectSURFFeatures(face);
imshow(I); hold on;
plot(points.selectStrongest(10));
  1 Kommentar
KALYAN ACHARJYA
KALYAN ACHARJYA am 10 Nov. 2019
Its already done or you wish to do same?

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Image Analyst
Image Analyst am 10 Nov. 2019
You displayed the original image instead of the cropped face image. Try this:
face = imcrop(grayimage,[x,y,width,height]);
points = detectSURFFeatures(face);
imshow(face);
hold on;
plot(points.selectStrongest(10));
  2 Kommentare
Ömer Faruk Kurular
Ömer Faruk Kurular am 10 Nov. 2019
No I am extracting features from face but show points on whole image.
Image Analyst
Image Analyst am 10 Nov. 2019
Then you need to add x to the x values, and y to the y values since the (x,y) values you get from detectSURFFeatures will have the cropped image, not the original face, as the image/origin.

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

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

Start Hunting!

Translated by