An experimental model for the detection and recognition of road traffic signs in static images from roads of member states of the European Union. This model is based on image processing techniques and implemented using 'Matlab 2018b'.
This project provides a solution to detect and recognize traffic signs from static images using color segmentation, shape detection, and template matching techniques. The primary goal of the project is to automate the process of identifying traffic signs in images, which can be useful for autonomous vehicles, traffic monitoring systems, and other similar applications.
- Color Segmentation: To isolate the regions of interest (ROI) in the image based on traffic sign colors (e.g., red, blue, yellow).
- Edge Detection & Shape Detection: To identify common traffic sign shapes like circles, triangles, and rectangles.
- Template Matching (Cross-Correlation): To recognize specific traffic signs by comparing the detected ROI with a set of predefined templates.
- Detect traffic signs in static images based on their color and shape.
- Recognize the type of traffic sign by comparing detected shapes with templates.
- Uses basic image processing techniques (color segmentation and edge detection).
- MATLAB-based cross-correlation algorithm for template matching.
- Preprocessing:
- Input images are converted to a suitable format for detection (e.g., color space conversion, image size).
- Color Segmentation:
- The program segments the image based on the specific colors associated with traffic signs (e.g., red, blue, yellow). This helps narrow down regions of interest where traffic signs may be present.
- Edge Detection & Shape Detection:
- The program applies edge detection (using methods like Canny or Sobel) to find the boundaries of objects in the image.
- Shape detection techniques are used to identify circular, triangular, or rectangular regions that correspond to common traffic sign shapes.
- Template Matching (Cross-Correlation):
- Once a region of interest is identified, the program uses a set of predefined templates for common traffic signs (e.g., stop sign, yield sign).
- The cross-correlation algorithm compares the detected shape with the templates and calculates a similarity score.
- The traffic sign is recognized based on the highest similarity match.
- MATLAB (R2018b or later)
- Image Processing Toolbox
-
Clone the repository:
git clone https://github.com/Vasilis-Thomas/Traffic-Sign-Detection-and-Recognition
-
Open MATLAB and navigate to the project directory:
cd('path_to_project_directory')
-
Prepare your images: Place your static images for traffic sign detection in the
Images/folder and specify the image you want to import.img = imread('./Images/select_image');
-
Run the detection script:
run('Traffic_sign_detection_and_recognition.m'); -
Results will be displayed in MATLAB figure windows, showing the detection and recognition process.
-
You can modify the parameters (e.g., detection thresholds, classifier settings) in the main script to suit your dataset.
![]() Original Image |
![]() Edge Detection (cleared image) |
![]() Edge Detection (with imfill) |
![]() Boundaries |
![]() Color Mask (cleared image) |
![]() Color Mask (with imfill) |
![]() Smoothed |
![]() Union |
![]() Intersection |
👤 Θωμάς Βασίλειος
- GitHub: @Vasilis-Thomas
👤 Σαρακενίδης Νικόλαος
- GitHub: @Nikoreve











