Doxygen documentation: cuda
This commit is contained in:
@@ -50,54 +50,178 @@
|
||||
#include "opencv2/core/cuda.hpp"
|
||||
#include "opencv2/imgproc.hpp"
|
||||
|
||||
/**
|
||||
@addtogroup cuda
|
||||
@{
|
||||
@defgroup cudawarping Image Warping
|
||||
@}
|
||||
*/
|
||||
|
||||
namespace cv { namespace cuda {
|
||||
|
||||
//! DST[x,y] = SRC[xmap[x,y],ymap[x,y]]
|
||||
//! supports only CV_32FC1 map type
|
||||
//! @addtogroup cudawarping
|
||||
//! @{
|
||||
|
||||
/** @brief Applies a generic geometrical transformation to an image.
|
||||
|
||||
@param src Source image.
|
||||
@param dst Destination image with the size the same as xmap and the type the same as src .
|
||||
@param xmap X values. Only CV\_32FC1 type is supported.
|
||||
@param ymap Y values. Only CV\_32FC1 type is supported.
|
||||
@param interpolation Interpolation method (see resize ). INTER\_NEAREST , INTER\_LINEAR and
|
||||
INTER\_CUBIC are supported for now.
|
||||
@param borderMode Pixel extrapolation method (see borderInterpolate ). BORDER\_REFLECT101 ,
|
||||
BORDER\_REPLICATE , BORDER\_CONSTANT , BORDER\_REFLECT and BORDER\_WRAP are supported for now.
|
||||
@param borderValue Value used in case of a constant border. By default, it is 0.
|
||||
@param stream Stream for the asynchronous version.
|
||||
|
||||
The function transforms the source image using the specified map:
|
||||
|
||||
\f[\texttt{dst} (x,y) = \texttt{src} (xmap(x,y), ymap(x,y))\f]
|
||||
|
||||
Values of pixels with non-integer coordinates are computed using the bilinear interpolation.
|
||||
|
||||
@sa remap
|
||||
*/
|
||||
CV_EXPORTS void remap(InputArray src, OutputArray dst, InputArray xmap, InputArray ymap,
|
||||
int interpolation, int borderMode = BORDER_CONSTANT, Scalar borderValue = Scalar(),
|
||||
Stream& stream = Stream::Null());
|
||||
|
||||
//! resizes the image
|
||||
//! Supports INTER_NEAREST, INTER_LINEAR, INTER_CUBIC, INTER_AREA
|
||||
/** @brief Resizes an image.
|
||||
|
||||
@param src Source image.
|
||||
@param dst Destination image with the same type as src . The size is dsize (when it is non-zero)
|
||||
or the size is computed from src.size() , fx , and fy .
|
||||
@param dsize Destination image size. If it is zero, it is computed as:
|
||||
\f[\texttt{dsize = Size(round(fx*src.cols), round(fy*src.rows))}\f]
|
||||
Either dsize or both fx and fy must be non-zero.
|
||||
@param fx Scale factor along the horizontal axis. If it is zero, it is computed as:
|
||||
\f[\texttt{(double)dsize.width/src.cols}\f]
|
||||
@param fy Scale factor along the vertical axis. If it is zero, it is computed as:
|
||||
\f[\texttt{(double)dsize.height/src.rows}\f]
|
||||
@param interpolation Interpolation method. INTER\_NEAREST , INTER\_LINEAR and INTER\_CUBIC are
|
||||
supported for now.
|
||||
@param stream Stream for the asynchronous version.
|
||||
|
||||
@sa resize
|
||||
*/
|
||||
CV_EXPORTS void resize(InputArray src, OutputArray dst, Size dsize, double fx=0, double fy=0, int interpolation = INTER_LINEAR, Stream& stream = Stream::Null());
|
||||
|
||||
//! warps the image using affine transformation
|
||||
//! Supports INTER_NEAREST, INTER_LINEAR, INTER_CUBIC
|
||||
/** @brief Applies an affine transformation to an image.
|
||||
|
||||
@param src Source image. CV\_8U , CV\_16U , CV\_32S , or CV\_32F depth and 1, 3, or 4 channels are
|
||||
supported.
|
||||
@param dst Destination image with the same type as src . The size is dsize .
|
||||
@param M *2x3* transformation matrix.
|
||||
@param dsize Size of the destination image.
|
||||
@param flags Combination of interpolation methods (see resize) and the optional flag
|
||||
WARP\_INVERSE\_MAP specifying that M is an inverse transformation ( dst=\>src ). Only
|
||||
INTER\_NEAREST , INTER\_LINEAR , and INTER\_CUBIC interpolation methods are supported.
|
||||
@param borderMode
|
||||
@param borderValue
|
||||
@param stream Stream for the asynchronous version.
|
||||
|
||||
@sa warpAffine
|
||||
*/
|
||||
CV_EXPORTS void warpAffine(InputArray src, OutputArray dst, InputArray M, Size dsize, int flags = INTER_LINEAR,
|
||||
int borderMode = BORDER_CONSTANT, Scalar borderValue = Scalar(), Stream& stream = Stream::Null());
|
||||
|
||||
/** @brief Builds transformation maps for affine transformation.
|
||||
|
||||
@param M *2x3* transformation matrix.
|
||||
@param inverse Flag specifying that M is an inverse transformation ( dst=\>src ).
|
||||
@param dsize Size of the destination image.
|
||||
@param xmap X values with CV\_32FC1 type.
|
||||
@param ymap Y values with CV\_32FC1 type.
|
||||
@param stream Stream for the asynchronous version.
|
||||
|
||||
@sa cuda::warpAffine , cuda::remap
|
||||
*/
|
||||
CV_EXPORTS void buildWarpAffineMaps(InputArray M, bool inverse, Size dsize, OutputArray xmap, OutputArray ymap, Stream& stream = Stream::Null());
|
||||
|
||||
//! warps the image using perspective transformation
|
||||
//! Supports INTER_NEAREST, INTER_LINEAR, INTER_CUBIC
|
||||
/** @brief Applies a perspective transformation to an image.
|
||||
|
||||
@param src Source image. CV\_8U , CV\_16U , CV\_32S , or CV\_32F depth and 1, 3, or 4 channels are
|
||||
supported.
|
||||
@param dst Destination image with the same type as src . The size is dsize .
|
||||
@param M *3x3* transformation matrix.
|
||||
@param dsize Size of the destination image.
|
||||
@param flags Combination of interpolation methods (see resize ) and the optional flag
|
||||
WARP\_INVERSE\_MAP specifying that M is the inverse transformation ( dst =\> src ). Only
|
||||
INTER\_NEAREST , INTER\_LINEAR , and INTER\_CUBIC interpolation methods are supported.
|
||||
@param borderMode
|
||||
@param borderValue
|
||||
@param stream Stream for the asynchronous version.
|
||||
|
||||
@sa warpPerspective
|
||||
*/
|
||||
CV_EXPORTS void warpPerspective(InputArray src, OutputArray dst, InputArray M, Size dsize, int flags = INTER_LINEAR,
|
||||
int borderMode = BORDER_CONSTANT, Scalar borderValue = Scalar(), Stream& stream = Stream::Null());
|
||||
|
||||
/** @brief Builds transformation maps for perspective transformation.
|
||||
|
||||
@param M *3x3* transformation matrix.
|
||||
@param inverse Flag specifying that M is an inverse transformation ( dst=\>src ).
|
||||
@param dsize Size of the destination image.
|
||||
@param xmap X values with CV\_32FC1 type.
|
||||
@param ymap Y values with CV\_32FC1 type.
|
||||
@param stream Stream for the asynchronous version.
|
||||
|
||||
@sa cuda::warpPerspective , cuda::remap
|
||||
*/
|
||||
CV_EXPORTS void buildWarpPerspectiveMaps(InputArray M, bool inverse, Size dsize, OutputArray xmap, OutputArray ymap, Stream& stream = Stream::Null());
|
||||
|
||||
//! builds plane warping maps
|
||||
/** @brief Builds plane warping maps.
|
||||
*/
|
||||
CV_EXPORTS void buildWarpPlaneMaps(Size src_size, Rect dst_roi, InputArray K, InputArray R, InputArray T, float scale,
|
||||
OutputArray map_x, OutputArray map_y, Stream& stream = Stream::Null());
|
||||
|
||||
//! builds cylindrical warping maps
|
||||
/** @brief Builds cylindrical warping maps.
|
||||
*/
|
||||
CV_EXPORTS void buildWarpCylindricalMaps(Size src_size, Rect dst_roi, InputArray K, InputArray R, float scale,
|
||||
OutputArray map_x, OutputArray map_y, Stream& stream = Stream::Null());
|
||||
|
||||
//! builds spherical warping maps
|
||||
/** @brief Builds spherical warping maps.
|
||||
*/
|
||||
CV_EXPORTS void buildWarpSphericalMaps(Size src_size, Rect dst_roi, InputArray K, InputArray R, float scale,
|
||||
OutputArray map_x, OutputArray map_y, Stream& stream = Stream::Null());
|
||||
|
||||
//! rotates an image around the origin (0,0) and then shifts it
|
||||
//! supports INTER_NEAREST, INTER_LINEAR, INTER_CUBIC
|
||||
//! supports 1, 3 or 4 channels images with CV_8U, CV_16U or CV_32F depth
|
||||
/** @brief Rotates an image around the origin (0,0) and then shifts it.
|
||||
|
||||
@param src Source image. Supports 1, 3 or 4 channels images with CV\_8U , CV\_16U or CV\_32F
|
||||
depth.
|
||||
@param dst Destination image with the same type as src . The size is dsize .
|
||||
@param dsize Size of the destination image.
|
||||
@param angle Angle of rotation in degrees.
|
||||
@param xShift Shift along the horizontal axis.
|
||||
@param yShift Shift along the vertical axis.
|
||||
@param interpolation Interpolation method. Only INTER\_NEAREST , INTER\_LINEAR , and INTER\_CUBIC
|
||||
are supported.
|
||||
@param stream Stream for the asynchronous version.
|
||||
|
||||
@sa cuda::warpAffine
|
||||
*/
|
||||
CV_EXPORTS void rotate(InputArray src, OutputArray dst, Size dsize, double angle, double xShift = 0, double yShift = 0,
|
||||
int interpolation = INTER_LINEAR, Stream& stream = Stream::Null());
|
||||
|
||||
//! smoothes the source image and downsamples it
|
||||
/** @brief Smoothes an image and downsamples it.
|
||||
|
||||
@param src Source image.
|
||||
@param dst Destination image. Will have Size((src.cols+1)/2, (src.rows+1)/2) size and the same
|
||||
type as src .
|
||||
@param stream Stream for the asynchronous version.
|
||||
|
||||
@sa pyrDown
|
||||
*/
|
||||
CV_EXPORTS void pyrDown(InputArray src, OutputArray dst, Stream& stream = Stream::Null());
|
||||
|
||||
//! upsamples the source image and then smoothes it
|
||||
/** @brief Upsamples an image and then smoothes it.
|
||||
|
||||
@param src Source image.
|
||||
@param dst Destination image. Will have Size(src.cols\*2, src.rows\*2) size and the same type as
|
||||
src .
|
||||
@param stream Stream for the asynchronous version.
|
||||
*/
|
||||
CV_EXPORTS void pyrUp(InputArray src, OutputArray dst, Stream& stream = Stream::Null());
|
||||
|
||||
class CV_EXPORTS ImagePyramid : public Algorithm
|
||||
@@ -108,6 +232,8 @@ public:
|
||||
|
||||
CV_EXPORTS Ptr<ImagePyramid> createImagePyramid(InputArray img, int nLayers = -1, Stream& stream = Stream::Null());
|
||||
|
||||
//! @}
|
||||
|
||||
}} // namespace cv { namespace cuda {
|
||||
|
||||
#endif /* __OPENCV_CUDAWARPING_HPP__ */
|
||||
|
Reference in New Issue
Block a user