diff --git a/modules/core/include/opencv2/core/cuda.hpp b/modules/core/include/opencv2/core/cuda.hpp index 684005fe2..49e22b064 100644 --- a/modules/core/include/opencv2/core/cuda.hpp +++ b/modules/core/include/opencv2/core/cuda.hpp @@ -41,8 +41,8 @@ // //M*/ -#ifndef __OPENCV_CORE_GPU_HPP__ -#define __OPENCV_CORE_GPU_HPP__ +#ifndef __OPENCV_CORE_CUDA_HPP__ +#define __OPENCV_CORE_CUDA_HPP__ #ifndef __cplusplus # error cuda.hpp header must be compiled as C++ @@ -453,7 +453,7 @@ enum FeatureSet //! checks whether current device supports the given feature CV_EXPORTS bool deviceSupports(FeatureSet feature_set); -//! information about what GPU archs this OpenCV GPU module was compiled for +//! information about what GPU archs this OpenCV CUDA module was compiled for class CV_EXPORTS TargetArchs { public: @@ -654,7 +654,7 @@ public: //! checks whether device supports the given feature bool supports(FeatureSet feature_set) const; - //! checks whether the GPU module can be run on the given device + //! checks whether the CUDA module can be run on the given device bool isCompatible() const; private: @@ -675,4 +675,4 @@ template <> CV_EXPORTS void Ptr::delete_obj(); #include "opencv2/core/cuda.inl.hpp" -#endif /* __OPENCV_CORE_GPU_HPP__ */ +#endif /* __OPENCV_CORE_CUDA_HPP__ */ diff --git a/modules/core/include/opencv2/core/cuda.inl.hpp b/modules/core/include/opencv2/core/cuda.inl.hpp index c2455a61e..7410074b5 100644 --- a/modules/core/include/opencv2/core/cuda.inl.hpp +++ b/modules/core/include/opencv2/core/cuda.inl.hpp @@ -41,8 +41,8 @@ // //M*/ -#ifndef __OPENCV_CORE_GPUINL_HPP__ -#define __OPENCV_CORE_GPUINL_HPP__ +#ifndef __OPENCV_CORE_CUDAINL_HPP__ +#define __OPENCV_CORE_CUDAINL_HPP__ #include "opencv2/core/cuda.hpp" @@ -602,4 +602,4 @@ Mat::Mat(const cuda::GpuMat& m) } -#endif // __OPENCV_CORE_GPUINL_HPP__ +#endif // __OPENCV_CORE_CUDAINL_HPP__ diff --git a/modules/core/include/opencv2/core/cuda/block.hpp b/modules/core/include/opencv2/core/cuda/block.hpp index daa7112d8..0d596fd34 100644 --- a/modules/core/include/opencv2/core/cuda/block.hpp +++ b/modules/core/include/opencv2/core/cuda/block.hpp @@ -40,8 +40,8 @@ // //M*/ -#ifndef __OPENCV_GPU_DEVICE_BLOCK_HPP__ -#define __OPENCV_GPU_DEVICE_BLOCK_HPP__ +#ifndef __OPENCV_CUDA_DEVICE_BLOCK_HPP__ +#define __OPENCV_CUDA_DEVICE_BLOCK_HPP__ namespace cv { namespace cuda { namespace device { @@ -200,4 +200,4 @@ namespace cv { namespace cuda { namespace device }; }}} -#endif /* __OPENCV_GPU_DEVICE_BLOCK_HPP__ */ +#endif /* __OPENCV_CUDA_DEVICE_BLOCK_HPP__ */ diff --git a/modules/core/include/opencv2/core/cuda/border_interpolate.hpp b/modules/core/include/opencv2/core/cuda/border_interpolate.hpp index 3fcf6b2bb..e2128abd5 100644 --- a/modules/core/include/opencv2/core/cuda/border_interpolate.hpp +++ b/modules/core/include/opencv2/core/cuda/border_interpolate.hpp @@ -40,8 +40,8 @@ // //M*/ -#ifndef __OPENCV_GPU_BORDER_INTERPOLATE_HPP__ -#define __OPENCV_GPU_BORDER_INTERPOLATE_HPP__ +#ifndef __OPENCV_CUDA_BORDER_INTERPOLATE_HPP__ +#define __OPENCV_CUDA_BORDER_INTERPOLATE_HPP__ #include "saturate_cast.hpp" #include "vec_traits.hpp" @@ -711,4 +711,4 @@ namespace cv { namespace cuda { namespace device }; }}} // namespace cv { namespace cuda { namespace cudev -#endif // __OPENCV_GPU_BORDER_INTERPOLATE_HPP__ +#endif // __OPENCV_CUDA_BORDER_INTERPOLATE_HPP__ diff --git a/modules/core/include/opencv2/core/cuda/color.hpp b/modules/core/include/opencv2/core/cuda/color.hpp index 8018aaf6c..69c68af75 100644 --- a/modules/core/include/opencv2/core/cuda/color.hpp +++ b/modules/core/include/opencv2/core/cuda/color.hpp @@ -40,262 +40,262 @@ // //M*/ -#ifndef __OPENCV_GPU_COLOR_HPP__ -#define __OPENCV_GPU_COLOR_HPP__ +#ifndef __OPENCV_CUDA_COLOR_HPP__ +#define __OPENCV_CUDA_COLOR_HPP__ #include "detail/color_detail.hpp" namespace cv { namespace cuda { namespace device { - // All OPENCV_GPU_IMPLEMENT_*_TRAITS(ColorSpace1_to_ColorSpace2, ...) macros implements + // All OPENCV_CUDA_IMPLEMENT_*_TRAITS(ColorSpace1_to_ColorSpace2, ...) macros implements // template class ColorSpace1_to_ColorSpace2_traits // { // typedef ... functor_type; // static __host__ __device__ functor_type create_functor(); // }; - OPENCV_GPU_IMPLEMENT_RGB2RGB_TRAITS(bgr_to_rgb, 3, 3, 2) - OPENCV_GPU_IMPLEMENT_RGB2RGB_TRAITS(bgr_to_bgra, 3, 4, 0) - OPENCV_GPU_IMPLEMENT_RGB2RGB_TRAITS(bgr_to_rgba, 3, 4, 2) - OPENCV_GPU_IMPLEMENT_RGB2RGB_TRAITS(bgra_to_bgr, 4, 3, 0) - OPENCV_GPU_IMPLEMENT_RGB2RGB_TRAITS(bgra_to_rgb, 4, 3, 2) - OPENCV_GPU_IMPLEMENT_RGB2RGB_TRAITS(bgra_to_rgba, 4, 4, 2) + OPENCV_CUDA_IMPLEMENT_RGB2RGB_TRAITS(bgr_to_rgb, 3, 3, 2) + OPENCV_CUDA_IMPLEMENT_RGB2RGB_TRAITS(bgr_to_bgra, 3, 4, 0) + OPENCV_CUDA_IMPLEMENT_RGB2RGB_TRAITS(bgr_to_rgba, 3, 4, 2) + OPENCV_CUDA_IMPLEMENT_RGB2RGB_TRAITS(bgra_to_bgr, 4, 3, 0) + OPENCV_CUDA_IMPLEMENT_RGB2RGB_TRAITS(bgra_to_rgb, 4, 3, 2) + OPENCV_CUDA_IMPLEMENT_RGB2RGB_TRAITS(bgra_to_rgba, 4, 4, 2) - #undef OPENCV_GPU_IMPLEMENT_RGB2RGB_TRAITS + #undef OPENCV_CUDA_IMPLEMENT_RGB2RGB_TRAITS - OPENCV_GPU_IMPLEMENT_RGB2RGB5x5_TRAITS(bgr_to_bgr555, 3, 0, 5) - OPENCV_GPU_IMPLEMENT_RGB2RGB5x5_TRAITS(bgr_to_bgr565, 3, 0, 6) - OPENCV_GPU_IMPLEMENT_RGB2RGB5x5_TRAITS(rgb_to_bgr555, 3, 2, 5) - OPENCV_GPU_IMPLEMENT_RGB2RGB5x5_TRAITS(rgb_to_bgr565, 3, 2, 6) - OPENCV_GPU_IMPLEMENT_RGB2RGB5x5_TRAITS(bgra_to_bgr555, 4, 0, 5) - OPENCV_GPU_IMPLEMENT_RGB2RGB5x5_TRAITS(bgra_to_bgr565, 4, 0, 6) - OPENCV_GPU_IMPLEMENT_RGB2RGB5x5_TRAITS(rgba_to_bgr555, 4, 2, 5) - OPENCV_GPU_IMPLEMENT_RGB2RGB5x5_TRAITS(rgba_to_bgr565, 4, 2, 6) + OPENCV_CUDA_IMPLEMENT_RGB2RGB5x5_TRAITS(bgr_to_bgr555, 3, 0, 5) + OPENCV_CUDA_IMPLEMENT_RGB2RGB5x5_TRAITS(bgr_to_bgr565, 3, 0, 6) + OPENCV_CUDA_IMPLEMENT_RGB2RGB5x5_TRAITS(rgb_to_bgr555, 3, 2, 5) + OPENCV_CUDA_IMPLEMENT_RGB2RGB5x5_TRAITS(rgb_to_bgr565, 3, 2, 6) + OPENCV_CUDA_IMPLEMENT_RGB2RGB5x5_TRAITS(bgra_to_bgr555, 4, 0, 5) + OPENCV_CUDA_IMPLEMENT_RGB2RGB5x5_TRAITS(bgra_to_bgr565, 4, 0, 6) + OPENCV_CUDA_IMPLEMENT_RGB2RGB5x5_TRAITS(rgba_to_bgr555, 4, 2, 5) + OPENCV_CUDA_IMPLEMENT_RGB2RGB5x5_TRAITS(rgba_to_bgr565, 4, 2, 6) - #undef OPENCV_GPU_IMPLEMENT_RGB2RGB5x5_TRAITS + #undef OPENCV_CUDA_IMPLEMENT_RGB2RGB5x5_TRAITS - OPENCV_GPU_IMPLEMENT_RGB5x52RGB_TRAITS(bgr555_to_rgb, 3, 2, 5) - OPENCV_GPU_IMPLEMENT_RGB5x52RGB_TRAITS(bgr565_to_rgb, 3, 2, 6) - OPENCV_GPU_IMPLEMENT_RGB5x52RGB_TRAITS(bgr555_to_bgr, 3, 0, 5) - OPENCV_GPU_IMPLEMENT_RGB5x52RGB_TRAITS(bgr565_to_bgr, 3, 0, 6) - OPENCV_GPU_IMPLEMENT_RGB5x52RGB_TRAITS(bgr555_to_rgba, 4, 2, 5) - OPENCV_GPU_IMPLEMENT_RGB5x52RGB_TRAITS(bgr565_to_rgba, 4, 2, 6) - OPENCV_GPU_IMPLEMENT_RGB5x52RGB_TRAITS(bgr555_to_bgra, 4, 0, 5) - OPENCV_GPU_IMPLEMENT_RGB5x52RGB_TRAITS(bgr565_to_bgra, 4, 0, 6) + OPENCV_CUDA_IMPLEMENT_RGB5x52RGB_TRAITS(bgr555_to_rgb, 3, 2, 5) + OPENCV_CUDA_IMPLEMENT_RGB5x52RGB_TRAITS(bgr565_to_rgb, 3, 2, 6) + OPENCV_CUDA_IMPLEMENT_RGB5x52RGB_TRAITS(bgr555_to_bgr, 3, 0, 5) + OPENCV_CUDA_IMPLEMENT_RGB5x52RGB_TRAITS(bgr565_to_bgr, 3, 0, 6) + OPENCV_CUDA_IMPLEMENT_RGB5x52RGB_TRAITS(bgr555_to_rgba, 4, 2, 5) + OPENCV_CUDA_IMPLEMENT_RGB5x52RGB_TRAITS(bgr565_to_rgba, 4, 2, 6) + OPENCV_CUDA_IMPLEMENT_RGB5x52RGB_TRAITS(bgr555_to_bgra, 4, 0, 5) + OPENCV_CUDA_IMPLEMENT_RGB5x52RGB_TRAITS(bgr565_to_bgra, 4, 0, 6) - #undef OPENCV_GPU_IMPLEMENT_RGB5x52RGB_TRAITS + #undef OPENCV_CUDA_IMPLEMENT_RGB5x52RGB_TRAITS - OPENCV_GPU_IMPLEMENT_GRAY2RGB_TRAITS(gray_to_bgr, 3) - OPENCV_GPU_IMPLEMENT_GRAY2RGB_TRAITS(gray_to_bgra, 4) + OPENCV_CUDA_IMPLEMENT_GRAY2RGB_TRAITS(gray_to_bgr, 3) + OPENCV_CUDA_IMPLEMENT_GRAY2RGB_TRAITS(gray_to_bgra, 4) - #undef OPENCV_GPU_IMPLEMENT_GRAY2RGB_TRAITS + #undef OPENCV_CUDA_IMPLEMENT_GRAY2RGB_TRAITS - OPENCV_GPU_IMPLEMENT_GRAY2RGB5x5_TRAITS(gray_to_bgr555, 5) - OPENCV_GPU_IMPLEMENT_GRAY2RGB5x5_TRAITS(gray_to_bgr565, 6) + OPENCV_CUDA_IMPLEMENT_GRAY2RGB5x5_TRAITS(gray_to_bgr555, 5) + OPENCV_CUDA_IMPLEMENT_GRAY2RGB5x5_TRAITS(gray_to_bgr565, 6) - #undef OPENCV_GPU_IMPLEMENT_GRAY2RGB5x5_TRAITS + #undef OPENCV_CUDA_IMPLEMENT_GRAY2RGB5x5_TRAITS - OPENCV_GPU_IMPLEMENT_RGB5x52GRAY_TRAITS(bgr555_to_gray, 5) - OPENCV_GPU_IMPLEMENT_RGB5x52GRAY_TRAITS(bgr565_to_gray, 6) + OPENCV_CUDA_IMPLEMENT_RGB5x52GRAY_TRAITS(bgr555_to_gray, 5) + OPENCV_CUDA_IMPLEMENT_RGB5x52GRAY_TRAITS(bgr565_to_gray, 6) - #undef OPENCV_GPU_IMPLEMENT_RGB5x52GRAY_TRAITS + #undef OPENCV_CUDA_IMPLEMENT_RGB5x52GRAY_TRAITS - OPENCV_GPU_IMPLEMENT_RGB2GRAY_TRAITS(rgb_to_gray, 3, 2) - OPENCV_GPU_IMPLEMENT_RGB2GRAY_TRAITS(bgr_to_gray, 3, 0) - OPENCV_GPU_IMPLEMENT_RGB2GRAY_TRAITS(rgba_to_gray, 4, 2) - OPENCV_GPU_IMPLEMENT_RGB2GRAY_TRAITS(bgra_to_gray, 4, 0) + OPENCV_CUDA_IMPLEMENT_RGB2GRAY_TRAITS(rgb_to_gray, 3, 2) + OPENCV_CUDA_IMPLEMENT_RGB2GRAY_TRAITS(bgr_to_gray, 3, 0) + OPENCV_CUDA_IMPLEMENT_RGB2GRAY_TRAITS(rgba_to_gray, 4, 2) + OPENCV_CUDA_IMPLEMENT_RGB2GRAY_TRAITS(bgra_to_gray, 4, 0) - #undef OPENCV_GPU_IMPLEMENT_RGB2GRAY_TRAITS + #undef OPENCV_CUDA_IMPLEMENT_RGB2GRAY_TRAITS - OPENCV_GPU_IMPLEMENT_RGB2YUV_TRAITS(rgb_to_yuv, 3, 3, 2) - OPENCV_GPU_IMPLEMENT_RGB2YUV_TRAITS(rgba_to_yuv, 4, 3, 2) - OPENCV_GPU_IMPLEMENT_RGB2YUV_TRAITS(rgb_to_yuv4, 3, 4, 2) - OPENCV_GPU_IMPLEMENT_RGB2YUV_TRAITS(rgba_to_yuv4, 4, 4, 2) - OPENCV_GPU_IMPLEMENT_RGB2YUV_TRAITS(bgr_to_yuv, 3, 3, 0) - OPENCV_GPU_IMPLEMENT_RGB2YUV_TRAITS(bgra_to_yuv, 4, 3, 0) - OPENCV_GPU_IMPLEMENT_RGB2YUV_TRAITS(bgr_to_yuv4, 3, 4, 0) - OPENCV_GPU_IMPLEMENT_RGB2YUV_TRAITS(bgra_to_yuv4, 4, 4, 0) + OPENCV_CUDA_IMPLEMENT_RGB2YUV_TRAITS(rgb_to_yuv, 3, 3, 2) + OPENCV_CUDA_IMPLEMENT_RGB2YUV_TRAITS(rgba_to_yuv, 4, 3, 2) + OPENCV_CUDA_IMPLEMENT_RGB2YUV_TRAITS(rgb_to_yuv4, 3, 4, 2) + OPENCV_CUDA_IMPLEMENT_RGB2YUV_TRAITS(rgba_to_yuv4, 4, 4, 2) + OPENCV_CUDA_IMPLEMENT_RGB2YUV_TRAITS(bgr_to_yuv, 3, 3, 0) + OPENCV_CUDA_IMPLEMENT_RGB2YUV_TRAITS(bgra_to_yuv, 4, 3, 0) + OPENCV_CUDA_IMPLEMENT_RGB2YUV_TRAITS(bgr_to_yuv4, 3, 4, 0) + OPENCV_CUDA_IMPLEMENT_RGB2YUV_TRAITS(bgra_to_yuv4, 4, 4, 0) - #undef OPENCV_GPU_IMPLEMENT_RGB2YUV_TRAITS + #undef OPENCV_CUDA_IMPLEMENT_RGB2YUV_TRAITS - OPENCV_GPU_IMPLEMENT_YUV2RGB_TRAITS(yuv_to_rgb, 3, 3, 2) - OPENCV_GPU_IMPLEMENT_YUV2RGB_TRAITS(yuv_to_rgba, 3, 4, 2) - OPENCV_GPU_IMPLEMENT_YUV2RGB_TRAITS(yuv4_to_rgb, 4, 3, 2) - OPENCV_GPU_IMPLEMENT_YUV2RGB_TRAITS(yuv4_to_rgba, 4, 4, 2) - OPENCV_GPU_IMPLEMENT_YUV2RGB_TRAITS(yuv_to_bgr, 3, 3, 0) - OPENCV_GPU_IMPLEMENT_YUV2RGB_TRAITS(yuv_to_bgra, 3, 4, 0) - OPENCV_GPU_IMPLEMENT_YUV2RGB_TRAITS(yuv4_to_bgr, 4, 3, 0) - OPENCV_GPU_IMPLEMENT_YUV2RGB_TRAITS(yuv4_to_bgra, 4, 4, 0) + OPENCV_CUDA_IMPLEMENT_YUV2RGB_TRAITS(yuv_to_rgb, 3, 3, 2) + OPENCV_CUDA_IMPLEMENT_YUV2RGB_TRAITS(yuv_to_rgba, 3, 4, 2) + OPENCV_CUDA_IMPLEMENT_YUV2RGB_TRAITS(yuv4_to_rgb, 4, 3, 2) + OPENCV_CUDA_IMPLEMENT_YUV2RGB_TRAITS(yuv4_to_rgba, 4, 4, 2) + OPENCV_CUDA_IMPLEMENT_YUV2RGB_TRAITS(yuv_to_bgr, 3, 3, 0) + OPENCV_CUDA_IMPLEMENT_YUV2RGB_TRAITS(yuv_to_bgra, 3, 4, 0) + OPENCV_CUDA_IMPLEMENT_YUV2RGB_TRAITS(yuv4_to_bgr, 4, 3, 0) + OPENCV_CUDA_IMPLEMENT_YUV2RGB_TRAITS(yuv4_to_bgra, 4, 4, 0) - #undef OPENCV_GPU_IMPLEMENT_YUV2RGB_TRAITS + #undef OPENCV_CUDA_IMPLEMENT_YUV2RGB_TRAITS - OPENCV_GPU_IMPLEMENT_RGB2YCrCb_TRAITS(rgb_to_YCrCb, 3, 3, 2) - OPENCV_GPU_IMPLEMENT_RGB2YCrCb_TRAITS(rgba_to_YCrCb, 4, 3, 2) - OPENCV_GPU_IMPLEMENT_RGB2YCrCb_TRAITS(rgb_to_YCrCb4, 3, 4, 2) - OPENCV_GPU_IMPLEMENT_RGB2YCrCb_TRAITS(rgba_to_YCrCb4, 4, 4, 2) - OPENCV_GPU_IMPLEMENT_RGB2YCrCb_TRAITS(bgr_to_YCrCb, 3, 3, 0) - OPENCV_GPU_IMPLEMENT_RGB2YCrCb_TRAITS(bgra_to_YCrCb, 4, 3, 0) - OPENCV_GPU_IMPLEMENT_RGB2YCrCb_TRAITS(bgr_to_YCrCb4, 3, 4, 0) - OPENCV_GPU_IMPLEMENT_RGB2YCrCb_TRAITS(bgra_to_YCrCb4, 4, 4, 0) + OPENCV_CUDA_IMPLEMENT_RGB2YCrCb_TRAITS(rgb_to_YCrCb, 3, 3, 2) + OPENCV_CUDA_IMPLEMENT_RGB2YCrCb_TRAITS(rgba_to_YCrCb, 4, 3, 2) + OPENCV_CUDA_IMPLEMENT_RGB2YCrCb_TRAITS(rgb_to_YCrCb4, 3, 4, 2) + OPENCV_CUDA_IMPLEMENT_RGB2YCrCb_TRAITS(rgba_to_YCrCb4, 4, 4, 2) + OPENCV_CUDA_IMPLEMENT_RGB2YCrCb_TRAITS(bgr_to_YCrCb, 3, 3, 0) + OPENCV_CUDA_IMPLEMENT_RGB2YCrCb_TRAITS(bgra_to_YCrCb, 4, 3, 0) + OPENCV_CUDA_IMPLEMENT_RGB2YCrCb_TRAITS(bgr_to_YCrCb4, 3, 4, 0) + OPENCV_CUDA_IMPLEMENT_RGB2YCrCb_TRAITS(bgra_to_YCrCb4, 4, 4, 0) - #undef OPENCV_GPU_IMPLEMENT_RGB2YCrCb_TRAITS + #undef OPENCV_CUDA_IMPLEMENT_RGB2YCrCb_TRAITS - OPENCV_GPU_IMPLEMENT_YCrCb2RGB_TRAITS(YCrCb_to_rgb, 3, 3, 2) - OPENCV_GPU_IMPLEMENT_YCrCb2RGB_TRAITS(YCrCb_to_rgba, 3, 4, 2) - OPENCV_GPU_IMPLEMENT_YCrCb2RGB_TRAITS(YCrCb4_to_rgb, 4, 3, 2) - OPENCV_GPU_IMPLEMENT_YCrCb2RGB_TRAITS(YCrCb4_to_rgba, 4, 4, 2) - OPENCV_GPU_IMPLEMENT_YCrCb2RGB_TRAITS(YCrCb_to_bgr, 3, 3, 0) - OPENCV_GPU_IMPLEMENT_YCrCb2RGB_TRAITS(YCrCb_to_bgra, 3, 4, 0) - OPENCV_GPU_IMPLEMENT_YCrCb2RGB_TRAITS(YCrCb4_to_bgr, 4, 3, 0) - OPENCV_GPU_IMPLEMENT_YCrCb2RGB_TRAITS(YCrCb4_to_bgra, 4, 4, 0) + OPENCV_CUDA_IMPLEMENT_YCrCb2RGB_TRAITS(YCrCb_to_rgb, 3, 3, 2) + OPENCV_CUDA_IMPLEMENT_YCrCb2RGB_TRAITS(YCrCb_to_rgba, 3, 4, 2) + OPENCV_CUDA_IMPLEMENT_YCrCb2RGB_TRAITS(YCrCb4_to_rgb, 4, 3, 2) + OPENCV_CUDA_IMPLEMENT_YCrCb2RGB_TRAITS(YCrCb4_to_rgba, 4, 4, 2) + OPENCV_CUDA_IMPLEMENT_YCrCb2RGB_TRAITS(YCrCb_to_bgr, 3, 3, 0) + OPENCV_CUDA_IMPLEMENT_YCrCb2RGB_TRAITS(YCrCb_to_bgra, 3, 4, 0) + OPENCV_CUDA_IMPLEMENT_YCrCb2RGB_TRAITS(YCrCb4_to_bgr, 4, 3, 0) + OPENCV_CUDA_IMPLEMENT_YCrCb2RGB_TRAITS(YCrCb4_to_bgra, 4, 4, 0) - #undef OPENCV_GPU_IMPLEMENT_YCrCb2RGB_TRAITS + #undef OPENCV_CUDA_IMPLEMENT_YCrCb2RGB_TRAITS - OPENCV_GPU_IMPLEMENT_RGB2XYZ_TRAITS(rgb_to_xyz, 3, 3, 2) - OPENCV_GPU_IMPLEMENT_RGB2XYZ_TRAITS(rgba_to_xyz, 4, 3, 2) - OPENCV_GPU_IMPLEMENT_RGB2XYZ_TRAITS(rgb_to_xyz4, 3, 4, 2) - OPENCV_GPU_IMPLEMENT_RGB2XYZ_TRAITS(rgba_to_xyz4, 4, 4, 2) - OPENCV_GPU_IMPLEMENT_RGB2XYZ_TRAITS(bgr_to_xyz, 3, 3, 0) - OPENCV_GPU_IMPLEMENT_RGB2XYZ_TRAITS(bgra_to_xyz, 4, 3, 0) - OPENCV_GPU_IMPLEMENT_RGB2XYZ_TRAITS(bgr_to_xyz4, 3, 4, 0) - OPENCV_GPU_IMPLEMENT_RGB2XYZ_TRAITS(bgra_to_xyz4, 4, 4, 0) + OPENCV_CUDA_IMPLEMENT_RGB2XYZ_TRAITS(rgb_to_xyz, 3, 3, 2) + OPENCV_CUDA_IMPLEMENT_RGB2XYZ_TRAITS(rgba_to_xyz, 4, 3, 2) + OPENCV_CUDA_IMPLEMENT_RGB2XYZ_TRAITS(rgb_to_xyz4, 3, 4, 2) + OPENCV_CUDA_IMPLEMENT_RGB2XYZ_TRAITS(rgba_to_xyz4, 4, 4, 2) + OPENCV_CUDA_IMPLEMENT_RGB2XYZ_TRAITS(bgr_to_xyz, 3, 3, 0) + OPENCV_CUDA_IMPLEMENT_RGB2XYZ_TRAITS(bgra_to_xyz, 4, 3, 0) + OPENCV_CUDA_IMPLEMENT_RGB2XYZ_TRAITS(bgr_to_xyz4, 3, 4, 0) + OPENCV_CUDA_IMPLEMENT_RGB2XYZ_TRAITS(bgra_to_xyz4, 4, 4, 0) - #undef OPENCV_GPU_IMPLEMENT_RGB2XYZ_TRAITS + #undef OPENCV_CUDA_IMPLEMENT_RGB2XYZ_TRAITS - OPENCV_GPU_IMPLEMENT_XYZ2RGB_TRAITS(xyz_to_rgb, 3, 3, 2) - OPENCV_GPU_IMPLEMENT_XYZ2RGB_TRAITS(xyz4_to_rgb, 4, 3, 2) - OPENCV_GPU_IMPLEMENT_XYZ2RGB_TRAITS(xyz_to_rgba, 3, 4, 2) - OPENCV_GPU_IMPLEMENT_XYZ2RGB_TRAITS(xyz4_to_rgba, 4, 4, 2) - OPENCV_GPU_IMPLEMENT_XYZ2RGB_TRAITS(xyz_to_bgr, 3, 3, 0) - OPENCV_GPU_IMPLEMENT_XYZ2RGB_TRAITS(xyz4_to_bgr, 4, 3, 0) - OPENCV_GPU_IMPLEMENT_XYZ2RGB_TRAITS(xyz_to_bgra, 3, 4, 0) - OPENCV_GPU_IMPLEMENT_XYZ2RGB_TRAITS(xyz4_to_bgra, 4, 4, 0) + OPENCV_CUDA_IMPLEMENT_XYZ2RGB_TRAITS(xyz_to_rgb, 3, 3, 2) + OPENCV_CUDA_IMPLEMENT_XYZ2RGB_TRAITS(xyz4_to_rgb, 4, 3, 2) + OPENCV_CUDA_IMPLEMENT_XYZ2RGB_TRAITS(xyz_to_rgba, 3, 4, 2) + OPENCV_CUDA_IMPLEMENT_XYZ2RGB_TRAITS(xyz4_to_rgba, 4, 4, 2) + OPENCV_CUDA_IMPLEMENT_XYZ2RGB_TRAITS(xyz_to_bgr, 3, 3, 0) + OPENCV_CUDA_IMPLEMENT_XYZ2RGB_TRAITS(xyz4_to_bgr, 4, 3, 0) + OPENCV_CUDA_IMPLEMENT_XYZ2RGB_TRAITS(xyz_to_bgra, 3, 4, 0) + OPENCV_CUDA_IMPLEMENT_XYZ2RGB_TRAITS(xyz4_to_bgra, 4, 4, 0) - #undef OPENCV_GPU_IMPLEMENT_XYZ2RGB_TRAITS + #undef OPENCV_CUDA_IMPLEMENT_XYZ2RGB_TRAITS - OPENCV_GPU_IMPLEMENT_RGB2HSV_TRAITS(rgb_to_hsv, 3, 3, 2) - OPENCV_GPU_IMPLEMENT_RGB2HSV_TRAITS(rgba_to_hsv, 4, 3, 2) - OPENCV_GPU_IMPLEMENT_RGB2HSV_TRAITS(rgb_to_hsv4, 3, 4, 2) - OPENCV_GPU_IMPLEMENT_RGB2HSV_TRAITS(rgba_to_hsv4, 4, 4, 2) - OPENCV_GPU_IMPLEMENT_RGB2HSV_TRAITS(bgr_to_hsv, 3, 3, 0) - OPENCV_GPU_IMPLEMENT_RGB2HSV_TRAITS(bgra_to_hsv, 4, 3, 0) - OPENCV_GPU_IMPLEMENT_RGB2HSV_TRAITS(bgr_to_hsv4, 3, 4, 0) - OPENCV_GPU_IMPLEMENT_RGB2HSV_TRAITS(bgra_to_hsv4, 4, 4, 0) + OPENCV_CUDA_IMPLEMENT_RGB2HSV_TRAITS(rgb_to_hsv, 3, 3, 2) + OPENCV_CUDA_IMPLEMENT_RGB2HSV_TRAITS(rgba_to_hsv, 4, 3, 2) + OPENCV_CUDA_IMPLEMENT_RGB2HSV_TRAITS(rgb_to_hsv4, 3, 4, 2) + OPENCV_CUDA_IMPLEMENT_RGB2HSV_TRAITS(rgba_to_hsv4, 4, 4, 2) + OPENCV_CUDA_IMPLEMENT_RGB2HSV_TRAITS(bgr_to_hsv, 3, 3, 0) + OPENCV_CUDA_IMPLEMENT_RGB2HSV_TRAITS(bgra_to_hsv, 4, 3, 0) + OPENCV_CUDA_IMPLEMENT_RGB2HSV_TRAITS(bgr_to_hsv4, 3, 4, 0) + OPENCV_CUDA_IMPLEMENT_RGB2HSV_TRAITS(bgra_to_hsv4, 4, 4, 0) - #undef OPENCV_GPU_IMPLEMENT_RGB2HSV_TRAITS + #undef OPENCV_CUDA_IMPLEMENT_RGB2HSV_TRAITS - OPENCV_GPU_IMPLEMENT_HSV2RGB_TRAITS(hsv_to_rgb, 3, 3, 2) - OPENCV_GPU_IMPLEMENT_HSV2RGB_TRAITS(hsv_to_rgba, 3, 4, 2) - OPENCV_GPU_IMPLEMENT_HSV2RGB_TRAITS(hsv4_to_rgb, 4, 3, 2) - OPENCV_GPU_IMPLEMENT_HSV2RGB_TRAITS(hsv4_to_rgba, 4, 4, 2) - OPENCV_GPU_IMPLEMENT_HSV2RGB_TRAITS(hsv_to_bgr, 3, 3, 0) - OPENCV_GPU_IMPLEMENT_HSV2RGB_TRAITS(hsv_to_bgra, 3, 4, 0) - OPENCV_GPU_IMPLEMENT_HSV2RGB_TRAITS(hsv4_to_bgr, 4, 3, 0) - OPENCV_GPU_IMPLEMENT_HSV2RGB_TRAITS(hsv4_to_bgra, 4, 4, 0) + OPENCV_CUDA_IMPLEMENT_HSV2RGB_TRAITS(hsv_to_rgb, 3, 3, 2) + OPENCV_CUDA_IMPLEMENT_HSV2RGB_TRAITS(hsv_to_rgba, 3, 4, 2) + OPENCV_CUDA_IMPLEMENT_HSV2RGB_TRAITS(hsv4_to_rgb, 4, 3, 2) + OPENCV_CUDA_IMPLEMENT_HSV2RGB_TRAITS(hsv4_to_rgba, 4, 4, 2) + OPENCV_CUDA_IMPLEMENT_HSV2RGB_TRAITS(hsv_to_bgr, 3, 3, 0) + OPENCV_CUDA_IMPLEMENT_HSV2RGB_TRAITS(hsv_to_bgra, 3, 4, 0) + OPENCV_CUDA_IMPLEMENT_HSV2RGB_TRAITS(hsv4_to_bgr, 4, 3, 0) + OPENCV_CUDA_IMPLEMENT_HSV2RGB_TRAITS(hsv4_to_bgra, 4, 4, 0) - #undef OPENCV_GPU_IMPLEMENT_HSV2RGB_TRAITS + #undef OPENCV_CUDA_IMPLEMENT_HSV2RGB_TRAITS - OPENCV_GPU_IMPLEMENT_RGB2HLS_TRAITS(rgb_to_hls, 3, 3, 2) - OPENCV_GPU_IMPLEMENT_RGB2HLS_TRAITS(rgba_to_hls, 4, 3, 2) - OPENCV_GPU_IMPLEMENT_RGB2HLS_TRAITS(rgb_to_hls4, 3, 4, 2) - OPENCV_GPU_IMPLEMENT_RGB2HLS_TRAITS(rgba_to_hls4, 4, 4, 2) - OPENCV_GPU_IMPLEMENT_RGB2HLS_TRAITS(bgr_to_hls, 3, 3, 0) - OPENCV_GPU_IMPLEMENT_RGB2HLS_TRAITS(bgra_to_hls, 4, 3, 0) - OPENCV_GPU_IMPLEMENT_RGB2HLS_TRAITS(bgr_to_hls4, 3, 4, 0) - OPENCV_GPU_IMPLEMENT_RGB2HLS_TRAITS(bgra_to_hls4, 4, 4, 0) + OPENCV_CUDA_IMPLEMENT_RGB2HLS_TRAITS(rgb_to_hls, 3, 3, 2) + OPENCV_CUDA_IMPLEMENT_RGB2HLS_TRAITS(rgba_to_hls, 4, 3, 2) + OPENCV_CUDA_IMPLEMENT_RGB2HLS_TRAITS(rgb_to_hls4, 3, 4, 2) + OPENCV_CUDA_IMPLEMENT_RGB2HLS_TRAITS(rgba_to_hls4, 4, 4, 2) + OPENCV_CUDA_IMPLEMENT_RGB2HLS_TRAITS(bgr_to_hls, 3, 3, 0) + OPENCV_CUDA_IMPLEMENT_RGB2HLS_TRAITS(bgra_to_hls, 4, 3, 0) + OPENCV_CUDA_IMPLEMENT_RGB2HLS_TRAITS(bgr_to_hls4, 3, 4, 0) + OPENCV_CUDA_IMPLEMENT_RGB2HLS_TRAITS(bgra_to_hls4, 4, 4, 0) - #undef OPENCV_GPU_IMPLEMENT_RGB2HLS_TRAITS + #undef OPENCV_CUDA_IMPLEMENT_RGB2HLS_TRAITS - OPENCV_GPU_IMPLEMENT_HLS2RGB_TRAITS(hls_to_rgb, 3, 3, 2) - OPENCV_GPU_IMPLEMENT_HLS2RGB_TRAITS(hls_to_rgba, 3, 4, 2) - OPENCV_GPU_IMPLEMENT_HLS2RGB_TRAITS(hls4_to_rgb, 4, 3, 2) - OPENCV_GPU_IMPLEMENT_HLS2RGB_TRAITS(hls4_to_rgba, 4, 4, 2) - OPENCV_GPU_IMPLEMENT_HLS2RGB_TRAITS(hls_to_bgr, 3, 3, 0) - OPENCV_GPU_IMPLEMENT_HLS2RGB_TRAITS(hls_to_bgra, 3, 4, 0) - OPENCV_GPU_IMPLEMENT_HLS2RGB_TRAITS(hls4_to_bgr, 4, 3, 0) - OPENCV_GPU_IMPLEMENT_HLS2RGB_TRAITS(hls4_to_bgra, 4, 4, 0) + OPENCV_CUDA_IMPLEMENT_HLS2RGB_TRAITS(hls_to_rgb, 3, 3, 2) + OPENCV_CUDA_IMPLEMENT_HLS2RGB_TRAITS(hls_to_rgba, 3, 4, 2) + OPENCV_CUDA_IMPLEMENT_HLS2RGB_TRAITS(hls4_to_rgb, 4, 3, 2) + OPENCV_CUDA_IMPLEMENT_HLS2RGB_TRAITS(hls4_to_rgba, 4, 4, 2) + OPENCV_CUDA_IMPLEMENT_HLS2RGB_TRAITS(hls_to_bgr, 3, 3, 0) + OPENCV_CUDA_IMPLEMENT_HLS2RGB_TRAITS(hls_to_bgra, 3, 4, 0) + OPENCV_CUDA_IMPLEMENT_HLS2RGB_TRAITS(hls4_to_bgr, 4, 3, 0) + OPENCV_CUDA_IMPLEMENT_HLS2RGB_TRAITS(hls4_to_bgra, 4, 4, 0) - #undef OPENCV_GPU_IMPLEMENT_HLS2RGB_TRAITS + #undef OPENCV_CUDA_IMPLEMENT_HLS2RGB_TRAITS - OPENCV_GPU_IMPLEMENT_RGB2Lab_TRAITS(rgb_to_lab, 3, 3, true, 2) - OPENCV_GPU_IMPLEMENT_RGB2Lab_TRAITS(rgba_to_lab, 4, 3, true, 2) - OPENCV_GPU_IMPLEMENT_RGB2Lab_TRAITS(rgb_to_lab4, 3, 4, true, 2) - OPENCV_GPU_IMPLEMENT_RGB2Lab_TRAITS(rgba_to_lab4, 4, 4, true, 2) - OPENCV_GPU_IMPLEMENT_RGB2Lab_TRAITS(bgr_to_lab, 3, 3, true, 0) - OPENCV_GPU_IMPLEMENT_RGB2Lab_TRAITS(bgra_to_lab, 4, 3, true, 0) - OPENCV_GPU_IMPLEMENT_RGB2Lab_TRAITS(bgr_to_lab4, 3, 4, true, 0) - OPENCV_GPU_IMPLEMENT_RGB2Lab_TRAITS(bgra_to_lab4, 4, 4, true, 0) + OPENCV_CUDA_IMPLEMENT_RGB2Lab_TRAITS(rgb_to_lab, 3, 3, true, 2) + OPENCV_CUDA_IMPLEMENT_RGB2Lab_TRAITS(rgba_to_lab, 4, 3, true, 2) + OPENCV_CUDA_IMPLEMENT_RGB2Lab_TRAITS(rgb_to_lab4, 3, 4, true, 2) + OPENCV_CUDA_IMPLEMENT_RGB2Lab_TRAITS(rgba_to_lab4, 4, 4, true, 2) + OPENCV_CUDA_IMPLEMENT_RGB2Lab_TRAITS(bgr_to_lab, 3, 3, true, 0) + OPENCV_CUDA_IMPLEMENT_RGB2Lab_TRAITS(bgra_to_lab, 4, 3, true, 0) + OPENCV_CUDA_IMPLEMENT_RGB2Lab_TRAITS(bgr_to_lab4, 3, 4, true, 0) + OPENCV_CUDA_IMPLEMENT_RGB2Lab_TRAITS(bgra_to_lab4, 4, 4, true, 0) - OPENCV_GPU_IMPLEMENT_RGB2Lab_TRAITS(lrgb_to_lab, 3, 3, false, 2) - OPENCV_GPU_IMPLEMENT_RGB2Lab_TRAITS(lrgba_to_lab, 4, 3, false, 2) - OPENCV_GPU_IMPLEMENT_RGB2Lab_TRAITS(lrgb_to_lab4, 3, 4, false, 2) - OPENCV_GPU_IMPLEMENT_RGB2Lab_TRAITS(lrgba_to_lab4, 4, 4, false, 2) - OPENCV_GPU_IMPLEMENT_RGB2Lab_TRAITS(lbgr_to_lab, 3, 3, false, 0) - OPENCV_GPU_IMPLEMENT_RGB2Lab_TRAITS(lbgra_to_lab, 4, 3, false, 0) - OPENCV_GPU_IMPLEMENT_RGB2Lab_TRAITS(lbgr_to_lab4, 3, 4, false, 0) - OPENCV_GPU_IMPLEMENT_RGB2Lab_TRAITS(lbgra_to_lab4, 4, 4, false, 0) + OPENCV_CUDA_IMPLEMENT_RGB2Lab_TRAITS(lrgb_to_lab, 3, 3, false, 2) + OPENCV_CUDA_IMPLEMENT_RGB2Lab_TRAITS(lrgba_to_lab, 4, 3, false, 2) + OPENCV_CUDA_IMPLEMENT_RGB2Lab_TRAITS(lrgb_to_lab4, 3, 4, false, 2) + OPENCV_CUDA_IMPLEMENT_RGB2Lab_TRAITS(lrgba_to_lab4, 4, 4, false, 2) + OPENCV_CUDA_IMPLEMENT_RGB2Lab_TRAITS(lbgr_to_lab, 3, 3, false, 0) + OPENCV_CUDA_IMPLEMENT_RGB2Lab_TRAITS(lbgra_to_lab, 4, 3, false, 0) + OPENCV_CUDA_IMPLEMENT_RGB2Lab_TRAITS(lbgr_to_lab4, 3, 4, false, 0) + OPENCV_CUDA_IMPLEMENT_RGB2Lab_TRAITS(lbgra_to_lab4, 4, 4, false, 0) - #undef OPENCV_GPU_IMPLEMENT_RGB2Lab_TRAITS + #undef OPENCV_CUDA_IMPLEMENT_RGB2Lab_TRAITS - OPENCV_GPU_IMPLEMENT_Lab2RGB_TRAITS(lab_to_rgb, 3, 3, true, 2) - OPENCV_GPU_IMPLEMENT_Lab2RGB_TRAITS(lab4_to_rgb, 4, 3, true, 2) - OPENCV_GPU_IMPLEMENT_Lab2RGB_TRAITS(lab_to_rgba, 3, 4, true, 2) - OPENCV_GPU_IMPLEMENT_Lab2RGB_TRAITS(lab4_to_rgba, 4, 4, true, 2) - OPENCV_GPU_IMPLEMENT_Lab2RGB_TRAITS(lab_to_bgr, 3, 3, true, 0) - OPENCV_GPU_IMPLEMENT_Lab2RGB_TRAITS(lab4_to_bgr, 4, 3, true, 0) - OPENCV_GPU_IMPLEMENT_Lab2RGB_TRAITS(lab_to_bgra, 3, 4, true, 0) - OPENCV_GPU_IMPLEMENT_Lab2RGB_TRAITS(lab4_to_bgra, 4, 4, true, 0) + OPENCV_CUDA_IMPLEMENT_Lab2RGB_TRAITS(lab_to_rgb, 3, 3, true, 2) + OPENCV_CUDA_IMPLEMENT_Lab2RGB_TRAITS(lab4_to_rgb, 4, 3, true, 2) + OPENCV_CUDA_IMPLEMENT_Lab2RGB_TRAITS(lab_to_rgba, 3, 4, true, 2) + OPENCV_CUDA_IMPLEMENT_Lab2RGB_TRAITS(lab4_to_rgba, 4, 4, true, 2) + OPENCV_CUDA_IMPLEMENT_Lab2RGB_TRAITS(lab_to_bgr, 3, 3, true, 0) + OPENCV_CUDA_IMPLEMENT_Lab2RGB_TRAITS(lab4_to_bgr, 4, 3, true, 0) + OPENCV_CUDA_IMPLEMENT_Lab2RGB_TRAITS(lab_to_bgra, 3, 4, true, 0) + OPENCV_CUDA_IMPLEMENT_Lab2RGB_TRAITS(lab4_to_bgra, 4, 4, true, 0) - OPENCV_GPU_IMPLEMENT_Lab2RGB_TRAITS(lab_to_lrgb, 3, 3, false, 2) - OPENCV_GPU_IMPLEMENT_Lab2RGB_TRAITS(lab4_to_lrgb, 4, 3, false, 2) - OPENCV_GPU_IMPLEMENT_Lab2RGB_TRAITS(lab_to_lrgba, 3, 4, false, 2) - OPENCV_GPU_IMPLEMENT_Lab2RGB_TRAITS(lab4_to_lrgba, 4, 4, false, 2) - OPENCV_GPU_IMPLEMENT_Lab2RGB_TRAITS(lab_to_lbgr, 3, 3, false, 0) - OPENCV_GPU_IMPLEMENT_Lab2RGB_TRAITS(lab4_to_lbgr, 4, 3, false, 0) - OPENCV_GPU_IMPLEMENT_Lab2RGB_TRAITS(lab_to_lbgra, 3, 4, false, 0) - OPENCV_GPU_IMPLEMENT_Lab2RGB_TRAITS(lab4_to_lbgra, 4, 4, false, 0) + OPENCV_CUDA_IMPLEMENT_Lab2RGB_TRAITS(lab_to_lrgb, 3, 3, false, 2) + OPENCV_CUDA_IMPLEMENT_Lab2RGB_TRAITS(lab4_to_lrgb, 4, 3, false, 2) + OPENCV_CUDA_IMPLEMENT_Lab2RGB_TRAITS(lab_to_lrgba, 3, 4, false, 2) + OPENCV_CUDA_IMPLEMENT_Lab2RGB_TRAITS(lab4_to_lrgba, 4, 4, false, 2) + OPENCV_CUDA_IMPLEMENT_Lab2RGB_TRAITS(lab_to_lbgr, 3, 3, false, 0) + OPENCV_CUDA_IMPLEMENT_Lab2RGB_TRAITS(lab4_to_lbgr, 4, 3, false, 0) + OPENCV_CUDA_IMPLEMENT_Lab2RGB_TRAITS(lab_to_lbgra, 3, 4, false, 0) + OPENCV_CUDA_IMPLEMENT_Lab2RGB_TRAITS(lab4_to_lbgra, 4, 4, false, 0) - #undef OPENCV_GPU_IMPLEMENT_Lab2RGB_TRAITS + #undef OPENCV_CUDA_IMPLEMENT_Lab2RGB_TRAITS - OPENCV_GPU_IMPLEMENT_RGB2Luv_TRAITS(rgb_to_luv, 3, 3, true, 2) - OPENCV_GPU_IMPLEMENT_RGB2Luv_TRAITS(rgba_to_luv, 4, 3, true, 2) - OPENCV_GPU_IMPLEMENT_RGB2Luv_TRAITS(rgb_to_luv4, 3, 4, true, 2) - OPENCV_GPU_IMPLEMENT_RGB2Luv_TRAITS(rgba_to_luv4, 4, 4, true, 2) - OPENCV_GPU_IMPLEMENT_RGB2Luv_TRAITS(bgr_to_luv, 3, 3, true, 0) - OPENCV_GPU_IMPLEMENT_RGB2Luv_TRAITS(bgra_to_luv, 4, 3, true, 0) - OPENCV_GPU_IMPLEMENT_RGB2Luv_TRAITS(bgr_to_luv4, 3, 4, true, 0) - OPENCV_GPU_IMPLEMENT_RGB2Luv_TRAITS(bgra_to_luv4, 4, 4, true, 0) + OPENCV_CUDA_IMPLEMENT_RGB2Luv_TRAITS(rgb_to_luv, 3, 3, true, 2) + OPENCV_CUDA_IMPLEMENT_RGB2Luv_TRAITS(rgba_to_luv, 4, 3, true, 2) + OPENCV_CUDA_IMPLEMENT_RGB2Luv_TRAITS(rgb_to_luv4, 3, 4, true, 2) + OPENCV_CUDA_IMPLEMENT_RGB2Luv_TRAITS(rgba_to_luv4, 4, 4, true, 2) + OPENCV_CUDA_IMPLEMENT_RGB2Luv_TRAITS(bgr_to_luv, 3, 3, true, 0) + OPENCV_CUDA_IMPLEMENT_RGB2Luv_TRAITS(bgra_to_luv, 4, 3, true, 0) + OPENCV_CUDA_IMPLEMENT_RGB2Luv_TRAITS(bgr_to_luv4, 3, 4, true, 0) + OPENCV_CUDA_IMPLEMENT_RGB2Luv_TRAITS(bgra_to_luv4, 4, 4, true, 0) - OPENCV_GPU_IMPLEMENT_RGB2Luv_TRAITS(lrgb_to_luv, 3, 3, false, 2) - OPENCV_GPU_IMPLEMENT_RGB2Luv_TRAITS(lrgba_to_luv, 4, 3, false, 2) - OPENCV_GPU_IMPLEMENT_RGB2Luv_TRAITS(lrgb_to_luv4, 3, 4, false, 2) - OPENCV_GPU_IMPLEMENT_RGB2Luv_TRAITS(lrgba_to_luv4, 4, 4, false, 2) - OPENCV_GPU_IMPLEMENT_RGB2Luv_TRAITS(lbgr_to_luv, 3, 3, false, 0) - OPENCV_GPU_IMPLEMENT_RGB2Luv_TRAITS(lbgra_to_luv, 4, 3, false, 0) - OPENCV_GPU_IMPLEMENT_RGB2Luv_TRAITS(lbgr_to_luv4, 3, 4, false, 0) - OPENCV_GPU_IMPLEMENT_RGB2Luv_TRAITS(lbgra_to_luv4, 4, 4, false, 0) + OPENCV_CUDA_IMPLEMENT_RGB2Luv_TRAITS(lrgb_to_luv, 3, 3, false, 2) + OPENCV_CUDA_IMPLEMENT_RGB2Luv_TRAITS(lrgba_to_luv, 4, 3, false, 2) + OPENCV_CUDA_IMPLEMENT_RGB2Luv_TRAITS(lrgb_to_luv4, 3, 4, false, 2) + OPENCV_CUDA_IMPLEMENT_RGB2Luv_TRAITS(lrgba_to_luv4, 4, 4, false, 2) + OPENCV_CUDA_IMPLEMENT_RGB2Luv_TRAITS(lbgr_to_luv, 3, 3, false, 0) + OPENCV_CUDA_IMPLEMENT_RGB2Luv_TRAITS(lbgra_to_luv, 4, 3, false, 0) + OPENCV_CUDA_IMPLEMENT_RGB2Luv_TRAITS(lbgr_to_luv4, 3, 4, false, 0) + OPENCV_CUDA_IMPLEMENT_RGB2Luv_TRAITS(lbgra_to_luv4, 4, 4, false, 0) - #undef OPENCV_GPU_IMPLEMENT_RGB2Luv_TRAITS + #undef OPENCV_CUDA_IMPLEMENT_RGB2Luv_TRAITS - OPENCV_GPU_IMPLEMENT_Luv2RGB_TRAITS(luv_to_rgb, 3, 3, true, 2) - OPENCV_GPU_IMPLEMENT_Luv2RGB_TRAITS(luv4_to_rgb, 4, 3, true, 2) - OPENCV_GPU_IMPLEMENT_Luv2RGB_TRAITS(luv_to_rgba, 3, 4, true, 2) - OPENCV_GPU_IMPLEMENT_Luv2RGB_TRAITS(luv4_to_rgba, 4, 4, true, 2) - OPENCV_GPU_IMPLEMENT_Luv2RGB_TRAITS(luv_to_bgr, 3, 3, true, 0) - OPENCV_GPU_IMPLEMENT_Luv2RGB_TRAITS(luv4_to_bgr, 4, 3, true, 0) - OPENCV_GPU_IMPLEMENT_Luv2RGB_TRAITS(luv_to_bgra, 3, 4, true, 0) - OPENCV_GPU_IMPLEMENT_Luv2RGB_TRAITS(luv4_to_bgra, 4, 4, true, 0) + OPENCV_CUDA_IMPLEMENT_Luv2RGB_TRAITS(luv_to_rgb, 3, 3, true, 2) + OPENCV_CUDA_IMPLEMENT_Luv2RGB_TRAITS(luv4_to_rgb, 4, 3, true, 2) + OPENCV_CUDA_IMPLEMENT_Luv2RGB_TRAITS(luv_to_rgba, 3, 4, true, 2) + OPENCV_CUDA_IMPLEMENT_Luv2RGB_TRAITS(luv4_to_rgba, 4, 4, true, 2) + OPENCV_CUDA_IMPLEMENT_Luv2RGB_TRAITS(luv_to_bgr, 3, 3, true, 0) + OPENCV_CUDA_IMPLEMENT_Luv2RGB_TRAITS(luv4_to_bgr, 4, 3, true, 0) + OPENCV_CUDA_IMPLEMENT_Luv2RGB_TRAITS(luv_to_bgra, 3, 4, true, 0) + OPENCV_CUDA_IMPLEMENT_Luv2RGB_TRAITS(luv4_to_bgra, 4, 4, true, 0) - OPENCV_GPU_IMPLEMENT_Luv2RGB_TRAITS(luv_to_lrgb, 3, 3, false, 2) - OPENCV_GPU_IMPLEMENT_Luv2RGB_TRAITS(luv4_to_lrgb, 4, 3, false, 2) - OPENCV_GPU_IMPLEMENT_Luv2RGB_TRAITS(luv_to_lrgba, 3, 4, false, 2) - OPENCV_GPU_IMPLEMENT_Luv2RGB_TRAITS(luv4_to_lrgba, 4, 4, false, 2) - OPENCV_GPU_IMPLEMENT_Luv2RGB_TRAITS(luv_to_lbgr, 3, 3, false, 0) - OPENCV_GPU_IMPLEMENT_Luv2RGB_TRAITS(luv4_to_lbgr, 4, 3, false, 0) - OPENCV_GPU_IMPLEMENT_Luv2RGB_TRAITS(luv_to_lbgra, 3, 4, false, 0) - OPENCV_GPU_IMPLEMENT_Luv2RGB_TRAITS(luv4_to_lbgra, 4, 4, false, 0) + OPENCV_CUDA_IMPLEMENT_Luv2RGB_TRAITS(luv_to_lrgb, 3, 3, false, 2) + OPENCV_CUDA_IMPLEMENT_Luv2RGB_TRAITS(luv4_to_lrgb, 4, 3, false, 2) + OPENCV_CUDA_IMPLEMENT_Luv2RGB_TRAITS(luv_to_lrgba, 3, 4, false, 2) + OPENCV_CUDA_IMPLEMENT_Luv2RGB_TRAITS(luv4_to_lrgba, 4, 4, false, 2) + OPENCV_CUDA_IMPLEMENT_Luv2RGB_TRAITS(luv_to_lbgr, 3, 3, false, 0) + OPENCV_CUDA_IMPLEMENT_Luv2RGB_TRAITS(luv4_to_lbgr, 4, 3, false, 0) + OPENCV_CUDA_IMPLEMENT_Luv2RGB_TRAITS(luv_to_lbgra, 3, 4, false, 0) + OPENCV_CUDA_IMPLEMENT_Luv2RGB_TRAITS(luv4_to_lbgra, 4, 4, false, 0) - #undef OPENCV_GPU_IMPLEMENT_Luv2RGB_TRAITS + #undef OPENCV_CUDA_IMPLEMENT_Luv2RGB_TRAITS }}} // namespace cv { namespace cuda { namespace cudev -#endif // __OPENCV_GPU_BORDER_INTERPOLATE_HPP__ +#endif // __OPENCV_CUDA_BORDER_INTERPOLATE_HPP__ diff --git a/modules/core/include/opencv2/core/cuda/common.hpp b/modules/core/include/opencv2/core/cuda/common.hpp index fa53392ae..f91684ec3 100644 --- a/modules/core/include/opencv2/core/cuda/common.hpp +++ b/modules/core/include/opencv2/core/cuda/common.hpp @@ -40,8 +40,8 @@ // //M*/ -#ifndef __OPENCV_GPU_COMMON_HPP__ -#define __OPENCV_GPU_COMMON_HPP__ +#ifndef __OPENCV_CUDA_COMMON_HPP__ +#define __OPENCV_CUDA_COMMON_HPP__ #include #include "opencv2/core/cuda_types.hpp" @@ -104,4 +104,4 @@ namespace cv { namespace cuda -#endif // __OPENCV_GPU_COMMON_HPP__ +#endif // __OPENCV_CUDA_COMMON_HPP__ diff --git a/modules/core/include/opencv2/core/cuda/datamov_utils.hpp b/modules/core/include/opencv2/core/cuda/datamov_utils.hpp index 6100e0aa6..aea88a35c 100644 --- a/modules/core/include/opencv2/core/cuda/datamov_utils.hpp +++ b/modules/core/include/opencv2/core/cuda/datamov_utils.hpp @@ -40,8 +40,8 @@ // //M*/ -#ifndef __OPENCV_GPU_DATAMOV_UTILS_HPP__ -#define __OPENCV_GPU_DATAMOV_UTILS_HPP__ +#ifndef __OPENCV_CUDA_DATAMOV_UTILS_HPP__ +#define __OPENCV_CUDA_DATAMOV_UTILS_HPP__ #include "common.hpp" @@ -59,47 +59,47 @@ namespace cv { namespace cuda { namespace device #if defined(_WIN64) || defined(__LP64__) // 64-bit register modifier for inlined asm - #define OPENCV_GPU_ASM_PTR "l" + #define OPENCV_CUDA_ASM_PTR "l" #else // 32-bit register modifier for inlined asm - #define OPENCV_GPU_ASM_PTR "r" + #define OPENCV_CUDA_ASM_PTR "r" #endif template struct ForceGlob; - #define OPENCV_GPU_DEFINE_FORCE_GLOB(base_type, ptx_type, reg_mod) \ + #define OPENCV_CUDA_DEFINE_FORCE_GLOB(base_type, ptx_type, reg_mod) \ template <> struct ForceGlob \ { \ __device__ __forceinline__ static void Load(const base_type* ptr, int offset, base_type& val) \ { \ - asm("ld.global."#ptx_type" %0, [%1];" : "="#reg_mod(val) : OPENCV_GPU_ASM_PTR(ptr + offset)); \ + asm("ld.global."#ptx_type" %0, [%1];" : "="#reg_mod(val) : OPENCV_CUDA_ASM_PTR(ptr + offset)); \ } \ }; - #define OPENCV_GPU_DEFINE_FORCE_GLOB_B(base_type, ptx_type) \ + #define OPENCV_CUDA_DEFINE_FORCE_GLOB_B(base_type, ptx_type) \ template <> struct ForceGlob \ { \ __device__ __forceinline__ static void Load(const base_type* ptr, int offset, base_type& val) \ { \ - asm("ld.global."#ptx_type" %0, [%1];" : "=r"(*reinterpret_cast(&val)) : OPENCV_GPU_ASM_PTR(ptr + offset)); \ + asm("ld.global."#ptx_type" %0, [%1];" : "=r"(*reinterpret_cast(&val)) : OPENCV_CUDA_ASM_PTR(ptr + offset)); \ } \ }; - OPENCV_GPU_DEFINE_FORCE_GLOB_B(uchar, u8) - OPENCV_GPU_DEFINE_FORCE_GLOB_B(schar, s8) - OPENCV_GPU_DEFINE_FORCE_GLOB_B(char, b8) - OPENCV_GPU_DEFINE_FORCE_GLOB (ushort, u16, h) - OPENCV_GPU_DEFINE_FORCE_GLOB (short, s16, h) - OPENCV_GPU_DEFINE_FORCE_GLOB (uint, u32, r) - OPENCV_GPU_DEFINE_FORCE_GLOB (int, s32, r) - OPENCV_GPU_DEFINE_FORCE_GLOB (float, f32, f) - OPENCV_GPU_DEFINE_FORCE_GLOB (double, f64, d) + OPENCV_CUDA_DEFINE_FORCE_GLOB_B(uchar, u8) + OPENCV_CUDA_DEFINE_FORCE_GLOB_B(schar, s8) + OPENCV_CUDA_DEFINE_FORCE_GLOB_B(char, b8) + OPENCV_CUDA_DEFINE_FORCE_GLOB (ushort, u16, h) + OPENCV_CUDA_DEFINE_FORCE_GLOB (short, s16, h) + OPENCV_CUDA_DEFINE_FORCE_GLOB (uint, u32, r) + OPENCV_CUDA_DEFINE_FORCE_GLOB (int, s32, r) + OPENCV_CUDA_DEFINE_FORCE_GLOB (float, f32, f) + OPENCV_CUDA_DEFINE_FORCE_GLOB (double, f64, d) - #undef OPENCV_GPU_DEFINE_FORCE_GLOB - #undef OPENCV_GPU_DEFINE_FORCE_GLOB_B - #undef OPENCV_GPU_ASM_PTR + #undef OPENCV_CUDA_DEFINE_FORCE_GLOB + #undef OPENCV_CUDA_DEFINE_FORCE_GLOB_B + #undef OPENCV_CUDA_ASM_PTR #endif // __CUDA_ARCH__ >= 200 }}} // namespace cv { namespace cuda { namespace cudev -#endif // __OPENCV_GPU_DATAMOV_UTILS_HPP__ +#endif // __OPENCV_CUDA_DATAMOV_UTILS_HPP__ diff --git a/modules/core/include/opencv2/core/cuda/detail/color_detail.hpp b/modules/core/include/opencv2/core/cuda/detail/color_detail.hpp index 9b5582e59..6effcbb79 100644 --- a/modules/core/include/opencv2/core/cuda/detail/color_detail.hpp +++ b/modules/core/include/opencv2/core/cuda/detail/color_detail.hpp @@ -40,8 +40,8 @@ // //M*/ -#ifndef __OPENCV_GPU_COLOR_DETAIL_HPP__ -#define __OPENCV_GPU_COLOR_DETAIL_HPP__ +#ifndef __OPENCV_CUDA_COLOR_DETAIL_HPP__ +#define __OPENCV_CUDA_COLOR_DETAIL_HPP__ #include "../common.hpp" #include "../vec_traits.hpp" @@ -143,7 +143,7 @@ namespace cv { namespace cuda { namespace device }; } -#define OPENCV_GPU_IMPLEMENT_RGB2RGB_TRAITS(name, scn, dcn, bidx) \ +#define OPENCV_CUDA_IMPLEMENT_RGB2RGB_TRAITS(name, scn, dcn, bidx) \ template struct name ## _traits \ { \ typedef ::cv::cuda::device::color_detail::RGB2RGB functor_type; \ @@ -216,7 +216,7 @@ namespace cv { namespace cuda { namespace device }; } -#define OPENCV_GPU_IMPLEMENT_RGB2RGB5x5_TRAITS(name, scn, bidx, green_bits) \ +#define OPENCV_CUDA_IMPLEMENT_RGB2RGB5x5_TRAITS(name, scn, bidx, green_bits) \ struct name ## _traits \ { \ typedef ::cv::cuda::device::color_detail::RGB2RGB5x5 functor_type; \ @@ -297,7 +297,7 @@ namespace cv { namespace cuda { namespace device }; } -#define OPENCV_GPU_IMPLEMENT_RGB5x52RGB_TRAITS(name, dcn, bidx, green_bits) \ +#define OPENCV_CUDA_IMPLEMENT_RGB5x52RGB_TRAITS(name, dcn, bidx, green_bits) \ struct name ## _traits \ { \ typedef ::cv::cuda::device::color_detail::RGB5x52RGB functor_type; \ @@ -343,7 +343,7 @@ namespace cv { namespace cuda { namespace device }; } -#define OPENCV_GPU_IMPLEMENT_GRAY2RGB_TRAITS(name, dcn) \ +#define OPENCV_CUDA_IMPLEMENT_GRAY2RGB_TRAITS(name, dcn) \ template struct name ## _traits \ { \ typedef ::cv::cuda::device::color_detail::Gray2RGB functor_type; \ @@ -385,7 +385,7 @@ namespace cv { namespace cuda { namespace device }; } -#define OPENCV_GPU_IMPLEMENT_GRAY2RGB5x5_TRAITS(name, green_bits) \ +#define OPENCV_CUDA_IMPLEMENT_GRAY2RGB5x5_TRAITS(name, green_bits) \ struct name ## _traits \ { \ typedef ::cv::cuda::device::color_detail::Gray2RGB5x5 functor_type; \ @@ -427,7 +427,7 @@ namespace cv { namespace cuda { namespace device }; } -#define OPENCV_GPU_IMPLEMENT_RGB5x52GRAY_TRAITS(name, green_bits) \ +#define OPENCV_CUDA_IMPLEMENT_RGB5x52GRAY_TRAITS(name, green_bits) \ struct name ## _traits \ { \ typedef ::cv::cuda::device::color_detail::RGB5x52Gray functor_type; \ @@ -478,7 +478,7 @@ namespace cv { namespace cuda { namespace device }; } -#define OPENCV_GPU_IMPLEMENT_RGB2GRAY_TRAITS(name, scn, bidx) \ +#define OPENCV_CUDA_IMPLEMENT_RGB2GRAY_TRAITS(name, scn, bidx) \ template struct name ## _traits \ { \ typedef ::cv::cuda::device::color_detail::RGB2Gray functor_type; \ @@ -529,7 +529,7 @@ namespace cv { namespace cuda { namespace device }; } -#define OPENCV_GPU_IMPLEMENT_RGB2YUV_TRAITS(name, scn, dcn, bidx) \ +#define OPENCV_CUDA_IMPLEMENT_RGB2YUV_TRAITS(name, scn, dcn, bidx) \ template struct name ## _traits \ { \ typedef ::cv::cuda::device::color_detail::RGB2YUV functor_type; \ @@ -617,7 +617,7 @@ namespace cv { namespace cuda { namespace device }; } -#define OPENCV_GPU_IMPLEMENT_YUV2RGB_TRAITS(name, scn, dcn, bidx) \ +#define OPENCV_CUDA_IMPLEMENT_YUV2RGB_TRAITS(name, scn, dcn, bidx) \ template struct name ## _traits \ { \ typedef ::cv::cuda::device::color_detail::YUV2RGB functor_type; \ @@ -696,7 +696,7 @@ namespace cv { namespace cuda { namespace device }; } -#define OPENCV_GPU_IMPLEMENT_RGB2YCrCb_TRAITS(name, scn, dcn, bidx) \ +#define OPENCV_CUDA_IMPLEMENT_RGB2YCrCb_TRAITS(name, scn, dcn, bidx) \ template struct name ## _traits \ { \ typedef ::cv::cuda::device::color_detail::RGB2YCrCb functor_type; \ @@ -775,7 +775,7 @@ namespace cv { namespace cuda { namespace device }; } -#define OPENCV_GPU_IMPLEMENT_YCrCb2RGB_TRAITS(name, scn, dcn, bidx) \ +#define OPENCV_CUDA_IMPLEMENT_YCrCb2RGB_TRAITS(name, scn, dcn, bidx) \ template struct name ## _traits \ { \ typedef ::cv::cuda::device::color_detail::YCrCb2RGB functor_type; \ @@ -851,7 +851,7 @@ namespace cv { namespace cuda { namespace device }; } -#define OPENCV_GPU_IMPLEMENT_RGB2XYZ_TRAITS(name, scn, dcn, bidx) \ +#define OPENCV_CUDA_IMPLEMENT_RGB2XYZ_TRAITS(name, scn, dcn, bidx) \ template struct name ## _traits \ { \ typedef ::cv::cuda::device::color_detail::RGB2XYZ functor_type; \ @@ -926,7 +926,7 @@ namespace cv { namespace cuda { namespace device }; } -#define OPENCV_GPU_IMPLEMENT_XYZ2RGB_TRAITS(name, scn, dcn, bidx) \ +#define OPENCV_CUDA_IMPLEMENT_XYZ2RGB_TRAITS(name, scn, dcn, bidx) \ template struct name ## _traits \ { \ typedef ::cv::cuda::device::color_detail::XYZ2RGB functor_type; \ @@ -1064,7 +1064,7 @@ namespace cv { namespace cuda { namespace device }; } -#define OPENCV_GPU_IMPLEMENT_RGB2HSV_TRAITS(name, scn, dcn, bidx) \ +#define OPENCV_CUDA_IMPLEMENT_RGB2HSV_TRAITS(name, scn, dcn, bidx) \ template struct name ## _traits \ { \ typedef ::cv::cuda::device::color_detail::RGB2HSV functor_type; \ @@ -1204,7 +1204,7 @@ namespace cv { namespace cuda { namespace device }; } -#define OPENCV_GPU_IMPLEMENT_HSV2RGB_TRAITS(name, scn, dcn, bidx) \ +#define OPENCV_CUDA_IMPLEMENT_HSV2RGB_TRAITS(name, scn, dcn, bidx) \ template struct name ## _traits \ { \ typedef ::cv::cuda::device::color_detail::HSV2RGB functor_type; \ @@ -1337,7 +1337,7 @@ namespace cv { namespace cuda { namespace device }; } -#define OPENCV_GPU_IMPLEMENT_RGB2HLS_TRAITS(name, scn, dcn, bidx) \ +#define OPENCV_CUDA_IMPLEMENT_RGB2HLS_TRAITS(name, scn, dcn, bidx) \ template struct name ## _traits \ { \ typedef ::cv::cuda::device::color_detail::RGB2HLS functor_type; \ @@ -1477,7 +1477,7 @@ namespace cv { namespace cuda { namespace device }; } -#define OPENCV_GPU_IMPLEMENT_HLS2RGB_TRAITS(name, scn, dcn, bidx) \ +#define OPENCV_CUDA_IMPLEMENT_HLS2RGB_TRAITS(name, scn, dcn, bidx) \ template struct name ## _traits \ { \ typedef ::cv::cuda::device::color_detail::HLS2RGB functor_type; \ @@ -1646,7 +1646,7 @@ namespace cv { namespace cuda { namespace device }; } -#define OPENCV_GPU_IMPLEMENT_RGB2Lab_TRAITS(name, scn, dcn, srgb, blueIdx) \ +#define OPENCV_CUDA_IMPLEMENT_RGB2Lab_TRAITS(name, scn, dcn, srgb, blueIdx) \ template struct name ## _traits \ { \ typedef ::cv::cuda::device::color_detail::RGB2Lab functor_type; \ @@ -1759,7 +1759,7 @@ namespace cv { namespace cuda { namespace device }; } -#define OPENCV_GPU_IMPLEMENT_Lab2RGB_TRAITS(name, scn, dcn, srgb, blueIdx) \ +#define OPENCV_CUDA_IMPLEMENT_Lab2RGB_TRAITS(name, scn, dcn, srgb, blueIdx) \ template struct name ## _traits \ { \ typedef ::cv::cuda::device::color_detail::Lab2RGB functor_type; \ @@ -1858,7 +1858,7 @@ namespace cv { namespace cuda { namespace device }; } -#define OPENCV_GPU_IMPLEMENT_RGB2Luv_TRAITS(name, scn, dcn, srgb, blueIdx) \ +#define OPENCV_CUDA_IMPLEMENT_RGB2Luv_TRAITS(name, scn, dcn, srgb, blueIdx) \ template struct name ## _traits \ { \ typedef ::cv::cuda::device::color_detail::RGB2Luv functor_type; \ @@ -1959,7 +1959,7 @@ namespace cv { namespace cuda { namespace device }; } -#define OPENCV_GPU_IMPLEMENT_Luv2RGB_TRAITS(name, scn, dcn, srgb, blueIdx) \ +#define OPENCV_CUDA_IMPLEMENT_Luv2RGB_TRAITS(name, scn, dcn, srgb, blueIdx) \ template struct name ## _traits \ { \ typedef ::cv::cuda::device::color_detail::Luv2RGB functor_type; \ @@ -1973,4 +1973,4 @@ namespace cv { namespace cuda { namespace device }}} // namespace cv { namespace cuda { namespace cudev -#endif // __OPENCV_GPU_COLOR_DETAIL_HPP__ +#endif // __OPENCV_CUDA_COLOR_DETAIL_HPP__ diff --git a/modules/core/include/opencv2/core/cuda/detail/reduce.hpp b/modules/core/include/opencv2/core/cuda/detail/reduce.hpp index 7891e911c..c1ba68c82 100644 --- a/modules/core/include/opencv2/core/cuda/detail/reduce.hpp +++ b/modules/core/include/opencv2/core/cuda/detail/reduce.hpp @@ -40,8 +40,8 @@ // //M*/ -#ifndef __OPENCV_GPU_REDUCE_DETAIL_HPP__ -#define __OPENCV_GPU_REDUCE_DETAIL_HPP__ +#ifndef __OPENCV_CUDA_REDUCE_DETAIL_HPP__ +#define __OPENCV_CUDA_REDUCE_DETAIL_HPP__ #include #include "../warp.hpp" @@ -358,4 +358,4 @@ namespace cv { namespace cuda { namespace device } }}} -#endif // __OPENCV_GPU_REDUCE_DETAIL_HPP__ +#endif // __OPENCV_CUDA_REDUCE_DETAIL_HPP__ diff --git a/modules/core/include/opencv2/core/cuda/detail/reduce_key_val.hpp b/modules/core/include/opencv2/core/cuda/detail/reduce_key_val.hpp index cb375f414..ed179ad78 100644 --- a/modules/core/include/opencv2/core/cuda/detail/reduce_key_val.hpp +++ b/modules/core/include/opencv2/core/cuda/detail/reduce_key_val.hpp @@ -40,8 +40,8 @@ // //M*/ -#ifndef __OPENCV_GPU_PRED_VAL_REDUCE_DETAIL_HPP__ -#define __OPENCV_GPU_PRED_VAL_REDUCE_DETAIL_HPP__ +#ifndef __OPENCV_CUDA_PRED_VAL_REDUCE_DETAIL_HPP__ +#define __OPENCV_CUDA_PRED_VAL_REDUCE_DETAIL_HPP__ #include #include "../warp.hpp" @@ -495,4 +495,4 @@ namespace cv { namespace cuda { namespace device } }}} -#endif // __OPENCV_GPU_PRED_VAL_REDUCE_DETAIL_HPP__ +#endif // __OPENCV_CUDA_PRED_VAL_REDUCE_DETAIL_HPP__ diff --git a/modules/core/include/opencv2/core/cuda/detail/transform_detail.hpp b/modules/core/include/opencv2/core/cuda/detail/transform_detail.hpp index 706b3c734..a241e0bb3 100644 --- a/modules/core/include/opencv2/core/cuda/detail/transform_detail.hpp +++ b/modules/core/include/opencv2/core/cuda/detail/transform_detail.hpp @@ -40,8 +40,8 @@ // //M*/ -#ifndef __OPENCV_GPU_TRANSFORM_DETAIL_HPP__ -#define __OPENCV_GPU_TRANSFORM_DETAIL_HPP__ +#ifndef __OPENCV_CUDA_TRANSFORM_DETAIL_HPP__ +#define __OPENCV_CUDA_TRANSFORM_DETAIL_HPP__ #include "../common.hpp" #include "../vec_traits.hpp" @@ -392,4 +392,4 @@ namespace cv { namespace cuda { namespace device } // namespace transform_detail }}} // namespace cv { namespace cuda { namespace cudev -#endif // __OPENCV_GPU_TRANSFORM_DETAIL_HPP__ +#endif // __OPENCV_CUDA_TRANSFORM_DETAIL_HPP__ diff --git a/modules/core/include/opencv2/core/cuda/detail/type_traits_detail.hpp b/modules/core/include/opencv2/core/cuda/detail/type_traits_detail.hpp index aa7a886b5..8324a31e0 100644 --- a/modules/core/include/opencv2/core/cuda/detail/type_traits_detail.hpp +++ b/modules/core/include/opencv2/core/cuda/detail/type_traits_detail.hpp @@ -40,8 +40,8 @@ // //M*/ -#ifndef __OPENCV_GPU_TYPE_TRAITS_DETAIL_HPP__ -#define __OPENCV_GPU_TYPE_TRAITS_DETAIL_HPP__ +#ifndef __OPENCV_CUDA_TYPE_TRAITS_DETAIL_HPP__ +#define __OPENCV_CUDA_TYPE_TRAITS_DETAIL_HPP__ #include "../common.hpp" #include "../vec_traits.hpp" @@ -184,4 +184,4 @@ namespace cv { namespace cuda { namespace device } // namespace type_traits_detail }}} // namespace cv { namespace cuda { namespace cudev -#endif // __OPENCV_GPU_TYPE_TRAITS_DETAIL_HPP__ +#endif // __OPENCV_CUDA_TYPE_TRAITS_DETAIL_HPP__ diff --git a/modules/core/include/opencv2/core/cuda/detail/vec_distance_detail.hpp b/modules/core/include/opencv2/core/cuda/detail/vec_distance_detail.hpp index e4e805802..a62c51a57 100644 --- a/modules/core/include/opencv2/core/cuda/detail/vec_distance_detail.hpp +++ b/modules/core/include/opencv2/core/cuda/detail/vec_distance_detail.hpp @@ -40,8 +40,8 @@ // //M*/ -#ifndef __OPENCV_GPU_VEC_DISTANCE_DETAIL_HPP__ -#define __OPENCV_GPU_VEC_DISTANCE_DETAIL_HPP__ +#ifndef __OPENCV_CUDA_VEC_DISTANCE_DETAIL_HPP__ +#define __OPENCV_CUDA_VEC_DISTANCE_DETAIL_HPP__ #include "../datamov_utils.hpp" @@ -114,4 +114,4 @@ namespace cv { namespace cuda { namespace device } // namespace vec_distance_detail }}} // namespace cv { namespace cuda { namespace cudev -#endif // __OPENCV_GPU_VEC_DISTANCE_DETAIL_HPP__ +#endif // __OPENCV_CUDA_VEC_DISTANCE_DETAIL_HPP__ diff --git a/modules/core/include/opencv2/core/cuda/dynamic_smem.hpp b/modules/core/include/opencv2/core/cuda/dynamic_smem.hpp index 5d1d87ee3..269e18a8f 100644 --- a/modules/core/include/opencv2/core/cuda/dynamic_smem.hpp +++ b/modules/core/include/opencv2/core/cuda/dynamic_smem.hpp @@ -40,8 +40,8 @@ // //M*/ -#ifndef __OPENCV_GPU_DYNAMIC_SMEM_HPP__ -#define __OPENCV_GPU_DYNAMIC_SMEM_HPP__ +#ifndef __OPENCV_CUDA_DYNAMIC_SMEM_HPP__ +#define __OPENCV_CUDA_DYNAMIC_SMEM_HPP__ namespace cv { namespace cuda { namespace device { @@ -77,4 +77,4 @@ namespace cv { namespace cuda { namespace device }; }}} -#endif // __OPENCV_GPU_DYNAMIC_SMEM_HPP__ +#endif // __OPENCV_CUDA_DYNAMIC_SMEM_HPP__ diff --git a/modules/core/include/opencv2/core/cuda/emulation.hpp b/modules/core/include/opencv2/core/cuda/emulation.hpp index 993eb0b19..16fe2986b 100644 --- a/modules/core/include/opencv2/core/cuda/emulation.hpp +++ b/modules/core/include/opencv2/core/cuda/emulation.hpp @@ -40,8 +40,8 @@ // //M*/ -#ifndef OPENCV_GPU_EMULATION_HPP_ -#define OPENCV_GPU_EMULATION_HPP_ +#ifndef OPENCV_CUDA_EMULATION_HPP_ +#define OPENCV_CUDA_EMULATION_HPP_ #include "common.hpp" #include "warp_reduce.hpp" @@ -258,4 +258,4 @@ namespace cv { namespace cuda { namespace device }; //struct Emulation }}} // namespace cv { namespace cuda { namespace cudev -#endif /* OPENCV_GPU_EMULATION_HPP_ */ +#endif /* OPENCV_CUDA_EMULATION_HPP_ */ diff --git a/modules/core/include/opencv2/core/cuda/filters.hpp b/modules/core/include/opencv2/core/cuda/filters.hpp index 0f9dad16d..f3cbf6958 100644 --- a/modules/core/include/opencv2/core/cuda/filters.hpp +++ b/modules/core/include/opencv2/core/cuda/filters.hpp @@ -40,8 +40,8 @@ // //M*/ -#ifndef __OPENCV_GPU_FILTERS_HPP__ -#define __OPENCV_GPU_FILTERS_HPP__ +#ifndef __OPENCV_CUDA_FILTERS_HPP__ +#define __OPENCV_CUDA_FILTERS_HPP__ #include "saturate_cast.hpp" #include "vec_traits.hpp" @@ -275,4 +275,4 @@ namespace cv { namespace cuda { namespace device }; }}} // namespace cv { namespace cuda { namespace cudev -#endif // __OPENCV_GPU_FILTERS_HPP__ +#endif // __OPENCV_CUDA_FILTERS_HPP__ diff --git a/modules/core/include/opencv2/core/cuda/funcattrib.hpp b/modules/core/include/opencv2/core/cuda/funcattrib.hpp index 69f8e6db4..7085cba0f 100644 --- a/modules/core/include/opencv2/core/cuda/funcattrib.hpp +++ b/modules/core/include/opencv2/core/cuda/funcattrib.hpp @@ -40,8 +40,8 @@ // //M*/ -#ifndef __OPENCV_GPU_DEVICE_FUNCATTRIB_HPP_ -#define __OPENCV_GPU_DEVICE_FUNCATTRIB_HPP_ +#ifndef __OPENCV_CUDA_DEVICE_FUNCATTRIB_HPP_ +#define __OPENCV_CUDA_DEVICE_FUNCATTRIB_HPP_ #include @@ -68,4 +68,4 @@ namespace cv { namespace cuda { namespace device } }}} // namespace cv { namespace cuda { namespace cudev -#endif /* __OPENCV_GPU_DEVICE_FUNCATTRIB_HPP_ */ +#endif /* __OPENCV_CUDA_DEVICE_FUNCATTRIB_HPP_ */ diff --git a/modules/core/include/opencv2/core/cuda/functional.hpp b/modules/core/include/opencv2/core/cuda/functional.hpp index c06b48942..bebb8bf07 100644 --- a/modules/core/include/opencv2/core/cuda/functional.hpp +++ b/modules/core/include/opencv2/core/cuda/functional.hpp @@ -40,8 +40,8 @@ // //M*/ -#ifndef __OPENCV_GPU_FUNCTIONAL_HPP__ -#define __OPENCV_GPU_FUNCTIONAL_HPP__ +#ifndef __OPENCV_CUDA_FUNCTIONAL_HPP__ +#define __OPENCV_CUDA_FUNCTIONAL_HPP__ #include #include "saturate_cast.hpp" @@ -298,7 +298,7 @@ namespace cv { namespace cuda { namespace device // Min/Max Operations -#define OPENCV_GPU_IMPLEMENT_MINMAX(name, type, op) \ +#define OPENCV_CUDA_IMPLEMENT_MINMAX(name, type, op) \ template <> struct name : binary_function \ { \ __device__ __forceinline__ type operator()(type lhs, type rhs) const {return op(lhs, rhs);} \ @@ -316,15 +316,15 @@ namespace cv { namespace cuda { namespace device __host__ __device__ __forceinline__ maximum(const maximum&) {} }; - OPENCV_GPU_IMPLEMENT_MINMAX(maximum, uchar, ::max) - OPENCV_GPU_IMPLEMENT_MINMAX(maximum, schar, ::max) - OPENCV_GPU_IMPLEMENT_MINMAX(maximum, char, ::max) - OPENCV_GPU_IMPLEMENT_MINMAX(maximum, ushort, ::max) - OPENCV_GPU_IMPLEMENT_MINMAX(maximum, short, ::max) - OPENCV_GPU_IMPLEMENT_MINMAX(maximum, int, ::max) - OPENCV_GPU_IMPLEMENT_MINMAX(maximum, uint, ::max) - OPENCV_GPU_IMPLEMENT_MINMAX(maximum, float, ::fmax) - OPENCV_GPU_IMPLEMENT_MINMAX(maximum, double, ::fmax) + OPENCV_CUDA_IMPLEMENT_MINMAX(maximum, uchar, ::max) + OPENCV_CUDA_IMPLEMENT_MINMAX(maximum, schar, ::max) + OPENCV_CUDA_IMPLEMENT_MINMAX(maximum, char, ::max) + OPENCV_CUDA_IMPLEMENT_MINMAX(maximum, ushort, ::max) + OPENCV_CUDA_IMPLEMENT_MINMAX(maximum, short, ::max) + OPENCV_CUDA_IMPLEMENT_MINMAX(maximum, int, ::max) + OPENCV_CUDA_IMPLEMENT_MINMAX(maximum, uint, ::max) + OPENCV_CUDA_IMPLEMENT_MINMAX(maximum, float, ::fmax) + OPENCV_CUDA_IMPLEMENT_MINMAX(maximum, double, ::fmax) template struct minimum : binary_function { @@ -336,17 +336,17 @@ namespace cv { namespace cuda { namespace device __host__ __device__ __forceinline__ minimum(const minimum&) {} }; - OPENCV_GPU_IMPLEMENT_MINMAX(minimum, uchar, ::min) - OPENCV_GPU_IMPLEMENT_MINMAX(minimum, schar, ::min) - OPENCV_GPU_IMPLEMENT_MINMAX(minimum, char, ::min) - OPENCV_GPU_IMPLEMENT_MINMAX(minimum, ushort, ::min) - OPENCV_GPU_IMPLEMENT_MINMAX(minimum, short, ::min) - OPENCV_GPU_IMPLEMENT_MINMAX(minimum, int, ::min) - OPENCV_GPU_IMPLEMENT_MINMAX(minimum, uint, ::min) - OPENCV_GPU_IMPLEMENT_MINMAX(minimum, float, ::fmin) - OPENCV_GPU_IMPLEMENT_MINMAX(minimum, double, ::fmin) + OPENCV_CUDA_IMPLEMENT_MINMAX(minimum, uchar, ::min) + OPENCV_CUDA_IMPLEMENT_MINMAX(minimum, schar, ::min) + OPENCV_CUDA_IMPLEMENT_MINMAX(minimum, char, ::min) + OPENCV_CUDA_IMPLEMENT_MINMAX(minimum, ushort, ::min) + OPENCV_CUDA_IMPLEMENT_MINMAX(minimum, short, ::min) + OPENCV_CUDA_IMPLEMENT_MINMAX(minimum, int, ::min) + OPENCV_CUDA_IMPLEMENT_MINMAX(minimum, uint, ::min) + OPENCV_CUDA_IMPLEMENT_MINMAX(minimum, float, ::fmin) + OPENCV_CUDA_IMPLEMENT_MINMAX(minimum, double, ::fmin) -#undef OPENCV_GPU_IMPLEMENT_MINMAX +#undef OPENCV_CUDA_IMPLEMENT_MINMAX // Math functions @@ -451,7 +451,7 @@ namespace cv { namespace cuda { namespace device __host__ __device__ __forceinline__ abs_func(const abs_func&) {} }; -#define OPENCV_GPU_IMPLEMENT_UN_FUNCTOR(name, func) \ +#define OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR(name, func) \ template struct name ## _func : unary_function \ { \ __device__ __forceinline__ float operator ()(typename TypeTraits::ParameterType v) const \ @@ -471,7 +471,7 @@ namespace cv { namespace cuda { namespace device __host__ __device__ __forceinline__ name ## _func(const name ## _func&) {} \ }; -#define OPENCV_GPU_IMPLEMENT_BIN_FUNCTOR(name, func) \ +#define OPENCV_CUDA_IMPLEMENT_BIN_FUNCTOR(name, func) \ template struct name ## _func : binary_function \ { \ __device__ __forceinline__ float operator ()(typename TypeTraits::ParameterType v1, typename TypeTraits::ParameterType v2) const \ @@ -491,33 +491,33 @@ namespace cv { namespace cuda { namespace device __host__ __device__ __forceinline__ name ## _func(const name ## _func&) {} \ }; - OPENCV_GPU_IMPLEMENT_UN_FUNCTOR(sqrt, ::sqrt) - OPENCV_GPU_IMPLEMENT_UN_FUNCTOR(exp, ::exp) - OPENCV_GPU_IMPLEMENT_UN_FUNCTOR(exp2, ::exp2) - OPENCV_GPU_IMPLEMENT_UN_FUNCTOR(exp10, ::exp10) - OPENCV_GPU_IMPLEMENT_UN_FUNCTOR(log, ::log) - OPENCV_GPU_IMPLEMENT_UN_FUNCTOR(log2, ::log2) - OPENCV_GPU_IMPLEMENT_UN_FUNCTOR(log10, ::log10) - OPENCV_GPU_IMPLEMENT_UN_FUNCTOR(sin, ::sin) - OPENCV_GPU_IMPLEMENT_UN_FUNCTOR(cos, ::cos) - OPENCV_GPU_IMPLEMENT_UN_FUNCTOR(tan, ::tan) - OPENCV_GPU_IMPLEMENT_UN_FUNCTOR(asin, ::asin) - OPENCV_GPU_IMPLEMENT_UN_FUNCTOR(acos, ::acos) - OPENCV_GPU_IMPLEMENT_UN_FUNCTOR(atan, ::atan) - OPENCV_GPU_IMPLEMENT_UN_FUNCTOR(sinh, ::sinh) - OPENCV_GPU_IMPLEMENT_UN_FUNCTOR(cosh, ::cosh) - OPENCV_GPU_IMPLEMENT_UN_FUNCTOR(tanh, ::tanh) - OPENCV_GPU_IMPLEMENT_UN_FUNCTOR(asinh, ::asinh) - OPENCV_GPU_IMPLEMENT_UN_FUNCTOR(acosh, ::acosh) - OPENCV_GPU_IMPLEMENT_UN_FUNCTOR(atanh, ::atanh) + OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR(sqrt, ::sqrt) + OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR(exp, ::exp) + OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR(exp2, ::exp2) + OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR(exp10, ::exp10) + OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR(log, ::log) + OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR(log2, ::log2) + OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR(log10, ::log10) + OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR(sin, ::sin) + OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR(cos, ::cos) + OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR(tan, ::tan) + OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR(asin, ::asin) + OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR(acos, ::acos) + OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR(atan, ::atan) + OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR(sinh, ::sinh) + OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR(cosh, ::cosh) + OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR(tanh, ::tanh) + OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR(asinh, ::asinh) + OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR(acosh, ::acosh) + OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR(atanh, ::atanh) - OPENCV_GPU_IMPLEMENT_BIN_FUNCTOR(hypot, ::hypot) - OPENCV_GPU_IMPLEMENT_BIN_FUNCTOR(atan2, ::atan2) - OPENCV_GPU_IMPLEMENT_BIN_FUNCTOR(pow, ::pow) + OPENCV_CUDA_IMPLEMENT_BIN_FUNCTOR(hypot, ::hypot) + OPENCV_CUDA_IMPLEMENT_BIN_FUNCTOR(atan2, ::atan2) + OPENCV_CUDA_IMPLEMENT_BIN_FUNCTOR(pow, ::pow) - #undef OPENCV_GPU_IMPLEMENT_UN_FUNCTOR - #undef OPENCV_GPU_IMPLEMENT_UN_FUNCTOR_NO_DOUBLE - #undef OPENCV_GPU_IMPLEMENT_BIN_FUNCTOR + #undef OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR + #undef OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR_NO_DOUBLE + #undef OPENCV_CUDA_IMPLEMENT_BIN_FUNCTOR template struct hypot_sqr_func : binary_function { @@ -782,8 +782,8 @@ namespace cv { namespace cuda { namespace device template struct TransformFunctorTraits : DefaultTransformFunctorTraits {}; -#define OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(type) \ +#define OPENCV_CUDA_TRANSFORM_FUNCTOR_TRAITS(type) \ template <> struct TransformFunctorTraits< type > : DefaultTransformFunctorTraits< type > }}} // namespace cv { namespace cuda { namespace cudev -#endif // __OPENCV_GPU_FUNCTIONAL_HPP__ +#endif // __OPENCV_CUDA_FUNCTIONAL_HPP__ diff --git a/modules/core/include/opencv2/core/cuda/limits.hpp b/modules/core/include/opencv2/core/cuda/limits.hpp index a70ed1ff4..abfdca367 100644 --- a/modules/core/include/opencv2/core/cuda/limits.hpp +++ b/modules/core/include/opencv2/core/cuda/limits.hpp @@ -40,8 +40,8 @@ // //M*/ -#ifndef __OPENCV_GPU_LIMITS_GPU_HPP__ -#define __OPENCV_GPU_LIMITS_GPU_HPP__ +#ifndef __OPENCV_CUDA_LIMITS_HPP__ +#define __OPENCV_CUDA_LIMITS_HPP__ #include #include @@ -119,4 +119,4 @@ template <> struct numeric_limits }}} // namespace cv { namespace cuda { namespace cudev { -#endif // __OPENCV_GPU_LIMITS_GPU_HPP__ +#endif // __OPENCV_CUDA_LIMITS_HPP__ diff --git a/modules/core/include/opencv2/core/cuda/reduce.hpp b/modules/core/include/opencv2/core/cuda/reduce.hpp index ca2373aff..8112203e6 100644 --- a/modules/core/include/opencv2/core/cuda/reduce.hpp +++ b/modules/core/include/opencv2/core/cuda/reduce.hpp @@ -40,8 +40,8 @@ // //M*/ -#ifndef __OPENCV_GPU_REDUCE_HPP__ -#define __OPENCV_GPU_REDUCE_HPP__ +#ifndef __OPENCV_CUDA_REDUCE_HPP__ +#define __OPENCV_CUDA_REDUCE_HPP__ #include #include "detail/reduce.hpp" @@ -194,4 +194,4 @@ namespace cv { namespace cuda { namespace device } }}} -#endif // __OPENCV_GPU_UTILITY_HPP__ +#endif // __OPENCV_CUDA_UTILITY_HPP__ diff --git a/modules/core/include/opencv2/core/cuda/saturate_cast.hpp b/modules/core/include/opencv2/core/cuda/saturate_cast.hpp index 26aed84c9..84e191807 100644 --- a/modules/core/include/opencv2/core/cuda/saturate_cast.hpp +++ b/modules/core/include/opencv2/core/cuda/saturate_cast.hpp @@ -40,8 +40,8 @@ // //M*/ -#ifndef __OPENCV_GPU_SATURATE_CAST_HPP__ -#define __OPENCV_GPU_SATURATE_CAST_HPP__ +#ifndef __OPENCV_CUDA_SATURATE_CAST_HPP__ +#define __OPENCV_CUDA_SATURATE_CAST_HPP__ #include "common.hpp" @@ -281,4 +281,4 @@ namespace cv { namespace cuda { namespace device } }}} -#endif /* __OPENCV_GPU_SATURATE_CAST_HPP__ */ +#endif /* __OPENCV_CUDA_SATURATE_CAST_HPP__ */ diff --git a/modules/core/include/opencv2/core/cuda/scan.hpp b/modules/core/include/opencv2/core/cuda/scan.hpp index 69982b6d6..33cb62e94 100644 --- a/modules/core/include/opencv2/core/cuda/scan.hpp +++ b/modules/core/include/opencv2/core/cuda/scan.hpp @@ -40,8 +40,8 @@ // //M*/ -#ifndef __OPENCV_GPU_SCAN_HPP__ -#define __OPENCV_GPU_SCAN_HPP__ +#ifndef __OPENCV_CUDA_SCAN_HPP__ +#define __OPENCV_CUDA_SCAN_HPP__ #include "opencv2/core/cuda/common.hpp" #include "opencv2/core/cuda/utility.hpp" @@ -178,7 +178,7 @@ namespace cv { namespace cuda { namespace device // scan on shuffl functions #pragma unroll - for (int i = 1; i <= (OPENCV_GPU_WARP_SIZE / 2); i *= 2) + for (int i = 1; i <= (OPENCV_CUDA_WARP_SIZE / 2); i *= 2) { const T n = cv::cuda::device::shfl_up(idata, i); if (laneId >= i) @@ -187,9 +187,9 @@ namespace cv { namespace cuda { namespace device return idata; #else - unsigned int pos = 2 * tid - (tid & (OPENCV_GPU_WARP_SIZE - 1)); + unsigned int pos = 2 * tid - (tid & (OPENCV_CUDA_WARP_SIZE - 1)); s_Data[pos] = 0; - pos += OPENCV_GPU_WARP_SIZE; + pos += OPENCV_CUDA_WARP_SIZE; s_Data[pos] = idata; s_Data[pos] += s_Data[pos - 1]; @@ -211,7 +211,7 @@ namespace cv { namespace cuda { namespace device template __device__ T blockScanInclusive(T idata, volatile T* s_Data, unsigned int tid) { - if (tiNumScanThreads > OPENCV_GPU_WARP_SIZE) + if (tiNumScanThreads > OPENCV_CUDA_WARP_SIZE) { //Bottom-level inclusive warp scan T warpResult = warpScanInclusive(idata, s_Data, tid); @@ -219,15 +219,15 @@ namespace cv { namespace cuda { namespace device //Save top elements of each warp for exclusive warp scan //sync to wait for warp scans to complete (because s_Data is being overwritten) __syncthreads(); - if ((tid & (OPENCV_GPU_WARP_SIZE - 1)) == (OPENCV_GPU_WARP_SIZE - 1)) + if ((tid & (OPENCV_CUDA_WARP_SIZE - 1)) == (OPENCV_CUDA_WARP_SIZE - 1)) { - s_Data[tid >> OPENCV_GPU_LOG_WARP_SIZE] = warpResult; + s_Data[tid >> OPENCV_CUDA_LOG_WARP_SIZE] = warpResult; } //wait for warp scans to complete __syncthreads(); - if (tid < (tiNumScanThreads / OPENCV_GPU_WARP_SIZE) ) + if (tid < (tiNumScanThreads / OPENCV_CUDA_WARP_SIZE) ) { //grab top warp elements T val = s_Data[tid]; @@ -238,7 +238,7 @@ namespace cv { namespace cuda { namespace device //return updated warp scans with exclusive scan results __syncthreads(); - return warpResult + s_Data[tid >> OPENCV_GPU_LOG_WARP_SIZE]; + return warpResult + s_Data[tid >> OPENCV_CUDA_LOG_WARP_SIZE]; } else { @@ -247,4 +247,4 @@ namespace cv { namespace cuda { namespace device } }}} -#endif // __OPENCV_GPU_SCAN_HPP__ +#endif // __OPENCV_CUDA_SCAN_HPP__ diff --git a/modules/core/include/opencv2/core/cuda/simd_functions.hpp b/modules/core/include/opencv2/core/cuda/simd_functions.hpp index f449620e9..bacfd75c1 100644 --- a/modules/core/include/opencv2/core/cuda/simd_functions.hpp +++ b/modules/core/include/opencv2/core/cuda/simd_functions.hpp @@ -70,16 +70,16 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef __OPENCV_GPU_SIMD_FUNCTIONS_HPP__ -#define __OPENCV_GPU_SIMD_FUNCTIONS_HPP__ +#ifndef __OPENCV_CUDA_SIMD_FUNCTIONS_HPP__ +#define __OPENCV_CUDA_SIMD_FUNCTIONS_HPP__ #include "common.hpp" /* This header file contains inline functions that implement intra-word SIMD - operations, that are hardware accelerated on sm_3x (Kepler) GPUs. Efficient + operations, that are hardware accelerated on sm_3x (Kepler) CUDAs. Efficient emulation code paths are provided for earlier architectures (sm_1x, sm_2x) - to make the code portable across all GPUs supported by CUDA. The following + to make the code portable across all CUDAs supported by CUDA. The following functions are currently implemented: vadd2(a,b) per-halfword unsigned addition, with wrap-around: a + b @@ -906,4 +906,4 @@ namespace cv { namespace cuda { namespace device } }}} -#endif // __OPENCV_GPU_SIMD_FUNCTIONS_HPP__ +#endif // __OPENCV_CUDA_SIMD_FUNCTIONS_HPP__ diff --git a/modules/core/include/opencv2/core/cuda/transform.hpp b/modules/core/include/opencv2/core/cuda/transform.hpp index cdca20d68..236af6690 100644 --- a/modules/core/include/opencv2/core/cuda/transform.hpp +++ b/modules/core/include/opencv2/core/cuda/transform.hpp @@ -40,8 +40,8 @@ // //M*/ -#ifndef __OPENCV_GPU_TRANSFORM_HPP__ -#define __OPENCV_GPU_TRANSFORM_HPP__ +#ifndef __OPENCV_CUDA_TRANSFORM_HPP__ +#define __OPENCV_CUDA_TRANSFORM_HPP__ #include "common.hpp" #include "utility.hpp" @@ -64,4 +64,4 @@ namespace cv { namespace cuda { namespace device } }}} -#endif // __OPENCV_GPU_TRANSFORM_HPP__ +#endif // __OPENCV_CUDA_TRANSFORM_HPP__ diff --git a/modules/core/include/opencv2/core/cuda/type_traits.hpp b/modules/core/include/opencv2/core/cuda/type_traits.hpp index 9bcca052e..d06a374c5 100644 --- a/modules/core/include/opencv2/core/cuda/type_traits.hpp +++ b/modules/core/include/opencv2/core/cuda/type_traits.hpp @@ -40,8 +40,8 @@ // //M*/ -#ifndef __OPENCV_GPU_TYPE_TRAITS_HPP__ -#define __OPENCV_GPU_TYPE_TRAITS_HPP__ +#ifndef __OPENCV_CUDA_TYPE_TRAITS_HPP__ +#define __OPENCV_CUDA_TYPE_TRAITS_HPP__ #include "detail/type_traits_detail.hpp" @@ -79,4 +79,4 @@ namespace cv { namespace cuda { namespace device }; }}} -#endif // __OPENCV_GPU_TYPE_TRAITS_HPP__ +#endif // __OPENCV_CUDA_TYPE_TRAITS_HPP__ diff --git a/modules/core/include/opencv2/core/cuda/utility.hpp b/modules/core/include/opencv2/core/cuda/utility.hpp index db9dfe44d..841638725 100644 --- a/modules/core/include/opencv2/core/cuda/utility.hpp +++ b/modules/core/include/opencv2/core/cuda/utility.hpp @@ -40,18 +40,18 @@ // //M*/ -#ifndef __OPENCV_GPU_UTILITY_HPP__ -#define __OPENCV_GPU_UTILITY_HPP__ +#ifndef __OPENCV_CUDA_UTILITY_HPP__ +#define __OPENCV_CUDA_UTILITY_HPP__ #include "saturate_cast.hpp" #include "datamov_utils.hpp" namespace cv { namespace cuda { namespace device { - #define OPENCV_GPU_LOG_WARP_SIZE (5) - #define OPENCV_GPU_WARP_SIZE (1 << OPENCV_GPU_LOG_WARP_SIZE) - #define OPENCV_GPU_LOG_MEM_BANKS ((__CUDA_ARCH__ >= 200) ? 5 : 4) // 32 banks on fermi, 16 on tesla - #define OPENCV_GPU_MEM_BANKS (1 << OPENCV_GPU_LOG_MEM_BANKS) + #define OPENCV_CUDA_LOG_WARP_SIZE (5) + #define OPENCV_CUDA_WARP_SIZE (1 << OPENCV_CUDA_LOG_WARP_SIZE) + #define OPENCV_CUDA_LOG_MEM_BANKS ((__CUDA_ARCH__ >= 200) ? 5 : 4) // 32 banks on fermi, 16 on tesla + #define OPENCV_CUDA_MEM_BANKS (1 << OPENCV_CUDA_LOG_MEM_BANKS) /////////////////////////////////////////////////////////////////////////////// // swap @@ -210,4 +210,4 @@ namespace cv { namespace cuda { namespace device } }}} // namespace cv { namespace cuda { namespace cudev -#endif // __OPENCV_GPU_UTILITY_HPP__ +#endif // __OPENCV_CUDA_UTILITY_HPP__ diff --git a/modules/core/include/opencv2/core/cuda/vec_distance.hpp b/modules/core/include/opencv2/core/cuda/vec_distance.hpp index 731616090..2a00303a3 100644 --- a/modules/core/include/opencv2/core/cuda/vec_distance.hpp +++ b/modules/core/include/opencv2/core/cuda/vec_distance.hpp @@ -40,8 +40,8 @@ // //M*/ -#ifndef __OPENCV_GPU_VEC_DISTANCE_HPP__ -#define __OPENCV_GPU_VEC_DISTANCE_HPP__ +#ifndef __OPENCV_CUDA_VEC_DISTANCE_HPP__ +#define __OPENCV_CUDA_VEC_DISTANCE_HPP__ #include "reduce.hpp" #include "functional.hpp" @@ -221,4 +221,4 @@ namespace cv { namespace cuda { namespace device }; }}} // namespace cv { namespace cuda { namespace cudev -#endif // __OPENCV_GPU_VEC_DISTANCE_HPP__ +#endif // __OPENCV_CUDA_VEC_DISTANCE_HPP__ diff --git a/modules/core/include/opencv2/core/cuda/vec_math.hpp b/modules/core/include/opencv2/core/cuda/vec_math.hpp index 2a9012be7..2b774d7f2 100644 --- a/modules/core/include/opencv2/core/cuda/vec_math.hpp +++ b/modules/core/include/opencv2/core/cuda/vec_math.hpp @@ -40,8 +40,8 @@ // //M*/ -#ifndef __OPENCV_GPU_VECMATH_HPP__ -#define __OPENCV_GPU_VECMATH_HPP__ +#ifndef __OPENCV_CUDA_VECMATH_HPP__ +#define __OPENCV_CUDA_VECMATH_HPP__ #include "vec_traits.hpp" #include "saturate_cast.hpp" @@ -919,4 +919,4 @@ CV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(atan2, ::atan2, double, double, double) }}} // namespace cv { namespace cuda { namespace device -#endif // __OPENCV_GPU_VECMATH_HPP__ +#endif // __OPENCV_CUDA_VECMATH_HPP__ diff --git a/modules/core/include/opencv2/core/cuda/vec_traits.hpp b/modules/core/include/opencv2/core/cuda/vec_traits.hpp index c8ce2c7de..17f0ee746 100644 --- a/modules/core/include/opencv2/core/cuda/vec_traits.hpp +++ b/modules/core/include/opencv2/core/cuda/vec_traits.hpp @@ -40,8 +40,8 @@ // //M*/ -#ifndef __OPENCV_GPU_VEC_TRAITS_HPP__ -#define __OPENCV_GPU_VEC_TRAITS_HPP__ +#ifndef __OPENCV_CUDA_VEC_TRAITS_HPP__ +#define __OPENCV_CUDA_VEC_TRAITS_HPP__ #include "common.hpp" @@ -122,7 +122,7 @@ namespace cv { namespace cuda { namespace device return val; } -#define OPENCV_GPU_IMPLEMENT_TYPE_VEC(type) \ +#define OPENCV_CUDA_IMPLEMENT_TYPE_VEC(type) \ template<> struct TypeVec { typedef type vec_type; }; \ template<> struct TypeVec { typedef type ## 1 vec_type; }; \ template<> struct TypeVec { typedef type ## 2 vec_type; }; \ @@ -134,16 +134,16 @@ namespace cv { namespace cuda { namespace device template<> struct TypeVec { typedef type ## 8 vec_type; }; \ template<> struct TypeVec { typedef type ## 8 vec_type; }; - OPENCV_GPU_IMPLEMENT_TYPE_VEC(uchar) - OPENCV_GPU_IMPLEMENT_TYPE_VEC(char) - OPENCV_GPU_IMPLEMENT_TYPE_VEC(ushort) - OPENCV_GPU_IMPLEMENT_TYPE_VEC(short) - OPENCV_GPU_IMPLEMENT_TYPE_VEC(int) - OPENCV_GPU_IMPLEMENT_TYPE_VEC(uint) - OPENCV_GPU_IMPLEMENT_TYPE_VEC(float) - OPENCV_GPU_IMPLEMENT_TYPE_VEC(double) + OPENCV_CUDA_IMPLEMENT_TYPE_VEC(uchar) + OPENCV_CUDA_IMPLEMENT_TYPE_VEC(char) + OPENCV_CUDA_IMPLEMENT_TYPE_VEC(ushort) + OPENCV_CUDA_IMPLEMENT_TYPE_VEC(short) + OPENCV_CUDA_IMPLEMENT_TYPE_VEC(int) + OPENCV_CUDA_IMPLEMENT_TYPE_VEC(uint) + OPENCV_CUDA_IMPLEMENT_TYPE_VEC(float) + OPENCV_CUDA_IMPLEMENT_TYPE_VEC(double) - #undef OPENCV_GPU_IMPLEMENT_TYPE_VEC + #undef OPENCV_CUDA_IMPLEMENT_TYPE_VEC template<> struct TypeVec { typedef schar vec_type; }; template<> struct TypeVec { typedef char2 vec_type; }; @@ -159,7 +159,7 @@ namespace cv { namespace cuda { namespace device template struct VecTraits; -#define OPENCV_GPU_IMPLEMENT_VEC_TRAITS(type) \ +#define OPENCV_CUDA_IMPLEMENT_VEC_TRAITS(type) \ template<> struct VecTraits \ { \ typedef type elem_type; \ @@ -209,15 +209,15 @@ namespace cv { namespace cuda { namespace device static __device__ __host__ __forceinline__ type ## 8 make(const type* v) {return make_ ## type ## 8(v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7]);} \ }; - OPENCV_GPU_IMPLEMENT_VEC_TRAITS(uchar) - OPENCV_GPU_IMPLEMENT_VEC_TRAITS(ushort) - OPENCV_GPU_IMPLEMENT_VEC_TRAITS(short) - OPENCV_GPU_IMPLEMENT_VEC_TRAITS(int) - OPENCV_GPU_IMPLEMENT_VEC_TRAITS(uint) - OPENCV_GPU_IMPLEMENT_VEC_TRAITS(float) - OPENCV_GPU_IMPLEMENT_VEC_TRAITS(double) + OPENCV_CUDA_IMPLEMENT_VEC_TRAITS(uchar) + OPENCV_CUDA_IMPLEMENT_VEC_TRAITS(ushort) + OPENCV_CUDA_IMPLEMENT_VEC_TRAITS(short) + OPENCV_CUDA_IMPLEMENT_VEC_TRAITS(int) + OPENCV_CUDA_IMPLEMENT_VEC_TRAITS(uint) + OPENCV_CUDA_IMPLEMENT_VEC_TRAITS(float) + OPENCV_CUDA_IMPLEMENT_VEC_TRAITS(double) - #undef OPENCV_GPU_IMPLEMENT_VEC_TRAITS + #undef OPENCV_CUDA_IMPLEMENT_VEC_TRAITS template<> struct VecTraits { @@ -277,4 +277,4 @@ namespace cv { namespace cuda { namespace device }; }}} // namespace cv { namespace cuda { namespace cudev -#endif // __OPENCV_GPU_VEC_TRAITS_HPP__ +#endif // __OPENCV_CUDA_VEC_TRAITS_HPP__ diff --git a/modules/core/include/opencv2/core/cuda/warp.hpp b/modules/core/include/opencv2/core/cuda/warp.hpp index 7ad7cc812..c9659d6aa 100644 --- a/modules/core/include/opencv2/core/cuda/warp.hpp +++ b/modules/core/include/opencv2/core/cuda/warp.hpp @@ -40,8 +40,8 @@ // //M*/ -#ifndef __OPENCV_GPU_DEVICE_WARP_HPP__ -#define __OPENCV_GPU_DEVICE_WARP_HPP__ +#ifndef __OPENCV_CUDA_DEVICE_WARP_HPP__ +#define __OPENCV_CUDA_DEVICE_WARP_HPP__ namespace cv { namespace cuda { namespace device { @@ -128,4 +128,4 @@ namespace cv { namespace cuda { namespace device }; }}} // namespace cv { namespace cuda { namespace cudev -#endif /* __OPENCV_GPU_DEVICE_WARP_HPP__ */ +#endif /* __OPENCV_CUDA_DEVICE_WARP_HPP__ */ diff --git a/modules/core/include/opencv2/core/cuda/warp_reduce.hpp b/modules/core/include/opencv2/core/cuda/warp_reduce.hpp index d611ec69f..5f0f8dbf1 100644 --- a/modules/core/include/opencv2/core/cuda/warp_reduce.hpp +++ b/modules/core/include/opencv2/core/cuda/warp_reduce.hpp @@ -40,8 +40,8 @@ // //M*/ -#ifndef OPENCV_GPU_WARP_REDUCE_HPP__ -#define OPENCV_GPU_WARP_REDUCE_HPP__ +#ifndef OPENCV_CUDA_WARP_REDUCE_HPP__ +#define OPENCV_CUDA_WARP_REDUCE_HPP__ namespace cv { namespace cuda { namespace device { @@ -65,4 +65,4 @@ namespace cv { namespace cuda { namespace device } }}} // namespace cv { namespace cuda { namespace cudev { -#endif /* OPENCV_GPU_WARP_REDUCE_HPP__ */ +#endif /* OPENCV_CUDA_WARP_REDUCE_HPP__ */ diff --git a/modules/core/include/opencv2/core/cuda/warp_shuffle.hpp b/modules/core/include/opencv2/core/cuda/warp_shuffle.hpp index 0818a7e83..e75e74139 100644 --- a/modules/core/include/opencv2/core/cuda/warp_shuffle.hpp +++ b/modules/core/include/opencv2/core/cuda/warp_shuffle.hpp @@ -40,8 +40,8 @@ // //M*/ -#ifndef __OPENCV_GPU_WARP_SHUFFLE_HPP__ -#define __OPENCV_GPU_WARP_SHUFFLE_HPP__ +#ifndef __OPENCV_CUDA_WARP_SHUFFLE_HPP__ +#define __OPENCV_CUDA_WARP_SHUFFLE_HPP__ namespace cv { namespace cuda { namespace device { @@ -142,4 +142,4 @@ namespace cv { namespace cuda { namespace device } }}} -#endif // __OPENCV_GPU_WARP_SHUFFLE_HPP__ +#endif // __OPENCV_CUDA_WARP_SHUFFLE_HPP__ diff --git a/modules/core/include/opencv2/core/cuda_stream_accessor.hpp b/modules/core/include/opencv2/core/cuda_stream_accessor.hpp index baf693094..5b058fa45 100644 --- a/modules/core/include/opencv2/core/cuda_stream_accessor.hpp +++ b/modules/core/include/opencv2/core/cuda_stream_accessor.hpp @@ -40,8 +40,8 @@ // //M*/ -#ifndef __OPENCV_CORE_GPU_STREAM_ACCESSOR_HPP__ -#define __OPENCV_CORE_GPU_STREAM_ACCESSOR_HPP__ +#ifndef __OPENCV_CORE_CUDA_STREAM_ACCESSOR_HPP__ +#define __OPENCV_CORE_CUDA_STREAM_ACCESSOR_HPP__ #ifndef __cplusplus # error cuda_stream_accessor.hpp header must be compiled as C++ @@ -49,7 +49,7 @@ // This is only header file that depends on Cuda. All other headers are independent. // So if you use OpenCV binaries you do noot need to install Cuda Toolkit. -// But of you wanna use GPU by yourself, may get cuda stream instance using the class below. +// But of you wanna use CUDA by yourself, may get cuda stream instance using the class below. // In this case you have to install Cuda Toolkit. #include @@ -74,4 +74,4 @@ namespace cv } } -#endif /* __OPENCV_CORE_GPU_STREAM_ACCESSOR_HPP__ */ +#endif /* __OPENCV_CORE_CUDA_STREAM_ACCESSOR_HPP__ */ diff --git a/modules/core/include/opencv2/core/cuda_types.hpp b/modules/core/include/opencv2/core/cuda_types.hpp index 06c3f1917..a82f8ac73 100644 --- a/modules/core/include/opencv2/core/cuda_types.hpp +++ b/modules/core/include/opencv2/core/cuda_types.hpp @@ -40,17 +40,17 @@ // //M*/ -#ifndef __OPENCV_CORE_GPU_TYPES_HPP__ -#define __OPENCV_CORE_GPU_TYPES_HPP__ +#ifndef __OPENCV_CORE_CUDA_TYPES_HPP__ +#define __OPENCV_CORE_CUDA_TYPES_HPP__ #ifndef __cplusplus # error cuda_types.hpp header must be compiled as C++ #endif #ifdef __CUDACC__ - #define __CV_GPU_HOST_DEVICE__ __host__ __device__ __forceinline__ + #define __CV_CUDA_HOST_DEVICE__ __host__ __device__ __forceinline__ #else - #define __CV_GPU_HOST_DEVICE__ + #define __CV_CUDA_HOST_DEVICE__ #endif namespace cv @@ -69,41 +69,41 @@ namespace cv T* data; - __CV_GPU_HOST_DEVICE__ DevPtr() : data(0) {} - __CV_GPU_HOST_DEVICE__ DevPtr(T* data_) : data(data_) {} + __CV_CUDA_HOST_DEVICE__ DevPtr() : data(0) {} + __CV_CUDA_HOST_DEVICE__ DevPtr(T* data_) : data(data_) {} - __CV_GPU_HOST_DEVICE__ size_t elemSize() const { return elem_size; } - __CV_GPU_HOST_DEVICE__ operator T*() { return data; } - __CV_GPU_HOST_DEVICE__ operator const T*() const { return data; } + __CV_CUDA_HOST_DEVICE__ size_t elemSize() const { return elem_size; } + __CV_CUDA_HOST_DEVICE__ operator T*() { return data; } + __CV_CUDA_HOST_DEVICE__ operator const T*() const { return data; } }; template struct PtrSz : public DevPtr { - __CV_GPU_HOST_DEVICE__ PtrSz() : size(0) {} - __CV_GPU_HOST_DEVICE__ PtrSz(T* data_, size_t size_) : DevPtr(data_), size(size_) {} + __CV_CUDA_HOST_DEVICE__ PtrSz() : size(0) {} + __CV_CUDA_HOST_DEVICE__ PtrSz(T* data_, size_t size_) : DevPtr(data_), size(size_) {} size_t size; }; template struct PtrStep : public DevPtr { - __CV_GPU_HOST_DEVICE__ PtrStep() : step(0) {} - __CV_GPU_HOST_DEVICE__ PtrStep(T* data_, size_t step_) : DevPtr(data_), step(step_) {} + __CV_CUDA_HOST_DEVICE__ PtrStep() : step(0) {} + __CV_CUDA_HOST_DEVICE__ PtrStep(T* data_, size_t step_) : DevPtr(data_), step(step_) {} //! stride between two consecutive rows in bytes. Step is stored always and everywhere in bytes!!! size_t step; - __CV_GPU_HOST_DEVICE__ T* ptr(int y = 0) { return ( T*)( ( char*)DevPtr::data + y * step); } - __CV_GPU_HOST_DEVICE__ const T* ptr(int y = 0) const { return (const T*)( (const char*)DevPtr::data + y * step); } + __CV_CUDA_HOST_DEVICE__ T* ptr(int y = 0) { return ( T*)( ( char*)DevPtr::data + y * step); } + __CV_CUDA_HOST_DEVICE__ const T* ptr(int y = 0) const { return (const T*)( (const char*)DevPtr::data + y * step); } - __CV_GPU_HOST_DEVICE__ T& operator ()(int y, int x) { return ptr(y)[x]; } - __CV_GPU_HOST_DEVICE__ const T& operator ()(int y, int x) const { return ptr(y)[x]; } + __CV_CUDA_HOST_DEVICE__ T& operator ()(int y, int x) { return ptr(y)[x]; } + __CV_CUDA_HOST_DEVICE__ const T& operator ()(int y, int x) const { return ptr(y)[x]; } }; template struct PtrStepSz : public PtrStep { - __CV_GPU_HOST_DEVICE__ PtrStepSz() : cols(0), rows(0) {} - __CV_GPU_HOST_DEVICE__ PtrStepSz(int rows_, int cols_, T* data_, size_t step_) + __CV_CUDA_HOST_DEVICE__ PtrStepSz() : cols(0), rows(0) {} + __CV_CUDA_HOST_DEVICE__ PtrStepSz(int rows_, int cols_, T* data_, size_t step_) : PtrStep(data_, step_), cols(cols_), rows(rows_) {} template @@ -123,4 +123,4 @@ namespace cv } } -#endif /* __OPENCV_CORE_GPU_TYPES_HPP__ */ +#endif /* __OPENCV_CORE_CUDA_TYPES_HPP__ */ diff --git a/modules/core/include/opencv2/core/private.cuda.hpp b/modules/core/include/opencv2/core/private.cuda.hpp index 6fa0cec13..3c4523183 100644 --- a/modules/core/include/opencv2/core/private.cuda.hpp +++ b/modules/core/include/opencv2/core/private.cuda.hpp @@ -41,8 +41,8 @@ // //M*/ -#ifndef __OPENCV_CORE_PRIVATE_GPU_HPP__ -#define __OPENCV_CORE_PRIVATE_GPU_HPP__ +#ifndef __OPENCV_CORE_PRIVATE_CUDA_HPP__ +#define __OPENCV_CORE_PRIVATE_CUDA_HPP__ #ifndef __OPENCV_BUILD # error this is a private header which should not be used from outside of the OpenCV library @@ -71,7 +71,7 @@ # endif # if defined(CUDA_ARCH_BIN_OR_PTX_10) -# error "OpenCV GPU module doesn't support NVIDIA compute capability 1.0" +# error "OpenCV CUDA module doesn't support NVIDIA compute capability 1.0" # endif #endif @@ -82,7 +82,7 @@ namespace cv { namespace cuda { #ifndef HAVE_CUDA -static inline void throw_no_cuda() { CV_Error(cv::Error::GpuNotSupported, "The library is compiled without GPU support"); } +static inline void throw_no_cuda() { CV_Error(cv::Error::GpuNotSupported, "The library is compiled without CUDA support"); } #else // HAVE_CUDA @@ -140,4 +140,4 @@ namespace cv { namespace cuda #endif // HAVE_CUDA -#endif // __OPENCV_CORE_GPU_PRIVATE_HPP__ +#endif // __OPENCV_CORE_CUDA_PRIVATE_HPP__ diff --git a/modules/core/src/system.cpp b/modules/core/src/system.cpp index 738e863d7..6fb5933ca 100644 --- a/modules/core/src/system.cpp +++ b/modules/core/src/system.cpp @@ -634,7 +634,7 @@ CV_IMPL const char* cvErrorStr( int status ) case CV_StsNotImplemented : return "The function/feature is not implemented"; case CV_StsBadMemBlock : return "Memory block has been corrupted"; case CV_StsAssert : return "Assertion failed"; - case CV_GpuNotSupported : return "No GPU support"; + case CV_GpuNotSupported : return "No CUDA support"; case CV_GpuApiCallError : return "Gpu API call"; case CV_OpenGlNotSupported : return "No OpenGL support"; case CV_OpenGlApiCallError : return "OpenGL API call"; diff --git a/modules/cuda/include/opencv2/cuda.hpp b/modules/cuda/include/opencv2/cuda.hpp index 64617df4f..a42bfb7d8 100644 --- a/modules/cuda/include/opencv2/cuda.hpp +++ b/modules/cuda/include/opencv2/cuda.hpp @@ -146,12 +146,12 @@ protected: //////////////////////////// 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 +class CV_EXPORTS CascadeClassifier_CUDA { public: - CascadeClassifier_GPU(); - CascadeClassifier_GPU(const String& filename); - ~CascadeClassifier_GPU(); + CascadeClassifier_CUDA(); + CascadeClassifier_CUDA(const String& filename); + ~CascadeClassifier_CUDA(); bool empty() const; bool load(const String& filename); @@ -171,7 +171,7 @@ private: CascadeClassifierImpl* impl; struct HaarCascade; struct LbpCascade; - friend class CascadeClassifier_GPU_LBP; + friend class CascadeClassifier_CUDA_LBP; }; //////////////////////////// Labeling //////////////////////////// diff --git a/modules/cuda/perf/perf_calib3d.cpp b/modules/cuda/perf/perf_calib3d.cpp index 761ff3d1a..4148b5191 100644 --- a/modules/cuda/perf/perf_calib3d.cpp +++ b/modules/cuda/perf/perf_calib3d.cpp @@ -63,14 +63,14 @@ PERF_TEST_P(Count, Calib3D_ProjectPoints, const cv::Mat tvec = cv::Mat::ones(1, 3, CV_32FC1); const cv::Mat camera_mat = cv::Mat::ones(3, 3, CV_32FC1); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::projectPoints(d_src, rvec, tvec, camera_mat, cv::Mat(), dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -118,12 +118,12 @@ PERF_TEST_P(Count, Calib3D_SolvePnPRansac, cv::Mat rvec; cv::Mat tvec; - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { TEST_CYCLE() cv::cuda::solvePnPRansac(object, image, camera_mat, dist_coef, rvec, tvec); - GPU_SANITY_CHECK(rvec, 1e-3); - GPU_SANITY_CHECK(tvec, 1e-3); + CUDA_SANITY_CHECK(rvec, 1e-3); + CUDA_SANITY_CHECK(tvec, 1e-3); } else { diff --git a/modules/cuda/perf/perf_labeling.cpp b/modules/cuda/perf/perf_labeling.cpp index e6cd26f07..f0875a85c 100644 --- a/modules/cuda/perf/perf_labeling.cpp +++ b/modules/cuda/perf/perf_labeling.cpp @@ -149,14 +149,14 @@ PERF_TEST_P(Image, DISABLED_Labeling_ConnectivityMask, const cv::Mat image = readImage(GetParam(), cv::IMREAD_GRAYSCALE); ASSERT_FALSE(image.empty()); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { cv::cuda::GpuMat d_image(image); cv::cuda::GpuMat mask; TEST_CYCLE() cv::cuda::connectivityMask(d_image, mask, cv::Scalar::all(0), cv::Scalar::all(2)); - GPU_SANITY_CHECK(mask); + CUDA_SANITY_CHECK(mask); } else { @@ -172,7 +172,7 @@ PERF_TEST_P(Image, DISABLED_Labeling_ConnectedComponents, const cv::Mat image = readImage(GetParam(), cv::IMREAD_GRAYSCALE); ASSERT_FALSE(image.empty()); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { cv::cuda::GpuMat d_mask; cv::cuda::connectivityMask(cv::cuda::GpuMat(image), d_mask, cv::Scalar::all(0), cv::Scalar::all(2)); @@ -181,7 +181,7 @@ PERF_TEST_P(Image, DISABLED_Labeling_ConnectedComponents, TEST_CYCLE() cv::cuda::labelComponents(d_mask, components); - GPU_SANITY_CHECK(components); + CUDA_SANITY_CHECK(components); } else { diff --git a/modules/cuda/perf/perf_matop.cpp b/modules/cuda/perf/perf_matop.cpp index 42b3bc190..751e6e714 100644 --- a/modules/cuda/perf/perf_matop.cpp +++ b/modules/cuda/perf/perf_matop.cpp @@ -50,9 +50,9 @@ using namespace perf; // SetTo PERF_TEST_P(Sz_Depth_Cn, MatOp_SetTo, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16U, CV_32F, CV_64F), - GPU_CHANNELS_1_3_4)) + CUDA_CHANNELS_1_3_4)) { const cv::Size size = GET_PARAM(0); const int depth = GET_PARAM(1); @@ -62,13 +62,13 @@ PERF_TEST_P(Sz_Depth_Cn, MatOp_SetTo, const cv::Scalar val(1, 2, 3, 4); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { cv::cuda::GpuMat dst(size, type); TEST_CYCLE() dst.setTo(val); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -84,9 +84,9 @@ PERF_TEST_P(Sz_Depth_Cn, MatOp_SetTo, // SetToMasked PERF_TEST_P(Sz_Depth_Cn, MatOp_SetToMasked, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16U, CV_32F, CV_64F), - GPU_CHANNELS_1_3_4)) + CUDA_CHANNELS_1_3_4)) { const cv::Size size = GET_PARAM(0); const int depth = GET_PARAM(1); @@ -100,14 +100,14 @@ PERF_TEST_P(Sz_Depth_Cn, MatOp_SetToMasked, const cv::Scalar val(1, 2, 3, 4); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { cv::cuda::GpuMat dst(src); const cv::cuda::GpuMat d_mask(mask); TEST_CYCLE() dst.setTo(val, d_mask); - GPU_SANITY_CHECK(dst, 1e-10); + CUDA_SANITY_CHECK(dst, 1e-10); } else { @@ -123,9 +123,9 @@ PERF_TEST_P(Sz_Depth_Cn, MatOp_SetToMasked, // CopyToMasked PERF_TEST_P(Sz_Depth_Cn, MatOp_CopyToMasked, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16U, CV_32F, CV_64F), - GPU_CHANNELS_1_3_4)) + CUDA_CHANNELS_1_3_4)) { const cv::Size size = GET_PARAM(0); const int depth = GET_PARAM(1); @@ -137,7 +137,7 @@ PERF_TEST_P(Sz_Depth_Cn, MatOp_CopyToMasked, cv::Mat mask(size, CV_8UC1); declare.in(src, mask, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); const cv::cuda::GpuMat d_mask(mask); @@ -145,7 +145,7 @@ PERF_TEST_P(Sz_Depth_Cn, MatOp_CopyToMasked, TEST_CYCLE() d_src.copyTo(dst, d_mask); - GPU_SANITY_CHECK(dst, 1e-10); + CUDA_SANITY_CHECK(dst, 1e-10); } else { @@ -163,7 +163,7 @@ PERF_TEST_P(Sz_Depth_Cn, MatOp_CopyToMasked, DEF_PARAM_TEST(Sz_2Depth, cv::Size, MatDepth, MatDepth); PERF_TEST_P(Sz_2Depth, MatOp_ConvertTo, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16U, CV_32F, CV_64F), Values(CV_8U, CV_16U, CV_32F, CV_64F))) { @@ -177,14 +177,14 @@ PERF_TEST_P(Sz_2Depth, MatOp_ConvertTo, const double a = 0.5; const double b = 1.0; - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() d_src.convertTo(dst, depth2, a, b); - GPU_SANITY_CHECK(dst, 1e-10); + CUDA_SANITY_CHECK(dst, 1e-10); } else { diff --git a/modules/cuda/perf/perf_objdetect.cpp b/modules/cuda/perf/perf_objdetect.cpp index b2d75c816..c5d4649b8 100644 --- a/modules/cuda/perf/perf_objdetect.cpp +++ b/modules/cuda/perf/perf_objdetect.cpp @@ -66,7 +66,7 @@ PERF_TEST_P(Image, ObjDetect_HOG, const cv::Mat img = readImage(GetParam(), cv::IMREAD_GRAYSCALE); ASSERT_FALSE(img.empty()); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_img(img); std::vector gpu_found_locations; @@ -103,9 +103,9 @@ PERF_TEST_P(ImageAndCascade, ObjDetect_HaarClassifier, const cv::Mat img = readImage(GetParam().first, cv::IMREAD_GRAYSCALE); ASSERT_FALSE(img.empty()); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { - cv::cuda::CascadeClassifier_GPU d_cascade; + cv::cuda::CascadeClassifier_CUDA d_cascade; ASSERT_TRUE(d_cascade.load(perf::TestBase::getDataPath(GetParam().second))); const cv::cuda::GpuMat d_img(img); @@ -142,9 +142,9 @@ PERF_TEST_P(ImageAndCascade, ObjDetect_LBPClassifier, const cv::Mat img = readImage(GetParam().first, cv::IMREAD_GRAYSCALE); ASSERT_FALSE(img.empty()); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { - cv::cuda::CascadeClassifier_GPU d_cascade; + cv::cuda::CascadeClassifier_CUDA d_cascade; ASSERT_TRUE(d_cascade.load(perf::TestBase::getDataPath(GetParam().second))); const cv::cuda::GpuMat d_img(img); diff --git a/modules/cuda/src/cascadeclassifier.cpp b/modules/cuda/src/cascadeclassifier.cpp index 144ecf303..9449b0a27 100644 --- a/modules/cuda/src/cascadeclassifier.cpp +++ b/modules/cuda/src/cascadeclassifier.cpp @@ -48,19 +48,19 @@ using namespace cv::cuda; #if !defined (HAVE_CUDA) || defined (CUDA_DISABLER) -cv::cuda::CascadeClassifier_GPU::CascadeClassifier_GPU() { throw_no_cuda(); } -cv::cuda::CascadeClassifier_GPU::CascadeClassifier_GPU(const String&) { throw_no_cuda(); } -cv::cuda::CascadeClassifier_GPU::~CascadeClassifier_GPU() { throw_no_cuda(); } -bool cv::cuda::CascadeClassifier_GPU::empty() const { throw_no_cuda(); return true; } -bool cv::cuda::CascadeClassifier_GPU::load(const String&) { throw_no_cuda(); return true; } -Size cv::cuda::CascadeClassifier_GPU::getClassifierSize() const { throw_no_cuda(); return Size();} -void cv::cuda::CascadeClassifier_GPU::release() { throw_no_cuda(); } -int cv::cuda::CascadeClassifier_GPU::detectMultiScale( const GpuMat&, GpuMat&, double, int, Size) {throw_no_cuda(); return -1;} -int cv::cuda::CascadeClassifier_GPU::detectMultiScale( const GpuMat&, GpuMat&, Size, Size, double, int) {throw_no_cuda(); return -1;} +cv::cuda::CascadeClassifier_CUDA::CascadeClassifier_CUDA() { throw_no_cuda(); } +cv::cuda::CascadeClassifier_CUDA::CascadeClassifier_CUDA(const String&) { throw_no_cuda(); } +cv::cuda::CascadeClassifier_CUDA::~CascadeClassifier_CUDA() { throw_no_cuda(); } +bool cv::cuda::CascadeClassifier_CUDA::empty() const { throw_no_cuda(); return true; } +bool cv::cuda::CascadeClassifier_CUDA::load(const String&) { throw_no_cuda(); return true; } +Size cv::cuda::CascadeClassifier_CUDA::getClassifierSize() const { throw_no_cuda(); return Size();} +void cv::cuda::CascadeClassifier_CUDA::release() { throw_no_cuda(); } +int cv::cuda::CascadeClassifier_CUDA::detectMultiScale( const GpuMat&, GpuMat&, double, int, Size) {throw_no_cuda(); return -1;} +int cv::cuda::CascadeClassifier_CUDA::detectMultiScale( const GpuMat&, GpuMat&, Size, Size, double, int) {throw_no_cuda(); return -1;} #else -struct cv::cuda::CascadeClassifier_GPU::CascadeClassifierImpl +struct cv::cuda::CascadeClassifier_CUDA::CascadeClassifierImpl { public: CascadeClassifierImpl(){} @@ -75,7 +75,7 @@ public: #ifndef HAVE_OPENCV_CUDALEGACY -struct cv::cuda::CascadeClassifier_GPU::HaarCascade : cv::cuda::CascadeClassifier_GPU::CascadeClassifierImpl +struct cv::cuda::CascadeClassifier_CUDA::HaarCascade : cv::cuda::CascadeClassifier_CUDA::CascadeClassifierImpl { public: HaarCascade() @@ -104,7 +104,7 @@ public: #else -struct cv::cuda::CascadeClassifier_GPU::HaarCascade : cv::cuda::CascadeClassifier_GPU::CascadeClassifierImpl +struct cv::cuda::CascadeClassifier_CUDA::HaarCascade : cv::cuda::CascadeClassifier_CUDA::CascadeClassifierImpl { public: HaarCascade() : lastAllocatedFrameSize(-1, -1) @@ -398,7 +398,7 @@ namespace cv { namespace cuda { namespace device } }}} -struct cv::cuda::CascadeClassifier_GPU::LbpCascade : cv::cuda::CascadeClassifier_GPU::CascadeClassifierImpl +struct cv::cuda::CascadeClassifier_CUDA::LbpCascade : cv::cuda::CascadeClassifier_CUDA::CascadeClassifierImpl { public: struct Stage @@ -528,48 +528,48 @@ private: bool read(const FileNode &root) { - const char *GPU_CC_STAGE_TYPE = "stageType"; - const char *GPU_CC_FEATURE_TYPE = "featureType"; - const char *GPU_CC_BOOST = "BOOST"; - const char *GPU_CC_LBP = "LBP"; - const char *GPU_CC_MAX_CAT_COUNT = "maxCatCount"; - const char *GPU_CC_HEIGHT = "height"; - const char *GPU_CC_WIDTH = "width"; - const char *GPU_CC_STAGE_PARAMS = "stageParams"; - const char *GPU_CC_MAX_DEPTH = "maxDepth"; - const char *GPU_CC_FEATURE_PARAMS = "featureParams"; - const char *GPU_CC_STAGES = "stages"; - const char *GPU_CC_STAGE_THRESHOLD = "stageThreshold"; - const float GPU_THRESHOLD_EPS = 1e-5f; - const char *GPU_CC_WEAK_CLASSIFIERS = "weakClassifiers"; - const char *GPU_CC_INTERNAL_NODES = "internalNodes"; - const char *GPU_CC_LEAF_VALUES = "leafValues"; - const char *GPU_CC_FEATURES = "features"; - const char *GPU_CC_RECT = "rect"; + const char *CUDA_CC_STAGE_TYPE = "stageType"; + const char *CUDA_CC_FEATURE_TYPE = "featureType"; + const char *CUDA_CC_BOOST = "BOOST"; + const char *CUDA_CC_LBP = "LBP"; + const char *CUDA_CC_MAX_CAT_COUNT = "maxCatCount"; + const char *CUDA_CC_HEIGHT = "height"; + const char *CUDA_CC_WIDTH = "width"; + const char *CUDA_CC_STAGE_PARAMS = "stageParams"; + const char *CUDA_CC_MAX_DEPTH = "maxDepth"; + const char *CUDA_CC_FEATURE_PARAMS = "featureParams"; + const char *CUDA_CC_STAGES = "stages"; + const char *CUDA_CC_STAGE_THRESHOLD = "stageThreshold"; + const float CUDA_THRESHOLD_EPS = 1e-5f; + const char *CUDA_CC_WEAK_CLASSIFIERS = "weakClassifiers"; + const char *CUDA_CC_INTERNAL_NODES = "internalNodes"; + const char *CUDA_CC_LEAF_VALUES = "leafValues"; + const char *CUDA_CC_FEATURES = "features"; + const char *CUDA_CC_RECT = "rect"; - String stageTypeStr = (String)root[GPU_CC_STAGE_TYPE]; - CV_Assert(stageTypeStr == GPU_CC_BOOST); + String stageTypeStr = (String)root[CUDA_CC_STAGE_TYPE]; + CV_Assert(stageTypeStr == CUDA_CC_BOOST); - String featureTypeStr = (String)root[GPU_CC_FEATURE_TYPE]; - CV_Assert(featureTypeStr == GPU_CC_LBP); + String featureTypeStr = (String)root[CUDA_CC_FEATURE_TYPE]; + CV_Assert(featureTypeStr == CUDA_CC_LBP); - NxM.width = (int)root[GPU_CC_WIDTH]; - NxM.height = (int)root[GPU_CC_HEIGHT]; + NxM.width = (int)root[CUDA_CC_WIDTH]; + NxM.height = (int)root[CUDA_CC_HEIGHT]; CV_Assert( NxM.height > 0 && NxM.width > 0 ); - isStumps = ((int)(root[GPU_CC_STAGE_PARAMS][GPU_CC_MAX_DEPTH]) == 1) ? true : false; + isStumps = ((int)(root[CUDA_CC_STAGE_PARAMS][CUDA_CC_MAX_DEPTH]) == 1) ? true : false; CV_Assert(isStumps); - FileNode fn = root[GPU_CC_FEATURE_PARAMS]; + FileNode fn = root[CUDA_CC_FEATURE_PARAMS]; if (fn.empty()) return false; - ncategories = fn[GPU_CC_MAX_CAT_COUNT]; + ncategories = fn[CUDA_CC_MAX_CAT_COUNT]; subsetSize = (ncategories + 31) / 32; nodeStep = 3 + ( ncategories > 0 ? subsetSize : 1 ); - fn = root[GPU_CC_STAGES]; + fn = root[CUDA_CC_STAGES]; if (fn.empty()) return false; @@ -586,9 +586,9 @@ private: { FileNode fns = *it; Stage st; - st.threshold = (float)fns[GPU_CC_STAGE_THRESHOLD] - GPU_THRESHOLD_EPS; + st.threshold = (float)fns[CUDA_CC_STAGE_THRESHOLD] - CUDA_THRESHOLD_EPS; - fns = fns[GPU_CC_WEAK_CLASSIFIERS]; + fns = fns[CUDA_CC_WEAK_CLASSIFIERS]; if (fns.empty()) return false; @@ -605,8 +605,8 @@ private: { FileNode fnw = *it1; - FileNode internalNodes = fnw[GPU_CC_INTERNAL_NODES]; - FileNode leafValues = fnw[GPU_CC_LEAF_VALUES]; + FileNode internalNodes = fnw[CUDA_CC_INTERNAL_NODES]; + FileNode leafValues = fnw[CUDA_CC_LEAF_VALUES]; if ( internalNodes.empty() || leafValues.empty() ) return false; @@ -640,7 +640,7 @@ private: } } - fn = root[GPU_CC_FEATURES]; + fn = root[CUDA_CC_FEATURES]; if( fn.empty() ) return false; std::vector features; @@ -648,7 +648,7 @@ private: FileNodeIterator f_it = fn.begin(), f_end = fn.end(); for (; f_it != f_end; ++f_it) { - FileNode rect = (*f_it)[GPU_CC_RECT]; + FileNode rect = (*f_it)[CUDA_CC_RECT]; FileNodeIterator r_it = rect.begin(); features.push_back(saturate_cast((int)*(r_it++))); features.push_back(saturate_cast((int)*(r_it++))); @@ -694,36 +694,36 @@ private: static const int integralFactor = 4; }; -cv::cuda::CascadeClassifier_GPU::CascadeClassifier_GPU() +cv::cuda::CascadeClassifier_CUDA::CascadeClassifier_CUDA() : findLargestObject(false), visualizeInPlace(false), impl(0) {} -cv::cuda::CascadeClassifier_GPU::CascadeClassifier_GPU(const String& filename) +cv::cuda::CascadeClassifier_CUDA::CascadeClassifier_CUDA(const String& filename) : findLargestObject(false), visualizeInPlace(false), impl(0) { load(filename); } -cv::cuda::CascadeClassifier_GPU::~CascadeClassifier_GPU() { release(); } +cv::cuda::CascadeClassifier_CUDA::~CascadeClassifier_CUDA() { release(); } -void cv::cuda::CascadeClassifier_GPU::release() { if (impl) { delete impl; impl = 0; } } +void cv::cuda::CascadeClassifier_CUDA::release() { if (impl) { delete impl; impl = 0; } } -bool cv::cuda::CascadeClassifier_GPU::empty() const { return impl == 0; } +bool cv::cuda::CascadeClassifier_CUDA::empty() const { return impl == 0; } -Size cv::cuda::CascadeClassifier_GPU::getClassifierSize() const +Size cv::cuda::CascadeClassifier_CUDA::getClassifierSize() const { return this->empty() ? Size() : impl->getClassifierCvSize(); } -int cv::cuda::CascadeClassifier_GPU::detectMultiScale( const GpuMat& image, GpuMat& objectsBuf, double scaleFactor, int minNeighbors, Size minSize) +int cv::cuda::CascadeClassifier_CUDA::detectMultiScale( const GpuMat& image, GpuMat& objectsBuf, double scaleFactor, int minNeighbors, Size minSize) { CV_Assert( !this->empty()); return impl->process(image, objectsBuf, (float)scaleFactor, minNeighbors, findLargestObject, visualizeInPlace, minSize, cv::Size()); } -int cv::cuda::CascadeClassifier_GPU::detectMultiScale(const GpuMat& image, GpuMat& objectsBuf, Size maxObjectSize, Size minSize, double scaleFactor, int minNeighbors) +int cv::cuda::CascadeClassifier_CUDA::detectMultiScale(const GpuMat& image, GpuMat& objectsBuf, Size maxObjectSize, Size minSize, double scaleFactor, int minNeighbors) { CV_Assert( !this->empty()); return impl->process(image, objectsBuf, (float)scaleFactor, minNeighbors, findLargestObject, visualizeInPlace, minSize, maxObjectSize); } -bool cv::cuda::CascadeClassifier_GPU::load(const String& filename) +bool cv::cuda::CascadeClassifier_CUDA::load(const String& filename) { release(); @@ -744,9 +744,9 @@ bool cv::cuda::CascadeClassifier_GPU::load(const String& filename) return impl->read(filename); } - const char *GPU_CC_LBP = "LBP"; + const char *CUDA_CC_LBP = "LBP"; String featureTypeStr = (String)fs.getFirstTopLevelNode()["featureType"]; - if (featureTypeStr == GPU_CC_LBP) + if (featureTypeStr == CUDA_CC_LBP) impl = new LbpCascade(); else impl = new HaarCascade(); diff --git a/modules/cuda/src/cuda/lbp.hpp b/modules/cuda/src/cuda/lbp.hpp index d0e543734..417d7994f 100644 --- a/modules/cuda/src/cuda/lbp.hpp +++ b/modules/cuda/src/cuda/lbp.hpp @@ -40,8 +40,8 @@ // //M*/ -#ifndef __OPENCV_GPU_DEVICE_LBP_HPP_ -#define __OPENCV_GPU_DEVICE_LBP_HPP_ +#ifndef __OPENCV_CUDA_DEVICE_LBP_HPP_ +#define __OPENCV_CUDA_DEVICE_LBP_HPP_ #include "opencv2/core/cuda/common.hpp" #include "opencv2/core/cuda/emulation.hpp" diff --git a/modules/cuda/test/test_calib3d.cpp b/modules/cuda/test/test_calib3d.cpp index 12aaf6560..7208b10ba 100644 --- a/modules/cuda/test/test_calib3d.cpp +++ b/modules/cuda/test/test_calib3d.cpp @@ -61,7 +61,7 @@ struct TransformPoints : testing::TestWithParam } }; -GPU_TEST_P(TransformPoints, Accuracy) +CUDA_TEST_P(TransformPoints, Accuracy) { cv::Mat src = randomMat(cv::Size(1000, 1), CV_32FC3, 0, 10); cv::Mat rvec = randomMat(cv::Size(3, 1), CV_32F, 0, 1); @@ -92,7 +92,7 @@ GPU_TEST_P(TransformPoints, Accuracy) } } -INSTANTIATE_TEST_CASE_P(GPU_Calib3D, TransformPoints, ALL_DEVICES); +INSTANTIATE_TEST_CASE_P(CUDA_Calib3D, TransformPoints, ALL_DEVICES); /////////////////////////////////////////////////////////////////////////////////////////////////////// // ProjectPoints @@ -109,7 +109,7 @@ struct ProjectPoints : testing::TestWithParam } }; -GPU_TEST_P(ProjectPoints, Accuracy) +CUDA_TEST_P(ProjectPoints, Accuracy) { cv::Mat src = randomMat(cv::Size(1000, 1), CV_32FC3, 0, 10); cv::Mat rvec = randomMat(cv::Size(3, 1), CV_32F, 0, 1); @@ -142,7 +142,7 @@ GPU_TEST_P(ProjectPoints, Accuracy) } } -INSTANTIATE_TEST_CASE_P(GPU_Calib3D, ProjectPoints, ALL_DEVICES); +INSTANTIATE_TEST_CASE_P(CUDA_Calib3D, ProjectPoints, ALL_DEVICES); /////////////////////////////////////////////////////////////////////////////////////////////////////// // SolvePnPRansac @@ -159,7 +159,7 @@ struct SolvePnPRansac : testing::TestWithParam } }; -GPU_TEST_P(SolvePnPRansac, Accuracy) +CUDA_TEST_P(SolvePnPRansac, Accuracy) { cv::Mat object = randomMat(cv::Size(5000, 1), CV_32FC3, 0, 100); cv::Mat camera_mat = randomMat(cv::Size(3, 3), CV_32F, 0.5, 1); @@ -185,6 +185,6 @@ GPU_TEST_P(SolvePnPRansac, Accuracy) ASSERT_LE(cv::norm(tvec - tvec_gold), 1e-3); } -INSTANTIATE_TEST_CASE_P(GPU_Calib3D, SolvePnPRansac, ALL_DEVICES); +INSTANTIATE_TEST_CASE_P(CUDA_Calib3D, SolvePnPRansac, ALL_DEVICES); #endif // HAVE_CUDA diff --git a/modules/cuda/test/test_global_motion.cpp b/modules/cuda/test/test_global_motion.cpp index 4f6c8daa3..633fe647c 100644 --- a/modules/cuda/test/test_global_motion.cpp +++ b/modules/cuda/test/test_global_motion.cpp @@ -52,7 +52,7 @@ struct CompactPoints : testing::TestWithParam virtual void SetUp() { cuda::setDevice(GetParam().deviceID()); } }; -GPU_TEST_P(CompactPoints, CanCompactizeSmallInput) +CUDA_TEST_P(CompactPoints, CanCompactizeSmallInput) { Mat src0(1, 3, CV_32FC2); src0.at(0,0) = Point2f(0,0); @@ -85,6 +85,6 @@ GPU_TEST_P(CompactPoints, CanCompactizeSmallInput) ASSERT_TRUE(src1.at(0,1) == Point2f(1,2)); } -INSTANTIATE_TEST_CASE_P(GPU_GlobalMotion, CompactPoints, ALL_DEVICES); +INSTANTIATE_TEST_CASE_P(CUDA_GlobalMotion, CompactPoints, ALL_DEVICES); #endif // HAVE_CUDA diff --git a/modules/cuda/test/test_gpumat.cpp b/modules/cuda/test/test_gpumat.cpp index 3b227c447..9a1325951 100644 --- a/modules/cuda/test/test_gpumat.cpp +++ b/modules/cuda/test/test_gpumat.cpp @@ -67,7 +67,7 @@ PARAM_TEST_CASE(SetTo, cv::cuda::DeviceInfo, cv::Size, MatType, UseRoi) } }; -GPU_TEST_P(SetTo, Zero) +CUDA_TEST_P(SetTo, Zero) { cv::Scalar zero = cv::Scalar::all(0); @@ -77,7 +77,7 @@ GPU_TEST_P(SetTo, Zero) EXPECT_MAT_NEAR(cv::Mat::zeros(size, type), mat, 0.0); } -GPU_TEST_P(SetTo, SameVal) +CUDA_TEST_P(SetTo, SameVal) { cv::Scalar val = cv::Scalar::all(randomDouble(0.0, 255.0)); @@ -102,7 +102,7 @@ GPU_TEST_P(SetTo, SameVal) } } -GPU_TEST_P(SetTo, DifferentVal) +CUDA_TEST_P(SetTo, DifferentVal) { cv::Scalar val = randomScalar(0.0, 255.0); @@ -127,7 +127,7 @@ GPU_TEST_P(SetTo, DifferentVal) } } -GPU_TEST_P(SetTo, Masked) +CUDA_TEST_P(SetTo, Masked) { cv::Scalar val = randomScalar(0.0, 255.0); cv::Mat mat_gold = randomMat(size, type); @@ -156,7 +156,7 @@ GPU_TEST_P(SetTo, Masked) } } -INSTANTIATE_TEST_CASE_P(GPU_GpuMat, SetTo, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_GpuMat, SetTo, testing::Combine( ALL_DEVICES, DIFFERENT_SIZES, ALL_TYPES, @@ -184,7 +184,7 @@ PARAM_TEST_CASE(CopyTo, cv::cuda::DeviceInfo, cv::Size, MatType, UseRoi) } }; -GPU_TEST_P(CopyTo, WithOutMask) +CUDA_TEST_P(CopyTo, WithOutMask) { cv::Mat src = randomMat(size, type); @@ -195,7 +195,7 @@ GPU_TEST_P(CopyTo, WithOutMask) EXPECT_MAT_NEAR(src, dst, 0.0); } -GPU_TEST_P(CopyTo, Masked) +CUDA_TEST_P(CopyTo, Masked) { cv::Mat src = randomMat(size, type); cv::Mat mask = randomMat(size, CV_8UC1, 0.0, 2.0); @@ -226,7 +226,7 @@ GPU_TEST_P(CopyTo, Masked) } } -INSTANTIATE_TEST_CASE_P(GPU_GpuMat, CopyTo, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_GpuMat, CopyTo, testing::Combine( ALL_DEVICES, DIFFERENT_SIZES, ALL_TYPES, @@ -255,7 +255,7 @@ PARAM_TEST_CASE(ConvertTo, cv::cuda::DeviceInfo, cv::Size, MatDepth, MatDepth, U } }; -GPU_TEST_P(ConvertTo, WithOutScaling) +CUDA_TEST_P(ConvertTo, WithOutScaling) { cv::Mat src = randomMat(size, depth1); @@ -285,7 +285,7 @@ GPU_TEST_P(ConvertTo, WithOutScaling) } } -GPU_TEST_P(ConvertTo, WithScaling) +CUDA_TEST_P(ConvertTo, WithScaling) { cv::Mat src = randomMat(size, depth1); double a = randomDouble(0.0, 1.0); @@ -317,7 +317,7 @@ GPU_TEST_P(ConvertTo, WithScaling) } } -INSTANTIATE_TEST_CASE_P(GPU_GpuMat, ConvertTo, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_GpuMat, ConvertTo, testing::Combine( ALL_DEVICES, DIFFERENT_SIZES, ALL_DEPTH, @@ -336,7 +336,7 @@ struct EnsureSizeIsEnough : testing::TestWithParam } }; -GPU_TEST_P(EnsureSizeIsEnough, BufferReuse) +CUDA_TEST_P(EnsureSizeIsEnough, BufferReuse) { cv::cuda::GpuMat buffer(100, 100, CV_8U); cv::cuda::GpuMat old = buffer; @@ -356,6 +356,6 @@ GPU_TEST_P(EnsureSizeIsEnough, BufferReuse) EXPECT_EQ(reinterpret_cast(old.data), reinterpret_cast(buffer.data)); } -INSTANTIATE_TEST_CASE_P(GPU_GpuMat, EnsureSizeIsEnough, ALL_DEVICES); +INSTANTIATE_TEST_CASE_P(CUDA_GpuMat, EnsureSizeIsEnough, ALL_DEVICES); #endif // HAVE_CUDA diff --git a/modules/cuda/test/test_labeling.cpp b/modules/cuda/test/test_labeling.cpp index 9a6b6fd6f..fd6bfd631 100644 --- a/modules/cuda/test/test_labeling.cpp +++ b/modules/cuda/test/test_labeling.cpp @@ -167,7 +167,7 @@ struct Labeling : testing::TestWithParam } }; -GPU_TEST_P(Labeling, DISABLED_ConnectedComponents) +CUDA_TEST_P(Labeling, DISABLED_ConnectedComponents) { cv::Mat image; cvtColor(loat_image(), image, cv::COLOR_BGR2GRAY); @@ -192,6 +192,6 @@ GPU_TEST_P(Labeling, DISABLED_ConnectedComponents) host.checkCorrectness(cv::Mat(components)); } -INSTANTIATE_TEST_CASE_P(GPU_ConnectedComponents, Labeling, ALL_DEVICES); +INSTANTIATE_TEST_CASE_P(CUDA_ConnectedComponents, Labeling, ALL_DEVICES); #endif // HAVE_CUDA diff --git a/modules/cuda/test/test_main.cpp b/modules/cuda/test/test_main.cpp index eea3d7c00..04f4fcf6e 100644 --- a/modules/cuda/test/test_main.cpp +++ b/modules/cuda/test/test_main.cpp @@ -42,4 +42,4 @@ #include "test_precomp.hpp" -CV_GPU_TEST_MAIN("gpu") +CV_CUDA_TEST_MAIN("gpu") diff --git a/modules/cuda/test/test_objdetect.cpp b/modules/cuda/test/test_objdetect.cpp index 02b04d2f5..658508f39 100644 --- a/modules/cuda/test/test_objdetect.cpp +++ b/modules/cuda/test/test_objdetect.cpp @@ -177,7 +177,7 @@ struct HOG : testing::TestWithParam, cv::cuda::HOGDescript }; // desabled while resize does not fixed -GPU_TEST_P(HOG, Detect) +CUDA_TEST_P(HOG, Detect) { cv::Mat img_rgb = readImage("hog/road.png"); ASSERT_FALSE(img_rgb.empty()); @@ -202,7 +202,7 @@ GPU_TEST_P(HOG, Detect) f.close(); } -GPU_TEST_P(HOG, GetDescriptors) +CUDA_TEST_P(HOG, GetDescriptors) { // Load image (e.g. train data, composed from windows) cv::Mat img_rgb = readImage("hog/train_data.png"); @@ -286,7 +286,7 @@ GPU_TEST_P(HOG, GetDescriptors) compare_inner_parts(cv::Mat(block_hists), cv::Mat(descriptors.rowRange(5, 6))); } -INSTANTIATE_TEST_CASE_P(GPU_ObjDetect, HOG, ALL_DEVICES); +INSTANTIATE_TEST_CASE_P(CUDA_ObjDetect, HOG, ALL_DEVICES); //============== caltech hog tests =====================// @@ -305,7 +305,7 @@ struct CalTech : public ::testing::TestWithParamget_data_path()) + "lbpcascade/lbpcascade_frontalface.xml"; ASSERT_TRUE(classifier.load(classifierXmlPath)); } -INSTANTIATE_TEST_CASE_P(GPU_ObjDetect, LBP_Read_classifier, +INSTANTIATE_TEST_CASE_P(CUDA_ObjDetect, LBP_Read_classifier, testing::Combine(ALL_DEVICES, testing::Values(0))); @@ -374,7 +374,7 @@ PARAM_TEST_CASE(LBP_classify, cv::cuda::DeviceInfo, int) } }; -GPU_TEST_P(LBP_classify, Accuracy) +CUDA_TEST_P(LBP_classify, Accuracy) { std::string classifierXmlPath = std::string(cvtest::TS::ptr()->get_data_path()) + "lbpcascade/lbpcascade_frontalface.xml"; std::string imagePath = std::string(cvtest::TS::ptr()->get_data_path()) + "lbpcascade/er.png"; @@ -396,7 +396,7 @@ GPU_TEST_P(LBP_classify, Accuracy) for (; it != rects.end(); ++it) cv::rectangle(markedImage, *it, cv::Scalar(255, 0, 0)); - cv::cuda::CascadeClassifier_GPU gpuClassifier; + cv::cuda::CascadeClassifier_CUDA gpuClassifier; ASSERT_TRUE(gpuClassifier.load(classifierXmlPath)); cv::cuda::GpuMat gpu_rects; @@ -421,7 +421,7 @@ GPU_TEST_P(LBP_classify, Accuracy) (void)count; } -INSTANTIATE_TEST_CASE_P(GPU_ObjDetect, LBP_classify, +INSTANTIATE_TEST_CASE_P(CUDA_ObjDetect, LBP_classify, testing::Combine(ALL_DEVICES, testing::Values(0))); #endif // HAVE_CUDA diff --git a/modules/cuda/test/test_opengl.cpp b/modules/cuda/test/test_opengl.cpp index e0956e28a..0b4812c20 100644 --- a/modules/cuda/test/test_opengl.cpp +++ b/modules/cuda/test/test_opengl.cpp @@ -71,7 +71,7 @@ PARAM_TEST_CASE(Buffer, cv::Size, MatType) } }; -GPU_TEST_P(Buffer, Constructor1) +CUDA_TEST_P(Buffer, Constructor1) { cv::ogl::Buffer buf(size.height, size.width, type, cv::ogl::Buffer::ARRAY_BUFFER, true); @@ -80,7 +80,7 @@ GPU_TEST_P(Buffer, Constructor1) EXPECT_EQ(type, buf.type()); } -GPU_TEST_P(Buffer, Constructor2) +CUDA_TEST_P(Buffer, Constructor2) { cv::ogl::Buffer buf(size, type, cv::ogl::Buffer::ARRAY_BUFFER, true); @@ -89,7 +89,7 @@ GPU_TEST_P(Buffer, Constructor2) EXPECT_EQ(type, buf.type()); } -GPU_TEST_P(Buffer, ConstructorFromMat) +CUDA_TEST_P(Buffer, ConstructorFromMat) { cv::Mat gold = randomMat(size, type); @@ -101,7 +101,7 @@ GPU_TEST_P(Buffer, ConstructorFromMat) EXPECT_MAT_NEAR(gold, bufData, 0); } -GPU_TEST_P(Buffer, ConstructorFromGpuMat) +CUDA_TEST_P(Buffer, ConstructorFromGpuMat) { cv::Mat gold = randomMat(size, type); cv::cuda::GpuMat d_gold(gold); @@ -114,7 +114,7 @@ GPU_TEST_P(Buffer, ConstructorFromGpuMat) EXPECT_MAT_NEAR(gold, bufData, 0); } -GPU_TEST_P(Buffer, ConstructorFromBuffer) +CUDA_TEST_P(Buffer, ConstructorFromBuffer) { cv::ogl::Buffer buf_gold(size, type, cv::ogl::Buffer::ARRAY_BUFFER, true); @@ -126,7 +126,7 @@ GPU_TEST_P(Buffer, ConstructorFromBuffer) EXPECT_EQ(buf_gold.type(), buf.type()); } -GPU_TEST_P(Buffer, Create) +CUDA_TEST_P(Buffer, Create) { cv::ogl::Buffer buf; buf.create(size.height, size.width, type, cv::ogl::Buffer::ARRAY_BUFFER, true); @@ -136,7 +136,7 @@ GPU_TEST_P(Buffer, Create) EXPECT_EQ(type, buf.type()); } -GPU_TEST_P(Buffer, CopyFromMat) +CUDA_TEST_P(Buffer, CopyFromMat) { cv::Mat gold = randomMat(size, type); @@ -149,7 +149,7 @@ GPU_TEST_P(Buffer, CopyFromMat) EXPECT_MAT_NEAR(gold, bufData, 0); } -GPU_TEST_P(Buffer, CopyFromGpuMat) +CUDA_TEST_P(Buffer, CopyFromGpuMat) { cv::Mat gold = randomMat(size, type); cv::cuda::GpuMat d_gold(gold); @@ -163,7 +163,7 @@ GPU_TEST_P(Buffer, CopyFromGpuMat) EXPECT_MAT_NEAR(gold, bufData, 0); } -GPU_TEST_P(Buffer, CopyFromBuffer) +CUDA_TEST_P(Buffer, CopyFromBuffer) { cv::Mat gold = randomMat(size, type); cv::ogl::Buffer buf_gold(gold, cv::ogl::Buffer::ARRAY_BUFFER, true); @@ -179,7 +179,7 @@ GPU_TEST_P(Buffer, CopyFromBuffer) EXPECT_MAT_NEAR(gold, bufData, 0); } -GPU_TEST_P(Buffer, CopyToGpuMat) +CUDA_TEST_P(Buffer, CopyToGpuMat) { cv::Mat gold = randomMat(size, type); @@ -191,7 +191,7 @@ GPU_TEST_P(Buffer, CopyToGpuMat) EXPECT_MAT_NEAR(gold, dst, 0); } -GPU_TEST_P(Buffer, CopyToBuffer) +CUDA_TEST_P(Buffer, CopyToBuffer) { cv::Mat gold = randomMat(size, type); @@ -209,7 +209,7 @@ GPU_TEST_P(Buffer, CopyToBuffer) EXPECT_MAT_NEAR(gold, bufData, 0); } -GPU_TEST_P(Buffer, Clone) +CUDA_TEST_P(Buffer, Clone) { cv::Mat gold = randomMat(size, type); @@ -225,7 +225,7 @@ GPU_TEST_P(Buffer, Clone) EXPECT_MAT_NEAR(gold, bufData, 0); } -GPU_TEST_P(Buffer, MapHostRead) +CUDA_TEST_P(Buffer, MapHostRead) { cv::Mat gold = randomMat(size, type); @@ -238,7 +238,7 @@ GPU_TEST_P(Buffer, MapHostRead) buf.unmapHost(); } -GPU_TEST_P(Buffer, MapHostWrite) +CUDA_TEST_P(Buffer, MapHostWrite) { cv::Mat gold = randomMat(size, type); @@ -255,7 +255,7 @@ GPU_TEST_P(Buffer, MapHostWrite) EXPECT_MAT_NEAR(gold, bufData, 0); } -GPU_TEST_P(Buffer, MapDevice) +CUDA_TEST_P(Buffer, MapDevice) { cv::Mat gold = randomMat(size, type); @@ -302,7 +302,7 @@ PARAM_TEST_CASE(Texture2D, cv::Size, MatType) } }; -GPU_TEST_P(Texture2D, Constructor1) +CUDA_TEST_P(Texture2D, Constructor1) { cv::ogl::Texture2D tex(size.height, size.width, format, true); @@ -311,7 +311,7 @@ GPU_TEST_P(Texture2D, Constructor1) EXPECT_EQ(format, tex.format()); } -GPU_TEST_P(Texture2D, Constructor2) +CUDA_TEST_P(Texture2D, Constructor2) { cv::ogl::Texture2D tex(size, format, true); @@ -320,7 +320,7 @@ GPU_TEST_P(Texture2D, Constructor2) EXPECT_EQ(format, tex.format()); } -GPU_TEST_P(Texture2D, ConstructorFromMat) +CUDA_TEST_P(Texture2D, ConstructorFromMat) { cv::Mat gold = randomMat(size, type, 0, depth == CV_8U ? 255 : 1); @@ -332,7 +332,7 @@ GPU_TEST_P(Texture2D, ConstructorFromMat) EXPECT_MAT_NEAR(gold, texData, 1e-2); } -GPU_TEST_P(Texture2D, ConstructorFromGpuMat) +CUDA_TEST_P(Texture2D, ConstructorFromGpuMat) { cv::Mat gold = randomMat(size, type, 0, depth == CV_8U ? 255 : 1); cv::cuda::GpuMat d_gold(gold); @@ -345,7 +345,7 @@ GPU_TEST_P(Texture2D, ConstructorFromGpuMat) EXPECT_MAT_NEAR(gold, texData, 1e-2); } -GPU_TEST_P(Texture2D, ConstructorFromBuffer) +CUDA_TEST_P(Texture2D, ConstructorFromBuffer) { cv::Mat gold = randomMat(size, type, 0, depth == CV_8U ? 255 : 1); cv::ogl::Buffer buf_gold(gold, cv::ogl::Buffer::PIXEL_UNPACK_BUFFER, true); @@ -358,7 +358,7 @@ GPU_TEST_P(Texture2D, ConstructorFromBuffer) EXPECT_MAT_NEAR(gold, texData, 1e-2); } -GPU_TEST_P(Texture2D, ConstructorFromTexture2D) +CUDA_TEST_P(Texture2D, ConstructorFromTexture2D) { cv::ogl::Texture2D tex_gold(size, format, true); cv::ogl::Texture2D tex(tex_gold); @@ -369,7 +369,7 @@ GPU_TEST_P(Texture2D, ConstructorFromTexture2D) EXPECT_EQ(tex_gold.format(), tex.format()); } -GPU_TEST_P(Texture2D, Create) +CUDA_TEST_P(Texture2D, Create) { cv::ogl::Texture2D tex; tex.create(size.height, size.width, format, true); @@ -379,7 +379,7 @@ GPU_TEST_P(Texture2D, Create) EXPECT_EQ(format, tex.format()); } -GPU_TEST_P(Texture2D, CopyFromMat) +CUDA_TEST_P(Texture2D, CopyFromMat) { cv::Mat gold = randomMat(size, type, 0, depth == CV_8U ? 255 : 1); @@ -392,7 +392,7 @@ GPU_TEST_P(Texture2D, CopyFromMat) EXPECT_MAT_NEAR(gold, texData, 1e-2); } -GPU_TEST_P(Texture2D, CopyFromGpuMat) +CUDA_TEST_P(Texture2D, CopyFromGpuMat) { cv::Mat gold = randomMat(size, type, 0, depth == CV_8U ? 255 : 1); cv::cuda::GpuMat d_gold(gold); @@ -406,7 +406,7 @@ GPU_TEST_P(Texture2D, CopyFromGpuMat) EXPECT_MAT_NEAR(gold, texData, 1e-2); } -GPU_TEST_P(Texture2D, CopyFromBuffer) +CUDA_TEST_P(Texture2D, CopyFromBuffer) { cv::Mat gold = randomMat(size, type, 0, depth == CV_8U ? 255 : 1); cv::ogl::Buffer buf_gold(gold, cv::ogl::Buffer::PIXEL_UNPACK_BUFFER, true); @@ -420,7 +420,7 @@ GPU_TEST_P(Texture2D, CopyFromBuffer) EXPECT_MAT_NEAR(gold, texData, 1e-2); } -GPU_TEST_P(Texture2D, CopyToGpuMat) +CUDA_TEST_P(Texture2D, CopyToGpuMat) { cv::Mat gold = randomMat(size, type, 0, depth == CV_8U ? 255 : 1); @@ -432,7 +432,7 @@ GPU_TEST_P(Texture2D, CopyToGpuMat) EXPECT_MAT_NEAR(gold, dst, 1e-2); } -GPU_TEST_P(Texture2D, CopyToBuffer) +CUDA_TEST_P(Texture2D, CopyToBuffer) { cv::Mat gold = randomMat(size, type, 0, depth == CV_8U ? 255 : 1); diff --git a/modules/cuda/test/test_stream.cpp b/modules/cuda/test/test_stream.cpp index ae8282f0e..cdeca71ab 100644 --- a/modules/cuda/test/test_stream.cpp +++ b/modules/cuda/test/test_stream.cpp @@ -84,7 +84,7 @@ void checkMemSet(int status, void* userData) ASSERT_MAT_NEAR(dst_gold, dst, 0); } -GPU_TEST_P(Async, MemSet) +CUDA_TEST_P(Async, MemSet) { cv::cuda::Stream stream; @@ -114,7 +114,7 @@ void checkConvert(int status, void* userData) ASSERT_MAT_NEAR(dst_gold, dst, 0); } -GPU_TEST_P(Async, Convert) +CUDA_TEST_P(Async, Convert) { cv::cuda::Stream stream; @@ -128,7 +128,7 @@ GPU_TEST_P(Async, Convert) stream.waitForCompletion(); } -INSTANTIATE_TEST_CASE_P(GPU_Stream, Async, ALL_DEVICES); +INSTANTIATE_TEST_CASE_P(CUDA_Stream, Async, ALL_DEVICES); #endif // CUDART_VERSION >= 5000 diff --git a/modules/cudaarithm/perf/perf_arithm.cpp b/modules/cudaarithm/perf/perf_arithm.cpp index 16917d017..d0f3e6617 100644 --- a/modules/cudaarithm/perf/perf_arithm.cpp +++ b/modules/cudaarithm/perf/perf_arithm.cpp @@ -73,7 +73,7 @@ PERF_TEST_P(Sz_Type_Flags, GEMM, cv::Mat src3(size, type); declare.in(src3, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { declare.time(5.0); @@ -84,7 +84,7 @@ PERF_TEST_P(Sz_Type_Flags, GEMM, TEST_CYCLE() cv::cuda::gemm(d_src1, d_src2, 1.0, d_src3, 1.0, dst, flags); - GPU_SANITY_CHECK(dst, 1e-6, ERROR_RELATIVE); + CUDA_SANITY_CHECK(dst, 1e-6, ERROR_RELATIVE); } else { @@ -106,7 +106,7 @@ CV_FLAGS(DftFlags, 0, cv::DFT_INVERSE, cv::DFT_SCALE, cv::DFT_ROWS, cv::DFT_COMP DEF_PARAM_TEST(Sz_Flags, cv::Size, DftFlags); PERF_TEST_P(Sz_Flags, MulSpectrums, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(0, DftFlags(cv::DFT_ROWS)))) { const cv::Size size = GET_PARAM(0); @@ -116,7 +116,7 @@ PERF_TEST_P(Sz_Flags, MulSpectrums, cv::Mat b(size, CV_32FC2); declare.in(a, b, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_a(a); const cv::cuda::GpuMat d_b(b); @@ -124,7 +124,7 @@ PERF_TEST_P(Sz_Flags, MulSpectrums, TEST_CYCLE() cv::cuda::mulSpectrums(d_a, d_b, dst, flag); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -140,7 +140,7 @@ PERF_TEST_P(Sz_Flags, MulSpectrums, // MulAndScaleSpectrums PERF_TEST_P(Sz, MulAndScaleSpectrums, - GPU_TYPICAL_MAT_SIZES) + CUDA_TYPICAL_MAT_SIZES) { const cv::Size size = GetParam(); @@ -150,7 +150,7 @@ PERF_TEST_P(Sz, MulAndScaleSpectrums, cv::Mat src2(size, CV_32FC2); declare.in(src1,src2, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src1(src1); const cv::cuda::GpuMat d_src2(src2); @@ -158,7 +158,7 @@ PERF_TEST_P(Sz, MulAndScaleSpectrums, TEST_CYCLE() cv::cuda::mulAndScaleSpectrums(d_src1, d_src2, dst, cv::DFT_ROWS, scale, false); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -170,7 +170,7 @@ PERF_TEST_P(Sz, MulAndScaleSpectrums, // Dft PERF_TEST_P(Sz_Flags, Dft, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(0, DftFlags(cv::DFT_ROWS), DftFlags(cv::DFT_INVERSE)))) { declare.time(10.0); @@ -181,14 +181,14 @@ PERF_TEST_P(Sz_Flags, Dft, cv::Mat src(size, CV_32FC2); declare.in(src, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::dft(d_src, dst, size, flag); - GPU_SANITY_CHECK(dst, 1e-6, ERROR_RELATIVE); + CUDA_SANITY_CHECK(dst, 1e-6, ERROR_RELATIVE); } else { @@ -206,7 +206,7 @@ PERF_TEST_P(Sz_Flags, Dft, DEF_PARAM_TEST(Sz_KernelSz_Ccorr, cv::Size, int, bool); PERF_TEST_P(Sz_KernelSz_Ccorr, Convolve, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(17, 27, 32, 64), Bool())) { @@ -220,7 +220,7 @@ PERF_TEST_P(Sz_KernelSz_Ccorr, Convolve, const cv::Mat templ(templ_size, templ_size, CV_32FC1); declare.in(image, templ, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { cv::cuda::GpuMat d_image = cv::cuda::createContinuous(size, CV_32FC1); d_image.upload(image); @@ -234,7 +234,7 @@ PERF_TEST_P(Sz_KernelSz_Ccorr, Convolve, TEST_CYCLE() convolution->convolve(d_image, d_templ, dst, ccorr); - GPU_SANITY_CHECK(dst, 1e-6, ERROR_RELATIVE); + CUDA_SANITY_CHECK(dst, 1e-6, ERROR_RELATIVE); } else { @@ -253,14 +253,14 @@ PERF_TEST_P(Sz_KernelSz_Ccorr, Convolve, // Integral PERF_TEST_P(Sz, Integral, - GPU_TYPICAL_MAT_SIZES) + CUDA_TYPICAL_MAT_SIZES) { const cv::Size size = GetParam(); cv::Mat src(size, CV_8UC1); declare.in(src, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; @@ -268,7 +268,7 @@ PERF_TEST_P(Sz, Integral, TEST_CYCLE() cv::cuda::integral(d_src, dst, d_buf); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -284,21 +284,21 @@ PERF_TEST_P(Sz, Integral, // IntegralSqr PERF_TEST_P(Sz, IntegralSqr, - GPU_TYPICAL_MAT_SIZES) + CUDA_TYPICAL_MAT_SIZES) { const cv::Size size = GetParam(); cv::Mat src(size, CV_8UC1); declare.in(src, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst, buf; TEST_CYCLE() cv::cuda::sqrIntegral(d_src, dst, buf); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { diff --git a/modules/cudaarithm/perf/perf_core.cpp b/modules/cudaarithm/perf/perf_core.cpp index 12d8ff20c..dde985c27 100644 --- a/modules/cudaarithm/perf/perf_core.cpp +++ b/modules/cudaarithm/perf/perf_core.cpp @@ -52,7 +52,7 @@ using namespace perf; // Merge PERF_TEST_P(Sz_Depth_Cn, Merge, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, ARITHM_MAT_DEPTH, Values(2, 3, 4))) { @@ -67,7 +67,7 @@ PERF_TEST_P(Sz_Depth_Cn, Merge, declare.in(src[i], WARMUP_RNG); } - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { std::vector d_src(channels); for (int i = 0; i < channels; ++i) @@ -77,7 +77,7 @@ PERF_TEST_P(Sz_Depth_Cn, Merge, TEST_CYCLE() cv::cuda::merge(d_src, dst); - GPU_SANITY_CHECK(dst, 1e-10); + CUDA_SANITY_CHECK(dst, 1e-10); } else { @@ -93,7 +93,7 @@ PERF_TEST_P(Sz_Depth_Cn, Merge, // Split PERF_TEST_P(Sz_Depth_Cn, Split, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, ARITHM_MAT_DEPTH, Values(2, 3, 4))) { @@ -104,7 +104,7 @@ PERF_TEST_P(Sz_Depth_Cn, Split, cv::Mat src(size, CV_MAKE_TYPE(depth, channels)); declare.in(src, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); std::vector dst; @@ -114,8 +114,8 @@ PERF_TEST_P(Sz_Depth_Cn, Split, const cv::cuda::GpuMat& dst0 = dst[0]; const cv::cuda::GpuMat& dst1 = dst[1]; - GPU_SANITY_CHECK(dst0, 1e-10); - GPU_SANITY_CHECK(dst1, 1e-10); + CUDA_SANITY_CHECK(dst0, 1e-10); + CUDA_SANITY_CHECK(dst1, 1e-10); } else { @@ -135,7 +135,7 @@ PERF_TEST_P(Sz_Depth_Cn, Split, // Transpose PERF_TEST_P(Sz_Type, Transpose, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8UC1, CV_8UC4, CV_16UC2, CV_16SC2, CV_32SC1, CV_32SC2, CV_64FC1))) { const cv::Size size = GET_PARAM(0); @@ -144,14 +144,14 @@ PERF_TEST_P(Sz_Type, Transpose, cv::Mat src(size, type); declare.in(src, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::transpose(d_src, dst); - GPU_SANITY_CHECK(dst, 1e-10); + CUDA_SANITY_CHECK(dst, 1e-10); } else { @@ -172,9 +172,9 @@ CV_ENUM(FlipCode, FLIP_BOTH, FLIP_X, FLIP_Y) DEF_PARAM_TEST(Sz_Depth_Cn_Code, cv::Size, MatDepth, MatCn, FlipCode); PERF_TEST_P(Sz_Depth_Cn_Code, Flip, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16U, CV_32F), - GPU_CHANNELS_1_3_4, + CUDA_CHANNELS_1_3_4, FlipCode::all())) { const cv::Size size = GET_PARAM(0); @@ -187,14 +187,14 @@ PERF_TEST_P(Sz_Depth_Cn_Code, Flip, cv::Mat src(size, type); declare.in(src, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::flip(d_src, dst, flipCode); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -210,7 +210,7 @@ PERF_TEST_P(Sz_Depth_Cn_Code, Flip, // LutOneChannel PERF_TEST_P(Sz_Type, LutOneChannel, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8UC1, CV_8UC3))) { const cv::Size size = GET_PARAM(0); @@ -222,7 +222,7 @@ PERF_TEST_P(Sz_Type, LutOneChannel, cv::Mat lut(1, 256, CV_8UC1); declare.in(lut, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { cv::Ptr lutAlg = cv::cuda::createLookUpTable(lut); @@ -231,7 +231,7 @@ PERF_TEST_P(Sz_Type, LutOneChannel, TEST_CYCLE() lutAlg->transform(d_src, dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -247,7 +247,7 @@ PERF_TEST_P(Sz_Type, LutOneChannel, // LutMultiChannel PERF_TEST_P(Sz_Type, LutMultiChannel, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8UC3))) { const cv::Size size = GET_PARAM(0); @@ -259,7 +259,7 @@ PERF_TEST_P(Sz_Type, LutMultiChannel, cv::Mat lut(1, 256, CV_MAKE_TYPE(CV_8U, src.channels())); declare.in(lut, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { cv::Ptr lutAlg = cv::cuda::createLookUpTable(lut); @@ -268,7 +268,7 @@ PERF_TEST_P(Sz_Type, LutMultiChannel, TEST_CYCLE() lutAlg->transform(d_src, dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -286,9 +286,9 @@ PERF_TEST_P(Sz_Type, LutMultiChannel, DEF_PARAM_TEST(Sz_Depth_Cn_Border, cv::Size, MatDepth, MatCn, BorderMode); PERF_TEST_P(Sz_Depth_Cn_Border, CopyMakeBorder, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16U, CV_32F), - GPU_CHANNELS_1_3_4, + CUDA_CHANNELS_1_3_4, ALL_BORDER_MODES)) { const cv::Size size = GET_PARAM(0); @@ -301,14 +301,14 @@ PERF_TEST_P(Sz_Depth_Cn_Border, CopyMakeBorder, cv::Mat src(size, type); declare.in(src, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::copyMakeBorder(d_src, dst, 5, 5, 5, 5, borderMode); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { diff --git a/modules/cudaarithm/perf/perf_element_operations.cpp b/modules/cudaarithm/perf/perf_element_operations.cpp index bc2f24eb8..ca33950ba 100644 --- a/modules/cudaarithm/perf/perf_element_operations.cpp +++ b/modules/cudaarithm/perf/perf_element_operations.cpp @@ -52,7 +52,7 @@ using namespace perf; // AddMat PERF_TEST_P(Sz_Depth, AddMat, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, ARITHM_MAT_DEPTH)) { const cv::Size size = GET_PARAM(0); @@ -64,7 +64,7 @@ PERF_TEST_P(Sz_Depth, AddMat, cv::Mat src2(size, depth); declare.in(src2, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src1(src1); const cv::cuda::GpuMat d_src2(src2); @@ -72,7 +72,7 @@ PERF_TEST_P(Sz_Depth, AddMat, TEST_CYCLE() cv::cuda::add(d_src1, d_src2, dst); - GPU_SANITY_CHECK(dst, 1e-10); + CUDA_SANITY_CHECK(dst, 1e-10); } else { @@ -88,7 +88,7 @@ PERF_TEST_P(Sz_Depth, AddMat, // AddScalar PERF_TEST_P(Sz_Depth, AddScalar, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, ARITHM_MAT_DEPTH)) { const cv::Size size = GET_PARAM(0); @@ -100,14 +100,14 @@ PERF_TEST_P(Sz_Depth, AddScalar, cv::Scalar s; declare.in(s, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::add(d_src, s, dst); - GPU_SANITY_CHECK(dst, 1e-10); + CUDA_SANITY_CHECK(dst, 1e-10); } else { @@ -123,7 +123,7 @@ PERF_TEST_P(Sz_Depth, AddScalar, // SubtractMat PERF_TEST_P(Sz_Depth, SubtractMat, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, ARITHM_MAT_DEPTH)) { const cv::Size size = GET_PARAM(0); @@ -135,7 +135,7 @@ PERF_TEST_P(Sz_Depth, SubtractMat, cv::Mat src2(size, depth); declare.in(src2, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src1(src1); const cv::cuda::GpuMat d_src2(src2); @@ -143,7 +143,7 @@ PERF_TEST_P(Sz_Depth, SubtractMat, TEST_CYCLE() cv::cuda::subtract(d_src1, d_src2, dst); - GPU_SANITY_CHECK(dst, 1e-10); + CUDA_SANITY_CHECK(dst, 1e-10); } else { @@ -159,7 +159,7 @@ PERF_TEST_P(Sz_Depth, SubtractMat, // SubtractScalar PERF_TEST_P(Sz_Depth, SubtractScalar, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, ARITHM_MAT_DEPTH)) { const cv::Size size = GET_PARAM(0); @@ -171,14 +171,14 @@ PERF_TEST_P(Sz_Depth, SubtractScalar, cv::Scalar s; declare.in(s, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::subtract(d_src, s, dst); - GPU_SANITY_CHECK(dst, 1e-10); + CUDA_SANITY_CHECK(dst, 1e-10); } else { @@ -194,7 +194,7 @@ PERF_TEST_P(Sz_Depth, SubtractScalar, // MultiplyMat PERF_TEST_P(Sz_Depth, MultiplyMat, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, ARITHM_MAT_DEPTH)) { const cv::Size size = GET_PARAM(0); @@ -206,7 +206,7 @@ PERF_TEST_P(Sz_Depth, MultiplyMat, cv::Mat src2(size, depth); declare.in(src2, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src1(src1); const cv::cuda::GpuMat d_src2(src2); @@ -214,7 +214,7 @@ PERF_TEST_P(Sz_Depth, MultiplyMat, TEST_CYCLE() cv::cuda::multiply(d_src1, d_src2, dst); - GPU_SANITY_CHECK(dst, 1e-6); + CUDA_SANITY_CHECK(dst, 1e-6); } else { @@ -230,7 +230,7 @@ PERF_TEST_P(Sz_Depth, MultiplyMat, // MultiplyScalar PERF_TEST_P(Sz_Depth, MultiplyScalar, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, ARITHM_MAT_DEPTH)) { const cv::Size size = GET_PARAM(0); @@ -242,14 +242,14 @@ PERF_TEST_P(Sz_Depth, MultiplyScalar, cv::Scalar s; declare.in(s, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::multiply(d_src, s, dst); - GPU_SANITY_CHECK(dst, 1e-6); + CUDA_SANITY_CHECK(dst, 1e-6); } else { @@ -265,7 +265,7 @@ PERF_TEST_P(Sz_Depth, MultiplyScalar, // DivideMat PERF_TEST_P(Sz_Depth, DivideMat, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, ARITHM_MAT_DEPTH)) { const cv::Size size = GET_PARAM(0); @@ -277,7 +277,7 @@ PERF_TEST_P(Sz_Depth, DivideMat, cv::Mat src2(size, depth); declare.in(src2, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src1(src1); const cv::cuda::GpuMat d_src2(src2); @@ -285,7 +285,7 @@ PERF_TEST_P(Sz_Depth, DivideMat, TEST_CYCLE() cv::cuda::divide(d_src1, d_src2, dst); - GPU_SANITY_CHECK(dst, 1e-6); + CUDA_SANITY_CHECK(dst, 1e-6); } else { @@ -301,7 +301,7 @@ PERF_TEST_P(Sz_Depth, DivideMat, // DivideScalar PERF_TEST_P(Sz_Depth, DivideScalar, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, ARITHM_MAT_DEPTH)) { const cv::Size size = GET_PARAM(0); @@ -313,14 +313,14 @@ PERF_TEST_P(Sz_Depth, DivideScalar, cv::Scalar s; declare.in(s, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::divide(d_src, s, dst); - GPU_SANITY_CHECK(dst, 1e-6); + CUDA_SANITY_CHECK(dst, 1e-6); } else { @@ -336,7 +336,7 @@ PERF_TEST_P(Sz_Depth, DivideScalar, // DivideScalarInv PERF_TEST_P(Sz_Depth, DivideScalarInv, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, ARITHM_MAT_DEPTH)) { const cv::Size size = GET_PARAM(0); @@ -348,14 +348,14 @@ PERF_TEST_P(Sz_Depth, DivideScalarInv, cv::Scalar s; declare.in(s, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::divide(s[0], d_src, dst); - GPU_SANITY_CHECK(dst, 1e-6); + CUDA_SANITY_CHECK(dst, 1e-6); } else { @@ -371,7 +371,7 @@ PERF_TEST_P(Sz_Depth, DivideScalarInv, // AbsDiffMat PERF_TEST_P(Sz_Depth, AbsDiffMat, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, ARITHM_MAT_DEPTH)) { const cv::Size size = GET_PARAM(0); @@ -383,7 +383,7 @@ PERF_TEST_P(Sz_Depth, AbsDiffMat, cv::Mat src2(size, depth); declare.in(src2, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src1(src1); const cv::cuda::GpuMat d_src2(src2); @@ -391,7 +391,7 @@ PERF_TEST_P(Sz_Depth, AbsDiffMat, TEST_CYCLE() cv::cuda::absdiff(d_src1, d_src2, dst); - GPU_SANITY_CHECK(dst, 1e-10); + CUDA_SANITY_CHECK(dst, 1e-10); } else { @@ -407,7 +407,7 @@ PERF_TEST_P(Sz_Depth, AbsDiffMat, // AbsDiffScalar PERF_TEST_P(Sz_Depth, AbsDiffScalar, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, ARITHM_MAT_DEPTH)) { const cv::Size size = GET_PARAM(0); @@ -419,14 +419,14 @@ PERF_TEST_P(Sz_Depth, AbsDiffScalar, cv::Scalar s; declare.in(s, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::absdiff(d_src, s, dst); - GPU_SANITY_CHECK(dst, 1e-10); + CUDA_SANITY_CHECK(dst, 1e-10); } else { @@ -442,7 +442,7 @@ PERF_TEST_P(Sz_Depth, AbsDiffScalar, // Abs PERF_TEST_P(Sz_Depth, Abs, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_16S, CV_32F))) { const cv::Size size = GET_PARAM(0); @@ -451,14 +451,14 @@ PERF_TEST_P(Sz_Depth, Abs, cv::Mat src(size, depth); declare.in(src, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::abs(d_src, dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -470,7 +470,7 @@ PERF_TEST_P(Sz_Depth, Abs, // Sqr PERF_TEST_P(Sz_Depth, Sqr, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16S, CV_32F))) { const cv::Size size = GET_PARAM(0); @@ -479,14 +479,14 @@ PERF_TEST_P(Sz_Depth, Sqr, cv::Mat src(size, depth); declare.in(src, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::sqr(d_src, dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -498,7 +498,7 @@ PERF_TEST_P(Sz_Depth, Sqr, // Sqrt PERF_TEST_P(Sz_Depth, Sqrt, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16S, CV_32F))) { const cv::Size size = GET_PARAM(0); @@ -507,14 +507,14 @@ PERF_TEST_P(Sz_Depth, Sqrt, cv::Mat src(size, depth); cv::randu(src, 0, 100000); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::sqrt(d_src, dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -530,7 +530,7 @@ PERF_TEST_P(Sz_Depth, Sqrt, // Log PERF_TEST_P(Sz_Depth, Log, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16S, CV_32F))) { const cv::Size size = GET_PARAM(0); @@ -539,14 +539,14 @@ PERF_TEST_P(Sz_Depth, Log, cv::Mat src(size, depth); cv::randu(src, 0, 100000); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::log(d_src, dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -562,7 +562,7 @@ PERF_TEST_P(Sz_Depth, Log, // Exp PERF_TEST_P(Sz_Depth, Exp, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16S, CV_32F))) { const cv::Size size = GET_PARAM(0); @@ -571,14 +571,14 @@ PERF_TEST_P(Sz_Depth, Exp, cv::Mat src(size, depth); cv::randu(src, 0, 10); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::exp(d_src, dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -596,7 +596,7 @@ PERF_TEST_P(Sz_Depth, Exp, DEF_PARAM_TEST(Sz_Depth_Power, cv::Size, MatDepth, double); PERF_TEST_P(Sz_Depth_Power, Pow, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16S, CV_32F), Values(0.3, 2.0, 2.4))) { @@ -607,14 +607,14 @@ PERF_TEST_P(Sz_Depth_Power, Pow, cv::Mat src(size, depth); declare.in(src, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::pow(d_src, power, dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -634,7 +634,7 @@ CV_ENUM(CmpCode, cv::CMP_EQ, cv::CMP_GT, cv::CMP_GE, cv::CMP_LT, cv::CMP_LE, cv: DEF_PARAM_TEST(Sz_Depth_Code, cv::Size, MatDepth, CmpCode); PERF_TEST_P(Sz_Depth_Code, CompareMat, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, ARITHM_MAT_DEPTH, CmpCode::all())) { @@ -648,7 +648,7 @@ PERF_TEST_P(Sz_Depth_Code, CompareMat, cv::Mat src2(size, depth); declare.in(src2, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src1(src1); const cv::cuda::GpuMat d_src2(src2); @@ -656,7 +656,7 @@ PERF_TEST_P(Sz_Depth_Code, CompareMat, TEST_CYCLE() cv::cuda::compare(d_src1, d_src2, dst, cmp_code); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -672,7 +672,7 @@ PERF_TEST_P(Sz_Depth_Code, CompareMat, // CompareScalar PERF_TEST_P(Sz_Depth_Code, CompareScalar, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, ARITHM_MAT_DEPTH, CmpCode::all())) { @@ -686,14 +686,14 @@ PERF_TEST_P(Sz_Depth_Code, CompareScalar, cv::Scalar s; declare.in(s, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::compare(d_src, s, dst, cmp_code); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -709,7 +709,7 @@ PERF_TEST_P(Sz_Depth_Code, CompareScalar, // BitwiseNot PERF_TEST_P(Sz_Depth, BitwiseNot, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16U, CV_32S))) { const cv::Size size = GET_PARAM(0); @@ -718,14 +718,14 @@ PERF_TEST_P(Sz_Depth, BitwiseNot, cv::Mat src(size, depth); declare.in(src, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::bitwise_not(d_src, dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -741,7 +741,7 @@ PERF_TEST_P(Sz_Depth, BitwiseNot, // BitwiseAndMat PERF_TEST_P(Sz_Depth, BitwiseAndMat, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16U, CV_32S))) { const cv::Size size = GET_PARAM(0); @@ -753,7 +753,7 @@ PERF_TEST_P(Sz_Depth, BitwiseAndMat, cv::Mat src2(size, depth); declare.in(src2, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src1(src1); const cv::cuda::GpuMat d_src2(src2); @@ -761,7 +761,7 @@ PERF_TEST_P(Sz_Depth, BitwiseAndMat, TEST_CYCLE() cv::cuda::bitwise_and(d_src1, d_src2, dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -777,9 +777,9 @@ PERF_TEST_P(Sz_Depth, BitwiseAndMat, // BitwiseAndScalar PERF_TEST_P(Sz_Depth_Cn, BitwiseAndScalar, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16U, CV_32S), - GPU_CHANNELS_1_3_4)) + CUDA_CHANNELS_1_3_4)) { const cv::Size size = GET_PARAM(0); const int depth = GET_PARAM(1); @@ -794,14 +794,14 @@ PERF_TEST_P(Sz_Depth_Cn, BitwiseAndScalar, declare.in(s, WARMUP_RNG); cv::Scalar_ is = s; - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::bitwise_and(d_src, is, dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -817,7 +817,7 @@ PERF_TEST_P(Sz_Depth_Cn, BitwiseAndScalar, // BitwiseOrMat PERF_TEST_P(Sz_Depth, BitwiseOrMat, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16U, CV_32S))) { const cv::Size size = GET_PARAM(0); @@ -829,7 +829,7 @@ PERF_TEST_P(Sz_Depth, BitwiseOrMat, cv::Mat src2(size, depth); declare.in(src2, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src1(src1); const cv::cuda::GpuMat d_src2(src2); @@ -837,7 +837,7 @@ PERF_TEST_P(Sz_Depth, BitwiseOrMat, TEST_CYCLE() cv::cuda::bitwise_or(d_src1, d_src2, dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -853,9 +853,9 @@ PERF_TEST_P(Sz_Depth, BitwiseOrMat, // BitwiseOrScalar PERF_TEST_P(Sz_Depth_Cn, BitwiseOrScalar, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16U, CV_32S), - GPU_CHANNELS_1_3_4)) + CUDA_CHANNELS_1_3_4)) { const cv::Size size = GET_PARAM(0); const int depth = GET_PARAM(1); @@ -870,14 +870,14 @@ PERF_TEST_P(Sz_Depth_Cn, BitwiseOrScalar, declare.in(s, WARMUP_RNG); cv::Scalar_ is = s; - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::bitwise_or(d_src, is, dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -893,7 +893,7 @@ PERF_TEST_P(Sz_Depth_Cn, BitwiseOrScalar, // BitwiseXorMat PERF_TEST_P(Sz_Depth, BitwiseXorMat, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16U, CV_32S))) { const cv::Size size = GET_PARAM(0); @@ -905,7 +905,7 @@ PERF_TEST_P(Sz_Depth, BitwiseXorMat, cv::Mat src2(size, depth); declare.in(src2, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src1(src1); const cv::cuda::GpuMat d_src2(src2); @@ -913,7 +913,7 @@ PERF_TEST_P(Sz_Depth, BitwiseXorMat, TEST_CYCLE() cv::cuda::bitwise_xor(d_src1, d_src2, dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -929,9 +929,9 @@ PERF_TEST_P(Sz_Depth, BitwiseXorMat, // BitwiseXorScalar PERF_TEST_P(Sz_Depth_Cn, BitwiseXorScalar, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16U, CV_32S), - GPU_CHANNELS_1_3_4)) + CUDA_CHANNELS_1_3_4)) { const cv::Size size = GET_PARAM(0); const int depth = GET_PARAM(1); @@ -946,14 +946,14 @@ PERF_TEST_P(Sz_Depth_Cn, BitwiseXorScalar, declare.in(s, WARMUP_RNG); cv::Scalar_ is = s; - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::bitwise_xor(d_src, is, dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -969,9 +969,9 @@ PERF_TEST_P(Sz_Depth_Cn, BitwiseXorScalar, // RShift PERF_TEST_P(Sz_Depth_Cn, RShift, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16U, CV_32S), - GPU_CHANNELS_1_3_4)) + CUDA_CHANNELS_1_3_4)) { const cv::Size size = GET_PARAM(0); const int depth = GET_PARAM(1); @@ -984,14 +984,14 @@ PERF_TEST_P(Sz_Depth_Cn, RShift, const cv::Scalar_ val = cv::Scalar_::all(4); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::rshift(d_src, val, dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -1003,9 +1003,9 @@ PERF_TEST_P(Sz_Depth_Cn, RShift, // LShift PERF_TEST_P(Sz_Depth_Cn, LShift, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16U, CV_32S), - GPU_CHANNELS_1_3_4)) + CUDA_CHANNELS_1_3_4)) { const cv::Size size = GET_PARAM(0); const int depth = GET_PARAM(1); @@ -1018,14 +1018,14 @@ PERF_TEST_P(Sz_Depth_Cn, LShift, const cv::Scalar_ val = cv::Scalar_::all(4); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::lshift(d_src, val, dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -1037,7 +1037,7 @@ PERF_TEST_P(Sz_Depth_Cn, LShift, // MinMat PERF_TEST_P(Sz_Depth, MinMat, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16U, CV_32F))) { const cv::Size size = GET_PARAM(0); @@ -1049,7 +1049,7 @@ PERF_TEST_P(Sz_Depth, MinMat, cv::Mat src2(size, depth); declare.in(src2, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src1(src1); const cv::cuda::GpuMat d_src2(src2); @@ -1057,7 +1057,7 @@ PERF_TEST_P(Sz_Depth, MinMat, TEST_CYCLE() cv::cuda::min(d_src1, d_src2, dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -1073,7 +1073,7 @@ PERF_TEST_P(Sz_Depth, MinMat, // MinScalar PERF_TEST_P(Sz_Depth, MinScalar, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16U, CV_32F))) { const cv::Size size = GET_PARAM(0); @@ -1085,14 +1085,14 @@ PERF_TEST_P(Sz_Depth, MinScalar, cv::Scalar val; declare.in(val, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::min(d_src, val[0], dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -1108,7 +1108,7 @@ PERF_TEST_P(Sz_Depth, MinScalar, // MaxMat PERF_TEST_P(Sz_Depth, MaxMat, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16U, CV_32F))) { const cv::Size size = GET_PARAM(0); @@ -1120,7 +1120,7 @@ PERF_TEST_P(Sz_Depth, MaxMat, cv::Mat src2(size, depth); declare.in(src2, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src1(src1); const cv::cuda::GpuMat d_src2(src2); @@ -1128,7 +1128,7 @@ PERF_TEST_P(Sz_Depth, MaxMat, TEST_CYCLE() cv::cuda::max(d_src1, d_src2, dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -1144,7 +1144,7 @@ PERF_TEST_P(Sz_Depth, MaxMat, // MaxScalar PERF_TEST_P(Sz_Depth, MaxScalar, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16U, CV_32F))) { const cv::Size size = GET_PARAM(0); @@ -1156,14 +1156,14 @@ PERF_TEST_P(Sz_Depth, MaxScalar, cv::Scalar val; declare.in(val, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::max(d_src, val[0], dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -1181,7 +1181,7 @@ PERF_TEST_P(Sz_Depth, MaxScalar, DEF_PARAM_TEST(Sz_3Depth, cv::Size, MatDepth, MatDepth, MatDepth); PERF_TEST_P(Sz_3Depth, AddWeighted, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16U, CV_32F, CV_64F), Values(CV_8U, CV_16U, CV_32F, CV_64F), Values(CV_8U, CV_16U, CV_32F, CV_64F))) @@ -1197,7 +1197,7 @@ PERF_TEST_P(Sz_3Depth, AddWeighted, cv::Mat src2(size, depth2); declare.in(src2, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src1(src1); const cv::cuda::GpuMat d_src2(src2); @@ -1205,7 +1205,7 @@ PERF_TEST_P(Sz_3Depth, AddWeighted, TEST_CYCLE() cv::cuda::addWeighted(d_src1, 0.5, d_src2, 0.5, 10.0, dst, dst_depth); - GPU_SANITY_CHECK(dst, 1e-10); + CUDA_SANITY_CHECK(dst, 1e-10); } else { @@ -1221,21 +1221,21 @@ PERF_TEST_P(Sz_3Depth, AddWeighted, // MagnitudeComplex PERF_TEST_P(Sz, MagnitudeComplex, - GPU_TYPICAL_MAT_SIZES) + CUDA_TYPICAL_MAT_SIZES) { const cv::Size size = GetParam(); cv::Mat src(size, CV_32FC2); declare.in(src, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::magnitude(d_src, dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -1254,21 +1254,21 @@ PERF_TEST_P(Sz, MagnitudeComplex, // MagnitudeSqrComplex PERF_TEST_P(Sz, MagnitudeSqrComplex, - GPU_TYPICAL_MAT_SIZES) + CUDA_TYPICAL_MAT_SIZES) { const cv::Size size = GetParam(); cv::Mat src(size, CV_32FC2); declare.in(src, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::magnitudeSqr(d_src, dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -1280,7 +1280,7 @@ PERF_TEST_P(Sz, MagnitudeSqrComplex, // Magnitude PERF_TEST_P(Sz, Magnitude, - GPU_TYPICAL_MAT_SIZES) + CUDA_TYPICAL_MAT_SIZES) { const cv::Size size = GetParam(); @@ -1290,7 +1290,7 @@ PERF_TEST_P(Sz, Magnitude, cv::Mat src2(size, CV_32FC1); declare.in(src2, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src1(src1); const cv::cuda::GpuMat d_src2(src2); @@ -1298,7 +1298,7 @@ PERF_TEST_P(Sz, Magnitude, TEST_CYCLE() cv::cuda::magnitude(d_src1, d_src2, dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -1314,7 +1314,7 @@ PERF_TEST_P(Sz, Magnitude, // MagnitudeSqr PERF_TEST_P(Sz, MagnitudeSqr, - GPU_TYPICAL_MAT_SIZES) + CUDA_TYPICAL_MAT_SIZES) { const cv::Size size = GetParam(); @@ -1324,7 +1324,7 @@ PERF_TEST_P(Sz, MagnitudeSqr, cv::Mat src2(size, CV_32FC1); declare.in(src2, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src1(src1); const cv::cuda::GpuMat d_src2(src2); @@ -1332,7 +1332,7 @@ PERF_TEST_P(Sz, MagnitudeSqr, TEST_CYCLE() cv::cuda::magnitudeSqr(d_src1, d_src2, dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -1346,7 +1346,7 @@ PERF_TEST_P(Sz, MagnitudeSqr, DEF_PARAM_TEST(Sz_AngleInDegrees, cv::Size, bool); PERF_TEST_P(Sz_AngleInDegrees, Phase, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Bool())) { const cv::Size size = GET_PARAM(0); @@ -1358,7 +1358,7 @@ PERF_TEST_P(Sz_AngleInDegrees, Phase, cv::Mat src2(size, CV_32FC1); declare.in(src2, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src1(src1); const cv::cuda::GpuMat d_src2(src2); @@ -1366,7 +1366,7 @@ PERF_TEST_P(Sz_AngleInDegrees, Phase, TEST_CYCLE() cv::cuda::phase(d_src1, d_src2, dst, angleInDegrees); - GPU_SANITY_CHECK(dst, 1e-6, ERROR_RELATIVE); + CUDA_SANITY_CHECK(dst, 1e-6, ERROR_RELATIVE); } else { @@ -1382,7 +1382,7 @@ PERF_TEST_P(Sz_AngleInDegrees, Phase, // CartToPolar PERF_TEST_P(Sz_AngleInDegrees, CartToPolar, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Bool())) { const cv::Size size = GET_PARAM(0); @@ -1394,7 +1394,7 @@ PERF_TEST_P(Sz_AngleInDegrees, CartToPolar, cv::Mat src2(size, CV_32FC1); declare.in(src2, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src1(src1); const cv::cuda::GpuMat d_src2(src2); @@ -1403,8 +1403,8 @@ PERF_TEST_P(Sz_AngleInDegrees, CartToPolar, TEST_CYCLE() cv::cuda::cartToPolar(d_src1, d_src2, magnitude, angle, angleInDegrees); - GPU_SANITY_CHECK(magnitude); - GPU_SANITY_CHECK(angle, 1e-6, ERROR_RELATIVE); + CUDA_SANITY_CHECK(magnitude); + CUDA_SANITY_CHECK(angle, 1e-6, ERROR_RELATIVE); } else { @@ -1422,7 +1422,7 @@ PERF_TEST_P(Sz_AngleInDegrees, CartToPolar, // PolarToCart PERF_TEST_P(Sz_AngleInDegrees, PolarToCart, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Bool())) { const cv::Size size = GET_PARAM(0); @@ -1434,7 +1434,7 @@ PERF_TEST_P(Sz_AngleInDegrees, PolarToCart, cv::Mat angle(size, CV_32FC1); declare.in(angle, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_magnitude(magnitude); const cv::cuda::GpuMat d_angle(angle); @@ -1443,8 +1443,8 @@ PERF_TEST_P(Sz_AngleInDegrees, PolarToCart, TEST_CYCLE() cv::cuda::polarToCart(d_magnitude, d_angle, x, y, angleInDegrees); - GPU_SANITY_CHECK(x); - GPU_SANITY_CHECK(y); + CUDA_SANITY_CHECK(x); + CUDA_SANITY_CHECK(y); } else { @@ -1466,7 +1466,7 @@ CV_ENUM(ThreshOp, cv::THRESH_BINARY, cv::THRESH_BINARY_INV, cv::THRESH_TRUNC, cv DEF_PARAM_TEST(Sz_Depth_Op, cv::Size, MatDepth, ThreshOp); PERF_TEST_P(Sz_Depth_Op, Threshold, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16U, CV_32F, CV_64F), ThreshOp::all())) { @@ -1477,14 +1477,14 @@ PERF_TEST_P(Sz_Depth_Op, Threshold, cv::Mat src(size, depth); declare.in(src, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::threshold(d_src, dst, 100.0, 255.0, threshOp); - GPU_SANITY_CHECK(dst, 1e-10); + CUDA_SANITY_CHECK(dst, 1e-10); } else { diff --git a/modules/cudaarithm/perf/perf_reductions.cpp b/modules/cudaarithm/perf/perf_reductions.cpp index 40d709e51..fe7279556 100644 --- a/modules/cudaarithm/perf/perf_reductions.cpp +++ b/modules/cudaarithm/perf/perf_reductions.cpp @@ -52,7 +52,7 @@ using namespace perf; DEF_PARAM_TEST(Sz_Depth_Norm, cv::Size, MatDepth, NormType); PERF_TEST_P(Sz_Depth_Norm, Norm, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16U, CV_32S, CV_32F), Values(NormType(cv::NORM_INF), NormType(cv::NORM_L1), NormType(cv::NORM_L2)))) { @@ -66,7 +66,7 @@ PERF_TEST_P(Sz_Depth_Norm, Norm, else declare.in(src, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat d_buf; @@ -92,7 +92,7 @@ PERF_TEST_P(Sz_Depth_Norm, Norm, DEF_PARAM_TEST(Sz_Norm, cv::Size, NormType); PERF_TEST_P(Sz_Norm, NormDiff, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(NormType(cv::NORM_INF), NormType(cv::NORM_L1), NormType(cv::NORM_L2)))) { const cv::Size size = GET_PARAM(0); @@ -104,7 +104,7 @@ PERF_TEST_P(Sz_Norm, NormDiff, cv::Mat src2(size, CV_8UC1); declare.in(src2, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src1(src1); const cv::cuda::GpuMat d_src2(src2); @@ -130,9 +130,9 @@ PERF_TEST_P(Sz_Norm, NormDiff, // Sum PERF_TEST_P(Sz_Depth_Cn, Sum, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16U, CV_32F), - GPU_CHANNELS_1_3_4)) + CUDA_CHANNELS_1_3_4)) { const cv::Size size = GET_PARAM(0); const int depth = GET_PARAM(1); @@ -143,7 +143,7 @@ PERF_TEST_P(Sz_Depth_Cn, Sum, cv::Mat src(size, type); declare.in(src, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat d_buf; @@ -167,9 +167,9 @@ PERF_TEST_P(Sz_Depth_Cn, Sum, // SumAbs PERF_TEST_P(Sz_Depth_Cn, SumAbs, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16U, CV_32F), - GPU_CHANNELS_1_3_4)) + CUDA_CHANNELS_1_3_4)) { const cv::Size size = GET_PARAM(0); const int depth = GET_PARAM(1); @@ -180,7 +180,7 @@ PERF_TEST_P(Sz_Depth_Cn, SumAbs, cv::Mat src(size, type); declare.in(src, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat d_buf; @@ -200,9 +200,9 @@ PERF_TEST_P(Sz_Depth_Cn, SumAbs, // SumSqr PERF_TEST_P(Sz_Depth_Cn, SumSqr, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16U, CV_32F), - GPU_CHANNELS_1_3_4)) + CUDA_CHANNELS_1_3_4)) { const cv::Size size = GET_PARAM(0); const int depth = GET_PARAM(1); @@ -213,7 +213,7 @@ PERF_TEST_P(Sz_Depth_Cn, SumSqr, cv::Mat src(size, type); declare.in(src, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat d_buf; @@ -233,7 +233,7 @@ PERF_TEST_P(Sz_Depth_Cn, SumSqr, // MinMax PERF_TEST_P(Sz_Depth, MinMax, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16U, CV_32F, CV_64F))) { const cv::Size size = GET_PARAM(0); @@ -245,7 +245,7 @@ PERF_TEST_P(Sz_Depth, MinMax, else declare.in(src, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat d_buf; @@ -271,7 +271,7 @@ PERF_TEST_P(Sz_Depth, MinMax, // MinMaxLoc PERF_TEST_P(Sz_Depth, MinMaxLoc, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16U, CV_32F, CV_64F))) { const cv::Size size = GET_PARAM(0); @@ -283,7 +283,7 @@ PERF_TEST_P(Sz_Depth, MinMaxLoc, else declare.in(src, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat d_valbuf, d_locbuf; @@ -311,7 +311,7 @@ PERF_TEST_P(Sz_Depth, MinMaxLoc, // CountNonZero PERF_TEST_P(Sz_Depth, CountNonZero, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16U, CV_32F, CV_64F))) { const cv::Size size = GET_PARAM(0); @@ -320,7 +320,7 @@ PERF_TEST_P(Sz_Depth, CountNonZero, cv::Mat src(size, depth); declare.in(src, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat d_buf; @@ -351,7 +351,7 @@ CV_ENUM(ReduceDim, Rows, Cols) DEF_PARAM_TEST(Sz_Depth_Cn_Code_Dim, cv::Size, MatDepth, MatCn, ReduceCode, ReduceDim); PERF_TEST_P(Sz_Depth_Cn_Code_Dim, Reduce, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16U, CV_16S, CV_32F), Values(1, 2, 3, 4), ReduceCode::all(), @@ -368,14 +368,14 @@ PERF_TEST_P(Sz_Depth_Cn_Code_Dim, Reduce, cv::Mat src(size, type); declare.in(src, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::reduce(d_src, dst, dim, reduceOp); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -393,7 +393,7 @@ PERF_TEST_P(Sz_Depth_Cn_Code_Dim, Reduce, DEF_PARAM_TEST(Sz_Depth_NormType, cv::Size, MatDepth, NormType); PERF_TEST_P(Sz_Depth_NormType, Normalize, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16U, CV_32F, CV_64F), Values(NormType(cv::NORM_INF), NormType(cv::NORM_L1), @@ -410,7 +410,7 @@ PERF_TEST_P(Sz_Depth_NormType, Normalize, cv::Mat src(size, type); declare.in(src, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; @@ -418,7 +418,7 @@ PERF_TEST_P(Sz_Depth_NormType, Normalize, TEST_CYCLE() cv::cuda::normalize(d_src, dst, alpha, beta, norm_type, type, cv::cuda::GpuMat(), d_norm_buf, d_cvt_buf); - GPU_SANITY_CHECK(dst, 1e-6); + CUDA_SANITY_CHECK(dst, 1e-6); } else { @@ -434,7 +434,7 @@ PERF_TEST_P(Sz_Depth_NormType, Normalize, // MeanStdDev PERF_TEST_P(Sz, MeanStdDev, - GPU_TYPICAL_MAT_SIZES) + CUDA_TYPICAL_MAT_SIZES) { const cv::Size size = GetParam(); @@ -442,7 +442,7 @@ PERF_TEST_P(Sz, MeanStdDev, declare.in(src, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat d_buf; diff --git a/modules/cudaarithm/test/test_arithm.cpp b/modules/cudaarithm/test/test_arithm.cpp index 38611772e..bd3f250f3 100644 --- a/modules/cudaarithm/test/test_arithm.cpp +++ b/modules/cudaarithm/test/test_arithm.cpp @@ -74,7 +74,7 @@ PARAM_TEST_CASE(GEMM, cv::cuda::DeviceInfo, cv::Size, MatType, GemmFlags, UseRoi } }; -GPU_TEST_P(GEMM, Accuracy) +CUDA_TEST_P(GEMM, Accuracy) { cv::Mat src1 = randomMat(size, type, -10.0, 10.0); cv::Mat src2 = randomMat(size, type, -10.0, 10.0); @@ -118,7 +118,7 @@ GPU_TEST_P(GEMM, Accuracy) } } -INSTANTIATE_TEST_CASE_P(GPU_Arithm, GEMM, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_Arithm, GEMM, testing::Combine( ALL_DEVICES, DIFFERENT_SIZES, testing::Values(MatType(CV_32FC1), MatType(CV_32FC2), MatType(CV_64FC1), MatType(CV_64FC2)), @@ -144,7 +144,7 @@ PARAM_TEST_CASE(Integral, cv::cuda::DeviceInfo, cv::Size, UseRoi) } }; -GPU_TEST_P(Integral, Accuracy) +CUDA_TEST_P(Integral, Accuracy) { cv::Mat src = randomMat(size, CV_8UC1); @@ -157,7 +157,7 @@ GPU_TEST_P(Integral, Accuracy) EXPECT_MAT_NEAR(dst_gold, dst, 0.0); } -INSTANTIATE_TEST_CASE_P(GPU_Arithm, Integral, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_Arithm, Integral, testing::Combine( ALL_DEVICES, DIFFERENT_SIZES, WHOLE_SUBMAT)); @@ -188,7 +188,7 @@ PARAM_TEST_CASE(MulSpectrums, cv::cuda::DeviceInfo, cv::Size, DftFlags) } }; -GPU_TEST_P(MulSpectrums, Simple) +CUDA_TEST_P(MulSpectrums, Simple) { cv::cuda::GpuMat c; cv::cuda::mulSpectrums(loadMat(a), loadMat(b), c, flag, false); @@ -199,7 +199,7 @@ GPU_TEST_P(MulSpectrums, Simple) EXPECT_MAT_NEAR(c_gold, c, 1e-2); } -GPU_TEST_P(MulSpectrums, Scaled) +CUDA_TEST_P(MulSpectrums, Scaled) { float scale = 1.f / size.area(); @@ -213,7 +213,7 @@ GPU_TEST_P(MulSpectrums, Scaled) EXPECT_MAT_NEAR(c_gold, c, 1e-2); } -INSTANTIATE_TEST_CASE_P(GPU_Arithm, MulSpectrums, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_Arithm, MulSpectrums, testing::Combine( ALL_DEVICES, DIFFERENT_SIZES, testing::Values(DftFlags(0), DftFlags(cv::DFT_ROWS)))); @@ -260,7 +260,7 @@ namespace } } -GPU_TEST_P(Dft, C2C) +CUDA_TEST_P(Dft, C2C) { int cols = randomInt(2, 100); int rows = randomInt(2, 100); @@ -324,7 +324,7 @@ namespace } } -GPU_TEST_P(Dft, R2CThenC2R) +CUDA_TEST_P(Dft, R2CThenC2R) { int cols = randomInt(2, 100); int rows = randomInt(2, 100); @@ -346,7 +346,7 @@ GPU_TEST_P(Dft, R2CThenC2R) testR2CThenC2R("single row 1", cols + 1, 1, true); } -INSTANTIATE_TEST_CASE_P(GPU_Arithm, Dft, ALL_DEVICES); +INSTANTIATE_TEST_CASE_P(CUDA_Arithm, Dft, ALL_DEVICES); //////////////////////////////////////////////////////// // Convolve @@ -414,7 +414,7 @@ PARAM_TEST_CASE(Convolve, cv::cuda::DeviceInfo, cv::Size, KSize, Ccorr) } }; -GPU_TEST_P(Convolve, Accuracy) +CUDA_TEST_P(Convolve, Accuracy) { cv::Mat src = randomMat(size, CV_32FC1, 0.0, 100.0); cv::Mat kernel = randomMat(cv::Size(ksize, ksize), CV_32FC1, 0.0, 1.0); @@ -430,7 +430,7 @@ GPU_TEST_P(Convolve, Accuracy) EXPECT_MAT_NEAR(dst, dst_gold, 1e-1); } -INSTANTIATE_TEST_CASE_P(GPU_Arithm, Convolve, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_Arithm, Convolve, testing::Combine( ALL_DEVICES, DIFFERENT_SIZES, testing::Values(KSize(3), KSize(7), KSize(11), KSize(17), KSize(19), KSize(23), KSize(45)), diff --git a/modules/cudaarithm/test/test_core.cpp b/modules/cudaarithm/test/test_core.cpp index 063e4d968..f67854ecd 100644 --- a/modules/cudaarithm/test/test_core.cpp +++ b/modules/cudaarithm/test/test_core.cpp @@ -69,7 +69,7 @@ PARAM_TEST_CASE(Merge, cv::cuda::DeviceInfo, cv::Size, MatDepth, Channels, UseRo } }; -GPU_TEST_P(Merge, Accuracy) +CUDA_TEST_P(Merge, Accuracy) { std::vector src; src.reserve(channels); @@ -104,7 +104,7 @@ GPU_TEST_P(Merge, Accuracy) } } -INSTANTIATE_TEST_CASE_P(GPU_Arithm, Merge, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_Arithm, Merge, testing::Combine( ALL_DEVICES, DIFFERENT_SIZES, ALL_DEPTH, @@ -138,7 +138,7 @@ PARAM_TEST_CASE(Split, cv::cuda::DeviceInfo, cv::Size, MatDepth, Channels, UseRo } }; -GPU_TEST_P(Split, Accuracy) +CUDA_TEST_P(Split, Accuracy) { cv::Mat src = randomMat(size, type); @@ -171,7 +171,7 @@ GPU_TEST_P(Split, Accuracy) } } -INSTANTIATE_TEST_CASE_P(GPU_Arithm, Split, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_Arithm, Split, testing::Combine( ALL_DEVICES, DIFFERENT_SIZES, ALL_DEPTH, @@ -199,7 +199,7 @@ PARAM_TEST_CASE(Transpose, cv::cuda::DeviceInfo, cv::Size, MatType, UseRoi) } }; -GPU_TEST_P(Transpose, Accuracy) +CUDA_TEST_P(Transpose, Accuracy) { cv::Mat src = randomMat(size, type); @@ -227,7 +227,7 @@ GPU_TEST_P(Transpose, Accuracy) } } -INSTANTIATE_TEST_CASE_P(GPU_Arithm, Transpose, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_Arithm, Transpose, testing::Combine( ALL_DEVICES, DIFFERENT_SIZES, testing::Values(MatType(CV_8UC1), @@ -266,7 +266,7 @@ PARAM_TEST_CASE(Flip, cv::cuda::DeviceInfo, cv::Size, MatType, FlipCode, UseRoi) } }; -GPU_TEST_P(Flip, Accuracy) +CUDA_TEST_P(Flip, Accuracy) { cv::Mat src = randomMat(size, type); @@ -279,7 +279,7 @@ GPU_TEST_P(Flip, Accuracy) EXPECT_MAT_NEAR(dst_gold, dst, 0.0); } -INSTANTIATE_TEST_CASE_P(GPU_Arithm, Flip, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_Arithm, Flip, testing::Combine( ALL_DEVICES, DIFFERENT_SIZES, testing::Values(MatType(CV_8UC1), @@ -318,7 +318,7 @@ PARAM_TEST_CASE(LUT, cv::cuda::DeviceInfo, cv::Size, MatType, UseRoi) } }; -GPU_TEST_P(LUT, OneChannel) +CUDA_TEST_P(LUT, OneChannel) { cv::Mat src = randomMat(size, type); cv::Mat lut = randomMat(cv::Size(256, 1), CV_8UC1); @@ -334,7 +334,7 @@ GPU_TEST_P(LUT, OneChannel) EXPECT_MAT_NEAR(dst_gold, dst, 0.0); } -GPU_TEST_P(LUT, MultiChannel) +CUDA_TEST_P(LUT, MultiChannel) { cv::Mat src = randomMat(size, type); cv::Mat lut = randomMat(cv::Size(256, 1), CV_MAKE_TYPE(CV_8U, src.channels())); @@ -350,7 +350,7 @@ GPU_TEST_P(LUT, MultiChannel) EXPECT_MAT_NEAR(dst_gold, dst, 0.0); } -INSTANTIATE_TEST_CASE_P(GPU_Arithm, LUT, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_Arithm, LUT, testing::Combine( ALL_DEVICES, DIFFERENT_SIZES, testing::Values(MatType(CV_8UC1), MatType(CV_8UC3)), @@ -386,7 +386,7 @@ PARAM_TEST_CASE(CopyMakeBorder, cv::cuda::DeviceInfo, cv::Size, MatType, Border, } }; -GPU_TEST_P(CopyMakeBorder, Accuracy) +CUDA_TEST_P(CopyMakeBorder, Accuracy) { cv::Mat src = randomMat(size, type); cv::Scalar val = randomScalar(0, 255); @@ -400,7 +400,7 @@ GPU_TEST_P(CopyMakeBorder, Accuracy) EXPECT_MAT_NEAR(dst_gold, dst, 0.0); } -INSTANTIATE_TEST_CASE_P(GPU_Arithm, CopyMakeBorder, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_Arithm, CopyMakeBorder, testing::Combine( ALL_DEVICES, DIFFERENT_SIZES, testing::Values(MatType(CV_8UC1), diff --git a/modules/cudaarithm/test/test_element_operations.cpp b/modules/cudaarithm/test/test_element_operations.cpp index cf3d72f88..8069d28ca 100644 --- a/modules/cudaarithm/test/test_element_operations.cpp +++ b/modules/cudaarithm/test/test_element_operations.cpp @@ -75,7 +75,7 @@ PARAM_TEST_CASE(Add_Array, cv::cuda::DeviceInfo, cv::Size, std::pair> frame; ASSERT_FALSE(frame.empty()); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { cv::cuda::GpuMat d_frame(frame), foreground; @@ -119,13 +119,13 @@ PERF_TEST_P(Video, FGDStatModel, stopTimer(); } - GPU_SANITY_CHECK(foreground, 1e-2, ERROR_RELATIVE); + CUDA_SANITY_CHECK(foreground, 1e-2, ERROR_RELATIVE); #ifdef HAVE_OPENCV_CUDAIMGPROC cv::cuda::GpuMat background3, background; d_fgd->getBackgroundImage(background3); cv::cuda::cvtColor(background3, background, cv::COLOR_BGR2BGRA); - GPU_SANITY_CHECK(background, 1e-2, ERROR_RELATIVE); + CUDA_SANITY_CHECK(background, 1e-2, ERROR_RELATIVE); #endif } else @@ -168,7 +168,7 @@ DEF_PARAM_TEST(Video_Cn_LearningRate, string, MatCn, double); PERF_TEST_P(Video_Cn_LearningRate, MOG, Combine(Values("gpu/video/768x576.avi", "gpu/video/1920x1080.avi"), - GPU_CHANNELS_1_3_4, + CUDA_CHANNELS_1_3_4, Values(0.0, 0.01))) { const string inputFile = perf::TestBase::getDataPath(GET_PARAM(0)); @@ -193,7 +193,7 @@ PERF_TEST_P(Video_Cn_LearningRate, MOG, cv::swap(temp, frame); } - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { cv::Ptr d_mog = cv::cuda::createBackgroundSubtractorMOG(); @@ -224,7 +224,7 @@ PERF_TEST_P(Video_Cn_LearningRate, MOG, stopTimer(); } - GPU_SANITY_CHECK(foreground); + CUDA_SANITY_CHECK(foreground); } else { @@ -268,7 +268,7 @@ DEF_PARAM_TEST(Video_Cn, string, int); PERF_TEST_P(Video_Cn, MOG2, Combine(Values("gpu/video/768x576.avi", "gpu/video/1920x1080.avi"), - GPU_CHANNELS_1_3_4)) + CUDA_CHANNELS_1_3_4)) { const string inputFile = perf::TestBase::getDataPath(GET_PARAM(0)); const int cn = GET_PARAM(1); @@ -291,7 +291,7 @@ PERF_TEST_P(Video_Cn, MOG2, cv::swap(temp, frame); } - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { cv::Ptr d_mog2 = cv::cuda::createBackgroundSubtractorMOG2(); d_mog2->setDetectShadows(false); @@ -323,7 +323,7 @@ PERF_TEST_P(Video_Cn, MOG2, stopTimer(); } - GPU_SANITY_CHECK(foreground); + CUDA_SANITY_CHECK(foreground); } else { @@ -367,7 +367,7 @@ PERF_TEST_P(Video_Cn, MOG2, PERF_TEST_P(Video_Cn, MOG2GetBackgroundImage, Combine(Values("gpu/video/768x576.avi", "gpu/video/1920x1080.avi"), - GPU_CHANNELS_1_3_4)) + CUDA_CHANNELS_1_3_4)) { const string inputFile = perf::TestBase::getDataPath(GET_PARAM(0)); const int cn = GET_PARAM(1); @@ -377,7 +377,7 @@ PERF_TEST_P(Video_Cn, MOG2GetBackgroundImage, cv::Mat frame; - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { cv::Ptr d_mog2 = cv::cuda::createBackgroundSubtractorMOG2(); @@ -408,7 +408,7 @@ PERF_TEST_P(Video_Cn, MOG2GetBackgroundImage, TEST_CYCLE() d_mog2->getBackgroundImage(background); - GPU_SANITY_CHECK(background, 1); + CUDA_SANITY_CHECK(background, 1); } else { @@ -452,7 +452,7 @@ DEF_PARAM_TEST(Video_Cn_MaxFeatures, string, MatCn, int); PERF_TEST_P(Video_Cn_MaxFeatures, GMG, Combine(Values(string("gpu/video/768x576.avi")), - GPU_CHANNELS_1_3_4, + CUDA_CHANNELS_1_3_4, Values(20, 40, 60))) { const std::string inputFile = perf::TestBase::getDataPath(GET_PARAM(0)); @@ -476,7 +476,7 @@ PERF_TEST_P(Video_Cn_MaxFeatures, GMG, cv::swap(temp, frame); } - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { cv::cuda::GpuMat d_frame(frame); cv::cuda::GpuMat foreground; @@ -513,7 +513,7 @@ PERF_TEST_P(Video_Cn_MaxFeatures, GMG, stopTimer(); } - GPU_SANITY_CHECK(foreground); + CUDA_SANITY_CHECK(foreground); } else { diff --git a/modules/cudabgsegm/test/test_bgsegm.cpp b/modules/cudabgsegm/test/test_bgsegm.cpp index 2778ecc1d..6da0bba08 100644 --- a/modules/cudabgsegm/test/test_bgsegm.cpp +++ b/modules/cudabgsegm/test/test_bgsegm.cpp @@ -90,7 +90,7 @@ PARAM_TEST_CASE(FGDStatModel, cv::cuda::DeviceInfo, std::string) } }; -GPU_TEST_P(FGDStatModel, Update) +CUDA_TEST_P(FGDStatModel, Update) { cv::VideoCapture cap(inputFile); ASSERT_TRUE(cap.isOpened()); @@ -131,7 +131,7 @@ GPU_TEST_P(FGDStatModel, Update) } } -INSTANTIATE_TEST_CASE_P(GPU_BgSegm, FGDStatModel, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_BgSegm, FGDStatModel, testing::Combine( ALL_DEVICES, testing::Values(std::string("768x576.avi")))); @@ -171,7 +171,7 @@ PARAM_TEST_CASE(MOG, cv::cuda::DeviceInfo, std::string, UseGray, LearningRate, U } }; -GPU_TEST_P(MOG, Update) +CUDA_TEST_P(MOG, Update) { cv::VideoCapture cap(inputFile); ASSERT_TRUE(cap.isOpened()); @@ -206,7 +206,7 @@ GPU_TEST_P(MOG, Update) } } -INSTANTIATE_TEST_CASE_P(GPU_BgSegm, MOG, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_BgSegm, MOG, testing::Combine( ALL_DEVICES, testing::Values(std::string("768x576.avi")), testing::Values(UseGray(true), UseGray(false)), @@ -245,7 +245,7 @@ PARAM_TEST_CASE(MOG2, cv::cuda::DeviceInfo, std::string, UseGray, DetectShadow, } }; -GPU_TEST_P(MOG2, Update) +CUDA_TEST_P(MOG2, Update) { cv::VideoCapture cap(inputFile); ASSERT_TRUE(cap.isOpened()); @@ -289,7 +289,7 @@ GPU_TEST_P(MOG2, Update) } } -GPU_TEST_P(MOG2, getBackgroundImage) +CUDA_TEST_P(MOG2, getBackgroundImage) { if (useGray) return; @@ -326,7 +326,7 @@ GPU_TEST_P(MOG2, getBackgroundImage) ASSERT_MAT_NEAR(background_gold, background, 0); } -INSTANTIATE_TEST_CASE_P(GPU_BgSegm, MOG2, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_BgSegm, MOG2, testing::Combine( ALL_DEVICES, testing::Values(std::string("768x576.avi")), testing::Values(UseGray(true), UseGray(false)), @@ -342,7 +342,7 @@ PARAM_TEST_CASE(GMG, cv::cuda::DeviceInfo, cv::Size, MatDepth, Channels, UseRoi) { }; -GPU_TEST_P(GMG, Accuracy) +CUDA_TEST_P(GMG, Accuracy) { const cv::cuda::DeviceInfo devInfo = GET_PARAM(0); cv::cuda::setDevice(devInfo.deviceID()); @@ -381,7 +381,7 @@ GPU_TEST_P(GMG, Accuracy) ASSERT_MAT_NEAR(fullfg, d_fgmask, 0); } -INSTANTIATE_TEST_CASE_P(GPU_BgSegm, GMG, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_BgSegm, GMG, testing::Combine( ALL_DEVICES, DIFFERENT_SIZES, testing::Values(MatType(CV_8U), MatType(CV_16U), MatType(CV_32F)), diff --git a/modules/cudabgsegm/test/test_main.cpp b/modules/cudabgsegm/test/test_main.cpp index eea3d7c00..04f4fcf6e 100644 --- a/modules/cudabgsegm/test/test_main.cpp +++ b/modules/cudabgsegm/test/test_main.cpp @@ -42,4 +42,4 @@ #include "test_precomp.hpp" -CV_GPU_TEST_MAIN("gpu") +CV_CUDA_TEST_MAIN("gpu") diff --git a/modules/cudacodec/perf/perf_video.cpp b/modules/cudacodec/perf/perf_video.cpp index 39d85d881..7c3439e7a 100644 --- a/modules/cudacodec/perf/perf_video.cpp +++ b/modules/cudacodec/perf/perf_video.cpp @@ -73,7 +73,7 @@ PERF_TEST_P(FileName, VideoReader, Values("gpu/video/768x576.avi", "gpu/video/19 const string inputFile = perf::TestBase::getDataPath(GetParam()); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { cv::Ptr d_reader = cv::cudacodec::createVideoReader(inputFile); @@ -81,7 +81,7 @@ PERF_TEST_P(FileName, VideoReader, Values("gpu/video/768x576.avi", "gpu/video/19 TEST_CYCLE_N(10) d_reader->nextFrame(frame); - GPU_SANITY_CHECK(frame); + CUDA_SANITY_CHECK(frame); } else { @@ -117,7 +117,7 @@ PERF_TEST_P(FileName, VideoWriter, Values("gpu/video/768x576.avi", "gpu/video/19 cv::Mat frame; - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { cv::Ptr d_writer; diff --git a/modules/cudacodec/test/test_main.cpp b/modules/cudacodec/test/test_main.cpp index eea3d7c00..04f4fcf6e 100644 --- a/modules/cudacodec/test/test_main.cpp +++ b/modules/cudacodec/test/test_main.cpp @@ -42,4 +42,4 @@ #include "test_precomp.hpp" -CV_GPU_TEST_MAIN("gpu") +CV_CUDA_TEST_MAIN("gpu") diff --git a/modules/cudacodec/test/test_video.cpp b/modules/cudacodec/test/test_video.cpp index 04efd6602..83f0cb21b 100644 --- a/modules/cudacodec/test/test_video.cpp +++ b/modules/cudacodec/test/test_video.cpp @@ -51,7 +51,7 @@ PARAM_TEST_CASE(Video, cv::cuda::DeviceInfo, std::string) ////////////////////////////////////////////////////// // VideoReader -GPU_TEST_P(Video, Reader) +CUDA_TEST_P(Video, Reader) { cv::cuda::setDevice(GET_PARAM(0).deviceID()); @@ -73,7 +73,7 @@ GPU_TEST_P(Video, Reader) #ifdef WIN32 -GPU_TEST_P(Video, Writer) +CUDA_TEST_P(Video, Writer) { cv::cuda::setDevice(GET_PARAM(0).deviceID()); @@ -118,7 +118,7 @@ GPU_TEST_P(Video, Writer) #endif // WIN32 -INSTANTIATE_TEST_CASE_P(GPU_Codec, Video, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_Codec, Video, testing::Combine( ALL_DEVICES, testing::Values(std::string("768x576.avi"), std::string("1920x1080.avi")))); diff --git a/modules/cudafeatures2d/include/opencv2/cudafeatures2d.hpp b/modules/cudafeatures2d/include/opencv2/cudafeatures2d.hpp index 16af28c4d..09a200f05 100644 --- a/modules/cudafeatures2d/include/opencv2/cudafeatures2d.hpp +++ b/modules/cudafeatures2d/include/opencv2/cudafeatures2d.hpp @@ -52,10 +52,10 @@ namespace cv { namespace cuda { -class CV_EXPORTS BFMatcher_GPU +class CV_EXPORTS BFMatcher_CUDA { public: - explicit BFMatcher_GPU(int norm = cv::NORM_L2); + explicit BFMatcher_CUDA(int norm = cv::NORM_L2); // Add descriptors to train descriptor collection void add(const std::vector& descCollection); @@ -203,7 +203,7 @@ private: std::vector trainDescCollection; }; -class CV_EXPORTS FAST_GPU +class CV_EXPORTS FAST_CUDA { public: enum @@ -216,7 +216,7 @@ public: // all features have same size static const int FEATURE_SIZE = 7; - explicit FAST_GPU(int threshold, bool nonmaxSupression = true, double keypointsRatio = 0.05); + explicit FAST_CUDA(int threshold, bool nonmaxSupression = true, double keypointsRatio = 0.05); //! finds the keypoints using FAST detector //! supports only CV_8UC1 images @@ -257,7 +257,7 @@ private: GpuMat d_keypoints_; }; -class CV_EXPORTS ORB_GPU +class CV_EXPORTS ORB_CUDA { public: enum @@ -277,7 +277,7 @@ public: }; //! Constructor - explicit ORB_GPU(int nFeatures = 500, float scaleFactor = 1.2f, int nLevels = 8, int edgeThreshold = 31, + explicit ORB_CUDA(int nFeatures = 500, float scaleFactor = 1.2f, int nLevels = 8, int edgeThreshold = 31, int firstLevel = 0, int WTA_K = 2, int scoreType = 0, int patchSize = 31); //! Compute the ORB features on an image @@ -349,7 +349,7 @@ private: std::vector keyPointsPyr_; std::vector keyPointsCount_; - FAST_GPU fastDetector_; + FAST_CUDA fastDetector_; Ptr blurFilter; diff --git a/modules/cudafeatures2d/perf/perf_features2d.cpp b/modules/cudafeatures2d/perf/perf_features2d.cpp index 2c2a6a0e3..da8b4dc64 100644 --- a/modules/cudafeatures2d/perf/perf_features2d.cpp +++ b/modules/cudafeatures2d/perf/perf_features2d.cpp @@ -62,9 +62,9 @@ PERF_TEST_P(Image_Threshold_NonMaxSupression, FAST, const int threshold = GET_PARAM(1); const bool nonMaxSuppersion = GET_PARAM(2); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { - cv::cuda::FAST_GPU d_fast(threshold, nonMaxSuppersion, 0.5); + cv::cuda::FAST_CUDA d_fast(threshold, nonMaxSuppersion, 0.5); const cv::cuda::GpuMat d_img(img); cv::cuda::GpuMat d_keypoints; @@ -104,9 +104,9 @@ PERF_TEST_P(Image_NFeatures, ORB, const int nFeatures = GET_PARAM(1); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { - cv::cuda::ORB_GPU d_orb(nFeatures); + cv::cuda::ORB_CUDA d_orb(nFeatures); const cv::cuda::GpuMat d_img(img); cv::cuda::GpuMat d_keypoints, d_descriptors; @@ -162,9 +162,9 @@ PERF_TEST_P(DescSize_Norm, BFMatch, cv::Mat train(3000, desc_size, type); declare.in(train, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { - cv::cuda::BFMatcher_GPU d_matcher(normType); + cv::cuda::BFMatcher_CUDA d_matcher(normType); const cv::cuda::GpuMat d_query(query); const cv::cuda::GpuMat d_train(train); @@ -221,9 +221,9 @@ PERF_TEST_P(DescSize_K_Norm, BFKnnMatch, cv::Mat train(3000, desc_size, type); declare.in(train, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { - cv::cuda::BFMatcher_GPU d_matcher(normType); + cv::cuda::BFMatcher_CUDA d_matcher(normType); const cv::cuda::GpuMat d_query(query); const cv::cuda::GpuMat d_train(train); @@ -275,9 +275,9 @@ PERF_TEST_P(DescSize_Norm, BFRadiusMatch, cv::Mat train(3000, desc_size, type); declare.in(train, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { - cv::cuda::BFMatcher_GPU d_matcher(normType); + cv::cuda::BFMatcher_CUDA d_matcher(normType); const cv::cuda::GpuMat d_query(query); const cv::cuda::GpuMat d_train(train); diff --git a/modules/cudafeatures2d/src/brute_force_matcher.cpp b/modules/cudafeatures2d/src/brute_force_matcher.cpp index 106fce051..5de0b06e3 100644 --- a/modules/cudafeatures2d/src/brute_force_matcher.cpp +++ b/modules/cudafeatures2d/src/brute_force_matcher.cpp @@ -47,37 +47,37 @@ using namespace cv::cuda; #if !defined (HAVE_CUDA) || defined (CUDA_DISABLER) -cv::cuda::BFMatcher_GPU::BFMatcher_GPU(int) { throw_no_cuda(); } -void cv::cuda::BFMatcher_GPU::add(const std::vector&) { throw_no_cuda(); } -const std::vector& cv::cuda::BFMatcher_GPU::getTrainDescriptors() const { throw_no_cuda(); return trainDescCollection; } -void cv::cuda::BFMatcher_GPU::clear() { throw_no_cuda(); } -bool cv::cuda::BFMatcher_GPU::empty() const { throw_no_cuda(); return true; } -bool cv::cuda::BFMatcher_GPU::isMaskSupported() const { throw_no_cuda(); return true; } -void cv::cuda::BFMatcher_GPU::matchSingle(const GpuMat&, const GpuMat&, GpuMat&, GpuMat&, const GpuMat&, Stream&) { throw_no_cuda(); } -void cv::cuda::BFMatcher_GPU::matchDownload(const GpuMat&, const GpuMat&, std::vector&) { throw_no_cuda(); } -void cv::cuda::BFMatcher_GPU::matchConvert(const Mat&, const Mat&, std::vector&) { throw_no_cuda(); } -void cv::cuda::BFMatcher_GPU::match(const GpuMat&, const GpuMat&, std::vector&, const GpuMat&) { throw_no_cuda(); } -void cv::cuda::BFMatcher_GPU::makeGpuCollection(GpuMat&, GpuMat&, const std::vector&) { throw_no_cuda(); } -void cv::cuda::BFMatcher_GPU::matchCollection(const GpuMat&, const GpuMat&, GpuMat&, GpuMat&, GpuMat&, const GpuMat&, Stream&) { throw_no_cuda(); } -void cv::cuda::BFMatcher_GPU::matchDownload(const GpuMat&, const GpuMat&, const GpuMat&, std::vector&) { throw_no_cuda(); } -void cv::cuda::BFMatcher_GPU::matchConvert(const Mat&, const Mat&, const Mat&, std::vector&) { throw_no_cuda(); } -void cv::cuda::BFMatcher_GPU::match(const GpuMat&, std::vector&, const std::vector&) { throw_no_cuda(); } -void cv::cuda::BFMatcher_GPU::knnMatchSingle(const GpuMat&, const GpuMat&, GpuMat&, GpuMat&, GpuMat&, int, const GpuMat&, Stream&) { throw_no_cuda(); } -void cv::cuda::BFMatcher_GPU::knnMatchDownload(const GpuMat&, const GpuMat&, std::vector< std::vector >&, bool) { throw_no_cuda(); } -void cv::cuda::BFMatcher_GPU::knnMatchConvert(const Mat&, const Mat&, std::vector< std::vector >&, bool) { throw_no_cuda(); } -void cv::cuda::BFMatcher_GPU::knnMatch(const GpuMat&, const GpuMat&, std::vector< std::vector >&, int, const GpuMat&, bool) { throw_no_cuda(); } -void cv::cuda::BFMatcher_GPU::knnMatch2Collection(const GpuMat&, const GpuMat&, GpuMat&, GpuMat&, GpuMat&, const GpuMat&, Stream&) { throw_no_cuda(); } -void cv::cuda::BFMatcher_GPU::knnMatch2Download(const GpuMat&, const GpuMat&, const GpuMat&, std::vector< std::vector >&, bool) { throw_no_cuda(); } -void cv::cuda::BFMatcher_GPU::knnMatch2Convert(const Mat&, const Mat&, const Mat&, std::vector< std::vector >&, bool) { throw_no_cuda(); } -void cv::cuda::BFMatcher_GPU::knnMatch(const GpuMat&, std::vector< std::vector >&, int, const std::vector&, bool) { throw_no_cuda(); } -void cv::cuda::BFMatcher_GPU::radiusMatchSingle(const GpuMat&, const GpuMat&, GpuMat&, GpuMat&, GpuMat&, float, const GpuMat&, Stream&) { throw_no_cuda(); } -void cv::cuda::BFMatcher_GPU::radiusMatchDownload(const GpuMat&, const GpuMat&, const GpuMat&, std::vector< std::vector >&, bool) { throw_no_cuda(); } -void cv::cuda::BFMatcher_GPU::radiusMatchConvert(const Mat&, const Mat&, const Mat&, std::vector< std::vector >&, bool) { throw_no_cuda(); } -void cv::cuda::BFMatcher_GPU::radiusMatch(const GpuMat&, const GpuMat&, std::vector< std::vector >&, float, const GpuMat&, bool) { throw_no_cuda(); } -void cv::cuda::BFMatcher_GPU::radiusMatchCollection(const GpuMat&, GpuMat&, GpuMat&, GpuMat&, GpuMat&, float, const std::vector&, Stream&) { throw_no_cuda(); } -void cv::cuda::BFMatcher_GPU::radiusMatchDownload(const GpuMat&, const GpuMat&, const GpuMat&, const GpuMat&, std::vector< std::vector >&, bool) { throw_no_cuda(); } -void cv::cuda::BFMatcher_GPU::radiusMatchConvert(const Mat&, const Mat&, const Mat&, const Mat&, std::vector< std::vector >&, bool) { throw_no_cuda(); } -void cv::cuda::BFMatcher_GPU::radiusMatch(const GpuMat&, std::vector< std::vector >&, float, const std::vector&, bool) { throw_no_cuda(); } +cv::cuda::BFMatcher_CUDA::BFMatcher_CUDA(int) { throw_no_cuda(); } +void cv::cuda::BFMatcher_CUDA::add(const std::vector&) { throw_no_cuda(); } +const std::vector& cv::cuda::BFMatcher_CUDA::getTrainDescriptors() const { throw_no_cuda(); return trainDescCollection; } +void cv::cuda::BFMatcher_CUDA::clear() { throw_no_cuda(); } +bool cv::cuda::BFMatcher_CUDA::empty() const { throw_no_cuda(); return true; } +bool cv::cuda::BFMatcher_CUDA::isMaskSupported() const { throw_no_cuda(); return true; } +void cv::cuda::BFMatcher_CUDA::matchSingle(const GpuMat&, const GpuMat&, GpuMat&, GpuMat&, const GpuMat&, Stream&) { throw_no_cuda(); } +void cv::cuda::BFMatcher_CUDA::matchDownload(const GpuMat&, const GpuMat&, std::vector&) { throw_no_cuda(); } +void cv::cuda::BFMatcher_CUDA::matchConvert(const Mat&, const Mat&, std::vector&) { throw_no_cuda(); } +void cv::cuda::BFMatcher_CUDA::match(const GpuMat&, const GpuMat&, std::vector&, const GpuMat&) { throw_no_cuda(); } +void cv::cuda::BFMatcher_CUDA::makeGpuCollection(GpuMat&, GpuMat&, const std::vector&) { throw_no_cuda(); } +void cv::cuda::BFMatcher_CUDA::matchCollection(const GpuMat&, const GpuMat&, GpuMat&, GpuMat&, GpuMat&, const GpuMat&, Stream&) { throw_no_cuda(); } +void cv::cuda::BFMatcher_CUDA::matchDownload(const GpuMat&, const GpuMat&, const GpuMat&, std::vector&) { throw_no_cuda(); } +void cv::cuda::BFMatcher_CUDA::matchConvert(const Mat&, const Mat&, const Mat&, std::vector&) { throw_no_cuda(); } +void cv::cuda::BFMatcher_CUDA::match(const GpuMat&, std::vector&, const std::vector&) { throw_no_cuda(); } +void cv::cuda::BFMatcher_CUDA::knnMatchSingle(const GpuMat&, const GpuMat&, GpuMat&, GpuMat&, GpuMat&, int, const GpuMat&, Stream&) { throw_no_cuda(); } +void cv::cuda::BFMatcher_CUDA::knnMatchDownload(const GpuMat&, const GpuMat&, std::vector< std::vector >&, bool) { throw_no_cuda(); } +void cv::cuda::BFMatcher_CUDA::knnMatchConvert(const Mat&, const Mat&, std::vector< std::vector >&, bool) { throw_no_cuda(); } +void cv::cuda::BFMatcher_CUDA::knnMatch(const GpuMat&, const GpuMat&, std::vector< std::vector >&, int, const GpuMat&, bool) { throw_no_cuda(); } +void cv::cuda::BFMatcher_CUDA::knnMatch2Collection(const GpuMat&, const GpuMat&, GpuMat&, GpuMat&, GpuMat&, const GpuMat&, Stream&) { throw_no_cuda(); } +void cv::cuda::BFMatcher_CUDA::knnMatch2Download(const GpuMat&, const GpuMat&, const GpuMat&, std::vector< std::vector >&, bool) { throw_no_cuda(); } +void cv::cuda::BFMatcher_CUDA::knnMatch2Convert(const Mat&, const Mat&, const Mat&, std::vector< std::vector >&, bool) { throw_no_cuda(); } +void cv::cuda::BFMatcher_CUDA::knnMatch(const GpuMat&, std::vector< std::vector >&, int, const std::vector&, bool) { throw_no_cuda(); } +void cv::cuda::BFMatcher_CUDA::radiusMatchSingle(const GpuMat&, const GpuMat&, GpuMat&, GpuMat&, GpuMat&, float, const GpuMat&, Stream&) { throw_no_cuda(); } +void cv::cuda::BFMatcher_CUDA::radiusMatchDownload(const GpuMat&, const GpuMat&, const GpuMat&, std::vector< std::vector >&, bool) { throw_no_cuda(); } +void cv::cuda::BFMatcher_CUDA::radiusMatchConvert(const Mat&, const Mat&, const Mat&, std::vector< std::vector >&, bool) { throw_no_cuda(); } +void cv::cuda::BFMatcher_CUDA::radiusMatch(const GpuMat&, const GpuMat&, std::vector< std::vector >&, float, const GpuMat&, bool) { throw_no_cuda(); } +void cv::cuda::BFMatcher_CUDA::radiusMatchCollection(const GpuMat&, GpuMat&, GpuMat&, GpuMat&, GpuMat&, float, const std::vector&, Stream&) { throw_no_cuda(); } +void cv::cuda::BFMatcher_CUDA::radiusMatchDownload(const GpuMat&, const GpuMat&, const GpuMat&, const GpuMat&, std::vector< std::vector >&, bool) { throw_no_cuda(); } +void cv::cuda::BFMatcher_CUDA::radiusMatchConvert(const Mat&, const Mat&, const Mat&, const Mat&, std::vector< std::vector >&, bool) { throw_no_cuda(); } +void cv::cuda::BFMatcher_CUDA::radiusMatch(const GpuMat&, std::vector< std::vector >&, float, const std::vector&, bool) { throw_no_cuda(); } #else /* !defined (HAVE_CUDA) */ @@ -158,31 +158,31 @@ namespace cv { namespace cuda { namespace device //////////////////////////////////////////////////////////////////// // Train collection -cv::cuda::BFMatcher_GPU::BFMatcher_GPU(int norm_) : norm(norm_) +cv::cuda::BFMatcher_CUDA::BFMatcher_CUDA(int norm_) : norm(norm_) { } -void cv::cuda::BFMatcher_GPU::add(const std::vector& descCollection) +void cv::cuda::BFMatcher_CUDA::add(const std::vector& descCollection) { trainDescCollection.insert(trainDescCollection.end(), descCollection.begin(), descCollection.end()); } -const std::vector& cv::cuda::BFMatcher_GPU::getTrainDescriptors() const +const std::vector& cv::cuda::BFMatcher_CUDA::getTrainDescriptors() const { return trainDescCollection; } -void cv::cuda::BFMatcher_GPU::clear() +void cv::cuda::BFMatcher_CUDA::clear() { trainDescCollection.clear(); } -bool cv::cuda::BFMatcher_GPU::empty() const +bool cv::cuda::BFMatcher_CUDA::empty() const { return trainDescCollection.empty(); } -bool cv::cuda::BFMatcher_GPU::isMaskSupported() const +bool cv::cuda::BFMatcher_CUDA::isMaskSupported() const { return true; } @@ -190,7 +190,7 @@ bool cv::cuda::BFMatcher_GPU::isMaskSupported() const //////////////////////////////////////////////////////////////////// // Match -void cv::cuda::BFMatcher_GPU::matchSingle(const GpuMat& query, const GpuMat& train, +void cv::cuda::BFMatcher_CUDA::matchSingle(const GpuMat& query, const GpuMat& train, GpuMat& trainIdx, GpuMat& distance, const GpuMat& mask, Stream& stream) { @@ -240,7 +240,7 @@ void cv::cuda::BFMatcher_GPU::matchSingle(const GpuMat& query, const GpuMat& tra func(query, train, mask, trainIdx, distance, StreamAccessor::getStream(stream)); } -void cv::cuda::BFMatcher_GPU::matchDownload(const GpuMat& trainIdx, const GpuMat& distance, std::vector& matches) +void cv::cuda::BFMatcher_CUDA::matchDownload(const GpuMat& trainIdx, const GpuMat& distance, std::vector& matches) { if (trainIdx.empty() || distance.empty()) return; @@ -251,7 +251,7 @@ void cv::cuda::BFMatcher_GPU::matchDownload(const GpuMat& trainIdx, const GpuMat matchConvert(trainIdxCPU, distanceCPU, matches); } -void cv::cuda::BFMatcher_GPU::matchConvert(const Mat& trainIdx, const Mat& distance, std::vector& matches) +void cv::cuda::BFMatcher_CUDA::matchConvert(const Mat& trainIdx, const Mat& distance, std::vector& matches) { if (trainIdx.empty() || distance.empty()) return; @@ -281,7 +281,7 @@ void cv::cuda::BFMatcher_GPU::matchConvert(const Mat& trainIdx, const Mat& dista } } -void cv::cuda::BFMatcher_GPU::match(const GpuMat& query, const GpuMat& train, +void cv::cuda::BFMatcher_CUDA::match(const GpuMat& query, const GpuMat& train, std::vector& matches, const GpuMat& mask) { GpuMat trainIdx, distance; @@ -289,7 +289,7 @@ void cv::cuda::BFMatcher_GPU::match(const GpuMat& query, const GpuMat& train, matchDownload(trainIdx, distance, matches); } -void cv::cuda::BFMatcher_GPU::makeGpuCollection(GpuMat& trainCollection, GpuMat& maskCollection, +void cv::cuda::BFMatcher_CUDA::makeGpuCollection(GpuMat& trainCollection, GpuMat& maskCollection, const std::vector& masks) { if (empty()) @@ -333,7 +333,7 @@ void cv::cuda::BFMatcher_GPU::makeGpuCollection(GpuMat& trainCollection, GpuMat& } } -void cv::cuda::BFMatcher_GPU::matchCollection(const GpuMat& query, const GpuMat& trainCollection, +void cv::cuda::BFMatcher_CUDA::matchCollection(const GpuMat& query, const GpuMat& trainCollection, GpuMat& trainIdx, GpuMat& imgIdx, GpuMat& distance, const GpuMat& masks, Stream& stream) { @@ -382,7 +382,7 @@ void cv::cuda::BFMatcher_GPU::matchCollection(const GpuMat& query, const GpuMat& func(query, trainCollection, masks, trainIdx, imgIdx, distance, StreamAccessor::getStream(stream)); } -void cv::cuda::BFMatcher_GPU::matchDownload(const GpuMat& trainIdx, const GpuMat& imgIdx, const GpuMat& distance, std::vector& matches) +void cv::cuda::BFMatcher_CUDA::matchDownload(const GpuMat& trainIdx, const GpuMat& imgIdx, const GpuMat& distance, std::vector& matches) { if (trainIdx.empty() || imgIdx.empty() || distance.empty()) return; @@ -394,7 +394,7 @@ void cv::cuda::BFMatcher_GPU::matchDownload(const GpuMat& trainIdx, const GpuMat matchConvert(trainIdxCPU, imgIdxCPU, distanceCPU, matches); } -void cv::cuda::BFMatcher_GPU::matchConvert(const Mat& trainIdx, const Mat& imgIdx, const Mat& distance, std::vector& matches) +void cv::cuda::BFMatcher_CUDA::matchConvert(const Mat& trainIdx, const Mat& imgIdx, const Mat& distance, std::vector& matches) { if (trainIdx.empty() || imgIdx.empty() || distance.empty()) return; @@ -428,7 +428,7 @@ void cv::cuda::BFMatcher_GPU::matchConvert(const Mat& trainIdx, const Mat& imgId } } -void cv::cuda::BFMatcher_GPU::match(const GpuMat& query, std::vector& matches, const std::vector& masks) +void cv::cuda::BFMatcher_CUDA::match(const GpuMat& query, std::vector& matches, const std::vector& masks) { GpuMat trainCollection; GpuMat maskCollection; @@ -444,7 +444,7 @@ void cv::cuda::BFMatcher_GPU::match(const GpuMat& query, std::vector& ma //////////////////////////////////////////////////////////////////// // KnnMatch -void cv::cuda::BFMatcher_GPU::knnMatchSingle(const GpuMat& query, const GpuMat& train, +void cv::cuda::BFMatcher_CUDA::knnMatchSingle(const GpuMat& query, const GpuMat& train, GpuMat& trainIdx, GpuMat& distance, GpuMat& allDist, int k, const GpuMat& mask, Stream& stream) { @@ -505,7 +505,7 @@ void cv::cuda::BFMatcher_GPU::knnMatchSingle(const GpuMat& query, const GpuMat& func(query, train, k, mask, trainIdx, distance, allDist, StreamAccessor::getStream(stream)); } -void cv::cuda::BFMatcher_GPU::knnMatchDownload(const GpuMat& trainIdx, const GpuMat& distance, +void cv::cuda::BFMatcher_CUDA::knnMatchDownload(const GpuMat& trainIdx, const GpuMat& distance, std::vector< std::vector >& matches, bool compactResult) { if (trainIdx.empty() || distance.empty()) @@ -517,7 +517,7 @@ void cv::cuda::BFMatcher_GPU::knnMatchDownload(const GpuMat& trainIdx, const Gpu knnMatchConvert(trainIdxCPU, distanceCPU, matches, compactResult); } -void cv::cuda::BFMatcher_GPU::knnMatchConvert(const Mat& trainIdx, const Mat& distance, +void cv::cuda::BFMatcher_CUDA::knnMatchConvert(const Mat& trainIdx, const Mat& distance, std::vector< std::vector >& matches, bool compactResult) { if (trainIdx.empty() || distance.empty()) @@ -562,7 +562,7 @@ void cv::cuda::BFMatcher_GPU::knnMatchConvert(const Mat& trainIdx, const Mat& di } } -void cv::cuda::BFMatcher_GPU::knnMatch(const GpuMat& query, const GpuMat& train, +void cv::cuda::BFMatcher_CUDA::knnMatch(const GpuMat& query, const GpuMat& train, std::vector< std::vector >& matches, int k, const GpuMat& mask, bool compactResult) { GpuMat trainIdx, distance, allDist; @@ -570,7 +570,7 @@ void cv::cuda::BFMatcher_GPU::knnMatch(const GpuMat& query, const GpuMat& train, knnMatchDownload(trainIdx, distance, matches, compactResult); } -void cv::cuda::BFMatcher_GPU::knnMatch2Collection(const GpuMat& query, const GpuMat& trainCollection, +void cv::cuda::BFMatcher_CUDA::knnMatch2Collection(const GpuMat& query, const GpuMat& trainCollection, GpuMat& trainIdx, GpuMat& imgIdx, GpuMat& distance, const GpuMat& maskCollection, Stream& stream) { @@ -621,7 +621,7 @@ void cv::cuda::BFMatcher_GPU::knnMatch2Collection(const GpuMat& query, const Gpu func(query, trainCollection, maskCollection, trainIdx, imgIdx, distance, StreamAccessor::getStream(stream)); } -void cv::cuda::BFMatcher_GPU::knnMatch2Download(const GpuMat& trainIdx, const GpuMat& imgIdx, const GpuMat& distance, +void cv::cuda::BFMatcher_CUDA::knnMatch2Download(const GpuMat& trainIdx, const GpuMat& imgIdx, const GpuMat& distance, std::vector< std::vector >& matches, bool compactResult) { if (trainIdx.empty() || imgIdx.empty() || distance.empty()) @@ -634,7 +634,7 @@ void cv::cuda::BFMatcher_GPU::knnMatch2Download(const GpuMat& trainIdx, const Gp knnMatch2Convert(trainIdxCPU, imgIdxCPU, distanceCPU, matches, compactResult); } -void cv::cuda::BFMatcher_GPU::knnMatch2Convert(const Mat& trainIdx, const Mat& imgIdx, const Mat& distance, +void cv::cuda::BFMatcher_CUDA::knnMatch2Convert(const Mat& trainIdx, const Mat& imgIdx, const Mat& distance, std::vector< std::vector >& matches, bool compactResult) { if (trainIdx.empty() || imgIdx.empty() || distance.empty()) @@ -690,7 +690,7 @@ namespace }; } -void cv::cuda::BFMatcher_GPU::knnMatch(const GpuMat& query, std::vector< std::vector >& matches, int k, +void cv::cuda::BFMatcher_CUDA::knnMatch(const GpuMat& query, std::vector< std::vector >& matches, int k, const std::vector& masks, bool compactResult) { if (k == 2) @@ -748,7 +748,7 @@ void cv::cuda::BFMatcher_GPU::knnMatch(const GpuMat& query, std::vector< std::ve //////////////////////////////////////////////////////////////////// // RadiusMatch -void cv::cuda::BFMatcher_GPU::radiusMatchSingle(const GpuMat& query, const GpuMat& train, +void cv::cuda::BFMatcher_CUDA::radiusMatchSingle(const GpuMat& query, const GpuMat& train, GpuMat& trainIdx, GpuMat& distance, GpuMat& nMatches, float maxDistance, const GpuMat& mask, Stream& stream) { @@ -805,7 +805,7 @@ void cv::cuda::BFMatcher_GPU::radiusMatchSingle(const GpuMat& query, const GpuMa func(query, train, maxDistance, mask, trainIdx, distance, nMatches, StreamAccessor::getStream(stream)); } -void cv::cuda::BFMatcher_GPU::radiusMatchDownload(const GpuMat& trainIdx, const GpuMat& distance, const GpuMat& nMatches, +void cv::cuda::BFMatcher_CUDA::radiusMatchDownload(const GpuMat& trainIdx, const GpuMat& distance, const GpuMat& nMatches, std::vector< std::vector >& matches, bool compactResult) { if (trainIdx.empty() || distance.empty() || nMatches.empty()) @@ -818,7 +818,7 @@ void cv::cuda::BFMatcher_GPU::radiusMatchDownload(const GpuMat& trainIdx, const radiusMatchConvert(trainIdxCPU, distanceCPU, nMatchesCPU, matches, compactResult); } -void cv::cuda::BFMatcher_GPU::radiusMatchConvert(const Mat& trainIdx, const Mat& distance, const Mat& nMatches, +void cv::cuda::BFMatcher_CUDA::radiusMatchConvert(const Mat& trainIdx, const Mat& distance, const Mat& nMatches, std::vector< std::vector >& matches, bool compactResult) { if (trainIdx.empty() || distance.empty() || nMatches.empty()) @@ -867,7 +867,7 @@ void cv::cuda::BFMatcher_GPU::radiusMatchConvert(const Mat& trainIdx, const Mat& } } -void cv::cuda::BFMatcher_GPU::radiusMatch(const GpuMat& query, const GpuMat& train, +void cv::cuda::BFMatcher_CUDA::radiusMatch(const GpuMat& query, const GpuMat& train, std::vector< std::vector >& matches, float maxDistance, const GpuMat& mask, bool compactResult) { GpuMat trainIdx, distance, nMatches; @@ -875,7 +875,7 @@ void cv::cuda::BFMatcher_GPU::radiusMatch(const GpuMat& query, const GpuMat& tra radiusMatchDownload(trainIdx, distance, nMatches, matches, compactResult); } -void cv::cuda::BFMatcher_GPU::radiusMatchCollection(const GpuMat& query, GpuMat& trainIdx, GpuMat& imgIdx, GpuMat& distance, GpuMat& nMatches, +void cv::cuda::BFMatcher_CUDA::radiusMatchCollection(const GpuMat& query, GpuMat& trainIdx, GpuMat& imgIdx, GpuMat& distance, GpuMat& nMatches, float maxDistance, const std::vector& masks, Stream& stream) { if (query.empty() || empty()) @@ -934,7 +934,7 @@ void cv::cuda::BFMatcher_GPU::radiusMatchCollection(const GpuMat& query, GpuMat& trainIdx, imgIdx, distance, nMatches, StreamAccessor::getStream(stream)); } -void cv::cuda::BFMatcher_GPU::radiusMatchDownload(const GpuMat& trainIdx, const GpuMat& imgIdx, const GpuMat& distance, const GpuMat& nMatches, +void cv::cuda::BFMatcher_CUDA::radiusMatchDownload(const GpuMat& trainIdx, const GpuMat& imgIdx, const GpuMat& distance, const GpuMat& nMatches, std::vector< std::vector >& matches, bool compactResult) { if (trainIdx.empty() || imgIdx.empty() || distance.empty() || nMatches.empty()) @@ -948,7 +948,7 @@ void cv::cuda::BFMatcher_GPU::radiusMatchDownload(const GpuMat& trainIdx, const radiusMatchConvert(trainIdxCPU, imgIdxCPU, distanceCPU, nMatchesCPU, matches, compactResult); } -void cv::cuda::BFMatcher_GPU::radiusMatchConvert(const Mat& trainIdx, const Mat& imgIdx, const Mat& distance, const Mat& nMatches, +void cv::cuda::BFMatcher_CUDA::radiusMatchConvert(const Mat& trainIdx, const Mat& imgIdx, const Mat& distance, const Mat& nMatches, std::vector< std::vector >& matches, bool compactResult) { if (trainIdx.empty() || imgIdx.empty() || distance.empty() || nMatches.empty()) @@ -1000,7 +1000,7 @@ void cv::cuda::BFMatcher_GPU::radiusMatchConvert(const Mat& trainIdx, const Mat& } } -void cv::cuda::BFMatcher_GPU::radiusMatch(const GpuMat& query, std::vector< std::vector >& matches, +void cv::cuda::BFMatcher_CUDA::radiusMatch(const GpuMat& query, std::vector< std::vector >& matches, float maxDistance, const std::vector& masks, bool compactResult) { GpuMat trainIdx, imgIdx, distance, nMatches; diff --git a/modules/cudafeatures2d/src/fast.cpp b/modules/cudafeatures2d/src/fast.cpp index e6be96596..b47aa4774 100644 --- a/modules/cudafeatures2d/src/fast.cpp +++ b/modules/cudafeatures2d/src/fast.cpp @@ -47,23 +47,23 @@ using namespace cv::cuda; #if !defined (HAVE_CUDA) || defined (CUDA_DISABLER) -cv::cuda::FAST_GPU::FAST_GPU(int, bool, double) { throw_no_cuda(); } -void cv::cuda::FAST_GPU::operator ()(const GpuMat&, const GpuMat&, GpuMat&) { throw_no_cuda(); } -void cv::cuda::FAST_GPU::operator ()(const GpuMat&, const GpuMat&, std::vector&) { throw_no_cuda(); } -void cv::cuda::FAST_GPU::downloadKeypoints(const GpuMat&, std::vector&) { throw_no_cuda(); } -void cv::cuda::FAST_GPU::convertKeypoints(const Mat&, std::vector&) { throw_no_cuda(); } -void cv::cuda::FAST_GPU::release() { throw_no_cuda(); } -int cv::cuda::FAST_GPU::calcKeyPointsLocation(const GpuMat&, const GpuMat&) { throw_no_cuda(); return 0; } -int cv::cuda::FAST_GPU::getKeyPoints(GpuMat&) { throw_no_cuda(); return 0; } +cv::cuda::FAST_CUDA::FAST_CUDA(int, bool, double) { throw_no_cuda(); } +void cv::cuda::FAST_CUDA::operator ()(const GpuMat&, const GpuMat&, GpuMat&) { throw_no_cuda(); } +void cv::cuda::FAST_CUDA::operator ()(const GpuMat&, const GpuMat&, std::vector&) { throw_no_cuda(); } +void cv::cuda::FAST_CUDA::downloadKeypoints(const GpuMat&, std::vector&) { throw_no_cuda(); } +void cv::cuda::FAST_CUDA::convertKeypoints(const Mat&, std::vector&) { throw_no_cuda(); } +void cv::cuda::FAST_CUDA::release() { throw_no_cuda(); } +int cv::cuda::FAST_CUDA::calcKeyPointsLocation(const GpuMat&, const GpuMat&) { throw_no_cuda(); return 0; } +int cv::cuda::FAST_CUDA::getKeyPoints(GpuMat&) { throw_no_cuda(); return 0; } #else /* !defined (HAVE_CUDA) */ -cv::cuda::FAST_GPU::FAST_GPU(int _threshold, bool _nonmaxSupression, double _keypointsRatio) : +cv::cuda::FAST_CUDA::FAST_CUDA(int _threshold, bool _nonmaxSupression, double _keypointsRatio) : nonmaxSupression(_nonmaxSupression), threshold(_threshold), keypointsRatio(_keypointsRatio), count_(0) { } -void cv::cuda::FAST_GPU::operator ()(const GpuMat& image, const GpuMat& mask, std::vector& keypoints) +void cv::cuda::FAST_CUDA::operator ()(const GpuMat& image, const GpuMat& mask, std::vector& keypoints) { if (image.empty()) return; @@ -72,7 +72,7 @@ void cv::cuda::FAST_GPU::operator ()(const GpuMat& image, const GpuMat& mask, st downloadKeypoints(d_keypoints_, keypoints); } -void cv::cuda::FAST_GPU::downloadKeypoints(const GpuMat& d_keypoints, std::vector& keypoints) +void cv::cuda::FAST_CUDA::downloadKeypoints(const GpuMat& d_keypoints, std::vector& keypoints) { if (d_keypoints.empty()) return; @@ -81,7 +81,7 @@ void cv::cuda::FAST_GPU::downloadKeypoints(const GpuMat& d_keypoints, std::vecto convertKeypoints(h_keypoints, keypoints); } -void cv::cuda::FAST_GPU::convertKeypoints(const Mat& h_keypoints, std::vector& keypoints) +void cv::cuda::FAST_CUDA::convertKeypoints(const Mat& h_keypoints, std::vector& keypoints) { if (h_keypoints.empty()) return; @@ -102,7 +102,7 @@ void cv::cuda::FAST_GPU::convertKeypoints(const Mat& h_keypoints, std::vector&) { throw_no_cuda(); } -void cv::cuda::ORB_GPU::operator()(const GpuMat&, const GpuMat&, GpuMat&) { throw_no_cuda(); } -void cv::cuda::ORB_GPU::operator()(const GpuMat&, const GpuMat&, std::vector&, GpuMat&) { throw_no_cuda(); } -void cv::cuda::ORB_GPU::operator()(const GpuMat&, const GpuMat&, GpuMat&, GpuMat&) { throw_no_cuda(); } -void cv::cuda::ORB_GPU::downloadKeyPoints(const GpuMat&, std::vector&) { throw_no_cuda(); } -void cv::cuda::ORB_GPU::convertKeyPoints(const Mat&, std::vector&) { throw_no_cuda(); } -void cv::cuda::ORB_GPU::release() { throw_no_cuda(); } -void cv::cuda::ORB_GPU::buildScalePyramids(const GpuMat&, const GpuMat&) { throw_no_cuda(); } -void cv::cuda::ORB_GPU::computeKeyPointsPyramid() { throw_no_cuda(); } -void cv::cuda::ORB_GPU::computeDescriptors(GpuMat&) { throw_no_cuda(); } -void cv::cuda::ORB_GPU::mergeKeyPoints(GpuMat&) { throw_no_cuda(); } +cv::cuda::ORB_CUDA::ORB_CUDA(int, float, int, int, int, int, int, int) : fastDetector_(20) { throw_no_cuda(); } +void cv::cuda::ORB_CUDA::operator()(const GpuMat&, const GpuMat&, std::vector&) { throw_no_cuda(); } +void cv::cuda::ORB_CUDA::operator()(const GpuMat&, const GpuMat&, GpuMat&) { throw_no_cuda(); } +void cv::cuda::ORB_CUDA::operator()(const GpuMat&, const GpuMat&, std::vector&, GpuMat&) { throw_no_cuda(); } +void cv::cuda::ORB_CUDA::operator()(const GpuMat&, const GpuMat&, GpuMat&, GpuMat&) { throw_no_cuda(); } +void cv::cuda::ORB_CUDA::downloadKeyPoints(const GpuMat&, std::vector&) { throw_no_cuda(); } +void cv::cuda::ORB_CUDA::convertKeyPoints(const Mat&, std::vector&) { throw_no_cuda(); } +void cv::cuda::ORB_CUDA::release() { throw_no_cuda(); } +void cv::cuda::ORB_CUDA::buildScalePyramids(const GpuMat&, const GpuMat&) { throw_no_cuda(); } +void cv::cuda::ORB_CUDA::computeKeyPointsPyramid() { throw_no_cuda(); } +void cv::cuda::ORB_CUDA::computeDescriptors(GpuMat&) { throw_no_cuda(); } +void cv::cuda::ORB_CUDA::mergeKeyPoints(GpuMat&) { throw_no_cuda(); } #else /* !defined (HAVE_CUDA) */ @@ -395,7 +395,7 @@ namespace } } -cv::cuda::ORB_GPU::ORB_GPU(int nFeatures, float scaleFactor, int nLevels, int edgeThreshold, int firstLevel, int WTA_K, int scoreType, int patchSize) : +cv::cuda::ORB_CUDA::ORB_CUDA(int nFeatures, float scaleFactor, int nLevels, int edgeThreshold, int firstLevel, int WTA_K, int scoreType, int patchSize) : nFeatures_(nFeatures), scaleFactor_(scaleFactor), nLevels_(nLevels), edgeThreshold_(edgeThreshold), firstLevel_(firstLevel), WTA_K_(WTA_K), scoreType_(scoreType), patchSize_(patchSize), fastDetector_(DEFAULT_FAST_THRESHOLD) @@ -481,7 +481,7 @@ namespace } } -void cv::cuda::ORB_GPU::buildScalePyramids(const GpuMat& image, const GpuMat& mask) +void cv::cuda::ORB_CUDA::buildScalePyramids(const GpuMat& image, const GpuMat& mask) { CV_Assert(image.type() == CV_8UC1); CV_Assert(mask.empty() || (mask.type() == CV_8UC1 && mask.size() == image.size())); @@ -554,12 +554,12 @@ namespace return; } - count = cull_gpu(keypoints.ptr(FAST_GPU::LOCATION_ROW), keypoints.ptr(FAST_GPU::RESPONSE_ROW), count, n_points); + count = cull_gpu(keypoints.ptr(FAST_CUDA::LOCATION_ROW), keypoints.ptr(FAST_CUDA::RESPONSE_ROW), count, n_points); } } } -void cv::cuda::ORB_GPU::computeKeyPointsPyramid() +void cv::cuda::ORB_CUDA::computeKeyPointsPyramid() { using namespace cv::cuda::device::orb; @@ -602,7 +602,7 @@ void cv::cuda::ORB_GPU::computeKeyPointsPyramid() } } -void cv::cuda::ORB_GPU::computeDescriptors(GpuMat& descriptors) +void cv::cuda::ORB_CUDA::computeDescriptors(GpuMat& descriptors) { using namespace cv::cuda::device::orb; @@ -642,7 +642,7 @@ void cv::cuda::ORB_GPU::computeDescriptors(GpuMat& descriptors) } } -void cv::cuda::ORB_GPU::mergeKeyPoints(GpuMat& keypoints) +void cv::cuda::ORB_CUDA::mergeKeyPoints(GpuMat& keypoints) { using namespace cv::cuda::device::orb; @@ -684,7 +684,7 @@ void cv::cuda::ORB_GPU::mergeKeyPoints(GpuMat& keypoints) } } -void cv::cuda::ORB_GPU::downloadKeyPoints(const GpuMat &d_keypoints, std::vector& keypoints) +void cv::cuda::ORB_CUDA::downloadKeyPoints(const GpuMat &d_keypoints, std::vector& keypoints) { if (d_keypoints.empty()) { @@ -697,7 +697,7 @@ void cv::cuda::ORB_GPU::downloadKeyPoints(const GpuMat &d_keypoints, std::vector convertKeyPoints(h_keypoints, keypoints); } -void cv::cuda::ORB_GPU::convertKeyPoints(const Mat &d_keypoints, std::vector& keypoints) +void cv::cuda::ORB_CUDA::convertKeyPoints(const Mat &d_keypoints, std::vector& keypoints) { if (d_keypoints.empty()) { @@ -731,14 +731,14 @@ void cv::cuda::ORB_GPU::convertKeyPoints(const Mat &d_keypoints, std::vector& keypoints) +void cv::cuda::ORB_CUDA::operator()(const GpuMat& image, const GpuMat& mask, std::vector& keypoints) { (*this)(image, mask, d_keypoints_); downloadKeyPoints(d_keypoints_, keypoints); } -void cv::cuda::ORB_GPU::operator()(const GpuMat& image, const GpuMat& mask, std::vector& keypoints, GpuMat& descriptors) +void cv::cuda::ORB_CUDA::operator()(const GpuMat& image, const GpuMat& mask, std::vector& keypoints, GpuMat& descriptors) { (*this)(image, mask, d_keypoints_, descriptors); downloadKeyPoints(d_keypoints_, keypoints); } -void cv::cuda::ORB_GPU::release() +void cv::cuda::ORB_CUDA::release() { imagePyr_.clear(); maskPyr_.clear(); diff --git a/modules/cudafeatures2d/test/test_features2d.cpp b/modules/cudafeatures2d/test/test_features2d.cpp index a4995c00a..eeadd736f 100644 --- a/modules/cudafeatures2d/test/test_features2d.cpp +++ b/modules/cudafeatures2d/test/test_features2d.cpp @@ -71,12 +71,12 @@ PARAM_TEST_CASE(FAST, cv::cuda::DeviceInfo, FAST_Threshold, FAST_NonmaxSupressio } }; -GPU_TEST_P(FAST, Accuracy) +CUDA_TEST_P(FAST, Accuracy) { cv::Mat image = readImage("features2d/aloe.png", cv::IMREAD_GRAYSCALE); ASSERT_FALSE(image.empty()); - cv::cuda::FAST_GPU fast(threshold); + cv::cuda::FAST_CUDA fast(threshold); fast.nonmaxSupression = nonmaxSupression; if (!supportFeature(devInfo, cv::cuda::GLOBAL_ATOMICS)) @@ -103,7 +103,7 @@ GPU_TEST_P(FAST, Accuracy) } } -INSTANTIATE_TEST_CASE_P(GPU_Features2D, FAST, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_Features2D, FAST, testing::Combine( ALL_DEVICES, testing::Values(FAST_Threshold(25), FAST_Threshold(50)), testing::Values(FAST_NonmaxSupression(false), FAST_NonmaxSupression(true)))); @@ -155,7 +155,7 @@ PARAM_TEST_CASE(ORB, cv::cuda::DeviceInfo, ORB_FeaturesCount, ORB_ScaleFactor, O } }; -GPU_TEST_P(ORB, Accuracy) +CUDA_TEST_P(ORB, Accuracy) { cv::Mat image = readImage("features2d/aloe.png", cv::IMREAD_GRAYSCALE); ASSERT_FALSE(image.empty()); @@ -163,7 +163,7 @@ GPU_TEST_P(ORB, Accuracy) cv::Mat mask(image.size(), CV_8UC1, cv::Scalar::all(1)); mask(cv::Range(0, image.rows / 2), cv::Range(0, image.cols / 2)).setTo(cv::Scalar::all(0)); - cv::cuda::ORB_GPU orb(nFeatures, scaleFactor, nLevels, edgeThreshold, firstLevel, WTA_K, scoreType, patchSize); + cv::cuda::ORB_CUDA orb(nFeatures, scaleFactor, nLevels, edgeThreshold, firstLevel, WTA_K, scoreType, patchSize); orb.blurForDescriptor = blurForDescriptor; if (!supportFeature(devInfo, cv::cuda::GLOBAL_ATOMICS)) @@ -202,7 +202,7 @@ GPU_TEST_P(ORB, Accuracy) } } -INSTANTIATE_TEST_CASE_P(GPU_Features2D, ORB, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_Features2D, ORB, testing::Combine( ALL_DEVICES, testing::Values(ORB_FeaturesCount(1000)), testing::Values(ORB_ScaleFactor(1.2f)), @@ -283,9 +283,9 @@ PARAM_TEST_CASE(BruteForceMatcher, cv::cuda::DeviceInfo, NormCode, DescriptorSiz } }; -GPU_TEST_P(BruteForceMatcher, Match_Single) +CUDA_TEST_P(BruteForceMatcher, Match_Single) { - cv::cuda::BFMatcher_GPU matcher(normCode); + cv::cuda::BFMatcher_CUDA matcher(normCode); cv::cuda::GpuMat mask; if (useMask) @@ -310,9 +310,9 @@ GPU_TEST_P(BruteForceMatcher, Match_Single) ASSERT_EQ(0, badCount); } -GPU_TEST_P(BruteForceMatcher, Match_Collection) +CUDA_TEST_P(BruteForceMatcher, Match_Collection) { - cv::cuda::BFMatcher_GPU matcher(normCode); + cv::cuda::BFMatcher_CUDA matcher(normCode); cv::cuda::GpuMat d_train(train); @@ -364,9 +364,9 @@ GPU_TEST_P(BruteForceMatcher, Match_Collection) ASSERT_EQ(0, badCount); } -GPU_TEST_P(BruteForceMatcher, KnnMatch_2_Single) +CUDA_TEST_P(BruteForceMatcher, KnnMatch_2_Single) { - cv::cuda::BFMatcher_GPU matcher(normCode); + cv::cuda::BFMatcher_CUDA matcher(normCode); const int knn = 2; @@ -403,9 +403,9 @@ GPU_TEST_P(BruteForceMatcher, KnnMatch_2_Single) ASSERT_EQ(0, badCount); } -GPU_TEST_P(BruteForceMatcher, KnnMatch_3_Single) +CUDA_TEST_P(BruteForceMatcher, KnnMatch_3_Single) { - cv::cuda::BFMatcher_GPU matcher(normCode); + cv::cuda::BFMatcher_CUDA matcher(normCode); const int knn = 3; @@ -442,9 +442,9 @@ GPU_TEST_P(BruteForceMatcher, KnnMatch_3_Single) ASSERT_EQ(0, badCount); } -GPU_TEST_P(BruteForceMatcher, KnnMatch_2_Collection) +CUDA_TEST_P(BruteForceMatcher, KnnMatch_2_Collection) { - cv::cuda::BFMatcher_GPU matcher(normCode); + cv::cuda::BFMatcher_CUDA matcher(normCode); const int knn = 2; @@ -504,9 +504,9 @@ GPU_TEST_P(BruteForceMatcher, KnnMatch_2_Collection) ASSERT_EQ(0, badCount); } -GPU_TEST_P(BruteForceMatcher, KnnMatch_3_Collection) +CUDA_TEST_P(BruteForceMatcher, KnnMatch_3_Collection) { - cv::cuda::BFMatcher_GPU matcher(normCode); + cv::cuda::BFMatcher_CUDA matcher(normCode); const int knn = 3; @@ -566,9 +566,9 @@ GPU_TEST_P(BruteForceMatcher, KnnMatch_3_Collection) ASSERT_EQ(0, badCount); } -GPU_TEST_P(BruteForceMatcher, RadiusMatch_Single) +CUDA_TEST_P(BruteForceMatcher, RadiusMatch_Single) { - cv::cuda::BFMatcher_GPU matcher(normCode); + cv::cuda::BFMatcher_CUDA matcher(normCode); const float radius = 1.f / countFactor; @@ -615,9 +615,9 @@ GPU_TEST_P(BruteForceMatcher, RadiusMatch_Single) } } -GPU_TEST_P(BruteForceMatcher, RadiusMatch_Collection) +CUDA_TEST_P(BruteForceMatcher, RadiusMatch_Collection) { - cv::cuda::BFMatcher_GPU matcher(normCode); + cv::cuda::BFMatcher_CUDA matcher(normCode); const int n = 3; const float radius = 1.f / countFactor * n; @@ -694,7 +694,7 @@ GPU_TEST_P(BruteForceMatcher, RadiusMatch_Collection) } } -INSTANTIATE_TEST_CASE_P(GPU_Features2D, BruteForceMatcher, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_Features2D, BruteForceMatcher, testing::Combine( ALL_DEVICES, testing::Values(NormCode(cv::NORM_L1), NormCode(cv::NORM_L2)), testing::Values(DescriptorSize(57), DescriptorSize(64), DescriptorSize(83), DescriptorSize(128), DescriptorSize(179), DescriptorSize(256), DescriptorSize(304)), diff --git a/modules/cudafeatures2d/test/test_main.cpp b/modules/cudafeatures2d/test/test_main.cpp index eea3d7c00..04f4fcf6e 100644 --- a/modules/cudafeatures2d/test/test_main.cpp +++ b/modules/cudafeatures2d/test/test_main.cpp @@ -42,4 +42,4 @@ #include "test_precomp.hpp" -CV_GPU_TEST_MAIN("gpu") +CV_CUDA_TEST_MAIN("gpu") diff --git a/modules/cudafilters/perf/perf_filters.cpp b/modules/cudafilters/perf/perf_filters.cpp index 4a2ae2a61..e6bb200bb 100644 --- a/modules/cudafilters/perf/perf_filters.cpp +++ b/modules/cudafilters/perf/perf_filters.cpp @@ -52,7 +52,7 @@ using namespace perf; DEF_PARAM_TEST(Sz_Type_KernelSz, cv::Size, MatType, int); PERF_TEST_P(Sz_Type_KernelSz, Blur, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8UC1, CV_8UC4), Values(3, 5, 7))) { @@ -65,7 +65,7 @@ PERF_TEST_P(Sz_Type_KernelSz, Blur, cv::Mat src(size, type); declare.in(src, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; @@ -74,7 +74,7 @@ PERF_TEST_P(Sz_Type_KernelSz, Blur, TEST_CYCLE() blurFilter->apply(d_src, dst); - GPU_SANITY_CHECK(dst, 1); + CUDA_SANITY_CHECK(dst, 1); } else { @@ -89,7 +89,7 @@ PERF_TEST_P(Sz_Type_KernelSz, Blur, ////////////////////////////////////////////////////////////////////// // Filter2D -PERF_TEST_P(Sz_Type_KernelSz, Filter2D, Combine(GPU_TYPICAL_MAT_SIZES, Values(CV_8UC1, CV_8UC4, CV_32FC1, CV_32FC4), Values(3, 5, 7, 9, 11, 13, 15))) +PERF_TEST_P(Sz_Type_KernelSz, Filter2D, Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8UC1, CV_8UC4, CV_32FC1, CV_32FC4), Values(3, 5, 7, 9, 11, 13, 15))) { declare.time(20.0); @@ -103,7 +103,7 @@ PERF_TEST_P(Sz_Type_KernelSz, Filter2D, Combine(GPU_TYPICAL_MAT_SIZES, Values(CV cv::Mat kernel(ksize, ksize, CV_32FC1); declare.in(kernel, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; @@ -112,7 +112,7 @@ PERF_TEST_P(Sz_Type_KernelSz, Filter2D, Combine(GPU_TYPICAL_MAT_SIZES, Values(CV TEST_CYCLE() filter2D->apply(d_src, dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -127,7 +127,7 @@ PERF_TEST_P(Sz_Type_KernelSz, Filter2D, Combine(GPU_TYPICAL_MAT_SIZES, Values(CV ////////////////////////////////////////////////////////////////////// // Laplacian -PERF_TEST_P(Sz_Type_KernelSz, Laplacian, Combine(GPU_TYPICAL_MAT_SIZES, Values(CV_8UC1, CV_8UC4, CV_32FC1, CV_32FC4), Values(1, 3))) +PERF_TEST_P(Sz_Type_KernelSz, Laplacian, Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8UC1, CV_8UC4, CV_32FC1, CV_32FC4), Values(1, 3))) { declare.time(20.0); @@ -138,7 +138,7 @@ PERF_TEST_P(Sz_Type_KernelSz, Laplacian, Combine(GPU_TYPICAL_MAT_SIZES, Values(C cv::Mat src(size, type); declare.in(src, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; @@ -147,7 +147,7 @@ PERF_TEST_P(Sz_Type_KernelSz, Laplacian, Combine(GPU_TYPICAL_MAT_SIZES, Values(C TEST_CYCLE() laplacian->apply(d_src, dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -162,7 +162,7 @@ PERF_TEST_P(Sz_Type_KernelSz, Laplacian, Combine(GPU_TYPICAL_MAT_SIZES, Values(C ////////////////////////////////////////////////////////////////////// // Sobel -PERF_TEST_P(Sz_Type_KernelSz, Sobel, Combine(GPU_TYPICAL_MAT_SIZES, Values(CV_8UC1, CV_8UC4, CV_32FC1), Values(3, 5, 7, 9, 11, 13, 15))) +PERF_TEST_P(Sz_Type_KernelSz, Sobel, Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8UC1, CV_8UC4, CV_32FC1), Values(3, 5, 7, 9, 11, 13, 15))) { declare.time(20.0); @@ -173,7 +173,7 @@ PERF_TEST_P(Sz_Type_KernelSz, Sobel, Combine(GPU_TYPICAL_MAT_SIZES, Values(CV_8U cv::Mat src(size, type); declare.in(src, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; @@ -182,7 +182,7 @@ PERF_TEST_P(Sz_Type_KernelSz, Sobel, Combine(GPU_TYPICAL_MAT_SIZES, Values(CV_8U TEST_CYCLE() sobel->apply(d_src, dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -197,7 +197,7 @@ PERF_TEST_P(Sz_Type_KernelSz, Sobel, Combine(GPU_TYPICAL_MAT_SIZES, Values(CV_8U ////////////////////////////////////////////////////////////////////// // Scharr -PERF_TEST_P(Sz_Type, Scharr, Combine(GPU_TYPICAL_MAT_SIZES, Values(CV_8UC1, CV_8UC4, CV_32FC1))) +PERF_TEST_P(Sz_Type, Scharr, Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8UC1, CV_8UC4, CV_32FC1))) { declare.time(20.0); @@ -207,7 +207,7 @@ PERF_TEST_P(Sz_Type, Scharr, Combine(GPU_TYPICAL_MAT_SIZES, Values(CV_8UC1, CV_8 cv::Mat src(size, type); declare.in(src, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; @@ -216,7 +216,7 @@ PERF_TEST_P(Sz_Type, Scharr, Combine(GPU_TYPICAL_MAT_SIZES, Values(CV_8UC1, CV_8 TEST_CYCLE() scharr->apply(d_src, dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -231,7 +231,7 @@ PERF_TEST_P(Sz_Type, Scharr, Combine(GPU_TYPICAL_MAT_SIZES, Values(CV_8UC1, CV_8 ////////////////////////////////////////////////////////////////////// // GaussianBlur -PERF_TEST_P(Sz_Type_KernelSz, GaussianBlur, Combine(GPU_TYPICAL_MAT_SIZES, Values(CV_8UC1, CV_8UC4, CV_32FC1), Values(3, 5, 7, 9, 11, 13, 15))) +PERF_TEST_P(Sz_Type_KernelSz, GaussianBlur, Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8UC1, CV_8UC4, CV_32FC1), Values(3, 5, 7, 9, 11, 13, 15))) { declare.time(20.0); @@ -242,7 +242,7 @@ PERF_TEST_P(Sz_Type_KernelSz, GaussianBlur, Combine(GPU_TYPICAL_MAT_SIZES, Value cv::Mat src(size, type); declare.in(src, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; @@ -251,7 +251,7 @@ PERF_TEST_P(Sz_Type_KernelSz, GaussianBlur, Combine(GPU_TYPICAL_MAT_SIZES, Value TEST_CYCLE() gauss->apply(d_src, dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -266,7 +266,7 @@ PERF_TEST_P(Sz_Type_KernelSz, GaussianBlur, Combine(GPU_TYPICAL_MAT_SIZES, Value ////////////////////////////////////////////////////////////////////// // Erode -PERF_TEST_P(Sz_Type, Erode, Combine(GPU_TYPICAL_MAT_SIZES, Values(CV_8UC1, CV_8UC4))) +PERF_TEST_P(Sz_Type, Erode, Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8UC1, CV_8UC4))) { declare.time(20.0); @@ -278,7 +278,7 @@ PERF_TEST_P(Sz_Type, Erode, Combine(GPU_TYPICAL_MAT_SIZES, Values(CV_8UC1, CV_8U const cv::Mat ker = cv::getStructuringElement(cv::MORPH_RECT, cv::Size(3, 3)); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; @@ -287,7 +287,7 @@ PERF_TEST_P(Sz_Type, Erode, Combine(GPU_TYPICAL_MAT_SIZES, Values(CV_8UC1, CV_8U TEST_CYCLE() erode->apply(d_src, dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -302,7 +302,7 @@ PERF_TEST_P(Sz_Type, Erode, Combine(GPU_TYPICAL_MAT_SIZES, Values(CV_8UC1, CV_8U ////////////////////////////////////////////////////////////////////// // Dilate -PERF_TEST_P(Sz_Type, Dilate, Combine(GPU_TYPICAL_MAT_SIZES, Values(CV_8UC1, CV_8UC4))) +PERF_TEST_P(Sz_Type, Dilate, Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8UC1, CV_8UC4))) { declare.time(20.0); @@ -314,7 +314,7 @@ PERF_TEST_P(Sz_Type, Dilate, Combine(GPU_TYPICAL_MAT_SIZES, Values(CV_8UC1, CV_8 const cv::Mat ker = cv::getStructuringElement(cv::MORPH_RECT, cv::Size(3, 3)); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; @@ -323,7 +323,7 @@ PERF_TEST_P(Sz_Type, Dilate, Combine(GPU_TYPICAL_MAT_SIZES, Values(CV_8UC1, CV_8 TEST_CYCLE() dilate->apply(d_src, dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -342,7 +342,7 @@ CV_ENUM(MorphOp, MORPH_OPEN, MORPH_CLOSE, MORPH_GRADIENT, MORPH_TOPHAT, MORPH_BL DEF_PARAM_TEST(Sz_Type_Op, cv::Size, MatType, MorphOp); -PERF_TEST_P(Sz_Type_Op, MorphologyEx, Combine(GPU_TYPICAL_MAT_SIZES, Values(CV_8UC1, CV_8UC4), MorphOp::all())) +PERF_TEST_P(Sz_Type_Op, MorphologyEx, Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8UC1, CV_8UC4), MorphOp::all())) { declare.time(20.0); @@ -355,7 +355,7 @@ PERF_TEST_P(Sz_Type_Op, MorphologyEx, Combine(GPU_TYPICAL_MAT_SIZES, Values(CV_8 const cv::Mat ker = cv::getStructuringElement(cv::MORPH_RECT, cv::Size(3, 3)); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; @@ -364,7 +364,7 @@ PERF_TEST_P(Sz_Type_Op, MorphologyEx, Combine(GPU_TYPICAL_MAT_SIZES, Values(CV_8 TEST_CYCLE() morph->apply(d_src, dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { diff --git a/modules/cudafilters/test/test_filters.cpp b/modules/cudafilters/test/test_filters.cpp index cff71ae46..97661b0ca 100644 --- a/modules/cudafilters/test/test_filters.cpp +++ b/modules/cudafilters/test/test_filters.cpp @@ -94,7 +94,7 @@ PARAM_TEST_CASE(Blur, cv::cuda::DeviceInfo, cv::Size, MatType, KSize, Anchor, Bo } }; -GPU_TEST_P(Blur, Accuracy) +CUDA_TEST_P(Blur, Accuracy) { cv::Mat src = randomMat(size, type); @@ -109,7 +109,7 @@ GPU_TEST_P(Blur, Accuracy) EXPECT_MAT_NEAR(dst_gold, dst, 1.0); } -INSTANTIATE_TEST_CASE_P(GPU_Filters, Blur, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_Filters, Blur, testing::Combine( ALL_DEVICES, DIFFERENT_SIZES, testing::Values(MatType(CV_8UC1), MatType(CV_8UC4)), @@ -145,7 +145,7 @@ PARAM_TEST_CASE(Filter2D, cv::cuda::DeviceInfo, cv::Size, MatType, KSize, Anchor } }; -GPU_TEST_P(Filter2D, Accuracy) +CUDA_TEST_P(Filter2D, Accuracy) { cv::Mat src = randomMat(size, type); cv::Mat kernel = randomMat(cv::Size(ksize.width, ksize.height), CV_32FC1, 0.0, 1.0); @@ -161,7 +161,7 @@ GPU_TEST_P(Filter2D, Accuracy) EXPECT_MAT_NEAR(dst_gold, dst, CV_MAT_DEPTH(type) == CV_32F ? 1e-1 : 1.0); } -INSTANTIATE_TEST_CASE_P(GPU_Filters, Filter2D, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_Filters, Filter2D, testing::Combine( ALL_DEVICES, DIFFERENT_SIZES, testing::Values(MatType(CV_8UC1), MatType(CV_8UC4), MatType(CV_16UC1), MatType(CV_16UC4), MatType(CV_32FC1), MatType(CV_32FC4)), @@ -193,7 +193,7 @@ PARAM_TEST_CASE(Laplacian, cv::cuda::DeviceInfo, cv::Size, MatType, KSize, UseRo } }; -GPU_TEST_P(Laplacian, Accuracy) +CUDA_TEST_P(Laplacian, Accuracy) { cv::Mat src = randomMat(size, type); @@ -208,7 +208,7 @@ GPU_TEST_P(Laplacian, Accuracy) EXPECT_MAT_NEAR(dst_gold, dst, src.depth() < CV_32F ? 0.0 : 1e-3); } -INSTANTIATE_TEST_CASE_P(GPU_Filters, Laplacian, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_Filters, Laplacian, testing::Combine( ALL_DEVICES, DIFFERENT_SIZES, testing::Values(MatType(CV_8UC1), MatType(CV_8UC4), MatType(CV_32FC1)), @@ -248,7 +248,7 @@ PARAM_TEST_CASE(SeparableLinearFilter, cv::cuda::DeviceInfo, cv::Size, MatDepth, } }; -GPU_TEST_P(SeparableLinearFilter, Accuracy) +CUDA_TEST_P(SeparableLinearFilter, Accuracy) { cv::Mat src = randomMat(size, type); cv::Mat rowKernel = randomMat(Size(ksize.width, 1), CV_32FC1, 0.0, 1.0); @@ -265,7 +265,7 @@ GPU_TEST_P(SeparableLinearFilter, Accuracy) EXPECT_MAT_NEAR(dst_gold, dst, src.depth() < CV_32F ? 1.0 : 1e-2); } -INSTANTIATE_TEST_CASE_P(GPU_Filters, SeparableLinearFilter, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_Filters, SeparableLinearFilter, testing::Combine( ALL_DEVICES, DIFFERENT_SIZES, testing::Values(MatDepth(CV_8U), MatDepth(CV_16U), MatDepth(CV_16S), MatDepth(CV_32F)), @@ -319,7 +319,7 @@ PARAM_TEST_CASE(Sobel, cv::cuda::DeviceInfo, cv::Size, MatDepth, Channels, KSize } }; -GPU_TEST_P(Sobel, Accuracy) +CUDA_TEST_P(Sobel, Accuracy) { if (dx == 0 && dy == 0) return; @@ -337,7 +337,7 @@ GPU_TEST_P(Sobel, Accuracy) EXPECT_MAT_NEAR(dst_gold, dst, src.depth() < CV_32F ? 0.0 : 0.1); } -INSTANTIATE_TEST_CASE_P(GPU_Filters, Sobel, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_Filters, Sobel, testing::Combine( ALL_DEVICES, DIFFERENT_SIZES, testing::Values(MatDepth(CV_8U), MatDepth(CV_16U), MatDepth(CV_16S), MatDepth(CV_32F)), @@ -384,7 +384,7 @@ PARAM_TEST_CASE(Scharr, cv::cuda::DeviceInfo, cv::Size, MatDepth, Channels, Deri } }; -GPU_TEST_P(Scharr, Accuracy) +CUDA_TEST_P(Scharr, Accuracy) { if (dx + dy != 1) return; @@ -402,7 +402,7 @@ GPU_TEST_P(Scharr, Accuracy) EXPECT_MAT_NEAR(dst_gold, dst, src.depth() < CV_32F ? 0.0 : 0.1); } -INSTANTIATE_TEST_CASE_P(GPU_Filters, Scharr, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_Filters, Scharr, testing::Combine( ALL_DEVICES, DIFFERENT_SIZES, testing::Values(MatDepth(CV_8U), MatDepth(CV_16U), MatDepth(CV_16S), MatDepth(CV_32F)), @@ -446,7 +446,7 @@ PARAM_TEST_CASE(GaussianBlur, cv::cuda::DeviceInfo, cv::Size, MatDepth, Channels } }; -GPU_TEST_P(GaussianBlur, Accuracy) +CUDA_TEST_P(GaussianBlur, Accuracy) { cv::Mat src = randomMat(size, type); double sigma1 = randomDouble(0.1, 1.0); @@ -463,7 +463,7 @@ GPU_TEST_P(GaussianBlur, Accuracy) EXPECT_MAT_NEAR(dst_gold, dst, src.depth() < CV_32F ? 4.0 : 1e-4); } -INSTANTIATE_TEST_CASE_P(GPU_Filters, GaussianBlur, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_Filters, GaussianBlur, testing::Combine( ALL_DEVICES, DIFFERENT_SIZES, testing::Values(MatDepth(CV_8U), MatDepth(CV_16U), MatDepth(CV_16S), MatDepth(CV_32F)), @@ -514,7 +514,7 @@ PARAM_TEST_CASE(Erode, cv::cuda::DeviceInfo, cv::Size, MatType, Anchor, Iteratio } }; -GPU_TEST_P(Erode, Accuracy) +CUDA_TEST_P(Erode, Accuracy) { cv::Mat src = randomMat(size, type); cv::Mat kernel = cv::Mat::ones(3, 3, CV_8U); @@ -532,7 +532,7 @@ GPU_TEST_P(Erode, Accuracy) EXPECT_MAT_NEAR(getInnerROI(dst_gold, ksize), getInnerROI(dst, ksize), 0.0); } -INSTANTIATE_TEST_CASE_P(GPU_Filters, Erode, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_Filters, Erode, testing::Combine( ALL_DEVICES, DIFFERENT_SIZES, testing::Values(MatType(CV_8UC1), MatType(CV_8UC4)), @@ -565,7 +565,7 @@ PARAM_TEST_CASE(Dilate, cv::cuda::DeviceInfo, cv::Size, MatType, Anchor, Iterati } }; -GPU_TEST_P(Dilate, Accuracy) +CUDA_TEST_P(Dilate, Accuracy) { cv::Mat src = randomMat(size, type); cv::Mat kernel = cv::Mat::ones(3, 3, CV_8U); @@ -583,7 +583,7 @@ GPU_TEST_P(Dilate, Accuracy) EXPECT_MAT_NEAR(getInnerROI(dst_gold, ksize), getInnerROI(dst, ksize), 0.0); } -INSTANTIATE_TEST_CASE_P(GPU_Filters, Dilate, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_Filters, Dilate, testing::Combine( ALL_DEVICES, DIFFERENT_SIZES, testing::Values(MatType(CV_8UC1), MatType(CV_8UC4)), @@ -620,7 +620,7 @@ PARAM_TEST_CASE(MorphEx, cv::cuda::DeviceInfo, cv::Size, MatType, MorphOp, Ancho } }; -GPU_TEST_P(MorphEx, Accuracy) +CUDA_TEST_P(MorphEx, Accuracy) { cv::Mat src = randomMat(size, type); cv::Mat kernel = cv::Mat::ones(3, 3, CV_8U); @@ -638,7 +638,7 @@ GPU_TEST_P(MorphEx, Accuracy) EXPECT_MAT_NEAR(getInnerROI(dst_gold, border), getInnerROI(dst, border), 0.0); } -INSTANTIATE_TEST_CASE_P(GPU_Filters, MorphEx, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_Filters, MorphEx, testing::Combine( ALL_DEVICES, DIFFERENT_SIZES, testing::Values(MatType(CV_8UC1), MatType(CV_8UC4)), diff --git a/modules/cudafilters/test/test_main.cpp b/modules/cudafilters/test/test_main.cpp index eea3d7c00..04f4fcf6e 100644 --- a/modules/cudafilters/test/test_main.cpp +++ b/modules/cudafilters/test/test_main.cpp @@ -42,4 +42,4 @@ #include "test_precomp.hpp" -CV_GPU_TEST_MAIN("gpu") +CV_CUDA_TEST_MAIN("gpu") diff --git a/modules/cudaimgproc/perf/perf_bilateral_filter.cpp b/modules/cudaimgproc/perf/perf_bilateral_filter.cpp index 6805bf91b..ab6bd18ed 100644 --- a/modules/cudaimgproc/perf/perf_bilateral_filter.cpp +++ b/modules/cudaimgproc/perf/perf_bilateral_filter.cpp @@ -52,9 +52,9 @@ using namespace perf; DEF_PARAM_TEST(Sz_Depth_Cn_KernelSz, cv::Size, MatDepth, MatCn, int); PERF_TEST_P(Sz_Depth_Cn_KernelSz, BilateralFilter, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_32F), - GPU_CHANNELS_1_3, + CUDA_CHANNELS_1_3, Values(3, 5, 9))) { declare.time(60.0); @@ -73,14 +73,14 @@ PERF_TEST_P(Sz_Depth_Cn_KernelSz, BilateralFilter, cv::Mat src(size, type); declare.in(src, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::bilateralFilter(d_src, dst, kernel_size, sigma_color, sigma_spatial, borderMode); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { diff --git a/modules/cudaimgproc/perf/perf_blend.cpp b/modules/cudaimgproc/perf/perf_blend.cpp index 1c14f1f35..09d8d8f6b 100644 --- a/modules/cudaimgproc/perf/perf_blend.cpp +++ b/modules/cudaimgproc/perf/perf_blend.cpp @@ -50,9 +50,9 @@ using namespace perf; // BlendLinear PERF_TEST_P(Sz_Depth_Cn, BlendLinear, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_32F), - GPU_CHANNELS_1_3_4)) + CUDA_CHANNELS_1_3_4)) { const cv::Size size = GET_PARAM(0); const int depth = GET_PARAM(1); @@ -67,7 +67,7 @@ PERF_TEST_P(Sz_Depth_Cn, BlendLinear, const cv::Mat weights1(size, CV_32FC1, cv::Scalar::all(0.5)); const cv::Mat weights2(size, CV_32FC1, cv::Scalar::all(0.5)); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_img1(img1); const cv::cuda::GpuMat d_img2(img2); @@ -77,7 +77,7 @@ PERF_TEST_P(Sz_Depth_Cn, BlendLinear, TEST_CYCLE() cv::cuda::blendLinear(d_img1, d_img2, d_weights1, d_weights2, dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { diff --git a/modules/cudaimgproc/perf/perf_canny.cpp b/modules/cudaimgproc/perf/perf_canny.cpp index 4716d1037..25526119b 100644 --- a/modules/cudaimgproc/perf/perf_canny.cpp +++ b/modules/cudaimgproc/perf/perf_canny.cpp @@ -66,7 +66,7 @@ PERF_TEST_P(Image_AppertureSz_L2gradient, Canny, const double low_thresh = 50.0; const double high_thresh = 100.0; - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_image(image); cv::cuda::GpuMat dst; @@ -75,7 +75,7 @@ PERF_TEST_P(Image_AppertureSz_L2gradient, Canny, TEST_CYCLE() canny->detect(d_image, dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { diff --git a/modules/cudaimgproc/perf/perf_color.cpp b/modules/cudaimgproc/perf/perf_color.cpp index 72cb4001a..2ff0f1ff6 100644 --- a/modules/cudaimgproc/perf/perf_color.cpp +++ b/modules/cudaimgproc/perf/perf_color.cpp @@ -52,7 +52,7 @@ using namespace perf; DEF_PARAM_TEST(Sz_Depth_Code, cv::Size, MatDepth, CvtColorInfo); PERF_TEST_P(Sz_Depth_Code, CvtColor, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_32F), Values(CvtColorInfo(4, 4, cv::COLOR_RGBA2BGRA), CvtColorInfo(4, 1, cv::COLOR_BGRA2GRAY), @@ -83,14 +83,14 @@ PERF_TEST_P(Sz_Depth_Code, CvtColor, cv::Mat src(size, CV_MAKETYPE(depth, info.scn)); cv::randu(src, 0, depth == CV_8U ? 255.0 : 1.0); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::cvtColor(d_src, dst, info.code, info.dcn); - GPU_SANITY_CHECK(dst, 1e-4); + CUDA_SANITY_CHECK(dst, 1e-4); } else { @@ -103,7 +103,7 @@ PERF_TEST_P(Sz_Depth_Code, CvtColor, } PERF_TEST_P(Sz_Depth_Code, CvtColorBayer, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16U), Values(CvtColorInfo(1, 3, cv::COLOR_BayerBG2BGR), CvtColorInfo(1, 3, cv::COLOR_BayerGB2BGR), @@ -122,14 +122,14 @@ PERF_TEST_P(Sz_Depth_Code, CvtColorBayer, cv::Mat src(size, CV_MAKETYPE(depth, info.scn)); declare.in(src, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::cvtColor(d_src, dst, info.code, info.dcn); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -153,7 +153,7 @@ CV_ENUM(DemosaicingCode, DEF_PARAM_TEST(Sz_Code, cv::Size, DemosaicingCode); PERF_TEST_P(Sz_Code, Demosaicing, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, DemosaicingCode::all())) { const cv::Size size = GET_PARAM(0); @@ -162,14 +162,14 @@ PERF_TEST_P(Sz_Code, Demosaicing, cv::Mat src(size, CV_8UC1); declare.in(src, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::demosaicing(d_src, dst, code); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -192,7 +192,7 @@ PERF_TEST_P(Sz_Code, Demosaicing, // SwapChannels PERF_TEST_P(Sz, SwapChannels, - GPU_TYPICAL_MAT_SIZES) + CUDA_TYPICAL_MAT_SIZES) { const cv::Size size = GetParam(); @@ -201,13 +201,13 @@ PERF_TEST_P(Sz, SwapChannels, const int dstOrder[] = {2, 1, 0, 3}; - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { cv::cuda::GpuMat dst(src); TEST_CYCLE() cv::cuda::swapChannels(dst, dstOrder); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -223,7 +223,7 @@ CV_ENUM(AlphaOp, cv::cuda::ALPHA_OVER, cv::cuda::ALPHA_IN, cv::cuda::ALPHA_OUT, DEF_PARAM_TEST(Sz_Type_Op, cv::Size, MatType, AlphaOp); PERF_TEST_P(Sz_Type_Op, AlphaComp, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8UC4, CV_16UC4, CV_32SC4, CV_32FC4), AlphaOp::all())) { @@ -235,7 +235,7 @@ PERF_TEST_P(Sz_Type_Op, AlphaComp, cv::Mat img2(size, type); declare.in(img1, img2, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_img1(img1); const cv::cuda::GpuMat d_img2(img2); @@ -243,7 +243,7 @@ PERF_TEST_P(Sz_Type_Op, AlphaComp, TEST_CYCLE() cv::cuda::alphaComp(d_img1, d_img2, dst, alpha_op); - GPU_SANITY_CHECK(dst, 1e-3, ERROR_RELATIVE); + CUDA_SANITY_CHECK(dst, 1e-3, ERROR_RELATIVE); } else { diff --git a/modules/cudaimgproc/perf/perf_corners.cpp b/modules/cudaimgproc/perf/perf_corners.cpp index 2a2445bc2..f58d82ad5 100644 --- a/modules/cudaimgproc/perf/perf_corners.cpp +++ b/modules/cudaimgproc/perf/perf_corners.cpp @@ -71,7 +71,7 @@ PERF_TEST_P(Image_Type_Border_BlockSz_ApertureSz, CornerHarris, const double k = 0.5; - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_img(img); cv::cuda::GpuMat dst; @@ -80,7 +80,7 @@ PERF_TEST_P(Image_Type_Border_BlockSz_ApertureSz, CornerHarris, TEST_CYCLE() harris->compute(d_img, dst); - GPU_SANITY_CHECK(dst, 1e-4); + CUDA_SANITY_CHECK(dst, 1e-4); } else { @@ -113,7 +113,7 @@ PERF_TEST_P(Image_Type_Border_BlockSz_ApertureSz, CornerMinEigenVal, img.convertTo(img, type, type == CV_32F ? 1.0 / 255.0 : 1.0); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_img(img); cv::cuda::GpuMat dst; @@ -122,7 +122,7 @@ PERF_TEST_P(Image_Type_Border_BlockSz_ApertureSz, CornerMinEigenVal, TEST_CYCLE() minEigenVal->compute(d_img, dst); - GPU_SANITY_CHECK(dst, 1e-4); + CUDA_SANITY_CHECK(dst, 1e-4); } else { diff --git a/modules/cudaimgproc/perf/perf_gftt.cpp b/modules/cudaimgproc/perf/perf_gftt.cpp index 5b6f0f4d5..ffaf41f4e 100644 --- a/modules/cudaimgproc/perf/perf_gftt.cpp +++ b/modules/cudaimgproc/perf/perf_gftt.cpp @@ -64,7 +64,7 @@ PERF_TEST_P(Image_MinDistance, GoodFeaturesToTrack, const int maxCorners = 8000; const double qualityLevel = 0.01; - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { cv::Ptr d_detector = cv::cuda::createGoodFeaturesToTrackDetector(image.type(), maxCorners, qualityLevel, minDistance); @@ -73,7 +73,7 @@ PERF_TEST_P(Image_MinDistance, GoodFeaturesToTrack, TEST_CYCLE() d_detector->detect(d_image, pts); - GPU_SANITY_CHECK(pts); + CUDA_SANITY_CHECK(pts); } else { diff --git a/modules/cudaimgproc/perf/perf_histogram.cpp b/modules/cudaimgproc/perf/perf_histogram.cpp index 49560d339..0e020394a 100644 --- a/modules/cudaimgproc/perf/perf_histogram.cpp +++ b/modules/cudaimgproc/perf/perf_histogram.cpp @@ -50,7 +50,7 @@ using namespace perf; // HistEvenC1 PERF_TEST_P(Sz_Depth, HistEvenC1, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16U, CV_16S))) { const cv::Size size = GET_PARAM(0); @@ -59,7 +59,7 @@ PERF_TEST_P(Sz_Depth, HistEvenC1, cv::Mat src(size, depth); declare.in(src, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; @@ -67,7 +67,7 @@ PERF_TEST_P(Sz_Depth, HistEvenC1, TEST_CYCLE() cv::cuda::histEven(d_src, dst, d_buf, 30, 0, 180); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -89,7 +89,7 @@ PERF_TEST_P(Sz_Depth, HistEvenC1, // HistEvenC4 PERF_TEST_P(Sz_Depth, HistEvenC4, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16U, CV_16S))) { const cv::Size size = GET_PARAM(0); @@ -102,7 +102,7 @@ PERF_TEST_P(Sz_Depth, HistEvenC4, int lowerLevel[] = {0, 0, 0, 0}; int upperLevel[] = {180, 180, 180, 180}; - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat d_hist[4]; @@ -130,21 +130,21 @@ PERF_TEST_P(Sz_Depth, HistEvenC4, // CalcHist PERF_TEST_P(Sz, CalcHist, - GPU_TYPICAL_MAT_SIZES) + CUDA_TYPICAL_MAT_SIZES) { const cv::Size size = GetParam(); cv::Mat src(size, CV_8UC1); declare.in(src, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::calcHist(d_src, dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -156,14 +156,14 @@ PERF_TEST_P(Sz, CalcHist, // EqualizeHist PERF_TEST_P(Sz, EqualizeHist, - GPU_TYPICAL_MAT_SIZES) + CUDA_TYPICAL_MAT_SIZES) { const cv::Size size = GetParam(); cv::Mat src(size, CV_8UC1); declare.in(src, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; @@ -171,7 +171,7 @@ PERF_TEST_P(Sz, EqualizeHist, TEST_CYCLE() cv::cuda::equalizeHist(d_src, dst, d_buf); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -189,7 +189,7 @@ PERF_TEST_P(Sz, EqualizeHist, DEF_PARAM_TEST(Sz_ClipLimit, cv::Size, double); PERF_TEST_P(Sz_ClipLimit, CLAHE, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(0.0, 40.0))) { const cv::Size size = GET_PARAM(0); @@ -198,7 +198,7 @@ PERF_TEST_P(Sz_ClipLimit, CLAHE, cv::Mat src(size, CV_8UC1); declare.in(src, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { cv::Ptr clahe = cv::cuda::createCLAHE(clipLimit); cv::cuda::GpuMat d_src(src); @@ -206,7 +206,7 @@ PERF_TEST_P(Sz_ClipLimit, CLAHE, TEST_CYCLE() clahe->apply(d_src, dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { diff --git a/modules/cudaimgproc/perf/perf_hough.cpp b/modules/cudaimgproc/perf/perf_hough.cpp index 3b62b8685..1578fc334 100644 --- a/modules/cudaimgproc/perf/perf_hough.cpp +++ b/modules/cudaimgproc/perf/perf_hough.cpp @@ -81,7 +81,7 @@ namespace } PERF_TEST_P(Sz, HoughLines, - GPU_TYPICAL_MAT_SIZES) + CUDA_TYPICAL_MAT_SIZES) { declare.time(30.0); @@ -99,7 +99,7 @@ PERF_TEST_P(Sz, HoughLines, cv::line(src, cv::Point(200, 0), cv::Point(200, src.rows), cv::Scalar::all(255), 1); cv::line(src, cv::Point(400, 0), cv::Point(400, src.rows), cv::Scalar::all(255), 1); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat d_lines; @@ -148,7 +148,7 @@ PERF_TEST_P(Image, HoughLinesP, cv::Mat mask; cv::Canny(image, mask, 50, 100); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_mask(mask); cv::cuda::GpuMat d_lines; @@ -179,7 +179,7 @@ PERF_TEST_P(Image, HoughLinesP, DEF_PARAM_TEST(Sz_Dp_MinDist, cv::Size, float, float); PERF_TEST_P(Sz_Dp_MinDist, HoughCircles, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(1.0f, 2.0f, 4.0f), Values(1.0f))) { @@ -199,7 +199,7 @@ PERF_TEST_P(Sz_Dp_MinDist, HoughCircles, cv::circle(src, cv::Point(200, 200), 25, cv::Scalar::all(255), -1); cv::circle(src, cv::Point(200, 100), 25, cv::Scalar::all(255), -1); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat d_circles; @@ -227,7 +227,7 @@ PERF_TEST_P(Sz_Dp_MinDist, HoughCircles, ////////////////////////////////////////////////////////////////////// // GeneralizedHough -PERF_TEST_P(Sz, GeneralizedHoughBallard, GPU_TYPICAL_MAT_SIZES) +PERF_TEST_P(Sz, GeneralizedHoughBallard, CUDA_TYPICAL_MAT_SIZES) { declare.time(10); @@ -246,7 +246,7 @@ PERF_TEST_P(Sz, GeneralizedHoughBallard, GPU_TYPICAL_MAT_SIZES) cv::Sobel(image, dx, CV_32F, 1, 0); cv::Sobel(image, dy, CV_32F, 0, 1); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { cv::Ptr alg = cv::cuda::createGeneralizedHoughBallard(); @@ -259,7 +259,7 @@ PERF_TEST_P(Sz, GeneralizedHoughBallard, GPU_TYPICAL_MAT_SIZES) TEST_CYCLE() alg->detect(d_edges, d_dx, d_dy, positions); - GPU_SANITY_CHECK(positions); + CUDA_SANITY_CHECK(positions); } else { @@ -275,7 +275,7 @@ PERF_TEST_P(Sz, GeneralizedHoughBallard, GPU_TYPICAL_MAT_SIZES) } } -PERF_TEST_P(Sz, GeneralizedHoughGuil, GPU_TYPICAL_MAT_SIZES) +PERF_TEST_P(Sz, GeneralizedHoughGuil, CUDA_TYPICAL_MAT_SIZES) { declare.time(10); @@ -315,7 +315,7 @@ PERF_TEST_P(Sz, GeneralizedHoughGuil, GPU_TYPICAL_MAT_SIZES) cv::Sobel(image, dx, CV_32F, 1, 0); cv::Sobel(image, dy, CV_32F, 0, 1); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { cv::Ptr alg = cv::cuda::createGeneralizedHoughGuil(); alg->setMaxAngle(90.0); @@ -330,7 +330,7 @@ PERF_TEST_P(Sz, GeneralizedHoughGuil, GPU_TYPICAL_MAT_SIZES) TEST_CYCLE() alg->detect(d_edges, d_dx, d_dy, positions); - GPU_SANITY_CHECK(positions); + CUDA_SANITY_CHECK(positions); } else { diff --git a/modules/cudaimgproc/perf/perf_match_template.cpp b/modules/cudaimgproc/perf/perf_match_template.cpp index 8ebae61a0..c026ec27b 100644 --- a/modules/cudaimgproc/perf/perf_match_template.cpp +++ b/modules/cudaimgproc/perf/perf_match_template.cpp @@ -54,9 +54,9 @@ CV_ENUM(TemplateMethod, TM_SQDIFF, TM_SQDIFF_NORMED, TM_CCORR, TM_CCORR_NORMED, DEF_PARAM_TEST(Sz_TemplateSz_Cn_Method, cv::Size, cv::Size, MatCn, TemplateMethod); PERF_TEST_P(Sz_TemplateSz_Cn_Method, MatchTemplate8U, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(cv::Size(5, 5), cv::Size(16, 16), cv::Size(30, 30)), - GPU_CHANNELS_1_3_4, + CUDA_CHANNELS_1_3_4, TemplateMethod::all())) { declare.time(300.0); @@ -70,7 +70,7 @@ PERF_TEST_P(Sz_TemplateSz_Cn_Method, MatchTemplate8U, cv::Mat templ(templ_size, CV_MAKE_TYPE(CV_8U, cn)); declare.in(image, templ, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_image(image); const cv::cuda::GpuMat d_templ(templ); @@ -80,7 +80,7 @@ PERF_TEST_P(Sz_TemplateSz_Cn_Method, MatchTemplate8U, TEST_CYCLE() alg->match(d_image, d_templ, dst); - GPU_SANITY_CHECK(dst, 1e-5, ERROR_RELATIVE); + CUDA_SANITY_CHECK(dst, 1e-5, ERROR_RELATIVE); } else { @@ -96,9 +96,9 @@ PERF_TEST_P(Sz_TemplateSz_Cn_Method, MatchTemplate8U, // MatchTemplate32F PERF_TEST_P(Sz_TemplateSz_Cn_Method, MatchTemplate32F, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(cv::Size(5, 5), cv::Size(16, 16), cv::Size(30, 30)), - GPU_CHANNELS_1_3_4, + CUDA_CHANNELS_1_3_4, Values(TemplateMethod(cv::TM_SQDIFF), TemplateMethod(cv::TM_CCORR)))) { declare.time(300.0); @@ -112,7 +112,7 @@ PERF_TEST_P(Sz_TemplateSz_Cn_Method, MatchTemplate32F, cv::Mat templ(templ_size, CV_MAKE_TYPE(CV_32F, cn)); declare.in(image, templ, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_image(image); const cv::cuda::GpuMat d_templ(templ); @@ -122,7 +122,7 @@ PERF_TEST_P(Sz_TemplateSz_Cn_Method, MatchTemplate32F, TEST_CYCLE() alg->match(d_image, d_templ, dst); - GPU_SANITY_CHECK(dst, 1e-6, ERROR_RELATIVE); + CUDA_SANITY_CHECK(dst, 1e-6, ERROR_RELATIVE); } else { diff --git a/modules/cudaimgproc/perf/perf_mean_shift.cpp b/modules/cudaimgproc/perf/perf_mean_shift.cpp index 2c04b7eb9..fa034ca14 100644 --- a/modules/cudaimgproc/perf/perf_mean_shift.cpp +++ b/modules/cudaimgproc/perf/perf_mean_shift.cpp @@ -65,14 +65,14 @@ PERF_TEST_P(Image, MeanShiftFiltering, const int sp = 50; const int sr = 50; - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(rgba); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::meanShiftFiltering(d_src, dst, sp, sr); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -101,7 +101,7 @@ PERF_TEST_P(Image, MeanShiftProc, const int sp = 50; const int sr = 50; - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(rgba); cv::cuda::GpuMat dstr; @@ -109,8 +109,8 @@ PERF_TEST_P(Image, MeanShiftProc, TEST_CYCLE() cv::cuda::meanShiftProc(d_src, dstr, dstsp, sp, sr); - GPU_SANITY_CHECK(dstr); - GPU_SANITY_CHECK(dstsp); + CUDA_SANITY_CHECK(dstr); + CUDA_SANITY_CHECK(dstsp); } else { @@ -136,14 +136,14 @@ PERF_TEST_P(Image, MeanShiftSegmentation, const int sr = 10; const int minsize = 20; - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(rgba); cv::Mat dst; TEST_CYCLE() cv::cuda::meanShiftSegmentation(d_src, dst, sp, sr, minsize); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { diff --git a/modules/cudaimgproc/src/canny.cpp b/modules/cudaimgproc/src/canny.cpp index 1226be04b..e24407358 100644 --- a/modules/cudaimgproc/src/canny.cpp +++ b/modules/cudaimgproc/src/canny.cpp @@ -93,7 +93,7 @@ namespace void write(FileStorage& fs) const { - fs << "name" << "Canny_GPU" + fs << "name" << "Canny_CUDA" << "low_thresh" << low_thresh_ << "high_thresh" << high_thresh_ << "apperture_size" << apperture_size_ @@ -102,7 +102,7 @@ namespace void read(const FileNode& fn) { - CV_Assert( String(fn["name"]) == "Canny_GPU" ); + CV_Assert( String(fn["name"]) == "Canny_CUDA" ); low_thresh_ = (double)fn["low_thresh"]; high_thresh_ = (double)fn["high_thresh"]; apperture_size_ = (int)fn["apperture_size"]; diff --git a/modules/cudaimgproc/src/cuda/color.cu b/modules/cudaimgproc/src/cuda/color.cu index 7a65fe9ca..2139aa901 100644 --- a/modules/cudaimgproc/src/cuda/color.cu +++ b/modules/cudaimgproc/src/cuda/color.cu @@ -49,181 +49,181 @@ namespace cv { namespace cuda { namespace device { - OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(bgra_to_rgba_traits::functor_type) + OPENCV_CUDA_TRANSFORM_FUNCTOR_TRAITS(bgra_to_rgba_traits::functor_type) { enum { smart_block_dim_x = 8 }; enum { smart_block_dim_y = 8 }; enum { smart_shift = 4 }; }; - OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(bgra_to_bgr555_traits::functor_type) + OPENCV_CUDA_TRANSFORM_FUNCTOR_TRAITS(bgra_to_bgr555_traits::functor_type) { enum { smart_block_dim_y = 8 }; enum { smart_shift = 4 }; }; - OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(rgba_to_bgr555_traits::functor_type) + OPENCV_CUDA_TRANSFORM_FUNCTOR_TRAITS(rgba_to_bgr555_traits::functor_type) { enum { smart_block_dim_y = 8 }; enum { smart_shift = 4 }; }; - OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(bgra_to_bgr565_traits::functor_type) + OPENCV_CUDA_TRANSFORM_FUNCTOR_TRAITS(bgra_to_bgr565_traits::functor_type) { enum { smart_block_dim_y = 8 }; enum { smart_shift = 4 }; }; - OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(rgba_to_bgr565_traits::functor_type) + OPENCV_CUDA_TRANSFORM_FUNCTOR_TRAITS(rgba_to_bgr565_traits::functor_type) { enum { smart_block_dim_y = 8 }; enum { smart_shift = 4 }; }; - OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(bgr555_to_bgra_traits::functor_type) + OPENCV_CUDA_TRANSFORM_FUNCTOR_TRAITS(bgr555_to_bgra_traits::functor_type) { enum { smart_block_dim_y = 8 }; enum { smart_shift = 4 }; }; - OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(bgr555_to_rgba_traits::functor_type) + OPENCV_CUDA_TRANSFORM_FUNCTOR_TRAITS(bgr555_to_rgba_traits::functor_type) { enum { smart_block_dim_y = 8 }; enum { smart_shift = 4 }; }; - OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(bgr565_to_bgra_traits::functor_type) + OPENCV_CUDA_TRANSFORM_FUNCTOR_TRAITS(bgr565_to_bgra_traits::functor_type) { enum { smart_block_dim_y = 8 }; enum { smart_shift = 4 }; }; - OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(bgr565_to_rgba_traits::functor_type) + OPENCV_CUDA_TRANSFORM_FUNCTOR_TRAITS(bgr565_to_rgba_traits::functor_type) { enum { smart_block_dim_y = 8 }; enum { smart_shift = 4 }; }; - OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(gray_to_bgra_traits::functor_type) + OPENCV_CUDA_TRANSFORM_FUNCTOR_TRAITS(gray_to_bgra_traits::functor_type) { enum { smart_block_dim_y = 8 }; enum { smart_shift = 4 }; }; - OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(gray_to_bgr555_traits::functor_type) + OPENCV_CUDA_TRANSFORM_FUNCTOR_TRAITS(gray_to_bgr555_traits::functor_type) { enum { smart_shift = 4 }; }; - OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(gray_to_bgr565_traits::functor_type) + OPENCV_CUDA_TRANSFORM_FUNCTOR_TRAITS(gray_to_bgr565_traits::functor_type) { enum { smart_shift = 4 }; }; - OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(bgra_to_yuv4_traits::functor_type) + OPENCV_CUDA_TRANSFORM_FUNCTOR_TRAITS(bgra_to_yuv4_traits::functor_type) { enum { smart_block_dim_y = 8 }; enum { smart_shift = 4 }; }; - OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(rgba_to_yuv4_traits::functor_type) + OPENCV_CUDA_TRANSFORM_FUNCTOR_TRAITS(rgba_to_yuv4_traits::functor_type) { enum { smart_block_dim_y = 8 }; enum { smart_shift = 4 }; }; - OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(yuv4_to_bgra_traits::functor_type) + OPENCV_CUDA_TRANSFORM_FUNCTOR_TRAITS(yuv4_to_bgra_traits::functor_type) { enum { smart_block_dim_y = 8 }; enum { smart_shift = 4 }; }; - OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(yuv4_to_rgba_traits::functor_type) + OPENCV_CUDA_TRANSFORM_FUNCTOR_TRAITS(yuv4_to_rgba_traits::functor_type) { enum { smart_block_dim_y = 8 }; enum { smart_shift = 4 }; }; - OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(bgra_to_YCrCb4_traits::functor_type) + OPENCV_CUDA_TRANSFORM_FUNCTOR_TRAITS(bgra_to_YCrCb4_traits::functor_type) { enum { smart_block_dim_y = 8 }; enum { smart_shift = 4 }; }; - OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(rgba_to_YCrCb4_traits::functor_type) + OPENCV_CUDA_TRANSFORM_FUNCTOR_TRAITS(rgba_to_YCrCb4_traits::functor_type) { enum { smart_block_dim_y = 8 }; enum { smart_shift = 4 }; }; - OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(YCrCb4_to_bgra_traits::functor_type) + OPENCV_CUDA_TRANSFORM_FUNCTOR_TRAITS(YCrCb4_to_bgra_traits::functor_type) { enum { smart_block_dim_y = 8 }; enum { smart_shift = 4 }; }; - OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(YCrCb4_to_rgba_traits::functor_type) + OPENCV_CUDA_TRANSFORM_FUNCTOR_TRAITS(YCrCb4_to_rgba_traits::functor_type) { enum { smart_block_dim_y = 8 }; enum { smart_shift = 4 }; }; - OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(bgra_to_xyz4_traits::functor_type) + OPENCV_CUDA_TRANSFORM_FUNCTOR_TRAITS(bgra_to_xyz4_traits::functor_type) { enum { smart_block_dim_y = 8 }; enum { smart_shift = 4 }; }; - OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(rgba_to_xyz4_traits::functor_type) + OPENCV_CUDA_TRANSFORM_FUNCTOR_TRAITS(rgba_to_xyz4_traits::functor_type) { enum { smart_block_dim_y = 8 }; enum { smart_shift = 4 }; }; - OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(xyz4_to_bgra_traits::functor_type) + OPENCV_CUDA_TRANSFORM_FUNCTOR_TRAITS(xyz4_to_bgra_traits::functor_type) { enum { smart_block_dim_y = 8 }; enum { smart_shift = 4 }; }; - OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(xyz4_to_rgba_traits::functor_type) + OPENCV_CUDA_TRANSFORM_FUNCTOR_TRAITS(xyz4_to_rgba_traits::functor_type) { enum { smart_block_dim_y = 8 }; enum { smart_shift = 4 }; }; - OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(bgra_to_hsv4_traits::functor_type) + OPENCV_CUDA_TRANSFORM_FUNCTOR_TRAITS(bgra_to_hsv4_traits::functor_type) { enum { smart_block_dim_y = 8 }; enum { smart_shift = 4 }; }; - OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(rgba_to_hsv4_traits::functor_type) + OPENCV_CUDA_TRANSFORM_FUNCTOR_TRAITS(rgba_to_hsv4_traits::functor_type) { enum { smart_block_dim_y = 8 }; enum { smart_shift = 4 }; }; - OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(hsv4_to_bgra_traits::functor_type) + OPENCV_CUDA_TRANSFORM_FUNCTOR_TRAITS(hsv4_to_bgra_traits::functor_type) { enum { smart_block_dim_y = 8 }; enum { smart_shift = 4 }; }; - OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(hsv4_to_rgba_traits::functor_type) + OPENCV_CUDA_TRANSFORM_FUNCTOR_TRAITS(hsv4_to_rgba_traits::functor_type) { enum { smart_block_dim_y = 8 }; enum { smart_shift = 4 }; }; - OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(bgra_to_hls4_traits::functor_type) + OPENCV_CUDA_TRANSFORM_FUNCTOR_TRAITS(bgra_to_hls4_traits::functor_type) { enum { smart_block_dim_y = 8 }; enum { smart_shift = 4 }; }; - OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(rgba_to_hls4_traits::functor_type) + OPENCV_CUDA_TRANSFORM_FUNCTOR_TRAITS(rgba_to_hls4_traits::functor_type) { enum { smart_block_dim_y = 8 }; enum { smart_shift = 4 }; }; - OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(hls4_to_bgra_traits::functor_type) + OPENCV_CUDA_TRANSFORM_FUNCTOR_TRAITS(hls4_to_bgra_traits::functor_type) { enum { smart_block_dim_y = 8 }; enum { smart_shift = 4 }; }; - OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(hls4_to_rgba_traits::functor_type) + OPENCV_CUDA_TRANSFORM_FUNCTOR_TRAITS(hls4_to_rgba_traits::functor_type) { enum { smart_block_dim_y = 8 }; enum { smart_shift = 4 }; }; -#define OPENCV_GPU_IMPLEMENT_CVTCOLOR(name, traits) \ +#define OPENCV_CUDA_IMPLEMENT_CVTCOLOR(name, traits) \ void name(PtrStepSzb src, PtrStepSzb dst, cudaStream_t stream) \ { \ traits::functor_type functor = traits::create_functor(); \ @@ -232,230 +232,230 @@ namespace cv { namespace cuda { namespace device cv::cuda::device::transform((PtrStepSz)src, (PtrStepSz)dst, functor, WithOutMask(), stream); \ } -#define OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE(name) \ - OPENCV_GPU_IMPLEMENT_CVTCOLOR(name, name ## _traits) +#define OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ONE(name) \ + OPENCV_CUDA_IMPLEMENT_CVTCOLOR(name, name ## _traits) -#define OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(name) \ - OPENCV_GPU_IMPLEMENT_CVTCOLOR(name ## _8u, name ## _traits) \ - OPENCV_GPU_IMPLEMENT_CVTCOLOR(name ## _16u, name ## _traits) \ - OPENCV_GPU_IMPLEMENT_CVTCOLOR(name ## _32f, name ## _traits) +#define OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(name) \ + OPENCV_CUDA_IMPLEMENT_CVTCOLOR(name ## _8u, name ## _traits) \ + OPENCV_CUDA_IMPLEMENT_CVTCOLOR(name ## _16u, name ## _traits) \ + OPENCV_CUDA_IMPLEMENT_CVTCOLOR(name ## _32f, name ## _traits) -#define OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(name) \ - OPENCV_GPU_IMPLEMENT_CVTCOLOR(name ## _8u, name ## _traits) \ - OPENCV_GPU_IMPLEMENT_CVTCOLOR(name ## _32f, name ## _traits) +#define OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(name) \ + OPENCV_CUDA_IMPLEMENT_CVTCOLOR(name ## _8u, name ## _traits) \ + OPENCV_CUDA_IMPLEMENT_CVTCOLOR(name ## _32f, name ## _traits) -#define OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(name) \ - OPENCV_GPU_IMPLEMENT_CVTCOLOR(name ## _8u, name ## _traits) \ - OPENCV_GPU_IMPLEMENT_CVTCOLOR(name ## _32f, name ## _traits) \ - OPENCV_GPU_IMPLEMENT_CVTCOLOR(name ## _full_8u, name ## _full_traits) \ - OPENCV_GPU_IMPLEMENT_CVTCOLOR(name ## _full_32f, name ## _full_traits) +#define OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F_FULL(name) \ + OPENCV_CUDA_IMPLEMENT_CVTCOLOR(name ## _8u, name ## _traits) \ + OPENCV_CUDA_IMPLEMENT_CVTCOLOR(name ## _32f, name ## _traits) \ + OPENCV_CUDA_IMPLEMENT_CVTCOLOR(name ## _full_8u, name ## _full_traits) \ + OPENCV_CUDA_IMPLEMENT_CVTCOLOR(name ## _full_32f, name ## _full_traits) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(bgr_to_rgb) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(bgr_to_bgra) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(bgr_to_rgba) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(bgra_to_bgr) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(bgra_to_rgb) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(bgra_to_rgba) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(bgr_to_rgb) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(bgr_to_bgra) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(bgr_to_rgba) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(bgra_to_bgr) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(bgra_to_rgb) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(bgra_to_rgba) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE(bgr_to_bgr555) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE(bgr_to_bgr565) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE(rgb_to_bgr555) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE(rgb_to_bgr565) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE(bgra_to_bgr555) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE(bgra_to_bgr565) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE(rgba_to_bgr555) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE(rgba_to_bgr565) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ONE(bgr_to_bgr555) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ONE(bgr_to_bgr565) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ONE(rgb_to_bgr555) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ONE(rgb_to_bgr565) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ONE(bgra_to_bgr555) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ONE(bgra_to_bgr565) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ONE(rgba_to_bgr555) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ONE(rgba_to_bgr565) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE(bgr555_to_rgb) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE(bgr565_to_rgb) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE(bgr555_to_bgr) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE(bgr565_to_bgr) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE(bgr555_to_rgba) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE(bgr565_to_rgba) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE(bgr555_to_bgra) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE(bgr565_to_bgra) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ONE(bgr555_to_rgb) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ONE(bgr565_to_rgb) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ONE(bgr555_to_bgr) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ONE(bgr565_to_bgr) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ONE(bgr555_to_rgba) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ONE(bgr565_to_rgba) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ONE(bgr555_to_bgra) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ONE(bgr565_to_bgra) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(gray_to_bgr) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(gray_to_bgra) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(gray_to_bgr) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(gray_to_bgra) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE(gray_to_bgr555) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE(gray_to_bgr565) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ONE(gray_to_bgr555) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ONE(gray_to_bgr565) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE(bgr555_to_gray) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE(bgr565_to_gray) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ONE(bgr555_to_gray) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ONE(bgr565_to_gray) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(rgb_to_gray) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(bgr_to_gray) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(rgba_to_gray) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(bgra_to_gray) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(rgb_to_gray) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(bgr_to_gray) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(rgba_to_gray) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(bgra_to_gray) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(rgb_to_yuv) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(rgba_to_yuv) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(rgb_to_yuv4) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(rgba_to_yuv4) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(bgr_to_yuv) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(bgra_to_yuv) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(bgr_to_yuv4) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(bgra_to_yuv4) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(rgb_to_yuv) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(rgba_to_yuv) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(rgb_to_yuv4) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(rgba_to_yuv4) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(bgr_to_yuv) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(bgra_to_yuv) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(bgr_to_yuv4) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(bgra_to_yuv4) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(yuv_to_rgb) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(yuv_to_rgba) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(yuv4_to_rgb) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(yuv4_to_rgba) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(yuv_to_bgr) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(yuv_to_bgra) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(yuv4_to_bgr) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(yuv4_to_bgra) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(yuv_to_rgb) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(yuv_to_rgba) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(yuv4_to_rgb) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(yuv4_to_rgba) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(yuv_to_bgr) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(yuv_to_bgra) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(yuv4_to_bgr) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(yuv4_to_bgra) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(rgb_to_YCrCb) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(rgba_to_YCrCb) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(rgb_to_YCrCb4) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(rgba_to_YCrCb4) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(bgr_to_YCrCb) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(bgra_to_YCrCb) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(bgr_to_YCrCb4) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(bgra_to_YCrCb4) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(rgb_to_YCrCb) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(rgba_to_YCrCb) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(rgb_to_YCrCb4) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(rgba_to_YCrCb4) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(bgr_to_YCrCb) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(bgra_to_YCrCb) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(bgr_to_YCrCb4) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(bgra_to_YCrCb4) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(YCrCb_to_rgb) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(YCrCb_to_rgba) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(YCrCb4_to_rgb) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(YCrCb4_to_rgba) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(YCrCb_to_bgr) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(YCrCb_to_bgra) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(YCrCb4_to_bgr) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(YCrCb4_to_bgra) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(YCrCb_to_rgb) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(YCrCb_to_rgba) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(YCrCb4_to_rgb) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(YCrCb4_to_rgba) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(YCrCb_to_bgr) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(YCrCb_to_bgra) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(YCrCb4_to_bgr) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(YCrCb4_to_bgra) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(rgb_to_xyz) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(rgba_to_xyz) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(rgb_to_xyz4) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(rgba_to_xyz4) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(bgr_to_xyz) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(bgra_to_xyz) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(bgr_to_xyz4) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(bgra_to_xyz4) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(rgb_to_xyz) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(rgba_to_xyz) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(rgb_to_xyz4) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(rgba_to_xyz4) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(bgr_to_xyz) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(bgra_to_xyz) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(bgr_to_xyz4) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(bgra_to_xyz4) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(xyz_to_rgb) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(xyz4_to_rgb) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(xyz_to_rgba) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(xyz4_to_rgba) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(xyz_to_bgr) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(xyz4_to_bgr) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(xyz_to_bgra) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(xyz4_to_bgra) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(xyz_to_rgb) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(xyz4_to_rgb) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(xyz_to_rgba) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(xyz4_to_rgba) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(xyz_to_bgr) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(xyz4_to_bgr) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(xyz_to_bgra) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL(xyz4_to_bgra) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(rgb_to_hsv) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(rgba_to_hsv) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(rgb_to_hsv4) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(rgba_to_hsv4) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(bgr_to_hsv) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(bgra_to_hsv) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(bgr_to_hsv4) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(bgra_to_hsv4) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F_FULL(rgb_to_hsv) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F_FULL(rgba_to_hsv) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F_FULL(rgb_to_hsv4) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F_FULL(rgba_to_hsv4) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F_FULL(bgr_to_hsv) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F_FULL(bgra_to_hsv) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F_FULL(bgr_to_hsv4) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F_FULL(bgra_to_hsv4) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(hsv_to_rgb) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(hsv_to_rgba) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(hsv4_to_rgb) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(hsv4_to_rgba) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(hsv_to_bgr) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(hsv_to_bgra) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(hsv4_to_bgr) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(hsv4_to_bgra) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F_FULL(hsv_to_rgb) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F_FULL(hsv_to_rgba) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F_FULL(hsv4_to_rgb) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F_FULL(hsv4_to_rgba) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F_FULL(hsv_to_bgr) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F_FULL(hsv_to_bgra) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F_FULL(hsv4_to_bgr) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F_FULL(hsv4_to_bgra) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(rgb_to_hls) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(rgba_to_hls) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(rgb_to_hls4) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(rgba_to_hls4) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(bgr_to_hls) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(bgra_to_hls) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(bgr_to_hls4) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(bgra_to_hls4) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F_FULL(rgb_to_hls) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F_FULL(rgba_to_hls) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F_FULL(rgb_to_hls4) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F_FULL(rgba_to_hls4) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F_FULL(bgr_to_hls) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F_FULL(bgra_to_hls) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F_FULL(bgr_to_hls4) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F_FULL(bgra_to_hls4) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(hls_to_rgb) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(hls_to_rgba) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(hls4_to_rgb) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(hls4_to_rgba) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(hls_to_bgr) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(hls_to_bgra) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(hls4_to_bgr) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(hls4_to_bgra) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F_FULL(hls_to_rgb) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F_FULL(hls_to_rgba) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F_FULL(hls4_to_rgb) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F_FULL(hls4_to_rgba) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F_FULL(hls_to_bgr) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F_FULL(hls_to_bgra) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F_FULL(hls4_to_bgr) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F_FULL(hls4_to_bgra) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(rgb_to_lab) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(rgba_to_lab) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(rgb_to_lab4) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(rgba_to_lab4) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(bgr_to_lab) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(bgra_to_lab) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(bgr_to_lab4) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(bgra_to_lab4) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(rgb_to_lab) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(rgba_to_lab) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(rgb_to_lab4) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(rgba_to_lab4) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(bgr_to_lab) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(bgra_to_lab) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(bgr_to_lab4) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(bgra_to_lab4) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lrgb_to_lab) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lrgba_to_lab) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lrgb_to_lab4) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lrgba_to_lab4) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lbgr_to_lab) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lbgra_to_lab) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lbgr_to_lab4) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lbgra_to_lab4) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(lrgb_to_lab) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(lrgba_to_lab) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(lrgb_to_lab4) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(lrgba_to_lab4) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(lbgr_to_lab) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(lbgra_to_lab) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(lbgr_to_lab4) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(lbgra_to_lab4) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lab_to_rgb) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lab4_to_rgb) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lab_to_rgba) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lab4_to_rgba) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lab_to_bgr) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lab4_to_bgr) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lab_to_bgra) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lab4_to_bgra) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(lab_to_rgb) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(lab4_to_rgb) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(lab_to_rgba) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(lab4_to_rgba) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(lab_to_bgr) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(lab4_to_bgr) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(lab_to_bgra) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(lab4_to_bgra) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lab_to_lrgb) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lab4_to_lrgb) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lab_to_lrgba) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lab4_to_lrgba) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lab_to_lbgr) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lab4_to_lbgr) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lab_to_lbgra) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lab4_to_lbgra) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(lab_to_lrgb) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(lab4_to_lrgb) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(lab_to_lrgba) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(lab4_to_lrgba) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(lab_to_lbgr) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(lab4_to_lbgr) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(lab_to_lbgra) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(lab4_to_lbgra) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(rgb_to_luv) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(rgba_to_luv) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(rgb_to_luv4) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(rgba_to_luv4) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(bgr_to_luv) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(bgra_to_luv) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(bgr_to_luv4) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(bgra_to_luv4) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(rgb_to_luv) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(rgba_to_luv) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(rgb_to_luv4) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(rgba_to_luv4) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(bgr_to_luv) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(bgra_to_luv) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(bgr_to_luv4) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(bgra_to_luv4) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lrgb_to_luv) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lrgba_to_luv) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lrgb_to_luv4) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lrgba_to_luv4) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lbgr_to_luv) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lbgra_to_luv) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lbgr_to_luv4) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lbgra_to_luv4) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(lrgb_to_luv) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(lrgba_to_luv) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(lrgb_to_luv4) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(lrgba_to_luv4) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(lbgr_to_luv) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(lbgra_to_luv) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(lbgr_to_luv4) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(lbgra_to_luv4) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(luv_to_rgb) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(luv4_to_rgb) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(luv_to_rgba) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(luv4_to_rgba) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(luv_to_bgr) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(luv4_to_bgr) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(luv_to_bgra) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(luv4_to_bgra) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(luv_to_rgb) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(luv4_to_rgb) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(luv_to_rgba) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(luv4_to_rgba) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(luv_to_bgr) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(luv4_to_bgr) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(luv_to_bgra) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(luv4_to_bgra) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(luv_to_lrgb) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(luv4_to_lrgb) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(luv_to_lrgba) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(luv4_to_lrgba) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(luv_to_lbgr) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(luv4_to_lbgr) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(luv_to_lbgra) - OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(luv4_to_lbgra) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(luv_to_lrgb) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(luv4_to_lrgb) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(luv_to_lrgba) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(luv4_to_lrgba) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(luv_to_lbgr) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(luv4_to_lbgr) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(luv_to_lbgra) + OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F(luv4_to_lbgra) - #undef OPENCV_GPU_IMPLEMENT_CVTCOLOR - #undef OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE - #undef OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL - #undef OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F - #undef OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL + #undef OPENCV_CUDA_IMPLEMENT_CVTCOLOR + #undef OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ONE + #undef OPENCV_CUDA_IMPLEMENT_CVTCOLOR_ALL + #undef OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F + #undef OPENCV_CUDA_IMPLEMENT_CVTCOLOR_8U32F_FULL }}} // namespace cv { namespace cuda { namespace cudev #endif /* CUDA_DISABLER */ diff --git a/modules/cudaimgproc/src/cuda/match_template.cu b/modules/cudaimgproc/src/cuda/match_template.cu index 632f4d2ec..832878f9f 100644 --- a/modules/cudaimgproc/src/cuda/match_template.cu +++ b/modules/cudaimgproc/src/cuda/match_template.cu @@ -262,7 +262,7 @@ namespace cv { namespace cuda { namespace device ////////////////////////////////////////////////////////////////////// // Prepared_SQDIFF_NORMED - // normAcc* are accurate normalization routines which make GPU matchTemplate + // normAcc* are accurate normalization routines which make CUDA matchTemplate // consistent with CPU one __device__ float normAcc(float num, float denum) diff --git a/modules/cudaimgproc/src/cvt_color_internal.h b/modules/cudaimgproc/src/cvt_color_internal.h index 7eb8c6ef8..4f3caffe4 100644 --- a/modules/cudaimgproc/src/cvt_color_internal.h +++ b/modules/cudaimgproc/src/cvt_color_internal.h @@ -45,230 +45,230 @@ namespace cv { namespace cuda { namespace device { -#define OPENCV_GPU_DECLARE_CVTCOLOR_ONE(name) \ +#define OPENCV_CUDA_DECLARE_CVTCOLOR_ONE(name) \ void name(PtrStepSzb src, PtrStepSzb dst, cudaStream_t stream); -#define OPENCV_GPU_DECLARE_CVTCOLOR_ALL(name) \ - OPENCV_GPU_DECLARE_CVTCOLOR_ONE(name ## _8u) \ - OPENCV_GPU_DECLARE_CVTCOLOR_ONE(name ## _16u) \ - OPENCV_GPU_DECLARE_CVTCOLOR_ONE(name ## _32f) +#define OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(name) \ + OPENCV_CUDA_DECLARE_CVTCOLOR_ONE(name ## _8u) \ + OPENCV_CUDA_DECLARE_CVTCOLOR_ONE(name ## _16u) \ + OPENCV_CUDA_DECLARE_CVTCOLOR_ONE(name ## _32f) -#define OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(name) \ - OPENCV_GPU_DECLARE_CVTCOLOR_ONE(name ## _8u) \ - OPENCV_GPU_DECLARE_CVTCOLOR_ONE(name ## _32f) +#define OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(name) \ + OPENCV_CUDA_DECLARE_CVTCOLOR_ONE(name ## _8u) \ + OPENCV_CUDA_DECLARE_CVTCOLOR_ONE(name ## _32f) -#define OPENCV_GPU_DECLARE_CVTCOLOR_8U32F_FULL(name) \ - OPENCV_GPU_DECLARE_CVTCOLOR_ONE(name ## _8u) \ - OPENCV_GPU_DECLARE_CVTCOLOR_ONE(name ## _32f) \ - OPENCV_GPU_DECLARE_CVTCOLOR_ONE(name ## _full_8u) \ - OPENCV_GPU_DECLARE_CVTCOLOR_ONE(name ## _full_32f) +#define OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F_FULL(name) \ + OPENCV_CUDA_DECLARE_CVTCOLOR_ONE(name ## _8u) \ + OPENCV_CUDA_DECLARE_CVTCOLOR_ONE(name ## _32f) \ + OPENCV_CUDA_DECLARE_CVTCOLOR_ONE(name ## _full_8u) \ + OPENCV_CUDA_DECLARE_CVTCOLOR_ONE(name ## _full_32f) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(bgr_to_rgb) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(bgr_to_bgra) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(bgr_to_rgba) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(bgra_to_bgr) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(bgra_to_rgb) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(bgra_to_rgba) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(bgr_to_rgb) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(bgr_to_bgra) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(bgr_to_rgba) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(bgra_to_bgr) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(bgra_to_rgb) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(bgra_to_rgba) - OPENCV_GPU_DECLARE_CVTCOLOR_ONE(bgr_to_bgr555) - OPENCV_GPU_DECLARE_CVTCOLOR_ONE(bgr_to_bgr565) - OPENCV_GPU_DECLARE_CVTCOLOR_ONE(rgb_to_bgr555) - OPENCV_GPU_DECLARE_CVTCOLOR_ONE(rgb_to_bgr565) - OPENCV_GPU_DECLARE_CVTCOLOR_ONE(bgra_to_bgr555) - OPENCV_GPU_DECLARE_CVTCOLOR_ONE(bgra_to_bgr565) - OPENCV_GPU_DECLARE_CVTCOLOR_ONE(rgba_to_bgr555) - OPENCV_GPU_DECLARE_CVTCOLOR_ONE(rgba_to_bgr565) + OPENCV_CUDA_DECLARE_CVTCOLOR_ONE(bgr_to_bgr555) + OPENCV_CUDA_DECLARE_CVTCOLOR_ONE(bgr_to_bgr565) + OPENCV_CUDA_DECLARE_CVTCOLOR_ONE(rgb_to_bgr555) + OPENCV_CUDA_DECLARE_CVTCOLOR_ONE(rgb_to_bgr565) + OPENCV_CUDA_DECLARE_CVTCOLOR_ONE(bgra_to_bgr555) + OPENCV_CUDA_DECLARE_CVTCOLOR_ONE(bgra_to_bgr565) + OPENCV_CUDA_DECLARE_CVTCOLOR_ONE(rgba_to_bgr555) + OPENCV_CUDA_DECLARE_CVTCOLOR_ONE(rgba_to_bgr565) - OPENCV_GPU_DECLARE_CVTCOLOR_ONE(bgr555_to_rgb) - OPENCV_GPU_DECLARE_CVTCOLOR_ONE(bgr565_to_rgb) - OPENCV_GPU_DECLARE_CVTCOLOR_ONE(bgr555_to_bgr) - OPENCV_GPU_DECLARE_CVTCOLOR_ONE(bgr565_to_bgr) - OPENCV_GPU_DECLARE_CVTCOLOR_ONE(bgr555_to_rgba) - OPENCV_GPU_DECLARE_CVTCOLOR_ONE(bgr565_to_rgba) - OPENCV_GPU_DECLARE_CVTCOLOR_ONE(bgr555_to_bgra) - OPENCV_GPU_DECLARE_CVTCOLOR_ONE(bgr565_to_bgra) + OPENCV_CUDA_DECLARE_CVTCOLOR_ONE(bgr555_to_rgb) + OPENCV_CUDA_DECLARE_CVTCOLOR_ONE(bgr565_to_rgb) + OPENCV_CUDA_DECLARE_CVTCOLOR_ONE(bgr555_to_bgr) + OPENCV_CUDA_DECLARE_CVTCOLOR_ONE(bgr565_to_bgr) + OPENCV_CUDA_DECLARE_CVTCOLOR_ONE(bgr555_to_rgba) + OPENCV_CUDA_DECLARE_CVTCOLOR_ONE(bgr565_to_rgba) + OPENCV_CUDA_DECLARE_CVTCOLOR_ONE(bgr555_to_bgra) + OPENCV_CUDA_DECLARE_CVTCOLOR_ONE(bgr565_to_bgra) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(gray_to_bgr) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(gray_to_bgra) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(gray_to_bgr) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(gray_to_bgra) - OPENCV_GPU_DECLARE_CVTCOLOR_ONE(gray_to_bgr555) - OPENCV_GPU_DECLARE_CVTCOLOR_ONE(gray_to_bgr565) + OPENCV_CUDA_DECLARE_CVTCOLOR_ONE(gray_to_bgr555) + OPENCV_CUDA_DECLARE_CVTCOLOR_ONE(gray_to_bgr565) - OPENCV_GPU_DECLARE_CVTCOLOR_ONE(bgr555_to_gray) - OPENCV_GPU_DECLARE_CVTCOLOR_ONE(bgr565_to_gray) + OPENCV_CUDA_DECLARE_CVTCOLOR_ONE(bgr555_to_gray) + OPENCV_CUDA_DECLARE_CVTCOLOR_ONE(bgr565_to_gray) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(rgb_to_gray) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(bgr_to_gray) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(rgba_to_gray) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(bgra_to_gray) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(rgb_to_gray) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(bgr_to_gray) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(rgba_to_gray) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(bgra_to_gray) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(rgb_to_yuv) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(rgba_to_yuv) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(rgb_to_yuv4) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(rgba_to_yuv4) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(bgr_to_yuv) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(bgra_to_yuv) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(bgr_to_yuv4) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(bgra_to_yuv4) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(rgb_to_yuv) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(rgba_to_yuv) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(rgb_to_yuv4) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(rgba_to_yuv4) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(bgr_to_yuv) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(bgra_to_yuv) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(bgr_to_yuv4) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(bgra_to_yuv4) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(yuv_to_rgb) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(yuv_to_rgba) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(yuv4_to_rgb) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(yuv4_to_rgba) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(yuv_to_bgr) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(yuv_to_bgra) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(yuv4_to_bgr) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(yuv4_to_bgra) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(yuv_to_rgb) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(yuv_to_rgba) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(yuv4_to_rgb) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(yuv4_to_rgba) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(yuv_to_bgr) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(yuv_to_bgra) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(yuv4_to_bgr) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(yuv4_to_bgra) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(rgb_to_YCrCb) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(rgba_to_YCrCb) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(rgb_to_YCrCb4) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(rgba_to_YCrCb4) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(bgr_to_YCrCb) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(bgra_to_YCrCb) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(bgr_to_YCrCb4) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(bgra_to_YCrCb4) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(rgb_to_YCrCb) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(rgba_to_YCrCb) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(rgb_to_YCrCb4) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(rgba_to_YCrCb4) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(bgr_to_YCrCb) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(bgra_to_YCrCb) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(bgr_to_YCrCb4) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(bgra_to_YCrCb4) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(YCrCb_to_rgb) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(YCrCb_to_rgba) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(YCrCb4_to_rgb) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(YCrCb4_to_rgba) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(YCrCb_to_bgr) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(YCrCb_to_bgra) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(YCrCb4_to_bgr) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(YCrCb4_to_bgra) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(YCrCb_to_rgb) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(YCrCb_to_rgba) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(YCrCb4_to_rgb) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(YCrCb4_to_rgba) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(YCrCb_to_bgr) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(YCrCb_to_bgra) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(YCrCb4_to_bgr) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(YCrCb4_to_bgra) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(rgb_to_xyz) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(rgba_to_xyz) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(rgb_to_xyz4) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(rgba_to_xyz4) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(bgr_to_xyz) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(bgra_to_xyz) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(bgr_to_xyz4) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(bgra_to_xyz4) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(rgb_to_xyz) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(rgba_to_xyz) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(rgb_to_xyz4) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(rgba_to_xyz4) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(bgr_to_xyz) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(bgra_to_xyz) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(bgr_to_xyz4) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(bgra_to_xyz4) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(xyz_to_rgb) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(xyz4_to_rgb) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(xyz_to_rgba) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(xyz4_to_rgba) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(xyz_to_bgr) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(xyz4_to_bgr) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(xyz_to_bgra) - OPENCV_GPU_DECLARE_CVTCOLOR_ALL(xyz4_to_bgra) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(xyz_to_rgb) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(xyz4_to_rgb) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(xyz_to_rgba) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(xyz4_to_rgba) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(xyz_to_bgr) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(xyz4_to_bgr) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(xyz_to_bgra) + OPENCV_CUDA_DECLARE_CVTCOLOR_ALL(xyz4_to_bgra) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F_FULL(rgb_to_hsv) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F_FULL(rgba_to_hsv) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F_FULL(rgb_to_hsv4) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F_FULL(rgba_to_hsv4) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F_FULL(bgr_to_hsv) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F_FULL(bgra_to_hsv) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F_FULL(bgr_to_hsv4) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F_FULL(bgra_to_hsv4) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F_FULL(rgb_to_hsv) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F_FULL(rgba_to_hsv) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F_FULL(rgb_to_hsv4) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F_FULL(rgba_to_hsv4) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F_FULL(bgr_to_hsv) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F_FULL(bgra_to_hsv) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F_FULL(bgr_to_hsv4) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F_FULL(bgra_to_hsv4) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F_FULL(hsv_to_rgb) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F_FULL(hsv_to_rgba) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F_FULL(hsv4_to_rgb) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F_FULL(hsv4_to_rgba) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F_FULL(hsv_to_bgr) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F_FULL(hsv_to_bgra) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F_FULL(hsv4_to_bgr) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F_FULL(hsv4_to_bgra) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F_FULL(hsv_to_rgb) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F_FULL(hsv_to_rgba) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F_FULL(hsv4_to_rgb) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F_FULL(hsv4_to_rgba) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F_FULL(hsv_to_bgr) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F_FULL(hsv_to_bgra) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F_FULL(hsv4_to_bgr) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F_FULL(hsv4_to_bgra) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F_FULL(rgb_to_hls) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F_FULL(rgba_to_hls) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F_FULL(rgb_to_hls4) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F_FULL(rgb_to_hls) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F_FULL(rgba_to_hls) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F_FULL(rgb_to_hls4) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F_FULL(rgba_to_hls4) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F_FULL(bgr_to_hls) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F_FULL(bgra_to_hls) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F_FULL(bgr_to_hls4) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F_FULL(bgra_to_hls4) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F_FULL(rgba_to_hls4) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F_FULL(bgr_to_hls) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F_FULL(bgra_to_hls) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F_FULL(bgr_to_hls4) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F_FULL(bgra_to_hls4) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F_FULL(hls_to_rgb) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F_FULL(hls_to_rgba) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F_FULL(hls4_to_rgb) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F_FULL(hls4_to_rgba) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F_FULL(hls_to_bgr) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F_FULL(hls_to_bgra) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F_FULL(hls4_to_bgr) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F_FULL(hls4_to_bgra) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F_FULL(hls_to_rgb) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F_FULL(hls_to_rgba) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F_FULL(hls4_to_rgb) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F_FULL(hls4_to_rgba) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F_FULL(hls_to_bgr) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F_FULL(hls_to_bgra) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F_FULL(hls4_to_bgr) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F_FULL(hls4_to_bgra) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(rgb_to_lab) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(rgba_to_lab) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(rgb_to_lab4) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(rgba_to_lab4) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(bgr_to_lab) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(bgra_to_lab) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(bgr_to_lab4) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(bgra_to_lab4) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(rgb_to_lab) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(rgba_to_lab) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(rgb_to_lab4) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(rgba_to_lab4) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(bgr_to_lab) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(bgra_to_lab) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(bgr_to_lab4) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(bgra_to_lab4) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(lrgb_to_lab) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(lrgba_to_lab) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(lrgb_to_lab4) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(lrgba_to_lab4) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(lbgr_to_lab) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(lbgra_to_lab) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(lbgr_to_lab4) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(lbgra_to_lab4) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(lrgb_to_lab) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(lrgba_to_lab) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(lrgb_to_lab4) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(lrgba_to_lab4) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(lbgr_to_lab) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(lbgra_to_lab) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(lbgr_to_lab4) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(lbgra_to_lab4) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(lab_to_rgb) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(lab4_to_rgb) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(lab_to_rgba) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(lab4_to_rgba) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(lab_to_bgr) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(lab4_to_bgr) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(lab_to_bgra) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(lab4_to_bgra) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(lab_to_rgb) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(lab4_to_rgb) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(lab_to_rgba) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(lab4_to_rgba) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(lab_to_bgr) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(lab4_to_bgr) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(lab_to_bgra) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(lab4_to_bgra) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(lab_to_lrgb) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(lab4_to_lrgb) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(lab_to_lrgba) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(lab4_to_lrgba) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(lab_to_lbgr) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(lab4_to_lbgr) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(lab_to_lbgra) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(lab4_to_lbgra) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(lab_to_lrgb) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(lab4_to_lrgb) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(lab_to_lrgba) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(lab4_to_lrgba) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(lab_to_lbgr) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(lab4_to_lbgr) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(lab_to_lbgra) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(lab4_to_lbgra) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(rgb_to_luv) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(rgba_to_luv) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(rgb_to_luv4) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(rgba_to_luv4) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(bgr_to_luv) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(bgra_to_luv) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(bgr_to_luv4) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(bgra_to_luv4) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(rgb_to_luv) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(rgba_to_luv) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(rgb_to_luv4) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(rgba_to_luv4) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(bgr_to_luv) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(bgra_to_luv) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(bgr_to_luv4) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(bgra_to_luv4) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(lrgb_to_luv) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(lrgba_to_luv) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(lrgb_to_luv4) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(lrgba_to_luv4) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(lbgr_to_luv) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(lbgra_to_luv) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(lbgr_to_luv4) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(lbgra_to_luv4) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(lrgb_to_luv) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(lrgba_to_luv) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(lrgb_to_luv4) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(lrgba_to_luv4) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(lbgr_to_luv) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(lbgra_to_luv) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(lbgr_to_luv4) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(lbgra_to_luv4) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(luv_to_rgb) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(luv4_to_rgb) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(luv_to_rgba) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(luv4_to_rgba) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(luv_to_bgr) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(luv4_to_bgr) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(luv_to_bgra) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(luv4_to_bgra) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(luv_to_rgb) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(luv4_to_rgb) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(luv_to_rgba) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(luv4_to_rgba) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(luv_to_bgr) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(luv4_to_bgr) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(luv_to_bgra) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(luv4_to_bgra) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(luv_to_lrgb) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(luv4_to_lrgb) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(luv_to_lrgba) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(luv4_to_lrgba) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(luv_to_lbgr) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(luv4_to_lbgr) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(luv_to_lbgra) - OPENCV_GPU_DECLARE_CVTCOLOR_8U32F(luv4_to_lbgra) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(luv_to_lrgb) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(luv4_to_lrgb) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(luv_to_lrgba) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(luv4_to_lrgba) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(luv_to_lbgr) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(luv4_to_lbgr) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(luv_to_lbgra) + OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F(luv4_to_lbgra) - #undef OPENCV_GPU_DECLARE_CVTCOLOR_ONE - #undef OPENCV_GPU_DECLARE_CVTCOLOR_ALL - #undef OPENCV_GPU_DECLARE_CVTCOLOR_8U32F - #undef OPENCV_GPU_DECLARE_CVTCOLOR_8U32F_FULL + #undef OPENCV_CUDA_DECLARE_CVTCOLOR_ONE + #undef OPENCV_CUDA_DECLARE_CVTCOLOR_ALL + #undef OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F + #undef OPENCV_CUDA_DECLARE_CVTCOLOR_8U32F_FULL }}} #endif diff --git a/modules/cudaimgproc/src/histogram.cpp b/modules/cudaimgproc/src/histogram.cpp index cb22e3ba2..471578dda 100644 --- a/modules/cudaimgproc/src/histogram.cpp +++ b/modules/cudaimgproc/src/histogram.cpp @@ -167,7 +167,7 @@ namespace { } - CV_INIT_ALGORITHM(CLAHE_Impl, "CLAHE_GPU", + CV_INIT_ALGORITHM(CLAHE_Impl, "CLAHE_CUDA", obj.info()->addParam(obj, "clipLimit", obj.clipLimit_); obj.info()->addParam(obj, "tilesX", obj.tilesX_); obj.info()->addParam(obj, "tilesY", obj.tilesY_)) diff --git a/modules/cudaimgproc/src/hough_circles.cpp b/modules/cudaimgproc/src/hough_circles.cpp index 3ea9eb135..b31288953 100644 --- a/modules/cudaimgproc/src/hough_circles.cpp +++ b/modules/cudaimgproc/src/hough_circles.cpp @@ -99,7 +99,7 @@ namespace void write(FileStorage& fs) const { - fs << "name" << "HoughCirclesDetector_GPU" + fs << "name" << "HoughCirclesDetector_CUDA" << "dp" << dp_ << "minDist" << minDist_ << "cannyThreshold" << cannyThreshold_ @@ -111,7 +111,7 @@ namespace void read(const FileNode& fn) { - CV_Assert( String(fn["name"]) == "HoughCirclesDetector_GPU" ); + CV_Assert( String(fn["name"]) == "HoughCirclesDetector_CUDA" ); dp_ = (float)fn["dp"]; minDist_ = (float)fn["minDist"]; cannyThreshold_ = (int)fn["cannyThreshold"]; diff --git a/modules/cudaimgproc/src/hough_lines.cpp b/modules/cudaimgproc/src/hough_lines.cpp index 1c5a1b833..6bfa65a18 100644 --- a/modules/cudaimgproc/src/hough_lines.cpp +++ b/modules/cudaimgproc/src/hough_lines.cpp @@ -95,7 +95,7 @@ namespace void write(FileStorage& fs) const { - fs << "name" << "HoughLinesDetector_GPU" + fs << "name" << "HoughLinesDetector_CUDA" << "rho" << rho_ << "theta" << theta_ << "threshold" << threshold_ @@ -105,7 +105,7 @@ namespace void read(const FileNode& fn) { - CV_Assert( String(fn["name"]) == "HoughLinesDetector_GPU" ); + CV_Assert( String(fn["name"]) == "HoughLinesDetector_CUDA" ); rho_ = (float)fn["rho"]; theta_ = (float)fn["theta"]; threshold_ = (int)fn["threshold"]; diff --git a/modules/cudaimgproc/src/hough_segments.cpp b/modules/cudaimgproc/src/hough_segments.cpp index 4624cf480..dc3141130 100644 --- a/modules/cudaimgproc/src/hough_segments.cpp +++ b/modules/cudaimgproc/src/hough_segments.cpp @@ -98,7 +98,7 @@ namespace void write(FileStorage& fs) const { - fs << "name" << "PHoughLinesDetector_GPU" + fs << "name" << "PHoughLinesDetector_CUDA" << "rho" << rho_ << "theta" << theta_ << "minLineLength" << minLineLength_ @@ -108,7 +108,7 @@ namespace void read(const FileNode& fn) { - CV_Assert( String(fn["name"]) == "PHoughLinesDetector_GPU" ); + CV_Assert( String(fn["name"]) == "PHoughLinesDetector_CUDA" ); rho_ = (float)fn["rho"]; theta_ = (float)fn["theta"]; minLineLength_ = (int)fn["minLineLength"]; diff --git a/modules/cudaimgproc/src/mean_shift.cpp b/modules/cudaimgproc/src/mean_shift.cpp index d02e3ec73..c0e4999fa 100644 --- a/modules/cudaimgproc/src/mean_shift.cpp +++ b/modules/cudaimgproc/src/mean_shift.cpp @@ -88,7 +88,7 @@ void cv::cuda::meanShiftFiltering(InputArray _src, OutputArray _dst, int sp, int } //////////////////////////////////////////////////////////////////////// -// meanShiftProc_GPU +// meanShiftProc_CUDA namespace cv { namespace cuda { namespace device { diff --git a/modules/cudaimgproc/test/test_bilateral_filter.cpp b/modules/cudaimgproc/test/test_bilateral_filter.cpp index 7f697a75b..e250083d8 100644 --- a/modules/cudaimgproc/test/test_bilateral_filter.cpp +++ b/modules/cudaimgproc/test/test_bilateral_filter.cpp @@ -72,7 +72,7 @@ PARAM_TEST_CASE(BilateralFilter, cv::cuda::DeviceInfo, cv::Size, MatType) } }; -GPU_TEST_P(BilateralFilter, Accuracy) +CUDA_TEST_P(BilateralFilter, Accuracy) { cv::Mat src = randomMat(size, type); @@ -87,7 +87,7 @@ GPU_TEST_P(BilateralFilter, Accuracy) EXPECT_MAT_NEAR(dst_gold, dst, src.depth() == CV_32F ? 1e-3 : 1.0); } -INSTANTIATE_TEST_CASE_P(GPU_ImgProc, BilateralFilter, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_ImgProc, BilateralFilter, testing::Combine( ALL_DEVICES, testing::Values(cv::Size(128, 128), cv::Size(113, 113), cv::Size(639, 481)), testing::Values(MatType(CV_8UC1), MatType(CV_8UC3), MatType(CV_32FC1), MatType(CV_32FC3)) diff --git a/modules/cudaimgproc/test/test_blend.cpp b/modules/cudaimgproc/test/test_blend.cpp index abbbcf193..9cfd0e0f7 100644 --- a/modules/cudaimgproc/test/test_blend.cpp +++ b/modules/cudaimgproc/test/test_blend.cpp @@ -94,7 +94,7 @@ PARAM_TEST_CASE(Blend, cv::cuda::DeviceInfo, cv::Size, MatType, UseRoi) } }; -GPU_TEST_P(Blend, Accuracy) +CUDA_TEST_P(Blend, Accuracy) { int depth = CV_MAT_DEPTH(type); @@ -115,7 +115,7 @@ GPU_TEST_P(Blend, Accuracy) EXPECT_MAT_NEAR(result_gold, result, CV_MAT_DEPTH(type) == CV_8U ? 1.0 : 1e-5); } -INSTANTIATE_TEST_CASE_P(GPU_ImgProc, Blend, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_ImgProc, Blend, testing::Combine( ALL_DEVICES, DIFFERENT_SIZES, testing::Values(MatType(CV_8UC1), MatType(CV_8UC3), MatType(CV_8UC4), MatType(CV_32FC1), MatType(CV_32FC3), MatType(CV_32FC4)), diff --git a/modules/cudaimgproc/test/test_canny.cpp b/modules/cudaimgproc/test/test_canny.cpp index 1d426527a..adb5c0d7e 100644 --- a/modules/cudaimgproc/test/test_canny.cpp +++ b/modules/cudaimgproc/test/test_canny.cpp @@ -73,7 +73,7 @@ PARAM_TEST_CASE(Canny, cv::cuda::DeviceInfo, AppertureSize, L2gradient, UseRoi) } }; -GPU_TEST_P(Canny, Accuracy) +CUDA_TEST_P(Canny, Accuracy) { cv::Mat img = readImage("stereobm/aloe-L.png", cv::IMREAD_GRAYSCALE); ASSERT_FALSE(img.empty()); @@ -92,7 +92,7 @@ GPU_TEST_P(Canny, Accuracy) EXPECT_MAT_SIMILAR(edges_gold, edges, 2e-2); } -INSTANTIATE_TEST_CASE_P(GPU_ImgProc, Canny, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_ImgProc, Canny, testing::Combine( ALL_DEVICES, testing::Values(AppertureSize(3), AppertureSize(5)), testing::Values(L2gradient(false), L2gradient(true)), diff --git a/modules/cudaimgproc/test/test_color.cpp b/modules/cudaimgproc/test/test_color.cpp index 85a72c798..6816cc8fd 100644 --- a/modules/cudaimgproc/test/test_color.cpp +++ b/modules/cudaimgproc/test/test_color.cpp @@ -71,7 +71,7 @@ PARAM_TEST_CASE(CvtColor, cv::cuda::DeviceInfo, cv::Size, MatDepth, UseRoi) } }; -GPU_TEST_P(CvtColor, BGR2RGB) +CUDA_TEST_P(CvtColor, BGR2RGB) { cv::Mat src = img; @@ -84,7 +84,7 @@ GPU_TEST_P(CvtColor, BGR2RGB) EXPECT_MAT_NEAR(dst_gold, dst, 0.0); } -GPU_TEST_P(CvtColor, BGR2RGBA) +CUDA_TEST_P(CvtColor, BGR2RGBA) { cv::Mat src = img; @@ -97,7 +97,7 @@ GPU_TEST_P(CvtColor, BGR2RGBA) EXPECT_MAT_NEAR(dst_gold, dst, 0.0); } -GPU_TEST_P(CvtColor, BGR2BGRA) +CUDA_TEST_P(CvtColor, BGR2BGRA) { cv::Mat src = img; @@ -110,7 +110,7 @@ GPU_TEST_P(CvtColor, BGR2BGRA) EXPECT_MAT_NEAR(dst_gold, dst, 0.0); } -GPU_TEST_P(CvtColor, BGRA2RGB) +CUDA_TEST_P(CvtColor, BGRA2RGB) { cv::Mat src; cv::cvtColor(img, src, cv::COLOR_BGR2BGRA); @@ -124,7 +124,7 @@ GPU_TEST_P(CvtColor, BGRA2RGB) EXPECT_MAT_NEAR(dst_gold, dst, 0.0); } -GPU_TEST_P(CvtColor, BGRA2BGR) +CUDA_TEST_P(CvtColor, BGRA2BGR) { cv::Mat src; cv::cvtColor(img, src, cv::COLOR_BGR2BGRA); @@ -138,7 +138,7 @@ GPU_TEST_P(CvtColor, BGRA2BGR) EXPECT_MAT_NEAR(dst_gold, dst, 0.0); } -GPU_TEST_P(CvtColor, BGRA2RGBA) +CUDA_TEST_P(CvtColor, BGRA2RGBA) { cv::Mat src; cv::cvtColor(img, src, cv::COLOR_BGR2BGRA); @@ -152,7 +152,7 @@ GPU_TEST_P(CvtColor, BGRA2RGBA) EXPECT_MAT_NEAR(dst_gold, dst, 0.0); } -GPU_TEST_P(CvtColor, BGR2GRAY) +CUDA_TEST_P(CvtColor, BGR2GRAY) { cv::Mat src = img; @@ -165,7 +165,7 @@ GPU_TEST_P(CvtColor, BGR2GRAY) EXPECT_MAT_NEAR(dst_gold, dst, 1e-5); } -GPU_TEST_P(CvtColor, RGB2GRAY) +CUDA_TEST_P(CvtColor, RGB2GRAY) { cv::Mat src = img; @@ -178,7 +178,7 @@ GPU_TEST_P(CvtColor, RGB2GRAY) EXPECT_MAT_NEAR(dst_gold, dst, 1e-5); } -GPU_TEST_P(CvtColor, GRAY2BGR) +CUDA_TEST_P(CvtColor, GRAY2BGR) { cv::Mat src; cv::cvtColor(img, src, cv::COLOR_BGR2GRAY); @@ -192,7 +192,7 @@ GPU_TEST_P(CvtColor, GRAY2BGR) EXPECT_MAT_NEAR(dst_gold, dst, 0.0); } -GPU_TEST_P(CvtColor, GRAY2BGRA) +CUDA_TEST_P(CvtColor, GRAY2BGRA) { cv::Mat src; cv::cvtColor(img, src, cv::COLOR_BGR2GRAY); @@ -206,7 +206,7 @@ GPU_TEST_P(CvtColor, GRAY2BGRA) EXPECT_MAT_NEAR(dst_gold, dst, 0.0); } -GPU_TEST_P(CvtColor, BGRA2GRAY) +CUDA_TEST_P(CvtColor, BGRA2GRAY) { cv::Mat src; cv::cvtColor(img, src, cv::COLOR_BGR2BGRA); @@ -220,7 +220,7 @@ GPU_TEST_P(CvtColor, BGRA2GRAY) EXPECT_MAT_NEAR(dst_gold, dst, 1e-5); } -GPU_TEST_P(CvtColor, RGBA2GRAY) +CUDA_TEST_P(CvtColor, RGBA2GRAY) { cv::Mat src; cv::cvtColor(img, src, cv::COLOR_BGR2RGBA); @@ -234,7 +234,7 @@ GPU_TEST_P(CvtColor, RGBA2GRAY) EXPECT_MAT_NEAR(dst_gold, dst, 1e-5); } -GPU_TEST_P(CvtColor, BGR2BGR565) +CUDA_TEST_P(CvtColor, BGR2BGR565) { if (depth != CV_8U) return; @@ -250,7 +250,7 @@ GPU_TEST_P(CvtColor, BGR2BGR565) EXPECT_MAT_NEAR(dst_gold, dst, 0.0); } -GPU_TEST_P(CvtColor, RGB2BGR565) +CUDA_TEST_P(CvtColor, RGB2BGR565) { if (depth != CV_8U) return; @@ -266,7 +266,7 @@ GPU_TEST_P(CvtColor, RGB2BGR565) EXPECT_MAT_NEAR(dst_gold, dst, 0.0); } -GPU_TEST_P(CvtColor, BGR5652BGR) +CUDA_TEST_P(CvtColor, BGR5652BGR) { if (depth != CV_8U) return; @@ -283,7 +283,7 @@ GPU_TEST_P(CvtColor, BGR5652BGR) EXPECT_MAT_NEAR(dst_gold, dst, 0.0); } -GPU_TEST_P(CvtColor, BGR5652RGB) +CUDA_TEST_P(CvtColor, BGR5652RGB) { if (depth != CV_8U) return; @@ -300,7 +300,7 @@ GPU_TEST_P(CvtColor, BGR5652RGB) EXPECT_MAT_NEAR(dst_gold, dst, 0.0); } -GPU_TEST_P(CvtColor, BGRA2BGR565) +CUDA_TEST_P(CvtColor, BGRA2BGR565) { if (depth != CV_8U) return; @@ -317,7 +317,7 @@ GPU_TEST_P(CvtColor, BGRA2BGR565) EXPECT_MAT_NEAR(dst_gold, dst, 0.0); } -GPU_TEST_P(CvtColor, RGBA2BGR565) +CUDA_TEST_P(CvtColor, RGBA2BGR565) { if (depth != CV_8U) return; @@ -334,7 +334,7 @@ GPU_TEST_P(CvtColor, RGBA2BGR565) EXPECT_MAT_NEAR(dst_gold, dst, 0.0); } -GPU_TEST_P(CvtColor, BGR5652BGRA) +CUDA_TEST_P(CvtColor, BGR5652BGRA) { if (depth != CV_8U) return; @@ -351,7 +351,7 @@ GPU_TEST_P(CvtColor, BGR5652BGRA) EXPECT_MAT_NEAR(dst_gold, dst, 0.0); } -GPU_TEST_P(CvtColor, BGR5652RGBA) +CUDA_TEST_P(CvtColor, BGR5652RGBA) { if (depth != CV_8U) return; @@ -368,7 +368,7 @@ GPU_TEST_P(CvtColor, BGR5652RGBA) EXPECT_MAT_NEAR(dst_gold, dst, 0.0); } -GPU_TEST_P(CvtColor, GRAY2BGR565) +CUDA_TEST_P(CvtColor, GRAY2BGR565) { if (depth != CV_8U) return; @@ -385,7 +385,7 @@ GPU_TEST_P(CvtColor, GRAY2BGR565) EXPECT_MAT_NEAR(dst_gold, dst, 0.0); } -GPU_TEST_P(CvtColor, BGR5652GRAY) +CUDA_TEST_P(CvtColor, BGR5652GRAY) { if (depth != CV_8U) return; @@ -402,7 +402,7 @@ GPU_TEST_P(CvtColor, BGR5652GRAY) EXPECT_MAT_NEAR(dst_gold, dst, 0.0); } -GPU_TEST_P(CvtColor, BGR2BGR555) +CUDA_TEST_P(CvtColor, BGR2BGR555) { if (depth != CV_8U) return; @@ -418,7 +418,7 @@ GPU_TEST_P(CvtColor, BGR2BGR555) EXPECT_MAT_NEAR(dst_gold, dst, 0.0); } -GPU_TEST_P(CvtColor, RGB2BGR555) +CUDA_TEST_P(CvtColor, RGB2BGR555) { if (depth != CV_8U) return; @@ -434,7 +434,7 @@ GPU_TEST_P(CvtColor, RGB2BGR555) EXPECT_MAT_NEAR(dst_gold, dst, 0.0); } -GPU_TEST_P(CvtColor, BGR5552BGR) +CUDA_TEST_P(CvtColor, BGR5552BGR) { if (depth != CV_8U) return; @@ -451,7 +451,7 @@ GPU_TEST_P(CvtColor, BGR5552BGR) EXPECT_MAT_NEAR(dst_gold, dst, 0.0); } -GPU_TEST_P(CvtColor, BGR5552RGB) +CUDA_TEST_P(CvtColor, BGR5552RGB) { if (depth != CV_8U) return; @@ -468,7 +468,7 @@ GPU_TEST_P(CvtColor, BGR5552RGB) EXPECT_MAT_NEAR(dst_gold, dst, 0.0); } -GPU_TEST_P(CvtColor, BGRA2BGR555) +CUDA_TEST_P(CvtColor, BGRA2BGR555) { if (depth != CV_8U) return; @@ -485,7 +485,7 @@ GPU_TEST_P(CvtColor, BGRA2BGR555) EXPECT_MAT_NEAR(dst_gold, dst, 0.0); } -GPU_TEST_P(CvtColor, RGBA2BGR555) +CUDA_TEST_P(CvtColor, RGBA2BGR555) { if (depth != CV_8U) return; @@ -502,7 +502,7 @@ GPU_TEST_P(CvtColor, RGBA2BGR555) EXPECT_MAT_NEAR(dst_gold, dst, 0.0); } -GPU_TEST_P(CvtColor, BGR5552BGRA) +CUDA_TEST_P(CvtColor, BGR5552BGRA) { if (depth != CV_8U) return; @@ -519,7 +519,7 @@ GPU_TEST_P(CvtColor, BGR5552BGRA) EXPECT_MAT_NEAR(dst_gold, dst, 0.0); } -GPU_TEST_P(CvtColor, BGR5552RGBA) +CUDA_TEST_P(CvtColor, BGR5552RGBA) { if (depth != CV_8U) return; @@ -536,7 +536,7 @@ GPU_TEST_P(CvtColor, BGR5552RGBA) EXPECT_MAT_NEAR(dst_gold, dst, 0.0); } -GPU_TEST_P(CvtColor, GRAY2BGR555) +CUDA_TEST_P(CvtColor, GRAY2BGR555) { if (depth != CV_8U) return; @@ -553,7 +553,7 @@ GPU_TEST_P(CvtColor, GRAY2BGR555) EXPECT_MAT_NEAR(dst_gold, dst, 0.0); } -GPU_TEST_P(CvtColor, BGR5552GRAY) +CUDA_TEST_P(CvtColor, BGR5552GRAY) { if (depth != CV_8U) return; @@ -570,7 +570,7 @@ GPU_TEST_P(CvtColor, BGR5552GRAY) EXPECT_MAT_NEAR(dst_gold, dst, 0.0); } -GPU_TEST_P(CvtColor, BGR2XYZ) +CUDA_TEST_P(CvtColor, BGR2XYZ) { cv::Mat src = img; @@ -583,7 +583,7 @@ GPU_TEST_P(CvtColor, BGR2XYZ) EXPECT_MAT_NEAR(dst_gold, dst, 1e-5); } -GPU_TEST_P(CvtColor, RGB2XYZ) +CUDA_TEST_P(CvtColor, RGB2XYZ) { cv::Mat src = img; @@ -596,7 +596,7 @@ GPU_TEST_P(CvtColor, RGB2XYZ) EXPECT_MAT_NEAR(dst_gold, dst, 1e-5); } -GPU_TEST_P(CvtColor, BGR2XYZ4) +CUDA_TEST_P(CvtColor, BGR2XYZ4) { cv::Mat src = img; @@ -617,7 +617,7 @@ GPU_TEST_P(CvtColor, BGR2XYZ4) EXPECT_MAT_NEAR(dst_gold, h_dst, 1e-5); } -GPU_TEST_P(CvtColor, BGRA2XYZ4) +CUDA_TEST_P(CvtColor, BGRA2XYZ4) { cv::Mat src; cv::cvtColor(img, src, cv::COLOR_BGR2BGRA); @@ -639,7 +639,7 @@ GPU_TEST_P(CvtColor, BGRA2XYZ4) EXPECT_MAT_NEAR(dst_gold, h_dst, 1e-5); } -GPU_TEST_P(CvtColor, XYZ2BGR) +CUDA_TEST_P(CvtColor, XYZ2BGR) { cv::Mat src; cv::cvtColor(img, src, cv::COLOR_BGR2XYZ); @@ -653,7 +653,7 @@ GPU_TEST_P(CvtColor, XYZ2BGR) EXPECT_MAT_NEAR(dst_gold, dst, 1e-5); } -GPU_TEST_P(CvtColor, XYZ2RGB) +CUDA_TEST_P(CvtColor, XYZ2RGB) { cv::Mat src; cv::cvtColor(img, src, cv::COLOR_BGR2XYZ); @@ -667,7 +667,7 @@ GPU_TEST_P(CvtColor, XYZ2RGB) EXPECT_MAT_NEAR(dst_gold, dst, 1e-5); } -GPU_TEST_P(CvtColor, XYZ42BGR) +CUDA_TEST_P(CvtColor, XYZ42BGR) { cv::Mat src; cv::cvtColor(img, src, cv::COLOR_BGR2XYZ); @@ -686,7 +686,7 @@ GPU_TEST_P(CvtColor, XYZ42BGR) EXPECT_MAT_NEAR(dst_gold, dst, 1e-5); } -GPU_TEST_P(CvtColor, XYZ42BGRA) +CUDA_TEST_P(CvtColor, XYZ42BGRA) { cv::Mat src; cv::cvtColor(img, src, cv::COLOR_BGR2XYZ); @@ -705,7 +705,7 @@ GPU_TEST_P(CvtColor, XYZ42BGRA) EXPECT_MAT_NEAR(dst_gold, dst, 1e-5); } -GPU_TEST_P(CvtColor, BGR2YCrCb) +CUDA_TEST_P(CvtColor, BGR2YCrCb) { cv::Mat src = img; @@ -718,7 +718,7 @@ GPU_TEST_P(CvtColor, BGR2YCrCb) EXPECT_MAT_NEAR(dst_gold, dst, 1e-5); } -GPU_TEST_P(CvtColor, RGB2YCrCb) +CUDA_TEST_P(CvtColor, RGB2YCrCb) { cv::Mat src = img; @@ -731,7 +731,7 @@ GPU_TEST_P(CvtColor, RGB2YCrCb) EXPECT_MAT_NEAR(dst_gold, dst, 1e-5); } -GPU_TEST_P(CvtColor, BGR2YCrCb4) +CUDA_TEST_P(CvtColor, BGR2YCrCb4) { cv::Mat src = img; @@ -752,7 +752,7 @@ GPU_TEST_P(CvtColor, BGR2YCrCb4) EXPECT_MAT_NEAR(dst_gold, h_dst, 1e-5); } -GPU_TEST_P(CvtColor, RGBA2YCrCb4) +CUDA_TEST_P(CvtColor, RGBA2YCrCb4) { cv::Mat src; cv::cvtColor(img, src, cv::COLOR_BGR2RGBA); @@ -774,7 +774,7 @@ GPU_TEST_P(CvtColor, RGBA2YCrCb4) EXPECT_MAT_NEAR(dst_gold, h_dst, 1e-5); } -GPU_TEST_P(CvtColor, YCrCb2BGR) +CUDA_TEST_P(CvtColor, YCrCb2BGR) { cv::Mat src; cv::cvtColor(img, src, cv::COLOR_BGR2YCrCb); @@ -788,7 +788,7 @@ GPU_TEST_P(CvtColor, YCrCb2BGR) EXPECT_MAT_NEAR(dst_gold, dst, 1e-5); } -GPU_TEST_P(CvtColor, YCrCb2RGB) +CUDA_TEST_P(CvtColor, YCrCb2RGB) { cv::Mat src; cv::cvtColor(img, src, cv::COLOR_BGR2YCrCb); @@ -802,7 +802,7 @@ GPU_TEST_P(CvtColor, YCrCb2RGB) EXPECT_MAT_NEAR(dst_gold, dst, 1e-5); } -GPU_TEST_P(CvtColor, YCrCb42RGB) +CUDA_TEST_P(CvtColor, YCrCb42RGB) { cv::Mat src; cv::cvtColor(img, src, cv::COLOR_BGR2YCrCb); @@ -821,7 +821,7 @@ GPU_TEST_P(CvtColor, YCrCb42RGB) EXPECT_MAT_NEAR(dst_gold, dst, 1e-5); } -GPU_TEST_P(CvtColor, YCrCb42RGBA) +CUDA_TEST_P(CvtColor, YCrCb42RGBA) { cv::Mat src; cv::cvtColor(img, src, cv::COLOR_BGR2YCrCb); @@ -840,7 +840,7 @@ GPU_TEST_P(CvtColor, YCrCb42RGBA) EXPECT_MAT_NEAR(dst_gold, dst, 1e-5); } -GPU_TEST_P(CvtColor, BGR2HSV) +CUDA_TEST_P(CvtColor, BGR2HSV) { if (depth == CV_16U) return; @@ -856,7 +856,7 @@ GPU_TEST_P(CvtColor, BGR2HSV) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_32F ? 1e-2 : 1); } -GPU_TEST_P(CvtColor, RGB2HSV) +CUDA_TEST_P(CvtColor, RGB2HSV) { if (depth == CV_16U) return; @@ -872,7 +872,7 @@ GPU_TEST_P(CvtColor, RGB2HSV) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_32F ? 1e-2 : 1); } -GPU_TEST_P(CvtColor, RGB2HSV4) +CUDA_TEST_P(CvtColor, RGB2HSV4) { if (depth == CV_16U) return; @@ -896,7 +896,7 @@ GPU_TEST_P(CvtColor, RGB2HSV4) EXPECT_MAT_NEAR(dst_gold, h_dst, depth == CV_32F ? 1e-2 : 1); } -GPU_TEST_P(CvtColor, RGBA2HSV4) +CUDA_TEST_P(CvtColor, RGBA2HSV4) { if (depth == CV_16U) return; @@ -921,7 +921,7 @@ GPU_TEST_P(CvtColor, RGBA2HSV4) EXPECT_MAT_NEAR(dst_gold, h_dst, depth == CV_32F ? 1e-2 : 1); } -GPU_TEST_P(CvtColor, BGR2HLS) +CUDA_TEST_P(CvtColor, BGR2HLS) { if (depth == CV_16U) return; @@ -937,7 +937,7 @@ GPU_TEST_P(CvtColor, BGR2HLS) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_32F ? 1e-2 : 1); } -GPU_TEST_P(CvtColor, RGB2HLS) +CUDA_TEST_P(CvtColor, RGB2HLS) { if (depth == CV_16U) return; @@ -953,7 +953,7 @@ GPU_TEST_P(CvtColor, RGB2HLS) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_32F ? 1e-2 : 1); } -GPU_TEST_P(CvtColor, RGB2HLS4) +CUDA_TEST_P(CvtColor, RGB2HLS4) { if (depth == CV_16U) return; @@ -977,7 +977,7 @@ GPU_TEST_P(CvtColor, RGB2HLS4) EXPECT_MAT_NEAR(dst_gold, h_dst, depth == CV_32F ? 1e-2 : 1); } -GPU_TEST_P(CvtColor, RGBA2HLS4) +CUDA_TEST_P(CvtColor, RGBA2HLS4) { if (depth == CV_16U) return; @@ -1002,7 +1002,7 @@ GPU_TEST_P(CvtColor, RGBA2HLS4) EXPECT_MAT_NEAR(dst_gold, h_dst, depth == CV_32F ? 1e-2 : 1); } -GPU_TEST_P(CvtColor, HSV2BGR) +CUDA_TEST_P(CvtColor, HSV2BGR) { if (depth == CV_16U) return; @@ -1019,7 +1019,7 @@ GPU_TEST_P(CvtColor, HSV2BGR) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_32F ? 1e-2 : 1); } -GPU_TEST_P(CvtColor, HSV2RGB) +CUDA_TEST_P(CvtColor, HSV2RGB) { if (depth == CV_16U) return; @@ -1036,7 +1036,7 @@ GPU_TEST_P(CvtColor, HSV2RGB) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_32F ? 1e-2 : 1); } -GPU_TEST_P(CvtColor, HSV42BGR) +CUDA_TEST_P(CvtColor, HSV42BGR) { if (depth == CV_16U) return; @@ -1058,7 +1058,7 @@ GPU_TEST_P(CvtColor, HSV42BGR) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_32F ? 1e-2 : 1); } -GPU_TEST_P(CvtColor, HSV42BGRA) +CUDA_TEST_P(CvtColor, HSV42BGRA) { if (depth == CV_16U) return; @@ -1080,7 +1080,7 @@ GPU_TEST_P(CvtColor, HSV42BGRA) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_32F ? 1e-2 : 1); } -GPU_TEST_P(CvtColor, HLS2BGR) +CUDA_TEST_P(CvtColor, HLS2BGR) { if (depth == CV_16U) return; @@ -1097,7 +1097,7 @@ GPU_TEST_P(CvtColor, HLS2BGR) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_32F ? 1e-2 : 1); } -GPU_TEST_P(CvtColor, HLS2RGB) +CUDA_TEST_P(CvtColor, HLS2RGB) { if (depth == CV_16U) return; @@ -1114,7 +1114,7 @@ GPU_TEST_P(CvtColor, HLS2RGB) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_32F ? 1e-2 : 1); } -GPU_TEST_P(CvtColor, HLS42RGB) +CUDA_TEST_P(CvtColor, HLS42RGB) { if (depth == CV_16U) return; @@ -1136,7 +1136,7 @@ GPU_TEST_P(CvtColor, HLS42RGB) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_32F ? 1e-2 : 1); } -GPU_TEST_P(CvtColor, HLS42RGBA) +CUDA_TEST_P(CvtColor, HLS42RGBA) { if (depth == CV_16U) return; @@ -1159,7 +1159,7 @@ GPU_TEST_P(CvtColor, HLS42RGBA) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_32F ? 1e-2 : 1); } -GPU_TEST_P(CvtColor, BGR2HSV_FULL) +CUDA_TEST_P(CvtColor, BGR2HSV_FULL) { if (depth == CV_16U) return; @@ -1175,7 +1175,7 @@ GPU_TEST_P(CvtColor, BGR2HSV_FULL) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_32F ? 1e-2 : 1); } -GPU_TEST_P(CvtColor, RGB2HSV_FULL) +CUDA_TEST_P(CvtColor, RGB2HSV_FULL) { if (depth == CV_16U) return; @@ -1191,7 +1191,7 @@ GPU_TEST_P(CvtColor, RGB2HSV_FULL) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_32F ? 1e-2 : 1); } -GPU_TEST_P(CvtColor, RGB2HSV4_FULL) +CUDA_TEST_P(CvtColor, RGB2HSV4_FULL) { if (depth == CV_16U) return; @@ -1215,7 +1215,7 @@ GPU_TEST_P(CvtColor, RGB2HSV4_FULL) EXPECT_MAT_NEAR(dst_gold, h_dst, depth == CV_32F ? 1e-2 : 1); } -GPU_TEST_P(CvtColor, RGBA2HSV4_FULL) +CUDA_TEST_P(CvtColor, RGBA2HSV4_FULL) { if (depth == CV_16U) return; @@ -1240,7 +1240,7 @@ GPU_TEST_P(CvtColor, RGBA2HSV4_FULL) EXPECT_MAT_NEAR(dst_gold, h_dst, depth == CV_32F ? 1e-2 : 1); } -GPU_TEST_P(CvtColor, BGR2HLS_FULL) +CUDA_TEST_P(CvtColor, BGR2HLS_FULL) { if (depth == CV_16U) return; @@ -1256,7 +1256,7 @@ GPU_TEST_P(CvtColor, BGR2HLS_FULL) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_32F ? 1e-2 : 1); } -GPU_TEST_P(CvtColor, RGB2HLS_FULL) +CUDA_TEST_P(CvtColor, RGB2HLS_FULL) { if (depth == CV_16U) return; @@ -1272,7 +1272,7 @@ GPU_TEST_P(CvtColor, RGB2HLS_FULL) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_32F ? 1e-2 : 1); } -GPU_TEST_P(CvtColor, RGB2HLS4_FULL) +CUDA_TEST_P(CvtColor, RGB2HLS4_FULL) { if (depth == CV_16U) return; @@ -1296,7 +1296,7 @@ GPU_TEST_P(CvtColor, RGB2HLS4_FULL) EXPECT_MAT_NEAR(dst_gold, h_dst, depth == CV_32F ? 1e-2 : 1); } -GPU_TEST_P(CvtColor, RGBA2HLS4_FULL) +CUDA_TEST_P(CvtColor, RGBA2HLS4_FULL) { if (depth == CV_16U) return; @@ -1321,7 +1321,7 @@ GPU_TEST_P(CvtColor, RGBA2HLS4_FULL) EXPECT_MAT_NEAR(dst_gold, h_dst, depth == CV_32F ? 1e-2 : 1); } -GPU_TEST_P(CvtColor, HSV2BGR_FULL) +CUDA_TEST_P(CvtColor, HSV2BGR_FULL) { if (depth == CV_16U) return; @@ -1338,7 +1338,7 @@ GPU_TEST_P(CvtColor, HSV2BGR_FULL) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_32F ? 1e-2 : 1); } -GPU_TEST_P(CvtColor, HSV2RGB_FULL) +CUDA_TEST_P(CvtColor, HSV2RGB_FULL) { if (depth == CV_16U) return; @@ -1355,7 +1355,7 @@ GPU_TEST_P(CvtColor, HSV2RGB_FULL) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_32F ? 1e-2 : 1); } -GPU_TEST_P(CvtColor, HSV42RGB_FULL) +CUDA_TEST_P(CvtColor, HSV42RGB_FULL) { if (depth == CV_16U) return; @@ -1377,7 +1377,7 @@ GPU_TEST_P(CvtColor, HSV42RGB_FULL) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_32F ? 1e-2 : 1); } -GPU_TEST_P(CvtColor, HSV42RGBA_FULL) +CUDA_TEST_P(CvtColor, HSV42RGBA_FULL) { if (depth == CV_16U) return; @@ -1399,7 +1399,7 @@ GPU_TEST_P(CvtColor, HSV42RGBA_FULL) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_32F ? 1e-2 : 1); } -GPU_TEST_P(CvtColor, HLS2BGR_FULL) +CUDA_TEST_P(CvtColor, HLS2BGR_FULL) { if (depth == CV_16U) return; @@ -1416,7 +1416,7 @@ GPU_TEST_P(CvtColor, HLS2BGR_FULL) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_32F ? 1e-2 : 1); } -GPU_TEST_P(CvtColor, HLS2RGB_FULL) +CUDA_TEST_P(CvtColor, HLS2RGB_FULL) { if (depth == CV_16U) return; @@ -1433,7 +1433,7 @@ GPU_TEST_P(CvtColor, HLS2RGB_FULL) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_32F ? 1e-2 : 1); } -GPU_TEST_P(CvtColor, HLS42RGB_FULL) +CUDA_TEST_P(CvtColor, HLS42RGB_FULL) { if (depth == CV_16U) return; @@ -1455,7 +1455,7 @@ GPU_TEST_P(CvtColor, HLS42RGB_FULL) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_32F ? 1e-2 : 1); } -GPU_TEST_P(CvtColor, HLS42RGBA_FULL) +CUDA_TEST_P(CvtColor, HLS42RGBA_FULL) { if (depth == CV_16U) return; @@ -1477,7 +1477,7 @@ GPU_TEST_P(CvtColor, HLS42RGBA_FULL) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_32F ? 1e-2 : 1); } -GPU_TEST_P(CvtColor, BGR2YUV) +CUDA_TEST_P(CvtColor, BGR2YUV) { cv::Mat src = img; @@ -1490,7 +1490,7 @@ GPU_TEST_P(CvtColor, BGR2YUV) EXPECT_MAT_NEAR(dst_gold, dst, 1e-5); } -GPU_TEST_P(CvtColor, RGB2YUV) +CUDA_TEST_P(CvtColor, RGB2YUV) { cv::Mat src = img; @@ -1503,7 +1503,7 @@ GPU_TEST_P(CvtColor, RGB2YUV) EXPECT_MAT_NEAR(dst_gold, dst, 1e-5); } -GPU_TEST_P(CvtColor, YUV2BGR) +CUDA_TEST_P(CvtColor, YUV2BGR) { cv::Mat src; cv::cvtColor(img, src, cv::COLOR_BGR2YUV); @@ -1517,7 +1517,7 @@ GPU_TEST_P(CvtColor, YUV2BGR) EXPECT_MAT_NEAR(dst_gold, dst, 1e-5); } -GPU_TEST_P(CvtColor, YUV42BGR) +CUDA_TEST_P(CvtColor, YUV42BGR) { cv::Mat src; cv::cvtColor(img, src, cv::COLOR_BGR2YUV); @@ -1536,7 +1536,7 @@ GPU_TEST_P(CvtColor, YUV42BGR) EXPECT_MAT_NEAR(dst_gold, dst, 1e-5); } -GPU_TEST_P(CvtColor, YUV42BGRA) +CUDA_TEST_P(CvtColor, YUV42BGRA) { cv::Mat src; cv::cvtColor(img, src, cv::COLOR_BGR2YUV); @@ -1555,7 +1555,7 @@ GPU_TEST_P(CvtColor, YUV42BGRA) EXPECT_MAT_NEAR(dst_gold, dst, 1e-5); } -GPU_TEST_P(CvtColor, YUV2RGB) +CUDA_TEST_P(CvtColor, YUV2RGB) { cv::Mat src; cv::cvtColor(img, src, cv::COLOR_RGB2YUV); @@ -1569,7 +1569,7 @@ GPU_TEST_P(CvtColor, YUV2RGB) EXPECT_MAT_NEAR(dst_gold, dst, 1e-5); } -GPU_TEST_P(CvtColor, BGR2YUV4) +CUDA_TEST_P(CvtColor, BGR2YUV4) { cv::Mat src = img; @@ -1590,7 +1590,7 @@ GPU_TEST_P(CvtColor, BGR2YUV4) EXPECT_MAT_NEAR(dst_gold, h_dst, 1e-5); } -GPU_TEST_P(CvtColor, RGBA2YUV4) +CUDA_TEST_P(CvtColor, RGBA2YUV4) { cv::Mat src; cv::cvtColor(img, src, cv::COLOR_BGR2RGBA); @@ -1612,7 +1612,7 @@ GPU_TEST_P(CvtColor, RGBA2YUV4) EXPECT_MAT_NEAR(dst_gold, h_dst, 1e-5); } -GPU_TEST_P(CvtColor, BGR2Lab) +CUDA_TEST_P(CvtColor, BGR2Lab) { if (depth == CV_16U) return; @@ -1628,7 +1628,7 @@ GPU_TEST_P(CvtColor, BGR2Lab) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_8U ? 1 : 1e-3); } -GPU_TEST_P(CvtColor, RGB2Lab) +CUDA_TEST_P(CvtColor, RGB2Lab) { if (depth == CV_16U) return; @@ -1644,7 +1644,7 @@ GPU_TEST_P(CvtColor, RGB2Lab) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_8U ? 1 : 1e-3); } -GPU_TEST_P(CvtColor, BGRA2Lab4) +CUDA_TEST_P(CvtColor, BGRA2Lab4) { if (depth == CV_16U) return; @@ -1669,7 +1669,7 @@ GPU_TEST_P(CvtColor, BGRA2Lab4) EXPECT_MAT_NEAR(dst_gold, h_dst, depth == CV_8U ? 1 : 1e-3); } -GPU_TEST_P(CvtColor, LBGR2Lab) +CUDA_TEST_P(CvtColor, LBGR2Lab) { if (depth == CV_16U) return; @@ -1685,7 +1685,7 @@ GPU_TEST_P(CvtColor, LBGR2Lab) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_8U ? 1 : 1e-3); } -GPU_TEST_P(CvtColor, LRGB2Lab) +CUDA_TEST_P(CvtColor, LRGB2Lab) { if (depth == CV_16U) return; @@ -1701,7 +1701,7 @@ GPU_TEST_P(CvtColor, LRGB2Lab) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_8U ? 1 : 1e-3); } -GPU_TEST_P(CvtColor, LBGRA2Lab4) +CUDA_TEST_P(CvtColor, LBGRA2Lab4) { if (depth == CV_16U) return; @@ -1726,7 +1726,7 @@ GPU_TEST_P(CvtColor, LBGRA2Lab4) EXPECT_MAT_NEAR(dst_gold, h_dst, depth == CV_8U ? 1 : 1e-3); } -GPU_TEST_P(CvtColor, Lab2BGR) +CUDA_TEST_P(CvtColor, Lab2BGR) { if (depth == CV_16U) return; @@ -1743,7 +1743,7 @@ GPU_TEST_P(CvtColor, Lab2BGR) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_8U ? 1 : 1e-5); } -GPU_TEST_P(CvtColor, Lab2RGB) +CUDA_TEST_P(CvtColor, Lab2RGB) { if (depth == CV_16U) return; @@ -1760,7 +1760,7 @@ GPU_TEST_P(CvtColor, Lab2RGB) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_8U ? 1 : 1e-5); } -GPU_TEST_P(CvtColor, Lab2BGRA) +CUDA_TEST_P(CvtColor, Lab2BGRA) { if (depth == CV_16U) return; @@ -1779,7 +1779,7 @@ GPU_TEST_P(CvtColor, Lab2BGRA) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_8U ? 1 : 1e-5); } -GPU_TEST_P(CvtColor, Lab2LBGR) +CUDA_TEST_P(CvtColor, Lab2LBGR) { if (depth == CV_16U) return; @@ -1796,7 +1796,7 @@ GPU_TEST_P(CvtColor, Lab2LBGR) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_8U ? 1 : 1e-5); } -GPU_TEST_P(CvtColor, Lab2LRGB) +CUDA_TEST_P(CvtColor, Lab2LRGB) { if (depth == CV_16U) return; @@ -1813,7 +1813,7 @@ GPU_TEST_P(CvtColor, Lab2LRGB) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_8U ? 1 : 1e-5); } -GPU_TEST_P(CvtColor, Lab2LRGBA) +CUDA_TEST_P(CvtColor, Lab2LRGBA) { if (depth == CV_16U) return; @@ -1830,7 +1830,7 @@ GPU_TEST_P(CvtColor, Lab2LRGBA) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_8U ? 1 : 1e-5); } -GPU_TEST_P(CvtColor, BGR2Luv) +CUDA_TEST_P(CvtColor, BGR2Luv) { if (depth == CV_16U) return; @@ -1846,7 +1846,7 @@ GPU_TEST_P(CvtColor, BGR2Luv) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_8U ? 1 : 1e-3); } -GPU_TEST_P(CvtColor, RGB2Luv) +CUDA_TEST_P(CvtColor, RGB2Luv) { if (depth == CV_16U) return; @@ -1862,7 +1862,7 @@ GPU_TEST_P(CvtColor, RGB2Luv) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_8U ? 1 : 1e-3); } -GPU_TEST_P(CvtColor, BGRA2Luv4) +CUDA_TEST_P(CvtColor, BGRA2Luv4) { if (depth == CV_16U) return; @@ -1887,7 +1887,7 @@ GPU_TEST_P(CvtColor, BGRA2Luv4) EXPECT_MAT_NEAR(dst_gold, h_dst, depth == CV_8U ? 1 : 1e-3); } -GPU_TEST_P(CvtColor, LBGR2Luv) +CUDA_TEST_P(CvtColor, LBGR2Luv) { if (depth == CV_16U) return; @@ -1903,7 +1903,7 @@ GPU_TEST_P(CvtColor, LBGR2Luv) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_8U ? 1 : 1e-3); } -GPU_TEST_P(CvtColor, LRGB2Luv) +CUDA_TEST_P(CvtColor, LRGB2Luv) { if (depth == CV_16U) return; @@ -1919,7 +1919,7 @@ GPU_TEST_P(CvtColor, LRGB2Luv) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_8U ? 1 : 1e-3); } -GPU_TEST_P(CvtColor, LBGRA2Luv4) +CUDA_TEST_P(CvtColor, LBGRA2Luv4) { if (depth == CV_16U) return; @@ -1944,7 +1944,7 @@ GPU_TEST_P(CvtColor, LBGRA2Luv4) EXPECT_MAT_NEAR(dst_gold, h_dst, depth == CV_8U ? 1 : 1e-3); } -GPU_TEST_P(CvtColor, Luv2BGR) +CUDA_TEST_P(CvtColor, Luv2BGR) { if (depth == CV_16U) return; @@ -1961,7 +1961,7 @@ GPU_TEST_P(CvtColor, Luv2BGR) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_8U ? 1 : 1e-4); } -GPU_TEST_P(CvtColor, Luv2RGB) +CUDA_TEST_P(CvtColor, Luv2RGB) { if (depth == CV_16U) return; @@ -1978,7 +1978,7 @@ GPU_TEST_P(CvtColor, Luv2RGB) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_8U ? 1 : 1e-4); } -GPU_TEST_P(CvtColor, Luv2BGRA) +CUDA_TEST_P(CvtColor, Luv2BGRA) { if (depth == CV_16U) return; @@ -1997,7 +1997,7 @@ GPU_TEST_P(CvtColor, Luv2BGRA) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_8U ? 1 : 1e-4); } -GPU_TEST_P(CvtColor, Luv2LBGR) +CUDA_TEST_P(CvtColor, Luv2LBGR) { if (depth == CV_16U) return; @@ -2014,7 +2014,7 @@ GPU_TEST_P(CvtColor, Luv2LBGR) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_8U ? 1 : 1e-4); } -GPU_TEST_P(CvtColor, Luv2LRGB) +CUDA_TEST_P(CvtColor, Luv2LRGB) { if (depth == CV_16U) return; @@ -2031,7 +2031,7 @@ GPU_TEST_P(CvtColor, Luv2LRGB) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_8U ? 1 : 1e-4); } -GPU_TEST_P(CvtColor, Luv2LRGBA) +CUDA_TEST_P(CvtColor, Luv2LRGBA) { if (depth == CV_16U) return; @@ -2050,7 +2050,7 @@ GPU_TEST_P(CvtColor, Luv2LRGBA) #if defined (CUDA_VERSION) && (CUDA_VERSION >= 5000) -GPU_TEST_P(CvtColor, RGBA2mRGBA) +CUDA_TEST_P(CvtColor, RGBA2mRGBA) { if (depth != CV_8U) return; @@ -2068,7 +2068,7 @@ GPU_TEST_P(CvtColor, RGBA2mRGBA) #endif // defined (CUDA_VERSION) && (CUDA_VERSION >= 5000) -GPU_TEST_P(CvtColor, BayerBG2BGR) +CUDA_TEST_P(CvtColor, BayerBG2BGR) { if ((depth != CV_8U && depth != CV_16U) || useRoi) return; @@ -2084,7 +2084,7 @@ GPU_TEST_P(CvtColor, BayerBG2BGR) EXPECT_MAT_NEAR(dst_gold(cv::Rect(1, 1, dst.cols - 2, dst.rows - 2)), dst(cv::Rect(1, 1, dst.cols - 2, dst.rows - 2)), 0); } -GPU_TEST_P(CvtColor, BayerBG2BGR4) +CUDA_TEST_P(CvtColor, BayerBG2BGR4) { if ((depth != CV_8U && depth != CV_16U) || useRoi) return; @@ -2107,7 +2107,7 @@ GPU_TEST_P(CvtColor, BayerBG2BGR4) EXPECT_MAT_NEAR(dst_gold(cv::Rect(1, 1, dst.cols - 2, dst.rows - 2)), dst3(cv::Rect(1, 1, dst.cols - 2, dst.rows - 2)), 0); } -GPU_TEST_P(CvtColor, BayerGB2BGR) +CUDA_TEST_P(CvtColor, BayerGB2BGR) { if ((depth != CV_8U && depth != CV_16U) || useRoi) return; @@ -2123,7 +2123,7 @@ GPU_TEST_P(CvtColor, BayerGB2BGR) EXPECT_MAT_NEAR(dst_gold(cv::Rect(1, 1, dst.cols - 2, dst.rows - 2)), dst(cv::Rect(1, 1, dst.cols - 2, dst.rows - 2)), 0); } -GPU_TEST_P(CvtColor, BayerGB2BGR4) +CUDA_TEST_P(CvtColor, BayerGB2BGR4) { if ((depth != CV_8U && depth != CV_16U) || useRoi) return; @@ -2145,7 +2145,7 @@ GPU_TEST_P(CvtColor, BayerGB2BGR4) EXPECT_MAT_NEAR(dst_gold(cv::Rect(1, 1, dst.cols - 2, dst.rows - 2)), dst3(cv::Rect(1, 1, dst.cols - 2, dst.rows - 2)), 0); } -GPU_TEST_P(CvtColor, BayerRG2BGR) +CUDA_TEST_P(CvtColor, BayerRG2BGR) { if ((depth != CV_8U && depth != CV_16U) || useRoi) return; @@ -2161,7 +2161,7 @@ GPU_TEST_P(CvtColor, BayerRG2BGR) EXPECT_MAT_NEAR(dst_gold(cv::Rect(1, 1, dst.cols - 2, dst.rows - 2)), dst(cv::Rect(1, 1, dst.cols - 2, dst.rows - 2)), 0); } -GPU_TEST_P(CvtColor, BayerRG2BGR4) +CUDA_TEST_P(CvtColor, BayerRG2BGR4) { if ((depth != CV_8U && depth != CV_16U) || useRoi) return; @@ -2183,7 +2183,7 @@ GPU_TEST_P(CvtColor, BayerRG2BGR4) EXPECT_MAT_NEAR(dst_gold(cv::Rect(1, 1, dst.cols - 2, dst.rows - 2)), dst3(cv::Rect(1, 1, dst.cols - 2, dst.rows - 2)), 0); } -GPU_TEST_P(CvtColor, BayerGR2BGR) +CUDA_TEST_P(CvtColor, BayerGR2BGR) { if ((depth != CV_8U && depth != CV_16U) || useRoi) return; @@ -2199,7 +2199,7 @@ GPU_TEST_P(CvtColor, BayerGR2BGR) EXPECT_MAT_NEAR(dst_gold(cv::Rect(1, 1, dst.cols - 2, dst.rows - 2)), dst(cv::Rect(1, 1, dst.cols - 2, dst.rows - 2)), 0); } -GPU_TEST_P(CvtColor, BayerGR2BGR4) +CUDA_TEST_P(CvtColor, BayerGR2BGR4) { if ((depth != CV_8U && depth != CV_16U) || useRoi) return; @@ -2221,7 +2221,7 @@ GPU_TEST_P(CvtColor, BayerGR2BGR4) EXPECT_MAT_NEAR(dst_gold(cv::Rect(1, 1, dst.cols - 2, dst.rows - 2)), dst3(cv::Rect(1, 1, dst.cols - 2, dst.rows - 2)), 0); } -GPU_TEST_P(CvtColor, BayerBG2Gray) +CUDA_TEST_P(CvtColor, BayerBG2Gray) { if ((depth != CV_8U && depth != CV_16U) || useRoi) return; @@ -2237,7 +2237,7 @@ GPU_TEST_P(CvtColor, BayerBG2Gray) EXPECT_MAT_NEAR(dst_gold(cv::Rect(1, 1, dst.cols - 2, dst.rows - 2)), dst(cv::Rect(1, 1, dst.cols - 2, dst.rows - 2)), 2); } -GPU_TEST_P(CvtColor, BayerGB2Gray) +CUDA_TEST_P(CvtColor, BayerGB2Gray) { if ((depth != CV_8U && depth != CV_16U) || useRoi) return; @@ -2253,7 +2253,7 @@ GPU_TEST_P(CvtColor, BayerGB2Gray) EXPECT_MAT_NEAR(dst_gold(cv::Rect(1, 1, dst.cols - 2, dst.rows - 2)), dst(cv::Rect(1, 1, dst.cols - 2, dst.rows - 2)), 2); } -GPU_TEST_P(CvtColor, BayerRG2Gray) +CUDA_TEST_P(CvtColor, BayerRG2Gray) { if ((depth != CV_8U && depth != CV_16U) || useRoi) return; @@ -2269,7 +2269,7 @@ GPU_TEST_P(CvtColor, BayerRG2Gray) EXPECT_MAT_NEAR(dst_gold(cv::Rect(1, 1, dst.cols - 2, dst.rows - 2)), dst(cv::Rect(1, 1, dst.cols - 2, dst.rows - 2)), 2); } -GPU_TEST_P(CvtColor, BayerGR2Gray) +CUDA_TEST_P(CvtColor, BayerGR2Gray) { if ((depth != CV_8U && depth != CV_16U) || useRoi) return; @@ -2285,7 +2285,7 @@ GPU_TEST_P(CvtColor, BayerGR2Gray) EXPECT_MAT_NEAR(dst_gold(cv::Rect(1, 1, dst.cols - 2, dst.rows - 2)), dst(cv::Rect(1, 1, dst.cols - 2, dst.rows - 2)), 2); } -INSTANTIATE_TEST_CASE_P(GPU_ImgProc, CvtColor, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_ImgProc, CvtColor, testing::Combine( ALL_DEVICES, DIFFERENT_SIZES, testing::Values(MatDepth(CV_8U), MatDepth(CV_16U), MatDepth(CV_32F)), @@ -2354,7 +2354,7 @@ struct Demosaicing : testing::TestWithParam } }; -GPU_TEST_P(Demosaicing, BayerBG2BGR) +CUDA_TEST_P(Demosaicing, BayerBG2BGR) { cv::Mat img = readImage("stereobm/aloe-L.png"); @@ -2367,7 +2367,7 @@ GPU_TEST_P(Demosaicing, BayerBG2BGR) EXPECT_MAT_SIMILAR(img, dst, 2e-2); } -GPU_TEST_P(Demosaicing, BayerGB2BGR) +CUDA_TEST_P(Demosaicing, BayerGB2BGR) { cv::Mat img = readImage("stereobm/aloe-L.png"); @@ -2380,7 +2380,7 @@ GPU_TEST_P(Demosaicing, BayerGB2BGR) EXPECT_MAT_SIMILAR(img, dst, 2e-2); } -GPU_TEST_P(Demosaicing, BayerRG2BGR) +CUDA_TEST_P(Demosaicing, BayerRG2BGR) { cv::Mat img = readImage("stereobm/aloe-L.png"); @@ -2393,7 +2393,7 @@ GPU_TEST_P(Demosaicing, BayerRG2BGR) EXPECT_MAT_SIMILAR(img, dst, 2e-2); } -GPU_TEST_P(Demosaicing, BayerGR2BGR) +CUDA_TEST_P(Demosaicing, BayerGR2BGR) { cv::Mat img = readImage("stereobm/aloe-L.png"); @@ -2406,7 +2406,7 @@ GPU_TEST_P(Demosaicing, BayerGR2BGR) EXPECT_MAT_SIMILAR(img, dst, 2e-2); } -GPU_TEST_P(Demosaicing, BayerBG2BGR_MHT) +CUDA_TEST_P(Demosaicing, BayerBG2BGR_MHT) { cv::Mat img = readImage("stereobm/aloe-L.png"); @@ -2419,7 +2419,7 @@ GPU_TEST_P(Demosaicing, BayerBG2BGR_MHT) EXPECT_MAT_SIMILAR(img, dst, 5e-3); } -GPU_TEST_P(Demosaicing, BayerGB2BGR_MHT) +CUDA_TEST_P(Demosaicing, BayerGB2BGR_MHT) { cv::Mat img = readImage("stereobm/aloe-L.png"); @@ -2432,7 +2432,7 @@ GPU_TEST_P(Demosaicing, BayerGB2BGR_MHT) EXPECT_MAT_SIMILAR(img, dst, 5e-3); } -GPU_TEST_P(Demosaicing, BayerRG2BGR_MHT) +CUDA_TEST_P(Demosaicing, BayerRG2BGR_MHT) { cv::Mat img = readImage("stereobm/aloe-L.png"); @@ -2445,7 +2445,7 @@ GPU_TEST_P(Demosaicing, BayerRG2BGR_MHT) EXPECT_MAT_SIMILAR(img, dst, 5e-3); } -GPU_TEST_P(Demosaicing, BayerGR2BGR_MHT) +CUDA_TEST_P(Demosaicing, BayerGR2BGR_MHT) { cv::Mat img = readImage("stereobm/aloe-L.png"); @@ -2458,7 +2458,7 @@ GPU_TEST_P(Demosaicing, BayerGR2BGR_MHT) EXPECT_MAT_SIMILAR(img, dst, 5e-3); } -INSTANTIATE_TEST_CASE_P(GPU_ImgProc, Demosaicing, ALL_DEVICES); +INSTANTIATE_TEST_CASE_P(CUDA_ImgProc, Demosaicing, ALL_DEVICES); /////////////////////////////////////////////////////////////////////////////////////////////////////// // swapChannels @@ -2479,7 +2479,7 @@ PARAM_TEST_CASE(SwapChannels, cv::cuda::DeviceInfo, cv::Size, UseRoi) } }; -GPU_TEST_P(SwapChannels, Accuracy) +CUDA_TEST_P(SwapChannels, Accuracy) { cv::Mat src = readImageType("stereobm/aloe-L.png", CV_8UC4); ASSERT_FALSE(src.empty()); @@ -2495,7 +2495,7 @@ GPU_TEST_P(SwapChannels, Accuracy) EXPECT_MAT_NEAR(dst_gold, d_src, 0.0); } -INSTANTIATE_TEST_CASE_P(GPU_ImgProc, SwapChannels, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_ImgProc, SwapChannels, testing::Combine( ALL_DEVICES, DIFFERENT_SIZES, WHOLE_SUBMAT)); diff --git a/modules/cudaimgproc/test/test_corners.cpp b/modules/cudaimgproc/test/test_corners.cpp index 8403d1938..2e6b6f954 100644 --- a/modules/cudaimgproc/test/test_corners.cpp +++ b/modules/cudaimgproc/test/test_corners.cpp @@ -75,7 +75,7 @@ PARAM_TEST_CASE(CornerHarris, cv::cuda::DeviceInfo, MatType, BorderType, BlockSi } }; -GPU_TEST_P(CornerHarris, Accuracy) +CUDA_TEST_P(CornerHarris, Accuracy) { cv::Mat src = readImageType("stereobm/aloe-L.png", type); ASSERT_FALSE(src.empty()); @@ -93,7 +93,7 @@ GPU_TEST_P(CornerHarris, Accuracy) EXPECT_MAT_NEAR(dst_gold, dst, 0.02); } -INSTANTIATE_TEST_CASE_P(GPU_ImgProc, CornerHarris, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_ImgProc, CornerHarris, testing::Combine( ALL_DEVICES, testing::Values(MatType(CV_8UC1), MatType(CV_32FC1)), testing::Values(BorderType(cv::BORDER_REFLECT101), BorderType(cv::BORDER_REPLICATE), BorderType(cv::BORDER_REFLECT)), @@ -123,7 +123,7 @@ PARAM_TEST_CASE(CornerMinEigen, cv::cuda::DeviceInfo, MatType, BorderType, Block } }; -GPU_TEST_P(CornerMinEigen, Accuracy) +CUDA_TEST_P(CornerMinEigen, Accuracy) { cv::Mat src = readImageType("stereobm/aloe-L.png", type); ASSERT_FALSE(src.empty()); @@ -139,7 +139,7 @@ GPU_TEST_P(CornerMinEigen, Accuracy) EXPECT_MAT_NEAR(dst_gold, dst, 0.02); } -INSTANTIATE_TEST_CASE_P(GPU_ImgProc, CornerMinEigen, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_ImgProc, CornerMinEigen, testing::Combine( ALL_DEVICES, testing::Values(MatType(CV_8UC1), MatType(CV_32FC1)), testing::Values(BorderType(cv::BORDER_REFLECT101), BorderType(cv::BORDER_REPLICATE), BorderType(cv::BORDER_REFLECT)), diff --git a/modules/cudaimgproc/test/test_gftt.cpp b/modules/cudaimgproc/test/test_gftt.cpp index 5daaed38d..f57d29bdb 100644 --- a/modules/cudaimgproc/test/test_gftt.cpp +++ b/modules/cudaimgproc/test/test_gftt.cpp @@ -68,7 +68,7 @@ PARAM_TEST_CASE(GoodFeaturesToTrack, cv::cuda::DeviceInfo, MinDistance) } }; -GPU_TEST_P(GoodFeaturesToTrack, Accuracy) +CUDA_TEST_P(GoodFeaturesToTrack, Accuracy) { cv::Mat image = readImage("opticalflow/frame0.png", cv::IMREAD_GRAYSCALE); ASSERT_FALSE(image.empty()); @@ -109,7 +109,7 @@ GPU_TEST_P(GoodFeaturesToTrack, Accuracy) ASSERT_LE(bad_ratio, 0.01); } -GPU_TEST_P(GoodFeaturesToTrack, EmptyCorners) +CUDA_TEST_P(GoodFeaturesToTrack, EmptyCorners) { int maxCorners = 1000; double qualityLevel = 0.01; @@ -124,7 +124,7 @@ GPU_TEST_P(GoodFeaturesToTrack, EmptyCorners) ASSERT_TRUE(corners.empty()); } -INSTANTIATE_TEST_CASE_P(GPU_ImgProc, GoodFeaturesToTrack, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_ImgProc, GoodFeaturesToTrack, testing::Combine( ALL_DEVICES, testing::Values(MinDistance(0.0), MinDistance(3.0)))); diff --git a/modules/cudaimgproc/test/test_histogram.cpp b/modules/cudaimgproc/test/test_histogram.cpp index 04bba71af..ddab2917b 100644 --- a/modules/cudaimgproc/test/test_histogram.cpp +++ b/modules/cudaimgproc/test/test_histogram.cpp @@ -53,8 +53,6 @@ PARAM_TEST_CASE(HistEven, cv::cuda::DeviceInfo, cv::Size) { cv::cuda::DeviceInfo devInfo; - cv::Size size; - virtual void SetUp() { devInfo = GET_PARAM(0); @@ -64,7 +62,7 @@ PARAM_TEST_CASE(HistEven, cv::cuda::DeviceInfo, cv::Size) } }; -GPU_TEST_P(HistEven, Accuracy) +CUDA_TEST_P(HistEven, Accuracy) { cv::Mat src = randomMat(size, CV_8UC1); @@ -87,7 +85,7 @@ GPU_TEST_P(HistEven, Accuracy) EXPECT_MAT_NEAR(hist_gold, hist, 0.0); } -INSTANTIATE_TEST_CASE_P(GPU_ImgProc, HistEven, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_ImgProc, HistEven, testing::Combine( ALL_DEVICES, DIFFERENT_SIZES)); @@ -109,7 +107,7 @@ PARAM_TEST_CASE(CalcHist, cv::cuda::DeviceInfo, cv::Size) } }; -GPU_TEST_P(CalcHist, Accuracy) +CUDA_TEST_P(CalcHist, Accuracy) { cv::Mat src = randomMat(size, CV_8UC1); @@ -131,7 +129,7 @@ GPU_TEST_P(CalcHist, Accuracy) EXPECT_MAT_NEAR(hist_gold, hist, 0.0); } -INSTANTIATE_TEST_CASE_P(GPU_ImgProc, CalcHist, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_ImgProc, CalcHist, testing::Combine( ALL_DEVICES, DIFFERENT_SIZES)); @@ -152,7 +150,7 @@ PARAM_TEST_CASE(EqualizeHist, cv::cuda::DeviceInfo, cv::Size) } }; -GPU_TEST_P(EqualizeHist, Accuracy) +CUDA_TEST_P(EqualizeHist, Accuracy) { cv::Mat src = randomMat(size, CV_8UC1); @@ -165,7 +163,7 @@ GPU_TEST_P(EqualizeHist, Accuracy) EXPECT_MAT_NEAR(dst_gold, dst, 3.0); } -INSTANTIATE_TEST_CASE_P(GPU_ImgProc, EqualizeHist, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_ImgProc, EqualizeHist, testing::Combine( ALL_DEVICES, DIFFERENT_SIZES)); @@ -193,7 +191,7 @@ PARAM_TEST_CASE(CLAHE, cv::cuda::DeviceInfo, cv::Size, ClipLimit) } }; -GPU_TEST_P(CLAHE, Accuracy) +CUDA_TEST_P(CLAHE, Accuracy) { cv::Mat src = randomMat(size, CV_8UC1); @@ -208,7 +206,7 @@ GPU_TEST_P(CLAHE, Accuracy) ASSERT_MAT_NEAR(dst_gold, dst, 1.0); } -INSTANTIATE_TEST_CASE_P(GPU_ImgProc, CLAHE, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_ImgProc, CLAHE, testing::Combine( ALL_DEVICES, DIFFERENT_SIZES, testing::Values(0.0, 40.0))); diff --git a/modules/cudaimgproc/test/test_hough.cpp b/modules/cudaimgproc/test/test_hough.cpp index 67bb39d6c..5e55abe1b 100644 --- a/modules/cudaimgproc/test/test_hough.cpp +++ b/modules/cudaimgproc/test/test_hough.cpp @@ -80,7 +80,7 @@ PARAM_TEST_CASE(HoughLines, cv::cuda::DeviceInfo, cv::Size, UseRoi) } }; -GPU_TEST_P(HoughLines, Accuracy) +CUDA_TEST_P(HoughLines, Accuracy) { const cv::cuda::DeviceInfo devInfo = GET_PARAM(0); cv::cuda::setDevice(devInfo.deviceID()); @@ -108,7 +108,7 @@ GPU_TEST_P(HoughLines, Accuracy) ASSERT_MAT_NEAR(src, dst, 0.0); } -INSTANTIATE_TEST_CASE_P(GPU_ImgProc, HoughLines, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_ImgProc, HoughLines, testing::Combine( ALL_DEVICES, DIFFERENT_SIZES, WHOLE_SUBMAT)); @@ -127,7 +127,7 @@ PARAM_TEST_CASE(HoughCircles, cv::cuda::DeviceInfo, cv::Size, UseRoi) } }; -GPU_TEST_P(HoughCircles, Accuracy) +CUDA_TEST_P(HoughCircles, Accuracy) { const cv::cuda::DeviceInfo devInfo = GET_PARAM(0); cv::cuda::setDevice(devInfo.deviceID()); @@ -181,7 +181,7 @@ GPU_TEST_P(HoughCircles, Accuracy) } } -INSTANTIATE_TEST_CASE_P(GPU_ImgProc, HoughCircles, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_ImgProc, HoughCircles, testing::Combine( ALL_DEVICES, DIFFERENT_SIZES, WHOLE_SUBMAT)); @@ -193,7 +193,7 @@ PARAM_TEST_CASE(GeneralizedHough, cv::cuda::DeviceInfo, UseRoi) { }; -GPU_TEST_P(GeneralizedHough, Ballard) +CUDA_TEST_P(GeneralizedHough, Ballard) { const cv::cuda::DeviceInfo devInfo = GET_PARAM(0); cv::cuda::setDevice(devInfo.deviceID()); @@ -252,7 +252,7 @@ GPU_TEST_P(GeneralizedHough, Ballard) } } -INSTANTIATE_TEST_CASE_P(GPU_ImgProc, GeneralizedHough, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_ImgProc, GeneralizedHough, testing::Combine( ALL_DEVICES, WHOLE_SUBMAT)); diff --git a/modules/cudaimgproc/test/test_main.cpp b/modules/cudaimgproc/test/test_main.cpp index eea3d7c00..04f4fcf6e 100644 --- a/modules/cudaimgproc/test/test_main.cpp +++ b/modules/cudaimgproc/test/test_main.cpp @@ -42,4 +42,4 @@ #include "test_precomp.hpp" -CV_GPU_TEST_MAIN("gpu") +CV_CUDA_TEST_MAIN("gpu") diff --git a/modules/cudaimgproc/test/test_match_template.cpp b/modules/cudaimgproc/test/test_match_template.cpp index 718c5503d..1c57a3b45 100644 --- a/modules/cudaimgproc/test/test_match_template.cpp +++ b/modules/cudaimgproc/test/test_match_template.cpp @@ -77,7 +77,7 @@ PARAM_TEST_CASE(MatchTemplate8U, cv::cuda::DeviceInfo, cv::Size, TemplateSize, C } }; -GPU_TEST_P(MatchTemplate8U, Accuracy) +CUDA_TEST_P(MatchTemplate8U, Accuracy) { cv::Mat image = randomMat(size, CV_MAKETYPE(CV_8U, cn)); cv::Mat templ = randomMat(templ_size, CV_MAKETYPE(CV_8U, cn)); @@ -93,7 +93,7 @@ GPU_TEST_P(MatchTemplate8U, Accuracy) EXPECT_MAT_NEAR(dst_gold, dst, templ_size.area() * 1e-1); } -INSTANTIATE_TEST_CASE_P(GPU_ImgProc, MatchTemplate8U, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_ImgProc, MatchTemplate8U, testing::Combine( ALL_DEVICES, DIFFERENT_SIZES, testing::Values(TemplateSize(cv::Size(5, 5)), TemplateSize(cv::Size(16, 16)), TemplateSize(cv::Size(30, 30))), @@ -125,7 +125,7 @@ PARAM_TEST_CASE(MatchTemplate32F, cv::cuda::DeviceInfo, cv::Size, TemplateSize, } }; -GPU_TEST_P(MatchTemplate32F, Regression) +CUDA_TEST_P(MatchTemplate32F, Regression) { cv::Mat image = randomMat(size, CV_MAKETYPE(CV_32F, cn)); cv::Mat templ = randomMat(templ_size, CV_MAKETYPE(CV_32F, cn)); @@ -141,7 +141,7 @@ GPU_TEST_P(MatchTemplate32F, Regression) EXPECT_MAT_NEAR(dst_gold, dst, templ_size.area() * 1e-1); } -INSTANTIATE_TEST_CASE_P(GPU_ImgProc, MatchTemplate32F, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_ImgProc, MatchTemplate32F, testing::Combine( ALL_DEVICES, DIFFERENT_SIZES, testing::Values(TemplateSize(cv::Size(5, 5)), TemplateSize(cv::Size(16, 16)), TemplateSize(cv::Size(30, 30))), @@ -165,7 +165,7 @@ PARAM_TEST_CASE(MatchTemplateBlackSource, cv::cuda::DeviceInfo, TemplateMethod) } }; -GPU_TEST_P(MatchTemplateBlackSource, Accuracy) +CUDA_TEST_P(MatchTemplateBlackSource, Accuracy) { cv::Mat image = readImage("matchtemplate/black.png"); ASSERT_FALSE(image.empty()); @@ -189,7 +189,7 @@ GPU_TEST_P(MatchTemplateBlackSource, Accuracy) ASSERT_EQ(maxLocGold, maxLoc); } -INSTANTIATE_TEST_CASE_P(GPU_ImgProc, MatchTemplateBlackSource, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_ImgProc, MatchTemplateBlackSource, testing::Combine( ALL_DEVICES, testing::Values(TemplateMethod(cv::TM_CCOEFF_NORMED), TemplateMethod(cv::TM_CCORR_NORMED)))); @@ -212,7 +212,7 @@ PARAM_TEST_CASE(MatchTemplate_CCOEF_NORMED, cv::cuda::DeviceInfo, std::pair } }; -GPU_TEST_P(MeanShift, Filtering) +CUDA_TEST_P(MeanShift, Filtering) { cv::Mat img_template; if (supportFeature(devInfo, cv::cuda::FEATURE_SET_COMPUTE_20)) @@ -94,7 +94,7 @@ GPU_TEST_P(MeanShift, Filtering) EXPECT_MAT_NEAR(img_template, result, 0.0); } -GPU_TEST_P(MeanShift, Proc) +CUDA_TEST_P(MeanShift, Proc) { cv::FileStorage fs; if (supportFeature(devInfo, cv::cuda::FEATURE_SET_COMPUTE_20)) @@ -120,7 +120,7 @@ GPU_TEST_P(MeanShift, Proc) EXPECT_MAT_NEAR(spmap_template, spmap, 0.0); } -INSTANTIATE_TEST_CASE_P(GPU_ImgProc, MeanShift, ALL_DEVICES); +INSTANTIATE_TEST_CASE_P(CUDA_ImgProc, MeanShift, ALL_DEVICES); //////////////////////////////////////////////////////////////////////////////// // MeanShiftSegmentation @@ -144,7 +144,7 @@ PARAM_TEST_CASE(MeanShiftSegmentation, cv::cuda::DeviceInfo, MinSize) } }; -GPU_TEST_P(MeanShiftSegmentation, Regression) +CUDA_TEST_P(MeanShiftSegmentation, Regression) { cv::Mat img = readImageType("meanshift/cones.png", CV_8UC4); ASSERT_FALSE(img.empty()); @@ -167,7 +167,7 @@ GPU_TEST_P(MeanShiftSegmentation, Regression) EXPECT_MAT_SIMILAR(dst_gold, dst_rgb, 1e-3); } -INSTANTIATE_TEST_CASE_P(GPU_ImgProc, MeanShiftSegmentation, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_ImgProc, MeanShiftSegmentation, testing::Combine( ALL_DEVICES, testing::Values(MinSize(0), MinSize(4), MinSize(20), MinSize(84), MinSize(340), MinSize(1364)))); diff --git a/modules/cudalegacy/test/test_nvidia.cpp b/modules/cudalegacy/test/test_nvidia.cpp index afa27a56c..aaa815bf3 100644 --- a/modules/cudalegacy/test/test_nvidia.cpp +++ b/modules/cudalegacy/test/test_nvidia.cpp @@ -68,84 +68,84 @@ struct NVidiaTest : TestWithParam struct NPPST : NVidiaTest {}; struct NCV : NVidiaTest {}; -GPU_TEST_P(NPPST, Integral) +CUDA_TEST_P(NPPST, Integral) { bool res = nvidia_NPPST_Integral_Image(_path, nvidiaTestOutputLevel); ASSERT_TRUE(res); } -GPU_TEST_P(NPPST, SquaredIntegral) +CUDA_TEST_P(NPPST, SquaredIntegral) { bool res = nvidia_NPPST_Squared_Integral_Image(_path, nvidiaTestOutputLevel); ASSERT_TRUE(res); } -GPU_TEST_P(NPPST, RectStdDev) +CUDA_TEST_P(NPPST, RectStdDev) { bool res = nvidia_NPPST_RectStdDev(_path, nvidiaTestOutputLevel); ASSERT_TRUE(res); } -GPU_TEST_P(NPPST, Resize) +CUDA_TEST_P(NPPST, Resize) { bool res = nvidia_NPPST_Resize(_path, nvidiaTestOutputLevel); ASSERT_TRUE(res); } -GPU_TEST_P(NPPST, VectorOperations) +CUDA_TEST_P(NPPST, VectorOperations) { bool res = nvidia_NPPST_Vector_Operations(_path, nvidiaTestOutputLevel); ASSERT_TRUE(res); } -GPU_TEST_P(NPPST, Transpose) +CUDA_TEST_P(NPPST, Transpose) { bool res = nvidia_NPPST_Transpose(_path, nvidiaTestOutputLevel); ASSERT_TRUE(res); } -GPU_TEST_P(NCV, VectorOperations) +CUDA_TEST_P(NCV, VectorOperations) { bool res = nvidia_NCV_Vector_Operations(_path, nvidiaTestOutputLevel); ASSERT_TRUE(res); } -GPU_TEST_P(NCV, HaarCascadeLoader) +CUDA_TEST_P(NCV, HaarCascadeLoader) { bool res = nvidia_NCV_Haar_Cascade_Loader(_path, nvidiaTestOutputLevel); ASSERT_TRUE(res); } -GPU_TEST_P(NCV, HaarCascadeApplication) +CUDA_TEST_P(NCV, HaarCascadeApplication) { bool res = nvidia_NCV_Haar_Cascade_Application(_path, nvidiaTestOutputLevel); ASSERT_TRUE(res); } -GPU_TEST_P(NCV, HypothesesFiltration) +CUDA_TEST_P(NCV, HypothesesFiltration) { bool res = nvidia_NCV_Hypotheses_Filtration(_path, nvidiaTestOutputLevel); ASSERT_TRUE(res); } -GPU_TEST_P(NCV, Visualization) +CUDA_TEST_P(NCV, Visualization) { bool res = nvidia_NCV_Visualization(_path, nvidiaTestOutputLevel); ASSERT_TRUE(res); } -INSTANTIATE_TEST_CASE_P(GPU_Legacy, NPPST, ALL_DEVICES); -INSTANTIATE_TEST_CASE_P(GPU_Legacy, NCV, ALL_DEVICES); +INSTANTIATE_TEST_CASE_P(CUDA_Legacy, NPPST, ALL_DEVICES); +INSTANTIATE_TEST_CASE_P(CUDA_Legacy, NCV, ALL_DEVICES); #endif // HAVE_CUDA diff --git a/modules/cudaoptflow/include/opencv2/cudaoptflow.hpp b/modules/cudaoptflow/include/opencv2/cudaoptflow.hpp index eb4a9524a..220bb3457 100644 --- a/modules/cudaoptflow/include/opencv2/cudaoptflow.hpp +++ b/modules/cudaoptflow/include/opencv2/cudaoptflow.hpp @@ -182,10 +182,10 @@ private: // see reference: // [1] C. Zach, T. Pock and H. Bischof, "A Duality Based Approach for Realtime TV-L1 Optical Flow". // [2] Javier Sanchez, Enric Meinhardt-Llopis and Gabriele Facciolo. "TV-L1 Optical Flow Estimation". -class CV_EXPORTS OpticalFlowDual_TVL1_GPU +class CV_EXPORTS OpticalFlowDual_TVL1_CUDA { public: - OpticalFlowDual_TVL1_GPU(); + OpticalFlowDual_TVL1_CUDA(); void operator ()(const GpuMat& I0, const GpuMat& I1, GpuMat& flowx, GpuMat& flowy); diff --git a/modules/cudaoptflow/perf/perf_optflow.cpp b/modules/cudaoptflow/perf/perf_optflow.cpp index e249f5ac8..8edf00250 100644 --- a/modules/cudaoptflow/perf/perf_optflow.cpp +++ b/modules/cudaoptflow/perf/perf_optflow.cpp @@ -66,7 +66,7 @@ PERF_TEST_P(ImagePair, InterpolateFrames, frame0.convertTo(frame0, CV_32FC1, 1.0 / 255.0); frame1.convertTo(frame1, CV_32FC1, 1.0 / 255.0); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_frame0(frame0); const cv::cuda::GpuMat d_frame1(frame1); @@ -84,7 +84,7 @@ PERF_TEST_P(ImagePair, InterpolateFrames, TEST_CYCLE() cv::cuda::interpolateFrames(d_frame0, d_frame1, d_fu, d_fv, d_bu, d_bv, 0.5f, newFrame, d_buf); - GPU_SANITY_CHECK(newFrame, 1e-4); + CUDA_SANITY_CHECK(newFrame, 1e-4); } else { @@ -107,7 +107,7 @@ PERF_TEST_P(ImagePair, CreateOpticalFlowNeedleMap, frame0.convertTo(frame0, CV_32FC1, 1.0 / 255.0); frame1.convertTo(frame1, CV_32FC1, 1.0 / 255.0); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_frame0(frame0); const cv::cuda::GpuMat d_frame1(frame1); @@ -123,8 +123,8 @@ PERF_TEST_P(ImagePair, CreateOpticalFlowNeedleMap, TEST_CYCLE() cv::cuda::createOpticalFlowNeedleMap(u, v, vertex, colors); - GPU_SANITY_CHECK(vertex, 1e-6); - GPU_SANITY_CHECK(colors); + CUDA_SANITY_CHECK(vertex, 1e-6); + CUDA_SANITY_CHECK(colors); } else { @@ -149,7 +149,7 @@ PERF_TEST_P(ImagePair, BroxOpticalFlow, frame0.convertTo(frame0, CV_32FC1, 1.0 / 255.0); frame1.convertTo(frame1, CV_32FC1, 1.0 / 255.0); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_frame0(frame0); const cv::cuda::GpuMat d_frame1(frame1); @@ -161,8 +161,8 @@ PERF_TEST_P(ImagePair, BroxOpticalFlow, TEST_CYCLE() d_flow(d_frame0, d_frame1, u, v); - GPU_SANITY_CHECK(u, 1e-1); - GPU_SANITY_CHECK(v, 1e-1); + CUDA_SANITY_CHECK(u, 1e-1); + CUDA_SANITY_CHECK(v, 1e-1); } else { @@ -207,7 +207,7 @@ PERF_TEST_P(ImagePair_Gray_NPts_WinSz_Levels_Iters, PyrLKOpticalFlowSparse, cv::Mat pts; cv::goodFeaturesToTrack(gray_frame, pts, points, 0.01, 0.0); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_pts(pts.reshape(2, 1)); @@ -223,8 +223,8 @@ PERF_TEST_P(ImagePair_Gray_NPts_WinSz_Levels_Iters, PyrLKOpticalFlowSparse, TEST_CYCLE() d_pyrLK.sparse(d_frame0, d_frame1, d_pts, nextPts, status); - GPU_SANITY_CHECK(nextPts); - GPU_SANITY_CHECK(status); + CUDA_SANITY_CHECK(nextPts); + CUDA_SANITY_CHECK(status); } else { @@ -267,7 +267,7 @@ PERF_TEST_P(ImagePair_WinSz_Levels_Iters, PyrLKOpticalFlowDense, const cv::Mat frame1 = readImage(imagePair.second, cv::IMREAD_GRAYSCALE); ASSERT_FALSE(frame1.empty()); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_frame0(frame0); const cv::cuda::GpuMat d_frame1(frame1); @@ -281,8 +281,8 @@ PERF_TEST_P(ImagePair_WinSz_Levels_Iters, PyrLKOpticalFlowDense, TEST_CYCLE() d_pyrLK.dense(d_frame0, d_frame1, u, v); - GPU_SANITY_CHECK(u); - GPU_SANITY_CHECK(v); + CUDA_SANITY_CHECK(u); + CUDA_SANITY_CHECK(v); } else { @@ -312,7 +312,7 @@ PERF_TEST_P(ImagePair, FarnebackOpticalFlow, const double polySigma = 1.1; const int flags = 0; - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_frame0(frame0); const cv::cuda::GpuMat d_frame1(frame1); @@ -330,8 +330,8 @@ PERF_TEST_P(ImagePair, FarnebackOpticalFlow, TEST_CYCLE() d_farneback(d_frame0, d_frame1, u, v); - GPU_SANITY_CHECK(u, 1e-4); - GPU_SANITY_CHECK(v, 1e-4); + CUDA_SANITY_CHECK(u, 1e-4); + CUDA_SANITY_CHECK(v, 1e-4); } else { @@ -357,19 +357,19 @@ PERF_TEST_P(ImagePair, OpticalFlowDual_TVL1, const cv::Mat frame1 = readImage(GetParam().second, cv::IMREAD_GRAYSCALE); ASSERT_FALSE(frame1.empty()); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_frame0(frame0); const cv::cuda::GpuMat d_frame1(frame1); cv::cuda::GpuMat u; cv::cuda::GpuMat v; - cv::cuda::OpticalFlowDual_TVL1_GPU d_alg; + cv::cuda::OpticalFlowDual_TVL1_CUDA d_alg; TEST_CYCLE() d_alg(d_frame0, d_frame1, u, v); - GPU_SANITY_CHECK(u, 1e-2); - GPU_SANITY_CHECK(v, 1e-2); + CUDA_SANITY_CHECK(u, 1e-2); + CUDA_SANITY_CHECK(v, 1e-2); } else { @@ -422,7 +422,7 @@ PERF_TEST_P(ImagePair, OpticalFlowBM, const cv::Size shift_size(1, 1); const cv::Size max_range(16, 16); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_frame0(frame0); const cv::cuda::GpuMat d_frame1(frame1); @@ -430,8 +430,8 @@ PERF_TEST_P(ImagePair, OpticalFlowBM, TEST_CYCLE() cv::cuda::calcOpticalFlowBM(d_frame0, d_frame1, block_size, shift_size, max_range, false, u, v, buf); - GPU_SANITY_CHECK(u); - GPU_SANITY_CHECK(v); + CUDA_SANITY_CHECK(u); + CUDA_SANITY_CHECK(v); } else { @@ -459,7 +459,7 @@ PERF_TEST_P(ImagePair, FastOpticalFlowBM, const cv::Size shift_size(1, 1); const cv::Size max_range(16, 16); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_frame0(frame0); const cv::cuda::GpuMat d_frame1(frame1); @@ -469,8 +469,8 @@ PERF_TEST_P(ImagePair, FastOpticalFlowBM, TEST_CYCLE() fastBM(d_frame0, d_frame1, u, v, max_range.width, block_size.width); - GPU_SANITY_CHECK(u, 2); - GPU_SANITY_CHECK(v, 2); + CUDA_SANITY_CHECK(u, 2); + CUDA_SANITY_CHECK(v, 2); } else { diff --git a/modules/cudaoptflow/src/farneback.cpp b/modules/cudaoptflow/src/farneback.cpp index d17d21141..dc5203525 100644 --- a/modules/cudaoptflow/src/farneback.cpp +++ b/modules/cudaoptflow/src/farneback.cpp @@ -46,9 +46,9 @@ #define S(x) StreamAccessor::getStream(x) -// GPU resize() is fast, but it differs from the CPU analog. Disabling this flag +// CUDA resize() is fast, but it differs from the CPU analog. Disabling this flag // leads to an inefficient code. It's for debug purposes only. -#define ENABLE_GPU_RESIZE 1 +#define ENABLE_CUDA_RESIZE 1 using namespace cv; using namespace cv::cuda; diff --git a/modules/cudaoptflow/src/tvl1flow.cpp b/modules/cudaoptflow/src/tvl1flow.cpp index 96d62f1e9..43355d861 100644 --- a/modules/cudaoptflow/src/tvl1flow.cpp +++ b/modules/cudaoptflow/src/tvl1flow.cpp @@ -44,17 +44,17 @@ #if !defined HAVE_CUDA || defined(CUDA_DISABLER) -cv::cuda::OpticalFlowDual_TVL1_GPU::OpticalFlowDual_TVL1_GPU() { throw_no_cuda(); } -void cv::cuda::OpticalFlowDual_TVL1_GPU::operator ()(const GpuMat&, const GpuMat&, GpuMat&, GpuMat&) { throw_no_cuda(); } -void cv::cuda::OpticalFlowDual_TVL1_GPU::collectGarbage() {} -void cv::cuda::OpticalFlowDual_TVL1_GPU::procOneScale(const GpuMat&, const GpuMat&, GpuMat&, GpuMat&) { throw_no_cuda(); } +cv::cuda::OpticalFlowDual_TVL1_CUDA::OpticalFlowDual_TVL1_CUDA() { throw_no_cuda(); } +void cv::cuda::OpticalFlowDual_TVL1_CUDA::operator ()(const GpuMat&, const GpuMat&, GpuMat&, GpuMat&) { throw_no_cuda(); } +void cv::cuda::OpticalFlowDual_TVL1_CUDA::collectGarbage() {} +void cv::cuda::OpticalFlowDual_TVL1_CUDA::procOneScale(const GpuMat&, const GpuMat&, GpuMat&, GpuMat&) { throw_no_cuda(); } #else using namespace cv; using namespace cv::cuda; -cv::cuda::OpticalFlowDual_TVL1_GPU::OpticalFlowDual_TVL1_GPU() +cv::cuda::OpticalFlowDual_TVL1_CUDA::OpticalFlowDual_TVL1_CUDA() { tau = 0.25; lambda = 0.15; @@ -67,7 +67,7 @@ cv::cuda::OpticalFlowDual_TVL1_GPU::OpticalFlowDual_TVL1_GPU() useInitialFlow = false; } -void cv::cuda::OpticalFlowDual_TVL1_GPU::operator ()(const GpuMat& I0, const GpuMat& I1, GpuMat& flowx, GpuMat& flowy) +void cv::cuda::OpticalFlowDual_TVL1_CUDA::operator ()(const GpuMat& I0, const GpuMat& I1, GpuMat& flowx, GpuMat& flowy) { CV_Assert( I0.type() == CV_8UC1 || I0.type() == CV_32FC1 ); CV_Assert( I0.size() == I1.size() ); @@ -177,7 +177,7 @@ namespace tvl1flow void estimateDualVariables(PtrStepSzf u1, PtrStepSzf u2, PtrStepSzf p11, PtrStepSzf p12, PtrStepSzf p21, PtrStepSzf p22, float taut); } -void cv::cuda::OpticalFlowDual_TVL1_GPU::procOneScale(const GpuMat& I0, const GpuMat& I1, GpuMat& u1, GpuMat& u2) +void cv::cuda::OpticalFlowDual_TVL1_CUDA::procOneScale(const GpuMat& I0, const GpuMat& I1, GpuMat& u1, GpuMat& u2) { using namespace tvl1flow; @@ -230,7 +230,7 @@ void cv::cuda::OpticalFlowDual_TVL1_GPU::procOneScale(const GpuMat& I0, const Gp } } -void cv::cuda::OpticalFlowDual_TVL1_GPU::collectGarbage() +void cv::cuda::OpticalFlowDual_TVL1_CUDA::collectGarbage() { I0s.clear(); I1s.clear(); diff --git a/modules/cudaoptflow/test/test_main.cpp b/modules/cudaoptflow/test/test_main.cpp index eea3d7c00..04f4fcf6e 100644 --- a/modules/cudaoptflow/test/test_main.cpp +++ b/modules/cudaoptflow/test/test_main.cpp @@ -42,4 +42,4 @@ #include "test_precomp.hpp" -CV_GPU_TEST_MAIN("gpu") +CV_CUDA_TEST_MAIN("gpu") diff --git a/modules/cudaoptflow/test/test_optflow.cpp b/modules/cudaoptflow/test/test_optflow.cpp index 78953eb10..e80116a75 100644 --- a/modules/cudaoptflow/test/test_optflow.cpp +++ b/modules/cudaoptflow/test/test_optflow.cpp @@ -64,7 +64,7 @@ struct BroxOpticalFlow : testing::TestWithParam } }; -GPU_TEST_P(BroxOpticalFlow, Regression) +CUDA_TEST_P(BroxOpticalFlow, Regression) { cv::Mat frame0 = readImageType("opticalflow/frame0.png", CV_32FC1); ASSERT_FALSE(frame0.empty()); @@ -122,7 +122,7 @@ GPU_TEST_P(BroxOpticalFlow, Regression) #endif } -GPU_TEST_P(BroxOpticalFlow, OpticalFlowNan) +CUDA_TEST_P(BroxOpticalFlow, OpticalFlowNan) { cv::Mat frame0 = readImageType("opticalflow/frame0.png", CV_32FC1); ASSERT_FALSE(frame0.empty()); @@ -149,7 +149,7 @@ GPU_TEST_P(BroxOpticalFlow, OpticalFlowNan) EXPECT_TRUE(cv::checkRange(h_v)); }; -INSTANTIATE_TEST_CASE_P(GPU_OptFlow, BroxOpticalFlow, ALL_DEVICES); +INSTANTIATE_TEST_CASE_P(CUDA_OptFlow, BroxOpticalFlow, ALL_DEVICES); ////////////////////////////////////////////////////// // PyrLKOpticalFlow @@ -173,7 +173,7 @@ PARAM_TEST_CASE(PyrLKOpticalFlow, cv::cuda::DeviceInfo, UseGray) } }; -GPU_TEST_P(PyrLKOpticalFlow, Sparse) +CUDA_TEST_P(PyrLKOpticalFlow, Sparse) { cv::Mat frame0 = readImage("opticalflow/frame0.png", useGray ? cv::IMREAD_GRAYSCALE : cv::IMREAD_COLOR); ASSERT_FALSE(frame0.empty()); @@ -241,7 +241,7 @@ GPU_TEST_P(PyrLKOpticalFlow, Sparse) ASSERT_LE(bad_ratio, 0.01); } -INSTANTIATE_TEST_CASE_P(GPU_OptFlow, PyrLKOpticalFlow, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_OptFlow, PyrLKOpticalFlow, testing::Combine( ALL_DEVICES, testing::Values(UseGray(true), UseGray(false)))); @@ -276,7 +276,7 @@ PARAM_TEST_CASE(FarnebackOpticalFlow, cv::cuda::DeviceInfo, PyrScale, PolyN, Far } }; -GPU_TEST_P(FarnebackOpticalFlow, Accuracy) +CUDA_TEST_P(FarnebackOpticalFlow, Accuracy) { cv::Mat frame0 = readImage("opticalflow/rubberwhale1.png", cv::IMREAD_GRAYSCALE); ASSERT_FALSE(frame0.empty()); @@ -316,7 +316,7 @@ GPU_TEST_P(FarnebackOpticalFlow, Accuracy) EXPECT_MAT_SIMILAR(flowxy[1], d_flowy, 0.1); } -INSTANTIATE_TEST_CASE_P(GPU_OptFlow, FarnebackOpticalFlow, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_OptFlow, FarnebackOpticalFlow, testing::Combine( ALL_DEVICES, testing::Values(PyrScale(0.3), PyrScale(0.5), PyrScale(0.8)), testing::Values(PolyN(5), PolyN(7)), @@ -340,7 +340,7 @@ PARAM_TEST_CASE(OpticalFlowDual_TVL1, cv::cuda::DeviceInfo, UseRoi) } }; -GPU_TEST_P(OpticalFlowDual_TVL1, Accuracy) +CUDA_TEST_P(OpticalFlowDual_TVL1, Accuracy) { cv::Mat frame0 = readImage("opticalflow/rubberwhale1.png", cv::IMREAD_GRAYSCALE); ASSERT_FALSE(frame0.empty()); @@ -348,7 +348,7 @@ GPU_TEST_P(OpticalFlowDual_TVL1, Accuracy) cv::Mat frame1 = readImage("opticalflow/rubberwhale2.png", cv::IMREAD_GRAYSCALE); ASSERT_FALSE(frame1.empty()); - cv::cuda::OpticalFlowDual_TVL1_GPU d_alg; + cv::cuda::OpticalFlowDual_TVL1_CUDA d_alg; cv::cuda::GpuMat d_flowx = createMat(frame0.size(), CV_32FC1, useRoi); cv::cuda::GpuMat d_flowy = createMat(frame0.size(), CV_32FC1, useRoi); d_alg(loadMat(frame0, useRoi), loadMat(frame1, useRoi), d_flowx, d_flowy); @@ -366,7 +366,7 @@ GPU_TEST_P(OpticalFlowDual_TVL1, Accuracy) EXPECT_MAT_SIMILAR(gold[1], d_flowy, 4e-3); } -INSTANTIATE_TEST_CASE_P(GPU_OptFlow, OpticalFlowDual_TVL1, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_OptFlow, OpticalFlowDual_TVL1, testing::Combine( ALL_DEVICES, WHOLE_SUBMAT)); @@ -398,7 +398,7 @@ struct OpticalFlowBM : testing::TestWithParam { }; -GPU_TEST_P(OpticalFlowBM, Accuracy) +CUDA_TEST_P(OpticalFlowBM, Accuracy) { cv::cuda::DeviceInfo devInfo = GetParam(); cv::cuda::setDevice(devInfo.deviceID()); @@ -425,7 +425,7 @@ GPU_TEST_P(OpticalFlowBM, Accuracy) EXPECT_MAT_NEAR(vely, d_vely, 0); } -INSTANTIATE_TEST_CASE_P(GPU_OptFlow, OpticalFlowBM, ALL_DEVICES); +INSTANTIATE_TEST_CASE_P(CUDA_OptFlow, OpticalFlowBM, ALL_DEVICES); ////////////////////////////////////////////////////// // FastOpticalFlowBM @@ -501,7 +501,7 @@ struct FastOpticalFlowBM : testing::TestWithParam { }; -GPU_TEST_P(FastOpticalFlowBM, Accuracy) +CUDA_TEST_P(FastOpticalFlowBM, Accuracy) { const double MAX_RMSE = 0.6; @@ -543,6 +543,6 @@ GPU_TEST_P(FastOpticalFlowBM, Accuracy) EXPECT_LE(err, MAX_RMSE); } -INSTANTIATE_TEST_CASE_P(GPU_OptFlow, FastOpticalFlowBM, ALL_DEVICES); +INSTANTIATE_TEST_CASE_P(CUDA_OptFlow, FastOpticalFlowBM, ALL_DEVICES); #endif // HAVE_CUDA diff --git a/modules/cudastereo/perf/perf_stereo.cpp b/modules/cudastereo/perf/perf_stereo.cpp index 632aae79d..68650cd24 100644 --- a/modules/cudastereo/perf/perf_stereo.cpp +++ b/modules/cudastereo/perf/perf_stereo.cpp @@ -65,7 +65,7 @@ PERF_TEST_P(ImagePair, StereoBM, const int ndisp = 256; - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { cv::Ptr d_bm = cv::cuda::createStereoBM(ndisp); @@ -75,7 +75,7 @@ PERF_TEST_P(ImagePair, StereoBM, TEST_CYCLE() d_bm->compute(d_imgLeft, d_imgRight, dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -105,7 +105,7 @@ PERF_TEST_P(ImagePair, StereoBeliefPropagation, const int ndisp = 64; - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { cv::Ptr d_bp = cv::cuda::createStereoBeliefPropagation(ndisp); @@ -115,7 +115,7 @@ PERF_TEST_P(ImagePair, StereoBeliefPropagation, TEST_CYCLE() d_bp->compute(d_imgLeft, d_imgRight, dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -139,7 +139,7 @@ PERF_TEST_P(ImagePair, StereoConstantSpaceBP, const int ndisp = 128; - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { cv::Ptr d_csbp = cv::cuda::createStereoConstantSpaceBP(ndisp); @@ -149,7 +149,7 @@ PERF_TEST_P(ImagePair, StereoConstantSpaceBP, TEST_CYCLE() d_csbp->compute(d_imgLeft, d_imgRight, dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -171,7 +171,7 @@ PERF_TEST_P(ImagePair, DisparityBilateralFilter, const int ndisp = 128; - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { cv::Ptr d_filter = cv::cuda::createDisparityBilateralFilter(ndisp); @@ -181,7 +181,7 @@ PERF_TEST_P(ImagePair, DisparityBilateralFilter, TEST_CYCLE() d_filter->apply(d_disp, d_img, dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -193,7 +193,7 @@ PERF_TEST_P(ImagePair, DisparityBilateralFilter, // ReprojectImageTo3D PERF_TEST_P(Sz_Depth, ReprojectImageTo3D, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16S))) { const cv::Size size = GET_PARAM(0); @@ -205,14 +205,14 @@ PERF_TEST_P(Sz_Depth, ReprojectImageTo3D, cv::Mat Q(4, 4, CV_32FC1); cv::randu(Q, 0.1, 1.0); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::reprojectImageTo3D(d_src, dst, Q); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -228,7 +228,7 @@ PERF_TEST_P(Sz_Depth, ReprojectImageTo3D, // DrawColorDisp PERF_TEST_P(Sz_Depth, DrawColorDisp, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16S))) { const cv::Size size = GET_PARAM(0); @@ -237,14 +237,14 @@ PERF_TEST_P(Sz_Depth, DrawColorDisp, cv::Mat src(size, type); declare.in(src, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::drawColorDisp(d_src, dst, 255); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { diff --git a/modules/cudastereo/src/cuda/stereobm.cu b/modules/cudastereo/src/cuda/stereobm.cu index 50866c39a..bc114761e 100644 --- a/modules/cudastereo/src/cuda/stereobm.cu +++ b/modules/cudastereo/src/cuda/stereobm.cu @@ -343,7 +343,7 @@ namespace cv { namespace cuda { namespace device }; const int calles_num = sizeof(callers)/sizeof(callers[0]); - void stereoBM_GPU(const PtrStepSzb& left, const PtrStepSzb& right, const PtrStepSzb& disp, int maxdisp, int winsz, const PtrStepSz& minSSD_buf, cudaStream_t& stream) + void stereoBM_CUDA(const PtrStepSzb& left, const PtrStepSzb& right, const PtrStepSzb& disp, int maxdisp, int winsz, const PtrStepSz& minSSD_buf, cudaStream_t& stream) { int winsz2 = winsz >> 1; diff --git a/modules/cudastereo/src/stereobm.cpp b/modules/cudastereo/src/stereobm.cpp index c0449c94c..deacc0eed 100644 --- a/modules/cudastereo/src/stereobm.cpp +++ b/modules/cudastereo/src/stereobm.cpp @@ -55,7 +55,7 @@ namespace cv { namespace cuda { namespace device { namespace stereobm { - void stereoBM_GPU(const PtrStepSzb& left, const PtrStepSzb& right, const PtrStepSzb& disp, int ndisp, int winsz, const PtrStepSz& minSSD_buf, cudaStream_t & stream); + void stereoBM_CUDA(const PtrStepSzb& left, const PtrStepSzb& right, const PtrStepSzb& disp, int ndisp, int winsz, const PtrStepSz& minSSD_buf, cudaStream_t & stream); void prefilter_xsobel(const PtrStepSzb& input, const PtrStepSzb& output, int prefilterCap /*= 31*/, cudaStream_t & stream); void postfilter_textureness(const PtrStepSzb& input, int winsz, float avgTexturenessThreshold, const PtrStepSzb& disp, cudaStream_t & stream); } @@ -170,7 +170,7 @@ namespace ri_for_bm = riBuf_; } - stereoBM_GPU(le_for_bm, ri_for_bm, disparity, ndisp_, winSize_, minSSD_, stream); + stereoBM_CUDA(le_for_bm, ri_for_bm, disparity, ndisp_, winSize_, minSSD_, stream); if (avergeTexThreshold_ > 0) postfilter_textureness(le_for_bm, winSize_, avergeTexThreshold_, disparity, stream); diff --git a/modules/cudastereo/test/test_main.cpp b/modules/cudastereo/test/test_main.cpp index eea3d7c00..04f4fcf6e 100644 --- a/modules/cudastereo/test/test_main.cpp +++ b/modules/cudastereo/test/test_main.cpp @@ -42,4 +42,4 @@ #include "test_precomp.hpp" -CV_GPU_TEST_MAIN("gpu") +CV_CUDA_TEST_MAIN("gpu") diff --git a/modules/cudastereo/test/test_stereo.cpp b/modules/cudastereo/test/test_stereo.cpp index b1398e881..bb20a6247 100644 --- a/modules/cudastereo/test/test_stereo.cpp +++ b/modules/cudastereo/test/test_stereo.cpp @@ -61,7 +61,7 @@ struct StereoBM : testing::TestWithParam } }; -GPU_TEST_P(StereoBM, Regression) +CUDA_TEST_P(StereoBM, Regression) { cv::Mat left_image = readImage("stereobm/aloe-L.png", cv::IMREAD_GRAYSCALE); cv::Mat right_image = readImage("stereobm/aloe-R.png", cv::IMREAD_GRAYSCALE); @@ -79,7 +79,7 @@ GPU_TEST_P(StereoBM, Regression) EXPECT_MAT_NEAR(disp_gold, disp, 0.0); } -INSTANTIATE_TEST_CASE_P(GPU_Stereo, StereoBM, ALL_DEVICES); +INSTANTIATE_TEST_CASE_P(CUDA_Stereo, StereoBM, ALL_DEVICES); ////////////////////////////////////////////////////////////////////////// // StereoBeliefPropagation @@ -96,7 +96,7 @@ struct StereoBeliefPropagation : testing::TestWithParam } }; -GPU_TEST_P(StereoBeliefPropagation, Regression) +CUDA_TEST_P(StereoBeliefPropagation, Regression) { cv::Mat left_image = readImage("stereobp/aloe-L.png"); cv::Mat right_image = readImage("stereobp/aloe-R.png"); @@ -122,7 +122,7 @@ GPU_TEST_P(StereoBeliefPropagation, Regression) EXPECT_MAT_NEAR(disp_gold, h_disp, 0.0); } -INSTANTIATE_TEST_CASE_P(GPU_Stereo, StereoBeliefPropagation, ALL_DEVICES); +INSTANTIATE_TEST_CASE_P(CUDA_Stereo, StereoBeliefPropagation, ALL_DEVICES); ////////////////////////////////////////////////////////////////////////// // StereoConstantSpaceBP @@ -139,7 +139,7 @@ struct StereoConstantSpaceBP : testing::TestWithParam } }; -GPU_TEST_P(StereoConstantSpaceBP, Regression) +CUDA_TEST_P(StereoConstantSpaceBP, Regression) { cv::Mat left_image = readImage("csstereobp/aloe-L.png"); cv::Mat right_image = readImage("csstereobp/aloe-R.png"); @@ -166,7 +166,7 @@ GPU_TEST_P(StereoConstantSpaceBP, Regression) EXPECT_MAT_NEAR(disp_gold, h_disp, 1.0); } -INSTANTIATE_TEST_CASE_P(GPU_Stereo, StereoConstantSpaceBP, ALL_DEVICES); +INSTANTIATE_TEST_CASE_P(CUDA_Stereo, StereoConstantSpaceBP, ALL_DEVICES); //////////////////////////////////////////////////////////////////////////////// // reprojectImageTo3D @@ -189,7 +189,7 @@ PARAM_TEST_CASE(ReprojectImageTo3D, cv::cuda::DeviceInfo, cv::Size, MatDepth, Us } }; -GPU_TEST_P(ReprojectImageTo3D, Accuracy) +CUDA_TEST_P(ReprojectImageTo3D, Accuracy) { cv::Mat disp = randomMat(size, depth, 5.0, 30.0); cv::Mat Q = randomMat(cv::Size(4, 4), CV_32FC1, 0.1, 1.0); @@ -203,7 +203,7 @@ GPU_TEST_P(ReprojectImageTo3D, Accuracy) EXPECT_MAT_NEAR(dst_gold, dst, 1e-5); } -INSTANTIATE_TEST_CASE_P(GPU_Stereo, ReprojectImageTo3D, testing::Combine( +INSTANTIATE_TEST_CASE_P(CUDA_Stereo, ReprojectImageTo3D, testing::Combine( ALL_DEVICES, DIFFERENT_SIZES, testing::Values(MatDepth(CV_8U), MatDepth(CV_16S)), diff --git a/modules/cudawarping/perf/perf_warping.cpp b/modules/cudawarping/perf/perf_warping.cpp index 1a07b6071..dfb11075a 100644 --- a/modules/cudawarping/perf/perf_warping.cpp +++ b/modules/cudawarping/perf/perf_warping.cpp @@ -92,9 +92,9 @@ void generateMap(cv::Mat& map_x, cv::Mat& map_y, int remapMode) DEF_PARAM_TEST(Sz_Depth_Cn_Inter_Border_Mode, cv::Size, MatDepth, MatCn, Interpolation, BorderMode, RemapMode); PERF_TEST_P(Sz_Depth_Cn_Inter_Border_Mode, Remap, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16U, CV_32F), - GPU_CHANNELS_1_3_4, + CUDA_CHANNELS_1_3_4, Values(Interpolation(cv::INTER_NEAREST), Interpolation(cv::INTER_LINEAR), Interpolation(cv::INTER_CUBIC)), ALL_BORDER_MODES, RemapMode::all())) @@ -117,7 +117,7 @@ PERF_TEST_P(Sz_Depth_Cn_Inter_Border_Mode, Remap, cv::Mat ymap(size, CV_32FC1); generateMap(xmap, ymap, remapMode); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); const cv::cuda::GpuMat d_xmap(xmap); @@ -126,7 +126,7 @@ PERF_TEST_P(Sz_Depth_Cn_Inter_Border_Mode, Remap, TEST_CYCLE() cv::cuda::remap(d_src, dst, d_xmap, d_ymap, interpolation, borderMode); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -144,9 +144,9 @@ PERF_TEST_P(Sz_Depth_Cn_Inter_Border_Mode, Remap, DEF_PARAM_TEST(Sz_Depth_Cn_Inter_Scale, cv::Size, MatDepth, MatCn, Interpolation, double); PERF_TEST_P(Sz_Depth_Cn_Inter_Scale, Resize, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16U, CV_32F), - GPU_CHANNELS_1_3_4, + CUDA_CHANNELS_1_3_4, Values(Interpolation(cv::INTER_NEAREST), Interpolation(cv::INTER_LINEAR), Interpolation(cv::INTER_CUBIC)), Values(0.5, 0.3, 2.0))) { @@ -163,14 +163,14 @@ PERF_TEST_P(Sz_Depth_Cn_Inter_Scale, Resize, cv::Mat src(size, type); declare.in(src, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::resize(d_src, dst, cv::Size(), f, f, interpolation); - GPU_SANITY_CHECK(dst, 1e-3, ERROR_RELATIVE); + CUDA_SANITY_CHECK(dst, 1e-3, ERROR_RELATIVE); } else { @@ -188,9 +188,9 @@ PERF_TEST_P(Sz_Depth_Cn_Inter_Scale, Resize, DEF_PARAM_TEST(Sz_Depth_Cn_Scale, cv::Size, MatDepth, MatCn, double); PERF_TEST_P(Sz_Depth_Cn_Scale, ResizeArea, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16U, CV_32F), - GPU_CHANNELS_1_3_4, + CUDA_CHANNELS_1_3_4, Values(0.2, 0.1, 0.05))) { declare.time(1.0); @@ -206,14 +206,14 @@ PERF_TEST_P(Sz_Depth_Cn_Scale, ResizeArea, cv::Mat src(size, type); declare.in(src, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::resize(d_src, dst, cv::Size(), f, f, interpolation); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -231,9 +231,9 @@ PERF_TEST_P(Sz_Depth_Cn_Scale, ResizeArea, DEF_PARAM_TEST(Sz_Depth_Cn_Inter_Border, cv::Size, MatDepth, MatCn, Interpolation, BorderMode); PERF_TEST_P(Sz_Depth_Cn_Inter_Border, WarpAffine, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16U, CV_32F), - GPU_CHANNELS_1_3_4, + CUDA_CHANNELS_1_3_4, Values(Interpolation(cv::INTER_NEAREST), Interpolation(cv::INTER_LINEAR), Interpolation(cv::INTER_CUBIC)), ALL_BORDER_MODES)) { @@ -258,14 +258,14 @@ PERF_TEST_P(Sz_Depth_Cn_Inter_Border, WarpAffine, }; const cv::Mat M(2, 3, CV_64F, (void*) mat); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::warpAffine(d_src, dst, M, size, interpolation, borderMode); - GPU_SANITY_CHECK(dst, 1); + CUDA_SANITY_CHECK(dst, 1); } else { @@ -281,9 +281,9 @@ PERF_TEST_P(Sz_Depth_Cn_Inter_Border, WarpAffine, // WarpPerspective PERF_TEST_P(Sz_Depth_Cn_Inter_Border, WarpPerspective, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16U, CV_32F), - GPU_CHANNELS_1_3_4, + CUDA_CHANNELS_1_3_4, Values(Interpolation(cv::INTER_NEAREST), Interpolation(cv::INTER_LINEAR), Interpolation(cv::INTER_CUBIC)), ALL_BORDER_MODES)) { @@ -306,14 +306,14 @@ PERF_TEST_P(Sz_Depth_Cn_Inter_Border, WarpPerspective, {0.0, 0.0, 1.0}}; const cv::Mat M(3, 3, CV_64F, (void*) mat); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::warpPerspective(d_src, dst, M, size, interpolation, borderMode); - GPU_SANITY_CHECK(dst, 1); + CUDA_SANITY_CHECK(dst, 1); } else { @@ -329,7 +329,7 @@ PERF_TEST_P(Sz_Depth_Cn_Inter_Border, WarpPerspective, // BuildWarpPlaneMaps PERF_TEST_P(Sz, BuildWarpPlaneMaps, - GPU_TYPICAL_MAT_SIZES) + CUDA_TYPICAL_MAT_SIZES) { const cv::Size size = GetParam(); @@ -337,15 +337,15 @@ PERF_TEST_P(Sz, BuildWarpPlaneMaps, const cv::Mat R = cv::Mat::ones(3, 3, CV_32FC1); const cv::Mat T = cv::Mat::zeros(1, 3, CV_32F); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { cv::cuda::GpuMat map_x; cv::cuda::GpuMat map_y; TEST_CYCLE() cv::cuda::buildWarpPlaneMaps(size, cv::Rect(0, 0, size.width, size.height), K, R, T, 1.0, map_x, map_y); - GPU_SANITY_CHECK(map_x); - GPU_SANITY_CHECK(map_y); + CUDA_SANITY_CHECK(map_x); + CUDA_SANITY_CHECK(map_y); } else { @@ -357,22 +357,22 @@ PERF_TEST_P(Sz, BuildWarpPlaneMaps, // BuildWarpCylindricalMaps PERF_TEST_P(Sz, BuildWarpCylindricalMaps, - GPU_TYPICAL_MAT_SIZES) + CUDA_TYPICAL_MAT_SIZES) { const cv::Size size = GetParam(); const cv::Mat K = cv::Mat::eye(3, 3, CV_32FC1); const cv::Mat R = cv::Mat::ones(3, 3, CV_32FC1); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { cv::cuda::GpuMat map_x; cv::cuda::GpuMat map_y; TEST_CYCLE() cv::cuda::buildWarpCylindricalMaps(size, cv::Rect(0, 0, size.width, size.height), K, R, 1.0, map_x, map_y); - GPU_SANITY_CHECK(map_x); - GPU_SANITY_CHECK(map_y); + CUDA_SANITY_CHECK(map_x); + CUDA_SANITY_CHECK(map_y); } else { @@ -384,22 +384,22 @@ PERF_TEST_P(Sz, BuildWarpCylindricalMaps, // BuildWarpSphericalMaps PERF_TEST_P(Sz, BuildWarpSphericalMaps, - GPU_TYPICAL_MAT_SIZES) + CUDA_TYPICAL_MAT_SIZES) { const cv::Size size = GetParam(); const cv::Mat K = cv::Mat::eye(3, 3, CV_32FC1); const cv::Mat R = cv::Mat::ones(3, 3, CV_32FC1); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { cv::cuda::GpuMat map_x; cv::cuda::GpuMat map_y; TEST_CYCLE() cv::cuda::buildWarpSphericalMaps(size, cv::Rect(0, 0, size.width, size.height), K, R, 1.0, map_x, map_y); - GPU_SANITY_CHECK(map_x); - GPU_SANITY_CHECK(map_y); + CUDA_SANITY_CHECK(map_x); + CUDA_SANITY_CHECK(map_y); } else { @@ -413,9 +413,9 @@ PERF_TEST_P(Sz, BuildWarpSphericalMaps, DEF_PARAM_TEST(Sz_Depth_Cn_Inter, cv::Size, MatDepth, MatCn, Interpolation); PERF_TEST_P(Sz_Depth_Cn_Inter, Rotate, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16U, CV_32F), - GPU_CHANNELS_1_3_4, + CUDA_CHANNELS_1_3_4, Values(Interpolation(cv::INTER_NEAREST), Interpolation(cv::INTER_LINEAR), Interpolation(cv::INTER_CUBIC)))) { const cv::Size size = GET_PARAM(0); @@ -428,14 +428,14 @@ PERF_TEST_P(Sz_Depth_Cn_Inter, Rotate, cv::Mat src(size, type); declare.in(src, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::rotate(d_src, dst, size, 30.0, 0, 0, interpolation); - GPU_SANITY_CHECK(dst, 1e-3, ERROR_RELATIVE); + CUDA_SANITY_CHECK(dst, 1e-3, ERROR_RELATIVE); } else { @@ -447,9 +447,9 @@ PERF_TEST_P(Sz_Depth_Cn_Inter, Rotate, // PyrDown PERF_TEST_P(Sz_Depth_Cn, PyrDown, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16U, CV_32F), - GPU_CHANNELS_1_3_4)) + CUDA_CHANNELS_1_3_4)) { const cv::Size size = GET_PARAM(0); const int depth = GET_PARAM(1); @@ -460,14 +460,14 @@ PERF_TEST_P(Sz_Depth_Cn, PyrDown, cv::Mat src(size, type); declare.in(src, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::pyrDown(d_src, dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -483,9 +483,9 @@ PERF_TEST_P(Sz_Depth_Cn, PyrDown, // PyrUp PERF_TEST_P(Sz_Depth_Cn, PyrUp, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16U, CV_32F), - GPU_CHANNELS_1_3_4)) + CUDA_CHANNELS_1_3_4)) { const cv::Size size = GET_PARAM(0); const int depth = GET_PARAM(1); @@ -496,14 +496,14 @@ PERF_TEST_P(Sz_Depth_Cn, PyrUp, cv::Mat src(size, type); declare.in(src, WARMUP_RNG); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; TEST_CYCLE() cv::cuda::pyrUp(d_src, dst); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { @@ -519,9 +519,9 @@ PERF_TEST_P(Sz_Depth_Cn, PyrUp, // ImagePyramidGetLayer PERF_TEST_P(Sz_Depth_Cn, ImagePyramidGetLayer, - Combine(GPU_TYPICAL_MAT_SIZES, + Combine(CUDA_TYPICAL_MAT_SIZES, Values(CV_8U, CV_16U, CV_32F), - GPU_CHANNELS_1_3_4)) + CUDA_CHANNELS_1_3_4)) { const cv::Size size = GET_PARAM(0); const int depth = GET_PARAM(1); @@ -535,7 +535,7 @@ PERF_TEST_P(Sz_Depth_Cn, ImagePyramidGetLayer, const int nLayers = 3; const cv::Size dstSize(size.width / 2 + 10, size.height / 2 + 10); - if (PERF_RUN_GPU()) + if (PERF_RUN_CUDA()) { const cv::cuda::GpuMat d_src(src); cv::cuda::GpuMat dst; @@ -544,7 +544,7 @@ PERF_TEST_P(Sz_Depth_Cn, ImagePyramidGetLayer, TEST_CYCLE() d_pyr->getLayer(dst, dstSize); - GPU_SANITY_CHECK(dst); + CUDA_SANITY_CHECK(dst); } else { diff --git a/modules/cudawarping/src/cuda/remap.cu b/modules/cudawarping/src/cuda/remap.cu index 9a3f8bb95..df5e3b761 100644 --- a/modules/cudawarping/src/cuda/remap.cu +++ b/modules/cudawarping/src/cuda/remap.cu @@ -108,7 +108,7 @@ namespace cv { namespace cuda { namespace device } }; - #define OPENCV_GPU_IMPLEMENT_REMAP_TEX(type) \ + #define OPENCV_CUDA_IMPLEMENT_REMAP_TEX(type) \ texture< type , cudaTextureType2D> tex_remap_ ## type (0, cudaFilterModePoint, cudaAddressModeClamp); \ struct tex_remap_ ## type ## _reader \ { \ @@ -165,31 +165,31 @@ namespace cv { namespace cuda { namespace device } \ }; - OPENCV_GPU_IMPLEMENT_REMAP_TEX(uchar) - //OPENCV_GPU_IMPLEMENT_REMAP_TEX(uchar2) - OPENCV_GPU_IMPLEMENT_REMAP_TEX(uchar4) + OPENCV_CUDA_IMPLEMENT_REMAP_TEX(uchar) + //OPENCV_CUDA_IMPLEMENT_REMAP_TEX(uchar2) + OPENCV_CUDA_IMPLEMENT_REMAP_TEX(uchar4) - //OPENCV_GPU_IMPLEMENT_REMAP_TEX(schar) - //OPENCV_GPU_IMPLEMENT_REMAP_TEX(char2) - //OPENCV_GPU_IMPLEMENT_REMAP_TEX(char4) + //OPENCV_CUDA_IMPLEMENT_REMAP_TEX(schar) + //OPENCV_CUDA_IMPLEMENT_REMAP_TEX(char2) + //OPENCV_CUDA_IMPLEMENT_REMAP_TEX(char4) - OPENCV_GPU_IMPLEMENT_REMAP_TEX(ushort) - //OPENCV_GPU_IMPLEMENT_REMAP_TEX(ushort2) - OPENCV_GPU_IMPLEMENT_REMAP_TEX(ushort4) + OPENCV_CUDA_IMPLEMENT_REMAP_TEX(ushort) + //OPENCV_CUDA_IMPLEMENT_REMAP_TEX(ushort2) + OPENCV_CUDA_IMPLEMENT_REMAP_TEX(ushort4) - OPENCV_GPU_IMPLEMENT_REMAP_TEX(short) - //OPENCV_GPU_IMPLEMENT_REMAP_TEX(short2) - OPENCV_GPU_IMPLEMENT_REMAP_TEX(short4) + OPENCV_CUDA_IMPLEMENT_REMAP_TEX(short) + //OPENCV_CUDA_IMPLEMENT_REMAP_TEX(short2) + OPENCV_CUDA_IMPLEMENT_REMAP_TEX(short4) - //OPENCV_GPU_IMPLEMENT_REMAP_TEX(int) - //OPENCV_GPU_IMPLEMENT_REMAP_TEX(int2) - //OPENCV_GPU_IMPLEMENT_REMAP_TEX(int4) + //OPENCV_CUDA_IMPLEMENT_REMAP_TEX(int) + //OPENCV_CUDA_IMPLEMENT_REMAP_TEX(int2) + //OPENCV_CUDA_IMPLEMENT_REMAP_TEX(int4) - OPENCV_GPU_IMPLEMENT_REMAP_TEX(float) - //OPENCV_GPU_IMPLEMENT_REMAP_TEX(float2) - OPENCV_GPU_IMPLEMENT_REMAP_TEX(float4) + OPENCV_CUDA_IMPLEMENT_REMAP_TEX(float) + //OPENCV_CUDA_IMPLEMENT_REMAP_TEX(float2) + OPENCV_CUDA_IMPLEMENT_REMAP_TEX(float4) - #undef OPENCV_GPU_IMPLEMENT_REMAP_TEX + #undef OPENCV_CUDA_IMPLEMENT_REMAP_TEX template