OpenCV  4.9.0
Open Source Computer Vision
Enumerations | Functions

Enumerations

enum  cv::cann::InterpolationFlags {
  cv::cann::INTER_NEAREST = 0,
  cv::cann::INTER_LINEAR = 1,
  cv::cann::INTER_CUBIC = 2,
  cv::cann::INTER_AREA = 3,
  cv::cann::INTER_MAX = 7
}
 Resizes an image src down to or up to the specified size. More...
 

Functions

AscendMat cv::cann::crop (InputArray src, const Rect &rect, AscendStream &stream=AscendStream::Null())
 crop a 2D array. The function crops the matrix by given cv::Rect. Output matrix must be of the same depth as input one, size is specified by given rect size. More...
 
AscendMat cv::cann::crop (const AscendMat &src, const Rect &rect, AscendStream &stream=AscendStream::Null())
 
void cv::cann::flip (InputArray src, OutputArray dst, int flipCode, AscendStream &stream=AscendStream::Null())
 Flips a 2D matrix around vertical, horizontal, or both axes. More...
 
void cv::cann::flip (const AscendMat &src, AscendMat &dst, int flipCode, AscendStream &stream=AscendStream::Null())
 
void cv::cann::merge (const AscendMat *src, size_t n, AscendMat &dst, AscendStream &stream=AscendStream::Null())
 Makes a multi-channel matrix out of several single-channel matrices. More...
 
void cv::cann::merge (const std::vector< AscendMat > &src, AscendMat &dst, AscendStream &stream=AscendStream::Null())
 
void cv::cann::merge (const AscendMat *src, size_t n, OutputArray &dst, AscendStream &stream=AscendStream::Null())
 
void cv::cann::merge (const std::vector< AscendMat > &src, OutputArray &dst, AscendStream &stream=AscendStream::Null())
 
void cv::cann::resize (InputArray _src, OutputArray _dst, Size dsize, double inv_scale_x, double inv_scale_y, int interpolation, AscendStream &stream=AscendStream::Null())
 
void cv::cann::resize (const AscendMat &src, AscendMat &dst, Size dsize, double inv_scale_x, double inv_scale_y, int interpolation, AscendStream &stream=AscendStream::Null())
 
void cv::cann::rotate (InputArray src, OutputArray dst, int rotateCode, AscendStream &stream=AscendStream::Null())
 Rotates a 2D array in multiples of 90 degrees. The function cv::rotate rotates the array in one of three different ways: Rotate by 90 degrees clockwise (rotateCode = ROTATE_90_CLOCKWISE). Rotate by 180 degrees clockwise (rotateCode = ROTATE_180). Rotate by 270 degrees clockwise (rotateCode = ROTATE_90_COUNTERCLOCKWISE). More...
 
void cv::cann::rotate (const AscendMat &src, AscendMat &dst, int rotateMode, AscendStream &stream=AscendStream::Null())
 
void cv::cann::split (const AscendMat &src, AscendMat *dst, AscendStream &stream=AscendStream::Null())
 Copies each plane of a multi-channel matrix into an array. More...
 
void cv::cann::split (const AscendMat &src, std::vector< AscendMat > &dst, AscendStream &stream=AscendStream::Null())
 
void cv::cann::split (const InputArray src, AscendMat *dst, AscendStream &stream=AscendStream::Null())
 
void cv::cann::split (const InputArray src, std::vector< AscendMat > &dst, AscendStream &stream=AscendStream::Null())
 
void cv::cann::transpose (InputArray src, OutputArray dst, AscendStream &stream=AscendStream::Null())
 Transposes a matrix. More...
 
void cv::cann::transpose (const AscendMat &src, AscendMat &dst, AscendStream &stream=AscendStream::Null())
 

Detailed Description

Enumeration Type Documentation

◆ InterpolationFlags

#include <opencv2/cann_interface.hpp>

Resizes an image src down to or up to the specified size.

