adas_opencv_get_conversion_format()

Retrieve the OpenCV ImgProc color conversion code required for conversion of the pixel buffer to the desired format

Synopsis:

#include <adas/adas_opencv.h>
adas_error_t adas_opencv_get_conversion_format(adas_pixel_buffer_handle_t pixel_buffer_handle,
                                               adas_pixel_format_t dest_format,
                                               int *conversion)

Arguments:

pixel_buffer_handle
The pixel buffer that potentially requires conversion.
dest_format
The desired pixel format.
conversion
On success, gets set to the required conversion code.

Library:

libadas

Description:

This code can be passed to cv::cvtColor() to do the necessary color conversion. The color conversion codes are part of the enum cv::colorConversionCodes. If no conversion is necessary, the code is set to cv::COLOR_COLORCVT_MAX.

Returns:

ADAS_EOK when the function successfully completes, otherwise another adas_error_t value that provides the reason that the call failed.