当前位置:   article > 正文

Opencv直接使用YUV视频源_opencv yuv

opencv yuv

OpenCV默认情况下是BGR24的方式将数据丢到Mat中,

In header file videoio.hpp:

  1. // Generic camera output modes.
  2. // Currently, these are supported through the libv4l interface only.
  3. enum { CAP_MODE_BGR = 0, // BGR24 (default)
  4. CAP_MODE_RGB = 1, // RGB24
  5. CAP_MODE_GRAY = 2, // Y8
  6. CAP_MODE_YUYV = 3 // YUYV
  7. };

可直接设置模式:

  1. cv::VideoCapture camera = cv::VideoCapture();
  2. camera.open(0);
  3. camera.set(CV_CAP_PROP_MODE, CV_CAP_MODE_YUYV);
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/AllinToyou/article/detail/670292
推荐阅读
相关标签
  

闽ICP备14008679号