Global CMake reorganization:

[~] Automatically tracked dependencies between modules
 [+] Support for optional module dependencies
 [+] Options to choose modules to build
 [~] Removed hardcoded modules lists from OpenCVConfig.cmake, opencv.pc and OpenCV.mk
 [+] Added COMPONENTS support for FIND_PACKAGE(OpenCV)
 [~] haartraining and traincascade are moved outside of modules folder since they aren't the modules
This commit is contained in:
Andrey Kamaev
2012-02-03 11:26:49 +00:00
parent ada9158521
commit 984eb99428
96 changed files with 2722 additions and 2103 deletions

View File

@@ -189,7 +189,7 @@ Rect FeatherBlender::createWeightMaps(const vector<Mat> &masks, const vector<Poi
MultiBandBlender::MultiBandBlender(int try_gpu, int num_bands)
{
setNumBands(num_bands);
#ifndef ANDROID
#ifdef HAVE_OPENCV_GPU
can_use_gpu_ = try_gpu && gpu::getCudaEnabledDeviceCount();
#else
can_use_gpu_ = false;
@@ -383,7 +383,7 @@ void createLaplacePyr(const Mat &img, int num_levels, vector<Mat> &pyr)
void createLaplacePyrGpu(const Mat &img, int num_levels, vector<Mat> &pyr)
{
#ifndef ANDROID
#ifdef HAVE_OPENCV_GPU
pyr.resize(num_levels + 1);
vector<gpu::GpuMat> gpu_pyr(num_levels + 1);
@@ -419,7 +419,7 @@ void restoreImageFromLaplacePyr(vector<Mat> &pyr)
void restoreImageFromLaplacePyrGpu(vector<Mat> &pyr)
{
#ifndef ANDROID
#ifdef HAVE_OPENCV_GPU
if (pyr.empty())
return;

View File

@@ -43,9 +43,6 @@
#include "precomp.hpp"
using namespace std;
#ifndef ANDROID
using namespace cv::gpu;
#endif
namespace cv {
namespace detail {

View File

@@ -46,7 +46,7 @@ using namespace std;
using namespace cv;
using namespace cv::detail;
#ifndef ANDROID
#ifdef HAVE_OPENCV_GPU
using namespace cv::gpu;
#endif
@@ -127,7 +127,7 @@ private:
float match_conf_;
};
#ifndef ANDROID
#ifdef HAVE_OPENCV_GPU
class GpuMatcher : public FeaturesMatcher
{
public:
@@ -202,7 +202,7 @@ void CpuMatcher::match(const ImageFeatures &features1, const ImageFeatures &feat
LOG("1->2 & 2->1 matches: " << matches_info.matches.size() << endl);
}
#ifndef ANDROID
#ifdef HAVE_OPENCV_GPU
void GpuMatcher::match(const ImageFeatures &features1, const ImageFeatures &features2, MatchesInfo& matches_info)
{
matches_info.matches.clear();
@@ -398,7 +398,7 @@ void OrbFeaturesFinder::find(const Mat &image, ImageFeatures &features)
}
}
#ifndef ANDROID
#ifdef HAVE_OPENCV_GPU
SurfFeaturesFinderGpu::SurfFeaturesFinderGpu(double hess_thresh, int num_octaves, int num_layers,
int num_octaves_descr, int num_layers_descr)
{
@@ -499,7 +499,7 @@ void FeaturesMatcher::operator ()(const vector<ImageFeatures> &features, vector<
BestOf2NearestMatcher::BestOf2NearestMatcher(bool try_use_gpu, float match_conf, int num_matches_thresh1, int num_matches_thresh2)
{
#ifndef ANDROID
#ifdef HAVE_OPENCV_GPU
if (try_use_gpu && getCudaEnabledDeviceCount() > 0)
impl_ = new GpuMatcher(match_conf);
else

View File

@@ -46,6 +46,7 @@
#ifdef HAVE_CVCONFIG_H
#include "cvconfig.h"
#endif
#include "opencv2/opencv_modules.hpp"
#include <vector>
#include <algorithm>
@@ -69,11 +70,11 @@
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/calib3d/calib3d.hpp"
#ifndef ANDROID
#ifdef HAVE_OPENCV_GPU
# include "opencv2/gpu/gpu.hpp"
#endif
#include "modules/imgproc/src/gcgraph.hpp"
#include "../../imgproc/src/gcgraph.hpp"
#ifdef HAVE_TEGRA_OPTIMIZATION
# include "opencv2/stitching/stitching_tegra.hpp"

View File

@@ -417,7 +417,7 @@ void GraphCutSeamFinder::find(const vector<Mat> &src, const vector<Point> &corne
}
#ifndef ANDROID
#ifdef HAVE_OPENCV_GPU
void GraphCutSeamFinderGpu::find(const vector<Mat> &src, const vector<Point> &corners,
vector<Mat> &masks)
{

View File

@@ -58,7 +58,7 @@ Stitcher Stitcher::createDefault(bool try_use_gpu)
stitcher.setFeaturesMatcher(new detail::BestOf2NearestMatcher(try_use_gpu));
stitcher.setBundleAdjuster(new detail::BundleAdjusterRay());
#ifndef ANDROID
#ifdef HAVE_OPENCV_GPU
if (try_use_gpu && gpu::getCudaEnabledDeviceCount() > 0)
{
stitcher.setFeaturesFinder(new detail::SurfFeaturesFinderGpu());

View File

@@ -212,7 +212,7 @@ void SphericalWarper::detectResultRoi(Size src_size, Point &dst_tl, Point &dst_b
}
#ifndef ANDROID
#ifdef HAVE_OPENCV_GPU
Rect PlaneWarperGpu::buildMaps(Size src_size, const Mat &K, const Mat &R, gpu::GpuMat &xmap, gpu::GpuMat &ymap)
{
return buildMaps(src_size, K, R, Mat::zeros(3, 1, CV_32F), xmap, ymap);