CN112907452A - Optimal suture line searching method for image stitching - Google Patents
Optimal suture line searching method for image stitching Download PDFInfo
- Publication number
- CN112907452A CN112907452A CN202110381507.6A CN202110381507A CN112907452A CN 112907452 A CN112907452 A CN 112907452A CN 202110381507 A CN202110381507 A CN 202110381507A CN 112907452 A CN112907452 A CN 112907452A
- Authority
- CN
- China
- Prior art keywords
- image
- points
- cost
- suture line
- boundary
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 19
- 239000011159 matrix material Substances 0.000 claims abstract description 13
- 230000008030 elimination Effects 0.000 claims description 3
- 238000003379 elimination reaction Methods 0.000 claims description 3
- 238000003706 image smoothing Methods 0.000 abstract description 2
- 230000006870 function Effects 0.000 description 7
- 238000005516 engineering process Methods 0.000 description 3
- 230000004927 fusion Effects 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000008447 perception Effects 0.000 description 2
- PXFBZOLANLWPMH-UHFFFAOYSA-N 16-Epiaffinine Natural products C1C(C2=CC=CC=C2N2)=C2C(=O)CC2C(=CC)CN(C)C1C2CO PXFBZOLANLWPMH-UHFFFAOYSA-N 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000002059 diagnostic imaging Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 238000007500 overflow downdraw method Methods 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 230000001629 suppression Effects 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 230000001131 transforming effect Effects 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
- G06T3/4038—Image mosaicing, e.g. composing plane images from 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/40—Extraction of image or video features
- G06V10/46—Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
- G06V10/462—Salient features, e.g. scale invariant feature transforms [SIFT]
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Multimedia (AREA)
- Image Analysis (AREA)
Abstract
The invention provides an optimal suture line searching method based on a mixed norm. The method calculates the cost of adjacent pixels by using L1And L2The norm, in combination, can well balance image smoothing with edge detail information. Meanwhile, the cost function adopts an exponential form, so that the color difference weight can be amplified, the distinction between the edge of the remarkable object and the non-edge area in the overlapped area is strengthened, and the searched suture line is prevented from passing through the remarkable object in the overlapped area. Firstly, respectively extracting feature points of each image by using an SIFT algorithm, and matching the feature points; then calculating a homography matrix between adjacent images, and finding a superposition area between the images through the homography matrix; and carrying out optimal suture line searching based on the mixed norm in the overlapping area, and completing image splicing on the basis of obtaining the optimal suture line.
Description
Technical Field
The invention belongs to the technical field of image processing, and particularly relates to an optimal suture line searching method for image splicing.
Background
The image stitching is to stitch two or more images containing overlapping areas in the same scene into one image with high resolution and wide viewing angle. The image splicing technology aims to increase the image visual angle and is beneficial to more intuitively and comprehensively grasping information. More contents can be presented than the image of the general view. The technology is widely applied to the aspects of medical imaging, remote sensing technology, virtual reality, video editing and the like.
The classic image stitching process mainly comprises two key steps of image registration and image fusion. At present, the mainstream image registration method is a method based on local features, and image fusion is to realize smooth transition of an image overlapping region and reduce the influence of illumination on an image. However, in a scene with a moving object or objects with different depths, the conventional linear weighting or multiband fusion method easily causes the problem of the stitching quality of the stitched images, such as object dislocation or artifacts in the coincident region. The optimal suture line searching method can solve the above problems well.
At present, researchers at home and abroad have made many studies on the optimal suture line search for Image stitching, and have achieved good results, such as a perception-based seam cutting method (Nan L, Liao T, Chao w.perspective-based seam stitching for Image stitching [ J ]. Signal Image and Video Processing,2018,12(3):1-8.), a stitching method based on a more optimal canonical energy function (Qiu X, Li q.
Disclosure of Invention
The invention provides an optimal suture line searching method based on a mixed norm. The method calculates the cost of adjacent pixels by using L1And L2The norm, in combination, can well balance image smoothing with edge detail information. Meanwhile, the cost function adopts an exponential form, so that the color difference weight can be amplified, the distinction between the edge of the remarkable object and the non-edge area in the overlapped area is strengthened, and the searched suture line is prevented from passing through the remarkable object in the overlapped area. Firstly, respectively extracting feature points of each image by using an SIFT algorithm, and matching the feature points; then calculating a homography matrix between adjacent images, and finding a superposition area between the images through the homography matrix; and carrying out optimal suture line searching based on the mixed norm in the overlapping area, and completing image splicing on the basis of obtaining the optimal suture line.
The technical scheme adopted by the invention comprises the following steps:
(1) reading two images to be spliced, and respectively recording the two imagesI1And I2;
(2) Image I by SIFT algorithm1And I2Extracting characteristic points;
(3) matching the detected characteristic points by using a K-D tree to obtain characteristic point pairs;
(4) performing feature point pair elimination (mismatching) on the image with the marked feature points by adopting an RANSAC algorithm and solving a homography matrix H;
(5) for image I according to homography matrix H1And I2Transforming, and recording the two transformed images as J1And J2;
(6) Obtaining a coincidence region omega and searching an optimal suture line;
(6a) taking image J1And J2Obtaining an omega image of a superposition area;
(6b) calculating image J1Boundary B with overlap region omega1And image J2Boundary B with overlap region omega2And the boundary B1And boundary B2The two intersections are respectively marked as S and T;
(6c) traversing all pixel points in the overlapping area, and respectively calculating the cost between each pixel point p and the pixel points q in the four adjacent areas, wherein the cost function is calculated as follows:
(1) if pixel point p or q is located at boundary B1∪B2Then, the cost between the two points is assigned to infinity;
(2) if the pixel points p and q are positioned in the same image J1Or J2If so, the cost between the two points is assigned to be 0;
(3) if the pixels p and q are located in different images, the cost V (p, q) between the two points
Calculated according to equation (1):
V(p,q)=V(p)+V(q) (1)
V(x)=[ω·||x||2+(1-ω)·||x||1]4 (2)
wherein, omega is a weight coefficient, omega belongs to [0,1 ]],||x||2=||J1(x)-J2(x)||2Is L2Norm of,||x||1=||J1(x)-J2(x)||1Is L1And (4) norm.
(6d) Starting from the starting point S, searching the link with the minimum cost according to the cost among the pixels calculated in the step (6c) until the ending point T stops, and then the curve formed by the series of points is the optimal suture line.
Compared with the prior art, the invention has the following advantages:
(1) is combined with L1Norm and L2Norm dominance, L1The norm has the advantage of preserving image edge information, L2The norm has the characteristic of noise suppression on a flat region of an image, so that the cost function based on the mixed norm can not only smooth the image, but also well maintain the edge detail information of the image.
(2) The cost function is in an exponential form, so that the color difference weight can be amplified, the distinction between the edge and the non-edge area of the remarkable object in the overlapping area is strengthened, and the searched suture line is prevented from passing through the remarkable object in the overlapping area.
Therefore, the invention can search an optimal suture line under larger parallax, and can effectively reduce or avoid the splicing quality problems of object target dislocation, artifacts and the like.
Drawings
FIG. 1 is a flow chart of the present invention for implementing optimal suture line search for image stitching.
Fig. 2(a) is a first experimental image used in this example.
Fig. 2(b) is a second experimental image used in this example.
Fig. 3(a) is a transformed image of the first experimental image.
Fig. 3(b) is a transformed image of the second experimental image.
Fig. 4 is an image of the overlapping area of two transformed images.
Fig. 5 is an example of searching for an optimal suture line.
FIG. 6 is a splice diagram of the present invention for performing an optimal suture search of FIGS. 2(a) (b).
Fig. 7(a) is a mosaic of a perception-based seam cutting method.
Fig. 7(b) is a partially enlarged view of fig. 7 (a).
Fig. 8(a) is a splicing diagram of a splicing method based on a more optimal canonical energy function.
Fig. 8(b) is a partially enlarged view of fig. 8 (a).
Detailed Description
The invention and the technical effects are explained in detail by the drawings and the concrete examples as follows:
the present embodiment provides an optimal suture line searching method for image stitching, a specific flowchart is shown in fig. 1, and the specific implementation steps are as follows:
And 3, matching the detected feature points by using a K-D tree algorithm to obtain feature point pairs.
(3a) Selecting an image I1The feature point in (1) is calculated, and the point and the image I are calculated2Selecting a nearest neighbor Euclidean distance feature point and a next nearest neighbor Euclidean distance feature point from all feature points, and respectively recording the distances as d1And d2;
(3b) Calculating d1And d2And comparing the ratio with a given threshold of 0.4;
if the ratio is less than 0.4, the feature points are considered to be correctly matched, and the feature points of the two images are matched; otherwise, it is considered as an error match.
And 4, performing characteristic point pair elimination (mismatching) on the image with the marked characteristic points by adopting a RANSAC algorithm and solving a homography matrix H.
(4a) Taking the matching point pair obtained in the step (3) as a sample set, randomly extracting 4 matching point pairs in the sample set, ensuring that any 3 points in the same image are not collinear, and calculating the current homography matrix H according to the matching point pair*;
(4b) According to the current homography matrix H*And removing mismatching matching point pairs by a remapping error method to obtain correct matching point pairs;
(4c) and calculating the optimal homography matrix H by using a least square method according to all the correct matching point pairs.
And 5, transforming the two spliced images according to the homography matrix H, and respectively recording the two transformed images as J1And J2As shown in fig. 3(a) and 3 (b).
And 6, obtaining an overlap region omega and searching for an optimal suture line.
(6a) Taking image J1And J2Obtaining an overlap region omega image as shown in fig. 4;
(6b) calculating image J1Boundary B with overlap region omega1And image J2Boundary B with overlap region omega2And the boundary B1And boundary B2The two intersections are respectively marked as S and T;
(6c) traversing all pixel points in the overlapping area, and respectively calculating the cost between each pixel point p and the pixel points q in the four adjacent areas, wherein the cost function is calculated as follows:
(1) if pixel point p or q is located at boundary B1∪B2Then, the cost between the two points is assigned to infinity;
(2) if the pixel points p and q are positioned in the same image J1Or J2If so, the cost between the two points is assigned to be 0;
(3) if the pixel points p and q are located in different images, calculating the cost V (p, q) between the two points according to the formula (3):
V(p,q)=V(p)+V(q) (3)
V(x)=[ω·||x||2+(1-ω)·||x||1]4 (4)
wherein, the weight coefficient omega in the embodiment of the invention is 0.2, | | x | | purple sweet2=||J1(x)-J2(x)||2Is L2Norm, | x | luminance1=||J1(x)-J2(x)||1Is L1And (4) norm.
(6d) Starting from the starting point S, searching the link with the minimum cost according to the cost among the pixels calculated in the step (6c) until the ending point T stops, and then the curve formed by the series of points is the optimal suture line.
FIG. 5 is an example of searching for the best stitching line, each gray circle represents a pixel, and the numbers on the lines between the gray circles are the cost between pixels calculated according to step (6 c). And starting from the point S, comparing the cost between the point S and the four-adjacent-domain pixel, and selecting the link with the minimum cost value. The thick line segments in fig. 5 represent the least costly links, and the best suture is made up of all thick line segments.
And 7, fusing the pixels of the two transformed images along the two sides of the optimal suture line by using a Poisson fusion algorithm to form a spliced image. The stitched image is shown in fig. 6.
Claims (1)
1. An optimal suture line searching method for image stitching is characterized by comprising the following steps:
(1) reading two images to be spliced, and respectively marking as I1And I2;
(2) Image I by SIFT algorithm1And I2Extracting characteristic points;
(3) matching the detected characteristic points by using a K-D tree to obtain characteristic point pairs;
(4) performing feature point pair elimination (mismatching) on the image with the marked feature points by adopting an RANSAC algorithm and solving a homography matrix H;
(5) for image I according to homography matrix H1And I2Transforming, and recording the two transformed images as J1And J2;
(6) Obtaining a coincidence region omega and searching an optimal suture line;
(6a) taking image J1And J2Obtaining an omega image of a superposition area;
(6b) calculating image J1Boundary B with overlap region omega1And image J2Boundary B with overlap region omega2And the boundary B1And boundary B2The two intersections are respectively marked as S and T;
(6c) traversing all pixel points in the overlapping area, and respectively calculating the cost between each pixel point p and the pixel points q in the four adjacent areas, wherein the cost function is calculated as follows:
(1) if pixel point p or q is located at boundary B1∪B2Then, the cost between the two points is assigned to infinity;
(2) if the pixel points p and q are positioned in the same image J1Or J2If so, the cost between the two points is assigned to be 0;
(3) if the pixel points p and q are located in different images, the cost V (p, q) between the two points is calculated according to the formula (1):
V(p,q)=V(p)+V(q) (1)
V(x)=[ω·||x||2+(1-ω)·||x||1]4 (2)
wherein, omega is a weight coefficient, omega belongs to [0,1 ]],||x||2=||J1(x)-J2(x)||2Is L2Norm, | x | luminance1=||J1(x)-J2(x)||1Is L1And (4) norm.
(6d) Starting from the starting point S, searching the link with the minimum cost according to the cost among the pixels calculated in the step (6c) until the ending point T stops, and then the curve formed by the series of points is the optimal suture line.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110381507.6A CN112907452A (en) | 2021-04-09 | 2021-04-09 | Optimal suture line searching method for image stitching |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110381507.6A CN112907452A (en) | 2021-04-09 | 2021-04-09 | Optimal suture line searching method for image stitching |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112907452A true CN112907452A (en) | 2021-06-04 |
Family
ID=76110477
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110381507.6A Pending CN112907452A (en) | 2021-04-09 | 2021-04-09 | Optimal suture line searching method for image stitching |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112907452A (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105957007A (en) * | 2016-05-05 | 2016-09-21 | 电子科技大学 | Image stitching method based on characteristic point plane similarity |
CN107146213A (en) * | 2017-05-08 | 2017-09-08 | 西安电子科技大学 | Unmanned plane image split-joint method based on suture |
US20190108615A1 (en) * | 2016-04-22 | 2019-04-11 | Cyclomedia Technology B.V. | Image Stitching Method and Device |
CN109961399A (en) * | 2019-03-15 | 2019-07-02 | 西安电子科技大学 | Optimal stitching line method for searching based on Image distance transform |
CN110033411A (en) * | 2019-04-12 | 2019-07-19 | 哈尔滨工业大学 | The efficient joining method of highway construction scene panoramic picture based on unmanned plane |
CN110349086A (en) * | 2019-07-03 | 2019-10-18 | 重庆邮电大学 | A kind of image split-joint method of non-concentric image-forming condition |
CN112365518A (en) * | 2020-12-08 | 2021-02-12 | 杭州电子科技大学 | Image splicing method based on optimal suture line self-selection area gradual-in and gradual-out algorithm |
-
2021
- 2021-04-09 CN CN202110381507.6A patent/CN112907452A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20190108615A1 (en) * | 2016-04-22 | 2019-04-11 | Cyclomedia Technology B.V. | Image Stitching Method and Device |
CN105957007A (en) * | 2016-05-05 | 2016-09-21 | 电子科技大学 | Image stitching method based on characteristic point plane similarity |
CN107146213A (en) * | 2017-05-08 | 2017-09-08 | 西安电子科技大学 | Unmanned plane image split-joint method based on suture |
CN109961399A (en) * | 2019-03-15 | 2019-07-02 | 西安电子科技大学 | Optimal stitching line method for searching based on Image distance transform |
CN110033411A (en) * | 2019-04-12 | 2019-07-19 | 哈尔滨工业大学 | The efficient joining method of highway construction scene panoramic picture based on unmanned plane |
CN110349086A (en) * | 2019-07-03 | 2019-10-18 | 重庆邮电大学 | A kind of image split-joint method of non-concentric image-forming condition |
CN112365518A (en) * | 2020-12-08 | 2021-02-12 | 杭州电子科技大学 | Image splicing method based on optimal suture line self-selection area gradual-in and gradual-out algorithm |
Non-Patent Citations (5)
Title |
---|
XIANGYAN QIU 等: "Artefact-free image stitching via a better normed seam-cutting energy function", 《IET IMAGE PROCESSING》 * |
刘雨航 等: "基于SIFT 特征提取和最佳缝合线的图像拼接技术", 《机械与电子》 * |
张帆等: "低空林地航拍图像拼接的改进缝合线算法", 《北京林业大学学报》 * |
王宇 等: "基于元素图像拼接的集成成像计算重构", 《光学学报》 * |
瞿中等: "一种消除图像拼接缝和鬼影的快速拼接算法", 《计算机科学》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104376548B (en) | A kind of quick joining method of image based on modified SURF algorithm | |
US6865289B1 (en) | Detection and removal of image occlusion errors | |
CN109961399B (en) | Optimal suture line searching method based on image distance transformation | |
Yuan et al. | Superpixel-based seamless image stitching for UAV images | |
CN106940876A (en) | A kind of quick unmanned plane merging algorithm for images based on SURF | |
CN106469444B (en) | Rapid image fusion method for eliminating splicing gap | |
US20080232715A1 (en) | Image processing apparatus | |
CN106407983A (en) | Image body identification, correction and registration method | |
CN111784576A (en) | Image splicing method based on improved ORB feature algorithm | |
CN103258321A (en) | Image stitching method | |
CN111800609B (en) | Mine roadway video splicing method based on multi-plane multi-perception suture line | |
CN112365518A (en) | Image splicing method based on optimal suture line self-selection area gradual-in and gradual-out algorithm | |
CN107194866A (en) | Reduce the image interfusion method of stitching image dislocation | |
CN111563867A (en) | Image fusion method for improving image definition | |
Attard et al. | Image mosaicing of tunnel wall images using high level features | |
JP3659426B2 (en) | Edge detection method and edge detection apparatus | |
CN110097504A (en) | A kind of image vision acquisition system for tunnel crusing robot | |
CN112907452A (en) | Optimal suture line searching method for image stitching | |
CN114241436A (en) | Lane line detection method and system for improving color space and search window | |
CN113362362A (en) | Bright field microscope panoramic image alignment algorithm based on total variation area selection | |
CN111192280B (en) | Method for detecting optic disc edge based on local feature | |
CN112308773A (en) | Unmanned aerial vehicle aerial image nondestructive amplification and splicing fusion method | |
CN111260555A (en) | Improved image splicing method based on SURF | |
CN115082314A (en) | Method for splicing optical surface defect images in step mode through self-adaptive feature extraction | |
JP2981382B2 (en) | Pattern matching method |
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 | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20210604 |