Parameters
srcinput image
dstoutput image; it has the size dsize (when it is non-zero) or the size computed from src.size(), fx, and fy; the type of dst is the same as of src.
dsizeoutput image size; if it equals zero, it is computed as:

\[𝚍𝚜𝚒𝚣𝚎 = 𝚂𝚒𝚣𝚎(𝚛𝚘𝚞𝚗𝚍(𝚏𝚡*𝚜𝚛𝚌.𝚌𝚘𝚕𝚜), 𝚛𝚘𝚞𝚗𝚍(𝚏𝚢*𝚜𝚛𝚌.𝚛𝚘𝚠𝚜))\]

Either dsize or both fx and fy must be non-zero.
fxscale factor along the horizontal axis; when it equals 0, it is computed as

\[(𝚍𝚘𝚞𝚋𝚕𝚎)𝚍𝚜𝚒𝚣𝚎.𝚠𝚒𝚍𝚝𝚑/𝚜𝚛𝚌.𝚌𝚘𝚕𝚜\]

fyscale factor along the vertical axis; when it equals 0, it is computed as

\[(𝚍𝚘𝚞𝚋𝚕𝚎)𝚍𝚜𝚒𝚣𝚎.𝚑𝚎𝚒𝚐𝚑𝚝/𝚜𝚛𝚌.𝚛𝚘𝚠𝚜\]

interpolationinterpolation method(see cv.cann.InterpolationFlags)
See also
cv::resizeinterpolation algorithm
Enumerator
INTER_NEAREST 

nearest neighbor interpolation

INTER_LINEAR 

bilinear interpolation

INTER_CUBIC 

bicubic interpolation

INTER_AREA 

resampling using pixel area relation. It may be a preferred method for image decimation, as it gives moire'-free results. But when the image is zoomed, it is similar to the INTER_NEAREST method.

INTER_MAX 

mask for interpolation codes

Function Documentation

◆ crop() [1/2]

AscendMat cv::cann::crop ( InputArray  src,
const Rect rect,
AscendStream stream = AscendStream::Null() 
)

#include <opencv2/cann_interface.hpp>

crop a 2D array. The function crops the matrix by given cv::Rect. Output matrix must be of the same depth as input one, size is specified by given rect size.

Parameters
srcinput array.
recta rect to crop a array to
streamAscendStream for the asynchronous version.
See also
cv::gapi::crop

◆ crop() [2/2]

AscendMat cv::cann::crop ( const AscendMat src,
const Rect rect,
AscendStream stream = AscendStream::Null() 
)

#include <opencv2/cann_interface.hpp>

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ flip() [1/2]

void cv::cann::flip ( InputArray  src,
OutputArray  dst,
int  flipCode,
AscendStream stream = AscendStream::Null() 
)

#include <opencv2/cann_interface.hpp>

Flips a 2D matrix around vertical, horizontal, or both axes.

Parameters
srcSource matrix.
dstDestination matrix.
flipCodeFlip mode for the source:
  • 0 Flips around x-axis.
  • > 0 Flips around y-axis.
  • < 0 Flips around both axes.
streamAscendStream for the asynchronous version.
See also
cv::flip cv::cuda::flip

◆ flip() [2/2]

void cv::cann::flip ( const AscendMat src,
AscendMat dst,
int  flipCode,
AscendStream stream = AscendStream::Null() 
)

#include <opencv2/cann_interface.hpp>

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ merge() [1/4]

void cv::cann::merge ( const AscendMat src,
size_t  n,
AscendMat dst,
AscendStream stream = AscendStream::Null() 
)

#include <opencv2/cann_interface.hpp>

Makes a multi-channel matrix out of several single-channel matrices.

Parameters
srcArray/vector of source matrices.
nNumber of source matrices.
dstDestination matrix.
streamAscendStream for the asynchronous version.
See also
cv::merge cv::cuda::merge

◆ merge() [2/4]

void cv::cann::merge ( const std::vector< AscendMat > &  src,
AscendMat dst,
AscendStream stream = AscendStream::Null() 
)

