Color Image Feature Matching Method Based on the Improved Firework Algorithm

An improved ORB feature point purication method has been proposed to address the problem of large feature point matching error and low image registration rate in the oriented FAST and rotated BRIEF (ORB) feature point color image matching algorithm. Pure virtual quaternions were used to represent the color image pixels in this method, and an improved FAST algorithm was used to detect the color feature points at rst. e rework algorithm has been used to divide the detected feature points into key areas, auxiliary areas, and small inuence areas, depending on the degree of attachment. e feature points of the key area and the subsidiary area are the required feature points. In order to further improve the eciency of matching the color image feature points, the rework explosion radius formula and the explosion number formula in the rework algorithm have been improved, and an improved rework algorithm is proposed. is improved algorithm puries the quaternion-represented color image feature points. For feature matching, the hamming distance was used. Experiments show that, when compared to the traditional ORB algorithm, the improved algorithm retains the key feature points of the color image with high accuracy, removes a large number of irrelevant feature points and noise points, and provides signicantly higher accuracy and eciency of color image matching.


Introduction
Image stitching [1] is an image combination method used for generating a large seamless image from a group of overlapping images by using a series of processing technologies, namely, image preprocessing [2], image registration [3], image positioning, and image fusion [4]. A di cult problem in image mosaic is image registration. At present, the methods of image registration are mainly based on the frequency domain and the time domain. In the early stage, the methods based on the frequency domain mainly used the phase correlation method for remote sensing the image mosaic [5], whereas methods based on the time domain have mainly been feature-based and region-based. However, due to a large amount of computation required, the region-based image regulation method is rarely used on an actual image mosaic. e feature-based method [6] is used by the majority of current image mosaic methods, which calculates the features between the images to obtain the corresponding transformation model and then uses this model to transform multiple images to the same coordinate system.
At present, many feature-based image registration methods are available, for example, the image registration method based on Harris corner [7], the image registration method based on the scale-invariant feature transform (SIFT) [8], the image registration method based on the speeded-up robust features (SURF) feature points [9], and the oriented FAST and rotated BRIEF (ORB) feature point matching algorithm [10]. e outstanding advantage of the ORB feature matching algorithm is that its operation speed is fast: 100 times that of the image registration method based on SIFT and 10 times that of the image registration method based on the SURF algorithm. However, because ORB feature matching necessitates a large number of feature points, the image feature point matching error is high, and the image registration rate is low. Color images are commonly used in practical applications. It would be di cult to meet the ideal requirements in terms of real-time computation and image matching accuracy using the currently available methods.
Many researchers have proposed improved algorithms [11,12]. e use of the ORB feature image matching algorithm involves direct matching, such as the nearest neighbor algorithm matching [13] or the Hamming distance. Although the nearest neighbor algorithm is fast, it results in large errors. On the other hand, when using the Hamming distance algorithm for feature point matching, many mismatches are observed because the algorithm is unable to distinguish similar regions. At present, the random sample consensus (RANSAC) algorithm [14] is the most widely used method for purifying the feature points before feature matching. e RANSAC algorithm obtains the parameters of the data model. Often, the parameters are not the best ones, and they have to be refined repeatedly. Furthermore, the efficiency of the algorithm is affected by the proportion of the interior points, the size of the subsets, the size of the datasets, and other factors. It is difficult to meet the real-time and sample variability requirements of color image matching. Some researchers have proposed improved methods [15], but their efficiency is still not high in image matching. erefore, an improved feature point purification method has been proposed in this work.
In the method proposed in this work, first, the quaternion is used for representing a color image [16,17]. Because the quaternion represents the color image, a pure virtual quaternion represents a color pixel, and each color pixel is a whole in the image matching process. is is in contrast to the traditional color image representation in terms of red, green, and blue colors and thus reduces the amount of computation. It also significantly reduces the distortion in the image conversion, operation, and other changes. Hence, based on the principle, the region with more color image feature points includes more image feature information. In recent years, with their development, metaheuristic algorithms have found applications in many fields. In a study [18], e the ant colony algorithm is used for data hiding in complex image regions. An artificial bee colony algorithm is used to diagnose Parkinson's disease using a hybrid feature selection [19]. e artificial bee colony algorithm was used for robot path planning [20], and the Cuckoo algorithm was used in image segmentation [21]. e fireworks algorithm was used in image retrieval [22]. Compared with other meta-heuristic algorithms, the fireworks algorithm shows excellent performance in optimization problems. In this article, the fireworks algorithm [23,24] has been used to solve optimization problems. However, the fireworks algorithm also has a few shortcomings. Although some scholars have proposed improved algorithms [25,26], which have been applied in material scheduling [27,28] and image fusion [29], there is still a discrepancy with the ideal requirements. In order to further improve the efficiency of feature point registration, the explosion radius and quantity of fireworks in the algorithm have been improved in this work, and the improved fireworks algorithm has been used for feature point purification and matching.

Quaternion Representation of the Color Image and Feature Point Detection Principle of the ORB Algorithm
With the continuous development of the quaternion theory, which is in contrast to the traditional color image vector synthesis representation, the algebraic structure of a quaternion can efficiently maintain the spatial correlation of the color channels and avoid the loss of color information. However, only a few studies have been done on the application of quaternion in a color image mosaic. erefore, exploring and studying the process of applying the advantages of the quaternion to the color image mosaic processing have important research value and significance. ORB is currently a classic feature point extraction and description method. is method mainly includes the oriented FAST feature point acquisition method and the rotated BRIEF feature point description method. e ORB algorithm finds key points using the oriented FAST algorithm and uses the rotated BRIEF algorithm to describe these key points as feature vectors.

Quaternion Representation of a Color
Image. e algebraic structure of a quaternion unifies the operation process of three color channels of a color image. erefore, a quaternion can be regarded as a set of independent linear bases {1, i, j, k}, forming a four-dimensional vector space in the real number field. A quaternion is defined as follows: where q 0 , q 1 , q 2 , q 3 ∈ R, and i, j, and k are three pure imaginary units. When q 0 � 0, a quaternion is called a pure imaginary quaternion. A color image contains three color channels, which can be expressed as different color spaces, such as RGB, HSV, lab, and CMY. Among them, the RGB mode is widely used in a color image representation. Suppose that the three color channels of an image are represented by three imaginary parts of a pure imaginary quaternion, with the real part set to 0. en, (1) can be written as where q 1 , q 2 , and q 3 represent the R, G, and B color channels, respectively. In (2), the color image is represented by RGB, each pixel value is a vector, its modulus represents the brightness, and its direction represents the hue and saturation of the color pixels. Furthermore, R � i + j + k is the axis of rotation, and RQR * is a pure imaginary quaternion [30].

Finding the Key Points Using the Oriented FAST Algorithm.
A color image is represented as a pure quaternion matrix in the quaternion representation. e modulus difference between a pixel and its surrounding pixels is used as the threshold in the quaternion fast corner detection method to determine whether a pixel is a corner (feature point). If a pixel, P, is taken as the center of the circle, consider that there are 16 pixels on the circumference, with a radius of 3 pixels in its 7 × 7 neighborhood. If the absolute value of the modulus difference between N consecutive pixels and the central point is greater than or less than the threshold, the pixel is identified to be a detected corner. e corner detection of a quaternion exhibits scalability and rotation [31]. However, the corner detection method does not have directionality and is difficult to adapt to the change in the image direction. erefore, it is necessary to describe the directionality of the corner because there are three expressions of a quaternion moment. However, the ability of a quaternion to describe the geometric deformation of the color image is the same. erefore, in this work, the left quaternion moment function has been used to represent the image block [32]. Let the color image be f(x, y). en, the left quaternion moment of order (m + n) is defined as follows: where µ is a pure quaternion of any unit. e quaternion centroid, C, of this image block is defined as follows [33]: where |•| represents the modulus of its corresponding quaternion moment, and M 10 and M 01 represent the firstorder color moment in the horizontal and vertical directions of the color image, respectively, M 00 represents the zerothorder moment of the quaternion, the coordinates (x 0 , y 0 ) are the centroid of the image physically, and equation (4) is the formula for calculating the centroid position of the image block. e literature [34] points out that if the quaternion moment is calculated, the origin of the coordinates should be moved to the centroid. en, the obtained feature quantity is simultaneously invariant of translation, rotation, and scaling. erefore, after the coordinate origin moves, the new coordinate point, P ′ , of the original corner point, P, can provide the feature point direction by making the quaternion vector CP ′ � m i + m j + m k , as expressed by the following formula:

Using the BRIEF Algorithm to Describe the Eigenvectors.
Feature matching can only be performed after the feature vector has described the feature points obtained in Section 2.2. e BRIEF algorithm uses a feature point as the center and describes the feature vector based on the gray value of several groups of points in a specific neighborhood range. For the modulus of two pixels in the color image point pair represented by a quaternion, if the modulus of the first pixel is greater than the latter, it is recorded as 1; otherwise, it is recorded as 0. All results are recorded to form a set of binary strings as feature descriptors. e ORB algorithm improves the feature descriptor of the BRIEF algorithm as follows: (a) First, the previous FAST algorithm is used to find the corresponding key points. e key points obtained using this method have direction, and thus, there is a clear direction angle (let it be θ). (b) e binary string in the above feature descriptor is defined as a 2n matrix, and the rotation angle is also θ. A BRIEF feature descriptor with direction is generated. (c) e greedy algorithm is used for selecting the feature descriptors with high variance and high uncorrelation.
e above method yields the ORB feature descriptor, after which the feature points are matched. e Hamming distance method is typically used to set the threshold based on the length of the feature descriptor, where the minimum is 0, and the maximum does not exceed the length of the feature descriptor. During matching, the two feature descriptor character strings to be matched are XORed bit by bit. If the number of digits of 1 in the calculation result is less than or equal to the set threshold, the two features can be matched; otherwise, they cannot be matched.

Feature Matching Algorithm of the Improved
Fireworks Algorithm e effect of feature point purification using the RANSAC algorithm is poor in the traditional ORB feature point matching method. e fireworks algorithm has not been found to be used in color image matching research in the currently available literature. In this work, the traditional fireworks algorithm has been improved and has been used to classify and purify the color image feature points based on the quaternion representation in order to further improve the accuracy and efficiency of feature point matching. Following this, feature matching is carried out.

Fireworks Algorithm.
e fireworks algorithm is a swarm intelligence algorithm, which was modeled by researchers on the fireworks explosions seen on holiday nights. Iteration times, explosion radius, explosion intensity, mapping rules, and selection strategy are all important factors affecting the algorithm's operation effect in the fireworks algorithm, with the typical factors being the explosion radius and the explosion intensity. e operation formulae are as follows: where w i represents the explosion radius (also known as the explosion amplitude) of the current fireworks x i , where i � 1,2, . . ., N, w max represents the maximum amplitude (maximum radius) of the fireworks explosion, which is a constant, f(x i ) refers to the fitness function value of the current fireworks x i , Z min represents the minimum fitness function value in the current fireworks group, where the smaller the value of f(x i ), the closer it is to Z min . As a result, the smaller the explosion radius of the fireworks, the smaller the fitness function value, and the better the effect of the algorithm.where I i represents the explosion intensity of the current fireworks (also known as the explosion number of fireworks), where i � 1,2, . . ., N, Q is a constant that represents the total number of sparks generated by N fireworks, and z max represents the maximum fitness function value in the current fireworks group, ε represents the minimum constant that any computer can represent, which is used to prevent zero error. e smaller the value of the fitness function, f(x i ), that is, the larger the value of z max -f(x i ), the more the number of fireworks generated, which is more conducive to the convergence of the algorithm.
If the z-dimensional coordinates of the d-dimensional objective function are randomly selected, the k-dimensional coordinates (k � 1, 2, 3, . . ., z) of the jth (j � 1, 2, 3, . . ., s) spark of the ith fireworks are updated as follows: where rand (-1,1) represents a random number between [-1,1]. e first n fireworks generate Q sparks. In the fireworks algorithm, the Gaussian distribution is used for generating additional Q sparks to increase the population diversity. e Gaussian variation update of the k-dimensional coordinate of the jth spark is given by where Gaussian (1,1) is a random number that obeys the Gaussian distribution, and its mean and variance are 1. After the above steps are completed, a total of P � N + Q + Q fireworks (sparks) are generated. e selection of n new sparks is made according to the roulette principle to participate in the next round of explosions. e probability of selecting the ith firework (spark) is given by where d(x i ,x j ) represents the Euclidean distance between the ith and jth fireworks or sparks. According to (11), the closer the distance, the lower the probability of being selected.

Improved Fireworks Algorithm.
e fireworks algorithm is a relatively new algorithm. Although it has obvious advantages, it also has many shortcomings. In (6), the better the quality of the fireworks (sparks), the smaller the explosion radius. is is because the fireworks (sparks) with better quality are more likely to have a global optimal solution around them, and the smaller the explosion radius, the easier it is to strengthen the nearby search. However, after the fireworks with the best quality are produced by the explosion, (6) approaches 0, which shows that the explosion radius of the fireworks with the best quality and the largest number of sparks is 0; that is, the best fireworks are copied. Without any search, it is difficult to select these sparks in the next round of explosion, according to (11), which actually reduces the possibility of searching for the optimal solution and reduces the efficiency. In this work, an explosion formula has been proposed separately for the sparks with the best quality produced by each explosion of fireworks in the process of seeking the optimal solution of the fireworks algorithm, as expressed by (12), w i � 0. In (7), when f(x i ) is close to or equal to Z max , the number of fireworks explosions, I i , is close to 1. As a result, the fireworks are far from the optimal solution and focus on the global search. However, when the number of fireworks is too small, and even only one firework is generated, it is not conducive to the global search. In order to improve the operation efficiency of the fireworks algorithm, when f(x i ) generated by each spark is close to or equal to Z max, that is I i � 1, a separate calculation formula has been proposed, which is as follows: In equation (12), t is the algebra of the explosion radius, T is the predetermined number of search iterations, w max and w min represent the predetermined maximum and minimum explosion radii, respectively. In equation (12), a new explosion radius formula with w i � 0 has been proposed, which indicates that the explosion radius gradually decreases with the increase in the number of times the explosion occurs; that is, it ensures the global search efficiency in the early stage and the local search efficiency in the later stage. In (13), s besti represents the optimal explosion spark generated by the current fireworks, and f(s besti ) represents the fitness function value of the optimal spark generated by the current fireworks explosion. e newly proposed calculation formula, given in (13), when the fireworks explosion quantity I i is close to 1, ensures that when the fireworks quantity is close to or equal to 1, the fireworks quantity will be increased dynamically, f(x i )f(s besti ) implies making the current fireworks learn from the fireworks with the best quality produced by the current fireworks explosion, expand the global search ability of the fireworks algorithm, and improve the operation efficiency of the entire algorithm.
e Q fireworks generated using the Gaussian mutation in (9) have an important impact on the efficiency of the fireworks algorithm. Gaussian mutation exhibits good performance in the local search ability but has poor global search ability. erefore, this work introduces the nonuniform mutation algorithm [35] to improve the convergence efficiency of the fireworks algorithm. e mixed nonuniform mutation Gauss formula after introducing the nonuniform mutation operator is as follows: where t is the number of iterations of the fireworks algorithm, T is the maximum number of iterations of the fireworks algorithm, and the function (t, c) is expressed as where r[0,1] is a random number, and b is a system parameter that determines the nonuniformity of variation.
Using (14) and (15), the mutation operator can be adjusted adaptively to ensure that it can search in the entire search space in the early stage of the fireworks algorithm. e search radius decreases as the algorithm progresses in order to ensure accurate positioning of the global optimal solution without escaping the current neighborhood. In the later stages of the algorithm, the nonuniform mutation algorithm may improve the Gaussian algorithm's global search ability and the positioning ability of the global optimal solution.

