Vehicle monitoring method and system for capturing license plates by mobile device
By filtering and correcting pixels in license plate images and adjusting local clarity, the problem of inconsistent license plate image clarity was solved, enabling accurate extraction of license plate information and improving the effectiveness of vehicle monitoring.
Patent Information
- Application Number
- CN202311728530.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-15
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2043-12-15
AI Technical Summary
In existing technologies, the image clarity is inconsistent due to the high speed of vehicles and the influence of environmental noise during the license plate image acquisition process, making it difficult to accurately determine the optimal license plate image and affecting the vehicle monitoring effect.
By acquiring continuous single-frame license plate images, the local sharpness is determined using gradient category and gradient distribution. Pixels are then selected and corrected based on trend differences within the neighborhood of each pixel to adjust the local sharpness and ultimately obtain the overall sharpness. The optimal license plate image is then selected for blur restoration and information extraction.
It improves the overall clarity of license plate images, ensures accurate acquisition of license plate information, and enhances the efficiency and effectiveness of vehicle monitoring.
Smart Images

Figure CN117690120B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent transportation Internet of Things application services, and in particular to a vehicle monitoring method and system for capturing license plates by a mobile device. Background Art
[0002] The traffic Internet of Things is an important tool for urban traffic management. It can use speed meters and other devices in the Internet of Things equipment to determine the basic traffic information of vehicles, and then identify the vehicles involved. The law enforcement personnel's law enforcement recorders, drones and other mobile devices can capture license plate information in real time, effectively monitor road traffic conditions, and assist in traffic management.
[0003] However, in actual implementation scenarios, the collected license plate information often appears blurred because of the fast driving of vehicles on the road. In the process of restoring the blurred license plate image, the restoration effect is often limited by the clarity of the image itself. In the actual vehicle acquisition process, the collected image is a single-frame image of multiple consecutive frames. The position of the vehicle in different frames is different, so the effect of being affected by the vehicle speed is also different, that is, the corresponding clarity is also different. Therefore, it is necessary to select the best license plate image from the multiple frames for blur restoration. The existing technology can determine the clarity of the image through the gradient distribution in the image, but due to the shape of the vehicle on the road, the license plate area will be affected by environmental noise such as light, resulting in changes in the gradient distribution. The optimal license plate image cannot be determined based only on the image clarity determined by the gradient distribution, which makes it difficult to obtain license plate information and affects the monitoring of the vehicle involved. Summary of the invention
[0004] In order to solve the technical problem that the prior art cannot accurately obtain image clarity and thus cannot determine the optimal license plate image for license plate information extraction, which affects vehicle monitoring, the purpose of the present invention is to provide a vehicle monitoring method and system for capturing license plates by a mobile device. The technical solutions adopted are as follows:
[0005] The present invention proposes a vehicle monitoring method for capturing license plates by a mobile device, the method comprising:
[0006] Acquire a set of license plate images of a vehicle captured by a mobile device during driving; the set of license plate images is composed of continuous single-frame license plate images;
[0007] In each of the license plate images, the gradient category within a preset neighborhood range of each pixel point is obtained, and the local clarity of the pixel point corresponding to the neighborhood range is obtained according to the gradient difference and gradient distribution between the gradient categories; the pixel value change trend of each position within the preset neighborhood range of each pixel point is obtained, and the trend difference degree of the pixel value change trend at the corresponding position within the neighborhood range between each pixel point and other pixel points is obtained; according to the trend difference degree and the local clarity of the other pixel points, the correction pixel point corresponding to each pixel point is screened out from the other pixel points;
[0008] According to the trend difference between each pixel and the corresponding corrected pixel, and the local clarity of the corresponding corrected pixel, the local clarity of each pixel is adjusted to obtain the corrected clarity of each pixel; according to the corrected clarity of each pixel in each license plate image, the overall clarity of each license plate image is obtained;
[0009] In the license plate image set, the best license plate image is screened out according to the overall clarity and fuzzy restoration is performed to obtain a clear license plate image, and the license plate information of the clear license plate image is extracted.
[0010] Furthermore, the method for acquiring the license plate image set includes:
[0011] A vehicle video of a vehicle in a driving process is obtained, and each video frame image in the vehicle video is processed using a semantic segmentation network to obtain a license plate image and form the license plate image set.
[0012] Furthermore, the method for obtaining the gradient category includes:
[0013] The gradient value within the neighborhood of each pixel point is divided into two categories using the Otsu threshold segmentation algorithm to obtain the gradient category.
[0014] Furthermore, the method for obtaining the local clarity includes:
[0015] Within the neighborhood range, the difference in average gradient values between the gradient category with the largest average gradient value and the gradient category with the smallest average gradient value is taken as the gradient range; the gradient difference between each neighborhood pixel point within the neighborhood range and the average gradient value of the gradient category to which it belongs is taken as the gradient deviation; the average gradient deviation of all neighborhood pixels within the neighborhood range is obtained, and the result of negative correlation mapping and normalization of the average gradient deviation is multiplied by the gradient range to obtain the local clarity.
[0016] Furthermore, the method for obtaining the trend difference degree includes:
[0017] The gradient value difference between each neighborhood pixel point and the adjacent neighborhood pixel point within the neighborhood range of each pixel point is processed using a sign function to obtain a change trend characteristic value of each neighborhood pixel point; the change trend characteristic value difference between the neighborhood pixel points at the same position within the neighborhood range of two pixel points is obtained, and after averaging the change trend characteristic value differences, the trend difference degree between the two pixel points is obtained.
[0018] Furthermore, the method for obtaining the corrected pixel point includes:
[0019] For each pixel point, obtain the trend difference degree between each pixel point and the other pixel points, negatively correlate the trend difference degree and multiply it by the local clarity corresponding to the other pixel points to obtain the correction standard screening index corresponding to the other pixel points, and select the other pixel point corresponding to the largest correction standard screening index as the correction pixel point of the corresponding pixel point.
[0020] Furthermore, the method for obtaining the corrected clarity includes:
[0021] The modified clarity is obtained according to a modified clarity formula, wherein the modified clarity formula includes:
[0022] H z =A z +max[(A s' -A z ),0]×exp(-E zs' ), where H z is the corrected clarity of the z-th pixel, A z is the local definition of the z-th pixel, A s' is the local definition of the corrected pixel, max[] is the maximum value selection function, exp() is an exponential function with a natural constant as the base, E zs' The degree of trend difference between the zth pixel and the corresponding corrected pixel.
[0023] Furthermore, the method for obtaining the overall clarity includes:
[0024] The average value of the local clarity of all pixels in the license plate image is taken as the overall clarity.
[0025] Further, the step of selecting the best license plate image according to the overall clarity and extracting the license plate information of the best license plate image includes:
[0026] The license plate image corresponding to the maximum overall clarity is taken as the optimal license plate image, the motion blurred image restoration model PSF is used to process the optimal license plate image to obtain a clear license plate image, and the license plate information in the clear license plate image is extracted using OCR technology.
[0027] The present invention also proposes a vehicle monitoring system for capturing license plates by a mobile device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the vehicle monitoring method for capturing license plates by a mobile device are implemented.
[0028] The present invention has the following beneficial effects:
[0029] The present invention first determines the initial local clarity based on the gradient information within the neighborhood of each pixel in the image. Considering that the license plate area is affected by the environment such as lighting, the local clarity obtained by some pixels will be lower. Therefore, by determining the trend difference degree of the pixel value change trend, and combining the local clarity of other pixels, the correction pixel corresponding to each pixel is found. That is, the correction pixel can be used to correct the local clarity of the corresponding pixel, because its pixel value change trend is similar and has good clarity characteristics. Therefore, by correcting the local clarity, the correction clarity avoids the influence of lighting, and then the accurate overall clarity of the image can be obtained, the optimal license plate image is screened out and the license plate information is extracted, which is convenient for monitoring the vehicle involved. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0031] Figure 1 A flow chart of a vehicle monitoring method for capturing license plates by a mobile device provided by an embodiment of the present invention;
[0032] Figure 2 A schematic diagram of a clear license plate image provided by an embodiment of the present invention;
[0033] Figure 3 A schematic diagram of a blurred license plate image provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0034] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the vehicle monitoring method and system for capturing license plates with a mobile device according to the present invention, in combination with the accompanying drawings and preferred embodiments, as well as its specific implementation, structure, features and effects. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0035] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0036] The specific scheme of a vehicle monitoring method and system for capturing license plates by a mobile device provided by the present invention is described in detail below with reference to the accompanying drawings.
[0037] See also Figure 1 , which shows a flow chart of a vehicle monitoring method for capturing license plates by a mobile device provided by an embodiment of the present invention, the method comprising:
[0038] Step S1: Acquire a set of license plate images of a vehicle captured by a mobile device during driving; the license plate image set consists of continuous single-frame license plate images.
[0039] In the process of traffic law enforcement, IoT devices such as speedometers can be used to identify the vehicles involved, and mobile devices can be used to capture a collection of license plate images of vehicles in motion. It should be noted that in the process of conventional traffic image acquisition, a video of the vehicle or multiple consecutive frames of vehicle images are usually collected, so the license plate image collection is composed of consecutive single-frame license plate images. The number of license plate images included in the specific collection can be determined based on factors such as the image acquisition time set by the camera, the video frame rate or the image acquisition frequency, the vehicle speed, etc., and is not limited here.
[0040] It should be noted that mobile devices include patrol drones or law enforcement recorders used by law enforcement personnel. Compared with fixed camera devices, mobile devices have stronger real-time data collection capabilities. By connecting to the transportation Internet of Things, the captured image data can be directly uploaded to the Internet of Things and subsequent license plate information can be extracted.
[0041] Preferably, in one embodiment of the present invention, the initial information collected by the mobile device includes all the information of the vehicle, and the license plate information is only a part of the information. In order to facilitate the subsequent processing process, the vehicle video of the vehicle during driving is obtained, and each video frame image in the vehicle video is processed using a semantic segmentation network to obtain a license plate image and form a license plate image set. It should be noted that the semantic segmentation network is a technical means well known to those skilled in the art. The specific network structure and training method are not described in detail here. Only a brief overview of the training process in one embodiment of the present invention is given:
[0042] (1) Use vehicle images containing license plate areas as training data. Label the pixels in the license plate area as 1 and other pixels as 0 to obtain label data.
[0043] (2) The semantic segmentation network adopts an encoding-decoding structure, and the training data and label data are normalized and then input into the network.
[0044] The semantic segmentation encoder is used to extract the features of the input data and obtain the feature map. The semantic segmentation decoder samples and transforms the feature map and outputs the semantic segmentation result.
[0045] (3) The cross entropy loss function is used to train the network.
[0046] In one embodiment of the present invention, in order to facilitate subsequent image processing operations, the license plate image is converted into a grayscale image, and the gradient value of each pixel is obtained using the Sobel operator. It should be noted that the grayscale image conversion method and the method of obtaining the gradient value using the Sobel operator are both technical means well known to those skilled in the art, and will not be described in detail here.
[0047] Step S2: In each license plate image, obtain the gradient category within the preset neighborhood range of each pixel point, and obtain the local clarity of the corresponding pixel point in the neighborhood range according to the gradient difference and gradient distribution between the gradient categories; obtain the pixel value change trend of each position within the preset neighborhood range of each pixel point, and obtain the trend difference degree of the pixel value change trend of the corresponding position in the neighborhood range between each pixel point and other pixel points; according to the trend difference degree and the local clarity of other pixel points, select the corrected pixel point corresponding to each pixel point from other pixel points.
[0048] For license plate information, in order to make the number on the license plate eye-catching enough, there is a clear difference between the base color of the license plate and the color of the number, such as the base color of the license plate is blue and the number is white. For a clear image, there will be a relatively obvious and strong edge information between the number information and the base color of the license plate, with a large gradient value at the edge, and the gradient value at the edge is relatively uniform, and the gradient information is clearly distributed. Please refer to Figure 2, which shows a schematic diagram of a clear license plate image provided by an embodiment of the present invention. As for the blurred license plate image, due to the high-speed movement of the vehicle, the edge information in the license plate area becomes blurred, thereby reducing the gradient of the real edge position between the number information and the license plate background in the image, and increasing the gradient value of the non-real edge position within the real edge neighborhood, resulting in pseudo-edge information. Please refer to Figure 3 , which shows a schematic diagram of a blurred license plate image provided by an embodiment of the present invention.
[0049] According to the gradient change characteristics of the blurred license plate image relative to the clear license plate, the local clarity corresponding to the pixel point can be determined by using the gradient information within the neighborhood of each pixel point in the license plate image. In order to more clearly obtain the gradient distribution within the neighborhood, the embodiment of the present invention first obtains the gradient category within the neighborhood, and obtains the local clarity of the corresponding pixel point based on the gradient difference and gradient distribution between the categories. The means of obtaining the difference through classification can more clearly and accurately determine the gradient distribution within the neighborhood, so that the obtained local clarity can more effectively represent the corresponding gradient information.
[0050] In one embodiment of the present invention, the neighborhood range is set to 7×7.
[0051] Preferably, in one embodiment of the present invention, the method for obtaining the gradient category includes:
[0052] The gradient value within the neighborhood of each pixel point is divided into two categories using the Otsu threshold segmentation algorithm to obtain the gradient category. The Otsu threshold is a technical means well known to those skilled in the art. The algorithm can perform a binary classification process by adaptively obtaining the threshold, and the specific process will not be repeated.
[0053] Preferably, in one embodiment of the present invention, the method for acquiring local definition includes:
[0054] In the neighborhood, the difference in average gradient value between the gradient category with the largest average gradient value and the gradient category with the smallest average gradient value is taken as the gradient range. The gradient range can reflect the obvious degree of gradient difference in the neighborhood. For clear number edge pixels, the greater the obvious degree of gradient information difference in the neighborhood, the more obvious the distinction between the edge and the background in the current range, and the greater the clarity. The gradient difference between each neighborhood pixel and the average gradient value of the gradient category to which it belongs is taken as the gradient deviation; the average gradient deviation of all neighborhood pixels in the neighborhood is obtained. The average gradient deviation can characterize the degree of gradient value fluctuation in the current neighborhood. The greater the degree of gradient value fluctuation, the more inconsistent the displacement length of the number pixel is under the same exposure length, that is, the more chaotic the gradient distribution is, and the more blurred the edge information is. Therefore, the result of negative correlation mapping and normalization of the average gradient deviation is multiplied by the gradient range to obtain local clarity.
[0055] In one embodiment of the present invention, the local definition is expressed by the formula:
[0056] Among them, A z is the local definition of the z-th pixel, B z1 is the average gradient value in the gradient category with the largest average gradient value in the neighborhood corresponding to the z-th pixel, B z2 is the average gradient value in the gradient category with the smallest average gradient value in the neighborhood range corresponding to the z-th pixel point; exp[] is an exponential function with a natural constant as the base, a is the size of the neighborhood range, C u is the gradient value of the u-th pixel in the neighborhood, D u is the average gradient value of the gradient category to which the u-th pixel point belongs within the neighborhood.
[0057] In the local clarity formula, an exponential function with a natural constant as the base is used to perform negative correlation processing on the average gradient difference and normalize it. It should be noted that in other embodiments of the present invention, a set of basic mathematical operations such as maximum and minimum value normalization and inverse can be selected to implement negative correlation processing and normalization, which are technical means well known to those skilled in the art and will not be elaborated or limited here.
[0058] It should be noted that, because the gradient categories in one embodiment of the present invention are divided into two categories, the gradient extreme difference in the above preferred embodiment of calculating the local clarity is the difference in the average gradient values between the two gradient categories.
[0059] Different positions of the license plate are affected by light differently, resulting in certain shadows in certain areas. The existence of shadows causes the grayscale value in the corresponding area to change, which causes the gradient value to change. Therefore, in order to obtain accurate clarity information, it is necessary to eliminate the influence of this light.
[0060] In the license plate image, for two pixels at different positions, the more similar the pixel value distribution in their neighborhood is, the more similar the clarity of the two pixels should be. However, due to the influence of light and shadow, there may be certain differences and changes in the gradient value between two pixels with similar clarity. However, for a pixel affected by a shadow, the shadow only affects the gradient value, and the change trend of the pixels in the neighborhood is not affected. For example, the grayscale value of the first row in the neighborhood of a pixel is [10 15 25 15 10]. After the pixel is affected by the shadow, the grayscale values of the pixels in its neighborhood may all become smaller, and the grayscale value of the first row may become [5 11 17 11 5]. Although the grayscale value changes, the change trend between the grayscale values does not change, and the original [increase and decrease] trend is maintained. Therefore, in order to adjust the clarity of the pixel to avoid being affected by light, points with the same pixel value change trend and larger local clarity in the neighborhood can be found in the image as correction pixels. The clarity information of the corrected pixels can be used to correct the local clarity of the pixels, thereby improving the accuracy of the clarity analysis. Therefore, in the embodiment of the present invention, the pixel value change trend of each position within the preset neighborhood range of each pixel point is obtained, and the trend difference degree of the pixel value change trend of the corresponding position within the neighborhood range between each pixel point and other pixel points is obtained; according to the trend difference degree and the local clarity of other pixel points, the corrected pixel point corresponding to each pixel point is screened out from other pixel points.
[0061] Preferably, in one embodiment of the present invention, the method for obtaining the trend difference degree includes:
[0062] The gradient value difference between each neighborhood pixel point and the adjacent neighborhood pixel point within the neighborhood range of each pixel point is processed using a sign function to obtain the change trend characteristic value of each neighborhood pixel point. Because the gradient value difference has a positive and negative sign, it can characterize the change direction between a neighborhood pixel point and an adjacent neighborhood pixel point. Therefore, the change trend characteristic value is obtained after processing with a sign function. The change trend characteristic value includes three types of values, namely -1, 0 and 1. -1 indicates that the pixel value change trend of the neighborhood pixel point toward the adjacent pixel point is a decreasing trend; 0 indicates an unchanged trend; 1 indicates an increasing trend. Therefore, the difference in the change trend characteristic value between the neighborhood pixels at the same position within the neighborhood range of the two pixels is obtained, and after averaging the difference in the change trend characteristic value, the trend difference degree between the two pixels is obtained. In one embodiment of the present invention, the trend difference degree is expressed by the formula:
[0063]
[0064] Among them, E zsis the trend difference between the zth pixel and the sth pixel, a is the size of the neighborhood, sign() is the sign function, and F zu is the uth neighboring pixel in the neighborhood of the zth pixel, F z(u+1) is the u+1th neighboring pixel in the neighborhood of the zth pixel, F su is the uth neighboring pixel in the neighborhood of the zth pixel, F s(u+1) It is the u+1th neighboring pixel in the neighborhood of the sth pixel.
[0065] In the trend difference degree formula, the change trend between the first pixel point in the neighborhood and the subsequent adjacent pixels is analyzed. Since the last pixel point has no subsequent adjacent pixels, the upper limit of the summation sign is a. 2 -1. The greater the difference in the change trend characteristic value of the corresponding position in the neighborhood range between the z-th pixel point and the s-th pixel point, the greater the corresponding trend difference.
[0066] When the trend difference between two pixels in the neighborhood is small, it means that the two pixels have strong mutual reference; when the local clarity of a pixel is large and the trend difference between it and another pixel is small, it means that the local clarity of the first pixel can be used as a reference for the second pixel and adjust the local clarity of the second pixel. Therefore, the correction pixel corresponding to each pixel can be selected from other pixels according to the trend difference and the local clarity of other pixels.
[0067] Preferably, in one embodiment of the present invention, a method for obtaining a corrected pixel point includes:
[0068] For each pixel point, obtain the trend difference degree of each pixel point with other pixel points, and multiply the trend difference degree with the local clarity of the corresponding other pixel points after negative correlation mapping to obtain the correction standard screening index of the corresponding other pixel points, and select the other pixel points corresponding to the largest correction standard screening index as the correction pixel points of the corresponding pixel points. In one embodiment of the present invention, the formula corresponding to the correction standard screening index is:
[0069] I zs =exp(-E zs )×A s ; where I zs is the correction standard screening index of the s-th pixel relative to the z-th pixel, exp() is an exponential function with a natural constant as the base, E zs is the trend difference between the sth pixel and the zth pixel, A s is the local clarity of the s-th pixel.
[0070] In the modified standard screening index formula, an exponential function with a natural constant as the base is used to perform negative correlation processing and normalization on the trend difference degree. It should be noted that in other embodiments of the present invention, a set of basic mathematical operations such as maximum and minimum value normalization and inverse can be selected to achieve negative correlation processing and normalization, which are technical means well known to those skilled in the art and will not be elaborated or limited here.
[0071] Step S3: According to the trend difference between each pixel and the corresponding corrected pixel, and the local clarity of the corresponding corrected pixel, the local clarity of each pixel is adjusted to obtain the corrected clarity of each pixel; according to the corrected clarity of each pixel in each license plate image, the overall clarity of each license plate image is obtained.
[0072] The corrected pixel point obtained in step S2 can correct the local clarity of the corresponding pixel point, so that the obtained corrected clarity avoids the influence of illumination. In the correction process, the trend difference degree reflects the correction reference between the corrected pixel point and the corresponding pixel point, so the local clarity of each pixel point can be adjusted according to the trend difference degree combined with the local clarity of the corrected pixel point, so as to obtain the corrected clarity.
[0073] Preferably, in one embodiment of the present invention, the corrected definition is obtained according to a corrected definition formula, and the corrected definition formula includes:
[0074] H z =A z +max[(A s' -A z ),0]×exp(-E zs' ), where H z is the corrected clarity of the z-th pixel, A z is the local clarity of the z-th pixel, A s' To correct the local clarity of the pixel, max[] is the maximum value selection function, exp() is an exponential function with a natural constant as the base, E zs' The degree of trend difference between the z-th pixel and the corresponding corrected pixel.
[0075] In the formula for correcting the clarity, exp(-E zs' ) as the correction weight, that is, the smaller the trend difference, the stronger the reference between the two pixels, and the stronger the credibility of the correction degree. max[(A s' -A z ),0] represents the degree of correction, because we need to get rid of the problem that the clarity of the pixel obtained by the shadow is reduced, so we get (A s' -A z), if the local definition of the corrected pixel is less than or equal to the local definition of the pixel to be corrected, it means that the local definition of the pixel to be corrected does not need to be corrected by the corrected pixel, then max[(A s' -A z ),0] feedback value is 0, the correction clarity is equal to the local clarity before correction; on the contrary, if the local clarity of the corrected pixel is greater than the local clarity of the pixel to be corrected, then max[(A s' -A z ),0]Feedback(A s' -A z ), which is adjusted by the correction weight and added to the original local clarity to obtain the corrected clarity.
[0076] After obtaining the corrected clarity of each pixel in the license plate image, the overall clarity of the license plate image can be obtained according to the corrected clarity of each pixel.
[0077] Preferably, in one embodiment of the present invention, the average value of the local sharpness of all pixels in the license plate image is taken as the overall sharpness.
[0078] Step S4: In the license plate image set, select the best license plate image according to the overall clarity and perform blur restoration to obtain a clear license plate image, and extract the license plate information of the clear license plate image.
[0079] The same processing procedure is followed to obtain the overall clarity of each license plate in the license plate image set. The optimal license plate image can be screened out based on the overall clarity. The optimal license plate image can be blurred and restored to obtain a clear license plate image with clearer image information. The license plate information in the clear license plate image can be extracted to monitor the vehicle involved.
[0080] Preferably, in one embodiment of the present invention, the license plate image corresponding to the maximum overall clarity is used as the optimal license plate image, and the motion blurred image restoration model PSF is used to process the optimal license plate image to obtain a clear license plate image, that is, the clear license plate image has clearer image information. The license plate information in the clear license plate image is extracted using OCR technology. It should be noted that PSF is a point spread function. In the process of restoring a blurred image using PSF, it is first necessary to estimate the parameters of the blur scale and blur direction in the image, and then use linear image restoration methods such as Wiener filtering for restoration. The specific content is a technical means well known to those skilled in the art, and will not be repeated here. Similarly, the principle of OCR technology is based on image segmentation and image recognition, and the specific content is also a technical feature well known to those skilled in the art, and will not be repeated here.
[0081] In summary, the present invention obtains a license plate image through an Internet of Things device, and obtains the local clarity of each pixel point based on the gradient information in the license plate image. Corrected pixels are selected based on the degree of difference in the pixel value change trend within the neighborhood range between the pixels, and the local clarity of the pixels is corrected to obtain the accurate overall clarity of the license plate image. Then the optimal license plate image is selected and the license plate information is extracted. The present invention obtains accurate license plate information by analyzing and processing the images collected by the Internet of Things device, thereby improving the service efficiency and service capabilities of the intelligent transportation Internet of Things application service.
[0082] The present invention also proposes a vehicle monitoring system for capturing license plates by a mobile device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the system implements the steps of a vehicle monitoring method for capturing license plates by a mobile device.
[0083] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0084] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
Claims
1. A vehicle monitoring method for capturing license plates with a mobile device, characterized in that: The method comprises: Acquire a set of license plate images of a vehicle captured by a mobile device during driving; the set of license plate images is composed of continuous single-frame license plate images; In each of the license plate images, the gradient category within a preset neighborhood range of each pixel point is obtained, and the local clarity of the pixel point corresponding to the neighborhood range is obtained according to the gradient difference and gradient distribution between the gradient categories; the pixel value change trend of each position within the preset neighborhood range of each pixel point is obtained, and the trend difference degree of the pixel value change trend at the corresponding position within the neighborhood range between each pixel point and other pixel points is obtained; according to the trend difference degree and the local clarity of the other pixel points, the correction pixel point corresponding to each pixel point is screened out from the other pixel points; According to the trend difference between each pixel and the corresponding corrected pixel, and the local clarity of the corresponding corrected pixel, the local clarity of each pixel is adjusted to obtain the corrected clarity of each pixel; according to the corrected clarity of each pixel in each license plate image, the overall clarity of each license plate image is obtained; In the license plate image set, the best license plate image is selected according to the overall clarity and blurred and restored to obtain a clear license plate image, and the license plate information of the clear license plate image is extracted; The method for obtaining the gradient category includes: Using the Otsu threshold segmentation algorithm, the gradient value within the neighborhood of each pixel point is divided into two categories to obtain the gradient category; The method for obtaining the corrected pixel point includes: For each pixel point, obtain the trend difference degree between each pixel point and the other pixel points, negatively correlate the trend difference degree and multiply it by the local clarity corresponding to the other pixel points to obtain the correction standard screening index corresponding to the other pixel points, and select the other pixel point corresponding to the largest correction standard screening index as the correction pixel point of the corresponding pixel point.
2. The vehicle monitoring method of capturing license plates with a mobile device according to claim 1, characterized in that: The method for acquiring the license plate image set includes: A vehicle video of a vehicle in a driving process is obtained, and each video frame image in the vehicle video is processed using a semantic segmentation network to obtain a license plate image and form the license plate image set.
3. The vehicle monitoring method of capturing license plates with a mobile device according to claim 1, characterized in that: The method for obtaining the local clarity includes: Within the neighborhood range, the difference in average gradient values between the gradient category with the largest average gradient value and the gradient category with the smallest average gradient value is taken as the gradient range; the gradient difference between each neighborhood pixel point within the neighborhood range and the average gradient value of the gradient category to which it belongs is taken as the gradient deviation; the average gradient deviation of all neighborhood pixels within the neighborhood range is obtained, and the result of negative correlation mapping and normalization of the average gradient deviation is multiplied by the gradient range to obtain the local clarity.
4. The vehicle monitoring method of capturing license plates with a mobile device according to claim 1, characterized in that: The method for obtaining the trend difference degree includes: The gradient value difference between each neighborhood pixel point and the adjacent neighborhood pixel point within the neighborhood range of each pixel point is processed using a sign function to obtain a change trend characteristic value of each neighborhood pixel point; the change trend characteristic value difference between the neighborhood pixel points at the same position within the neighborhood range of two pixel points is obtained, and after averaging the change trend characteristic value differences, the trend difference degree between the two pixel points is obtained.
5. The vehicle monitoring method of capturing license plates with a mobile device according to claim 1, characterized in that: The method for obtaining the corrected clarity includes: The modified clarity is obtained according to a modified clarity formula, wherein the modified clarity formula includes: ,in, For the z The corrected clarity of pixels, For the z The local clarity of the pixels, is the local clarity of the corrected pixel point, Select the function for the maximum value, is an exponential function with a natural constant as base, For the z The degree of trend difference between a pixel point and the corresponding corrected pixel point.
6. The vehicle monitoring method of capturing license plates with a mobile device according to claim 1, characterized in that: The method for obtaining the overall clarity includes: The average value of the local clarity of all pixels in the license plate image is taken as the overall clarity.
7. The vehicle monitoring method of capturing license plates with a mobile device according to claim 1, characterized in that: The step of selecting the best license plate image according to the overall clarity and extracting the license plate information of the best license plate image comprises: The license plate image corresponding to the maximum overall clarity is taken as the optimal license plate image, the motion blurred image restoration model PSF is used to process the optimal license plate image to obtain a clear license plate image, and the license plate information in the clear license plate image is extracted using OCR technology.
8. A vehicle monitoring system for capturing license plates with a mobile device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the vehicle monitoring method of capturing license plates by a mobile device as described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Image identification method and device
CN105488511A
License plate recognition method and device based on deep learning
CN111340041A
