25#include <fvutils/adapters/cvmatadapter.h>
26#include <fvutils/color/conversions.h>
29#include <opencv2/opencv.hpp>
48 unsigned char tmp[image.cols * image.rows * 2];
49 convert(YUV422_PLANAR, YUV422_PACKED, buffer, tmp, image.cols, image.rows);
50 cv::Mat tmp_mat = cv::Mat(image.size(), CV_8UC2, tmp);
51 cv::cvtColor(tmp_mat, image, cv::COLOR_YUV2BGR_UYVY, 3);
62 cv::Mat tmp_mat = cv::Mat(image.size(), CV_8UC3, 3);
63 cv::cvtColor(image, tmp_mat, cv::COLOR_BGR2YUV, 3);
64 convert(YUV422_PACKED, YUV422_PLANAR, tmp_mat.data, buffer, image.cols, image.rows);
static void convert_image_bgr(unsigned char *buffer, cv::Mat &image)
Convert image from buffer into cv::Mat.
static void convert_image_yuv422_planar(cv::Mat &image, unsigned char *buffer)
Convert image from cv::Mat into buffer.