CN110012209B - Panoramic image generation method, device, storage medium and electronic device - Google Patents

Panoramic image generation method, device, storage medium and electronic device Download PDF

Info

Publication number
CN110012209B
CN110012209B CN201810011559.2A CN201810011559A CN110012209B CN 110012209 B CN110012209 B CN 110012209B CN 201810011559 A CN201810011559 A CN 201810011559A CN 110012209 B CN110012209 B CN 110012209B
Authority
CN
China
Prior art keywords
image
frame image
key frame
images
feature points
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
Application number
CN201810011559.2A
Other languages
Chinese (zh)
Other versions
CN110012209A (en
Inventor
陈岩
刘耀勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201810011559.2A priority Critical patent/CN110012209B/en
Priority to PCT/CN2018/122029 priority patent/WO2019134516A1/en
Publication of CN110012209A publication Critical patent/CN110012209A/en
Application granted granted Critical
Publication of CN110012209B publication Critical patent/CN110012209B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4038Image mosaicing, e.g. composing plane images from plane sub-images
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/698Control of cameras or camera modules for achieving an enlarged field of view, e.g. panoramic image capture
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)
  • Image Processing (AREA)

Abstract

The application discloses a panoramic image generation method, a panoramic image generation device, a storage medium and electronic equipment, wherein the panoramic image generation method comprises the following steps: acquiring a panoramic shooting instruction; starting a camera according to the panoramic shooting instruction to shoot a video, and displaying the shot content in a preview frame; in the video shooting process, performing snake-shaped scanning on the preview frame along a second direction at a preset first direction overlapping rate to obtain a plurality of groups of scanning images, wherein the first direction is vertical to the second direction; generating corresponding local images in the second direction according to each group of scanning images; the panoramic image is generated according to the local image, so that the method is suitable for image splicing of various complex scenes, and is simple, high in flexibility and good in splicing effect.

Description

全景图像生成方法、装置、存储介质及电子设备Panoramic image generation method, device, storage medium and electronic device

技术领域technical field

本申请涉及计算机技术领域,尤其涉及一种全景图像生成方法、装置、存储介质及电子设备。The present application relates to the field of computer technology, and in particular, to a method, device, storage medium and electronic device for generating panoramic images.

背景技术Background technique

随着移动通信技术的不断发展,移动终端已经成为人们日常生活的必备工具之一,其不仅可以提供通话和短信功能,还具有多媒体播放以及拍照功能。With the continuous development of mobile communication technology, a mobile terminal has become one of the necessary tools in people's daily life, which can not only provide functions of calling and short messages, but also have multimedia playback and photographing functions.

目前的移动终端大多具有全景拍摄模式,在全景拍摄模式下,可以将一系列有部分重叠边界的小视角图像,根据不同图像的特征运用不同的处理算法进行匹配对准,从而拼接成一幅宽视角的全景图像,但是现有的全景拍摄技术只能针对一些比较简单的场景图像进行拼接,难以适应复杂场景,比如近距离拍摄建筑物、壁画等,局限性大,拼接效果差。Most of the current mobile terminals have a panoramic shooting mode. In the panoramic shooting mode, a series of small-view images with partially overlapping borders can be matched and aligned using different processing algorithms according to the characteristics of different images, so as to form a wide-angle image. However, the existing panoramic shooting technology can only stitch some relatively simple scene images, and it is difficult to adapt to complex scenes, such as close-up shooting of buildings, murals, etc., with large limitations and poor stitching effect.

发明内容SUMMARY OF THE INVENTION

本申请实施例提供一种全景图像生成方法、装置、存储介质及电子设备,能适应各种拍摄场景,拼接效果好。The embodiments of the present application provide a method, device, storage medium and electronic device for generating a panoramic image, which can adapt to various shooting scenarios and have a good stitching effect.

本申请实施例提供了一种全景图像生成方法,包括:The embodiment of the present application provides a panoramic image generation method, including:

获取全景拍摄指令;Get panoramic shooting instructions;

根据所述全景拍摄指令启动摄像头进行视频拍摄,并将拍摄内容显示在预览框中;Start the camera to shoot video according to the panoramic shooting instruction, and display the shooting content in the preview frame;

在视频拍摄过程中,沿第二方向以预设的第一方向重叠率对所述拍摄内容进行蛇形扫描,得到多组扫描图像,所述第一方向垂直于第二方向;During the video shooting process, serpentine scanning is performed on the shooting content with a preset first direction overlap rate along a second direction to obtain multiple sets of scanned images, and the first direction is perpendicular to the second direction;

根据每组扫描图像在所述第二方向上生成对应的局部图像;generating corresponding partial images in the second direction according to each group of scanned images;

根据所述局部图像生成全景图像。A panoramic image is generated from the partial images.

本申请实施例还提供了一种全景图像生成装置,应用于电子设备,包括:The embodiment of the present application also provides a panoramic image generating apparatus, which is applied to electronic equipment, including:

获取模块,用于获取全景拍摄指令;an acquisition module for acquiring panoramic shooting instructions;

拍摄模块,用于根据所述全景拍摄指令启动摄像头进行视频拍摄,并将拍摄内容显示在预览框中;a shooting module, configured to start the camera to shoot video according to the panoramic shooting instruction, and display the shooting content in the preview frame;

扫描模块,用于在视频拍摄过程中,沿第二方向以预设的第一方向重叠率对所述拍摄内容进行蛇形扫描,得到多组扫描图像,所述第一方向垂直于第二方向;The scanning module is used for serpentine scanning of the shooting content along the second direction with a preset first direction overlap ratio during the video shooting process to obtain multiple sets of scanned images, the first direction is perpendicular to the second direction ;

第一生成模块,用于根据每组扫描图像在所述第二方向上生成对应的局部图像;a first generating module, configured to generate corresponding partial images in the second direction according to each group of scanned images;

第二生成模块,用于根据所述局部图像生成全景图像。The second generating module is configured to generate a panoramic image according to the partial image.

进一步地,所述第一生成模块具体包括:Further, the first generation module specifically includes:

确定子模块,用于根据每组扫描图像确定对应的关键帧图像组;A determination submodule for determining a corresponding key frame image group according to each group of scanned images;

提取子模块,用于提取每一关键帧图像组中关键帧图像的特征点;Extraction sub-module for extracting feature points of key frame images in each key frame image group;

拼接子模块,用于根据所述特征点对所述关键帧图像组进行拼接,以在所述第二方向上生成对应的局部图像。A stitching sub-module, configured to stitch the key frame image group according to the feature points, so as to generate corresponding partial images in the second direction.

进一步地,所述拼接子模块用于:Further, the splicing submodule is used for:

根据所述关键帧图像组中相邻两帧关键帧图像的特征点计算对应的第一单应性矩阵;Calculate the corresponding first homography matrix according to the feature points of two adjacent frames of key frame images in the key frame image group;

根据所述第一单应性矩阵计算第一全局变换矩阵;Calculate a first global transformation matrix according to the first homography matrix;

利用所述第一全局变换矩阵对相应的关键帧图像组进行拼接。The corresponding key frame image groups are stitched by using the first global transformation matrix.

进一步地,所述拼接子模块具体用于:Further, the splicing submodule is specifically used for:

将所述关键帧图像组中相邻两帧关键帧图像的特征点进行匹配;Matching the feature points of two adjacent frames of key frame images in the key frame image group;

获取匹配成功的特征点的位置信息;Obtain the location information of the successfully matched feature points;

根据所述位置信息计算第一单应性矩阵。A first homography matrix is calculated according to the position information.

进一步地,所述确定子模块具体用于:Further, the determining submodule is specifically used for:

在每组扫描图像中,将第一帧扫描图像作为关键帧图像;In each group of scanned images, the first frame of scanned images is used as a key frame image;

获取与所述关键帧图像相邻的下一帧扫描图像,作为目标帧图像;Obtain the next frame of scanned image adjacent to the key frame image as the target frame image;

根据所述关键帧图像的特征点、以及所述目标帧图像的特征点判断所述目标帧图像是否满足预设条件;According to the feature points of the key frame image and the feature points of the target frame image, determine whether the target frame image satisfies the preset condition;

若是,则将所述目标帧图像作为关键帧图像,并返回执行获取与所述关键帧图像相邻的下一帧扫描图像的操作;If so, take the target frame image as the key frame image, and return to perform the operation of acquiring the next frame scan image adjacent to the key frame image;

若否,则将与所述目标帧图像相邻的下一帧扫描图像作为目标帧图像,并返回执行根据所述关键帧图像的特征点、以及所述目标帧图像的特征点判断所述目标帧图像是否满足预设条件的操作。If not, take the next scanned image adjacent to the target frame image as the target frame image, and return to execute the judgment of the target according to the feature points of the key frame image and the feature points of the target frame image The operation of whether the frame image meets the preset condition.

进一步地,所述确定子模块具体用于:Further, the determining submodule is specifically used for:

将所述关键帧图像的特征点与所述目标帧图像的特征点进行匹配;matching the feature points of the key frame image with the feature points of the target frame image;

统计所述关键帧图像中匹配成功的特征点的数量、以及所述关键帧图像中特征点的总数量;Count the number of successfully matched feature points in the key frame image and the total number of feature points in the key frame image;

根据所述匹配成功的特征点的数量、以及总数量判断所述目标帧图像是否满足预设条件。Whether the target frame image satisfies a preset condition is determined according to the number of successfully matched feature points and the total number.

进一步地,所述确定子模块具体用于:Further, the determining submodule is specifically used for:

根据所述所述匹配成功的特征点的数量以及总数量计算相似度;Calculate similarity according to the number of the successfully matched feature points and the total number;

当所述相似度小于第一预设阈值,且所述匹配成功的特征点的数量大于第二预设阈值时,判断所述目标帧图像满足预设条件。When the similarity is less than a first preset threshold, and the number of successfully matched feature points is greater than a second preset threshold, it is determined that the target frame image satisfies a preset condition.

进一步地,所述第二生成模块具体用于:Further, the second generation module is specifically used for:

根据相邻的两张局部图像计算对应的第二单应性矩阵;Calculate the corresponding second homography matrix according to the two adjacent local images;

根据所述第二单应性矩阵计算第二全局变换矩阵;calculating a second global transformation matrix according to the second homography matrix;

利用所述第二全局变换矩阵对所述局部图像在第一方向上进行拼接,得到全景图像。The partial images are stitched in the first direction by using the second global transformation matrix to obtain a panoramic image.

本申请实施例还提供了一种存储介质,所述存储介质中存储有多条指令,所述指令适于由处理器加载以执行上述任一项全景图像生成方法。An embodiment of the present application further provides a storage medium, where a plurality of instructions are stored in the storage medium, and the instructions are adapted to be loaded by a processor to execute any one of the above-mentioned panoramic image generation methods.

本申请实施例还提供了一种电子设备,包括处理器和存储器,所述处理器与所述存储器电性连接,所述存储器用于存储指令和数据,所述处理器用于上述任一项所述的全景图像生成方法中的步骤。An embodiment of the present application further provides an electronic device, including a processor and a memory, the processor is electrically connected to the memory, the memory is used for storing instructions and data, and the processor is used for any of the above The steps in the panoramic image generation method described above.

本申请提供的全景图像生成方法、装置、存储介质及电子设备,通过获取全景拍摄指令,接着,根据该全景拍摄指令启动摄像头进行视频拍摄,并将拍摄内容显示在预览框中,而在视频拍摄过程中,沿第二方向以预设的第一方向重叠率对该拍摄内容进行蛇形扫描,得到多组扫描图像,该第一方向垂直于第二方向,并根据每组扫描图像在该第二方向上生成对应的局部图像,之后根据该局部图像生成全景图像,从而能适用于各种复杂场景的图像拼接,方法简单,灵活性高,拼接效果好。The panoramic image generation method, device, storage medium and electronic device provided by the present application obtain a panoramic shooting instruction, then start the camera to shoot video according to the panoramic shooting instruction, and display the shooting content in the preview frame, while in the video shooting During the process, serpentine scanning is performed on the shooting content along the second direction with a preset first direction overlap rate to obtain multiple sets of scanned images, the first direction is perpendicular to the second direction, and according to each set of scanned images in the first Corresponding partial images are generated in two directions, and then a panoramic image is generated according to the partial images, so that it can be applied to image stitching of various complex scenes. The method is simple, the flexibility is high, and the stitching effect is good.

附图说明Description of drawings

下面结合附图,通过对本申请的具体实施方式详细描述,将使本申请的技术方案及其它有益效果显而易见。The technical solutions and other beneficial effects of the present application will be apparent through the detailed description of the specific embodiments of the present application in conjunction with the accompanying drawings.

图1为本申请实施例提供的全景图像生成方法的流程示意图。FIG. 1 is a schematic flowchart of a panoramic image generation method provided by an embodiment of the present application.

图2为本申请实施例提供的预览框中蛇形扫描的示意图。FIG. 2 is a schematic diagram of a serpentine scan in a preview frame provided by an embodiment of the present application.

图3为本申请实施例提供的全景图像生成方法的另一流程示意图。FIG. 3 is another schematic flowchart of the panorama image generating method provided by the embodiment of the present application.

图4为本申请实施例提供的步骤203的流程示意图。FIG. 4 is a schematic flowchart of step 203 provided in this embodiment of the present application.

图5为本申请实施例提供的全景图像生成装置的结构示意图。FIG. 5 is a schematic structural diagram of a panoramic image generating apparatus provided by an embodiment of the present application.

图6为本申请实施例提供的第一生成模块的结构示意图。FIG. 6 is a schematic structural diagram of a first generation module provided by an embodiment of the present application.

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

具体实施方式Detailed ways

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

本申请实施例提供一种全景图像生成方法、装置、存储介质及电子设备。Embodiments of the present application provide a method, apparatus, storage medium, and electronic device for generating a panoramic image.

一种全景图像生成方法,应用于电子设备,包括:获取全景拍摄指令;根据该全景拍摄指令启动摄像头进行视频拍摄,并将拍摄内容显示在预览框中;在视频拍摄过程中,沿第二方向以预设的第一方向重叠率对该拍摄内容进行蛇形扫描,得到多组扫描图像,该第一方向垂直于第二方向;根据每组扫描图像在该第二方向上生成对应的局部图像;根据该局部图像生成全景图像。A panorama image generation method, applied to electronic equipment, includes: acquiring a panorama shooting instruction; starting a camera to shoot video according to the panorama shooting instruction, and displaying the shooting content in a preview frame; during the video shooting process, along a second direction Perform serpentine scanning on the shooting content with a preset overlap ratio in the first direction to obtain multiple sets of scanned images, the first direction being perpendicular to the second direction; and generating corresponding partial images in the second direction according to each set of scanned images ; Generate a panoramic image based on the partial image.

如图1所示,图1是本申请实施例提供的全景图像生成方法的流程示意图,其应用于电子设备,具体流程可以如下:As shown in FIG. 1, FIG. 1 is a schematic flowchart of a panoramic image generation method provided by an embodiment of the present application, which is applied to an electronic device, and the specific process may be as follows:

101、获取全景拍摄指令。101. Obtain a panoramic shooting instruction.

本实施例中,当用户点击拍照应用的某个按钮时,电子设备可以生成全景拍摄指令。In this embodiment, when the user clicks a certain button of the photographing application, the electronic device may generate a panoramic photographing instruction.

102、根据该全景拍摄指令启动摄像头进行视频拍摄,并将拍摄内容显示在预览框中。102. Start the camera to shoot video according to the panoramic shooting instruction, and display the shooting content in the preview frame.

本实施例中,该预览框的大小可以人为设定,也可以根据电子设备显示屏的尺寸而定,比如是显示屏尺寸的四分之三。In this embodiment, the size of the preview frame may be set manually, or may be determined according to the size of the display screen of the electronic device, for example, three quarters of the size of the display screen.

103、在视频拍摄过程中,沿第二方向以预设的第一方向重叠率对该拍摄内容进行蛇形扫描,得到多组扫描图像,该第一方向垂直于第二方向。103. During the video shooting process, perform a serpentine scan on the shooting content along a second direction with a preset overlap ratio in a first direction to obtain multiple sets of scanned images, the first direction being perpendicular to the second direction.

本实施例中,该第二方向和第一方向通常是提前设定好的,其可以是预览框长和宽所在的方向,也可以是人为定义的横向和纵向,当然还可以是其他设定方式。该第一方向重叠率是指在第一方向上的扫描轨迹重叠率,其可以人为设定,比如不小于50%。每次扫描完毕,都会生成一组对应的扫描图像,该蛇形扫描的扫描长度可以是定值,也可以是变量,该扫描轨迹重叠率取决于相邻两次蛇形扫描的起点位置,比如请参见图2,对于扫描长度固定的相邻两次蛇形扫描,若扫描起点分别为a1和a2,扫描长度为b,则该扫描轨迹重叠率为[b-(a2-a1)]/b。In this embodiment, the second direction and the first direction are usually set in advance, which may be the direction in which the length and width of the preview frame are located, or may be manually defined horizontal and vertical directions, and of course other settings may also be used. Way. The first direction overlap rate refers to the scan track overlap rate in the first direction, which can be set manually, for example, not less than 50%. After each scan, a set of corresponding scan images will be generated. The scan length of the serpentine scan can be a fixed value or a variable. The overlap rate of the scan track depends on the starting point position of two adjacent serpentine scans, such as Please refer to Figure 2. For two adjacent serpentine scans with a fixed scan length, if the scan starting points are a1 and a2 respectively, and the scan length is b, the scan track overlap rate is [b-(a2-a1)]/b .

104、根据每组扫描图像在该第二方向上生成对应的局部图像。104. Generate a corresponding partial image in the second direction according to each group of scanned images.

本实施例中,该局部图像是沿第二方向拼接形成的,由于每一组扫描图像并非针对整个预览框进行扫描,而是对预览框的某纵向区域或者横向区域进行扫描,故对应形成的拼接图像也并非全景图像,而是局部图像。In this embodiment, the partial image is formed by splicing along the second direction. Since each group of scanned images is not scanned for the entire preview frame, but scans a certain vertical area or horizontal area of the preview frame, correspondingly formed The stitched image is also not a panoramic image, but a partial image.

例如,上述步骤104具体可以包括:For example, the above step 104 may specifically include:

1-1、根据每组扫描图像确定对应的关键帧图像组。1-1. Determine the corresponding key frame image group according to each group of scanned images.

例如,上述步骤1-1具体可以包括:For example, the above step 1-1 may specifically include:

在每组扫描图像中,将第一帧扫描图像作为关键帧图像;In each group of scanned images, the first frame of scanned images is used as a key frame image;

获取与该关键帧图像相邻的下一帧扫描图像,作为目标帧图像;Obtain the next frame scanned image adjacent to the key frame image as the target frame image;

根据该关键帧图像的特征点、以及该目标帧图像的特征点判断该目标帧图像是否满足预设条件;According to the feature points of the key frame image and the feature points of the target frame image, determine whether the target frame image satisfies the preset condition;

若是,则将该目标帧图像作为关键帧图像,并返回执行获取与该关键帧图像相邻的下一帧扫描图像的操作;If so, take the target frame image as a key frame image, and return to perform the operation of acquiring the next frame scan image adjacent to the key frame image;

若否,则将与该目标帧图像相邻的下一帧扫描图像作为目标帧图像,并返回执行根据该关键帧图像的特征点、以及该目标帧图像的特征点判断该目标帧图像是否满足预设条件的操作。If not, take the next frame of scanned image adjacent to the target frame image as the target frame image, and return to execute whether the target frame image meets the requirements of the feature points of the key frame image and the feature points of the target frame image. Actions with preset conditions.

