a big patch; use special proxy types (Input/OutputArray, Input/OutputArrayOfArrays) for passing in vectors, matrices etc.
This commit is contained in:
@@ -344,7 +344,7 @@ protected:
|
||||
ts->printf(cvtest::TS::LOG, "Tesing %s\n", names[i]);
|
||||
|
||||
cv::Mat cpuRes;
|
||||
cv::morphologyEx(img, cpuRes, ops[i], kernel);
|
||||
cv::morphologyEx(img, cpuRes, ops[i], (Mat)kernel);
|
||||
|
||||
GpuMat gpuRes;
|
||||
cv::gpu::morphologyEx(GpuMat(img), gpuRes, ops[i], kernel);
|
||||
|
@@ -249,7 +249,7 @@ struct CV_GpuHogGetDescriptorsTestRunner: cv::gpu::HOGDescriptor
|
||||
cv::cvtColor(img_rgb, img, CV_BGR2BGRA);
|
||||
computeBlockHistograms(cv::gpu::GpuMat(img));
|
||||
// Everything is fine with interpolation for left top subimage
|
||||
CHECK(cv::norm(block_hists, descriptors.rowRange(0, 1)) == 0.f, cvtest::TS::FAIL_INVALID_OUTPUT);
|
||||
CHECK(cv::norm((cv::Mat)block_hists, (cv::Mat)descriptors.rowRange(0, 1)) == 0.f, cvtest::TS::FAIL_INVALID_OUTPUT);
|
||||
|
||||
img_rgb = cv::imread(std::string(ts->get_data_path()) + "hog/positive2.png");
|
||||
CHECK(!img_rgb.empty(), cvtest::TS::FAIL_MISSING_TEST_DATA);
|
||||
|
@@ -74,7 +74,7 @@ struct CV_AsyncGpuMatTest : public cvtest::BaseTest
|
||||
Mat cpu_gold0(100, 100, CV_8UC1, Scalar::all(255));
|
||||
Mat cpu_gold1(100, 100, CV_8UC1, Scalar::all(128));
|
||||
|
||||
if (norm(cpudst0, cpu_gold0, NORM_INF) > 0 || norm(cpudst1, cpu_gold1, NORM_INF) > 0)
|
||||
if (norm((Mat)cpudst0, cpu_gold0, NORM_INF) > 0 || norm((Mat)cpudst1, cpu_gold1, NORM_INF) > 0)
|
||||
ts->set_failed_test_info(cvtest::TS::FAIL_GENERIC);
|
||||
else
|
||||
ts->set_failed_test_info(cvtest::TS::OK);
|
||||
|
@@ -68,7 +68,7 @@ void CV_GpuMatOpConvertToTest::run(int /* start_from */)
|
||||
bool passed = true;
|
||||
int lastType = CV_32F;
|
||||
|
||||
if (TargetArchs::builtWith(NATIVE_DOUBLE) && DeviceInfo().supports(NATIVE_DOUBLE))
|
||||
if (TargetArchs::builtWith(NATIVE_DOUBLE) && DeviceInfo().supports(NATIVE_DOUBLE))
|
||||
lastType = CV_64F;
|
||||
|
||||
for (int i = 0; i <= lastType && passed; ++i)
|
||||
@@ -92,7 +92,7 @@ void CV_GpuMatOpConvertToTest::run(int /* start_from */)
|
||||
cpumatsrc.convertTo(cpumatdst, dst_type, 0.5, 3.0);
|
||||
gpumatsrc.convertTo(gpumatdst, dst_type, 0.5, 3.0);
|
||||
|
||||
double r = norm(cpumatdst, gpumatdst, NORM_INF);
|
||||
double r = norm(cpumatdst, (Mat)gpumatdst, NORM_INF);
|
||||
if (r > 1)
|
||||
{
|
||||
ts->printf(cvtest::TS::LOG,
|
||||
|
@@ -106,7 +106,7 @@ bool CV_GpuMatOpCopyToTest::compare_matrix(cv::Mat & cpumat, gpu::GpuMat & gpuma
|
||||
cv::waitKey(0);
|
||||
#endif
|
||||
|
||||
double ret = norm(cmat, gmat);
|
||||
double ret = norm(cmat, (Mat)gmat);
|
||||
|
||||
if (ret < 1.0)
|
||||
return true;
|
||||
@@ -123,7 +123,7 @@ void CV_GpuMatOpCopyToTest::run( int /* start_from */)
|
||||
|
||||
int lastType = CV_32F;
|
||||
|
||||
if (TargetArchs::builtWith(NATIVE_DOUBLE) && DeviceInfo().supports(NATIVE_DOUBLE))
|
||||
if (TargetArchs::builtWith(NATIVE_DOUBLE) && DeviceInfo().supports(NATIVE_DOUBLE))
|
||||
lastType = CV_64F;
|
||||
|
||||
for (int i = 0 ; i <= lastType; i++)
|
||||
|
@@ -78,7 +78,7 @@ bool CV_GpuMatOpSetToTest::testSetTo(cv::Mat& cpumat, gpu::GpuMat& gpumat, const
|
||||
cpumat.setTo(s, cpumask);
|
||||
gpumat.setTo(s, gpumask);
|
||||
|
||||
double ret = norm(cpumat, gpumat, NORM_INF);
|
||||
double ret = norm(cpumat, (Mat)gpumat, NORM_INF);
|
||||
|
||||
if (ret < std::numeric_limits<double>::epsilon())
|
||||
return true;
|
||||
@@ -100,7 +100,7 @@ void CV_GpuMatOpSetToTest::run( int /* start_from */)
|
||||
|
||||
int lastType = CV_32F;
|
||||
|
||||
if (TargetArchs::builtWith(NATIVE_DOUBLE) && DeviceInfo().supports(NATIVE_DOUBLE))
|
||||
if (TargetArchs::builtWith(NATIVE_DOUBLE) && DeviceInfo().supports(NATIVE_DOUBLE))
|
||||
lastType = CV_64F;
|
||||
|
||||
for (int i = 0; i <= lastType; i++)
|
||||
|
@@ -106,7 +106,7 @@ struct CV_GpuStereoBMTest : public cvtest::BaseTest
|
||||
bm(cv::gpu::GpuMat(img_l), cv::gpu::GpuMat(img_r), disp);
|
||||
|
||||
disp.convertTo(disp, img_reference.type());
|
||||
double norm = cv::norm(disp, img_reference, cv::NORM_INF);
|
||||
double norm = cv::norm((Mat)disp, img_reference, cv::NORM_INF);
|
||||
|
||||
//cv::imwrite(std::string(ts->get_data_path()) + "stereobm/aloe-disp.png", disp);
|
||||
|
||||
|
@@ -70,7 +70,7 @@ struct CV_AsyncStereoBMTest : public cvtest::BaseTest
|
||||
|
||||
stream.waitForCompletion();
|
||||
disp.convertTo(disp, img_reference.type());
|
||||
double norm = cv::norm(disp, img_reference, cv::NORM_INF);
|
||||
double norm = cv::norm((Mat)disp, img_reference, cv::NORM_INF);
|
||||
|
||||
if (norm >= 100)
|
||||
{
|
||||
|
@@ -67,7 +67,7 @@ struct CV_GpuStereoBPTest : public cvtest::BaseTest
|
||||
|
||||
disp.convertTo(disp, img_template.type());
|
||||
|
||||
double norm = cv::norm(disp, img_template, cv::NORM_INF);
|
||||
double norm = cv::norm((cv::Mat)disp, img_template, cv::NORM_INF);
|
||||
if (norm >= 0.5)
|
||||
{
|
||||
ts->printf(cvtest::TS::LOG, "\nStereoBP norm = %f\n", norm);
|
||||
|
@@ -67,7 +67,7 @@ struct CV_GpuStereoCSBPTest : public cvtest::BaseTest
|
||||
|
||||
disp.convertTo(disp, img_template.type());
|
||||
|
||||
double norm = cv::norm(disp, img_template, cv::NORM_INF);
|
||||
double norm = cv::norm((cv::Mat)disp, img_template, cv::NORM_INF);
|
||||
if (norm >= 0.5)
|
||||
{
|
||||
ts->printf(cvtest::TS::LOG, "\nConstantSpaceStereoBP norm = %f\n", norm);
|
||||
|
Reference in New Issue
Block a user