Next Article in Journal
Twist and Glide Symmetries for Helix Antenna Design and Miniaturization
Previous Article in Journal
Upper Bound of the Third Hankel Determinant for a Subclass of q-Starlike Functions
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Improved Parallax Image Stitching Algorithm Based on Feature Block

1
School of Mechanical Engineering, Shenyang Jianzhu University, Shenyang 110168, China
2
Key Laboratory of Advanced Control and Optimization for Chemical Processes, Ministry of Education, East China University of Science and Technology, Shanghai 200237, China
3
The State Key Laboratory of Rolling and Automation, Northeastern University, Shenyang 110819, China
*
Author to whom correspondence should be addressed.
Symmetry 2019, 11(3), 348; https://doi.org/10.3390/sym11030348
Submission received: 26 December 2018 / Revised: 14 February 2019 / Accepted: 27 February 2019 / Published: 7 March 2019

Abstract

:
Image stitching aims at generating high-quality panoramas with the lowest computational cost. In this paper, we present an improved parallax image-stitching algorithm using feature blocks (PIFB), which achieves a more accurate alignment and faster calculation speed. First, each image is divided into feature blocks using an improved fuzzy C-Means (FCM) algorithm, and the characteristic descriptor of each feature block is extracted using scale invariant feature transform (SIFT). The feature matching block of the reference image and the target image are matched and then determined, and the image is pre-registered using the homography calculated by the feature points in the feature block. Finally, the overlapping area is optimized to avoid ghosting and shape distortion. The improved algorithm considering pre-blocking and block stitching effectively reduced the iterative process of feature point matching and homography calculation. More importantly, the problem that the calculated homography matrix was not global has been solved. Ghosting and shape warping are significantly eliminated by re-optimizing the overlap of the image. The performance of the proposed approach is demonstrated using several challenging cases.

Graphical Abstract

1. Introduction

Stitching images is a broad intercrossing technology that is widely used in many disciplines, such as computer vision, image processing, and computer graphics, and it is widely used to obtain panorama images [1,2,3]. In recent years, it has become an active area of research in image processing technology and it plays an important role in many fields, such as minimally invasive surgical procedures, geological surveys, aerospace, and military reconnaissance [4]. At present, scale invariant feature transform (SIFT) [5] is the most popular algorithm in the field of image stitching. The features extracted by SIFT are invariant to image scale and rotation, and they are shown to provide robust matching across a substantial range of affine distortion, change in 3D viewpoint, addition of noise, and change in illumination. The stitching approaches based on this method usually estimate an optimal global homographic for each input image. A representative example is AutoStitch [6], as proposed by Brown et al., but global homographic methods work well for ideal cases when the camera translation is negligible or the scene is near planar [7,8].
Ghosting is generated when the input image has a large parallax. To achieve better stitching quality, Gao et al. assumed that the scene is composed of two predominating planes and proposed a dual homography warping (DHW) [9] model. It performs well for the specified scenes, but it cannot handle more complex conditions. Julio et al. proposed as-projective-as-possible warps (APAP) [10]. This method partitions the source image into many cell grids, and each cell grid is aligned through a homography warping that aims to be globally projective yet allows local non-projective deviations to account for violations in the assumed imaging conditions. The result is highly accurate image stitching, with significantly reduced ghosting effects. However, when dealing with two large parallax images, the homography matrix cannot handle the parallax and other techniques are needed to eliminate the ghost. Shape preserving half-projective warps (SPHP) [11] was proposed by Chang et al. This method proposed a novel parametric warp, the shape preserving half-projective warp, which is a spatial combination of a projective transformation and a similarity transformation. The projective transformation maintains good alignment in the overlapping region while the similarity transformation of the non-overlapping region keeps the original perspective of the image and reduces distortion. Fan Zhang presented a parallax-tolerant image stitching method (CPW) [12]. This method combines content-preserving and seam-driven warps, and position transform and shape distortion constraints are used to approximate the target image, which can minimize the registration error and preserve the stiffness of the scene. However, when there is a large translation and rotation between the original image and the target image, the stitching effect of the algorithm is greatly reduced owing to the limitation of the rigid constraint and blurring and ghosting occur [13,14,15].
In the existing algorithm, there are two disadvantages. First, the homography calculates feature points randomly selected from the set of feature matching points, and then it is judged whether most of the feature points satisfy the calculated homography transformation model [16,17,18]. If they are satisfied, the image is registered with this homography. If not, the matching feature points need to be re-selected to calculate the new homography. Iterations are performed through the above steps until most points satisfy the homography transformation model. A large amount of time is consumed by this method, and there is a case where the feature points are densely concentrated and the calculated homography is not global. Then, most existing methods use the SIFT method to calculate image feature points. In this algorithm, detecting and describing feature points in a full image and matching feature points are the two most time-consuming steps.
In order to solve the above problem, this study proposes an improved parallax image stitching algorithm based on feature blocks (PIFB). The picture is divided into several feature blocks through an improved fuzzy C-Means (FCM) algorithm, and the color information of the pixel and spatial distance of the pixels in the surrounding area are considered. In this method, the pixel points with common visual characteristics in the picture are effectively segmented into feature blocks. Then, feature points are detected by the SIFT algorithm based on feature blocks. The feature points in the matched feature blocks are used to calculate the global homography. The overlapping area is predetermined by feature segmentation of the image, avoiding feature point matching in non-overlapping areas. The reference image and the target image are pre-registered using a global homography, and then ghosting and shape distortion are eliminated by local optimization of the overlap region.
The remainder of this paper is organized as follows: Section 2 describes the image being segmented using an improved FCM algorithm to determine the overlap; Section 3 describes the global homography calculated using feature blocks. Section 4 describes the optimization algorithm for eliminating ghosts in overlapping parts; Section 5 demonstrates the results obtained using our approach, followed by a discussion and summary of our work in Section 6.

2. Feature Segmentation

2.1. Improved FCM Algorithm

The fuzzy C-Means (FCM) clustering algorithm was first introduced by Dunn [19] and later extended by Bezdek [20]. The algorithm is an iterative clustering method that produces an optimal partition by minimizing the weighted within group sum of the squared error objective function [21]. This method is widely used in the field of image feature segmentation in order to make better use of the position information of pixels in the image. The fuzzy local information C-Means (FLICM) [22] method is used in this article.
The objective function is defined as follows:
J m = i = 1 N k = 1 c [ u k i m x i v k 2 + G k i ]
where x i is the color value of the pixel, v k is the prototype of the center of cluster k , u k i is the degree of membership of x i in the k th cluster, N is the number of pixels, c is the number of clusters with 2 c N , and m is the weighting exponent on each fuzzy membership.
It incorporates a fuzzy factor that considers both local space and gray information into its objective function. The fuzzy factor is defined in terms of
G k i = j N i i j 1 d i j + 1 ( 1 u k j ) m x j v k 2
where v k is the prototype of the center of the cluster, d i j is the spatial Euclidean distance between pixels i and j , u k j is the degree of membership of the j th pixel in the k th cluster, and m is the weighting exponent on each fuzzy membership. The i th pixel is the center of the local window, k is the reference cluster, and the j th pixel belongs to the set of neighbors falling into a window around the i th pixel (Ni).
The two necessary conditions for J m to be at its local minimal extreme with respect to u k i and v k are obtained as follows:
u k i = 1 j = 1 c ( x i v k 2 + G k i x i v j 2 + G j i ) 1 m 1
v k = i = 1 N u k i m x i i = 1 N u k i m
It is easy to see that the factor G k i combines in a fuzzy manner the spatial and color value information. The balance between the noise and image details is automatically achieved by the fuzzy local constraints. It enhances concurrently the clustering performance by the fact that almost all the other methods perform the clustering on a precomputed image while FLICM is applied on the original image, and thus, it can avoid loss of image details to a certain extent.

2.2. Determination of Clustering Parameters

The FLICM algorithm considers the local information of the pixel, but clustering results mainly depend on the initial conditions. If the number of clusters and the cluster center are not well selected, a bad segmentation result will occur. In order to improve the versatility and generalization ability of the algorithm, a method for automatically determining the number of clusters and the center of clustering is adopted in this study. The various steps of the method described in Figure 1 will be described in detail later.
First, the image to be split is converted from the RGB color space to the CIE Lab color space. As the three components of CIE Lab have different value ranges, they should be quantized, and the process of quantization is to specify the values of each dimension component. Then, the initial cluster number and cluster center are determined according to the following steps.
Step 1: The L, a, b components need to be quantized, and representative colors are quantized as color series to generate histograms with fewer histograms. Thus, in the process of finding histogram peaks, the number of algorithm cycles and execution time are reduced. Lab histogram is obtained.
Step 2: The initial cluster number of the FLICM and the initial cluster center are automatically determined by the hill-climbing method according to the Lab histogram of the color image to be segmented.
Step 3: Taking the non-zero histogram of the color histogram as a starting point.
1: Comparing the number of current rectangular prism pixels with the number of pixels of the adjacent rectangular column.
2: If the number of pixels of the adjacent histogram column and the current histogram column are different, move to the neighboring rectangular column with a larger number of pixels to climb the mountain.
3: If the adjacent histogram has the same number of pixels as the current histogram, the next adjacent histogram is searched. If the number of pixels is still the same, repeat the search for the adjacent rectangular column until the adjacent two square columns have different numbers of pixels, and the algorithm shifts to the neighboring rectangular column with the larger number of pixels to climb the mountain.
4: Steps 1–3 are repeated until a straight column that cannot climb the mountain is found, that is, when the number of pixels of the neighboring straight column is smaller than that of the current straight column, the current histogram is a peak (i.e., a local maximum).
Step 4: Take a non-zero histogram that has not been searched as a new starting point, go to Step 3 and get another peak until all the straight columns have been searched.
Step 5: These obtained peaks are the initial cluster centers of the input image, and the total number of these peaks is the number of clusters.