本实施例中,图像处理中,特征点指的是图像灰度值发生剧烈变化的点或者在图像边缘上曲率较大的点(即两个边缘的交点),每一特征点均可以包括纹理特征和颜色特征等信息。在对扫描图像进行拼接之前,需要先从扫描图像中过滤掉无需用于拼接的,比如对于相似度较高的图像只需取其一参与拼接,而对于相似度极低的图像则可以舍弃掉,等等,从而可以在保证图像信息完整的情况下,减少拼接图像的数量,提高拼接效率。In this embodiment, in the image processing, the feature points refer to the points where the gray value of the image changes drastically or the points with large curvature on the edge of the image (that is, the intersection of two edges), and each feature point may include texture information such as features and color features. Before stitching the scanned images, it is necessary to filter out the scanned images that do not need to be used for stitching. For example, only one of the images with high similarity needs to be stitched, while the images with extremely low similarity can be discarded. , etc., so that the number of stitched images can be reduced and the stitching efficiency can be improved under the condition of ensuring the integrity of the image information.

进一步地,上述步骤“根据该关键帧图像的特征点、以及该目标帧图像的特征点判断该目标帧图像是否满足预设条件”具体可以包括:Further, the above-mentioned step "judging whether the target frame image satisfies the preset conditions according to the feature points of the key frame image and the feature points of the target frame image" may specifically include:

将该关键帧图像的特征点与该目标帧图像的特征点进行匹配;matching the feature points of the key frame image with the feature points of the target frame image;

统计该关键帧图像中匹配成功的特征点的数量、以及该关键帧图像中特征点的总数量;Count the number of successfully matched feature points in the key frame image and the total number of feature points in the key frame image;

根据该匹配成功的特征点的数量、以及总数量判断该目标帧图像是否满足预设条件。Whether the target frame image satisfies the preset condition is determined according to the number of successfully matched feature points and the total number.

本实施例中,该预设条件可以人为设定,比如可以是关键帧图像和目标帧图像彼此间的相似度在一定范围内,通常,匹配成功的特征点数量越多,相似度越高。In this embodiment, the preset condition may be set manually, for example, the similarity between the key frame image and the target frame image may be within a certain range. Generally, the more feature points that are successfully matched, the higher the similarity.

进一步地,上述步骤“根据该匹配成功的特征点的数量、以及总数量判断该目标帧图像是否满足预设条件”具体可以包括:Further, the above-mentioned steps of "judging whether the target frame image meets the preset condition according to the number of successfully matched feature points and the total number" may specifically include:

根据该该匹配成功的特征点的数量以及总数量计算相似度;Calculate the similarity according to the number and the total number of successfully matched feature points;

当该相似度小于第一预设阈值,且该匹配成功的特征点的数量大于第二预设阈值时,判断该目标帧图像满足预设条件。When the similarity is less than the first preset threshold and the number of successfully matched feature points is greater than the second preset threshold, it is determined that the target frame image satisfies the preset condition.

本实施例中,可以计算匹配成功的特征点的数量与总数量之间的比值,将该比值作为相似度。该第一预设阈值和第二预设阈值可以人为设定,比如该第一预设阈值可以是70%,该第二预设阈值可以是20。In this embodiment, the ratio between the number of successfully matched feature points and the total number may be calculated, and the ratio is used as the similarity. The first preset threshold and the second preset threshold may be set manually, for example, the first preset threshold may be 70%, and the second preset threshold may be 20.

1-2、提取每一关键帧图像组中关键帧图像的特征点。1-2. Extract feature points of key frame images in each key frame image group.

1-3、根据该特征点对该关键帧图像组进行拼接,以在该第二方向上生成对应的局部图像。1-3. Splicing the key frame image group according to the feature point to generate a corresponding partial image in the second direction.

例如,上述步骤1-3具体可以包括:For example, the above steps 1-3 may specifically include:

1-3-1、根据该关键帧图像组中相邻两帧关键帧图像的特征点计算对应的第一单应性矩阵。1-3-1. Calculate a corresponding first homography matrix according to the feature points of two adjacent frames of key frame images in the key frame image group.

例如,上述步骤1-3-1具体可以包括:For example, the above step 1-3-1 may specifically include:

将该关键帧图像组中相邻两帧关键帧图像的特征点进行匹配;matching the feature points of two adjacent key frame images in the key frame image group;

获取匹配成功的特征点的位置信息;Obtain the location information of the successfully matched feature points;

根据该位置信息计算第一单应性矩阵。A first homography matrix is calculated according to the position information.

本实施例中,该单应性矩阵(Homography)(第一单应性矩阵)就是一个从一张图像到另一张图像映射关系的转换矩阵,具体的,可以先确定该相邻两帧关键帧图像中匹配成功的特征点是哪些,然后选取一定数量匹配成功的特征点来计算对应的单应性矩阵,使其中一帧关键帧图像中的特征点通过该单应性矩阵变换后,可以与另一帧关键帧图像中的特征点位于同一空间坐标系内。In this embodiment, the homography (the first homography matrix) is a conversion matrix of the mapping relationship from one image to another image. Specifically, the key of the two adjacent frames may be determined first. What are the successfully matched feature points in the frame image, and then select a certain number of successfully matched feature points to calculate the corresponding homography matrix, so that after the feature points in one frame of key frame image are transformed by the homography matrix, you can It is located in the same spatial coordinate system as the feature points in another keyframe image.

1-3-2、根据该第一单应性矩阵计算第一全局变换矩阵。1-3-2. Calculate a first global transformation matrix according to the first homography matrix.

本实施例中,可以按次序计算相邻帧关键帧图像的第一单应性矩阵,比如对于某个关键帧图像组M1~Mn,可以计算M1与M2之间、M2与M3之间、M3与M4之间、以及Mn-1与Mn之间的第一单应性矩阵,每一个单应性矩阵相当于该关键帧图像组的局部变换矩阵,最后,再将所有第一单应性矩阵统一到相同坐标系,得到第一全局变换矩阵。In this embodiment, the first homography matrix of key frame images of adjacent frames may be calculated in order. For example, for a certain key frame image group M1 to Mn, between M1 and M2, between M2 and M3, and between M3 and M3 may be calculated. The first homography matrix between M4 and Mn-1 and Mn, each homography matrix is equivalent to the local transformation matrix of the key frame image group, and finally, all the first homography matrix Unify to the same coordinate system to get the first global transformation matrix.

1-3-3、利用该第一全局变换矩阵对相应的关键帧图像组进行拼接。1-3-3. Use the first global transformation matrix to splicing the corresponding key frame image groups.

本实施例中,可以通过该全局变换矩阵将该关键帧图像组中的每一张关键帧图像都投射到同一坐标空间系中,得到的图像即为拼接得到的局部图像。In this embodiment, each key frame image in the key frame image group can be projected into the same coordinate space system through the global transformation matrix, and the obtained image is the local image obtained by splicing.

105、根据该局部图像生成全景图像。105. Generate a panoramic image according to the partial image.

例如,上述步骤105具体可以包括:For example, the above step 105 may specifically include:

根据相邻的两张局部图像计算对应的第二单应性矩阵;Calculate the corresponding second homography matrix according to the two adjacent local images;

根据该第二单应性矩阵计算第二全局变换矩阵;Calculate a second global transformation matrix according to the second homography matrix;

利用该第二全局变换矩阵对该局部图像在第一方向上进行拼接,得到全景图像。The local image is stitched in the first direction by using the second global transformation matrix to obtain a panoramic image.

本实施例中,由于该蛇形扫描在第一方向上是重叠性扫描,也即相邻两次扫描操作的扫描轨迹部分重叠,故当扫描图像完成第二方向上的拼接时,还需在第一方向上进行进一步拼接,也即将每列(行)扫描图像拼接的局部图像沿行(列)所在的方向再一次拼接,实现二维网格拼接,这种拼接方式能将扫描图像所携带的图像信息充分利用起来,方法简单,拼接效果好,而且能适用于各种复杂场景的视频图像拼接,灵活性强。In this embodiment, since the serpentine scanning is an overlapping scanning in the first direction, that is, the scanning trajectories of two adjacent scanning operations overlap, when the scanned images are stitched in the second direction, it is necessary to Further splicing is performed in the first direction, that is, the partial images spliced by each column (row) of scanned images are spliced again along the direction of the row (column) to realize two-dimensional grid splicing. The image information is fully utilized, the method is simple, the splicing effect is good, and it can be applied to video image splicing of various complex scenes, with strong flexibility.

由上述可知,本实施例提供的全景图像生成方法,应用于电子设备,通过获取全景拍摄指令,接着,根据该全景拍摄指令启动摄像头进行视频拍摄,并将拍摄内容显示在预览框中,而在视频拍摄过程中,沿第二方向以预设的第一方向重叠率对该拍摄内容进行蛇形扫描,得到多组扫描图像,该第一方向垂直于第二方向,并根据每组扫描图像在该第二方向上生成对应的局部图像,之后根据该局部图像生成全景图像,从而能适用于各种复杂场景的图像拼接,方法简单,灵活性高,拼接效果好。It can be seen from the above that the panorama image generation method provided in this embodiment is applied to an electronic device, by acquiring a panorama shooting instruction, then starting the camera to perform video shooting according to the panorama shooting instruction, and displaying the shooting content in the preview frame, and then in the preview frame. During the video shooting process, serpentine scanning is performed on the shooting content along the second direction with a preset first direction overlap rate to obtain multiple sets of scanned images, the first direction is perpendicular to the second direction, and according to each set of scanned images A corresponding partial image is generated in the second direction, and then a panoramic image is generated according to the partial image, so that it can be applied to image stitching of various complex scenes, the method is simple, the flexibility is high, and the stitching effect is good.

在本实施例中,将从全景图像生成装置的角度进行描述,具体将以该全景图像生成装置集成在电子设备中为例进行详细说明。In this embodiment, the description will be made from the perspective of the panoramic image generating apparatus, and specifically, the panoramic image generating apparatus will be integrated into an electronic device as an example for detailed description.

请参见图3,一种全景图像生成方法,应用于电子设备,具体流程可以如下:Please refer to FIG. 3, a panoramic image generation method, applied to electronic equipment, the specific process can be as follows:

201、电子设备获取全景拍摄指令,并根据该全景拍摄指令启动摄像头进行视频拍摄,之后将拍摄内容显示在预览框中。201. The electronic device acquires a panoramic shooting instruction, starts a camera to shoot video according to the panoramic shooting instruction, and then displays the shooting content in a preview frame.

譬如,当电子设备进入拍摄界面时,可以点击该拍摄应用的全景拍摄按键,此时,电子设备会启动摄像头进行视频拍摄,并将拍摄内容实时显示在预览框中。For example, when the electronic device enters the shooting interface, you can click the panorama shooting button of the shooting application. At this time, the electronic device will start the camera to shoot video, and display the shooting content in the preview box in real time.

202、在视频拍摄过程中,电子设备沿第二方向以预设的第一方向重叠率对该拍摄内容进行蛇形扫描,得到多组扫描图像,该第一方向垂直于第二方向。202. During the video shooting process, the electronic device performs a serpentine scan on the shooting content along a second direction with a preset first direction overlap ratio to obtain multiple sets of scanned images, the first direction being perpendicular to the second direction.

譬如,该第一方向可以为横向,该第二方向可以为纵向,也即电子设备会沿纵向对预览框中显示的内容进行蛇形扫描,请参见图2,对于扫描长度固定的相邻两次蛇形扫描,若扫描起点分别为a1和a2,扫描长度为b,则横向扫描重叠率为[b-(a2-a1)]/b,比如b/a可以不小于50%。For example, the first direction may be horizontal, and the second direction may be vertical, that is, the electronic device will perform serpentine scanning on the content displayed in the preview frame along the vertical direction, please refer to FIG. For the second serpentine scan, if the scan start points are a1 and a2 respectively, and the scan length is b, the horizontal scan overlap ratio is [b-(a2-a1)]/b, for example, b/a may not be less than 50%.

203、电子设备根据每组扫描图像确定对应的关键帧图像组。203. The electronic device determines a corresponding key frame image group according to each group of scanned images.

例如,请参阅图4,上述步骤203具体可以包括:For example, referring to FIG. 4 , the above-mentioned step 203 may specifically include:

2031、在每组扫描图像中,电子设备将第一帧扫描图像作为关键帧图像;2031. In each group of scanned images, the electronic device uses the first frame of scanned images as a key frame image;

2032、电子设备获取与该关键帧图像相邻的下一帧扫描图像,作为目标帧图像;2032. The electronic device acquires the next frame of scanned image adjacent to the key frame image as the target frame image;

2033、电子设备根据该关键帧图像的特征点、以及该目标帧图像的特征点判断该目标帧图像是否满足预设条件,若是,则将该目标帧图像作为关键帧图像,并返回执行上述步骤2032,若否,则将与该目标帧图像相邻的下一帧扫描图像作为目标帧图像,并返回执行上述步骤2033。2033. The electronic device determines whether the target frame image satisfies the preset conditions according to the feature points of the key frame image and the feature points of the target frame image, and if so, then uses the target frame image as the key frame image, and returns to perform the above steps 2032 , if not, take the next frame scanned image adjacent to the target frame image as the target frame image, and return to performing the above step 2033 .

本实施例中,在对扫描图像进行拼接之前,需要先从扫描图像中过滤掉无需用于拼接的,比如对于相似度较高的图像只需取其一参与拼接,而对于相似度极低的图像则可以舍弃掉,等等,从而可以在保证图像信息完整的情况下,减少拼接图像的数量,提高拼接效率,也即,上述步骤2033进一步可以包括:In this embodiment, before splicing the scanned images, it is necessary to filter out the scanned images that do not need to be used for splicing. For example, only one of the images with high similarity needs to be used for splicing, while for images with extremely low similarity The image can be discarded, etc., so that the number of spliced images can be reduced and the splicing efficiency can be improved under the condition of ensuring the integrity of the image information. That is, the above step 2033 may further include:

将该关键帧图像的特征点与该目标帧图像的特征点进行匹配;matching the feature points of the key frame image with the feature points of the target frame image;

统计该关键帧图像中匹配成功的特征点的数量、以及该关键帧图像中特征点的总数量;Count the number of successfully matched feature points in the key frame image and the total number of feature points in the key frame image;

根据该该匹配成功的特征点的数量以及总数量计算相似度;Calculate the similarity according to the number and the total number of successfully matched feature points;

当该相似度小于第一预设阈值,且该匹配成功的特征点的数量大于第二预设阈值时,判断该目标帧图像满足预设条件。When the similarity is less than the first preset threshold and the number of successfully matched feature points is greater than the second preset threshold, it is determined that the target frame image satisfies the preset condition.

本实施例中,由于匹配成功的特征点越多,代表两者的相似度越高,反之则代表相似度越低,故当匹配成功的特征点的数量大于第二预设阈值,比如20时,可以认为两者的相似度不低于最低限度,当匹配成功的特征点数量与总数量的比值小于第一预设阈值,比如70%时,可以认为两者的相似度不高于最大限度,只有同时满足这两个条件的目标帧图像才能认为满足预设条件,才能作为关键帧图像。In this embodiment, since the more feature points that are successfully matched, the higher the similarity between the two is, and vice versa, the lower the similarity is. Therefore, when the number of successfully matched feature points is greater than the second preset threshold, such as 20 , it can be considered that the similarity between the two is not lower than the minimum. When the ratio of the number of successfully matched feature points to the total number is less than the first preset threshold, such as 70%, it can be considered that the similarity between the two is not higher than the maximum , only the target frame image that satisfies these two conditions at the same time can be considered to meet the preset conditions and can be used as a key frame image.

204、电子设备提取每一关键帧图像组中关键帧图像的特征点,并将该关键帧图像组中相邻两帧关键帧图像的特征点进行匹配。204. The electronic device extracts the feature points of the key frame images in each key frame image group, and matches the feature points of two adjacent key frame images in the key frame image group.

205、电子设备获取匹配成功的特征点的位置信息,并根据该位置信息计算第一单应性矩阵。205. The electronic device acquires the position information of the successfully matched feature points, and calculates a first homography matrix according to the position information.

206、电子设备根据该第一单应性矩阵计算第一全局变换矩阵,并利用该第一全局变换矩阵对相应的关键帧图像组进行拼接,得到局部图像。206. The electronic device calculates a first global transformation matrix according to the first homography matrix, and uses the first global transformation matrix to stitch the corresponding key frame image groups to obtain a partial image.

譬如,由于每一关键帧图像组都是单次纵向扫描得到的,故当采用图像拼接的方式对关键帧图像组进行处理时,每一关键帧图像组拼接而成的局部图像都对应纵向扫描区域所包含的图像信息,具体拼接方法可以是先两两计算相邻关键帧图像的第一单应性矩阵,然后将所有第一单应性矩阵进行归一,得到全局变换矩阵,利用该全局变换矩阵将关键帧图像组中的每一关键帧图像都投射到相同的坐标空间中,完成每个关键帧图像组的纵向拼接。For example, since each key frame image group is obtained by a single vertical scan, when image splicing is used to process the key frame image group, the partial image spliced by each key frame image group corresponds to the vertical scan. The image information contained in the area, the specific splicing method can be to calculate the first homography matrix of adjacent key frame images in pairs, and then normalize all the first homography matrices to obtain a global transformation matrix, and use the global transformation matrix. The transformation matrix projects each key frame image in the key frame image group into the same coordinate space to complete the vertical splicing of each key frame image group.

207、电子设备根据相邻的两张局部图像计算对应的第二单应性矩阵,并根据该第二单应性矩阵计算第二全局变换矩阵,之后利用该第二全局变换矩阵对该局部图像在第一方向上进行拼接,得到全景图像。207. The electronic device calculates a corresponding second homography matrix according to the two adjacent partial images, calculates a second global transformation matrix according to the second homography matrix, and then uses the second global transformation matrix for the partial image. Stitching is performed in the first direction to obtain a panoramic image.

譬如,由于该蛇形扫描具有一定的横向重叠率,也即相邻两张局部图像中会存在相同的部分,故可以进一步对局部图像进行横向拼接,该拼接方式可以是先两两生成第二单应性矩阵,然后对第二单应性矩阵进行归一,得到第二全局变换矩阵,之后,利用该第二全局变换矩阵将所有局部图像都投射到一个坐标空间中,完成局部图像的横向拼接。For example, since the serpentine scan has a certain horizontal overlap rate, that is, there will be the same part in two adjacent partial images, the partial images can be further stitched horizontally, and the stitching method can be to generate the second two first. homography matrix, and then normalize the second homography matrix to obtain a second global transformation matrix, and then use the second global transformation matrix to project all local images into a coordinate space to complete the horizontal direction of the local images stitching.

由上述可知,本实施例提供的全景图像生成方法,应用于电子设备,其中电子设备可以获取全景拍摄指令,并根据该全景拍摄指令启动摄像头进行视频拍摄,之后将拍摄内容显示在预览框中,接着,在视频拍摄过程中,沿第二方向以预设的第一方向重叠率对该拍摄内容进行蛇形扫描,得到多组扫描图像,该第一方向垂直于第二方向,接着,根据每组扫描图像确定对应的关键帧图像组,接着,提取每一关键帧图像组中关键帧图像的特征点,并将该关键帧图像组中相邻两帧关键帧图像的特征点进行匹配,接着,获取匹配成功的特征点的位置信息,并根据该位置信息计算第一单应性矩阵,之后,根据该第一单应性矩阵计算第一全局变换矩阵,并利用该第一全局变换矩阵对相应的关键帧图像组进行拼接,得到局部图像,接着,根据相邻的两张局部图像计算对应的第二单应性矩阵,并根据该第二单应性矩阵计算第二全局变换矩阵,之后利用该第二全局变换矩阵对该局部图像在第一方向上进行拼接,得到全景图像,从而能采用二维网格的方式生成全景图,适用于各种复杂场景的图像拼接,方法简单,灵活性高,拼接效果好。It can be seen from the above that the method for generating a panoramic image provided in this embodiment is applied to an electronic device, wherein the electronic device can obtain a panoramic shooting instruction, start the camera to shoot video according to the panoramic shooting instruction, and then display the shooting content in the preview frame, Then, during the video shooting process, serpentine scanning is performed on the shooting content along the second direction with a preset first direction overlap ratio to obtain multiple sets of scanned images, the first direction is perpendicular to the second direction, and then, according to each The group scan images determine the corresponding key frame image group, then, extract the feature points of the key frame images in each key frame image group, and match the feature points of the two adjacent key frame images in the key frame image group, and then , obtain the position information of the successfully matched feature points, and calculate the first homography matrix according to the position information, then calculate the first global transformation matrix according to the first homography matrix, and use the first global transformation matrix to The corresponding key frame image groups are spliced to obtain a partial image, then, a corresponding second homography matrix is calculated according to the two adjacent partial images, and a second global transformation matrix is calculated according to the second homography matrix, and then The second global transformation matrix is used to stitch the local image in the first direction to obtain a panoramic image, so that the panorama can be generated in the form of a two-dimensional grid, which is suitable for image stitching of various complex scenes, and the method is simple and flexible High performance, good splicing effect.

根据上述实施例所描述的方法,本实施例将从全景图像生成装置的角度进一步进行描述,该全景图像生成装置具体可以作为独立的实体来实现,也可以集成在电子设备,比如终端中来实现,该终端可以包括手机、平板电脑以及个人计算机等。According to the methods described in the foregoing embodiments, this embodiment will further describe from the perspective of a panoramic image generating apparatus, which may be implemented as an independent entity or integrated in an electronic device, such as a terminal. , the terminal may include a mobile phone, a tablet computer, a personal computer, and the like.

请参阅图5,图5具体描述了本申请实施例提供的全景图像生成装置,应用于电子设备,该全景图像生成装置可以包括:获取模块10、拍摄模块20、扫描模块30、第一生成模块40和第二生成模块50,其中:Please refer to FIG. 5 . FIG. 5 specifically describes the panoramic image generating apparatus provided by the embodiment of the present application, which is applied to electronic equipment. The panoramic image generating apparatus may include: an acquisition module 10 , a photographing module 20 , a scanning module 30 , and a first generating module 40 and a second generation module 50, wherein:

(1)获取模块10(1) Acquisition module 10

获取模块10,用于获取全景拍摄指令。The obtaining module 10 is used for obtaining a panoramic shooting instruction.

本实施例中,当用户点击拍照应用的某个按钮时,电子设备可以生成全景拍摄指令。In this embodiment, when the user clicks a certain button of the photographing application, the electronic device may generate a panoramic photographing instruction.

(2)拍摄模块20(2) Shooting module 20

拍摄模块20,用于根据该全景拍摄指令启动摄像头进行视频拍摄,并将拍摄内容显示在预览框中。The shooting module 20 is configured to start the camera to shoot video according to the panoramic shooting instruction, and display the shooting content in the preview frame.

本实施例中,该预览框的大小可以人为设定,也可以根据电子设备显示屏的尺寸而定,比如是显示屏尺寸的四分之三。In this embodiment, the size of the preview frame may be set manually, or may be determined according to the size of the display screen of the electronic device, for example, three quarters of the size of the display screen.

(3)扫描模块30(3) Scanning module 30

扫描模块30,用于在视频拍摄过程中,沿第二方向以预设的第一方向重叠率对该拍摄内容进行蛇形扫描,得到多组扫描图像,该第一方向垂直于第二方向。The scanning module 30 is used for serpentine scanning of the shooting content along a second direction with a preset first direction overlap rate during the video shooting process to obtain multiple sets of scanned images, the first direction being perpendicular to the second direction.

本实施例中,该第二方向和第一方向通常是提前设定好的,其可以是预览框长和宽所在的方向,也可以是人为定义的横向和纵向,当然还可以是其他设定方式。该第一方向重叠率是指在第一方向上的扫描轨迹重叠率,其可以人为设定,比如不小于50%。每次扫描完毕,都会生成一组对应的扫描图像,该蛇形扫描的扫描长度可以是定值,也可以是变量,该扫描轨迹重叠率取决于相邻两次蛇形扫描的起点位置,比如请参见图2,对于扫描长度固定的相邻两次蛇形扫描,若扫描长度为a,在第一方向上的重叠长度为b,则该扫描轨迹重叠率为b/a。In this embodiment, the second direction and the first direction are usually set in advance, which may be the direction in which the length and width of the preview frame are located, or may be manually defined horizontal and vertical directions, and of course other settings may also be used. Way. The first direction overlap rate refers to the scan track overlap rate in the first direction, which can be set manually, for example, not less than 50%. After each scan, a set of corresponding scan images will be generated. The scan length of the serpentine scan can be a fixed value or a variable. The overlap rate of the scan track depends on the starting point position of two adjacent serpentine scans, such as Referring to FIG. 2 , for two adjacent serpentine scans with a fixed scan length, if the scan length is a and the overlap length in the first direction is b, the scan track overlap ratio is b/a.

(4)第一生成模块40(4) The first generation module 40

第一生成模块40,用于根据每组扫描图像在该第二方向上生成对应的局部图像。The first generating module 40 is configured to generate corresponding partial images in the second direction according to each group of scanned images.

本实施例中,该局部图像是沿第二方向拼接形成的,由于每一组扫描图像并非针对整个预览框进行扫描,而是对预览框的某纵向区域或者横向区域进行扫描,故对应形成的拼接图像也并非全景图像,而是局部图像。In this embodiment, the partial image is formed by splicing along the second direction. Since each group of scanned images is not scanned for the entire preview frame, but scans a certain vertical area or horizontal area of the preview frame, correspondingly formed The stitched image is also not a panoramic image, but a partial image.

例如,请参见图6,该第一生成模块40具体可以包括确定子模块41、提取子模块42和拼接子模块43,其中:For example, referring to FIG. 6, the first generation module 40 may specifically include a determination sub-module 41, an extraction sub-module 42 and a splicing sub-module 43, wherein:

确定子模块41,用于根据每组扫描图像确定对应的关键帧图像组。The determination sub-module 41 is configured to determine a corresponding key frame image group according to each group of scanned images.

例如,该确定子模块41具体可以用于:For example, the determination sub-module 41 can be specifically used for:

在每组扫描图像中,将第一帧扫描图像作为关键帧图像;In each group of scanned images, the first frame of scanned images is used as a key frame image;

获取与该关键帧图像相邻的下一帧扫描图像,作为目标帧图像;Obtain the next frame scanned image adjacent to the key frame image as the target frame image;

根据该关键帧图像的特征点、以及该目标帧图像的特征点判断该目标帧图像是否满足预设条件;According to the feature points of the key frame image and the feature points of the target frame image, determine whether the target frame image satisfies the preset condition;

若是,则将该目标帧图像作为关键帧图像,并返回执行获取与该关键帧图像相邻的下一帧扫描图像的操作;If so, take the target frame image as a key frame image, and return to perform the operation of acquiring the next frame scan image adjacent to the key frame image;

若否,则将与该目标帧图像相邻的下一帧扫描图像作为目标帧图像,并返回执行根据该关键帧图像的特征点、以及该目标帧图像的特征点判断该目标帧图像是否满足预设条件的操作。If not, take the next frame of scanned image adjacent to the target frame image as the target frame image, and return to execute whether the target frame image meets the requirements of the feature points of the key frame image and the feature points of the target frame image. Actions with preset conditions.

本实施例中,图像处理中,特征点指的是图像灰度值发生剧烈变化的点或者在图像边缘上曲率较大的点(即两个边缘的交点),每一特征点均可以包括纹理特征和颜色特征等信息。在对扫描图像进行拼接之前,需要先从扫描图像中过滤掉无需用于拼接的,比如对于相似度较高的图像只需取其一参与拼接,而对于相似度极低的图像则可以舍弃掉,等等,从而可以在保证图像信息完整的情况下,减少拼接图像的数量,提高拼接效率。In this embodiment, in the image processing, the feature points refer to the points where the gray value of the image changes drastically or the points with large curvature on the edge of the image (that is, the intersection of two edges), and each feature point may include texture information such as features and color features. Before stitching the scanned images, it is necessary to filter out the scanned images that do not need to be used for stitching. For example, only one of the images with high similarity needs to be stitched, while the images with extremely low similarity can be discarded. , etc., so that the number of stitched images can be reduced and the stitching efficiency can be improved under the condition of ensuring the integrity of the image information.

例如,该确定子模块41具体可以用于:For example, the determination sub-module 41 can be specifically used for:

将该关键帧图像的特征点与该目标帧图像的特征点进行匹配;matching the feature points of the key frame image with the feature points of the target frame image;

统计该关键帧图像中匹配成功的特征点的数量、以及该关键帧图像中特征点的总数量;Count the number of successfully matched feature points in the key frame image and the total number of feature points in the key frame image;

根据该匹配成功的特征点的数量、以及总数量判断该目标帧图像是否满足预设条件。Whether the target frame image satisfies the preset condition is determined according to the number of successfully matched feature points and the total number.

