Camera lighting switching method and camera

By keeping the exposure parameters constant in the camera and adjusting the white light drive circuit parameters, combined with the light source switching strategy and energy recovery, the problem of unstable image during camera mode switching was solved, achieving a clear and stable monitoring effect.

CN122138056APending Publication Date: 2026-06-02HANGZHOU SUPERACME MICROELECTRONICS TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HANGZHOU SUPERACME MICROELECTRONICS TECH CO LTD
Filing Date
2026-03-06
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

When the camera switches from infrared illumination mode to white light illumination mode, the video image may exhibit brightness flickering and color distortion, resulting in unclear monitoring images and affecting the practical value of intelligent security and monitoring functions as well as the user experience.

Method used

During the switching process, the exposure parameters of the image sensor remain unchanged. By determining the driving parameters of the white light driving circuit, the brightness of the image is the same in both infrared illumination mode and white light illumination mode. The light source is switched during the vertical blanking period, and energy is recovered by the capacitor to reduce energy consumption.

Benefits of technology

To ensure the image remains stable when the light source changes, avoid sudden changes in brightness and color distortion, improve image quality and user experience, and enhance the security and monitoring functions of the camera.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122138056A_ABST
    Figure CN122138056A_ABST
Patent Text Reader

Abstract

This disclosure relates to a camera illumination switching method and a camera. A camera illumination switching method is disclosed, the method comprising: illuminating the camera's image sensor with an infrared light source in the camera's infrared illumination mode; determining that the camera's illumination mode needs to be switched from infrared illumination mode to white light illumination mode; setting the exposure parameters of the image sensor to remain unchanged; determining the driving parameters of a white light driving circuit for driving the white light source so that the brightness of the image obtained by the image sensor in both infrared illumination mode and white light illumination mode is the same; turning off the infrared light source; and turning on the white light source for illuminating the image sensor in white light illumination mode.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to a camera. Specifically, this disclosure provides a camera illumination switching method, and a camera capable of implementing the method. Background Technology

[0002] Cameras are frequently used in various applications to implement intelligent security, surveillance, and monitoring functions. In low-light conditions (such as at night), cameras typically use infrared illumination, relying on infrared light sources to illuminate the image sensor. In some cases, it's necessary to switch the camera's illumination mode from infrared to white light, requiring the white light source to be turned on. However, when the infrared light source is turned off and the white light source is turned on, the video image captured by the camera may exhibit severe brightness flickering and color distortion. This significantly impacts image quality, preventing users from obtaining clear and stable monitoring images during illumination mode switching, severely affecting the practical value and user experience of the camera's intelligent security, surveillance, and monitoring functions.

[0003] Therefore, there is an urgent need for an improved method for switching camera lighting to obtain clear and stable monitoring images when the camera's lighting mode is switched. Summary of the Invention

[0004] One object of this disclosure is to provide a method for switching camera lighting.

[0005] Some embodiments of this disclosure provide a camera illumination switching method, the method comprising: illuminating the camera's image sensor with an infrared light source in the camera's infrared illumination mode; determining that the camera's illumination mode needs to be switched from infrared illumination mode to white light illumination mode; setting the exposure parameters of the image sensor to remain unchanged; determining the driving parameters of a white light driving circuit for driving the white light source so that the brightness of the image obtained by the image sensor in both infrared illumination mode and white light illumination mode is the same; turning off the infrared light source; and turning on the white light source for illuminating the image sensor in white light illumination mode.

[0006] Some embodiments of this disclosure provide a camera, the camera including: an image sensor; an infrared light source for illuminating the image sensor in the camera's infrared illumination mode; a white light source for illuminating the image sensor in the camera's white light illumination mode; an infrared driving circuit for driving the infrared light source; a white light driving circuit for driving the white light source; and an illumination control device configured to: control the infrared light source to illuminate in the infrared illumination mode; determine that the camera's illumination mode needs to be switched from the infrared illumination mode to the white light illumination mode; set the exposure parameters of the image sensor to remain unchanged; determine the driving parameters of the white light driving circuit so that the brightness of the image obtained by the image sensor in the infrared illumination mode and the white light illumination mode is the same; turn off the infrared light source; and turn on the white light source.

