Camera Fill Light Adjustment Method, Device, Computer Equipment and Storage Medium

By detecting the overexposure area in the camera image and adjusting the DMD micromirror angle using the calibration relationship, the problem of uneven filling light of the camera is solved, and the uniform filling light effect is achieved and the image quality is improved.

CN115760997BActive Publication Date: 2025-07-11ZHEJIANG DAHUA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211347777.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-31
Publication Date
2025-07-11
Estimated Expiration
2042-10-31

AI Technical Summary

Technical Problem

Local overexposure is prone to occur when shooting in a low-light environment. The prior art cannot achieve uniform fill light by reducing the fill light source or adjusting the camera's brightness.

Method used

By detecting the overexposure area in the image captured by the camera, using the calibration relationship between the camera and the fill light system, the image coordinates of the overexposure area are converted into the coordinates of the fill light system, and the angle of the DMD micromirror is adjusted through encoding and regulation technology to control the angle of the incident light to achieve accurate fill light.

Benefits of technology

Effectively eliminates the overexposure area, achieves the camera's uniform light filling effect, and improves image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115760997B_ABST
    Figure CN115760997B_ABST
Patent Text Reader

Abstract

The present application relates to a method and apparatus for adjusting camera fill light, a computer device, a computer-readable storage medium, and a computer program product. By detecting whether there is an overexposed area in the original image captured by the camera; if so, extracting the image coordinates of the overexposed area from the original image; according to the calibration relationship between the camera and a preset fill light system, converting the image coordinates of the overexposed area into the coordinates of the fill light system; loading the coordinates of the fill light system into the DMD of the fill light system, and using coding control technology to adjust the angles of the micromirrors of the DMD of the fill light system to control the angles of the incident light in the overexposed area until the original image captured by the camera meets the exposure requirements. Using coding control technology to adjust the angles of the micromirrors of the DMD of the fill light system to control the angles of the incident light in the overexposed area, precisely regulating the fill light brightness in the overexposed area, thereby effectively eliminating the overexposed area and achieving the effect of uniform fill light for the camera.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technologies, and in particular, to a method and device for adjusting camera fill light, a computer device, and a computer-readable storage medium. Background Art

[0002] The monitoring effect of a camera is closely related to factors such as light and environmental brightness. When the environmental brightness is insufficient, additional fill light sources are usually required to fill light for the camera. However, due to reasons such as the light angle and environmental factors, the images captured by the camera are prone to local overexposure.

[0003] In the prior art, once overexposure occurs, the brightness of the fill light source or the brightness parameter of the camera is reduced. However, such an adjustment is based on the entire image captured by the camera, and the image captured by the camera still shows an uneven fill light effect, that is, there is a problem of uneven camera fill light in the prior art. Summary of the Invention

[0004] Based on this, in view of the above technical problems, it is necessary to provide a method and device for adjusting camera fill light, a computer device, a computer-readable storage medium, and a computer program product to solve the problem of uneven camera fill light in related technologies.

[0005] In a first aspect, an embodiment of the present application provides a method for adjusting camera fill light, and the method includes the following steps:

[0006] Detect whether there is an overexposed area in the original image captured by the camera;

[0007] If so, extract the image coordinates of the overexposed area from the original image;

[0008] According to the calibration relationship between the camera and a preset fill light system, convert the image coordinates of the overexposed area into the coordinates of the fill light system;

[0009] Load the coordinates of the fill light system onto the DMD of the fill light system, and use encoding modulation technology to adjust the angles of the micromirrors of the DMD of the fill light system to control the angles of the incident light in the overexposed area until the original image captured by the camera meets the exposure requirements.

[0010] In some of these embodiments, the extracting the image coordinates of the overexposed area from the original image includes the following steps:

[0011] Convert the original image captured by the camera into a first grayscale image;

[0012] Perform a local maximum operation on the first grayscale image to obtain a local maximum image, determine the location of the overexposed area as the white area in the local maximum image, and determine the image coordinates of the overexposed area.

[0013] In some embodiments, the extracting the image coordinates of the overexposed area from the original image includes the following steps:

[0014] Convert the original image captured by the camera into a first grayscale image, and perform image processing on the first grayscale image to obtain a second grayscale image; wherein, the image processing process includes edge extraction, region segmentation, and morphological reconstruction;

[0015] Perform a local maximum operation on the second grayscale image to obtain a local maximum image, determine the location of the overexposed area as the white area in the local maximum image, and determine the image coordinates of the overexposed area.

[0016] In some embodiments, the adjusting the angles of the micromirrors of the DMD of the fill light system by using coding regulation technology includes the following steps:

[0017] Mark the coding regulation value of the coordinates of the fill light system corresponding to the image coordinates of the overexposed area as 0, and mark the coding regulation value of the coordinates of the fill light system corresponding to the image coordinates of the area other than the overexposed area as 1 to obtain a coding matrix;

