Table of Contents

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

src InputArray

The source image, 8-bit unsigned, 16-bit unsigned or single-precision floating-point

dst OutputArray

The destination image; will have the same size and the same depth as src

code ColorConversionCodes

The color space conversion code

dstCn int

The 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

hint AlgorithmHint

Hint that selects between alternative algorithm implementations (OpenCV 5).