Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update cv2_capture_live_video_from_camera.py #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wgsthink wants to merge 1 commit into CodecWang:master from wgsthink:master

Conversation

Copy link

@wgsthink wgsthink commented Jun 11, 2019

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

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的版本,我重现一下(❤ ω ❤)

Copy link
Author

wgsthink commented Jun 11, 2019 via email

我试了一下,就是index的原因,改为0就可以正常运行了。Thanks! 发送自 Windows 10 版邮件应用 发件人: ex2tron 发送时间: 2019年6月11日 14:21 收件人: ex2tron/OpenCV-Python-Tutorial 抄送: wgsthink; Mention 主题: Re: [ex2tron/OpenCV-Python-Tutorial] Updatecv2_capture_live_video_from_camera.py (#3) @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的版本,我重现一下(❤ ω ❤) — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /