License plate image processing method, device, electronic device and storage medium
By extracting the brightness component images and determining the weight image, overexposed and non-overexposure license plate images are fused, which solves the problem of improper exposure of license plates in scenes with insufficient light, and improves the clarity of license plate images and information recognition accuracy.
Patent Information
- Application Number
- CN202011486790.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-16
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2040-12-16
AI Technical Summary
In surveillance scenes with insufficient light, it is difficult to take into account the exposure needs of faces and license plates, resulting in over-exposed or under-exposed license plates, affecting the clarity of the image and the accuracy of information recognition.
By extracting the brightness component images of the overexposed license plate image and the non-overexposed license plate image, a weight image reflecting the contrast of the license plate area and the non-permitted license plate area is determined, and the two images are fused based on the weight image to obtain the fused license plate image.
The fusion effect of license plate images is improved, the contrast of license plate areas is enhanced, and the license plate information is highlighted, thereby improving the information recognition accuracy of the fusion license plate images.
Smart Images

Figure CN114639133B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of image processing technology, and in particular to a license plate image processing method, device, electronic device and storage medium. Background Art
[0002] In night monitoring scenes or monitoring scenes with insufficient light that require the use of fill lights, such as tunnels, the exposure processing of monitoring cameras often cannot take into account the exposure requirements of different scene objects, especially faces and license plates. Since faces and license plates have different reflective properties, license plates are prone to overexposure. Since faces are darker at night, the license plate is prone to overexposure when the driver's face is normally exposed, resulting in unclear license plates; when the license plate is normally exposed or underexposed, the driver's face is underexposed, resulting in unclear faces. Therefore, it is necessary to process the collected monitoring images to ensure that the faces are clear while ensuring that the license plate information is clear and complete.
[0003] A common solution to this problem is to perform two different image enhancement processes on the same image to generate two images. Image one has normal face exposure but overexposed license plate, and image two has normal or underexposed license plate and underexposed face. The normally exposed or underexposed license plate in image two is fused with the overexposed license plate in image one. In this case, image one ensures that both the face and license plate areas are clear and complete.
[0004] However, in the process of license plate fusion, the fused license plate image contains other non-license plate areas in addition to the license plate area. Directly fusing the license plate image will cause inaccurate positioning of the license plate area, resulting in discontinuous pixels in the edge area of the license plate after fusion, resulting in unsatisfactory final license plate fusion effect, affecting the recognition of license plate information. Summary of the invention
[0005] The embodiments of the present invention provide a license plate image processing method, device, electronic device and storage medium to improve the license plate image fusion effect, thereby improving the information recognition accuracy of the fused license plate image.
[0006] In a first aspect, an embodiment of the present invention provides a license plate image processing method, comprising:
[0007] Extracting brightness component images of a first license plate image and a second license plate image; wherein the first license plate image and the second license plate image are images of the same license plate image with different exposure amounts, the first license plate image is an overexposed license plate image, and the second license plate image is a non-overexposed license plate image;
[0008] Determine a weight image according to the brightness component image; wherein the pixel values in the weight image reflect the contrast between the license plate area and the non-license plate area in the first license plate image and the second license plate image;
[0009] The first license plate image and the second license plate image are fused according to the weight image to obtain a fused license plate image.
[0010] In a second aspect, an embodiment of the present invention further provides a license plate image processing device, comprising:
[0011] A brightness image extraction module, used to extract brightness component images of a first license plate image and a second license plate image; wherein the first license plate image and the second license plate image are images of the same license plate image with different exposure amounts, the first license plate image is an overexposed license plate image, and the second license plate image is a non-overexposed license plate image;
[0012] A weight image determination module, used to determine a weight image according to the brightness component image; wherein the pixel values in the weight image reflect the contrast between the license plate area and the non-license plate area in the first license plate image and the second license plate image;
[0013] The license plate image fusion module is used to fuse the first license plate image and the second license plate image according to the weight image to obtain a fused license plate image.
[0014] In a third aspect, an embodiment of the present invention further provides an electronic device, including:
[0015] one or more processors;
[0016] a storage device for storing one or more programs,
[0017] When the one or more programs are executed by the one or more processors, the one or more processors implement the license plate image processing method as described in any embodiment of the present invention.
[0018] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the license plate image processing method as described in any embodiment of the present invention.
[0019] The embodiment of the present invention determines a weight image that can reflect the contrast information of the license plate area and the non-license plate area in the two images based on the brightness component images of the overexposed license plate image and the non-overexposed license plate image, and fuses the overexposed license plate image and the non-overexposed license plate image based on the weight image, so that the contrast of the license plate area in the fusion result is improved and the license plate information is highlighted. This improves the fusion effect of the license plate image, and further improves the information recognition accuracy of the fused license plate image. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 is a flow chart of a license plate image processing method in Embodiment 1 of the present invention;
[0021] Figure 2 is a flow chart of a license plate image processing method in Embodiment 2 of the present invention;
[0022] Figure 3 is a schematic diagram of the structure of a license plate image processing device in Embodiment 3 of the present invention;
[0023] Figure 4 It is a schematic diagram of the structure of an electronic device in Embodiment 4 of the present invention. DETAILED DESCRIPTION
[0024] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0025] Embodiment 1
[0026] Figure 1 is a flow chart of the license plate image processing method in the first embodiment of the present invention. This embodiment is applicable to the case of accurately fusing license plate images of two exposure amounts. The method can be executed by a license plate image processing device, which can be implemented in software and / or hardware and can be configured in an electronic device, such as a background server or other device with communication and computing capabilities. Figure 1 As shown, the method specifically includes:
[0027] Step 101, extracting brightness component images of a first license plate image and a second license plate image; wherein the first license plate image and the second license plate image are images of the same license plate image with different exposure amounts, the first license plate image is an overexposed license plate image, and the second license plate image is a non-overexposed license plate image.
[0028] The license plate areas corresponding to the first license plate image and the second license plate image are the same, but the exposure of the images is different. The exposure refers to the amount of light allowed to enter the lens and illuminate the photosensitive medium during the photography process. Exemplarily, the first license plate image and the second license plate image can be acquired by two image acquisition devices with different exposures, or the original image acquired by the image acquisition device is acquired, and the original image is processed based on the preset first image information processing parameter to obtain the first image, and the original image is processed based on the preset second image information processing parameter to obtain the second image; wherein the first image information processing parameter is used to make the brightness of the face area in the original image reach the first preset brightness, and the second image information processing parameter is used to make the brightness of the license plate area in the original image reach the second preset brightness. Thus, the first license plate image extracted from the first image is an overexposed license plate image, and the second license plate image extracted from the second image is a non-overexposed license plate image. The non-overexposed license plate image includes a normally exposed license plate image and an underexposed license plate image. Overexposure refers to excessive exposure, resulting in an image that is too bright; underexposure refers to insufficient exposure, resulting in an image that is too dark.
[0029] In the first image where the first license plate image is located, the license plate area is overexposed, while the face area is normal; in the second image where the second license plate image is located, the face area is overexposed, while the license plate area is normal or underexposed. Therefore, by fusing the second license plate image in the second image with the first license plate image in the first image, both the face area and the license plate area in the first image can be displayed normally.
[0030] Specifically, since the brightness component can reflect the brightness of each pixel in the license plate image, and the human eye is sensitive to brightness information, after determining the first license plate image and the second license plate image with different exposure levels, the brightness components of the two license plate images with different exposures are first extracted to obtain a first brightness component image of the first license plate image and a second brightness component image of the second license plate image.
[0031] Exemplarily, two vehicle images of the same scene are obtained and converted into YUV format. The license plate in one of the vehicle images is overexposed, while the license plate in the other image is normally exposed. The first license plate image and the second license plate image are obtained by cropping the two images according to the regional coordinates of the license plate, and the brightness component (Y component) images of the two license plate images are extracted at the same time. The first brightness component image of the first license plate image is denoted as Y1, and the second brightness component image of the second license plate image is denoted as Y2.
[0032] Step 102: determine a weight image according to the brightness component image; wherein the pixel values in the weight image reflect the contrast between the license plate area and the non-license plate area in the first license plate image and the second license plate image.
[0033] In the first license plate image and the second license plate image, in addition to the license plate area, there is also a non-license plate area, that is, part of the vehicle body area. The existence of the non-license plate area will cause the pixels in the edge area of the license plate to be discontinuous after the two license plate images are fused, and the license plate fusion effect is not ideal. Therefore, it is necessary to distinguish the license plate area and the non-license plate area in the license plate image during fusion, that is, to achieve accurate extraction of the license plate area in the license plate image.
[0034] The weighted image can realize the accurate extraction of the license plate area in the license plate image. Specifically, the brightness of the license plate area in the first license plate image and the second license plate image is greater than that of the non-license plate area. Therefore, the license plate area and the non-license plate area can be identified according to the brightness values in the first brightness component image and the second brightness component image, and the weighted image is determined therefrom so that the pixel values in the weighted image reflect the contrast between the license plate area and the non-license plate area in the first license plate image and the second license plate image. For example, the area with high pixel values in the weighted image is the license plate area, and the area with low pixel values is the non-license plate area.
[0035] Exemplarily, the area with high pixel value in the weighted image is the area with high pixel value in both the first brightness component image and the second brightness component image, and the area with low pixel value in the weighted image is the area with low pixel value in both the first brightness component image and the second brightness component image. The area with high pixel value in the first brightness component image and low pixel value in the second brightness component image and the area with low pixel value in the first brightness component image and high pixel value in the second brightness component image are reflected as intermediate pixel values in the weighted image. This enables the pixel value in the weighted image to reflect the contrast between the license plate area and the non-license plate area in the first license plate image and the second license plate image.
[0036] Step 103: Fuse the first license plate image and the second license plate image according to the weight image to obtain a fused license plate image.
[0037] Since the weight image reflects the contrast between the license plate area and the non-license plate area in the first license plate image and the second license plate image, the first license plate image and the second license plate image are fused based on the weight image, so that the proportion of the license plate area is increased and the proportion of the non-license plate area is weakened in the fusion result, thereby improving the accuracy of the license plate fusion result.
[0038] Exemplarily, the pixel values in the weight image are normalized, and each pixel point is fused according to the normalized value. For example, the normalized weight image is Y(i, j), and the pixel of the fused image is I(i, j) = (1-Y(i, j))×I1(i, j)+Y(i, j)×I2(i, j); wherein I(i, j) represents the pixel value of the fused license plate image at the (i, j) position, Y(i, j) represents the pixel value of the weight image at the (i, j) position, I1(i, j) represents the pixel value of the first license plate image at the (i, j) position, and I2(i, j) represents the pixel value of the second license plate image at the (i, j) position.
[0039] Since the contrast between the license plate area and the non-license plate area in the fused license plate image is improved, the license plate information therein can be effectively identified. Therefore, the first license plate image in the first vehicle image is partially replaced by the fused license plate image, so that the facial information and the license plate information in the updated first vehicle image are both complete.
[0040] The embodiment of the present invention determines a weight image that can reflect the contrast information of the license plate area and the non-license plate area in the two images based on the brightness component images of the overexposed license plate image and the non-overexposed license plate image, and fuses the overexposed license plate image and the non-overexposed license plate image based on the weight image, so that the contrast of the license plate area in the fusion result is improved and the license plate information is highlighted. This improves the fusion effect of the license plate image, and further improves the information recognition accuracy of the fused license plate image.
[0041] Embodiment 2
[0042] Figure 2 is a flow chart of a license plate image processing method in Embodiment 2 of the present invention. Embodiment 2 is further optimized on the basis of Embodiment 1. Figure 2 As shown, the method includes:
[0043] Step 201, extracting brightness component images of a first license plate image and a second license plate image; wherein the first license plate image and the second license plate image are images of the same license plate image with different exposure amounts, the first license plate image is an overexposed license plate image, and the second license plate image is a non-overexposed license plate image.
[0044] Step 202: Perform a linear light operation or a point light operation on the brightness component image to obtain an intermediate weighted image.
[0045] Among them, the characteristics of linear light operation and point light operation are to highlight the difference between the bright area and the dark area in the two images, that is, to highlight the license plate area in the two license plate images.
[0046] Specifically, linear light operation or point light operation is performed on the first brightness component image and the second brightness component image to obtain an intermediate weighted image. Since the characteristics of linear light operation and point light operation are to highlight the difference between the bright and dark areas in the two images, the intermediate weighted image can reflect the license plate area in the two license plate images.
[0047] In a feasible embodiment, the calculation formula of the linear light operation is: Y3(i, j)=Y2(i, j)+2×Y1(i, j)-255;
[0048] The calculation formula for point light operation is:
[0049]
[0050] Among them, Y1(i, j) represents the pixel value of the brightness component image of the first license plate image at the (i, j) position, Y2(i, j) represents the pixel value of the brightness component image of the second license plate image at the (i, j) position, and Y3(i, j) represents the pixel value of the intermediate weight image at the (i, j) position.
[0051] When performing linear light operation on the brightness component image, the pixel value of each pixel in the first brightness component image is multiplied by 2 and the pixel value of the corresponding pixel in the second brightness component image is added, and the difference between the sum and 255 is used as the intermediate weight value of the pixel in the intermediate weight image.
[0052] When performing point light operation on the brightness component image, first determine the comparison result between the pixel value of each pixel in the first brightness component image and 128. If the pixel value of the target pixel is less than or equal to 128, the intermediate weight value of the pixel in the intermediate weight image is the minimum value of twice the pixel value of the target pixel and the pixel value of the corresponding pixel in the second brightness component image; if the pixel value of the target pixel is greater than 128, the intermediate weight value of the pixel in the intermediate weight image is the minimum value of the difference between twice the pixel value of the target pixel and 255 and the pixel value of the corresponding pixel in the second brightness component image.
[0053] The rough positioning of the license plate area in the first license plate image and the second license plate image is achieved by performing linear light operation or point light operation on the brightness component image.
[0054] Step 203: determine a weight image according to the intermediate weight image and the brightness component image of the second license plate image.
[0055] Since the intermediate weighted image is a rough positioning of the license plate area in the license plate image, and since the second license plate image is a non-overexposed license plate image and reflects more information about the license plate area than the first license plate image, the intermediate weighted image and the second brightness component image are combined to further accurately extract the license plate area in the license plate image, making the positioning of the license plate area in the weighted image more accurate.
[0056] In a feasible embodiment, determining the weight image according to the intermediate weight image and the brightness component image of the second license plate image includes:
[0057] A color deepening operation or a linear deepening operation is performed on the intermediate weighted image and the brightness component image of the second license plate image to obtain a weighted image.
[0058] Among them, the color deepening operation or linear deepening operation is characterized in that the pixel value in the intermediate weight image is determined by the pixel value of the second brightness component image. The closer the pixel value in the second brightness component image is to zero, the darker the pixel value in the result after mixing with the intermediate weight image. The closer the pixel value in the second brightness component image is to 255, the closer the pixel value in the result after mixing with the intermediate weight image is to the pixel value in the intermediate weight image. The final effect is to highlight the information of the license plate area, reduce the brightness of the non-license plate area, and improve the contrast between the non-license plate area and the license plate area.
[0059] Specifically, a color deepening operation or a linear deepening operation is performed on the second brightness component image and the intermediate weight image to obtain a weighted image. Since the characteristic of the color deepening operation or the linear deepening operation is to highlight the license plate area in the license plate image, the weighted image can realize accurate extraction of the license plate area, that is, determine the position information of the license plate area according to the pixel value distribution in the weighted image.
[0060] In a feasible embodiment, the calculation formula for the color deepening operation is:
[0061] The calculation formula for the linear deepening operation is: Y4(i, j) = Y3(i, j) + Y2(i, j) - 255;
[0062] Among them, Y1(i, j) represents the pixel value of the brightness component image of the first license plate image at the (i, j) position, Y2(i, j) represents the pixel value of the brightness component image of the second license plate image at the (i, j) position, Y3(i, j) represents the pixel value of the intermediate weight image at the (i, j) position; Y4(i, j) represents the pixel value of the weight image at the (i, j) position.
[0063] When performing a color darkening operation on the intermediate weighted image and the second brightness component image, determine the ratio of the product of 255 and the difference between each point in the intermediate weighted image and the second brightness component image to the second brightness component image, and determine the difference between the weight value of the point in the intermediate weighted image and the ratio as the weight value of the corresponding point in the weighted image.
[0064] When performing a linear deepening operation on the intermediate weight image and the second brightness component image, the pixel value of each pixel in the second brightness component image is added to the pixel value of the corresponding pixel in the intermediate weight image, and the difference between the sum and 255 is used as the weight value of the pixel in the weight image.
[0065] By performing a color deepening operation or a linear deepening operation on the intermediate weight image and the second brightness component image, the extraction accuracy of the license plate area is improved, and the contrast between the license plate area and the non-license plate area in the license plate image is improved.
[0066] Through the above operation, the license plate image is further processed by utilizing the difference between the pixel values of the license plate area and the non-license plate area in the first license plate image and the second license plate image to extract a weight image that can reflect the precise license plate area position, so as to improve the effect and accuracy of license plate fusion.
[0067] Step 204: fuse the first license plate image and the second license plate image according to the weight image to obtain a fused license plate image.
[0068] In a feasible embodiment, the first license plate image and the second license plate image are fused according to the weight image to obtain a fused license plate image, including:
[0069]
[0070] Wherein, Y1(i, j) represents the pixel value of the brightness component image of the first license plate image at the position (i, j), and Y2(i, j) represents the pixel value of the brightness component image of the second license plate image at the position (i, j);
[0071] U1(i, j) represents the pixel value of the chrominance U component image of the first license plate image at the position (i, j), and U2(i, j) represents the pixel value of the chrominance U component image of the second license plate image at the position (i, j);
[0072] V1(i, j) represents the pixel value of the chrominance V component image of the first license plate image at the position (i, j), and V2(i, j) represents the pixel value of the chrominance V component image of the second license plate image at the position (i, j);
[0073] I Y (i, j) represents the pixel value of the brightness component image of the fused license plate image at position (i, j), I U(i, j) represents the pixel value of the chrominance U component image of the fused license plate image at the position (i, j); I V (i, j) represents the pixel value of the chrominance V component image of the fused license plate image at position (i, j);
[0074] Y4(i, j) represents the pixel value of the weight image at the (i, j) position.
[0075] Since the weight image reflects the contrast between the license plate area and the non-license plate area in the first license plate image and the second license plate image, the first license plate image and the second license plate image are fused based on the weight image, so that the proportion of the license plate area is increased and the proportion of the non-license plate area is weakened in the fusion result, thereby improving the accuracy of the license plate fusion result.
[0076] Specifically, each component image of the fused license plate image in YUV format is determined respectively, and the corresponding component images of the first license plate image and the second license plate image are fused based on the weight values in the weight image to obtain the Y component image, U component image and V component image of the fused license plate image, and finally, the fused license plate image in other formats is obtained according to the conversion of the Y component image, U component image and V component image of the fused license plate image.
[0077] Optionally, after obtaining the weight image, since the value range in the weight image is 0 to 255, the pixel values in the weight image can be normalized, and the component images can be fused according to the normalized weight values. For example, when the weight image is normalized, the value range of each point in the weight image is 0 to 1, and the component images of the fused license plate image are obtained according to the following formula:
[0078]
[0079] In a feasible embodiment, after determining the weight image according to the brightness component image, the method further includes:
[0080] Perform morphological closing operation on the weight image to obtain the target weight image;
[0081] Accordingly, the first license plate image and the second license plate image are fused according to the weight image, including:
[0082] The first license plate image and the second license plate image are fused according to the target weight image.
[0083] In order to improve the accuracy of license plate area extraction in the weighted image, a morphological closing operation is performed on the weighted image, first a morphological dilation operation is performed and then a morphological erosion operation is performed, so that the contour of the license plate area in the weighted image becomes smooth, narrow discontinuities can be bridged, and small holes can be filled.
[0084] Specifically, the weight image is subjected to a morphological closing operation, which makes the image contour smooth and can close narrow discontinuities and fill small holes. The weight image license plate edge is made smoother by the closing operation, while the noise is filtered out to fill the discontinuous area of the license plate text, thereby improving the final license plate image fusion effect. In the embodiment of the present invention, there is no restriction on the shape and size of the structural element of the closing operation. For example, a 3*3 square structural element can be used. In any embodiment of the present invention, a morphological closing operation can be performed on the weight image.
[0085] After performing a morphological closing operation on the weighted image, the first license plate image and the second license plate image are fused based on a target weighted image obtained by the closing operation to improve fusion accuracy.
[0086] The embodiment of the present invention determines a weight image that can reflect the contrast information of the license plate area and the non-license plate area in the two images based on the brightness component images of the overexposed license plate image and the non-overexposed license plate image, and fuses the overexposed license plate image and the non-overexposed license plate image based on the weight image, so that the contrast of the license plate area in the fusion result is improved and the license plate information is highlighted. This improves the fusion effect of the license plate image, and further improves the information recognition accuracy of the fused license plate image.
[0087] The embodiment of the present invention mainly solves the problem of inaccurate license plate area extraction in the fusion scheme of overexposed license plate images and non-overexposed license plate images, resulting in poor fusion effect of the final license plate image. The embodiment of the present invention compares the brightness value difference between the first license plate image and the second license plate image, and performs linear light operation or point light operation, color deepening operation or linear deepening operation and closing operation to obtain an accurate license plate area and a final fusion weight value, and then fuses the first license plate image and the second license plate image based on the target weight image, thereby improving the fusion effect and algorithm robustness.
[0088] Embodiment 3
[0089] Figure 3 is a schematic diagram of the structure of the license plate image processing device in the third embodiment of the present invention. This embodiment is applicable to the situation where the license plate images with two exposure amounts are accurately fused. Figure 3 As shown, the device comprises:
[0090] The brightness image extraction module 310 is used to extract brightness component images of the first license plate image and the second license plate image; wherein the first license plate image and the second license plate image are images of the same license plate image with different exposure amounts, the first license plate image is an overexposed license plate image, and the second license plate image is a non-overexposed license plate image;
[0091] A weight image determination module 320 is used to determine a weight image according to the brightness component image; wherein the pixel values in the weight image reflect the contrast between the license plate area and the non-license plate area in the first license plate image and the second license plate image;
[0092] The license plate image fusion module 330 is used to fuse the first license plate image and the second license plate image according to the weight image to obtain a fused license plate image.
[0093] The embodiment of the present invention determines a weight image that can reflect the contrast information of the license plate area and the non-license plate area in the two images based on the brightness component images of the overexposed license plate image and the non-overexposed license plate image, and fuses the overexposed license plate image and the non-overexposed license plate image based on the weight image, so that the contrast of the license plate area in the fusion result is improved and the license plate information is highlighted. This improves the fusion effect of the license plate image, and further improves the information recognition accuracy of the fused license plate image.
[0094] Optionally, a weight image determination module includes:
[0095] An intermediate weight image determination unit, configured to perform a linear light operation or a point light operation on the brightness component image to obtain an intermediate weight image;
[0096] A weight image determining unit is used to determine a weight image according to the intermediate weight image and the brightness component image of the second license plate image.
[0097] Optionally, the weight image determination unit is specifically used to:
[0098] A color deepening operation or a linear deepening operation is performed on the intermediate weighted image and the brightness component image of the second license plate image to obtain a weighted image.
[0099] Optionally, the calculation formula of the linear light operation is: Y3(i, j)=Y2(i, j)+2×Y1(i, j)-255;
[0100] The calculation formula of the point light operation is:
[0101]
[0102] Among them, Y1(i, j) represents the pixel value of the brightness component image of the first license plate image at the (i, j) position, Y2(i, j) represents the pixel value of the brightness component image of the second license plate image at the (i, j) position, and Y3(i, j) represents the pixel value of the intermediate weight image at the (i, j) position.
[0103] Optionally, the calculation formula for the color deepening operation is:
[0104] The calculation formula of the linear deepening operation is: Y4(i, j)=Y3(i, j)+Y2(i, j)-255;
[0105] Among them, Y1(i, j) represents the pixel value of the brightness component image of the first license plate image at the (i, j) position, Y2(i, j) represents the pixel value of the brightness component image of the second license plate image at the (i, j) position, Y3(i, j) represents the pixel value of the intermediate weight image at the (i, j) position; Y4(i, j) represents the pixel value of the weight image at the (i, j) position.
[0106] Optional, license plate image fusion module, specifically used for:
[0107]
[0108] Wherein, Y1(i, j) represents the pixel value of the brightness component image of the first license plate image at the position (i, j), and Y2(i, j) represents the pixel value of the brightness component image of the second license plate image at the position (i, j);
[0109] U1(i, j) represents the pixel value of the chrominance U component image of the first license plate image at the position (i, j), and U2(i, j) represents the pixel value of the chrominance U component image of the second license plate image at the position (i, j);
[0110] V1(i, j) represents the pixel value of the chrominance V component image of the first license plate image at the position (i, j), and V2(i, j) represents the pixel value of the chrominance V component image of the second license plate image at the position (i, j);
[0111] I Y (i, j) represents the pixel value of the brightness component image of the fused license plate image at position (i, j), I U (i, j) represents the pixel value of the chrominance U component image of the fused license plate image at the position (i, j); I V (i, j) represents the pixel value of the chrominance V component image of the fused license plate image at position (i, j);
[0112] Y4(i, j) represents the pixel value of the weight image at the (i, j) position.
[0113] Optionally, the device further comprises a weight image processing module for
[0114] After determining the weight image according to the brightness component image, performing a morphological closing operation on the weight image to obtain a target weight image;
[0115] Correspondingly, the license plate image fusion module is specifically used for:
[0116] The first license plate image and the second license plate image are fused according to the target weight image.
[0117] The license plate image processing device provided in the embodiment of the present invention can execute the license plate image processing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the license plate image processing method.
[0118] Embodiment 4
[0119] Figure 4 It is a structural schematic diagram of an electronic device provided in Embodiment 4 of the present invention. Figure 4 A block diagram of an exemplary electronic device 12 suitable for use in implementing embodiments of the present invention is shown. Figure 4 The electronic device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0120] like Figure 4 As shown, the electronic device 12 is in the form of a general purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and a bus 18 connecting various system components (including the system memory 28 and the processing unit 16).
[0121] Bus 18 represents one or more of several types of bus structures, including a storage device bus or storage device controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0122] The electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 12, including volatile and non-volatile media, removable and non-removable media.
[0123] The system storage device 28 may include computer system readable media in the form of volatile storage devices, such as random access memory devices (RAM) 30 and / or cache memory devices 32. The electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 4 not shown, usually called a "hard drive"). Although Figure 4Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The storage device 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.
[0124] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in the storage device 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described herein.
[0125] The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), one or more devices that enable a user to interact with the device 12, and / or any device that enables the device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the electronic device 12 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 20. Figure 4 As shown, the network adapter 20 communicates with other modules of the electronic device 12 via the bus 18. It should be understood that although Figure 4 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0126] The processing unit 16 executes various functional applications and data processing by running the programs stored in the system storage device 28, for example, implementing the license plate image processing method provided in the embodiment of the present invention, including:
[0127] Extracting brightness component images of a first license plate image and a second license plate image; wherein the first license plate image and the second license plate image are images of the same license plate image with different exposure amounts, the first license plate image is an overexposed license plate image, and the second license plate image is a non-overexposed license plate image;
[0128] Determine a weight image according to the brightness component image; wherein the pixel values in the weight image reflect the contrast between the license plate area and the non-license plate area in the first license plate image and the second license plate image;
[0129] The first license plate image and the second license plate image are fused according to the weight image to obtain a fused license plate image.
[0130] Embodiment 5
[0131] Embodiment 5 of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the license plate image processing method provided in the embodiment of the present invention is implemented, including:
[0132] Extracting brightness component images of a first license plate image and a second license plate image; wherein the first license plate image and the second license plate image are images of the same license plate image with different exposure amounts, the first license plate image is an overexposed license plate image, and the second license plate image is a non-overexposed license plate image;
[0133] Determine a weight image according to the brightness component image; wherein the pixel values in the weight image reflect the contrast between the license plate area and the non-license plate area in the first license plate image and the second license plate image;
[0134] The first license plate image and the second license plate image are fused according to the weight image to obtain a fused license plate image.
[0135] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, a device or a device or used in combination with it.
[0136] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0137] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0138] Computer program code for performing the operation of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0139] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A license plate image processing method, characterized in that: include: Extracting brightness component images of a first license plate image and a second license plate image; wherein the first license plate image and the second license plate image are images of the same license plate image with different exposure amounts, the first license plate image is an overexposed license plate image, and the second license plate image is a non-overexposed license plate image; Determine a weight image according to the brightness component image; wherein the pixel values in the weight image reflect the contrast between the license plate area and the non-license plate area in the first license plate image and the second license plate image; The first license plate image and the second license plate image are fused according to the weight image to obtain a fused license plate image.
2. The method according to claim 1, characterized in that: Determining a weight image according to the brightness component image includes: Performing a linear light operation or a point light operation on the brightness component image to obtain an intermediate weighted image; A weight image is determined according to the intermediate weight image and the brightness component image of the second license plate image.
3. The method according to claim 2, characterized in that Determining a weight image according to the intermediate weight image and the brightness component image of the second license plate image includes: A color deepening operation or a linear deepening operation is performed on the intermediate weighted image and the brightness component image of the second license plate image to obtain a weighted image.
4. The method according to claim 2, characterized in that: The calculation formula of the linear light operation is: Y3(i, j)=Y2(i, j)+2×Y1(i, j)-255; The calculation formula of the point light operation is: Among them, Y1(i, j) represents the pixel value of the brightness component image of the first license plate image at the (i, j) position, Y2(i, j) represents the pixel value of the brightness component image of the second license plate image at the (i, j) position, and Y3(i, j) represents the pixel value of the intermediate weight image at the (i, j) position.
5. The method according to claim 3, characterized in that: The calculation formula for the color deepening operation is: The calculation formula of the linear deepening operation is: Y4(i, j)=Y3(i, j)+Y2(i, j)-255; Among them, Y1(i, j) represents the pixel value of the brightness component image of the first license plate image at the (i, j) position, Y2(i, j) represents the pixel value of the brightness component image of the second license plate image at the (i, j) position, Y3(i, j) represents the pixel value of the intermediate weight image at the (i, j) position; Y4(i, j) represents the pixel value of the weight image at the (i, j) position.
6. The method according to any one of claims 1 to 5, characterized in that The first license plate image and the second license plate image are fused according to the weight image to obtain a fused license plate image, including: Wherein, Y1(i, j) represents the pixel value of the brightness component image of the first license plate image at the position (i, j), and Y2(i, j) represents the pixel value of the brightness component image of the second license plate image at the position (i, j); U1(i, j) represents the pixel value of the chrominance U component image of the first license plate image at the position (i, j), and U2(i, j) represents the pixel value of the chrominance U component image of the second license plate image at the position (i, j); V1(i, j) represents the pixel value of the chrominance V component image of the first license plate image at the position (i, j), and V2(i, j) represents the pixel value of the chrominance V component image of the second license plate image at the position (i, j); I Y (i, j) represents the pixel value of the brightness component image of the fused license plate image at position (i, j), I U (i, j) represents the pixel value of the chrominance U component image of the fused license plate image at the position (i, j); I V (i, j) represents the pixel value of the chrominance V component image of the fused license plate image at position (i, j); Y4(i, j) represents the pixel value of the weight image at the (i, j) position.
7. The method according to claim 1, characterized in that After determining the weight image according to the brightness component image, the method further includes: Performing a morphological closing operation on the weight image to obtain a target weight image; Correspondingly, fusing the first license plate image and the second license plate image according to the weight image includes: The first license plate image and the second license plate image are fused according to the target weight image.
8. A license plate image processing device, characterized in that: include: A brightness image extraction module, used to extract brightness component images of a first license plate image and a second license plate image; wherein the first license plate image and the second license plate image are images of the same license plate image with different exposure amounts, the first license plate image is an overexposed license plate image, and the second license plate image is a non-overexposed license plate image; A weight image determination module, used to determine a weight image according to the brightness component image; wherein the pixel values in the weight image reflect the contrast between the license plate area and the non-license plate area in the first license plate image and the second license plate image; The license plate image fusion module is used to fuse the first license plate image and the second license plate image according to the weight image to obtain a fused license plate image.
9. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the license plate image processing method as described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the license plate image processing method as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
License plate image processing method and device and computer storage medium
CN111582268A
Apparatus and Method for Image Fusion
KR1020110084025A