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

Made opencv-python dependency optional (Fixes #45) #46

Merged
merged 2 commits into from
Jan 16, 2023

Conversation

abhiTronix
Copy link
Contributor

This PR will fix #45 and make opencv-python dependency installation optional by, so that User can now install opencv-python dependency along with dxcam using command pip install dxcam[cv2], only when required.

(This commit is authored by @abhiTronix)

- Moved `opencv-python` dependency from `install_requires` to optional `cv2` namespace in `setup.cfg`.
  - User can now install `opencv-python` dependency along with `dxcam` using command `pip install dxcam[cv2]`.
- Made `cv2` import functionality specific in `NumpyProcessor` class.
  - Added new `process_cvtcolor` method to isolate `cvtcolor` functionality handling.
  - Now `cv2` package will imported only if the `color_mode` parameter is defined by user in `NumpyProcessor` class.
@ra1nty
Copy link
Owner

ra1nty commented Jan 16, 2023

@abhiTronix Thanks for the contribution! It is indeed a good idea to make opencv optional. Merged and I will release shortly.

@ra1nty ra1nty merged commit fc0a257 into ra1nty:main Jan 16, 2023
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.

Make opencv-python dependency optional
2 participants