本实施例中,该预设条件可以人为设定,比如可以是关键帧图像和目标帧图像彼此间的相似度在一定范围内,通常,匹配成功的特征点数量越多,相似度越高。In this embodiment, the preset condition may be set manually, for example, the similarity between the key frame image and the target frame image may be within a certain range. Generally, the more feature points that are successfully matched, the higher the similarity.

进一步地,该确定子模块41具体用于:Further, the determination sub-module 41 is specifically used for:

根据该该匹配成功的特征点的数量以及总数量计算相似度;Calculate the similarity according to the number and the total number of successfully matched feature points;

当该相似度小于第一预设阈值,且该匹配成功的特征点的数量大于第二预设阈值时,判断该目标帧图像满足预设条件。When the similarity is less than the first preset threshold and the number of successfully matched feature points is greater than the second preset threshold, it is determined that the target frame image satisfies the preset condition.

本实施例中,可以计算匹配成功的特征点的数量与总数量之间的比值,将该比值作为相似度。该第一预设阈值和第二预设阈值可以人为设定,比如该第一预设阈值可以是70%,该第二预设阈值可以是20。In this embodiment, the ratio between the number of successfully matched feature points and the total number may be calculated, and the ratio is used as the similarity. The first preset threshold and the second preset threshold may be set manually, for example, the first preset threshold may be 70%, and the second preset threshold may be 20.

提取子模块42,用于提取每一关键帧图像组中关键帧图像的特征点。The extraction sub-module 42 is used for extracting the feature points of the key frame images in each key frame image group.

拼接子模块43,用于根据该特征点对该关键帧图像组进行拼接,以在该第二方向上生成对应的局部图像。The splicing sub-module 43 is used for splicing the key frame image group according to the feature point, so as to generate a corresponding partial image in the second direction.

例如,该拼接子模块43具体可以用于:For example, the splicing submodule 43 can be specifically used for:

1-3-1、根据该关键帧图像组中相邻两帧关键帧图像的特征点计算对应的第一单应性矩阵。1-3-1. Calculate a corresponding first homography matrix according to the feature points of two adjacent frames of key frame images in the key frame image group.

此时,该拼接子模块43具体可以用于:At this time, the splicing submodule 43 can be specifically used for:

将该关键帧图像组中相邻两帧关键帧图像的特征点进行匹配;matching the feature points of two adjacent key frame images in the key frame image group;

获取匹配成功的特征点的位置信息;Obtain the location information of the successfully matched feature points;

根据该位置信息计算第一单应性矩阵。A first homography matrix is calculated according to the position information.

本实施例中,该单应性矩阵(Homography)(第一单应性矩阵)就是一个从一张图像到另一张图像映射关系的转换矩阵,具体的,可以先确定该相邻两帧关键帧图像中匹配成功的特征点是哪些,然后选取一定数量匹配成功的特征点来计算对应的单应性矩阵,使其中一帧关键帧图像中的特征点通过该单应性矩阵变换后,可以与另一帧关键帧图像中的特征点位于同一空间坐标系内。In this embodiment, the homography (the first homography matrix) is a conversion matrix of the mapping relationship from one image to another image. Specifically, the key of the two adjacent frames may be determined first. What are the successfully matched feature points in the frame image, and then select a certain number of successfully matched feature points to calculate the corresponding homography matrix, so that after the feature points in one frame of key frame image are transformed by the homography matrix, you can It is located in the same spatial coordinate system as the feature points in another keyframe image.

1-3-2、根据该第一单应性矩阵计算第一全局变换矩阵。1-3-2. Calculate a first global transformation matrix according to the first homography matrix.

本实施例中,可以按次序计算相邻帧关键帧图像的第一单应性矩阵,比如对于某个关键帧图像组M1~Mn,可以计算M1与M2之间、M2与M3之间、M3与M4之间、以及Mn-1与Mn之间的第一单应性矩阵,每一个单应性矩阵相当于该关键帧图像组的局部变换矩阵,最后,再将所有第一单应性矩阵统一到相同坐标系,得到第一全局变换矩阵。In this embodiment, the first homography matrix of key frame images of adjacent frames may be calculated in order. For example, for a certain key frame image group M1 to Mn, between M1 and M2, between M2 and M3, and between M3 and M3 may be calculated. The first homography matrix between M4 and Mn-1 and Mn, each homography matrix is equivalent to the local transformation matrix of the key frame image group, and finally, all the first homography matrix Unify to the same coordinate system to get the first global transformation matrix.

1-3-3、利用该第一全局变换矩阵对相应的关键帧图像组进行拼接。1-3-3. Use the first global transformation matrix to splicing the corresponding key frame image groups.

本实施例中,可以通过该全局变换矩阵将该关键帧图像组中的每一张关键帧图像都投射到同一坐标空间系中,得到的图像即为拼接得到的局部图像。In this embodiment, each key frame image in the key frame image group can be projected into the same coordinate space system through the global transformation matrix, and the obtained image is the local image obtained by splicing.

(5)第二生成模块50(5) The second generation module 50

第二生成模块50,用于根据该局部图像生成全景图像。The second generating module 50 is configured to generate a panoramic image according to the partial image.

例如,该第二生成模块50具体可以用于:For example, the second generation module 50 can be specifically used for:

根据相邻的两张局部图像计算对应的第二单应性矩阵;Calculate the corresponding second homography matrix according to the two adjacent local images;

根据该第二单应性矩阵计算第二全局变换矩阵;Calculate a second global transformation matrix according to the second homography matrix;

利用该第二全局变换矩阵对该局部图像在第一方向上进行拼接,得到全景图像。The local image is stitched in the first direction by using the second global transformation matrix to obtain a panoramic image.

本实施例中,由于该蛇形扫描在第一方向上是重叠性扫描,也即相邻两次扫描操作的扫描轨迹部分重叠,故当扫描图像完成第二方向上的拼接时,还需在第一方向上进行进一步拼接,也即将每列(行)扫描图像拼接的局部图像沿行(列)所在的方向再一次拼接,实现二维网格拼接,这种拼接方式能将扫描图像所携带的图像信息充分利用起来,方法简单,拼接效果好,而且能适用于各种复杂场景的视频图像拼接,灵活性强。In this embodiment, since the serpentine scanning is an overlapping scanning in the first direction, that is, the scanning trajectories of two adjacent scanning operations overlap, when the scanned images are stitched in the second direction, it is necessary to Further splicing is performed in the first direction, that is, the partial images spliced by each column (row) of scanned images are spliced again along the direction of the row (column) to realize two-dimensional grid splicing. The image information is fully utilized, the method is simple, the splicing effect is good, and it can be applied to video image splicing of various complex scenes, with strong flexibility.

具体实施时,以上各个单元可以作为独立的实体来实现,也可以进行任意组合,作为同一或若干个实体来实现,以上各个单元的具体实施可参见前面的方法实施例,在此不再赘述。During specific implementation, the above units can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units can refer to the previous method embodiments, which will not be repeated here.

由上述可知,本实施例提供的全景图像生成方法,应用于电子设备,通过获取模块10获取全景拍摄指令,接着,拍摄模块20根据该全景拍摄指令启动摄像头进行视频拍摄,并将拍摄内容显示在预览框中,而在视频拍摄过程中,扫描模块30沿第二方向以预设的第一方向重叠率对该拍摄内容进行蛇形扫描,得到多组扫描图像,该第一方向垂直于第二方向,第一生成模块40根据每组扫描图像在该第二方向上生成对应的局部图像,之后第二生成模块50根据该局部图像生成全景图像,从而能适用于各种复杂场景的图像拼接,方法简单,灵活性高,拼接效果好。It can be seen from the above that the panorama image generating method provided in this embodiment is applied to electronic equipment, and the panorama shooting instruction is acquired through the acquisition module 10, and then the shooting module 20 starts the camera to perform video shooting according to the panorama shooting instruction, and displays the shooting content on the In the preview frame, during the video shooting process, the scanning module 30 performs serpentine scanning on the shooting content along the second direction with a preset first direction overlap rate to obtain multiple sets of scanned images, the first direction is perpendicular to the second direction direction, the first generation module 40 generates a corresponding partial image in the second direction according to each group of scanned images, and then the second generation module 50 generates a panoramic image according to the partial image, so as to be suitable for image stitching of various complex scenes, The method is simple, the flexibility is high, and the splicing effect is good.

另外,本申请实施例还提供了一种电子设备,该电子设备可以是智能手机、平板电脑等设备。图7所示,电子设备900包括处理器901、存储器902、显示屏903以及控制电路904。其中,处理器901分别与存储器902、显示屏903、控制电路904电性连接。In addition, an embodiment of the present application further provides an electronic device, where the electronic device may be a device such as a smart phone, a tablet computer, or the like. As shown in FIG. 7 , the electronic device 900 includes a processor 901 , a memory 902 , a display screen 903 and a control circuit 904 . The processor 901 is electrically connected to the memory 902 , the display screen 903 and the control circuit 904 respectively.

处理器901是电子设备900的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或加载存储在存储器902内的应用程序,以及调用存储在存储器902内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。The processor 901 is the control center of the electronic device 900, uses various interfaces and lines to connect various parts of the entire electronic device, executes the electronic Various functions of the device and processing data, so as to carry out the overall monitoring of the electronic device.

在本实施例中,电子设备900中的处理器901会按照如下的步骤,将一个或一个以上的应用程序的进程对应的指令加载到存储器902中,并由处理器901来运行存储在存储器902中的应用程序,从而实现各种功能:In this embodiment, the processor 901 in the electronic device 900 loads the instructions corresponding to the processes of one or more application programs into the memory 902 according to the following steps, and the processor 901 executes the instructions stored in the memory 902 . applications in , so as to achieve various functions:

获取全景拍摄指令;Get panoramic shooting instructions;

根据该全景拍摄指令启动摄像头进行视频拍摄,并将拍摄内容显示在预览框中;Start the camera to shoot video according to the panoramic shooting instruction, and display the shooting content in the preview box;