[0018] Adjust the angles of the micromirrors corresponding to the coding regulation value of 0 to the off state according to the coding matrix; wherein, the fill light system includes a fill light source, a converging lens, a DMD, and a projection lens; wherein the converging lens is used to converge the outgoing light of the fill light source onto the DMD; the initial coding regulation value of all the micromirrors on the DMD is 1, and the corresponding initial state is the on state; the optical axis of the projection lens is parallel to the direction of reflecting the light of the fill light source when the DMD is in the on state, and the light energy reflected by the DMD from the fill light source can pass through the projection lens and be projected onto the object to be photographed.

[0019] In some embodiments, after adjusting the angles of the micromirrors of the DMD of the fill light system by using coding regulation technology to control the angle of the incident light in the overexposed area, the method further includes:

[0020] Adjust the fill light intensity of the fill light source of the fill light system to attenuate the fill light intensity of the fill light source by a preset percentage.

[0021] In some embodiments, the detecting whether there is an overexposed area in the original image captured by the camera includes the following steps:

[0022] Convert the original image captured by the camera into a first grayscale image;

[0023] Detect whether there are pixel points in the first grayscale image whose grayscale values exceed a set threshold;

[0024] If so, it is determined that there is an overexposed area in the original image captured by the camera.

[0025] In a second aspect, an embodiment of the present application provides a camera fill light adjustment device, which includes a detection module, an extraction module, a conversion module, and an adjustment module;

[0026] The detection module is used to detect whether there is an overexposed area in the original image captured by the camera;

[0027] The extraction module is used to, if so, extract the image coordinates of the overexposed area from the original image;

[0028] The conversion module is used to convert the image coordinates of the overexposed area into the coordinates of the fill light system according to the calibration relationship between the camera and a preset fill light system;

[0029] The adjustment module is used to load the coordinates of the fill light system onto the DMD of the fill light system, and use coding control technology to adjust the angles of the micromirrors of the DMD of the fill light system to control the angles of the incident light in the overexposed area until the original image captured by the camera meets the exposure requirements.

[0030] In a third aspect, a computer device is provided in this embodiment, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the steps of the method described in the first aspect above are implemented.

[0031] In a fourth aspect, a computer-readable storage medium is provided in this embodiment, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described in the first aspect above are implemented.

[0032] In a fifth aspect, the present application also provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect above are implemented.

[0033] The above camera fill light adjustment method, device, computer device, computer-readable storage medium, and computer program product detect whether there is an overexposed area in the original image captured by the camera; if so, extract the image coordinates of the overexposed area from the original image; according to the calibration relationship between the camera and the preset fill light system, convert the image coordinates of the overexposed area into the coordinates of the fill light system; load the coordinates of the fill light system into the DMD of the fill light system, and use coding control technology to adjust the angles of the micromirrors of the DMD of the fill light system to control the angles of the incident light in the overexposed area until the original image captured by the camera meets the exposure requirements. This application uses the calibration relationship between the camera and the preset fill light system to convert the image coordinates of the overexposed area into the coordinates of the fill light system and load them into the DMD of the fill light system, and uses coding control technology to adjust the angles of the micromirrors of the DMD of the fill light system to control the angles of the incident light in the overexposed area, precisely regulating the fill light brightness in the overexposed area, thereby effectively eliminating the overexposed area and achieving the effect of uniform fill light for the camera. Description of the Drawings

[0034] The drawings described herein are used to provide a further understanding of the present application, form a part of the present application, and the illustrative embodiments and descriptions thereof are used to explain the present application, without unduly limiting the present application. In the drawings:

[0035] Figure 1 is the flowchart of the camera fill light adjustment method provided by the embodiment of the present application Figure 1 ;

[0036] Figure 2a is a schematic diagram of the state relationship between light and micromirrors in the camera fill light adjustment method provided by the embodiment of the present application Figure 1 ;

[0037] Figure 2b is the second schematic diagram of the state relationship between light and micromirrors in the camera fill light adjustment method provided by the embodiment of the present application;

[0038] Figure 2c is a schematic diagram of the state relationship between light and micromirrors in the camera fill light adjustment method provided by the embodiment of the present application Figure 3 ;

[0039] Figure 3 is a schematic diagram of the first grayscale image converted from the original image captured by the camera in the camera fill light adjustment method provided by the embodiment of the present application;

[0040] Figure 4 is a schematic diagram of the local maximum image obtained by performing a local maximum operation on the first grayscale image in the camera fill light adjustment method provided by the embodiment of the present application;

[0041] Figure 5It is a schematic diagram of the structural relationship among the supplementary lighting system, the object to be photographed, and the camera in the camera supplementary lighting adjustment method provided by an embodiment of the present application;

[0042] Figure 6 It is a schematic diagram of the structural relationship between the projection lens and the DMD in the camera supplementary lighting adjustment method provided by an embodiment of the present application;

[0043] Figure 7 It is the second flowchart of the camera supplementary lighting adjustment method provided by an embodiment of the present application;

[0044] Figure 8 It is a schematic diagram of the structure of the camera supplementary lighting adjustment device provided by an embodiment of the present application;

[0045] Figure 9 It is a schematic diagram of the structure of the computer device provided by an embodiment of the present application. Detailed implementation manners

