Exposure parameter adjustment method and device, computer equipment and storage medium
By dynamically adjusting the short and long exposure parameters of the TOF camera, based on the characteristics and gain of pixel amplitude values, the problem of poor imaging quality in complex scenes is solved, and high-quality image fusion is achieved.
Patent Information
- Application Number
- CN202511806712.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-01
- Publication Date
- 2026-02-10
AI Technical Summary
Existing imaging devices cannot dynamically adjust multiple exposure parameters when using imaging, resulting in poor image quality, especially in complex scenes such as when there are both foreground and background elements, leading to problems such as overexposure of the foreground or underexposure of the background.
By acquiring the pixel amplitude values of short-exposure and long-exposure images, the parameters of short-exposure and long-exposure images are dynamically adjusted. Specifically, this includes determining the feature amplitude value and gain based on the pixel amplitude value, and adjusting the parameters according to the number and proportion of overexposed pixels using different adjustment modes.
It improves image quality, ensures that multiple exposure data can be effectively fused to generate high-quality images in complex scenes, and reduces the imaging differences between foreground and background.
Smart Images

Figure CN121509825A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image acquisition, in particular to an exposure parameter adjustment method and device, computer equipment and storage medium. BACKGROUND
[0002] The HDR (High Dynamic Range) mode of an imaging device is a technology aiming to capture as many details as possible from the darkest to the brightest areas in a scene. When using the HDR mode, the imaging device usually acquires multiple images with different exposure parameters in the same scene, and then fuses the images corresponding to the different exposure parameters to obtain an image with high dynamic range. In the current imaging device, when multiple exposure parameters are used for imaging, the multiple exposure parameters cannot be dynamically adjusted, which results in poor imaging quality.
[0003] Taking a TOF camera as an example, a TOF (Time of Flight) camera is an imaging device that measures the distance and depth between an object and the camera using light pulse sensing technology. It calculates the depth information using the round-trip time of a light pulse. By analyzing the propagation time of light, the TOF camera can achieve high-precision three-dimensional imaging of objects at different distances. In a complex scene of the TOF camera, such as a near scene and a far scene existing at the same time, a single exposure parameter cannot meet the current scene, for example, the near scene may be overexposed or the far scene may be underexposed. Therefore, multiple exposure parameters are needed to acquire corresponding exposure data, and HDR technology is used to fuse the multiple exposure data to generate a high-quality image.
[0004] In the current related technology, when the imaging device uses multiple exposure parameters for imaging, the multiple exposure parameters cannot be dynamically adjusted, which results in poor imaging quality. SUMMARY
[0005] Therefore, it is necessary to provide an exposure parameter adjustment method, device, computer equipment and storage medium to solve the above technical problems.
[0006] In a first aspect, the present application provides an exposure parameter adjustment method, which comprises: 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 the next frame of short exposure image; 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 frame of long exposure image.
[0007] In one of the embodiments, a plurality of exposure images are acquired; exposure parameters corresponding to the plurality of exposure images are sequentially increased; based on the order from small to large of the exposure parameters, a plurality of exposure image groups are sequentially constructed according to every two adjacent exposure images; the exposure image with a small exposure parameter in the exposure image group is a short exposure image, and the exposure image with a large exposure parameter in the exposure image group is a long exposure image.
[0008] In one of the embodiments, 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 a short exposure parameter of a next frame of short exposure image; the 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 a long exposure parameter of a next frame of long exposure image; the first target exposure image group is the exposure image group with the smallest exposure parameter in the plurality of exposure image groups.
[0009] In one of the embodiments, for a second target exposure image group, the 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 a long exposure parameter of a next frame of long exposure image; the second target exposure image group is any exposure image group in the plurality of exposure image groups except the first target exposure image group.
[0010] In one of the embodiments, the adjustment of the current short exposure parameter based on the amplitude value of each pixel in the short exposure image to determine a short exposure parameter of a next frame of short exposure image comprises: 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 according to the first characteristic amplitude value and a first reference amplitude value; and adjusting the current short exposure parameter according to the short exposure gain to determine a short exposure parameter of a next frame of short exposure image.
[0011] In one embodiment, adjusting the current long exposure parameters based on the amplitude values of each pixel in the short exposure image and the long exposure image to determine the long exposure parameters of the next frame of the long exposure image includes: determining the overexposed areas and the number of overexposed pixels in the long exposure image based on the amplitude values of each pixel in the long exposure image; if the number of overexposed pixels is greater than a first quantity threshold, then adjusting the current long exposure parameters based on the amplitude values of each pixel in the short exposure image and the long exposure image according to a first adjustment mode to determine the long exposure parameters of the next frame of the long exposure image; if the number of overexposed pixels is less than or equal to the first quantity threshold, then adjusting the current long exposure parameters based on the amplitude values of each pixel in the short exposure image and the long exposure image according to a second adjustment mode to determine the long exposure parameters of the next frame of the long exposure image.
[0012] In one embodiment, the step of adjusting the current long exposure parameters based on the amplitude values of each pixel in the short exposure image and the long exposure image, according to a first adjustment mode, to determine the long exposure parameters of the next frame of the long exposure image includes: determining a first region in the short exposure image corresponding to the overexposed region in the long exposure image; determining the amplitude value of each pixel in the first region based on the amplitude value of each pixel in the short exposure image; determining the number of first pixels in the first region whose amplitude values are less than a first amplitude threshold; determining an abnormality ratio based on the number of first pixels and the total number of pixels in the short exposure image; if the abnormality ratio is greater than or equal to a 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 the long exposure image; if the abnormality ratio is less than the ratio threshold, adjusting the current long exposure parameters based on the amplitude values of each pixel in the short exposure image and the long exposure image, according to a second adjustment mode, to determine the long exposure parameters of the next frame of the long exposure image.
[0013] In one embodiment, 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 includes: determining the long exposure gain based on the abnormal 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 long exposure image.
[0014] In one embodiment, the step of adjusting the current long exposure parameters based on the amplitude values of each pixel in the short exposure image and the long exposure image, according to the second adjustment mode, to determine the long exposure parameters of the next frame of the long exposure image includes: determining non-overexposed regions in the long exposure image based on the amplitude values of each pixel in the long exposure image; determining a second region in the short exposure image where the amplitude values of pixels are less than a second amplitude threshold based on the amplitude values of each pixel in the short exposure image; determining a third region by the intersection of the non-overexposed region and the second region; determining the amplitude value of each pixel in the third region based on the amplitude values of each pixel in the long exposure image; determining a second characteristic amplitude value of the long exposure image based on the amplitude values of each pixel in the third region; 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 according to the long exposure gain to determine the long exposure parameters of the next frame of the long exposure image.
[0015] In one embodiment, adjusting the current long exposure parameters based on the amplitude values of each pixel in the short exposure image and the amplitude values of each pixel in the long exposure image to determine the long exposure parameters of the next frame of the long exposure image includes: determining a second number of pixels in the short exposure image whose amplitude values are less than a third amplitude threshold based on the amplitude values of each pixel in the short exposure image; if the second number of pixels is greater than a second number threshold, then adjusting the current long exposure parameters based on the amplitude values of each pixel in the short exposure image and the amplitude values of each pixel in the long exposure image according to a third adjustment mode to determine the long exposure parameters of the next frame of the long exposure image; if the second number of pixels is less than or equal to the second number threshold, then determining the current long exposure parameters as the long exposure parameters of the next frame of the long exposure image.
[0016] In one embodiment, the step of adjusting the current long exposure parameters based on the amplitude values of each pixel in the short exposure image and the amplitude values of each pixel in the long exposure image, according to the third adjustment mode, to determine the long exposure parameters of the next frame of the long exposure image includes: determining a fourth region in the short exposure image where the amplitude values of pixels are less than a third amplitude threshold, based on the amplitude values of each pixel in the short exposure image; determining the amplitude value of each pixel in the fourth region based on the amplitude values of each pixel in the long exposure image; determining a second feature amplitude value of the long exposure image based on the amplitude values of each pixel in the fourth region; determining a long exposure gain based on the second feature amplitude value and a second reference amplitude value; and adjusting the current long exposure parameters according to the long exposure gain to determine the long exposure parameters of the next frame of the long exposure image.
[0017] Secondly, this application also provides an exposure parameter adjustment device, the device comprising: an acquisition module for acquiring a short exposure image and a long exposure image; a first adjustment module for 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 frame of the 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 to determine the long exposure parameter of the next frame of the long exposure image.
[0018] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement any of the exposure parameter adjustment methods described in the first aspect above.
[0019] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements any of the exposure parameter adjustment methods described in the first aspect above.
[0020] The aforementioned exposure parameter adjustment method, apparatus, computer equipment, and storage medium acquire short-exposure images and long-exposure images. Based on the amplitude value of each pixel in the short-exposure image, the current exposure parameters are adjusted to determine the short-exposure parameters for the next frame of the short-exposure image. Similarly, based on the amplitude values of each pixel in both the short-exposure and long-exposure images, the current long-exposure parameters are adjusted to determine the long-exposure parameters for the next frame of the long-exposure image. By dynamically adjusting the short-exposure and long-exposure parameters of the next frame using the current short-exposure and long-exposure images, image quality is improved. Attached Figure Description
[0021] Figure 1 This is a flowchart illustrating an exposure parameter adjustment method in one embodiment;
[0022] Figure 2 This is a flowchart illustrating a short exposure parameter adjustment method in one embodiment;
[0023] Figure 3 This is a flowchart illustrating a long exposure parameter adjustment method based on a first adjustment mode in one embodiment;
[0024] Figure 4 This is a flowchart illustrating a long exposure parameter adjustment method based on a second adjustment mode in one embodiment;
[0025] Figure 5 This is a flowchart illustrating a long exposure parameter adjustment method based on a third adjustment mode in one embodiment;
[0026] Figure 6 This is a flowchart illustrating an HDR dual exposure parameter adjustment method in one embodiment;
[0027] Figure 7 This is a flowchart illustrating the HDR dual exposure parameter adjustment method in another embodiment;
[0028] Figure 8 This is a structural block diagram of an exposure parameter adjustment device in one embodiment;
[0029] Figure 9 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0030] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0031] HDR (High Dynamic Range) mode in imaging devices is a technique designed to capture as much detail as possible in a scene, from the darkest to the brightest areas. HDR mode typically involves capturing multiple images of the same scene with different exposure parameters, then fusing these images to obtain a single image with high dynamic range. Current imaging devices, when using multiple exposure parameters for imaging, cannot dynamically adjust these parameters, resulting in poor image quality.
[0032] The imaging device can be any image acquisition device capable of implementing HDR mode, such as an IR camera with HDR mode, a TOF camera with HDR mode, or a line structured light camera with HDR mode, etc., and this embodiment does not impose specific limitations. For example, the imaging device can be an IR camera. An IR camera, or infrared (IR) camera, is a device capable of capturing and recording 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 visual 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 combines multiple images with different exposure parameters into a single image with high dynamic range.
[0033] The following embodiments use a TOF camera as an example for illustration. It is understood that the exposure parameter adjustment method described in this application can be applied to any imaging device that performs fusion imaging using multiple exposure parameters. A TOF (Time-of-Flight) camera is a three-dimensional imaging device based on the time-of-flight principle, utilizing light pulse sensing technology to measure the distance and depth between an object and the camera. The TOF camera is equipped with a light source, which can be a laser source or an LED source, generating and emitting modulated light signals. The light signals can be continuous wave light signals or pulse wave light signals. The light signals generated by the light source are modulated light signals, thus distinguishing between ambient light and reflected light when receiving reflected signals. The modulation method can be pulse modulation or continuous wave modulation. The light signal is reflected back from the object's surface, and the TOF camera's sensor collects the reflected signal. The intensity and direction of the reflected light depend on the object's surface characteristics. The TOF camera performs imaging based on the collected reflected signals.
[0034] In complex scenes captured by TOF cameras, such as those involving both foreground and background elements, a single exposure parameter is insufficient. This can result in overexposure of the foreground or underexposure of the background. Therefore, multiple exposure parameters are needed to collect corresponding exposure data, which is then fused using HDR technology to generate a high-quality image. When using HDR, the TOF camera sets various exposure parameters, collects images corresponding to those parameters, and then merges these images into a single image to capture complex scenes. However, when using multiple exposure parameters, TOF cameras cannot dynamically adjust them, leading to poor image quality.
[0035] In one embodiment, such as Figure 1 As shown, an exposure parameter adjustment method is provided. This method is applicable to any imaging device that performs fusion imaging using multiple exposure parameters, and includes the following steps:
[0036] Step 101: Obtain the short exposure image and the long exposure image.
[0037] The imaging device generates a light signal, which is reflected back from the object's surface. The imaging device acquires short-exposure data using short-exposure parameters and generates a short-exposure image based on this data. Similarly, the imaging device acquires long-exposure data using long-exposure parameters and generates a long-exposure image based on this 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 acquired first.
[0038] Step 102: 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 of the next frame of the short exposure image.
[0039] After acquiring the short-exposure image, the amplitude value of each pixel in the short-exposure image is extracted. The amplitude value can be the brightness value of that pixel. When the imaging device's sensor collects the reflected signal, it 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, the characteristic amplitude value of the short-exposure image is determined. The current short-exposure parameters are adjusted based on the characteristic amplitude value to determine the short-exposure parameters for the next frame of the short-exposure image. Here, the short-exposure parameter is the short-exposure time during the short-exposure process. 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 parameters for the next frame of the short-exposure image is also determining the short-exposure parameters for the frame following the current frame.
[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, adjust the current long exposure parameters to determine the long exposure parameters of the next frame long exposure image.
[0041] After acquiring the short-exposure image, the amplitude value of each pixel in the short-exposure image is extracted; after acquiring the long-exposure image, the amplitude value of each pixel in the long-exposure image is extracted. Then, based on the overexposure data of the amplitude values of each pixel in the long-exposure image and the abnormal data of the amplitude values of each pixel in the short-exposure image, the current long-exposure parameters are adjusted to determine the long-exposure parameters for the next frame of the long-exposure image. Here, the long-exposure parameter refers to the long-exposure time during the long-exposure process. The current long-exposure parameter is the long-exposure parameter corresponding to the acquired long-exposure image of the current frame. Determining the long-exposure parameters for the next frame of the long-exposure image is equivalent to determining the long-exposure parameters for the long-exposure image of the frame following the current frame.
[0042] This embodiment acquires short-exposure and long-exposure images. Based on the amplitude value of each pixel in the short-exposure image, the current exposure parameters are adjusted to determine the short-exposure parameters for the next frame. Similarly, based on the amplitude values of each pixel in both the short-exposure and long-exposure images, the current long-exposure parameters are adjusted to determine the long-exposure parameters for the next frame. By dynamically adjusting the short-exposure and long-exposure parameters of the next frame using the current short-exposure and long-exposure images, image quality is improved.
[0043] In one embodiment, the imaging device uses multiple sets of exposure parameters during imaging. In this case, the exposure parameters for the next frame corresponding to each exposed image need to be adjusted. Specifically, multiple exposed images are acquired; the exposure parameters corresponding to the multiple exposed images are sequentially increased; based on the ascending order of the exposure parameters, multiple exposure image groups are constructed sequentially according to pairs of adjacent exposed images; the exposed image with the smaller exposure parameter in the exposure image group is designated as a short exposure image, and the exposed image with the larger exposure parameter in the exposure image group is designated as a long exposure image.
[0044] Imaging devices can be configured with multiple exposure parameters, such as four or six sets. During imaging, the device generates an exposure image based on each exposure parameter, resulting in multiple exposure images. Taking four exposure parameters as an example, the device acquires a first exposure image using the first parameter, a second exposure image using the second parameter, a third exposure image using the third parameter, and a fourth exposure image using the fourth parameter. The first exposure parameter is less than the second, the second is less than the third, and the third is less than the fourth. After acquiring multiple exposure images, they are sorted according to their exposure parameters. Then, adjacent exposure images are grouped into multiple exposure image groups based on this sorting. For example, the first and second exposure images form the first exposure image group, the second and third exposure images form the second exposure image group, and the third and fourth exposure images form the third exposure image group. The first exposure image in the first exposure image group, with the smaller exposure parameter, is designated as the short exposure image, and the second exposure image in the first exposure image group, with the larger exposure parameter, is designated as the long exposure image. In the second exposure image group, the image with the smaller exposure parameter (i.e., the second exposure image) is designated as a short exposure image, and the image with the larger exposure parameter (i.e., the third exposure image) is designated as a long exposure image. Similarly, in the third exposure image group, the image with the smaller exposure parameter (i.e., the third exposure image) is designated as a short exposure image, and the image with the larger exposure parameter (i.e., the fourth exposure image) is designated as a 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, to improve the adjustment speed and reduce redundant adjustments for multiple exposure parameters, multiple exposure image groups can be defined 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 other than the first target exposure image group. Taking setting four exposure parameters as an example, the first exposure image group has the smallest exposure parameter, therefore it is designated as the first target exposure image group; the remaining second and third exposure image groups are designated as the 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 frame of the short exposure image; similarly, the current long exposure parameters are adjusted based on the amplitude values of each pixel in the short exposure image and the amplitude values of each pixel in the long exposure image to determine the long exposure parameters for the next frame of the long exposure image. In other words, for the first target exposure image group, the exposure parameters for the next frame of both the short exposure and long exposure images within the image group need to be adjusted separately. The specific adjustment method is described in the above embodiment and will not be repeated in this embodiment.
[0047] For the second target exposure image group, the current long exposure parameters are adjusted based on the amplitude values of each pixel in the short exposure image and the amplitude values of each pixel in the long exposure image to determine the long exposure parameters for the next frame of the long exposure image. That is, for the second target exposure image group, only the exposure parameters of the next frame corresponding to the long exposure image 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, multiple exposure images are divided into multiple exposure image groups by adjusting the exposure parameters, and then the corresponding exposure parameters are adjusted for each exposure image group to complete the adjustment of all exposure parameters.
[0049] In one embodiment, such as Figure 2 As shown, a method for adjusting short exposure parameters is provided, including the following steps:
[0050] Step 201: Determine the first feature 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, it is necessary to determine the first feature amplitude value of the short-exposure image based on the amplitude value of each pixel. The first feature amplitude value represents the characteristic of all amplitude values in the short-exposure image. The first feature amplitude value can be the mean, median, or quantile of the amplitude values of each pixel in the short-exposure image. This embodiment does not impose a specific limitation; it only requires that the first feature amplitude value can reflect the characteristic of all amplitude values in the short-exposure image.
[0052] When the first feature amplitude value is the average amplitude value of each pixel in the short exposure image, the average value is calculated based on the amplitude value of each pixel in the short exposure image, and this average value is the first feature amplitude value.
[0053] When the first feature 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. This median is the first feature threshold.
[0054] When the first feature amplitude value is the quantile 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 quantile. The quantile value is then determined based on the quantile, and this quantile value is the first feature threshold. For example, if the quantile is 95%, after sorting, the amplitude value corresponding to the 95% position is determined as the quantile value of that quantile.
[0055] Step 202: Determine the short exposure gain based on the first characteristic amplitude value and the first reference amplitude value.
[0056] The first reference amplitude value is a pre-set reference amplitude value for calculating short exposure gain. The specific value of the first reference amplitude value needs to be set according to actual usage requirements, and this embodiment does not impose a specific limitation. 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 parameters according to the short exposure gain to determine the short exposure parameters of the next frame of the short exposure image.
[0058] After obtaining the short exposure gain, multiply the short exposure gain by the current short exposure parameter to obtain the short exposure parameter of the next frame of the short exposure image. That is, obtain the short exposure time corresponding to the next frame of the short exposure image.
[0059] In this embodiment, when determining the short exposure parameters for the next frame, a first feature amplitude value is determined by analyzing the amplitude value of each pixel in the short exposure image. Based on this first feature amplitude value, the short exposure parameters for the next frame can be adjusted more reasonably, further improving the imaging quality of the TOF camera.
[0060] In one embodiment, when adjusting the long exposure parameters of the next frame of the 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 areas and the number of overexposed pixels in the long exposure image are determined. Pixels whose amplitude value is greater than or equal to a preset threshold are considered overexposed pixels. Specifically, an overexposed threshold is preset, and the specific value of this overexposed threshold can be set according to actual usage requirements; this embodiment does not impose a specific limitation. The amplitude value of each pixel in the long exposure image is compared with the overexposed threshold, and pixels whose amplitude value is greater than or equal to the overexposed threshold are considered overexposed pixels. The area formed by all overexposed pixels is the overexposed area. The number of all overexposed pixels is counted to determine the total number of overexposed pixels. If the number of overexposed pixels is greater than a first threshold, it indicates that there are obstacles obstructing the current scene, i.e., there are foreground and background scenes. In this case, an excessive number of overexposed pixels will further increase the scene difference between the foreground and background scenes, which may lead to a greater difference in the current scene between long and short exposures.
[0061] If the number of overexposed pixels exceeds the first threshold, then based on the first 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 frame of the long exposure image.
[0062] If the number of overexposed pixels is less than or equal to the first quantity threshold, then 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 frame of the long exposure image.
[0063] The first quantity threshold can be set according to actual usage requirements, and this embodiment does not impose a specific limitation. By comparing the number of overexposed pixels with the first quantity threshold, different adjustment modes can be set for different situations, thereby achieving fine-tuning of long exposure parameters and further improving image quality.
[0064] In one embodiment, such as Figure 3 As shown, a long exposure parameter adjustment method based on a first adjustment mode is provided, including the following steps:
[0065] Step 301: In the short exposure image, determine the first region corresponding to the overexposed region in the long exposure image.
[0066] After identifying the overexposed areas in the long-exposure image, since both the long-exposure and short-exposure images were captured by the same imaging device for the same scene but with different exposure times, a mapping relationship exists between the pixels of the long-exposure image and the pixels of the short-exposure image. The overexposed areas identified in the long-exposure image can be mapped back to the short-exposure image using this mapping relationship, thus determining the first region corresponding to the overexposed areas in the short-exposure image.
[0067] Step 302: Determine the amplitude value of each pixel in the first region based on the amplitude value of each pixel in the short exposure image.
[0068] After extracting the amplitude value of each pixel in the short exposure image, the amplitude value of each pixel in the first region can be determined by identifying all the corresponding pixels in the short exposure image.
[0069] Step 303: Determine the number of first pixels in the first region whose amplitude value is less than the first amplitude threshold.
[0070] The amplitude value of each pixel in the first region is compared with a first amplitude threshold to identify 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 according to actual usage requirements; this embodiment does not impose a specific limitation. 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: Determine the anomaly ratio based on the number of the first pixel and the total number of pixels in the short exposure image.
[0072] The anomaly ratio is obtained by counting the number of pixels in the short-exposure image and dividing the first pixel count by the total number of pixels in the short-exposure image. The anomaly ratio is the proportion of pixels in the first region whose amplitude value is less than a first amplitude threshold out of the total number of pixels in the short-exposure image.
[0073] Step 305: If the abnormal ratio is greater than or equal to the ratio threshold, the current long exposure parameters are adjusted based on the abnormal ratio and the ratio threshold to determine the long exposure parameters of the next frame of the long exposure image.
[0074] When the abnormal ratio is greater than or equal to the ratio threshold, it indicates that the overexposed area of the long exposure image cannot be covered by the short exposure parameters in the short exposure image. Therefore, the exposure parameters of the long exposure image need to be adjusted according to this ratio to ensure that the current scene can be covered.
[0075] Specifically, the long exposure gain is determined based on the anomaly ratio and a ratio threshold. The current long exposure parameters are then adjusted based on this gain to determine the long exposure parameters for the next frame. The ratio threshold can be set according to actual usage requirements; this embodiment does not impose specific limitations. The long exposure gain is obtained by dividing the ratio threshold by the anomaly ratio. After obtaining the long exposure gain, it is multiplied by the current long exposure parameters to obtain the long exposure parameters for the next frame. This also yields the long exposure time corresponding to the next frame. It is understood that the above calculation methods for determining the long exposure gain and adjusting the long exposure parameters using the long exposure gain are merely illustrative examples. Any reasonable method can be used to adjust the long exposure parameters; this embodiment does not impose specific limitations.
[0076] Step 306: If the abnormal ratio is less than the ratio threshold, based on the second 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, and determine the long exposure parameters of the next frame long exposure image.
[0077] When the abnormal ratio is less than the ratio threshold, it indicates that the overexposed area in the long exposure image can cover the current scene in the short exposure image. Therefore, the second adjustment mode needs to be used to adjust the long exposure parameters of the next long exposure image.
[0078] In one embodiment, such as Figure 4 As shown, a long exposure parameter adjustment method based on a second adjustment mode is provided, including the following steps:
[0079] Step 401: Determine the non-overexposed areas 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, the amplitude value of each pixel in the long exposure image is compared with the overexposure threshold. Pixels with amplitude values less than the overexposure threshold are considered as non-overexposure pixels. The area formed by all non-overexposure pixels is the non-overexposure region.
[0081] Step 402: Based on the amplitude value of each pixel in the short exposure image, determine the second region in the short exposure image where the amplitude value of the pixels is less than the 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 with amplitude values less than the second amplitude threshold is defined as the second region. The second amplitude threshold can be set according to actual usage requirements; this embodiment does not impose specific limitations.
[0083] Step 403: The intersection of the non-overexposed area and the second area is determined as the third area.
[0084] After determining the second region in the short-exposure image, the second region is mapped to the long-exposure image using the mapping relationship between the pixels of the short-exposure and long-exposure images, resulting in the second region in the long-exposure image. The intersection between the non-overexposed region in the long-exposure image and the second region is determined; pixels in this intersection belong to both the non-overexposed region and the second region. This intersection is then defined as the third region in the long-exposure image.
[0085] Step 404: Determine the amplitude value of each pixel in the third region based on the amplitude value of each pixel in the long exposure image.
[0086] By determining the amplitude value of each pixel in the extracted long exposure image, all pixels in the third region of the long exposure image can be identified, thus determining the amplitude value of each pixel in the third region of the long exposure image.
[0087] Step 405: Determine the second feature amplitude value of the long exposure image based on the amplitude value of each pixel in the third region.
[0088] Based on the amplitude value of each pixel in the third region, a second characteristic amplitude value of the long exposure image is determined. This second characteristic amplitude value represents the characteristics of the amplitude values in the long exposure image. The second characteristic amplitude value can be the mean, median, or quantile of the amplitude values of each pixel in the third region. This embodiment does not impose specific limitations; it only requires that the second characteristic amplitude value reflects the characteristics of the amplitude values in the long exposure image.
[0089] When the second feature amplitude value is the average amplitude value of each pixel in the third region, the average value is calculated based on the amplitude value of each pixel in the third region, and this average value is the second feature amplitude value.
[0090] When the second feature amplitude value is the median of the amplitude values of each pixel in the third region, the amplitude values of each pixel in the third region are first sorted, and the median is determined based on the sorting. This median is the second feature amplitude value.
[0091] When the second feature amplitude value is the 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. The percentile value is then determined based on the percentile, and this percentile value is the second feature amplitude value. For example, if the percentile is 95%, after sorting, the amplitude value corresponding to the 95% position is determined as the percentile value of the corresponding percentile.
[0092] Step 406: Determine the long exposure gain based on the second characteristic amplitude value and the second reference amplitude value.
[0093] The second reference amplitude value is a pre-set reference amplitude value for calculating long exposure gain. The specific value of the second reference amplitude value needs to be set according to actual usage requirements, and this embodiment does not impose a specific limitation. 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 frame of the long exposure image.
[0095] After obtaining the long exposure gain, multiply the long exposure gain by the current long exposure parameters to obtain the long exposure parameters for the next long exposure image. This also gives the long exposure time corresponding to the next long exposure image.
[0096] This embodiment handles several different scenarios 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 there are obstacles obstructing the current scene, potentially leading to a greater difference in image quality between the long and short exposure parameters. Under this premise, if the abnormal proportion is greater than or equal to a proportion threshold, it indicates that a significant difference in image quality between the long and short exposure parameters has already occurred, requiring a reduction in the long exposure parameters, i.e., a reduction in the long exposure time. In this case, the long exposure parameters are adjusted using the first adjustment mode. When the abnormal proportion is less than the proportion threshold, it indicates that there is no significant difference in image quality between the long and short exposure parameters, but it is necessary to ensure that the amplitude value of the non-overexposed areas of the long exposure image reaches a certain intensity. Therefore, the long exposure parameters need to be adjusted appropriately, and in this case, the long exposure parameters are adjusted using the second adjustment mode. When the number of overexposed pixels in the long exposure image is less than or equal to the first threshold, it indicates that there are no obstacles obstructing the image, and therefore, the long exposure parameters need to be adjusted appropriately, and in this case, the long exposure parameters are adjusted using the second adjustment mode. By using different adjustment modes to adjust the long exposure parameters for different scenarios when the imaging device acquires images, the adjustment of the long exposure parameters can be made applicable to different scenarios, thereby further improving the image quality.
[0097] In one embodiment, a long exposure parameter adjustment method is also 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 number of second pixels in the short exposure image whose amplitude value is less than the 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 with amplitude values less than the third amplitude threshold is counted. The third amplitude threshold can be set according to actual usage requirements; this embodiment does not impose a specific limitation. Pixels with amplitude values less than the third amplitude threshold are the underexposed pixels in the short exposure image.
[0100] Step 2: If the number of second pixels is greater than the second number threshold, then 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, and determine the long exposure parameters of the next frame long exposure image.
[0101] Step 3: If the number of second pixels is less than or equal to the second number threshold, then the current long exposure parameters are determined as the long exposure parameters for the next frame of the 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, so the long exposure parameters need to be adjusted. In this case, the long exposure parameters for the next long exposure image are determined through 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, so the long exposure parameters do not need to be adjusted. That is, the current long exposure parameters are determined as the long exposure parameters for the next long exposure image. The second threshold can be set according to actual usage requirements, and this embodiment does not impose specific limitations.
[0103] In one embodiment, such as Figure 5 As shown, a long exposure parameter adjustment method based on a third adjustment mode is provided, including the following steps:
[0104] Step 501: Based on the amplitude value of each pixel in the short exposure image, determine the fourth region in the short exposure image where the amplitude value of the pixels is less than the 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 region formed by the pixels with amplitude values less than the third amplitude threshold is taken as the fourth region.
[0106] Step 502: Determine the amplitude value of each pixel in the fourth region 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 is mapped to the long-exposure image using the mapping relationship between the pixels of the short-exposure and long-exposure images, thus obtaining the fourth region in the long-exposure image. Based on the amplitude value of each pixel extracted from 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 the second feature amplitude value of the long exposure image based on the amplitude value of each pixel in the fourth region.
[0109] Based on the amplitude value of each pixel in the fourth region, a second characteristic amplitude value of the long exposure image is determined. This second characteristic amplitude value represents the characteristics of the amplitude values in the long exposure image. The second characteristic amplitude value can be the mean, median, or quantile of the amplitude values of each pixel in the fourth region. This embodiment does not impose specific limitations; it only requires that the second characteristic amplitude value reflects the characteristics of the amplitude values in the long exposure image.
[0110] When the second feature amplitude value is the average amplitude value of each pixel in the fourth region, the average value is calculated based on the amplitude value of each pixel in the fourth region, and this average value is the second feature amplitude value.
[0111] When the second feature 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. This median is the second feature amplitude value.
[0112] When the second feature amplitude value is the 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. The percentile value is then determined based on the percentile, and this percentile value is the second feature amplitude value. For example, if the percentile is 95%, after sorting, the amplitude value corresponding to the 95% position is determined as the percentile value of the corresponding percentile.
[0113] Step 504: Determine the long exposure gain based on the second characteristic amplitude value and the second reference amplitude value.
[0114] The second reference amplitude value is a pre-set reference amplitude value for calculating long exposure gain. The specific value of the second reference amplitude value needs to be set according to actual usage requirements, and this embodiment does not impose a specific limitation. 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 frame of the long exposure image.
[0116] After obtaining the long exposure gain, multiply the long exposure gain by the current long exposure parameters to obtain the long exposure parameters for the next long exposure image. This also gives the long exposure time corresponding to the next long exposure image.
[0117] This embodiment improves image quality by statistically analyzing underexposed areas in short-exposure images and adjusting long-exposure parameters according to different situations.
[0118] In one embodiment, after acquiring the long exposure image and the short exposure image, the overexposed area in the long exposure image is determined based on the long exposure image. The data corresponding to the overexposed area in the long exposure data is replaced with the data at the corresponding position in the short exposure data, and the replaced long exposure data is then processed.
[0119] In one specific embodiment, an HDR dual-exposure parameter adjustment method is provided. This dual-exposure parameter adjustment method includes: a convergence strategy for short-exposure parameters, i.e., a short-exposure parameter adjustment method; and a convergence strategy for long-exposure parameters, i.e., a long-exposure parameter adjustment method. When adjusting the long-exposure parameters, two methods are included: the first method adjusts the long-exposure parameters based on pixel data in the long-exposure image that does not meet the exposure threshold, i.e., overexposed areas. The second method adjusts the long-exposure parameters based on pixel data in the short-exposure image that does not meet the exposure threshold, i.e., the amplitude value is less than a set amplitude threshold. When performing data fusion using HDR, it is first determined whether there are overexposed pixels in the long-exposure data. If overexposed pixels exist, they are replaced with the corresponding short-exposure data. For pixels without overexposure, the long-exposure data is used, thereby completing the data fusion. Subsequent data processing is then performed on the fused data.
[0120] like Figure 6 As shown, an HDR dual exposure parameter adjustment method is provided. This method adjusts the long exposure parameters based on pixel data in the overexposed areas of the long exposure image that do not meet the exposure threshold.
[0121] Step 1: Obtain short-exposure and long-exposure images of the same scene.
[0122] Step 2: Calculate the required exposure value for the next short exposure frame using the short exposure image. The exposure value is the exposure time. For example, the amplitude value of each pixel in the short exposure image can be statistically analyzed, 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 statistically analyzed, and its mean, median, or quantile value is calculated as the first characteristic amplitude value. The first characteristic amplitude value is divided by a reference amplitude to obtain the short exposure gain. The short exposure gain is then multiplied by the current short exposure value to calculate the exposure value for the next short exposure frame.
[0123] Step 3: Count the number of overexposed pixels in the long exposure image. If the number of overexposed pixels exceeds a set threshold, it indicates that there is an obstacle obstructing the image, which may cause a greater difference between the long and short exposure values for the current scene. In this case, identify the overexposed region corresponding to the overexposed pixels in the long exposure image, then match this overexposed region to the short exposure image, obtain the amplitude value of each pixel in the corresponding region in the short exposure image, count the number of amplitude values less than the set threshold, and calculate the ratio of the number of values less than the set threshold to the total number of pixels in the short exposure image.
[0124] Step 3.1: If the ratio is greater than or equal to the set ratio, it means that the exposure value of the short exposure cannot cover the current scene. At this point, the difference between the long exposure value and the short exposure value 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, and multiply the long exposure gain by the current long exposure value to calculate the exposure value of the next long exposure.
[0125] Step 3.2: If the ratio is less than the set ratio, it means the short exposure value can cover the current scene. In this case, there is no issue of increased difference between the long and short exposure values affecting the current scene. However, it is necessary to ensure that the amplitude value of the non-overexposed area in the long exposure image reaches a certain intensity. Therefore, the long exposure value needs to be adjusted appropriately. At this point, the non-overexposed area is determined in the long exposure image, and the area in the short exposure image where the pixel amplitude value is less than the set threshold is determined. The intersection of the non-overexposed area and the area with amplitude values less than the set threshold is taken as the region of interest (ROI) for the long exposure value. The amplitude value of each pixel in the corresponding ROI in the long exposure image is statistically analyzed, 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 multiplied by the current long exposure value to calculate the exposure value of 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 that there are no obstacles blocking the view. In this case, the exposure value of the next long exposure is calculated using the method in step 3.2.
[0127] In practical use, that is, in the subsequent fusion process, the overexposed area data of the long exposure image is replaced with the corresponding area data of the short exposure image, thereby achieving data fusion.
[0128] like Figure 7 As shown, an HDR dual exposure parameter adjustment method is provided. This method adjusts the long exposure parameters based on pixel data in the short exposure image that do not meet the exposure threshold, that is, the amplitude value is less than the set amplitude threshold.
[0129] Step 1: Obtain short-exposure and long-exposure images of the same scene.
[0130] Step 2: Calculate the required exposure value for the next short exposure frame using the short exposure image. The exposure value is the exposure time. For example, the amplitude value of each pixel in the short exposure image can be statistically analyzed, 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 statistically analyzed, and its mean, median, or quantile value is calculated as the first characteristic amplitude value. The first characteristic amplitude value is divided by a reference amplitude to obtain the short exposure gain. The short exposure gain is then multiplied by the current short exposure value to calculate the exposure value for the next short exposure frame.
[0131] Step 3: Count the number of pixels in the short exposure image whose amplitude value is less than the predetermined amplitude threshold.
[0132] Step 3.1: If the number of pixels exceeds a set threshold, it indicates that the exposure value of the short exposure cannot cover the current scene, and the exposure value of the long exposure needs to be adjusted. At this point, based on the short exposure image, the region with an amplitude value less than the set threshold is designated as the region of interest (ROI). The amplitude value of each pixel in the corresponding ROI in the long exposure image is statistically analyzed, and the corresponding mean, median, or quantile value is calculated as the second feature amplitude value. The second feature 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 of the next long exposure frame.
[0133] Step 3.2: If the number of pixels is less than or equal to the set threshold, it means that the exposure value of the short exposure can cover the current scene, and there is no need to adjust the exposure value of the long exposure. That is, the exposure value of the next long exposure will remain unchanged.
[0134] In practical use, that is, in the subsequent fusion process, the overexposed area data of the long exposure image is replaced with the corresponding area data of the short exposure image, thereby achieving data fusion.
[0135] In this embodiment, by simultaneously adjusting both long and short exposure parameters, it is beneficial to adapt to more complex scenes and make the setting of exposure parameters more flexible. When adjusting the exposure parameters, only the amplitude value of the image is used to calculate the exposure gain, without the need for processing such as dividing the image into multiple partitions. The calculation is simple and convenient, which can further improve the imaging speed.
[0136] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0137] Based on the same inventive concept, this application also provides an exposure parameter adjustment device for implementing the exposure parameter adjustment method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more exposure parameter adjustment device embodiments provided below can be found in the limitations of the exposure parameter adjustment method described above, and will not be repeated here.
[0138] In one embodiment, such as Figure 8 As shown, an exposure parameter adjustment device is provided, including: 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 short-exposure images and long-exposure images.
[0140] The first adjustment module 200 is used to adjust the current short exposure parameters based on the amplitude value of each pixel in the short exposure image, and determine the short exposure parameters of the next frame of the short exposure image.
[0141] The second adjustment module 300 is used 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 to determine the long exposure parameters of the next frame long exposure image.
[0142] The first adjustment module 200 is further configured to determine a first feature 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 feature amplitude value and a first reference amplitude value; adjust the current short exposure parameters based on the short exposure gain; and determine the short exposure parameters of the next frame of the short exposure image.
[0143] The acquisition module 100 is also used to acquire multiple exposure images; the exposure parameters corresponding to the multiple exposure images are sequentially increased; based on the order of the exposure parameters from small to large, multiple exposure image groups are constructed sequentially according to the two adjacent exposure images; the exposure image with the smaller exposure parameter in the exposure image group is used as a short exposure image, and the exposure image with the larger exposure parameter in the exposure image group is used as a long exposure image.
[0144] For the first target exposure image group, the first adjustment module 200 is used 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 of the next frame short exposure image. The second adjustment module 300 is used to adjust the current long exposure parameters based on the amplitude values of each pixel in the short exposure image and the amplitude values of each pixel in the long exposure image to determine the long exposure parameters of the next frame long exposure image. The first target exposure image group is the exposure image group with the smallest exposure parameters among the plurality of exposure image groups.
[0145] For the second target exposure image group, the second adjustment module 300 is used to adjust the current long exposure parameters based on the amplitude values of each pixel in the short exposure image and the amplitude values of each pixel in the long exposure image, and to determine the long exposure parameters of the next frame long exposure image. The second target exposure image group is any of the multiple exposure image groups other than the first target exposure image group.
[0146] The second adjustment module 300 is further configured to determine the overexposed area and the 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 quantity threshold, then based on a first adjustment mode, the current long exposure parameters are adjusted according to the amplitude values of each pixel in the short exposure image and the amplitude values of each pixel in the long exposure image to determine the long exposure parameters of the next frame of the long exposure image; if the number of overexposed pixels is less than or equal to the first quantity threshold, then based on a second adjustment mode, the current long exposure parameters are adjusted according to the amplitude values of each pixel in the short exposure image and the amplitude values of each pixel in the long exposure image to determine the long exposure parameters of the next frame of the long exposure image.
[0147] The second adjustment module 300 is further configured to: determine a first region in the short exposure image corresponding to the overexposed region in the long exposure image; determine the amplitude value of each pixel in the first region based on the amplitude value of each pixel in the short exposure image; determine the number of first pixels in the first region whose amplitude value is less than a first amplitude threshold; determine an abnormal ratio based on the number of first pixels and the total number of pixels in the short exposure image; if the abnormal ratio is greater than or equal to a ratio threshold, adjust the current long exposure parameters based on the abnormal ratio and the ratio threshold to determine the long exposure parameters of the next frame of the long exposure image; if the abnormal 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 according to the second adjustment mode to determine the long exposure parameters of the next frame of the long exposure image.
[0148] The second adjustment module 300 is further configured to determine the long exposure gain based on the abnormal ratio and the ratio threshold; adjust the current long exposure parameters based on the long exposure gain; and determine the long exposure parameters of the next frame of the long exposure image.
[0149] The second adjustment module 300 is further configured to: determine a non-overexposed region in the long exposure image based on the amplitude value of each pixel in the long exposure image; determine a second region in the short exposure image where the amplitude value of a pixel is less than a second amplitude threshold based on the amplitude value of each pixel in the short exposure image; determine a third region by intersecting the non-overexposed region with the second region; determine the amplitude value of each pixel in the third region based on the amplitude value of each pixel in the long exposure image; determine a second feature amplitude value of the long exposure image based on the amplitude value of each pixel in the third region; determine a long exposure gain based on the second feature 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 frame of the 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, the number of second pixels whose amplitude value is less than a third amplitude threshold; if the number of second pixels is greater than a second quantity threshold, then based on a 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 frame of the long exposure image; if the number of second pixels is less than or equal to the second quantity threshold, then determine the current long exposure parameters as the long exposure parameters of the next frame of the long exposure image.
[0151] The second adjustment module 300 is further configured to: determine a fourth region in the short exposure image where the amplitude value of each pixel is less than a third amplitude threshold, based on the amplitude value of each pixel in the short exposure image; determine the amplitude value of each pixel in the fourth region based on the amplitude value of each pixel in the long exposure image; determine a second feature amplitude value of the long exposure image based on the amplitude value of each pixel in the fourth region; determine a long exposure gain based on the second feature amplitude value and a second reference amplitude value; adjust the current long exposure parameters based on the long exposure gain; and determine the long exposure parameters of the next frame of the long exposure image.
[0152] Each module in the aforementioned exposure parameter adjustment device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0153] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 9 As shown, the terminal can be any imaging device that performs fusion imaging using multiple exposure parameters. The computer device includes a processor, memory, communication interface, display screen, and input device connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements an exposure parameter adjustment method.
[0154] Those skilled in the art will understand that Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0155] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement any of the exposure parameter adjustment methods described in the above embodiments.
[0156] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements any of the exposure parameter adjustment methods described in the above embodiments.
[0157] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, 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 many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0158] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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 embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for adjusting exposure parameters, characterized in that, The method includes: Acquire short-exposure and long-exposure images; 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 of the next frame of the 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 parameters are adjusted to determine the long exposure parameters of the next frame of the long exposure image. The step of adjusting the current long exposure parameters based on the amplitude values of each pixel in the short exposure image and the long exposure image to determine the long exposure parameters of the next frame of the long exposure image includes: determining the number of second pixels in the short exposure image whose amplitude values are less than a third amplitude threshold based on the amplitude values of each pixel in the short exposure image; if the number of second pixels is greater than a second number threshold, then adjusting the current long exposure parameters based on the third adjustment mode, according to the amplitude values of each pixel in the short exposure image and the long exposure image, to determine the long exposure parameters of the next frame of the long exposure image.
2. The method according to claim 1, characterized in that, The method further includes: If the number of the second pixels is less than or equal to the second number threshold, then the current long exposure parameter is determined as the long exposure parameter for the next frame of the long exposure image.
3. The method according to claim 1, characterized in that, The method further includes: Multiple exposure images are acquired; the exposure parameters corresponding to the multiple exposure images are increased sequentially. Based on the exposure parameters in ascending order, multiple exposure image groups are constructed sequentially according to two adjacent exposure images; the exposure image with the smaller exposure parameter in the exposure image group is a short exposure image, and the exposure image with the larger exposure parameter in the exposure image group is a long exposure image.
4. The method according to claim 3, characterized in that, The method further includes: 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 of the next frame short exposure image; 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 long exposure image; the first target exposure image group is the exposure image group with the smallest exposure parameters among the multiple exposure image groups.
5. The method according to claim 4, characterized in that, The method further includes: For the second target exposure image group, the current long exposure parameters are adjusted based on the amplitude values of each pixel in the short exposure image and the amplitude values of each pixel in the long exposure image to determine the long exposure parameters of the next frame long exposure image; the second target exposure image group is any of the multiple exposure image groups other than the first target exposure image group.
6. The method according to any one of claims 1 to 5, characterized in that, The step of adjusting the current short exposure parameters based on the amplitude value of each pixel in the short exposure image to determine the short exposure parameters of the next frame of the short exposure image includes: Based on the amplitude value of each pixel in the short exposure image, a first feature amplitude value of the short exposure image is determined; The short exposure gain is determined based on the first feature amplitude value and the first reference amplitude value; The current short exposure parameters are adjusted based on the short exposure gain to determine the short exposure parameters for the next frame of the short exposure image.
7. The method according to any one of claims 1 to 5, characterized in that, The step of adjusting the current long exposure parameters based on the third adjustment mode, 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 frame long exposure image includes: Based on the amplitude value of each pixel in the short exposure image, a fourth region in the short exposure image where the amplitude value of the pixels is less than the third amplitude threshold is determined; Based on the amplitude value of each pixel in the long exposure image, the amplitude value of each pixel in the fourth region is determined; The second feature amplitude value of the long exposure image is determined based on the amplitude value of each pixel in the fourth region; The long exposure gain is determined based on the second characteristic amplitude value and the second reference amplitude value; The current long exposure parameters are adjusted based on the long exposure gain to determine the long exposure parameters for the next frame of the long exposure image.
8. An exposure parameter adjustment device, characterized in that, The device includes: The acquisition module is used to acquire short-exposure images and long-exposure images; The first adjustment module is used to adjust the current short exposure parameters based on the amplitude value of each pixel in the short exposure image, and to determine the short exposure parameters of the next frame of the short exposure image. The second adjustment module is used to adjust the current long exposure parameters based on the amplitude values of each pixel in the short exposure image and the amplitude values of each pixel in the long exposure image to determine the long exposure parameters of the next frame of the long exposure image. The adjustment of the current long exposure parameters based on the amplitude values of each pixel in the short exposure image and the amplitude values of each pixel in the long exposure image to determine the long exposure parameters of the next frame of the long exposure image includes: determining the number of second pixels in the short exposure image whose amplitude values are less than a third amplitude threshold based on the amplitude values of each pixel in the short exposure image; if the number of second pixels is greater than a second number threshold, then based on a third adjustment mode, adjusting the current long exposure parameters according to the amplitude values of each pixel in the short exposure image and the amplitude values of each pixel in the long exposure image to determine the long exposure parameters of the next frame of the long exposure image.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.