Ask Your Question
1

How to set a ROI for good feature detector?

asked 2013-02-21 17:07:46 -0600

Dawei Jiang gravatar image

Hi,All,

Currently, I have built a GoodFeatureToTrackDetector class and I want to set a specific ROI instead finding feature through the whole image. Finally, draw the keyPionts locating in the ROI as the feedback. Dose anybody know easy way to achieve this? Thanks a lot!

Dawei Jiang

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-02-22 00:33:48 -0600

Mat object has copy constructor that allows to set region of interest. Mat class use reference counting approach and does not copy this region, but just adds reference to the same data. Pass such Mat to feature detector and you've got what you want.

edit flag offensive delete link more

Comments

It works, but how can I get the coordinates of key points relative to the original image mat instead of the ROI?

Dawei Jiang gravatar imageDawei Jiang ( 2013-02-27 10:32:43 -0600 )edit

Just add coordinates of top left corner of ROI to coordinate of all key points.

Alexander Smorkalov gravatar imageAlexander Smorkalov ( 2013-02-27 12:33:32 -0600 )edit

Question Tools

Stats

Asked: 2013-02-21 17:07:46 -0600

Seen: 1,842 times

Last updated: Feb 22 '13