Search

CN-121985213-A - Photographing preview method, electronic device, readable storage medium and program product

CN121985213ACN 121985213 ACN121985213 ACN 121985213ACN-121985213-A

Abstract

The application relates to the technical field of photographing and discloses a photographing preview method, electronic equipment, a readable storage medium and a program product. In the process of displaying the preview image, when the electronic equipment detects that the current zoom magnification is higher, the electronic equipment can customize and output intermediate images with different cutting sizes corresponding to the requirements of different image processing algorithms by preprocessing (including preliminary cutting) the original image acquired by the camera. And then, processing the intermediate images based on the image processing algorithms respectively corresponding to the intermediate images with the cutting sizes to obtain a plurality of image processing results. And obtaining a preview image corresponding to the current zoom magnification based on the plurality of image processing results and displaying the preview image in a shooting preview picture. Therefore, the requirements of different image processing algorithms on the images can be considered in the photographing preview process, and the processing effects of the different image processing algorithms can be ensured, so that the quality of the preview images can be ensured.

Inventors

  • WANG JING

Assignees

  • 荣耀终端股份有限公司

Dates

Publication Date
20260505
Application Date
20241025

Claims (10)

  1. 1. A photographing preview method applied to an electronic device, wherein the electronic device comprises a camera, the method comprising: Detecting a shooting instruction and displaying a shooting preview picture; detecting a first zooming instruction in the process of displaying the shooting preview picture; Cutting a first image acquired by a camera to obtain a plurality of intermediate images with a plurality of cutting sizes, wherein the intermediate images with different cutting sizes correspond to the requirements of different image processing algorithms; adopting the image processing algorithm corresponding to each intermediate image with each cutting size to perform image processing on each intermediate image to obtain a plurality of image processing results; and obtaining a second image based on the image processing results, and displaying the second image corresponding to the first zoom instruction in the shooting preview picture.
  2. 2. The method of claim 1, wherein the requirements of the different image processing algorithms include a field of view requirement for an image, the different crop sizes corresponding to the field of view requirement of the different image processing algorithms for an image.
  3. 3. The method of claim 2, wherein the image processing algorithms include a detection class algorithm and a preview class algorithm, The zooming magnification corresponding to the first zooming instruction is larger than a magnification threshold, the first image acquired by the camera is cut to obtain a plurality of intermediate images with a plurality of cutting sizes, and the zooming method comprises the following steps: Determining a first cutting size and a second cutting size based on the zooming magnification corresponding to the first zooming instruction, wherein the first cutting size corresponds to the requirement of the detection algorithm on the view angle of the image, and the second cutting size corresponds to the requirement of the preview algorithm on the view angle of the image; Cutting the first image based on the first cutting size to obtain a first intermediate image, and And cutting the first image based on the second cutting size to obtain a second intermediate image.
  4. 4. The method of claim 3, wherein determining the first and second cutoff sizes based on the zoom magnification corresponding to the first zoom command comprises: Taking a cutting size corresponding to the zooming multiplying power corresponding to the first zooming instruction as the first cutting size; determining a first zoom magnification between the zoom magnification corresponding to the first zoom instruction and the zoom magnification corresponding to the first image; And taking the cutting size corresponding to the first zooming multiplying power as the second cutting size.
  5. 5. A method according to claim 3, wherein the plurality of image processing results comprises a first image processing result and a second image processing result; the obtaining a second image based on the plurality of image processing results includes: and cutting and fusing the first image processing result and the second image processing result based on the cutting size corresponding to the zooming magnification corresponding to the first zooming instruction to obtain the second image.
  6. 6. The method of claim 2, wherein the requirements of the different image processing algorithms further comprise a resolution requirement for the image, the resolution of the intermediate image of different crop sizes corresponding to the resolution requirement of the different image processing algorithms for the image; and/or, the requirements of the different image processing algorithms further comprise image type requirements of the images, and the image types of the intermediate images with different cutting sizes correspond to the image type requirements of the different image processing algorithms on the images.
  7. 7. The method of claim 5, wherein the zoom magnification corresponding to the first zoom command is greater than a magnification threshold, and the cropping the first image acquired by the camera to obtain a plurality of intermediate images with a plurality of cropping sizes, further comprising: when the first image is cut, the first image is subjected to resolution adjustment and/or format conversion based on the resolution requirements and/or the image type requirements of different image processing algorithms, so that a plurality of intermediate images corresponding to different cutting sizes and different resolutions and/or image types are obtained.
  8. 8. An electronic device comprising one or more processors and memory for storing instructions for execution by the one or more processors of the electronic device; the processor, when executing the instructions in the memory, causes the electronic device to perform the method of any one of claims 1 to 7.
  9. 9. A readable storage medium having stored thereon instructions that, when executed on an electronic device, cause the electronic device to perform the method of any of claims 1 to 7.
  10. 10. A program product comprising a computer program or instructions which, when executed, cause a computer to perform the method of any of claims 1 to 7.

Description

Photographing preview method, electronic device, readable storage medium and program product Technical Field The present application relates to the field of photographing technologies, and in particular, to a photographing preview method, an electronic device, a readable storage medium, and a program product. Background Currently, during photographing by a user through an electronic device, the electronic device may display a preview image (including a photographed object) on a photographing preview interface, and the user may change a field of view (FOV) of the electronic device by adjusting a zoom magnification, thereby changing the preview image to photograph a desired image. When the zoom magnification is reduced, the field angle of the electronic device is reduced, the shooting object in the preview image is reduced, and the shooting object included in the preview image is reduced. The preview images under different zoom magnifications are obtained by cutting an original image acquired by a camera, for example, the preview images are obtained by cutting the original image based on a cutting size corresponding to the zoom magnification of 1x for the zoom magnification of 1x, and the preview images are obtained by cutting the original image based on a cutting size corresponding to the zoom magnification of 10 x for the zoom magnification of 10 x. Before the electronic device displays the preview image, the image layer processing needs to be performed on the original image collected by the camera, for example, the processing such as a face detection algorithm and an anti-shake algorithm is performed. Because the resolution ratio of the images collected by the camera is higher, the number of the image data is larger, in order to improve the image processing efficiency, the original images collected by the camera can be subjected to preliminary cutting and then subjected to image processing, so that the data volume of the image processing is reduced. Because the corresponding cut size is smaller when the zoom magnification is higher, the image includes less image information, and therefore, the cut size of the preliminary cut is generally set to be between the cut size corresponding to the original image and the final higher zoom magnification, thereby ensuring the accuracy of image processing while reducing the amount of image processing data. For example, if the zoom magnification corresponding to the user operation is 10×, the trimming size of the preliminary trimming may be set to 4× corresponding to the zoom magnification, and then the original image may be preliminary trimmed based on the trimming size corresponding to the zoom magnification 4×. In the existing photographing preview method, an original image can only be primarily cut based on one cutting size, so that an image with one cutting size is obtained. Since different types of image processing algorithms (e.g., detection class algorithm, preview class algorithm, etc.) have different requirements (e.g., view angle requirements) for the image, for example, the detection class algorithm requires a relatively large cut-out size of the image, and the preview class algorithm requires a relatively small cut-out size of the image. Therefore, when the image processing algorithms of different types process the images with the same cutting size, the processing effect of part of the image processing algorithms is poor, so that the image quality of the preview image is low, and the photographing experience of the user is affected. Disclosure of Invention In order to solve the above technical problems, embodiments of the present application provide a photographing preview method, an electronic device, a readable storage medium, and a program product, in which the present application is described in terms of several aspects, and the following embodiments and beneficial effects of the several aspects may be referred to each other. The embodiment of the application provides a photographing preview method, which is applied to electronic equipment, wherein the electronic equipment comprises a camera, and the method comprises the steps of detecting a photographing instruction, displaying a photographing preview picture, detecting a first zooming instruction in the process of displaying the photographing preview picture, cutting a first image acquired by the camera to obtain a plurality of intermediate images with a plurality of cutting sizes, wherein the intermediate images with different cutting sizes correspond to requirements of different image processing algorithms, performing image processing on the intermediate images with the respective corresponding image processing algorithms of the intermediate images with the cutting sizes to obtain a plurality of image processing results, obtaining a second image based on the plurality of image processing results, and displaying the second image corresponding to the first zooming instruction in the photographing prev