This repository contains a collection of computer vision and image processing projects implemented using Python, OpenCV, and PyTorch.
├── captcha_main.ipynb # Main CAPTCHA processing pipeline
├── sample_captchas/ # Sample CAPTCHA images for testing
└── processed_captcha_images/ # Output folder for processed images
- Grayscale conversion
- Gaussian blur filtering
- Adaptive thresholding
- Morphological operations (opening/closing)
- Edge detection using Canny
- Line detection using Hough Transform
- Image segmentation and character extraction
All required packages are listed in requirements.txt. Install them using following command:
pip install -r requirements.txt- Clone the repository:
git clone <your-repository-url>
cd project3- Install dependencies:
pip install -r requirements.txt- Run Jupyter Notebook:
jupyter notebook- Open
captcha_main.ipynb - Place your CAPTCHA images in the
sample_captchas/folder - Run the cells sequentially to process the images
- Load Images: Read CAPTCHA images from
sample_captchas/folder - Grayscale Conversion: Convert RGB images to grayscale
- Border Addition: Add replicated borders to images
- Thresholding: Apply Otsu's binarization
- Morphological Operations: Remove noise using opening and closing
- Edge Detection: Detect edges using Canny edge detector
- Line Detection: Find lines using Hough Line Transform
- Visualization: Display results using Matplotlib
- Python 3.x
- OpenCV: Image processing and computer vision
- NumPy: Numerical computations
- Matplotlib: Data visualization
- PyTorch: Deep learning framework
- Tkinter: GUI development
- imutils: Convenience functions for OpenCV
- The project uses relative paths for image folders
- Processed images are saved in
processed_captcha_images/directory - For driver drowsiness detection, ensure proper lighting conditions
- CAPTCHA processing works best with clear, high-contrast images
Feel free to fork this repository and submit pull requests for any improvements.
This project is open source and available under the MIT License.