Commit dc14b456 authored by Maria Dimashova's avatar Maria Dimashova

minor changes

parent 5c691907
...@@ -575,8 +575,9 @@ void GridAdaptedFeatureDetector::detectImpl( const Mat& image, vector<KeyPoint>& ...@@ -575,8 +575,9 @@ void GridAdaptedFeatureDetector::detectImpl( const Mat& image, vector<KeyPoint>&
vector<KeyPoint> sub_keypoints; vector<KeyPoint> sub_keypoints;
detector->detect( sub_image, sub_keypoints, sub_mask ); detector->detect( sub_image, sub_keypoints, sub_mask );
keepStrongest( maxPerCell, sub_keypoints ); keepStrongest( maxPerCell, sub_keypoints );
for( std::vector<cv::KeyPoint>::iterator it = sub_keypoints.begin(), end = sub_keypoints.end(); std::vector<cv::KeyPoint>::iterator it = sub_keypoints.begin(),
it != end; ++it ) end = sub_keypoints.end();
for( ; it != end; ++it )
{ {
it->pt.x += col_range.start; it->pt.x += col_range.start;
it->pt.y += row_range.start; it->pt.y += row_range.start;
...@@ -618,7 +619,9 @@ void PyramidAdaptedFeatureDetector::detectImpl( const Mat& image, vector<KeyPoin ...@@ -618,7 +619,9 @@ void PyramidAdaptedFeatureDetector::detectImpl( const Mat& image, vector<KeyPoin
// Detect on current level of the pyramid // Detect on current level of the pyramid
vector<KeyPoint> new_pts; vector<KeyPoint> new_pts;
detector->detect( src, new_pts, src_mask ); 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.x *= multiplier;
it->pt.y *= multiplier; it->pt.y *= multiplier;
......
...@@ -113,10 +113,12 @@ void drawKeypoints( const Mat& image, const vector<KeyPoint>& keypoints, Mat& ou ...@@ -113,10 +113,12 @@ void drawKeypoints( const Mat& image, const vector<KeyPoint>& keypoints, Mat& ou
bool isRandColor = _color == Scalar::all(-1); bool isRandColor = _color == Scalar::all(-1);
CV_Assert( !outImage.empty() ); 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; 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, ...@@ -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 // filter points by subMask and convert the points coordinates from subImage size to image size
KeyPointsFilter::runByPixelsMask( keypoints, subMask ); KeyPointsFilter::runByPixelsMask( keypoints, subMask );
int dx = brect.x, dy = brect.y; 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.x += dx;
it->pt.y += dy; it->pt.y += dy;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment