-
Notifications
You must be signed in to change notification settings - Fork 962
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@wgsthink 你好,直接使用VideoCapture初始化摄像头index,或先不指定index,之后再使用open函数指定都是可以的。你看下是不是index是2的原因才导致你的摄像头没有打开,可以改成0试下哈~~
<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的版本,我重现一下(❤ ω ❤)
我试了一下,就是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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
源代码应该没有把摄像头打开,导致摄像头运行不了