[0046] In order to make the purpose, technical solutions and advantages of the present application clearer and more understandable, the present application will be described and explained below with reference to the accompanying drawings and embodiments. 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. Based on the embodiments provided by the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.

[0047] Obviously, the accompanying drawings in the following description are only some examples or embodiments of the present application. For those of ordinary skill in the art, the present application can also be applied to other similar scenarios based on these drawings without creative efforts. In addition, it can also be understood that although the efforts made in this development process may be complex and lengthy, for those of ordinary skill in the art related to the content disclosed in the present application, some designs, manufacturing or production changes made based on the technical content disclosed in the present application are only conventional technical means and should not be understood as the content disclosed in the present application being insufficient.

[0048] In the present application, referring to "embodiment" means that the specific features, structures or characteristics described in combination with the embodiment can be included in at least one embodiment of the present application. The appearance of this phrase in various positions in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those of ordinary skill in the art explicitly and implicitly understand that the embodiments described in the present application can be combined with other embodiments without conflict.

[0049] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the ordinary meanings understood by those with ordinary skills in the technical field to which this application belongs. The words such as "a", "an", "one kind", "the" and the like involved in this application do not indicate a quantity limitation and may represent a singular or plural number. The terms "include", "comprise", "have" and any variations thereof involved in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may further include steps or units not listed, or may further include other steps or units inherent to these processes, methods, products or devices. The similar words such as "connect", "be connected", "couple" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "plurality" involved in this application means two or more. "And / or" describes the association relationship of associated objects and indicates that three relationships may exist. For example, "A and / or B" may represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the front and rear associated objects. The terms "first", "second", "third" and the like involved in this application are only used to distinguish similar objects and do not represent a specific order for the objects.

[0050] This embodiment provides a method for adjusting camera fill light, as Figure 1 shown, the method includes the following steps:

[0051] Step S110, detecting whether there is an overexposed area in the original image captured by the camera.

[0052] Whether the fill light effect of the camera is good can be seen from the image effect of the original image captured by the camera. If the camera fill light is uneven, there will be a phenomenon of local overexposure. Specifically, the brightness histogram of the original image captured by the camera can be obtained, and based on the brightness histogram, it can be determined whether there is an overexposed area in the original image captured by the camera. The original image captured by the camera can also be enlarged to the original size, and by judging whether there are areas where details are lost or cannot be displayed, it can be determined whether there is an overexposed area in the original image captured by the camera. As one of the preferred embodiments, the original image captured by the camera can be converted into a grayscale image, and it is detected whether there are pixel points in the grayscale image whose gray values exceed the set threshold; if so, it is determined that there is an overexposed area in the original image captured by the camera.

[0053] Step S120, if so, extracting the image coordinates of the overexposed area from the original image.

[0054] After determining that there is an overexposed area in the original image captured by the camera, the image coordinates of the overexposed area can be extracted from the original image based on existing image processing algorithms. Specifically, the overexposed area can be marked, and the existing image processing algorithms are used to output the image coordinates of the overexposed area.

[0055] Step S130: According to the calibration relationship between the camera and the preset fill light system, convert the image coordinates of the overexposed area into the coordinates of the fill light system.

[0056] The preset fill light system is used to fill light for the camera. Among them, the preset fill light system at least includes a fill light source and a DMD (Digital Micromirror Devices). The surface of the DMD is covered with tiny rotatable micromirrors. Each micromirror on the DMD has an open state, a closed state, and a flat state. In different states, the angles of the micromirrors are different. By adjusting the angles of the micromirrors on the DMD, it is possible to select whether to reflect the outgoing light of the fill light source onto the object to be photographed through the micromirrors, so as to select whether to fill light for the camera. Specifically, before implementing the camera fill light adjustment method of the present application, the calibration relationship between the camera and the preset fill light system can be obtained according to the existing structured light system calibration method. According to the calibration relationship between the camera and the preset fill light system, the image coordinates of the overexposed area can be converted into the coordinates of the fill light system.

[0057] Step S140: Load the coordinates of the fill light system onto the DMD of the fill light system, and use the encoding control technology to adjust the angles of the micromirrors of the DMD of the fill light system to control the angle of the incident light in the overexposed area until the original image captured by the camera meets the exposure requirements.

[0058] In the present application, a preset encoding control value can be assigned to each micromirror on the DMD. Different encoding control values correspond to different states of the micromirrors, that is, the encoding control technology is used to control the angles of each micromirror on the DMD. As Figures 2a to 2c shown, Figures 2a to 2c FIG. is a diagram showing the state relationship between the light and the micromirror. Assuming that the encoding control value is 1, the micromirror is in the open state; when the encoding control value is 0, the micromirror is in the closed state. As Figure 2a shown, when the DMD is just started and no encoding control is performed on the DMD, the micromirror is in the flat state. After the incident light is reflected by the micromirror, the direction of the reflected light is the direction of the flat state reflected light. As Figure 3 shown, when the encoding control value is 1, the micromirror is in the open state and the micromirror rotates -θ degrees. After the incident light is reflected by the micromirror, the direction of the reflected light is the direction of the open state reflected light. As Figure 4As shown, when the encoding control value is 0, the micromirror is in the off state. The micromirror rotates by θ degrees. After the incident light is reflected by the micromirror, the direction of the reflected light is the direction of the reflected light in the off state.

