You need the Windows SDK and Python native code extension enabled. This is needed to enemurate camera of the system. See device_ext section.
Install Hatch
Hatch is a modern, extensible Python project manager. It will automtically help to construct the project, managed the dependencies and automatically keep everything in sync.
And run using:
hatch env prune # make sure no previous env is left over which can cause some issues.
hatch env create
# hatch -vv env create # If you want more debug you can run this one
hatch run pyvision
Using opencv it is not possible to enumerate capture device.
For that we need to use native code that will use the DirectShow C++ windows API
to enumerate the capture device available on the system.
device_ext
is a hence a shared library that query the DirectShow API and return
a list of tuple for every capture devices found on the system and the supported resolution
for each of the devices.
This library is automatically built and shipped when running the project. It requires the Windows SDK and Python native code extension enabled. Those can be obtained from the Visual Studio Community installer (not visual studio code)
Ensure that C++ for desktop is ticked but also Python development with native Python development tools checked. We don't need to install Python from there, since this will be automatically handle by hatch.
Here are the GitHub bibliographical references in markdown format:
- Week 4: Image Filtering and Edge Detection
- Image Gradients with OpenCV (Sobel and Scharr)
- Optimizing RTSP Video Processing in OpenCV: Overcoming FPS Discrepancies and Buffering Issues
- Exploring the Data Types in OpenCV4: A Comprehensive Guide
- Image Edge Detection: Sobel and Laplacian
- OpenCV Transparent API
- Edge Detection with Gaussian Blur