Merge pull request #700 from cuda-geek/fix_build_with_cuda
fix master build with CUDA after latest 2.4 merge
This commit is contained in:
@@ -68,6 +68,8 @@ void cv::gpu::GeneralizedHough_GPU::release() {}
|
||||
|
||||
#else /* !defined (HAVE_CUDA) */
|
||||
|
||||
#include "opencv2/core/utility.hpp"
|
||||
|
||||
namespace cv { namespace gpu { namespace device
|
||||
{
|
||||
namespace hough
|
||||
|
@@ -71,6 +71,7 @@ int cv::gpu::countNonZero(const GpuMat&, GpuMat&) { throw_nogpu(); return 0; }
|
||||
void cv::gpu::reduce(const GpuMat&, GpuMat&, int, int, int, Stream&) { throw_nogpu(); }
|
||||
|
||||
#else
|
||||
#include "opencv2/core/utility.hpp"
|
||||
|
||||
namespace
|
||||
{
|
||||
|
@@ -55,6 +55,7 @@ cv::gpu::StereoConstantSpaceBP::StereoConstantSpaceBP(int, int, int, int, float,
|
||||
void cv::gpu::StereoConstantSpaceBP::operator()(const GpuMat&, const GpuMat&, GpuMat&, Stream&) { throw_nogpu(); }
|
||||
|
||||
#else /* !defined (HAVE_CUDA) */
|
||||
#include "opencv2/core/utility.hpp"
|
||||
|
||||
namespace cv { namespace gpu { namespace device
|
||||
{
|
||||
|
@@ -194,7 +194,7 @@ GPU_TEST_P(MOG, Update)
|
||||
cv::gpu::MOG_GPU mog;
|
||||
cv::gpu::GpuMat foreground = createMat(frame.size(), CV_8UC1, useRoi);
|
||||
|
||||
cv::BackgroundSubtractorMOG mog_gold;
|
||||
cv::Ptr<cv::BackgroundSubtractorMOG> mog_gold = cv::createBackgroundSubtractorMOG();
|
||||
cv::Mat foreground_gold;
|
||||
|
||||
for (int i = 0; i < 10; ++i)
|
||||
@@ -211,7 +211,7 @@ GPU_TEST_P(MOG, Update)
|
||||
|
||||
mog(loadMat(frame, useRoi), foreground, (float)learningRate);
|
||||
|
||||
mog_gold(frame, foreground_gold, learningRate);
|
||||
mog_gold->apply(frame, foreground_gold, learningRate);
|
||||
|
||||
ASSERT_MAT_NEAR(foreground_gold, foreground, 0.0);
|
||||
}
|
||||
@@ -270,7 +270,7 @@ GPU_TEST_P(MOG2, Update)
|
||||
cv::gpu::GpuMat foreground = createMat(frame.size(), CV_8UC1, useRoi);
|
||||
|
||||
cv::Ptr<cv::BackgroundSubtractorMOG2> mog2_gold = cv::createBackgroundSubtractorMOG2();
|
||||
mog2_gold.setDetectShadows(detectShadow);
|
||||
mog2_gold->setDetectShadows(detectShadow);
|
||||
cv::Mat foreground_gold;
|
||||
|
||||
for (int i = 0; i < 10; ++i)
|
||||
@@ -315,7 +315,7 @@ GPU_TEST_P(MOG2, getBackgroundImage)
|
||||
cv::gpu::GpuMat foreground;
|
||||
|
||||
cv::Ptr<cv::BackgroundSubtractorMOG2> mog2_gold = cv::createBackgroundSubtractorMOG2();
|
||||
mog2_gold.setDetectShadows(detectShadow);
|
||||
mog2_gold->setDetectShadows(detectShadow);
|
||||
cv::Mat foreground_gold;
|
||||
|
||||
for (int i = 0; i < 10; ++i)
|
||||
|
Reference in New Issue
Block a user