Camera day and night switching method and system based on area adaptive threshold

By adopting a camera day and night switching method based on regional adaptive thresholds in monitoring equipment and adaptively adjusting the exposure threshold, the problem of repeated switching when the monitoring equipment switches between day and night modes is solved, reducing costs and improving performance.

CN118590752AActive Publication Date: 2024-09-03JINAN HEPU VISION OPTOELECTRONICS TECH CO LTD

Patent Information

Application Number
CN202411035273.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-09-03
Estimated Expiration
2044-07-31

AI Technical Summary

Technical Problem

Existing monitoring equipment has problems such as high cost and damaged structural performance when switching between day and night modes, and the software threshold method can easily lead to repeated switching, affecting normal use.

Method used

The camera day and night switching method based on area adaptive threshold is adopted. The user presets the daytime switching night exposure threshold and the night switching daytime exposure threshold, and calculates the current frame exposure based on the exposure weight and real-time statistical information of the monitoring area, and adaptively adjusts Mode switching to avoid the increase in brightness when the fill light is turned on.

Benefits of technology

It effectively avoids the problem of repeated mode switching, improves the normal use effect of monitoring equipment, reduces material costs, and simplifies structural design.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118590752A
    Figure CN118590752A
Patent Text Reader

Abstract

The invention provides a camera day and night switching method and system based on an area self-adaptive threshold value, and belongs to the technical field of camera mode switching control, and the method comprises the following steps: a camera receives a day-to-night exposure threshold value, a night-to-day exposure threshold value and an exposure weight of a monitoring area, which are preset by a user; acquiring monitoring scene statistical information of the camera in real time, and calculating actual exposure of the current frame according to the monitoring scene statistical information; controlling the camera to perform mode switching according to the current mode of the camera, the actual exposure of the current frame and the relationship between the daytime-to-night exposure threshold and the night-to-daytime exposure threshold, and adaptively adjusting the night-to-daytime exposure threshold according to the mode relationship between the front frame and the rear frame before the night mode is switched to the daytime mode. According to the invention, when the daytime mode is switched to the night mode, the exposure threshold value is adaptively adjusted, so that the problem of repeated switching caused by rise of picture brightness when the light supplement lamp is turned on is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of camera mode switching control, and in particular relates to a camera day and night switching method and system based on regional adaptive threshold. Background Art

[0002] With the increase of monitoring demand and the development of monitoring technology, monitoring equipment has been widely used in various fields. Currently, monitoring products are equipped with two modes, day and night, to adapt to different light intensities, especially for low illumination to obtain better image effects. Monitoring products are equipped with fill lights as auxiliary lighting equipment to extend the duration of color effects. Monitoring products have added filters to ensure better light transmittance in night mode.

[0003] Traditionally, the day-night mode switching is achieved by adding hard photosensitivity. This method is relatively stable, but it increases the material cost and is limited by the installation method. Opening holes in the product shell will affect the overall structural strength and waterproof performance of the product. Controlling the day-night mode switching through software thresholds can overcome the hardware installation problem, but this method also has problems. When the ambient brightness decreases and the day mode switches to the night mode, the fill light will turn on, which will cause the screen brightness to increase. The monitoring device will determine that it needs to switch to the day mode and turn off the fill light based on the increased brightness, resulting in repeated mode switching, affecting the normal use of the monitoring device.

[0004] This is a shortcoming of the prior art. Therefore, in view of the above defects in the prior art, it is very necessary to provide a method and system for switching cameras day and night based on regional adaptive thresholds. Summary of the invention

[0005] In view of the fact that the current monitoring equipment in the prior art uses hard photosensitivity for day-night switching, which increases costs and affects the overall performance of the product, and the software threshold switching method has the defect of repeated switching, the present invention provides a camera day-night switching method and system based on regional adaptive thresholds to solve the above technical problems.

[0006] In a first aspect, the present invention provides a method for switching a camera day and night based on a regional adaptive threshold, comprising the following steps: S1. The camera receives the user's pre-set daytime switching night exposure threshold, night switching daytime exposure threshold and exposure weight of the monitoring area; S2. Obtain the monitoring scene statistical information of the camera in real time, and calculate the actual exposure of the current frame based on the monitoring scene statistical information; S3. Control the camera to switch modes according to the current mode of the camera, the actual exposure of the current frame, and the relationship between the exposure threshold for switching from day to night and the exposure threshold for switching from night to day. At the same time, before switching from night mode to day mode, adaptively adjust the exposure threshold for switching from night to day according to the mode relationship between the previous and next frames.

[0007] Furthermore, the specific steps of step S1 are as follows: S11. The user pre-sets the exposure threshold for the camera to switch from day to night, and uses it as the first exposure threshold Save in camera; S12. The user pre-sets the exposure threshold for the camera to switch from night to day, and uses it as the second exposure threshold Save in camera; S13. The user uses the adaptive reduction value of the exposure threshold of the camera switching from night to day as the second exposure adjustment threshold , and pre-set the second exposure adjustment threshold Calculation method of S14. The user pre-sets the exposure weight of the monitoring area.

[0008] Furthermore, the specific steps of step S14 are as follows: S141. Pre-dividing the monitoring area evenly into rectangular blocks arranged in rows and columns; S142. Set the rectangular block combination in the monitoring area in a "convex" shape from bottom to top as the center combination, and set the edge combinations in order from the center combination outward; S143. Set the number of "convex" characters in the center combination to M, and M "convex" characters are raised from bottom to top; S144. Set the weight of the center combination to be the highest, and the weights of the edge combinations to decrease outward from the center combination; S145. Sum the weights of each block as the exposure weight of the monitoring area.

[0009] Furthermore, the specific steps of step S2 are as follows: S21. Real-time acquisition of shutter time as monitoring scene statistics of the camera , Gain And the aperture size F; S22. Calculate the exposure of the current frame using the following formula: :

[0010] in, is the exposure weight of each block in the monitoring area predefined by the user, and q is the number of blocks in the monitoring area.

[0011] Furthermore, the specific steps of step S13 are as follows: S131. Obtain the gain in the monitoring scene statistics of the camera ; S132. Gain The auxiliary gain is calculated by the following formula :

[0012] in, To take the decimal part of the parameter, is the floor rounding function; S133. Use the following formula and auxiliary gain Calculate the second exposure adjustment threshold :

[0013] Where k is a user-defined adjustment coefficient.

[0014] Furthermore, the specific steps of step S3 are as follows: S31. The camera obtains a pre-saved first exposure threshold , the second exposure threshold And the calculated exposure of the current frame ; S32. The camera determines the current working mode; When it is night mode, go to step S34; When it is day mode, go to step S33; S33. The camera recognizes the current frame exposure Greater than the first exposure threshold When , the control switches the day mode to the night mode, turns on the fill light, and returns to step S21; S34. Whether the camera is in day mode in the previous frame of the current frame, and the exposure of the current frame Less than the second exposure threshold , the second exposure threshold Reduce to the second exposure adjustment threshold , and the exposure value in the current frame Less than the second exposure adjustment threshold , control the switching of night mode to day mode, and when the N frames before the current frame are continuously in night mode, adjust the second exposure value threshold Increase to the second exposure threshold .

[0015] Furthermore, the specific steps of step S33 are as follows: S331. The camera determines whether the previous frame of the current frame is in day mode; If yes, go to step S332; If not, proceed to step S336; S332. The camera determines the exposure of the current frame Is it less than the second exposure threshold? ; If yes, go to step S333; If not, proceed to step S338; S333. The second exposure threshold Reduce to the second exposure adjustment threshold ; S334. Determine the exposure of the current frame Is it less than the second exposure adjustment threshold? ; If yes, go to step S335; If not, return to step S21; S335. The camera controls the night mode to the day mode, and returns to step S21; S336. The camera determines whether the N frames before the current frame are in night mode, where N>1 is a user-preset value; If yes, go to step S337; If not, proceed to step S338; S337. The camera adjusts the second exposure threshold Increase to the second exposure threshold , return to step S21; S338. Camera control maintains the second exposure threshold No change, return to step S21.

[0016] Furthermore, in step S337, the second exposure adjustment threshold is Increase to the second exposure threshold The process is controlled by the following formula:

