提交 7047c234 编写于 作者: A Andrey Kamaev 提交者: OpenCV Buildbot

Merge pull request #535 from bitwangyaoyao:2.4_clean

......@@ -57,180 +57,6 @@ using namespace cv;
using namespace cv::ocl;
using namespace std;
#if !defined (HAVE_OPENCL)
/* arithmetics */
void cv::ocl::add(const oclMat &, const oclMat &, oclMat &)
{
throw_nogpu();
}
void cv::ocl::add(const oclMat &, const oclMat &, oclMat &, const oclMat &)
{
throw_nogpu();
}
void cv::ocl::add(const oclMat &, const Scalar &, oclMat &, const oclMat &)
{
throw_nogpu();
}
void cv::ocl::subtract(const oclMat &, const oclMat &, oclMat &)
{
throw_nogpu();
}
void cv::ocl::subtract(const oclMat &, const oclMat &, oclMat &, const oclMat &)
{
throw_nogpu();
}
void cv::ocl::subtract(const oclMat &, const Scalar &, oclMat &, const oclMat & )
{
throw_nogpu();
}
void cv::ocl::subtract(const Scalar &, const oclMat &, oclMat &, const oclMat & )
{
throw_nogpu();
}
void cv::ocl::multiply(const oclMat &, const oclMat &, oclMat &, double)
{
throw_nogpu();
}
void cv::ocl::divide(const oclMat &, const oclMat &, oclMat &, double)
{
throw_nogpu();
}
void cv::ocl::divide(double, const oclMat &, oclMat &)
{
throw_nogpu();
}
void cv::ocl::absdiff(const oclMat &, const oclMat &, oclMat &)
{
throw_nogpu();
}
void cv::ocl::absdiff(const oclMat &, const Scalar &, oclMat &)
{
throw_nogpu();
}
void cv::ocl::compare(const oclMat &, const oclMat &, oclMat & , int)
{
throw_nogpu();
}
void cv::ocl::meanStdDev(const oclMat &, Scalar &, Scalar &)
{
throw_nogpu();
}
double cv::ocl::norm(const oclMat &, int)
{
throw_nogpu();
return 0.0;
}
double cv::ocl::norm(const oclMat &, const oclMat &, int)
{
throw_nogpu();
return 0.0;
}
void cv::ocl::flip(const oclMat &, oclMat &, int)
{
throw_nogpu();
}
Scalar cv::ocl::sum(const oclMat &)
{
throw_nogpu();
return Scalar();
}
void cv::ocl::minMax(const oclMat &, double *, double *, const oclMat &)
{
throw_nogpu();
}
void cv::ocl::minMaxLoc(const oclMat &, double *, double *, Point *, Point *, const oclMat &)
{
throw_nogpu();
}
void cv::ocl::LUT(const oclMat &, const Mat &, oclMat &)
{
throw_nogpu();
}
void cv::ocl::exp(const oclMat &, oclMat &)
{
throw_nogpu();
}
void cv::ocl::log(const oclMat &, oclMat &)
{
throw_nogpu();
}
void cv::ocl::magnitude(const oclMat &, oclMat &)
{
throw_nogpu();
}
void cv::ocl::phase(const oclMat &, const oclMat &, oclMat &, bool)
{
throw_nogpu();
}
void cv::ocl::cartToPolar(const oclMat &, const oclMat &, oclMat &, oclMat &, bool)
{
throw_nogpu();
}
void cv::ocl::polarToCart(const oclMat &, const oclMat &, oclMat &, oclMat &, bool)
{
throw_nogpu();
}
void cv::ocl::transpose(const oclMat &, oclMat &)
{
throw_nogpu();
}
void cv::ocl::pow(const oclMat &, double, oclMat &)
{
throw_nogpu();
}
void cv::ocl::addWeighted(const oclMat &src1, double alpha, const oclMat &src2, double beta, double gama, oclMat &dst)
{
throw_nogpu();
}
void cv::ocl::magnitudeSqr(const oclMat &src1, const oclMat &src2, oclMat &dst)
{
throw_nogpu();
}
/* bit wise operations */
void cv::ocl::bitwise_not(const oclMat &, oclMat &)
{
throw_nogpu();
}
void cv::ocl::bitwise_or(const oclMat &, const oclMat &, oclMat &, const oclMat &)
{
throw_nogpu();
}
void cv::ocl::bitwise_and(const oclMat &, const oclMat &, oclMat &, const oclMat &)
{
throw_nogpu();
}
void cv::ocl::bitwise_and(const oclMat &, const Scalar &, oclMat &, const oclMat &)
{
throw_nogpu();
}
void cv::ocl::bitwise_xor(const oclMat &, const oclMat &, oclMat &, const oclMat &)
{
throw_nogpu();
}
cv::ocl::oclMat cv::ocl::operator ~ (const oclMat &)
{
throw_nogpu();
return oclMat();
}
cv::ocl::oclMat cv::ocl::operator | (const oclMat &, const oclMat &)
{
throw_nogpu();
return oclMat();
}
cv::ocl::oclMat cv::ocl::operator & (const oclMat &, const oclMat &)
{
throw_nogpu();
return oclMat();
}
cv::ocl::oclMat cv::ocl::operator ^ (const oclMat &, const oclMat &)
{
throw_nogpu();
return oclMat();
}
#else /* !defined (HAVE_OPENCL) */
namespace cv
{
namespace ocl
......@@ -2477,5 +2303,3 @@ void cv::ocl::pow(const oclMat &x, double p, oclMat &y)
arithmetic_pow_run(x, p, y, kernelName, &arithm_pow);
}
#endif /* !defined (HAVE_OPENCL) */
......@@ -50,17 +50,6 @@ using namespace std;
using std::cout;
using std::endl;
#if !defined (HAVE_OPENCL)
namespace cv
{
namespace ocl
{
//nothing
}//namespace ocl
}//namespace cv
#else /* !defined (HAVE_OPENCL) */
namespace cv
{
namespace ocl
......@@ -99,4 +88,3 @@ namespace cv
}//namespace ocl
}//namespace cv
#endif
......@@ -50,13 +50,6 @@ using namespace cv;
using namespace cv::ocl;
using namespace std;
#if !defined (HAVE_OPENCL)
void cv::ocl::blendLinear(const oclMat &img1, const oclMat &img2, const oclMat &weights1, const oclMat &weights2,
oclMat &result)
{
throw_nogpu();
}
#else
namespace cv
{
namespace ocl
......@@ -97,5 +90,4 @@ void cv::ocl::blendLinear(const oclMat &img1, const oclMat &img2, const oclMat &
openCLExecuteKernel(ctx, &blend_linear, kernelName, globalSize, localSize, args, channels, depth);
}
}
#endif
\ No newline at end of file
}
\ No newline at end of file
......@@ -51,136 +51,6 @@ using namespace cv;
using namespace cv::ocl;
using namespace std;
#if !defined (HAVE_OPENCL)
cv::ocl::BruteForceMatcher_OCL_base::BruteForceMatcher_OCL_base(DistType)
{
throw_nogpu();
}
void cv::ocl::BruteForceMatcher_OCL_base::add(const vector<oclMat> &)
{
throw_nogpu();
}
const vector<oclMat> &cv::ocl::BruteForceMatcher_OCL_base::getTrainDescriptors() const
{
throw_nogpu();
return trainDescCollection;
}
void cv::ocl::BruteForceMatcher_OCL_base::clear()
{
throw_nogpu();
}
bool cv::ocl::BruteForceMatcher_OCL_base::empty() const
{
throw_nogpu();
return true;
}
bool cv::ocl::BruteForceMatcher_OCL_base::isMaskSupported() const
{
throw_nogpu();
return true;
}
void cv::ocl::BruteForceMatcher_OCL_base::matchSingle(const oclMat &, const oclMat &, oclMat &, oclMat &, const oclMat &)
{
throw_nogpu();
}
void cv::ocl::BruteForceMatcher_OCL_base::matchDownload(const oclMat &, const oclMat &, vector<DMatch> &)
{
throw_nogpu();
}
void cv::ocl::BruteForceMatcher_OCL_base::matchConvert(const Mat &, const Mat &, vector<DMatch> &)
{
throw_nogpu();
}
void cv::ocl::BruteForceMatcher_OCL_base::match(const oclMat &, const oclMat &, vector<DMatch> &, const oclMat &)
{
throw_nogpu();
}
void cv::ocl::BruteForceMatcher_OCL_base::makeGpuCollection(oclMat &, oclMat &, const vector<oclMat> &)
{
throw_nogpu();
}
void cv::ocl::BruteForceMatcher_OCL_base::matchCollection(const oclMat &, const oclMat &, oclMat &, oclMat &, oclMat &, const oclMat &)
{
throw_nogpu();
}
void cv::ocl::BruteForceMatcher_OCL_base::matchDownload(const oclMat &, const oclMat &, const oclMat &, vector<DMatch> &)
{
throw_nogpu();
}
void cv::ocl::BruteForceMatcher_OCL_base::matchConvert(const Mat &, const Mat &, const Mat &, vector<DMatch> &)
{
throw_nogpu();
}
void cv::ocl::BruteForceMatcher_OCL_base::match(const oclMat &, vector<DMatch> &, const vector<oclMat> &)
{
throw_nogpu();
}
void cv::ocl::BruteForceMatcher_OCL_base::knnMatchSingle(const oclMat &, const oclMat &, oclMat &, oclMat &, oclMat &, int, const oclMat &)
{
throw_nogpu();
}
void cv::ocl::BruteForceMatcher_OCL_base::knnMatchDownload(const oclMat &, const oclMat &, vector< vector<DMatch> > &, bool)
{
throw_nogpu();
}
void cv::ocl::BruteForceMatcher_OCL_base::knnMatchConvert(const Mat &, const Mat &, vector< vector<DMatch> > &, bool)
{
throw_nogpu();
}
void cv::ocl::BruteForceMatcher_OCL_base::knnMatch(const oclMat &, const oclMat &, vector< vector<DMatch> > &, int, const oclMat &, bool)
{
throw_nogpu();
}
void cv::ocl::BruteForceMatcher_OCL_base::knnMatch2Collection(const oclMat &, const oclMat &, oclMat &, oclMat &, oclMat &, const oclMat &)
{
throw_nogpu();
}
void cv::ocl::BruteForceMatcher_OCL_base::knnMatch2Download(const oclMat &, const oclMat &, const oclMat &, vector< vector<DMatch> > &, bool)
{
throw_nogpu();
}
void cv::ocl::BruteForceMatcher_OCL_base::knnMatch2Convert(const Mat &, const Mat &, const Mat &, vector< vector<DMatch> > &, bool)
{
throw_nogpu();
}
void cv::ocl::BruteForceMatcher_OCL_base::knnMatch(const oclMat &, vector< vector<DMatch> > &, int, const vector<oclMat> &, bool)
{
throw_nogpu();
}
void cv::ocl::BruteForceMatcher_OCL_base::radiusMatchSingle(const oclMat &, const oclMat &, oclMat &, oclMat &, oclMat &, float, const oclMat &)
{
throw_nogpu();
}
void cv::ocl::BruteForceMatcher_OCL_base::radiusMatchDownload(const oclMat &, const oclMat &, const oclMat &, vector< vector<DMatch> > &, bool)
{
throw_nogpu();
}
void cv::ocl::BruteForceMatcher_OCL_base::radiusMatchConvert(const Mat &, const Mat &, const Mat &, vector< vector<DMatch> > &, bool)
{
throw_nogpu();
}
void cv::ocl::BruteForceMatcher_OCL_base::radiusMatch(const oclMat &, const oclMat &, vector< vector<DMatch> > &, float, const oclMat &, bool)
{
throw_nogpu();
}
void cv::ocl::BruteForceMatcher_OCL_base::radiusMatchCollection(const oclMat &, oclMat &, oclMat &, oclMat &, oclMat &, float, const vector<oclMat> &)
{
throw_nogpu();
}
void cv::ocl::BruteForceMatcher_OCL_base::radiusMatchDownload(const oclMat &, const oclMat &, const oclMat &, const oclMat &, vector< vector<DMatch> > &, bool)
{
throw_nogpu();
}
void cv::ocl::BruteForceMatcher_OCL_base::radiusMatchConvert(const Mat &, const Mat &, const Mat &, const Mat &, vector< vector<DMatch> > &, bool)
{
throw_nogpu();
}
void cv::ocl::BruteForceMatcher_OCL_base::radiusMatch(const oclMat &, vector< vector<DMatch> > &, float, const vector<oclMat> &, bool)
{
throw_nogpu();
}
#else /* !defined (HAVE_OPENCL) */
using namespace std;
namespace cv
{
......@@ -1826,8 +1696,4 @@ void cv::ocl::BruteForceMatcher_OCL_base::radiusMatch(const oclMat &query, vecto
oclMat trainIdx, imgIdx, distance, nMatches;
radiusMatchCollection(query, trainIdx, imgIdx, distance, nMatches, maxDistance, masks);
radiusMatchDownload(trainIdx, imgIdx, distance, nMatches, matches, compactResult);
}
#endif
}
\ No newline at end of file
......@@ -49,21 +49,6 @@ using namespace cv;
using namespace cv::ocl;
using namespace std;
#if !defined (HAVE_OPENCL)
void cv::ocl::buildWarpPlaneMaps(Size, Rect, const Mat &, const Mat &, const Mat &, float, oclMat &, oclMat &, Stream &)
{
throw_nogpu();
}
void cv::ocl::buildWarpCylindricalMaps(Size, Rect, const Mat &, const Mat &, float, oclMat &, oclMat &, Stream &)
{
throw_nogpu();
}
void cv::ocl::buildWarpSphericalMaps(Size, Rect, const Mat &, const Mat &, float, oclMat &, oclMat &, Stream &)
{
throw_nogpu();
}
#else
namespace cv
{
namespace ocl
......@@ -275,6 +260,3 @@ void cv::ocl::buildWarpPerspectiveMaps(const Mat &M, bool inverse, Size dsize, o
size_t localThreads[3] = {32, 8, 1};
openCLExecuteKernel(clCxt, &build_warps, kernelName, globalThreads, localThreads, args, -1, -1);
}
#endif // HAVE_OPENCL
......@@ -51,25 +51,6 @@ using namespace cv;
using namespace cv::ocl;
using namespace std;
#if !defined (HAVE_OPENCL)
void cv::ocl::Canny(const oclMat &image, oclMat &edges, double low_thresh, double high_thresh, int apperture_size = 3, bool L2gradient = false)
{
throw_nogpu();
}
void cv::ocl::Canny(const oclMat &image, CannyBuf &buf, oclMat &edges, double low_thresh, double high_thresh, int apperture_size = 3, bool L2gradient = false)
{
throw_nogpu();
}
void cv::ocl::Canny(const oclMat &dx, const oclMat &dy, oclMat &edges, double low_thresh, double high_thresh, bool L2gradient = false)
{
throw_nogpu();
}
void cv::ocl::Canny(const oclMat &dx, const oclMat &dy, CannyBuf &buf, oclMat &edges, double low_thresh, double high_thresh, bool L2gradient = false)
{
throw_nogpu();
}
#else
namespace cv
{
namespace ocl
......@@ -426,5 +407,3 @@ void canny::getEdges_gpu(oclMat &map, oclMat &dst, int rows, int cols)
openCLExecuteKernel2(clCxt, &imgproc_canny, kernelName, globalThreads, localThreads, args, -1, -1);
}
#endif // HAVE_OPENCL
......@@ -49,18 +49,6 @@
using namespace cv;
using namespace cv::ocl;
#if !defined (HAVE_OPENCL)
void cv::ocl::cvtColor(const oclMat &, oclMat &, int, int)
{
throw_nogpu();
}
void cv::ocl::cvtColor(const oclMat &, oclMat &, int, int, const Stream &)
{
throw_nogpu();
}
#else /* !defined (HAVE_OPENCL) */
#ifndef CV_DESCALE
#define CV_DESCALE(x, n) (((x) + (1 << ((n)-1))) >> (n))
#endif
......@@ -289,5 +277,3 @@ void cv::ocl::cvtColor(const oclMat &src, oclMat &dst, int code, int dcn)
{
cvtColor_caller(src, dst, code, dcn);
}
#endif /* !defined (HAVE_OPENCL) */
......@@ -50,16 +50,6 @@ using namespace cv;
using namespace cv::ocl;
using namespace std;
#if !defined(HAVE_OPENCL)
void cv::ocl::columnSum(const oclMat &src, oclMat &dst)
{
throw_nogpu();
}
#else /*!HAVE_OPENCL */
namespace cv
{
namespace ocl
......@@ -92,5 +82,4 @@ void cv::ocl::columnSum(const oclMat &src, oclMat &dst)
openCLExecuteKernel(clCxt, &imgproc_columnsum, kernelName, globalThreads, localThreads, args, src.channels(), src.depth());
}
#endif
\ No newline at end of file
}
\ No newline at end of file
......@@ -46,12 +46,6 @@
using namespace cv;
using namespace cv::ocl;
#if !defined (HAVE_OPENCL)
// do nothing
#else /* !defined (HAVE_OPENCL) */
namespace cv
{
namespace ocl
......@@ -194,5 +188,3 @@ namespace cv
}
}
}
#endif
......@@ -49,12 +49,7 @@ using namespace cv;
using namespace cv::ocl;
using namespace std;
#if !defined HAVE_OPENCL
void cv::ocl::dft(const oclMat &, oclMat &, Size , int )
{
throw_nogpu();
}
#elif !defined HAVE_CLAMDFFT
#if !defined HAVE_CLAMDFFT
void cv::ocl::dft(const oclMat&, oclMat&, Size, int)
{
CV_Error(CV_StsNotImplemented, "OpenCL DFT is not implemented");
......
......@@ -54,121 +54,6 @@ using namespace std;
using namespace cv;
using namespace cv::ocl;
#if !defined (HAVE_OPENCL)
Ptr<BaseFilter_GPU> cv::ocl::getBoxFilter_GPU(int, int, const Size &, Point, int)
{
throw_nogpu();
return Ptr<BaseFilter_GPU>(0);
}
Ptr<FilterEngine_GPU> cv::ocl::createBoxFilter_GPU(int, int, const Size &, const Point &, int)
{
throw_nogpu();
return Ptr<FilterEngine_GPU>(0);
}
Ptr<FilterEngine_GPU> cv::ocl::createFilter2D_GPU(const Ptr<BaseFilter_GPU>)
{
throw_nogpu();
return Ptr<FilterEngine_GPU>(0);
}
Ptr<FilterEngine_GPU> cv::ocl::createSeparableLinearFilter_GPU(int, int, const Mat &, const Mat &, const Point &)
{
throw_nogpu();
return Ptr<FilterEngine_GPU>(0);
}
Ptr<BaseRowFilter_GPU> cv::ocl::getLinearRowFilter_GPU(int, int, const Mat &, int)
{
throw_nogpu();
return Ptr<BaseRowFilter_GPU>(0);
}
Ptr<BaseColumnFilter_GPU> cv::ocl::getLinearColumnFilter_GPU(int, int, const Mat &, int)
{
throw_nogpu();
return Ptr<BaseColumnFilter_GPU>(0);
}
Ptr<FilterEngine_GPU> cv::ocl::createGaussianFilter_GPU(int, Size, double, double)
{
throw_nogpu();
return Ptr<FilterEngine_GPU>(0);
}
Ptr<BaseFilter_GPU> cv::ocl::getLinearFilter_GPU(int, int, const Mat &, const Size &, Point)
{
throw_nogpu();
return Ptr<BaseFilter_GPU>(0);
}
Ptr<FilterEngine_GPU> cv::ocl::createLinearFilter_GPU(int, int, const Mat &, const Point &)
{
throw_nogpu();
return Ptr<FilterEngine_GPU>(0);
}
Ptr<FilterEngine_GPU> cv::ocl::createDerivFilter_GPU(int srcType, int dstType, int dx, int dy, int ksize, int borderType)
{
throw_nogpu();
return Ptr<FilterEngine_GPU>(0);
}
void cv::ocl::boxFilter(const oclMat &, oclMat &, int, Size, Point, int)
{
throw_nogpu();
}
void cv::ocl::sepFilter2D(const oclMat &, oclMat &, int, const Mat &, const Mat &, Point)
{
throw_nogpu();
}
void cv::ocl::Sobel(const oclMat &, oclMat &, int, int, int, int, double)
{
throw_nogpu();
}
void cv::ocl::Scharr(const oclMat &, oclMat &, int, int, int, double)
{
throw_nogpu();
}
void cv::ocl::GaussianBlur(const oclMat &, oclMat &, Size, double, double)
{
throw_nogpu();
}
void cv::ocl::filter2D(const oclMat &, oclMat &, int, const Mat &, Point)
{
throw_nogpu();
}
void cv::ocl::Laplacian(const oclMat &, oclMat &, int, int, double)
{
throw_nogpu();
}
void cv::ocl::erode(const oclMat &, oclMat &, const Mat &, Point, int)
{
throw_nogpu();
}
void cv::ocl::dilate(const oclMat &, oclMat &, const Mat &, Point, int)
{
throw_nogpu();
}
void cv::ocl::morphologyEx(const oclMat &, oclMat &, int, const Mat &, Point, int)
{
throw_nogpu();
}
#else /* !defined (HAVE_OPENCL) */
//helper routines
namespace cv
{
......@@ -1705,5 +1590,3 @@ void cv::ocl::GaussianBlur(const oclMat &src, oclMat &dst, Size ksize, double si
Ptr<FilterEngine_GPU> f = createGaussianFilter_GPU(src.type(), ksize, sigma1, sigma2, bordertype);
f->apply(src, dst);
}
#endif /* !defined (HAVE_OPENCL) */
......@@ -46,24 +46,14 @@
#include <iomanip>
#include "precomp.hpp"
#ifdef HAVE_CLAMDBLAS
#include "clAmdBlas.h"
#if !defined HAVE_OPENCL
void cv::ocl::gemm(const oclMat &src1, const oclMat &src2, double alpha,
const oclMat &src3, double beta, oclMat &dst, int flags)
{
throw_nogpu();
}
#elif !defined HAVE_CLAMDBLAS
void cv::ocl::gemm(const oclMat &src1, const oclMat &src2, double alpha,
const oclMat &src3, double beta, oclMat &dst, int flags)
#if !defined HAVE_CLAMDBLAS
void cv::ocl::gemm(const oclMat&, const oclMat&, double,
const oclMat&, double, oclMat&, int)
{
CV_Error(CV_StsNotImplemented, "OpenCL BLAS is not implemented");
}
#else
#include "clAmdBlas.h"
using namespace cv;
void cv::ocl::gemm(const oclMat &src1, const oclMat &src2, double alpha,
......@@ -168,4 +158,3 @@ void cv::ocl::gemm(const oclMat &src1, const oclMat &src2, double alpha,
clAmdBlasTeardown();
}
#endif
#endif
......@@ -49,69 +49,6 @@ using namespace cv;
using namespace cv::ocl;
using namespace std;
#if !defined (HAVE_OPENCL)
cv::ocl::HOGDescriptor::HOGDescriptor(Size, Size, Size, Size, int, double, double, bool, int)
{
throw_nogpu();
}
size_t cv::ocl::HOGDescriptor::getDescriptorSize() const
{
throw_nogpu();
return 0;
}
size_t cv::ocl::HOGDescriptor::getBlockHistogramSize() const
{
throw_nogpu();
return 0;
}
double cv::ocl::HOGDescriptor::getWinSigma() const
{
throw_nogpu();
return 0;
}
bool cv::ocl::HOGDescriptor::checkDetectorSize() const
{
throw_nogpu();
return false;
}
void cv::ocl::HOGDescriptor::setSVMDetector(const vector<float> &)
{
throw_nogpu();
}
void cv::ocl::HOGDescriptor::detect(const oclMat &, vector<Point> &, double, Size, Size)
{
throw_nogpu();
}
void cv::ocl::HOGDescriptor::detectMultiScale(const oclMat &, vector<Rect> &, double, Size, Size, double, int)
{
throw_nogpu();
}
void cv::ocl::HOGDescriptor::computeBlockHistograms(const oclMat &)
{
throw_nogpu();
}
void cv::ocl::HOGDescriptor::getDescriptors(const oclMat &, Size, oclMat &, int)
{
throw_nogpu();
}
std::vector<float> cv::ocl::HOGDescriptor::getDefaultPeopleDetector()
{
throw_nogpu();
return std::vector<float>();
}
std::vector<float> cv::ocl::HOGDescriptor::getPeopleDetector48x96()
{
throw_nogpu();
return std::vector<float>();
}
std::vector<float> cv::ocl::HOGDescriptor::getPeopleDetector64x128()
{
throw_nogpu();
return std::vector<float>();
}
#else
#define CELL_WIDTH 8
#define CELL_HEIGHT 8
......@@ -1895,5 +1832,3 @@ void cv::ocl::device::hog::resize( const oclMat &src, oclMat &dst, const Size sz
openCLExecuteKernel2(clCxt, &objdetect_hog, kernelName, globalThreads, localThreads, args, -1, -1);
}
#endif
......@@ -59,62 +59,6 @@ using namespace cv;
using namespace cv::ocl;
using namespace std;
#if !defined (HAVE_OPENCL)
void cv::ocl::meanShiftFiltering(const oclMat &, oclMat &, int, int, TermCriteria)
{
throw_nogpu();
}
void cv::ocl::meanShiftProc(const oclMat &, oclMat &, oclMat &, int, int, TermCriteria)
{
throw_nogpu();
}
double cv::ocl::threshold(const oclMat &, oclMat &, double, int)
{
throw_nogpu();
return 0.0;
}
void cv::ocl::resize(const oclMat &, oclMat &, Size, double, double, int)
{
throw_nogpu();
}
void cv::ocl::remap(const oclMat &, oclMat &, oclMat &, oclMat &, int, int , const Scalar &)
{
throw_nogpu();
}
void cv::ocl::copyMakeBorder(const oclMat &, oclMat &, int, int, int, int, const Scalar &)
{
throw_nogpu();
}
void cv::ocl::warpAffine(const oclMat &, oclMat &, const Mat &, Size, int)
{
throw_nogpu();
}
void cv::ocl::warpPerspective(const oclMat &, oclMat &, const Mat &, Size, int)
{
throw_nogpu();
}
void cv::ocl::integral(const oclMat &, oclMat &, oclMat &)
{
throw_nogpu();
}
void cv::ocl::calcHist(const oclMat &, oclMat &hist)
{
throw_nogpu();
}
void cv::ocl::bilateralFilter(const oclMat &, oclMat &, int, double, double, int)
{
throw_nogpu();
}
void cv::ocl::convolve(const oclMat &, const oclMat &, oclMat &)
{
throw_nogpu();
}
#else /* !defined (HAVE_OPENCL) */
namespace cv
{
namespace ocl
......@@ -1696,4 +1640,3 @@ void cv::ocl::convolve(const oclMat &x, const oclMat &t, oclMat &y)
convolve_run(x, t, y, kernelName, &imgproc_convolve);
}
#endif /* !defined (HAVE_OPENCL) */
......@@ -61,82 +61,6 @@ using std::endl;
//#define AMD_DOUBLE_DIFFER
#if !defined (HAVE_OPENCL)
namespace cv
{
namespace ocl
{
cl_device_id getDevice()
{
throw_nogpu();
return 0;
}
void getComputeCapability(cl_device_id, int &major, int &minor)
{
throw_nogpu();
}
void openCLMallocPitch(Context * /*clCxt*/, void ** /*dev_ptr*/, size_t * /*pitch*/,
size_t /*widthInBytes*/, size_t /*height*/)
{
throw_nogpu();
}
void openCLMemcpy2D(Context * /*clCxt*/, void * /*dst*/, size_t /*dpitch*/,
const void * /*src*/, size_t /*spitch*/,
size_t /*width*/, size_t /*height*/, enum openCLMemcpyKind /*kind*/)
{
throw_nogpu();
}
void openCLCopyBuffer2D(Context * /*clCxt*/, void * /*dst*/, size_t /*dpitch*/,
const void * /*src*/, size_t /*spitch*/,
size_t /*width*/, size_t /*height*/, enum openCLMemcpyKind /*kind*/)
{
throw_nogpu();
}
cl_mem openCLCreateBuffer(Context *, size_t, size_t)
{
throw_nogpu();
}
void openCLReadBuffer(Context *, cl_mem, void *, size_t)
{
throw_nogpu();
}
void openCLFree(void * /*devPtr*/)
{
throw_nogpu();
}
cl_kernel openCLGetKernelFromSource(const Context * /*clCxt*/,
const char ** /*fileName*/, string /*kernelName*/)
{
throw_nogpu();
}
void openCLVerifyKernel(const Context * /*clCxt*/, cl_kernel /*kernel*/, size_t * /*blockSize*/,
size_t * /*globalThreads*/, size_t * /*localThreads*/)
{
throw_nogpu();
}
cl_mem load_constant(cl_context context, cl_command_queue command_queue, const void *value,
const size_t size)
{
throw_nogpu();
}
}//namespace ocl
}//namespace cv
#else /* !defined (HAVE_OPENCL) */
namespace cv
{
namespace ocl
......@@ -1013,4 +937,3 @@ namespace cv
}//namespace ocl
}//namespace cv
#endif
......@@ -50,17 +50,6 @@ using namespace std;
using namespace cv;
using namespace cv::ocl;
#if !defined (HAVE_OPENCL)
void cv::ocl::interpolateFrames(const oclMat &frame0, const oclMat &frame1,
const oclMat &fu, const oclMat &fv,
const oclMat &bu, const oclMat &bv,
float pos, oclMat &newFrame, oclMat &buf)
{
throw_nogpu();
}
#else
namespace cv
{
namespace ocl
......@@ -311,5 +300,4 @@ void interpolate::bindImgTex(const oclMat &img, cl_mem &texture)
clEnqueueCopyBufferToImage(img.clCxt->impl->clCmdQueue, (cl_mem)img.data, texture, 0, origin, region, 0, NULL, 0);
openCLSafeCall(err);
}
#endif//(HAVE_OPENCL)
......@@ -51,12 +51,6 @@ using namespace cv;
using namespace cv::ocl;
using namespace std;
#if !defined (HAVE_OPENCL)
void cv::ocl::matchTemplate(const oclMat &, const oclMat &, oclMat &)
{
throw_nogpu();
}
#else
//helper routines
namespace cv
{
......@@ -498,4 +492,3 @@ void cv::ocl::matchTemplate(const oclMat &image, const oclMat &templ, oclMat &re
CV_Assert(caller);
caller(image, templ, result, buf);
}
#endif //
......@@ -58,60 +58,6 @@ using namespace std;
//////////////////////////////// oclMat ////////////////////////////////
////////////////////////////////////////////////////////////////////////
#if !defined (HAVE_OPENCL)
namespace cv
{
namespace ocl
{
void oclMat::upload(const Mat & /*m*/)
{
throw_nogpu();
}
void oclMat::download(cv::Mat & /*m*/) const
{
throw_nogpu();
}
void oclMat::copyTo( oclMat & /*m*/ ) const
{
throw_nogpu();
}
void oclMat::copyTo( oclMat & /*m*/, const oclMat &/* mask */) const
{
throw_nogpu();
}
void oclMat::convertTo( oclMat & /*m*/, int /*rtype*/, double /*alpha*/, double /*beta*/ ) const
{
throw_nogpu();
}
oclMat &oclMat::operator = (const Scalar & /*s*/)
{
throw_nogpu();
return *this;
}
oclMat &oclMat::setTo(const Scalar & /*s*/, const oclMat & /*mask*/)
{
throw_nogpu();
return *this;
}
oclMat oclMat::reshape(int /*new_cn*/, int /*new_rows*/) const
{
throw_nogpu();
return oclMat();
}
void oclMat::create(int /*_rows*/, int /*_cols*/, int /*_type*/)
{
throw_nogpu();
}
void oclMat::release()
{
throw_nogpu();
}
}
}
#else /* !defined (HAVE_OPENCL) */
//helper routines
namespace cv
{
......@@ -1045,4 +991,3 @@ oclMat& cv::ocl::oclMat::operator/=( const oclMat& m )
divide(*this, m, *this);
return *this;
}
#endif /* !defined (HAVE_OPENCL) */
......@@ -47,9 +47,6 @@
#define _OPENCV_MCWUTIL_
#include "precomp.hpp"
#if defined (HAVE_OPENCL)
using namespace std;
namespace cv
......@@ -76,5 +73,5 @@ namespace cv
}//namespace ocl
}//namespace cv
#endif // HAVE_OPENCL
#endif //_OPENCV_MCWUTIL_
......@@ -44,23 +44,6 @@
#include "precomp.hpp"
#if !defined(HAVE_OPENCL)
namespace cv
{
namespace ocl
{
void meanShiftSegmentation(const oclMat &, Mat &, int, int, int, TermCriteria)
{
throw_nogpu();
}
}
}
#else
using namespace std;
// Auxiliray stuff
......@@ -411,4 +394,3 @@ namespace cv
}
}
#endif // #if !defined (HAVE_OPENCL)
......@@ -52,13 +52,6 @@ using namespace std;
using namespace cv;
using namespace cv::ocl;
#if !defined (HAVE_OPENCL)
void cv::ocl::PyrLKOpticalFlow::sparse(const oclMat &, const oclMat &, const oclMat &, oclMat &, oclMat &, oclMat &) { }
void cv::ocl::PyrLKOpticalFlow::dense(const oclMat &, const oclMat &, oclMat &, oclMat &, oclMat *) { }
#else /* !defined (HAVE_OPENCL) */
namespace cv
{
namespace ocl
......@@ -862,5 +855,3 @@ void cv::ocl::PyrLKOpticalFlow::dense(const oclMat &prevImg, const oclMat &nextI
clFinish(prevImg.clCxt->impl->clCmdQueue);
}
#endif /* !defined (HAVE_CUDA) */
......@@ -54,13 +54,6 @@ using namespace cv;
using namespace cv::ocl;
using namespace std;
#ifndef HAVE_OPENCL
void cv::ocl::pyrUp(const oclMat &, GpuMat &, oclMat &)
{
throw_nogpu();
}
#else
namespace cv
{
namespace ocl
......@@ -93,5 +86,4 @@ namespace cv
openCLExecuteKernel(clCxt, &pyr_up, kernelName, globalThreads, localThreads, args, src.oclchannels(), src.depth());
}
}
};
#endif // HAVE_OPENCL
\ No newline at end of file
}
\ No newline at end of file
......@@ -58,34 +58,6 @@ using std::endl;
///////////////// oclMat merge and split ///////////////////////////////
////////////////////////////////////////////////////////////////////////
#if !defined (HAVE_OPENCL)
namespace cv
{
namespace ocl
{
void cv::ocl::merge(const oclMat *src_mat, size_t count, oclMat &dst_mat)
{
throw_nogpu();
}
void cv::ocl::merge(const vector<oclMat> &src_mat, oclMat &dst_mat)
{
throw_nogpu();
}
void cv::ocl::split(const oclMat &src, oclMat *dst)
{
throw_nogpu();
}
void cv::ocl::split(const oclMat &src, vector<oclMat> &dst)
{
throw_nogpu();
}
}
}
#else /* !defined (HAVE_OPENCL) */
namespace cv
{
namespace ocl
......@@ -417,4 +389,3 @@ void cv::ocl::split(const oclMat &src, vector<oclMat> &dst)
if(src.oclchannels() > 0)
split_merge::split(src, &dst[0]);
}
#endif /* !defined (HAVE_OPENCL) */
......@@ -50,59 +50,6 @@ using namespace cv;
using namespace cv::ocl;
using namespace std;
#if !defined (HAVE_OPENCL)
cv::ocl::SURF_OCL::SURF_OCL()
{
throw_nogpu();
}
cv::ocl::SURF_OCL::SURF_OCL(double, int, int, bool, float, bool)
{
throw_nogpu();
}
int cv::ocl::SURF_OCL::descriptorSize() const
{
throw_nogpu();
return 0;
}
void cv::ocl::SURF_OCL::uploadKeypoints(const vector<KeyPoint> &, oclMat &)
{
throw_nogpu();
}
void cv::ocl::SURF_OCL::downloadKeypoints(const oclMat &, vector<KeyPoint> &)
{
throw_nogpu();
}
void cv::ocl::SURF_OCL::downloadDescriptors(const oclMat &, vector<float> &)
{
throw_nogpu();
}
void cv::ocl::SURF_OCL::operator()(const oclMat &, const oclMat &, oclMat &)
{
throw_nogpu();
}
void cv::ocl::SURF_OCL::operator()(const oclMat &, const oclMat &, oclMat &, oclMat &, bool)
{
throw_nogpu();
}
void cv::ocl::SURF_OCL::operator()(const oclMat &, const oclMat &, vector<KeyPoint> &)
{
throw_nogpu();
}
void cv::ocl::SURF_OCL::operator()(const oclMat &, const oclMat &, vector<KeyPoint> &, oclMat &, bool)
{
throw_nogpu();
}
void cv::ocl::SURF_OCL::operator()(const oclMat &, const oclMat &, vector<KeyPoint> &, vector<float> &, bool)
{
throw_nogpu();
}
void cv::ocl::SURF_OCL::releaseMemory()
{
throw_nogpu();
}
#else /* !defined (HAVE_OPENCL) */
namespace cv
{
namespace ocl
......@@ -755,5 +702,3 @@ void SURF_OCL_Invoker::compute_descriptors_gpu(const oclMat &descriptors, const
}
}
#endif // /* !defined (HAVE_OPENCL) */
......@@ -44,7 +44,7 @@
#include "precomp.hpp"
//#define PERF_TEST 0
#ifdef HAVE_OPENCL
////////////////////////////////////////////////////////////////////////////////
// MatchTemplate
......@@ -97,15 +97,7 @@ TEST_P(MatchTemplate8U, Accuracy)
cv::Mat mat_dst;
dst.download(mat_dst);
EXPECT_MAT_NEAR(dst_gold, mat_dst, templ_size.area() * 1e-1, sss);
#ifdef PERF_TEST
{
P_TEST_FULL( {}, {cv::ocl::matchTemplate(ocl_image, ocl_templ, dst, method);}, {});
P_TEST_FULL( {}, {cv::matchTemplate(image, templ, dst_gold, method);}, {});
}
#endif // PERF_TEST
}
PARAM_TEST_CASE(MatchTemplate32F, cv::Size, TemplateSize, Channels, TemplateMethod)
......@@ -144,17 +136,6 @@ TEST_P(MatchTemplate32F, Accuracy)
dst.download(mat_dst);
EXPECT_MAT_NEAR(dst_gold, mat_dst, templ_size.area() * 1e-1, sss);
#ifdef PERF_TEST
{
std::cout << "Method: " << TEMPLATE_METHOD_NAMES[method] << std::endl;
std::cout << "Image Size: (" << size.width << ", " << size.height << ")" << std::endl;
std::cout << "Template Size: (" << templ_size.width << ", " << templ_size.height << ")" << std::endl;
std::cout << "Channels: " << cn << std::endl;
P_TEST_FULL( {}, {cv::ocl::matchTemplate(ocl_image, ocl_templ, dst, method);}, {});
P_TEST_FULL( {}, {cv::matchTemplate(image, templ, dst_gold, method);}, {});
}
#endif // PERF_TEST
}
INSTANTIATE_TEST_CASE_P(GPU_ImgProc, MatchTemplate8U,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册