#include <opencv2/cann_interface.hpp>

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ merge() [3/4]

void cv::cann::merge ( const AscendMat src,
size_t  n,
OutputArray dst,
AscendStream stream = AscendStream::Null() 
)

#include <opencv2/cann_interface.hpp>

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ merge() [4/4]

void cv::cann::merge ( const std::vector< AscendMat > &  src,
OutputArray dst,
AscendStream stream = AscendStream::Null() 
)

#include <opencv2/cann_interface.hpp>

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ resize() [1/2]

void cv::cann::resize ( InputArray  _src,
OutputArray  _dst,
Size  dsize,
double  inv_scale_x,
double  inv_scale_y,
int  interpolation,
AscendStream stream = AscendStream::Null() 
)

◆ resize() [2/2]

void cv::cann::resize ( const AscendMat src,
AscendMat dst,
Size  dsize,
double  inv_scale_x,
double  inv_scale_y,
int  interpolation,
AscendStream stream = AscendStream::Null() 
)

#include <opencv2/cann_interface.hpp>

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ rotate() [1/2]

void cv::cann::rotate ( InputArray  src,
OutputArray  dst,
int  rotateCode,
AscendStream stream = AscendStream::Null() 
)

#include <opencv2/cann_interface.hpp>

Rotates a 2D array in multiples of 90 degrees. The function cv::rotate rotates the array in one of three different ways: Rotate by 90 degrees clockwise (rotateCode = ROTATE_90_CLOCKWISE). Rotate by 180 degrees clockwise (rotateCode = ROTATE_180). Rotate by 270 degrees clockwise (rotateCode = ROTATE_90_COUNTERCLOCKWISE).

Parameters
srcinput array.
dstoutput array of the same type as src. The size is the same with ROTATE_180, and the rows and cols are switched for ROTATE_90_CLOCKWISE and ROTATE_90_COUNTERCLOCKWISE.
rotateCodean enum to specify how to rotate the array; see the enum RotateFlags
streamAscendStream for the asynchronous version.
See also
cv::rotate

◆ rotate() [2/2]

void cv::cann::rotate ( const AscendMat src,
AscendMat dst,
int  rotateMode,
AscendStream stream = AscendStream::Null() 
)

#include <opencv2/cann_interface.hpp>

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ split() [1/4]

void cv::cann::split ( const AscendMat src,
AscendMat dst,
AscendStream stream = AscendStream::Null() 
)

#include <opencv2/cann_interface.hpp>

Copies each plane of a multi-channel matrix into an array.

Parameters
srcSource matrix.
dstDestination array/vector of single-channel matrices.
streamAscendStream for the asynchronous version.
See also
cv::split cv::cuda::split

◆ split() [2/4]

void cv::cann::split ( const AscendMat src,
std::vector< AscendMat > &  dst,
AscendStream stream = AscendStream::Null() 
)

#include <opencv2/cann_interface.hpp>

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ split() [3/4]

void cv::cann::split ( const InputArray  src,
AscendMat dst,
AscendStream stream = AscendStream::Null() 
)

#include <opencv2/cann_interface.hpp>

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ split() [4/4]

void cv::cann::split ( const InputArray  src,
std::vector< AscendMat > &  dst,
AscendStream stream = AscendStream::Null() 
)

#include <opencv2/cann_interface.hpp>

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ transpose() [1/2]

void cv::cann::transpose ( InputArray  src,
OutputArray  dst,
AscendStream stream = AscendStream::Null() 
)

#include <opencv2/cann_interface.hpp>

Transposes a matrix.

Parameters
srcSource matrix.
dstDestination matrix.
streamAscendStream for the asynchronous version.
See also
cv::transpose cv::cuda::transpose

◆ transpose() [2/2]

void cv::cann::transpose ( const AscendMat src,
AscendMat dst,
AscendStream stream = AscendStream::Null() 
)

#include <opencv2/cann_interface.hpp>

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.