https://github.com/lion24/pyvision
A minimal computer vision system in Python
https://github.com/lion24/pyvision
ai camera coco computer-vision image image-processing learning opencv python yolo
Last synced: 5 months ago
JSON representation
A minimal computer vision system in Python
- Host: GitHub
- URL: https://github.com/lion24/pyvision
- Owner: lion24
- Created: 2024-06-24T08:25:52.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-12-19T00:08:11.000Z (6 months ago)
- Last Synced: 2025-12-21T23:24:49.989Z (6 months ago)
- Topics: ai, camera, coco, computer-vision, image, image-processing, learning, opencv, python, yolo
- Language: Python
- Homepage:
- Size: 35.1 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Pyvision
[](https://github.com/pypa/hatch) [](https://github.com/astral-sh/ruff) [](https://microsoft.github.io/pyright/)
## Bootstrap
### Dependencies
You need the Windows SDK and Python native code extension enabled. This is needed to enemurate camera of the system.
See [device_ext](#device_ext) section.
Install [Hatch](https://hatch.pypa.io/latest/install/#windows)
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:
```sh
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
```
## device_ext
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](https://visualstudio.microsoft.com/vs/community/) (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.
## Some references
Here are the GitHub bibliographical references in markdown format:
* [Week 4: Image Filtering and Edge Detection](https://sbme-tutorials.github.io/2018/cv/notes/4_week4.html)
* [Image Gradients with OpenCV (Sobel and Scharr)](https://pyimagesearch.com/2021/05/12/image-gradients-with-opencv-sobel-and-scharr/)
* [Optimizing RTSP Video Processing in OpenCV: Overcoming FPS Discrepancies and Buffering Issues](https://medium.com/@vikas.c20/optimizing-rtsp-video-processing-in-opencv-overcoming-fps-discrepancies-and-buffering-issues-463e204c7b86)
* [Exploring the Data Types in OpenCV4: A Comprehensive Guide](https://medium.com/@nullbyte.in/part-2-exploring-the-data-types-in-opencv4-a-comprehensive-guide-49272f4a775)
* [Image Edge Detection: Sobel and Laplacian](https://www.bogotobogo.com/python/OpenCV_Python/python_opencv3_Image_Gradient_Sobel_Laplacian_Derivatives_Edge_Detection.php)
* [OpenCV Transparent API](https://learnopencv.com/opencv-transparent-api/)
* [Edge Detection with Gaussian Blur](https://www.projectrhea.org/rhea/index.php/Edge_Detection_with_Gaussian_Blur)