Shift features of cropped image
1 回表示 (過去 30 日間)
古いコメントを表示
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 件)
Image Analyst
2019 年 11 月 10 日
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 件のコメント
Image Analyst
2019 年 11 月 10 日
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.
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!