1: color image to grayscale, weighted average W = 0.229 × R + 0 587xg + 0114xb (1) Reduce the image to 1/4 of the source Image 2: Median Filter: required or not. Check the result. 3: binarization: high legal threshold 4: edge extraction: a simple first-order differential operation can be used, either horizontally or vertically, or a soble operator with a filtering effect. 5: Rough License Plate Extraction: two rough license plate locations are obtained by edge statistics in the horizontal direction. In the edge statistics graph, the two peaks are obtained from the bottom up and then searched In the obtained horizontal area, use the vertical edge statistics to obtain the specific location of the license plate. Question: Is there interference in other areas? 6: precise positioning: (1) the aspect ratio of the license plate. This is only available on the front. It is not a very definite condition. (2) study the extracted areas in the coarse positioning. If the blue, black, and yellow areas have more colors, the blue license plate, black license plate, Yellow background license plate, the remaining license plate for white background military vehicles and armed police vehicles. RGB of each color has a certain range ratio, for example, the blue component is the largest among the blue RGB values, and the ratio of the blue and red components is greater than the threshold TB; The black RGB values have little difference. They are smaller than the RGB values of their respective colors and smaller than the threshold TBL values; The RGB components of the yellow color are reduced in turn, and the blue components are much smaller than the other two (the effects of sound color and light) 7. The obtained license plate area is provided in the form of image information. |