在视频拍摄过程中,沿第二方向以预设的第一方向重叠率对该拍摄内容进行蛇形扫描,得到多组扫描图像,该第一方向垂直于第二方向;During the video shooting process, serpentine scanning is performed on the shooting content along a second direction with a preset first direction overlap rate to obtain multiple sets of scanned images, the first direction being perpendicular to the second direction;

根据每组扫描图像在该第二方向上生成对应的局部图像;generating corresponding partial images in the second direction according to each group of scanned images;

根据该局部图像生成全景图像。A panoramic image is generated from the partial image.

存储器902可用于存储应用程序和数据。存储器902存储的应用程序中包含有可在处理器中执行的指令。应用程序可以组成各种功能模块。处理器901通过运行存储在存储器902的应用程序,从而执行各种功能应用以及数据处理。Memory 902 may be used to store applications and data. The application program stored in the memory 902 contains instructions executable in the processor. Applications can be composed of various functional modules. The processor 901 executes various functional applications and data processing by executing application programs stored in the memory 902 .

显示屏903可用于显示由用户输入的信息或提供给用户的信息以及终端的各种图形用户接口,这些图形用户接口可以由图像、文本、图标、视频和其任意组合来构成。The display screen 903 may be used to display information input by the user or information provided to the user and various graphical user interfaces of the terminal, which may be composed of images, texts, icons, videos, and any combination thereof.

控制电路904与显示屏903电性连接,用于控制显示屏903显示信息。The control circuit 904 is electrically connected to the display screen 903 for controlling the display screen 903 to display information.

在一些实施例中,如图7所示,电子设备900还包括:射频电路905、输入单元906、音频电路907、传感器908以及电源909。其中,处理器901分别与射频电路905、输入单元906、音频电路907、传感器908以及电源909电性连接。In some embodiments, as shown in FIG. 7 , the electronic device 900 further includes: a radio frequency circuit 905 , an input unit 906 , an audio circuit 907 , a sensor 908 and a power supply 909 . The processor 901 is electrically connected to the radio frequency circuit 905 , the input unit 906 , the audio circuit 907 , the sensor 908 and the power supply 909 respectively.

射频电路905用于收发射频信号,以通过无线通信与网络设备或其他电子设备建立无线通讯,与网络设备或其他电子设备之间收发信号。The radio frequency circuit 905 is used for transmitting and receiving radio frequency signals, so as to establish wireless communication with the network equipment or other electronic equipment through wireless communication, and send and receive signals with the network equipment or other electronic equipment.

输入单元906可用于接收输入的数字、字符信息或用户特征信息(例如指纹),以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。其中,输入单元906可以包括指纹识别模组。The input unit 906 may be used to receive input numbers, character information, or user characteristic information (eg, fingerprints), and to generate keyboard, mouse, joystick, optical, or trackball signal input related to user settings and function control. Wherein, the input unit 906 may include a fingerprint identification module.

音频电路907可通过扬声器、传声器提供用户与终端之间的音频接口。The audio circuit 907 can provide an audio interface between the user and the terminal through speakers and microphones.

电子设备900还可以包括至少一种传感器908,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板的亮度,接近传感器可在终端移动到耳边时,关闭显示面板和/或背光。作为运动传感器的一种,重力加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于终端还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。The electronic device 900 may also include at least one sensor 908, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel according to the brightness of the ambient light, and the proximity sensor may turn off the display panel and/or the backlight when the terminal is moved to the ear . As a kind of motion sensor, the gravitational acceleration sensor can detect the magnitude of acceleration in all directions (usually three axes), and can detect the magnitude and direction of gravity when stationary, and can be used for applications that recognize the attitude of mobile phones (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. Repeat.

电源909用于给电子设备900的各个部件供电。在一些实施例中,电源909可以通过电源管理系统与处理器901逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。Power supply 909 is used to power various components of electronic device 900 . In some embodiments, the power supply 909 may be logically connected to the processor 901 through a power management system, so as to implement functions such as managing charging, discharging, and power consumption through the power management system.

尽管图7中未示出,电子设备900还可以包括摄像头、蓝牙模块等,在此不再赘述。Although not shown in FIG. 7 , the electronic device 900 may further include a camera, a Bluetooth module, and the like, which will not be repeated here.

本领域普通技术人员可以理解,上述实施例的各种方法中的全部或部分步骤可以通过指令来完成,或通过指令控制相关的硬件来完成,该指令可以存储于一计算机可读存储介质中,并由处理器进行加载和执行。为此,本发明实施例提供一种存储介质,其中存储有多条指令,该指令能够被处理器进行加载,以执行本发明实施例所提供的任一种全景图像生成方法中的步骤。Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above-mentioned embodiments can be completed by instructions, or by instructions that control relevant hardware, and the instructions can be stored in a computer-readable storage medium, and loaded and executed by the processor. To this end, the embodiments of the present invention provide a storage medium in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute steps in any of the panoramic image generating methods provided by the embodiments of the present invention.

其中,该存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)、磁盘或光盘等。Wherein, the storage medium may include: a read only memory (ROM, Read Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and the like.

由于该存储介质中所存储的指令,可以执行本发明实施例所提供的任一种全景图像生成方法中的步骤,因此,可以实现本发明实施例所提供的任一种全景图像生成方法所能实现的有益效果,详见前面的实施例,在此不再赘述。Because the instructions stored in the storage medium can execute the steps in any of the panoramic image generation methods provided by the embodiments of the present invention, it is possible to achieve the capabilities of any panoramic image generation methods provided by the embodiments of the present invention. For the beneficial effects achieved, see the foregoing embodiments for details, and details are not repeated here.

以上各个操作的具体实施可参见前面的实施例,在此不再赘述。For the specific implementation of the above operations, reference may be made to the foregoing embodiments, and details are not described herein again.

综上该,虽然本申请已以优选实施例揭露如上,但上述优选实施例并非用以限制本申请,本领域的普通技术人员,在不脱离本申请的精神和范围内,均可作各种更动与润饰,因此本申请的保护范围以权利要求界定的范围为准。To sum up, although the present application has been disclosed above with preferred embodiments, the above preferred embodiments are not intended to limit the present application. Those of ordinary skill in the art can make various Therefore, the scope of protection of the present application is subject to the scope defined by the claims.

Claims (11)

1. A panoramic image generation method is applied to electronic equipment and is characterized by comprising the following steps:
acquiring a panoramic shooting instruction;
starting a camera according to the panoramic shooting instruction to shoot a video, and displaying the shot content in a preview frame;
in the video shooting process, carrying out snake-shaped scanning on the shot content along a second direction at a preset first direction overlapping rate to obtain a plurality of groups of scanning images, wherein the first direction is vertical to the second direction;
generating corresponding local images in the second direction according to each group of scanning images;
and generating a panoramic image according to the local image.
2. The panoramic image generation method according to claim 1, wherein the generating the corresponding partial image in the second direction from each set of the scanned images includes:
determining a corresponding key frame image group according to each group of scanning images;
extracting the characteristic points of the key frame images in each key frame image group;
and splicing the key frame image group according to the characteristic points to generate a corresponding local image in the second direction.
3. The method of generating a panoramic image according to claim 2, wherein the stitching the key frame image group according to the feature points comprises:
calculating a corresponding first homography matrix according to the feature points of two adjacent key frame images in the key frame image group;
calculating a first global transformation matrix according to the first homography matrix;
and splicing the corresponding key frame image group by using the first global transformation matrix.
4. The method of claim 3, wherein the calculating a corresponding first homography matrix according to the feature points of two adjacent key frame images in the key frame image group comprises:
matching the feature points of two adjacent key frame images in the key frame image group;
acquiring the position information of the feature points successfully matched;
and calculating a first homography matrix according to the position information.
5. The method of claim 2, wherein determining the corresponding set of key frame images from each set of scan images comprises:
in each group of scanning images, taking a first frame scanning image as a key frame image;
acquiring a next frame scanning image adjacent to the key frame image as a target frame image;
judging whether the target frame image meets a preset condition or not according to the feature points of the key frame image and the feature points of the target frame image;
if so, taking the target frame image as a key frame image, and returning to execute the operation of acquiring the next frame scanning image adjacent to the key frame image;
and if not, taking the next frame of scanned image adjacent to the target frame image as the target frame image, and returning to execute the operation of judging whether the target frame image meets the preset condition according to the feature points of the key frame image and the feature points of the target frame image.
6. The method for generating the panoramic image according to claim 5, wherein the determining whether the target frame image satisfies a preset condition according to the feature points of the key frame image and the feature points of the target frame image includes:
matching the characteristic points of the key frame images with the characteristic points of the target frame images;
counting the number of the feature points successfully matched in the key frame image and the total number of the feature points in the key frame image;
and judging whether the target frame image meets a preset condition or not according to the number and the total number of the successfully matched feature points.
7. The method for generating the panoramic image according to claim 6, wherein the determining whether the target frame image meets a preset condition according to the number and the total number of the feature points successfully matched comprises:
calculating similarity according to the number and the total number of the feature points successfully matched;
and when the similarity is smaller than a first preset threshold and the number of the successfully matched feature points is larger than a second preset threshold, judging that the target frame image meets a preset condition.
8. The panoramic image generation method according to any one of claims 1 to 7, wherein the generating a panoramic image from the partial image includes:
calculating a corresponding second homography matrix according to the two adjacent local images;
calculating a second global transformation matrix according to the second homography matrix;
and splicing the local images in the first direction by using the second global transformation matrix to obtain a panoramic image.
9. A panoramic image generation device applied to an electronic device, comprising:
the acquisition module is used for acquiring a panoramic shooting instruction;
the shooting module is used for starting a camera to shoot videos according to the panoramic shooting instruction and displaying shot contents in a preview frame;
the scanning module is used for performing snake-shaped scanning on the shot content along a second direction at a preset first direction overlapping rate in the video shooting process to obtain a plurality of groups of scanning images, wherein the first direction is vertical to the second direction;
the first generation module is used for generating corresponding local images in the second direction according to each group of scanning images;
and the second generation module is used for generating a panoramic image according to the local image.
10. A storage medium having stored therein a plurality of instructions adapted to be loaded by a processor to perform the panoramic image generation method of any one of claims 1 to 8.
11. An electronic device comprising a processor and a memory, the processor being electrically connected to the memory, the memory being configured to store instructions and data, the processor being configured to perform the steps of the panoramic image generation method of any one of claims 1 to 8.
CN201810011559.2A 2018-01-05 2018-01-05 Panoramic image generation method, device, storage medium and electronic device Expired - Fee Related CN110012209B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201810011559.2A CN110012209B (en) 2018-01-05 2018-01-05 Panoramic image generation method, device, storage medium and electronic device
PCT/CN2018/122029 WO2019134516A1 (en) 2018-01-05 2018-12-19 Method and device for generating panoramic image, storage medium, and electronic apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810011559.2A CN110012209B (en) 2018-01-05 2018-01-05 Panoramic image generation method, device, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN110012209A CN110012209A (en) 2019-07-12
CN110012209B true CN110012209B (en) 2020-08-14

Family

ID=67143617

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810011559.2A Expired - Fee Related CN110012209B (en) 2018-01-05 2018-01-05 Panoramic image generation method, device, storage medium and electronic device

Country Status (2)

Country Link
CN (1) CN110012209B (en)
WO (1) WO2019134516A1 (en)

Families Citing this family (28)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112215786B (en) * 2019-07-12 2025-09-23 自然资源实物地质资料中心 A method for stitching single polarization and cross polarization images of rock slices
CN110675420B (en) * 2019-08-22 2023-03-24 华为技术有限公司 Image processing method and electronic equipment
CN110648363B (en) * 2019-09-16 2024-10-18 腾讯科技(深圳)有限公司 Camera gesture determining method and device, storage medium and electronic equipment
CN111340707B (en) * 2020-02-27 2023-07-14 创新奇智(重庆)科技有限公司 Image splicing system and method based on key frames
CN113747044B (en) * 2020-05-29 2023-05-02 华为技术有限公司 Panoramic shooting method and equipment
CN111970537B (en) * 2020-08-04 2023-02-28 威海精讯畅通电子科技有限公司 Root system scanning image processing method and system
CN111935408B (en) * 2020-09-02 2022-01-18 Oppo广东移动通信有限公司 Panoramic image shooting method and system, electronic device and readable storage medium
CN113297890A (en) * 2020-10-21 2021-08-24 阿里巴巴集团控股有限公司 Object information processing method and device
CN113297889A (en) * 2020-10-21 2021-08-24 阿里巴巴集团控股有限公司 Object information processing method and device
CN112257595A (en) * 2020-10-22 2021-01-22 广州市百果园网络科技有限公司 Video matching method, device, equipment and storage medium
CN112991180B (en) * 2021-03-25 2023-10-31 北京百度网讯科技有限公司 Image splicing method, device, equipment and storage medium
CN113269671B (en) * 2021-04-09 2024-02-23 浙江省交通运输科学研究院 Bridge apparent panorama generating method based on local and global features
CN113240582B (en) * 2021-04-13 2023-12-12 浙江大华技术股份有限公司 Image stitching method and device
CN113450254B (en) * 2021-05-20 2022-06-17 北京城市网邻信息技术有限公司 Image processing method, image processing device, electronic equipment and computer readable storage medium
CN113542625B (en) * 2021-05-28 2024-08-20 北京迈格威科技有限公司 Image processing method, device, equipment and storage medium
CN113362227B (en) * 2021-06-22 2023-07-21 北京百度网讯科技有限公司 Image processing method, device, electronic device and storage medium
CN113609316A (en) * 2021-07-27 2021-11-05 支付宝(杭州)信息技术有限公司 Method and device for detecting similarity of media contents
CN113850250A (en) * 2021-08-23 2021-12-28 阿里巴巴(中国)有限公司 Goods shelf inspection method and goods shelf inspection equipment
CN115731100A (en) * 2021-08-30 2023-03-03 成都纵横自动化技术股份有限公司 Image splicing method and system based on multiple unmanned aerial vehicles
CN113920012B (en) * 2021-09-29 2025-05-30 中国科学院苏州生物医学工程技术研究所 Skin CT large field of view image stitching method and system with high reliability and fault tolerance
CN114007017A (en) * 2021-11-18 2022-02-01 浙江博采传媒有限公司 Video generation method and device and storage medium
CN114078212A (en) * 2021-11-23 2022-02-22 北京巨视科技有限公司 A method and device for accurate vehicle identification based on ETC gantry
CN116958164A (en) * 2022-04-08 2023-10-27 影石创新科技股份有限公司 Image processing method, device, electronic equipment and storage medium
CN114520879B (en) * 2022-04-21 2022-09-06 浙江宇视科技有限公司 Radar vision cooperative video acquisition method, device and system and storage medium
CN116248992B (en) * 2023-02-09 2024-01-16 广州市玄武无线科技股份有限公司 Dynamically configurable shelf image processing method and device, electronic equipment and storage medium
CN119741196B (en) * 2024-12-09 2025-07-04 苏州锳漫科技有限公司 High-robustness image stitching method
CN120125431B (en) * 2025-04-29 2025-07-22 安徽智汇云舟科技有限公司 A method and system for stitching continuous frame images of unmanned aerial vehicles
CN120207405A (en) * 2025-05-28 2025-06-27 北京全路通信信号研究设计院集团有限公司 Train speed measurement and positioning method, system, storage medium and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102420898A (en) * 2011-09-27 2012-04-18 惠州Tcl移动通信有限公司 Panoramic photographing implementation method based on mobile phone and mobile phone
CN104364712A (en) * 2012-06-08 2015-02-18 苹果公司 Methods and apparatus for capturing a panoramic image
CN107094236A (en) * 2017-05-19 2017-08-25 努比亚技术有限公司 Panorama shooting method, mobile terminal and computer-readable recording medium
CN107395971A (en) * 2017-07-31 2017-11-24 努比亚技术有限公司 A kind of image-pickup method, equipment and computer-readable recording medium
JP2017220834A (en) * 2016-06-08 2017-12-14 キヤノン株式会社 Imaging apparatus, imaging method and program

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7133068B2 (en) * 2000-03-06 2006-11-07 Sony Corporation System and method for creating still images by utilizing a video camera device
US7746375B2 (en) * 2003-10-28 2010-06-29 Koninklijke Philips Electronics N.V. Digital camera with panorama or mosaic functionality
CN101474076A (en) * 2008-10-15 2009-07-08 北京汇影互联科技有限公司 Method and equipment for obtaining full-field ultrasound scan image data
CN101984463A (en) * 2010-11-02 2011-03-09 中兴通讯股份有限公司 Method and device for synthesizing panoramic image
CN102201115B (en) * 2011-04-07 2013-12-11 湖南天幕智能科技有限公司 Real-time panoramic image stitching method of aerial videos photography by unmanned plane
CN103139479A (en) * 2013-02-25 2013-06-05 广东欧珀移动通信有限公司 A method and device for ending panoramic preview scanning

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102420898A (en) * 2011-09-27 2012-04-18 惠州Tcl移动通信有限公司 Panoramic photographing implementation method based on mobile phone and mobile phone
CN104364712A (en) * 2012-06-08 2015-02-18 苹果公司 Methods and apparatus for capturing a panoramic image
JP2017220834A (en) * 2016-06-08 2017-12-14 キヤノン株式会社 Imaging apparatus, imaging method and program
CN107094236A (en) * 2017-05-19 2017-08-25 努比亚技术有限公司 Panorama shooting method, mobile terminal and computer-readable recording medium
CN107395971A (en) * 2017-07-31 2017-11-24 努比亚技术有限公司 A kind of image-pickup method, equipment and computer-readable recording medium

Also Published As

Publication number Publication date
CN110012209A (en) 2019-07-12
WO2019134516A1 (en) 2019-07-11

Similar Documents

Publication Publication Date Title
CN110012209B (en) Panoramic image generation method, device, storage medium and electronic device
US11605214B2 (en) Method, device and storage medium for determining camera posture information
CN110555883B (en) Repositioning method and device for camera attitude tracking process and storage medium
CN110147805B (en) Image processing method, device, terminal and storage medium
CN110650379B (en) Video abstract generation method and device, electronic equipment and storage medium
CN108495032B (en) Image processing method, device, storage medium and electronic device
CN107835366B (en) Multimedia playback method, device, storage medium and electronic device
CN108776822B (en) Target area detection method, device, terminal and storage medium
CN110070063A (en) Action identification method, device and the electronic equipment of target object
CN107566749B (en) Shooting method and mobile terminal
CN110290426B (en) Method, device and equipment for displaying resources and storage medium
CN112637500B (en) Image processing method and device
CN111432122A (en) Image processing method and electronic equipment
CN112950535A (en) Video processing method and device, electronic equipment and storage medium
CN110807769B (en) Image display control method and device
CN112788244B (en) Shooting method, shooting device and electronic equipment
CN108616687B (en) A photographing method, device and mobile terminal
CN110086998A (en) A kind of image pickup method and terminal
CN108712604B (en) Panoramic shooting method and mobile terminal
CN112449165B (en) Projection method and device and electronic equipment
CN112511743B (en) Video shooting method and device
WO2022267781A1 (en) Modeling method and related electronic device, and storage medium
CN114143455B (en) Shooting method, device and electronic equipment
CN112702518B (en) Shooting method and device and electronic equipment
CN110662113B (en) Video playing method and device and computer readable storage medium

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
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20200814

CF01 Termination of patent right due to non-payment of annual fee