Movatterモバイル変換


[0]ホーム

URL:


CN112887624B - Shooting method and device and electronic equipment - Google Patents

Shooting method and device and electronic equipment
Download PDF

Info

Publication number
CN112887624B
CN112887624BCN202110122070.4ACN202110122070ACN112887624BCN 112887624 BCN112887624 BCN 112887624BCN 202110122070 ACN202110122070 ACN 202110122070ACN 112887624 BCN112887624 BCN 112887624B
Authority
CN
China
Prior art keywords
image
preview image
shooting
shooting parameters
foreground
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
CN202110122070.4A
Other languages
Chinese (zh)
Other versions
CN112887624A (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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co LtdfiledCriticalVivo Mobile Communication Co Ltd
Priority to CN202110122070.4ApriorityCriticalpatent/CN112887624B/en
Publication of CN112887624ApublicationCriticalpatent/CN112887624A/en
Application grantedgrantedCritical
Publication of CN112887624BpublicationCriticalpatent/CN112887624B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

The application discloses a shooting method, a shooting device and electronic equipment, and belongs to the technical field of camera shooting. The method is applied to the electronic equipment comprising the camera, and comprises the following steps: determining foreground shooting parameters and background shooting parameters in response to first input of a user; responding to a second input of a user, and controlling the camera to shoot a first object to be shot to obtain a first image; processing the first image according to the foreground shooting parameters to obtain a second image; processing the first image according to the background shooting parameters to obtain a third image; and synthesizing the second image and the third image to generate a target image. The shooting method provided by the embodiment of the application omits the complex operation of shooting for multiple times when double exposure shooting is carried out in the prior art.

Description

Translated fromChinese
一种拍摄方法、装置和电子设备A shooting method, device and electronic device

技术领域technical field

本申请属于摄像技术领域,具体涉及一种拍摄方法、装置和电子设备。The present application belongs to the field of photography technology, and specifically relates to a photography method, device and electronic device.

背景技术Background technique

当前,双重曝光摄影得到越来越多的摄影爱好者青睐。Currently, double exposure photography is favored by more and more photographers.

双重曝光摄影是采用两次或者更多次独立曝光拍摄,再将拍摄得到的多张图片组合成一张有艺术感的照片的趣味拍照方法。Double exposure photography is an interesting photography method that uses two or more independent exposure shots, and then combines the multiple images obtained into one artistic photo.

但是,现有的双重曝光拍摄方式,需要用户进行多次拍摄操作,且因无法预览拍摄效果,容易造成大量无效的重复拍摄。However, the existing double-exposure shooting method requires the user to perform multiple shooting operations, and because the shooting effect cannot be previewed, a large number of invalid repeated shootings are likely to be caused.

发明内容SUMMARY OF THE INVENTION

本申请实施例的目的是提供一种拍摄方法,能够解决现有的双重曝光拍摄方式需要用户进行多次拍摄操作,容易给用户带来不便的问题。The purpose of the embodiments of the present application is to provide a shooting method, which can solve the problem that the existing double-exposure shooting method requires the user to perform multiple shooting operations, which easily brings inconvenience to the user.

为了解决上述技术问题,本申请是这样实现的:In order to solve the above technical problems, this application is implemented as follows:

第一方面,本申请实施例提供了一种拍摄方法,应用于包含摄像头的电子设备,其中,所述方法包括:In a first aspect, an embodiment of the present application provides a shooting method, which is applied to an electronic device including a camera, wherein the method includes:

响应于用户的第一输入,确定前景拍摄参数及后景拍摄参数;In response to the user's first input, determine the foreground shooting parameters and the background shooting parameters;

响应于用户的第二输入,控制所述摄像头对第一待拍摄对象进行拍摄,得到第一图像;In response to the user's second input, controlling the camera to photograph the first object to be photographed to obtain a first image;

依据所述前景拍摄参数对所述第一图像进行处理,得到第二图像;processing the first image according to the foreground shooting parameters to obtain a second image;

依据所述后景拍摄参数对所述第一图像进行处理,得到第三图像;processing the first image according to the background shooting parameters to obtain a third image;

对所述第二图像与所述第三图像进行合成,生成目标图像。The second image and the third image are synthesized to generate a target image.

第二方面,本申请实施例提供了一种拍摄装置,应用于包含摄像头的电子设备,其中,该装置包括:In a second aspect, an embodiment of the present application provides a photographing apparatus, which is applied to an electronic device including a camera, wherein the apparatus includes:

确定模块,用于响应于用户的第一输入,确定前景拍摄参数及后景拍摄参数;a determining module, configured to determine the foreground shooting parameters and the background shooting parameters in response to the first input of the user;

拍摄模块,用于响应于用户的第二输入,控制所述摄像头对第一待拍摄对象进行拍摄,得到第一图像;a photographing module, configured to control the camera to photograph the first object to be photographed to obtain a first image in response to a second input from the user;

第一处理模块,用于依据所述前景拍摄参数对所述第一图像进行处理,得到第二图像;a first processing module, configured to process the first image according to the foreground shooting parameters to obtain a second image;

第二处理模块,用于依据所述后景拍摄参数对所述第一图像进行处理,得到第三图像;a second processing module, configured to process the first image according to the background shooting parameters to obtain a third image;

第三处理模块,用于对所述第二图像与所述第三图像进行合成,生成目标图像。The third processing module is used for synthesizing the second image and the third image to generate a target image.

第三方面,本申请实施例提供了一种电子设备,该电子设备包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面所述的方法的步骤。In a third aspect, embodiments of the present application provide an electronic device, the electronic device includes a processor, a memory, and a program or instruction stored on the memory and executable on the processor, the program or instruction being The processor implements the steps of the method according to the first aspect when executed.

第四方面,本申请实施例提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的方法的步骤。In a fourth aspect, an embodiment of the present application provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or instruction is executed by a processor, the steps of the method according to the first aspect are implemented .

第五方面,本申请实施例提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的方法。In a fifth aspect, an embodiment of the present application provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction, and implement the first aspect the method described.

在本申请实施例中,先确定前景拍摄参数及后景拍摄参数;再控制摄像头对待拍摄对象进行拍摄,得到第一图像;然后依据上述前景拍摄参数对第一图像进行处理,得到第二图像;依据上述后景拍摄参数对上述第一图像进行处理,得到第三图像;最后对上述第二图像与第三图像进行合成,生成目标图像。上述拍摄方式中,先确定用于进行图像处理的前景拍摄参数及后景拍摄参数,后续通过一次拍摄操作得到第一图像后,即可基于前景拍摄参数及后景拍摄参数,自动将上述每张第一图像对应处理为第二图像及第二图像,并合成为目标图像,省去了现有技术中进行双重曝光拍摄时进行多次拍摄的繁琐操作。In the embodiment of the present application, first determine the foreground shooting parameters and the background shooting parameters; then control the camera to shoot the object to be shot to obtain a first image; and then process the first image according to the aforementioned foreground shooting parameters to obtain a second image; The first image is processed according to the background shooting parameters to obtain a third image; finally, the second image and the third image are synthesized to generate a target image. In the above shooting method, the foreground shooting parameters and the background shooting parameters for image processing are first determined, and after obtaining the first image through one shooting operation, each of the above can be automatically based on the foreground shooting parameters and the background shooting parameters. The first image is correspondingly processed into the second image and the second image, and is synthesized into a target image, which saves the tedious operation of performing multiple shots when performing double exposure shooting in the prior art.

附图说明Description of drawings

图1是本申请实施例提供的拍摄方法的步骤流程图;FIG. 1 is a flowchart of steps of a shooting method provided by an embodiment of the present application;

图2是本申请实施例一种实施方式中调整拍摄参数前的拍摄画面显示效果图;FIG. 2 is a display effect diagram of a shooting screen before adjusting shooting parameters in an implementation manner of an embodiment of the present application;

图3是本申请实施例中通过双指操作调整缩放比例的过程示意图;3 is a schematic diagram of a process of adjusting the zoom ratio through a two-finger operation in an embodiment of the present application;

图4是本申请实施例中设置前景滤镜效果的操作示意图;4 is a schematic diagram of an operation of setting a foreground filter effect in an embodiment of the present application;

图5是本申请实施例中设置前景滤镜效果的操作示意图;5 is a schematic diagram of an operation of setting a foreground filter effect in an embodiment of the present application;

图6是本申请实施例中通过长按拍摄按钮调整缩放比例的过程示意;6 is a schematic diagram of the process of adjusting the zoom ratio by long pressing the shooting button in the embodiment of the present application;

图7是本申请实施例另一种实施方式中调整拍摄参数前的拍摄画面显示效果图;7 is a display effect diagram of a shooting screen before adjusting shooting parameters in another implementation manner of the embodiment of the present application;

图8是本申请实施例中通过第一预设控件调整前景缩放比例的拍摄画面显示效果图;FIG. 8 is a display effect diagram of a shooting screen in which the foreground zoom ratio is adjusted through a first preset control in an embodiment of the present application;

图9是本申请实施例中通过第二预设控件调整后景缩放比例的拍摄画面显示效果图;9 is a display effect diagram of a shooting screen in which the background zoom ratio is adjusted by a second preset control in an embodiment of the present application;

图10是本申请实施例提供的拍摄装置的结构示意图;10 is a schematic structural diagram of a photographing device provided by an embodiment of the present application;

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

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.

本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。The terms "first", "second" and the like in the description and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It is to be understood that data so used may be interchanged under appropriate circumstances so that embodiments of the application can be practiced in sequences other than those illustrated or described herein. In addition, "and/or" in the description and claims indicates at least one of the connected objects, and the character "/" generally indicates that the associated objects are in an "or" relationship.

下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的拍摄方法进行详细地说明。The shooting methods provided by the embodiments of the present application will be described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios thereof.

请参阅图1,示出了本申请实施例提供的一种拍摄方法的步骤流程图,其中,应用于包含多个摄像头的电子设备,该方法可以包括步骤100~500。Please refer to FIG. 1 , which shows a flowchart of steps of a shooting method provided by an embodiment of the present application, wherein, when applied to an electronic device including multiple cameras, the method may includesteps 100 to 500 .

本申请实施例中,上述拍摄方法应用于具有摄像头的电子设备,上述电子设备具体可以为手机、平板电脑、摄像机等。In the embodiments of the present application, the above-mentioned shooting method is applied to an electronic device having a camera, and the above-mentioned electronic device may specifically be a mobile phone, a tablet computer, a video camera, and the like.

步骤100、响应于用户的第一输入,确定前景拍摄参数及后景拍摄参数。Step 100 , in response to the first input of the user, determine the foreground shooting parameters and the background shooting parameters.

上述步骤100,前景拍摄参数为生成双重曝光图片中的前景对应的拍摄参数,后景拍摄参数为生成双重曝光拍摄图片中的后景对应的拍摄参数;第一输入则为确认上述参数的输入,因而通过上述第一输入,可以确定出满足用户所需要的双重曝光图片效果对应的前景拍摄参数及后景拍摄参数。In theabove step 100, the foreground shooting parameters are the shooting parameters corresponding to the foreground in the generated double exposure picture, and the background shooting parameters are the shooting parameters corresponding to the background in the double exposure shooting picture; the first input is the input for confirming the above parameters, Therefore, through the above-mentioned first input, the foreground shooting parameters and the background shooting parameters corresponding to the double-exposure picture effect required by the user can be determined.

步骤200、响应于用户的第二输入,控制所述摄像头对第一待拍摄对象进行拍摄,得到第一图像。Step 200: In response to the second input of the user, control the camera to photograph the first object to be photographed to obtain a first image.

上述步骤200中,上述第二输入为确定开始进行双重曝光拍摄的输入,具体可以为对拍摄按钮的点击操作。在接收到上述第二输入时,说明需要进行双重曝光拍摄,因而控制上述摄像头对第一待拍摄对象进行拍摄,从而获得第一图像。In the above-mentionedstep 200, the above-mentioned second input is an input for determining to start the double-exposure shooting, which may specifically be a click operation on the shooting button. When the second input is received, it is indicated that double exposure shooting is required, so the camera is controlled to shoot the first object to be shot, thereby obtaining the first image.

步骤300、依据所述前景拍摄参数对所述第一图像进行处理,得到第二图像。Step 300: Process the first image according to the foreground shooting parameters to obtain a second image.

上述步骤300中,按照前景拍摄参数对第一图像进行处理,得到的第二图像效果与用户需求的双重曝光拍摄图片的前景效果相同,因而可以将上述第二图像作为前景图像。In the above-mentionedstep 300, the first image is processed according to the foreground shooting parameters, and the obtained second image effect is the same as the foreground effect of the double-exposure shooting picture required by the user, so the above-mentioned second image can be used as the foreground image.

步骤400、依据所述后景拍摄参数对所述第一图像进行处理,得到第三图像。Step 400: Process the first image according to the background shooting parameters to obtain a third image.

上述步骤300中,按照前景拍摄参数对第一图像进行处理,得到的第三图像效果与用户需求的双重曝光拍摄图片的前景效果相同,因而可以将上述第三图像作为后景图像。In theabove step 300, the first image is processed according to the foreground shooting parameters, and the obtained third image effect is the same as the foreground effect of the double-exposure shooting picture required by the user, so the third image can be used as the background image.

步骤500、将所述第二图像与所述第三图像进行合成,生成目标图像。Step 500: Synthesize the second image and the third image to generate a target image.

上述步骤500中,因为第二图像效果与用户需求的双重曝光拍摄图片的前景效果相同,而第三图像效果与用户需求的双重曝光拍摄图片的后景效果相同,因而利用图片合成技术,将上述第二图像与第三图像进行叠加融合,得到包含有上述第一待拍摄对象,且图像效果可以满足用户的双重曝光图像效果需求的目标图像。In the above-mentionedstep 500, because the second image effect is the same as the foreground effect of the double-exposure photographed picture required by the user, and the third image effect is the same as the background effect of the double-exposure photographed picture required by the user, the above image synthesis technology is used to combine the above. The second image and the third image are superimposed and fused to obtain a target image that includes the above-mentioned first object to be photographed and whose image effect can meet the user's requirement for a double-exposure image effect.

本申请实施例提供的拍摄方法,先确定前景拍摄参数及后景拍摄参数;再控制摄像头对待拍摄对象进行拍摄,得到第一图像;然后依据上述前景拍摄参数对第一图像进行处理,得到第二图像;依据上述后景拍摄参数对上述第一图像进行处理,得到第三图像;最后对上述第二图像与第三图像进行合成,生成目标图像。上述拍摄方式中,先确定用于进行图像处理的前景拍摄参数及后景拍摄参数,后续通过一次拍摄操作得到第一图像后,即可基于前景拍摄参数及后景拍摄参数,自动将上述第一图像对应处理为第二图像及第三图像,并合成为目标图像,省去了现有技术中进行双重曝光拍摄时进行多次拍摄的繁琐操作。In the shooting method provided by the embodiment of the present application, the foreground shooting parameters and the background shooting parameters are first determined; then the camera is controlled to shoot the object to be shot to obtain a first image; and then the first image is processed according to the foreground shooting parameters to obtain a second image. image; processing the first image according to the background shooting parameters to obtain a third image; and finally synthesizing the second image and the third image to generate a target image. In the above shooting method, the foreground shooting parameters and the background shooting parameters for image processing are first determined, and after obtaining the first image through one shooting operation, the above-mentioned first image can be automatically based on the foreground shooting parameters and the background shooting parameters. The images are correspondingly processed into the second image and the third image, and then synthesized into a target image, which saves the tedious operation of performing multiple shots when performing double-exposure shooting in the prior art.

可选地,在一种实施方式中,上述前景拍摄参数设置有多个,上述后景拍摄参数设置有多个;Optionally, in an implementation manner, there are multiple sets of the above-mentioned foreground shooting parameters, and multiple sets of the above-mentioned background shooting parameters;

上述步骤300包括:分别依据各个前景拍摄参数对第一图像进行处理,得到多个第二图像;Theabove step 300 includes: respectively processing the first image according to each foreground shooting parameter to obtain a plurality of second images;

上述步骤400包括:分别依据各个后前景拍摄参数对第一图像进行处理,得到多个第三图像;Theabove step 400 includes: respectively processing the first image according to each rear foreground shooting parameter to obtain a plurality of third images;

上述步骤500包括:将上述多个第二图像与多个第三图像进行合成,生成具有多重曝光效果的目标图像。Theabove step 500 includes: synthesizing the plurality of second images and the plurality of third images to generate a target image with multiple exposure effects.

本实施方式通过设置多个前景拍摄参数设置与后景拍摄参数,后续通过一次拍摄操作得到第一图像后,即可基于上述多个前景拍摄参数及多个后景拍摄参数,自动将上述第一图像对应处理为多个第二图像及多个第三图像,并合成为目标图像,从而利用单次拍摄参数得到具有多重曝光效果的图像。In this embodiment, by setting a plurality of foreground shooting parameters and background shooting parameters, after obtaining a first image through a subsequent shooting operation, the above-mentioned first image can be automatically based on the above-mentioned multiple foreground shooting parameters and multiple background shooting parameters. The images are correspondingly processed into a plurality of second images and a plurality of third images, and are synthesized into a target image, thereby obtaining an image with multiple exposure effects by using a single shot parameter.

可选地,在一种实施方式中,本发明实施例所提供的拍摄方法,上述第一输入包括对第二待拍摄对象的预览图像的第一子输入与第二子输入;预览图像包括第一预览图像与第二预览图像;上述步骤100包括步骤101~104。Optionally, in an implementation manner, in the shooting method provided by the embodiment of the present invention, the above-mentioned first input includes a first sub-input and a second sub-input of a preview image of the second object to be shot; A preview image and a second preview image; the above-mentionedstep 100 includes steps 101-104.

本实施方式中,第二待拍摄对象为设置前景拍摄参数及后景拍摄参数时,进入摄像头视场角范围的对象,该第二待拍摄对象可以与上述第一待拍摄对象相同或不同;In this embodiment, the second object to be shot is an object that enters the field of view of the camera when the foreground shooting parameters and the background shooting parameters are set, and the second object to be shot may be the same as or different from the first object to be shot;

在第二待拍摄对象与上述第一待拍摄对象不同的情况下,用户是先通过调整第二待拍摄对象的预览图像的方式设置前景拍摄参数及后景拍摄参数,再对第一待拍摄对象拍摄得到的第一图像利用上述前景拍摄参数及后景拍摄参数进行处理;In the case where the second object to be shot is different from the first object to be shot, the user first sets the foreground shooting parameters and the background shooting parameters by adjusting the preview image of the second object to be shot, and then sets the first object to be shot. The first image obtained by shooting is processed by using the above-mentioned foreground shooting parameters and background shooting parameters;

在第二待拍摄对象与上述第一待拍摄对象相同的情况下,用户是通过调整第一待拍摄对象的预览图像的方式设置前景拍摄参数及后景拍摄参数,再对第一待拍摄对象拍摄得到的第一图像利用上述前景拍摄参数及后景拍摄参数进行处理,使得最终拍摄得到的双重曝光图像与用户进行前景拍摄参数及后景拍摄参数时拍摄画面所显示的图像完全一致。In the case where the second object to be shot is the same as the first object to be shot, the user sets the foreground shooting parameters and the background shooting parameters by adjusting the preview image of the first object to be shot, and then shoots the first object to be shot The obtained first image is processed using the aforementioned foreground shooting parameters and background shooting parameters, so that the final double exposure image obtained by shooting is completely consistent with the image displayed on the shooting screen when the user performs the foreground shooting parameters and the background shooting parameters.

步骤101、根据所述第一子输入,调整所述第二待拍摄对象的第一预览图像。Step 101: Adjust the first preview image of the second object to be photographed according to the first sub-input.

上述步骤101中,第一子输入为调整第二待拍摄对象的第一预览图像的操作,以通过第一预览图像确定前景拍摄参数;上述第一预览图像由第二待拍摄对象原始的预览图像按第一子输入调整获得。该第一子输入具体可以包括用户在显示画面中的第一操作,以触发调整第二待拍摄对象的第一预览图像,具体可以调整第一预览图像的缩放比例、在显示画面中的位置及滤镜效果等,直至第一预览图像显示的效果达到用户对双重曝光图像中的前景效果需求。In the above step 101, the first sub-input is an operation of adjusting the first preview image of the second object to be shot, so as to determine the foreground shooting parameters through the first preview image; the first preview image is the original preview image of the second object to be shot. Obtained by adjusting the first sub-input. The first sub-input may specifically include a user's first operation on the display screen to trigger adjustment of the first preview image of the second object to be photographed. Specifically, the zoom ratio of the first preview image, the position in the display screen, and the filter effects, etc., until the effect displayed by the first preview image reaches the user's requirement for the foreground effect in the double exposure image.

步骤102、根据调整后的所述第一预览图像,确定前景拍摄参数。Step 102: Determine foreground shooting parameters according to the adjusted first preview image.

上述步骤102中,即按照用户通过第一子输入调整后的第一预览图像的缩放比例、在显示画面中的位置、滤镜效果等显示参数,确定前景拍摄参数,使得按照该前景拍摄参数处理后的图像显示效果与上述第一预览图像显示效果相同。前景拍摄参数至少包括前景目标缩放比例、前景位置参数、前景目标滤镜等,其中,前景目标缩放比例与第一预览图像的缩放比例相同,前景位置参数与第一预览图像在显示画面中的位置相匹配,前景目标滤镜与第一预览图像的滤镜相同。In the above-mentioned step 102, that is, according to the display parameters such as the zoom ratio of the first preview image adjusted by the user through the first sub-input, the position in the display screen, the filter effect, etc., the foreground shooting parameters are determined, so that the foreground shooting parameters are processed according to the foreground shooting parameters. The display effect of the latter image is the same as the display effect of the first preview image above. The foreground shooting parameters include at least a foreground target zoom ratio, a foreground position parameter, a foreground target filter, etc., wherein the foreground target zoom ratio is the same as the zoom ratio of the first preview image, and the foreground position parameter is the position of the first preview image in the display screen. To match, the foreground target filter is the same as the filter of the first preview image.

步骤103、根据所述第二子输入,调整所述第二待拍摄对象的第二预览图像。Step 103: Adjust the second preview image of the second object to be photographed according to the second sub-input.

上述步骤103中,第二子输入为调整第二待拍摄对象的第二预览图像的操作,以通过第二预览图像确定前景拍摄参数;上述第二预览图像由第二待拍摄对象原始的预览图像按第二子输入调整获得。该第二子输入具体可以包括用户在显示画面中的第二操作,以触发调整第二待拍摄对象的第二预览图像,具体可以调整第二预览图像的缩放比例、在显示画面中的位置及滤镜效果等,直至第二预览图像显示的效果达到用户对双重曝光图像中的后景效果需求。In the above step 103, the second sub-input is an operation of adjusting the second preview image of the second object to be shot, so as to determine the foreground shooting parameters through the second preview image; the second preview image is the original preview image of the second object to be shot. Obtained by adjusting the second sub-input. The second sub-input may specifically include a second operation by the user on the display screen to trigger adjustment of the second preview image of the second object to be photographed. Specifically, the zoom ratio of the second preview image, the position in the display screen and the filter effects, etc., until the effect displayed by the second preview image meets the user's requirement for the background effect in the double exposure image.

步骤104、根据调整后的所述第二预览图像,确定后景拍摄参数。Step 104: Determine background shooting parameters according to the adjusted second preview image.

上述步骤104中,按照用户通过第二子输入调整后的第二预览图像的缩放比例、在显示画面中的位置、滤镜效果等显示参数,确定后景拍摄参数,使得按照该后景拍摄参数处理后的图像显示效果与上述第二预览图像显示效果相同。后景拍摄参数至少包括后景目标缩放比例、后景位置参数、后景目标滤镜等;其中,后景目标缩放比例与第二预览图像的缩放比例相同,后景位置参数与第二预览图像在显示画面中的位置相匹配,后景目标滤镜与第二预览图像的滤镜相同。In the above step 104, the background shooting parameters are determined according to the display parameters such as the zoom ratio of the second preview image adjusted by the user through the second sub-input, the position in the display screen, the filter effect, etc. The display effect of the processed image is the same as the display effect of the second preview image. The background shooting parameters include at least the zoom ratio of the background object, the background position parameter, the background object filter, etc.; wherein, the zoom ratio of the background object is the same as the zoom ratio of the second preview image, and the background position parameter is the same as that of the second preview image. Matching the position in the display, the background target filter is the same as the filter of the second preview image.

本实施方式中,在未进行调整前,第一预览图像及第二预览图像完全重叠显示为第二待拍摄对象原始的预览图像,且仅显示前景效果。In this embodiment, before adjustment is performed, the first preview image and the second preview image are completely overlapped and displayed as the original preview image of the second object to be photographed, and only the foreground effect is displayed.

本实施方式适用于用户对所拍摄的双重曝光图像具有个性化显示需求的应用场景。This embodiment is suitable for application scenarios where the user has personalized display requirements for the captured double exposure image.

上述实施方式中,用户通过调整第二待拍摄对象的第一预览图像个性化确定前景拍摄参数,以及通过调整第二待拍摄对象的第二预览图像个性化确定后景拍摄参数,后续通过一次拍摄操作得到第一图像后,即可基于前景拍摄参数及后景拍摄参数,自动将上述每张第一图像对应处理为第二图像及第二图像,合成为双重曝光的目标图像,不仅满足了用户个性化显示需求,且省去了现有技术中进行多重曝光拍摄时进行多次拍摄的繁琐操作。In the above embodiment, the user personally determines the foreground shooting parameters by adjusting the first preview image of the second object to be shot, and determines the background shooting parameters by adjusting the second preview image of the second object to be shot. After the first image is obtained by the operation, based on the foreground shooting parameters and the background shooting parameters, each of the above-mentioned first images can be automatically processed into a second image and a second image, and synthesized into a target image of double exposure, which not only satisfies the user’s needs Personalized display requirements, and the tedious operation of performing multiple shots when performing multiple exposure shots in the prior art is omitted.

可选地,在一种实施方式中,上述步骤101包括步骤1011~1012,上述步骤103包括步骤1031~1032。Optionally, in an implementation manner, the foregoing step 101 includes steps 1011 to 1012 , and the foregoing step 103 includes steps 1031 to 1032 .

步骤1011、根据第一手势操作,调整所述第一预览图像的第一缩放比例。Step 1011: Adjust the first zoom ratio of the first preview image according to the first gesture operation.

上述步骤1011中,在上述第一子输入包括在拍摄画面中的第一手势操作的情况下,则根据上述第一手势操作调整第一预览图像的缩放比例;上述第一手势操作具体可以是对第一预览图像的双指缩放等操作。In the above step 1011, in the case that the above-mentioned first sub-input includes the first gesture operation in the shooting screen, the zoom ratio of the first preview image is adjusted according to the above-mentioned first gesture operation; the above-mentioned first gesture operation may specifically be a pair of Operations such as pinch-to-zoom of the first preview image.

步骤1012、根据第二手势操作,调整所述第一预览图像的第一滤镜效果。Step 1012: Adjust the first filter effect of the first preview image according to the second gesture operation.

上述步骤1012中,在上述第一子输入包括在拍摄画面中的第二手势操作的情况下,则根据上述第二手势操作确定第一预览图像对应的滤镜效果;上述第二手势操作具体可以是对前景滤镜设置子控件中目标滤镜的点击操作,上述前景滤镜设置子控件为显示于拍摄画面中并用于设置前景滤镜效果的子控件。In the above step 1012, in the case where the above-mentioned first sub-input includes a second gesture operation in the shooting screen, the filter effect corresponding to the first preview image is determined according to the above-mentioned second gesture operation; the above-mentioned second gesture Specifically, the operation may be a click operation on the target filter in the foreground filter setting sub-control. The foreground filter setting sub-control is a sub-control displayed on the shooting screen and used for setting the effect of the foreground filter.

步骤1031、根据第三手势操作,调整所述第二预览图像的第二缩放比例。Step 1031: Adjust the second zoom ratio of the second preview image according to the third gesture operation.

上述步骤1031中,上述第三手势操作为确定调整后景图像缩放比例的操作,因而在上述第二子输入包括在拍摄画面中的第三手势操作的情况下,则根据上述第三手势操作调整第二预览图像的缩放比例,以便于后续根据调整后的第二预览图像确定对应的后景拍摄参数。上述第三手势操作具体可以是对第二预览图像的双指缩放等操作。In the above-mentioned step 1031, the above-mentioned third gesture operation is an operation to determine the adjustment of the zoom ratio of the background image. Therefore, in the case where the above-mentioned second sub-input includes the third gesture operation in the shooting screen, the adjustment is made according to the above-mentioned third gesture operation. The zoom ratio of the second preview image, so that the corresponding background shooting parameters can be subsequently determined according to the adjusted second preview image. The above-mentioned third gesture operation may specifically be an operation such as pinch-to-zoom operation on the second preview image.

步骤1032、根据第四手势操作,调整所述第二预览图像的第二滤镜效果。Step 1032: Adjust the second filter effect of the second preview image according to the fourth gesture operation.

上述步骤1032中,在上述第二子输入包括在拍摄画面中的第四手势操作的情况下,则根据上述第四手势操作确定第二预览图像对应的滤镜效果;上述第四手势操作具体可以是对后景滤镜设置子控件中目标滤镜的点击操作,上述后景滤镜设置子控件为显示于拍摄画面中并用于设置后景滤镜效果的子控件。In the above step 1032, in the case that the above-mentioned second sub-input includes the fourth gesture operation in the shooting screen, the filter effect corresponding to the second preview image is determined according to the above-mentioned fourth gesture operation; the above-mentioned fourth gesture operation may specifically be: It is a click operation on the target filter in the background filter setting sub-control. The background filter setting sub-control is a sub-control displayed on the shooting screen and used to set the background filter effect.

在实际应用中,上述前景滤镜设置子控件及后景滤镜设置子控件集成显示为滤镜控件,在接收到用户对滤镜控件的点击操作后,再进一步显示前景滤镜设置子控件及后景滤镜设置子控件,且前景滤镜设置子控件及后景滤镜设置子控件均显示有多种滤镜选项,以供用户根据需要选择。In practical applications, the above-mentioned foreground filter setting sub-control and background filter setting sub-control are integrated and displayed as a filter control. After receiving the user's click operation on the filter control, the foreground filter setting sub-control and the background filter setting sub-control are further displayed. The background filter setting sub-control, the foreground filter setting sub-control and the background filter setting sub-control both display a variety of filter options for users to choose according to their needs.

本实施方式适用于用户对所拍摄的双重曝光图像具有个性化缩放比例及滤镜需求的应用场景。This embodiment is suitable for application scenarios where the user has personalized scaling and filter requirements for the captured double-exposure image.

例如,在开始进入双重曝光拍摄模式时,拍摄画面的显示效果如图2所示,图2中将显示屏界面分为三个区域,顶部区域为一些常用功能键包括闪光灯和设置键,中间区域为拍摄画面的预览区域,底部区域则为拍摄按钮区域;预览区域中用于表示双重曝光拍摄图像中前景的第一预览图像、以及用于表示双重曝光拍摄图像中后景的第二预览图像完全重叠显示为待拍摄对象原始的预览图像,且仅显示前景效果;另外,在拍摄显示界面中还提供用于调整前、后景滤镜效果的滤镜按钮;For example, when starting to enter the double exposure shooting mode, the display effect of the shooting screen is shown in Figure 2. In Figure 2, the screen interface is divided into three areas. The top area is some commonly used function keys including flash and setting keys, and the middle area is It is the preview area of the shooting screen, and the bottom area is the shooting button area; in the preview area, the first preview image used to represent the foreground of the double-exposure shooting image, and the second preview image used to represent the background of the double-exposure shooting image are completely The superimposed display is the original preview image of the object to be shot, and only the foreground effect is displayed; in addition, the filter button for adjusting the front and background filter effects is also provided in the shooting display interface;

请参阅图3,在用户对拍摄画面进行双指缩放操作时,通过对图像边缘进行裁剪的手段,调整原始的预览图像的缩放比例,从而调整预览图像中人物的大小,从而确定出用于设置前景拍摄参数的第一预览图像。Referring to Figure 3, when the user performs a pinch-to-zoom operation on the shooting screen, the zoom ratio of the original preview image is adjusted by means of cropping the edge of the image, so as to adjust the size of the person in the preview image. A first preview image of the foreground shot parameters.

在用户点击拍摄画面中的滤镜控件时,可以进入打开滤镜选择界面,并具体显示前景滤镜设置子控件及后景滤镜设置子控件;在用户点击前景滤镜设置子控件时,显示有多种滤镜选项,以供用户选择前景滤镜效果,其显示效果如图4所示;在用户点击后景滤镜设置子控件时,同样显示有多种滤镜选项,以供用户选择后景滤镜效果,其显示效果如图5所示;When the user clicks the filter control in the shooting screen, the user can enter the open filter selection interface, and specifically display the foreground filter setting sub-control and the background filter setting sub-control; when the user clicks the foreground filter setting sub-control, display There are various filter options for the user to choose the foreground filter effect, and the display effect is shown in Figure 4; when the user clicks the background filter setting sub-control, there are also various filter options for the user to choose. The background filter effect, its display effect is shown in Figure 5;

上述实施方式中,用户通过不同的手势操作调整第二待拍摄对象的第一预览图像的缩放比例以及滤镜效果、第二预览图像的缩放比例以及滤镜效果,从而个性化确定前景拍摄参数和后景拍摄参数,后续通过一次拍摄操作得到第一图像后,即可基于前景拍摄参数及后景拍摄参数,自动将上述每张第一图像对应处理为第二图像及第二图像,合成为双重曝光的目标图像,不仅满足了用户个性化显示需求,且省去了现有技术中进行多重曝光拍摄时进行多次拍摄的繁琐操作。In the above embodiment, the user adjusts the zoom ratio and filter effect of the first preview image of the second object to be photographed, the zoom ratio and filter effect of the second preview image through different gesture operations, so as to individually determine the foreground shooting parameters and filter effects. Background shooting parameters, after obtaining the first image through a subsequent shooting operation, based on the foreground shooting parameters and the background shooting parameters, each of the above-mentioned first images can be automatically processed into a second image and a second image, and synthesized into a double image. The exposed target image not only satisfies the user's personalized display requirements, but also saves the tedious operation of performing multiple shots when performing multiple exposure shots in the prior art.

可选地,在一种实施方式中,本发明实施例所提供的拍摄方法,在第三手势操作为对拍摄按钮的按压操作的情况下,上述步骤1031包括步骤 10311~10312。Optionally, in an implementation manner, in the shooting method provided by the embodiment of the present invention, in the case that the third gesture operation is a pressing operation on the shooting button, the above step 1031 includes steps 10311-10312.

本实施方式中,拍摄按钮可以为实体拍摄按钮,也可以为显示于拍摄画面中的虚拟拍摄按钮。In this embodiment, the shooting button may be a physical shooting button or a virtual shooting button displayed on the shooting screen.

步骤10311、获取所述按压操作对拍摄按钮的按压时长。Step 10311: Obtain the pressing duration of the pressing operation on the shooting button.

上述步骤10311中,在按压拍摄按钮的过程中,实时计算从接收到对拍摄按钮的按压操作开始至当前时刻的总时长,得到上述用于确定后景拍摄参数中的缩放比例的按压时长。In the above step 10311, in the process of pressing the shooting button, the total duration from the moment when the pressing operation on the shooting button is received to the current moment is calculated in real time, and the aforementioned pressing duration for determining the zoom ratio in the background shooting parameters is obtained.

步骤10312、根据所述按压时长,调整所述第二预览图像的第二缩放比例。Step 10312: Adjust the second zoom ratio of the second preview image according to the pressing duration.

上述步骤10312中,预先设置按压时长与缩放比例之间的第一对应关系,再确定了按压时长后,根据上述第一对应关系可以确定对应的第二缩放比例,再根据该第二缩放比例对第二预览图像进行缩放调整,以使第二预览图像的画面缩放效果达到用户需求。In the above step 10312, the first correspondence between the pressing duration and the scaling ratio is preset, and after the pressing duration is determined, the corresponding second scaling ratio can be determined according to the above-mentioned first correspondence, and then the corresponding second scaling ratio can be determined according to the second scaling ratio. The second preview image is zoomed and adjusted, so that the screen zoom effect of the second preview image can meet user requirements.

其中,在上述第一对应关系中,按压时长越大,缩放比例越大,也即随着按压时间延长,上述第二预览图像画面逐步放大;在第二预览图像画面放大至用户满意的状态时,用户停止对拍摄按钮的按压操作,第二预览图像画面停止放大;另外,在第二预览图像画面放大倍率达到至放大倍率上限值时,第二预览图像画面停止放大。上述放大倍率上限值可以设置为10倍。Wherein, in the above-mentioned first correspondence, the longer the pressing time is, the larger the zoom ratio is, that is, as the pressing time is prolonged, the above-mentioned second preview image is gradually enlarged; when the second preview image is enlarged to a state that the user is satisfied with , the user stops pressing the shooting button, and the second preview image stops enlarging; in addition, when the magnification of the second preview image reaches the upper limit of the magnification, the second preview image stops enlarging. The above-mentioned upper limit value of magnification can be set to 10 times.

本实施方式适用于用户通过按压拍摄按钮的按压时长调整后景拍摄参数中的缩放比例的场景。This embodiment is applicable to a scenario in which the user adjusts the zoom ratio in the background shooting parameters by pressing the shooting button for the duration of pressing.

例如,在用户长按拍摄画面中的拍摄按钮时,显示画面如图6所示,其中,实线人物表示待拍摄对象原始的预览图像,虚线人物表示用于确定后景拍摄参数的第二预览图像;随时按压时间的延长,第二预览图像画面持续拉大,可以调整预览图像中人物的大小,直至效果达到用户满意并停止按压拍摄按钮,或者第二预览图像画面缩放比例达到最大的倍率。For example, when the user presses the shooting button on the shooting screen for a long time, the displayed screen is as shown in FIG. 6 , in which the solid line person represents the original preview image of the object to be shot, and the dotted line person represents the second preview used to determine the background shooting parameters Image; at any time, the second preview image will continue to enlarge as the pressing time prolongs, and the size of the characters in the preview image can be adjusted until the effect reaches the user’s satisfaction and stops pressing the shooting button, or the zoom ratio of the second preview image reaches the maximum magnification.

上述实施方式中,用户通过对拍摄按钮的按压时长的不同控制调整第二待拍摄对象的第二预览图像的缩放比例,且实时显示调整后第二预览图像的画面大小,可以便捷且直观地设定满足用户对后景图像画面放大倍率需求的后景拍摄参数。In the above embodiment, the user adjusts the zoom ratio of the second preview image of the second object to be photographed through different control of the pressing time of the shooting button, and the screen size of the adjusted second preview image is displayed in real time, which can be conveniently and intuitively set. Set the background shooting parameters to meet the user's requirements for the magnification of the background image.

可选地,在一种实施方式中,本发明实施例所提供的拍摄方法,在第一手势操作为对第一预设控件的滑动操作的情况下,上述步骤1011包括步骤 10111~10112;在第三手势操作为对第二预设控件的滑动操作的情况下,上述步骤1031包括步骤10313~10314。Optionally, in an implementation manner, in the shooting method provided by the embodiment of the present invention, in the case where the first gesture operation is a sliding operation on the first preset control, the above step 1011 includes steps 10111 to 10112; When the third gesture operation is a sliding operation on the second preset control, the above step 1031 includes steps 10313-10314.

本实施方式中,第一预设控件为用于调整前景拍摄参数中缩放比例的控件,具体可以为显示于拍摄画面中的第一滑动条;第二预设控件为用于调整后景拍摄参数中缩放比例的控件,具体可以为显示于拍摄画面中的第二滑动条。In this embodiment, the first preset control is a control used to adjust the zoom ratio in the foreground shooting parameters, and may specifically be a first slider displayed on the shooting screen; the second preset control is used to adjust the background shooting parameters. The control of the zoom ratio in the middle, specifically, may be the second sliding bar displayed in the shooting screen.

步骤10111、获取所述滑动操作对所述第一预设控件的第一滑动距离。Step 10111: Acquire a first sliding distance of the sliding operation to the first preset control.

上述步骤10111中,在滑动第一预设控件的过程中,实时计算从接收到对第一预设控件的滑动操作开始至当前时刻的总滑动距离,得到上述用于确定后景拍摄参数中的缩放比例的第一滑动距离。In the above step 10111, in the process of sliding the first preset control, the total sliding distance from the moment when the sliding operation on the first preset control is received to the current moment is calculated in real time, and the above parameters for determining the background shooting parameters are obtained. The first sliding distance of the zoom scale.

步骤10112、根据所述第一滑动距离,调整第一预览图像的第一缩放比例。Step 10112: Adjust the first zoom ratio of the first preview image according to the first sliding distance.

上述步骤10112中,预先设置滑动距离与缩放比例之间的第二对应关系,再确定了第一滑动距离后,根据上述第二对应关系可以确定对应的第一缩放比例,再根据该第一缩放比例对第一预览图像进行缩放调整,以使第一预览图像的画面缩放效果达到用户需求。In the above step 10112, the second corresponding relationship between the sliding distance and the zoom ratio is preset, and after the first sliding distance is determined, the corresponding first zoom ratio can be determined according to the second corresponding relationship, and then the first zoom ratio can be determined according to the first zoom ratio. The first preview image is scaled and adjusted according to the ratio, so that the screen scaling effect of the first preview image can meet user requirements.

其中,在上述第二对应关系中,滑动距离越大,缩放比例越大,也即随着滑动距离延长,上述第一预览图像画面逐步放大;在第一预览图像画面放大至用户满意的状态时,用户停止对第一预设控件的滑动操作,第一预览图像画面停止放大;另外,在第一预览图像画面放大倍率达到至放大倍率上限值时,第一预览图像画面停止放大。上述放大倍率上限值可以设置为10倍。Wherein, in the above second corresponding relationship, the larger the sliding distance is, the larger the zoom ratio is, that is, as the sliding distance is extended, the above-mentioned first preview image is gradually enlarged; when the first preview image is enlarged to a state that the user is satisfied with , the user stops the sliding operation on the first preset control, and the first preview image screen stops enlarging; in addition, when the magnification ratio of the first preview image screen reaches the upper limit of the magnification ratio, the first preview image screen stops enlarging. The above-mentioned upper limit value of magnification can be set to 10 times.

步骤10313、获取所述滑动操作对所述第二预设控件的第二滑动距离。Step 10313: Obtain the second sliding distance of the sliding operation to the second preset control.

上述步骤10313中,在滑动第二预设控件的过程中,实时计算从接收到对第二预设控件的滑动操作开始至当前时刻的总滑动距离,得到上述用于确定后景拍摄参数中的缩放比例的第二滑动距离。In the above step 10313, in the process of sliding the second preset control, the total sliding distance from the moment when the sliding operation on the second preset control is received to the current moment is calculated in real time, and the above parameters for determining the background shooting parameters are obtained. The second sliding distance for the zoom scale.

步骤10314、根据所述第二滑动距离,调整第二预览图像的第二缩放比例。Step 10314: Adjust the second zoom ratio of the second preview image according to the second sliding distance.

上述步骤10314中,预先设置滑动距离与缩放比例之间的第二对应关系,再确定了第二滑动距离后,根据上述第二对应关系可以确定对应的第二缩放比例,再根据该第二缩放比例对第二预览图像进行缩放调整,以使第二预览图像的画面缩放效果达到用户需求。In the above step 10314, the second corresponding relationship between the sliding distance and the zoom ratio is preset, and after the second sliding distance is determined, the corresponding second zoom ratio can be determined according to the above-mentioned second corresponding relationship, and then the second zoom ratio can be determined according to the second zoom ratio. The second preview image is scaled and adjusted according to the ratio, so that the screen scaling effect of the second preview image can meet user requirements.

其中,在上述第二对应关系中,滑动距离越大,缩放比例越大,也即随着滑动距离延长,上述第二预览图像画面逐步放大;在第二预览图像画面放大至用户满意的状态时,用户停止对拍摄按钮的按压操作,第二预览图像画面停止放大;另外,在第二预览图像画面放大倍率达到至放大倍率上限值时,第二预览图像画面停止放大。上述放大倍率上限值可以设置为10倍。Wherein, in the above-mentioned second correspondence, the larger the sliding distance is, the larger the zoom ratio is, that is, as the sliding distance is extended, the above-mentioned second preview image is gradually enlarged; when the second preview image is enlarged to a state that the user is satisfied with , the user stops pressing the shooting button, and the second preview image stops enlarging; in addition, when the magnification of the second preview image reaches the upper limit of the magnification, the second preview image stops enlarging. The above-mentioned upper limit value of magnification can be set to 10 times.

本实施方式适用于用户通过滑动操作调整前景拍摄参数及后景拍摄参数中的缩放比例的场景,更易控制前、后景缩放比例,同时可记忆,方便用户下次拍照。This embodiment is suitable for a scenario where the user adjusts the zoom ratios in the foreground shooting parameters and the background shooting parameters through a sliding operation, and it is easier to control the zoom ratios of the front and rear scenes, and at the same time, it can be memorized, which is convenient for the user to take pictures next time.

例如,在开始进入双重曝光拍摄模式时,拍摄画面的显示效果如图7所示,图7中,同样将显示屏界面分为三个区域,顶部区域为一些常用功能键包括闪光灯和设置键,中间区域为拍摄画面的预览区域,底部区域则为拍摄按钮区域;在预览区域中显示完全重叠为待拍摄对象原始的预览图像的第一预览图像与第二预览图像,滤镜按钮,以及前景缩放比例滑块及后景缩放比例滑块;其中,前景缩放比例滑块及后景缩放比例滑块默认在中间位置,向左滑动前景缩放比例滑块,调节第一预览图像画面缩放比例,其显示效果如图8所示;向右滑动后景缩放比例滑块,调节第二预览图像画面缩放比例,其显示效果如图9所示。For example, when starting to enter the double exposure shooting mode, the display effect of the shooting screen is shown in Figure 7. In Figure 7, the display screen interface is also divided into three areas. The top area is some commonly used function keys including flash and setting keys. The middle area is the preview area of the shooting screen, and the bottom area is the shooting button area; in the preview area, the first preview image and the second preview image, the filter button, and the foreground zoom, which are completely overlapped with the original preview image of the object to be photographed, are displayed The scale slider and the background zoom ratio slider; among them, the foreground zoom ratio slider and the background zoom ratio slider are in the middle position by default. Slide the foreground zoom ratio slider to the left to adjust the zoom ratio of the first preview image. The effect is shown in Figure 8; slide the background zoom ratio slider to the right to adjust the zoom ratio of the second preview image, and the display effect is shown in Figure 9.

上述实施方式中,用户通过滑动第一预设控件及第二预设控件滑动距离的不同控制调整第二待拍摄对象的第一预览图像及第二预览图像的缩放比例,且实时显示调整后第二预览图像的画面大小,可以便捷且直观地根据前景图像画面及后景图像画面设定满足用户放大倍率需求的拍摄参数。In the above-mentioned embodiment, the user adjusts the zoom ratio of the first preview image and the second preview image of the second object to be photographed by sliding the first preset control and the sliding distance of the second preset control, and the adjusted first preview image and the second preview image are displayed in real time. 2. The screen size of the preview image can conveniently and intuitively set shooting parameters that meet the user's magnification requirements according to the foreground image screen and the background image screen.

可选地,在一种实施方式中,本发明实施例所提供的拍摄方法,在所述第一手势操作为对第三预设控件在第一方向的第一滑动操作的情况下,上述步骤 1011包括步骤10113~10114;在所述第三手势操作为对所述第三预设控件在第二方向的第二滑动操作的情况下,上述步骤1031包括步骤10315~10316。Optionally, in an implementation manner, in the shooting method provided by the embodiment of the present invention, in the case that the first gesture operation is a first sliding operation on the third preset control in the first direction, the above steps are performed. Step 1011 includes steps 10113-10114; if the third gesture operation is a second sliding operation on the third preset control in the second direction, the above step 1031 includes steps 10315-10316.

本实施方式中,第三预设控件为同时可用于调整前景拍摄参数中缩放比例以及可用于调整后景拍摄参数中缩放比例的控件,具体可以为显示于拍摄画面中的滑动控件。In this embodiment, the third preset control is a control that can be used to adjust the zoom ratio in the foreground shooting parameters and the zoom ratio in the background shooting parameters at the same time, and may be a sliding control displayed on the shooting screen.

步骤10113、获取所述第一滑动操作对所述第三预设控件的第三滑动距离。Step 10113: Acquire a third sliding distance of the first sliding operation to the third preset control.

上述步骤10113中,在第一方向上滑动第三预设控件的过程中,实时计算从接收到对第一预设控件的滑动操作开始至当前时刻的总滑动距离,得到上述用于确定后景拍摄参数中的缩放比例的第三滑动距离。In the above step 10113, in the process of sliding the third preset control in the first direction, the total sliding distance from the moment when the sliding operation on the first preset control is received to the current moment is calculated in real time, and the above-mentioned method for determining the background is obtained. The third sliding distance of the zoom ratio in the shooting parameters.

步骤10114、根据所述第三滑动距离,调整第一预览图像的第一缩放比例。Step 10114: Adjust the first zoom ratio of the first preview image according to the third sliding distance.

上述步骤10114中,预先设置滑动距离与缩放比例之间的第二对应关系,再确定了第三滑动距离后,根据上述第二对应关系可以确定对应的第一缩放比例,再根据该第一缩放比例对第一预览图像进行缩放调整,以使第一预览图像的画面缩放效果达到用户需求。In the above step 10114, the second corresponding relationship between the sliding distance and the zoom ratio is preset, and after the third sliding distance is determined, the corresponding first zoom ratio can be determined according to the second corresponding relationship, and then the first zoom ratio can be determined according to the first zoom ratio. The first preview image is scaled and adjusted according to the ratio, so that the screen scaling effect of the first preview image can meet user requirements.

步骤10315、获取所述第二滑动操作对所述第三预设控件的第四滑动距离。Step 10315: Obtain a fourth sliding distance of the second sliding operation to the third preset control.

上述步骤10315中,在第二方向上滑动第三预设控件的过程中,实时计算从接收到对第三预设控件的滑动操作开始至当前时刻的总滑动距离,得到上述用于确定后景拍摄参数中的缩放比例的第四滑动距离。In the above step 10315, in the process of sliding the third preset control in the second direction, the total sliding distance from the moment when the sliding operation to the third preset control is received to the current moment is calculated in real time, and the above-mentioned method for determining the background is obtained. The fourth sliding distance of the zoom ratio in the shooting parameters.

步骤10316、根据所述第四滑动距离,调整第二预览图像的第一缩放比例。Step 10316: Adjust the first zoom ratio of the second preview image according to the fourth sliding distance.

上述步骤10316中,预先设置滑动距离与缩放比例之间的第二对应关系,再确定了第四滑动距离后,根据上述第二对应关系可以确定对应的第二缩放比例,再根据该第二缩放比例对第二预览图像进行缩放调整,以使第二预览图像的画面缩放效果达到用户需求。In the above step 10316, the second corresponding relationship between the sliding distance and the zoom ratio is preset, and after the fourth sliding distance is determined, the corresponding second zoom ratio can be determined according to the second corresponding relationship, and then the second zoom ratio can be determined according to the second zoom ratio. The second preview image is scaled and adjusted according to the ratio, so that the screen scaling effect of the second preview image can meet user requirements.

本实施方式适用于用户通过对一个控件的不同方向的滑动操作调整前景拍摄参数及后景拍摄参数中的缩放比例的场景,更易控制前、后景缩放比例,同时可记忆,方便用户下次拍照。This embodiment is suitable for the scene where the user adjusts the zoom ratio in the foreground shooting parameters and the background shooting parameters by sliding operations on a control in different directions. .

可选地,在一种实施方式中,在上述步骤100之后,上述方法还包括步骤 105~106。Optionally, in an implementation manner, after the foregoingstep 100, the foregoing method further includes steps 105-106.

步骤105、将调整后的所述第一预览图像与调整后的所述第二预览图像合成为目标预览图像。Step 105: Synthesize the adjusted first preview image and the adjusted second preview image into a target preview image.

上述步骤105中,因为第一预览图像展示了用户通过第一子输入确定的前景拍摄参数对应的前景图像显示效果,而第二预览图像展示了用户通过第二子输入确定的后景拍摄参数对应的后景图像显示效果,因而利用图片合成技术,将上述第一预览图像与第二预览图像进行合成,得到前后景显示于上述前景拍摄参数及后景拍摄参数相匹配,且包含有上述第二待拍摄对象的双重曝光预览图像。In the above step 105, because the first preview image shows the display effect of the foreground image corresponding to the foreground shooting parameters determined by the user through the first sub-input, and the second preview image shows the corresponding background shooting parameters determined by the user through the second sub-input. Therefore, the above-mentioned first preview image and the second preview image are synthesized by using the picture synthesis technology, so as to obtain the front and back scenes displayed in the above-mentioned foreground shooting parameters and the background shooting parameters that match, and include the above-mentioned second A double-exposure preview image of the subject to be photographed.

步骤106、显示所述目标预览图像。Step 106: Display the target preview image.

上述步骤106中,在拍摄的显示画面中实时显示上述目标预览图像。In the above-mentioned step 106, the above-mentioned target preview image is displayed in real time on the captured display screen.

上述实施方式中,通过将用户调整后的第一预览图像与第二预览图像合成为目标预览图像并实时显示,使得用户可以即时预览查看利用当前所设置的前景拍摄参数及后景拍摄参数所拍摄的双重曝光图像,进而确定是否需要继续调整前景拍摄参数及后景拍摄参数,直至上述目标预览图像满足用户的拍摄效果需求。In the above embodiment, by synthesizing the first preview image and the second preview image adjusted by the user into a target preview image and displaying it in real time, the user can instantly preview and view the images captured using the currently set foreground shooting parameters and background shooting parameters. and then determine whether it is necessary to continue to adjust the foreground shooting parameters and the background shooting parameters until the above-mentioned target preview image meets the user's shooting effect requirements.

可选地,在一种实施方式中,在执行步骤100之前,还需控制电子设备进入可以按预设模式进行拍照的多重曝光拍摄模式,只有在电子设备处于多重曝光拍摄模式的情况下,才会执行后续步骤100,否则进入常规拍摄模式并进行常规拍摄,使得用户可以根据需要选择开启或关闭多重曝光拍摄模式。Optionally, in one embodiment, beforestep 100 is executed, the electronic device needs to be controlled to enter a multiple exposure shooting mode that can take pictures in a preset mode, and only when the electronic device is in the multiple exposure shooting modeSubsequent step 100 will be executed, otherwise, the normal shooting mode will be entered and regular shooting will be performed, so that the user can choose to turn on or off the multiple exposure shooting mode as required.

需要说明的是,本申请实施例提供的拍摄方法,执行主体可以为终端设备,或者该终端设备中的用于执行加载拍摄方法的控制模块。本申请实施例中以终端设备执行加载拍摄方法为例,说明本申请实施例提供的拍摄方法。It should be noted that, in the shooting method provided by the embodiment of the present application, the execution subject may be a terminal device, or a control module in the terminal device for executing the loading and shooting method. In the embodiments of the present application, the method for performing loading and shooting performed by a terminal device is used as an example to describe the shooting methods provided by the embodiments of the present application.

请参阅图10,示出了本申请实施例提供的一种拍摄装置的结构示意图,所述装置应用于包含摄像头的电子设备,如图10所示,所述装置包括:Please refer to FIG. 10 , which shows a schematic structural diagram of a photographing apparatus provided by an embodiment of the present application. The apparatus is applied to an electronic device including a camera. As shown in FIG. 10 , the apparatus includes:

确定模块1001,用于响应于用户的第一输入,确定前景拍摄参数及后景拍摄参数;Adetermination module 1001, configured to determine the foreground shooting parameters and the background shooting parameters in response to the first input of the user;

拍摄模块1002,用于响应于用户的第二输入,控制所述摄像头对第一待拍摄对象进行拍摄,得到第一图像;a photographingmodule 1002, configured to control the camera to photograph the first object to be photographed in response to the second input of the user to obtain a first image;

第一处理模块1003,用于依据所述前景拍摄参数对所述第一图像进行处理,得到第二图像;afirst processing module 1003, configured to process the first image according to the foreground shooting parameters to obtain a second image;

第二处理模块1004,用于依据所述后景拍摄参数对所述第一图像进行处理,得到第三图像;Asecond processing module 1004, configured to process the first image according to the background shooting parameters to obtain a third image;

第三处理模块1005,用于对所述第二图像与所述第三图像进行合成,生成目标图像。Thethird processing module 1005 is configured to combine the second image and the third image to generate a target image.

可选地,所述的拍摄装置中,所述第一输入包括对第二待拍摄对象的预览图像的第一子输入与第二子输入;所述预览图像包括第一预览图像与第二预览图像,所述确定模块1001包括:Optionally, in the shooting device, the first input includes a first sub-input and a second sub-input of a preview image of the second object to be captured; the preview image includes a first preview image and a second preview image, the determiningmodule 1001 includes:

第一调整子模块,用于根据所述第一子输入,调整所述第二待拍摄对象的第一预览图像;a first adjustment sub-module, configured to adjust the first preview image of the second object to be photographed according to the first sub-input;

第一确定子模块,用于根据调整后的所述第一预览图像,确定前景拍摄参数;a first determination submodule, configured to determine foreground shooting parameters according to the adjusted first preview image;

第二调整子模块,用于根据所述第二子输入,调整所述第二待拍摄对象的第二预览图像;a second adjustment sub-module, configured to adjust the second preview image of the second object to be photographed according to the second sub-input;

第二确定子模块,用于根据调整后的所述第二预览图像,确定后景拍摄参数。The second determination sub-module is configured to determine the background shooting parameters according to the adjusted second preview image.

可选地,所述的拍摄装置还包括:Optionally, the photographing device further includes:

合成模块,用于在所述响应于用户的第一输入,确定前景拍摄参数及后景拍摄参数的步骤之后,将调整后的所述第一预览图像与调整后的所述第二预览图像合成为目标预览图像;a synthesis module, for synthesizing the adjusted first preview image and the adjusted second preview image after the step of determining the foreground shooting parameters and the background shooting parameters in response to the user's first input Preview the image for the target;

显示模块,用于显示所述目标预览图像。The display module is used for displaying the target preview image.

可选地,所述的拍摄装置中,所述第一调整子模块包括:Optionally, in the photographing device, the first adjustment sub-module includes:

第一调整单元,用于根据第一手势操作,调整所述第一预览图像的第一缩放比例;a first adjustment unit, configured to adjust a first zoom ratio of the first preview image according to a first gesture operation;

第二调整单元,用于根据第二手势操作,调整所述第一预览图像的第一滤镜效果;a second adjustment unit, configured to adjust the first filter effect of the first preview image according to the second gesture operation;

所述第二调整子模块包括:The second adjustment submodule includes:

第三调整单元,用于根据第三手势操作,调整所述第二预览图像的第二缩放比例;a third adjustment unit, configured to adjust the second zoom ratio of the second preview image according to the third gesture operation;

第四调整单元,用于根据第四手势操作,调整所述第二预览图像的第二滤镜效果。The fourth adjustment unit is configured to adjust the second filter effect of the second preview image according to the fourth gesture operation.

可选地,所述的拍摄装置中,所述第三调整单元包括:Optionally, in the photographing device, the third adjustment unit includes:

第一获取子单元,用于在所述第三手势操作为对拍摄按钮的按压操作的情况下,获取所述按压操作对拍摄按钮的按压时长;a first obtaining subunit, configured to obtain the pressing duration of the shooting button by the pressing operation when the third gesture operation is a pressing operation on the shooting button;

第一调整子单元,用于根据所述按压时长,调整所述第二预览图像的第二缩放比例。The first adjustment subunit is configured to adjust the second zoom ratio of the second preview image according to the pressing duration.

可选地,所述的拍摄装置中,所述第一调整单元包括:Optionally, in the photographing device, the first adjustment unit includes:

第二获取子单元,用于在所述第一手势操作为对第一预设控件的滑动操作的情况下,获取所述滑动操作对所述第一预设控件的第一滑动距离;a second acquiring subunit, configured to acquire a first sliding distance of the sliding operation on the first preset control when the first gesture operation is a sliding operation on the first preset control;

第二调整子单元,用于根据所述第一滑动距离,调整第一预览图像的第一缩放比例。The second adjustment subunit is configured to adjust the first zoom ratio of the first preview image according to the first sliding distance.

可选地,所述的拍摄装置中,在所述第一手势操作为对第三预设控件在第一方向的第一滑动操作的情况下,所述第一调整单元包括:Optionally, in the shooting device, when the first gesture operation is a first sliding operation on a third preset control in a first direction, the first adjustment unit includes:

第三获取子单元,用于获取所述第一滑动操作对所述第三预设控件的第三滑动距离;a third acquiring subunit, configured to acquire the third sliding distance of the first sliding operation to the third preset control;

第三调整子单元,用于根据所述第三滑动距离,调整第一预览图像的第一缩放比例;a third adjustment subunit, configured to adjust the first zoom ratio of the first preview image according to the third sliding distance;

在所述第三手势操作为对所述第三预设控件在第二方向的第二滑动操作的情况下,所述第三调整单元包括:When the third gesture operation is a second sliding operation on the third preset control in the second direction, the third adjustment unit includes:

第四获取子单元,用于获取所述第二滑动操作对所述第三预设控件的第四滑动距离;a fourth obtaining subunit, configured to obtain the fourth sliding distance of the second sliding operation to the third preset control;

第四调整子单元,用于根据所述第四滑动距离,调整第二预览图像的第一缩放比例。The fourth adjustment subunit is configured to adjust the first zoom ratio of the second preview image according to the fourth sliding distance.

本申请实施例中的拍摄装置可以是装置,也可以是终端中的部件、集成电路、或芯片。该装置可以是移动电子设备,也可以为非移动电子设备。示例性的,移动电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、可穿戴设备、超级移动个人计算机(ultra-mobile personal computer, UMPC)、上网本或者个人数字助理(personaldigital assistant,PDA)等,非移动电子设备可以为服务器、网络附属存储器(NetworkAttached Storage,NAS)、个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。The photographing device in this embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal. The apparatus may be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (personal digital assistant). , PDA), etc., the non-mobile electronic device may be a server, a network attached storage (NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc. The embodiments of the present application There is no specific limitation.

本申请实施例中的拍摄装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为ios操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。The photographing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, which are not specifically limited in the embodiments of the present application.

本申请实施例提供的拍摄装置能够实现图1~9的方法实施例中拍摄装置实现的各个过程,为避免重复,这里不再赘述。The photographing apparatus provided in the embodiments of the present application can implement each process implemented by the photographing apparatus in the method embodiments of FIGS. 1 to 9 , and to avoid repetition, details are not described herein again.

本申请实施例中,先由确定模块1001确定前景拍摄参数及后景拍摄参数;再由拍摄模块1002控制摄像头对待拍摄对象进行拍摄,得到第一图像;然后由第一处理模块1003依据上述前景拍摄参数对第一图像进行处理,得到第二图像;由第二处理模块1004依据上述后景拍摄参数对上述第一图像进行处理,得到第三图像;最后由第三处理模块1005对上述第二图像与第三图像进行合成,生成目标图像。上述拍摄方式中,先确定用于进行图像处理的前景拍摄参数及后景拍摄参数,后续通过一次拍摄操作得到第一图像后,即可基于前景拍摄参数及后景拍摄参数,自动将上述每张第一图像对应处理为第二图像及第二图像,并合成为目标图像,省去了现有技术中进行双重曝光拍摄时进行多次拍摄的繁琐操作。In the embodiment of the present application, thedetermination module 1001 determines the foreground shooting parameters and the background shooting parameters; then theshooting module 1002 controls the camera to shoot the object to be shot to obtain a first image; then thefirst processing module 1003 shoots according to the above foreground The first image is processed by the parameters to obtain the second image; thesecond processing module 1004 processes the first image according to the above-mentioned background shooting parameters to obtain the third image; finally, thethird processing module 1005 processes the above-mentioned second image Combining with the third image to generate the target image. In the above shooting method, the foreground shooting parameters and the background shooting parameters for image processing are first determined, and after obtaining the first image through one shooting operation, each of the above can be automatically based on the foreground shooting parameters and the background shooting parameters. The first image is correspondingly processed into the second image and the second image, and is synthesized into a target image, which saves the tedious operation of performing multiple shots when performing double exposure shooting in the prior art.

可选的,本申请实施例还提供一种电子设备,包括处理器,存储器,存储在存储器上并可在所述处理器上运行的程序或指令,该程序或指令被处理器执行时实现上述拍摄方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Optionally, an embodiment of the present application further provides an electronic device, including a processor, a memory, a program or an instruction stored in the memory and executable on the processor, and the program or instruction is executed by the processor to implement the above. Each process of the embodiment of the photographing method can achieve the same technical effect, and to avoid repetition, it will not be repeated here.

需要注意的是,本申请实施例中的电子设备包括上述所述的移动电子设备和非移动电子设备。It should be noted that the electronic devices in the embodiments of the present application include the aforementioned mobile electronic devices and non-mobile electronic devices.

图11为实现本申请实施例的一种电子设备的硬件结构示意图。FIG. 11 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.

该电子设备110包括但不限于:射频单元1101、网络模块1102、音频输出单元1103、输入单元1104、传感器1105、显示单元1106、用户输入单元1107、接口单元1108、存储器1109、以及处理器1110等部件。Theelectronic device 110 includes but is not limited to: aradio frequency unit 1101, anetwork module 1102, anaudio output unit 1103, aninput unit 1104, asensor 1105, adisplay unit 1106, auser input unit 1107, aninterface unit 1108, amemory 1109, aprocessor 1110, etc. part.

本领域技术人员可以理解,电子设备110还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器1110逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图11中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。Those skilled in the art can understand that theelectronic device 110 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to theprocessor 1110 through a power management system, so as to manage charging, discharging, and power management through the power management system. consumption management and other functions. The structure of the electronic device shown in FIG. 11 does not constitute a limitation on the electronic device. The electronic device may include more or less components than those shown in the figure, or combine some components, or arrange different components, which will not be repeated here. .

其中,用户输入单元1109,在本申请实施例中包括显示界面;Wherein, theuser input unit 1109 includes a display interface in this embodiment of the present application;

其中,输入单元1104,在本申请实施例中包括摄像头;Wherein, theinput unit 1104 includes a camera in this embodiment of the present application;

处理器1110,用于响应于用户通过用户输入单元1109输入的第一输入,确定前景拍摄参数及后景拍摄参数;响应于用户的第二输入,控制所述摄像头对第一待拍摄对象进行拍摄,得到第一图像;依据所述前景拍摄参数对所述第一图像进行处理,得到第二图像;依据所述后景拍摄参数对所述第一图像进行处理,得到第三图像;对所述第二图像与所述第三图像进行合成,生成目标图像。Theprocessor 1110 is configured to determine the foreground shooting parameters and the background shooting parameters in response to the first input input by the user through theuser input unit 1109; in response to the second input of the user, control the camera to shoot the first object to be shot , obtain a first image; process the first image according to the foreground shooting parameters to obtain a second image; process the first image according to the background shooting parameters to obtain a third image; The second image is combined with the third image to generate a target image.

本申请实施例提供的电子设备,电子设备包含有摄像头,在进行双重曝光拍摄时,先确定用于进行图像处理的前景拍摄参数及后景拍摄参数,后续通过一次拍摄操作得到第一图像后,即可基于前景拍摄参数及后景拍摄参数,自动将上述每张第一图像对应处理为第二图像及第二图像,并合成为目标图像,省去了现有技术中进行双重曝光拍摄时进行多次拍摄的繁琐操作。In the electronic device provided by the embodiment of the present application, the electronic device includes a camera. When performing double exposure shooting, first determine the foreground shooting parameters and background shooting parameters for image processing, and then obtain the first image through one shooting operation. That is, based on the foreground shooting parameters and the background shooting parameters, each of the above-mentioned first images is automatically processed into a second image and a second image correspondingly, and synthesized into a target image, eliminating the need for double exposure shooting in the prior art. The tedious operation of multiple shots.

可选的,所述第一输入包括对第二待拍摄对象的预览图像的第一子输入与第二子输入;所述预览图像包括第一预览图像与第二预览图像;处理器1110,具体用于根据所述第一子输入,调整所述第二待拍摄对象的第一预览图像;根据调整后的所述第一预览图像,确定前景拍摄参数;根据所述第二子输入,调整所述第二待拍摄对象的第二预览图像;根据调整后的所述第二预览图像,确定后景拍摄参数。Optionally, the first input includes a first sub-input and a second sub-input of a preview image of the second object to be shot; the preview image includes a first preview image and a second preview image; theprocessor 1110, specifically is used for adjusting the first preview image of the second object to be shot according to the first sub-input; determining the foreground shooting parameters according to the adjusted first preview image; adjusting all the parameters according to the second sub-input the second preview image of the second object to be photographed; and the background shooting parameters are determined according to the adjusted second preview image.

可选地,处理器1110,还用于在所述响应于用户的第一输入,确定前景拍摄参数及后景拍摄参数的步骤之后,将调整后的所述第一预览图像与调整后的所述第二预览图像合成为目标预览图像;显示所述目标预览图像。Optionally, theprocessor 1110 is further configured to, after the step of determining the foreground shooting parameters and the background shooting parameters in response to the first input of the user, compare the adjusted first preview image with the adjusted all the parameters. The second preview image is synthesized into a target preview image; and the target preview image is displayed.

可选地,处理器1110,具体用于根据第一手势操作,调整所述第一预览图像的第一缩放比例;根据第二手势操作,调整所述第一预览图像的第一滤镜效果;根据第三手势操作,调整所述第二预览图像的第二缩放比例;根据第四手势操作,调整所述第二预览图像的第二滤镜效果。Optionally, theprocessor 1110 is specifically configured to adjust the first zoom ratio of the first preview image according to the first gesture operation; and adjust the first filter effect of the first preview image according to the second gesture operation ; according to the third gesture operation, adjust the second zoom ratio of the second preview image; according to the fourth gesture operation, adjust the second filter effect of the second preview image.

可选地,处理器1110,具体用于在所述第三手势操作为对拍摄按钮的按压操作的情况下,获取所述按压操作对拍摄按钮的按压时长;根据所述按压时长,调整所述第二预览图像的第二缩放比例。Optionally, theprocessor 1110 is specifically configured to, in the case that the third gesture operation is a pressing operation on the shooting button, obtain the pressing duration of the pressing operation on the shooting button; and adjust the pressing duration according to the pressing duration. The second zoom ratio of the second preview image.

可选地,处理器1110,具体用于在所述第一手势操作为对第一预设控件的滑动操作的情况下,获取所述滑动操作对所述第一预设控件的第一滑动距离;根据所述第一滑动距离,调整第一预览图像的第一缩放比例。Optionally, theprocessor 1110 is specifically configured to acquire a first sliding distance of the sliding operation on the first preset control when the first gesture operation is a sliding operation on the first preset control ; adjust the first zoom ratio of the first preview image according to the first sliding distance.

可选地,处理器1110,具体用于在所述第一手势操作为对第三预设控件在第一方向的第一滑动操作的情况下,获取所述第一滑动操作对所述第三预设控件的第三滑动距离;根据所述第三滑动距离,调整第一预览图像的第一缩放比例;以及用于在所述第三手势操作为对所述第三预设控件在第二方向的第二滑动操作的情况下,获取所述第二滑动操作对所述第三预设控件的第四滑动距离;根据所述第四滑动距离,调整第二预览图像的第一缩放比例。Optionally, theprocessor 1110 is specifically configured to, in the case that the first gesture operation is a first sliding operation on a third preset control in a first direction, obtain the effect of the first sliding operation on the third a third sliding distance of the preset control; adjusting the first zoom ratio of the first preview image according to the third sliding distance; In the case of a second sliding operation in the direction of the second sliding operation, a fourth sliding distance of the second sliding operation to the third preset control is obtained; according to the fourth sliding distance, the first zoom ratio of the second preview image is adjusted.

本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述拍摄方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。The embodiments of the present application further provide a readable storage medium, where a program or an instruction is stored on the readable storage medium. When the program or instruction is executed by a processor, each process of the above-mentioned embodiments of the shooting method can be achieved, and the same can be achieved. The technical effect, in order to avoid repetition, will not be repeated here.

其中,所述处理器为上述实施例中所述的电子设备中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。Wherein, the processor is the processor in the electronic device described in the foregoing embodiments. The readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.

本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述拍摄方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement each of the foregoing shooting method embodiments process, and can achieve the same technical effect, in order to avoid repetition, it will not be repeated here.

应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。It should be understood that the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, a system-on-chip, a system-on-a-chip, or a system-on-a-chip, or the like.

需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。It should be noted that, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements, It also includes other elements not expressly listed or inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element. Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing the functions in a substantially simultaneous manner or in the reverse order depending on the functions involved. To perform functions, for example, the described methods may be performed in an order different from that described, and various steps may also be added, omitted, or combined. Additionally, features described with reference to some examples may be combined in other examples.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the method of the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is better implementation. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence or in a part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, CD-ROM), including several instructions to make a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in the various embodiments of this application.

