A list,

Abstract With the development of graphics and image technology, the accuracy of license plate recognition technology is getting higher and higher, and the recognition speed is getting faster and faster. No matter what form of license plate recognition system, they are composed of triggering, image acquisition, image recognition module, auxiliary light source and communication module. License plate recognition system involves optics, electrical appliances, electronic control, digital image processing, computational vision, artificial intelligence and many other technologies. The trigger module is responsible for giving the trigger signal and controlling the capture when the vehicle reaches the appropriate position. The auxiliary light source provides auxiliary lighting to ensure that the system can take high-quality images under different lighting conditions. The image preprocessing program processes the captured image, removes the noise and adjusts the parameters. Then through the license plate location, character recognition, and finally the recognition result output.

2 Design Purpose and Significance 2.1 Design Purpose: 2.1.1 Let students consolidate the knowledge learned in the theory course, theory and practice. 2.1.2 Exercise students’ practical ability, stimulate students’ research potential, and improve students’ cooperation spirit. 2.2 Design significance: The purpose of the license plate positioning system is to correctly obtain the license plate area in the whole image and identify the license plate number. Through the design and implementation of license plate recognition system, can improve students’ ability to analyze and solve problems, but also to cultivate a certain ability of scientific research.

Automatic license plate recognition is a pattern recognition technology that uses dynamic video or static image of vehicle to automatically recognize license plate number and color. Its hardware foundation generally includes trigger equipment, camera equipment, lighting equipment, image acquisition equipment, recognition of license plate number processor and so on. Its software core includes license plate location algorithm, license plate character segmentation algorithm and optical character recognition algorithm. Some license plate recognition systems also have the function of judging the vehicle entering the field of view through the video image, which is called video vehicle detection. A complete license plate recognition system should include vehicle detection, image acquisition, license plate recognition and other parts. When the vehicle detection part detects the arrival of the vehicle, the image acquisition unit is triggered to collect the current video image. The license plate recognition unit processes the image, locates the license plate position, divides the characters in the license plate for recognition, and then forms the license plate number for output.

4 Detailed design steps

  1. Propose the overall design scheme:

License plate number and Color Recognition In order to recognize a license plate, the following basic steps are required: A. License plate location, location of the license plate in the picture; B. License plate character segmentation, the characters in the license plate separated out; C. License plate character recognition, the segmentation of the characters to identify the final composition of the license number. In the process of license plate recognition, the recognition of license plate color is based on different algorithms, which may be realized in the above different steps, usually in coordination with the license plate recognition, mutual verification. (1) License plate location: In the natural environment, the background of the automobile image is complex and the illumination is uneven. How to accurately determine the license plate area in the natural background is the key to the entire identification process. Firstly, a large range of relevant search is carried out on the video images collected to find a number of areas matching the characteristics of vehicle license plates as candidate areas. Then, the candidate areas are further analyzed and judged. Finally, the best area is selected as the license plate area and segmtioned from the image. (2) License plate character segmentation: after the completion of the location of the license plate area, the license plate area is divided into a single character, and then recognized. Characters are usually segmented by vertical projection. The projection of characters in the vertical direction must be near the local minimum value at the gap between or within the characters, and this position should meet the character writing format, character, size restrictions and some other conditions of the license plate. The vertical projection method has a good effect on character segmentation in automobile image in complex environment.(3) License plate character recognition: character recognition methods are mainly based on template matching algorithm and based on artificial neural network algorithm. The template matching algorithm first binalizes the segmtioned characters and scales their size to the size of the template in the character database, then matches them with all the templates, and finally chooses the best match as the result. There are two kinds of algorithms based on artificial neural network. One is to extract the features from the recognized characters, and then train the neural network dispatcher with the acquired features. Another method is to directly input the images to be processed into the network, and then the network automatically implements feature extraction until the results are recognized. In practical application, the recognition rate of license plate recognition system is closely related to license plate quality and shooting quality. The quality of licence plates is affected by various factors, such as rusting, defacing, peeling paint, fading font, occluded licence plates, tilt licence plates, high reflection, multiple licence plates, fake licence plates, etc.; The actual shooting process is also affected by factors such as ambient brightness, shooting brightness, vehicle speed and so on. These influencing factors reduce the recognition rate of license plate recognition to varying degrees, which is the difficulty and challenge of license plate recognition system. In order to improve the recognition rate, in addition to constantly improving the recognition algorithm, we should also find ways to overcome various lighting conditions, so that the collected images are most conducive to recognition.

Ii. Source code

clear ; close all; Scolor = imread(Scolor = imread)'3.jpg'); Sgray = rGB2Gray (Scolor); Figure,imshow(Scolor),title('Original colour image'); Figure,imshow(Sgray),title('Original black and white image'); %Step2 Image preprocessing. Open the Sgray original black and white image to get the image background s=strel('disk'.13); % strei Bgray = imopen function (Sgray, s); Sgray s image figure,imshow(Bgray); title('Background image'); Subtract the original image from the background image. Enhanced image Egray= Imsubtract (Sgray,Bgray); Figure,imshow(Egray); title('Enhanced black and white image'); % output black and white image %Step3 obtain the best threshold value, the image binarization fmax1=double(max(max(Egray))); %egray maximum value and output double precision fMIN1 =double(min(min(Egray))); Level =(fmax1-(fmax1-fmin1)/3) /255; % Obtain the optimal threshold bW22 = IM2BW (Egray,level); % Convert image to binary image Bw2 =double(bw22); %Step4 perform open and close operation to filter the binary image. Figure,imshow(bw2); title('Image binarization'); GRD =edge(bw2,'canny')% Use canny operator to identify the boundary figure in the intensity image,imshow(GRD); title('Image Edge Extraction'); Bg1 =imclose(GRD,strel('rectangle'[5.19])); Figure,imshow(bg1); title('image closure operation [5,19]'); Bg3 =imopen(bg1,strel(bg1,strel('rectangle'[5.19])); Figure,imshow(bg3); title('image open operation [5,19]'); Bg2 =imopen(bg3,strel('rectangle'[19.1])); Figure,imshow(bg2); title('image open operation [19,1]'); % output the image % of open operation Step5 extract the region of the binary image and calculate the characteristic parameters of the region. The license plate area [L,num] = bwlabel(bg2,8); Feastats = regionprops(L,'basic'); % Calculate the feature size of image Area Area=[feastats.area]; % area BoundingBox=[feastats.boundingbox]; %[x y width height]'spring'.'k'.'shuffle'); % mark image to RGB image conversion figure,imshow(RGB); title('Image color marking'); % Output frame color image lx=0;
for l=1:num
    width=BoundingBox((l- 1) *4+3); % frame width calculation hight=BoundingBox((l- 1) *4+4); % frame height calculationif (width>98 & width<160 & hight>25 & hight<50)% frame width and height range lx=lx+1;
        Getok(lx)=l;
    end
end
for k= 1:lx
    l=Getok(k);    
    startcol=BoundingBox((l- 1) *4+1)2 -; % startrow=BoundingBox((l- 1) *4+2)2 -; % start line width=BoundingBox((l- 1) *4+3) +8; % license plate width hight=BoundingBox((l- 1) *4+4) +2; Rato =width/hight; % calculates the plate aspect ratioif rato>2 & rato<4   
        break;
    end
end
sbw1=bw2(startrow:startrow+hight,startcol:startcol+width- 1); Subcol1 =Sgray(startrow:startrow+hight, startCol :startcol+width- 1); Obtain gray scale subplot of license plate2.1.1),imshow(subcol1); title('License plate Grayscale sub-image'); % Output grayscale image subplot(2.1.2),imshow(sbw1); title('License plate binary subgraph'); Step6 calculate the horizontal projection of license plate and perform peak-valley analysis on the horizontal projection. Histcol1 =sum(sbw1); % calculated vertical projection HISTRow =sum(SBW1)'); Calculate the horizontal projection figure,subplot(2.1.1),bar(histcol1); title('Vertical projection (border included)'); % output vertical projection subplot(2.1.2),bar(histrow);     title('Horizontal projection (border included)'); Output the horizontal projection figure,subplot(2.1.1),bar(histrow);     title('Horizontal projection (border included)'); Output horizontal projection subplot(2.1.2),imshow(sbw1); title('License plate binary subgraph'); Meanrow =mean(HISTRow); % Obtain the mean value of horizontal projection minrow=min(HISTrow); Levelrow =(meanRow +minrow)/2; % Find the average value of the horizontal projection count1=0;
l=1;
for k=1:hight
    if histrow(k)<=levelrow                             
        count1=count1+1;                                
    else 
        if count1>=1markrow(l)=k; Markrow1 (l)=count1; % Valley width (drop point to next rise point) L = L +1;
        end
        count1=0; end end markrow2=diff(markrow); % peak distance (rise point to next rise point) [m1,n1]=size(markrow2); n1=n1+1;
markrow(l)=hight;
markrow1(l)=count1;
markrow2(n1)=markrow(l)-markrow(l- 1);
l=0;
for k=1:n1
    markrow3(k)=markrow(k+1)-markrow1(k+1); Markrow4 (k)= markRow3 (k) -markRow (k); % Peak width (rise point to fall point) markRow5 (k)= markRow3 (k)-double(uint16(markrow4(k)/2)); Step7 calculate the rotation Angle of license plate %(1(Select the first one from the ascending point to the descending point1Point/m2, n2 = size (sbw1); %sbw1 image size [m1,n1]=size(markrow4); Maxw = Max (markrow4); % has a maximum width of charactersif markrow4(1) ~= maxw% detect upper ysite=1;
    k1=1;
    for l=1:n2
    for k=1: MarkRow3 (ysite)% Scan from top edge to first peak drop pointif sbw1(k,l)==1
            xdata(k1)=l;
            ydata(k1)=k;
            k1=k1+1;
            break;
        end
    end
    end
else% ysite=n1;if markrow4(n1) = =0
        if markrow4(n1- 1) ==maxw
           ysite= 0; % has no bottomelse
           ysite= n1- 1;
       end
    end
    if ysite ~=0
        k1=1;
        for l=1:n2
            k=m2;
            whileK >= markRow (ysite) % Scan from bottom to rise of last peakif sbw1(k,l)==1
                    xdata(k1)=l;
                    ydata(k1)=k;
                    k1=k1+1;
                    break;
                end
                k=k- 1;
            end
        end
    end
end       
%(2), calculate the Angle with x fresult = fit(xdata)',ydata'.'poly1');   %poly1    Y = p1*x+p2
p1=fresult.p1;
angle=atan(fresult.p1)*180/pi; % radians to degrees,360/2pi,  pi=3.14% (3Subcol = imrotate(subcol1, Angle,'bilinear'.'crop'); SBW = imrotate(sbw1, Angle,'bilinear'.'crop'); Figure,subplot(2.1.1),imshow(subcol); title('License plate Grayscale sub-image'); Output the grayscale image title of the license plate after rotation2.1.2),imshow(sbw); title("); Title (['])License plate rotation Angle:',num2str(angle),'The degree of', 'Color'.'r'); Step8 recalculate the horizontal projection of the license plate after rotating the license plate, remove the horizontal border of the license plate, and obtain the character height histcol1=sum(SBW); % calculate vertical projection HISTRow =sum(SBW'); Calculate the horizontal projection figure,subplot(2.1.1),bar(histcol1); title('Vertical projection (after rotation)');
subplot(2.1.2),bar(histrow);     title('Horizontal projection (after rotation)');
figure,subplot(2.1.1),bar(histrow);     title('Horizontal projection (after rotation)');
subplot(2.1.2),imshow(sbw); title('License plate binary subgraph (after rotation)'); Maxhight = Max (markrow2); findc=find(markrow2==maxhight); rowtop=markrow(findc); rowbot=markrow(findc+1)-markrow1(findc+1); sbw2=sbw(rowtop:rowbot,:); % subgraph (rowbot-rowtop+1Maxhight = rowbot rowtop +)1; % Character height (rowbot-rowtop+1) %Step9 Calculate the vertical projection of license plate, remove the vertical border of license plate, and obtain the average width of license plate and characters histcol=sum(SBW2); Calculate the vertical projection figure,subplot(2.1.1),bar(histcol); title('Vertical Projection (with horizontal border removed)'); % Output the vertical projection image subplot(2.1.2),imshow(sbw2); % output vertical projection image title(['Plate character height:',int2str(maxhight)],'Color'.'r'); Meancol =mean(HISTcol); % Obtain the mean value of vertical projection mincol=min(histcol); Levelcol =(meancol+mincol)/4; % for the vertical projection1/4
count1=0;
l=1;
for k=1:width
    if histcol(k)<=levelcol 
        count1=count1+1;
    else 
        if count1>=1markcol(l)=k; Markcol1 (l)=count1; % Valley width (drop point to next rise point) L = L +1;
        end
        count1=0;
    end
end
Copy the code

Third, the operation result

Fourth, note

Version: 2014 a