A light filling method, device, equipment and medium

By acquiring image brightness values ​​and adjusting exposure parameters, the fill light intensity of the fill light is independently adjusted for each target area, which solves the problem of poor image quality in low-light environments of the image acquisition equipment, and achieves uniform exposure and high-quality image acquisition .

CN114915733BActive Publication Date: 2024-12-06ZHEJIANG DAHUA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210428646.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-22
Publication Date
2024-12-06
Estimated Expiration
2042-04-22

AI Technical Summary

Technical Problem

In the prior art, the image acquisition device uses parallel fill lights in the absence of light, resulting in excessive exposure in the middle of the image or excessive exposure on both sides, resulting in poor image quality and loss of information.

Method used

By acquiring the brightness value of the image, adjusting the magnification and exposure parameters of the image acquisition device, and independently adjusting the fill light fill intensity of the fill light for each target shooting area, ensuring that the brightness of each area is within the preset range.

Benefits of technology

Improve image quality, avoid information loss, ensure uniform exposure of each area in the image, and enhance the performance of image acquisition equipment in low-light environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114915733B_ABST
    Figure CN114915733B_ABST
Patent Text Reader

Abstract

This invention provides a supplementary lighting method, apparatus, device, and medium to solve the problem of poor image quality and information loss in images caused by insufficient light in the prior art. In this invention, multiple supplementary lights are installed on the image acquisition device, each corresponding to a shooting area. If the first brightness value of the currently acquired first image is less than the target brightness value, a target shooting area is determined within the first image. For each target shooting area, if it is determined that the supplementary light corresponding to that target shooting area on the image acquisition device needs adjustment, the supplementary lighting intensity of the supplementary light corresponding to that target shooting area is adjusted. Therefore, in this invention, supplementary lighting can be applied to each target shooting area separately, avoiding the problem of poor image quality and information loss in images caused by poor lighting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a fill light method, device, equipment and medium. Background Art

[0002] In order to improve the quality of monitoring images, image acquisition devices usually use fill lights to provide auxiliary light for the image acquisition devices in the absence of light (such as at night), so that the image acquisition devices can obtain appropriate exposure by adjusting the fill light intensity of the fill light.

[0003] In the prior art, the image acquisition device uses a fill light parallel to its own optical axis for fill light. For scenes where all the photographed objects in the image captured by the image acquisition device are at the same distance from the image acquisition device, all the photographed objects can obtain a relatively suitable fill light effect, thereby enabling the entire captured image to obtain a better fill light effect. However, for scenes where the photographed object in the middle of the image captured by the image acquisition device is closer to the image acquisition device, while the photographed objects on both sides of the image are farther from the image acquisition device, the exposure in the middle of the image will be too large or the exposure on both sides of the image will be too small, thereby resulting in poor image quality and loss of information in the image. Summary of the invention

[0004] The embodiments of the present invention provide a fill light method, device, equipment and medium, which are used to solve the problems in the prior art of poor quality of collected images and loss of information in the images due to lack of light.

[0005] In a first aspect, an embodiment of the present invention provides a fill light method, the method comprising:

[0006] Acquire a first image currently captured, and determine a first brightness value of the first image;

[0007] If it is determined that the first brightness value is less than the target brightness value, obtaining a current magnification of the image acquisition device when acquiring the first image, and determining a target shooting area included in the first image according to the current magnification;

[0008] For each target shooting area, determine the sub-image corresponding to the target shooting area in the first image, obtain the second brightness value of the sub-image, and if it is determined to adjust the fill light corresponding to the target shooting area on the image acquisition device based on the current gain value, the second brightness value and the preset threshold, adjust the fill light intensity of the fill light corresponding to the target shooting area, wherein a plurality of fill lights are installed on the image acquisition device.

[0009] Furthermore, after determining that the first brightness value is less than the target brightness value and before determining, for each target shooting area, a sub-image corresponding to the target shooting area in the first image, the method further includes:

[0010] Acquire the captured second image, determine the third brightness value of the second image; determine the target parameter adjustment value corresponding to the first difference value according to the first difference value between the target brightness value and the third brightness value, and the correspondence between the difference value and the parameter adjustment value saved in advance; adjust the current exposure parameter according to the target parameter adjustment value, and use the adjusted exposure parameter to update the current exposure parameter, and acquire the third image captured after adjusting the exposure parameter; determine whether the second difference value between the fourth brightness value of the third image and the target brightness value is within a first preset range;

[0011] If yes, taking the third image as the first image, and performing a subsequent step of determining a first brightness value of the first image;

[0012] Otherwise, the current exposure parameter is adjusted according to the target parameter adjustment value until the adjusted exposure parameter reaches a preset parameter threshold, and the image captured before the preset parameter threshold is reached is used as the first image, or until the third difference between the fifth brightness value of the fourth image captured after adjusting the exposure parameter and the target brightness value is within the first preset range, the fourth image is used as the first image, and the subsequent step of determining the first brightness value of the first image is performed.

[0013] Further, determining the target shooting area included in the first image according to the current magnification includes:

[0014] The first image is divided into a preset number of equally divided areas by performing equal division processing; and according to the number of shooting areas in each set direction in the image at the current magnification and the minimum magnification, a resolution corresponding to the first shooting area in each set direction in the first image at the current magnification is determined;

[0015] Determine a first number of equally divided regions included in the set first shooting area in each set direction according to a resolution corresponding to the set first shooting area in each set direction and a resolution of the first image;

[0016] Determine a second number of equally divided areas included in the second target area in each set direction according to the first number of equally divided areas of the first shooting area in each set direction and the total number of equally divided areas included in the first image in each set direction;

[0017] According to the number of equally divided areas included in the set first shooting area and the set second shooting area in each set direction, a target number of equally divided areas included in the set first shooting area and the set second shooting area is determined, and shooting areas whose target number is not a first preset value are determined as target shooting areas in the first image.

[0018] Further, determining the resolution corresponding to the first shooting area in each set direction in the first image at the current magnification according to the number of shooting areas in each set direction in the image at the current magnification and the minimum magnification includes:

[0019] For each set direction, determine a first ratio of the resolution in the set direction in the first image to the number of shooting areas included in the set direction in the image at the minimum magnification; and determine the resolution corresponding to the first shooting area set in the set direction based on the product of the first ratio and the current magnification.

[0020] Further, the determining, according to the resolution corresponding to the set first shooting area in each set direction and the resolution of the first image, a first number of equally divided areas included in the set first shooting area in each set direction comprises:

[0021] For each set direction, determine a second ratio of the resolution corresponding to the set first shooting area in the set direction to the resolution in the set direction in the first image, and determine the first number of equally divided areas included in the set first shooting area in the set direction based on the product of the second ratio and the third number of equally divided areas included in the set direction in the first image.

[0022] Furthermore, the acquiring of the current magnification of the image acquisition device when acquiring the first image includes:

[0023] Acquire a first focusing step number of the image acquisition device when acquiring the first image;

[0024] According to the pre-saved correspondence between the number of focusing steps and the magnification, it is determined that the magnification corresponding to the first number of focusing steps is the current magnification of the image acquisition device when acquiring the first image.

[0025] Furthermore, the corresponding relationship between the focusing steps and the magnification is determined by the following method:

[0026] Obtaining a pre-saved minimum magnification, determining a minimum number of steps corresponding to the minimum magnification according to a predetermined correspondence between the number of steps and the magnification, and adding the correspondence between the minimum magnification and the minimum number of steps to the correspondence between the number of focusing steps and the focusing magnification;

[0027] Determine a third ratio of a second preset value to the number of shooting areas included in a set direction in the image at the minimum magnification, determine a fourth number based on the third ratio, increase the preset increase value for the fourth number in turn, determine each fifth number, and for each fifth number, if the fifth number is less than the preset sixth number, determine a fourth ratio of the fifth number to the fourth number, determine the product of the fourth ratio and the minimum magnification as the target magnification, determine a second focusing step corresponding to the target magnification based on a predetermined correspondence between the number of steps and the magnification, and add the correspondence between the target magnification and the second focusing step to the correspondence between the focusing step and the focusing magnification.

[0028] Further, if it is determined to adjust the fill light corresponding to the target shooting area on the image acquisition device according to the current gain value, the second brightness value and the preset threshold, adjusting the fill light intensity of the fill light corresponding to the target shooting area includes:

[0029] Determine a fifth ratio of the current gain value to the second brightness value, and determine a fourth difference between the fifth ratio and a preset threshold value; if the fourth difference is not within the second preset range, determine to adjust the fill light corresponding to the target shooting area on the image acquisition device, and adjust the fill light intensity of the fill light corresponding to the target shooting area according to the fourth difference.

[0030] Furthermore, the method further comprises:

[0031] The fill light intensity of the fill light corresponding to the shooting area not included in the first image is adjusted to a preset intensity value.

[0032] In a second aspect, an embodiment of the present invention further provides a fill light device, the device comprising:

[0033] an acquisition and determination module, configured to acquire a first image currently being acquired and determine a first brightness value of the first image; if it is determined that the first brightness value is less than a target brightness value, then acquire a current magnification of the image acquisition device when acquiring the first image, and determine a target shooting area included in the first image according to the current magnification;

[0034] The processing module is used to determine, for each target shooting area, a sub-image corresponding to the target shooting area in the first image, obtain a second brightness value of the sub-image, and if it is determined to adjust the fill light corresponding to the target shooting area on the image acquisition device based on a current gain value, the second brightness value and a preset threshold, adjust the fill light intensity of the fill light corresponding to the target shooting area, wherein a plurality of fill lights are installed on the image acquisition device.

[0035] Further, the acquisition and determination module is also used to acquire the captured second image and determine the third brightness value of the second image; determine the target parameter adjustment value corresponding to the first difference value according to the first difference value between the target brightness value and the third brightness value, and the correspondence between the difference value and the parameter adjustment value saved in advance; adjust the current exposure parameter according to the target parameter adjustment value, and use the adjusted exposure parameter to update the current exposure parameter to acquire the third image captured after the exposure parameter is adjusted; determine whether the second difference value between the fourth brightness value of the third image and the target brightness value is within a first preset range; if so, take the third image as the first image, and perform the subsequent step of determining the first brightness value of the first image; otherwise, adjust the current exposure parameter according to the target parameter adjustment value until the adjusted exposure parameter reaches a preset parameter threshold, and then take the image captured before reaching the preset parameter threshold as the first image, or until the third difference value between the fifth brightness value of the fourth image captured after the exposure parameter is adjusted and the target brightness value is within the first preset range, then take the fourth image as the first image, and perform the subsequent step of determining the first brightness value of the first image.

[0036] Further, the acquisition and determination module is specifically used to divide the first image into a preset number of equally divided areas by performing an equal division process; and determine the resolution corresponding to the set first shooting area in each set direction in the first image at the current magnification according to the number of shooting areas included in each set direction in the image at the current magnification and the minimum magnification; determine the first number of equally divided areas included in the set first shooting area in each set direction according to the resolution corresponding to the set first shooting area in each set direction and the resolution of the first image; determine the second number of equally divided areas included in the second target area in each set direction according to the first number of equally divided areas in each set direction of the set first shooting area and the total number of equally divided areas included in the first image in each set direction; determine the target number of equally divided areas included in the set first shooting area and the set second shooting area according to the number of equally divided areas included in the set first shooting area and the set second shooting area in each set direction, and determine the shooting area whose target number is not the first preset value as the target shooting area in the first image.

[0037] Furthermore, the acquisition and determination module is specifically used to determine, for each set direction, a first ratio of the resolution in the set direction in the first image to the number of shooting areas included in the set direction in the image at the minimum magnification; and determine the resolution corresponding to the first shooting area set in the set direction based on the product of the first ratio and the current magnification.

[0038] Furthermore, the acquisition and determination module is specifically used to determine, for each set direction, a second ratio of the resolution corresponding to the set first shooting area in the set direction to the resolution in the set direction in the first image, and determine the first number of equally divided areas contained in the set first shooting area in the set direction based on the product of the second ratio and the third number of equally divided areas contained in the set direction in the first image.

[0039] Furthermore, the acquisition and determination module is specifically used to acquire a first focusing step number of the image acquisition device when acquiring the first image; and according to a pre-saved correspondence between the focusing step number and the magnification, determine that the magnification corresponding to the first focusing step number is the current magnification of the image acquisition device when acquiring the first image.

[0040] Furthermore, the acquisition and determination module is also used to obtain a pre-saved minimum magnification, determine the minimum number of steps corresponding to the minimum magnification according to a predetermined correspondence between the number of steps and the magnification, and add the correspondence between the minimum magnification and the minimum number of steps to the correspondence between the focusing steps and the focusing magnification; determine a third ratio between a second preset value and the number of shooting areas contained in a set direction in the image at the minimum magnification, determine a fourth number according to the third ratio, increase the preset increase value to the fourth number in turn, determine each fifth number, and for each fifth number, if the fifth number is less than the preset sixth number, determine a fourth ratio of the fifth number to the fourth number, determine the product of the fourth ratio and the minimum magnification as the target magnification, determine a second focusing step corresponding to the target magnification according to a predetermined correspondence between the number of steps and the magnification, and add the correspondence between the target magnification and the second focusing step to the correspondence between the focusing steps and the focusing magnification.

[0041] Furthermore, the processing module is specifically used to determine a fifth ratio of the current gain value to the second brightness value, and to determine a fourth difference between the fifth ratio and a preset threshold value. If the fourth difference is not within the second preset range, it is determined to adjust the fill light corresponding to the target shooting area on the image acquisition device, and adjust the fill light intensity of the fill light corresponding to the target shooting area according to the fourth difference.

[0042] Furthermore, the processing module is further used to adjust the fill light intensity of the fill light corresponding to the shooting area not included in the first image to a preset intensity value.

[0043] In a third aspect, an embodiment of the present invention further provides an electronic device, which includes at least a processor and a memory, and the processor is used to implement the steps of any of the above-mentioned fill light methods when executing a computer program stored in the memory.

[0044] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of any of the above-mentioned fill light methods.

[0045] In an embodiment of the present invention, an electronic device acquires a first image currently being acquired and determines a first brightness value of the first image. If the first brightness value is less than a target brightness value, the current magnification of the image acquisition device when acquiring the first image is acquired, and a target shooting area contained in the first image is determined according to the current magnification. For each target shooting area, a sub-image corresponding to the target shooting area in the first image is determined, and a second brightness value of the sub-image is acquired. If it is determined to adjust a fill light corresponding to the target shooting area on the image acquisition device according to a current gain value, the second brightness value, and a preset threshold value, the fill light intensity of the fill light corresponding to the target shooting area is adjusted, wherein a plurality of fill lights are installed on the image acquisition device. Since in the embodiment of the present invention, a plurality of fill lights are installed on the image acquisition device, each fill light corresponds to a shooting area, if the first brightness value of the currently acquired first image is less than the target brightness value, the target shooting area contained in the first image is determined, and for each target shooting area, a sub-image corresponding to the target shooting area is determined in the first image, and according to the second brightness value of the sub-image, the current gain value and the preset threshold, if it is determined to adjust the fill light corresponding to the target shooting area on the image acquisition device, the fill light intensity of the fill light corresponding to the target shooting area is adjusted. Therefore, in the embodiment of the present invention, fill light can be performed separately for each target shooting area to avoid the problem of poor image quality and information loss in the image due to poor light. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0047] Figure 1 A schematic diagram of a fill light process provided by an embodiment of the present invention;

[0048] Figure 2 A schematic diagram of a process for determining each target shooting area included in a first image provided by an embodiment of the present invention;

[0049] Figure 3 A detailed schematic diagram of a fill light process provided by an embodiment of the present invention;

[0050] Figure 4A schematic diagram of the structure of a fill light device provided by an embodiment of the present invention;

[0051] Figure 5 The present invention provides a schematic diagram of the structure of an electronic device. DETAILED DESCRIPTION

[0052] The present invention will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0053] In an embodiment of the present invention, an electronic device acquires a first image currently being acquired and determines a first brightness value of the first image. If the first brightness value is less than a target brightness value, the current magnification of the image acquisition device when acquiring the first image is acquired, and a target shooting area contained in the first image is determined according to the current magnification. For each target shooting area, a sub-image corresponding to the target shooting area in the first image is determined, and a second brightness value of the sub-image is acquired. If it is determined to adjust a fill light corresponding to the target shooting area on the image acquisition device according to a current gain value, the second brightness value, and a preset threshold value, the fill light intensity of the fill light corresponding to the target shooting area is adjusted, wherein a plurality of fill lights are installed on the image acquisition device.

[0054] In order to improve image quality, embodiments of the present invention provide a fill light method, device, equipment and medium.

[0055] Embodiment 1:

[0056] Figure 1 A schematic diagram of a fill light process provided by an embodiment of the present invention, the process includes the following steps:

[0057] S101: Acquire a first image currently captured, and determine a first brightness value of the first image.

[0058] The fill light method provided by the embodiment of the present invention is applied to an electronic device, which may be an image acquisition device, a PC, a server or other intelligent device.

[0059] In an embodiment of the present invention, in order to determine whether the light in the current scene is poor, the electronic device can first obtain the first image currently captured by the image acquisition device and determine the first brightness value of the first image, thereby determining whether the light in the current scene is poor based on the first brightness value of the first image.

[0060] The electronic device can obtain the brightness value of each pixel in the first image, determine the average value, mode value, or median value of the brightness value of each pixel in the first image based on the brightness value of each pixel, and determine the determined average value, mode value, or median value as the first brightness value of the first image.

[0061] S102: If it is determined that the first brightness value is less than the target brightness value, the current magnification of the image acquisition device when acquiring the first image is acquired, and the target shooting area included in the first image is determined according to the current magnification.

[0062] In an embodiment of the present invention, in order to determine whether the current light is poor, a target brightness value is pre-stored in the electronic device, and the target brightness value is the brightness value of the image captured by the image acquisition device when the light is normal. After acquiring the first brightness value of the first image, the electronic device determines whether the first brightness value is less than the target brightness value. If the first brightness value is less than the target brightness value, it means that the current light is poor, and the electronic device acquires the current magnification of the image acquisition device when capturing the first image, and determines the target shooting area contained in the first image according to the current magnification.

[0063] The electronic device pre-stores each shooting area in the image captured at the minimum magnification, that is, each actual physical area contained in the image captured at the minimum magnification. This is because there is a correspondence between the actual physical area and the image area, so the correspondence between each image area and the actual physical area in the image at the minimum magnification is known. When the magnification of the image acquisition device is adjusted, it is possible to determine which actual physical areas are contained in the first image based on the current magnification of the image acquisition device, that is, determine the target shooting area contained in the first image.

[0064] S103: For each target shooting area, determine the sub-image corresponding to the target shooting area in the first image, obtain the second brightness value of the sub-image, and if it is determined to adjust the fill light corresponding to the target shooting area on the image acquisition device based on the current gain value, the second brightness value and a preset threshold, adjust the fill light intensity of the fill light corresponding to the target shooting area, wherein a plurality of fill lights are installed on the image acquisition device.

[0065] In the embodiment of the present invention, a plurality of fill-in lights are installed on the image acquisition device, and each shooting area in the image acquired at the minimum magnification is pre-saved, that is, each actual physical area contained in the image acquired at the minimum magnification, and the corresponding relationship between each fill-in light and each actual physical area is saved, that is, the corresponding relationship between each fill-in light and each shooting area is saved. For each target shooting area, there is a fill-in light corresponding to the target shooting area, and the fill-in light can fill in the light of the target shooting area, so as to ensure the brightness value of the image area corresponding to the target shooting area in the acquired image.

[0066] In order to perform corresponding fill light, the electronic device determines, for each target shooting area, a sub-image corresponding to the target shooting area in the first image, wherein the method for the electronic device to determine the sub-image corresponding to the target shooting area in the first image may be: the electronic device pre-saves the correspondence between the magnification and the actual physical area, and saves the correspondence between each actual physical area and the image area at each magnification, therefore, according to the saved correspondence between each actual physical area and the image area at each magnification, the target actual area contained in the current magnification, that is, the target shooting area, is determined, and the target image area corresponding to the target shooting area in the image is determined, and the target image area is determined to be the sub-image corresponding to the target shooting area in the first image.

[0067] For each target shooting area, after determining the sub-image corresponding to the target shooting area contained in the first image, the electronic device can obtain the second brightness value of the sub-image, and determine whether it is necessary to adjust the fill light corresponding to the target shooting area on the image acquisition device according to the current gain value of the image acquisition device that acquires the first image, the second brightness value of the sub-image and the preset threshold. Specifically, it can be determined that the ratio of the current gain value to the second brightness value, and the size of the ratio and the preset threshold is judged. If the ratio is greater than the preset threshold, it is determined that the fill light corresponding to the target shooting area needs to be adjusted, otherwise, it is determined that the fill light corresponding to the target shooting area does not need to be adjusted. If it is determined that the fill light corresponding to the target shooting area needs to be adjusted, the fill light intensity of the fill light corresponding to the target shooting area is adjusted. Specifically, the fill light corresponding to the target shooting area can be adjusted according to the difference between the ratio and the preset threshold.

[0068] In the embodiment of the present invention, by adjusting the lens angle of the fill light, different actual physical areas, i.e., shooting areas, can be filled with light, and each fill light can be independently controlled by the electronic device to fill light each shooting area, thereby producing a zoned fill light effect. Wherein, the lens angle of the fill light is preset.

[0069] Since in the embodiment of the present invention, a plurality of fill lights are installed on the image acquisition device, each fill light corresponds to a shooting area, if the first brightness value of the currently acquired first image is less than the target brightness value, the target shooting area contained in the first image is determined, and for each target shooting area, a sub-image corresponding to the target shooting area is determined in the first image, and according to the second brightness value of the sub-image, the current gain value and the preset threshold, if it is determined to adjust the fill light corresponding to the target shooting area on the image acquisition device, the fill light intensity of the fill light corresponding to the target shooting area is adjusted. Therefore, in the embodiment of the present invention, fill light can be performed separately for each target shooting area to avoid the problem of poor image quality and information loss in the image due to poor light.

[0070] Embodiment 2:

[0071] In order to accurately improve the quality of the image, based on the above embodiment, in an embodiment of the present invention, before determining the first brightness value of the first image, the method further includes:

[0072] Acquire the captured second image, determine the third brightness value of the second image; determine the target parameter adjustment value corresponding to the first difference value according to the first difference value between the target brightness value and the third brightness value, and the correspondence between the difference value and the parameter adjustment value saved in advance; adjust the current exposure parameter according to the target parameter adjustment value, and use the adjusted exposure parameter to update the current exposure parameter, and acquire the third image captured after adjusting the exposure parameter; determine whether the second difference value between the fourth brightness value of the third image and the target brightness value is within a first preset range;

[0073] If yes, taking the third image as the first image, and performing a subsequent step of determining a first brightness value of the first image;

[0074] Otherwise, the current exposure parameter is adjusted according to the target parameter adjustment value until the adjusted exposure parameter reaches a preset parameter threshold, and the image captured before the preset parameter threshold is reached is used as the first image, or until the third difference between the fifth brightness value of the fourth image captured after adjusting the exposure parameter and the target brightness value is within the first preset range, the fourth image is used as the first image, and the subsequent step of determining the first brightness value of the first image is performed.

[0075] In an embodiment of the present invention, before determining the first brightness value of the first image, the electronic device may first obtain the second image captured by the image acquisition device and determine the third brightness value of the second image, determine the target parameter adjustment value according to the third brightness value of the second image, and adjust the current exposure parameter according to the target parameter adjustment value, thereby improving the quality of the captured image.

[0076] Specifically, when determining the target parameter adjustment value, the electronic device can determine a first difference between the target brightness value and the third brightness value of the second image, and according to a pre-saved correspondence between the difference and the parameter adjustment value, determine the parameter adjustment value corresponding to the first difference as the target parameter adjustment value, and adjust the current exposure parameter by the target parameter adjustment value, wherein the current exposure parameter may include at least one of shutter, gain, and aperture. If the current exposure parameter includes two or more of shutter, gain, and aperture, the electronic device stores a correspondence between the difference and the parameter adjustment value of each exposure parameter.

[0077] After adjusting the current exposure parameter, the electronic device updates the current exposure parameter using the adjusted exposure parameter, obtains the third image captured after adjusting the exposure parameter, obtains the fourth brightness value of the third image, determines the second difference between the fourth brightness value and the target brightness value, and determines whether the second difference is within the first preset range. If the second difference is within the first preset range, the third image is used as the first image, and the subsequent step of determining the first brightness value of the first image is continued. If the second difference is not within the first preset range, it means that the fourth brightness value of the second image is far from the target brightness value, and the current exposure parameter still needs to be adjusted. The electronic device continues to adjust the current exposure parameter according to the target parameter adjustment value until the adjusted exposure parameter reaches the preset parameter threshold. If the adjusted exposure parameter reaches the preset parameter threshold, the image captured before reaching the preset parameter threshold is used as the first image, and the subsequent step of determining the first brightness value of the first image is continued. Or until the third difference between the fifth brightness value of the fourth image captured after adjusting the exposure parameters and the target brightness value is within the first preset range; if the third difference between the fifth brightness value of the fourth image captured after adjusting the exposure parameters and the target brightness value is within the first preset range, the fourth image is taken as the first image, and the step of determining the first brightness value of the first image is executed.

[0078] That is to say, the electronic device adjusts the current exposure parameter based on the target parameter adjustment value in sequence until the adjusted exposure parameter reaches a preset parameter threshold, or until the third difference between the fifth brightness value of the fourth image captured based on the adjusted exposure parameter and the target brightness value is within a first preset range.

[0079] It is worth noting that, since the first image contains multiple target shooting areas, directly adjusting the fill light is likely to cause uneven fill light in each target shooting area. In addition, the process of directly adjusting the fill light is relatively long. If the fill light is adjusted after determining that the current light is poor, it is likely that the image collected will be dark for a period of time, and the effective time of adjusting the exposure parameters is relatively short. Therefore, in an embodiment of the present invention, it is selected to adjust the exposure parameters first. After the image collected after adjusting the exposure parameters is stable, that is, the brightness value of the image is close to the target brightness value, the fill light corresponding to the target shooting area contained in the first image is adjusted.

[0080] Embodiment 3:

[0081] In order to accurately determine the target shooting area included in the first image, based on the above embodiments, in an embodiment of the present invention, determining the target shooting area included in the first image according to the current magnification includes:

[0082] Dividing the first image into equal parts into a preset number of equal parts;

[0083] Determine, according to the number of shooting areas included in each set direction in the image at the current magnification and the minimum magnification, a resolution corresponding to a first shooting area set in each set direction in the first image at the current magnification;

[0084] Determine a first number of equally divided regions included in the set first shooting area in each set direction according to a resolution corresponding to the set first shooting area in each set direction and a resolution of the first image;

[0085] Determine a second number of equally divided areas included in each set direction of the second target area according to the first number of equally divided areas included in each set direction of the first shooting area and the total number of equally divided areas included in each set direction of the first image;

[0086] According to the number of equally divided areas included in the set first shooting area and the set second shooting area in each set direction, a target number of equally divided areas included in the set first shooting area and the set second shooting area is determined, and shooting areas whose target number is not a first preset value are determined as target shooting areas in the first image.

[0087] In an embodiment of the present invention, in order to determine the target shooting area contained in the first image, the electronic device divides the acquired first image into equal parts, thereby dividing the first image into a plurality of equally divided areas, so as to subsequently determine the target shooting area contained in the first image based on the plurality of equally divided areas.

[0088] In one embodiment, a preset number is pre-configured in the embodiment of the present invention, so as to determine the number of equally divided regions into which the first image needs to be equally divided by the preset number. In another embodiment, the electronic device may also be pre-configured with a first preset number of equally divided regions in the horizontal direction and a second preset number of equally divided regions in the vertical direction, so as to perform equally divided processing on the first image by the first preset number and the second preset number.

[0089] In an embodiment of the present invention, a plurality of fill lights are provided on the image acquisition device, so that each fill light can be used to fill light the shooting area corresponding to the image acquired by the image acquisition device. The number of the fill lights can be determined according to the number of shooting areas contained in the image acquired by the image acquisition device at the minimum magnification, which is pre-configured. This is because the size of the acquisition area covered by the image acquired by the image acquisition device is inversely proportional to the magnification of the image acquisition device. Therefore, the number of fill lights on the image acquisition device can be determined according to the number of shooting areas contained in the image acquired by the image acquisition device at the minimum magnification, thereby ensuring that the number of fill lights on the image acquisition device can meet the fill light requirements of the images acquired by the image acquisition device at other magnifications, that is, it can be ensured that the brightness of each shooting area contained in the image acquired at any magnification can be adjusted by the corresponding fill light.

[0090] In order to determine the target shooting area included in the first image, the electronic device can divide the image captured at the minimum magnification into a preset number of image areas, wherein the preset number is the number of pre-set shooting areas, and the number of equal divisions in the horizontal direction is the number of shooting areas included in the horizontal direction in the actual application scene, and the number of equal divisions in the vertical direction is the number of shooting areas included in the vertical direction in the actual application scene; for each set direction, the number of shooting areas included in the set direction saved in advance is obtained, and according to the number and the current magnification when the image acquisition device captures the first image, the resolution corresponding to the set first shooting area in the set direction in the first image at the current magnification is determined. The set direction is the horizontal direction and the vertical direction.

[0091] Each actual physical area, that is, the physical area located in the middle of the shooting area, that is, the shooting area in the middle of the shooting area contained in the image captured at the minimum magnification, can be captured in the image captured at any magnification. Therefore, the set first shooting area can be the shooting area in the middle of the shooting area contained in the image captured at the minimum magnification.

[0092] If the image captured at the minimum magnification in the actual application scenario contains an odd number of shooting areas in the set direction, for example, there are 3 shooting areas, then the first shooting area can be the middle shooting area in the image captured at the minimum magnification in the set direction; if the image captured at the minimum magnification contains an even number of shooting areas in the set direction, for example, there are 4 shooting areas, then the first shooting area can be the middle two shooting areas in the image captured at the minimum magnification in the set direction. For example, the image captured at the minimum magnification contains 3 shooting areas in the horizontal direction and 2 shooting areas in the vertical direction (i.e., it contains shooting areas in 2 rows and 3 columns), then the first shooting area is set to be the middle shooting area in the horizontal direction and the middle two shooting areas in the vertical direction. Since the two shooting areas in the second column are the middle shooting area in the horizontal direction and the middle two shooting areas in the vertical direction, the first shooting area is set to be the two shooting areas in the second column.

[0093] The electronic device can determine the image area corresponding to the set first shooting area in the image captured at the minimum magnification, and determine the resolution of the image area in the set direction. According to the current magnification when the first image is captured, and the resolution corresponding to the set first shooting area in the image captured at the minimum magnification in the set direction, the resolution of the image area corresponding to the set first shooting area in the first image in the set direction can be determined. Among them, how to determine the resolution of the image area corresponding to the shooting area in the image captured at the current magnification according to the current magnification and the resolution of a certain shooting area in the image at the minimum magnification is a prior art and will not be repeated here.

[0094] For each set direction, the electronic device may determine the first number of equally divided areas included in the first shooting area set in the set direction according to the resolution of the image area corresponding to the first image in the first image set in the set direction and the resolution of the first image in the set direction. The resolution of the image area corresponding to the first shooting area set in the set direction in the first image may be referred to as the first resolution, and the resolution of the first image may be referred to as the second resolution. The electronic device may determine the ratio of the first resolution to the second resolution, determine the product of the ratio and the first number of equally divided areas included in the first image in the set direction, determine a value rounded down to an integer, and determine the value as the first number of equally divided areas included in the image area corresponding to the first shooting area set in the set direction in the first image.

[0095] After determining the first number of equally divided areas included in the image area corresponding to the set first shooting area in each set direction in the first image, the electronic device determines, for each set direction, the second number of equally divided areas included in the image area corresponding to the second target area in the set direction in the first image based on the total number of equally divided areas included in the first image in the set direction and the first number of equally divided areas included in the image area corresponding to the set first shooting area in the set direction in the first image. Considering that too many fill lights may easily lead to different brightness in different captured areas, and actual application scenarios usually do not require too many fill lights, in the embodiment of the present invention, the number of fill lights in each set direction usually does not exceed 4, that is, at most one pair of set second shooting areas is included in each set direction.

[0096] Specifically, the set first shooting area can be the middle shooting area in each shooting area. In the actual application scenario, except for the set first shooting area in the set direction, there are at most a pair of set second shooting areas of equal size on both sides. Therefore, there may be image areas corresponding to the set second shooting areas with equal resolution on both sides of the first image. Therefore, the electronic device can determine the difference between the total number and the first number, and determine the ratio of the difference to the third preset value. According to the ratio, the second number of equally divided areas contained in the image area corresponding to each set second shooting area in the set direction in the first image can be determined, wherein the third preset value is 2.

[0097] In an actual application scenario, if an even number of set first shooting areas are included in a certain set direction, that is, 2 set first shooting areas are included in the set direction, the determined first number is the number of equally divided areas included in the 2 image areas corresponding to the 2 set first shooting areas in the first image. If the first number is an even number, the number of equally divided areas included in the image areas respectively corresponding to the 2 set first shooting areas in the first image is the ratio of the determined first number to a fourth preset value, and the fourth preset value is 2; if the first number is an odd number, the ratio of the first number to the fourth preset value is determined, and the even number and odd number closest to the ratio are determined, and the sum of the odd number and the even number is the first number, then the odd number and the even number are respectively the number of equally divided areas included in the image area corresponding to the 2 set first shooting areas in the first image.

[0098] It is worth noting that, in actual application scenarios, for each shooting area in the same column, the corresponding image area in the first image contains the same number of equally divided areas in the horizontal direction, and for each shooting area in the same row, the corresponding image area in the first image contains the same number of equally divided areas in the vertical direction.

[0099] For example, in an actual application scenario, there are 2 rows and 3 columns of shooting areas, and the first shooting area can be set to the 2nd shooting area in the 1st row or the 2nd shooting area in the 2nd row. The electronic device can determine the first number of equally divided areas in the image area corresponding to the first image in the horizontal direction, and obtain the total number of equally divided areas in the first image in the horizontal direction. The electronic device determines the difference between the total number and the first number, and according to the difference, it can determine the second number of equally divided areas in the image area corresponding to the first image in the horizontal direction. Specifically, the second shooting area is set to the 1st and 3rd shooting areas in the 1st row and the 1st and 3rd shooting areas in the 3rd row. And the electronic device can determine the first number of equally divided areas in the image area corresponding to the first image in the vertical direction. Since each shooting area in the same column has the same number of equally divided areas in the horizontal direction in the corresponding image area in the first image, each shooting area in the same row has the same number of equally divided areas in the vertical direction in the corresponding image area in the first image. Therefore, the electronic device can determine the number of equally divided areas in the vertical direction included in the image area corresponding to the first image of each set second shooting area in the same row based on the first number of equally divided areas in the vertical direction included in the image area corresponding to the first image of each set first shooting area.

[0100] After the electronic device determines the number of equally divided areas in each set direction of the image area corresponding to the first shooting area and the second shooting area in the first image, wherein the set direction is the horizontal direction and the vertical direction, the electronic device can determine the product of the number of equally divided areas in the horizontal direction of the image area corresponding to the first shooting area in the first image and the number of equally divided areas in the vertical direction, and use the product as the target number of equally divided areas in the image area corresponding to the first shooting area in the first image, and the target number of equally divided areas in the image area corresponding to the second shooting area in the first image is determined in the same manner as above. After determining each target number, the electronic device determines that the shooting area whose target number is not a first preset value is the target shooting area where the corresponding image area exists in the first image, wherein the first preset value can be 0, that is, if there is a shooting area whose corresponding image area in the first image does not contain an equally divided area, then the shooting area is not captured at the current magnification, that is, the shooting area does not have a corresponding image area in the first image.

[0101] In actual applications, the electronic device can set a corresponding first preset identifier for the shooting area where the determined target number is 0, for example, it can be set to 1, and set a corresponding second preset identifier for the shooting area where the determined target number is not 0, for example, it can be set to 0. By setting the first preset identifier and the second preset identifier, it is determined that the target shooting area in the first image has a corresponding image area.

[0102] Figure 2 A schematic diagram of a process for determining each target shooting area contained in a first image provided by an embodiment of the present invention, the process comprising the following steps:

[0103] S201: Divide the first image into a preset number of equally divided areas, and determine the resolution of the image area corresponding to the first shooting area in the first image in each set direction under the current magnification.

[0104] S202: Determine a first number of equally divided regions in each set direction included in the image region corresponding to the first shooting region in the first image according to the resolution of the image region corresponding to the first shooting region in each set direction and the resolution of the first image.

[0105] S203: Determine a second number of equally divided areas in each set direction contained in the image area corresponding to the second target area in the first image based on a first number of equally divided areas in each set direction contained in the image area corresponding to the first shooting area in the first image, and a total number of equally divided areas contained in the first image in each set direction.

[0106] S204: Determine a target number of equally divided areas included in the image area corresponding to the set first shooting area and the set second shooting area in the first image according to the number of equally divided areas included in each set direction of the image area corresponding to the set first shooting area and the set second shooting area in the first image, and determine that the shooting areas whose target number is not equal to the first preset value are the target shooting areas corresponding to the existing image areas in the first image.

[0107] Embodiment 4:

[0108] In order to accurately determine the resolution corresponding to the first shooting area set in each set direction in the first image at the current magnification, based on the above embodiments, in an embodiment of the present invention, determining the resolution corresponding to the first shooting area set in each set direction in the first image at the current magnification according to the number of shooting areas included in each set direction in the image at the current magnification and the minimum magnification includes:

[0109] For each set direction, determine a first ratio of the resolution in the set direction in the first image to the number of shooting areas included in the set direction in the image at the minimum magnification; and determine the resolution corresponding to the first shooting area set in the set direction based on the product of the first ratio and the current magnification.

[0110] In an embodiment of the present invention, the electronic device can determine, for each set direction, a first ratio of the resolution in the set direction in the first image to the number of shooting areas included in the set direction at the minimum magnification. In an embodiment of the present invention, the first ratio can be referred to as a benchmark resolution. In addition, how to obtain the resolution in the set direction in the first image is a prior art and will not be elaborated here.

[0111] After determining the first ratio, the product of the first ratio and the current magnification may be determined, and based on the product, the resolution of the image area corresponding to the first shooting area in the first image in the set direction may be determined. The product may be determined to be the resolution of the image area corresponding to the first shooting area in the first image in the set direction. In addition, considering that the resolution of the image area corresponding to the first shooting area in the first image will not exceed the resolution of the first image, if the resolution of the image area corresponding to the first shooting area in the first image in the set direction determined exceeds the resolution of the first image in the set direction, it means that there is no image area corresponding to other shooting areas other than the first shooting area in the set direction in the first image, and the resolution of the first image in the set direction is used to update the resolution of the image area corresponding to the first shooting area in the first image in the set direction.

[0112] In order to determine the first number of equally divided areas included in the set first shooting area, based on the above embodiments, in an embodiment of the present invention, the determining the first number of equally divided areas included in the set first shooting area in each set direction according to the resolution corresponding to the set first shooting area in each set direction and the resolution of the first image includes:

[0113] For each set direction, determine a second ratio of the resolution corresponding to the set first shooting area in the set direction to the resolution in the set direction in the first image, and determine the first number of equally divided areas included in the set first shooting area in the set direction based on the product of the second ratio and the third number of equally divided areas included in the set direction in the first image.

[0114] In an embodiment of the present invention, the electronic device obtains, for each set direction, a resolution of an image area corresponding to the set first shooting area in the first image in the set direction, and refers to the resolution as a third resolution, and obtains a resolution of the first image in the set direction, and refers to the resolution as a fourth resolution. The electronic device determines a second ratio of the third resolution to the fourth resolution, determines a third number of equally divided areas included in the set direction in the first image, determines the product of the third number and the second ratio, and determines, based on the product, a first number of equally divided areas included in the image area corresponding to the set first shooting area in the first image in the set direction.

[0115] Specifically, a value after rounding up or down of the product may be determined, and the value may be determined as the first number of equally divided regions included in the set direction of the image area corresponding to the first shooting area in the first image. Alternatively, if the number of equally divided regions included in the first image in the set direction is an even number, the even number closest to the product may be determined as the first number of equally divided regions included in the set direction of the image area corresponding to the first shooting area in the first image; if the number of equally divided regions included in the first image in the set direction is an odd number, the odd number closest to the product may be determined as the first number of equally divided regions included in the set direction of the image area corresponding to the first shooting area in the first image.

[0116] An actual scene including 2 rows and 3 columns with a total of 6 shooting areas is taken as an example. For the convenience of description, the 3 shooting areas in the first row are called A1, A2, and A3 from left to right, and the shooting areas in the second row from left to right are called A4, A5, and A6.

[0117] Wherein, A2 and A5 are set first shooting areas corresponding to the horizontal direction, and the number of equally divided areas contained in the image area corresponding to the set first shooting area in the first image in the horizontal direction can be determined by the following formula:

[0118]

[0119]

[0120] Wherein, A2R represents the number of equally divided areas included in A2 in the horizontal direction, A5R represents the number of equally divided areas included in A5 in the horizontal direction. If the number of equally divided areas included in the horizontal direction in the first image is an even number, then the formula (1) is selected for determination; otherwise, the formula (2) is selected for determination. Width is the resolution of the image area corresponding to A2 and A5 in the horizontal direction of the first image, W is the resolution of the first image in the horizontal direction, and M is the third number of equally divided areas included in the horizontal direction of the first image. Formula (1) indicates that if the number after rounding down width / W*M is an odd number, then the number of equally divided areas included in A2 and A5 in the horizontal direction is Otherwise, the number of equally divided areas contained in A2 and A5 in the horizontal direction is That is, the even number closest to the product (width / W*M); Formula (2) indicates that if the number after width / W*M is rounded down is an even number, then the number of equally divided areas in the horizontal direction of A2 and A5 is Otherwise, the number of equally divided areas contained in A2 and A5 in the horizontal direction is That is, the odd number closest to the product (width / W*M).

[0121] A1, A3, A4, and A6 are set second shooting areas corresponding to the horizontal direction. The number of equally divided areas in the horizontal direction of the image area corresponding to the second shooting area in the first image can be determined by the following formula:

[0122] A1R=A3R=A4R=A6R=(M–A2R) / 2

[0123] Among them, A1R represents the number of equally divided areas contained in the image area corresponding to A1 in the first image in the horizontal direction, A3R represents the number of equally divided areas contained in the image area corresponding to A3 in the first image in the horizontal direction, A4R represents the number of equally divided areas contained in the image area corresponding to A4 in the first image in the horizontal direction, A6R represents the number of equally divided areas contained in the image area corresponding to A6 in the first image in the horizontal direction, M represents the third number of equally divided areas contained in the horizontal direction in the first image, A2R represents the number of equally divided areas contained in the image area corresponding to A2 in the first image in the horizontal direction, and 2 is the second preset value described in the above embodiment.

[0124] The number of equally divided regions in the vertical direction of the image area corresponding to the first shooting area A2 in the first image can be determined by the following formula:

[0125]

[0126] A2C represents the image area corresponding to A2 in the first image, the number of equally divided areas included in the vertical direction, and N represents the third number of equally divided areas included in the vertical direction in the first image.

[0127] The number of equally divided regions in the vertical direction of the image area corresponding to the first shooting area A5 in the first image can be determined by the following formula:

[0128] A5C=N-A1C

[0129] Among them, A5C represents the number of equally divided areas contained in the image area corresponding to A5 in the first image in the vertical direction, and A1C represents the number of equally divided areas contained in the image area corresponding to A1 in the first image in the vertical direction.

[0130] It is noted that the image areas corresponding to A1 and A3 in the first image include A2C equal areas in the vertical direction, and the image areas corresponding to A4 and A6 in the first image include A5C equal areas in the vertical direction.

[0131] Embodiment 5:

[0132] In order to obtain the current magnification of the image acquisition device when acquiring the first image, based on the above embodiments, in an embodiment of the present invention, the obtaining of the current magnification of the image acquisition device when acquiring the first image includes:

[0133] Acquire a first focusing step number of the image acquisition device when acquiring the first image;

[0134] According to the pre-saved correspondence between the number of focusing steps and the magnification, it is determined that the magnification corresponding to the first number of focusing steps is the current magnification of the image acquisition device when acquiring the first image.

[0135] In an embodiment of the present invention, the electronic device may first obtain a first focusing step of the image acquisition device when acquiring the first image, and the correspondence between the focusing step and the magnification is pre-stored in the electronic device. After obtaining the first focusing step, the electronic device may determine that in the correspondence between the focusing step and the magnification, the magnification corresponding to the first focusing step is the current magnification of the image acquisition device when acquiring the first image.

[0136] It is worth noting that, normally, in order to avoid occupying too many resources, only part of the correspondence between the focusing steps and the magnification is usually saved in the electronic device. Therefore, when determining the magnification corresponding to the first focusing step, the saved correspondence between the focusing step and the magnification may not save the first focusing step and the corresponding magnification. In this case, the electronic device can determine the difference between each focusing step and the first focusing step in the saved correspondence between the focusing step and the magnification, and determine that the magnification corresponding to the focusing step with the smallest difference is the current magnification of the image acquisition device when acquiring the first image.

[0137] In order to avoid waste of resources, based on the above embodiments, in an embodiment of the present invention, the corresponding relationship between the number of focusing steps and the magnification is determined by the following method:

[0138] Obtaining a pre-saved minimum magnification, determining a minimum number of steps corresponding to the minimum magnification according to a predetermined correspondence between the number of steps and the magnification, and adding the correspondence between the minimum magnification and the minimum number of steps to the correspondence between the number of focusing steps and the focusing magnification;

[0139] Determine a third ratio of a second preset value to the number of shooting areas included in a set direction in the image at the minimum magnification, determine a fourth number based on the third ratio, increase the preset increase value for the fourth number in turn, determine each fifth number, and for each fifth number, if the fifth number is less than the preset sixth number, determine a fourth ratio of the fifth number to the fourth number, determine the product of the fourth ratio and the minimum magnification as the target magnification, determine a second focusing step corresponding to the target magnification based on a predetermined correspondence between the number of steps and the magnification, and add the correspondence between the target magnification and the second focusing step to the correspondence between the focusing step and the focusing magnification.

[0140] In an embodiment of the present invention, the image acquisition device corresponds to a large number of focusing steps, up to thousands. If the corresponding relationship between each focusing step and the magnification is stored in the electronic device, the memory resource consumption will be large. In order to reduce memory consumption, before actual application, the electronic device can first construct a corresponding relationship between the focusing step and the magnification suitable for the image acquisition device.

[0141] The manager pre-builds the correspondence between the number of steps and the magnification. When the electronic device builds the correspondence between the number of focusing steps and the magnification, it can first save the correspondence between part of the number of steps and the magnification, and delete the saved correspondence between the part of the number of steps and the magnification in actual application. When building the correspondence between the number of focusing steps and the magnification applicable to the image acquisition device, the electronic device can first obtain the minimum magnification of the image acquisition device, and determine the number of steps corresponding to the minimum magnification in the correspondence according to the predetermined correspondence between the number of steps and the magnification, and add the minimum magnification and its corresponding number of steps to the correspondence between the number of focusing steps and the focusing magnification.

[0142] When constructing the correspondence between the number of focusing steps and the focusing magnification, the electronic device may also obtain the number of shooting areas contained in the set direction in the image at the minimum magnification, and determine a third ratio between the second preset value and the number, wherein the second preset value may be the product of the resolution of the middle area of ​​the image at the minimum magnification in the set direction and the number of equally divided areas in the set direction when the image is equally divided in advance. And according to the third ratio, the fourth number is determined. Specifically, the value after the third ratio is rounded up or rounded down may be determined as the fourth number. The set direction may be either the horizontal direction or the vertical direction.

[0143] The formula for determining the third ratio may be:

[0144] baseWidth*M / W

[0145] Among them, baseWidth is the resolution of the middle area of ​​the image at the minimum magnification in the set direction, M is the number of equal parts of the first image in the set direction when the pre-saved equal parts are determined, baseWidth*M is the second preset value, and W is the number of shooting areas contained in the set direction in the image at the minimum magnification.

[0146] After determining the fourth number, the electronic device may sequentially increase the preset increase value for the fourth number to determine each fifth number, wherein the preset increase value may be any value, for example, 1 or 2. Specifically, the increase value may be preset according to whether the number of equally divided regions in the set direction when the image is equally divided is an odd number or an even number, for example, when the number of equally divided regions in the set direction when the image is equally divided is an odd number, the increase value may be preset to 1, and when the number of equally divided regions in the set direction when the image is equally divided is an even number, the increase value may be preset to 2. After determining each fifth number, the electronic device determines for each fifth number whether the fifth number is less than the preset sixth number, and if the fifth number is less than the preset sixth number, determines a fourth ratio of the fifth number to the fourth number, and determines the product of the fourth ratio and the minimum magnification as the target magnification, and determines the number of steps corresponding to the target magnification as the second focusing step number according to the predetermined correspondence between the number of steps and the magnification, and adds the correspondence between the target magnification and the second focusing step number to the correspondence between the number of focusing steps and the focusing magnification. That is to say, the electronic device sequentially increases the preset increase value for the fourth number until the increased fifth number is not less than the preset sixth number.

[0147] The sixth number may be a pre-saved number of equally divided regions in the set direction when the image is equally divided.

[0148] The formula for determining the target magnification corresponding to one of the fifth quantities can be:

[0149] M1 / M0=R1,R1*F0=F1

[0150] Among them, M1 is the fifth number, M0 is the fourth number, R1 is the fourth ratio, which can be called a multiple, F0 is the minimum multiple, and F1 is the target multiple.

[0151] In addition, in an embodiment of the present invention, each acquired magnification may be added in sequence to the focus magnification table StepT[K]={S0, S1,…, Sk} in the order of acquisition, and each acquired step may be added in sequence to the focus step table RatioT[K]={R0, R1,…, Rk} in the order of acquisition, wherein the focus magnification and focus step number in the same order are magnifications and steps with corresponding relationships.

[0152] Embodiment 6:

[0153] In order to accurately adjust the fill light intensity of the fill light corresponding to each target shooting area, based on the above embodiments, in an embodiment of the present invention, if it is determined to adjust the fill light corresponding to the target shooting area on the image acquisition device according to the current gain value, the second brightness value and the preset threshold, then adjusting the fill light intensity of the fill light corresponding to the target shooting area includes:

[0154] Determine a fifth ratio of the current gain value to the second brightness value, and determine a fourth difference between the fifth ratio and a preset threshold value; if the fourth difference is not within the second preset range, determine to adjust the fill light corresponding to the target shooting area on the image acquisition device, and adjust the fill light intensity of the fill light corresponding to the target shooting area according to the fourth difference.

[0155] In an embodiment of the present invention, for each target shooting area, the electronic device may determine that the gain value of the image acquisition device when the first image is acquired is the current gain value, and determine the fifth ratio of the current gain value to the second brightness value of the target shooting area, wherein, under the same scene, the higher the brightness value, the lower the gain value, and the larger the fifth ratio, so the larger the fifth ratio, the higher the second brightness value of the target shooting area. And the electronic device pre-stores a preset threshold value, which may be the ratio of the gain to the target brightness value when the image acquisition device that acquires the first image acquires an image with a target brightness value. After determining the fifth ratio, the electronic device determines the fourth difference between the fifth ratio and the preset threshold value. If the fourth difference is not within the second preset range, it means that the second brightness value of the target shooting area is far from the target brightness value, and it is determined that the fill light of the target shooting area on the image acquisition device needs to be adjusted, and the fill light intensity of the fill light corresponding to the target shooting area is adjusted according to the fourth difference.

[0156] In order to save resources, based on the above embodiments, in an embodiment of the present invention, the method further includes:

[0157] The fill light intensity of the fill light corresponding to the shooting area not included in the first image is adjusted to a preset intensity value.

[0158] Since in the embodiment of the present invention, there may be some shooting areas not included in the first image, and a fill light is set corresponding to the shooting areas not included in the first image, in order to avoid wasting resources, the electronic device can determine whether the fill light intensity of the fill light corresponding to each shooting area not included in the first image is a preset intensity value, and if it is not the preset intensity value, adjust the fill light intensity of the fill light corresponding to the shooting area to the preset intensity value. The preset intensity value can be 0 or a preset minimum intensity value.

[0159] In addition, in order to avoid the impact of instantaneous adjustment of the fill light intensity value on the fill light in the surrounding shooting area, the electronic device can adjust the fill light intensity of the corresponding fill light according to a preset frequency and a preset intensity reduction value until it is adjusted to the preset intensity value.

[0160] Figure 3 A detailed schematic diagram of a fill light process provided by an embodiment of the present invention, the process includes the following steps:

[0161] S301: Acquire the first image currently collected.

[0162] S302: Determine a first brightness value of a first image.

[0163] S303: Determine whether the first brightness value is less than the target brightness value, if so, execute S304, otherwise, execute S301.

[0164] S304: Acquire a second image, and determine a third brightness value of the second image.

[0165] S305: Determine a target parameter adjustment value corresponding to the first difference value according to a first difference value between the target brightness value and the third brightness value and a pre-stored correspondence relationship between the difference value and the parameter adjustment value.

[0166] S306: Adjust the current exposure parameter according to the target parameter adjustment value until a preset condition is reached.

[0167] The preset condition may be that the exposure parameter reaches a preset parameter threshold, or that a third difference between a fifth brightness value of the fourth image acquired after adjusting the exposure parameter and the target brightness value is within the first preset range. The electronic device uses the image acquired before reaching the preset parameter threshold as the first image, or uses the fourth image as the first image.

[0168] S307: Determine the target shooting area included in the first image.

[0169] S308: For each target shooting area, determine a fifth ratio of the current gain value to the second brightness value of the target shooting area, and determine a fourth difference between the fifth ratio and a preset threshold.

[0170] S309: for each target shooting area, determine whether the fourth difference value corresponding to the target shooting area is within a second preset range, if yes, execute S310, otherwise, execute S311.

[0171] S310: For each target shooting area whose corresponding determined fourth difference value is not within the second preset range, adjusting the fill light intensity of the fill light corresponding to the target shooting area according to the fourth difference value corresponding to the target shooting area.

[0172] S311: For each target shooting area corresponding to the determined fourth difference value within the second preset range, the fill light intensity of the fill light corresponding to the target shooting area is not adjusted.

[0173] Embodiment 7:

[0174] Figure 4 A structural schematic diagram of a fill light device provided in an embodiment of the present invention, the device comprises:

[0175] The acquisition and determination module 401 is used to acquire the first image currently being acquired and determine the first brightness value of the first image; if it is determined that the first brightness value is less than the target brightness value, the current magnification of the image acquisition device when acquiring the first image is acquired, and the target shooting area included in the first image is determined according to the current magnification;

[0176] The processing module 402 is used to determine, for each target shooting area, a sub-image corresponding to the target shooting area in the first image, obtain a second brightness value of the sub-image, and if it is determined to adjust the fill light corresponding to the target shooting area on the image acquisition device based on a current gain value, the second brightness value and a preset threshold, adjust the fill light intensity of the fill light corresponding to the target shooting area, wherein a plurality of fill lights are installed on the image acquisition device.

[0177] Further, the acquisition and determination module 401 is also used to acquire the captured second image and determine the third brightness value of the second image; determine the target parameter adjustment value corresponding to the first difference value according to the first difference value between the target brightness value and the third brightness value, and the correspondence between the difference value and the parameter adjustment value stored in advance; adjust the current exposure parameter according to the target parameter adjustment value, and use the adjusted exposure parameter to update the current exposure parameter to acquire the third image captured after the exposure parameter is adjusted; determine whether the second difference value between the fourth brightness value of the third image and the target brightness value is within a first preset range; if so, take the third image as the first image, and perform the subsequent step of determining the first brightness value of the first image; otherwise, adjust the current exposure parameter according to the target parameter adjustment value until the adjusted exposure parameter reaches a preset parameter threshold, and then take the image captured before reaching the preset parameter threshold as the first image, or until the third difference value between the fifth brightness value of the fourth image captured after the exposure parameter is adjusted and the target brightness value is within the first preset range, then take the fourth image as the first image, and perform the subsequent step of determining the first brightness value of the first image.

[0178] Further, the acquisition and determination module 401 is specifically used to perform an equal division process on the first image, dividing it into a preset number of equally divided areas; and determine the resolution corresponding to the set first shooting area in each set direction in the first image at the current magnification according to the number of shooting areas included in each set direction in the image at the current magnification and the minimum magnification; determine the first number of equally divided areas included in the set first shooting area in each set direction according to the resolution corresponding to the set first shooting area in each set direction and the resolution of the first image; determine the second number of equally divided areas included in the second target area in each set direction according to the first number of equally divided areas of the set first shooting area in each set direction and the total number of equally divided areas included in the first image in each set direction; determine the target number of equally divided areas included in the set first shooting area and the set second shooting area according to the number of equally divided areas included in the set first shooting area and the set second shooting area in each set direction, and determine the shooting area whose target number is not the first preset value as the target shooting area in the first image.

[0179] Furthermore, the acquisition and determination module 401 is specifically used to determine, for each set direction, a first ratio of the resolution in the set direction in the first image to the number of shooting areas included in the set direction in the image at the minimum magnification; and determine the resolution corresponding to the first shooting area set in the set direction based on the product of the first ratio and the current magnification.

[0180] Furthermore, the acquisition and determination module 401 is specifically used to determine, for each set direction, a second ratio of a resolution corresponding to the set first shooting area in the set direction to the resolution in the set direction in the first image, and determine a first number of equally divided areas contained in the set first shooting area in the set direction based on the product of the second ratio and a third number of equally divided areas contained in the set direction in the first image.

[0181] Furthermore, the acquisition and determination module 401 is specifically used to acquire a first focusing step number of the image acquisition device when acquiring the first image; and according to a pre-saved correspondence between the focusing step number and the magnification, determine that the magnification corresponding to the first focusing step number is the current magnification of the image acquisition device when acquiring the first image.

[0182] Furthermore, the acquisition and determination module 401 is also used to obtain a pre-saved minimum magnification, determine the minimum number of steps corresponding to the minimum magnification according to a predetermined correspondence between the number of steps and the magnification, and add the correspondence between the minimum magnification and the minimum number of steps to the correspondence between the focusing steps and the focusing magnification; determine a third ratio between a second preset value and the number of shooting areas contained in a set direction in the image at the minimum magnification, determine a fourth number according to the third ratio, increase the preset increase value to the fourth number in turn, determine each fifth number, and for each fifth number, if the fifth number is less than the preset sixth number, determine a fourth ratio of the fifth number to the fourth number, determine the product of the fourth ratio and the minimum magnification as the target magnification, determine the second focusing step corresponding to the target magnification according to the predetermined correspondence between the number of steps and the magnification, and add the correspondence between the target magnification and the second focusing step to the correspondence between the focusing steps and the focusing magnification.

[0183] Furthermore, the processing module 402 is specifically used to determine a fifth ratio of the current gain value to the second brightness value, and to determine a fourth difference between the fifth ratio and a preset threshold value. If the fourth difference is not within the second preset range, it is determined to adjust the fill light corresponding to the target shooting area on the image acquisition device, and adjust the fill light intensity of the fill light corresponding to the target shooting area according to the fourth difference.

[0184] Furthermore, the processing module 402 is further configured to adjust the fill light intensity of the fill light corresponding to the shooting area not included in the first image to a preset intensity value.

[0185] Embodiment 8:

[0186] Figure 5 FIG. 1 is a schematic diagram of the structure of an electronic device provided by the present invention. Based on the above embodiments, the present invention further provides an electronic device, such as Figure 5 As shown, it includes: a processor 501, a communication interface 502, a memory 503 and a communication bus 504, wherein the processor 501, the communication interface 502, and the memory 503 communicate with each other through the communication bus 504;

[0187] The memory 503 stores a computer program. When the program is executed by the processor 501, the processor 501 performs the following steps:

[0188] Acquire a first image currently captured, and determine a first brightness value of the first image;

[0189] If it is determined that the first brightness value is less than the target brightness value, obtaining a current magnification of the image acquisition device when acquiring the first image, and determining a target shooting area included in the first image according to the current magnification;

[0190] For each target shooting area, determine the sub-image corresponding to the target shooting area in the first image, obtain the second brightness value of the sub-image, and if it is determined to adjust the fill light corresponding to the target shooting area on the image acquisition device based on the current gain value, the second brightness value and the preset threshold, adjust the fill light intensity of the fill light corresponding to the target shooting area, wherein a plurality of fill lights are installed on the image acquisition device.

[0191] In a possible implementation, before determining the first brightness value of the first image, the method further includes:

[0192] Acquire the captured second image, determine the third brightness value of the second image; determine the target parameter adjustment value corresponding to the first difference value according to the first difference value between the target brightness value and the third brightness value, and the correspondence between the difference value and the parameter adjustment value saved in advance; adjust the current exposure parameter according to the target parameter adjustment value, and use the adjusted exposure parameter to update the current exposure parameter, and acquire the third image captured after adjusting the exposure parameter; determine whether the second difference value between the fourth brightness value of the third image and the target brightness value is within a first preset range;

[0193] If yes, taking the third image as the first image, and performing a subsequent step of determining a first brightness value of the first image;

[0194] Otherwise, the current exposure parameter is adjusted according to the target parameter adjustment value until the adjusted exposure parameter reaches a preset parameter threshold, and the image captured before the preset parameter threshold is reached is used as the first image, or until the third difference between the fifth brightness value of the fourth image captured after adjusting the exposure parameter and the target brightness value is within the first preset range, the fourth image is used as the first image, and the subsequent step of determining the first brightness value of the first image is performed.

[0195] In a possible implementation manner, determining the target shooting area included in the first image according to the current magnification includes:

[0196] The first image is divided into a preset number of equally divided areas by performing equal division processing; and according to the number of shooting areas in each set direction in the image at the current magnification and the minimum magnification, a resolution corresponding to the first shooting area in each set direction in the first image at the current magnification is determined;

[0197] Determine a first number of equally divided regions included in the set first shooting area in each set direction according to a resolution corresponding to the set first shooting area in each set direction and a resolution of the first image;

[0198] Determine a second number of equally divided areas included in the second target area in each set direction according to the first number of equally divided areas of the first shooting area in each set direction and the total number of equally divided areas included in the first image in each set direction;

[0199] According to the number of equally divided areas included in the set first shooting area and the set second shooting area in each set direction, a target number of equally divided areas included in the set first shooting area and the set second shooting area is determined, and shooting areas whose target number is not a first preset value are determined as target shooting areas in the first image.

[0200] In a possible implementation manner, determining, according to the number of photographing areas included in each set direction in the image at the current magnification and the minimum magnification, a resolution corresponding to the first photographing area set in each set direction in the first image at the current magnification includes:

[0201] For each set direction, determine a first ratio of the resolution in the set direction in the first image to the number of shooting areas included in the set direction in the image at the minimum magnification; and determine the resolution corresponding to the first shooting area set in the set direction based on the product of the first ratio and the current magnification.

[0202] In a possible implementation manner, determining the first number of equally divided areas included in the set first shooting area in each set direction according to the resolution corresponding to the set first shooting area in each set direction and the resolution of the first image includes:

[0203] For each set direction, determine a second ratio of the resolution corresponding to the set first shooting area in the set direction to the resolution in the set direction in the first image, and determine the first number of equally divided areas included in the set first shooting area in the set direction based on the product of the second ratio and the third number of equally divided areas included in the set direction in the first image.

[0204] In a possible implementation manner, acquiring the current magnification of the image acquisition device when acquiring the first image includes:

[0205] Acquire a first focusing step number of the image acquisition device when acquiring the first image;

[0206] According to the pre-saved correspondence between the number of focusing steps and the magnification, it is determined that the magnification corresponding to the first number of focusing steps is the current magnification of the image acquisition device when acquiring the first image.

[0207] In a possible implementation manner, the corresponding relationship between the focusing steps and the magnification is determined by the following method:

[0208] Obtaining a pre-saved minimum magnification, determining a minimum number of steps corresponding to the minimum magnification according to a predetermined correspondence between the number of steps and the magnification, and adding the correspondence between the minimum magnification and the minimum number of steps to the correspondence between the number of focusing steps and the focusing magnification;

[0209] Determine a third ratio of a second preset value to the number of shooting areas included in a set direction in the image at the minimum magnification, determine a fourth number based on the third ratio, increase the preset increase value for the fourth number in turn, determine each fifth number, and for each fifth number, if the fifth number is less than the preset sixth number, determine a fourth ratio of the fifth number to the fourth number, determine the product of the fourth ratio and the minimum magnification as the target magnification, determine a second focusing step corresponding to the target magnification based on a predetermined correspondence between the number of steps and the magnification, and add the correspondence between the target magnification and the second focusing step to the correspondence between the focusing step and the focusing magnification.

[0210] In a possible implementation, if it is determined to adjust the fill light corresponding to the target shooting area on the image acquisition device according to the current gain value, the second brightness value and the preset threshold, adjusting the fill light intensity of the fill light corresponding to the target shooting area includes:

[0211] Determine a fifth ratio of the current gain value to the second brightness value, and determine a fourth difference between the fifth ratio and a preset threshold value; if the fourth difference is not within the second preset range, determine to adjust the fill light corresponding to the target shooting area on the image acquisition device, and adjust the fill light intensity of the fill light corresponding to the target shooting area according to the fourth difference.

[0212] In a possible implementation, the method further includes:

[0213] The fill light intensity of the fill light corresponding to the shooting area not included in the first image is adjusted to a preset intensity value.

[0214] The communication bus mentioned in the above server can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0215] The communication interface is used for communication between the above electronic device and other devices.

[0216] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0217] The above-mentioned processor can be a general-purpose processor, including a central processing unit, a network processor (Network Processor, NP), etc.; it can also be a digital signal processing processor (Digital Signal Processing, DSP), an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc.

[0218] Embodiment 9:

[0219] On the basis of the above embodiments, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program executable by an electronic device, and when the program is run on the electronic device, the electronic device implements the following steps when executing:

[0220] The memory stores a computer program, and when the program is executed by the processor, the processor performs the following steps:

[0221] Acquire a first image currently captured, and determine a first brightness value of the first image;

[0222] If it is determined that the first brightness value is less than the target brightness value, obtaining a current magnification of the image acquisition device when acquiring the first image, and determining a target shooting area included in the first image according to the current magnification;

[0223] For each target shooting area, determine the sub-image corresponding to the target shooting area in the first image, obtain the second brightness value of the sub-image, and if it is determined to adjust the fill light corresponding to the target shooting area on the image acquisition device based on the current gain value, the second brightness value and the preset threshold, adjust the fill light intensity of the fill light corresponding to the target shooting area, wherein a plurality of fill lights are installed on the image acquisition device.

[0224] In a possible implementation, before determining the first brightness value of the first image, the method further includes:

[0225] Acquire the captured second image, determine the third brightness value of the second image; determine the target parameter adjustment value corresponding to the first difference value according to the first difference value between the target brightness value and the third brightness value, and the correspondence between the difference value and the parameter adjustment value saved in advance; adjust the current exposure parameter according to the target parameter adjustment value, and use the adjusted exposure parameter to update the current exposure parameter, and acquire the third image captured after adjusting the exposure parameter; determine whether the second difference value between the fourth brightness value of the third image and the target brightness value is within a first preset range;

[0226] If yes, taking the third image as the first image, and performing a subsequent step of determining a first brightness value of the first image;

[0227] Otherwise, the current exposure parameter is adjusted according to the target parameter adjustment value until the adjusted exposure parameter reaches a preset parameter threshold, and the image captured before the preset parameter threshold is reached is used as the first image, or until the third difference between the fifth brightness value of the fourth image captured after adjusting the exposure parameter and the target brightness value is within the first preset range, the fourth image is used as the first image, and the subsequent step of determining the first brightness value of the first image is performed.

[0228] In a possible implementation manner, determining the target shooting area included in the first image according to the current magnification includes:

[0229] The first image is divided into a preset number of equally divided areas by performing equal division processing; and according to the number of shooting areas in each set direction in the image at the current magnification and the minimum magnification, a resolution corresponding to the first shooting area in each set direction in the first image at the current magnification is determined;

[0230] Determine a first number of equally divided regions included in the set first shooting area in each set direction according to a resolution corresponding to the set first shooting area in each set direction and a resolution of the first image;

[0231] Determine a second number of equally divided areas included in the second target area in each set direction according to the first number of equally divided areas of the first shooting area in each set direction and the total number of equally divided areas included in the first image in each set direction;

[0232] According to the number of equally divided areas included in the set first shooting area and the set second shooting area in each set direction, a target number of equally divided areas included in the set first shooting area and the set second shooting area is determined, and shooting areas whose target number is not a first preset value are determined as target shooting areas in the first image.

[0233] In a possible implementation manner, determining, according to the number of photographing areas included in each set direction in the image at the current magnification and the minimum magnification, a resolution corresponding to the first photographing area set in each set direction in the first image at the current magnification includes:

[0234] For each set direction, determine a first ratio of the resolution in the set direction in the first image to the number of shooting areas included in the set direction in the image at the minimum magnification; and determine the resolution corresponding to the first shooting area set in the set direction based on the product of the first ratio and the current magnification.

[0235] In a possible implementation manner, determining the first number of equally divided areas included in the set first shooting area in each set direction according to the resolution corresponding to the set first shooting area in each set direction and the resolution of the first image includes:

[0236] For each set direction, determine a second ratio of the resolution corresponding to the set first shooting area in the set direction to the resolution in the set direction in the first image, and determine the first number of equally divided areas included in the set first shooting area in the set direction based on the product of the second ratio and the third number of equally divided areas included in the set direction in the first image.

[0237] In a possible implementation manner, acquiring the current magnification of the image acquisition device when acquiring the first image includes:

[0238] Acquire a first focusing step number of the image acquisition device when acquiring the first image;

[0239] According to the pre-saved correspondence between the number of focusing steps and the magnification, it is determined that the magnification corresponding to the first number of focusing steps is the current magnification of the image acquisition device when acquiring the first image.

[0240] In a possible implementation manner, the corresponding relationship between the focusing steps and the magnification is determined by the following method:

[0241] Obtaining a pre-saved minimum magnification, determining a minimum number of steps corresponding to the minimum magnification according to a predetermined correspondence between the number of steps and the magnification, and adding the correspondence between the minimum magnification and the minimum number of steps to the correspondence between the number of focusing steps and the focusing magnification;

[0242] Determine a third ratio of a second preset value to the number of shooting areas included in a set direction in the image at the minimum magnification, determine a fourth number based on the third ratio, increase the preset increase value for the fourth number in turn, determine each fifth number, and for each fifth number, if the fifth number is less than the preset sixth number, determine a fourth ratio of the fifth number to the fourth number, determine the product of the fourth ratio and the minimum magnification as the target magnification, determine a second focusing step corresponding to the target magnification based on a predetermined correspondence between the number of steps and the magnification, and add the correspondence between the target magnification and the second focusing step to the correspondence between the focusing step and the focusing magnification.

[0243] In a possible implementation, if it is determined to adjust the fill light corresponding to the target shooting area on the image acquisition device according to the current gain value, the second brightness value and the preset threshold, adjusting the fill light intensity of the fill light corresponding to the target shooting area includes:

[0244] Determine a fifth ratio of the current gain value to the second brightness value, and determine a fourth difference between the fifth ratio and a preset threshold value; if the fourth difference is not within the second preset range, determine to adjust the fill light corresponding to the target shooting area on the image acquisition device, and adjust the fill light intensity of the fill light corresponding to the target shooting area according to the fourth difference.

[0245] In a possible implementation, the method further includes:

[0246] The fill light intensity of the fill light corresponding to the shooting area not included in the first image is adjusted to a preset intensity value.

[0247] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0248] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0249] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0250] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0251] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A light filling method, characterized in that: The method comprises: Acquire a first image currently captured, and determine a first brightness value of the first image; If it is determined that the first brightness value is less than the target brightness value, obtaining a current magnification of the image acquisition device when acquiring the first image, and determining a target shooting area included in the first image according to the current magnification; For each target shooting area, determine a sub-image corresponding to the target shooting area in the first image, obtain a second brightness value of the sub-image, and if it is determined to adjust the fill light corresponding to the target shooting area on the image acquisition device according to the current gain value, the second brightness value and a preset threshold, adjust the fill light intensity of the fill light corresponding to the target shooting area, wherein the image acquisition device is installed with a plurality of fill lights; Wherein, determining the target shooting area included in the first image according to the current magnification includes: The first image is divided into a preset number of equally divided areas by performing equal division processing; and according to the number of shooting areas in each set direction in the image at the current magnification and the minimum magnification, a resolution corresponding to the first shooting area in each set direction in the first image at the current magnification is determined; Determine a first number of equally divided regions included in the set first shooting area in each set direction according to a resolution corresponding to the set first shooting area in each set direction and a resolution of the first image; Determine a second number of equally divided areas included in the second target area in each set direction according to the first number of equally divided areas of the first shooting area in each set direction and the total number of equally divided areas included in the first image in each set direction; According to the number of equally divided areas included in the set first shooting area and the set second shooting area in each set direction, a target number of equally divided areas included in the set first shooting area and the set second shooting area is determined, and shooting areas whose target number is not a first preset value are determined as target shooting areas in the first image.

2. The method according to claim 1, characterized in that Before determining the first brightness value of the first image, the method further includes: Acquire the captured second image, determine the third brightness value of the second image; determine the target parameter adjustment value corresponding to the first difference value according to the first difference value between the target brightness value and the third brightness value, and the correspondence between the difference value and the parameter adjustment value saved in advance; adjust the current exposure parameter according to the target parameter adjustment value, and use the adjusted exposure parameter to update the current exposure parameter, and acquire the third image captured after adjusting the exposure parameter; determine whether the second difference value between the fourth brightness value of the third image and the target brightness value is within a first preset range; If yes, taking the third image as the first image, and performing a subsequent step of determining a first brightness value of the first image; Otherwise, the current exposure parameter is adjusted according to the target parameter adjustment value until the adjusted exposure parameter reaches a preset parameter threshold, and the image captured before the preset parameter threshold is reached is used as the first image, or until the third difference between the fifth brightness value of the fourth image captured after adjusting the exposure parameter and the target brightness value is within the first preset range, the fourth image is used as the first image, and the subsequent step of determining the first brightness value of the first image is performed.

3. The method according to claim 1, characterized in that Determining the resolution corresponding to the first shooting area in each set direction in the first image at the current magnification according to the number of shooting areas in each set direction in the image at the current magnification and the minimum magnification includes: For each set direction, determine a first ratio of the resolution in the set direction in the first image to the number of shooting areas included in the set direction in the image at the minimum magnification; and determine the resolution corresponding to the first shooting area set in the set direction based on the product of the first ratio and the current magnification.

4. The method according to claim 1, characterized in that: Determining the first number of equally divided areas included in the set first shooting area in each set direction according to the resolution corresponding to the set first shooting area in each set direction and the resolution of the first image comprises: For each set direction, determine a second ratio of the resolution corresponding to the set first shooting area in the set direction to the resolution in the set direction in the first image, and determine the first number of equally divided areas included in the set first shooting area in the set direction based on the product of the second ratio and the third number of equally divided areas included in the set direction in the first image.

5. The method according to claim 1, characterized in that The acquiring of the current magnification of the image acquisition device when acquiring the first image comprises: Acquire a first focusing step number of the image acquisition device when acquiring the first image; According to the pre-saved correspondence between the number of focusing steps and the magnification, it is determined that the magnification corresponding to the first number of focusing steps is the current magnification of the image acquisition device when acquiring the first image.

6. The method according to claim 5, characterized in that The corresponding relationship between the focusing steps and the magnification is determined by the following method: Obtaining a pre-saved minimum magnification, determining a minimum number of steps corresponding to the minimum magnification according to a predetermined correspondence between the number of steps and the magnification, and adding the correspondence between the minimum magnification and the minimum number of steps to the correspondence between the number of focusing steps and the focusing magnification; Determine a third ratio of a second preset value to the number of shooting areas included in a set direction in the image at the minimum magnification, determine a fourth number based on the third ratio, increase the preset increase value for the fourth number in turn, determine each fifth number, and for each fifth number, if the fifth number is less than the preset sixth number, determine a fourth ratio of the fifth number to the fourth number, determine the product of the fourth ratio and the minimum magnification as the target magnification, determine a second focusing step corresponding to the target magnification based on a predetermined correspondence between the number of steps and the magnification, and add the correspondence between the target magnification and the second focusing step to the correspondence between the focusing step and the focusing magnification.

7. The method according to claim 1, characterized in that If it is determined that the fill light corresponding to the target shooting area on the image acquisition device is to be adjusted according to the current gain value, the second brightness value and the preset threshold, adjusting the fill light intensity of the fill light corresponding to the target shooting area includes: Determine a fifth ratio of the current gain value to the second brightness value, and determine a fourth difference between the fifth ratio and a preset threshold value; if the fourth difference is not within the second preset range, determine to adjust the fill light corresponding to the target shooting area on the image acquisition device, and adjust the fill light intensity of the fill light corresponding to the target shooting area according to the fourth difference.

8. The method according to claim 1, characterized in that The method further comprises: The fill light intensity of the fill light corresponding to the shooting area not included in the first image is adjusted to a preset intensity value.

9. A fill light device, characterized in that: The device comprises: an acquisition and determination module, configured to acquire a first image currently being acquired and determine a first brightness value of the first image; if it is determined that the first brightness value is less than a target brightness value, then acquire a current magnification of the image acquisition device when acquiring the first image, and determine a target shooting area included in the first image according to the current magnification; a processing module, configured to determine, for each target shooting area, a sub-image corresponding to the target shooting area in the first image, obtain a second brightness value of the sub-image, and if it is determined to adjust the fill light corresponding to the target shooting area on the image acquisition device according to a current gain value, the second brightness value, and a preset threshold, adjust the fill light intensity of the fill light corresponding to the target shooting area, wherein the image acquisition device is equipped with a plurality of fill lights; The acquisition and determination module is specifically used to perform an equal division process on the first image, dividing it into a preset number of equally divided areas; and determine the resolution corresponding to the set first shooting area in each set direction of the first image at the current magnification according to the number of shooting areas included in each set direction in the image at the current magnification and the minimum magnification; determine the first number of equally divided areas included in the set first shooting area in each set direction according to the resolution corresponding to the set first shooting area in each set direction and the resolution of the first image; determine the second number of equally divided areas included in the second target area in each set direction according to the first number of equally divided areas of the set first shooting area in each set direction and the total number of equally divided areas included in the first image in each set direction; determine the target number of equally divided areas included in the set first shooting area and the set second shooting area according to the number of equally divided areas included in the set first shooting area and the set second shooting area in each set direction, and determine the shooting area whose target number is not the first preset value as the target shooting area in the first image.

10. An electronic device, characterized in that: The electronic device comprises at least a processor and a memory, and the processor is used to implement the steps of the fill light method as described in any one of claims 1 to 8 when executing the computer program stored in the memory.

11. A computer-readable storage medium, characterized in that: It stores a computer program, and when the computer program is executed by a processor, the steps of the fill light method as described in any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Picture shooting method and device

    CN108335272A

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

    CN108429885A