Exposure method, device and electronic equipment for image

By acquiring and decomposing the ambient light intensity of an image, and adjusting the exposure time using texture and superpixel image features, the problem of poor visual perception quality in existing technologies is solved, achieving precise adjustment of image exposure time and improvement of visual perception quality.

CN116528053BActive Publication Date: 2026-07-31VIVO MOBILE COMM CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
VIVO MOBILE COMM CO LTD
Filing Date
2023-05-05
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

In existing technologies, the method of adjusting the exposure time based on the grayscale value of the image results in poor visual perception quality of the exposed image.

Method used

By acquiring the ambient light intensity of the Nth frame of the exposed image and decomposing the image within a specific light intensity range, texture images and superpixel images are obtained. These image features are then used to adjust the exposure time of the next frame to improve visual perception quality.

Benefits of technology

By measuring ambient light intensity and image features, and precisely adjusting the exposure time, the visual perception quality of the image is significantly improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116528053B_ABST
    Figure CN116528053B_ABST
Patent Text Reader

Abstract

This application discloses an image exposure method, apparatus, and electronic device, belonging to the field of communication technology. The method includes: acquiring an Nth frame exposure image and calculating a first ambient light intensity of the Nth frame exposure image, where N is an integer greater than 1; if the first ambient light intensity is greater than or equal to a first ambient light intensity threshold and less than or equal to a second ambient light intensity threshold, performing image decomposition on the Nth frame exposure image to obtain at least one of a first texture image and a first superpixel image; and determining the target exposure time of the (N+1)th frame image to be exposed based on at least one of the first texture image and the first superpixel image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of communication technology, and specifically relates to an image exposure method, apparatus and electronic device. Background Technology

[0002] In existing technologies, when a camera captures the first frame of image data, it acquires the image with a fixed exposure time. Then, based on the grayscale value of the first frame, the exposure time of the next frame is adjusted. After multiple rounds of adjustments, an appropriate exposure time value is obtained. However, exposure methods that determine the exposure time solely based on the image's grayscale value result in visually poor image quality. Summary of the Invention

[0003] The purpose of this application is to provide an image exposure method, apparatus, and electronic device that can solve the problem of poor visual perception quality of exposed images obtained by existing image exposure methods.

[0004] To solve the above-mentioned technical problems, this application is implemented as follows:

[0005] In a first aspect, embodiments of this application provide an image exposure method, comprising:

[0006] Acquire the Nth frame exposure image and calculate the first ambient light intensity of the Nth frame exposure image, where N is an integer greater than 1;

[0007] When the first ambient light intensity is greater than or equal to the first ambient light intensity threshold and less than or equal to the second ambient light intensity threshold, the Nth frame exposure image is decomposed to obtain at least one of the first texture image and the first superpixel image.

[0008] The target exposure time of the N+1th frame image to be exposed is determined based on at least one of the first texture image and the first superpixel image.

[0009] Secondly, embodiments of this application provide an image exposure apparatus, comprising:

[0010] The first processing module is used to acquire the Nth frame exposure image and calculate the first ambient light intensity of the Nth frame exposure image, where N is an integer greater than 1;

[0011] The second processing module is used to perform image decomposition on the Nth frame exposure image when the first ambient light intensity is greater than or equal to the first ambient light intensity threshold and less than or equal to the second ambient light intensity threshold, to obtain at least one of the first texture image and the first superpixel image.

[0012] The first determining module is configured to determine the target exposure time of the N+1th frame image to be exposed based on at least one of the first texture image and the first superpixel image.

[0013] Thirdly, embodiments of this application provide an electronic device including a processor and a memory, wherein the memory stores programs or instructions executable on the processor, and the programs or instructions, when executed by the processor, implement the steps of the method described in the first aspect.

[0014] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect.

[0015] Fifthly, embodiments of this application provide a chip, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the method as described in the first aspect.

[0016] In a sixth aspect, embodiments of this application provide a computer program product stored in a storage medium, which is executed by at least one processor to implement the method described in the first aspect.

[0017] In this embodiment, by acquiring the Nth frame exposure image and calculating the first ambient light intensity of the Nth frame exposure image, the first ambient light intensity is compared with a first ambient light intensity threshold and a second ambient light intensity threshold. If the first ambient light intensity is greater than or equal to the first ambient light intensity threshold and less than or equal to the second ambient light intensity threshold, then the Nth frame exposure image is decomposed to obtain at least one of a first texture image and a first superpixel image. Based on at least one of the first texture image and the first superpixel image, the target exposure time of the N+1th frame image to be exposed is determined. Thus, the first ambient light intensity is used to measure whether the exposure time of the next frame image should be increased or decreased to increase the visual perception quality. Then, the exposure time value of the next frame image is finely adjusted based on at least one of the first texture image and the first superpixel image to further increase the visual perception quality. Attached Figure Description

[0018] Figure 1 This is one of the schematic flowcharts of the image exposure method provided in the embodiments of this application;

[0019] Figure 2 This is a second schematic flowchart of the image exposure method provided in the embodiments of this application;

[0020] Figure 3This is a schematic diagram of the structure of an image exposure device provided in an embodiment of this application;

[0021] Figure 4 This is a structural block diagram of an electronic device provided in an embodiment of this application;

[0022] Figure 5 This is a structural block diagram of another electronic device provided in the embodiments of this application. Detailed Implementation

[0023] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0024] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0025] The image exposure method provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.

[0026] like Figure 1 As shown, this application provides an image exposure method that can be applied to electronic devices, such as... Figure 2 As shown, the camera module in the electronic device may include: an exposure determination module 21 and a quality perception module 22. The exposure method for the above image may specifically include the following steps:

[0027] Step 101: Obtain the Nth frame exposure image and calculate the first ambient light intensity of the Nth frame exposure image, where N is an integer greater than 1.

[0028] Specifically, the exposure determination module 21 acquires the Nth frame exposure image from the captured image and calculates the ambient light intensity of the Nth frame exposure image to obtain the first ambient light intensity. The first ambient light intensity is used to determine whether the exposure time should be increased or decreased for the next frame image (i.e., the N+1th frame image).

[0029] Step 102: When the first ambient light intensity is greater than or equal to the first ambient light intensity threshold and less than or equal to the second ambient light intensity threshold, perform image decomposition on the Nth frame exposure image to obtain at least one of the first texture image and the first superpixel image.

[0030] Specifically, the exposure judgment module 21 compares the first ambient light intensity with the first ambient light intensity threshold and compares the first ambient light intensity with the second ambient light intensity threshold. In other words, since the second ambient light intensity threshold is greater than the first ambient light intensity threshold, it determines whether the first ambient light intensity is within the first ambient light intensity range. The first ambient light intensity range represents the range between the first ambient light intensity threshold and the second ambient light intensity threshold.

[0031] If the first ambient light intensity is greater than or equal to the first ambient light intensity threshold and less than or equal to the second ambient light intensity threshold, then the first ambient light intensity is within the range of the first ambient light intensity; if the first ambient light intensity is less than the first ambient light intensity threshold, then the first ambient light intensity is outside the range of the first ambient light intensity; if the first ambient light intensity is greater than the second ambient light intensity threshold, then the first ambient light intensity is outside the range of the first ambient light intensity.

[0032] If the first ambient light intensity is greater than or equal to the first ambient light intensity threshold and less than or equal to the second ambient light intensity threshold, it indicates that the first ambient light intensity is within the first ambient light intensity range. The exposure judgment module 21 uses the first ambient light intensity to measure whether the exposure time of the N+1 frame image should be increased or decreased. The function of the exposure judgment module 21 is to maintain the image exposure time within an exposure time interval. In order to further determine the exposure time of the N+1 frame image, the quality perception module 22 needs to perform image decomposition on the Nth frame exposure image to obtain at least one of the first texture image and the first superpixel image used to characterize the perceived quality of the exposure image.

[0033] Furthermore, such as Figure 2 As shown, the quality perception module 22 includes a texture detail perception unit 221 and a color richness perception unit 222. The texture detail perception unit 221 includes a structure texture decomposition subunit 2211 and a high-frequency energy calculation subunit 2212. The color richness perception unit 222 includes a superpixel decomposition subunit 2221 and a color statistical comparison subunit 2222.

[0034] Specifically, the structural texture decomposition subunit 2211 performs image decomposition on the Nth frame exposure image using an image texture decomposition method to obtain a first texture image, which is a pixel matrix of texture values ​​related to the Nth frame exposure image. The superpixel decomposition subunit 2221 performs image decomposition on the Nth frame exposure image using a superpixel decomposition method to obtain a first superpixel image. The superpixel decomposition method can divide perceptibly similar pixel regions into a superpixel point based on the local brightness and color information of the Nth frame exposure image. The first superpixel image is a pixel matrix of superpixel values ​​related to the Nth frame exposure image.

[0035] Step 103: Determine the target exposure time of the N+1th frame image to be exposed based on at least one of the first texture image and the first superpixel image.

[0036] Specifically, the quality perception module 22 can further fine-tune the exposure time value of the N+1th frame image based on at least one of the first texture image and the first superpixel image, thereby further increasing the visual perception quality.

[0037] In the above embodiments of this application, by acquiring the Nth frame exposure image and calculating the first ambient light intensity of the Nth frame exposure image, the first ambient light intensity is compared with a first ambient light intensity threshold and a second ambient light intensity threshold. If the first ambient light intensity is greater than or equal to the first ambient light intensity threshold and less than or equal to the second ambient light intensity threshold, then the Nth frame exposure image is decomposed to obtain at least one of a first texture image and a first superpixel image. Based on at least one of the first texture image and the first superpixel image, the target exposure time of the N+1th frame image to be exposed is determined. Thus, the first ambient light intensity is used to measure whether the exposure time of the next frame image should be increased or decreased to increase the visual perception quality. Then, the exposure time value of the next frame image is finely adjusted based on at least one of the first texture image and the first superpixel image to further increase the visual perception quality.

[0038] As an optional embodiment, step 101, calculating the first ambient light intensity of the Nth frame of the exposed image, includes:

[0039] The Nth frame of the exposed image is decomposed using the image intrinsic decomposition method to obtain the reflection image and brightness image of the Nth frame of the exposed image;

[0040] Calculate the mean reflection value of the reflection image and the mean brightness value of the brightness image, respectively;

[0041] The first ambient light intensity of the Nth frame exposure image is calculated based on the average reflection value, the average brightness value, and the first exposure time, where the first exposure time is the exposure time of the Nth frame exposure image.

[0042] Specifically, the exposure determination module 21 includes an intrinsic decomposition unit 211 and a light intensity quantization unit 212. The intrinsic decomposition unit 211 performs image decomposition on the Nth frame exposure image using an image intrinsic decomposition method to obtain a reflection image and a brightness image of the Nth frame exposure image. The reflection image is a pixel matrix of the reflection values ​​of the Nth frame exposure image, and the brightness image is a pixel matrix of the brightness values ​​of the Nth frame exposure image.

[0043] The light intensity quantization unit 212 calculates the average reflection value in the reflection image, thus obtaining the average reflection value; similarly, it calculates the average brightness value in the brightness image, thus obtaining the average brightness value. Using the aforementioned average reflection value, average brightness value, and the first exposure time of the Nth frame exposure image, the first ambient light intensity of the Nth frame exposure image is calculated. Based on the first ambient light intensity, it is determined whether the exposure time of the N+1th frame image should be increased or decreased to improve visual perception quality.

[0044] As an optional embodiment, the step of calculating the first ambient light intensity of the Nth frame of the exposed image based on the average reflection value, the average brightness value, and the first exposure time specifically includes:

[0045] Multiply the mean reflection value by the first exposure time to obtain the first product;

[0046] The first ambient light intensity is obtained by calculating the ratio of the average brightness value to the first product.

[0047] Specifically, the first ambient light intensity is calculated using the following formula:

[0048] H = I nl / (I nr *T)

[0049] Where T represents the first exposure time;

[0050] H represents the first ambient light intensity;

[0051] I nl Indicates the average brightness;

[0052] I nr This represents the mean reflectance.

[0053] As an optional embodiment, after step 101 calculates the first ambient light intensity of the Nth frame exposure image, the method further includes:

[0054] When the first ambient light intensity is less than the first ambient light intensity threshold, the target exposure time is determined to be the time after adding the second exposure time to the first exposure time;

[0055] When the first ambient light intensity is greater than the second ambient light intensity threshold, the target exposure time is determined to be the time after subtracting the second exposure time from the first exposure time.

[0056] Specifically, if the first ambient light intensity is less than the first ambient light intensity threshold, it means that the first ambient light intensity is outside the first ambient light intensity range. The light intensity quantization unit 212 increases the first exposure time by a second exposure time to obtain the target exposure time. If the first ambient light intensity is greater than the second ambient light intensity threshold, it means that the first ambient light intensity is outside the first ambient light intensity range. The light intensity quantization unit 212 decreases the first exposure time by a second exposure time to obtain the target exposure time. Thus, the target exposure time of the N+1 frame image is determined by the first ambient light intensity to increase or decrease the target exposure time based on the first exposure time, thereby improving the visual perception quality.

[0057] Furthermore, the second exposure time is determined based on the first exposure time. Preferably, the second exposure time can be one-fifth of the first exposure time, or it can be set to other times as needed, without specific limitations here.

[0058] As an optional embodiment, step 103, based on at least one of the first texture image and the first superpixel image, determines the target exposure time of the (N+1)th frame image to be exposed, specifically including:

[0059] Obtain the first frequency mean of the first texture image;

[0060] If the first frequency mean is less than or equal to the second frequency mean of the exposed image of the (N-1)th frame, the target exposure time is determined to be the third exposure time of the exposed image of the (N-1)th frame.

[0061] or,

[0062] Obtain the first color richness of the first superpixel image;

[0063] If the first color richness is less than or equal to the second color richness of the exposed image of the (N-1)th frame, the target exposure time is determined to be the third exposure time of the exposed image of the (N-1)th frame.

[0064] or,

[0065] Obtain the first frequency mean of the first texture image, and obtain the first color richness of the first superpixel image;

[0066] If the first frequency mean is less than or equal to the second frequency mean of the (N-1)th frame exposed image and the first color richness is less than or equal to the second color richness of the (N-1)th frame exposed image, the target exposure time is determined to be the third exposure time of the (N-1)th frame exposed image.

[0067] Specifically, the high-frequency energy calculation subunit 2212 acquires the first frequency average of the first texture image and the second frequency average of the (N-1)th exposed frame image, and compares the first frequency average with the second frequency average of the (N-1)th exposed frame image; the color statistics comparison subunit 2222 acquires the first color richness of the first superpixel image and the second color richness of the (N-1)th exposed frame image, and compares the first color richness with the second color richness of the (N-1)th exposed frame image. If the first frequency average is less than or equal to the second frequency average, it is considered that the (N-1)th exposed frame image has reached the optimal exposure time, the adjustment of the target exposure time is stopped, and the third exposure time of the (N-1)th exposed frame image is taken as the target exposure time of the (N+1)th frame image. If the first color richness is less than or equal to the second color richness, it is considered that the (N-1)th exposed frame image has reached the optimal exposure time, the adjustment of the target exposure time is stopped, and the third exposure time of the (N-1)th exposed frame image is taken as the target exposure time of the (N+1)th frame image. If the first frequency mean is less than or equal to the second frequency mean and the first color richness is less than or equal to the second color richness, then the N-1 frame of the exposed image is considered to have reached the optimal exposure time, the adjustment of the target exposure time is stopped, and the third exposure time of the N-1 frame of the exposed image is taken as the target exposure time of the N+1 frame of the exposed image.

[0068] As an optional embodiment, the step of obtaining the first frequency average of the first texture image specifically includes:

[0069] Perform a discrete cosine transform on the first texture image to obtain a frequency image;

[0070] The frequency values ​​in the high-frequency energy region of the frequency image are obtained, and the average value of the frequency values ​​in the high-frequency energy region is calculated to obtain the first average frequency value.

[0071] Specifically, the high-frequency energy calculation subunit 2212 performs discrete cosine transform processing on the first texture image to obtain a frequency image; obtains the frequency values ​​belonging to the high-frequency energy region in the frequency image, and calculates the average value of the frequency values ​​in the high-frequency energy region to obtain the first frequency mean.

[0072] For example, the resolution of a frequency image is P*Q, where P is the image width and Q is the image height. For a frequency image, the upper left portion represents the low-frequency energy region, and the lower right portion represents the high-frequency energy region. For instance, the lower right quarter of the frequency image can be defined as the high-frequency energy region, i.e., the region with width coordinate indices [1 / 2P, P] and height coordinate indices [1 / 2Q, Q]. The average frequency of this region is calculated and denoted as the first average frequency.

[0073] As an optional embodiment, the step of obtaining the first color richness of the first superpixel image specifically includes:

[0074] Obtain M superpixel points from the first superpixel image, where M is an integer greater than 1;

[0075] Calculate the color mean of each of the M superpixels;

[0076] Projecting the M color mean values ​​onto the color gamut map yields the maximum color gamut area of ​​the M color mean values ​​in the color gamut map.

[0077] The first color richness is calculated based on M and the maximum color gamut area.

[0078] Specifically, the color statistics comparison subunit 2222 obtains the number of superpixels in the first superpixel image, denoted as M, where each superpixel represents a color perceptible to the human eye. The color mean of each superpixel is calculated, resulting in M ​​color means. These M color means are projected onto a color gamut map, and the maximum color gamut area enclosed by the M color means in the color gamut map is calculated. Then, M divided by the maximum color gamut area is calculated, which is the first color richness.

[0079] Specifically, the first color richness can be calculated using the following formula:

[0080] R n =M / S n

[0081] Among them, R n The primary color richness is indicated;

[0082] M represents the number of superpixels in the first superpixel image;

[0083] S n This indicates the maximum color gamut area.

[0084] As an optional embodiment, step 104, which determines the target exposure time of the (N+1)th frame image to be exposed based on at least one of the first texture image and the first superpixel image, further includes:

[0085] If at least one of the first frequency mean is greater than the second frequency mean or the first color richness is greater than the second color richness, the first ambient light intensity is compared with the third ambient light intensity threshold.

[0086] When the first ambient light intensity is greater than the third ambient light intensity threshold, the target exposure time is determined to be the time after adding the fourth exposure time to the first exposure time;

[0087] If the first ambient light intensity is less than the third ambient light intensity threshold, the target exposure time is determined to be the first exposure time minus the fourth exposure time.

[0088] Specifically, if the first frequency average is greater than the second frequency average, it indicates that the optimal exposure time has not been reached, and the exposure time of the (N+1)th frame image still needs to be adjusted. If the first color richness is greater than the second color richness, it indicates that the optimal exposure time has not been reached, and the exposure time of the (N+1)th frame image still needs to be adjusted. If both the first frequency average and the second frequency average are greater than the first color richness and the second color richness are greater than the second color richness, it indicates that the optimal exposure time has not been reached, and the exposure time of the (N+1)th frame image still needs to be adjusted.

[0089] The first ambient light intensity is compared with a third ambient light intensity threshold. If the first ambient light intensity is greater than the third ambient light intensity threshold, the target exposure time is the time obtained by adding a fourth exposure time to the first exposure time. If the first ambient light intensity is less than the third ambient light intensity threshold, the target exposure time is the time obtained by subtracting a fourth exposure time from the first exposure time.

[0090] Furthermore, the third ambient light intensity threshold is determined based on the first ambient light intensity threshold and the second ambient light intensity threshold. Preferably, the third ambient light intensity threshold is half of the sum of the first ambient light intensity threshold and the second ambient light intensity threshold. It can also be set to other values ​​as needed, without specific limitations here.

[0091] Furthermore, the fourth exposure time is determined based on the first exposure time. Preferably, the fourth exposure time can be one-fifth of the first exposure time, or it can be set to other times as needed, without specific limitations here.

[0092] In summary, the embodiments of this application decompose the Nth frame exposure image using an exposure judgment module to obtain a reflection image and a brightness image. Then, the first ambient light intensity is calculated by combining the reflection image and the brightness image to determine whether the exposure time of the N+1th frame image should be increased or decreased. Furthermore, the quality perception module decomposes the Nth frame exposure image to obtain an image texture detail image (i.e., a first texture image). Subsequently, a discrete cosine transform is performed on the first texture image to obtain energy distribution quantization detail information. The Nth frame exposure image is also decomposed into superpixels to obtain the color richness of a color type and color gamut area quantization image (i.e., a first superpixel image). Based on the image texture detail and color richness, the exposure time of the N+1th frame image is finely adjusted to determine a target exposure time that can improve visual perception quality.

[0093] The image exposure method provided in this application can be executed by an image exposure device. This application uses an image exposure device executing the image exposure method as an example to illustrate the image exposure device provided in this application.

[0094] like Figure 3 As shown, this application embodiment also provides an image exposure device 300, including:

[0095] The first processing module 301 is used to acquire the Nth frame exposure image and calculate the first ambient light intensity of the Nth frame exposure image, where N is an integer greater than 1;

[0096] The second processing module 302 is used to perform image decomposition on the Nth frame exposure image when the first ambient light intensity is greater than or equal to the first ambient light intensity threshold and less than or equal to the second ambient light intensity threshold, to obtain at least one of the first texture image and the first superpixel image.

[0097] The first determining module 304 is used to determine the target exposure time of the N+1th frame image to be exposed based on at least one of the first texture image and the first superpixel image.

[0098] Optionally, the first processing module 301 is specifically used for:

[0099] The Nth frame of the exposed image is decomposed using the image intrinsic decomposition method to obtain the reflection image and brightness image of the Nth frame of the exposed image;

[0100] Calculate the mean reflection value of the reflection image and the mean brightness value of the brightness image, respectively;

[0101] The first ambient light intensity of the Nth frame exposure image is calculated based on the average reflection value, the average brightness value, and the first exposure time, where the first exposure time is the exposure time of the Nth frame exposure image.

[0102] Optionally, when the first processing module 301 calculates the first ambient light intensity of the Nth frame of the exposed image based on the average reflection value, the average brightness value, and the first exposure time, it is specifically used for:

[0103] Multiply the mean reflection value by the first exposure time to obtain the first product;

[0104] The first ambient light intensity is obtained by calculating the ratio of the average brightness value to the first product.

[0105] Optionally, the device further includes:

[0106] The second determining module is used to determine the target exposure time as the time after adding the second exposure time to the first exposure time when the first ambient light intensity is less than the first ambient light intensity threshold.

[0107] The third determining module is used to determine the target exposure time as the time after subtracting the second exposure time from the first exposure time when the first ambient light intensity is greater than the second ambient light intensity threshold.

[0108] Optionally, the first determining module 303 is specifically used for:

[0109] Obtain the first frequency mean of the first texture image;

[0110] If the first frequency mean is less than or equal to the second frequency mean of the exposed image of the (N-1)th frame, the target exposure time is determined to be the third exposure time of the exposed image of the (N-1)th frame.

[0111] or,

[0112] Obtain the first color richness of the first superpixel image;

[0113] If the first color richness is less than or equal to the second color richness of the exposed image of the (N-1)th frame, the target exposure time is determined to be the third exposure time of the exposed image of the (N-1)th frame.

[0114] or,

[0115] Obtain the first frequency mean of the first texture image, and obtain the first color richness of the first superpixel image;

[0116] If the first frequency mean is less than or equal to the second frequency mean of the (N-1)th frame exposed image and the first color richness is less than or equal to the second color richness of the (N-1)th frame exposed image, the target exposure time is determined to be the third exposure time of the (N-1)th frame exposed image.

[0117] Optionally, when the first determining module 303 obtains the first frequency average of the first texture image, it is specifically used for:

[0118] Perform a discrete cosine transform on the first texture image to obtain a frequency image;

[0119] The frequency values ​​in the high-frequency energy region of the frequency image are obtained, and the average value of the frequency values ​​in the high-frequency energy region is calculated to obtain the first average frequency value.

[0120] Optionally, when the first determining module 303 obtains the first color richness of the first superpixel image, it is specifically used for:

[0121] Obtain M superpixel points from the first superpixel image, where M is an integer greater than 1;

[0122] Calculate the color mean of each of the M superpixels;

[0123] Projecting the M color mean values ​​onto the color gamut map yields the maximum color gamut area of ​​the M color mean values ​​in the color gamut map.

