Skip to content

Conversation

wgsthink
Copy link

源代码应该没有把摄像头打开,导致摄像头运行不了

@CodecWang
Copy link
Owner

@wgsthink 你好,直接使用VideoCapture初始化摄像头index,或先不指定index,之后再使用open函数指定都是可以的。你看下是不是index是2的原因才导致你的摄像头没有打开,可以改成0试下哈~~

附:OpenCV:VideoCapure

<VideoCapture object>	=	cv.VideoCapture(		)
<VideoCapture object>	=	cv.VideoCapture(	filename	)
<VideoCapture object>	=	cv.VideoCapture(	filename, apiPreference	)
<VideoCapture object>	=	cv.VideoCapture(	index	)
<VideoCapture object>	=	cv.VideoCapture(	index, apiPreference	)

如果不行的话,麻烦提供下Python和OpenCV的版本,我重现一下(❤ ω ❤)

@wgsthink
Copy link
Author

wgsthink commented Jun 11, 2019 via email

@CodecWang CodecWang closed this Jun 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants