#ifndef __OPENCV_GPU_HPP__
#define __OPENCV_GPU_HPP__
+#ifndef __cplusplus
+# error gpu.hpp header must be compiled as C++
+#endif
+
#include "opencv2/core/gpumat.hpp"
-#include "opencv2/gpuarithm.hpp"
-#include "opencv2/gpufilters.hpp"
-#include "opencv2/gpuwarping.hpp"
-#include "opencv2/gpuimgproc.hpp"
-#include "opencv2/gpufeatures2d.hpp"
-#include "opencv2/gpuoptflow.hpp"
-#include "opencv2/gpubgsegm.hpp"
-#include "opencv2/gpustereo.hpp"
+
+#if !defined(__OPENCV_BUILD) && !defined(OPENCV_GPU_SKIP_INCLUDE)
+ #include "opencv2/opencv_modules.hpp"
+
+ #ifdef HAVE_OPENCV_GPUARITHM
+ #include "opencv2/gpuarithm.hpp"
+ #endif
+
+ #ifdef HAVE_OPENCV_GPUWARPING
+ #include "opencv2/gpuwarping.hpp"
+ #endif
+
+ #ifdef HAVE_OPENCV_GPUFILTERS
+ #include "opencv2/gpufilters.hpp"
+ #endif
+
+ #ifdef HAVE_OPENCV_GPUIMGPROC
+ #include "opencv2/gpuimgproc.hpp"
+ #endif
+
+ #ifdef HAVE_OPENCV_GPUFEATURES2D
+ #include "opencv2/gpufeatures2d.hpp"
+ #endif
+
+ #ifdef HAVE_OPENCV_GPUOPTFLOW
+ #include "opencv2/gpuoptflow.hpp"
+ #endif
+
+ #ifdef HAVE_OPENCV_GPUBGSEGM
+ #include "opencv2/gpubgsegm.hpp"
+ #endif
+
+ #ifdef HAVE_OPENCV_GPUSTEREO
+ #include "opencv2/gpustereo.hpp"
+ #endif
+
+ #ifdef HAVE_OPENCV_GPUCODEC
+ #include "opencv2/gpucodec.hpp"
+ #endif
+#endif
namespace cv { namespace gpu {
//////////////// HOG (Histogram-of-Oriented-Gradients) Descriptor and Object Detector //////////////
+
struct CV_EXPORTS HOGConfidence
{
double scale;
std::vector<GpuMat> image_scales;
};
+//////////////////////////// CascadeClassifier ////////////////////////////
+
// The cascade classifier class for object detection: supports old haar and new lbp xlm formats and nvbin for haar cascades olny.
class CV_EXPORTS CascadeClassifier_GPU
{
friend class CascadeClassifier_GPU_LBP;
};
+//////////////////////////// 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 connected componnents labeling.
CV_EXPORTS void labelComponents(const GpuMat& mask, GpuMat& components, int flags = 0, Stream& stream = Stream::Null());
+//////////////////////////// Calib3d ////////////////////////////
+
CV_EXPORTS void transformPoints(const GpuMat& src, const Mat& rvec, const Mat& tvec,
GpuMat& dst, Stream& stream = Stream::Null());
int num_iters=100, float max_dist=8.0, int min_inlier_count=100,
std::vector<int>* inliers=NULL);
+//////////////////////////// VStab ////////////////////////////
+
//! removes points (CV_32FC2, single row matrix) with zero mask value
CV_EXPORTS void compactPoints(GpuMat &points0, GpuMat &points1, const GpuMat &mask);
#ifndef HAVE_OPENCV_GPULEGACY
-struct cv::gpu::CascadeClassifier_GPU::HaarCascade
+struct cv::gpu::CascadeClassifier_GPU::HaarCascade : cv::gpu::CascadeClassifier_GPU::CascadeClassifierImpl
{
public:
HaarCascade()
resuzeBuffer.create(frame, CV_8UC1);
integral.create(frame.height + 1, integralFactor * (frame.width + 1), CV_32SC1);
+
+#ifdef HAVE_OPENCV_GPULEGACY
NcvSize32u roiSize;
roiSize.width = frame.width;
roiSize.height = frame.height;
Ncv32u bufSize;
ncvSafeCall( nppiStIntegralGetSize_8u32u(roiSize, &bufSize, prop) );
integralBuffer.create(1, bufSize, CV_8UC1);
+#endif
candidates.create(1 , frame.width >> 1, CV_32SC4);
}