4#include <opencv2/core/core.hpp>
5#include <opencv2/highgui/highgui.hpp>
6#include <opencv2/imgproc/imgproc.hpp>
48 size_t write(
const uint8_t *data,
size_t len)
override {
110 cv::Mat mat = cv::imdecode(data, 0);
122 LOGE(
"OutputOpenCV: setSize() was not called");
138 const uint16_t *src = (
const uint16_t *)data;
141 for (
size_t i = 0; i < n; i++) {
143 dst[i] = (uint16_t)((v << 8) | (v >> 8));
146 cv::cvtColor(raw, bgr, cv::COLOR_BGR5652BGR);
155 cv::cvtColor(raw, bgr, cv::COLOR_RGB2BGR);
160 cv::cvtColor(raw, bgr, cv::COLOR_YUV2BGR_YUYV);
165 cv::cvtColor(raw, bgr, cv::COLOR_YUV2BGR_I420);
VideoFormat
Video codec/pixel-format identifier, shared by two unrelated uses: the (single) video stream of a con...
Definition VideoOutput.h:29
@ MJPEG
Definition VideoOutput.h:31
@ RGB888
Definition VideoOutput.h:37
@ RGB565
Definition VideoOutput.h:35
@ RGB666
Definition VideoOutput.h:36
@ I420
Definition VideoOutput.h:38
@ YUV422
Definition VideoOutput.h:34