2.3. Feature Segmentation

On the basis that the number of clusters and the cluster center can be automatically determined, the parts with similar features in the image are divided. The detailed steps are as follows
Step 1: The number of clusters and the cluster center are obtained through the steps of Section 2.2.
Step 2: The algorithm end threshold is set to ε , the number of iterations b = 1 , the weighted index is m , and the neighborhood window size of the pixel is w × w.
Step 3: The membership matrix u k i b is obtained through Equation (3).
Step 4: According to Equation (4), the new cluster center v k ( b + 1 ) is calculated using u k i b .
Step 5: If V ( b + 1 ) V ( b ) < ε , the algorithm ends, and the feature segmentation result is obtained; otherwise, b = b + 1 , and step 3 is performed.
Looking at image (a) of Figure 2, we can easily find several different regions of the image. If these regions with independent features can be divided before the image is stitched, the overlapping regions of the reference image and the target image can be easily determined. Image (b) shows the result of a picture being segmented. In the following sections we will describe how image stitching is done by feature segmentation.

3. Image Stitching Based on Feature Block

3.1. Feature Matching Block

By feature segmentation, the reference image and the target image are divided into different blocks, and each block is numbered as shown in Figure 3.
A new method for determining the overlapping regions of target images and reference images is used in this study. In the conventional method, feature points are detected in the full image, and in the process of matching the feature points, it is necessary to calculate the Euclidean distance of the feature points of the reference image and each feature point of the target image. However, image stitching is intended to stitch the overlapping portions of the reference image and the target image. Through the method of feature segmentation, the repeated calculation process of matching feature points is avoided, and the time complexity is reduced.
First, the feature blocks of the reference image and the target image are respectively obtained using the method outlined in the previous section and the feature points are detected by the SIFT method. Then, the number information of the feature block of the image is added to the feature points. Then, the feature matching block of each image block of the reference image is found. The detailed steps are as follows:
Step 1: The reference image I n j ( n = 1 , 2 , , n ; j = 1 , 2 , , N n ) and the target image P m j ( n = 1 , 2 , , m ; j = 1 , 2 , , N n ) are input, where n and m represent the number of feature blocks, and n j represents N n feature points in the n -th feature block.
Step 2: All feature matching points of I n j are found from the target image through the SIFT algorithm, denoted as I p j n , where p represents the feature matching block of the target image.
Step 3: The number of feature points in each p is counted, and the image block matching the most feature points is selected. This is the feature matching block to be found, and the mismatch points in other image blocks are deleted. Taking Figure 3 as an example, it is assumed to be block 1’ in the target image. It is considered that the feature block 1 of the reference image matches this block of the target image, and the mismatch points with other blocks are deleted.
It is worth noting here that as the non-overlapping area of the reference image is still likely to have a very small number of matching feature points with the overlapping area of the target image, a minimum threshold φ is set to exclude the image block of the non-overlapping area matched with the image block of the overlapping area. Block 2 of the reference image is matched with the target image, except block 1’, and the matching block is determined. The remaining feature blocks in the reference image that match the target image are found by the above method.
The overlapping portion of the reference image and the target image is determined by the method of feature block matching. In the process of feature block matching, as the already matched feature blocks are excluded one by one, the time required for feature point matching is greatly reduced. Given that there is no matching feature point in the non-overlapping portion, there is no matching feature block, and thus, the overlapping area of the reference image and the target image is determined, and the feature blocks that are matched one by one are obtained.

3.2. Global Homography

In the traditional method, the feature matching points are randomly selected from the set of feature matching points to calculate the homography, and then it is judged whether most of the feature points satisfy the desired homography transformation model. If satisfied, the desired one is used and the homography registers the image. If it is not satisfied, the matching feature points need to be re-selected to calculate the homography transformation model, and the above steps are iteratively performed until most points satisfy the homography transformation model. However, with this algorithm for randomly selecting feature matching points, it will appear that the selected feature points are too concentrated. In this case, the calculated homography is not global, and only a few points satisfy the homography transformation model. Thus, the number of iterations of the algorithm is increased.
A new method for calculating the global optimal homography is proposed in this work. The homography is calculated by feature points that are selected from different feature matching blocks. The feature matching point set P of the image is divided into M different subsets according to the feature block, that is P = P i ( i = 1 , 2 , 3 M ) . In order to ensure that the feature matching point pairs used to calculate the homography matrix are global, m feature point pairs are randomly selected from the M subsets, respectively. We find that the algorithm has a greater calculation speed and registration accuracy when the total number of feature points selected each time does not exceed 10% of the total number of matching feature points. Global homography is expressed as
( x p y p 1 ) H ( x q y q 1 )
where ( x p , y p , 1 ) T and ( x q , y q , 1 ) T are the homogeneous coordinates of a pair of feature matching points in the set P , H is homography, and H is expressed as
H = ( h 11 h 12 h 13 h 21 h 22 h 23 h 31 h 32 h 33 )
Direct linear transformation (DLT) [23] is a basic method to estimate H from feature matching points. The calculation method is shown in Reference [23]. Randomly selecting feature matching points from different feature point matching subsets at random k times, we can calculate k global homography H . Through experiments, we find that when k is between 10 and 15, the calculated homography has not only local but also global optimality.
Owing to misregistration, ghosting and other issues occur in overlapping areas. This study directly uses the overall registration of overlapping areas as a measure of splicing quality. We use the evaluation indicators proposed in the literature [24] to measure the quality of registration. The energy function is constructed by the normalized cross correlation (NCC) algorithm to represent the quality of registration. The smaller the energy value between image blocks, the higher the registration quality.
The overlapping between the reference image and the target image is determined according to the feature matching block in this algorithm, the non-overlapping region is deleted, and only the registration quality of the overlapping image block is calculated. Calculating the matching quality of the non-overlapping and overlapping regions of the image and the non-overlapping and non-overlapping regions is avoided here, which reduces the amount of calculation and error.