[0017] Where j is the user-defined adjustment speed coefficient.

[0018] In a second aspect, the present invention provides a camera day and night switching system based on regional adaptive threshold, comprising: A user setting module is used to receive the exposure threshold for switching from day to night, the exposure threshold for switching from night to day, and the exposure weight of the monitoring area preset by the user; The data acquisition module is used to obtain the monitoring scene statistical information of the camera in real time and calculate the actual exposure of the current frame based on the monitoring scene statistical information; The mode switching control module is used to control the camera to switch modes according to the current mode, the actual exposure of the current frame and the relationship between the exposure threshold for switching from day to night and the exposure threshold for switching from night to day. At the same time, before switching from night mode to day mode, the exposure threshold for switching from night to day is adaptively adjusted according to the mode relationship between the previous and next frames.

[0019] Furthermore, the user setting module includes: The daytime switching night threshold setting unit is used to receive the user's preset camera daytime switching night exposure threshold and use it as the first exposure threshold Save in camera; The night-to-day switching threshold setting unit is used to receive the user's preset camera night-to-day exposure threshold and use it as the second exposure threshold Save in camera; The night-to-day adjustment threshold setting unit is used to receive the user's adaptive reduction value of the camera's night-to-day exposure threshold as the second exposure adjustment threshold , and pre-set the second exposure adjustment threshold Calculation method of The monitoring area division and regional exposure weight calculation unit is used for the user to divide the monitoring area into blocks in advance, and set the weight of each block in the entire monitoring area in a "convex" shape, wherein the weight of the block inside the "convex" shape is greater than the weight of the block outside the "convex" shape, and then the weight of each block is used as the exposure weight of the area; The data acquisition module includes: A monitoring scene statistical information acquisition unit is used to acquire the shutter time of the monitoring scene statistical information of the camera in real time , Gain And the aperture size F; The current frame exposure calculation unit is used to calculate the exposure of the current frame using the following formula: :

[0020] in, The exposure weight of each block in the monitoring area is predefined by the user, and q is the number of blocks in the monitoring area; The mode switching control module includes: A threshold value acquisition unit, used to acquire a pre-saved first exposure threshold value , the second exposure threshold And the calculated exposure of the current frame ; A mode determination unit, used to determine the current working mode; Day and night switching control unit, used to identify the current frame exposure in day mode Greater than the first exposure threshold When the control switches the day mode to the night mode, and turns on the fill light; Night-day switching control unit, used to check whether the previous frame of the current frame was in day mode in night mode, and the exposure of the current frame Less than the second exposure threshold , the second exposure threshold Reduce to the second exposure adjustment threshold , and the exposure value in the current frame Less than the second exposure adjustment threshold , control the switching of night mode to day mode, and when the N frames before the current frame are continuously in night mode, adjust the second exposure value threshold Increase to the second exposure threshold .

[0021] The beneficial effects of the present invention are: The camera day / night switching method and system based on regional adaptive threshold provided by the present invention avoids the problem of repeated switching caused by increased picture brightness when the fill light is turned on by adaptively adjusting the exposure threshold when switching from day mode to night mode.

[0022] In addition, the invention has a reliable design principle, a simple structure and a very broad application prospect.

[0023] It can be seen that compared with the prior art, the present invention has outstanding substantive features and significant progress, and the beneficial effects of its implementation are also obvious. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0025] Figure 1 The figure is a flow chart of an embodiment of a method for switching cameras day and night based on regional adaptive thresholds according to the present invention.

[0026] Figure 2 It is a flow chart of another embodiment of the method for switching cameras day and night based on regional adaptive thresholds of the present invention.

[0027] Figure 3It is a flow chart of the present invention for adaptively adjusting the exposure threshold for switching from night to day.

[0028] Figure 4 It is a schematic diagram of a camera day and night switching system based on regional adaptive thresholds according to the present invention.

[0029] Figure 5 It is a schematic diagram of a "convex"-shaped monitoring area of ​​the present invention. DETAILED DESCRIPTION

[0030] 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 should fall within the scope of protection of the present invention.

[0031] See also Figure 1 The figure shows a method for switching cameras day and night based on a regional adaptive threshold in a specific implementation, comprising the following steps: S1. The camera receives the user's pre-set daytime switching night exposure threshold, night switching daytime exposure threshold and exposure weight of the monitoring area; S2. Obtain the monitoring scene statistical information of the camera in real time, and calculate the actual exposure of the current frame based on the monitoring scene statistical information; S3. Control the camera to switch modes according to the current mode of the camera, the actual exposure of the current frame, and the relationship between the exposure threshold for switching from day to night and the exposure threshold for switching from night to day. At the same time, before switching from night mode to day mode, adaptively adjust the exposure threshold for switching from night to day according to the mode relationship between the previous and next frames.

[0032] In this embodiment, Figure 2 As shown, the specific steps of step S1 are as follows: S11. The user pre-sets the exposure threshold for the camera to switch from day to night, and uses it as the first exposure threshold Save in camera; S12. The user pre-sets the exposure threshold for the camera to switch from night to day, and uses it as the second exposure threshold Save in camera; S13. The user uses the adaptive reduction value of the exposure threshold of the camera switching from night to day as the second exposure adjustment threshold , and pre-set the second exposure adjustment threshold Calculation method of S14. The user sets the exposure weight of the monitoring area; Figure 5 As shown, the specific steps of step S14 are as follows: S141. Pre-dividing the monitoring area evenly into rectangular blocks arranged in rows and columns; S142. Set the rectangular block combination in the monitoring area in a "convex" shape from bottom to top as the center combination, and set the edge combinations in order from the center combination outward; S143. Set the number of "convex" characters in the center combination to M, and M "convex" characters are raised from bottom to top; S144. Set the weight of the center combination to be the highest, and the weights of the edge combinations to decrease outward from the center combination; S145. Sum the weights of each block as the exposure weight of the monitoring area; It should be noted that the role of regional weight division is to improve the day-night switching anomaly caused by limitations on installation sites and methods. For the inevitable large-area always-on light sources in the picture, such as street lamps and billboards, the switching anomaly problem can be solved by reducing the weight of the block where they are located; The specific steps of step S2 are as follows: S21. Real-time acquisition of shutter time as monitoring scene statistics of the camera , Gain And the aperture size F; the default value of the aperture size F is 1; S22. Calculate the exposure of the current frame using the following formula: :

[0033] in, The exposure weight of each block in the monitoring area is predefined by the user, and q is the number of blocks in the monitoring area; The specific steps of step S3 are as follows: S31. The camera obtains a pre-saved first exposure threshold , the second exposure threshold And the calculated exposure of the current frame ; S32. The camera determines the current working mode; When it is night mode, go to step S34; When it is day mode, go to step S33; S33. The camera recognizes the current frame exposure Greater than the first exposure threshold When the control switches the day mode to the night mode, and turns on the fill light, the process returns to step S21; Figure 3 As shown, the specific steps of step S33 are as follows: S331. The camera determines whether the previous frame of the current frame is in day mode; If yes, go to step S332; If not, proceed to step S336; S332. The camera determines the exposure of the current frame Is it less than the second exposure threshold? ; If yes, go to step S333; If not, proceed to step S338; S333. The second exposure threshold Reduce to the second exposure adjustment threshold ; S334. Determine the exposure of the current frame Is it less than the second exposure adjustment threshold? ; If yes, go to step S335; If not, return to step S21; S335. The camera controls the night mode to the day mode, and returns to step S21; S336. The camera determines whether the N frames before the current frame are in night mode, where N>1 is a value preset by the user; for example, N may be 3; If yes, go to step S337; If not, proceed to step S338; S337. The camera adjusts the second exposure threshold Increase to the second exposure threshold , return to step S21; S338. Camera control maintains the second exposure threshold No change, return to step S21; S34. Whether the camera is in day mode in the previous frame of the current frame, and the exposure of the current frame Less than the second exposure threshold , the second exposure threshold Reduce to the second exposure adjustment threshold , and the exposure value in the current frame Less than the second exposure adjustment threshold , control the switching of night mode to day mode, and when the N frames before the current frame are continuously in night mode, adjust the second exposure value threshold Increase to the second exposure threshold ; It should be noted that the specific steps of step S13 are as follows: S131. Obtain the gain in the monitoring scene statistics of the camera ; S132. Gain The auxiliary gain is calculated by the following formula :

[0034] in, To take the decimal part of the parameter, is the floor rounding function; S133. Use the following formula and auxiliary gain Calculate the second exposure adjustment threshold :

[0035] Among them, k is a user-defined adjustment coefficient, and the default value of k can be 1; In step S337, the second exposure adjustment threshold is set Increase to the second exposure threshold The process is controlled by the following formula:

[0036] Among them, j is the user-defined adjustment speed coefficient; a colon expression is used here, for example, A?B:C is a colon expression, which means that when condition A is true, expression B is executed, and when condition A is false, expression C is executed.

[0037] It should be understood that the order of execution of the steps in the above embodiment does not mean that the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0038] The following is an embodiment of a camera day / night switching system based on a regional adaptive threshold provided in an embodiment of the present disclosure. This system and the camera day / night switching method based on a regional adaptive threshold in the above-mentioned embodiments belong to the same inventive concept. For details not fully described in the embodiment of the camera day / night switching system based on a regional adaptive threshold, reference can be made to the embodiment of the camera day / night switching method based on a regional adaptive threshold in the above-mentioned embodiments.

[0039] like Figure 4 As shown, the system includes: A user setting module is used to receive the exposure threshold for switching from day to night, the exposure threshold for switching from night to day, and the exposure weight of the monitoring area preset by the user; The data acquisition module is used to obtain the monitoring scene statistical information of the camera in real time and calculate the actual exposure of the current frame based on the monitoring scene statistical information; The mode switching control module is used to control the camera to switch modes according to the current mode, the actual exposure of the current frame and the relationship between the exposure threshold for switching from day to night and the exposure threshold for switching from night to day. At the same time, before switching from night mode to day mode, the exposure threshold for switching from night to day is adaptively adjusted according to the mode relationship between the previous and next frames.

[0040] In this embodiment, the user setting module includes: The daytime switching night threshold setting unit is used to receive the user's preset camera daytime switching night exposure threshold and use it as the first exposure threshold Save in camera; The night-to-day switching threshold setting unit is used to receive the user's preset camera night-to-day exposure threshold and use it as the second exposure threshold Save in camera; The night-to-day adjustment threshold setting unit is used to receive the user's adaptive reduction value of the camera's night-to-day exposure threshold as the second exposure adjustment threshold , and pre-set the second exposure adjustment threshold Calculation method of Monitoring area division and regional exposure weight calculation unit, used for users to pre-set the exposure weight of the monitoring area; The data acquisition module includes: A monitoring scene statistical information acquisition unit is used to acquire the shutter time of the monitoring scene statistical information of the camera in real time , Gain And the aperture size F; The current frame exposure calculation unit is used to calculate the exposure of the current frame using the following formula: :

[0041] in, The exposure weight of each block in the monitoring area is predefined by the user, and q is the number of blocks in the monitoring area; The mode switching control module includes: A threshold value acquisition unit, used to acquire a pre-saved first exposure threshold value , the second exposure threshold And the calculated exposure of the current frame ; A mode determination unit, used to determine the current working mode; Day and night switching control unit, used to identify the current frame exposure in day mode Greater than the first exposure threshold When the control switches the day mode to the night mode, and turns on the fill light; Night-day switching control unit, used to check whether the previous frame of the current frame was in day mode in night mode, and the exposure of the current frame Less than the second exposure threshold , the second exposure threshold Reduce to the second exposure adjustment threshold , and the exposure value in the current frame Less than the second exposure adjustment threshold , control the switching of night mode to day mode, and when the N frames before the current frame are continuously in night mode, adjust the second exposure value threshold Increase to the second exposure threshold .

[0042] Although the present invention has been described in detail with reference to the accompanying drawings and in combination with the preferred embodiments, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, a person of ordinary skill in the art may make various equivalent modifications or substitutions to the embodiments of the present invention, and these modifications or substitutions shall be within the scope of the present invention. Any person of ordinary skill in the art may easily think of changes or substitutions within the technical scope disclosed by the present invention, and these shall be within the scope of protection of the present invention.

Claims

1. A camera day and night switching method based on regional adaptive threshold, characterized in that: The steps include: S1. The camera receives the user's pre-set daytime switching night exposure threshold, night switching daytime exposure threshold and exposure weight of the monitoring area; S2. Obtain the monitoring scene statistical information of the camera in real time, and calculate the actual exposure of the current frame based on the monitoring scene statistical information; S3. Control the camera to switch modes according to the current mode of the camera, the actual exposure of the current frame, and the relationship between the exposure threshold for switching from day to night and the exposure threshold for switching from night to day. At the same time, before switching from night mode to day mode, adaptively adjust the exposure threshold for switching from night to day according to the mode relationship between the previous and next frames.

2. The camera day and night switching method based on regional adaptive threshold according to claim 1, characterized in that: The specific steps of step S1 are as follows: S11. The user pre-sets the exposure threshold for the camera to switch from day to night, and uses it as the first exposure threshold Save in camera; S12. The user pre-sets the exposure threshold for the camera to switch from night to day, and uses it as the second exposure threshold Save in camera; S13. The user uses the adaptive reduction value of the exposure threshold of the camera switching from night to day as the second exposure adjustment threshold , and pre-set the second exposure adjustment threshold Calculation method of S14. The user pre-sets the exposure weight of the monitoring area.

3. The camera day and night switching method based on regional adaptive threshold as claimed in claim 2, characterized in that: The specific steps of step S14 are as follows: S141. Pre-dividing the monitoring area evenly into rectangular blocks arranged in rows and columns; S142. The rectangular block combination in the monitoring area that is "convex" from bottom to top is set as the center combination, and the edge combination is set outward along the center combination; S143. Set the number of "convex" fonts in the center combination to M, M "convex" fonts convex from bottom to top; S144. Set the weight of the center combination to be the highest, and the weights of the edge combinations to decrease outward from the center combination; S145. Sum the weights of each block as the exposure weight of the monitoring area.

4. The camera day and night switching method based on regional adaptive threshold as claimed in claim 3, characterized in that: The specific steps of step S2 are as follows: S21. Real-time acquisition of shutter time as monitoring scene statistics of the camera , Gain And the aperture size F; S22. Calculate the exposure of the current frame using the following formula: : in, is the exposure weight of each block in the monitoring area predefined by the user, and q is the number of blocks in the monitoring area.

5. The camera day and night switching method based on regional adaptive threshold according to claim 4, characterized in that: The specific steps of step S13 are as follows: S131. Obtain the gain in the monitoring scene statistics of the camera ; S132. Gain The auxiliary gain is calculated by the following formula : in, To take the decimal part of the parameter, is the floor rounding function; S133. Use the following formula and auxiliary gain Calculate the second exposure adjustment threshold : Where k is a user-defined adjustment coefficient.

6. The method for switching cameras day and night based on regional adaptive threshold according to claim 1, characterized in that: The specific steps of step S3 are as follows: S31. The camera obtains a pre-saved first exposure threshold , the second exposure threshold And the calculated exposure of the current frame ; S32. The camera determines the current working mode; When it is night mode, go to step S34; When it is day mode, go to step S33; S33. The camera recognizes the current frame exposure Greater than the first exposure threshold When , the control switches the day mode to the night mode, turns on the fill light, and returns to step S21; S34. Whether the camera is in day mode in the previous frame of the current frame, and the exposure of the current frame Less than the second exposure threshold , the second exposure threshold Reduce to the second exposure adjustment threshold , and the exposure value in the current frame Less than the second exposure adjustment threshold , control the switching of night mode to day mode, and when the N frames before the current frame are continuously in night mode, adjust the second exposure value threshold Increase to the second exposure threshold .

7. The method for switching cameras day and night based on regional adaptive threshold according to claim 6, characterized in that: The specific steps of step S33 are as follows: S331. The camera determines whether the previous frame of the current frame is in day mode; If yes, go to step S332; If not, proceed to step S336; S332. The camera determines the exposure of the current frame Is it less than the second exposure threshold? ; If yes, go to step S333; If not, proceed to step S338; S333. The second exposure threshold Reduce to the second exposure adjustment threshold ; S334. Determine the exposure of the current frame Is it less than the second exposure adjustment threshold? ; If yes, go to step S335; If not, return to step S21; S335. The camera controls the night mode to the day mode, and returns to step S21; S336. The camera determines whether the N frames before the current frame are in night mode, where N>1 is a user-preset value; If yes, go to step S337; If not, proceed to step S338; S337. The camera adjusts the second exposure threshold Increase to the second exposure threshold , return to step S21; S338. Camera control maintains the second exposure threshold No change, return to step S21.

8. The method for switching cameras day and night based on regional adaptive threshold according to claim 7, characterized in that: In step S337, the second exposure adjustment threshold is set Increase to the second exposure threshold The process is controlled by the following formula: Where j is the user-defined adjustment speed coefficient.

9. A camera day and night switching system based on regional adaptive threshold, characterized in that: include: A user setting module is used to receive the exposure threshold for switching from day to night, the exposure threshold for switching from night to day, and the exposure weight of the monitoring area preset by the user; The data acquisition module is used to obtain the monitoring scene statistical information of the camera in real time and calculate the actual exposure of the current frame based on the monitoring scene statistical information; The mode switching control module is used to control the camera to switch modes according to the current mode, the actual exposure of the current frame and the relationship between the exposure threshold for switching from day to night and the exposure threshold for switching from night to day. At the same time, before switching from night mode to day mode, the exposure threshold for switching from night to day is adaptively adjusted according to the mode relationship between the previous and next frames.

10. The camera day and night switching system based on regional adaptive threshold according to claim 9, characterized in that: The user settings module includes: The daytime switching night threshold setting unit is used to receive the user's preset camera daytime switching night exposure threshold and use it as the first exposure threshold Save in camera; The night-to-day switching threshold setting unit is used to receive the user's preset camera night-to-day exposure threshold and use it as the second exposure threshold Save in camera; The night-to-day adjustment threshold setting unit is used to receive the user's adaptive reduction value of the camera's night-to-day exposure threshold as the second exposure adjustment threshold , and pre-set the second exposure adjustment threshold Calculation method of Monitoring area division and regional exposure weight calculation unit, used for users to pre-set the exposure weight of the monitoring area; The data acquisition module includes: A monitoring scene statistical information acquisition unit is used to acquire the shutter time of the monitoring scene statistical information of the camera in real time , Gain And the aperture size F; The current frame exposure calculation unit is used to calculate the exposure of the current frame using the following formula: : in, The exposure weight of each block in the monitoring area is predefined by the user, and q is the number of blocks in the monitoring area; The mode switching control module includes: A threshold value acquisition unit, used to acquire a pre-saved first exposure threshold value , the second exposure threshold And the calculated exposure of the current frame ; A mode determination unit, used to determine the current working mode; Day and night switching control unit, used to identify the current frame exposure in day mode Greater than the first exposure threshold When the control switches the day mode to the night mode, and turns on the fill light; Night-day switching control unit, used to check whether the previous frame of the current frame was in day mode in night mode, and the exposure of the current frame Less than the second exposure threshold , the second exposure threshold Reduce to the second exposure adjustment threshold , and the exposure value in the current frame Less than the second exposure adjustment threshold , control the switching of night mode to day mode, and when the N frames before the current frame are continuously in night mode, adjust the second exposure value threshold Increase to the second exposure threshold .

Citation Information

Patent Citations

  • Method for controlling automatic exposure, image processor and optical imaging device

    CN101534453A

  • Dynamic threshold value-based method and device for performing automatic day and night switching

    CN103702038A

  • Image automatic exposure method, device, equipment and medium

    CN113286094A

  • Image brightness adjustment method and device, terminal and storage medium

    CN115942122A

  • Exposure adjustment method and device, electronic equipment and readable storage medium

    CN116320769A

Cited By

  • Camera exposure convergence method, camera and storage medium

    CN121603793A