CN114390219B - Photography methods, devices, electronic equipment and storage media - Google Patents
Photography methods, devices, electronic equipment and storage media Download PDFInfo
- Publication number
- CN114390219B CN114390219B CN202210054654.7A CN202210054654A CN114390219B CN 114390219 B CN114390219 B CN 114390219B CN 202210054654 A CN202210054654 A CN 202210054654A CN 114390219 B CN114390219 B CN 114390219B
- Authority
- CN
- China
- Prior art keywords
- image
- camera
- synthesized
- images
- electronic device
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/222—Studio circuitry; Studio devices; Studio equipment
- H04N5/262—Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
- H04N5/265—Mixing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/50—Constructional details
- H04N23/54—Mounting of pick-up tubes, electronic image sensors, deviation or focusing coils
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/57—Mechanical or electrical details of cameras or camera modules specially adapted for being embedded in other devices
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/695—Control of camera direction for changing a field of view, e.g. pan, tilt or based on tracking of objects
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/698—Control of cameras or camera modules for achieving an enlarged field of view, e.g. panoramic image capture
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/222—Studio circuitry; Studio devices; Studio equipment
- H04N5/262—Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
- H04N5/2624—Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects for obtaining an image which is composed of whole input images, e.g. splitscreen
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M2250/00—Details of telephonic subscriber devices
- H04M2250/52—Details of telephonic subscriber devices including functional features of a camera
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Studio Devices (AREA)
- Stereoscopic And Panoramic Photography (AREA)
Abstract
本申请公开了一种拍摄方法、装置、电子设备及存储介质,该拍摄方法应用于电子设备,所述电子设备包括可延预设方向移动的摄像头,该拍摄方法包括:获取所述摄像头采集的第一取景图像以及第二取景图像;基于所述第一取景图像以及第二取景图像,控制所述摄像头沿所述预设方向移动,并在移动过程中进行图像拍摄,得到多张待合成图像;对所述多张待合成图像中每张待合成图像,进行图像重建;基于所述图像重建后的多张待合成图像,生成全景图像。本方法可快捷地实现全景图像的拍摄,并且能够提升全景图像的质量。
This application discloses a shooting method, device, electronic equipment and storage medium. The shooting method is applied to electronic equipment. The electronic equipment includes a camera that can move in a preset direction. The shooting method includes: obtaining the data collected by the camera. A first framing image and a second framing image; based on the first framing image and the second framing image, control the camera to move along the preset direction, and capture images during the movement to obtain multiple images to be synthesized ; Perform image reconstruction on each of the plurality of images to be synthesized, and generate a panoramic image based on the plurality of images to be synthesized after reconstruction. This method can quickly realize the shooting of panoramic images, and can improve the quality of panoramic images.
Description
技术领域Technical field
本申请涉及电子设备技术领域,更具体地,涉及一种拍摄方法、装置、电子设备及存储介质。The present application relates to the technical field of electronic equipment, and more specifically, to a photographing method, device, electronic equipment and storage medium.
背景技术Background technique
电子设备,例如手机、平板电脑等,已经成为人们日常生活中最常用的消费型电子产品之一。随着科技水平的发展,电子设备通常会设置有摄像头,从而实现拍摄功能。并且,目前的大多数电子设备支持全景图像的拍摄,从而满足用户获得视野范围较大的图像,但目前拍摄全景图像的便捷性不足。Electronic devices, such as mobile phones, tablets, etc., have become one of the most commonly used consumer electronic products in people's daily lives. With the development of science and technology, electronic devices are usually equipped with cameras to realize the shooting function. Moreover, most current electronic devices support the shooting of panoramic images, thereby allowing users to obtain images with a larger field of view. However, the current convenience of shooting panoramic images is insufficient.
发明内容Contents of the invention
本申请提出了一种拍摄方法、装置、电子设备及存储介质,可以快捷地实现全景图像的拍摄。This application proposes a shooting method, device, electronic equipment and storage medium, which can quickly realize the shooting of panoramic images.
第一方面,本申请实施例提供了一种拍摄方法,应用于电子设备,所述电子设备包括可延预设方向移动的摄像头,所述方法包括:获取所述摄像头采集的第一取景图像以及第二取景图像;基于所述第一取景图像以及第二取景图像,控制所述摄像头沿所述预设方向移动,并在移动过程中进行图像拍摄,得到多张待合成图像;对所述多张待合成图像中每张待合成图像,进行图像重建;基于所述图像重建后的多张待合成图像,生成全景图像。In a first aspect, embodiments of the present application provide a shooting method applied to an electronic device. The electronic device includes a camera that can move in a preset direction. The method includes: acquiring a first view image collected by the camera; a second framing image; based on the first framing image and the second framing image, control the camera to move along the preset direction, and capture images during the movement to obtain multiple images to be synthesized; Perform image reconstruction on each of the images to be synthesized, and generate a panoramic image based on the multiple images to be synthesized after reconstruction.
第二方面,本申请实施例提供了一种拍摄装置,应用于电子设备,所述电子设备包括可延预设方向移动的摄像头,所述装置包括:图像获取模块、图像拍摄模块、图像重建模块以及图像生成模块,其中,所述图像获取模块用于获取所述摄像头采集的第一取景图像以及第二取景图像;所述图像拍摄模块用于基于所述第一取景图像以及第二取景图像,控制所述摄像头沿所述预设方向移动,并在移动过程中进行图像拍摄,得到多张待合成图像;所述图像重建模块用于对所述多张待合成图像中每张待合成图像,进行图像重建;所述图像生成模块用于基于所述图像重建后的多张待合成图像,生成全景图像。In the second aspect, embodiments of the present application provide a shooting device, which is applied to electronic equipment. The electronic equipment includes a camera that can move in a preset direction. The device includes: an image acquisition module, an image shooting module, and an image reconstruction module. and an image generation module, wherein the image acquisition module is used to acquire the first view image and the second view image collected by the camera; the image capture module is used to obtain the first view image and the second view image based on the first view image and the second view image, Control the camera to move along the preset direction and capture images during the movement to obtain multiple images to be synthesized; the image reconstruction module is used to reconstruct each image to be synthesized in the multiple images to be synthesized, Carry out image reconstruction; the image generation module is used to generate a panoramic image based on the multiple images to be synthesized after the image reconstruction.
第三方面,本申请实施例提供了一种电子设备,包括:一个或多个处理器;存储器;一个或多个应用程序,其中所述一个或多个应用程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个应用程序配置用于执行上述第一方面提供的拍摄方法。In a third aspect, embodiments of the present application provide an electronic device, including: one or more processors; a memory; and one or more application programs, wherein the one or more application programs are stored in the memory and Configured to be executed by the one or more processors, the one or more application programs are configured to execute the photographing method provided by the above-mentioned first aspect.
第四方面,本申请实施例提供了一种计算机可读取存储介质,所述计算机可读取存储介质中存储有程序代码,所述程序代码可被处理器调用执行上述第一方面提供的拍摄方法。In a fourth aspect, embodiments of the present application provide a computer-readable storage medium. The computer-readable storage medium stores program code. The program code can be called by a processor to perform the shooting provided in the first aspect. method.
本申请提供的方案,电子设备设置有可延预设方向移动的摄像头,电子设备进行拍摄时,通过获取该摄像头采集的第一取景图像以及第二取景图像,基于第一取景图像以及第二取景图像,控制摄像头沿预设方向移动,并在移动过程中进行图像拍摄,得到多张待合成图像,然后对多张待合成图像中每张待合成图像,进行图像重建,再基于图像重建后的多张待合成图像,生成全景图像。由此,可以实现用户利用电子设备拍摄第一取景图像以及第二取景图像,即可控制摄像头进行移动并进行全景图像拍摄,并且对拍摄的多张图像进行图像重建后再生成全景图像,可以提升获得的全景图像的图像质量。In the solution provided by this application, the electronic device is equipped with a camera that can move in a preset direction. When the electronic device is shooting, by acquiring the first view image and the second view image collected by the camera, based on the first view image and the second view image, image, control the camera to move along the preset direction, and capture images during the movement to obtain multiple images to be synthesized, and then perform image reconstruction on each of the multiple images to be synthesized, and then reconstruct the image based on the reconstructed image. Multiple images to be synthesized to generate a panoramic image. As a result, the user can use the electronic device to capture the first view image and the second view image, control the camera to move and capture panoramic images, and perform image reconstruction on the multiple captured images to generate a panoramic image, which can improve Image quality of the obtained panoramic image.
附图说明Description of the drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those skilled in the art, other drawings can also be obtained based on these drawings without exerting creative efforts.
图1示出了本申请实施例提供的应用环境的示意图。Figure 1 shows a schematic diagram of the application environment provided by the embodiment of the present application.
图2示出了根据本申请一个实施例的拍摄方法流程图。Figure 2 shows a flow chart of a shooting method according to an embodiment of the present application.
图3示出了根据本申请另一个实施例的拍摄方法流程图。Figure 3 shows a flow chart of a shooting method according to another embodiment of the present application.
图4示出了根据本申请又一个实施例的拍摄方法流程图。Figure 4 shows a flow chart of a shooting method according to yet another embodiment of the present application.
图5示出了本申请实施例提供的全景图像的一种示意图。Figure 5 shows a schematic diagram of a panoramic image provided by an embodiment of the present application.
图6示出了根据本申请再一个实施例的拍摄方法流程图。Figure 6 shows a flow chart of a shooting method according to yet another embodiment of the present application.
图7示出了根据本申请一个实施例的拍摄装置的一种框图。Figure 7 shows a block diagram of a photographing device according to an embodiment of the present application.
图8是本申请实施例的用于执行根据本申请实施例的拍摄方法的电子设备的框图。FIG. 8 is a block diagram of an electronic device used to perform a photographing method according to an embodiment of the present application.
图9是本申请实施例的用于保存或者携带实现根据本申请实施例的拍摄方法的程序代码的存储单元。Figure 9 is a storage unit used to save or carry the program code for implementing the shooting method according to the embodiment of the present application.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。In order to enable those in the technical field to better understand the solution of the present application, the technical solution in the embodiment of the present application will be clearly and completely described below in conjunction with the drawings in the embodiment of the present application.
当前,电子设备(例如智能手机、平板电脑等)在日常生活使用中,普及率已近乎全民覆盖,其中,相机模块,已成为电子设备主要功能点,用户可通过电子设备的相机功能,拍摄照片与视频,所得的图像即拍即得,方便快捷,不仅如此,用户也经常将拍摄的图像上传到网上与他人一起分享。Currently, the popularity of electronic devices (such as smartphones, tablets, etc.) in daily life has reached nearly universal coverage. Among them, the camera module has become the main function point of electronic devices. Users can take photos through the camera function of electronic devices. With video, the resulting images are instantly captured, which is convenient and fast. Not only that, users also often upload the captured images to the Internet to share them with others.
在通过电子设备进行拍摄时,扩展视场角(Field of View,FOV)成像在用户拍照方面具有重要的应用。目前实现更大的FOV的成像方式可以采用超广角成像模组,超广角成像是指摄取比主摄FOV更大更广阔的镜头,常用超广角等效焦距为12-15mm,FOV大约位于120度,由于超广角镜头焦距短,视角宽阔,景深较长通常被用于拍摄风景照片,也会用于拍摄近景以表现辽阔透视效果。当然,也有通过主摄像头进行全景图像拍摄,以拓展成像的视野范围,该方式中,用户使用基于主摄的全景相机实现拓展FOV成像,全景成像都需要用户沿着特定的轴线或者边框进行取景,然后手机内部进行图像合成获取得到扩展FOV的图像。When shooting through electronic devices, expanded field of view (Field of View, FOV) imaging has an important application in users' photography. Currently, the imaging method to achieve a larger FOV can use an ultra-wide-angle imaging module. Ultra-wide-angle imaging refers to capturing a lens that is larger and wider than the FOV of the main camera. The commonly used ultra-wide-angle equivalent focal length is 12-15mm, and the FOV is approximately 120 degrees. , due to the short focal length, wide viewing angle, and long depth of field of the ultra-wide-angle lens, it is usually used to take landscape photos, and it can also be used to take close-up shots to show a broad perspective effect. Of course, there are also panoramic image shootings through the main camera to expand the field of view of imaging. In this method, the user uses a panoramic camera based on the main camera to expand the FOV imaging. Panoramic imaging requires the user to frame the view along a specific axis or border. Then the phone performs image synthesis internally to obtain an image with an extended FOV.
相关技术中,利用主摄像头进行全景图像拍摄的方式中,用户需要保持握持电子设备进行移动,因此存在不方便的问题;并且,拍摄时用户手部的抖动会使分块区域无法固定在同一水平面,首先会使得很难抓拍到清晰照片,其次拍摄图像由于抖动很难对齐存在边缘畸变或者模糊,十分影响拍摄体验;另外,该方式中还存在近距离失焦、分辨率较低等缺点,使得到的图像的质量较差,影响了用户的拍摄体验。In related technologies, in the method of using the main camera to capture panoramic images, the user needs to keep holding the electronic device to move, so there is an inconvenience problem; moreover, the shaking of the user's hand during shooting will prevent the block areas from being fixed in the same position. The horizontal plane first makes it difficult to capture clear photos. Secondly, the captured images are difficult to align due to jitter and have edge distortion or blur, which greatly affects the shooting experience. In addition, this method also has shortcomings such as out-of-focus at close range and low resolution. The resulting image quality is poor, affecting the user's shooting experience.
下面先对本申请实施例涉及的场景进行介绍。The scenarios involved in the embodiments of this application are first introduced below.
如图1所示,在图1所示的场景包括电子设备100,该电子设备100包括终端本体130、移动组件140以及摄像头150,摄像头150安装于移动组件140上,由此,实现移动组件140带动摄像头150进行移动。As shown in Figure 1, the scene shown in Figure 1 includes an electronic device 100. The electronic device 100 includes a terminal body 130, a mobile component 140 and a camera 150. The camera 150 is installed on the mobile component 140, thereby realizing the mobile component 140. The camera 150 is driven to move.
在一些实施方式中,摄像头150在移动组件140的带动下,能够沿预设方向移动。该预设方向可以是水平方向,也可以是竖直方向,也可以同时包括水平方向及竖直方向。In some embodiments, the camera 150 is driven by the moving component 140 and can move in a preset direction. The preset direction may be a horizontal direction, a vertical direction, or may include both a horizontal direction and a vertical direction.
于本申请实施例中,如图1所示,移动组件140可以为可移动的导轨,摄像头150可以沿导轨移动,导轨的驱动方式可以是压电、电磁等方式,该方式中,摄像头150可以移动的方向由导轨的排布方向确定。In the embodiment of the present application, as shown in Figure 1, the moving component 140 can be a movable guide rail, and the camera 150 can move along the guide rail. The driving method of the guide rail can be piezoelectric, electromagnetic, etc. In this method, the camera 150 can The direction of movement is determined by the arrangement direction of the guide rails.
此外,电子设备100的其他功能器件也可以设置在移动组件140上,其中,其他功能器件除了可以包括接近光传感器、听筒、距离传感器、环境光传感器、温度传感器、压力传感器等器件。In addition, other functional devices of the electronic device 100 may also be provided on the mobile component 140 , where other functional devices may include proximity light sensors, earpieces, distance sensors, ambient light sensors, temperature sensors, pressure sensors and other devices.
下面再结合附图对本申请实施例提供的拍摄方法进行详细介绍。The photographing method provided by the embodiment of the present application will be introduced in detail below with reference to the accompanying drawings.
请参阅图2,图2示出了本申请一个实施例提供的拍摄方法的流程示意图。在具体的实施例中,所述拍摄方法应用于如图8所示的拍摄装置400以及配置有所述拍摄装置400的电子设备100(图9)。下面将以电子设备为例,说明本实施例的具体流程,当然,可以理解的,本实施例所应用的电子设备可以为智能手机、平板电脑、电子书等,在此不做限定。下面将针对图2所示的流程进行详细的阐述,所述拍摄方法具体可以包括以下步骤:Please refer to Figure 2. Figure 2 shows a schematic flowchart of a shooting method provided by an embodiment of the present application. In a specific embodiment, the photographing method is applied to the photographing device 400 shown in Fig. 8 and the electronic device 100 (Fig. 9) configured with the photographing device 400. The following will take an electronic device as an example to illustrate the specific process of this embodiment. Of course, it can be understood that the electronic device applied in this embodiment can be a smart phone, a tablet computer, an e-book, etc., and is not limited here. The process shown in Figure 2 will be described in detail below. The shooting method may specifically include the following steps:
步骤S110:获取所述摄像头采集的第一取景图像以及第二取景图像。Step S110: Obtain the first view image and the second view image collected by the camera.
在本申请实施例中,电子设备可以获取摄像头采集的第一取景图像以及第二取景图像,以便根据第一取景图像以及第二取景图像进行全景图像的拍摄。其中,第一取景图像以及第二取景图像可以是用户利用电子设备拍摄的用于确定全景图像的取景范围的图像,第一取景图像以及第二取景图像为电子设备位于第一取景图像以及第二取景图像的取景范围时,摄像头沿预设方向移动时可以采集到的图像。可以理解地,用户利用电子设备拍摄全景图像时,通常是利用电子设备在某一位置处开始拍摄图像,然后移动电子设备至另一位置处,从而完成全景图像的拍摄,基于全景图像的拍摄原理,电子设备可以获取全景图像的边界处的图像(即第一取景图像以及第二取景图像),以用于控制全景图像的拍摄。In this embodiment of the present application, the electronic device can acquire the first view image and the second view image collected by the camera, so as to capture the panoramic image based on the first view image and the second view image. Wherein, the first framing image and the second framing image may be images taken by the user using an electronic device to determine the framing range of the panoramic image, and the first framing image and the second framing image are when the electronic device is located in the first framing image and the second framing image. When framing the image's framing range, the image can be collected when the camera moves in the preset direction. It is understandable that when a user uses an electronic device to shoot a panoramic image, he usually uses the electronic device to start shooting the image at a certain position, and then moves the electronic device to another position to complete the shooting of the panoramic image. Based on the shooting principle of the panoramic image , the electronic device can acquire images at the boundary of the panoramic image (ie, the first framing image and the second framing image) for controlling the shooting of the panoramic image.
在一些实施方式中,电子设备可以输出提示信息,以提示用户利用电子设备采集第一取景图像以及第二取景图像。其中,输出的提示信息可以用于提示用户采集用于确定全景图像的取景范围的两张图像,且采集的图像应当是摄像头沿预设方向的移动过程中能够采集到的图像。由此,可以得到上述第一取景图像以及第二取景图像。In some implementations, the electronic device may output prompt information to prompt the user to use the electronic device to collect the first view image and the second view image. The output prompt information can be used to prompt the user to collect two images used to determine the viewing range of the panoramic image, and the collected images should be images that can be collected during the movement of the camera in the preset direction. As a result, the above-mentioned first view image and second view image can be obtained.
步骤S120:基于所述第一取景图像以及第二取景图像,控制所述摄像头沿所述预设方向移动,并在移动过程中进行图像拍摄,得到多张待合成图像。Step S120: Based on the first framing image and the second framing image, control the camera to move along the preset direction, and capture images during the movement to obtain multiple images to be synthesized.
在本申请实施例中,电子设备在获取到第一取景图像以及第二取景图像后,则可以利用第一取景图像以及第二取景图像,进行全景图像的拍摄。其中,电子设备可以基于第一取景图像以及第二取景图像,控制摄像头沿预设方向移动,并在移动过程中进行图像拍摄,根据拍摄到的图像,得到多张用于合成为全景图像的待合成图像。也就是说,上述预设方向也就是全景图像拍摄时的取景方向,电子设备在摄像头沿预设方向移动过程中拍摄得到的多张图像中可以包括第一取景图像的图像内容、第二取景图像的图像内容、以及第一取景图像的图像内容与第二取景图像的图像内容之间的图像内容,因此,可以基于此获得用于合成全景图像的待合成图像。多张待合成图像中可以包括基于第一取景图像以及第二取景图像所决定的取景范围内的图像内容,也就是说,多张待合成图像的图像内容包括第一取景图像的图像内容、第二取景图像的图像内容、以及第一取景图像的图像内容与第二取景图像的图像内容之间的图像内容。In this embodiment of the present application, after the electronic device acquires the first framing image and the second framing image, it can use the first framing image and the second framing image to capture the panoramic image. Wherein, the electronic device can control the camera to move in a preset direction based on the first view image and the second view image, and capture images during the movement, and obtain multiple images to be synthesized into a panoramic image based on the captured images. Composite image. That is to say, the above-mentioned preset direction is the viewing direction when shooting panoramic images. The multiple images captured by the electronic device while the camera moves in the preset direction may include the image content of the first viewing image, the second viewing image The image content, and the image content between the image content of the first framing image and the image content of the second framing image, therefore, the image to be synthesized for synthesizing the panoramic image can be obtained based on this. The multiple images to be synthesized may include image content within the framing range determined based on the first framing image and the second framing image. That is to say, the image content of the multiple images to be synthesized includes the image content of the first framing image, the image content of the second framing image, and the image content of the first framing image. The image content of the two framing images, and the image content between the image content of the first framing image and the image content of the second framing image.
在一些实施方式中,由于电子设备需要获得的图像内容包括第一取景图像的图像内容、第二取景图像的图像内容、以及第一取景图像的图像内容与第二取景图像的图像内容之间的图像内容,因此,在控制摄像头沿预设方向的移动过程中,可以对拍摄图像的图像内容进行检测。若拍摄的图像中包含了第一取景图像的图像内容以及第二取景图像的图像内容,则可以停止摄像头的移动,并从移动过程中拍摄的多张图像中,确定出包含第一取景图像的图像内容的图像,包含第二取景图像的图像内容的图像,以及包含两者之间的图像内容的图像,作为待合成图像。In some embodiments, the image content that the electronic device needs to obtain includes the image content of the first framing image, the image content of the second framing image, and the image content between the image content of the first framing image and the image content of the second framing image. Therefore, in the process of controlling the movement of the camera in a preset direction, the image content of the captured image can be detected. If the captured image contains the image content of the first framing image and the image content of the second framing image, the movement of the camera can be stopped, and the image containing the first framing image can be determined from the multiple images taken during the movement. The image content of the image, the image containing the image content of the second view image, and the image containing the image content in between are used as the image to be synthesized.
在一些实施方式中,电子设备可以输出提示信息,以提示用户握持电子设备,使电子设备的摄像头位于第一取景图像以及第二取景图像的取景范围内,并且电子设备使电子设备的姿态处于目标姿态,以保证摄像头沿预设方向移动时可以采集到此前采集的第一取景图像以及第二取景图像的图像内容。由此,可以保证电子设备控制摄像头沿预设方向移动的过程中,能够采集得到用户需求的图像内容,以生成全景图像。In some embodiments, the electronic device may output prompt information to prompt the user to hold the electronic device so that the camera of the electronic device is within the viewing range of the first and second viewing images, and the electronic device keeps the posture of the electronic device in The target posture is to ensure that the image content of the previously collected first view image and the second view image can be collected when the camera moves in the preset direction. This ensures that when the electronic device controls the camera to move in the preset direction, the image content required by the user can be collected to generate a panoramic image.
在一些实施方式中,电子设备在控制摄像头的移动过程中,通过摄像头采集图像时,可以根据摄像头的移动距离,进行图像采集,以保证采集得到的图像中的图像内容连续,从而能够在后续生成全景图像。In some embodiments, when the electronic device controls the movement of the camera and collects images through the camera, it can collect images according to the moving distance of the camera to ensure that the image content in the collected images is continuous, so that it can be generated later. panoramic image.
步骤S130:对所述多张待合成图像中每张待合成图像,进行图像重建。Step S130: Perform image reconstruction on each of the multiple images to be synthesized.
在本申请实施例中,电子设备可以在得到多张待合成图像后,针对多张待合成图像,进行图像重建,以提升待合成图像的图像质量。其中,图像重建可以是基于叠层成像的图像重建、图像去噪、提升对比度、提升饱和度、提升清晰度、提升分辨率等重建处理,通过对待合成图像进行图像重建,可以使得后续生成的全景图像的图像质量较佳。In the embodiment of the present application, after obtaining multiple images to be synthesized, the electronic device can perform image reconstruction on the multiple images to be synthesized, so as to improve the image quality of the images to be synthesized. Among them, image reconstruction can be image reconstruction based on stacked imaging, image denoising, contrast improvement, saturation improvement, clarity improvement, resolution improvement and other reconstruction processes. By performing image reconstruction on the image to be synthesized, the subsequently generated panorama can be The image quality of the image is better.
步骤S140:基于所述图像重建后的多张待合成图像,生成全景图像。Step S140: Generate a panoramic image based on the multiple images to be synthesized after the image reconstruction.
在本申请实施例中,电子设备对多张待合成图像进行图像重建后,则可以基于图像重建后的多张待合成图像,合成得到全景图像,从而可以得到图像质量较佳的全景图像。In this embodiment of the present application, after the electronic device performs image reconstruction on multiple images to be synthesized, the panoramic image can be synthesized based on the multiple images to be synthesized after image reconstruction, so that a panoramic image with better image quality can be obtained.
在一些实施方式中,电子设备可以根据待合成图像之间的匹配区域,对待合成图像进行拼接,从而生成得到全景图像。其中,针对在拍摄时序上相邻的两张待合成图像而言,两张待合成图像之间的匹配区域可以作为重合区域,按照重合区域将两张待合成图像重叠到一起;如此重复,完成所有待合成图像的拼接,得到生成的全景图像。由于多张待合成图像中的图像内容包括第一取景图像的图像内容、第二取景图像的图像内容、以及第一取景图像的图像内容与第二取景图像的图像内容之间的图像内容,因此,对多张待合成图像进行拼接后得到的全景图像可以包含用户所需拍摄的图像内容。当然,电子设备对多张待合成图像进行合成得到全景图像的方式,也可以为其他生成全景图像时的合成方式。In some embodiments, the electronic device can splice the images to be synthesized according to the matching areas between the images to be synthesized, thereby generating a panoramic image. Among them, for two images to be synthesized that are adjacent in shooting time sequence, the matching area between the two images to be synthesized can be used as the overlapping area, and the two images to be synthesized are overlapped together according to the overlapping area; repeat this to complete All the images to be synthesized are stitched together to obtain the generated panoramic image. Since the image content in the multiple images to be synthesized includes the image content of the first framing image, the image content of the second framing image, and the image content between the image content of the first framing image and the image content of the second framing image, therefore , the panoramic image obtained by splicing multiple images to be synthesized can contain the image content required by the user. Of course, the way in which the electronic device synthesizes multiple images to be synthesized to obtain a panoramic image can also be other synthesis methods used to generate a panoramic image.
本申请实施例提供的拍摄方法,可以实现用户利用电子设备拍摄第一取景图像以及第二取景图像,即可控制摄像头进行移动并进行全景图像拍摄,而无需握持电子设备保持相应的姿态移动电子设备进行拍摄,可以方便用户通过电子设备拍摄得到全景图像;并且,对拍摄的多张图像进行图像重建后再生成全景图像,可以提升获得的全景图像的图像质量。The shooting method provided by the embodiment of the present application allows the user to use an electronic device to shoot the first view image and the second view image, and then control the camera to move and capture panoramic images without holding the electronic device and maintaining a corresponding posture to move the electronic device. Shooting with an electronic device can facilitate users to obtain panoramic images through shooting with electronic devices; and reconstructing multiple captured images to generate panoramic images can improve the image quality of the obtained panoramic images.
请参阅图3,图3示出了本申请另一个实施例提供的拍摄方法的流程示意图。该拍摄方法应用于上述电子设备,下面将针对图3所示的流程进行详细的阐述,所述拍摄方法具体可以包括以下步骤:Please refer to FIG. 3 , which shows a schematic flowchart of a shooting method provided by another embodiment of the present application. This shooting method is applied to the above-mentioned electronic equipment. The process shown in Figure 3 will be described in detail below. The shooting method may specifically include the following steps:
步骤S210:获取所述摄像头采集的第一取景图像以及第二取景图像。Step S210: Obtain the first view image and the second view image collected by the camera.
步骤S220:基于所述第一取景图像以及第二取景图像,控制所述摄像头沿所述预设方向移动,并在移动过程中进行图像拍摄,得到多张待合成图像。Step S220: Based on the first framing image and the second framing image, control the camera to move along the preset direction, and capture images during the movement to obtain multiple images to be synthesized.
在本申请实施例中,步骤S210以及步骤S220可以参阅其他实施例的内容,在此不再赘述。In the embodiment of the present application, the content of steps S210 and S220 can be referred to other embodiments, and will not be described again here.
步骤S230:对所述多张待合成图像中每张待合成图像,进行基于叠层成像的图像重建,得到全景图像。Step S230: Perform image reconstruction based on stacked imaging for each of the multiple images to be synthesized to obtain a panoramic image.
在本申请实施例中,电子设备在得到多张待合成图像后,可以对多张待合成图像进行基于叠层成像的图像重建,而由于基于叠层成像的图像重建在对图像进行重建时,本身是将不同位置处采集的图像重建为分辨率更高的图像,因此不仅能够完成图像的合成,还能够完成图像质量的提升。其中,基于叠层成像的图像重建可以是傅立叶叠层成像,傅立叶叠层成像中,其原理为:由于不同低分辨率图对应着样本频谱中的特定子区域,故可以通过优化算法在频域中将低分辨率图片的信息进行融合,获得超出系统物镜极限分辨率并保留其原有视场的高分辨率振幅和相位图片。由于基于叠层成像的图像重建本身是对多张不同位置的图像进行处理,因此可以利用该重建处理方式,来对多张待合成图像进行图像重建和合成,从而可以直接得到合成后的全景图像。In the embodiment of the present application, after obtaining multiple images to be synthesized, the electronic device can perform image reconstruction based on stacked imaging on the multiple images to be synthesized. Since the image reconstruction based on stacked imaging is used to reconstruct the image, It reconstructs images collected at different locations into higher-resolution images, so it can not only complete image synthesis, but also improve image quality. Among them, image reconstruction based on stack imaging can be Fourier stack imaging. In Fourier stack imaging, the principle is: since different low-resolution images correspond to specific sub-regions in the sample spectrum, optimization algorithms can be used to reconstruct the image in the frequency domain. The information of low-resolution images is fused to obtain high-resolution amplitude and phase images that exceed the limit resolution of the system objective lens and retain its original field of view. Since image reconstruction based on stacked imaging itself processes multiple images at different locations, this reconstruction processing method can be used to reconstruct and synthesize multiple images to be synthesized, so that the synthesized panoramic image can be directly obtained. .
在一些实施方式中,对所述多张待合成图像中每张待合成图像,进行基于叠层成像的图像重建,得到所述图像重建后的多张待合成图像,包括:基于所述摄像头的光圈函数,获取所述每张待合成图像与重建频谱之间的对应关系;对所述每张待合成图像进行傅立叶变换,得到所述每张待合成图像对应的频域信息;基于所述对应关系以及所述每张待合成图像对应的频域信息,对所述重建频谱中与所述每张待合成图像对应的位置处的幅值进行替换;重复所述基于所述摄像头的光圈函数,获取所述每张待合成图像与重建频谱之间的对应关系的步骤,至所述基于所述对应关系以及所述每张待合成图像对应的频域信息,对所述重建频谱中与所述每张待合成图像对应的位置处的幅值进行替换的步骤,直至满足预设迭代条件;将所述重建频谱变换为时域,得到所述全景图像。In some embodiments, image reconstruction based on stacked imaging is performed on each of the multiple images to be synthesized to obtain multiple images to be synthesized after the image reconstruction, including: Aperture function, obtains the correspondence between each image to be synthesized and the reconstructed spectrum; performs Fourier transform on each image to be synthesized, and obtains the frequency domain information corresponding to each image to be synthesized; based on the correspondence relationship and the frequency domain information corresponding to each image to be synthesized, replace the amplitude at the position corresponding to each image to be synthesized in the reconstructed spectrum; repeat the aperture function based on the camera, The step of obtaining the corresponding relationship between each image to be synthesized and the reconstructed spectrum is to, based on the corresponding relationship and the frequency domain information corresponding to each image to be synthesized, to compare the reconstructed spectrum with the The step of replacing the amplitude at the corresponding position of each image to be synthesized until the preset iteration conditions are met; transforming the reconstructed spectrum into the time domain to obtain the panoramic image.
在该方式中,电子设备可以根据光圈函数,确定出待合成图像对应的频域区域在重建频谱中的对应区域;然后将待合成图像与摄像头对应的点扩散函数进行卷积后,进行傅立叶变换,得到频域信息;再基于对应关系中待合成图像对应的频域区域在重建频谱中的对应区域,以及待合成图像对应的频域信息,对重建频谱中与每张待合成图像对应的位置处的幅值进行替换,并保留对应区域的相位不变,从而完成重建频谱的更新。如此重复,直至满足预设迭代条件时,将重建频谱进行傅立叶逆变换,使其变变换到时域,得到最终的全景图像。其中,预设迭代条件可以是迭代次数达到目标次数,也可以是更新后的重建频谱与更新前的重建频谱之间的差异小于目标差异,具体的迭代条件可以不做限定。In this method, the electronic device can determine the corresponding area of the frequency domain area corresponding to the image to be synthesized in the reconstructed spectrum based on the aperture function; then, the image to be synthesized is convolved with the point spread function corresponding to the camera, and then the Fourier transform is performed , obtain the frequency domain information; then based on the corresponding area of the frequency domain area corresponding to the image to be synthesized in the reconstructed spectrum in the correspondence relationship, and the frequency domain information corresponding to the image to be synthesized, the position corresponding to each image to be synthesized in the reconstructed spectrum is The amplitude at the corresponding region is replaced, and the phase of the corresponding region is kept unchanged, thereby completing the update of the reconstructed spectrum. This is repeated until the preset iteration conditions are met, and the reconstructed spectrum is subjected to inverse Fourier transform to transform it into the time domain to obtain the final panoramic image. The preset iteration condition may be that the number of iterations reaches the target number, or that the difference between the reconstructed spectrum after the update and the reconstructed spectrum before the update is smaller than the target difference. The specific iteration conditions may not be limited.
作为一种可能的实施方式,电子设备在执行基于叠层成像的图像重建之前,可以获取摄像头对应的点扩散函数,然后基于点扩散函数,确定摄像头的光圈函数。其中,电子设备可以根据预先设计的摄像头的光学参数,确定出预先设计的点扩散函数;然后根据设计的点扩散函数以及拍摄图像时实测的点扩散函数,确定出摄像头对应的光圈函数。可选地,电子设备可以根据摄像头的镜头设计光学档案获取,摄像头对焦位置多个视场与波长的点扩散函数信息,再根据传感器光谱响应曲线通过加权算法获取图像传感器R、G、B三通道点扩散函数信息,通过下采样算法将点扩散函数的参数间隔下采样至图像传感器的像素尺寸大小,从而得到预先设计的点扩散函数。其中,摄像头的镜头设计光学档案例如Zemax镜头设计光学档案等,在此不做限定。As a possible implementation, before performing image reconstruction based on stacked imaging, the electronic device can obtain the point spread function corresponding to the camera, and then determine the aperture function of the camera based on the point spread function. Among them, the electronic device can determine the pre-designed point spread function based on the pre-designed optical parameters of the camera; and then determine the aperture function corresponding to the camera based on the designed point spread function and the measured point spread function when shooting the image. Alternatively, the electronic device can obtain the point spread function information of multiple fields of view and wavelengths at the camera's focus position based on the lens design optical file of the camera, and then obtain the R, G, and B channels of the image sensor through a weighted algorithm based on the sensor spectral response curve. For point spread function information, the parameter interval of the point spread function is downsampled to the pixel size of the image sensor through a downsampling algorithm, thereby obtaining a pre-designed point spread function. Among them, the lens design optical files of the camera, such as Zemax lens design optical files, etc., are not limited here.
本申请实施例提供的拍摄方法,由于基于叠层成像的图像重建,不仅可以将多张不同位置处采集的图像进行合成,还能提升图像分辨率和进行像差校正,因此对拍摄的多张待合成图像进行图像重建并生成全景图像时,利用基于叠层成像的图像重建对多张待合成图像进行处理,可以提升生成的全景图像的图像质量。The shooting method provided by the embodiment of the present application, due to the image reconstruction based on stacked imaging, can not only synthesize multiple images collected at different positions, but also improve the image resolution and perform aberration correction. Therefore, the multiple captured images can be When the images to be synthesized are reconstructed and a panoramic image is generated, using image reconstruction based on stacked imaging to process multiple images to be synthesized can improve the image quality of the generated panoramic image.
请参阅图4,图4示出了本申请又一个实施例提供的拍摄方法的流程示意图。该拍摄方法应用于上述电子设备,下面将针对图4所示的流程进行详细的阐述,所述拍摄方法具体可以包括以下步骤:Please refer to FIG. 4 , which shows a schematic flowchart of a shooting method provided by yet another embodiment of the present application. This shooting method is applied to the above-mentioned electronic equipment. The process shown in Figure 4 will be described in detail below. The shooting method may specifically include the following steps:
步骤S310:获取所述摄像头采集的第一取景图像以及第二取景图像。Step S310: Obtain the first view image and the second view image collected by the camera.
在本申请实施例中,步骤S310可以参阅前述实施例的内容,在此不再赘述。In the embodiment of the present application, reference may be made to the content of the previous embodiment for step S310, which will not be described again here.
步骤S320:控制所述摄像头沿所述预设方向移动,并在移动过程中进行图像拍摄。Step S320: Control the camera to move along the preset direction, and capture images during the movement.
在本申请实施例中,电子设备在得到第一取景图像以及第二取景图像后,则可以控制摄像头沿预设方向进行移动,并在移动过程中进行图像拍摄。可选地,电子设备可以输出提示信息,以提示用户将电子设备位于摄像头通过沿预设方向移动,即可采集到第一取景图像以及第二取景图像的图像内容的位置;然后接收到用户基于提示信息进行的拍摄操作时,控制摄像头沿预设方向移动,并在移动过程中进行图像拍摄。In this embodiment of the present application, after obtaining the first framing image and the second framing image, the electronic device can control the camera to move in a preset direction and capture images during the movement. Optionally, the electronic device can output prompt information to prompt the user to place the electronic device at a position where the image content of the first framing image and the second framing image can be collected by moving the camera in a preset direction; and then receive the user's request based on When prompted to perform a shooting operation, the camera is controlled to move in a preset direction, and images are captured during the movement.
步骤S330:在所述摄像头拍摄的图像中包括第一图像内容以及第二图像内容时,停止所述摄像头的移动以及图像拍摄,所述第一图像内容与所述第一取景图像匹配,所述第二图像内容与所述第二取景图像匹配。Step S330: When the image captured by the camera includes first image content and second image content, stop the movement of the camera and image capture, and the first image content matches the first view image, and the The second image content matches the second view image.
在本申请实施例中,电子设备控制摄像头进行移动的过程中,可以将采集的图像与第一取景图像以及第二取景图像进行匹配,若摄像头拍摄的图像中已包括第一图像内容以及第二图像内容,则表示摄像头已经采集得到第一取景图像的图像内容、第二取景图像的图像内容以及第一取景图像的图像内容与第二取景图像的图像内容之间的图像内容,此时则无需继续控制摄像头进行移动,因此可以停止摄像头的移动和图像拍摄。In the embodiment of the present application, when the electronic device controls the movement of the camera, the collected image can be matched with the first framing image and the second framing image. If the image captured by the camera already includes the first image content and the second framing image, Image content means that the camera has collected the image content of the first framing image, the image content of the second framing image, and the image content between the image content of the first framing image and the image content of the second framing image. At this time, there is no need Continue to control the camera movement, so you can stop the camera movement and image capture.
在一些实施方式中,预设方向包括从电子设备的第一侧移动至电子设备的第二侧的方向、以及从电子设备的第二侧移动至电子设备的第一侧的方向,若电子设备控制摄像头沿预设方向的其中一个方向移动至最大距离后,仍未采集到第一取景图像的图像内容或第二取景图像的图像内容,则可以再控制摄像头沿另一方向移动,以便同时采集到第一取景图像的图像内容以及第二取景图像的图像内容。可以理解地,由于摄像头在开始图像采集时所处的位置的拍摄方向可能位于第一取景图像的图像内容与第二取景图像的图像内容之间,也可能位于两者之外,因此摄像头沿一个方向进行移动,可能并不能同时采集到第一取景图像的图像内容以及第二取景图像的图像内容,因此在控制摄像头沿一个方向移动至最大距离后,若未同时采集到第一取景图像的图像内容或第二取景图像的图像内容,则可以沿反向移动,以便同时采集到第一取景图像的图像内容以及第二取景图像的图像内容。In some embodiments, the preset direction includes a direction moving from the first side of the electronic device to the second side of the electronic device, and a direction moving from the second side of the electronic device to the first side of the electronic device. If the electronic device After controlling the camera to move in one of the preset directions to the maximum distance, if the image content of the first view image or the image content of the second view image has not been captured, you can control the camera to move in another direction to collect at the same time. to the image content of the first framing image and the image content of the second framing image. It can be understood that since the shooting direction of the position where the camera is when starting image collection may be between the image content of the first view image and the image content of the second view image, or may be located outside the two, the camera moves along a By moving in one direction, the image content of the first framing image and the image content of the second framing image may not be captured at the same time. Therefore, after controlling the camera to move in one direction to the maximum distance, if the image of the first framing image is not captured at the same time The content of the first framing image or the image content of the second framing image can be moved in the reverse direction, so that the image content of the first framing image and the image content of the second framing image are simultaneously captured.
步骤S340:基于所述第一取景图像以及第二取景图像,从所述摄像头拍摄的图像中筛选出多张待合成图像。Step S340: Based on the first view image and the second view image, select a plurality of images to be synthesized from the images captured by the camera.
在本申请实施例中,电子设备在控制摄像头停止移动和图像拍摄后,则可以基于第一取景图像以及第二取景图像,从摄像头拍摄的图像中筛选出多张待合成图像。可以理解地,由于摄像头在开始图像采集时所处的位置的拍摄方向可能位于第一取景图像的图像内容与第二取景图像的图像内容之间,也可能位于两者之外,因此摄像头采集得到的图像中可能包含有第一取景图像与第二取景图像构成的取景范围以外的图像内容对应的图像,此时为了使得满足用户需求获得第一取景图像与第二取景图像构成的取景范围的全景图像,则可以基于第一取景图像以及第二取景图像,从摄像头拍摄的图像中筛选出多张待合成图像。In this embodiment of the present application, after controlling the camera to stop moving and capturing images, the electronic device can filter out multiple images to be synthesized from the images captured by the camera based on the first framing image and the second framing image. It can be understood that since the shooting direction of the position where the camera is when starting image collection may be between the image content of the first view image and the image content of the second view image, or may be located outside the two, the camera captures The images may include images corresponding to image content outside the viewing range composed of the first viewing image and the second viewing image. In this case, in order to meet the user's needs, the panoramic view of the viewing range composed of the first viewing image and the second viewing image can be obtained. image, based on the first framing image and the second framing image, multiple images to be synthesized can be selected from the images captured by the camera.
在一些实施方式中,基于第一取景图像以及第二取景图像,从摄像头拍摄的图像中筛选出多张待合成图像,包括:对所述摄像头拍摄的图像按照拍摄时间的先后顺序进行排序,得到图像序列;从所述图像序列中,获取至少一张第一目标图像、至少一张第二目标图像以及所述第一目标图像与第二目标图像之间的图像,得到多张待合成图像,其中,所述第一目标图像中包括所述第一图像内容,所述第二目标图像中包括所述第二图像内容。可以理解地,由于电子设备在移动过程中可能并非刚好能够拍摄得到与第一取景图像和第二取景图像完全相同的图像,即第一取景图像的图像内容可能分布于两张拍摄的图像中,第二取景图像的图像内容也可能分布于两张拍摄的图像中,但是为了得到第一取景图像与第二取景图像构成的取景范围的全景图像,也就需要使得全景图像包含第一取景图像以及第二取景图像的图像内容,因此上述第一目标图像以及第二目标图像可能是单张,也可能不是单张。In some embodiments, based on the first view image and the second view image, filtering out multiple images to be synthesized from the images captured by the camera includes: sorting the images captured by the camera in the order of shooting time, to obtain Image sequence; from the image sequence, obtain at least one first target image, at least one second target image and the image between the first target image and the second target image, and obtain a plurality of images to be synthesized, Wherein, the first target image includes the first image content, and the second target image includes the second image content. It is understandable that since the electronic device may not be able to capture exactly the same image as the first framing image and the second framing image during movement, that is, the image content of the first framing image may be distributed in the two captured images. The image content of the second framing image may also be distributed in the two captured images, but in order to obtain a panoramic image of the framing range composed of the first framing image and the second framing image, it is necessary to make the panoramic image include the first framing image and The image content of the second view image, therefore, the first target image and the second target image may be a single image, or may not be a single image.
可选地,若预设方向包括从电子设备的第一侧移动至电子设备的第二侧的方向、以及从电子设备的第二侧移动至电子设备的第一侧的方向,则可能出现摄像头来回移动,才使得摄像头拍摄的图像中包括第一图像内容以及第二图像内容。此时,可能电子设备沿一个方向移动时,已经采集得到目标取景图像(第一取景图像或第二取景图像)的图像内容,再往另一方向移动时,则又可能再次采集到目标取景图像的图像内容,因此,在获取第一目标图像与第二目标图像之间的图像时,可以是获取拍摄时间上相距最近的第一目标图像与第二目标图像之间的图像。例如,图像序列中包括:图像1、图像2、图像3…、图像10,图像2包括第一取景图像的图像内容,图像5包括第一取景图像的图像内容,图像10包括第二取景图像的图像内容,则上述第一目标图像包括图像2和图像5,第二目标图像为图像10,在获取第一目标图像与第二目标图像之间的图像时,图像5与图像10相差的拍摄时间,小于图像2与图像10之间相差的拍摄时间,即图像5与图像10在拍摄时间上相距更近,因此是获取图像5与图像10之间的图像,作为第一目标图像与第二目标图像之间的图像。Optionally, if the preset direction includes a direction moving from the first side of the electronic device to the second side of the electronic device, and a direction moving from the second side of the electronic device to the first side of the electronic device, the camera may appear. By moving back and forth, the image captured by the camera includes the first image content and the second image content. At this time, it is possible that when the electronic device moves in one direction, the image content of the target framing image (the first framing image or the second framing image) has been captured, and when it moves in another direction, the target framing image may be captured again. Therefore, when acquiring the image between the first target image and the second target image, the image between the first target image and the second target image that are closest in shooting time may be acquired. For example, the image sequence includes: image 1, image 2, image 3..., image 10. Image 2 includes the image content of the first framing image, image 5 includes the image content of the first framing image, and image 10 includes the image content of the second framing image. image content, then the above-mentioned first target image includes image 2 and image 5, and the second target image is image 10. When acquiring the image between the first target image and the second target image, the shooting time difference between image 5 and image 10 is , is less than the shooting time difference between image 2 and image 10, that is, image 5 and image 10 are closer in shooting time, so the image between image 5 and image 10 is obtained as the first target image and the second target images between images.
在一些实施方式中,若摄像头可移动的预设方向包括多个方向,其中,摄像头可以从第一侧沿水平方向移动至第二侧,然后再竖直方向移动后,再延水平方向从第二侧移动至第一侧,如此重复,直至摄像头从竖直方向的一侧移动至另一侧。在这样的方式中,上述第一取景图像的图像内容以及第二取景图像的图像内容可以不是摄像头沿水平方向或竖直方向移动即可采集到的图像内容,电子设备可以控制摄像头沿多个方向进行移动,以使电子设备能够采集到第一取景图像的图像内容以及第二取景图像的图像内容。并且,在采集得到第一取景图像的图像内容以及第二取景图像的图像内容之后,电子设备拍摄的图像中筛选用于生成全景图像的多张待合成图像时,则可以根据摄像头的移动方向确定待合成图像。具体地,电子设备可以根据移动方向,将所有拍摄图像进行排布,然后从排布结果中,确定出以第三目标图像所在行和列的图像,作为第一行的图像以及第一列的图像,以及第四目标图像所在行和列的图像,作为第二行的图像以及第二列的图像;再从排布结果中,确定第一行的图像以及第一列的图像,与第二行的图像以及第二列的图像所包含的范围内的图像,作为待合成图像。In some embodiments, if the preset direction in which the camera can move includes multiple directions, the camera can move from the first side to the second side in the horizontal direction, and then move in the vertical direction, and then move in the horizontal direction from the second side to the second side. Move the second side to the first side, and repeat until the camera moves from one side to the other vertically. In this way, the image content of the first viewfinding image and the image content of the second viewfinder image may not be image content that can be collected by moving the camera in the horizontal direction or the vertical direction. The electronic device can control the camera to move in multiple directions. Move so that the electronic device can capture the image content of the first framing image and the image content of the second framing image. Moreover, after collecting the image content of the first view image and the image content of the second view image, when selecting multiple images to be synthesized for generating a panoramic image from the images captured by the electronic device, the moving direction of the camera can be determined. The image to be synthesized. Specifically, the electronic device can arrange all the captured images according to the movement direction, and then determine from the arrangement results the image of the row and column of the third target image as the image of the first row and the image of the first column. image, as well as the image of the row and column where the fourth target image is located, as the image of the second row and the image of the second column; then from the arrangement results, determine the image of the first row and the image of the first column, and the image of the second The image in the row and the image in the second column are included in the range as the image to be synthesized.
步骤S350:对所述多张待合成图像中每张待合成图像,进行图像重建,得到所述图像重建后的多张待合成图像。Step S350: Perform image reconstruction on each of the multiple images to be synthesized to obtain multiple images to be synthesized after the image reconstruction.
步骤S360:基于所述图像重建后的多张待合成图像,生成全景图像。Step S360: Generate a panoramic image based on the multiple images to be synthesized after the image reconstruction.
在本申请实施例中,步骤S350以步骤S360可以参阅前述实施例的内容,在此不再赘述。In the embodiment of the present application, the content of step S350 and step S360 can be referred to the previous embodiment, and will not be described again here.
示例性地,请参阅图5,电子设备在保持位姿不变的情况下,控制摄像头沿预设方向移动,可以采集到多张拍摄图像,并且可以从多张拍摄图像中筛选出图像1至图像n,其中,n为正整数,图像1中包含第一取景图像的图像内容,图像n包含第二取景图像的图像内容;然后将图像1至图像n进行图像重建后,再经过合成,得到最终的全景图像A1。For example, please refer to Figure 5. While keeping the posture unchanged, the electronic device controls the camera to move in a preset direction, can collect multiple captured images, and can filter out images 1 to 1 from the multiple captured images. Image n, where n is a positive integer, image 1 contains the image content of the first framing image, and image n contains the image content of the second framing image; then image 1 to image n are reconstructed and then synthesized to obtain The final panoramic image A1.
本申请实施例提供的拍摄方法,可以实现用户利用电子设备拍摄第一取景图像以及第二取景图像,然后根据第一取景图像以及第二取景图像,控制摄像头沿预设方向移动,并在移动过程中进行图像拍摄,在摄像头拍摄的图像中包括第一图像内容以及第二图像内容时,停止摄像头的移动以及图像拍摄,由此可以从拍摄得到的图像中确定出用于合成全景图像的多张待合成图像,如此,无需用户握持电子设备保持姿态不变的情况下移动电子设备进行拍摄,即可得到图像质量较佳的全景图像,方便了用户获取所需的全景图像。The shooting method provided by the embodiment of the present application enables the user to use an electronic device to shoot a first view image and a second view image, and then control the camera to move in a preset direction according to the first view image and the second view image, and during the movement process When the image captured by the camera includes the first image content and the second image content, the movement of the camera and the image capture are stopped, whereby multiple images used to synthesize the panoramic image can be determined from the captured images. The image is to be synthesized. In this way, a panoramic image with better image quality can be obtained without the user having to hold the electronic device and keep the posture unchanged while moving the electronic device for shooting, which facilitates the user to obtain the desired panoramic image.
请参阅图6,图6示出了本申请再一个实施例提供的拍摄方法的流程示意图。该拍摄方法应用于上述电子设备,下面将针对图6所示的流程进行详细的阐述,所述拍摄方法具体可以包括以下步骤:Please refer to FIG. 6 , which shows a schematic flowchart of a shooting method provided by yet another embodiment of the present application. This shooting method is applied to the above-mentioned electronic equipment. The process shown in Figure 6 will be described in detail below. The shooting method may specifically include the following steps:
步骤S410:获取所述摄像头采集的第一取景图像以及第二取景图像,所述第一取景图像与所述摄像头的当前位置对应,所述第二取景图像与所述摄像头由所述当前位置沿所述预设方向移动过程中的目标位置对应。Step S410: Obtain the first viewfinding image and the second viewfinder image collected by the camera. The first viewfinder image corresponds to the current position of the camera. The second viewfinder image and the camera are located along the edge of the current position from the current position. Corresponds to the target position during movement in the preset direction.
在本申请实施例中,第一取景图像可以与摄像头的当前位置对应,第二取景图像可以与摄像头由当前位置沿预设方向移动过程中的目标位置对应,也就是说,第一取景图像为摄像头位于当前位置时,能够在电子设备处于相应位置时能够采集得到的图像,第二取景图像为电子设备保持位姿不变的情况下摄像头由当前位置沿预设方向移动时可以采集得到的图像,后续摄像头在能够采集到与第一取景图像匹配的图像的情况下,控制摄像头由该当前位置沿预设方向移动,即可采集到第二取景图像的图像内容。In the embodiment of the present application, the first view image may correspond to the current position of the camera, and the second view image may correspond to the target position of the camera when it moves from the current position in the preset direction. That is to say, the first view image is When the camera is at the current position, it can capture the image when the electronic device is at the corresponding position. The second view image is the image that can be captured when the camera moves from the current position in the preset direction while the electronic device maintains its posture. , if the subsequent camera can collect an image that matches the first view image, it controls the camera to move in the preset direction from the current position, so that the image content of the second view image can be collected.
在一些实施方式中,电子设备可以输出第二提示信息,该第二提示信息用于提示用户通电子设备采集第一取景图像,以及将电子设备沿预设方向移动后通过电子设备采集第二取景图像,以便用户根据提示信息,通过电子设备采集得到上述的第一取景图像以及第二取景图像。In some embodiments, the electronic device can output second prompt information, which is used to prompt the user to collect the first view image through the electronic device, and to collect the second view image through the electronic device after moving the electronic device in a preset direction. images, so that the user can collect the above-mentioned first view image and second view image through the electronic device according to the prompt information.
步骤S420:在所述摄像头采集的预览图像与所述第一取景图像匹配时,开始图像拍摄。Step S420: When the preview image collected by the camera matches the first view image, start image capturing.
步骤S430:控制所述摄像头由所述当前位置,沿所述预设方向移动,并在移动过程中进行图像拍摄。Step S430: Control the camera to move from the current position along the preset direction, and capture images during the movement.
在本申请实施例中,电子设备可以根据摄像头采集的预览图像,确定开始采集图像和控制摄像头进行移动的时机,其中,电子设备可以将采集的预览图像与第一取景图像进行匹配,在电子设备采集得到与第一取景图像匹配的图像时,则可以控制摄像头进行图像拍摄,并且控制摄像头由当前位置沿预设方向移动,并在移动过程中进行图像拍摄,以便拍摄得到用于生成与第一取景图像以及第二取景图像构成的取景范围所匹配的全景图像。In the embodiment of the present application, the electronic device can determine the timing to start collecting images and control the movement of the camera based on the preview image collected by the camera. The electronic device can match the collected preview image with the first viewfinder image. When the electronic device When an image matching the first view image is collected, the camera can be controlled to capture the image, and the camera can be controlled to move from the current position in a preset direction, and capture the image during the movement, so that the captured image is used to generate the image that matches the first view image. A panoramic image that matches the framing range formed by the framing image and the second framing image.
步骤S440:在所述摄像头的拍摄的图像与所述第二取景图像匹配时,停止所述摄像头的移动以及图像拍摄。Step S440: When the image captured by the camera matches the second view image, stop the movement of the camera and image capturing.
在本申请实施例中,电子设备在控制摄像头进行移动的过程中,可以将拍摄的图像与第二取景图像进行匹配,若在摄像头的拍摄的图像与第二取景图像匹配时,则停止摄像头的移动以及图像拍摄。其中,拍摄的图像与第二取景图像匹配,可以是拍摄图像的图像内容与第二取景图像的图像内容匹配。In the embodiment of the present application, in the process of controlling the movement of the camera, the electronic device can match the captured image with the second framing image. If the image captured by the camera matches the second framing image, the electronic device will stop the camera. Mobile and image capture. Wherein, the photographed image matches the second framing image, which may be that the image content of the photographed image matches the image content of the second framing image.
在一些实施方式中,可能存在用户需要取景的范围较大,而电子设备保持位姿不变,控制摄像头沿预设方向移动时,无法获取到第二取景图像的图像内容的情况。因此,若摄像头沿预设方向移动最大距离时,未拍摄得到与第二取景图像匹配的图像,则可以输出第一提示信息,并暂停图像拍摄,第一提示信息用于提示用户沿预设方向移动电子设备;然后,控制摄像头移动至初始位置;在摄像头采集的预览图像与摄像头移动至最大距离时采集的图像匹配时,控制所述摄像头沿预设方向移动,并重新进行图像拍摄,直至拍摄的图像与第二取景图像匹配时,停止摄像头的移动以及图像拍摄。由此,可以通过电子设备短暂移动电子设备,然后再控制摄像头进行移动,即可拍摄到与第二取景图像匹配的图像。In some implementations, there may be a situation where the user needs to frame a larger range, and the electronic device keeps its posture unchanged and controls the camera to move in a preset direction, but cannot obtain the image content of the second framing image. Therefore, if the camera does not capture an image that matches the second view image when moving the maximum distance in the preset direction, the first prompt information can be output and the image capture can be paused. The first prompt information is used to prompt the user to move in the preset direction. Mobile electronic device; then, control the camera to move to the initial position; when the preview image collected by the camera matches the image collected when the camera moves to the maximum distance, control the camera to move in the preset direction, and re-capture the image until shooting When the image matches the second view image, stop camera movement and image capture. Therefore, the electronic device can be moved briefly through the electronic device, and then the camera can be controlled to move, so that an image matching the second view image can be captured.
步骤S450:基于所述摄像头在移动过程中拍摄的图像,确定多张待合成图像。Step S450: Determine multiple images to be synthesized based on the images captured by the camera during movement.
在一些实施方式中,若摄像头移动的方向为同一方向,由于电子设备在拍摄图像时,开始采集时的图像与第一取景图像匹配,停止采集时的图像与第二取景图像匹配,因此,可以直接将摄像头在移动过程中拍摄的图像,作为多张待合成图像。In some embodiments, if the camera moves in the same direction, when the electronic device captures images, the image when it starts collecting matches the first view image, and the image when it stops collecting matches the second view image. Therefore, it can Directly use the images captured by the camera during movement as multiple images to be synthesized.
在一些实施方式中,若摄像头移动方向为多个方向,其中,摄像头可以从第一侧沿水平方向移动至第二侧,然后再竖直方向移动后,再延水平方向从第二侧移动至第一侧,如此重复,直至摄像头从竖直方向的一侧移动至另一侧。该方式中,也可以按照前述实施例中筛选多种待合成图像的方式,从移动过程中拍摄的图像中筛选出多种待合成图像。In some embodiments, if the camera moves in multiple directions, the camera can move from the first side to the second side in the horizontal direction, and then move in the vertical direction, and then move in the horizontal direction from the second side to the second side. First side, repeat until the camera moves from one side to the other vertically. In this method, a variety of images to be synthesized can also be screened out from the images taken during the movement according to the method of screening multiple images to be synthesized in the previous embodiment.
步骤S460:对所述多张待合成图像中每张待合成图像,进行图像重建,得到所述图像重建后的多张待合成图像。Step S460: Perform image reconstruction on each of the multiple images to be synthesized to obtain multiple images to be synthesized after the image reconstruction.
步骤S470:基于所述图像重建后的多张待合成图像,生成全景图像。Step S470: Generate a panoramic image based on the multiple images to be synthesized after the image reconstruction.
在本申请实施例中,步骤S460以步骤S470可以参阅前述实施例的内容,在此不再赘述。In the embodiment of the present application, the content of step S460 and step S470 can be referred to the previous embodiment, and will not be described again here.
本申请实施例提供的拍摄方法,可以实现用户利用电子设备拍摄第一取景图像以及第二取景图像,然后在摄像头采集的预览图像与第一取景图像匹配时,开始图像拍摄,并控制摄像头沿预设方向进行移动,并在移动过程中进行图像拍摄,在摄像头拍摄的图像与第二图像匹配时,停止摄像头的移动以及图像拍摄,由此可以从拍摄得到的图像中确定出用于合成全景图像的多张待合成图像,如此,无需用户握持电子设备保持姿态不变的情况下移动电子设备进行拍摄,即可得到图像质量较佳的全景图像,方便了用户获取所需的全景图像。The shooting method provided by the embodiment of the present application allows the user to use an electronic device to shoot a first view image and a second view image, and then start image shooting when the preview image collected by the camera matches the first view image, and control the camera to move along the preview image. Set the direction to move, and capture images during the movement. When the image captured by the camera matches the second image, stop the movement of the camera and capture the image, so that the panoramic image used to synthesize the panoramic image can be determined from the captured image. Multiple images to be synthesized. In this way, a panoramic image with better image quality can be obtained without the user having to hold the electronic device and keep the posture unchanged while moving the electronic device for shooting, which facilitates the user to obtain the desired panoramic image.
请参阅图7,其示出了本申请实施例提供的一种拍摄装置400的结构框图。该拍摄装置400应用上述的电子设备,所述电子设备包括可延预设方向移动的摄像头,该拍摄装置400包括:图像获取模块410、图像拍摄模块420、图像重建模块430以及图像生成模块440。其中,所述图像获取模块410用于获取所述摄像头采集的第一取景图像以及第二取景图像;所述图像拍摄模块420用于基于所述第一取景图像以及第二取景图像,控制所述摄像头沿所述预设方向移动,并在移动过程中进行图像拍摄,得到多张待合成图像;所述图像重建模块430用于对所述多张待合成图像中每张待合成图像,进行图像重建,得到所述图像重建后的多张待合成图像;所述图像生成模块440用于基于所述图像重建后的多张待合成图像,生成全景图像。Please refer to FIG. 7 , which shows a structural block diagram of a photographing device 400 provided by an embodiment of the present application. The shooting device 400 applies the above-mentioned electronic equipment, and the electronic device includes a camera that can move in a preset direction. The shooting device 400 includes: an image acquisition module 410, an image shooting module 420, an image reconstruction module 430, and an image generation module 440. The image acquisition module 410 is used to acquire the first view image and the second view image collected by the camera; the image capture module 420 is used to control the first view image and the second view image based on the first view image and the second view image. The camera moves along the preset direction and captures images during the movement to obtain multiple images to be synthesized; the image reconstruction module 430 is used to perform image reconstruction on each image to be synthesized in the multiple images to be synthesized. Reconstruction is performed to obtain multiple images to be synthesized after the image reconstruction; the image generation module 440 is configured to generate a panoramic image based on the multiple images to be synthesized after the image reconstruction.
在一些实施方式中,图像重建模块430可以用于:对所述多张待合成图像中每张待合成图像,进行基于叠层成像的图像重建,得到所述图像重建后的多张待合成图像。In some embodiments, the image reconstruction module 430 may be used to: perform image reconstruction based on stacked imaging for each of the multiple images to be synthesized, to obtain multiple images to be synthesized after the image reconstruction. .
作为一种可能的实施方式,图像重建模块430可以具体用于:基于所述摄像头的光圈函数,获取所述待合成图像对应的频谱区域;对所述每张待合成图像进行傅立叶变换,得到所述每张待合成图像对应的频域信息;基于所述每张待合成图像对应的频域信息,对所述每张待合成图像对应的频谱区域的幅值的进行替换,得到替换后的所述每张待合成图像对应的频谱区域;将替换后的所述每张待合成图像对应的频谱区域变换为时域;重复所述基于所述光圈函数,获取所述待合成图像对应的频谱区域的步骤,至所述将替换后的所述每张待合成图像对应的频谱区域变换为时域的步骤,直至满足预设迭代条件,得到所述图像重建后的多张待合成图像。As a possible implementation, the image reconstruction module 430 may be specifically configured to: obtain the spectrum region corresponding to the image to be synthesized based on the aperture function of the camera; perform Fourier transform on each of the images to be synthesized to obtain the The frequency domain information corresponding to each image to be synthesized is based on the frequency domain information corresponding to each image to be synthesized, and the amplitude of the spectrum region corresponding to each image to be synthesized is replaced to obtain all replaced values. Describe the spectrum area corresponding to each image to be synthesized; convert the replaced spectrum area corresponding to each image to be synthesized into the time domain; repeat the above-mentioned method based on the aperture function to obtain the spectrum area corresponding to the image to be synthesized to the step of converting the replaced spectral region corresponding to each of the images to be synthesized into a time domain, until the preset iteration conditions are met, and multiple images to be synthesized after the image reconstruction are obtained.
可选地,图像重建模块430还可以用于:获取所述摄像头对应的点扩散函数;基于所述点扩散函数,确定光圈函数。Optionally, the image reconstruction module 430 may also be used to: obtain a point spread function corresponding to the camera; and determine an aperture function based on the point spread function.
在一些实施方式中,图像拍摄模块420可以用于:控制所述摄像头沿所述预设方向移动,并在移动过程中进行图像拍摄;在所述摄像头拍摄的图像中包括第一图像内容以及第二图像内容时,停止所述摄像头的移动以及图像拍摄,所述第一图像内容与所述第一取景图像匹配,所述第二图像内容与所述第二取景图像匹配;基于所述第一取景图像以及第二取景图像,从所述摄像头拍摄的图像中筛选出多张待合成图像。In some embodiments, the image capturing module 420 may be configured to: control the camera to move along the preset direction and capture images during the movement; and include the first image content and the third image content in the image captured by the camera. When there are two image contents, stop the movement of the camera and image shooting, the first image content matches the first view image, and the second image content matches the second view image; based on the first The framing image and the second framing image are to select a plurality of images to be synthesized from the images captured by the camera.
作为一种可能的实施方式,图像拍摄模块420可以具体用于:对所述摄像头拍摄的图像按照拍摄时间的先后顺序进行排序,得到图像序列;从所述图像序列中,获取至少一张第一目标图像、至少一张第二目标图像以及所述第一目标图像与第二目标图像之间的图像,得到多张待合成图像,其中,所述第一目标图像中包括所述第一图像内容,所述第二目标图像中包括所述第二图像内容。As a possible implementation, the image capture module 420 may be specifically configured to: sort the images captured by the camera according to the order of capture time to obtain an image sequence; and obtain at least one first image from the image sequence. A target image, at least one second target image, and an image between the first target image and the second target image, to obtain multiple images to be synthesized, wherein the first target image includes the first image content , the second target image includes the second image content.
在一些实施方式中,所述第一取景图像与所述摄像头的当前位置对应,所述第二取景图像与所述摄像头由所述当前位置沿所述预设方向移动过程中的目标位置对应。图像拍摄模块420可以用于:在所述摄像头采集的预览图像与所述第一取景图像匹配时,开始图像拍摄;控制所述摄像头由所述当前位置,沿所述预设方向移动,并在移动过程中进行图像拍摄;在所述摄像头的拍摄的图像与所述第二取景图像匹配时,停止所述摄像头的移动以及图像拍摄;基于所述摄像头在移动过程中拍摄的图像,确定多张待合成图像。In some embodiments, the first view image corresponds to the current position of the camera, and the second view image corresponds to the target position of the camera when it moves from the current position along the preset direction. The image capturing module 420 may be used to: start image capturing when the preview image collected by the camera matches the first view image; control the camera to move from the current position along the preset direction, and in Image shooting is performed during the movement; when the image captured by the camera matches the second viewfinder image, the movement of the camera and image capture are stopped; and multiple images are determined based on the images captured by the camera during the movement. The image to be synthesized.
作为一种可能的实施方式,图像拍摄模块420还可以用于:在所述摄像头的拍摄的图像与所述第二取景图像匹配时,停止所述摄像头的移动以及图像拍摄之前,若所述摄像头沿所述预设方向移动最大距离时,未拍摄得到与所述第二取景图像匹配的图像,则输出第一提示信息,并暂停图像拍摄,所述第一提示信息用于提示用户沿所述预设方向移动所述电子设备;控制所述摄像头移动至初始位置;在所述摄像头采集的预览图像与所述摄像头移动至最大距离时采集的图像匹配时,控制所述摄像头沿所述预设方向移动,并重新进行图像拍摄。As a possible implementation, the image capturing module 420 may also be configured to: when the image captured by the camera matches the second view image, stop the movement of the camera and before capturing the image, if the camera When moving the maximum distance along the preset direction, if no image matching the second viewfinder image is captured, the first prompt information is output and the image capture is paused. The first prompt information is used to prompt the user to move along the preset direction. Move the electronic device in a preset direction; control the camera to move to an initial position; when the preview image collected by the camera matches the image collected when the camera moves to the maximum distance, control the camera to move along the preset direction, and capture the image again.
在一些实施方式中,该拍摄装置400还可以包括:提示模块。提示模块用于在所述获取所述摄像头采集的第一取景图像以及第二取景图像之前,输出第二提示信息,所述第二提示信息用于提示用户通过所述电子设备采集第一取景图像,以及将所述电子设备沿所述预设方向移动后通过所述电子设备采集第二取景图像。In some implementations, the shooting device 400 may further include: a prompt module. The prompt module is configured to output second prompt information before obtaining the first view image and the second view image collected by the camera. The second prompt information is used to prompt the user to collect the first view image through the electronic device. , and collecting the second view image through the electronic device after moving the electronic device along the preset direction.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述装置和模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the above-described devices and modules can be referred to the corresponding processes in the foregoing method embodiments, and will not be described again here.
在本申请所提供的几个实施例中,模块相互之间的耦合可以是电性,机械或其它形式的耦合。In several embodiments provided in this application, the coupling between modules may be electrical, mechanical or other forms of coupling.
另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。In addition, each functional module in each embodiment of the present application can be integrated into one processing module, or each module can exist physically alone, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software function modules.
综上所述,本申请提供的方案,电子设备设置有可延预设方向移动的摄像头,电子设备进行拍摄时,通过获取该摄像头采集的第一取景图像以及第二取景图像,基于第一取景图像以及第二取景图像,控制摄像头沿预设方向移动,并在移动过程中进行图像拍摄,得到多张待合成图像,然后对多张待合成图像中每张待合成图像,进行图像重建,得到图像重建后的多张待合成图像,再基于图像重建后的多张待合成图像,生成全景图像。由此,可以实现用户利用电子设备拍摄第一取景图像以及第二取景图像,即可控制摄像头进行移动并进行全景图像拍摄,并且对拍摄的多张图像进行图像重建后再生成全景图像,可以提升获得的全景图像的图像质量。To sum up, in the solution provided by this application, the electronic device is equipped with a camera that can move in a preset direction. When the electronic device takes pictures, it obtains the first view image and the second view image collected by the camera, based on the first view image. image and the second view image, control the camera to move along the preset direction, and capture images during the movement to obtain multiple images to be synthesized, and then perform image reconstruction on each of the multiple images to be synthesized to obtain The multiple images to be synthesized after image reconstruction are used to generate a panoramic image based on the multiple images to be synthesized after image reconstruction. As a result, the user can use the electronic device to capture the first view image and the second view image, control the camera to move and capture panoramic images, and perform image reconstruction on the multiple captured images to generate a panoramic image, which can improve Image quality of the obtained panoramic image.
请参考图8,其示出了本申请实施例提供的一种电子设备的结构框图。该电子设备100可以是智能手机、平板电脑、电子书等能够运行应用程序的电子设备。本申请中的电子设备100可以包括一个或多个如下部件:处理器110、存储器120、以及一个或多个应用程序,其中一个或多个应用程序可以被存储在存储器120中并被配置为由一个或多个处理器110执行,一个或多个应用程序配置用于执行如前述方法实施例所描述的方法。Please refer to FIG. 8 , which shows a structural block diagram of an electronic device provided by an embodiment of the present application. The electronic device 100 may be a smart phone, a tablet computer, an e-book, or other electronic device capable of running applications. The electronic device 100 in the present application may include one or more of the following components: a processor 110, a memory 120, and one or more application programs, wherein one or more application programs may be stored in the memory 120 and configured by One or more processors 110 execute, and one or more application programs are configured to execute the method as described in the foregoing method embodiments.
处理器110可以包括一个或者多个处理核。处理器110利用各种接口和线路连接整个电子设备100内的各个部分,通过运行或执行存储在存储器120内的指令、程序、代码集或指令集,以及调用存储在存储器120内的数据,执行电子设备100的各种功能和处理数据。可选地,处理器110可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable LogicArray,PLA)中的至少一种硬件形式来实现。处理器110可集成中央处理器(CentralProcessing Unit,CPU)、图形处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器110中,单独通过一块通信芯片进行实现。Processor 110 may include one or more processing cores. The processor 110 uses various interfaces and lines to connect various parts of the entire electronic device 100, and executes by running or executing instructions, programs, code sets or instruction sets stored in the memory 120, and calling data stored in the memory 120. Various functions and processing data of the electronic device 100 . Optionally, the processor 110 may adopt at least one of digital signal processing (Digital Signal Processing, DSP), field-programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). implemented in hardware form. The processor 110 may integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processor (Graphics Processing Unit, GPU), a modem, and the like. Among them, the CPU mainly handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the display content; and the modem is used to handle wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 110 and may be implemented solely through a communication chip.
存储器120可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory)。存储器120可用于存储指令、程序、代码、代码集或指令集。存储器120可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于实现至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等。存储数据区还可以存储电子设备100在使用中所创建的数据(比如电话本、音视频数据、聊天记录数据)等。The memory 120 may include random access memory (RAM) or read-only memory (Read-Only Memory). Memory 120 may be used to store instructions, programs, codes, sets of codes, or sets of instructions. The memory 120 may include a program storage area and a data storage area, where the program storage area may store instructions for implementing an operating system and instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.) , instructions for implementing each of the following method embodiments, etc. The storage data area can also store data created during use of the electronic device 100 (such as phone book, audio and video data, chat record data), etc.
请参考图9,其示出了本申请实施例提供的一种计算机可读存储介质的结构框图。该计算机可读介质800中存储有程序代码,所述程序代码可被处理器调用执行上述方法实施例中所描述的方法。Please refer to FIG. 9 , which shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application. Program code is stored in the computer-readable medium 800, and the program code can be called by the processor to execute the method described in the above method embodiment.
计算机可读存储介质800可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。可选地,计算机可读存储介质800包括非易失性计算机可读介质(non-transitory computer-readable storage medium)。计算机可读存储介质800具有执行上述方法中的任何方法步骤的程序代码810的存储空间。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。程序代码810可以例如以适当形式进行压缩。Computer-readable storage medium 800 may be electronic memory such as flash memory, EEPROM (electrically erasable programmable read-only memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 800 includes non-transitory computer-readable storage medium. The computer-readable storage medium 800 has storage space for program code 810 that performs any method steps in the above-described methods. These program codes can be read from or written into one or more computer program products. Program code 810 may, for example, be compressed in a suitable form.
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不驱使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present application, but not to limit it; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art will understand that: it can still Modifications are made to the technical solutions described in the foregoing embodiments, or equivalent substitutions are made to some of the technical features; however, these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions in the embodiments of the present application.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210054654.7A CN114390219B (en) | 2022-01-18 | 2022-01-18 | Photography methods, devices, electronic equipment and storage media |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210054654.7A CN114390219B (en) | 2022-01-18 | 2022-01-18 | Photography methods, devices, electronic equipment and storage media |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114390219A CN114390219A (en) | 2022-04-22 |
CN114390219B true CN114390219B (en) | 2023-11-14 |
Family
ID=81203072
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210054654.7A Expired - Fee Related CN114390219B (en) | 2022-01-18 | 2022-01-18 | Photography methods, devices, electronic equipment and storage media |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114390219B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP4227732A1 (en) * | 2022-02-14 | 2023-08-16 | Carl Zeiss Vision International GmbH | Method for head image recording and corresponding mobile device |
CN120321498A (en) * | 2024-01-12 | 2025-07-15 | 华为技术有限公司 | A shooting method, electronic device and readable storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105262948A (en) * | 2015-10-14 | 2016-01-20 | 广东欧珀移动通信有限公司 | Panorama capturing method and mobile terminal |
CN109995985A (en) * | 2017-12-29 | 2019-07-09 | 深圳市优必选科技有限公司 | Robot-based panoramic image shooting method, device and robot |
CN110740260A (en) * | 2019-10-24 | 2020-01-31 | 深圳传音控股股份有限公司 | shooting method, device and computer readable storage medium |
CN110876018A (en) * | 2019-10-30 | 2020-03-10 | 深圳传音控股股份有限公司 | Mobile terminal, control method of mobile terminal, and computer storage medium |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109600543B (en) * | 2017-09-30 | 2021-01-22 | 京东方科技集团股份有限公司 | Method for capturing panoramic images with mobile device and mobile device |
-
2022
- 2022-01-18 CN CN202210054654.7A patent/CN114390219B/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105262948A (en) * | 2015-10-14 | 2016-01-20 | 广东欧珀移动通信有限公司 | Panorama capturing method and mobile terminal |
CN109995985A (en) * | 2017-12-29 | 2019-07-09 | 深圳市优必选科技有限公司 | Robot-based panoramic image shooting method, device and robot |
CN110740260A (en) * | 2019-10-24 | 2020-01-31 | 深圳传音控股股份有限公司 | shooting method, device and computer readable storage medium |
CN110876018A (en) * | 2019-10-30 | 2020-03-10 | 深圳传音控股股份有限公司 | Mobile terminal, control method of mobile terminal, and computer storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN114390219A (en) | 2022-04-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2015161698A1 (en) | Image shooting terminal and image shooting method | |
KR101341265B1 (en) | Method and arrangement for processing data sets of imaging sensors, a corresponding computer program, and a corresponding computer-readable storage medium | |
EP2720226B1 (en) | Photographing apparatus for synthesizing an image from a sequence of captures of the same scene. | |
JP6308748B2 (en) | Image processing apparatus, imaging apparatus, and image processing method | |
WO2017045558A1 (en) | Depth-of-field adjustment method and apparatus, and terminal | |
JP2016197858A (en) | Real time image stitch device and real time image stitch method | |
WO2019056527A1 (en) | Capturing method and device | |
JP5665013B2 (en) | Image processing apparatus, image processing method, and program | |
CN106060249A (en) | Shooting anti-shaking method and mobile terminal | |
KR20150072358A (en) | Method and apparatus for acquiring a set of images illuminated by a flash | |
CN108377341A (en) | photographing method, device, terminal and storage medium | |
CN103685952A (en) | Terminal and Image Processing Methods | |
CN114390219B (en) | Photography methods, devices, electronic equipment and storage media | |
JP5578442B2 (en) | Imaging apparatus, image composition method, and program | |
CN112367459A (en) | Image processing method, electronic device, and non-volatile computer-readable storage medium | |
CN102739962A (en) | Image processing device capable of generating wide-range image | |
JP2012160863A (en) | Imaging apparatus, image reproducing apparatus, and image processing apparatus | |
CN104754227A (en) | Method and device for shooting video | |
US8654204B2 (en) | Digtal photographing apparatus and method of controlling the same | |
WO2018196854A1 (en) | Photographing method, photographing apparatus and mobile terminal | |
JP2018148512A (en) | IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, AND PROGRAM | |
CN106454131A (en) | Terminal photographing method, device and terminal | |
CN105516594A (en) | Image capturing method and device | |
JP2014168147A (en) | Image processing program and digital camera | |
JP6021594B2 (en) | Imaging apparatus and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20231114 |
|
CF01 | Termination of patent right due to non-payment of annual fee |