fixed-issue-75#76
Open
AnimeshRajwar wants to merge 3 commits into
Open
Conversation
Gagandeep-2003
requested changes
Aug 29, 2025
Gagandeep-2003
left a comment
Owner
There was a problem hiding this comment.
Thanks for the PR! I noticed a couple of issues that should be fixed before merging:
Bug in camera fallback
cap.cv2.VideoCapture(1) # ❌ incorrect
This should be reassigned properly:
cap = cv2.VideoCapture(1) # ✅
Resource handling
It’s good practice to cap.release() before re-opening with a new index.
Verification
Sometimes cap.isOpened() is True but frames still can’t be read. You can make it more robust by checking a test frame:
ok, _ = cap.read()
if not ok:
print("[ERROR] No frames captured from webcam.")
cap.release()
sys.exit(1)
Contributor
Author
|
got it,i will fix it. |
c78b50f to
6c92d89
Compare
Contributor
Author
|
@Gagandeep-2003 i have already made the requested changes in commit 43a8812 |
Contributor
Author
|
@Gagandeep-2003 kindly review commit 99b1a9e |
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
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.
add additonal check for external camera if builtin one is not working.