Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
4 views

Vechicle number plate detection using python and cv ppt

The document discusses the development of a vehicle number plate detection system using Python and OpenCV, aimed at improving law enforcement and traffic management through Automatic License Plate Recognition (ALPR). It highlights the challenges faced by existing systems and proposes an optimized algorithm for detecting Ghanaian vehicle number plates, utilizing image processing techniques such as edge detection and OCR. The project emphasizes the importance of accurate detection in various lighting conditions and the use of free software tools for implementation.

Uploaded by

Muthu Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Vechicle number plate detection using python and cv ppt

The document discusses the development of a vehicle number plate detection system using Python and OpenCV, aimed at improving law enforcement and traffic management through Automatic License Plate Recognition (ALPR). It highlights the challenges faced by existing systems and proposes an optimized algorithm for detecting Ghanaian vehicle number plates, utilizing image processing techniques such as edge detection and OCR. The project emphasizes the importance of accurate detection in various lighting conditions and the use of free software tools for implementation.

Uploaded by

Muthu Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

Vechicle number plate

detection using python


and cv
1. Manasa2. Kavya sree
ABSTRACT
In recent years the number of vehicles has increased drastically. With this increase, it is becoming difficult to keep
track of each vehicle for purpose of law enforcement and traffic management. License Plate Recognition is used
increasingly nowadays for automatic toll collection, maintaining traffic activities and law enforcement. Many
techniques have been proposed for plate detection, each having its own advantages and disadvantages. The basic
step in License Plate Detection is localization of number plate. Automatic License Plate Recognition system is a real
time embedded system which automatically recognizes the license plate of vehicles. There are many applications
ranging from complex security systems to common areas and from parking admission to urban traffic control.
Automatic license plate recognition (ALPR) has complex characteristics due to diverse effects such as of light and
speed. Most of the ALPR systems are built using proprietary tools like Matlab. This system presents an alternative
method of implementing ALPR systems using Free Software including Python and the Open Computer Vision Library.
EXISTING SYSTEM:
In existing system presents a system called NPR (Number Plate Recognition) which is based on image processing and is used
to detect the number plates of vehicles and process them to record the information. In a fast-growing world, it has become
almost impossible to track illegal vehicles and store vehicle information. This is eventually leading to a rise in the crime rate,
especially due to manual errors. The proposed system first captures the vehicle image and the vehicle number plate region is
extracted using Image Segmentation in an image. The resulting data is then used to compare with the records on a database
to come up with specific information like the vehicle's owner, place of registration, address, etc. Further, the system is
implemented and simulated in MATLAB for studying feasibility and accuracy on a real image.
PURPOSE OF THIS PROJECT:
The main purpose of this project is to detect a license plate from an image provided by a camera. An efficient algorithm is
developed to detect a license plate in various luminance conditions. This algorithm extracts the license plate data from an
image and provides it as an input to the stage of Car License Plate Recognition • Automatic Number Plate Recognition is a
fairly well explored problem with many successful solutions. • However, these solutions are typically tuned towards a
particular environment due to the variations in the features of number plates across the world. • Algorithms written for
number plate recognition are based on these features and so a universal solution would be difficult to realize as the image
analysis techniques that are used to build these algorithms cannot themselves boast hundred percent accuracy. 4 • The
focus of this paper is a proposed algorithm that is optimized to work with Ghanaian vehicle number plates. The algorithm,
written in C++ with the Open CV library, uses edge detection and Feature Detection techniques combined with mathematical
morphology for locating the plate. • The Tesseract OCR engine was then used to identify the detected characters on the plate
Black diagram :
IMAGE CROPPING AND FILTERING :
The first step in image pre-processing is image cropping. Some irrelevant parts of the image can be removed and the
image region of interest is focused. This tool provides a user with the size information of the cropped image. Mat Lab
function for image cropping realizes this operation interactively waiting for an user to specify the crop rectangle with the
mouse and operates on the current axes. The output image is of the same class as the input image. The two-dimensional
convolution operation is fundamental to the analysis of images. A new value is ascribed to a given pixel based on the
evaluation of a weighted average of pixel values in a k × k neighbourhood of the central pixel. Convolution kernel or the
filter mask is represented with weights supplied in a square matrix. It is applied to each pixel in an image. Discrete form
of the 2D convolution operator is defined by the following relationship between the elements fi(x, 7 y) of the input
image, the elements h(α, β) of the convolution kernel, and the elements g(x, y) of the output image by the following
master formula g(x, y) = (k−X 1)/2 α=−(k−1)/2 (k−X 1)/2 β=−(k−1)/2 fi(α, β)h(x − α, y − β), where x, y, α and β are integers
[4]. Coefficients of the kernel H represent a discrete approximation of the analytical form of the response function
characterizing the desired filter. In practical cases, the kernel is a square array and kx = ky = k, where k is odd and much
smaller than the linear image dimension. There is the following steps, realized for each pixel P represented by (x, y): •
Placement of H on P; • Multiplication of each pixel in the k × k neighbourhood by the appropriate filter mask; •
Summation of all products; • Placement of the normalized sum into position P of the output image. This tool for pre-
processing lets an user explore 2-D Finite Impulse Response filters. By changing the cut-off frequency and filter order, the
user can design filter and can see the designed filter’s coefficients and frequency response. Median filtering is a non-
linear smoothing method that reduces the blurring of edges and significantly eliminates impulse noise [3, 4]. It
suppresses image noise without reducing the image sharpness and can be applied iteratively. The brightness value of the
current pixel in the image is replaced by the median brightness of either 3-by-3 or 4-by-4 neighbourhood.
INTENSITY ADJUSTEMENT AND HISTOGRAM EQUALIZATION

BRIGHTNESS THRESHOLDING

CLEARRING AREAS OF A BINARY IMAGE

DETECTING EDGES

FILTER FUNCTION
PYTHON
(PROGRAMMING LANGUAGE) Python is a widely used high-level programming language
for general-purpose programming, created by Guido van Rossum and first released in
1991. An interpreted language, Python has a design philosophy which emphasizes code
readability (notably using whitespace indentation to delimit code blocks rather than curly
brackets or keywords), and a syntax which allows programmers to express concepts in
fewer lines of code than possible in languages such as C++ or Java. The language provides
constructs intended to enable writing clear programs on both a small and large scale.
Python features a dynamic type system and automatic memory management and
supports multiple programming paradigms, including object-oriented, imperative, 12
functional programming, and procedural styles. It has a large and comprehensive
standard library. Python interpreters are available for many operating systems, allowing
Python code to run on a wide variety of systems. CPython, the reference implementation
of Python, is open source software and has a community-based development model, as
do nearly all of its variant implementations. CPython is managed by the non-profit Python
Software Foundation
OPENCV OpenCV (Open source computer vision) is a library of
programming functions mainly aimed at real-time computer vision.
Originally developed by Intel, it was later supported by Willow
Garage then Itseez (which was later acquired by Intel). The library is
cross-platform and free for use under the open-sourceBSD license.
OpenCV supports the deep learning frameworks TensorFlow,
Torch/PyTorch and Caffe
OCR is formerly known as Optical Character Recognition which is revolutionary for the
digital world nowadays. OCR is actually a complete process under which the
images/documents which are present in a digital world are processed and from the text are
being processed out as normal editable text. Purpose of OCR OCR is a technology that
enables you to convert different types of documents, such as scanned paper documents,
PDF files, or images captured by a digital camera into editable and searchable data.
EasyOCR is actually a python package that holds PyTorch as a backend handler. EasyOCR
like any other OCR(tesseract of Google or any other) detects the text from images but in
my reference, while using it I found that it is the most straightforward way to detect text
from images also when high end deep learning library(PyTorch) is supporting it in the
backend which makes it accuracy more credible. EasyOCR supports 42+ languages for
detection purposes. EasyOCR is created by the company named Jaided AI company
Sample code :
img = cv2.imread(IMAGE_PATH) spacer =
100 for detection in result: top_left =
tuple(detection[0][0]) bottom_right =
tuple(detection[0][2]) text = detection[1]
31 img =
cv2.rectangle(img,top_left,bottom_right,
(0,255,0),3) img = cv2.putText(img,text,
(20,spacer), font, 0.5,
(0,255,0),2,cv2.LINE_AA) spacer+=15
plt.figure(figsize=(10,10)) plt.imshow(img)
plt.show()
Out put:

You might also like