Skip to content

Update main.py - #256

Open
Sohams03 wants to merge 2 commits into
Shahrayar123:masterfrom
Sohams03:master
Open

Sohams03 wants to merge 2 commits into
Shahrayar123:masterfrom
Sohams03:master

Conversation

@Sohams03

Copy link
Copy Markdown

#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

Sohams03 commented Oct 6, 2024

Copy link
Copy Markdown
Author

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