




技术领域technical field
本申请属于拍照技术领域,具体涉及一种拍照方法、装置及电子设备。The present application belongs to the field of photography technology, and specifically relates to a photography method, device and electronic equipment.
背景技术Background technique
目前,为拍摄一张画质优良、影调优异的星空作品,首先,电子设备需要借助摄影硬件例如赤道仪,拍摄多张图像,然后将多张图像输入到专门进行图像处理的软件中进行后期处理得到最终的图像。即在拍摄过程中,需要进行较多的操作步骤,拍摄较耗时,容易导致拍摄效率较差。At present, in order to shoot a starry sky work with excellent image quality and excellent tone, first, electronic equipment needs to use photographic hardware such as equatorial mounts to shoot multiple images, and then input multiple images into special image processing software for post-processing. Process to get the final image. That is, during the shooting process, many operation steps need to be performed, and the shooting is time-consuming, which may easily lead to poor shooting efficiency.
发明内容SUMMARY OF THE INVENTION
本申请实施例的目的是提供一种拍摄方法、装置及电子设备,能够解决现有为拍摄画质较好的星空图像,过程复杂,导致拍摄效率较差的问题。The purpose of the embodiments of the present application is to provide a photographing method, device and electronic device, which can solve the problem that the existing sky images with better picture quality are photographed, the process is complicated, and the photographing efficiency is poor.
为了解决上述技术问题,本申请是这样实现的: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 photographing method, the method comprising:
接收用户的第一输入,响应于所述第一输入,获得N帧第一图像,N为大于1的整数;receiving a first input from the user, and in response to the first input, obtaining N frames of first images, where N is an integer greater than 1;
以第一目标图像为基准,将第二目标图像与所述第一目标图像对齐,所述第一目标图像为所述N帧第一图像中的图像,所述第二目标图像为所述N帧第一图像中除所述第一目标图像外的其他图像;Using the first target image as a benchmark, align the second target image with the first target image, the first target image is the image in the N frames of the first image, and the second target image is the N frame Frame other images except the first target image in the first image;
将所述第一目标图像以及对齐后的第二目标图像进行融合处理,得到拍照图像。The first target image and the aligned second target image are fused to obtain a photographed image.
第二方面,本申请实施例提供了一种拍照装置,所述装置包括:In a second aspect, an embodiment of the present application provides a photographing device, and the device includes:
接收模块,用于接收用户的第一输入;a receiving module for receiving the first input of the user;
帧图像获取模块,用于响应于所述第一输入,获得N帧第一图像,N为大于1的整数;a frame image acquisition module, configured to acquire N frames of first images in response to the first input, where N is an integer greater than 1;
对齐模块,用于以第一目标图像为基准,将第二目标图像与所述第一目标图像对齐,所述第一目标图像为所述N帧第一图像中的图像,所述第二目标图像为所述N帧第一图像中除所述第一目标图像外的其他图像;an alignment module for aligning a second target image with the first target image based on the first target image, where the first target image is an image in the N frames of the first image, and the second target image is The image is an image other than the first target image in the N frames of first images;
融合处理,用于将所述第一目标图像以及对齐后的第二目标图像进行融合处理,得到拍照图像。The fusion processing is used to perform fusion processing on the first target image and the aligned second target image to obtain a photographed 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.
在本申请实施例中,因为是以抓帧得到的N帧第一图像中的第一目标图像为基准,对N帧第一图像中的第二目标图像进行旋转,旋转后的第二目标图像与所述第一目标图像对齐,将第一目标图像和与其对齐的旋转后的第二目标图像进行融合得到拍照图像即可,提高拍照图像的质量,如此,在拍摄星空图像过程中,无需额外操作拍摄硬件,也无需对电子设备拍摄的照片输入其他软件中进行后期处理,本申请实施例的方法只需用户进行第一输入,通过电子设备对N帧第一图像中的第二目标图像与第一目标图像对齐,将第一目标图像和与其对齐的第二目标图像进行融合得到拍照图像即可提高拍摄质量,操作简洁,可提高拍摄效率。In the embodiment of the present application, because the first target image in the N frames of first images obtained by capturing the frame is used as the benchmark, the second target image in the N frames of the first image is rotated, and the rotated second target image Align with the first target image, and fuse the first target image and the rotated second target image aligned with it to obtain a photographed image, so as to improve the quality of the photographed image. In this way, in the process of photographing a starry sky image, no additional To operate the shooting hardware, there is no need to input the photos taken by the electronic device into other software for post-processing. The method of the embodiment of the present application only needs the user to perform the first input, and the second target image in the N frames of the first image is compared with the second target image in the N frames of the first image by the electronic device. The first target image is aligned, and the photographed image is obtained by fusing the first target image and the second target image aligned with the first target image, so that the photographing quality can be improved, the operation is simple, and the photographing efficiency can be improved.
附图说明Description of drawings
图1是本申请实施例提供的拍照方法的流程图之一;Fig. 1 is one of the flowcharts of the photographing method provided by the embodiment of the present application;
图2是本申请实施例提供的拍照方法的流程图之二;Fig. 2 is the second flow chart of the photographing method provided by the embodiment of the present application;
图3是本申请实施例提供的拍照装置的模块示意图之一;3 is one of the schematic diagrams of the modules of the photographing device provided by the embodiment of the present application;
图4是本申请实施例提供的电子设备的示意图;4 is a schematic diagram of an electronic device provided by an embodiment of the present application;
图5本申请实施例提供的电子设备的硬件结构示意图。FIG. 5 is a schematic diagram of a hardware structure 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 the data so used are interchangeable under appropriate circumstances so that the embodiments of the present application can be practiced in sequences other than those illustrated or described herein, and distinguish between "first", "second", etc. The objects are usually of one type, and the number of objects is not limited. For example, the first object may be one or more than one. 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 photographing method provided by the embodiments of the present application will be described in detail below through specific embodiments and application scenarios with reference to the accompanying drawings.
如图1所示,本申请的实施例提供了一种拍照方法,可应用于电子设备,电子设备可以是移动终端,该方法包括:As shown in FIG. 1 , an embodiment of the present application provides a photographing method, which can be applied to an electronic device, and the electronic device can be a mobile terminal. The method includes:
步骤101:接收用户的第一输入;Step 101: receiving the first input from the user;
步骤102:响应于第一输入,进行抓帧处理,获得N帧第一图像,N为大于1的整数。Step 102: In response to the first input, perform frame capture processing to obtain N frames of first images, where N is an integer greater than 1.
首先,电子设备需开启拍照模式,即打开电子设备的相机,电子设备进入拍照模式,用户可进行第一输入以实现拍照,电子设备接收用户的第一输入后,即可响应于第一输入,进行抓帧处理,获得N帧第一图像。作为一个示例,第一输入可以为在星空拍照模式下用户的输入,可用于在星空拍照模式下进行拍照,在电子设备中,包括多个拍照模式,例如,包括但不限于人像拍照模式、虚化拍照模式、大光圈拍照模式以及星空拍照模式等,每个拍照模式分别有对应的拍照参数值,不同拍照模式的拍照参数值可不同,其中,星空拍照模式下的拍照参数值可以理解为基于历史拍摄星空图像的拍照参数的经验值确定。作为一个示例,第一输入可以是点击输入,例如,点击拍照按键的点击输入等,第一输入也可以是语音输入或手势输入等。First, the electronic device needs to turn on the camera mode, that is, the camera of the electronic device is turned on, the electronic device enters the photo-taking mode, and the user can perform the first input to realize the photographing. After the electronic device receives the user's first input, it can respond to the first input, The frame grabbing process is performed to obtain N frames of the first image. As an example, the first input may be a user's input in the starry sky photographing mode, which may be used to take a photograph in the starry sky photographing mode, and the electronic device includes multiple photographing modes, for example, including but not limited to portrait photographing mode, virtual Each photo mode has its corresponding photo parameter value, and the photo parameter values of different photo modes may be different. Among them, the photo parameter values in the star photo mode can be understood as based on The empirical values of photographing parameters for historically photographing starry sky images are determined. As an example, the first input may be a click input, for example, a click input of clicking a camera button, and the like, and the first input may also be a voice input or a gesture input, or the like.
步骤103:以第一目标图像为基准,将第二目标图像与第一目标图像对齐。Step 103: Using the first target image as a reference, align the second target image with the first target image.
第一目标图像为N帧第一图像中的图像,第二目标图像为N帧第一图像中除第一目标图像外的其他图像。The first target image is an image in the N frames of the first image, and the second target image is an image other than the first target image in the N frames of the first image.
为提高拍摄质量,需以N帧第一图像中第一目标图像为基准,将第二目标图像与第一目标图像对齐。对齐的方式有多种,在本申请中不作限定,例如,可以第一目标图像为基准,对第二目标图像进行旋转,使旋转后的第二目标图像与第一目标图像对齐。作为一个示例,第一目标图像可以为N帧第一图像中清晰度最高的图像,如此,可确保融合得到的拍照图像的画质。In order to improve the shooting quality, it is necessary to align the second target image with the first target image based on the first target image in the N frames of the first image. There are various alignment methods, which are not limited in this application. For example, the first target image can be used as a reference, and the second target image can be rotated to align the rotated second target image with the first target image. As an example, the first target image may be the image with the highest definition among the N frames of the first image, so that the image quality of the photographed image obtained by fusion can be ensured.
步骤104:将第一目标图像以及对齐后的第二目标图像进行融合处理,得到拍照图像。Step 104: Perform fusion processing on the first target image and the aligned second target image to obtain a photographed image.
以第一目标图像为基准,将第二目标图像与其对齐之后,即可将第一目标图像以及与其对齐的第二目标图像进行融合处理,得到拍照图像,如此,可减少其他图像因与第一目标图像不对齐,导致图像出现拖尾的情况发生,因此,可提高融合得到的拍照图像的质量。Taking the first target image as a benchmark, after aligning the second target image with it, the first target image and the second target image aligned with it can be fused to obtain a photographed image. The target images are not aligned, resulting in smearing of the images. Therefore, the quality of the photographed images obtained by fusion can be improved.
在本申请实施例的拍照方法中,因为是以N帧第一图像中的第一目标图像为基准,将N帧第一图像中的第二目标图像与第一目标图像对齐,将第一目标图像和与其对齐的第二目标图像进行融合得到拍照图像即可,提高拍照图像的质量,如此,即使在拍摄星空图像过程中,无需额外操作拍摄硬件,也无需对电子设备拍摄的照片输入其他软件中进行后期处理,本申请实施例的方法只需用户进行第一输入,通过电子设备将N帧第一图像中的第二目标图像与第一目标图像对齐,将第一目标图像和与其对齐的第二目标图像进行融合得到拍照图像即可提高拍摄质量,操作简洁,可提高拍摄效率。In the photographing method of the embodiment of the present application, because the first target image in the N frames of the first image is used as the benchmark, the second target image in the N frames of the first image is aligned with the first target image, and the first target image is aligned with the first target image. The image and the second target image aligned with it can be fused to obtain a photographed image, which improves the quality of the photographed image. In this way, even in the process of shooting starry sky images, there is no need to operate the shooting hardware, and there is no need to input other software to the photos taken by the electronic device. Post-processing is performed during the process. The method of the embodiment of the present application only requires the user to perform the first input, align the second target image in the N frames of the first image with the first target image through the electronic device, and align the first target image and the aligned image. By fusing the second target image to obtain a photographed image, the shooting quality can be improved, the operation is simple, and the shooting efficiency can be improved.
在一个示例中,可将N帧第一图像分为M组图像,M为大于零的整数,每组图像中包括至少一帧第一图像,M组图像中的图像总和为N帧第一图像,则第一目标图像的数量为M,每组图像对应一个第一目标图像,一组图像对应的第一目标图像可以为该组图像中清晰度最高的图像,每组图像以该组图像对应的第一目标图像为基准,对该组图像中除对应的第一目标图像以外的其他图像进行旋转,该组图像中旋转后的其他图像与对应的第一目标图像对齐,然后对该组图像中第一目标图像与该组图像中旋转后的其他图像进行融合,得到该组图像对应的第一融合图像,每组图像进行上述过程,如此,可得到M个第一融合图像,然后,再在M个第一融合图像中选择一个参考图像,例如,可选M个第一融合图像中处于中间的一个第一融合图像为参考图像(若M为偶数,中间的第一融合图像数量有2个,则任意选择其中一个即可),对M个第一融合图像中除参考图像外的其他图像进行旋转,M个第一融合图像中旋转后的其他图像与参考图像对齐,对M个第一融合图像中旋转后的其他图像与参考图像进行融合,从而得到拍照图像。In an example, N frames of the first images may be divided into M groups of images, where M is an integer greater than zero, each group of images includes at least one frame of the first image, and the sum of the images in the M groups of images is N frames For the first image, the number of first target images is M, each group of images corresponds to a first target image, and the first target image corresponding to a group of images may be the image with the highest definition in the group of images. The image is based on the first target image corresponding to the group of images, and other images in the group of images except the corresponding first target image are rotated, and the rotated other images in the group of images and the corresponding first target image. A target image is aligned, and then the first target image in the group of images is fused with other rotated images in the group of images to obtain the first fusion image corresponding to the group of images, and the above process is performed for each group of images, In this way, M first fused images can be obtained, and then a reference image is selected from the M first fused images, for example, a first fused image in the middle of the M first fused images can be selected as the reference image ( If M is an even number, and there are 2 first fusion images in the middle, you can choose one of them arbitrarily), and rotate the other images except the reference image in the M first fusion images, and in the M first fusion images The other rotated images are aligned with the reference image, and the other rotated images in the M first fused images are fused with the reference image to obtain a photographed image.
在一个实施例中,接收用户的第一输入之前,还包括:获取环境亮度;获取电子设备的第一运动检测信息;在环境亮度小于预设亮度,以及第一运动检测信息相对第二运动检测信息的偏移量小于预设偏移量的情况下,输出提示信息,提示信息可用于提示电子设备已稳定。即在本实施例中,如图2所示,提供一种拍照方法,包括:In one embodiment, before receiving the user's first input, the method further includes: acquiring ambient brightness; acquiring first motion detection information of the electronic device; when the ambient brightness is less than a preset brightness, and the first motion detection information is relative to the second motion detection When the offset of the information is less than the preset offset, output prompt information, which can be used to prompt that the electronic device has stabilized. That is, in this embodiment, as shown in FIG. 2, a photographing method is provided, including:
步骤201:获取环境亮度。Step 201: Obtain ambient brightness.
可以理解,获取电子设备所在环境的当前亮度。对于拍摄星空,需要环境亮度较低,需要判断环境亮度是否符合亮度拍摄要求,从而,先获取环境亮度。It can be understood that the current brightness of the environment where the electronic device is located is obtained. For shooting starry sky, the ambient brightness needs to be low, and it is necessary to judge whether the ambient brightness meets the brightness shooting requirements, so that the ambient brightness is obtained first.
步骤202:获取电子设备的第一运动检测信息。Step 202: Acquire first motion detection information of the electronic device.
第一运动检测信息可以理解为当前运动检测信息,在拍照过程中,不但需要环境亮度的条件,还需要检测电子设备是否稳定,从而,需要获取电子设备的第一运动检测信息,用于判断电子设备是否稳定。作为一个示例,获取电子设备的第一运动检测信息可以包括获取电子设备中运动检测装置检测的第一运动检测信息,上述运动检测装置可以是陀螺仪(则对应检测的信息为陀螺仪信息)、姿态传感器等。The first motion detection information can be understood as the current motion detection information. During the photographing process, not only the conditions of ambient brightness are required, but also whether the electronic device is stable or not. Whether the device is stable. As an example, acquiring the first motion detection information of the electronic device may include acquiring the first motion detection information detected by a motion detection device in the electronic device, and the above-mentioned motion detection device may be a gyroscope (the corresponding detected information is gyroscope information), attitude sensor, etc.
步骤203:在环境亮度小于预设亮度,以及第一运动检测信息相对第二运动检测信息的偏移量小于预设偏移量的情况下,输出提示信息。Step 203 : Output prompt information when the ambient brightness is less than the preset brightness and the offset of the first motion detection information relative to the second motion detection information is less than the preset offset.
提示信息用于提示电子设备已稳定。环境亮度小于预设亮度,表示环境亮度符合亮度拍摄要求,在获得环境亮度以及运动检测装置检测的信息之后,可在环境亮度小于预设亮度,以及第一运动检测信息相对第二运动检测信息的偏移量小于预设偏移量的情况下,输出提示信息,以提示用户电子设备已稳定,可进行拍照了,后续用户在电子设备可进行第一输入。在本实施例中,不但需要环境亮度小于预设亮度,而且需要电子设备稳定,输出提示信息,以提示用户已稳定,可进行拍照,即后续拍照时在电子设备已稳定且亮度满足要求的情况下拍摄,如此,可提高拍摄图像的质量。The prompt message is used to indicate that the electronic device has stabilized. The ambient brightness is less than the preset brightness, indicating that the ambient brightness meets the brightness shooting requirements. After obtaining the ambient brightness and the information detected by the motion detection device, the ambient brightness is less than the preset brightness, and the first motion detection information is relative to the second motion detection information. When the offset is less than the preset offset, a prompt message is output to remind the user that the electronic device has stabilized and can be photographed, and the user can then perform the first input on the electronic device. In this embodiment, not only the ambient brightness is required to be lower than the preset brightness, but also the electronic device is required to be stable, and a prompt message is output to remind the user that it is stable and can take pictures, that is, the electronic device is stable and the brightness meets the requirements when taking subsequent pictures. shooting down, so that the quality of the captured image can be improved.
步骤204:接收用户的第一输入;Step 204: Receive the first input from the user;
步骤205:响应于第一输入,获得N帧第一图像,N为大于1的整数;Step 205: In response to the first input, obtain N frames of first images, where N is an integer greater than 1;
步骤206:以第一目标图像为基准,将第二目标图像与第一目标图像对齐;Step 206: aligning the second target image with the first target image based on the first target image;
第一目标图像为N帧第一图像中的图像,第二目标图像为N帧第一图像中除第一目标图像外的其他图像;The first target image is an image in the N frames of the first image, and the second target image is an image other than the first target image in the N frames of the first image;
步骤207:将第一目标图像以及对齐后的第二目标图像进行融合处理,得到拍照图像。Step 207: Perform fusion processing on the first target image and the aligned second target image to obtain a photographed image.
步骤204-步骤207与上述步骤101-步骤104一一对应,在此不再赘述。
在一个实施例中,响应于第一输入,获得N帧第一图像,包括:响应于第一输入,在目标时刻开始进行抓帧处理,获得N帧第一图像,其中,目标时刻与第一输入的接收时刻之差为预设时长。In one embodiment, obtaining N frames of first images in response to the first input includes: in response to the first input, starting a frame capture process at a target moment to obtain N frames of first images, wherein the target moment is the same as the first image. The difference between the input reception times is a preset duration.
为了防止第一输入动作对电子设备造成抖动影响拍摄质量,从而,在接收第一输入,经过预设时长后,进行抓帧获得N帧第一图像,可以理解为,接收第一输入后,开始预设时长的倒计时,倒计时结束,准备开始抓帧,如此,可减少进行第一输入动作对拍摄的影响,提高拍摄图像质量。In order to prevent the first input action from causing jitter to the electronic device and affecting the shooting quality, after receiving the first input, after a preset time period, the frame is captured to obtain N frames of the first image. It can be understood that after receiving the first input, start The countdown for a preset duration, the countdown is over, and the frame is ready to be captured. In this way, the impact of the first input action on the shooting can be reduced, and the quality of the shooting image can be improved.
在一个实施例中,响应于第一输入,获得N帧第一图像,包括:在电子设备处于目标拍照模式下,响应于第一输入,进行超焦距对焦;在对焦完成的情况下,进行抓帧处理,获得N帧第一图像。In one embodiment, obtaining N frames of first images in response to the first input includes: when the electronic device is in the target photographing mode, in response to the first input, performing hyperfocal focusing; when the focusing is completed, capturing Frame processing to obtain N frames of the first image.
当镜头对焦在无穷远时,景深前界(离镜头最近清晰点)到镜头的距离称之为超焦距。也就是说,当镜头对焦在这个超焦距点时,从这个超焦距点到相机一半的距离开始到无穷远都是清晰的。如此,在目标拍照模式下,可提高拍摄效果。作为一个示例,该目标拍照模式可以理解为星空拍照模式。When the lens is focused at infinity, the distance from the front boundary of the depth of field (the closest sharp point to the lens) to the lens is called the hyperfocal distance. That is, when the lens is focused at this hyperfocal distance point, it is clear from the distance from this hyperfocal distance point to half the camera to infinity. In this way, in the target photographing mode, the photographing effect can be improved. As an example, the target photographing mode may be understood as a starry sky photographing mode.
另外,响应于第一输入,还可根据拍摄环境调整拍摄参数,在对焦完成的情况下,根据调整后的拍摄参数进行抓帧处理,获得N帧第一图像,可利用拍摄环境调整拍摄参数,使电子设备的拍摄参数适应环境。以提高拍摄效果。作为一个示例,拍摄参数可以为白平衡参数等。作为一个示例,拍摄环境包括环境亮度等。另外,在进行对焦过程中,可调用AF自动对焦系统进行拍照对焦,若前景有显著物体锁定前景,若无前景,对焦自动锁定最远焦段,默认进行超焦距对焦。In addition, in response to the first input, the shooting parameters can also be adjusted according to the shooting environment, and when the focus is completed, frame capture processing is performed according to the adjusted shooting parameters to obtain N frames of first images, and the shooting parameters can be adjusted by using the shooting environment, Adapt the shooting parameters of the electronic device to the environment. to improve the shooting effect. As an example, the shooting parameter may be a white balance parameter or the like. As an example, the shooting environment includes ambient brightness and the like. In addition, during the focusing process, the AF autofocus system can be called to focus on the photo. If there is a significant object in the foreground, the foreground will be locked. If there is no foreground, the focus will automatically lock to the farthest focal length, and the hyperfocal focusing will be performed by default.
在一个示例中,在目标时刻开始进行抓帧处理,获得N帧第一图像,可以包括:在电子设备的系统时间为目标时刻的情况下,根据拍摄环境调整拍摄参数,并进行拍照对焦;在拍照对焦完成的情况下,进行抓帧处理,获得N帧第一图像。如此,既可以在拍摄过程中防抖动,而且还可根据拍摄环境调整拍摄参数,提高拍摄质量。In one example, starting the frame capture process at the target moment to obtain N frames of the first image may include: when the system time of the electronic device is the target moment, adjusting the shooting parameters according to the shooting environment, and taking pictures and focusing; When the photographing and focusing are completed, frame capture processing is performed to obtain N frames of the first image. In this way, it is possible not only to stabilize the shooting process, but also to adjust the shooting parameters according to the shooting environment, so as to improve the shooting quality.
在一个示例中,在对焦完成的情况下,进行抓帧处理,获得N帧第一图像之前,还可根据环境亮度预计拍摄时长,根据预设拍摄时长以及N,确定抓帧间隔时长,N可预先设定。则在拍照对焦完成的情况下,进行抓帧处理,获得N帧第一图像,可以包括:在拍照对焦完成的情况下,根据抓帧间隔时长,进行抓帧处理,获得N帧第一图像,即每个抓帧间隔时长进行一次抓帧,相邻得到的两帧第一图像之间的抓帧时间差为抓帧间隔时长。In an example, when the focus is completed, frame capture processing is performed, and before N frames of the first image are obtained, the shooting time can also be estimated according to the ambient brightness, and the frame capturing interval can be determined according to the preset shooting time and N, where N can be pre-setting. Then, in the case that the photographing focus is completed, performing frame grabbing processing to obtain N frames of first images, which may include: in the case that the photographing focus is completed, performing frame grabbing processing according to the frame grabbing interval to obtain N frames of the first image, That is, one frame capture is performed for each frame capture interval, and the frame capture time difference between two adjacent first images is the frame capture interval.
在一个实施例中,将第一目标图像以及对齐后的第二目标图像进行融合处理,得到拍照图像,包括:将第一目标图像以及对齐后的第二目标图像进行融合处理,得到第二图像;在第二图像中识别到第一目标对象的情况下,对第一区域中第二目标对象对应的子区域进行提亮处理,以及对第二图像中第二区域进行提亮处理,得到拍照图像,其中,第一区域为第二图像的第一目标对象对应的区域,第二区域为第二图像中除第一区域之外的区域,第一目标对象包括第二目标对象。In one embodiment, performing fusion processing on the first target image and the aligned second target image to obtain a photographed image includes: performing fusion processing on the first target image and the aligned second target image to obtain the second image ; Under the situation that the first target object is identified in the second image, the sub-region corresponding to the second target object in the first area is highlighted, and the second area in the second image is highlighted to obtain a photograph An image, wherein the first area is an area corresponding to the first target object of the second image, the second area is an area other than the first area in the second image, and the first target object includes the second target object.
即在本实施例中,可对融合处理得到的第二图像中,第一目标对象的第一区域中第二目标对象的子区域提亮处理,如此可提高第一区域中第二目标对象更加突出,使第一区域的整体画面更有层次感。另外,还可对第二区域进行提亮处理,以提高第二区域的可见性,使能观察到第二区域更多的细节。That is, in this embodiment, in the second image obtained by fusion processing, the sub-region of the second target object in the first region of the first target object can be highlighted, so that the second target object in the first region can be more Prominent to make the overall picture of the first area more layered. In addition, the second area may be highlighted, so as to improve the visibility of the second area, so that more details of the second area can be observed.
在一个实施例中,将第一目标图像以及对齐后的第二目标图像进行融合处理,得到第二图像,包括:对第一目标图像以及对齐后的第二目标图像进行降噪处理,将降噪后的第一目标图像以及降噪后的第二目标图像进行融合处理,得到第二图像。In one embodiment, performing fusion processing on the first target image and the aligned second target image to obtain the second image includes: performing noise reduction processing on the first target image and the aligned second target image to reduce The denoised first target image and the denoised second target image are fused to obtain a second image.
即在融合处理得到第二图像的过程中,先对需要融合的第一目标图像以及旋转后的第二目标图像进行降噪处理,提升第一目标图像以及第二目标图像的画质,如此可提升得到的第二图像的画质,从而提高拍照图像的画质。降噪的方式有多种,在本申请实施例中不作限定。That is, in the process of obtaining the second image through fusion processing, first perform noise reduction processing on the first target image to be fused and the rotated second target image to improve the quality of the first target image and the second target image. The image quality of the obtained second image is improved, thereby improving the image quality of the photographed image. There are various manners for noise reduction, which are not limited in the embodiments of the present application.
在一个示例中,将第一目标图像以及对齐后的第二目标图像进行融合处理,得到拍照图像之后,还可包括:根据N帧第一图像确定目标影调,利用目标影调对拍照图像进行处理,得到目标图像。如此,可使得到的目标图像的色彩更加适应当前的拍摄环境。In an example, after the first target image and the aligned second target image are fused to obtain the photographed image, the method may further include: determining the target tone according to the N frames of the first images, and using the target tone to process the photographed image. process to obtain the target image. In this way, the color of the obtained target image can be more adapted to the current shooting environment.
下面以一个具体实施例对上述拍照方法的过程加以具体说明。以电子设备为手机,拍摄星空为例进行说明。The process of the above-mentioned photographing method will be specifically described below with a specific embodiment. Take the electronic device as a mobile phone and shoot the starry sky as an example to illustrate.
首先,打开手机相机,用户可选择星空拍照模式,电子设备进入该模式后指引用户保持手机稳定,使用三脚架。用户将手机固定在三脚架。First, turn on the camera of the mobile phone, and the user can choose the starry sky photo mode. After the electronic device enters this mode, the user is instructed to keep the mobile phone stable and use a tripod. The user fixes the phone on a tripod.
然后,手机判断环境亮度是否符合极夜环境(拍摄星空,环境亮度需要比较低),当环境亮度大于预设亮度x时,手机调用夜景算法(夜景拍照模式),在收到用户的第一输入后,即可通过夜景算法进行图像处理完成拍摄。当环境亮度小于x时,可根据手机中的陀螺仪信息(即第一运动检测信息),判断手机是否稳定(是否置于脚架上),例如,可通过判断上述陀螺仪信息与获取该陀螺仪之前最近获取的陀螺仪信息之间的偏差,若偏差小于预设偏差(一般设置的较小,以提高稳定判断的精确性),则确定手机稳定,否则确定手机不稳定。若手机稳定,星空拍照模式拍摄准备阶段完成,用户可点击拍摄按键后(即上述第一输入可以为针对拍摄按键的点击操作),为防止点击动作对手机造成抖动,手机默认开始倒计时拍照,例如,倒计时长为预设时长,可预先设置,倒计时结束后,设备开始抓帧。Then, the mobile phone determines whether the ambient brightness conforms to the polar night environment (for shooting starry sky, the ambient brightness needs to be relatively low). When the ambient brightness is greater than the preset brightness x, the mobile phone calls the night scene algorithm (night scene photo mode), and receives the first input from the user. After that, the image processing can be performed through the night scene algorithm to complete the shooting. When the ambient brightness is less than x, it can be judged whether the mobile phone is stable (whether it is placed on a tripod or not) according to the gyroscope information in the mobile phone (that is, the first motion detection information), for example, by judging the above gyroscope information and obtaining the gyroscope The deviation between the gyroscope information recently obtained by the instrument, if the deviation is smaller than the preset deviation (generally set smaller to improve the accuracy of stability judgment), the mobile phone is determined to be stable, otherwise it is determined that the mobile phone is unstable. If the mobile phone is stable and the shooting preparation stage of the starry sky camera mode is completed, the user can click the shooting button (that is, the above-mentioned first input can be a click operation for the shooting button). , the countdown time is a preset time length, which can be set in advance. After the countdown is over, the device starts to capture frames.
在抓帧过程中,可根据当前环境亮度,预计拍摄时长,并根据预先设定所需的帧图像的帧数N,确定抓帧间隔时长,并根据环境亮度调整照片白平衡参数,并调用AF自动对焦系统进行自动对焦。根据抓帧时间间隔以及调整后的白平衡参数,进行抓帧,可获得N帧第一图像。During the frame capture process, the estimated shooting time can be based on the current ambient brightness, and the frame capture interval can be determined according to the preset number of frames N required for the frame image, and the photo white balance parameters can be adjusted according to the ambient brightness, and the AF can be called. Autofocus system for autofocus. According to the frame capture time interval and the adjusted white balance parameter, frame capture is performed to obtain N frames of the first image.
在本申请实施例的拍照过程中采用多帧对齐的方式,以N帧第一图像中的第一目标图像(例如,N帧第一图像中的第一帧图像,第一帧图像的抓帧时间在N帧第一图像中最早)为基础,将N帧第一图像中其他图像(即第二目标图像)进行旋转,N帧第一图像中其他图像旋转后与第一目标图像对齐,然后将对齐的第一目标图像以及旋转后的第二目标图像进行堆栈融合,进行堆栈融合可达到星星无拖尾的效果(若不对齐,图像中星星会呈现因地球自转而导致的拖尾)。多帧融合的过程中同时进行降噪处理,将噪声涂抹,提升画质。In the photographing process in this embodiment of the present application, a multi-frame alignment method is adopted, and the first target image in the N frames of the first image (for example, the first frame image in the N frames of the first image, the captured frame of the first frame image The time is the earliest in the first image of N frames), rotate other images (ie the second target image) in the first image of N frames, and align the other images in the first image of N frames with the first target image after rotation, and then The aligned first target image and the rotated second target image are stacked and fused, and the stack fusion can achieve the effect of no trailing stars (if they are not aligned, the stars in the image will appear trailing due to the rotation of the earth). In the process of multi-frame fusion, noise reduction is performed at the same time to smear the noise and improve the image quality.
堆栈融合完成后,识别图像中天空(第一目标对象)和地景的区域,天空的区域即第一区域,地景的区域即第二区域,对天空和地景进行分割,并分别进行处理。分割后,对地景区域进行略微的提亮处理,保证地景可见,有一定的细节。同时对天空区域进行星空美化处理,即对天空中的星星(第二目标对象)的亮度做提亮处理,使得肉眼不可见的弱光星星变得可见,亮星更加突出,让整体画面更有层次感。色彩方面,手机中预设最适合星空摄影题材的影调,该影调可参考摄影专业用户的拍摄参数,也可以通过大数据学习而获得。After the stack fusion is completed, identify the area of the sky (the first target object) and the landscape in the image. The sky area is the first area, and the landscape area is the second area. The sky and the landscape are segmented and processed separately. . After segmentation, the landscape area is slightly brightened to ensure that the landscape is visible and has certain details. At the same time, the starry sky area is beautified, that is, the brightness of the stars (second target object) in the sky is brightened, so that the low-light stars that are invisible to the naked eye become visible, and the bright stars are more prominent, making the overall picture more beautiful. Layering. In terms of color, the preset tone in the mobile phone is most suitable for the subject of starry sky photography. The tone can refer to the shooting parameters of professional photography users, or can be obtained through big data learning.
本申请实施例的拍照方法,能够实现“星空”等专业场景的拍摄,解决用户拍摄星空时拍摄门槛高,耗时耗力的问题。另外,本申请实施例的拍摄方法,可通过一键拍摄星空,根据环境条件自动调节合适的参数,获得画质优良的成片,无需用户手动调整,且可对N帧第一图像进行对齐,避免出现拖尾情况,以及分割天空和地景,分别进行相应处理,对星星进行提亮处理,可捕捉人眼看不到的暗星。本申请实施例的拍摄方法,无需专业的摄影知识、图像后期处理能力以及拍摄硬件例如赤道仪等,通过手机即可提升在拍照过程中的效率以及画质等。The photographing method of the embodiment of the present application can realize the photographing of professional scenes such as "starry sky", and solve the problem of high photographing threshold and time-consuming and labor-intensive when users photograph the starry sky. In addition, the shooting method of the embodiment of the present application can shoot a starry sky with one key, automatically adjust appropriate parameters according to environmental conditions, and obtain a finished film with excellent image quality without manual adjustment by the user, and can align N frames of the first image, Avoid smearing, split the sky and the ground, and process them accordingly, brighten the stars, and capture the dark stars that are invisible to the human eye. The photographing method of the embodiment of the present application does not require professional photographic knowledge, image post-processing capability, and photographing hardware such as an equatorial mount, etc., and the efficiency and image quality of the photographing process can be improved through a mobile phone.
需要说明的是,本申请实施例提供的拍照方法,执行主体可以为拍照装置,或者该拍照装置中的用于执行加载拍摄方法的控制模块。本申请实施例中以拍摄装置执行加载拍摄方法为例,说明本申请实施例提供的拍摄装置。It should be noted that, in the photographing method provided by the embodiments of the present application, the executing subject may be a photographing device, or a control module in the photographing device for executing the loading and photographing method. In the embodiment of the present application, the photographing device provided by the embodiment of the present application is described by taking the photographing device executing the loading photographing method as an example.
如图3所示,本申请还提供一种实施例的拍照装置,装置300包括:As shown in FIG. 3 , the present application further provides a photographing apparatus according to an embodiment, and the
接收模块301,用于接收用户的第一输入;a
帧图像获取模块302,用于响应于第一输入,获得N帧第一图像,N为大于1的整数;a frame
对齐模块303,用于以第一目标图像为基准,将第二目标图像与第一目标图像对齐,第一目标图像为N帧第一图像中的图像,第二目标图像为N帧第一图像中除第一目标图像外的其他图像;
融合处理304,用于将第一目标图像以及对齐后的第二目标图像进行融合处理,得到拍照图像。The
在一个实施例中,装置300还包括:In one embodiment, the
第一获取模块,用于帧图像获取模块执行接收用户的第一输入,响应于第一输入,获得N帧第一图像之前之前,获取环境亮度;The first acquisition module is used for the frame image acquisition module to perform receiving the first input of the user, and in response to the first input, acquires the ambient brightness before obtaining N frames of the first image;
第二获取模块,用于获取电子设备的第一运动检测信息;a second acquisition module, configured to acquire the first motion detection information of the electronic device;
在环境亮度小于预设亮度,以及基于第一运动检测信息相对第二运动检测信息的偏移量小于预设偏移量的情况下,输出提示信息;When the ambient brightness is less than the preset brightness, and the offset based on the first motion detection information relative to the second motion detection information is less than the preset offset, output prompt information;
其中,第二运动检测信息为在获取电子设备的第一运动检测信息之前最近一次获取的电子设备的运动检测信息。The second motion detection information is motion detection information of the electronic device acquired most recently before acquiring the first motion detection information of the electronic device.
在一个实施例中,响应于第一输入,获得N帧第一图像,包括:In one embodiment, in response to the first input, obtaining N frames of the first image, including:
响应于第一输入,在目标时刻开始进行抓帧处理,获得N帧第一图像,其中,目标时刻与第一输入的接收时刻之差为预设时长。In response to the first input, the frame capture process is started at the target time to obtain N frames of first images, wherein the difference between the target time and the receiving time of the first input is a preset duration.
在一个实施例中,帧图像获取模块,包括:In one embodiment, the frame image acquisition module includes:
对焦模块,用于在电子设备处于目标拍照模式下,响应于所述第一输入,进行超焦距对焦;a focusing module, configured to perform hyperfocal focusing in response to the first input when the electronic device is in a target photographing mode;
抓帧处理模块,用于在对焦完成的情况下,进行抓帧处理,获得N帧第一图像。The frame capture processing module is used to perform frame capture processing to obtain N frames of first images when the focus is completed.
在一个实施例中,融合模块,包括:In one embodiment, the fusion module includes:
图像融合模块,用于将第一目标图像以及对齐后的第二目标图像进行融合处理,得到第二图像;an image fusion module, configured to perform fusion processing on the first target image and the aligned second target image to obtain a second image;
图像处理模块,用于在第二图像中识别到第一目标对象的情况下,对第一区域中第二目标对象对应的子区域进行提亮处理,以及对第二图像中第二区域进行提亮处理,得到拍照图像,其中,第一区域为第二图像的第一目标对象对应的区域,第二区域为第二图像中除第一区域之外的区域,第一目标对象包括第二目标对象。The image processing module is configured to, when the first target object is identified in the second image, perform highlighting processing on the sub-region corresponding to the second target object in the first region, and enhance the second region in the second image. Brightness processing to obtain a photographed image, wherein the first area is the area corresponding to the first target object of the second image, the second area is the area other than the first area in the second image, and the first target object includes the second target object.
在一个实施例中,将第一目标图像以及对齐后的第二目标图像进行融合处理,得到第二图像,包括:In one embodiment, the first target image and the aligned second target image are fused to obtain the second image, including:
对第一目标图像以及对齐后的第二目标图像进行降噪处理,将降噪后的第一目标图像以及降噪后的第二目标图像进行融合处理,得到第二图像。Perform noise reduction processing on the first target image and the aligned second target image, and perform fusion processing on the noise reduction first target image and the noise reduction second target image to obtain a second image.
在本申请实施例的拍照装置中,因为是以抓帧得到的N帧第一图像中的第一目标图像为基准,对N帧第一图像中的第二目标图像进行旋转,旋转后的第二目标图像与第一目标图像对齐,将第一目标图像和与其对齐的旋转后的第二目标图像进行融合得到拍照图像即可,提高拍照图像的质量,如此,即使在拍摄星空图像的过程中,无需额外操作拍摄硬件,也无需对电子设备拍摄的照片输入其他软件中进行后期处理,本申请实施例的方法只需用户进行第一输入,通过电子设备对N帧第一图像中的第二目标图像进行旋转,将第一目标图像和与其对齐的旋转后的第二目标图像进行融合得到拍照图像即可提高拍摄质量,操作简洁,可提高拍摄效率。In the photographing device of the embodiment of the present application, the second target image in the N frames of the first image is rotated based on the first target image in the N frames of first images obtained by capturing the frame, and the rotated The second target image is aligned with the first target image, and the photographed image is obtained by fusing the first target image and the rotated second target image aligned with it to improve the quality of the photographed image. In this way, even in the process of photographing a starry sky image , no additional operation of shooting hardware is required, and there is no need to input photos taken by electronic devices into other software for post-processing. The method of the embodiment of the present application only requires the user to perform the first input, and the second image in the N frames of the first image is processed by the electronic device. The target image is rotated, and the photographed image is obtained by fusing the first target image and the rotated second target image aligned therewith, and the photographing quality can be improved, the operation is simple, and the photographing efficiency can be improved.
本申请实施例中的拍摄装置可以是装置,也可以是终端中的部件、集成电路、或芯片。该装置可以是移动电子设备,也可以为非移动电子设备。示例性的,移动电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、可穿戴设备、超级移动个人计算机(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, an in-vehicle 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-图2的方法实施例实现的各个过程,为避免重复,这里不再赘述。The photographing apparatus provided in this embodiment of the present application can implement each process implemented by the method embodiments in FIG. 1 to FIG. 2 , and to avoid repetition, details are not repeated here.
可选的,如图4所示,本申请实施例还提供一种电子设备400,包括处理器401,存储器402,存储在存储器402上并可在处理器401上运行的程序或指令,该程序或指令被处理器401执行时实现上述拍照方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Optionally, as shown in FIG. 4 , an embodiment of the present application further provides an
需要说明的是,本申请实施例中的电子设备包括上述的移动电子设备和非移动电子设备。It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
图5为实现本申请实施例的一种电子设备的硬件结构示意图。FIG. 5 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
该电子设备500包括但不限于:射频单元505、网络模块502、音频输出单元503、输入单元504、传感器505、显示单元506、用户输入单元507、接口单元508、存储器509、以及处理器510等部件。The
本领域技术人员可以理解,电子设备500还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器510逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图5中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。Those skilled in the art can understand that the
其中,用户输入单元507,用于接收用户的第一输入,处理器510,用于响应于第一输入,获得N帧第一图像,N为大于1的整数,以第一目标图像为基准,将第二目标图像与第一目标图像对齐,第一目标图像为N帧第一图像中的图像,第二目标图像为N帧第一图像中除第一目标图像外的其他图像;将第一目标图像以及对齐后的第二目标图像进行融合处理,得到拍照图像。The
无需额外操作拍摄硬件,也无需对电子设备拍摄的照片输入其他软件中进行后期处理,只需用户进行第一输入,通过电子设备中处理器510对N帧第一图像中的第二目标图像进行旋转,将第一目标图像和对齐后的第二目标图像进行融合即可,操作简洁,可提高拍摄效率。There is no need for additional operation of shooting hardware, and there is no need to input the photos taken by the electronic device into other software for post-processing. Only the user needs to input the first input, and the second target image in the N frames of first images is processed by the
可选的,处理器510,用于获取环境亮度;获取电子设备的第一运动检测信息;在环境亮度小于预设亮度,以及第一运动检测信息相对第二运动检测信息的偏移量小于预设偏移量的情况下,输出提示信息。其中,第二运动检测信息为在获取电子设备的第一运动检测信息之前最近一次获取的电子设备的运动检测信息。Optionally, the
可在环境亮度小于预设亮度,以及第一运动检测信息相对第二运动检测信息的偏移量小于预设偏移量的情况下,输出提示信息,以提示用户电子设备已稳定,可进行拍照了,后续用户在电子设备可进行第一输入。在本实施例中,不但需要环境亮度小于预设亮度,而且需要电子设备稳定,输出提示信息,以提示用户已稳定,可进行拍照,即后续拍照时在电子设备已稳定且亮度满足要求的情况下拍摄,如此,可提高拍摄图像的质量。When the ambient brightness is less than the preset brightness, and the offset of the first motion detection information relative to the second motion detection information is less than the preset offset, a prompt message can be output to remind the user that the electronic device has stabilized and can be photographed Now, the subsequent user can perform the first input on the electronic device. In this embodiment, not only the ambient brightness is required to be lower than the preset brightness, but also the electronic device is required to be stable, and a prompt message is output to remind the user that it is stable and can take pictures, that is, the electronic device is stable and the brightness meets the requirements when taking subsequent pictures. shooting down, so that the quality of the captured image can be improved.
可选的,用户输入单元507,用于接收用户的第一输入,处理器510,用于响应于第一输入,在目标时刻开始进行抓帧处理,获得N帧第一图像,其中,目标时刻与第一输入的接收时刻之差为预设时长。Optionally, the
为了防止第一输入动作对电子设备造成抖动影响拍摄质量,从而,在接收第一输入,经过预设时长后,进行抓帧获得N帧第一图像,可以理解为,接收第一输入后,开始预设时长的倒计时,倒计时结束,准备开始抓帧,如此,可减少进行第一输入动作对拍摄的影响,提高拍摄图像质量。In order to prevent the first input action from causing jitter to the electronic device and affecting the shooting quality, after receiving the first input, after a preset time period, the frame is captured to obtain N frames of the first image. It can be understood that after receiving the first input, start The countdown for a preset duration, the countdown is over, and the frame is ready to be captured. In this way, the impact of the first input action on the shooting can be reduced, and the quality of the shooting image can be improved.
可选的,用户输入单元507,用于接收用户的第一输入,处理器510,用于响应于第一输入,进行超焦距对焦;在对焦完成的情况下,进行抓帧处理,获得N帧第一图像。Optionally, the
即在进行拍照过程中,进行超焦距对焦进行拍摄,以提高拍摄效果。That is, in the process of taking pictures, the hyperfocal focusing is performed to take pictures, so as to improve the shooting effect.
可选的,处理器510,用于将第一目标图像以及对齐后的第二目标图像进行融合处理,得到第二图像;Optionally, the
在第二图像中识别到第一目标对象的情况下,对第一区域中第二目标对象对应的子区域进行提亮处理,以及对第二图像中第二区域进行提亮处理,得到拍照图像,其中,第一区域为第二图像的第一目标对象对应的区域,第二区域为第二图像中除第一区域之外的区域,第一目标对象包括第二目标对象。When the first target object is recognized in the second image, the sub-region corresponding to the second target object in the first region is highlighted, and the second region in the second image is highlighted to obtain a photographed image , wherein the first area is an area corresponding to the first target object of the second image, the second area is an area other than the first area in the second image, and the first target object includes the second target object.
即在本实施例中,可对融合处理得到的第二图像中,第一目标对象的第一区域中第二目标对象的区域提亮处理,如此可提高第一区域中第二目标对象更加突出,使第一区域的整体画面更有层次感。另外,还可对第二区域进行提亮处理,以提高第二区域的可见性,使能观察到第二区域更多的细节。That is, in this embodiment, in the second image obtained by fusion processing, the area of the second target object in the first area of the first target object can be highlighted, so that the second target object in the first area can be more prominent. , to make the overall picture of the first area more layered. In addition, the second area may be highlighted, so as to improve the visibility of the second area, so that more details of the second area can be observed.
可选的,处理器510,用于对第一目标图像以及对齐后的第二目标图像进行降噪处理,将降噪后的第一目标图像以及降噪后的第二目标图像进行融合处理,得到第二图像。Optionally, the
即在融合处理得到第二图像的过程中,先对需要融合的第一目标图像以及旋转后的第二目标图像进行降噪处理,提升第一目标图像以及第二目标图像的画质,如此可提升得到的第二图像的画质,从而提高拍照图像的画质。That is, in the process of obtaining the second image through fusion processing, first perform noise reduction processing on the first target image to be fused and the rotated second target image to improve the quality of the first target image and the second target image. The image quality of the obtained second image is improved, thereby improving the image quality of the photographed image.
应理解的是,本申请实施例中,输入单元504可以包括图形处理器(GraphicsProcessing Unit,GPU)5041和麦克风5042,图形处理器5041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元506可包括显示面板5061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板5061。用户输入单元507包括触控面板5071以及其他输入设备5072。触控面板5071,也称为触摸屏。触控面板5071可包括触摸检测装置和触摸控制器两个部分。其他输入设备5072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。存储器509可用于存储软件程序以及各种数据,包括但不限于应用程序和操作系统。处理器510可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器510中。It should be understood that, in this embodiment of the present application, the
本申请实施例还提供一种可读存储介质,可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述拍照方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。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, and when the program or instruction is executed by a processor, each process of the above embodiment of the photographing method can be realized, and the same technical effect can be achieved , in order to avoid repetition, it will not be repeated here.
其中,处理器为上述实施例中的电子设备中的处理器。可读存储介质,包括计算机可读存储介质,如计算机只读存储器(Read-Only Memory,ROM)、随机存取存储器(RandomAccess Memory,RAM)、磁碟或者光盘等。The processor is the processor in the electronic device in the above embodiment. 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.
本申请实施例另提供了一种芯片,芯片包括处理器和通信接口,通信接口和处理器耦合,处理器用于运行程序或指令,实现上述拍照方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。The embodiment of the present application further provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled with the processor, and the processor is used for running a program or an instruction to implement each process of the above embodiment of the photographing method, and can achieve the same technology The effect, in order to avoid repetition, is not 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.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010478136.9ACN111654623B (en) | 2020-05-29 | 2020-05-29 | Photographing method, device and electronic device |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010478136.9ACN111654623B (en) | 2020-05-29 | 2020-05-29 | Photographing method, device and electronic device |
| Publication Number | Publication Date |
|---|---|
| CN111654623Atrue CN111654623A (en) | 2020-09-11 |
| CN111654623B CN111654623B (en) | 2022-03-22 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202010478136.9AActiveCN111654623B (en) | 2020-05-29 | 2020-05-29 | Photographing method, device and electronic device |
| Country | Link |
|---|---|
| CN (1) | CN111654623B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112802033A (en)* | 2021-01-28 | 2021-05-14 | Oppo广东移动通信有限公司 | Image processing method and device, computer readable storage medium and electronic device |
| CN114399455A (en)* | 2022-01-21 | 2022-04-26 | 西安紫光展锐科技有限公司 | Image processing method, apparatus, electronic device, storage medium and program product |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20180039821A1 (en)* | 2016-08-03 | 2018-02-08 | Microsoft Technology Licensing, Llc | Combining images aligned to reference frame |
| CN109068067A (en)* | 2018-08-22 | 2018-12-21 | Oppo广东移动通信有限公司 | Exposure control method and device and electronic equipment |
| CN109151333A (en)* | 2018-08-22 | 2019-01-04 | Oppo广东移动通信有限公司 | Exposal control method, device and electronic equipment |
| CN110443766A (en)* | 2019-08-06 | 2019-11-12 | 厦门美图之家科技有限公司 | Image processing method, device, electronic equipment and readable storage medium storing program for executing |
| CN110620873A (en)* | 2019-08-06 | 2019-12-27 | RealMe重庆移动通信有限公司 | Device imaging method and device, storage medium and electronic device |
| CN110930329A (en)* | 2019-11-20 | 2020-03-27 | 维沃移动通信有限公司 | Starry sky image processing method and device |
| CN110958401A (en)* | 2019-12-16 | 2020-04-03 | 北京迈格威科技有限公司 | A method, device and electronic device for color correction of super night scene images |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20180039821A1 (en)* | 2016-08-03 | 2018-02-08 | Microsoft Technology Licensing, Llc | Combining images aligned to reference frame |
| CN109068067A (en)* | 2018-08-22 | 2018-12-21 | Oppo广东移动通信有限公司 | Exposure control method and device and electronic equipment |
| CN109151333A (en)* | 2018-08-22 | 2019-01-04 | Oppo广东移动通信有限公司 | Exposal control method, device and electronic equipment |
| CN110443766A (en)* | 2019-08-06 | 2019-11-12 | 厦门美图之家科技有限公司 | Image processing method, device, electronic equipment and readable storage medium storing program for executing |
| CN110620873A (en)* | 2019-08-06 | 2019-12-27 | RealMe重庆移动通信有限公司 | Device imaging method and device, storage medium and electronic device |
| CN110930329A (en)* | 2019-11-20 | 2020-03-27 | 维沃移动通信有限公司 | Starry sky image processing method and device |
| CN110958401A (en)* | 2019-12-16 | 2020-04-03 | 北京迈格威科技有限公司 | A method, device and electronic device for color correction of super night scene images |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112802033A (en)* | 2021-01-28 | 2021-05-14 | Oppo广东移动通信有限公司 | Image processing method and device, computer readable storage medium and electronic device |
| WO2022160857A1 (en)* | 2021-01-28 | 2022-08-04 | Oppo广东移动通信有限公司 | Image processing method and apparatus, and computer-readable storage medium and electronic device |
| CN112802033B (en)* | 2021-01-28 | 2024-03-19 | Oppo广东移动通信有限公司 | Image processing method and device, computer readable storage medium and electronic equipment |
| CN114399455A (en)* | 2022-01-21 | 2022-04-26 | 西安紫光展锐科技有限公司 | Image processing method, apparatus, electronic device, storage medium and program product |
| Publication number | Publication date |
|---|---|
| CN111654623B (en) | 2022-03-22 |
| Publication | Publication Date | Title |
|---|---|---|
| CN110505411B (en) | Image shooting method and device, storage medium and electronic equipment | |
| EP3633975B1 (en) | Photographic method, photographic apparatus, and mobile terminal | |
| CN111586282B (en) | Shooting method, shooting device, terminal and readable storage medium | |
| JP5136669B2 (en) | Image processing apparatus, image processing method, and program | |
| US12356063B2 (en) | Photographing method and device | |
| CN112532881B (en) | Image processing method, device and electronic device | |
| WO2017107629A1 (en) | Mobile terminal, data transmission system and shooting method of mobile terminal | |
| CN110798627B (en) | Shooting method, shooting device, storage medium and terminal | |
| US8558935B2 (en) | Scene information displaying method and apparatus and digital photographing apparatus using the scene information displaying method and apparatus | |
| CN112637515B (en) | Shooting method and device and electronic equipment | |
| CN111835982A (en) | Image acquisition method, image acquisition device, electronic device and storage medium | |
| CN108513069B (en) | Image processing method, image processing device, storage medium and electronic equipment | |
| CN112492221B (en) | Photographing method, device, electronic device and storage medium | |
| EP4425433A1 (en) | Camera photographing parameter adjustment method and apparatus and electronic device | |
| US20140210941A1 (en) | Image capture apparatus, image capture method, and image capture program | |
| CN111770277A (en) | Auxiliary shooting method, terminal and storage medium | |
| US20250142202A1 (en) | Camera switching method and electronic device | |
| CN112333386A (en) | Shooting method and device and electronic equipment | |
| CN106657798A (en) | Photographing method for intelligent terminal | |
| CN111654623A (en) | Photographing method, device and electronic device | |
| CN119631419A (en) | Image processing method and related equipment | |
| CN111586280B (en) | Shooting method, device, terminal and readable storage medium | |
| CN113873160B (en) | Image processing method, device, electronic equipment and computer storage medium | |
| CN113747067B (en) | Photography methods, devices, electronic equipment and storage media | |
| WO2022095878A1 (en) | Photographing method and apparatus, and electronic device and readable storage medium |
| 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 |