mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
committed by
Andrey Kamaev
parent
6569a58518
commit
ecb2ebfba4
@@ -13,10 +13,50 @@
|
||||
|
||||
#include <float.h>
|
||||
|
||||
#if defined(__GNUC__) && !defined(__APPLE__)
|
||||
#if defined(__GNUC__) && !defined(__APPLE__) && !defined(__arm__)
|
||||
#include <fpu_control.h>
|
||||
#endif
|
||||
|
||||
namespace
|
||||
{
|
||||
// http://www.christian-seiler.de/projekte/fpmath/
|
||||
class FpuControl
|
||||
{
|
||||
public:
|
||||
FpuControl();
|
||||
~FpuControl();
|
||||
|
||||
private:
|
||||
#if defined(__GNUC__) && !defined(__APPLE__) && !defined(__arm__)
|
||||
fpu_control_t fpu_oldcw, fpu_cw;
|
||||
#elif defined(_WIN32) && !defined(_WIN64)
|
||||
unsigned int fpu_oldcw, fpu_cw;
|
||||
#endif
|
||||
};
|
||||
|
||||
FpuControl::FpuControl()
|
||||
{
|
||||
#if defined(__GNUC__) && !defined(__APPLE__) && !defined(__arm__)
|
||||
_FPU_GETCW(fpu_oldcw);
|
||||
fpu_cw = (fpu_oldcw & ~_FPU_EXTENDED & ~_FPU_DOUBLE & ~_FPU_SINGLE) | _FPU_SINGLE;
|
||||
_FPU_SETCW(fpu_cw);
|
||||
#elif defined(_WIN32) && !defined(_WIN64)
|
||||
_controlfp_s(&fpu_cw, 0, 0);
|
||||
fpu_oldcw = fpu_cw;
|
||||
_controlfp_s(&fpu_cw, _PC_24, _MCW_PC);
|
||||
#endif
|
||||
}
|
||||
|
||||
FpuControl::~FpuControl()
|
||||
{
|
||||
#if defined(__GNUC__) && !defined(__APPLE__) && !defined(__arm__)
|
||||
_FPU_SETCW(fpu_oldcw);
|
||||
#elif defined(_WIN32) && !defined(_WIN64)
|
||||
_controlfp_s(&fpu_cw, fpu_oldcw, _MCW_PC);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#include "TestHaarCascadeApplication.h"
|
||||
#include "NCVHaarObjectDetection.hpp"
|
||||
|
||||
@@ -47,12 +87,8 @@ bool TestHaarCascadeApplication::init()
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool TestHaarCascadeApplication::process()
|
||||
{
|
||||
#if defined(__APPLE)
|
||||
return true;
|
||||
#endif
|
||||
NCVStatus ncvStat;
|
||||
bool rcode = false;
|
||||
|
||||
@@ -205,56 +241,19 @@ bool TestHaarCascadeApplication::process()
|
||||
}
|
||||
ncvAssertReturn(cudaSuccess == cudaStreamSynchronize(0), false);
|
||||
|
||||
#if !defined(__APPLE__)
|
||||
{
|
||||
// calculations here
|
||||
FpuControl fpu;
|
||||
(void) fpu;
|
||||
|
||||
#if defined(__GNUC__)
|
||||
//http://www.christian-seiler.de/projekte/fpmath/
|
||||
ncvStat = ncvApplyHaarClassifierCascade_host(
|
||||
h_integralImage, h_rectStdDev, h_pixelMask,
|
||||
detectionsOnThisScale_h,
|
||||
haar, h_HaarStages, h_HaarNodes, h_HaarFeatures, false,
|
||||
searchRoiU, 1, 1.0f);
|
||||
ncvAssertReturn(ncvStat == NCV_SUCCESS, false);
|
||||
}
|
||||
|
||||
#ifndef _FPU_EXTENDED
|
||||
#define _FPU_EXTENDED 0
|
||||
#endif
|
||||
|
||||
#ifndef _FPU_DOUBLE
|
||||
#define _FPU_DOUBLE 0
|
||||
#endif
|
||||
|
||||
#ifndef _FPU_SINGLE
|
||||
#define _FPU_SINGLE 0
|
||||
#endif
|
||||
|
||||
fpu_control_t fpu_oldcw, fpu_cw;
|
||||
_FPU_GETCW(fpu_oldcw); // store old cw
|
||||
fpu_cw = (fpu_oldcw & ~_FPU_EXTENDED & ~_FPU_DOUBLE & ~_FPU_SINGLE) | _FPU_SINGLE;
|
||||
_FPU_SETCW(fpu_cw);
|
||||
|
||||
// calculations here
|
||||
ncvStat = ncvApplyHaarClassifierCascade_host(
|
||||
h_integralImage, h_rectStdDev, h_pixelMask,
|
||||
detectionsOnThisScale_h,
|
||||
haar, h_HaarStages, h_HaarNodes, h_HaarFeatures, false,
|
||||
searchRoiU, 1, 1.0f);
|
||||
ncvAssertReturn(ncvStat == NCV_SUCCESS, false);
|
||||
|
||||
_FPU_SETCW(fpu_oldcw); // restore old cw
|
||||
#else
|
||||
#ifndef _WIN64
|
||||
Ncv32u fpu_oldcw, fpu_cw;
|
||||
_controlfp_s(&fpu_cw, 0, 0);
|
||||
fpu_oldcw = fpu_cw;
|
||||
_controlfp_s(&fpu_cw, _PC_24, _MCW_PC);
|
||||
#endif
|
||||
ncvStat = ncvApplyHaarClassifierCascade_host(
|
||||
h_integralImage, h_rectStdDev, h_pixelMask,
|
||||
detectionsOnThisScale_h,
|
||||
haar, h_HaarStages, h_HaarNodes, h_HaarFeatures, false,
|
||||
searchRoiU, 1, 1.0f);
|
||||
ncvAssertReturn(ncvStat == NCV_SUCCESS, false);
|
||||
#ifndef _WIN64
|
||||
_controlfp_s(&fpu_cw, fpu_oldcw, _MCW_PC);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
NCV_SKIP_COND_END
|
||||
|
||||
int devId;
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "NCVAutoTestLister.hpp"
|
||||
#include "NCVTestSourceProvider.hpp"
|
||||
|
||||
#include <main_test_nvidia.h>
|
||||
#include "main_test_nvidia.h"
|
||||
|
||||
static std::string path;
|
||||
|
||||
@@ -97,7 +97,7 @@ void generateRectStdDevTests(NCVAutoTestLister &testLister, NCVTestSourceProvide
|
||||
template <class T>
|
||||
void generateResizeTests(NCVAutoTestLister &testLister, NCVTestSourceProvider<T> &src)
|
||||
{
|
||||
for (Ncv32u i=1; i<480; i+=3)
|
||||
for (Ncv32u i=2; i<10; ++i)
|
||||
{
|
||||
char testName[80];
|
||||
sprintf(testName, "TestResize_VGA_s%d", i);
|
||||
@@ -105,7 +105,7 @@ void generateResizeTests(NCVAutoTestLister &testLister, NCVTestSourceProvider<T>
|
||||
testLister.add(new TestResize<T>(testName, src, 640, 480, i, false));
|
||||
}
|
||||
|
||||
for (Ncv32u i=1; i<1080; i+=5)
|
||||
for (Ncv32u i=2; i<10; ++i)
|
||||
{
|
||||
char testName[80];
|
||||
sprintf(testName, "TestResize_1080_s%d", i);
|
||||
@@ -117,7 +117,7 @@ void generateResizeTests(NCVAutoTestLister &testLister, NCVTestSourceProvider<T>
|
||||
void generateNPPSTVectorTests(NCVAutoTestLister &testLister, NCVTestSourceProvider<Ncv32u> &src, Ncv32u maxLength)
|
||||
{
|
||||
//compaction
|
||||
for (Ncv32f _i=256.0; _i<maxLength; _i*=1.1f)
|
||||
for (Ncv32f _i=256.0; _i<maxLength; _i*=1.5f)
|
||||
{
|
||||
Ncv32u i = (Ncv32u)_i;
|
||||
char testName[80];
|
||||
@@ -132,13 +132,13 @@ void generateNPPSTVectorTests(NCVAutoTestLister &testLister, NCVTestSourceProvid
|
||||
testLister.add(new TestCompact(testName, src, i, 0xC001C0DE, 0));
|
||||
testLister.add(new TestCompact(testName, src, i, 0xC001C0DE, 100));
|
||||
}
|
||||
for (Ncv32u i=256*256-256; i<256*256+257; i++)
|
||||
for (Ncv32u i=256*256-10; i<256*256+10; i++)
|
||||
{
|
||||
char testName[80];
|
||||
sprintf(testName, "Compaction%d", i);
|
||||
testLister.add(new TestCompact(testName, src, i, 0xFFFFFFFF, 40));
|
||||
}
|
||||
for (Ncv32u i=256*256*256-10; i<256*256*256+10; i++)
|
||||
for (Ncv32u i=256*256*256-2; i<256*256*256+2; i++)
|
||||
{
|
||||
char testName[80];
|
||||
sprintf(testName, "Compaction%d", i);
|
||||
@@ -212,7 +212,7 @@ void generateDrawRectsTests(NCVAutoTestLister &testLister,
|
||||
void generateVectorTests(NCVAutoTestLister &testLister, NCVTestSourceProvider<Ncv32u> &src, Ncv32u maxLength)
|
||||
{
|
||||
//growth
|
||||
for (Ncv32f _i=10.0; _i<maxLength; _i*=1.1f)
|
||||
for (Ncv32f _i=10.0; _i<maxLength; _i*=1.5f)
|
||||
{
|
||||
Ncv32u i = (Ncv32u)_i;
|
||||
char testName[80];
|
||||
@@ -253,16 +253,16 @@ void generateHaarApplicationTests(NCVAutoTestLister &testLister, NCVTestSourcePr
|
||||
Ncv32u maxWidth, Ncv32u maxHeight)
|
||||
{
|
||||
(void)maxHeight;
|
||||
for (Ncv32u i=20; i<512; i+=11)
|
||||
for (Ncv32u i=100; i<512; i+=41)
|
||||
{
|
||||
for (Ncv32u j=20; j<128; j+=5)
|
||||
for (Ncv32u j=100; j<128; j+=25)
|
||||
{
|
||||
char testName[80];
|
||||
sprintf(testName, "HaarAppl%d_%d", i, j);
|
||||
testLister.add(new TestHaarCascadeApplication(testName, src, path + "haarcascade_frontalface_alt.xml", j, i));
|
||||
}
|
||||
}
|
||||
for (Ncv32f _i=20.0; _i<maxWidth; _i*=1.1f)
|
||||
for (Ncv32f _i=20.0; _i<maxWidth; _i*=1.5f)
|
||||
{
|
||||
Ncv32u i = (Ncv32u)_i;
|
||||
char testName[80];
|
||||
@@ -285,11 +285,11 @@ bool nvidia_NPPST_Integral_Image(const std::string& test_data_path, OutputLevel
|
||||
|
||||
NCVAutoTestLister testListerII("NPPST Integral Image", outputLevel);
|
||||
|
||||
NCVTestSourceProvider<Ncv8u> testSrcRandom_8u(2010, 0, 255, 4096, 4096);
|
||||
NCVTestSourceProvider<Ncv32f> testSrcRandom_32f(2010, -1.0f, 1.0f, 4096, 4096);
|
||||
NCVTestSourceProvider<Ncv8u> testSrcRandom_8u(2010, 0, 255, 2048, 2048);
|
||||
NCVTestSourceProvider<Ncv32f> testSrcRandom_32f(2010, -1.0f, 1.0f, 2048, 2048);
|
||||
|
||||
generateIntegralTests<Ncv8u, Ncv32u>(testListerII, testSrcRandom_8u, 4096, 4096);
|
||||
generateIntegralTests<Ncv32f, Ncv32f>(testListerII, testSrcRandom_32f, 4096, 4096);
|
||||
generateIntegralTests<Ncv8u, Ncv32u>(testListerII, testSrcRandom_8u, 2048, 2048);
|
||||
generateIntegralTests<Ncv32f, Ncv32f>(testListerII, testSrcRandom_32f, 2048, 2048);
|
||||
|
||||
return testListerII.invoke();
|
||||
}
|
||||
@@ -301,9 +301,9 @@ bool nvidia_NPPST_Squared_Integral_Image(const std::string& test_data_path, Outp
|
||||
|
||||
NCVAutoTestLister testListerSII("NPPST Squared Integral Image", outputLevel);
|
||||
|
||||
NCVTestSourceProvider<Ncv8u> testSrcRandom_8u(2010, 0, 255, 4096, 4096);
|
||||
NCVTestSourceProvider<Ncv8u> testSrcRandom_8u(2010, 0, 255, 2048, 2048);
|
||||
|
||||
generateSquaredIntegralTests(testListerSII, testSrcRandom_8u, 4096, 4096);
|
||||
generateSquaredIntegralTests(testListerSII, testSrcRandom_8u, 2048, 2048);
|
||||
|
||||
return testListerSII.invoke();
|
||||
}
|
||||
@@ -315,9 +315,9 @@ bool nvidia_NPPST_RectStdDev(const std::string& test_data_path, OutputLevel outp
|
||||
|
||||
NCVAutoTestLister testListerRStdDev("NPPST RectStdDev", outputLevel);
|
||||
|
||||
NCVTestSourceProvider<Ncv8u> testSrcRandom_8u(2010, 0, 255, 4096, 4096);
|
||||
NCVTestSourceProvider<Ncv8u> testSrcRandom_8u(2010, 0, 255, 2048, 2048);
|
||||
|
||||
generateRectStdDevTests(testListerRStdDev, testSrcRandom_8u, 4096, 4096);
|
||||
generateRectStdDevTests(testListerRStdDev, testSrcRandom_8u, 2048, 2048);
|
||||
|
||||
return testListerRStdDev.invoke();
|
||||
}
|
||||
@@ -329,8 +329,8 @@ bool nvidia_NPPST_Resize(const std::string& test_data_path, OutputLevel outputLe
|
||||
|
||||
NCVAutoTestLister testListerResize("NPPST Resize", outputLevel);
|
||||
|
||||
NCVTestSourceProvider<Ncv32u> testSrcRandom_32u(2010, 0, 0xFFFFFFFF, 4096, 4096);
|
||||
NCVTestSourceProvider<Ncv64u> testSrcRandom_64u(2010, 0, -1, 4096, 4096);
|
||||
NCVTestSourceProvider<Ncv32u> testSrcRandom_32u(2010, 0, 0xFFFFFFFF, 2048, 2048);
|
||||
NCVTestSourceProvider<Ncv64u> testSrcRandom_64u(2010, 0, -1, 2048, 2048);
|
||||
|
||||
generateResizeTests(testListerResize, testSrcRandom_32u);
|
||||
generateResizeTests(testListerResize, testSrcRandom_64u);
|
||||
@@ -345,9 +345,9 @@ bool nvidia_NPPST_Vector_Operations(const std::string& test_data_path, OutputLev
|
||||
|
||||
NCVAutoTestLister testListerNPPSTVectorOperations("NPPST Vector Operations", outputLevel);
|
||||
|
||||
NCVTestSourceProvider<Ncv32u> testSrcRandom_32u(2010, 0, 0xFFFFFFFF, 4096, 4096);
|
||||
NCVTestSourceProvider<Ncv32u> testSrcRandom_32u(2010, 0, 0xFFFFFFFF, 2048, 2048);
|
||||
|
||||
generateNPPSTVectorTests(testListerNPPSTVectorOperations, testSrcRandom_32u, 4096*4096);
|
||||
generateNPPSTVectorTests(testListerNPPSTVectorOperations, testSrcRandom_32u, 2048*2048);
|
||||
|
||||
return testListerNPPSTVectorOperations.invoke();
|
||||
}
|
||||
@@ -359,8 +359,8 @@ bool nvidia_NPPST_Transpose(const std::string& test_data_path, OutputLevel outpu
|
||||
|
||||
NCVAutoTestLister testListerTranspose("NPPST Transpose", outputLevel);
|
||||
|
||||
NCVTestSourceProvider<Ncv32u> testSrcRandom_32u(2010, 0, 0xFFFFFFFF, 4096, 4096);
|
||||
NCVTestSourceProvider<Ncv64u> testSrcRandom_64u(2010, 0, -1, 4096, 4096);
|
||||
NCVTestSourceProvider<Ncv32u> testSrcRandom_32u(2010, 0, 0xFFFFFFFF, 2048, 2048);
|
||||
NCVTestSourceProvider<Ncv64u> testSrcRandom_64u(2010, 0, -1, 2048, 2048);
|
||||
|
||||
generateTransposeTests(testListerTranspose, testSrcRandom_32u);
|
||||
generateTransposeTests(testListerTranspose, testSrcRandom_64u);
|
||||
@@ -404,7 +404,7 @@ bool nvidia_NCV_Haar_Cascade_Application(const std::string& test_data_path, Outp
|
||||
|
||||
NCVTestSourceProvider<Ncv8u> testSrcFacesVGA_8u(path + "group_1_640x480_VGA.pgm");
|
||||
|
||||
generateHaarApplicationTests(testListerHaarAppl, testSrcFacesVGA_8u, 1280, 720);
|
||||
generateHaarApplicationTests(testListerHaarAppl, testSrcFacesVGA_8u, 640, 480);
|
||||
|
||||
return testListerHaarAppl.invoke();
|
||||
}
|
||||
@@ -416,9 +416,9 @@ bool nvidia_NCV_Hypotheses_Filtration(const std::string& test_data_path, OutputL
|
||||
|
||||
NCVAutoTestLister testListerHypFiltration("Hypotheses Filtration", outputLevel);
|
||||
|
||||
NCVTestSourceProvider<Ncv32u> testSrcRandom_32u(2010, 0, 0xFFFFFFFF, 4096, 4096);
|
||||
NCVTestSourceProvider<Ncv32u> testSrcRandom_32u(2010, 0, 0xFFFFFFFF, 2048, 2048);
|
||||
|
||||
generateHypothesesFiltrationTests(testListerHypFiltration, testSrcRandom_32u, 1024);
|
||||
generateHypothesesFiltrationTests(testListerHypFiltration, testSrcRandom_32u, 512);
|
||||
|
||||
return testListerHypFiltration.invoke();
|
||||
}
|
||||
@@ -430,11 +430,11 @@ bool nvidia_NCV_Visualization(const std::string& test_data_path, OutputLevel out
|
||||
|
||||
NCVAutoTestLister testListerVisualize("Visualization", outputLevel);
|
||||
|
||||
NCVTestSourceProvider<Ncv8u> testSrcRandom_8u(2010, 0, 255, 4096, 4096);
|
||||
NCVTestSourceProvider<Ncv32u> testSrcRandom_32u(2010, 0, RAND_MAX, 4096, 4096);
|
||||
NCVTestSourceProvider<Ncv8u> testSrcRandom_8u(2010, 0, 255, 2048, 2048);
|
||||
NCVTestSourceProvider<Ncv32u> testSrcRandom_32u(2010, 0, RAND_MAX, 2048, 2048);
|
||||
|
||||
generateDrawRectsTests(testListerVisualize, testSrcRandom_8u, testSrcRandom_32u, 4096, 4096);
|
||||
generateDrawRectsTests(testListerVisualize, testSrcRandom_32u, testSrcRandom_32u, 4096, 4096);
|
||||
generateDrawRectsTests(testListerVisualize, testSrcRandom_8u, testSrcRandom_32u, 2048, 2048);
|
||||
generateDrawRectsTests(testListerVisualize, testSrcRandom_32u, testSrcRandom_32u, 2048, 2048);
|
||||
|
||||
return testListerVisualize.invoke();
|
||||
}
|
||||
|
||||
+400
-28
@@ -1609,72 +1609,444 @@ GPU_TEST_P(CvtColor, RGBA2YUV4)
|
||||
EXPECT_MAT_NEAR(dst_gold, h_dst, 1e-5);
|
||||
}
|
||||
|
||||
#if defined (CUDA_VERSION) && (CUDA_VERSION >= 5000)
|
||||
|
||||
GPU_TEST_P(CvtColor, BGR2Lab)
|
||||
{
|
||||
if (depth != CV_8U)
|
||||
if (depth == CV_16U)
|
||||
return;
|
||||
|
||||
cv::Mat src = readImage("stereobm/aloe-L.png");
|
||||
cv::Mat src = img;
|
||||
|
||||
cv::gpu::GpuMat dst_lab = createMat(src.size(), src.type(), useRoi);
|
||||
cv::gpu::cvtColor(loadMat(src, useRoi), dst_lab, cv::COLOR_BGR2Lab);
|
||||
cv::gpu::GpuMat dst;
|
||||
cv::gpu::cvtColor(loadMat(src, useRoi), dst, cv::COLOR_BGR2Lab);
|
||||
|
||||
cv::gpu::GpuMat dst_bgr = createMat(src.size(), src.type(), useRoi);
|
||||
cv::gpu::cvtColor(dst_lab, dst_bgr, cv::COLOR_Lab2BGR);
|
||||
cv::Mat dst_gold;
|
||||
cv::cvtColor(src, dst_gold, cv::COLOR_BGR2Lab);
|
||||
|
||||
EXPECT_MAT_NEAR(src, dst_bgr, 10);
|
||||
EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_8U ? 1 : 1e-3);
|
||||
}
|
||||
|
||||
GPU_TEST_P(CvtColor, RGB2Lab)
|
||||
{
|
||||
if (depth != CV_8U)
|
||||
if (depth == CV_16U)
|
||||
return;
|
||||
|
||||
cv::Mat src = readImage("stereobm/aloe-L.png");
|
||||
cv::Mat src = img;
|
||||
|
||||
cv::gpu::GpuMat dst_lab = createMat(src.size(), src.type(), useRoi);
|
||||
cv::gpu::cvtColor(loadMat(src, useRoi), dst_lab, cv::COLOR_RGB2Lab);
|
||||
cv::gpu::GpuMat dst;
|
||||
cv::gpu::cvtColor(loadMat(src, useRoi), dst, cv::COLOR_RGB2Lab);
|
||||
|
||||
cv::gpu::GpuMat dst_bgr = createMat(src.size(), src.type(), useRoi);
|
||||
cv::gpu::cvtColor(dst_lab, dst_bgr, cv::COLOR_Lab2RGB);
|
||||
cv::Mat dst_gold;
|
||||
cv::cvtColor(src, dst_gold, cv::COLOR_RGB2Lab);
|
||||
|
||||
EXPECT_MAT_NEAR(src, dst_bgr, 10);
|
||||
EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_8U ? 1 : 1e-3);
|
||||
}
|
||||
|
||||
GPU_TEST_P(CvtColor, BGRA2Lab4)
|
||||
{
|
||||
if (depth == CV_16U)
|
||||
return;
|
||||
|
||||
cv::Mat src;
|
||||
cv::cvtColor(img, src, cv::COLOR_BGR2RGBA);
|
||||
|
||||
cv::gpu::GpuMat dst;
|
||||
cv::gpu::cvtColor(loadMat(src, useRoi), dst, cv::COLOR_BGR2Lab, 4);
|
||||
|
||||
ASSERT_EQ(4, dst.channels());
|
||||
|
||||
cv::Mat dst_gold;
|
||||
cv::cvtColor(src, dst_gold, cv::COLOR_BGR2Lab);
|
||||
|
||||
cv::Mat h_dst(dst);
|
||||
|
||||
cv::Mat channels[4];
|
||||
cv::split(h_dst, channels);
|
||||
cv::merge(channels, 3, h_dst);
|
||||
|
||||
EXPECT_MAT_NEAR(dst_gold, h_dst, depth == CV_8U ? 1 : 1e-3);
|
||||
}
|
||||
|
||||
GPU_TEST_P(CvtColor, LBGR2Lab)
|
||||
{
|
||||
if (depth == CV_16U)
|
||||
return;
|
||||
|
||||
cv::Mat src = img;
|
||||
|
||||
cv::gpu::GpuMat dst;
|
||||
cv::gpu::cvtColor(loadMat(src, useRoi), dst, cv::COLOR_LBGR2Lab);
|
||||
|
||||
cv::Mat dst_gold;
|
||||
cv::cvtColor(src, dst_gold, cv::COLOR_LBGR2Lab);
|
||||
|
||||
EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_8U ? 1 : 1e-3);
|
||||
}
|
||||
|
||||
GPU_TEST_P(CvtColor, LRGB2Lab)
|
||||
{
|
||||
if (depth == CV_16U)
|
||||
return;
|
||||
|
||||
cv::Mat src = img;
|
||||
|
||||
cv::gpu::GpuMat dst;
|
||||
cv::gpu::cvtColor(loadMat(src, useRoi), dst, cv::COLOR_LRGB2Lab);
|
||||
|
||||
cv::Mat dst_gold;
|
||||
cv::cvtColor(src, dst_gold, cv::COLOR_LRGB2Lab);
|
||||
|
||||
EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_8U ? 1 : 1e-3);
|
||||
}
|
||||
|
||||
GPU_TEST_P(CvtColor, LBGRA2Lab4)
|
||||
{
|
||||
if (depth == CV_16U)
|
||||
return;
|
||||
|
||||
cv::Mat src;
|
||||
cv::cvtColor(img, src, cv::COLOR_BGR2RGBA);
|
||||
|
||||
cv::gpu::GpuMat dst;
|
||||
cv::gpu::cvtColor(loadMat(src, useRoi), dst, cv::COLOR_LBGR2Lab, 4);
|
||||
|
||||
ASSERT_EQ(4, dst.channels());
|
||||
|
||||
cv::Mat dst_gold;
|
||||
cv::cvtColor(src, dst_gold, cv::COLOR_LBGR2Lab);
|
||||
|
||||
cv::Mat h_dst(dst);
|
||||
|
||||
cv::Mat channels[4];
|
||||
cv::split(h_dst, channels);
|
||||
cv::merge(channels, 3, h_dst);
|
||||
|
||||
EXPECT_MAT_NEAR(dst_gold, h_dst, depth == CV_8U ? 1 : 1e-3);
|
||||
}
|
||||
|
||||
GPU_TEST_P(CvtColor, Lab2BGR)
|
||||
{
|
||||
if (depth == CV_16U)
|
||||
return;
|
||||
|
||||
cv::Mat src;
|
||||
cv::cvtColor(img, src, cv::COLOR_BGR2Lab);
|
||||
|
||||
cv::gpu::GpuMat dst;
|
||||
cv::gpu::cvtColor(loadMat(src, useRoi), dst, cv::COLOR_Lab2BGR);
|
||||
|
||||
cv::Mat dst_gold;
|
||||
cv::cvtColor(src, dst_gold, cv::COLOR_Lab2BGR);
|
||||
|
||||
EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_8U ? 1 : 1e-5);
|
||||
}
|
||||
|
||||
GPU_TEST_P(CvtColor, Lab2RGB)
|
||||
{
|
||||
if (depth == CV_16U)
|
||||
return;
|
||||
|
||||
cv::Mat src;
|
||||
cv::cvtColor(img, src, cv::COLOR_BGR2Lab);
|
||||
|
||||
cv::gpu::GpuMat dst;
|
||||
cv::gpu::cvtColor(loadMat(src, useRoi), dst, cv::COLOR_Lab2RGB);
|
||||
|
||||
cv::Mat dst_gold;
|
||||
cv::cvtColor(src, dst_gold, cv::COLOR_Lab2RGB);
|
||||
|
||||
EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_8U ? 1 : 1e-5);
|
||||
}
|
||||
|
||||
GPU_TEST_P(CvtColor, Lab2BGRA)
|
||||
{
|
||||
if (depth == CV_16U)
|
||||
return;
|
||||
|
||||
cv::Mat src;
|
||||
cv::cvtColor(img, src, cv::COLOR_BGR2Lab);
|
||||
|
||||
cv::gpu::GpuMat dst;
|
||||
cv::gpu::cvtColor(loadMat(src, useRoi), dst, cv::COLOR_Lab2BGR, 4);
|
||||
|
||||
ASSERT_EQ(4, dst.channels());
|
||||
|
||||
cv::Mat dst_gold;
|
||||
cv::cvtColor(src, dst_gold, cv::COLOR_Lab2BGR, 4);
|
||||
|
||||
EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_8U ? 1 : 1e-5);
|
||||
}
|
||||
|
||||
GPU_TEST_P(CvtColor, Lab2LBGR)
|
||||
{
|
||||
if (depth == CV_16U)
|
||||
return;
|
||||
|
||||
cv::Mat src;
|
||||
cv::cvtColor(img, src, cv::COLOR_BGR2Lab);
|
||||
|
||||
cv::gpu::GpuMat dst;
|
||||
cv::gpu::cvtColor(loadMat(src, useRoi), dst, cv::COLOR_Lab2LBGR);
|
||||
|
||||
cv::Mat dst_gold;
|
||||
cv::cvtColor(src, dst_gold, cv::COLOR_Lab2LBGR);
|
||||
|
||||
EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_8U ? 1 : 1e-5);
|
||||
}
|
||||
|
||||
GPU_TEST_P(CvtColor, Lab2LRGB)
|
||||
{
|
||||
if (depth == CV_16U)
|
||||
return;
|
||||
|
||||
cv::Mat src;
|
||||
cv::cvtColor(img, src, cv::COLOR_BGR2Lab);
|
||||
|
||||
cv::gpu::GpuMat dst;
|
||||
cv::gpu::cvtColor(loadMat(src, useRoi), dst, cv::COLOR_Lab2LRGB);
|
||||
|
||||
cv::Mat dst_gold;
|
||||
cv::cvtColor(src, dst_gold, cv::COLOR_Lab2LRGB);
|
||||
|
||||
EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_8U ? 1 : 1e-5);
|
||||
}
|
||||
|
||||
GPU_TEST_P(CvtColor, Lab2LRGBA)
|
||||
{
|
||||
if (depth == CV_16U)
|
||||
return;
|
||||
|
||||
cv::Mat src;
|
||||
cv::cvtColor(img, src, cv::COLOR_BGR2Lab);
|
||||
|
||||
cv::gpu::GpuMat dst;
|
||||
cv::gpu::cvtColor(loadMat(src, useRoi), dst, cv::COLOR_Lab2LRGB, 4);
|
||||
|
||||
cv::Mat dst_gold;
|
||||
cv::cvtColor(src, dst_gold, cv::COLOR_Lab2LRGB, 4);
|
||||
|
||||
EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_8U ? 1 : 1e-5);
|
||||
}
|
||||
|
||||
GPU_TEST_P(CvtColor, BGR2Luv)
|
||||
{
|
||||
if (depth != CV_8U)
|
||||
if (depth == CV_16U)
|
||||
return;
|
||||
|
||||
cv::Mat src = img;
|
||||
|
||||
cv::gpu::GpuMat dst_luv = createMat(src.size(), src.type(), useRoi);
|
||||
cv::gpu::cvtColor(loadMat(src, useRoi), dst_luv, cv::COLOR_BGR2Luv);
|
||||
cv::gpu::GpuMat dst;
|
||||
cv::gpu::cvtColor(loadMat(src, useRoi), dst, cv::COLOR_BGR2Luv);
|
||||
|
||||
cv::gpu::GpuMat dst_rgb = createMat(src.size(), src.type(), useRoi);
|
||||
cv::gpu::cvtColor(dst_luv, dst_rgb, cv::COLOR_Luv2BGR);
|
||||
cv::Mat dst_gold;
|
||||
cv::cvtColor(src, dst_gold, cv::COLOR_BGR2Luv);
|
||||
|
||||
EXPECT_MAT_NEAR(src, dst_rgb, 10);
|
||||
EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_8U ? 1 : 1e-3);
|
||||
}
|
||||
|
||||
GPU_TEST_P(CvtColor, RGB2Luv)
|
||||
{
|
||||
if (depth != CV_8U)
|
||||
if (depth == CV_16U)
|
||||
return;
|
||||
|
||||
cv::Mat src = img;
|
||||
|
||||
cv::gpu::GpuMat dst_luv = createMat(src.size(), src.type(), useRoi);
|
||||
cv::gpu::cvtColor(loadMat(src, useRoi), dst_luv, cv::COLOR_RGB2Luv);
|
||||
cv::gpu::GpuMat dst;
|
||||
cv::gpu::cvtColor(loadMat(src, useRoi), dst, cv::COLOR_RGB2Luv);
|
||||
|
||||
cv::gpu::GpuMat dst_rgb = createMat(src.size(), src.type(), useRoi);
|
||||
cv::gpu::cvtColor(dst_luv, dst_rgb, cv::COLOR_Luv2RGB);
|
||||
cv::Mat dst_gold;
|
||||
cv::cvtColor(src, dst_gold, cv::COLOR_RGB2Luv);
|
||||
|
||||
EXPECT_MAT_NEAR(src, dst_rgb, 10);
|
||||
EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_8U ? 1 : 1e-3);
|
||||
}
|
||||
|
||||
GPU_TEST_P(CvtColor, BGRA2Luv4)
|
||||
{
|
||||
if (depth == CV_16U)
|
||||
return;
|
||||
|
||||
cv::Mat src;
|
||||
cv::cvtColor(img, src, cv::COLOR_BGR2RGBA);
|
||||
|
||||
cv::gpu::GpuMat dst;
|
||||
cv::gpu::cvtColor(loadMat(src, useRoi), dst, cv::COLOR_BGR2Luv, 4);
|
||||
|
||||
ASSERT_EQ(4, dst.channels());
|
||||
|
||||
cv::Mat dst_gold;
|
||||
cv::cvtColor(src, dst_gold, cv::COLOR_BGR2Luv);
|
||||
|
||||
cv::Mat h_dst(dst);
|
||||
|
||||
cv::Mat channels[4];
|
||||
cv::split(h_dst, channels);
|
||||
cv::merge(channels, 3, h_dst);
|
||||
|
||||
EXPECT_MAT_NEAR(dst_gold, h_dst, depth == CV_8U ? 1 : 1e-3);
|
||||
}
|
||||
|
||||
GPU_TEST_P(CvtColor, LBGR2Luv)
|
||||
{
|
||||
if (depth == CV_16U)
|
||||
return;
|
||||
|
||||
cv::Mat src = img;
|
||||
|
||||
cv::gpu::GpuMat dst;
|
||||
cv::gpu::cvtColor(loadMat(src, useRoi), dst, cv::COLOR_LBGR2Luv);
|
||||
|
||||
cv::Mat dst_gold;
|
||||
cv::cvtColor(src, dst_gold, cv::COLOR_LBGR2Luv);
|
||||
|
||||
EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_8U ? 1 : 1e-3);
|
||||
}
|
||||
|
||||
GPU_TEST_P(CvtColor, LRGB2Luv)
|
||||
{
|
||||
if (depth == CV_16U)
|
||||
return;
|
||||
|
||||
cv::Mat src = img;
|
||||
|
||||
cv::gpu::GpuMat dst;
|
||||
cv::gpu::cvtColor(loadMat(src, useRoi), dst, cv::COLOR_LRGB2Luv);
|
||||
|
||||
cv::Mat dst_gold;
|
||||
cv::cvtColor(src, dst_gold, cv::COLOR_LRGB2Luv);
|
||||
|
||||
EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_8U ? 1 : 1e-3);
|
||||
}
|
||||
|
||||
GPU_TEST_P(CvtColor, LBGRA2Luv4)
|
||||
{
|
||||
if (depth == CV_16U)
|
||||
return;
|
||||
|
||||
cv::Mat src;
|
||||
cv::cvtColor(img, src, cv::COLOR_BGR2RGBA);
|
||||
|
||||
cv::gpu::GpuMat dst;
|
||||
cv::gpu::cvtColor(loadMat(src, useRoi), dst, cv::COLOR_LBGR2Luv, 4);
|
||||
|
||||
ASSERT_EQ(4, dst.channels());
|
||||
|
||||
cv::Mat dst_gold;
|
||||
cv::cvtColor(src, dst_gold, cv::COLOR_LBGR2Luv);
|
||||
|
||||
cv::Mat h_dst(dst);
|
||||
|
||||
cv::Mat channels[4];
|
||||
cv::split(h_dst, channels);
|
||||
cv::merge(channels, 3, h_dst);
|
||||
|
||||
EXPECT_MAT_NEAR(dst_gold, h_dst, depth == CV_8U ? 1 : 1e-3);
|
||||
}
|
||||
|
||||
GPU_TEST_P(CvtColor, Luv2BGR)
|
||||
{
|
||||
if (depth == CV_16U)
|
||||
return;
|
||||
|
||||
cv::Mat src;
|
||||
cv::cvtColor(img, src, cv::COLOR_BGR2Luv);
|
||||
|
||||
cv::gpu::GpuMat dst;
|
||||
cv::gpu::cvtColor(loadMat(src, useRoi), dst, cv::COLOR_Luv2BGR);
|
||||
|
||||
cv::Mat dst_gold;
|
||||
cv::cvtColor(src, dst_gold, cv::COLOR_Luv2BGR);
|
||||
|
||||
EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_8U ? 1 : 1e-4);
|
||||
}
|
||||
|
||||
GPU_TEST_P(CvtColor, Luv2RGB)
|
||||
{
|
||||
if (depth == CV_16U)
|
||||
return;
|
||||
|
||||
cv::Mat src;
|
||||
cv::cvtColor(img, src, cv::COLOR_BGR2Luv);
|
||||
|
||||
cv::gpu::GpuMat dst;
|
||||
cv::gpu::cvtColor(loadMat(src, useRoi), dst, cv::COLOR_Luv2RGB);
|
||||
|
||||
cv::Mat dst_gold;
|
||||
cv::cvtColor(src, dst_gold, cv::COLOR_Luv2RGB);
|
||||
|
||||
EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_8U ? 1 : 1e-4);
|
||||
}
|
||||
|
||||
GPU_TEST_P(CvtColor, Luv2BGRA)
|
||||
{
|
||||
if (depth == CV_16U)
|
||||
return;
|
||||
|
||||
cv::Mat src;
|
||||
cv::cvtColor(img, src, cv::COLOR_BGR2Luv);
|
||||
|
||||
cv::gpu::GpuMat dst;
|
||||
cv::gpu::cvtColor(loadMat(src, useRoi), dst, cv::COLOR_Luv2BGR, 4);
|
||||
|
||||
ASSERT_EQ(4, dst.channels());
|
||||
|
||||
cv::Mat dst_gold;
|
||||
cv::cvtColor(src, dst_gold, cv::COLOR_Luv2BGR, 4);
|
||||
|
||||
EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_8U ? 1 : 1e-4);
|
||||
}
|
||||
|
||||
GPU_TEST_P(CvtColor, Luv2LBGR)
|
||||
{
|
||||
if (depth == CV_16U)
|
||||
return;
|
||||
|
||||
cv::Mat src;
|
||||
cv::cvtColor(img, src, cv::COLOR_BGR2Luv);
|
||||
|
||||
cv::gpu::GpuMat dst;
|
||||
cv::gpu::cvtColor(loadMat(src, useRoi), dst, cv::COLOR_Luv2LBGR);
|
||||
|
||||
cv::Mat dst_gold;
|
||||
cv::cvtColor(src, dst_gold, cv::COLOR_Luv2LBGR);
|
||||
|
||||
EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_8U ? 1 : 1e-4);
|
||||
}
|
||||
|
||||
GPU_TEST_P(CvtColor, Luv2LRGB)
|
||||
{
|
||||
if (depth == CV_16U)
|
||||
return;
|
||||
|
||||
cv::Mat src;
|
||||
cv::cvtColor(img, src, cv::COLOR_BGR2Luv);
|
||||
|
||||
cv::gpu::GpuMat dst;
|
||||
cv::gpu::cvtColor(loadMat(src, useRoi), dst, cv::COLOR_Luv2LRGB);
|
||||
|
||||
cv::Mat dst_gold;
|
||||
cv::cvtColor(src, dst_gold, cv::COLOR_Luv2LRGB);
|
||||
|
||||
EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_8U ? 1 : 1e-4);
|
||||
}
|
||||
|
||||
GPU_TEST_P(CvtColor, Luv2LRGBA)
|
||||
{
|
||||
if (depth == CV_16U)
|
||||
return;
|
||||
|
||||
cv::Mat src;
|
||||
cv::cvtColor(img, src, cv::COLOR_BGR2Luv);
|
||||
|
||||
cv::gpu::GpuMat dst;
|
||||
cv::gpu::cvtColor(loadMat(src, useRoi), dst, cv::COLOR_Luv2LRGB, 4);
|
||||
|
||||
cv::Mat dst_gold;
|
||||
cv::cvtColor(src, dst_gold, cv::COLOR_Luv2LRGB, 4);
|
||||
|
||||
EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_8U ? 1 : 1e-4);
|
||||
}
|
||||
|
||||
#if defined (CUDA_VERSION) && (CUDA_VERSION >= 5000)
|
||||
|
||||
GPU_TEST_P(CvtColor, RGBA2mRGBA)
|
||||
{
|
||||
if (depth != CV_8U)
|
||||
|
||||
@@ -1124,7 +1124,7 @@ GPU_TEST_P(Divide_Scalar, WithOutScale)
|
||||
cv::Mat dst_gold;
|
||||
cv::divide(mat, val, dst_gold, 1, depth.second);
|
||||
|
||||
EXPECT_MAT_NEAR(dst_gold, dst, depth.first >= CV_32F || depth.second >= CV_32F ? 1e-4 : 0.0);
|
||||
EXPECT_MAT_NEAR(dst_gold, dst, depth.first >= CV_32F || depth.second >= CV_32F ? 1e-4 : 1.0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1154,7 +1154,7 @@ GPU_TEST_P(Divide_Scalar, WithScale)
|
||||
cv::Mat dst_gold;
|
||||
cv::divide(mat, val, dst_gold, scale, depth.second);
|
||||
|
||||
EXPECT_MAT_NEAR(dst_gold, dst, depth.first >= CV_32F || depth.second >= CV_32F ? 1e-2 : 0.0);
|
||||
EXPECT_MAT_NEAR(dst_gold, dst, depth.first >= CV_32F || depth.second >= CV_32F ? 1e-2 : 1.0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1210,7 +1210,7 @@ GPU_TEST_P(Divide_Scalar_Inv, Accuracy)
|
||||
cv::Mat dst_gold;
|
||||
cv::divide(scale, mat, dst_gold, depth.second);
|
||||
|
||||
EXPECT_MAT_NEAR(dst_gold, dst, depth.first >= CV_32F || depth.second >= CV_32F ? 1e-4 : 0.0);
|
||||
EXPECT_MAT_NEAR(dst_gold, dst, depth.first >= CV_32F || depth.second >= CV_32F ? 1e-4 : 1.0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ struct Labeling : testing::TestWithParam<cv::gpu::DeviceInfo>
|
||||
}
|
||||
};
|
||||
|
||||
GPU_TEST_P(Labeling, ConnectedComponents)
|
||||
GPU_TEST_P(Labeling, DISABLED_ConnectedComponents)
|
||||
{
|
||||
cv::Mat image;
|
||||
cvtColor(loat_image(), image, CV_BGR2GRAY);
|
||||
@@ -186,7 +186,7 @@ GPU_TEST_P(Labeling, ConnectedComponents)
|
||||
|
||||
cv::gpu::connectivityMask(cv::gpu::GpuMat(image), mask, cv::Scalar::all(0), cv::Scalar::all(2));
|
||||
|
||||
ASSERT_NO_THROW(cv::gpu::labelComponents(mask, components));
|
||||
cv::gpu::labelComponents(mask, components);
|
||||
|
||||
host.checkCorrectness(cv::Mat(components));
|
||||
}
|
||||
|
||||
@@ -44,9 +44,9 @@
|
||||
#if defined(HAVE_CUDA) && defined(HAVE_OPENGL)
|
||||
|
||||
/////////////////////////////////////////////
|
||||
// GlBuffer
|
||||
// Buffer
|
||||
|
||||
PARAM_TEST_CASE(GlBuffer, cv::Size, MatType)
|
||||
PARAM_TEST_CASE(Buffer, cv::Size, MatType)
|
||||
{
|
||||
static void SetUpTestCase()
|
||||
{
|
||||
@@ -68,29 +68,29 @@ PARAM_TEST_CASE(GlBuffer, cv::Size, MatType)
|
||||
}
|
||||
};
|
||||
|
||||
GPU_TEST_P(GlBuffer, Constructor1)
|
||||
GPU_TEST_P(Buffer, Constructor1)
|
||||
{
|
||||
cv::GlBuffer buf(size.height, size.width, type, cv::GlBuffer::ARRAY_BUFFER, true);
|
||||
cv::ogl::Buffer buf(size.height, size.width, type, cv::ogl::Buffer::ARRAY_BUFFER, true);
|
||||
|
||||
EXPECT_EQ(size.height, buf.rows());
|
||||
EXPECT_EQ(size.width, buf.cols());
|
||||
EXPECT_EQ(type, buf.type());
|
||||
}
|
||||
|
||||
GPU_TEST_P(GlBuffer, Constructor2)
|
||||
GPU_TEST_P(Buffer, Constructor2)
|
||||
{
|
||||
cv::GlBuffer buf(size, type, cv::GlBuffer::ARRAY_BUFFER, true);
|
||||
cv::ogl::Buffer buf(size, type, cv::ogl::Buffer::ARRAY_BUFFER, true);
|
||||
|
||||
EXPECT_EQ(size.height, buf.rows());
|
||||
EXPECT_EQ(size.width, buf.cols());
|
||||
EXPECT_EQ(type, buf.type());
|
||||
}
|
||||
|
||||
GPU_TEST_P(GlBuffer, ConstructorFromMat)
|
||||
GPU_TEST_P(Buffer, ConstructorFromMat)
|
||||
{
|
||||
cv::Mat gold = randomMat(size, type);
|
||||
|
||||
cv::GlBuffer buf(gold, cv::GlBuffer::ARRAY_BUFFER, true);
|
||||
cv::ogl::Buffer buf(gold, cv::ogl::Buffer::ARRAY_BUFFER, true);
|
||||
|
||||
cv::Mat bufData;
|
||||
buf.copyTo(bufData);
|
||||
@@ -98,12 +98,12 @@ GPU_TEST_P(GlBuffer, ConstructorFromMat)
|
||||
EXPECT_MAT_NEAR(gold, bufData, 0);
|
||||
}
|
||||
|
||||
GPU_TEST_P(GlBuffer, ConstructorFromGpuMat)
|
||||
GPU_TEST_P(Buffer, ConstructorFromGpuMat)
|
||||
{
|
||||
cv::Mat gold = randomMat(size, type);
|
||||
cv::gpu::GpuMat d_gold(gold);
|
||||
|
||||
cv::GlBuffer buf(d_gold, cv::GlBuffer::ARRAY_BUFFER);
|
||||
cv::ogl::Buffer buf(d_gold, cv::ogl::Buffer::ARRAY_BUFFER);
|
||||
|
||||
cv::Mat bufData;
|
||||
buf.copyTo(bufData);
|
||||
@@ -111,11 +111,11 @@ GPU_TEST_P(GlBuffer, ConstructorFromGpuMat)
|
||||
EXPECT_MAT_NEAR(gold, bufData, 0);
|
||||
}
|
||||
|
||||
GPU_TEST_P(GlBuffer, ConstructorFromGlBuffer)
|
||||
GPU_TEST_P(Buffer, ConstructorFromBuffer)
|
||||
{
|
||||
cv::GlBuffer buf_gold(size, type, cv::GlBuffer::ARRAY_BUFFER, true);
|
||||
cv::ogl::Buffer buf_gold(size, type, cv::ogl::Buffer::ARRAY_BUFFER, true);
|
||||
|
||||
cv::GlBuffer buf(buf_gold);
|
||||
cv::ogl::Buffer buf(buf_gold);
|
||||
|
||||
EXPECT_EQ(buf_gold.bufId(), buf.bufId());
|
||||
EXPECT_EQ(buf_gold.rows(), buf.rows());
|
||||
@@ -123,7 +123,7 @@ GPU_TEST_P(GlBuffer, ConstructorFromGlBuffer)
|
||||
EXPECT_EQ(buf_gold.type(), buf.type());
|
||||
}
|
||||
|
||||
GPU_TEST_P(GlBuffer, ConstructorFromGlTexture2D)
|
||||
GPU_TEST_P(Buffer, ConstructorFromTexture2D)
|
||||
{
|
||||
const int depth = CV_MAT_DEPTH(type);
|
||||
const int cn = CV_MAT_CN(type);
|
||||
@@ -132,9 +132,9 @@ GPU_TEST_P(GlBuffer, ConstructorFromGlTexture2D)
|
||||
return;
|
||||
|
||||
cv::Mat gold = randomMat(size, type, 0, 1.0);
|
||||
cv::GlTexture2D tex_gold(gold, true);
|
||||
cv::ogl::Texture2D tex_gold(gold, true);
|
||||
|
||||
cv::GlBuffer buf(tex_gold, cv::GlBuffer::PIXEL_PACK_BUFFER, true);
|
||||
cv::ogl::Buffer buf(tex_gold, cv::ogl::Buffer::PIXEL_PACK_BUFFER, true);
|
||||
|
||||
cv::Mat bufData;
|
||||
buf.copyTo(bufData);
|
||||
@@ -142,22 +142,22 @@ GPU_TEST_P(GlBuffer, ConstructorFromGlTexture2D)
|
||||
EXPECT_MAT_NEAR(gold, bufData, 1e-2);
|
||||
}
|
||||
|
||||
GPU_TEST_P(GlBuffer, Create)
|
||||
GPU_TEST_P(Buffer, Create)
|
||||
{
|
||||
cv::GlBuffer buf;
|
||||
buf.create(size.height, size.width, type, cv::GlBuffer::ARRAY_BUFFER, true);
|
||||
cv::ogl::Buffer buf;
|
||||
buf.create(size.height, size.width, type, cv::ogl::Buffer::ARRAY_BUFFER, true);
|
||||
|
||||
EXPECT_EQ(size.height, buf.rows());
|
||||
EXPECT_EQ(size.width, buf.cols());
|
||||
EXPECT_EQ(type, buf.type());
|
||||
}
|
||||
|
||||
GPU_TEST_P(GlBuffer, CopyFromMat)
|
||||
GPU_TEST_P(Buffer, CopyFromMat)
|
||||
{
|
||||
cv::Mat gold = randomMat(size, type);
|
||||
|
||||
cv::GlBuffer buf;
|
||||
buf.copyFrom(gold, cv::GlBuffer::ARRAY_BUFFER, true);
|
||||
cv::ogl::Buffer buf;
|
||||
buf.copyFrom(gold, cv::ogl::Buffer::ARRAY_BUFFER, true);
|
||||
|
||||
cv::Mat bufData;
|
||||
buf.copyTo(bufData);
|
||||
@@ -165,13 +165,13 @@ GPU_TEST_P(GlBuffer, CopyFromMat)
|
||||
EXPECT_MAT_NEAR(gold, bufData, 0);
|
||||
}
|
||||
|
||||
GPU_TEST_P(GlBuffer, CopyFromGpuMat)
|
||||
GPU_TEST_P(Buffer, CopyFromGpuMat)
|
||||
{
|
||||
cv::Mat gold = randomMat(size, type);
|
||||
cv::gpu::GpuMat d_gold(gold);
|
||||
|
||||
cv::GlBuffer buf;
|
||||
buf.copyFrom(d_gold, cv::GlBuffer::ARRAY_BUFFER, true);
|
||||
cv::ogl::Buffer buf;
|
||||
buf.copyFrom(d_gold, cv::ogl::Buffer::ARRAY_BUFFER, true);
|
||||
|
||||
cv::Mat bufData;
|
||||
buf.copyTo(bufData);
|
||||
@@ -179,13 +179,13 @@ GPU_TEST_P(GlBuffer, CopyFromGpuMat)
|
||||
EXPECT_MAT_NEAR(gold, bufData, 0);
|
||||
}
|
||||
|
||||
GPU_TEST_P(GlBuffer, CopyFromGlBuffer)
|
||||
GPU_TEST_P(Buffer, CopyFromBuffer)
|
||||
{
|
||||
cv::Mat gold = randomMat(size, type);
|
||||
cv::GlBuffer buf_gold(gold, cv::GlBuffer::ARRAY_BUFFER, true);
|
||||
cv::ogl::Buffer buf_gold(gold, cv::ogl::Buffer::ARRAY_BUFFER, true);
|
||||
|
||||
cv::GlBuffer buf;
|
||||
buf.copyFrom(buf_gold, cv::GlBuffer::ARRAY_BUFFER, true);
|
||||
cv::ogl::Buffer buf;
|
||||
buf.copyFrom(buf_gold, cv::ogl::Buffer::ARRAY_BUFFER, true);
|
||||
|
||||
EXPECT_NE(buf_gold.bufId(), buf.bufId());
|
||||
|
||||
@@ -195,7 +195,7 @@ GPU_TEST_P(GlBuffer, CopyFromGlBuffer)
|
||||
EXPECT_MAT_NEAR(gold, bufData, 0);
|
||||
}
|
||||
|
||||
GPU_TEST_P(GlBuffer, CopyFromGlTexture2D)
|
||||
GPU_TEST_P(Buffer, CopyFromTexture2D)
|
||||
{
|
||||
const int depth = CV_MAT_DEPTH(type);
|
||||
const int cn = CV_MAT_CN(type);
|
||||
@@ -204,10 +204,10 @@ GPU_TEST_P(GlBuffer, CopyFromGlTexture2D)
|
||||
return;
|
||||
|
||||
cv::Mat gold = randomMat(size, type, 0, 1.0);
|
||||
cv::GlTexture2D tex_gold(gold, true);
|
||||
cv::ogl::Texture2D tex_gold(gold, true);
|
||||
|
||||
cv::GlBuffer buf;
|
||||
buf.copyFrom(tex_gold, cv::GlBuffer::ARRAY_BUFFER, true);
|
||||
cv::ogl::Buffer buf;
|
||||
buf.copyFrom(tex_gold, cv::ogl::Buffer::ARRAY_BUFFER, true);
|
||||
|
||||
cv::Mat bufData;
|
||||
buf.copyTo(bufData);
|
||||
@@ -215,11 +215,11 @@ GPU_TEST_P(GlBuffer, CopyFromGlTexture2D)
|
||||
EXPECT_MAT_NEAR(gold, bufData, 1e-2);
|
||||
}
|
||||
|
||||
GPU_TEST_P(GlBuffer, CopyToGpuMat)
|
||||
GPU_TEST_P(Buffer, CopyToGpuMat)
|
||||
{
|
||||
cv::Mat gold = randomMat(size, type);
|
||||
|
||||
cv::GlBuffer buf(gold, cv::GlBuffer::ARRAY_BUFFER, true);
|
||||
cv::ogl::Buffer buf(gold, cv::ogl::Buffer::ARRAY_BUFFER, true);
|
||||
|
||||
cv::gpu::GpuMat dst;
|
||||
buf.copyTo(dst);
|
||||
@@ -227,14 +227,14 @@ GPU_TEST_P(GlBuffer, CopyToGpuMat)
|
||||
EXPECT_MAT_NEAR(gold, dst, 0);
|
||||
}
|
||||
|
||||
GPU_TEST_P(GlBuffer, CopyToGlBuffer)
|
||||
GPU_TEST_P(Buffer, CopyToBuffer)
|
||||
{
|
||||
cv::Mat gold = randomMat(size, type);
|
||||
|
||||
cv::GlBuffer buf(gold, cv::GlBuffer::ARRAY_BUFFER, true);
|
||||
cv::ogl::Buffer buf(gold, cv::ogl::Buffer::ARRAY_BUFFER, true);
|
||||
|
||||
cv::GlBuffer dst;
|
||||
buf.copyTo(dst, cv::GlBuffer::ARRAY_BUFFER, true);
|
||||
cv::ogl::Buffer dst;
|
||||
buf.copyTo(dst, cv::ogl::Buffer::ARRAY_BUFFER, true);
|
||||
|
||||
EXPECT_NE(buf.bufId(), dst.bufId());
|
||||
|
||||
@@ -244,7 +244,7 @@ GPU_TEST_P(GlBuffer, CopyToGlBuffer)
|
||||
EXPECT_MAT_NEAR(gold, bufData, 0);
|
||||
}
|
||||
|
||||
GPU_TEST_P(GlBuffer, CopyToGlTexture2D)
|
||||
GPU_TEST_P(Buffer, CopyToTexture2D)
|
||||
{
|
||||
const int depth = CV_MAT_DEPTH(type);
|
||||
const int cn = CV_MAT_CN(type);
|
||||
@@ -254,10 +254,10 @@ GPU_TEST_P(GlBuffer, CopyToGlTexture2D)
|
||||
|
||||
cv::Mat gold = randomMat(size, type, 0, 1.0);
|
||||
|
||||
cv::GlBuffer buf(gold, cv::GlBuffer::PIXEL_PACK_BUFFER, true);
|
||||
cv::ogl::Buffer buf(gold, cv::ogl::Buffer::PIXEL_PACK_BUFFER, true);
|
||||
|
||||
cv::GlTexture2D tex;
|
||||
buf.copyTo(tex, cv::GlBuffer::PIXEL_PACK_BUFFER, true);
|
||||
cv::ogl::Texture2D tex;
|
||||
buf.copyTo(tex, cv::ogl::Buffer::PIXEL_PACK_BUFFER, true);
|
||||
|
||||
cv::Mat texData;
|
||||
tex.copyTo(texData);
|
||||
@@ -265,13 +265,13 @@ GPU_TEST_P(GlBuffer, CopyToGlTexture2D)
|
||||
EXPECT_MAT_NEAR(gold, texData, 1e-2);
|
||||
}
|
||||
|
||||
GPU_TEST_P(GlBuffer, Clone)
|
||||
GPU_TEST_P(Buffer, Clone)
|
||||
{
|
||||
cv::Mat gold = randomMat(size, type);
|
||||
|
||||
cv::GlBuffer buf(gold, cv::GlBuffer::ARRAY_BUFFER, true);
|
||||
cv::ogl::Buffer buf(gold, cv::ogl::Buffer::ARRAY_BUFFER, true);
|
||||
|
||||
cv::GlBuffer dst = buf.clone(cv::GlBuffer::ARRAY_BUFFER, true);
|
||||
cv::ogl::Buffer dst = buf.clone(cv::ogl::Buffer::ARRAY_BUFFER, true);
|
||||
|
||||
EXPECT_NE(buf.bufId(), dst.bufId());
|
||||
|
||||
@@ -281,26 +281,26 @@ GPU_TEST_P(GlBuffer, Clone)
|
||||
EXPECT_MAT_NEAR(gold, bufData, 0);
|
||||
}
|
||||
|
||||
GPU_TEST_P(GlBuffer, MapHostRead)
|
||||
GPU_TEST_P(Buffer, MapHostRead)
|
||||
{
|
||||
cv::Mat gold = randomMat(size, type);
|
||||
|
||||
cv::GlBuffer buf(gold, cv::GlBuffer::ARRAY_BUFFER, true);
|
||||
cv::ogl::Buffer buf(gold, cv::ogl::Buffer::ARRAY_BUFFER, true);
|
||||
|
||||
cv::Mat dst = buf.mapHost(cv::GlBuffer::READ_ONLY);
|
||||
cv::Mat dst = buf.mapHost(cv::ogl::Buffer::READ_ONLY);
|
||||
|
||||
EXPECT_MAT_NEAR(gold, dst, 0);
|
||||
|
||||
buf.unmapHost();
|
||||
}
|
||||
|
||||
GPU_TEST_P(GlBuffer, MapHostWrite)
|
||||
GPU_TEST_P(Buffer, MapHostWrite)
|
||||
{
|
||||
cv::Mat gold = randomMat(size, type);
|
||||
|
||||
cv::GlBuffer buf(size, type, cv::GlBuffer::ARRAY_BUFFER, true);
|
||||
cv::ogl::Buffer buf(size, type, cv::ogl::Buffer::ARRAY_BUFFER, true);
|
||||
|
||||
cv::Mat dst = buf.mapHost(cv::GlBuffer::WRITE_ONLY);
|
||||
cv::Mat dst = buf.mapHost(cv::ogl::Buffer::WRITE_ONLY);
|
||||
gold.copyTo(dst);
|
||||
buf.unmapHost();
|
||||
dst.release();
|
||||
@@ -311,11 +311,11 @@ GPU_TEST_P(GlBuffer, MapHostWrite)
|
||||
EXPECT_MAT_NEAR(gold, bufData, 0);
|
||||
}
|
||||
|
||||
GPU_TEST_P(GlBuffer, MapDevice)
|
||||
GPU_TEST_P(Buffer, MapDevice)
|
||||
{
|
||||
cv::Mat gold = randomMat(size, type);
|
||||
|
||||
cv::GlBuffer buf(gold, cv::GlBuffer::ARRAY_BUFFER, true);
|
||||
cv::ogl::Buffer buf(gold, cv::ogl::Buffer::ARRAY_BUFFER, true);
|
||||
|
||||
cv::gpu::GpuMat dst = buf.mapDevice();
|
||||
|
||||
@@ -324,12 +324,12 @@ GPU_TEST_P(GlBuffer, MapDevice)
|
||||
buf.unmapDevice();
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(OpenGL, GlBuffer, testing::Combine(DIFFERENT_SIZES, ALL_TYPES));
|
||||
INSTANTIATE_TEST_CASE_P(OpenGL, Buffer, testing::Combine(DIFFERENT_SIZES, ALL_TYPES));
|
||||
|
||||
/////////////////////////////////////////////
|
||||
// GlTexture2D
|
||||
// Texture2D
|
||||
|
||||
PARAM_TEST_CASE(GlTexture2D, cv::Size, MatType)
|
||||
PARAM_TEST_CASE(Texture2D, cv::Size, MatType)
|
||||
{
|
||||
static void SetUpTestCase()
|
||||
{
|
||||
@@ -345,7 +345,7 @@ PARAM_TEST_CASE(GlTexture2D, cv::Size, MatType)
|
||||
int type;
|
||||
int depth;
|
||||
int cn;
|
||||
cv::GlTexture2D::Format format;
|
||||
cv::ogl::Texture2D::Format format;
|
||||
|
||||
virtual void SetUp()
|
||||
{
|
||||
@@ -354,33 +354,33 @@ PARAM_TEST_CASE(GlTexture2D, cv::Size, MatType)
|
||||
|
||||
depth = CV_MAT_DEPTH(type);
|
||||
cn = CV_MAT_CN(type);
|
||||
format = cn == 1 ? cv::GlTexture2D::DEPTH_COMPONENT : cn == 3 ? cv::GlTexture2D::RGB : cn == 4 ? cv::GlTexture2D::RGBA : cv::GlTexture2D::NONE;
|
||||
format = cn == 1 ? cv::ogl::Texture2D::DEPTH_COMPONENT : cn == 3 ? cv::ogl::Texture2D::RGB : cn == 4 ? cv::ogl::Texture2D::RGBA : cv::ogl::Texture2D::NONE;
|
||||
}
|
||||
};
|
||||
|
||||
GPU_TEST_P(GlTexture2D, Constructor1)
|
||||
GPU_TEST_P(Texture2D, Constructor1)
|
||||
{
|
||||
cv::GlTexture2D tex(size.height, size.width, format, true);
|
||||
cv::ogl::Texture2D tex(size.height, size.width, format, true);
|
||||
|
||||
EXPECT_EQ(size.height, tex.rows());
|
||||
EXPECT_EQ(size.width, tex.cols());
|
||||
EXPECT_EQ(format, tex.format());
|
||||
}
|
||||
|
||||
GPU_TEST_P(GlTexture2D, Constructor2)
|
||||
GPU_TEST_P(Texture2D, Constructor2)
|
||||
{
|
||||
cv::GlTexture2D tex(size, format, true);
|
||||
cv::ogl::Texture2D tex(size, format, true);
|
||||
|
||||
EXPECT_EQ(size.height, tex.rows());
|
||||
EXPECT_EQ(size.width, tex.cols());
|
||||
EXPECT_EQ(format, tex.format());
|
||||
}
|
||||
|
||||
GPU_TEST_P(GlTexture2D, ConstructorFromMat)
|
||||
GPU_TEST_P(Texture2D, ConstructorFromMat)
|
||||
{
|
||||
cv::Mat gold = randomMat(size, type, 0, depth == CV_8U ? 255 : 1);
|
||||
|
||||
cv::GlTexture2D tex(gold, true);
|
||||
cv::ogl::Texture2D tex(gold, true);
|
||||
|
||||
cv::Mat texData;
|
||||
tex.copyTo(texData, depth);
|
||||
@@ -388,12 +388,12 @@ GPU_TEST_P(GlTexture2D, ConstructorFromMat)
|
||||
EXPECT_MAT_NEAR(gold, texData, 1e-2);
|
||||
}
|
||||
|
||||
GPU_TEST_P(GlTexture2D, ConstructorFromGpuMat)
|
||||
GPU_TEST_P(Texture2D, ConstructorFromGpuMat)
|
||||
{
|
||||
cv::Mat gold = randomMat(size, type, 0, depth == CV_8U ? 255 : 1);
|
||||
cv::gpu::GpuMat d_gold(gold);
|
||||
|
||||
cv::GlTexture2D tex(d_gold, true);
|
||||
cv::ogl::Texture2D tex(d_gold, true);
|
||||
|
||||
cv::Mat texData;
|
||||
tex.copyTo(texData, depth);
|
||||
@@ -401,12 +401,12 @@ GPU_TEST_P(GlTexture2D, ConstructorFromGpuMat)
|
||||
EXPECT_MAT_NEAR(gold, texData, 1e-2);
|
||||
}
|
||||
|
||||
GPU_TEST_P(GlTexture2D, ConstructorFromGlBuffer)
|
||||
GPU_TEST_P(Texture2D, ConstructorFromBuffer)
|
||||
{
|
||||
cv::Mat gold = randomMat(size, type, 0, depth == CV_8U ? 255 : 1);
|
||||
cv::GlBuffer buf_gold(gold, cv::GlBuffer::PIXEL_UNPACK_BUFFER, true);
|
||||
cv::ogl::Buffer buf_gold(gold, cv::ogl::Buffer::PIXEL_UNPACK_BUFFER, true);
|
||||
|
||||
cv::GlTexture2D tex(buf_gold, true);
|
||||
cv::ogl::Texture2D tex(buf_gold, true);
|
||||
|
||||
cv::Mat texData;
|
||||
tex.copyTo(texData, depth);
|
||||
@@ -414,10 +414,10 @@ GPU_TEST_P(GlTexture2D, ConstructorFromGlBuffer)
|
||||
EXPECT_MAT_NEAR(gold, texData, 1e-2);
|
||||
}
|
||||
|
||||
GPU_TEST_P(GlTexture2D, ConstructorFromGlTexture2D)
|
||||
GPU_TEST_P(Texture2D, ConstructorFromTexture2D)
|
||||
{
|
||||
cv::GlTexture2D tex_gold(size, format, true);
|
||||
cv::GlTexture2D tex(tex_gold);
|
||||
cv::ogl::Texture2D tex_gold(size, format, true);
|
||||
cv::ogl::Texture2D tex(tex_gold);
|
||||
|
||||
EXPECT_EQ(tex_gold.texId(), tex.texId());
|
||||
EXPECT_EQ(tex_gold.rows(), tex.rows());
|
||||
@@ -425,9 +425,9 @@ GPU_TEST_P(GlTexture2D, ConstructorFromGlTexture2D)
|
||||
EXPECT_EQ(tex_gold.format(), tex.format());
|
||||
}
|
||||
|
||||
GPU_TEST_P(GlTexture2D, Create)
|
||||
GPU_TEST_P(Texture2D, Create)
|
||||
{
|
||||
cv::GlTexture2D tex;
|
||||
cv::ogl::Texture2D tex;
|
||||
tex.create(size.height, size.width, format, true);
|
||||
|
||||
EXPECT_EQ(size.height, tex.rows());
|
||||
@@ -435,11 +435,11 @@ GPU_TEST_P(GlTexture2D, Create)
|
||||
EXPECT_EQ(format, tex.format());
|
||||
}
|
||||
|
||||
GPU_TEST_P(GlTexture2D, CopyFromMat)
|
||||
GPU_TEST_P(Texture2D, CopyFromMat)
|
||||
{
|
||||
cv::Mat gold = randomMat(size, type, 0, depth == CV_8U ? 255 : 1);
|
||||
|
||||
cv::GlTexture2D tex;
|
||||
cv::ogl::Texture2D tex;
|
||||
tex.copyFrom(gold, true);
|
||||
|
||||
cv::Mat texData;
|
||||
@@ -448,12 +448,12 @@ GPU_TEST_P(GlTexture2D, CopyFromMat)
|
||||
EXPECT_MAT_NEAR(gold, texData, 1e-2);
|
||||
}
|
||||
|
||||
GPU_TEST_P(GlTexture2D, CopyFromGpuMat)
|
||||
GPU_TEST_P(Texture2D, CopyFromGpuMat)
|
||||
{
|
||||
cv::Mat gold = randomMat(size, type, 0, depth == CV_8U ? 255 : 1);
|
||||
cv::gpu::GpuMat d_gold(gold);
|
||||
|
||||
cv::GlTexture2D tex;
|
||||
cv::ogl::Texture2D tex;
|
||||
tex.copyFrom(d_gold, true);
|
||||
|
||||
cv::Mat texData;
|
||||
@@ -462,12 +462,12 @@ GPU_TEST_P(GlTexture2D, CopyFromGpuMat)
|
||||
EXPECT_MAT_NEAR(gold, texData, 1e-2);
|
||||
}
|
||||
|
||||
GPU_TEST_P(GlTexture2D, CopyFromGlBuffer)
|
||||
GPU_TEST_P(Texture2D, CopyFromBuffer)
|
||||
{
|
||||
cv::Mat gold = randomMat(size, type, 0, depth == CV_8U ? 255 : 1);
|
||||
cv::GlBuffer buf_gold(gold, cv::GlBuffer::PIXEL_UNPACK_BUFFER, true);
|
||||
cv::ogl::Buffer buf_gold(gold, cv::ogl::Buffer::PIXEL_UNPACK_BUFFER, true);
|
||||
|
||||
cv::GlTexture2D tex;
|
||||
cv::ogl::Texture2D tex;
|
||||
tex.copyFrom(buf_gold, true);
|
||||
|
||||
cv::Mat texData;
|
||||
@@ -476,11 +476,11 @@ GPU_TEST_P(GlTexture2D, CopyFromGlBuffer)
|
||||
EXPECT_MAT_NEAR(gold, texData, 1e-2);
|
||||
}
|
||||
|
||||
GPU_TEST_P(GlTexture2D, CopyToGpuMat)
|
||||
GPU_TEST_P(Texture2D, CopyToGpuMat)
|
||||
{
|
||||
cv::Mat gold = randomMat(size, type, 0, depth == CV_8U ? 255 : 1);
|
||||
|
||||
cv::GlTexture2D tex(gold, true);
|
||||
cv::ogl::Texture2D tex(gold, true);
|
||||
|
||||
cv::gpu::GpuMat dst;
|
||||
tex.copyTo(dst, depth);
|
||||
@@ -488,13 +488,13 @@ GPU_TEST_P(GlTexture2D, CopyToGpuMat)
|
||||
EXPECT_MAT_NEAR(gold, dst, 1e-2);
|
||||
}
|
||||
|
||||
GPU_TEST_P(GlTexture2D, CopyToGlBuffer)
|
||||
GPU_TEST_P(Texture2D, CopyToBuffer)
|
||||
{
|
||||
cv::Mat gold = randomMat(size, type, 0, depth == CV_8U ? 255 : 1);
|
||||
|
||||
cv::GlTexture2D tex(gold, true);
|
||||
cv::ogl::Texture2D tex(gold, true);
|
||||
|
||||
cv::GlBuffer dst;
|
||||
cv::ogl::Buffer dst;
|
||||
tex.copyTo(dst, depth, true);
|
||||
|
||||
cv::Mat bufData;
|
||||
@@ -503,6 +503,6 @@ GPU_TEST_P(GlTexture2D, CopyToGlBuffer)
|
||||
EXPECT_MAT_NEAR(gold, bufData, 1e-2);
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(OpenGL, GlTexture2D, testing::Combine(DIFFERENT_SIZES, testing::Values(CV_8UC1, CV_8UC3, CV_8UC4, CV_32FC1, CV_32FC3, CV_32FC4)));
|
||||
INSTANTIATE_TEST_CASE_P(OpenGL, Texture2D, testing::Combine(DIFFERENT_SIZES, testing::Values(CV_8UC1, CV_8UC3, CV_8UC4, CV_32FC1, CV_32FC3, CV_32FC4)));
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user