I only can get image features form MAT file, but I also want some other information such as positions, orientation and scale. How can I get these information, could anyone offer its code? Thank you in advance.
The output of feature detection is a std::vector<cv::KeyPoint>
, where every keypoint contain:
Point2f pt
: coordinates of the keypointfloat size
: diameter of the meaningful keypoint neighborhoodfloat angle
: computed orientation of the keypoint (-1 if not applicable). Its possible values are in a range [0,360) degrees. It is measured relative to image coordinate system (y-axis is directed downward), ie in clockwise.float response
: the response by which the most strong keypoints have been selected. Can be used for further sorting or subsamplingint octave
: octave (pyramid layer) from which the keypoint has been extractedint class_id
: object id that can be used to clustered keypoints by an object they belong to