Shooting method, storage medium, electronic equipment and program product

By capturing images at different magnifications using a telephoto camera, and adjusting the brightness of the high-magnification image using the brightness value of the low-magnification image, the problem of inconsistent brightness of electronic devices at different magnifications is solved, achieving the effects of brightness consistency and reduced power consumption.

CN121985205APending Publication Date: 2026-05-05HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HONOR DEVICE CO LTD
Filing Date
2024-10-25
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

When electronic devices shoot at different magnifications, the display brightness of low-magnification and high-magnification images differs significantly, resulting in inconsistent image brightness. Furthermore, keeping the main camera on during high-magnification shooting increases power consumption.

Method used

Images are captured at different magnifications using a telephoto camera. The brightness of the high-magnification image is adjusted using the brightness value of the low-magnification image to ensure brightness consistency and avoid overexposure or underexposure in high-contrast scenes. Adjustments are made using only the telephoto camera.

Benefits of technology

When shooting at different magnifications, maintain consistent image brightness, reduce device power consumption, avoid overexposure or underexposure, and improve image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121985205A_ABST
    Figure CN121985205A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, and discloses a shooting method, a storage medium, electronic equipment and a program product. Acquiring a high-magnification image of the telephoto camera corresponding to the current magnification and a low-magnification image of the telephoto camera corresponding to a smaller magnification smaller than the current magnification; moreover, when the shooting scene is a low-contrast scene, the image brightness of the low-magnification image is used as a reference to adjust the image brightness of the high-magnification image, and it is ensured that the image brightness difference is small in the process that the electronic equipment switches different magnifications to shoot the same shooting scene; and when the shooting scene is a high-contrast scene, the image brightness of the high-magnification image is adjusted by taking the image brightness of the high-magnification image as a reference, so that the phenomenon of overexposure or underexposure of the high-magnification image is avoided. Therefore, the electronic equipment can adjust the high-magnification image only through the long-focus camera, the main camera does not need to be normally opened, and the power consumption is relatively low.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a shooting method, storage medium, electronic device, and program product. Background Technology

[0002] Mobile phones and other electronic devices are typically equipped with different cameras, such as wide-angle cameras, main cameras, and telephoto cameras. These cameras usually have different focal lengths, resulting in different magnification ratios (hereinafter referred to as magnification), and different magnification ratios correspond to different fields of view (FOV). For example, the longer the focal length, the greater the magnification, and the smaller the field of view. For instance, during shooting, an electronic device can use a lower magnification ratio with a large field of view to obtain a low-magnification image, or use a higher magnification ratio with a small field of view to obtain a high-magnification image.

[0003] However, when electronic devices capture the same scene at both low and high magnification, the resulting low-magnification and high-magnification images may have significantly different display brightness.

[0004] For example, in the same shooting scenario, when an electronic device shoots at a lower magnification, it usually adjusts the display brightness of the high-magnification image based on the field brightness corresponding to the large field of view; when the electronic device shoots at a higher magnification, it can only adjust the display brightness of the high-magnification image based on the field brightness corresponding to the small field of view; and since the field brightness corresponding to different field of view is different, the display brightness of low-magnification images and high-magnification images may have a large difference. Summary of the Invention

[0005] This invention provides a shooting method, a storage medium, an electronic device, and a program product.

[0006] In a first aspect, the present invention provides a shooting method applied to an electronic device, the method comprising: shooting at a first magnification; detecting a zoom shooting command, wherein the zoom shooting command adjusts the first magnification to a second magnification, the second magnification being greater than the first magnification; capturing a first image at the second magnification using a first camera, and capturing a second image at a third magnification using the first camera, wherein the third magnification is less than the second magnification, and the display content of the first image corresponds to the display content of a first region in the second image; determining a first brightness value of the first image and a second brightness value of the second image; adjusting the first brightness value of the first image to a third brightness value based on the difference between the first brightness value and the second brightness value; adjusting the brightness value of each pixel in the first image based on the third brightness value to obtain a third image; and displaying the third image.

[0007] In this embodiment of the invention, during the process of shooting with a telephoto camera (such as a first camera), the electronic device acquires a high-magnification image (such as a first image) corresponding to the current magnification of the telephoto camera and a low-magnification image (such as a second image) corresponding to a smaller magnification than the current magnification. Furthermore, when the shooting scene is a low-contrast scene, the brightness of the high-magnification image is adjusted using the brightness of the low-magnification image as a reference, ensuring minimal difference in image brightness when the electronic device switches between different magnifications to shoot the same scene. Conversely, when the shooting scene is a high-contrast scene, the brightness of the high-magnification image is adjusted using the brightness of the high-magnification image as a reference, preventing overexposure or underexposure of the high-magnification image. Thus, the electronic device can adjust the high-magnification image using only the telephoto camera, eliminating the need for the main camera to be constantly on, resulting in lower power consumption.

[0008] In one possible implementation of the first aspect described above, adjusting the first brightness value of the first image to a third brightness value based on the difference between the first brightness value and the second brightness value includes: determining a first difference between the first brightness value and the second brightness value; when the first difference is less than or equal to a preset first threshold, using the weighted sum of the first brightness value and the second brightness value as the third brightness value, wherein the weight of the first brightness value is less than the weight of the second brightness value, and the weight of the second brightness value is inversely proportional to the magnitude of the first difference; when the first difference is greater than the first threshold and the first brightness value is greater than the second brightness value, decreasing the first brightness value by the first brightness difference to obtain the third brightness value; when the first difference is greater than the first threshold and the first brightness value is less than the second brightness value, increasing the first brightness value by the second brightness difference to obtain the third brightness value.

[0009] In one possible implementation of the first aspect above, the method further includes: when the first brightness value is equal to the second brightness value, the third brightness value is equal to the second brightness value.

[0010] In one possible implementation of the first aspect described above, the second magnification is the minimum operating magnification of the first camera.

[0011] In one possible implementation of the first aspect described above, determining the first brightness value of the first image and the second brightness value of the second image includes: taking the average brightness value of each pixel in the first image as the first brightness value; and taking the average brightness value of each pixel in the second image as the second brightness value.

[0012] In one possible implementation of the first aspect above, adjusting the brightness values ​​of each pixel in the first image based on the third brightness value to obtain the third image includes: multiplying the brightness value of each pixel in the first image by a brightness ratio to obtain the third image, wherein the brightness ratio is the ratio of the third brightness value to the first brightness value.

[0013] In one possible implementation of the first aspect above, the method further includes: when shooting at the first magnification, the working camera of the electronic device is a second camera; upon detecting a zoom shooting command, the working camera of the electronic device switches from the second camera to the first camera, wherein the first camera and the second camera are different cameras.

[0014] In one possible implementation of the first aspect mentioned above, the first camera is a telephoto camera, and the second camera is a main camera.

[0015] In a second aspect, embodiments of the present invention provide a computer-readable storage medium storing instructions that, when executed on an electronic device, cause the electronic device to implement any of the shooting methods provided by the first aspect and various possible implementations of the first aspect.

[0016] Thirdly, embodiments of the present invention provide an electronic device comprising: a memory for storing instructions executed by one or more processors of the electronic device; and a processor, one of the processors of the electronic device, for executing the instructions stored in the memory to implement any of the shooting methods provided by the first aspect and various possible implementations of the first aspect.

[0017] Fourthly, embodiments of the present invention provide a program product that includes instructions that, when executed by an electronic device, enable the electronic device to implement any of the shooting methods provided by the first aspect and various possible implementations of the first aspect. Attached Figure Description

[0018] Figure 1 According to some embodiments of the present invention, an example schematic diagram of images 1001 and 1002 is shown;

[0019] Figure 2 According to some embodiments of the present invention, an example schematic diagram of a field of view is shown;

[0020] Figure 3 According to some embodiments of the present invention, a brightness adjustment flowchart is shown;

[0021] Figure 4 According to some embodiments of the present invention, an example schematic diagram of images 4001 and 4002 is shown;

[0022] Figure 5 According to some embodiments of the present invention, another brightness adjustment flowchart is shown;

[0023] Figure 6 According to some embodiments of the present invention, an example schematic diagram of a low-magnification statistical region and a high-magnification statistical region is shown;

[0024] Figure 7 According to some embodiments of the present invention, a flowchart for calculating weight values ​​is shown;

[0025] Figure 8 According to some embodiments of the present invention, a coordinate graph is shown;

[0026] Figure 9A According to some embodiments of the present invention, an example schematic diagram of images 91 and 92 is shown;

[0027] Figure 9B According to some embodiments of the present invention, an example schematic diagram of images 911 and 912 is shown;

[0028] Figure 10 According to some embodiments of the present invention, a flowchart of a shooting method is shown;

[0029] Figure 11 According to some embodiments of the present invention, an example schematic diagram of a shooting interface 11 is shown;

[0030] Figure 12 According to some embodiments of the present invention, an example schematic diagram of a zoom interface 12 is shown;

[0031] Figure 13 According to some embodiments of the present invention, an example schematic diagram of a shooting interface 13 is shown;

[0032] Figure 14 According to some embodiments of the present invention, a structural diagram of a mobile phone 10 is shown. Detailed Implementation

[0033] The illustrative embodiments of the present invention include, but are not limited to, a shooting method, a storage medium, an electronic device, and a program product.

[0034] The electronic devices described in this application include, but are not limited to: mobile phones, wearable devices, tablets, computers with wireless transceiver capabilities, virtual reality (VR) terminal devices, augmented reality (AR) terminal devices, wireless terminals in self-driving vehicles, wireless terminals in remote medical surgery, wireless terminals in smart cities, and any other terminal with image processing capabilities, or servers with image processing capabilities, etc., without any specific limitations.

[0035] In some embodiments, the electronic device typically includes a main camera, a telephoto camera, a wide-angle camera, etc. The magnification range of the wide-angle camera is typically greater than or equal to 0.5x and less than 1x, the magnification range of the main camera is typically greater than or equal to 1x and less than 2.5x, and the magnification range of the telephoto camera is typically greater than or equal to 2.5x. It is understood that the electronic device may also include more or fewer cameras, and each camera may have a larger or smaller magnification range; there is no specific limitation.

[0036] As previously shown, when an electronic device captures the same scene at both low and high magnification, the resulting low-magnification and high-magnification images may have significantly different display brightness.

[0037] For example, such as Figure 1 As shown, image 1001 is a high-magnification image taken by the electronic device through the main camera at 1x magnification, and image 1002 is a low-magnification image taken by the electronic device through the telephoto camera at 5x magnification. Images 1001 and 1002 correspond to the same shooting scene, and the display content of image 1002 is the display content of region 1001A in image 1001.

[0038] For example, the shooting scene corresponding to image 1001 and image 1002 is: landscape photo 1A is hung on background wall 1B.

[0039] Furthermore, combined Figure 1 and Figure 2 As shown, the positions of the electronic device and the telephoto camera are defined by their locations. When the electronic device captures an image at 1x magnification using the main camera, the field of view corresponding to 1x magnification is defined by the square area enclosed by box 21 (including the square area enclosed by box 22). That is, the field of view corresponding to image 1001 is defined by box 21. When the electronic device captures an image at 5x magnification using the telephoto camera, the field of view corresponding to 5x magnification is defined by the square area enclosed by box 22. That is, the field of view corresponding to image 1002 is defined by box 22. It can be understood that the field of view corresponding to image 1001 is greater than the field of view corresponding to image 1002.

[0040] The following combination Figure 1 and Figure 2 Examples are provided to illustrate embodiments of this application.

[0041] For example, in Figure 1 In the corresponding shooting scene, the average brightness value of the area corresponding to landscape photo 1A is lower than the average brightness value of the area corresponding to background wall 1B, that is, the area corresponding to landscape photo 1A is a dark area, and the area corresponding to background wall 1B is a bright area.

[0042] In some embodiments, when the electronic device takes a picture at 1x magnification using the main camera, it adjusts the display brightness of the low-magnification image based on the field brightness at the field of view corresponding to box 21. For example, the electronic device can obtain the average brightness value in the field of view at 1x magnification (including the dark area corresponding to landscape photo 1A and the bright area corresponding to background wall 1B), and adjust the display brightness of the low-magnification image based on the average brightness value. While reducing the display brightness of the bright area (background wall 1B), it increases the display brightness of the dark area (landscape photo 1A), ensuring that the low-magnification image can display more details in both dark and bright areas.

[0043] In some embodiments, when the electronic device takes a picture at 5x magnification using a telephoto camera, it adjusts the display brightness of the high-magnification image based on the field-of-view brightness at the field of view corresponding to box 22. For example, the electronic device can obtain the average brightness value in the field of view at 5x magnification (including only the dark area corresponding to part of the landscape photo 1A), and adjust the display brightness of the high-magnification image based on the average brightness value to increase the display brightness of the dark area (landscape photo 1A), so that the high-magnification image can display more details in the dark areas.

[0044] It is understandable that since images 1001 and 1002 correspond to shooting at different magnifications under the same shooting scene, the brightness of the same displayed content in images 1001 and 1002 should be consistent. For example, the brightness of image 1002 should be consistent with the brightness of region 1001A in image 1001A.

[0045] However, at 1x magnification, the brightness adjustment value is based on the average brightness of the dark and bright areas within the 1x magnification field of view. At 5x magnification, the brightness adjustment value is based on the average brightness of the dark areas within the 5x magnification field of view. Since the average brightness of the dark areas is typically lower than the average brightness of both the dark and bright areas, the brightness adjustment value at 5x magnification is greater than that at 1x magnification. In other words, compared to the lower magnification image at 1x magnification, the higher magnification image at 5x magnification will have a significantly increased display brightness. For example, as... Figure 1 As shown, the overall display brightness of image 1002 is higher than that of image 1001, and the display brightness of image 1002 is significantly higher than that of region 1001A in image 1001, with a large difference between the two.

[0046] It should be noted that the grayscale rendering effect shown in Image 1001 and the whitescale rendering effect shown in Image 1002 are only for demonstrating the difference in display brightness between different images in this application, and are not intended to limit the image colors of different images; for example, grayscale represents a lower brightness value, and whitescale represents a higher brightness value, etc.

[0047] In other embodiments, Figure 2In this context, if the average brightness of the area corresponding to landscape photo 1A is higher than the average brightness of the area corresponding to background wall 1B (i.e., the area corresponding to landscape photo 1A is a bright area and the area corresponding to background wall 1B is a dark area), then the display brightness of the high-magnification image corresponding to 5x magnification will be reduced to a greater extent compared to the low-magnification image corresponding to 1x magnification. In other words, the overall display brightness of image 1002 is lower than the overall display brightness of image 1001, and the display brightness of image 1002 is lower than the display brightness of area 1001A within image 1001. For a detailed explanation of this principle, please refer to the previous section. Figures 1 to 2 The description of that will not be repeated here.

[0048] It is understood that the aforementioned shooting scenario is only an example of an application scenario in the embodiments of this application; in other embodiments, the application scenario may also include video recording scenarios, etc., and there are no specific limitations.

[0049] In some embodiments, under the same shooting scenario, to ensure that the display brightness of the high-magnification image (e.g., image 1002) captured by the electronic device at a higher magnification using a telephoto camera is consistent with the display brightness of the low-magnification image (e.g., image 1001) captured by the electronic device at a lower magnification using a main camera, the electronic device can keep the main camera constantly on during shooting. This allows the display brightness of the low-magnification image corresponding to the main camera to be used to adjust the display brightness of the high-magnification image corresponding to the telephoto camera, thereby ensuring that the display brightness of the low-magnification image and the high-magnification image are consistent.

[0050] For example, such as Figure 3 As shown, during the shooting process using the telephoto camera, the main camera remains on. When the electronic device takes a picture using the telephoto camera, it acquires the original image input from the single main camera sensor (e.g., a low-magnification image captured by the main camera at 1x magnification) and calculates the brightness of the main camera area (e.g., the average brightness value of the low-magnification image captured by the main camera). It also acquires the original image input from the single telephoto sensor (e.g., a high-magnification image captured by the telephoto camera at 5x magnification) and calculates the brightness of the telephoto area (e.g., the average brightness value of the high-magnification image captured by the telephoto camera). Subsequently, multi-camera fusion is performed to obtain the final brightness, which is then used to adjust the display brightness of the high-magnification image corresponding to the telephoto camera. For example, the electronic device uses the average brightness value of each pixel in the low-magnification image captured by the main camera to adjust the brightness value of each pixel in the high-magnification image captured by the telephoto camera, making the average brightness value of the high-magnification image consistent with the average brightness value of the low-magnification image; that is, the display brightness of the high-magnification image and the low-magnification image are consistent.

[0051] However, when an electronic device is taking pictures using a telephoto lens, keeping the main camera on at the same time will increase the power consumption of the electronic device.

[0052] Furthermore, if the content displayed in the high-magnification image is the content of overexposed areas (e.g., areas with excessive brightness, hereinafter referred to as overexposed areas) or underexposed areas (e.g., areas with excessively low brightness, hereinafter referred to as underexposed areas) in the low-magnification image, then if the electronic device only adjusts the brightness of the high-magnification image captured by the telephoto camera based on the low-magnification image captured by the main camera, so that the display brightness of the high-magnification image and the low-magnification image are consistent, this will lead to overexposure or underexposure in the adjusted high-magnification image.

[0053] For example, such as Figure 4 As shown, image 4001 is a high-magnification image captured by the electronic device using its main camera at 1x magnification, and image 4002 is a low-magnification image captured by the electronic device using its telephoto camera at 5x magnification. Images 4001 and 4002 correspond to the same shooting scene, and the content displayed in image 4002 is the content displayed in region 4001A of image 4001. Region 4001A is overexposed due to excessive brightness. Clearly, if the display brightness of the high-magnification and low-magnification images remains consistent, such as if the display brightness of image 4002 is consistent with the display brightness of region 4001A in image 4001, then image 4002 will exhibit overexposure.

[0054] Therefore, this invention proposes a shooting method. In this method, during the shooting process of an electronic device using a telephoto camera, when the electronic device detects a user's shooting command, it determines the first brightness value of a first image at a second magnification corresponding to the shooting command, and the second brightness value of a second image at a third magnification (which is less than the second magnification). Based on the brightness difference between the first and second brightness values, the first brightness value of the first image is adjusted to the third brightness value. Based on the third brightness value, the brightness values ​​of each pixel in the first image are adjusted to obtain the corresponding captured image at the second magnification (an example corresponding to the third image).

[0055] For example, when the brightness difference between the first brightness value and the second brightness value is small, it indicates that the shooting scene is a low-contrast scene with little difference in scene brightness, and the captured image usually does not have overexposed or underexposed areas. Thus, when the electronic device adjusts the brightness of the first image, it can prioritize the second brightness value and adjust the first image with the first brightness value to display a third image with the third brightness value. This ensures that the brightness of the third image with the third brightness value is consistent with or close to that of the second image with the second brightness value, thus ensuring brightness consistency during zoom transitions from low to high magnification.

[0056] For example, if there is a significant difference between the first and second brightness values, it indicates that the shooting scene is a high-contrast scene with a large brightness difference, and the captured image may have overexposed or underexposed areas. Therefore, when adjusting the brightness of the first image, the electronic device can prioritize the first brightness value. If the first brightness is greater than the second brightness, it means the first image is too bright, and the first brightness value is adjusted down to the third brightness value to avoid overexposure in the third image. Conversely, if the first brightness is less than the second brightness, it means the first image is too dark, and the first brightness value is adjusted up to the third brightness value to avoid underexposure in the third image.

[0057] It is understandable that when an electronic device takes a picture using a telephoto camera, it adjusts the brightness of the first image based on the brightness difference between the second image at a lower magnification and the first image at a higher magnification. This ensures consistent brightness during zooming in low-contrast scenes and avoids overexposure or underexposure in high-contrast scenes. Furthermore, during this adjustment process, the electronic device only uses the telephoto camera and does not need to keep the main camera on, thus reducing device power consumption.

[0058] Figure 5 According to some embodiments of this application, a schematic diagram of brightness adjustment is shown.

[0059] In some embodiments, such as Figure 5 As shown, during the process of taking a picture using a telephoto camera, the electronic device first acquires the raw image input from a single telephoto sensor. For example, when the electronic device takes a picture at 5x magnification using a telephoto camera, it first acquires a raw image corresponding to 5x magnification (an example corresponding to the second magnification) using the telephoto camera (an example corresponding to the first image), and then acquires a raw image corresponding to another magnification less than 5x, such as acquiring a raw image corresponding to the lowest magnification of the telephoto camera (e.g., 2.5x, an example corresponding to the third magnification) using the telephoto camera (an example corresponding to the second image). Exemplarily, the raw image acquired by the electronic device can be a RAW format image acquired by the telephoto camera's sensor.

[0060] See also Figure 5 As shown, after acquiring the original image input from a single telephoto sensor, the electronic device performs high-magnification region statistical brightness (baseZoomLuma) and low-magnification region statistical brightness (curZoomLuma). For example, the electronic device calculates the average brightness value of each pixel in the original image at 5x magnification (an example corresponding to the first brightness value), and calculates the average brightness value of each pixel in the original image at 2.5x magnification (an example corresponding to the second brightness value).

[0061] For example, such as Figure 6 As shown, the field of view corresponding to 2.5x magnification is defined by the square area selected in the low-magnification statistics area 61 (including the square area selected in the high-magnification statistics area 62), and the field of view corresponding to 5x magnification is defined by the square area selected in the high-magnification statistics area 62. It can be understood that the field of view corresponding to 2.5x magnification is larger than that corresponding to 5x magnification. Compared to the field of view corresponding to 5x magnification, the field of view corresponding to 2.5x magnification is closer to the field of view of the main camera in an electronic device at a lower magnification, such as 1x.

