本文介绍了使用OpenCV捕获网络摄像头图像时可以设置颜色深度吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用C ++中的OpenCV捕获图像

I am capturing the image using OpenCV in C++

firstFrame = cvQueryFrame(capture);

设置宽度和高度属性很容易

it is easy to set the width and height properties by

cvSetCaptureProperty( capture, CV_CAP_PROP_FRAME_WIDTH, WIDTH );
cvSetCaptureProperty( capture, CV_CAP_PROP_FRAME_HEIGHT, HEIGHT );

我想知道是否可以在不进一步处理框架的情况下指定颜色深度吗?

I wonder if there is a way to specify the color depth as well without further processing the frame?

推荐答案

根据 文档 ,如果您使用功能retrive()获取框架,则应该可以使用CV_CAP_PROP_FORMAT进行操作.

According to the documentation, you should be able to do it using CV_CAP_PROP_FORMAT if you use the function retrive() to get your frame.

但是,还请注意:

这篇关于使用OpenCV捕获网络摄像头图像时可以设置颜色深度吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-27 04:46