4. Local Adjustment Based on Grid Optimization

After pre-registering the reference image and the target image with the optimal global homography, it is necessary to optimize the alignment of the overlapping regions of the image, however, the unconstrained local alignment optimization will cause distortion and ghosting of the stitched image. Thus, based on the global pre-registration, the image is first meshed and then the local homography constraint, the local similarity constraint, and the global similarity constraint are introduced into the constructed energy function for mesh optimization.
Then, the total energy function is defined by
E ( V ) = E L H ( V ) + λ L S E L S ( V ) + λ G S E G S ( V )
where these three terms address the local homography, local similarity, and global similarity constraints. The set of vertices to be optimized is expressed as V = { v ^ j ( i ) } , ( i = 1 , 2 , , n , j = 1 , 2 , m i ) , where v ^ j ( i ) is a 2D coordinate point. It indicates the optimized position of the j-th mesh vertex of the i-th image on the canvas, and its position on the original image is represented as v j ( i ) without a top mark. λ L S and λ G S are the adjustment weights of local and global similarities, respectively.

4.1. Local Homography Constraint

After the global optimal homography matrix transformation, the target image needs to be well aligned to the reference image. It is necessary to find a local optimal mesh transformation model that can move the feature points of the transformed target image to the feature point of the matched reference image. The local homography function is defined by
E L H ( V ) = ( i , j ) L ( p , q ) M i j | p ^ q ^ | 2 2
where p ^ and q ^ respectively represent the projection coordinates of the p and q feature point pairs on the canvas, and the projections of the matching feature points on the canvas are aligned by the optimization cost | p ^ q ^ | . ( i , j ) L means that I i and I j are a pair of registration pictures and ( p , q ) M i j represents that p and q are a pair of matching feature point pairs in the feature point pair set M i j , obtained by performing feature matching from the picture I i to the picture I j . Therefore, a local homography constraint optimization can also be called an alignment.
The target to be optimized comprises the mesh vertices, not the feature points. Thus, as shown in Figure 4, the feature points are expressed as a bilateral linear combination of the four vertices of their mesh: p = k = 1 4 α k v k , where α k ( k = 1 , 2 , 3 , 4 ) represents the proportion of the area occupied by each one. For example, the closer p is to v 2 and away from v 3 , the larger α 2 and the smaller α 3 . The transformed feature points are expressed as p ^ = k = 1 4 α k v ^ k , where the αk (k = 1,2,3,4) transform remains unchanged.

4.2. Local Similarity Constraint

The role of the local similarity constraint is to ensure that each geometry transforms the geometric transformation of the overlapping region mesh over the entire mesh to ensure the continuity of the mesh transformation. The local similarity constraint function is defined by
E L S ( V ) = i = 1 n ( j , k ) E i | s j k ( i ) ( v k ( i ) v j ( i ) ) ( v ^ k ( i ) v ^ j ( i ) ) | 2 2
where the optimization cost | s j k ( i ) ( v k ( i ) v j ( i ) ) ( v ^ k ( i ) v ^ j ( i ) ) | indicates that the directed mesh edge vector ( v k ( i ) v j ( i ) ) should be aligned with the corresponding directed mesh edge vector ( v ^ k ( i ) v ^ j ( i ) ) on the canvas after passing through the local similarity transformation s j k ( i ) , s j k ( i ) represents the local similarity matrix, E i represents the set of mesh edges on image I i , and ( j , k ) E i denotes that vertices v j ( i ) and v k ( i ) are the two vertices of the edge of the mesh.
According to the APAP method, the first column basis vector ( c j k ( i ) , s j k ( i ) ) T of s j k ( i ) can be expressed here as a combination of several vertices of the mesh edge ( j , k ) field. The local similarity s j k ( i ) is defined as the following formula:
s j k ( i ) = arg   min t = 1 6 | s ( v * t ( i ) 1 2 ( v j ( i ) + v k ( i ) ) ) ( v ^ * t ( i ) 1 2 ( v ^ j ( i ) + v ^ k ( i ) ) ) | 2 2
where, v * t ( i ) ( t = 1 , 2 , 6 ) and v ^ * t ( i ) ( t = 1 , 2 , 6 ) respectively represent the six vertices of the hexagon in which the mesh edge ( j , k ) is located, as shown in Figure 5. The optimization cost means that the local similarity transformation with the center point of the mesh edge as the origin should maintain the shape structure of the local hexagon as much as possible.
Equation (10) can be solved by referring to the DLT method in the APAP algorithm.

