adas_opencv_get_conversion_format()

Updated: April 19, 2023

Retrieve the OpenCV ImgProc color conversion code required to convert 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
A handle to the pixel buffer that potentially requires conversion.
dest_format
The desired pixel format (see adas_pixel_format_t).
conversion
On success, the referenced memory contains the required conversion code.

Library:

libadas

Description:

The code provided by this function 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.