WO2023015980A1 - 拍摄方法及其相关设备 - Google Patents

拍摄方法及其相关设备 Download PDF

Info

Publication number
WO2023015980A1
WO2023015980A1 PCT/CN2022/091189 CN2022091189W WO2023015980A1 WO 2023015980 A1 WO2023015980 A1 WO 2023015980A1 CN 2022091189 W CN2022091189 W CN 2022091189W WO 2023015980 A1 WO2023015980 A1 WO 2023015980A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
camera
zoom factor
images
electronic device
Prior art date
Application number
PCT/CN2022/091189
Other languages
English (en)
French (fr)
Inventor
邵涛
朱聪超
肖斌
王宇
罗钢
Original Assignee
荣耀终端有限公司
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 荣耀终端有限公司 filed Critical 荣耀终端有限公司
Priority to US17/923,147 priority Critical patent/US20240259679A1/en
Priority to EP22793379.3A priority patent/EP4156673B1/en
Publication of WO2023015980A1 publication Critical patent/WO2023015980A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/667Camera operation mode switching, e.g. between still and video, sport and normal or high- and low-resolution modes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/45Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from two or more image sensors being of different type or operating in different modes, e.g. with a CMOS sensor for moving images in combination with a charge-coupled device [CCD] for still images
    • 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/62Control of parameters via user interfaces
    • 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/63Control of cameras or camera modules by using electronic viewfinders
    • H04N23/631Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters
    • 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/63Control of cameras or camera modules by using electronic viewfinders
    • H04N23/631Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters
    • H04N23/632Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters for displaying or modifying preview images prior to image capturing, e.g. variety of image resolutions or capturing parameters
    • 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/63Control of cameras or camera modules by using electronic viewfinders
    • H04N23/633Control of cameras or camera modules by using electronic viewfinders for displaying additional information relating to control or operation of the camera
    • 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/69Control of means for changing angle of the field of view, e.g. optical zoom objectives or electronic zooming
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/76Circuitry for compensating brightness variation in the scene by influencing the image signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/90Arrangement of cameras or camera modules, e.g. multiple cameras in TV studios or sports stadiums
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/95Computational photography systems, e.g. light-field imaging systems
    • H04N23/951Computational photography systems, e.g. light-field imaging systems by using two or more images to influence resolution, frame rate or aspect ratio
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/2628Alteration of picture size, shape, position or orientation, e.g. zooming, rotation, rolling, perspective, translation

Definitions

  • the present application relates to the field of image processing, in particular to a shooting method and related equipment.
  • the electronic device as a mobile phone as an example, it is already a trend to install multiple cameras on the electronic device. By installing multiple cameras on the electronic device, more ways of taking photos and recording videos can be provided for users to choose and use.
  • the present application provides a photographing method and related equipment, which can utilize multiple cameras to realize collaborative processing, improve the definition of acquired images, and realize full focal length coverage and multi-functional photographing.
  • a shooting method is provided, the shooting method is applied to an electronic device including a first camera and a second camera, and the shooting method includes:
  • the electronic device displays a first interface, the first interface includes a preview image, a first control, and a second control, and the second control indicates a camera mode; a first operation on the first control is detected; in response to the first operation, the electronic device determines is the first zoom factor, and the preview image is an image captured by the first camera in real time; a second operation on the first interface is detected; in response to the second operation, according to the first zoom factor and the first illuminance, the electronic device adopts the first camera Collect images with the second camera, the second camera is an auxiliary camera, wherein the first camera collects one or more frames of images, and the second camera collects one or more frames of images; Processing the above image and one or more frames of images collected by the second camera to obtain a captured image; saving the captured image; wherein, the first illuminance is an illuminance value determined by the electronic device according to the preview image.
  • the first camera may be a main camera
  • the second camera may be a black and white camera
  • the first camera may be a main camera
  • the second camera may be a telephoto camera
  • the first control may be a zoom option, which is used to adjust the zoom factor.
  • the second control can be a shooting key 50, which is used to indicate different shooting modes.
  • the auxiliary camera refers to that the image collected by the camera is only used for image processing to obtain a captured image, and is not displayed as a preview image. In other words, the secondary camera is running in the background.
  • the target camera can be determined as the main camera and the black and white camera, or the main camera and the telephoto camera can be determined. Then, the target camera is used to obtain the original image, and then the original image is processed to obtain the captured image.
  • the original image includes an image captured by the main camera and an image captured by the black and white camera, or an image captured by the main camera and an image captured by the telephoto camera.
  • the electronic device further includes a third camera
  • the method further includes:
  • a third operation on the first control is detected; in response to the third operation, the electronic device determines the second zoom factor, and the preview image is an image captured by the third camera in real time; a fourth operation on the first interface is detected; in response to In the fourth operation, according to the second zoom factor and the first illuminance, the electronic device uses the first camera and the third camera to collect images, the first camera is an auxiliary camera, the third camera is different from the second camera, and the third camera collects one frame or More than one frame of images; processing one or more frames of images collected by the first camera and one or more frames of images collected by the third camera to obtain captured images; saving the captured images.
  • the third camera may be a wide-angle camera.
  • the target camera can be determined as the main camera and the wide-angle camera, and the main camera and the wide-angle camera are used to collect images with different field of view angles and different resolutions for processing. In order to obtain higher definition, better quality shooting images.
  • the electronic device further includes a fourth camera
  • the method further includes:
  • a fifth operation on the first control is detected; in response to the fifth operation, the electronic device determines the third zoom factor, and the preview image is an image captured by the fourth camera in real time; a sixth operation on the first interface is detected; in response to The sixth operation, according to the third zoom factor and the first illuminance, the electronic device uses the fourth camera to collect images, the fourth camera is different from the third camera, the fourth camera collects two or more frames of images; the fourth camera Process the collected two or more frames of images to obtain the captured image; save the captured image.
  • the fourth camera may be a telephoto camera.
  • the target camera is a telephoto camera
  • the telephoto camera can collect multiple frames of images for processing, so as to obtain higher-definition and better-quality shots image.
  • the method further includes:
  • a seventh operation on the first interface is detected; in response to the seventh operation, according to the first zoom factor and the second illuminance, the electronic device uses the first camera to collect images; the first camera collects two or more frames of images; Process two or more frames of images collected by a camera to obtain captured images; save the captured images.
  • an eighth operation on the first interface is detected; in response to the eighth operation, according to the second zoom factor and the second illuminance, the electronic device uses a third camera to capture images; the third camera captures two or more frames of images; Process two or more frames of images collected by the third camera to obtain captured images; save the captured images.
  • a ninth operation on the first interface is detected; in response to the ninth operation, according to the third zoom factor and the second illuminance, the electronic device uses the fourth camera to capture images; the fourth camera captures two or more frames of images; Process two or more frames of images collected by the fourth camera to obtain captured images; save the captured images.
  • the second illuminance is the illuminance determined by the electronic device according to the preview image, the second illuminance is different from the first illuminance, and the illuminance value of the second illuminance is lower than that of the first illuminance.
  • the second illuminance can be called low illuminance.
  • different cameras can be switched at different zoom factors to obtain the original image, so as to realize the use of multi-camera collaborative processing, so that the electronic device can cover a larger zoom range; and, for each The camera can collect multiple frames of images and improve the quality of the captured images obtained by each camera.
  • the method further includes:
  • An eleventh operation on the first control is detected; in response to the eleventh operation, switching from the first zoom factor to a second zoom factor; in response to switching from the first zoom factor to the second zoom factor, the electronic device adopts the first The camera and the second camera collect images, and switch to using the first camera and the third camera to collect images, wherein, when it is the first zoom factor, the second camera is an auxiliary camera, and when it is the second zoom factor, the first camera is Secondary camera.
  • the electronic device detects the twelfth operation on the first control; in response to the twelfth operation, switch from the first zoom factor to the third zoom factor; in response to switching from the first zoom factor to the third zoom factor, the electronic device adopts The first camera and the second camera collect images, switch to adopting the fourth camera and the first camera to collect images, and when the zoom factor is the third, the first camera is an auxiliary camera.
  • the electronic device uses the main camera and the black-and-white camera to collect images, and switches to using the main camera and the wide-angle camera to collect images.
  • the image captured by the main camera is displayed as a preview image, while the image captured by the black and white camera is not displayed.
  • the image captured by the wide-angle camera is displayed as a preview image, while the image captured by the main camera is not displayed.
  • the electronic device adopts the main camera and the black and white camera to collect images, and switches to adopting the telephoto camera and the main camera to collect images.
  • the zoom factor is the third, the image captured by the telephoto camera is displayed as a preview image, while the image captured by the main camera is not displayed.
  • the camera that needs to collect the image when taking pictures in the adjacent zoom range can be operated in advance while realizing the relay zoom, Alternatively, the camera that collects images in the previous zoom range is delayed, so that the overall coverage of the zoom range of the electronic device is wider, and the switching can be smoother.
  • the method further includes:
  • the electronic device uses the third camera, the first camera and the second camera to capture images, and switches to using the first camera and the third camera to capture images, wherein, when the first When the zoom factor is used, both the third camera and the second camera are auxiliary cameras, and when the zoom factor is the second, the first camera is an auxiliary camera.
  • the electronic device uses the wide-angle camera, the main camera and the black and white camera to collect images, and switches to using the main camera and the wide-angle camera to collect images.
  • the zoom factor is the first
  • the image captured by the main camera is displayed as a preview image
  • the images captured by the wide-angle camera and the black and white camera are not displayed.
  • the second zoom factor the image captured by the wide-angle camera is displayed as a preview image, while the image captured by the main camera is not displayed.
  • the camera that needs to collect the image when taking pictures in the adjacent zoom multiple range can also be operated in advance, and Other cameras, or delay turning off the camera that collects images in the previous zoom range, so that the zoom range of the electronic device covers a wider range as a whole and can be switched more smoothly.
  • overlapping refers to that the third camera can capture the scene content captured by the second camera and surrounding scene content.
  • the electronic device adopts the first camera and the second camera to collect images, including: when the first zoom factor belongs to the second zoom factor range, The electronic device uses the first camera to obtain a second image, and uses the second camera to obtain a third image, the second image includes one or more frames, and the third image includes one or more frames; when the first zoom factor belongs to the third zoom In the multiple range, the electronic device uses the first camera to obtain the second image, and uses the second camera to obtain the fourth image, the second image includes one or more frames, and the fourth image includes one or more frames.
  • the method further includes:
  • the third image is subjected to front-end processing respectively to obtain respective corresponding front-end processing images; the front-end fusion image corresponding to the third image is fused by using the front-end fusion module to obtain the front-end fusion image corresponding to the third image; the front-end fusion image corresponding to the second image
  • the front-end fusion images corresponding to the processed image and the third image are all subjected to back-end processing to obtain respective corresponding back-end processing images; the back-end processing images corresponding to the second image and the third image are respectively fused by using the back-end fusion module to obtain
  • the back-end fusion image is the captured image.
  • processing in the RAW domain can preserve more details and improve the quality of subsequent images.
  • the method further includes:
  • the electronic device uses the first camera and the third camera to collect images, including: the electronic device uses the third camera to obtain the first image, and uses The first camera acquires a second image, the first image includes one or more frames, the second image includes one or more frames, and the second zoom factor belongs to the first zoom factor range.
  • the electronic device uses a third camera to acquire the first image, and uses the first camera to acquire the second image, and the method further includes:
  • the electronic device uses the fourth camera to collect images, including: the electronic device uses the fourth camera to obtain a fourth image, and the fourth image includes multiple frames , the third zoom factor belongs to the fourth zoom factor range.
  • the method further includes:
  • the electronic device adopts the first camera to acquire an image, including: the electronic device adopts the first camera to acquire a second image, and the second image includes multiple frames , the first zoom factor belongs to the second zoom factor range or the third zoom factor range.
  • the electronic device uses the third camera to capture images, including: the electronic device uses the third camera to acquire a first image, the first image includes multiple frames, and the second zoom factor belongs to the first zoom factor range.
  • the electronic device uses the fourth camera to acquire images, including: the electronic device uses the fourth camera to acquire a fourth image, the fourth image includes multiple frames, and the third zoom factor belongs to the fourth zoom factor range.
  • the method further includes: performing second preprocessing on the second image, the first image, or the fourth image to obtain a second preprocessing image in the RAW domain; wherein, the second The preprocessing is used to fuse the second image, the first image or the fourth image based on the network model; performing front-end processing on the second preprocessing image to obtain the corresponding front-end processing image; performing back-end processing on the front-end processing image to obtain the corresponding The back-end processing image of , the back-end processing image is a captured image.
  • the network model in a low-illumination scene, based on multiple frames of the first image, the second image, or the fourth image, the network model is used to perform multi-frame fusion processing, as well as the above-mentioned other processing, which can be fused to obtain high-definition, high-quality images. Better image capture.
  • the method further includes: detecting a thirteenth operation on the second control; in response to the thirteenth operation, indicating the second control as a video recording mode, a night scene mode or an HDR mode; A fourteenth operation on the first interface is detected; in response to the fourteenth operation, according to the first zoom factor, the electronic device uses the first camera to capture images; or, a fifteenth operation on the first interface is detected; in response to In the fifteenth operation, according to the second zoom factor, the electronic device adopts the third camera to collect images; or, the sixteenth operation on the first interface is detected; in response to the sixteenth operation, according to the third zoom factor, the electronic device adopts The fourth camera collects images.
  • the electronic device uses the first camera to capture images, including: the electronic device uses the first camera to acquire a second image, the second image includes multiple frames, and the first zoom The magnification belongs to the second zoom magnification range or the third zoom magnification range.
  • the electronic device adopts the third camera to acquire the image, including: the electronic device adopts the third camera to acquire the first image, the first image includes multiple frames, and the second zoom factor belongs to the first zoom factor range.
  • the electronic device adopts the fourth camera to acquire the image, including: the electronic device adopts the fourth camera to acquire the fourth image, the fourth image includes multiple frames, and the third zoom factor belongs to the fourth zoom factor range.
  • different cameras in video recording mode, night scene mode or HDR mode, different cameras can also be switched according to different zoom factors to obtain corresponding multi-frame original images, so as to realize multi-camera collaboration and cover a larger zoom range.
  • the method further includes: performing a second preprocessing on the second image, the first image, or the fourth image to obtain the image in the RAW domain.
  • the second preprocessing image wherein, the second preprocessing is used to fuse the second image, the first image or the fourth image based on the network model; the second preprocessing image is subjected to front-end processing to obtain a corresponding front-end processing image; The front-end processed image is subjected to back-end processing to obtain a corresponding back-end processed image, and the back-end processed image is a captured image.
  • the network model in the night scene mode, based on multiple frames of the first image, the second image or the fourth image, the network model is used to perform multi-frame fusion processing, and the above-mentioned other processing can be fused to obtain a higher-definition, higher-quality Good image capture.
  • the method further includes: performing a third preprocessing on the second image, the first image, or the fourth image to obtain The third pre-processing image of the field; wherein, the second image includes the second image of long exposure, the second image of short exposure and the second image of medium exposure, the first image includes the first image of long exposure, the second image of short exposure One image and the first image of medium exposure, the fourth image includes the fourth image of long exposure, the fourth image of short exposure and the fourth image of medium exposure, the third preprocessing is used to combine the second image of different exposure, the fourth image of the second exposure Fusing the first image or the fourth image; performing front-end processing on the third pre-processing image to obtain a corresponding front-end processing image; performing back-end processing on the front-end processing image to obtain a corresponding back-end processing image, and the back-end processing image is a captured image .
  • the fusion processing of multiple frames of images with different exposures can be performed.
  • a captured image with higher definition and better quality is obtained through fusion.
  • the method further includes: detecting a seventeenth operation on the second control; in response to the seventeenth operation, indicating the second control as a large aperture mode or a portrait mode; detecting An eighteenth operation on the first interface; in response to the eighteenth operation, the electronic device uses the first camera to capture a second image, and uses the second camera to capture a third image; and performs front-end processing on the second image and the third image respectively , to obtain the respective corresponding front-end processing images; use the front-end fusion module to fuse the front-end processing images corresponding to the second image respectively to obtain the front-end fusion image corresponding to the second image; the front-end fusion image corresponding to the second image and the third image correspond to The front-end processing images of all are subjected to back-end processing to obtain their corresponding back-end processing images; the depth estimation processing is performed on the back-end processing images corresponding to the second image and the third image to obtain a depth image; the depth image is used to correspond to correspond to
  • the above series of processing can be fused to obtain a high-definition foreground with high quality. Better image capture.
  • the electronic device further includes a TOF camera
  • the method further includes: detecting a nineteenth operation on the first interface; in response to the nineteenth operation, the electronic device uses the first camera to capture The second image, using the TOF camera to obtain depth information, using the depth information to generate a depth image; performing front-end processing on the second image to obtain a corresponding front-end processing image; using a front-end fusion module to fuse the front-end processing image corresponding to the second image, Obtain the front-end fusion image corresponding to the second image; perform back-end processing on the front-end fusion image to obtain the corresponding back-end processing image; use the depth image to perform blur processing on the back-end processing image corresponding to the second image to obtain the corresponding blur Process the image, blur the processed image into a captured image.
  • the above series of processing can be fused to obtain a captured image with higher foreground clarity and better quality.
  • the method further includes: when the second control indicates portrait mode, performing skin beautification processing on the blurred image to obtain a skin beautification image, where the skin beautification image is a captured image .
  • skin beautification processing can be used to beautify the face area to improve the visual effect of the image.
  • the first preprocessing includes: at least one of registration, dead point correction, RAW domain noise reduction, black level correction, lens shading correction, and automatic white balance.
  • the visual effect of the image can be improved.
  • the front-end processing includes registration, bad pixel correction, RAW domain noise reduction, black level correction, lens shading correction, automatic white balance, color correction, dynamic range compression, and Gamma correction at least one of the .
  • the visual effect of the image can be improved by performing multiple steps in the above-mentioned front-end processing on the image.
  • the back-end processing includes at least one of video stabilization, color enhancement, style transformation, and super-resolution reconstruction.
  • the back-end processing includes at least one of video stabilization, color enhancement, style transformation, and super-resolution reconstruction.
  • the method when the second control indicates a video recording mode, the method further includes: detecting a twentieth operation on the first control; Switching to the second zoom factor; in response to switching from the first zoom factor to the second zoom factor, the electronic device adopts the first camera to capture images, and switches to adopting the third camera to capture images, wherein the first camera is an auxiliary camera; or, Detecting the twenty-first operation on the first control; in response to the twenty-first operation, switching from the first zoom factor to the third zoom factor; in response to switching from the first zoom factor to the third zoom factor, the electronic device adopts The first camera captures images, and switches to adopting the fourth camera to capture images, wherein the first camera is an auxiliary camera.
  • the camera that collects images in the adjacent zoom multiple range can be operated in advance while relay zoom is realized, or the camera that collects images in the previous zoom multiple range can be delayed, so that The overall coverage of the zoom factor of the electronic device is wider, and it can be switched more smoothly.
  • an electronic device including a camera module, a processor and a memory;
  • the camera module is used to obtain the original image
  • memory for storing computer programs that can run on the processor
  • a processor configured to execute the photographing method provided in the first aspect or any possible implementation manner of the first aspect.
  • the camera module includes multiple cameras, and the multiple cameras include: a wide-angle camera, a main camera, a black-and-white camera, and a telephoto camera; the multiple cameras are used to monitor the same scene to be shot Shooting; a wide-angle camera, used to obtain the first image after the processor obtains the photographing instruction; a main camera, used to obtain the second image after the processor obtains the photographing instruction; a black and white camera, used to obtain the photographing instruction after the processor After that, the third image is acquired; the telephoto camera is used to acquire the fourth image after the processor acquires the camera instruction.
  • the multiple cameras include: a wide-angle camera, a main camera, a black-and-white camera, and a telephoto camera; the multiple cameras are used to monitor the same scene to be shot Shooting; a wide-angle camera, used to obtain the first image after the processor obtains the photographing instruction; a main camera, used to obtain the second image after the processor obtains the photographing instruction; a black and white camera, used to
  • a chip including: a processor, configured to call and run a computer program from a memory, so that a device equipped with the chip performs the shooting as provided in the first aspect or any possible implementation manner of the first aspect method.
  • a computer-readable storage medium stores a computer program, and the computer program includes program instructions.
  • the program instructions are executed by a processor, the processor executes the method according to the first aspect or the first aspect.
  • the shooting method provided in any possible implementation of .
  • a computer program product includes a computer-readable storage medium storing a computer program, and the computer program enables the computer to execute the photographing method provided in the first aspect or any possible implementation manner of the first aspect .
  • FIG. 1 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
  • FIG. 2 is a software structural block diagram of an electronic device provided in an embodiment of the present application.
  • FIG. 3 is a schematic diagram of the arrangement of multiple cameras on an electronic device provided by an embodiment of the present application.
  • FIG. 4 is a schematic diagram of an interface of an electronic device provided in an embodiment of the present application.
  • FIG. 5 is a schematic flowchart of a shooting method in a shooting mode provided by an embodiment of the present application
  • FIG. 6 is a schematic flowchart of another shooting method in a shooting mode provided by an embodiment of the present application.
  • FIG. 7 is a schematic flowchart of a shooting method in a video recording mode provided by an embodiment of the present application.
  • FIG. 8 is a schematic flowchart of another shooting method in the shooting mode provided by the embodiment of the present application.
  • FIG. 9 is a schematic flowchart of another shooting method in the shooting mode provided by the embodiment of the present application.
  • FIG. 10 is a schematic flowchart of another shooting method in the shooting mode provided by the embodiment of the present application.
  • FIG. 11 is a schematic flowchart of another shooting method in the shooting mode provided by the embodiment of the present application.
  • FIG. 12 is a schematic flowchart of another shooting method in the shooting mode provided by the embodiment of the present application.
  • FIG. 13 is a schematic structural diagram of a night scene algorithm module provided by an embodiment of the present application.
  • Fig. 14 is a schematic structural diagram of a large residual block in Fig. 13;
  • FIG. 15 is a schematic flowchart of another shooting method in video recording mode provided by the embodiment of the present application.
  • FIG. 16 shows a schematic flow diagram of obtaining a third pre-processed image by using an HDR algorithm module provided by an embodiment of the present application
  • Fig. 17 shows the first image of the long exposure, the first image of the short exposure and the third pre-processing image in Fig. 16;
  • Fig. 18 shows a schematic diagram of the change of the field of view angle during multi-camera zoom switching provided by the embodiment of the present application
  • Fig. 19 shows a schematic interface diagram of zooming during photo preview provided by the embodiment of the present application.
  • FIG. 20 and FIG. 21 respectively show a schematic diagram of a process of multi-camera zooming during photo preview provided by the embodiment of the present application;
  • Fig. 22 shows a schematic interface of zooming during video preview or video according to the embodiment of the present application
  • FIG. 23 and FIG. 24 respectively show a schematic diagram of the process of multi-shot zooming during video preview or video recording provided by the embodiment of the present application;
  • Fig. 25 shows a schematic interface diagram of another electronic device provided by the embodiment of the present application.
  • FIG. 26 shows a schematic flowchart of a shooting method in HDR mode provided by an embodiment of the present application
  • Fig. 27 shows a schematic interface diagram of another electronic device provided by the embodiment of the present application.
  • FIG. 28 shows a schematic flowchart of a shooting method in a large aperture mode provided by an embodiment of the present application
  • FIG. 29 shows another schematic diagram of the arrangement of multiple cameras on the back cover of the electronic device provided by the embodiment of the present application.
  • FIG. 30 shows a schematic flowchart of another shooting method in a large aperture mode provided by an embodiment of the present application.
  • FIG. 31 shows images captured by the main camera and the TOF camera provided in the embodiment of the present application.
  • Fig. 32 shows a schematic interface diagram of another electronic device provided by the embodiment of the present application.
  • FIG. 33 shows a schematic flowchart of a shooting method in portrait mode provided by an embodiment of the present application
  • FIG. 34 shows a schematic flowchart of another shooting method in portrait mode provided by an embodiment of the present application.
  • Fig. 35 shows a second enhanced image obtained after blurring according to the embodiment of the present application.
  • Fig. 36 shows a schematic interface diagram of another electronic device provided by the embodiment of the present application.
  • FIG. 37 shows a schematic flowchart of a shooting method in night scene mode provided by an embodiment of the present application.
  • Fig. 38 shows a schematic interface diagram of another electronic device provided by the embodiment of the present application.
  • FIG. 39 shows a schematic flowchart of a shooting method in a smart mode provided by an embodiment of the present application.
  • FIG. 40 shows a schematic structural diagram of an image processing device provided by an embodiment of the present application.
  • FIG. 41 shows a schematic structural diagram of a chip provided by an embodiment of the present application.
  • a relationship means that there may be three kinds of relationships, for example, A and/or B means: A exists alone, A and B exist simultaneously, and B exists alone.
  • plural refers to two or more than two.
  • first and second are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of indicated technical features. Thus, a feature defined as “first” and “second” may explicitly or implicitly include one or more of these features. In the description of this embodiment, unless otherwise specified, “plurality” means two or more.
  • various aspects or features of the present application may be implemented as a method, apparatus, or article of manufacture using standard programming and/or engineering techniques.
  • article of manufacture covers a computer program accessible from any computer readable device, carrier or media.
  • computer-readable media may include, but are not limited to: magnetic storage devices (e.g., hard disk, floppy disk, or tape, etc.), optical disks (e.g., compact disc (compact disc, CD), digital versatile disc (digital versatile disc, DVD) etc.), smart cards and flash memory devices (for example, erasable programmable read-only memory (EPROM), card, stick or key drive, etc.).
  • magnetic storage devices e.g., hard disk, floppy disk, or tape, etc.
  • optical disks e.g., compact disc (compact disc, CD), digital versatile disc (digital versatile disc, DVD) etc.
  • smart cards and flash memory devices for example, erasable programmable read-only memory (EPROM), card, stick or key drive, etc.
  • various storage media described herein can represent one or more devices and/or other machine-readable media for storing information.
  • the term "machine-readable medium” may include, but is not limited to, wireless channels and various other media capable of storing, containing and/or carrying instructions and/or data.
  • Computer-readable media may include, but are not limited to: magnetic storage devices (e.g., hard disk, floppy disk, or tape, etc.), optical disks (e.g., compact disc (compact disc, CD), digital versatile disc (digital versatile disc, DVD) etc.), smart cards and flash memory devices (for example, erasable programmable read-only memory (EPROM), card, stick or key drive, etc.).
  • magnetic storage devices e.g., hard disk, floppy disk, or tape, etc.
  • optical disks e.g., compact disc (compact disc, CD), digital versatile disc (digital versatile disc, DVD) etc.
  • smart cards and flash memory devices for example, erasable programmable read-only memory (EPROM), card, stick or key drive, etc.
  • various storage media described herein can represent one or more devices and/or other machine-readable media for storing information.
  • the term "machine-readable medium” may include, but is not limited to, wireless channels and various other media capable of storing, containing and/or carrying instructions and/or data.
  • Focal length the size of the focal length marks the size of the refractive power, the shorter the focal length, the greater the refractive power.
  • the focal length of the optical lens assembly determines the size of the image generated on the imaging plane of the object captured by the optical lens assembly. Assuming that the same subject is photographed at the same distance, the longer the focal length of the optical lens assembly, the greater the magnification of the image generated by the subject on the charge-coupled device (CCD).
  • optical zoom mainly the comparison ratio and switching of different focal lengths in the camera module.
  • the optical zoom factor can be used to indicate the ability of optical zoom. The larger the optical zoom factor, the farther the scene can be shot.
  • the size of the optical zoom factor is related to the physical focal length of the optical lens assembly. Usually, the equivalent focal length of the camera module is 28mm, corresponding to 1X (ie 1 times) optical zoom factor.
  • RGB (red, green, blue) color space refers to a color model related to the structure of the human visual system. According to the structure of the human eye, all colors are seen as different combinations of red, green and blue.
  • YUV color space refers to a color coding method, Y represents brightness, U and V represent chroma.
  • RGB color space focuses on the human eye's perception of color, while the YUV color space focuses on the sensitivity of vision to brightness.
  • RGB color space and YUV color space can be converted to each other.
  • the pixel value refers to a group of color components corresponding to each pixel in the color image in the RGB color space.
  • each pixel corresponds to a group of three primary color components, wherein the three primary color components are red component R, green component G and blue component B respectively.
  • Bayer pattern color filter array when the image is converted from the actual scene to image data, usually the image sensor receives the red channel signal, the green channel signal and the blue channel signal respectively, three information of three channel signals, and then synthesize the information of three channel signals into a color image.
  • CFA color filter array
  • the image sensor receives the red channel signal, the green channel signal and the blue channel signal respectively, three information of three channel signals, and then synthesize the information of three channel signals into a color image.
  • three filters are required at each pixel position, which is expensive and difficult to manufacture. Therefore, it can be used in image sensors.
  • the surface is covered with a color filter array to obtain the information of the three channel signals.
  • a Bayer pattern color filter array refers to the arrangement of filters in a checkerboard format.
  • the minimum repeating unit in the Bayer format color filter array is: a filter for obtaining the signal of the red channel, two filters for obtaining the signal of the green channel, and a filter for obtaining the signal of the blue channel arranged in a 2 ⁇ 2 manner cloth.
  • a Bayer image that is, an image output by an image sensor based on a Bayer format color filter array.
  • the pixels of multiple colors in this image are arranged in a Bayer pattern.
  • each pixel in the Bayer format image only corresponds to a channel signal of one color.
  • green pixels pixels corresponding to the green channel signal
  • blue pixels pixels corresponding to the blue channel signal
  • red pixels Pigels corresponding to the red channel signal
  • the minimum repeating unit of the Bayer format image is: one red pixel, two green pixels and one blue pixel are arranged in a 2 ⁇ 2 manner.
  • Gray image a gray image is a single-channel image, used to represent different brightness levels, the brightest is all white, and the darkest is all black. That is, each pixel in a grayscale image corresponds to a different degree of brightness between black and white.
  • 256 gray scales (0th grayscale to grayscale 255 grayscale).
  • the shooting method provided by the embodiment of the present application can be applied to various electronic devices, and can also be a separate application program. high image method.
  • the electronic device may be various camera devices such as action cameras (GoPro), digital cameras, mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (augmented reality, AR)/virtual Reality (virtual reality, VR) equipment, notebook computer, ultra-mobile personal computer (ultra-mobile personal computer, UMPC), netbook, personal digital assistant (personal digital assistant, PDA), etc., or can be other equipment capable of image processing or a device, the embodiment of the present application does not impose any limitation on the specific type of the electronic device.
  • action cameras GoPro
  • digital cameras digital cameras
  • mobile phones mobile phones
  • tablet computers wearable devices
  • vehicle-mounted devices augmented reality (augmented reality, AR)/virtual Reality (virtual reality, VR) equipment
  • notebook computer ultra-mobile personal computer (ultra-mobile personal computer, UMPC), netbook
  • personal digital assistant personal digital assistant, PDA
  • PDA personal digital assistant
  • FIG. 1 shows a schematic structural diagram of an electronic device 100 provided in an embodiment of the present application.
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, and an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and A subscriber identification module (subscriber identification module, SIM) card interface 195 and the like.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, bone conduction sensor 180M, etc.
  • the processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, AP
  • modem processor graphics processing unit
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • baseband processor baseband processor
  • neural network processor neural-network processing unit
  • the controller may be the nerve center and command center of the electronic device 100 .
  • the controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in processor 110 is a cache memory.
  • the memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the system.
  • the processor 110 may run the software code of the photographing method provided in the embodiment of the present application to obtain an image with higher definition.
  • processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transmitter (universal asynchronous receiver/transmitter, UART) interface, mobile industry processor interface (mobile industry processor interface, MIPI), general-purpose input and output (general-purpose input/output, GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface, and /or universal serial bus (universal serial bus, USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input and output
  • subscriber identity module subscriber identity module
  • SIM subscriber identity module
  • USB universal serial bus
  • the interface connection relationship between the modules shown in the embodiment of the present application is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 .
  • the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
  • the charging management module 140 is configured to receive a charging input from a charger.
  • the charger may be a wireless charger or a wired charger.
  • the power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
  • the power management module 141 receives the input from the battery 142 and/or the charging management module 140 to provide power for the processor 110 , the internal memory 121 , the display screen 194 , the camera 193 , and the wireless communication module 160 .
  • the power management module 141 is also used to detect parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance).
  • the electronic device 100 realizes the display function through the GPU, the display screen 194 , and the application processor.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos and the like.
  • the display screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (quantum dot light emitting diodes, QLED), etc.
  • the electronic device 100 may include 1 or N display screens 194 , where N is a positive integer greater than 1.
  • the electronic device 100 can realize the shooting function through the ISP, the camera 193 , the video codec, the GPU, the display screen 194 and the application processor.
  • the ISP is used for processing the data fed back by the camera 193 .
  • the light is transmitted to the photosensitive element of the camera through the lens, and the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye.
  • ISP can also perform algorithm optimization on image noise, brightness, and skin color.
  • ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be located in the camera 193 .
  • Camera 193 is used to capture still images or video. It can be triggered by an application command to realize the camera function, such as capturing images of any scene.
  • a camera may include components such as an imaging lens, an optical filter, and an image sensor. The light emitted or reflected by the object enters the imaging lens, passes through the filter, and finally converges on the image sensor.
  • the imaging lens is mainly used to gather and image the light emitted or reflected by all objects in the camera angle (also called the scene to be shot, the target scene, or the scene image that the user expects to shoot);
  • the filter is mainly used to It is used to filter out excess light waves (such as light waves other than visible light, such as infrared) in the light;
  • the image sensor can be a charge coupled device (charge coupled device, CCD) or a complementary metal oxide semiconductor (complementary metal-oxide-semiconductor, CMOS ) phototransistor.
  • CCD charge coupled device
  • CMOS complementary metal oxide semiconductor
  • the ISP outputs the digital image signal to the DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other image signals.
  • the electronic device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
  • the camera 193 may be located at the front of the electronic device 100, or at the back of the electronic device 100, and the specific number and arrangement of the cameras may be set according to requirements, which are not limited in this application.
  • the electronic device 100 includes a front camera and a rear camera.
  • a front camera or a rear camera may include one or more cameras.
  • the camera is arranged on an external accessory of the electronic device 100, the external accessory is rotatably connected to the frame of the mobile phone, and the angle formed between the external accessory and the display screen 194 of the electronic device 100 is 0-360 degrees any angle between.
  • the external accessory drives the camera to rotate to a position facing the user.
  • the mobile phone has multiple cameras, only some of the cameras may be set on the external accessories, and the rest of the cameras may be set on the electronic device 100 body, which is not limited in this embodiment of the present application.
  • Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
  • the internal memory 121 may be used to store computer-executable program codes including instructions.
  • the internal memory 121 may include an area for storing programs and an area for storing data.
  • the stored program area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.) and the like.
  • the storage data area can store data created during the use of the electronic device 100 (such as audio data, phonebook, etc.) and the like.
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (universal flash storage, UFS) and the like.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
  • the internal memory 121 may also store software codes of the photographing method provided by the embodiment of the present application.
  • the processor 110 runs the software codes, the process steps of the photographing method are executed to obtain images with higher definition.
  • the internal memory 121 can also store captured images.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, so as to expand the storage capacity of the electronic device 100.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. Such as saving files such as music in an external memory card.
  • the software code of the photographing method provided in the embodiment of the present application can also be stored in an external memory, and the processor 110 can run the software code through the external memory interface 120, execute the process steps of the photographing method, and obtain an image with higher definition . Images captured by the electronic device 100 may also be stored in an external memory.
  • the user can designate whether to store the image in the internal memory 121 or the external memory.
  • a prompt message may pop up to remind the user whether to store the image in the external memory or the internal memory; of course, there may be other specified ways , the embodiment of the present application does not impose any limitation on this; or, when the electronic device 100 detects that the amount of memory in the internal memory 121 is less than a preset amount, it may automatically store the image in the external memory.
  • the electronic device 100 can implement audio functions through the audio module 170 , the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. Such as music playback, recording, etc.
  • the pressure sensor 180A is used to sense the pressure signal and convert the pressure signal into an electrical signal.
  • pressure sensor 180A may be disposed on display screen 194 .
  • the gyro sensor 180B can be used to determine the motion posture of the electronic device 100 .
  • the angular velocity of the electronic device 100 around three axes ie, x, y and z axes
  • the gyro sensor 180B can be used for image stabilization.
  • the air pressure sensor 180C is used to measure air pressure.
  • the electronic device 100 calculates the altitude based on the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
  • the magnetic sensor 180D includes a Hall sensor.
  • the electronic device 100 may use the magnetic sensor 180D to detect the opening and closing of the flip leather case.
  • the electronic device 100 when the electronic device 100 is a clamshell machine, the electronic device 100 can detect opening and closing of the clamshell according to the magnetic sensor 180D.
  • features such as automatic unlocking of the flip cover are set.
  • the acceleration sensor 180E can detect the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
  • the distance sensor 180F is used to measure the distance.
  • the electronic device 100 may measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 may use the distance sensor 180F for distance measurement to achieve fast focusing.
  • Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes.
  • the light emitting diodes may be infrared light emitting diodes.
  • the electronic device 100 emits infrared light through the light emitting diode.
  • Electronic device 100 uses photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it may be determined that there is an object near the electronic device 100 . When insufficient reflected light is detected, the electronic device 100 may determine that there is no object near the electronic device 100 .
  • the electronic device 100 can use the proximity light sensor 180G to detect that the user is holding the electronic device 100 close to the ear to make a call, so as to automatically turn off the screen to save power.
  • the proximity light sensor 180G can also be used in leather case mode, automatic unlock and lock screen in pocket mode.
  • the ambient light sensor 180L is used for sensing ambient light brightness.
  • the electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness.
  • the ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in the pocket, so as to prevent accidental touch.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access to application locks, take pictures with fingerprints, answer incoming calls with fingerprints, and the like.
  • the temperature sensor 180J is used to detect temperature.
  • the electronic device 100 uses the temperature detected by the temperature sensor 180J to implement a temperature treatment strategy. For example, when the temperature reported by the temperature sensor 180J exceeds the threshold, the electronic device 100 may reduce the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection.
  • the electronic device 100 when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to prevent the electronic device 100 from being shut down abnormally due to the low temperature.
  • the electronic device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
  • the touch sensor 180K is also called “touch device”.
  • the touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”.
  • the touch sensor 180K is used to detect a touch operation on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • Visual output related to the touch operation can be provided through the display screen 194 .
  • the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the position of the display screen 194 .
  • the bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice. The bone conduction sensor 180M can also contact the human pulse and receive the blood pressure beating signal. In some embodiments, the bone conduction sensor 180M can also be disposed in the earphone, combined into a bone conduction earphone.
  • the audio module 170 can analyze the voice signal based on the vibration signal of the vibrating bone mass of the vocal part acquired by the bone conduction sensor 180M, so as to realize the voice function.
  • the application processor can analyze the heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M, so as to realize the heart rate detection function.
  • the keys 190 include a power key, a volume key and the like.
  • the key 190 may be a mechanical key. It can also be a touch button.
  • the electronic device 100 can receive key input and generate key signal input related to user settings and function control of the electronic device 100 .
  • the motor 191 can generate a vibrating reminder.
  • the motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.
  • touch operations applied to different applications may correspond to different vibration feedback effects.
  • the indicator 192 can be an indicator light, and can be used to indicate charging status, power change, and can also be used to indicate messages, missed calls, notifications, and the like.
  • the SIM card interface 195 is used for connecting a SIM card.
  • the SIM card can be connected and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195 .
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components.
  • the illustrated components can be realized in hardware, software or a combination of software and hardware.
  • the hardware system of the device 100 is described in detail above, and the software system of the device 100 is introduced below.
  • the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture.
  • the operating system of the electronic device may include but not limited to Symbian (Symbian), Android (Andriod), apple (iOS), Blackberry (Blackberry), Hongmeng (HarmonyOS) and other operating systems, this application does not make any restrictions.
  • FIG. 2 is a block diagram of the software structure of the electronic device 100 according to the embodiment of the present application.
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate through software interfaces.
  • the Android system is divided into five layers, which are application program layer 210 , application program framework layer 220 , hardware abstraction layer 230 , driver layer 240 , and hardware layer 250 from top to bottom.
  • Application layer 210 may include a series of application packages.
  • the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.
  • the application framework layer 220 provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
  • the application framework layer 220 includes some predefined functions.
  • the application framework layer 220 may include an interface corresponding to a camera application, a view system, and the like.
  • the view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on.
  • the view system can be used to build applications.
  • a display interface can consist of one or more views.
  • a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.
  • a hardware abstraction layer (hardware abstraction layer, HAL) 230 is used to abstract hardware.
  • the hardware abstraction layer 30 includes a hardware abstraction layer interface (HAL interface), a camera hardware interface layer (hardware interface), a scheduling layer, an image signal processor node (ISP pipeline), a camera service layer, and the like.
  • the driver layer 240 is used to provide drivers for different hardware devices.
  • the driver layer 240 may include a camera driver; a digital signal processor driver and a graphics processor driver.
  • the hardware layer 250 may include an image sensor (sensor), an image processor, a digital signal processor, a graphics processor, and other hardware devices.
  • the connection between the application program layer 210 and the application program framework layer 220 above the hardware abstraction layer 230 and the driver layer 240 and hardware layer 250 below can be realized.
  • the camera hardware interface layer in the hardware abstraction layer 230 manufacturers can customize functions here according to requirements. Compared with the hardware abstraction layer interface, the camera hardware interface layer is more efficient, flexible, and low-latency, and can call ISP and GPU more abundantly to realize image processing.
  • the image input into the hardware abstraction layer 230 may be from an image sensor, or may be from a stored picture.
  • the scheduling layer in the hardware abstraction layer 230 includes a general functional interface for implementing management and control.
  • the camera service layer in the hardware abstraction layer 230 is used for accessing ISP and other hardware interfaces.
  • the workflow of the software and hardware of the electronic device 100 will be exemplarily described below in conjunction with capturing and photographing scenes.
  • the camera application in the application layer can be displayed on the screen of the electronic device 100 in the form of an icon.
  • the electronic device 100 starts to run the camera application.
  • the camera application calls the interface corresponding to the camera application in the application framework layer 210, then starts the camera driver by calling the hardware abstraction layer 230, turns on the camera 193 on the electronic device 100, and passes The camera 193 collects images.
  • the camera 193 can collect according to a certain working frequency, and save and/or transmit the collected images to the display screen for display.
  • the electronic device 100 as an example of a mobile phone with the above hardware and software structure, the camera and interface on the electronic device 100 applicable to the shooting method provided by the embodiment of the present application will be described in detail.
  • the electronic device to which the photographing method provided in the embodiment of the present application is applicable has at least a plurality of cameras 193 , for example, four cameras 193 .
  • the four cameras are a wide-angle camera 1933 , a main camera 1931 , a black and white camera 1932 and a telephoto camera 1934 .
  • the four cameras are used to shoot the same scene to be shot.
  • the electronic device 100 may also have other cameras 193 , and the types of cameras 193 and the number of each camera 193 may be set as required, which is not limited in this embodiment of the present application.
  • the electronic device 100 has four cameras 193, and the four cameras 193 may be a super wide-angle camera, a wide-angle camera 1933, a monochrome camera 1932, and a telephoto camera 1934.
  • the field angle range corresponding to the main camera 1931 is basically the same as the field angle range corresponding to the black and white camera 1932, and the field angle range corresponding to the wide-angle camera 1933 is larger than that of the main camera.
  • the field of view ranges corresponding to the camera 1931 and the black and white camera 1932 respectively there is overlap between the field of view of the wide-angle camera 1933 and the field of view of the main camera 1931 or with the field of view of the black and white camera 1932, that is, the wide-angle
  • the camera 1933 can capture the scene content captured by the main camera 1931 and its surrounding scene content, or the scene content of the black and white camera 1932 and its surrounding scene content.
  • the field of view range corresponding to the telephoto camera 1934 is smaller than the field of view range corresponding to the main camera 1931, and there is an overlap between the field of view of the main camera 1931 and the field of view of the telephoto camera 1934, that is, the main camera
  • the camera 1931 can capture the scene content captured by the telephoto camera 1934 and the surrounding scene content.
  • the wide-angle camera 1933 can capture the scene content captured by the telephoto camera 1934 and the surrounding scene content.
  • the wide-angle camera 1933 is suitable for shooting close-up shots due to its small focusing distance, and, as the name suggests, the wide-angle camera 1933 is suitable for shooting scenes with a relatively large field of view.
  • the main camera 1931 is more suitable for shooting portraits due to its high definition, while the telephoto camera 1934 is more suitable for shooting close-ups of distant scenes.
  • the definition of the image obtained by the main camera 1931 and the definition of the image obtained by the black and white camera 1932 are basically Consistent, but the resolution of the image obtained by the wide-angle camera 1933 is lower than that of the image obtained by the main camera 1931, and the resolution of the image obtained by the telephoto camera 1934 is higher than that of the image obtained by the main camera 1931.
  • zoom factor ranges of the main camera 1931 and the monochrome camera 1932 are basically the same, while the zoom factor corresponding to the wide-angle camera 1933 is relatively smaller than that of the main camera 1931, and the zoom factor of the telephoto camera 1934 is relatively larger than that of the main camera 1931. zoom factor.
  • the range of zoom factor corresponding to the wide-angle camera 1933 is [0.1,1), wherein, 0.1 refers to a zoom factor of 0.1 times, and 1 refers to a zoom factor of 1 times.
  • the zoom factor range corresponding to the main camera 1931 is [1,3.9)
  • the zoom factor range corresponding to the black and white camera 1932 is [1,2)
  • the zoom factor range corresponding to the telephoto camera 1934 is [3.9,100).
  • FIG. 3 shows three schematic diagrams of arrangement of the above four cameras on the back cover of the electronic device 100 .
  • the above four cameras are arranged at the upper left corner of the back cover of the electronic device 100 .
  • the main camera 1931 as a camera commonly used by users, is separately distributed in the first circular area near the top of the rear cover; the black and white camera 1932, wide-angle camera 1933 and telephoto camera 1934 are distributed in the area near the bottom of the rear cover.
  • the second circular area in addition, in the second circular area near the bottom of the back cover, a flashlight can also be set.
  • the above four cameras are arranged in a circular area in the middle of the back cover of the electronic device 100 .
  • the main camera 1931 as a camera commonly used by users, is set at the center of the circular area, and three cameras, the black and white camera 1932, the wide-angle camera 1933 and the telephoto camera 1934, are distributed around the main camera 1931.
  • a flash can also be set.
  • the above four cameras may also be arranged in the upper half of the rear cover of the electronic device 100 in a 2 ⁇ 2 array.
  • the main camera 1931 as a camera commonly used by users, is set at the upper left corner of the back cover.
  • a flash can also be set at the center of the four cameras.
  • the electronic device 100 has four cameras, and the four cameras are respectively an ultra-wide-angle camera, a wide-angle camera 1933, a black-and-white camera 1932, and a telephoto camera 1934, they can also be arranged in three ways as shown in FIG. 3 Arrangement in a manner, wherein, the position of the wide-angle camera 1933 is equivalent to the position of the above-mentioned main camera 1931, the position of the ultra-wide-angle camera is equivalent to the position of the above-mentioned wide-angle camera 1933, and the corresponding positions of the black-and-white camera 1932 and the telephoto camera 1934 remain unchanged.
  • Fig. 4 shows a schematic diagram of an interface of an electronic device provided by an embodiment of the present application.
  • a camera application is installed on the electronic device 100 .
  • multiple applications are installed, which is not limited in this embodiment of the present application.
  • the electronic device 100 in response to a user's touch operation, when the electronic device 100 runs the camera application, the electronic device 100 displays a shooting interface as shown in (b) in FIG. 4 .
  • the shooting interface includes various shooting modes of the camera application, such as a large aperture mode 41 , a night scene mode 42 , a portrait mode 43 , a photographing mode 44 , and a video recording mode 45 .
  • the shooting interface also includes a second control, the second control is a shooting key 50, and the shooting key 50 indicates the current shooting mode. As shown in (b) in FIG. 4 , the shooting key 50 indicates that the current shooting mode is the shooting mode 45.
  • the electronic device 100 displays a shooting interface as shown in (c) in FIG. 4 .
  • the electronic device 100 displays the shooting interface shown in (c) in FIG. 4 .
  • the shooting key 50 indicates that the current shooting mode is the video recording mode 45 .
  • the shooting key 50 can also indicate that the current shooting mode is the large aperture mode 41 , the night scene mode 42 , the portrait mode 43 and the like.
  • Each mode is used in a corresponding scenario. For example, at night or in dimly lit places, using the night scene mode 42 can make the resulting image clear;
  • the specific shooting mode can be switched according to the user's operation, and the arrangement order of multiple shooting modes on the interface of the electronic device can be set and changed as required, which is not limited in this embodiment of the present application.
  • the shooting interface also includes a viewfinder window 60, which can be used to display a preview image before taking pictures or recording in real time.
  • a first control is also displayed in the shooting interface, and the first control is a zoom option 61 .
  • the user can select the zoom factor currently required in the zoom option 61, for example, the zoom factor of 0.5 times, 2 times or 50 times.
  • the zoom factor refers to the optical zoom capability of the camera.
  • the user can continuously zoom in on the subject on the viewfinder window 60 , and by decreasing the zoom factor, the user can continuously shrink the subject on the viewfinder window 60 .
  • the user can select the zoom factor through the zoom option 61 on the electronic device 100; the user can also input gesture commands through the display screen of the electronic device 100 to select the zoom factor, so as to realize the preview image displayed on the viewfinder window 60. Adjustment.
  • FIG. 5 shows a schematic flowchart of a photographing method provided by an embodiment of the present application.
  • the method includes the following S10-S40.
  • the user's first operation such as a touch operation on the camera application
  • the camera application is started, as shown in (b) in FIG. 50 indicates that the current shooting mode is the camera mode 44 by default.
  • the first operation of the user is received, for example, a sliding operation, and then, as shown in (b) in FIG. Change to 44 indicating that the current shooting mode is the shooting mode.
  • the first operation can also be other operations, as long as the current shooting mode selected by the user can be determined.
  • the shooting mode is a preview mode (including the preview mode in the camera mode, or the preview mode in the video recording mode) ) or video recording mode are also applicable, so that the first operation may be a corresponding related operation, which is not limited in this embodiment of the present application.
  • the current shooting mode is the photographing mode
  • illuminance refers to the degree to which an object is illuminated, and specifically refers to the energy of visible light received by an object per unit area. Streets in the dark and dimly lit interiors generally have low illumination. In contrast, playgrounds under the sun and stages under spotlights can be called medium to high illumination. If the illuminance of the scene to be shot is relatively low, when the scene to be shot is shot with an electronic device, it will be blurred and the effect will be relatively poor. If the illumination of the scene to be shot is relatively high, when the scene to be shot is shot with an electronic device, it will be clearer and the shooting effect will be better.
  • the scene to be shot is a scene within the shooting range of the current camera.
  • the photoelectric sensor in the electronic device 100 may be used to detect the illuminance of the scene to be photographed.
  • the illuminance can also be calculated by a formula according to the exposure parameters of the camera, such as exposure time, sensitivity, aperture and other parameters, and the received response value. Wherein, in the case of the same exposure parameters, the higher the response value, the higher the illuminance of the scene to be photographed, and thus the greater the calculated illuminance value.
  • the operation is a sliding operation
  • the zoom factor of is used as the zoom factor expected by the user, that is, as the current zoom factor selected by the user.
  • the operation may also be a two-point outward expansion operation; it may also be a click operation, etc., which is not limited in this embodiment of the present application.
  • the target camera is one or more of the wide-angle camera 1933 , the main camera 1931 , the monochrome camera 1932 and the telephoto camera 1934 .
  • the corresponding type and number of cameras can be determined according to the illuminance of the scene to be shot and the current zoom factor.
  • an original image may also be called a RAW image, which may refer to an image in the RAW domain.
  • images in the RAW domain contain more detailed information, have higher definition, and have a larger amount of data.
  • the number of original images may be acquired as required, and this embodiment of the present application does not impose any limitation on this.
  • the target camera includes multiple and/or multiple cameras
  • the original image refers to the general term for the images respectively acquired by the multiple and/or multiple cameras.
  • the original image includes multiple images with different viewing angles or different resolutions.
  • An embodiment of the present application provides a shooting method.
  • the shooting mode selected by the user is the shooting mode, according to the illuminance of the scene to be shot and the current zoom factor selected by the user, the wide-angle camera, the main camera, the black and white camera, and the telephoto camera are selected.
  • different cameras can be switched according to different illuminances and zoom factors to obtain original images when taking pictures.
  • different cameras can be used to obtain original images with different field of view angles and different resolutions, thereby Multi-camera collaborative processing can be used to improve the quality of captured images obtained after original image processing.
  • FIG. 6 shows a schematic flowchart of a shooting method in another shooting mode provided by an embodiment of the present application.
  • the above S20 includes S21-S24.
  • preset illuminance threshold may be set and changed as required, which is not limited in this embodiment of the present application.
  • S22 Determine the target camera according to the zoom factor range to which the current zoom factor belongs, and use the target camera to acquire the original image.
  • the target camera includes 1 or more cameras. Different zoom ranges correspond to different cameras.
  • the target camera includes one or more cameras, it can be known that the zoom range corresponds to one or more cameras, and only the one or more cameras can be determined as the target camera.
  • each zoom range can be preset to correspond to one camera, and the one camera is the target camera corresponding to the zoom range; or, each zoom range can be preset The range corresponds to multiple cameras, and the multiple cameras are the target cameras corresponding to the zoom factor range; or, it can also be preset that each zoom factor range in a part of the zoom factor range corresponds to one camera, and the zoom factor range in another part of the zoom factor range corresponds to a camera.
  • Each zoom range corresponds to a plurality of cameras, which can be specifically set according to needs, which is not limited in this embodiment of the present application.
  • a zoom range corresponds to multiple different cameras, and refers to a plurality of different types of cameras.
  • a target camera corresponding to a certain zoom range includes a telephoto camera 1934 and a main camera 1931 .
  • the one camera is used to acquire an original image
  • the original image includes one or more frames of images acquired by the one camera.
  • the captured image obtained by subsequent processing of the original images is the fusion of the multiple frames of images.
  • the multiple different cameras are used to acquire an original image, and the original image includes multiple frames of images acquired by the multiple different cameras. Based on this, the captured image obtained by processing the original image is the fusion of multiple frames of images acquired by multiple different cameras.
  • range of zoom factors can be divided and changed according to needs, and the type and quantity of target cameras corresponding to each range of zoom factors can be set and changed according to needs, which is not limited in this embodiment of the present application.
  • the target camera includes 1 camera.
  • the target camera includes one camera, so it can be known that the zoom range corresponds to one camera, and only one camera can be determined as the target camera.
  • the cameras corresponding to different zoom ranges may be the same or different, and may be set and changed as required, and this embodiment of the present application does not impose any limitation on this.
  • different zoom ranges correspond to different cameras.
  • one zoom range corresponds to the wide-angle camera 1933
  • the other zoom range corresponds to the main camera 1931 .
  • one camera may be determined as the target camera, and the original image may be obtained by using the camera.
  • the original image includes one or more frames of images acquired by the camera. Based on this, when multiple frames of images are acquired, the captured image obtained by processing the original images is the fusion of multiple frames of images.
  • the above S22 includes the following S221-S224.
  • the target camera includes a wide-angle camera 1933 and a main camera 1931, use the wide-angle camera 1933 to acquire a first image, and use the main camera 1931 to acquire a second image.
  • the main camera 1931 is an auxiliary camera.
  • the images acquired by the auxiliary camera are only used for image processing to acquire captured images, not for preview display.
  • the original image includes the first image and the second image.
  • the number of the first image may be 1 frame or multiple frames
  • the number of the second image may be 1 frame or multiple frames, which may be acquired according to needs, which is not limited in this embodiment of the present application.
  • both the first image and the second image are located in the RAW domain, and both are Bayer format images.
  • the field angle range corresponding to the first image is larger than the field angle range corresponding to the second image, and the definition of the first image is smaller than that of the second image.
  • the target camera includes a main camera 1931 and a black-and-white camera 1932, use the main camera 1931 to acquire a second image, and use the black-and-white camera 1932 to acquire a third image.
  • the black and white camera 1932 is an auxiliary camera.
  • the original image includes the second image and the third image.
  • the number of the second image may be one frame or multiple frames
  • the number of the third image may be one frame or multiple frames, which may be acquired as required, which is not limited in this embodiment of the present application.
  • both the second image and the third image are in the RAW domain
  • the second image is a Bayer format image
  • the third image acquired by the black and white camera 1932 is a grayscale image.
  • the field angle range corresponding to the second image is basically the same as the field angle range corresponding to the third image, and the detailed image of the third image is higher than that of the second image.
  • the target camera includes a main camera 1931 and a telephoto camera, use the main camera 1931 to acquire a second image, and use the telephoto camera 1934 to acquire a fourth image.
  • the telephoto camera 1934 is an auxiliary camera.
  • the original image includes the second image and the fourth image.
  • the number of the second image may be one frame or multiple frames
  • the number of the fourth image may be one frame or multiple frames, which may be acquired according to needs, which is not limited in this embodiment of the present application.
  • both the second image and the fourth image are located in the RAW domain, and both are Bayer format images.
  • the field angle range corresponding to the second image is larger than the field angle image range corresponding to the fourth image.
  • the target camera includes a telephoto camera, and uses the telephoto camera to acquire a fourth image.
  • the original image includes the fourth image.
  • the number of the fourth image is multiple frames, which can be acquired according to needs, which is not limited in this embodiment of the present application.
  • the zoom factors included in the first zoom factor range, the second zoom factor range, the third zoom factor range, and the fourth zoom factor range are increased.
  • the maximum zoom factor in the first zoom factor range is smaller than the minimum zoom factor in the second zoom factor range
  • the maximum zoom factor in the second zoom factor range is smaller than the minimum zoom factor in the third zoom factor range
  • the third The maximum zoom factor in the zoom factor range is smaller than the minimum zoom factor in the fourth zoom factor range.
  • f ⁇ p ⁇ q ⁇ r ⁇ t; f, p, q, r and t are all positive numbers.
  • the present application selects the wide-angle camera 1933 and the main camera in a range with a small zoom factor 1931 to obtain the original image, select the main camera 1931 and the black and white camera 1932 to obtain the original image in the range of moderate zoom multiples, and select the telephoto camera and the main camera 1931 to obtain the original image in the range of large zoom multiples, thus, in the follow-up During processing, the images obtained by different two cameras with different field of view angle ranges and different resolutions can be processed within different zoom multiple ranges and processed into captured images, thereby improving the quality of the captured captured images.
  • the original image with rich details and high definition can be captured by using a telephoto camera with a larger zoom factor. Therefore, in the subsequent processing, it is no longer necessary to carry out processing together with low-resolution images obtained by other cameras. deal with.
  • the electronic device also includes a super-telephoto camera, and the super-telephoto camera can obtain images with richer details and higher definition than the telephoto camera, the application can choose the telephoto camera within a larger zoom range.
  • the camera and the ultra-telephoto camera acquire original images to improve the quality of subsequent captured images.
  • the above S24 includes the following S241-S243.
  • the target camera is the wide-angle camera 1933, and the wide-angle camera 1933 is used to acquire a first image.
  • the original image includes the first image, and the first image includes multiple frames, and the specific number can be acquired as required, which is not limited in this embodiment of the present application.
  • the first image is located in the RAW domain and is a Bayer format image.
  • the target camera is the main camera 1931, and uses the main camera 1931 to acquire the second image.
  • the original image includes the second image
  • the second image includes multiple frames, which may be acquired according to needs, and this embodiment of the present application does not impose any limitation on this.
  • the second image is located in the RAW domain and is a Bayer format image.
  • the target camera is the telephoto camera 1934, and the telephoto camera 1934 is used to acquire a fourth image.
  • the original image includes a fourth image
  • the fourth image includes multiple frames, which may be acquired according to needs, and this embodiment of the present application does not impose any limitation on this.
  • the fourth image is located in the RAW domain and is a Bayer format image.
  • the first zoom factor range, the second zoom factor range, the third zoom factor range, and the fourth zoom factor range are the same as the zoom factors in S221-S224 above, and will not be repeated here.
  • the present application obtains the original image by selecting the wide-angle camera 1933 in a range with a small
  • the main camera 1931 is used to obtain the original image in the range of moderate multiples
  • the telephoto camera 1934 is used to obtain the original image in the range of large zoom multiples. Therefore, in the subsequent processing, the corresponding camera can be obtained within different zoom multiples. Multi-frame images are processed and processed into one frame of captured image, so that the quality of the obtained captured image can be improved.
  • FIG. 7 shows a schematic flowchart of another shooting method provided by the embodiment of the present application.
  • the method includes the following S40-S80.
  • S40 Receive a first operation of the user, where the first operation is used to determine a current shooting mode selected by the user, where the shooting mode further includes: a video recording mode.
  • the user's first operation such as a touch operation on the camera application
  • the camera application is started, as shown in (c) in FIG. 50 defaults to indicate that the current shooting mode is video recording mode 45 .
  • the user's first operation such as a sliding operation
  • the user's first operation is received, and then, as shown in (c) in FIG. 45 to indicate that the current shooting mode is video recording mode.
  • the first operation may also be other operations, as long as the current shooting mode selected by the user can be determined, which is not limited in this embodiment of the present application.
  • the zoom factor indicated when the user clicks or slides to stop may be determined as the zoom factor desired by the user, that is, the current zoom factor.
  • zoom range can be divided and changed as needed, and the type and number of cameras corresponding to each zoom range can be set and changed as needed, which is not limited in this embodiment of the present application.
  • the zoom factor range in the video recording mode may be the same as or different from the above zoom factor range in the photographing mode.
  • this application uses the zoom factor range divided by the same division method for description.
  • the target camera includes 1 camera.
  • the target camera is one of the wide-angle camera 1933 , the main camera 1931 , the monochrome camera 1932 and the telephoto camera 1934 .
  • the ranges of zoom factors are different, and the corresponding cameras may be the same or different, which may be set and changed as required, and this embodiment of the present application does not impose any limitation on this.
  • a corresponding camera can be determined, and the original image can be acquired by using the camera.
  • the original image includes multiple frames of images acquired by the one camera.
  • the captured image obtained by subsequent processing of the original images is the fusion of the multiple frames of images.
  • the embodiment of the present application provides a shooting method.
  • the shooting mode selected by the user is the video recording mode, according to the zoom range to which the current zoom factor belongs, the corresponding camera can be determined from the wide-angle camera, the main camera, the monochrome camera and the telephoto camera.
  • the target camera and use the target camera to obtain the original image, and then process the original image to obtain the captured image.
  • different cameras can be switched according to different zoom factors to obtain the original image during video recording, thus, different cameras can be used to obtain multi-frame images with different field of view angles and different resolutions, so that Utilize multi-camera collaborative processing to improve the quality of captured images obtained after raw image processing.
  • only multi-frame fusion that is, the method of combining multiple frames from the camera
  • the collaborative processing method between multiple cameras which can be adjusted as needed .
  • this application provides the following embodiments for shooting methods in camera mode and video recording mode:
  • the photographing mode may be other modes such as a photographing mode or a video recording mode.
  • the following embodiments take the photographing mode or the video recording mode as examples for illustration.
  • Embodiment 1 a photographing method, as shown in FIG. 8 , the method includes the following S110 to S160.
  • the current shooting mode is the shooting mode
  • the illuminance of the scene to be shot is greater than or equal to a preset illuminance threshold, that is, the scene to be shot is in medium-high illuminance.
  • the current zoom factor belongs to the first zoom factor range [0.5, 1), thus, it can be determined that the target camera is the wide-angle camera 1933 and the main camera 1931, wherein the main camera 1931 is the auxiliary camera.
  • the wide-angle camera 1933 is used to acquire 3 frames of first images
  • the main camera 1931 is used to acquire 3 frames of second images.
  • the numbers of the first image and the second image are only for illustration, and may be acquired according to needs, and this embodiment of the present application does not impose any limitation on this.
  • both the first image and the second image are in the RAW domain, and both the first image and the second image are Bayer format images.
  • the wide-angle camera 1933 has a larger field of view range than the main camera 1931, correspondingly, the field of view range corresponding to the first image is larger than the field of view range corresponding to the second image.
  • An image contains the content of a second image, that is, the second image is a part of the first image.
  • the resolution of the first image is less than the resolution of the second image.
  • the first front-end processing and the second front-end processing may respectively include: registration, default pixel correction (DPC), RAW domain noise reduction (raw domain noise filter, RAWNF), black level correction (black level correction) , BLC), lens shading correction (lens shading correction, LSC), automatic white balance (auto white balance, AWB), color correction (color correction matrix, CCM), dynamic range compression (dynamic range compression, DRC), Gamma correction ( Gamma) at least one.
  • DPC default pixel correction
  • RAW domain noise reduction raw domain noise filter
  • RAWNF black level correction
  • black level correction black level correction
  • BLC lens shading correction
  • LSC lens shading correction
  • LSC lens shading correction
  • LSC lens shading correction
  • automatic white balance auto white balance
  • color correction color correction matrix, CCM
  • dynamic range compression dynamic range compression
  • Gamma correction Gamma
  • Registration refers to the matching of geographic coordinates of different images obtained by different imaging methods in the same area. Among them, it includes the processing of three aspects: geometric correction, projection transformation and unified scale.
  • Dead point correction is the white point in the output image in a completely black environment, and the black point in the output image in a bright environment.
  • the three primary color channel signals should have a linear response relationship with the ambient brightness, but due to poor signal output by the image sensor, white or black spots may appear, for this, it can be automatically detected and repaired automatically, or, establish The bad pixel linked list repairs bad pixels at fixed positions.
  • a point refers to a pixel.
  • Noise reduction refers to the process of reducing noise in an image. Common methods include mean filtering, Gaussian filtering, and bilateral filtering.
  • RAW domain noise reduction refers to the process of reducing noise in RAW domain images.
  • Black level correction is due to the presence of dark current in the image sensor, which causes the pixels to have a certain output voltage when there is no light, and pixels at different positions may correspond to different output voltages.
  • the output voltage corresponding to the black (ie, black) pixel is corrected.
  • Lens shading correction which can solve the shadows around the lens caused by the uneven refraction of light by the lens.
  • Automatic white balance is to eliminate the influence of the light source on the imaging of the image sensor, simulate the color constancy of human vision, and ensure that the white seen in any scene is true white. Therefore, it is necessary to correct the color temperature and automatically adjust the white balance. to the proper location.
  • Dynamic range compression because the brightness values presented by real scenes in nature have a very large dynamic range, therefore, the camera cannot collect all the brightness values presented by real scenes in nature when acquiring images, but in order to make the acquired images as possible as possible To be close to the real scene in nature, it is necessary to adjust the wide pixel value range (such as 0-4095) of the collected image to a narrow pixel value range (such as 0-255). This process is called dynamic range compression.
  • Gamma correction refers to the editing of the gamma curve of the image to detect the dark and light parts of the image in a way of nonlinear tone editing of the image, and to increase the proportion of the two, thereby improving the image quality.
  • Image contrast effect refers to the editing of the gamma curve of the image to detect the dark and light parts of the image in a way of nonlinear tone editing of the image, and to increase the proportion of the two, thereby improving the image quality.
  • the first front-end processing may include one or more of the above-mentioned processing steps.
  • the order of the multiple processing steps may be adjusted as required, which is not discussed in this embodiment of the present application. any restrictions.
  • the first front-end processing may further include other steps, which may be added according to needs, which is not limited in this embodiment of the present application.
  • the first front-end processing may also include: demosaic (demosaic) and color space conversion.
  • demosaicing since each pixel in the Bayer format image corresponds to only one channel of color information, the surrounding pixel information can be used to estimate other colors, for example, by linear interpolation, each channel can be determined The color information of the other two channels missing from the pixels, thus recovering all the channel information of all the pixels in the image.
  • the process of demosaicing is equivalent to converting the image from the RAW domain to the RGB domain.
  • color space conversion refers to converting from the RGB domain to the YUV domain.
  • demosaiced image can be transferred from the RGB domain to the YUV domain, so as to reduce the amount of data stored and transmitted subsequently and save bandwidth.
  • the second front-end processing may be the same as or different from the first front-end processing, and may be specifically set and changed as required, which is not limited in this embodiment of the present application.
  • the front-end fusion module includes a first front-end fusion module and a second front-end fusion module.
  • both the first front-end processing and the second front-end processing include demosaicing and color space conversion
  • the first front-end processing after the first image undergoes the first front-end processing, the corresponding first front-end processed image is located in the YUV domain.
  • the second image is processed by the second front-end, the corresponding second-end processed image is in the YUV domain.
  • the first front-end fusion module and the second front-end fusion module respectively include a multi-frame fusion module in the YUV domain, so as to realize the multi-frame fusion function in the YUV domain.
  • the first front-end fusion image obtained through the processing of the first front-end fusion module and the second front-end fusion image obtained through the processing of the second front-end fusion module are both located in the YUV domain.
  • the first front-end processing and the second front-end processing do not include demosaicing and color space conversion
  • the first front-end processing image is still in the RAW domain.
  • the second image is processed by the second front-end
  • the corresponding image processed by the second front-end is still in the RAW domain.
  • the first front-end fusion module correspondingly includes a multi-frame fusion module in the RAW domain, so as to realize the multi-frame fusion function in the RAW domain.
  • the first front-end fusion image obtained through the processing of the first front-end fusion module is also located in the RAW domain.
  • the first front-end fusion module and the second front-end fusion module further include: a high dynamic range module.
  • the range module is used to process the first front-end processing image and the second front-end processing image, so that the dark area in the scene to be shot can be brightened in the image, and the bright area can be darkened in the image, so that the processed image can present a dark area and more detail in bright areas.
  • the first front-end fusion module and the second front-end fusion module further include: a super resolution (super resolution, SR) module.
  • a super resolution (super resolution, SR) module is optionally included in the first front-end fusion module and the second front-end fusion module.
  • one frame of high-resolution image After being processed by the super-resolution module, one frame of high-resolution image can be synthesized from multiple low-resolution images, or a high-resolution image can be obtained from a single low-resolution image.
  • transmitting the first front-end processed image and the second front-end processed image to the super-resolution module can increase the resolution of the front-end processed image, and obtain a higher resolution first front-end fusion image and/or second front-end fusion image.
  • first front-end fusion module and the second front-end fusion module may or may not be the same, and may be specifically set and changed as required, which is not limited in this embodiment of the present application.
  • the front-end fusion module includes multi-frame fusion in the YUV domain or multi-frame fusion in the RAW domain, and at least one of the HDR module and the SR module, their order can be adjusted as required.
  • the front-end fusion module may also include other functional modules, which may be specifically set and changed according to needs, which is not limited in this embodiment of the present application.
  • the multi-frame first image may include a long-exposure first image, a short-exposure first image, and a medium-exposure first image
  • the multi-frame second image may include a long-exposure second image, a short-exposure Second image and middle exposure of the second image.
  • the first front-end processed images corresponding to the multiple frames of first images include images with different exposure degrees
  • the first front-end processing image, the second front-end processing image corresponding to the multi-frame second image includes the second front-end processing image with different exposure degrees, based on this, the first front-end fusion module performs multi-frame first front-end processing images with different exposure degrees After fusion, the details of the dark area and the overexposed area in the image can be increased, and the dynamic range can be improved, thereby improving the definition of the corresponding first front-end fusion image.
  • the second front-end fusion module fuses multiple frames of second front-end processing images with different exposure levels, it can increase the details of dark areas and overexposed areas in the image, improve the dynamic range, and thus improve the corresponding second front-end fusion Image clarity.
  • a long-exposure image refers to an image obtained after a long exposure time during shooting
  • a short-exposure image refers to an image obtained after a short exposure time during shooting, wherein both long exposure and short exposure are relative to the exposure time.
  • the exposure time is the time used for photoelectric conversion when the image sensor captures an image.
  • the medium exposure time is 5 milliseconds
  • the short exposure time is 1/50 millisecond
  • the long exposure time is 100 milliseconds.
  • the first back-end processing and the second back-end processing may respectively include video anti-shake, color enhancement (color enhancement, CE), 2D lookup table, that is, style transformation (2dimensional look up table, 2DLUT), super-resolution reconstruction at least one of the .
  • color enhancement color enhancement, CE
  • 2D lookup table that is, style transformation (2dimensional look up table, 2DLUT)
  • super-resolution reconstruction at least one of the .
  • Video anti-shake refers to: for example, using block matching method to remove image blur caused by slight shaking during shooting.
  • Style transformation refers to the style transformation of colors, that is, color filters, which change the original image style into other image styles, common styles such as movie style, Japanese style, eerie style, etc.
  • the first back-end processing may include one or more of the above-mentioned processing steps.
  • the order of the multiple processing steps may be adjusted as required. No restrictions are imposed.
  • the first backend processing may further include other steps, which are not limited in this embodiment of the present application.
  • the first back-end processing may also include noise reduction in the YUV domain, so as to denoise the image in the YUV domain. Noise reduction processing.
  • the first back-end processing may also include demosaicing, color space conversion, and YUV domain noise reduction, so that Images in the RAW domain are converted to images in the YUV domain, reducing the amount of data for subsequent processing and saving bandwidth.
  • first back-end processed image and the second back-end processed image are located in the YUV domain.
  • the second back-end processing may be the same as or different from the first back-end processing, and may be specifically set as required, which is not limited in this embodiment of the present application.
  • the wide-angle camera 1933 when used to acquire the first image, due to the different bending capabilities of the lenses in the wide-angle camera 1933 to the colored light, the distance between the imaging point and the optical axis is different, resulting in a different lateral magnification, resulting in actual imaging distorted, distorted. Therefore, it is necessary to perform distortion correction on the first back-end processed image corresponding to the first image to restore it to normal.
  • distortion correction may be performed in a perspective projection manner.
  • the perspective projection method is also called perspective transformation.
  • the back-end processing image contains a book
  • the coordinates of the points corresponding to the 4 corners of the book in the first back-end processing image corresponding to the 3 frames of the first image, and the coordinates of the points corresponding to the 4 corners of the book in the 3 frames of the second image can be determined first.
  • the back-end processes the coordinates of the points corresponding to the four corners of the book in the image, and calculates the transformation matrix of the perspective transformation through two sets of coordinates, and then performs the transformation on the book in the first back-end processing image corresponding to the first three frames of images
  • the transformation of the matrix is used to realize the correction.
  • the corrected image is in the YUV domain.
  • the fusion process can be performed by using the second fusion module.
  • the second fusion module may include a field of view fusion module, configured to realize fusion of images corresponding to different field of view ranges.
  • the corrected image corresponding to the first image is fused with the second back-end processed image corresponding to the second image
  • the corrected image has the same field of view range as the first image
  • the second back-end processed image is the same as the second image.
  • the corresponding field angle ranges are the same, and the field angle ranges corresponding to the fused second fused image are the same as the field angle ranges corresponding to the first image.
  • the back-end fusion module may also include other functional modules, which may be set and changed as required, and this embodiment of the present application does not impose any limitation on this.
  • the back-end fusion module in this embodiment may also be the same as the first front-end fusion module and the second front-end fusion module, both of which are used to fuse images in the YUV domain.
  • the back-end fused image is in the YUV domain.
  • the back-end fused image will be displayed on the interface of the electronic device 100 as a captured image, or only stored, and can be transmitted as required, which is not limited in this embodiment of the present application.
  • Embodiment 2a a shooting method, as shown in (a) of FIG. 9 , the method includes the following S210 to S270.
  • the current shooting mode is the shooting mode, and the scene to be shot is in medium-high illuminance.
  • the current zoom factor belongs to the second zoom factor range [1, 2), thus, it can be determined that the target camera is the main camera 1931 and the black-and-white camera 1932, wherein the black-and-white camera 1932 for the auxiliary camera.
  • the main camera 1931 is used to acquire 6 frames of second images
  • the black and white camera 1932 is used to acquire 2 frames of third images.
  • the numbers of the second image and the third image are only for illustration, and may be acquired according to needs, which is not limited in this embodiment of the present application.
  • the second image is in the RAW domain
  • the second image is a Bayer format image
  • the third image acquired by the black and white camera 1932 is a grayscale image.
  • the field angle range corresponding to the second image is basically the same as the field angle range corresponding to the third image, and the detail richness of the third image is higher than that of the second image.
  • S220 Perform first preprocessing on 6 frames of second images to obtain 6 frames of first preprocessing images in the RAW domain.
  • the first preprocessing may include: at least one of registration, bad pixel correction, RAW domain noise reduction, black level correction, lens shading correction, and automatic white balance.
  • the first preprocessing may include one or more of the above-mentioned processing steps.
  • the order of the multiple processing steps may need to be adjusted, and this embodiment of the present application does not make any adjustments. limit.
  • the first preprocessing may also include other steps, which may be added as needed, which is not limited in this embodiment of the present application.
  • the 6 frames of the first preprocessed image corresponding to the 6 frames of the second image are all located in the RAW domain.
  • the corresponding pre-fusion module includes a multi-frame fusion module in the RAW domain to realize the multi-frame fusion function in the RAW domain. Therefore, the pre-fused image processed by the pre-fused module is still located in the RAW domain.
  • the frequency of using the main camera 1931 and the second zoom range corresponding to the main camera 1931 is relatively high, and the probability is relatively high. Therefore, in order to improve image quality and user experience, the main camera 1931 The acquired second image needs to be processed in the RAW domain to preserve more details.
  • third front-end processing and the fourth front-end processing reference may be made to the content in S120 above, which will not be repeated here.
  • the third front-end processing and the fourth front-end processing may be the same or different, which is not limited in this embodiment of the present application.
  • the third front-end processing includes demosaicing and color space conversion
  • the corresponding third front-end processed image is located in the YUV domain.
  • the third front-end processing does not include demosaicing and color space conversion
  • the pre-fused image corresponding to the second image is processed by the third front-end, the corresponding third front-end processed image is still in the RAW domain.
  • the pre-fused image corresponding to the second image is located in the RAW domain.
  • the third front-end processing for the pre-fused image includes demosaicing and color Space conversion, so that after the pre-fused image is subjected to front-end processing, the corresponding third front-end processed image is located in the YUV domain.
  • the fourth front-end processing for the third image does not include demosaicing and color space conversion. In this way, after the front-end processing is performed on the third image, the corresponding fourth front-end processed image is still a grayscale image.
  • third front-end processing and the fourth front-end processing in this embodiment may be the same as or different from the front-end processing in the foregoing embodiments, and may be specifically set and changed as required, and this embodiment of the present application does not Make any restrictions.
  • the front-end fusion module uses the third front-end fusion module to fuse the fourth front-end processed images corresponding to the two frames of the third image to obtain the third front-end fusion image corresponding to the two frames of the third image.
  • the front-end fusion module also includes: a third front-end fusion module.
  • the third image is a grayscale image
  • demosaicing and color space conversion will not be performed during the fourth front-end processing, so after the third image is processed by the fourth front-end, the corresponding fourth front-end processed image is still grayscale image.
  • the corresponding third front-end fusion module correspondingly includes a multi-frame fusion module located in the YUV domain, so as to realize the multi-frame fusion function of the grayscale image.
  • the third front-end fusion image processed by the third front-end fusion module is also a grayscale image.
  • the third front-end fusion module may be the same as the first front-end fusion module and the second front-end fusion module, and may or may not be the same, and may be specifically set and changed as required, which is not limited in this embodiment of the present application.
  • the third front-end fusion module may also include other functional modules.
  • the multi-frame third image may include a long-exposure third image, a short-exposure third image, and a medium-exposure third image.
  • the fourth front-end processed images corresponding to multiple frames of third images include fourth front-end processed images with different exposure levels.
  • the third front-end fusion module After merging multiple frames of fourth front-end processed images with different exposure levels, the details of dark areas and overexposed areas in the image can be increased, and the dynamic range can be improved, thereby improving the definition of the corresponding third front-end fused image.
  • the back-end processed image corresponding to the second image is located in the YUV domain, and the back-end processed image corresponding to the third image is a grayscale image.
  • the third back-end processing and the fourth back-end processing may be the same or different; in addition, the third back-end processing and the fourth back-end processing in this embodiment are the same as the above-mentioned
  • the back-end processing in the embodiments may be the same or different, and may be specifically set according to needs, which is not limited in this embodiment of the present application.
  • the back-end fusion module can be used for fusion processing. That is to say, the back-end fusion module may include a black-and-white color fusion module for realizing the fusion of images of different colors.
  • the third back-end processed image corresponding to the second image and the fourth back-end processed image corresponding to the third image are fused in black and white to obtain a back-end fused image, which not only retains the color information corresponding to the second image, but also fuses
  • the brightness information corresponding to the third image is obtained, and because the third image has higher definition than the second image, the quality of the image can be improved after fusion, and a back-end fusion image with higher definition can be obtained.
  • the back-end fusion module may also include other functional modules, which may be set and changed as required, and this embodiment of the present application does not impose any limitation on this.
  • back-end fusion module in this embodiment may be the same as or different from the back-end fusion module in the above-mentioned embodiments, and may be set as required, and this embodiment of the present application does not impose any limitation on this.
  • the obtained back-end fused image is in the YUV domain.
  • the back-end fused image will be displayed on the interface of the electronic device as a captured image, or only stored, and can be transmitted as required, which is not limited in this embodiment of the present application.
  • Embodiment 2b a shooting method, as shown in (b) in FIG. 9 , the method includes the following S1401 to S1480.
  • the current shooting mode is the shooting mode, and the scene to be shot is in medium-high illuminance.
  • the current zoom factor belongs to the second zoom factor range [1, 2), thus, it can be determined that the target camera is the main camera 1931 and the black-and-white camera 1932, wherein the black-and-white camera 1932 for the auxiliary camera.
  • S1402. Determine whether the scene to be shot is an HDR scene according to the preview image collected by the camera.
  • HDR High-Dynamic Range
  • HDR scenes include landscapes, scenes in bright and/or low light.
  • the preview image in the current viewfinder window is acquired by the main camera 1931 and sent to the display screen for display.
  • the following manner may be used to determine whether the scene to be shot is an HDR scene.
  • the gray scale value corresponding to each pixel is calculated according to the red, green and blue primary color pixel values corresponding to each pixel in the preview image. It should be understood that the gray scale value is used to represent the brightness corresponding to each pixel.
  • the gray scale value corresponding to the pixel in the preview image can be counted to generate a brightness histogram.
  • the horizontal axis of the brightness histogram is used to represent different gray scale values
  • the vertical axis is used to represent the times corresponding to each gray scale value.
  • the pixels belonging to the low gray scale range can be determined, for example, the first proportion of the pixels with gray scale values in the range of 0 to 5 in the entire preview image; it can also be determined that they belong to the high gray scale range pixels, for example, the second proportion of pixels whose grayscale values are in the range of 245-255 in the entire preview image.
  • the proportion of the pixels in the dark area and the pixels in the bright area in the entire preview image can be judged.
  • the proportion satisfies the preset condition it can be determined that the preview image corresponds to The scene to be shot is an HDR scene.
  • the proportion does not meet the preset condition it is determined that the scene to be shot is not an HDR scene.
  • the main camera 1931 uses the black and white camera 1932 to acquire 2 frames of third images.
  • the 9 frames of second images acquired by the main camera 1931 include the second images exposed in 6 frames, the second images of 1 frame of long exposure and the second images of 2 frames of short exposure.
  • the number of the second image, the number of medium-exposure, short-exposure, and long-exposure images in the second image, and the number of the third image are only for illustration, and can be obtained according to needs. There are no restrictions here.
  • the second image is in the RAW domain
  • the second image is a Bayer format image
  • the third image acquired by the black and white camera 1932 is a grayscale image.
  • the field angle range corresponding to the second image is basically the same as the field angle range corresponding to the third image, and the detail richness of the third image is higher than that of the second image.
  • the first preprocessing may include: at least one of registration, bad pixel correction, RAW domain noise reduction, black level correction, lens shading correction, and automatic white balance.
  • the first preprocessing may include one or more of the above-mentioned processing steps.
  • the order of the multiple processing steps may need to be adjusted, and this embodiment of the present application does not make any adjustments. limit.
  • the first preprocessing may also include other steps, which may be added as needed, which is not limited in this embodiment of the present application.
  • the 6 frames of the first pre-processed images corresponding to the second images exposed in the 6 frames are all located in the RAW domain.
  • the corresponding pre-fusion module includes a multi-frame fusion module in the RAW domain to achieve multi-frame in the RAW domain. fusion function. Therefore, the pre-fused image processed by the pre-fused module is still located in the RAW domain.
  • the pre-fusion module may also include modules with other functions, which is not limited in this embodiment of the present application.
  • the pre-fusion module in this embodiment may be the same as or different from the pre-fusion module in the above-mentioned embodiment 2a, and may be specifically set according to needs, which is not limited in this embodiment of the present application.
  • the main camera 1931 when the user uses the camera application, the frequency and probability of using the main camera 1931 and the second zoom range corresponding to the main camera 1931 are relatively high. Therefore, in order to improve image quality and user experience, the main camera The long-exposure second image, the medium-exposure second image, and the short-exposure second image acquired by the camera 1931 need to be processed in the RAW domain when performing the first preprocessing and fusion processing using the pre-fusion module. To preserve more details and improve the quality of subsequent images.
  • the technical effect of processing an image in the RAW color space described above is also applicable to other embodiments, and will not be repeated here.
  • the corresponding fifth front-end processed image is located in the RGB domain; when the fifth front-end processing performed on the pre-fused image includes demosaicing and color space conversion , the corresponding obtained front-end processed image is located in the YUV domain; when the fifth front-end processing performed on the pre-fused image does not include demosaicing and color space conversion, the corresponding obtained fifth front-end processed image is located in the RAW domain.
  • the corresponding sixth front-end processed image is located in the RGB domain;
  • the corresponding front-end processed image is in the YUV domain;
  • the corresponding sixth front-end processed image is located in the RAW domain.
  • the fifth front-end processing performed on the pre-fused image, the sixth front-end processing performed on the long-exposure second image and the short-exposure second image all include demosaicing,
  • the correspondingly obtained fifth front-end processed image and sixth front-end processed image are both located in the RGB domain and are color images.
  • the seventh front-end processing performed on the third image does not include demosaicing and color space conversion. In this way, after the seventh front-end processing is performed on the third image, the corresponding seventh front-end processed image is still a grayscale image.
  • the obtained pre-fusion image corresponds to the first
  • the fifth front-end processed image is located in the RGB domain
  • the sixth front-end processed image corresponding to the obtained long-exposure second image and short-exposure second image is also located in the RGB domain.
  • the intermediate fusion module correspondingly includes a multi-frame fusion module located in the RGB domain, so as to realize multi-frame fusion of color images with different exposure levels.
  • the intermediate fusion image processed by the intermediate fusion module is also located in the RGB domain and is a color image.
  • the obtained pre-fusion image corresponds to The fifth front-end processed image is located in the YUV domain, and the sixth front-end processed image corresponding to the obtained long-exposure second image and short-exposure second image is also located in the YUV domain.
  • the intermediate fusion module correspondingly includes a multi-frame fusion module located in the YUV domain, so as to realize multi-frame fusion of images located in the YUV domain with different exposure degrees. Therefore, the intermediate fusion image processed by the intermediate fusion module is also located in the YUV domain.
  • the obtained pre-fusion image corresponds to The fifth front-end processed image is located in the RAW domain, and the obtained sixth front-end processed image corresponding to the long-exposure second image and the short-exposure second image is also located in the RAW domain.
  • the intermediate fusion module correspondingly includes a multi-frame fusion module located in the RAW domain, so as to realize multi-frame fusion of images located in the RAW domain with different exposure degrees. Therefore, the intermediate fusion image processed by the intermediate fusion module is also located in the RAW domain.
  • the fifth front-end processed image, the sixth front-end processed image and the seventh front-end processed image all include demosaicing, corresponding to the obtained fifth front-end processed image, sixth front-end processed image and seventh front-end processed image They are all located in the RGB domain and are color images.
  • the intermediate fusion module includes a multi-frame fusion module located in the RGB domain. Therefore, the intermediate fusion image obtained by using the intermediate fusion module is also located in the RGB domain.
  • the intermediate fusion module may also include other functional modules, which may be specifically set and changed according to needs, which is not limited in this embodiment of the present application.
  • the third front-end fused image is a grayscale image
  • the corresponding backend processed image is also a grayscale image.
  • the fifth back-end processing on the intermediate fused image needs to include color space conversion, so that the corresponding fifth back-end processed image is in the YUV domain; when the intermediate fused image is in the YUV
  • the fifth back-end processing on the intermediate fused image does not need to include color space conversion when the intermediate fused image is in the RAW domain; the fifth back-end processing on the intermediate fused image needs to include demosaicing and color space when the intermediate fused image is in the RAW domain convert.
  • the fifth back-end processing on the intermediate fused image needs to include color space conversion, so that the corresponding fifth back-end processed image is in the YUV domain, which is consistent with the format of the sixth back-end processed image corresponding to the third front-end fused image, so as to facilitate subsequent fusion processing.
  • the back-end fusion module can be used for fusion processing. That is to say, the back-end fusion module may include a black-and-white color fusion module for realizing the fusion of images of different colors.
  • the fifth back-end processed image corresponding to the second image and the sixth back-end processed image corresponding to the third image are fused in black and white to obtain a back-end fused image, which not only retains the color information corresponding to the second image, but also fuses
  • the brightness information corresponding to the third image is obtained, and because the third image has higher definition than the second image, the quality of the image can be improved after fusion, and a back-end fusion image with higher definition can be obtained.
  • the back-end fusion module may also include other functional modules, which may be set and changed as required, and this embodiment of the present application does not impose any limitation on this.
  • the back-end fused image is in the YUV domain.
  • the back-end fused image will be displayed on the interface of the electronic device as a captured image, or only stored, and can be transmitted as required, which is not limited in this embodiment of the present application.
  • Embodiment 3 a shooting method, as shown in FIG. 10 , the method includes the following S310 to S350.
  • the current shooting mode is the shooting mode, and the scene to be shot is in medium-high illuminance.
  • the target camera can be determined as the main camera 1931 and the telephoto camera 1934, wherein ,
  • the telephoto camera 1934 is an auxiliary camera.
  • the main camera 1931 is used to acquire 3 frames of second images
  • the telephoto camera 1934 is used to acquire 3 frames of fourth images.
  • the numbers of the second image and the fourth image are only for illustration, and may be acquired according to needs, which is not limited in this embodiment of the present application.
  • both the second image and the fourth image are located in the RAW domain, and both are Bayer format images.
  • the field angle range corresponding to the second image is larger than the field angle image range corresponding to the fourth image, and the definition of the fourth image is higher than that of the second image.
  • the eighth front-end processing includes demosaicing and color space conversion
  • the corresponding eighth front-end processed image is located in the YUV domain.
  • the corresponding ninth front-end processed image is also located in the YUV domain.
  • the eighth front-end processing does not include demosaicing and color space conversion
  • the corresponding eighth front-end processed image is still in the RAW domain.
  • the fourth image is processed by the ninth front-end, the corresponding ninth front-end processed image is still in the RAW domain.
  • the eighth front-end processing and the ninth front-end processing include demosaicing and color space conversion, so that after the second image is subjected to the eighth front-end processing 1.
  • the ninth front-end processing is performed on the third image, the corresponding eighth front-end processed image and the ninth front-end processed image are located in the YUV domain.
  • the eighth front-end processing and the ninth front-end processing may be the same or different, and this embodiment of the present application does not impose any limitation thereto.
  • the eighth front-end processing and the ninth front-end processing provided in this embodiment can be the same as or different from the front-end processing in the above-mentioned embodiments, and can be set and changed as needed, and this embodiment of the present application does not impose any restrictions on this .
  • the front-end fusion module also includes: a fourth front-end fusion module.
  • the eighth front-end processing includes demosaicing and color space conversion
  • the corresponding eighth front-end processed image is located in the YUV domain.
  • the fourth image is processed by the ninth front-end
  • the corresponding ninth front-end processed image is also located in the YUV domain.
  • the second front-end fusion module and the fourth front-end fusion module respectively include a multi-frame fusion module in the YUV domain, so as to realize the multi-frame fusion function in the YUV domain.
  • the second front-end fusion image obtained through the processing of the second front-end fusion module is located in the YUV domain
  • the fourth front-end fusion image obtained through the processing of the fourth front-end fusion module is also located in the YUV domain.
  • the eighth front-end processing does not include demosaicing and color space conversion
  • the corresponding eighth front-end processed image is still in the RAW domain.
  • the fourth image is processed by the ninth front-end
  • the corresponding ninth front-end processed image is still in the RAW domain.
  • the second front-end fusion module and the fourth front-end fusion module respectively include a multi-frame fusion module in the RAW domain, so as to realize the multi-frame fusion function in the RAW domain.
  • the second front-end fusion image processed by the second front-end fusion module is located in the RAW domain
  • the fourth front-end fusion image obtained by the fourth front-end fusion module is also located in the RAW domain.
  • the second front-end fusion module and the fourth front-end fusion module may also include other functional modules.
  • the multi-frame second image may include a long-exposure second image, a short-exposure second image, and a medium-exposure second image
  • the multi-frame fourth image may include a long-exposure fourth image, a short-exposure Fourth image and fourth image of medium exposure.
  • the eighth front-end processed images corresponding to multiple frames of second images include images with different exposure levels
  • the eighth front-end processing image, the ninth front-end processing image corresponding to the multi-frame fourth image includes the ninth front-end processing image with different exposure degrees, based on this, the second front-end fusion module performs multi-frame eighth front-end processing images with different exposure degrees After fusion, the details of the dark area and the overexposed area in the image can be increased, and the dynamic range can be improved, thereby improving the definition of the corresponding second front-end fusion image.
  • the fourth front-end fusion module fuses the multi-frame ninth front-end processing images with different exposure levels, it can increase the details of dark areas and overexposed areas in the image, improve the dynamic range, and thus improve the corresponding ninth front-end fusion Image clarity.
  • the second front-end fusion module and the fourth front-end fusion module in this embodiment may be the same or different; the second front-end fusion module and the fourth front-end fusion module are the same as the first front-end fusion module in the above embodiment , the second front-end fusion module, and the third front-end fusion module may be the same or different, and may be specifically set and changed as required, and this embodiment of the present application does not impose any limitation on this.
  • the seventh back-end processed image corresponding to the second image and the eighth back-end processed image corresponding to the fourth image are both located in the YUV domain.
  • the seventh back-end processing and the eighth back-end processing may be the same or different; in addition, the seventh back-end processing and the eighth back-end processing in this embodiment are the same as the above-mentioned
  • the back-end processing in the embodiment may be the same or different, and may be specifically set as required, which is not limited in this embodiment of the present application.
  • the back-end fusion module may include a field of view fusion module for realizing fusion of images corresponding to different field of view ranges.
  • the field angle range of the second image and the corresponding seventh back-end processed image are the same.
  • the field angle ranges of the four images and their corresponding eighth back-end processed images are the same, and the field angle ranges corresponding to the fused back-end fused images are the same as the field angle ranges corresponding to the second image.
  • the eighth back-end processed image corresponding to the fourth image has a higher definition, which is determined by Therefore, after the seventh back-end processed image corresponding to the second image is fused with the eighth back-end processed image corresponding to the fourth image, the seventh back-end processed image corresponding to the second image will be improved.
  • the corresponding eighth back-end processes the sharpness in the same area of the image as the viewing angle range, so that the sharpness of the image is improved.
  • the back-end fusion module may also include other functional modules, which may be set and changed as required, and this embodiment of the present application does not impose any limitation on this.
  • back-end fusion module in this embodiment may be the same as or different from the back-end fusion module in the foregoing embodiments, and may be specifically set as required, and this embodiment of the present application does not impose any limitation on this.
  • the obtained back-end fused image is in the YUV domain.
  • the back-end fused image will be displayed on the interface of the electronic device as a captured image, or only stored, and can be transmitted as required, which is not limited in this embodiment of the present application.
  • Embodiment 4 a shooting method, as shown in FIG. 11 , the method includes the following S410 to S440.
  • the current shooting mode is the shooting mode, and the scene to be shot is in medium-high illuminance.
  • the current zoom factor is 20
  • the current zoom factor belongs to the fourth zoom factor range [3.x, 100]
  • a telephoto camera is used to acquire 3 frames of fourth images.
  • the number of the fourth images is only for illustration, and may be acquired according to needs, and this embodiment of the present application does not impose any limitation on this.
  • the fourth image is located in the RAW domain and is a Bayer format image.
  • the front-end processing includes demosaicing and color space conversion
  • the corresponding front-end processed image is located in the YUV domain.
  • the front-end processing does not include demosaicing and color space conversion
  • the corresponding front-end processed image is still in the RAW domain.
  • the front-end processing in Embodiment 4 provided by this application includes demosaicing and color space conversion, which can make the image in the subsequent processing be in the YUV domain, reduce the amount of data, and save bandwidth.
  • front-end processing provided in this embodiment may be the same as or different from the front-end processing provided in the foregoing embodiments, and may be specifically set and changed as required, and this embodiment of the present application does not impose any limitation on this.
  • the front-end fusion module also includes: a fourth front-end fusion module.
  • the front-end processing includes demosaicing and color space conversion
  • the fourth front-end fusion module correspondingly includes a multi-frame fusion module in the YUV domain to realize the multi-frame fusion function in the YUV domain, thus, the fourth front-end fusion image obtained by processing the fourth front-end fusion module is also located in the YUV domain .
  • the fourth front-end fusion module correspondingly includes a multi-frame fusion module in the RAW domain, so as to realize the multi-frame fusion function in the RAW domain.
  • the fourth front-end fusion image obtained through the processing of the fourth front-end fusion module is located in the RAW domain.
  • the fourth front-end fusion module may also include other functional modules.
  • the multiple frames of fourth images may include a long-exposure fourth image, a short-exposure fourth image, and a medium-exposure fourth image.
  • the front-end processed images corresponding to multiple frames of fourth images include front-end processed images with different exposure levels.
  • the fourth front-end fusion module combines different exposure levels After the multi-frame front-end processing image is fused, the details of the dark area and the overexposed area in the image can be increased, and the dynamic range can be improved, thereby improving the definition of the corresponding fourth front-end fusion image.
  • the fourth front-end fusion module in this embodiment may be the same as the first front-end fusion module, the second front-end fusion module, the third front-end fusion module, or the fourth front-end fusion module in the foregoing embodiments, or may It is not the same, and it can be set and changed as needed, and this embodiment of the present application does not impose any limitation on this.
  • the back-end processing image corresponding to the fourth image is located in the YUV domain.
  • back-end processing provided in this embodiment may be the same as or different from the back-end processing provided in the foregoing embodiments, and may be specifically set and changed as required, which is not limited in this embodiment of the present application.
  • Embodiment 5 a shooting method, as shown in FIG. 12 , the method includes the following S510 to S540.
  • the current shooting mode is the shooting mode, and the illuminance of the scene to be shot is lower than the preset illuminance threshold, that is, the scene to be shot is in low illuminance.
  • the current zoom factor is 0.5 times
  • the current zoom factor belongs to the first zoom factor range [0.5, 1)
  • the target camera is the wide-angle camera 1933 under low illumination.
  • the wide-angle camera 1933 is used to acquire 5 frames of the first image.
  • the current zoom factor is 2.6 times, the current zoom factor belongs to the third zoom factor range [2, 3.x), and the target camera is the main camera 1931 under low illumination.
  • the main camera 1931 is used to acquire 5 frames of second images.
  • the target camera is a telephoto camera.
  • a telephoto camera is used to acquire 5 frames of fourth images.
  • the numbers of the first image, the second image, and the fourth image are only for illustration, and may be obtained according to needs, and are not limited in this embodiment of the present application.
  • the first image, the second image and the fourth image are all in the RAW domain and are Bayer format images.
  • the above S520 can also be expressed as: performing the second preprocessing on the 5 frames of the first image to obtain the corresponding second preprocessing image in the RAW domain; performing the second preprocessing on the 5 frames of the second image to obtain the corresponding image in the RAW domain The second pre-processing image; the second pre-processing is performed on the 5 frames of the fourth image to obtain the corresponding second pre-processing image in the RAW domain.
  • the second preprocessing provided by this embodiment includes a night scene algorithm module, for example, the night scene algorithm module is generated based on the Unet network model, and can combine multiple frames of the first image, multiple frames of the second image, or multiple frames of the fourth image in the RAW domain Fusion into a corresponding frame of the second preprocessed image in the RAW domain.
  • the night scene algorithm module is generated based on the Unet network model, and can combine multiple frames of the first image, multiple frames of the second image, or multiple frames of the fourth image in the RAW domain Fusion into a corresponding frame of the second preprocessed image in the RAW domain.
  • FIG. 13 shows a schematic structural diagram of a night scene algorithm module provided by an embodiment of the present application.
  • the night scene algorithm module provided by this embodiment includes: a large residual block (super resblock), a downsampling block (split), an upsampling block (subpixel), a splicing layer (contact layer) and a convolutional layer ( Conv).
  • Fig. 14 shows a schematic structural diagram of a large residual block.
  • each large residual block includes multiple convolutional layers, the input and output of different convolutional layers are superimposed, and then the final superimposed output is used as the output of the large residual block.
  • the 5 frames of the first image collected by the telephoto camera 1934 are input from the left side into the first large residual block in the first row for processing to extract image information; then input into the down-sampling block for processing, Split the information of one channel into 4 channels in the way of interlacing rows and columns to obtain more local image information, and then input the first large residual block in the second line for processing; then input the downsampling block and large residual Blocks are processed so that the processing results meet the requirements of image coding.
  • the processing result of the second large residual block in the third row is input into the upsampling block for processing, and the information of the 4 channels is composed into 1 channel in the way of interlacing rows and columns, so that the size can be increased and the image resolution can be improved. rate; use the splicing layer to perform feature splicing on the output of the upsampling block in the third row and the output of the first large residual block in the second row, and then input the second large residual block in the second row for processing.
  • the processing result of the second large residual block in the second row is continuously input into the upsampling block for processing; the output of the upsampling block in the second row is combined with the output of the first large residual block in the first row by using the splicing layer Output for feature splicing; then input the second large residual block in the first row for processing.
  • multiple convolutional layers are input for convolution processing, so as to obtain 1 frame of the second preprocessed image corresponding to the 5 frames of the first image.
  • the front-end processing includes demosaicing and color space conversion, so that the first image, the second image, or the fourth image corresponds to the second preset in the RAW domain.
  • the obtained front-end processed image is in the YUV domain.
  • front-end processing provided in this embodiment may be the same as or different from the front-end processing in the foregoing embodiments, and may be specifically set and changed as required, and this embodiment of the present application does not impose any limitation on this.
  • S540 Perform back-end processing on front-end processed images corresponding to 5 frames of first images, 5 frames of second images, or 5 frames of fourth images to obtain corresponding back-end processed images, where the back-end processed images are captured images.
  • the back-end processed images corresponding to the first image, the second image or the fourth image are all located in the YUV domain.
  • back-end processing provided in this embodiment may be the same as or different from the back-end processing provided in the foregoing embodiments, and may be specifically set and changed as required, which is not limited in this embodiment of the present application.
  • the network model in a low-illumination scene, based on multiple frames of the first image, the second image, or the fourth image, the network model is used to perform multi-frame fusion processing, as well as the above-mentioned other processing, to obtain high-definition, high-quality images. Better image capture.
  • Embodiment 6 a shooting method, as shown in FIG. 15 , the method includes the following S610 to S640.
  • S610 Determine the zoom factor range to which the current zoom factor belongs, and determine the target camera.
  • the first operation of the user is received, and it is determined that the current shooting mode is the video recording mode.
  • the current shooting mode is video recording mode, first determine the current zoom factor. Assuming that the current zoom factor is 0.5 times, the current zoom factor belongs to the first zoom factor range [0.5, 1), and the target camera is the wide-angle camera 1933 .
  • the wide-angle camera 1933 is used to acquire 3 frames of first images.
  • the current zoom factor is 2.6 times, the current zoom factor belongs to the third zoom factor range [2, 3.x), and the target camera is the main camera 1931 under low illumination.
  • the main camera 1931 is used to acquire 3 frames of second images.
  • the target camera is a telephoto camera.
  • a telephoto camera is used to acquire 3 frames of fourth images.
  • the numbers of the first image, the second image, and the fourth image are only for illustration, and may be obtained according to needs, and are not limited in this embodiment of the present application.
  • the first image, the second image and the fourth image are all in the RAW domain and are Bayer format images.
  • the above S620 can also be expressed as: performing the third preprocessing on the 3 frames of the first image to obtain the corresponding third preprocessing image in the RAW domain; performing the third preprocessing on the 3 frames of the second image to obtain the corresponding image in the RAW domain The third pre-processing image; the third pre-processing is performed on the 3 frames of the fourth image to obtain the corresponding third pre-processing image in the RAW domain.
  • the 3 frames of the first image include the first image of the long exposure, the first image of the short exposure and the first image of the medium exposure; the 3 frames of the second image include the second image of the long exposure, the second image of the short exposure and the medium exposure The second image of ; 3 frames of the fourth image include the fourth image of long exposure, the fourth image of short exposure and the fourth image of medium exposure.
  • the third pre-processing provided by the embodiment of the present application includes an HDR algorithm module, for example, the HDR algorithm module is based on long and short exposure fusion processing and a tone mapping model (tone mapping), which can combine multiple frames of the first image with different The second image or the fourth image is fused into one frame of the third preprocessed image in the RAW domain.
  • the HDR algorithm module is based on long and short exposure fusion processing and a tone mapping model (tone mapping), which can combine multiple frames of the first image with different
  • tone mapping model tone mapping
  • FIG. 16 shows a schematic flowchart of obtaining a third pre-processed image by using an HDR algorithm module provided by an embodiment of the present application.
  • FIG. 17 shows the long-exposure first image, the short-exposure first image and the third pre-processed image in FIG. 16 .
  • the first image of medium exposure can be fused with the first image of long exposure to obtain the first intermediate fusion image, and then the intermediate fusion image can be combined with the first image of short exposure
  • the two images are fused to obtain a second intermediate fused image.
  • the first long-exposure image may be registered; before performing fusion with the second short-exposure image, the first short-exposure image may be firstly registered Brightness and registration. Then, input the fused second intermediate fused image into the tone mapping model to perform mapping transformation processing on the color of the second intermediate fused image, thereby obtaining a third preprocessed image (as shown in (c) in FIG. 17 Show).
  • the tone mapping model may be any one of Unet network model, Resnet network model and Hdrnet network model.
  • the tone mapping model may also be another model, which is not limited in this embodiment of the present application.
  • the details of underexposed dark areas in the medium-exposure first image can be improved, while the fusion of the short-exposure first image Fusion, which improves detail in the bright areas of the first image at medium exposure. Therefore, performing long-short exposure fusion processing on the first medium-exposure image can simultaneously improve the details of dark regions and bright regions in the first medium-exposure image, improve the dynamic range, and achieve the purpose of improving image clarity.
  • the front-end processing includes demosaicing and color space conversion, so that the first image, the second image, or the fourth image corresponds to the third preset in the RAW domain.
  • the obtained front-end processed image is in the YUV domain.
  • front-end processing provided in this embodiment may be the same as or different from the front-end processing in the foregoing embodiments, and may be specifically set and changed as required, and this embodiment of the present application does not impose any limitation on this.
  • S640 Perform back-end processing on the front-end processed image to obtain a corresponding back-end processed image, where the back-end processed image is a captured image.
  • the back-end processed image corresponding to the first image, the second image or the fourth image is located in the YUV domain.
  • back-end processing provided in this embodiment may be the same as or different from the back-end processing provided in the foregoing embodiments, and may be specifically set and changed as required, which is not limited in this embodiment of the present application.
  • the HDR algorithm module in the video recording mode, based on multiple frames of the first image, the second image or the fourth image, the HDR algorithm module is used to perform fusion processing of multiple frames of images with different exposures, as well as the above-mentioned other processing, which can be fused to obtain Capture images with higher definition and better quality.
  • One of the electronic devices 100 can be selected for use alone, or multiple can be used together, and can be specifically set and adjusted according to needs, which is not limited in this embodiment of the present application.
  • the general user before using the photo mode to take pictures, that is, when previewing pictures, or before using video mode to record videos, that is, when performing video previews, the general user usually zooms first (that is, adjusts the focal length), and then Shoot again. In addition, zooming may also be performed during video recording.
  • the application provides an electronic device including multiple cameras (multi-shot), and the multiple cameras include: wide-angle camera 1933, main camera 1931 , black and white camera 1932 and telephoto camera 1934.
  • Each camera corresponds to a certain range of zoom factors.
  • the electronic device can control the camera to switch from the camera A corresponding to the zoom factor range a to the camera B corresponding to the zoom factor range b, The relay zoom is realized, so that the overall coverage of the zoom factor of the electronic device is wider.
  • the embodiment of the present application provides a multi-camera zoom method (spatial alignment transform, SAT), which can not only realize relay zoom, but also start in advance and run the target in the background before the zoom is switched to the target zoom range.
  • SAT spatial alignment transform
  • the camera corresponding to the zoom multiple range makes the camera only need to switch from the background running state to the foreground sending display state when the zoom is switched, the change is small, and the switching is smoother.
  • This embodiment can be implemented in conjunction with any of the foregoing embodiments or a combination of multiple embodiments.
  • the multi-camera zooming method provided in the embodiment of the present application is introduced below.
  • An embodiment of the present application provides a multi-camera zooming method, which is applied to an electronic device 100 including a plurality of cameras, and the plurality of cameras include: a wide-angle camera 1933 , a main camera 1931 , a monochrome camera 1932 and a telephoto camera 1934 .
  • each camera is applicable to a certain range of zoom factors, and the ranges of zoom factors corresponding to each camera may be different or overlapping, which may be selected according to needs, and this embodiment of the present application does not impose any limitation on this.
  • the multi-camera zooming method provided in the embodiment of the present application includes:
  • the first target camera corresponding to the Nth zoom factor range is different from the first target camera corresponding to the N+1 zoom factor range, from the Nth zoom factor range to the N+th zoom factor range
  • the first target camera corresponding to the Nth zoom multiple range is switched from the foreground display state to the off state or the background running state
  • the second target camera corresponding to the N+1 zoom multiple range is from the background running state Switch to the state of displaying in the foreground.
  • N is a positive integer.
  • the Nth zoom factor When the first target camera corresponding to the Nth zoom factor range is the same as the first target camera corresponding to the N+1 zoom factor range, when zooming from the Nth zoom factor range to the N+1 zoom factor range, the Nth zoom factor The first target camera corresponding to the range maintains the foreground sending display state.
  • each zoom range corresponds to a first target camera
  • the first target camera is one of the wide-angle camera 1933 , the main camera 1931 , the monochrome camera 1932 and the telephoto camera 1934 .
  • the display status in the foreground indicates that the camera collects images and the collected images are used for display
  • the background running status indicates that the camera collects images but the collected images are not used for display, for example, they are only stored for backup.
  • the off state indicates that the camera is not capturing images.
  • the camera running in the background may also be referred to as an auxiliary camera with a corresponding variable zoom range.
  • the first target camera corresponding to each zoom factor range is one of the cameras applicable to the zoom factor range.
  • the first target cameras corresponding to the multiple zoom ranges may be the same or different, and the corresponding relationship is specifically set according to the divided zoom ranges and the zoom range of the camera itself, which is not limited in this embodiment of the present application.
  • the zoom factor range applicable to the first target camera itself corresponding to the Nth zoom factor range should be greater than or equal to the Nth zoom factor range, so that after the switch, the state of sending display from the foreground can be switched to the background running state to continue to use or switch to Disabled.
  • the zoom factor range of the first target camera corresponding to the N+1th zoom factor range is greater than the N+1 zoom factor range, so that it can start running in the background without switching to the N+1th zoom factor range.
  • the first target camera corresponding to the zoom range is always in the foreground display state, and no switching will occur, that is to say, the first target The camera is collecting images and transmitting them to the viewfinder window 60 for display.
  • the first target camera corresponding to the N+1th zoom factor range is converted from the background running state to the foreground sending display state, indicating that the zoom is within the Nth zoom factor range, and when the zoom switch point is not reached, the Nth The first target camera corresponding to the +1 zoom range has been called to run in the background.
  • the timing of calling that is, when the first target camera corresponding to the N+1th zoom range is called when zooming to a multiple within the Nth zoom range, it can be set and changed according to needs and the applicable range of the camera. This application implements The example does not limit this.
  • the current zoom factor is determined. Assuming zooming from small to large, when the current zoom factor belongs to the Nth zoom factor range, when zooming to the minimum zoom factor of the Nth zoom factor range, determine the first target camera corresponding to the Nth zoom factor range and the N+1th zoom factor Whether the first target camera corresponding to the multiple range is the same, if not, start calling the first target camera corresponding to the N+1 zoom multiple range to run in the background at the minimum zoom multiple of the Nth zoom multiple range; or, at When zooming to a preset zoom factor in the Nth zoom factor range, start calling the first target camera corresponding to the N+1th zoom factor range to run in the background.
  • preset zoom factor may be set and changed as required, which is not limited in this embodiment of the present application.
  • when zooming during photo preview, video recording or video preview first determine the current zoom factor, and then determine the current zoom factor range to which the current zoom factor belongs according to the current zoom factor, for example, the first m zoom factor range; then, respectively determine the maximum value and the minimum value of the current zoom factor range, and determine the absolute value of the difference between the maximum value and the current zoom factor, which is the first difference; determine the difference between the minimum value and the current zoom factor The absolute value of the value, which is the second difference.
  • the switching condition can be set as: when the calculated first difference is smaller than the second difference, determine the current Whether the zoom factor range is the same as the first target camera corresponding to the m+1 zoom factor range, if not, start the first target camera corresponding to the m+1 zoom factor range to run in the background; if the first difference is greater than the first
  • the second difference indicates that the current zoom factor is close to the minimum value of the current zoom factor range. Therefore, the switching condition can be set as: when the first difference value is calculated to be greater than the second difference value, determine the first zoom factor corresponding to the current zoom factor range. Whether the target camera is the same as the first target camera corresponding to the m-1 zoom multiple range, if not, start the first target camera corresponding to the m-1 zoom multiple range for background operation.
  • the zoom in the Nth zoom multiple range starts to call the first target camera corresponding to the N+1 zoom multiple range to start, and when running in the background,
  • the first target camera corresponding to the N+1th zoom factor range may be synchronized with the first target camera corresponding to the Nth zoom factor range. For example, keep the brightness information, color information, focus point, field of view center, etc. of the two cameras consistent. In this way, when zooming to the N+1 zoom range, the preview image will not have problems such as sudden changes and jumps, and the switching will be smoother and smoother, so that the user can hardly perceive the change, thereby effectively improving the user experience.
  • FIG. 18 shows a schematic diagram of changes in the angle of view when multi-camera zoom is switched.
  • the camera Cn corresponding to the nth zoom range starts, and as the zoom increases, the field of view range gradually decreases.
  • the field angle range of the camera Cn gradually narrows from the area a shown in the figure.
  • the present application provides a camera Cn+1 with a larger zoom factor range, and its corresponding maximum field of view range is, for example, area b in the figure.
  • its corresponding maximum field of view range is, for example, area b in the figure.
  • the camera Cn and the camera Cn+1 are synchronously processed so that the parameters of the two are consistent. Then, when the area c is reached, the camera Cn+1 starts from The background running state is converted to the foreground sending display state. Therefore, the camera Cn+1 is prepared in advance, and the camera Cn is shrunk to area c at the same time, which can make the switching when reaching area c smoother, so that the user can hardly perceive the change , thereby effectively improving the user experience.
  • the present application provides a camera Cn+2 with a larger zoom coverage range, and its corresponding maximum field of view range is, for example, the area d in the figure.
  • its corresponding maximum field of view range is, for example, the area d in the figure.
  • the camera Cn+1 and the camera Cn+2 are synchronously processed so that the parameters of the two are consistent, and then, when the area d is reached, the camera Cn+ 2.
  • the camera Cn+2 is prepared in advance, and the camera Cn+1 is narrowed to the area d at the same time, which can make the switching more smooth when reaching the area d, so that the user hardly perceives the change, thereby effectively improving the user experience.
  • the zooming process includes more zoom switching points, the switching of the camera is started in advance and runs in the background as described above, so as to realize relay zooming, so that the overall coverage of the zoom factor of the electronic device is wider and the switching is smoother.
  • the electronic device uses a zoom factor range division method, that is to say, the zoom factor range division method corresponding to the camera mode and the camera preview is the same. Based on this, when in the camera mode, the current zoom factor belongs to a certain zoom factor range, and a corresponding camera is required to acquire images, this camera is the first target camera to acquire images when taking pictures and previewing.
  • this application uses one camera as the first target camera when taking pictures and previewing, so that it is in the foreground sending display state, while the other one camera When taking pictures and previewing, it acts as an auxiliary camera and enters the background running state at the same time.
  • the speed of acquiring captured images is faster, and the user's experience in taking pictures is better.
  • the first target camera corresponding to the N+1th zoom range is another camera that acquires images required for taking pictures in the Nth zoom range.
  • the multi-camera zoom switching method on the basis of relay zooming implemented by multiple cameras, in the case that two adjacent zoom multiple ranges correspond to different first target cameras, zooming backward from the previous zoom multiple range
  • the first target camera corresponding to the latter zoom multiple range does not switch from off to on, but from the background running state to the foreground displaying state.
  • the first target camera has been started in advance, so when switching, no It will freeze.
  • the two cameras have been synchronized within the previous zoom range, when switching, there will be no sudden changes or jumps in the preview image, and the switching will be smoother and smoother.
  • the first target camera corresponding to the previous zoom multiple range remains in the foreground display state, thus, the camera will not perform the action of turning off and on again, thus , does not affect the picture, and there will be no lag.
  • the above method further includes:
  • the second target camera corresponding to the N zoom multiple range is running in the background.
  • the second target camera corresponding to the Nth zoom range is different from the first target camera.
  • the Nth zoom range when the Nth zoom range is the same as the first target camera corresponding to the N+1 zoom range, when taking pictures in the Nth zoom range, if two corresponding cameras need to obtain image, you also need to set the second target camera.
  • the type and number of the second target cameras corresponding to the Nth zoom multiple range can be set and changed as required, and this embodiment of the present application does not impose any limitation on this.
  • the application starts to call the first target camera when zooming in the Nth zoom multiple range during the photo preview.
  • Second target camera keep it running in the background. Therefore, when the user triggers the shooting key 50 to take a picture, the response speed of acquiring the captured image is faster, and the user's experience in taking pictures is better.
  • the current zoom factor is determined. Assuming zooming from small to large, when the current zoom factor belongs to the Nth zoom factor range, when zooming to the minimum zoom factor of the Nth zoom factor range, determine the first target camera corresponding to the Nth zoom factor range and the N+1th zoom factor Whether the first target cameras corresponding to the multiple ranges are the same, if they are the same, when zooming to the minimum zoom multiple of the Nth zoom multiple range, the second target camera corresponding to the Nth zoom multiple range enters the background operation state. Or, when zooming to a preset zoom factor in the Nth zoom factor range, start calling the second target camera corresponding to the Nth zoom factor range for background operation.
  • when zooming in the photo preview process first determine the current zoom factor, and then determine the current zoom factor range to which the current zoom factor belongs according to the current zoom factor, for example, the mth zoom factor range ; Then, respectively determine the maximum value and the minimum value of the current zoom factor range, and determine the absolute value of the difference between the maximum value and the current zoom factor, which is the first difference; determine the absolute value of the difference between the minimum value and the current zoom factor , is the second difference.
  • the switching condition can be set as: when the calculated first difference is smaller than the second difference, determine the current Whether the zoom factor range is the same as the first target camera corresponding to the m+1 zoom factor range, if they are the same, start the second target camera corresponding to the m zoom factor range to run in the background; if the first difference is greater than the second difference value, indicating that the current zoom factor is close to the minimum value of the current zoom factor range.
  • the switching condition can be set as: when the calculated first difference is greater than the second difference, determine the first target camera corresponding to the current zoom factor range Whether the first target camera corresponding to the m-1th zoom range is the same, and if they are the same, start the second target camera corresponding to the mth zoom range to run in the background.
  • the zoom factor included in the Nth zoom factor range is smaller than the zoom factor included in the N+1 zoom factor range; or, the zoom factor included in the Nth zoom factor range is greater than the zoom factor included in the N+1 zoom factor range multiple.
  • the zoom factor included in the Nth zoom factor range is smaller than the zoom factor contained in the N+1 zoom factor range, that is, as N increases, the zoom factor increases.
  • the zoom factor included in the Nth zoom factor range is greater than the zoom factor included in the N+1 zoom factor range, that is, as N increases, the zoom factor decreases.
  • the first target camera corresponding to the target zoom factor range can be started in advance and run in the background, so that when the zoom is switched , the first target camera only needs to change from the background running state to the foreground sending display state, the change is small, and the switching is smoother.
  • the zoom factor range corresponding to the electronic device is set to [0.5, 100].
  • the zoom factor range is divided into four zoom factor ranges, and the value of N is one to four, that is, the four zoom factor ranges are respectively the first zoom factor range, the second zoom factor range, the third zoom factor range and the fourth zoom factor range magnification range, and the zoom magnification included in the four zoom magnification ranges increases sequentially.
  • the first zoom factor range F1 is [0.5,1)
  • the second zoom factor range F2 is [1,2)
  • the third zoom factor range F3 is [2,3.x)
  • the fourth zoom factor range Range F4 is [3.x,100]. It should be understood that, here, each number is only for illustration, which can be set and changed as required, and is not limited in this embodiment of the present application.
  • the zoom factor range of the wide-angle camera 1933 is [0.5,1.2]
  • the zoom factor range of the main camera 1931 is [0.5,10]
  • the zoom factor range of the black and white camera 1932 is [0.9,2.1)
  • the telephoto The zoom range of the camera 1934 is [2,100].
  • the first target camera corresponding to the first zoom multiple range is set to be the wide-angle camera 1933
  • the first target cameras corresponding to the second zoom multiple range and the third zoom multiple range are both the main camera 1931
  • the second zoom multiple range is the main camera 1931.
  • the corresponding second target camera is a black and white camera 1932
  • the first target camera corresponding to the fourth zoom range is a telephoto camera 1934 .
  • FIG. 19 is a schematic diagram of an interface for zooming during photo preview provided by an embodiment of the present application.
  • FIG. 20 and FIG. 21 respectively show a schematic diagram of a process of multi-camera zooming during photo preview provided by an embodiment of the present application.
  • the electronic device 100 displays a shooting interface as shown in (a) in FIG. 19 .
  • the shooting key 50 indicates that the current shooting mode is the shooting mode.
  • the shooting interface also includes a viewfinder window 60, which can be used to display a preview image before taking pictures in real time.
  • a zoom option 61 is also displayed in the shooting interface. The user can select the zoom factor of the current photo taking in the zoom option 61, for example, 0.5 times, 2 times or 50 times.
  • the preview image may be enlarged or reduced according to the currently selected zoom factor.
  • zoom option 61 displayed in the preview image may be in the form of a list, or may also be in the form of a slider, a disc, etc., so as to facilitate adjustment by the user.
  • FIG. 19 is only an example, and the present application does not impose any limitation on this.
  • Embodiment 7 a multi-camera zooming method, the method includes:
  • the wide-angle camera 1933 corresponding to the first zoom multiple range is in the foreground display state, and the acquired image is sent to to display on the display screen; and the main camera 1931 corresponding to the second zoom range F2 has started to enter the background operation state at the minimum zoom range of the first zoom range F1.
  • the main camera 1931 is an auxiliary camera.
  • 1X is the first zoom switching point.
  • the main camera 1931 corresponding to the second zoom multiple range F2 relays the zoom, switches from the background running state to the foreground sending display state, and sends the acquired image to the display screen for display; and the first The wide-angle camera 1933 corresponding to the zoom factor range F1 will switch from the display state in the foreground to the closed state; in addition, since the second target camera corresponds to the second zoom factor range, the second target camera will start to run in the background from the first zoom switching point state.
  • the main camera 1931 When zooming in the second zoom range F2, the main camera 1931 is in the foreground sending display state, and the acquired image is sent to the display screen for display, and the black and white camera 1932 is in the background running state. In this stage, the black and white camera 1932 is an auxiliary camera.
  • the main camera 1931 When zooming from the second zoom range F2 to the third zoom range F3, since the first target camera corresponding to the third zoom range F3 is still the main camera 1931, the main camera 1931 does not need to be switched, the main camera The camera 1931 can maintain the display status in the foreground.
  • the black-and-white camera 1932 is switched from the background running state to the closed state.
  • the main camera 1931 When zooming in the third zoom range F3, the main camera 1931 is in the foreground display state, and the acquired image is sent to the display screen for display, and the telephoto camera 1934 corresponding to the fourth zoom range F4 is in the third zoom range.
  • the telephoto camera 1934 At the minimum zoom factor of range F3, it has started to run in the background. In this stage, the telephoto camera 1934 is an auxiliary camera.
  • 3.xX is the second zoom switching point.
  • the telephoto camera 1934 corresponding to the fourth zoom factor range F4 relays the zoom, and switches from the background running state to the foreground sending display state, and sends the acquired image to the display screen for display; and the third zoom The main camera 1931 corresponding to the multiple range F3 will switch from the foreground displaying state to the background running state or the closed state (not shown in the figure).
  • the main camera 1931 due to the limited focal length of the main camera 1931, after switching to the background running state, as the zoom factor continues to increase, it may not be applicable. Therefore, for example, when zooming to the fourth zoom factor range At 10X in the middle, the main camera 1931 switches from the background running state to the closed state. When zooming between the second zoom switching point and 10X, the main camera 1931 is an auxiliary camera.
  • Embodiment 8 a multi-camera zooming method, the method includes:
  • the telephoto camera 1934 corresponding to the fourth zoom multiple range F4 is in the foreground display state, and will obtain The image is sent to the display screen for display; while the main camera 1931 corresponding to the third zoom range F3 is running in the background.
  • the main camera 1931 due to the limited focal length of the main camera 1931, it cannot be applied when the zoom factor is large.
  • the main camera 1931 is switched from the off state to the background running state.
  • the main camera 1931 is an auxiliary camera.
  • 3.xX is the first zoom switching point.
  • the main camera 1931 corresponding to the third zoom multiple range F3 relays the zoom, switches from the background running state to the foreground sending display state, and sends the acquired image to the display screen for display; while the fourth zoom The telephoto camera 1934 corresponding to the multiple range F4 is switched from the foreground zoom display state to the background operation state.
  • the main camera 1931 When zooming in the third zoom range F3, the main camera 1931 is in the foreground display state, and the acquired image is sent to the display screen for display, and the telephoto camera 1934 corresponding to the fourth zoom range F4 is in the third zoom range.
  • the telephoto camera 1934 At a preset zoom factor within the range F3, for example, at 2X, the state of running in the background is switched to an off state. In this stage, the telephoto camera 1934 is an auxiliary camera.
  • the main camera 1931 When zooming from the third zoom range F3 to the second zoom range F2, since the first target camera corresponding to the second zoom range F3 is still the main camera 1931, the main camera 1931 does not need to be switched, the main camera The camera 1931 can maintain the display status in the foreground.
  • the black-and-white camera 1932 is switched from the closed state to the background running state.
  • the main camera 1931 When zooming within the second zoom range, the main camera 1931 is in the foreground sending display state, and the acquired image is sent to the display screen for display, and the black and white camera 1932 is in the background running state. In this stage, the black and white camera 1932 is an auxiliary camera.
  • 1X is the second zoom switching point.
  • the wide-angle camera 1933 corresponding to the first zoom multiple range F1 relays the zoom, switches from the closed state to the foreground sending display state, and sends the acquired image to the display screen for display; while the second zoom multiple range
  • the corresponding main camera 1931 will switch from the foreground sending display state to the background running state; in addition, the second target camera corresponding to the second zoom multiple range, that is, the black and white camera 1932 will switch from the background running state to the off state at the second zoom switching point .
  • the wide-angle camera 1933 corresponding to the first zoom multiple range F1 is in the foreground display state, and the acquired image is sent to the display screen for display; the main camera 1931 corresponding to the second zoom multiple range F2 It is running in the background.
  • the main camera 1931 is an auxiliary camera.
  • the electronic device 100 generally allows two cameras to operate simultaneously, when zooming from the second zoom range F2 to the first zoom range F1, since the second zoom range F2 corresponds to The first target camera and the second target camera, that is, the main camera 1931 and the black and white camera 1932 are already running, so the wide-angle camera 1933 corresponding to the first zoom range F1 cannot enter the background running state, but is only in the off state.
  • the wide-angle camera 1933 corresponding to the first zoom multiple range F1 relays the zoom, switches from the background running state to the foreground sending display state, and sends the acquired image to the display screen for display.
  • the wide-angle camera 1933 can switch from the closed state to the background running state from the maximum value of the second zoom range, 2X.
  • the wide-angle camera 1933 can also start from the closed state to the background running state from a certain preset zoom ratio in the second zoom ratio range.
  • the present application also provides the following embodiments:
  • FIG. 22 is a schematic diagram of an interface for previewing video or zooming in video according to an embodiment of the present application.
  • FIG. 23 and FIG. 24 respectively show a schematic diagram of a recording preview or a process of multi-camera zooming during recording provided by an embodiment of the present application.
  • the electronic device 100 displays a shooting interface as shown in (a) in FIG. 22 .
  • the shooting key 50 indicates that the current shooting mode is video recording mode.
  • the shooting interface also includes a viewfinder window 60, and the viewfinder window 60 can be used to display a preview image before recording in real time or display a recording picture during recording.
  • a zoom option 61 is also displayed on the preview image or video recording screen. The user can select the zoom factor of the current video in the zoom option 61, for example, 0.5 times, 2 times or 50 times.
  • the preview image or video image can be enlarged or reduced according to the currently selected zoom factor.
  • Embodiment 9 a multi-camera zooming method, the method includes:
  • the wide-angle camera 1933 corresponding to the first zoom multiple range is in the foreground display state, and will obtain The image is sent to the display screen for display; while the main camera 1931 corresponding to the second zoom factor range F2 is activated in advance at the preset zoom factor in the first zoom factor range F1, for example, the main camera 1931 is turned off at 0.7X The state transitions to the background running state.
  • the main camera 1931 is an auxiliary camera.
  • 1X is the first zoom switching point.
  • the main camera 1931 corresponding to the second zoom multiple range F2 relays the zoom, switches from the background running state to the foreground sending display state, and sends the acquired image to the display screen for display; and the first The wide-angle camera 1933 corresponding to the zoom factor range F1 will switch from the state of displaying in the foreground to the closed state.
  • the main camera 1931 When zooming in the second zoom range F2, the main camera 1931 is in the foreground sending display state, and the acquired image is sent to the display screen for display.
  • the main camera 1931 When zooming from the second zoom range F2 to the third zoom range F3, since the first target camera corresponding to the third zoom range F3 is still the main camera 1931, the main camera 1931 does not need to be switched, the main camera The camera 1931 can maintain the display status in the foreground.
  • the main camera 1931 When zooming in the third zoom range F3, the main camera 1931 is in the foreground display state, and the acquired image is sent to the display screen for display, and the telephoto camera 1934 corresponding to the fourth zoom range F4 is in the third zoom range.
  • the preset zoom factor in the range F3 is activated in advance, for example, the telephoto camera 1934 is switched from the off state to the background operation state at 2.8X.
  • the telephoto camera 1934 is an auxiliary camera.
  • 3.xX is the second zoom switching point.
  • the telephoto camera 1934 corresponding to the fourth zoom factor range F4 takes over the zooming, switches from the background running state to the foreground displaying state, and sends the acquired image to the display screen for display; and the third The main camera 1931 corresponding to the zoom factor range F3 is switched from the foreground display state to the background running state or the closed state (not shown in the figure).
  • the main camera 1931 due to the limited focal length of the main camera 1931, it may not be applicable as the zoom factor continues to increase after switching to the background running state. Therefore, for example, when zooming to the fourth zoom factor range At 10X in the middle, the main camera 1931 switches from the background running state to the closed state. When zooming between the second zoom switching point and 10X, the main camera has 1931 auxiliary cameras.
  • Embodiment 10 a multi-camera zooming method, the method includes:
  • the telephoto camera 1934 corresponding to the fourth zoom range F4 is in the foreground display state , to send the acquired graphics to the display screen for display; and the main camera 1931 corresponding to the third zoom range F3 is running in the background.
  • the main camera 1931 due to the limited focal length of the main camera 1931, it cannot be applied when the zoom factor is large.
  • the main camera 1931 is switched from the off state to the background running state.
  • the main camera 1931 is an auxiliary camera.
  • 3.xX is the first zoom switching point.
  • the main camera 1931 corresponding to the third zoom multiple range F3 relays the zoom, switches from the background running state to the foreground sending display state, and sends the acquired image to the display screen for display; while the fourth zoom The telephoto camera 1934 corresponding to the multiple range F4 is switched from the foreground zoom display state to the background operation state.
  • the main camera 1931 When zooming in the third zoom range F3, the main camera 1931 is in the foreground display state, and the acquired image is sent to the display screen for display, and the telephoto camera 1934 corresponding to the fourth zoom range F4 is in the third zoom range.
  • the preset zoom factor of the range F3 for example, at 2.8X, the background running state is switched to the off state.
  • the telephoto camera 1934 is an auxiliary camera.
  • the main camera 1931 When zooming from the third zoom range F3 to the second zoom range F2, since the first target camera corresponding to the second zoom range F3 is still the main camera 1931, the main camera 1931 does not need to be switched, the main camera The camera 1931 can maintain the display status in the foreground.
  • the main camera 1931 When zooming within the second zoom range, the main camera 1931 is in the foreground sending display state, and sends the acquired image to the display screen for display.
  • 1X is the second zoom switching point.
  • the wide-angle camera 1933 corresponding to the first zoom multiple range F1 relays the zoom, switches from the closed state to the foreground sending display state, and sends the acquired image to the display screen for display; while the second zoom multiple range The corresponding main camera 1931 will switch from the foreground sending display state to the background running state.
  • the wide-angle camera 1933 corresponding to the first zoom multiple range F1 is in the foreground display state, and the acquired image is sent to the display screen for display; the main camera 1931 corresponding to the second zoom multiple range F2 It is running in the background. Based on this, the main camera 1931 corresponding to the second zoom factor range F2 is switched from the background running state to the off state at the preset zoom factor within the first zoom factor range F1, for example, 0.7X.
  • the main camera 1931 is an auxiliary camera.
  • 1X is the first zoom switch point.
  • the main camera 1931 corresponding to the second zoom multiple range F2 relays the zoom, switches from the background running state to the foreground sending display state, and sends the acquired image to the display screen for display; and the first The wide-angle camera 1933 corresponding to the zoom multiple range F1 will switch from the state of displaying in the foreground to the state of running in the background.
  • the wide-angle camera 1933 due to the limited focal length of the wide-angle camera 1933, it may not be applicable as the zoom factor continues to increase after switching to the background running state, thus, for example, when zooming to the second zoom factor range At 1.2X, the wide-angle camera 1933 switches from the background running state to the closed state.
  • the wide-angle camera 1933 is an auxiliary camera.
  • the main camera 1931 when zooming from large to small, when zooming within the second zoom range, the main camera 1931 is in the foreground sending display state, and sends the acquired image to the display screen for display.
  • the wide-angle camera 1933 corresponding to the first zoom factor range will enter the background operation state at the preset zoom factor within the second zoom factor range, for example, at 1.2X.
  • 1X is the second zoom switching point.
  • the wide-angle camera 1933 corresponding to the first zoom factor range F1 relays the zoom, switches from the background running state to the foreground sending display state, and sends the acquired image to the display screen for display; and the second zoom factor
  • the main camera 1931 corresponding to the range will switch from the foreground sending display state to the background running state.
  • the wide-angle camera 1933 is an auxiliary camera.
  • the multi-camera zooming method provided in the embodiment of the present application is described in detail above, and the shooting methods in other modes provided in the embodiment of the present application will be introduced one by one below.
  • Fig. 25 shows a schematic interface diagram of another electronic device provided by the embodiment of the present application.
  • the electronic device displays a shooting interface as shown in (a) in FIG. 25 , and the shooting key 50 indicates "more”. Based on this, as shown in (b) of FIG. 25 , in response to the user's click operation, the current shooting mode is switched to the HDR mode.
  • FIG. 26 shows a schematic flow chart of a shooting method in HDR mode provided by an embodiment of the present application. As shown in FIG. 26, the method includes the following steps S710 to S740.
  • the current shooting mode is the HDR mode
  • first determine the current zoom factor Assuming that the current zoom factor is 0.5X, the current zoom factor belongs to the first zoom factor range [0.5, 1), and the target camera is the wide-angle camera 1933 . Exemplarily, the wide-angle camera 1933 is used to acquire 3 frames of first images.
  • the current zoom factor is 2.6X
  • the current zoom factor belongs to the third zoom factor range [2, 3.x)
  • the target camera is the main camera 1931 under low illumination.
  • the main camera 1931 is used to acquire 3 frames of second images.
  • the current zoom factor belongs to the fourth zoom factor range [3.x, 100], and the target camera is a telephoto camera under low illumination.
  • a telephoto camera is used to acquire 3 frames of fourth images.
  • the numbers of the first image, the second image, and the fourth image are only for illustration, and may be obtained according to needs, and are not limited in this embodiment of the present application.
  • the first image, the second image and the fourth image are all in the RAW domain and are Bayer format images.
  • the above S620 can also be expressed as: performing the third preprocessing on the 3 frames of the first image to obtain the corresponding third preprocessing image in the RAW domain; performing the third preprocessing on the 3 frames of the second image to obtain the corresponding image in the RAW domain The third pre-processing image; the third pre-processing is performed on the 3 frames of the fourth image to obtain the corresponding third pre-processing image in the RAW domain.
  • the 3 frames of the first image include the first image of the long exposure, the first image of the short exposure and the first image of the medium exposure; the 3 frames of the second image include the second image of the long exposure, the second image of the short exposure and the medium exposure The second image of ; 3 frames of the fourth image include the fourth image of long exposure, the fourth image of short exposure and the fourth image of medium exposure.
  • the third pre-processing provided by the embodiment of the present application includes an HDR algorithm module, for example, the HDR algorithm module is based on long and short exposure fusion processing and a tone mapping model (tone mapping), which can combine multiple frames of the first image with different The second image or the fourth image is fused into one frame of the third preprocessed image in the RAW domain.
  • the HDR algorithm module is based on long and short exposure fusion processing and a tone mapping model (tone mapping), which can combine multiple frames of the first image with different
  • tone mapping model tone mapping
  • the front-end processing includes demosaicing and color space conversion, so that the first image, the second image, or the fourth image corresponds to the third preset in the RAW domain.
  • the obtained front-end processed image is in the YUV domain.
  • front-end processing provided in this embodiment may be the same as or different from the front-end processing in the foregoing embodiments, and may be specifically set and changed as required, and this embodiment of the present application does not impose any limitation on this.
  • the back-end processed image corresponding to the first image, the second image or the fourth image is located in the YUV domain.
  • back-end processing provided in this embodiment may be the same as or different from the back-end processing provided in the foregoing embodiments, and may be specifically set and changed as required, which is not limited in this embodiment of the present application.
  • the HDR algorithm module in the HDR mode, based on multiple frames of the first image, the second image or the fourth image, the HDR algorithm module is used to perform fusion processing of multiple frames of images with different exposures, as well as the above-mentioned other processing, which can be fused to obtain Capture images with higher definition and better quality.
  • Fig. 27 shows a schematic interface diagram of another electronic device provided by the embodiment of the present application.
  • the electronic device in response to the user's sliding operation, displays a shooting interface as shown in FIG. 27 , and the shooting key 50 indicates that the current shooting mode is the large aperture mode.
  • FIG. 28 shows a schematic flowchart of a shooting method in a large aperture mode provided by the embodiment of the present application. As shown in FIG. 28 , the method includes the following S810 to S860.
  • the numbers of the second image and the third image are only for illustration, and they can be acquired according to needs, which is not limited in this embodiment of the present application.
  • the second image is in the RAW domain
  • the second image is a Bayer format image
  • the third image acquired by the black and white camera 1932 is a grayscale image.
  • the field angle range corresponding to the second image is basically the same as the field angle range corresponding to the third image, and the detail richness of the third image is higher than that of the second image.
  • the tenth front-end processing includes demosaicing and color space conversion
  • the corresponding tenth front-end processed image is located in the YUV domain.
  • the tenth front-end processing does not include demosaicing and color space conversion
  • the corresponding tenth front-end processed image is still in the RAW domain.
  • the tenth front-end processing for the second image includes demosaicing and color space conversion, so that the second image after the front-end processing , the corresponding tenth front-end processed image is located in the YUV domain.
  • the eleventh front-end processing for the third image does not include demosaicing and color space conversion. In this way, after the front-end processing is performed on the third image, the corresponding eleventh front-end processed image is still a grayscale image.
  • the tenth front-end processing and the eleventh front-end processing may be the same or different, which is not limited in this embodiment of the present application .
  • the tenth front-end processing and the eleventh front-end processing provided in this embodiment may be the same as or different from the front-end processing provided in the above-mentioned embodiments. There are no restrictions here.
  • the tenth front-end processing provided in this embodiment includes demosaicing and color space conversion, and the six frames of the tenth front-end processing image corresponding to the six frames of the second image are located in the YUV domain.
  • the corresponding second front-end fusion module correspondingly includes a multi-frame fusion module in the YUV domain, so as to realize the multi-frame fusion function in the YUV domain. Therefore, the second front-end fusion image obtained through the processing of the second front-end fusion module is still located in the YUV domain.
  • the image in the subsequent processing can be located in the YUV domain, reducing the amount of data and saving bandwidth.
  • the second front-end fusion module in this embodiment may be the same as or different from the first front-end fusion module, the second front-end fusion module, the third front-end fusion module, or the fourth front-end fusion module in the above-mentioned embodiments , can be specifically set and changed as required, and this embodiment of the present application does not impose any limitation on this.
  • the second front-end fusion module may also include other functional modules.
  • the multiple frames of second images may include a long-exposure second image, a short-exposure second image, and a medium-exposure second image.
  • the tenth front-end processed images corresponding to multiple frames of second images include front-end processed images with different exposure levels.
  • the first fusion module combines different exposure levels After the multi-frame tenth front-end processing images are fused, the details of the dark area and the overexposed area in the image can be increased, and the dynamic range can be improved, thereby improving the definition of the corresponding first fused image.
  • the ninth back-end processed image corresponding to the second image is in the YUV domain
  • the tenth back-end processed image corresponding to the third image is a grayscale image
  • the ninth back-end processing and the tenth back-end processing may be the same or different; in addition, the ninth back-end processing and the tenth back-end processing in this embodiment are the same as the above-mentioned
  • the back-end processing in the embodiment may be the same or different, and may be specifically set as required, which is not limited in this embodiment of the present application.
  • the depth estimation process refers to using the principle of binocular stereo vision to perform pixel point matching on the ninth back-end processed image corresponding to 6 frames of the second image and the tenth back-end processed image corresponding to 1 frame of the third image, and then The depth information of each pixel is calculated according to the matching result, so that a depth image can be generated according to the depth information.
  • the depth image is a grayscale image.
  • the depth image can be used to assist in separating the foreground and the background in the ninth back-end processed image corresponding to the 6 frames of the second image, and then blur the background or the foreground.
  • the above-mentioned series of processing can be fused to obtain a higher foreground definition and better quality. Take an image.
  • the embodiment of the present application also provides a schematic flowchart of another shooting method in the large aperture mode. This method is applied to the electronic device 100 including the TOF camera 1935 in addition to the above four cameras.
  • FIG. 29 shows a schematic diagram of the arrangement of the five cameras on the back cover of the electronic device.
  • the above five cameras are arranged at the upper left corner of the back cover of the electronic device 100 .
  • the main camera 1931 as a camera commonly used by users, is separately distributed in the first circular area near the top of the back cover; the four cameras, the black and white camera 1932, the wide-angle camera 1933, the telephoto camera 1934 and the TOF camera 1935, are distributed in the vicinity In the second circular area under the back cover; in addition, in the second circular area near the bottom of the back cover, a flashlight can also be set.
  • the above five cameras are arranged in a circular area in the middle of the back cover of the electronic device.
  • the main camera 1931 as a camera commonly used by users, is set at the center of the circular area, and the four cameras of the black and white camera 1932, the wide-angle camera 1933, the telephoto camera 1934 and the TOF camera 1935 are distributed around the main camera 1931.
  • a flash can also be set.
  • FIG. 30 shows a schematic flowchart of another shooting method in the large aperture mode provided by the embodiment of the present application. As shown in FIG. 30 , the method includes the following S910 to S950.
  • S910 Receive the user's first operation, and determine that when the shooting mode is the large aperture mode, the zoom factor is suitable for 1X and above. Therefore, for example, use the main camera 1931 to acquire 6 frames of second images, and use TOF
  • the camera 1935 acquires depth information of the scene to be photographed, and uses the depth information to generate a depth image.
  • the TOF camera 1935 is an auxiliary camera.
  • the second image is located in the RAW domain and is a Bayer format image.
  • the TOF camera 1935 when the TOF camera 1935 is shooting the scene to be shot, it can continuously send light pulses to the target (such as an object in the scene to be shot), and then use the sensor to receive the light returned from the object, thus, through the The flight (round trip) time gives the distance to the target. Based on this, the distance between each point in the scene to be photographed and the electronic device 100 is calculated by calculating the time from when the light is sent from the TOF camera 1935 to the time when the light returns to the TOF camera 1935, thereby obtaining the depth information of the scene to be photographed, and then the depth information Appears as a depth image. Wherein, the depth image is a gray scale image.
  • FIG. 31 shows the second image acquired by the main camera 1931 for shooting the scene to be shot.
  • (b) in Fig. 31 shows the depth image acquired by the TOF camera 1935 for shooting the same scene to be shot.
  • the front-end processing includes demosaicing and color space conversion
  • the corresponding front-end processed image is located in the YUV domain.
  • the front-end processing does not include demosaicing and color space conversion
  • the corresponding front-end processed image is still in the RAW domain.
  • the front-end processing for the second image includes demosaicing and color space conversion, so that after the front-end processing of the second image, the corresponding The front-end processes images in the YUV domain.
  • front-end processing provided in this embodiment may be the same as or different from the front-end processing in the foregoing embodiments, and may be specifically set and changed as required, and this embodiment of the present application does not impose any limitation on this.
  • the front-end processing provided in this embodiment includes demosaicing and color space conversion, and the 6 frames of the second image correspond to 6 frames of the front-end processing image.
  • the corresponding second front-end fusion module correspondingly includes a multi-frame fusion module in the YUV domain, so as to realize the multi-frame fusion function in the YUV domain. Therefore, the second front-end fusion image obtained through the processing of the second front-end fusion module is still located in the YUV domain.
  • the image in the subsequent processing can be located in the YUV domain, reducing the amount of data and saving bandwidth.
  • the second front-end fusion module in this embodiment may be the same as or different from the first front-end fusion module, the second front-end fusion module, the third front-end fusion module, or the fourth front-end fusion module in the above-mentioned embodiments , can be specifically set and changed as required, and this embodiment of the present application does not impose any limitation on this.
  • the second front-end fusion module may also include other functional modules.
  • the multiple frames of second images may include a long-exposure second image, a short-exposure second image, and a medium-exposure second image.
  • the front-end processed images corresponding to the multiple frames of second images include front-end processed images with different exposure levels.
  • the second front-end fusion module combines the images with different exposure levels After the multi-frame front-end processing images are fused, the details of dark areas and overexposed areas in the image can be increased, and the dynamic range can be improved, thereby improving the definition of the corresponding first fused image.
  • the back-end processing image corresponding to the second image is located in the YUV domain.
  • back-end processing provided in this embodiment may be the same as or different from the back-end processing in the foregoing embodiments, and may be specifically set and changed as required, and this embodiment of the present application does not impose any limitation on this.
  • the depth image can be used to assist in separating the foreground and the background in the back-end processed image, and then blur the background or the foreground.
  • the above-mentioned series of processing can be fused to obtain a captured image with higher foreground definition and better quality.
  • Fig. 32 shows a schematic interface diagram of another electronic device provided by the embodiment of the present application.
  • the electronic device 100 displays a shooting interface as shown in FIG. 32 , and the shooting key 50 indicates that the current shooting mode is portrait mode.
  • Embodiment 14 as shown in FIG. 32
  • FIG. 33 shows a schematic flow chart of a shooting method in portrait mode provided by the embodiment of the present application. As shown in FIG. 33 , the method includes the following S1010 to S1070.
  • S1010 Receive the user's first operation, and determine that when the shooting mode is portrait mode, the zoom factor is suitable for 1X and above, so, for example, use the main camera 1931 to acquire 2 frames of second images, and use the black and white camera 1932 Acquire 1 frame of the third image.
  • the black and white camera 1932 is an auxiliary camera.
  • the number of the second images is only for illustration, and may be specifically acquired as required, and is not limited in this embodiment of the present application.
  • the second image is in the RAW domain
  • the second image is a Bayer format image
  • the third image acquired by the black and white camera 1932 is a grayscale image.
  • the field angle range corresponding to the second image is basically the same as the field angle range corresponding to the third image, and the detail richness of the third image is higher than that of the second image.
  • the twelfth front-end processing includes demosaicing and color space conversion
  • the corresponding twelfth front-end processed image is in the YUV domain.
  • the twelfth front-end processing does not include demosaicing and color space conversion
  • the corresponding twelfth front-end processing image is still in the RAW domain.
  • the twelfth front-end processing performed on the second image does not include demosaicing and color space conversion, so that after the second image is subjected to the twelfth front-end processing, the corresponding The twelfth front-end processes images in the RAW domain.
  • the thirteenth front-end processing for the third image does not include demosaicing and color space conversion. In this way, after the third image is subjected to the thirteenth front-end processing, the corresponding thirteenth front-end processing image is still a grayscale image.
  • the twelfth front-end processing and the thirteenth front-end processing may be the same or different, which is not limited in this embodiment of the present application.
  • the twelfth front-end processing and the thirteenth front-end processing provided in this embodiment may be the same as or different from the front-end processing provided in the above-mentioned embodiments. There are no restrictions on this.
  • the twelfth front-end processing provided for the second image in this embodiment does not include demosaicing and color space conversion, and the two frames of the second image corresponding to the two frames of the twelfth front-end processing image are located in the RAW domain.
  • the corresponding The second front-end fusion module correspondingly includes a multi-frame fusion module in the RAW domain, so as to realize the multi-frame fusion function in the RAW domain.
  • the second front-end fusion image processed by the second front-end fusion module is also located in the RAW domain.
  • the second front-end fusion module in this embodiment may be the same as or different from the first front-end fusion module, the second front-end fusion module, the third front-end fusion module, or the fourth front-end fusion module in the above-mentioned embodiments , can be specifically set and changed as required, and this embodiment of the present application does not impose any limitation on this.
  • the second front-end fusion module may also include other functional modules.
  • the multiple frames of second images may include a long-exposure second image, a short-exposure second image, and a medium-exposure second image.
  • the front-end processed images corresponding to the multiple frames of second images include front-end processed images with different exposure levels.
  • the first fusion module combines the images with different exposure levels After the multi-frame front-end processing images are fused, the details of dark areas and overexposed areas in the image can be increased, and the dynamic range can be improved, thereby improving the definition of the corresponding first fused image.
  • the above S1020 may also be: performing first preprocessing on 2 frames of the second image to obtain 2 frames of the first preprocessing image in the RAW domain; performing front-end processing on 1 frame of the third image to obtain the corresponding 2 frames Image processing on the front end.
  • S1030 is: use the second front-end fusion module to respectively fuse the two frames of the first pre-processed image corresponding to the two frames of the second image to obtain the second front-end fusion image corresponding to the two frames of the second image.
  • the tenth back-end processed image corresponding to the second image is in the YUV domain
  • the eleventh back-end processed image corresponding to the third image is a grayscale image
  • the tenth back-end processing and the eleventh back-end processing may be the same or different; in addition, the tenth back-end processing and the eleventh back-end processing in this embodiment, It may be the same as or different from the back-end processing in the foregoing embodiment, and may be specifically set as required, and this embodiment of the present application does not impose any limitation on this.
  • the depth estimation process refers to performing pixel point matching on the tenth back-end processed image corresponding to the 2 frames of the second image and the eleventh back-end processed image corresponding to the 2 frames of the third image by using the principle of binocular stereo vision, Then, the depth information of each pixel is calculated according to the matching result, so that a depth image can be generated according to the depth information.
  • the depth image is a grayscale image.
  • the depth image can be used to assist in separating the foreground and the background in the tenth back-end processed image corresponding to the two frames of the second image, and then blur the background or the foreground.
  • the blurred image is located in the YUV domain.
  • the electronic device 100 will detect a human face during preview, and when a human face is detected, face AE and face AF will be triggered, so that the human face is in the most suitable brightness range, and AF The focus motor will be pushed to place the face on the most suitable focus plane.
  • depth estimation processing will be performed to generate a depth image, and the depth plane where the face is located will be properly sharpened to improve the clarity of the face.
  • Other depth planes will be blurred to varying degrees.
  • the degree of blurring depends on the distance from the depth plane where the face is located. The farther the distance, the higher the degree of blurring; the closer the distance, the weaker the degree of blurring.
  • S1070 Perform skin beautification processing on the blurred image to obtain a skin beautification image.
  • the skin beautification processed image is a captured image.
  • the skin beautification process can be used to adjust the face image of the person being photographed, so that the face shown in the adjusted face image is skin beautified compared with the actual face of the person being photographed, such as skin whitening, Dermabrasion (such as removing acne, freckles, wrinkles, etc. on a character's face), etc.
  • the adjustment of the facial image involved in the "beautifying skin” function may refer to smoothing the facial image by using algorithms such as surface blurring, mean filtering, and bilateral filtering. Therefore, this kind of processing on the face image can be called skin beautification processing.
  • the skin-beautifying processed image is in the YUV domain.
  • the skin-beautifying processed image will be displayed on the interface of the electronic device 100 as a captured image, or only stored, and can be transmitted as required, which is not limited in this embodiment of the present application.
  • the embodiment of the present application also provides a schematic flowchart of another shooting method in the portrait mode. This method is applied to the electronic device 100 including the TOF camera 1935 in addition to the above four cameras.
  • FIG. 34 shows a schematic flow chart of another shooting method in portrait mode provided by the embodiment of the present application. As shown in FIG. 34 , the method includes the following S1110 to S1160.
  • the zoom factor is suitable for 1X and above, so, for example, use the main camera 1931 to acquire 2 frames of second images, and use the TOF camera 1935 Obtain depth information of the scene to be photographed, and use the depth information to generate a depth image.
  • the TOF camera 1935 is an auxiliary camera.
  • the second image is located in the RAW domain and is a Bayer format image.
  • the front-end processing includes demosaicing and color space conversion
  • the corresponding front-end processed image is located in the YUV domain.
  • the front-end processing does not include demosaicing and color space conversion
  • the corresponding front-end processed image is still in the RAW domain.
  • the front-end processing for the second image does not include demosaicing and color space conversion, so that after the second image is subjected to front-end processing, the corresponding front-end processed image is located in the RAW domain .
  • front-end processing provided in this embodiment may be the same as or different from the front-end processing in the foregoing embodiments, and may be specifically set and changed as required, and this embodiment of the present application does not impose any limitation on this.
  • the front-end processing provided by this embodiment does not include demosaicing and color space conversion, and the 2 frames of front-end processing images corresponding to the 2 frames of the second image are located in the RAW domain.
  • the corresponding second front-end fusion module includes the RAW domain
  • the second front-end fusion module in this embodiment may be the same as or different from the first front-end fusion module, the second front-end fusion module, the third front-end fusion module, or the fourth front-end fusion module in the above-mentioned embodiments , can be specifically set and changed as required, and this embodiment of the present application does not impose any limitation on this.
  • the second front-end fusion module may also include other functional modules.
  • the multiple frames of second images may include a long-exposure second image, a short-exposure second image, and a medium-exposure second image.
  • the front-end processed images corresponding to the multiple frames of second images include front-end processed images with different exposure levels.
  • the second front-end fusion module combines the images with different exposure levels After the multi-frame front-end processing images are fused, the details of dark areas and overexposed areas in the image can be increased, and the dynamic range can be improved, thereby improving the definition of the corresponding first fused image.
  • first fusion module in this embodiment may be the same as or different from the first fusion module in the foregoing embodiments, and may be specifically set as required, and this embodiment of the present application does not impose any limitation on this.
  • the back-end processing image corresponding to the second image is located in the YUV domain.
  • back-end processing provided in this embodiment may be the same as or different from the back-end processing provided in the foregoing embodiments, and may be specifically set and changed as required, which is not limited in this embodiment of the present application.
  • the depth image can be used to assist in separating the foreground and the background in the back-end processed image, and then blur the background or the foreground.
  • the blurred image is located in the YUV domain.
  • the skin beautification processed image is a captured image.
  • the skin-beautifying processed image is in the YUV domain.
  • the skin-beautifying processed image will be displayed on the interface of the electronic device 100 as a captured image, or only stored, and can be transmitted as required, which is not limited in this embodiment of the present application.
  • FIG. 36 shows a schematic interface diagram of another electronic device provided by the embodiment of the present application.
  • the electronic device displays a photographing interface as shown in FIG. 32 , and the photographing key 50 indicates that the current photographing mode is night scene mode.
  • Embodiment 16 a shooting method, as shown in FIG. 37 , the method includes the following steps S1210 to S1240.
  • the current zoom factor belongs to the first zoom factor range [0.5, 1), and the target camera is the wide-angle camera 1933 under low illumination.
  • the wide-angle camera 1933 is used to acquire 3 frames of first images.
  • the current zoom factor is 2.6 times, the current zoom factor belongs to the third zoom factor range [2, 3.x), and the target camera is the main camera 1931 under low illumination.
  • the main camera 1931 is used to acquire 3 frames of second images.
  • the target camera is a telephoto camera.
  • a telephoto camera is used to acquire 3 frames of fourth images.
  • the numbers of the first image, the second image, and the fourth image are only for illustration, and may be obtained according to needs, and are not limited in this embodiment of the present application.
  • the first image, the second image and the fourth image are all in the RAW domain and are Bayer format images.
  • the above S1220 can also be expressed as: performing the second preprocessing on the 3 frames of the first image to obtain the corresponding second preprocessing image in the RAW domain; performing the second preprocessing on the 3 frames of the second image to obtain the corresponding image in the RAW domain The second pre-processing image; the second pre-processing is performed on the 3 frames of the fourth image to obtain the corresponding second pre-processing image in the RAW domain.
  • the second preprocessing provided by this embodiment includes a night scene algorithm module, for example, the night scene algorithm module is generated based on the Unet network model, and can combine multiple frames of the first image, multiple frames of the second image, or multiple frames of the fourth image in the RAW domain Fusion into a corresponding frame of the second preprocessed image in the RAW domain.
  • the night scene algorithm module is generated based on the Unet network model, and can combine multiple frames of the first image, multiple frames of the second image, or multiple frames of the fourth image in the RAW domain Fusion into a corresponding frame of the second preprocessed image in the RAW domain.
  • the front-end processing includes demosaicing and color space conversion, so that the first image, the second image, or the fourth image corresponds to the second preset in the RAW domain.
  • the obtained front-end processed image is in the YUV domain.
  • front-end processing provided in this embodiment may be the same as or different from the front-end processing in the foregoing embodiments, and may be specifically set and changed as required, and this embodiment of the present application does not impose any limitation on this.
  • the back-end processed image corresponding to the first image, the second image or the fourth image is located in the YUV domain.
  • back-end processing provided in this embodiment may be the same as or different from the back-end processing provided in the foregoing embodiments, and may be specifically set and changed as required, which is not limited in this embodiment of the present application.
  • the network model in the night scene mode, based on multiple frames of the first image, the second image or the fourth image, the network model is used to perform multi-frame fusion processing, and the above-mentioned other processing can be fused to obtain a higher-definition, higher-quality Good image capture.
  • the shooting methods in the large aperture mode, the portrait mode, and the night scene mode provided by the embodiments of the present application are introduced in detail through embodiments 11 to 16 above.
  • a shooting method in the smart mode provided in the embodiment of the present application is introduced below.
  • Fig. 38 shows a schematic interface diagram of another electronic device provided by the embodiment of the present application.
  • the electronic device 100 in response to a user's touch operation, when the electronic device 100 runs the camera application, the electronic device 100 displays a shooting interface as shown in (b) in FIG. 38 .
  • the camera key 50 indicates "more".
  • the electronic device 100 displays a shooting interface as shown in (c) in FIG. 38 , and the shooting interface displays options corresponding to the smart mode.
  • the electronic device 100 displays a shooting interface as shown in (d) in FIG. 38 .
  • the shooting interface also includes a viewfinder window 60, which can be used to display a preview image before taking pictures or recording in real time.
  • a zoom option 61 is also displayed in the preview image. The user can select the zoom factor currently required in the zoom option 61, for example, 0.5 times, 2 times or 50 times.
  • FIG. 38 shows a schematic flowchart of a shooting method in a smart mode provided by an embodiment of the present application.
  • Embodiment 17 a shooting method, as shown in FIG. 39 , the method includes the following S1310-S1370.
  • the current zoom factor is automatically determined, and the zoom factor range to which the current zoom factor belongs is determined.
  • the zoom factor range determines that the target camera is a wide-angle camera, and use the wide-angle camera 1933 to obtain multiple frames of the first image;
  • the current zoom factor belongs to the second zoom factor range or the third zoom factor range determine The target camera is the main camera 1931, and the main camera 1931 is used to acquire multiple frames of second images.
  • the current zoom factor belongs to the fourth zoom factor range it is determined that the target camera is the telephoto camera 1934 , and the telephoto camera 1934 is used to acquire multiple frames of fourth images.
  • the proportion of the area of the flower in the viewfinder window is greater than a preset ratio (for example, 50%), as in Embodiment 12 or 13 above.
  • the main camera 1931 is used to obtain multiple frames of second images
  • the black and white camera 1932 is used to obtain multiple frames of third images
  • the front-end processing is performed on the multiple frames of the second images and the multiple frames of the third images to obtain the corresponding multi-frame front-ends Processing the image, and then fusing the multi-frame front-end processing image corresponding to the multi-frame second image and performing back-end processing to obtain the corresponding back-end processing image, and simultaneously fusing the multi-frame front-end processing image corresponding to the multi-frame third image And perform back-end processing to obtain the corresponding back-end processing image.
  • the blurred image is a captured image.
  • the skin-beautifying processed image is a captured image.
  • the illuminance of the scene to be photographed is greater than or equal to the preset illuminance threshold, that is, the medium-to-high illuminance, automatically call the shooting method corresponding to the medium-to-high illuminance in the photographing mode to shoot.
  • the current zoom factor is automatically determined, and the zoom factor range to which the current zoom factor belongs is determined.
  • the zoom factor range determines that the target camera is a wide-angle camera, and use the wide-angle camera to obtain multiple frames of the first image;
  • the current zoom factor belongs to the second zoom factor range or the third zoom factor range determine the target The camera is the main camera 1931, and the main camera 1931 is used to acquire multiple frames of second images.
  • the current zoom factor belongs to the fourth zoom factor range determine that the target camera is the telephoto camera 1934, and use the telephoto camera to acquire multiple frames of fourth images.
  • the current zoom factor is automatically determined, and the zoom factor range to which the current zoom factor belongs is determined. If the current zoom factor belongs to the first zoom factor range, then utilize the method shown in embodiment 1 to obtain the captured image; if the current zoom factor belongs to the second zoom factor range, then utilize the method shown in embodiment 2 to obtain the captured image; If the current zoom factor belongs to the third zoom factor range, then use the method shown in embodiment 3 to obtain the captured image; if the current zoom factor belongs to the fourth zoom factor range, then use the method shown in embodiment 4 to obtain the captured image.
  • the embodiment of the present application provides a shooting method.
  • the intelligent mode by automatically recognizing the scene to be shot, according to the recognition result, processing methods in different modes can be automatically invoked to obtain the shot image.
  • the user's use threshold can be lowered, and the best-effect, high-definition, and high-quality photographed images can be adaptively obtained.
  • the electronic device includes a corresponding hardware structure or software module for performing each function, or a combination of both.
  • the present application can be implemented in the form of hardware or a combination of hardware and computer software in combination with the units and algorithm steps of each example described in the embodiments disclosed herein. Whether a certain function is executed by hardware or computer software drives hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.
  • the embodiment of the present application may divide the electronic device into functional modules according to the above method example, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules. It should be noted that the division of modules in the embodiment of the present application is schematic, and is only a logical function division, and there may be other division methods in actual implementation. The following is an example of dividing each functional module corresponding to each function:
  • FIG. 40 is a schematic structural diagram of an image processing device provided by an embodiment of the present application.
  • the image processing device 300 includes a determination module 310 , a processing module 320 and multiple cameras, and the multiple cameras include a wide-angle camera 1933 , a main camera 1931 , a monochrome camera 1932 and a telephoto camera 1934 .
  • a determining module 310 configured to determine the current shooting mode.
  • the shooting modes include: photo mode, video mode, night scene mode, portrait mode, large aperture mode, HDR mode, and smart mode.
  • the determination module 310 is also used to determine the illuminance of the scene to be shot and the current zoom factor.
  • the processing module 320 is configured to determine a target camera according to the illuminance of the scene to be photographed and the current zoom factor, and use the target camera to acquire an original image.
  • the processing module 320 is also used to process the original image to obtain the captured image.
  • the determination module 310 is further configured to determine the zoom magnification range to which the current zoom magnification belongs. Determine the target camera according to the zoom factor range to which the current zoom factor belongs, and use the target camera to acquire the original image.
  • the determination module 310 is further configured to determine that the target camera is a wide-angle camera and the main camera 1931, and use the wide-angle camera to acquire the first image, and use the main camera 1931 to acquire the first image.
  • the second image, the original image includes the first image and the second image.
  • the determination module 310 is also used to determine the target camera as the main camera 1931 and the black and white camera 1932, and use the main camera 1931 to acquire the second image, and use the black and white camera to acquire the third image , the original image includes the second image and the third image.
  • the determining module 310 is also used to determine the target camera as the main camera 1931 and the telephoto camera, use the main camera 1931 to obtain the second image, and use the telephoto camera to obtain the fourth image.
  • image the original image includes a second image and a fourth image.
  • the determination module 310 is used to determine the zoom factor range to which the current zoom factor belongs; determine the target camera according to the zoom factor range to which the current zoom factor belongs , and use the target camera to obtain the original image.
  • the determination module 310 is further configured to determine that the target camera is the wide-angle camera 1933, and use the wide-angle camera 1933 to acquire multiple frames of the first image, and the original image includes multiple frames of the first image. an image.
  • the determination module 310 is also used to determine the target camera as the main camera 1931, and use the main camera 1931 to acquire multiple frames of second images, the original image includes multiple Frame the second image.
  • the target camera is the telephoto camera 1934
  • the telephoto camera 1934 uses the telephoto camera 1934 to acquire multiple frames of fourth images, and the original images include multiple frames of fourth images.
  • the determination module 310 is also used to determine the zoom factor range to which the current zoom factor belongs; according to the zoom factor range to which the current zoom factor belongs, determine the target camera, and utilize the target camera to obtain the original image; process Module 320 is also used to process the original image to obtain the captured image.
  • the main camera 1931 is used to acquire multiple frames of second images
  • the black and white camera 1932 is used to acquire multiple frames of third images.
  • the processing module 320 is used to perform front-end processing on the multi-frame second image and the multi-frame third image respectively to obtain respective corresponding multi-frame front-end processed images; utilize the front-end fusion module to respectively process the multi-frame front-end processing corresponding to the multi-frame second image
  • the multi-frame front-end processing image corresponding to the multi-frame third image is fused to obtain the front-end fusion image corresponding to the multi-frame second image and the multi-frame third image;
  • the multi-frame second image and the multi-frame third image respectively correspond to
  • the front-end fused images are all subjected to back-end processing to obtain respective corresponding back-end processing images;
  • the depth estimation processing is performed on the back-end processing images corresponding to the multi-frame second image and the multi-frame third image to obtain a depth image; use the depth image to The back-end processed images corresponding to the multiple frames of the second images are blurred to obtain corresponding blurred images.
  • the electronic device when the electronic device also includes a TOF camera 1935, when the shooting mode is a large aperture mode or a portrait mode, use the main camera 1931 to obtain multiple frames of second images, and use the TOF camera 1935 to obtain depth information of the scene to be photographed, and the processing module 320, for generating a depth image by using the depth information.
  • the shooting mode is a large aperture mode or a portrait mode
  • the main camera 1931 when the shooting mode is a large aperture mode or a portrait mode, use the main camera 1931 to obtain multiple frames of second images, and use the TOF camera 1935 to obtain depth information of the scene to be photographed, and the processing module 320, for generating a depth image by using the depth information.
  • the processing module 320 is also used to perform front-end processing on the multi-frame second images to obtain corresponding multi-frame front-end processed images; use the front-end fusion module to fuse the multi-frame front-end processed images corresponding to the multi-frame second images to obtain the multi-frame first
  • the processing module 320 is further configured to perform skin beautification processing on the blurred image to obtain a skin beautification image.
  • the embodiment of the present application also provides another electronic device, including a camera module, a processor, and a memory.
  • the camera module is used to obtain multiple frames of original images, and the multiple frames of original images are images taken for the same scene to be shot.
  • Memory which stores computer programs that run on the processor.
  • the processor is configured to execute the shooting method as described above, and/or execute the multi-camera zooming method as described above.
  • the camera module includes a wide-angle camera, a color camera, a black-and-white camera and a telephoto camera.
  • the wide-angle camera is used to acquire the first image after the processor acquires the camera instruction.
  • the main camera is configured to acquire a second image after the processor acquires the photographing instruction.
  • a black and white camera used to acquire a third image after the processor acquires the photographing instruction.
  • the telephoto camera is used to acquire the fourth image after the processor acquires the photographing instruction.
  • the image is acquired through the image processor in the camera.
  • the image sensor may be, for example, a charge-coupled device (charge-coupled device, CCD), a complementary metal oxide semiconductor (complementary metal oxide semiconductor, CMOS) and the like.
  • the embodiment of the present application also provides a computer-readable storage medium, and computer instructions are stored in the computer-readable storage medium; The method shown in any one of 1 to 17.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website, computer, server, or data center Transmission to another website site, computer, server or data center by wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.).
  • the computer-readable storage medium may be any available medium that can be accessed by a computer, or may be a data storage device including one or more servers, data centers, etc. that can be integrated with the medium.
  • the available medium may be a magnetic medium (for example, a floppy disk, a hard disk, or a magnetic tape), an optical medium, or a semiconductor medium (for example, a solid state disk (solid state disk, SSD)) and the like.
  • FIG. 41 is a schematic structural diagram of a chip provided by an embodiment of the present application.
  • the chip shown in Figure 41 can be a general-purpose processor or a special-purpose processor.
  • the chip includes a processor 401 .
  • the processor 401 is configured to support the image processing apparatus to execute the technical solution shown in any one of Embodiments 1 to 17.
  • the chip further includes a transceiver 402, and the transceiver 402 is configured to be controlled by the processor 401, and configured to support the communication device to execute the technical solution shown in any one of Embodiments 1 to 17.
  • the chip shown in FIG. 41 may further include: a storage medium 403 .
  • the chip shown in Figure 41 can be implemented using the following circuits or devices: one or more field programmable gate arrays (field programmable gate array, FPGA), programmable logic device (programmable logic device, PLD) , controllers, state machines, gate logic, discrete hardware components, any other suitable circuitry, or any combination of circuitry capable of performing the various functions described throughout this application.
  • field programmable gate array field programmable gate array, FPGA
  • programmable logic device programmable logic device
  • controllers state machines, gate logic, discrete hardware components, any other suitable circuitry, or any combination of circuitry capable of performing the various functions described throughout this application.
  • the electronic equipment, image processing device, computer storage medium, computer program product, and chip provided by the above-mentioned embodiments of the present application are all used to execute the method provided above. Therefore, the beneficial effects that it can achieve can refer to the above-mentioned The beneficial effects corresponding to the method will not be repeated here.
  • sequence numbers of the above processes do not mean the order of execution, and the execution order of each process should be determined by its functions and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
  • presetting and predefining can be realized by pre-saving corresponding codes, tables or other methods that can be used to indicate related information in devices (for example, including electronic devices) , the present application does not limit its specific implementation.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Computing Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Studio Devices (AREA)

Abstract

本申请提供了一种拍摄方法及其相关设备,涉及图像处理领域,该拍摄方法包括:检测到对第一控件的第一操作;响应于第一操作,电子设备确定为第一变焦倍数,检测到对第一界面的第二操作,响应于第二操作,根据第一变焦倍数和第一照度,电子设备采用第一摄像头和第二摄像头采集图像,对第一摄像头采集的图像和第二摄像头采集的图像进行处理,得到拍摄图像,保存拍摄图像。本申请在拍照模式下,利用用户选择的变焦倍数和照度,确定采用第一摄像头和第二摄像头采集图像并进行处理,由此,可以根据不同照度和变焦倍数切换不同的摄像头来获取视场角大小不同、清晰度不同的图像,从而可以利用多摄像头协同处理,来提高处理之后得到的拍摄图像的质量。

Description

拍摄方法及其相关设备
本申请要求于2021年08月11日提交国家知识产权局、申请号为202110921519.3、申请名称为“拍摄方法及其相关设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及图像处理领域,尤其涉及一种拍摄方法及其相关设备。
背景技术
随着电子设备的广泛使用,使用电子设备进行拍照、录像已经成为人们生活中的一种日常行为方式。
以电子设备为手机为例来说,在电子设备上安装多个摄像头已经是一种趋势。通过在电子设备上安装多个摄像头,可以提供更多的拍照、录像方式以供用户进行选择并使用。
发明内容
本申请提供一种拍摄方法及其相关设备,可以利用多个摄像头实现协同处理,提高获取到的图像的清晰度,并且,可以实现全焦段覆盖、多功能拍摄。
为达到上述目的,本申请采用如下技术方案:
第一方面,提供一种拍摄方法,该拍摄方法应用于包括第一摄像头和第二摄像头的电子设备,该拍摄方法包括:
电子设备显示第一界面,第一界面包括预览图像、第一控件和第二控件,第二控件指示为拍照模式;检测到对第一控件的第一操作;响应于第一操作,电子设备确定为第一变焦倍数,预览图像为第一摄像头实时采集的图像;检测到对第一界面的第二操作;响应于第二操作,根据第一变焦倍数和第一照度,电子设备采用第一摄像头和第二摄像头采集图像,第二摄像头为辅助摄像头,其中第一摄像头采集一帧或一帧以上图像,第二摄像头采集一帧或一帧以上图像;对第一摄像头采集的一帧或一帧以上图像和第二摄像头采集的一帧或一帧以上图像进行处理,得到拍摄图像;保存拍摄图像;其中,第一照度为电子设备根据预览图像确定的照度值。
示例性的,第一摄像头可以为主摄摄像头,第二摄像头为黑白摄像头,或者,第一摄像头可以为主摄摄像头,第二摄像头为长焦摄像头。
示例性的,第一控件可以为变焦选项,用于调整变焦倍数。第二控件可以为拍摄键50,用于指示不同的拍摄模式。
应理解,辅助摄像头指的是该摄像头采集的图像仅用于图像处理获取拍摄图像,不作为预览图像进行显示。换句话说,辅助摄像头处于后台运行状态。
本申请实施例提供的拍摄方法,在用户选择的拍摄模式为拍照模式时,根据用户选择的变焦倍数和照度,例如可以从广角摄像头、主摄摄像头、黑白摄像头和长焦摄像头中确定出相对应的目标摄像头,比如可以确定目标摄像头为主摄摄像头和黑白摄 像头,或者可以确定为主摄摄像头和长焦摄像头,然后,利用目标摄像头获取原始图像,再对原始图像进行处理,得到拍摄图像。原始图像包括主摄摄像头拍摄的图像和黑白摄像头拍摄的图像,或者包括主摄摄像头拍摄的图像和长焦摄像头拍摄的图像。
由于本申请提供的拍摄方法,在拍照时可以根据不同照度和变焦倍数切换不同的摄像头来获取原始图像,由此,可以利用不同的摄像头得到视场角大小不同、清晰度不同的原始图像,从而可以利用多摄像头协同处理,提高由原始图像处理之后得到的拍摄图像的质量。
在第一方面一种可能的实现方式中,电子设备还包括第三摄像头,该方法还包括:
检测到对第一控件的第三操作;响应于第三操作,电子设备确定为第二变焦倍数,预览图像为第三摄像头实时采集的图像;检测到对第一界面的第四操作;响应于第四操作,根据第二变焦倍数和第一照度,电子设备采用第一摄像头和第三摄像头采集图像,第一摄像头为辅助摄像头,第三摄像头与第二摄像头不同,第三摄像头采集一帧或一帧以上图像;对第一摄像头采集的一帧或一帧以上图像和第三摄像头采集的一帧或一帧以上图像进行处理,得到拍摄图像;保存拍摄图像。
示例性的,第三摄像头可以为广角摄像头。
在该实现方式中,通过第二变焦倍数和第一照度,可以确定目标摄像头为主摄摄像头和广角摄像头,采用主摄摄像头和广角摄像头采集视场角不同、清晰度不同的图像来进行处理,以得到清晰度较高、质量较好的拍摄图像。
在第一方面一种可能的实现方式中,电子设备还包括第四摄像头,该方法还包括:
检测到对第一控件的第五操作;响应于第五操作,电子设备确定为第三变焦倍数,预览图像为第四摄像头实时采集的图像;检测到对第一界面的第六操作;响应于第六操作,根据第三变焦倍数和第一照度,电子设备采用第四摄像头采集图像,第四摄像头与第三摄像头不同,第四摄像头采集两帧或两帧以上图像;对所述第四摄像头采集的两帧或两帧以上图像进行处理,得到拍摄图像;保存拍摄图像。
示例性的,第四摄像头可以为长焦摄像头。
在该实现方式中,通过第三变焦倍数和第一照度,可以确定目标摄像头为长焦摄像头,采用长焦摄像头可以采集多帧图像来进行处理,以得到清晰度较高、质量较好的拍摄图像。
在第一方面一种可能的实现方式中,该方法还包括:
检测到对第一界面的第七操作;响应于第七操作,根据第一变焦倍数和第二照度,电子设备采用第一摄像头采集图像;第一摄像头采集两帧或两帧以上图像;对第一摄像头采集的两帧或两帧以上图像进行处理,得到拍摄图像;保存拍摄图像。
或者,检测到对第一界面的第八操作;响应于第八操作,根据第二变焦倍数和第二照度,电子设备采用第三摄像头采集图像;第三摄像头采集两帧或两帧以上图像;对第三摄像头采集的两帧或两帧以上图像进行处理,得到拍摄图像;保存拍摄图像。
或者,检测到对第一界面的第九操作;响应于第九操作,根据第三变焦倍数和第二照度,电子设备采用第四摄像头采集图像;第四摄像头采集两帧或两帧以上图像;对第四摄像头采集的两帧或两帧以上图像进行处理,得到拍摄图像;保存拍摄图像。
其中,第二照度为电子设备根据预览图像确定的照度,第二照度与第一照度不同, 且第二照度的照度值低于第一照度的照度值。
其中,若第一照度称为中高照度时,由于第二照度的照度值低于第一照度的照度,可以称第二照度为低照度。
在该实现方式中,在低照度的情况下,可以在不同变焦倍数切换不同的摄像头来获取原始图像,以实现利用多摄像头协同处理,使电子设备覆盖更大的变焦范围;并且,针对每个摄像头,可以采集多帧图像,提高每个摄像头得到的拍摄图像的质量。
在第一方面一种可能的实现方式中,该方法还包括:
检测到对第一控件的第十一操作;响应于第十一操作,从第一变焦倍数切换为第二变焦倍数;响应于从第一变焦倍数切换为第二变焦倍数,电子设备采用第一摄像头和第二摄像头采集图像,切换为采用第一摄像头和第三摄像头采集图像,其中,当为第一变焦倍数时,第二摄像头为辅助摄像头,当为第二变焦倍数时,第一摄像头为辅助摄像头。
或者,检测到对第一控件的第十二操作;响应于第十二操作,从第一变焦倍数切换为第三变焦倍数;响应于从第一变焦倍数切换为第三变焦倍数,电子设备采用第一摄像头和第二摄像头采集图像,切换为采用第四摄像头和第一摄像头采集图像,当为第三变焦倍数时,第一摄像头为辅助摄像头。
示例性的,从第一变焦倍数切换为第二变焦倍数,电子设备采用主摄摄像头和黑白摄像头采集图像,切换为采用主摄摄像头和广角摄像头采集图像。当为第一变焦倍数时,主摄摄像头采集的图像作为预览图像显示,而黑白摄像头采集的图像不显示。当为第二变焦倍数时,广角摄像头采集的图像作为预览图像显示,而主摄摄像头采集的图像不显示。
示例性的,从第一变焦倍数切换为第三变焦倍数,电子设备采用主摄摄像头和黑白摄像头采集图像,切换为采用长焦摄像头和主摄摄像头采集图像。其中,当为第三变焦倍数时,长焦摄像头采集的图像作为预览图像显示,而主摄摄像头采集的图像不显示。
在该实现方式中,当电子设备允许两路摄像头同时运行时,通过两组两个摄像头的切换,在实现接力变焦的同时还能提前运行相邻变焦范围内拍照时所需采集图像的摄像头,或者,延迟关闭上一变焦倍数范围采集图像的摄像头,由此,使得电子设备的变焦倍数整体覆盖范围更广,而且可以切换更加平滑流畅。
在第一方面一种可能的实现方式中,该方法还包括:
响应于从第一变焦倍数切换为第二变焦倍数,电子设备采用第三摄像头、第一摄像头和第二摄像头采集图像,切换为采用第一摄像头和第三摄像头采集图像,其中,当为第一变焦倍数时,第三摄像头、第二摄像头均为辅助摄像头,当为第二变焦倍数时,第一摄像头为辅助摄像头。
示例性的,从第一变焦倍数切换为第二变焦倍数,电子设备采用广角摄像头、主摄摄像头和黑白摄像头采集图像,切换为采用主摄摄像头和广角摄像头采集图像。其中,当为第一变焦倍数时,主摄摄像头采集的图像作为预览图像显示,而广角摄像头和黑白摄像头采集的图像不显示。当为第二变焦倍数时,广角摄像头采集的图像作为预览图像显示,而主摄摄像头采集的图像不显示。
在该实现方式中,当电子设备允许三路摄像头同时运行时,通过多个摄像头的切换,在实现接力变焦的同时还能提前运行相邻变焦倍数范围内拍照时所需采集图像的摄像头,以及其他摄像头,或者,延迟关闭上一变焦倍数范围采集图像的摄像头,由此,使得电子设备的变焦倍数整体覆盖范围更广,而且可以切换更加平滑流畅。
在第一方面一种可能的实现方式中,第二摄像头的视场角与第三摄像头的视场角之间存在重叠。
其中,重叠指的是第三摄像头可以拍摄到第二摄像头拍摄的场景内容及其周边的场景内容。
在该实现方式中,当多个摄像头切换时,视场角切换更加自然流畅。
在第一方面一种可能的实现方式中,根据第一变焦倍数和第一照度,电子设备采用第一摄像头和第二摄像头采集图像,包括:当第一变焦倍数属于第二变焦倍数范围时,电子设备采用第一摄像头获取第二图像,并采用第二摄像头获取第三图像,第二图像包括1帧或多帧,第三图像包括1帧或多帧;当第一变焦倍数属于第三变焦倍数范围时,电子设备采用第一摄像头获取第二图像,并采用第二摄像头获取第四图像,第二图像包括1帧或多帧,第四图像包括1帧或多帧。
在该实现方式中,在中高照度的情况下,可以在不同变焦倍数切换不同的摄像头来获取原始图像,以实现利用多摄像头协同处理,使电子设备覆盖更大的变焦范围;
在第一方面一种可能的实现方式中,电子设备采用第一摄像头获取第二图像,并采用第二摄像头获取第三图像之后,该方法还包括:
对第二图像进行第一预处理,得到位于RAW域的第一预处理图像;利用预融合模块对第一预处理图像进行融合,得到对应的预融合图像;对第二图像对应的预融合图像、第三图像分别进行前端处理,得到各自对应的前端处理图像;利用前端融合模块对第三图像对应的前端处理图像进行融合,得到第三图像对应的前端融合图像;对第二图像对应的前端处理图像、第三图像对应的前端融合图像均进行后端处理,得到各自对应的后端处理图像;利用后端融合模块将第二图像、第三图像分别对应的后端处理图像进行融合,得到后端融合图像,后端融合图像为拍摄图像。
在该实现方式中,在中高照度的情况下,基于细节丰富度不同的第二图像和第三图像,经过上述一系列处理后,可以融合得到清晰度较高、质量较好的拍摄图像。
此处,在RAW域上进行处理,可以保留更多的细节,提高后续图像的质量。
在第一方面一种可能的实现方式中,电子设备采用第一摄像头获取第二图像,并采用第二摄像头获取第四图像之后,该方法还包括:
对第二图像、第四图像分别进行前端处理,得到各自对应的前端处理图像;利用前端融合模块分别将第二图像对应的前端处理图像、第四图像对应的前端处理图像进行融合,得到第二图像、第四图像分别对应的前端融合图像;对第二图像、第四图像分别对应的前端融合图像均进行后端处理,得到各自对应的后端处理图像;利用后端融合模块将第二图像、第四图像分别对应的后端处理图像进行融合,得到后端融合图像,后端融合图像为所述拍摄图像。
在该实现方式中,在中高照度的情况下,基于视场角大小不同、清晰度不同的第 二图像和第四图像,经过上述一系列处理后,可以融合得到清晰度较高、质量较好的拍摄图像。
在第一方面一种可能的实现方式中,根据第二变焦倍数和第一照度,电子设备采用第一摄像头和第三摄像头采集图像,包括:电子设备采用第三摄像头获取第一图像,并采用第一摄像头获取第二图像,第一图像包括1帧或多帧,第二图像包括1帧或多帧,第二变焦倍数属于第一变焦倍数范围。
在第一方面一种可能的实现方式中,电子设备采用第三摄像头获取第一图像,并采用第一摄像头获取第二图像,该方法还包括:
对第一图像、第二图像分别进行前端处理,得到各自对应的前端处理图像;利用前端融合模块分别将第一图像对应的前端处理图像、第二图像对应的前端处理图像进行融合,得到第一图像、第二图像分别对应的前端融合图像;对第一图像、第二图像分别对应的前端融合图像均进行后端处理,得到各自对应的后端处理图像;对第一图像对应的所述后端处理图像进行畸变校正,得到校正图像;利用后端融合模块将校正图像和第二图像对应的后端处理图像进行融合,得到后端融合图像,后端融合图像为拍摄图像。
在该实现方式中,在中高照度的情况下,基于视场角大小不同、清晰度不同的第一图像和第二图像,经过上述一系列处理后,可以融合得到清晰度较高、质量较好的拍摄图像。
在第一方面一种可能的实现方式中,根据第三变焦倍数和第一照度,电子设备采用第四摄像头采集图像,包括:电子设备采用第四摄像头获取第四图像,第四图像包括多帧,第三变焦倍数属于第四变焦倍数范围。
在第一方面一种可能的实现方式中,电子设备采用第四摄像头获取第四图像之后,该方法还包括:
对第四图像进行前端处理,得到对应的前端处理图像;利用前端融合模块将第四图像对应的前端处理图像进行融合,得到第四图像对应的前端融合图像;对第四图像对应的前端融合图像进行后端处理,得到对应的后端处理图像,后端处理图像为拍摄图像。
在该实现方式中,在中高照度的情况下,基于多帧第四图像,经过上述一系列处理后,可以融合得到清晰度较高、质量较好的拍摄图像。
在第一方面一种可能的实现方式中,根据第一变焦倍数和第二照度,电子设备采用第一摄像头采集图像,包括:电子设备采用第一摄像头获取第二图像,第二图像包括多帧,第一变焦倍数属于第二变焦倍数范围或第三变焦倍数范围。
根据第二变焦倍数和第二照度,电子设备采用第三摄像头采集图像,包括:电子设备采用第三摄像头获取第一图像,第一图像包括多帧,第二变焦倍数属于第一变焦倍数范围。
根据第三变焦倍数和第二照度,电子设备采用第四摄像头采集图像,包括:电子设备采用第四摄像头获取第四图像,第四图像包括多帧,第三变焦倍数属于第四变焦倍数范围。
在该实现方式中,在低照度场景下,可以根据不同变焦倍数切换不同的摄像头来 获取相应的多帧原始图像,以实现多摄协作,覆盖更大的变焦范围。
在第一方面一种可能的实现方式中,该方法还包括:对第二图像、第一图像或第四图像进行第二预处理,得到位于RAW域的第二预处理图像;其中,第二预处理用于基于网络模型将第二图像、第一图像或第四图像进行融合;对第二预处理图像进行前端处理,得到对应的前端处理图像;对前端处理图像进行后端处理,得到对应的后端处理图像,后端处理图像为拍摄图像。
在该实现方式中,在低照度场景下,基于多帧第一图像、第二图像或第四图像,利用网络模型进行多帧融合处理,以及上述其他处理,可以融合得到清晰度较高、质量较好的拍摄图像。
在第一方面一种可能的实现方式中,该方法还包括:检测到对第二控件的第十三操作;响应于第十三操作,第二控件指示为录像模式、夜景模式或HDR模式;检测到对第一界面的第十四操作;响应于第十四操作,根据第一变焦倍数,电子设备采用第一摄像头采集图像;或者,检测到对第一界面的第十五操作;响应于第十五操作,根据第二变焦倍数,电子设备采用第三摄像头采集图像;或者,检测到对第一界面的第十六操作;响应于第十六操作,根据第三变焦倍数,电子设备采用第四摄像头采集图像。
在第一方面一种可能的实现方式中,根据第一变焦倍数,电子设备采用第一摄像头采集图像,包括:电子设备采用第一摄像头获取第二图像,第二图像包括多帧,第一变焦倍数属于第二变焦倍数范围或第三变焦倍数范围。
根据第二变焦倍数,电子设备采用第三摄像头采集图像,包括:电子设备采用第三摄像头获取第一图像,第一图像包括多帧,第二变焦倍数属于第一变焦倍数范围。
根据第三变焦倍数,电子设备采用第四摄像头采集图像,包括:电子设备采用第四摄像头获取第四图像,第四图像包括多帧,第三变焦倍数属于第四变焦倍数范围。
在该实现方式中,在录像模式、夜景模式或HDR模式,也可以根据不同变焦倍数切换不同的摄像头来获取相应的多帧原始图像,以实现多摄协作,覆盖更大的变焦范围。
在第一方面一种可能的实现方式中,当第二控件指示为夜景模式时,该方法还包括:对第二图像、第一图像或第四图像进行第二预处理,得到位于RAW域的第二预处理图像;其中,第二预处理用于基于网络模型将第二图像、第一图像或第四图像进行融合;对第二预处理图像进行前端处理,得到对应的前端处理图像;对前端处理图像进行后端处理,得到对应的后端处理图像,后端处理图像为拍摄图像。
在该实现方式中,在夜景模式下,基于多帧第一图像、第二图像或第四图像,利用网络模型进行多帧融合处理,以及上述其他处理,可以融合得到清晰度较高、质量较好的拍摄图像。
在第一方面一种可能的实现方式中,当第二控件指示为录像或HDR模式时,该方法还包括:对第二图像、第一图像或第四图像进行第三预处理,得到位于RAW域的第三预处理图像;其中,第二图像包括长曝光的第二图像、短曝光的第二图像和中曝光的第二图像,第一图像包括长曝光的第一图像、短曝光的第一图像和中曝光的第一图像,第四图像包括长曝光的第四图像、短曝光的第四图像和中曝光的第四图像,第 三预处理用于将不同曝光的第二图像、第一图像或第四图像进行融合;对第三预处理图像进行前端处理,得到对应的前端处理图像;对前端处理图像进行后端处理,得到对应的后端处理图像,后端处理图像为拍摄图像。
在该实现方式中,在录像模式或HDR模式下,基于多帧第一图像、第二图像或第四图像,进行多帧不同曝光的图像的融合处理,以及上述前端处理和后端处理,可以融合得到清晰度较高、质量较好的拍摄图像。
在第一方面一种可能的实现方式中,该方法还包括:检测到对第二控件的第十七操作;响应于第十七操作,第二控件指示为大光圈模式或人像模式;检测到对第一界面的第十八操作;响应于第十八操作,电子设备采用第一摄像头采集第二图像,并采用第二摄像头采集第三图像;对第二图像、第三图像分别进行前端处理,得到各自对应的前端处理图像;利用前端融合模块分别将第二图像对应的前端处理图像进行融合,得到第二图像对应的前端融合图像;对第二图像对应的前端融合图像、第三图像对应的前端处理图像均进行后端处理,得到各自对应的后端处理图像;对第二图像和第三图像对应的后端处理图像进行深度估计处理,得到深度图像;利用深度图像对第二图像对应的后端处理图像进行虚化处理,得到对应的虚化处理图像,虚化处理图像为拍摄图像。
在该实现方式中,在大光圈模式或人像模式下,基于视场角不同、细节丰富度不同的第二图像和第三图像,进行上述一系列处理,可以融合得到前景清晰度较高、质量较好的拍摄图像。
在第一方面一种可能的实现方式中,电子设备还包括TOF摄像头,该方法还包括:检测到对第一界面的第十九操作;响应于第十九操作,电子设备采用第一摄像头采集第二图像,并采用TOF摄像头获取深度信息,利用深度信息生成深度图像;对第二图像进行前端处理,得到对应的前端处理图像;利用前端融合模块将第二图像对应的前端处理图像进行融合,得到第二图像对应的前端融合图像;对前端融合图像进行后端处理,得到对应的后端处理图像;利用深度图像对第二图像对应的后端处理图像进行虚化处理,得到对应的虚化处理图像,虚化处理图像为拍摄图像。
在该实现方式中,在大光圈模式或人像模式下,基于第二图像和表现深度信息的深度图像,进行上述一系列处理,可以融合得到前景清晰度较高、质量较好的拍摄图像。
在第一方面一种可能的实现方式中,该方法还包括:当第二控件指示为人像模式时,对虚化处理图像进行美肤处理,得到美肤处理图像,美肤处理图像为拍摄图像。在该实现方式中,在人像模式下,可以利用美肤处理对人脸区域进行美化,提高图像视觉效果。
在第一方面一种可能的实现方式中,第一预处理包括:配准、坏点校正、RAW域降噪、黑电平校正、镜头阴影校正、自动白平衡中的至少一项。在该实现方式,通过对图像进行上述第一预处理中的多个步骤,可以提高图像的视觉效果。
在第一方面一种可能的实现方式中,前端处理包括配准、坏点校正、RAW域降噪、黑电平校正、镜头阴影校正、自动白平衡、颜色校正、动态范围压缩、Gamma校正中的至少一项。在该实现方式,通过对图像进行上述前端处理中的多个步骤,可以提高 图像的视觉效果。
在第一方面一种可能的实现方式中,后端处理包括视频防抖、色彩增强、风格变换、超分辨重建中的至少一项。在该实现方式,通过对图像进行上述后端处理中的多个步骤,可以提高图像的细节丰富度和质量。
在第一方面一种可能的实现方式中,第二控件指示为录像模式时,该方法还包括:检测到对第一控件的第二十操作;响应于第二十操作,从第一变焦倍数切换为第二变焦倍数;响应于从第一变焦倍数切换为第二变焦倍数,电子设备采用第一摄像头采集图像,切换为采用第三摄像头采集图像,其中,第一摄像头为辅助摄像头;或者,检测到对第一控件的第二十一操作;响应于第二十一操作,从第一变焦倍数切换为第三变焦倍数;响应于从第一变焦倍数切换为第三变焦倍数,电子设备采用第一摄像头采集图像,切换为采用第四摄像头采集图像,其中,第一摄像头为辅助摄像头。
在该实现方式中,通过多个摄像头的切换,在实现接力变焦的同时还能提前运行相邻变焦倍数范围采集图像的摄像头,或者延迟关闭上一变焦倍数范围采集图像的摄像头,由此,使得电子设备的变焦倍数整体覆盖范围更广,而且可以切换更加平滑流畅。
第二方面,提供一种电子设备,包括摄像头模组、处理器和存储器;
摄像头模组,用于获取原始图像;
存储器,用于存储可在处理器上运行的计算机程序;
处理器,用于执行如第一方面或第一方面的任意可能的实现方式中提供的拍摄方法。
在第二方面一种可能的实现方式中,摄像头模组包括多个摄像头,多个摄像头包括:广角摄像头、主摄摄像头、黑白摄像头和长焦摄像头;多个摄像头用于对同一待拍摄场景进行拍摄;广角摄像头,用于在处理器获取拍照指令后,获取第一图像;主摄摄像头,用于在处理器获取拍照指令后,获取第二图像;黑白摄像头,用于在处理器获取拍照指令后,获取第三图像;长焦摄像头,用于在处理器获取拍照指令后,获取第四图像。
第三方面,提供一种芯片,包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有芯片的设备执行如第一方面或第一方面的任意可能的实现方式中提供的拍摄方法。
第四方面,提供一种计算机可读存储介质,计算机可读存储介质存储有计算机程序,计算机程序包括程序指令,程序指令当被处理器执行时,使处理器执行如第一方面或第一方面的任意可能的实现方式中提供的拍摄方法。
第五方面,提供一种计算机程序产品,计算机程序产品包括存储了计算机程序的计算机可读存储介质,计算机程序使得计算机执行如第一方面或第一方面的任意可能的实现方式中提供的拍摄方法。
第三方面、第四方面和第五方面的有益效果,可以参考上述第一方面的有益效果,在此不再赘述。
附图说明
图1为本申请实施例提供的一种电子设备的结构示意图;
图2为本申请实施例提供的一种电子设备的软件结构框图;
图3为本申请实施例提供的一种多个摄像头在电子设备上的排布示意图;
图4为本申请实施例提供的电子设备的界面示意图;
图5为本申请实施例提供的一种拍照模式下的拍摄方法的流程示意图;
图6为本申请实施例提供的另一种拍照模式下的拍摄方法的流程示意图;
图7为本申请实施例提供的一种录像模式下的拍摄方法的流程示意图;
图8为本申请实施例提供的又一种拍照模式下的拍摄方法的流程示意图;
图9为本申请实施例提供的又一种拍照模式下的拍摄方法的流程示意图;
图10为本申请实施例提供的又一种拍照模式下的拍摄方法的流程示意图;
图11为本申请实施例提供的又一种拍照模式下的拍摄方法的流程示意图;
图12为本申请实施例提供的又一种拍照模式下的拍摄方法的流程示意图;
图13为本申请实施例提供的一种夜景算法模块的结构示意图;
图14为图13中的大型残差块的结构示意图;
图15为本申请实施例提供的另一种录像模式下的拍摄方法的流程示意图;
图16示出了本申请实施例提供的一种利用HDR算法模块得到第三预处理图像的流程示意图;
图17示出了图16中的长曝光的第一图像、短曝光的第一图像和第三预处理图像;
图18示出了本申请实施例提供的多摄变焦切换时的视场角变化示意图;
图19示出了本申请实施例提供的一种拍照预览时变焦的界面示意图;
图20和图21分别示出了本申请实施例提供的一种拍照预览时多摄变焦的进程示意图;
图22示出了本申请实施例提供的一种录像预览时或录像时变焦的界面示意图;
图23和图24分别示出了本申请实施例提供的一种录像预览时或录像时多摄变焦的进程示意图;
图25示出了本申请实施例提供的又一种电子设备的界面示意图;
图26示出了本申请实施例提供的一种HDR模式下的拍摄方法的流程示意图;
图27示出了本申请实施例提供的又一种电子设备的界面示意图;
图28示出了本申请实施例提供的一种大光圈模式下的拍摄方法的流程示意图;
图29示出了本申请实施例提供的另一种多个摄像头在电子设备的后盖上的排布示意图;
图30示出了本申请实施例提供的另一种大光圈模式下的拍摄方法的流程示意图;
图31示出了本申请实施例提供的主摄摄像头和TOF摄像头分别拍摄的图像;
图32示出了本申请实施例提供的又一种电子设备的界面示意图;
图33示出了本申请实施例提供的一种人像模式下的拍摄方法的流程示意图;
图34示出了本申请实施例提供的另一种人像模式下的拍摄方法的流程示意图;
图35示出了本申请实施例提供的一种进行虚化处理后得到的第二增强图像;
图36示出了本申请实施例提供的又一种电子设备的界面示意图;
图37示出了本申请实施例提供的一种夜景模式下的拍摄方法的流程示意图;
图38示出了本申请实施例提供的又一种电子设备的界面示意图;
图39示出了本申请实施例提供的一种智能模式下的拍摄方法的流程示意图;
图40示出了本申请实施例提供的一种图像处理装置的结构示意图;
图41示出了本申请实施例提供的一种芯片的结构示意图。
附图标记:
41-大光圈模式;42-夜景模式;43-人像模式;44-拍照模式;45-录像模式;50-拍摄键;60-取景窗口;61-变焦选项;100-电子设备;193-摄像头;1931-主摄摄像头;1932-黑白摄像头;1933-广角摄像头;1934-长焦摄像头;1935-TOF摄像头;210-应用程序层;220-应用程序框架层;230-硬件抽象层;240-驱动层;250-硬件层。
具体实施方式
下面将结合附图,对本申请中的技术方案进行描述。
在本申请实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,在本申请实施例的描述中,“多个”是指两个或多于两个。
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。
另外,本申请的各个方面或特征可以实现成方法、装置或使用标准编程和/或工程技术的制品。本申请中使用的术语“制品”涵盖可从任何计算机可读器件、载体或介质访问的计算机程序。例如,计算机可读介质可以包括,但不限于:磁存储器件(例如,硬盘、软盘或磁带等),光盘(例如,压缩盘(compact disc,CD)、数字通用盘(digital versatile disc,DVD)等),智能卡和闪存器件(例如,可擦写可编程只读存储器(erasable programmable read-only memory,EPROM)、卡、棒或钥匙驱动器等)。另外,本文描述的各种存储介质可代表用于存储信息的一个或多个设备和/或其它机器可读介质。术语“机器可读介质”可包括但不限于,无线信道和能够存储、包含和/或承载指令和/或数据的各种其它介质。
本申请的各个方面或特征可以实现成方法、装置或使用标准编程和/或工程技术的制品。本申请中使用的术语“制品”涵盖可从任何计算机可读器件、载体或介质访问的计算机程序。例如,计算机可读介质可以包括,但不限于:磁存储器件(例如,硬盘、软盘或磁带等),光盘(例如,压缩盘(compact disc,CD)、数字通用盘(digital versatile disc,DVD)等),智能卡和闪存器件(例如,可擦写可编程只读存储器(erasable programmable read-only memory,EPROM)、卡、棒或钥匙驱动器等)。另外,本文描述的各种存储介质可代表用于存储信息的一个或多个设备和/或其它机器可读介质。术语“机器可读介质”可包括但不限于,无线信道和能够存储、包含和/或承载指令和/或数据的各种其它介质。
首先,对本申请实施例中的部分用语进行解释说明,以便于本领域技术人员理解。
1、焦距,焦距的大小标志着折光能力的大小,焦距越短,其折光能力就越大。光学镜头组件的焦距决定了该光学镜头组件拍摄的被摄物体在成像平面上所生成图像的大小。假设以相同的距离面对同一被摄物体进行拍摄,那么光学镜头组件的焦距越长,则被摄体在感光元件(charge-coupled device,CCD)上所生成的图像的放大倍数就越大。
2、光学变焦,主要是摄像模组内不同焦距的对比比例和切换。可用光学变焦倍数表示光学变焦的能力,光学变焦倍数越大,能拍摄的景物就越远。光学变焦倍数的大小与光学镜头组件的物理焦距相关。常以摄像模组的等效焦距为28mm对应1X(即1倍)光学变焦倍数。
3、RGB(red,green,blue)颜色空间,指的是一种与人的视觉系统结构相关的颜色模型。根据人眼睛的结构,将所有颜色都当作是红色、绿色和蓝色的不同组合。
4、YUV颜色空间,指的是一种颜色编码方法,Y表示亮度,U和V表示的则是色度。上述RGB颜色空间着重于人眼对色彩的感应,YUV颜色空间则着重于视觉对亮度的敏感程度,RGB颜色空间和YUV颜色空间可以互相转换。
5、像素值,指的是位于RGB颜色空间的彩色图像中每个像素对应的一组颜色分量。例如,每个像素对应一组三基色分量,其中,三基色分量分别为红色分量R、绿色分量G和蓝色分量B。
6、拜耳格式(bayer pattern)彩色滤波阵列(color filter array,CFA),图像由实际的景物转换为图像数据时,通常是图像传感器分别接收红色通道信号、绿色通道信号和蓝色通道信号,三个通道信号的信息,然后将三个通道信号的信息合成彩色图像,但是,这种方案中每个像素位置处都对应需要三块滤镜,价格昂贵且不好制作,因此,可以在图像传感器表面覆盖一层彩色滤波阵列,以获取三个通道信号的信息。拜耳格式彩色滤波阵列指的是滤镜以棋盘格式进行排布。例如,该拜耳格式彩色滤波阵列中的最小重复单元为:一个获取红色通道信号的滤镜、两个获取绿色通道信号的滤镜、一个获取蓝色通道信号的滤镜以2×2的方式排布。
7、拜耳格式图像(bayer image),即基于拜耳格式彩色滤波阵列的图像传感器输出的图像。该图像中的多种颜色的像素以拜耳格式进行排布。其中,拜耳格式图像中的每个像素仅对应一种颜色的通道信号。示例性的,由于人的视觉对绿色较为敏感,所以,可以设定绿色像素(对应绿色通道信号的像素)占全部像素的50%,蓝色像素(对应蓝色通道信号的像素)和红色像素(对应红色通道信号的像素)各占全部像素的25%。其中,拜耳格式图像的最小重复单元为:一个红色像素、两个绿色像素和一个蓝色像素以2×2的方式排布。
8、灰阶图像(gray image),灰阶图像是单通道图像,用于表示不同亮度程度,最亮为全白,最暗为全黑。也就是说,灰阶图像中的每个像素对应黑色到白色之间的不同程度的亮度。通常为了对最亮到最暗之间的亮度变化进行描述,将其进行划分,例如划分为256份,即代表256个等级的亮度,并称之为256个灰阶(第0灰阶~第255灰阶)。
以上是对本申请实施例所涉及术语的简单介绍,以下不再赘述。
本申请实施例提供的拍摄方法可以适用于各种电子设备,也可以是单独的应用程序,该应用程序可实现本申请中在不同拍摄模式下,切换不同的摄像头进行拍照并融合出清晰度较高的图像的方法。
在本申请的一些实施例中,该电子设备可以为运动相机(GoPro)、数码相机等各种摄像装置、手机、平板电脑、可穿戴设备、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)等,或者可以为其他能够进行图像处理的设备或装置,对于电子设备的具体类型,本申请实施例不作任何限制。
下文以电子设备为手机为例,图1示出了本申请实施例提供的一种电子设备100的结构示意图。
电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
其中,控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
处理器110可以运行本申请实施例提供的拍摄方法的软件代码,拍摄得到清晰度较高的图像。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry  processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还用于检测电池容量,电池循环次数,电池健康状态(漏电、阻抗)等参数。
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。
摄像头193用于捕获静态图像或视频。可以通过应用程序指令触发开启,实现拍照功能,如拍摄获取任意场景的图像。摄像头可以包括成像镜头、滤光片、图像传感器等部件。物体发出或反射的光线进入成像镜头,通过滤光片,最终汇聚在图像传感器上。成像镜头主要是用于对拍照视角中的所有物体(也可称为待拍摄场景、目标场景,也可以理解为用户期待拍摄的场景图像)发出或反射的光汇聚成像;滤光片主要是用于将光线中的多余光波(例如除可见光外的光波,如红外)滤去;图像传感器可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。图像传感器主要是用于对接收到的光信号进行光电转换,转换成电信号,之后将电信号传递给ISP转换成 数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。
其中,摄像头193可以位于电子设备100的前面,也可以位于电子设备100的背面,摄像头的具体个数以及排布方式可以根据需求设置,本申请不做任何限制。
示例性的,电子设备100包括前置摄像头和后置摄像头。例如,前置摄像头或者后置摄像头,均可以包括1个或多个摄像头。以电子设备100具有4个后置摄像头为例,这样,电子设备100启动4个后置摄像头进行拍摄时,可以使用本申请实施例提供的拍摄方法。或者,摄像头设置于电子设备100的外置配件上,该外置配件可旋转的连接于手机的边框,该外置配件与电子设备100的显示屏194之间所形成的角度为0-360度之间的任意角度。比如,当电子设备100自拍时,外置配件带动摄像头旋转到朝向用户的位置。当然,手机具有多个摄像头时,也可以只有部分摄像头设置在外置配件上,剩余的摄像头设置在电子设备100本体上,本申请实施例对此不进行任何限制。
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备100的各种功能应用以及数据处理。
内部存储器121还可以存储本申请实施例提供的拍摄方法的软件代码,当处理器110运行所述软件代码时,执行拍摄方法的流程步骤,得到清晰度较高的图像。
内部存储器121还可以存储拍摄得到的图像。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐等文件保存在外部存储卡中。
当然,本申请实施例提供的拍摄方法的软件代码也可以存储在外部存储器中,处理器110可以通过外部存储器接口120运行所述软件代码,执行拍摄方法的流程步骤,得到清晰度较高的图像。电子设备100拍摄得到的图像也可以存储在外部存储器中。
应理解,用户可以指定将图像存储在内部存储器121还是外部存储器中。比如,电子设备100目标与外部存储器相连接时,若电子设备100拍摄得到1帧图像时,可以弹出提示信息,以提示用户将图像存储在外部存储器还是内部存储器;当然,还可以有其他指定方式,本申请实施例对此不进行任何限制;或者,电子设备100检测到内部存储器121的内存量小于预设量时,可以自动将图像存储在外部存储器中。
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。
气压传感器180C用于测量气压。在一些实施例中,电子设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。
磁传感器180D包括霍尔传感器。电子设备100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当电子设备100是翻盖机时,电子设备100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。
加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。
距离传感器180F,用于测量距离。电子设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备100可以利用距离传感器180F测距以实现快速对焦。
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备100通过发光二极管向外发射红外光。电子设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备100附近有物体。当检测到不充分的反射光时,电子设备100可以确定电子设备100附近没有物体。电子设备100可以利用接近光传感器180G检测用户手持电子设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。
环境光传感器180L用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备100是否在口袋里,以防误触。
指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。
温度传感器180J用于检测温度。在一些实施例中,电子设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,电子设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,电子设备100对电池142加热,以避免低温导致电子设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。
触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194, 由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于所述骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备100的接触和分离。
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
上文详细描述了装置100的硬件系统,下面介绍装置100的软件系统。电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。需要说明的是,本申请实施例中,电子设备的操作系统可以包括但不限于塞班
Figure PCTCN2022091189-appb-000001
(Symbian)、安卓
Figure PCTCN2022091189-appb-000002
(Andriod)、
Figure PCTCN2022091189-appb-000003
苹果
Figure PCTCN2022091189-appb-000004
(iOS)、黑莓
Figure PCTCN2022091189-appb-000005
(Blackberry)、鸿蒙(HarmonyOS)等操作系统,本申请不作任何限定。
本申请实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。图2是本申请实施例的电子设备100的软件结构框图。
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为五层,从上至下分别为应用程序层210,应用程序框架层220、硬件抽象层230、驱动层240、以及硬件层250。
应用程序层210可以包括一系列应用程序包。
如图2所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。
应用程序框架层220为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层220包括一些预先定义的函数。
如图2所示,应用程序框架层220可以包括相机应用对应的接口,视图系统等。
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。
如图2所示,硬件抽象层(hardware abstraction layer,HAL)230用于将硬件抽象化。比如,硬件抽象层30包括硬件抽象层接口(HAL interface)、摄像头硬件接口层(hardware interface)、调度层、图像信号处理器节点(ISP pipeline)、摄像头服务层等。
驱动层240用于为不同的硬件设备提供驱动。比如,驱动层240可以包括摄像头驱动;数字信号处理器驱动以及图形处理器驱动。
硬件层250可以包括图像传感器(sensor)、图像处理器、数字信号处理器、图形处理器以及其他硬件设备。
在本申请中,通过调用硬件抽象层230中的硬件抽象层接口,可以实现硬件抽象层230上方的应用程序层210、应用程序框架层220与下方的驱动层240、硬件层250的连接,实现摄像头数据传输及功能控制。
其中,在硬件抽象层230中的摄像头硬件接口层中,厂商可以根据需求在此定制功能。摄像头硬件接口层相比硬件抽象层接口,更加高效、灵活、低延迟,也能更加丰富的调用ISP和GPU,来实现图像处理。其中,输入硬件抽象层230中的的图像可以来自图像传感器,也可以来自存储的图片。
硬件抽象层230中的调度层,包含了通用功能性接口,用于实现管理和控制。
硬件抽象层230中的摄像头服务层,用于访问ISP和其他硬件的接口。
下面结合捕获拍照场景,示例性说明电子设备100软件以及硬件的工作流程。
应用程序层中的相机应用可以以图标的方式显示在电子设备100的屏幕上。当相机应用的图标被用户点击以进行触发时,电子设备100开始运行相机应用。当相机应用运行在电子设备100上时,相机应用调用应用程序框架层210中的相机应用对应的接口,然后,通过调用硬件抽象层230启动摄像头驱动,开启电子设备100上的摄像头193,并通过摄像头193采集图像。此时,摄像头193可按一定工作频率进行采集,并将采集的图像进行保存和/或传输至显示屏进行显示。
为了便于理解,下面以电子设备100为具有上述软硬件结构的手机为例,先对本申请实施例提供的拍摄方法所适用的电子设备100上的摄像头和界面先进行详细说明。
本申请实施例提供的拍摄方法所适用的电子设备上至少具有多个摄像头193,例如,具有4个摄像头193。该4个摄像头分别为广角摄像头1933、主摄摄像头1931、黑白摄像头1932和长焦摄像头1934。该4个摄像头用于拍摄同一待拍摄场景。
当然,该电子设备100上还可以具有其他摄像头193,摄像头193的种类以及每种摄像头193的个数均可以根据需要进行设置,本申请实施例对此不进行任何限制。示例性的,电子设备100具有4个摄像头193,该4个摄像头193可以为超广角摄像 头、广角摄像头1933、黑白摄像头1932和长焦摄像头1934。
应理解,上述4个摄像头193在拍摄时,通常主摄摄像头1931对应的视场角范围和黑白摄像头1932对应的视场角范围大小基本相同,而广角摄像头1933对应的视场角范围大于主摄摄像头1931和黑白摄像头1932分别对应的视场角范围,广角摄像头1933的视场角与主摄摄像头1931的视场角之间或与黑白摄像头1932的视场角之间存在重叠,也就是说,广角摄像头1933可以拍摄到主摄摄像头1931拍摄的场景内容及其周边的场景内容或黑白摄像头1932的场景内容及其周边的场景内容。
长焦摄像头1934对应的视场角范围小于主摄摄像头1931对应的视场角范围,主摄摄像头1931的视场角与长焦摄像头1934的视场角之间存在重叠,也就是说,主摄摄像头1931可以拍摄到长焦摄像头1934拍摄的场景内容及其周边的场景内容。
广角摄像头1933的视场角与长焦摄像头1934的视场角之间也是存在重叠的,也就是说,广角摄像头1933可以拍摄到长焦摄像头1934拍摄的场景内容及其周边的场景内容。
其中,广角摄像头1933由于对焦距离较小,所以适合拍摄近景,并且,顾名思义,广角摄像头1933适合拍摄视场角比较大的场景。主摄摄像头1931,由于清晰度较高,比较适合拍摄肖像,而长焦摄像头1934比较适合拍摄远景特写。
应理解,通常摄像头193对应的视场角范围越小,获取的图像细节越丰富,清晰度越高,所以,主摄摄像头1931获取的图像的清晰度和黑白摄像头1932获取的图像的清晰度基本一致,而广角摄像头1933获取的图像的清晰度低于主摄摄像头1931获取的图像的清晰度,长焦摄像头1934获取的图像的清晰度高于主摄摄像头1931获取的图像的清晰度。
应理解,通常主摄摄像头1931和黑白摄像头1932的变焦倍数范围基本一致,而广角摄像头1933对应的变焦倍数相对小于主摄摄像头1931的变焦倍数,长焦摄像头1934的变焦倍数相对大于主摄摄像头1931的变焦倍数。
示例性的,广角摄像头1933对应的变焦倍数范围为[0.1,1),其中,0.1指的是0.1倍变焦倍数,1指的是1倍变焦倍数。主摄摄像头1931对应的变焦倍数范围为[1,3.9),黑白摄像头1932对应的变焦倍数范围为[1,2),长焦摄像头1934对应的变焦倍数范围[3.9,100)。
上述介绍了各个摄像头的特性,下面介绍一下多个摄像头在电子设备上的位置。
图3示出了上述4个摄像头在电子设备100的后盖上的三种排布示意图。
如图3中的(a)所示,上述4个摄像头排布在电子设备100的后盖的左上角。其中,主摄摄像头1931作为用户常用的摄像头,单独分布在靠近后盖上方的第一圆形区域中;黑白摄像头1932、广角摄像头1933和长焦摄像头1934这3个摄像头分布在靠近后盖下方的第二圆形区域中;此外,在靠近后盖下方的第二圆形区域中,还可设置闪光灯。
如图3中的(b)所示,上述4个摄像头排布在电子设备100的后盖中间的圆形区域中。其中,主摄摄像头1931作为用户常用的摄像头,设置在圆形区域的中心位置处,黑白摄像头1932、广角摄像头1933和长焦摄像头1934这3个摄像头分布在主摄摄像头1931的四周。此外,在该圆形区域中,还可以设置闪光灯。
如图3中的(c)所示,上述4个摄像头还可以以2×2的阵列形式,排布在电子设备100的后盖的上半部分。其中,主摄摄像头1931作为用户常用的摄像头,设置在后盖的左上角位置,此外,在该4个摄像头的中心还可以设置闪光灯。
应理解,上述仅为三种排布方式的示例,也可以为其他的排布方式,具体排布方式可以根据需要进行设计和更改,本申请实施例对此不进行任何限制。
还应理解,若电子设备100具有4个摄像头,该4个摄像头分别为超广角摄像头、广角摄像头1933、黑白摄像头1932和长焦摄像头1934时,也可以按照如图3所示的三种排布方式进行排布,其中,广角摄像头1933的位置相当于上述主摄摄像头1931的位置,超广角摄像头的位置相当于上述广角摄像头1933的位置,黑白摄像头1932和长焦摄像头1934的对应位置不变。
图4示出了本申请实施例提供的电子设备的界面示意图。
如图4中的(a)所示,该电子设备100上安装有相机应用。此外,还安装有多种应用,本申请实施例对此不进行任何限制。示例性的,响应于用户的触摸操作,当电子设备100运行相机应用时,电子设备100显示如图4中的(b)所示的拍摄界面。
其中,该拍摄界面包括相机应用的多种拍摄模式,如,大光圈模式41、夜景模式42、人像模式43、拍照模式44、录像模式45等。该拍摄界面还包括第二控件,第二控件为拍摄键50,拍摄键50指示当前的拍摄模式,如图4中的(b)所示,拍摄键50指示当前的拍摄模式为拍照模式45。
示例性的,响应于用户的触摸操作,当电子设备100运行相机应用时,电子设备100显示如图4中的(c)所示的拍摄界面。或者,基于电子设备100先显示如图4中的(b)所示的拍摄界面,响应于用户的滑动操作,电子设备100显示如图4中的(c)所示的拍摄界面。此处,拍摄键50指示当前的拍摄模式为录像模式45。
此外,响应于用户的滑动操作,拍摄键50还可以指示当前的拍摄模式为大光圈模式41、夜景模式42、人像模式43等。每种模式在对应的场景下使用。例如,在晚上或者光线昏暗的地方,使用夜景模式42可以使得得到的图像清晰度高;在拍摄人物时,使用人像模式43得到的图像中人物的面部特征明显。应理解,具体拍摄模式可以根据用户的操作进行切换,多个拍摄模式在电子设备界面上的排布顺序可以根据需要进行设定和更改,本申请实施例对此不进行任何限制。
如图4中的(b)和(c)所示,该拍摄界面中还包括取景窗口60,取景窗口60可用于实时显示拍照前或录像前的预览图像。另外,拍摄界面中还显示有第一控件,第一控件为变焦选项61。用户可以在变焦选项61中选择当前需要的变焦倍数,例如,0.5倍、2倍或50倍变焦倍数等。
应理解,变焦倍数指的是摄像头的光学变焦的能力。用户通过增大变焦倍数,可以将拍摄物体在取景窗口60上不断放大,通过减小变焦倍数,可以将拍摄物体在取景窗口60上不断缩小。由此,用户可以通过电子设备100上的变焦选项61进行变焦倍数的选择;也可以通过电子设备100的显示屏输入手势命令,进行变焦倍数的选择,以实现对取景窗口60显示的预览图像的调整。
基于此,图5示出了本申请实施例提供的一种拍摄方法的流程示意图。
如图5所示,该方法包括以下S10~S40。
S10、接收用户的第一操作,第一操作用于确定用户选择的当前拍摄模式,其中,拍摄模式包括:拍照模式。
示例性的,结合图4中的(a)所示,接收用户的第一操作,例如对相机应用的触摸操作,接着,相机应用启动后,结合图4中的(b)所示,拍摄键50默认指示当前拍摄模式为拍照模式44。
或者,结合图4中的(c)所示,接收用户的第一操作,例如,滑动操作,接着,结合图4中的(b)所示,拍摄键50从指示当前拍摄模式为录像模式45变为指示当前拍摄模式为拍照模式44。
应理解,第一操作还可以为其他操作,只要可以确定用户选择的当前拍摄模式即可,可选的,拍摄模式为预览模式(包括拍照模式下的预览模式,或者,录像模式下的预览模式)或录像模式,也是可以同样适用的,这样,第一操作可以是对应的相关操作,本申请实施例对此不进行任何限制。
S20、当当前拍摄模式为拍照模式时,确定待拍摄场景的照度(lightness value)和用户选择的当前变焦倍数。
应理解,照度指的是物体被照明的程度,具体指的是物体单位面积上所接受可见光的能量。黑天的街道、灯光昏暗的室内等一般是低照度的,相对的,阳光下的操场、聚光灯下的舞台等可称为中高照度。如果待拍摄场景的照度比较低,则使用电子设备对待拍摄场景进行拍摄时,会模糊不清,效果比较差。如果待拍摄场景的照度比较高,则使用电子设备对待拍摄场景进行拍摄时,会比较清楚,拍摄效果好。
可以理解的,其中待拍摄场景为当前摄像头的拍摄范围的场景。
此处,例如,可以利用电子设备100中的光电传感器检测待拍摄场景的照度。
或者,还可以根据摄像头的曝光参数,比如曝光时间、感光度、光圈等参数,以及收到的响应值来通过公式计算得到照度。其中,在曝光参数相同的情况下,响应值越高,表明待拍摄场景的照度也越高,由此,计算得到的照度的值也越大。
此处,确定用户选择的当前变焦倍数,需要先接收用户的操作,例如,该操作为滑动操作,则相应的,响应于用户对变焦选项61的滑动操作,可以确定出用户滑动停止时所指示的变焦倍数,以此作为用户期望实现的变焦倍数,即,作为用户选择的当前变焦倍数。该操作还可以是双指向外扩的操作;还可以是点击操作等,本申请实施例对此不进行任何限制。
S30、根据待拍摄场景的照度和当前变焦倍数,确定目标摄像头,并利用目标摄像头获取原始图像。
应理解,目标摄像头为广角摄像头1933、主摄摄像头1931、黑白摄像头1932和长焦摄像头1934中的一个或多个。通过预设多个摄像头与待拍摄场景的照度和变焦倍数的对应关系,则可以由待拍摄场景的照度和当前变焦倍数来确定出对应种类和个数的摄像头。
应理解,原始图像也可以称为RAW图,可以指的是位于RAW域的图像。其中,位于RAW域的图像包含较多的细节信息,清晰度较高,数据量大。原始图像的数量可以根据需要进行获取,本申请实施例对此不进行任何限制。当目标摄像头包括多个 和/或多种摄像头时,原始图像指的是该多个和/或多种摄像头分别获取的图像的总称。
应理解,当利用广角摄像头1933、主摄摄像头1931、黑白摄像头1932和长焦摄像头1934中的多个摄像头来获取原始图像时,原始图像包括视场角大小不同或者清晰度不同的多个图像。
S40、对原始图像进行处理,得到拍摄图像。
其中,对原始图像的处理可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
本申请实施例提供一种拍摄方法,在用户选择的拍摄模式为拍照模式时,根据待拍摄场景的照度和用户选择的当前变焦倍数,从广角摄像头、主摄摄像头、黑白摄像头和长焦摄像头中确定出相对应的目标摄像头,并利用目标摄像头获取原始图像,再对原始图像进行处理,得到拍摄图像。由于本申请提供的拍摄方法,在拍照时可以根据不同照度和变焦倍数切换不同的摄像头来获取原始图像,由此,可以利用不同的摄像头得到视场角大小不同、清晰度不同的原始图像,从而可以利用多摄像头协同处理,提高由原始图像处理之后得到的拍摄图像的质量。
可选地,图6示出了本申请实施例提供的另一种拍照模式下的拍摄方法的流程示意图。如图6所示,上述S20包括S21~S24。
S21、当待拍摄场景的照度大于或等于预设照度阈值时,确定当前变焦倍数所属变焦倍数范围。
应理解,预设照度阈值可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
S22、根据当前变焦倍数所属变焦倍数范围,确定目标摄像头,并利用目标摄像头获取原始图像。目标摄像头包括1个或多个摄像头。不同变焦倍数范围对应不同的摄像头。
其中,目标摄像头包括1个或多个摄像头,由此可知,该变焦倍数范围对应1个或多个摄像头,该1个或多个摄像头才能确定为目标摄像头。
基于此,当包括多个变焦倍数范围时,可以预先设定每个变焦倍数范围对应1个摄像头,该1个摄像头为该变焦倍数范围对应的目标摄像头;或者,可以预先设定每个变焦倍数范围对应多个摄像头,该多个摄像头为该变焦倍数范围对应的目标摄像头;或者,也可以预先设定一部分变焦倍数范围中的每个变焦倍数范围对应1个摄像头,另一部分变焦倍数范围中的每个变焦倍数范围对应多个摄像头,具体可以根据需要进行设定,本申请实施例对此不进行限制。
应理解,一个变焦倍数范围对应多个不同的摄像头,指的是对应多种不同类型的摄像头,例如,某个变焦倍数范围对应的目标摄像头包括长焦摄像头1934和主摄摄像头1931。
应理解,当前变焦倍数所属变焦倍数范围对应1个摄像头时,利用该1个摄像头获取原始图像,该原始图像包括该1个摄像头获取的1帧或多帧图像。当获取多帧图像时,后续对原始图像进行处理所得到的拍摄图像为该多帧图像的融合。
当前变焦倍数所属变焦倍数范围对应多个不同的摄像头时,利用该多个不同的摄像头获取原始图像,该原始图像包括多个不同的摄像头获取的多帧图像。基于此,对 原始图像进行处理所得到的拍摄图像为多个不同的摄像头获取的多帧图像的融合。
应理解,变焦倍数范围可以根据需要进行划分和更改,每个变焦倍数范围对应的目标摄像头的种类和数量可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
S23、当待拍摄场景的照度小于预设照度阈值时,确定当前变焦倍数所属变焦倍数范围。
S24、根据当前变焦倍数所属变焦倍数范围,确定目标摄像头,并利用目标摄像头获取原始图像。目标摄像头包括1个摄像头。
应理解,目标摄像头包括1个摄像头,由此可知,该变焦倍数范围对应1个摄像头,该1个摄像头才能确定为目标摄像头。
不同变焦倍数范围对应的摄像头可以相同,也可以不相同,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。示例性的,不同变焦倍数范围对应不同摄像头。例如,一个变焦倍数范围对应广角摄像头1933,另一个变焦倍数范围对应主摄摄像头1931。
应理解,根据当前变焦倍数所属变焦倍数范围可以确定出1个摄像头,作为目标摄像头,利用该摄像头获取原始图像。该原始图像包括该摄像头获取的1帧或多帧图像。基于此,当获取多帧图像时,对原始图像进行处理所得到的拍摄图像为多帧图像的融合。
可选地,当待拍摄场景的照度大于或等于预设照度阈值时,如图6所示,上述S22包括以下S221~S224。
S221、当当前变焦倍数属于第一变焦倍数范围时,目标摄像头包括广角摄像头1933和主摄摄像头1931,利用广角摄像头1933获取第一图像,并利用主摄摄像头1931获取第二图像。其中,主摄摄像头1931为辅助摄像头。
应理解,辅助摄像头获取的图像仅用于图像处理获取拍摄图像,而不用于预览显示。
此时,原始图像包括第一图像和第二图像。第一图像的数量可以为1帧,也可以为多帧,第二图像的数量可以为1帧,也可以为多帧,具体可以根据需要进行获取,本申请实施例对此不进行任何限制。
应理解,第一图像和第二图像均位于RAW域,且均为拜耳格式图像。第一图像对应的视场角范围大于第二图像对应的视场角范围,第一图像的清晰度小于第二图像的清晰度。
S222、当当前变焦倍数属于第二变焦倍数范围时,目标摄像头包括主摄摄像头1931和黑白摄像头1932,利用主摄摄像头1931获取第二图像,并利用黑白摄像头1932获取第三图像。其中,黑白摄像头1932为辅助摄像头。
此时,原始图像包括第二图像和第三图像。第二图像的数量可以为1帧也可以为多帧,第三图像的数量可以为1帧,也可以为多帧,具体可以根据需要进行获取,本申请实施例对此不进行任何限制。
应理解,第二图像和第三图像均位于RAW域,第二图像为拜耳格式图像,黑白摄像头1932获取的第三图像为灰阶图像。第二图像对应的视场角范围和第三图像对应 的视场角范围基本一致,第三图像相对于第二图像的细节丰富图更高。
S223、当当前变焦倍数属于第三变焦倍数范围时,目标摄像头包括主摄摄像头1931和长焦摄像头,利用主摄摄像头1931获取第二图像,并利用长焦摄像头1934获取第四图像。其中,长焦摄像头1934为辅助摄像头。
此时,原始图像包括第二图像和第四图像。第二图像的数量可以为1帧也可以为多帧,第四图像的数量可以为1帧,也可以为多帧,具体可以根据需要进行获取,本申请实施例对此不进行任何限制。
应理解,第二图像和第四图像均位于RAW域,且均为拜耳格式图像。第二图像对应的视场角范围大于第四图像对应的视场角图像范围。
S224、当当前变焦倍数属于第四变焦倍数范围时,目标摄像头包括长焦摄像头,利用长焦摄像头获取第四图像。
此时,原始图像包括第四图像。第四图像的数量为多帧,具体可以根据需要进行获取,本申请实施例对此不进行任何限制。
示例性的,在上述S221~S224中,第一变焦倍数范围、第二变焦倍数范围、第三变焦倍数范围、第四变焦倍数范围中包含的变焦倍数是增大的。
也就是说,第一变焦倍数范围中的最大变焦倍数小于第二变焦倍数范围中的最小变焦倍数,第二变焦倍数范围中的最大变焦倍数小于第三变焦倍数范围中的最小变焦倍数,第三变焦倍数范围中的最大变焦倍数小于第四变焦倍数范围中的最小变焦倍数。
可选的,设定第一变焦倍数范围为[f,p),第二变焦倍数范围为[p,q),第三变焦倍数范围为[q,r),第四变焦倍数范围为[r,t]。其中,f<p<q<r<t;f、p、q、r和t均为正数。
示例性的,设定电子设备100的变焦倍数范围为[0.5,100],即f=0.5,t=100。其中,设p=1,q=2,r=3.x,则第一变焦倍数范围为[0.5,1),第二变焦倍数范围为[1,2),第三变焦倍数范围为[2,3.x),x的取值范围为[0,9],x为整数;第四变焦倍数范围为[3.x,100]。示例性的,f还可以为0.1,0.2或0.3;r=3.5,3.9或3.8。
应理解,在待拍摄场景的照度大于或等于预设照度阈值,也就是在待拍摄场景的照度属于中高照度的情况下,本申请通过在变焦倍数较小的范围选用广角摄像头1933和主摄摄像头1931获取原始图像,在变焦倍数适中的范围选用主摄摄像头1931和黑白摄像头1932获取原图图像,在变焦倍数较大的范围选用长焦摄像头和主摄摄像头1931获取原始图像,由此,在后续处理时,可以在不同变焦倍数范围内对不同的两个摄像头获取到视场角范围不同、清晰度不同的图像进行处理并处理成拍摄图像,从而可以提高得到的拍摄图像的质量。
应理解,在变焦倍数更大的范围选用长焦摄像头即可以拍摄得到细节丰富,清晰度高的原始图像,因此,在后续处理时,不再需要与其他摄像头获取的低清晰度的图像一起进行处理。当然,如果电子设备还包括超长焦摄像头,该超长焦摄像头可以获取到比长焦摄像头细节更丰富、清晰度更高的图像时,本申请可以在变焦倍数较大的范围内选用长焦摄像头和超长焦摄像头获取原始图像,以提高后续得到的拍摄图像的质量。
可选地,当待拍摄场景的照度小于预设照度阈值时,如图6所示,上述S24包括 以下S241~S243。
S241、当当前变焦倍数属于第一变焦倍数范围时,目标摄像头为广角摄像头1933,利用广角摄像头1933获取第一图像。
此时,原始图像包括第一图像,第一图像包括多帧,具体数量可以根据需要获取,本申请实施例对此不进行任何限制。
其中,第一图像位于RAW域,且为拜耳格式图像。
S242、当当前变焦倍数属于第二变焦倍数范围或第三变焦倍数范围时,目标摄像头为主摄摄像头1931,利用主摄摄像头1931获取第二图像。
此时,原始图像包括第二图像,第二图像包括多帧,具体可以根据需要进行获取,本申请实施例对此不进行任何限制。
其中,第二图像位于RAW域,且为拜耳格式图像。
S243、当当前变焦倍数属于第四变焦倍数范围时,目标摄像头为长焦摄像头1934,利用长焦摄像头1934获取第四图像。
此时,原始图像包括第四图像,第四图像包括多帧,具体可以根据需要进行获取,本申请实施例对此不进行任何限制。
其中,第四图像位于RAW域,且为拜耳格式图像。
示例性的,第一变焦倍数范围、第二变焦倍数范围、第三变焦倍数范围、第四变焦倍数范围与上述S221~S224中的变焦倍数相同,在此不再赘述。
应理解,在待拍摄场景的照度小于预设照度阈值,也就是在待拍摄场景的照度属于低照度的情况下,本申请通过在变焦倍数较小的范围选用广角摄像头1933获取原始图像,在变焦倍数适中的范围选用主摄摄像头1931获取原图图像,在变焦倍数较大的范围选用长焦摄像头1934获取原始图像,由此,在后续处理时,可以在不同变焦倍数范围内对对应的摄像头获取到多帧图像进行处理并处理成1帧拍摄图像,从而可以提高得到的拍摄图像的质量。
图7示出了本申请实施例提供的另一种拍摄方法的流程示意图。
如图7所示,该方法包括以下S40~S80。
S40、接收用户的第一操作,第一操作用于确定用户选择的当前拍摄模式,其中,拍摄模式还包括:录像模式。
示例性的,结合图4中的(a)所示,接收用户的第一操作,例如对相机应用的触摸操作,接着,相机应用启动后,结合图4中的(c)所示,拍摄键50默认指示当前拍摄模式为录像模式45。
或者,结合图4中的(b)所示,接收用户的第一操作,例如,滑动操作,接着,结合图4中的(c)所示,拍摄键50从指示当前拍摄模式为拍照模式变为指示当前拍摄模式为录像模式45。
应理解,第一操作还可以为其他操作,只要可以确定用户选择的当前拍摄模式即可,本申请实施例对此不进行任何限制。
S50、当当前拍摄模式为录像模式时,确定当前变焦倍数。
示例性的,响应于用户的触摸操作,可以确定出用户点击或滑动停止时所指示的 变焦倍数,以此作为用户期望实现的变焦倍数,即,当前变焦倍数。
S60、确定当前变焦倍数所属变焦倍数范围。
应理解,变焦倍数范围可以根据需要进行划分和更改,每个变焦倍数范围对应的摄像头种类和数量可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
录像模式下的变焦倍数范围与上述拍照模式下的变焦倍数范围可以相同,也可以不相同,为了方便说明,本申请均以相同划分方式所划分得到的变焦倍数范围进行说明。
S70、根据当前变焦倍数所属变焦倍数范围,确定目标摄像头,并利用目标摄像头获取原始图像。目标摄像头包括1个摄像头。
应理解,目标摄像头为广角摄像头1933、主摄摄像头1931、黑白摄像头1932和长焦摄像头1934中的其中一个。变焦倍数范围不同,对应的摄像头可以相同,也可以不同,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
由此,根据当前变焦倍数所属变焦倍数范围,可以确定出对应的1个摄像头,利用该1个摄像头获取原始图像。该原始图像包括该1个摄像头获取的多帧图像。当获取多帧图像时,后续对原始图像进行处理所得到的拍摄图像为该多帧图像的融合。
示例性的,假设录像模式下不同变焦倍数范围与多个摄像头的对应关系,与拍照模式下,待拍摄场景的照度小于预设照度阈值时,所设定的变焦倍数范围与多个摄像头的对应关系相同,则S60的具体步骤可以参考上述对S241~S243的描述,在此不再赘述。
S80、对原始图像进行处理,得到拍摄图像。
其中,对原始图像的处理可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
本申请实施例提供一种拍摄方法,在用户选择的拍摄模式为录像模式时,根据当前变焦倍数所属变焦倍数范围,可以从广角摄像头、主摄摄像头、黑白摄像头和长焦摄像头中确定出相对应的目标摄像头,并利用目标摄像头获取原始图像,再对原始图像进行处理,得到拍摄图像。由于本申请提供的拍摄方法,在录像时可以根据不同变焦倍数切换不同的摄像头来获取原始图像,由此,可以利用不同的摄像头得到视场角大小不同、清晰度不同的多帧图像,从而可以利用多摄像头协同处理,提高由原始图像处理之后得到的拍摄图像的质量。
可选的,在录像模式下,也可以仅采用多帧融合(即摄像头出多帧,将多帧进行融合的方法),而不采用多个摄像头之间协同处理的方法,可以根据需要进行调节。
结合以上,针对拍照模式和录像模式下的拍摄方法,本申请提供如下实施例:
设定第一变焦倍数范围为[f,p),第二变焦倍数范围为[p,q),第三变焦倍数范围为[q,r),第四变焦倍数范围为[r,t]。其中,f<p<q<r<t;f、p、q、r和t均为正数。
示例性的,设定电子设备100的变焦倍数范围为[0.5,100],即f=0.5,t=100。其中,设p=1,q=2,r=3.x,则第一变焦倍数范围为[0.5,1),第二变焦倍数范围为[1,2),第三变焦倍数范围为[2,3.x),x的取值范围为[0,9],x为整数;第四变焦倍数范围为[3.x, 100]。示例性的,f还可以为0.1,0.2或0.3;r=3.5,3.9或3.8。
应理解,此处,各个数字仅为示意,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。拍摄模式可以为拍照模式或录像模式等其他模式,为了便于说明,以下实施例以拍照模式或录像模式为例进行说明。
实施例1,一种拍摄方法,如图8所示,该方法包括以下S110至S160。
接收用户的第一操作,确定出当前拍摄模式为拍照模式,并且,待拍摄场景的照度大于或等于预设照度阈值,也就是说,待拍摄场景处于中高照度。
S110、确定当前变焦倍数属于第一变焦倍数范围,确定目标摄像头。
示例性的,假设当前变焦倍数为0.5倍,则当前变焦倍数属于第一变焦倍数范围[0.5,1),由此,可以确定目标摄像头为广角摄像头1933和主摄摄像头1931,其中,主摄摄像头1931为辅助摄像头。示例性的,利用广角摄像头1933获取3帧第一图像,利用主摄摄像头1931获取3帧第二图像。
此处,第一图像和第二图像的数量仅为示意,具体可以根据需要进行获取,本申请实施例对此不进行任何限制。
其中,第一图像和第二图像均位于RAW域,第一图像和第二图像均为拜耳格式图像。
应理解,由于广角摄像头1933对应的视场角范围比主摄摄像头1931对应的视场角范围大,相应的,第一图像对应的视场角范围大于第二图像对应的视场角范围,第一图像包含第二图像的内容,也就是说,第二图像为第一图像的局部。第一图像的清晰度小于第二图像的清晰度。
S120、对3帧第一图像进行第一前端处理,得到对应的第一前端处理图像;对3帧第二图像进行第二前端处理,得到对应的第二前端处理图像。
其中,第一前端处理、第二前端处理分别可以包括:配准、坏点校正(default pixel correction,DPC)、RAW域降噪(raw域noise filter,RAWNF)、黑电平校正(black level correction,BLC)、镜头阴影校正(lens shading corrction,LSC)、自动白平衡(auto white balance,AWB)、颜色校正(color correction matrix,CCM)、动态范围压缩(dynamic range compression,DRC)、Gamma校正(Gamma)中的至少一项。
配准,指的是在同一区域内以不同成像手段所获得的不同图像的地理坐标的匹配。其中,包括几何纠正、投影变换与统一比例尺三方面的处理。
坏点校正,坏点即为全黑环境下输出图像中的白点,高亮环境下输出图像中的黑点。一般情况下,三基色通道信号应与环境亮度呈线性响应关系,但是由于图像传感器输出的信号不良,就可能出现白点或黑点,对此,可以自动检测坏点并自动修复,或者,建立坏点像素链表进行固定位置的坏像素点修复。其中,一个点即指的是一个像素。
降噪,指的是减少图像中噪声的过程。一般方法有均值滤波、高斯滤波、双边滤波等。RAW域降噪,指的是减少RAW域图像中噪声的过程。
黑电平校正,是由于图像传感器存在暗电流,导致在没有光线照射的时候,像素也对应有一定的输出电压,并且,不同位置处的像素可能对应不同的输出电压,因此,需要对没有光亮时(即,黑色)像素对应的输出电压进行校正。
镜头阴影校正,可以解决由于镜头对光线折射不均匀导致镜头周围出现阴影的情况。
自动白平衡,是为了消除光源对图像传感器成像的影响,模拟人类视觉的颜色恒常性,保证在任何场景下看到的白色是真正的白色,因此,需要对色温进行校正,自动将白平衡调到合适的位置。
颜色校正,由于摄像头获取的图像,与人们期望的颜色会存在一定差距,因此需要对颜色进行校正。又因为自动白平衡已经将白色校准了,因此,可以通过颜色校正来校准除白色以外的其他颜色。
动态范围压缩,由于自然界真实场景所呈现出来的亮度值具有非常大的动态范围,因此,摄像头在获取图像时无法采集自然界真实场景所呈现处理的全部亮度值,但是为了尽可能使获取到的图像与自然界真实场景接近,需要将采集的图像的宽像素值范围(如0~4095),调整为窄像素值范围(如0~255),这一过程即为动态范围压缩。
Gamma校正,指的是对图像的伽马曲线进行编辑,以对图像进行非线性色调编辑的方式,检出图像中的深色部分和浅色部分,并使两者按比例增大,从而提高图像对比度效果。
应理解,第一前端处理可以包括上述一个或多个处理步骤,当第一前端处理包括多个处理步骤时,该多个处理步骤的顺序可以根据需要进行调整,本申请实施例对此不进行任何限制。此外,第一前端处理还可以包括其他步骤,具体可以根据需要进行增加,本申请实施例对此不进行任何限制。
例如,第一前端处理还可以包括:去马赛克(demosaic)和色彩空间转换。
应理解,去马赛克,由于拜耳格式图像中的每个像素只对应有一个通道的颜色信息,因此,可以利用周围像素信息来对其他颜色进行估算,例如,通过线性插值的方式,可以确定出每个像素缺失的另外两个通道的颜色信息,从而恢复出图像中所有像素的所有通道信息。去马赛克的过程,相当于将图像从RAW域转换至RGB域。
此处,色彩空间转换指的是从RGB域转YUV域。由此,可以将去马赛克后的图像由RGB域转至YUV域,以降低后续存储和传输的数据量,节省带宽。
还应理解,第二前端处理与第一前端处理可以相同,也可以不同,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
S130、利用第一前端融合模块对3帧第一图像对应的第一前端处理图像进行融合,得到对应的第一前端融合图像;利用第二前端融合模块对3帧第二图像对应的第二前端处理图像进行融合,得到对应的第二前端融合图像。前端融合模块包括第一前端融合模块和第二前端融合模块。
应理解,当第一前端处理和第二前端处理均包括去马赛克和色彩空间转换时,第一图像经过第一前端处理后,所对应的第一前端处理图像位于YUV域。第二图像经过第二前端处理后,所对应的第二前端处理图像位于YUV域。此时,第一前端融合模块和第二前端融合模块相应均包括YUV域的多帧融合模块,以实现YUV域的多帧融合功能。由此,经第一前端融合模块处理所得到的第一前端融合图像、经第二前端融合模块处理所得到的第二前端融合图像均位于YUV域。
当第一前端处理和第二前端处理均不包括去马赛克和色彩空间转换时,第一图像 经过第一前端处理后,所对应的第一前端处理图像还是位于RAW域。第二图像经过第二前端处理后,所对应的第二前端处理图像还是位于RAW域。此时,第一前端融合模块相应包括RAW域的多帧融合模块,以实现RAW域的多帧融合功能。由此,经第一前端融合模块处理所得到的第一前端融合图像也位于RAW域。
可选地,第一前端融合模块和第二前端融合模块还包括:高动态范围模块。
由于原始图像是在一定曝光量下曝光的,存在较暗部分或较亮部分的细节显示不充分的问题,第一前端处理图像和第二前端处理图像依然存在该问题,因此,可以通过高动态范围模块来对第一前端处理图像和第二前端处理图像进行处理,使待拍摄场景中暗区在图像中可以变亮,亮区在图像可以变暗,从而使得处理后的图像可以呈现暗区和亮区中的更多细节。
可选地,第一前端融合模块和第二前端融合模块还包括:超分辨率(super resolution,SR)模块。
经超分辨率模块处理,可以由多张低分辨率图像合成1帧高分辨率图像,或者,从单张低分辨率图像获取高分辨率图像。由此,将第一前端处理图像、第二前端处理图像传输至超分辨率模块中,可以提高前端处理图像的分辨率,得到更高分辨率的第一前端融合图像和/或第二前端融合图像。
应理解,第一前端融合模块和第二前端融合模块可以相同,也可以不相同,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
当前端融合模块包括YUV域多帧融合或RAW域多帧融合,以及HDR模块、SR模块中的至少一个时,可以根据需要对其顺序进行调整。当然,前端融合模块还可以包括其他功能模块,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
在此基础上,多帧第一图像可以包括长曝光的第一图像、短曝光的第一图像和中曝光的第一图像;多帧第二图像可以包括长曝光的第二图像、短曝光的第二图像和中曝光的第二图像。
当多帧第一图像包括不同曝光程度的第一图像,多帧第二图像包括不同曝光程度的第二图像时,相应的,多帧第一图像对应的第一前端处理图像包括不同曝光程度的第一前端处理图像,多帧第二图像对应的第二前端处理图像包括不同曝光程度的第二前端处理图像,基于此,第一前端融合模块将不同曝光程度的多帧第一前端处理图像进行融合后,可以增加图像中暗区和过曝区域的细节,提升动态范围,从而可以提升对应的第一前端融合图像的清晰度。同理,第二前端融合模块将不同曝光程度的多帧第二前端处理图像进行融合后,可以增加图像中暗区和过曝区域的细节,提升动态范围,从而可以提升对应的第二前端融合图像的清晰度。
应理解,长曝光的图像指的是拍摄时经过较长时间曝光所得到的图像,短曝光的图像指的是拍摄时经过较短时间曝光所得到的图像,其中,长曝光和短曝光都是相对中曝光的时间而言的。曝光时间即为图像传感器采集图像时,进行光电转换所使用的时间。
示例性的,中曝光的时间为5毫秒,短曝光的时间为1/50毫秒,长曝光的时间为100毫秒。
S140、对3帧第一图像对应的第一前端融合图像进行第一后端处理,得到对应的第一后盾处理图像;对3帧第二图像对应的第二前端融合图像均进行第二后端处理,得到对应的第二后端处理图像。
其中,第一后端处理和第二后端处理可以分别包括视频防抖、色彩增强(color enhancement,CE)、2D查找表,即,风格变换(2dimensional look up table,2DLUT)、超分辨重建中的至少一项。
视频防抖,指的是:例如利用块匹配法,去除拍摄过程中轻微抖动造成的图像模糊。
色彩增强,以使得原有的不饱和的色彩信息变得饱和、丰富。
风格变换,指的是颜色的风格变换,即颜色滤镜,使原始的图像风格变成其他的图像风格,常见的风格比如,电影风格、日系风格、阴森风格等。
应理解,第一后端处理可以包括上述一个或多个处理步骤,当第一后端处理包括多个处理步骤时,该多个处理步骤的顺序可以根据需要进行调整,本申请实施例对此不进行任何限制。此外,第一后端处理还可以包括其他步骤,本申请实施例对此不进行任何限制。
例如,当第一前端处理包括去马赛克和色彩空间转换时,由于第一前端融合图像位于YUV域,相应的,第一后端处理还可以包括YUV域降噪,以对位于YUV域的图像进行降噪处理。
当第一前端处理不包括去马赛克和色彩空间转换时,由于第一前端融合图像位于RAW域,相应的,第一后端处理还可以包括去马赛克、色彩空间转换和YUV域降噪,以将位于RAW域的图像转换成位于YUV域的图像,减小后续处理的数据量,节省带宽。
应理解,第一后端处理图像和第二后端处理图像位于YUV域。
还应理解,第二后端处理与第一后端处理,可以相同,也可以不相同,具体可以根据需进行设置,本申请实施例对此不进行任何限制。
S150、对3帧第一图像对应的第一后端处理图像进行畸变校正,得到校正图像。
应理解,利用广角摄像头1933在获取第一图像时,由于广角摄像头1933中的透镜对色光的弯曲能力不同,使得成像点与光轴距离不同,导致侧向放大率随之不同,从而造成实际成像失真,产生畸变。因此,需要对第一图像对应的第一后端处理图像进行畸变校正,使其恢复正常。
示例性的,可以利用透视投影方式进行畸变校正。其中,透视投影方式,也称为透视变换。例如,后端处理图像中包含有书本,可以先确定3帧第一图像对应的第一后端处理图像中的书本的4个角对应的点的坐标,以及3帧第二图像对应的第二后端处理图像中的书本的4个角对应的点的坐标,通过两组坐标从而计算出透视变换的变换矩阵,之后对3帧第一图像对应的第一后端处理图像中的书本执行变换矩阵的变换,以此来实现校正。
应理解,校正图像位于YUV域。
S160、利用后端融合模块将校正图像和第二图像对应的第二后端处理图像进行融合,得到第二融合图像,第二融合图像为拍摄图像。
由于第一图像对应的视场角范围和第二图像对应的视场角范围不同,经上述处理后的校正图像和第二图像对应的后端处理图像之间依然存在视场角范围不同的问题,由此,可以利用第二融合模块进行融合处理。也就是说,第二融合模块可以包括视场角融合模块,用于实现对应不同视场角范围的图像的融合。
基于此,第一图像对应的校正图像和第二图像对应的第二后端处理图像进行融合时,校正图像与第一图像对应的视场角范围相同,第二后端处理图像与第二图像对应的视场角范围相同,融合后的第二融合图像对应的视场角范围与第一图像对应的视场角范围相同。假设广角摄像头1933和主摄摄像头1931的视场角中心点一致,又因为第二图像的清晰度较高,相应的,第二后端处理图像的清晰度较高,由此,将校正图像与第二图像对应的第二后端处理图像进行融合之后,将会提升校正图像中对应第二图像的视场角范围的区域内的清晰度,使得拍摄图像清晰度提高。
当然,后端融合模块还可以包括其他功能模块,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。此外,本实施例中的后端融合模块与第一前端融合模块、第二前端融合模块也可以相同,均用于对位于YUV域的图像进行融合。
应理解,后端融合图像位于YUV域。后端融合图像将被作为拍摄图像进行在电子设备100的界面上进行显示,或者,仅进行存储,具体可以根据需要进行传输,本申请实施例对此不进行任何限制。
在该实施例中,基于视场角大小不同、清晰度不同的第一图像和第二图像,经过上述一系列处理后,可以融合得到清晰度较高、质量较好的拍摄图像。
还应理解,上述过程仅为一种示例,具体可以根据需要进行顺序上的调整,当然,还可以增加或减少步骤,本申请实施例对此不进行任何限制。
实施例2a,一种拍摄方法,如图9中的(a)所示,该方法包括以下S210至S270。
接收用户的第一操作,确定出当前拍摄模式为拍照模式,待拍摄场景处于中高照度。
S210、确定当前的变焦倍数属于第二变焦倍数范围,确定目标摄像头。
示例性的,假设当前变焦倍数为1.5,则当前变焦倍数属于第二变焦倍数范围[1,2)内,由此,可以确定目标摄像头为主摄摄像头1931和黑白摄像头1932,其中,黑白摄像头1932为辅助摄像头。示例性的,利用主摄摄像头1931获取6帧第二图像,利用黑白摄像头1932获取2帧第三图像。
此处,第二图像和第三图像的数量仅为示意,具体可以根据需要进行获取,本申请实施例对此不进行任何限制。
其中,第二图像位于RAW域,第二图像为拜耳格式图像,黑白摄像头1932获取的第三图像为灰阶图像。
应理解,第二图像对应的视场角范围和第三图像对应的视场角范围基本一致,第三图像的相对于第二图像细节丰富度更高。
S220、对6帧第二图像进行第一预处理,得到6帧位于RAW域的第一预处理图像。
其中,第一预处理可以包括:配准、坏点校正、RAW域降噪、黑电平校正、镜头 阴影校正、自动白平衡中的至少一项。
对配准、坏点校正、RAW域降噪、黑电平校正、镜头阴影校正、自动白平衡的描述,可以参考上述S120中的内容,在此不再赘述。
应理解,第一预处理可以包括上述一个或多个处理步骤,当第一预处理包括多个处理步骤时,该多个处理步骤的顺序可以需要进行调整,本申请实施例对此不进行任何限制。此外,第一预处理还可以包括其他步骤,具体可以需要进行增加,本申请实施例对此不进行任何限制。
S230、利用预融合模块对6帧第二图像对应的第一预处理图像进行融合,得到6帧第二图像对应的1帧预融合图像。
应理解,6帧第二图像对应的6帧第一预处理图像均位于RAW域,此时,对应的预融合模块相应包括RAW域的多帧融合模块,以实现RAW域的多帧融合功能。由此,经预融合模块处理所得到的预融合图像还是位于RAW域。
由于用户使用相机应用时,使用主摄摄像头1931以及主摄摄像头1931对应的第二变焦倍数范围的频次较高,概率较大,因此,为了提高图像的质量以及用户的体验,针对主摄摄像头1931获取的第二图像,需要在RAW域上进行处理,以保留更多的细节。
S240、对6帧第二图像对应的1帧预融合图像进行第三前端处理,得到对应的第三前端处理图像;对2帧第三图像进行第四前端处理,得到对应的第四前端处理图像。
其中,对第三前端处理、第四前端处理的描述可以参考上述S120中的内容,在此不再赘述。第三前端处理和第四前端处理,可以相同,也可以不同,本申请实施例对此不进行限制。
应理解,当第三前端处理包括去马赛克和色彩空间转换时,第二图像对应的预融合图像经过第三前端处理后,所对应的第三前端处理图像位于YUV域。当第三前端处理不包括去马赛克和色彩空间转换时,第二图像对应的预融合图像经过第三前端处理后,所对应的第三前端处理图像还是位于RAW域。
示例性的,本实施例中,第二图像对应的预融合图像位于RAW域,为了减少数据量,节省带宽,提高后续处理的速度,针对预融合图像进行的第三前端处理包括去马赛克和色彩空间转换,以使得预融合图像进行前端处理后,对应的第三前端处理图像位于YUV域。
应理解,对于第三图像,由于第三图像为灰阶图像(图中所示为Y图),因此,针对第三图像进行的第四前端处理不包括去马赛克和色彩空间转换。这样,第三图像进行前端处理后,对应的第四前端处理图像还是灰阶图像。
还应理解,本实施例中的第三前端处理、第四前端处理与上述实施例中的前端处理,可以相同,也可以不同,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
S250、利用第三前端融合模块,对2帧第三图像对应的第四前端处理图像进行融合,得到2帧第三图像对应的第三前端融合图像。前端融合模块还包括:第三前端融合模块。
应理解,由于第三图像为灰阶图像,进行第四前端处理时,不会进行去马赛克和 色彩空间转换,那么,第三图像经过第四前端处理后,所对应的第四前端处理图像还是灰阶图像。此时,对应的第三前端融合模块相应包括位于YUV域的多帧融合模块,以实现灰阶图像的多帧融合功能。由此,经第三前端融合模块处理所得的第三前端融合图像也为灰阶图像。
应理解,第三前端融合模块与第一前端融合模块、第二前端融合模块可以相同、也可以不相同,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
当然,第三前端融合模块还可以包括其他功能模块,具体可以参考上述S130中对第一前端融合模块或第二前端融合模块的描述,在此不再赘述。
在此基础上,当第三图像为多帧时,多帧第三图像可以包括长曝光的第三图像、短曝光的第三图像和中曝光的第三图像。
当多帧第三图像包括不同曝光程度的第三图像时,相应的,多帧第三图像对应的第四前端处理图像包括不同曝光程度的第四前端处理图像,基于此,第三前端融合模块将不同曝光程度的多帧第四前端处理图像进行融合后,可以增加图像中暗区和过曝区域的细节,提升动态范围,从而可以提升对应的第三前端融合图像的清晰度。
S260、对6帧第二图像对应的第三前端处理图像进行第三后端处理,得到对应的第三后端处理图像;对2帧第三图像对应的第三前端融合图像进行第四后端处理,得到对应的第四后端处理图像。
其中,对第三后端处理、第四后端处理的描述可以参考上述S140中的内容,在此不再赘述。
应理解,第二图像对应的后端处理图像位于YUV域,第三图像对应的后端处理图像为灰阶图像。
还应理解,在本实施例中,第三后端处理与第四后端处理,可以相同,也可以不同;此外,本实施例中的第三后端处理和第四后端处理,与上述实施例中的后端处理,可以相同,也可以不同,具体可以根据需要进行设置,本申请实施例对此不进行任何限制。
S270、利用后端融合模块将第二图像对应的第三后端处理图像、第三图像对应的第四后端处理图像进行融合,得到后端融合图像,后端融合图像为拍摄图像。
由于第二图像为拜耳格式图像,第三图像为灰阶图像,两者色彩不同,经上述处理后,第二图像对应的第三后端处理图像和第三图像对应的第四后端处理图像依然存在颜色不同的问题,由此,可以利用后端融合模块进行融合处理。也就是说,后端融合模块可以包括黑白彩色融合模块,用于实现不同颜色的图像的融合。
基于此,第二图像对应的第三后端处理图像和第三图像对应的第四后端处理图像进行黑白彩色融合,得到后端融合图像,既保留了第二图像对应的颜色信息,又融合了第三图像对应的亮度信息,又因为第三图像相对于第二图像清晰度较高,所以融合后可以提升图像的质量,得到清晰度较高的后端融合图像。
当然,后端融合模块还可以包括其他功能模块,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
应理解,本实施例中的后端融合模块,与上述实施例中的后端融合模块,可以相 同,也可以不相同,具体可以根据需进行设置,本申请实施例对此不进行任何限制。
应理解,得到的后端融合图像位于YUV域。后端融合图像将被作为拍摄图像进行在电子设备的界面上进行显示,或者,仅进行存储,具体可以根据需要进行传输,本申请实施例对此不进行任何限制。
在该实施例中,基于细节丰富度不同的第二图像和第三图像,经过上述一系列处理后,可以融合得到清晰度较高、质量较好的拍摄图像。
还应理解,上述过程仅为一种示例,具体可以根据需要进行顺序上的调整,当然,还可以增加或减少步骤,本申请实施例对此不进行任何限制。
实施例2b,一种拍摄方法,如图9中的(b)所示,该方法包括以下S1401至S1480。
接收用户的第一操作,确定出当前拍摄模式为拍照模式,待拍摄场景处于中高照度。
S1401、确定当前的变焦倍数属于第二变焦倍数范围,确定目标摄像头。
示例性的,假设当前变焦倍数为1.5,则当前变焦倍数属于第二变焦倍数范围[1,2)内,由此,可以确定目标摄像头为主摄摄像头1931和黑白摄像头1932,其中,黑白摄像头1932为辅助摄像头。
S1402、根据摄像头采集的预览图像,判断待拍摄场景是否为HDR场景。
其中,高动态范围图像(High-Dynamic Range,简称HDR),其为高动态范围的简称。HDR场景包括风景、强光和/或弱光下的场景。
应理解,当前取景窗口中的预览图像是主摄摄像头1931获取并发送给显示屏进行显示的。
示例性的,可以利用以下方式判断待拍摄场景是否为HDR场景。
例如,先根据预览图像中的每个像素对应的红绿蓝三基色像素值,计算得到每个像素对应的灰阶值,应理解,灰阶值用于表示每个像素对应的亮度情况。
若图像位深度为8bit,则像素对应灰阶值的取值范围为[0,255],由此,可以对预览图像中的像素对应的灰阶值进行统计,生成亮度直方图。其中,亮度直方图的横轴用于表示不同的灰阶值,纵轴用于表示每个灰阶值对应的次数。
然后,根据亮度直方图,可以确定出属于低灰阶范围的像素,例如灰阶值位于0~5范围中的像素在整个预览图像中的第一占比;还可以确定出属于高灰阶范围的像素,例如灰阶值位于245~255范围中的像素在整个预览图像中的第二占比。
基于此,根据第一占比和第二占比,可以判断暗区的像素和亮区的像素在整个预览图像中的占比,当该占比满足预设条件时,可以确定该预览图像对应的待拍摄场景为HDR场景。当该占比不满足预设条件时,则确定待拍摄场景不为HDR场景。
应理解,根据亮度直方图确定第一占比和第二占比时,低灰阶范围和高灰阶范围的取值可以根据需要进行设置和更改,上述仅为一种示例,本申请实施例对此不进行任何限制。
S1403、如果不是HDR场景,则利用主摄摄像头1931获取第二图像,利用黑白摄像头1932获取第三图像,然后,针对第二图像和第三图像执行上述实施例2a中的相关步骤,以获取拍摄图像。
S1404、如果是HDR场景,则执行以下S1410至S1480。
S1410、利用主摄摄像头1931获取9帧第二图像,利用黑白摄像头1932获取2帧第三图像。此处,主摄摄像头1931获取的9帧第二图像包括6帧中曝光的第二图像、1帧长曝光的第二图像和2帧短曝光的第二图像。
此处,第二图像的数量,第二图像中的中曝光、短曝光、长曝光的图像的数量,以及第三图像的数量均仅为示意,具体可以根据需要进行获取,本申请实施例对此不进行任何限制。
其中,第二图像位于RAW域,第二图像为拜耳格式图像,黑白摄像头1932获取的第三图像为灰阶图像。
应理解,第二图像对应的视场角范围和第三图像对应的视场角范围基本一致,第三图像的相对于第二图像细节丰富度更高。
S1420、对6帧中曝光的第二图像进行第一预处理,得到6帧位于RAW域的第一预处理图像。
其中,第一预处理可以包括:配准、坏点校正、RAW域降噪、黑电平校正、镜头阴影校正、自动白平衡中的至少一项。
对配准、坏点校正、RAW域降噪、黑电平校正、镜头阴影校正、自动白平衡的描述,可以参考上述S120中的内容,在此不再赘述。
应理解,第一预处理可以包括上述一个或多个处理步骤,当第一预处理包括多个处理步骤时,该多个处理步骤的顺序可以需要进行调整,本申请实施例对此不进行任何限制。此外,第一预处理还可以包括其他步骤,具体可以需要进行增加,本申请实施例对此不进行任何限制。
S1430、利用预融合模块对6帧中曝光的第二图像对应的第一预处理图像进行融合,得到6帧第一预处理图像对应的1帧预融合图像。
应理解,6帧中曝光的第二图像对应的6帧第一预处理图像均位于RAW域,此时,对应的预融合模块相应包括RAW域的多帧融合模块,以实现RAW域的多帧融合功能。由此,经预融合模块处理所得到的预融合图像还是位于RAW域。
当然,预融合模块还可以包括其他功能的模块,本申请实施例对此不进行任何限制。本实施例中的预融合模块与上述实施例2a中的预融合模块可以相同,也可以不相同,具体可以根据需要进行设置,本申请实施例对此不进行任何限制。
应理解,由于用户使用相机应用时,使用主摄摄像头1931以及主摄摄像头1931对应的第二变焦倍数范围的频次较高,概率较大,因此,为了提高图像的质量以及用户的体验,针对主摄摄像头1931获取的长曝光的第二图像、中曝光的第二图像和短曝光的第二图像,在进行第一预处理和利用预融合模块进行融合处理时,需要在RAW域上进行处理,以保留更多的细节,提高后续图像的质量。上述在颜色空间RAW处理图像技术效果,对于其他实施例也同样适用,在此不再赘述。
S1440、对6帧中曝光的第二图像对应的1帧预融合图像进行第五前端处理,得到对应的1帧第五前端处理图像;对1帧长曝光的第二图像、2帧短曝光的第二图像进行第六前端处理,得到对应的3帧第六前端处理图像;以及,对2帧第三图像进行第七前端处理,得到对应的2帧第七前端处理图像。
其中,对第五前端处理、第六前端处理和第七前端处理的描述可以参考上述S120中的内容,在此不再赘述。
应理解,当对预融合图像进行的第五前端处理包括去马赛克时,对应得到的第五前端处理图像位于RGB域;当对预融合图像进行的第五前端处理包括去马赛克和色彩空间转换时,对应得到的前端处理图像位于YUV域;当对预融合图像进行的第五前端处理不包括去马赛克和色彩空间转换时,对应得到的第五前端处理图像位于RAW域。
同理,当对1帧长曝光的第二图像、2帧短曝光的第二图像进行的第六前端处理包括去马赛克时,对应得到的第六前端处理图像位于RGB域;当对1帧长曝光的第二图像、2帧短曝光的第二图像进行的第六前端处理包括去马赛克和色彩空间转换时,对应得到的前端处理图像位于YUV域;当对1帧长曝光的第二图像、2帧短曝光的第二图像进行的第六前端处理不包括去马赛克和色彩空间转换时,对应得到的第六前端处理图像位于RAW域。
示例性的,本申请提供的实施例2b中,对预融合图像进行的第五前端处理、对长曝光的第二图像、短曝光的第二图像进行的进行第六前端处理均包括去马赛克,由此,对应得到的第五前端处理图像和第六前端处理图像均位于RGB域,为彩色图像。
此外,对于第三图像,由于第三图像为灰阶图像(图中所示为Y图),因此,对第三图像进行的第七前端处理不包括去马赛克和色彩空间转换。这样,第三图像进行第七前端处理后,对应的第七前端处理图像还是灰阶图像。
还应理解,在本实施例中,第五前端处理、第六前端处理和第七前端处理中除了去马赛克和色彩空间转换以外的其他处理步骤可以相同,也可以不同,本申请实施例对此不进行任何限制。此外,本实施例中第五前端处理、第六前端处理和第七前端处理与上述实施例中的前端处理所包括的内容,可以相同,也可以不同,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
S1450、利用中间融合模块,对预融合图像对应的第五前端处理图像、长曝光的第二图像、短曝光的第二图像对应的第六前端处理图像进行融合,得到1帧中间融合图像。
应理解,当对预融合模块进行的第五前端处理,以及对长曝光的第二图像、短曝光的第二图像进行的第六前端处理均包括去马赛克时,得到的预融合图像对应的第五前端处理图像位于RGB域,得到的长曝光的第二图像、短曝光的第二图像对应的第六前端处理图像也位于RGB域。此时,中间融合模块相应包括位于RGB域的多帧融合模块,以实现不同曝光程度的彩色图像的多帧融合。由此,经中间融合模块处理所得的中间融合图像也位于RGB域,为彩色图像。
当对预融合模块进行的第五前端处理,以及对长曝光的第二图像、短曝光的第二图像进行的第六前端处理均包括去马赛克和色彩空间转换时,得到的预融合图像对应的第五前端处理图像位于YUV域,得到的长曝光的第二图像、短曝光的第二图像对应的第六前端处理图像也位于YUV域。此时,中间融合模块相应包括位于YUV域的多帧融合模块,以实现不同曝光程度的位于YUV域的图像的多帧融合。由此,经中间融合模块处理所得的中间融合图像也位于YUV域。
当对预融合模块进行的第五前端处理,以及对长曝光的第二图像、短曝光的第二图像进行的第六前端处理均不包括去马赛克和色彩空间转换时,得到的预融合图像对应的第五前端处理图像位于RAW域,得到的长曝光的第二图像、短曝光的第二图像对应的第六前端处理图像也位于RAW域。此时,中间融合模块相应包括位于RAW域的多帧融合模块,以实现不同曝光程度的位于RAW域的图像的多帧融合。由此,经中间融合模块处理所得的中间融合图像也位于RAW域。
示例性的,在本实施例中,第五前端处理、第六前端处理和第七前端处理图像均包括去马赛克,对应得到的第五前端处理图像、第六前端处理图像和第七前端处理图像均位于RGB域,为彩色图像,相应的,中间融合模块包括位于RGB域的多帧融合模块,由此,利用中间融合模块,得到的中间融合图像也位于RGB域。
当然,中间融合模块还可以包括其他功能模块,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
S1460、利用第三前端融合模块,对2帧第三图像对应的第七前端处理图像进行融合,得到对应的1帧第三前端融合图像。
其中,对第三前端融合模块的描述,可以参考上述S250的内容,在此不再赘述。
S1470、对中间融合图像进行第五后端处理,得到对应的第五后端处理图像、对第三前端融合图像进行第六后端处理,得到对应的第六后端处理图像。
其中,对第五后端处理、第六后端处理的描述可以参考上述S140中的内容,在此不再赘述。
应理解,第三前端融合图像为灰阶图像,对应的后端处理图像也为灰阶图像。
应理解,当中间融合图像位于RGB域时,对中间融合图像进行的第五后端处理需包括色彩空间转换,以使得对应得到的第五后端处理图像位于YUV域;当中间融合图像位于YUV域时,对中间融合图像进行的第五后端处理则不需要包括色彩空间转换;当中间融合图像位于RAW域时,对中间融合图像进行的第五后端处理则需要包括去马赛克和色彩空间转换。
示例性的,在本实施例中,由于中间融合图像位于RGB域,因此,对中间融合图像进行的第五后端处理需包括色彩空间转换,以使得对应得到的第五后端处理图像位于YUV域,与第三前端融合图像对应的第六后端处理图像格式一致,从而便于后续进行融合处理。
还应理解,在本实施例中,第五后端处理和第六后端处理中除了去马赛克和色彩空间转换以外的其他处理步骤可以相同,也可以不同,本申请实施例对此不进行任何限制。此外,本实施例中的第五后端处理、第六后端处理与上述实施例中的后端处理所包括的内容,可以相同,也可以不同,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
S1480、利用后端融合模块将第二图像对应的第五后端处理图像、第三图像对应的第六后端处理图像进行融合,得到后端融合图像,后端融合图像为拍摄图像。
由于第二图像为拜耳格式图像,第三图像为灰阶图像,两者色彩不同,经上述处理后,第二图像对应的第五后端处理图像和第三图像对应的第六后端处理图像依然存在颜色不同的问题,由此,可以利用后端融合模块进行融合处理。也就是说,后端融 合模块可以包括黑白彩色融合模块,用于实现不同颜色的图像的融合。
基于此,第二图像对应的第五后端处理图像和第三图像对应的第六后端处理图像进行黑白彩色融合,得到后端融合图像,既保留了第二图像对应的颜色信息,又融合了第三图像对应的亮度信息,又因为第三图像相对于第二图像清晰度较高,所以融合后可以提升图像的质量,得到清晰度较高的后端融合图像。
当然,后端融合模块还可以包括其他功能模块,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
应理解,后端融合图像位于YUV域。后端融合图像将被作为拍摄图像进行在电子设备的界面上进行显示,或者,仅进行存储,具体可以根据需要进行传输,本申请实施例对此不进行任何限制。
还应理解,上述过程仅为一种示例,具体可以根据需要进行顺序上的调整,当然,还可以增加或减少步骤,本申请实施例对此不进行任何限制。
实施例3,一种拍摄方法,如图10所示,该方法包括以下S310至S350。
接收用户的第一操作,确定出当前拍摄模式为拍照模式,待拍摄场景处于中高照度。
S310、确定当前的变焦倍数属于第三变焦倍数范围,确定目标摄像头。
示例性的,假设当前变焦倍数为2.6倍,则当前变焦倍数属于第三变焦倍数范围[2,3.x)内,由此,可以确定目标摄像头为主摄摄像头1931和长焦摄像头1934,其中,长焦摄像头1934为辅助摄像头。示例性的,利用主摄摄像头1931获取3帧第二图像,利用长焦摄像头1934获取3帧第四图像。
此处,第二图像、第四图像的数量仅为示意,具体可以根据需要进行获取,本申请实施例对此不进行任何限制。
其中,第二图像和第四图像均位于RAW域,且均为拜耳格式图像。第二图像对应的视场角范围大于第四图像对应的视场角图像范围,第四图像的清晰度高于第二图像的清晰度。
S320、对3帧第二图像进行第八前端处理,得到对应的3帧第八前端处理图像;对3帧第四图像进行第九前端处理,得到对应的3帧第九前端处理图像。
其中,对第八前端处理、第九前端处理的描述可以参考上述S120中的内容,在此不再赘述。
应理解,当第八前端处理包括去马赛克和色彩空间转换时,第二图像经过第八前端处理后,所对应的第八前端处理图像位于YUV域。第四图像经过第九前端处理后,所对应的第九前端处理图像也位于YUV域。当第八前端处理不包括去马赛克和色彩空间转换时,第二图像经过第八前端处理后,所对应的第八前端处理图像还是位于RAW域。第四图像经过第九前端处理后,所对应的第九前端处理图像还是位于RAW域。
示例性的,本申请提供的实施例3中,为了减小数据量,节省带宽,第八前端处理和第九前端处理包括去马赛克和色彩空间转换,以使得第二图像进行第八前端处理后、第三图像进行第九前端处理后,对应的第八前端处理图像和第九前端处理图像位 于YUV域。
还应理解,在本实施例中,第八前端处理和第九前端处理,可以相同,也可以不相同,本申请实施例对不进行任何限制。本实施例提供的第八前端处理和第九前端处理,与上述实施例中的前端处理,可以相同,也可以不同,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
S330、利用第二前端融合模块将3帧第二图像对应的3帧前端处理图像进行融合,得到对应的第二前端融合图像;利用第四前端融合模块将3帧第四图像对应的3帧前端处理图像进行融合,得到对应的第四前端融合图像。前端融合模块还包括:第四前端融合模块。
应理解,当第八前端处理包括去马赛克和色彩空间转换时,第二图像经过第八前端处理后,所对应的第八前端处理图像位于YUV域。第四图像经过第九前端处理后,所对应的第九前端处理图像也位于YUV域。此时,第二前端融合模块和第四前端融合模块相应包括YUV域的多帧融合模块,以实现YUV域的多帧融合功能。由此,经第二前端融合模块处理所得到的第二前端融合图像位于YUV域,经第四前端融合模块处理所得到的第四前端融合图像也位于YUV域。
应理解,当第八前端处理不包括去马赛克和色彩空间转换时,第二图像经过第八前端处理后,所对应的第八前端处理图像还是位于RAW域。第四图像经过第九前端处理后,所对应的第九前端处理图像还是位于RAW域。此时,第二前端融合模块、第四前端融合模块相应包括RAW域的多帧融合模块,以实现RAW域的多帧融合功能。由此,经第二前端融合模块处理所得到的第二前端融合图像位于RAW域,经第四前端融合模块处理所得第四前端融合图像也位于RAW域。
当然,第二前端融合模块、第四前端融合模块还可以包括其他功能模块,具体可以参考上述S130中对第一前端融合模块或第二前端融合模块的描述,在此不再赘述。
在此基础上,多帧第二图像可以包括长曝光的第二图像、短曝光的第二图像和中曝光的第二图像;多帧第四图像可以包括长曝光的第四图像、短曝光的第四图像和中曝光的第四图像。
当多帧第二图像包括不同曝光程度的第二图像,多帧第四图像包括不同曝光程度的第四图像时,相应的,多帧第二图像对应的第八前端处理图像包括不同曝光程度的第八前端处理图像,多帧第四图像对应的第九前端处理图像包括不同曝光程度的第九前端处理图像,基于此,第二前端融合模块将不同曝光程度的多帧第八前端处理图像进行融合后,可以增加图像中暗区和过曝区域的细节,提升动态范围,从而可以提升对应的第二前端融合图像的清晰度。同理,第四前端融合模块将不同曝光程度的多帧第九前端处理图像进行融合后,可以增加图像中暗区和过曝区域的细节,提升动态范围,从而可以提升对应的第九前端融合图像的清晰度。
还应理解,本实施例中的第二前端融合模块和第四前端融合模块可以相同,也可以不相同;第二前端融合模块、第四前端融合模块与上述实施例中的第一前端融合模块、第二前端融合模块、第三前端融合模块可以相同,也可以不相同,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
S340、对3帧第二图像对应的第二前端融合图像进行第七后端处理,得到对应的 第七后端处理图像。对3帧第四图像对应的第四前端融合图像进行第八后端处理,得到对应的第八后端处理图像。
其中,对第七后端处理和第八后端处理的描述可以参考上述S140中的内容,在此不再赘述。
应理解,第二图像对应的第七后端处理图像、第四图像对应的第八后端处理图像均位于YUV域。
还应理解,在本实施例中,第七后端处理与第八后端处理,可以相同,也可以不同;此外,本实施例中的第七后端处理与第八后端处理,与上述实施例中的后端处理,可以相同,也可以不同,具体可以根据需进行设置,本申请实施例对此不进行任何限制。
S350、利用后端融合模块将第二图像对应的第七后端处理图像、第四图像对应的第八后端处理图像进行融合,得到后端融合图像,后端融合图像为拍摄图像。
由于第二图像对应的视场角范围和第四图像对应的视场角范围不同,经上述处理后的第七后端处理图像和第八后端处理图像之间依然存在视场角范围不同的问题,由此,可以利用后端融合模块进行融合处理。也就是说,后端融合模块可以包括视场角融合模块,用于实现对应不同视场角范围的图像的融合。
基于此,第二图像对应的第七后端处理图像和第四图像对应的第八后端处理图像进行融合时,第二图像与其对应的第七后端处理图像的视场角范围相同,第四图像与其对应的第八后端处理图像的视场角范围相同,融合后的后端融合图像对应的视场角范围与第二图像对应的视场角范围相同。假设主摄摄像头1931和长焦摄像头1934的视场角中心点一致,又因为第四图像的清晰度较高,相应的,第四图像对应的第八后端处理图像的清晰度较高,由此,将第二图像对应的第七后端处理图像与第四图像对应的第八后端处理图像进行融合之后,将会提升第二图像对应的第七后端处理图像中,与第四图像对应的第八后端处理图像的视场角范围相同的区域内的清晰度,使得图像清晰度提高。
当然,后端融合模块还可以包括其他功能模块,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
应理解,本实施例中的后端融合模块,与上述实施例中的后端融合模块,可以相同,也可以不相同,具体可以根据需进行设置,本申请实施例对此不进行任何限制。
应理解,得到的后端融合图像位于YUV域。后端融合图像将被作为拍摄图像进行在电子设备的界面上进行显示,或者,仅进行存储,具体可以根据需要进行传输,本申请实施例对此不进行任何限制。
在该实施例中,基于视场角大小不同、清晰度不同的第二图像和第四图像,经过上述一系列处理后,可以融合得到清晰度较高、质量较好的拍摄图像。
还应理解,上述过程仅为一种示例,具体可以根据需要进行顺序上的调整,当然,还可以增加或减少步骤,本申请实施例对此不进行任何限制。
实施例4,一种拍摄方法,如图11所示,该方法包括以下S410至S440。
接收用户的第一操作,确定出当前拍摄模式为拍照模式,待拍摄场景处于中高照 度。
S410、确定当前的变焦倍数属于第四变焦倍数范围,确定目标摄像头。
示例性的,假设当前变焦倍数为20,则当前变焦倍数属于第四变焦倍数范围[3.x,100]内,确定目标摄像头为长焦摄像头。示例性的,利用长焦摄像头获取3帧第四图像。
应理解,变焦倍数比较大时,其他摄像头的清晰度均下降,因此,仅设置长焦摄像头为第四变焦倍数范围对应的目标摄像头。
此处,第四图像的数量仅为示意,具体可以根据需要进行获取,本申请实施例对此不进行任何限制。
其中,第四图像位于RAW域,且为拜耳格式图像。
S420、对3帧第四图像进行前端处理,得到对应的3帧前端处理图像。
其中,对前端处理的描述可以参考上述S120中的内容,在此不再赘述。
应理解,当前端处理包括去马赛克和色彩空间转换时,第四图像经过前端处理后,所对应的前端处理图像位于YUV域。当前端处理不包括去马赛克和色彩空间转换时,第二图像经过前端处理后,所对应的前端处理图像还是位于RAW域。
示例性的,本申请提供的实施例4中的前端处理包括去马赛克和色彩空间转换,可使得后续处理中的图像位于YUV域,减小数据量,节省带宽。
应理解,本实施例提供的前端处理,与上述实施例提供的前端处理可以相同,也可以不同,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
S430、利用第四前端融合模块将3帧第四图像对应的3帧前端处理图像进行融合,得到3帧第四图像对应的第四前端融合图像。前端融合模块还包括:第四前端融合模块。
应理解,当前端处理包括去马赛克和色彩空间转换时,第四图像经过前端处理后,所对应的前端处理图像位于YUV域。此时,第四前端融合模块相应包括YUV域的多帧融合模块,以实现YUV域的多帧融合功能,由此,经第四前端融合模块处理所得到的第四前端融合图像也位于YUV域。
当前端处理不包括去马赛克和色彩空间转换时,第二图像经过前端处理后,所对应的前端处理图像还是位于RAW域。此时,第四前端融合模块相应包括RAW域的多帧融合模块,以实现RAW域的多帧融合功能。由此,经第四前端融合模块处理所得到的第四前端融合图像位于RAW域。
当然,第四前端融合模块还可以包括其他功能模块,具体可以参考上述S130中对第一前端融合模块或第二前端融合模块的描述,在此不再赘述。
在此基础上,多帧第四图像可以包括长曝光的第四图像、短曝光的第四图像和中曝光的第四图像。
当多帧第四图像包括不同曝光程度的第四图像时,相应的,多帧第四图像对应的前端处理图像包括不同曝光程度的前端处理图像,基于此,第四前端融合模块将不同曝光程度的多帧前端处理图像进行融合后,可以增加图像中暗区和过曝区域的细节,提升动态范围,从而可以提升对应的第四前端融合图像的清晰度。
还应理解,本实施例中的第四前端融合模块,与上述实施例中的第一前端融合模 块、第二前端融合模块、第三前端融合模块、或第四前端融合模块可以相同,也可以不相同,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
S440、对第四图像对应的第四前端融合图像进行后端处理,得到对应的后端处理图像,后端处理图像为拍摄图像。
其中,对后端处理的描述可以参考上述S140中的内容,在此不再赘述。
应理解,第四图像对应的后端处理图像位于YUV域。
应理解,本实施例提供的后端处理,与上述实施例中提供的后端处理可以相同,也可以不同,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
在该实现方式中,基于多帧第四图像,经过上述一系列处理后,可以融合得到清晰度较高、质量较好的拍摄图像。
还应理解,上述过程仅为一种示例,具体可以根据需要进行顺序上的调整,当然,还可以增加或减少步骤,本申请实施例对此不进行任何限制。
实施例5,一种拍摄方法,如图12所示,该方法包括以下S510至S540。
接收用户的第一操作,确定出当前拍摄模式为拍照模式,待拍摄场景的照度小于预设照度阈值,也就是说,待拍摄场景处于低照度。
S510、确定当前的变焦倍数属于的变焦倍数范围,确定目标摄像头。
示例性的,假设当前变焦倍数为0.5倍,则当前变焦倍数属于第一变焦倍数范围[0.5,1)内,在低照度下,目标摄像头为广角摄像头1933。示例性的,利用广角摄像头1933获取5帧第一图像。
此外,若当前变焦倍数为2.6倍,则当前变焦倍数属于第三变焦倍数范围[2,3.x)内,在低照度下,目标摄像头为主摄摄像头1931。示例性的,利用主摄摄像头1931获取5帧第二图像。
若当前变焦倍数为20,则当前变焦倍数属于第四变焦倍数范围[3.x,100]内,在低照度下,目标摄像头为长焦摄像头。示例性的,利用长焦摄像头获取5帧第四图像。
此处,第一图像、第二图像和第四图像的数量仅为示意,具体可以根据需要进行获取,本申请实施例对此不进行任何限制。
其中,第一图像、第二图像和第四图像均位于RAW域,且为拜耳格式图像。
S520、对5帧第一图像、5帧第二图像或5帧第四图像进行第二预处理,得到对应的位于RAW域的第二预处理图像。
上述S520也可以表述为:对5帧第一图像进行第二预处理,得到对应的位于RAW域的第二预处理图像;对5帧第二图像进行第二预处理,得到对应的位于RAW域的第二预处理图像;对5帧第四图像进行第二预处理,得到对应的位于RAW域的第二预处理图像。
其中,本实施例提供的第二预处理包括夜景算法模块,例如,该夜景算法模块基于Unet网络模型生成,可以将RAW域的多帧第一图像、多帧第二图像或者多帧第四图像融合成对应的1帧位于RAW域的第二预处理图像。
示例性的,图13示出了本申请实施例提供的一种夜景算法模块的结构示意图。如图13所示,本实施例提供的夜景算法模块包括:大型残差块(super resblock)、下采 样块(split)、上采样块(subpixel)、拼接层(contact layer)以及卷积层(Conv)。
图14示出了一种大型残差块的结构示意图。如图14所示,每个大型残差块包括多个卷积层,不同卷积层的输入和输出进行叠加,然后将最后叠加的输出作为大型残差块的输出结果。
结合图3所示,例如,将长焦摄像头1934采集的5帧第一图像从左侧输入第一行第一个大型残差块进行处理,提取图像信息;再输入下采样块中进行处理,将1个通道信息按照隔行隔列的方式拆分成4个通道,以获取更多局部图像信息,再输入第二行第一个大型残差块进行处;再输入下采样块和大型残差块进行处理,以使得处理结果满足图像编码需求。
接着,将第三行第二个大型残差块的处理结果输入上采样块中进行处理,将4个通道信息按照隔行隔列的方式组成成1个通道,从而可以增大尺寸,提高图像分辨率;利用拼接层将第三行的上采样块的输出与第二行第一个大型残差块的输出进行特征拼接,再输入第二行第二个大型残差块进行处理。
然后,将第二行第二个大型残差块的处理结果继续输入上采样块中进行处理;利用拼接层将第二行的上采样块的输出与第一行第一个大型残差块的输出进行特征拼接;再输入第一行第二个大型残差块进行处理。最后,再输入多个卷积层进行卷积处理,从而得到5帧第一图像对应的1帧第二预处理图像。
S530、对5帧第一图像、5帧第二图像或5帧第四图像对应的第二预处理图像进行前端处理,得到对应的前端处理图像。
其中,对前端处理的描述可以参考上述S120中的内容,在此不再赘述。
示例性的,本实施例中,为了减小数据量,节省带宽,前端处理包括去马赛克和色彩空间转换,以使得第一图像、第二图像或第四图像对应的位于RAW域的第二预处理图像进行前端处理后,得到的前端处理图像位于YUV域。
还应理解,本实施例提供的前端处理,与上述实施例中的前端处理,可以相同,也可以不同,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
S540、对5帧第一图像、5帧第二图像或5帧第四图像对应的前端处理图像进行后端处理,得到对应的后端处理图像,后端处理图像为拍摄图像。
其中,对后端处理的描述可以参考上述S140中的内容,在此不再赘述。
应理解,第一图像、第二图像或第四图像对应的后端处理图像均位于YUV域。
应理解,本实施例提供的后端处理,与上述实施例中提供的后端处理可以相同,也可以不同,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
在该实施例中,在低照度场景下,基于多帧第一图像、第二图像或第四图像,利用网络模型进行多帧融合处理,以及上述其他处理,可以融合得到清晰度较高、质量较好的拍摄图像。
还应理解,上述过程仅为一种示例,具体可以根据需要进行顺序上的调整,当然,还可以增加或减少步骤,本申请实施例对此不进行任何限制。
实施例6,一种拍摄方法,如图15所示,该方法包括以下S610至S640。
S610、确定当前的变焦倍数属于的变焦倍数范围,确定目标摄像头。
示例性的,接收用户的第一操作,确定出当前拍摄模式为录像模式。当前拍摄模式为录像模式,先确定当前变焦倍数。假设当前变焦倍数为0.5倍,则当前变焦倍数属于第一变焦倍数范围[0.5,1)内,目标摄像头为广角摄像头1933。示例性的,利用广角摄像头1933获取3帧第一图像。
此外,若当前变焦倍数为2.6倍,则当前变焦倍数属于第三变焦倍数范围[2,3.x)内,在低照度下,目标摄像头为主摄摄像头1931。示例性的,利用主摄摄像头1931获取3帧第二图像。
若当前变焦倍数为20,则当前变焦倍数属于第四变焦倍数范围[3.x,100]内,在低照度下,目标摄像头为长焦摄像头。示例性的,利用长焦摄像头获取3帧第四图像。
此处,第一图像、第二图像和第四图像的数量仅为示意,具体可以根据需要进行获取,本申请实施例对此不进行任何限制。
其中,第一图像、第二图像和第四图像均位于RAW域,且为拜耳格式图像。
S620、对3帧第一图像、3帧第二图像或3帧第四图像进行第三预处理,得到对应的位于RAW域的第三预处理图像。
上述S620也可以表述为:对3帧第一图像进行第三预处理,得到对应的位于RAW域的第三预处理图像;对3帧第二图像进行第三预处理,得到对应的位于RAW域的第三预处理图像;对3帧第四图像进行第三预处理,得到对应的位于RAW域的第三预处理图像。
该3帧第一图像包括长曝光的第一图像、短曝光的第一图像和中曝光的第一图像;3帧第二图像包括长曝光的第二图像、短曝光的第二图像和中曝光的第二图像;3帧第四图像包括长曝光的第四图像、短曝光的第四图像和中曝光的第四图像。
其中,本申请实施例提供的第三预处理包括HDR算法模块,例如,该HDR算法模块基于长短曝光融合处理和色调映射模型(tone mapping),可以将多帧曝光程度不同的第一图像、第二图像或第四图像融合成1帧位于RAW域的第三预处理图像。
示例性的,图16示出了本申请实施例提供的一种利用HDR算法模块得到第三预处理图像的流程示意图。图17示出了图16中的长曝光的第一图像、短曝光的第一图像和第三预处理图像。
如图16和图17所示,例如,针对包括长曝光的第一图像(如图17中的(a)所示)、短曝光的第一图像(如图17中的(b)所示)和中曝光的第一图像的3帧第一图像,可以先将中曝光的第一图像与长曝光的第一图像进行融合,得到第一中间融合图像,再将中间融合图像与短曝光的第二图像进行融合,得到第二中间融合图像。其中,在与长曝光的第一图像进行融合之前,可以先对长曝光的第一图像进行配准;在与短曝光的第二图像进行融合之前,可以先对短曝光的第一图像进行提亮和配准。然后,将融合后的第二中间融合图像输入色调映射模型中,以对第二中间融合图像的颜色进行映射变换处理,由此,得到第三预处理图像(如图17中的(c)所示)。
可选地,色调映射模型可以为Unet网络模型、Resnet网络模型和Hdrnet网络模型中的任意一种。当然,色调映射模型也可以为其他模型,本申请实施例对此不进行任何限制。
在本实施例中,将中曝光的第一图像与长曝光的第一图像进行融合,可以提升中 曝光的第一图像中曝光不够的暗处区域的细节,而与短曝光的第一图像进行融合,可以提升中曝光的第一图像中亮处区域的细节。因此,对中曝光的第一图像进行长短曝光融合处理,可以同时提升中曝光的第一图像中暗处区域和亮处区域的细节,提升动态范围,从而实现提升图像的清晰度的目的。
S630、对第三预处理图像进行前端处理,得到对应的前端处理图像。
其中,对前端处理的描述可以参考上述S120中的内容,在此不再赘述。
示例性的,本实施例中,为了减小数据量,节省带宽,前端处理包括去马赛克和色彩空间转换,以使得第一图像、第二图像或第四图像对应的位于RAW域的第三预处理图像进行前端处理后,得到的前端处理图像位于YUV域。
还应理解,本实施例提供的前端处理,与上述实施例中的前端处理,可以相同,也可以不同,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
S640、对前端处理图像进行后端处理,得到对应的后端处理图像,后端处理图像为拍摄图像。
其中,对后端处理的描述可以参考上述S140中的内容,在此不再赘述。
应理解,第一图像、第二图像或第四图像对应的后端处理图像位于YUV域。
应理解,本实施例提供的后端处理,与上述实施例中提供的后端处理可以相同,也可以不同,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
在该实施例中,在录像模式下,基于多帧第一图像、第二图像或第四图像,利用HDR算法模块,进行多帧不同曝光的图像的融合处理,以及上述其他处理,可以融合得到清晰度较高、质量较好的拍摄图像。
还应理解,上述过程仅为一种示例,具体可以根据需要进行顺序上的调整,当然,还可以增加或减少步骤,本申请实施例对此不进行任何限制。
上述通过实施例1至6,对本申请提供的拍照模式、录像模式下的拍摄方法进行了详细介绍。电子设备100可以单独选择一种进行使用,也可以多个配合使用,具体可以根据需要进行设置和调节,本申请实施例对此不进行任何限制。
结合上述内容,一般用户在利用拍照模式进行拍照之前,也就是进行拍照预览时,或者利用录像模式进行录像之前,也就是进行录像预览时,通常还会先进行变焦(即调整好焦距),然后再进行拍摄。此外,在录像过程中也有可能会进行变焦。
由于单个摄像头的变焦距离始终有限,为了提高电子设备的变焦倍数覆盖范围,所以,本申请提供了包括多个摄像头(多摄)的电子设备,多个摄像头包括:广角摄像头1933、主摄摄像头1931、黑白摄像头1932和长焦摄像头1934。每个摄像头对应一定范围的变焦倍数。由此,在进行变焦时,例如,从变焦倍数范围a切换至另一个变焦倍数范围b时,电子设备可以控制摄像头从变焦倍数范围a对应的摄像头A切换至变焦倍数范围b对应的摄像头B,实现接力变焦,使得电子设备的变焦倍数整体覆盖范围更广。
但是,从摄像头A切换至摄像头B时,伴随着摄像头A关闭,摄像头B启动,由于两个摄像头之间存在光轴偏移和视场角角度差异等问题,两者之间直接切换可能会导致拍照预览图像、录像预览图像或者录像画面的画面中心和视场角大小出现突变、 跳动,以及卡顿等问题,影响用户体验。
有鉴于此,本申请实施例提供了一种多摄变焦方法(spatial alignment transform,SAT),不仅能实现接力变焦,还通过在变焦切换至目标变焦倍数范围之前,提前启动并在后台运行该目标变焦倍数范围所对应的摄像头,使得在变焦切换之时,该摄像头仅需从后台运行状态转换成前台送显状态,变化较小,切换更加平滑。本实施例可以配合前面的任一实施例或者多个任一实施例的结合进行。
下面对本申请实施例提供的多摄变焦方法进行介绍。
本申请实施例提供了一种多摄变焦方法,应用于包括多个摄像头的电子设备100,该多个摄像头包括:广角摄像头1933、主摄摄像头1931、黑白摄像头1932和长焦摄像头1934。
应理解,每个摄像头自身适用于一定范围的变焦倍数,每个摄像头对应的变焦倍数范围可以不同,也可有所重叠,具体可以根据需要进行选择,本申请实施例对此不进行任何限制。
结合上述多个摄像头,本申请实施例提供的多摄变焦方法,包括:
在进行拍照预览、录像预览或录像时,当第N变焦倍数范围对应的第一目标摄像头与第N+1变焦倍数范围对应的第一目标摄像头不同时,从第N变焦倍数范围向第N+1变焦倍数范围变焦时,第N变焦倍数范围对应的第一目标摄像头由前台送显状态转换成关闭状态或后台运行状态,而第N+1变焦倍数范围对应的第二目标摄像头由后台运行状态转换成前台送显状态。N为正整数。
当第N变焦倍数范围对应的第一目标摄像头与第N+1变焦倍数范围对应的第一目标摄像头相同时,从第N变焦倍数范围向第N+1变焦倍数范围变焦时,第N变焦倍数范围对应的第一目标摄像头维持前台送显状态。
其中,每个变焦倍数范围对应一个第一目标摄像头,该第一目标摄像头为广角摄像头1933、主摄摄像头1931、黑白摄像头1932和长焦摄像头1934中的一个。
应理解,前台送显状态表明摄像头采集图像且采集的图像用于显示,后台运行状态表明摄像头采集图像但采集的图像不用于显示,例如,仅存储起来进行备用。关闭状态表明摄像头不采集图像。其中,处于后台运行状态的摄像头也可以称为所对应变焦倍数范围的辅助摄像头。
应理解,每个变焦倍数范围对应的第一目标摄像头即为在该变焦倍数范围可适用的摄像头中的一个。多个变焦倍数范围对应的第一目标摄像头可以相同,也可以不同,具体根据划分的变焦倍数范围和摄像头自身的变焦倍数范围来设定对应关系,本申请实施例对此不进行任何限制。
应理解,第N变焦倍数范围对应的第一目标摄像头自身适用的变焦倍数范围要大于或者等于第N变焦倍数范围,这样才能在切换后由前台送显状态切换成后台运行状态继续使用或者切换成关闭状态。而第N+1变焦倍数范围对应的第一目标摄像头自身适用的变焦倍数范围要大于第N+1变焦倍数范围,这样才能在未切换至第N+1变焦倍数范围时就开始后台运行。
应理解,当在某一变焦倍数范围内变焦,没有超出该变焦倍数范围时,该变焦倍数范围对应的第一目标摄像头一直处于前台送显状态,不会发生切换,也就是说,第 一目标摄像头在采集图像并传输至取景窗口60进行显示。
应理解,在变焦时,第N+1变焦倍数范围对应的第一目标摄像头由后台运行状态转换成前台送显状态,说明在第N变焦倍数范围内变焦,没有到变焦切换点时,第N+1变焦倍数范围对应的第一目标摄像头已经被调用在后台运行。至于调用的时机,也就是在第N变焦倍数范围内变焦到多少倍数时调用第N+1变焦倍数范围对应的第一目标摄像头,可以根据需要以及摄像头适用的范围进行设置和更改,本申请实施例对此不进行限制。
可选地,作为一种可能实现的方式,在拍照预览、录像或录像预览过程中进行变焦时,确定当前变焦倍数。假设从小到大变焦,当当前变焦倍数属于第N变焦倍数范围时,在变焦至第N变焦倍数范围的最小变焦倍数时,确定第N变焦倍数范围对应的第一目标摄像头与第N+1变焦倍数范围对应的第一目标摄像头是否相同,若不相同,就在第N变焦倍数范围的最小变焦倍数处,开始调用第N+1变焦倍数范围对应的第一目标摄像头进行后台运行;或者,在变焦至第N变焦倍数范围中的预设变焦倍数时,开始调用第N+1变焦倍数范围对应的第一目标摄像头进行后台运行。
应理解,预设变焦倍数可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
可选地,作为一种可能实现的方式,在拍照预览、录像或录像预览过程中进行变焦时,先确定当前变焦倍数,再根据当前变焦倍数确定当前变焦倍数所属当前变焦倍数范围,例如为第m变焦倍数范围;然后,分别确定当前变焦倍数范围的最大值、最小值,以及确定最大值与当前变焦倍数的差值的绝对值,为第一差值;确定最小值与当前变焦倍数的差值的绝对值,为第二差值。
若第一差值小于第二差值,说明当前变焦倍数接近当前变焦倍数范围的最大值,由此,可以设定切换条件为:在计算出第一差值小于第二差值时,确定当前变焦倍数范围与第m+1变焦倍数范围对应的第一目标摄像头是否相同,若不同,则启动第m+1变焦倍数范围所对应的第一目标摄像头进行后台运行;若第一差值大于第二差值,说明当前变焦倍数接近当前变焦倍数范围的最小值,由此,可以设定切换条件为:在计算出第一差值大于第二差值时,确定当前变焦倍数范围对应的第一目标摄像头与第m-1变焦倍数范围对应的第一目标摄像头是否相同,若不同,则启动第m-1变焦倍数范围对应的第一目标摄像头进行后台运行。
应理解,从第N变焦倍数范围向第N+1变焦倍数范围变焦时,在第N变焦倍数范围中变焦开始调用第N+1变焦倍数范围对应的第一目标摄像头启动,进行后台运行时,可以将第N+1变焦倍数范围对应的第一目标摄像头与第N变焦倍数范围对应的第一目标摄像头进行同步处理。例如,将两个摄像头的亮度信息、颜色信息、对焦点、视场中心等都保持一致。这样,在变焦至第N+1变焦倍数范围时,预览图像将不会出现突变、跳动等问题,切换的更加平滑流畅,让用户几乎感知不到变化,从而有效提高用户体验。
示例性的,图18示出了多摄变焦切换时的视场角变化示意图。
如图18所示,当从小到大变焦,在第n变焦倍数范围内变焦时,第n变焦倍数范 围对应的摄像头Cn启动,随着变焦倍数增大,视场角范围逐渐缩小。例如,摄像头Cn的视场角范围从图中所示的区域a逐渐缩小。
在从第n变焦倍数范围向第n+1变焦倍数范围变焦时,当达到第一变焦切换点,也就是,在缩小到第一变焦切换点对应的视场角范围(如图中所示的区域c)时,需要将摄像头Cn切换成第n+1变焦倍数范围对应的摄像头Cn+1。但是,若摄像头Cn+1的最小变焦倍数为第一变焦切换点处的倍数,摄像头Cn+1对应的最小视场角范围即为区域c,此时,当摄像头Cn的视场角范围从区域a缩小至区域c时,若直接切换成对应区域c的摄像头Cn+1,切换比较困难,而且两个摄像头之间可能存在光轴偏移和视场角角度差异等问题,导致画面中心和视场角大小出现突变、跳动等问题,影响用户体验。
由此,本申请提供了变焦倍数范围覆盖更大的摄像头Cn+1,其对应的最大视场角范围例如为图中的区域b,这样,在从第n变焦倍数范围向第n+1变焦倍数范围变焦时,在达到第一变焦切换点之前,启动并在后台运行摄像头Cn+1,使得摄像头Cn+1对应的视场角范围从区域b逐渐缩小。
这样,在变焦过程中,在未缩小到区域c时,就将摄像头Cn和摄像头Cn+1进行同步处理,使两者各项参数保持一致,然后,在达到区域c时,摄像头Cn+1从后台运行状态转换成前台送显状态,由此,通过摄像头Cn+1提前准备,和摄像头Cn同时缩小到区域c,可以使得在达到区域c时切换的更加平滑流畅,让用户几乎感知不到变化,从而有效提高用户体验。
同理,继续增大变焦倍数,在从第n+1变焦倍速范围向第n+2变焦倍数范围变焦时,当达到第二变焦切换点,也就是,在缩小到第二变焦切换点对应的视场角范围(如图中所示的区域d)时,需要将摄像头Cn+1切换成第n+1变焦倍数范围对应的摄像头Cn+2。
为了提高用户体验,本申请提供了变焦覆盖范围更大的摄像头Cn+2,其对应的最大视场角范围例如为图中的区域d,这样,在从第n+1变焦倍数范围向第n+2变焦倍数范围变焦时,在达到第二变焦切换点之前,启动并在后台运行摄像头Cn+2,使得摄像头Cn+2对应的视场角范围从区域d逐渐缩小。
这样,在变焦过程中,在未缩小到区域e时,就将摄像头Cn+1和摄像头Cn+2进行同步处理,使两者各项参数保持一致,然后,在达到区域d时,摄像头Cn+2从后台运行状态转换成前台送显状态。由此,通过摄像头Cn+2提前准备,和摄像头Cn+1同时缩小到区域d,可以使得在达到区域d时切换的更加平滑流畅,让用户几乎感知不到变化,从而有效提高用户体验。
如果变焦过程包含更多的变焦切换点,则摄像头的切换均如上述所述进行提前启动并后台运行,从而实现接力变焦,使得电子设备的变焦倍数整体覆盖范围更广,切换更加平滑流畅。
还应理解,根据上述实施例1至5的描述可知,本申请实施例提供的拍摄方法,在触发拍照模式时,针对不同的变焦倍数范围,需要调用1个摄像头或两个摄像头获取原始图像。通常电子设备使用的是一个变焦倍数范围划分方式,也就是说,拍照模式和拍照预览对应的变焦倍数范围划分方式相同。基于此,当在拍照模式下,当前变 焦倍数属于某一变焦倍数范围,需要对应的1个摄像头获取图像时,该摄像头即为拍照预览时获取图像的第一目标摄像头。而需要对应的两个摄像头获取图像时,为了更快速的调用两个摄像头,本申请将1个摄像头在拍照预览时,作为第一目标摄像头,使其处于前台送显状态,而另1个摄像头在拍照预览时,则作为辅助摄像头,同时进入后台运行状态。由此,在进行拍照,获取拍摄图像的速度更快,用户拍照体验更好。
此处,第N+1变焦倍数范围对应的第一目标摄像头,即为在第N变焦倍数范围进行拍照时所需的另一个获取图像的摄像头。
本申请实施例提供的多摄变焦切换方法,在多个摄像头实现接力变焦的基础上,在相邻两个变焦倍数范围对应不同第一目标摄像头的情况下,从前一个变焦倍数范围向后一个变焦倍数范围变焦时,后一个变焦倍数范围对应的第一目标摄像头不是从关闭到启动,而是从后台运行状态变换至前台送显状态,该第一目标摄像头已经提前启动,因此在切换时,不会卡顿。并且,由于两个摄像头在前一变焦倍数范围内已经同步,因此,在切换时,预览图像也不会出现突变、跳动等问题,切换的更加平滑流畅。
此外,在相邻两个变焦倍数范围对应同一第一目标摄像头的情况下,前一变焦倍数范围对应的第一目标摄像头维持前台显示状态,由此,摄像头不会进行关闭再开启的动作,这样,不影响画面,也不会出现卡顿。
可选地,在进行拍照预览时,上述方法还包括:
当第N变焦倍数范围对应的第一目标摄像头与第N+1变焦倍数范围对应的第一目标摄像头相同时,在第N变焦倍数范围变焦时,第N变焦倍数范围对应的第二目标摄像头,处于后台运行状态。其中,第N变焦倍数范围对应的第二目标摄像头与第一目标摄像头不同。
应理解,针对第N变焦倍数范围,当第N变焦倍数范围与第N+1变焦倍数范围对应的第一目标摄像头相同时,在第N变焦倍数范围进行拍照时,若需要对应两个摄像头获取图像,则还需要设置第二目标摄像头。第N变焦倍数范围对应的第二目标摄像头的种类和个数可以根据需要设置和更改,本申请实施例对此不进行任何限制。
应理解,为了在第N变焦倍数范围内进行拍照时,更快速的调用第一目标摄像头和第二目标摄像头,由此,本申请在拍照预览,在第N变焦倍数范围变焦时就开始调用第二目标摄像头,使其处于后台运行状态。由此,在用户触发拍摄键50进行拍照时,获取拍摄图像的响应速度更快,用户拍照体验更好。
可选地,作为一种可能实现的方式,在拍照预览过程中进行变焦时,确定当前变焦倍数。假设从小到大变焦,当当前变焦倍数属于第N变焦倍数范围时,在变焦至第N变焦倍数范围的最小变焦倍数时,确定第N变焦倍数范围对应的第一目标摄像头与第N+1变焦倍数范围对应的第一目标摄像头是否相同,若相同,可以在变焦至第N变焦倍数范围的最小变焦倍数处时,就使得第N变焦倍数范围对应的第二目标摄像头进入后台运行状态。或者,在变焦至第N变焦倍数范围中的预设变焦倍数时,开始调用第N变焦倍数范围对应的第二目标摄像头进行后台运行。
可选地,作为另一种可能实现的方式,在拍照预览过程中进行变焦时,先确定当前变焦倍数,再根据当前变焦倍数确定当前变焦倍数所属当前变焦倍数范围,例如为第m变焦倍数范围;然后,分别确定当前变焦倍数范围的最大值、最小值,以及确定 最大值与当前变焦倍数的差值的绝对值,为第一差值;确定最小值与当前变焦倍数的差值的绝对值,为第二差值。
若第一差值小于第二差值,说明当前变焦倍数接近当前变焦倍数范围的最大值,由此,可以设定切换条件为:在计算出第一差值小于第二差值时,确定当前变焦倍数范围与第m+1变焦倍数范围对应的第一目标摄像头是否相同,若相同,则启动第m变焦倍数范围所对应的第二目标摄像头进行后台运行;若第一差值大于第二差值,说明当前变焦倍数接近当前变焦倍数范围的最小值,由此,可以设定切换条件为:在计算出第一差值大于第二差值时,确定当前变焦倍数范围对应的第一目标摄像头与第m-1变焦倍数范围对应的第一目标摄像头是否相同,若相同,则启动第m变焦倍数范围对应的第二目标摄像头进行后台运行。
可选地,第N变焦倍数范围中包含的变焦倍数小于第N+1变焦倍数范围包含的变焦倍数;或者,第N变焦倍数范围中包含的变焦倍数大于第N+1变焦倍数范围包含的变焦倍数。
第N变焦倍数范围中包含的变焦倍数小于第N+1变焦倍数范围包含的变焦倍数,也就是说,随着N增大,变焦倍数增大。第N变焦倍数范围中包含的变焦倍数大于第N+1变焦倍数范围包含的变焦倍数,也就是说,随着N增大,变焦倍数减小。
由此,在放大变焦倍数或缩小变焦倍数时,都可以在变焦切换至目标变焦倍数范围之前,提前启动并在后台运行该目标变焦倍数范围所对应的第一目标摄像头,使得在变焦切换之时,该第一目标摄像头仅需从后台运行状态变至前台送显状态,变化较小,切换更加平滑。
下面结合具体的实施例,对本申请提供的多摄变焦方法进行详细说明。
示例性的,设定电子设备对应的变焦倍数范围为[0.5,100]。该变焦倍数范围划分为4个变焦倍数范围,N取值为一至四,即,该四个变焦倍数范围分别为第一变焦倍数范围、第二变焦倍数范围、第三变焦倍数范围和第四变焦倍数范围,且该四个变焦倍数范围包含的变焦倍数依次增大。
示例性的,假设第一变焦倍数范围F1为[0.5,1),第二变焦倍数范围F2为[1,2),第三变焦倍数范围F3为[2,3.x),第四变焦倍数范围F4为[3.x,100]。应理解,此处,各个数字仅为示意,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
示例性的,广角摄像头1933的变焦倍数范围为[0.5,1.2],主摄摄像头1931的变焦倍数范围为[0.5,10],黑白摄像头1932的变焦倍数范围为[0.9,2.1),而长焦摄像头1934的变焦倍数范围为[2,100]。
基于此,设定第一变焦倍数范围对应的第一目标摄像头为广角摄像头1933,第二变焦倍数范围和第三变焦倍数范围对应的第一目标摄像头均为主摄摄像头1931,第二变焦倍数范围对应的第二目标摄像头为黑白摄像头1932;第四变焦倍数范围对应的第一目标摄像头为长焦摄像头1934。
图19示出了本申请实施例提供的一种拍照预览时变焦的界面示意图。图20和图21分别示出了本申请实施例提供的一种拍照预览时多摄变焦的进程示意图。
示例性的,响应于用户的触摸操作,当电子设备100运行相机应用时,电子设备100显示如图19中的(a)所示的拍摄界面。在该拍摄界面上,拍摄键50指示当前拍摄模式为拍照模式。该拍摄界面中还包括取景窗口60,取景窗口60可用于实时显示拍照前的预览图像。另外,拍摄界面中还显示有变焦选项61。用户可以在变焦选项61中选择当前拍照的变焦倍数,例如,0.5倍、2倍或50倍等。如图19中的(b)所示,响应于用户的变焦操作,预览图像可以根据当前选择的变焦倍数放大或缩小。
应理解,预览图像中显示的变焦选项61响应于用户的操作时,可以呈列表样式,或者,也可以是呈滑竿、圆盘等样式,以便于用户进行调节。上述图19仅为一种示例,本申请对此不进行任何限制。
为了实现多摄变焦方法(spatial alignment transform,SAT),不仅能实现接力变焦,还通过在变焦切换至目标变焦倍数范围之前,提前启动并在后台运行该目标变焦倍数范围所对应的摄像头,本申请还提供如下实施例:
实施例7,一种多摄变焦方法,该方法包括:
如图20所示,在进行拍照预览并从小到大变焦时,当在第一变焦倍数范围F1内变焦时,第一变焦倍数范围对应的广角摄像头1933为前台送显状态,将获取的图像发送至显示屏显示;而第二变焦倍数范围F2对应的主摄摄像头1931在第一变焦倍数范围F1的最小变焦倍数处,已经开始进入后台运行状态。在此阶段中,主摄摄像头1931为辅助摄像头。
当从第一变焦倍数范围F1向第二变焦倍数范围F2变焦时,1X即为第一变焦切换点。在变焦至该第一变焦切换点时,第二变焦倍数范围F2对应的主摄摄像头1931接力变焦,从后台运行状态转换为前台送显状态,将获取的图像发送至显示屏显示;而第一变焦倍数范围F1对应的广角摄像头1933将由前台送显状态转换为关闭状态;此外,由于第二变焦倍数范围对应有第二目标摄像头,该第二目标摄像头从第一变焦切换点处开始进入后台运行状态。
当在第二变焦倍数范围F2内变焦时,主摄摄像头1931为前台送显状态,将获取的图像发送至显示屏显示,黑白摄像头1932为后台运行状态。在此阶段中,黑白摄像头1932为辅助摄像头。
当从第二变焦倍数范围F2向第三变焦倍数范围F3变焦时,由于第三变焦倍数范围F3对应的第一目标摄像头还是主摄摄像头1931,因此,主摄摄像头1931不需要进行切换,主摄摄像头1931维持前台送显状态即可。此处,黑白摄像头1932由后台运行状态转换为关闭状态。
当在第三变焦倍数范围F3内变焦时,主摄摄像头1931为前台送显状态,将获取的图像发送至显示屏显示,而第四变焦倍数范围F4对应的长焦摄像头1934在第三变焦倍数范围F3的最小变焦倍数处,已经开始进入后台运行状态。在此阶段中,长焦摄像头1934为辅助摄像头。
当从第三变焦倍数范围F3向第四变焦倍数范围F4变焦时,3.xX即为第二变焦切换点。在变焦至第二变焦切换点时,第四变焦倍数范围F4对应的长焦摄像头1934接力变焦,从后台运行状态转换为前台送显状态,将获取的图像发送至显示屏显示;而第三变焦倍数范围F3对应的主摄摄像头1931将由前台送显状态转换为后台运行状态 或者为关闭状态(图中未示出)。
此处,应理解的是,由于主摄摄像头1931的焦距有限,在转换为后台运行状态后,随着变焦倍数继续变大,可能就无法适用,由此,例如当变焦至第四变焦倍数范围中的10X处时,主摄摄像头1931由后台运行状态转换为关闭状态。在第二变焦切换点至10X之间变焦时,主摄摄像头1931为辅助摄像头。
实施例8,一种多摄变焦方法,该方法包括:
如图20所示,在进行拍照预览并从大到小变焦时,当在第四变焦倍数范围F4内变焦时,第四变焦倍数范围F4对应的长焦摄像头1934为前台送显状态,将获取的图像发送至显示屏显示;而第三变焦倍数范围F3对应的主摄摄像头1931为后台运行状态。
此处,应理解的是,由于主摄摄像头1931的焦距有限,在变焦倍数较大的情况下,无法适用。由此,例如当变焦至第四变焦倍数范围中的10X处时,主摄摄像头1931才从关闭状态转换为后台运行状态。在10X至第一变焦切换点之间变焦时,主摄摄像头1931为辅助摄像头。
当从第四变焦倍数范围F4向第三变焦倍数范围F3变焦时,3.xX即为第一变焦切换点。在变焦至第一变焦切换点时,第三变焦倍数范围F3对应的主摄摄像头1931接力变焦,从后台运行状态转换为前台送显状态,将获取的图像发送至显示屏显示;而第四变焦倍数范围F4对应的长焦摄像头1934由前台变焦送显状态转换为后台运行状态。
当在第三变焦倍数范围F3内变焦时,主摄摄像头1931为前台送显状态,将获取的图像发送至显示屏显示,而第四变焦倍数范围F4对应的长焦摄像头1934在第三变焦倍数范围F3内的预设变焦倍数处,例如2X处,由后台运行状态转换为关闭状态。在此阶段中,长焦摄像头1934为辅助摄像头。
当从第三变焦倍数范围F3向第二变焦倍数范围F2变焦时,由于第二变焦倍数范围F3对应的第一目标摄像头还是主摄摄像头1931,因此,主摄摄像头1931不需要进行切换,主摄摄像头1931维持前台送显状态即可。此处,黑白摄像头1932由关闭状态转换为后台运行状态。
当在第二变焦倍数范围内变焦时,主摄摄像头1931为前台送显状态,将获取的图像发送至显示屏显示,黑白摄像头1932为后台运行状态。在此阶段中,黑白摄像头1932为辅助摄像头。
当从第二变焦倍数范围F2向第一变焦倍数范围F1变焦时,1X即为第二变焦切换点。在变焦至第二变焦切换点时,第一变焦倍数范围F1对应的广角摄像头1933接力变焦,从关闭状态转换为前台送显状态,将获取的图像发送至显示屏显示;而第二变焦倍数范围对应的主摄摄像头1931将由前台送显状态转换为后台运行状态;此外,第二变焦倍数范围对应的第二目标摄像头,即黑白摄像头1932从第二变焦切换点处由后台运行状态转换为关闭状态。
当在第一变焦倍数范围F1内变焦时,第一变焦倍数范围F1对应的广角摄像头1933为前台显示状态,将获取的图像发送至显示屏显示;第二变焦倍数范围F2对应的主摄摄像头1931为后台运行状态。在此阶段中,主摄摄像头1931为辅助摄像头。
此处,需要说明的是,由于电子设备100通常允许两路摄像头同时运行,因此,当从第二变焦倍数范围F2向第一变焦倍数范围F1变焦时,由于第二变焦倍数范围F2对应的第一目标摄像头和第二目标摄像头,即主摄摄像头1931和黑白摄像头1932已经在运行,所以,第一变焦倍数范围F1对应的广角摄像头1933不能进入后台运行状态,仅为关闭状态。
在此基础上,可选的,如图21所示,当电子设备100允许三路摄像头同时运行时,从第二变焦倍数范围F2向第一变焦倍数范围F1变焦时,在变焦至第二变焦切换点时,第一变焦倍数范围F1对应的广角摄像头1933接力变焦,从后台运行状态转换为前台送显状态,将获取的图像发送至显示屏显示。此处,广角摄像头1933可以从第二变焦倍数范围的最大值,2X处开始从关闭状态转换至后台运行状态。或者,广角摄像头1933也可以从第二变焦倍数范围中的某一预设变焦倍数处开始从关闭状态状态至后台运行状态。
为了实现多摄变焦方法,不仅能实现接力变焦,还通过在变焦切换至目标变焦倍数范围之前,提前启动并在后台运行该目标变焦倍数范围所对应的摄像头,本申请还提供如下实施例:
图22示出了本申请实施例提供的一种录像预览或录像时变焦的界面示意图。图23和图24分别示出了本申请实施例提供的一种录像预览或录像时多摄变焦的进程示意图。
示例性的,响应于用户的触摸操作,当电子设备100运行相机应用时,电子设备100显示如图22中的(a)所示的拍摄界面。在该拍摄界面上,拍摄键50指示当前拍摄模式为录像模式。该拍摄界面中还包括取景窗口60,取景窗口60可用于实时显示录像前的预览图像或者显示录像中的录像画面。另外,预览图像或录像画面中还显示有变焦选项61。用户可以在变焦选项61中选择当前录像的变焦倍数,例如,0.5倍、2倍或50倍等。如图22中的(b)所示,响应于用户的变焦操作,预览图像或录像画面可以根据当前选择的变焦倍数放大或缩小。
结合以上,针对上述多摄变焦方法,本申请提供如下实施例:
实施例9,一种多摄变焦方法,该方法包括:
如图23所示,在进行录像预览或录像,并从小到大变焦时,当在第一变焦倍数范围F1内变焦时,第一变焦倍数范围对应的广角摄像头1933为前台送显状态,将获取的图像发送至显示屏显示;而第二变焦倍数范围F2对应的主摄摄像头1931在第一变焦倍数范围F1中的预设变焦倍数处提前启动,例如,主摄摄像头1931在0.7X处由关闭状态转换为后台运行状态。在0.7X至第一变焦切换点之间变焦时,主摄摄像头1931为辅助摄像头。
当从第一变焦倍数范围F1向第二变焦倍数范围F2变焦时,1X即为第一变焦切换点。在变焦至该第一变焦切换点时,第二变焦倍数范围F2对应的主摄摄像头1931接力变焦,从后台运行状态转换为前台送显状态,将获取的图像发送至显示屏显示;而第一变焦倍数范围F1对应的广角摄像头1933将由前台送显状态转换为关闭状态。
当在第二变焦倍数范围F2内变焦时,主摄摄像头1931为前台送显状态,将获取 的图像发送至显示屏显示。
当从第二变焦倍数范围F2向第三变焦倍数范围F3变焦时,由于第三变焦倍数范围F3对应的第一目标摄像头还是主摄摄像头1931,因此,主摄摄像头1931不需要进行切换,主摄摄像头1931维持前台送显状态即可。
当在第三变焦倍数范围F3内变焦时,主摄摄像头1931为前台送显状态,将获取的图像发送至显示屏显示,而第四变焦倍数范围F4对应的长焦摄像头1934在第三变焦倍数范围F3中的预设变焦倍数处提前启动,例如,长焦摄像头1934在2.8X处由关闭状态转换为后台运行状态。在2.8X至第二变焦切换点之间变焦时,长焦摄像头1934为辅助摄像头。
当从第三变焦倍数范围F3向第四变焦倍数范围F4变焦时,3.xX即为第二变焦切换点。在变焦至该第二变焦切换点时,第四变焦倍数范围F4对应的长焦摄像头1934接力变焦,从后台运行状态转换为前台送显状态,将获取的图像发送至显示屏显示;而第三变焦倍数范围F3对应的主摄摄像头1931由前台显示状态转换为后台运行状态或者为关闭状态(图中未示出)。
此处,应理解的是,由于主摄摄像头1931的焦距有限,在转换为后台运行状态后,随着变焦倍数继续增大,可能就无法适用,由此,例如当变焦至第四变焦倍数范围中的10X处时,主摄摄像头1931由后台运行状态转换为关闭状态。在第二变焦切换点至10X之间变焦时,主摄摄像头1931位辅助摄像头。
实施例10,一种多摄变焦方法,该方法包括:
如图23所示,在进行录像预览或录像,并从大到小变焦时,当在第四变焦倍数范围F4内变焦时,第四变焦倍数范围F4对应的长焦摄像头1934为前台送显状态,将获取的图形发送至显示屏显示;而第三变焦倍数范围F3对应的主摄摄像头1931为后台运行状态。
此处,应理解的是,由于主摄摄像头1931的焦距有限,在变焦倍数较大的情况下,无法适用。由此,例如当变焦至第四变焦倍数范围中的10X处时,主摄摄像头1931才从关闭状态转换为后台运行状态。在10X至第一变焦切换点之间变焦时,主摄摄像头1931为辅助摄像头。
当从第四变焦倍数范围F4向第三变焦倍数范围F3变焦时,3.xX即为第一变焦切换点。在变焦至第一变焦切换点时,第三变焦倍数范围F3对应的主摄摄像头1931接力变焦,从后台运行状态转换为前台送显状态,将获取的图像发送至显示屏显示;而第四变焦倍数范围F4对应的长焦摄像头1934由前台变焦送显状态转换为后台运行状态。
当在第三变焦倍数范围F3内变焦时,主摄摄像头1931为前台送显状态,将获取的图像发送至显示屏显示,而第四变焦倍数范围F4对应的长焦摄像头1934在第三变焦倍数范围F3的预设变焦倍数处,例如,在2.8X处,由后台运行状态转换为关闭状态。在第一变焦切换点至2.8X之间变焦时,长焦摄像头1934为辅助摄像头。
当从第三变焦倍数范围F3向第二变焦倍数范围F2变焦时,由于第二变焦倍数范围F3对应的第一目标摄像头还是主摄摄像头1931,因此,主摄摄像头1931不需要进行切换,主摄摄像头1931维持前台送显状态即可。
当在第二变焦倍数范围内变焦时,主摄摄像头1931为前台送显状态,将获取的图像发送至显示屏显示。
当从第二变焦倍数范围F2向第一变焦倍数范围F1变焦时,1X即为第二变焦切换点。在变焦至第二变焦切换点时,第一变焦倍数范围F1对应的广角摄像头1933接力变焦,从关闭状态转换为前台送显状态,将获取的图像发送至显示屏显示;而第二变焦倍数范围对应的主摄摄像头1931将由前台送显状态转换为后台运行状态。
当在第一变焦倍数范围F1内变焦时,第一变焦倍数范围F1对应的广角摄像头1933为前台显示状态,将获取的图像发送至显示屏显示;第二变焦倍数范围F2对应的主摄摄像头1931为后台运行状态。基于此,第二变焦倍数范围F2对应的主摄摄像头1931在第一变焦倍数范围F1内的预设变焦倍数处,例如0.7X处,由后台运行状态转换为关闭状态。在第二变焦切换点至0.7X之间变焦时,主摄摄像头1931为辅助摄像头。
在此基础上,如图24所示,在进行录像预览或录像,并从小到大变焦时,当从第一变焦倍范围F1向第二变焦倍数范围F2变焦时,1X即为第一变焦切换点。在变焦至该第一变焦切换点时,第二变焦倍数范围F2对应的主摄摄像头1931接力变焦,从后台运行状态转换为前台送显状态,将获取的图像发送至显示屏显示;而第一变焦倍数范围F1对应的广角摄像头1933将由前台送显状态转换为后台运行状态。
此处,应理解的是,由于广角摄像头1933的焦距有限,在转换为后台运行状态后,随着变焦倍数继续增大,可能就无法适用,由此,例如当变焦至第二变焦倍数范围中的1.2X处时,广角摄像头1933由后台运行状态转换为关闭状态。在第一变焦切换点至1.2X之间变焦时,广角摄像头1933为辅助摄像头。
相反的,在从大到小变焦时,当在第二变焦倍数范围内变焦时,主摄摄像头1931为前台送显状态,将获取的图像发送至显示屏显示。此外,第一变焦倍数范围对应的广角摄像头1933将在第二变焦倍数范围内的预设变焦倍数处,例如,在第1.2X处已经开始进入后台运行状态。
然后,当从第二变焦倍数范围F2向第一变焦倍数范围F1变焦时,1X即为第二变焦切换点。在变焦至第二变焦切换点时,第一变焦倍数范围F1对应的广角摄像头1933接力变焦,从后台运行状态转换为前台送显状态,将获取的图像发送至显示屏显示;而第二变焦倍数范围对应的主摄摄像头1931将由前台送显状态转换为后台运行状态。在1.2X至第二变焦切换点之间变焦时,广角摄像头1933为辅助摄像头。
上述对本申请实施例提供的多摄变焦方法进行了详细描述,下面对本申请实施例提供的其他模式下的拍摄方法进行一一介绍。
图25示出了本申请实施例提供的又一种电子设备的界面示意图。
示例性的,为了从室内暗处拍摄窗外阳光灿烂的场景,响应于用户的滑动操作,电子设备显示如图25中的(a)所示的拍摄界面,拍摄键50指示“更多”。基于此,如图25中的(b)所示,响应于用户的点击操作,当前的拍摄模式切换为HDR模式。
当然,上述仅为HDR模式对应的选项在电子设备的界面上的一种呈现方式,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
实施例11,结合图25所示,图26示出了本申请实施例提供的一种HDR模式下的拍摄方法的流程示意图。如图26所示,该方法包括以下S710至S740。
S710、接收用户的第一操作,确定出当前拍摄模式为HDR模式,先确定当前变焦倍数。假设当前变焦倍数为0.5X,则当前变焦倍数属于第一变焦倍数范围[0.5,1)内,目标摄像头为广角摄像头1933。示例性的,利用广角摄像头1933获取3帧第一图像。
此外,若当前变焦倍数为2.6X,则当前变焦倍数属于第三变焦倍数范围[2,3.x)内,在低照度下,目标摄像头为主摄摄像头1931。示例性的,利用主摄摄像头1931获取3帧第二图像。
若当前变焦倍数为20X,则当前变焦倍数属于第四变焦倍数范围[3.x,100]内,在低照度下,目标摄像头为长焦摄像头。示例性的,利用长焦摄像头获取3帧第四图像。
此处,第一图像、第二图像和第四图像的数量仅为示意,具体可以根据需要进行获取,本申请实施例对此不进行任何限制。
其中,第一图像、第二图像和第四图像均位于RAW域,且为拜耳格式图像。
S720、对3帧第一图像、3帧第二图像或3帧第四图像进行第三预处理,得到对应的位于RAW域的第三预处理图像。
上述S620也可以表述为:对3帧第一图像进行第三预处理,得到对应的位于RAW域的第三预处理图像;对3帧第二图像进行第三预处理,得到对应的位于RAW域的第三预处理图像;对3帧第四图像进行第三预处理,得到对应的位于RAW域的第三预处理图像。
该3帧第一图像包括长曝光的第一图像、短曝光的第一图像和中曝光的第一图像;3帧第二图像包括长曝光的第二图像、短曝光的第二图像和中曝光的第二图像;3帧第四图像包括长曝光的第四图像、短曝光的第四图像和中曝光的第四图像。
其中,本申请实施例提供的第三预处理包括HDR算法模块,例如,该HDR算法模块基于长短曝光融合处理和色调映射模型(tone mapping),可以将多帧曝光程度不同的第一图像、第二图像或第四图像融合成1帧位于RAW域的第三预处理图像。
针对HDR算法模块的描述,可参考上述S610中的描述,在此不再赘述。
S730、对第三预处理图像进行前端处理,得到对应的前端处理图像。
其中,对前端处理的描述可以参考上述S120中的内容,在此不再赘述。
示例性的,本实施例中,为了减小数据量,节省带宽,前端处理包括去马赛克和色彩空间转换,以使得第一图像、第二图像或第四图像对应的位于RAW域的第三预处理图像进行前端处理后,得到的前端处理图像位于YUV域。
还应理解,本实施例提供的前端处理,与上述实施例中的前端处理,可以相同,也可以不同,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
S740、对前端处理图像进行后端处理,得到对应的后端处理图像,后端处理图像为拍摄图像。
其中,对后端处理的描述可以参考上述S140中的内容,在此不再赘述。
应理解,第一图像、第二图像或第四图像对应的后端处理图像位于YUV域。
应理解,本实施例提供的后端处理,与上述实施例中提供的后端处理可以相同,也可以不同,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
在该实现方式中,在HDR模式下,基于多帧第一图像、第二图像或第四图像,利用HDR算法模块,进行多帧不同曝光的图像的融合处理,以及上述其他处理,可以融合得到清晰度较高、质量较好的拍摄图像。
还应理解,上述过程仅为一种示例,具体可以根据需要进行顺序上的调整,当然,还可以增加或减少步骤,本申请实施例对此不进行任何限制。
图27示出了本申请实施例提供的又一种电子设备的界面示意图。
示例性的,为了在拍摄时聚焦多个仙人掌中的一个,响应于用户的滑动操作,电子设备显示如图27所示的拍摄界面,拍摄键50指示当前拍摄模式为大光圈模式。
当然,上述仅为大光圈模式对应的选项在电子设备的界面上的一种呈现方式,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
实施例12,结合图27所示,图28示出了本申请实施例提供的一种大光圈模式下的拍摄方法的流程示意图,如图28所示,该方法包括以下S810至S860。
S810、接收用户的第一操作,确定出当拍摄模式为大光圈模式时,变焦倍数适用于1X及以上,由此,示例性的,利用主摄摄像头1931获取6帧第二图像,并利用黑白摄像头1932获取1帧第三图像,其中黑白摄像头1932为辅助摄像头。
此处,第二图像、第三图像的数量仅为示意,具体可以根据需要进行获取,本申请实施例对此不进行任何限制。
其中,第二图像位于RAW域,第二图像为拜耳格式图像,黑白摄像头1932获取的第三图像为灰阶图像。
应理解,第二图像对应的视场角范围和第三图像对应的视场角范围基本一致,第三图像相对于第二图像的细节丰富度较高。
S820、对6帧第二图像进行第十前端处理,得到对应的6帧第十前端处理图像;对1帧第三图像进行第十一前端处理,得到对应的1帧第十一前端处理图像。
其中,对第十前端处理、第十一前端处理的描述可以参考上述S120中的内容,在此不再赘述。
应理解,当第十前端处理包括去马赛克和色彩空间转换时,第二图像经过第十前端处理后,所对应的第十前端处理图像位于YUV域。当第十前端处理不包括去马赛克和色彩空间转换时,第二图像经过第十前端处理后,所对应的第十前端处理图像还是位于RAW域。
示例性的,本实施例中,为了减少数据量,节省带宽,提高后续处理的速度,针对第二图像进行的第十前端处理包括去马赛克和色彩空间转换,以使得第二图像进行前端处理后,对应的第十前端处理图像位于YUV域。
应理解,对于第三图像,由于第三图像为灰阶图像(图中所示为Y图),因此,针对第三图像进行的第十一前端处理不包括去马赛克和色彩空间转换。这样,第三图像进行前端处理后,对应的第十一前端处理图像还是灰阶图像。
还应理解,在本实施例中,第十前端处理和第十一前端处理,除了去马赛克和色彩空间转换之外的其他处理步骤可以相同,也可以不同,本申请实施例对此不进行限制。此外,本实施例提供的第十前端处理和第十一前端处理,与上述实施例中所提供 的前端处理,可以相同,也可以不同,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
S830、利用第二前端融合模块分别将6帧第二图像对应的6帧第十前端处理图像进行融合,得到6帧第二图像对应的第二前端融合图像。
示例性的,本实施例提供的第十前端处理包括去马赛克和色彩空间转换,6帧第二图像对应的6帧第十前端处理图像位于YUV域。此时,对应的第二前端融合模块相应包括YUV域的多帧融合模块,以实现YUV域的多帧融合功能。由此,经第二前端融合模块处理所得到的第二前端融合图像还是位于YUV域。由此,可以得后续处理中的图像位于YUV域,减小数据量,节省带宽。
应理解,本实施例中的第二前端融合模块与上述实施例中的第一前端融合模块、第二前端融合模块、第三前端融合模块、或第四前端融合模块可以相同、也可以不相同,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
当然,第二前端融合模块还可以包括其他功能模块,具体可以参考上述S130中对第一前端融合模块或第二前端融合模块的描述,在此不再赘述。
在此基础上,多帧第二图像可以包括长曝光的第二图像、短曝光的第二图像和中曝光的第二图像。
当多帧第二图像包括不同曝光程度的第二图像,相应的,多帧第二图像对应的第十前端处理图像包括不同曝光程度的前端处理图像,基于此,第一融合模块将不同曝光程度的多帧第十前端处理图像进行融合后,可以增加图像中暗区和过曝区域的细节,提升动态范围,从而可以提升对应的第一融合图像的清晰度。
S840、对6帧第二图像对应的第二前端融合图像进行第九后端处理,得到对应的第九后端处理图像;对第三图像对应的前端处理图像进行第十后端处理,得到对应的第十后端处理图像。
其中,对第九后端处理、第十后端处理的描述可以参考上述S140中的内容,在此不再赘述。
应理解,第二图像对应的第九后端处理图像位于YUV域,第三图像对应的第十后端处理图像为灰阶图像。
还应理解,在本实施例中,第九后端处理与第十后端处理,可以相同,也可以不同;此外,本实施例中的第九后端处理和第十后端处理,与上述实施例中的后端处理,可以相同,也可以不同,具体可以根据需进行设置,本申请实施例对此不进行任何限制。
S850、对6帧第二图像对应的第九后端处理图像和第三图像对应的第十后端处理图像进行深度估计处理,得到深度图像。
应理解,深度估计处理指的是利用双目立体视觉原理,对6帧第二图像对应的第九后端处理图像和1帧第三图像对应的第十后端处理图像进行像素点匹配,然后根据匹配结果计算出每个像素的深度信息,从而可以根据深度信息生成深度图像。其中,深度图像为灰阶图像。
S860、利用深度图像对6帧第二图像对应的第九后端处理图像进行虚化处理,得到对应的虚化处理图像。虚化处理图像为拍摄图像。
应理解,可以利用深度图像可以辅助对6帧第二图像对应的第九后端处理图像中的前景和背景进行分离,然后,再对背景或前景进行虚化处理。
在该实施例中,在大光圈模式下,基于视场角不同、细节丰富度不同的第二图像和第三图像,进行上述一系列处理,可以融合得到前景清晰度较高、质量较好的拍摄图像。
还应理解,上述过程仅为一种示例,具体可以根据需要进行顺序上的调整,当然,还可以增加或减少步骤,本申请实施例对此不进行任何限制。
本申请实施例还提供了另一种大光圈模式下的拍摄方法的流程示意图。该方法应用于除了包括上述4个摄像头,还包括有TOF摄像头1935的电子设备100中。
图29示出了该5个摄像头在电子设备的后盖上的排布示意图。
如图29中的(a)所示,上述5个摄像头排布在电子设备100的后盖的左上角。其中,主摄摄像头1931作为用户常用的摄像头,单独分布在靠近后盖上方的第一圆形区域中;黑白摄像头1932、广角摄像头1933、长焦摄像头1934和TOF摄像头1935这4个摄像头分布在靠近后盖下方的第二圆形区域中;此外,在靠近后盖下方的第二圆形区域中,还可设置闪光灯。
如图29中的(b)所示,上述5个摄像头排布在电子设备的后盖中间的圆形区域中。其中,主摄摄像头1931作为用户常用的摄像头,设置在圆形区域的中心位置处,黑白摄像头1932、广角摄像头1933、长焦摄像头1934和TOF摄像头1935这4个摄像头分布在主摄摄像头1931的四周。此外,在该圆形区域中,还可以设置闪光灯。
应理解,上述仅为两种排布方式的示例,也可以为其他的排布方式,具体排布方式可以根据需要进行设计和更改,本申请实施例对此不进行任何限制。
实施例13,图30示出了本申请实施例提供的另一种大光圈模式下的拍摄方法的流程示意图,如图30所示,该方法包括以下S910至S950。
S910、接收用户的第一操作,确定出当拍摄模式为大光圈模式时,变焦倍数适用于1X及以上,由此,示例性的,利用主摄摄像头1931获取6帧第二图像,并利用TOF摄像头1935获取待拍摄场景的深度信息,利用深度信息生成深度图像。其中,TOF摄像头1935为辅助摄像头。
应理解,第二图像的数量仅为示意,具体可以根据需要进行获取,本申请实施例对此不进行任何限制。其中,第二图像位于RAW域,为拜耳格式图像。
此处,TOF摄像头1935在对待拍摄场景进行拍摄时,可以给目标(比如待拍摄场景中的某个物体)连续发送光脉冲,然后,利用传感器接收从物体返回的光,由此,通过光线的飞行(往返)时间可以得到目标的距离。基于此,通过计算光线从TOF摄像头1935发出到返回TOF摄像头1935的时间来计算得到待拍摄场景中每个点和电子设备100的距离,由此,获得待拍摄场景的深度信息,再将深度信息表现为深度图像。其中,深度图像为灰阶图像。
示例性的,图31中的(a)示出了主摄摄像头1931针对待拍摄场景进行拍摄,获取的第二图像。图31中的(b)示出了TOF摄像头1935针对同一待拍摄场景进行拍 摄,获取的深度图像。
S920、对6帧第二图像进行前端处理,得到对应的6帧前端处理图像。
其中,对前端处理的描述可以参考上述S120中的内容,在此不再赘述。
应理解,当前端处理包括去马赛克和色彩空间转换时,第二图像经过前端处理后,所对应的前端处理图像位于YUV域。当前端处理不包括去马赛克和色彩空间转换时,第二图像经过前端处理后,所对应的前端处理图像还是位于RAW域。
示例性的,本实施例中,为了减少数据量,节省带宽,提高后续处理的速度,针对第二图像进行的前端处理包括去马赛克和色彩空间转换,以使得第二图像进行前端处理后,对应的前端处理图像位于YUV域。
还应理解,本实施例提供的前端处理,与上述实施例中的前端处理,可以相同,也可以不同,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
S930、利用第二前端融合模块将6帧第二图像对应的6帧前端处理图像进行融合,得到6帧第二图像对应的第二前端融合图像。
示例性的,本实施例提供的前端处理包括去马赛克和色彩空间转换,6帧第二图像对应的6帧前端处理图像。此时,对应的第二前端融合模块相应包括YUV域的多帧融合模块,以实现YUV域的多帧融合功能。由此,经第二前端融合模块处理所得到的第二前端融合图像还是位于YUV域。由此,可以得后续处理中的图像位于YUV域,减小数据量,节省带宽。
应理解,本实施例中的第二前端融合模块与上述实施例中的第一前端融合模块、第二前端融合模块、第三前端融合模块、或第四前端融合模块可以相同、也可以不相同,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
当然,第二前端融合模块还可以包括其他功能模块,具体可以参考上述S130中对第一前端融合模块或第二前端融合模块的描述,在此不再赘述。
在此基础上,多帧第二图像可以包括长曝光的第二图像、短曝光的第二图像和中曝光的第二图像。
当多帧第二图像包括不同曝光程度的第二图像,相应的,多帧第二图像对应的前端处理图像包括不同曝光程度的前端处理图像,基于此,第二前端融合模块将不同曝光程度的多帧前端处理图像进行融合后,可以增加图像中暗区和过曝区域的细节,提升动态范围,从而可以提升对应的第一融合图像的清晰度。
S940、对第二前端融合图像进行后端处理,得到对应的后端处理图像。
其中,对后端处理的描述可以参考上述S140中的内容,在此不再赘述。
应理解,第二图像对应的后端处理图像位于YUV域。
应理解,本实施例提供的后端处理,与上述实施例中的后端处理可以相同,也可以不同,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
S950、利用深度图像对第二图像对应的后端处理图像进行虚化处理,得到对应的虚化处理图像。虚化处理图像为拍摄图像。
应理解,可以利用深度图像可以辅助对后端处理图像中的前景和背景进行分离,然后,再对背景或前景进行虚化处理。
在该实施例中,在大光圈模式下,基于第二图像和表现深度信息的深度图像,进 行上述一系列处理,可以融合得到前景清晰度较高、质量较好的拍摄图像。
还应理解,上述过程仅为一种示例,具体可以根据需要进行顺序上的调整,当然,还可以增加或减少步骤,本申请实施例对此不进行任何限制。
图32示出了本申请实施例提供的又一种电子设备的界面示意图。
示例性的,在给某位女士拍摄的场景中,响应于用户的滑动操作,电子设备100显示如图32所示的拍摄界面,拍摄键50指示当前拍摄模式为人像模式。
当然,上述仅为人像模式对应的选项在电子设备的界面上的一种呈现方式,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
实施例14,结合图32所示,图33示出了本申请实施例提供的一种人像模式下的拍摄方法的流程示意图,如图33所示,该方法包括以下S1010至S1070。
S1010、接收用户的第一操作,确定出当拍摄模式为人像模式时,变焦倍数适用于1X及以上,由此,示例性的,利用主摄摄像头1931获取2帧第二图像,并利用黑白摄像头1932获取1帧第三图像。其中,黑白摄像头1932为辅助摄像头。
此处,第二图像的数量仅为示意,具体可以根据需要进行获取,本申请实施例对此不进行任何限制。
其中,第二图像位于RAW域,第二图像为拜耳格式图像,黑白摄像头1932获取的第三图像为灰阶图像。
应理解,第二图像对应的视场角范围和第三图像对应的视场角范围基本一致,第三图像相对于第二图像的细节丰富度更高。
S1020、对2帧第二图像进行第十二前端处理,得到对应的2帧第十二前端处理图像;对1帧第三图像分别进行第十三前端处理,得到对应的1帧第十三前端处理图像。
其中,对第十二前端处理、第十三前端处理的描述可以参考上述S120中的内容,在此不再赘述。
应理解,当第十二前端处理包括去马赛克和色彩空间转换时,第二图像经过第十二前端处理后,所对应的第十二前端处理图像位于YUV域。当第十二前端处理不包括去马赛克和色彩空间转换时,第二图像经过第十二前端处理后,所对应的第十二前端处理图像还是位于RAW域。
示例性的,本实施例中,为了保留更多的细节,针对第二图像进行的第十二前端处理不包括去马赛克和色彩空间转换,以使得第二图像进行第十二前端处理后,对应的第十二前端处理图像位于RAW域。
应理解,对于第三图像,由于第三图像为灰阶图像(图中所示为Y图),因此,针对第三图像进行的第十三前端处理也不包括去马赛克和色彩空间转换。这样,第三图像进行第十三前端处理后,对应的第十三前端处理图像还是灰阶图像。
还应理解,在本实施例中,第十二前端处理和第十三前端处理,可以相同,也可以不同,本申请实施例对此不进行限制。此外,本实施例提供的第十二前端处理和第十三前端处理,与上述实施例中所提供的前端处理,可以相同,也可以不同,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
S1030、利用第二前端融合模块分别将2帧第二图像对应的1帧第十二前端处理图 像进行融合,得到2帧第二图像对应的第二前端融合图像。
示例性的,本实施例针对第二图像提供的第十二前端处理不包括去马赛克和色彩空间转换,2帧第二图像对应的2帧第十二前端处理图像位于RAW域,此时,对应的第二前端融合模块相应包括RAW域的多帧融合模块,以实现RAW域的多帧融合功能。经第二前端融合模块处理所得到的第二前端融合图像也位于RAW域。
应理解,本实施例中的第二前端融合模块与上述实施例中的第一前端融合模块、第二前端融合模块、第三前端融合模块、或第四前端融合模块可以相同、也可以不相同,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
当然,第二前端融合模块还可以包括其他功能模块,具体可以参考上述S130中对第一前端融合模块或第二前端融合模块的描述,在此不再赘述。
在此基础上,多帧第二图像可以包括长曝光的第二图像、短曝光的第二图像和中曝光的第二图像。
当多帧第二图像包括不同曝光程度的第二图像时,相应的,多帧第二图像对应的前端处理图像包括不同曝光程度的前端处理图像,基于此,第一融合模块将不同曝光程度的多帧前端处理图像进行融合后,可以增加图像中暗区和过曝区域的细节,提升动态范围,从而可以提升对应的第一融合图像的清晰度。
可选地,上述S1020还可以为:对2帧第二图像进行第一预处理,得到位于RAW域的2帧第一预处理图像;对1帧第三图像进行前端处理,得到对应的2帧前端处理图像。
其中,对第一预处理的描述可以参考上述S220中的内容,在此不再赘述。
相应的,S1030为:利用第二前端融合模块分别将2帧第二图像对应的2帧第一预处理图像进行融合,得到2帧第二图像对应的第二前端融合图像。
S1040、对2帧第二图像对应的第一融合图像进行第十后端处理,得到对应的第十后端处理图像;对2帧第三图像对应的第一融合图像进行第十一后端处理,得到对应的第十一后端处理图像。
其中,对第十后端处理、第十一后端处理的描述可以参考上述S140中的内容,在此不再赘述。
应理解,第二图像对应的第十后端处理图像位于YUV域,第三图像对应的第十一后端处理图像为灰阶图像。
还应理解,在本实施例中,第十后端处理和第十一后端处理,可以相同,也可以不同;此外,本实施例中的第十后端处理和第十一后端处理,与上述实施例中的后端处理,可以相同,也可以不同,具体可以根据需进行设置,本申请实施例对此不进行任何限制。
S1050、对2帧第二图像对应的第十后端处理图像和1帧第三图像对应的第十一后端处理图像进行深度估计处理,得到深度图像。
应理解,深度估计处理指的是利用双目立体视觉原理,对2帧第二图像对应的第十后端处理图像和2帧第三图像对应的第十一后端处理图像进行像素点匹配,然后根据匹配结果计算出每个像素的深度信息,从而可以根据深度信息生成深度图像。其中,深度图像为灰阶图像。
S1060、利用深度图像对2帧第二图像对应的第十后端处理图像进行虚化处理,得到对应的虚化处理图像。
应理解,可以利用深度图像可以辅助对2帧第二图像对应的第十后端处理图像中的前景和背景进行分离,然后,再对背景或前景进行虚化处理。
其中,虚化处理图像位于YUV域。
示例性的,如图35所示,电子设备100在预览时会检测人脸,当检测到人脸时,会触发face AE和face AF,使人脸所处于亮度最为合适的亮度范围,并且AF会推动对焦马达,使人脸置于最合适的对焦平面上。
按下拍照键后,会进行深度估计处理产生深度图像,人脸所处的深度平面会适当锐化,以提升人脸的清晰度。其他的深度平面会做不同程度的虚化模糊处理,虚化程度取决于离人脸所在深度平面的距离,距离越远,虚化程度越高;距离越近,虚化程度越弱。
S1070、对虚化处理图像进行美肤处理,得到美肤处理图像。美肤处理图像为拍摄图像。
应理解,美肤处理可用于对被拍摄人物的脸部图像进行调整,使得调整后的脸部图像所表现的脸部相较于被拍摄人物的实际脸部发生了皮肤美化,例如皮肤美白、皮肤磨皮(如去除人物脸上的痘痘、雀斑、皱纹等),等等。“美肤”功能所涉及的对脸部图像进行调整可以是指采用表面模糊、均值滤波、双边滤波等算法对脸部图像进行平滑处理。由此,对脸部图像进行的这种处理可以称为美肤处理。
其中,美肤处理图像位于YUV域。美肤处理图像将被作为拍摄图像进行在电子设备100的界面上进行显示,或者,仅进行存储,具体可以根据需要进行传输,本申请实施例对此不进行任何限制。
还应理解,上述过程仅为一种示例,具体可以根据需要进行顺序上的调整,当然,还可以增加或减少步骤,本申请实施例对此不进行任何限制。
本申请实施例还提供了另一种人像模式下的拍摄方法的流程示意图。该方法应用于除了包括上述4个摄像头,还包括有TOF摄像头1935的电子设备100中。
实施例15,结合图32所示,图34示出了本申请实施例提供的另一种人像模式下的拍摄方法的流程示意图,如图34所示,该方法包括以下S1110至S1160。
S1110、接收用户的第一操作,确定出当拍摄模式为人像模式时,变焦倍数适用于1X及以上,由此,示例性的,利用主摄摄像头1931获取2帧第二图像,并利用TOF摄像头1935获取待拍摄场景的深度信息,利用深度信息生成深度图像。其中,TOF摄像头1935为辅助摄像头。
应理解,第二图像的数量仅为示意,具体可以根据需要进行获取,本申请实施例对此不进行任何限制。其中,第二图像位于RAW域,为拜耳格式图像。
此处,对TOF摄像头1935获取深度图像的过程可参考上述S910中的描述,在此不再赘述。
S1120、对2帧第二图像进行前端处理,得到对应的2帧前端处理图像。
其中,对前端处理的描述可以参考上述S120中的内容,在此不再赘述。
应理解,当前端处理包括去马赛克和色彩空间转换时,第二图像经过前端处理后,所对应的前端处理图像位于YUV域。当前端处理不包括去马赛克和色彩空间转换时,第二图像经过前端处理后,所对应的前端处理图像还是位于RAW域。
示例性的,本实施例中,为了保留更多细节,针对第二图像进行的前端处理不包括去马赛克和色彩空间转换,以使得第二图像进行前端处理后,对应的前端处理图像位于RAW域。
还应理解,本实施例提供的前端处理,与上述实施例中的前端处理,可以相同,也可以不同,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
S1130、利用第二前端融合模块将2帧第二图像对应的2帧前端处理图像进行融合,得到2帧第二图像对应的第二前端融合图像。
示例性的,本实施例提供的前端处理不包括去马赛克和色彩空间转换,2帧第二图像对应的2帧前端处理图像位于RAW域,此时,对应的第二前端融合模块相应包括RAW域的多帧融合模块,以实现RAW域的多帧融合功能。由此,经第二前端融合模块处理所得到的第一融合图像还是位于RAW域。
应理解,本实施例中的第二前端融合模块与上述实施例中的第一前端融合模块、第二前端融合模块、第三前端融合模块、或第四前端融合模块可以相同、也可以不相同,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
当然,第二前端融合模块还可以包括其他功能模块,具体可以参考上述S130中对第一前端融合模块或第二前端融合模块的描述,在此不再赘述。
在此基础上,多帧第二图像可以包括长曝光的第二图像、短曝光的第二图像和中曝光的第二图像。
当多帧第二图像包括不同曝光程度的第二图像,相应的,多帧第二图像对应的前端处理图像包括不同曝光程度的前端处理图像,基于此,第二前端融合模块将不同曝光程度的多帧前端处理图像进行融合后,可以增加图像中暗区和过曝区域的细节,提升动态范围,从而可以提升对应的第一融合图像的清晰度。
还应理解,本实施例中的第一融合模块,与上述实施例中的第一融合模块,可以相同,也可以不同,具体可以根据需进行设置,本申请实施例对此不进行任何限制。
S1140、对第二前端融合图像进行后端处理,得到对应的后端处理图像。
其中,对后端处理的描述可以参考上述S140中的内容,在此不再赘述。
应理解,第二图像对应的后端处理图像位于YUV域。
应理解,本实施例提供的后端处理,与上述实施例中提供的后端处理可以相同,也可以不同,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
S1150、利用深度图像对后端处理图像进行虚化处理,得到对应的虚化处理图像。
应理解,可以利用深度图像可以辅助对后端处理图像中的前景和背景进行分离,然后,再对背景或前景进行虚化处理。
其中,虚化处理图像位于YUV域。
S1160、对虚化处理图像进行美肤处理,得到美肤处理图像。美肤处理图像为拍摄图像。
针对美肤处理的描述可参考上述S1070中的内容,在此不再赘述。
其中,美肤处理图像位于YUV域。美肤处理图像将被作为拍摄图像进行在电子设备100的界面上进行显示,或者,仅进行存储,具体可以根据需要进行传输,本申请实施例对此不进行任何限制。
还应理解,上述过程仅为一种示例,具体可以根据需要进行顺序上的调整,当然,还可以增加或减少步骤,本申请实施例对此不进行任何限制。
图36示出了本申请实施例提供的又一种电子设备的界面示意图。
示例性的,为了拍摄夜晚海面上升起的月亮,响应于用户的滑动操作,电子设备显示如图32所示的拍摄界面,拍摄键50指示当前拍摄模式为夜景模式。
当然,上述仅为夜景模式对应的选项在电子设备的界面上的一种呈现方式,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
实施例16,一种拍摄方法,如图37所示,该方法包括以下S1210至S1240。
S1210、假设当前变焦倍数为0.5倍,则当前变焦倍数属于第一变焦倍数范围[0.5,1)内,在低照度下,目标摄像头为广角摄像头1933。示例性的,利用广角摄像头1933获取3帧第一图像。
此外,若当前变焦倍数为2.6倍,则当前变焦倍数属于第三变焦倍数范围[2,3.x)内,在低照度下,目标摄像头为主摄摄像头1931。示例性的,利用主摄摄像头1931获取3帧第二图像。
若当前变焦倍数为20,则当前变焦倍数属于第四变焦倍数范围[3.x,100]内,在低照度下,目标摄像头为长焦摄像头。示例性的,利用长焦摄像头获取3帧第四图像。
此处,第一图像、第二图像和第四图像的数量仅为示意,具体可以根据需要进行获取,本申请实施例对此不进行任何限制。
其中,第一图像、第二图像和第四图像均位于RAW域,且为拜耳格式图像。
S1220、对3帧第一图像、3帧第二图像或3帧第四图像进行第二预处理,得到对应的位于RAW域的第二预处理图像。
上述S1220也可以表述为:对3帧第一图像进行第二预处理,得到对应的位于RAW域的第二预处理图像;对3帧第二图像进行第二预处理,得到对应的位于RAW域的第二预处理图像;对3帧第四图像进行第二预处理,得到对应的位于RAW域的第二预处理图像。
其中,本实施例提供的第二预处理包括夜景算法模块,例如,该夜景算法模块基于Unet网络模型生成,可以将RAW域的多帧第一图像、多帧第二图像或者多帧第四图像融合成对应的1帧位于RAW域的第二预处理图像。具体描述可以参考上述S520中的内容,在此不再赘述。
S1230、对3帧第一图像、3帧第二图像或3帧第四图像对应的第二预处理图像进行前端处理,得到对应的前端处理图像。
其中,对前端处理的描述可以参考上述S120中的内容,在此不再赘述。
示例性的,本实施例中,为了减小数据量,节省带宽,前端处理包括去马赛克和色彩空间转换,以使得第一图像、第二图像或第四图像对应的位于RAW域的第二预 处理图像进行前端处理后,得到的前端处理图像位于YUV域。
还应理解,本实施例提供的前端处理,与上述实施例中的前端处理,可以相同,也可以不同,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
S1240、对3帧第一图像、3帧第二图像或3帧第四图像对应的前端处理图像进行后端处理,得到对应的后端处理图像,后端处理图像为拍摄图像。
其中,对后端处理的描述可以参考上述S140中的内容,在此不再赘述。
应理解,第一图像、第二图像或第四图像对应的后端处理图像位于YUV域。
应理解,本实施例提供的后端处理,与上述实施例中提供的后端处理可以相同,也可以不同,具体可以根据需要进行设置和更改,本申请实施例对此不进行任何限制。
在该实现方式中,在夜景模式下,基于多帧第一图像、第二图像或第四图像,利用网络模型进行多帧融合处理,以及上述其他处理,可以融合得到清晰度较高、质量较好的拍摄图像。
还应理解,上述过程仅为一种示例,具体可以根据需要进行顺序上的调整,当然,还可以增加或减少步骤,本申请实施例对此不进行任何限制。
上述通过实施例11至16,对本申请实施例提供的大光圈模式、人像模式、夜景模式下的拍摄方法进行了详细介绍。下面对本申请实施例提供的一种智能模式下的拍摄方法进行介绍。
图38示出了本申请实施例提供的又一种电子设备的界面示意图。
示例性的,如图38中的(a)所示,响应于用户的触摸操作,当电子设备100运行相机应用时,电子设备100显示如图38中的(b)所示的拍摄界面。拍摄键50指示“更多”。
继续响应于用户的点击操作,电子设备100显示如图38中的(c)所示的拍摄界面,该拍摄界面显示智能模式对应的选项。
然后,响应于用户对智能模式对应的选项的点击操作,电子设备100显示如图38中的(d)所示的拍摄界面。该拍摄界面中还包括取景窗口60,取景窗口60可用于实时显示拍照前或录像前的预览图像。另外,预览图像中还显示有变焦选项61。用户可以在变焦选项61中选择当前需要的变焦倍数,例如,0.5倍、2倍或50倍等。
结合图38中的(d)所示,拍摄键50指示当前拍摄模式为智能模式。基于此,图38示出了本申请实施例提供的一种智能模式下的拍摄方法的流程示意图。
实施例17,一种拍摄方法,如图39所示,该方法包括以下S1310~S1370。
S1310、接收用户的第一操作,确定出当前拍摄模式为智能模式,则对待拍摄场景进行自动识别。
S1320、当识别到待拍摄场景为HDR场景时,调用HDR模式下的拍摄方法进行拍摄。
例如,如上述实施例11所示,若是HDR场景,则自动确定当前变焦倍数,并确定当前变焦倍数所属的变焦倍数范围。当当前变焦倍数属于第一变焦倍数范围内时,确定目标摄像头为广角摄像头,利用广角摄像头1933获取多帧第一图像;当当前变焦倍数属于第二变焦倍数范围或第三变焦倍数范围时,确定目标摄像头为主摄摄像头 1931,利用主摄摄像头1931获取多帧第二图像。当当前变焦倍数属于第四变焦倍数范围时,确定目标摄像头为长焦摄像头1934,利用长焦摄像头1934获取多帧第四图像。然后,对多帧第一图像、多帧第二图像或多帧第四图像进行第三预处理,得到对应的位于RAW域的第三预处理图像,再对第三预处理图像进行前端处理,得到对应的前端处理图像,接着,对前端处理图像进行后端处理,得到对应的后端处理图像,将后端处理图像作为拍摄图像。
S1330、当识别出非人像的目标物,且目标物在取景窗口中的面积占比大于预设比值时,自动调用大光圈模式下的拍摄方法进行拍摄。
例如,结合图38所示,当自动识别出花朵时,且用户进行变焦操作后,该花朵在取景窗口中的面积占比大于预设比值(例如50%)时,如上述实施例12或13所示,利用主摄摄像头1931获取多帧第二图像,以及黑白摄像头1932获取多帧第三图像,对多帧第二图像、多帧第三图像分别进行前端处理,得到各自对应的多帧前端处理图像,然后,对多帧第二图像对应的多帧前端处理图像进行融合并进行后端处理,得到对应的后端处理图像,同时对多帧第三图像对应的多帧前端处理图像进行融合并进行后端处理,得到对应的后端处理图像。将两者进行深度估计处理得到深度图像,或者,利用TOF摄像头1935获取待拍摄场景的深度信息,生成深度图像;接着,再利用深度图像对第二图像对应的后端处理图像进行虚化处理,得到对应的虚化处理图像。虚化处理图像为拍摄图像。
S1340、当识别出人像时,自动调用人像模式下的拍摄方法进行拍摄。
例如,如上述实施例14和15所示,若识别出人像,则根据实施例12或13所示的步骤进行执行,然后,在实施例12或13的基础上,对虚化处理图像进行美肤处理,由此,得到美肤处理图像,此时,美肤处理图像为拍摄图像。
S1350、当上述均不适用时,自动识别待拍摄场景的照度,比较待拍摄场景的照度与预设照度阈值的大小。
S1360、若待拍摄场景的照度小于预设照度阈值,即是低照度,则自动调用拍照模式下,对应低照度的拍摄方法进行拍摄。
S1370、若是待拍摄场景的照度大于或等于预设照度阈值,即是中高照度,则自动调用拍照模式下,对应中高照度的拍摄方法进行拍摄。
例如,如上述实施例5所示,若是低照度,则自动确定当前变焦倍数,并确定当前变焦倍数所属的变焦倍数范围。当当前变焦倍数属于第一变焦倍数范围内时,确定目标摄像头为广角摄像头,利用广角摄像头获取多帧第一图像;当当前变焦倍数属于第二变焦倍数范围或第三变焦倍数范围时,确定目标摄像头为主摄摄像头1931,利用主摄摄像头1931获取多帧第二图像。当当前变焦倍数属于第四变焦倍数范围时,确定目标摄像头为长焦摄像头1934,利用长焦摄像头获取多帧第四图像。然后,对多帧第一图像、多帧第二图像或多帧第四图像进行第二预处理,得到对应的位于RAW域的第二预处理图像,再对第二预处理图像进行前端处理,得到对应的前端处理图像,接着,对前端处理图像进行后端处理,得到对应的后端处理图像,将后端处理图像作为拍摄图像。
例如,如上述实施例1至4所示,若是中高照度,则自动确定当前变焦倍数,并 确定当前变焦倍数所属的变焦倍数范围。若当前变焦倍数属于第一变焦倍数范围,则利用如实施例1所示的方法得到拍摄图像;若当前变焦倍数属于第二变焦倍数范围,则利用如实施例2所示的方法得到拍摄图像;若当前变焦倍数属于第三变焦倍数范围,则利用如实施例3所示的方法得到拍摄图像;若当前变焦倍数属于第四变焦倍数范围,则利用如实施例4所示的方法得到拍摄图像。
本申请实施例提供一种拍摄方法,在智能模式下,通过对待拍摄场景进行自动识别,可以按照识别结果,自动调用不同模式的处理方法获取拍摄图像。由此,可以降低用户的使用门槛,自适应的得到最佳效果的、高清晰度、高质量的拍摄图像。
上述主要从电子设备的角度对本申请实施例提供的方案进行了介绍。可以理解的是,电子设备,为了实现上述功能,其包含了执行每一个功能相应的硬件结构或软件模块,或两者结合。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
本申请实施例可以根据上述方法示例对电子设备进行功能模块的划分,例如,可以对应每一个功能划分每一个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。下面以采用对应每一个功能划分每一个功能模块为例进行说明:
图40为本申请实施例提供的一种图像处理装置的结构示意图。如图40所示,该图像处理装置300包括确定模块310、处理模块320和多个摄像头,该多个摄像头包括广角摄像头1933、主摄摄像头1931、黑白摄像头1932和长焦摄像头1934。
确定模块310,用于确定当前拍摄模式。其中,拍摄模式包括:拍照模式、录像模式、夜景模式、人像模式、大光圈模式、HDR模式、智能模式。
当当前拍摄模式为拍照模式时,确定模块310,还用于确定待拍摄场景的照度和当前变焦倍数。处理模块320,用于根据待拍摄场景的照度和当前变焦倍数,确定目标摄像头,并利用目标摄像头获取原始图像。处理模块320,还用于对原始图像处理,得到拍摄图像。
可选地,当待拍摄场景的照度大于或等于预设照度阈值,确定模块310,还用于确定当前变焦倍数所属变焦倍数范围。根据当前变焦倍数所属变焦倍数范围,确定目标摄像头,并利用目标摄像头获取原始图像。
可选地,当当前变焦倍数属于第一变焦倍数范围时,确定模块310,还用于确定目标摄像头为广角摄像头和主摄摄像头1931,利用广角摄像头获取第一图像,并利用主摄摄像头1931获取第二图像,原始图像包括第一图像和第二图像。
当当前变焦倍数属于第二变焦倍数范围时,确定模块310,还用于确定目标摄像头为主摄摄像头1931和黑白摄像头1932,利用主摄摄像头1931获取第二图像,并利 用黑白摄像头获取第三图像,原始图像包括第二图像和第三图像。
当当前变焦倍数属于第三变焦倍数范围时,确定模块310,还用于确定目标摄像头为主摄摄像头1931和长焦摄像头,利用主摄摄像头1931获取第二图像,并利用长焦摄像头获取第四图像,原始图像包括第二图像和第四图像。
当当前变焦倍数属于第四变焦倍数范围时,确定目标摄像头为长焦摄像头1934,利用长焦摄像头获取第四图像,原始图像包括第四图像。
当待拍摄场景的照度小于预设照度阈值时,或者,当拍摄模式为夜景模式时,确定模块310,用于确定当前变焦倍数所属变焦倍数范围;根据当前变焦倍数所属变焦倍数范围,确定目标摄像头,并利用目标摄像头获取原始图像。
可选地,当当前变焦倍数属于所述第一变焦倍数范围时,确定模块310,还用于确定目标摄像头为广角摄像头1933,利用广角摄像头1933获取多帧第一图像,原始图像包括多帧第一图像。
当当前变焦倍数属于第二变焦倍数范围或第三变焦倍数范围时,确定模块310,还用于确定目标摄像头为主摄摄像头1931,利用主摄摄像头1931获取多帧第二图像,原始图像包括多帧所述第二图像。
当当前变焦倍数属于第四变焦倍数范围时,确定目标摄像头为长焦摄像头1934,利用长焦摄像头1934获取多帧第四图像,原始图像包括多帧第四图像。
当当前拍摄模式为录像模式或HDR模式时,确定模块310,还用于确定当前变焦倍数所属变焦倍数范围;根据当前变焦倍数所属变焦倍数范围,确定目标摄像头,并利用目标摄像头获取原始图像;处理模块320,还用于对原始图像进行处理,得到拍摄图像。
当拍摄模式为大光圈模式或人像模式时,利用主摄摄像头1931获取多帧第二图像,并利用黑白摄像头1932获取多帧第三图像。
处理模块320,用于对多帧第二图像、多帧第三图像分别进行前端处理,得到各自对应的多帧前端处理图像;利用前端融合模块分别将多帧第二图像对应的多帧前端处理图像、多帧第三图像对应的多帧前端处理图像进行融合,得到多帧第二图像、多帧第三图像分别对应的前端融合图像;对多帧第二图像、多帧第三图像分别对应的前端融合图像均进行后端处理,得到各自对应的后端处理图像;对多帧第二图像和多帧第三图像对应的后端处理图像进行深度估计处理,得到深度图像;利用深度图像对多帧第二图像对应的后端处理图像进行虚化处理,得到对应的虚化处理图像。
或者,当电子设备还包括TOF摄像头1935,在拍摄模式为大光圈模式或人像模式时,利用主摄摄像头1931获取多帧第二图像,并利用TOF摄像头1935获取待拍摄场景的深度信息,处理模块320,用于利用深度信息生成深度图像。
处理模块320,还用于对多帧第二图像进行前端处理,得到对应的多帧前端处理图像;利用前端融合模块将多帧第二图像对应的多帧前端处理图像进行融合,得到多帧第二图像对应的前端融合图像;对前端融合图像进行后端处理,得到对应的后端处理图像;利用深度图像对后端处理图像进行虚化处理,得到对应的虚化处理图像。
当拍摄模式为人像模式时,处理模块320,还用于对虚化处理图像进行美肤处理,得到美肤处理图像。
本申请实施例还提供另一种电子设备,包括摄像头模组、处理器和存储器。
摄像头模组,用于获取多帧原始图像,多帧原始图像为对相同的待拍摄场景拍摄的图像。
存储器,用于存储可在处理器上运行的计算机程序。
处理器,用于执行如上述所述的拍摄方法,和/或,执行如上述所述的多摄变焦方法。
可选地,摄像头模组包括广角摄像头、彩色摄像头、黑白摄像头和长焦摄像头。
广角摄像头,用于在处理器获取拍照指令后,获取第一图像。
主摄摄像头,用于在处理器获取所述拍照指令后,获取第二图像。
黑白摄像头,用于在处理器获取所述拍照指令后,获取第三图像。
长焦摄像头,用于在处理器获取所述拍照指令后,获取第四图像。
严格来说,是通过摄像头中的图像处理器来获取图像。其中,图像传感器例如可以为电荷耦合元件(charge-coupled device,CCD)、互补金属氧化物半导体(complementary metal oxide semiconductor,CMOS)等。
本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机指令;当所述计算机可读存储介质在电子设备上运行时,使得该电子设备执行如实施例1至17中任一项所示的方法。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或者数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可以用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带),光介质、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。
图41为本申请实施例提供的一种芯片的结构示意图。图41所示的芯片可以为通用处理器,也可以为专用处理器。该芯片包括处理器401。其中,处理器401用于支持图像处理装置执行实施例1至17中任一项所示的技术方案。
可选的,该芯片还包括收发器402,收发器402用于接受处理器401的控制,用于支持通信装置执行实施例1至17中任一项所示的技术方案。
可选的,图41所示的芯片还可以包括:存储介质403。
需要说明的是,图41所示的芯片可以使用下述电路或者器件来实现:一个或多个现场可编程门阵列(field programmable gate array,FPGA)、可编程逻辑器件(programmable logic device,PLD)、控制器、状态机、门逻辑、分立硬件部件、任何其他适合的电路、或者能够执行本申请通篇所描述的各种功能的电路的任意组合。
上述本申请实施例提供的电子设备、图像处理装置、计算机存储介质、计算机程序产品、芯片均用于执行上文所提供的方法,因此,其所能达到的有益效果可参考上文所提供的方法对应的有益效果,在此不再赘述。
应理解,上述只是为了帮助本领域技术人员更好地理解本申请实施例,而非要限制本申请实施例的范围。本领域技术人员根据所给出的上述示例,显然可以进行各种等价的修改或变化,例如,上述检测方法的各个实施例中某些步骤可以是不必须的,或者可以新加入某些步骤等。或者上述任意两种或者任意多种实施例的组合。这样的修改、变化或者组合后的方案也落入本申请实施例的范围内。
还应理解,上文对本申请实施例的描述着重于强调各个实施例之间的不同之处,未提到的相同或相似之处可以互相参考,为了简洁,这里不再赘述。
还应理解,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
还应理解,本申请实施例中,“预先设定”、“预先定义”可以通过在设备(例如,包括电子设备)中预先保存相应的代码、表格或其他可用于指示相关信息的方式来实现,本申请对于其具体的实现方式不做限定。
还应理解,本申请实施例中的方式、情况、类别以及实施例的划分仅是为了描述的方便,不应构成特别的限定,各种方式、类别、情况以及实施例中的特征在不矛盾的情况下可以相结合。
还应理解,在本申请的各个实施例中,如果没有特殊说明以及逻辑冲突,不同的实施例之间的术语和/或描述具有一致性、且可以相互引用,不同的实施例中的技术特征根据其内在的逻辑关系可以组合形成新的实施例。
最后应说明的是:以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (27)

  1. 一种拍摄方法,其特征在于,应用于包括第一摄像头和第二摄像头的电子设备,所述拍摄方法包括:
    所述电子设备显示第一界面,所述第一界面包括预览图像、第一控件和第二控件,所述第二控件指示为拍照模式;
    检测到对所述第一控件的第一操作;
    响应于所述第一操作,所述电子设备确定为第一变焦倍数,所述预览图像为所述第一摄像头实时采集的图像;
    检测到对所述第一界面的第二操作;
    响应于所述第二操作,根据所述第一变焦倍数和第一照度,所述电子设备采用第一摄像头和第二摄像头采集图像,所述第二摄像头为辅助摄像头,其中,所述第一摄像头采集一帧或一帧以上图像,所述第二摄像头采集一帧或一帧以上图像;
    对所述第一摄像头采集的一帧或一帧以上图像和所述第二摄像头采集的一帧或一帧以上图像进行处理,得到拍摄图像;
    保存所述拍摄图像;
    其中,所述第一照度为所述电子设备根据所述预览图像确定的照度值。
  2. 根据权利要求1所述的拍摄方法,其特征在于,所述电子设备还包括第三摄像头,所述方法还包括:
    检测到对所述第一控件的第三操作;
    响应于所述第三操作,所述电子设备确定为第二变焦倍数,所述预览图像为所述第三摄像头实时采集的图像;
    检测到对所述第一界面的第四操作;
    响应于所述第四操作,根据所述第二变焦倍数和所述第一照度,所述电子设备采用所述第一摄像头和所述第三摄像头采集图像,所述第一摄像头为辅助摄像头,所述第三摄像头与所述第二摄像头不同,所述第三摄像头采集一帧或一帧以上图像;
    对所述第一摄像头采集的一帧或一帧以上图像和所述第三摄像头采集的一帧或一帧以上图像进行处理,得到拍摄图像;
    保存所述拍摄图像。
  3. 根据权利要求2所述的拍摄方法,其特征在于,所述电子设备还包括第四摄像头,所述方法还包括:
    检测到对所述第一控件的第五操作;
    响应于所述第五操作,所述电子设备确定为第三变焦倍数,所述预览图像为所述第四摄像头实时采集的图像;
    检测到对所述第一界面的第六操作;
    响应于所述第六操作,根据所述第三变焦倍数和所述第一照度,所述电子设备采用所述第四摄像头采集图像,所述第四摄像头与所述第三摄像头不同,所述第四摄像头采集两帧或两帧以上图像;
    对所述第四摄像头采集的两帧或两帧以上图像进行处理,得到拍摄图像;
    保存所述拍摄图像。
  4. 根据权利要求3所述的拍摄方法,其特征在于,所述方法还包括:
    检测到对所述第一界面的第七操作;
    响应于所述第七操作,根据所述第一变焦倍数和第二照度,所述电子设备采用所述第一摄像头采集图像;所述第一摄像头采集两帧或两帧以上图像;
    对所述第一摄像头采集的两帧或两帧以上图像进行处理,得到拍摄图像;
    保存所述拍摄图像;
    或者,检测到对所述第一界面的第八操作;
    响应于所述第八操作,根据所述第二变焦倍数和所述第二照度,所述电子设备采用所述第三摄像头采集图像;所述第三摄像头采集两帧或两帧以上图像;
    对所述第三摄像头采集的两帧或两帧以上图像进行处理,得到拍摄图像;
    保存所述拍摄图像;
    或者,检测到对所述第一界面的第九操作;
    响应于所述第九操作,根据所述第三变焦倍数和所述第二照度,所述电子设备采用所述第四摄像头采集图像;所述第四摄像头采集两帧或两帧以上图像;
    对所述第四摄像头采集的两帧或两帧以上图像进行处理,得到拍摄图像;
    保存所述拍摄图像;
    其中,所述第二照度为所述电子设备根据所述预览图像确定的照度,所述第二照度与所述第一照度不同,且所述第二照度的照度值低于所述第一照度的照度值。
  5. 根据权利要求4所述的拍摄方法,其特征在于,所述方法还包括:
    检测到对所述第一控件的第十一操作;
    响应于所述第十一操作,从所述第一变焦倍数切换为所述第二变焦倍数;
    响应于从所述第一变焦倍数切换为所述第二变焦倍数,所述电子设备采用所述第一摄像头和所述第二摄像头采集图像,切换为采用所述第一摄像头和所述第三摄像头采集图像,其中,当为所述第一变焦倍数时,所述第二摄像头为辅助摄像头,当为所述第二变焦倍数时,所述第一摄像头为辅助摄像头;
    或者,检测到对所述第一控件的第十二操作;
    响应于所述第十二操作,从所述第一变焦倍数切换为所述第三变焦倍数;
    响应于从所述第一变焦倍数切换为所述第三变焦倍数,所述电子设备采用所述第一摄像头和所述第二摄像头采集图像,切换为采用所述第四摄像头和所述第一摄像头采集图像,当为所述第三变焦倍数时,所述第一摄像头为辅助摄像头。
  6. 根据权利要求5所述的拍摄方法,其特征在于,所述方法还包括:
    响应于从所述第一变焦倍数切换为所述第二变焦倍数,所述电子设备采用所述第三摄像头、所述第一摄像头和所述第二摄像头采集图像,切换为采用所述第一摄像头和所述第三摄像头采集图像,其中,当为所述第一变焦倍数时,所述第三摄像头、所述第二摄像头均为辅助摄像头,当为所述第二变焦倍数时,所述第一摄像头为辅助摄像头。
  7. 根据权利要求2-6任一项所述的拍摄方法,其特征在于,所述第二摄像头的视场角与所述第三摄像头的视场角之间存在重叠。
  8. 根据权利要求2-7任一项所述的拍摄方法,其特征在于,根据所述第一变焦倍数和所述第一照度,所述电子设备采用所述第一摄像头和所述第二摄像头采集图像,包括:
    当所述第一变焦倍数属于第二变焦倍数范围时,所述电子设备采用所述第一摄像头获取第二图像,并采用所述第二摄像头获取第三图像,所述第二图像包括1帧或多帧,所述第三图像包括1帧或多帧;
    当所述第一变焦倍数属于第三变焦倍数范围时,所述电子设备采用所述第一摄像头获取第二图像,并采用所述第二摄像头获取第四图像,所述第二图像包括1帧或多帧,所述第四图像包括1帧或多帧。
  9. 根据权利要求2-8任一项所述的拍摄方法,其特征在于,根据所述第二变焦倍数和所述第一照度,所述电子设备采用所述第一摄像头和所述第三摄像头采集图像,包括:
    所述电子设备采用所述第三摄像头获取第一图像,并采用所述第一摄像头获取第二图像,所述第一图像包括1帧或多帧,所述第二图像包括1帧或多帧,所述第二变焦倍数属于第一变焦倍数范围。
  10. 根据权利要求3-5任一项所述的拍摄方法,其特征在于,根据所述第三变焦倍数和所述第一照度,所述电子设备采用所述第四摄像头采集图像,包括:
    所述电子设备采用所述第四摄像头获取第四图像,所述第四图像包括多帧,所述第三变焦倍数属于第四变焦倍数范围。
  11. 根据权利要求8-10任一项所述的拍摄方法,其特征在于,所述电子设备采用所述第一摄像头获取第二图像,并采用所述第二摄像头获取第三图像之后,所述方法还包括:
    对所述第二图像进行第一预处理,得到位于RAW域的第一预处理图像;
    利用预融合模块对所述第一预处理图像进行融合,得到对应的预融合图像;
    对第二图像对应的所述预融合图像、所述第三图像分别进行前端处理,得到各自对应的前端处理图像;
    利用所述前端融合模块对所述第三图像对应的所述前端处理图像进行融合,得到所述第三图像对应的前端融合图像;
    对所述第二图像对应的前端处理图像、所述第三图像对应的前端融合图像均进行后端处理,得到各自对应的后端处理图像;
    利用后端融合模块将所述第二图像、所述第三图像分别对应的后端处理图像进行融合,得到后端融合图像,所述后端融合图像为所述拍摄图像。
  12. 根据权利要求8-11任一项所述的拍摄方法,其特征在于,所述电子设备采用所述第一摄像头获取第二图像,并采用所述第二摄像头获取第四图像之后,所述方法还包括:
    对所述第二图像、所述第四图像分别进行前端处理,得到各自对应的前端处理图像;
    利用前端融合模块分别将所述第二图像对应的所述前端处理图像、所述第四图像对应的所述前端处理图像进行融合,得到所述第二图像、所述第四图像分别对应的前 端融合图像;
    对所述第二图像、所述第四图像分别对应的前端融合图像均进行后端处理,得到各自对应的后端处理图像;
    利用后端融合模块将所述第二图像、所述第四图像分别对应的后端处理图像进行融合,得到后端融合图像,所述后端融合图像为所述拍摄图像。
  13. 根据权利要求9所述的拍摄方法,其特征在于,所述电子设备采用所述第三摄像头获取第一图像,并采用所述第一摄像头获取第二图像,所述方法还包括:
    对所述第一图像、所述第二图像分别进行前端处理,得到各自对应的前端处理图像;
    利用前端融合模块分别将所述第一图像对应的所述前端处理图像、所述第二图像对应的所述前端处理图像进行融合,得到所述第一图像、所述第二图像分别对应的前端融合图像;
    对所述第一图像、所述第二图像分别对应的前端融合图像均进行后端处理,得到各自对应的后端处理图像;
    对所述第一图像对应的所述后端处理图像进行畸变校正,得到校正图像;
    利用后端融合模块将所述校正图像和所述第二图像对应的所述后端处理图像进行融合,得到后端融合图像,所述后端融合图像为所述拍摄图像。
  14. 根据权利要求10所述的拍摄方法,其特征在于,所述电子设备采用所述第四摄像头获取第四图像之后,所述方法还包括:
    对所述第四图像进行前端处理,得到对应的前端处理图像;
    利用前端融合模块将所述第四图像对应的所述前端处理图像进行融合,得到所述第四图像对应的前端融合图像;
    对所述第四图像对应的前端融合图像进行后端处理,得到对应的后端处理图像,所述后端处理图像为所述拍摄图像。
  15. 根据权利要求4-6任一项所述的拍摄方法,其特征在于,根据所述第一变焦倍数和第二照度,所述电子设备采用所述第一摄像头采集图像,包括:
    所述电子设备采用所述第一摄像头获取第二图像,所述第二图像包括多帧,所述第一变焦倍数属于第二变焦倍数范围或第三变焦倍数范围;
    根据所述第二变焦倍数和所述第二照度,所述电子设备采用所述第三摄像头采集图像,包括:
    所述电子设备采用所述第三摄像头获取第一图像,所述第一图像包括多帧,所述第二变焦倍数属于第一变焦倍数范围;
    根据所述第三变焦倍数和所述第二照度,所述电子设备采用所述第四摄像头采集图像,包括:
    所述电子设备采用所述第四摄像头获取第四图像,所述第四图像包括多帧,所述第三变焦倍数属于第四变焦倍数范围。
  16. 根据权利要求15所述的拍摄方法,其特征在于,所述拍摄方法还包括:
    检测到对所述第二控件的第十三操作;
    响应于所述第十三操作,所述第二控件指示为录像模式、夜景模式或HDR模式;
    检测到对所述第一界面的第十四操作;
    响应于所述第十四操作,根据所述第一变焦倍数,所述电子设备采用所述第一摄像头采集图像;所述第一摄像头采集两帧或两帧以上图像;
    对所述第一摄像头采集的两帧或两帧以上图像进行处理,得到拍摄图像;
    保存所述拍摄图像;
    或者,检测到对所述第一界面的第十五操作;
    响应于所述第十五操作,根据所述第二变焦倍数,所述电子设备采用所述第三摄像头采集图像;所述第三摄像头采集两帧或两帧以上图像;
    对所述第三摄像头采集的两帧或两帧以上图像进行处理,得到拍摄图像;
    保存所述拍摄图像;
    或者,检测到对所述第一界面的第十六操作;
    响应于所述第十六操作,根据所述第三变焦倍数,所述电子设备采用所述第四摄像头采集图像,所述第四摄像头采集两帧或两帧以上图像;
    对所述第四摄像头采集的两帧或两帧以上图像进行处理,得到拍摄图像;
    保存所述拍摄图像。
  17. 根据权利要求16所述的拍摄方法,其特征在于,根据所述第一变焦倍数,所述电子设备采用所述第一摄像头采集图像,包括:
    所述电子设备采用所述第一摄像头获取所述第二图像,所述第二图像包括多帧,所述第一变焦倍数属于所述第二变焦倍数范围或所述第三变焦倍数范围;
    根据所述第二变焦倍数,所述电子设备采用所述第三摄像头采集图像,包括:
    所述电子设备采用所述第三摄像头获取所述第一图像,所述第一图像包括多帧,所述第二变焦倍数属于所述第一变焦倍数范围;
    根据所述第三变焦倍数,所述电子设备采用所述第四摄像头采集图像,包括:
    所述电子设备采用所述第四摄像头获取所述第四图像,所述第四图像包括多帧,所述第三变焦倍数属于所述第四变焦倍数范围。
  18. 根据权利要求17所述的拍摄方法,其特征在于,根据所述第二照度,所述电子设备采集图像之后,或者,当所述第二控件指示为所述夜景模式时,所述方法还包括:
    对所述第二图像、所述第一图像或所述第四图像进行第二预处理,得到位于RAW域的第二预处理图像;其中,所述第二预处理用于基于网络模型将所述第二图像、所述第一图像或所述第四图像进行融合;
    对所述第二预处理图像进行前端处理,得到对应的前端处理图像;
    对所述前端处理图像进行后端处理,得到对应的后端处理图像,所述后端处理图像为所述拍摄图像。
  19. 根据权利要求17所述的拍摄方法,其特征在于,当所述第二控件指示为所述录像或HDR模式时,所述方法还包括:
    对所述第二图像、所述第一图像或所述第四图像进行第三预处理,得到位于RAW域的第三预处理图像;其中,所述第二图像包括长曝光的第二图像、短曝光的第二图像和中曝光的第二图像,所述第一图像包括长曝光的第一图像、短曝光的第一图像和 中曝光的第一图像,所述第四图像包括长曝光的第四图像、短曝光的第四图像和中曝光的第四图像,所述第三预处理用于将不同曝光的第二图像、第一图像或第四图像进行融合;
    对所述第三预处理图像进行前端处理,得到对应的前端处理图像;
    对所述前端处理图像进行后端处理,得到对应的后端处理图像,所述后端处理图像为所述拍摄图像。
  20. 根据权利要求1-19任一项所述的拍摄方法,其特征在于,所述拍摄方法还包括:
    检测到对所述第二控件的第十七操作;
    响应于所述第十七操作,所述第二控件指示为大光圈模式或人像模式;
    检测到对所述第一界面的第十八操作;
    响应于所述第十八操作,所述电子设备采用所述第一摄像头采集第二图像,并采用所述第二摄像头采集第三图像;
    对所述第二图像、所述第三图像分别进行前端处理,得到各自对应的前端处理图像;
    利用前端融合模块分别将所述第二图像对应的所述前端处理图像进行融合,得到所述第二图像对应的前端融合图像;
    对所述第二图像对应的前端融合图像、所述第三图像对应的前端处理图像均进行后端处理,得到各自对应的后端处理图像;
    对所述第二图像和所述第三图像对应的后端处理图像进行深度估计处理,得到深度图像;
    利用所述深度图像对所述第二图像对应的后端处理图像进行虚化处理,得到对应的虚化处理图像,所述虚化处理图像为所述拍摄图像。
  21. 根据权利要求20所述的拍摄方法,其特征在于,所述电子设备还包括TOF摄像头,所述方法还包括:
    检测到对所述第一界面的第十九操作;
    响应于所述第十九操作,所述电子设备采用所述第一摄像头采集第二图像,并采用所述TOF摄像头获取深度信息,利用所述深度信息生成深度图像;
    对所述第二图像进行前端处理,得到对应的前端处理图像;
    利用前端融合模块将所述第二图像对应的所述前端处理图像进行融合,得到所述第二图像对应的前端融合图像;
    对所述前端融合图像进行后端处理,得到对应的后端处理图像;
    利用所述深度图像对所述第二图像对应的所述后端处理图像进行虚化处理,得到对应的虚化处理图像,所述虚化处理图像为所述拍摄图像。
  22. 根据权利要求20或21所述的拍摄方法,其特征在于,所述方法还包括:
    当所述第二控件指示为所述人像模式时,对所述虚化处理图像进行美肤处理,得到美肤处理图像,所述美肤处理图像为所述拍摄图像。
  23. 根据权利要求16-19任一项所述的拍摄方法,其特征在于,所述第二控件指示为录像模式时,所述方法还包括:
    检测到对所述第一控件的第二十操作;
    响应于所述第二十操作,从所述第一变焦倍数切换为所述第二变焦倍数;
    响应于从所述第一变焦倍数切换为所述第二变焦倍数,所述电子设备采用所述第一摄像头采集图像,切换为采用所述第三摄像头采集图像,其中,所述第一摄像头为辅助摄像头;
    或者,检测到对所述第一控件的第二十一操作;
    响应于所述第二十一操作,从所述第一变焦倍数切换为所述第三变焦倍数;
    响应于从所述第一变焦倍数切换为所述第三变焦倍数,所述电子设备采用所述第一摄像头采集图像,切换为采用所述第四摄像头采集图像,其中,所述第一摄像头为辅助摄像头。
  24. 一种电子设备,其特征在于,包括摄像头模组、处理器和存储器;
    所述摄像头模组,用于获取原始图像;
    所述存储器,用于存储可在所述处理器上运行的计算机程序;
    所述处理器,用于执行如权利要求1至23中任一项所述的拍摄方法。
  25. 根据权利要求24所述的电子设备,其特征在于,所述摄像头模组包括多个摄像头,所述多个摄像头包括:广角摄像头、主摄摄像头、黑白摄像头和长焦摄像头;所述多个摄像头用于对同一待拍摄场景进行拍摄;
    所述广角摄像头,用于在所述处理器获取拍照指令后,获取第一图像;
    所述主摄摄像头,用于在所述处理器获取所述拍照指令后,获取第二图像;
    所述黑白摄像头,用于在所述处理器获取所述拍照指令后,获取第三图像;
    所述长焦摄像头,用于在所述处理器获取所述拍照指令后,获取第四图像。
  26. 一种芯片,其特征在于,包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有所述芯片的设备执行如权利要求1至23中任一项所述的拍摄方法。
  27. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令当被处理器执行时,使所述处理器执行如权利要求1至23中任一项所述的拍摄方法。
PCT/CN2022/091189 2021-08-11 2022-05-06 拍摄方法及其相关设备 WO2023015980A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US17/923,147 US20240259679A1 (en) 2021-08-11 2022-05-06 Method for image or video shooting and related device
EP22793379.3A EP4156673B1 (en) 2021-08-11 2022-05-06 Image capture method and related device thereof

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110921519.3A CN115633252B (zh) 2021-08-11 2021-08-11 拍摄方法及其相关设备
CN202110921519.3 2021-08-11

Publications (1)

Publication Number Publication Date
WO2023015980A1 true WO2023015980A1 (zh) 2023-02-16

Family

ID=84902315

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/091189 WO2023015980A1 (zh) 2021-08-11 2022-05-06 拍摄方法及其相关设备

Country Status (4)

Country Link
US (1) US20240259679A1 (zh)
EP (1) EP4156673B1 (zh)
CN (2) CN115633252B (zh)
WO (1) WO2023015980A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115866155A (zh) * 2023-02-27 2023-03-28 中铁电气化局集团有限公司 一种使用融合算法处理高铁检修数据的方法及装置
CN117692790A (zh) * 2023-07-20 2024-03-12 荣耀终端有限公司 图像数据处理方法及相关装置
WO2024209877A1 (ja) * 2023-04-06 2024-10-10 株式会社ニコン 撮像装置およびアクセサリ

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117714858A (zh) * 2023-07-31 2024-03-15 荣耀终端有限公司 一种图像处理方法、电子设备及可读存储介质
CN118695058A (zh) * 2024-08-26 2024-09-24 江苏欧帝电子科技有限公司 一种多cmos组合的便携式移动摄制终端及摄制方法

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006191411A (ja) * 2005-01-07 2006-07-20 Canon Inc カメラ制御装置、画像表示装置、カメラ制御方法、画像表示方法及びプログラム
CN106791378A (zh) * 2016-11-29 2017-05-31 广东欧珀移动通信有限公司 控制方法、控制装置和电子装置
CN109068111A (zh) * 2018-10-12 2018-12-21 北京地平线机器人技术研发有限公司 一种监控装置、监控方法和电子设备
CN110572581A (zh) * 2019-10-14 2019-12-13 Oppo广东移动通信有限公司 基于终端设备的变焦虚化图像获取方法和装置
CN110868547A (zh) * 2019-12-02 2020-03-06 RealMe重庆移动通信有限公司 拍照控制方法、拍照控制装置、电子设备及存储介质
CN111641778A (zh) * 2018-03-26 2020-09-08 华为技术有限公司 一种拍摄方法、装置与设备
US10944915B1 (en) * 2020-01-05 2021-03-09 Ningbo Sunny Opotech Co., Ltd. Multi-aperture imaging system and application thereof

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9854156B1 (en) * 2016-06-12 2017-12-26 Apple Inc. User interface for camera effects
US10297034B2 (en) * 2016-09-30 2019-05-21 Qualcomm Incorporated Systems and methods for fusing images
KR102328539B1 (ko) * 2017-07-27 2021-11-18 삼성전자 주식회사 복수의 카메라를 이용하여 영상을 획득하기 위한 전자 장치 및 이를 이용한 영상 처리 방법
CN113518148A (zh) * 2019-05-06 2021-10-19 苹果公司 用于捕获和管理视觉媒体的用户界面
CN110445978B (zh) * 2019-06-24 2020-12-15 华为技术有限公司 一种拍摄方法及设备
CN110198418B (zh) * 2019-06-28 2020-12-22 Oppo广东移动通信有限公司 图像处理方法、装置、存储介质及电子设备
CN110290325B (zh) * 2019-06-28 2021-03-02 Oppo广东移动通信有限公司 图像处理方法、装置、存储介质及电子设备
CN111064895B (zh) * 2019-12-31 2022-02-01 维沃移动通信有限公司 一种虚化拍摄方法和电子设备
CN111641777A (zh) * 2020-02-28 2020-09-08 北京爱芯科技有限公司 图像处理方法、装置、图像处理器、电子设备及存储介质
CN111432143B (zh) * 2020-04-10 2022-08-16 展讯通信(上海)有限公司 摄像头模组切换的控制方法、系统、介质及电子设备

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006191411A (ja) * 2005-01-07 2006-07-20 Canon Inc カメラ制御装置、画像表示装置、カメラ制御方法、画像表示方法及びプログラム
CN106791378A (zh) * 2016-11-29 2017-05-31 广东欧珀移动通信有限公司 控制方法、控制装置和电子装置
CN111641778A (zh) * 2018-03-26 2020-09-08 华为技术有限公司 一种拍摄方法、装置与设备
CN109068111A (zh) * 2018-10-12 2018-12-21 北京地平线机器人技术研发有限公司 一种监控装置、监控方法和电子设备
CN110572581A (zh) * 2019-10-14 2019-12-13 Oppo广东移动通信有限公司 基于终端设备的变焦虚化图像获取方法和装置
CN110868547A (zh) * 2019-12-02 2020-03-06 RealMe重庆移动通信有限公司 拍照控制方法、拍照控制装置、电子设备及存储介质
US10944915B1 (en) * 2020-01-05 2021-03-09 Ningbo Sunny Opotech Co., Ltd. Multi-aperture imaging system and application thereof

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115866155A (zh) * 2023-02-27 2023-03-28 中铁电气化局集团有限公司 一种使用融合算法处理高铁检修数据的方法及装置
CN115866155B (zh) * 2023-02-27 2023-05-16 中铁电气化局集团有限公司 一种使用融合算法处理高铁检修数据的方法及装置
WO2024209877A1 (ja) * 2023-04-06 2024-10-10 株式会社ニコン 撮像装置およびアクセサリ
CN117692790A (zh) * 2023-07-20 2024-03-12 荣耀终端有限公司 图像数据处理方法及相关装置

Also Published As

Publication number Publication date
CN115633252A (zh) 2023-01-20
EP4156673A4 (en) 2023-04-26
CN115633252B (zh) 2023-10-20
EP4156673B1 (en) 2024-03-20
US20240259679A1 (en) 2024-08-01
EP4156673A1 (en) 2023-03-29
CN117880628A (zh) 2024-04-12

Similar Documents

Publication Publication Date Title
WO2022262260A1 (zh) 一种拍摄方法及电子设备
WO2023015980A1 (zh) 拍摄方法及其相关设备
WO2023015981A1 (zh) 图像处理方法及其相关设备
CN111327814A (zh) 一种图像处理的方法及电子设备
WO2021057277A1 (zh) 一种暗光下拍照的方法及电子设备
WO2023015991A1 (zh) 拍照方法、电子设备和计算机可读存储介质
JP2015041890A (ja) 制御装置、制御方法、および電子機器
CN115706850B (zh) 图像拍摄的方法、设备和存储介质
CN113556466B (zh) 一种对焦方法和电子设备
CN116055897B (zh) 拍照方法及其相关设备
CN116095476B (zh) 摄像头的切换方法、装置、电子设备及存储介质
CN113810590A (zh) 图像处理方法、电子设备、介质和系统
WO2023160221A1 (zh) 一种图像处理方法和电子设备
CN115426449B (zh) 一种拍照方法和终端
EP4246955A1 (en) Image processing method and electronic device
CN117651221A (zh) 视频处理的方法及电子设备
CN116051368B (zh) 图像处理方法及其相关设备
CN116723417B (zh) 一种图像处理方法和电子设备
CN116055855B (zh) 图像处理方法及其相关设备
WO2024088074A1 (zh) 拍摄月亮的方法和电子设备
CN115967846B (zh) 一种图像处理方法及电子设备
CN117692799B (zh) 一种拍摄方法及相关设备
WO2023077938A1 (zh) 生成视频帧的方法、装置、电子设备及存储介质
CN117692799A (zh) 一种拍摄方法及相关设备

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 17923147

Country of ref document: US

ENP Entry into the national phase

Ref document number: 2022793379

Country of ref document: EP

Effective date: 20221102

NENP Non-entry into the national phase

Ref country code: DE