[0124] The first color richness is calculated based on M and the maximum color gamut area.

[0125] Optionally, the first determining module 303 is further configured to:

[0126] If at least one of the following conditions is met: the first average frequency is greater than the second average frequency, or the first color richness is greater than the second color richness, the first ambient light intensity is compared with the third ambient light intensity threshold.

[0127] When the first ambient light intensity is greater than the third ambient light intensity threshold, the target exposure time is determined to be the time after adding the fourth exposure time to the first exposure time;

[0128] If the first ambient light intensity is less than the third ambient light intensity threshold, the target exposure time is determined to be the first exposure time minus the fourth exposure time.

[0129] In summary, the embodiments of this application decompose the Nth frame exposure image to obtain a reflection image and a brightness image. Then, the first ambient light intensity is calculated by combining the reflection image and the brightness image to determine whether the exposure time of the N+1th frame image should be increased or decreased. Furthermore, the image texture detail image (i.e., the first texture image) is obtained by performing texture decomposition on the Nth frame exposure image. Subsequently, the energy distribution quantization detail information is obtained by performing discrete cosine transform on the first texture image. The color richness of the color richness of the color type and color gamut area quantization image (i.e., the first superpixel image) is obtained by performing superpixel decomposition on the Nth frame exposure image. Based on the image texture detail and color richness, the exposure time of the N+1th frame image is fine-tuned to determine the target exposure time that can improve the visual perception quality.

[0130] The image exposure device in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television set (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the scope of the device.

[0131] The image exposure device in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit the specific operating system used.

[0132] The image exposure apparatus provided in this application embodiment can achieve Figures 1 to 2 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.

[0133] Optionally, such as Figure 4As shown, this application embodiment also provides an electronic device 400, including a processor 401 and a memory 402. The memory 402 stores a program or instructions that can run on the processor 401. When the program or instructions are executed by the processor 401, they implement the various steps of the above-described image exposure method embodiment and can achieve the same technical effect. To avoid repetition, they will not be described again here.

[0134] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.

[0135] Figure 5 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of this application.

[0136] The electronic device 1000 includes, but is not limited to, components such as: radio frequency unit 1001, network module 1002, audio output unit 1003, input unit 1004, sensor 1005, display unit 1006, user input unit 1007, interface unit 1008, memory 1009, and processor 1010.

[0137] Those skilled in the art will understand that the electronic device 1000 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 1010 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 5 The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.

[0138] The processor 1010 is used to acquire the Nth frame exposure image and calculate the first ambient light intensity of the Nth frame exposure image, where N is an integer greater than 1.

[0139] When the first ambient light intensity is greater than or equal to the first ambient light intensity threshold and less than or equal to the second ambient light intensity threshold, the Nth frame of the exposed image is decomposed to obtain at least one of a first texture image and a first superpixel image; the target exposure time of the N+1th frame of the image to be exposed is determined based on at least one of the first texture image and the first superpixel image.

[0140] In the above embodiments of this application, by acquiring the Nth frame exposure image and calculating the first ambient light intensity of the Nth frame exposure image, the first ambient light intensity is compared with a first ambient light intensity threshold and a second ambient light intensity threshold. If the first ambient light intensity is greater than or equal to the first ambient light intensity threshold and less than or equal to the second ambient light intensity threshold, then the Nth frame exposure image is decomposed to obtain at least one of a first texture image and a first superpixel image. Based on at least one of the first texture image and the first superpixel image, the target exposure time of the N+1th frame image to be exposed is determined. Thus, the first ambient light intensity is used to measure whether the exposure time of the next frame image should be increased or decreased to increase the visual perception quality. Then, the exposure time value of the next frame image is finely adjusted based on at least one of the first texture image and the first superpixel image to further increase the visual perception quality.

[0141] Optionally, when calculating the first ambient light intensity of the Nth frame exposure image, the processor 1010 is specifically used for:

[0142] The Nth frame of the exposed image is decomposed using the image intrinsic decomposition method to obtain the reflection image and brightness image of the Nth frame of the exposed image;

[0143] Calculate the mean reflection value of the reflection image and the mean brightness value of the brightness image, respectively;

[0144] The first ambient light intensity of the Nth frame exposure image is calculated based on the average reflection value, the average brightness value, and the first exposure time, where the first exposure time is the exposure time of the Nth frame exposure image.

[0145] Optionally, when the processor 1010 calculates the first ambient light intensity of the Nth frame of the exposed image based on the average reflection value, the average brightness value, and the first exposure time, it is specifically used for:

[0146] Multiply the mean reflection value by the first exposure time to obtain the first product;

[0147] The first ambient light intensity is obtained by calculating the ratio of the average brightness value to the first product.

[0148] Optionally, after calculating the first ambient light intensity of the Nth frame exposure image, the processor 1010 is further configured to:

[0149] When the first ambient light intensity is less than the first ambient light intensity threshold, the target exposure time is determined to be the time after adding the second exposure time to the first exposure time;

[0150] When the first ambient light intensity is greater than the second ambient light intensity threshold, the target exposure time is determined to be the time after subtracting the second exposure time from the first exposure time.

[0151] Optionally, when the processor 1010 determines the target exposure time of the (N+1)th frame image to be exposed based on at least one of the first texture image and the first superpixel image, it is specifically used to:

[0152] Obtain the first frequency mean of the first texture image;

[0153] If the first frequency mean is less than or equal to the second frequency mean of the exposed image of the (N-1)th frame, the target exposure time is determined to be the third exposure time of the exposed image of the (N-1)th frame.

[0154] or,

[0155] Obtain the first color richness of the first superpixel image;

[0156] If the first color richness is less than or equal to the second color richness of the exposed image of the (N-1)th frame, the target exposure time is determined to be the third exposure time of the exposed image of the (N-1)th frame.

[0157] or,

[0158] Obtain the first frequency mean of the first texture image, and obtain the first color richness of the first superpixel image;

[0159] If the first frequency mean is less than or equal to the second frequency mean of the (N-1)th frame exposed image and the first color richness is less than or equal to the second color richness of the (N-1)th frame exposed image, the target exposure time is determined to be the third exposure time of the (N-1)th frame exposed image.

[0160] Optionally, when acquiring the first frequency average of the first texture image, the processor 1010 is specifically used for:

[0161] Perform a discrete cosine transform on the first texture image to obtain a frequency image;

[0162] The frequency values ​​in the high-frequency energy region of the frequency image are obtained, and the average value of the frequency values ​​in the high-frequency energy region is calculated to obtain the first average frequency value.

[0163] Optionally, when acquiring the first color richness of the first superpixel image, the processor 1010 is specifically used for:

[0164] Obtain M superpixel points from the first superpixel image, where M is an integer greater than 1;

[0165] Calculate the color mean of each of the M superpixels;

[0166] Projecting the M color mean values ​​onto the color gamut map yields the maximum color gamut area of ​​the M color mean values ​​in the color gamut map.

[0167] The first color richness is calculated based on M and the maximum color gamut area.

[0168] Optionally, when the processor 1010 determines the target exposure time of the (N+1)th frame image to be exposed based on at least one of the first texture image and the first superpixel image, it is further configured to:

[0169] If the first frequency mean is greater than the second frequency mean, and / or the first color richness is greater than the second color richness, the first ambient light intensity is compared with the third ambient light intensity threshold.

[0170] When the first ambient light intensity is greater than the third ambient light intensity threshold, the target exposure time is determined to be the time after adding the fourth exposure time to the first exposure time;

[0171] If the first ambient light intensity is less than the third ambient light intensity threshold, the target exposure time is determined to be the first exposure time minus the fourth exposure time.

[0172] In summary, the embodiments of this application decompose the Nth frame exposure image to obtain a reflection image and a brightness image. Then, the first ambient light intensity is calculated by combining the reflection image and the brightness image to determine whether the exposure time of the N+1th frame image should be increased or decreased. Furthermore, the image texture detail image (i.e., the first texture image) is obtained by performing texture decomposition on the Nth frame exposure image. Subsequently, the energy distribution quantization detail information is obtained by performing discrete cosine transform on the first texture image. The color richness of the color richness of the color type and color gamut area quantization image (i.e., the first superpixel image) is obtained by performing superpixel decomposition on the Nth frame exposure image. Based on the image texture detail and color richness, the exposure time of the N+1th frame image is fine-tuned to determine the target exposure time that can improve the visual perception quality.

[0173] It should be understood that, in this embodiment, the input unit 1004 may include a graphics processing unit (GPU) 10041 and a microphone 10042. The GPU 10041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 1006 may include a display panel 10061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 1007 includes a touch panel 10071 and at least one of other input devices 10072. The touch panel 10071 is also called a touch screen. The touch panel 10071 may include a touch detection device and a touch controller. Other input devices 10072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be described in detail here.

[0174] The memory 1009 can be used to store software programs and various data. The memory 1009 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 1009 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 1009 in this embodiment includes, but is not limited to, these and any other suitable types of memory.

[0175] The processor 1010 may include one or more processing units; optionally, the processor 1010 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into the processor 1010.

[0176] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described image exposure method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0177] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0178] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described image exposure method embodiments and achieve the same technical effect. To avoid repetition, it will not be described again here.

[0179] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.

[0180] This application provides a computer program product stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-described image exposure method embodiment and achieve the same technical effect. To avoid repetition, it will not be described again here.

[0181] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0182] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0183] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. An image exposure method, characterized in that, include: Obtain the Nth frame exposure image and calculate the first ambient light intensity of the Nth frame exposure image, where N is an integer greater than 1. The first ambient light intensity is used to dynamically adjust the exposure time of the N+1th frame image. When the first ambient light intensity is greater than or equal to the first ambient light intensity threshold and less than or equal to the second ambient light intensity threshold, the Nth frame exposure image is decomposed to obtain the first superpixel image, or the first texture image and the first superpixel image are obtained. Based on the first superpixel image, determine the target exposure time of the N+1th frame image to be exposed, or, based on the first texture image and the first superpixel image, determine the target exposure time of the N+1th frame image to be exposed. The step of determining the target exposure time of the N+1th frame image to be exposed based on the first superpixel image includes: Obtain M superpixel points from the first superpixel image, where M is an integer greater than 1; Calculate the color mean of each of the M superpixels; project the M color mean values ​​onto a color gamut map to obtain the maximum color gamut area of ​​the M color mean values ​​in the color gamut map; calculate the first color richness based on the M and the maximum color gamut area. If the first color richness is less than or equal to the second color richness of the (N-1)th frame of the exposed image, the target exposure time is determined to be the third exposure time of the (N-1)th frame of the exposed image.

2. The method according to claim 1, characterized in that, The calculation of the first ambient light intensity of the Nth frame exposure image includes: The Nth frame of the exposed image is decomposed using the image intrinsic decomposition method to obtain the reflection image and brightness image of the Nth frame of the exposed image; Calculate the mean reflection value of the reflection image and the mean brightness value of the brightness image, respectively; The first ambient light intensity of the Nth frame exposure image is calculated based on the average reflection value, the average brightness value, and the first exposure time, where the first exposure time is the exposure time of the Nth frame exposure image.

3. The method according to claim 2, characterized in that, The step of calculating the first ambient light intensity of the Nth frame of the exposed image based on the average reflection value, the average brightness value, and the first exposure time includes: Multiply the mean reflection value by the first exposure time to obtain the first product; The first ambient light intensity is obtained by calculating the ratio of the average brightness value to the first product.

4. The method according to claim 2, characterized in that, After calculating the first ambient light intensity of the Nth frame of the exposed image, the method further includes: When the first ambient light intensity is less than the first ambient light intensity threshold, the target exposure time is determined to be the time after adding the second exposure time to the first exposure time; When the first ambient light intensity is greater than the second ambient light intensity threshold, the target exposure time is determined to be the time after subtracting the second exposure time from the first exposure time.

5. The method according to claim 2, characterized in that, Based on the first texture image and the first superpixel image, the target exposure time of the (N+1)th frame image to be exposed is determined, including: Obtain the first frequency mean of the first texture image, and obtain the first color richness of the first superpixel image; If the first frequency mean is less than or equal to the second frequency mean of the (N-1)th frame exposed image and the first color richness is less than or equal to the second color richness of the (N-1)th frame exposed image, the target exposure time is determined to be the third exposure time of the (N-1)th frame exposed image.

6. The method according to claim 5, characterized in that, Obtaining the first frequency mean of the first texture image includes: Perform a discrete cosine transform on the first texture image to obtain a frequency image; The frequency values ​​in the high-frequency energy region of the frequency image are obtained, and the average value of the frequency values ​​in the high-frequency energy region is calculated to obtain the first average frequency value.

7. The method according to claim 5, characterized in that, The step of determining the target exposure time of the (N+1)th frame image to be exposed based on the first superpixel image, or the step of determining the target exposure time of the (N+1)th frame image to be exposed based on the first texture image and the first superpixel image, further includes: If at least one of the following conditions is met: the first average frequency is greater than the second average frequency, or the first color richness is greater than the second color richness, the first ambient light intensity is compared with the third ambient light intensity threshold. When the first ambient light intensity is greater than the third ambient light intensity threshold, the target exposure time is determined to be the time after adding the fourth exposure time to the first exposure time; If the first ambient light intensity is less than the third ambient light intensity threshold, the target exposure time is determined to be the first exposure time minus the fourth exposure time.

8. An image exposure apparatus, characterized in that, include: The first processing module is used to acquire the Nth frame exposure image and calculate the first ambient light intensity of the Nth frame exposure image, where N is an integer greater than 1. The first ambient light intensity is used to determine whether the N+1th frame image has an increased or decreased exposure time. The second processing module is used to perform image decomposition on the Nth frame exposure image to obtain a first superpixel image, or to obtain a first texture image and a first superpixel image, when the first ambient light intensity is greater than or equal to a first ambient light intensity threshold and less than or equal to a second ambient light intensity threshold. The first determining module is used to determine the target exposure time of the (N+1)th frame image to be exposed based on the first superpixel image; The first determining module is specifically used to obtain M superpixel points in the first superpixel image, where M is an integer greater than 1; calculate the color mean of each of the M superpixel points; and project the M color mean values ​​onto a color gamut map to obtain the maximum color gamut area of ​​the M color mean values ​​in the color gamut map. Calculate the first color richness based on M and the maximum color gamut area; If the first color richness is less than or equal to the second color richness of the (N-1)th frame of the exposed image, the target exposure time is determined to be the third exposure time of the (N-1)th frame of the exposed image.

9. An electronic device, characterized in that, It includes a processor and a memory, the memory storing a program or instructions that can run on the processor, the program or instructions being executed by the processor to implement the steps of the image exposure method as described in any one of claims 1-7.