3.3.
e Proposed New Method of Image Feature Point Purification. In this work, after quickly judging the image feature points using an improved fast algorithm [36], each feature point is regarded as a firework, and all the feature points constitute a fireworks population. After the global and local best points of the population are obtained by the improved fireworks algorithm, centered on the optimality point (global and local optimality points), the minimum explosion radius produces the optimality points (global and local optimality points) in this iteration as the radius is taken to construct multiple key areas. For the feature points not in this area, the degree of attachment is set, and the distance between each feature point not in the key area and the center of the key area (global best point or local best point) is calculated. If the current shortest distance feature point is p i and the center of the key area closest to p i is A C , then the current area where A C is located is the affiliated area of p i . A C is the affiliated center of the current feature point, p i , the shortest distance between p i and A c is D i , and the distance between the farthest fireworks in the current key area and the center of the key area is D. e degree of attachment, BL, is expressed as follows: If (16) is satisfied, such feature points are discontinuous or fuzzy points of the image edge features, which are retained and incorporated into the attachment area. On the contrary, it is considered that the feature points are noise points and the pseudo feature points are generated by the environmental interference, which are incorporated into the small impact area. e feature points in the key area and the auxiliary area are the purified feature points obtained in this work.

e Proposed Improved Feature Matching Algorithm.
After the purification of the feature points using the algorithm described in Section 2.3, the BRIEF algorithm is used for feature description, followed by the Hamming distance for feature matching. e specific quaternion color image feature matching method based on the fireworks algorithm is as follows: (a) When initializing the fireworks population, the initial number of fireworks is set to be equal to the number of feature points calculated by the FAST algorithm; that is, a firework is used for representing a feature point and a feasible solution in the solution space. In addition, the maximum number of sparks, explosion amplitude, number of variation sparks, and other parameters are also set. (b) e fitness function value of each firework is calculated. In this algorithm, it refers to the value of the sum of squares error (SSE). e explosion radius (explosion amplitude) of each firework is calculated according to (12), and the explosion quantity (explosion intensity) of the fireworks is calculated according to (13). (c) According to (8), the front n fireworks generate q sparks, and in order to increase the population diversity, (14) is used to generate another q sparks. If the dimension position of the variation fireworks exceeds the boundary, the mapping rules are used to change to the set space. (d) Among the original, explosive, and variant fireworks in the population, the ones with the best fitness value are retained as the next-generation fireworks. In addition, n-1 fireworks are randomly selected based on the selection strategy, and a total of N fireworks constitute the next-generation fireworks population. (e) If the set accuracy or number of iterations is not met, step (b) is performed again. (f ) After convergence, the global and the local optimal feature points are taken by the algorithm as the core, and the minimum explosion radius produces the optimality points (global and local optimality points) in this iteration as the radius is taken to form multiple key areas in the neighborhood. (g) e feature points in the auxiliary area are defined according to (16). (h) e points in the small influence area are removed.

Mathematical Problems in Engineering
(i) After describing the purified feature points of the improved algorithm, the Hamming distance is used for feature matching.
In the improved algorithm, the first n fireworks generate Q sparks. When Gaussian mutation is used, another Q sparks are generated. Each generation generates about P�N + Q + Q fireworks (sparks). If the fireworks algorithm can end when the T generation reaches the predetermined goal, the time complexity of the fireworks algorithm is O(T * (N + Q + Q)). In the improved algorithm, no matter whether equations (12), (13), or (14) is used, the time complexity of the algorithm is not changed, but the efficiency of the algorithm is improved.

Experimental Results of Feature Matching Performed
Using the Improved Fireworks Algorithm. In the experiment, Windows7 was used as the system platform, with a CPU frequency of 3.7 GHz, quad-core, 4 GB memory, and video memory of DirectX 1 GB. Multiple color images were used in the experiment. Based on the color image represented by the quaternion, many experiments were carried out. e images used in the experiments were taken from the Internet and laboratory, with image sizes of 640 px × 480 px and 568 px × 758 px. e software platform used in the experiments adopted MATLAB 2014ra. In this experiment, the ORB matching method for representing color images by vector synthesis (abbreviated as VOR), the ORB matching method for representing color images by quaternions (abbreviated as QOR), and the ORB matching method for representing color images by quaternions and the fireworks algorithm is used to purify feature points [37] (abbreviated as FWA) were considered.
is work presents an ORB feature matching algorithm based on the quaternion representation of color images, and the improved fireworks algorithm is used to purify feature points (abbreviated as IFWA). e experimental results of the four algorithms were compared, where the image matching parameter scale factor was set to 1.2, and the number of pyramid layers was 8. e Harris response function was adopted, and a boundary threshold of 31 was used. e value of different attachment degree parameter BL has a certain impact on the extraction of discontinuous feature points and fuzzy feature points of the image, so it is not that the larger the attachment degree BL is, the better, nor is it that the smaller the attachment degree BL is, the better. In the actual process of image feature point extraction, BL � 2 is generally the best.
A large number of pictures were selected in this experiment. Due to the constraint of the manuscript length, only a few representative pictures have been presented in this paper, as shown in Figures 1 to 3. e experiment was divided into two parts: objective experiment and subjective experiment.
e partial images used in the experiment are shown in Figures 1 to 3.
In the objective experiment part, the four different algorithms were compared and analyzed in terms of the number of feature points extracted and the running time of the algorithm in the feature extraction experiment. e matching rate, matching time, and standard deviation of the four algorithms were compared and analyzed in the feature matching experiment. Table 1 shows a comparison of the number of feature points extracted and the running time of the four algorithms according to the standard of extracting 50, 100, 500, and 1000 feature points using the OVR algorithm. It is obvious that the number of feature points extracted and the running time of the QOR algorithm is less than that of the VOR algorithm.
is shows that after using the quaternion to represent a color image, one pixel is represented by one quaternion in the operation process of the entire algorithm, some noise points are removed, and the running time of the algorithm is reduced. e color image, like the QOR algorithm, is represented by a quaternion. e FWA algorithm outperforms the QOR algorithm in terms of experimental effect, while the IFWA algorithm extracts the fewest feature points. is demonstrates that the IFWA algorithm removes the most noise points when purifying the feature points. In terms of the running time, the IFWA algorithm has the shortest running time among the four algorithms, which also shows that the improved fireworks algorithm has the highest efficiency in purifying the feature points. It can also be seen from Table 1 that when the feature points extracted by the VOR algorithm reach more than 1000 points, the operation time of the QOR algorithm, FWA algorithm, and IFWA algorithm does not increase but decreases.
is shows that the efficiency of the fireworks algorithm with a quaternion representing a color image increases with the increase in the number of feature points. Table 2 shows the experimental results after the purification of the VOR, QOR, FWA, and IFWA algorithms. It can be seen from Table 2 that in the four cases, the IFWA algorithm uses the improved fireworks algorithm to classify and purify the image feature points based on the color image represented by the quaternion. us, its average matching accuracy is the highest, its total matching time is the least, and its standard deviation is the smallest. is also shows that the stability of the IFWA algorithm is the best in this experiment, whereas the average accuracy, total matching time, and standard deviation of the QOR algorithm and the FWA algorithm are better than those of the VOR algorithm because they use quaternions to represent color images. However, the experimental effect of the FWA algorithm outperforms that of the QOR algorithm, demonstrating that the fireworks algorithm is introduced into the ORB algorithm for feature point purification and then feature matching, which is superior to the direct use of the ORB algorithm for feature matching.
In the subjective part of this experiment, the subjective results of image feature matching by the four methods have been presented. Figures 4, 5, and 6 show the feature point matching results obtained from the VOR algorithm and QOR algorithm, the FWA algorithm, and the IFWA algorithm, respectively.
From the four feature matching results presented in Figures 4(a) and 4(d), it can be seen that the feature points in    the quaternion in Figure 4(b) is less mismatched and missing information than that shown in Figure 4(a). Although the color image represented by a quaternion, shown in Figure 4(c), is matched by the fireworks algorithm, its effect is better than the result shown in Figure 4(b). Figure 4(d) shows the results obtained from the improved fireworks algorithm based on the quaternion proposed in this work to improve ORB feature matching. From this figure, it can be seen that there are a few feature points in the entire image matching process, and the feature points are evenly distributed. Because the IFWA algorithm proposed in this work can efficiently remove unnecessary or incorrect feature points and noise points based on the quaternion representation of color images and can focus on finding the actually needed feature points, the extracted shrub and bare land features are more realistic. e experimental effect seen in Figure 4(b) is obviously better than that seen in Figure 4(a) and worse than that seen in Figure 4(c), which also proves the superiority of the improved fireworks algorithm over the traditional fireworks algorithm. From the four feature matching results shown in Figures 5(a) and 5(d), it can be seen that the feature points detected by the VOR algorithm in Figure 5(a) are too dense, with a large number of redundant and wrong feature points. Especially on the classroom window and the campus forest above, the object boundary in the image described by the extracted feature points is not obvious, and there are a few ideal feature points. Since the quaternion has been used to represent the color image in Figure 5(b), the overall effect is better than that observed in Figure 5(a). Similar to Figure 4, in Figure 5(c), the fireworks algorithm is introduced based on the quaternion to represent the color image for feature matching, and the experimental effect is observed to be better than that seen in Figure 5(b). e IFWA algorithm uses the quaternion to represent the color image and also employs the improved fireworks algorithm. us, it has the characteristics of efficient classification, as can be seen from Figure 5(d). Furthermore, the repetition of independent feature points is significantly reduced, the distribution of feature points across the entire matching graph is accurate, the obtained feature points are ideal, and the extracted feature points are consistent with the actual feature points.
From the four feature matching results shown in Figures 6(a) and 6(d), it can be seen that when the VOR algorithm is used for feature point detection and matching, as shown in Figure 6(a), there are obviously wrong feature point pairs between the treetop at the lower left and the treetop at the upper right. Similar to Figures 4 and 5, there are dense as well as overlapping feature points. Because the color comparison of stones is not obvious and there are a few trees or grass on the stone mountain, there are many wrong instances of feature point matching. e feature matching effect observed in Figure 6(b) obtained using the quaternion to represent the color image is better than that observed in Figure 6(a), and that observed in Figure 6(c) is better than that observed in Figure 6(b). Figure 6(d) shows the results obtained using the IFWA algorithm proposed in this work on the basis of the quaternion to represent the color image. e ideal feature points are effectively concentrated during feature matching, and unnecessary feature point matching is reduced. As a result, the distribution of feature point pairs is the most logical.

Summary of the Improved Algorithm.
Due to the good image feature classification ability of the improved fireworks algorithm and the overall pixel expression ability of the quaternion to represent color images, when purifying the feature points, it can efficiently extract the feature points in line with the actual situation. us, it eliminates irrelevant, redundant, and incorrect feature points while exhibiting a good feature matching effect in the case of many objects in the scene. Furthermore, it exhibits good stability and matching results when the illumination brightness changes and has an ideal effect in the actual environment.

Conclusion
In this work, aiming at the defects of image stitching based on the ORB algorithm, color images were represented by quaternions. e fireworks algorithm was implemented during the image stitching process. e VOR, QOR, FWA, and IFWA algorithms were used in the image feature point matching experiment. e results of the subjective as well as objective experiments performed in this work show that the improved fireworks algorithm based on the quaternion color image representation proposed in this work provides the best feature matching effect.

Data Availability
e underlying data supporting the results of our study can be found in the paper.

Conflicts of Interest
e authors declare that there are no conflicts of interest.