Image light supplement control method, device, equipment and storage medium
Patent Information
- Application Number
- CN202311750649.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-18
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2043-12-18
AI Technical Summary
[0004]本发明的主要目的在于提供一种图像补光控制方法、装置、设备及存储介质,旨在解决如何在不增加硬件成本前提下,准确识别环境光从而保证图像亮度的技术问题
[0015]本发明通过基于图像传感器获取的原始图像数据确定当前采集周期的图像亮度信息,所述原始图像数据是基于所述图像传感器的预设中心区生成的;根据所述当前采集周期的图像亮度信息进行亮度计算,确定当前环境光照度;根据所述当前环境光照度确定红外补光光源的目标工作模式;根据所述红外补光光源的目标工作模式进行图像补光控制。通过上述方式,根据预设中心区域产生的原始图像数据确定当前采集周期的图像亮度信息,基于图像亮度信息进一步进行亮度计算,确定当前环境光照度,利用当前环境光照度确定红外补光光源的目标工作模式,从而进行图像补光控制,实现了在不增加光敏或者环境光检测传感器等硬件成本前提下,对环境光的准确检测,降低了整体功耗的同时,保证了采集图像的亮度,提升了用户使用体验的感受。
Smart Images

Figure CN117857905B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to an image supplementary lighting control method, apparatus, device, and storage medium. Background Technology
[0002] Currently, IP cameras (network cameras) require infrared illumination at night to ensure clear images. Most IP cameras on the market have infrared lights that turn on at night and off during the day. However, to distinguish between day and night, most IP cameras add photosensitive or ambient light sensors to detect ambient light levels and adjust the infrared lights accordingly, increasing hardware costs. Furthermore, many infrared cameras use batteries for easy installation. Photosensitive or ambient light sensors and infrared lights are power-consuming components, especially infrared lights, which consume a lot of power. Rapid battery drain reduces battery life, requiring frequent battery replacements and resulting in a poor user experience.
[0003] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention
[0004] The main objective of this invention is to provide an image supplementary lighting control method, apparatus, device, and storage medium, aiming to solve the technical problem of how to accurately identify ambient light and thus ensure image brightness without increasing hardware costs.
[0005] To achieve the above objectives, the present invention provides an image fill light control method, the method comprising the following steps: The image brightness information for the current acquisition cycle is determined based on the raw image data acquired by the image sensor, wherein the raw image data is generated based on the preset center area of the image sensor; The current ambient illuminance is determined by calculating the brightness based on the image brightness information of the current acquisition period. Determine the target operating mode of the infrared supplementary light source based on the current ambient light level; Image illumination control is performed based on the target operating mode of the infrared fill light source.
[0006] Optionally, the step of calculating the brightness based on the image brightness information of the current acquisition period to determine the current ambient illuminance includes: Multiple image brightness values are determined based on the image brightness information of the current acquisition period; The average brightness value of the image in the current acquisition period is determined by calculating the average brightness value of multiple image brightness values. The ambient light level is determined by calculating the brightness based on the preset exposure time, preset gain, and the average brightness of the image.
[0007] Optionally, determining the target operating mode of the infrared supplementary light source based on the current ambient light intensity includes: Detection is performed based on the current ambient light intensity and the preset light intensity threshold; When the current ambient light intensity is greater than the preset light intensity threshold, determine whether the current acquisition cycle is the preset initial acquisition cycle; When the current acquisition period is not the preset initial acquisition period, historical ambient illuminance is acquired; The target operating mode of the infrared supplementary light source is determined based on the historical ambient illuminance and the current ambient illuminance.
[0008] Optionally, determining the target operating mode of the infrared supplementary light source based on the historical ambient illuminance and the current ambient illuminance includes: The difference in ambient illuminance is determined by calculating the difference between the historical ambient illuminance and the current ambient illuminance. The illuminance range is determined based on the difference in ambient illuminance. The target operating status and target working parameters of the infrared supplementary light source are determined based on the mapping relationship between the illuminance range and the supplementary lighting strategy. The target operating mode of the infrared supplementary light source is determined based on the target operating status and the target operating parameters.
[0009] Optionally, after determining whether the current sampling period is a preset initial sampling period when the current ambient illuminance is greater than the preset illuminance threshold, the method further includes: When the current acquisition cycle is the preset initial acquisition cycle, the target operating state of the infrared supplementary light source is determined to be the light source off state; The target operating mode of the infrared supplementary light source is determined based on the light source's off state.
[0010] Optionally, the step of controlling image illumination based on the target operating mode of the infrared illumination source includes: When the target operating mode of the infrared supplementary light source is the light source off state, the filter operating mode of the infrared filter is determined to be the filter on state; The infrared filter is activated according to the filter's on state, and the infrared supplementary light source is turned off according to the light source's off state.
[0011] Optionally, determining the image brightness information for the current acquisition period based on the raw image data acquired by the image sensor includes: Based on the raw image data acquired by the image sensor, multiple image data to be processed in the current acquisition cycle are determined; Based on the spatial transformation matrix, image transformation is performed on each image data to be processed to determine multiple initial brightness values for the current acquisition cycle; Calculate the difference between multiple initial brightness values; When the difference between each initial brightness value is less than a preset difference threshold, the image brightness information of the current acquisition period is determined based on multiple initial brightness values.
[0012] Furthermore, to achieve the above objectives, the present invention also proposes an image fill light control device, the image fill light control device comprising: The processing module is used to determine the image brightness information of the current acquisition cycle based on the raw image data acquired by the image sensor, wherein the raw image data is generated based on the preset center area of the image sensor; The calculation module is used to calculate the brightness based on the image brightness information of the current acquisition period and determine the current ambient illuminance. The processing module is used to determine the target working mode of the infrared supplementary light source based on the current ambient light intensity. The control module is used to control image illumination according to the target working mode of the infrared fill light source.
[0013] Furthermore, to achieve the above objectives, the present invention also proposes an image illumination control device, which includes: a memory, a processor, and an image illumination control program stored in the memory and executable on the processor, wherein the image illumination control program is configured to implement the steps of the image illumination control method described above.
[0014] In addition, to achieve the above objectives, the present invention also proposes a storage medium storing an image illumination control program, wherein the image illumination control program, when executed by a processor, implements the steps of the image illumination control method described above.
[0015] This invention determines image brightness information for the current acquisition cycle based on raw image data acquired by an image sensor, where the raw image data is generated based on a preset center area of the image sensor. Brightness calculations are performed based on the image brightness information for the current acquisition cycle to determine the current ambient light level. The target operating mode of the infrared supplementary light source is then determined based on the current ambient light level. Image supplementary lighting control is then performed based on the target operating mode of the infrared supplementary light source. Through this method, image brightness information for the current acquisition cycle is determined based on raw image data generated from a preset center area. Further brightness calculations are performed based on this image brightness information to determine the current ambient light level. The target operating mode of the infrared supplementary light source is then determined using the current ambient light level, thereby enabling image supplementary lighting control. This achieves accurate detection of ambient light without increasing the hardware cost of photosensors or ambient light detection sensors, reducing overall power consumption while ensuring the brightness of the acquired image and improving the user experience. Attached Figure Description
[0016] Figure 1 This is a schematic diagram of the structure of the image supplementary lighting control device in the hardware operating environment involved in the embodiments of the present invention; Figure 2 This is a flowchart illustrating the first embodiment of the image supplementary lighting control method of the present invention; Figure 3 This is a schematic diagram of the existing architecture of an embodiment of the image supplementary lighting control method of the present invention; Figure 4 This is a schematic diagram of an improved architecture of an embodiment of the image supplementary lighting control method of the present invention; Figure 5 This is a schematic diagram of a photosensitive array according to an embodiment of the image supplementary lighting control method of the present invention; Figure 6 This is a schematic diagram of the central region of an embodiment of the image supplementary lighting control method of the present invention; Figure 7 This is a flowchart illustrating the second embodiment of the image supplementary lighting control method of the present invention; Figure 8 This is a flowchart illustrating the third embodiment of the image supplementary lighting control method of the present invention; Figure 9 This is a schematic flowchart of an embodiment of the image supplementary lighting control method of the present invention; Figure 10 This is a structural block diagram of the first embodiment of the image supplementary lighting control device of the present invention.
[0017] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0018] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.
[0019] Reference Figure 1 , Figure 1 This is a schematic diagram of the image illumination control device structure in the hardware operating environment involved in the embodiments of the present invention.
[0020] like Figure 1 As shown, the image illumination control device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen or an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wireless-Fidelity (Wi-Fi) interface). The memory 1005 may be a high-speed random access memory (RAM) or a stable non-volatile memory (NVM), such as a disk drive. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0021] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on the image illumination control device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0022] like Figure 1 As shown, the memory 1005, which serves as a storage medium, may include an operating system, a network communication module, a user interface module, and an image illumination control program.
[0023] exist Figure 1 In the image illumination control device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the image illumination control device of the present invention can be set in the image illumination control device, and the image illumination control device calls the image illumination control program stored in the memory 1005 through the processor 1001 and executes the image illumination control method provided in the embodiment of the present invention.
[0024] This invention provides an image fill light control method, referring to... Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of an image supplementary lighting control method according to the present invention.
[0025] In this embodiment, the image fill light control method includes the following steps: Step S10: Determine the image brightness information for the current acquisition cycle based on the raw image data acquired by the image sensor, wherein the raw image data is generated based on the preset center area of the image sensor.
[0026] It should be noted that the execution entity in this embodiment is the controller in the infrared camera device. The controller has functions such as data processing, data communication and program execution. The controller can be a unit such as an image processing chip, or other devices with similar functions. This embodiment does not limit this.
[0027] It is understandable that the architecture of existing infrared camera equipment is as follows: Figure 3 As shown, the lens receives external light; the IR-CUT (infrared switch) contains a switching infrared filter. During the day, in good lighting conditions, the infrared filter is activated to prevent overexposure and filter infrared light. At night, the filter is turned off, allowing more light to enter the image sensor. The image sensor collects light signals, records the R, G, and B color information, generates raw data, and converts the received light signals into electrical signals via AD conversion, outputting them to the image processing chip via MIPI. The image processing chip incorporates algorithms for black point correction, noise reduction, brightness correction, white balance, color difference, gamma, and color space conversion to process the electrical signals transmitted from the image sensor. Finally, it converts RGB to YUV signals for easy display, where Y represents luminance and U and V represent chrominance. Infrared lights are used for nighttime illumination. The infrared light driver is used to turn on the infrared lights. When a person or animal, or other object that emits infrared radiation, approaches the IP camera, the PIR (Passive Infrared Receiver) triggers the system to start taking a picture or video. This allows the system to remain idle most of the time, only activating when a moving object is detected, thus reducing system power consumption. An ambient light sensor detects ambient light levels and transmits this information to the system. The system then determines whether to turn on the infrared lights based on the detected ambient light levels. A power supply provides power to the system. A storage device stores the program. A WiFi / Bluetooth module enables wireless connectivity, allowing images or video information of the product to be transmitted to the cloud.
[0028] In practical implementation, to reduce product power consumption and hardware costs, the ambient light detection sensor of the infrared camera device is eliminated in the image supplementary lighting control method proposed in this embodiment. Its architecture is as follows: Figure 4 As shown, through image acquisition, the brightness of the ambient light is calculated by analyzing the brightness of the image, and whether to turn on the infrared lamp and whether to switch the IR-CUT are confirmed according to the calculated ambient brightness information; if the infrared lamp is turned on, the system side will dynamically adjust the brightness of the infrared lamp according to the preset brightness curve to achieve the purpose of reducing the power consumption of the product.
[0029] It should be noted that, under normal circumstances, all pixel points of the image sensor collect photosensitive information to produce a clear picture with high pixels. For example, if the resolution of the image sensor is H×V, the photosensitive array of the image sensor is as Figure 5 shown. In actual situations, due to the angular difference of the light passing through the lens, the photosensitive points around the image sensor are often weak in intensity, so the brightness is darker relative to the middle position. In this embodiment, in the absence of an ambient light sensor, only the middle area P×P (P < min(H, V)) pixel points of the image sensor are selected for exposure to accurately calculate the ambient light brightness, as follows Figure 6 shown. In this embodiment, the middle area where P×P (P < min(H, V)) pixel points of the image sensor are exposed is the preset central area.
[0030] It can be understood that when the infrared imaging device is powered on and working for the first time, the image processing chip ISP will preset a set of shooting parameters, namely the exposure time T and the gain G, to ensure clear pictures under normal ambient light conditions. In addition, due to the lack of ambient light information, the infrared imaging device will start the ambient light detection mechanism and start shooting. To ensure more light enters the image sensor and reduce power consumption, the IR-CUT and the infrared lamp are turned off during the first operation.
[0031] In specific implementation, only the preset central area of the image sensor works. Since the external ambient light is changing, it is necessary to take pictures regularly to obtain the ambient light information. In this embodiment, the time interval △t for taking pictures is set, that is, starting from the 0th moment t0, pictures are taken at t0 + △t, t0 + 2×△t, t0 + 3×△t,..., t0 + n×△t moments respectively. Since only the middle area P×P (P < min(M, N)) pixel points of the image sensor are exposed, the generated raw image data is recorded as: [R, G, B] P×P . In this embodiment, each shooting moment is an image acquisition cycle.
[0032] It should be noted that to ensure the accuracy of identifying the ambient light for each picture taking, at least two images are collected in each image acquisition cycle. Based on the raw image data of each image, the image brightness information corresponding to each image is calculated, and the image brightness information of the current acquisition cycle is determined by using the image brightness information corresponding to each image in each image acquisition cycle. <O
[0033] Step S20: Calculate the brightness based on the image brightness information of the current acquisition period to determine the current ambient illuminance.
[0034] It should be noted that after determining the image brightness information for the current acquisition period, the brightness can be calculated using the image brightness information for the current acquisition period, the preset gain, and the preset exposure time to determine the current ambient illuminance for the current acquisition period.
[0035] Step S30: Determine the target working mode of the infrared supplementary light source based on the current ambient light intensity.
[0036] It should be noted that the target operating mode includes the operating status and operating parameters of the infrared supplementary light source. The operating status includes an off state and an on state, and the operating parameters refer to the duty cycle of the infrared supplementary light source. Different illuminance intervals correspond to different target operating modes. Based on the current illuminance interval, the target operating mode of the infrared supplementary light source in the current acquisition cycle is determined. In this embodiment, the infrared supplementary light source refers to an infrared lamp, but it can also be other devices; this embodiment does not limit this.
[0037] Step S40: Perform image illumination control according to the target working mode of the infrared fill light source.
[0038] It should be noted that the current operating mode of the infrared supplementary light source is adjusted based on the target operating mode of the infrared supplementary light source, and the corresponding operating mode of the infrared filter is determined. The current operating mode of the infrared filter is then adjusted based on its operating mode, thereby achieving supplementary lighting control of the image. For example, based on the target operating mode of the infrared supplementary light source, the infrared supplementary light source is turned off, and its duty cycle parameter is adjusted to 0. In this case, the infrared filter needs to be activated to reduce the luminous flux of infrared light, thus achieving supplementary lighting control of the image.
[0039] This embodiment determines the image brightness information for the current acquisition cycle based on raw image data acquired by an image sensor, where the raw image data is generated based on a preset center area of the image sensor. Brightness calculations are performed based on the image brightness information for the current acquisition cycle to determine the current ambient light level. The target operating mode of the infrared supplementary light source is then determined based on the current ambient light level. Image supplementary lighting control is then performed based on the target operating mode of the infrared supplementary light source. Through this method, the image brightness information for the current acquisition cycle is determined based on the raw image data generated from the preset center area. Further brightness calculations are then performed based on this image brightness information to determine the current ambient light level. The target operating mode of the infrared supplementary light source is then determined using the current ambient light level, thereby enabling image supplementary lighting control. This achieves accurate detection of ambient light without increasing the hardware cost of photosensors or ambient light detection sensors, reducing overall power consumption while ensuring the brightness of the acquired image and improving the user experience.
[0040] refer to Figure 7 , Figure 7 This is a flowchart illustrating a second embodiment of an image illumination control method according to the present invention.
[0041] Based on the first embodiment described above, the image supplementary lighting control method of this embodiment includes the following in step S20: Step S21: Determine multiple image brightness values based on the image brightness information of the current acquisition period.
[0042] It should be noted that since an image acquisition cycle includes at least two images, the image brightness values corresponding to multiple images are determined based on the image brightness information of the current acquisition cycle.
[0043] Step S22: Calculate the average of multiple image brightness values to determine the average image brightness of the current acquisition period.
[0044] It should be noted that calculating the average of multiple image brightness values yields the average image brightness for the current image acquisition period. For example, if there are two images in the current acquisition period with brightness values of... , The average image brightness is
[0045] Step S23: Calculate the brightness based on the preset exposure time, preset gain, and the average brightness of the image to determine the current ambient light level.
[0046] It should be noted that the current ambient illuminance during the current acquisition period can be calculated based on the preset exposure time T, preset gain G, and average image brightness. .
[0047] Understandably, in order to accurately identify ambient light based on images, the determination of image brightness information for the current acquisition period based on the raw image data acquired by the image sensor further includes: determining multiple image data to be processed for the current acquisition period based on the raw image data acquired by the image sensor; performing image transformation on each image data to be processed according to the spatial transformation matrix to determine multiple initial brightness values for the current acquisition period; calculating the difference between the multiple initial brightness values; and determining the image brightness information for the current acquisition period based on the multiple initial brightness values when the difference between the initial brightness values is less than a preset difference threshold.
[0048] In the specific implementation, based on the raw image data acquired by the image sensor, the raw image data corresponding to each image in the current acquisition period is determined. The raw image data corresponding to each image is the image data to be processed [R,G,B]. P×P The color space transformation matrix T is used to convert each image data to YUV output. ,in, Using the above formula, the initial brightness value corresponding to each image in the current acquisition period can be calculated. The difference between these initial brightness values is then calculated. If the difference between these initial brightness values is less than a preset difference threshold, it indicates that the image acquired in the current acquisition period is valid. At this point, the image brightness information for the current acquisition period is obtained based on the initial brightness values of each image. For example, if there are two images in the current acquisition period with initial brightness values of... , The preset difference threshold is ,when When this occurs, it indicates that the image acquired in the current acquisition cycle is valid, and the initial brightness value is set. , Image brightness information for the current acquisition period.
[0049] This embodiment determines multiple image brightness values based on the image brightness information of the current acquisition period; calculates the average of the multiple image brightness values to determine the average image brightness of the current acquisition period; and calculates the current ambient light intensity based on a preset exposure time, a preset gain, and the average image brightness. By using the above method to calculate the illuminance based on the average image brightness of the current acquisition period, the preset exposure time, and the preset gain, accurate detection of ambient light is ensured.
[0050] refer to Figure 8 , Figure 8 This is a flowchart illustrating a third embodiment of an image illumination control method according to the present invention.
[0051] Based on the first embodiment described above, the image supplementary lighting control method of this embodiment includes the following in step S30: Step S31: Detect based on the current ambient light intensity and the preset light intensity threshold.
[0052] It should be noted that the preset illuminance threshold refers to the illuminance threshold set for switching between the infrared filter and the infrared supplementary light source.
[0053] Step S32: When the current ambient light intensity is greater than the preset light intensity threshold, determine whether the current acquisition cycle is the preset initial acquisition cycle.
[0054] It should be noted that when the current ambient light intensity is greater than the preset illuminance threshold, it indicates that the current ambient light intensity is strong, and the infrared supplementary light source needs to be turned off. However, to avoid detection interference caused by the infrared supplementary light source, it is necessary to determine whether the current acquisition cycle is the first acquisition cycle. In this embodiment, the preset initial acquisition cycle refers to the first acquisition cycle.
[0055] It is understandable that, in order to ensure the rational use of resources, the step of determining whether the current acquisition cycle is a preset initial acquisition cycle when the current ambient illuminance is greater than the preset illuminance threshold further includes: determining the target operating state of the infrared supplementary light source as the light source off state when the current acquisition cycle is a preset initial acquisition cycle; and determining the target working mode of the infrared supplementary light source based on the light source off state.
[0056] In the specific implementation, when the current acquisition cycle is the preset initial acquisition cycle, it indicates that the current ambient light intensity is strong and the infrared supplementary light source needs to be turned off. At this time, the target operating state of the infrared supplementary light source is determined to be the light source off state, the target operating parameter of the infrared supplementary light source is the preset value 0, the target operating state of the infrared filter is determined to be the filter on state, and the light source off state is taken as the target operating mode of the infrared supplementary light source.
[0057] Step S33: When the current acquisition period is not the preset initial acquisition period, acquire the historical ambient illuminance.
[0058] It should be noted that when the current collection period is not the preset initial collection period, the ambient illuminance calculated in the previous collection period is obtained, and the ambient illuminance calculated in the previous collection period is the historical ambient illuminance.
[0059] Step S34: Determine the target working mode of the infrared supplementary light source based on the historical ambient illuminance and the current ambient illuminance.
[0060] It should be noted that calculating the difference between historical ambient illuminance and current ambient illuminance, and determining the target operating mode of the infrared supplementary light source based on this difference, further, to ensure the accuracy of mode determination, the step of determining the target operating mode of the infrared supplementary light source based on the historical ambient illuminance and the current ambient illuminance includes: calculating the difference between the historical ambient illuminance and the current ambient illuminance to determine the difference ambient illuminance; determining the illuminance range based on the difference ambient illuminance; determining the target operating state and target operating parameters of the infrared supplementary light source based on the mapping relationship between the illuminance range and the supplementary lighting strategy; and determining the target operating mode of the infrared supplementary light source based on the target operating state and the target operating parameters.
[0061] It is understandable that, in historical environments with light levels of... At that time, calculate the historical ambient illuminance and the current ambient illuminance. The difference between historical ambient illuminance and current ambient illuminance The difference between them is the difference in ambient illuminance. The difference in ambient illuminance is taken as the actual ambient illuminance in the current collection cycle. Since different illuminance division intervals correspond to different target working modes, the illuminance division interval where the difference in ambient illuminance is located is the illuminance interval.
[0062] In the specific implementation, the target operating status and target working parameters of the infrared supplementary light source corresponding to the illuminance range are found in the supplementary light strategy mapping relationship, and the target working mode of the infrared supplementary light source is determined based on the target operating status and target working parameters.
[0063] It should be noted that in this embodiment, the supplementary lighting strategy mapping relationship includes the operating status of the infrared filter, the operating status of the infrared supplementary lighting source, and the duty cycle parameter of the infrared supplementary lighting source corresponding to each illuminance division interval. For ease of understanding, the supplementary lighting strategy mapping relationship is shown in Table 1. In this embodiment, the preset illuminance threshold is l. H4 When the infrared filter is on, it filters out infrared light and turns off the infrared supplementary light source. When the infrared filter is off, it increases infrared light and turns on the infrared supplementary light source.
[0064] Table 1
[0065] Understandably, under normal circumstances, 0 to 1 L3 When the illuminance within the zone is low, the infrared filter will be turned off to increase the luminous flux of infrared light, and the infrared lamps will be turned on to provide supplemental lighting; H4 ~l H7The illuminance within the area is high. If an infrared filter is used to reduce the luminous flux of infrared light, the infrared lamps should be turned off. L3 ~l H4 This is the transition point from low to high illumination, with the light level in between. To capture clearer images and improve the user experience, you can switch to low-light mode, turn off the infrared filter to increase infrared light, and turn on the infrared lights.
[0066] In the specific implementation, at the initial time t0, to eliminate the influence of the infrared lamp, the infrared lamp is turned off and the infrared filter is enabled according to the low illumination setting. When the ambient light dims, when the ambient light illuminance L1 detected at the first shooting cycle t0+1×Δt is within [l H4 ,l H7 When the ambient light intensity is within the specified range, it is considered high. Therefore, the infrared filter is activated to reduce the infrared light flux, while the infrared lamps are turned off, and the system records the ambient light intensity L1. The above actions are repeated at time t0+3×Δt in the third shooting cycle, recording the ambient light intensity L3. The first ambient light intensity L1 is deleted, while the second ambient light intensity L3 is retained. 2, That is, only the previous ambient light intensity value is retained for each photo. At time t0 + n × Δt in the nth photo cycle, when the ambient light intensity L is detected... n In [l] L3 ,l H4 When the ambient light intensity is within the specified range, it is considered to be low, at the critical state of high or low illuminance. The system then turns off the infrared filter, turns on the infrared lamp, and records the ambient light intensity L. n And based on the illuminance range, select the lowest duty cycle parameter P. H4 To ensure image brightness while minimizing system power consumption, the infrared lamps are adjusted progressively as the detected ambient light level decreases to achieve the desired image brightness. When the ambient light changes from dark to bright at time t0+x×Δt, the ambient light level L at this point... x In [l] H4 ,l H5 Within this interval, the infrared lights need to be turned off. Record the ambient illuminance L at the most recent time t0 + (x - 1) × Δt. x-1 In [l] L3 ,l H4 Since the infrared lamps were already on at time t0+(x-1)×Δt, providing infrared supplementary lighting, the system did not turn off the infrared lamps at time t0+x×Δt. Therefore, the actual illuminance L at time t0+x×Δt is [not specified]. ' x :L ' x= L x - L x-1, Therefore, only when L' x In [l] L3 ,l H4 The system will only turn off the infrared lights and activate the infrared filter when the light is within the specified range. The overall execution process is as follows: Figure 9 As shown.
[0067] It should be noted that, in order to ensure the accuracy of image supplementary lighting control, the step of controlling the image supplementary lighting according to the target working mode of the infrared supplementary lighting source further includes: when the target working mode of the infrared supplementary lighting source is the light source off state, determining the filter working mode of the infrared filter to be the filter on state; activating the infrared filter according to the filter on state, and deactivating the infrared supplementary lighting source according to the light source off state.
[0068] It is understandable that when the target working mode of the infrared supplementary light source is the light source off state, it means that the infrared filter needs to be turned on to filter out infrared light. At this time, the working mode of the infrared filter is determined to be the filter on state, the infrared filter is turned on and the infrared supplementary light source is turned off.
[0069] This embodiment detects ambient light intensity based on the current ambient light level and a preset illuminance threshold. When the current ambient light level is greater than the preset illuminance threshold, it determines whether the current acquisition period is a preset initial acquisition period. When the current acquisition period is not a preset initial acquisition period, it acquires historical ambient light intensity. Based on the historical ambient light intensity and the current ambient light intensity, it determines the target operating mode of the infrared supplementary lighting source. This method ensures the accuracy of subsequent image supplementary lighting control.
[0070] Furthermore, this embodiment of the invention also proposes a storage medium storing an image illumination control program, which, when executed by a processor, implements the steps of the image illumination control method described above.
[0071] Reference Figure 10 , Figure 10 This is a structural block diagram of the first embodiment of the image supplementary lighting control device of the present invention.
[0072] like Figure 10 As shown, the image illumination control device proposed in this embodiment of the invention includes: The processing module 10 is used to determine the image brightness information of the current acquisition cycle based on the raw image data acquired by the image sensor, wherein the raw image data is generated based on the preset center area of the image sensor.
[0073] The calculation module 20 is used to perform brightness calculation based on the image brightness information of the current acquisition period to determine the current ambient illuminance.
[0074] The processing module 10 is used to determine the target working mode of the infrared supplementary light source based on the current ambient light intensity.
[0075] The control module 30 is used to control image illumination according to the target working mode of the infrared illumination source.
[0076] This embodiment determines the image brightness information for the current acquisition cycle based on raw image data acquired by an image sensor, where the raw image data is generated based on a preset center area of the image sensor. Brightness calculations are performed based on the image brightness information for the current acquisition cycle to determine the current ambient light level. The target operating mode of the infrared supplementary light source is then determined based on the current ambient light level. Image supplementary lighting control is then performed based on the target operating mode of the infrared supplementary light source. Through this method, the image brightness information for the current acquisition cycle is determined based on the raw image data generated from the preset center area. Further brightness calculations are then performed based on this image brightness information to determine the current ambient light level. The target operating mode of the infrared supplementary light source is then determined using the current ambient light level, thereby enabling image supplementary lighting control. This achieves accurate detection of ambient light without increasing the hardware cost of photosensors or ambient light detection sensors, reducing overall power consumption while ensuring the brightness of the acquired image and improving the user experience.
[0077] In one embodiment, the calculation module 20 is further configured to determine multiple image brightness values based on the image brightness information of the current acquisition period; The average brightness value of the image in the current acquisition period is determined by calculating the average brightness value of multiple image brightness values. The ambient light level is determined by calculating the brightness based on the preset exposure time, preset gain, and the average brightness of the image.
[0078] In one embodiment, the processing module 10 is further configured to perform detection based on the current ambient light intensity and a preset light intensity threshold; When the current ambient light intensity is greater than the preset light intensity threshold, determine whether the current acquisition cycle is the preset initial acquisition cycle; When the current acquisition period is not the preset initial acquisition period, historical ambient illuminance is acquired; The target operating mode of the infrared supplementary light source is determined based on the historical ambient illuminance and the current ambient illuminance.
[0079] In one embodiment, the processing module 10 is further configured to calculate the difference between the historical ambient illuminance and the current ambient illuminance to determine the difference ambient illuminance; The illuminance range is determined based on the difference in ambient illuminance. The target operating status and target working parameters of the infrared supplementary light source are determined based on the mapping relationship between the illuminance range and the supplementary lighting strategy. The target operating mode of the infrared supplementary light source is determined based on the target operating status and the target operating parameters.
[0080] In one embodiment, the processing module 10 is further configured to determine that the target operating state of the infrared supplementary light source is the light source off state when the current acquisition cycle is a preset initial acquisition cycle; The target operating mode of the infrared supplementary light source is determined based on the light source's off state.
[0081] In one embodiment, the control module 30 is further configured to determine that the filter working mode of the infrared filter is the filter on state when the target working mode of the infrared supplementary light source is the light source off state; The infrared filter is activated according to the filter's on state, and the infrared supplementary light source is turned off according to the light source's off state.
[0082] In one embodiment, the processing module 10 is further configured to determine multiple image data to be processed in the current acquisition cycle based on the raw image data acquired by the image sensor; Based on the spatial transformation matrix, image transformation is performed on each image data to be processed to determine multiple initial brightness values for the current acquisition cycle; Calculate the difference between multiple initial brightness values; When the difference between each initial brightness value is less than a preset difference threshold, the image brightness information of the current acquisition period is determined based on multiple initial brightness values.
[0083] It should be understood that the above are merely illustrative examples and do not constitute any limitation on the technical solutions of the present invention. In specific applications, those skilled in the art can make settings as needed, and the present invention does not impose any restrictions on this.
[0084] It should be understood that although the steps in the flowcharts of this application's embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.
[0085] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of this invention. In practical applications, those skilled in the art can select some or all of the workflow to achieve the purpose of this embodiment according to actual needs, and no restrictions are imposed here.
[0086] Furthermore, it should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0087] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0088] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory (ROM) / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0089] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. An image fill light control method, characterized in that, The image illumination control method includes: Based on the raw image data acquired by the image sensor, the image brightness information of the current acquisition period is determined, wherein the raw image data is generated based on the preset center area of the image sensor; The current ambient illuminance is determined by calculating the brightness based on the image brightness information of the current acquisition period. The system detects ambient illuminance based on the current ambient illuminance and a preset illuminance threshold. When the current ambient illuminance exceeds the preset illuminance threshold, it determines whether the current acquisition cycle is a preset initial acquisition cycle. When the current acquisition cycle is not a preset initial acquisition cycle, it acquires historical ambient illuminance. It calculates the difference between the historical and current ambient illuminance to determine the difference ambient illuminance. It determines the illuminance range based on the difference ambient illuminance. It determines the target operating state and target working parameters of the infrared supplementary light source based on the mapping relationship between the illuminance range and the supplementary lighting strategy. Finally, it determines the target working mode of the infrared supplementary light source based on the target operating state and the target working parameters. Image illumination control is performed based on the target operating mode of the infrared fill light source.
2. The image illumination control method as described in claim 1, characterized in that, The step of calculating brightness based on the image brightness information of the current acquisition period to determine the current ambient illuminance includes: Multiple image brightness values are determined based on the image brightness information of the current acquisition period; The average brightness value of the image in the current acquisition period is determined by calculating the average brightness value of multiple image brightness values. The ambient light level is determined by calculating the brightness based on the preset exposure time, preset gain, and the average brightness of the image.
3. The image illumination control method as described in claim 1, characterized in that, After determining whether the current sampling period is a preset initial sampling period when the current ambient illuminance is greater than the preset illuminance threshold, the method further includes: When the current acquisition cycle is the preset initial acquisition cycle, the target operating state of the infrared supplementary light source is determined to be the light source off state; The target operating mode of the infrared supplementary light source is determined based on the light source's off state.
4. The image supplementary lighting control method as described in claim 1, characterized in that, The step of controlling image illumination based on the target working mode of the infrared illumination source includes: When the target operating mode of the infrared supplementary light source is the light source off state, the filter operating mode of the infrared filter is determined to be the filter on state; The infrared filter is activated according to the filter's on state, and the infrared supplementary light source is turned off according to the light source's off state.
5. The image illumination control method according to any one of claims 1 to 4, characterized in that, The determination of image brightness information for the current acquisition period based on raw image data acquired by the image sensor includes: Based on the raw image data acquired by the image sensor, multiple image data to be processed in the current acquisition cycle are determined; Based on the spatial transformation matrix, image transformation is performed on each image data to be processed to determine multiple initial brightness values for the current acquisition cycle; Calculate the difference between multiple initial brightness values; When the difference between each initial brightness value is less than a preset difference threshold, the image brightness information of the current acquisition period is determined based on multiple initial brightness values.
6. An image fill light control device, characterized in that, The image supplementary lighting control device includes: The processing module is used to determine the image brightness information of the current acquisition cycle based on the raw image data acquired by the image sensor, wherein the raw image data is generated based on the preset center area of the image sensor; The calculation module is used to calculate the brightness based on the image brightness information of the current acquisition period and determine the current ambient illuminance. The processing module is used to determine the target working mode of the infrared supplementary light source based on the current ambient light intensity. The control module is used to control image illumination according to the target working mode of the infrared illumination source; The processing module is further configured to perform detection based on the current ambient illuminance and a preset illuminance threshold; when the current ambient illuminance is greater than the preset illuminance threshold, determine whether the current acquisition cycle is a preset initial acquisition cycle; when the current acquisition cycle is not a preset initial acquisition cycle, acquire historical ambient illuminance; calculate the difference between the historical ambient illuminance and the current ambient illuminance to determine the difference ambient illuminance; determine the illuminance range based on the difference ambient illuminance; determine the target operating state and target working parameters of the infrared supplementary light source based on the mapping relationship between the illuminance range and the supplementary lighting strategy; and determine the target working mode of the infrared supplementary light source based on the target operating state and the target working parameters.
7. An image supplementary lighting control device, characterized in that, The device includes: a memory, a processor, and an image illumination control program stored in the memory and executable on the processor, the image illumination control program being configured to implement the image illumination control method as described in any one of claims 1 to 5.
8. A storage medium, characterized in that, The storage medium stores an image illumination control program, which, when executed by a processor, implements the image illumination control method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Floor sweeping robot and camera light filling system and method thereof
CN107137026A
Monitoring equipment, method and device and storage medium
CN111432135A