[0007] Some embodiments of this disclosure provide a non-transitory computer storage medium, wherein the non-transitory computer storage medium stores program code, which, when executed by a computer device, causes the computer device to perform the method described above.

[0008] Some embodiments of this disclosure provide a computer program product, wherein the computer program product includes a computer program that, when executed by a computer device, causes the computer device to perform the method described above.

[0009] Other features and advantages of this disclosure will become clear from the following description with reference to the accompanying drawings. Attached Figure Description

[0010] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the present disclosure and, together with the specification, serve to explain the principles of the disclosure without limitation. In the figures, similar reference numerals are used to denote similar items.

[0011] Figure 1 A flowchart of a camera lighting switching method according to at least one embodiment of the present disclosure is shown.

[0012] Figure 2 A block diagram of a camera according to at least one embodiment of the present disclosure is shown. Detailed Implementation

[0013] In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the exemplary embodiments described. However, it will be apparent to those skilled in the art that the described embodiments can be practiced without some or all of these specific details. In the exemplary embodiments described, well-known structures or processing steps are not described in detail to avoid unnecessarily obscuring the concepts of this disclosure.

[0014] The blocks within each of the block diagrams shown below can be implemented using hardware, software, firmware, or any combination thereof to achieve the principles of this disclosure. Those skilled in the art will understand that the blocks described in each block diagram can be combined or divided into sub-blocks to achieve the principles of this disclosure.

[0015] The steps of the method presented in this disclosure are intended to be illustrative. In some embodiments, the method may be performed with one or more additional steps not described and / or without the one or more steps discussed. Furthermore, the order in which the steps of the method are illustrated and described is not intended to be limiting.

[0016] Figure 1 A flowchart of a camera illumination switching method 1000 according to at least one embodiment of the present disclosure is shown. Method 1000 can be used to switch the camera's illumination mode to a white light illumination mode as needed when the camera is in infrared illumination mode, while ensuring that the monitoring image remains clear and stable during this process.

[0017] At step 100, method 1000 begins.

[0018] In step 110, in the camera's infrared illumination mode, the camera's image sensor is illuminated by an infrared light source. For example, the camera can use infrared illumination mode in low-light scenes (e.g., at night).

[0019] In step 120, it is determined that the camera's illumination mode needs to be switched from infrared illumination mode to white light illumination mode. That is, the infrared light source needs to be turned off and the white light source needs to be turned on.

[0020] In a preferred embodiment, the need to switch the illumination mode from infrared illumination to white light illumination can be determined in response to the detection of a warning event. A warning event is a predetermined event that may affect the security of the current application scenario, such as the approach, presence, or intrusion of a person or / or object, and / or the presence of a specific person or / or object, etc. Warning events can be detected by the camera or by a remote security system communication-coupled to the camera. When a warning event occurs, switching the camera's illumination mode to white light illumination provides on-site deterrence and facilitates color video recording and / or facial recognition, thereby better realizing the camera's intelligent security and warning functions.

[0021] In other embodiments, the camera's illumination mode can also be switched from infrared illumination mode to white light illumination mode at a predetermined time or in response to an instruction from a user or a higher-level control system (such as a remote security system).

[0022] However, when the infrared light source is turned off and the white light source is turned on, the camera may capture images with severe brightness flickering and distortion. This is mainly because when the white light source is suddenly turned on, the ambient light changes abruptly, and the camera's exposure control module may not be able to adjust exposure parameters (such as shutter speed and gain) in time. This results in brightness fluctuations in the video image, and even serious problems such as blurring and overexposure, severely degrading image quality. Especially during alarm events, users cannot obtain clear and stable monitoring images from the camera, which seriously affects the practical value and user experience of the camera's intelligent security, alarm, and monitoring functions.

[0023] To address the aforementioned problems, this disclosure provides an improved camera lighting switching method 1000, which specifically includes the following steps 130-150.

[0024] While the infrared light source is still on, in step 130, the exposure parameters of the image sensor are set to remain unchanged. That is, during the illumination mode switching process, i.e., when the infrared light source is off and the white light source is on, the exposure parameters of the image sensor always remain unchanged.

[0025] In a preferred embodiment, the camera's exposure control mode can be set to manual mode. In manual mode, exposure parameters (such as gain, shutter speed, etc.) can only be adjusted manually and cannot be automatically adjusted by the exposure control module. This ensures that the exposure parameters in the current infrared illumination mode remain unchanged during illumination mode switching.

[0026] In a preferred embodiment, after turning on the white light source, the camera's exposure control mode can be switched to automatic mode.

[0027] At step 140, the driving parameters of the white light driving circuit used to drive the white light source are determined so that the brightness of the image obtained by the image sensor in infrared illumination mode and white light illumination mode is the same.

[0028] Those skilled in the art should understand that, considering industrial practice and technical implementation, the term "identical" as used in this specification and the appended claims means "substantially identical," that is, substantially identical within a tolerance of 20% or less, or substantially identical within a tolerance of 10% or less, or substantially identical within a tolerance of 5% or less. Those skilled in the art should also understand that substantially identical within a certain tolerance includes cases of complete sameness.

[0029] In a preferred embodiment, the driving parameters of the white light driving circuit can be determined by the following steps: First, the driving parameters of the infrared driving circuit used to drive the infrared light source and the exposure parameters of the image sensor in the infrared illumination mode are obtained; then, based on the predetermined mapping relationship between the driving parameters of the infrared driving circuit and the exposure parameters of the image sensor in the infrared illumination mode and the driving parameters of the white light driving circuit, the driving parameters of the white light driving circuit are determined.

[0030] In a preferred embodiment, the mapping relationship described above can be predetermined by fitting a predetermined model based on multiple sets of pre-obtained fitting data. Each set of fitting data includes the driving parameters of the white light driving circuit, the driving parameters of the infrared driving circuit, the exposure parameters of the image sensor in both infrared and white light illumination modes, and the brightness of the image obtained by the image sensor in both modes. In each set of fitting data, the exposure parameters of the image sensor are the same in both infrared and white light illumination modes, and the brightness of the image obtained by the image sensor in both modes is the same.

[0031] As mentioned earlier, "same" in this article means "substantially the same," that is, substantially the same within appropriate tolerances. Specifically, the exposure parameters of the image sensor in infrared illumination mode and white light illumination mode are substantially the same within appropriate tolerances (e.g., 20%, 10%, or 5%), and the brightness of the images obtained by the image sensor in infrared illumination mode and white light illumination mode is substantially the same within appropriate tolerances (e.g., 20%, 10%, or 5%). These tolerances may vary for different scenes, devices, models, and data.

[0032] In each set of such fitted data, the driving parameters of the infrared driving circuit and the exposure parameters of the image sensor under infrared illumination mode correspond to the driving parameters of the corresponding white light driving circuit. Furthermore, based on these multiple sets of fitted data, a predetermined model is fitted to determine the mapping relationship between the driving parameters of the infrared driving circuit and the exposure parameters of the image sensor under infrared illumination mode and the driving parameters of the white light driving circuit.

[0033] In a preferred embodiment, the above-mentioned fitting data can be obtained through prior experiments for fitting a predetermined model. At least a portion of the above-mentioned fitting data can also be obtained through calculation, derivation, or other methods.

[0034] In a preferred embodiment, the predetermined model can be a linear fitting model or a quadratic polynomial fitting model. The advantages of linear and quadratic polynomial fitting models are their simplicity, low computational cost, and the small amount of fitting data required. In another preferred embodiment, the predetermined model can be a neural network model, such as a deep neural network model. The neural network model can be fitted based on an appropriate deep learning algorithm. The advantages of neural network models are high accuracy and good fitting effect.

[0035] The appropriate model can be selected for fitting based on the specific application scenario and requirements. For example, in scenarios where fewer pre-conducted experiments are desired and computational costs are low, a linear fitting model or a quadratic polynomial fitting model can be chosen. In scenarios where high requirements are placed on the continuity and stability of camera footage, a neural network model can be selected.

[0036] For example, when testing in the laboratory, keeping the exposure parameters of the image sensor constant in both infrared illumination mode and white light illumination mode, the following data can be obtained:

[0037] Scenario 1: The laboratory environment is bright. When the driving parameters of the infrared driving circuit are 10%, the image sensor obtains an image brightness of 50 in infrared illumination mode; when the driving parameters of the white light driving circuit are 8%, the image sensor obtains an image brightness of 50 in white light illumination mode.

[0038] Scenario 2: In a laboratory environment with moderate brightness, when the driving parameters of the infrared driving circuit are 20%, the image sensor obtains an image brightness of 50 in infrared illumination mode; when the driving parameters of the white light driving circuit are 14%, the image sensor obtains an image brightness of 50 in white light illumination mode.

[0039] Scenario 3: In a laboratory environment with low brightness, when the driving parameters of the infrared driving circuit are 40%, the image sensor obtains an image brightness of 50 in infrared illumination mode; when the driving parameters of the white light driving circuit are 23%, the image sensor obtains an image brightness of 50 in white light illumination mode.

[0040] In the three scenarios above, the exposure parameters of the image sensor remain unchanged in both infrared and white light illumination modes. The driving parameters of the three infrared driving circuits (10%, 20%, 40%) correspond to the driving parameters of the three corresponding white light driving circuits (8%, 14%, 23%). Based on these three sets of fitted data, a predetermined model (such as a quadratic polynomial fitting model) can be fitted to determine the mapping relationship between the driving parameters of the infrared driving circuit and the driving parameters of the white light driving circuit under these exposure parameters. For example, the following mapping relationship can be fitted: y = -0.5x 2+0.75x+0.01, where x represents the driving parameters of the infrared driving circuit and y represents the driving parameters of the white light driving circuit.

[0041] Note that the three sets of fitting data above are merely examples provided to facilitate understanding of the technical solution of this application. In actual implementations, more (e.g., hundreds or thousands) sets of fitting data can be obtained through various methods to achieve more accurate fitting results.

[0042] Subsequently, the exposure parameters of the image sensor in infrared illumination mode and white light illumination mode can be adjusted and kept constant again. This allows for adjusting the driving parameters of the infrared driving circuit and the white light driving circuit in different scenarios to ensure that the brightness of the images obtained by the image sensor in both infrared and white light illumination modes is the same, thereby obtaining more sets of fitting data. Based on these fitting data, a predetermined model can be fitted to determine the mapping relationship between the driving parameters of the infrared driving circuit and the driving parameters of the white light driving circuit under the adjusted exposure parameters.

[0043] Note that the methods described above for adjusting the exposure parameters of the image sensor in infrared illumination mode and white light illumination mode, as well as the driving parameters of the infrared driving circuit and the white light driving circuit, are merely illustrative. These parameters can also be adjusted in other appropriate ways to ensure that the brightness of the images obtained by the image sensor in infrared illumination mode and white light illumination mode is the same, thereby obtaining corresponding fitting data.

[0044] After fitting the selected model based on multiple sets of pre-obtained fitting data, the mapping relationship between the driving parameters of the infrared driving circuit and the exposure parameters of the image sensor in the infrared illumination mode and the driving parameters of the white light driving circuit can be obtained. Thus, the driving parameters of the white light driving circuit used to drive the white light source are determined at step 140 so that the brightness of the image obtained by the image sensor in the infrared illumination mode and the white light illumination mode is the same.

[0045] This avoids sudden changes in ambient brightness caused by light source switching, thus preventing problems such as blurry or distorted images that may occur when the light source suddenly changes, making the video image more stable and greatly improving image quality and user experience.

[0046] At step 150, the infrared light source is turned off. At step 160, the white light source is turned on, which is used to illuminate the image sensor in white light illumination mode.

[0047] In a preferred embodiment, the infrared light source can be turned off after the start of the vertical blanking period of a frame of the image sensor, and the white light source can be turned on before the end of the vertical blanking period of that frame.

[0048] Each frame readout cycle of an image sensor includes an effective exposure zone and a vertical blanking zone. During the effective exposure zone, the image sensor is in a light-sensing state. During the vertical blanking zone, the image sensor is not in a light-sensing state. If the infrared light source is turned off and the white light source is turned on during the image sensor's light-sensing process (i.e., the effective exposure zone), a single frame of the video image will be partially exposed to infrared light and partially to white light, resulting in contrasting light and dark areas and color distortion, thus producing a visually jarring and uncomfortable effect.

[0049] By turning off the infrared light source after the start of the vertical blanking period and turning on the white light source before the end of the vertical blanking period, it is possible to ensure that the light source is switched during the period when the image sensor is not sensitive to light. This ensures that each frame of the image is fully exposed under a single, stable light source. This makes each frame of the image uniform and stable, eliminating the tearing of light and shadow and color confusion that may be caused by the switching of light sources, and further improving the image quality of the camera.

[0050] In a preferred embodiment, the infrared driving circuit may include a capacitor, which can be used to recover energy from the infrared driving circuit when the infrared light source is turned off. Specifically, when the infrared light source is turned off, the drive current in the output inductor of the infrared driving circuit can charge the capacitor, thereby recovering energy from the output inductor. This reduces the overall energy consumption and temperature rise of the camera, thereby improving the camera's reliability.

[0051] In a preferred embodiment, the same driving circuit can be configured as both a white light driving circuit for driving a white light source and an infrared driving circuit for driving an infrared light source. That is, the same driving circuit can be configured to drive a white light source in white light illumination mode and an infrared light source in infrared illumination mode. Those skilled in the art will understand that in such an embodiment, the driving parameters of the infrared driving circuit and the driving parameters of the white light driving circuit refer to the driving parameters of the driving circuit used to drive the infrared light source in infrared illumination mode and the driving parameters of the driving circuit used to drive the white light source in white light illumination mode, respectively. These two parameters can be the same or different.

[0052] Furthermore, in such an embodiment, when the infrared light source is turned off, the energy in the drive circuit can be recovered using a capacitor, and when the white light source is turned on, the recovered energy can be used to drive the white light source. Specifically, when the infrared light source is turned off, the drive current in the output inductor of the drive circuit can charge the capacitor. Then, when the white light source is turned on, the capacitor can discharge to the output inductor. In this way, the instantaneous current and power demand of the drive circuit when the white light source is turned on can be significantly reduced, thereby improving the camera's compatibility in environments with limited power supply.

[0053] In a preferred embodiment, after the white light source is turned on, the white light source is made to flash. For example, in the event of a warning or dangerous event (such as intrusion), the white light source can be made to flash periodically to achieve a deterrent and driving-away purpose.

[0054] At step 170, method 1000 ends.

[0055] Figure 2 A block diagram of a camera 2000 according to at least one embodiment of the present disclosure is shown.

[0056] The camera 2000 may include an image sensor 210, an infrared light source 220, a white light source 230, an infrared driving circuit 221, a white light driving circuit 231, and an illumination control device 240. It should be noted that this is for ease of description only. Figure 2 The above-described devices are illustrated as separate modules. Those skilled in the art will understand that at least a portion of the above-described devices may be combined together (e.g., the lighting control device 240 may be combined within the image sensor 210), or may be implemented by the same component (e.g., the infrared driving circuit 221 and the white light driving circuit 231 may be implemented by the same driving circuit), or one of the devices may be implemented by two or more separate components (e.g., the lighting control device 240 may be implemented by multiple components that are communicatively coupled to each other).

[0057] Image sensor 210 is used to image and output images (such as video images), infrared light source 220 is used to illuminate image sensor 210 in infrared illumination mode, and white light source 230 is used to illuminate image sensor 210 in white light illumination mode. The illumination mode of camera 2000 can switch between infrared illumination mode and white light illumination mode. For example, in low-light scenes (such as at night), camera 2000 can use infrared illumination mode. In some cases, camera 2000 can switch from infrared illumination mode to white light illumination mode.

[0058] Infrared driving circuit 221 is used to drive infrared light source 220, while white light driving circuit 231 is used to drive white light source 230. In a preferred embodiment, the same driving circuit can be configured to serve as both white light driving circuit 231 and infrared driving circuit 221. That is, the same driving circuit can be configured to drive white light source 230 in white light illumination mode and infrared light source 220 in infrared illumination mode.

[0059] The lighting control device 240 can be communicatively coupled to the image sensor 210, the infrared driving circuit 221, and the white light driving circuit 231. The lighting control device 240 can be configured to: control the infrared light source 220 to provide illumination in infrared illumination mode; determine that the illumination mode needs to be switched from infrared illumination mode to white light illumination mode; set the exposure parameters of the image sensor 210 to remain unchanged; determine the driving parameters of the white light driving circuit 231 so that the brightness of the image obtained by the image sensor 210 in both infrared and white light illumination modes is the same; turn off the infrared light source 220; and turn on the white light source 230.

[0060] In this way, the camera's image can remain clear and continuous when the light source changes, avoiding problems such as blurry images and sudden brightness changes in existing technologies. This improves the image quality, enhances the user's viewing experience, and thus better realizes the camera's security, alarm, and monitoring functions.

[0061] In a preferred embodiment, the infrared driving circuit 221 may include a capacitor 222 for recovering energy from the infrared driving circuit 221 when the infrared light source 220 is turned off.

[0062] In a preferred embodiment, the lighting control device 240 may be further configured to determine, in response to the detection of a warning event, that the lighting mode of the camera 2000 needs to be switched from infrared lighting mode to white light lighting mode. The warning event may be detected by the camera 2000 or by a remote security system (not shown) communicatively coupled to the camera 2000.

[0063] In a preferred embodiment, the lighting control device 240 may be further configured to set the exposure parameters of the image sensor 210 to remain unchanged by setting the exposure control mode of the camera 2000 to manual mode. The lighting control device 240 may also be configured to switch the exposure control mode of the camera 210 to automatic mode after the white light source 230 is turned on.

[0064] In a preferred embodiment, the lighting control device 240 may be further configured to: obtain the driving parameters of the infrared driving circuit 221 and the exposure parameters of the image sensor 210 in the infrared illumination mode; and determine the driving parameters of the white light driving circuit 231 based on the predetermined mapping relationship between the driving parameters of the infrared driving circuit 221 and the exposure parameters of the image sensor 210 in the infrared illumination mode and the driving parameters of the white light driving circuit 231.

[0065] In a further preferred embodiment, the above mapping relationship is predetermined by fitting a predetermined model based on multiple sets of pre-obtained fitting data. Each set of fitting data includes the driving parameters of the white light driving circuit 231, the driving parameters of the infrared driving circuit 221, the exposure parameters of the image sensor 210 in infrared illumination mode and white light illumination mode, and the brightness of the image obtained by the image sensor 210 in infrared illumination mode and white light illumination mode. In each set of fitting data, the exposure parameters of the image sensor 210 are the same in infrared illumination mode and white light illumination mode, and the brightness of the image obtained by the image sensor 210 in infrared illumination mode and white light illumination mode is the same. As mentioned above, "same" as used herein means "substantially the same," that is, substantially the same within an appropriate tolerance.

