Updated: October 28, 2024 |
Retrieve the OpenCV ImgProc color conversion code required to convert the pixel buffer to the desired format
#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)
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.
ADAS_EOK when the function successfully completes, otherwise another adas_error_t value that provides the reason that the call failed.