[0059] In this application, the DMD is a component of the fill light system. There is a mutual mapping relationship between the micromirrors on the DMD and the coordinates of the fill light system. The coordinates of the fill light system and the image coordinates of the overexposed area are in one-to-one correspondence. Therefore, after loading the coordinates of the fill light system to the DMD of the fill light system, the target micromirror that reflects the emitted light of the fill light source to the overexposed area can be determined. The angle of the micromirrors of the DMD of the fill light system is adjusted using the encoding control technology, specifically, the angle of the target micromirror that reflects the emitted light of the fill light source to the overexposed area can be adjusted, thereby controlling the angle of the incident light in the overexposed area and achieving the regulation of the fill light brightness in the overexposed area until the original image captured by the camera meets the exposure requirements.

[0060] In the prior art, once the phenomenon of overexposure occurs, the brightness of the fill light source or the brightness parameter of the camera is reduced. However, such adjustment is based on the entire image captured by the camera, and the image captured by the camera still shows an uneven fill light effect, that is, there is a problem of uneven fill light of the camera in the prior art.

[0061] To solve the above problems, this application proposes a method for adjusting the fill light of a camera, which includes detecting whether there is an overexposed area in the original image captured by the camera; if so, extracting the image coordinates of the overexposed area from the original image; according to the calibration relationship between the camera and the preset fill light system, converting the image coordinates of the overexposed area into the coordinates of the fill light system; loading the coordinates of the fill light system to the DMD of the fill light system, and using the encoding control technology to adjust the angle of the micromirrors of the DMD of the fill light system to control the angle of the incident light in the overexposed area until the original image captured by the camera meets the exposure requirements. This application uses the calibration relationship between the camera and the preset fill light system to convert the image coordinates of the overexposed area into the coordinates of the fill light system and load them to the DMD of the fill light system, and uses the encoding control technology to adjust the angle of the micromirrors of the DMD of the fill light system to control the angle of the incident light in the overexposed area, and precisely regulates the fill light brightness in the overexposed area, thereby effectively eliminating the overexposed area and achieving the effect of uniform fill light of the camera.

[0062] In one embodiment, the above step S210 of extracting the image coordinates of the overexposed area from the original image includes the following steps:

[0063] Convert the original image captured by the camera into a first grayscale image;

[0064] Perform a local maximum operation on the first grayscale image to obtain a local maximum image, determine the location of the overexposed area as the white area in the local maximum image, and determine the image coordinates of the overexposed area.

[0065] Specifically, after converting the original image captured by the camera into the first grayscale image, each pixel has a grayscale value. Since the higher the grayscale value, the brighter the pixel. Taking the Figure 3 first grayscale image in it as an example, a local maximum image is obtained by performing a local maximum operation on the first grayscale image as shown in Figure 4 . After the local maximum operation, only white areas and black areas exist on the image. Among them, the white area in the local maximum image is the brightest area in the first grayscale image, and thus it can be determined as the location of the overexposed area. The image coordinates of the white area in the local maximum image are the image coordinates of the overexposed area.

[0066] Furthermore, in one embodiment, the above step S210 of extracting the image coordinates of the overexposed area from the original image includes the following steps:

[0067] Convert the original image captured by the camera into the first grayscale image, and perform image processing on the first grayscale image to obtain a second grayscale image; wherein, the image processing process includes edge extraction, region segmentation, and morphological reconstruction;

[0068] Perform a local maximum operation on the second grayscale image to obtain a local maximum image, determine the location of the overexposed area as the white area in the local maximum image, and determine the image coordinates of the overexposed area.

[0069] Compared with the previous embodiment, the difference in this embodiment is that image processing is performed on the first grayscale image to obtain a second grayscale image, wherein the image processing process includes edge extraction, region segmentation, and morphological reconstruction. Specifically, through edge extraction, region segmentation, and morphological reconstruction of the first grayscale image, the background and the edge contours of the image details in the processed image are more distinguishable, which is more convenient for performing a local maximum operation on the image. Among them, the gradient modulus value of the image after edge extraction of the first grayscale image can be used to perform region segmentation using the watershed algorithm, or the method of combining neural networks can be used to perform region segmentation on the image after edge extraction of the first grayscale image. In addition, morphological opening operations can also be included in the image processing process to effectively filter out the interference information of the image.

[0070] As one implementation manner, after the above step S140 uses the encoding and regulation technology to adjust the angle of the micromirrors of the DMD of the fill light system to control the angle of the incident light in the overexposed area, the camera fill light adjustment method provided by this application further includes the following steps:

[0071] Adjust the fill light intensity of the fill light source of the fill light system so that the fill light intensity of the fill light source decays by a preset percentage.

