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

Verify camera ID when running dot in camera mode #18

Merged
merged 6 commits into from
Jun 12, 2022
Merged

Conversation

ajndkr
Copy link
Member

@ajndkr ajndkr commented Jun 11, 2022

This PR adds a check during dot initialisation to throw an exception if the entered camera id (target) is invalid.

Changelog:

Added:

  • ✨ added fetch_camera() method to dot.commons.camera_utils module: returns a VideoCaptureAsync object if camera ID is valid, else throws a ValueError exception

Updated:

  • ⚡ updated dot.commons.ModelOption::generate_from_camera() to fetch VideoCaptureAsync object before loading models

@ajndkr ajndkr added the feature New feature or request label Jun 11, 2022
@ajndkr ajndkr requested review from giorgiop and ghassen1302 June 11, 2022 22:14
@ajndkr ajndkr self-assigned this Jun 11, 2022
@ajndkr ajndkr linked an issue Jun 11, 2022 that may be closed by this pull request
@ajndkr ajndkr requested a review from giorgiop June 12, 2022 10:12
@ajndkr ajndkr merged commit 9d1a321 into main Jun 12, 2022
@ajndkr ajndkr deleted the feature/2-verify-cam branch June 12, 2022 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check if camera is available before loading models
2 participants