Exposure adjustment method and apparatus, electronic device, and readable storage medium

By acquiring the current brightness of the target image and adjusting the exposure parameters, the problem of inaccurate image exposure during zooming is solved, improving image quality, especially in complex scenes.

CN116320769BActive Publication Date: 2026-06-23VIVO MOBILE COMM CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
VIVO MOBILE COMM CO LTD
Filing Date
2023-03-27
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

During zooming, the image exposure of electronic devices is inaccurate, resulting in poor image quality, which is especially noticeable in complex scenes such as those containing faces or point light sources.

Method used

By acquiring the original image and the target zoom level, the current brightness of the target image is determined, and the exposure parameters are adjusted based on the target brightness and the current ambient brightness. Metering modes such as center-weighted metering or spot metering are used to calculate the target exposure parameters to reduce the error of brightness information in zoom scenes.

Benefits of technology

It improves the exposure accuracy of images after zooming, ensuring image quality, especially in complex scenes, reducing brightness information errors and achieving more reasonable and reliable exposure adjustments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116320769B_ABST
    Figure CN116320769B_ABST
Patent Text Reader

Abstract

The application discloses an exposure adjustment method and device, electronic equipment and a readable storage medium, and belongs to the technical field of camera shooting. The method comprises the following steps: acquiring an original image and a target zoom ratio; determining a target image according to the target zoom ratio and the original image; determining the current picture brightness of the target image; adjusting an exposure parameter based on the target brightness and the current picture brightness to obtain a target exposure parameter; wherein the target brightness is determined based on the current environment brightness, and the current environment brightness is obtained based on the exposure parameter of the original image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of camera technology, specifically relating to an exposure adjustment method, apparatus, electronic device, and readable storage medium. Background Technology

[0002] With the development of optical imaging technology, most electronic devices have the ability to take long-range photos. When the zoom ratio is large, digital cropping is often used to zoom. However, when the overall scene is complex, such as the presence of faces or point light sources, the exposure of the zoomed image often becomes abnormal, resulting in inaccurate exposure and poor image quality. Summary of the Invention

[0003] The purpose of this application is to provide an exposure adjustment method, apparatus, electronic device, and readable storage medium that can improve the exposure accuracy of images captured by the electronic device after zooming and ensure image quality.

[0004] In a first aspect, embodiments of this application provide an exposure adjustment method, the method comprising:

[0005] Acquire the original image and the target zoom level;

[0006] Determine the target image based on the target zoom level and the original image;

[0007] Determine the current brightness of the target image;

[0008] The target exposure parameters are obtained by adjusting the exposure parameters based on the target brightness and the current image brightness.

[0009] The target brightness is determined based on the current ambient brightness, which is obtained based on the exposure parameters of the original image.

[0010] Secondly, embodiments of this application provide an exposure adjustment device, the device comprising:

[0011] The acquisition module is used to acquire the original image and the target zoom level;

[0012] The cropping module is used to determine the target image based on the target zoom level and the original image;

[0013] The determination module is used to determine the current brightness of the target image.

[0014] The adjustment module is used to adjust the exposure parameters based on the target brightness and the current screen brightness to obtain the target exposure parameters;

[0015] The target brightness is determined based on the current ambient brightness, which is obtained based on the exposure parameters of the original image.

[0016] 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.

[0017] 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.

[0018] 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.

[0019] 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.

[0020] In this embodiment, a target image is determined by the target zoom ratio and the original image; the current brightness of the target image is determined; and exposure parameters are adjusted based on the target brightness and the current brightness to obtain target exposure parameters. The target brightness is determined based on the current ambient brightness, which is obtained based on the exposure parameters of the original image. Thus, the adjustment of exposure parameters is based on the current brightness of the cropped zoomed target image, effectively reducing the error between the brightness information of the original image and the zoomed image in zoom scenes. This makes the basis for exposure adjustment more reasonable and reliable, thereby improving the exposure accuracy of images captured by electronic devices after zooming and ensuring image quality. Attached Figure Description

[0021] Figure 1 This is a flowchart illustrating the exposure adjustment method provided in an embodiment of this application;

[0022] Figure 2 This is a schematic diagram of cropping the target image in the exposure adjustment method provided in the embodiments of this application;

[0023] Figure 3 This is a schematic diagram of the target image region division in the exposure adjustment method provided in the embodiments of this application;

[0024] Figure 4 This is a schematic diagram of the center-weighted metering mode in the exposure adjustment method provided in the embodiments of this application;

[0025] Figure 5 This is a schematic diagram of the spot metering mode in the exposure adjustment method provided in the embodiments of this application;

[0026] Figure 6 This is a schematic flowchart of a scenario embodiment of the exposure adjustment method provided in this application;

[0027] Figure 7 This is a schematic diagram of the exposure adjustment device provided in the embodiments of this application;

[0028] Figure 8 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application;

[0029] Figure 9 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0030] 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.

[0031] 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 terms can be used interchangeably 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.

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

[0033] Figure 1 This is a schematic flowchart of the exposure adjustment method provided in an embodiment of this application. The exposure adjustment method may include the following steps:

[0034] Step 101: Obtain the original image and the target zoom level.

[0035] In step 101, the original image is a RAW domain image, and its resolution is determined by the parameters of the image sensor itself. A preview image corresponding to the original image can be displayed on the image capture interface, and the size of the entire original image frame can be denoted as X*Y based on the resolution of the output original image.

[0036] The target zoom ratio can be the number of times the image needs to be zoomed in, selected by the user. It can be obtained based on the user's zoom operation or it can be the target zoom ratio automatically set by the electronic device system.

[0037] Step 102: Determine the target image based on the target zoom ratio and the original image.

[0038] In step 102, as Figure 2 As shown, if the target zoom ratio is n, then a target image 202 of size x*y can be extracted from the original image 201 of size X*Y according to the target zoom ratio n, where x = X / n and y = Y / n.

[0039] Step 103: Determine the current brightness of the target image.

[0040] In step 103, the brightness values ​​of each region in the target image can be statistically analyzed. Based on the brightness values ​​obtained from the target image, the overall current brightness of the target image can be calculated using metering modes such as center-weighted metering mode and spot metering mode.

[0041] Step 104: Adjust the exposure parameters based on the target brightness and the current image brightness to obtain the target exposure parameters. The target brightness is determined based on the current ambient brightness, which is obtained based on the exposure parameters of the original image.

[0042] In step 104, the target brightness can be the desired image brightness to be achieved during zooming to ensure image quality. The target brightness can be preset or matched to the current ambient brightness. It is understood that the current ambient brightness can be obtained from a light sensor in the electronic device or calculated based on the exposure parameters corresponding to the original image.

[0043] In this embodiment, the target brightness can be determined based on the current ambient brightness, which can be obtained based on the exposure parameters of the original image.

[0044] The brightness of the target image can be compared with the brightness of the current image to determine whether the brightness of the current image is equal to the target brightness. If there is a difference between the target brightness and the current image brightness, the exposure parameters, including shutter speed, gain, and aperture, can be adjusted to make the adjusted image brightness consistent with the target brightness. At this time, the image quality after zooming is better.

[0045] In this embodiment, the exposure adjustment method acquires the original image and the target zoom ratio; determines the target image based on the target zoom ratio and the original image; determines the current brightness of the target image; and adjusts the exposure parameters based on the target brightness and the current brightness to obtain the target exposure parameters. The target brightness is determined based on the current ambient brightness, which is obtained based on the exposure parameters of the original image. Thus, the adjustment of the exposure parameters is based on the current brightness of the cropped zoomed target image, effectively reducing the error between the brightness information of the original image and the zoomed image in zoom scenes. This makes the basis for exposure adjustment more reasonable and reliable, thereby improving the exposure accuracy of images captured by electronic devices after zooming and ensuring image quality.

[0046] In some embodiments, step 103 above may include the following steps:

[0047] The target image is divided into N regions, where N is an integer greater than 1;

[0048] Calculate the brightness value for each area;

[0049] Based on the brightness values ​​of N regions, the target metering mode is determined. The target metering mode includes center-weighted metering mode or spot metering mode.

[0050] The current brightness of the target image is determined based on the target metering mode and the brightness values ​​of N regions.

[0051] In this embodiment, as Figure 3 As shown, the target image can be divided into N regions, such as W*H regions. It can be understood that since the size of the target image remains unchanged, W*H equals x*y.

[0052] The brightness value L in each region can be calculated. The brightness value L of each region is calculated from the R, G, and B values ​​of the image corresponding to each region, where L = R*0.2988 + G*0.5869 + B*0.1137.

[0053] The target metering mode can be determined based on the brightness values ​​of N regions. It's understandable that commonly used metering modes include center-weighted metering, spot metering, etc., and a suitable target metering mode can be selected according to pre-defined metering rules. For example, the default target metering mode is center-weighted metering; if there are overexposed areas in the target image, then spot metering will be used as the target metering mode.

[0054] The current brightness of a target image can be determined based on the target metering mode and the brightness values ​​of N regions. For example, the current brightness of the target image can be calculated by performing calculations on the weight values ​​of each region corresponding to the target metering mode and the brightness values ​​of the N regions.

[0055] In this way, the current brightness of the target image can be determined based on the brightness values ​​of each region in the target image. This reduces the error between the brightness information of the original image and the brightness information of the zoomed image in zoom scenes, allowing the exposure adjustment to be based on the current brightness of the target image more reasonably and reliably. This improves the exposure accuracy of images taken by electronic devices after zooming and ensures image quality.

[0056] In some embodiments, determining the target metering mode based on the brightness values ​​of N regions may include the following steps:

[0057] When the brightness values ​​of N regions are all less than or equal to the overexposure threshold, the target metering mode is determined to be center-weighted metering mode;

[0058] If at least one of the N regions has a brightness value greater than the overexposure threshold, the target metering mode is determined to be spot metering mode.

[0059] In this embodiment, the brightness value of each region can be compared with an overexposure threshold to determine whether there are overexposed points in the target image. The overexposure threshold can be set based on actual needs and is not specifically limited here. For example, the normalized brightness value range can be 0 to 255, and the overexposure threshold can be 200 to 230. If 220 can be set as the overexposure threshold, then if a region has a brightness value greater than 220, it is an overexposed region.

[0060] If the brightness values ​​of all N regions are less than or equal to the overexposure threshold, it can be assumed that there are no overexposed areas in the target image. In this case, the center-weighted metering mode can be used to determine the target metering mode, that is, the center-weighted metering mode can be used to calculate the current brightness of the target image.

[0061] If at least one of the brightness values ​​in N regions is greater than the overexposure threshold, then the target image is considered to have an overexposed area. In this case, the spot metering mode can be used to determine the target metering mode, meaning that the spot metering mode can be used to calculate the current brightness of the target image.

[0062] In this way, a more suitable target metering mode can be selected based on the overexposure of the target image, so as to obtain the current brightness of the target image more accurately, thereby improving the exposure accuracy of the image taken by the subsequent electronic device after zooming and effectively ensuring the image quality.

[0063] In some embodiments, when the target metering mode is center-weighted metering mode, determining the current image brightness of the target image based on the target metering mode and the brightness values ​​of N regions may include the following steps:

[0064] Divide the N regions into a central region and an edge region. The central region consists of P regions, and the edge region consists of Q regions. The sum of P and Q is N, and both P and Q are positive integers.

[0065] The current brightness of the target image is determined based on the brightness values ​​of P regions, the first weighting coefficient of the central region, the brightness values ​​of Q regions, and the second weighting coefficient of the edge regions.

[0066] Among them, the first weight coefficient is greater than the second weight coefficient.

[0067] In this embodiment, the target metering mode can be center-weighted metering mode. When calculating the current brightness of the target image using center-weighted metering mode, such as... Figure 4 As shown, the N regions can be divided into a central region 401 and an edge region 402. The central region can include P regions, and the edge region can include Q regions other than the P regions among the N regions. It is understandable that the first weighting coefficient α1 of the central region is much larger than the second weighting coefficient α2 of the edge region.

[0068] Generally, the weight unit value can be set to 1, that is, 1 means the weight is unchanged. Then the first weight coefficient α1 of the central region is greater than 1, and can be set to 1.3 to 1.7, such as 1.5. The second weight coefficient α2 of the edge region is less than 1, and can be set to 0.3 to 0.7, such as 0.5.

[0069] The current image brightness of the target image can be determined based on the brightness values ​​of P regions, the first weighting coefficient of the central region, the brightness values ​​of Q regions, and the second weighting coefficient of the edge regions. For example, the formula for calculating the current image brightness Luma of the target image can be shown in formula (1):

[0070]

[0071] Where Luma is the current image brightness, α1 is the first weighting coefficient of the central region, α2 is the second weighting coefficient of the edge region, and W*H is the total number of regions in the target image, which is N.

[0072] In this way, when the target metering mode is center-weighted metering mode, a more accurate current image brightness can be calculated by combining the brightness values ​​of each area in the central region and the first weighting coefficient, as well as the brightness values ​​of each area in the edge region and the second weighting coefficient.

[0073] In some embodiments, when the target metering mode is spot metering, determining the current image brightness of the target image based on the target metering mode and the brightness values ​​of N regions may include the following steps:

[0074] The N regions are divided into overexposed regions and non-overexposed regions. The overexposed regions are the regions with the highest brightness values, and the non-overexposed regions are the other regions in the N regions excluding the overexposed regions.

[0075] The current image brightness of the target image is determined based on the brightness values ​​of the overexposed areas, the third weighting coefficient of the overexposed areas, the brightness values ​​of the non-overexposed areas, and the fourth weighting coefficient of the non-overexposed areas.

[0076] Among them, the third weight coefficient is greater than the fourth weight coefficient.

[0077] In this embodiment, the target metering mode can be spot metering. When calculating the current brightness of the target image using spot metering, such as... Figure 5 As shown, the region with the highest brightness value among the N regions can be designated as overexposed region 501, and the other regions besides overexposed region 501 can be designated as non-overexposed region 502. It is understandable that the third weighting coefficient α3 for overexposed regions is much larger than the fourth weighting coefficient α4 for non-overexposed regions.

[0078] Generally, the weight unit value can be set to 1, that is, 1 means the weight is unchanged. Then the third weight coefficient α3 of the overexposed area is greater than 1, and can be set to 1.3 to 1.7, such as 1.5. The fourth weight coefficient α4 of the non-overexposed area is less than 1, and can be set to 0.3 to 0.7, such as 0.5.

[0079] The current image brightness of the target image is determined based on the brightness values ​​of the overexposed areas, the third weighting coefficient of the overexposed areas, the brightness values ​​of the non-overexposed areas, and the fourth weighting coefficient of the non-overexposed areas. For example, the formula for calculating the current image brightness Luma of the target image can be shown in formula (2):

[0080]

[0081] Where Luma is the current image brightness, α3 is the third weighting coefficient for overexposed areas, α4 is the fourth weighting coefficient for non-overexposed areas, and W*H is the total number of regions in the target image, which is N.

[0082] In this way, when the target metering mode is spot metering, a more accurate current image brightness can be calculated by combining the brightness values ​​of the overexposed areas and the third weighting coefficient, as well as the brightness values ​​of the non-overexposed areas and the fourth weighting coefficient.

[0083] In some embodiments, step 104 above may include the following steps:

[0084] The absolute value of the difference between the target brightness and the current screen brightness is defined as the difference value between the target brightness and the current screen brightness.

[0085] The ratio of the difference value to the target zoom ratio is determined as the target step size;

[0086] The target exposure parameters are obtained by adjusting the exposure parameters based on the target step size.

[0087] In this embodiment, the target brightness can be compared with the current screen brightness. If the two are inconsistent, the difference between the target brightness and the current screen brightness can be calculated. That is, the difference is the absolute value of the difference between the target brightness and the current screen brightness, denoted as Δ=|Target-Luma|, where Δ is the difference value, Target is the target brightness, and Luma is the current screen brightness.

[0088] The ratio of the difference value to the target zoom ratio can be determined as the target step size for adjusting the exposure parameters. That is, the target step size is Δ / n, where n represents the target zoom ratio. The exposure parameters can be adjusted based on the target step size. For example, if n is 3, it can be adjusted in 3 frames, with the exposure parameters adjusted successively to Luma ± 1 / 3 * Δ, until Luma = Target, thus obtaining the target exposure parameters.

[0089] In this way, when adjusting the exposure, the target zoom ratio can be taken into account. The current image brightness is assigned a superimposed difference value to the target zoom ratio frame by frame to approximate the target brightness for adjustment. This makes the exposure adjustment smoother and more precise, thereby further improving the exposure accuracy of the zoomed image and ensuring image quality.

[0090] In some embodiments, the number of exposure parameters is M, and the M exposure parameters are adjusted in a preset adjustment order, where M is an integer greater than or equal to 1. Adjusting the exposure parameters based on the target step size may include the following steps:

[0091] Based on the target step size, adjust the i-th exposure parameter, where i is greater than 0 and less than or equal to M;

[0092] If the adjusted difference value is 0, the adjustment of the i-th exposure parameter ends;

[0093] If the adjusted value of the i-th exposure parameter is equal to the threshold corresponding to the i-th exposure parameter, and the difference after adjustment is still not 0, adjust the (i+1)-th exposure parameter until the difference after adjustment is 0.

[0094] In this embodiment, exposure parameters may include shutter speed, gain, aperture, etc. When adjusting these exposure parameters, multiple exposure parameters can be adjusted one by one according to a preset adjustment order based on the user's settings.

[0095] For example, let's take the preset adjustment sequence as aperture, shutter speed, and gain. Based on the target step size, we can first adjust the aperture so that the adjusted current image brightness approaches the target brightness, i.e., the difference value approaches 0. If, during the aperture adjustment process, Target = Luma (i.e., the difference value is 0), then the exposure parameters remain stable, and the exposure adjustment ends. If the parameter value after aperture adjustment equals its corresponding adjustable threshold, for example, if the aperture's adjustable range is 0-50, then its corresponding threshold is 0 or 50. If the aperture has been adjusted to 0 or 50, but the current image brightness still differs from the target brightness, i.e., the adjusted difference value is still not 0, or is still not within a small difference range, then we can sequentially adjust the shutter speed and gain until the adjusted current image brightness matches the target brightness, i.e., the difference value is 0, or is within a small difference range. The adjustment principles for shutter speed and gain are roughly the same as those for aperture adjustment, and will not be elaborated here.

[0096] In this way, the exposure can be adjusted sequentially according to the preset adjustment order of the M exposure parameters until the current image brightness matches the target brightness. This improves the flexibility and accuracy of exposure adjustment, thereby meeting the diverse needs of users and making the image quality better after zooming.

[0097] In some embodiments, obtaining the target brightness may include the following steps:

