Skip to content

Vasilis-Thomas/Traffic-Sign-Detection-and-Recognition

Repository files navigation

Traffic-Sign-Detection-and-Recognition

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'.

Project Overview

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.

Key Technologies:

  • 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.

Features

  • 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.

Detection Pipeline

  1. Preprocessing:
  • Input images are converted to a suitable format for detection (e.g., color space conversion, image size).
  1. 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.
  1. 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.

Recognition Pipeline

  1. 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.

Requirements

  • MATLAB (R2018b or later)
  • Image Processing Toolbox

Installation

  1. Clone the repository:

    git clone https://github.com/Vasilis-Thomas/Traffic-Sign-Detection-and-Recognition
  2. Open MATLAB and navigate to the project directory:

    cd('path_to_project_directory')

Usage

  1. 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');
  2. Run the detection script:

    run('Traffic_sign_detection_and_recognition.m');
  3. Results will be displayed in MATLAB figure windows, showing the detection and recognition process.

  4. You can modify the parameters (e.g., detection thresholds, classifier settings) in the main script to suit your dataset.

Screenshots

Original Image
Original Image
Edge Detection (cleared image)
Edge Detection (cleared image)
Edge Detection (with imfill)
Edge Detection (with imfill)
Boundaries
Boundaries
Color Mask (cleared image)
Color Mask (cleared image)
Color Mask (with imfill)
Color Mask (with imfill)
Smoothed
Smoothed
Union
Union
Intersection
Intersection
Circularities

Possible Traffic Signs
Possible Traffic Signs

Recognized Traffic Signs
Recognized Traffic Signs

Authors

👤 Θωμάς Βασίλειος

👤 Σαρακενίδης Νικόλαος

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages