minor changes
This commit is contained in:
parent
5c691907ed
commit
dc14b45617
@ -575,8 +575,9 @@ void GridAdaptedFeatureDetector::detectImpl( const Mat& image, vector<KeyPoint>&
|
||||
vector<KeyPoint> sub_keypoints;
|
||||
detector->detect( sub_image, sub_keypoints, sub_mask );
|
||||
keepStrongest( maxPerCell, sub_keypoints );
|
||||
for( std::vector<cv::KeyPoint>::iterator it = sub_keypoints.begin(), end = sub_keypoints.end();
|
||||
it != end; ++it )
|
||||
std::vector<cv::KeyPoint>::iterator it = sub_keypoints.begin(),
|
||||
end = sub_keypoints.end();
|
||||
for( ; it != end; ++it )
|
||||
{
|
||||
it->pt.x += col_range.start;
|
||||
it->pt.y += row_range.start;
|
||||
@ -618,7 +619,9 @@ void PyramidAdaptedFeatureDetector::detectImpl( const Mat& image, vector<KeyPoin
|
||||
// Detect on current level of the pyramid
|
||||
vector<KeyPoint> new_pts;
|
||||
detector->detect( src, new_pts, src_mask );
|
||||
for( vector<KeyPoint>::iterator it = new_pts.begin(), end = new_pts.end(); it != end; ++it)
|
||||
vector<KeyPoint>::iterator it = new_pts.begin(),
|
||||
end = new_pts.end();
|
||||
for( ; it != end; ++it)
|
||||
{
|
||||
it->pt.x *= multiplier;
|
||||
it->pt.y *= multiplier;
|
||||
|
@ -113,10 +113,12 @@ void drawKeypoints( const Mat& image, const vector<KeyPoint>& keypoints, Mat& ou
|
||||
bool isRandColor = _color == Scalar::all(-1);
|
||||
|
||||
CV_Assert( !outImage.empty() );
|
||||
for( vector<KeyPoint>::const_iterator i = keypoints.begin(), ie = keypoints.end(); i != ie; ++i )
|
||||
vector<KeyPoint>::const_iterator it = keypoints.begin(),
|
||||
end = keypoints.end();
|
||||
for( ; it != end; ++it )
|
||||
{
|
||||
Scalar color = isRandColor ? Scalar(rng(256), rng(256), rng(256)) : _color;
|
||||
_drawKeypoint( outImage, *i, color, flags );
|
||||
_drawKeypoint( outImage, *it, color, flags );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1663,7 +1663,9 @@ void SIFT::operator()(const Mat& image, const Mat& mask,
|
||||
// filter points by subMask and convert the points coordinates from subImage size to image size
|
||||
KeyPointsFilter::runByPixelsMask( keypoints, subMask );
|
||||
int dx = brect.x, dy = brect.y;
|
||||
for( vector<KeyPoint>::iterator it = keypoints.begin(); it != keypoints.end(); ++it )
|
||||
vector<KeyPoint>::iterator it = keypoints.begin(),
|
||||
end = keypoints.end();
|
||||
for( ; it != end; ++it )
|
||||
{
|
||||
it->pt.x += dx;
|
||||
it->pt.y += dy;
|
||||
|
Loading…
x
Reference in New Issue
Block a user