Commit b16d9dbc authored by Maksim Shabunin's avatar Maksim Shabunin

Fixed several warnings produced by GCC 7

parent 6f07e2fc
......@@ -53,11 +53,13 @@ int main(int argc, char* argv[])
bool useOCL = parser.has("ocl");
cv::ocl::setUseOpenCL(useOCL);
if(useOCL && !cv::ocl::useOpenCL())
{
std::cout << "Failed to enable OpenCL\n";
}
// declare the retina input buffer... that will be fed differently in regard of the input media
cv::Mat inputFrame;
cv::VideoCapture videoCapture; // in case a video media is used, its manager is declared here
// declare the retina input buffer... that will be fed differently in regard of the input media
cv::Mat inputFrame;
cv::VideoCapture videoCapture; // in case a video media is used, its manager is declared here
if(parser.has("video"))
videoCapture.open(parser.get<cv::String>("video"));
......
......@@ -83,10 +83,10 @@ static bool detecChessboardCorners(const vector<string>& list1, vector<string>&
}
if (!img_l.empty())
imageSize1 = img_l.size();
if (!img_r.empty())
{
imageSize2 = img_r.size();
}
if (!img_r.empty())
{
imageSize2 = img_r.size();
}
if (image_points_1.size() < 3)
return false;
......@@ -314,4 +314,4 @@ int main(int argc, char** argv)
saveCameraParams(outputFilename, flags, K1, K2, D1, D2, _xi1, _xi2, rvec, tvec, rvecs, tvecs,
detec_list_1, detec_list_2, idx, rms, imagePoints1, imagePoints2);
}
\ No newline at end of file
}
......@@ -91,7 +91,7 @@ namespace cv
string TRACK_votImpl::numberToString(int number)
{
string out;
char numberStr[9];
char numberStr[20];
sprintf(numberStr, "%u", number);
for (unsigned int i = 0; i < 8 - strlen(numberStr); ++i)
{
......
......@@ -53,9 +53,15 @@ TEST(Sfm_projection, homogeneousToEuclidean)
EXPECT_EQ((int) X.rows-1,(int) XEuclidean.rows );
for(int y=0;y<X.rows-1;++y)
{
for(int x=0;x<X.cols;++x)
{
if (X(X.rows-1,x)!=0)
{
EXPECT_LE( std::abs(X(y,x)/X(X.rows-1, x) - XEuclidean(y,x)), 1e-4 );
}
}
}
}
TEST(Sfm_projection, euclideanToHomogeneous)
......
......@@ -119,7 +119,7 @@ void er_show(vector<Mat> &channels, vector<vector<ERStat> > &regions)
Scalar(255),0,Scalar(er.level),Scalar(0),flags);
}
}
char buff[10]; char *buff_ptr = buff;
char buff[20]; char *buff_ptr = buff;
sprintf(buff, "channel %d", c);
imshow(buff_ptr, dst);
}
......
......@@ -440,8 +440,6 @@ namespace cv
LabeledPatch labPatch;
double curScale = pow(SCALE_STEP, ensScaleIDs[i]);
labPatch.rect = Rect2d(ensBuffer[i].x*curScale, ensBuffer[i].y*curScale, initSize.width * curScale, initSize.height * curScale);
labPatch.Sc = scValues[i];
//printf("max sc %f\n", labPatch.Sc);
const double srValue = srValues[i];
const double scValue = scValues[i];
......
......@@ -103,7 +103,6 @@ namespace cv
{
Rect2d rect;
bool isObject, shouldBeIntegrated;
double Sc;
};
bool detect(const Mat& img, const Mat& imgBlurred, Rect2d& res, std::vector<LabeledPatch>& patches, Size initSize);
bool ocl_detect(const Mat& img, const Mat& imgBlurred, Rect2d& res, std::vector<LabeledPatch>& patches, Size initSize);
......
......@@ -59,8 +59,8 @@ static void checkSimilarity(InputArray res, InputArray ref, double maxNormInf =
double normInf = cvtest::norm(res, ref, NORM_INF);
double normL2 = cvtest::norm(res, ref, NORM_L2) / res.total();
if (maxNormInf >= 0) EXPECT_LE(normInf, maxNormInf);
if (maxNormL2 >= 0) EXPECT_LE(normL2, maxNormL2);
if (maxNormInf >= 0) { EXPECT_LE(normInf, maxNormInf); }
if (maxNormL2 >= 0) { EXPECT_LE(normL2, maxNormL2); }
}
TEST(AdaptiveManifoldTest, SplatSurfaceAccuracy)
......
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