[0062] For example, the electronic device can determine the first brightness value (such as the average brightness value of each pixel in the high-magnification statistical region 62) corresponding to the high-magnification statistical region 62 and the second brightness value (such as the average brightness value of each pixel in the low-magnification statistical region 62) corresponding to the low-magnification statistical region 61 by averaging. In other embodiments, the electronic device can also determine the brightness value corresponding to the region by methods such as mode calculation, and there are no specific limitations.

[0063] Furthermore, such as Figure 5 As shown, the electronic device obtains the final brightness value of the image captured by the telephoto camera at 5x magnification (corresponding to the example of the third image) by weighted fusion of statistical brightness in the high magnification area and statistical brightness in the low magnification area based on the magnification difference.

[0064] The following is passed Figures 7 to 9B The example illustrates the process of weighted fusion based on multiplier differences.

[0065] Figure 7 According to some embodiments of this application, a schematic diagram of calculating weight values ​​is shown.

[0066] In some embodiments, combined with Figure 6 and Figure 7 As shown, after the electronic device performs statistical brightness analysis in the high-magnification area to obtain a first brightness value and performs statistical brightness analysis in the low-magnification area to obtain a second brightness value, it determines the scene type of the shooting scene based on the difference between the first brightness value and the second brightness value, and calculates a weight value based on the difference between the first brightness value and the second brightness value to determine the fused brightness value of the image captured at the corresponding 5x magnification (an example corresponding to the third brightness value).

[0067] For example, when the difference between the first brightness value and the second brightness value is less than or equal to a preset first threshold, it indicates that the brightness difference between the first brightness value and the second brightness value is small, that is, the corresponding shooting scene type is a low-contrast scene, and the captured image usually does not have overexposed or underexposed areas. For example, Figure 1As shown, in image 1001, the difference between the overall average brightness value of image 1001 and the average brightness value of region 1001A is less than the first threshold, that is, the shooting scene corresponding to image 1001 is a low contrast scene, and image 1001 has no overexposure or underexposure phenomenon.

[0068] For example, when the difference between the first brightness value and the second brightness value is greater than a first threshold, it indicates a significant difference in brightness between the two values, meaning the corresponding shooting scene is a high-contrast scene, and the captured image may contain overexposed or underexposed areas. For example, ... Figure 4 As shown, in image 4001, the difference between the overall average brightness value of image 4001 and the average brightness value of region 4001A is greater than the first threshold, that is, the shooting scene corresponding to image 4001 is a high contrast scene, and region 4001A in image 4001 is overexposed.

[0069] Figure 8 According to some embodiments of this application, a relationship diagram of a first brightness value, a second brightness value, and a blended brightness value is shown. For example... Figure 8 As shown, the horizontal axis represents the first brightness value, the vertical axis represents the blended brightness value, the second brightness value corresponds to the horizontal axis value of the straight line 01, the expression corresponding to the diagonal line 02 is y (vertical axis value) = x (horizontal axis value), and the curve 03 is the curve of the change of the blended brightness value.

[0070] It's understandable that, when shooting the same scene, the second brightness value corresponding to the statistical brightness in the low-magnification area usually remains unchanged, while the first brightness value corresponding to the statistical brightness in the high-magnification area changes with the magnification. For example, combining... Figure 6 For example, when an electronic device takes a picture using a telephoto camera at 5x magnification, the second brightness value corresponding to the statistical brightness of the low magnification area is the average brightness value of each pixel in the low magnification statistical area 61, while the first brightness value corresponding to the statistical brightness of the high magnification area is the average brightness value of each pixel in the high magnification statistical area 62. Furthermore, when the electronic device takes a picture using a telephoto camera at magnifications such as 7.5x or 10x, the second brightness value corresponding to the statistical brightness of the low magnification area is the average brightness value of each pixel in the low magnification statistical area 61, while the first brightness value corresponding to the statistical brightness of the high magnification area is the average brightness value of each pixel in the corresponding field of view of the telephoto camera at the current magnifications of 7.5x and 10x.

[0071] See also Figure 8 As shown, the smaller the difference between the first brightness value and the second brightness value (e.g., the smaller the angle between line 01 and diagonal line 02), the closer the blended brightness value is to the second brightness value; conversely, the larger the difference between the first brightness value and the second brightness value (e.g., the larger the angle between line 01 and diagonal line 02), the closer the blended brightness value is to the first brightness value. For example, Figure 8 The calculated weight values ​​shown can be expressed by the following formula (1):

[0072] fusionLuma = baseZoomLuma * (1-weight) + curZoomLuma * weight (1)

[0073] In formula (1), fusionLuma represents the fused brightness value, baseZoomLuma represents the second brightness value, curZoomLuma represents the first brightness value, and weight represents the weight value. For example, the weight value is determined based on the absolute value of the difference between the first and second brightness values. For instance, the larger the absolute value of the difference between the first and second brightness values, the greater the brightness contrast of the shooting scene, and the larger the weight value; or, for instance, the smaller the absolute value of the difference between the first and second brightness values, the smaller the brightness contrast of the shooting scene, and the smaller the weight value.

[0074] In some embodiments, if the first brightness value is equal to the second brightness value, the weight value is 0; if the first brightness value differs from the second brightness value by 10%, the weight value is 0.1; if the first brightness value differs from the second brightness value by 20%, the weight value is 0.2, and so on. If the first brightness value differs from the second brightness value by more than 100%, the weight value is 1, and so on. In other embodiments, the weight value can also be determined based on the ratio of the first brightness value to the second brightness value, etc., and there are no specific limitations.

[0075] In some embodiments, when the electronic device determines that the difference between the first brightness value and the second brightness value is less than or equal to the first threshold, that is, when the shooting scene is a low contrast scene, referring to formula (1), the fusion ratio (weight) corresponding to the first brightness value is smaller, while the fusion ratio (1-weight) corresponding to the second brightness value is larger, and the weight of the first brightness value is less than the weight of the second brightness value; that is, the second brightness value is the main factor in adjusting the brightness of the first image to ensure the consistency of brightness during the zoom process from low magnification to high magnification.

[0076] For example, combined Figure 1 For example, in the case of shooting a low-contrast scene, such as Figure 9AAs shown, image 91 is a high-magnification image captured by the electronic device using a telephoto camera at 2.5x magnification, and image 92 is a low-magnification image captured by the electronic device using a telephoto camera at 5x magnification. The display content of image 92 is the same as the display content of region 91A in image 91. Furthermore, the electronic device adjusts the third brightness value of image 92 based on the first brightness value of image 91, such that the third brightness value is equal to the second brightness value, or that the difference between the third brightness value and the second brightness value is small. This ensures the consistency of brightness during zooming from low to high magnification in low-contrast scenes. For example, the third brightness value of image 92 is equal to or has a small difference from the brightness value of region 91A in image 91.

[0077] In other embodiments, when the electronic device determines that the difference between the first brightness value and the second brightness value is greater than the first threshold, that is, when the shooting scene is a high contrast scene, refer to formula (1), the fusion ratio (weight) corresponding to the first brightness value is larger, while the fusion ratio (1-weight) corresponding to the second brightness value is smaller; that is, the brightness of the first image is adjusted based on the first brightness value to avoid overexposure or underexposure of the first image.

[0078] For example, combined Figure 4 For example, in the case of shooting a high-contrast scene, such as Figure 9B As shown, image 911 is a high-magnification image captured by an electronic device using a telephoto camera at 2.5x magnification, and image 912 is a low-magnification image captured by an electronic device using a telephoto camera at 5x magnification. The display content of image 912 is the display content of region 911A in image 911. Further, if the first brightness value is greater than the second brightness value, the first image is reduced from the first brightness value to the third brightness value based on the fusion brightness value determined by formula (1). That is, the third brightness value is less than the first brightness value, thus avoiding overexposure of the first image. For example, compared to the overexposed area corresponding to region 911A in image 912, image 912 does not show overexposure and can display more image details. That is, the third brightness value of image 92 differs significantly from the brightness value of region 91A in image 91.

[0079] Accordingly, if the first brightness value is less than the second brightness value, the first image is increased from the first brightness value to the second brightness difference to obtain the third brightness value based on the fused brightness value determined by formula (1). That is, the third brightness value is less than the first brightness value, so as to avoid the underexposure phenomenon of the first image. For example, the third brightness value of image 92 is equal to or slightly different from the brightness value of region 91A in image 91.

[0080] In some embodiments, in high-contrast scenes, the third brightness value can be based on Figure 9BThe target brightness value is determined based on a preset value for the corresponding shooting scene, or it can be determined based on the device model, camera model, etc. of the corresponding electronic device, or it can be a user-defined brightness value. For example, the first brightness difference or the second brightness difference is the difference between the first brightness value and the third brightness value.

[0081] The following uses a mobile phone as an example of an electronic device to illustrate the embodiments of this application.

[0082] Figure 10 According to some embodiments of this application, a flowchart of a shooting method is shown. It can be understood that... Figure 10 The processes shown are all executed by mobile phones. For simplicity, the following description... Figure 10 The execution entity will not be described again in the process shown. For example... Figure 10 As shown, the process includes, but is not limited to, the following:

[0083] S001: A zoom shooting command was detected. The camera was switched from the main camera to the telephoto camera, and the zoom level was adjusted from the first magnification to the second magnification.

[0084] In some embodiments, such as Figure 11 As shown, when a user taps the camera app on phone 10 while using phone 10, phone 10 activates the "take a picture" function and displays the shooting interface 11. See also... Figure 11 As shown, the zoom bar 10A in the shooting interface 11 has a magnification of "1x" (an example of the first magnification), which means that the working camera of the phone 10 is the main camera at this time (an example of the second camera).

[0085] In some embodiments, during the shooting process, users can adjust the magnification of the image displayed on the shooting interface by sliding the zoom bar, clicking the zoom point, or performing zoom operations such as sliding or pinching with two fingers, such as enlarging or shrinking the displayed image.

[0086] For example, such as Figure 11 and Figure 12 As shown, when the user swipes... Figure 11 When zooming in the 10A section of the phone, the phone 10... Figure 11 The shooting interface 11 shown has changed to Figure 12 The zoom interface shown is 12. See also... Figure 12 As shown, when the user slides the zoom button 10C to select the "5x" magnification, the working camera of the phone 10 can switch from the main camera to the telephoto camera.

[0087] Furthermore, such as Figure 12 and Figure 13 As shown, when the user raises their hand to cancel the zoom button 10C, the phone 10... Figure 12 The zoom interface 12 shown changes to Figure 13 The shooting interface shown is 13. See also... Figure 13 As shown, the zoom bar 10A in the shooting interface 13 has a magnification of "5x" (an example of the second magnification), which means that the working camera of the mobile phone 10 is a telephoto camera (an example of the first camera). Then, when the user clicks the button 10B, the mobile phone 10 detects the zoom shooting command and takes a picture at 5x magnification through the telephoto camera to obtain the captured image.

[0088] S002: A first image at a second magnification using a telephoto camera, and a second image at a third magnification using a telephoto camera.

