Commit aafda8fa authored by Maksim Shabunin's avatar Maksim Shabunin

Fixing GCC 4.9 warning

parent 865346fd
...@@ -144,8 +144,9 @@ StarDetectorComputeResponses( const Mat& img, Mat& responses, Mat& sizes, ...@@ -144,8 +144,9 @@ StarDetectorComputeResponses( const Mat& img, Mat& responses, Mat& sizes,
{ {
const int MAX_PATTERN = 17; const int MAX_PATTERN = 17;
static const int sizes0[] = {1, 2, 3, 4, 6, 8, 11, 12, 16, 22, 23, 32, 45, 46, 64, 90, 128, -1}; static const int sizes0[] = {1, 2, 3, 4, 6, 8, 11, 12, 16, 22, 23, 32, 45, 46, 64, 90, 128, -1};
static const int pairs[][2] = {{1, 0}, {3, 1}, {4, 2}, {5, 3}, {7, 4}, {8, 5}, {9, 6}, static const int pairs[12][2] = {{1, 0}, {3, 1}, {4, 2}, {5, 3}, {7, 4}, {8, 5}, {9, 6},
{11, 8}, {13, 10}, {14, 11}, {15, 12}, {16, 14}, {-1, -1}}; {11, 8}, {13, 10}, {14, 11}, {15, 12}, {16, 14}};
const int MAX_PAIR = sizeof(pairs)/sizeof(pairs[0]);
float invSizes[MAX_PATTERN][2]; float invSizes[MAX_PATTERN][2];
int sizes1[MAX_PATTERN]; int sizes1[MAX_PATTERN];
...@@ -172,14 +173,15 @@ StarDetectorComputeResponses( const Mat& img, Mat& responses, Mat& sizes, ...@@ -172,14 +173,15 @@ StarDetectorComputeResponses( const Mat& img, Mat& responses, Mat& sizes,
responses.create( img.size(), CV_32F ); responses.create( img.size(), CV_32F );
sizes.create( img.size(), CV_16S ); sizes.create( img.size(), CV_16S );
while( pairs[npatterns][0] >= 0 && ! while( npatterns < MAX_PAIR && !
( sizes0[pairs[npatterns][0]] >= maxSize ( sizes0[pairs[npatterns][0]] >= maxSize
|| sizes0[pairs[npatterns+1][0]] + sizes0[pairs[npatterns+1][0]]/2 >= std::min(rows, cols) ) ) || sizes0[pairs[npatterns+1][0]] + sizes0[pairs[npatterns+1][0]]/2 >= std::min(rows, cols) ) )
{ {
++npatterns; ++npatterns;
} }
npatterns += (pairs[npatterns-1][0] >= 0); if (npatterns-1 < MAX_PAIR)
++npatterns;
maxIdx = pairs[npatterns-1][0]; maxIdx = pairs[npatterns-1][0];
// Create the integral image appropriate for our type & usage // Create the integral image appropriate for our type & usage
......
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