CN113037988B - Zoom method, electronic device, and computer-readable storage medium - Google Patents

Zoom method, electronic device, and computer-readable storage medium Download PDF

Info

Publication number
CN113037988B
CN113037988B CN201911251383.9A CN201911251383A CN113037988B CN 113037988 B CN113037988 B CN 113037988B CN 201911251383 A CN201911251383 A CN 201911251383A CN 113037988 B CN113037988 B CN 113037988B
Authority
CN
China
Prior art keywords
zoom
tele
original image
image
camera
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201911251383.9A
Other languages
Chinese (zh)
Other versions
CN113037988A (en
Inventor
徐青
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201911251383.9A priority Critical patent/CN113037988B/en
Priority to PCT/CN2020/128464 priority patent/WO2021115014A1/en
Publication of CN113037988A publication Critical patent/CN113037988A/en
Application granted granted Critical
Publication of CN113037988B publication Critical patent/CN113037988B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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

Abstract

The application discloses a zooming method, an electronic device and a computer readable storage medium. The zooming method comprises the following steps: when the camera module is in a zooming mode smaller than a first preset zooming multiple, controlling a main camera to obtain a main original image, and obtaining a target image according to the main original image; when the camera module is in a zoom mode which is more than or equal to a first preset zoom multiple and less than a second preset zoom multiple, controlling the long-focus camera to obtain a long-focus original image in a first long-focus state, and obtaining a target image according to the long-focus original image; and when the camera module is in a zoom mode which is more than or equal to a second preset zoom multiple, controlling the long-focus camera to obtain a long-focus original image in a second long-focus state, and obtaining a target image according to the long-focus original image. The zooming method, the electronic device and the computer-readable storage medium of the embodiment of the application can ensure that the resolving power of the target image of the full focus section is unchanged, and the imaging performance is improved.

Description

Zoom method, electronic device, and computer-readable storage medium
Technical Field
The present application relates to the field of image processing technologies, and in particular, to a zooming method, an electronic device, or a computer-readable storage medium.
Background
In digital cameras, high resolution and high definition image quality are targets sought by the people who want to take pictures, and the picture effect of high resolution and high definition image quality is determined by the zoom power of the lens. The current lens generally obtains an image of a full focus segment through digital zooming, however, the digital zooming is realized by magnifying the image, which may reduce the resolution of the image and may not ensure the resolution of the image of the full focus segment to be unchanged.
Disclosure of Invention
The embodiment of the application provides a zooming method, an electronic device and a computer readable storage medium.
The zooming method provided by the embodiment of the application is used for an electronic device, and the electronic device comprises a camera module. The camera module comprises a main camera and a long-focus camera. The main camera is used for acquiring a main original image with a first pixel size. The tele camera is used for acquiring a tele original image with a second pixel size. The tele camera includes a first tele state and a second tele state. The camera module is used for outputting a target image with a third pixel size. The first pixel size and the second pixel size are both larger than the third pixel size. The zooming method comprises the following steps: when the camera module is in a zooming mode smaller than a first preset zooming multiple, controlling the main camera to obtain the main original image, and obtaining the target image according to the main original image; when the camera module is in a zoom mode which is greater than or equal to the first preset zoom multiple and smaller than a second preset zoom multiple, controlling the long-focus camera to obtain the long-focus original image in the first long-focus state, and obtaining the target image according to the long-focus original image; and when the camera module is in a zoom mode which is more than or equal to the second preset zoom multiple, controlling the long-focus camera to acquire the long-focus original image in the second long-focus state, and acquiring the target image according to the long-focus original image.
The electronic device provided by the embodiment of the application comprises a camera module and a processor. The camera module comprises a main camera and a long-focus camera. The main camera is used for acquiring a main original image with a first pixel size. The tele camera is used for acquiring a tele original image of a second pixel size. The tele camera includes a first tele state and a second tele state. The camera module is used for outputting a target image with a third pixel size. The first pixel size and the second pixel size are both larger than the third pixel size. The processor is configured to: when the camera module is in a zooming mode smaller than a first preset zooming multiple, controlling the main camera to obtain the main original image, and obtaining the target image according to the main original image; when the camera module is in a zoom mode which is greater than or equal to the first preset zoom multiple and smaller than a second preset zoom multiple, controlling the long-focus camera to obtain the long-focus original image in the first long-focus state, and obtaining the target image according to the long-focus original image; and when the camera module is in a zoom mode which is more than or equal to the second preset zoom multiple, controlling the long-focus camera to acquire the long-focus original image in the second long-focus state, and acquiring the target image according to the long-focus original image.
The electronic device provided by the embodiment of the application comprises the camera module. The camera module comprises a main camera and a long-focus camera. The main camera is used for acquiring a main original image with a first pixel size. The tele camera is used for acquiring a tele original image of a second pixel size. The tele camera includes a first tele state and a second tele state. The camera module is used for outputting a target image with a third pixel size. The first pixel size and the second pixel size are both larger than the third pixel size. When the camera module is in a zooming mode smaller than a first preset zooming multiple, the main camera acquires a main original image, and the camera module obtains the target image according to the main original image; when the camera module is in a zoom mode which is more than or equal to the first preset zoom multiple and less than a second preset zoom multiple, the long-focus camera acquires a long-focus original image in the first long-focus state, and the camera module acquires the target image according to the long-focus original image; when the camera module is in a zoom mode which is more than or equal to the second preset zoom multiple, the long-focus camera acquires the long-focus original image in the second long-focus state, and the camera module acquires the target image according to the long-focus original image.
The electronic device provided by the embodiment of the application comprises one or more processors, a memory and one or more programs. Wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors. The program includes instructions for the following zoom method: when the camera module is in a zoom mode smaller than a first preset zoom multiple, controlling a main camera to acquire a main original image and obtaining a target image according to the main original image; when the camera module is in a zoom mode which is greater than or equal to the first preset zoom multiple and smaller than the second preset zoom multiple, controlling the long-focus camera to obtain a long-focus original image in a first long-focus state, and obtaining the target image according to the long-focus original image; and when the camera module is in a zoom mode which is more than or equal to the second preset zoom multiple, controlling the long-focus camera to acquire the long-focus original image in a second long-focus state, and acquiring the target image according to the long-focus original image.
The computer-readable storage medium provided by the embodiment of the present application includes a computer program used in conjunction with an electronic device. The computer program is executable by a processor of the electronic device to perform the following zoom method: when the camera module is in a zooming mode smaller than a first preset zooming multiple, controlling a main camera to obtain a main original image, and obtaining a target image according to the main original image; when the camera module is in a zoom mode which is greater than or equal to the first preset zoom multiple and smaller than the second preset zoom multiple, controlling the long-focus camera to obtain a long-focus original image in a first long-focus state, and obtaining the target image according to the long-focus original image; and when the camera module is in a zoom mode which is more than or equal to the second preset zoom multiple, controlling the long-focus camera to obtain the long-focus original image in a second long-focus state, and obtaining the target image according to the long-focus original image.
According to the zooming method, the electronic device and the computer readable storage medium, the main camera and the tele camera are arranged, and the tele camera comprises the first tele state and the second tele state, so that in the zooming modes with different zooming multiples, the target image is obtained according to the main original image acquired by the main camera, the tele original image acquired by the tele camera in the first tele state and the tele original image acquired by the tele camera in the second tele state, the resolution of the target image in a full-focus section is not changed, and the imaging performance is improved.
Additional aspects and advantages of embodiments of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present application.
Drawings
The above and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is a schematic flow chart diagram of a zooming method according to some embodiments of the present application;
FIG. 2 is a schematic structural diagram of an electronic device according to some embodiments of the present application;
FIG. 3 is a graphical illustration of resolving power of a target image in a full focus segment in accordance with certain embodiments of the present application;
FIG. 4 is a schematic diagram of a first image processing process according to some embodiments of the present application;
FIG. 5 is a schematic diagram of a first image processing process according to some embodiments of the present application;
FIG. 6 is a schematic diagram of a second image processing process according to some embodiments of the present application;
FIG. 7 is a schematic flow chart diagram of a zooming 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 a first image processing in a zoom mode of 1 times according to some embodiments of the present disclosure;
FIG. 9 is a schematic diagram illustrating a second image processing of a main original image to obtain a target image in a 2 times zoom mode according to 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 process and a second image process in a zoom mode between 1 and 2 times according to some embodiments of the present application;
FIG. 11 is a schematic diagram of a second image processing and magnification processing of a main raw image to obtain a target image in a zoom mode between 2 and 3 times according to some embodiments of the present application;
FIG. 12 is a schematic flow chart diagram of a zooming method according to some embodiments of the present application;
FIG. 13 is a schematic diagram illustrating a first image processing of a tele original image to obtain a target image in a zoom mode of 3 times in some embodiments of the present application;
FIG. 14 is a schematic diagram of a target image obtained from a tele original image through a first image process and a second image process in a zoom mode of 4 times according to some embodiments of the present disclosure;
FIG. 15 is a schematic diagram of a first image process and a second image process performed on a tele original image in a zoom mode between 3 and 4 for a target image according to some embodiments of the present application;
FIG. 16 is a schematic diagram of a first image process and a second image process performed on a tele original image in a zoom mode between 4 and 5 times in some embodiments of the present application to obtain a target image;
FIG. 17 is a schematic diagram of a first image processing performed on a tele original image to obtain a target image in a zoom mode of 5 times in some embodiments of the present application;
FIG. 18 is a schematic diagram illustrating second image processing of a tele original image to obtain a target image in a zoom mode of 10 times in some embodiments of the present application;
FIG. 19 is a schematic diagram of a first image process and a second image process performed on a tele original image in a zoom mode between 5 and 10 times in some embodiments of the present application to obtain a target image;
FIG. 20 is a schematic diagram of a zoom method according to some embodiments of the present application;
FIG. 21 is a schematic view of an electronic device according to some embodiments of the present application;
fig. 22 is a schematic diagram of a connection state of a computer-readable storage medium and an electronic device according to some embodiments of the present application.
Description of the main elements and symbols:
the electronic device 1000, the camera module 100, the main camera 10, the telephoto camera 20, the processor 200, the memory 300, and the computer-readable storage medium 2000.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below by referring to the drawings are exemplary only for the purpose of explaining the embodiments of the present application, and are not to be construed as limiting the embodiments of the present application.
Referring to fig. 1 and 2, a zoom method is provided in an embodiment of the present disclosure. The zooming 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 acquire a main original image of a first pixel size, and the tele camera 20 is used to acquire a tele original image of a second pixel size. The tele camera 20 includes a first long focus state and a second long focus state. The camera module 100 is configured to output a target image with a third pixel size. The first pixel size and the second pixel size are both larger than the third pixel size. The zooming method comprises the following steps:
01: when the camera module 100 is in a zoom mode smaller than a first preset zoom multiple, controlling the main camera 10 to obtain a main original image, and obtaining a target image according to the main original image;
02: when the camera module 100 is in a zoom mode which is greater than or equal to a first preset zoom multiple and less than a second preset zoom multiple, controlling the tele camera 20 to obtain a tele original image in a first tele state, and obtaining a target image according to the tele original image; and
03: and when the camera module 100 is in the zoom mode larger than or equal to the second preset zoom multiple, controlling the tele camera 20 to acquire the tele original image in the second tele state, and obtaining the target image according to the tele original image.
Referring to fig. 2, an electronic device 1000 is further provided in the present embodiment. 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 acquire a main original image of a first pixel size, and the tele camera 20 is used to acquire a tele original image of a second pixel size. The tele camera 20 includes a first long focus state and a second long focus state. The camera module 100 is configured to output a target image with a third pixel size. The first pixel size and the second pixel size are both larger than the third pixel size. The zoom method according to the embodiment of the present application can be implemented by the electronic apparatus 1000 according to the embodiment of the present application. For example, the processor 200 may be used to execute the methods in 01, 02 and 03.
That is, processor 200 may be configured to: when the camera module 100 is in a zoom mode smaller than a first preset zoom multiple, controlling the main camera 10 to obtain a main original image, and obtaining a target image according to the main original image; when the camera module 100 is in a zoom mode which is greater than or equal to a first preset zoom multiple and less than a second preset zoom multiple, controlling the tele camera 20 to obtain a tele original image in a first tele state, and obtaining a target image according to the tele original image; and when the camera module 100 is in the zoom mode greater than or equal to the second preset zoom multiple, controlling the tele camera 20 to acquire the tele original image in the second tele state, and obtaining the target image according to the tele original image.
Referring to fig. 2, an electronic device 1000 is further provided in the present embodiment. 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 acquire a main original image of a first pixel size, and the tele camera 20 is used to acquire a tele original image of a second pixel size. The tele camera 20 includes a first tele state and a second tele state. The camera module 100 is configured to output a target image with a third pixel size. The first pixel size and the second pixel size are both larger than the third pixel size. The zoom method according to the embodiment of the present application can be implemented by the electronic apparatus 1000 according to the embodiment of the present application. For example, the camera module 100 can be used to perform the methods in 01, 02, and 03.
That is, when the camera module 100 is in the zoom mode smaller than the first predetermined zoom multiple, the main camera 10 may obtain a main original image, and the camera module 100 may obtain a target image according to the main original image; when the camera module 100 is in the zoom mode that is greater than or equal to the first predetermined zoom multiple and less than the second predetermined zoom multiple, the tele camera 20 may obtain a tele original image in the first tele state, and the camera module 100 may obtain a target image according to the tele original image; when the camera module 100 is in the zoom mode greater than or equal to the second predetermined zoom multiple, the tele camera 20 may obtain the tele original image in the second tele state, and the camera module 100 may obtain the target image according to the tele original image.
It should be noted that the embodiments of the present application may be: in the first mode, the processor 200 controls the main camera 10 to obtain a main original image, controls the tele camera 20 to obtain a tele original image in a first tele state, controls the tele camera 20 to obtain a tele original image in a second tele state, and performs related image processing on the main original image and the tele original image to obtain a target image; or in the second way, the main camera 10 directly acquires the main original image (not controlled by the processor 200), the tele camera 20 directly acquires the tele original image in the first tele state (not controlled by the processor 200), the tele camera 20 directly acquires the tele original image in the second tele state (not controlled by the processor 200), and then the camera module 100 performs related image processing on the main original image and the tele original image to obtain the target image. The embodiments of the present application are described by taking the first mode as an example, and the second mode is similar to the first mode, and the description thereof will not be repeated.
According to the zooming method and the electronic device 1000 in the embodiment of the application, the main camera 10 and the tele camera 20 are arranged, and the tele camera 20 comprises the first tele state and the second tele state, so that in the zooming modes with different zooming multiples, the target image is obtained according to the main original image obtained by the main camera 10, the tele original image obtained by the tele camera 20 in the first tele state, and the tele original image obtained by the tele camera 20 in the second tele state, respectively, the resolving power of the target image in the full-focus section is ensured to be unchanged, and the imaging performance is improved.
Specifically, the electronic device 1000 may be a mobile phone, a tablet computer, a notebook computer, an intelligent wearable device (such as an intelligent watch, an intelligent bracelet, an intelligent glasses, an intelligent helmet, etc.), a head display device, a virtual reality device, etc., without limitation.
The main camera 10 is used to obtain a main original image with a first pixel size, the telephoto camera 20 is used to obtain a telephoto original image with a second pixel size, and the camera module 100 finally outputs a target image with a third pixel size. The first pixel size and the second pixel size are both larger than the third pixel size. For example, it may be: the first pixel size is larger than the second pixel size, and the second pixel size is larger than the third pixel size; or the first pixel size is equal to the second pixel size, the first pixel size (second pixel size) being larger 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. In the present embodiment, the first pixel size is equal to the second pixel size, and the first pixel size (second pixel size) is larger than the third pixel size. In one embodiment, the first pixel size may be 4800 ten thousand pixels, the second pixel size may be 4800 ten thousand pixels, and the third pixel size may be 1200 ten thousand pixels.
The main camera 10 may be a general camera (the field range is between the field range of the telephoto camera and the field range of the wide-angle camera), or may be a wide-angle camera, and the main camera 10 may be a fixed focus lens or a zoom lens. The tele camera 20 is a zoom lens, and the tele camera 20 can include a first tele state and a second tele state. The first telephoto state may be a state in which the telephoto camera 20 optically zooms at a first predetermined multiple to acquire a telephoto original image. The second telephoto state may be a state in which the telephoto camera 20 optically zooms in at a second predetermined multiple to acquire a telephoto original image. The focal length corresponding to the second long focal length state is larger than the focal length corresponding to the first long focal length state. When the camera module 100 is used for acquiring a target image of a subject at a short distance, the main camera 10 may be used for capturing an image; when the camera module 100 is used to obtain a target image of a subject at a medium distance, the long-focus camera 20 may be used to capture an image in a first long-focus state; when the camera module 100 is used to obtain a target image of a long-distance object, the telephoto camera 20 may be used to capture an image in the second long focus state.
Referring to fig. 3, the camera module 100 according to the embodiment of the present disclosure can operate in a zoom mode smaller than a first predetermined zoom factor, a zoom mode greater than or equal to the first predetermined zoom factor and smaller than a second predetermined zoom factor, and a zoom mode greater than or equal to the second predetermined zoom factor. In the embodiment of the present application, the first predetermined zoom factor is 3 times, and the second predetermined zoom factor is 5 times, that is, the camera module 100 can operate in a zoom mode less than 3 times, a zoom mode greater than or equal to 3 times and less than 5 times, and a zoom mode greater than or equal to 5 times.
It is to be understood that in other examples, 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 factor may be set to other magnification such as 2 times, 4 times, or 5 times. In this case, the zoom magnification corresponding to the first telephoto state of the telephoto camera 20 corresponds to other magnification such as 2 times, 4 times, or 5 times. The second predetermined zoom factor may be set to 3 times, 4 times, or 6 times or other magnification. In this case, the zoom magnification corresponding to the second telephoto state of the telephoto camera 20 corresponds to other magnification such as 3 times, 4 times, or 6 times. For example, when the first predetermined zoom factor is set to 2 times, the zoom factor corresponding to the first long focal length state of the telephoto camera 20 is also set to 2 times, the second predetermined zoom factor may be set to 3 times, and the zoom factor corresponding to the second long focal length state of the telephoto camera 20 is also set to 3 times; when the first predetermined zoom factor is set to be 4 times, the zoom factor corresponding to the first long focal length state of the telephoto camera 20 is also set to be 4 times, the second predetermined zoom factor may be set to be 6 times, and the zoom factor corresponding to the second long focal length state of the telephoto camera 20 is also set to be 6 times; when the first predetermined zoom factor is set to 5 times, the zoom factor corresponding to the first telephoto state of the telephoto camera 20 is also set to 5 times, the second predetermined zoom factor may be set to 6 times, and the zoom factor corresponding to the second telephoto state of the telephoto camera 20 is also set to 6 times.
Take the case where the entire zoom magnification section of the zoom mode of the camera module 100 is 0 to 10 times. The camera module 100 can zoom in a (0, 3) zoom magnification section in which the main original image is acquired by the main camera 10, thereby obtaining the target image. The camera module 100 can also zoom in [3, 5) zoom multiple segment, in which the tele camera 20 acquires the tele original image in the first tele state, thereby obtaining the target image. The camera module 100 can also zoom in a [5, 10] zoom multiple segment, in which the tele camera 20 acquires a tele original image in a second tele state, thereby obtaining a target image. The zooming method of the embodiment of the application can ensure that the resolving power of the target image of the full focus section (0, 10) is unchanged, and the imaging performance is improved.
The process of obtaining the target image from the main original image or the tele original image may include a process of performing image processing on the main original image or the tele original image, such as first image processing and/or second image processing. A 1200 ten thousand pixel target image can be obtained from a 4800 ten thousand pixel main original image or a 4800 ten thousand pixel tele original image by performing the first image processing and/or the second image processing on the main original image or the tele original image. The first image processing may be compression processing, and the second image processing may be cropping processing. Of course, in other embodiments, the process of obtaining the target image from the main original image or the tele original image may also include not only the first image processing and/or the second image processing, but also more image processing, which is not limited herein.
Referring to FIG. 4, in one embodiment, the compression process may include a mean operation. Specifically, each of the main original image and each of the tele original images (hereinafter collectively referred to as original images) includes a plurality of pixels, for example, 4 × 4 pixels, distributed in two dimensions. The pixel values of the plurality of pixels are sequentially from left to right and from top to bottom: 135. 132, 120, 105, 160, 140, 112, 110, 153, 89, 87, 62, 105, 87, 53, 45. A predetermined number of pixels in the plurality of pixels may be used as a group (for example, 4 pixels circled by a dashed line are used as a group), and a pixel value of a merged pixel in the target image is finally obtained by compressing pixel values of the 4 pixels in each group. For example, the pixel value of the top left corner 4 pixels is averaged, (135 +132+160+ 140)/4 = 133), which results in that the pixel value of the top left corner merged pixel in the target image is 133. And so on, carrying out mean operation on the pixel values of the 4 pixels at the upper right corner to obtain a pixel value of 112 of a combined pixel at the upper right corner in the target image; carrying out mean operation on pixel values of 4 pixels at the lower left corner to obtain a pixel value of 109 of a combined pixel at the lower left corner in the target image; the pixel values of the 4 pixels at the lower right corner are subjected to a mean operation to obtain a pixel value 62 of the merged pixel at the lower right corner in the target image, which is not described herein. Finally, the merged pixel having the pixel value of 133, the merged pixel having the pixel value of 112, the merged pixel having the pixel value of 109, and the merged pixel having the pixel value of 62 form one frame of the target image.
It should be noted that in the actual processing process, the processor 200 needs to perform a mean operation on 4800 ten thousand pixels in the original image to obtain a target image of 1200 ten thousand pixels, and the number of pixels to be processed far exceeds 4 × 4 pixels in the above example.
In this embodiment, the pixel values of the target image obtained by the compression processing are directly derived from the original image, and no pixel is added, so that the analysis power of the target image obtained by compressing the original image is not reduced.
Referring to FIG. 5, in another embodiment, the compression process may include a maximum operation. Still taking the original image with 4 × 4 pixels as an example, the pixel value of one merged pixel in the target image is finally obtained by compressing the pixel values of 4 pixels in each group. For example, the maximum value operation is performed on the pixel values of the top left 4 pixels, MAX (135, 132, 160, 140) =160, and the pixel value of the merged pixel at the top left in the target image is 160. By analogy, performing maximum operation on the pixel values of the 4 pixels at the upper right corner to obtain a pixel value of 120 of the combined pixel at the upper right corner in the target image; carrying out maximum value operation on pixel values of 4 pixels at the lower left corner to obtain a pixel value of 153 of a combined pixel at the lower left corner in the target image; the maximum value operation is performed on the pixel values of the 4 pixels in the lower right corner, and the pixel value of the merged pixel in the lower right corner in the target image is obtained to be 87, which is not described herein one by one. Finally, the merged pixel having the pixel value of 160, the merged pixel having the pixel value of 120, the merged pixel having the pixel value of 153, and the merged pixel having the pixel value of 87 form a frame target image.
It should be noted that, in the actual processing procedure, the processor 200 needs to perform the maximum operation on 4800 ten thousand pixels in the original image to obtain the target image with 1200 ten thousand pixels, and the number of pixels to be processed far exceeds 4 × 4 pixels in the above example.
In this embodiment, the pixel values of the target image obtained by the compression processing are all derived from the original image (the pixel values are all original values in the original image), and no pixel is added, so the analysis power of the target image obtained by compressing the original image is not reduced.
Referring to fig. 6, in an embodiment, the cropping process may include cutting out a pixel region having the same aspect ratio as the original image from the original image, and using the pixel region as the target image, and discarding pixels outside the pixel region. For example, when a target image of 1200 ten thousand pixels is desired from an original image of 4800 ten thousand pixels, the number of pixels of the image cut by the cropping process is one fourth of the number of pixels of the original image, and therefore the length and width are both one half of the original image, the field of view range of the target image is one half of the original image, and the visual effect is a visual effect of 2 times zoom.
In this embodiment, the pixel values of the target image obtained by the cropping processing are all derived from the original image (the pixel values are all the original values in the original image), and no pixel is added, so the analysis power of the target image obtained by the cropping processing on the original image is not reduced.
Referring to fig. 7, in some embodiments, when the camera module 100 is in the zoom mode smaller than the first predetermined zoom multiple, the controlling the main camera 10 to obtain the main original image and obtain the target image (i.e. 01) according to the main original image includes:
011: when the camera module 100 is in a zoom mode of a first zoom multiple, controlling the main camera 10 to acquire a main original image, and performing first image processing on the main original image to obtain a target image;
012: when the camera module 100 is in the zoom mode of the second zoom multiple, controlling the main camera 10 to acquire a main original image, and performing second image processing on the main original image to obtain a target image; and
013: when the camera module 100 is in a zoom mode between a first zoom multiple and a second zoom multiple, controlling the main camera 10 to acquire a main original image, and performing first image processing and second image processing on the main original image to obtain a target image;
and the first zooming multiple and the second zooming multiple are both smaller than a first preset zooming multiple.
Referring to FIG. 2, in some embodiments, processor 200 may be configured to perform the methods of 011, 012, and 013.
That is, processor 200 may be configured to: when the camera module 100 is in a zoom mode of a first zoom multiple, controlling the main camera 10 to obtain a main original image, and performing first image processing on the main original image to obtain a target image; when the camera module 100 is in the zoom mode of the second zoom multiple, controlling the main camera 10 to obtain a main original image, and performing second image processing on the main original image to obtain a target image; when the camera module 100 is in a zoom mode between the first zoom multiple and the second zoom multiple, controlling the main camera 10 to obtain a main original image, and performing first image processing and second image processing on the main original image to obtain a target image; and the first zoom multiple and the second zoom multiple are both smaller than a first preset zoom multiple.
Referring to fig. 2, in some embodiments, the camera module 100 can be used to perform the methods of 011, 012, and 013.
That is to say, when the camera module 100 is in the zoom mode of the first zoom multiple, the main camera 10 may acquire a main original image, and the camera module 100 may perform the first image processing on the main original image to obtain a target image; when the camera module 100 is in the zoom mode of the second zoom multiple, the main camera 10 may obtain a main original image, and the camera module 100 may perform a second image processing on the main original image to obtain a target image; when the camera module 100 is in the zoom mode between the first zoom multiple and the second zoom multiple, the main camera 10 may obtain a main original image, and the camera module 100 may perform first image processing and second image processing on the main original image to obtain a target image; and the first zooming multiple and the second zooming multiple are both smaller than a first preset zooming multiple.
The present embodiment will be described by taking an example in which the first zoom factor is 1 times and the second zoom factor is 2 times. The fixed focal length of the main camera 10 can be the focal length corresponding to the first zoom multiple.
Referring to fig. 8, when the camera module 100 is in the zoom mode of 1 time, the processor 200 controls the main camera 10 to obtain a main original image of 4800 ten thousand pixels, and performs a compression process on the main original image of 4800 ten thousand pixels to obtain a target image of 1200 ten thousand pixels. Specifically, the compression process may be the aforementioned average operation or maximum value operation. In the embodiment of the present application, by performing compression processing on a main original image with 4800 ten thousand pixels, the electronic device 1000 may output a target image with 1200 ten thousand pixels without changing a field range.
Referring to fig. 9, when the camera module 100 is in the zoom mode of 2 times, the processor 200 controls the main camera 10 to obtain a main original image of 4800 ten thousand pixels, and performs a cropping process on the main original image of 4800 ten thousand pixels to obtain a target image of 1200 ten thousand pixels. Since the field of view range corresponding to the 2-time zoom mode is generally smaller than the field of view range corresponding to the 1-time zoom mode, in the embodiment of the present application, a main original image of 4800 ten thousand pixels needs to be cropped to reduce the field of view range, so that the electronic device 1000 outputs a 1200 ten thousand pixel target image with a reduced field of view range and unchanged resolving power compared to the 1-time zoom mode. The region intercepted by the cropping processing may be the most middle region of the main original image, or may be a region determined according to user input.
Referring to fig. 10, when the camera module 100 is in the zoom mode between 1 time and 2 times (for example, in the zoom mode of 1.5 times), the processor 200 controls the main camera 10 to obtain a main original image of 4800 ten thousand pixels, and performs cropping processing and compression processing on the main original image of 4800 ten thousand pixels to obtain a target image of 1200 ten thousand pixels. The processor 200 may specifically perform a cropping process on the 4800 ten thousand pixels of the main original image to obtain an intermediate image, and then perform a compression process on the intermediate image to obtain a 1200 ten thousand pixels of the target image. 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 2100 ten thousand pixels. The processor 200 performs cropping processing on the main original image with 4800 ten thousand pixels to obtain an intermediate image with 2100 ten thousand pixels, where the region obtained by the cropping processing may be the most intermediate region of the main original image or a region determined according to user input. Then, the processor 200 performs compression processing on the 2100 ten thousand pixels intermediate image to obtain a 1200 ten thousand pixels target image, and the compression processing may be the above-mentioned average value operation or maximum value operation. Since the field range corresponding to the zoom mode of 1.5 times is generally smaller than the field range corresponding to the zoom mode of 1 time, in the embodiment of the present application, a main original image of 4800 ten thousand pixels needs to be cropped to obtain an intermediate image of 2100 ten thousand pixels, so as to reduce the field range, and then the intermediate image of 2100 ten thousand pixels needs to be compressed, so that the electronic device 1000 outputs a target image of 1200 ten thousand pixels with a reduced field range and unchanged resolving power compared to the zoom mode of 1 time.
Referring to fig. 11, when the camera module 100 is in the zoom mode between 2 times and 3 times (for example, in the zoom mode of 2.4 times), the processor 200 controls the main camera 10 to obtain a main raw image of 4800 ten thousand pixels, and performs cropping processing and enlarging processing on the main raw image of 4800 ten thousand pixels to obtain a target image of 1200 ten thousand pixels. The processor 200 may specifically perform a cropping process on the 4800 ten thousand pixels of the main original image to obtain an intermediate image, and then perform an amplification process on the intermediate image to obtain a 1200 ten thousand pixels of the target image. 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 800 ten thousand pixels. The processor 200 performs cropping processing on the main original image with 4800 ten thousand pixels to obtain an intermediate image with 800 ten thousand pixels, where the region obtained by the cropping processing may be the most intermediate region of the main original image or a region determined according to user input. Then, the processor 200 performs an enlargement process on the intermediate image of 800 ten thousand pixels to obtain a target image of 1200 ten thousand pixels, and the enlargement process may be to enlarge the image directly by means of zooming. It can be understood that when the target image of 1200 ten thousand pixels is obtained by performing the enlargement processing on the intermediate image of 800 ten thousand pixels, the image analysis force is slightly reduced, and the image analysis force can be regarded as almost unchanged. Since the field range corresponding to the 2.4 times zoom mode is generally smaller than the field range corresponding to the 1 time zoom mode, in the embodiment of the present application, the main original image of 4800 ten thousand pixels needs to be cropped to obtain the intermediate image of 800 ten thousand pixels, so as to reduce the field range, and then the intermediate image of 800 ten thousand pixels needs to be enlarged, so that the electronic device 1000 outputs the target image of 1200 ten thousand pixels, which has a reduced field range and almost unchanged resolution in the 1 time zoom mode.
Referring to fig. 12, in some embodiments, when the camera module 100 is in the zoom mode greater than or equal to the first predetermined zoom multiple and less than the second predetermined zoom multiple, the method for controlling the telephoto camera 20 to obtain the telephoto original image in the first telephoto state and obtain the target image (i.e. 02) according to the telephoto original image includes:
021: when the camera module 100 is in the zoom mode of the third zoom multiple, controlling the tele camera 20 to obtain a tele original image in the first tele state, and performing first image processing on the tele original image to obtain a target image;
022: when the camera module 100 is in the zoom mode of the fourth zoom multiple, controlling the tele camera 20 to obtain a tele original image in the first tele state, and performing first image processing and second image processing on the tele original image to obtain a target image;
023: when the camera module 100 is in the zoom mode between the third zoom multiple and the fourth zoom multiple, controlling the tele camera 20 to acquire a tele original image in the first tele state, and performing first image processing and second image processing on the tele original image to obtain a target image; and
024: when the camera module 100 is in the zoom mode between the fourth zoom multiple and the second preset zoom multiple, controlling the tele camera 20 to obtain a tele original image in the first tele state, and performing first image processing and second image processing on the tele original image to obtain a target image;
the third zoom multiple is greater than or equal to the first preset zoom multiple, and the fourth zoom multiple is greater than the third zoom multiple and smaller than the second preset zoom multiple.
Referring to fig. 2, in some embodiments, processor 200 may be configured to perform the methods of 021, 022, 023, and 024.
That is, processor 200 may be configured to: when the camera module 100 is in the zoom mode of the third zoom multiple, controlling the tele camera 20 to obtain a tele original image in the first tele state, and performing first image processing on the tele original image to obtain a target image; when the camera module 100 is in the zoom mode of the fourth zoom multiple, controlling the tele camera 20 to obtain a tele original image in the first tele state, and performing first image processing and second image processing on the tele original image to obtain a target image; when the camera module 100 is in the zoom mode between the third zoom multiple and the fourth zoom multiple, controlling the tele camera 20 to obtain a tele original image in the first tele state, and performing first image processing and second image processing on the tele original image to obtain a target image; when the camera module 100 is in the zoom mode between the fourth zoom multiple and the second preset zoom multiple, controlling the tele camera 20 to obtain a tele original image in the first tele state, and performing first image processing and second image processing on the tele original image to obtain a target image; the third zoom multiple is greater than or equal to the first preset zoom multiple, and the fourth zoom multiple is greater than the third zoom multiple and smaller than the second preset zoom multiple.
Referring to fig. 2, in some embodiments, the camera module 100 can be used to perform the methods of 021, 022, 023 and 024.
That is, when the camera module 100 is in the zoom mode of the third zoom multiple, the telephoto camera 20 may obtain the telephoto original image in the first telephoto state, and the camera module 100 may perform the first image processing on the telephoto original image to obtain the target image; when the camera module 100 is in the zoom mode of the fourth zoom multiple, the telephoto camera 20 may obtain the telephoto original image in the first telephoto state, and the camera module 100 may 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 third zoom multiple and the fourth zoom multiple, the telephoto camera 20 may obtain the telephoto original image in the first telephoto state, and the camera module 100 may 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 multiple and the second predetermined zoom multiple, the telephoto camera 20 may obtain the telephoto original image in the first telephoto state, and the camera module 100 may perform the first image processing and the second image processing on the telephoto original image to obtain the target image; the third zoom multiple is greater than or equal to the first preset zoom multiple, and the fourth zoom multiple is greater than the third zoom multiple and smaller than the second preset zoom multiple.
The present embodiment will be described by taking an example in which the third zoom factor is 3 times and the fourth zoom factor is 4 times. The first telephoto state may be a state in which the telephoto camera 20 acquires a telephoto original image of 4800 ten thousand pixels with 3 times optical zooming.
Referring to fig. 13, when the camera module 100 is in the zoom mode of 3 times, the processor 200 controls the telephoto camera 20 to obtain a telephoto original image of 4800 ten thousand pixels in the first telephoto state, and compresses the telephoto original image of 4800 ten thousand pixels to obtain a target image of 1200 ten thousand pixels. Specifically, the compression process may be the aforementioned average value operation or maximum value operation. By compressing the 4800 ten thousand pixels of the tele original image, the electronic device 1000 may output a 1200 ten thousand pixels of the target image with unchanged view field range of the tele original image obtained in the zoom mode of 3 times and unchanged resolution of the target image obtained in the zoom mode of 1 time.
Referring to fig. 14, when the camera module 100 is in the zoom mode of 4 times, the processor 200 controls the telephoto camera 20 to obtain a raw telephoto image of 4800 ten thousand pixels in the first telephoto length state, and performs cropping and compression on the raw telephoto image of 4800 ten thousand pixels to obtain a target image of 1200 ten thousand pixels. The processor 200 may specifically perform a cropping process on the 4800 ten thousand pixels long-focus original image to obtain an intermediate image, and then perform a compression process on the intermediate image to obtain a 1200 ten thousand pixels target image. The pixel size of the intermediate image is smaller than that of the tele original image and larger than that of the target image. For example, the pixel size of the intermediate image may be 2100 ten thousand pixels. The processor 200 performs cropping processing on the raw tele image with 4800 ten thousand pixels to obtain an intermediate image with 2100 ten thousand pixels, where the region obtained by the cropping processing may be the most middle region of the raw tele image or a region determined according to user input. Then, the processor 200 performs a compression process on the 2100 ten thousand pixels intermediate image to obtain a 1200 ten thousand pixels target image, and the compression process may be the aforementioned average operation or maximum value operation. Since the field of view range corresponding to the zoom mode of 4 times is generally smaller than that corresponding to the zoom mode of 3 times, in the embodiment of the present application, the intermediate image of 2100 ten thousand pixels is obtained by performing cropping processing on the raw tele image of 4800 ten thousand pixels to reduce the field of view range, and then performing compression processing on the intermediate image of 2100 ten thousand pixels makes the electronic device 1000 output the target image of 1200 ten thousand pixels with a field of view range smaller than that of the zoom mode of 3 times and with an analysis force unchanged from that of the zoom mode of 3 times (since the analysis force of the zoom mode of 3 times is the same as that of the zoom mode of 1 time, the analysis force unchanged from that of the zoom mode of 1 time).
Referring to fig. 15, when the camera module 100 is in the zoom mode between 3 times and 4 times (for example, in the zoom mode of 3.6 times), the processor 200 controls the telephoto camera 20 to obtain a telephoto original image of 4800 ten thousand pixels in the first telephoto state, and performs cropping and compression on the telephoto original image of 4800 ten thousand pixels to obtain a target image of 1200 ten thousand pixels. The processor 200 may specifically perform cropping processing on the telephoto original image with 4800 ten thousand pixels to obtain an intermediate image, and then perform compression processing on the intermediate image to obtain the target image with 1200 ten thousand pixels. The pixel size of the intermediate image is smaller than that of the tele original image and larger than that of the target image. For example, the pixel size of the intermediate image may be 3400 ten thousand pixels. The processor 200 performs a cropping process on the 4800 ten thousand pixels tele original image to obtain an intermediate image of 3400 ten thousand pixels, and the region obtained by the cropping process may be the middle-most region of the tele original image or a region determined according to a user input. Then, the processor 200 performs a compression process on the intermediate image of 3400 ten thousand pixels to obtain a target image of 1200 ten thousand pixels, and the compression process may be the aforementioned average value operation or maximum value operation. Since the field of view range corresponding to the zoom mode of 3.6 times is generally smaller than that corresponding to the zoom mode of 3 times, in the embodiment of the present application, the out-of-focus original image of 4800 ten thousand pixels needs to be cropped to obtain the intermediate image of 3400 ten thousand pixels, so as to reduce the field of view range, and then the intermediate image of 3400 ten thousand pixels needs to be compressed, so that the electronic device 1000 may output the target image of 1200 ten thousand pixels, in which the field of view range is reduced compared to the zoom mode of 3 times and the resolution of the zoom mode is unchanged compared to 3 times (since the resolution of the zoom mode of 3 times is the same as the resolution of the zoom mode of 1 time, the resolution of the zoom mode is unchanged compared to 1 time).
Referring to fig. 16, when the camera module 100 is in the zoom mode between 4 times and 5 times (for example, in the zoom mode of 4.5 times), the processor 200 controls the telephoto camera 20 to obtain a telephoto original image of 4800 ten thousand pixels in the first telephoto state, and performs cropping and compression on the telephoto original image of 4800 ten thousand pixels to obtain a target image of 1200 ten thousand pixels. The processor 200 may specifically perform a cropping process on the 4800 ten thousand pixels long-focus original image to obtain an intermediate image, and then perform a compression process on the intermediate image to obtain a 1200 ten thousand pixels target image. The pixel size of the intermediate image is smaller than that of the tele original image and larger than that of the target image. For example, the pixel size of the intermediate image may be 1900 ten thousand pixels. The processor 200 performs cropping processing on the raw tele image with 4800 ten thousand pixels to obtain an intermediate image with 1900 ten thousand pixels, where the region obtained by the cropping processing may be the most middle region of the raw tele image or a region determined according to user input. Then, the processor 200 performs compression processing on the intermediate image of 1900 ten thousand pixels to obtain a target image of 1200 ten thousand pixels, and the compression processing may be the above-mentioned average value operation or maximum value operation. Since the field of view range corresponding to the zoom mode of 4.5 times is generally smaller than that corresponding to the zoom mode of 3 times, in the embodiment of the present application, the intermediate image of 1900 ten thousand pixels is obtained by performing cropping processing on the raw tele image of 4800 ten thousand pixels to reduce the field of view range, and then the intermediate image of 1900 ten thousand pixels is compressed, so that the electronic device 1000 may output the target image of 1200 ten thousand pixels with a field of view range smaller than that of the zoom mode of 3 times and with an analysis force of the zoom mode unchanged compared to 3 times (since the analysis force of the zoom mode of 3 times is the same as that of the zoom mode of 1 time, the analysis force of the zoom mode of 1 time is also unchanged here).
Referring to fig. 17, in some embodiments, when the camera module 100 is in the zoom mode greater than or equal to the second predetermined zoom multiple, the method for controlling the telephoto camera 20 to obtain the telephoto raw image in the second telephoto state and obtain the target image (i.e. 03) according to the telephoto raw image includes:
031: when the camera module 100 is in the zoom mode of the fifth zoom multiple, controlling the tele camera 20 to obtain a tele original image in the second tele state, and performing first image processing on the tele original image to obtain a target image;
032: when the camera module 100 is in the zoom mode of the sixth zoom multiple, controlling the tele camera 20 to obtain a tele original image in the second tele state, and performing second image processing on the tele original image to obtain a target image; and
033: when the camera module 100 is in the zoom mode between the fifth zoom multiple and the sixth zoom multiple, the telephoto camera 20 is controlled to obtain a telephoto original image in the second telephoto state, and the telephoto original image is subjected to first image processing and second image processing to obtain a target image;
and the fifth zooming multiple is larger than or equal to the second preset zooming multiple, and the sixth zooming multiple is larger than the fifth zooming multiple.
Referring to fig. 2, in some embodiments, processor 200 may be configured to perform the methods of 031, 032, and 033.
That is, the processor 200 may be configured to: when the camera module 100 is in the zoom mode of the fifth zoom multiple, controlling the tele camera 20 to obtain a tele original image in the second tele state, and performing first image processing on the tele original image to obtain a target image; when the camera module 100 is in the zoom mode of the sixth zoom multiple, controlling the tele camera 20 to obtain a tele original image in the second tele state, and performing second image processing on the tele original image to obtain a target image; when the camera module 100 is in the zoom mode between the fifth zoom multiple and the sixth zoom multiple, controlling the tele camera 20 to acquire a tele original image in the second tele state, and performing first image processing and second image processing on the tele original image to obtain a target image; and the fifth zooming multiple is larger than or equal to the second preset zooming multiple, and the sixth zooming multiple is larger than the fifth zooming multiple.
Referring to fig. 2, in some embodiments, the camera module 100 can be used to perform the methods of 031, 032 and 033.
That is, when the camera module 100 is in the zoom mode of the fifth zoom multiple, the telephoto camera 20 may obtain the telephoto original image in the second telephoto state, and the camera module 100 may perform the first image processing on the telephoto original image to obtain the target image; when the camera module 100 is in the zoom mode of the sixth zoom multiple, the telephoto camera 20 may obtain a telephoto original image in the second telephoto state, and the camera module 100 may perform a second image processing on the telephoto original image to obtain a target image; when the camera module 100 is in the zoom mode between the fifth zoom multiple and the sixth zoom multiple, the telephoto camera 20 may obtain the telephoto original image in the second telephoto state, and the camera module 100 may perform the first image processing and the second image processing on the telephoto original image to obtain the target image; and the fifth zooming multiple is larger than or equal to the second preset zooming multiple, and the sixth zooming multiple is larger than the fifth zooming multiple.
The present embodiment will be described by taking 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 4800 ten thousand pixels with 5 times optical zoom.
Referring to fig. 18, when the camera module 100 is in the zoom mode of 5 times, the processor 200 controls the telephoto camera 20 to obtain a telephoto original image of 4800 ten thousand pixels in the second telephoto state, and compresses the telephoto original image of 4800 ten thousand pixels to obtain a target image of 1200 ten thousand pixels. Specifically, the compression process may be the aforementioned average value operation or maximum value operation. By compressing the 4800 ten thousand pixels of the tele original image, the electronic device 1000 may output a 1200 ten thousand pixels of the target image with unchanged view field range of the tele original image obtained in the zoom mode of 5 times and unchanged resolution of the target image obtained in the zoom mode of 1 time.
Referring to fig. 19, when the camera module 100 is in the zoom mode of 10 times, the processor 200 controls the telephoto camera 20 to obtain a telephoto original image of 4800 ten thousand pixels in the second telephoto state, and performs a cropping process on the telephoto original image of 4800 ten thousand pixels to obtain a target image of 1200 ten thousand pixels. Since the field of view range corresponding to the zoom mode of 10 times is generally smaller than that corresponding to the zoom mode of 5 times, the embodiment of the present application needs to perform a cropping process on the raw tele image of 4800 ten thousand pixels to reduce the field of view range, so that the electronic device 1000 outputs a target image of 1200 ten thousand pixels with a reduced field of view range compared to the zoom mode of 5 times and with an unchanged resolution of the zoom mode compared to 5 times (since the resolution of the zoom mode of 5 times is the same as the resolution of the zoom mode of 1 time, the resolution of the zoom mode of 1 time is also unchanged here). The region intercepted by the cropping processing may be the middle-most region of the tele original image, or may be a region determined according to user input.
Referring to fig. 20, when the camera module 100 is in the zoom mode between 5 times and 10 times (for example, in the zoom mode of 7 times), the processor 200 controls the telephoto camera 20 to obtain a telephoto raw image of 4800 ten thousand pixels in the second telephoto mode, and performs cropping and compression on the telephoto raw image of 4800 ten thousand pixels to obtain a target image of 1200 ten thousand pixels. The processor 200 may specifically perform cropping processing on the telephoto original image with 4800 ten thousand pixels to obtain an intermediate image, and then perform compression processing on the intermediate image to obtain the target image with 1200 ten thousand pixels. The pixel size of the intermediate image is smaller than that of the tele original image and larger than that of the target image. For example, the pixel size of the intermediate image may be 1900 ten thousand pixels. The processor 200 performs cropping processing on the raw tele image with 4800 ten thousand pixels to obtain an intermediate image with 1900 ten thousand pixels, where the region obtained by the cropping processing may be the most middle region of the raw tele image or a region determined according to user input. Then, the processor 200 performs compression processing on the intermediate image of 1900 ten thousand pixels to obtain a target image of 1200 ten thousand pixels, and the compression processing may be the above-mentioned average value operation or maximum value operation. Since the field of view range corresponding to the 7-time zoom mode is generally smaller than that corresponding to the 5-time zoom mode, in the embodiment of the present application, the intermediate image of 1900 ten thousand pixels is obtained by performing cropping processing on the raw tele image of 4800 ten thousand pixels to reduce the field of view range, and then the intermediate image of 1900 ten thousand pixels is compressed, so that the electronic device 1000 may output the target image of 1200 ten thousand pixels with a field of view range smaller than that of the zoom mode by 5 times and with an analysis force unchanged from that of the zoom mode by 5 times (since the analysis force of the zoom mode by 5 times is the same as that of the zoom mode by 1 time, the analysis force of the zoom mode by 1 time is also unchanged here).
In summary, the zoom method and the electronic device 1000 according to the embodiment of the present application set the first predetermined zoom factor and the second predetermined zoom factor, and when the camera module 100 is in the zoom mode smaller than the first predetermined zoom factor, the zoom mode greater than or equal to the first predetermined zoom factor and smaller than the second predetermined zoom factor, and the zoom mode greater than or equal to the second predetermined zoom factor, respectively perform different image processing, so as to ensure that the resolution of the target image output by the full focus segment is not changed, and improve the imaging performance (i.e., the optical performance of the full focus segment is lossless, and optical lossless linear zoom is achieved).
Referring to fig. 21, an electronic device 1000 is further provided in the present embodiment. The electronic device 1000 includes one or more processors 200, memory 300, and one or more programs. Where one or more programs are stored in memory 300 and configured to be executed by one or more processors 200. The program includes instructions for executing the zooming method of any of the above embodiments.
For example, the program includes instructions for performing the following zoom method:
01: when the camera module 100 is in a zoom mode smaller than a first preset zoom multiple, controlling the main camera 10 to obtain a main original image, and obtaining a target image according to the main original image;
02: when the camera module 100 is in a zoom mode which is greater than or equal to a first preset zoom multiple and less than a second preset zoom multiple, controlling the tele camera 20 to obtain a tele original image in a first tele state, and obtaining a target image according to the tele original image; and
03: and when the camera module 100 is in the zoom mode larger than or equal to the second preset zoom multiple, controlling the tele camera 20 to acquire the tele original image in the second tele state, and obtaining the target image according to the tele original image.
In the zoom modes with different zoom multiples, the electronic device 1000 according to the embodiment of the present application obtains the target image according to the main original image obtained by the main camera 10, the tele original image obtained by the tele camera 20 in the first tele state, and the tele original image obtained by the tele camera 20 in the second tele state, so that the resolution of the target image in the full focus range is ensured to be unchanged, and the imaging performance is improved.
Referring to fig. 22, a computer-readable storage medium 2000 is further provided in the present application. The computer-readable storage medium 2000 includes a computer program for use in conjunction with the electronic device 1000. The computer program may be executed by the processor 200 of the electronic device 1000 to implement the zooming method of any of the above embodiments.
For example, the computer program may be executed by the processor 200 to perform the following zoom method:
01: when the camera module 100 is in a zoom mode smaller than a first preset zoom multiple, controlling the main camera 10 to obtain a main original image, and obtaining a target image according to the main original image;
02: when the camera module 100 is in a zoom mode which is greater than or equal to a first preset zoom multiple and less than a second preset zoom multiple, controlling the tele camera 20 to acquire a tele original image in a first tele state, and acquiring a target image according to the tele original image; and
03: and when the camera module 100 is in the zoom mode larger than or equal to the second preset zoom multiple, controlling the tele camera 20 to acquire the tele original image in the second tele state, and obtaining the target image according to the tele original image.
In the zoom modes with different zoom multiples, the computer-readable storage medium 2000 of the embodiment of the application obtains the target image according to the main original image acquired by the main camera 10, the tele original image acquired by the tele camera 20 in the first tele state, and the tele original image acquired by the tele camera 20 in the second tele state, respectively, so that the resolution of the target image in the full focus section is ensured to be unchanged, and the imaging performance is improved.
In the description herein, reference to the description of the terms "one embodiment," "some embodiments," "an illustrative embodiment," "an example," "a specific example" or "some examples" or the like means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Moreover, various embodiments or examples and features of various embodiments or examples described in this specification can be combined and combined by one skilled in the art without being mutually inconsistent.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and the scope of the preferred embodiments of the present application includes other implementations in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application and that variations, modifications, substitutions and alterations in the above embodiments may be made by those of ordinary skill in the art within the scope of the present application.

Claims (11)

1. A zooming method for an electronic device, wherein the electronic device comprises a camera module, the camera module comprises a main camera and a tele camera, the main camera is used for acquiring a main original image with a first pixel size, the tele camera is used for acquiring a tele original image with a second pixel size, the tele camera comprises a first tele state and a second tele state, the camera module is used for outputting a target image with a third pixel size, and the first pixel size and the second pixel size are both larger than the third pixel size, and the zooming method comprises:
when the camera module is in a zoom mode smaller than a first preset zoom multiple, controlling the main camera to acquire the main original image and obtaining the target image according to the main original image;
when the camera module is in a zoom mode which is greater than or equal to the first preset zoom multiple and smaller than a second preset zoom multiple, controlling the long-focus camera to obtain the long-focus original image in the first long-focus state, and obtaining the target image according to the long-focus original image; and
when the camera module is in a zoom mode which is greater than or equal to the second preset zoom multiple, controlling the long-focus camera to obtain the long-focus original image in the second long-focus state, and obtaining the target image according to the long-focus original image;
wherein, when the camera module is in a zoom mode smaller than a first preset zoom multiple, controlling the main camera to acquire the main original image and obtaining the target image according to the main original image includes:
when the camera module is in a zoom mode of a first zoom multiple, controlling the main camera to acquire the main original image, and performing first image processing on the main original image to obtain the target image;
when the camera module is in a zoom mode of a second zoom multiple, controlling the main camera to acquire the main original image, and performing second image processing on the main original image to obtain the target image; and
when the camera module is in a zoom mode between the first zoom multiple and the second zoom multiple, controlling the main camera to acquire the main original image, and performing the first image processing and the second image processing on the main original image to obtain the target image; the first zoom factor and the second zoom factor are both less than the first predetermined zoom factor;
the first image processing includes compression processing, and the second image processing includes cropping processing.
2. The zooming method according to claim 1, wherein when the camera module is in a zoom mode that is greater than or equal to the first predetermined zoom multiple and less than a second predetermined zoom multiple, controlling the telephoto camera to acquire the telephoto raw image in the first telephoto state, and obtaining the target image according to the telephoto raw image comprises:
when the camera module is in a zoom mode of a third zoom multiple, controlling the tele camera to acquire the tele original image in the first tele state, and performing first image processing on the tele original image to obtain the target image;
when the camera module is in a zoom mode of a fourth zoom multiple, controlling the tele camera to acquire the tele original image in the first tele state, and performing the first image processing and the second image processing on the tele original image to obtain the target image;
when the camera module is in a zoom mode between the third zoom multiple and the fourth zoom multiple, controlling the tele camera to acquire the tele original image in the first tele state, and performing the first image processing and the second image processing on the tele original image to obtain the target image; and
when the camera module is in a zoom mode between the fourth zoom multiple and the second preset zoom multiple, controlling the tele camera to acquire the tele original image in the first tele state, and performing the first image processing and the second image processing on the tele original image to obtain the target image;
the third zoom multiple is greater than or equal to the first preset zoom multiple, and the fourth zoom multiple is greater than the third zoom multiple and less than the second preset zoom multiple.
3. The method according to claim 1, wherein when the camera module is in a zoom mode greater than or equal to the second predetermined zoom multiple, controlling the telephoto camera to acquire the telephoto raw image in the second telephoto state, and obtaining the target image according to the telephoto raw image, comprises:
when the camera module is in a zoom mode of a fifth zoom multiple, controlling the tele camera to acquire the tele original image in the second tele state, and performing first image processing on the tele original image to obtain the target image;
when the camera module is in a zoom mode of a sixth zoom multiple, controlling the long-focus camera to obtain the long-focus original image in the second long-focus state, and performing second image processing on the long-focus original image to obtain the target image; and
when the camera module is in a zoom mode between the fifth zoom multiple and the sixth zoom multiple, controlling the tele camera to acquire the tele original image in the second tele state, and performing the first image processing and the second image processing on the tele original image 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.
4. An electronic device, comprising a camera module and a processor, wherein the camera module comprises a main camera and a tele camera, the main camera is used for acquiring a main original image with a first pixel size, the tele camera is used for acquiring a tele original image with a second pixel size, the tele camera comprises a first tele state and a second tele state, the camera module is used for outputting a target image with a third pixel size, and the first pixel size and the second pixel size are both larger than the third pixel size, and the processor is used for:
when the camera module is in a zoom mode smaller than a first preset zoom multiple, controlling the main camera to acquire the main original image and obtaining the target image according to the main original image;
when the camera module is in a zoom mode which is greater than or equal to the first preset zoom multiple and smaller than a second preset zoom multiple, controlling the long-focus camera to obtain the long-focus original image in the first long-focus state, and obtaining the target image according to the long-focus original image; and
when the camera module is in a zoom mode which is greater than or equal to the second preset zoom multiple, controlling the long-focus camera to obtain the long-focus original image in the second long-focus state, and obtaining the target image according to the long-focus original image;
the processor is further configured to:
when the camera module is in a zoom mode of a first zoom multiple, controlling the main camera to obtain the main original image, and performing first image processing on the main original image to obtain the target image;
when the camera module is in a zoom mode of a second zoom multiple, controlling the main camera to obtain the main original image, and performing second image processing on the main original image to obtain the target image; and
when the camera module is in a zoom mode between the first zoom multiple and the second zoom multiple, controlling the main camera to acquire the main original image, and performing the first image processing and the second image processing on the main original image to obtain the target image; the first zoom factor and the second zoom factor are both less than the first predetermined zoom factor;
the first image processing includes compression processing, and the second image processing includes cropping processing.
5. The electronic device of claim 4, wherein the processor is further configured to:
when the camera module is in a zoom mode of a third zoom multiple, controlling the tele camera to acquire the tele original image in the first tele state, and performing first image processing on the tele original image to obtain the target image;
when the camera module is in a zoom mode of a fourth zoom multiple, controlling the long-focus camera to obtain the long-focus original image in the first long-focus state, and performing the first image processing and the second image processing on the long-focus original image to obtain the target image;
when the camera module is in a zoom mode between the third zoom multiple and the fourth zoom multiple, controlling the tele camera to acquire the tele original image in the first tele state, and performing the first image processing and the second image processing on the tele original image to obtain the target image; and
when the camera module is in a zoom mode between the fourth zoom multiple and the second preset zoom multiple, controlling the tele camera to acquire the tele original image in the first tele state, and performing the first image processing and the second image processing on the tele original image to obtain the target image;
the third zoom multiple is greater than or equal to the first preset zoom multiple, and the fourth zoom multiple is greater than the third zoom multiple and smaller than the second preset zoom multiple.
6. The electronic device of claim 4, wherein the processor is further configured to:
when the camera module is in a zoom mode of a fifth zoom multiple, controlling the tele camera to acquire the tele original image in the second tele state, and performing first image processing on the tele original image to obtain the target image;
when the camera module is in a zoom mode of a sixth zoom multiple, controlling the tele camera to acquire the tele original image in the second tele state, and performing second image processing on the tele original image to obtain the target image; and
when the camera module is in a zoom mode between the fifth zoom multiple and the sixth zoom multiple, controlling the tele camera to acquire the tele original image in the second tele state, and performing the first image processing and the second image processing on the tele original image 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.
7. An electronic device, comprising a camera module, wherein the camera module comprises a main camera and a tele camera, the main camera is used for acquiring a main original image with a first pixel size, the tele camera is used for acquiring a tele original image with a second pixel size, the tele camera comprises a first tele state and a second tele state, the camera module is used for outputting a target image with a third pixel size, and both the first pixel size and the second pixel size are larger than the third pixel size,
when the camera module is in a zooming mode smaller than a first preset zooming multiple, the main camera acquires a main original image, and the camera module obtains the target image according to the main original image;
when the camera module is in a zoom mode which is greater than or equal to the first preset zoom multiple and smaller than a second preset zoom multiple, the long-focus camera acquires a long-focus original image in the first long-focus state, and the camera module acquires the target image according to the long-focus original image;
when the camera module is in a zoom mode which is more than or equal to the second preset zoom multiple, the long-focus camera acquires the long-focus original image in the second long-focus state, and the camera module acquires the target image according to the long-focus original image;
when the camera module is in a zoom mode of a first zoom multiple, the main camera acquires the main original image, and the camera module performs first image processing on the main original image to obtain the target image;
when the camera module is in a zoom mode of a second zoom multiple, the main camera acquires the main original image, and the camera module performs second image processing on the main original image to obtain the target image; and
when the camera module is in a zoom mode between the first zoom multiple and the second zoom multiple, the main camera acquires the main original image, and the camera module performs the first image processing and the second image processing on the main original image to obtain the target image; the first zoom multiple and the second zoom multiple are both smaller than the first predetermined zoom multiple;
the first image processing includes compression processing, and the second image processing includes cropping processing.
8. The electronic device of claim 7, wherein:
when the camera module is in a zoom mode of a third zoom multiple, the long-focus camera acquires the long-focus original image in the first long-focus state, and the camera module performs first image processing on the long-focus original image to obtain the target image;
when the camera module is in a zoom mode of a fourth zoom multiple, the long-focus camera acquires the long-focus original image in the first long-focus state, and the camera module performs first image processing and second image processing on the long-focus original image to obtain the target image;
when the camera module is in a zoom mode between the third zoom multiple and the fourth zoom multiple, the telephoto camera acquires the telephoto original image in the first telephoto length state, and the camera module performs the first image processing and the second image processing on the telephoto original image to obtain the target image; and
when the camera module is in a zoom mode between the fourth zoom multiple and the second preset zoom multiple, the telephoto camera acquires the telephoto original image in the first telephoto length state, and the camera module performs the first image processing and the second image processing on the telephoto original image to obtain the target image;
the third zoom multiple is greater than or equal to the first preset zoom multiple, and the fourth zoom multiple is greater than the third zoom multiple and smaller than the second preset zoom multiple.
9. The electronic device of claim 7, wherein:
when the camera module is in a zoom mode of a fifth zoom multiple, the long-focus camera acquires the long-focus original image in the second long-focus state, and the camera module performs first image processing on the long-focus original image to obtain the target image;
when the camera module is in a zoom mode of a sixth zoom multiple, the tele camera acquires the tele original image in the second tele state, and the camera module performs second image processing on the tele original image to obtain the target image; and
when the camera module is in a zoom mode between the fifth zoom multiple and the sixth zoom multiple, the telephoto camera acquires the telephoto original image in the second telephoto state, and the camera module performs the first image processing and the second image processing on the telephoto original image 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.
10. An electronic device, comprising:
one or more processors;
a memory; and
one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the programs comprising instructions for performing the zoom method of any of claims 1-3.
11. A computer-readable storage medium comprising a computer program for use in conjunction with an electronic device, the computer program being executable by a processor of the electronic device to perform the zoom method of any of claims 1-3.
CN201911251383.9A 2019-12-09 2019-12-09 Zoom method, electronic device, and computer-readable storage medium Active CN113037988B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201911251383.9A CN113037988B (en) 2019-12-09 2019-12-09 Zoom method, electronic device, and computer-readable storage medium
PCT/CN2020/128464 WO2021115014A1 (en) 2019-12-09 2020-11-12 Zoom method, electronic apparatus and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911251383.9A CN113037988B (en) 2019-12-09 2019-12-09 Zoom method, electronic device, and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN113037988A CN113037988A (en) 2021-06-25
CN113037988B true CN113037988B (en) 2022-10-25

