[go: up one dir, main page]

CN113905182B - A shooting method and device - Google Patents

A shooting method and device Download PDF

Info

Publication number
CN113905182B
CN113905182B CN202010576174.8A CN202010576174A CN113905182B CN 113905182 B CN113905182 B CN 113905182B CN 202010576174 A CN202010576174 A CN 202010576174A CN 113905182 B CN113905182 B CN 113905182B
Authority
CN
China
Prior art keywords
image
target
subject
user
electronic device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010576174.8A
Other languages
Chinese (zh)
Other versions
CN113905182A (en
Inventor
丁匡正
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202010576174.8A priority Critical patent/CN113905182B/en
Publication of CN113905182A publication Critical patent/CN113905182A/en
Application granted granted Critical
Publication of CN113905182B publication Critical patent/CN113905182B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • 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/61Control of cameras or camera modules based on recognised objects
    • 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/80Camera processing pipelines; Components thereof

Landscapes

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

Abstract

本申请实施例提供一种拍摄方法及设备,涉及电子技术领域,能够在拍摄的取景阶段,根据用户意愿或需求为用户感兴趣的主体设置合适的曝光参数,从而使得根据该曝光参数拍摄的图像所合成的目标图像的曝光情况更能符合用户的意愿或期许,满足用户个性化拍摄需求。方案包括:电子设备进入相机应用的目标拍摄模式;在分别检测到用户针对预览图像上第一目标对象和第二目标对象的操作后,分别确定第一目标曝光参数和第二目标曝光参数;在检测到用户的拍摄操作后,显示目标图像;目标图像是根据第一待合成图像和第二待合成图像生成;第一待合成图像根据第一目标曝光参数拍摄获得,第二待合成图像根据第二目标曝光参数拍摄获得。本申请实施例用于拍摄过程。

Figure 202010576174

The embodiment of the present application provides a shooting method and equipment, which relate to the field of electronic technology, and can set appropriate exposure parameters for the subject of interest to the user according to the user's wishes or needs during the framing stage of the shooting, so that the image shot according to the exposure parameters The exposure of the synthesized target image can better meet the wishes or expectations of the user, and meet the personalized shooting needs of the user. The solution includes: the electronic device enters the target shooting mode of the camera application; after detecting the user's operations on the first target object and the second target object on the preview image, respectively determining the first target exposure parameter and the second target exposure parameter; After the user's shooting operation is detected, the target image is displayed; the target image is generated according to the first image to be synthesized and the second image to be synthesized; the first image to be synthesized is obtained by shooting according to the first target exposure parameter, and the second image to be synthesized is obtained according to the second image to be synthesized Two target exposure parameters are obtained by shooting. The embodiment of this application is used in the shooting process.

Figure 202010576174

Description

一种拍摄方法及设备A shooting method and device

技术领域technical field

本申请实施例涉及电子技术领域,尤其涉及一种拍摄方法及设备。The embodiments of the present application relate to the field of electronic technology, and in particular, to a photographing method and device.

背景技术Background technique

在大光比(即明暗对比强烈)场景下,由于摄像头传感器没有人眼的宽容度高,因而手机或平板电脑等电子设备如果根据亮的被拍摄对象正确曝光,那么暗的被拍摄对象则会严重欠曝。类似的,电子设备如果根据暗的被拍摄对象正确曝光,那么亮的被拍摄对象将过曝。而欠曝和过曝的图像都会严重丢失物体的细节。In a scene with a large light ratio (that is, a strong contrast between light and dark), since the camera sensor is not as forgiving as the human eye, if an electronic device such as a mobile phone or a tablet is correctly exposed according to the bright subject, the dark subject will be exposed. Severely underexposed. Similarly, electronics that correctly expose for dark subjects will overexpose bright ones. Both underexposed and overexposed images will seriously lose the details of the object.

现有技术在大光比的场景下,采用高动态范围(high-dynamic range,HDR)模式进行曝光调节和图像合成。然而,该方式容易导致合成的图像失真,且后期不好调节。此外,该方式也难以满足用户日益增长的多样化、个性化的拍摄需求,导致用户体验较差。In the prior art, in a scene with a large light ratio, a high-dynamic range (high-dynamic range, HDR) mode is used for exposure adjustment and image synthesis. However, this method easily leads to distortion of the synthesized image, and it is not easy to adjust in the later stage. In addition, this method is also difficult to meet the increasingly diverse and personalized shooting needs of users, resulting in poor user experience.

发明内容Contents of the invention

本申请实施例提供一种拍摄方法及设备,能够在拍摄的取景阶段,根据用户意愿或需求为用户感兴趣的主体设置合适的曝光参数,从而使得根据该曝光参数拍摄的图像所合成的目标图像的曝光情况更能符合用户的意愿或期许,满足用户多样化、个性化的拍摄需求,并且还可以提高合成图像的画质,使得拍摄获得的图像更加自然,提升用户体验。The embodiment of the present application provides a shooting method and equipment, which can set appropriate exposure parameters for the subject of interest to the user according to the user's wishes or needs during the framing stage of shooting, so that the target image synthesized from the images shot according to the exposure parameters The exposure situation can better meet the user's wishes or expectations, meet the user's diverse and personalized shooting needs, and can also improve the quality of the composite image, making the image obtained by shooting more natural and improving the user experience.

为达到上述目的,本申请实施例采用如下技术方案:In order to achieve the above purpose, the embodiment of the present application adopts the following technical solutions:

一方面,本申请实施例提供了一种拍摄方法,该方法包括:电子设备进入相机应用的目标拍摄模式,并显示预览界面;电子设备检测到用户针对预览图像上第一目标对象的操作后,根据第一目标对象确定第一目标曝光参数;电子设备检测到用户针对预览图像上第二目标对象的操作后,根据第二目标对象确定第二目标曝光参数;电子设备检测到用户的拍摄操作后,显示目标图像,其中,目标图像根据第一待合成图像和所述第二待合成图像生成;第一待合成图像根据第一目标曝光参数拍摄获得,第二待合成图像根据第二目标曝光参数拍摄获得。On the one hand, the embodiment of the present application provides a shooting method, the method includes: the electronic device enters the target shooting mode of the camera application, and displays a preview interface; after the electronic device detects the user's operation on the first target object on the preview image, Determine the first target exposure parameter according to the first target object; after the electronic device detects the user's operation on the second target object on the preview image, determine the second target exposure parameter according to the second target object; after the electronic device detects the user's shooting operation , displaying the target image, wherein the target image is generated according to the first image to be combined and the second image to be combined; the first image to be combined is obtained according to the first target exposure parameter, and the second image to be combined is obtained according to the second target exposure parameter Captured.

在该方案中,电子设备能够在目标拍摄模式的预览界面下,根据用户意愿或需求为用户感兴趣的目标对象设置合适的曝光参数,从而使得根据该曝光参数拍摄的图像所合成的目标图像的曝光情况更能符合用户的意愿或期许,满足用户多样化、个性化的拍摄需求,并且还可以提高合成图像的画质,使得拍摄获得的图像更加自然,提升用户体验。In this solution, the electronic device can set appropriate exposure parameters for the target object that the user is interested in according to the user's wishes or needs under the preview interface of the target shooting mode, so that the target image synthesized from the images captured according to the exposure parameters The exposure can better meet the wishes or expectations of the user, meet the diverse and personalized shooting needs of the user, and can also improve the quality of the composite image, making the image obtained by shooting more natural and improving the user experience.

在一种可能的设计中,该方法在电子设备进入相机应用的目标拍摄模式之后,还包括:电子设备提示用户选择多个目标对象。In a possible design, after the electronic device enters the target shooting mode of the camera application, the method further includes: the electronic device prompts the user to select multiple target objects.

这样,用户能够根据电子设备的提示选择需要调整曝光情况的目标对象。In this way, the user can select the target object whose exposure needs to be adjusted according to the prompt of the electronic device.

另一方面,本申请实施例提供了一种拍摄方法,该方法包括:电子设备打开相机应用,并显示拍照的预览界面;电子设备检测到用户针对预览图像上第一目标对象的操作后,根据第一目标对象确定第一目标曝光参数;电子设备检测到用户针对预览图像上第二目标对象的操作后,根据第二目标对象确定第二目标曝光参数;电子设备进入目标拍摄模式;电子设备检测到用户的拍摄操作后,显示目标图像,目标图像根据第一待合成图像和第二待合成图像生成;第一待合成图像根据第一目标曝光参数拍摄获得,第二待合成图像根据第二目标曝光参数拍摄获得。On the other hand, an embodiment of the present application provides a shooting method, the method includes: the electronic device opens the camera application, and displays a preview interface for taking pictures; after the electronic device detects the user's operation on the first target object on the preview image, according to The first target object determines the first target exposure parameter; after the electronic device detects the user's operation on the second target object on the preview image, it determines the second target exposure parameter according to the second target object; the electronic device enters the target shooting mode; the electronic device detects After the user's shooting operation, the target image is displayed. The target image is generated according to the first image to be combined and the second image to be combined; The exposure parameters were obtained by shooting.

在该方案中,电子设备能够在检测到用户针对多个目标对象的操作之后,自动进入目标拍摄模式,根据用户意愿或需求为用户感兴趣的目标对象设置合适的曝光参数,从而使得根据该曝光参数拍摄的图像所合成的目标图像的曝光情况更能符合用户的意愿或期许,满足用户多样化、个性化的拍摄需求,并且还可以提高合成图像的画质,使得拍摄获得的图像更加自然,提升用户体验。In this solution, the electronic device can automatically enter the target shooting mode after detecting the user's operation on multiple target objects, and set appropriate exposure parameters for the target objects that the user is interested in according to the user's wishes or needs, so that according to the exposure The exposure of the target image synthesized by the image captured by the parameters can better meet the user's wishes or expectations, meet the user's diverse and personalized shooting needs, and can also improve the quality of the synthesized image, making the image obtained by shooting more natural. Improve user experience.

在一种可能的设计中,电子设备进入目标拍摄拍摄模式包括:电子设备提示用户是否进入目标拍摄模式;电子设备响应于用户的指示操作进入目标拍摄模式。In a possible design, the electronic device entering the target shooting mode includes: the electronic device prompting the user whether to enter the target shooting mode; and the electronic device entering the target shooting mode in response to the user's instruction operation.

这样,电子设备可以根据用户的指示确定是否进入目标拍摄模式,避免误触情况下直接自动进入目标拍摄模式。In this way, the electronic device can determine whether to enter the target shooting mode according to the user's instruction, and directly and automatically enter the target shooting mode in case of an accidental touch.

在一种可能的设计中,该方法还包括:在电子设备显示目标图像之前,分别显示第一待合成图像和第二待合成图像。In a possible design, the method further includes: before the electronic device displays the target image, respectively displaying the first image to be combined and the second image to be combined.

这样,通过显示第一待合成图像和第二待合成图像,用户能够直观地对比出目标图像与待合成图像的差异,从而获得更好的用户体验。In this way, by displaying the first image to be combined and the second image to be combined, the user can intuitively compare the difference between the target image and the image to be combined, thereby obtaining a better user experience.

在一种可能的设计中,该方法还包括:电子设备根据第一目标对象确定第一目标曝光参数后,根据第一目标曝光参数获得一帧或多帧第一预览图像,并在预览界面上显示第一预览图像;电子设备根据第二目标对象确定第二目标曝光参数后,根据第二目标曝光参数获得一帧或多帧第二预览图像,并在预览界面上显示第二预览图像。In a possible design, the method further includes: after the electronic device determines the first target exposure parameters according to the first target object, obtain one or more frames of first preview images according to the first target exposure parameters, and display the Displaying the first preview image; after the electronic device determines the second target exposure parameters according to the second target object, obtains one or more frames of second preview images according to the second target exposure parameters, and displays the second preview images on the preview interface.

在该方案中,通过在预览界面上显示第一预览图像或第二预览图像,用户能够直观地确定当前地第一曝光参数和第二曝光参数是否符合自己地意愿或期望,从而方便用户根据需求对曝光参数进行调节。In this solution, by displaying the first preview image or the second preview image on the preview interface, the user can intuitively determine whether the current first exposure parameter and the second exposure parameter meet their wishes or expectations, thereby facilitating the user to Adjust the exposure parameters.

在一种可能的设计中,电子设备根据第一目标对象确定第一目标曝光参数,包括:电子设备根据第一目标对象对应的被拍摄物体的反射光线进行自动测光;电子设备根据自动测光的结果确定第一目标曝光参数。In a possible design, the electronic device determines the first target exposure parameter according to the first target object, including: the electronic device performs automatic photometry according to the reflected light of the object to be photographed corresponding to the first target object; The results of the first target exposure parameters are determined.

在一种可能的设计中,该方法还包括:电子设备检测到用户针对预览图像上第一目标对象的操作后,在预览界面上显示曝光调节控件;电子设备响应于用户针对曝光调节控件的操作,调整第一目标曝光参数。In a possible design, the method further includes: after the electronic device detects the user's operation on the first target object on the preview image, displaying the exposure adjustment control on the preview interface; the electronic device responds to the user's operation on the exposure adjustment control to adjust the first target exposure parameter.

在一种可能的设计中,电子设备检测到用户针对预览图像上第一目标对象的操作后,根据第一目标对象确定第一目标曝光参数,包括:电子设备检测到用户针对预览图像上第一目标对象的操作后,在预览界面上显示第一目标对象对应的曝光设置控件;电子设备响应于用户针对曝光设置控件的操作,确定第一目标曝光参数。通过显示曝光设置控件,用户能够方便地对曝光参数进行调节。In a possible design, after the electronic device detects the user's operation on the first target object on the preview image, determining the first target exposure parameter according to the first target object includes: the electronic device detects that the user's operation on the first target object on the preview image After the target object is operated, the exposure setting control corresponding to the first target object is displayed on the preview interface; the electronic device determines the first target exposure parameter in response to the user's operation on the exposure setting control. By displaying the exposure setting controls, the user can conveniently adjust the exposure parameters.

在一种可能的设计中,目标图像上第一主体的像素值与第一待合成图像上第一主体的像素值相同,第一主体为第一目标对象对应的主体;目标图像上第二主体的像素值与第二待合成图像上第二主体的像素值相同,第二主体为第二目标对象对应的主体;目标图像上除第一主体和第二主体以外的其他像素点的像素值,为配准后的第一待合成图像和第二待合成图像上对应像素点的像素值的加权平均值。In a possible design, the pixel value of the first subject on the target image is the same as the pixel value of the first subject on the first image to be synthesized, and the first subject is the subject corresponding to the first target object; the second subject on the target image The pixel value of is the same as the pixel value of the second subject on the second image to be synthesized, and the second subject is the subject corresponding to the second target object; the pixel values of other pixel points on the target image except the first subject and the second subject, is the weighted average of pixel values of corresponding pixel points on the first image to be synthesized and the second image to be synthesized after registration.

在该方案中,第一主体和第二主体的像素值是根据用户意愿或需求设置的,从而使得合成的目标图像的曝光情况更能符合用户的意愿或期许,满足用户多样化、个性化的拍摄需求。In this solution, the pixel values of the first subject and the second subject are set according to the user's wishes or needs, so that the exposure of the synthesized target image can better meet the user's wishes or expectations, and meet the user's diverse and personalized needs. Shooting needs.

在一种可能的设计中,该方法还包括:电子设备根据第一目标曝光参数和第二目标曝光参数获得第三目标曝光参数;目标图像根据第一待合成图像、第二待合成图像以及第三待合成图像生成,第三待合成图像根据第三目标曝光参数拍摄获得。In a possible design, the method further includes: the electronic device obtains a third target exposure parameter according to the first target exposure parameter and the second target exposure parameter; The third image to be synthesized is generated, and the third image to be synthesized is obtained by shooting according to the third target exposure parameter.

在该方案中,电子设备可以结合第一待合成图像和第二待合成图像以外的其他待合成图像,合成最终的目标图像。In this solution, the electronic device may synthesize a final target image by combining other images to be synthesized than the first image to be synthesized and the second image to be synthesized.

在一种可能的设计中,该方法还包括:电子设备检测到用户的拍摄操作后,显示第三待合成图像。In a possible design, the method further includes: after the electronic device detects the user's shooting operation, displaying the third image to be synthesized.

这样,可以方便用户直观地对比第三待合成图像与其他待合成图像以及目标图像的差异。In this way, it is convenient for the user to intuitively compare the differences between the third image to be combined and other images to be combined and the target image.

在一种可能的设计中,目标图像上第一主体的像素值与第一待合成图像上所述第一主体的像素值相同,第一主体为第一目标对象对应的主体;目标图像上第二主体的像素值与第二待合成图像上第二主体的像素值相同,第二主体为第二目标对象对应的主体;目标图像上除第一主体和第二主体以外的其他像素点的像素值,与第三待合成图像上对应像素点的像素值相同。In a possible design, the pixel value of the first subject on the target image is the same as the pixel value of the first subject on the first image to be synthesized, and the first subject is the subject corresponding to the first target object; The pixel value of the second subject is the same as the pixel value of the second subject on the second image to be synthesized, and the second subject is the subject corresponding to the second target object; the pixels of other pixel points on the target image except the first subject and the second subject The value is the same as the pixel value of the corresponding pixel on the third image to be combined.

在该方案中,根据第一目标曝光参数和第二目标曝光参数获得第三目标曝光参数,根据第三目标曝光参数获得第三待合成图像,目标图像上除第一主体和第二主体以外的其他像素点的像素值,与第三待合成图像上对应像素点的像素值相同,从而能够保留图像中更多的细节,使得目标图像画质更好。第一主体和第二主体的像素值是根据用户意愿或需求设置的,从而使得合成的目标图像的曝光情况更能符合用户的意愿或期许,满足用户多样化、个性化的拍摄需求。In this scheme, the third target exposure parameter is obtained according to the first target exposure parameter and the second target exposure parameter, and the third image to be synthesized is obtained according to the third target exposure parameter. The pixel values of other pixel points are the same as the pixel values of corresponding pixel points on the third image to be synthesized, so that more details in the image can be preserved and the image quality of the target image is better. The pixel values of the first subject and the second subject are set according to the user's will or demand, so that the exposure of the synthesized target image can better meet the user's wish or expectation, and meet the user's diverse and personalized shooting needs.

在一种可能的设计中,第一目标对象为第一目标主体,第一主体为所述第一目标主体;或者,第一目标对象为第一目标区域,第一主体为第一目标区域所在的主体,或者第一主体为第一目标区域包括的多个主体中面积占比最大的主体。In a possible design, the first target object is the first target subject, and the first subject is the first target subject; or, the first target object is the first target area, and the first subject is the location where the first target area is located. The subject, or the first subject is the subject with the largest area ratio among the plurality of subjects included in the first target area.

也就是说,第一目标对象可以是主体,也可以是区域;第一主体是第一目标对象对应的主体。That is to say, the first target object may be a subject or an area; the first subject is a subject corresponding to the first target object.

在一种可能的设计中,针对第一目标对象的操作包括针对第一目标对象的单击操作、双击操作、压力按操作、长按操作或圈定第一目标对象的操作。In a possible design, the operation on the first target object includes a single-click operation, a double-click operation, a pressure-press operation, a long-press operation, or an operation to circle the first target object.

也就是说,本申请实施例可以通过多种方式来选择第一目标对象。That is to say, the embodiment of the present application may select the first target object in various ways.

在一种可能的设计中,针对第一目标对象的操作包括针对第一目标对象的双击操作、压力按操作、长按操作或圈定所述第一目标对象的操作。In a possible design, the operation on the first target object includes a double-click operation, a pressure-press operation, a long-press operation, or an operation to circle the first target object.

也就是说,本申请实施例可以通过多种方式来选择第一目标对象。That is to say, the embodiment of the present application may select the first target object in various ways.

在一种可能的设计中,第一目标曝光参数包括感光度ISO、光圈、快门时间或曝光值EV中的一项或多项。In a possible design, the first target exposure parameter includes one or more of sensitivity ISO, aperture, shutter time or exposure value EV.

也就是说,第一目标曝光参数可以通过多个维度的参数来表征。That is to say, the first target exposure parameter can be characterized by parameters of multiple dimensions.

又一方面,本申请实施例提供了一种电子设备,该电子设备包括:屏幕,用于显示界面;一个或多个处理器;存储器;以及一个或多个计算机程序,其中一个或多个计算机程序被存储在存储器中,一个或多个计算机程序包括指令,当指令被电子设备执行时,使得电子设备执行本申请实施例提供的拍摄方法。In yet another aspect, an embodiment of the present application provides an electronic device, the electronic device includes: a screen for displaying an interface; one or more processors; a memory; and one or more computer programs, wherein one or more computers The program is stored in the memory, and one or more computer programs include instructions. When the instructions are executed by the electronic device, the electronic device executes the photographing method provided by the embodiment of the present application.

又一方面,本申请实施例提供了一种计算机可读存储介质,该计算机可读存储介质包括计算机指令,当计算机指令在计算机上运行时,使得计算机执行本申请实施例提供的拍摄方法。In yet another aspect, an embodiment of the present application provides a computer-readable storage medium, the computer-readable storage medium includes computer instructions, and when the computer instructions are run on a computer, the computer executes the photographing method provided in the embodiment of the present application.

又一方面,本申请实施例提供了一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行本申请实施例提供的拍摄方法。In yet another aspect, an embodiment of the present application provides a computer program product, which, when the computer program product is run on a computer, causes the computer to execute the photographing method provided in the embodiment of the present application.

附图说明Description of drawings

图1为本申请实施例提供的一种电子设备的硬件结构示意图;FIG. 1 is a schematic diagram of a hardware structure of an electronic device provided in an embodiment of the present application;

图2为本申请实施例提供的一种拍摄方法的流程图;FIG. 2 is a flow chart of a shooting method provided by an embodiment of the present application;

图3为本申请实施例提供的一组显示界面示意图;FIG. 3 is a schematic diagram of a group of display interfaces provided by the embodiment of the present application;

图4为本申请实施例提供的另一显示界面示意图;FIG. 4 is a schematic diagram of another display interface provided by the embodiment of the present application;

图5为本申请实施例提供的另一显示界面示意图;FIG. 5 is a schematic diagram of another display interface provided by the embodiment of the present application;

图6为本申请实施例提供的另一组显示界面示意图;FIG. 6 is a schematic diagram of another group of display interfaces provided by the embodiment of the present application;

图7为本申请实施例提供的另一组显示界面示意图;FIG. 7 is a schematic diagram of another group of display interfaces provided by the embodiment of the present application;

图8为本申请实施例提供的另一显示界面示意图;FIG. 8 is a schematic diagram of another display interface provided by the embodiment of the present application;

图9为本申请实施例提供的另一组显示界面示意图;FIG. 9 is a schematic diagram of another group of display interfaces provided by the embodiment of the present application;

图10为本申请实施例提供的一组图像示意图;Fig. 10 is a schematic diagram of a group of images provided by the embodiment of the present application;

图11为本申请实施例提供的另一图像示意图;Fig. 11 is a schematic diagram of another image provided by the embodiment of the present application;

图12为本申请实施例提供的另一组图像示意图;FIG. 12 is a schematic diagram of another set of images provided by the embodiment of the present application;

图13为本申请实施例提供的另一组图像示意图;FIG. 13 is a schematic diagram of another set of images provided by the embodiment of the present application;

图14为本申请实施例提供的一种电子设备的结构示意图。FIG. 14 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.

具体实施方式detailed description

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。其中,在本申请实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,在本申请实施例的描述中,“多个”是指两个或多于两个。The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. Among them, in the description of the embodiments of this application, unless otherwise specified, "/" means or means, for example, A/B can mean A or B; "and/or" in this article is only a description of associated objects The association relationship of indicates that there may be three kinds of relationships, for example, A and/or B may indicate: A exists alone, A and B exist simultaneously, and B exists independently. In addition, in the description of the embodiments of the present application, "plurality" refers to two or more than two.

以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。Hereinafter, the terms "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.

本申请实施例提供了一种拍摄方法,可以应用于电子设备,能够在拍摄的预览状态下,根据用户意愿或需求为用户感兴趣的主体设置合适的曝光参数,从而使得根据该曝光参数拍摄的图像所合成的目标图像的曝光情况更能符合用户的意愿或期许,满足用户多样化、个性化的拍摄需求,并且还可以提高合成图像的画质,使得拍摄获得的图像更加自然,提升用户体验。The embodiment of the present application provides a shooting method, which can be applied to electronic devices, and can set appropriate exposure parameters for the subject of interest to the user according to the user's wishes or needs in the preview state of shooting, so that the photos taken according to the exposure parameters The exposure of the target image synthesized by the image can better meet the wishes or expectations of the user, meet the diverse and personalized shooting needs of the user, and can also improve the quality of the synthesized image, making the image obtained by shooting more natural and improving the user experience .

而在现有技术中,通常采用HDR模式进行曝光调节和图像合成。HDR模式中是根据不同曝光参数自动拍摄多张图像并自动进行图像合成,不能人为选择曝光参数,从而可能导致合成的图像部分严重失真,后期调节复杂,且难以满足用户多样化、个性化的拍摄需求。However, in the prior art, the HDR mode is usually used for exposure adjustment and image synthesis. In the HDR mode, multiple images are automatically taken according to different exposure parameters and the images are automatically synthesized. The exposure parameters cannot be artificially selected, which may cause serious distortion of the synthesized image, and the post-production adjustment is complicated, and it is difficult to meet the diverse and personalized shooting of users. need.

例如,本申请实施例中的电子设备可以是手机、平板电脑、可穿戴设备、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)等移动终端,也可以是专业的相机等设备,本申请实施例对电子设备的具体类型不作任何限制。For example, the electronic device in the embodiment of the present application may be a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (augmented reality, AR)/virtual reality (virtual reality, VR) device, a notebook computer, a super mobile personal computer (ultra-mobile personal computer, UMPC), netbook, personal digital assistant (personal digital assistant, PDA) and other mobile terminals may also be equipment such as professional cameras, and the embodiments of the present application do not impose any restrictions on the specific types of electronic equipment.

示例性的,图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等。Exemplarily, FIG. 1 shows a schematic structural diagram of an electronic device 100 . 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. 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.

处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processingunit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。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, memory, 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.

其中,控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。Wherein, 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.

处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, 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 directly called from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thus improving the efficiency of the system.

电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。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.

显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emittingdiode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrixorganic light emitting diode的,AMOLED),柔性发光二极管(flex light-emittingdiode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot lightemitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。例如,显示屏194可以用于显示专业HDR模式下的预览界面和拍摄界面等。The display screen 194 is used to display images, videos and the like. The display screen 194 includes a display panel. The display panel may 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. In some embodiments, the electronic device 100 may include 1 or N display screens 194 , where N is a positive integer greater than 1. For example, the display screen 194 may be used to display a preview interface and a shooting interface in a professional HDR mode.

电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。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.

摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。Camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects it to the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a complementary metal-oxide-semiconductor (complementary metal-oxide-semiconductor, CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal. 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. In some embodiments, the electronic device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.

其中,摄像头193还可以包括多种类型。例如,摄像头193可以包括具有不同焦段的长焦摄像头,广角摄像头或超广角摄像头等。其中,长焦摄像头的视场角小,适用于拍摄远处小范围内的景物;广角摄像头的视场角较大;超广角摄像头的视场角大于广角摄像头,可以用于拍摄全景等大范围的画面。在一些实施例中,视场角较小的长焦摄像头可转动,从而可以拍摄不同范围内的景物。Wherein, the camera 193 may also include multiple types. For example, the camera 193 may include a telephoto camera, a wide-angle camera or an ultra-wide-angle camera with different focal lengths. Among them, the field of view of the telephoto camera is small, which is suitable for shooting distant scenes in a small range; the field of view of the wide-angle camera is relatively large; screen. In some embodiments, the telephoto camera with a smaller field of view can be rotated so as to capture scenes in different ranges.

ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。The ISP is used for processing the data fed back by the camera 193 . For example, when taking a picture, open the shutter, the light is transmitted to the photosensitive element of the camera through the lens, and the optical 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. In some embodiments, the ISP may be located in the camera 193 .

在本申请的实施例中,感光元件可以检测进光量的大小,ISP可以根据进光量的大小进行测光,从而确定目标曝光参数。摄像头193可以根据目标曝光参数采集图像,从而生成预览图像或待合成图像。In the embodiment of the present application, the photosensitive element can detect the amount of incoming light, and the ISP can measure light according to the amount of incoming light, so as to determine the target exposure parameter. The camera 193 can collect images according to the target exposure parameters, so as to generate a preview image or an image to be synthesized.

数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。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.

视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos in various encoding formats, for example: moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

内部存储器121可以用于存储计算机可执行程序代码,可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行电子设备100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。The internal memory 121 may be used to store computer-executable program codes including instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 121 . The internal memory 121 may include an area for storing programs and an area for storing data. Wherein, 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. In addition, 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.

在本申请的实施例中,处理器110可以运行存储在内部存储器121中的指令,在专业HDR模式下将待合成图像合成最终的目标图像。In the embodiment of the present application, the processor 110 may execute instructions stored in the internal memory 121 to synthesize the images to be synthesized into a final target image in a professional HDR mode.

触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。Touch sensor 180K, also known as "touch panel". 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 . In other embodiments, 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 .

可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that, the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100 . In other embodiments of the present application, 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.

在本申请的实施例中,在预览状态下,触摸传感器180K等检测部件可以用于检测用户选择多个目标对象的操作。感光元件可以检测进光量的大小,ISP可以用于根据目标对象对应的进光量的大小进行自动测光,从而确定目标曝光参数。摄像头193可以用于根据目标曝光参数采集图像从而生成待合成图像。处理器110可以运行存储在内部存储器121中的指令将待合成图像合成最终的目标图像。显示屏194可以用于显示界面,例如预览界面和拍摄界面等。In the embodiment of the present application, in the preview state, detection components such as the touch sensor 180K may be used to detect the user's operation of selecting multiple target objects. The photosensitive element can detect the amount of incoming light, and the ISP can be used to perform automatic light metering according to the amount of incoming light corresponding to the target object, so as to determine the target exposure parameters. The camera 193 may be used to collect images according to target exposure parameters to generate images to be synthesized. The processor 110 may execute instructions stored in the internal memory 121 to synthesize the images to be synthesized into a final target image. The display screen 194 can be used to display interfaces, such as a preview interface and a shooting interface.

以下将以电子设备为手机,手机的屏幕为上述触控屏为例,对本申请实施例提供的拍摄方法进行阐述。The photographing method provided by the embodiment of the present application will be described below by taking the electronic device as a mobile phone and the screen of the mobile phone as the above-mentioned touch screen as an example.

参见图2,本申请实施例提供了一种拍摄方法,包括:Referring to Figure 2, an embodiment of the present application provides a shooting method, including:

200、手机进入相机应用的专业HDR模式。200. The mobile phone enters the professional HDR mode of the camera application.

在一些实施例中,手机可以在相机应用中预设专业HDR模式,并响应于用户进入专业HDR模式的操作进入该模式进行拍摄。In some embodiments, the mobile phone can preset a professional HDR mode in the camera application, and enter this mode to take pictures in response to the user's operation to enter the professional HDR mode.

例如,手机检测到用户点击图3中的(a)所示的相机图标301的操作后,启动相机应用,并进入如图3中的(b)所示的拍照模式。示例性的,手机检测到用户点击图3中的(b)所示的专业HDR控件302的操作后,进入专业HDR模式,显示如图3中的(c)所示的预览界面。手机在预览界面上显示预览图像。再示例性的,手机检测到用户点击图3中的(b)所示的控件303的操作后,显示如图3中的(d)所示的界面;手机检测到用户点击控件304的操作后,进入专业HDR模式,并显示如图3中的(c)所示的专业HDR模式的预览界面。For example, after detecting that the user clicks the camera icon 301 shown in (a) in FIG. 3 , the mobile phone starts the camera application and enters the camera mode as shown in (b) in FIG. 3 . Exemplarily, after the mobile phone detects that the user clicks the professional HDR control 302 shown in (b) in FIG. 3 , it enters the professional HDR mode and displays a preview interface as shown in (c) in FIG. 3 . The phone displays the preview image on the preview interface. Exemplarily again, after the mobile phone detects that the user clicks the operation of the control 303 shown in (b) in Figure 3, it displays an interface as shown in (d) in Figure 3; after the mobile phone detects the operation of the user clicking the control 304 , enter the professional HDR mode, and display the preview interface of the professional HDR mode as shown in (c) in FIG. 3 .

再例如,手机显示桌面或非相机应用的界面,检测到用户进入专业HDR模式的语音指令后,进入专业HDR模式,并显示如图3中的(c)所示的专业HDR模式的预览界面。For another example, the mobile phone displays the desktop or non-camera application interface, and after detecting the user's voice command to enter the professional HDR mode, enters the professional HDR mode, and displays the preview interface of the professional HDR mode as shown in (c) in Figure 3 .

需要说明的是,手机还可以响应于用户的其他触摸操作、语音指令或快捷手势等操作进入专业HDR模式,本申请实施例对触发手机进入专业HDR模式的操作不作限定。It should be noted that the mobile phone can also enter the professional HDR mode in response to other user touch operations, voice commands, or shortcut gestures. The embodiment of the present application does not limit the operation of triggering the mobile phone to enter the professional HDR mode.

还需要说明的是,专业HDR模式也可以有其他的名称,例如,手动HDR模式或增强HDR模式等,本申请实施例对该名称不予限定。It should also be noted that the professional HDR mode may also have other names, for example, manual HDR mode or enhanced HDR mode, etc., which are not limited in this embodiment of the present application.

在一些实施例中,手机进入专业HDR模式后,可以将专业HDR模式的功能提示给用户,以方便用户更好地使用该模式拍摄照片。示例性的,手机可以提示用户:在专业HDR模式下,您可以选择多个感兴趣的对象,手机将根据您选择的每个对象分别确定合适的曝光参数,根据每个曝光参数分别拍摄一张待合成图像,进而根据待合成图像合成曝光情况符合您期许的目标图像。In some embodiments, after the mobile phone enters the professional HDR mode, the function of the professional HDR mode may be prompted to the user, so that the user can better use this mode to take photos. For example, the mobile phone can prompt the user: in the professional HDR mode, you can select multiple objects of interest, and the mobile phone will determine the appropriate exposure parameters according to each object you selected, and take a picture according to each exposure parameter The images to be synthesized, and then synthesized according to the exposure of the images to be synthesized to meet your desired target image.

201、手机根据目标对象生成目标曝光参数,目标对象包括目标主体或目标区域。201. The mobile phone generates a target exposure parameter according to a target object, where the target object includes a target subject or a target area.

手机进入专业HDR模式后,在预览状态下显示专业HDR模式的预览界面,并在该预览界面中呈现预览图像。其中,手机可以采用默认的测光方式,根据当前拍摄场景中摄像头视场角范围内的物体反射到摄像头的感光传感器上的光线的进光量进行测光,从而计算曝光参数,基于该曝光参数采集图像,根据采集的图像生成预览图像并显示在预览界面上。After the mobile phone enters the professional HDR mode, the preview interface of the professional HDR mode is displayed in the preview state, and the preview image is presented in the preview interface. Among them, the mobile phone can use the default light metering method to measure light according to the amount of light reflected by objects within the field of view of the camera in the current shooting scene to the photosensitive sensor of the camera, so as to calculate the exposure parameters, and collect data based on the exposure parameters Image, generate a preview image based on the collected image and display it on the preview interface.

例如,默认的测光方式可以是全局测光、中央局部测光或点测光等方式,本申请实施例对默认的测光方式不予限定。其中,该默认的测光方式可以是用户可以自己设置的,若用户未设置则默认采用全局测光方式。For example, the default photometry method may be global photometry, central partial photometry, or spot photometry, and the default photometry method is not limited in this embodiment of the present application. Wherein, the default light metering mode may be set by the user, and if the user does not set it, the global light metering mode is adopted by default.

这里的进光量指的是,被拍摄物体(或称被拍摄对象)反射的光线通过镜头进入感光传感器的光线总量。示例性的,当默认测光方式为全局测光方式时,手机可以根据当前拍摄场景中视场角范围内所有被拍摄对象的整体进光量自动计算全局曝光参数,从而基于全局曝光参数采集图像,根据采集的图像生成预览图像并显示在预览界面上;再示例性的,当默认测光方式为中央局部测光方式时,手机可以根据预览图像上预设的中间区域对应的拍摄场景中被拍摄对象的进光量自动计算曝光参数,并基于该曝光参数采集图像,根据采集的图像生成预览图像并显示在预览界面上。本申请以下实施例中将以默认的测光方式为全局测光为例进行说明。The amount of incoming light here refers to the total amount of light reflected by the object to be photographed (or called the object to be photographed) entering the photosensitive sensor through the lens. Exemplarily, when the default light metering mode is the global light metering mode, the mobile phone can automatically calculate the global exposure parameters according to the overall light input of all objects within the field of view in the current shooting scene, so as to collect images based on the global exposure parameters, according to The captured image generates a preview image and displays it on the preview interface; for another example, when the default metering method is the central partial metering method, the mobile phone can use the object to be photographed in the shooting scene corresponding to the preset middle area on the preview image The exposure parameters are automatically calculated based on the amount of incoming light, and images are collected based on the exposure parameters, and a preview image is generated based on the collected images and displayed on the preview interface. In the following embodiments of the present application, the default light metering mode is global light metering as an example for illustration.

在手机进入专业HDR模式后,用户还可以在预览界面上选择目标对象。在一些实施例中,手机可以通过显示信息或语音播报等方式提示用户选择多个目标对象。手机检测到用户选择目标对象的操作后,根据目标对象确定目标曝光参数并保存。该目标曝光参数是能够使得图像上的目标对象可以正确曝光的参数。其中,曝光参数可以包括能够反应图像曝光程度的参数,例如,曝光参数,包括目标曝光参数,可以包括光圈、感光度ISO和快门时间等。本申请实施例对目标曝光参数的具体参数不予限定。进入专业HDR模式后,用户可以在预览界面上多次选择目标对象,每个目标对象可以对应一组目标曝光参数。After the mobile phone enters the professional HDR mode, the user can also select the target object on the preview interface. In some embodiments, the mobile phone may prompt the user to select multiple target objects by means of displaying information or voice broadcast. After the mobile phone detects the user's operation of selecting the target object, it determines and saves the target exposure parameters according to the target object. The target exposure parameter is a parameter capable of correctly exposing the target object on the image. Wherein, the exposure parameters may include parameters that can reflect the degree of image exposure, for example, the exposure parameters include target exposure parameters, which may include aperture, sensitivity ISO, and shutter time. The embodiment of the present application does not limit the specific parameters of the target exposure parameters. After entering the professional HDR mode, the user can select the target object multiple times on the preview interface, and each target object can correspond to a set of target exposure parameters.

需要说明的是,用户可以根据需求选择大于1的任意个数的目标对象,本申请实施例对用户选择的目标对象的个数不予限定。以下将以用户在预览状态下选择了两个目标对象为例进行说明。It should be noted that the user can select any number of target objects greater than 1 according to requirements, and this embodiment of the present application does not limit the number of target objects selected by the user. The following will be described by taking the user selecting two target objects in the preview state as an example.

例如,进入专业HDR模式后,用户选择预览图像中的第一目标对象,手机根据用户选择的第一目标对象进行自动测光。即,手机根据预览图像上第一目标对象在拍摄场景中对应的视场角范围内的物体,反射到感光传感器上的光线的进光量进行自动测光。手机根据自动测光结果生成并保存第一目标曝光参数。之后,用户在预览界面显示的图像上选择第二目标对象,手机根据第二目标对象进行自动测光,根据自动测光结果生成并保存第二目标曝光参数。For example, after entering the professional HDR mode, the user selects the first target object in the preview image, and the mobile phone performs automatic light metering according to the first target object selected by the user. That is, the mobile phone performs automatic light metering according to the amount of light reflected to the photosensitive sensor by the object within the field angle range corresponding to the first target object in the shooting scene on the preview image. The mobile phone generates and saves the first target exposure parameter according to the automatic light metering result. Afterwards, the user selects the second target object on the image displayed on the preview interface, the mobile phone performs automatic light metering according to the second target object, and generates and saves the second target exposure parameter according to the automatic light metering result.

在本申请的实施例中,若目标对象比较亮(例如,天空,白色包装纸等),则表示目标对象反射进入摄像头的进光量较大,为了防止目标对象过曝,则需要降低进光量。因此,当手机通过自动测光确定目标对象对应的进光量较大时,可以表明目标对象较亮,手机设置的目标对象对应的目标曝光参数对应的曝光值可以较小,例如相应的光圈F值较大,快门时间较短,或ISO值较低。这样,手机根据目标曝光参数拍摄的图像不容易出现目标对象过曝的情况。相反的,若目标对象比较暗(例如,逆光下的人脸,灰色挡板等)时,则表示目标对象反射进入摄像头的进光量较小,为了防止目标对象欠曝,则需要提高进光量。因此,当手机通过自动测光确定目标对象对应的进光量较小时,可以表明目标对象较暗,手机设置目标对象对应的目标曝光参数对应的曝光值可以较大,例如相应的光圈F值较小,快门时间较长,或ISO值较高。这样,手机根据目标曝光参数拍摄的图像不容易出现目标对象欠曝的情况。In the embodiment of the present application, if the target object is relatively bright (for example, the sky, white wrapping paper, etc.), it means that the amount of light reflected by the target object into the camera is relatively large, and in order to prevent the target object from being overexposed, the amount of light input needs to be reduced. Therefore, when the mobile phone determines that the amount of incoming light corresponding to the target object is relatively large through automatic metering, it can indicate that the target object is brighter, and the exposure value corresponding to the target exposure parameter corresponding to the target object set by the mobile phone can be smaller, such as the corresponding aperture F value Larger, shorter shutter times, or lower ISO values. In this way, the image captured by the mobile phone according to the target exposure parameters is less prone to overexposure of the target object. Conversely, if the target object is relatively dark (for example, a face under backlight, a gray baffle, etc.), it means that the amount of light reflected by the target object into the camera is small, and in order to prevent the target object from being underexposed, it is necessary to increase the amount of light entering. Therefore, when the mobile phone determines that the amount of incoming light corresponding to the target object is small through automatic light metering, it can indicate that the target object is dark, and the mobile phone can set the exposure value corresponding to the target exposure parameter corresponding to the target object to be relatively large, for example, the corresponding aperture F value is small , the shutter time is longer, or the ISO value is higher. In this way, the image captured by the mobile phone according to the target exposure parameters is unlikely to be underexposed to the target object.

示例性的,在如图4所示的逆光人像拍摄场景中,若用户选择的第一目标对象是图4中的天空401,则由于天空401包含白云和太阳比较亮,因此手机针对该目标对象生成的第一目标曝光参数对应的曝光值较小,例如光圈F值为1.8、ISO为200、快门时间为1/50秒。若用户选择的第二目标对象是图4中的人物402,由于当前视野有太阳,因此在逆光场景下,人物402比较暗,因此手机针对该目标对象生成第二目标曝光参数对应的曝光值较大,例如光圈F值为1.4、ISO为300、快门时间为1/30秒。Exemplarily, in the backlit portrait shooting scene as shown in FIG. 4 , if the first target object selected by the user is the sky 401 in FIG. 4 , since the sky 401 contains white clouds and the sun is relatively bright, the mobile phone will The exposure value corresponding to the generated first target exposure parameter is relatively small, for example, the aperture F value is 1.8, the ISO is 200, and the shutter time is 1/50 second. If the second target object selected by the user is the person 402 in FIG. 4 , since there is the sun in the current field of view, the person 402 is relatively dark in a backlit scene, so the exposure value corresponding to the second target exposure parameter generated by the mobile phone for the target object is relatively low. Large, for example, the aperture F value is 1.4, the ISO is 300, and the shutter time is 1/30 second.

在本申请的实施例中,目标对象可以是目标主体或目标区域。例如,当用户想要调节或控制某个主体的曝光程度、曝光情况或曝光参数时,可以选择该主体作为目标对象,或者在该主体的图像上选择一个区域作为目标对象。再例如,当用户想要调节某个区域的曝光程度、曝光情况或曝光参数时,可以选择该区域作为目标对象。手机根据目标对象自动测光获得相匹配的目标曝光参数。因此,目标曝光参数与用户选择的目标对象相匹配,是符合用户曝光意愿的曝光参数。In the embodiment of the present application, the target object may be a target body or a target area. For example, when the user wants to adjust or control the exposure level, exposure condition or exposure parameters of a certain subject, the subject may be selected as the target object, or an area on the image of the subject may be selected as the target object. For another example, when the user wants to adjust the exposure degree, exposure condition or exposure parameter of a certain area, the user may select this area as the target object. The mobile phone automatically measures light according to the target object to obtain matching target exposure parameters. Therefore, the target exposure parameter matches the target object selected by the user, and is an exposure parameter that conforms to the exposure intention of the user.

例如,目标对象可以是目标主体,比如为图4中的人物402。当目标对象是目标主体时,在预览状态下,手机对预览图像进行了全景分割,手机根据用户在预览图像上的选择操作和全景分割结果确定需要调节曝光参数的目标主体。该种情况下,手机根据目标主体所在的区域进行自动测光,从而根据自动测光结果获得对应的目标曝光参数。For example, the target object may be a target subject, such as the character 402 in FIG. 4 . When the target object is the target subject, in the preview state, the mobile phone performs panoramic segmentation on the preview image, and the mobile phone determines the target subject whose exposure parameters need to be adjusted according to the user's selection operation on the preview image and the panoramic segmentation result. In this case, the mobile phone performs automatic light metering according to the area where the target subject is located, so as to obtain corresponding target exposure parameters according to the automatic light metering result.

再例如,目标对象可以是目标区域。比如,该目标区域可能只包括某一个物体的一部分,此时,手机根据该物体的整体进行自动测光,从而根据自动测光结果获得对应的目标曝光参数;或者,手机根据目标区域内对应的物体部分自动测光,从而根据自动测光结果获得对应的目标曝光参数。再比如,该目标区域中可能包括多个物体,此时,手机根据该目标区域中的多个物体中的主要物体自动测光,从而根据自动测光结果获得对应的目标曝光参数。具体的,手机根据该主要物体在该目标区域内的部分进行主动测光。例如,该主要物体可以是该目标区域中面积占比最大的物体,也可以是该目标区域中最中心的物体,还可以是该目标区域中完整显示的物体。For another example, the target object may be a target area. For example, the target area may only include a part of a certain object. At this time, the mobile phone performs automatic light metering according to the whole object, so as to obtain the corresponding target exposure parameters according to the automatic light metering result; Part of the object is automatically metered, so that the corresponding target exposure parameters are obtained according to the automatic metering result. For another example, the target area may include multiple objects. At this time, the mobile phone automatically measures light according to the main object among the multiple objects in the target area, so as to obtain corresponding target exposure parameters according to the automatic light measurement result. Specifically, the mobile phone performs active photometry according to the part of the main object within the target area. For example, the main object may be the object with the largest area in the target area, or the centermost object in the target area, or a completely displayed object in the target area.

手机根据目标对象生成目标曝光参数之后,可以根据该目标曝光参数采集图像,根据采集的图像生成并显示预览图像。After the mobile phone generates target exposure parameters according to the target object, it can collect images according to the target exposure parameters, and generate and display a preview image according to the collected images.

比如,用户选择第一目标对象后,手机根据第一目标对象生成第一目标曝光参数,并根据第一目标曝光参数采集图像从而生成并显示第一预览图像。在拍摄场景不发生切换的情况下,手机可以持续根据第一目标曝光参数采集图像从而生成并显示第一预览图像。直到用户选择第二目标图像后,手机可以根据第二目标对象生成第二目标曝光参数,并根据第二目标曝光参数采集图像从而生成并显示第二预览图像。For example, after the user selects the first target object, the mobile phone generates the first target exposure parameters according to the first target object, and collects images according to the first target exposure parameters to generate and display the first preview image. In the case that the shooting scene does not switch, the mobile phone can continuously collect images according to the first target exposure parameters to generate and display the first preview image. After the user selects the second target image, the mobile phone can generate a second target exposure parameter according to the second target object, and collect images according to the second target exposure parameter to generate and display a second preview image.

在一些实施例中,目标对象的选择方式不同,手机根据目标曝光参数获得的预览图像的显示方式也不同。例如,用户通过第一预设方式选择第一目标对象(例如单击第一目标对象)后,手机根据第一目标对象生成第一目标曝光参数,并根据第一目标曝光参数采集一帧图像从而生成并显示一帧第一预览图像。而后,手机根据全局曝光参数采集图像,从而生成并显示预览图像。用户通过第一预设方式选择第二目标图像(例如单击第二目标对象)后,手机根据第二目标对象生成第二目标曝光参数,并根据第二目标曝光参数采集一帧图像从而生成并显示一帧第二预览图像。而后,手机根据全局曝光参数采集图像,从而生成并显示预览图像。In some embodiments, the selection mode of the target object is different, and the display mode of the preview image obtained by the mobile phone according to the target exposure parameters is also different. For example, after the user selects the first target object through the first preset method (for example, clicking the first target object), the mobile phone generates the first target exposure parameter according to the first target object, and collects a frame of image according to the first target exposure parameter to thereby Generate and display a frame of the first preview image. Then, the mobile phone captures images according to the global exposure parameters, thereby generating and displaying preview images. After the user selects the second target image through the first preset method (for example, clicking the second target object), the mobile phone generates the second target exposure parameter according to the second target object, and collects a frame of image according to the second target exposure parameter to generate and Display a frame of the second preview image. Then, the mobile phone captures images according to the global exposure parameters, thereby generating and displaying preview images.

再例如,用户选择第一目标对象之后,手机根据第一目标对象生成第一目标曝光参数。手机在用户选择第一目标对象之后的预设时间(例如1s)内根据该第一目标曝光参数持续采集图像,从而生成并显示第一预览图像。若在该预设时间内未检测到用户选择第二目标对象的操作,则在该预设时间之后,手机根据全局曝光参数采集图像从而生成预览图像并显示;直到检测到用户选择第二目标对象后,根据第二目标曝光参数生成并显示第二预览图像。若手机在用户选择第一目标对象之后的预设时间内检测到用户选择第二目标对象的操作,则手机根据第二目标对象生成第二目标曝光参数,根据该第二目标曝光参数生成并显示第二预览图像。For another example, after the user selects the first target object, the mobile phone generates the first target exposure parameter according to the first target object. The mobile phone continues to collect images according to the first target exposure parameters within a preset time (for example, 1 second) after the user selects the first target object, thereby generating and displaying the first preview image. If the operation of selecting the second target object by the user is not detected within the preset time, after the preset time, the mobile phone collects an image according to the global exposure parameters to generate a preview image and display it; until the user selects the second target object is detected Afterwards, a second preview image is generated and displayed according to the second target exposure parameter. If the mobile phone detects that the user selects the second target object within a preset time after the user selects the first target object, the mobile phone generates a second target exposure parameter according to the second target object, and generates and displays the second target exposure parameter according to the second target object. Second preview image.

再例如,用户通过第二预设方式选择第一目标对象(例如长按第一目标对象)之后,手机进入锁定模式。这样,用户选择第一目标对象之后,预览界面上呈现相应的第一预览图像;直到用户选择第二目标对象之后,预览界面上才会呈现相应的第二预览图像。For another example, after the user selects the first target object through the second preset method (for example, press and hold the first target object), the mobile phone enters the lock mode. In this way, after the user selects the first target object, the corresponding first preview image is presented on the preview interface; the corresponding second preview image is not presented on the preview interface until the user selects the second target object.

此外,用户还可以通过双击,压力按,画圈或画方框等圈定目标对象的方式,用户还可以通过语音指示的方式(例如语音指示选择最中间的人物为目标对象)或其他方式来选择预览图像中的目标对象,本申请实施例对用户选择预览图像中的目标对象的方式不予限定。In addition, the user can also delineate the target object by double-clicking, pressing, drawing a circle or drawing a box, etc., and the user can also select by voice instructions (such as voice instructions to select the most middle person as the target object) or other methods. For the target object in the preview image, the embodiment of the present application does not limit the manner in which the user selects the target object in the preview image.

如图5所示,在一些实施例中,当用户通过单击或双击等点击方式选择预览图像的某个位置时,手机以点击处为中心向外扩展预设数量像素,所形成的区域即为目标区域。例如,以点击处为中心,向外扩展5个像素的区域被确定为用户选择的目标区域502。在另一些实施例中,当用户通过画圈或画方框等圈定区域的方式选择预览图像中的目标区域时,所选择的目标区域为用户画出的圆圈或方框内圈定的区域。例如,当用户划了一个方框时,该方框即为用户选择的目标区域501。在另一些实施例中,当用户点击某个位置时,该位置所属的主体即为目标对象。例如,当用户点击鹿所在的位置时,鹿即为目标对象503。As shown in Figure 5, in some embodiments, when the user selects a certain position of the preview image by clicking or double-clicking, the mobile phone expands a preset number of pixels from the center of the clicked position, and the formed area is for the target area. For example, with the clicked point as the center, an area extending outward by 5 pixels is determined as the target area 502 selected by the user. In some other embodiments, when the user selects a target area in the preview image by drawing a circle or a box to enclose an area, the selected target area is the area enclosed in the circle or box drawn by the user. For example, when the user draws a box, the box is the target area 501 selected by the user. In some other embodiments, when the user clicks on a certain location, the subject to which the location belongs is the target object. For example, when the user clicks on the location where the deer is located, the deer is the target object 503 .

在其他一些实施例中,手机还可以通过显示提示信息、语音播报或其他方式将第一目标曝光参数和第二目标曝光参数提示给用户,从而用户能够更直观地将各个目标曝光参数与预览图像对应,方便用户获知选择目标对象后生成的目标曝光参数的数值情况。示例性的,如图6中的(a)所示,在用户选择目标区域501后,手机在第一预览图像上显示第一目标曝光参数601。如图6中的(b)所示,在用户选择目标区域502后,手机在第二预览图像上显示第二目标曝光参数602。本申请实施例对向用户提示目标曝光参数的方式不予限定。In some other embodiments, the mobile phone can also prompt the user with the first target exposure parameter and the second target exposure parameter by displaying prompt information, voice broadcast or other methods, so that the user can more intuitively compare each target exposure parameter with the preview image. Correspondingly, it is convenient for the user to know the value of the target exposure parameter generated after selecting the target object. Exemplarily, as shown in (a) of FIG. 6 , after the user selects the target area 501 , the mobile phone displays the first target exposure parameter 601 on the first preview image. As shown in (b) of FIG. 6 , after the user selects the target area 502 , the mobile phone displays a second target exposure parameter 602 on the second preview image. The embodiment of the present application does not limit the manner of prompting the user of the target exposure parameter.

在另一些实施例中,用户还可以根据个人需求、意愿、经验或喜好等手动调整目标曝光参数,从而能够生成更符合用户意愿的目标曝光参数,提升用户体验。In some other embodiments, the user can also manually adjust the target exposure parameters according to personal needs, wishes, experience or preferences, so as to generate target exposure parameters that are more in line with the user's wishes and improve user experience.

例如,在预览界面中,当用户选择预览图像中的第一目标对象时,手机可以采用上述方式,根据该第一目标对象的进光量自动计算第一目标曝光参数。手机根据该第一目标曝光参数采集第一预览图像,并在预览界面上呈现该第一预览图像。并且,预览界面上显示有曝光调节控件,用户可以根据自己的需求、意愿、经验或喜好,对当前手机自动计算得到的第一目标曝光参数进行调整,从而获得调整后的新的第一目标曝光参数。其中,第一目标曝光参数包括光圈、ISO和快门时间。For example, in the preview interface, when the user selects the first target object in the preview image, the mobile phone can automatically calculate the first target exposure parameter according to the amount of incoming light of the first target object in the above manner. The mobile phone collects a first preview image according to the first target exposure parameter, and presents the first preview image on a preview interface. In addition, exposure adjustment controls are displayed on the preview interface, and users can adjust the first target exposure parameters automatically calculated by the current mobile phone according to their own needs, wishes, experience or preferences, so as to obtain an adjusted new first target exposure parameter. Wherein, the first target exposure parameter includes aperture, ISO and shutter time.

例如,如图7中的(a)所示,曝光调节控件包括光圈、ISO和快门时间这些参数分别对应的调节控件。用户可以直接在各参数对应的调节控件中输入参数值来调整第一目标曝光参数,也可以在各参数对应的调节控件的下拉菜单中选择参数值来调整第一目标曝光参数。另外,用户还可以通过光圈、ISO和快门时间这些参数分别对应的滑动滚动条来调节各参数值,从而调整第一目标曝光参数。再例如,第一目标曝光参数还可以包括曝光值EV,如图7中的(b)所示,曝光调节控件为曝光值对应的调节杆,用户可以通过滑动调节杆来调整曝光值的档位,手机根据调整后的曝光值的档位确定对应的一组曝光参数的大小。本申请实施例对调整第一目标曝光参数的方式不予限定。For example, as shown in (a) in FIG. 7 , the exposure adjustment controls include adjustment controls corresponding to parameters such as aperture, ISO and shutter time. The user can directly input a parameter value in the adjustment control corresponding to each parameter to adjust the first target exposure parameter, or select a parameter value in the drop-down menu of the adjustment control corresponding to each parameter to adjust the first target exposure parameter. In addition, the user can also adjust the value of each parameter by sliding the scroll bars corresponding to the parameters of aperture, ISO and shutter time, thereby adjusting the first target exposure parameter. For another example, the first target exposure parameter may also include an exposure value EV. As shown in (b) in FIG. , the mobile phone determines the size of a corresponding set of exposure parameters according to the gear of the adjusted exposure value. The embodiment of the present application does not limit the manner of adjusting the first target exposure parameter.

在其他一些实施例中,当用户选择预览图像中的目标对象后,用户可以根据个人需求、意愿、经验或喜好等直接设置目标曝光参数,而不需要手机根据目标对象自动测光从而计算目标曝光参数。In some other embodiments, after the user selects the target object in the preview image, the user can directly set the target exposure parameters according to personal needs, wishes, experience or preferences, without the need for the mobile phone to automatically measure light according to the target object to calculate the target exposure parameter.

例如,在预览界面中,当用户选择预览图像中的第一目标对象后,手机可以在预览界面上显示曝光设置控件,用户可以通过曝光设置控件设置第一目标曝光参数。示例性的,如图8所示,曝光设置控件包括光圈、ISO和快门时间这些参数分别对应的滑动滚动条。用户可以通过滑动各参数对应的滑动滚动条来设置各参数值,从而设置第一目标曝光参数。另外,用户可以直接在各参数对应的设置控件中输入参数值来设置第一目标曝光参数,也可以在个参数对应的设置控件的下拉菜单中选择参数值来设置第一目标曝光参数。本申请实施例对设置第一目标曝光参数的方式不做限定。For example, in the preview interface, after the user selects the first target object in the preview image, the mobile phone can display an exposure setting control on the preview interface, and the user can set the exposure parameter of the first target through the exposure setting control. Exemplarily, as shown in FIG. 8 , the exposure setting control includes sliding scroll bars respectively corresponding to parameters such as aperture, ISO and shutter time. The user can set the value of each parameter by sliding the sliding scroll bar corresponding to each parameter, thereby setting the first target exposure parameter. In addition, the user can directly input the parameter value in the setting control corresponding to each parameter to set the first target exposure parameter, or select a parameter value in the drop-down menu of the setting control corresponding to each parameter to set the first target exposure parameter. The embodiment of the present application does not limit the manner of setting the first target exposure parameter.

当用户选择预览图像中的第二目标对象时,用户可以根据自己的需求、经验、意愿或喜好,针对第二目标区域调整或设置第二目标曝光参数。用户调整或设置第二目标曝光参数的过程与调整或设置第一目标曝光参数的过程类似,这里不再赘述。When the user selects the second target object in the preview image, the user can adjust or set the second target exposure parameter for the second target area according to his own needs, experiences, wishes or preferences. The process for the user to adjust or set the second target exposure parameter is similar to the process for adjusting or setting the first target exposure parameter, and will not be repeated here.

在本申请实施例中,响应于用户对不同目标对象的选择操作,手机可以针对各个目标对象自动生成各个目标对象对应的目标曝光参数,或者,用户可以针对各个目标对象手动设置各个目标对象对应的目标曝光参数。手机可以在预览界面中显示根据各目标曝光参数生成的预览图像,使得用户能够直观地看到各个预览图像的效果,方便用户对比根据目标对象调整曝光参数前后的预览图像的曝光效果。In this embodiment of the application, in response to the user's selection operation on different target objects, the mobile phone can automatically generate the target exposure parameters corresponding to each target object for each target object, or the user can manually set the corresponding target exposure parameters for each target object. target exposure parameters. The mobile phone can display the preview image generated according to each target exposure parameter in the preview interface, so that the user can intuitively see the effect of each preview image, and it is convenient for the user to compare the exposure effect of the preview image before and after adjusting the exposure parameter according to the target object.

在其他一些实施例中,第一预览图像不是根据第一目标曝光参数采集的图像直接生成的预览图像,而是根据全局曝光参数和第一目标曝光参数分别获得的图像合成后的图像。比如,手机采用第一目标曝光参数采集图像1,采用全局曝光参数采集图像2,将图像2中的第一目标对象的像素替换成图像1中第一目标对象的像素,从而生成第一预览图像。也就是说,第一预览图像上第一目标对象的图像根据第一目标曝光参数获得,第一目标对象以外的图像根据全局曝光参数获得。以这种方式生成并显示的第一预览图像,可以让用户直观地对比出在用户选择该第一目标对象从而设置目标曝光参数的前后,该第一目标对象内曝光程度的变化情况,方便用户确定采用该第一目标曝光参数拍摄的第一目标对象是否符合用户的期许和意愿。与第一预览图像类似,第二预览图像也可以是根据第二目标曝光参数和全局曝光参数获得的图像。In some other embodiments, the first preview image is not a preview image directly generated from an image collected according to the first target exposure parameter, but an image synthesized from images respectively obtained according to the global exposure parameter and the first target exposure parameter. For example, the mobile phone uses the first target exposure parameters to capture image 1, uses the global exposure parameters to capture image 2, replaces the pixels of the first target object in image 2 with the pixels of the first target object in image 1, thereby generating the first preview image . That is to say, the image of the first target object on the first preview image is obtained according to the first target exposure parameter, and the images other than the first target object are obtained according to the global exposure parameter. The first preview image generated and displayed in this way allows the user to intuitively compare the changes in the exposure level of the first target object before and after the user selects the first target object to set the target exposure parameters, which is convenient for the user It is determined whether the first target object photographed by using the first target exposure parameter meets the expectations and wishes of the user. Similar to the first preview image, the second preview image may also be an image obtained according to the second target exposure parameter and the global exposure parameter.

在本申请的另一些实施例中,手机进入拍照模式之后,还可以根据用户在拍照模式的预览图像上选择多个目标对象的操作,自动启动专业HDR模式。例如,在如图9中的(a)所示的拍照模式下,手机在预览界面上显示拍摄对象的预览图像;手机检测到用户选择了预览图像中的第一目标对象901;如图9中的(b)所示,手机在预设时间内又检测到用户选择了预览图像中的第二目标对象902时,手机自动进入专业HDR模式,并显示如图9中的(d)所示的专业HDR模式的预览界面。In other embodiments of the present application, after the mobile phone enters the camera mode, the professional HDR mode may be automatically activated according to the user's operation of selecting multiple target objects on the preview image of the camera mode. For example, in the photographing mode shown in (a) in Figure 9, the mobile phone displays a preview image of the subject on the preview interface; the mobile phone detects that the user has selected the first target object 901 in the preview image; as shown in Figure 9 As shown in (b), when the mobile phone detects that the user has selected the second target object 902 in the preview image within the preset time, the mobile phone automatically enters the professional HDR mode and displays the image shown in (d) in Figure 9 The preview interface of professional HDR mode.

需要说明的是,在这种情况下,手机在检测到用户选择多个目标对象的操作之后,根据选择的多个目标对象分别生成并保存相应的目标曝光参数。在检测到用户的拍摄操作后,手机采用上述目标曝光参数拍摄图像,并合成符合用户期许和意愿的目标图像。It should be noted that, in this case, after detecting the user's operation of selecting multiple target objects, the mobile phone generates and saves corresponding target exposure parameters according to the multiple selected target objects. After detecting the user's shooting operation, the mobile phone uses the above target exposure parameters to capture an image, and synthesizes a target image that meets the user's expectations and wishes.

在本申请实施例中,手机通过检测到用户连续多次选择目标对象,能够自动识别出用户想要通过专业HDR模式进行拍照。因此,手机根据用户选择的多个目标对象生成各自对应的目标曝光参数,从而拍摄并合成出符合用户期许和意愿的目标图像。In the embodiment of the present application, the mobile phone can automatically recognize that the user wants to take pictures in the professional HDR mode by detecting that the user selects the target object multiple times in succession. Therefore, the mobile phone generates corresponding target exposure parameters according to multiple target objects selected by the user, so as to capture and synthesize target images that meet the expectations and wishes of the user.

在一些实施例中,手机还可以在自动启动专业HDR模式之前,在拍照模式的预览界面上提示用户是否启动专业HDR模式。示例性的,手机可以显示如图9中的(c)所示的提示框,以提示用户是否进入专业HDR模式。在用户选择“是”之后,手机自动启动专业HDR模式,并显示如图9中的(d)所示的专业HDR模式的预览界面。In some embodiments, before automatically starting the professional HDR mode, the mobile phone may prompt the user on the preview interface of the camera mode whether to start the professional HDR mode. Exemplarily, the mobile phone may display a prompt box as shown in (c) in FIG. 9 to prompt the user whether to enter the professional HDR mode. After the user selects "Yes", the mobile phone automatically starts the professional HDR mode, and displays the preview interface of the professional HDR mode as shown in (d) in FIG. 9 .

需要说明的是,在本申请实施例中,用户可以根据需求选择大于1的任意个数的目标对象,本申请实施例对用户选择的目标对象的个数不予限定。用户可以通过双击,压力按,长按,画圈或画方框等圈定目标对象的方式,或其他方式来选择预览图像中的区域,本申请实施例对用户选择预览图像中的目标对象的方式不予限定。It should be noted that, in the embodiment of the present application, the user can select any number of target objects greater than 1 according to requirements, and the embodiment of the present application does not limit the number of target objects selected by the user. The user can select the area in the preview image by double-clicking, pressing, long-pressing, drawing a circle or drawing a box, or other methods to delineate the target object. Not limited.

202、手机检测到用户的拍摄操作后,根据目标曝光参数拍摄待合成图像。202. After detecting the user's shooting operation, the mobile phone shoots the image to be combined according to the target exposure parameters.

示例性的,手机检测到用户点击如图10中的(a)中所示的拍摄控件1001的操作后,根据第一目标曝光参数拍摄第一图像进行存储,并根据第二目标曝光参数拍摄第二图像进行存储。即,待合成图像包括第一图像和第二图像。可以理解的是,手机还可以响应于用户的其他触摸操作、语音指令或快捷手势等操作进行拍摄,本申请实施例对拍摄操作的具体形式不予限定。Exemplarily, after the mobile phone detects that the user clicks on the shooting control 1001 shown in (a) in FIG. Two images are stored. That is, the image to be synthesized includes the first image and the second image. It can be understood that the mobile phone can also perform shooting in response to other touch operations, voice commands, or shortcut gestures of the user, and the embodiment of the present application does not limit the specific form of the shooting operation.

例如,当第一目标对象为目标区域501时,第一目标对象是天空的一部分,为了防止第一目标对象过曝,需要减少进光量,因此手机通过自动测光确定的第一目标曝光参数对应的曝光值较低。从而,如图10中的(b)所示,以第一目标曝光参数601拍摄的第一图像较暗。当第二目标对象为目标区域502时,由于第二目标对象是人物的一部分,为了防止第二目标对象欠曝,需要增加进光量,因此手机通过自动测光确定的第二目标曝光参数对应的曝光值较高。从而,如图10中的(c)所示,以第二目标曝光参数602拍摄的第一图像较亮。后续,手机可以根据第一图像和第二图像合成最终的目标图像。For example, when the first target object is the target area 501, the first target object is a part of the sky. In order to prevent the first target object from being overexposed, it is necessary to reduce the amount of incoming light. Therefore, the first target exposure parameter determined by the mobile phone through automatic light metering corresponds to The exposure value is lower. Therefore, as shown in (b) of FIG. 10 , the first image shot with the first target exposure parameter 601 is relatively dark. When the second target object is the target area 502, since the second target object is a part of the person, in order to prevent the second target object from underexposure, it is necessary to increase the amount of incoming light, so the second target exposure parameter determined by the mobile phone through automatic light metering corresponds to The exposure value is high. Therefore, as shown in (c) of FIG. 10 , the first image shot with the second target exposure parameter 602 is brighter. Subsequently, the mobile phone can synthesize the final target image according to the first image and the second image.

在本申请实施例中,手机检测到用户的拍摄操作后拍摄的图像个数与之前步骤中选择的目标对象的个数一致,即与之前步骤中生成的目标曝光参数的个数一致。本申请实施例对拍摄图像的个数不予限定。In the embodiment of the present application, the number of images taken after the mobile phone detects the user's shooting operation is consistent with the number of target objects selected in the previous step, that is, the number of target exposure parameters generated in the previous step. The embodiment of the present application does not limit the number of captured images.

在拍摄过程中,手机连续拍摄多个图像。需要说明的是,这里的连续拍摄是指手机以最快的连拍速度连续拍摄,这个连拍速度是硬件决定的,比如可以是每秒拍几十张。例如,仍以目标对象为两个为例,手机在拍摄过程中连续拍摄第一图像和第二图像,拍摄第一图像和第二图像的拍摄间隔时间较短,该间隔时间可以忽略。因此,可以认为第一图像和第二图像中的对象基本一致。其中,对象基本一致可以理解为,第一图像和第二图像中包含的对象个数、对象内容和对象位置基本一致,从而能够尽量避免之后根据第一图像和第二图像进行图像合成时,由于对象的位置偏移而导致的出现重影、鬼影或模糊等现象。During the shooting process, the mobile phone continuously captures multiple images. It should be noted that the continuous shooting here refers to the continuous shooting of the mobile phone at the fastest continuous shooting speed. This continuous shooting speed is determined by the hardware, for example, it can shoot dozens of pictures per second. For example, still taking two target objects as an example, the mobile phone continuously captures the first image and the second image during the shooting process, and the shooting interval between the first image and the second image is relatively short and can be ignored. Therefore, it can be considered that the objects in the first image and the second image are basically the same. Wherein, the object is basically consistent can be understood as that the number of objects, object content and object position contained in the first image and the second image are basically the same, so that it can be avoided as far as possible when the image synthesis is performed based on the first image and the second image. Ghosting, ghosting, or blurring occurs when the position of an object is shifted.

在一些实施例中,手机还可以通过对第一目标曝光参数和第二目标曝光参数求加权平均值来得到第三目标曝光参数。手机根据该第三目标曝光参数拍摄第三图像并进行存储。也就是说,待合成图像包括第一图像、第二图像和第三图像。后续,手机可以根据第一图像、第二图像和第三图像合成最终的目标图像。需要说明的是,手机可以在检测用户的拍摄操作之前生成该第三目标曝光参数,也可以在检测到用户的拍摄操作之后再生成该第三曝光参数,本申请实施例对手机生成第三目标曝光参数的时机不予限定。In some embodiments, the mobile phone may also obtain the third target exposure parameter by calculating a weighted average of the first target exposure parameter and the second target exposure parameter. The mobile phone captures and stores a third image according to the third target exposure parameter. That is to say, the images to be synthesized include the first image, the second image and the third image. Subsequently, the mobile phone can synthesize the final target image according to the first image, the second image and the third image. It should be noted that the mobile phone may generate the third target exposure parameter before detecting the user's shooting operation, or may generate the third exposure parameter after detecting the user's shooting operation. In the embodiment of the present application, the mobile phone generates the third target exposure parameter The timing of exposure parameters is not limited.

例如,第一目标曝光参数为:光圈F值为1.8、ISO为200、快门时间为1/50秒,第二目标曝光参数为:光圈F值为1.4、ISO为300、快门时间为1/30秒。第一目标曝光参数和第二目标曝光参数对应的权值相等,手机通过对第一目标曝光参数和第二目标曝光参数求加权平均值,可以计算得到第三目标曝光参数。该第三目标曝光参数为:光圈F值为1.6、ISO为250、快门时间为1/40秒。手机根据该第三目标曝光参数拍摄第三图像并进行存储。本申请实施例中的求加权平均值中的权值由用户根据实际需求确定。本申请实施例对权值不予限定,例如第一目标曝光参数和第二目标曝光参数对应的权值可以分别为0.5和0.5,或者分别为0.2和0.8,或者分别为0.4和0.6等。For example, the first target exposure parameter is: the aperture F value is 1.8, the ISO is 200, and the shutter time is 1/50 second, and the second target exposure parameter is: the aperture F value is 1.4, the ISO is 300, and the shutter time is 1/30 Second. The weights corresponding to the first target exposure parameter and the second target exposure parameter are equal, and the mobile phone can calculate the third target exposure parameter by calculating the weighted average value of the first target exposure parameter and the second target exposure parameter. The third target exposure parameters are: the aperture F value is 1.6, the ISO is 250, and the shutter time is 1/40 second. The mobile phone captures and stores a third image according to the third target exposure parameter. The weight in calculating the weighted average value in the embodiment of the present application is determined by the user according to actual needs. The embodiment of the present application does not limit the weights. For example, the weights corresponding to the first target exposure parameter and the second target exposure parameter may be 0.5 and 0.5, or 0.2 and 0.8, or 0.4 and 0.6 respectively.

示例性的,当手机获取上述第三目标曝光参数并拍摄上述第三图像时,手机在拍摄过程中连续拍摄第一图像、第二图像和第三图像。手机拍摄第一图像、第二图像和第三图像时的拍摄间隔可以忽略。因此,可以认为第一图像、第二图像和第三图像中的对象基本一致,对象基本一致意味着第一图像、第二图像和第三图像中包含的对象个数、对象内容和对象位置基本一致,从而能够尽量避免之后根据第一图像、第二图像和第三图像进行图像合成时,由于对象的位置偏移而导致的重影、鬼影或模糊等现象。Exemplarily, when the mobile phone acquires the third target exposure parameter and captures the third image, the mobile phone continuously captures the first image, the second image and the third image during the shooting process. The shooting intervals when the mobile phone shoots the first image, the second image and the third image can be ignored. Therefore, it can be considered that the objects in the first image, the second image, and the third image are basically the same, and the objects are basically the same, which means that the number of objects, object content, and object positions contained in the first image, the second image, and the third image In this way, it is possible to avoid ghosting, ghosting or blurring caused by the positional deviation of the object when compositing images based on the first image, the second image and the third image later.

203、手机根据待合成图像合成目标图像。203. The mobile phone synthesizes the target image according to the image to be synthesized.

在根据目标曝光参数拍摄待合成图像后,手机可以对拍摄的待合成图像进行合成,以生成最终的目标图像。After capturing the images to be combined according to the target exposure parameters, the mobile phone can combine the captured images to be combined to generate a final target image.

在图像合成过程中,手机先对待合成图像分别进行全景分割,得到待合成图像的分割图。其中,全景分割是对图像中包括背景的所有对象进行分割,以区分不同图像上的不同对象。示例性的,如图11所示,某待合成图像的分割图包括被分割的对象1(天空)、对象2(山峰)、对象3(树木)、对象4(人物)和对象5(动物)等。例如,该分割图可以是mask(掩膜)图,不同对象所在的区域可以通过不同颜色进行区分。In the process of image synthesis, the mobile phone performs panorama segmentation on the image to be synthesized first, and obtains a segmentation map of the image to be synthesized. Among them, panorama segmentation is to segment all objects including the background in the image, so as to distinguish different objects on different images. Exemplarily, as shown in FIG. 11 , a segmentation map of an image to be synthesized includes segmented object 1 (sky), object 2 (mountain), object 3 (tree), object 4 (person) and object 5 (animal). Wait. For example, the segmentation map may be a mask (mask) map, and regions where different objects are located may be distinguished by different colors.

手机根据存储的待合成图像得到目标图像的方案可以有多种,以下分别进行说明。There are many schemes for the mobile phone to obtain the target image according to the stored images to be synthesized, which will be described below.

方案一:Option One:

待合成图像包括第一图像、第二图像和第三图像,手机根据存储的第一图像、第二图像和第三图像合成得到目标图像。手机在对第一图像、第二图像和第三图像分别进行全景分割之后,得到对应的第一分割图、第二分割图和第三分割图。手机根据第一目标对象确定第一主体,并根据第二目标对象确定第二主体。The image to be synthesized includes a first image, a second image and a third image, and the mobile phone synthesizes a target image according to the stored first image, second image and third image. After the mobile phone performs panorama segmentation on the first image, the second image and the third image respectively, the corresponding first segmented image, the second segmented image and the third segmented image are obtained. The mobile phone determines the first subject according to the first target object, and determines the second subject according to the second target object.

以根据第一目标对象确定第一主体为例进行说明。若第一目标对象为目标主体,则第一主体为第一目标对象;若第一目标对象为目标区域,则第一主体为该目标区域对应的主体。在一些实施例中,手机可以在预览状态下,在确定第一目标区域后,确定目标区域对应的主体,该主体即为第一主体。其中,目标区域对应的主体为目标区域所在的主体或者目标区域内占比最大的主体等。The description is made by taking the determination of the first subject according to the first target object as an example. If the first target object is the target subject, then the first subject is the first target object; if the first target object is the target area, then the first subject is the subject corresponding to the target area. In some embodiments, the mobile phone may determine the subject corresponding to the target area after determining the first target area in the preview state, and the subject is the first subject. Wherein, the subject corresponding to the target area is the subject where the target area is located or the subject with the largest proportion in the target area.

在另一些实施例中,在预览状态下,手机可以保存目标区域的坐标;在获得待合成图像后,手机可以根据目标区域的坐标确定目标区域对应的主体,该主体即为第一主体。其中,目标区域对应的主体为目标区域所在的主体或者目标区域内占比最大的主体等。In other embodiments, in the preview state, the mobile phone can save the coordinates of the target area; after obtaining the image to be synthesized, the mobile phone can determine the subject corresponding to the target area according to the coordinates of the target area, and the subject is the first subject. Wherein, the subject corresponding to the target area is the subject where the target area is located or the subject with the largest proportion in the target area.

第一图像上的第一主体所在的像素点,第二图像上第二主体所在的像素点,以及第三图像上除第一主体和第二主体以外的其他像素点可以合成目标图像。示例性的,图12中的(a)是以上述第一目标曝光参数601拍摄的第一图像,图12中的(b)是以上述第二目标曝光参数602拍摄的第二图像,图12中的(c)是以上述第三目标曝光参数拍摄的第三图像。手机根据第一分割图中第一主体的位置,提取如图12中的(a)所示的第一图像上该位置的第一主体1201的像素点。手机根据第二分割图中第二主体的位置,提取如图12中的(b)所示的第二图像上该位置的第二主体1202的像素点。手机根据第三分割图上第一主体的位置,将如图12中的(c)所示的第三图像上该位置的第一主体的像素点替换成第一图像上第一主体1201的像素点。手机根据第三分割图上第二主体的位置,将如图12中的(c)所示的第三图像上该位置的第二主体的像素点替换成第二图像上第二主体1202的像素点。手机保留如图12中的(c)所示的第三图像上除第一主体和第二主体以外的部分的像素点,从而合成得到目标图像。也就是说,目标图像是在第三图像中,将第一主体的像素点和第二主体的像素点分别由第一图像的第一主体的像素点和第二图像的第二主体的像素点替换而形成的图像。The target image may be synthesized by the pixels of the first subject on the first image, the pixels of the second subject on the second image, and other pixels on the third image except for the first subject and the second subject. Exemplarily, (a) in FIG. 12 is the first image taken by the above-mentioned first target exposure parameter 601, (b) in FIG. 12 is the second image taken by the above-mentioned second target exposure parameter 602, and FIG. 12 (c) in (c) is the third image taken with the above-mentioned third target exposure parameters. According to the position of the first subject in the first segmented image, the mobile phone extracts the pixel points of the first subject 1201 at the position on the first image as shown in (a) of FIG. 12 . According to the position of the second subject in the second segmented image, the mobile phone extracts the pixel points of the second subject 1202 at the position on the second image as shown in (b) of FIG. 12 . According to the position of the first subject on the third segmentation map, the mobile phone replaces the pixels of the first subject at this position on the third image as shown in (c) in Figure 12 with the pixels of the first subject 1201 on the first image point. According to the position of the second subject on the third segmentation map, the mobile phone replaces the pixel of the second subject at this position on the third image as shown in (c) in FIG. 12 with the pixel of the second subject 1202 on the second image point. The mobile phone retains the pixels on the third image except for the first subject and the second subject as shown in (c) of FIG. 12 , so as to synthesize the target image. That is to say, in the target image, in the third image, the pixels of the first subject and the pixels of the second subject are respectively divided by the pixels of the first subject of the first image and the pixels of the second subject of the second image The image formed by the replacement.

需要说明的是,若之前用户选择的目标对象为目标区域,而目标区域是某个主体的一部分,则替换整个主体的像素点而不是仅替换目标区域内的像素点。这样,能够避免出现由于同一主体中不同区域曝光严重不同而造成的图像撕裂或图像模糊的问题,使得最终合成的目标图像更加自然。并且,一般情况下,同一主体不同区域内的反光情况和曝光情况类似,因此,之前选择的目标区域内的目标曝光参数可以应用于整个主体,合成图像时可以替换整个主体。It should be noted that if the target object selected by the user before is the target area, and the target area is a part of a certain subject, the pixels of the entire subject are replaced instead of only the pixels in the target area. In this way, the problem of image tearing or image blur caused by severe differences in exposure of different areas in the same subject can be avoided, making the final composite target image more natural. Moreover, in general, the reflection and exposure conditions in different areas of the same subject are similar, so the target exposure parameters in the previously selected target area can be applied to the entire subject, and the entire subject can be replaced when compositing images.

也就是说,目标图像上第一目标对象对应的第一主体的像素值与第一图像上第一主体的像素值相同。目标图像上第二目标对象对应的第二主体的像素值与第二图像上第二主体的像素值相同。目标图像上除第一主体和第二主体以外的其他像素点的像素值,与第三图像上对应像素点的像素值相同。That is to say, the pixel value of the first subject corresponding to the first target object on the target image is the same as the pixel value of the first subject on the first image. The pixel value of the second subject corresponding to the second target object on the target image is the same as the pixel value of the second subject on the second image. Pixel values of other pixel points on the target image except the first subject and the second subject are the same as pixel values of corresponding pixel points on the third image.

其中,为了保证合成的图像效果更为自然,在图像合成过程中,手机对替换的第一主体和替换的第二主体的边缘进行平滑过渡的处理。示例性的,在一种平滑过渡处理中,手机将第三图像上的第一主体的像素点替换成第一图像上的第一主体的像素点时,可以从第三图像上替换的第一主体的边缘位置向外平滑9个像素点,该9个像素点的像素值可以根据边缘位置在替换的第一图像上第一主体的像素值及该边缘位置在第三图像上原始像素值依次调整。例如,对于目标图像上第一主体的某边缘位置A,该位置A在第一图像上沿某一方向朝第一主体以外辐射的相邻9个像素点的像素值依次为a1,a2,a3,a4,a5,a6,a7,a8和a9;该位置A在第三图像上沿同一方向朝第一主体以外辐射的相邻9个像素点的像素值依次为b1,b2,b3,b4,b5,b6,b7,b8和b9。这样,该位置A在目标图像上沿同一方向朝第一主体以外辐射的相邻9个像素点融合后的像素值依次为:0.9*a1+0.1*b1,0.8*a2+0.2*b2,0.7*a3+0.3*b3,0.6*a4+0.4*b4,0.5*a5+0.5*b5,0.4*a6+0.6*b6,0.3*a7+0.7*b7,0.2*a8+0.8*b8,以及0.1*a9+0.9*b9。这样,目标图像上靠近第一主体的位置的亮度趋近于第一图像上第一主体的亮度,目标图像上远离第一主体的位置的亮度趋近于第三图像的亮度,可以使得替换后的第一图像的部分对第三图像上未替换部分的亮度影响由内到外自然淡化。Wherein, in order to ensure that the synthesized image effect is more natural, during the image synthesis process, the mobile phone performs smooth transition processing on the edges of the replaced first subject and the replaced second subject. Exemplarily, in a smooth transition process, when the mobile phone replaces the pixels of the first subject on the third image with the pixels of the first subject on the first image, the replaced first The edge position of the subject is smoothed outward by 9 pixels, and the pixel values of the 9 pixel points can be sequentially based on the pixel value of the first subject on the replaced first image of the edge position and the original pixel value of the edge position on the third image Adjustment. For example, for a certain edge position A of the first subject on the target image, the pixel values of the adjacent 9 pixel points of the position A that radiate away from the first subject along a certain direction on the first image are a1, a2, a3 in sequence , a4, a5, a6, a7, a8, and a9; the pixel values of the 9 adjacent pixel points of position A radiating toward the outside of the first subject along the same direction on the third image are b1, b2, b3, b4 in sequence, b5, b6, b7, b8 and b9. In this way, the fused pixel values of the 9 adjacent pixels of position A radiating toward the outside of the first subject in the same direction on the target image are: 0.9*a1+0.1*b1, 0.8*a2+0.2*b2, 0.7 *a3+0.3*b3, 0.6*a4+0.4*b4, 0.5*a5+0.5*b5, 0.4*a6+0.6*b6, 0.3*a7+0.7*b7, 0.2*a8+0.8*b8, and 0.1* a9+0.9*b9. In this way, the brightness of the position close to the first subject on the target image tends to the brightness of the first subject on the first image, and the brightness of the position far away from the first subject on the target image approaches the brightness of the third image, so that after replacement The influence of the part of the first image on the brightness of the non-replaced part of the third image is naturally faded from the inside to the outside.

需要注意的是,平滑过渡处理中,替换的主体的边缘向外平滑的像素点个数不予限定。一般情况下,替换的主体的区域面积越大,向外平滑的像素点个数越多,以使得平滑过渡更加自然。此外,平滑过渡处理中,向外平滑的像素点的像素值是依次渐变的即可,向外平滑的像素点的像素值的方式不予限定。It should be noted that, in the smooth transition process, the number of pixels for which the edge of the replaced subject is smoothed outward is not limited. Generally, the larger the area of the subject to be replaced, the larger the number of outward smoothing pixels, so as to make the smooth transition more natural. In addition, in the smooth transition process, it is enough that the pixel values of the outwardly smoothed pixel points gradually change gradually, and the manner of the pixel values of the outwardly smoothed pixel points is not limited.

方案二:Option II:

待合成图像包括第一图像和第二图像,手机根据存储的第一图像和第二图像合成得到目标图像。手机在对第一图像和第二图像分别进行全景分割之后,得到对应的第一分割图和第二分割图。手机根据第一目标对象确定第一主体,并根据第二目标对象确定第二主体。The image to be synthesized includes a first image and a second image, and the mobile phone synthesizes the stored first image and the second image to obtain a target image. After the mobile phone performs panorama segmentation on the first image and the second image respectively, a corresponding first segmented image and a second segmented image are obtained. The mobile phone determines the first subject according to the first target object, and determines the second subject according to the second target object.

示例性的,图13中的(a)是以上述第一目标曝光参数601拍摄的第一图像,图13中的(b)是以上述第二目标曝光参数602拍摄的第二图像。在一些实施例中,手机根据第一分割图中的第一主体的位置,提取如图13中的(a)所示的第一图像上第一主体1301的像素点。手机根据第二分割图上第一主体的位置,将如图13中的(b)所示的第二图像上第一主体的像素点替换成如图13中的(a)所示的第一图像上第一主体1301的像素点。手机保留第二图像上第二主体1302位置处的像素点。手机对第一图像和第二图像中除第一主体和第二主体外的部分进行配准。之后,手机将第二图像上除第一主体和第二主体之外的像素点的像素值,设置为配准后的第一图像和第二图像上除第一主体和第二主体之外的像素点的像素值的加权平均值,从而获得的第二图像即为目标图像。示例性的,该目标图像可以参见如图13中的(c)所示的示意图。需要说明的是,这里加权系数可以根据需求任意限定,本申请实施例对此不作限定。Exemplarily, (a) in FIG. 13 is a first image captured by the first target exposure parameter 601 , and (b) in FIG. 13 is a second image captured by the second target exposure parameter 602 . In some embodiments, the mobile phone extracts the pixel points of the first subject 1301 on the first image as shown in (a) in FIG. 13 according to the position of the first subject in the first segmented image. According to the position of the first subject on the second segmentation map, the mobile phone replaces the pixels of the first subject on the second image shown in (b) in FIG. 13 with the first subject shown in (a) in FIG. 13 Pixels of the first subject 1301 on the image. The mobile phone reserves the pixel points at the position of the second subject 1302 on the second image. The mobile phone registers parts of the first image and the second image except the first subject and the second subject. Afterwards, the mobile phone sets the pixel values of the pixel points on the second image except the first subject and the second subject as the pixel values of the registered first image and the second image except the first subject and the second subject. The weighted average of the pixel values of the pixels, so that the obtained second image is the target image. Exemplarily, the target image may refer to the schematic diagram shown in (c) in FIG. 13 . It should be noted that here, the weighting coefficient may be arbitrarily defined according to requirements, which is not limited in this embodiment of the present application.

也就是说,目标图像上第一主体的像素值与第一图像上第一主体的像素值相同,目标图像上第二主体的像素值与第二图像上第二主体的像素值相同,目标图像上除第一主体和第二主体之外的其他像素点的像素值为配准后的第一图像和第二图像上对应像素点的像素值的加权平均值。That is, the pixel value of the first subject on the target image is the same as the pixel value of the first subject on the first image, the pixel value of the second subject on the target image is the same as the pixel value of the second subject on the second image, and the target image The pixel values of other pixel points except the first subject and the second subject are the weighted average of the pixel values of the corresponding pixel points on the registered first image and the second image.

可以理解的是,手机也可以根据第二分割图中的第二主体的位置,提取第二图像上第二主体的像素点。手机根据第一分割图上第二主体的位置,将第一图像上第二主体的像素点替换成第二图像上第二主体的像素点。手机保留第一图像上第一主体位置处的像素点。手机对第一图像和第二图像中除第一主体和第二主体外的部分进行配准。之后,手机将第一图像上除第一主体和第二主体之外的像素点的像素值,设置为配准后的第一图像和第二图像上除第一主体和第二主体之外的对应像素点的像素值的加权平均值,从而获得的第一图像即为目标图像。需要说明的是,这里加权系数可以根据需求任意限定,本申请实施例对此不作限定。也就是说,目标图像上第一主体的像素点来自第一图像上的第一主体,目标图像上第二主体的像素点来自第二图像上的第二主体,目标图像上其他像素点的像素值为配准后的第一图像和第二图像上对应像素点的像素值的加权平均值。It can be understood that the mobile phone may also extract pixels of the second subject on the second image according to the position of the second subject in the second segmented image. The mobile phone replaces the pixels of the second subject on the first image with the pixels of the second subject on the second image according to the position of the second subject on the first segmented image. The mobile phone reserves the pixels at the position of the first subject on the first image. The mobile phone registers parts of the first image and the second image except the first subject and the second subject. After that, the mobile phone sets the pixel values of the pixel points on the first image except the first subject and the second subject as the pixel values of the registered first image and the second image except the first subject and the second subject. The weighted average of the pixel values corresponding to the pixel points, so that the first image obtained is the target image. It should be noted that here, the weighting coefficient may be arbitrarily defined according to requirements, which is not limited in this embodiment of the present application. That is to say, the pixels of the first subject on the target image come from the first subject on the first image, the pixels of the second subject on the target image come from the second subject on the second image, and the pixels of other pixels on the target image The value is the weighted average of the pixel values of the corresponding pixel points on the registered first image and the second image.

同样,为了保证合成的图像效果更为自然,在图像合成过程中,手机可以对替换的第一主体的边缘进行平滑过渡处理。平滑过渡处理的具体方式与方案一中相似,这里不再赘述。Similarly, in order to ensure that the synthesized image effect is more natural, during the image synthesis process, the mobile phone may perform smooth transition processing on the edge of the replaced first subject. The specific manner of the smooth transition processing is similar to that in the first solution, and will not be repeated here.

对比方案一和方案二,可以看出,方案一相对于方案二的优势在于:对于第一主体和第二主体以外的部分,目标图像保留了第三图像中的原始像素,即第一主体和第二主体以外的部分是根据第一目标曝光参数和第二目标曝光参数的加权平均值获取的第三目标曝光参数采集的第三图像中的像素。由于用户想要调整曝光参数的目标对象通常为图像中过亮或者过暗的部分,因此根据目标对象对应的目标曝光参数获得的整个待合成图像可能也是过曝或者欠曝的,从而导致待合成图像中丢失了部分图像细节。这样,在之后图像合成的过程中,对已丢失部分图像细节的待合成图像中的像素值求加权平均值得到的目标图像,可能会丢失更多的图像细节。因而,对于第一主体和第二主体以外的部分,与采用第一图像中的像素值和第二图像中的像素值的加权平均值相比,直接保留第三图像上的原始像素,可以使得目标图像能够反映出当前拍摄场景中待拍摄对象的更多细节,使得目标图像的动态范围更大。Comparing Scheme 1 and Scheme 2, it can be seen that the advantage of Scheme 1 over Scheme 2 is: for the parts other than the first subject and the second subject, the target image retains the original pixels in the third image, that is, the first subject and the second subject The part other than the second subject is a pixel in the third image captured by the third target exposure parameter obtained according to the weighted average value of the first target exposure parameter and the second target exposure parameter. Since the target object that the user wants to adjust the exposure parameters is usually the part of the image that is too bright or too dark, the entire image to be synthesized obtained according to the target exposure parameters corresponding to the target object may also be overexposed or underexposed, resulting in the Some image details are lost in the image. In this way, in the subsequent process of image synthesis, more image details may be lost in the target image obtained by calculating the weighted average of the pixel values in the image to be synthesized that have lost some image details. Therefore, for parts other than the first subject and the second subject, compared with using the weighted average of the pixel values in the first image and the pixel values in the second image, directly retaining the original pixels on the third image can make The target image can reflect more details of the object to be photographed in the current shooting scene, so that the dynamic range of the target image is larger.

方案二相对于方案一的优势在于:方案二中只需要拍摄两张待合成图像,拍摄所需的时间较短,而方案一中需要拍摄三张图像,拍摄所需的时间较长。拍摄时间越短,待拍摄对象越不容易移动。因此,方案二能够更好地避免待拍摄对象移动导致的主体不匹配造成的图像重影或图像模糊等问题。The advantage of Scheme 2 over Scheme 1 is that in Scheme 2, only two images to be synthesized need to be captured, and the time required for shooting is relatively short, while in Scheme 1, three images need to be captured, and the time required for shooting is relatively long. The shorter the shooting time, the less likely the subject to be photographed will move. Therefore, the second solution can better avoid problems such as image ghosting or image blur caused by the mismatch of the subject caused by the movement of the subject to be photographed.

在本申请的一些实施例中,手机检测到用户的拍摄操作后,可以依次显示根据各目标曝光参数拍摄获得的待合成图像以及最终的目标图像。手机通过显示根据第一目标曝光参数拍摄的第一图像、根据第二目标曝光参数拍摄的第二图像,以及最终合成的目标图像,可以方便用户通过对比直观地看出第一图像和第二图像存在过曝或欠曝现象,效果较差;而最终合成的目标图像的效果较好。本申请的实施例提供的拍摄方法,能够在拍摄的取景阶段中,由用户根据个人需求或意愿,为图像中用户感兴趣的主体设置合适的目标曝光参数,从而根据目标曝光参数拍摄待合成图像,使得根据待合成图像合成的目标图像更能符合用户的意愿或期许,满足用户个性化拍摄需求,还可以提高合成图像的画质,使得拍摄获得的图像更加自然,提升用户体验。In some embodiments of the present application, after the mobile phone detects the user's shooting operation, it may sequentially display the images to be synthesized and the final target image obtained by shooting according to each target exposure parameter. By displaying the first image taken according to the first target exposure parameter, the second image taken according to the second target exposure parameter, and the final composite target image, the mobile phone can facilitate the user to intuitively see the first image and the second image through comparison. There is overexposure or underexposure, and the effect is poor; while the effect of the final composite target image is better. The shooting method provided by the embodiments of the present application can allow the user to set appropriate target exposure parameters for the subject of interest in the image according to the user's personal needs or wishes during the framing stage of shooting, so as to shoot the image to be synthesized according to the target exposure parameters , so that the target image synthesized according to the image to be synthesized can better meet the user's wishes or expectations, meet the user's personalized shooting needs, and can also improve the quality of the synthesized image, making the image obtained by shooting more natural, and improving user experience.

在本申请的另一些实施例中,手机检测到用户的拍摄操作后,可以不显示根据各目标曝光参数拍摄获得的待合成图像,而直接显示最终的目标图像。In other embodiments of the present application, after the mobile phone detects the user's shooting operation, it may not display the images to be synthesized and obtained according to the target exposure parameters, but directly display the final target image.

在一些实施例中,由于手机根据待合成图像生成目标图像需要一定的合成处理时间,因而可以在目标图像的合成处理过程中提示用户“正在处理”、“正在合成”或显示一个正在转动的圈等信息,以方便用户获知并不是手机出现了卡顿或故障等情况。In some embodiments, since the mobile phone needs a certain synthesis processing time to generate the target image based on the images to be synthesized, the user may be prompted to "processing" or "compositing" or display a rotating circle during the synthesis process of the target image. and other information, so that the user can know that the mobile phone is not stuck or malfunctioning.

综上所示,与现有技术相比,本申请实施例中的拍摄方法具有以下有益效果:In summary, compared with the prior art, the shooting method in the embodiment of the present application has the following beneficial effects:

第一,在本申请实施例中,最终合成的目标图像中除第一主体和第二主体之外的部分的像素值,是根据第三目标曝光参数拍摄的图像中对应部分的像素值,第三目标曝光参数是根据第一目标曝光参数和第二目标曝光参数加权平均求得,而不是仅对像素值求加权平均值。因此,通过本申请实施例的拍摄方法获得的目标图像能够保留拍摄对象中更多的细节。First, in the embodiment of the present application, the pixel values of the part other than the first subject and the second subject in the final composite target image are the pixel values of the corresponding part in the image captured according to the third target exposure parameter. The three target exposure parameters are calculated according to the weighted average of the first target exposure parameter and the second target exposure parameter, instead of only calculating the weighted average of the pixel values. Therefore, the target image obtained through the shooting method of the embodiment of the present application can retain more details in the shooting object.

在一种现有HDR拍摄技术中,手机拍摄时先进行全局测光,假设测光得到的曝光值为EV,则根据+1EV拍摄第一图像,根据-1EV拍摄第二图像,根据EV拍摄第三图像。根据这三张图像合成最终图像。由于根据-1EV拍摄的第二图像可能部分欠曝,从而缺失图像中的很多细节;根据+1EV拍摄的第一图像可能部分过曝,同样也可能缺失图像中的很多细节。将两个缺失细节的图像的像素进行加权平均从而得到目标图像,可能缺失更多的细节,甚至导致图像模糊。而本申请实施例中在某个待合成图像上将用户感兴趣的一个或多个主体的像素直接替换为另一待合成图像上的像素,可以保留更多的细节,使得图像更加清晰,提高动态范围。In an existing HDR shooting technology, the mobile phone performs global photometry first when shooting. Assuming that the exposure value obtained by photometry is EV, the first image is shot according to +1EV, the second image is shot according to -1EV, and the second image is shot according to EV. Three images. Composite the final image from these three images. Because the second image taken according to -1EV may be partially underexposed, thus missing many details in the image; the first image taken according to +1EV may be partially overexposed, and also may lose many details in the image. The target image is obtained by weighting the pixels of the two images with missing details, which may lack more details and even cause the image to be blurred. However, in the embodiment of the present application, on a certain image to be synthesized, the pixels of one or more subjects that the user is interested in are directly replaced with pixels on another image to be synthesized, so that more details can be preserved, making the image clearer and improving Dynamic Range.

并且,现有HDR拍摄技术中采用像素值加权获得最终图像的像素值。目标图像中同一主体中不同区域的像素可能来自不同的图像,同一主体中相邻区域的像素可能来自不同的图像,从而可能使得同一主体中不同区域的像素被割裂。同一主体中不同区域(比如相邻区域)的亮度差异较大,从而导致合成的目标图像不自然,图像效果较差。Moreover, in the existing HDR shooting technology, pixel value weighting is used to obtain the pixel value of the final image. Pixels in different regions of the same subject in the target image may come from different images, and pixels in adjacent regions in the same subject may come from different images, which may result in the segmentation of pixels in different regions in the same subject. Different areas (such as adjacent areas) in the same subject have large brightness differences, resulting in unnatural synthetic target images and poor image effects.

在另一种现有技术中,手机通过全局测光获得预览图像,根据像素值的大小将图像的像素点划分为亮度较高的第一像素集合和亮度较低的第二像素集合。用户可以分别调整第一像素集合和第二像素集合分别对应的第一目标曝光参数和第二目标曝光参数。最终图像中第一像素集合采用第一目标曝光参数获得,第二像素集合采用第二目标曝光参数获得。其中,每个像素集合中的像素值可能是分散的,而不是完全集中分布的。这样,最终图像上,同一主体中或相邻区域内的不同像素值可能属于不同的像素集合,因而采用不同的目标曝光参数获得,同一主体的不同区域的像素值可能相差较大,从而使得同一主体中不同区域的像素被割裂,同一主体中不同区域(比如相邻区域)的亮度差异较大,导致合成的目标图像不自然,图像效果较差。而本申请实施例中是针对目标主体进行像素替换,避免了现有技术中可能存在的图像割裂问题。In another prior art, the mobile phone obtains a preview image through global metering, and divides the pixels of the image into a first set of pixels with higher brightness and a second set of pixels with lower brightness according to the magnitude of the pixel value. The user can respectively adjust the first target exposure parameter and the second target exposure parameter respectively corresponding to the first pixel set and the second pixel set. In the final image, the first set of pixels is obtained by using the first target exposure parameter, and the second set of pixels is obtained by using the second target exposure parameter. Wherein, the pixel values in each pixel set may be scattered rather than completely concentrated. In this way, on the final image, different pixel values in the same subject or in adjacent regions may belong to different pixel sets, and thus obtained by using different target exposure parameters, and the pixel values in different regions of the same subject may be quite different, so that the same The pixels in different regions of the subject are fragmented, and the brightness of different regions (such as adjacent regions) in the same subject has a large difference in brightness, resulting in an unnatural and poor image effect in the synthesized target image. However, in the embodiment of the present application, pixel replacement is performed for the target subject, which avoids the problem of image segmentation that may exist in the prior art.

第二,本申请实施例中,目标曝光参数是根据用户选择的目标对象确定的,是符合用户的意愿或期许。这样,根据目标曝光参数获得的待合成图像最终合成的目标图像能够更符合用户的意愿或期许,满足用户个性化拍摄需求,从而提升用户拍摄体验。Second, in the embodiment of the present application, the target exposure parameter is determined according to the target object selected by the user, which is in line with the user's wish or expectation. In this way, the final synthesized target image of the images to be synthesized obtained according to the target exposure parameters can be more in line with the wishes or expectations of the user and meet the user's personalized shooting needs, thereby improving the user's shooting experience.

现有HDR拍摄技术中图像各个部分的曝光度完全是手机自动生成,不能人为选择,因此不一定符合用户的期望,还可能出现严重失真。例如,在正常视觉效应下可能确实是比较暗的部分,手机自动调整为较亮,不符合视觉效应,导致图像出现失真。而本申请实施例中,可以由用户人为调节或设置曝光参数,从而使得最终目标图像符合用户的期许或意愿,提高画质,使图像更加自然。The exposure of each part of the image in the existing HDR shooting technology is completely automatically generated by the mobile phone and cannot be selected manually, so it may not meet the user's expectations, and serious distortion may occur. For example, under normal visual effects, it may indeed be a relatively dark part, but the mobile phone automatically adjusts it to be brighter, which does not meet the visual effects, resulting in image distortion. However, in the embodiment of the present application, the exposure parameters can be manually adjusted or set by the user, so that the final target image conforms to the user's expectations or wishes, improves the image quality, and makes the image more natural.

第三,本申请实施例中,手机检测到用户的拍摄操作后,自动拍摄合成出目标图像,一次成片,无需后期调节。简化了用户后期处理图像的难度。Third, in the embodiment of the present application, after the mobile phone detects the user's shooting operation, it automatically shoots and synthesizes the target image, and forms a piece at one time without post-adjustment. It simplifies the difficulty of post-processing images for users.

在一些现有技术中,往往还需要用户对图像进行后期处理,才能获得符合用户期许或意愿的目标图像。图像后期处理繁琐,难度较高。而本申请实施例中,手机检测到用户的拍摄操作后,自动拍摄合成出目标图像,一次成片,无需后期调节。简化了用户后期处理图像的难度。In some existing technologies, the user often needs to perform post-processing on the image in order to obtain a target image that meets the user's expectations or wishes. Image post-processing is cumbersome and difficult. However, in the embodiment of the present application, after the mobile phone detects the user's shooting operation, it automatically shoots and synthesizes the target image, and forms a piece at one time without post-adjustment. It simplifies the difficulty of post-processing images for users.

以上是以用户选择了两个目标对象为例进行说明的,用户还可以选择两个以上的N个区域。该种情况下,手机根据用户选择的N个目标对象生成对应的N个目标曝光参数,并采用N个目标曝光参数获取N个待合成图像,从而根据N个待合成图像生成最终的目标图像。或者,手机可以根据N个目标曝光参数确定第N+1个曝光参数,从而根据N+1个曝光参数获取N+1个待合成图像,从而根据N+1个待合成图像生成最终的目标图像。The above is described by taking the user selecting two target objects as an example, and the user may also select more than two N areas. In this case, the mobile phone generates N target exposure parameters corresponding to the N target objects selected by the user, and uses the N target exposure parameters to obtain N images to be synthesized, so as to generate a final target image based on the N images to be synthesized. Alternatively, the mobile phone may determine the N+1th exposure parameter according to the N target exposure parameters, thereby obtaining N+1 images to be synthesized according to the N+1 exposure parameters, thereby generating the final target image based on the N+1 images to be synthesized .

在本申请实施例提供的拍摄方法中,手机可以根据用户的意愿,确定不同的目标主体对应的目标曝光参数,并根据目标曝光参数获得待合成图像。在图像合成时,以主体为单位对待合成图像中的像素进行替换,从而可以灵活地调整目标图像上不同主体的曝光程度。In the shooting method provided in the embodiment of the present application, the mobile phone may determine target exposure parameters corresponding to different target subjects according to the user's wishes, and obtain an image to be synthesized according to the target exposure parameters. During image synthesis, the pixels in the image to be synthesized are replaced in units of subject, so that the exposure of different subjects on the target image can be flexibly adjusted.

以上实施例描述的图像合成过程是以主体为单位进行像素替换的。在其他一些实施例中,还可以以区域为单位进行像素替换。例如,当用户想要调节某个目标区域的曝光度时,可以选择该目标区域,手机通过自动测光生成该目标区域对应的曝光参数。之后,手机根据生成的曝光参数拍摄待合成图像,在合成目标图像时,仅替换待合成图像上目标区域内的像素值,而不替换目标区域对应的主体的像素值。这样,手机可以根据用户的意愿,灵活地调整目标图像上不同区域的曝光程度。在同一个主体中具有明暗差异时,用户能够通过选择区域,仅替换该主体中的一部分的像素值,从而满足用户更细粒度的曝光调整需求和更高的拍摄需求。The image synthesis process described in the above embodiments is based on pixel replacement in units of subjects. In some other embodiments, pixel replacement may also be performed in units of regions. For example, when the user wants to adjust the exposure of a certain target area, the target area can be selected, and the mobile phone generates exposure parameters corresponding to the target area through automatic light metering. Afterwards, the mobile phone shoots the image to be synthesized according to the generated exposure parameters, and when synthesizing the target image, only the pixel values in the target area on the image to be synthesized are replaced, and the pixel values of the subject corresponding to the target area are not replaced. In this way, the mobile phone can flexibly adjust the exposure of different areas on the target image according to the user's wishes. When there is a difference between light and shade in the same subject, the user can select an area to replace only a part of the pixel values in the subject, so as to meet the user's finer-grained exposure adjustment needs and higher shooting needs.

在其他一些实施例中,图像上的被拍摄对象可以包括多个部件,例如人可以包括头、身体、胳膊、手、腿和脚等部件。手机还可以对采集到的图像进行部件分割,从而划分出不同部件所在的区域。手机还可以以部件为单位进行像素替换。例如,目标对象可以是目标部件。当用户想要调节某个部件的曝光度时,可以选择该目标部件或该部件所在的目标区域,手机可以自动测光生成该目标部件对应的曝光参数。之后,手机根据生成的曝光参数拍摄待合成图像,在合成目标图像时,仅替换待合成图像上该目标部件内的像素值。这样,手机可以根据用户的意愿,灵活地调整目标图像上不同部件的曝光程度。In some other embodiments, the photographed object on the image may include multiple parts, for example, a person may include parts such as head, body, arms, hands, legs, and feet. The mobile phone can also perform component segmentation on the collected images, thereby demarcating the areas where different components are located. The mobile phone can also perform pixel replacement in units of components. For example, a target object may be a target component. When the user wants to adjust the exposure of a certain component, he can select the target component or the target area where the component is located, and the mobile phone can automatically measure light to generate the exposure parameters corresponding to the target component. Afterwards, the mobile phone shoots the image to be synthesized according to the generated exposure parameters, and only replaces the pixel values in the target part on the image to be synthesized when synthesizing the target image. In this way, the mobile phone can flexibly adjust the exposure of different components on the target image according to the user's wishes.

在其他一些实施例中,手机在保存最终合成的目标图像的同时,还可以保存上述待合成图像。比如,手机可以保存一个图像序列,包括在专业HRR模式的拍摄过程中依次获得的待合成图像和目标图像。手机可以响应于用户的操作,依次播放该图像序列中的图像。In some other embodiments, the mobile phone may also save the image to be synthesized while saving the final synthesized target image. For example, the mobile phone can save an image sequence, including the image to be synthesized and the target image sequentially obtained during the shooting process of the professional HRR mode. The mobile phone can play the images in the image sequence sequentially in response to the user's operation.

还需要说明的是,以上是以电子设备为手机为例进行说明的,当电子设备为其他具有拍摄功能的设备(例如平板电脑、可穿戴设备、AR/VR设备或者相机设备,)时,同样可以采用本申请实施例提供的拍摄方法进行图像合成从而生成目标图像,这里不再赘述。It should also be noted that the above is an example of an electronic device as a mobile phone. When the electronic device is another device with a shooting function (such as a tablet computer, a wearable device, an AR/VR device, or a camera device), the same The shooting method provided in the embodiment of the present application may be used to perform image synthesis to generate a target image, which will not be repeated here.

可以理解的是,为了实现上述功能,电子设备包含了执行各个功能相应的硬件和/或软件模块。结合本文中所公开的实施例描述的各示例的算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以结合实施例对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。It can be understood that, in order to realize the above functions, the electronic device includes hardware and/or software modules corresponding to each function. Combining the algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. 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 in combination with the embodiments for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.

本实施例可以根据上述方法示例对电子设备进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块可以采用硬件的形式实现。需要说明的是,本实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In this embodiment, the functional modules of the electronic device may be divided 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 integrated modules may be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic, and is only a logical function division, and there may be other division methods in actual implementation.

例如,在一种划分方式中,参见图14,电子设备1400包括模式确定模块1401、参数获取模块1402、图像获取模块1403、图像分割模块1404和图像合成模块1405。其中,模式确定模块用于根据用户指示进入专业HDR模式的操作确定进入专业HDR模式,或者根据用户选择目标对象的操作确定进入专业HDR模式。参数获取模块用于在专业HDR模式下根据用户指示的目标对象获取各目标曝光参数。图像获取模块用于在专业HDR模式下,根据参数获取模块获取的目标曝光参数拍摄待合成图像。图像分割模块用于对待合成图像或者预览图像进行全景分割,以区别出不同对象所在的图像区域,例如确定出目标对象对应的主体所在的图像区域。图像合成模块用于通过对目标对象对应的主体所在的图像区域进行像素替换,将待合成图像合成为最终的目标图像。For example, in one division mode, referring to FIG. 14 , the electronic device 1400 includes a mode determination module 1401 , a parameter acquisition module 1402 , an image acquisition module 1403 , an image segmentation module 1404 and an image synthesis module 1405 . Wherein, the mode determination module is configured to determine to enter the professional HDR mode according to the user's instruction to enter the professional HDR mode, or to determine to enter the professional HDR mode according to the user's operation of selecting a target object. The parameter obtaining module is used to obtain various target exposure parameters according to the target object indicated by the user in the professional HDR mode. The image acquisition module is used to shoot the image to be synthesized according to the target exposure parameters acquired by the parameter acquisition module in the professional HDR mode. The image segmentation module is used for panoramic segmentation of the image to be synthesized or the preview image, so as to distinguish the image areas where different objects are located, for example, determine the image area where the subject corresponding to the target object is located. The image synthesis module is used to synthesize the image to be synthesized into a final target image by performing pixel replacement on the image area where the subject corresponding to the target object is located.

本申请实施例还提供一种电子设备,包括一个或多个处理器以及一个或多个存储器。该一个或多个存储器与一个或多个处理器耦合,一个或多个存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当一个或多个处理器执行计算机指令时,使得电子设备执行上述相关方法步骤实现上述实施例中的拍摄方法。The embodiment of the present application also provides an electronic device, including one or more processors and one or more memories. The one or more memories are coupled with one or more processors, the one or more memories are used to store computer program codes, the computer program codes include computer instructions, and when the one or more processors execute the computer instructions, the electronic device performs The above related method steps implement the photographing method in the above embodiment.

本申请的实施例还提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机指令,当该计算机指令在电子设备上运行时,使得电子设备执行上述相关方法步骤实现上述实施例中的拍摄方法。Embodiments of the present application also provide a computer-readable storage medium, where computer instructions are stored in the computer-readable storage medium, and when the computer instructions are run on the electronic device, the electronic device executes the above-mentioned related method steps to realize the above-mentioned embodiment shooting method in .

本申请的实施例还提供了一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述相关步骤,以实现上述实施例中电子设备执行的拍摄方法。Embodiments of the present application also provide a computer program product, which, when running on a computer, causes the computer to execute the above-mentioned related steps, so as to implement the photographing method performed by the electronic device in the above-mentioned embodiments.

另外,本申请的实施例还提供一种装置,这个装置具体可以是芯片,组件或模块,该装置可包括相连的处理器和存储器;其中,存储器用于存储计算机执行指令,当装置运行时,处理器可执行存储器存储的计算机执行指令,以使芯片执行上述各方法实施例中电子设备执行的拍摄方法。In addition, an embodiment of the present application also provides a device, which may specifically be a chip, a component or a module, and the device may include a connected processor and a memory; wherein the memory is used to store computer-executable instructions, and when the device is running, The processor can execute the computer-executable instructions stored in the memory, so that the chip executes the photographing method performed by the electronic device in the above method embodiments.

其中,本实施例提供的电子设备、计算机可读存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。Wherein, the electronic device, computer-readable storage medium, computer program product or chip provided in this embodiment is all used to execute the corresponding method provided above, therefore, the beneficial effects it can achieve can refer to the above-mentioned The beneficial effects of the corresponding method will not be repeated here.

通过以上实施方式的描述,所属领域的技术人员可以了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。Through the description of the above embodiments, those skilled in the art can understand that for the convenience and brevity of the description, only the division of the above functional modules is used as an example for illustration. In practical applications, the above functions can be assigned by different Completion of functional modules means that the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.

在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be Incorporation or may be integrated into another device, or some features may be omitted, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.

所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The unit described as a separate component may or may not be physically separated, and the component displayed as a unit may be one physical unit or multiple physical units, that is, it may be located in one place, or may be distributed to multiple different places . Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the software product is stored in a storage medium Among them, several instructions are included to make a device (which may be a single-chip microcomputer, a chip, etc.) or a processor (processor) execute all or part of the steps of the methods described in the various embodiments of the present application. The above-mentioned storage medium includes: U disk, mobile hard disk, read only memory (read only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disk, and other various media that can store program codes.

以上内容,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above content is only the specific implementation of the application, but the scope of protection of the application is not limited thereto. Anyone familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the application, and should covered within the scope of protection of this application. Therefore, the protection scope of the present application should be determined by the protection scope of the claims.

Claims (18)

1.一种拍摄方法,其特征在于,包括:1. A shooting method, characterized in that, comprising: 电子设备进入相机应用的目标拍摄模式,并显示预览界面;The electronic device enters the target shooting mode of the camera application and displays a preview interface; 所述电子设备检测到用户针对预览图像上第一目标对象的操作后,根据所述第一目标对象确定第一目标曝光参数;After the electronic device detects the user's operation on the first target object on the preview image, determine the first target exposure parameter according to the first target object; 所述电子设备检测到用户针对预览图像上第二目标对象的操作后,根据所述第二目标对象确定第二目标曝光参数;After the electronic device detects the user's operation on the second target object on the preview image, determine a second target exposure parameter according to the second target object; 所述电子设备检测到用户的拍摄操作后,显示目标图像,所述目标图像根据第一待合成图像和第二待合成图像生成;所述第一待合成图像根据所述第一目标曝光参数拍摄获得,所述第二待合成图像根据所述第二目标曝光参数拍摄获得;After the electronic device detects the user's shooting operation, it displays a target image, the target image is generated according to the first image to be combined and the second image to be combined; the first image to be combined is taken according to the first target exposure parameter Obtaining, the second image to be synthesized is obtained by shooting according to the second target exposure parameter; 所述电子设备根据所述第一目标对象确定第一目标曝光参数后,根据所述第一目标曝光参数获得一帧或多帧第一预览图像,并在预览界面上显示所述第一预览图像,所述第一预览图像是根据全局曝光参数拍摄的图像和所述第一目标曝光参数拍摄的图像合成后的图像;After the electronic device determines a first target exposure parameter according to the first target object, obtains one or more frames of first preview images according to the first target exposure parameters, and displays the first preview images on a preview interface , the first preview image is an image synthesized from an image taken according to global exposure parameters and an image taken by the first target exposure parameters; 所述电子设备根据所述第二目标对象确定第二目标曝光参数后,根据所述第二目标曝光参数获得一帧或多帧第二预览图像,并在预览界面上显示所述第二预览图像,所述第二预览图像是根据所述全局曝光参数拍摄的图像和所述第二目标曝光参数拍摄的图像合成后的图像。After the electronic device determines a second target exposure parameter according to the second target object, obtains one or more frames of second preview images according to the second target exposure parameters, and displays the second preview images on a preview interface , the second preview image is an image synthesized according to the image captured by the global exposure parameters and the image captured by the second target exposure parameters. 2.根据权利要求1所述的方法,其特征在于,在所述电子设备进入相机应用的目标拍摄模式之后,所述方法还包括:2. The method according to claim 1, wherein after the electronic device enters the target shooting mode of the camera application, the method further comprises: 所述电子设备提示用户选择多个目标对象。The electronic device prompts the user to select a plurality of target objects. 3.根据权利要求1所述的方法,其特征在于,所述针对所述第一目标对象的操作包括针对所述第一目标对象的单击操作、双击操作、压力按操作、长按操作或圈定所述第一目标对象的操作。3. The method according to claim 1, wherein the operation on the first target object comprises a single-click operation, a double-click operation, a pressure press operation, a long press operation or Circle the operation of the first target object. 4.一种拍摄方法,其特征在于,包括:4. A shooting method, characterized in that, comprising: 电子设备打开相机应用,并显示拍照的预览界面;The electronic device opens the camera application and displays a preview interface for taking pictures; 所述电子设备检测到用户针对预览图像上第一目标对象的操作后,根据所述第一目标对象确定第一目标曝光参数;After the electronic device detects the user's operation on the first target object on the preview image, determine the first target exposure parameter according to the first target object; 所述电子设备检测到用户针对预览图像上第二目标对象的操作后,根据所述第二目标对象确定第二目标曝光参数;After the electronic device detects the user's operation on the second target object on the preview image, determine a second target exposure parameter according to the second target object; 所述电子设备进入目标拍摄模式;The electronic device enters a target shooting mode; 所述电子设备检测到用户的拍摄操作后,显示目标图像,所述目标图像根据第一待合成图像和第二待合成图像生成;所述第一待合成图像根据所述第一目标曝光参数拍摄获得,所述第二待合成图像根据所述第二目标曝光参数拍摄获得;After the electronic device detects the user's shooting operation, it displays a target image, the target image is generated according to the first image to be combined and the second image to be combined; the first image to be combined is taken according to the first target exposure parameter Obtaining, the second image to be synthesized is obtained by shooting according to the second target exposure parameter; 所述电子设备根据所述第一目标对象确定第一目标曝光参数后,根据所述第一目标曝光参数获得一帧或多帧第一预览图像,并在预览界面上显示所述第一预览图像,所述第一预览图像是根据全局曝光参数拍摄的图像和所述第一目标曝光参数拍摄的图像合成后的图像;After the electronic device determines a first target exposure parameter according to the first target object, obtains one or more frames of first preview images according to the first target exposure parameters, and displays the first preview images on a preview interface , the first preview image is an image synthesized from an image taken according to global exposure parameters and an image taken by the first target exposure parameters; 所述电子设备根据所述第二目标对象确定第二目标曝光参数后,根据所述第二目标曝光参数获得一帧或多帧第二预览图像,并在预览界面上显示所述第二预览图像,所述第二预览图像是根据所述全局曝光参数拍摄的图像和所述第二目标曝光参数拍摄的图像合成后的图像。After the electronic device determines a second target exposure parameter according to the second target object, obtains one or more frames of second preview images according to the second target exposure parameters, and displays the second preview images on a preview interface , the second preview image is an image synthesized according to the image captured by the global exposure parameters and the image captured by the second target exposure parameters. 5.根据权利要求4所述的方法,其特征在于,所述电子设备进入目标拍摄模式,包括:5. The method according to claim 4, wherein the electronic device enters the target shooting mode, comprising: 所述电子设备提示用户是否进入所述目标拍摄模式;The electronic device prompts the user whether to enter the target shooting mode; 所述电子设备响应于用户的指示操作进入所述目标拍摄模式。The electronic device enters the target shooting mode in response to a user's instruction operation. 6.根据权利要求4所述的方法,其特征在于,所述针对所述第一目标对象的操作包括针对所述第一目标对象的双击操作、压力按操作、长按操作或圈定所述第一目标对象的操作。6. The method according to claim 4, wherein the operation on the first target object comprises a double-click operation, a pressure press operation, a long press operation or a circle around the first target object An operation on a target object. 7.根据权利要求1-6任一项所述的方法,其特征在于,所述方法还包括:7. The method according to any one of claims 1-6, wherein the method further comprises: 在所述电子设备显示所述目标图像之前,分别显示所述第一待合成图像和所述第二待合成图像。Before the electronic device displays the target image, display the first image to be combined and the second image to be combined respectively. 8.根据权利要求1-6任一项所述的方法,其特征在于,所述电子设备根据所述第一目标对象确定第一目标曝光参数,包括:8. The method according to any one of claims 1-6, wherein the electronic device determines a first target exposure parameter according to the first target object, comprising: 所述电子设备根据所述第一目标对象对应的被拍摄物体的反射光线进行自动测光;The electronic device performs automatic photometry according to the reflected light of the object to be photographed corresponding to the first target object; 所述电子设备根据自动测光的结果确定所述第一目标曝光参数。The electronic device determines the first target exposure parameter according to the result of automatic photometry. 9.根据权利要求8所述的方法,其特征在于,所述方法还包括:9. The method of claim 8, further comprising: 所述电子设备检测到用户针对预览图像上第一目标对象的操作后,在预览界面上显示曝光调节控件;After the electronic device detects the user's operation on the first target object on the preview image, it displays an exposure adjustment control on the preview interface; 所述电子设备响应于用户针对所述曝光调节控件的操作,调整所述第一目标曝光参数。The electronic device adjusts the first target exposure parameter in response to a user's operation on the exposure adjustment control. 10.根据权利要求1-6任一项所述的方法,其特征在于,所述电子设备检测到用户针对预览图像上第一目标对象的操作后,根据所述第一目标对象确定第一目标曝光参数,包括:10. The method according to any one of claims 1-6, wherein the electronic device determines the first target according to the first target object after detecting the user's operation on the first target object on the preview image Exposure parameters, including: 所述电子设备检测到用户针对预览图像上第一目标对象的操作后,在预览界面上显示所述第一目标对象对应的曝光设置控件;After the electronic device detects the user's operation on the first target object on the preview image, it displays the exposure setting control corresponding to the first target object on the preview interface; 所述电子设备响应于所述用户针对所述曝光设置控件的操作,确定所述第一目标曝光参数。The electronic device determines the first target exposure parameter in response to the user's operation on the exposure setting control. 11.根据权利要求1-6任一项所述的方法,其特征在于,所述目标图像上第一主体的像素值与所述第一待合成图像上所述第一主体的像素值相同,所述第一主体为所述第一目标对象对应的主体;11. The method according to any one of claims 1-6, wherein the pixel value of the first subject on the target image is the same as the pixel value of the first subject on the first image to be synthesized, The first subject is a subject corresponding to the first target object; 所述目标图像上第二主体的像素值与所述第二待合成图像上所述第二主体的像素值相同,所述第二主体为所述第二目标对象对应的主体;The pixel value of the second subject on the target image is the same as the pixel value of the second subject on the second image to be synthesized, and the second subject is the subject corresponding to the second target object; 所述目标图像上除所述第一主体和所述第二主体以外的其他像素点的像素值,为配准后的所述第一待合成图像和所述第二待合成图像上对应像素点的像素值的加权平均值。The pixel values of other pixel points on the target image except for the first subject and the second subject are corresponding pixel points on the first image to be synthesized and the second image to be synthesized after registration The weighted average of the pixel values of . 12.根据权利要求1-6任一项所述的方法,其特征在于,所述方法还包括:12. The method according to any one of claims 1-6, wherein the method further comprises: 所述电子设备根据所述第一目标曝光参数和所述第二目标曝光参数获得第三目标曝光参数;The electronic device obtains a third target exposure parameter according to the first target exposure parameter and the second target exposure parameter; 所述目标图像根据所述第一待合成图像、所述第二待合成图像以及第三待合成图像生成,所述第三待合成图像根据所述第三目标曝光参数拍摄获得。The target image is generated according to the first image to be synthesized, the second image to be synthesized, and the third image to be synthesized, and the third image to be synthesized is obtained according to the third target exposure parameter. 13.根据权利要求12所述的方法,其特征在于,所述方法还包括:13. The method of claim 12, further comprising: 所述电子设备检测到用户的拍摄操作后,显示所述第三待合成图像。After the electronic device detects the user's shooting operation, it displays the third image to be synthesized. 14.根据权利要求12所述的方法,其特征在于,所述目标图像上第一主体的像素值与所述第一待合成图像上所述第一主体的像素值相同,所述第一主体为所述第一目标对象对应的主体;14. The method according to claim 12, wherein the pixel value of the first subject on the target image is the same as the pixel value of the first subject on the first image to be synthesized, and the first subject is the subject corresponding to the first target object; 所述目标图像上第二主体的像素值与所述第二待合成图像上所述第二主体的像素值相同,所述第二主体为所述第二目标对象对应的主体;The pixel value of the second subject on the target image is the same as the pixel value of the second subject on the second image to be synthesized, and the second subject is the subject corresponding to the second target object; 所述目标图像上除所述第一主体和所述第二主体以外的其他像素点的像素值,与所述第三待合成图像上对应像素点的像素值相同。Pixel values of other pixel points on the target image except for the first subject and the second subject are the same as pixel values of corresponding pixel points on the third image to be synthesized. 15.根据权利要求11所述的方法,其特征在于,所述第一目标对象为第一目标主体,所述第一主体为所述第一目标主体;15. The method according to claim 11, wherein the first target object is a first target subject, and the first subject is the first target subject; 或者,所述第一目标对象为第一目标区域,所述第一主体为所述第一目标区域所在的主体,或者所述第一主体为所述第一目标区域包括的多个主体中面积占比最大的主体。Alternatively, the first target object is a first target area, and the first subject is a subject where the first target area is located, or the first subject is an area among multiple subjects included in the first target area. largest subject. 16.根据权利要求1-6任一项所述的方法,其特征在于,所述第一目标曝光参数包括感光度ISO、光圈、快门时间或曝光值EV中的一项或多项。16. The method according to any one of claims 1-6, wherein the first target exposure parameter includes one or more of sensitivity ISO, aperture, shutter time or exposure value EV. 17.一种电子设备,其特征在于,包括:17. An electronic device, characterized in that it comprises: 屏幕,用于显示界面;a screen for displaying an interface; 一个或多个处理器;one or more processors; 存储器;memory; 以及一个或多个计算机程序,其中所述一个或多个计算机程序被存储在所述存储器中,所述一个或多个计算机程序包括指令,当所述指令被所述电子设备执行时,使得所述电子设备执行如权利要求1-16中任一项所述的拍摄方法。and one or more computer programs, wherein the one or more computer programs are stored in the memory, the one or more computer programs comprising instructions which, when executed by the electronic device, cause the The electronic device executes the shooting method according to any one of claims 1-16. 18.一种计算机可读存储介质,其特征在于,包括计算机指令,当所述计算机指令在计算机上运行时,使得所述计算机执行如权利要求1-16中任一项所述的拍摄方法。18. A computer-readable storage medium, characterized by comprising computer instructions, and when the computer instructions are run on a computer, the computer is made to execute the photographing method according to any one of claims 1-16.
CN202010576174.8A 2020-06-22 2020-06-22 A shooting method and device Active CN113905182B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010576174.8A CN113905182B (en) 2020-06-22 2020-06-22 A shooting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010576174.8A CN113905182B (en) 2020-06-22 2020-06-22 A shooting method and device

Publications (2)

Publication Number Publication Date
CN113905182A CN113905182A (en) 2022-01-07
CN113905182B true CN113905182B (en) 2022-12-13

Family

ID=79186713

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010576174.8A Active CN113905182B (en) 2020-06-22 2020-06-22 A shooting method and device

Country Status (1)

Country Link
CN (1) CN113905182B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114422682B (en) * 2022-01-28 2024-02-02 安谋科技(中国)有限公司 Shooting method, electronic device and readable storage medium
CN115242983B (en) * 2022-09-26 2023-04-07 荣耀终端有限公司 Photographing method, electronic device and readable storage medium
CN116389885B (en) * 2023-02-27 2024-03-26 荣耀终端有限公司 Photography methods, electronic equipment and storage media
WO2024221411A1 (en) * 2023-04-28 2024-10-31 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Image processing device, method, and program
CN116347220B (en) * 2023-05-29 2023-07-21 合肥工业大学 Portrait shooting method and related equipment

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8934050B2 (en) * 2010-05-27 2015-01-13 Canon Kabushiki Kaisha User interface and method for exposure adjustment in an image capturing device
US9998720B2 (en) * 2016-05-11 2018-06-12 Mediatek Inc. Image processing method for locally adjusting image data of real-time image
EP3454547A1 (en) * 2017-09-11 2019-03-13 Canon Kabushiki Kaisha Imaging apparatus, image processing apparatus, imaging method, image processing method, and storage medium
US10630903B2 (en) * 2018-01-12 2020-04-21 Qualcomm Incorporated Systems and methods for image exposure
CN108462833B (en) * 2018-03-26 2021-01-22 北京小米移动软件有限公司 Photographing method, photographing device and computer-readable storage medium
CN108377341A (en) * 2018-05-14 2018-08-07 Oppo广东移动通信有限公司 photographing method, device, terminal and storage medium

Also Published As

Publication number Publication date
CN113905182A (en) 2022-01-07

Similar Documents

Publication Publication Date Title
CN113905182B (en) A shooting method and device
CN112532857B (en) Shooting method and device for time-lapse photography
CN108322646B (en) Image processing method, image processing device, storage medium and electronic equipment
CN110033418B (en) Image processing method, image processing device, storage medium and electronic equipment
CN110198417A (en) Image processing method, image processing device, storage medium and electronic equipment
WO2020057198A1 (en) Image processing method and device, electronic device and storage medium
WO2019179179A1 (en) Image processing method and apparatus
CN111327814A (en) An image processing method and electronic device
EP4231621A1 (en) Image processing method and electronic device
WO2020113534A1 (en) Method for photographing long-exposure image and electronic device
CN117201930B (en) Photographing method and electronic equipment
CN117061861B (en) A shooting method, a chip system and an electronic device
WO2024174625A1 (en) Image processing method and electronic device
CN117652151A (en) Method and device for controlling exposure and electronic equipment
CN119631419A (en) Image processing method and related equipment
CN106878606A (en) An image generation method based on an electronic device and the electronic device
CN117692783B (en) Video shooting method and electronic device
CN116055895B (en) Image processing method and its device, chip system and storage medium
CN113891008B (en) Exposure intensity adjusting method and related equipment
CN116051368A (en) Image processing method and related equipment
CN116055853A (en) Shooting method and electronic equipment
CN117395495B (en) Image processing method and electronic device
CN115701129B (en) Image processing method and electronic equipment
CN117714900B (en) Video shooting method, device, electronic device and storage medium
TW201428679A (en) Image compositing method and image compositing apparatus

Legal Events

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