Method CvtColor
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
CvtColor(InputArray, OutputArray, ColorConversionCodes, int, AlgorithmHint)
Converts image from one color space to another
public static void CvtColor(InputArray src, OutputArray dst, ColorConversionCodes code, int dstCn = 0, AlgorithmHint hint = AlgorithmHint.Default)
Parameters
srcInputArrayThe source image, 8-bit unsigned, 16-bit unsigned or single-precision floating-point
dstOutputArrayThe destination image; will have the same size and the same depth as src
codeColorConversionCodesThe color space conversion code
dstCnintThe number of channels in the destination image; if the parameter is 0, the number of the channels will be derived automatically from src and the code
hintAlgorithmHintHint that selects between alternative algorithm implementations (OpenCV 5).