[0066] In a preferred embodiment, the illumination control device 240 may be further configured to turn off the infrared light source 220 after the start of the vertical blanking period of a frame of the image sensor 210, and turn on the white light source 230 before the end of the vertical blanking period of that frame. This ensures that each frame of the image is uniform and clear, eliminates the tearing of light and shadow and color confusion that may be caused by the switching of light sources, and further improves the image quality of the camera.

[0067] In a preferred embodiment, the lighting control device 240 may be further configured to cause the white light source to flash after it is turned on.

[0068] Alternatively, a non-transitory computer storage medium may be provided, in which program code may be stored, which, when executed by a computer device, causes the computer device to perform the method described above.

[0069] A computer program product may also be provided, including a computer program that, when executed by a computer device, causes the computer device to perform the method described above.

[0070] The computer-readable storage medium described herein can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0071] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including but not limited to object-oriented programming languages ​​(such as Java, Smalltalk, C++), as well as conventional procedural programming languages ​​(such as the "C" language or similar programming languages). The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network (including a local area network (LAN) or a wide area network (WAN)), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0072] From the above embodiments, those skilled in the art will clearly understand that this disclosure can be implemented by software and necessary hardware, or by hardware, firmware, etc. Based on this understanding, embodiments of this disclosure can be implemented partly in software and partly in hardware. Embodiments implementing this disclosure in hardware may include one or more hardware logic components performing at least a portion of the functions described above herein. For example, without limitation, exemplary types of hardware logic components that can be used include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SOCs), Complex Programmable Logic Devices (CPLDs), etc.

[0073] This disclosure has been described in this way; it is clear that this disclosure can be varied in many ways. These variations are not considered to depart from the spirit and scope of this disclosure, but rather all such modifications that would be obvious to those skilled in the art are included within the scope of the following claims.

Claims

1. A method for switching camera lighting, the method comprising: In the camera's infrared illumination mode, the camera's image sensor is illuminated by an infrared light source; It was determined that the camera's illumination mode needed to be switched from infrared illumination mode to white light illumination mode; Set the image sensor's exposure parameters to remain unchanged from their current values; Determine the driving parameters of the white light driving circuit used to drive the white light source so that the brightness of the image obtained by the image sensor is the same in infrared illumination mode and white light illumination mode. Turn off the infrared light source; as well as Turn on the white light source used to illuminate the image sensor in white light illumination mode.

2. The method according to claim 1, wherein, The infrared light source is turned off after the start of the vertical blanking period of a frame of the image sensor, and the white light source is turned on before the end of the vertical blanking period of the frame.

3. The method according to claim 1, further comprising: When the infrared light source is turned off, the energy in the infrared drive circuit is recovered using the capacitor in the infrared drive circuit that drives the infrared light source.

4. The method according to any one of claims 1-3, wherein, In response to the detection of an alert event, it is determined that the camera's illumination mode needs to be switched from infrared illumination mode to white light illumination mode.

5. The method according to any one of claims 1-3, wherein, Setting the image sensor's exposure parameters to remain unchanged includes setting the camera's exposure control mode to manual mode, and After turning on the white light source, switch the camera's exposure control mode to automatic mode.

6. The method according to any one of claims 1-3, wherein, The same driving circuit is configured to serve as both a white light driving circuit for driving a white light source and an infrared driving circuit for driving an infrared light source.

7. The method according to any one of claims 1-3, wherein, The driving parameters for the white light driving circuit used to drive the white light source include: Obtain the driving parameters of the infrared driving circuit used to drive the infrared light source and the exposure parameters of the image sensor in the infrared illumination mode; and Based on the predetermined driving parameters of the infrared driving circuit and the mapping relationship between the exposure parameters of the image sensor in infrared illumination mode and the driving parameters of the white light driving circuit, the driving parameters of the white light driving circuit are determined.

