Commit 5d7bbdc8 authored by Vladislav Vinogradov's avatar Vladislav Vinogradov

gpu module fixes

parent 3156e803
......@@ -4,10 +4,9 @@ endif()
set(the_description "GPU-accelerated Computer Vision")
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef -Wmissing-declarations -Wshadow -Wunused-parameter)
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4127 /wd4100 /wd4324 /wd4512 -Wundef -Wmissing-declarations -Wshadow -Wunused-parameter)
ocv_define_module(gpu opencv_gpuarithm opencv_gpufilters opencv_gpuwarping opencv_gpuimgproc
opencv_gpufeatures2d opencv_gpuoptflow opencv_gpubgsegm opencv_gpustereo)
ocv_define_module(gpu opencv_calib3d opencv_objdetect opencv_gpuarithm opencv_gpuwarping OPTIONAL opencv_gpulegacy)
if(HAVE_CUDA)
add_subdirectory(perf4au)
......
......@@ -9,3 +9,4 @@ gpu. GPU-accelerated Computer Vision
initalization_and_information
data_structures
object_detection
calib3d
......@@ -43,19 +43,56 @@
#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;
......@@ -146,6 +183,8 @@ protected:
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
{
......@@ -175,6 +214,8 @@ private:
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());
......@@ -191,6 +232,8 @@ CV_EXPORTS void connectivityMask(const GpuMat& image, GpuMat& mask, const cv::Sc
//! 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());
......@@ -203,6 +246,8 @@ CV_EXPORTS void solvePnPRansac(const Mat& object, const Mat& image, const Mat& c
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);
......
set(PERF4AU_REQUIRED_DEPS opencv_core opencv_imgproc opencv_highgui opencv_video opencv_legacy opencv_gpu opencv_ts)
set(PERF4AU_REQUIRED_DEPS opencv_core opencv_imgproc opencv_highgui opencv_video opencv_legacy opencv_ml opencv_ts opencv_gpufilters opencv_gpuimgproc opencv_gpuoptflow)
ocv_check_dependencies(${PERF4AU_REQUIRED_DEPS})
......
......@@ -43,7 +43,9 @@
#include "opencv2/ts.hpp"
#include "opencv2/ts/gpu_perf.hpp"
#include "opencv2/gpu.hpp"
#include "opencv2/gpuimgproc.hpp"
#include "opencv2/gpuoptflow.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/video.hpp"
#include "opencv2/legacy.hpp"
......
......@@ -75,7 +75,7 @@ public:
#ifndef HAVE_OPENCV_GPULEGACY
struct cv::gpu::CascadeClassifier_GPU::HaarCascade
struct cv::gpu::CascadeClassifier_GPU::HaarCascade : cv::gpu::CascadeClassifier_GPU::CascadeClassifierImpl
{
public:
HaarCascade()
......@@ -508,6 +508,8 @@ private:
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;
......@@ -518,6 +520,7 @@ private:
Ncv32u bufSize;
ncvSafeCall( nppiStIntegralGetSize_8u32u(roiSize, &bufSize, prop) );
integralBuffer.create(1, bufSize, CV_8UC1);
#endif
candidates.create(1 , frame.width >> 1, CV_32SC4);
}
......
......@@ -43,10 +43,9 @@
#ifndef __OPENCV_PRECOMP_H__
#define __OPENCV_PRECOMP_H__
#include <vector>
#include <iostream>
#include "opencv2/gpu.hpp"
#include "opencv2/gpuarithm.hpp"
#include "opencv2/gpuwarping.hpp"
#include "opencv2/calib3d.hpp"
#include "opencv2/objdetect.hpp"
......@@ -55,7 +54,6 @@
#include "opencv2/opencv_modules.hpp"
#ifdef HAVE_OPENCV_GPULEGACY
# include "opencv2/gpulegacy.hpp"
# include "opencv2/gpulegacy/private.hpp"
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment