CN116366988A - Image acquisition method, device and computer readable storage medium - Google Patents

Image acquisition method, device and computer readable storage medium Download PDF

Info

Publication number
CN116366988A
CN116366988A CN202111581554.1A CN202111581554A CN116366988A CN 116366988 A CN116366988 A CN 116366988A CN 202111581554 A CN202111581554 A CN 202111581554A CN 116366988 A CN116366988 A CN 116366988A
Authority
CN
China
Prior art keywords
image
channel
image sensor
acquired
lighting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111581554.1A
Other languages
Chinese (zh)
Inventor
霍文甲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202111581554.1A priority Critical patent/CN116366988A/en
Publication of CN116366988A publication Critical patent/CN116366988A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02BCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
    • Y02B20/00Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps
    • Y02B20/40Control techniques providing energy savings, e.g. smart controller or presence detection

Landscapes

  • Studio Devices (AREA)

Abstract

The disclosure relates to an image acquisition method, an image acquisition device and a computer readable storage medium, so as to ensure that a light device with a bright-dark period is in a normal lighting state in an acquired image, and avoid the problem that the light device is extinguished in the image. The method comprises the following steps: in response to receiving the image capturing instruction, determining whether light equipment with a bright-dark period exists in the object to be shot; if the light equipment is determined to exist, adjusting the exposure time of an M channel of the image sensor so that the light equipment is in a lighting state in an image acquired by a target channel of the image sensor, wherein the target channel is an S channel and/or an L channel; when the lighting device is in a lighting state in an image acquired by a target channel of the image sensor, shooting an object to be shot to obtain a shooting image.

Description

Image acquisition method, device and computer readable storage medium
Technical Field
The present disclosure relates to the field of image technologies, and in particular, to an image acquisition method, an image acquisition device, and a computer readable storage medium.
Background
The need for shooting traffic lights is often encountered in the field of intelligent traffic. Most signal lamps are directly powered by 220V mains, so there will be a 10ms light energy period (110V in the united states and 8.3ms period). Occasionally, signal lamp manufacturers steal materials and use half-wave rectifying devices to filter the negative half of the electrical frequency, which results in the signal lamp being extinguished for 10ms after each 10ms. Although not visible to the human eye, the image sensor captures very clearly. However, if the signal lamp is completely dark in the image, the image is not available, and thus, it is not desirable for the user to take a problem that the signal lamp is completely dark in the image.
Disclosure of Invention
To overcome the problems in the related art, the present disclosure provides an image acquisition method, apparatus, and computer-readable storage medium.
According to a first aspect of an embodiment of the present disclosure, there is provided an image acquisition method including:
in response to receiving the image capturing instruction, determining whether light equipment with a bright-dark period exists in the object to be shot;
if the light equipment is determined to exist, adjusting the exposure time of an M channel of an image sensor so that the light equipment is in a lighting state in an image acquired by a target channel of the image sensor, wherein the target channel is an S channel and/or an L channel;
when the lighting equipment is in a lighting state in an image acquired by a target channel of the image sensor, shooting the object to be shot so as to obtain a shooting image.
Optionally, if it is determined that the light device exists, adjusting an exposure time of an M channel of the image sensor, including:
if the light equipment is determined to exist, determining the brightness of the environment where the image sensor is located;
increasing the exposure time of the M channel of the image sensor under the condition that the brightness is greater than or equal to a preset threshold value; and
And reducing the exposure time of the M channel of the image sensor under the condition that the brightness is smaller than the preset threshold value.
Optionally, when the image collected by the lighting device in the target channel of the image sensor is in a lighting state, shooting the object to be shot to obtain a shot image, including:
when the lighting equipment is in a lighting state in an image acquired by a target channel of the image sensor, determining the current moment;
if the current moment is within the preset night time period, fusing the images acquired by at least two channels to obtain a shooting image.
Optionally, if the current time is within a preset night time period, fusing the images acquired by the at least two channels to obtain a captured image, including:
if the current moment is within a preset night time period, selecting a plurality of groups of target images from images acquired by an M channel, an S channel and an L channel, wherein each group of target images at least comprises images acquired by two channels;
fusing the images in each group of target images, and determining the saturation of the fused images;
And determining a shooting image according to the saturation of each fused image.
Optionally, the target channels are an S channel and an L channel; when the lighting device is in a lighting state in an image acquired by a target channel of the image sensor, shooting the object to be shot to obtain a shot image, including:
if the current moment is not in the preset night time period, determining an image acquired by any channel in the target channel or an image obtained by fusing an image acquired by the S channel and an image acquired by the L image as a shooting image.
Optionally, if it is determined that the light device exists, adjusting an exposure time of an M channel of the image sensor, including:
after the exposure time of the M channels is adjusted once, detecting whether the lighting equipment is in a lighting state in an image acquired by a target channel of the image sensor;
if the LED is in the lighting state, stopping adjusting the exposure time of the M channel;
and if the lighting state is not established, continuing to execute the step of adjusting the exposure time of the M channel of the image sensor until the lighting equipment is in the lighting state in the image acquired by the target channel.
Optionally, the determining whether the lighting device with the bright-dark period exists in the object to be photographed in response to receiving the image capturing instruction includes:
in response to receiving an image capturing instruction, pre-acquiring an initial image containing an object to be photographed;
and determining whether the lighting equipment with the bright and dark periods exists in the object to be shot according to the initial image and a preset lighting equipment identification model, wherein the preset lighting identification model is obtained by training a sub-image of the lighting equipment with the bright and dark periods, which is included in the sample image, as output by taking the sample image as input.
According to a second aspect of embodiments of the present disclosure, there is provided an image acquisition apparatus including:
a first determining module configured to determine whether a lighting device having a bright-dark period exists in an object to be photographed in response to receiving an image capturing instruction;
the adjusting module is configured to adjust the exposure time of an M channel of the image sensor if the light equipment exists, so that the light equipment is in a lighting state in an image acquired by a target channel of the image sensor, wherein the target channel is an S channel and/or an L channel;
And the shooting module is configured to shoot the object to be shot when the light equipment is in a lighting state in the image acquired by the target channel of the image sensor so as to acquire a shot image.
Optionally, the adjusting module includes:
the first determining submodule is configured to determine the brightness of the environment where the image sensor is located if the light equipment exists;
an increasing sub-module configured to increase an exposure time of an M-channel of the image sensor if the brightness is greater than or equal to a preset threshold; and
a reduction sub-module configured to reduce an exposure time of M channels of the image sensor if the brightness is less than the preset threshold.
Optionally, the shooting module includes:
a second determining submodule configured to determine a current time when the light equipment is in a lighting state in an image acquired by a target channel of the image sensor;
and the first fusion submodule is configured to fuse the images acquired by at least two channels to obtain a shooting image if the current moment is within a preset night time period.
Optionally, the first fusion submodule includes:
A selecting sub-module, configured to select multiple groups of target images from the images acquired by the M channel, the S channel and the L channel if the current moment is within a preset night time period, wherein each group of target images at least comprises two images acquired by the channels;
the second fusion submodule is configured to fuse the images in each group of target images and determine the saturation of the fused images;
and a third determination sub-module configured to determine a photographed image according to the saturation of each of the fused images.
Optionally, the target channels are an S channel and an L channel; the shooting module 503 is configured to: if the current moment is not in the preset night time period, determining an image acquired by any channel in the target channel or an image obtained by fusing an image acquired by the S channel and an image acquired by the L image as a shooting image.
Optionally, the adjusting module includes:
the detection submodule is configured to detect whether the lighting equipment is in a lighting state in an image acquired by a target channel of the image sensor after the exposure time of the M channel is adjusted once;
a stop sub-module configured to stop adjustment of the exposure time of the M channel if in a lit state;
And the execution sub-module is configured to continuously execute the step of adjusting the exposure time of the M channel of the image sensor if the lighting device is not in the lighting state until the lighting device is in the lighting state in the image acquired by the target channel.
Optionally, the determining module includes:
an acquisition sub-module configured to acquire an initial image containing an object to be photographed in advance in response to receiving an image capturing instruction;
and a fourth determining submodule configured to determine whether the lighting device with the bright and dark period exists in the object to be shot according to the initial image and a preset lighting device identification model, wherein the preset lighting device identification model is obtained by training with a sample image as input and a sub-image of the lighting device with the bright and dark period included in the sample image as output.
According to a third aspect of the embodiments of the present disclosure, there is provided an image acquisition apparatus including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
in response to receiving the image capturing instruction, determining whether light equipment with a bright-dark period exists in the object to be shot;
If the light equipment is determined to exist, adjusting the exposure time of an M channel of an image sensor so that the light equipment is in a lighting state in an image acquired by a target channel of the image sensor, wherein the target channel is an S channel and/or an L channel;
when the lighting equipment is in a lighting state in an image acquired by a target channel of the image sensor, shooting the object to be shot so as to obtain a shooting image.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the steps of the image acquisition method provided by the first aspect of the present disclosure.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects:
by adopting the technical scheme, the exposure time of the M channel of the image sensor is adjusted, so that the lighting equipment is in a lighting state in the image acquired by the target channel of the image sensor, and when the lighting equipment is in the lighting state in the image acquired by the target channel of the image sensor, the object to be shot is shot, so that a shot image is obtained. Therefore, the lighting equipment with the lighting and darkness period can be ensured to be in a normal lighting state in the acquired image, the condition that the lighting equipment is extinguished in the image is avoided, and the usability of the shot image is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a schematic diagram illustrating an image sensor capturing an image of a signal light, according to an exemplary embodiment.
Fig. 2 is a schematic diagram showing an image sensor acquiring a signal light image at night according to an exemplary embodiment.
FIG. 3 is a schematic diagram illustrating the acquisition of signal lamp images using a chopped exposure scheme, according to an exemplary embodiment.
Fig. 4 is a flowchart illustrating an image acquisition method according to an exemplary embodiment.
Fig. 5 is a schematic diagram showing a 3-triggered HDR continuous out multi-frames, according to an example embodiment.
Fig. 6 is a schematic diagram of a 3-triggered HDR sampling, shown in accordance with an exemplary embodiment.
Fig. 7 is another 3-triggered HDR sampling schematic, shown in accordance with an exemplary embodiment.
Fig. 8 is a block diagram of an image acquisition apparatus according to an exemplary embodiment.
Fig. 9 is a block diagram of an image acquisition apparatus according to an exemplary embodiment.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
As described in the background art, because the signal lamp has a bright-dark period, when the exposure time of the image sensor is short, the signal lamp is turned off in a certain frame of image acquired by the image sensor. By way of example, fig. 1 is a schematic diagram illustrating an image sensor capturing signal light images according to an exemplary embodiment. The signal lamp has a bright-dark period, and in the signal lamp waveform diagram shown in fig. 1, a high level indicates that the signal lamp is in a bright state, and a low level indicates that the signal lamp is in a dark state. In the waveform diagram of the image sensor shutter shown in fig. 1, a high level indicates that the image sensor is in an exposed state. In the signal lamp image shown in fig. 1, the signal lamp is in a lit state in the nth frame image, and in a turned-off state in the n+1th frame image. At this time, the n+1st frame image is not available, i.e., the image captured by the image sensor is low in availability.
Furthermore, in sunny summer, the exposure time of the image sensor may be shorter than 1ms to ensure that the acquired image is not overexposed, but the probability of signal lamp extinction is close to 50% in this case, so that half of the acquired images have signal lamp extinction. At night, the exposure time of the image sensor is usually longer than 10ms, and at this time, the problem that the signal lamp is extinguished is not encountered in the collected image, but the problem that the image collected by the image sensor is supersaturated due to the fact that the exposure time is longer and the signal lamp is too strong is extremely likely to be encountered. Illustratively, in fig. 2, the signal lamp is in an on state in each frame image.
In practical applications, besides traffic lights, LED (light emitting diode) headlamps or signal lights used in many vehicles also have a bright-dark period, and the time in which the LED lamps are turned on in one bright-dark period may be shorter, in which case the probability that the image sensor captures that the LED lamps are turned off is greater.
In order to solve the problem that signal lamps are all in a turned-off state in an image acquired by an image sensor, in the related art, it is proposed to add a chopper to the image sensor so that the image sensor can operate in a chopping exposure operation mode. The principle of chopper exposure is to disperse the time (e.g., 1 ms) required for normal exposure into a preset duration for execution, and to realize 1ms equivalent exposure time by effect accumulation of a plurality of short exposures. As shown in fig. 3, assuming that the lighting period of the signal lamp is 10ms, 1ms may be dispersed to be performed within a 11ms period, for example, 1ms may be dispersed to 10 0.1ms, that is, 10 exposures are performed within 11ms, and each exposure period is 0.1ms. The advantage of this approach is that the probability of capturing the lighting of the signal is increased, but because of the short capture time, the brightness of the signal on the image will be weaker than normal and therefore the image will not be usable.
In view of this, the present disclosure provides an image acquisition method to ensure that a lighting device with a lighting period is in a normal lighting state in an acquired image, so as to avoid the problem that the lighting device is extinguished in the image.
Fig. 4 is a flowchart illustrating an image acquisition method according to an exemplary embodiment. As shown in fig. 4, the method may include the following steps.
In step S41, in response to receiving the image capturing instruction, it is determined whether or not there is a lighting device having a light-dark period in the subject to be photographed.
The image acquisition method provided by the disclosure can be applied to terminal equipment provided with an image sensor, and the terminal equipment can be terminal equipment such as notebook computers, desktop computers, tablet computers, mobile phones, industrial personal computers and the like. The image sensor may be a camera, which may be a monocular camera, a binocular camera, a depth camera, etc., which is not particularly limited by the present disclosure.
In one possible manner, a physical key or a touch key for indicating to turn on the image sensor is arranged in the terminal device, and accordingly, the user can send out an image capturing instruction by clicking the physical key or touching the touch key. In another possible manner, a voice recognition module is provided in the terminal device, and accordingly, the user can input an image capturing instruction through voice.
After the terminal device receives the image capturing instruction, the terminal device may determine whether there is a lighting device having a bright-dark period in the object to be photographed in response to the image capturing instruction.
The value indicates that when the user needs to use the image sensor of the terminal device to shoot an image, the image sensor, for example, a lens of a camera is aligned with the object to be shot in advance, so that the image of the object to be acquired can be displayed in a display interface of the terminal device. In addition, in consideration of a large acquisition field of view of the image sensor, images of a plurality of objects, in this case, all of which are objects to be photographed, may be displayed in the display interface of the terminal device.
In one embodiment, images of various lighting devices having a lighting period, such as an image of a traffic light, an image of an LED headlight on a vehicle, and the like, are stored in advance in the terminal device or in the image sensor. After determining the object to be photographed, whether the light device with the bright and dark period exists in the object to be photographed can be determined according to the image of the object to be photographed displayed in the display interface and the pre-stored image of the light device with the bright and dark period.
In another embodiment, it may be determined whether or not there is a lighting device having a bright-dark period in the subject to be photographed based on a machine learning manner. For example, in response to receiving an image capturing instruction, an initial image including an object to be captured is acquired in advance, and whether a light device with a bright-dark period exists in the object to be captured is determined according to the initial image and a preset light device identification model, for example, the initial image is input to the light device identification model to obtain an identification result output by the light device identification model, wherein if the light device with the bright-dark period exists in the object to be captured, the identification result is the light device with the bright-dark period in the object to be captured, and if the light device with the bright-dark period does not exist in the object to be captured, the identification result is used for indicating that the light device with the bright-dark period does not exist in the object to be captured. The lighting equipment identification model is obtained by training with a sample image as input and sub-images of lighting equipment with a light and dark period included in the sample image as output. The values are described in the specification, and the specific training mode of the lighting equipment identification model can refer to the training mode of the neural network model in the prior art, so that the disclosure is not particularly limited.
In step S42, if it is determined that the lighting device is present, the exposure time of the M channel of the image sensor is adjusted so that the lighting device is in a lighting state in the image acquired by the target channel of the image sensor, where the target channel is an S channel and/or an L channel.
The stationary HDR technology takes 'long and short frames' with 'lines' as output units, and can simultaneously acquire multi-frame images with different exposure time during one shooting, so that the time interval between frames is greatly reduced, and the occurrence possibility of 'ghosts' is reduced. Therefore, in the present disclosure, a 3-interleaved high dynamic range (stabilized HDR) scheme may be used to capture images, so that three images may be acquired for long, medium, and short three exposures, respectively, during one capture, where the three images acquired for the long, medium, and short three exposures are output using different channels, i.e., the S-channel, M-channel, and L-channel in the image sensor are used to output images with different exposure times. The values illustrate that although three images of different exposure times can be obtained by one shot, the image sensor can ultimately output only one image, i.e., the shot image mentioned in the following of the present disclosure.
Fig. 5 is a schematic diagram showing a 3-triggered HDR continuous out multi-frames, according to an example embodiment. As shown in fig. 5, the duration of one shot is 33ms, and in the process of shooting one frame of image, long, medium and short exposures are respectively performed. In fig. 5, the ratio of the exposure time of the S channel, the exposure time of the M channel, and the exposure time of the L channel is 1:2:4. that is, the exposure time of the S channel is 4.5ms, the exposure time of the M channel is 9ms and the exposure time of the L channel is 18ms. The values illustrate that the case of two shots is shown in fig. 5, and there may be overlap of the times of the two shots, as shown in fig. 5, and the exposure time of the L channel during the previous shot may overlap with the exposure time of the S channel during the current shot.
In general, at the time of photographing, an image is output in S channel, then an image is output in M channel, and finally an image is output in L channel. The values illustrate that the sequence of exposure of each channel is: s-channel, M-channel and L-channel. Thus, to facilitate adjustment, in the present disclosure, the exposure time of the M channel located in the middle is adjusted to bring the lighting device into a lit state in the image acquired by the target channel of the image sensor.
Fig. 6 is a schematic diagram of a 3-triggered HDR sampling, shown in accordance with an exemplary embodiment. As shown in fig. 6, the target channel is an L channel, and the lighting device is in a lighting state in the image acquired by the L channel of the image sensor by adjusting the exposure time of the M channel. Fig. 7 is another 3-triggered HDR sampling schematic, shown in accordance with an exemplary embodiment. As shown in fig. 7, the target channels are an S channel and an L channel, and the exposure time of the M channel is adjusted, so that the lighting device is in a lighting state in the images acquired by the S channel and the L channel of the image sensor. In fig. 6 and 7, the lighting device is in a lighting state in the image collected by the M channel.
In the disclosure, if it is determined that there is a lighting device, adjusting exposure time of M channels of an image sensor, so that a specific implementation manner that the lighting device is in a lighting state in an image acquired by a target channel of the image sensor is:
first, after each adjustment of the exposure time of M channels, it is detected whether the lighting device is in a lit state in the image acquired by the target channel of the image sensor.
For example, the exposure time of the M-channel may be adjusted by a fixed value, e.g., 2ms each time the exposure time of the M-channel is adjusted, or by a variable value, i.e., each time the adjusted value is different, e.g., the exposure time of the M-channel is adjusted for 2ms for the first time, 1.5ms for the second time, etc. The values illustrate that the adjustment of the M-channel exposure time may be either an increase in the M-channel exposure time or a decrease in the M-channel exposure time.
In the present disclosure, whether to increase or decrease the M-channel exposure time may be determined according to the brightness of the environment in which the image sensor is located. For example, if it is determined that a lighting device is present, the brightness of the environment in which the image sensor is located is determined, wherein the brightness sensor may be employed to detect the brightness of the environment in which the image sensor is located. And increasing the exposure time of the M channel of the image sensor when the brightness is greater than or equal to a preset threshold value, and decreasing the exposure time of the M channel of the image sensor when the brightness is less than the preset threshold value.
Then, when the light is turned on, the adjustment of the exposure time of the M channel is stopped. If the lighting state is not established, the step of adjusting the exposure time of the M channel of the image sensor is continuously carried out until the lighting equipment is in the lighting state in the image acquired by the target channel. The values illustrate that the image recognition technology may be used to recognize whether the light device is in a lit state in the image collected by the target channel of the image sensor, which is not specifically limited in this disclosure.
In step S43, when the lighting device is in a lit state in an image acquired by the target channel of the image sensor, the subject to be photographed is photographed to obtain a photographed image.
Considering the problem that the light equipment is in an extinguishing state in the image easily when the image sensor collects the image in daytime and the problem that the image is oversaturated easily when the image is collected at night, in the present disclosure, different strategies can be adopted to obtain the shooting image according to different time periods when the image sensor collects the image.
In the present disclosure, specific embodiments for obtaining a photographed image may be: when the lighting equipment is in a lighting state in the images acquired by the target channels of the image sensor, determining the current moment, and if the current moment is within a preset night time period, fusing the images acquired by at least two channels to acquire a shooting image. The image fusion can inhibit high light and improve dark detail. Therefore, when the image sensor acquires images at night, it is necessary to fuse the images acquired by at least two channels to obtain a photographed image.
In one embodiment, the images acquired by any two channels may be fused to obtain a captured image. For example, the images acquired by the S channel and the L channel are fused to obtain a photographed image, or the images acquired by the S channel and the M channel are fused to obtain a photographed image, or the images acquired by the M channel and the L channel are fused to obtain a photographed image, or the images acquired by the S channel, the M channel and the L channel are fused to obtain a photographed image.
Therefore, when the image sensor collects images at night, fusion shooting can be carried out to obtain shot images, and the defect that white light appears due to supersaturation of the shot images can be avoided.
Considering that the image quality of the images obtained after the fusion of the different images is different, for example, the saturation of the images obtained after the fusion of the images acquired by the S channel and the L channel is different from the saturation of the images obtained after the fusion of the images acquired by the M channel and the L channel. Therefore, in another embodiment, the images acquired by different channels are respectively fused, and the image with the best quality after fusion is determined as the shooting image.
For example, first, if the current time is within a preset night time period, multiple groups of target images are selected from images acquired by the M channel, the S channel and the L channel, where each group of target images includes at least two images acquired by the channels. For example, the multiple sets of target images are four sets of target images, the image collected by the S channel and the image collected by the L channel are a first set of target images, the image collected by the S channel and the image collected by the M channel are a second set of target images, the image collected by the M channel and the image collected by the L channel are a third set of target images, and the image collected by the S channel, the image collected by the M channel and the image collected by the L channel are a fourth set of target images.
Then, for each group of target images, the images in the group are fused, and the saturation of the fused images is determined. Then, a photographed image is determined according to the saturation of each of the fused images.
And fusing the images in each group of target images to obtain one frame of fused image, so that if the target images are four groups, four frames of fused images can be obtained. And then, determining the saturation of each frame of fused image, and determining a shooting image according to the saturation. In this embodiment, the saturation of all the fused images can be obtained, and the photographed image is determined according to the saturation, so that the defect that white light appears due to supersaturation of the photographed image is further avoided.
In addition, if the image sensor collects an image during the daytime, at this time, in order to avoid the disadvantage that the light device is in a turned-off state in the captured image, the image in which the light device is in a turned-on state may be taken as the captured image. For example, if the target channel is an S channel or an L channel, when it is determined that the current time is not within the preset night time period, the image acquired by the target channel is determined as the captured image. For another example, if the target channels are the S channel and the L channel, when it is determined that the current time is not within the preset night time period, an image acquired by any channel in the target channels, or an image obtained by fusing an image acquired by the S channel with an image acquired by the L image, is determined as the captured image. Therefore, the lighting equipment is not in the off state in the shooting image output by the image sensor, and the usability of the shooting image output by the image sensor is improved.
By adopting the technical scheme, the exposure time of the M channel of the image sensor is adjusted, so that the lighting equipment is in a lighting state in the image acquired by the target channel of the image sensor, and when the lighting equipment is in the lighting state in the image acquired by the target channel of the image sensor, the object to be shot is shot, so that a shot image is obtained. Therefore, the lighting equipment with the lighting and darkness period can be ensured to be in a normal lighting state in the acquired image, the condition that the lighting equipment is extinguished in the image is avoided, and the usability of the shot image is improved.
Based on the same inventive concept, the present disclosure provides an image acquisition apparatus. Fig. 8 is a block diagram of an image acquisition apparatus according to an exemplary embodiment. The image acquisition apparatus 500 may include:
a determining module 501 configured to determine whether or not there is a lighting device having a light-dark period in an object to be photographed in response to receiving an image capturing instruction;
the adjusting module 502 is configured to adjust the exposure time of an M channel of an image sensor if the light device is determined to exist, so that the light device is in a lighting state in an image acquired by a target channel of the image sensor, wherein the target channel is an S channel and/or an L channel;
And a shooting module 503 configured to shoot the object to be shot when the lighting device is in a lighting state in the image acquired by the target channel of the image sensor, so as to obtain a shot image.
Optionally, the adjusting module 502 includes:
the first determining submodule is configured to determine the brightness of the environment where the image sensor is located if the light equipment exists;
an increasing sub-module configured to increase an exposure time of an M-channel of the image sensor if the brightness is greater than or equal to a preset threshold; and
a reduction sub-module configured to reduce an exposure time of M channels of the image sensor if the brightness is less than the preset threshold.
Optionally, the shooting module 503 includes:
a second determining submodule configured to determine a current time when the light equipment is in a lighting state in an image acquired by a target channel of the image sensor;
and the first fusion submodule is configured to fuse the images acquired by at least two channels to obtain a shooting image if the current moment is within a preset night time period.
Optionally, the first fusion submodule includes:
a selecting sub-module, configured to select multiple groups of target images from the images acquired by the M channel, the S channel and the L channel if the current moment is within a preset night time period, wherein each group of target images at least comprises two images acquired by the channels;
the second fusion submodule is configured to fuse the images in each group of target images and determine the saturation of the fused images;
and a third determination sub-module configured to determine a photographed image according to the saturation of each of the fused images.
Optionally, the target channels are an S channel and an L channel; the shooting module 503 is configured to: if the current moment is not in the preset night time period, determining an image acquired by any channel in the target channel or an image obtained by fusing an image acquired by the S channel and an image acquired by the L image as a shooting image.
Optionally, the adjusting module 502 includes:
the detection submodule is configured to detect whether the lighting equipment is in a lighting state in an image acquired by a target channel of the image sensor after the exposure time of the M channel is adjusted once;
A stop sub-module configured to stop adjustment of the exposure time of the M channel if in a lit state;
and the execution sub-module is configured to continuously execute the step of adjusting the exposure time of the M channel of the image sensor if the lighting device is not in the lighting state until the lighting device is in the lighting state in the image acquired by the target channel.
Optionally, the determining module 501 includes:
an acquisition sub-module configured to acquire an initial image containing an object to be photographed in advance in response to receiving an image capturing instruction;
and a fourth determining submodule configured to determine whether the lighting device with the bright and dark period exists in the object to be shot according to the initial image and a preset lighting device identification model, wherein the preset lighting device identification model is obtained by training with a sample image as input and a sub-image of the lighting device with the bright and dark period included in the sample image as output.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
The present disclosure provides a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the steps of the image acquisition method provided by the present disclosure.
Fig. 9 is a block diagram of an image acquisition apparatus according to an exemplary embodiment. For example, apparatus 800 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, exercise device, personal digital assistant, or the like.
Referring to fig. 9, apparatus 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814, and a communication component 816.
The processing component 802 generally controls overall operation of the apparatus 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to perform all or part of the steps of the image acquisition method. Further, the processing component 802 can include one or more modules that facilitate interactions between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the apparatus 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phonebook data, messages, pictures, videos, and the like. The memory 804 may be implemented by any type or combination of volatile or nonvolatile memory devices 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 or optical disk.
The power component 806 provides power to the various components of the device 800. The power components 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the device 800.
The multimedia component 808 includes a screen between the device 800 and the user that provides an output interface. 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 a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and/or a rear camera. The front camera and/or the rear camera may receive external multimedia data when the apparatus 800 is in an operational mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be a keyboard, click wheel, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 814 includes one or more sensors for providing status assessment of various aspects of the apparatus 800. For example, the sensor assembly 814 may detect an on/off state of the device 800, a relative positioning of the components, such as a display and keypad of the device 800, the sensor assembly 814 may detect a change in position of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, an orientation or acceleration/deceleration of the device 800, and a change in temperature of the device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate communication between the apparatus 800 and other devices, either in a wired or wireless manner. The device 800 may access a wireless network based on a communication standard, such as WiFi,4G or 5G, or a combination thereof. In one exemplary embodiment, the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component 816 includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 800 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 elements for performing the image acquisition method.
In an exemplary embodiment, a non-transitory computer readable storage medium is provided, such as memory 804 including instructions executable by processor 820 of apparatus 800 to perform an image acquisition method. For example, the non-transitory computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
In another exemplary embodiment, a computer program product is provided, comprising a computer program executable by a programmable apparatus, the computer program having code portions for performing the above-described image acquisition method when executed by the programmable apparatus.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. An image acquisition method, comprising:
in response to receiving the image capturing instruction, determining whether light equipment with a bright-dark period exists in the object to be shot;
If the light equipment is determined to exist, adjusting the exposure time of an M channel of an image sensor so that the light equipment is in a lighting state in an image acquired by a target channel of the image sensor, wherein the target channel is an S channel and/or an L channel;
when the lighting equipment is in a lighting state in an image acquired by a target channel of the image sensor, shooting the object to be shot so as to obtain a shooting image.
2. The method of claim 1, wherein adjusting the exposure time of the M channel of the image sensor if it is determined that the light fixture is present comprises:
if the light equipment is determined to exist, determining the brightness of the environment where the image sensor is located;
increasing the exposure time of the M channel of the image sensor under the condition that the brightness is greater than or equal to a preset threshold value; and
and reducing the exposure time of the M channel of the image sensor under the condition that the brightness is smaller than the preset threshold value.
3. The method according to claim 1, wherein capturing the object to be captured to obtain a captured image when the light device is in a lit state in the image captured by the target channel of the image sensor, comprises:
When the lighting equipment is in a lighting state in an image acquired by a target channel of the image sensor, determining the current moment;
if the current moment is within the preset night time period, fusing the images acquired by at least two channels to obtain a shooting image.
4. A method according to claim 3, wherein if the current time is within a preset night time period, fusing the images acquired by at least two channels to obtain a photographed image, including:
if the current moment is within a preset night time period, selecting a plurality of groups of target images from images acquired by an M channel, an S channel and an L channel, wherein each group of target images at least comprises images acquired by two channels;
fusing the images in each group of target images, and determining the saturation of the fused images;
and determining a shooting image according to the saturation of each fused image.
5. The method of claim 3, wherein the target channels are S-channel and L-channel; when the lighting device is in a lighting state in an image acquired by a target channel of the image sensor, shooting the object to be shot to obtain a shot image, including:
If the current moment is not in the preset night time period, determining an image acquired by any channel in the target channel or an image obtained by fusing an image acquired by the S channel and an image acquired by the L image as a shooting image.
6. The method of claim 1, wherein adjusting the exposure time of the M channel of the image sensor to place the light device in an illuminated state in the image captured by the target channel of the image sensor if the light device is determined to be present comprises:
after the exposure time of the M channels is adjusted once, detecting whether the lighting equipment is in a lighting state in an image acquired by a target channel of the image sensor;
if the LED is in the lighting state, stopping adjusting the exposure time of the M channel;
and if the lighting state is not established, continuing to execute the step of adjusting the exposure time of the M channel of the image sensor until the lighting equipment is in the lighting state in the image acquired by the target channel.
7. The method according to any one of claims 1-6, wherein determining whether there is a lighting device having a bright-dark period in the subject to be photographed in response to receiving the image capturing instruction comprises:
In response to receiving an image capturing instruction, pre-acquiring an initial image containing an object to be photographed;
and determining whether the lighting equipment with the bright and dark periods exists in the object to be shot according to the initial image and a preset lighting equipment identification model, wherein the preset lighting identification model is obtained by training a sub-image of the lighting equipment with the bright and dark periods, which is included in the sample image, as output by taking the sample image as input.
8. An image acquisition apparatus, comprising:
a first determining module configured to determine whether a lighting device having a bright-dark period exists in an object to be photographed in response to receiving an image capturing instruction;
the adjusting module is configured to adjust the exposure time of an M channel of the image sensor if the light equipment exists, so that the light equipment is in a lighting state in an image acquired by a target channel of the image sensor, wherein the target channel is an S channel and/or an L channel;
and the shooting module is configured to shoot the object to be shot when the light equipment is in a lighting state in the image acquired by the target channel of the image sensor so as to acquire a shot image.
9. An image acquisition apparatus, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
in response to receiving the image capturing instruction, determining whether light equipment with a bright-dark period exists in the object to be shot;
if the light equipment is determined to exist, adjusting the exposure time of an M channel of an image sensor so that the light equipment is in a lighting state in an image acquired by a target channel of the image sensor, wherein the target channel is an S channel and/or an L channel;
when the lighting equipment is in a lighting state in an image acquired by a target channel of the image sensor, shooting the object to be shot so as to obtain a shooting image.
10. A computer readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the steps of the method of any of claims 1-7.
CN202111581554.1A 2021-12-22 2021-12-22 Image acquisition method, device and computer readable storage medium Pending CN116366988A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111581554.1A CN116366988A (en) 2021-12-22 2021-12-22 Image acquisition method, device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111581554.1A CN116366988A (en) 2021-12-22 2021-12-22 Image acquisition method, device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN116366988A true CN116366988A (en) 2023-06-30

Family

ID=86928794

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111581554.1A Pending CN116366988A (en) 2021-12-22 2021-12-22 Image acquisition method, device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN116366988A (en)

Similar Documents

Publication Publication Date Title
US10674088B2 (en) Method and device for acquiring image, terminal and computer-readable storage medium
CN111586282B (en) Shooting method, shooting device, terminal and readable storage medium
CN110796988B (en) Backlight adjusting method and device
CN105245775B (en) camera imaging method, mobile terminal and device
US11768423B2 (en) Image acquisition apparatus, electronic device, image acquisition method and storage medium
CN107463052B (en) Shooting exposure method and device
CN112714205B (en) Ambient light intensity determination method, device and storage medium
CN108040204B (en) Image shooting method and device based on multiple cameras and storage medium
CN107820025B (en) Method and device for photographing processing
CN111586280B (en) Shooting method, shooting device, terminal and readable storage medium
CN106775246B (en) Screen brightness adjusting method and device
CN108156381B (en) Photographing method and device
US11617023B2 (en) Method for brightness enhancement of preview image, apparatus, and medium
CN114187874B (en) Brightness adjusting method, device and storage medium
CN112312034B (en) Exposure method and device of image acquisition module, terminal equipment and storage medium
CN116366988A (en) Image acquisition method, device and computer readable storage medium
CN113660428B (en) Image acquisition method and device and electronic equipment
CN116843603A (en) Image processing method and device, electronic equipment and storage medium
CN111277754B (en) Mobile terminal shooting method and device
CN112086075B (en) Screen display parameter adjusting method and device and storage medium
CN104301708B (en) 3D display method, device and terminal
CN113851096B (en) Brightness detection method, device and storage medium
CN117395504A (en) Image acquisition method, device and storage medium
CN117979172A (en) Flash frequency value determining method, device, equipment and storage medium
CN115202741A (en) Equipment use method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination