Merge branch 'master' into gpu-cuda-rename
Conflicts: modules/core/include/opencv2/core/cuda.hpp modules/cudacodec/src/thread.cpp modules/cudacodec/src/thread.hpp modules/superres/perf/perf_superres.cpp modules/superres/src/btv_l1_cuda.cpp modules/superres/src/optical_flow.cpp modules/videostab/src/global_motion.cpp modules/videostab/src/inpainting.cpp samples/cpp/stitching_detailed.cpp samples/cpp/videostab.cpp samples/gpu/stereo_multi.cpp
This commit is contained in:
@@ -1269,7 +1269,7 @@ TEST(FarnebackOpticalFlow)
|
||||
|
||||
namespace cv
|
||||
{
|
||||
template<> void Ptr<CvBGStatModel>::delete_obj()
|
||||
template<> void DefaultDeleter<CvBGStatModel>::operator ()(CvBGStatModel* obj) const
|
||||
{
|
||||
cvReleaseBGStatModel(&obj);
|
||||
}
|
||||
|
@@ -291,11 +291,11 @@ StereoMultiGpuStream::StereoMultiGpuStream()
|
||||
{
|
||||
cuda::setDevice(0);
|
||||
d_algs[0] = cuda::createStereoBM(256);
|
||||
streams[0] = new Stream;
|
||||
streams[0] = makePtr<Stream>();
|
||||
|
||||
cuda::setDevice(1);
|
||||
d_algs[1] = cuda::createStereoBM(256);
|
||||
streams[1] = new Stream;
|
||||
streams[1] = makePtr<Stream>();
|
||||
}
|
||||
|
||||
StereoMultiGpuStream::~StereoMultiGpuStream()
|
||||
|
@@ -53,7 +53,7 @@ static Ptr<DenseOpticalFlowExt> createOptFlow(const string& name, bool useGpu)
|
||||
{
|
||||
cerr << "Incorrect Optical Flow algorithm - " << name << endl;
|
||||
}
|
||||
return 0;
|
||||
return Ptr<DenseOpticalFlowExt>();
|
||||
}
|
||||
#if defined(HAVE_OPENCV_OCL)
|
||||
static Ptr<DenseOpticalFlowExt> createOptFlow(const string& name)
|
||||
@@ -73,7 +73,7 @@ static Ptr<DenseOpticalFlowExt> createOptFlow(const string& name)
|
||||
else if (name == "brox")
|
||||
{
|
||||
std::cout<<"brox has not been implemented!\n";
|
||||
return NULL;
|
||||
return Ptr<DenseOpticalFlowExt>();
|
||||
}
|
||||
else if (name == "pyrlk")
|
||||
return createOptFlow_PyrLK_OCL();
|
||||
@@ -81,7 +81,7 @@ static Ptr<DenseOpticalFlowExt> createOptFlow(const string& name)
|
||||
{
|
||||
cerr << "Incorrect Optical Flow algorithm - " << name << endl;
|
||||
}
|
||||
return 0;
|
||||
return Ptr<DenseOpticalFlowExt>();
|
||||
}
|
||||
#endif
|
||||
int main(int argc, const char* argv[])
|
||||
@@ -197,7 +197,7 @@ int main(int argc, const char* argv[])
|
||||
frameSource.release();
|
||||
}
|
||||
}
|
||||
if (frameSource.empty())
|
||||
if (!frameSource)
|
||||
frameSource = createFrameSource_Video(inputVideoName);
|
||||
|
||||
// skip first frame, it is usually corrupted
|
||||
|
Reference in New Issue
Block a user