CN110675319B - Mobile phone photographing panoramic image splicing method based on minimum spanning tree - Google Patents
Mobile phone photographing panoramic image splicing method based on minimum spanning tree Download PDFInfo
- Publication number
- CN110675319B CN110675319B CN201910861753.4A CN201910861753A CN110675319B CN 110675319 B CN110675319 B CN 110675319B CN 201910861753 A CN201910861753 A CN 201910861753A CN 110675319 B CN110675319 B CN 110675319B
- Authority
- CN
- China
- Prior art keywords
- image
- spanning tree
- minimum spanning
- images
- matching
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformation in the plane of the image
- G06T3/40—Scaling the whole image or part thereof
- G06T3/4038—Scaling the whole image or part thereof for image mosaicing, i.e. plane images composed of plane sub-images
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/74—Image or video pattern matching; Proximity measures in feature spaces
- G06V10/75—Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
- G06V10/757—Matching configurations of points or features
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2200/00—Indexing scheme for image data processing or generation, in general
- G06T2200/32—Indexing scheme for image data processing or generation, in general involving image mosaicing
Abstract
The invention discloses a mobile phone photographing panoramic image splicing method based on a minimum spanning tree, which comprises the following steps: tracking and drawing: a user acquires a plurality of images of the panoramic photo to be shot according to the photo tracking guide; image matching: constructing a relational graph structure between the images by using the matching relation between the images; establishing a minimum spanning tree: establishing a corresponding minimum spanning tree according to a relation graph structure in image matching; image splicing: the method has the advantages that the design is reasonable, the complex procedures in the picture taking and picture taking processes are simplified, the good image splicing effect can be obtained, in addition, the distortion caused by the perspective transformation in the final picture splicing can be effectively relieved, and the image splicing effect is greatly improved.
Description
Technical Field
The invention relates to the technical field of image splicing, in particular to a mobile phone photographing panoramic image splicing method based on a minimum spanning tree.
Background
The image stitching technology is a technology for stitching a plurality of images with overlapped parts (which may be obtained at different times, different viewing angles or different sensors) into a seamless panoramic image or a high-resolution image. Image registration and image fusion are two key technologies for image stitching. Image registration is the basis of image fusion, and the computational load of an image registration algorithm is generally very large, so the development of an image stitching technology depends on the innovation of the image registration technology to a great extent. The early image registration technology mainly adopts a point matching method, which has low speed and low precision, often needs to manually select an initial matching point, and cannot adapt to the fusion of images with large data volume. The image stitching method is many, and different algorithm steps have certain differences, but the rough process is the same.
However, in the application process of the existing image splicing method, the photographing and drawing process is complex, and in addition, distortion is easily generated in the jigsaw perspective process, which affects the image splicing effect and has certain defects.
Disclosure of Invention
The invention aims to overcome the problems in the prior art, and provides a mobile phone photographing panoramic image splicing method based on a minimum spanning tree, which can simplify the complex procedures in the photographing and image-taking process, and simultaneously can relieve the distortion caused by perspective transformation in the final jigsaw puzzle and improve the image splicing effect.
In order to achieve the technical purpose and achieve the technical effect, the invention is realized by the following technical scheme:
a mobile phone photographing panoramic image splicing method based on a minimum spanning tree comprises the following steps:
s100, tracking and acquiring a picture: a user acquires a plurality of images of the panoramic photo to be shot according to the photo tracking guide;
s200, image matching: constructing a relational graph structure between the images by using the matching relation between the images;
s300, establishing a minimum spanning tree: establishing a corresponding minimum spanning tree according to a relation graph structure in image matching;
s400, image splicing: and generating perspective transformation from each image to the canvas plane by utilizing the path from the root node to each node according to the canvas plane of the final jigsaw puzzle from the image corresponding to the root node of the minimum spanning tree.
Preferably, in the method for stitching panoramic images photographed by mobile phone based on the minimum spanning tree, in step S200, the graph structure includes nodes and edges connecting the nodes, the nodes are used for representing corresponding images acquired in the tracking and image-taking stage, and the weights of the edges are used for representing the strength of the matching relationship between the corresponding images.
Preferably, in the method for stitching a panoramic image photographed by a mobile phone based on a minimum spanning tree, in step S200, the image matching relationship construction includes the following steps:
s201, obtaining characteristic points of each image in a tracking and image-acquiring stage; a
S202, acquiring the matching relation of the feature points between the images by using RANSAC.
Preferably, in the method for stitching a panoramic image photographed by a mobile phone based on a minimum spanning tree, the weight formula of the edge is as follows:
Wij=1/log(m+2),
where m is the number of inliers obtained from feature point matching between images.
Preferably, in the method for stitching mobile phone photographed panoramic images based on the minimum spanning tree, in step S300, the minimum spanning tree is obtained by using a Floyd-Warshall algorithm.
Preferably, in the method for stitching a panoramic image photographed by a mobile phone based on a minimum spanning tree, the method for establishing the minimum spanning tree includes the following steps:
s301, obtaining the shortest distance between any two nodes in the graph structure and a corresponding path thereof by using the weight matrix W of the graph structure and the Floyd-Warshall algorithm;
s302, calculating the sum of the shortest distances from each node to other nodes in the graph structure;
s303, selecting the node with the shortest distance and the minimum distance as the root node of the minimum spanning tree, and taking the image corresponding to the root node of the minimum spanning tree as the canvas plane of the final jigsaw puzzle.
Preferably, in the method for stitching a panoramic image photographed by a mobile phone based on a minimum spanning tree, in step S400, perspective transformation is performed as follows:
wherein M is an arbitrary node, R is a root node, n1,n2Respectively nodes through which M to R pass.
The invention has the beneficial effects that:
the invention has reasonable design, simplifies the complex procedures in the picture taking process, can obtain good image splicing effect, can effectively relieve the distortion caused by perspective transformation in the final picture splicing, and greatly improves the image splicing effect.
Of course, it is not necessary for any product in which the invention is practiced to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a method for stitching panoramic images photographed by a mobile phone according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, the present embodiment is a method for stitching panoramic images photographed by a mobile phone based on a minimum spanning tree, including the following steps:
s100, tracking and acquiring a picture: a user acquires a plurality of images of the panoramic photo to be shot according to the photo tracking guide;
s200, image matching: the method comprises the following steps of constructing a relational graph structure between images by utilizing a matching relation between the images, wherein the graph structure comprises nodes and edges connecting the nodes, the nodes are used for representing corresponding images acquired in a tracking and image-picking stage, the weight of the edges is used for representing the strength of the matching relation between the corresponding images, and the image matching relation construction comprises the following steps: firstly, acquiring characteristic points of each image in a tracking and image-taking stage; and then acquiring the matching relation of the feature points between the images by using RANSAC. The weight formula of the edge is Wij1/log (m +2), where m is the number of inliers obtained from feature point matching between images.
S300, establishing a minimum spanning tree: establishing a corresponding minimum spanning tree according to a relation graph structure in image matching, wherein the minimum spanning tree is obtained by adopting a Floyd-Warshall algorithm, and the establishing method of the minimum spanning tree comprises the following steps: firstly, obtaining the shortest distance between any two nodes in the graph structure and a path corresponding to the shortest distance by using a weight matrix W of the graph structure and a Floyd-Warshall algorithm; then calculating the sum of the shortest distances from each node to other nodes in the graph structure; and finally, selecting the node with the shortest distance and the minimum distance as the root node of the minimum spanning tree, and taking the image corresponding to the root node of the minimum spanning tree as the canvas plane of the final jigsaw puzzle.
S400, image splicing: and generating perspective transformation from each image to the canvas plane by utilizing the path from the root node to each node according to the canvas plane of the final jigsaw puzzle from the image corresponding to the root node of the minimum spanning tree. A perspective transformation of each image to the canvas plane is generated using the path of the root node to each node. The algorithm of the last step obtains the shortest path from each other node to the root node. And selecting a Path (marked as Path (M, R)) from one node (marked as M) to a root node (marked as R) as an example. Suppose Path (M, R) is M->n1->n2->R, i.e. the shortest path from M to R is from M to node n1Then from n1To node n2Finally by n2To the root node R. The image matching relationship from the first step can result in a perspective transformation of M to R
The invention has reasonable design, simplifies the complex procedures in the picture taking process, can obtain good image splicing effect, can effectively relieve the distortion caused by perspective transformation in the final picture splicing, and greatly improves the image splicing effect.
In the description herein, references to the description of "one embodiment," "an example," "a specific example" or the like are intended to mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The preferred embodiments of the invention disclosed above are intended to be illustrative only. The preferred embodiments are not intended to be exhaustive or to limit the invention to the precise embodiments disclosed. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the invention and the practical application, to thereby enable others skilled in the art to best utilize the invention. The invention is limited only by the claims and their full scope and equivalents.
Claims (4)
1. A mobile phone photographing panoramic image splicing method based on a minimum spanning tree is characterized by comprising the following steps:
s100, tracking and acquiring a picture: a user acquires a plurality of images of the panoramic photo to be shot according to the photo tracking guide;
s200, image matching: the method comprises the following steps of constructing a relation graph structure between images by using matching relations between the images, wherein the image matching relation construction comprises the following steps:
s201, obtaining characteristic points of each image in a tracking and image-acquiring stage;
s202, acquiring a matching relation of feature points between images by using RANSAC;
the graph structure comprises nodes and edges connecting the nodes, wherein the nodes are used for representing corresponding images acquired in a tracking and image-taking stage, the weights of the edges are used for representing the strength of matching relations among the corresponding images, and the weight formula of the edges is as follows:
Wij=1/log(m+2),
wherein m is the number of interior points obtained by feature point matching between images;
s300, establishing a minimum spanning tree: establishing a corresponding minimum spanning tree according to a relation graph structure in image matching;
s400, image splicing: and generating perspective transformation from each image to the canvas plane by utilizing the path from the root node to each node according to the canvas plane of the final jigsaw puzzle from the image corresponding to the root node of the minimum spanning tree.
2. The mobile phone photographing panoramic image splicing method based on the minimum spanning tree as claimed in claim 1, wherein: in step S300, the minimum spanning tree is obtained by using Floyd-Warshall algorithm.
3. The mobile phone photographing panoramic image splicing method based on the minimum spanning tree as claimed in claim 2, wherein: the method for establishing the minimum spanning tree comprises the following steps:
s301, obtaining the shortest distance between any two nodes in the graph structure and a corresponding path thereof by using the weight matrix W of the graph structure and the Floyd-Warshall algorithm;
s302, calculating the sum of the shortest distances from each node to other nodes in the graph structure;
s303, selecting the node with the shortest distance and the minimum distance as the root node of the minimum spanning tree, and taking the image corresponding to the root node of the minimum spanning tree as the canvas plane of the final jigsaw puzzle.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910861753.4A CN110675319B (en) | 2019-09-12 | 2019-09-12 | Mobile phone photographing panoramic image splicing method based on minimum spanning tree |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910861753.4A CN110675319B (en) | 2019-09-12 | 2019-09-12 | Mobile phone photographing panoramic image splicing method based on minimum spanning tree |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110675319A CN110675319A (en) | 2020-01-10 |
CN110675319B true CN110675319B (en) | 2020-11-03 |
Family
ID=69077795
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910861753.4A Active CN110675319B (en) | 2019-09-12 | 2019-09-12 | Mobile phone photographing panoramic image splicing method based on minimum spanning tree |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110675319B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111340707B (en) * | 2020-02-27 | 2023-07-14 | 创新奇智(重庆)科技有限公司 | Image splicing system and method based on key frames |
CN111583118B (en) * | 2020-05-13 | 2023-09-29 | 创新奇智(北京)科技有限公司 | Image stitching method and device, storage medium and electronic equipment |
CN113747044B (en) * | 2020-05-29 | 2023-05-02 | 华为技术有限公司 | Panoramic shooting method and equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103605765A (en) * | 2013-11-26 | 2014-02-26 | 电子科技大学 | Mass image retrieval system based on cluster compactness |
CN103646396A (en) * | 2013-11-29 | 2014-03-19 | 清华大学深圳研究生院 | Matching cost algorithm of binocular stereo matching algorithm, and non-local stereo matching algorithm |
CN103955886A (en) * | 2014-05-22 | 2014-07-30 | 哈尔滨工业大学 | 2D-3D image conversion method based on graph theory and vanishing point detection |
CN104200488A (en) * | 2014-08-04 | 2014-12-10 | 合肥工业大学 | Multi-target tracking method based on graph representation and matching |
CN109829399A (en) * | 2019-01-18 | 2019-05-31 | 武汉大学 | A kind of vehicle mounted road scene point cloud automatic classification method based on deep learning |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7653264B2 (en) * | 2005-03-04 | 2010-01-26 | The Regents Of The University Of Michigan | Method of determining alignment of images in high dimensional feature space |
US8203607B2 (en) * | 2005-06-22 | 2012-06-19 | Siemens Medical Solutions Usa, Inc. | Incorporating prior information from pre aligned image pairs into EMST-based image registration |
CN102088569B (en) * | 2010-10-13 | 2013-06-19 | 首都师范大学 | Sequence image splicing method and system of low-altitude unmanned vehicle |
US8532402B2 (en) * | 2011-06-22 | 2013-09-10 | The Boeing Company | Image registration |
CN103020963B (en) * | 2012-11-29 | 2015-11-04 | 北京航空航天大学 | A kind of multi-eye stereo matching process cut based on the figure of self-adaptation watershed divide |
CN103218776B (en) * | 2013-03-07 | 2016-06-22 | 天津大学 | Non-local depth map super resolution ratio reconstruction method based on minimum spanning tree |
CN103679674B (en) * | 2013-11-29 | 2017-01-11 | 航天恒星科技有限公司 | Method and system for splicing images of unmanned aircrafts in real time |
CN103902988B (en) * | 2014-04-21 | 2018-01-30 | 梁爽 | A kind of sketch shape matching method based on Modular products figure with Clique |
-
2019
- 2019-09-12 CN CN201910861753.4A patent/CN110675319B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103605765A (en) * | 2013-11-26 | 2014-02-26 | 电子科技大学 | Mass image retrieval system based on cluster compactness |
CN103646396A (en) * | 2013-11-29 | 2014-03-19 | 清华大学深圳研究生院 | Matching cost algorithm of binocular stereo matching algorithm, and non-local stereo matching algorithm |
CN103955886A (en) * | 2014-05-22 | 2014-07-30 | 哈尔滨工业大学 | 2D-3D image conversion method based on graph theory and vanishing point detection |
CN104200488A (en) * | 2014-08-04 | 2014-12-10 | 合肥工业大学 | Multi-target tracking method based on graph representation and matching |
CN109829399A (en) * | 2019-01-18 | 2019-05-31 | 武汉大学 | A kind of vehicle mounted road scene point cloud automatic classification method based on deep learning |
Non-Patent Citations (1)
Title |
---|
"内点带权的最小生成树的近似算法";王海涛 等;《计算机科学》;20051231;第32卷(第8期);第90-91、99页 * |
Also Published As
Publication number | Publication date |
---|---|
CN110675319A (en) | 2020-01-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110675319B (en) | Mobile phone photographing panoramic image splicing method based on minimum spanning tree | |
KR101657039B1 (en) | Image processing apparatus, image processing method, and imaging system | |
US10972672B2 (en) | Device having cameras with different focal lengths and a method of implementing cameras with different focal lengths | |
US7889949B2 (en) | Joint bilateral upsampling | |
EP2477152B1 (en) | Image processing device, image processing method, image processing program, and recording medium | |
CN104995911B (en) | Image processing device, image capture device, filter generating device, image restoration method, and program | |
US11475243B2 (en) | Training method and device for an image enhancement model, and storage medium | |
CN109314752A (en) | Effective determination of light stream between image | |
KR20080096006A (en) | Apparatus and method for making a panorama image and computer readable medium stored thereon computer executable instruction for performing the method | |
CN110944160B (en) | Image processing method and electronic equipment | |
CN110704563A (en) | Map fusion method and device, equipment and storage medium | |
CN106815802A (en) | A kind of image split-joint method and device | |
CN111105473B (en) | Two-dimensional house-type graph construction method and device and storage medium | |
CN104272732B (en) | Image processing apparatus, method and shooting device | |
JPWO2013105381A1 (en) | Image processing method, image processing apparatus, and image processing program | |
CN106952247A (en) | A kind of dual camera terminal and its image processing method and system | |
CN113344789B (en) | Image splicing method and device, electronic equipment and computer readable storage medium | |
CN113114975B (en) | Image splicing method and device, electronic equipment and storage medium | |
CN107292822B (en) | Image splicing method and device | |
CN111385461A (en) | Panoramic shooting method and device, camera and mobile terminal | |
WO2021109863A1 (en) | Photo processing method and photo processing apparatus | |
CN112329649A (en) | Urban vegetation type identification method, system, equipment and medium | |
CN116109681A (en) | Image fusion method, device, electronic equipment and readable storage medium | |
JP2015046051A (en) | Image processing apparatus, image processing method, program, and imaging system | |
CN106296580A (en) | A kind of method and device of image mosaic |
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 |