WO2021115014A1 - 变焦方法、电子装置和计算机可读存储介质 - Google Patents

变焦方法、电子装置和计算机可读存储介质 Download PDF

Info

Publication number
WO2021115014A1
WO2021115014A1 PCT/CN2020/128464 CN2020128464W WO2021115014A1 WO 2021115014 A1 WO2021115014 A1 WO 2021115014A1 CN 2020128464 W CN2020128464 W CN 2020128464W WO 2021115014 A1 WO2021115014 A1 WO 2021115014A1
Authority
WO
WIPO (PCT)
Prior art keywords
telephoto
image
original image
camera
zoom factor
Prior art date
Application number
PCT/CN2020/128464
Other languages
English (en)
French (fr)
Inventor
徐青
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2021115014A1 publication Critical patent/WO2021115014A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules

Definitions

  • This application relates to the field of image processing technology, and in particular to a zoom method, an electronic device or a computer-readable storage medium.
  • high-resolution and high-definition picture quality are the goals pursued by photography enthusiasts, and the picture effects of high-resolution and high-definition picture quality are determined by the zoom capability of the lens.
  • the embodiments of the present application provide a zoom method, an electronic device, and a computer-readable storage medium.
  • the zoom method provided in the embodiments of the present application is used in an electronic device, and the electronic device includes a camera module.
  • the camera module includes a main camera and a telephoto camera.
  • the main camera is used to obtain a main original image with a first pixel size.
  • the telephoto camera is used to obtain a telephoto original image with a second pixel size.
  • the telephoto camera includes a first telephoto state and a second telephoto state.
  • the camera module is used to output a target image with a third pixel size. Both the first pixel size and the second pixel size are larger than the third pixel size.
  • the zoom method includes: when the camera module is in a zoom mode less than a first predetermined zoom factor, controlling the main camera to obtain the main original image, and obtain the target image according to the main original image; When the camera module is in a zoom mode that is greater than or equal to the first predetermined zoom factor and less than the second predetermined zoom factor, controlling the telephoto camera to acquire the telephoto original image in the first telephoto state, And obtain the target image according to the telephoto original image; and when the camera module is in a zoom mode greater than or equal to the second predetermined zoom factor, control the telephoto camera to use the second telephoto The telephoto original image is acquired in a state, and the target image is obtained according to the telephoto original image.
  • the electronic device provided by the embodiment of the present application includes a camera module and a processor.
  • the camera module includes a main camera and a telephoto camera.
  • the main camera is used to obtain a main original image with a first pixel size.
  • the telephoto camera is used to obtain a telephoto original image with a second pixel size.
  • the telephoto camera includes a first telephoto state and a second telephoto state.
  • the camera module is used to output a target image with a third pixel size. Both the first pixel size and the second pixel size are larger than the third pixel size.
  • the processor is configured to: when the camera module is in a zoom mode less than a first predetermined zoom factor, control the main camera to obtain the main original image, and obtain the target image according to the main original image; When the camera module is in a zoom mode that is greater than or equal to the first predetermined zoom factor and less than the second predetermined zoom factor, controlling the telephoto camera to acquire the telephoto original image in the first telephoto state, And obtain the target image according to the telephoto original image; and when the camera module is in a zoom mode greater than or equal to the second predetermined zoom factor, control the telephoto camera to use the second telephoto The telephoto original image is acquired in a state, and the target image is obtained according to the telephoto original image.
  • the electronic device provided by the embodiment of the present application includes a camera module.
  • the camera module includes a main camera and a telephoto camera.
  • the main camera is used to obtain a main original image with a first pixel size.
  • the telephoto camera is used to obtain a telephoto original image with a second pixel size.
  • the telephoto camera includes a first telephoto state and a second telephoto state.
  • the camera module is used to output a target image with a third pixel size. Both the first pixel size and the second pixel size are larger than the third pixel size.
  • the main camera acquires a main original image, and the camera module obtains the target image according to the main original image; in the camera module
  • the telephoto camera acquires a telephoto original image in the first telephoto state, and the camera module according to the The telephoto original image obtains the target image; when the camera module is in a zoom mode greater than or equal to the second predetermined zoom factor, the telephoto camera acquires the telephoto in the second telephoto state Original image, the camera module obtains the target image according to the telephoto original image.
  • the electronic device includes one or more processors, memories, and one or more programs.
  • the one or more programs are stored in the memory and are configured to be executed by the one or more processors.
  • the program includes instructions for the following zoom method.
  • the zoom method is used in an electronic device, and the electronic device includes a camera module.
  • the camera module includes a main camera and a telephoto camera.
  • the main camera is used to obtain a main original image with a first pixel size.
  • the telephoto camera is used to obtain a telephoto original image with a second pixel size.
  • the telephoto camera includes a first telephoto state and a second telephoto state.
  • the camera module is used to output a target image with a third pixel size.
  • the zoom method includes: when the camera module is in a zoom mode less than a first predetermined zoom factor, controlling the main camera to obtain the main original image, and obtain the target image according to the main original image; When the camera module is in a zoom mode that is greater than or equal to the first predetermined zoom factor and less than the second predetermined zoom factor, controlling the telephoto camera to acquire the telephoto original image in the first telephoto state, And obtain the target image according to the telephoto original image; and when the camera module is in a zoom mode greater than or equal to the second predetermined zoom factor, control the telephoto camera to use the second telephoto The telephoto original image is acquired in a state, and the target image is obtained according to the telephoto original image.
  • the computer-readable storage medium provided by the embodiments of the present application includes a computer program used in combination with an electronic device.
  • the computer program may be executed by the processor of the electronic device to complete the following zoom method.
  • the zoom method is used in an electronic device, and the electronic device includes a camera module.
  • the camera module includes a main camera and a telephoto camera.
  • the main camera is used to obtain a main original image with a first pixel size.
  • the telephoto camera is used to obtain a telephoto original image with a second pixel size.
  • the telephoto camera includes a first telephoto state and a second telephoto state.
  • the camera module is used to output a target image with a third pixel size. Both the first pixel size and the second pixel size are larger than the third pixel size.
  • the zoom method includes: when the camera module is in a zoom mode less than a first predetermined zoom factor, controlling the main camera to obtain the main original image, and obtain the target image according to the main original image; When the camera module is in a zoom mode that is greater than or equal to the first predetermined zoom factor and less than the second predetermined zoom factor, controlling the telephoto camera to acquire the telephoto original image in the first telephoto state, And obtain the target image according to the telephoto original image; and when the camera module is in a zoom mode greater than or equal to the second predetermined zoom factor, control the telephoto camera to use the second telephoto The telephoto original image is acquired in a state, and the target image is obtained according to the telephoto original image.
  • FIG. 1 is a schematic flowchart of a zoom method according to some embodiments of the present application.
  • FIG. 2 is a schematic diagram of the structure of an electronic device according to some embodiments of the present application.
  • FIG. 3 is a schematic diagram of the resolution of a target image in an all-focus range according to some embodiments of the present application.
  • FIG. 4 is a schematic diagram of a first image processing process in some embodiments of the present application.
  • FIG. 5 is a schematic diagram of a first image processing process in some embodiments of the present application.
  • Fig. 6 is a schematic diagram of a second image processing process in some embodiments of the present application.
  • FIG. 7 is a schematic flowchart of a zoom method according to some embodiments of the present application.
  • FIG. 8 is a schematic diagram of a target image obtained from a main original image through first image processing in a 1x zoom mode in some embodiments of the present application;
  • FIG. 9 is a schematic diagram of a target image obtained from a main original image through a second image processing in a 2x zoom mode in some embodiments of the present application.
  • FIG. 10 is a schematic diagram of a target image obtained from a main original image through a first image processing and a second image processing in a zoom mode between 1x and 2x in some embodiments of the present application;
  • FIG. 11 is a schematic diagram of a target image obtained from a main original image through second image processing and magnification processing in a zoom mode between 2x and 3x in some embodiments of the present application;
  • FIG. 12 is a schematic flowchart of a zoom method according to some embodiments of the present application.
  • FIG. 13 is a schematic diagram of a target image obtained from a telephoto original image through first image processing in a 3x zoom mode in some embodiments of the present application;
  • FIG. 14 is a schematic diagram of a target image obtained from a telephoto original image through a first image processing and a second image processing in a 4x zoom mode in some embodiments of the present application;
  • 15 is a schematic diagram of a target image obtained from a telephoto original image through a first image processing and a second image processing in a zoom mode between 3x and 4x in some embodiments of the present application;
  • 16 is a schematic diagram of a target image obtained from a telephoto original image through a first image processing and a second image processing in a zoom mode between 4x and 5x in some embodiments of the present application;
  • FIG. 17 is a schematic diagram of a target image obtained from a telephoto original image through first image processing in a 5x zoom mode in some embodiments of the present application;
  • FIG. 18 is a schematic diagram of a target image obtained from a telephoto original image through a second image processing in a 10x zoom mode in some embodiments of the present application;
  • Fig. 19 is a schematic diagram of a target image obtained from a telephoto original image through a first image processing and a second image processing in a zoom mode between 5 times and 10 times in some embodiments of the present application;
  • FIG. 20 is a schematic diagram of the principle of a zoom method according to some embodiments of the present application.
  • FIG. 21 is a schematic diagram of an electronic device according to some embodiments of the present application.
  • FIG. 22 is a schematic diagram of a connection state between a computer-readable storage medium and an electronic device according to some embodiments of the present application.
  • the zoom method according to the embodiment of the present application is used in the electronic device 1000.
  • the electronic device 1000 includes a camera module 100.
  • the camera module 100 includes a main camera 10 and a telephoto camera 20.
  • the main camera 10 is used to obtain a main original image of a first pixel size
  • the telephoto camera 20 is used to obtain a telephoto original image of a second pixel size.
  • the telephoto camera 20 includes a first telephoto state and a second telephoto state.
  • the camera module 100 is used to output a target image of the third pixel size. Both the first pixel size and the second pixel size are larger than the third pixel size.
  • Zoom methods include:
  • the telephoto camera 20 is controlled to acquire the telephoto original image in the first telephoto state, and obtain the telephoto original image according to the telephoto original image.
  • Target image When the camera module 100 is in a zoom mode that is greater than or equal to the first predetermined zoom factor and less than the second predetermined zoom factor, the telephoto camera 20 is controlled to acquire the telephoto original image in the first telephoto state, and obtain the telephoto original image according to the telephoto original image.
  • Target image and
  • the telephoto camera 20 is controlled to acquire the telephoto original image in the second telephoto state, and the target image is obtained from the telephoto original image.
  • controlling the main camera 10 to obtain the main original image and obtain the target image according to the main original image including:
  • the camera module 100 When the camera module 100 is in the zoom mode of the first zoom factor, control the main camera 10 to obtain the main original image, and perform the first image processing on the main original image to obtain the target image;
  • the camera module 100 When the camera module 100 is in the zoom mode of the second zoom factor, control the main camera 10 to obtain the main original image, and perform the second image processing on the main original image to obtain the target image;
  • the camera module 100 When the camera module 100 is in a zoom mode between the first zoom factor and the second zoom factor, control the main camera 10 to obtain the main original image, and perform the first image processing and the second image processing on the main original image to obtain the target image; Wherein, the first zoom factor and the second zoom factor are both smaller than the first predetermined zoom factor.
  • the telephoto camera 20 when the camera module 100 is in a zoom mode greater than or equal to the second predetermined zoom factor, the telephoto camera 20 is controlled to acquire the telephoto original image in the second telephoto state, and according to The telephoto original image gets the target image, including:
  • the telephoto camera 20 is controlled to acquire the telephoto original image in the first telephoto state, and the first image processing and the second image processing are performed on the telephoto original image to obtain the target image;
  • the telephoto camera 20 is controlled to acquire the telephoto original image in the first telephoto state, and the telephoto original image is subjected to first image processing And the second image processing to obtain the target image;
  • the telephoto camera 20 is controlled to acquire the telephoto original image in the first telephoto state, and the telephoto original image is processed for the first image
  • the target image is obtained by processing and second image processing; wherein the third zoom factor is greater than or equal to the first predetermined zoom factor, and the fourth zoom factor is greater than the third zoom factor and less than the second predetermined zoom factor.
  • the telephoto camera 20 when the camera module 100 is in a zoom mode greater than or equal to the second predetermined zoom factor, the telephoto camera 20 is controlled to acquire the telephoto original image in the second telephoto state, and according to The telephoto original image gets the target image, including:
  • the telephoto camera 20 is controlled to acquire the telephoto original image in the second telephoto state, and the telephoto original image is subjected to the first image processing And the second image processing to obtain the target image; wherein the fifth zoom factor is greater than or equal to the second predetermined zoom factor, and the sixth zoom factor is greater than the fifth zoom factor.
  • the first image processing includes compression processing
  • the second image processing includes cropping processing
  • the electronic device 1000 includes a camera module 100 and a processor 200.
  • the camera module 100 includes a main camera 10 and a telephoto camera 20.
  • the main camera 10 is used to obtain a main original image of a first pixel size
  • the telephoto camera 20 is used to obtain a telephoto original image of a second pixel size.
  • the telephoto camera 20 includes a first telephoto state and a second telephoto state.
  • the camera module 100 is used to output a target image of the third pixel size. Both the first pixel size and the second pixel size are larger than the third pixel size.
  • the processor 200 is used for:
  • the telephoto camera 20 is controlled to acquire the telephoto original image in the first telephoto state, and obtain the telephoto original image according to the telephoto original image.
  • Target image When the camera module 100 is in a zoom mode that is greater than or equal to the first predetermined zoom factor and less than the second predetermined zoom factor, the telephoto camera 20 is controlled to acquire the telephoto original image in the first telephoto state, and obtain the telephoto original image according to the telephoto original image.
  • Target image and
  • the telephoto camera 20 is controlled to acquire the telephoto original image in the second telephoto state, and the target image is obtained from the telephoto original image.
  • the processor 200 is further configured to:
  • the camera module 100 When the camera module 100 is in the zoom mode of the first zoom factor, control the main camera 10 to obtain the main original image, and perform the first image processing on the main original image to obtain the target image;
  • the camera module 100 When the camera module 100 is in the zoom mode of the second zoom factor, control the main camera 10 to obtain the main original image, and perform the second image processing on the main original image to obtain the target image;
  • the camera module 100 When the camera module 100 is in a zoom mode between the first zoom factor and the second zoom factor, control the main camera 10 to obtain the main original image, and perform the first image processing and the second image processing on the main original image to obtain the target image; Wherein, the first zoom factor and the second zoom factor are both smaller than the first predetermined zoom factor.
  • the processor 200 is further configured to:
  • the telephoto camera 20 is controlled to acquire the telephoto original image in the first telephoto state, and the first image processing and the second image processing are performed on the telephoto original image to obtain the target image;
  • the telephoto camera 20 is controlled to acquire the telephoto original image in the first telephoto state, and the telephoto original image is subjected to first image processing And the second image processing to obtain the target image;
  • the telephoto camera 20 is controlled to acquire the telephoto original image in the first telephoto state, and the telephoto original image is processed for the first image
  • the target image is obtained by processing and second image processing; wherein the third zoom factor is greater than or equal to the first predetermined zoom factor, and the fourth zoom factor is greater than the third zoom factor and less than the second predetermined zoom factor.
  • the processor 200 is further configured to:
  • the telephoto camera 20 is controlled to acquire the telephoto original image in the second telephoto state, and the telephoto original image is subjected to the first image processing And the second image processing to obtain the target image; wherein the fifth zoom factor is greater than or equal to the second predetermined zoom factor, and the sixth zoom factor is greater than the fifth zoom factor.
  • the first image processing includes compression processing
  • the second image processing includes cropping processing
  • the electronic device 1000 includes a camera module 100.
  • the camera module 100 includes a main camera 10 and a telephoto camera 20.
  • the main camera 10 is used to obtain a main original image of a first pixel size
  • the telephoto camera 20 is used to obtain a telephoto original image of a second pixel size.
  • the telephoto camera 20 includes a first telephoto state and a second telephoto state.
  • the camera module 100 is used to output a target image of the third pixel size. Both the first pixel size and the second pixel size are larger than the third pixel size.
  • the main camera 10 When the camera module 100 is in a zoom mode that is less than the first predetermined zoom factor, the main camera 10 is controlled to obtain the main original image, and the target image is obtained according to the main original image; when the camera module 100 is greater than or equal to the first predetermined zoom factor and When the zoom mode is less than the second predetermined zoom factor, the telephoto camera 20 is controlled to acquire the telephoto original image in the first telephoto state, and the target image is obtained according to the telephoto original image; and when the camera module 100 is greater than or equal to the second In the zoom mode of the predetermined zoom factor, the telephoto camera 20 is controlled to acquire the telephoto original image in the second telephoto state, and the target image is obtained according to the telephoto original image.
  • the main camera 10 when the camera module 100 is in the zoom mode of the first zoom factor, the main camera 10 is controlled to obtain the main original image, and the first image processing is performed on the main original image to obtain the target image;
  • the main camera 10 is controlled to obtain the main original image, and the second image processing is performed on the main original image to obtain the target image;
  • the camera module 100 is at the first zoom factor and the second zoom factor In the zoom mode between the two zoom multiples, control the main camera 10 to obtain the main original image, and perform the first image processing and the second image processing on the main original image to obtain the target image; wherein, the first zoom multiple and the second zoom multiple are both Less than the first predetermined zoom factor.
  • the telephoto camera 20 when the camera module 100 is in the zoom mode of the third zoom factor, the telephoto camera 20 is controlled to obtain the telephoto original image in the first telephoto state, and the telephoto original image Perform the first image processing to obtain the target image; when the camera module 100 is in the zoom mode of the fourth zoom factor, control the telephoto camera 20 to acquire the telephoto original image in the first telephoto state, and perform the first telephoto image on the telephoto original image.
  • Image processing and second image processing to obtain the target image when the camera module 100 is in a zoom mode between the third zoom factor and the fourth zoom factor, the telephoto camera 20 is controlled to acquire the telephoto original image in the first telephoto state, And perform first image processing and second image processing on the telephoto original image to obtain the target image; and when the camera module 100 is in a zoom mode between the fourth zoom factor and the second predetermined zoom factor, the telephoto camera 20 is controlled to The first telephoto state acquires the telephoto original image, and performs the first image processing and the second image processing on the telephoto original image to obtain the target image; wherein, the third zoom factor is greater than or equal to the first predetermined zoom factor, and the fourth zoom factor is It is greater than the third zoom factor and smaller than the second predetermined zoom factor.
  • the telephoto camera 20 when the camera module 100 is in the zoom mode of the fifth zoom factor, the telephoto camera 20 is controlled to obtain the telephoto original image in the second telephoto state, and the telephoto original image is Perform the first image processing to obtain the target image; when the camera module 100 is in the zoom mode of the sixth zoom factor, control the telephoto camera 20 to acquire the telephoto original image in the second telephoto state, and perform the second telephoto image on the telephoto original image.
  • Image processing to obtain the target image and when the camera module 100 is in the zoom mode between the fifth zoom factor and the sixth zoom factor, the telephoto camera 20 is controlled to acquire the telephoto original image in the second telephoto state, and the telephoto The original image is subjected to first image processing and second image processing to obtain a target image; wherein the fifth zoom factor is greater than or equal to the second predetermined zoom factor, and the sixth zoom factor is greater than the fifth zoom factor.
  • the first image processing includes compression processing
  • the second image processing includes cropping processing
  • an embodiment of the present application further provides an electronic device 1000.
  • the electronic device 1000 includes one or more processors 200, a memory 300, and one or more programs.
  • One or more programs are stored in the memory 300 and configured to be executed by one or more processors 200.
  • the program includes instructions for executing the zoom method of any of the above embodiments.
  • the zoom method is used for the electronic device 1000.
  • the electronic device 1000 includes a camera module 100.
  • the camera module 100 includes a main camera 10 and a telephoto camera 20.
  • the main camera 10 is used to obtain a main original image of a first pixel size
  • the telephoto camera 20 is used to obtain a telephoto original image of a second pixel size.
  • the telephoto camera 20 includes a first telephoto state and a second telephoto state.
  • the camera module 100 is used to output a target image of the third pixel size. Both the first pixel size and the second pixel size are larger than the third pixel size. Zoom methods include:
  • the telephoto camera 20 is controlled to acquire the telephoto original image in the first telephoto state, and obtain the telephoto original image according to the telephoto original image.
  • Target image When the camera module 100 is in a zoom mode that is greater than or equal to the first predetermined zoom factor and less than the second predetermined zoom factor, the telephoto camera 20 is controlled to acquire the telephoto original image in the first telephoto state, and obtain the telephoto original image according to the telephoto original image.
  • Target image and
  • the telephoto camera 20 is controlled to acquire the telephoto original image in the second telephoto state, and the target image is obtained from the telephoto original image.
  • controlling the main camera 10 to obtain the main original image and obtain the target image according to the main original image including:
  • the camera module 100 When the camera module 100 is in the zoom mode of the first zoom factor, control the main camera 10 to obtain the main original image, and perform the first image processing on the main original image to obtain the target image;
  • the camera module 100 When the camera module 100 is in the zoom mode of the second zoom factor, control the main camera 10 to obtain the main original image, and perform the second image processing on the main original image to obtain the target image;
  • the camera module 100 When the camera module 100 is in a zoom mode between the first zoom factor and the second zoom factor, control the main camera 10 to obtain the main original image, and perform the first image processing and the second image processing on the main original image to obtain the target image; Wherein, the first zoom factor and the second zoom factor are both smaller than the first predetermined zoom factor.
  • the telephoto camera 20 when the camera module 100 is in a zoom mode greater than or equal to the second predetermined zoom factor, the telephoto camera 20 is controlled to acquire the telephoto original image in the second telephoto state, and according to The telephoto original image gets the target image, including:
  • the telephoto camera 20 is controlled to acquire the telephoto original image in the first telephoto state, and the first image processing and the second image processing are performed on the telephoto original image to obtain the target image;
  • the telephoto camera 20 is controlled to acquire the telephoto original image in the first telephoto state, and the telephoto original image is subjected to first image processing And the second image processing to obtain the target image;
  • the telephoto camera 20 is controlled to acquire the telephoto original image in the first telephoto state, and the telephoto original image is processed for the first image
  • the target image is obtained by processing and second image processing; wherein the third zoom factor is greater than or equal to the first predetermined zoom factor, and the fourth zoom factor is greater than the third zoom factor and less than the second predetermined zoom factor.
  • the telephoto camera 20 when the camera module 100 is in a zoom mode greater than or equal to the second predetermined zoom factor, the telephoto camera 20 is controlled to acquire the telephoto original image in the second telephoto state, and according to The telephoto original image gets the target image, including:
  • the telephoto camera 20 is controlled to acquire the telephoto original image in the second telephoto state, and the telephoto original image is subjected to the first image processing And the second image processing to obtain the target image; wherein the fifth zoom factor is greater than or equal to the second predetermined zoom factor, and the sixth zoom factor is greater than the fifth zoom factor.
  • the first image processing includes compression processing
  • the second image processing includes cropping processing
  • an embodiment of the present application provides a zoom method.
  • the zoom method is used for the electronic device 1000.
  • the electronic device 1000 includes a camera module 100.
  • the camera module 100 includes a main camera 10 and a telephoto camera 20.
  • the main camera 10 is used to obtain a main original image of a first pixel size
  • the telephoto camera 20 is used to obtain a telephoto original image of a second pixel size.
  • the telephoto camera 20 includes a first telephoto state and a second telephoto state.
  • the camera module 100 is used to output a target image of the third pixel size. Both the first pixel size and the second pixel size are larger than the third pixel size.
  • Zoom methods include:
  • an embodiment of the present application also provides an electronic device 1000.
  • the electronic device 1000 includes a camera module 100 and a processor 200.
  • the camera module 100 includes a main camera 10 and a telephoto camera 20.
  • the main camera 10 is used to obtain a main original image of a first pixel size
  • the telephoto camera 20 is used to obtain a telephoto original image of a second pixel size.
  • the telephoto camera 20 includes a first telephoto state and a second telephoto state.
  • the camera module 100 is used to output a target image of the third pixel size. Both the first pixel size and the second pixel size are larger than the third pixel size.
  • the zoom method of the embodiment of the present application can be implemented by the electronic device 1000 of the embodiment of the present application.
  • the processor 200 may be used to execute the methods in 01, 02, and 03.
  • the processor 200 can be used to: when the camera module 100 is in a zoom mode less than the first predetermined zoom factor, control the main camera 10 to obtain the main original image, and obtain the target image according to the main original image; in the camera module When the group 100 is in a zoom mode that is greater than or equal to the first predetermined zoom factor and less than the second predetermined zoom factor, control the telephoto camera 20 to acquire the telephoto original image in the first telephoto state, and obtain the target image according to the telephoto original image; And when the camera module 100 is in a zoom mode greater than or equal to the second predetermined zoom factor, the telephoto camera 20 is controlled to acquire the telephoto original image in the second telephoto state, and the target image is obtained according to the telephoto original image.
  • an embodiment of the present application also provides an electronic device 1000.
  • the electronic device 1000 includes a camera module 100.
  • the camera module 100 includes a main camera 10 and a telephoto camera 20.
  • the main camera 10 is used to obtain a main original image of a first pixel size
  • the telephoto camera 20 is used to obtain a telephoto original image of a second pixel size.
  • the telephoto camera 20 includes a first telephoto state and a second telephoto state.
  • the camera module 100 is used to output a target image of the third pixel size. Both the first pixel size and the second pixel size are larger than the third pixel size.
  • the zoom method of the embodiment of the present application can be implemented by the electronic device 1000 of the embodiment of the present application.
  • the camera module 100 can be used to execute the methods in 01, 02, and 03.
  • the main camera 10 can obtain the main original image, and the camera module 100 can obtain the target image according to the main original image;
  • the telephoto camera 20 can acquire the telephoto original image in the first telephoto state, and the camera module 100 can acquire the target image according to the telephoto original image ;
  • the telephoto camera 20 can acquire the telephoto original image in the second telephoto state, and the camera module 100 can obtain the target image according to the telephoto original image .
  • the implementation manner of the present application may be: in the first manner, the processor 200 controls the main camera 10 to obtain the main original image, controls the telephoto camera 20 to obtain the telephoto original image in the first telephoto state, and controls the telephoto
  • the camera 20 obtains the telephoto original image in the second telephoto state, and performs related image processing on the main original image and the telephoto original image to obtain the target image; or in the second way, the main camera 10 directly obtains the main original image ( Instead of being controlled by the processor 200), the telephoto camera 20 directly acquires the telephoto original image in the first telephoto state (not due to the control of the processor 200), and the telephoto camera 20 directly acquires the telephoto original image in the second telephoto state.
  • the camera module 100 performs related image processing on the main original image and the telephoto original image to obtain the target image.
  • the implementation manners of this application are described by taking the above-mentioned first manner as an example, and the second manner is similar to the first manner, and the description is not repeated.
  • the zoom method and the electronic device 1000 of the embodiment of the present application are provided with a main camera 10 and a telephoto camera 20, and the telephoto camera 20 includes a first telephoto state and a second telephoto state, so that in zoom modes with different zoom multiples,
  • the target image is obtained according to the main original image obtained by the main camera 10, the telephoto original image obtained by the telephoto camera 20 in the first telephoto state, and the telephoto original image obtained by the telephoto camera 20 in the second telephoto state, respectively. Ensure that the resolution of the target image at all focal lengths remains unchanged, and improve imaging performance.
  • the electronic device 1000 may be a mobile phone, a tablet computer, a notebook computer, a smart wearable device (such as a smart watch, a smart bracelet, a smart glasses, a smart helmet, etc.), a head-mounted display device, a virtual reality device, etc., which will not be done here. limit.
  • a smart wearable device such as a smart watch, a smart bracelet, a smart glasses, a smart helmet, etc.
  • a head-mounted display device such as a smart watch, a smart bracelet, a smart glasses, a smart helmet, etc.
  • a virtual reality device etc.
  • the main camera 10 is used to obtain a main original image of a first pixel size
  • the telephoto camera 20 is used to obtain a telephoto original image of a second pixel size
  • the camera module 100 finally outputs a target image of a third pixel size.
  • Both the first pixel size and the second pixel size are larger than the third pixel size.
  • it can be: the first pixel size is greater than the second pixel size, and the second pixel size is greater than the third pixel size; or, the first pixel size is equal to the second pixel size, and the first pixel size (second pixel size) is greater than the third pixel Size; or, the first pixel size is smaller than the second pixel size, and the first pixel size is larger than the third pixel size.
  • the embodiments of the present application are described by taking an example that the first pixel size is equal to the second pixel size, and the first pixel size (the second pixel size) is greater than the third pixel size.
  • the first pixel size may be 48 million pixels
  • the second pixel size may be 48 million pixels
  • the third pixel size may be 12 million pixels.
  • the main camera 10 can be a normal camera (the field of view is between the field of view of the telephoto camera and the field of view of the wide-angle camera), or a wide-angle camera.
  • the main camera 10 can be a fixed focus lens or a zoom lens .
  • the telephoto camera 20 is a zoom lens, and the telephoto camera 20 can include a first telephoto state and a second telephoto state.
  • the first telephoto state may be a state in which the telephoto camera 20 obtains a telephoto original image with a first predetermined multiple of optical zoom.
  • the second telephoto state may be a state in which the telephoto camera 20 acquires a telephoto original image with a second predetermined multiple of optical zoom.
  • the focal length corresponding to the second long focal length state is greater than the focal length corresponding to the first long focal length state.
  • the main camera 10 can be used to capture the image; when the camera module 100 is used to obtain a target image of a medium-distance subject, the long The telephoto camera 20 captures images in the first telephoto state; when the camera module 100 is used to acquire a target image of a subject at a longer distance, the telephoto camera 20 can be used to capture images in the second telephoto state.
  • the camera module 100 of the embodiment of the present application can work in a zoom mode less than a first predetermined zoom factor, a zoom mode greater than or equal to a first predetermined zoom factor and less than a second predetermined zoom factor, and a zoom mode greater than or equal to The zoom mode of the second predetermined zoom factor.
  • the embodiment of this application takes the first predetermined zoom factor of 3 times and the second predetermined zoom factor of 5 times as an example for description, that is, the camera module 100 can work in a zoom mode less than 3 times, greater than or equal to 3 times and less than 5 times.
  • the first predetermined zoom factor may not be 3 times, and the second predetermined zoom factor may not be 5 times.
  • the first predetermined zoom magnification can be set to other magnifications such as 2 times, 4 times, or 5 times.
  • the zoom magnification corresponding to the first long focal length state of the telephoto camera 20 also corresponds to other magnifications such as 2 times, 4 times, or 5 times.
  • the second predetermined zoom factor can be set to other magnifications such as 3 times, 4 times, or 6 times.
  • the zoom factor corresponding to the second long focal length state of the telephoto camera 20 also corresponds to other magnifications such as 3 times, 4 times, or 6 times.
  • the zoom factor corresponding to the first telephoto state of the telephoto camera 20 is also corresponding to 2 times
  • the second predetermined zoom factor can be set to 3 times.
  • the zoom factor corresponding to the second long focal length state also corresponds to 3 times; when the first predetermined zoom factor is set to 4 times, the zoom factor corresponding to the first long focal length state of the telephoto camera 20 also corresponds to 4 times, and the second predetermined zoom factor
  • the zoom factor can be set to 6 times, and the zoom factor corresponding to the second long focal length state of the telephoto camera 20 also corresponds to 6 times; when the first predetermined zoom factor is set to 5 times, the first long focal length state of the telephoto camera 20
  • the corresponding zoom factor also corresponds to 5 times
  • the second predetermined zoom factor can be set to 6 times
  • the zoom factor corresponding to the second long focal length state of the telephoto camera 20 also corresponds to 6 times.
  • the camera module 100 can zoom in the (0, 3) zoom multiple range, and the main original image is obtained by the main camera 10 in this interval, thereby obtaining the target image.
  • the camera module 100 can also perform zooming in the [3, 5) zoom multiple range, in which the telephoto camera 20 acquires the telephoto original image in the first telephoto state to obtain the target image.
  • the camera module 100 can also perform zooming in the [5, 10] zoom multiple range, in which the telephoto camera 20 acquires the telephoto original image in the second telephoto state to obtain the target image.
  • the zoom method of the embodiment of the present application can ensure that the resolution of the target image in the full focal range (0, 10) is unchanged, and the imaging performance is improved.
  • the process of obtaining the target image from the main original image or the telephoto original image may include a process of performing image processing on the main original image or the telephoto original image, such as first image processing and/or second image processing.
  • image processing By performing the first image processing and/or the second image processing on the main original image or the telephoto original image, a target image of 12 million pixels can be obtained from the main original image of 48 million pixels or the original telephoto image of 48 million pixels.
  • the first image processing may be compression processing
  • the second image processing may be cropping processing.
  • the process of obtaining the target image from the main original image or the telephoto original image may also include not only the first image processing and/or the second image processing, but also more methods of image processing. This is not limited.
  • the compression process may include an averaging operation.
  • each frame of the main original image and each frame of the telephoto original image (hereinafter collectively referred to as the original image) includes a plurality of pixels distributed in two dimensions, for example, 4*4 pixels.
  • the pixel values of multiple pixels from left to right and top to bottom are: 135, 132, 120, 105, 160, 140, 112, 110, 153, 89, 87, 62, 105, 87, 53, 45.
  • a predetermined number of pixels in multiple pixels can be used as a group (for example, 4 pixels circled by a dashed frame as a group), by compressing the pixel values of 4 pixels in each group, a merged target image is finally obtained
  • the pixel values of the 4 pixels in the upper right corner are averaged, and the pixel value of the combined pixel in the upper right corner of the target image is 112; the pixel values of the 4 pixels in the lower left corner are averaged to get the target
  • the pixel value of the merged pixel in the lower left corner of the image is 109; the pixel value of the 4 pixels in the lower right corner is averaged, and the pixel value of the merged pixel in the lower right corner of the target image is 62, which will not be expanded here. Description.
  • a combined pixel with a pixel value of 133, a combined pixel with a pixel value of 112, a combined pixel with a pixel value of 109, and a combined pixel with a pixel value of 62 form a target image.
  • the processor 200 needs to average the 48 million pixels in the original image to obtain a target image of 12 million pixels.
  • the number of pixels to be processed far exceeds the 4*4 in the above example. Pixels.
  • the pixel values of the target image obtained by compression processing are directly derived from the original image, and no pixels are added, so the resolution of the target image obtained by compressing the original image will not decrease.
  • the compression process may include a maximum value operation. Still taking the aforementioned 4*4 pixel original image as an example, by compressing the pixel values of 4 pixels in each group, the pixel value of a combined pixel in the target image is finally obtained.
  • the maximum value of the 4 pixels in the upper right corner is calculated, and the pixel value of the combined pixel in the upper right corner of the target image is 120; the maximum value of the 4 pixels in the lower left corner is calculated, The pixel value of the combined pixel in the lower left corner of the target image is 153; the maximum value of the four pixels in the lower right corner is calculated, and the pixel value of the combined pixel in the lower right corner of the target image is 87.
  • a combined pixel with a pixel value of 160, a combined pixel with a pixel value of 120, a combined pixel with a pixel value of 153, and a combined pixel with a pixel value of 87 form a target image.
  • the processor 200 needs to perform a maximum operation on the 48 million pixels in the original image to obtain a target image of 12 million pixels.
  • the number of pixels to be processed far exceeds the 4*4 in the above example. Of pixels.
  • the pixel values of the target image obtained by compression processing are all derived from the original image (the pixel values are all the original values in the original image), and no pixels are added, so the target image obtained by compressing the original image The resolution will not decrease.
  • the cropping process may include cutting out a pixel area with the same aspect ratio as the original image from the original image, and using this pixel area as the target image, and discarding the pixels outside the pixel area.
  • the number of pixels of the image captured by the cropping process is one-fourth of the number of pixels of the original image, so the length and width are the same as those of the original image.
  • One-half, the field of view of the target image is one-half of the original image, and the visual effect is a 2x zoom visual effect.
  • the pixel values of the target image obtained by cropping are all derived from the original image (the pixel values are all the original values in the original image), and no pixels are added, so the target image obtained by cropping the original image The resolution will not decrease.
  • the main camera 10 is controlled to obtain the main original image, and the target image (that is, 01) is obtained according to the main original image.
  • the first zoom factor and the second zoom factor are both smaller than the first predetermined zoom factor.
  • the processor 200 may be used to execute the methods in 011, 012, and 013.
  • the processor 200 may be used to: when the camera module 100 is in the zoom mode of the first zoom factor, control the main camera 10 to obtain the main original image, and perform the first image processing on the main original image to obtain the target image; When the camera module 100 is in the zoom mode of the second zoom factor, control the main camera 10 to acquire the main original image, and perform the second image processing on the main original image to obtain the target image; and when the camera module 100 is at the first zoom factor and In the zoom mode between the second zoom factor, the main camera 10 is controlled to obtain the main original image, and the first image processing and the second image processing are performed on the main original image to obtain the target image; wherein, the first zoom factor and the second zoom factor Both are smaller than the first predetermined zoom factor.
  • the camera module 100 can be used to execute the methods in 011, 012, and 013.
  • the main camera 10 when the camera module 100 is in the zoom mode of the first zoom factor, the main camera 10 can obtain the main original image, and the camera module 100 can perform the first image processing on the main original image to obtain the target image;
  • the main camera 10 when the group 100 is in the zoom mode of the second zoom factor, the main camera 10 can obtain the main original image, and the camera module 100 can perform the second image processing on the main original image to obtain the target image;
  • the main camera 10 can obtain the main original image, and the camera module 100 can perform the first image processing and the second image processing on the main original image to obtain the target image; wherein, the first zoom factor and The second zoom multiples are all less than the first predetermined zoom multiples.
  • the embodiment of the present application is described by taking an example in which the first zoom factor is 1 time and the second zoom factor is 2 times.
  • the fixed focal length of the main camera 10 may be the focal length corresponding to the first zoom factor.
  • the processor 200 controls the main camera 10 to obtain a main original image of 48 million pixels, and compresses the main original image of 48 million pixels to obtain 12 million pixels.
  • the target image may be the aforementioned mean value operation or maximum value operation.
  • the electronic device 1000 can output a target image of 12 million pixels with a constant field of view.
  • the processor 200 controls the main camera 10 to obtain a main original image of 48 million pixels, and performs cropping processing on the main original image of 48 million pixels to obtain 12 million pixels.
  • the target image Since the field of view corresponding to the 2x zoom mode is generally smaller than the field of view corresponding to the 1x zoom mode, the implementation of this application needs to crop the main original image of 48 million pixels to reduce the field of view. This allows the electronic device 1000 to output a target image of 12 million pixels with a reduced field of view and a constant resolution compared to the 1x zoom mode.
  • the area intercepted by the cropping process may be the middle area of the main original image, or may be an area determined according to user input.
  • the processor 200 controls the main camera 10 to obtain a main original image of 48 million pixels, and compares the 4800
  • the main original image of megapixels is cropped and compressed to obtain a target image of 12 million pixels.
  • the processor 200 may first perform cropping processing on the main original image of 48 million pixels to obtain an intermediate image, and then perform compression processing on the intermediate image to obtain a target image of 12 million pixels.
  • the pixel size of the intermediate image is smaller than the pixel size of the main original image and larger than the pixel size of the target image. For example, the pixel size of the intermediate image may be 21 million pixels.
  • the processor 200 first performs cropping processing on the main original image of 48 million pixels to obtain an intermediate image of 21 million pixels.
  • the area intercepted by the cropping processing may be the middle area of the main original image, or an area determined according to user input.
  • the processor 200 performs compression processing on the 21 million pixel intermediate image to obtain a 12 million pixel target image, and the compression processing may be the aforementioned mean value operation or maximum value operation. Since the field of view corresponding to the 1.5x zoom mode is generally smaller than the field of view corresponding to the 1x zoom mode, the embodiment of the present application needs to perform cropping processing on the main original image of 48 million pixels to obtain an intermediate image of 21 million pixels. In order to reduce the field of view, the 21 million pixel intermediate image is compressed to make the electronic device 1000 output a 12 million pixel target image with a reduced field of view and unchanged resolution compared to the 1x zoom mode. .
  • the processor 200 controls the main camera 10 to obtain a main original image of 48 million pixels, and The main original image of 48 million pixels is cropped and enlarged to obtain a target image of 12 million pixels.
  • the processor 200 may specifically first perform cropping processing on the main original image of 48 million pixels to obtain an intermediate image, and then perform enlargement processing on the intermediate image to obtain a target image of 12 million pixels.
  • the pixel size of the intermediate image may be smaller than the pixel size of the main original image and smaller than the pixel size of the target image. For example, the pixel size of the intermediate image may be 8 million pixels.
  • the processor 200 first performs cropping processing on the main original image of 48 million pixels to obtain an intermediate image of 8 million pixels.
  • the area intercepted by the cropping processing may be the middle area of the main original image, or an area determined according to user input.
  • the processor 200 performs a magnification process on the 8-megapixel intermediate image to obtain a 12-megapixel target image, and the magnification process may be to directly enlarge the image by zooming. It can be understood that the 12-megapixel target image is obtained by enlarging the 8-megapixel intermediate image, and the image resolution is slightly reduced, which can almost be regarded as unchanged.
  • the implementation of this application needs to perform cropping processing on the main original image of 48 million pixels to obtain an intermediate image of 8 million pixels.
  • the 8 million pixel intermediate image is enlarged to make the electronic device 1000 output compared to the 1x zoom mode, the field of view is reduced, and the resolution is almost unchanged. image.
  • the telephoto camera 20 when the camera module 100 is in a zoom mode that is greater than or equal to the first predetermined zoom factor and less than the second predetermined zoom factor, the telephoto camera 20 is controlled to acquire in the first telephoto state
  • the telephoto original image, and the target image (ie 02) is obtained according to the telephoto original image, including:
  • the third zoom factor is greater than or equal to the first predetermined zoom factor
  • the fourth zoom factor is greater than the third zoom factor and less than the second predetermined zoom factor
  • the processor 200 may be used to execute the methods in 021, 022, 023, and 024.
  • the processor 200 can be used to: when the camera module 100 is in the zoom mode of the third zoom factor, control the telephoto camera 20 to acquire the telephoto original image in the first telephoto state, and compare the telephoto original image Perform the first image processing to obtain the target image; when the camera module 100 is in the zoom mode of the fourth zoom factor, control the telephoto camera 20 to acquire the telephoto original image in the first telephoto state, and perform the first telephoto image on the telephoto original image.
  • Image processing and second image processing to obtain the target image when the camera module 100 is in a zoom mode between the third zoom factor and the fourth zoom factor, the telephoto camera 20 is controlled to acquire the telephoto original image in the first telephoto state, And perform first image processing and second image processing on the telephoto original image to obtain the target image; and when the camera module 100 is in a zoom mode between the fourth zoom factor and the second predetermined zoom factor, the telephoto camera 20 is controlled to The first telephoto state acquires the telephoto original image, and performs the first image processing and the second image processing on the telephoto original image to obtain the target image; wherein the third zoom factor is greater than or equal to the first predetermined zoom factor, and the fourth zoom factor It is greater than the third zoom factor and smaller than the second predetermined zoom factor.
  • the camera module 100 can be used to perform the methods in 021, 022, 023, and 024.
  • the telephoto camera 20 when the camera module 100 is in the zoom mode of the third zoom factor, the telephoto camera 20 can acquire the telephoto original image in the first telephoto state, and the camera module 100 can perform the first telephoto image on the telephoto original image.
  • the target image is obtained by image processing; when the camera module 100 is in the zoom mode of the fourth zoom factor, the telephoto camera 20 can acquire the telephoto original image in the first telephoto state, and the camera module 100 can perform the first telephoto image on the telephoto original image.
  • the telephoto camera 20 can acquire the telephoto original image in the first telephoto state , The camera module 100 can perform the first image processing and the second image processing on the telephoto original image to obtain the target image; when the camera module 100 is in the zoom mode between the fourth zoom factor and the second predetermined zoom factor, the telephoto The camera 20 can acquire the telephoto original image in the first telephoto state, and the camera module 100 can perform the first image processing and the second image processing on the telephoto original image to obtain the target image; wherein the third zoom factor is greater than or equal to the first A predetermined zoom factor, and the fourth zoom factor is greater than the third zoom factor and smaller than the second predetermined zoom factor.
  • the embodiment of the present application is described by taking as an example the third zoom factor of 3 times and the fourth zoom factor of 4 times.
  • the first telephoto state may be a state in which the telephoto camera 20 acquires a telephoto original image of 48 million pixels with a 3x optical zoom.
  • the processor 200 controls the telephoto camera 20 to obtain the 48-megapixel telephoto original image in the first telephoto state, and adjusts the 48-megapixel telephoto
  • the original image is compressed to obtain a target image of 12 million pixels.
  • the compression process may be the aforementioned mean value operation or maximum value operation.
  • the embodiment of the application compresses the original telephoto image of 48 million pixels, and the electronic device 1000 can output the original telephoto image obtained in a zoom mode of 3x compared with the same field of view, and compared to 1x.
  • the 12 million pixel target image with the same resolution of the target image obtained in the zoom mode.
  • the processor 200 controls the telephoto camera 20 to obtain the 48-megapixel telephoto original image in the first telephoto state, and adjusts the 48-megapixel telephoto
  • the original image is cropped and compressed to obtain a target image of 12 million pixels.
  • the processor 200 may specifically first perform cropping processing on the 48 million pixel telephoto original image to obtain an intermediate image, and then perform compression processing on the intermediate image to obtain a 12 million pixel target image.
  • the pixel size of the intermediate image is smaller than the pixel size of the original telephoto image and larger than the pixel size of the target image. For example, the pixel size of the intermediate image may be 21 million pixels.
  • the processor 200 first crops the 48 million pixel telephoto original image to obtain a 21 million pixel intermediate image.
  • the cropped area can be the middle area of the telephoto original image, or it can be determined according to user input. area.
  • the processor 200 performs compression processing on the 21 million pixel intermediate image to obtain a 12 million pixel target image, and the compression processing may be the aforementioned mean value operation or maximum value operation.
  • the implementation of this application needs to perform cropping processing on the 48 million pixel telephoto original image to obtain a 21 million pixel intermediate image . To reduce the field of view, and then compress the 21 million pixel intermediate image so that the electronic device 1000 can output a reduced field of view compared to the 3x zoom mode, and the resolution power of the 3x zoom mode The same (because the resolution of the 3x zoom mode is the same as the resolution of the 1x zoom mode, so here is also the same as the resolution of the 1x zoom mode) 12 million pixel target image.
  • the processor 200 controls the telephoto camera 20 to obtain 48 million pixels in the first telephoto state.
  • the telephoto original image is cropped and compressed on the 48 million pixel telephoto original image to obtain a 12 million pixel target image.
  • the processor 200 may specifically first perform cropping processing on the 48 million pixel telephoto original image to obtain an intermediate image, and then perform compression processing on the intermediate image to obtain a 12 million pixel target image.
  • the pixel size of the intermediate image is smaller than the pixel size of the original telephoto image, and larger than the pixel size of the target image. For example, the pixel size of the intermediate image may be 34 million pixels.
  • the processor 200 first crops the 48 million pixel telephoto original image to obtain a 34 million pixel intermediate image.
  • the cropped area can be the middle area of the telephoto original image, or it can be determined according to user input. area.
  • the processor 200 performs compression processing on the 34 million pixel intermediate image to obtain a 12 million pixel target image, and the compression processing may be the aforementioned mean value operation or maximum value operation.
  • the implementation of this application needs to perform cropping processing on the 48 million pixel telephoto original image to obtain a 34 million pixel intermediate image . To reduce the field of view, and then compress the 34 million pixel intermediate image so that the electronic device 1000 can output a reduced field of view compared to the 3x zoom mode, and the resolution of the 3x zoom mode The same (because the resolution of the 3x zoom mode is the same as the resolution of the 1x zoom mode, so here is also the same as the resolution of the 1x zoom mode) 12 million pixel target image.
  • the processor 200 controls the telephoto camera 20 to obtain 48 million pixels in the first telephoto state.
  • the telephoto original image is cropped and compressed on the 48 million pixel telephoto original image to obtain a 12 million pixel target image.
  • the processor 200 may specifically first perform cropping processing on the 48 million pixel telephoto original image to obtain an intermediate image, and then perform compression processing on the intermediate image to obtain a 12 million pixel target image.
  • the pixel size of the intermediate image is smaller than the pixel size of the original telephoto image, and larger than the pixel size of the target image. For example, the pixel size of the intermediate image may be 19 million pixels.
  • the processor 200 first crops the 48 million pixel telephoto original image to obtain a 19 million pixel intermediate image.
  • the cropped area can be the middle area of the telephoto original image, or it can be determined according to user input. area.
  • the processor 200 performs compression processing on the 19 million pixel intermediate image to obtain a 12 million pixel target image, and the compression processing may be the aforementioned average value operation or maximum value operation. Since the field of view corresponding to the 4.5x zoom mode is generally smaller than the field of view corresponding to the 3x zoom mode, the implementation of this application needs to crop the original telephoto image of 48 million pixels to obtain an intermediate image of 19 million pixels.
  • the telephoto camera 20 when the camera module 100 is in a zoom mode greater than or equal to the second predetermined zoom factor, the telephoto camera 20 is controlled to acquire the telephoto original image in the second telephoto state, and according to The telephoto original image gets the target image (ie 03), including:
  • the fifth zoom factor is greater than or equal to the second predetermined zoom factor
  • the sixth zoom factor is greater than the fifth zoom factor
  • the processor 200 may be used to execute the methods in 031, 032 and 033.
  • the processor 200 can be used to: when the camera module 100 is in the zoom mode of the fifth zoom factor, control the telephoto camera 20 to acquire the telephoto original image in the second telephoto state, and compare the telephoto original image Perform the first image processing to obtain the target image; when the camera module 100 is in the zoom mode of the sixth zoom factor, control the telephoto camera 20 to acquire the telephoto original image in the second telephoto state, and perform the second telephoto image on the telephoto original image.
  • Image processing to obtain the target image and when the camera module 100 is in the zoom mode between the fifth zoom factor and the sixth zoom factor, the telephoto camera 20 is controlled to acquire the telephoto original image in the second telephoto state, and the telephoto The original image is subjected to first image processing and second image processing to obtain a target image; wherein the fifth zoom factor is greater than or equal to the second predetermined zoom factor, and the sixth zoom factor is greater than the fifth zoom factor.
  • the camera module 100 can be used to execute the methods in 031, 032 and 033.
  • the telephoto camera 20 when the camera module 100 is in the zoom mode of the fifth zoom factor, the telephoto camera 20 can acquire the telephoto original image in the second telephoto state, and the camera module 100 can perform the first telephoto image on the telephoto original image.
  • the target image is obtained by image processing; when the camera module 100 is in the zoom mode of the sixth zoom factor, the telephoto camera 20 can acquire the telephoto original image in the second telephoto state, and the camera module 100 can perform the first telephoto image on the telephoto original image. 2.
  • the target image is obtained by image processing; when the camera module 100 is in a zoom mode between the fifth zoom factor and the sixth zoom factor, the telephoto camera 20 can acquire the telephoto original image in the second telephoto state, and the camera module 100
  • the target image can be obtained by performing first image processing and second image processing on the telephoto original image; wherein the fifth zoom factor is greater than or equal to the second predetermined zoom factor, and the sixth zoom factor is greater than the fifth zoom factor.
  • the embodiment of the present application is described with an example in which the fifth zoom factor is 5 times and the sixth zoom factor is 10 times.
  • the second telephoto state may be a state in which the telephoto camera 20 acquires a telephoto original image of 48 million pixels with a 5x optical zoom.
  • the processor 200 controls the telephoto camera 20 to obtain the 48-megapixel telephoto original image in the second telephoto state, and adjusts the 48-megapixel telephoto
  • the original image is compressed to obtain a target image of 12 million pixels.
  • the compression process may be the aforementioned mean value operation or maximum value operation.
  • the embodiment of the application compresses the original telephoto image of 48 million pixels, and the electronic device 1000 can output the original telephoto image obtained in a zoom mode of 5x with the same field of view as compared to 1x.
  • the 12 million pixel target image with the same resolution of the target image obtained in the zoom mode.
  • the processor 200 controls the telephoto camera 20 to obtain the 48-megapixel telephoto original image in the second telephoto state, and adjusts the 48-megapixel telephoto The original image is cropped to obtain a target image of 12 million pixels.
  • the implementation of this application needs to perform cropping processing on the 48 million pixel telephoto original image to reduce the field of view range .
  • the output of the electronic device 1000 is reduced compared to the 5x zoom mode, and the resolution of the 5x zoom mode remains unchanged (due to the resolution of the 5x zoom mode and the 1x zoom mode
  • the resolution is the same, so here is the target image with 12 million pixels compared to the 1x zoom mode with the same resolution.
  • the area intercepted by the cropping process may be the middle area of the original telephoto image, or may be an area determined according to user input.
  • the processor 200 controls the telephoto camera 20 to obtain 48 million pixels in the second telephoto state.
  • the telephoto original image is cropped and compressed on the 48 million pixel telephoto original image to obtain a 12 million pixel target image.
  • the processor 200 may specifically first perform cropping processing on the 48 million pixel telephoto original image to obtain an intermediate image, and then perform compression processing on the intermediate image to obtain a 12 million pixel target image.
  • the pixel size of the intermediate image is smaller than the pixel size of the original telephoto image, and larger than the pixel size of the target image. For example, the pixel size of the intermediate image may be 19 million pixels.
  • the processor 200 first crops the 48 million pixel telephoto original image to obtain a 19 million pixel intermediate image.
  • the cropped area can be the middle area of the telephoto original image, or it can be determined according to user input. area.
  • the processor 200 performs compression processing on the 19 million pixel intermediate image to obtain a 12 million pixel target image, and the compression processing may be the aforementioned average value operation or maximum value operation. Since the field of view corresponding to the 7x zoom mode is generally smaller than the field of view corresponding to the 5x zoom mode, the embodiment of the present application needs to crop the original telephoto image of 48 million pixels to obtain an intermediate image of 19 million pixels.
  • the zoom method and electronic device 1000 of the embodiments of the present application set a first predetermined zoom factor and a second predetermined zoom factor, and the camera module 100 is in a zoom mode that is less than the first predetermined zoom factor, and is greater than or equal to the first predetermined zoom factor.
  • the zoom mode is less than the second predetermined zoom magnification and the zoom mode is greater than or equal to the second predetermined zoom magnification, different image processing is performed to ensure that the resolution of the target image output at the full focal range remains unchanged and improves Imaging performance (that is, the entire optical performance is lossless, achieving optical lossless linear zoom).
  • an embodiment of the present application further provides an electronic device 1000.
  • the electronic device 1000 includes one or more processors 200, a memory 300, and one or more programs.
  • One or more programs are stored in the memory 300 and configured to be executed by one or more processors 200.
  • the program includes instructions for executing the zoom method of any of the above embodiments.
  • the program includes instructions for performing the following zoom methods:
  • the electronic device 1000 of the embodiment of the present application is in the zoom mode with different zoom multiples, respectively according to the main original image obtained by the main camera 10, the telephoto original image obtained by the telephoto camera 20 in the first telephoto state, and the telephoto camera 20 Obtaining the target image from the telephoto original image acquired in the second telephoto state can ensure that the resolution of the target image in the full-focus range remains unchanged and improve imaging performance.
  • an embodiment of the present application also provides a computer-readable storage medium 2000.
  • the computer-readable storage medium 2000 includes a computer program used in combination with the electronic device 1000.
  • the computer program may be executed by the processor 200 of the electronic device 1000 to complete the zoom method of any of the above embodiments.
  • a computer program can be executed by the processor 200 to complete the following zooming methods:
  • the computer-readable storage medium 2000 of the embodiment of the present application is based on the main original image obtained by the main camera 10, the telephoto original image obtained by the telephoto camera 20 in the first telephoto state, and the long focal length in the zoom modes of different zoom multiples.
  • the telephoto camera 20 obtains the target image from the telephoto original image acquired in the second telephoto state, which can ensure that the resolution of the target image in the full-focus range remains unchanged and improve imaging performance.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)

Abstract

一种变焦方法包括:在变焦倍数小于第一预定变焦倍数时,主摄像头(10)获取主原始图像以得到目标图像;在变焦倍数位于第一预定变焦倍数和第二预定变焦倍数之间时,长焦摄像头(20)获取长焦原始图像以得到目标图像;在变焦倍数大于或等于第二预定变焦倍数时,长焦摄像头(20)获取长焦原始图像以得到目标图像。

Description

变焦方法、电子装置和计算机可读存储介质
优先权信息
本申请请求2019年12月9日向中国国家知识产权局提交的、专利申请号为201911251383.9的专利申请的优先权和权益,并且通过参照将其全文并入此处。
技术领域
本申请涉及图像处理技术领域,特别涉及一种变焦方法、电子装置或计算机可读存储介质。
背景技术
对于数码照相机而言,高分辨率及高清画质是摄影爱好者追求的目标,而高分辨率和高清画质的图片效果,由镜头的变焦能力所决定。
发明内容
本申请实施方式提供一种变焦方法、电子装置和计算机可读存储介质。
本申请实施方式提供的变焦方法用于电子装置,所述电子装置包括摄像头模组。所述摄像头模组包括主摄像头和长焦摄像头。所述主摄像头用于获取第一像素尺寸的主原始图像。所述长焦摄像头用于获取第二像素尺寸的长焦原始图像。所述长焦摄像头包括第一长焦距状态和第二长焦距状态。所述摄像头模组用于输出第三像素尺寸的目标图像。所述第一像素尺寸和所述第二像素尺寸均大于所述第三像素尺寸。所述变焦方法包括:在所述摄像头模组处于小于第一预定变焦倍数的变焦模式时,控制所述主摄像头获取所述主原始图像,并根据所述主原始图像得到所述目标图像;在所述摄像头模组处于大于或等于所述第一预定变焦倍数且小于第二预定变焦倍数的变焦模式时,控制所述长焦摄像头以所述第一长焦距状态获取所述长焦原始图像,并根据所述长焦原始图像得到所述目标图像;以及在所述摄像头模组处于大于或等于所述第二预定变焦倍数的变焦模式时,控制所述长焦摄像头以所述第二长焦距状态获取所述长焦原始图像,并根据所述长焦原始图像得到所述目标图像。
本申请实施方式提供的电子装置包括摄像头模组和处理器。所述摄像头模组包括主摄像头和长焦摄像头。所述主摄像头用于获取第一像素尺寸的主原始图像。所述长焦摄像头用于获取第二像素尺寸的长焦原始图像。所述长焦摄像头包括第一长焦距状态和第二长焦距状态。所述摄像头模组用于输出第三像素尺寸的目标图像。所述第一像素尺寸和所述第二像素尺寸均大于所述第三像素尺寸。所述处理器用于:在所述摄像头模组处于小于第一预定变焦倍数的变焦模式时,控制所述主摄像头获取所述主原始图像,并根据所述主原始图像得到所述目标图像;在所述摄像头模组处于大于或等于所述第一预定变焦倍数且小于第二预定变焦倍数的变焦模式时,控制所述长焦摄像头以所述第一长焦距状态获取所述长焦原始图像,并根据所述长焦原始图像得到所述目标图像;以及在所述摄像头模组处于大于或等于所述第二预定变焦倍数的变焦模式时,控制所述长焦摄像头以所述第二长焦距状态获取所述长焦原始图像,并根据所述长焦原始图像得到所述目标图像。
本申请实施方式提供的电子装置包括摄像头模组。所述摄像头模组包括主摄像头和长焦摄像头。所述主摄像头用于获取第一像素尺寸的主原始图像。所述长焦摄像头用于获取第二像素尺寸的长焦原始图像。所述长焦摄像头包括第一长焦距状态和第二长焦距状态。所述摄像头模组用于输出第三像素尺寸的目标图像。所述第一像素尺寸和所述第二像素尺寸均大于所述第三像素尺寸。在所述摄像头模组处于小于第一预定变焦倍数的变焦模式时,所述主摄像头获取主原始图像,所述摄像头模组根据所述主原始图像得到所述目标图像;在所述摄像头模组处于大于或等于所述第一预定变焦倍数且小于第二预定变焦倍数的变焦模式时,所述长焦摄像头以所述第一长焦距状态获取长焦原始图像,所述摄像头模组根据所述长焦原始图像得到所述目标图像;在所述摄像头模组处于大于或等于所述第二预定变焦倍数的变焦模式时,所述长焦摄像头以所述第二长焦距状态获取所述长焦原始图像,所述摄像头模组根据所述长焦原始图像得到所述目标图像。
本申请实施方式提供的电子装置包括一个或多个处理器、存储器以及一个或多个程序。其中所述一个或多个程序被存储在所述存储器中,并且被配置由所述一个或多个处理器执行。所述程序包括用于以下变焦方法的指令。所述变焦方法用于电子装置,所述电子装置包括摄像头模组。所述摄像头模组包括主摄像头和长焦摄像头。所述主摄像头用于获取第一像素尺寸的主原始图像。所述长焦摄像头用于获取第二像素尺寸的长焦原始图像。所述长焦摄像头包括第一长焦距状态和第二长焦距状态。所述摄像头模组用于输出第三像素尺寸的目标图像。所述第一像素尺寸和所述第二像素尺寸均大于所述第三像素尺寸。所述变焦方法包括:在所述摄像头模组处于小于第一预定变焦倍数的变焦模式时,控 制所述主摄像头获取所述主原始图像,并根据所述主原始图像得到所述目标图像;在所述摄像头模组处于大于或等于所述第一预定变焦倍数且小于第二预定变焦倍数的变焦模式时,控制所述长焦摄像头以所述第一长焦距状态获取所述长焦原始图像,并根据所述长焦原始图像得到所述目标图像;以及在所述摄像头模组处于大于或等于所述第二预定变焦倍数的变焦模式时,控制所述长焦摄像头以所述第二长焦距状态获取所述长焦原始图像,并根据所述长焦原始图像得到所述目标图像。
本申请实施方式提供的计算机可读存储介质包括与电子装置结合使用的计算机程序。所述计算机程序可被所述电子装置的处理器执行以完成以下变焦方法。所述变焦方法用于电子装置,所述电子装置包括摄像头模组。所述摄像头模组包括主摄像头和长焦摄像头。所述主摄像头用于获取第一像素尺寸的主原始图像。所述长焦摄像头用于获取第二像素尺寸的长焦原始图像。所述长焦摄像头包括第一长焦距状态和第二长焦距状态。所述摄像头模组用于输出第三像素尺寸的目标图像。所述第一像素尺寸和所述第二像素尺寸均大于所述第三像素尺寸。所述变焦方法包括:在所述摄像头模组处于小于第一预定变焦倍数的变焦模式时,控制所述主摄像头获取所述主原始图像,并根据所述主原始图像得到所述目标图像;在所述摄像头模组处于大于或等于所述第一预定变焦倍数且小于第二预定变焦倍数的变焦模式时,控制所述长焦摄像头以所述第一长焦距状态获取所述长焦原始图像,并根据所述长焦原始图像得到所述目标图像;以及在所述摄像头模组处于大于或等于所述第二预定变焦倍数的变焦模式时,控制所述长焦摄像头以所述第二长焦距状态获取所述长焦原始图像,并根据所述长焦原始图像得到所述目标图像。
本申请实施方式的附加方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本申请的实践了解到。
附图说明
本申请的上述和/或附加的方面和优点可以从结合下面附图对实施方式的描述中将变得明显和容易理解,其中:
图1是本申请某些实施方式的变焦方法的流程示意图;
图2是本申请某些实施方式的电子装置的结构示意图;
图3是本申请某些实施方式的目标图像在全焦段的解析力的示意图;
图4是本申请某些实施方式的第一图像处理过程的示意图;
图5是本申请某些实施方式的第一图像处理过程的示意图;
图6是本申请某些实施方式的第二图像处理过程的示意图;
图7是本申请某些实施方式的变焦方法的流程示意图;
图8是本申请某些实施方式在1倍的变焦模式下,由主原始图像经过第一图像处理得到目标图像的示意图;
图9是本申请某些实施方式在2倍的变焦模式下,由主原始图像经过第二图像处理得到目标图像的示意图;
图10是本申请某些实施方式在1倍和2倍之间的变焦模式下,由主原始图像经过第一图像处理和第二图像处理得到目标图像的示意图;
图11是本申请某些实施方式在2倍和3倍之间的变焦模式下,由主原始图像经过第二图像处理和放大处理得到目标图像的示意图;
图12是本申请某些实施方式的变焦方法的流程示意图;
图13是本申请某些实施方式在3倍的变焦模式下,由长焦原始图像经过第一图像处理得到目标图像的示意图;
图14是本申请某些实施方式在4倍的变焦模式下,由长焦原始图像经过第一图像处理和第二图像处理得到目标图像的示意图;
图15是本申请某些实施方式在3倍和4倍之间的变焦模式下,由长焦原始图像经过第一图像处理和第二图像处理得到目标图像的示意图;
图16是本申请某些实施方式在4倍和5倍之间的变焦模式下,由长焦原始图像经过第一图像处理和第二图像处理得到目标图像的示意图;
图17是本申请某些实施方式在5倍的变焦模式下,由长焦原始图像经过第一图像处理得到目标图像的示意图;
图18是本申请某些实施方式在10倍的变焦模式下,由长焦原始图像经过第二图像处理得到目标图像的示意图;
图19是本申请某些实施方式在5倍和10倍之间的变焦模式下,由长焦原始图像经过第一图像处 理和第二图像处理得到目标图像的示意图;
图20是本申请某些实施方式的变焦方法的原理示意图;
图21是本申请某些实施方式的电子装置的示意图;
图22是本申请某些实施方式的计算机可读存储介质与电子装置的连接状态示意图。
主要元件及符号说明:
电子装置1000、摄像头模组100、主摄像头10、长焦摄像头20、处理器200、存储器300、计算机可读存储介质2000。
具体实施方式
下面详细描述本申请的实施方式,所述实施方式的示例在附图中示出,其中,相同或类似的标号自始至终表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施方式是示例性的,仅用于解释本申请的实施方式,而不能理解为对本申请的实施方式的限制。
请参阅图1和图2,本申请实施方式的变焦方法用于电子装置1000。电子装置1000包括摄像头模组100。摄像头模组100包括主摄像头10和长焦摄像头20。主摄像头10用于获取第一像素尺寸的主原始图像,长焦摄像头20用于获取第二像素尺寸的长焦原始图像。长焦摄像头20包括第一长焦距状态和第二长焦距状态。摄像头模组100用于输出第三像素尺寸的目标图像。第一像素尺寸和第二像素尺寸均大于第三像素尺寸。变焦方法包括:
在摄像头模组100处于小于第一预定变焦倍数的变焦模式时,控制主摄像头10获取主原始图像,并根据主原始图像得到目标图像;
在摄像头模组100处于大于或等于第一预定变焦倍数且小于第二预定变焦倍数的变焦模式时,控制长焦摄像头20以第一长焦距状态获取长焦原始图像,并根据长焦原始图像得到目标图像;和
在摄像头模组100处于大于或等于第二预定变焦倍数的变焦模式时,控制长焦摄像头20以第二长焦距状态获取长焦原始图像,并根据长焦原始图像得到目标图像。
请参阅图7,在某些实施方式中,在摄像头模组100处于小于第一预定变焦倍数的变焦模式时,控制主摄像头10获取主原始图像,并根据主原始图像得到目标图像,包括:
在摄像头模组100处于第一变焦倍数的变焦模式时,控制主摄像头10获取主原始图像,并对主原始图像进行第一图像处理得到目标图像;
在摄像头模组100处于第二变焦倍数的变焦模式时,控制主摄像头10获取主原始图像,并对主原始图像进行第二图像处理得到目标图像;
在摄像头模组100处于第一变焦倍数和第二变焦倍数之间的变焦模式时,控制主摄像头10获取主原始图像,并对主原始图像进行第一图像处理和第二图像处理得到目标图像;其中,第一变焦倍数和第二变焦倍数均小于第一预定变焦倍数。
请参阅图12,在某些实施方式中,在摄像头模组100处于大于或等于第二预定变焦倍数的变焦模式时,控制长焦摄像头20以第二长焦距状态获取长焦原始图像,并根据长焦原始图像得到目标图像,包括:
在摄像头模组100处于第三变焦倍数的变焦模式时,控制长焦摄像头20以第一长焦距状态获取长焦原始图像,并对长焦原始图像进行第一图像处理得到目标图像;
在摄像头模组100处于第四变焦倍数的变焦模式时,控制长焦摄像头20以第一长焦距状态获取长焦原始图像,并对长焦原始图像进行第一图像处理和第二图像处理得到目标图像;
在摄像头模组100处于第三变焦倍数和第四变焦倍数之间的变焦模式时,控制长焦摄像头20以第一长焦距状态获取长焦原始图像,并对长焦原始图像进行第一图像处理和第二图像处理得到目标图像;和
在摄像头模组100处于第四变焦倍数和第二预定变焦倍数之间的变焦模式时,控制长焦摄像头20以第一长焦距状态获取长焦原始图像,并对长焦原始图像进行第一图像处理和第二图像处理得到目标图像;其中,第三变焦倍数大于或等于第一预定变焦倍数,第四变焦倍数大于第三变焦倍数且小于第二预定变焦倍数。
请参阅图17,在某些实施方式中,在摄像头模组100处于大于或等于第二预定变焦倍数的变焦模式时,控制长焦摄像头20以第二长焦距状态获取长焦原始图像,并根据长焦原始图像得到目标图像,包括:
在摄像头模组100处于第五变焦倍数的变焦模式时,控制长焦摄像头20以第二长焦距状态获取长焦原始图像,并对长焦原始图像进行第一图像处理得到目标图像;
在摄像头模组100处于第六变焦倍数的变焦模式时,控制长焦摄像头20以第二长焦距状态获取长 焦原始图像,并对长焦原始图像进行第二图像处理得到目标图像;和
在摄像头模组100处于第五变焦倍数和第六变焦倍数之间的变焦模式时,控制长焦摄像头20以第二长焦距状态获取长焦原始图像,并对长焦原始图像进行第一图像处理和第二图像处理得到目标图像;其中,第五变焦倍数大于或等于第二预定变焦倍数,第六变焦倍数大于第五变焦倍数。
在某些实施方式中,第一图像处理包括压缩处理,第二图像处理包括裁剪处理。
请参阅图1和图2,本申请实施方式的电子装置1000包括摄像头模组100和处理器200。摄像头模组100包括主摄像头10和长焦摄像头20。主摄像头10用于获取第一像素尺寸的主原始图像,长焦摄像头20用于获取第二像素尺寸的长焦原始图像。长焦摄像头20包括第一长焦距状态和第二长焦距状态。摄像头模组100用于输出第三像素尺寸的目标图像。第一像素尺寸和第二像素尺寸均大于第三像素尺寸。处理器200用于:
在摄像头模组100处于小于第一预定变焦倍数的变焦模式时,控制主摄像头10获取主原始图像,并根据主原始图像得到目标图像;
在摄像头模组100处于大于或等于第一预定变焦倍数且小于第二预定变焦倍数的变焦模式时,控制长焦摄像头20以第一长焦距状态获取长焦原始图像,并根据长焦原始图像得到目标图像;和
在摄像头模组100处于大于或等于第二预定变焦倍数的变焦模式时,控制长焦摄像头20以第二长焦距状态获取长焦原始图像,并根据长焦原始图像得到目标图像。
请参阅图7,在某些实施方式中,处理器200还用于:
在摄像头模组100处于第一变焦倍数的变焦模式时,控制主摄像头10获取主原始图像,并对主原始图像进行第一图像处理得到目标图像;
在摄像头模组100处于第二变焦倍数的变焦模式时,控制主摄像头10获取主原始图像,并对主原始图像进行第二图像处理得到目标图像;
在摄像头模组100处于第一变焦倍数和第二变焦倍数之间的变焦模式时,控制主摄像头10获取主原始图像,并对主原始图像进行第一图像处理和第二图像处理得到目标图像;其中,第一变焦倍数和第二变焦倍数均小于第一预定变焦倍数。
请参阅图12,在某些实施方式中,处理器200还用于:
在摄像头模组100处于第三变焦倍数的变焦模式时,控制长焦摄像头20以第一长焦距状态获取长焦原始图像,并对长焦原始图像进行第一图像处理得到目标图像;
在摄像头模组100处于第四变焦倍数的变焦模式时,控制长焦摄像头20以第一长焦距状态获取长焦原始图像,并对长焦原始图像进行第一图像处理和第二图像处理得到目标图像;
在摄像头模组100处于第三变焦倍数和第四变焦倍数之间的变焦模式时,控制长焦摄像头20以第一长焦距状态获取长焦原始图像,并对长焦原始图像进行第一图像处理和第二图像处理得到目标图像;和
在摄像头模组100处于第四变焦倍数和第二预定变焦倍数之间的变焦模式时,控制长焦摄像头20以第一长焦距状态获取长焦原始图像,并对长焦原始图像进行第一图像处理和第二图像处理得到目标图像;其中,第三变焦倍数大于或等于第一预定变焦倍数,第四变焦倍数大于第三变焦倍数且小于第二预定变焦倍数。
请参阅图17,在某些实施方式中,处理器200还用于:
在摄像头模组100处于第五变焦倍数的变焦模式时,控制长焦摄像头20以第二长焦距状态获取长焦原始图像,并对长焦原始图像进行第一图像处理得到目标图像;
在摄像头模组100处于第六变焦倍数的变焦模式时,控制长焦摄像头20以第二长焦距状态获取长焦原始图像,并对长焦原始图像进行第二图像处理得到目标图像;和
在摄像头模组100处于第五变焦倍数和第六变焦倍数之间的变焦模式时,控制长焦摄像头20以第二长焦距状态获取长焦原始图像,并对长焦原始图像进行第一图像处理和第二图像处理得到目标图像;其中,第五变焦倍数大于或等于第二预定变焦倍数,第六变焦倍数大于第五变焦倍数。
在某些实施方式中,第一图像处理包括压缩处理,第二图像处理包括裁剪处理。
请参阅图1和图2,本申请实施方式的电子装置1000包括摄像头模组100。摄像头模组100包括主摄像头10和长焦摄像头20。主摄像头10用于获取第一像素尺寸的主原始图像,长焦摄像头20用于获取第二像素尺寸的长焦原始图像。长焦摄像头20包括第一长焦距状态和第二长焦距状态。摄像头模组100用于输出第三像素尺寸的目标图像。第一像素尺寸和第二像素尺寸均大于第三像素尺寸。在摄像头模组100处于小于第一预定变焦倍数的变焦模式时,控制主摄像头10获取主原始图像,并根据主原始图像得到目标图像;在摄像头模组100处于大于或等于第一预定变焦倍数且小于第二预定变焦倍数的变焦模式时,控制长焦摄像头20以第一长焦距状态获取长焦原始图像,并根据长焦原始图像得到 目标图像;和在摄像头模组100处于大于或等于第二预定变焦倍数的变焦模式时,控制长焦摄像头20以第二长焦距状态获取长焦原始图像,并根据长焦原始图像得到目标图像。
请参阅图7,在某些实施方式中,在摄像头模组100处于第一变焦倍数的变焦模式时,控制主摄像头10获取主原始图像,并对主原始图像进行第一图像处理得到目标图像;在摄像头模组100处于第二变焦倍数的变焦模式时,控制主摄像头10获取主原始图像,并对主原始图像进行第二图像处理得到目标图像;在摄像头模组100处于第一变焦倍数和第二变焦倍数之间的变焦模式时,控制主摄像头10获取主原始图像,并对主原始图像进行第一图像处理和第二图像处理得到目标图像;其中,第一变焦倍数和第二变焦倍数均小于第一预定变焦倍数。
请参阅图12,在某些实施方式中,在摄像头模组100处于第三变焦倍数的变焦模式时,控制长焦摄像头20以第一长焦距状态获取长焦原始图像,并对长焦原始图像进行第一图像处理得到目标图像;在摄像头模组100处于第四变焦倍数的变焦模式时,控制长焦摄像头20以第一长焦距状态获取长焦原始图像,并对长焦原始图像进行第一图像处理和第二图像处理得到目标图像;在摄像头模组100处于第三变焦倍数和第四变焦倍数之间的变焦模式时,控制长焦摄像头20以第一长焦距状态获取长焦原始图像,并对长焦原始图像进行第一图像处理和第二图像处理得到目标图像;和在摄像头模组100处于第四变焦倍数和第二预定变焦倍数之间的变焦模式时,控制长焦摄像头20以第一长焦距状态获取长焦原始图像,并对长焦原始图像进行第一图像处理和第二图像处理得到目标图像;其中,第三变焦倍数大于或等于第一预定变焦倍数,第四变焦倍数大于第三变焦倍数且小于第二预定变焦倍数。
请参阅图17,在某些实施方式中,在摄像头模组100处于第五变焦倍数的变焦模式时,控制长焦摄像头20以第二长焦距状态获取长焦原始图像,并对长焦原始图像进行第一图像处理得到目标图像;在摄像头模组100处于第六变焦倍数的变焦模式时,控制长焦摄像头20以第二长焦距状态获取长焦原始图像,并对长焦原始图像进行第二图像处理得到目标图像;和在摄像头模组100处于第五变焦倍数和第六变焦倍数之间的变焦模式时,控制长焦摄像头20以第二长焦距状态获取长焦原始图像,并对长焦原始图像进行第一图像处理和第二图像处理得到目标图像;其中,第五变焦倍数大于或等于第二预定变焦倍数,第六变焦倍数大于第五变焦倍数。
在某些实施方式中,第一图像处理包括压缩处理,第二图像处理包括裁剪处理。
请参阅图1、图2和图21,本申请实施方式还提供一种电子装置1000。电子装置1000包括一个或多个处理器200、存储器300以及一个或多个程序。其中一个或多个程序被存储在存储器300中,并且被配置由一个或多个处理器200执行。程序包括用于执行上述任一实施方式的变焦方法的指令。变焦方法用于电子装置1000。电子装置1000包括摄像头模组100。摄像头模组100包括主摄像头10和长焦摄像头20。主摄像头10用于获取第一像素尺寸的主原始图像,长焦摄像头20用于获取第二像素尺寸的长焦原始图像。长焦摄像头20包括第一长焦距状态和第二长焦距状态。摄像头模组100用于输出第三像素尺寸的目标图像。第一像素尺寸和第二像素尺寸均大于第三像素尺寸。变焦方法包括:
在摄像头模组100处于小于第一预定变焦倍数的变焦模式时,控制主摄像头10获取主原始图像,并根据主原始图像得到目标图像;
在摄像头模组100处于大于或等于第一预定变焦倍数且小于第二预定变焦倍数的变焦模式时,控制长焦摄像头20以第一长焦距状态获取长焦原始图像,并根据长焦原始图像得到目标图像;和
在摄像头模组100处于大于或等于第二预定变焦倍数的变焦模式时,控制长焦摄像头20以第二长焦距状态获取长焦原始图像,并根据长焦原始图像得到目标图像。
请参阅图7,在某些实施方式中,在摄像头模组100处于小于第一预定变焦倍数的变焦模式时,控制主摄像头10获取主原始图像,并根据主原始图像得到目标图像,包括:
在摄像头模组100处于第一变焦倍数的变焦模式时,控制主摄像头10获取主原始图像,并对主原始图像进行第一图像处理得到目标图像;
在摄像头模组100处于第二变焦倍数的变焦模式时,控制主摄像头10获取主原始图像,并对主原始图像进行第二图像处理得到目标图像;
在摄像头模组100处于第一变焦倍数和第二变焦倍数之间的变焦模式时,控制主摄像头10获取主原始图像,并对主原始图像进行第一图像处理和第二图像处理得到目标图像;其中,第一变焦倍数和第二变焦倍数均小于第一预定变焦倍数。
请参阅图12,在某些实施方式中,在摄像头模组100处于大于或等于第二预定变焦倍数的变焦模式时,控制长焦摄像头20以第二长焦距状态获取长焦原始图像,并根据长焦原始图像得到目标图像,包括:
在摄像头模组100处于第三变焦倍数的变焦模式时,控制长焦摄像头20以第一长焦距状态获取长焦原始图像,并对长焦原始图像进行第一图像处理得到目标图像;
在摄像头模组100处于第四变焦倍数的变焦模式时,控制长焦摄像头20以第一长焦距状态获取长焦原始图像,并对长焦原始图像进行第一图像处理和第二图像处理得到目标图像;
在摄像头模组100处于第三变焦倍数和第四变焦倍数之间的变焦模式时,控制长焦摄像头20以第一长焦距状态获取长焦原始图像,并对长焦原始图像进行第一图像处理和第二图像处理得到目标图像;和
在摄像头模组100处于第四变焦倍数和第二预定变焦倍数之间的变焦模式时,控制长焦摄像头20以第一长焦距状态获取长焦原始图像,并对长焦原始图像进行第一图像处理和第二图像处理得到目标图像;其中,第三变焦倍数大于或等于第一预定变焦倍数,第四变焦倍数大于第三变焦倍数且小于第二预定变焦倍数。
请参阅图17,在某些实施方式中,在摄像头模组100处于大于或等于第二预定变焦倍数的变焦模式时,控制长焦摄像头20以第二长焦距状态获取长焦原始图像,并根据长焦原始图像得到目标图像,包括:
在摄像头模组100处于第五变焦倍数的变焦模式时,控制长焦摄像头20以第二长焦距状态获取长焦原始图像,并对长焦原始图像进行第一图像处理得到目标图像;
在摄像头模组100处于第六变焦倍数的变焦模式时,控制长焦摄像头20以第二长焦距状态获取长焦原始图像,并对长焦原始图像进行第二图像处理得到目标图像;和
在摄像头模组100处于第五变焦倍数和第六变焦倍数之间的变焦模式时,控制长焦摄像头20以第二长焦距状态获取长焦原始图像,并对长焦原始图像进行第一图像处理和第二图像处理得到目标图像;其中,第五变焦倍数大于或等于第二预定变焦倍数,第六变焦倍数大于第五变焦倍数。
在某些实施方式中,第一图像处理包括压缩处理,第二图像处理包括裁剪处理。
请参阅图1和图2,本申请实施方式提供一种变焦方法。变焦方法用于电子装置1000。电子装置1000包括摄像头模组100。摄像头模组100包括主摄像头10和长焦摄像头20。主摄像头10用于获取第一像素尺寸的主原始图像,长焦摄像头20用于获取第二像素尺寸的长焦原始图像。长焦摄像头20包括第一长焦距状态和第二长焦距状态。摄像头模组100用于输出第三像素尺寸的目标图像。第一像素尺寸和第二像素尺寸均大于第三像素尺寸。变焦方法包括:
01:在摄像头模组100处于小于第一预定变焦倍数的变焦模式时,控制主摄像头10获取主原始图像,并根据主原始图像得到目标图像;
02:在摄像头模组100处于大于或等于第一预定变焦倍数且小于第二预定变焦倍数的变焦模式时,控制长焦摄像头20以第一长焦距状态获取长焦原始图像,并根据长焦原始图像得到目标图像;和
03:在摄像头模组100处于大于或等于第二预定变焦倍数的变焦模式时,控制长焦摄像头20以第二长焦距状态获取长焦原始图像,并根据长焦原始图像得到目标图像。
请参阅图2,本申请实施方式还提供一种电子装置1000。电子装置1000包括摄像头模组100和处理器200。摄像头模组100包括主摄像头10和长焦摄像头20。主摄像头10用于获取第一像素尺寸的主原始图像,长焦摄像头20用于获取第二像素尺寸的长焦原始图像。长焦摄像头20包括第一长焦距状态和第二长焦距状态。摄像头模组100用于输出第三像素尺寸的目标图像。第一像素尺寸和第二像素尺寸均大于第三像素尺寸。本申请实施方式的变焦方法可由本申请实施方式的电子装置1000实现。例如,处理器200可用于执行01、02和03中的方法。
也即是说,处理器200可以用于:在摄像头模组100处于小于第一预定变焦倍数的变焦模式时,控制主摄像头10获取主原始图像,并根据主原始图像得到目标图像;在摄像头模组100处于大于或等于第一预定变焦倍数且小于第二预定变焦倍数的变焦模式时,控制长焦摄像头20以第一长焦距状态获取长焦原始图像,并根据长焦原始图像得到目标图像;和在摄像头模组100处于大于或等于第二预定变焦倍数的变焦模式时,控制长焦摄像头20以第二长焦距状态获取长焦原始图像,并根据长焦原始图像得到目标图像。
请参阅图2,本申请实施方式还提供一种电子装置1000。电子装置1000包括摄像头模组100。摄像头模组100包括主摄像头10和长焦摄像头20。主摄像头10用于获取第一像素尺寸的主原始图像,长焦摄像头20用于获取第二像素尺寸的长焦原始图像。长焦摄像头20包括第一长焦距状态和第二长焦距状态。摄像头模组100用于输出第三像素尺寸的目标图像。第一像素尺寸和第二像素尺寸均大于第三像素尺寸。本申请实施方式的变焦方法可由本申请实施方式的电子装置1000实现。例如,摄像头模组100可用于执行01、02和03中的方法。
也即是说,在摄像头模组100处于小于第一预定变焦倍数的变焦模式时,主摄像头10可以获取主原始图像,摄像头模组100可以根据主原始图像得到目标图像;在摄像头模组100处于大于或等于第一预定变焦倍数且小于第二预定变焦倍数的变焦模式时,长焦摄像头20可以以第一长焦距状态获取长 焦原始图像,摄像头模组100可以根据长焦原始图像得到目标图像;在摄像头模组100处于大于或等于第二预定变焦倍数的变焦模式时,长焦摄像头20可以以第二长焦距状态获取长焦原始图像,摄像头模组100可以根据长焦原始图像得到目标图像。
需要指出的是,本申请实施方式可以是:第一种方式,由处理器200控制主摄像头10获取主原始图像、控制长焦摄像头20以第一长焦距状态获取长焦原始图像、控制长焦摄像头20以第二长焦距状态获取长焦原始图像,并对主原始图像和长焦原始图像进行相关的图像处理得到目标图像;或者是第二种方式,由主摄像头10直接获取主原始图像(而非由于处理器200控制),长焦摄像头20直接以第一长焦距状态获取长焦原始图像(而非由于处理器200控制)、长焦摄像头20直接以第二长焦距状态获取长焦原始图像(而非由于处理器200控制),然后摄像头模组100对主原始图像和长焦原始图像进行相关的图像处理得到目标图像。本申请实施方式以上述第一种方式为例进行说明,而第二种方式与第一种方式类似,不再重复展开说明。
目前的镜头一般通过数码变焦获取全焦段的图像,然而数码变焦是通过对图像进行放大处理来实现的,会使得图像的解析力下降,无法保证全焦段的图像的解析力不变。
本申请实施方式的变焦方法和电子装置1000通过设置主摄像头10和长焦摄像头20,且长焦摄像头20包括第一长焦距状态和第二长焦距状态,从而在不同变焦倍数的变焦模式下,分别根据主摄像头10获取的主原始图像、长焦摄像头20以第一长焦距状态获取的长焦原始图像、以及长焦摄像头20以第二长焦距状态获取的长焦原始图像得到目标图像,能够保证全焦段的目标图像的解析力不变,提高成像性能。
具体地,电子装置1000可以是手机、平板电脑、笔记本电脑、智能穿戴设备(如智能手表、智能手环、智能眼镜、智能头盔等)、头显设备、虚拟现实设备等等,在此不做限制。
主摄像头10用于获取第一像素尺寸的主原始图像,长焦摄像头20用于获取第二像素尺寸的长焦原始图像,摄像头模组100最终输出第三像素尺寸的目标图像。第一像素尺寸和第二像素尺寸均大于第三像素尺寸。例如可以是:第一像素尺寸大于第二像素尺寸,第二像素尺寸大于第三像素尺寸;或者,第一像素尺寸等于第二像素尺寸,第一像素尺寸(第二像素尺寸)大于第三像素尺寸;或者,第一像素尺寸小于第二像素尺寸,第一像素尺寸大于第三像素尺寸。本申请实施方式以第一像素尺寸等于第二像素尺寸、第一像素尺寸(第二像素尺寸)大于第三像素尺寸为例进行说明。在一个实施例中,第一像素尺寸可以为4800万像素,第二像素尺寸可以为4800万像素,第三像素尺寸可以为1200万像素。
主摄像头10可为普通摄像头(视场范围位于长焦摄像头的视场范围与广角摄像头的视场范围之间),也可为广角摄像头,主摄像头10可以是定焦镜头,也可为变焦镜头。长焦摄像头20为变焦镜头,长焦摄像头20能够包括第一长焦距状态和第二长焦距状态。第一长焦距状态可以为长焦摄像头20以第一预定倍数光学变焦获取长焦原始图像的状态。第二长焦距状态可以为长焦摄像头20以第二预定倍数光学变焦获取长焦原始图像的状态。第二长焦距状态对应的焦距大于第一长焦距状态对应的焦距。当摄像头模组100用于获取较近距离的被摄物体的目标图像时,可采用主摄像头10拍摄图像;当摄像头模组100用于获取中等距离的被摄物体的目标图像时,可采用长焦摄像头20以第一长焦距状态拍摄图像;当摄像头模组100用于获取较远距离的被摄物体的目标图像时,可采用长焦摄像头20以第二长焦距状态拍摄图像。
请参阅图3,本申请实施方式的摄像头模组100能够工作于小于第一预定变焦倍数的变焦模式、大于或等于第一预定变焦倍数且小于第二预定变焦倍数的变焦模式、以及大于或等于第二预定变焦倍数的变焦模式。本申请实施方式以第一预定变焦倍数为3倍、第二预定变焦倍数为5倍为例进行说明,即摄像头模组100能够工作于小于3倍的变焦模式、大于或等于3倍且小于5倍的变焦模式、以及大于或等于5倍的变焦模式。
可以理解,在其他例子中,第一预定变焦倍数也可以不为3倍、第二预定变焦倍数也可以不为5倍。第一预定变焦倍数可以设置为2倍、4倍或5倍等其他倍率。此时,长焦摄像头20的第一长焦距状态对应的变焦倍数也对应为2倍、4倍或5倍等其他倍率。第二预定变焦倍数可以设置为3倍、4倍或6倍等其他倍率。此时,长焦摄像头20的第二长焦距状态对应的变焦倍数也对应为3倍、4倍或6倍等其他倍率。例如,当第一预定变焦倍数设置为2倍时,长焦摄像头20的第一长焦距状态对应的变焦倍数也对应为2倍,第二预定变焦倍数可以设置为3倍,长焦摄像头20的第二长焦距状态对应的变焦倍数也对应为3倍;当第一预定变焦倍数设置为4倍时,长焦摄像头20的第一长焦距状态对应的变焦倍数也对应为4倍,第二预定变焦倍数可以设置为6倍,长焦摄像头20的第二长焦距状态对应的变焦倍数也对应为6倍;当第一预定变焦倍数设置为5倍时,长焦摄像头20的第一长焦距状态对应的变焦倍数也对应为5倍,第二预定变焦倍数可以设置为6倍,长焦摄像头20的第二长焦距状态对应的变 焦倍数也对应为6倍。
以摄像头模组100的变焦模式的整个变焦倍数段是0~10倍为例。摄像头模组100能够在(0,3)变焦倍数段内进行变焦,该区间内由由主摄像头10获取主原始图像,从而得到目标图像。摄像头模组100还能够在[3,5)变焦倍数段内进行变焦,该区间内由长焦摄像头20以第一长焦距状态获取长焦原始图像,从而得到目标图像。摄像头模组100还能够在[5,10]变焦倍数段内进行变焦,该区间内由长焦摄像头20以第二长焦距状态获取长焦原始图像,从而得到目标图像。本申请实施方式的变焦方法能够保证全焦段(0,10]的目标图像的解析力不变,提高成像性能。
其中,由主原始图像或长焦原始图像得到目标图像的过程可以包括有对主原始图像或长焦原始图像进行图像处理的过程,例如第一图像处理和/或第二图像处理。通过对主原始图像或长焦原始图像进行第一图像处理和/或第二图像处理可以由4800万像素的主原始图像或4800万像素的长焦原始图像得到1200万像素的目标图像。该第一图像处理可以是压缩处理,该第二图像处理可以是裁剪处理。当然,在其他实施方式中,由主原始图像或长焦原始图像得到目标图像的过程也可以不仅仅包括第一图像处理和/或第二图像处理,还可以由更多方式的图像处理,在此不作限制。
请参阅图4,在一个实施例中,压缩处理可以包括均值运算。具体地,每帧主原始图像和每帧长焦原始图像(以下统称为原始图像)中均包括呈二维分布的多个像素,例如4*4的像素。多个像素的像素值从左至右、从上至下依次为:135、132、120、105、160、140、112、110、153、89、87、62、105、87、53、45。多个像素中的预定个像素可作为一组(例如虚线框圈出的4个像素作为一组),通过对每组内4个像素的像素值进行压缩处理,最终得到目标图像中的一个合并像素的像素值。例如,对左上角的4个像素的像素值进行均值运算,(135+132+160+140)/4=133,得到目标图像中的左上角的合并像素的像素值为133。依此类推,对右上角的4个像素的像素值进行均值运算,得到目标图像中的右上角的合并像素的像素值为112;对左下角的4个像素的像素值进行均值运算,得到目标图像中的左下角的合并像素的像素值为109;对右下角的4个像素的像素值进行均值运算,得到目标图像中的右下角的合并像素的像素值为62,在此不一一展开说明。最终,像素值为133的合并像素、像素值为112的合并像素、像素值为109的合并像素、像素值为62的合并像素形成一帧目标图像。
需要指出的是,在实际处理过程中,处理器200需要对原始图像中的4800万像素进行均值运算,得到1200万像素的目标图像,要处理的像素数量远超过上述示例中的4*4的像素。
本实施例中,通过压缩处理得到的目标图像的像素值均直接来源于原始图像,并且没有增添像素,因此通过对原始图像进行压缩处理得到的目标图像的解析力不会降低。
请参阅图5,在另一个实施例中,压缩处理可以包括最大值运算。仍以前述4*4像素的原始图像为例,通过对每组内4个像素的像素值进行压缩处理,最终得到目标图像中的一个合并像素的像素值。例如,对左上角的4个像素的像素值进行最大值运算,MAX(135,132,160,140)=160,得到目标图像中的左上角的合并像素的像素值为160。依此类推,对右上角的4个像素的像素值进行最大值运算,得到目标图像中的右上角的合并像素的像素值为120;对左下角的4个像素的像素值进行最大值运算,得到目标图像中的左下角的合并像素的像素值为153;对右下角的4个像素的像素值进行最大值运算,得到目标图像中的右下角的合并像素的像素值为87,在此不一一展开说明。最终,像素值为160的合并像素、像素值为120的合并像素、像素值为153的合并像素、像素值为87的合并像素形成一帧目标图像。
需要指出的是,在实际处理过程中,处理器200需要对原始图像中的4800万像素进行最大值运算,得到1200万像素的目标图像,要处理的像素数量远超过上述示例中的4*4的像素。
本实施例中,通过压缩处理得到的目标图像的像素值均来源于原始图像(像素值均为原始图像中的原始值),并且没有增添像素,因此通过对原始图像进行压缩处理得到的目标图像的解析力不会降低。
请参阅图6,在一个实施例中,裁剪处理可以包括从原始图像中截取长宽比和原始图像相同的像素区域,并将此像素区域作为目标图像,此像素区域之外的像素则舍弃。例如,当希望由4800万像素的原始图像得到1200万像素的目标图像时,裁剪处理截取的图像像素个数为原始图像的像素个数的四分之一,因此长和宽均为原始图像的二分之一,目标图像的视场范围为原始图像的二分之一,视觉效果上为2倍变焦的视觉效果。
本实施例中,通过裁剪处理得到的目标图像的像素值均来源于原始图像(像素值均为原始图像中的原始值),并且没有增添像素,因此通过对原始图像进行裁剪处理得到的目标图像的解析力不会降低。
请参阅图7,在某些实施方式中,在摄像头模组100处于小于第一预定变焦倍数的变焦模式时,控制主摄像头10获取主原始图像,并根据主原始图像得到目标图像(即01),包括:
011:在摄像头模组100处于第一变焦倍数的变焦模式时,控制主摄像头10获取主原始图像,并对主原始图像进行第一图像处理得到目标图像;
012:在摄像头模组100处于第二变焦倍数的变焦模式时,控制主摄像头10获取主原始图像,并对主原始图像进行第二图像处理得到目标图像;和
013:在摄像头模组100处于第一变焦倍数和第二变焦倍数之间的变焦模式时,控制主摄像头10获取主原始图像,并对主原始图像进行第一图像处理和第二图像处理得到目标图像;
其中,第一变焦倍数和第二变焦倍数均小于第一预定变焦倍数。
请参阅图2,在某些实施方式中,处理器200可用于执行011、012和013中的方法。
也即是说,处理器200可以用于:在摄像头模组100处于第一变焦倍数的变焦模式时,控制主摄像头10获取主原始图像,并对主原始图像进行第一图像处理得到目标图像;在摄像头模组100处于第二变焦倍数的变焦模式时,控制主摄像头10获取主原始图像,并对主原始图像进行第二图像处理得到目标图像;和在摄像头模组100处于第一变焦倍数和第二变焦倍数之间的变焦模式时,控制主摄像头10获取主原始图像,并对主原始图像进行第一图像处理和第二图像处理得到目标图像;其中,第一变焦倍数和第二变焦倍数均小于第一预定变焦倍数。
请参阅图2,在某些实施方式中,摄像头模组100可用于执行011、012和013中的方法。
也即是说,在摄像头模组100处于第一变焦倍数的变焦模式时,主摄像头10可以获取主原始图像,摄像头模组100可以对主原始图像进行第一图像处理得到目标图像;在摄像头模组100处于第二变焦倍数的变焦模式时,主摄像头10可以获取主原始图像,摄像头模组100可以对主原始图像进行第二图像处理得到目标图像;在摄像头模组100处于第一变焦倍数和第二变焦倍数之间的变焦模式时,主摄像头10可以获取主原始图像,摄像头模组100可以对主原始图像进行第一图像处理和第二图像处理得到目标图像;其中,第一变焦倍数和第二变焦倍数均小于第一预定变焦倍数。
本申请实施方式以第一变焦倍数为1倍、第二变焦倍数为2倍为例进行说明。主摄像头10的固定焦距即可为第一变焦倍数对应的焦距。
请参阅图8,在摄像头模组100处于1倍的变焦模式时,处理器200控制主摄像头10获取4800万像素的主原始图像,并对4800万像素的主原始图像进行压缩处理得到1200万像素的目标图像。具体地,压缩处理可以是前述均值运算或最大值运算。本申请实施方式通过对4800万像素的主原始图像进行压缩处理,电子装置1000可输出视场范围不变的1200万像素的目标图像。
请参阅图9,在摄像头模组100处于2倍的变焦模式时,处理器200控制主摄像头10获取4800万像素的主原始图像,并对4800万像素的主原始图像进行裁剪处理得到1200万像素的目标图像。由于2倍的变焦模式对应的视场范围一般小于1倍的变焦模式对应的视场范围,因此,本申请实施方式需要对4800万像素的主原始图像进行裁剪处理,以减小视场范围,使得电子装置1000输出相较于1倍的变焦模式下,视场范围减小、解析力不变的1200万像素的目标图像。其中,裁剪处理所截取的区域可以是主原始图像最中间的区域,也可以是根据用户输入所确定的区域。
请参阅图10,在摄像头模组100处于1倍和2倍之间的变焦模式时(例如1.5倍的变焦模式),处理器200控制主摄像头10获取4800万像素的主原始图像,并对4800万像素的主原始图像进行裁剪处理和压缩处理得到1200万像素的目标图像。处理器200具体可以是先对4800万像素的主原始图像进行裁剪处理得到中间图像,再对中间图像进行压缩处理得到1200万像素的目标图像。中间图像的像素尺寸小于主原始图像的像素尺寸,且大于目标图像的像素尺寸。例如,中间图像的像素尺寸可以是2100万像素。处理器200先对4800万像素的主原始图像进行裁剪处理得到2100万像素的中间图像,裁剪处理所截取的区域可以是主原始图像最中间的区域,也可以是根据用户输入所确定的区域。然后,处理器200对2100万像素的中间图像进行压缩处理得到1200万像素的目标图像,压缩处理可以是前述均值运算或最大值运算。由于1.5倍的变焦模式对应的视场范围一般小于1倍的变焦模式对应的视场范围,因此,本申请实施方式需要对4800万像素的主原始图像进行裁剪处理得到2100万像素的中间图像,以减小视场范围,再对2100万像素的中间图像进行压缩处理使得电子装置1000输出相较于1倍的变焦模式下,视场范围减小、解析力不变的1200万像素的目标图像。
另外,请参阅图11,在摄像头模组100处于2倍和3倍之间的变焦模式时(例如2.4倍的变焦模式),处理器200控制主摄像头10获取4800万像素的主原始图像,并对4800万像素的主原始图像进行裁剪处理和放大处理得到1200万像素的目标图像。处理器200具体可以是先对4800万像素的主原始图像进行裁剪处理得到中间图像,再对中间图像进行放大处理得到1200万像素的目标图像。中间图像的像素尺寸可以小于主原始图像的像素尺寸,且小于目标图像的像素尺寸。例如,中间图像的像素尺寸可以是800万像素。处理器200先对4800万像素的主原始图像进行裁剪处理得到800万像素的中间图像,裁剪处理所截取的区域可以是主原始图像最中间的区域,也可以是根据用户输入所确定的区域。然后,处理器200对800万像素的中间图像进行放大处理得到1200万像素的目标图像,放大处理可以是直接通过缩放的方式将图像放大。可以理解,由800万像素的中间图像进行放大处理得到1200 万像素的目标图像,图像解析力略微下降,几乎可以视为解析力不变。由于2.4倍的变焦模式对应的视场范围一般小于1倍的变焦模式对应的视场范围,因此,本申请实施方式需要对4800万像素的主原始图像进行裁剪处理得到800万像素的中间图像,以减小视场范围,再对800万像素的中间图像进行放大处理使得电子装置1000输出相较于1倍的变焦模式下,视场范围减小、解析力几乎不变的1200万像素的目标图像。
请参阅图12,在某些实施方式中,在摄像头模组100处于大于或等于第一预定变焦倍数且小于第二预定变焦倍数的变焦模式时,控制长焦摄像头20以第一长焦距状态获取长焦原始图像,并根据长焦原始图像得到目标图像(即02),包括:
021:在摄像头模组100处于第三变焦倍数的变焦模式时,控制长焦摄像头20以第一长焦距状态获取长焦原始图像,并对长焦原始图像进行第一图像处理得到目标图像;
022:在摄像头模组100处于第四变焦倍数的变焦模式时,控制长焦摄像头20以第一长焦距状态获取长焦原始图像,并对长焦原始图像进行第一图像处理和第二图像处理得到目标图像;
023:在摄像头模组100处于第三变焦倍数和第四变焦倍数之间的变焦模式时,控制长焦摄像头20以第一长焦距状态获取长焦原始图像,并对长焦原始图像进行第一图像处理和第二图像处理得到目标图像;和
024:在摄像头模组100处于第四变焦倍数和第二预定变焦倍数之间的变焦模式时,控制长焦摄像头20以第一长焦距状态获取长焦原始图像,并对长焦原始图像进行第一图像处理和第二图像处理得到目标图像;
其中,第三变焦倍数大于或等于第一预定变焦倍数,第四变焦倍数大于第三变焦倍数且小于第二预定变焦倍数。
请参阅图2,在某些实施方式中,处理器200可以用于执行021、022、023和024中的方法。
也即是说,处理器200可以用于:在摄像头模组100处于第三变焦倍数的变焦模式时,控制长焦摄像头20以第一长焦距状态获取长焦原始图像,并对长焦原始图像进行第一图像处理得到目标图像;在摄像头模组100处于第四变焦倍数的变焦模式时,控制长焦摄像头20以第一长焦距状态获取长焦原始图像,并对长焦原始图像进行第一图像处理和第二图像处理得到目标图像;在摄像头模组100处于第三变焦倍数和第四变焦倍数之间的变焦模式时,控制长焦摄像头20以第一长焦距状态获取长焦原始图像,并对长焦原始图像进行第一图像处理和第二图像处理得到目标图像;和在摄像头模组100处于第四变焦倍数和第二预定变焦倍数之间的变焦模式时,控制长焦摄像头20以第一长焦距状态获取长焦原始图像,并对长焦原始图像进行第一图像处理和第二图像处理得到目标图像;其中,第三变焦倍数大于或等于第一预定变焦倍数,第四变焦倍数大于第三变焦倍数且小于第二预定变焦倍数。
请参阅图2,在某些实施方式中,摄像头模组100可以用于执行021、022、023和024中的方法。
也即是说,在摄像头模组100处于第三变焦倍数的变焦模式时,长焦摄像头20可以以第一长焦距状态获取长焦原始图像,摄像头模组100可以对长焦原始图像进行第一图像处理得到目标图像;在摄像头模组100处于第四变焦倍数的变焦模式时,长焦摄像头20可以以第一长焦距状态获取长焦原始图像,摄像头模组100可以对长焦原始图像进行第一图像处理和第二图像处理得到目标图像;在摄像头模组100处于第三变焦倍数和第四变焦倍数之间的变焦模式时,长焦摄像头20可以以第一长焦距状态获取长焦原始图像,摄像头模组100可以对长焦原始图像进行第一图像处理和第二图像处理得到目标图像;在摄像头模组100处于第四变焦倍数和第二预定变焦倍数之间的变焦模式时,长焦摄像头20可以以第一长焦距状态获取长焦原始图像,摄像头模组100可以对长焦原始图像进行第一图像处理和第二图像处理得到目标图像;其中,第三变焦倍数大于或等于第一预定变焦倍数,第四变焦倍数大于第三变焦倍数且小于第二预定变焦倍数。
本申请实施方式以第三变焦倍数为3倍、第四变焦倍数为4倍为例进行说明。第一长焦距状态可以为长焦摄像头20以3倍光学变焦获取4800万像素的长焦原始图像的状态。
请参阅图13,在摄像头模组100处于3倍的变焦模式时,处理器200控制长焦摄像头20以第一长焦距状态获取4800万像素的长焦原始图像,并对4800万像素的长焦原始图像进行压缩处理得到1200万像素的目标图像。具体地,压缩处理可以是前述均值运算或最大值运算。本申请实施方式通过对4800万像素的长焦原始图像进行压缩处理,电子装置1000可输出相较于3倍的变焦模式下获得的长焦原始图像视场范围不变、且相较于1倍的变焦模式下得到的目标图像解析力不变的1200万像素的目标图像。
请参阅图14,在摄像头模组100处于4倍的变焦模式时,处理器200控制长焦摄像头20以第一长焦距状态获取4800万像素的长焦原始图像,并对4800万像素的长焦原始图像进行裁剪处理和压缩处理得到1200万像素的目标图像。处理器200具体可以是先对4800万像素的长焦原始图像进行裁剪处理得到中间图像,再对中间图像进行压缩处理得到1200万像素的目标图像。中间图像的像素尺寸小于 长焦原始图像的像素尺寸,且大于目标图像的像素尺寸。例如,中间图像的像素尺寸可以是2100万像素。处理器200先对4800万像素的长焦原始图像进行裁剪处理得到2100万像素的中间图像,裁剪处理所截取的区域可以是长焦原始图像最中间的区域,也可以是根据用户输入所确定的区域。然后,处理器200对2100万像素的中间图像进行压缩处理得到1200万像素的目标图像,压缩处理可以是前述均值运算或最大值运算。由于4倍的变焦模式对应的视场范围一般小于3倍的变焦模式对应的视场范围,因此,本申请实施方式需要对4800万像素的长焦原始图像进行裁剪处理得到2100万像素的中间图像,以减小视场范围,再对2100万像素的中间图像进行压缩处理使得电子装置1000可输出相较于3倍的变焦模式视场范围减小、且相较于3倍的变焦模式解析力不变(由于3倍的变焦模式的解析力与1倍的变焦模式的解析力相同,因此此处也是相较于1倍的变焦模式解析力不变)的1200万像素的目标图像。
请参阅图15,在摄像头模组100处于3倍和4倍之间的变焦模式时(例如3.6倍的变焦模式),处理器200控制长焦摄像头20以第一长焦距状态获取4800万像素的长焦原始图像,并对4800万像素的长焦原始图像进行裁剪处理和压缩处理得到1200万像素的目标图像。处理器200具体可以是先对4800万像素的长焦原始图像进行裁剪处理得到中间图像,再对中间图像进行压缩处理得到1200万像素的目标图像。中间图像的像素尺寸小于长焦原始图像的像素尺寸,且大于目标图像的像素尺寸。例如,中间图像的像素尺寸可以是3400万像素。处理器200先对4800万像素的长焦原始图像进行裁剪处理得到3400万像素的中间图像,裁剪处理所截取的区域可以是长焦原始图像最中间的区域,也可以是根据用户输入所确定的区域。然后,处理器200对3400万像素的中间图像进行压缩处理得到1200万像素的目标图像,压缩处理可以是前述均值运算或最大值运算。由于3.6倍的变焦模式对应的视场范围一般小于3倍的变焦模式对应的视场范围,因此,本申请实施方式需要对4800万像素的长焦原始图像进行裁剪处理得到3400万像素的中间图像,以减小视场范围,再对3400万像素的中间图像进行压缩处理使得电子装置1000可输出相较于3倍的变焦模式视场范围减小、且相较于3倍的变焦模式解析力不变(由于3倍的变焦模式的解析力与1倍的变焦模式的解析力相同,因此此处也是相较于1倍的变焦模式解析力不变)的1200万像素的目标图像。
请参阅图16,在摄像头模组100处于4倍和5倍之间的变焦模式时(例如4.5倍的变焦模式),处理器200控制长焦摄像头20以第一长焦距状态获取4800万像素的长焦原始图像,并对4800万像素的长焦原始图像进行裁剪处理和压缩处理得到1200万像素的目标图像。处理器200具体可以是先对4800万像素的长焦原始图像进行裁剪处理得到中间图像,再对中间图像进行压缩处理得到1200万像素的目标图像。中间图像的像素尺寸小于长焦原始图像的像素尺寸,且大于目标图像的像素尺寸。例如,中间图像的像素尺寸可以是1900万像素。处理器200先对4800万像素的长焦原始图像进行裁剪处理得到1900万像素的中间图像,裁剪处理所截取的区域可以是长焦原始图像最中间的区域,也可以是根据用户输入所确定的区域。然后,处理器200对1900万像素的中间图像进行压缩处理得到1200万像素的目标图像,压缩处理可以是前述均值运算或最大值运算。由于4.5倍的变焦模式对应的视场范围一般小于3倍的变焦模式对应的视场范围,因此,本申请实施方式需要对4800万像素的长焦原始图像进行裁剪处理得到1900万像素的中间图像,以减小视场范围,再对1900万像素的中间图像进行压缩处理使得电子装置1000可输出相较于3倍的变焦模式视场范围减小、且相较于3倍的变焦模式解析力不变(由于3倍的变焦模式的解析力与1倍的变焦模式的解析力相同,因此此处也是相较于1倍的变焦模式解析力不变)的1200万像素的目标图像。
请参考图17,在某些实施方式中,在摄像头模组100处于大于或等于第二预定变焦倍数的变焦模式时,控制长焦摄像头20以第二长焦距状态获取长焦原始图像,并根据长焦原始图像得到目标图像(即03),包括:
031:在摄像头模组100处于第五变焦倍数的变焦模式时,控制长焦摄像头20以第二长焦距状态获取长焦原始图像,并对长焦原始图像进行第一图像处理得到目标图像;
032:在摄像头模组100处于第六变焦倍数的变焦模式时,控制长焦摄像头20以第二长焦距状态获取长焦原始图像,并对长焦原始图像进行第二图像处理得到目标图像;和
033:在摄像头模组100处于第五变焦倍数和第六变焦倍数之间的变焦模式时,控制长焦摄像头20以第二长焦距状态获取长焦原始图像,并对长焦原始图像进行第一图像处理和第二图像处理得到目标图像;
其中,第五变焦倍数大于或等于第二预定变焦倍数,第六变焦倍数大于第五变焦倍数。
请参考图2,在某些实施方式中,处理器200可以用于执行031、032和033中的方法。
也即是说,处理器200可以用于:在摄像头模组100处于第五变焦倍数的变焦模式时,控制长焦摄像头20以第二长焦距状态获取长焦原始图像,并对长焦原始图像进行第一图像处理得到目标图像; 在摄像头模组100处于第六变焦倍数的变焦模式时,控制长焦摄像头20以第二长焦距状态获取长焦原始图像,并对长焦原始图像进行第二图像处理得到目标图像;和在摄像头模组100处于第五变焦倍数和第六变焦倍数之间的变焦模式时,控制长焦摄像头20以第二长焦距状态获取长焦原始图像,并对长焦原始图像进行第一图像处理和第二图像处理得到目标图像;其中,第五变焦倍数大于或等于第二预定变焦倍数,第六变焦倍数大于第五变焦倍数。
请参考图2,在某些实施方式中,摄像头模组100可以用于执行031、032和033中的方法。
也即是说,在摄像头模组100处于第五变焦倍数的变焦模式时,长焦摄像头20可以以第二长焦距状态获取长焦原始图像,摄像头模组100可以对长焦原始图像进行第一图像处理得到目标图像;在摄像头模组100处于第六变焦倍数的变焦模式时,长焦摄像头20可以以第二长焦距状态获取长焦原始图像,摄像头模组100可以对长焦原始图像进行第二图像处理得到目标图像;在摄像头模组100处于第五变焦倍数和第六变焦倍数之间的变焦模式时,长焦摄像头20可以以第二长焦距状态获取长焦原始图像,摄像头模组100可以对长焦原始图像进行第一图像处理和第二图像处理得到目标图像;其中,第五变焦倍数大于或等于第二预定变焦倍数,第六变焦倍数大于第五变焦倍数。
本申请实施方式以第五变焦倍数为5倍、第六变焦倍数为10倍为例进行说明。第二长焦距状态可以为长焦摄像头20以5倍光学变焦获取4800万像素的长焦原始图像的状态。
请参阅图18,在摄像头模组100处于5倍的变焦模式时,处理器200控制长焦摄像头20以第二长焦距状态获取4800万像素的长焦原始图像,并对4800万像素的长焦原始图像进行压缩处理得到1200万像素的目标图像。具体地,压缩处理可以是前述均值运算或最大值运算。本申请实施方式通过对4800万像素的长焦原始图像进行压缩处理,电子装置1000可输出相较于5倍的变焦模式下获得的长焦原始图像视场范围不变、且相较于1倍的变焦模式下得到的目标图像解析力不变的1200万像素的目标图像。
请参阅图19,在摄像头模组100处于10倍的变焦模式时,处理器200控制长焦摄像头20以第二长焦距状态获取4800万像素的长焦原始图像,并对4800万像素的长焦原始图像进行裁剪处理得到1200万像素的目标图像。由于10倍的变焦模式对应的视场范围一般小于5倍的变焦模式对应的视场范围,因此,本申请实施方式需要对4800万像素的长焦原始图像进行裁剪处理,以减小视场范围,使得电子装置1000输出相较于5倍的变焦模式视场范围减小、且相较于5倍的变焦模式解析力不变(由于5倍的变焦模式的解析力与1倍的变焦模式的解析力相同,因此此处也是相较于1倍的变焦模式解析力不变)的1200万像素的目标图像。其中,裁剪处理所截取的区域可以是长焦原始图像最中间的区域,也可以是根据用户输入所确定的区域。
请参阅图20,在摄像头模组100处于5倍和10倍之间的变焦模式时(例如7倍的变焦模式),处理器200控制长焦摄像头20以第二长焦距状态获取4800万像素的长焦原始图像,并对4800万像素的长焦原始图像进行裁剪处理和压缩处理得到1200万像素的目标图像。处理器200具体可以是先对4800万像素的长焦原始图像进行裁剪处理得到中间图像,再对中间图像进行压缩处理得到1200万像素的目标图像。中间图像的像素尺寸小于长焦原始图像的像素尺寸,且大于目标图像的像素尺寸。例如,中间图像的像素尺寸可以是1900万像素。处理器200先对4800万像素的长焦原始图像进行裁剪处理得到1900万像素的中间图像,裁剪处理所截取的区域可以是长焦原始图像最中间的区域,也可以是根据用户输入所确定的区域。然后,处理器200对1900万像素的中间图像进行压缩处理得到1200万像素的目标图像,压缩处理可以是前述均值运算或最大值运算。由于7倍的变焦模式对应的视场范围一般小于5倍的变焦模式对应的视场范围,因此,本申请实施方式需要对4800万像素的长焦原始图像进行裁剪处理得到1900万像素的中间图像,以减小视场范围,再对1900万像素的中间图像进行压缩处理使得电子装置1000可输出相较于5倍的变焦模式视场范围减小、且相较于5倍的变焦模式解析力不变(由于5倍的变焦模式的解析力与1倍的变焦模式的解析力相同,因此此处也是相较于1倍的变焦模式解析力不变)的1200万像素的目标图像。
综上,本申请实施方式的变焦方法和电子装置1000通过设置第一预定变焦倍数和第二预定变焦倍数,在摄像头模组100处于小于第一预定变焦倍数的变焦模式、大于或等于第一预定变焦倍数且小于第二预定变焦倍数的变焦模式、以及大于或等于第二预定变焦倍数的变焦模式时,分别进行不同的图像处理,从而能够保证全焦段输出的目标图像的解析力不变,提高成像性能(即全程光学性能都是无损的,实现了光学的无损线性变焦)。
请参阅图21,本申请实施方式还提供一种电子装置1000。电子装置1000包括一个或多个处理器200、存储器300以及一个或多个程序。其中一个或多个程序被存储在存储器300中,并且被配置由一个或多个处理器200执行。程序包括用于执行上述任一实施方式的变焦方法的指令。
例如,程序包括用于执行以下变焦方法的指令:
01:在摄像头模组100处于小于第一预定变焦倍数的变焦模式时,控制主摄像头10获取主原始图 像,并根据主原始图像得到目标图像;
02:在摄像头模组100处于大于或等于第一预定变焦倍数且小于第二预定变焦倍数的变焦模式时,控制长焦摄像头20以第一长焦距状态获取长焦原始图像,并根据长焦原始图像得到目标图像;和
03:在摄像头模组100处于大于或等于第二预定变焦倍数的变焦模式时,控制长焦摄像头20以第二长焦距状态获取长焦原始图像,并根据长焦原始图像得到目标图像。
本申请实施方式的电子装置1000在不同变焦倍数的变焦模式下,分别根据主摄像头10获取的主原始图像、长焦摄像头20以第一长焦距状态获取的长焦原始图像、以及长焦摄像头20以第二长焦距状态获取的长焦原始图像得到目标图像,能够保证全焦段的目标图像的解析力不变,提高成像性能。
请参阅图22,本申请实施方式还提供一种计算机可读存储介质2000。计算机可读存储介质2000包括与电子装置1000结合使用的计算机程序。计算机程序可被电子装置1000的处理器200执行以完成上述任一实施方式的变焦方法。
例如,计算机程序可被处理器200执行以完成以下变焦方法:
01:在摄像头模组100处于小于第一预定变焦倍数的变焦模式时,控制主摄像头10获取主原始图像,并根据主原始图像得到目标图像;
02:在摄像头模组100处于大于或等于第一预定变焦倍数且小于第二预定变焦倍数的变焦模式时,控制长焦摄像头20以第一长焦距状态获取长焦原始图像,并根据长焦原始图像得到目标图像;和
03:在摄像头模组100处于大于或等于第二预定变焦倍数的变焦模式时,控制长焦摄像头20以第二长焦距状态获取长焦原始图像,并根据长焦原始图像得到目标图像。
本申请实施方式的计算机可读存储介质2000在不同变焦倍数的变焦模式下,分别根据主摄像头10获取的主原始图像、长焦摄像头20以第一长焦距状态获取的长焦原始图像、以及长焦摄像头20以第二长焦距状态获取的长焦原始图像得到目标图像,能够保证全焦段的目标图像的解析力不变,提高成像性能。
在本说明书的描述中,参考术语“一个实施方式”、“一些实施方式”、“示意性实施方式”、“示例”、“具体示例”或“一些示例”等的描述意指结合所述实施方式或示例描述的具体特征、结构、材料或者特点包含于本申请的至少一个实施方式或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施方式或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施方式或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。
流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现特定逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本申请的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本申请的实施例所属技术领域的技术人员所理解。
尽管上面已经示出和描述了本申请的实施方式,可以理解的是,上述实施方式是示例性的,不能理解为对本申请的限制,本领域的普通技术人员在本申请的范围内可以对上述实施方式进行变化、修改、替换和变型。

Claims (21)

  1. 一种变焦方法,用于电子装置,其特征在于,所述电子装置包括摄像头模组,所述摄像头模组包括主摄像头和长焦摄像头,所述主摄像头用于获取第一像素尺寸的主原始图像,所述长焦摄像头用于获取第二像素尺寸的长焦原始图像,所述长焦摄像头包括第一长焦距状态和第二长焦距状态,所述摄像头模组用于输出第三像素尺寸的目标图像,所述第一像素尺寸和所述第二像素尺寸均大于所述第三像素尺寸,所述变焦方法包括:
    在所述摄像头模组处于小于第一预定变焦倍数的变焦模式时,控制所述主摄像头获取所述主原始图像,并根据所述主原始图像得到所述目标图像;
    在所述摄像头模组处于大于或等于所述第一预定变焦倍数且小于第二预定变焦倍数的变焦模式时,控制所述长焦摄像头以所述第一长焦距状态获取所述长焦原始图像,并根据所述长焦原始图像得到所述目标图像;和
    在所述摄像头模组处于大于或等于所述第二预定变焦倍数的变焦模式时,控制所述长焦摄像头以所述第二长焦距状态获取所述长焦原始图像,并根据所述长焦原始图像得到所述目标图像。
  2. 根据权利要求1所述的变焦方法,其特征在于,所述在所述摄像头模组处于小于第一预定变焦倍数的变焦模式时,控制所述主摄像头获取所述主原始图像,并根据所述主原始图像得到所述目标图像,包括:
    在所述摄像头模组处于第一变焦倍数的变焦模式时,控制所述主摄像头获取所述主原始图像,并对所述主原始图像进行第一图像处理得到所述目标图像;
    在所述摄像头模组处于第二变焦倍数的变焦模式时,控制所述主摄像头获取所述主原始图像,并对所述主原始图像进行第二图像处理得到所述目标图像;和
    在所述摄像头模组处于所述第一变焦倍数和所述第二变焦倍数之间的变焦模式时,控制所述主摄像头获取所述主原始图像,并对所述主原始图像进行所述第一图像处理和所述第二图像处理得到所述目标图像;
    其中,所述第一变焦倍数和所述第二变焦倍数均小于所述第一预定变焦倍数。
  3. 根据权利要求1所述的变焦方法,其特征在于,所述在所述摄像头模组处于大于或等于所述第一预定变焦倍数且小于第二预定变焦倍数的变焦模式时,控制所述长焦摄像头以所述第一长焦距状态获取所述长焦原始图像,并根据所述长焦原始图像得到所述目标图像,包括:
    在所述摄像头模组处于第三变焦倍数的变焦模式时,控制所述长焦摄像头以所述第一长焦距状态获取所述长焦原始图像,并对所述长焦原始图像进行第一图像处理得到所述目标图像;
    在所述摄像头模组处于第四变焦倍数的变焦模式时,控制所述长焦摄像头以所述第一长焦距状态获取所述长焦原始图像,并对所述长焦原始图像进行所述第一图像处理和第二图像处理得到所述目标图像;
    在所述摄像头模组处于所述第三变焦倍数和所述第四变焦倍数之间的变焦模式时,控制所述长焦摄像头以所述第一长焦距状态获取所述长焦原始图像,并对所述长焦原始图像进行所述第一图像处理和所述第二图像处理得到所述目标图像;和
    在所述摄像头模组处于所述第四变焦倍数和所述第二预定变焦倍数之间的变焦模式时,控制所述长焦摄像头以所述第一长焦距状态获取所述长焦原始图像,并对所述长焦原始图像进行所述第一图像处理和所述第二图像处理得到所述目标图像;
    其中,所述第三变焦倍数大于或等于所述第一预定变焦倍数,所述第四变焦倍数大于所述第三变焦倍数且小于所述第二预定变焦倍数。
  4. 根据权利要求1所述的变焦方法,其特征在于,所述在所述摄像头模组处于大于或等于所述第二预定变焦倍数的变焦模式时,控制所述长焦摄像头以所述第二长焦距状态获取所述长焦原始图像,并根据所述长焦原始图像得到所述目标图像,包括:
    在所述摄像头模组处于第五变焦倍数的变焦模式时,控制所述长焦摄像头以所述第二长焦距状态获取所述长焦原始图像,并对所述长焦原始图像进行第一图像处理得到所述目标图像;
    在所述摄像头模组处于第六变焦倍数的变焦模式时,控制所述长焦摄像头以所述第二长焦距状态获取所述长焦原始图像,并对所述长焦原始图像进行第二图像处理得到所述目标图像;和
    在所述摄像头模组处于所述第五变焦倍数和所述第六变焦倍数之间的变焦模式时,控制所述长焦摄像头以所述第二长焦距状态获取所述长焦原始图像,并对所述长焦原始图像进行所述第一图像处理和所述第二图像处理得到所述目标图像;
    其中,所述第五变焦倍数大于或等于所述第二预定变焦倍数,所述第六变焦倍数大于所述第五变 焦倍数。
  5. 根据权利要求2至4任意一项所述的变焦方法,其特征在于,所述第一图像处理包括压缩处理,所述第二图像处理包括裁剪处理。
  6. 一种电子装置,其特征在于,所述电子装置包括摄像头模组和处理器,所述摄像头模组包括主摄像头和长焦摄像头,所述主摄像头用于获取第一像素尺寸的主原始图像,所述长焦摄像头用于获取第二像素尺寸的长焦原始图像,所述长焦摄像头包括第一长焦距状态和第二长焦距状态,所述摄像头模组用于输出第三像素尺寸的目标图像,所述第一像素尺寸和所述第二像素尺寸均大于所述第三像素尺寸,所述处理器用于:在所述摄像头模组处于小于第一预定变焦倍数的变焦模式时,控制所述主摄像头获取所述主原始图像,并根据所述主原始图像得到所述目标图像;在所述摄像头模组处于大于或等于所述第一预定变焦倍数且小于第二预定变焦倍数的变焦模式时,控制所述长焦摄像头以所述第一长焦距状态获取所述长焦原始图像,并根据所述长焦原始图像得到所述目标图像;和在所述摄像头模组处于大于或等于所述第二预定变焦倍数的变焦模式时,控制所述长焦摄像头以所述第二长焦距状态获取所述长焦原始图像,并根据所述长焦原始图像得到所述目标图像。
  7. 根据权利要求6所述的电子装置,其特征在于,所述处理器还用于:在所述摄像头模组处于第一变焦倍数的变焦模式时,控制所述主摄像头获取所述主原始图像,并对所述主原始图像进行第一图像处理得到所述目标图像;在所述摄像头模组处于第二变焦倍数的变焦模式时,控制所述主摄像头获取所述主原始图像,并对所述主原始图像进行第二图像处理得到所述目标图像;和在所述摄像头模组处于所述第一变焦倍数和所述第二变焦倍数之间的变焦模式时,控制所述主摄像头获取所述主原始图像,并对所述主原始图像进行所述第一图像处理和所述第二图像处理得到所述目标图像;其中,所述第一变焦倍数和所述第二变焦倍数均小于所述第一预定变焦倍数。
  8. 根据权利要求6所述的电子装置,其特征在于,所述处理器还用于:在所述摄像头模组处于第三变焦倍数的变焦模式时,控制所述长焦摄像头以所述第一长焦距状态获取所述长焦原始图像,并对所述长焦原始图像进行第一图像处理得到所述目标图像;在所述摄像头模组处于第四变焦倍数的变焦模式时,控制所述长焦摄像头以所述第一长焦距状态获取所述长焦原始图像,并对所述长焦原始图像进行所述第一图像处理和第二图像处理得到所述目标图像;在所述摄像头模组处于所述第三变焦倍数和所述第四变焦倍数之间的变焦模式时,控制所述长焦摄像头以所述第一长焦距状态获取所述长焦原始图像,并对所述长焦原始图像进行所述第一图像处理和所述第二图像处理得到所述目标图像;和在所述摄像头模组处于所述第四变焦倍数和所述第二预定变焦倍数之间的变焦模式时,控制所述长焦摄像头以所述第一长焦距状态获取所述长焦原始图像,并对所述长焦原始图像进行所述第一图像处理和所述第二图像处理得到所述目标图像;其中,所述第三变焦倍数大于或等于所述第一预定变焦倍数,所述第四变焦倍数大于所述第三变焦倍数且小于所述第二预定变焦倍数。
  9. 根据权利要求6所述的电子装置,其特征在于,所述处理器还用于:在所述摄像头模组处于第五变焦倍数的变焦模式时,控制所述长焦摄像头以所述第二长焦距状态获取所述长焦原始图像,并对所述长焦原始图像进行第一图像处理得到所述目标图像;在所述摄像头模组处于第六变焦倍数的变焦模式时,控制所述长焦摄像头以所述第二长焦距状态获取所述长焦原始图像,并对所述长焦原始图像进行第二图像处理得到所述目标图像;和在所述摄像头模组处于所述第五变焦倍数和所述第六变焦倍数之间的变焦模式时,控制所述长焦摄像头以所述第二长焦距状态获取所述长焦原始图像,并对所述长焦原始图像进行所述第一图像处理和所述第二图像处理得到所述目标图像;其中,所述第五变焦倍数大于或等于所述第二预定变焦倍数,所述第六变焦倍数大于所述第五变焦倍数。
  10. 根据权利要求7至9任意一项所述的电子装置,其特征在于,所述第一图像处理包括压缩处理,所述第二图像处理包括裁剪处理。
  11. 一种电子装置,其特征在于,所述电子装置包括摄像头模组,所述摄像头模组包括主摄像头和长焦摄像头,所述主摄像头用于获取第一像素尺寸的主原始图像,所述长焦摄像头用于获取第二像素尺寸的长焦原始图像,所述长焦摄像头包括第一长焦距状态和第二长焦距状态,所述摄像头模组用于输出第三像素尺寸的目标图像,所述第一像素尺寸和所述第二像素尺寸均大于所述第三像素尺寸,在所述摄像头模组处于小于第一预定变焦倍数的变焦模式时,所述主摄像头获取主原始图像,所述摄像头模组根据所述主原始图像得到所述目标图像;在所述摄像头模组处于大于或等于所述第一预定变焦倍数且小于第二预定变焦倍数的变焦模式时,所述长焦摄像头以所述第一长焦距状态获取长焦原始图像,所述摄像头模组根据所述长焦原始图像得到所述目标图像;在所述摄像头模组处于大于或等于所述第二预定变焦倍数的变焦模式时,所述长焦摄像头以所述第二长焦距状态获取所述长焦原始图像,所述摄像头模组根据所述长焦原始图像得到所述目标图像。
  12. 根据权利要求11所述的电子装置,其特征在于,在所述摄像头模组处于第一变焦倍数的变焦模式 时,所述主摄像头获取所述主原始图像,所述摄像头模组对所述主原始图像进行第一图像处理得到所述目标图像;在所述摄像头模组处于第二变焦倍数的变焦模式时,所述主摄像头获取所述主原始图像,所述摄像头模组对所述主原始图像进行第二图像处理得到所述目标图像;和在所述摄像头模组处于所述第一变焦倍数和所述第二变焦倍数之间的变焦模式时,所述主摄像头获取所述主原始图像,所述摄像头模组对所述主原始图像进行所述第一图像处理和所述第二图像处理得到所述目标图像;其中,所述第一变焦倍数和所述第二变焦倍数均小于所述第一预定变焦倍数。
  13. 根据权利要求11所述的电子装置,其特征在于,在所述摄像头模组处于第三变焦倍数的变焦模式时,所述长焦摄像头以所述第一长焦距状态获取所述长焦原始图像,所述摄像头模组对所述长焦原始图像进行第一图像处理得到所述目标图像;在所述摄像头模组处于第四变焦倍数的变焦模式时,所述长焦摄像头以所述第一长焦距状态获取所述长焦原始图像,所述摄像头模组对所述长焦原始图像进行所述第一图像处理和第二图像处理得到所述目标图像;在所述摄像头模组处于所述第三变焦倍数和所述第四变焦倍数之间的变焦模式时,所述长焦摄像头以所述第一长焦距状态获取所述长焦原始图像,所述摄像头模组对所述长焦原始图像进行所述第一图像处理和所述第二图像处理得到所述目标图像;和在所述摄像头模组处于所述第四变焦倍数和所述第二预定变焦倍数之间的变焦模式时,所述长焦摄像头以所述第一长焦距状态获取所述长焦原始图像,所述摄像头模组对所述长焦原始图像进行所述第一图像处理和所述第二图像处理得到所述目标图像;其中,所述第三变焦倍数大于或等于所述第一预定变焦倍数,所述第四变焦倍数大于所述第三变焦倍数且小于所述第二预定变焦倍数。
  14. 根据权利要求11所述的电子装置,其特征在于,在所述摄像头模组处于第五变焦倍数的变焦模式时,所述长焦摄像头以所述第二长焦距状态获取所述长焦原始图像,所述摄像头模组对所述长焦原始图像进行第一图像处理得到所述目标图像;在所述摄像头模组处于第六变焦倍数的变焦模式时,所述长焦摄像头以所述第二长焦距状态获取所述长焦原始图像,所述摄像头模组对所述长焦原始图像进行第二图像处理得到所述目标图像;和在所述摄像头模组处于所述第五变焦倍数和所述第六变焦倍数之间的变焦模式时,所述长焦摄像头以所述第二长焦距状态获取所述长焦原始图像,所述摄像头模组对所述长焦原始图像进行所述第一图像处理和所述第二图像处理得到所述目标图像;其中,所述第五变焦倍数大于或等于所述第二预定变焦倍数,所述第六变焦倍数大于所述第五变焦倍数。
  15. 根据权利要求12至14任意一项所述的电子装置,其特征在于,所述第一图像处理包括压缩处理,所述第二图像处理包括裁剪处理。
  16. 一种电子装置,其特征在于,包括:一个或多个处理器;存储器;以及一个或多个程序,其中所述一个或多个程序被存储在所述存储器中,并且被配置由所述一个或多个处理器执行,所述程序包括用于执行变焦方法的指令,所述变焦方法,用于电子装置,所述电子装置还包括摄像头模组,所述摄像头模组包括主摄像头和长焦摄像头,所述主摄像头用于获取第一像素尺寸的主原始图像,所述长焦摄像头用于获取第二像素尺寸的长焦原始图像,所述长焦摄像头包括第一长焦距状态和第二长焦距状态,所述摄像头模组用于输出第三像素尺寸的目标图像,所述第一像素尺寸和所述第二像素尺寸均大于所述第三像素尺寸,所述变焦方法包括:在所述摄像头模组处于小于第一预定变焦倍数的变焦模式时,控制所述主摄像头获取所述主原始图像,并根据所述主原始图像得到所述目标图像;在所述摄像头模组处于大于或等于所述第一预定变焦倍数且小于第二预定变焦倍数的变焦模式时,控制所述长焦摄像头以所述第一长焦距状态获取所述长焦原始图像,并根据所述长焦原始图像得到所述目标图像;和在所述摄像头模组处于大于或等于所述第二预定变焦倍数的变焦模式时,控制所述长焦摄像头以所述第二长焦距状态获取所述长焦原始图像,并根据所述长焦原始图像得到所述目标图像。
  17. 根据权利要求16所述的电子装置,其特征在于,所述在所述摄像头模组处于小于第一预定变焦倍数的变焦模式时,控制所述主摄像头获取所述主原始图像,并根据所述主原始图像得到所述目标图像,包括:在所述摄像头模组处于第一变焦倍数的变焦模式时,控制所述主摄像头获取所述主原始图像,并对所述主原始图像进行第一图像处理得到所述目标图像;在所述摄像头模组处于第二变焦倍数的变焦模式时,控制所述主摄像头获取所述主原始图像,并对所述主原始图像进行第二图像处理得到所述目标图像;和在所述摄像头模组处于所述第一变焦倍数和所述第二变焦倍数之间的变焦模式时,控制所述主摄像头获取所述主原始图像,并对所述主原始图像进行所述第一图像处理和所述第二图像处理得到所述目标图像;其中,所述第一变焦倍数和所述第二变焦倍数均小于所述第一预定变焦倍数。
  18. 根据权利要求16所述的电子装置,其特征在于,所述在所述摄像头模组处于大于或等于所述第一预定变焦倍数且小于第二预定变焦倍数的变焦模式时,控制所述长焦摄像头以所述第一长焦距状态获取所述长焦原始图像,并根据所述长焦原始图像得到所述目标图像,包括:在所述摄 像头模组处于第三变焦倍数的变焦模式时,控制所述长焦摄像头以所述第一长焦距状态获取所述长焦原始图像,并对所述长焦原始图像进行第一图像处理得到所述目标图像;在所述摄像头模组处于第四变焦倍数的变焦模式时,控制所述长焦摄像头以所述第一长焦距状态获取所述长焦原始图像,并对所述长焦原始图像进行所述第一图像处理和第二图像处理得到所述目标图像;在所述摄像头模组处于所述第三变焦倍数和所述第四变焦倍数之间的变焦模式时,控制所述长焦摄像头以所述第一长焦距状态获取所述长焦原始图像,并对所述长焦原始图像进行所述第一图像处理和所述第二图像处理得到所述目标图像;和在所述摄像头模组处于所述第四变焦倍数和所述第二预定变焦倍数之间的变焦模式时,控制所述长焦摄像头以所述第一长焦距状态获取所述长焦原始图像,并对所述长焦原始图像进行所述第一图像处理和所述第二图像处理得到所述目标图像;其中,所述第三变焦倍数大于或等于所述第一预定变焦倍数,所述第四变焦倍数大于所述第三变焦倍数且小于所述第二预定变焦倍数。
  19. 根据权利要求16所述的电子装置,其特征在于,所述在所述摄像头模组处于大于或等于所述第二预定变焦倍数的变焦模式时,控制所述长焦摄像头以所述第二长焦距状态获取所述长焦原始图像,并根据所述长焦原始图像得到所述目标图像,包括:在所述摄像头模组处于第五变焦倍数的变焦模式时,控制所述长焦摄像头以所述第二长焦距状态获取所述长焦原始图像,并对所述长焦原始图像进行第一图像处理得到所述目标图像;在所述摄像头模组处于第六变焦倍数的变焦模式时,控制所述长焦摄像头以所述第二长焦距状态获取所述长焦原始图像,并对所述长焦原始图像进行第二图像处理得到所述目标图像;和在所述摄像头模组处于所述第五变焦倍数和所述第六变焦倍数之间的变焦模式时,控制所述长焦摄像头以所述第二长焦距状态获取所述长焦原始图像,并对所述长焦原始图像进行所述第一图像处理和所述第二图像处理得到所述目标图像;其中,所述第五变焦倍数大于或等于所述第二预定变焦倍数,所述第六变焦倍数大于所述第五变焦倍数。
  20. 根据权利要求16-19任意一项所述的电子装置,其特征在于,所述第一图像处理包括压缩处理,所述第二图像处理包括裁剪处理。
  21. 一种计算机可读存储介质,其特征在于,包括与电子装置结合使用的计算机程序,所述计算机程序可被所述电子装置的处理器执行以完成权利要求1至5任意一项所述的变焦方法。
PCT/CN2020/128464 2019-12-09 2020-11-12 变焦方法、电子装置和计算机可读存储介质 WO2021115014A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911251383.9 2019-12-09
CN201911251383.9A CN113037988B (zh) 2019-12-09 2019-12-09 变焦方法、电子装置和计算机可读存储介质

Publications (1)

Publication Number Publication Date
WO2021115014A1 true WO2021115014A1 (zh) 2021-06-17

Family

ID=76329575

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/128464 WO2021115014A1 (zh) 2019-12-09 2020-11-12 变焦方法、电子装置和计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN113037988B (zh)
WO (1) WO2021115014A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102857684A (zh) * 2011-06-27 2013-01-02 天彩电子(深圳)有限公司 一种智能数码变焦方法
US20160360121A1 (en) * 2009-11-09 2016-12-08 Yi-Chuan Cheng Portable device with successive extension zooming capability
CN108848316A (zh) * 2018-09-14 2018-11-20 高新兴科技集团股份有限公司 摄像机的自动变焦控制方法、自动变焦装置和摄像机
CN110493525A (zh) * 2019-09-04 2019-11-22 展讯通信(上海)有限公司 变焦图像确定方法及装置、存储介质、终端
CN111147755A (zh) * 2020-01-02 2020-05-12 普联技术有限公司 双摄像头的变焦处理方法、装置及终端设备
CN111641778A (zh) * 2018-03-26 2020-09-08 华为技术有限公司 一种拍摄方法、装置与设备

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060187322A1 (en) * 2005-02-18 2006-08-24 Janson Wilbert F Jr Digital camera using multiple fixed focal length lenses and multiple image sensors to provide an extended zoom range
CN1917559A (zh) * 2005-08-18 2007-02-21 广达电脑股份有限公司 数字变焦装置及其方法
CN106791377B (zh) * 2016-11-29 2019-09-27 Oppo广东移动通信有限公司 控制方法、控制装置及电子装置
WO2019183813A1 (zh) * 2018-03-27 2019-10-03 华为技术有限公司 一种拍摄方法及设备
CN110351487A (zh) * 2019-08-26 2019-10-18 Oppo广东移动通信有限公司 控制方法、控制装置、电子设备和存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160360121A1 (en) * 2009-11-09 2016-12-08 Yi-Chuan Cheng Portable device with successive extension zooming capability
CN102857684A (zh) * 2011-06-27 2013-01-02 天彩电子(深圳)有限公司 一种智能数码变焦方法
CN111641778A (zh) * 2018-03-26 2020-09-08 华为技术有限公司 一种拍摄方法、装置与设备
CN108848316A (zh) * 2018-09-14 2018-11-20 高新兴科技集团股份有限公司 摄像机的自动变焦控制方法、自动变焦装置和摄像机
CN110493525A (zh) * 2019-09-04 2019-11-22 展讯通信(上海)有限公司 变焦图像确定方法及装置、存储介质、终端
CN111147755A (zh) * 2020-01-02 2020-05-12 普联技术有限公司 双摄像头的变焦处理方法、装置及终端设备

Also Published As

Publication number Publication date
CN113037988B (zh) 2022-10-25
CN113037988A (zh) 2021-06-25

Similar Documents

Publication Publication Date Title
JP6945744B2 (ja) 撮影方法、装置、およびデバイス
EP3328055B1 (en) Control method, control device and electronic device
US8823837B2 (en) Zoom control method and apparatus, and digital photographing apparatus
JP4623193B2 (ja) 撮像装置、撮像方法、及びプログラム
US20130176458A1 (en) Flexible Burst Image Capture System
RU2608771C2 (ru) Устройство цифровой фотографии и способ управления им для увеличения скорости непрерывной съемки для захвата панорамных фотографий
RU2542943C2 (ru) Съемочное устройство, система камеры, устройство управления и программа
TWI720445B (zh) 攝像機裝置中圖像融合的方法及相關裝置
WO2022083229A1 (zh) 图像处理方法、电子装置及非易失性计算机可读存储介质
CN114342351B (zh) 捕获图像数据的装置、方法及存储介质
US20140132805A1 (en) Imaging device and image processing method
KR102680342B1 (ko) 복수의 이미지 센서들에 의해 획득되는 이미지 데이터에 기초하여 비디오 hdr 처리를 수행하기 위한 전자 장치
CN110691192B (zh) 图像处理方法、装置、存储介质及电子设备
CN115280756B (zh) 一种数码相机的缩放设置调整的方法、装置及可读存储介质
KR102072731B1 (ko) 촬영 장치, 그 제어 방법, 및 컴퓨터 판독가능 저장매체
US8269859B2 (en) Photographing apparatus that performs distortion correction in association with digital and optical zoom, method of controlling the same, and recording medium having recorded thereon computer program to implement the method
CN114449174A (zh) 拍摄方法、装置和电子设备
TWI524757B (zh) 影像擷取裝置及數位變焦顯示方法
WO2021115014A1 (zh) 变焦方法、电子装置和计算机可读存储介质
TW202232932A (zh) 多感測器設備中的相機感測器改變
CN110784642B (zh) 图像处理装置及其控制方法以及存储介质、摄像装置
JP2008067136A (ja) 撮像装置及び撮像方法
US9277119B2 (en) Electronic apparatus, method for controlling the same, and computer readable recording medium
JP7463114B2 (ja) 画像処理装置、画像処理装置の制御方法、プログラムおよび記憶媒体
US20220360717A1 (en) Image capture device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20898916

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20898916

Country of ref document: EP

Kind code of ref document: A1