Image acquisition method, image acquisition device and storage medium
By dynamically adjusting the lighting brightness of the fill light component, the problem of unclear images in light compensation scenes is solved, clear image collection under different object distance conditions is achieved, and the collection quality and success rate are improved.
Patent Information
- Application Number
- CN202110472645.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-29
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2041-04-29
AI Technical Summary
In image collection scenarios that require light compensation, the existing technology cannot effectively adjust the lighting brightness of the fill light component, resulting in unclear captured images.
By monitoring the object distance between the electronic device and the subject, the illumination brightness of the fill light component is dynamically adjusted, and the brightness is gradually set within the preset adjustment range, thereby collecting clear images under different object distance conditions.
It realizes the continuous collection and synthesis of multiple images in a light compensation scene to obtain clear collected images, which improves the quality and success rate of image collection.
Smart Images

Figure CN115278092B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image processing technology, and in particular to an image acquisition method, an image acquisition device and a storage medium. Background Art
[0002] With the development of science and technology, image acquisition has become well-known as a common way of information exchange. Due to its broad application prospects, it appears in various scenes of daily life.
[0003] In the related art, in an image acquisition scenario where light compensation is required, a fill light assembly of an electronic device can be used to perform light compensation at a fixed lighting brightness, and the electronic device can be controlled to acquire images at the fixed lighting brightness. The fill light assembly can be, for example, a flashlight installed in the electronic device, which is a lighting device capable of providing light compensation. In the related art, when acquiring images at a fixed lighting brightness, sometimes a clear image cannot be obtained. Summary of the invention
[0004] In order to overcome the problems existing in the related art, the present disclosure provides an image acquisition method, an image acquisition device and a storage medium.
[0005] According to a first aspect of an embodiment of the present disclosure, there is provided an image acquisition method, which is applied to an electronic device, wherein the electronic device includes a fill light assembly, and the method includes:
[0006] In response to determining that the current scene is an image acquisition scene that requires light compensation, the fill light assembly is turned on; the lighting brightness of the fill light assembly is adjusted according to the light compensation value required for image acquisition; in the process of adjusting the lighting brightness of the fill light assembly, material images are continuously acquired, and all the continuously acquired material images are synthesized to obtain a target image.
[0007] In one embodiment, adjusting the illumination brightness of the fill light assembly includes: monitoring the object distance between the electronic device and the object being photographed; and dynamically adjusting the illumination brightness of the fill light assembly within a preset illumination brightness adjustment range in response to the object distance being less than or equal to a preset object distance threshold.
[0008] In one embodiment, dynamically adjusting the lighting brightness of the fill light assembly within a preset lighting brightness adjustment range includes: determining a first lighting brightness and a second lighting brightness, wherein the first lighting brightness is the maximum lighting brightness for dynamically adjusting the lighting brightness of the fill light assembly, and the second lighting brightness is the minimum lighting brightness for dynamically adjusting the lighting brightness of the fill light assembly; and controlling the lighting brightness of the fill light assembly to be gradually set between the first lighting brightness and the second lighting brightness.
[0009] In one embodiment, the lighting brightness of the fill light assembly is controlled to be gradually set between the first lighting brightness and the second lighting brightness, including: controlling the lighting brightness of the fill light assembly to change step by step from the first lighting brightness to the second lighting brightness; and / or controlling the lighting brightness of the fill light assembly to change step by step from the second lighting brightness to the first lighting brightness.
[0010] In one embodiment, determining the first lighting brightness and the second lighting brightness includes: capturing a first image when the fill light assembly does not perform light compensation, and synchronously capturing a second image while the fill light assembly is gradually adjusting from a third lighting brightness to a fourth lighting brightness, the third lighting brightness being the minimum lighting brightness of the fill light assembly, and the fourth lighting brightness being the maximum lighting brightness of the fill light assembly; when determining that an image dynamic range of the second image extends to a preset threshold relative to an image dynamic range of the first image, determining that the brightness corresponding to the fill light assembly is the first lighting brightness; and based on the corresponding relationship between the object distance and the lighting brightness of the fill light assembly, determining that the brightness corresponding to the current shooting object distance of the electronic device is the second lighting brightness.
[0011] In one embodiment, after monitoring the object distance between the electronic device and the object being photographed, the method further includes: in response to the object distance being greater than a preset object distance threshold, adjusting the fill light assembly to a fourth lighting brightness, the fourth lighting brightness being the maximum lighting brightness of the fill light assembly.
[0012] In one embodiment, the fill light assembly is connected to a pulse width modulation (PWM) pin of an integrated chip of the electronic device; adjusting the lighting brightness of the fill light assembly comprises: controlling the integrated chip to adjust the duty cycle of the PWM pin output, thereby adjusting the lighting brightness of the fill light assembly.
[0013] According to a second aspect of an embodiment of the present disclosure, an image acquisition device is provided, which is applied to an electronic device, wherein the electronic device includes a fill light assembly, and the device includes:
[0014] A determination unit, in response to determining that the current scene is an image acquisition scene that requires light compensation, turns on the fill light assembly; a control unit, for adjusting the illumination brightness of the fill light assembly according to the light compensation value required for image acquisition; a processing unit, for continuously acquiring material images during the process of adjusting the illumination brightness of the fill light assembly, and synthesizing all the continuously acquired material images to obtain a target image.
[0015] In one embodiment, the control unit adjusts the lighting brightness of the fill light assembly in the following manner: monitoring the object distance between the electronic device and the object being photographed; in response to the object distance being less than or equal to a preset object distance threshold, dynamically adjusting the lighting brightness of the fill light assembly within a preset lighting brightness adjustment range.
[0016] In one embodiment, the control unit dynamically adjusts the lighting brightness of the fill light assembly within a preset lighting brightness adjustment range in the following manner: determining a first lighting brightness and a second lighting brightness, wherein the first lighting brightness is the maximum lighting brightness for dynamically adjusting the lighting brightness of the fill light assembly, and the second lighting brightness is the minimum lighting brightness for dynamically adjusting the lighting brightness of the fill light assembly; and controlling the lighting brightness of the fill light assembly to be gradually set between the first lighting brightness and the second lighting brightness.
[0017] In one embodiment, the control unit controls the lighting brightness of the fill light assembly in the following manner, gradually setting it between the first lighting brightness and the second lighting brightness: controlling the lighting brightness of the fill light assembly to change step by step from the first lighting brightness to the second lighting brightness; and / or controlling the lighting brightness of the fill light assembly to change step by step from the second lighting brightness to the first lighting brightness.
[0018] In one embodiment, the control unit determines the first lighting brightness and the second lighting brightness in the following manner: a first image is captured when the fill light assembly does not perform light compensation, and a second image is synchronously captured while the fill light assembly is gradually adjusted from a third lighting brightness to a fourth lighting brightness, the third lighting brightness being the minimum lighting brightness of the fill light assembly, and the fourth lighting brightness being the maximum lighting brightness of the fill light assembly; when it is determined that the image dynamic range of the second image extends to a preset threshold relative to the image dynamic range of the first image, the brightness corresponding to the fill light assembly is determined to be the first lighting brightness; based on the corresponding relationship between the object distance and the lighting brightness of the fill light assembly, the brightness corresponding to the current shooting object distance of the electronic device is determined to be the second lighting brightness.
[0019] In one embodiment, after monitoring the object distance between the electronic device and the object being photographed, the control unit is further used to: in response to the object distance being greater than a preset object distance threshold, adjust the fill light assembly to a fourth lighting brightness, the fourth lighting brightness being the maximum lighting brightness of the fill light assembly.
[0020] In one embodiment, the fill light assembly is connected to a pulse width modulation (PWM) pin of an integrated chip of the electronic device; the control unit adjusts the lighting brightness of the fill light assembly in the following manner: controlling the integrated chip to adjust the duty cycle of the PWM pin output to adjust the lighting brightness of the fill light assembly.
[0021] According to a third aspect of an embodiment of the present disclosure, there is provided an image acquisition device, including:
[0022] a processor; a memory for storing instructions executable by the processor;
[0023] Wherein, the processor is configured to: execute the image acquisition method described in the first aspect or any one of the embodiments of the first aspect.
[0024] According to a fourth aspect of an embodiment of the present disclosure, a storage medium is provided, in which instructions are stored. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the image acquisition method described in the first aspect or any one of the embodiments of the first aspect.
[0025] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: in an image acquisition scene where light compensation is required, the fill light assembly is turned on. The illumination brightness of the fill light assembly is adjusted according to the light compensation value required for image acquisition. In the process of adjusting the illumination brightness, multiple images are continuously acquired and synthesized to obtain a clear acquired image.
[0026] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0028] Figure 1 It is a schematic diagram of an electronic device in the related art.
[0029] Figure 2 The figure is a flow chart of an image acquisition method according to an exemplary embodiment.
[0030] Figure 3 The diagram is a schematic diagram of an electronic device according to an exemplary embodiment.
[0031] Figure 4 The diagram is a schematic diagram showing a method of adjusting a PWM pin output duty cycle according to an exemplary embodiment.
[0032] Figure 5 The present invention is a flow chart of a method for adjusting the lighting brightness of a fill light assembly according to an exemplary embodiment.
[0033] Figure 6 The present invention is a flow chart of a method for determining a first lighting brightness and a second lighting brightness according to an exemplary embodiment.
[0034] Figure 7 The present invention is a flow chart of a method for dynamically adjusting the lighting brightness of a fill light assembly according to an exemplary embodiment.
[0035] Figure 8 The present invention is a schematic diagram showing a method of determining an illumination brightness adjustment range based on a current shooting object distance of an electronic device according to an exemplary embodiment.
[0036] Fig. 9 The present invention is a flowchart of scanning a code by an electronic device for performing light compensation according to an exemplary embodiment.
[0037] Fig.10 The figure is a block diagram of an image acquisition device according to an exemplary embodiment.
[0038] Fig.11 It is a block diagram of a device for image acquisition according to an exemplary embodiment. DETAILED DESCRIPTION
[0039] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0040] The disclosed embodiments can be applied to image acquisition scenarios where light compensation is required, for example, to scenarios where night image acquisition is performed through light compensation of a fill light assembly of an electronic device, such as a code scanning scenario.
[0041] In the related art, when using electronic devices such as mobile phones to collect images, the fill light component of the electronic device can be used to compensate for the light required for image collection. Figure 1As shown, since the fill light assembly of the electronic device is controlled by the light emitting diode (LED) pin of the electronic device integrated chip, it can only provide a fixed lighting brightness by driving a fixed current. Optionally, when the electronic device is close to the photographed object, the light compensation required for image acquisition provided by the fill light assembly of the electronic device will cause problems such as light spots in the captured image, thereby causing the captured image to be unclear. For example, when using an electronic device to scan a code at night, the night code scanning needs to be performed when the electronic device is close enough to the QR code. Therefore, using the fill light assembly to provide the light compensation required for image acquisition will cause a large light spot to appear in the captured QR code image, thereby causing the electronic device to fail to scan the code.
[0042] In view of this, the embodiment of the present disclosure provides an image acquisition method, which can adjust the illumination brightness of the fill light assembly in an image acquisition scene that requires light compensation. In the process of adjusting the illumination brightness, multiple images can be continuously acquired and synthesized to obtain a higher-definition acquired image.
[0043] Figure 2 is a flow chart of an image acquisition method according to an exemplary embodiment. Figure 2 As shown, the image acquisition method is used in an electronic device and includes the following steps.
[0044] In step S11, in response to determining that the current scene is an image acquisition scene that requires light compensation, the fill light assembly is turned on.
[0045] In step S12, the illumination brightness of the fill light assembly is adjusted according to the light compensation value required for image acquisition.
[0046] In step S13, in the process of adjusting the illumination brightness of the fill light assembly, material images are continuously collected, and all the continuously collected material images are synthesized to obtain a target image.
[0047] The image acquisition method provided by the embodiment of the present disclosure can adjust the illumination brightness of the fill light assembly according to the light compensation value required for image acquisition. During the illumination brightness adjustment process, multiple images are acquired and synthesized to obtain a clear acquired image.
[0048] In an example, Figure 3 As shown, the fill light assembly can be connected to the pulse width modulation (PWM) pin of the electronic device integrated chip. In one embodiment, the brightness of the fill light assembly can be adjusted by controlling the duty cycle of the PWM pin output by the integrated chip. For example, Figure 4As shown, the duty cycle of the PWM pin output can be reduced from A to B through the integrated chip. The lighting brightness of the fill light assembly will decrease as the duty cycle decreases, thereby achieving the adjustment of the lighting brightness of the fill light assembly through the duty cycle output by the PWM pin.
[0049] The image acquisition method provided by the embodiment of the present disclosure can adjust the lighting brightness of the fill light assembly by monitoring the object distance between the electronic device and the object being photographed.
[0050] In one example, an object distance threshold may be preset, and the object distance between the electronic device and the object to be photographed may be monitored.
[0051] In one embodiment, when it is detected that the object distance between the electronic device and the object being photographed is less than or equal to a preset object distance threshold, the lighting brightness of the fill light assembly can be dynamically adjusted within a preset lighting brightness adjustment range.
[0052] In another embodiment, when it is detected that the object distance between the electronic device and the object being photographed is greater than a preset object distance threshold, the fill light assembly may be adjusted to the maximum illumination brightness of the fill light assembly.
[0053] For the convenience of description in the embodiment of the present disclosure, the maximum lighting brightness of the fill light assembly is referred to as the fourth lighting brightness.
[0054] Figure 5 is a flow chart of a method for adjusting the lighting brightness of a fill light assembly according to an exemplary embodiment. Figure 5 As shown, the following steps are included.
[0055] In step S21 , the object distance between the electronic device and the object being photographed is monitored.
[0056] In one example, a time of flight (TOF) sensor of the electronic device may be used to monitor the distance between the electronic device and the object being photographed.
[0057] In step S22a, in response to the object distance being less than or equal to a preset object distance threshold, the illumination brightness of the fill light assembly is dynamically adjusted within a preset illumination brightness adjustment range.
[0058] In step S22b, in response to the object distance being greater than a preset object distance threshold, the fill light assembly is adjusted to a fourth illumination brightness.
[0059] In the disclosed embodiment, the object distance threshold between the electronic device and the photographed object can be understood as an object distance used to determine whether the light compensation performed by the fill light assembly at the maximum illumination brightness will interfere with the clarity of the captured image. In one example, the object distance threshold between the electronic device and the photographed object can be predetermined in the following manner. For example, the fill light assembly can be adjusted to the maximum illumination brightness (the fourth illumination brightness) of the fill light assembly, and the object distance between the electronic device and the photographed object can be adjusted to gradually increase from the minimum object distance. In the process of adjusting the object distance, the image is captured synchronously. When it is determined that there is no light spot in the current captured image of the electronic device, the object distance between the electronic device and the photographed object is obtained by TOF, and the object distance is determined as the object distance threshold.
[0060] In one embodiment, when it is determined that the object distance between the electronic device and the photographed object is greater than a preset object distance threshold, it can be determined that the maximum illumination brightness of the fill light assembly at this time will not interfere with the clarity of the captured image. The fill light assembly is adjusted to the maximum illumination brightness of the fill light assembly (the fourth illumination brightness) to increase the brightness of the captured image as much as possible.
[0061] In another embodiment, when it is determined that the object distance between the electronic device and the object being photographed is less than or equal to a preset object distance threshold, it can be determined that the maximum illumination brightness of the fill light assembly will interfere with the clarity of the captured image, and the illumination brightness of the fill light assembly can be controlled within a preset illumination brightness adjustment range to ensure the clarity of the captured image.
[0062] For ease of description in the disclosed embodiments, the maximum illumination brightness of the dynamically adjusted fill light assembly is referred to as the first illumination brightness, and the minimum illumination brightness of the dynamically adjusted fill light assembly is referred to as the second illumination brightness. In one example, the illumination brightness adjustment range can be determined by determining the first illumination brightness and the second illumination brightness, and then the illumination brightness of the fill light assembly can be dynamically adjusted within the illumination brightness adjustment range.
[0063] The following is an explanation of the method for determining the first illumination brightness and the second illumination brightness in the embodiment of the present disclosure. For ease of description, the minimum illumination brightness of the fill light assembly is referred to as the third illumination brightness, and the maximum illumination brightness of the fill light assembly is referred to as the fourth illumination brightness. The image captured when the fill light assembly does not perform light compensation is referred to as the first image, and the image captured synchronously when the fill light assembly is gradually adjusted from the third illumination brightness to the fourth illumination brightness is referred to as the second image.
[0064] Figure 6 is a flow chart of a method for determining a first lighting brightness and a second lighting brightness according to an exemplary embodiment. Figure 6 As shown, the following steps are included.
[0065] In step S31, a first image is captured when the fill light assembly does not perform light compensation, and a second image is synchronously captured when the fill light assembly is gradually adjusted from the third lighting brightness to the fourth lighting brightness.
[0066] In step S32, when it is determined that the image dynamic range of the second image is extended to a preset threshold relative to the image dynamic range of the first image, the brightness corresponding to the fill light assembly is determined to be the first lighting brightness.
[0067] In step S33, based on the correspondence between the object distance and the lighting brightness of the fill light assembly, the brightness corresponding to the current shooting object distance of the electronic device is determined as the second lighting brightness.
[0068] In the disclosed embodiment, the dynamic range of the image can be determined by determining the clarity of each pixel in the image. For example, if the acquired image contains 1024 pixels, and 512 of the pixels are clear pixels, the dynamic range of the image is determined to be 50%. Optionally, determining that the image dynamic range of the second image is extended to a preset threshold relative to the image dynamic range of the first image can also be determined by determining the number of clear pixels in the second image and the first image.
[0069] The image acquisition method provided by the embodiment of the present disclosure can dynamically adjust the lighting brightness of the fill light assembly when the first lighting brightness and the second lighting brightness are determined.
[0070] Figure 7 is a flow chart of a method for dynamically adjusting the lighting brightness of a fill light assembly according to an exemplary embodiment. Figure 7 As shown, the following steps are included.
[0071] In step S41, a first lighting brightness and a second lighting brightness are determined.
[0072] In step S42, the lighting brightness of the fill light assembly is controlled to be gradually set between the first lighting brightness and the second lighting brightness.
[0073] In the embodiment of the present disclosure, it is possible to control the lighting brightness of the fill light assembly, and gradually set it between a first lighting brightness and a second lighting brightness. In one embodiment, the lighting brightness of the fill light assembly can be controlled to change step by step from a first lighting brightness to a second lighting brightness, and / or the lighting brightness of the fill light assembly can be controlled to change step by step from the second lighting brightness to the first lighting brightness. The present disclosure enables the terminal to perform image acquisition under different lighting brightnesses. For example, the lighting brightness of the fill light assembly can be adjusted to change step by step in one direction; for example, the lighting brightness can be controlled to change step by step from bright to dark, that is, it can be adjusted to change step by step from the first lighting brightness to the second lighting brightness, or the lighting brightness can be controlled to change step by step from dark to bright, that is, it can be adjusted to change step by step from the second lighting brightness to the first lighting brightness. For example, the illumination brightness of the fill light assembly can be adjusted bidirectionally and reciprocatingly step by step; for example: the illumination brightness can be controlled to change step by step from bright to dark and then from dark to bright, that is, the first illumination brightness can be adjusted step by step to the second illumination brightness, and then the second illumination brightness can be adjusted step by step to the first illumination brightness, or, for another example: the illumination brightness can be controlled to change step by step from dark to bright and then from bright to dark, that is, the second illumination brightness can be adjusted step by step to the first illumination brightness, and then the first illumination brightness can be adjusted step by step to the second illumination brightness. In some possible implementation examples, the illumination brightness of the fill light assembly can be adjusted bidirectionally and reciprocatingly step by step, which can be to control the illumination brightness of the fill light assembly to change reciprocatingly once, or to control the illumination brightness of the fill light assembly to change reciprocatingly multiple times (twice or more).
[0074] In one example, the object distance range for which the illumination brightness needs to be dynamically adjusted can be predetermined. Optionally, when it is determined that the current object distance of the electronic device is within the object distance range, the illumination brightness adjustment range for dynamically adjusting the illumination brightness can be determined. Figure 8 As shown, the minimum object distance that TOF can detect can be determined, and the object distance can be used as the minimum object distance for which the lighting brightness needs to be dynamically adjusted. The object distance range between the minimum object distance and the object distance threshold is determined as the object distance range for which the lighting brightness needs to be dynamically adjusted. For another example, the first lighting brightness corresponding to the minimum object distance can be determined (the minimum lighting brightness for dynamically adjusting the lighting brightness of the fill light assembly). The lighting brightness adjustment range between the first lighting brightness corresponding to the minimum object distance and the fourth lighting brightness is determined as the lighting brightness adjustment range for which the fill light assembly can dynamically adjust the lighting brightness.
[0075] In the embodiment of the present disclosure, when it is determined that the current shooting object distance of the electronic device is within the object distance range, the first lighting brightness and the second lighting brightness corresponding to the current shooting object distance of the electronic device can be determined within the lighting brightness adjustment range in which the fill light assembly can dynamically adjust the lighting brightness.
[0076] In one embodiment, when it is determined that the current shooting object distance of the electronic device is within the object distance range, the minimum illumination brightness for dynamically adjusting the illumination brightness of the fill light assembly, that is, the first illumination brightness, can be determined by capturing images. For example, when the fill light assembly does not perform light compensation, the first image is captured. And in the process of the fill light assembly gradually adjusting from the minimum illumination brightness to the maximum illumination brightness, the second image is captured synchronously. When it is determined that the image dynamic range of the second image extends to a preset threshold relative to the image dynamic range of the first image, it is determined that the image dynamic range of the second image meets the image synthesis requirements for subsequent image synthesis. Optionally, the illumination brightness of the current fill light assembly is determined as the maximum illumination brightness of the dynamically adjusted fill light assembly, that is, the first illumination brightness.
[0077] In another embodiment, when it is determined that the current shooting object distance of the electronic device is within the object distance range, the maximum illumination brightness of the dynamic adjustment of the fill light assembly illumination brightness, that is, the second illumination brightness, can be determined by the correspondence between the object distance and the illumination brightness of the fill light assembly. The correspondence between the object distance and the illumination brightness of the fill light assembly can be determined in the following manner. For example, when the current shooting object distance of the electronic device is determined, the fill light assembly can be controlled to gradually adjust from the minimum illumination brightness to the maximum illumination brightness, and the image can be captured synchronously. When it is determined that the light spot caused by the illumination of the fill light assembly no longer appears in the current captured image, the current illumination brightness of the fill light assembly is recorded. And the illumination brightness is determined as the illumination brightness corresponding to the current shooting object distance of the electronic device. By repeating the above steps multiple times, the correspondence between the object distance and the illumination brightness of the fill light assembly is obtained.
[0078] In the embodiment of the present disclosure, when it is determined that the current shooting object distance of the electronic device is within the object distance range that requires dynamic adjustment of the illumination brightness, the illumination brightness adjustment range of the fill light assembly can be determined. Within the illumination brightness adjustment range, the illumination brightness of the fill light assembly is dynamically adjusted, so that the electronic device can capture a clearer image.
[0079] In one example, within the range of illumination brightness adjustment, the illumination brightness of the fill light assembly is dynamically adjusted, so that the electronic device can collect material images under different illumination brightnesses. These can include highlight images (images with a larger dynamic range) collected by the electronic device when the illumination brightness of the fill light assembly is relatively high, and dark light images (images with complete dark details) collected by the electronic device when the illumination brightness of the fill light assembly is relatively low. By synthesizing all the collected material images, a higher definition image can be obtained when the electronic device is close to the object being photographed.
[0080] The image acquisition method provided by the embodiment of the present disclosure can be applied to a code scanning scenario or a photo taking scenario in which an electronic device performs light compensation. The following description will be made using a code scanning scenario as an example.
[0081] Fig. 9 is a flowchart of scanning a barcode for light compensation by an electronic device according to an exemplary embodiment. Fig. 9 As shown, when it is determined that the user uses an electronic device to scan the code, the fill light component is turned on. The object distance between the electronic device and the QR code is monitored by TOF.
[0082] In one example, if the object distance between the electronic device and the QR code is greater than a preset object distance threshold (e.g., 1.5 m), the fill light assembly is adjusted to the fourth lighting brightness (the maximum lighting brightness of the fill light assembly) to perform light compensation. During the light compensation process of the fill light assembly, the material image of the QR code is collected by the electronic device, and all the obtained material images are synthesized to obtain a QR code image. The scanned code image is sent to the back-end interface scanning application for scanning, thereby completing the scanning.
[0083] In another example, if it is monitored that the object distance between the electronic device and the QR code is less than or equal to a preset object distance threshold, it is determined that the fill light assembly needs to perform light compensation for dynamically adjusting the lighting brightness within the lighting brightness adjustment range.
[0084] Among them, the maximum illumination brightness (second illumination brightness) of the dynamic adjustment of the illumination brightness of the fill light assembly can be determined according to the object distance between the electronic device and the QR code. The minimum illumination brightness (first illumination brightness) of the dynamic adjustment of the illumination brightness of the fill light assembly can be determined by detecting the dynamic range of the image captured by the electronic device. For example, the fill light assembly can be gradually adjusted from the third illumination brightness (the minimum illumination brightness of the fill light assembly) to the fourth illumination brightness (the maximum illumination brightness of the fill light assembly), and the second image captured synchronously is compared with the first image captured when the fill light assembly does not perform light compensation. If the dynamic range of the second image captured synchronously is expanded by 30% compared with the first image captured when light compensation is not performed, the illumination brightness of the current fill light assembly is determined as the first illumination brightness. Optionally, the illumination brightness of the fill light assembly is dynamically adjusted within the illumination brightness adjustment range. In the process of dynamically adjusting the illumination brightness of the fill light assembly, multiple material images (for example, 10 images) can be captured by the electronic device at different illumination brightnesses. Among them, it can include a highlight image with a large dynamic range and a dark light image with complete dark details. All the captured material images are synthesized to obtain a clear QR code image. The obtained QR code image is sent to the back-end interface scanning application for processing, thereby completing the scanning.
[0085] In the disclosed embodiment, when the object distance between the electronic device and the QR code is greater than a preset object distance threshold, the fill light assembly can be adjusted to a fourth lighting brightness (the maximum lighting brightness of the fill light assembly). When the object distance between the electronic device and the QR code is less than or equal to the preset object distance threshold, the lighting brightness of the fill light assembly can be dynamically adjusted. When the lighting brightness of the fill light assembly is dynamically adjusted, the collected material images of different lighting brightness are synthesized to obtain a clearer scanned code image, thereby improving the scanning success rate of the electronic device.
[0086] Based on the same concept, an embodiment of the present disclosure also provides an image acquisition device.
[0087] It is understandable that the image acquisition device provided by the embodiment of the present disclosure includes hardware structures and / or software modules corresponding to the execution of each function in order to realize the above functions. In combination with the units and algorithm steps of each example disclosed in the embodiment of the present disclosure, the embodiment of the present disclosure can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solution of the embodiment of the present disclosure.
[0088] Fig.10 is a block diagram of an image acquisition device according to an exemplary embodiment. Fig.10 The device 100 includes a determining unit 101, a control unit 102 and a processing unit 103.
[0089] The determination unit 101 is used to turn on the fill light assembly in response to determining that the current scene is an image acquisition scene that needs to perform light compensation. The control unit 102 is used to adjust the lighting brightness of the fill light assembly according to the light compensation value required for image acquisition. The processing unit 103 is used to continuously acquire material images during the process of adjusting the lighting brightness of the fill light assembly, and synthesize all the material images acquired continuously to obtain a target image.
[0090] In one embodiment, the control unit 102 adjusts the illumination brightness of the fill light assembly in the following manner: monitoring the object distance between the electronic device and the object being photographed, and dynamically adjusting the illumination brightness of the fill light assembly within a preset illumination brightness adjustment range in response to the object distance being less than or equal to a preset object distance threshold.
[0091] In one embodiment, the control unit 102 dynamically adjusts the lighting brightness of the fill light assembly within a preset lighting brightness adjustment range in the following manner: determining a first lighting brightness and a second lighting brightness, wherein the first lighting brightness is the maximum lighting brightness for dynamically adjusting the lighting brightness of the fill light assembly, and the second lighting brightness is the minimum lighting brightness for dynamically adjusting the lighting brightness of the fill light assembly. Controlling the lighting brightness of the fill light assembly to be gradually set between the first lighting brightness and the second lighting brightness.
[0092] In one embodiment, the control unit 102 controls the lighting brightness of the fill light assembly in the following manner, and gradually changes between the first lighting brightness and the second lighting brightness: controlling the lighting brightness of the fill light assembly to gradually change from the first lighting brightness to the second lighting brightness. And / or controlling the lighting brightness of the fill light assembly to gradually change from the second lighting brightness to the first lighting brightness.
[0093] In one embodiment, the control unit 102 determines the first lighting brightness and the second lighting brightness in the following manner: the first image is captured when the fill light assembly does not perform light compensation, and the second image is synchronously captured when the fill light assembly is gradually adjusted from the third lighting brightness to the fourth lighting brightness, the third lighting brightness being the minimum lighting brightness of the fill light assembly, and the fourth lighting brightness being the maximum lighting brightness of the fill light assembly. When it is determined that the image dynamic range of the second image is extended to a preset threshold relative to the image dynamic range of the first image, the brightness corresponding to the fill light assembly is determined to be the first lighting brightness. Based on the corresponding relationship between the object distance and the lighting brightness of the fill light assembly, the brightness corresponding to the current object distance of the electronic device is determined to be the second lighting brightness.
[0094] In one embodiment, after monitoring the object distance between the electronic device and the object being photographed, the control unit 102 is further used to: in response to the object distance being greater than a preset object distance threshold, adjust the fill light assembly to a fourth lighting brightness, the fourth lighting brightness being the maximum lighting brightness of the fill light assembly.
[0095] In one embodiment, the fill light assembly is connected to a pulse width modulation (PWM) pin of an integrated chip of an electronic device. The control unit 102 adjusts the lighting brightness of the fill light assembly by controlling the integrated chip to adjust the duty cycle of the PWM pin output to adjust the lighting brightness of the fill light assembly.
[0096] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0097] Fig.112 is a block diagram of an apparatus 200 for image acquisition according to an exemplary embodiment. For example, the apparatus 200 may be a mobile phone, a computer, a digital broadcast electronic device, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0098] Reference Fig.11 , the device 200 may include one or more of the following components: a processing component 202 , a memory 204 , a power component 206 , a multimedia component 208 , an audio component 210 , an input / output (I / O) interface 212 , a sensor component 214 , and a communication component 216 .
[0099] The processing component 202 generally controls the overall operation of the device 200, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 202 may include one or more processors 220 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 202 may include one or more modules to facilitate interaction between the processing component 202 and other components. For example, the processing component 202 may include a multimedia module to facilitate interaction between the multimedia component 208 and the processing component 202.
[0100] The memory 204 is configured to store various types of data to support operations on the device 200. Examples of such data include instructions for any application or method operating on the device 200, contact data, phone book data, messages, pictures, videos, etc. The memory 204 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0101] The power component 206 provides power to the various components of the device 200. The power component 206 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 200.
[0102] The multimedia component 208 includes a screen that provides an output interface between the device 200 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 208 includes a front camera and / or a rear camera. When the device 200 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0103] The audio component 210 is configured to output and / or input audio signals. For example, the audio component 210 includes a microphone (MIC), and when the device 200 is in an operation mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 204 or sent via the communication component 216. In some embodiments, the audio component 210 also includes a speaker for outputting audio signals.
[0104] I / O interface 212 provides an interface between processing component 202 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0105] The sensor assembly 214 includes one or more sensors for providing various aspects of the status assessment of the device 200. For example, the sensor assembly 214 can detect the open / closed state of the device 200, the relative positioning of components, such as the display and keypad of the device 200, the sensor assembly 214 can also detect the position change of the device 200 or a component of the device 200, the presence or absence of user contact with the device 200, the orientation or acceleration / deceleration of the device 200 and the temperature change of the device 200. The sensor assembly 214 can include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 214 can also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 214 can also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.
[0106] The communication component 216 is configured to facilitate wired or wireless communication between the device 200 and other devices. The device 200 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 216 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 216 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0107] In an exemplary embodiment, the apparatus 200 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.
[0108] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 204 including instructions, and the instructions can be executed by the processor 220 of the device 200 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0109] It is to be understood that in the present disclosure, "plurality" refers to two or more than two, and other quantifiers are similar. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. The singular forms "a", "the" and "the" are also intended to include plural forms, unless the context clearly indicates other meanings.
[0110] It is further understood that the terms "first", "second", etc. are used to describe various information, but such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other, and do not indicate a specific order or degree of importance. In fact, the expressions "first", "second", etc. can be used interchangeably. For example, without departing from the scope of the present disclosure, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information.
[0111] It can be further understood that, unless otherwise specified, “connection” includes a direct connection without other components between the two, and also includes an indirect connection with other components between the two.
[0112] It is further understood that, although the operations are described in a specific order in the drawings in the embodiments of the present disclosure, it should not be understood as requiring the operations to be performed in the specific order shown or in a serial order, or requiring the execution of all the operations shown to obtain the desired results. In certain environments, multitasking and parallel processing may be advantageous.
[0113] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0114] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. An image acquisition method, characterized in that: Applied to an electronic device, the electronic device includes a fill light assembly, and the method includes: In response to determining that the current scene is an image acquisition scene that requires light compensation, turning on the fill light assembly; Adjusting the illumination brightness of the fill light assembly according to the light compensation value required for image acquisition; In the process of adjusting the illumination brightness of the fill light assembly, material images are continuously collected, and all the material images obtained by continuous collection are synthesized to obtain a target image. Wherein, all the material images obtained by continuous acquisition include material images under different lighting brightness; Wherein, adjusting the illumination brightness of the fill light assembly includes: Monitoring the distance between the electronic device and the object being photographed; In response to the object distance being less than or equal to a preset object distance threshold, the illumination brightness of the fill light assembly is dynamically adjusted within a preset illumination brightness adjustment range.
2. The image acquisition method according to claim 1, characterized in that: The step of dynamically adjusting the lighting brightness of the fill light assembly within a preset lighting brightness adjustment range includes: Determine a first lighting brightness and a second lighting brightness, wherein the first lighting brightness is a maximum lighting brightness for dynamically adjusting the lighting brightness of the fill light assembly, and the second lighting brightness is a minimum lighting brightness for dynamically adjusting the lighting brightness of the fill light assembly; The lighting brightness of the fill light assembly is controlled to be gradually set between the first lighting brightness and the second lighting brightness.
3. The image acquisition method according to claim 2, characterized in that: Controlling the illumination brightness of the fill light assembly to gradually change between the first illumination brightness and the second illumination brightness includes: Controlling the illumination brightness of the fill light assembly to change gradually from the first illumination brightness to the second illumination brightness; and / or The lighting brightness of the fill light assembly is controlled to change step by step from the second lighting brightness to the first lighting brightness.
4. The image acquisition method according to claim 2 or 3, characterized in that: Determining the first lighting brightness and the second lighting brightness includes: The first image is captured when the fill light assembly does not perform light compensation, and the second image is captured synchronously when the fill light assembly is gradually adjusted from a third lighting brightness to a fourth lighting brightness, wherein the third lighting brightness is the minimum lighting brightness of the fill light assembly, and the fourth lighting brightness is the maximum lighting brightness of the fill light assembly; When it is determined that the image dynamic range of the second image is extended to a preset threshold relative to the image dynamic range of the first image, determining that the brightness corresponding to the fill light assembly is the first lighting brightness; Based on the corresponding relationship between the object distance and the lighting brightness of the fill light assembly, the brightness corresponding to the current shooting object distance of the electronic device is determined as the second lighting brightness.
5. The image acquisition method according to claim 1, characterized in that: After monitoring the object distance between the electronic device and the photographed object, the method further includes: In response to the object distance being greater than a preset object distance threshold, the fill light assembly is adjusted to a fourth lighting brightness, where the fourth lighting brightness is the maximum lighting brightness of the fill light assembly.
6. The image acquisition method according to claim 1, characterized in that: The fill light assembly is connected to a pulse width modulation (PWM) pin of an integrated chip of the electronic device; Adjusting the illumination brightness of the fill light assembly includes: The integrated chip is controlled to adjust the duty cycle of the PWM pin output, so as to adjust the lighting brightness of the fill light assembly.
7. An image acquisition device, characterized in that: Applied to electronic equipment, the electronic equipment includes a fill light assembly, and the device includes: a determination unit, in response to determining that the current scene is an image acquisition scene requiring light compensation, turning on the fill light assembly; A control unit, used to adjust the illumination brightness of the fill light assembly according to the light compensation value required for image acquisition; A processing unit is used to continuously collect material images during the process of adjusting the illumination brightness of the fill light assembly, and synthesize all the material images obtained by continuous collection to obtain a target image, Wherein, all the material images obtained by continuous acquisition include material images under different lighting brightness; The control unit adjusts the lighting brightness of the fill light assembly in the following manner: Monitoring the distance between the electronic device and the object being photographed; In response to the object distance being less than or equal to a preset object distance threshold, the illumination brightness of the fill light assembly is dynamically adjusted within a preset illumination brightness adjustment range.
8. The image acquisition device according to claim 7, characterized in that: The control unit dynamically adjusts the lighting brightness of the fill light assembly within a preset lighting brightness adjustment range in the following manner: Determine a first lighting brightness and a second lighting brightness, wherein the first lighting brightness is a maximum lighting brightness for dynamically adjusting the lighting brightness of the fill light assembly, and the second lighting brightness is a minimum lighting brightness for dynamically adjusting the lighting brightness of the fill light assembly; The lighting brightness of the fill light assembly is controlled to be gradually set between the first lighting brightness and the second lighting brightness.
9. The image acquisition device according to claim 8, characterized in that: The control unit controls the lighting brightness of the fill light assembly in the following manner, and gradually changes between the first lighting brightness and the second lighting brightness: Controlling the illumination brightness of the fill light assembly to change gradually from the first illumination brightness to the second illumination brightness; and / or The lighting brightness of the fill light assembly is controlled to change step by step from the second lighting brightness to the first lighting brightness.
10. The image acquisition device according to claim 8 or 9, characterized in that: The control unit determines the first lighting brightness and the second lighting brightness in the following manner: The first image is captured when the fill light assembly does not perform light compensation, and the second image is captured synchronously when the fill light assembly is gradually adjusted from a third lighting brightness to a fourth lighting brightness, wherein the third lighting brightness is the minimum lighting brightness of the fill light assembly, and the fourth lighting brightness is the maximum lighting brightness of the fill light assembly; When it is determined that the image dynamic range of the second image is extended to a preset threshold relative to the image dynamic range of the first image, determining that the brightness corresponding to the fill light assembly is the first lighting brightness; Based on the corresponding relationship between the object distance and the lighting brightness of the fill light assembly, the brightness corresponding to the current shooting object distance of the electronic device is determined as the second lighting brightness.
11. The image acquisition device according to claim 8, characterized in that: After monitoring the object distance between the electronic device and the photographed object, the control unit is further used to: In response to the object distance being greater than a preset object distance threshold, the fill light assembly is adjusted to a fourth lighting brightness, where the fourth lighting brightness is the maximum lighting brightness of the fill light assembly.
12. The image acquisition device according to claim 7, characterized in that: The fill light assembly is connected to a pulse width modulation (PWM) pin of an integrated chip of the electronic device; the control unit adjusts the illumination brightness of the fill light assembly in the following manner: The integrated chip is controlled to adjust the duty cycle of the PWM pin output, so as to adjust the lighting brightness of the fill light assembly.
13. An image acquisition device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: execute the image acquisition method described in any one of claims 1 to 6.
14. A storage medium, characterized in that: The storage medium stores instructions, and when the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the image acquisition method described in any one of claims 1 to 6.
Citation Information
Patent Citations
Method and device for intelligently controlling brightness of flash of camera
CN102573239A
Photographing method and device based on screen light compensation and mobile terminal
CN105554411A
Brightness adjustment method and device of supplement light
CN107707826A
Image collection device with light splitting and fusion functions
CN107845083A
Light supplement brightness adjusting method, mobile terminal and storage medium
CN108270966A
