renamed cuda namespace to cudev

This commit is contained in:
Vladislav Vinogradov
2013-04-04 15:36:22 +04:00
parent 1bb141c465
commit 910ef57109
130 changed files with 592 additions and 594 deletions

View File

@@ -98,7 +98,7 @@ cv::Ptr<cv::gpu::CLAHE> cv::gpu::createCLAHE(double, cv::Size) { throw_no_cuda()
////////////////////////////////////////////////////////////////////////
// meanShiftFiltering_GPU
namespace cv { namespace gpu { namespace cuda
namespace cv { namespace gpu { namespace cudev
{
namespace imgproc
{
@@ -108,7 +108,7 @@ namespace cv { namespace gpu { namespace cuda
void cv::gpu::meanShiftFiltering(const GpuMat& src, GpuMat& dst, int sp, int sr, TermCriteria criteria, Stream& stream)
{
using namespace ::cv::gpu::cuda::imgproc;
using namespace ::cv::gpu::cudev::imgproc;
if( src.empty() )
CV_Error( CV_StsBadArg, "The input image is empty" );
@@ -134,7 +134,7 @@ void cv::gpu::meanShiftFiltering(const GpuMat& src, GpuMat& dst, int sp, int sr,
////////////////////////////////////////////////////////////////////////
// meanShiftProc_GPU
namespace cv { namespace gpu { namespace cuda
namespace cv { namespace gpu { namespace cudev
{
namespace imgproc
{
@@ -144,7 +144,7 @@ namespace cv { namespace gpu { namespace cuda
void cv::gpu::meanShiftProc(const GpuMat& src, GpuMat& dstr, GpuMat& dstsp, int sp, int sr, TermCriteria criteria, Stream& stream)
{
using namespace ::cv::gpu::cuda::imgproc;
using namespace ::cv::gpu::cudev::imgproc;
if( src.empty() )
CV_Error( CV_StsBadArg, "The input image is empty" );
@@ -171,7 +171,7 @@ void cv::gpu::meanShiftProc(const GpuMat& src, GpuMat& dstr, GpuMat& dstsp, int
////////////////////////////////////////////////////////////////////////
// drawColorDisp
namespace cv { namespace gpu { namespace cuda
namespace cv { namespace gpu { namespace cudev
{
namespace imgproc
{
@@ -185,7 +185,7 @@ namespace
template <typename T>
void drawColorDisp_caller(const GpuMat& src, GpuMat& dst, int ndisp, const cudaStream_t& stream)
{
using namespace ::cv::gpu::cuda::imgproc;
using namespace ::cv::gpu::cudev::imgproc;
dst.create(src.size(), CV_8UC4);
@@ -207,7 +207,7 @@ void cv::gpu::drawColorDisp(const GpuMat& src, GpuMat& dst, int ndisp, Stream& s
////////////////////////////////////////////////////////////////////////
// reprojectImageTo3D
namespace cv { namespace gpu { namespace cuda
namespace cv { namespace gpu { namespace cudev
{
namespace imgproc
{
@@ -218,7 +218,7 @@ namespace cv { namespace gpu { namespace cuda
void cv::gpu::reprojectImageTo3D(const GpuMat& disp, GpuMat& xyz, const Mat& Q, int dst_cn, Stream& stream)
{
using namespace cv::gpu::cuda::imgproc;
using namespace cv::gpu::cudev::imgproc;
typedef void (*func_t)(const PtrStepSzb disp, PtrStepSzb xyz, const float* q, cudaStream_t stream);
static const func_t funcs[2][4] =
@@ -239,7 +239,7 @@ void cv::gpu::reprojectImageTo3D(const GpuMat& disp, GpuMat& xyz, const Mat& Q,
////////////////////////////////////////////////////////////////////////
// copyMakeBorder
namespace cv { namespace gpu { namespace cuda
namespace cv { namespace gpu { namespace cudev
{
namespace imgproc
{
@@ -251,7 +251,7 @@ namespace
{
template <typename T, int cn> void copyMakeBorder_caller(const PtrStepSzb& src, const PtrStepSzb& dst, int top, int left, int borderType, const Scalar& value, cudaStream_t stream)
{
using namespace ::cv::gpu::cuda::imgproc;
using namespace ::cv::gpu::cudev::imgproc;
Scalar_<T> val(saturate_cast<T>(value[0]), saturate_cast<T>(value[1]), saturate_cast<T>(value[2]), saturate_cast<T>(value[3]));
@@ -348,7 +348,7 @@ void cv::gpu::copyMakeBorder(const GpuMat& src, GpuMat& dst, int top, int bottom
//////////////////////////////////////////////////////////////////////////////
// buildWarpPlaneMaps
namespace cv { namespace gpu { namespace cuda
namespace cv { namespace gpu { namespace cudev
{
namespace imgproc
{
@@ -362,7 +362,7 @@ void cv::gpu::buildWarpPlaneMaps(Size src_size, Rect dst_roi, const Mat &K, cons
float scale, GpuMat& map_x, GpuMat& map_y, Stream& stream)
{
(void)src_size;
using namespace ::cv::gpu::cuda::imgproc;
using namespace ::cv::gpu::cudev::imgproc;
CV_Assert(K.size() == Size(3,3) && K.type() == CV_32F);
CV_Assert(R.size() == Size(3,3) && R.type() == CV_32F);
@@ -375,14 +375,14 @@ void cv::gpu::buildWarpPlaneMaps(Size src_size, Rect dst_roi, const Mat &K, cons
map_x.create(dst_roi.size(), CV_32F);
map_y.create(dst_roi.size(), CV_32F);
cuda::imgproc::buildWarpPlaneMaps(dst_roi.tl().x, dst_roi.tl().y, map_x, map_y, K_Rinv.ptr<float>(), R_Kinv.ptr<float>(),
cudev::imgproc::buildWarpPlaneMaps(dst_roi.tl().x, dst_roi.tl().y, map_x, map_y, K_Rinv.ptr<float>(), R_Kinv.ptr<float>(),
T.ptr<float>(), scale, StreamAccessor::getStream(stream));
}
//////////////////////////////////////////////////////////////////////////////
// buildWarpCylyndricalMaps
namespace cv { namespace gpu { namespace cuda
namespace cv { namespace gpu { namespace cudev
{
namespace imgproc
{
@@ -396,7 +396,7 @@ void cv::gpu::buildWarpCylindricalMaps(Size src_size, Rect dst_roi, const Mat &K
GpuMat& map_x, GpuMat& map_y, Stream& stream)
{
(void)src_size;
using namespace ::cv::gpu::cuda::imgproc;
using namespace ::cv::gpu::cudev::imgproc;
CV_Assert(K.size() == Size(3,3) && K.type() == CV_32F);
CV_Assert(R.size() == Size(3,3) && R.type() == CV_32F);
@@ -408,14 +408,14 @@ void cv::gpu::buildWarpCylindricalMaps(Size src_size, Rect dst_roi, const Mat &K
map_x.create(dst_roi.size(), CV_32F);
map_y.create(dst_roi.size(), CV_32F);
cuda::imgproc::buildWarpCylindricalMaps(dst_roi.tl().x, dst_roi.tl().y, map_x, map_y, K_Rinv.ptr<float>(), R_Kinv.ptr<float>(), scale, StreamAccessor::getStream(stream));
cudev::imgproc::buildWarpCylindricalMaps(dst_roi.tl().x, dst_roi.tl().y, map_x, map_y, K_Rinv.ptr<float>(), R_Kinv.ptr<float>(), scale, StreamAccessor::getStream(stream));
}
//////////////////////////////////////////////////////////////////////////////
// buildWarpSphericalMaps
namespace cv { namespace gpu { namespace cuda
namespace cv { namespace gpu { namespace cudev
{
namespace imgproc
{
@@ -429,7 +429,7 @@ void cv::gpu::buildWarpSphericalMaps(Size src_size, Rect dst_roi, const Mat &K,
GpuMat& map_x, GpuMat& map_y, Stream& stream)
{
(void)src_size;
using namespace ::cv::gpu::cuda::imgproc;
using namespace ::cv::gpu::cudev::imgproc;
CV_Assert(K.size() == Size(3,3) && K.type() == CV_32F);
CV_Assert(R.size() == Size(3,3) && R.type() == CV_32F);
@@ -441,7 +441,7 @@ void cv::gpu::buildWarpSphericalMaps(Size src_size, Rect dst_roi, const Mat &K,
map_x.create(dst_roi.size(), CV_32F);
map_y.create(dst_roi.size(), CV_32F);
cuda::imgproc::buildWarpSphericalMaps(dst_roi.tl().x, dst_roi.tl().y, map_x, map_y, K_Rinv.ptr<float>(), R_Kinv.ptr<float>(), scale, StreamAccessor::getStream(stream));
cudev::imgproc::buildWarpSphericalMaps(dst_roi.tl().x, dst_roi.tl().y, map_x, map_y, K_Rinv.ptr<float>(), R_Kinv.ptr<float>(), scale, StreamAccessor::getStream(stream));
}
////////////////////////////////////////////////////////////////////////
@@ -532,7 +532,7 @@ void cv::gpu::integral(const GpuMat& src, GpuMat& sum, Stream& s)
integralBuffered(src, sum, buffer, s);
}
namespace cv { namespace gpu { namespace cuda
namespace cv { namespace gpu { namespace cudev
{
namespace imgproc
{
@@ -556,7 +556,7 @@ void cv::gpu::integralBuffered(const GpuMat& src, GpuMat& sum, GpuMat& buffer, S
{
ensureSizeIsEnough(((src.rows + 7) / 8) * 8, ((src.cols + 63) / 64) * 64, CV_32SC1, buffer);
cv::gpu::cuda::imgproc::shfl_integral_gpu(src, buffer, stream);
cv::gpu::cudev::imgproc::shfl_integral_gpu(src, buffer, stream);
sum.create(src.rows + 1, src.cols + 1, CV_32SC1);
if (s)
@@ -631,7 +631,7 @@ void cv::gpu::sqrIntegral(const GpuMat& src, GpuMat& sqsum, Stream& s)
//////////////////////////////////////////////////////////////////////////////
// columnSum
namespace cv { namespace gpu { namespace cuda
namespace cv { namespace gpu { namespace cudev
{
namespace imgproc
{
@@ -641,13 +641,13 @@ namespace cv { namespace gpu { namespace cuda
void cv::gpu::columnSum(const GpuMat& src, GpuMat& dst)
{
using namespace ::cv::gpu::cuda::imgproc;
using namespace ::cv::gpu::cudev::imgproc;
CV_Assert(src.type() == CV_32F);
dst.create(src.size(), CV_32F);
cuda::imgproc::columnSum_32F(src, dst);
cudev::imgproc::columnSum_32F(src, dst);
}
void cv::gpu::rectStdDev(const GpuMat& src, const GpuMat& sqr, GpuMat& dst, const Rect& rect, Stream& s)
@@ -1021,7 +1021,7 @@ void cv::gpu::equalizeHist(const GpuMat& src, GpuMat& dst, GpuMat& hist, GpuMat&
////////////////////////////////////////////////////////////////////////
// cornerHarris & minEgenVal
namespace cv { namespace gpu { namespace cuda
namespace cv { namespace gpu { namespace cudev
{
namespace imgproc
{
@@ -1074,7 +1074,7 @@ void cv::gpu::cornerHarris(const GpuMat& src, GpuMat& dst, GpuMat& Dx, GpuMat& D
void cv::gpu::cornerHarris(const GpuMat& src, GpuMat& dst, GpuMat& Dx, GpuMat& Dy, GpuMat& buf, int blockSize, int ksize, double k, int borderType, Stream& stream)
{
using namespace cv::gpu::cuda::imgproc;
using namespace cv::gpu::cudev::imgproc;
CV_Assert(borderType == cv::BORDER_REFLECT101 || borderType == cv::BORDER_REPLICATE || borderType == cv::BORDER_REFLECT);
@@ -1102,7 +1102,7 @@ void cv::gpu::cornerMinEigenVal(const GpuMat& src, GpuMat& dst, GpuMat& Dx, GpuM
void cv::gpu::cornerMinEigenVal(const GpuMat& src, GpuMat& dst, GpuMat& Dx, GpuMat& Dy, GpuMat& buf, int blockSize, int ksize, int borderType, Stream& stream)
{
using namespace ::cv::gpu::cuda::imgproc;
using namespace ::cv::gpu::cudev::imgproc;
CV_Assert(borderType == cv::BORDER_REFLECT101 || borderType == cv::BORDER_REPLICATE || borderType == cv::BORDER_REFLECT);
@@ -1119,7 +1119,7 @@ void cv::gpu::cornerMinEigenVal(const GpuMat& src, GpuMat& dst, GpuMat& Dx, GpuM
//////////////////////////////////////////////////////////////////////////////
// mulSpectrums
namespace cv { namespace gpu { namespace cuda
namespace cv { namespace gpu { namespace cudev
{
namespace imgproc
{
@@ -1132,11 +1132,11 @@ namespace cv { namespace gpu { namespace cuda
void cv::gpu::mulSpectrums(const GpuMat& a, const GpuMat& b, GpuMat& c, int flags, bool conjB, Stream& stream)
{
(void)flags;
using namespace ::cv::gpu::cuda::imgproc;
using namespace ::cv::gpu::cudev::imgproc;
typedef void (*Caller)(const PtrStep<cufftComplex>, const PtrStep<cufftComplex>, PtrStepSz<cufftComplex>, cudaStream_t stream);
static Caller callers[] = { cuda::imgproc::mulSpectrums, cuda::imgproc::mulSpectrums_CONJ };
static Caller callers[] = { cudev::imgproc::mulSpectrums, cudev::imgproc::mulSpectrums_CONJ };
CV_Assert(a.type() == b.type() && a.type() == CV_32FC2);
CV_Assert(a.size() == b.size());
@@ -1150,7 +1150,7 @@ void cv::gpu::mulSpectrums(const GpuMat& a, const GpuMat& b, GpuMat& c, int flag
//////////////////////////////////////////////////////////////////////////////
// mulAndScaleSpectrums
namespace cv { namespace gpu { namespace cuda
namespace cv { namespace gpu { namespace cudev
{
namespace imgproc
{
@@ -1163,10 +1163,10 @@ namespace cv { namespace gpu { namespace cuda
void cv::gpu::mulAndScaleSpectrums(const GpuMat& a, const GpuMat& b, GpuMat& c, int flags, float scale, bool conjB, Stream& stream)
{
(void)flags;
using namespace ::cv::gpu::cuda::imgproc;
using namespace ::cv::gpu::cudev::imgproc;
typedef void (*Caller)(const PtrStep<cufftComplex>, const PtrStep<cufftComplex>, float scale, PtrStepSz<cufftComplex>, cudaStream_t stream);
static Caller callers[] = { cuda::imgproc::mulAndScaleSpectrums, cuda::imgproc::mulAndScaleSpectrums_CONJ };
static Caller callers[] = { cudev::imgproc::mulAndScaleSpectrums, cudev::imgproc::mulAndScaleSpectrums_CONJ };
CV_Assert(a.type() == b.type() && a.type() == CV_32FC2);
CV_Assert(a.size() == b.size());
@@ -1335,7 +1335,7 @@ void cv::gpu::convolve(const GpuMat& image, const GpuMat& templ, GpuMat& result,
void cv::gpu::convolve(const GpuMat& image, const GpuMat& templ, GpuMat& result, bool ccorr, ConvolveBuf& buf, Stream& stream)
{
using namespace ::cv::gpu::cuda::imgproc;
using namespace ::cv::gpu::cudev::imgproc;
#ifndef HAVE_CUFFT
throw_no_cuda();