Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- QVideoFrame::PixelFormat pixelFormat = input->pixelFormat();
- cv::Mat img, gray;
- if (pixelFormat == QVideoFrame::Format_YUYV) {
- img = cv::Mat(input->height(), input->width(), CV_8UC3, input->bits());
- qDebug() << "img created";
- cv::cvtColor(img, gray, cv::COLOR_YUV2GRAY_I420);
- qDebug() << "gray created";
- }
Add Comment
Please, Sign In to add comment