A day / night switching method for IPC based on joint decision of color and exposure
By introducing a joint color and exposure decision mechanism into network cameras, the instability problem of day-night switching in devices without hardware photosensitive devices is solved, achieving higher switching accuracy and stability, and making it suitable for various scenarios and sensors.
Patent Information
- Application Number
- CN202611438051.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-16
- Publication Date
- 2026-11-17
AI Technical Summary
In the current technology, network cameras without hardware photosensitive devices rely solely on exposure criteria during day-night switching, which is easily disturbed. Gain-assisted criteria fail in certain scenarios, leading to unstable switching and misjudgments, making it difficult to balance sensitivity and stability.
A method based on joint color and exposure decision-making is adopted. By establishing dual reference values for exposure and red-blue components in night vision mode, and requiring that color and exposure conditions be met simultaneously and confirmed multiple times during switching, a switching suggestion is output.
It improves the accuracy and stability of day/night switching, reduces erroneous switching and mode oscillation, and enhances the consistency and robustness of parameter tuning across scenarios and sensors.
Smart Images

Figure CN123123738A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to an IPC day / night switching method based on a joint decision of color and exposure. Background Technology
[0002] With the widespread application of network cameras in security monitoring, smart homes, traffic monitoring, and other fields, camera equipment needs to be able to automatically switch between color imaging during the day and black-and-white imaging at night to ensure image quality under different lighting conditions. For network cameras without hardware photosensitive devices (such as photoresistors), the equipment needs to rely on statistical information from the image signal processor (ISP) to achieve automatic switching between day and night vision modes. This function is usually called "soft photosensitive" detection. In the soft photosensitive solution, the equipment analyzes statistical parameters such as image exposure (EV) and gain to determine the ambient lighting conditions, thereby automatically controlling the switching of the infrared cut-off filter (IR-CUT) and the on / off of the infrared supplementary light.
[0003] Currently, existing soft-sensor day / night switching solutions suffer from the following technical defects: First, existing solutions primarily rely on exposure volume (EV) as the core, or even sole, criterion for day / night switching. EV values are negatively correlated with ambient brightness; that is, the higher the EV value, the lower the ambient brightness. When the device detects an EV value greater than a preset threshold, it switches to night vision mode; when the EV value is less than the preset threshold, it switches to daytime mode. However, automatic exposure dynamic adjustment, momentary strong light in certain areas of the image, removal of obstructions, and fluctuations in infrared illumination can all cause short-term changes in EV values. Existing algorithms lack color dimension verification information and cannot effectively distinguish between overall ambient brightness changes and localized short-term brightness disturbances. This leads to the device easily switching to daytime mode before daylight conditions are met, or oscillating between day and night modes due to frequent EV fluctuations during daylight hours. This results in frequent IR-CUT switching, black-and-white / color flickering in the image, and disordered infrared illumination logic, severely reducing the device's imaging stability.
[0004] Secondly, existing decision-making logic based on relative EV reference values cannot balance switching sensitivity and operational stability. Current technologies typically collect only a single moment's EV value as a baseline reference after entering night vision mode, and then determine the switching based on the difference between the real-time EV and the baseline EV. However, in real-world night vision scenarios, scene brightness, AE working point, and infrared illumination intensity continuously change dynamically, causing the EV baseline value to drift continuously and failing to stably represent the actual ambient lighting conditions. If the EV threshold is set too leniently, normal exposure fluctuations in night vision can easily trigger erroneous switching; if the threshold is set too strictly, switching lag will occur when the environment brightens in the early morning, leading to switching delays or failures.
[0005] Third, some existing technologies introduce image gain values as an auxiliary basis for EV (Earning Value) determination, but this approach has significant limitations in specific scenarios. When the device's night vision mode is set to manual white balance, the system locks a fixed gain parameter. This parameter no longer updates dynamically with changes in ambient light, rendering the collected gain values invalid and the calculation results distorted, completely lacking any reference value for day / night differentiation. In this scenario, the device loses its auxiliary verification capability and can only rely solely on the EV value to make switching decisions, unable to avoid various misjudgment problems caused by EV fluctuations.
[0006] Therefore, there is an urgent need in this field for a day-night switching method that can overcome the shortcomings of existing technologies, such as the susceptibility of a single EV criterion to disturbances, the failure of the gain auxiliary criterion in specific scenarios, and the difficulty in balancing switching sensitivity and stability, so as to improve the imaging stability and switching accuracy of network cameras without hardware photosensitive devices under complex lighting conditions. Summary of the Invention
[0007] The purpose of this invention is to provide an IPC day / night switching method based on a joint decision of color and exposure, so as to solve the problems existing in the prior art.
[0008] To achieve the above objectives, the present invention provides the following solution: This invention provides an IPC day / night switching method based on joint decision of color and exposure, comprising the following steps: S1. Start soft photosensor control and load configuration parameters. The configuration parameters include at least the daytime to night vision exposure threshold, the night vision to daytime exposure absolute threshold, the exposure decrease percentage threshold, the red and blue component decrease percentage threshold, and the red and blue component absolute threshold. S2. Periodically read the current day / night operating mode of the image signal processor. If it is daytime mode, proceed to step S3; if it is night vision mode, proceed to step S5. S3. Obtain the current exposure from the image signal processor. When the current exposure exceeds the daytime-to-night-vision exposure threshold and is confirmed multiple times, output a night-vision switching suggestion. S4. Perform infrared cut-off filter and day / night mode switching according to the night vision switching recommendation. After the switching is completed, proceed to step S5. S5. After entering night vision mode, wait for the image signal processor and infrared status to stabilize, continuously sample the exposure and the average red and blue components in the center area of the automatic white balance area, and establish the exposure reference value, red component reference value and blue component reference value accordingly. S6. Periodically obtain the current exposure, the current average red component value, and the current average blue component value, and calculate the exposure decrease ratio, the red component decrease ratio, and the blue component decrease ratio relative to the exposure reference value, the red component reference value, and the blue component reference value, respectively. S7. Joint Decision: Determine whether the color condition and exposure condition are simultaneously met. If they are simultaneously met and confirmed multiple times, output a daytime switching suggestion; otherwise, maintain the night vision suggestion. The color condition is that the average red component and the average blue component are both lower than the absolute threshold of the red and blue components, or the decrease percentage of the red component and the decrease percentage of the blue component both reach the percentage threshold of the red and blue component decrease. The exposure condition is that the decrease percentage of the exposure reaches the percentage threshold of the exposure decrease, or the current exposure is lower than the absolute threshold of the night vision to daytime exposure. S8. Perform the daytime switching according to the daytime switching suggestion. After completion, return to step S2 to continue running until the soft photosensor control stops.
[0009] Preferably, in step S3, the number of consecutive confirmations is a preset value, used to filter out misjudgments caused by short-term changes in exposure.
[0010] Preferably, in step S5, the average value of the red component and the average value of the blue component are taken from the center area of the automatic white balance area, and the center area is a preset range area in the center of the screen.
[0011] Preferably, in step S5, the waiting image signal processor and infrared state tend to stabilize, specifically: waiting for a first preset time or waiting for the rate of change of exposure to be less than a preset threshold.
[0012] Preferably, the absolute threshold of the red and blue components is set according to the characteristics of the image sensor, and different models of image sensors correspond to different absolute thresholds of the red and blue components.
[0013] Preferably, in step S7, the number of consecutive confirmations is a preset value, used to ensure that after the color conditions and exposure conditions are met simultaneously, a daytime switching suggestion is output after multiple consecutive sampling confirmations.
[0014] Preferably, the formula for calculating the exposure reduction ratio is: Exposure reduction ratio = (exposure reference value - current exposure) / exposure reference value × 100%.
[0015] Preferably, the formula for calculating the red component decrease ratio is: red component decrease ratio = (red component reference value - current red component average value) / red component reference value × 100%.
[0016] Preferably, the formula for calculating the blue component decrease ratio is: blue component decrease ratio = (blue component reference value - current blue component average value) / blue component reference value × 100%.
[0017] Preferably, the image signal processor is an image signal processor in a network camera that automatically switches between day and night modes based on statistical information from the image signal processor, without any hardware photosensitive device.
[0018] The present invention achieves the following beneficial technical effects compared to the prior art: This invention provides an IPC day / night switching method based on joint color and exposure decision-making, which improves switching accuracy and stability. By introducing a joint decision-making mechanism for color components and exposure, when switching back from night vision to daytime, both color and exposure conditions must be simultaneously met and repeatedly confirmed. This effectively compensates for the vulnerability of a single exposure criterion to short-term disturbances, reducing erroneous switching and day / night mode oscillations caused by automatic dynamic exposure adjustment, instantaneous strong light in localized areas of the image, occlusion removal, and infrared illumination fluctuations. By establishing dual reference values for exposure and red / blue components after entering night vision, subsequent switching decisions have a stable and comparable benchmark, avoiding misjudgments based solely on instantaneous exposure fluctuations. By using dual-channel determination of color and exposure conditions, each employing an absolute threshold or a relative decrease ratio, switching sensitivity and stability are balanced, improving parameter tuning consistency and switching robustness across scenes and sensors. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 The flowchart of the IPC day / night switching method based on joint decision of color and exposure provided by the present invention. Detailed Implementation
[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0022] The purpose of this invention is to provide an IPC day / night switching method based on joint decision of color and exposure, so as to solve the problems existing in the prior art.
[0023] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0024] Example 1: This embodiment provides an IPC day / night switching method based on joint color and exposure judgment. This method is mainly applicable to network cameras without hardware photosensitive devices that rely on statistical information from the image signal processor to achieve automatic day / night mode switching. By comprehensively judging changes in image color components and exposure changes, this method effectively solves the problems in existing technologies where single exposure criterion is susceptible to short-term disturbances, gain auxiliary criterion fails in specific scenarios, and switching sensitivity and stability are difficult to balance.
[0025] In practice, the device activates the soft photosensitivity control function, first executing step S1 to load all configuration parameters. These configuration parameters cover various thresholds required for day / night switching decisions, including the daytime-to-night vision exposure threshold, the absolute exposure threshold for nighttime-to-day vision switching, the exposure reduction percentage threshold, the red-blue component reduction percentage threshold, and the red-blue component absolute threshold. The red-blue component absolute threshold can be differentiated based on the image sensor model and characteristics; different sensor models correspond to different red-blue component absolute thresholds to improve consistency in parameter tuning across different scenarios.
[0026] After loading the configuration parameters, the process proceeds to step S2, where the system periodically reads the current day / night operating mode of the image signal processor. Based on the read current mode, the system will enter different branch processing flows. If the current mode is daytime, it proceeds to step S3 to execute the daytime acquisition and decision process; if the current mode is night vision, it directly jumps to step S5 to establish a night vision reference baseline.
[0027] In daytime mode, step S3 is executed. The system obtains the current exposure from the image signal processor and compares it with a preset daytime-to-night vision exposure threshold. Only after the current exposure exceeds this threshold and is confirmed multiple times consecutively, does the system output a night vision switching suggestion. This number of consecutive confirmations is a preset value, designed to filter out short-term exposure fluctuations caused by automatic dynamic exposure adjustment or momentary strong light in certain areas of the image, thus avoiding misjudgments. If the exposure does not reach the threshold, the daytime suggestion is maintained, and the detection cycle continues.
[0028] In step S4, the upper-level control module performs the switching of the infrared cutoff filter and day / night mode based on the night vision switching suggestion output in step S3. After the switching is completed, the system enters night vision mode and proceeds to step S5.
[0029] Upon entering night vision mode, the system first performs a stabilization wait operation because the infrared illumination and automatic exposure adjustment require a certain amount of time to stabilize. Specifically, the system waits for the image signal processor and infrared state to stabilize. This stabilization criterion can be a preset waiting time or waiting until the rate of change in exposure is less than a preset threshold. Once the system stabilizes, it begins continuously sampling the exposure and the average red and blue components in the center area of the automatic white balance region. The center area of the automatic white balance region is a preset range in the center of the image. Based on this continuously sampled data, the system establishes reference values for exposure, red components, and blue components for this night vision mode.
[0030] After the reference baseline is established, the system periodically acquires the current exposure, the current average red component value, and the current average blue component value in step S6. Then, the system compares these current statistics with the reference values established in step S5, calculating the percentage decrease relative to the reference value for each. The specific calculation formulas are: Exposure decrease percentage = (Exposure reference value - Current exposure) / Exposure reference value × 100%; Red component decrease percentage = (Red component reference value - Current average red component value) / Red component reference value × 100%; The same applies to the blue component decrease percentage: Blue component decrease percentage = (Blue component reference value - Current average blue component value) / Blue component reference value × 100%.
[0031] After obtaining the aforementioned reduction ratios, the system proceeds to step S7 for joint judgment. This step is the core innovation of this invention; it requires that both color and exposure conditions be met simultaneously, and only after multiple consecutive confirmations is a daytime switching suggestion output; otherwise, night vision is maintained. The color condition includes two parallel judgment paths: one is that the current average red and blue components are both lower than preset absolute thresholds for red and blue components; the other is that the reduction ratios of both red and blue components reach preset percentage thresholds for red and blue component reductions. Meeting either one is considered a valid color condition. Similarly, the exposure condition includes two parallel judgment paths: one is that the current exposure is lower than a preset absolute threshold for switching from night vision to daytime exposure; the other is that the reduction ratio of exposure reaches a preset percentage threshold for exposure reduction. Meeting either one is considered a valid exposure condition. Only when both color and exposure conditions are met simultaneously, and after multiple consecutive sampling confirmations, does the system output a daytime switching suggestion. This dual verification mechanism enables the device to reliably determine the overall true brightness of the environment, effectively avoiding erroneous switching caused by short-term brightness disturbances or infrared illumination fluctuations.
[0032] In step S8, the upper-level control module performs a day / night switching based on the day / night switching suggestion output in step S7. After the switching is completed, the system returns to step S2 to continue running, periodically reading the day / night operating mode, and repeating this cycle until the soft photosensor control stops.
[0033] Based on the above method and process, the beneficial effects of this invention are as follows: By introducing a joint decision mechanism for color components and exposure, it requires that color conditions and exposure conditions be simultaneously met and repeatedly confirmed when switching back from night vision to daytime. This effectively compensates for the shortcomings of a single exposure criterion being susceptible to short-term disturbances, reducing erroneous switching and day / night mode oscillations caused by automatic dynamic exposure adjustment, instantaneous strong light in local areas of the image, removal of obstructions, and fluctuations in infrared illumination. By establishing dual reference values for exposure and red / blue components after entering night vision, subsequent switching decisions have a stable and comparable benchmark, avoiding misjudgments caused by fluctuations in instantaneous exposure values. By using dual-channel determination of color conditions and exposure conditions, each employing an absolute threshold or a relative decrease ratio, it balances switching sensitivity and stability, improving the consistency of parameter tuning and switching robustness across scenes and sensors. The above method is particularly suitable for scenarios where gain parameters fail in manual white balance mode, providing a reliable auxiliary verification basis. The image signal processor mentioned in this invention is an image signal processor in a network camera that automatically switches between day and night modes based on statistical information from the image signal processor without hardware photosensitive devices. Those skilled in the art should understand that the various thresholds and sampling periods involved in the above specific embodiments can be reasonably adjusted according to the actual application scenario and sensor characteristics.
[0034] This invention has illustrated its principles and implementation methods using specific examples. The descriptions of these embodiments are merely illustrative of the method and its core ideas; furthermore, those skilled in the art will recognize that modifications may be made to the specific implementation methods and application scope based on the principles of this invention. Therefore, the content of this specification should not be construed as limiting the invention.
Claims
1. A day / night switching method for IPC based on joint decision of color and exposure, characterized in that, Includes the following steps: S1. Start soft photosensor control and load configuration parameters. The configuration parameters include at least the daytime to night vision exposure threshold, the night vision to daytime exposure absolute threshold, the exposure decrease percentage threshold, the red and blue component decrease percentage threshold, and the red and blue component absolute threshold. S2. Periodically read the current day / night operating mode of the image signal processor. If it is daytime mode, proceed to step S3; if it is night vision mode, proceed to step S5. S3. Obtain the current exposure from the image signal processor. When the current exposure exceeds the daytime-to-night-vision exposure threshold and is confirmed multiple times, output a night-vision switching suggestion. S4. Perform infrared cut-off filter and day / night mode switching according to the night vision switching recommendation. After the switching is completed, proceed to step S5. S5. After entering night vision mode, wait for the image signal processor and infrared status to stabilize, continuously sample the exposure and the average red and blue components in the center area of the automatic white balance area, and establish the exposure reference value, red component reference value and blue component reference value accordingly. S6. Periodically obtain the current exposure, the current average red component value, and the current average blue component value, and calculate the exposure decrease ratio, the red component decrease ratio, and the blue component decrease ratio relative to the exposure reference value, the red component reference value, and the blue component reference value, respectively. S7. Joint Decision: Determine whether the color condition and exposure condition are simultaneously met. If they are simultaneously met and confirmed multiple times, output a daytime switching suggestion; otherwise, maintain the night vision suggestion. The color condition is that the average red component and the average blue component are both lower than the absolute threshold of the red and blue components, or the decrease percentage of the red component and the decrease percentage of the blue component both reach the percentage threshold of the red and blue component decrease. The exposure condition is that the decrease percentage of the exposure reaches the percentage threshold of the exposure decrease, or the current exposure is lower than the absolute threshold of the night vision to daytime exposure. S8. Perform the daytime switching according to the daytime switching suggestion. After completion, return to step S2 to continue running until the soft photosensor control stops.
2. The IPC day / night switching method based on joint color and exposure decision according to claim 1, characterized in that, In step S3, the number of consecutive confirmations is a preset value, used to filter out misjudgments caused by short-term changes in exposure.
3. The IPC day / night switching method based on joint color and exposure decision according to claim 1, characterized in that, In step S5, the average value of the red component and the average value of the blue component are taken from the center area of the automatic white balance area, and the center area is a preset range area in the center of the screen.
4. The IPC day / night switching method based on joint color and exposure decision according to claim 1, characterized in that, In step S5, the waiting image signal processor and infrared state tend to stabilize, specifically: waiting for a first preset time or waiting for the rate of change of exposure to be less than a preset threshold.
5. The IPC day / night switching method based on joint color and exposure decision according to claim 1, characterized in that, The absolute thresholds for the red and blue components are set according to the characteristics of the image sensor, and different models of image sensors correspond to different absolute thresholds for the red and blue components.
6. The IPC day / night switching method based on joint color and exposure decision according to claim 1, characterized in that, In step S7, the number of consecutive confirmations is a preset value, which is used to ensure that after the color conditions and exposure conditions are met simultaneously, the daytime switching suggestion is output after multiple consecutive sampling confirmations.
7. The IPC day / night switching method based on joint decision of color and exposure according to claim 1, characterized in that, The formula for calculating the percentage decrease in exposure is: Percentage decrease in exposure = (Reference value of exposure - Current exposure) / Reference value of exposure × 100%.
8. The IPC day / night switching method based on joint color and exposure decision according to claim 1, characterized in that, The formula for calculating the percentage decrease in red component is: Percentage decrease in red component = (Reference value of red component - Current average value of red component) / Reference value of red component × 100%.
9. The IPC day / night switching method based on joint color and exposure decision according to claim 1, characterized in that, The formula for calculating the percentage decrease in blue component is: Percentage decrease in blue component = (Reference value of blue component - Current average value of blue component) / Reference value of blue component × 100%.
10. The IPC day / night switching method based on joint color and exposure decision according to claim 1, characterized in that, The image signal processor is an image signal processor in a network camera that automatically switches between day and night modes based on statistical information from the image signal processor, without any hardware photosensitive device.
