[K230 Embedded AI Development Board Review] + License Plate Recognition and Billing Management
[Copy link]
At present, automatic license plate recognition management has been adopted in many public places, such as shopping malls, schools, communities, etc., so how can we implement such management ourselves?
In fact, the better choice is to choose the K230 development board, because it itself has such a foundation, and can achieve its expected goals by providing corresponding development and function expansion.
The so-called "license plate recognition" is actually to first find the license plate in the image and mark it, and then identify the content of the license plate.
The scene of marking the license plate is shown in Figure 1. After the license plate to be identified is photographed, the display screen provides the image content to the camera. From the frame buffer window, it can be found that the program has marked the area where the license plate is located with a green rectangular frame.
Figure 1: License plate marking
The process of K230 development board recognizing license plate is as follows:
From the following array definition, you can understand the basic content of its recognition:
self.dict_rec = ["Hang", "Emissary", "Leader", "Australia", "Hong Kong", "Anhui", "Shanghai", "Tianjin", "Chongqing", "Hebei", "Shanxi", "Inner Mongolia", "Liaoning", "Jilin", "Heilongjiang", "Jilin", "Heilongjiang", "Jiangsu", "Zhejiang", "Beijing", "Fujian", "Gan", "Shandong", "Henan", "Hubei", "Hunan", "Guangdong", "Guangxi", "Qiong", "Sichuan", "Guizhou", "Yunnan", "Tibet", "Shaanxi", "Gan", "Qinghai", "Ningxia", "Xinjiang", "Police", "Study", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "_", "-"]
Taking license plates from multiple locations as targets, the results of recognition processing are shown in Figures 2 to 6.
Figure 2 Gansu tram license plate
Figure 3 Hebei license plate
Figure 4 Shanxi license plate
Figure 5 Tianjin tram license plate
Figure 6 Tianjin license plate
In addition, the corresponding output information can be observed from the serial terminal window, as shown in Figure 7.
Figure 7 Output results
Through careful observation, its specific form is as follows:
[array([360.6, 224.3672, 87.59999, 215.2547, 95.24998, 132.8625, 367.2, 142.0383], dtype=float32), array([426.0, 345.9305, 251.5125, 339. 5812, 258.075, 285.8766, 432.825, 292.2679], dtype=float32) ] ['\u6d25HA0009', '\u6d25HA0009']
11.48614
Among them, "6d25HA0009" is the license plate content, and the Chinese characters are encoded in Unicode code, that is, the license plate is "Jin HA0009".
If billing management is required, it can be achieved with the cooperation of RTC timing. The first time is the vehicle entry time, and the second time is the exit time. The charging value can be calculated by calculating the time difference * the timing unit price.
|