4.3. Global Similarity Constraint

The role of the global similarity is that the mesh controlling the non-overlapping region is dominated by the global similarity transformation, while the mesh of the overlapping region is dominated by the alignment. This ensures that the overlapping regions can be fully aligned, and the non-overlapping region can try to ensure a similar transformation to reduce the projection distortion. The global similarity constraint function is defined by
E G S = i = 1 n ( j , k ) E i ( ω j k ( i ) ) 2 | ( v ^ k ( i ) v ^ j ( i ) ) s i ( v k ( i ) v j ( i ) ) | 2 2
where s i is obtained by the natural image stitching with the Global Similarity Prior (GSP) [25] method. The global similarity is controlled by ω j k ( i ) = d j k ( i ) + β through the distance d j k ( i ) between the edge of the mesh and the overlapping region, and the adjustment amount β . As the edge d j k ( i ) = 0 in the overlapping region, the d j k ( i ) of the non-overlapping region becomes larger as it goes away from the overlapping region. Therefore, it can be realized that the alignment ability of local homography and local similarity is more important in the overlapping region, and the global homography is more important in the non-overlapping region.

4.4. The Energy Function Is Solved

The energy function is defined by the grid vertex set coordinates and each constraint function.
E ( V ) = E L H ( V ) + λ L S E L S ( V ) + λ G S E G S ( V )
Minimized results can be obtained by solving this sparse linear equation. λ L S and λ G S are two proportional parameters that are used to adjust the proportion of optimization, and here λ L S = 0.5 and λ G S = 20 . All the items to be optimized are stored with a sparse matrix, the energy error is minimized by least squares, and the optimal vertex set V is calculated. Finally, image mapping and pixel fusion are completed according to the obtained grid vertex coordinates.
Figure 6 shows the step-by-step process of the proposed algorithm.

5. Experiments

We compared our method with three other methods, AutoStitch, APAP, and CPW. The experiments were performed on a Windows 10 system with a 3.6 GHz CPU and 16 GB of RAM. The grid size was 40 × 40 for the mesh-based methods. The parameters involved in this study were as follows: the time window of FLICM was 3 × 3, the stacking threshold of FLICM was ε = 0.001 , the weighting index of FLICM was m = 2 , and the number of global homography matrices was k = 15 . We tested the four methods on a large number of images. Four sets of images with increasing parallax were selected. There were lines and curves in these images, containing common scenes such as trees, buildings, cars, and squares.
The first experiment named School is shown in Figure 7. We first tested the performance of the algorithm using two images with a small parallax. In this figure, images (a) and (b) are the two images be stitched, (c) is the result of AutoStitch, (d) is the result of APAP, (e) is the result of CPW, and (f) is the result of PIFB. Observing the experimental results, we found that when the image disparity is relatively small, these algorithms can handle the image very well. Only a small part is not aligned, and the unaligned part is emphasized by the red wireframe and enlarged.
The second experiment named Temple is shown in Figure 8. The image parallax is increased. In this figure, images (a) and (b) are the images be stitched, (c) is the result of AutoStitch, (d) is the result of APAP, (e) is the result of CPW, and (f) is the result of PIFB. Observing the experimental results, through AutoStitch, although the images are well stitched together, we still find stitching errors in the detail texture, and the parts that are not aligned are marked by the red wireframe. The APAP algorithm makes the images well aligned by local alignment, but there are still misregistrations in some details. As the CPW algorithm only uses local alignment and similar transformation constraints, ghosting occurs in the stitching result because the constraints between the global grid blocks are not considered. However, with the algorithm (PIFB) proposed in this study, the images are pre-blocked and then aligned, and global similarities and local similarities are considered, hence, it can better eliminate ghosting and shape distortion.
The third experiment named Building is shown in Figure 9. The parallax of the picture is further increased. In this figure, images (a) and (b) are the two pictures to be stitched, (c) is the result of AutoStitch, (d) is the result of APAP, (e) is the result of CPW, and (f) is the result of PIFB. Observing the experimental results, through AutoStitch, although the images are well stitched together, we still find stitching errors in the detail texture, and the parts that are not aligned are marked by the red wireframe. Although the AutoStitch algorithm has performed very well, there are still parts that are not aligned, such as the chair highlighted by the red wireframe. The APAP algorithm makes aligns the images well by local alignment, but there are still misregistrations in some details. The CPW algorithm uses local and similar alignment, but unaligned railings still appear in the image. However, with the algorithm (PIFB) proposed in this study, the images are pre-blocked and then aligned, and global similarities and local similarities are considered so it can better eliminate ghosting and shape distortion.
The last experiment, named Square, is shown in Figure 10. Very large parallax images are used to test the stability of the algorithm. In this figure, images (a) and (b) are the two images to be stitched, (c) is the result of AutoStitch, (d) is the result of APAP, (e) is the result of CPW, and (f) is the result of PIFB. Observing the experimental results, AutoStitch does not have the ability to stitch effectively, and the parts that are not aligned are marked by the red wireframe. The APAP algorithm is still not satisfactory in the processing of details. The CPW algorithm deals with large parallax pictures and due to the global similarity constraints, large-scale ghosts appear in the registration results. However, with the algorithm (PIFB) proposed in this study, the images are pre-blocked and then aligned, and global and local similarities are considered, and therefore, some stability is still obtained with the challenge of a large parallax.
In the visual representation of the picture stitching results, the algorithm proposed in this work has good stability and the ability to stitch large parallax pictures. In terms of the objective evaluation, the root mean square error used by the APAP algorithm is used as the registration criterion to measure the objective index of each algorithm. The calculation formula is
R M S E ( f ) = 1 N i = 1 N f ( x i ) x i 2
where f is the transformation relationship between the two images and { x i , x i } i = 1 N is the matched feature point pair. The RMSE represents the difference between the two, and the smaller the RMSE value is, the better the result of image stitching. As the commercial software AutoStitch cannot calculate its RMSE, this study only takes into account the RMSE values of several commonly used algorithms. The RMSE of the different images is the average of ten calculations, and the details are presented in Table 1.
Table 1 shows that the CPW algorithm has a poor stitching effect; although it takes the shortest time, its RMSE is the largest. Compared with the CPW algorithm, the APAP algorithm has a significantly reduced RMSE, but the time consumption is significantly greater. Compared with the CPW algorithm, the proposed algorithm has an increase in time consumption because the feature segmentation performed before stitching consumes a certain amount of time, but the RMSE value decreases significantly and the stitching effect is greatly enhanced. Compared with the APAP algorithm, the RMSE value and time consumption are substantially reduced. In summary, the proposed algorithm dominates the stitching effect, and even though the stitching effect is greatly improved, the computing time it needs is less than that of APAP and only a little higher than that of CPW. Although the RMSE value of the AutoStitch algorithm cannot be compared in Table 1, we can see from Figure 10 that as the parallax increases, the stitching performance of the AutoStitch algorithm decreases significantly. Thus, the running time does not represent the advantage of the AutoStitch algorithm. Therefore, through a comprehensive comparison, the proposed algorithm is advantageous.

6. Conclusions

An effective and efficient image stitching method based on feature blocks is proposed in this study. First, each image will be divided into feature blocks using an improved FCM algorithm, and the feature block information is added to the SIFT descriptor. Image stitching is a process of splicing a group of pictures with overlapping parts into a panoramic picture, and the splicing of overlapping parts involves merging areas with the same features in this part. Therefore, the overlapping area of the picture can be quickly determined by dividing the picture into different feature blocks with independent attributes. Second, the homography is globalized by the feature block to calculate the homography between the reference image and the target image, and the image is pre-registered through this homography. Finally, the local homography constraint, the local similarity constraint, and the global similarity constraint are introduced into the constructed energy function for mesh optimization, and the ghost and distortion of the overlap are eliminated. The stitching quality, flexibility, and computational efficiency of our method are carefully evaluated by several comparative experiments on a series of challenging cases. Our future work will concentrate on more robust occlusion handling and improved stitching speed.

Author Contributions

Authors S.H. and L.G. conceived and designed the model for research and pre-processed and analyzed the data and the obtained inference. Authors S.T. and L.G. processed the data collected and wrote the paper. Authors G.L. and J.S. checked and edited the manuscript. The final manuscript has been read and approved by all authors.

Funding

This research was funded by The National Natural Science Foundation of China, grant number 51705341, 51675353. The National Key R&D Program of China, grant number 2017YFC0703903. The Open Research Fund from the State Key Laboratory of Rolling and Automation, Northeastern University, grant number 2018RALKFKT007.

Acknowledgments