Family

ID=76329575

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911251383.9A Active CN113037988B (en) 2019-12-09 2019-12-09 Zoom method, electronic device, and computer-readable storage medium

Country Status (2)

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

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106791377A (en) * 2016-11-29 2017-05-31 广东欧珀移动通信有限公司 Control method, control device and electronic installation

Family Cites Families (10)

* 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 (en) * 2005-08-18 2007-02-21 广达电脑股份有限公司 Digital zooming device and method
US20160360121A1 (en) * 2009-11-09 2016-12-08 Yi-Chuan Cheng Portable device with successive extension zooming capability
CN102857684A (en) * 2011-06-27 2013-01-02 天彩电子(深圳)有限公司 Intelligent digital zoom method
CN111669493B (en) * 2018-03-26 2021-04-09 华为技术有限公司 Shooting method, device and equipment
CN111418201B (en) * 2018-03-27 2021-10-15 华为技术有限公司 Shooting method and equipment
CN108848316A (en) * 2018-09-14 2018-11-20 高新兴科技集团股份有限公司 Autozoom control method, Automatic zoom lens focusing device and the video camera of video camera
CN110351487A (en) * 2019-08-26 2019-10-18 Oppo广东移动通信有限公司 Control method, control device, electronic equipment and storage medium
CN110493525B (en) * 2019-09-04 2021-01-22 展讯通信(上海)有限公司 Zoom image determination method and device, storage medium and terminal
CN111147755B (en) * 2020-01-02 2021-12-31 普联技术有限公司 Zoom processing method and device for double cameras and terminal equipment

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106791377A (en) * 2016-11-29 2017-05-31 广东欧珀移动通信有限公司 Control method, control device and electronic installation

Also Published As

Publication number Publication date
CN113037988A (en) 2021-06-25
WO2021115014A1 (en) 2021-06-17

Similar Documents

Publication Publication Date Title
EP3328055B1 (en) Control method, control device and electronic device
US8823837B2 (en) Zoom control method and apparatus, and digital photographing apparatus
JP4623193B2 (en) Imaging apparatus, imaging method, and program
US8937644B2 (en) Stereoscopic image capture
TWI531852B (en) Device of capturing images and method of digital focusing
CN109906599B (en) Terminal photographing method and terminal
CN115052104B (en) Image processing method, electronic device, and non-volatile computer-readable storage medium
CN110691192B (en) Image processing method, image processing device, storage medium and electronic equipment
CN108259838B (en) Electronic vision aid and image browsing method for same
WO2013005727A1 (en) Imaging device and recording medium
JP2006115117A (en) Imaging apparatus
JP6513126B2 (en) Display control device, control method thereof and program
CN114449174A (en) Shooting method and device and electronic equipment
JP2007096588A (en) Imaging device and method for displaying image
JP2006345053A (en) Image pickup apparatus
CN110602392B (en) Control method, imaging module, electronic device and computer-readable storage medium
JP6116436B2 (en) Image processing apparatus and image processing method
CN108810326B (en) Photographing method and device and mobile terminal
CN113037988B (en) Zoom method, electronic device, and computer-readable storage medium
CN110896443A (en) Area value presetting method for double-camera switching
CN114745502A (en) Shooting method and device, electronic equipment and storage medium
CN113891018A (en) Shooting method and device and electronic equipment
CN112422782A (en) Display control apparatus, control method thereof, and computer-readable storage medium
RU2792413C1 (en) Image processing method and mobile terminal
US20220360717A1 (en) Image capture device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant