Description: 1.24 true color -> 256 grayscale.
2. Pretreatment: median filter.
3. Binarization: using an initial threshold T to perform binarization of image A to obtain binary image B.
The initial threshold T is determined by selecting threshold T= gmax-gmin /3,Gmax and Gmin respectively are the highest and lowest grayscale values.
This threshold has certain adaptability to different license plates, which can guarantee that the background is basically set to 0 to highlight the area of licence.
Weaken the background noise. To reduce the gray value of adjacent pixels in the image B, get the new image G, namely Gi,j=|Pi, j-pi, j-1| I =0, 1,... , j = 0, 1, 439... 639Gi,0=Pi,0, the left edge is directly assigned, it won't affect the overall effect.
5. Use custom templates for median filtering
The area gray level is basically assigned 0. Considering the text is composed of many short vertical lines, and one is mostly isolated noise, background noise using a template (1,1,1,1,1) T of G, median filtering can get away with the bulk of the interference image C.
6. License plate search: the horizontal projection method is used to detect the position of the license plate, and the vertical projection method is used to detect the vertical position of the license plate.
7. Regional cropping, interception of license plate images.
File list (Check if you may need any files):