Vehicle image correction method and device, and inspection system
Through the combination of line array cameras and pattern recognition algorithms, the accuracy and cost of vehicle recognition in the prior art are solved, efficient identification of vehicle models and vehicle numbers is achieved, and equipment complexity and cost are reduced.
Patent Information
- Application Number
- CN202510369442.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2017-11-21
- Publication Date
- 2025-07-11
AI Technical Summary
The prior art cannot accurately identify the vehicle model and vehicle number in vehicle identification at the same time, and the equipment costs are high, the installation is complex, and it is greatly affected by the environment and vehicle speed.
Multiple line array images of the vehicle are obtained using the linear array camera, and the body images are generated through distortion correction and image combination technology, and the vehicle model and vehicle number are identified in combination with a pattern recognition algorithm. The light emitting diode light source with a narrow luminous angle is used for filling light, and the exposure time and photo frequency are adjusted to adapt to the ambient brightness and vehicle speed.
It realizes the identification of the vehicle model and number at the same time, improves the identification accuracy, and reduces equipment costs and installation complexity.
Smart Images

Figure CN120298994A_ABST
Abstract
Description
[0001] This application is a divisional application of the invention patent application with the application date of November 21, 2017, the application number of 201711168395.6, and the title of "Vehicle Identification Method and Device, Inspection System, Storage Medium, Electronic Device". Background Art
[0003] With the continuous improvement of people's living standards, the total ownership of automobiles has also begun to grow rapidly. People's requirements for vehicle management are getting higher and higher. Vehicle entrances and exits in various parking lots, highway toll stations, government agencies, communities, etc. need to identify vehicles according to specific requirements.
[0004] For example, in the field of vehicle safety inspection, it is necessary to inspect container trucks and various freight trucks without stopping, and automatically identify the vehicle numbers on the container trucks or freight trucks to achieve the binding of vehicle numbers and images, which can greatly improve the safety inspection efficiency. In this case, it is required that the driver drive through the radiation area. Since the energy and dose of the accelerator or radiation source are usually very high, it will cause great harm to the driver. Therefore, how to accurately identify the vehicle model and vehicle number, and thus control the radiation source not to irradiate the cab or irradiate it with a low dose according to the vehicle model is particularly important.
[0005] Currently, the commonly used method is to install a light curtain or area laser scanner in the detection channel to obtain vehicle contour information and identify the vehicle type based on the vehicle contour information. In addition, a matrix camera is installed in the detection channel to capture the vehicle body image, and finally the vehicle number is identified by using the image recognition method.
[0006] In the above methods, the image information obtained by the light curtain is less, and the vehicle model and vehicle number cannot be identified simultaneously, and the installation is complex; the cost of obtaining images by the area laser scanner is high and it is easily affected by the environment; when obtaining the vehicle body image by the matrix camera, it is greatly affected by the vehicle speed, and the recognition accuracy is low.
[0007] It should be noted that the information disclosed in the above background art section is only used to enhance the understanding of the background of the present disclosure, and thus may include information that does not constitute the prior art known to those of ordinary skill in the art. Summary of the Invention
[0008] The purpose of the present disclosure is to provide a vehicle identification method, a vehicle identification device, a vehicle inspection system applying the vehicle identification device, a storage medium, and an electronic device, so as to at least overcome one or more problems caused by the limitations and defects of the related art to a certain extent.
[0009] According to one aspect of the present disclosure, a vehicle identification method is provided, including:
[0010] Use a line array camera to take pictures of the vehicle to be recognized to obtain multiple line array images of the vehicle to be recognized;
[0011] Perform distortion correction on the multiple line array images based on the moving speed of the vehicle to be recognized to obtain multiple corrected images;
[0012] Combine the multiple corrected images to obtain the body image of the vehicle to be recognized;
[0013] Recognize the vehicle type of the vehicle to be recognized in the body image based on the first pattern recognition algorithm; and
[0014] Recognize the license plate number of the vehicle to be recognized in the body image based on the second pattern recognition algorithm.
[0015] In an exemplary embodiment of the present disclosure, the using a line array camera to take pictures of the vehicle to be recognized to obtain multiple line array images of the vehicle to be recognized includes:
[0016] Provide a light emitting diode light source, wherein, in the working mode, control the light emitting diode light source to work by enhancing the light emitting brightness and combining high-frequency flashing;
[0017] In the working mode of the light emitting diode light source, use a line array camera to take pictures of the vehicle to be recognized to obtain multiple line array images of the vehicle to be recognized.
[0018] In an exemplary embodiment of the present disclosure, the light emitting diode light source uses a light emitting diode light source with a narrow light emitting angle.
[0019] In an exemplary embodiment of the present disclosure, the method further includes:
[0020] Obtain the brightness of the photographing environment in real time, and adjust the exposure time of the line array camera according to the brightness of the photographing environment.
[0021] In an exemplary embodiment of the present disclosure, the using a line array camera to take pictures of the vehicle to be recognized to obtain multiple line array images of the vehicle to be recognized includes:
[0022] Control the line array camera to continuously take pictures of the vehicle to be recognized at a preset photographing frequency to obtain multiple line array images of the vehicle to be recognized.
[0023] In an exemplary embodiment of the present disclosure, the performing distortion correction on the multiple line array images based on the moving speed of the vehicle to be recognized to obtain multiple corrected images includes:
[0024] Respectively obtain the moving speed of the vehicle to be recognized when each of the line array images is taken;
[0025] Based on the moving speed of the vehicle to be recognized when each line array image is captured, and in combination with the moving speed determined by the preset photographing frequency, perform horizontal compression or horizontal stretching processing on each of the line array images to obtain a plurality of corrected images.
[0026] In an exemplary embodiment of the present disclosure, the controlling the line array camera to continuously photograph the vehicle to be recognized at a preset photographing frequency to obtain a plurality of line array images of the vehicle to be recognized includes:
[0027] Obtain the moving speed of the vehicle to be recognized in real time, and adjust the preset photographing frequency according to the moving speed of the vehicle to be recognized;
[0028] Control the line array camera to continuously photograph the vehicle to be recognized at the adjusted preset photographing frequency to obtain a plurality of line array images of the vehicle to be recognized.
[0029] In an exemplary embodiment of the present disclosure, both the first pattern recognition algorithm and the second pattern recognition algorithm are one of a nearest neighbor algorithm, a Bayesian algorithm, a principal component analysis algorithm, a linear discriminant analysis algorithm, and a Gaussian mixture model.
[0030] In an exemplary embodiment of the present disclosure, the recognizing the vehicle number of the vehicle to be recognized in the vehicle body image based on the second pattern recognition algorithm includes:
[0031] Judge whether the vehicle type of the vehicle to be recognized is a preset vehicle type;
[0032] When it is judged that the vehicle type of the vehicle to be recognized is the preset vehicle type, recognize the vehicle number of the vehicle to be recognized in the vehicle body image based on the second pattern recognition algorithm.
[0033] In an exemplary embodiment of the present disclosure, the preset vehicle type is a truck.
[0034] According to one aspect of the present disclosure, there is provided a vehicle recognition device, including:
[0035] An image acquisition module, configured to use a line array camera to photograph a vehicle to be recognized to obtain a plurality of line array images of the vehicle to be recognized;
[0036] A distortion correction module, configured to perform distortion correction on the plurality of line array images based on the moving speed of the vehicle to be recognized to obtain a plurality of corrected images;
[0037] An image combination module, configured to combine the plurality of corrected images to obtain a vehicle body image of the vehicle to be recognized;
[0038] A first recognition module for recognizing the vehicle type of the vehicle to be recognized in the vehicle body image based on a first pattern recognition algorithm; and
[0039] A second recognition module for recognizing the vehicle number of the vehicle to be recognized in the vehicle body image based on a second pattern recognition algorithm.
[0040] In an exemplary embodiment of the present disclosure, the image acquisition module includes:
[0041] A supplementary light unit for providing a light-emitting diode light source, wherein, in the working mode, controlling the light-emitting diode light source to work in a manner of enhancing the light-emitting brightness and combining high-frequency flashing;
[0042] An image acquisition unit for taking pictures of the vehicle to be recognized by using a line array camera in the working mode of the light-emitting diode light source to obtain a plurality of line array images of the vehicle to be recognized.
[0043] In an exemplary embodiment of the present disclosure, the light-emitting diode light source adopts a light-emitting diode light source with a narrow light-emitting angle.
[0044] In an exemplary embodiment of the present disclosure, the device further includes:
[0045] An adjustment module for acquiring the brightness of the photographing environment in real time and adjusting the exposure time of the line array camera according to the brightness of the photographing environment.
[0046] In an exemplary embodiment of the present disclosure, the image acquisition module includes:
[0047] An image acquisition unit for controlling the line array camera to continuously take pictures of the vehicle to be recognized at a preset photographing frequency to obtain a plurality of line array images of the vehicle to be recognized.
[0048] In an exemplary embodiment of the present disclosure, the distortion correction module includes:
[0049] A speed acquisition unit for respectively acquiring the moving speed of the vehicle to be recognized when each of the line array images is taken;
[0050] A distortion correction unit for respectively performing horizontal compression or horizontal stretching processing on each of the line array images based on the moving speed of the vehicle to be recognized when each of the line array images is taken and combining the moving speed determined by the preset photographing frequency to obtain a plurality of corrected images.
[0051] In an exemplary embodiment of the present disclosure, the image acquisition unit includes:
[0052] A speed acquisition subunit, configured to acquire the moving speed of the vehicle to be recognized in real time, and adjust the preset photographing frequency according to the moving speed of the vehicle to be recognized;
[0053] An image acquisition subunit, configured to control the line array camera to continuously photograph the vehicle to be recognized according to the adjusted preset photographing frequency to obtain a plurality of line array images of the vehicle to be recognized.
[0054] In an exemplary embodiment of the present disclosure, both the first pattern recognition algorithm and the second pattern recognition algorithm are one of a proximity algorithm, a Bayesian algorithm, a principal component analysis algorithm, a linear discriminant analysis algorithm, and a Gaussian mixture model.
[0055] In an exemplary embodiment of the present disclosure, the second recognition module includes:
[0056] A judgment unit, configured to judge whether the vehicle type of the vehicle to be recognized is a preset vehicle type;
[0057] An identification unit, configured to, when it is judged that the vehicle type of the vehicle to be recognized is the preset vehicle type, identify the vehicle number of the vehicle to be recognized in the vehicle body image based on the second pattern recognition algorithm.
[0058] In an exemplary embodiment of the present disclosure, the preset vehicle type is a truck.
[0059] According to one aspect of the present disclosure, there is provided a vehicle inspection system, which includes the vehicle identification device described in any one of the above.
[0060] According to one aspect of the present disclosure, there is provided a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the vehicle identification method described in any one of the above is implemented.
[0061] According to one aspect of the present disclosure, there is provided an electronic device, including:
[0062] A processor; and
[0063] A memory, configured to store executable instructions of the processor;
[0064] Wherein, the processor is configured to execute the vehicle identification method described in any one of the above by executing the executable instructions.
[0065] The present disclosure provides a vehicle recognition method, a vehicle recognition device, a vehicle inspection system applying the vehicle recognition device, a storage medium, and an electronic device according to an exemplary embodiment. The vehicle recognition method uses a line array camera to obtain a plurality of line array images of a vehicle to be recognized, performs distortion correction on the plurality of line array images based on the speed of the vehicle to be recognized to obtain a plurality of corrected images, combines the plurality of corrected images to obtain a body image of the vehicle to be recognized, and finally recognizes the vehicle type and vehicle number of the vehicle to be recognized in the body image based on a first pattern recognition algorithm and a second pattern recognition algorithm respectively. On the one hand, a large amount of information is included in the plurality of line array images obtained by the line array camera, so that the vehicle type and vehicle number of the vehicle can be recognized simultaneously based on the plurality of line array images; on the other hand, distortion correction is performed on the plurality of line array images based on the speed of the vehicle to be recognized, reducing the deformation of each line array image, thereby improving the accuracy of vehicle type and vehicle number recognition; on the other hand, since the volume of the line array camera is small, it is convenient for installation and debugging, reducing the installation and debugging costs.
[0066] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] By referring to the drawings to describe its exemplary embodiments in detail, the above and other features and advantages of the present disclosure will become more obvious. Obviously, the drawings in the following description are only some embodiments of the present disclosure. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts. In the drawings:
[0068] Figure 1 is a flowchart of a vehicle recognition method according to the present disclosure;
[0069] Figure 2 is a schematic diagram of a body image provided in an exemplary embodiment of the present disclosure;
[0070] Figure 3 is a block diagram of a vehicle recognition device according to the present disclosure;
[0071] Figure 4 is a schematic diagram of determining the front of a vehicle to be recognized provided in an exemplary embodiment of the present disclosure;
[0072] Figure 5 is a module schematic diagram of an electronic device in an exemplary embodiment of the present disclosure;
[0073] Figure 6 is a schematic diagram of a program product in an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0074] Example embodiments will now be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in various forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. Like reference numerals refer to like or similar parts throughout the figures, and thus their repetitive description will be omitted.
[0075] In addition, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of the embodiments of the present disclosure. However, those skilled in the art will realize that the technical solutions of the present disclosure can be practiced without one or more of the specific details, or other methods, components, materials, devices, steps, etc. may be used. In other cases, well-known structures, methods, devices, implementations, materials, or operations are not shown or described in detail to avoid obscuring aspects of the present disclosure.
[0076] The block diagrams shown in the drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software form, or in one or more software-hardened modules, or in different networks and / or processor devices and / or microcontroller devices.
[0077] In this exemplary embodiment, a vehicle recognition method is first disclosed. Referring to Figure 1 as shown, the vehicle recognition method may include:
[0078] Step S1: Using a line array camera to take pictures of the vehicle to be recognized to obtain a plurality of line array images of the vehicle to be recognized;
[0079] Step S2: Based on the moving speed of the vehicle to be recognized, performing distortion correction on the plurality of line array images to obtain a plurality of corrected images;
[0080] Step S3: Combining the plurality of corrected images to obtain a body image of the vehicle to be recognized;
[0081] Step S4: Recognizing the vehicle model of the vehicle to be recognized in the body image based on a first pattern recognition algorithm; and
[0082] Step S5: Recognizing the vehicle number of the vehicle to be recognized in the body image based on a second pattern recognition algorithm.
[0083] According to the vehicle recognition method in this exemplary embodiment, on the one hand, a large amount of information is contained in the multiple linear array images obtained by the linear array camera, so that the vehicle model and license plate number can be recognized simultaneously based on the multiple linear array images; on the other hand, distortion correction is performed on the multiple linear array images based on the speed of the vehicle to be recognized, reducing the deformation of each linear array image, thereby improving the accuracy of vehicle model and license plate number recognition; on the yet another hand, since the linear array camera is small in size, it is convenient for installation and debugging, reducing the installation and debugging costs.
[0084] Next, each step in the vehicle recognition method in this exemplary embodiment will be further described.
[0085] In step S1, the linear array camera is used to take pictures of the vehicle to be recognized to obtain multiple linear array images of the vehicle to be recognized.
[0086] In this exemplary embodiment, the linear array camera can be installed in the detection channel and can be set on the left or right side of the vehicle to be recognized to obtain the body image on the left or right side of the vehicle to be recognized. However, the installation position of the linear array camera in this exemplary embodiment is not limited thereto. For example, according to specific requirements, the linear array camera can also be set above the vehicle to be recognized to obtain the top-down body image of the vehicle to be recognized. Additionally, for example, the linear array camera can also be set in multiple orientations of the vehicle to be recognized to obtain the body images of the vehicle to be recognized in multiple orientations.
[0087] In this exemplary embodiment, the area laser speed measurement and positioning module can be used to detect whether the vehicle to be recognized enters the detection channel, and when it is detected that the vehicle to be recognized enters the detection channel, the linear array camera is started so that the linear array camera continuously takes pictures of the moving vehicle to be recognized to obtain multiple linear array images of the vehicle to be recognized.
[0088] Furthermore, the use of the linear array camera to take pictures of the vehicle to be recognized to obtain multiple linear array images of the vehicle to be recognized may include: controlling the linear array camera to continuously take pictures of the vehicle to be recognized at a preset photographing frequency to obtain multiple linear array images of the vehicle to be recognized. The preset photographing frequency can be set by developers according to the application scenario, or can also be calculated based on the speed of the vehicle to be recognized when it enters the detection channel. This exemplary embodiment does not make special limitations in this regard. It should be noted that the specific process of calculating the preset photographing frequency based on the speed of the vehicle to be recognized when it enters the detection channel is a well-known technology, so it will not be elaborated here.
[0089] Furthermore, when the speed of the vehicle to be recognized changes, the linear array images obtained by the preset photographing frequency will be distorted. Therefore, in order to avoid the distortion of the linear array images, the controlling the linear array camera to continuously photograph the vehicle to be recognized at a preset photographing frequency to obtain a plurality of linear array images of the vehicle to be recognized may include: obtaining the moving speed of the vehicle to be recognized in real time, and adjusting the preset photographing frequency according to the moving speed of the vehicle to be recognized; controlling the linear array camera to continuously photograph the vehicle to be recognized at the adjusted preset photographing frequency to obtain a plurality of linear array images of the vehicle to be recognized.
[0090] On this basis, the performing distortion correction on the plurality of linear array images based on the moving speed of the vehicle to be recognized to obtain a plurality of corrected images may include: performing horizontal compression or horizontal stretching processing on each linear array image based on the moving speed of the vehicle to be recognized when each linear array image is captured and combined with the moving speeds determined by the preset photographing frequencies respectively corresponding to the respective moving speeds to obtain a plurality of corrected images. It should be noted that the specific stretching and compression processing procedures will be described in detail below, so they will not be elaborated here.
[0091] Since the plurality of linear array images obtained by the linear array camera contain a large amount of information, the vehicle model and license plate number of the vehicle can be recognized simultaneously based on the plurality of linear array images; in addition, since the linear array camera is small in size, it is convenient for installation and debugging, reducing the installation and debugging costs.
[0092] In addition, when the environmental brightness is low, if the exposure time of the linear array camera is too short, the clarity of the image will be low. When the environmental brightness is high, the exposure time of the linear array camera is long. Therefore, in order to obtain a linear array image with higher clarity on the premise of reducing power consumption, the method may further include: obtaining the brightness of the photographing environment in real time, and adjusting the exposure time of the linear array camera according to the brightness of the photographing environment. In this exemplary embodiment, the brightness of the photographing environment is negatively correlated with the exposure time of the linear array camera. Specifically, when the brightness of the photographing environment is low, the exposure time of the linear array camera is increased, and when the brightness of the photographing environment is high, the exposure time of the linear array camera is shortened.
[0093] In addition, in order to obtain a clearer image, it is necessary to supplement light to the object. Currently, when the linear array camera is applied to image acquisition of large objects, since the light supplement distance is relatively far, a laser light source is basically used to supplement light to the object. However, since the laser light source is a monochromatic light source, the object image obtained by using the laser light source is a black and white image, and using the laser light source to supplement light to the object will harm the human eye. Therefore, in order to obtain a color image without harming the human eye, the photographing the vehicle to be recognized by the linear array camera to obtain a plurality of linear array images of the vehicle to be recognized may include:
[0094] A light-emitting diode light source is provided. In the working mode, the light-emitting diode light source is controlled to work in a manner of enhancing the luminous brightness and combining high-frequency flashing; in the working mode of the light-emitting diode light source, a line array camera is used to take pictures of the vehicle to be recognized to obtain a plurality of line array images of the vehicle to be recognized. In this exemplary embodiment, the high frequency refers to not less than 1000 Hz, such as 2500 Hz, 3000 Hz, etc. In one embodiment, the flashing frequency of the light-emitting diode light source is 1 KHz - 10 KHz. In this exemplary embodiment, since the light-emitting diode light source is a white light source, a color image can be obtained after the object is filled with light by the light-emitting diode light source. By controlling the light-emitting diode to work in a manner of enhancing the luminous brightness and combining high-frequency flashing, the requirements for the filling light brightness can be met, the power consumption can be reduced, and the human eyes can be not damaged.
[0095] Furthermore, since the light-emitting diode light source in this exemplary embodiment is applied to vehicle recognition and needs to fill light at a long distance, the light-emitting diode light source with a narrow light-emitting angle is adopted. In this exemplary embodiment, the narrow light-emitting angle means less than 30 degrees of the light-emitting angle; such as 15 degrees, 10 degrees, 7 degrees, etc. The light-emitting diode light source with a narrow light-emitting angle can be a plurality of light-emitting diodes arranged in a straight line in the vertical direction, and the light-emitting diode light source with a narrow light-emitting angle can also be a plurality of light-emitting diodes arranged in a spherical shape, and two reflecting plates are arranged outside the plurality of light-emitting diodes arranged in a spherical shape, and the included angle between the two reflecting plates is narrow, so that the light-emitting angle of the plurality of light-emitting diodes arranged in a spherical shape is narrow. In addition, it should be noted that the light-emitting diode light source with a narrow light-emitting angle in this exemplary embodiment is not limited to this, and the light-emitting diode with a narrow light-emitting angle realized by other methods also belongs to the protection scope of the present disclosure.
[0096] In step S2, the plurality of line array images are subjected to distortion correction based on the moving speed of the vehicle to be recognized to obtain a plurality of corrected images.
[0097] In this exemplary embodiment, while the line array camera continuously takes pictures of the vehicle to be recognized, the moving speed of the vehicle to be recognized when each line array image is taken is obtained in real time through the vehicle speed measurement module; then each corresponding line array image is corrected according to the moving speed of the vehicle to be recognized when each line array image is taken to obtain a plurality of corrected images.
[0098] There are various ways for the vehicle speed measurement module to obtain the moving speed of the vehicle to be recognized. For example, the moving speed of the vehicle to be recognized can be directly measured by a speed sensor such as a speed radar. For another example, the moments when the vehicle to be recognized passes through two position sensors can also be measured by two inductive loop sensors and / or optoelectronic switches and / or electronic light curtains and the like, and the moving speed of the vehicle to be recognized can be measured based on the distance between the two position sensors.
[0099] Since the shooting frequency of the line array camera is very high, the difference in the moving speed of the vehicle to be recognized when shooting adjacent multiple line array images is not large. Based on this, the moving speed of the vehicle to be recognized can be obtained once every a preset number of line array images. Taking 5 adjacent line array images as an example of the preset number of line array images, first, the moving speed of the vehicle to be recognized when shooting the first line array image is obtained. Next, the moving speed of the vehicle to be recognized is obtained once every 5 adjacent line array images, that is, the moving speed of the vehicle to be recognized when shooting the seventh line array image is obtained. Then, the moving speed of the vehicle to be recognized when shooting the thirteenth line array image is obtained. The above steps are repeated until the photographing of the vehicle to be recognized is completed. It should be noted that the moving speeds corresponding to the first line array image to the sixth line array image are all the same, and are all the moving speed of the vehicle to be recognized when shooting the first line array image. The moving speeds corresponding to the seventh line array image to the twelfth line array image are all the same, and are all the moving speed of the vehicle to be recognized when shooting the seventh line array image. And so on, the moving speeds corresponding to the subsequent line array images taken all conform to the above rules. Through the above method, the workload of the vehicle speed measurement module can be reduced without affecting the measurement accuracy, and the speed measurement cost is reduced.
[0100] In addition, when the line array camera obtains multiple line array images of the vehicle to be recognized at a preset photographing frequency, the distortion correction of the multiple line array images based on the moving speed of the vehicle to be recognized to obtain multiple corrected images may include: respectively obtaining the moving speed of the vehicle to be recognized when shooting each of the line array images; respectively performing horizontal compression or horizontal stretching processing on each of the line array images based on the moving speed of the vehicle to be recognized when shooting each of the line array images and combined with the moving speed determined by the preset photographing frequency to obtain multiple corrected images.
[0101] In this exemplary embodiment, since the specific method for obtaining the moving speed of the vehicle to be recognized when capturing each linear array image has been described in detail in step S2, it will not be elaborated here. During the process of the linear array camera taking pictures of the vehicle to be recognized, according to the different moving speeds of the vehicle to be recognized, the area of the vehicle to be recognized included in a single linear array image is different. Specifically, when the moving speed of the vehicle to be recognized is relatively high, the area of the vehicle to be recognized included in a single linear array image is relatively large; when the moving speed of the vehicle to be recognized is relatively low, the area of the vehicle to be recognized included in a single linear array image is relatively small. Also, since the size of each linear array image is the same, therefore, when the area of the vehicle to be recognized included in a single linear array image is relatively large, there is an effect of compressing the linear array image visually; when the area of the vehicle to be recognized included in a single linear array image is relatively small, there is an effect of stretching the linear array image visually.
[0102] On this basis, when obtaining the moving speed of the vehicle to be recognized when capturing the linear array image, if the moving speed of the vehicle to be recognized when capturing this linear array image is greater than the moving speed determined by the preset photographing frequency, perform a horizontal stretching process on this linear array image; if the moving speed of the vehicle to be recognized when capturing this linear array image is less than the moving speed determined by the preset photographing frequency, perform a horizontal compressing process on this linear array image.
[0103] Through the above method, even when the moving speed of the vehicle to be recognized keeps changing when obtaining multiple linear array images of the vehicle to be recognized, the influence of the moving speed of the vehicle to be recognized on the image can be eliminated by the above method of performing distortion correction on multiple linear array images, reducing the deformation of each linear array image, thereby improving the accuracy of vehicle type and license plate number recognition.
[0104] In step S3, combine the multiple corrected images to obtain the body image of the vehicle to be recognized.
[0105] In this exemplary embodiment, multiple corrected images can be combined based on the chronological order of their shooting times to obtain the body image of the vehicle to be recognized. Figure 2 shows the body image of the vehicle to be recognized obtained through the above steps S1 to S3. From Figure 2 it can be clearly recognized that the vehicle to be recognized is a container truck, as well as the character information on the container. Among them, the character information on the container of the container truck includes: Beijing Foreign Trade Automobile Transportation Company and the contact phone number 010 - 85367654.
[0106] It should be noted that in other exemplary embodiments of the present disclosure, multiple line array images can also be combined based on the chronological order of the shooting times of the line array images to obtain a body image without distortion correction, and then the body image without distortion correction can be corrected for distortion based on the moving speed of the vehicle to be recognized when each line array image is shot to obtain a body image with distortion correction.
[0107] In step S4, the vehicle type of the vehicle to be recognized in the body image is recognized based on the first pattern recognition algorithm.
[0108] In this exemplary embodiment, the first pattern recognition algorithm can be any one of the nearest neighbor algorithm, Bayesian algorithm, principal component analysis algorithm, linear discriminant analysis algorithm, Gaussian mixture model, etc., and can be specifically determined according to the characteristics of the project. The vehicle types of the vehicle to be recognized can include trucks, lorries, sedans, buses, etc., and this exemplary embodiment does not make special limitations on this. The following takes the nearest neighbor algorithm as an example to illustrate step S4. The process of recognizing the vehicle type of the vehicle to be recognized in the body image based on the nearest neighbor algorithm can include: calculating the distance between the point corresponding to the vehicle to be recognized and each point in the dataset of known vehicle types; selecting the k points with the smallest distance from the point corresponding to the vehicle to be recognized, counting the probability of the occurrence of the sample vehicles of each vehicle type among the k points, and determining the vehicle type with the highest probability as the vehicle type of the vehicle to be recognized. It should be noted that the above dataset of known vehicle types includes datasets of various vehicle types such as datasets of sedans, lorries, trucks, and buses to achieve the recognition of various vehicle types.
[0109] In step S5, the license plate number of the vehicle to be recognized in the body image is recognized based on the second pattern recognition algorithm.
[0110] In this exemplary embodiment, the second pattern recognition algorithm can be any one of a proximity algorithm, a Bayesian algorithm, a principal component analysis algorithm, a linear discriminant analysis algorithm, a Gaussian mixture model, etc., and can be specifically determined according to the particularity of the project. The vehicle number can be character information in the vehicle body image, where the character information includes at least one of literal characters, numeric characters, and alphabetic characters. Hereinafter, step S5 will be described by taking the proximity algorithm as an example. The process of recognizing the vehicle number of the vehicle to be recognized in the vehicle body image based on the proximity algorithm may include: intercepting a character image to be recognized of the vehicle to be recognized in the vehicle body image, and respectively calculating the distances between the points corresponding to the character image to be recognized and each point in the dataset of known characters; selecting k points with the smallest distances from the points corresponding to the character image to be recognized, counting the probabilities of the sample characters in the same dataset among the k points, and determining the character in the dataset with the highest probability as the character corresponding to the character image to be recognized, and repeating the above steps until the recognition of the vehicle number of the vehicle to be recognized in the vehicle body image is completed. It should be noted that the dataset of the above-known characters includes a numeric character dataset, an alphabetic character dataset, and a literal character dataset to achieve the recognition of different characters.
[0111] In addition, the recognition of the vehicle number of the vehicle to be recognized in the vehicle body image based on the second pattern recognition algorithm may include: determining whether the vehicle type of the vehicle to be recognized is a preset vehicle type; when it is determined that the vehicle type of the vehicle to be recognized is the preset vehicle type, recognizing the vehicle number of the vehicle to be recognized in the vehicle body image based on the second pattern recognition algorithm.
[0112] In this exemplary embodiment, since in vehicle safety inspections, it is only necessary to recognize the vehicle numbers of vehicles to be recognized such as trucks and lorries that can carry goods, in order to bind the vehicle numbers of the vehicles to be recognized and the inspection results, while vehicle numbers of vehicles to be recognized such as cars and buses that carry people do not need to be recognized. Therefore, when the vehicle type of the vehicle to be recognized in the vehicle body image is recognized, it can be determined whether the vehicle type of the vehicle to be recognized is a preset vehicle type according to the vehicle type judgment module, and when it is determined that the vehicle type of the vehicle to be recognized is the preset vehicle type, the vehicle number of the vehicle to be recognized in the vehicle body image is recognized. The preset vehicle type can be a vehicle that can carry goods such as a truck, and the vehicle number can be character information on a vehicle that can carry goods such as a truck. Through the above judgment mechanism, vehicles to be recognized that need vehicle number recognition can be screened out, reducing the workload of vehicle number recognition and thus reducing the cost of vehicle number recognition.
[0113] It should be noted that although the steps of the methods in the present disclosure are described in a specific order in the accompanying drawings, this does not require or imply that these steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step for execution, and / or one step may be decomposed into multiple steps for execution, etc.
[0114] In an exemplary embodiment of the present disclosure, a vehicle recognition device is further provided. As Figure 3 shown, the vehicle recognition device 100 may include: an image acquisition module 101, a distortion correction module 102, an image combination module 103, a first recognition module 104, and a second recognition module 105, where:
[0115] The image acquisition module 101 may be configured to take pictures of the vehicle to be recognized using a line array camera to obtain a plurality of line array images of the vehicle to be recognized;
[0116] The distortion correction module 102 may be configured to perform distortion correction on the plurality of line array images based on the movement speed of the vehicle to be recognized to obtain a plurality of corrected images;
[0117] The image combination module 103 may be configured to combine the plurality of corrected images to obtain a body image of the vehicle to be recognized;
[0118] The first recognition module 104 may be configured to recognize the vehicle type of the vehicle to be recognized in the body image based on a first pattern recognition algorithm; and
[0119] The second recognition module 105 may be configured to recognize the license plate number of the vehicle to be recognized in the body image based on a second pattern recognition algorithm.
[0120] In an exemplary embodiment of the present disclosure, the image acquisition module may include:
[0121] A supplementary light unit for providing a light-emitting diode light source, where, in the working mode, the light-emitting diode light source is controlled to work in a manner of enhancing the light-emitting brightness and combining high-frequency flickering;
[0122] An image acquisition unit for taking pictures of the vehicle to be recognized using a line array camera to obtain a plurality of line array images of the vehicle to be recognized in the working mode of the light-emitting diode light source.
[0123] In an exemplary embodiment of the present disclosure, the light-emitting diode light source may adopt a light-emitting diode light source with a narrow light-emitting angle.
[0124] In an exemplary embodiment of the present disclosure, the device may further include:
[0125] An adjustment module, configured to obtain the brightness of the photographing environment in real time, and adjust the exposure time of the line array camera according to the brightness of the photographing environment.
[0126] In an exemplary embodiment of the present disclosure, the image acquisition module may include:
[0127] An image acquisition unit, configured to control the line array camera to continuously photograph the vehicle to be recognized at a preset photographing frequency to obtain a plurality of line array images of the vehicle to be recognized.
[0128] In an exemplary embodiment of the present disclosure, the distortion correction module may include:
[0129] A speed acquisition unit, configured to respectively acquire the moving speed of the vehicle to be recognized when each of the line array images is taken;
[0130] A distortion correction unit, configured to respectively perform horizontal compression or horizontal stretching processing on each of the line array images based on the moving speed of the vehicle to be recognized when each of the line array images is taken and in combination with the moving speed determined by the preset photographing frequency to obtain a plurality of corrected images.
[0131] In an exemplary embodiment of the present disclosure, the image acquisition unit may include:
[0132] A speed acquisition sub-unit, configured to acquire the moving speed of the vehicle to be recognized in real time, and adjust the preset photographing frequency according to the moving speed of the vehicle to be recognized;
[0133] An image acquisition sub-unit, configured to control the line array camera to continuously photograph the vehicle to be recognized at the adjusted preset photographing frequency to obtain a plurality of line array images of the vehicle to be recognized.
[0134] In an exemplary embodiment of the present disclosure, both the first pattern recognition algorithm and the second pattern recognition algorithm are one of a nearest neighbor algorithm, a Bayesian algorithm, a principal component analysis algorithm, a linear discriminant analysis algorithm, and a Gaussian mixture model.
[0135] In an exemplary embodiment of the present disclosure, the second recognition module may include:
[0136] A judgment unit, configured to judge whether the vehicle type of the vehicle to be recognized is a preset vehicle type;
[0137] A recognition unit, configured to, when it is judged that the vehicle type of the vehicle to be recognized is the preset vehicle type, recognize the vehicle number of the vehicle to be recognized in the vehicle body image based on the second pattern recognition algorithm.
[0138] In an exemplary embodiment of the present disclosure, the preset vehicle type is a truck.
[0139] The specific details of each vehicle identification device module described above have been described in detail in the corresponding vehicle identification method, and thus will not be elaborated here.
[0140] It should be noted that although several modules or units of a device for execution are mentioned in the above detailed description, such a division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above may be embodied in one module or unit. Conversely, the features and functions of one module or unit described above may be further divided and embodied by multiple modules or units.
[0141] According to one aspect of the present disclosure, there is provided a vehicle inspection system, which may include the vehicle identification device described in any one of the above.
[0142] In the present exemplary embodiment, for example, the above vehicle inspection system may include a vehicle identification device, a control system, and a radiation imaging system. Among them, the vehicle identification device may be used to identify the vehicle model and vehicle number of the vehicle to be identified. The control system may be used to determine the head position of the vehicle to be identified according to the vehicle model of the vehicle to be identified, and control the radiation source to emit radiation to irradiate the vehicle to be identified according to the head position. The radiation imaging device may include a radiation source for emitting radiation, a detector for detecting the radiation passing through the vehicle to be identified and / or the scattered radiation, and an imaging unit for imaging the vehicle to be identified according to the radiation detected by the detector. As described above, when the vehicle to be identified enters the detection channel, first, the vehicle identification device identifies the vehicle model and vehicle number of the vehicle, and then, the control system may determine the head position of the vehicle to be identified according to the vehicle model of the vehicle to be identified (as Figure 4 shown), and control the radiation source to emit radiation to irradiate the vehicle to be identified according to the head position. When the head of the vehicle to be identified enters the radiation scanning area, the control system controls the radiation source to scan with a low dose or not to scan. When the carriage of the vehicle to be identified enters the radiation scanning area, the control system controls the radiation source to scan with a higher dose. Finally, the radiation imaging system images the vehicle to be identified according to the radiation detected by the detector to obtain an inspection image of the carriage to be identified, and binds the vehicle number of the vehicle to be identified with the inspection image, thereby completing the inspection of the vehicle to be identified.
[0143] In the exemplary embodiment of the present disclosure, there is also provided an electronic device capable of implementing the above method.
[0144] Those skilled in the art can understand that various aspects of the present invention can be implemented as a system, a method, or a program product. Therefore, various aspects of the present invention can be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software aspects, which can be collectively referred to as "circuit", "module", or "system" here.
[0145] Reference will be made hereinafter Figure 5 to describe the electronic device 600 according to this embodiment of the present invention. Figure 5 The shown electronic device 600 is only an example and should not impose any limitation on the functions and the scope of use of the embodiments of the present invention.
[0146] As Figure 5 shown, the electronic device 600 is presented in the form of a general-purpose computing device. The components of the electronic device 600 may include, but are not limited to: at least one of the above-mentioned processing units 610, at least one of the above-mentioned storage units 620, a bus 630 connecting different system components (including the storage unit 620 and the processing unit 610), and a display unit 640.
[0147] Among them, the storage unit stores program codes, and the program codes can be executed by the processing unit 610, so that the processing unit 610 executes the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of this specification. For example, the processing unit 610 can execute steps such as Figure 1 shown in: Step S1, photographing the vehicle to be recognized by using a linear array camera to obtain a plurality of linear array images of the vehicle to be recognized; Step S2, performing distortion correction on the plurality of linear array images based on the moving speed of the vehicle to be recognized to obtain a plurality of corrected images; Step S3, combining the plurality of corrected images to obtain a body image of the vehicle to be recognized; Step S4, recognizing the vehicle type of the vehicle to be recognized in the body image based on a first pattern recognition algorithm; and Step S5, recognizing the license plate number of the vehicle to be recognized in the body image based on a second pattern recognition algorithm.
[0148] The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 6201 and / or a cache storage unit 6202, and may further include a read-only storage unit (ROM) 6203.
[0149] The storage unit 620 may also include a program / utility 6204 having a set (at least one) of program modules 6205. Such program modules 6205 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment.
[0150] The bus 630 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus structures.
[0151] The electronic device 600 may also communicate with one or more external devices 700 (such as a keyboard, a pointing device, a Bluetooth device, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 600, and / or may communicate with any device that enables the electronic device 600 to communicate with one or more other computing devices (such as a router, a modem, etc.). Such communication may be carried out through the input / output (I / O) interface 650. Also, the electronic device 600 may communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through the network adapter 660. As shown in the figure, the network adapter 660 communicates with other modules of the electronic device 600 through the bus 630. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0152] Through the description of the above embodiments, those skilled in the art can easily understand that the example embodiments described herein can be implemented by software, or can be implemented by a combination of software and necessary hardware. Therefore, the technical solutions according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which may be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
[0153] In an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium having a program product stored thereon that can implement the methods described above in this specification. In some possible implementation manners, various aspects of the present invention can also be implemented in the form of a program product, which includes program code. When the program product runs on a terminal device, the program code is used to cause the terminal device to execute the steps according to various exemplary embodiments of the present invention described in the "Exemplary Method" section above in this specification.
[0154] Reference Figure 6 As shown, a program product 800 for implementing the above method according to an embodiment of the present invention is described. It can be a portable compact disc read-only memory (CD-ROM) and includes program code, and can run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0155] The program product can adopt any combination of one or more readable media. The readable media can be a readable signal medium or a readable storage medium. A readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0156] A computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries the readable program code. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable signal medium can also be any readable medium other than the readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0157] The program code contained on the readable media can be transmitted using any appropriate medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination of the above.
[0158] The program code for performing the operations of the present invention can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and also including conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, executed as a stand-alone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., by using an Internet service provider to connect through the Internet).
[0159] In addition, the above-mentioned drawings are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present invention, and are not for limiting purposes. It is easy to understand that the processes shown in the above-mentioned drawings do not indicate or limit the chronological order of these processes. Additionally, it is also easy to understand that these processes can be executed synchronously or asynchronously in, for example, multiple modules.
[0160] Those skilled in the art will readily conceive of other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include known common knowledge or conventional technical means in the technical field not disclosed in the present disclosure. The specification and embodiments are only regarded as exemplary, and the true scope and spirit of the present disclosure are pointed out by the claims.
[0161] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only limited by the appended claims.
Claims
1. A vehicle image correction method, characterized in that, Including: Using a linear array camera to take pictures of the vehicle to be recognized to obtain a plurality of linear array images of the vehicle to be recognized; Respectively obtaining the moving speed of the vehicle to be recognized when each of the linear array images is taken; Based on the moving speed of the vehicle to be recognized when each of the linear array images is taken and combined with the moving speed determined by a preset photographing frequency, respectively performing horizontal compression or horizontal stretching processing on each of the linear array images to obtain a plurality of corrected images; And Combining the plurality of corrected images to obtain a body image of the vehicle to be recognized.
2. The vehicle image correction method according to claim 1, wherein After combining the plurality of corrected images to obtain a body image of the vehicle to be recognized, Recognizing the vehicle type of the vehicle to be recognized in the body image based on a first pattern recognition algorithm; and Recognizing the license plate number of the vehicle to be recognized in the body image based on a second pattern recognition algorithm.
3. The vehicle image correction method according to claim 1, characterized in that The using a linear array camera to take pictures of the vehicle to be recognized to obtain a plurality of linear array images of the vehicle to be recognized includes: Controlling the linear array camera to continuously take pictures of the vehicle to be recognized at a preset photographing frequency to obtain a plurality of linear array images of the vehicle to be recognized.
4. The vehicle image correction method according to claim 3, wherein The controlling the linear array camera to continuously take pictures of the vehicle to be recognized at a preset photographing frequency to obtain a plurality of linear array images of the vehicle to be recognized includes: Real-time obtaining the moving speed of the vehicle to be recognized, and adjusting the preset photographing frequency according to the moving speed of the vehicle to be recognized; Controlling the linear array camera to continuously take pictures of the vehicle to be recognized at the adjusted preset photographing frequency to obtain a plurality of linear array images of the vehicle to be recognized.
5. A vehicle image correction device, characterized in that, Including: An image acquisition module, configured to use a linear array camera to take pictures of the vehicle to be recognized to obtain a plurality of linear array images of the vehicle to be recognized; A distortion correction module, including a speed acquisition unit and a distortion correction unit, the speed acquisition unit is configured to respectively obtain the moving speed of the vehicle to be recognized when each of the linear array images is taken; the distortion correction unit is configured to respectively perform horizontal compression or horizontal stretching processing on each of the linear array images based on the moving speed of the vehicle to be recognized when each of the linear array images is taken and combined with the moving speed determined by a preset photographing frequency to obtain a plurality of corrected images; And An image combination module, configured to combine the plurality of corrected images to obtain a body image of the vehicle to be recognized.
6. The vehicle image correction device according to claim 5, wherein Further including: A first recognition module, configured to recognize the vehicle type of the vehicle to be recognized in the body image based on a first pattern recognition algorithm; And A second recognition module, configured to recognize the license plate number of the vehicle to be recognized in the body image based on a second pattern recognition algorithm.
7. The vehicle image correction device according to claim 5, wherein The image acquisition module includes: An image acquisition unit, configured to control the linear array camera to continuously take pictures of the vehicle to be recognized at a preset photographing frequency to obtain a plurality of linear array images of the vehicle to be recognized.
8. The vehicle image correction device according to claim 7, wherein The image acquisition unit includes: A speed acquisition subunit, configured to real-time obtain the moving speed of the vehicle to be recognized, and adjust the preset photographing frequency according to the moving speed of the vehicle to be recognized; An image acquisition subunit, configured to control the line array camera to continuously take pictures of the vehicle to be recognized according to the adjusted preset photographing frequency, so as to obtain a plurality of line array images of the vehicle to be recognized.
9. A vehicle inspection system, characterized in that, The system includes the vehicle image correction device according to any one of claims 5 to 8.