[0098] Obtain the initial exposure parameters corresponding to the original image;

[0099] Determine the current ambient brightness based on the initial exposure parameters;

[0100] Based on the preset correspondence between the current ambient brightness and the screen brightness, the target brightness corresponding to the current ambient brightness is determined.

[0101] In this embodiment, the initial exposure parameters corresponding to the original image can be obtained. The initial exposure parameters may include the target brightness reference, the current exposure of the electronic device, and the minimum exposure of the electronic device. The current exposure of the electronic device includes the current aperture, the current shutter speed, and the current gain. The minimum exposure of the electronic device includes the minimum aperture, the minimum shutter speed, and the minimum gain.

[0102] The current ambient brightness can be determined based on the initial exposure parameters. For example, the formula for calculating the current ambient brightness Explux can be shown in formula (3):

[0103]

[0104] Where ExpLux is the current ambient brightness, and TargetBase is the target brightness reference, which is a manually set constant, for example, 55 EV. current The current exposure of the electronic device, where current exposure = current aperture * current shutter speed * current gain, EV. min Luma represents the minimum exposure for an electronic device, where minimum exposure = minimum aperture * minimum shutter speed * minimum gain. avg This represents the average brightness of the original image.

[0105] After obtaining the current ambient brightness, the desired target brightness (Target) can be selected. The Target brightness range can be set from 0 to 255. A lookup table can be used to pre-set the corresponding screen brightness for each ambient brightness level (ExpLux), thus determining the target brightness that matches the current ambient brightness. The preset correspondence between ambient brightness and screen brightness can be as follows: ambient brightness of 1-100 Lux corresponds to a screen brightness of 52; ambient brightness of 200-400 Lux corresponds to a screen brightness of 50; ambient brightness above 400 Lux corresponds to a screen brightness of 45, and so on. Since image sensor quality deteriorates in darker environments, the strategy is to set the Target brightness lower as the environment darker, resulting in a better image quality.

[0106] In this way, the current ambient brightness can be determined based on the initial exposure parameters corresponding to the original image, and then a target brightness that better meets the environmental requirements can be matched based on the current ambient brightness, further improving the imaging quality of the zoomed image.

[0107] To facilitate understanding of the exposure adjustment method provided in the above embodiments, the following describes the exposure adjustment method using a specific scenario embodiment. Figure 6 This is a schematic flowchart of a scenario embodiment of the exposure adjustment method provided in this application.

[0108] This scenario implementation example may specifically include the following steps:

[0109] Step 601: Obtain the original image.

[0110] Step 602: Extract the target image from the original image based on the target zoom ratio.

[0111] Step 603: Divide the target image into regions and count the brightness values ​​of each region.

[0112] Step 604: Select the metering mode and calculate the current brightness of the target image.

[0113] Step 605: Determine the target brightness, and based on the absolute value of the difference between the target brightness and the current screen brightness, add the target zoom ratio, and use the ratio of the absolute value to the target zoom ratio as the target step size.

[0114] Step 606: Adjust the exposure parameters based on the target step size until the adjusted current image brightness matches the target brightness.

[0115] In this scenario embodiment, the exposure parameters are adjusted based on the current brightness of the captured zoomed target image, making the basis for exposure adjustment more reasonable and reliable. At the same time, when adjusting the exposure parameters, the adjustment step size takes into account the target zoom ratio, making the exposure adjustment more precise. This improves the exposure accuracy of the images captured by the electronic device after zooming and ensures the image quality.

[0116] The exposure adjustment method provided in this application can be executed by an exposure adjustment device. This application uses an exposure adjustment device to perform the exposure method as an example to illustrate the exposure adjustment device provided in this application.

[0117] like Figure 7 As shown, the exposure adjustment device 700 may include:

[0118] The acquisition module 701 is used to acquire the original image and the target zoom ratio;

[0119] The cropping module 702 is used to determine the target image based on the target zoom ratio and the original image;

[0120] The determination module 703 is used to determine the current screen brightness of the target image;

[0121] The adjustment module 704 is used to adjust the exposure parameters based on the target brightness and the current image brightness to obtain the target exposure parameters. The target brightness is determined based on the current ambient brightness, which is obtained based on the exposure parameters of the original image.

[0122] In this way, the adjustment of exposure parameters is based on the current brightness of the target image after zooming, which effectively reduces the error between the brightness information of the original image and the image after zooming in the zooming scene. This makes the basis for exposure adjustment more reasonable and reliable, thereby improving the exposure accuracy of the image taken by the electronic device after zooming and ensuring the image quality.

[0123] In some embodiments, the determining module 703 can also be used for:

[0124] The target image is divided into N regions, where N is an integer greater than 1;

[0125] Calculate the brightness value for each area;

[0126] Based on the brightness values ​​of N regions, the target metering mode is determined. The target metering mode includes center-weighted metering mode or spot metering mode.

[0127] The current brightness of the target image is determined based on the target metering mode and the brightness values ​​of N regions.

[0128] In this way, the current brightness of the target image can be determined based on the brightness values ​​of each region in the target image. This reduces the error between the brightness information of the original image and the brightness information of the zoomed image in zoom scenes, allowing the exposure adjustment to be based on the current brightness of the target image more reasonably and reliably. This improves the exposure accuracy of images taken by electronic devices after zooming and ensures image quality.

[0129] In some embodiments, the determining module 703 can also be used for:

[0130] When the brightness values ​​of N regions are all less than or equal to the overexposure threshold, the target metering mode is determined to be center-weighted metering mode;

[0131] If at least one of the N regions has a brightness value greater than the overexposure threshold, the target metering mode is determined to be spot metering mode.

[0132] In this way, a more suitable target metering mode can be selected based on the overexposure of the target image, so as to obtain the current brightness of the target image more accurately, thereby improving the exposure accuracy of the image taken by the subsequent electronic device after zooming and effectively ensuring the image quality.

[0133] In some embodiments, when the target metering mode is center-weighted metering mode, the determining module 703 can also be used for:

[0134] Divide the N regions into a central region and an edge region. The central region consists of P regions, and the edge region consists of Q regions. The sum of P and Q is N, and both P and Q are positive integers.

[0135] The current brightness of the target image is determined based on the brightness values ​​of P regions, the first weighting coefficient of the central region, the brightness values ​​of Q regions, and the second weighting coefficient of the edge regions.

[0136] Among them, the first weight coefficient is greater than the second weight coefficient.

[0137] In this way, when the target metering mode is center-weighted metering mode, a more accurate current image brightness can be calculated by combining the brightness value of the central area and the first weighting coefficient, as well as the brightness value of the edge area and the second weighting coefficient.

[0138] In some embodiments, when the target metering mode is spot metering mode, the determining module 703 can also be used for:

[0139] The N regions are divided into overexposed regions and non-overexposed regions. The overexposed regions are the regions with the highest brightness values, and the non-overexposed regions are the other regions in the N regions excluding the overexposed regions.

[0140] The current image brightness of the target image is determined based on the brightness values ​​of the overexposed areas, the third weighting coefficient of the overexposed areas, the brightness values ​​of the non-overexposed areas, and the fourth weighting coefficient of the non-overexposed areas.

[0141] Among them, the third weight coefficient is greater than the fourth weight coefficient.

[0142] In this way, when the target metering mode is spot metering, a more accurate current image brightness can be calculated by combining the brightness values ​​of the overexposed areas and the third weighting coefficient, as well as the brightness values ​​of the non-overexposed areas and the fourth weighting coefficient.

[0143] In some embodiments, the adjustment module 704 can also be used for:

[0144] The absolute value of the difference between the target brightness and the current screen brightness is defined as the difference value between the target brightness and the current screen brightness.

[0145] The ratio of the difference value to the target zoom ratio is determined as the target step size;

[0146] The target exposure parameters are obtained by adjusting the exposure parameters based on the target step size.

[0147] In this way, when adjusting the exposure, the target zoom ratio can be taken into account. The current image brightness is assigned a superimposed difference value to the target zoom ratio frame by frame to approximate the target brightness for adjustment. This makes the exposure adjustment smoother and more precise, thereby further improving the exposure accuracy of the zoomed image and ensuring image quality.

[0148] In some embodiments, the acquisition module 701 can also be used for:

[0149] Obtain the initial exposure parameters corresponding to the original image;

[0150] Determine the current ambient brightness based on the initial exposure parameters;

[0151] Based on the preset correspondence between the current ambient brightness and the screen brightness, a target brightness corresponding to the current ambient brightness is obtained.

[0152] In this way, the current ambient brightness can be determined based on the initial exposure parameters corresponding to the original image, and then a target brightness that better meets the environmental requirements can be matched based on the current ambient brightness, further improving the imaging quality of the zoomed image.

[0153] The exposure adjustment 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 (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the device.

[0154] The exposure adjustment 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.

[0155] The exposure adjustment device provided in this application embodiment can achieve... Figures 1 to 6 The various processes implemented in the method embodiments achieve the same technical effect, and will not be described again here to avoid repetition.

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

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

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

[0159] The electronic device 900 includes, but is not limited to, components such as: radio frequency unit 901, network module 902, audio output unit 903, input unit 904, sensor 905, display unit 906, user input unit 907, interface unit 908, memory 909, and processor 910.

[0160] Those skilled in the art will understand that the electronic device 900 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 910 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 9 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.

[0161] The processor 910 can be used for:

[0162] Acquire the original image and the target zoom level;

[0163] Determine the target image based on the target zoom level and the original image;

[0164] Determine the current brightness of the target image;

[0165] The exposure parameters are adjusted based on the target brightness and the current ambient brightness to obtain the target exposure parameters. The target brightness is determined based on the current ambient brightness, which is obtained based on the exposure parameters of the original image.

[0166] In this way, the adjustment of exposure parameters is based on the current brightness of the target image after zooming, which effectively reduces the error between the brightness information of the original image and the image after zooming in the zooming scene. This makes the basis for exposure adjustment more reasonable and reliable, thereby improving the exposure accuracy of the image taken by the electronic device after zooming and ensuring the image quality.

[0167] In some embodiments, the processor 910 can also be used for:

[0168] The target image is divided into N regions, where N is an integer greater than 1;

[0169] Calculate the brightness value for each area;

[0170] Based on the brightness values ​​of N regions, the target metering mode is determined. The target metering mode includes center-weighted metering mode or spot metering mode.

[0171] The current brightness of the target image is determined based on the target metering mode and the brightness values ​​of N regions.

[0172] In this way, the current brightness of the target image can be determined based on the brightness values ​​of each region in the target image. This reduces the error between the brightness information of the original image and the brightness information of the zoomed image in zoom scenes, allowing the exposure adjustment to be based on the current brightness of the target image more reasonably and reliably. This improves the exposure accuracy of images taken by electronic devices after zooming and ensures image quality.

[0173] In some embodiments, the processor 910 can also be used for:

[0174] When the brightness values ​​of N regions are all less than or equal to the overexposure threshold, the target metering mode is determined to be center-weighted metering mode;

[0175] If at least one of the N regions has a brightness value greater than the overexposure threshold, the target metering mode is determined to be spot metering mode.

[0176] In this way, a more suitable target metering mode can be selected based on the overexposure of the target image, so as to obtain the current brightness of the target image more accurately, thereby improving the exposure accuracy of the image taken by the subsequent electronic device after zooming and effectively ensuring the image quality.

[0177] In some embodiments, when the target metering mode is center-weighted metering mode, the processor 910 can also be used for:

[0178] Divide the N regions into a central region and an edge region. The central region consists of P regions, and the edge region consists of Q regions. The sum of P and Q is N, and both P and Q are positive integers.

[0179] The current brightness of the target image is determined based on the brightness values ​​of P regions, the first weighting coefficient of the central region, the brightness values ​​of Q regions, and the second weighting coefficient of the edge regions.

[0180] Among them, the first weight coefficient is greater than the second weight coefficient.

[0181] In this way, when the target metering mode is center-weighted metering mode, a more accurate current image brightness can be calculated by combining the brightness value of the central area and the first weighting coefficient, as well as the brightness value of the edge area and the second weighting coefficient.

[0182] In some embodiments, when the target metering mode is spot metering, the processor 910 can also be used for:

[0183] The N regions are classified into overexposed regions and non-overexposed regions, where the overexposed regions are the regions with the highest brightness values, and the non-overexposed regions are the other regions among the N regions excluding the overexposed regions.

[0184] The current image brightness of the target image is determined based on the brightness values ​​of the overexposed areas, the third weighting coefficient of the overexposed areas, the brightness values ​​of the non-overexposed areas, and the fourth weighting coefficient of the non-overexposed areas.

[0185] Among them, the third weight coefficient is greater than the fourth weight coefficient.

[0186] In this way, when the target metering mode is spot metering, a more accurate current image brightness can be calculated by combining the brightness values ​​of the overexposed areas and the third weighting coefficient, as well as the brightness values ​​of the non-overexposed areas and the fourth weighting coefficient.

[0187] In some embodiments, the processor 910 can also be used for:

[0188] The absolute value of the difference between the target brightness and the current screen brightness is defined as the difference value between the target brightness and the current screen brightness.

[0189] The ratio of the difference value to the target zoom ratio is determined as the target step size;

[0190] The target exposure parameters are obtained by adjusting the exposure parameters based on the target step size.

[0191] In this way, when adjusting the exposure, the target zoom ratio can be taken into account. The current image brightness is assigned a superimposed difference value to the target zoom ratio frame by frame to approximate the target brightness for adjustment. This makes the exposure adjustment smoother and more precise, thereby further improving the exposure accuracy of the zoomed image and ensuring image quality.

[0192] In some embodiments, the processor 910 can also be used for:

[0193] Obtain the initial exposure parameters corresponding to the original image;

[0194] Determine the current ambient brightness based on the initial exposure parameters;

[0195] Based on the preset correspondence between the current ambient brightness and the screen brightness, a target brightness corresponding to the current ambient brightness is obtained.

[0196] In this way, the current ambient brightness can be determined based on the initial exposure parameters corresponding to the original image, and then a target brightness that better meets the environmental requirements can be matched based on the current ambient brightness, further improving the imaging quality of the zoomed image.

[0197] It should be understood that, in this embodiment, the input unit 904 may include a graphics processing unit (GPU) 9041 and a microphone 9042. The GPU 9041 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 906 may include a display panel 9061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 907 includes at least one of a touch panel 9071 and other input devices 9072. The touch panel 9071 is also called a touch screen. The touch panel 9071 may include a touch detection device and a touch controller. Other input devices 9072 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.

[0198] The memory 909 can be used to store software programs and various data. The memory 909 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 909 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 909 in the embodiments of this application includes, but is not limited to, these and any other suitable types of memory.

[0199] Processor 910 may include one or more processing units; optionally, processor 910 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 processor 910.

[0200] 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 exposure adjustment method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0201] 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.

[0202] 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 exposure adjustment method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0203] 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.

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

[0205] 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.

[0206] 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.

[0207] 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 exposure adjustment method, characterized in that, The method includes: Acquire the original image and the target zoom level; The target image is determined based on the target zoom ratio and the original image; Determine the current screen brightness of the target image; The exposure parameters are adjusted based on the target brightness and the current screen brightness to obtain the target exposure parameters; The target brightness is determined based on the current ambient brightness, which is obtained based on the exposure parameters of the original image. The process of adjusting the exposure parameters based on the target brightness and the current image brightness to obtain the target exposure parameters includes: The absolute value of the difference between the target brightness and the current screen brightness is determined as the difference value between the target brightness and the current screen brightness; The ratio of the difference value to the target zoom ratio is determined as the target step size; The exposure parameters are adjusted based on the target step size to obtain the target exposure parameters.

2. The method according to claim 1, characterized in that, Determining the current screen brightness of the target image includes: The target image is divided into N regions, where N is an integer greater than 1; Calculate the brightness value for each area; Based on the brightness values ​​of the N regions, the target metering mode is determined, including center-weighted metering mode or spot metering mode; The current brightness of the target image is determined based on the target metering mode and the brightness values ​​of the N regions.

3. The method according to claim 2, characterized in that, Determining the target metering mode based on the brightness values ​​of the N regions includes: If the brightness values ​​of all N regions are less than or equal to the overexposure threshold, the target metering mode is determined to be center-weighted metering mode. If at least one of the N regions has a brightness value greater than the overexposure threshold, the target metering mode is determined to be spot metering mode.

4. The method according to claim 3, characterized in that, When the target metering mode is the center-weighted metering mode, determining the current image brightness of the target image based on the target metering mode and the brightness values ​​of the N regions includes: The N regions are divided into a central region and an edge region, wherein the central region includes P regions and the edge region includes Q regions, the sum of P and Q is N, and P and Q are both positive integers; The current image brightness of the target image is determined based on the brightness values ​​of the P regions, the first weighting coefficient of the central region, the brightness values ​​of the Q regions, and the second weighting coefficient of the edge regions. Wherein, the first weighting coefficient is greater than the second weighting coefficient.

5. The method according to claim 3, characterized in that, When the target metering mode is the spot metering mode, determining the current image brightness of the target image based on the target metering mode and the brightness values ​​of the N regions includes: The N regions are divided into overexposed regions and non-overexposed regions, wherein the overexposed regions are the regions with the highest brightness values, and the non-overexposed regions are the other regions in the N regions excluding the overexposed regions. The current image brightness of the target image is determined based on the brightness value of the overexposed area, the third weighting coefficient of the overexposed area, the brightness value of the non-overexposed area, and the fourth weighting coefficient of the non-overexposed area. The third weighting coefficient is greater than the fourth weighting coefficient.

6. The method according to any one of claims 1 to 5, characterized in that, Before adjusting the exposure parameters based on the target brightness and the current image brightness, the method further includes: Obtain the initial exposure parameters corresponding to the original image; Determine the current ambient brightness based on the initial exposure parameters; Based on the correspondence between the current ambient brightness and the screen brightness, the target brightness corresponding to the current ambient brightness is determined.

7. An exposure adjustment device, characterized in that, The device includes: The acquisition module is used to acquire the original image and the target zoom level; The cropping module is used to determine the target image based on the target zoom ratio and the original image; A determining module is used to determine the current screen brightness of the target image; The adjustment module is used to adjust the exposure parameters based on the target brightness and the current screen brightness to obtain the target exposure parameters; The target brightness is determined based on the current ambient brightness, which is obtained based on the exposure parameters of the original image. The adjustment module is specifically used to: determine the absolute value of the difference between the target brightness and the current image brightness as the difference value between the target brightness and the current image brightness; determine the ratio of the difference value to the target zoom ratio as the target step size; and adjust the exposure parameters based on the target step size to obtain the target exposure parameters.

8. 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 method as described in any one of claims 1-6.

9. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the method as described in any one of claims 1-6.