A comprehensive Image Processing, Computer Vision & Pattern Recognition system specifically designed for Malaysian license plate detection and recognition. This system implements a sophisticated 9-phase image processing pipeline using classical computer vision techniques combined with modern OCR technology.
- 9-Phase Image Processing Pipeline: Systematic approach from image acquisition to text recognition
- Malaysian-Specific Optimization: Handles standard single-line, two-line (WSL/2956), taxi, and government plates
- Multi-Algorithm Detection: Seven parallel detection methods for robust performance
- Smart Filtering System: Three-stage validation with color, texture, and template analysis
- Real-time Processing: Interactive web interface with live feedback
- Format Validation: Comprehensive Malaysian license plate format verification
- State Code Recognition: Identifies Malaysian state codes (A-Z mapping)
- Image Acquisition: Format validation and preprocessing
- Image Enhancement: Histogram equalization + gamma correction
- Image Restoration: Bilateral filtering for noise reduction
- Color Processing: HSV value channel extraction
- Wavelet Transform: Daubechies-4 detail coefficient extraction
- Image Compression: Compression effect simulation
- Morphological Processing: Gradient operations for boundary enhancement
- Image Segmentation: Adaptive thresholding
- Representation & Description: Multi-method detection and intelligent scoring
- Adaptive thresholding for varying illumination
- Dark region detection for black background plates
- Enhanced edge detection with bilateral filtering
- Contrast-based detection for high-contrast regions
- Bright text detection for taxi/bus plates
- Two-line plate detection for stacked formats
- Bus-specific detection for lower image regions
- Docker Desktop (recommended) or Docker Engine
- Git for cloning the repository
- Web Browser (Chrome, Firefox, Safari, Edge)
- Streamlit
If not using Docker:
- Python 3.12+
- pip package manager
git clone https://github.com/yourusername/IPPR-Assignment.git
cd IPPR-Assignment# Build the Docker image
docker build -t ippr-system .
# Run the container
docker run -p 8501:8501 ippr-systemOpen your web browser and navigate to:
http://localhost:8501
- Visual Studio Code
- Docker Desktop
- Dev Containers extension for VS Code
-
Clone and Open in VS Code
git clone https://github.com/yourusername/IPPR-Assignment.git cd IPPR-Assignment code .
-
Open in DevContainer
- Press
Ctrl+Shift+P(orCmd+Shift+Pon Mac) - Type "Dev Containers: Reopen in Container"
- Select the option and wait for container to build
- Press
-
Run the Application
streamlit run src/app.py
-
Access via Port Forward
- VS Code will automatically forward port 8501
- Click the notification or go to
http://localhost:8501
git clone https://github.com/yourusername/IPPR-Assignment.git
cd IPPR-Assignment# Create virtual environment
python -m venv ippr-env
# Activate virtual environment
# On Windows:
ippr-env\Scripts\activate
# On macOS/Linux:
source ippr-env/bin/activatepip install -r requirements.txtstreamlit run src/app.pyOpen your browser to http://localhost:8501
IPPR-Assignment/
βββ .devcontainer/
β βββ devcontainer.json # VS Code DevContainer configuration
β βββ Dockerfile # Development container setup
βββ src/
β βββ app.py # Main application
βββ requirements.txt # Python dependencies
βββ Dockerfile # Production container setup
βββ README.md # This file
βββ LICENSE # Project license
βββ Final_Image.zip # All the images used in testing
- Navigate to the "π Upload & Process" tab
- Upload PNG, JPG, or JPEG files (max 10MB each)
- Supports single or multiple image upload
- Switch to "π Phase Analysis" tab
- See all 9 processing phases applied to your image
- Understand how each phase transforms the image
- Check "π Results" tab for detection outcomes
- View detected license plate candidates
- See OCR results and confidence scores
- Review format validation results
- Visit "βΉοΈ Help" tab for usage instructions
- Learn about supported Malaysian plate formats
- Understand the detection process
- PNG, JPG, JPEG
- Maximum file size: 10MB
- Recommended resolution: 800x600 to 1920x1080
- Standard: ABC1234, ABC123A
- Two-line: ABC/1234, WSL/2956
- Government: Special blue background plates
- Taxi: Black background with white/yellow text
- Motorcycle: Smaller format plates
A=Perak, B=Selangor, C=Pahang, D=Kelantan, F=Putrajaya
J=Johor, K=Kedah, L=Labuan, M=Melaka, N=Negeri Sembilan
P=Penang, Q=Sarawak, R=Perlis, S=Sabah, T=Terengganu
V=KL, W=KL
1. Port 8501 already in use
# Kill existing Streamlit processes
pkill -f streamlit
# Or use different port
streamlit run src/app.py --server.port 85022. Docker build fails
# Clean Docker cache
docker system prune -a
# Rebuild image
docker build --no-cache -t ippr-system .3. PaddleOCR installation issues
# Install system dependencies (Ubuntu/Debian)
sudo apt-get update
sudo apt-get install libgl1-mesa-glx libglib2.0-0 libsm6 libxext6 libxrender-dev libgomp1
# For macOS
brew install opencv4. Memory issues with large images
- Resize images to maximum 1920x1080
- Use JPEG format instead of PNG for smaller file sizes
- Process images one at a time instead of batch processing
- CPU: Minimum 4 cores recommended
- RAM: 8GB minimum, 16GB recommended
- Storage: 2GB free space for dependencies
- Streamlit: Web interface framework
- OpenCV: Computer vision operations
- PaddleOCR: Text recognition engine
- PyWavelets: Wavelet transform operations
- NumPy: Numerical computations
- Pillow: Image processing utilities
- Processing Speed: 8-10 seconds per image
- Detection Accuracy: Optimized for Malaysian plates
- Memory Usage: ~3000MB during processing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Jackson How - Initial work
- Chin Pei Fung - Initial work
- Lee Ee-Ern - Initial work
- Tee Hao Bin - Initial work
- PaddleOCR Team for the excellent OCR engine
- OpenCV Community for computer vision tools
- Streamlit Team for the web framework
- Dr. Adeline Sneha John Chrisastum for all the guidance and assistance in IPPR module.
For support and questions:
- Create an issue in the GitHub repository
- Check the troubleshooting section above
- Review the help tab in the application
Note: This system is designed for educational and research purposes. Ensure compliance with local privacy laws when processing license plate images.