finding licence plates in an image (algorithm)

22
Zafer Genç

Upload: zafer-genc

Post on 14-Jul-2015

66 views

Category:

Engineering


1 download

TRANSCRIPT

Page 1: Finding Licence Plates in an Image (Algorithm)

Zafer Genç

Page 2: Finding Licence Plates in an Image (Algorithm)

Goals

Description of Method

Conclusion and results

Page 3: Finding Licence Plates in an Image (Algorithm)

1. Using ‘Morphological Image Processing’ and other image processing methods to leave plate alone in the image

2. Finding the location points of the plate in that image

Page 4: Finding Licence Plates in an Image (Algorithm)

It consists of four steps :

Morphological Image Processing

Image Preprocessing

Finding Plate Location

Drawing Lines

Page 5: Finding Licence Plates in an Image (Algorithm)

This step makes the image prepared for morphological image processing.

Things are done in this step :

1. Reading image

2. Rotating image 180˚ degree

3. Converting RGB image to YIQ

4. Taking the Gray level of YIQ image (‘Y’ component)

5. Passing the gray image through the unsharp filter

Page 6: Finding Licence Plates in an Image (Algorithm)

6. Adding result of usharp filter process to the gray image

7. Converting gray image to the binary image with giving a threshold

8. Passing the binary image through LoGfilter to use later

9. Clearing the noise of the binary image with median filter

10. Making black of some parts that the plate can never exist , from up and down of the image

11. Clearing noise of the result image with median filter

Page 7: Finding Licence Plates in an Image (Algorithm)
Page 8: Finding Licence Plates in an Image (Algorithm)

The reason of image 180 ˚ degree is making the plate location more suitable to be found.Down parts of images are always less complex than the other parts of images.

Page 9: Finding Licence Plates in an Image (Algorithm)

There are two reasons of obtaining gray level from the YIQ . One is the YIQ gray level has less noise than gray level of RGB. Other reason is the contrast of the YIQ gray level is better than the RGB. The plate is black letters on white background ,so it is good to increase the contrast.

Page 10: Finding Licence Plates in an Image (Algorithm)

Another thing can increase contrast is sharpening the image with ‘unsharp filter’. After passing image through the unsharp filter , result is added to the image , therefore it can be more sharpen , and the contrast would be high.

Page 11: Finding Licence Plates in an Image (Algorithm)

Converting gray image to the binary image with

giving a threshold :

Page 12: Finding Licence Plates in an Image (Algorithm)

Places that an plate can not exist in upper and lower parts of the result binary image is painted black . Therefore, the area that is morphological image processing would be apply is made smaller . The smaller area is better for the morphological image processing, because the areas that would be eliminated later are decreased.

Page 13: Finding Licence Plates in an Image (Algorithm)

Erosion and dilation make important change on height and width of parts . They are not used . Only closing and opening are used.

Things are done in this step :

1. Closing operation with rectangle structural element ( size= [10 60] )

2. Opening operation with rectangle structural element ( size= [5 30] ) to remove small objects.

3. Filling the white areas from left to right and from right to left until finding a black pixel

4. again closing operation with structural element of rectangle (size [5,30])

5. opening operation with structural element of rectangle (size [10,60])

6. Result is passed through a median filter to get rid of noise.

Page 14: Finding Licence Plates in an Image (Algorithm)

7. Closing operation is done again with a rectangle (size [5,30]) .

8. z=(s3-edge); (edge is the result of LoG filter operation in preprocessing step)

9. reverse the final image . (z1=1-z );

Page 15: Finding Licence Plates in an Image (Algorithm)
Page 16: Finding Licence Plates in an Image (Algorithm)

First Closing operation with rectangle structural element ( size= [10 60] )

Page 17: Finding Licence Plates in an Image (Algorithm)

Opening operation with rectangle structural element ( size= [5 30] )

Page 18: Finding Licence Plates in an Image (Algorithm)

Filling the white areas from left to right and from right to left until finding a black pixel. If black pixel comes, then it is done in that line and jump to the next line. The purpose of this operation is increase the black areas and leaving less white areas ,therefore finding the plate would be easier , because the plate would be the one of the white areas. Also, the plate is between black pixels ,so it is not effected from this operation .

Page 19: Finding Licence Plates in an Image (Algorithm)

Second closing – opening operations :

Page 20: Finding Licence Plates in an Image (Algorithm)

z=(s3-edge) operation and taking the reverse

Page 21: Finding Licence Plates in an Image (Algorithm)

Because many images are experimented with this algorithm , it is necessary to define margin values when drawing lines

Page 22: Finding Licence Plates in an Image (Algorithm)

The algorithm works well with some images , but it does not work with some other images. Reason of this is the angle of plates, brightness of some images, different size of plates in images and the using same structural elements for all images.