Snapshot frame exposure adjustment method, device and computer equipment

By calculating the brightness of the identified frame and the equivalent complementary brightness in the video frame and calculating the brightness compensation ratio, the problem of the reliability and poor effect of the capture exposure adjustment method in the prior art is solved, and more efficient exposure adjustment is achieved.

CN119653245BActive Publication Date: 2025-05-06ZHEJIANG DAHUA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510169422.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-17
Publication Date
2025-05-06
Estimated Expiration
2045-02-17

AI Technical Summary

Technical Problem

In the prior art, the capture exposure adjustment method has poor reliability and poor results, especially when lane light changes and long-term shooting scenes without capture.

Method used

By obtaining video frames in real-time monitoring data, identifying the calculation of frame brightness and equivalent complement brightness, calculating the brightness compensation ratio, and setting the exposure gain of the capture frame based on this.

Benefits of technology

Improve the reliability and accuracy of the capture exposure effect, and improve the exposure adjustment effect in light changes and no capture scenes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119653245B_ABST
    Figure CN119653245B_ABST
Patent Text Reader

Abstract

The present application relates to a method, device and computer equipment for adjusting exposure of captured frames, which obtain video frames in real-time monitoring data; the video frames include recognition frames and capture frames, the recognition frames are images captured when the fill light is off, and the capture frames are images captured when the fill light is on; if the current video frame is a target recognition frame located at a pre-capture position, the recognition frame brightness is calculated based on the target recognition frame, and the pre-stored equivalent fill light brightness is obtained; the equivalent fill light brightness is calculated based on the previous captured frame; the brightness compensation ratio is calculated based on the recognition frame brightness and the pre-stored equivalent fill light brightness; based on the brightness compensation ratio, the exposure gain used when the captured frame is captured next time is set, thereby solving the problem of poor reliability of the captured exposure adjustment method, improving the brightness compensation accuracy, and improving the captured exposure effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of traffic video monitoring, and in particular to a method, device and computer equipment for adjusting exposure of captured frames. Background Art

[0002] In the field of intelligent transportation and road monitoring, the requirements for vehicle capture effects, such as the clarity of the area inside the car window, are getting higher and higher. In order to improve the capture effect, most of the existing monitoring equipment uses flash for fill light. The capture frame is collected at the moment when the flash is flashing to fill light, and the continuous video frames collected when the flash is not filling light are recognition frames. Since the capture frames are discontinuous, basically the same exposure gain or interval limit as the recognition frame is used as the capture exposure parameter. Therefore, the existing monitoring equipment is particularly dependent on the flash installation solution. Once a non-standard installation is performed, it is basically necessary to modify the capture exposure parameters at a fixed point, which is a great waste of manpower.

[0003] In the prior art, the compensation value is calculated based on the multiple license plates that appeared previously, and takes effect in the next frame, thereby achieving the effect of automatically adjusting the exposure parameters of the captured frame. However, this method has high requirements for the brightness of consecutive frames, that is, it requires that the brightness of consecutive license plates is not much different and the time interval is short. Once the conditions are not met, such as lanes (one lane is sunlight, the other lane is shadow) and there is no capture scene for a long time, this method will not work well or even have a counterproductive effect.

[0004] Therefore, the existing snapshot exposure adjustment method has poor reliability and poor effect. Summary of the invention

[0005] In this embodiment, a method, apparatus, system, computer equipment and storage medium are provided to adjust the exposure of captured frames, so as to solve the problems of low efficiency and poor effect of the captured exposure adjustment in the related art.

[0006] In a first aspect, a method for adjusting exposure of a captured frame is provided in this embodiment, and the method includes:

[0007] Acquire video frames in real-time monitoring data; the video frames include recognition frames and snapshot frames, the recognition frames are images captured when the fill light is turned off, and the snapshot frames are images captured when the fill light is turned on;

[0008] If the current recognition frame is a target recognition frame located at a pre-capture position, the recognition frame brightness is calculated based on the target recognition frame, and a pre-stored equivalent fill light brightness is obtained; the equivalent fill light brightness is calculated based on the previous capture frame;

[0009] Calculating a brightness compensation ratio based on the identified frame brightness and the pre-stored equivalent fill light brightness;

[0010] Based on the brightness compensation ratio, the exposure gain used when the captured frame is acquired next time is set.

[0011] In some embodiments, calculating the recognition frame brightness based on the target recognition frame includes:

[0012] Acquire the brightness components of the first pixels and the first key area information of the target recognition frame;

[0013] Calculating the brightness of the first key area based on the brightness components of the first pixels and the first key area information;

[0014] The recognition frame brightness includes the brightness of the first key area and the brightness components of each of the first pixels.

[0015] In some embodiments, calculating the brightness of the first key area based on the brightness components of the first pixels and the first key area information includes:

[0016] The first key area information includes license plate position information and license plate color information;

[0017] Calculating the initial average brightness of the license plate based on the brightness components of the first pixels and the license plate position information;

[0018] The brightness of the first key area is calculated based on the initial average brightness of the license plate and the color information of the license plate.

[0019] In some embodiments, the brightness compensation ratio is calculated based on the identified frame brightness and the pre-stored equivalent fill light brightness; including:

[0020] Calculating a first estimated captured brightness compensation range based on the brightness components of the first pixels and the acquired pixel brightness weights;

[0021] Based on the brightness of the first key area and the pre-stored equivalent fill light brightness, a second estimated snapshot brightness compensation range is calculated;

[0022] Based on the second estimated snapshot brightness compensation range, the first estimated snapshot brightness compensation range is limited to obtain a target estimated snapshot brightness compensation range;

[0023] The brightness compensation ratio is calculated based on the estimated captured brightness compensation range of the target.

[0024] In some embodiments, limiting the first estimated snapshot brightness compensation range based on the second estimated snapshot brightness compensation range to obtain a target estimated snapshot brightness compensation range includes:

[0025] Based on the brightness of the first key area, calculating and identifying a brightness compensation range;

[0026] Based on the identified brightness compensation range, the first estimated snapshot brightness compensation range is limited to obtain a third estimated snapshot brightness compensation range;

[0027] The third estimated snapshot brightness compensation range is limited based on the second estimated snapshot brightness compensation range to obtain a target estimated snapshot brightness compensation range.

[0028] In some of the embodiments, the pixel brightness weight is dynamically updated based on the brightness components of the first pixels of the target recognition frame;

[0029] The method for dynamically updating pixel brightness weights includes:

[0030] When the brightness component of each of the first pixels is greater than a first preset brightness threshold, updating the pixel brightness weight to zero;

[0031] When the brightness component of each of the first pixel points is not greater than the first preset brightness threshold, the pixel brightness weight is set according to the brightness of the previous captured frame.

[0032] In some embodiments, the method further comprises:

[0033] If the current video frame is a captured frame, then based on the monitoring video data of the captured frame, the captured frame brightness is calculated;

[0034] Acquire the pre-stored recognition frame brightness; based on the captured frame brightness and the pre-stored recognition frame brightness, calculate the equivalent fill light brightness corresponding to the current captured frame;

[0035] Determining the relationship between the equivalent fill light brightness and a preset brightness alarm range;

[0036] When the equivalent fill light brightness of multiple consecutive frames is lower than the brightness alarm range, reporting a fill light brightness insufficient fault;

[0037] When the equivalent fill light brightness of multiple consecutive frames is higher than the brightness alarm range, a fill light brightness over-brightness fault is reported.

[0038] In some of the embodiments, the brightness of the captured frame is calculated based on the surveillance video data of the captured frame, including:

[0039] Obtaining second pixel brightness components, second key area information, and exposure information of the captured frame;

[0040] Calculating the brightness of the second key area based on the brightness components of the second pixel points and the second key area information;

[0041] Calculating a uniform exposure level brightness based on the exposure information and the second key area brightness;

[0042] Based on the uniform exposure level brightness, the captured frame brightness is obtained.

[0043] In a second aspect, a capture frame exposure adjustment device is provided in this embodiment, and the device includes:

[0044] An initial data acquisition module is used to acquire video frames in real-time monitoring data; the video frames include recognition frames and snapshot frames, the recognition frames are images captured when the fill light is turned off, and the snapshot frames are images captured when the fill light is turned on;

[0045] A recognition frame brightness calculation module, for calculating the recognition frame brightness based on the target recognition frame if the current recognition frame is a target recognition frame located at a pre-capture position, and obtaining a pre-stored equivalent fill light brightness; the equivalent fill light brightness is calculated based on the previous capture frame;

[0046] A brightness compensation calculation module, used to calculate a brightness compensation ratio based on the recognition frame brightness and the pre-stored equivalent fill light brightness;

[0047] The snapshot exposure adjustment module is used to set the exposure gain used when the snapshot frame is collected next time based on the brightness compensation ratio.

[0048] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method for adjusting exposure of captured frames described in the first aspect is implemented.

[0049] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for adjusting exposure of captured frames described in the first aspect is implemented.

[0050] Compared with the related art, the capture frame exposure adjustment method, device and computer equipment provided in this embodiment obtain video frames in real-time monitoring data; the video frames include recognition frames and capture frames, the recognition frames are images captured when the fill light is turned off, and the capture frames are images captured when the fill light is turned on; if the current video frame is a target recognition frame located at a pre-capture position, the recognition frame brightness is calculated based on the target recognition frame, and the pre-stored equivalent fill light brightness is obtained; the equivalent fill light brightness is calculated based on the previous capture frame; the brightness compensation ratio is calculated based on the recognition frame brightness and the pre-stored equivalent fill light brightness; based on the brightness compensation ratio, the exposure gain used when the capture frame is captured next time is set, thereby solving the problem of poor reliability of the capture exposure adjustment method, improving the brightness compensation accuracy, and improving the capture exposure effect.

[0051] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0053] Figure 1 This is a hardware structure block diagram of a terminal for the capture frame exposure adjustment method in an embodiment of the present application;

[0054] Figure 2 Schematic diagram of the process of adjusting the exposure of captured frames in an embodiment of the present application;

[0055] Figure 3 This is a schematic diagram of the raw data in the embodiment of the present application;

[0056] Figure 4 This is a schematic diagram of a process for determining the brightness of a fill light in one embodiment of the present application;

[0057] Figure 5 This is a schematic diagram of a flow chart for determining the brightness of a fill light in a preferred embodiment of the present application;

[0058] Figure 6 This is a schematic diagram of a flow chart for determining the brightness of a fill light based on a captured frame in one embodiment of the present application;

[0059] Figure 7 This is a schematic diagram of a process of adjusting exposure gain based on recognition frames in one embodiment of the present application;

[0060] Figure 8 It is a structural block diagram of the exposure adjustment device for captured frames in an embodiment of the present application.

[0061] Attached figure numerals: 102, processor; 104, memory; 106, transmission device; 108, input and output device; 10, initial data acquisition module; 20, recognition frame brightness calculation module; 30, brightness compensation calculation module; 40, snapshot exposure adjustment module. DETAILED DESCRIPTION

[0062] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.

[0063] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with general skills in the technical field to which this application belongs. The words "one", "a", "the", "these" and the like in this application do not indicate a quantitative limitation, and they may be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" may mean: A exists alone, A and B exist at the same time, and B exists alone. Generally, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.

[0064] The method embodiment provided in this embodiment can be executed in a terminal, a computer or a similar computing device. For example, running on a terminal, Figure 1 is a hardware structure block diagram of a terminal of the snapshot frame exposure adjustment method of this embodiment. Figure 1 As shown, the terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 and a memory 104 for storing data, wherein the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. The above terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0065] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the capture frame exposure adjustment method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the terminal via a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0066] The transmission device 106 is used to receive or send data via a network. The above network includes a wireless network provided by a communication provider of the terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.

[0067] In this embodiment, a method for adjusting exposure of a captured frame is provided. Figure 2 Flow chart of the capture frame exposure adjustment method of this embodiment. Figure 2 As shown, the process includes the following steps:

[0068] Step S210, obtaining video frames in real-time monitoring data; the video frames include recognition frames and snapshot frames, the recognition frames are images captured when the fill light is turned off, and the snapshot frames are images captured when the fill light is turned on.

[0069] Specifically, a monitoring device is set in the target scene. After the monitoring device is turned on, the video data in the target scene is collected in real time. When the target object is identified or the preset time is reached, the fill light is turned on to capture the image to obtain a clearer captured image. The target scene includes but is not limited to scenes such as roads, communities, or indoors. When collecting video data, a type tag is generated for the video frame. The image collected when the fill light is turned off is marked as an identification frame, and the image collected when the fill light is turned on is marked as a capture frame. They can be distinguished by the type tag.

[0070] Step S220, if the current recognition frame is a target recognition frame located at the pre-capture position, the recognition frame brightness is calculated based on the target recognition frame, and the pre-stored equivalent fill light brightness is obtained; the equivalent fill light brightness is calculated based on the previous capture frame.

[0071] Specifically, the recognition frame is intelligently detected, and when the intelligent detection result meets the capture condition, the current recognition frame is marked as the pre-capture position. In one embodiment, when the intelligent detection algorithm detects that the distance between the moving vehicle and the capture line is shortened to a preset distance, the pre-capture position mark is reported, and the recognition frame is marked as the pre-capture position; when the intelligent detection algorithm detects that the moving vehicle exceeds the capture line, the capture signal is reported and the fill light is controlled to turn on. In different monitoring scenarios, the objects detected by the intelligent detection algorithm are not limited to vehicles. In other monitoring scenarios, the objects detected are moving pedestrians, changing objects, etc., which are not limited in this embodiment.

[0072] Specifically, the average brightness of the target recognition frame is calculated based on the brightness components of each pixel of the target recognition frame, and the average brightness is used as the brightness of the recognition frame for subsequent calculations; or the average brightness in the key area is calculated based on the brightness components of each pixel of the target recognition frame and the key area information, and the average brightness in the key area is used as the brightness of the recognition frame for subsequent calculations; or the average brightness of the target recognition frame and the average brightness in the key area are used together as the brightness of the recognition frame for subsequent calculations. Among them, the brightness components of each pixel can be directly obtained by using the statistical information and YUV information output by the Image Signal Processor (ISP); or calculated based on the raw data of the recognition frame.

[0073] Specifically, there are two situations before the target recognition frame. One is that a snapshot has been taken before the current target recognition frame. If there is a snapshot frame, the equivalent fill light brightness is calculated based on the previous snapshot frame. The previous snapshot frame can be the first snapshot frame after the monitoring device is turned on, or the latest snapshot frame or multiple snapshot frames can be selected for calculation, wherein the snapshot frame brightness can be calculated in the same way as the recognition frame. The other is that after the monitoring device is turned on, no snapshot has been taken before the current target recognition frame, and there is no snapshot frame. At this time, the first snapshot can be taken based on the default exposure gain, or the exposure gain of the first snapshot can be calculated based on the default equivalent fill light brightness. The exposure adjustment method for the current target recognition frame that has not been captured before is not limited in this embodiment.

[0074] Step S230, calculating a brightness compensation ratio based on the identified frame brightness and the pre-stored equivalent fill light brightness.

[0075] Specifically, the recognition frame brightness and the equivalent fill light brightness are added to obtain the estimated snapshot brightness, the pre-stored snapshot brightness limit value is obtained, and the estimated snapshot brightness is converted based on the snapshot brightness limit value to obtain the brightness compensation ratio. In other implementations, the calculation is performed based on the method provided in steps S340 to S370.

[0076] Step S240: setting the exposure gain to be used in the next acquisition of captured frames based on the brightness compensation ratio.

[0077] Specifically, the final brightness compensation ratio adj is sent to a traditional automatic exposure algorithm (AE algorithm), the final snapshot frame exposure gain is calculated, and is set to the sensor sensor, and the snapshot frame exposure adjustment is completed.

[0078] In this embodiment, by acquiring video frames in real-time monitoring data; the video frames include recognition frames and snapshot frames, the recognition frames are images captured when the fill light is off, and the snapshot frames are images captured when the fill light is on; if the current video frame is a target recognition frame located at the pre-snapshot position, the recognition frame brightness is calculated based on the target recognition frame, and the pre-stored equivalent fill light brightness is obtained; the equivalent fill light brightness is calculated based on the previous snapshot frame; the brightness compensation ratio is calculated based on the recognition frame brightness and the pre-stored equivalent fill light brightness; based on the brightness compensation ratio, the exposure gain used in the next acquisition of the snapshot frame is set, effectively solving the problem of the traditional license plate exposure algorithm being counter-acted or adjusting overshoot in scenes such as too few snapshots or yin-yang lanes. As well as the attenuation of the brightness of the fill light in the later stage (most of the existing fill lights are xenon flash lights, which attenuate more seriously after a certain number of times), this embodiment can also effectively compensate for it, thereby improving the snapshot exposure effect.

[0079] In some of the embodiments, calculating the recognition frame brightness based on the target recognition frame includes:

[0080] Step S310, obtaining the brightness components of the first pixels and the first key area information of the target recognition frame.

[0081] Step S320: Calculate the brightness of the first key area based on the brightness components of the first pixels and the first key area information.

[0082] Step S330 , identifying that the frame brightness includes the first key area brightness and the first pixel brightness components.

[0083] Specifically, the key area information in the target recognition frame is the first key area information; the key area can be set in advance according to monitoring needs, such as the license plate area, window area, face area and other areas of interest, and the intelligent detection outputs the position and color and other information of the key area of ​​the target recognition frame.

[0084] Specifically, the brightness component of each pixel of the target recognition frame is the first brightness component of each pixel. The first brightness component of each pixel can directly use the statistical information and YUV information output by the image signal processor (ISP), thereby reducing the amount of calculation. Alternatively, the first brightness component of each pixel can be calculated based on the raw data of the recognition frame to improve the accuracy. The method for calculating the brightness component of each pixel based on the raw data is as follows: Figure 3 As shown, raw is a set of data for every 4 points, so every four points can generate a set of R statistics-G statistics-B statistics-Y statistics values; the resolution length and width of the Y statistics value are divided by 2 to obtain the brightness component of each pixel point. The calculation formula is as follows:

[0085] ;

[0086] Among them, R represents the red channel value; Gr and Gb represent the green channel values; B represents the blue channel value; BLC_R, BLC_Gr, BLC_Gb, and BLC_B are the black level values ​​corresponding to the raw data, which are generally obtained through prior calibration.

[0087] In this embodiment, the brightness component of each first pixel point can reflect the overall brightness of the image, and the first key area information focuses on the brightness of the area of ​​interest, providing brightness information of different dimensions.

[0088] In some embodiments, based on step S320, based on the brightness components of the first pixels and the first key area information, calculating the brightness of the first key area includes:

[0089] Step S321, the first key area information includes license plate position information and license plate color information.

[0090] Step S322, calculating the initial average brightness of the license plate based on the brightness components of the first pixel points and the license plate position information.

[0091] Step S323, based on the initial average brightness of the license plate and the license plate color information, the brightness of the first key area is calculated.

[0092] Specifically, the corresponding preset coefficient C is obtained based on the license plate color information. The calculation formula of the preset coefficient C of different colors is as follows: C=B / A; wherein A is the appropriate target brightness A of different colors, B is the appropriate preset target brightness of the image, and A and B are empirical values.

[0093] In some of the embodiments, the brightness compensation ratio is calculated based on the identified frame brightness and the pre-stored equivalent fill light brightness; including:

[0094] Step S340: Calculate a first estimated captured brightness compensation range based on the brightness components of the first pixels and the acquired pixel brightness weights.

[0095] Specifically, the weighted average result of the brightness components of the first pixels is calculated based on the pixel brightness weight q to obtain the average brightness avg_Y of each pixel, and the first estimated captured brightness compensation range is calculated based on the average brightness avg_Y of each pixel and the preset equivalent ambient brightness extreme value.

[0096] The calculation formula for the average brightness avg_Y of each pixel is as follows:

[0097] ;

[0098] Among them, q is the pixel brightness weight, and Y6 is the pixel brightness component.

[0099] The calculation formulas for the upper limit adj_avg_Y_max and the lower limit adj_avg_Y_min of the first estimated snapshot brightness compensation range are as follows:

[0100] ;

[0101] Among them, aim_Y_max is the preset upper limit of the target brightness of the ambient light in the equivalent snapshot frame, and aim_Y_min is the preset lower limit of the target brightness of the ambient light in the equivalent snapshot frame.

[0102] Step S350: Calculate a second estimated snapshot brightness compensation range based on the brightness of the first key area and the pre-stored equivalent fill light brightness.

[0103] Specifically, the brightness of the first key area is enhanced based on the pre-stored equivalent fill light brightness to obtain the estimated captured frame key area brightness plate_Y7; wherein the brightness enhancement includes calculating the sum of the pre-stored equivalent fill light brightness of the first key area.

[0104] Specifically, the calculation formulas for the upper limit adj_plate_Y_max2 and the lower limit adj_plate_Y_min2 of the second estimated snapshot brightness compensation range are as follows:

[0105] ;

[0106] Among them, adj_avg_Y_max is the first estimated snapshot brightness compensation upper limit, aim_plate_Y_min2 is the preset snapshot frame target area target brightness lower limit, plate_Y7 estimates the snapshot frame key area brightness. In addition, the algorithm also presets the snapshot frame target area target brightness upper limit aim_plate_Y_max2, the recognition frame target area target brightness upper limit aim_plate_Y_max1, and the recognition frame target area target brightness lower limit aim_plate_Y_min1; among them, aim_plate_Y_max2>aim_plate_Y_max1, aim_plate_Y_min2>aim_plate_Y_min1.

[0107] Step S360: limiting the first estimated snapshot brightness compensation range based on the second estimated snapshot brightness compensation range to obtain a target estimated snapshot brightness compensation range.

[0108] Step S370, calculating the brightness compensation ratio based on the target estimated captured brightness compensation range.

[0109] Specifically, the brightness compensation ratio adj=(adj_max+adj_min) / 2, wherein adj_max is the upper limit of the target estimated captured brightness compensation range, and adj_min is the lower limit of the target estimated captured brightness compensation range.

[0110] In some embodiments, based on step S360, the first estimated snapshot brightness compensation range is limited based on the second estimated snapshot brightness compensation range to obtain a target estimated snapshot brightness compensation range, including:

[0111] Step S361: Calculate and identify the brightness compensation range based on the brightness of the first key area.

[0112] Specifically, the calculation formula for identifying the upper limit adj_plate_Y_max1 and the lower limit adj_plate_Y_min1 of the brightness compensation range is as follows:

[0113] ;

[0114] Among them, aim_plate_Y_max1 is the preset upper limit of the target brightness of the target area of ​​the recognition frame, aim_plate_Y_min1 is the lower limit of the target brightness of the target area of ​​the recognition frame, and plate_Y4 is the brightness of the first key area.

[0115] Step S362: based on the identified brightness compensation range, the first estimated snapshot brightness compensation range is limited to obtain a third estimated snapshot brightness compensation range.

[0116] Step S363: limiting the third estimated snapshot brightness compensation range based on the second estimated snapshot brightness compensation range to obtain a target estimated snapshot brightness compensation range.

[0117] Specifically, the upper limit adj_max and lower limit adj_min of the target estimated snapshot brightness compensation range are calculated in order of priority from low to high. The second estimated snapshot brightness compensation range has the highest priority, the recognition brightness compensation range has the second priority, and the first estimated snapshot brightness compensation range has the lowest priority. The upper and lower limits of the equivalent snapshot frame ambient light brightness compensation ratio are first determined. The limiting algorithm is implemented based on the clip operation, and the clip operation is defined as follows:

[0118] ;

[0119] ;

[0120] The calculation formula for the target estimated capture brightness compensation range is as follows:

[0121] ;

[0122] Among them, the upper limit of the third estimated snapshot brightness compensation range is adj_max1, the lower limit of the third estimated snapshot brightness compensation range is adj_min1, the upper limit of the target estimated snapshot brightness compensation range is adj_max, and the lower limit of the target estimated snapshot brightness compensation range is adj_min.

[0123] In some embodiments, the pixel brightness weight is dynamically updated based on the brightness component of each first pixel point of the target recognition frame. The method for dynamically updating the pixel brightness weight includes:

[0124] Step S410: When the brightness component of each first pixel point is greater than a first preset brightness threshold, the pixel brightness weight is updated to zero.

[0125] Step S420: When the brightness component of each first pixel point is not greater than a first preset brightness threshold, the pixel brightness weight is set according to the brightness of the previous captured frame.

[0126] Specifically, the higher the brightness of the previous captured frame, the lower the pixel brightness weight. In one implementation, the calculation formula of the pixel brightness weight q is as follows:

[0127] ;

[0128] Where D1, D2 and D3 are preset brightness thresholds (D2>D3), q min and q max is the preset weight threshold (q max >q min ), the core idea is that the weight of the overexposed area of ​​the recognition frame (brightness higher than D1) is 0, and the weight of the brighter area of ​​the captured frame gradually decreases with the increase of brightness.

[0129] In some of the embodiments, the capture frame exposure adjustment method further includes:

[0130] Step S250: If the current video frame is a captured frame, the brightness of the captured frame is calculated based on the monitoring video data of the captured frame.

[0131] Specifically, according to the category label of the received video frame, it is determined whether the video belongs to a captured frame or an identified frame. When it is determined to be a captured frame, the first captured frame flag is set to 1 to indicate that there is a captured frame. The calculation method of the captured frame brightness of the captured frame is the same as the calculation principle of the identified frame brightness in the above embodiment.

[0132] Step S260, obtaining the pre-stored recognition frame brightness; based on the captured frame brightness and the pre-stored recognition frame brightness, calculating the equivalent fill light brightness corresponding to the current captured frame.

[0133] Specifically, after calculating the recognition frame brightness of the target recognition frame each time, the recognition frame brightness is saved. The obtained recognition frame brightness and the captured frame brightness are differentially calculated to obtain the equivalent fill light brightness plate_Y6. In one embodiment, the recognition frame brightness plate_Y4, the captured frame brightness plate_Y3, the initial equivalent fill light brightness plate_Y5=plate_Y3-plate_Y4, and then plate_Y5 is sent to the mean filter to obtain the filtered fill light brightness plate_Y6.

[0134] Step S270, determining the relationship between the equivalent fill light brightness and the preset brightness alarm range.

[0135] Step S271: When the equivalent fill light brightness of multiple consecutive frames is lower than the brightness alarm range, report a fill light insufficient brightness fault.

[0136] Step S272: When the equivalent fill light brightness of multiple consecutive frames is higher than the brightness alarm range, report a fill light brightness over-brightness fault.

[0137] Specifically, set a threshold T1 and a threshold T2, that is, the brightness alarm range, where T1 < T2. If it is lower than T1, it is considered that the brightness of the flash (fill light) is insufficient; if it is higher than T2, it is considered that the brightness of the flash (fill light) is too high.

[0138] Set parameters Count1 and Count2. Count1 is the number of consecutive frames with insufficient fill light brightness, and Count2 is the number of consecutive frames with too bright fill light brightness. Refer to Figure 4 , determine whether plate_Y6 is less than the threshold T1. If not, clear Count1 to 0 and proceed to the next step; determine whether plate_Y6 is greater than the threshold T2. If so, increment Count2 by 1 and proceed to the next step; determine whether Count2 is greater than the preset count threshold T4. If Count2 is greater than T4, report a fault of too bright fill light and end; if Count2 is not greater than T4, directly end.

[0139] Determine whether plate_Y6 is greater than the threshold T2. If not, clear Count2 to 0 and end.

[0140] Determine whether plate_Y6 is less than the threshold T1. If so, increment Count1 by 1, clear Count2 to 0, and proceed to the next step; determine whether Count1 is greater than the preset count threshold T3. If Count1 is greater than T3, report a fault of insufficient fill light brightness and end; if Count1 is not greater than T3, directly end.

[0141] In this embodiment, the flash is installed or the flash fault is reported according to the equivalent fill light brightness, which greatly reduces the labor cost.

[0142] In some of these embodiments, based on the surveillance video data of the captured frame, the brightness of the captured frame is calculated, including:

[0143] Step S251: Obtain the brightness components of the second pixel points, the second key area information, and the exposure information of the captured frame.

[0144] Step S252: Calculate the brightness of the second key area based on the brightness components of the second pixel points and the second key area information.

[0145] Step S253: Calculate the unified exposure level brightness based on the exposure information and the brightness of the second key area.

[0146] Step S254: Obtain the brightness of the captured frame based on the unified exposure level brightness.

[0147] Specifically, calculate the multiple X of the current frame exposure value to the preset exposure value according to the exposure information. Assume that the current frame shutter is shut 当前 (in units of rows), and the gain is gain当前 (Unit: db), the shutter speed corresponding to the preset exposure value is shut 预设 , gain is gain 预设 , then the multiple X is calculated using the following formula:

[0148] ;

[0149] If an automatic aperture lens is used, the equivalent db number of the current aperture can also be approximated through calibration or the relationship between the lens step length and the light-passing area.

[0150] Unify the exposure level brightness plate_Y2=plate_Y2 / X, and use plate_Y2 as the capture frame brightness.

[0151] In this embodiment, the accuracy of the brightness calculation of the captured frames is improved by unifying the exposure levels.

[0152] The present embodiment is described and illustrated below through preferred embodiments.

[0153] Figure 5 FIG. 1 is a flow chart of the method for adjusting the exposure of the captured frame in the preferred embodiment. Figure 5 As shown, the process includes the following steps:

[0154] SA1. Get the current frame raw data, exposure information, frame mark, and license plate position and color information.

[0155] SA2. Calculate the brightness component Y of each pixel based on the original data of the previous frame.

[0156] SA3. Calculate the average brightness of the license plate plate_Y according to the brightness component Y of each pixel and the license plate position information, and then obtain the license plate brightness plate_Y1 according to the license plate color information.

[0157] SA4. Calculate the multiple X of the current frame exposure value and the preset exposure value according to the exposure information.

[0158] SA5, license plate brightness plate_Y1 calculates the average brightness of the license plate after the unified exposure level plate_Y2=plate_Y1 / X.

[0159] SA6, determine whether the current frame mark is a captured frame;

[0160] SA7. If yes, determine the brightness of the fill light based on the captured frame;

[0161] SA8. If not, adjust the exposure gain based on the identified frame.

[0162] Figure 6It is the flowchart of judging the brightness of the fill light based on the captured frame in this preferred embodiment. As Figure 6 shown, this process includes the following steps:

[0163] SB1. Set the flag of the first captured frame to 1.

[0164] SB2. The brightness component Y1 of each pixel in the captured frame = Y (Y is calculated through step SA2); based on the multiple X, calculate the brightness component Y3 of each pixel after unified exposure level = Y1 / X; the brightness Y5 of each pixel of the equivalent flash = Y3 - Y4.

[0165] SB3. Calculate and save the brightness weight q of each pixel of the equivalent flash,

[0166] ;

[0167] where Y2 is the brightness component of each pixel of the previous recognition frame, D1, D2, and D3 are preset brightness thresholds (D2 > D3), q min and q max are preset weight thresholds (q max > q min ), and the core idea is that the weight of the overexposed area (brightness higher than D1) in the recognition frame is 0, and the weight of the brighter area in the captured frame gradually decreases as the brightness increases.

[0168] SB4. The brightness of the license plate in the captured frame plate_Y3 = plate_Y2 (plate_Y2 is calculated through step SA5), and calculate the brightness of the equivalent flash license plate plate_Y5 = plate_Y3 - plate_Y4, and then send plate_Y5 into the mean filter to obtain the filtered brightness of the equivalent flash license plate plate_Y6. Where plate_Y4 is the brightness of the license plate in the recognition frame.

[0169] SB5. Judge the brightness of the fill light based on the brightness of the equivalent flash license plate plate_Y6.

[0170] Figure 4 It is the flowchart of judging the brightness of the fill light in this preferred embodiment. As Figure 4 shown, this process includes the following steps:

[0171] SC1. Judge whether the filtered brightness of the equivalent flash license plate plate_Y6 is less than the threshold T1; if not, go to the next step; if so, go to step SC8; the threshold T1 in this step and the threshold T2 in step SC3 are preset license plate brightness thresholds (T1 < T2), and if it is lower than T1, it is considered that the flash brightness is insufficient, and if it is higher than T2, it is considered that the flash brightness is too high.

[0172] SC2: The number of consecutive frames when the fill light brightness is insufficient is cleared to 0, and the next step is entered.

[0173] SC3. Determine whether the filtered equivalent flash light license plate brightness plate_Y6 is greater than the threshold value T2. If yes, proceed to the next step; otherwise, proceed to step SC7.

[0174] SC4, fill light brightness is too bright for consecutive frames Count2++, go to the next step.

[0175] SC5. Determine whether the number of consecutive frames Count2 of the fill light being too bright is greater than a preset counting threshold T4. If yes, proceed to the next step; otherwise, end directly.

[0176] SC6: Report the fill light brightness is too bright fault. End.

[0177] SC7. The number of consecutive frames of fill light brightness being too bright Count2 is cleared to 0, and the process ends.

[0178] SC8, the continuous frame number Count1++ when the fill light brightness is insufficient, the continuous frame number Count2 when the fill light brightness is too bright is cleared to 0, and then go to the next step.

[0179] SC9. Determine whether the number of consecutive frames Count1 of the fill light being too bright is greater than a preset counting threshold T3. If yes, proceed to the next step; otherwise, end directly.

[0180] SC10: Report the fault of insufficient brightness of the fill light. End.

[0181] Figure 7 FIG. 4 is a flow chart of adjusting the exposure gain based on the recognition frame of the preferred embodiment. Figure 7 As shown, the process includes the following steps:

[0182] SD1. The current frame is the recognition frame. The brightness of the recognition frame license plate plate_Y4=plate_Y2 (calculated by step SA5), and the next step is entered.

[0183] SD2, identify the brightness component Y2=Y of each pixel in the frame (calculated by step SA2), and calculate the brightness component Y4=Y2 / X of each pixel after the uniform exposure level (X is calculated by step SA4), and proceed to the next step.

[0184] SD3. Determine whether the first captured frame mark is 1; if yes, proceed to the next step; if no, end directly.

[0185] SD4: Determine whether the current recognition frame is in the pre-capture position; if yes, proceed to the next step; if no, end directly. The pre-capture position mark can be obtained from the intelligent vehicle detection algorithm.

[0186] SD5, calculate and estimate the equivalent brightness of each pixel in the captured frame Y6=Y5+Y4 (the equivalent brightness of each pixel of the flash light Y5 is calculated by step SB2), and proceed to the next step;

[0187] SD6. Based on the brightness weight q of each pixel of the equivalent flash light (calculated in step SB3), the estimated average brightness avg_Y of each pixel of the equivalent captured frame is calculated:

[0188] .

[0189] SD7. Calculate the estimated captured frame license plate brightness plate_Y7=plate_Y6+plate_Y4 (the equivalent flash light license plate brightness plate_Y6 is calculated by step SB4).

[0190] SD8. Calculate the upper limit adj_avg_Y_max and lower limit adj_avg_Y_min of the estimated capture frame ambient light compensation ratio:

[0191] ;

[0192] aim_Y_max is the upper limit of the target brightness of the ambient light in the equivalent snapshot frame, and aim_Y_min is the lower limit of the target brightness of the ambient light in the equivalent snapshot frame.

[0193] SD9, calculate the upper limit adj_plate_Y_max1 and lower limit adj_plate_Y_min1 of the brightness compensation ratio of the recognition frame license plate:

[0194] ;

[0195] aim_plate_Y_max1 is the upper limit of the target brightness of the license plate in the recognition frame, and aim_plate_Y_min1 is the lower limit of the target brightness of the license plate in the recognition frame.

[0196] SD10, calculate the upper limit adj_plate_Y_max2 and lower limit adj_avg_Y_min2 of the brightness compensation ratio of the estimated captured frame license plate:

[0197] ;

[0198] aim_plate_Y_max2 is the upper limit of the target brightness of the license plate in the captured frame, aim_plate_Y_min2 is the lower limit of the target brightness of the license plate in the captured frame, and aim_plate_Y_max2>aim_plate_Y_max1, aim_plate_Y_min2>aim_plate_Y_min1.

[0199] SD11, calculate the upper limit adj_max and lower limit adj_min of the final compensation ratio in order of priority from low to high:

[0200] ;

[0201] The estimated capture frame license plate brightness has the highest priority, the recognition frame license plate brightness has the second priority, and the estimated capture frame ambient light brightness has the lowest priority; the upper and lower limits of the equivalent capture frame ambient light brightness compensation ratio first use the upper and lower limit symbols of the recognition frame license plate brightness compensation ratio, and then use the equivalent capture frame license plate brightness limit symbols.

[0202] The definition of the clip operation is as follows: value=clip(a,min,max);

[0203] .

[0204] SD12. Calculate the final compensation ratio adj=(adj_max+adj_min) / 2.

[0205] SD13. The final compensation ratio adj is sent to the traditional AE algorithm to calculate the final captured frame exposure gain and set it to the sensor sensor. End.

[0206] In this preferred embodiment, the generation principle of the recognition frame and the capture frame is used to calculate the equivalent flash light pixel brightness Y5 and the equivalent flash light license plate brightness plate_Y6, and then combined with the real-time recognition frame environment brightness and the recognition frame license plate brightness, the estimated capture environment brightness and the estimated capture license plate brightness are calculated, and the three layers are compensated according to the priority, and the capture frame is exposed independently, taking into account the capture frame environment brightness, the recognition frame license plate brightness and the capture frame license plate brightness as much as possible, effectively solving the problem of the traditional license plate exposure algorithm backlash or adjustment overshoot in scenes such as too few captured vehicles or yin and yang lanes. And it can guide the installation of the flash or report the flash fault according to the equivalent flash license plate brightness, greatly reducing labor costs. And the later flash brightness attenuation (most of the existing flash lights are xenon strobe lights, and their attenuation is more serious after a certain number of times), this preferred embodiment can also effectively compensate.

[0207] It should be noted that the steps shown in the above process or the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0208] In this embodiment, a capture frame exposure adjustment device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and will not be repeated hereafter. The terms "module", "unit", "subunit", etc. used below may be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation in hardware, or a combination of software and hardware, is also possible and conceivable.

[0209] Figure 8 : is a structural block diagram of the capture frame exposure adjustment device of this embodiment, such as Figure 8 As shown, the device includes: an initial data acquisition module 10, a recognition frame brightness calculation module 20, a brightness compensation calculation module 30 and a snapshot exposure adjustment module 40.

[0210] The initial data acquisition module 10 is used to acquire video frames in real-time monitoring data; the video frames include recognition frames and snapshot frames, the recognition frames are images captured when the fill light is turned off, and the snapshot frames are images captured when the fill light is turned on.

[0211] The recognition frame brightness calculation module 20 is used to calculate the recognition frame brightness based on the target recognition frame if the current recognition frame is a target recognition frame located at the pre-capture position, and obtain the pre-stored equivalent fill light brightness; the equivalent fill light brightness is calculated based on the previous capture frame.

[0212] The brightness compensation calculation module 30 is used to calculate the brightness compensation ratio based on the recognition frame brightness and the pre-stored equivalent fill light brightness.

[0213] The snapshot exposure adjustment module 40 is used to set the exposure gain used when the snapshot frame is collected next time based on the brightness compensation ratio.

[0214] In some embodiments, calculating the recognition frame brightness based on the target recognition frame includes: obtaining the first pixel brightness components and the first key area information of the target recognition frame; calculating the first key area brightness based on the first pixel brightness components and the first key area information; the recognition frame brightness includes the first key area brightness and the first pixel brightness components.

[0215] In some embodiments, the brightness of the first key area is calculated based on the brightness components of the first pixels and the first key area information, including: the first key area information includes license plate position information and license plate color information; based on the brightness components of the first pixels and the license plate position information, the initial average brightness of the license plate is calculated; based on the initial average brightness of the license plate and the license plate color information, the brightness of the first key area is calculated.

[0216] In some of the embodiments, a brightness compensation ratio is calculated based on the recognition frame brightness and the pre-stored equivalent fill light brightness; including: calculating a first estimated snapshot brightness compensation range based on the brightness components of the first pixel points and the acquired pixel brightness weights; calculating a second estimated snapshot brightness compensation range based on the first key area brightness and the pre-stored equivalent fill light brightness; limiting the first estimated snapshot brightness compensation range based on the second estimated snapshot brightness compensation range to obtain a target estimated snapshot brightness compensation range; and calculating the brightness compensation ratio based on the target estimated snapshot brightness compensation range.

[0217] In some of the embodiments, the first estimated snapshot brightness compensation range is limited based on the second estimated snapshot brightness compensation range to obtain a target estimated snapshot brightness compensation range, including: calculating an identification brightness compensation range based on the brightness of the first key area; limiting the first estimated snapshot brightness compensation range based on the identification brightness compensation range to obtain a third estimated snapshot brightness compensation range; limiting the third estimated snapshot brightness compensation range based on the second estimated snapshot brightness compensation range to obtain a target estimated snapshot brightness compensation range.

[0218] In some embodiments, the pixel brightness weight is dynamically updated based on the brightness components of the first pixels of the target recognition frame; wherein, the method for dynamically updating the pixel brightness weight includes: when the brightness components of the first pixels are greater than a first preset brightness threshold, updating the pixel brightness weight to zero; when the brightness components of the first pixels are not greater than the first preset brightness threshold, setting the pixel brightness weight according to the brightness of the previous captured frame.

[0219] In some embodiments, the method also includes: if the current video frame is a captured frame, calculating the captured frame brightness based on the monitoring video data of the captured frame; obtaining the pre-stored recognition frame brightness; calculating the equivalent fill light brightness corresponding to the current captured frame based on the captured frame brightness and the pre-stored recognition frame brightness; judging the relationship between the equivalent fill light brightness and a preset brightness alarm range; in the case where the equivalent fill light brightness of multiple consecutive frames is lower than the brightness alarm range, reporting a fill light brightness insufficient fault; in the case where the equivalent fill light brightness of multiple consecutive frames is higher than the brightness alarm range, reporting a fill light brightness excessive fault.

[0220] In some of the embodiments, the brightness of the captured frame is calculated based on the surveillance video data of the captured frame, including: obtaining the brightness components of the second pixels of the captured frame, the second key area information and the exposure information; calculating the brightness of the second key area based on the second brightness components of the pixels and the second key area information; calculating the uniform exposure level brightness based on the exposure information and the brightness of the second key area; and obtaining the brightness of the captured frame based on the uniform exposure level brightness.

[0221] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.

[0222] In this embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0223] Optionally, the computer device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0224] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and will not be repeated in this embodiment.

[0225] In addition, in combination with the snapshot frame exposure adjustment method provided in the above embodiment, a storage medium can also be provided in this embodiment to implement the method. The storage medium stores a computer program; when the computer program is executed by a processor, any snapshot frame exposure adjustment method in the above embodiment is implemented.

[0226] It should be understood that the specific embodiments described herein are only used to explain the application, rather than to limit it. Based on the embodiments provided in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of this application.

[0227] Obviously, the drawings are only some examples or embodiments of the present application. For ordinary technicians in the field, the present application can also be applied to other similar situations based on these drawings without creative work. In addition, it is understandable that although the work done in this development process may be complicated and lengthy, for ordinary technicians in the field, certain changes in design, manufacturing or production based on the technical content disclosed in this application are only conventional technical means and should not be regarded as insufficient content disclosed in this application.

[0228] The term "embodiment" in this application refers to a specific feature, structure or characteristic described in conjunction with the embodiment that can be included in at least one embodiment of the present application. The appearance of this phrase in various locations in the specification does not necessarily mean the same embodiment, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. It is clearly or implicitly understood by those of ordinary skill in the art that the embodiments described in this application can be combined with other embodiments without conflict.

[0229] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of patent protection. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the attached claims.

Claims

1. A method for adjusting exposure of a captured frame, characterized in that: The method comprises: Acquire video frames in real-time monitoring data; the video frames include recognition frames and snapshot frames, the recognition frames are images captured when the fill light is turned off, and the snapshot frames are images captured when the fill light is turned on; If the current recognition frame is a target recognition frame located at a pre-capture position, the recognition frame brightness is calculated based on the target recognition frame, and a pre-stored equivalent fill light brightness is obtained; the equivalent fill light brightness is calculated based on the previous capture frame; Calculating a brightness compensation ratio based on the identified frame brightness and the pre-stored equivalent fill light brightness; Based on the brightness compensation ratio, setting the exposure gain used when the captured frame is collected next time; The step of calculating the recognition frame brightness based on the target recognition frame includes: Acquire the brightness components of first pixels and first key area information of the target recognition frame; Calculating the brightness of the first key area based on the brightness components of the first pixels and the first key area information; The recognition frame brightness includes the brightness of the first key area and the brightness components of each of the first pixels; The step of calculating the brightness compensation ratio based on the recognition frame brightness and the pre-stored equivalent fill light brightness includes: Calculating a first estimated captured brightness compensation range based on the brightness components of the first pixels and the acquired pixel brightness weights; Based on the brightness of the first key area and the pre-stored equivalent fill light brightness, a second estimated snapshot brightness compensation range is calculated; Based on the second estimated snapshot brightness compensation range, the first estimated snapshot brightness compensation range is limited to obtain a target estimated snapshot brightness compensation range; The brightness compensation ratio is calculated based on the estimated captured brightness compensation range of the target.

2. The capture frame exposure adjustment method according to claim 1, characterized in that: Calculating the brightness of the first key area based on the brightness components of the first pixels and the first key area information includes: The first key area information includes license plate position information and license plate color information; Calculating the initial average brightness of the license plate based on the brightness components of the first pixels and the license plate position information; The brightness of the first key area is calculated based on the initial average brightness of the license plate and the color information of the license plate.

3. The method for adjusting exposure of captured frames according to claim 1, characterized in that: The first estimated snapshot brightness compensation range is limited based on the second estimated snapshot brightness compensation range to obtain a target estimated snapshot brightness compensation range, including: Based on the brightness of the first key area, calculating and identifying a brightness compensation range; Based on the identified brightness compensation range, the first estimated snapshot brightness compensation range is limited to obtain a third estimated snapshot brightness compensation range; The third estimated snapshot brightness compensation range is limited based on the second estimated snapshot brightness compensation range to obtain a target estimated snapshot brightness compensation range.

4. The method for adjusting exposure of captured frames according to claim 1, characterized in that: The pixel brightness weight is dynamically updated based on the brightness components of the first pixels of the target recognition frame; The method for dynamically updating pixel brightness weights includes: When the brightness component of each of the first pixels is greater than a first preset brightness threshold, updating the pixel brightness weight to zero; When the brightness component of each of the first pixel points is not greater than the first preset brightness threshold, the pixel brightness weight is set according to the brightness of the previous captured frame.

5. The method for adjusting exposure of captured frames according to claim 1, characterized in that: The method further comprises: If the current video frame is a captured frame, then based on the monitoring video data of the captured frame, the captured frame brightness is calculated; Acquire the pre-stored recognition frame brightness; based on the captured frame brightness and the pre-stored recognition frame brightness, calculate the equivalent fill light brightness corresponding to the current captured frame; Determining the relationship between the equivalent fill light brightness and a preset brightness alarm range; When the equivalent fill light brightness of multiple consecutive frames is lower than the brightness alarm range, reporting a fill light brightness insufficient fault; When the equivalent fill light brightness of multiple consecutive frames is higher than the brightness alarm range, a fill light brightness over-brightness fault is reported.

6. The method for adjusting exposure of captured frames according to claim 5, characterized in that: Based on the monitoring video data of the captured frame, the brightness of the captured frame is calculated, including: Obtaining second pixel brightness components, second key area information, and exposure information of the captured frame; Calculating the brightness of the second key area based on the brightness components of the second pixel points and the second key area information; Calculating a uniform exposure level brightness based on the exposure information and the second key area brightness; Based on the uniform exposure level brightness, the captured frame brightness is obtained.

7. A capture frame exposure adjustment device, characterized in that: The device comprises: An initial data acquisition module is used to acquire video frames in real-time monitoring data; the video frames include recognition frames and snapshot frames, the recognition frames are images captured when the fill light is turned off, and the snapshot frames are images captured when the fill light is turned on; The recognition frame brightness calculation module is used for calculating the recognition frame brightness based on the target recognition frame and obtaining the pre-stored equivalent fill light brightness if the current recognition frame is a target recognition frame located at the pre-capture position; the equivalent fill light brightness is calculated based on the previous capture frame; wherein, calculating the recognition frame brightness based on the target recognition frame includes: obtaining the brightness components of the first pixels and the first key area information of the target recognition frame; calculating the brightness of the first key area based on the brightness components of the first pixels and the first key area information; the recognition frame brightness includes the brightness of the first key area and the brightness components of the first pixels; A brightness compensation calculation module, used to calculate a brightness compensation ratio based on the recognition frame brightness and the pre-stored equivalent fill light brightness; wherein, the brightness compensation ratio is calculated based on the recognition frame brightness and the pre-stored equivalent fill light brightness, including: calculating a first estimated snapshot brightness compensation range based on the brightness components of each of the first pixels and the acquired pixel brightness weights; calculating a second estimated snapshot brightness compensation range based on the brightness of the first key area and the pre-stored equivalent fill light brightness; limiting the first estimated snapshot brightness compensation range based on the second estimated snapshot brightness compensation range to obtain a target estimated snapshot brightness compensation range; and calculating the brightness compensation ratio based on the target estimated snapshot brightness compensation range; The snapshot exposure adjustment module is used to set the exposure gain used when the snapshot frame is collected next time based on the brightness compensation ratio.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Exposure adjusting method and device, camera shooting control device and monitoring camera

    CN112019760A

  • Camera flash module and method for controlling same

    US20090160944A1