CN114639133B - License plate image processing method, device, electronic device and storage medium - Google Patents
License plate image processing method, device, electronic device and storage medium Download PDFInfo
- Publication number
- CN114639133B CN114639133B CN202011486790.0A CN202011486790A CN114639133B CN 114639133 B CN114639133 B CN 114639133B CN 202011486790 A CN202011486790 A CN 202011486790A CN 114639133 B CN114639133 B CN 114639133B
- Authority
- CN
- China
- Prior art keywords
- image
- license plate
- plate image
- weight
- pixel value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/50—Image enhancement or restoration using two or more images, e.g. averaging or subtraction
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/90—Dynamic range modification of images or parts thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10016—Video; Image sequence
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10024—Color image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30196—Human being; Person
- G06T2207/30201—Face
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30232—Surveillance
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
Abstract
The embodiment of the invention discloses a license plate image processing method, a license plate image processing device, electronic equipment and a storage medium. The license plate image processing method comprises the steps of 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 different exposure images of the same license plate image, the first license plate image is an overexposed license plate image, the second license plate image is a non-overexposed license plate image, determining a weight image according to the brightness component images, wherein pixel values in the weight image reflect contrast of license plate areas and non-license plate areas in the first license plate image and the second license plate image, and fusing the first license plate image and the second license plate image according to the weight image to obtain a fused license plate image. The embodiment of the invention realizes the improvement of the license plate image fusion effect, thereby improving the information identification accuracy of the fused license plate image.
Description
Technical Field
The embodiment of the invention relates to the technical field of image processing, in particular to a license plate image processing method, a license plate image processing device, electronic equipment and a storage medium.
Background
In a night monitoring scene or a monitoring scene with insufficient light required to use a light filling lamp, such as a tunnel, the exposure processing of a monitoring camera often cannot meet the exposure requirements of objects in different scenes, especially faces and license plates. The license plate is easy to overexposure because the face and the license plate have different reflection characteristics. Because the human face has darker brightness at night, the license plate is easy to be exposed excessively under the condition that the face of the driver is normally exposed, so that the license plate is unclear, and the face of the driver is exposed excessively under the condition that the license plate is normally exposed or exposed incompletely, so that the human face is unclear. Therefore, the acquired monitoring images are required to be processed so as to ensure the clarity of the face and the clarity and the integrity of license plate information.
The common solution to the problem is to perform two different image enhancement processes on the same image to generate two images, wherein the first image is that a face is normally exposed but a license plate is overexposed, the second image is that the license plate is normally exposed or underexposed and the face is underexposed, the normally exposed or underexposed license plate in the second image and the overexposed license plate in the first image are used for fusion, and at the moment, the first image ensures that the face and the license plate area are clear and complete at the same time.
However, in the process of fusing license plates, other non-license plate areas are arranged in the license plate image which is fused, and the license plate image is directly fused to cause inaccurate positioning of the license plate area, so that the pixel discontinuity of the edge area of the fused license plate leads to unsatisfactory final license plate fusion effect, and the recognition of license plate information is affected.
Disclosure of Invention
The embodiment of the invention provides a license plate image processing method, a license plate image processing device, electronic equipment and a storage medium, which are used for improving the fusion effect of license plate images and further improving the information identification accuracy of the fused license plate images.
In a first aspect, an embodiment of the present invention provides a license plate image processing method, including:
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 with different exposure amounts of the same license plate image, the first license plate image is an overexposure license plate image, and the second license plate image is a non-overexposure license plate image;
Determining a weight image according to the brightness component image, wherein pixel values in the weight image reflect the contrast ratio of license plate areas and non-license plate areas in the first license plate image and the second license plate image;
and fusing the first license plate image and the second license plate image according to the weight image to obtain a fused license plate image.
In a second aspect, an embodiment of the present invention further provides a license plate image processing apparatus, including:
The system comprises a brightness image extraction module, a display module and a display module, wherein the brightness image extraction module is used for 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 with different exposure amounts of the same license plate image, the first license plate image is an overexposure license plate image, and the second license plate image is a non-overexposure license plate image;
The weight image determining module is used for determining a weight image according to the brightness component image, wherein pixel values in the weight image reflect the contrast ratio of license plate areas and non-license plate areas in the first license plate image and the second license plate image;
And the license plate image fusion module is used for fusing the first license plate image and the second license plate image according to the weight image to obtain a fused license plate image.
In a third aspect, an embodiment of the present invention further provides an electronic device, including:
One or more processors;
Storage means for storing one or more programs,
The one or more programs, when executed by the one or more processors, cause the one or more processors to implement the license plate image processing method according to any of the embodiments of the present invention.
In a fourth aspect, an embodiment of the present invention further provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor, implements a license plate image processing method according to any of the embodiments of the present invention.
According to the embodiment of the invention, the weight images capable of reflecting the contrast information of the license plate region and the non-license plate region in the two images are determined based on the brightness component images of the overexposed license plate image and the non-overexposed license plate image, and the overexposed license plate image and the non-overexposed license plate image are fused based on the weight images, so that the contrast of the license plate region in the fusion result is improved, and the license plate information is highlighted. The license plate image fusion effect is improved, and the information recognition accuracy of the fused license plate image is further improved.
Drawings
Fig. 1 is a flowchart of a license plate image processing method in a first embodiment of the present invention;
fig. 2 is a flowchart of a license plate image processing method in a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a license plate image processing device in a third embodiment of the present invention;
Fig. 4 is a schematic structural diagram of an electronic device in a fourth embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
Example 1
Fig. 1 is a flowchart of a license plate image processing method in a first embodiment of the present invention, and the embodiment is applicable to a situation of accurately fusing license plate images with two exposure amounts. The method can be performed by a license plate image processing device which can be implemented in a software and/or hardware mode and can be configured in an electronic device, for example, the electronic device can be a device with communication and computing capabilities such as a background server. As shown in fig. 1, the method specifically includes:
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 with different exposure amounts of the same license plate image, the first license plate image is an overexposed license plate image, and the second license plate image is a non-overexposed license plate image.
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, and the exposure refers to the light quantity allowed to enter the lens to irradiate on the photosensitive medium in the photographing process. The first car image and the second car image may be acquired by two image acquisition devices with different exposure amounts, or an original image acquired by the image acquisition devices may be acquired, the original image may be processed based on a preset first image information processing parameter to obtain a first image, and the original image may be processed based on a preset second image information processing parameter to obtain a second image, where the first image information processing parameter is used to make the brightness of a face area in the original image reach a first preset brightness, and the second image information processing parameter is used to make the brightness of a license plate area in the original image reach a second preset brightness. Therefore, 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 images include normally exposed license plate images and underexposed license plate images. Overexposure refers to overexposure resulting in an image that is too bright, and underexposure refers to underexposure resulting in an image that is too dark.
In the first image of the first vehicle plate image, the license plate area is overexposed, the face area is normal, and in the second image of the second vehicle plate image, the face area is overexposed, and the license plate area is normal or underexposed. Therefore, the face area and the license plate area in the first image can be normally displayed by fusing the second license plate image in the second image with the first license plate image in the first image.
Specifically, because the brightness components can reflect the brightness of each pixel point in the license plate image, and human eyes are sensitive to brightness information, after the first license plate image and the second license plate image with different exposure degrees are determined, firstly, brightness component extraction is performed on the two license plate images with different exposure degrees, so that a first brightness component image of the first license plate image and a second brightness component image of the second license plate image are obtained.
The method includes the steps of obtaining two vehicle images in the same scene, converting the two vehicle images into YUV format, wherein one vehicle image is over-exposed with a license plate, the other vehicle image is normal in license plate exposure, cutting the two images according to regional coordinates of the license plate to obtain a first license plate image and a second license plate image, and extracting brightness component (Y component) images of the two license plate images. The first luminance component image of the first car image is recorded as Y1, and the second luminance component image of the second car image is recorded as Y2.
And102, determining a weight image according to the brightness component image, wherein the pixel value in the weight image reflects the contrast ratio of the license plate region and the non-license plate region in the first license plate image and the second license plate image.
In the first license plate image and the second license plate image, besides the license plate area, a non-license plate area exists, namely, a part of the vehicle body area exists, the existence of the non-license plate area can lead to the discontinuity of pixels of the license plate edge area after the two license plate images are fused, and the license plate fusion effect is not ideal. Therefore, the license plate region and the non-license plate region in the license plate image need to be distinguished during fusion, namely, the accurate extraction of the license plate region in the license plate image is realized.
And the weight image can realize the accurate extraction of the license plate region in the license plate image. Specifically, the brightness of the license plate areas in the first license plate image and the second license plate image is larger than that of the non-license plate areas, so that the license plate areas and the non-license plate areas can be identified according to the brightness values in the first brightness component image and the second brightness component image, and the weight image is determined from the brightness values, so that the pixel values in the weight image reflect the contrast of the license plate areas and the non-license plate areas in the first license plate image and the second license plate image, for example, the area with high pixel values in the weight image is the license plate area, and the area with low pixel values is the non-license plate area.
For example, the region in the weight image in which the pixel value is high is the region in which the pixel value is both high in the first luminance component image and the second luminance component image, the region in the weight image in which the pixel value is low is the region in which the pixel value is both low in the first luminance component image and the second luminance component image, and the region in which the pixel value is low in the first luminance component image and the region in which the pixel value is high in the second luminance component image are represented as intermediate pixel values in the weight image. The pixel values in the weight images can reflect the contrast of license plate areas and non-license plate areas in the first license plate image and the second license plate image.
And 103, fusing the first license plate image and the second license plate image according to the weight image to obtain a fused license plate image.
Because the contrast of the license plate region and the non-license plate region in the first license plate image and the second license plate image is reflected in the weight 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 weight license plate region in the fusion result is increased, the proportion of the non-license plate region is weakened, and the accuracy of the license plate fusion result is improved.
The pixel values in the weighted image are normalized, and the pixel points are fused according to the normalized value, for example, the normalized weighted image is Y (I, j), the pixel 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 weighted 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.
Because the contrast of the license plate region and the non-license plate region in the fused license plate image is improved, license plate information in the fused license plate image can be effectively identified, and therefore the first license plate image part in the first vehicle image is replaced by the fused license plate image, and the completeness of face information and license plate information in the updated first vehicle image can be realized.
According to the embodiment of the invention, the weight images capable of reflecting the contrast information of the license plate region and the non-license plate region in the two images are determined based on the brightness component images of the overexposed license plate image and the non-overexposed license plate image, and the overexposed license plate image and the non-overexposed license plate image are fused based on the weight images, so that the contrast of the license plate region in the fusion result is improved, and the license plate information is highlighted. The license plate image fusion effect is improved, and the information recognition accuracy of the fused license plate image is further improved.
Example two
Fig. 2 is a flowchart of a license plate image processing method in a second embodiment of the present invention, which is further optimized based on the first embodiment. As shown in fig. 2, the method includes:
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 with different exposure amounts of the same license plate image, the first license plate image is an overexposed license plate image, and the second license plate image is a non-overexposed license plate image.
And 202, performing linear light operation or point light operation on the brightness component image to obtain an intermediate weight image.
The characteristic of linear light operation and point light operation is that the difference between the bright area and the dark area in the two images is highlighted, namely the license plate area in the two license plate images is highlighted.
Specifically, the first luminance component image and the second luminance component image are subjected to linear light operation or point light operation to obtain an intermediate weight image, and the difference between a bright area and a dark area in the two images is highlighted due to the characteristics of the linear light operation and the point light operation, so that the intermediate weight image can reflect license plate areas in the two license plate images.
In one possible embodiment, the linear light operation has a calculation formula of Y3 (i, j) =y2 (i, j) +2×y1 (i, j) -255;
The calculation formula of the point light operation is as follows:
Wherein Y1 (i, j) represents a pixel value of the luminance component image of the first card image at the (i, j) position, Y2 (i, j) represents a pixel value of the luminance component image of the second card image at the (i, j) position, and Y3 (i, j) represents a pixel value of the intermediate weight image at the (i, j) position.
When the linear light operation is performed on the luminance component image, the pixel value of each pixel point in the first luminance component image is multiplied by 2, and the pixel value of the corresponding pixel point in the second luminance component image is added, and the difference between the sum and 255 is used as the intermediate weight value of the pixel point in the intermediate weight image.
When the brightness component image is subjected to point light operation, firstly, a comparison result of the pixel value of each pixel point in the first brightness component image and 128 is judged, if the pixel value of the target pixel point is smaller than or equal to 128, the middle weight value of the pixel point in the middle weight image is the minimum value of the double pixel value of the target pixel point and the pixel value of the corresponding pixel point in the second brightness component image, and if the pixel value of the target pixel point is larger than 128, the middle weight value of the pixel point in the middle weight image is the minimum value of the difference value of the double pixel value and 255 of the target pixel point and the pixel value of the corresponding pixel point in the second brightness component image.
And performing linear light operation or point light operation on the brightness component image to realize rough positioning of license plate areas in the first license plate image and the second license plate image.
Step 203, determining a weight image according to the intermediate weight image and the brightness component image of the second car plate image.
Because the intermediate weight image is used for coarsely positioning the license plate region in the license plate image, and because the second license plate image is a non-overexposed license plate image, the information of the reflected license plate region is more than that of the first license plate image, the license plate region in the license plate image is further accurately extracted by combining the intermediate weight image and the second brightness component image, and the positioning of the license plate region in the weight image is more accurate.
In one possible embodiment, determining the weight image from the intermediate weight image and the luminance component image of the second vehicle image includes:
And performing color deepening operation or linear deepening operation on the brightness component images of the intermediate weight image and the second car image to obtain a weight image.
The color deepening operation or the linear deepening operation is characterized in that the pixel value in the middle weight image is determined through the pixel value of the second brightness component image, the pixel value in the second brightness component image is darker as the pixel value in the result mixed by the second brightness component image is more towards zero and the middle weight image, the pixel value in the second brightness component image is more towards 255 and the pixel value in the result mixed by the middle weight image is more close to the pixel value in the middle weight image, the final effect is that the information of the license plate area is highlighted, the brightness of the non-license plate area is reduced, and the contrast ratio of the non-license plate area and the license plate area is improved.
Specifically, the second brightness component image and the intermediate weight image are subjected to color deepening operation or linear deepening operation to obtain the weight image, and the weight image is characterized in that the license plate area in the license plate image is highlighted, so that the weight image can accurately extract the license plate area, namely, the position information of the license plate area is determined according to the pixel value distribution in the weight image.
In one possible embodiment, the color deepening operation is calculated as:
The calculation formula of the linear deepening operation is Y4 (i, j) =Y3 (i, j) +Y2 (i, j) -255;
Wherein Y1 (i, j) represents a pixel value of the luminance component image of the first card image at the (i, j) position, Y2 (i, j) represents a pixel value of the luminance component image of the second card image at the (i, j) position, Y3 (i, j) represents a pixel value of the intermediate weight image at the (i, j) position, and Y4 (i, j) represents a pixel value of the weight image at the (i, j) position.
When the color deepening operation is carried out on the intermediate weight image and the second brightness component image, the ratio of the product of 255 and the difference value of each point in the intermediate weight image and the second brightness component image to the second brightness component image is determined, and the difference between the weight value of the point in the intermediate weight image and the ratio is determined as the weight value of the corresponding point in the weight image.
When the linear deepening operation is performed on the intermediate weight image and the second luminance component image, the pixel value of each pixel point in the second luminance component image and the pixel value of the corresponding pixel point in the intermediate weight image are added, and the difference between the sum and 255 is used as the weight value of the pixel point in the weight image.
By performing color deepening operation or linear deepening operation on the intermediate weight image and the second brightness component image, the accuracy of extracting the license plate region is improved, and the contrast ratio of the license plate region and the non-license plate region in the license plate image is improved.
Through the operation, the license plate image is further processed for the second time by utilizing the difference between the pixel values of the license plate region and the non-license plate region in the first license plate image and the second license plate image, and the weight image capable of reflecting the position of the accurate license plate region is extracted, so that the effect and the accuracy of license plate fusion are improved.
And 204, fusing the first license plate image and the second license plate image according to the weight image to obtain a fused license plate image.
In one possible embodiment, fusing the first license plate image and the second license plate image according to the weight image to obtain a fused license plate image includes:
Wherein Y1 (i, j) represents a pixel value of the luminance component image of the first card image at the (i, j) position, and Y2 (i, j) represents a pixel value of the luminance component image of the second card image at the (i, j) position;
U1 (i, j) represents a pixel value of the chrominance U component image of the first car image at the (i, j) position, and U2 (i, j) represents a pixel value of the chrominance U component image of the second car image at the (i, j) position;
v1 (i, j) represents a pixel value of the chrominance V component image of the first car image at the (i, j) position, and V2 (i, j) represents a pixel value of the chrominance V component image of the second car image at the (i, j) position;
I Y (I, j) represents the pixel value of the luminance component image of the fused license plate image at the (I, j) position, I U (I, j) represents the pixel value of the chrominance U component image of the fused license plate image at the (I, j) position, I V (I, j) represents the pixel value of the chrominance V component image of the fused license plate image at the (I, j) position;
y4 (i, j) represents the pixel value of the weighted image at the (i, j) position.
Because the contrast of the license plate region and the non-license plate region in the first license plate image and the second license plate image is reflected in the weight 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 weight license plate region in the fusion result is increased, the proportion of the non-license plate region is weakened, and the accuracy of the license plate fusion result is improved.
Specifically, each component image of the fused license plate image in the YUV format is respectively determined, corresponding component images of the first license plate image and the second license plate image are fused based on weight values in the weight images, a Y component image, a U component image and a V component image of the fused license plate image are obtained, and finally the fused license plate images in other formats are obtained through conversion according to the Y component image, the U component image and the V component image of the fused license plate image.
Optionally, after the weight image is obtained, the pixel value in the weight image may be normalized because the value range in the weight image is 0 to 255, and each component image may be fused according to the normalized weight value. For example, after normalizing the weight image, the value range of each point in the weight image is 0 to 1, and each component image of the fused license plate image is obtained according to the following formula:
In a possible embodiment, after determining the weight image from the luminance component image, further comprising:
performing morphological closing operation on the weight image to obtain a target weight image;
Correspondingly, fusing the first card image and the second card image according to the weight image comprises the following steps:
and fusing the first card image and the second card image according to the target weight image.
In order to improve the accuracy of license plate region extraction in the weight image, morphological closing operation is performed on the weight image, morphological expansion operation is performed first, and then morphological corrosion operation is performed, so that the contour of the license plate region in the weight image becomes smooth, narrow discontinuities can be closed, and small holes can be filled.
Specifically, morphological closing operation is performed on the weighted image, so that the contour of the image becomes smooth and narrow discontinuities can be closed to fill small holes. The edge of the license plate of the weight map is smoother through the closed operation processing, and meanwhile noise is filtered out to fill the discontinuous areas of the characters of the license plate, so that the final license plate image fusion effect is improved. The shape and size of the structural elements of the closed operation are not limited in the embodiment of the present invention, and 3*3 square structural elements may be used as an example. In any embodiment of the present invention, the morphological closing operation on the weighted image may be performed.
After morphological closing operation is carried out on the weight images, the first car plate image and the second car plate image are fused based on the target weight images obtained through the closing operation, and fusion accuracy is improved.
According to the embodiment of the invention, the weight images capable of reflecting the contrast information of the license plate region and the non-license plate region in the two images are determined based on the brightness component images of the overexposed license plate image and the non-overexposed license plate image, and the overexposed license plate image and the non-overexposed license plate image are fused based on the weight images, so that the contrast of the license plate region in the fusion result is improved, and the license plate information is highlighted. The license plate image fusion effect is improved, and the information recognition accuracy of the fused license plate image is further improved.
The embodiment of the invention mainly solves the problem of poor fusion effect of the final license plate image caused by inaccurate license plate region extraction in the fusion scheme of the overexposed license plate image and the non-overexposed license plate image. According to the embodiment of the invention, the accurate license plate region and the final fusion weight value are obtained by comparing the brightness value difference between the first license plate image and the second license plate image and performing linear light operation or point light operation, color deepening operation or linear deepening operation and closing operation processing, and the first license plate image and the second license plate are fused based on the target weight image, so that the fusion effect and algorithm robustness are improved.
Example III
Fig. 3 is a schematic structural diagram of a license plate image processing device in a third embodiment of the present invention, and the embodiment is applicable to a situation of accurately fusing license plate images with two exposure amounts. As shown in fig. 3, the apparatus includes:
the brightness image extraction module 310 is configured to extract brightness component images of a first license plate image and a second license plate image, where the first license plate image and the second license plate image are different exposure images of the same license plate image, 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 determining module 320, configured to determine a weight image according to the luminance component image, where pixel values in the weight image reflect contrast between license plate regions and non-license plate regions in the first and second license plate images;
And the license plate image fusion module 330 is configured to fuse the first license plate image and the second license plate image according to the weight image, so as to obtain a fused license plate image.
According to the embodiment of the invention, the weight images capable of reflecting the contrast information of the license plate region and the non-license plate region in the two images are determined based on the brightness component images of the overexposed license plate image and the non-overexposed license plate image, and the overexposed license plate image and the non-overexposed license plate image are fused based on the weight images, so that the contrast of the license plate region in the fusion result is improved, and the license plate information is highlighted. The license plate image fusion effect is improved, and the information recognition accuracy of the fused license plate image is further improved.
Optionally, the weight image determining module includes:
the intermediate weight image determining unit is used for carrying out linear light operation or point light operation on the brightness component image to obtain an intermediate weight image;
And a weight image determining unit configured to determine a weight image from the intermediate weight image and the luminance component image of the second vehicle image.
Optionally, the weight image determining unit is specifically configured to:
and performing color deepening operation or linear deepening operation on the brightness component images of the intermediate weight image and the second car image to obtain a weight image.
Optionally, 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 as follows:
Wherein Y1 (i, j) represents a pixel value of the luminance component image of the first card image at the (i, j) position, Y2 (i, j) represents a pixel value of the luminance component image of the second card image at the (i, j) position, and Y3 (i, j) represents a pixel value of the intermediate weight image at the (i, j) position.
Optionally, the calculation formula of the color deepening operation is:
the calculation formula of the linear deepening operation is Y4 (i, j) =Y3 (i, j) +Y2 (i, j) -255;
Wherein Y1 (i, j) represents a pixel value of the luminance component image of the first card image at the (i, j) position, Y2 (i, j) represents a pixel value of the luminance component image of the second card image at the (i, j) position, Y3 (i, j) represents a pixel value of the intermediate weight image at the (i, j) position, and Y4 (i, j) represents a pixel value of the weight image at the (i, j) position.
Optionally, the license plate image fusion module is specifically configured to:
Wherein Y1 (i, j) represents a pixel value of the luminance component image of the first card image at the (i, j) position, and Y2 (i, j) represents a pixel value of the luminance component image of the second card image at the (i, j) position;
U1 (i, j) represents a pixel value of the chrominance U component image of the first car image at the (i, j) position, and U2 (i, j) represents a pixel value of the chrominance U component image of the second car image at the (i, j) position;
v1 (i, j) represents a pixel value of the chrominance V component image of the first car image at the (i, j) position, and V2 (i, j) represents a pixel value of the chrominance V component image of the second car image at the (i, j) position;
I Y (I, j) represents the pixel value of the luminance component image of the fused license plate image at the (I, j) position, I U (I, j) represents the pixel value of the chrominance U component image of the fused license plate image at the (I, j) position, I V (I, j) represents the pixel value of the chrominance V component image of the fused license plate image at the (I, j) position;
y4 (i, j) represents the pixel value of the weighted image at the (i, j) position.
Optionally, the apparatus further comprises a weight image processing module for
After determining a weight image according to the brightness component image, performing morphological closing operation on the weight image to obtain a target weight image;
Correspondingly, the license plate image fusion module is specifically used for:
and fusing the first car image and the second car image according to the target weight image.
The license plate image processing device provided by the embodiment of the invention can execute the license plate image processing method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of executing the license plate image processing method.
Example IV
Fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention. Fig. 4 illustrates a block diagram of an exemplary electronic device 12 suitable for use in implementing embodiments of the present invention. The electronic device 12 shown in fig. 4 is merely an example and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 4, 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, a system memory device 28, and a bus 18 that connects the various system components, including the system memory device 28 and the processing unit 16.
Bus 18 represents one or more of several types of bus structures, including a memory device bus or memory 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, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, micro channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 12 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by electronic device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system storage 28 may include computer system readable media in the form of volatile memory such as Random Access Memory (RAM) 30 and/or cache memory 32. The electronic device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from or write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, commonly referred to as a "hard disk drive"). Although not shown in fig. 4, a magnetic disk drive for reading from and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In such cases, each drive may be coupled to bus 18 through 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 configured to carry out the functions of the embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in storage 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 or some combination of which may include an implementation of a network environment. Program modules 42 generally perform the functions and/or methods of the embodiments described herein.
The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with the device 12, and/or any devices (e.g., network card, modem, etc.) that enable the device 12 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 22. Also, the electronic device 12 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet, through a network adapter 20. As shown in fig. 4, the network adapter 20 communicates with other modules of the electronic device 12 over the bus 18. It should be appreciated that although not shown in FIG. 4, other hardware and/or software modules may be used in connection with electronic device 12, including, but not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
The processing unit 16 executes various functional applications and data processing by running a program stored in the system storage device 28, for example, implementing the license plate image processing method provided by the embodiment of the present invention, including:
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 with different exposure amounts of the same license plate image, the first license plate image is an overexposure license plate image, and the second license plate image is a non-overexposure license plate image;
Determining a weight image according to the brightness component image, wherein pixel values in the weight image reflect the contrast ratio of license plate areas and non-license plate areas in the first license plate image and the second license plate image;
and fusing the first license plate image and the second license plate image according to the weight image to obtain a fused license plate image.
Example five
The fifth embodiment of the present invention further provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the license plate image processing method as provided by the embodiment of the present invention, including:
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 with different exposure amounts of the same license plate image, the first license plate image is an overexposure license plate image, and the second license plate image is a non-overexposure license plate image;
Determining a weight image according to the brightness component image, wherein pixel values in the weight image reflect the contrast ratio of license plate areas and non-license plate areas in the first license plate image and the second license plate image;
and fusing the first license plate image and the second license plate image according to the weight image to obtain a fused license plate image.
The computer storage media of embodiments of the invention may take the form of any combination of one or more computer-readable media. The computer readable medium may 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, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium include an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a 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.
Computer program code for carrying out operations of the present invention may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.
Claims (10)
1. A license plate image processing method, characterized by comprising:
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 with different exposure amounts of the same license plate image, the first license plate image is an overexposure license plate image, and the second license plate image is a non-overexposure license plate image;
Determining a weight image according to the brightness component image, wherein pixel values in the weight image reflect the contrast ratio of license plate areas and non-license plate areas in the first license plate image and the second license plate image;
and fusing the first license plate image and the second license plate image according to the weight image to obtain a fused license plate image.
2. The method of claim 1, wherein determining a weighted image from the luminance component image comprises:
performing linear light operation or point light operation on the brightness component image to obtain an intermediate weight image;
and determining a weight image according to the brightness component images of the intermediate weight image and the second car plate image.
3. The method of claim 2, wherein determining a weight image from the intermediate weight image and the luminance component image of the second vehicle image comprises:
and performing color deepening operation or linear deepening operation on the brightness component images of the intermediate weight image and the second car image to obtain a weight image.
4. The method of claim 2, wherein the linear light operation has a calculation formula of Y3 (i, j) =y2 (i, j) +2×y1 (i, j) -255;
The calculation formula of the point light operation is as follows:
Wherein Y1 (i, j) represents a pixel value of the luminance component image of the first card image at the (i, j) position, Y2 (i, j) represents a pixel value of the luminance component image of the second card image at the (i, j) position, and Y3 (i, j) represents a pixel value of the intermediate weight image at the (i, j) position.
5. A method according to claim 3, wherein the color deepening operation is calculated by the formula:
the calculation formula of the linear deepening operation is Y4 (i, j) =Y3 (i, j) +Y2 (i, j) -255;
Wherein Y1 (i, j) represents a pixel value of the luminance component image of the first card image at the (i, j) position, Y2 (i, j) represents a pixel value of the luminance component image of the second card image at the (i, j) position, Y3 (i, j) represents a pixel value of the intermediate weight image at the (i, j) position, and Y4 (i, j) represents a pixel value of the weight image at the (i, j) position.
6. The method according to any one of claims 1-5, wherein fusing the first license plate image and the second license plate image according to the weight image to obtain a fused license plate image comprises:
Wherein Y1 (i, j) represents a pixel value of the luminance component image of the first card image at the (i, j) position, and Y2 (i, j) represents a pixel value of the luminance component image of the second card image at the (i, j) position;
U1 (i, j) represents a pixel value of the chrominance U component image of the first car image at the (i, j) position, and U2 (i, j) represents a pixel value of the chrominance U component image of the second car image at the (i, j) position;
v1 (i, j) represents a pixel value of the chrominance V component image of the first car image at the (i, j) position, and V2 (i, j) represents a pixel value of the chrominance V component image of the second car image at the (i, j) position;
I Y (I, j) represents the pixel value of the luminance component image of the fused license plate image at the (I, j) position, I U (I, j) represents the pixel value of the chrominance U component image of the fused license plate image at the (I, j) position, I V (I, j) represents the pixel value of the chrominance V component image of the fused license plate image at the (I, j) position;
y4 (i, j) represents the pixel value of the weighted image at the (i, j) position.
7. The method according to claim 1, further comprising, after determining a weight image from the luminance component image:
performing morphological closing operation on the weight image to obtain a target weight image;
Correspondingly, fusing the first card image and the second card image according to the weight image comprises the following steps:
and fusing the first car image and the second car image according to the target weight image.
8. A license plate image processing apparatus, comprising:
The system comprises a brightness image extraction module, a display module and a display module, wherein the brightness image extraction module is used for 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 with different exposure amounts of the same license plate image, the first license plate image is an overexposure license plate image, and the second license plate image is a non-overexposure license plate image;
The weight image determining module is used for determining a weight image according to the brightness component image, wherein pixel values in the weight image reflect the contrast ratio of license plate areas and non-license plate areas in the first license plate image and the second license plate image;
And the license plate image fusion module is used for fusing 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, comprising:
One or more processors;
Storage means for storing one or more programs,
The one or more programs, when executed by the one or more processors, cause the one or more processors to implement the license plate image processing method of any of claims 1-7.
10. A computer-readable storage medium having stored thereon a computer program, which when executed by a processor, implements the license plate image processing method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011486790.0A CN114639133B (en) | 2020-12-16 | 2020-12-16 | License plate image processing method, device, electronic device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011486790.0A CN114639133B (en) | 2020-12-16 | 2020-12-16 | License plate image processing method, device, electronic device and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114639133A CN114639133A (en) | 2022-06-17 |
CN114639133B true CN114639133B (en) | 2025-04-25 |
Family
ID=81945101
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011486790.0A Active CN114639133B (en) | 2020-12-16 | 2020-12-16 | License plate image processing method, device, electronic device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114639133B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN119314122B (en) * | 2024-12-17 | 2025-04-04 | 浙江宇视科技有限公司 | License plate image processing method, device, electronic device and storage medium |
CN119360362B (en) * | 2024-12-27 | 2025-04-01 | 杭州海康威视数字技术股份有限公司 | Image processing method and device, electronic equipment and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20110084025A (en) * | 2010-01-15 | 2011-07-21 | 삼성전자주식회사 | Image Synthesis Apparatus and Method for Synthesizing Multiple Exposure Images |
CN111582268A (en) * | 2020-04-13 | 2020-08-25 | 浙江大华技术股份有限公司 | License plate image processing method and device and computer storage medium |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110136071B (en) * | 2018-02-02 | 2021-06-25 | 杭州海康威视数字技术股份有限公司 | An image processing method, device, electronic device and storage medium |
KR102045538B1 (en) * | 2018-05-31 | 2019-11-15 | 한양대학교 산학협력단 | Method for multi exposure image fusion based on patch and apparatus for the same |
CN110751608B (en) * | 2019-10-23 | 2022-08-16 | 北京迈格威科技有限公司 | Night scene high dynamic range image fusion method and device and electronic equipment |
CN111582046B (en) * | 2020-04-15 | 2023-09-05 | 浙江大华技术股份有限公司 | License plate image processing method and device |
CN111754440B (en) * | 2020-06-29 | 2023-05-05 | 苏州科达科技股份有限公司 | License plate image enhancement method, system, equipment and storage medium |
-
2020
- 2020-12-16 CN CN202011486790.0A patent/CN114639133B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20110084025A (en) * | 2010-01-15 | 2011-07-21 | 삼성전자주식회사 | Image Synthesis Apparatus and Method for Synthesizing Multiple Exposure Images |
CN111582268A (en) * | 2020-04-13 | 2020-08-25 | 浙江大华技术股份有限公司 | License plate image processing method and device and computer storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN114639133A (en) | 2022-06-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110276767B (en) | Image processing method and apparatus, electronic device, computer-readable storage medium | |
CN110189336B (en) | Image generation method, system, server and storage medium | |
CN108564082B (en) | Image processing method, device, server and medium | |
CN107610091A (en) | Vehicle insurance image processing method, device, server and system | |
CN114639133B (en) | License plate image processing method, device, electronic device and storage medium | |
WO2021046793A1 (en) | Image acquisition method and apparatus, and storage medium | |
WO2019214321A1 (en) | Vehicle damage identification processing method, processing device, client and server | |
CN112991349B (en) | Image processing method, device, equipment and storage medium | |
CN115115562B (en) | Image fusion method and device | |
CN113689493A (en) | Lens attachment detection method, lens attachment detection device, electronic equipment and storage medium | |
CN112312001B (en) | Image detection method, device, equipment and computer storage medium | |
US11420561B2 (en) | Lateral image processing apparatus and method of mirrorless car | |
CN111741228B (en) | Exposure adjusting method and device for panoramic image | |
CN115019034A (en) | Detection model training method and device, object detection method and device | |
CN112036342B (en) | Document snapshot method, device and computer storage medium | |
CN113255516A (en) | Living body detection method and device and electronic equipment | |
CN113099101B (en) | Camera shooting parameter adjusting method and device and electronic equipment | |
CN109740526B (en) | Signal lamp identification method, device, equipment and medium | |
CN110636222B (en) | Photographing control method and device, terminal equipment and storage medium | |
CN114255177A (en) | Exposure control method, device, equipment and storage medium in imaging | |
CN117315406B (en) | Sample image processing method, device and equipment | |
CN109934185B (en) | Data processing method and device, medium and computing equipment | |
CN117994542A (en) | Foreign matter detection method, device and system | |
CN116506737A (en) | Method, device, equipment and storage medium for determining exposure parameters | |
CN111914850A (en) | Picture feature extraction method, device, server and medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |