Exposure parameter adjustment method and device, computer equipment and storage medium
By obtaining the pixel amplitude values of short-exposure and long-exposure images and dynamically adjusting the exposure parameters, the problem of poor imaging quality of imaging equipment in complex scenes is solved, and high-quality high dynamic range image generation is achieved.
Patent Information
- Application Number
- CN202511073695.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-01
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2045-08-01
AI Technical Summary
Existing imaging devices are unable to achieve dynamic adjustment when using multiple exposure parameters for imaging, resulting in poor imaging quality. Especially in complex scenes such as when there are both near and far views, the near view may be overexposed or the far view may be underexposed.
By obtaining the pixel amplitude values of the short-exposure image and the long-exposure image, the short-exposure and long-exposure parameters are dynamically adjusted. The specific method includes determining the characteristic amplitude value and gain based on the pixel amplitude value, and using different adjustment modes to adjust the exposure parameters according to the number and proportion of overexposed pixels.
Improved imaging quality ensures appropriate exposure parameters for near and far scenes in complex scenes, generating high-quality high dynamic range images.
Smart Images

Figure CN120602789A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image acquisition technology, and in particular to an exposure parameter adjustment method, apparatus, computer equipment, and storage medium. Background Art
[0002] The HDR (High Dynamic Range) mode of an imaging device is a technology designed to capture as much detail as possible in a scene, from the darkest to the brightest areas. When using HDR mode, the imaging device typically captures multiple images of the same scene at different exposure parameters. These images are then fused together to create a single image with a high dynamic range. Current imaging devices cannot dynamically adjust these exposure parameters when using multiple exposure parameters, resulting in poor image quality.
[0003] Take a TOF camera, for example. A TOF (Time of Flight) camera is an imaging device that uses light pulse sensing technology to measure the distance and depth between an object and the camera. It calculates depth information using the round-trip time of light pulses. By analyzing the propagation time of light, a TOF camera can achieve high-precision three-dimensional imaging of objects at varying distances. In complex TOF camera scenarios, such as those with both near and far views, a single exposure parameter is insufficient, resulting in overexposure of near views and underexposure of far views. Therefore, multiple exposure parameters are required to collect corresponding exposure data separately, and HDR technology is used to fuse these data to produce high-quality images.
[0004] In current related technologies, when an imaging device uses multiple exposure parameters for imaging, the multiple exposure parameters cannot be dynamically adjusted, which results in poor imaging quality. Summary of the Invention
[0005] Based on this, it is necessary to provide an exposure parameter adjustment method, device, computer equipment and storage medium to address the above technical problems.
[0006] In a first aspect, the present application provides an exposure parameter adjustment method, the method comprising: acquiring a short exposure image and a long exposure image; adjusting a current short exposure parameter based on the amplitude value of each pixel in the short exposure image to determine the short exposure parameter of a next frame of short exposure image; and adjusting a current long exposure parameter based on the amplitude value of each pixel in the short exposure image and the amplitude value of each pixel in the long exposure image to determine the long exposure parameter of the next frame of long exposure image.
[0007] In one embodiment, a plurality of exposure images are acquired; the exposure parameters corresponding to the plurality of exposure images are sequentially increased; based on the order of the exposure parameters from small to large, a plurality of exposure image groups are sequentially constructed from two adjacent exposure images; the exposure images with the smaller exposure parameters in the exposure image group are used as short exposure images, and the exposure images with the larger exposure parameters in the exposure image group are used as long exposure images.
[0008] In one embodiment, for a first target exposure image group, a current short exposure parameter is adjusted based on the amplitude value of each pixel in the short exposure image to determine the short exposure parameter of the next short exposure image frame; and a current long exposure parameter is adjusted based on the amplitude value of each pixel in the short exposure image and the amplitude value of each pixel in the long exposure image to determine the long exposure parameter of the next long exposure image frame; the first target exposure image group is the exposure image group having the smallest exposure parameter among the multiple exposure image groups.
[0009] In one embodiment, for a second target exposure image group, the current long exposure parameters are adjusted based on the amplitude value of each pixel in the short exposure image and the amplitude value of each pixel in the long exposure image to determine the long exposure parameters of the next frame of long exposure image; the second target exposure image group is any exposure image group among the multiple exposure image groups except the first target exposure image group.
[0010] In one embodiment, adjusting the current short exposure parameter based on the amplitude value of each pixel in the short exposure image to determine the short exposure parameter of the next short exposure image includes: determining a first characteristic amplitude value of the short exposure image based on the amplitude value of each pixel in the short exposure image; determining a short exposure gain based on the first characteristic amplitude value and a first reference amplitude value; and adjusting the current short exposure parameter based on the short exposure gain to determine the short exposure parameter of the next short exposure image.
[0011] In one embodiment, adjusting the current long exposure parameters based on the amplitude value of each pixel in the short exposure image and the amplitude value of each pixel in the long exposure image to determine the long exposure parameters of the next frame of long exposure image includes: determining an overexposed area and a number of overexposed pixels in the long exposure image based on the amplitude value of each pixel in the long exposure image; if the number of overexposed pixels is greater than a first number threshold, adjusting the current long exposure parameters based on the amplitude value of each pixel in the short exposure image and the amplitude value of each pixel in the long exposure image based on a first adjustment mode to determine the long exposure parameters of the next frame of long exposure image; if the number of overexposed pixels is less than or equal to the first number threshold, adjusting the current long exposure parameters based on the amplitude value of each pixel in the short exposure image and the amplitude value of each pixel in the long exposure image based on a second adjustment mode to determine the long exposure parameters of the next frame of long exposure image.
[0012] In one embodiment, adjusting the current long exposure parameters based on the amplitude value of each pixel in the short exposure image and the amplitude value of each pixel in the long exposure image based on the first adjustment mode to determine the long exposure parameters of the next frame of long exposure image includes: determining a first area in the short exposure image corresponding to the overexposed area in the long exposure image; determining the amplitude value of each pixel in the first area based on the amplitude value of each pixel in the short exposure image; determining the number of first pixels in the first area whose amplitude values are less than a first amplitude threshold; determining an abnormality ratio based on the first number of pixels and the number of all pixels in the short exposure image; if the abnormality ratio is greater than or equal to the ratio threshold, adjusting the current long exposure parameters based on the abnormality ratio and the ratio threshold to determine the long exposure parameters of the next frame of long exposure image; if the abnormality ratio is less than the ratio threshold, adjusting the current long exposure parameters based on the amplitude value of each pixel in the short exposure image and the amplitude value of each pixel in the long exposure image based on the second adjustment mode to determine the long exposure parameters of the next frame of long exposure image.
[0013] In one embodiment, adjusting the current long exposure parameters based on the abnormality ratio and the ratio threshold to determine the long exposure parameters of the next frame of long exposure image includes: determining a long exposure gain based on the abnormality ratio and the ratio threshold; and adjusting the current long exposure parameters based on the long exposure gain to determine the long exposure parameters of the next frame of long exposure image.
[0014] In one embodiment, adjusting the current long exposure parameters based on the amplitude value of each pixel in the short exposure image and the amplitude value of each pixel in the long exposure image based on the second adjustment mode to determine the long exposure parameters of the next frame of long exposure image includes: determining a non-overexposed area in the long exposure image based on the amplitude value of each pixel in the long exposure image; determining a second area in the short exposure image where the amplitude value of the pixels is less than a second amplitude threshold based on the amplitude value of each pixel in the short exposure image; determining the intersection of the non-overexposed area and the second area as a third area; determining the amplitude value of each pixel in the third area based on the amplitude value of each pixel in the long exposure image; determining a second characteristic amplitude value of the long exposure image based on the amplitude value of each pixel in the third area; determining a long exposure gain based on the second characteristic amplitude value and a second reference amplitude value; and adjusting the current long exposure parameters based on the long exposure gain to determine the long exposure parameters of the next frame of long exposure image.
[0015] In one embodiment, adjusting the current long exposure parameters based on the amplitude value of each pixel in the short exposure image and the amplitude value of each pixel in the long exposure image to determine the long exposure parameters of the next frame of long exposure image includes: determining, based on the amplitude value of each pixel in the short exposure image, a second number of pixels in the short exposure image whose amplitude values are less than a third amplitude threshold; if the second number of pixels is greater than the second number threshold, adjusting the current long exposure parameters based on the amplitude value of each pixel in the short exposure image and the amplitude value of each pixel in the long exposure image based on a third adjustment mode to determine the long exposure parameters of the next frame of long exposure image; if the second number of pixels is less than or equal to the second number threshold, determining the current long exposure parameters as the long exposure parameters of the next frame of long exposure image.
[0016] In one embodiment, adjusting the current long exposure parameters based on the third adjustment mode and the amplitude value of each pixel in the short exposure image and the amplitude value of each pixel in the long exposure image to determine the long exposure parameters of the next frame of long exposure image includes: determining a fourth area in the short exposure image having an amplitude value of pixels less than a third amplitude threshold based on the amplitude value of each pixel in the short exposure image; determining the amplitude value of each pixel in the fourth area based on the amplitude value of each pixel in the long exposure image; determining a second characteristic amplitude value of the long exposure image based on the amplitude value of each pixel in the fourth area; determining a long exposure gain based on the second characteristic amplitude value and a second reference amplitude value; and adjusting the current long exposure parameters based on the long exposure gain to determine the long exposure parameters of the next frame of long exposure image.
[0017] In a second aspect, the present application also provides an exposure parameter adjustment device, which includes: an acquisition module for acquiring a short exposure image and a long exposure image; a first adjustment module for adjusting a current short exposure parameter based on the amplitude value of each pixel in the short exposure image, and determining the short exposure parameter of the next frame of short exposure image; and a second adjustment module for adjusting the current long exposure parameter based on the amplitude value of each pixel in the short exposure image and the amplitude value of each pixel in the long exposure image, and determining the long exposure parameter of the next frame of long exposure image.
[0018] In a third aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements any one of the exposure parameter adjustment methods in the first aspect.
[0019] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements any one of the exposure parameter adjustment methods described in the first aspect.
[0020] The exposure parameter adjustment method, apparatus, computer device, and storage medium described above acquire a short-exposure image and a long-exposure image, adjust the current exposure parameters based on the amplitude value of each pixel in the short-exposure image, and determine the short-exposure parameters for the next short-exposure image. Furthermore, the current long-exposure parameters are adjusted based on the amplitude value of each pixel in the short-exposure image and the amplitude value of each pixel in the long-exposure image, and determine the long-exposure parameters for the next long-exposure image. The short-exposure and long-exposure parameters of the next frame are dynamically adjusted based on the short-exposure and long-exposure images of the current frame, thereby improving imaging quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 1 is a flow chart of an exposure parameter adjustment method according to an embodiment;
[0022] Figure 2 1 is a flow chart of a method for adjusting short exposure parameters in one embodiment;
[0023] Figure 3 4 is a flow chart of a method for adjusting long exposure parameters based on a first adjustment mode in one embodiment;
[0024] Figure 4 4 is a flow chart of a method for adjusting long exposure parameters based on a second adjustment mode in one embodiment;
[0025] Figure 5 4 is a flow chart of a method for adjusting long exposure parameters based on a third adjustment mode in one embodiment;
[0026] Figure 6 1 is a flow chart of a method for adjusting HDR double-exposure parameters in one embodiment;
[0027] Figure 7 A schematic flow chart of a method for adjusting HDR double-exposure parameters in another embodiment;
[0028] Figure 8 is a structural block diagram of an exposure parameter adjustment device in one embodiment;
[0029] Figure 9 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0031] The HDR (High Dynamic Range) mode of an imaging device is a technology designed to capture as much detail as possible in a scene, from the darkest to the brightest areas. When using HDR mode, the imaging device typically captures multiple images of the same scene at different exposure parameters. These images are then fused together to create a single image with a high dynamic range. Current imaging devices cannot dynamically adjust these exposure parameters when using multiple exposure parameters, resulting in poor image quality.
[0032] The imaging device may be any image acquisition device capable of implementing an HDR mode, such as an IR camera with an HDR mode, a TOF camera with an HDR mode, or a line structured light camera with an HDR mode, etc., and this embodiment does not impose any specific limitations. For example, the imaging device may be an IR camera. An IR camera, or infrared (IR) camera, is a device that can capture and record electromagnetic waves within the infrared spectrum. An IR camera captures infrared radiation through its sensor, converts it into an electrical signal, and then converts the electrical signal into a visible image. The HDR mode of an IR camera covers the entire brightness range by capturing a series of images with different exposure parameters, and then synthesizes multiple images with different exposure parameters into an image with a high dynamic range.
[0033] The following embodiments use a time-of-flight (TOF) camera as an example imaging device. It is understood that the exposure parameter adjustment methods described in the embodiments of this application can be applied to any imaging device that uses multiple exposure parameters for fusion imaging. A TOF (Time-of-Flight) camera is a three-dimensional imaging device that uses light pulse sensing technology to measure the distance and depth between an object and the camera based on the time-of-flight principle. A TOF camera is equipped with a light source, which can be a laser or an LED. This light source generates and emits a modulated light signal. The light signal can be a continuous wave or a pulsed wave. The light signal generated by the light source is modulated, allowing it to distinguish between ambient light and reflected light when receiving the reflected signal. The modulation method can be pulse modulation or continuous wave modulation. The light signal is reflected from the surface of an object, and the TOF camera's sensor collects the reflected signal. The intensity and direction of the reflected light depend on the surface characteristics of the object. The TOF camera generates an image based on the collected reflected signal.
[0034] In complex scenes of TOF cameras, such as when there are both near-view and far-view scenes, using a single exposure parameter cannot meet the current scene. For example, the near-view scene may be overexposed or the far-view scene may be underexposed. Therefore, it is necessary to use multiple exposure parameters to collect corresponding exposure data respectively, and use HDR technology to fuse multiple exposure data to generate high-quality images. When using HDR technology, the TOF camera sets different multiple exposure parameters, collects images of corresponding exposure parameters respectively, and then fuses multiple images into one image to image complex scenes. However, when the TOF camera uses multiple exposure parameters for imaging, the multiple exposure parameters cannot be dynamically adjusted, which will result in poor image quality.
[0035] In one embodiment, Figure 1 As shown, a method for adjusting exposure parameters is provided, which is applicable to any imaging device that performs fusion imaging using multiple exposure parameters, and includes the following steps:
[0036] Step 101: Acquire a short exposure image and a long exposure image.
[0037] The imaging device generates a light signal, which is reflected by the object's surface. The imaging device collects short-exposure data using short-exposure parameters and generates a short-exposure image based on the short-exposure data. The imaging device collects long-exposure data using long-exposure parameters and generates a long-exposure image based on the long-exposure data. When adjusting the short-exposure and long-exposure parameters for the next frame, the short-exposure and long-exposure images of the current frame are first acquired.
[0038] Step 102 : adjusting the current short exposure parameter based on the amplitude value of each pixel in the short exposure image to determine the short exposure parameter of the next short exposure image.
[0039] After acquiring a short-exposure image, the amplitude value of each pixel in the short-exposure image is extracted. The amplitude value may be the brightness value of the pixel. When collecting the reflected signal, the imaging device's sensor integrates the received photons and determines the amplitude value of each pixel based on the integration result. Based on the amplitude value of each pixel in the short-exposure image, a characteristic amplitude value of the short-exposure image is determined. The current short-exposure parameter is adjusted based on the characteristic amplitude value to determine the short-exposure parameter for the next short-exposure image frame. The short-exposure parameter is the short-exposure time during short-exposure. The current short-exposure parameter is the short-exposure parameter corresponding to the acquired short-exposure image of the current frame. Determining the short-exposure parameter for the next short-exposure image frame, that is, determining the short-exposure parameter for the short-exposure image frame following the current frame, is performed.
[0040] Step 103 : Based on the amplitude value of each pixel in the short exposure image and the amplitude value of each pixel in the long exposure image, the current long exposure parameter is adjusted to determine the long exposure parameter of the next long exposure image.
[0041] After acquiring a short-exposure image, the amplitude value of each pixel in the short-exposure image is extracted. After acquiring a long-exposure image, the amplitude value of each pixel in the long-exposure image is extracted. Based on the overexposure data of the amplitude value of each pixel in the long-exposure image and the abnormal data of the amplitude value of each pixel in the short-exposure image, the current long-exposure parameters are adjusted to determine the long-exposure parameters for the next long-exposure image frame. The long-exposure parameters are the long-exposure time during the long-exposure process. The current long-exposure parameters are the long-exposure parameters corresponding to the acquired long-exposure image of the current frame. Determining the long-exposure parameters for the next long-exposure image frame, that is, determining the long-exposure parameters for the long-exposure image frame following the current frame, is a process that determines the long-exposure parameters for the next long-exposure image frame.
[0042] This embodiment acquires a short-exposure image and a long-exposure image, adjusts the current exposure parameters based on the amplitude value of each pixel in the short-exposure image, and determines the short-exposure parameters for the next short-exposure image. Furthermore, the current long-exposure parameters are adjusted based on the amplitude value of each pixel in the short-exposure image and the amplitude value of each pixel in the long-exposure image, and determines the long-exposure parameters for the next long-exposure image. Dynamically adjusting the short-exposure and long-exposure parameters for the next frame using the short-exposure and long-exposure images of the current frame improves imaging quality.
[0043] In one embodiment, an imaging device uses multiple sets of exposure parameters during imaging. In this case, the exposure parameters of the next frame corresponding to each exposure image need to be adjusted. Specifically, multiple exposure images are acquired; the exposure parameters corresponding to the multiple exposure images are sequentially increased; and multiple exposure image groups are constructed from two adjacent exposure images in ascending order of the exposure parameters; the exposure images in the exposure image groups with the smallest exposure parameters are used as short-exposure images, and the exposure images in the exposure image groups with the largest exposure parameters are used as long-exposure images.
[0044] An imaging device can be configured with multiple exposure parameters, for example, four or six sets of exposure parameters. During imaging, the imaging device generates an exposure image based on each exposure parameter, thereby acquiring multiple exposure images. For example, using four exposure parameters, a first exposure image is acquired using a first exposure parameter, a second exposure image is acquired using a second exposure parameter, a third exposure image is acquired using a third exposure parameter, and a fourth exposure image is acquired using a fourth exposure parameter. The first exposure parameter is smaller than the second exposure parameter, the second exposure parameter is smaller than the third exposure parameter, and the third exposure parameter is smaller than the fourth exposure parameter. After acquiring multiple exposure images, all exposure images must be sorted according to the magnitude of the exposure parameters. Then, based on the sorting, multiple exposure image groups are constructed from adjacent exposure images. For example, the first exposure image and the second exposure image form a first exposure image group, the second exposure image and the third exposure image form a second exposure image group, and the third exposure image and the fourth exposure image form a third exposure image group. The first exposure image in the first exposure image group with the smaller exposure parameter is designated as a short exposure image, and the second exposure image in the first exposure image group with the larger exposure parameter is designated as a long exposure image. The second exposure image with the smallest exposure parameter in the second exposure image group is used as the short exposure image, and the third exposure image with the largest exposure parameter in the second exposure image group is used as the long exposure image. The third exposure image with the smallest exposure parameter in the third exposure image group is used as the short exposure image, and the fourth exposure image with the largest exposure parameter in the third exposure image group is used as the long exposure image. For each exposure image group, the exposure parameter adjustment method described in the above embodiment can be used to adjust the short exposure parameters of the next short exposure image and the long exposure parameters of the next long exposure image.
[0045] In one embodiment, in order to increase the adjustment speed and reduce repeated adjustments for adjusting multiple exposure parameters, multiple exposure image groups can be determined as a first target exposure image group and a second target exposure image group. The first target exposure image group is the exposure image group with the smallest exposure parameter among the multiple exposure image groups; the second target exposure image group is any exposure image group among the multiple exposure image groups other than the first target exposure image group. For example, setting four exposure parameters is used. Since the first exposure image group has the smallest exposure parameter, the first exposure image group is used as the first target exposure image group; the remaining second and third exposure image groups are used as second target exposure image groups.
[0046] For the first target exposure image group, the current short exposure parameters are adjusted based on the amplitude value of each pixel in the short exposure image to determine the short exposure parameters for the next short exposure image frame. Furthermore, the current long exposure parameters are adjusted based on the amplitude value of each pixel in the short exposure image and the amplitude value of each pixel in the long exposure image to determine the long exposure parameters for the next long exposure image frame. In other words, for the first target exposure image group, the exposure parameters for the corresponding next frame need to be adjusted for both the short exposure images and the long exposure images within the image group. The specific adjustment methods are described in the above embodiment and will not be further elaborated in this embodiment.
[0047] For the second target exposure image group, the current long exposure parameters are adjusted based on the amplitude value of each pixel in the short exposure image and the amplitude value of each pixel in the long exposure image, and the long exposure parameters of the next long exposure image are determined. In other words, for the second target exposure image group, only the exposure parameters of the next long exposure image frame need to be adjusted. The specific adjustment method is described in the above embodiment and will not be repeated in this embodiment.
[0048] In this embodiment, a plurality of exposure images are divided into a plurality of exposure image groups according to the size of the exposure parameters, and then the corresponding exposure parameters are adjusted for each exposure image group respectively, thereby completing the adjustment of all exposure parameters.
[0049] In one embodiment, Figure 2 As shown, a short exposure parameter adjustment method is provided, comprising the following steps:
[0050] Step 201 : determining a first characteristic amplitude value of the short exposure image based on the amplitude value of each pixel in the short exposure image.
[0051] After extracting the amplitude value of each pixel in the short-exposure image based on the short-exposure image, a first characteristic amplitude value of the short-exposure image needs to be determined based on the amplitude value of each pixel. The first characteristic amplitude value is used to represent the characteristics of all amplitude values in the short-exposure image. The first characteristic amplitude value can be the mean, median, or percentile of the amplitude values of each pixel in the short-exposure image. This is not specifically limited in this embodiment; it only requires that the first characteristic amplitude value can reflect the characteristics of all amplitude values in the short-exposure image.
[0052] When the first characteristic amplitude value is the average of the amplitude values of each pixel in the short exposure image, an average value is calculated based on the amplitude value of each pixel in the short exposure image, and the average value is the first characteristic amplitude value.
[0053] When the first characteristic amplitude value is the median of the amplitude values of each pixel in the short exposure image, the amplitude values of each pixel in the short exposure image are first sorted, and the median is determined based on the sorting, and the median is the first characteristic threshold.
[0054] When the first characteristic amplitude value is a percentile value of the amplitude value of each pixel in the short-exposure image, the amplitude values of each pixel in the short-exposure image are first sorted to obtain a preset percentile. The percentile value is determined based on the percentile, and the percentile value is used as the first characteristic threshold. For example, if the percentile is 95%, after sorting, the amplitude value corresponding to the 95% position is determined to be the percentile value of the corresponding percentile.
[0055] Step 202: Determine a short exposure gain according to the first characteristic amplitude value and the first reference amplitude value.
[0056] The first reference amplitude value is a preset reference amplitude value for calculating the short exposure gain. The specific value of the first reference amplitude value needs to be set based on actual usage requirements and is not specifically limited in this embodiment. After obtaining the first characteristic amplitude value, the first characteristic amplitude value is divided by the first reference amplitude value to obtain the short exposure gain.
[0057] Step 203 : Adjust the current short exposure parameter according to the short exposure gain to determine the short exposure parameter of the next short exposure image frame.
[0058] After obtaining the short exposure gain, the short exposure gain is multiplied by the current short exposure parameter to obtain the short exposure parameter of the next short exposure image frame, that is, the short exposure time corresponding to the next short exposure image frame is obtained.
[0059] This embodiment determines the short-exposure parameters for the next frame by using the amplitude value of each pixel in the short-exposure image to determine the first characteristic amplitude value. This first characteristic amplitude value allows for more reasonable adjustment of the short-exposure parameters for the next frame, further improving the imaging quality of the TOF camera.
[0060] In one embodiment, when adjusting the long exposure parameters of the next long exposure image, the amplitude value of each pixel in the long exposure image is first extracted. Based on the amplitude value of each pixel in the long exposure image, the overexposed region and the number of overexposed pixels in the long exposure image are determined. Pixels whose amplitude values are greater than or equal to a preset threshold are considered overexposed pixels. Specifically, an overexposed threshold is pre-set. The specific value of the overexposed threshold can be set based on actual usage requirements and is not specifically limited in this embodiment. The amplitude value of each pixel in the long exposure image is compared with the overexposed threshold, and pixels whose amplitude values are greater than or equal to the overexposed threshold are considered overexposed pixels. The region formed by all overexposed pixels is the overexposed region. The number of all overexposed pixels is counted to determine the number of overexposed pixels. If the number of overexposed pixels is greater than the first threshold, it indicates that the current scene is obstructed by an obstacle, that is, there are both near- and far-field scenes. In this case, an excessive number of overexposed pixels will further increase the scene difference between the near- and far-field scenes, which may result in a problem where long exposure and short exposure increase the difference in the current scene.
[0061] If the number of overexposed pixels is greater than a first threshold, the current long exposure parameters are adjusted based on the amplitude value of each pixel in the short exposure image and the amplitude value of each pixel in the long exposure image based on the first adjustment mode to determine the long exposure parameters for the next long exposure image.
[0062] If the number of overexposed pixels is less than or equal to the first threshold, the current long exposure parameters are adjusted based on the amplitude value of each pixel in the short exposure image and the amplitude value of each pixel in the long exposure image based on the second adjustment mode to determine the long exposure parameters for the next long exposure image.
[0063] The first threshold value can be set based on actual usage requirements and is not specifically limited in this embodiment. By comparing the number of overexposed pixels with the first threshold value, different adjustment modes can be set for different situations, achieving refined adjustment of long exposure parameters and further improving image quality.
[0064] In one embodiment, Figure 3 As shown, a long exposure parameter adjustment method based on a first adjustment mode is provided, comprising the following steps:
[0065] Step 301 : determining, in a short-exposure image, a first region corresponding to an overexposed region in a long-exposure image.
[0066] After the overexposed area is determined in the long-exposure image, a mapping relationship exists between the pixels of the long-exposure image and the pixels of the short-exposure image, as the long-exposure image and the short-exposure image are captured by the same imaging device with different exposure times and the same scene. The overexposed area determined in the long-exposure image can be mapped to the short-exposure image using the mapping relationship between the pixels of the long-exposure image and the short-exposure image, thereby determining a first area in the short-exposure image corresponding to the overexposed area.
[0067] Step 302 : Determine the amplitude value of each pixel in the first area based on the amplitude value of each pixel in the short exposure image.
[0068] After the amplitude value of each pixel in the short exposure image is extracted, all pixels corresponding to the first region in the short exposure image are determined, and thus the amplitude value of each pixel in the first region can be determined.
[0069] Step 303: Determine the number of pixels in the first area whose amplitude values are smaller than a first amplitude threshold.
[0070] The amplitude value of each pixel in the first region is compared with the first amplitude threshold to determine pixels whose amplitude values are less than the first amplitude threshold. Pixels with amplitude values less than the first amplitude threshold indicate that the amplitude value of the current pixel may be abnormal. The first amplitude threshold can be set based on actual usage requirements and is not specifically limited in this embodiment. By counting the number of pixels with amplitude values less than the first amplitude threshold, the number of pixels in the first region whose amplitude values are less than the first amplitude threshold is obtained.
[0071] Step 304 : determining an abnormality ratio according to the first number of pixels and the number of all pixels in the short-exposure image.
[0072] Count all pixels in the short-exposure image and divide the first pixel count by the total number of pixels in the short-exposure image to obtain an abnormality ratio. The abnormality ratio is the ratio of the number of pixels in the first region whose amplitude values are less than the first amplitude threshold to the total number of pixels in the short-exposure image.
[0073] Step 305 : If the abnormality ratio is greater than or equal to the ratio threshold, the current long exposure parameters are adjusted based on the abnormality ratio and the ratio threshold to determine the long exposure parameters of the next long exposure image frame.
[0074] When the abnormal ratio is greater than or equal to the ratio threshold, it indicates that the long-exposure image is overexposed. The short-exposure parameters in the short-exposure image cannot cover the current scene. Therefore, the exposure parameters corresponding to the long-exposure image need to be adjusted according to the ratio to ensure that the current scene can be covered.
[0075] Specifically, a long exposure gain is determined based on the abnormality ratio and the ratio threshold; the current long exposure parameters are adjusted based on the long exposure gain to determine the long exposure parameters for the next long exposure image. The ratio threshold can be set based on actual usage requirements and is not specifically limited in this embodiment. The ratio threshold is divided by the abnormality ratio to obtain the long exposure gain. After obtaining the long exposure gain, the long exposure gain is multiplied by the current long exposure parameters to obtain the long exposure parameters for the next long exposure image. This means that the long exposure time corresponding to the next long exposure image is obtained. It will be understood that the above-mentioned calculation method for determining the long exposure gain and the calculation method for adjusting the long exposure parameters using the long exposure gain are merely exemplary descriptions, and the long exposure parameters can be adjusted using any reasonable method, which is not specifically limited in this embodiment.
[0076] In step 306 , if the abnormality ratio is less than the ratio threshold, the current long exposure parameters are adjusted based on the amplitude value of each pixel in the short exposure image and the amplitude value of each pixel in the long exposure image based on the second adjustment mode to determine the long exposure parameters for the next long exposure image.
[0077] If the anomaly ratio is less than the ratio threshold, it means that the overexposed area of the long-exposure image can be covered by the short-exposure image. Therefore, it is necessary to use the second adjustment mode to adjust the long-exposure parameters of the next long-exposure image.
[0078] In one embodiment, Figure 4 As shown, a long exposure parameter adjustment method based on the second adjustment mode is provided, comprising the following steps:
[0079] Step 401 : determining a non-overexposed area in the long exposure image based on the amplitude value of each pixel in the long exposure image.
[0080] After extracting the amplitude value of each pixel in the long-exposure image, each pixel's amplitude value is compared with the overexposure threshold. Pixels with amplitude values less than the overexposure threshold are considered non-overexposed pixels. The area formed by all non-overexposed pixels is the non-overexposed area.
[0081] Step 402 : Based on the amplitude value of each pixel in the short exposure image, determine a second region in which the amplitude value of the pixels in the short exposure image is less than a second amplitude threshold.
[0082] After extracting the amplitude value of each pixel in the short-exposure image, the amplitude value of each pixel in the short-exposure image is compared with a second amplitude threshold. The region formed by pixels having amplitude values less than the second amplitude threshold is defined as the second region. The second amplitude threshold can be set based on actual usage requirements and is not specifically limited in this embodiment.
[0083] Step 403: determine the intersection of the non-overexposed area and the second area as the third area.
[0084] After determining the second region in the short-exposure image, the second region in the short-exposure image is mapped to the long-exposure image using a mapping relationship between pixels in the long-exposure image and the short-exposure image, thereby obtaining the second region in the long-exposure image. An intersection is determined between the non-overexposed region in the long-exposure image and the second region in the long-exposure image, where pixels in the intersection belong to both the non-overexposed region and the second region. This intersection is used as the third region in the long-exposure image.
[0085] Step 404 : Determine the amplitude value of each pixel in the third area based on the amplitude value of each pixel in the long exposure image.
[0086] By determining all pixels in the third area of the long exposure image based on the extracted amplitude value of each pixel in the long exposure image, the amplitude value of each pixel in the third area of the long exposure image can be determined.
[0087] Step 405 : Determine a second characteristic amplitude value of the long exposure image according to the amplitude value of each pixel in the third area.
[0088] A second characteristic amplitude value of the long-exposure image is determined based on the amplitude value of each pixel in the third region. The second characteristic amplitude value is used to represent a characteristic of the amplitude values in the long-exposure image. The second characteristic amplitude value may be the mean, median, or percentile of the amplitude values of each pixel in the third region. This embodiment does not impose any specific limitations on this; the second characteristic amplitude value only needs to reflect the characteristic of the amplitude values in the long-exposure image.
[0089] When the second characteristic amplitude value is the average of the amplitude values of each pixel in the third area, an average value is calculated based on the amplitude value of each pixel in the third area, and the average value is the second characteristic amplitude value.
[0090] When the second characteristic amplitude value is the median of the amplitude values of each pixel in the third area, the amplitude values of each pixel in the third area are first sorted, and the median is determined based on the sorting, and the median is the second characteristic amplitude value.
[0091] When the second characteristic amplitude value is a percentile value of the amplitude value of each pixel in the third region, the amplitude values of each pixel in the third region are first sorted to obtain a preset percentile, and a percentile value is determined based on the percentile. This percentile value is the second characteristic amplitude value. For example, the percentile is 95%. After sorting, the amplitude value corresponding to the 95% position is determined to be the percentile value of the corresponding percentile.
[0092] Step 406: Determine a long exposure gain according to the second characteristic amplitude value and the second reference amplitude value.
[0093] The second reference amplitude value is a preset reference amplitude value for calculating the long exposure gain. The specific value of the second reference amplitude value needs to be set according to actual usage requirements and is not specifically limited in this embodiment. After obtaining the second characteristic amplitude value, the second characteristic amplitude value is divided by the second reference amplitude value to obtain the long exposure gain.
[0094] Step 407 : Adjust the current long exposure parameters according to the long exposure gain to determine the long exposure parameters of the next long exposure image frame.
[0095] After obtaining the long exposure gain, the long exposure gain is multiplied by the current long exposure parameter to obtain the long exposure parameter of the next long exposure image frame. In other words, the long exposure time corresponding to the next long exposure image frame is obtained.
[0096] This embodiment handles various situations when adjusting the long exposure parameters of the next long exposure image. When the number of overexposed pixels in the long exposure image exceeds a first threshold, it indicates that the current scene is obstructed by an obstacle, and there may be a problem of increased imaging differences between the long and short exposure parameters. Under this premise, if the abnormality ratio is greater than or equal to the ratio threshold, it indicates that the long exposure parameters and short exposure parameters have increased imaging differences, and it is necessary to reduce the long exposure parameters, that is, to shorten the long exposure time. In this case, the long exposure parameters are adjusted using the first adjustment mode. If the abnormality ratio is less than the ratio threshold, it indicates that the long exposure parameters and short exposure parameters have not increased imaging differences, but it is necessary to ensure that the amplitude values of the non-overexposed areas of the long exposure image reach a certain intensity. Therefore, appropriate adjustment of the long exposure parameters is required, and the long exposure parameters are adjusted using the second adjustment mode. If the number of overexposed pixels in the long exposure image is less than or equal to the first threshold, it indicates that there is no obstruction, and therefore appropriate adjustment of the long exposure parameters is required. In this case, the long exposure parameters are adjusted using the second adjustment mode. According to different scenes when the imaging device captures images, different adjustment modes are used to adjust the long exposure parameters, so that the adjustment of the long exposure parameters can be applied to different scenes, thereby further improving the imaging quality.
[0097] In one embodiment, a long exposure parameter adjustment method is further provided, which specifically includes the following steps:
[0098] Step 1: Based on the amplitude value of each pixel in the short exposure image, determine the second number of pixels in the short exposure image whose amplitude values are smaller than a third amplitude threshold.
[0099] After extracting the amplitude value of each pixel in the short-exposure image, the amplitude value of each pixel in the short-exposure image is compared with a third amplitude threshold, and the number of second pixels whose amplitude value is less than the third amplitude threshold is counted. The third amplitude threshold can be set based on actual usage requirements and is not specifically limited in this embodiment. Pixels with amplitude values less than the third amplitude threshold are considered underexposed pixels in the short-exposure image.
[0100] Step 2: If the second number of pixels is greater than the second number threshold, based on the third adjustment mode, adjust the current long exposure parameters according to the amplitude value of each pixel in the short exposure image and the amplitude value of each pixel in the long exposure image to determine the long exposure parameters of the next long exposure image.
[0101] Step 3: If the second pixel quantity is less than or equal to the second quantity threshold, the current long exposure parameter is determined as the long exposure parameter of the next frame of long exposure image.
[0102] When the number of second pixels is greater than the second threshold, it indicates that the short exposure parameters cannot cover the current scene, and therefore the long exposure parameters need to be adjusted. In this case, the long exposure parameters for the next long-exposure image are determined using the third adjustment mode. When the number of second pixels is less than or equal to the second threshold, it indicates that the short exposure parameters can cover the current scene, and therefore the long exposure parameters do not need to be adjusted. The current long exposure parameters are determined as the long exposure parameters for the next long-exposure image. The second threshold can be set based on actual usage requirements and is not specifically limited in this embodiment.
[0103] In one embodiment, Figure 5 As shown, a long exposure parameter adjustment method based on the third adjustment mode is provided, comprising the following steps:
[0104] Step 501 : Based on the amplitude value of each pixel in the short exposure image, determine a fourth region in the short exposure image where the amplitude value of the pixels is less than a third amplitude threshold.
[0105] After extracting the amplitude value of each pixel in the short exposure image, the amplitude value of each pixel in the short exposure image is compared with the third amplitude threshold, and the area formed by the pixels whose amplitude values are smaller than the third amplitude threshold is taken as the fourth area.
[0106] Step 502 : Determine the amplitude value of each pixel in the fourth area based on the amplitude value of each pixel in the long exposure image.
[0107] After determining the fourth region in the short-exposure image, the fourth region in the short-exposure image is mapped to the long-exposure image based on a mapping relationship between the long-exposure image and the pixels of the short-exposure image, thereby obtaining the fourth region in the long-exposure image. Based on the amplitude value extracted for each pixel in the long-exposure image, all pixels in the fourth region of the long-exposure image are determined, thereby determining the amplitude value of each pixel in the fourth region of the long-exposure image.
[0108] Step 503: Determine a second characteristic amplitude value of the long exposure image according to the amplitude value of each pixel in the fourth area.
[0109] A second characteristic amplitude value of the long-exposure image is determined based on the amplitude value of each pixel in the fourth region. The second characteristic amplitude value is used to represent a characteristic of the amplitude values in the long-exposure image. The second characteristic amplitude value may be the mean, median, or percentile of the amplitude values of each pixel in the fourth region. This embodiment does not impose any specific limitations on this; the second characteristic amplitude value only needs to reflect the characteristic of the amplitude values in the long-exposure image.
[0110] When the second characteristic amplitude value is the average of the amplitude values of each pixel in the fourth region, an average value is calculated based on the amplitude value of each pixel in the fourth region, and the average value is the second characteristic amplitude value.
[0111] When the second characteristic amplitude value is the median of the amplitude values of each pixel in the fourth region, the amplitude values of each pixel in the fourth region are first sorted, and the median is determined based on the sorting, and the median is the second characteristic amplitude value.
[0112] When the second characteristic amplitude value is a percentile value of the amplitude value of each pixel in the fourth region, the amplitude values of each pixel in the fourth region are first sorted to obtain a preset percentile, and a percentile value is determined based on the percentile. This percentile value is the second characteristic amplitude value. For example, the percentile is 95%. After sorting, the amplitude value corresponding to the 95% position is determined to be the percentile value of the corresponding percentile.
[0113] Step 504: Determine a long exposure gain according to the second characteristic amplitude value and the second reference amplitude value.
[0114] The second reference amplitude value is a preset reference amplitude value for calculating the long exposure gain. The specific value of the second reference amplitude value needs to be set according to actual usage requirements and is not specifically limited in this embodiment. After obtaining the second characteristic amplitude value, the second characteristic amplitude value is divided by the second reference amplitude value to obtain the long exposure gain.
[0115] Step 505 : Adjust the current long exposure parameters according to the long exposure gain to determine the long exposure parameters of the next long exposure image frame.
[0116] After obtaining the long exposure gain, the long exposure gain is multiplied by the current long exposure parameter to obtain the long exposure parameter of the next long exposure image frame. In other words, the long exposure time corresponding to the next long exposure image frame is obtained.
[0117] This embodiment further improves the imaging quality by counting underexposed areas in the short-exposure image and adjusting the long-exposure parameters according to different situations.
[0118] In one embodiment, after acquiring a long-exposure image and a short-exposure image, an overexposed area in the long-exposure image is determined based on the long-exposure image, data corresponding to the overexposed area in the long-exposure data is replaced with data at a corresponding position in the short-exposure data, and subsequent data processing is performed on the replaced long-exposure data.
[0119] In one specific embodiment, an HDR double-exposure parameter adjustment method is provided. The double-exposure parameter adjustment method of this embodiment includes: a convergence strategy for short exposure parameters, that is, a method for adjusting short exposure parameters; and a convergence strategy for long exposure parameters, that is, a method for adjusting long exposure parameters. When adjusting long exposure parameters, two methods are included. The first method is to adjust long exposure parameters based on pixel data in the long exposure image that does not meet the exposure threshold, that is, in the overexposed area. The second method is to adjust long exposure parameters based on pixel data in the short exposure image that does not meet the exposure threshold, that is, whose amplitude value is less than the set amplitude threshold. When performing data fusion through HDR, it is first determined whether there are overexposed pixels in the long exposure data. If there are overexposed pixels, the overexposed pixels are replaced with the short exposure data at the corresponding position. For pixels that are not overexposed, the long exposure data is also used to complete data fusion. Subsequent data processing is performed on the fused data.
[0120] like Figure 6 As shown, a method for adjusting HDR double exposure parameters is provided, which adjusts the long exposure parameters based on pixel data in the long exposure image that does not meet the exposure threshold, that is, the overexposed area.
[0121] Step 1: Acquire short-exposure images and long-exposure images of the same scene.
[0122] Step 2: Use the short exposure image to calculate the exposure value required for the next short exposure, where the exposure value is the exposure time. For example, the amplitude value of each pixel in the short exposure image can be counted, and the corresponding mean, median, or quantile value can be calculated as the first characteristic amplitude value. Specifically, the amplitude value of each pixel in the short exposure image is counted, and the first characteristic amplitude value, which is the mean, median, or quantile value, is calculated. The first characteristic amplitude value is divided by the reference amplitude to obtain a short exposure gain; the short exposure gain is multiplied by the exposure value of the current short exposure to calculate the exposure value of the next short exposure.
[0123] Step 3 counts the number of overexposed pixels in the long-exposure image. If the number of overexposed pixels exceeds a set threshold, it indicates an obstruction, potentially leading to a significant difference between the long and short exposure values for the current scene. In this case, the overexposed region corresponding to the overexposed pixels is determined in the long-exposure image. This region is then mapped to the short-exposure image. The amplitude value of each pixel in the corresponding region in the short-exposure image is obtained. The number of pixels with amplitude values below the set threshold is counted, and the ratio of these values below the threshold to the total number of pixels in the short-exposure image is calculated.
[0124] In step 3.1, if the ratio is greater than or equal to the set ratio, it indicates that the short exposure value cannot cover the current scene. At this point, the difference between the long and short exposure values for the current scene has increased, and the long exposure value needs to be reduced. In this case, divide the reference ratio value by the above ratio to obtain the long exposure gain. Multiply the long exposure gain by the current long exposure value to calculate the exposure value of the next long exposure frame.
[0125] In step 3.2, if the ratio is less than the set ratio, the short exposure value can cover the current scene. In this case, the difference between the long and short exposure values for the current scene does not arise. However, the amplitude values of the non-overexposed areas of the long exposure image must reach a certain level, so the long exposure value must be appropriately adjusted. In this case, the non-overexposed areas are identified in the long exposure image, and the areas in the short exposure image where the pixel amplitude values are less than a set threshold are identified. The intersection of the non-overexposed areas and the areas with amplitude values less than the set threshold is defined as the region of interest for the long exposure value. The amplitude values of each pixel in the long exposure image corresponding to the region of interest are counted, and the corresponding mean, median, or quantile value is calculated as the second characteristic amplitude value. The second characteristic amplitude value is divided by the reference amplitude to obtain the long exposure gain. The long exposure gain is then multiplied by the current long exposure value to calculate the exposure value for the next long exposure frame.
[0126] Step 4: If the number of overexposed pixels is less than or equal to the set threshold, it means there is no obstacle blocking the image. In this case, the exposure value for the next frame length exposure is calculated using the method in step 3.2.
[0127] In actual use, that is, in the subsequent fusion process, the data of the overexposed area of the long-exposure image is replaced with the data of the corresponding area of the short-exposure image, thereby achieving data fusion.
[0128] like Figure 7 As shown, a method for adjusting HDR double exposure parameters is provided, which adjusts the long exposure parameters based on pixel data in the short exposure image that does not meet the exposure threshold, that is, the amplitude value is less than the set amplitude threshold.
[0129] Step 1: Acquire short-exposure images and long-exposure images of the same scene.
[0130] Step 2: Use the short exposure image to calculate the exposure value required for the next short exposure, where the exposure value is the exposure time. For example, the amplitude value of each pixel in the short exposure image can be counted, and the corresponding mean, median, or quantile value can be calculated as the first characteristic amplitude value. Specifically, the amplitude value of each pixel in the short exposure image is counted, and the first characteristic amplitude value, which is the mean, median, or quantile value, is calculated. The first characteristic amplitude value is divided by the reference amplitude to obtain a short exposure gain; the short exposure gain is multiplied by the exposure value of the current short exposure to calculate the exposure value of the next short exposure.
[0131] Step 3: Count the number of pixels in the short-exposure image whose amplitude values are smaller than a predetermined amplitude threshold.
[0132] In step 3.1, if the number of pixels is greater than the set threshold, the short exposure value cannot cover the current scene and the long exposure value needs to be adjusted. At this point, based on the short exposure image, the area in the short exposure image with an amplitude value less than the set threshold is defined as the region of interest. The amplitude value of each pixel in the long exposure image corresponding to the region of interest is counted, and the corresponding mean, median, or quantile value is calculated as the second characteristic amplitude value. The second characteristic amplitude value is divided by the reference amplitude to obtain the long exposure gain; the long exposure gain is then multiplied by the exposure value of the current long exposure to calculate the exposure value of the next long exposure frame.
[0133] In step 3.2, if the number of pixels is less than or equal to the set threshold, it means that the short exposure value can cover the current scene, and there is no need to adjust the long exposure value. In other words, the exposure value of the next long exposure frame remains the same as the current value.
[0134] In actual use, that is, in the subsequent fusion process, the data of the overexposed area of the long-exposure image is replaced with the data of the corresponding area of the short-exposure image, thereby achieving data fusion.
[0135] The embodiments of the present application simultaneously adjust both long and short exposure parameters, facilitating adaptation to more complex scenes and providing greater flexibility in setting exposure parameters. When adjusting exposure parameters, exposure gain is calculated using only the image amplitude, eliminating the need for processing such as partitioning the image. This simplifies calculations and further improves imaging speed.
[0136] It should be understood that, although the various steps in the flowcharts involved in the above embodiments are shown in sequence as indicated by the arrows, these steps are not necessarily performed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be performed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0137] Based on the same inventive concept, embodiments of the present application also provide an exposure parameter adjustment device for implementing the aforementioned exposure parameter adjustment method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of one or more of the following embodiments of the exposure parameter adjustment device can be found in the aforementioned limitations of the exposure parameter adjustment method and will not be further elaborated here.
[0138] In one embodiment, Figure 8 As shown, an exposure parameter adjustment device is provided, comprising: an acquisition module 100, a first adjustment module 200 and a second adjustment module 300, wherein:
[0139] The acquisition module 100 is used to acquire a short-exposure image and a long-exposure image.
[0140] The first adjustment module 200 is configured to adjust the current short exposure parameter based on the amplitude value of each pixel in the short exposure image to determine the short exposure parameter of the next short exposure image.
[0141] The second adjustment module 300 is configured to adjust the current long exposure parameters based on the amplitude value of each pixel in the short exposure image and the amplitude value of each pixel in the long exposure image, and determine the long exposure parameters of the next long exposure image.
[0142] The first adjustment module 200 is further configured to determine a first characteristic amplitude value of the short exposure image based on the amplitude value of each pixel in the short exposure image; determine a short exposure gain based on the first characteristic amplitude value and a first reference amplitude value; and adjust a current short exposure parameter based on the short exposure gain to determine a short exposure parameter for a next short exposure image.
[0143] The acquisition module 100 is further configured to acquire a plurality of exposure images; the exposure parameters corresponding to the plurality of exposure images are sequentially increased; and based on the order of the exposure parameters from small to large, a plurality of exposure image groups are sequentially constructed from two adjacent exposure images; the exposure images with the smaller exposure parameters in the exposure image group are used as short-exposure images, and the exposure images with the larger exposure parameters in the exposure image group are used as long-exposure images.
[0144] For the first target exposure image group, the first adjustment module 200 is configured to adjust the current short exposure parameters based on the amplitude value of each pixel in the short exposure image to determine the short exposure parameters for the next short exposure image. The second adjustment module 300 is configured to adjust the current long exposure parameters based on the amplitude value of each pixel in the short exposure image and the amplitude value of each pixel in the long exposure image to determine the long exposure parameters for the next long exposure image. The first target exposure image group is the exposure image group with the smallest exposure parameter among the multiple exposure image groups.
[0145] For a second target exposure image group, the second adjustment module 300 is configured to adjust the current long exposure parameters based on the amplitude value of each pixel in the short exposure image and the amplitude value of each pixel in the long exposure image, thereby determining the long exposure parameters for the next long exposure image. The second target exposure image group is any exposure image group among the multiple exposure image groups other than the first target exposure image group.
[0146] The second adjustment module 300 is further configured to determine an overexposed area and a number of overexposed pixels in the long-exposure image based on the amplitude value of each pixel in the long-exposure image. If the number of overexposed pixels is greater than a first threshold, the module adjusts the current long exposure parameters based on the amplitude value of each pixel in the short-exposure image and the amplitude value of each pixel in the long-exposure image in accordance with the first adjustment mode to determine the long exposure parameters for the next long-exposure image. If the number of overexposed pixels is less than or equal to the first threshold, the module adjusts the current long exposure parameters based on the amplitude value of each pixel in the short-exposure image and the amplitude value of each pixel in the long-exposure image in accordance with the second adjustment mode to determine the long exposure parameters for the next long-exposure image.
[0147] The second adjustment module 300 is further configured to determine, in the short-exposure image, a first region corresponding to an overexposed region in the long-exposure image; determine, based on the amplitude value of each pixel in the short-exposure image, an amplitude value of each pixel in the first region; determine a first number of pixels in the first region whose amplitude values are less than a first amplitude threshold; determine an abnormality ratio based on the first number of pixels and the number of all pixels in the short-exposure image; if the abnormality ratio is greater than or equal to the ratio threshold, adjust the current long exposure parameters based on the abnormality ratio and the ratio threshold to determine the long exposure parameters for the next long-exposure image; if the abnormality ratio is less than the ratio threshold, adjust the current long exposure parameters based on the amplitude value of each pixel in the short-exposure image and the amplitude value of each pixel in the long-exposure image based on a second adjustment mode to determine the long exposure parameters for the next long-exposure image.
[0148] The second adjustment module 300 is further configured to determine a long exposure gain according to the abnormal ratio and the ratio threshold; and adjust the current long exposure parameters according to the long exposure gain to determine the long exposure parameters of the next long exposure image.
[0149] The second adjustment module 300 is further configured to determine a non-overexposed area in the long-exposure image based on the amplitude value of each pixel in the long-exposure image; determine a second area in the short-exposure image having pixel amplitude values less than a second amplitude threshold based on the amplitude value of each pixel in the short-exposure image; determine the intersection of the non-overexposed area and the second area as a third area; determine the amplitude value of each pixel in the third area based on the amplitude value of each pixel in the long-exposure image; determine a second characteristic amplitude value of the long-exposure image based on the amplitude value of each pixel in the third area; determine a long exposure gain based on the second characteristic amplitude value and a second reference amplitude value; and adjust the current long exposure parameters based on the long exposure gain to determine the long exposure parameters of the next long-exposure image.
[0150] The second adjustment module 300 is further configured to determine, based on the amplitude value of each pixel in the short-exposure image, a second number of pixels in the short-exposure image whose amplitude value is less than a third amplitude threshold; if the second number of pixels is greater than the second number threshold, adjust the current long exposure parameters based on the amplitude value of each pixel in the short-exposure image and the amplitude value of each pixel in the long-exposure image based on a third adjustment mode to determine the long exposure parameters for the next long-exposure image; and if the second number of pixels is less than or equal to the second number threshold, determine the current long exposure parameters as the long exposure parameters for the next long-exposure image.
[0151] The second adjustment module 300 is further configured to determine, based on the amplitude value of each pixel in the short-exposure image, a fourth region in which the amplitude value of pixels in the short-exposure image is less than a third amplitude threshold; determine, based on the amplitude value of each pixel in the long-exposure image, the amplitude value of each pixel in the fourth region; determine, based on the amplitude value of each pixel in the fourth region, a second characteristic amplitude value of the long-exposure image; determine a long exposure gain based on the second characteristic amplitude value and a second reference amplitude value; and adjust the current long exposure parameters based on the long exposure gain to determine the long exposure parameters of the next long-exposure image.
[0152] Each module in the above-mentioned exposure parameter adjustment device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in the form of software in a memory in the computer device, so that the processor can call and execute the corresponding operations of each module.
[0153] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 9 As shown. For example, the terminal can be any imaging device that performs fusion imaging through multiple exposure parameters. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner. The wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, an exposure parameter adjustment method is implemented.
[0154] Those skilled in the art will understand that Figure 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0155] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor implements any one of the exposure parameter adjustment methods in the above embodiments when executing the computer program.
[0156] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, any one of the exposure parameter adjustment methods in the above embodiments is implemented.
[0157] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), data processing logic devices based on quantum computing, and the like.
[0158] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0159] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A method for adjusting exposure parameters, characterized in that: The method comprises: Acquire short exposure images and long exposure images; Adjusting a current short exposure parameter based on an amplitude value of each pixel in the short exposure image to determine a short exposure parameter for a next short exposure image; Based on the amplitude value of each pixel in the short exposure image and the amplitude value of each pixel in the long exposure image, the current long exposure parameter is adjusted to determine the long exposure parameter of the next long exposure image.
2. The method according to claim 1, characterized in that The method further comprises: Acquiring a plurality of exposure images; the exposure parameters corresponding to the plurality of exposure images are increased in sequence; Based on the order of the exposure parameters from small to large, multiple exposure image groups are constructed in sequence according to the exposure images adjacent to each other; the exposure images with small exposure parameters in the exposure image group are used as short exposure images, and the exposure images with large exposure parameters in the exposure image group are used as long exposure images.
3. The method according to claim 2, characterized in that The method further comprises: For a first target exposure image group, a current short exposure parameter is adjusted based on the amplitude value of each pixel in the short exposure image to determine the short exposure parameter of a next short exposure image frame; and a current long exposure parameter is adjusted based on the amplitude value of each pixel in the short exposure image and the amplitude value of each pixel in the long exposure image to determine the long exposure parameter of a next long exposure image frame; the first target exposure image group is the exposure image group having the smallest exposure parameter among the multiple exposure image groups.
4. The method according to claim 3, characterized in that The method further comprises: For a second target exposure image group, current long exposure parameters are adjusted based on the amplitude value of each pixel in the short exposure image and the amplitude value of each pixel in the long exposure image to determine long exposure parameters for a next frame of long exposure image; the second target exposure image group is any exposure image group among the multiple exposure image groups except the first target exposure image group.
5. The method according to any one of claims 1 to 4, characterized in that The adjusting the current short exposure parameter based on the amplitude value of each pixel in the short exposure image to determine the short exposure parameter of the next short exposure image frame includes: determining a first characteristic amplitude value of the short exposure image based on an amplitude value of each pixel in the short exposure image; determining a short exposure gain according to the first characteristic amplitude value and a first reference amplitude value; The current short exposure parameter is adjusted according to the short exposure gain to determine the short exposure parameter of the next short exposure image frame.
6. The method according to any one of claims 1 to 4, characterized in that The adjusting the current long exposure parameter based on the amplitude value of each pixel in the short exposure image and the amplitude value of each pixel in the long exposure image to determine the long exposure parameter of the next long exposure image frame includes: determining an overexposed area and a number of overexposed pixels in the long exposure image based on an amplitude value of each pixel in the long exposure image; If the number of overexposed pixels is greater than a first threshold, adjusting the current long exposure parameters according to the amplitude value of each pixel in the short exposure image and the amplitude value of each pixel in the long exposure image based on the first adjustment mode to determine the long exposure parameters of the next long exposure image; If the number of overexposed pixels is less than or equal to the first threshold, adjusting the current long exposure parameters based on the amplitude value of each pixel in the short exposure image and the amplitude value of each pixel in the long exposure image in the second adjustment mode to determine the long exposure parameters for the next long exposure image.
7. The method according to claim 6, characterized in that The adjusting the current long exposure parameters according to the amplitude value of each pixel in the short exposure image and the amplitude value of each pixel in the long exposure image based on the first adjustment mode to determine the long exposure parameters of the next long exposure image frame includes: determining, in the short-exposure image, a first region corresponding to an overexposed region in the long-exposure image; determining an amplitude value of each pixel in the first area based on the amplitude value of each pixel in the short exposure image; Determine a first number of pixels in the first area whose amplitude values of the pixels are less than a first amplitude threshold; determining an abnormality ratio based on the first number of pixels and the number of all pixels in the short-exposure image; If the abnormal ratio is greater than or equal to the ratio threshold, adjusting the current long exposure parameters based on the abnormal ratio and the ratio threshold to determine the long exposure parameters of the next long exposure image frame; If the abnormal ratio is less than the ratio threshold, based on the second adjustment mode, the current long exposure parameters are adjusted according to the amplitude value of each pixel in the short exposure image and the amplitude value of each pixel in the long exposure image to determine the long exposure parameters of the next long exposure image frame.
8. The method according to claim 7, characterized in that The adjusting the current long exposure parameters based on the abnormal ratio and the ratio threshold to determine the long exposure parameters of the next long exposure image frame includes: determining a long exposure gain according to the abnormal ratio and the ratio threshold; The current long exposure parameter is adjusted according to the long exposure gain to determine the long exposure parameter of the next frame of long exposure image.
9. The method according to claim 7, characterized in that The adjusting the current long exposure parameters according to the amplitude value of each pixel in the short exposure image and the amplitude value of each pixel in the long exposure image based on the second adjustment mode to determine the long exposure parameters of the next long exposure image frame includes: determining a non-overexposed area in the long exposure image based on an amplitude value of each pixel in the long exposure image; determining, based on the amplitude value of each pixel in the short exposure image, a second region in which the amplitude value of the pixel in the short exposure image is less than a second amplitude threshold; determining an intersection of the non-overexposed area and the second area as a third area; determining an amplitude value of each pixel in the third area based on the amplitude value of each pixel in the long exposure image; determining a second characteristic amplitude value of the long exposure image according to the amplitude value of each pixel in the third area; determining a long exposure gain according to the second characteristic amplitude value and a second reference amplitude value; The current long exposure parameters are adjusted according to the long exposure gain to determine the long exposure parameters of the next frame of long exposure image.
10. The method according to any one of claims 1 to 4, characterized in that The adjusting the current long exposure parameter based on the amplitude value of each pixel in the short exposure image and the amplitude value of each pixel in the long exposure image to determine the long exposure parameter of the next long exposure image frame includes: determining, based on the amplitude value of each pixel in the short exposure image, a second number of pixels in the short exposure image having an amplitude value less than a third amplitude threshold; If the second number of pixels is greater than a second number threshold, adjusting the current long exposure parameters according to the amplitude value of each pixel in the short exposure image and the amplitude value of each pixel in the long exposure image based on a third adjustment mode, to determine the long exposure parameters of a next long exposure image frame; If the second pixel quantity is less than or equal to a second quantity threshold, the current long exposure parameter is determined as the long exposure parameter of the next frame of long exposure image.
11. The method according to claim 10, characterized in that The adjusting the current long exposure parameters according to the amplitude value of each pixel in the short exposure image and the amplitude value of each pixel in the long exposure image based on the third adjustment mode to determine the long exposure parameters of the next long exposure image frame includes: determining, based on the amplitude value of each pixel in the short exposure image, a fourth region in which the amplitude value of the pixels in the short exposure image is less than a third amplitude threshold; determining an amplitude value of each pixel in the fourth area based on the amplitude value of each pixel in the long exposure image; determining a second characteristic amplitude value of the long exposure image according to the amplitude value of each pixel in the fourth area; determining a long exposure gain according to the second characteristic amplitude value and a second reference amplitude value; The current long exposure parameters are adjusted according to the long exposure gain to determine the long exposure parameters of the next frame of long exposure image.
12. An exposure parameter adjustment device, characterized in that: The device comprises: An acquisition module, used for acquiring short-exposure images and long-exposure images; a first adjustment module, configured to adjust a current short exposure parameter based on an amplitude value of each pixel in the short exposure image to determine a short exposure parameter for a next short exposure image; The second adjustment module is configured to adjust the current long exposure parameters based on the amplitude value of each pixel in the short exposure image and the amplitude value of each pixel in the long exposure image, and determine the long exposure parameters of the next long exposure image.
13. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 11 are implemented.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.
Citation Information
Patent Citations
Control method and device, imaging equipment, computer equipment and readable storage medium
CN108270977A
Control method, control device, imaging equipment, computer equipment and readable storage medium
CN108632537A
Long-exposure shooting control method, system and device and computer storage medium
CN111200708A
Image generation method and device, electronic equipment and readable storage medium
CN114630056A
Exposure processing method and device and electronic equipment
CN115412678A