mirror of
https://github.com/opencv/opencv.git
synced 2024-11-28 21:20:18 +08:00
Added response to GFTT Detector keypoints
This commit is contained in:
parent
4a8f06755c
commit
b88fb40c6e
@ -714,6 +714,14 @@ public:
|
||||
//! the default constructor
|
||||
CV_WRAP KeyPoint();
|
||||
/**
|
||||
@param _pt x & y coordinates of the keypoint while z is the response
|
||||
@param _size keypoint diameter
|
||||
@param _angle keypoint orientation
|
||||
@param _octave pyramid octave in which the keypoint has been detected
|
||||
@param _class_id object id
|
||||
*/
|
||||
KeyPoint(Point3f _pt, float _size, float _angle=-1, int _octave=0, int _class_id=-1);
|
||||
/**
|
||||
@param _pt x & y coordinates of the keypoint
|
||||
@param _size keypoint diameter
|
||||
@param _angle keypoint orientation
|
||||
@ -2427,6 +2435,10 @@ inline
|
||||
KeyPoint::KeyPoint()
|
||||
: pt(0,0), size(0), angle(-1), response(0), octave(0), class_id(-1) {}
|
||||
|
||||
inline
|
||||
KeyPoint::KeyPoint(Point3f _pt, float _size, float _angle, int _octave, int _class_id)
|
||||
: pt(_pt.x, _pt.y), size(_size), angle(_angle), response(_pt.z), octave(_octave), class_id(_class_id) {}
|
||||
|
||||
inline
|
||||
KeyPoint::KeyPoint(Point2f _pt, float _size, float _angle, float _response, int _octave, int _class_id)
|
||||
: pt(_pt), size(_size), angle(_angle), response(_response), octave(_octave), class_id(_class_id) {}
|
||||
|
@ -86,7 +86,7 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
std::vector<Point2f> corners;
|
||||
std::vector<Point3f> corners;
|
||||
|
||||
if (_image.isUMat())
|
||||
{
|
||||
@ -110,10 +110,10 @@ public:
|
||||
}
|
||||
|
||||
keypoints.resize(corners.size());
|
||||
std::vector<Point2f>::const_iterator corner_it = corners.begin();
|
||||
std::vector<Point3f>::const_iterator corner_it = corners.begin();
|
||||
std::vector<KeyPoint>::iterator keypoint_it = keypoints.begin();
|
||||
for( ; corner_it != corners.end() && keypoint_it != keypoints.end(); ++corner_it, ++keypoint_it )
|
||||
*keypoint_it = KeyPoint( *corner_it, (float)blockSize );
|
||||
*keypoint_it = KeyPoint( *corner_it, (float)blockSize);
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user