A beginner-friendly computer vision project demonstrating basic image processing and object detection techniques using Python and OpenCV.
This project explores fundamental computer vision concepts such as:
- Image loading and manipulation
- Color space conversion
- Thresholding and segmentation
- Contour detection
- Basic shape analysis / object detection
Great as a first project to get familiar with OpenCV!
- Load and display images/videos
- Convert images to different color spaces (RGB → Grayscale, HSV)
- Apply color filtering (e.g., detect red/blue/green objects)
- Thresholding and binary image processing
- Find and draw contours
- Draw bounding boxes around detected objects
- Simple shape classification (optional)
- Python 3.8+
- OpenCV (
opencv-python) - NumPy
- Matplotlib (for displaying results)
- Clone the repository:
git clone https://github.com/sadi2003q/ComputerVisionProject_1.git
cd ComputerVisionProject_1- Create Virtual environment
python -m venv venv
source venv/bin/activate # Linux / macOS
venv\Scripts\activate # Windows- Install Dependancies
pip install -r requirements.txtif you dont have any requirements.txt please create one 🙃
opencv-python
numpy
matplotlib
python main.pymain.py→ Runs the complete demonstration (recommended starting point)color_detection.py→ Detects objects of a specific colorshape_detection.py→ Finds and classifies basic shapesface_detection.py→ Simple face detection with Haar cascades (if implemented)
You can also run individual cells if you're using a Jupyter Notebook:
jupyter notebook notebook.ipynbRun the main presentation/drawing script:
python PRESENTATION.pyOr run the on-screen keyboard script:
python "OnScreen Keybaord.py" ComputerVisionProject_1/
├── .idea/ # PyCharm IDE files (ignore for version control)
├── presentation/ # Demo images, slides, or assets
├── BASIC FACE RECOGNITION.py # Basic face detection/recognition
├── BASICS OF IMAGE PROCESSING.py # Image processing basics
├── CHAPTER-01 --HandTracking Modile.py # Hand tracking module
├── OnScreen Keybaord.py # Virtual keyboard with gestures
├── PRESENTATION.py # Main presentation/demo script
├── test.py # Test script
└── README.md # This file
- Uses MediaPipe Hands solution for detecting 21 hand landmarks
- Tracks finger positions to simulate mouse/pen movements
- Draws smooth lines based on index finger tip movement
- Switches modes (drawing, selection) based on finger configurations
- Multi-finger gestures (e.g., erase with two fingers)
- Color selection palette
- Save drawn images
- Better UI with buttons
- Add volume control or other gesture commands
- MediaPipe documentation
- OpenCV tutorials
- Inspired by common hand-tracking virtual painter projects
This project is open-source and available under the MIT License.
For the full license text, see the LICENSE file (create one if it doesn't exist yet).
A standard MIT License looks like this:
MIT License
Copyright (c) 2025 [Adnan Abdullah]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