[0072] Specifically, since the white area in the local maximum image after the local maximum operation may only be the brightest area of the overexposed area, using encoding control technology to adjust the angle of the micromirrors of the DMD of the fill light system to control the angle of the incident light in the overexposed area may not be sufficient to completely eliminate the overexposed area. Therefore, at this time, fine adjustment of the fill light intensity of the fill light source can be combined to ensure that the overexposed area is effectively eliminated. Specifically, the fill light intensity of the fill light source can be attenuated by PWM adjustment of the fill light source. Among them, the preset percentage can be set according to actual needs or empirical values, for example, it can be 5%.

[0073] In one embodiment, the above step S140 uses encoding control technology to adjust the angle of the micromirrors of the DMD of the fill light system to control the angle of the incident light in the overexposed area, including the following steps:

[0074] Mark the encoding control value of the coordinates of the fill light system corresponding to the image coordinates of the overexposed area as 0, and mark the encoding control value of the coordinates of the fill light system corresponding to the image coordinates of the area other than the overexposed area as 1 to obtain an encoding matrix;

[0075] Adjust the angle of the micromirrors corresponding to the encoding control value of 0 to the closed state according to the encoding matrix; among them, the fill light system includes a fill light source, a converging lens, a DMD, and a projection lens; the converging lens is used to converge the outgoing light of the fill light source onto the DMD; the initial encoding control value of all the micromirrors on the DMD is 1, and the corresponding initial state is the open state; the optical axis of the projection lens is parallel to the direction of reflecting the light of the fill light source when the DMD is in the open state, and the light energy reflected by the DMD from the fill light source can pass through the projection lens and be projected onto the object to be photographed.

[0076] Specifically, the structural relationship between the fill light system of the present application, the object to be photographed, and the camera is as Figure 5 shown. The fill light system includes a fill light source 301, a converging lens 302, a DMD 303, and a projection lens 304; the converging lens 302 is used to converge the outgoing light of the fill light source 301 onto the DMD 303; the initial encoding control value of all the micromirrors on the DMD 303 is 1, and the corresponding initial state is the open state; the optical axis of the projection lens 304 is parallel to the direction of reflecting the light of the fill light source when the DMD 303 is in the open state, and the light energy reflected by the DMD 303 from the fill light source 301 can pass through the projection lens and be projected onto the object to be photographed 305. The camera 306 is used to photograph the object to be photographed 305. In this embodiment, the structural relationship between the projection lens and the DMD can be referred to Figure 6Among them, the fill light system is not limited to the one provided in this embodiment. Any system that can use encoding and regulation technology to adjust the angles of the micromirrors of the DMD in the fill light system to control the angles of the incident light in the overexposed area is within the protection scope of this application. For example, other lenses can be set in the fill light system, or the number of converging lenses 302 or projection lenses 304 can be more than one.

[0077] Since there is a mutual mapping relationship between the micromirrors on the DMD 303 and the coordinates of the fill light system, and the coordinates of the fill light system and the image coordinates of the overexposed area are in one-to-one correspondence, after loading the coordinates of the fill light system to the DMD 303 of the fill light system, the target micromirrors that can reflect the outgoing light of the fill light source 301 to the overexposed area can be determined. In addition, if the encoding matrix corresponding to the coordinates of the fill light system has been determined, then according to the mutual mapping relationship between the micromirrors on the DMD 303 and the coordinates of the fill light system, the encoding matrix of the DMD 303 can be correspondingly determined. In this embodiment, all the micromirrors on the DMD 303 are initially in the open state, and the optical axis of the projection lens 304 is parallel to the direction in which the light of the fill light source 301 is reflected when the DMD 303 is in the open state. Therefore, before the DMD 303 is adjusted using encoding and regulation technology, all the micromirrors on the DMD 303 can reflect the outgoing light of the fill light source 301 onto the object to be photographed 305. After adjusting the angles of the micromirrors corresponding to the encoding regulation value of 0 to the closed state according to the specific encoding matrix, that is, after adjusting the angles of the target micromirrors to the closed state, the outgoing light of the fill light source 301 will not be reflected to the overexposed area through the target micromirrors, thereby effectively eliminating the overexposed area and achieving the effect of uniform fill light for the camera.

[0078] However, in an actual scenario, it is possible that the light scattered onto the exposure area after the micromirrors around the target micromirrors reflect the outgoing light of the fill light source 301 affects the fill light effect in the exposure area (the exposure area is still overexposed). Therefore, after adjusting the angles of the micromirrors of the DMD 303 in the fill light system using encoding and regulation technology, it is possible to determine again whether there is an overexposed area in the original image captured by the camera. If there is still an overexposed area in the original image captured by the camera, continue to use the camera fill light adjustment method provided in this application to adjust the angles of the micromirrors of the DMD 303 in the fill light system to control the angles of the incident light in the overexposed area until the original image captured by the camera meets the exposure requirements.

[0079] As Figure 7 shown, this embodiment also provides a camera fill light adjustment method, which includes the following steps:

[0080] Step S410: Convert the original image captured by the camera into a first grayscale image, and detect whether there is an overexposed area in the first grayscale image whose grayscale value exceeds a set threshold. If so, execute step S420.

[0081] Step S420: Extract the image coordinates of the overexposed area.

[0082] Step S430: According to the calibration relationship between the camera and the preset fill light system, convert the image coordinates of the overexposed area into the coordinates of the fill light system, and load the coordinates of the fill light system onto the DMD of the fill light system.

[0083] Step S440: Mark the encoding control value of the coordinates of the fill light system corresponding to the image coordinates of the overexposed area as 0, and mark the encoding control value of the coordinates of the fill light system corresponding to the image coordinates of the area other than the overexposed area as 1 to obtain an encoding matrix.

[0084] Step S450: Adjust the angle of the micromirrors corresponding to the encoding control value of 0 to the closed state according to the encoding matrix; wherein, the fill light system includes a fill light source, a converging lens, a DMD, and a projection lens; the converging lens is used to converge the outgoing light of the fill light source onto the DMD; the initial encoding control value of all the micromirrors on the DMD is 1, and the corresponding initial state is the open state; the optical axis of the projection lens is parallel to the direction of reflecting the light of the fill light source when the DMD is in the open state, and the light energy reflected by the DMD from the fill light source can pass through the projection lens and be projected onto the object to be photographed.

[0085] Step S460: Adjust the fill light intensity of the fill light source of the fill light system so that the fill light intensity of the fill light source decays by a preset percentage.

[0086] Figure 8 It is a schematic diagram of the camera fill light adjustment device 50 according to an embodiment of the present invention, as Figure 8 shown, the camera fill light adjustment device 50 includes a detection module 51, an extraction module 52, a conversion module 53, and an adjustment module 54;

[0087] The detection module 51 is configured to detect whether there is an overexposed area in the original image captured by the camera;

[0088] The extraction module 52 is configured to, if so, extract the image coordinates of the overexposed area from the original image;

[0089] The conversion module 53 is configured to convert the image coordinates of the overexposed area into the coordinates of the fill light system according to the calibration relationship between the camera and the preset fill light system;

[0090] The adjustment module 54 is configured to load the coordinates of the fill light system onto the DMD of the fill light system, and use encoding control technology to adjust the angle of the micromirrors of the DMD of the fill light system to control the angle of the incident light in the overexposed area until the original image captured by the camera meets the exposure requirements.

[0091] The above camera fill light adjustment device 50 detects whether there is an overexposed area in the original image captured by the camera; if so, extracts the image coordinates of the overexposed area from the original image; according to the calibration relationship between the camera and the preset fill light system, converts the image coordinates of the overexposed area into the coordinates of the fill light system; loads the coordinates of the fill light system to the DMD of the fill light system, and uses the coding control technology to adjust the angles of the micromirrors of the DMD of the fill light system to control the angles of the incident light in the overexposed area until the original image captured by the camera meets the exposure requirements. This application uses the calibration relationship between the camera and the preset fill light system to convert the image coordinates of the overexposed area into the coordinates of the fill light system and load them to the DMD of the fill light system, and uses the coding control technology to adjust the angles of the micromirrors of the DMD of the fill light system to control the angles of the incident light in the overexposed area, precisely regulating the fill light brightness in the overexposed area, thereby effectively eliminating the overexposed area and achieving the effect of uniform fill light for the camera.

[0092] In one embodiment, the extraction module 52 is further configured to convert the original image captured by the camera into a first grayscale image; perform a local maximum operation on the first grayscale image to obtain a local maximum image, determine the position of the overexposed area as the white area in the local maximum image, and determine the image coordinates of the overexposed area.

[0093] In one embodiment, the extraction module 52 is further configured to convert the original image captured by the camera into a first grayscale image, and perform image processing on the first grayscale image to obtain a second grayscale image; wherein, the image processing process includes edge extraction, region segmentation, and morphological reconstruction; perform a local maximum operation on the second grayscale image to obtain a local maximum image, determine the position of the overexposed area as the white area in the local maximum image, and determine the image coordinates of the overexposed area.

[0094] In one embodiment, the adjustment module 54 is further configured to mark the coding control value of the coordinates of the fill light system corresponding to the image coordinates of the overexposed area as 0, mark the coding control value of the coordinates of the fill light system corresponding to the image coordinates of the area other than the overexposed area as 1, to obtain a coding matrix; adjust the angles of the micromirrors corresponding to the coding control value of 0 to the closed state according to the coding matrix; wherein, the fill light system includes a fill light source, a converging lens, a DMD, and a projection lens; wherein the converging lens is used to converge the emitted light of the fill light source onto the DMD; the initial coding control value of all the micromirrors on the DMD is 1, and the corresponding initial state is the open state; the optical axis of the projection lens is parallel to the direction of the reflected light of the fill light source when the DMD is in the open state, and the light energy reflected by the DMD from the fill light source can pass through the projection lens and be projected onto the object to be photographed.

[0095] In one embodiment, the camera fill light adjustment device 50 further includes an attenuation module, which is configured to adjust the fill light intensity of the fill light source of the fill light system after using the encoding control technology to adjust the angle of the micromirrors of the DMD of the fill light system to control the angle of the incident light in the overexposed area, so that the fill light intensity of the fill light source decays by a preset percentage.

[0096] In one embodiment, the detection module 51 is further configured to convert the original image captured by the camera into a first grayscale image; detect whether there are pixel points with grayscale values exceeding a set threshold in the first grayscale image; if so, it is determined that there is an overexposed area in the original image captured by the camera.

[0097] It should be noted that the above-mentioned modules can be functional modules or program modules, and can be implemented either by software or by hardware. The above-mentioned modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to the above-mentioned modules.

[0098] In one embodiment, a computer device is provided. The computer device can be a server, and its internal structure diagram can be as Figure 9 shown. The computer device includes a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store a preset configuration information set. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements the camera fill light adjustment method.

[0099] In one embodiment, a computer device is provided, and the computer device may be a terminal. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. The computer program, when executed by the processor, implements a method for adjusting camera fill light. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or may be a button, a trackball, or a touchpad provided on the computer device housing, or may also be an external keyboard, touchpad, or mouse, etc.

[0100] Those skilled in the art can understand that Figure 9 the structure shown is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0101] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0102] Detect whether there is an overexposed area in the original image captured by the camera;

[0103] If there is, extract the image coordinates of the overexposed area from the original image;

[0104] According to the calibration relationship between the camera and the preset fill light system, convert the image coordinates of the overexposed area into the coordinates of the fill light system;

[0105] Load the coordinates of the fill light system to the DMD of the fill light system, and use encoding control technology to adjust the angles of the micromirrors of the DMD of the fill light system to control the angles of the incident light in the overexposed area until the original image captured by the camera meets the exposure requirements.

[0106] In one embodiment, when the processor executes the computer program, the following steps are also implemented:

[0107] Convert the original image captured by the camera into a first grayscale image;

[0108] Perform a local maximum operation on the first grayscale image to obtain a local maximum image, determine the location of the overexposed area as the white area in the local maximum image, and determine the image coordinates of the overexposed area.

[0109] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0110] Convert the original image captured by the camera into a first grayscale image, and perform image processing on the first grayscale image to obtain a second grayscale image; wherein, the image processing process includes edge extraction, region segmentation, and morphological reconstruction;

[0111] Perform a local maximum operation on the second grayscale image to obtain a local maximum image, determine the location of the overexposed area as the white area in the local maximum image, and determine the image coordinates of the overexposed area.

[0112] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0113] Mark the encoded control value of the coordinates of the fill light system corresponding to the image coordinates of the overexposed area as 0, and mark the encoded control value of the coordinates of the fill light system corresponding to the image coordinates of the area other than the overexposed area as 1 to obtain an encoding matrix;

[0114] Adjust the angle of the micromirrors corresponding to the encoded control value of 0 to the off state according to the encoding matrix; wherein, the fill light system includes a fill light source, a converging lens, a DMD, and a projection lens; wherein the converging lens is used to converge the emitted light of the fill light source onto the DMD; the initial encoded control value of all the micromirrors on the DMD is 1, and the corresponding initial state is the on state; the optical axis of the projection lens is parallel to the direction in which the DMD reflects the light of the fill light source when it is in the on state, and the light energy reflected by the DMD from the fill light source can pass through the projection lens and be projected onto the object to be photographed.

[0115] In one embodiment, after using the encoded control technology to adjust the angle of the micromirrors of the DMD of the fill light system to control the angle of the incident light in the overexposed area, when the device executes the computer program, the following steps are further implemented:

[0116] Adjust the fill light intensity of the fill light source of the fill light system so that the fill light intensity of the fill light source decays by a preset percentage.

[0117] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0118] Convert the original image captured by the camera into a first grayscale image;

[0119] Detect whether there are pixel points in the first grayscale image whose gray values exceed the set threshold;

[0120] If it exists, it is determined that there is an overexposed area in the original image captured by the camera.

[0121] The above storage medium detects whether there is an overexposed area in the original image captured by the camera; if it exists, extracts the image coordinates of the overexposed area from the original image; according to the calibration relationship between the camera and the preset fill light system, converts the image coordinates of the overexposed area into the coordinates of the fill light system; loads the coordinates of the fill light system to the DMD of the fill light system, and uses the encoding control technology to adjust the angles of the micromirrors of the DMD of the fill light system to control the angles of the incident light in the overexposed area until the original image captured by the camera meets the exposure requirements. This application uses the calibration relationship between the camera and the preset fill light system to convert the image coordinates of the overexposed area into the coordinates of the fill light system and load them to the DMD of the fill light system, and uses the encoding control technology to adjust the angles of the micromirrors of the DMD of the fill light system to control the angles of the incident light in the overexposed area, and precisely regulates the fill light brightness in the overexposed area, so as to effectively eliminate the overexposed area and achieve the effect of uniform fill light for the camera.

[0122] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0123] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0124] It should be understood that the specific embodiments described here are only used to explain this application, rather than to limit it. According to the embodiments provided in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the protection scope of this application.

[0125] Obviously, the accompanying drawings are only some examples or embodiments of this application. For those of ordinary skill in the art, this application can also be applied to other similar situations based on these drawings without creative efforts. In addition, it can be understood that although the work done during the development process here may be complex and time-consuming, for those of ordinary skill in the art, some design, manufacturing, or production changes made according to the technical content disclosed in this application are only conventional technical means and should not be regarded as insufficient disclosure of this application.

[0126] As used herein, the term "embodiment" means that the specific features, structures or characteristics described in connection with the embodiments may be included in at least one embodiment of the present application. The phrase appears in various positions in the specification and does not necessarily mean the same embodiment, nor does it mean independence or alternative to other embodiments and mutual exclusion. Those of ordinary skill in the art can clearly or implicitly understand that the embodiments described in the present application can be combined with other embodiments without conflict.

[0127] The above embodiments merely represent several implementation manners of the present application, and the description thereof is relatively specific and detailed, but it should not be construed as a limitation on the scope of patent protection. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims

1. A method for adjusting supplementary light of a camera, characterized in that The method includes the following steps: Detect whether there is an overexposed area in the original image captured by the camera; If it exists, extract the image coordinates of the overexposed area from the original image; According to the calibration relationship between the camera and the preset fill light system, convert the image coordinates of the overexposed area into the coordinates of the fill light system; Load the coordinates of the fill light system onto the DMD of the fill light system, and use encoding control technology to adjust the angles of the micromirrors of the DMD of the fill light system to control the angle of the incident light in the overexposed area until the original image captured by the camera meets the exposure requirements.

2. The camera fill light adjustment method according to claim 1, characterized in that The extracting the image coordinates of the overexposed area from the original image includes the following steps: Convert the original image captured by the camera into a first grayscale image; Perform a local maximum operation on the first grayscale image to obtain a local maximum image, determine the position of the overexposed area as the white area in the local maximum image, and determine the image coordinates of the overexposed area.

3. The camera fill light adjustment method according to claim 1, wherein, The extracting the image coordinates of the overexposed area from the original image includes the following steps: Convert the original image captured by the camera into a first grayscale image, and perform image processing on the first grayscale image to obtain a second grayscale image; wherein, the image processing process includes edge extraction, region segmentation and morphological reconstruction; Perform a local maximum operation on the second grayscale image to obtain a local maximum image, determine the position of the overexposed area as the white area in the local maximum image, and determine the image coordinates of the overexposed area.

4. The camera fill light adjustment method according to claim 1, wherein, The adjusting the angles of the micromirrors of the DMD of the fill light system by using encoding control technology includes the following steps: Mark the encoding control value of the coordinates of the fill light system corresponding to the image coordinates of the overexposed area as 0, and mark the encoding control value of the coordinates of the fill light system corresponding to the image coordinates of the area other than the overexposed area as 1 to obtain an encoding matrix; According to the encoding matrix, adjust the angles of the micromirrors corresponding to the encoding control value of 0 to the closed state; wherein, the fill light system includes a fill light source, a converging lens, a DMD and a projection lens; wherein the converging lens is used to converge the outgoing light of the fill light source onto the DMD; the initial encoding control value of all the micromirrors on the DMD is 1, and the corresponding initial state is the open state; the optical axis of the projection lens is parallel to the direction of the reflected light of the fill light source when the DMD is in the open state, and the light energy reflected by the DMD from the fill light source can pass through the projection lens and be projected onto the object to be photographed.

5. The camera fill light adjustment method according to claim 2 or 3, characterized in that, After adjusting the angles of the micromirrors of the DMD of the fill light system by using encoding control technology to control the angle of the incident light in the overexposed area, the method further includes: Adjust the fill light intensity of the fill light source of the fill light system so that the fill light intensity of the fill light source decays by a preset percentage.

6. The camera fill light adjustment method according to claim 1, characterized in that, The detecting whether there is an overexposed area in the original image captured by the camera includes the following steps: Convert the original image captured by the camera into a first grayscale image; Detect whether there are pixel points in the first grayscale image whose grayscale values exceed the set threshold; If so, it is determined that there is an overexposed area in the original image captured by the camera.

7. A camera fill light adjustment device, characterized in that, The device includes a detection module, an extraction module, a conversion module, and an adjustment module; The detection module is used to detect whether there is an overexposed area in the original image captured by the camera; The extraction module is used to extract the image coordinates of the overexposed area from the original image if it exists; The conversion module is used to convert the image coordinates of the overexposed area into the coordinates of the fill light system according to the calibration relationship between the camera and the preset fill light system; The adjustment module is used to load the coordinates of the fill light system to the DMD of the fill light system, and use the encoding control technology to adjust the angles of the micromirrors of the DMD of the fill light system to control the angle of the incident light in the overexposed area until the original image captured by the camera meets the exposure requirements.

8. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A storage medium, on which a computer program is stored, characterized in that, When the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Laser machine and camera linking control method, device and system

    CN108429885A

  • Compact high-precision three-dimensional face imaging device and three-dimensional face imaging method

    CN113485058A