Light supplementing device, control method, light supplementing device control device, equipment and medium
Patent Information
- Application Number
- CN202310921261.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-25
- Publication Date
- 2025-01-28
AI Technical Summary
Conventional fill light fixtures have poor picture quality due to the fixed fill light angle, especially in low-brightness environments.
Design a supplementary device including infrared lights and rotating components. The rotation of the driver -driven supporting parts is used to drive the infrared light to adjust the direction of light to achieve flexible adjustment of the angle of the field of view and avoid light reflection into the camera.
By flexibly adjusting the light direction of infrared lights, the image overexposure problem caused by light reflection is eliminated, the quality of the picture shooting of security equipment is improved, and the shooting needs of various scenes are adapted to the shooting needs of various scenarios.
Smart Images

Figure CN119383446A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of photographing technology, and in particular to a fill light device, a control method, a fill light device control device, equipment and a medium. Background Art
[0002] As people's living standards continue to improve, security products (such as network cameras or video doorbells) have entered thousands of households and are deeply favored by consumers. When security products are shooting, if the brightness of the monitored environment is low, it is easy to cause blurry pictures. Therefore, a fill light device is needed to fill the monitored environment with light.
[0003] The fill light angle of a conventional fill light device is fixed, so that the light emitted by the fill light device may enter the lens of the security product due to partial light reflection from the wall, thereby resulting in poor picture quality of the security product.
[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of the present application is to provide a fill light device, a control method, a fill light device control device, equipment and a medium, aiming to solve the technical problem that conventional fill light devices easily lead to poor picture quality in security product photography.
[0006] To achieve the above object, the present application provides a fill light device, the fill light device comprising:
[0007] Infrared light;
[0008] A rotating assembly, the rotating assembly is arranged in the security equipment, the rotating assembly comprises a supporting member and a driving member, the infrared lamp is arranged on the supporting member, the driving member is rotatably connected with the supporting member, the driving member drives the supporting member to drive the infrared lamp to rotate, so as to adjust the light emitting direction of the infrared lamp;
[0009] A printed circuit board is electrically connected to the infrared lamp and the driving component respectively.
[0010] The present application also provides a fill light device control method, the fill light device control method comprising:
[0011] Dynamically acquire a first image captured by a security device, and when there is a need for fill light in the first image, activate an infrared light;
[0012] Acquire a second image captured by the security device, and when the second image is overexposed, determine an overexposed area of the second image;
[0013] Determining a rotation angle of a driving member according to the overexposed area;
[0014] According to the rotation angle, the driving member drives the infrared lamp to rotate and adjust the light emitting direction to avoid light from the camera device of the security equipment.
[0015] Optionally, before the step of providing the first image with fill light requirement, the method further comprises:
[0016] Determining an image brightness value of the first image, and determining a first clarity of an image reference object in the first image, wherein the image reference object is a stationary object and / or a human face in the first image whose contour area is within a preset area range;
[0017] When the image brightness value is less than a preset low brightness threshold, and / or the first definition is less than a preset low definition threshold, it is determined that the first image has a fill light requirement.
[0018] Optionally, the step of starting the infrared lamp includes:
[0019] If a human face is recognized in the first image, a first brightness difference between the brightness of the human face and a preset target brightness is determined, and a first fill light brightness for correcting the first brightness difference is determined according to a mapping relationship between the preset brightness difference and the fill light brightness, so that the infrared lamp performs fill light in response to the first fill light brightness;
[0020] If no face is recognized in the first image, a second brightness difference between the average brightness of the first image and a preset target brightness is determined, and based on a mapping relationship between the preset brightness difference and the fill light brightness, a second fill light brightness that corrects the second brightness difference is determined so that the infrared light performs fill light in response to the second fill light brightness.
[0021] Optionally, before the step of determining the overexposed area of the second image, the method further includes:
[0022] Determining an overexposure brightness difference between an overexposure brightness of an overexposed image and a preset target brightness, wherein the overexposed image is the overexposed second image;
[0023] According to the overexposure brightness difference, reducing the fill light brightness of the infrared lamp, and acquiring a third image collected by the security device;
[0024] Determining whether a second definition of an image reference object in the third image is greater than or equal to a preset low definition threshold, wherein the image reference object is a stationary object and / or a human face in the first image whose contour area is within a preset area range;
[0025] If not, the brightness of the infrared lamp is restored, and the step of determining the overexposed area of the second image is performed.
[0026] Optionally, the step of determining the overexposed area of the second image includes:
[0027] Dividing the overexposed image into regions to obtain a plurality of first regions, wherein the overexposed image is the overexposed second image;
[0028] Acquire a regional brightness difference between each first region and an adjacent region, and combine first regions whose regional brightness differences are within a preset regional brightness range into second regions;
[0029] The second area with the highest brightness is used as the overexposed area.
[0030] Optionally, the step of determining the rotation angle of the driving member according to the overexposed area includes:
[0031] Determine an overlap area between the field of view angle of the infrared lamp and the overexposed area;
[0032] The rotation angle is determined according to the overlapping area of the overlapping regions.
[0033] The present application also provides a fill light device control device, which is used to implement the steps of the fill light device control method described above, and the fill light device control device includes:
[0034] An acquisition module, used to dynamically acquire a first image captured by a security device, and start an infrared light when there is a need for fill light in the first image;
[0035] an area determination module, configured to obtain a second image captured by the security device, and when the second image is overexposed, determine an overexposed area of the second image;
[0036] An angle determination module, used to determine the rotation angle of the driving member according to the overexposed area;
[0037] The driving module is used to drive the infrared lamp to rotate and adjust the light emitting direction based on the driving member according to the rotation angle to avoid light from the camera device of the security equipment.
[0038] The present application also provides an electronic device, which includes: a memory, a processor, and a fill light device control program stored in the memory and executable on the processor, wherein the fill light device control program is configured to implement the steps of the above-mentioned fill light device control method.
[0039] The present application also provides a storage medium, which is a computer-readable storage medium. A fill light device control program is stored on the computer-readable storage medium. The fill light device control program is executed by a processor to implement the steps of the above-mentioned fill light device control method.
[0040] The present application discloses a method for controlling a fill light device, which dynamically acquires a first image captured by a security device, and when there is a fill light demand for the first image, starts an infrared lamp, and uses the light emitted by the infrared lamp to fill light for the shooting environment of the security device; then acquires a second image captured by the security device, and when the second image is overexposed, determines the overexposed area of the second image, and determines the rotation angle of a driving component based on the overexposed area, and then drives the infrared lamp to rotate and adjust the light emitting direction based on the driving component according to the rotation angle to avoid light from the camera device of the security device, thereby realizing flexible adjustment of the field of view angle of the infrared lamp, so as to eliminate the occurrence of image overexposure caused by reflection of the light emitted by the infrared lamp by an object, thereby improving the picture quality shot by the security device, and further meeting the shooting needs of various scenes. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 A schematic diagram of the structure of a fill light device according to an embodiment of the present application;
[0042] Figure 2 Schematic diagram of application scenarios of the fill light device involved in the embodiment of the present application;
[0043] Figure 3 A schematic diagram of the structure of an electronic device in a hardware operating environment involved in an embodiment of the present application;
[0044] Figure 4 A schematic flow chart of a method for controlling a fill light device according to an embodiment of the present application;
[0045] Figure 5 A schematic diagram of a scene of a method for controlling a fill light device according to an embodiment of the present application;
[0046] Figure 6 This is a flow chart of a relatively complete embodiment of the present application;
[0047] Figure 7 A schematic diagram of the framework structure of a fill light device control device according to an embodiment of the present application.
[0048] Description of Figure Numbers:
[0049] Label name Label name 110 Infrared light 120 Rotating components 121 Support 122 Drive parts 130 Printed Circuit Board 200 Security equipment 210 Camera device 300 Wall
[0050] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0051] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0052] In addition, the descriptions of "first", "second", etc. in this application are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, "and / or" in the full text includes three solutions. Taking A and / or B as an example, it includes technical solution A, technical solution B, and technical solution that satisfies both A and B; in addition, the technical solutions between the various embodiments can be combined with each other, but it must be based on the ability of ordinary technicians in this field to implement. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0053] The present invention mainly proposes a fill light device, which mainly lies in that a rotating component 120 is added to the infrared lamp 110 to drive the rotation of the infrared lamp 110 to adjust the light emission direction of the infrared lamp 110, thereby realizing flexible adjustment of the field of view of the infrared lamp 110; avoiding the light emitted by the infrared lamp 110 from being reflected by objects such as a wall 300 and entering the camera device 210, so as to cause overexposure of the captured image, and then erroneously judging that the cause of the overexposure is that the fill light brightness of the infrared lamp 110 is too high, and erroneously reducing the fill light brightness, resulting in blurred captured images and poor quality; by flexibly adjusting the field of view of the infrared lamp 110, the shooting needs in various shooting environments are met, and the quality of the captured images is improved.
[0054] The specific structure of the fill light device will be mainly described below.
[0055] Reference Figure 1 to Figure 2 In an embodiment of the present invention, the fill light device includes:
[0056] Infrared light 110;
[0057] A rotating assembly 120, wherein the rotating assembly 120 is disposed in the security device 200, and the rotating assembly 120 includes a supporting member 121 and a driving member 122, wherein the infrared lamp 110 is disposed on the supporting member 121, and the driving member 122 is rotatably connected to the supporting member 121, and the driving member 122 drives the supporting member 121 to drive the infrared lamp 110 to rotate, so as to adjust the light emission direction of the infrared lamp 110;
[0058] A printed circuit board 130 is electrically connected to the infrared lamp 110 and the driving component 122 respectively.
[0059] The infrared lamp 110 is a fill light device that can cooperate with the security device 200 to capture images in dim environments such as at night, and can emit invisible infrared light; the infrared lamp 110 can be an LED (light-emitting diode) and / or a laser infrared lamp 110.
[0060] In a feasible implementation, a plurality of infrared lamps 110 capable of emitting light of different wavelengths may be provided on the fill light device, and the types of the infrared lamps 110 may be different to meet the shooting requirements in different shooting environments.
[0061] Optionally, the security device 200 may be a security monitoring device, which implements real-time monitoring through a camera device 210 , and the camera device 210 may be a camera.
[0062] The rotating assembly 120 can be arranged in the security device 200 so that the field of view of the infrared lamp 110 is consistent with the field of view of the security device 200; the rotating assembly 120 includes a support member 121 and a driving member 122, wherein the overall shape of the support member 121 can be in many forms, such as a column, a cube or a cuboid, or a support bracket, etc.; the infrared lamp 110 is arranged on the support member 121, and there are many ways to arrange it, such as being arranged at the center of the support member 121 or at the edge of the support member 121. For example, refer to Figure 2 The support member 121 is a rectangular support bracket, and the infrared lamp 110 is arranged at the center of the support member 121. The driving member 122 is a structural member that can provide power and move the associated device, and can be a motor, such as a stepping motor, a servo motor, etc. The driving member 122 is rotatably connected to the support member 121, and then drives the support member 121 to drive the infrared lamp 110 to rotate.
[0063] The printed circuit board 130 (PCB), also known as a printed circuit board, is an important electronic component that can serve as a support for electronic components and a carrier for electrically connecting electronic components to each other; the printed circuit board 130 is electrically connected to the infrared lamp 110 and the driver 122 respectively.
[0064] The size of the field of view (FOV) determines the field of view of the optical instrument.
[0065] For example, refer to Figure 3The rotating assembly 120 of the fill light device is arranged in the security device 200 so that the field of view angle of the infrared lamp 110 is consistent with the direction of the field of view angle of the camera device 210 of the security device 200, wherein the overlapping angle of the field of view angle of the infrared lamp 110 and the field of view angle of the camera device 210 of the security device 200 is greater than the preset angle threshold, then it is determined that the field of view angle of the infrared lamp 110 is consistent with the direction of the field of view angle of the camera device 210 of the security device 200; since the size of the field of view angle of the infrared lamp 110 is fixed, when the security device 200 is installed next to the building, the light emitted by the infrared lamp 110 may be reflected by the wall 300 into the camera device 210, thereby causing the image (picture) captured by the camera device 210 to be overexposed, and then mistakenly judged that the overexposure in the image is caused by the excessively high fill light intensity of the infrared lamp 110, and mistakenly reduced the fill light brightness, resulting in blurred shooting pictures and poor quality. The infrared lamp 110 is driven to rotate by the rotating assembly 120 , thereby changing the field of view of the infrared lamp 110 , reducing the brightness of the light reflected by the wall 300 , and improving the image quality collected by the security device 200 .
[0066] In this embodiment, by adding a rotating component 120 on the basis of the infrared lamp 110, the infrared lamp 110 can be driven to rotate, so that the light emitting direction of the infrared lamp 110, that is, the field of view angle, can be flexibly adjusted; to avoid the light emitted by the infrared lamp 110 being reflected by objects such as the wall 300 and entering the camera device 210, so as to prevent the shooting picture from being overexposed, and then mistakenly judging that the cause of the overexposure is that the fill light brightness of the infrared lamp 110 is too high, and mistakenly reducing the fill light brightness, resulting in blurred shooting pictures and poor quality; through the flexible adjustment of the field of view angle of the infrared lamp 110, the shooting needs in various shooting environments are met, and the quality of the shooting pictures is improved.
[0067] Reference Figure 3 , Figure 3 A schematic diagram of the electronic device structure of the hardware operating environment involved in the embodiment of the present application.
[0068] like Figure 3As shown, the electronic 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. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (WIreless-FIdelity, WI-FI) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) memory, or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0069] Those skilled in the art will understand that Figure 3 The structure shown in the figure does not constitute a limitation on the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0070] like Figure 3 As shown, the memory 1005 as a storage medium may include an operating system, a data storage module, a network communication module, a user interface module and a fill light device control program.
[0071] exist Figure 3 In the electronic device shown, the network interface 1004 is mainly used for data communication with other devices; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the electronic device of the present application can be set in the electronic device, and the electronic device calls the fill light device control program stored in the memory 1005 through the processor 1001, and performs the following operations:
[0072] Dynamically acquire a first image captured by a security device, and when there is a need for fill light in the first image, activate an infrared light;
[0073] Acquire a second image captured by the security device, and when the second image is overexposed, determine an overexposed area of the second image;
[0074] Determining a rotation angle of a driving member according to the overexposed area;
[0075] According to the rotation angle, the driving member drives the infrared lamp to rotate and adjust the light emitting direction to avoid light from the camera device of the security equipment.
[0076] Furthermore, the processor 1001 may call the fill light device control program stored in the memory 1005, and further perform the following operations:
[0077] Before the step of requiring fill light for the first image, the method includes:
[0078] Determining an image brightness value of the first image, and determining a first clarity of an image reference object in the first image, wherein the image reference object is a stationary object and / or a human face in the first image whose contour area is within a preset area range;
[0079] When the image brightness value is less than a preset low brightness threshold, and / or the first definition is less than a preset low definition threshold, it is determined that the first image has a fill light requirement.
[0080] Furthermore, the operation of starting the infrared lamp includes:
[0081] If a human face is recognized in the first image, a first brightness difference between the brightness of the human face and a preset target brightness is determined, and a first fill light brightness for correcting the first brightness difference is determined according to a mapping relationship between the preset brightness difference and the fill light brightness, so that the infrared lamp performs fill light in response to the first fill light brightness;
[0082] If no face is recognized in the first image, a second brightness difference between the average brightness of the first image and a preset target brightness is determined, and based on a mapping relationship between the preset brightness difference and the fill light brightness, a second fill light brightness that corrects the second brightness difference is determined so that the infrared light performs fill light in response to the second fill light brightness.
[0083] Furthermore, the processor 1001 may call the fill light device control program stored in the memory 1005, and further perform the following operations:
[0084] Before the operation of determining the overexposed area of the second image, the method further includes:
[0085] Determining an overexposure brightness difference between an overexposure brightness of an overexposed image and a preset target brightness, wherein the overexposed image is the overexposed second image;
[0086] According to the overexposure brightness difference, reducing the fill light brightness of the infrared lamp, and acquiring a third image collected by the security device;
[0087] Determining whether a second definition of an image reference object in the third image is greater than or equal to a preset low definition threshold, wherein the image reference object is a stationary object and / or a human face in the first image whose contour area is within a preset area range;
[0088] If not, the brightness of the infrared lamp is restored, and an operation of determining an overexposed area of the second image is performed.
[0089] Further, the operation of determining the overexposed area of the second image includes:
[0090] Dividing the overexposed image into regions to obtain a plurality of first regions, wherein the overexposed image is the overexposed second image;
[0091] Acquire a regional brightness difference between each first region and an adjacent region, and combine first regions whose regional brightness differences are within a preset regional brightness range into second regions;
[0092] The second area with the highest brightness is used as the overexposed area.
[0093] Further, the operation of determining the rotation angle of the driving member according to the overexposed area includes:
[0094] Determine an overlap area between the field of view angle of the infrared lamp and the overexposed area;
[0095] The rotation angle is determined according to the overlapping area of the overlapping regions.
[0096] Based on the above structure, various embodiments of a method for controlling a fill light device are proposed.
[0097] Reference Figure 4 , Figure 4 This is a flow chart of the first embodiment of the fill light device control method of the present application.
[0098] In this embodiment, the fill light device control method is applied to the fill light device. The execution subject of the fill light device control method can be an electronic device. The electronic device can be a local device or a network device. This is not limited in this embodiment. For the convenience of description, the execution subject is omitted to explain each embodiment. In this embodiment, the fill light device control method includes:
[0099] Step S10, dynamically acquiring a first image captured by the security device 200, and when there is a need for fill light in the first image, starting the infrared light 110;
[0100] Dynamically acquire the image captured by the security device 200 (hereinafter referred to as the first image for distinction), and dynamically determine whether the first image needs fill light; then when it is determined that the first image needs fill light, that is, there is a need for fill light, start the infrared light 110 to achieve fill light for the image taken by the security device 200.
[0101] In a feasible implementation, whether to activate the infrared light 110 for supplementary lighting can be determined by judging the ambient brightness.
[0102] Step S20, acquiring a second image captured by the security device 200, and when the second image is overexposed, determining an overexposed area of the second image;
[0103] After starting the infrared light 110, the image after the infrared light 110 fill light collected by the security device 200 (hereinafter referred to as the second image for distinction) is obtained, and it is determined whether overexposure occurs in the second image, wherein overexposure refers to the situation that the light is too strong during shooting, resulting in the loss of bright details in the image, excessive brightness or distortion; then, when the second image is overexposed, the overexposed area in the second image is determined, and the overexposed area refers to the area in the image where the bright details are lost, excessive brightness or distortion is presented.
[0104] In one feasible implementation, the overexposed second image is grayed to obtain a grayscale image, and then the grayscale image is binarized, that is, the grayscale of pixels in the grayscale image that are greater than a preset grayscale value is set to a grayscale maximum value, and the grayscale of pixels that are less than the preset grayscale value is set to a grayscale minimum value, thereby achieving binarization and obtaining a binary image; wherein the preset grayscale value can be determined by traversing and calculating the grayscale histograms of the foreground area and the background area in the segmentation results under different grayscale thresholds, and then comparing the variances between the two, and taking the grayscale threshold that makes the variance the largest as the preset grayscale value for binarization ; Then, the binary image is corroded and expanded to obtain a corroded and expanded image, and then edge detection is performed on the corroded and expanded image to determine the overexposed area of the second image; due to the different shooting scenes of the security equipment 200, the light reflection conditions at each position may also be different, resulting in multiple overexposed areas in the second image. In order to improve the accuracy of overexposed area range detection, the corroded and expanded image obtained according to the above method can merge similar light spots in the overexposed second image together, so that multiple discrete light spots in the fill light range are merged into a large light spot to obtain an overexposed area.
[0105] Step S30, determining the rotation angle of the driving member 122 according to the overexposed area;
[0106] According to the overexposed area, the rotation angle of the driving member 122 is determined so that part or the whole of the overexposed area is outside the field of view of the infrared lamp 110, thereby avoiding the overexposure of the second image due to the overexposed area being an object such as a wall 300, which reflects the light emitted by the infrared lamp 110 to the camera device 210 of the security equipment 200.
[0107] The rotation angle refers to the angle at which the infrared lamp 110 deviates from the initial position when rotating.
[0108] In one feasible implementation, step S30, determining the rotation angle of the driving member 122 according to the overexposed area, includes:
[0109] Step S31, determining the overlap area between the field of view angle of the infrared lamp 110 and the overexposed area;
[0110] The field of view angle of the infrared lamp 110 is determined, and then the overlapped portion between the field of view angle of the infrared lamp 110 and the overexposed area (hereinafter referred to as the overlapped area for distinction) is determined.
[0111] In a feasible implementation, a plurality of infrared lamps 110 may be provided on the fill light device, and there may also be a plurality of overexposed areas, so as to determine the overlapping area between the field of view angle of each infrared lamp 110 and each overexposed area.
[0112] Step S32: determining the rotation angle according to the overlapping area of the overlapping region.
[0113] Determine the overlapping area of the overlapping area. Since the larger the overlapping area, the more light is reflected, and thus the brightness of the area is higher, resulting in overexposure. Then determine that under the fill light brightness, when the infrared lamp 110 illuminates a preset high-reflectivity object, and the brightness of the image containing the high-reflectivity object collected by the security equipment 200 is the target brightness, the overlapping area between the field of view angle of the infrared lamp 110 and the high-reflectivity object is used as a reference area. Then determine the moving distance when the overlapping area is reduced to the reference area, and determine the rotation angle based on the mapping relationship between the preset moving distance and the rotation angle of the infrared lamp 110.
[0114] Optionally, under a certain fill light brightness, when the infrared lamp 110 illuminates a preset high-reflectivity object, and the brightness of the image containing the high-reflectivity object collected by the security device 200 is the target brightness, the overlapping area between the field of view angle of the infrared lamp 110 and the high-reflectivity object can be predetermined and stored, and this embodiment does not impose any restrictions on this.
[0115] Optionally, the fill light brightness is the current brightness of the infrared lamp 110 .
[0116] Optionally, in the application scenario of the security device 200, the reflectivity of the white wall 300 is relatively high, which can reach 70-80%, and the high reflectivity object can be a white wall 300 with a reflectivity of 80%. If it is difficult to identify the object in the exposure area, the white wall 300 with a higher reflectivity in the conventional application scenario can be used as a reference to adjust the overlap area, so as to effectively adjust the overexposure in the image.
[0117] In one feasible implementation, a first area in the first image that overlaps with the exposure area is determined, and object recognition is performed on the first area to determine the object type described by the object in the exposure area; the reflection coefficient of the object is determined based on a mapping relationship between a preset object type and a reflection coefficient; and a reference area is determined based on the reflection coefficient and the fill light brightness.
[0118] Optionally, the moving distance may be the shortest moving distance. Since the infrared lamp 110 can be rotated at multiple angles, there may be multiple moving distances when reducing the overlapping area to a preset standard area, thereby determining the shortest moving distance to reduce the movement of the infrared lamp 110.
[0119] In this embodiment, by determining the overlapping area between the field of view angle of the infrared lamp 110 and the overexposed area, and then accurately calculating the appropriate rotation angle of the infrared lamp 110 according to the overlapping area of the overlapping area, the field of view angle of the infrared lamp 110 can be adjusted, thereby effectively solving the problem of overexposure in the image captured by the security equipment 200, avoiding the conventional overexposed image processing, which involves reducing the fill light brightness, resulting in blurred captured images, and then increasing the fill light brightness. This repeated adjustment of the fill light brightness causes energy and equipment loss, thereby improving the quality of the captured images.
[0120] Step S40: According to the rotation angle, based on the driving component, the infrared lamp is driven to rotate and the light emitting direction is adjusted to avoid light from the camera device of the security equipment.
[0121] The rotation angle is converted into a corresponding pulse signal, and the pulse signal is sent to the driver 122 to control the movement of the driver 122, so that the driver 122 drives the infrared lamp 110 to rotate and adjust the light output direction to prevent the reflected light emitted by the infrared lamp 110 from entering the camera device 210 of the security equipment 200.
[0122] To assist in understanding the above technical solution, a scene diagram of a first embodiment of a specific fill light device control method is used as an auxiliary explanation below. Figure 5 , the dotted line is the field of view of the camera device 210 of the security device 200, and the dotted line is the field of view of the infrared light 110. Figure 5(a) is the initial field of view of the infrared lamp 110, which overlaps with the wall 300, so that the light emitted by the infrared lamp 110 will be reflected by the wall 300 and enter the camera device 210, resulting in overexposure of the image; and then the infrared lamp 110 is driven to rotate, referring to Figure 5 (b) The viewing angle of the infrared lamp 110 is changed to avoid light from the camera device 210 of the security equipment 200.
[0123] In this embodiment, the first image captured by the security device 200 is dynamically acquired, and when the first image needs fill light, the infrared lamp 110 is started, and the light emitted by the infrared lamp 110 is used to fill light for the shooting environment of the security device 200; then the second image captured by the security device 200 is acquired, and when the second image is overexposed, the overexposed area of the second image is determined, and the rotation angle of the driving member 122 is determined according to the overexposed area, and then according to the rotation angle, the infrared lamp 110 is controlled to rotate adaptively, so as to achieve flexible adjustment of the field of view of the infrared lamp 110, so as to eliminate the occurrence of image overexposure caused by the reflection of the light emitted by the infrared lamp 110 by the object, and achieve quality control of the image captured by the security device 200; avoid the conventional overexposed image processing, which reduces the fill light brightness, resulting in blurred shooting pictures, and then increases the fill light brightness, and this repeated adjustment of the fill light brightness causes energy and equipment loss; through the automatic and flexible adjustment of the field of view of the infrared lamp 110, the shooting needs of various scenes are further met, and the shooting picture quality is improved.
[0124] Further, based on the above first embodiment, a second embodiment of the method for controlling a fill light device of the present application is proposed. In this embodiment, before step S10 when the first image has a fill light requirement, the method includes:
[0125] Step S11, determining an image brightness value of the first image, and determining a first clarity of an image reference object in the first image, wherein the image reference object is a stationary object and / or a human face in the first image whose contour area is within a preset area range;
[0126] A brightness value of the first image (hereinafter referred to as the image brightness value for distinction) is determined, and a stationary object and / or a human face whose contour area in the first image is within a preset area range is used as an image reference object, thereby determining a clarity of the image reference object in the first image (hereinafter referred to as the first clarity for distinction).
[0127] Since there is a relationship between the distance of each object in the picture taken by the security device 200 and the fill light intensity and clarity, that is, as the fill light intensity increases, the image of distant objects is clear, while nearby objects are overexposed and the image is poor; therefore, the distance of each object can be determined by the size of each object in the first image, that is, the contour area, and then the shooting quality of the first image can be determined by using a static object at an appropriate distance as an image reference, and then it can be judged whether the infrared light 110 needs to be started.
[0128] Optionally, the image brightness value may be an average image brightness value of the first image.
[0129] In one feasible implementation, if a face is recognized in the first image, in order to capture the facial features more clearly, the face is used as an image reference; if no face is recognized in the first image, a stationary object in the first image whose contour area is within a preset area range is used as an image reference.
[0130] Step S12: when the image brightness value is less than a preset low brightness threshold, and / or the first definition is less than a preset low definition threshold, it is determined that the first image needs fill light.
[0131] When the image brightness value is less than a preset low brightness threshold, and / or the first clarity is less than a preset low clarity threshold, it indicates that the image quality captured by the security device 200 is poor and blurry, and it is determined that the first image requires fill light.
[0132] Optionally, the low brightness threshold and the low definition threshold may be set according to actual conditions, which is not limited in this embodiment.
[0133] In this embodiment, the first clarity of the image reference object in the first image is determined by determining the image brightness value of the first image, wherein the image reference object is a stationary object and / or a human face whose contour area is within a preset area range in the first image; and then when the image brightness value is less than a preset low brightness threshold, and / or the first clarity is less than a preset low clarity threshold, it is determined that the first image needs fill light. By analyzing the brightness and clarity of the image collected by the security device 200, the quality of the collected image is accurately determined, and then when the collected image appears too dark and / or blurred, it is determined that the first image needs fill light, so as to start the infrared light 110 for fill light.
[0134] In one feasible implementation, step S10, the step of starting the infrared lamp 110 includes:
[0135] Step S13, if a human face is recognized in the first image, determining a first brightness difference between the brightness of the human face and a preset target brightness, and determining a first fill light brightness for correcting the first brightness difference according to a mapping relationship between the preset brightness difference and the fill light brightness, so that the infrared lamp 110 performs fill light in response to the first fill light brightness;
[0136] The first image is analyzed to determine whether a human face can be recognized in the first image; if a human face is recognized in the first image, a first brightness difference between the face brightness and a preset target brightness is calculated, and then based on a mapping relationship between the preset brightness difference and the fill light brightness, the fill light brightness of the infrared lamp 110 required to correct the face brightness to the target brightness (hereinafter referred to as the first fill light brightness for distinction) is determined, and the infrared lamp 110 is made to perform fill light in response to the first fill light brightness.
[0137] Optionally, the target brightness may be set according to actual conditions, which is not limited in this embodiment.
[0138] In a feasible implementation, if multiple faces are recognized in the first image, the brightness difference between an average brightness of the multiple faces and a preset target brightness is determined.
[0139] Step S14, if no face is recognized in the first image, determine the second brightness difference between the average brightness of the first image and the preset target brightness, and determine the second fill light brightness that corrects the second brightness difference based on the mapping relationship between the preset brightness difference and the fill light brightness, so that the infrared lamp 110 performs fill light in response to the second fill light brightness.
[0140] The first image is analyzed to determine whether a human face can be recognized in the first image; if a human face is not recognized in the first image, a second brightness difference between the average brightness of the first image and a preset target brightness is determined; then, based on a mapping relationship between the preset brightness difference and the fill light brightness, a second fill light brightness required to correct the average brightness to the target brightness is determined, and the infrared lamp 110 performs fill light in response to the second fill light brightness.
[0141] In this embodiment, it is determined whether there is a face in the first image to determine whether the brightness of the face or the average brightness of the image is used as a reference for fill light. If a face is recognized in the first image, the fill light brightness is determined with reference to the brightness of the face to ensure that the brightness of the face in the monitoring field of view is appropriate. If no face is recognized in the first image, the fill light brightness is determined with reference to the average brightness of the image to ensure the overall quality of the monitoring image, thereby improving the image acquisition quality of the security device 200.
[0142] Further, based on the above-mentioned first and / or second embodiments, a third embodiment of the method for controlling a fill light device of the present application is proposed. In this embodiment, before the step of determining the overexposed area of the second image in step S20, the method further includes:
[0143] Step S21, determining an overexposure brightness difference between an overexposure brightness of an overexposed image and a preset target brightness, wherein the overexposed image is the overexposed second image;
[0144] The overexposed second image is used as the overexposed image, and then a brightness difference between the brightness of the overexposed image (hereinafter referred to as overexposed brightness for distinction) and a preset target brightness (hereinafter referred to as overexposed brightness difference for distinction) is determined.
[0145] Step S22, reducing the fill light brightness of the infrared lamp 110 according to the overexposure brightness difference, and acquiring a third image captured by the security device 200;
[0146] According to the overexposure brightness difference, the fill light brightness of the infrared lamp 110 is reduced; and after reducing the fill light brightness of the infrared lamp 110, an image captured by the security device 200 (hereinafter referred to as the third image for distinction) is obtained.
[0147] In a feasible implementation manner, the fill light brightness required to adjust the overexposure brightness to the target brightness is determined according to a mapping relationship between a preset brightness difference and the fill light brightness.
[0148] Step S23, determining whether a second definition of the image reference object in the third image is greater than or equal to a preset low definition threshold, wherein the image reference object is a stationary object and / or a human face in the first image whose contour area is within a preset area range;
[0149] After reducing the fill light brightness of the infrared lamp 110, determine whether the clarity of the reference object in the acquired third image (hereinafter referred to as the second clarity for distinction) is greater than or equal to a preset low clarity threshold, wherein the image reference object is a stationary object in the first image whose contour area is within a preset area range, and / or a human face.
[0150] Step S24: if not, restore the brightness of the infrared lamp 110 and execute the step of determining the overexposed area of the second image.
[0151] If not, it indicates that when the fill light brightness of the infrared lamp 110 is adjusted according to the overexposure brightness, insufficient fill light will be caused for the picture shot by the security device 200, and the overexposure phenomenon is not caused by excessive fill light brightness, but by some objects reflecting the light emitted by the infrared lamp 110 into the security device 200; then the fill light brightness of the infrared lamp 110 is restored to the brightness before the reduction, and the overexposure area of the second image and subsequent steps are determined.
[0152] In a feasible implementation manner, if it is indicated that the reason why the second image is overexposed is that the fill light brightness is too high, and by reducing the fill light brightness so that the image captured by the security device 200 is clear and the image quality is high, then the step of obtaining the second image captured by the security device 200 is executed.
[0153] In this embodiment, the overexposure brightness difference between the overexposure brightness of the overexposed image and the preset target brightness is determined, and then according to the overexposure brightness difference, the fill light brightness of the infrared lamp 110 is reduced, and the third image captured by the security device 200 is obtained, and then it is determined whether the second clarity of the image reference object in the third image is greater than or equal to the preset low clarity threshold; when the image captured by the security device 200 is overexposed after the fill light, the fill light brightness of the infrared lamp 110 is actively reduced to quickly determine the cause of the image overexposure; if the image captured by the security device 200 is blurred after the fill light brightness of the infrared lamp 110 is actively reduced, indicating that the cause of the overexposure is caused by the reflection of the infrared lamp 110 light by the object, the brightness of the infrared lamp 110 is restored, and the step of determining the overexposed area of the second image is performed, so as to achieve a quick and accurate judgment of the cause of the image overexposure.
[0154] In one feasible implementation, step S20, the step of determining the overexposed area of the second image includes:
[0155] Step S25, dividing the overexposed image into regions to obtain a plurality of first regions, wherein the overexposed image is the overexposed second image;
[0156] According to a preset area division rule, the overexposed second image (hereinafter referred to as the overexposed image for distinction) is area-divided into a plurality of areas to obtain a plurality of first areas.
[0157] In a feasible implementation manner, before executing step S25 to divide the overexposed image into regions to obtain a plurality of first regions, the following may be included:
[0158] The overexposed image is grayed to obtain a grayed image, the grayed image is binarized to obtain a binarized image, the binarized image is eroded and expanded to obtain an eroded and expanded image; the eroded and expanded image is used as the overexposed image, and step S25 is executed.
[0159] Step S26, obtaining a regional brightness difference between each first region and an adjacent region, and combining the first regions whose regional brightness difference is within a preset regional brightness range into a second region;
[0160] The regional brightness difference between each first region and an adjacent first region is obtained, wherein regions with overlapping regional boundaries are regarded as adjacent regions; and then first regions with regional brightness differences within a preset regional brightness range are combined into second regions.
[0161] Optionally, if the brightness difference between the regions is within the regional brightness range, it indicates that the brightness between the regions is similar; the regional brightness range can be set according to actual conditions, and this embodiment does not limit this.
[0162] Step S27: taking the second area with the highest brightness as the overexposed area.
[0163] The brightness of each of the second regions is determined, and the second region with the highest brightness is used as an overexposed region.
[0164] In one feasible implementation, the regional maximum brightness in each of the second areas is determined, and then the brightness difference between the regional maximum brightness, the second area within a preset regional brightness range, and the second area pointed to by the regional maximum brightness are used as the overexposed area.
[0165] In this embodiment, the overexposed image is divided into regions to obtain multiple first regions, and then the regional brightness difference between each first region and the adjacent region is obtained, and the first regions with the regional brightness difference within a preset regional brightness range are combined into second regions to achieve rapid identification of regions with similar brightness, and then the second region with the largest brightness is used as the overexposed region to quickly determine the overexposed region in the overexposed image, and then specifically solve the overexposure problem in the overexposed region, thereby improving the quality of the captured image of the security device 200.
[0166] Further, based on the above-mentioned first, second and / or third embodiments, a more complete embodiment of the control method of the fill light device of the present application is proposed. In this embodiment, referring to Figure 6 , the camera device 210 in the security equipment 200 is started to collect images, and then determine whether the first image collected by the camera device 210 needs fill light; if so, the infrared lamp 110 of the fill light device is started to determine whether the second image collected by the camera device 210 is overexposed; if so, the fill light brightness of the infrared lamp 110 of the fill light device is reduced to determine whether the image collected after reducing the fill light brightness is clear; if so, it indicates that the cause of the image overexposure is that the fill light brightness of the infrared lamp 110 is high and has been adjusted, then the adjustment is ended; if not, it indicates that the cause of the image overexposure is the reflection of the light emitted by the infrared lamp 110 of other objects, and then the fill light brightness of the infrared lamp 110 is restored, and the angle of the fill light device is rotated to adjust the field of view of the infrared lamp 110 in the fill light device.
[0167] Furthermore, the present application also provides a fill light device control device, referring to Figure 7 The fill light device control device is applied to electronic equipment, and the fill light device control device comprises:
[0168] The acquisition module 10 is used to dynamically acquire the first image captured by the security device 200, and start the infrared light 110 when there is a need for fill light in the first image;
[0169] The area determination module 20 is used to obtain the second image captured by the security device 200, and when the second image is overexposed, determine the overexposed area of the second image;
[0170] An angle determination module 30, used to determine the rotation angle of the driving member 122 according to the overexposed area;
[0171] The driving module 40 is used to drive the infrared lamp 110 to rotate and adjust the light emitting direction based on the driving member 122 according to the rotation angle, so as to avoid light from the camera device 210 of the security equipment 200.
[0172] The acquisition module 10 is also used to determine the image brightness value of the first image and the first clarity of an image reference object in the first image, wherein the image reference object is a stationary object in the first image whose contour area is within a preset area range, and / or a human face; when the image brightness value is less than a preset low brightness threshold, and / or the first clarity is less than a preset low clarity threshold, it is determined that the first image has a fill light requirement.
[0173] The acquisition module 10 is also used to determine a first brightness difference between the brightness of the face and a preset target brightness if a face is recognized in the first image, and determine a first fill light brightness that corrects the first brightness difference based on a mapping relationship between the preset brightness difference and the fill light brightness, so that the infrared lamp 110 performs fill light in response to the first fill light brightness; if no face is recognized in the first image, determine a second brightness difference between the average brightness of the first image and the preset target brightness, and determine a second fill light brightness that corrects the second brightness difference based on a mapping relationship between the preset brightness difference and the fill light brightness, so that the infrared lamp 110 performs fill light in response to the second fill light brightness.
[0174] The area determination module 20 is further used to determine the overexposure brightness difference between the overexposure brightness of the overexposed image and the preset target brightness, wherein the overexposed image is the overexposed second image; according to the overexposure brightness difference, reduce the fill light brightness of the infrared lamp 110, and obtain the third image captured by the security device 200; determine whether the second clarity of the image reference object in the third image is greater than or equal to a preset low clarity threshold, wherein the image reference object is a stationary object and / or a human face in the first image whose contour area is within a preset area range; if not, restore the brightness of the infrared lamp 110, and execute the step of determining the overexposed area of the second image.
[0175] The area determination module 20 is also used to divide the overexposed image into regions to obtain multiple first regions, wherein the overexposed image is the overexposed second image; obtain the regional brightness difference between each first region and the adjacent region, and combine the first regions whose regional brightness difference is within a preset regional brightness range into second regions; and use the second region with the largest brightness as the overexposed region.
[0176] The angle determination module 30 is further used to determine the overlap area between the field of view angle of the infrared lamp 110 and the overexposed area; and determine the rotation angle according to the overlap area of the overlap area.
[0177] The specific implementation of the fill light device control device of the present application is basically the same as the embodiments of the fill light device control method described above, and will not be repeated here.
[0178] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0179] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0180] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A fill light device, characterized in that: The fill light device comprises: Infrared light; A rotating assembly, the rotating assembly is arranged in the security equipment, the rotating assembly comprises a supporting member and a driving member, the infrared lamp is arranged on the supporting member, the driving member is rotatably connected with the supporting member, the driving member drives the supporting member to drive the infrared lamp to rotate, so as to adjust the light emitting direction of the infrared lamp; A printed circuit board is electrically connected to the infrared lamp and the driving component respectively.
2. A method for controlling a fill light device, characterized in that: The fill light device control method is applied to the fill light device as claimed in claim 1, and the method comprises: Dynamically acquire a first image captured by a security device, and when there is a need for fill light in the first image, activate an infrared light; Acquire a second image captured by the security device, and when the second image is overexposed, determine an overexposed area of the second image; Determining a rotation angle of a driving member according to the overexposed area; According to the rotation angle, the driving member drives the infrared lamp to rotate and adjust the light emitting direction to avoid light from the camera device of the security equipment.
3. The method for controlling a fill light device according to claim 2, wherein: Before the step of requiring fill light for the first image, the method includes: Determining an image brightness value of the first image, and determining a first clarity of an image reference object in the first image, wherein the image reference object is a stationary object and / or a human face in the first image whose contour area is within a preset area range; When the image brightness value is less than a preset low brightness threshold, and / or the first definition is less than a preset low definition threshold, it is determined that the first image has a fill light requirement.
4. The method for controlling a fill light device according to claim 2, wherein: The step of starting the infrared lamp comprises: If a human face is recognized in the first image, a first brightness difference between the brightness of the human face and a preset target brightness is determined, and a first fill light brightness for correcting the first brightness difference is determined according to a mapping relationship between the preset brightness difference and the fill light brightness, so that the infrared lamp performs fill light in response to the first fill light brightness; If no face is recognized in the first image, a second brightness difference between the average brightness of the first image and a preset target brightness is determined, and based on a mapping relationship between the preset brightness difference and the fill light brightness, a second fill light brightness that corrects the second brightness difference is determined so that the infrared light performs fill light in response to the second fill light brightness.
5. The method for controlling a fill light device according to claim 2, wherein: Before the step of determining the overexposed area of the second image, the method further includes: Determining an overexposure brightness difference between an overexposure brightness of an overexposed image and a preset target brightness, wherein the overexposed image is the overexposed second image; According to the overexposure brightness difference, reducing the fill light brightness of the infrared lamp, and acquiring a third image collected by the security device; Determining whether a second definition of an image reference object in the third image is greater than or equal to a preset low definition threshold, wherein the image reference object is a stationary object and / or a human face in the first image whose contour area is within a preset area range; If not, the brightness of the infrared lamp is restored, and the step of determining the overexposed area of the second image is performed.
6. The method for controlling a fill light device according to claim 2, wherein: The step of determining the overexposed area of the second image comprises: Dividing the overexposed image into regions to obtain a plurality of first regions, wherein the overexposed image is the overexposed second image; Acquire a regional brightness difference between each first region and an adjacent region, and combine first regions whose regional brightness differences are within a preset regional brightness range into second regions; The second area with the highest brightness is used as the overexposed area.
7. The method for controlling a fill light device according to claim 2, wherein: The step of determining the rotation angle of the driving member according to the overexposed area comprises: Determine an overlap area between the field of view angle of the infrared lamp and the overexposed area; The rotation angle is determined according to the overlapping area of the overlapping regions.
8. A fill light device control device, used to implement the steps of the fill light device control method according to any one of claims 2 to 7, characterized in that: The fill light device control device comprises: An acquisition module, used to dynamically acquire a first image captured by a security device, and start an infrared light when there is a need for fill light in the first image; an area determination module, configured to obtain a second image captured by the security device, and when the second image is overexposed, determine an overexposed area of the second image; An angle determination module, used to determine the rotation angle of the driving member according to the overexposed area; The driving module is used to drive the infrared lamp to rotate and adjust the light emitting direction based on the driving member according to the rotation angle to avoid light from the camera device of the security equipment.
9. An electronic device, characterized in that: The device comprises: a memory, a processor, and a fill light device control program stored in the memory and executable on the processor, wherein the fill light device control program is configured to implement the steps of the fill light device control method according to any one of claims 2 to 7.
10. A storage medium, characterized in that: The storage medium stores a fill light device control program, and when the fill light device control program is executed by the processor, the steps of the fill light device control method according to any one of claims 2 to 7 are implemented.