8. The method according to claim 7, wherein, The mapping relationship between the driving parameters of the infrared driving circuit and the exposure parameters of the image sensor in infrared illumination mode and the driving parameters of the white light driving circuit is predetermined by fitting a predetermined model based on multiple sets of pre-obtained fitting data. Each set of fitted data includes the driving parameters of the white light driving circuit, the driving parameters of the infrared driving circuit, the exposure parameters of the image sensor in infrared illumination mode and white light illumination mode, and the brightness of the image obtained by the image sensor in infrared illumination mode and white light illumination mode. In each set of fitted data, the image sensor has the same exposure parameters in both infrared and white light illumination modes, and the image brightness obtained by the image sensor in both infrared and white light illumination modes is the same.

9. The method according to any one of claims 1-3, further comprising: After turning on the white light source, make the white light source blink.

10. A camera, the camera comprising: Image sensor; An infrared light source is used to illuminate the image sensor in the camera's infrared illumination mode; A white light source is used to illuminate the image sensor in the camera's white light illumination mode; Infrared driving circuit, used to drive infrared light source; White light driving circuit, used to drive white light source; as well as Lighting control device, the lighting control device being configured to: In infrared illumination mode, the infrared light source is controlled to provide illumination; It was determined that the camera's illumination mode needed to be switched from infrared illumination mode to white light illumination mode; Set the image sensor's exposure parameters to remain unchanged from their current values; Determine the driving parameters of the white light driving circuit so that the brightness of the image obtained by the image sensor in infrared illumination mode and white light illumination mode is the same; Turn off the infrared light source; as well as Turn on the white light source.

11. The camera according to claim 10, wherein, The lighting control device is further configured as follows: The infrared light source is turned off after the start of the vertical blanking period of a frame of the image sensor, and the white light source is turned on before the end of the vertical blanking period of the frame.

12. The camera according to claim 10, wherein, The infrared driving circuit includes a capacitor for recovering energy from the infrared driving circuit when the infrared light source is turned off.

13. The camera according to any one of claims 10-12, wherein, The lighting control device is further configured as follows: In response to the detection of an alert event, it is determined that the camera's illumination mode needs to be switched from infrared illumination mode to white light illumination mode.

14. The camera according to any one of claims 10-12, wherein, The lighting control device is further configured as follows: By setting the camera's exposure control mode to manual mode, the image sensor's exposure parameters are set to remain unchanged at their current values, and After turning on the white light source, switch the camera's exposure control mode to automatic mode.

15. The camera according to any one of claims 10-12, wherein, The same driving circuit is configured to function as both a white light driving circuit and an infrared driving circuit.

16. The camera according to any one of claims 10-12, wherein, The lighting control device is further configured as follows: Obtain the driving parameters of the infrared driving circuit and the exposure parameters of the image sensor in the infrared illumination mode; and Based on the predetermined driving parameters of the infrared driving circuit and the mapping relationship between the exposure parameters of the image sensor in infrared illumination mode and the driving parameters of the white light driving circuit, the driving parameters of the white light driving circuit are determined.

17. The camera according to claim 16, wherein, The mapping relationship between the driving parameters of the infrared driving circuit and the exposure parameters of the image sensor in infrared illumination mode and the driving parameters of the white light driving circuit is predetermined by fitting a predetermined model based on multiple sets of pre-obtained fitting data. Each set of fitted data includes the driving parameters of the white light driving circuit, the driving parameters of the infrared driving circuit, the exposure parameters of the image sensor in infrared illumination mode and white light illumination mode, and the brightness of the image obtained by the image sensor in infrared illumination mode and white light illumination mode. In each set of fitted data, the image sensor has the same exposure parameters in both infrared and white light illumination modes, and the image brightness obtained by the image sensor in both infrared and white light illumination modes is the same.

18. The camera according to any one of claims 10-12, wherein, The lighting control device is further configured as follows: After turning on the white light source, make the white light source blink.

19. A non-transitory computer storage medium, wherein, The non-transitory computer storage medium stores program code, which, when executed by a computer device, causes the computer device to perform the method according to any one of claims 1-9.

20. A computer program product, wherein, The computer program product includes a computer program that, when executed by a computer device, causes the computer device to perform the method according to any one of claims 1-9.