fixed bug in gpu::dft
This commit is contained in:
parent
09735fd208
commit
52ca0c4bca
@ -1155,7 +1155,7 @@ void cv::gpu::dft(const GpuMat& src, GpuMat& dst, int flags, int nonZeroRows, bo
|
|||||||
// Make sure here we work with the continuous input,
|
// Make sure here we work with the continuous input,
|
||||||
// as CUFFT can't handle gaps
|
// as CUFFT can't handle gaps
|
||||||
if (src.isContinuous())
|
if (src.isContinuous())
|
||||||
src_aux = src;
|
src_data = src_aux = src;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
src_data = GpuMat(1, src.size().area(), src.type());
|
src_data = GpuMat(1, src.size().area(), src.type());
|
||||||
|
@ -246,7 +246,7 @@ struct CV_GpuDftTest: CvTest
|
|||||||
testR2CThenC2R(1, rows, "single col");
|
testR2CThenC2R(1, rows, "single col");
|
||||||
testR2CThenC2R(1, rows + 1, "single col 1");
|
testR2CThenC2R(1, rows + 1, "single col 1");
|
||||||
testR2CThenC2R(cols, 1, "single row" );;
|
testR2CThenC2R(cols, 1, "single row" );;
|
||||||
testR2CThenC2R(cols + 1, 1, "single row 1" );;
|
testR2CThenC2R(cols + 1, 1, "single row 1" );
|
||||||
}
|
}
|
||||||
catch (const Exception& e)
|
catch (const Exception& e)
|
||||||
{
|
{
|
||||||
@ -258,7 +258,7 @@ struct CV_GpuDftTest: CvTest
|
|||||||
|
|
||||||
void gen(int cols, int rows, int cn, Mat& mat)
|
void gen(int cols, int rows, int cn, Mat& mat)
|
||||||
{
|
{
|
||||||
RNG rng;
|
RNG rng(1);
|
||||||
mat.create(rows, cols, CV_MAKETYPE(CV_32F, cn));
|
mat.create(rows, cols, CV_MAKETYPE(CV_32F, cn));
|
||||||
rng.fill(mat, RNG::UNIFORM, Scalar::all(0.f), Scalar::all(10.f));
|
rng.fill(mat, RNG::UNIFORM, Scalar::all(0.f), Scalar::all(10.f));
|
||||||
}
|
}
|
||||||
@ -324,7 +324,7 @@ struct CV_GpuDftTest: CvTest
|
|||||||
ts->set_failed_test_info(CvTS::FAIL_INVALID_OUTPUT);
|
ts->set_failed_test_info(CvTS::FAIL_INVALID_OUTPUT);
|
||||||
ok = false;
|
ok = false;
|
||||||
}
|
}
|
||||||
if (ok) ok = cmp(b_gold, Mat(d_b), rows * cols * 1e-5f);
|
if (ok) ok = cmp(b_gold, Mat(d_b), rows * cols * 1e-4f);
|
||||||
if (!ok)
|
if (!ok)
|
||||||
ts->printf(CvTS::CONSOLE, "testC2C failed: hint=%s, cols=%d, rows=%d, flags=%d\n", hint.c_str(), cols, rows, flags);
|
ts->printf(CvTS::CONSOLE, "testC2C failed: hint=%s, cols=%d, rows=%d, flags=%d\n", hint.c_str(), cols, rows, flags);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user