[0089] In some embodiments, during the process of the mobile phone 10 capturing an image at 5x magnification using a telephoto camera, the mobile phone 10 first captures a first image of the field of view at 5x magnification using the telephoto camera, and then captures a second image of the field of view at the minimum magnification of the telephoto camera, such as 2.5x magnification (an example of the third magnification).

[0090] S003: Based on the difference between the first brightness value of the first image and the second brightness value of the second image, adjust the first brightness value of the first image to the third brightness value.

[0091] For example, the first brightness value can be determined based on the average brightness value of each pixel in the first image, and the second brightness value can be determined based on the average brightness value of each pixel in the second image.

[0092] In some embodiments, when the mobile phone 10 determines that the difference between the first brightness value and the second brightness value is less than a first threshold, it determines... Figure 13 The corresponding shooting scene is a low-contrast scene, and the weighted sum of the first brightness value and the second brightness value is used as the third brightness value. For example, the weight of the first brightness value and the second brightness value can be determined based on the ratio of the first brightness value and the second brightness value, and referring to the aforementioned formula (1), in the case of a low-contrast scene, the fusion ratio (weight) corresponding to the first brightness value is smaller, while the fusion ratio (1-weight) corresponding to the second brightness value is larger, and the weight of the first brightness value is less than the weight of the second brightness value; that is, the second brightness value is the main factor in adjusting the brightness of the first image to ensure the consistency of brightness during the zoom process from low magnification to high magnification.

[0093] In other embodiments, when the mobile phone 10 determines that the difference between the first brightness value and the second brightness value is greater than a first threshold, it determines... Figure 13The corresponding shooting scenario is a high-contrast scene. In this case, the fusion ratio (weight) corresponding to the first brightness value is larger, while the fusion ratio (1-weight) corresponding to the second brightness value is smaller. That is, the brightness of the first image is adjusted based on the first brightness value to avoid overexposure or underexposure. See the aforementioned section on... Figure 8 The description of that will not be repeated here.

[0094] S004: Based on the third brightness value, adjust the brightness value of each pixel in the first image to obtain and display the third image.

[0095] For example, the mobile phone 10 multiplies the brightness value of each pixel in the first image by the ratio of the third brightness value to the first brightness value to obtain and display the third image.

[0096] In some embodiments, such as Figure 9A As shown, in a low-contrast shooting scenario, the phone adjusts the third brightness value of image 92 based on the first brightness value of image 91, such that the third brightness value is equal to or only slightly different from the second brightness value. This ensures consistent brightness during zoom transitions from low to high magnification in low-contrast scenes. For example, the third brightness value of image 92 may be equal to or only slightly different from the brightness value of region 91A in image 91.

[0097] In other embodiments, such as Figure 9B As shown, in a high-contrast shooting scenario, if the first brightness value is greater than the second brightness value, the phone 10 reduces the first image brightness value by a first brightness difference to obtain a third brightness value, meaning the third brightness is less than the first brightness value, thus preventing overexposure of the first image. For example, compared to the overexposed area 911A in image 912, image 912 is not overexposed and can display more image details; that is, the third brightness value of image 92 differs significantly from the brightness value of area 91A in image 91. Conversely, if the first brightness value is less than the second brightness value, the phone 10 increases the first image brightness value by a second brightness difference to obtain a third brightness value, meaning the third brightness is less than the first brightness value, thus preventing underexposure of the first image.

[0098] It is understandable that when an electronic device takes a picture using a telephoto camera, it adjusts the brightness of the first image based on the brightness difference between the second image at a lower magnification and the first image at a higher magnification. This ensures consistent brightness during zooming in low-contrast scenes and avoids overexposure or underexposure in high-contrast scenes. Furthermore, during this adjustment process, the electronic device only uses the telephoto camera and does not need to keep the main camera on, thus reducing device power consumption.

[0099] Figure 14 According to some embodiments of this application, a hardware structure diagram of a mobile phone 10 is shown.

[0100] like Figure 14 As shown, the mobile phone 10 may include a processor 110, an external memory interface 120, an internal memory 121, a universal USB interface 130, a charging management module 140, a power management module 141, a battery module 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.

[0101] Processor 110 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, etc. These different processing units may be independent devices or integrated into one or more processors.

[0102] The controller can serve as the central nervous system and command center of the mobile phone 10. The controller can generate operation control signals based on the instruction opcode and timing signals to control the fetching and execution of instructions. Specifically, the image processing method executed by the mobile phone 10 in this embodiment can be executed by the processor 110.

[0103] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include inter-integrated circuit (I2C) interfaces, inter-integrated circuit sound (I2S) interfaces, pulse code modulation (PCM) interfaces, etc. It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a limitation on the structure of the mobile phone 10.

[0104] The charging management module 140 receives charging input from the charger. The power management module 141 connects to the battery module 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery module 142 and / or the charging management module 140 to power the processor 110, internal memory 121, external memory, display 194, etc.

[0105] The wireless communication function of mobile phone 10 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor.

[0106] Antennas 1 and 2 are used to transmit and receive electromagnetic wave signals. Mobile communication module 150 can provide wireless communication solutions for mobile phone 10, including 2G / 3G / 4G / 5G. Wireless communication module 160 can provide wireless communication solutions for mobile phone 10, including wireless local area networks (WLAN) (such as Wireless Fidelity (Wi-Fi) networks), Bluetooth (BT), and Global Navigation Satellite System (GNSS).

[0107] The phone 10 uses a GPU, a display 194, and an application processor to achieve its display function. The GPU is a microprocessor for image processing, connecting the display 194 and the application processor.

