move labeling routines from cuda to cudalegacy

This commit is contained in:
Vladislav Vinogradov 2015-01-15 11:18:46 +03:00
parent 3f1fb281be
commit b416e8715d
10 changed files with 29 additions and 28 deletions

View File

@ -58,29 +58,6 @@
namespace cv { namespace cuda {
//////////////////////////// Labeling ////////////////////////////
//! @addtogroup cuda
//! @{
//!performs labeling via graph cuts of a 2D regular 4-connected graph.
CV_EXPORTS void graphcut(GpuMat& terminals, GpuMat& leftTransp, GpuMat& rightTransp, GpuMat& top, GpuMat& bottom, GpuMat& labels,
GpuMat& buf, Stream& stream = Stream::Null());
//!performs labeling via graph cuts of a 2D regular 8-connected graph.
CV_EXPORTS void graphcut(GpuMat& terminals, GpuMat& leftTransp, GpuMat& rightTransp, GpuMat& top, GpuMat& topLeft, GpuMat& topRight,
GpuMat& bottom, GpuMat& bottomLeft, GpuMat& bottomRight,
GpuMat& labels,
GpuMat& buf, Stream& stream = Stream::Null());
//! compute mask for Generalized Flood fill componetns labeling.
CV_EXPORTS void connectivityMask(const GpuMat& image, GpuMat& mask, const cv::Scalar& lo, const cv::Scalar& hi, Stream& stream = Stream::Null());
//! performs connected componnents labeling.
CV_EXPORTS void labelComponents(const GpuMat& mask, GpuMat& components, int flags = 0, Stream& stream = Stream::Null());
//! @}
//////////////////////////// Calib3d ////////////////////////////
//! @addtogroup cuda_calib3d

View File

@ -63,6 +63,10 @@ namespace cv { namespace cuda {
//! @addtogroup cudalegacy
//! @{
//
// ImagePyramid
//
class CV_EXPORTS ImagePyramid : public Algorithm
{
public:
@ -227,6 +231,26 @@ CV_EXPORTS void interpolateFrames(const GpuMat& frame0, const GpuMat& frame1,
CV_EXPORTS void createOpticalFlowNeedleMap(const GpuMat& u, const GpuMat& v, GpuMat& vertex, GpuMat& colors);
//
// Labeling
//
//!performs labeling via graph cuts of a 2D regular 4-connected graph.
CV_EXPORTS void graphcut(GpuMat& terminals, GpuMat& leftTransp, GpuMat& rightTransp, GpuMat& top, GpuMat& bottom, GpuMat& labels,
GpuMat& buf, Stream& stream = Stream::Null());
//!performs labeling via graph cuts of a 2D regular 8-connected graph.
CV_EXPORTS void graphcut(GpuMat& terminals, GpuMat& leftTransp, GpuMat& rightTransp, GpuMat& top, GpuMat& topLeft, GpuMat& topRight,
GpuMat& bottom, GpuMat& bottomLeft, GpuMat& bottomRight,
GpuMat& labels,
GpuMat& buf, Stream& stream = Stream::Null());
//! compute mask for Generalized Flood fill componetns labeling.
CV_EXPORTS void connectivityMask(const GpuMat& image, GpuMat& mask, const cv::Scalar& lo, const cv::Scalar& hi, Stream& stream = Stream::Null());
//! performs connected componnents labeling.
CV_EXPORTS void labelComponents(const GpuMat& mask, GpuMat& components, int flags = 0, Stream& stream = Stream::Null());
//! @}
}}

View File

@ -5,4 +5,4 @@ if(HAVE_CUDA)
endif()
ocv_define_module(stitching opencv_imgproc opencv_features2d opencv_calib3d opencv_objdetect
OPTIONAL opencv_cuda opencv_cudaarithm opencv_cudafilters opencv_cudafeatures2d opencv_xfeatures2d)
OPTIONAL opencv_cuda opencv_cudaarithm opencv_cudafilters opencv_cudafeatures2d opencv_cudalegacy opencv_xfeatures2d)

View File

@ -249,7 +249,7 @@ private:
};
#ifdef HAVE_OPENCV_CUDA
#ifdef HAVE_OPENCV_CUDALEGACY
class CV_EXPORTS GraphCutSeamFinderGpu : public GraphCutSeamFinderBase, public PairwiseSeamFinder
{
public:

View File

@ -83,8 +83,8 @@
# include "opencv2/cudafeatures2d.hpp"
#endif
#ifdef HAVE_OPENCV_CUDA
# include "opencv2/cuda.hpp"
#ifdef HAVE_OPENCV_CUDALEGACY
# include "opencv2/cudalegacy.hpp"
#endif
#ifdef HAVE_OPENCV_XFEATURES2D

View File

@ -1321,7 +1321,7 @@ void GraphCutSeamFinder::find(const std::vector<UMat> &src, const std::vector<Po
}
#ifdef HAVE_OPENCV_CUDA
#ifdef HAVE_OPENCV_CUDALEGACY
void GraphCutSeamFinderGpu::find(const std::vector<UMat> &src, const std::vector<Point> &corners,
std::vector<UMat> &masks)
{