Skip to content
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

Update main.py #256

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Update main.py #256

wants to merge 2 commits into from

Conversation

Sohams03
Copy link

#What does this Pull Request do

#230 Unused import

Removing the datetime package can reduce dependencies, streamline the code, and enhance readability by minimizing unnecessary complexity.

Camera Access Check: Added a check using cap.isOpened() to ensure the camera is accessible. If not, the program will exit with an error message.
Frame Reading Validation: The program now checks if the frame is successfully read using if not ret and exits if it fails.
This ensures that the program handles situations where the camera might not be accessible.
@Sohams03
Copy link
Author

Sohams03 commented Oct 6, 2024

Added a check using cap.isOpened() to ensure the camera is accessible. If not, the program will exit with an error message.
The program now checks if the frame is successfully read using if not ret and exits if it fails.
This ensures that the program handles situations where the camera might not be accessible.

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.

1 participant