[0108] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some embodiments, the mobile phone 10 may include one or N displays screens 194, where N is a positive integer greater than 1.

[0109] The external storage interface 120 can be used to connect an external storage card, such as a Micro SD card, to expand the storage capacity of the mobile phone 10. The external storage card communicates with the processor 110 through the external storage interface 120 to perform data storage functions.

[0110] The internal memory 121 can be used to store computer executable program code, which includes instructions. The processor 110 executes various functional applications and data processing of the mobile phone 10 by running the instructions stored in the internal memory 121.

[0111] The phone 10 can perform audio functions through the audio module 170, such as music playback and recording.

[0112] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. A motor 191 can generate vibration feedback. An indicator 192 can be an indicator light. A SIM card interface 195 can be used to connect a SIM card.

[0113] It is understood that the structure illustrated in this application does not constitute a specific limitation on the mobile phone 10. In other embodiments, the mobile phone 10 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0114] In some embodiments, this application also provides a computer-readable medium storing program code that, when run on a computer, causes the computer to perform the methods described above.

[0115] In some embodiments, this application also provides a computer program product comprising: computer program code that, when run on a computer, causes the computer to perform the methods described above.

[0116] In the accompanying drawings, some structural or methodological features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be necessary. Rather, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. Furthermore, the inclusion of structural or methodological features in a particular figure does not imply that such features are required in all embodiments, and in some embodiments, these features may be omitted or may be combined with other features.

[0117] It should be noted that the units / modules mentioned in the various device embodiments of the present invention are all logical units / modules. Physically, a logical unit / module can be a physical unit / module, a part of a physical unit / module, or a combination of multiple physical units / modules. The physical implementation of these logical units / modules themselves is not the most important factor; the combination of functions implemented by these logical units / modules is the key to solving the technical problem proposed by the present invention. Furthermore, to highlight the innovative aspects of the present invention, the above-described device embodiments of the present invention have not introduced units / modules that are not closely related to solving the technical problem proposed by the present invention. This does not mean that the above-described device embodiments do not contain other units / modules.

[0118] It should be noted that in the examples and description of this patent, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, 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 said element.

[0119] Although the invention has been illustrated and described with reference to certain preferred embodiments thereof, those skilled in the art will understand that various changes in form and detail may be made therein without departing from the scope of the invention.

Claims

1. A shooting method applied to electronic devices, characterized in that, include: Shoot at the highest magnification. A zoom shooting command is detected, wherein the zoom shooting command adjusts the first magnification to a second magnification, and the second magnification is greater than the first magnification; A first image is captured by the first camera at the second magnification, and a second image is captured by the first camera at the third magnification, wherein the third magnification is less than the second magnification, and the display content of the first image corresponds to the display content of the first area in the second image; Determine a first brightness value for the first image and a second brightness value for the second image; Based on the difference between the first brightness value and the second brightness value, the first brightness value of the first image is adjusted to the third brightness value; Based on the third brightness value, the brightness values ​​of each pixel in the first image are adjusted to obtain the third image; The third image is displayed.

2. The method according to claim 1, characterized in that, The step of adjusting the first brightness value of the first image to a third brightness value based on the difference between the first brightness value and the second brightness value includes: Determine the first difference between the first brightness value and the second brightness value; When the first difference is less than or equal to a preset first threshold, the weighted sum of the first brightness value and the second brightness value is taken as the third brightness value, wherein the weight of the first brightness value is less than the weight of the second brightness value, and the weight of the second brightness value is inversely proportional to the size of the first difference. When the first difference is greater than the first threshold and the first brightness value is greater than the second brightness value, the first brightness value is reduced by the first brightness difference to obtain the third brightness value; When the first difference is greater than the first threshold and the first brightness value is less than the second brightness value, the first brightness value is increased by the second brightness difference to obtain the third brightness value.

3. The method according to claim 1, characterized in that, The method further includes: When the first brightness value is equal to the second brightness value, the third brightness value is equal to the second brightness value.

4. The method according to claim 1, characterized in that, The second magnification is the minimum working magnification of the first camera.

5. The method according to claim 1, characterized in that, Determining the first brightness value of the first image and the second brightness value of the second image includes: The average brightness value of each pixel in the first image is taken as the first brightness value; The average brightness value of each pixel in the second image is used as the second brightness value.

6. The method according to claim 1, characterized in that, The step of adjusting the brightness values ​​of each pixel in the first image based on the third brightness value to obtain the third image includes: The brightness value of each pixel in the first image is multiplied by the brightness ratio to obtain the third image, wherein the brightness ratio is the ratio of the third brightness value to the first brightness value.

7. The method according to any one of claims 1 to 6, characterized in that, The method further includes: When shooting at the first magnification, the working camera of the electronic device is the second camera; Upon detecting the zoom shooting command, the working camera of the electronic device switches from the second camera to the first camera, wherein the first camera and the second camera are different cameras.

8. The method according to claim 7, characterized in that, The first camera is a telephoto camera, and the second camera is a main camera.

9. A computer-readable storage medium, characterized in that, The readable storage medium stores instructions that, when executed on an electronic device, cause the electronic device to perform the method of any one of claims 1 to 8.

10. An electronic device, characterized in that, include: Memory is used to store instructions executed by one or more processors of an electronic device; And a processor, one of the processors of the electronic device, for executing instructions stored in the memory to implement the method of any one of claims 1 to 8.

11. A program product, characterized in that, The program product includes instructions that, when executed on an electronic device, cause the electronic device to perform the method of any one of claims 1 to 8.