Soft photosensitivity method for infrared fill light camera based on gradient algorithm and color difference method

By adopting soft photosensitive methods based on gradient algorithm and chromatic aberration method in the camera, the misjudgment problem of photosensitive algorithms in the prior art under different operating conditions is solved, and more accurate scene judgment and more stable imaging effects are achieved.

CN114663535BActive Publication Date: 2025-04-04HUNAN JIEGAO DIGITAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210302762.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-24
Publication Date
2025-04-04
Estimated Expiration
2042-03-24

AI Technical Summary

Technical Problem

When existing cameras take pictures under different working conditions, the photosensitive algorithm has misjudgment phenomenon, especially when the distance is close, the reflection is concentrated, the existence of monochromatic scenes or moving objects, which can easily lead to miscutting of day and night modes, affecting the imaging effect.

Method used

The soft light sensitivity method of infrared fill-light camera based on gradient algorithm and chromatic aberration method is used to filter the screen brightness through EV value, and the scene state is judged based on chromatic aberration and gradient value to avoid mis-cutting of day and night modes.

Benefits of technology

This method can accurately judge the scene state, avoid misjudgment of daytime and night modes, and ensure the stability and efficiency of the imaging effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114663535B_ABST
    Figure CN114663535B_ABST
Patent Text Reader

Abstract

The present invention discloses a soft photosensitivity method for infrared fill light camera based on gradient algorithm and color difference method, which relates to the field of image processing technology, and comprises the following steps: when the device is powered on, the device enters the day mode, and the EV value is less than EV_2Lux, then the step 3 is entered, the average value of the EV value and the color difference of the current picture is obtained through the interface, the number of switching within the first three minutes is counted, and whether the current EV value is greater than EV_5Lux and the color difference is judged. The soft photosensitivity method for infrared fill light camera based on gradient algorithm and color difference method first preliminarily screens the picture brightness through the EV value, and then judges the overall brightness of the current picture and whether there is a color cast phenomenon through the color difference and the current value of each component, and finally accurately judges what the current scene should be like, and there will be no misjudgment of the scene during the day and at night, and the phenomenon of IRCUT miscutting can be avoided, so that the imaging effect can be effectively guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of image processing, in particular to a soft photosensitivity method for an infrared fill light camera based on a gradient algorithm and a color difference method. Background Art

[0002] The photosensitivity algorithm used by the camera to take pictures under different working conditions is different. The current soft photosensitivity algorithm mainly judges the current environment through the EV value; the EV value is the exposure value of the picture after the SENSOR imaging, and the EV value is converted into the corresponding illumination. During the day, the current EV value is judged. When the EV value is less than the EV value in the environment with an illumination of 2Lux (hereinafter referred to as EV_2Lux), it switches to night. At night, when the current EV value is judged to be greater than the EV value in the environment with an illumination of 5Lux (hereinafter referred to as EV_5Lux), it switches to daytime.

[0003] The above judgment method has the following defects during use: the closer the distance, the more concentrated the reflection, and the larger the EV value. For example, if the lens is close to the desktop, the EV value will be much larger than EV_5Lux, and it will be misjudged as daytime. The higher the reflectivity of the object in the picture (white is the highest and black is the lowest), the larger the EV value. In pictures with more monochrome scenes, the EV appears to be less than EV_2Lux. There are moving objects in the picture, causing the EV value to jitter, which may be less than EV_2Lux or greater than EV_5Lux, causing IRCUT to be miscut, making it impossible for the camera to perform related shooting work efficiently and stably in actual use; for this reason, we propose a soft photosensitivity method for infrared fill light cameras based on gradient algorithm and color difference method. Summary of the invention

[0004] 1. Technical issues to be solved

[0005] In view of the deficiencies in the prior art, the present invention provides a soft photosensitivity method for an infrared fill light camera based on a gradient algorithm and a chromatic aberration method, which solves the problems mentioned in the above background technology.

[0006] (II) Technical solution

[0007] To achieve the above purpose, the present invention is implemented by the following technical scheme: a soft photosensitivity method for infrared fill light camera based on gradient algorithm and color difference method, comprising the following steps:

[0008] Step 1: Turn on the device and enter the day mode. In day mode, the infrared light is turned off, IRCUT turns off the red light filter, and the picture is in color. In day mode, the EV value can accurately reflect the ambient illumination. At this time, as long as the EV value is stable within a certain small range within 5s, it is considered stable and go to step 2.

[0009] Step 2: If the EV value is less than EV_2Lux, go to step 3, otherwise go back to step 1 and judge again. At this time, the device will enter the night mode. In the night mode, the infrared light is turned on, IRCUT turns on the red light filter, and the picture appears in black and white.

[0010] Step 3: Get the EV value and the average value of the color difference of the current picture through the interface.

[0011] Step 4: Count the number of switches within the first three minutes. If it is greater than three times, return to step 3. Otherwise, determine whether the current EV value is stable. If it is stable, go to step 5. Otherwise, keep the night mode and return to step 3.

[0012] Step 5: Get a frame of YUV data to calculate the gradient value of the image.

[0013] Step 6: Calculate the smoothness of the current scene and whether the EV value is very large according to the gradient value. If so, it indicates that the scene is a highly reflective scene. Otherwise, keep the night mode and return to step 3.

[0014] Step 7: Determine whether the current EV value is greater than EV_5Lux and the color difference. If so, switch to day mode and return to step 2; otherwise, keep night mode and return to step 3.

[0015] Preferably, the gradient value measures the rate of change of the grayscale of the image, and the calculation formula of the gradient value is as follows:

[0016]

[0017] Preferably, x is the width of the image, y is the height of the image, and R(x, y) is the value obtained by calculating the gradient of the grayscale value Y at the point where the width of the image is x and the height of the image is y.

[0018] Preferably, the color difference is an average value of the color difference values ​​aColorDiff.

[0019] Preferably, the calculation steps of the color difference value aColorDiff are as follows:

[0020] S1. Obtain the RGB primary color components of each of the 256 (16x16) color blocks.

[0021] S2. Remove the black and white color blocks, and finally take the minimum component of RGB of the remaining color blocks to calculate the color difference.

[0022] S3. Obtain the color difference value aColorDiff through the color difference value calculation formula.

[0023] Preferably, the color difference value calculation formula is as follows:

[0024] RGB=R+G+B;

[0025] MinRGB=min(min(R,G),B);

[0026] aColorDiff=RGB-MinRGB*3.

[0027] (III) Beneficial effects

[0028] The present invention provides a soft photosensitivity method for infrared fill light camera based on gradient algorithm and color difference method. It has the following beneficial effects:

[0029] (1) The soft photosensitivity method of infrared fill light camera based on gradient algorithm and color difference method first preliminarily screens the brightness of the picture through the EV value, and then judges the overall brightness of the current picture and whether there is a color cast through the color difference and the current value of each component. Finally, it accurately judges what the current scene should be like, and will not make misjudgments of scenes during the day and at night, and can avoid the phenomenon of IRCUT miscutting, thereby effectively ensuring the imaging effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 Sample images selected by the present invention in complex scenes;

[0031] Figure 2 For the present invention Figure 1 The corresponding gradient map in ;

[0032] Figure 3 It is a schematic diagram of the color difference diagram of the present invention. DETAILED DESCRIPTION

[0033] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0034] See also Figure 1-Figure 3 The present invention provides a technical solution: a soft photosensitivity method for infrared fill light camera based on gradient algorithm and color difference method, comprising the following steps:

[0035] Step 1: Turn on the device and enter the day mode. In day mode, the infrared light is turned off, IRCUT turns off the red light filter, and the picture is in color. In day mode, the EV value can accurately reflect the ambient illumination. At this time, as long as the EV value is stable within a certain small range within 5s, it is considered stable and go to step 2.

[0036] Step 2: If the EV value is less than EV_2Lux, go to step 3, otherwise go back to step 1 and judge again. At this time, the device will enter the night mode. In the night mode, the infrared light is turned on, IRCUT turns on the red light filter, and the picture appears in black and white.

[0037] Step 3: Get the EV value and the average value of the color difference of the current picture through the interface.

[0038] Step 4: Count the number of switching times within the first three minutes. If it is greater than three times, return to step 3. Otherwise, determine whether the current EV value is stable. If it is stable, go to step 5. Otherwise, keep the night mode and return to step 3.

[0039] Step 5: Get a frame of YUV data to calculate the gradient value of the image.

[0040] Step 6: Calculate the image smoothness and EV value of the current scene based on the gradient value to see if it is very large. If so, it indicates that the scene is a highly reflective scene. Otherwise, keep the night mode and return to step 3.

[0041] Step 7: Determine whether the current EV value is greater than EV_5Lux and the color difference. If so, switch to day mode and return to step 2; otherwise, keep night mode and return to step 3.

[0042] In this embodiment, a gradient algorithm is used to filter scenes with sufficient brightness but noise. The gradient value measures the rate of change of the image grayscale, and the calculation formula of the gradient value is as follows:

[0043]

[0044] x is the width of the image, y is the height of the image, and R(x,y) is the value of the gradient of the grayscale value Y at the point where the image has a width of x and a height of y. The greater the difference in grayscale values ​​between adjacent pixels in the image, the greater the surface undulation of the object, and the greater the value of the overall image presented after the gradient operation; if the difference in grayscale values ​​between adjacent pixels is small, it means that the surface undulation of the object is small and tends to be a smoother plane, then the value of the overall image presented after the gradient operation is smaller. In a simple environment, no matter how bright the environment is, if the image does not have enough details, the gradient value will be small. For example: under strong light, the gradient value of a piece of white paper is 0.

[0045] The higher the percentage of values ​​with larger gradient values, the rougher the surface of the object captured by the camera, and the more contours it presents; conversely, the higher the percentage of values ​​with smaller gradient values, the smoother the surface of the object captured by the camera, and the fewer contours it presents. In this way, you can ignore smooth high-reflection scenes and continue to maintain the night state.

[0046] Take out the Y value or grayscale value of each pixel in a YUV image, calculate the gradient value R(x,y) of each pixel, divide the gradient values ​​of all pixels into 12 intervals, and finally count the distribution range of the intervals. By comparing the difference in gradient values ​​of each interval of the image presented by the rough object and the smooth plane object, the range of the gradient value of the smooth plane can be calculated. For different sensors and camera controllers, the final range of the gradient value of the smooth plane is also different. It is necessary to test from an engineering perspective to accurately determine this range to ensure the effectiveness of the soft photosensitivity method.

[0047] In this embodiment, the color difference is used to distinguish the monochrome scene, and the color difference is the average value of the color difference value aColorDiff. The calculation steps of the color difference value aColorDiff are as follows:

[0048] S1. Obtain the RGB primary color components of each of the 256 (16x16) color blocks;

[0049] S2, remove the black and white color blocks, and finally take the minimum component of RGB of the remaining color blocks to calculate the color difference;

[0050] S3. Obtain the color difference value aColorDiff through the color difference value calculation formula.

[0051] The color difference value calculation formula is as follows:

[0052] RGB=R+G+B;

[0053] MinRGB=min((min(R,G),B);

[0054] aColorDiff = RGB - MinRGB * 3;

[0055] In a normal environment, the white balance algorithm can well reflect the ambient brightness. However, in a monochrome scene near the critical point, the white balance algorithm will fail. However, the color difference can well display the original color of the object. The color difference will increase, greatly improving the recognition rate of monochrome scenes. For the six pure colors, at least one RGB component is close;

[0056] 0 In low illumination, white and black blocks are filtered out to prevent statistical distortion. Therefore, the EV value is used to preliminarily screen the brightness of the picture, and then the color difference and the current value of each component are used to determine the overall brightness of the current picture and whether there is a color cast. Finally, the current scene is accurately determined to avoid misjudgment of daytime and nighttime scenes, and to avoid IRCUT miscutting, thereby effectively ensuring the imaging effect.

[0057] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A soft photosensitivity method for infrared fill light camera based on gradient algorithm and color difference method, characterized by: The following steps are involved: Step 1: Turn on the device and enter the day mode. In the day mode, the infrared light is turned off, IRCUT turns off the red light filter, and the screen is in color. In the day mode, the EV value can accurately reflect the ambient illumination. At this time, as long as the EV value is stable within a certain small range within 5s, it is considered stable and enter step 2; Step 2: If the EV value is less than EV_2Lux, go to step 3, otherwise go back to step 1 and make a new judgment. At this time, the device will enter the night mode. In the night mode, the infrared light is turned on, IRCUT turns on the red light filter, and the picture is black and white. Step 3: Obtain the EV value and the average value of the color difference of the current picture through the interface; Step 4: Count the number of switching times within the first three minutes. If it is greater than three times, return to step 3. Otherwise, determine whether the current EV value is stable. If it is stable, go to step 5. Otherwise, keep the night mode and return to step 3. Step 5: Get a frame of YUV data to calculate the gradient value of the picture; Step 6: Calculate the smoothness of the current scene and whether the EV value is very large according to the gradient value. If so, it indicates that the scene is a highly reflective scene. Otherwise, keep the night mode and return to step 3. Step 7: Determine whether the current EV value is greater than EV_5Lux and the color difference. If so, switch to day mode and return to step 2; otherwise, keep night mode and return to step 3. The gradient value measures the rate of change of the image grayscale, and the calculation formula of the gradient value is as follows: The x is the width of the image, the y is the height of the image, and the R(x, y) is the value obtained by calculating the gradient of the grayscale value Y corresponding to the point where the width is x and the height is y in the image.

2. The soft photosensitivity method for infrared fill light camera based on gradient algorithm and color difference method according to claim 1 is characterized in that: The color difference is the average value of the color difference values ​​aColorDiff.

3. The soft photosensitivity method for infrared fill light camera based on gradient algorithm and color difference method according to claim 2 is characterized in that: The calculation steps of the color difference value aColorDiff are as follows: S1. Obtain the RGB primary color components of each of the 256 (16x16) color blocks; S2, remove the black and white color blocks, and finally take the minimum component of RGB of the remaining color blocks to calculate the color difference; S3. Obtain the color difference value aColorDiff through the color difference value calculation formula.

4. The soft photosensitivity method for infrared fill light camera based on gradient algorithm and color difference method according to claim 3 is characterized in that: The color difference value calculation formula is as follows: RGB=R+G+B; MinRGB=min(min(R,G),B); aColorDiff=RGB-MinRGB*3.

Citation Information

Patent Citations

  • Method for detecting edge of color image on basis of local self-adaption color difference threshold

    CN102819850A

  • Soft photosensitive diagnosis algorithm under full-color night vision

    CN113395427A