mirror of
https://github.com/opencv/opencv_contrib.git
synced 2025-10-19 19:44:14 +08:00
Fixed several warnings produced by GCC 7
This commit is contained in:
@@ -53,7 +53,9 @@ int main(int argc, char* argv[])
|
|||||||
bool useOCL = parser.has("ocl");
|
bool useOCL = parser.has("ocl");
|
||||||
cv::ocl::setUseOpenCL(useOCL);
|
cv::ocl::setUseOpenCL(useOCL);
|
||||||
if(useOCL && !cv::ocl::useOpenCL())
|
if(useOCL && !cv::ocl::useOpenCL())
|
||||||
|
{
|
||||||
std::cout << "Failed to enable OpenCL\n";
|
std::cout << "Failed to enable OpenCL\n";
|
||||||
|
}
|
||||||
|
|
||||||
// declare the retina input buffer... that will be fed differently in regard of the input media
|
// declare the retina input buffer... that will be fed differently in regard of the input media
|
||||||
cv::Mat inputFrame;
|
cv::Mat inputFrame;
|
||||||
|
@@ -91,7 +91,7 @@ namespace cv
|
|||||||
string TRACK_votImpl::numberToString(int number)
|
string TRACK_votImpl::numberToString(int number)
|
||||||
{
|
{
|
||||||
string out;
|
string out;
|
||||||
char numberStr[9];
|
char numberStr[20];
|
||||||
sprintf(numberStr, "%u", number);
|
sprintf(numberStr, "%u", number);
|
||||||
for (unsigned int i = 0; i < 8 - strlen(numberStr); ++i)
|
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 );
|
EXPECT_EQ((int) X.rows-1,(int) XEuclidean.rows );
|
||||||
|
|
||||||
for(int y=0;y<X.rows-1;++y)
|
for(int y=0;y<X.rows-1;++y)
|
||||||
|
{
|
||||||
for(int x=0;x<X.cols;++x)
|
for(int x=0;x<X.cols;++x)
|
||||||
|
{
|
||||||
if (X(X.rows-1,x)!=0)
|
if (X(X.rows-1,x)!=0)
|
||||||
|
{
|
||||||
EXPECT_LE( std::abs(X(y,x)/X(X.rows-1, x) - XEuclidean(y,x)), 1e-4 );
|
EXPECT_LE( std::abs(X(y,x)/X(X.rows-1, x) - XEuclidean(y,x)), 1e-4 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(Sfm_projection, euclideanToHomogeneous)
|
TEST(Sfm_projection, euclideanToHomogeneous)
|
||||||
|
@@ -119,7 +119,7 @@ void er_show(vector<Mat> &channels, vector<vector<ERStat> > ®ions)
|
|||||||
Scalar(255),0,Scalar(er.level),Scalar(0),flags);
|
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);
|
sprintf(buff, "channel %d", c);
|
||||||
imshow(buff_ptr, dst);
|
imshow(buff_ptr, dst);
|
||||||
}
|
}
|
||||||
|
@@ -440,8 +440,6 @@ namespace cv
|
|||||||
LabeledPatch labPatch;
|
LabeledPatch labPatch;
|
||||||
double curScale = pow(SCALE_STEP, ensScaleIDs[i]);
|
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.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 srValue = srValues[i];
|
||||||
const double scValue = scValues[i];
|
const double scValue = scValues[i];
|
||||||
|
@@ -103,7 +103,6 @@ namespace cv
|
|||||||
{
|
{
|
||||||
Rect2d rect;
|
Rect2d rect;
|
||||||
bool isObject, shouldBeIntegrated;
|
bool isObject, shouldBeIntegrated;
|
||||||
double Sc;
|
|
||||||
};
|
};
|
||||||
bool detect(const Mat& img, const Mat& imgBlurred, Rect2d& res, std::vector<LabeledPatch>& patches, Size initSize);
|
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);
|
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 normInf = cvtest::norm(res, ref, NORM_INF);
|
||||||
double normL2 = cvtest::norm(res, ref, NORM_L2) / res.total();
|
double normL2 = cvtest::norm(res, ref, NORM_L2) / res.total();
|
||||||
|
|
||||||
if (maxNormInf >= 0) EXPECT_LE(normInf, maxNormInf);
|
if (maxNormInf >= 0) { EXPECT_LE(normInf, maxNormInf); }
|
||||||
if (maxNormL2 >= 0) EXPECT_LE(normL2, maxNormL2);
|
if (maxNormL2 >= 0) { EXPECT_LE(normL2, maxNormL2); }
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(AdaptiveManifoldTest, SplatSurfaceAccuracy)
|
TEST(AdaptiveManifoldTest, SplatSurfaceAccuracy)
|
||||||
|
Reference in New Issue
Block a user