上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。The embodiments of the present application have been described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific embodiments, which are merely illustrative rather than restrictive. Under the inspiration of this application, without departing from the scope of protection of the purpose of this application and the claims, many forms can be made, which all fall within the protection of this application.

Claims (10)

Translated fromChinese
1.一种拍摄方法,应用于包含摄像头的电子设备,其特征在于,所述方法包括:1. a method of shooting, applied to an electronic device comprising a camera, wherein the method comprises:响应于用户的第一输入,确定前景拍摄参数及后景拍摄参数;In response to the user's first input, determine the foreground shooting parameters and the background shooting parameters;响应于用户的第二输入,控制所述摄像头对第一待拍摄对象进行拍摄,得到第一图像;In response to the user's second input, controlling the camera to photograph the first object to be photographed to obtain a first image;依据所述前景拍摄参数对所述第一图像进行处理,得到第二图像;processing the first image according to the foreground shooting parameters to obtain a second image;依据所述后景拍摄参数对所述第一图像进行处理,得到第三图像;processing the first image according to the background shooting parameters to obtain a third image;将所述第二图像与所述第三图像进行合成,生成目标图像。The second image and the third image are combined to generate a target image.2.根据权利要求1所述的拍摄方法,其特征在于,所述第一输入包括对第二待拍摄对象的预览图像的第一子输入与第二子输入;所述预览图像包括第一预览图像与第二预览图像;2 . The shooting method according to claim 1 , wherein the first input includes a first sub-input and a second sub-input of a preview image of the second object to be captured; the preview image includes a first preview. 3 . image and the second preview image;所述响应于用户的第一输入,确定前景拍摄参数及后景拍摄参数的步骤,包括:The step of determining the foreground shooting parameters and the background shooting parameters in response to the user's first input includes:根据所述第一子输入,调整所述第二待拍摄对象的第一预览图像;adjusting the first preview image of the second object to be photographed according to the first sub-input;根据调整后的所述第一预览图像,确定前景拍摄参数;determining foreground shooting parameters according to the adjusted first preview image;根据所述第二子输入,调整所述第二待拍摄对象的第二预览图像;adjusting the second preview image of the second object to be photographed according to the second sub-input;根据调整后的所述第二预览图像,确定后景拍摄参数。The background shooting parameters are determined according to the adjusted second preview image.3.根据权利要求2所述的拍摄方法,其特征在于,在所述响应于用户的第一输入,确定前景拍摄参数及后景拍摄参数的步骤之后,还包括:3. The shooting method according to claim 2, characterized in that, after the step of determining the foreground shooting parameters and the background shooting parameters in response to the first input of the user, further comprising:将调整后的所述第一预览图像与调整后的所述第二预览图像合成为目标预览图像;combining the adjusted first preview image and the adjusted second preview image into a target preview image;显示所述目标预览图像。The target preview image is displayed.4.根据权利要求2所述的拍摄方法,其特征在于,所述根据所述第一子输入,调整所述第二待拍摄对象的第一预览图像的步骤,包括:The photographing method according to claim 2, wherein the step of adjusting the first preview image of the second object to be photographed according to the first sub-input comprises:根据第一手势操作,调整所述第一预览图像的第一缩放比例;adjusting the first zoom ratio of the first preview image according to the first gesture operation;根据第二手势操作,调整所述第一预览图像的第一滤镜效果;adjusting the first filter effect of the first preview image according to the second gesture operation;所述根据所述第二子输入,调整所述第二待拍摄对象的第二预览图像的步骤,包括:The step of adjusting the second preview image of the second object to be photographed according to the second sub-input includes:根据第三手势操作,调整所述第二预览图像的第二缩放比例;adjusting the second zoom ratio of the second preview image according to the third gesture operation;根据第四手势操作,调整所述第二预览图像的第二滤镜效果。According to the fourth gesture operation, the second filter effect of the second preview image is adjusted.5.根据权利要求4所述的拍摄方法,其特征在于,在所述第三手势操作为对拍摄按钮的按压操作的情况下,所述根据第三手势操作,调整所述第二预览图像的第二缩放比例的步骤,包括:5 . The photographing method according to claim 4 , wherein, when the third gesture operation is a pressing operation on a photographing button, the adjusting the second preview image according to the third gesture operation. 6 . The second scaling step includes:获取所述按压操作对拍摄按钮的按压时长;obtaining the pressing duration of the pressing operation on the shooting button;根据所述按压时长,调整所述第二预览图像的第二缩放比例。According to the pressing duration, the second zoom ratio of the second preview image is adjusted.6.根据权利要求4所述的拍摄方法,其特征在于,在所述第一手势操作为对第一预设控件的滑动操作的情况下,所述根据第一手势操作,调整所述第一预览图像的第一缩放比例的步骤,包括:6 . The shooting method according to claim 4 , wherein when the first gesture operation is a sliding operation on a first preset control, the adjusting the first gesture operation according to the first gesture operation is performed. 7 . The steps of previewing the first scale of the image include:获取所述滑动操作对所述第一预设控件的第一滑动距离;obtaining the first sliding distance of the sliding operation to the first preset control;根据所述第一滑动距离,调整第一预览图像的第一缩放比例。According to the first sliding distance, the first zoom ratio of the first preview image is adjusted.7.根据权利要求4所述的拍摄方法,其特征在于,在所述第一手势操作为对第三预设控件在第一方向的第一滑动操作的情况下,所述根据第一手势操作,调整所述第一预览图像的第一缩放比例的步骤,包括:7 . The shooting method according to claim 4 , wherein when the first gesture operation is a first sliding operation on a third preset control in a first direction, the operation according to the first gesture , the step of adjusting the first zoom ratio of the first preview image includes:获取所述第一滑动操作对所述第三预设控件的第三滑动距离;acquiring a third sliding distance of the first sliding operation to the third preset control;根据所述第三滑动距离,调整第一预览图像的第一缩放比例;adjusting the first zoom ratio of the first preview image according to the third sliding distance;在所述第三手势操作为对所述第三预设控件在第二方向的第二滑动操作的情况下,所述根据第三手势操作,调整所述第二预览图像的第二缩放比例的步骤,包括:When the third gesture operation is a second sliding operation on the third preset control in the second direction, the adjustment of the second zoom ratio of the second preview image according to the third gesture operation steps, including:获取所述第二滑动操作对所述第三预设控件的第四滑动距离;obtaining a fourth sliding distance of the second sliding operation to the third preset control;根据所述第四滑动距离,调整第二预览图像的第一缩放比例。According to the fourth sliding distance, the first zoom ratio of the second preview image is adjusted.8.一种拍摄装置,应用于包含摄像头的电子设备,其特征在于,所述装置包括:8. A photographing device, applied to an electronic device comprising a camera, wherein the device comprises:确定模块,用于响应于用户的第一输入,确定前景拍摄参数及后景拍摄参数;a determining module, configured to determine the foreground shooting parameters and the background shooting parameters in response to the first input of the user;拍摄模块,用于响应于用户的第二输入,控制所述摄像头对第一待拍摄对象进行拍摄,得到第一图像;a photographing module, configured to control the camera to photograph the first object to be photographed to obtain a first image in response to the second input of the user;第一处理模块,用于依据所述前景拍摄参数对所述第一图像进行处理,得到第二图像;a first processing module, configured to process the first image according to the foreground shooting parameters to obtain a second image;第二处理模块,用于依据所述后景拍摄参数对所述第一图像进行处理,得到第三图像;a second processing module, configured to process the first image according to the background shooting parameters to obtain a third image;第三处理模块,用于对所述第二图像与所述第三图像进行合成,生成目标图像。The third processing module is used for synthesizing the second image and the third image to generate a target image.9.一种电子设备,其特征在于,包括处理器,存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如权利要求1-7任一项所述的拍摄方法的步骤。9. An electronic device, characterized in that it comprises a processor, a memory, and a program or instruction that is stored on the memory and can be run on the processor, and the program or instruction is implemented when the processor is executed. The steps of the photographing method according to any one of claims 1-7.10.一种可读存储介质,其特征在于,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如权利要求1-7任一项所述的拍摄方法的步骤。10. A readable storage medium, wherein a program or an instruction is stored on the readable storage medium, and when the program or instruction is executed by a processor, the shooting method according to any one of claims 1-7 is implemented A step of.
CN202110122070.4A2021-01-262021-01-26Shooting method and device and electronic equipmentActiveCN112887624B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202110122070.4ACN112887624B (en)2021-01-262021-01-26Shooting method and device and electronic equipment

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202110122070.4ACN112887624B (en)2021-01-262021-01-26Shooting method and device and electronic equipment

Publications (2)

Publication NumberPublication Date
CN112887624A CN112887624A (en)2021-06-01
CN112887624Btrue CN112887624B (en)2022-08-09

Family

ID=76053291

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202110122070.4AActiveCN112887624B (en)2021-01-262021-01-26Shooting method and device and electronic equipment

Country Status (1)

CountryLink
CN (1)CN112887624B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN113923367B (en)*2021-11-242024-04-12维沃移动通信有限公司 Shooting method and shooting device

Family Cites Families (16)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
JP3870124B2 (en)*2002-06-142007-01-17キヤノン株式会社 Image processing apparatus and method, computer program, and computer-readable storage medium
JP4861952B2 (en)*2007-09-282012-01-25富士フイルム株式会社 Image processing apparatus and imaging apparatus
JP2014150313A (en)*2013-01-312014-08-21Xacti CorpImage pickup device
CN105262953B (en)*2015-10-302018-11-16努比亚技术有限公司A kind of mobile terminal and its method of control shooting
CN106303250A (en)*2016-08-262017-01-04维沃移动通信有限公司A kind of image processing method and mobile terminal
CN106851063A (en)*2017-02-272017-06-13努比亚技术有限公司A kind of exposure regulation terminal and method based on dual camera
CN107197169B (en)*2017-06-222019-12-06维沃移动通信有限公司 A high dynamic range image shooting method and mobile terminal
CN107623818B (en)*2017-10-302020-04-17维沃移动通信有限公司Image exposure method and mobile terminal
CN107948517B (en)*2017-11-302020-05-15Oppo广东移动通信有限公司 Preview image blur processing method, device and device
CN108156366A (en)*2017-11-302018-06-12维沃移动通信有限公司A kind of image capturing method and mobile device based on dual camera
JP2020027409A (en)*2018-08-102020-02-20ソニー株式会社Image processing device, image processing method, and program
JP2020108057A (en)*2018-12-282020-07-09ソニー株式会社 Imaging device, imaging method, and program
CN110047057A (en)*2019-03-052019-07-23惠州Tcl移动通信有限公司A kind of image processing method, terminal and storage device
CN110493538B (en)*2019-08-162021-08-24Oppo广东移动通信有限公司 Image processing method, device, storage medium and electronic device
CN110891145B (en)*2019-12-022021-08-17联想(北京)有限公司Method for obtaining image by photographing and electronic equipment
CN111724470B (en)*2020-06-302023-08-18联想(北京)有限公司Processing method and electronic equipment

Also Published As

Publication numberPublication date
CN112887624A (en)2021-06-01

Similar Documents

PublicationPublication DateTitle
CN112312016B (en)Shooting processing method and device, electronic equipment and readable storage medium
CN112492212B (en) Photographing method, device, electronic device and storage medium
CN112887617B (en) A shooting method, device and electronic equipment
EP3346329B1 (en)Image processing method and apparatus
CN108377341A (en)photographing method, device, terminal and storage medium
CN112532881B (en) Image processing method, device and electronic device
CN112135046A (en)Video shooting method, video shooting device and electronic equipment
CN112087579B (en) Video shooting method, device and electronic device
CN114125179B (en)Shooting method and device
CN112839166A (en)Shooting method and device and electronic equipment
CN112637515B (en)Shooting method and device and electronic equipment
CN112584043B (en)Auxiliary focusing method and device, electronic equipment and storage medium
WO2022161240A1 (en)Photographing method and apparatus, electronic device, and medium
CN106254765A (en) Double camera zoom processing method, device and terminal equipment
WO2022237839A1 (en)Photographing method and apparatus, and electronic device
CN116980759A (en) Photography method, terminal, electronic equipment and readable storage medium
CN116320769A (en) Exposure adjustment method, device, electronic device and readable storage medium
JP2010041365A (en)Imaging apparatus
CN112887624B (en)Shooting method and device and electronic equipment
CN114785969A (en)Shooting method and device
CN114390206A (en) Shooting method, device and electronic device
CN114245018A (en) Image capturing method and device thereof
CN112367464A (en)Image output method and device and electronic equipment
CN112653841B (en)Shooting method and device and electronic equipment
CN114125276B (en) Image processing method and device

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp