A light supplementing brightness adjustment method, device and equipment
By segmenting and classifying images, and combining ambient light information and historical brightness, the brightness of texture illumination is adaptively adjusted, solving the problem of texture illumination adaptability under different brightness environments and improving the detection effect and environmental adaptability of binocular vision.
Patent Information
- Application Number
- CN202210857745.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-20
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2042-07-20
AI Technical Summary
Existing methods for adjusting the brightness of texture lighting rely on photosensitive sensors, which can lead to problems of being too bright or too dark in different brightness environments. This results in poor adaptability and affects the detection effect and environmental adaptability of binocular vision.
By dividing the image into multiple image blocks, calculating the average gradient value and grayscale value of each image block, classifying the image blocks based on these values, and determining the supplementary lighting brightness adjustment strategy based on the classification results, the system combines ambient light information and historical brightness for fusion adjustment.
It improves the detection performance and environmental adaptability of the visual sensor, and can adaptively adjust the brightness, overcoming the problem of texture illumination failure caused by relying solely on ambient light brightness, and enhancing adaptability in complex environments.
Smart Images

Figure CN115439678B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of artificial intelligence, in particular to a light compensation brightness adjustment method, device and equipment. BACKGROUND
[0002] At present, binocular vision technology has been applied in more and more scenes, and is favored due to its low price, high recognition speed and rich information, but its low precision, low recognition rate and strong environmental dependence are also criticized. Texture light compensation is a simple and efficient processing scheme for this problem. Using texture light compensation can greatly improve the detection effect of binocular vision. However, in terms of adaptability to different brightness environments, the brightness of texture light compensation needs to adapt to the brightness of the environment to better assist binocular vision in identification. Therefore, the brightness of texture light compensation needs to change with the change of the environment.
[0003] In related technologies, the most common method is to use a photosensitive sensor to detect ambient light, and then directly set the brightness of the texture light compensation according to the brightness of the ambient light. This method is simple and convenient, but has poor adaptability, which is specifically manifested in the following aspects: (1) The linear proportion itself does not conform to the actual situation, and the proportion selection is ambiguous. (2) In the case of constant ambient light, the texture light compensation is set the same due to different distances from the obstacle, resulting in over-brightness or over-darkness of the texture light compensation.
[0004] Therefore, in order to better adaptively adjust the brightness of texture light compensation and overcome the problems caused by using a photosensitive sensor to obtain ambient light information, more information is needed to assist in brightness adjustment, so that the adjustment effect has stronger stability, and the detection effect of binocular vision and environmental adaptability are improved. SUMMARY
[0005] The main purpose of the present application is to disclose a light compensation brightness adjustment method, device and equipment, which at least solves the problem that in related technologies, the brightness of texture light compensation is directly set according to the brightness of ambient light detected by a photosensitive sensor, resulting in over-brightness or over-darkness of the texture light compensation.
[0006] According to one aspect of the present application, a light compensation brightness adjustment method is provided.
[0007] The light compensation brightness adjustment method according to the present application comprises: dividing a current image into a plurality of image blocks; for each image block in the image blocks, respectively calculating the average gradient value and the average gray value of the pixel points in the image block; classifying each image block in the current image according to the average gradient value and the average gray value; and determining a light compensation brightness adjustment strategy corresponding to the classification statistical result according to the classification statistical result of each image block.
[0008] According to another aspect of the present application, there is provided a light compensation brightness adjustment device.
[0009] The light compensation brightness adjustment device according to the present application comprises: a division module configured to divide a current image into a plurality of image blocks; a calculation module configured to calculate, for each of the image blocks, an average gradient value and an average gray value of pixel points in the image block; a classification module configured to classify each of the image blocks in the current image according to the average gradient value and the average gray value; and a determination module configured to determine a light compensation brightness adjustment strategy corresponding to a classification statistical result of each of the image blocks according to the classification statistical result.
[0010] According to yet another aspect of the present application, there is provided a device.
[0011] The device according to the present application comprises a memory and a processor, wherein the memory is configured to store computer execution instructions, and the processor is configured to execute the computer execution instructions stored in the memory, so that the device performs the method according to any one of the above aspects.
[0012] According to the present application, based on texture brightness information analysis of a current image, the current image is divided into a plurality of image blocks, for each of the image blocks, an average gradient value and an average gray value of pixel points in the image block are calculated, each of the image blocks in the current image is classified according to the average gradient value and the average gray value, and a light compensation brightness adjustment strategy to be performed is determined according to a classification statistical result of each of the image blocks, which solves the problem in the related art that only a photosensitive sensor is used to detect ambient light, and the brightness of texture light compensation is directly set according to the brightness of the ambient light, resulting in over-bright or over-dark phenomenon of the texture light compensation, and the present application adopts different brightness adjustment modes for different situations, better self-adaptively adjusts the brightness of light compensation, and improves the detection effect and environmental adaptability of the vision sensor. BRIEF DESCRIPTION OF DRAWINGS
[0013] Figure 1 is a flowchart of a light compensation brightness adjustment method according to an embodiment of the present application;
[0014] Figure 2 is a structural block diagram of a light compensation brightness adjustment device according to an embodiment of the present application;
[0015] Figure 3 is a structural block diagram of a light compensation brightness adjustment device according to a preferred embodiment of the present application;
[0016] Figure 4 is a structural block diagram of a device according to an embodiment of the present application. DETAILED DESCRIPTION
[0017] The specific implementation manners of the present application will be described in detail below with reference to the accompanying drawings.
[0018] According to the embodiment of the present application, a brightness adjustment method for texture light compensation is provided.
[0019] Figure 1 is a flowchart of the brightness adjustment method for texture light compensation according to the embodiment of the present application. As shown in Figure 1 , the brightness adjustment method for texture light compensation comprises:
[0020] Step S101: dividing the current image into a plurality of image blocks;
[0021] Step S102: for each of the image blocks, respectively calculating the average gradient value and the average gray value of the pixel points in the image block;
[0022] Step S103: classifying each image block in the current image according to the average gradient value and the average gray value;
[0023] Step S104: determining the light compensation brightness adjustment strategy corresponding to the classification statistical result according to the classification statistical result of each image block.
[0024] By using Figure 1 the method shown in the figure, based on the texture brightness information analysis of the current image, the current image is divided into a plurality of image blocks, for each of the image blocks, the average gradient value and the average gray value of the pixel points in the image block are respectively calculated, each image block in the current image is classified according to the average gradient value and the average gray value, and the texture light compensation brightness adjustment strategy to be executed is determined according to the classification statistical result of each image block. For different situations, the present application adopts different brightness adjustment modes to better adaptively adjust the brightness of light compensation (for example, the brightness of texture light compensation, etc.), thereby improving the detection effect and environmental adaptability of the visual sensor.
[0025] Preferably, before the current image is divided into a plurality of image blocks of equal size in step S101, the following processing can also be included: detecting the parallax filling value of the current image; when the parallax filling value is greater than or equal to a predetermined parallax filling threshold value, it is determined to continue to maintain the light compensation brightness of the current image; when the parallax filling value is less than the predetermined parallax filling threshold value, the gradient value of the pixel points of the current image is calculated, and it is determined to execute the operation of dividing the current image into a plurality of image blocks of equal size.
[0026] In the preferred implementation process, for the current image, the disparity filling rate needs to be checked, when the disparity filling rate is high enough, greater than or equal to a predetermined disparity filling threshold, then the current image can be used for light compensation brightness, without triggering subsequent operations. When the disparity filling value is less than the predetermined disparity filling threshold, the gradient value of each pixel point of the current image needs to be calculated, and the operation based on image texture brightness information analysis is triggered, that is, the above steps S101 to S103.
[0027] Because the overall average information of the image and the single pixel point information cannot effectively reflect the texture brightness information of different regions in the field of view, the image is divided into multiple image blocks of equal size.
[0028] Preferably, in step S103, classifying each image block in the current picture according to the average gradient value and the average gray value can further include the following processing: for each image block in the current picture, when the average gradient value of the image block is greater than or equal to the first gradient threshold, the image block is determined as the first type image block; for each image block in the current picture, when the average gradient value of the image block is less than the first gradient threshold and greater than or equal to the second gradient threshold, and the average gray value of the image block is less than the first gray threshold and greater than or equal to the second gray threshold, the image block is determined as the second type image block; for each image block in the current picture, when the average gradient value of the image block is less than the first gradient threshold and greater than or equal to the second gradient threshold, and the average gray value of the image block is less than the second gray threshold and greater than or equal to the third gray threshold, the image block is determined as the third type image block; for each image block in the current picture, when the average gradient value of the image block is less than the second gradient threshold, and the average gray value of the image block is greater than or equal to the first gray threshold, the image block is determined as the fourth type image block; for each image block in the current picture, when the average gradient value of the image block is less than the second gradient threshold, and the average gray value of the image block is less than the third gray threshold, the image block is determined as the fifth type image block.
[0029] In the preferred implementation process, two gradient thresholds can be set, wherein the first gradient threshold is higher than the second gradient threshold, and the two thresholds divide the gradient into three grades, when the average gradient value of the image block is greater than or equal to the first gradient threshold, the average gradient value is considered to be high; when the average gradient value of the image block is less than the first gradient threshold and greater than or equal to the second gradient threshold, the average gradient value is considered to be lower; when the average gradient value of the image block is less than the second gradient threshold, the average gradient value is considered to be extremely low.
[0030] And, three gray scale thresholds can be set, wherein the first gray scale threshold is higher than the second gray scale threshold, and the second gray scale threshold is higher than the third gray scale threshold, the three thresholds divide the gray scale into four grades, when the average gray scale value of the image block is greater than or equal to the first gray scale threshold, the average gray scale value is regarded as high; when the average gray scale value of the image block is less than the first gray scale threshold and greater than or equal to the second gray scale threshold, the average gradient value is regarded as higher; when the average gray scale value of the image block is less than the second gray scale threshold and greater than or equal to the third gray scale threshold, the average gradient value is regarded as lower; when the average gray scale value of the image block is less than the third gradient threshold, the average gradient value is regarded as low.
[0031] In summary, the category to which the image block belongs can be determined according to the average gradient value and the average gray scale value of the image block: when the average gradient value of the image block is greater than or equal to the first gradient threshold, the image block is determined as the first category image block, that is, the average gradient value of the image block is high; when the average gradient value of the image block is less than the first gradient threshold and greater than or equal to the second gradient threshold, and the average gray scale value of the image block is less than the first gray scale threshold and greater than or equal to the second gray scale threshold, the image block is determined as the second category image block, that is, the average gradient value of the image block is lower and the average gray scale value is higher; when the average gradient value of the image block is less than the first gradient threshold and greater than or equal to the second gradient threshold, and the average gray scale value of the image block is less than the second gray scale threshold and greater than or equal to the third gray scale threshold, the image block is determined as the third category image block, that is, the average gradient value of the image block is lower and the average gray scale value is lower; when the average gradient value of the image block is less than the second gradient threshold, and the average gray scale value of the image block is greater than or equal to the first gray scale threshold, the image block is determined as the fourth category image block, that is, the average gradient value of the image block is extremely low and the average gray scale value is high; when the average gradient value of the image block is less than the second gradient threshold, and the average gray scale value of the image block is less than the third gray scale threshold, the image block is determined as the fifth category image block, that is, the average gradient value of the image block is extremely low and the average gray scale value is low.
[0032] Preferably, the determining of the light compensation brightness adjustment strategy corresponding to the classification statistical result of each image block can further include the following processing: judging whether the proportion of the fourth type of image blocks in the total image blocks is greater than a preset first proportion threshold; if greater than the preset first proportion threshold, then lowering the current brightness value of the current image by a first predetermined brightness value; if less than or equal to the preset first proportion threshold, then judging whether the proportion of the fifth type of image blocks in the total image blocks exceeds a preset second proportion threshold; if greater than the preset second proportion threshold, then increasing the current brightness value of the current image by a second predetermined brightness value; if less than or equal to the preset second proportion threshold, then continuing to judge the maximum number of the first type of image blocks, the second type of image blocks and the third type of image blocks; if the number of the first type of image blocks is the largest, then continuing to maintain the current brightness of the current image; if the number of the second type of image blocks is the largest, then calculating the brightness adjustment value of each image block respectively, and using the brightness adjustment mean value of all image blocks to increase the current brightness of the current image; if the number of the third type of image blocks is the largest, then calculating the brightness adjustment value of each image block respectively, and using the brightness adjustment mean value of all image blocks to decrease the current brightness of the current image.
[0033] In the preferred implementation process, if the proportion of the fourth type of image blocks in the image blocks of the current image exceeds a certain proportion (i.e. the first proportion threshold), then the current brightness can be directly lowered by a predetermined amount (i.e. the first predetermined brightness value) according to the overexposure processing; if the proportion of the fifth type of image blocks exceeds a certain proportion (i.e. the second proportion threshold), then the current brightness can be directly increased by a predetermined amount (i.e. the second predetermined brightness value) according to the overdark processing.
[0034] Then, the maximum number of the first type of image blocks, the second type of image blocks and the third type of image blocks is continuously judged; if the number of the first type of image blocks is the largest, then the brightness is appropriate and the current brightness is maintained; if the number of the second type of image blocks is the largest, then the brightness adjustment value of each image block is calculated respectively, and the brightness adjustment mean value of all image blocks is used to increase the current brightness of the current image; if the number of the third type of image blocks is the largest, then the brightness adjustment value of each image block is calculated respectively, and the brightness adjustment mean value of all image blocks is used to decrease the current brightness of the current image.
[0035] Preferably, the brightness adjustment value of each image block can be calculated respectively by the following method:
[0036] The brightness adjustment value of the current image block = min(1.0, (the predetermined image block gray threshold - the current image block gray mean value) / the predetermined image block gray threshold) * ((the predetermined image block gradient threshold - the current image block gradient mean value) / the predetermined image block gradient threshold) * 100.
[0037] From the above formula, the luminance adjustment value of the current image block is proportional to the degree of deviation of the gray value mean from the gray threshold value, and is inversely proportional to the size of the gradient mean value; if the gray value mean is higher than the gray threshold value, the luminance adjustment value is negative; if the gray value mean is lower than the gray threshold value, the luminance adjustment value is positive.
[0038] Preferably, using the luminance adjustment mean value of all image blocks to increase or decrease the current luminance of the current image can further include the following processing: fusing the luminance adjustment value based on image texture analysis, the current luminance value of the current image, and the luminance adjustment value based on the current ambient light, or fusing the luminance adjustment value based on image texture analysis and the luminance adjustment value based on the current ambient light, and then determining the fused luminance adjustment value, wherein the luminance adjustment value based on image texture analysis is the luminance adjustment mean value of all image blocks; using the fused luminance adjustment value to increase or decrease the current luminance of the current image.
[0039] In the preferred implementation process, since the luminance adjustment value based on image texture analysis may be estimated incorrectly, the ambient light can be relied on for correction, and the luminance adjustment value of the ambient light is fused with the image texture luminance information according to a predetermined proportion (for example, 15% or the like) to serve as the fused luminance adjustment value.
[0040] Therefore, the final fused luminance adjustment value = first weight * luminance adjustment value based on image texture analysis + second weight * luminance adjustment value based on current ambient light.
[0041] The first weight can be set to be greater than the second weight, for example, the first weight is set to 70%, and the second weight is set to 30%.
[0042] In the preferred implementation process, the light sensing module (for example, a photosensitive sensor) collects ambient light information and converts the ambient light information (for example, ambient light intensity information, etc.) into an analog electrical signal output to an analog-to-digital conversion module, and the analog-to-digital conversion module converts the analog electrical signal into a digital electrical signal. According to the equation fitted by the photoelectric characteristic curve of the photosensitive sensor, the size of the current ambient light illumination can be calculated according to the above-mentioned digital electrical signal (for example, photocurrent).
[0043] The fixed proportion k and the size of the current ambient light illumination can be used to calculate the luminance adjustment value based on the current ambient light, of course, the luminance adjustment value based on the current ambient light can also be determined according to a pre-determined and saved ambient light illumination size and optimal luminance corresponding relationship curve or table, etc.
[0044] In addition, if the fused luminance adjustment value is directly used to adjust the luminance of the light compensation, the luminance setting may jump, which may cause the texture luminance to change too much, and even cause repeated oscillation due to over-adjustment. Therefore, a larger inertia factor can be reserved, for example, the current luminance value of the current image is fused with the fused image texture luminance information according to a predetermined proportion, and the current luminance value of the current image occupies a larger proportion weight (for example, 50% or the like).
[0045] Therefore, the final fused luminance adjustment value = first weight * current luminance value of the current image + second weight * luminance adjustment value based on image texture analysis + third weight * luminance adjustment value based on current ambient light;
[0046] The first weight can be set to be greater than the second weight and the third weight, for example, the first weight is set to 50%, the second weight is set to 35%, and the third weight is set to 15%.
[0047] Preferably, after determining the luminance adjustment strategy of the texture light compensation according to the classification statistical result of each image block, the following processing can be further included:
[0048] The determined luminance adjustment value is controlled by using the following control algorithm:
[0049]
[0050] Wherein, e(t) is a function of the difference between the determined luminance adjustment value and the current luminance value changing with time, u(t) is a function of the difference between the final output luminance adjustment value and the current luminance value changing with time, Kp is a predetermined proportional gain, T t is an integral time constant, and T D is a differential time constant.
[0051] By using the above control algorithm of the continuous control system, the luminance control output can be stabilized, and the stability of the luminance adjustment can be ensured.
[0052] According to the embodiment of the present application, a light compensation luminance adjustment device is also provided.
[0053] Figure 2 is a structural block diagram of the light compensation luminance adjustment device according to the embodiment of the present application. As Figure 2As shown, the light compensation brightness adjustment device comprises: a division module 20 for dividing the current image into a plurality of image blocks; a calculation module 22 for calculating the average gradient value and the average gray value of the pixel points in each of the image blocks; a classification module 24 for classifying each image block in the current image according to the average gradient value and the average gray value; and a determination module 26 for determining a light compensation brightness adjustment strategy corresponding to the classification statistical result of each image block.
[0054] The device is adopted Figure 2 As shown, based on the texture brightness information analysis of the current image, the division module 20 divides the current image into a plurality of image blocks, the calculation module 22 calculates the average gradient value and the average gray value of the pixel points in each of the image blocks, the classification module 24 classifies each image block in the current image according to the average gradient value and the average gray value, and the determination module 26 determines a light compensation brightness adjustment strategy corresponding to the classification statistical result of each image block. For different situations, the device adopts different brightness adjustment methods to better adaptively adjust the brightness of the light compensation, thereby improving the detection effect and environmental adaptability of the visual sensor.
[0055] Preferably, as Figure 3 As shown, the above classification module 24 can further comprise: a first determination unit 240 for determining each image block in the current image as a first type of image block when the average gradient value of the image block is greater than or equal to a first gradient threshold; a second determination unit 242 for determining each image block in the current image as a second type of image block when the average gradient value of the image block is less than the first gradient threshold and greater than or equal to a second gradient threshold, and the average gray value of the image block is less than a first gray threshold and greater than or equal to a second gray threshold; a third determination unit 244 for determining each image block in the current image as a third type of image block when the average gradient value of the image block is less than the first gradient threshold and greater than or equal to the second gradient threshold, and the average gray value of the image block is less than the second gray threshold and greater than or equal to a third gray threshold; a fourth determination unit 246 for determining each image block in the current image as a fourth type of image block when the average gradient value of the image block is less than the second gradient threshold, and the average gray value of the image block is greater than or equal to the first gray threshold; and a fifth determination unit 248 for determining each image block in the current image as a fifth type of image block when the average gradient value of the image block is less than the second gradient threshold, and the average gray value of the image block is less than the third gray threshold.
[0056] Preferably, as Figure 3 As shown in the figure, the determining module 26 can further include: a first judging unit 260, configured to judge whether the proportion of the fourth type of image block accounts for the total image block is greater than a preset first proportion threshold; a second judging unit 262, configured to, when greater than the preset first proportion threshold, lower the current brightness value of the current image by a first predetermined brightness value, and when less than or equal to the preset first proportion threshold, judge whether the proportion of the fifth type of image block accounts for the total image block exceeds a preset second proportion threshold; a third judging unit 264, configured to, when greater than the preset second proportion threshold, raise the current brightness value of the current image by a second predetermined brightness value, and when less than or equal to the preset second proportion threshold, continue to judge the maximum number of the first type of image block, the second type of image block and the third type of image block; a first processing unit 266, configured to, when the number of the first type of image block is the largest, continue to maintain the current brightness of the current image; a second processing unit 268, configured to, when the number of the second type of image block is the largest, calculate the brightness adjustment value of each image block respectively, and use the brightness adjustment mean value of all image blocks to raise the current brightness of the current image; and a third processing unit 270, configured to, when the number of the third type of image block is the largest, calculate the brightness adjustment value of each image block respectively, and use the brightness adjustment mean value of all image blocks to lower the current brightness of the current image.
[0057] It should be noted that the preferred implementation of the above-mentioned texture light compensation brightness adjustment device in which each module is combined with each other can be understood with reference to the corresponding description and effects in the embodiments shown in the figure, which will not be repeated here. Figure 1
[0058] According to an embodiment of the present application, a device is provided.
[0059] Figure 4 is a structural block diagram of the device according to an embodiment of the present application. As Figure 4 As shown in the figure, the robot according to the present application includes a memory 40 and a processor 42, the memory 40 is configured to store computer execution instructions, and the processor 42 is configured to execute the computer execution instructions stored in the memory, so that the robot executes the light compensation brightness adjustment method provided in the above embodiments.
[0060] The processor 42 can be a central processing unit (CPU). The processor 42 can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic components, discrete hardware components, or a combination thereof.
[0061] The memory 40 is a non-transitory computer readable storage medium, which can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as program instructions / modules corresponding to the light supplement brightness adjustment method in the embodiments of the present application. The processor executes various functions and data processing of the processor by running the non-transitory software programs, instructions and modules stored in the memory.
[0062] The memory 40 can include a program storage area and a data storage area. The program storage area can store an operating system and at least one application required by a function. The data storage area can store data created by the processor and the like. In addition, the memory can include a high-speed random access memory, and can also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some embodiments, the memory 40 can optionally include a memory remotely arranged relative to the processor, and these remote memories can be connected to the processor through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0063] The one or more modules are stored in the memory 40, and when executed by the processor 42, perform the light supplement brightness adjustment method as shown in the embodiments. Figure 1 The light supplement brightness adjustment method in the embodiments.
[0064] The specific details of the above device can be understood by referring to the corresponding descriptions and effects of the embodiments shown in the above. Figure 1 The specific details of the above device can be understood by referring to the corresponding descriptions and effects of the embodiments shown in the above.
[0065] To sum up, by means of the above-mentioned embodiments provided by the present application, the brightness adjustment scheme according to image texture analysis is proposed, the fused brightness adjustment method is proposed by comprehensively considering the image analysis result, the ambient light and the historical brightness, and the output of the brightness control is stabilized by using the control algorithm of the continuous control system, therefore, different brightness adjustment modes are used for different situations, the brightness of the light compensation is better self-adaptively adjusted, and the detection effect and the environmental adaptability of the visual sensor are improved. When the binocular structured light faces the complex external environment, it has stronger adaptability, can dynamically adjust the texture brightness of itself according to the environment in time, and overcomes the problem of texture brightness adjustment failure caused by only considering the ambient light in the conventional method, and greatly improves the detection capability of the visual sensor (for example, the binocular visual sensor).
[0066] The above disclosure is only several specific embodiments of the present application, but the present application is not limited thereto, and any change that can be thought of by any person skilled in the art shall fall within the protection scope of the present application.
Claims
1. An illumination compensation brightness adjustment method, characterized in that, The method comprises the following steps: dividing the current image into a plurality of image blocks; for each of the image blocks, calculating the average gradient value and the average gray value of the pixels in the image block respectively; classifying each image block in the current image according to the average gradient value and the average gray value, wherein the classification of each image block in the current image according to the average gradient value and the average gray value comprises: for each image block in the current image, if the average gradient value of the image block is greater than or equal to a first gradient threshold, the image block is determined as a first type of image block; for each image block in the current image, if the average gradient value of the image block is less than the first gradient threshold and greater than or equal to a second gradient threshold, and the average gray value of the image block is less than a first gray threshold and greater than or equal to a second gray threshold, the image block is determined as a second type of image block; for each image block in the current image, if the average gradient value of the image block is less than the first gradient threshold and greater than or equal to the second gradient threshold, and the average gray value of the image block is less than the second gray threshold and greater than or equal to a third gray threshold, the image block is determined as a third type of image block; for each image block in the current image, if the average gradient value of the image block is less than the second gradient threshold, and the average gray value of the image block is greater than or equal to the first gray threshold, the image block is determined as a fourth type of image block; for each image block in the current image, if the average gradient value of the image block is less than the second gradient threshold, and the average gray value of the image block is less than the third gray threshold, the image block is determined as a fifth type of image block; determining a light compensation brightness adjustment strategy corresponding to the classification statistical result of each image block according to the classification statistical result of each image block.
2. The method of claim 1, wherein, Before the current image is divided into a plurality of image blocks of equal size, the method further comprises the following steps: detecting a disparity filling value of the current image; when the disparity filling value is greater than or equal to a predetermined disparity filling threshold, determining to continue to maintain the brightness of the light compensation of the current image; when the disparity filling value is less than the predetermined disparity filling threshold, calculating the gradient value of the pixels of the current image, and determining to perform the operation of dividing the current image into a plurality of image blocks of equal size.
3. The method of claim 1, wherein, The method of determining a light compensation brightness adjustment strategy corresponding to the classification statistical result of each image block according to the classification statistical result of each image block comprises the following steps: determining whether the proportion of the fourth type of image block in the total image blocks is greater than a preset first proportion threshold; if greater than the preset first proportion threshold, the current brightness value of the current image is adjusted by a first predetermined brightness value; if less than or equal to the preset first proportion threshold, it is determined whether the proportion of the fifth type of image block in the total image blocks exceeds a preset second proportion threshold; if greater than the preset second proportion threshold, the current brightness value of the current image is adjusted by a second predetermined brightness value; if less than or equal to the preset second proportion threshold, it is determined whether the number of the first type of image block, the second type of image block, and the third type of image block is the maximum; if the number of the first type of image block is the most, the current brightness of the current image is continued to be maintained. If the number of the second type of image blocks is the most, respectively calculate the brightness adjustment value of each image block, and use the brightness adjustment mean value of all image blocks to increase the current brightness of the current image; If the number of the third type of image blocks is the most, respectively calculate the brightness adjustment value of each image block, and use the brightness adjustment mean value of all image blocks to decrease the current brightness of the current image.
4. The method of claim 3, wherein, Respectively calculate the brightness adjustment value of each image block in the following way: The brightness adjustment value of the current image block = min(1.0, (the predetermined image block gray threshold - the average gray value of the current image block) / the predetermined image block gray threshold) * ((the predetermined image block gradient threshold - the average gradient value of the current image block) / the predetermined image block gradient threshold) * 100.
5. The method of claim 3, wherein, Use the brightness adjustment mean value of all image blocks to increase or decrease the current brightness of the current image, including: Fuse the brightness adjustment value based on image texture analysis, the current brightness value of the current image, and the brightness adjustment value based on the current ambient light, or fuse the brightness adjustment value based on image texture analysis and the brightness adjustment value based on the current ambient light, to determine the fused brightness adjustment value, wherein the brightness adjustment value based on image texture analysis is the brightness adjustment mean value of all image blocks; Use the fused brightness adjustment value to increase or decrease the current brightness of the current image.
6. The method according to any one of claims 1 to 5, characterized in that, After determining the light compensation brightness adjustment strategy corresponding to the classification statistical result according to the classification statistical result of each image block, the method further includes: Control the determined brightness adjustment value by using the following control algorithm: where e(t) is a function of the difference between the determined brightness adjustment value and the current brightness value over time, u(t) is a function of the difference between the final output brightness adjustment value and the current brightness value over time, K p is a predetermined proportional gain, T t is an integral time constant, T D is a derivative time constant.
7. A supplementary lighting brightness adjustment device, characterized in that, The method includes: A division module is configured to divide the current image into a plurality of image blocks; A calculation module is configured to calculate the average gradient value and the average gray value of the pixel points in each image block in the image blocks, respectively. The classification module is configured to classify each image block in the current picture according to the average gradient value and the average gray value, and the classification module further comprises: a first determination unit configured to determine each image block in the current picture as a first type of image block when the average gradient value of the image block is greater than or equal to a first gradient threshold; a second determination unit configured to determine each image block in the current picture as a second type of image block when the average gradient value of the image block is less than the first gradient threshold and greater than or equal to a second gradient threshold, and the average gray value of the image block is less than a first gray threshold and greater than or equal to a second gray threshold; a third determination unit configured to determine each image block in the current picture as a third type of image block when the average gradient value of the image block is less than the first gradient threshold and greater than or equal to the second gradient threshold, and the average gray value of the image block is less than the second gray threshold and greater than or equal to a third gray threshold; a fourth determination unit configured to determine each image block in the current picture as a fourth type of image block when the average gradient value of the image block is less than the second gradient threshold, and the average gray value of the image block is greater than or equal to the first gray threshold; and a fifth determination unit configured to determine each image block in the current picture as a fifth type of image block when the average gradient value of the image block is less than the second gradient threshold, and the average gray value of the image block is less than the third gray threshold. The determination module is configured to determine a light compensation brightness adjustment strategy corresponding to the classification statistical result of each image block according to the classification statistical result.
8. The apparatus of claim 7, wherein, The determination module further comprises: a first judgment unit configured to judge whether the proportion of the fourth type of image block in the total image blocks is greater than a preset first proportion threshold; a second judgment unit configured to lower the current brightness value of the current picture by a first predetermined brightness value when the proportion is greater than the preset first proportion threshold, and judge whether the proportion of the fifth type of image block in the total image blocks exceeds a preset second proportion threshold when the proportion is less than or equal to the preset first proportion threshold; a third judgment unit configured to increase the current brightness value of the current picture by a second predetermined brightness value when the proportion is greater than the preset second proportion threshold, and continue to judge the maximum number of the first type of image block, the second type of image block and the third type of image block when the proportion is less than or equal to the preset second proportion threshold; a first processing unit configured to continue to maintain the current brightness of the current picture when the number of the first type of image block is the largest; a second processing unit configured to calculate the brightness adjustment value of each image block respectively when the number of the second type of image block is the largest, and increase the current brightness of the current picture by using the brightness adjustment mean value of all image blocks; a third processing unit configured to calculate the brightness adjustment value of each image block respectively when the number of the third type of image block is the largest, and decrease the current brightness of the current picture by using the brightness adjustment mean value of all image blocks.
9. An apparatus comprising: The memory and the processor are characterized in that: the memory is configured to store computer execution instructions. a processor configured to execute computer-executable instructions stored in memory such that the device performs the method of any of claims 1 to 6.
Citation Information
Patent Citations
Image adjustment method and associated image processing circuit
US20200394760A1