Image Processing#
Detailed Description#
Function Documentation#
cvtColor()#
void cv::cann::cvtColor(
const AscendMat & src,
AscendMat & dst,
int code,
int dstCn = 0,
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.
cvtColor()#
void cv::cann::cvtColor(
const InputArray src,
OutputArray dst,
int code,
int dstCn = 0,
AscendStream & stream = AscendStream::Null() )
#include <opencv2/cann_interface.hpp>
Converts an image from one color space to another.
Note
The supported conversion types are as follows: { CV_BGR2BGRA, CV_BGRA2BGR, CV_BGR2RGBA, CV_RGBA2BGR, CV_BGR2RGB, CV_BGRA2RGBA, CV_BGR2GRAY, CV_RGB2GRAY, CV_GRAY2BGR, CV_GRAY2BGRA, CV_BGRA2GRAY, CV_RGBA2GRAY, CV_BGR2XYZ, CV_RGB2XYZ, CV_XYZ2BGR, CV_XYZ2RGB, CV_BGR2YCrCb, CV_RGB2YCrCb, CV_YCrCb2BGR, CV_YCrCb2RGB, CV_BGR2YUV, CV_RGB2YUV, CV_YUV2BGR, CV_YUV2RGB }
See also
Parameters
src— Source image with CV_8U , CV_16U , or CV_32F depth and 1, 3, or 4 channels.dst— Destination image.code— Color space conversion code. For details, see cv::ColorConversionCodes .dstCn— Number of channels in the destination image. If the parameter is 0, the number of the channels is derived automatically from src and the code .stream— AscendStream for the asynchronous version.