The authors are grateful to the editors and the anonymous reviewers for providing us with insightful comments and suggestions throughout the revision process.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Gaddam, V.R.; Riegler, M.; Eg, R.; Griwodz, C.; Halvorsen, P. Tiling in Interactive Panoramic Video: Approaches and Evaluation. IEEE T. Multimed. 2016, 18, 1819–1831. [Google Scholar] [CrossRef]
  2. Kasahara, S.; Nagai, S.; Rekimoto, J. JackIn Head: Immersive Visual Telepresence System with Omnidirectional Wearable Camera. IEEE Trans. Vis. Comput. Graph. 2017, 23, 1222–1234. [Google Scholar] [CrossRef] [PubMed]
  3. Anderson, R.; Gallup, D.; Barron, J.T.; Kontkanen, J.; Snavely, N.; Hernandez, C.; Agarwal, S.; Seitz, S.M. Jump: Virtual Reality Video. Acm T. Graph. 2016, 35, 198. [Google Scholar] [CrossRef]
  4. Szeliski, R. Image Alignment and Stitching: A Tutorial. Found. Trends Comput. Graph. Vis. 2007, 2, 1–104. [Google Scholar] [CrossRef]
  5. Lowe, D.G. Distinctive image features from scale-invariant keypoints. Int. J. Comput. Vis. 2004, 60, 91–110. [Google Scholar] [CrossRef]
  6. Brown, M.; Lowe, D.G. Automatic panoramic image stitching using invariant features. Int. J. Comput. Vis. 2007, 74, 59–73. [Google Scholar] [CrossRef]
  7. Kopf, J.; Uyttendaele, M.; Deussen, O.; Cohen, M.F. Capturing and viewing gigapixel images. ACM Trans. Graph. (TOG) 2007, 26, 93. [Google Scholar] [CrossRef]
  8. Zhu, Z.; Riseman, E.M.; Hanson, A.R. Parallel-perspective stereo mosaics. In Proceedings of the Eighth IEEE International Conference on Computer Vision, Vancouver, BC, Canada, 7–14 July 2001; Volume 341, pp. 345–352. [Google Scholar]
  9. Gao, J.; Kim, S.J.; Brown, M.S. Constructing image panoramas using dual-homography warping. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Colorado Springs, CO, USA, 20–25 June 2011; pp. 49–56. [Google Scholar]
  10. Zaragoza, J.; Chin, T.J.; Tran, Q.H.; Brown, M.S.; Suter, D. As-Projective-As-Possible Image Stitching with Moving DLT. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Portland, OR, USA, 25–27 June 2013; pp. 2339–2346. [Google Scholar]
  11. Chang, C.H.; Sato, Y.; Chuang, Y.Y. Shape-Preserving Half-Projective Warps for Image Stitching. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Columbus, OH, USA, 24-27 June 2014; pp. 3254–3261. [Google Scholar]
  12. Zhang, F.; Liu, F. Parallax-Tolerant Image Stitching. In Proceedings of the IEEE Conference on Computer Vision & Pattern Recognition, Columbus, OH, USA, 24–27 June 2014; pp. 3262–3269. [Google Scholar]
  13. Chen, Y.S.; Chuang, Y.Y. Natural Image Stitching with the Global Similarity Prior. In Proceedings of the European Conference on Computer Vision, Amsterdam, The Netherlands, 8–16 October 2016; pp. 186–201. [Google Scholar]
  14. Zhu, Z.; Lu, J.; Zhang, S.; Martin, R.; Liu, H.; Hu, S. A Comparative Study of Algorithms for Realtime Panoramic Video Blending. IEEE Trans. Image Process. 2018, 27, 2952–2965. [Google Scholar] [CrossRef] [PubMed]
  15. Chen, J.; Li, N.; Liao, T. Graph-Based Hypothesis Generation for Parallax-Tolerant Image Stitching. arXiv, 2018; arXiv:1804.07492. [Google Scholar]
  16. Li, W.; Jin, C.B.; Liu, M.; Kim, H.; Cui, X. Local Similarity Refinement of Shape-Preserved Warping for Parallax-Tolerant Image Stitching. IET Image Process. 2018, 12, 661–668. [Google Scholar] [CrossRef]
  17. Li, J.; Wang, Z.; Lai, S.; Zhai, Y.; Zhang, M. Parallax-Tolerant Image Stitching Based on Robust Elastic Warping. IEEE Trans. Multimed. 2018, 20, 1672–1687. [Google Scholar] [CrossRef]
  18. Xiang, T.Z.; Xia, G.S.; Bai, X.; Zhang, L. Image Stitching by Line-guided Local Warping with Global Similarity Constraint. Pattern Recognit. 2017, 83, 481–497. [Google Scholar] [CrossRef]
  19. Dunn, J.C. A fuzzy relative of the ISODATA Process and Its Use in Detecting Compact Well-Separated Clusters. J. Cybern. 1973, 3, 32–57. [Google Scholar] [CrossRef]
  20. Bezdek, J.C. Pattern Recognition with Fuzzy Objective Function Algorithms. Adv. Appl. Pattern Recognit. 1981, 22, 203–239. [Google Scholar]
  21. Zheng, J.; Zhang, D.; Huang, K.; Sun, Y. Adaptive image segmentation method based on the fuzzy c-means with spatial information. IET Image Process. 2018, 12, 785–792. [Google Scholar] [CrossRef]
  22. Krinidis, S.; Chatzis, V. A robust fuzzy local information C-Means clustering algorithm. IEEE Trans. Image Process. A Publ. IEEE Signal Process. Soc. 2010, 19, 1328. [Google Scholar] [CrossRef] [PubMed]
  23. Zhang, Z. Parameter estimation techniques: A tutorial with application to conic fitting. Water Res. 1997, 39, 3686–3696. [Google Scholar] [CrossRef]
  24. Zhao, F.; Huang, Q.; Gao, W. Image Matching by Normalized Cross-Correlation. In Proceedings of the IEEE International Conference on Acoustics, Toulouse, France, 14–19 May 2006. [Google Scholar]
  25. Chen, Y.S.; Chuang, Y.Y. Natural Image Stitching with the Global Similarity Prior; Springer: Cham, Switzerland, 2016. [Google Scholar]
Figure 1. Adaptive feature segmentation method.
Figure 1. Adaptive feature segmentation method.
Symmetry 11 00348 g001
Figure 2. Image is divided into feature blocks: (a) original image; (b) segmented image.
Figure 2. Image is divided into feature blocks: (a) original image; (b) segmented image.
Symmetry 11 00348 g002
Figure 3. Feature matching block.
Figure 3. Feature matching block.
Symmetry 11 00348 g003
Figure 4. Expression of feature point combination.
Figure 4. Expression of feature point combination.
Symmetry 11 00348 g004
Figure 5. Local similarity of mesh edges.
Figure 5. Local similarity of mesh edges.
Symmetry 11 00348 g005
Figure 6. Flow chart of image stitching.
Figure 6. Flow chart of image stitching.
Symmetry 11 00348 g006
Figure 7. Qualitative comparisons of the School data sets. (a) Reference image; (b) target image; (c) result of AutoStitch; (d) result of APAP; (e) result of CPW; (f) result of PIFB.
Figure 7. Qualitative comparisons of the School data sets. (a) Reference image; (b) target image; (c) result of AutoStitch; (d) result of APAP; (e) result of CPW; (f) result of PIFB.
Symmetry 11 00348 g007aSymmetry 11 00348 g007bSymmetry 11 00348 g007c
Figure 8. Qualitative comparisons of Temple. (a) Reference image; (b) target image; (c) result of AutoStitch; (d) result of APAP; (e) result of CPW; (f) results of PIFB.
Figure 8. Qualitative comparisons of Temple. (a) Reference image; (b) target image; (c) result of AutoStitch; (d) result of APAP; (e) result of CPW; (f) results of PIFB.
Symmetry 11 00348 g008aSymmetry 11 00348 g008b
Figure 9. Qualitative comparisons of Building. (a) Reference image; (b) target image; (c) result of AutoStitch; (d) result of APAP; (e) result of CPW; (f) result of PIFB.
Figure 9. Qualitative comparisons of Building. (a) Reference image; (b) target image; (c) result of AutoStitch; (d) result of APAP; (e) result of CPW; (f) result of PIFB.
Symmetry 11 00348 g009aSymmetry 11 00348 g009b
Figure 10. Qualitative comparisons of Square. (a) Reference image; (b) target image; (c) result of AutoStitch; (d) result of APAP; (e) result of CPW; (f) result of PIFB.
Figure 10. Qualitative comparisons of Square. (a) Reference image; (b) target image; (c) result of AutoStitch; (d) result of APAP; (e) result of CPW; (f) result of PIFB.
Symmetry 11 00348 g010aSymmetry 11 00348 g010bSymmetry 11 00348 g010c
Table 1. RMSE and time-consuming comparison of different algorithms.
Table 1. RMSE and time-consuming comparison of different algorithms.
AlgorithmsSchoolTempleBuildingSquare
RMSETime/sRMSETime/sRMSETime/sRMSETime/s
AutoStitch 5.122 3.86 9.996 10.32
APAP15.2218.52111.1258.06615.96516.47012.10219.012
CPW16.6217.35115.8016.12516.02115.33215.91617.256
PIFB15.3568.4238.8958.03612.22718.0219.65318.995

Share and Cite

MDPI and ACS Style

Shi, H.; Guo, L.; Tan, S.; Li, G.; Sun, J. Improved Parallax Image Stitching Algorithm Based on Feature Block. Symmetry 2019, 11, 348. https://doi.org/10.3390/sym11030348

AMA Style

Shi H, Guo L, Tan S, Li G, Sun J. Improved Parallax Image Stitching Algorithm Based on Feature Block. Symmetry. 2019; 11(3):348. https://doi.org/10.3390/sym11030348

Chicago/Turabian Style

Shi, Huaitao, Lei Guo, Shuai Tan, Gang Li, and Jie Sun. 2019. "Improved Parallax Image Stitching Algorithm Based on Feature Block" Symmetry 11, no. 3: 348. https://doi.org/10.3390/sym11030348

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop