License plate enhancement method, device, equipment and computer-readable storage medium
By adaptively selecting visible light and infrared image frames for license plate enhancement processing, the problem of poor license plate image quality in the absence of visible light fill light is solved, and efficient license plate image enhancement is achieved in dark environments.
Patent Information
- Application Number
- CN202211153754.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-21
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2042-09-21
AI Technical Summary
In the absence of visible light fill light, the quality of license plate images captured in dark environments is poor, resulting in poor license plate enhancement effects.
By acquiring visible light images and infrared images, the dark frame image or infrared image is adaptively selected as the optimal frame image for license plate enhancement processing, including the processing of dark frame images and bright frame images, selecting the optimal frame image according to the exposure status, and performing color correction and stitching to improve the quality of the license plate image.
In the absence of visible light fill light, the license plate enhancement effect is improved, especially the clarity and background cleanliness of black font license plates, which enhances the visual effect of the license plate image.
Smart Images

Figure CN115601254B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to a license plate enhancement method, device, equipment and computer-readable storage medium. Background Art
[0002] License plate enhancement is the process of enhancing unclear or difficult-to-recognize license plate images to improve their visual quality. Currently, license plate enhancement primarily targets visible light images captured by cameras equipped with visible light fill lights. However, in some application scenarios, this may not be possible. For example, due to light pollution, some cities prohibit the use of visible light fill lights at night. In these cases, the quality of the visible light images captured in dark environments is poor, making license plate image restoration more difficult. Consequently, license plate enhancement results in suboptimal results. Summary of the Invention
[0003] The main purpose of the present invention is to provide a license plate enhancement method, device, equipment and computer-readable storage medium, aiming to propose a license plate enhancement scheme that adaptively selects the optimal frame image to improve the license plate enhancement effect in the absence of visible light fill light.
[0004] To achieve the above object, the present invention provides a license plate enhancement method, which comprises the following steps:
[0005] Obtaining visible light images and infrared images obtained by image acquisition of the license plate;
[0006] Processing the visible light image to obtain a dark frame image and a bright frame image, wherein a brightness level of the dark frame image is lower than a brightness level of the bright frame image;
[0007] If the exposure state of the infrared image is a normal exposure state, taking the infrared image as the optimal frame image;
[0008] If the exposure state of the infrared image is a serious overexposure state, the dark frame image is used as the optimal frame image;
[0009] The optimal frame image and the bright frame image are subjected to license plate enhancement processing to obtain an enhanced license plate image.
[0010] Optionally, after the step of processing the visible light image to obtain a dark frame image and a bright frame image, the method further includes:
[0011] If the average brightness value of each pixel of the bright frame image is greater than a first preset brightness threshold, and the exposure rate of the infrared image is greater than a preset exposure threshold, then determining that the exposure state of the infrared image is a severe overexposure state;
[0012] If the average brightness value is less than or equal to the first preset brightness threshold, or the exposure rate is less than or equal to the preset exposure threshold, it is determined that the exposure state of the infrared image is a normal exposure state.
[0013] Optionally, after the step of acquiring the visible light image and the infrared image obtained by image acquisition of the license plate, the method further includes:
[0014] The exposure rate of the infrared image is obtained by dividing the number of pixels in the license plate area in the infrared image whose brightness value is greater than a second preset brightness threshold by the total number of pixels in the license plate area.
[0015] Optionally, after the step of processing the visible light image to obtain a dark frame image and a bright frame image, the method further includes:
[0016] Performing license plate area detection on the dark frame image to obtain a first area position where the license plate area is located in the dark frame image;
[0017] According to the correspondence between the dark frame image and the pixel points in the infrared image, the area defined by the second area position in the infrared image corresponding to the first area position is used as the license plate area in the infrared image.
[0018] Optionally, the step of performing license plate enhancement processing on the optimal frame image and the bright frame image to obtain an enhanced license plate image includes:
[0019] Dividing the square of the average brightness value of the bright frame image by the average brightness value of the optimal frame image to obtain a target ratio;
[0020] Multiplying the grayscale value of each pixel in the first grayscale image converted from the optimal frame image by the target ratio to obtain a second grayscale image;
[0021] Converting the grayscale value of each pixel in the license plate area in the second grayscale image into a standard license plate color value to obtain a color-corrected image;
[0022] The license plate area in the color-corrected image is spliced with the area other than the license plate area in the bright frame image to obtain an enhanced license plate image.
[0023] Optionally, the step of splicing the license plate area in the color-corrected image with the area excluding the license plate area in the bright frame image to obtain an enhanced license plate image includes:
[0024] Performing a weighted summation of the pixel values of the pixel points in the color-corrected image and the pixel values of the pixel points at corresponding positions in the bright frame image to obtain an enhanced license plate image;
[0025] Among them, the weighted weight of the pixel points in the license plate area in the color-corrected image is greater than the weighted weight of the pixel points at the corresponding position in the bright frame image, the weighted weight of the pixel points outside the license plate area in the color-corrected image is less than the weighted weight of the pixel points at the corresponding position in the bright frame image, and the pixel points in the transition area of the color-corrected image that are closer to the center of the license plate area have greater weighted weights, and the transition area is the peripheral area of the license plate area.
[0026] Optionally, the step of converting the grayscale value of each pixel in the license plate area in the second grayscale image into a standard license plate color value to obtain a color-corrected image includes:
[0027] When the license plate is a gradient color license plate, converting the grayscale value of each pixel in the license plate area in the second grayscale image into the product of the standard license plate color value and the gradient coefficient to obtain a color-corrected image, wherein the gradient coefficient corresponding to each pixel is calculated based on the size of the license plate area in the second grayscale image and the gradient effect parameter of the gradient color license plate;
[0028] When the license plate is a spliced color license plate, the color segmentation position of the license plate area in the second grayscale image is determined according to the size of the license plate area in the second grayscale image and the splicing effect parameters of the spliced color license plate, and each pixel point in the license plate area in the second grayscale image is converted into a corresponding standard splicing color value according to the color segmentation position to obtain a color corrected image.
[0029] To achieve the above object, the present invention further provides a license plate enhancement device, comprising:
[0030] An acquisition module is used to acquire visible light images and infrared images obtained by image acquisition of the license plate;
[0031] a first processing module, configured to process the visible light image to obtain a dark frame image and a bright frame image, wherein a brightness level of the dark frame image is lower than a brightness level of the bright frame image;
[0032] a determination module configured to use the infrared image as the optimal frame image if the exposure state of the infrared image is a normal exposure state; and use the dark frame image as the optimal frame image if the exposure state of the infrared image is a serious overexposure state;
[0033] The second processing module is configured to perform license plate enhancement processing on the optimal frame image and the bright frame image to obtain an enhanced license plate image.
[0034] To achieve the above-mentioned purpose, the present invention also provides a license plate enhancement device, which includes: a memory, a processor, and a license plate enhancement program stored in the memory and runnable on the processor. When the license plate enhancement program is executed by the processor, the steps of the license plate enhancement method described above are implemented.
[0035] In addition, to achieve the above objectives, the present invention also proposes a computer-readable storage medium, on which a license plate enhancement program is stored. When the license plate enhancement program is executed by a processor, the steps of the license plate enhancement method described above are implemented.
[0036] In the present invention, a visible light image and an infrared image are acquired by capturing an image of a license plate; the visible light image is processed to obtain a dark frame image and a bright frame image, wherein the brightness level of the dark frame image is lower than that of the bright frame image; if the exposure state of the infrared image is normal, the infrared image is used as the optimal frame image; if the exposure state of the infrared image is severely overexposed, the dark frame image is used as the optimal frame image; and license plate enhancement processing is performed on the optimal frame image and the bright frame image to obtain an enhanced license plate image. The present invention proposes a license plate enhancement scheme that adaptively selects the optimal frame image. In good ambient light conditions, the higher-quality dark frames and bright frames are selected for license plate enhancement, while in poor ambient light conditions, the higher-quality infrared frames and bright frames are selected for license plate enhancement. This improves the license plate enhancement effect in the absence of a visible light fill light. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 A schematic diagram of the hardware operating environment involved in an embodiment of the present invention;
[0038] Figure 2 This is a flow chart of a first embodiment of a license plate enhancement method according to the present invention;
[0039] Figure 3 The figure is a schematic diagram of a license plate image according to an embodiment of the present invention.
[0040] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION
[0041] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0042] like Figure 1 As shown, Figure 1 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present invention.
[0043] It should be noted that the license plate enhancement device in the embodiment of the present invention can be a smart phone, a personal computer, a server and other devices, and no specific limitation is made here.
[0044] like Figure 1 As shown, the license plate enhancement device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. The communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0045] Those skilled in the art will understand that Figure 1 The device structure shown in the figure does not constitute a limitation on the license plate enhancement device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0046] like Figure 1 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module and a license plate enhancement program. The operating system is a program that manages and controls the hardware and software resources of the device and supports the operation of the license plate enhancement program and other software or programs. Figure 1 In the device shown, the user interface 1003 is mainly used to communicate data with the client; the network interface 1004 is mainly used to establish a communication connection with the server; and the processor 1001 can be used to call the license plate enhancement program stored in the memory 1005 and perform the following operations:
[0047] Obtaining visible light images and infrared images obtained by image acquisition of the license plate;
[0048] Processing the visible light image to obtain a dark frame image and a bright frame image, wherein a brightness level of the dark frame image is lower than a brightness level of the bright frame image;
[0049] If the exposure state of the infrared image is a normal exposure state, taking the infrared image as the optimal frame image;
[0050] If the exposure state of the infrared image is a serious overexposure state, the dark frame image is used as the optimal frame image;
[0051] The optimal frame image and the bright frame image are subjected to license plate enhancement processing to obtain an enhanced license plate image.
[0052] Furthermore, after the operation of processing the visible light image to obtain the dark frame image and the bright frame image, the processor 1001 may also be used to call the license plate enhancement program stored in the memory 1005 to perform the following operations:
[0053] If the average brightness value of each pixel of the bright frame image is greater than a first preset brightness threshold, and the exposure rate of the infrared image is greater than a preset exposure threshold, then determining that the exposure state of the infrared image is a severe overexposure state;
[0054] If the average brightness value is less than or equal to the first preset brightness threshold, or the exposure rate is less than or equal to the preset exposure threshold, it is determined that the exposure state of the infrared image is a normal exposure state.
[0055] Furthermore, after acquiring the visible light image and infrared image obtained by image acquisition of the license plate, the processor 1001 may also be configured to call the license plate enhancement program stored in the memory 1005 and perform the following operations:
[0056] The exposure rate of the infrared image is obtained by dividing the number of pixels in the license plate area in the infrared image whose brightness value is greater than a second preset brightness threshold by the total number of pixels in the license plate area.
[0057] Furthermore, after the operation of processing the visible light image to obtain the dark frame image and the bright frame image, the processor 1001 may also be used to call the license plate enhancement program stored in the memory 1005 to perform the following operations:
[0058] Performing license plate area detection on the dark frame image to obtain a first area position where the license plate area is located in the dark frame image;
[0059] According to the correspondence between the dark frame image and the pixel points in the infrared image, the area defined by the second area position in the infrared image corresponding to the first area position is used as the license plate area in the infrared image.
[0060] Furthermore, the operation of performing license plate enhancement processing on the optimal frame image and the bright frame image to obtain an enhanced license plate image includes:
[0061] Dividing the square of the average brightness value of the bright frame image by the average brightness value of the optimal frame image to obtain a target ratio;
[0062] Multiplying the grayscale value of each pixel in the first grayscale image converted from the optimal frame image by the target ratio to obtain a second grayscale image;
[0063] Converting the grayscale value of each pixel in the license plate area in the second grayscale image into a standard license plate color value to obtain a color-corrected image;
[0064] The license plate area in the color-corrected image is spliced with the area other than the license plate area in the bright frame image to obtain an enhanced license plate image.
[0065] Furthermore, the operation of splicing the license plate area in the color-corrected image with the area other than the license plate area in the bright frame image to obtain an enhanced license plate image includes:
[0066] Performing a weighted summation of the pixel values of the pixel points in the color-corrected image and the pixel values of the pixel points at corresponding positions in the bright frame image to obtain an enhanced license plate image;
[0067] Among them, the weighted weight of the pixel points in the license plate area in the color-corrected image is greater than the weighted weight of the pixel points at the corresponding position in the bright frame image, the weighted weight of the pixel points outside the license plate area in the color-corrected image is less than the weighted weight of the pixel points at the corresponding position in the bright frame image, and the pixel points in the transition area of the color-corrected image that are closer to the center of the license plate area have greater weighted weights, and the transition area is the peripheral area of the license plate area.
[0068] Furthermore, the operation of converting the grayscale value of each pixel in the license plate area in the second grayscale image into a standard license plate color value to obtain a color-corrected image includes:
[0069] When the license plate is a gradient color license plate, converting the grayscale value of each pixel in the license plate area in the second grayscale image into the product of the standard license plate color value and the gradient coefficient to obtain a color-corrected image, wherein the gradient coefficient corresponding to each pixel is calculated based on the size of the license plate area in the second grayscale image and the gradient effect parameter of the gradient color license plate;
[0070] When the license plate is a spliced color license plate, the color segmentation position of the license plate area in the second grayscale image is determined according to the size of the license plate area in the second grayscale image and the splicing effect parameters of the spliced color license plate, and each pixel point in the license plate area in the second grayscale image is converted into a corresponding standard splicing color value according to the color segmentation position to obtain a color corrected image.
[0071] Based on the above structure, various embodiments of the license plate enhancement method are proposed.
[0072] Reference Figure 2 , Figure 2 Schematic diagram of the process of the first embodiment of the license plate enhancement method of the present invention.
[0073] The embodiments of the present invention provide embodiments of a license plate enhancement method. It should be noted that although the flowcharts illustrate a logical order, in some cases, the steps shown or described may be performed in a different order than that shown. In this embodiment, the license plate enhancement method may be executed by a device such as a smartphone, a personal computer, or a server, but this is not a limitation in this embodiment. In this embodiment, the execution entity is omitted for ease of description. In this embodiment, the license plate enhancement method includes the following steps:
[0074] Step S10, acquiring a visible light image and an infrared image obtained by performing image acquisition on the license plate;
[0075] In this embodiment, in order to solve the problem that the quality of visible light images captured in dark environments is poor in the absence of visible light fill lights, which makes it difficult to restore the license plate image and the license plate enhancement effect is poor, a license plate enhancement scheme that adaptively selects the optimal frame image is proposed to improve the license plate enhancement effect in the absence of visible light fill lights.
[0076] Specifically, a visible light image acquisition device and an infrared image acquisition device can be used to capture images of license plates, thereby obtaining visible light images and infrared images. The specific implementation of the visible light image acquisition device and the infrared image acquisition device is not limited in this embodiment. The placement of the visible light image acquisition device and the infrared image acquisition device can be determined based on the requirements of the specific application scenario, and is not limited in this embodiment. For example, the visible light image acquisition device and the infrared image acquisition device can be placed at locations such as road checkpoints and parking lot entrances and exits to capture license plate images of passing vehicles.
[0077] In one embodiment, to improve the quality of the captured visible light images, a visible light strobe light can be provided in conjunction with the visible light collection device. It should be noted that the visible light fill light in each embodiment of the present invention refers to a visible light strobe light that flashes at the moment of image capture to supplement the shooting environment with stronger visible light, thereby improving the quality of the captured visible light images. A visible light strobe light can also supplement the shooting environment with a certain amount of visible light, but its light intensity is relatively weak and will not cause serious light pollution.
[0078] In one embodiment, to improve the quality of the captured infrared images, an infrared strobe light may be provided with the infrared image capture device. Since infrared light is invisible, the infrared strobe light does not cause light pollution.
[0079] It should be noted that when capturing license plate images, the license plate area may only occupy a small area in the original image, and the vehicle body and surrounding environment may also be captured. In one embodiment, to improve the license plate enhancement effect and reduce the computational complexity, a region of interest (ROI) can be extracted from the original image and then enhanced within the region of interest. The ROI can include the license plate area and a portion of the area outside the license plate area (hereinafter referred to as the license plate extension area for distinction). Therefore, the acquired visible light image and infrared image are images corresponding to the extracted ROI. The method for extracting the ROI is not limited in this embodiment.
[0080] Step S20, processing the visible light image to obtain a dark frame image and a bright frame image, wherein the brightness level of the dark frame image is lower than the brightness level of the bright frame image;
[0081] The acquired visible light image may be an unprocessed original image, such as a visible light Bayer image. The visible light image is processed to obtain a dark frame image and a light frame image, wherein the brightness level of the dark frame image is lower than that of the light frame image. The dark frame image and the light frame image may specifically be, but are not limited to, YUV-encoded YUV images. The brightness level may be specifically represented by the brightness value of each pixel; the brightness level of the dark frame image being lower than that of the light frame image may specifically mean that the average brightness value of each pixel in the dark frame image is lower than the average brightness value of each pixel in the light frame image, or it may also mean that the brightness value of each pixel in the dark frame image is lower than the brightness value of the pixel at the corresponding position in the light frame image.
[0082] It should be noted that since the material of the license plate is reflective, the license plate area is a highlight area in the visible light image, and other areas are relatively dark shadow areas. Processing the visible light image to obtain a dark frame image is to ensure that the highlight area is not overexposed, and processing to obtain a bright frame image is to prioritize ensuring the brightness of the shadow area.
[0083] It is understandable that the dark frame image and the bright frame image are processed in different ways, so two images with different brightness levels are obtained. The processing method is not limited in this embodiment. For example, in one embodiment, different gamma transforms can be performed on the visible light image to obtain a dark frame image and a bright frame image; wherein the dark frame image includes a highlight area and a shadow area, the brightness value of the highlight area of the dark frame image is greater than the first brightness threshold and less than the second brightness threshold, and the brightness value of the shadow area of the dark frame image is less than the first brightness threshold; the bright frame image includes a highlight area and a shadow area, the brightness value of the highlight area of the bright frame image is greater than the first brightness threshold, and the brightness value of the shadow area of the bright frame image is greater than the first brightness threshold and less than the second brightness threshold. Specifically, the visible light image can be gamma-transformed by using a first gamma value and a first gain value to obtain a dark frame image, and the first gamma value and the first gain value are both positive numbers; the visible light image can be gamma-transformed by using a second gamma value and a second gain value to obtain a bright frame image, and the second gamma value and the second gain value are both positive numbers; the first gamma value is smaller than the second gamma value, and the first gain value is smaller than the second gain value; or, the first gamma value is smaller than the second gamma value, and the first gain value is equal to the second gain value; or, the first gamma value is equal to the second gamma value, and the first gain value is smaller than the second gain value.
[0084] Step S30: If the exposure state of the infrared image is a normal exposure state, the infrared image is used as the optimal frame image;
[0085] It should be noted that even without visible light fill lighting, other ambient light sources such as car taillights, streetlights, and early morning sunlight may be present. In low ambient light conditions, visible light images exhibit poor quality, resulting in blurred license plate text and a dark background. Infrared images, however, can clearly show the fine details of the license plate text. In brighter ambient light conditions, infrared images may appear overexposed, in which case visible light images offer superior quality.
[0086] Therefore, in this embodiment, the exposure status of the currently obtained infrared image can be adaptively determined, and the selection of the infrared image or the dark frame image as the optimal frame image can be determined based on the exposure status. That is, the image with better quality is selected from the dark frame image and the infrared image for license plate enhancement, so that a better license plate enhancement effect can be obtained in both good and bad ambient light conditions.
[0087] The exposure status of an infrared image is categorized as either a normal exposure state or a severely overexposed state. There are many ways to determine the exposure status of an infrared image, which are not limited in this embodiment. For example, the exposure status of the infrared image can be determined based on its exposure ratio. When the exposure ratio is greater than a certain threshold, the infrared image is considered to be severely overexposed; otherwise, the infrared image is determined to be in a normal exposure state.
[0088] If the exposure status of the infrared image is normal, it means that the ambient light was poor when the image was collected. At this time, the image quality of the license plate area in the infrared image is better than that in the dark frame image and the bright frame image. Using the infrared image as the optimal frame image for license plate enhancement can ensure the license plate enhancement effect.
[0089] Step S40: If the exposure state of the infrared image is a serious overexposure state, the dark frame image is used as the optimal frame image;
[0090] If the exposure state of the infrared image is severely overexposed, it means that the ambient light is good when the image is collected. At this time, the image quality of the license plate area in the dark frame image is better than that of the license plate area in the infrared image. Using the dark frame image as the optimal frame image for license plate enhancement can ensure the license plate enhancement effect.
[0091] Step S50 , performing license plate enhancement processing on the optimal frame image and the bright frame image to obtain an enhanced license plate image.
[0092] After determining the optimal frame image, the optimal frame image and the bright frame image can be subjected to license plate enhancement processing to obtain an enhanced license plate image. In this embodiment, the specific implementation method of how to perform license plate enhancement processing on the optimal frame image and the bright frame image to obtain the enhanced license plate image is not limited.
[0093] It is understood that, regardless of whether the infrared frame image or the dark frame image is selected as the optimal frame image, the image quality of the license plate area of the optimal frame image is better than that of the license plate area of the bright frame image, and the bright frame image has color information. Therefore, in a specific embodiment, the license plate enhancement process may include splicing the license plate area of the optimal frame image with the license plate extension area of the bright frame image to obtain an enhanced license plate image with better overall quality. During the splicing process, the bright frame image can be used to provide color information; or, to make the color of the license plate area closer to the actual license plate color, the license plate enhancement process may also include color correction of the license plate area of the optimal frame image before splicing; or, to further improve the license plate enhancement effect, the license plate enhancement process may also include sharpening the image before splicing; or, in other embodiments, the license plate enhancement process may also include other processing methods to further improve the license plate enhancement effect.
[0094] In this embodiment, a visible light image and an infrared image are acquired for license plate image capture; the visible light image is processed to obtain a dark frame image and a bright frame image, wherein the brightness level of the dark frame image is lower than that of the bright frame image; if the infrared image is in a normal exposure state, the infrared image is used as the optimal frame image; if the infrared image is in a severely overexposed state, the dark frame image is used as the optimal frame image; and license plate enhancement processing is performed on the optimal frame image and the bright frame image to obtain an enhanced license plate image. This embodiment proposes a license plate enhancement scheme that adaptively selects the optimal frame image. In good ambient light conditions, the higher-quality dark and bright frames are selected for license plate enhancement, while in poor ambient light conditions, the higher-quality infrared and bright frames are selected for license plate enhancement. This improves the license plate enhancement effect in the absence of visible light fill light. Specifically for license plates with black fonts, such as current yellow, green, and yellow-green license plates, the enhanced license plate image can achieve clear fonts and a clean background.
[0095] Furthermore, based on the above-mentioned first embodiment, a second embodiment of the license plate enhancement method of the present invention is proposed. In this embodiment, after step S10, the method further includes:
[0096] Step S60: If the average brightness value of each pixel of the bright frame image is greater than a first preset brightness threshold, and the exposure rate of the infrared image is greater than a preset exposure threshold, then determining that the exposure state of the infrared image is a severe overexposure state;
[0097] In this embodiment, a specific implementation method for determining the exposure status of an infrared image is proposed. Specifically, the average brightness value of each pixel in the bright frame image and the exposure rate of the infrared image can be calculated. The average brightness value of each pixel in the bright frame image is obtained by averaging the brightness values of each pixel. The exposure rate of the infrared image can refer to the exposure rate within the entire image area of the infrared image, or, considering that the exposure status of the license plate area is mainly considered in the infrared image, in order to improve the accuracy of determining the exposure status of the infrared image, the exposure rate of the infrared image can refer to the exposure rate within the license plate area of the infrared image. The method for calculating the exposure rate is not limited in this embodiment.
[0098] If the average brightness value of the bright frame image is greater than a first preset brightness threshold, and the exposure rate of the infrared image is greater than a preset exposure rate, the infrared image can be determined to be severely overexposed. In other words, the image quality of the license plate area in the dark frame image is considered to be better than that in the infrared frame image. The first preset brightness threshold and the preset exposure rate can be set as needed.
[0099] Step S70 : If the average brightness value is less than or equal to the first preset brightness threshold, or the exposure rate is less than or equal to the preset exposure threshold, it is determined that the exposure state of the infrared image is a normal exposure state.
[0100] If the average brightness value of the bright frame image is less than or equal to the first preset brightness threshold, or the exposure rate of the infrared image is less than or equal to the preset exposure threshold, it can be determined that the exposure state of the infrared image is a normal exposure state, that is, it can be considered that the image quality of the license plate area of the infrared image at this time is better than the image quality of the license plate area of the dark frame image and the bright frame image.
[0101] Furthermore, in one embodiment, the average brightness value of the bright frame image can be calculated first. When the average brightness value of the bright frame image is greater than a first preset brightness threshold, the exposure state of the infrared image is directly determined to be a severe overexposure state; when the average brightness value of the bright frame image is less than or equal to the first preset brightness threshold, the exposure rate of the infrared image is calculated; when the exposure rate of the infrared image is greater than the preset exposure threshold, the exposure state of the infrared image is determined to be a severe overexposure state; when the exposure rate of the infrared image is less than or equal to the preset exposure threshold, the exposure state of the infrared image is determined to be a normal exposure state.
[0102] Furthermore, in one embodiment, after step S10, the following steps are further included:
[0103] Step S80 , dividing the number of pixels in the license plate area in the infrared image whose brightness value is greater than a second preset brightness threshold by the total number of pixels in the license plate area to obtain the exposure rate of the infrared image.
[0104] In this embodiment, the exposure rate of the infrared image may refer to the exposure rate in the license plate area in the infrared image. Using the exposure rate in the license plate area as the basis for judging the exposure state of the infrared image can more accurately select the optimal frame image, thereby further improving the license plate enhancement effect.
[0105] Specifically, the location of the license plate area in the infrared image can be obtained, and the method of obtaining the location is not limited in this embodiment. The number of pixels in the license plate area in the infrared image whose brightness value is greater than a second preset brightness threshold is counted. The second preset brightness threshold can be set as needed and is not limited in this embodiment. The number of pixels in the license plate area whose brightness value is greater than the second preset brightness threshold is divided by the total number of pixels in the license plate area, and the result is used as the exposure rate of the infrared image.
[0106] Furthermore, in one embodiment, after step S20, the following steps are further included:
[0107] Step A10, performing license plate area detection on the dark frame image to obtain a first area position where the license plate area is located in the dark frame image;
[0108] In this embodiment, a specific method for obtaining the location of the license plate region in an infrared image is proposed. Specifically, license plate region detection can be performed on a dark frame image to obtain the location of the license plate region in the dark frame image (hereinafter referred to as the first region location for clarity). The first region location can specifically be, but is not limited to, the pixel coordinates of the four corner points of the license plate in the dark frame image. The specific method for license plate region detection is not limited in this embodiment.
[0109] Step A20 : Based on the correspondence between the dark frame image and the pixels in the infrared image, the area defined by the second area position in the infrared image corresponding to the first area position is used as the license plate area in the infrared image.
[0110] There is a correspondence between each pixel in the dark frame image and the infrared image. Based on this correspondence, the position in the infrared image relative to the first region position (hereinafter referred to as the second region position) can be determined. This second region position is the location of the license plate region in the infrared image. In other words, if the first region position is the pixel coordinates of the four corner points of the license plate in the dark frame image, the second region position is the pixel coordinates of the four corner points of the license plate in the infrared image.
[0111] It is understandable that the infrared image may be in a normal exposure state or in a severely overexposed state. When the infrared image is in a severely overexposed state, it is difficult to perform license plate area detection on the infrared image to obtain the accurate license plate area position. Therefore, in this embodiment, by performing license plate area detection on the dark frame image, a relatively accurate license plate area position can be obtained, thereby ensuring the license plate enhancement effect during subsequent license plate enhancement.
[0112] Furthermore, based on the first and / or second embodiments above, a third embodiment of the license plate enhancement method of the present invention is proposed. In this embodiment, step S50 includes:
[0113] Step S501, dividing the square of the average brightness value of the bright frame image by the average brightness value of the optimal frame image to obtain a target ratio;
[0114] Due to the different reflective properties of different license plates, in some cases, green plates, yellow plates, and yellow-green plates are easily overexposed, that is, the color of the license plate itself is greatly reduced or even turns white. In this embodiment, in order to further improve the license plate enhancement effect, it is proposed to correct the license plate color so that the color of the license plate area in the license plate enhanced image is visually close to the real license plate color.
[0115] Specifically, the square of the average brightness value of the bright frame image may be divided by the average brightness value of the optimal frame image to obtain a ratio (hereinafter referred to as a target ratio).
[0116] Step S502, multiplying the grayscale value of each pixel in the first grayscale image converted from the optimal frame image by the target ratio to obtain a second grayscale image;
[0117] The optimal frame image is converted into a grayscale image (hereinafter referred to as the first grayscale image for distinction). In a specific embodiment, the optimal frame image can be first converted into an RGB image, and then the RGB image is converted into a grayscale image. The conversion method is not limited in this embodiment.
[0118] When ambient light is good, the calculated target ratio is smaller, and when ambient light is poor, the calculated target ratio is larger. The target ratio can be used to adjust the grayscale values of each pixel in the first grayscale image to achieve a better brightness effect in the image after subsequent color correction. Specifically, the grayscale values of each pixel in the first grayscale image can be multiplied by the target ratio. The resulting image is hereinafter referred to as the second grayscale image for clarity.
[0119] For example, the grayscale value of the pixel point (x, y) in the first grayscale image is gray(x, y), and the target ratio is r, then the grayscale value of the pixel point (x, y) in the second grayscale image is gray(x, y)*r.
[0120] Step S503, converting the grayscale value of each pixel in the license plate area in the second grayscale image into a standard license plate color value to obtain a color-corrected image;
[0121] The location of the license plate area in the second grayscale image can be obtained, specifically by a license plate area detection method, which is not limited here. The grayscale values of each pixel point (hereinafter referred to as the license plate background color pixel point for distinction) in the license plate area in the second grayscale image can be converted into a standard license plate color value to obtain a color-corrected image. The color-corrected image can be an image in RGB format. Among them, a conversion formula for converting grayscale values into standard color values corresponding to different license plate colors can be set in advance, and the license plate color is obtained by identifying the visible light image. The conversion formula corresponding to the license plate color is selected to convert the grayscale values of the license plate background color pixel points in the second grayscale image into standard license plate color values to obtain a color-corrected image. In this embodiment, there is no limitation on the license plate color recognition method.
[0122] The conversion formulas are not listed here one by one. For example, the gray value is represented as gray, and the conversion formula corresponding to the yellow license plate can be:
[0123] R = gray;
[0124] G = gray * 192;
[0125] B=gray*64.
[0126] Step S504 : splicing the license plate area in the color-corrected image with the area other than the license plate area in the bright frame image to obtain an enhanced license plate image.
[0127] After obtaining the color-corrected image, the license plate area in the color-corrected image can be spliced with the area of the bright frame image excluding the license plate area (i.e., the license plate extension area) to obtain an enhanced license plate image. The splicing method is not limited in this embodiment. In one embodiment, the license plate area can be directly extracted from the color-corrected image, the license plate extension area can be extracted from the bright frame image, and the two extracted areas can be spliced to obtain the enhanced license plate image.
[0128] Furthermore, in one embodiment, step S504 includes:
[0129] Step S5041, performing weighted summation on the pixel values of the pixel points in the color-corrected image and the pixel values of the pixel points at corresponding positions in the bright frame image to obtain an enhanced license plate image;
[0130] In order to make the boundary area between the license plate area and the license plate extension area in the stitched enhanced license plate image more natural, in this embodiment, the color-corrected image and the bright frame image may be stitched based on a weighted summation method.
[0131] Specifically, the weighted weights of each pixel in the color-corrected image and the weighted weights of each pixel in the bright-frame image can be set. The weighted weights of the pixels in the license plate area in the color-corrected image are greater than the weighted weights of the pixels at the corresponding positions in the bright-frame image, so as to ensure the image quality of the license plate area in the spliced enhanced license plate image; the weighted weights of the pixels outside the license plate area in the color-corrected image are less than the weighted weights of the pixels at the corresponding positions in the bright-frame image, so as to ensure that the license plate extension area in the spliced enhanced license plate image can retain the color information of the license plate extension area in the bright-frame image; the peripheral area in the license plate area of the color-corrected image is divided as a transition area, and the size of the transition area is not limited. For example, it can be set to 4 pixels wide, or the transition area size that is suitable for the size of the license plate area can be calculated based on the size of the license plate area; such as Figure 3The relationship between the region of interest, the license plate area and the transition area is shown; the closer the distance between the pixel points in the transition area and the center of the license plate area in the color-corrected image is, the greater the weighted weight corresponding to the pixel points is, thereby achieving a transition effect, so that the boundary area between the license plate area and the license plate extension area in the enhanced license plate image is more natural; it can be understood that there is also a transition area in the bright frame image corresponding to the transition area in the color-corrected image, and the closer the distance between the pixel points in the transition area and the center of the license plate area in the bright frame image is, the smaller the weighted weight corresponding to the pixel points is.
[0132] According to the weighted weights set above, the pixel values of the pixels in the color-corrected image and the pixel values of the corresponding pixels in the bright frame image are weightedly summed to obtain the enhanced license plate image.
[0133] For example, in one embodiment, the weighted weight corresponding to the pixel points in the license plate area other than the transition area in the color-corrected image can be set to 255, and the weighted weight of the pixel points in the transition area decreases with the distance from the center of the license plate area, and increases uniformly from 0 to 255; the weighted weight of the pixel points in the license plate extension area in the color-corrected image is set to 0; the weighted weight of each pixel point in the bright frame image is obtained by subtracting the weighted weight of the pixel point at the corresponding position in the color-corrected image from 256.
[0134] Convert the color-corrected image to a YUV format image and stitch it with the YUV format bright frame image to obtain the license plate enhanced image. The calculation method of the Y, U, and V components of the YUV of the pixel point (x, y) is as follows:
[0135] Y final =(Y ori *(256-w)+Y enhance *w)<<8
[0136] U final =(U ori *(256-w)+U enhance *w)<<8
[0137] V final =(V ori *(256-w)+V enhance *w)<<8
[0138] Y ori is the Y component value of the bright frame image pixel (x, y) in YUV, enhance Y is the Y component value of the color correction image pixel (x, y) YUV, final The Y component value of the license plate enhanced image pixel (x, y) YUV. ori is the Y component value of the YUV of the bright frame image pixel (x, y), U enhanceis the Y component value of the color correction image pixel (x, y)YUV, U final V is the Y component value of the license plate enhanced image pixel (x, y) YUV. ori is the Y component value of the bright frame image pixel (x, y) in YUV, V enhance is the Y component value of the color correction image pixel (x, y) YUV, V final is the Y component value of the YUV of the license plate enhanced image pixel (x, y). w is the weight of the pixel (x, y) in the license plate enhanced image.
[0139] Furthermore, in one embodiment, step S503 includes:
[0140] Step S5031: When the license plate is a gradient color license plate, the grayscale value of each pixel in the license plate area in the second grayscale image is converted into the product of the standard license plate color value and the gradient coefficient to obtain a color-corrected image, wherein the gradient coefficient corresponding to each pixel is calculated based on the size of the license plate area in the second grayscale image and the gradient effect parameters of the gradient color license plate;
[0141] When the license plate is a gradient color license plate (for example, a new energy vehicle license plate is a green gradient color license plate), in order to make the color-corrected image after color correction more consistent with the gradient effect of the gradient color license plate, in this embodiment, the gradient coefficient corresponding to each pixel point can be calculated based on the size of the license plate area in the second grayscale image and the gradient effect parameters of the gradient color license plate. The gradient effect parameters can be set in advance according to the gradient effect of the standard gradient color license plate, and are not specifically limited in this embodiment. For example, they can include the gradient coefficient of each pixel point in the standard gradient color license plate. The method of calculating the gradient coefficient corresponding to the pixel point based on the size and gradient effect parameters is not limited in this embodiment. For example, when the license plate is a gradient color from top to bottom, the gradient coefficient corresponding to each pixel point can be calculated based on the height of the license plate area and the gradient effect parameters of the gradient color license plate. For example, when the license plate is a gradient color from left to right, the gradient coefficient corresponding to each pixel point can be calculated based on the width of the license plate area and the gradient effect parameters of the gradient color license plate. For example, when the license plate is a green gradient license plate, the gradient direction is up and down, and the gradient effect parameter is the gradient coefficient of each pixel point in the standard green gradient license plate, assuming that the gradient coefficient of the bottom pixel point in the license plate area of the standard green gradient license plate is subtracted from the gradient coefficient of the top pixel point to obtain a, and the height of the license plate area in the second grayscale image is b, then the gradient coefficient of the i-th pixel point in the second grayscale image is c = (a*i) / b.
[0142] The color-corrected image can be obtained by converting the grayscale value of each pixel in the license plate area of the second grayscale image into the product of the standard license plate color value and the gradient coefficient corresponding to the pixel.
[0143] It should be noted that the method of identifying whether the license plate is a gradient color license plate is not limited in this embodiment.
[0144] Step S5032: When the license plate is a spliced color license plate, the color segmentation position of the license plate area in the second grayscale image is determined according to the size of the license plate area in the second grayscale image and the splicing effect parameters of the spliced color license plate. According to the color segmentation position, each pixel point in the license plate area in the second grayscale image is converted into a corresponding standard splicing color value to obtain a color-corrected image.
[0145] When the license plate is a spliced color license plate (for example, a yellow-green license plate), in order to make the color-corrected image after color correction more consistent with the gradient effect of the spliced color license plate, in this embodiment, the color segmentation position of the license plate area in the second grayscale image can be determined based on the size of the license plate area in the second grayscale image and the splicing effect parameters of the spliced color license plate. The splicing effect parameters can be set in advance based on the splicing effect of the spliced color license plate, and are not specifically limited in this embodiment. For example, they can include the proportion of the length and / or width of the splicing points of the two colors in the license plate area. The method of calculating the color segmentation position based on the size and splicing effect parameters is not limited in this embodiment. For example, when the license plate is a license plate with two colors spliced left and right, the color segmentation position can be calculated based on the width of the license plate area and the splicing effect parameters of the spliced color license plate. For example, when the license plate is a license plate with two colors spliced up and down, the color segmentation position can be calculated based on the height of the license plate area and the splicing effect parameters of the spliced color license plate. For example, when the license plate is a yellow-green license plate, with yellow on the left and green on the right, and the splicing effect parameter is the ratio a of the width of the yellow area to the overall width of the license plate, assuming that the width of the license plate area is b, then the color segmentation position is calculated to be the cth pixel position from left to right, where c = a*b.
[0146] Based on the color segmentation position, each pixel in the license plate area of the second grayscale image is converted to the standard stitching color value corresponding to that pixel to obtain a color-corrected image. For example, if the left side of a yellow-green license plate is yellow and the right side is green, the grayscale value of the pixel to the left of the color segmentation point is converted to the yellow color of the standard yellow-green license plate, and the grayscale value of the pixel to the right is converted to the green color of the standard yellow-green license plate.
[0147] Furthermore, in one embodiment, to make the font in the license plate area of the license plate enhanced image clearer, the color-corrected image in YUV format can be sharpened. Specifically, high-frequency details in the YUV image can be extracted, and a determination can be made as to whether the high-frequency details are greater than a preset threshold. If so, the Y component of the YUV image is enhanced according to a preset sharpening intensity to obtain a sharpened image. If not, the YUV image is not processed and proceeds directly to the next step.
[0148] In addition, an embodiment of the present invention further provides a license plate enhancement device, comprising:
[0149] An acquisition module is used to acquire visible light images and infrared images obtained by image acquisition of the license plate;
[0150] a first processing module, configured to process the visible light image to obtain a dark frame image and a bright frame image, wherein a brightness level of the dark frame image is lower than a brightness level of the bright frame image;
[0151] a determination module configured to use the infrared image as the optimal frame image if the exposure state of the infrared image is a normal exposure state; and use the dark frame image as the optimal frame image if the exposure state of the infrared image is a serious overexposure state;
[0152] The second processing module is configured to perform license plate enhancement processing on the optimal frame image and the bright frame image to obtain an enhanced license plate image.
[0153] Furthermore, the determining module is further configured to:
[0154] If the average brightness value of each pixel of the bright frame image is greater than a first preset brightness threshold, and the exposure rate of the infrared image is greater than a preset exposure threshold, then determining that the exposure state of the infrared image is a severe overexposure state;
[0155] If the average brightness value is less than or equal to the first preset brightness threshold, or the exposure rate is less than or equal to the preset exposure threshold, it is determined that the exposure state of the infrared image is a normal exposure state.
[0156] Furthermore, the license plate enhancement device further includes:
[0157] The calculation module is used to divide the number of pixels in the license plate area in the infrared image whose brightness value is greater than a second preset brightness threshold by the total number of pixels in the license plate area to obtain the exposure rate of the infrared image.
[0158] Furthermore, the license plate enhancement device further includes:
[0159] The detection module is used to perform license plate area detection on the dark frame image to obtain a first area position where the license plate area is located in the dark frame image; based on the correspondence between the dark frame image and the pixel points in the infrared image, the area defined by the second area position in the infrared image corresponding to the first area position is used as the license plate area in the infrared image.
[0160] Furthermore, the second processing module is further configured to:
[0161] Dividing the square of the average brightness value of the bright frame image by the average brightness value of the optimal frame image to obtain a target ratio;
[0162] Multiplying the grayscale value of each pixel in the first grayscale image converted from the optimal frame image by the target ratio to obtain a second grayscale image;
[0163] Converting the grayscale value of each pixel in the license plate area in the second grayscale image into a standard license plate color value to obtain a color-corrected image;
[0164] The license plate area in the color-corrected image is spliced with the area other than the license plate area in the bright frame image to obtain an enhanced license plate image.
[0165] Furthermore, the second processing module is further configured to:
[0166] Performing a weighted summation of the pixel values of the pixel points in the color-corrected image and the pixel values of the pixel points at corresponding positions in the bright frame image to obtain an enhanced license plate image;
[0167] Among them, the weighted weight of the pixel points in the license plate area in the color-corrected image is greater than the weighted weight of the pixel points at the corresponding position in the bright frame image, the weighted weight of the pixel points outside the license plate area in the color-corrected image is less than the weighted weight of the pixel points at the corresponding position in the bright frame image, and the pixel points in the transition area of the color-corrected image that are closer to the center of the license plate area have greater weighted weights, and the transition area is the peripheral area of the license plate area.
[0168] Furthermore, the second processing module is further configured to:
[0169] When the license plate is a gradient color license plate, converting the grayscale value of each pixel in the license plate area in the second grayscale image into the product of the standard license plate color value and the gradient coefficient to obtain a color-corrected image, wherein the gradient coefficient corresponding to each pixel is calculated based on the size of the license plate area in the second grayscale image and the gradient effect parameter of the gradient color license plate;
[0170] When the license plate is a spliced color license plate, the color segmentation position of the license plate area in the second grayscale image is determined according to the size of the license plate area in the second grayscale image and the splicing effect parameters of the spliced color license plate, and each pixel point in the license plate area in the second grayscale image is converted into a corresponding standard splicing color value according to the color segmentation position to obtain a color corrected image.
[0171] The expanded contents of the specific implementation of the license plate enhancement device of the present invention are basically the same as those of the above-mentioned license plate enhancement method embodiments, and will not be described in detail here.
[0172] In addition, an embodiment of the present invention further provides a computer-readable storage medium, on which a license plate enhancement program is stored. When the license plate enhancement program is executed by a processor, the steps of the license plate enhancement method described below are implemented.
[0173] The various embodiments of the license plate enhancement device, system, and computer-readable storage medium of the present invention may refer to the various embodiments of the license plate enhancement method of the present invention, and will not be described in detail here.
[0174] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.
[0175] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.
[0176] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better embodiment. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0177] The above are only preferred embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A license plate enhancement method, characterized in that: The method comprises the following steps: Obtaining visible light images and infrared images obtained by image acquisition of the license plate; Processing the visible light image to obtain a dark frame image and a bright frame image, wherein a brightness level of the dark frame image is lower than a brightness level of the bright frame image; If the exposure state of the infrared image is a normal exposure state, taking the infrared image as the optimal frame image; If the exposure state of the infrared image is a serious overexposure state, the dark frame image is used as the optimal frame image; performing license plate enhancement processing on the optimal frame image and the bright frame image to obtain an enhanced license plate image; The step of performing license plate enhancement processing on the optimal frame image and the bright frame image to obtain an enhanced license plate image includes: Dividing the square of the average brightness value of the bright frame image by the average brightness value of the optimal frame image to obtain a target ratio; Multiplying the grayscale value of each pixel in the first grayscale image converted from the optimal frame image by the target ratio to obtain a second grayscale image; Converting the grayscale value of each pixel in the license plate area in the second grayscale image into a standard license plate color value to obtain a color-corrected image; The license plate area in the color-corrected image is spliced with the area other than the license plate area in the bright frame image to obtain an enhanced license plate image.
2. The license plate enhancement method according to claim 1, wherein: After the step of processing the visible light image to obtain a dark frame image and a bright frame image, the method further includes: If the average brightness value of each pixel of the bright frame image is greater than a first preset brightness threshold, and the exposure rate of the infrared image is greater than a preset exposure threshold, then determining that the exposure state of the infrared image is a severe overexposure state; If the average brightness value is less than or equal to the first preset brightness threshold, or the exposure rate is less than or equal to the preset exposure threshold, it is determined that the exposure state of the infrared image is a normal exposure state.
3. The license plate enhancement method according to claim 2, characterized in that: After the step of acquiring the visible light image and the infrared image obtained by image acquisition of the license plate, the method further includes: The exposure rate of the infrared image is obtained by dividing the number of pixels in the license plate area in the infrared image whose brightness value is greater than a second preset brightness threshold by the total number of pixels in the license plate area.
4. The license plate enhancement method according to claim 2, wherein: After the step of processing the visible light image to obtain a dark frame image and a bright frame image, the method further includes: Performing license plate area detection on the dark frame image to obtain a first area position where the license plate area is located in the dark frame image; According to the correspondence between the dark frame image and the pixel points in the infrared image, the area defined by the second area position in the infrared image corresponding to the first area position is used as the license plate area in the infrared image.
5. The license plate enhancement method according to claim 1, wherein: The step of splicing the license plate area in the color-corrected image with the area other than the license plate area in the bright frame image to obtain an enhanced license plate image comprises: Performing a weighted summation of the pixel values of the pixel points in the color-corrected image and the pixel values of the pixel points at corresponding positions in the bright frame image to obtain an enhanced license plate image; Among them, the weighted weight of the pixel points in the license plate area in the color-corrected image is greater than the weighted weight of the pixel points at the corresponding position in the bright frame image, the weighted weight of the pixel points outside the license plate area in the color-corrected image is less than the weighted weight of the pixel points at the corresponding position in the bright frame image, and the pixel points in the transition area of the color-corrected image that are closer to the center of the license plate area have greater weighted weights, and the transition area is the peripheral area of the license plate area.
6. The license plate enhancement method according to claim 1, wherein: The step of converting the grayscale value of each pixel in the license plate area in the second grayscale image into a standard license plate color value to obtain a color-corrected image comprises: When the license plate is a gradient color license plate, converting the grayscale value of each pixel in the license plate area in the second grayscale image into the product of the standard license plate color value and the gradient coefficient to obtain a color-corrected image, wherein the gradient coefficient corresponding to each pixel is calculated based on the size of the license plate area in the second grayscale image and the gradient effect parameter of the gradient color license plate; When the license plate is a spliced color license plate, the color segmentation position of the license plate area in the second grayscale image is determined according to the size of the license plate area in the second grayscale image and the splicing effect parameters of the spliced color license plate, and each pixel point in the license plate area in the second grayscale image is converted into a corresponding standard splicing color value according to the color segmentation position to obtain a color corrected image.
7. A license plate enhancement device, characterized in that: The license plate enhancement device comprises: An acquisition module is used to acquire visible light images and infrared images obtained by image acquisition of the license plate; a first processing module, configured to process the visible light image to obtain a dark frame image and a bright frame image, wherein a brightness level of the dark frame image is lower than a brightness level of the bright frame image; a determination module configured to use the infrared image as the optimal frame image if the exposure state of the infrared image is a normal exposure state; and use the dark frame image as the optimal frame image if the exposure state of the infrared image is a serious overexposure state; The second processing module is used to perform license plate enhancement processing on the optimal frame image and the bright frame image to obtain an enhanced license plate image, divide the square of the average brightness value of the bright frame image by the average brightness value of the optimal frame image to obtain a target ratio, multiply the grayscale value of each pixel in the first grayscale image converted from the optimal frame image by the target ratio to obtain a second grayscale image, convert the grayscale value of each pixel in the license plate area of the second grayscale image into a standard license plate color value to obtain a color corrected image, and splice the license plate area in the color corrected image with the area other than the license plate area in the bright frame image to obtain an enhanced license plate image.
8. A license plate enhancement device, characterized in that: The license plate enhancement device includes: a memory, a processor, and a license plate enhancement program stored in the memory and executable on the processor. When the license plate enhancement program is executed by the processor, the steps of the license plate enhancement method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a license plate enhancement program, which, when executed by a processor, implements the steps of the license plate enhancement method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Image fusion method and device, computer equipment and storage medium
CN112258442A
License plate detection method and device, equipment terminal and readable storage medium
CN115050016A