Image acquisition method, apparatus and computer readable storage medium
By adjusting the exposure time of the M channel of the image sensor and using staggered HDR technology, the image sensor shooting problem caused by the bright and dark cycle of traffic lights was solved, ensuring that the traffic lights are always lit in the image, thus improving the usability and quality of the image.
Patent Information
- Application Number
- CN202111581554.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-22
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2041-12-22
AI Technical Summary
During image sensor shooting, the traffic lights have a bright-dark cycle, which can cause the traffic lights to go out in the image, affecting the usability of the image. This is especially likely to happen during the day when the exposure time is short, and may cause oversaturation when the exposure time is long at night.
By adjusting the exposure time of the M channel of the image sensor and combining it with staggered HDR technology, the lighting equipment is ensured to be lit in the target channel of the image sensor. Image fusion technology is used to improve image quality at night and avoid extinguishing and oversaturation.
It improves image usability, ensures that lighting equipment is always lit in the image, avoids issues of being off or oversaturated, and enhances the image sensor's shooting performance.
Smart Images

Figure CN116366988B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of image technology, and in particular to an image acquisition method, apparatus, and computer-readable storage medium. Background Technology
[0002] In the field of intelligent transportation, there is a frequent need to photograph traffic lights. Most traffic lights are directly powered by 220V AC mains electricity, resulting in a 10ms light energy cycle (in the US, it's 110V, with an 8.3ms cycle). Occasionally, some traffic light manufacturers cut corners by using half-wave rectifiers to filter out the negative half-cycle of the electrical frequency, causing the traffic light to turn off for 10ms after every 10ms of illumination. Although this is imperceptible to the human eye, image sensors capture it very clearly. However, if the traffic lights are completely dark in the image, the image is unusable. Therefore, users do not want images showing completely dark traffic lights. Summary of the Invention
[0003] To overcome the problems existing in related technologies, this disclosure provides an image acquisition method, apparatus, and computer-readable storage medium.
[0004] According to a first aspect of the present disclosure, an image acquisition method is provided, comprising:
[0005] In response to receiving an image capture command, determine whether there is a lighting device with a brightness-dark cycle in the object to be photographed;
[0006] If the presence of the lighting device is confirmed, the exposure time of the M channel of the image sensor is adjusted so that the lighting device is lit in the image acquired by the target channel of the image sensor, wherein the target channel is the S channel and / or the L channel;
[0007] When the lighting device is lit in the image acquired by the target channel of the image sensor, it takes a picture of the object to be photographed to obtain a captured image.
[0008] Optionally, adjusting the exposure time of the M channel of the image sensor if the presence of the lighting device is determined includes:
[0009] If the presence of the lighting device is confirmed, then the brightness of the environment in which the image sensor is located is determined;
[0010] When the brightness is greater than or equal to a preset threshold, the exposure time of the M channel of the image sensor is increased; and
[0011] If the brightness is less than the preset threshold, reduce the exposure time of the M channel of the image sensor.
[0012] Optionally, the step of capturing an image of the object to be photographed when the lighting device is in a lit state by the image acquired by the target channel of the image sensor includes:
[0013] The current moment is determined when the lighting device is illuminated in the image acquired by the target channel of the image sensor.
[0014] If the current time falls within a preset nighttime period, the images acquired from at least two channels will be fused to obtain a captured image.
[0015] Optionally, if the current time falls within a preset nighttime period, the images acquired from at least two channels are fused to obtain a captured image, including:
[0016] If the current time is within a preset nighttime period, multiple sets of target images are selected from the images acquired by the M channel, S channel and L channel, wherein each set of target images includes images acquired by at least two channels;
[0017] For each group of target images, the images in that group are fused, and the saturation of the fused image is determined.
[0018] The captured image is determined based on the saturation of each fused image.
[0019] Optionally, the target channel is an S channel and an L channel; the step of capturing an image of the object to be photographed when the lighting device is lit in the image acquired by the target channel of the image sensor to obtain a captured image includes:
[0020] If the current time is not within the preset nighttime period, then the image obtained by fusing the image obtained by any channel in the target channel with the image obtained by the S channel and the image obtained by the L image will be determined as the captured image.
[0021] Optionally, adjusting the exposure time of the M channel of the image sensor if the presence of the lighting device is determined includes:
[0022] After each adjustment of the exposure time of the M channel, it is detected whether the lighting device is lit in the image acquired by the target channel of the image sensor;
[0023] If the light is on, stop adjusting the exposure time of the M channel;
[0024] If the light is not lit, continue with the step of adjusting the exposure time of the M channel of the image sensor until the light device is lit in the image acquired by the target channel.
[0025] Optionally, the step of determining whether a lighting device with a brightness-dark cycle exists in the object to be photographed in response to receiving an image capture command includes:
[0026] In response to receiving an image capture command, an initial image containing the object to be captured is pre-acquired;
[0027] Based on the initial image and the preset lighting device recognition model, it is determined whether there is a lighting device with a brightness-dark cycle in the object to be photographed. The preset lighting recognition model is obtained by training a sample image as input and a sub-image of a lighting device with a brightness-dark cycle included in the sample image as output.
[0028] According to a second aspect of the present disclosure, an image acquisition apparatus is provided, comprising:
[0029] The first determining module is configured to determine, in response to receiving an image capture command, whether there is a lighting device with a brightness-dark cycle in the object to be photographed;
[0030] An adjustment module is configured to adjust the exposure time of the M channel of an image sensor if the presence of the lighting device is determined, so that the lighting device is lit in the image acquired by the target channel of the image sensor, wherein the target channel is the S channel and / or the L channel.
[0031] The shooting module is configured to capture an image of the object to be photographed when the lighting device is lit in the image acquired by the target channel of the image sensor.
[0032] Optionally, the adjustment module includes:
[0033] The first determining submodule is configured to determine the brightness of the environment in which the image sensor is located if the presence of the lighting device is determined.
[0034] An additional submodule is configured to increase the exposure time of the M-channel of the image sensor when the brightness is greater than or equal to a preset threshold; and
[0035] The reduction submodule is configured to reduce the exposure time of the M channel of the image sensor when the brightness is less than the preset threshold.
[0036] Optionally, the shooting module includes:
[0037] The second determining submodule is configured to determine the current time when the lighting device is in a lit state in the image acquired by the target channel of the image sensor.
[0038] The first fusion submodule is configured to fuse images acquired from at least two channels to obtain a captured image if the current time falls within a preset nighttime period.
[0039] Optionally, the first fusion submodule includes:
[0040] The selection submodule is configured to select multiple sets of target images from the images acquired by the M channel, S channel and L channel if the current time is within a preset nighttime period, wherein each set of target images includes images acquired by at least two channels;
[0041] The second fusion submodule is configured to fuse the images in each group of target images and determine the saturation of the fused image.
[0042] The third determining submodule is configured to determine the captured image based on the saturation of each fused image.
[0043] Optionally, the target channels are S-channel and L-channel; the shooting module 503 is configured to: if the current time is not within a preset nighttime period, determine the image obtained by fusing the image obtained by any channel of the target channels with the image obtained by fusing the image obtained by the S-channel and the image obtained by the L-channel as the shooting image.
[0044] Optionally, the adjustment module includes:
[0045] The detection submodule is configured to detect whether the lighting device is lit in the image acquired by the target channel of the image sensor after each adjustment of the exposure time of the M channel;
[0046] The stop submodule is configured to stop adjusting the exposure time of the M channel if it is in the on state;
[0047] The execution submodule is configured to continue executing the step of adjusting the exposure time of the M channel of the image sensor if it is not in a lit state, until the lighting device is lit in the image acquired by the target channel.
[0048] Optionally, the determining module includes:
[0049] The acquisition submodule is configured to acquire an initial image containing the object to be captured in response to receiving an image capture command;
[0050] The fourth determining submodule is configured to determine whether there is a lighting device with a brightness-dark cycle in the object to be photographed based on the initial image and a preset lighting device recognition model. The preset lighting recognition model is obtained by training a sample image as input and a sub-image of a lighting device with a brightness-dark cycle included in the sample image as output.
[0051] According to a third aspect of the present disclosure, an image acquisition apparatus is provided, comprising:
[0052] processor;
[0053] Memory used to store processor-executable instructions;
[0054] The processor is configured as follows:
[0055] In response to receiving an image capture command, determine whether there is a lighting device with a brightness-dark cycle in the object to be photographed;
[0056] If the presence of the lighting device is confirmed, the exposure time of the M channel of the image sensor is adjusted so that the lighting device is lit in the image acquired by the target channel of the image sensor, wherein the target channel is the S channel and / or the L channel;
[0057] When the lighting device is lit in the image acquired by the target channel of the image sensor, it takes a picture of the object to be photographed to obtain a captured image.
[0058] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, having stored thereon computer program instructions that, when executed by a processor, implement the steps of the image acquisition method provided in the first aspect of the present disclosure.
[0059] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:
[0060] By employing the above technical solution, the exposure time of the M channel of the image sensor is adjusted to ensure that the lighting device is illuminated in the image captured by the target channel of the image sensor. The subject is then photographed while the lighting device is illuminated in the image captured by the target channel of the image sensor, thus obtaining an image. This ensures that the lighting device, with its brightness cycle, is normally illuminated in the acquired image, preventing the lighting device from being off in the image and improving the usability of the captured image.
[0061] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0062] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0063] Figure 1 This is a schematic diagram illustrating an image sensor acquiring an image of a traffic light according to an exemplary embodiment.
[0064] Figure 2 This is a schematic diagram illustrating an image sensor acquiring images of traffic lights at night, according to an exemplary embodiment.
[0065] Figure 3 This is a schematic diagram illustrating a method of acquiring traffic light images using a chopper exposure scheme according to an exemplary embodiment.
[0066] Figure 4 This is a flowchart illustrating an image acquisition method according to an exemplary embodiment.
[0067] Figure 5 This is a schematic diagram illustrating a 3staggered HDR continuously outputting multiple frames according to an exemplary embodiment.
[0068] Figure 6 This is a schematic diagram of a 3staggered HDR sampling according to an exemplary embodiment.
[0069] Figure 7 This is another schematic diagram of 3staggered HDR sampling according to an exemplary embodiment.
[0070] Figure 8 This is a block diagram of an image acquisition device according to an exemplary embodiment.
[0071] Figure 9 This is a block diagram illustrating an image acquisition device according to an exemplary embodiment. Detailed Implementation
[0072] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0073] As mentioned in the background section, because traffic lights have a bright-dark cycle, when the exposure time of the image sensor is short, there will be instances where the traffic light is off in a particular frame of the image captured by the image sensor. For example, Figure 1This is a schematic diagram illustrating an image sensor acquiring an image of a traffic light according to an exemplary embodiment. The traffic light has a bright-dark cycle. Figure 1 In the waveform diagram of the traffic lights shown, a high level indicates that the traffic light is on, and a low level indicates that the traffic light is off. Figure 1 In the waveform diagram of the image sensor shutter shown, a high level indicates that the image sensor is in an exposure state. Figure 1 In the traffic light image shown, the traffic light is lit in the Nth frame and off in the (N+1)th frame. Therefore, the (N+1)th frame is unusable, meaning the image captured by the image sensor has low availability.
[0074] Furthermore, in bright summer weather, the exposure time of the image sensor may typically be less than 1ms to ensure the captured image is not overexposed. However, in this case, the probability of traffic lights going out is close to 50%, meaning that half of the captured images will show traffic lights going out. At night, the exposure time of the image sensor is usually greater than 10ms. While the problem of traffic lights going out is not encountered in the captured images, the longer exposure time makes it highly likely that the bright traffic lights will cause the image sensor to oversaturate the captured images. For example, in... Figure 2 In the image, the traffic lights are lit in every frame.
[0075] In practical applications, in addition to traffic lights, many vehicles also use LED (light-emitting diode) headlights or signal lights, which have a bright-dark cycle. Moreover, the time that the LED is lit within a bright-dark cycle may be shorter. In this case, the probability of the image sensor capturing the LED light being off is greater.
[0076] To address the issue of indicator lights appearing to be off in images captured by image sensors, a proposed technique involves incorporating a chopper into the image sensor, enabling it to operate in a chopper exposure mode. The principle of chopper exposure is to distribute the time required for normal exposure (e.g., 1ms) across a preset duration, achieving a 1ms equivalent exposure time through the cumulative effect of multiple short exposures. Figure 3 As shown, assuming the traffic light's on / off cycle is 10ms, this 1ms can be distributed over an 11ms period. For example, it can be divided into ten 0.1ms segments, meaning ten exposures are performed within 11ms, each lasting 0.1ms. The advantage of this method is that it increases the probability of capturing the traffic light illuminated. However, due to the short capture time, the brightness of the traffic light in the image will be weaker than normal, making the image unusable.
[0077] In view of this, the present disclosure provides an image acquisition method to ensure that lighting devices with a brightness-dark cycle are in a normally lit state in the acquired image, so as to avoid the problem of the lighting devices being turned off in the image.
[0078] Figure 4 This is a flowchart illustrating an image acquisition method according to an exemplary embodiment. For example... Figure 4 As shown, the method may include the following steps.
[0079] In step S41, in response to receiving an image capture command, it is determined whether there is a lighting device with a brightness-dark cycle in the object to be photographed.
[0080] The image acquisition method provided in this disclosure can be applied to terminal devices equipped with image sensors, such as laptops, desktop computers, tablets, mobile phones, industrial control computers, etc. The image sensor can be a camera, such as a monocular camera, a binocular camera, a depth camera, etc., and this disclosure does not specifically limit it.
[0081] In one possible approach, the terminal device includes a physical or touch-sensitive button for indicating whether the image sensor is activated, allowing the user to issue an image capture command by clicking the physical button or touching the touch-sensitive button. In another possible approach, the terminal device includes a voice recognition module, allowing the user to input image capture commands via voice.
[0082] After receiving an image capture command, the terminal device can determine whether there is a lighting device with a brightness-dark cycle in the object to be photographed.
[0083] It's worth noting that when a user needs to capture an image using the terminal device's image sensor, they will first point the image sensor, for example, at the object to be captured, such as a camera lens. In this way, the image of the object to be captured will be displayed on the terminal device's screen. Furthermore, considering the large field of view of the image sensor, the terminal device's screen may display images of multiple objects; in this case, all of these objects are considered as the objects to be captured.
[0084] In one embodiment, the terminal device or image sensor pre-stores images of various lighting devices with brightness-dark cycles, such as images of traffic lights, images of LED headlights on vehicles, etc. After identifying the object to be photographed, it can be determined whether a lighting device with a brightness-dark cycle exists in the object to be photographed, based on the image of the object to be photographed displayed on the display interface and the pre-stored images of lighting devices with brightness-dark cycles.
[0085] In another embodiment, the presence of a lighting device with a brightness-dark cycle in the object to be photographed can be determined based on machine learning. For example, in response to receiving an image capture command, an initial image containing the object to be photographed is pre-acquired. Based on the initial image and a preset lighting device recognition model, it is determined whether a lighting device with a brightness-dark cycle exists in the object to be photographed. For instance, the initial image is input to the lighting device recognition model to obtain the recognition result output by the model. If a lighting device with a brightness-dark cycle exists in the object to be photographed, the recognition result indicates that a lighting device with a brightness-dark cycle exists in the object to be photographed; otherwise, the recognition result indicates that no lighting device with a brightness-dark cycle exists in the object to be photographed. The lighting device recognition model is trained by taking a sample image as input and using sub-images of lighting devices with brightness-dark cycles included in the sample image as output. It is worth noting that the specific training method of the lighting device recognition model can refer to the training method of neural network models in the prior art, and this disclosure does not specifically limit it.
[0086] In step S42, if it is determined that a lighting device exists, the exposure time of the M channel of the image sensor is adjusted so that the lighting device is lit in the image acquired by the target channel of the image sensor, wherein the target channel is the S channel and / or the L channel.
[0087] Staggered HDR technology uses "line" as the output unit for "long and short frame" shooting. It can simultaneously acquire multiple frames with different exposure times in a single shot, significantly reducing the time interval between frames and thus minimizing the possibility of "ghosting." Therefore, in this disclosure, a 3-staggered high dynamic range (staggered HDR) scheme can be used to capture images. This allows for the acquisition of three frames with long, medium, and short exposures in a single shot. These three frames are output through different channels; specifically, the S, M, and L channels of the image sensor are used to output images with different exposure times. It is worth noting that although three images with different exposure times can be obtained in a single shot, the image sensor can only output one image at a time, namely the captured image mentioned below.
[0088] Figure 5 This is a schematic diagram illustrating a 3staggered HDR continuously outputting multiple frames according to an exemplary embodiment. For example... Figure 5 As shown, the duration of each shot is 33ms, and three exposures—long, medium, and short—are performed during the capture of one frame. Figure 5In this setup, the exposure time ratios for the S-channel, M-channel, and L-channel are 1:2:4. That is, the S-channel exposure time is 4.5ms, the M-channel exposure time is 9ms, and the L-channel exposure time is 18ms. It is worth noting that... Figure 5 The image shows two shooting scenarios, and the shooting times may overlap, such as... Figure 5 As shown, the exposure time of the L channel in the previous shooting process can overlap with the exposure time of the S channel in this shooting process.
[0089] Typically, during a single shot, the S channel outputs the image first, followed by the M channel, and finally the L channel. It should be noted that the exposure order of the channels is: S channel, M channel, and L channel. Therefore, for ease of adjustment, in this disclosure, the exposure time of the M channel, which is located in the middle, is adjusted so that the lighting device is illuminated in the image captured by the target channel of the image sensor.
[0090] Figure 6 This is a schematic diagram of a 3staggered HDR sampling according to an exemplary embodiment. Figure 6 As shown, the target channel is the L channel. By adjusting the exposure time of the M channel, the lighting device is made to be lit in the image acquired by the L channel of the image sensor. Figure 7 This is another schematic diagram of 3staggered HDR sampling according to an exemplary embodiment. Figure 7 As shown, the target channels are the S channel and the L channel. By adjusting the exposure time of the M channel, the lighting device is made to be lit in both the S channel and L channel images captured by the image sensor. Specifically, in... Figure 6 and Figure 7 In the images captured by the M channel, all lighting equipment is illuminated.
[0091] In this disclosure, if a lighting device is determined to be present, the exposure time of the M channel of the image sensor is adjusted so that the lighting device is illuminated in the image acquired by the target channel of the image sensor. The specific implementation is as follows:
[0092] First, after each adjustment of the exposure time of the M channel, it is detected whether the lighting device is lit in the image acquired by the target channel of the image sensor.
[0093] For example, the exposure time of the M channel can be adjusted with a fixed value, such as adjusting it by 2ms each time. Alternatively, a variable value can be used, meaning the adjustment is different each time; for example, adjusting the exposure time of the M channel by 2ms the first time, 1.5ms the second time, and so on. It's important to note that adjusting the exposure time of the M channel can either increase or decrease it.
[0094] In this disclosure, the decision to increase or decrease the exposure time of the M-channel can be determined based on the brightness of the environment in which the image sensor is located. For example, if the presence of a lighting device is determined, the brightness of the environment in which the image sensor is located is determined, wherein a brightness sensor can be used to detect the brightness of the environment in which the image sensor is located. If the brightness is greater than or equal to a preset threshold, the exposure time of the M-channel of the image sensor is increased; and if the brightness is less than the preset threshold, the exposure time of the M-channel of the image sensor is decreased.
[0095] Then, if the light is illuminated, the adjustment of the exposure time of the M channel is stopped. If the light is not illuminated, the step of adjusting the exposure time of the M channel of the image sensor continues until the lighting device is illuminated in the image captured by the target channel. It is worth noting that image recognition technology can be used to identify whether the lighting device is illuminated in the image captured by the target channel of the image sensor; this disclosure does not specifically limit this.
[0096] In step S43, when the lighting device is lit in the image acquired by the target channel of the image sensor, the object to be photographed is photographed to obtain the photographed image.
[0097] Considering that when image sensors capture images during the day, the lighting equipment in the images is often in a state of being off, and when capturing images at night, the images are prone to oversaturation, therefore, in this disclosure, different strategies can be adopted to obtain captured images depending on the time period when the image sensor captures images.
[0098] In this disclosure, a specific implementation for obtaining a captured image can be as follows: when the lighting device is illuminated in the image acquired by the target channel of the image sensor, the current time is determined. If the current time falls within a preset nighttime period, the images acquired by at least two channels are fused to obtain a captured image. Image fusion can suppress highlights while enhancing shadow details. 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 captured image.
[0099] In one embodiment, images acquired from any two channels can be fused to obtain a captured image. For example, images acquired from the S channel and the L channel can be fused to obtain a captured image, or images acquired from the S channel and the M channel can be fused to obtain a captured image, or images acquired from the M channel and the L channel can be fused to obtain a captured image, or images acquired from the S channel, the M channel, and the L channel can be fused to obtain a captured image.
[0100] In this way, when the image sensor captures images at night, it can perform image fusion to obtain a captured image, thereby avoiding the drawback of white light appearing due to oversaturation of the captured image.
[0101] Considering that the image quality of the fused images may differ—for example, the saturation of the fused image obtained from images acquired through the S and L channels may differ from that obtained from images acquired through the M and L channels—in another embodiment, the images acquired through different channels are fused separately, and the image with the best fused image quality is determined as the captured image.
[0102] For example, firstly, if the current time falls within a preset nighttime period, multiple sets of target images are selected from the images acquired by the M, S, and L channels. Each set of target images includes images acquired by at least two channels. For instance, the multiple sets of target images are four sets: the images acquired by the S and L channels form the first set; the images acquired by the S and M channels form the second set; the images acquired by the M and L channels form the third set; and the images acquired by the S, M, and L channels form the fourth set.
[0103] Next, for each group of target images, the images in that group are fused together, and the saturation of the fused image is determined. Then, based on the saturation of each fused image, the captured image is determined.
[0104] After fusing the images in each group of target images, a fused image frame is obtained. Thus, if there are four groups of target images, four fused images can be obtained. Then, the saturation of each fused image frame is determined, and the captured image is determined based on the saturation. In this embodiment, the saturation of all fused images can be obtained, and the captured image is determined based on the saturation, thus further avoiding the drawback of white light appearing due to oversaturation of the captured image.
[0105] Furthermore, if the image sensor captures images during the day, to avoid the drawback of lights appearing off in the captured image, images showing the lights on can be used as the captured image. For example, if the target channel is an S-channel or an L-channel, the image captured by the target channel is used as the captured image if it is determined that the current time is not within a preset nighttime period. As another example, if the target channels are both S-channel and L-channel, the image captured by either of the target channels, or the image obtained by fusing the image captured by the S-channel and the image captured by the L-channel, is used as the captured image if it is determined that the current time is not within a preset nighttime period. This ensures that no lights appear off in the captured images output by the image sensor, improving the usability of the captured images output by the image sensor.
[0106] By employing the above technical solution, the exposure time of the M channel of the image sensor is adjusted to ensure that the lighting device is illuminated in the image captured by the target channel of the image sensor. The subject is then photographed while the lighting device is illuminated in the image captured by the target channel of the image sensor, thus obtaining an image. This ensures that the lighting device, with its brightness cycle, is normally illuminated in the acquired image, preventing the lighting device from being off in the image and improving the usability of the captured image.
[0107] Based on the same inventive concept, this disclosure provides an image acquisition device. Figure 8 This is a block diagram illustrating an image acquisition apparatus 500 according to an exemplary embodiment. The image acquisition apparatus 500 may include:
[0108] The determination module 501 is configured to determine, in response to receiving an image capture command, whether there is a lighting device with a brightness-dark cycle in the object to be photographed;
[0109] The adjustment module 502 is configured to adjust the exposure time of the M channel of the image sensor if the presence of the lighting device is determined, so that the lighting device is lit in the image acquired by the target channel of the image sensor, wherein the target channel is the S channel and / or the L channel.
[0110] The shooting module 503 is configured to capture an image of the object to be photographed when the lighting device is lit in the image acquired by the target channel of the image sensor.
[0111] Optionally, the adjustment module 502 includes:
[0112] The first determining submodule is configured to determine the brightness of the environment in which the image sensor is located if the presence of the lighting device is determined.
[0113] An additional submodule is configured to increase the exposure time of the M-channel of the image sensor when the brightness is greater than or equal to a preset threshold; and
[0114] The reduction submodule is configured to reduce the exposure time of the M channel of the image sensor when the brightness is less than the preset threshold.
[0115] Optionally, the shooting module 503 includes:
[0116] The second determining submodule is configured to determine the current time when the lighting device is in a lit state in the image acquired by the target channel of the image sensor.
[0117] The first fusion submodule is configured to fuse images acquired from at least two channels to obtain a captured image if the current time falls within a preset nighttime period.
[0118] Optionally, the first fusion submodule includes:
[0119] The selection submodule is configured to select multiple sets of target images from the images acquired by the M channel, S channel and L channel if the current time is within a preset nighttime period, wherein each set of target images includes images acquired by at least two channels;
[0120] The second fusion submodule is configured to fuse the images in each group of target images and determine the saturation of the fused image.
[0121] The third determining submodule is configured to determine the captured image based on the saturation of each fused image.
[0122] Optionally, the target channels are S-channel and L-channel; the shooting module 503 is configured to: if the current time is not within a preset nighttime period, determine the image obtained by fusing the image obtained by any channel of the target channels with the image obtained by fusing the image obtained by the S-channel and the image obtained by the L-channel as the shooting image.
[0123] Optionally, the adjustment module 502 includes:
[0124] The detection submodule is configured to detect whether the lighting device is lit in the image acquired by the target channel of the image sensor after each adjustment of the exposure time of the M channel;
[0125] The stop submodule is configured to stop adjusting the exposure time of the M channel if it is in the on state;
[0126] The execution submodule is configured to continue executing the step of adjusting the exposure time of the M channel of the image sensor if it is not in a lit state, until the lighting device is lit in the image acquired by the target channel.
[0127] Optionally, the determining module 501 includes:
[0128] The acquisition submodule is configured to acquire an initial image containing the object to be captured in response to receiving an image capture command;
[0129] The fourth determining submodule is configured to determine whether there is a lighting device with a brightness-dark cycle in the object to be photographed based on the initial image and a preset lighting device recognition model. The preset lighting recognition model is obtained by training a sample image as input and a sub-image of a lighting device with a brightness-dark cycle included in the sample image as output.
[0130] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0131] This disclosure provides a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, implement the steps of the image acquisition method provided in this disclosure.
[0132] Figure 9 This is a block diagram illustrating an image acquisition device according to an exemplary embodiment. For example, device 800 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.
[0133] Reference Figure 9 The device 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.
[0134] Processing component 802 typically controls the overall operation of device 800, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the image acquisition method. Furthermore, processing component 802 may include one or more modules to facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.
[0135] Memory 804 is configured to store various types of data to support the operation of device 800. Examples of such data include instructions for any application or method operating on device 800, contact data, phonebook data, messages, pictures, videos, etc. Memory 804 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 storage, flash memory, magnetic disk, or optical disk.
[0136] The power supply component 806 provides power to the various components of the device 800. The power supply component 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to the device 800.
[0137] Multimedia component 808 includes a screen that provides an output interface between the device 800 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 touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 808 includes a front-facing camera and / or a rear-facing camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0138] Audio component 810 is configured to output and / or input audio signals. For example, audio component 810 includes a microphone (MIC) configured to receive external audio signals when device 800 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 804 or transmitted via communication component 816. In some embodiments, audio component 810 includes a speaker for outputting audio signals.
[0139] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0140] Sensor assembly 814 includes one or more sensors for providing status assessments of various aspects of device 800. For example, sensor assembly 814 may detect the on / off state of device 800, the relative positioning of components such as the display and keypad of device 800, changes in the position of device 800 or a component of device 800, the presence or absence of user contact with device 800, the orientation or acceleration / deceleration of device 800, and temperature changes of device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 814 may include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 814 may include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.
[0141] Communication component 816 is configured to facilitate wired or wireless communication between device 800 and other devices. Device 800 can access wireless networks based on communication standards, such as WiFi, 4G, or 5G, or combinations thereof. In one exemplary embodiment, communication component 816 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 816 includes a near-field communication (NFC) module to facilitate short-range communication. 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.
[0142] 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 components for performing an image acquisition method.
[0143] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is provided, such as a memory 804 including instructions, which can be executed by a processor 820 of the device 800 to complete an image acquisition method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0144] In another exemplary embodiment, a computer program product is provided, comprising a computer program executable by a programmable device, the computer program having a code portion for performing the image acquisition method described above when executed by the programmable device.
[0145] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of this disclosure. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0146] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. An image acquisition method, characterized in that, include: In response to receiving an image capture command, determine whether there is a lighting device with a brightness-dark cycle in the object to be photographed; If the presence of the lighting device is confirmed, the exposure time of the M channel of the image sensor is adjusted so that the lighting device is lit in the image acquired by the target channel of the image sensor, wherein the target channel is the S channel and / or the L channel; When the lighting device is lit in the image acquired by the target channel of the image sensor, it takes a picture of the object to be photographed to obtain a captured image.
2. The method according to claim 1, characterized in that, If the presence of the lighting device is determined, adjusting the exposure time of the M channel of the image sensor includes: If the presence of the lighting device is confirmed, then the brightness of the environment in which the image sensor is located is determined; When the brightness is greater than or equal to a preset threshold, the exposure time of the M channel of the image sensor is increased; and If the brightness is less than the preset threshold, reduce the exposure time of the M channel of the image sensor.
3. The method according to claim 1, characterized in that, The step of capturing an image of the object to be photographed when the lighting device is in a lit state by the image acquired by the target channel of the image sensor includes: The current moment is determined when the lighting device is illuminated in the image acquired by the target channel of the image sensor. If the current time falls within a preset nighttime period, the images acquired from at least two channels will be fused to obtain a captured image.
4. The method according to claim 3, characterized in that, If the current time falls within a preset nighttime period, the images acquired from at least two channels will be fused to obtain a captured image, including: If the current time is within a preset nighttime period, multiple sets of target images are selected from the images acquired by the M channel, S channel and L channel, wherein each set of target images includes images acquired by at least two channels; For each group of target images, the images in that group are fused, and the saturation of the fused image is determined. The captured image is determined based on the saturation of each fused image.
5. The method according to claim 3, characterized in that, The target channels are the S channel and the L channel; when the lighting device is lit in the image acquired by the target channel of the image sensor, the object to be photographed is photographed to obtain a photographed image, including: If the current time is not within the preset nighttime period, then the image obtained by fusing the image obtained by any channel in the target channel with the image obtained by the S channel and the image obtained by the L image will be determined as the captured image.
6. The method according to claim 1, characterized in that, If the presence of the lighting device is determined, adjusting the exposure time of the M channel of the image sensor to ensure that the lighting device is illuminated in the image acquired by the target channel of the image sensor includes: After each adjustment of the exposure time of the M channel, it is detected whether the lighting device is lit in the image acquired by the target channel of the image sensor; If the light is on, stop adjusting the exposure time of the M channel; If the light is not lit, continue with the step of adjusting the exposure time of the M channel of the image sensor until the light device is lit in the image acquired by the target channel.
7. The method according to any one of claims 1-6, characterized in that, The step of determining whether a lighting device with a brightness-dark cycle exists in the object to be photographed in response to receiving an image capture command includes: In response to receiving an image capture command, an initial image containing the object to be captured is pre-acquired; Based on the initial image and the preset lighting device recognition model, it is determined whether there is a lighting device with a brightness-dark cycle in the object to be photographed. The preset lighting recognition model is obtained by training a sample image as input and a sub-image of a lighting device with a brightness-dark cycle included in the sample image as output.
8. An image acquisition device, characterized in that, include: The first determining module is configured to determine, in response to receiving an image capture command, whether there is a lighting device with a brightness-dark cycle in the object to be photographed; An adjustment module is configured to adjust the exposure time of the M channel of an image sensor if the presence of the lighting device is determined, so that the lighting device is lit in the image acquired by the target channel of the image sensor, wherein the target channel is the S channel and / or the L channel. The shooting module is configured to capture an image of the object to be photographed when the lighting device is lit in the image acquired by the target channel of the image sensor.
9. An image acquisition device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured as follows: In response to receiving an image capture command, determine whether there is a lighting device with a brightness-dark cycle in the object to be photographed; If the presence of the lighting device is confirmed, the exposure time of the M channel of the image sensor is adjusted so that the lighting device is lit in the image acquired by the target channel of the image sensor, wherein the target channel is the S channel and / or the L channel; When the lighting device is lit in the image acquired by the target channel of the image sensor, it takes a picture of the object to be photographed to obtain a captured image.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When executed by a processor, the program instructions implement the steps of the method described in any one of claims 1-7.
Citation Information
Patent Citations
Method, device and system for identifying light source
CN111291620A
Drive recorder, and image acquisition timing control method therefor
JP2008134844A