rahulch

Untitled

Mar 13th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. QVideoFrame::PixelFormat pixelFormat = input->pixelFormat();
  2. cv::Mat img, gray;
  3.            
  4. if (pixelFormat == QVideoFrame::Format_YUYV) {
  5.     img = cv::Mat(input->height(), input->width(), CV_8UC3, input->bits());
  6.     qDebug() << "img created";            
  7.     cv::cvtColor(img, gray, cv::COLOR_YUV2GRAY_I420);
  8.     qDebug() << "gray created";
  9. }
Add Comment
Please, Sign In to add comment