Feature extraction and classification method of space target image based on hu extended moment
By utilizing the actual linear combination features of Hu extended moments and combination coefficient vectors, the problem of feature information loss under scaling transformation of Hu moments is solved, thus achieving accurate feature extraction and classification of spatial target images.
Patent Information
- Application Number
- CN202310274429.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-17
- Publication Date
- 2026-01-20
- Estimated Expiration
- 2043-03-17
AI Technical Summary
Existing Hu moments lead to resampling under scaling changes in digital images, resulting in the loss of feature information. Furthermore, the confidence variance varies greatly after taking the absolute value, which is not conducive to feature analysis and classification.
Feature extraction is performed using Hu extended moments. By calculating the actual linear combination features of Hu extended moments and combination coefficient vectors, and combining them with confidence intervals, the dimensionality is reduced to one-dimensional features to represent the essential features of the target.
Accurately extract effective features from spatial target images, reduce feature value differences, improve classification accuracy, and achieve accurate classification of spatial targets.
Smart Images

Figure CN116258872B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of target recognition, in particular to a feature extraction and classification method of space target image based on Hu extended moment. BACKGROUND
[0002] Space targets include satellites, spaceships, rocket debris and fragments, etc. Such space targets usually orbit around the earth, and the detection, tracking, characteristic analysis and identification of such targets are one of the main tasks of space monitoring systems.
[0003] At present, when studying space targets, first, space target images are obtained based on space-based or ground-based methods, then the features of the space target images are extracted, and the targets are identified and classified based on the extracted features. In related technologies, moment features are often used to describe the statistical characteristics of space target images. Moment features can effectively reflect the shape information of the target, and have strong anti-noise performance and stability. In 1962, Hu moment was first proposed, which has translation invariance, rotation invariance and scale invariance. This invariant moment can be used for feature extraction of space target images, but in the discrete case, the scale transformation of digital images will cause resampling of the image, so that the calculated Hu moment cannot accurately reflect the features of the original target, which is easy to cause information loss of the original target. In view of this situation, researchers have modified the Hu moment and used logarithmic method for data compression in order to compare in a smaller interval range. This method takes the absolute value before taking the logarithm, considering that the invariant moment may appear negative, but the confidence variances of each moment obtained are quite different, which is not conducive to subsequent characteristic analysis and classifier design. In addition, the positive and negative of the original Hu moment represent different shape characteristics, and directly taking the absolute value may cause loss of effective information. As can be seen, the above two methods cannot well extract the effective features in the space target image, and the classification effect is poor.
[0004] Therefore, there is an urgent need for a feature extraction and classification method of space target image based on Hu extended moment to solve the above technical problems. SUMMARY
[0005] The embodiment of the present application provides a feature extraction and classification method of space target image based on Hu extended moment, which can accurately extract the effective features in the space target image and accurately classify the space target based on the extracted features.
[0006] In a first aspect, the embodiment of the present application provides a feature extraction and classification method of space target image based on Hu extended moment, comprising:
[0007] Pretreating the space target image to be processed to obtain a pretreated image;
[0008] calculating a Hu invariant of the preprocessed image;
[0009] calculating a Hu extended moment of the preprocessed image based on the Hu invariant, the Hu extended moment being used to represent feature information of the preprocessed image;
[0010] calculating actual linear combination features of the preprocessed image corresponding to each of the combination coefficient vectors based on the Hu extended moment and at least one combination coefficient vector pre-calculated, wherein each of the combination coefficient vectors is calculated based on image sets of two types of known space targets;
[0011] determining the type of the space target image to be processed based on a containing relationship between each of the actual linear combination features and a standard linear combination feature of each type of known space target pre-calculated.
[0012] In a possible design, the pre-processing of the space target image to be processed to obtain a preprocessed image comprises:
[0013] determining target boundary points of the space target image to be processed based on an edge point detection method;
[0014] determining a convex polygon based on convex hull points in the target boundary points, the convex hull points being outermost points in the target boundary points, the convex polygon being connected by the convex hull points, and the convex polygon enclosing all the boundary points;
[0015] determining a minimum circumscribed rectangle of the convex polygon, the minimum circumscribed rectangle being a rectangle circumscribed to the convex polygon and having a minimum perimeter;
[0016] rotating a target region based on parameters of the minimum circumscribed rectangle, keeping the aspect ratio unchanged, scaling the minimum circumscribed rectangle to a preset size, and obtaining a preprocessed image.
[0017] In a possible design, the calculating of the Hu invariant of the preprocessed image comprises:
[0018] defining a general moment and a central moment of the preprocessed image;
[0019] normalizing the central moment to obtain a normalized central moment;
[0020] calculating a Hu moment of the preprocessed image based on the normalized central moment.
[0021] In a possible design, an expression of the Hu extended moment is as follows:
[0022]
[0023] In the formula, sig() is a sign function, k is an integer from 1 to 7, Φ1-Φ7 are respectively seven eigenvalues of Hu moments of the preprocessed image, β1=1, β2=1 / 2, β3=β4=2 / 5, β5=1 / 5, β6=2 / 7, and β7=1 / 5.
[0024] In a possible design, each of the combination coefficient vectors is calculated based on image sets of two types of known space targets in the following manner:
[0025] For image sets of any two types of known space targets, the following operations are performed:
[0026] Hu extended moments of each image in a first image set of a first type of known space target and a second image set of a second type of known space target are respectively calculated;
[0027] Based on each of the Hu extended moments, a mean vector and a covariance matrix of the Hu extended moments of the first type of known space target and the second type of known space target are respectively calculated;
[0028] Based on the mean vector and the covariance matrix, an intra-class scatter matrix and an inter-class scatter matrix between the first type of known space target and the second type of known space target are calculated;
[0029] Based on the intra-class scatter matrix and the inter-class scatter matrix, a target function for solving a combination coefficient vector corresponding to the current two types of known space targets is constructed;
[0030] An optimal solution of the target function is solved based on a Lagrange multiplier method, to obtain the combination coefficient vector corresponding to the current two types of known space targets, wherein a product of the combination coefficient vector and a transpose thereof is equal to 1.
[0031] In a possible design, the calculation of the actual linear combination features of the preprocessed image and each of the combination coefficient vectors corresponding thereto based on the Hu extended moments and at least one combination coefficient vector pre-calculated includes:
[0032] A product of a transpose of each of the combination coefficient vectors and the Hu extended moments is respectively calculated, to obtain the actual linear combination features of the preprocessed image and each of the combination coefficient vectors corresponding thereto.
[0033] In a possible design, the confidence interval of the standard linear combination features of each type of known space target is calculated in the following manner:
[0034] Hu extended moments of each image in an image set corresponding to a current type of known space target are respectively calculated;
[0035] respectively, to obtain a linear combination feature of each image;
[0036] Based on the numerical distribution rule of each linear combination feature, the confidence interval of the standard linear combination feature of the current class of known space target is determined.
[0037] In a possible design, the determining of the category of the space target image to be processed based on the inclusion relationship between each actual linear combination feature and the confidence interval of the standard linear combination feature of each class of known space target comprises:
[0038] The closeness of each actual linear combination feature to each confidence interval is respectively determined.
[0039] The category corresponding to the confidence interval with the closest closeness is taken as the category of the space target image to be processed.
[0040] In a second aspect, an embodiment of the present application further provides a feature extraction and classification device of a space target image based on Hu extended moments, comprising:
[0041] A preprocessing module is configured to preprocess a space target image to be processed to obtain a preprocessed image.
[0042] A first calculation module is configured to calculate Hu moments of the preprocessed image.
[0043] A second calculation module is configured to calculate Hu extended moments of the preprocessed image based on the Hu moments, wherein the Hu extended moments are used to represent feature information of the preprocessed image.
[0044] A third calculation module is configured to calculate actual linear combination features of the preprocessed image corresponding to each combination coefficient vector based on the Hu extended moments and at least one combination coefficient vector calculated in advance, wherein each combination coefficient vector is calculated based on image sets of two classes of known space targets.
[0045] A determination module is configured to determine a category of the space target image to be processed based on an inclusion relationship between each actual linear combination feature and a confidence interval of a standard linear combination feature of each class of known space target calculated in advance.
[0046] In a third aspect, an embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method in any embodiment of the present application.
[0047] In a fourth aspect, the embodiments of the present application further provide a computer readable storage medium, which stores a computer program. When the computer program is executed in a computer, the computer program causes the computer to execute the method described in any of the embodiments of the present application.
[0048] The embodiments of the present application provide a feature extraction and classification method of a space target image based on Hu extended moments. The method first improves the existing Hu moments to obtain Hu extended moments. The Hu extended moments can accurately extract effective features in the space target image. The numerical differences between the seven moment features obtained by the method are small, which facilitates fitting of the features and is beneficial to distinguishing targets. Then, the linear combination features of the image are calculated based on the Hu extended moments, and the seven-dimensional features are reduced to one-dimensional features. The Hu extended moment features are reduced in dimension, which can accurately represent the essential features of the target. Finally, the linear combination features are compared with the confidence intervals of the linear combination features of known category targets, which can accurately classify the space target. BRIEF DESCRIPTION OF DRAWINGS
[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings described below are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0050] Figure 1 is a feature extraction and classification method flow chart of a space target image based on Hu extended moments provided by an embodiment of the present application;
[0051] Figure 2 is a hardware architecture diagram of an electronic device provided by an embodiment of the present application;
[0052] Figure 3 is a feature extraction and classification device structure diagram of a space target image based on Hu extended moments provided by an embodiment of the present application. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the present application.
[0054] Please refer to Figure 1The embodiment of the present application provides a feature extraction and classification method of a space target image based on Hu extended moments, comprising the following steps:
[0055] In step 100, a space target image to be processed is preprocessed to obtain a preprocessed image.
[0056] In step 102, Hu moments of the preprocessed image are calculated.
[0057] In step 104, Hu extended moments of the preprocessed image are calculated based on the Hu moments, and the Hu extended moments are used to represent feature information of the preprocessed image.
[0058] In step 106, actual linear combination features of the preprocessed image corresponding to each combination coefficient vector are calculated based on the Hu extended moments and at least one combination coefficient vector calculated in advance, wherein each combination coefficient vector is calculated based on image sets of two types of known space targets.
[0059] In step 108, the type of the space target image to be processed is determined based on a containing relationship between each actual linear combination feature and a confidence interval of a standard linear combination feature of each type of known space target calculated in advance.
[0060] The method provided by the embodiment first improves the existing Hu moments to obtain Hu extended moments, and the Hu extended moments can accurately extract effective features in the space target image, and the numerical differences between the seven moment features obtained by the method are small, which facilitates fitting of the features and is beneficial to distinguishing targets. Then, the linear combination features of the image are calculated based on the Hu extended moments, and the seven-dimensional features are reduced to one-dimensional features. By reducing the Hu extended moment features, the essential features of the target can be accurately represented. Finally, the linear combination features are compared with the confidence interval of the linear combination features of the known type of target, and the space target can be accurately classified.
[0061] The execution modes of each step are described in detail below. Figure 1
[0062] First, for step 100, the space target image to be processed is preprocessed to obtain a preprocessed image.
[0063] In this step, the space target to be processed can be a satellite, a spaceship, a rocket debris and a fragment, etc. orbiting around the earth, in order to facilitate feature extraction, the target can be preprocessed so that the target is located at the center of the image and the target fills the image area.
[0064] In some embodiments, the space target image to be processed can be preprocessed by the following steps:
[0065] A1, determining target boundary points of a target image in a space to be processed based on an edge point detection method.
[0066] In this step, the target boundary points, i.e. edge points in the image, can be detected by using the Canny algorithm to determine the boundary points of the target.
[0067] A2, determining a convex polygon based on convex hull points in the target boundary points, the convex hull points being the outermost points in the target boundary points, the convex polygon being connected by the convex hull points, and the convex polygon enclosing all the boundary points.
[0068] For any target image, the number of edge points is usually large, and only the convex hull points determine the minimum circumscribed rectangle of the target region. Therefore, the convex hull points need to be connected in sequence to form a convex polygon, and the convex polygon contains all the edge points. In this step, the Graham scan method can be used to screen the convex hull points.
[0069] A3, determining the minimum circumscribed rectangle of the convex polygon, the minimum circumscribed rectangle being a rectangle circumscribed to the convex polygon and having the smallest perimeter.
[0070] In this step, at least one side of the minimum circumscribed rectangle is collinear with the side of the convex polygon, so that the directions of all sides of the convex polygon are detected, and the parameters of the minimum circumscribed rectangle are screened.
[0071] A4, based on the parameters of the minimum circumscribed rectangle, rotating the target region while keeping the aspect ratio unchanged, scaling the minimum circumscribed rectangle to a predetermined size, and obtaining a pre-processed image.
[0072] In this step, based on the parameters of the minimum circumscribed rectangle, the target region can be rotated and scaled to a predetermined size while keeping the aspect ratio unchanged to obtain a standard gray image, i.e. a pre-processed image. In this step, the center of gravity of the pre-processed standard gray image is preferably located at the top left as much as possible, and the long side is in the width direction. The size of the standard gray image can be set as needed, such as 100x100mm.
[0073] After the above preprocessing, the target is located at the center of the image and fills the entire image area, achieving the size and position normalization of the target.
[0074] Then, for step 102, the Hu invariant of the pre-processed image is calculated.
[0075] In some embodiments, the specific calculation process is as follows:
[0076] B1, defining the ordinary moment and the central moment of the pre-processed image;
[0077] B2, normalizing the central moment to obtain a normalized central moment;
[0078] B3. Calculate the Hu moments of the pre-processed image based on the normalized central moments.
[0079] In step B1, let the size of the pre-processed image be h x w, and the pixel value at height x and width y be f(x, y), then the ordinary moments m pq of the pre-processed image are calculated as follows: pq
[0080]
[0081] where p, q = 0, 1, 2, …. and are the coordinates of the center of gravity of the pre-processed image, m 00 is the zeroth moment of the pre-processed image, which represents the sum of the gray levels of the image, 10 and m 01 are the first moments of the pre-processed image, which determine the gray center of the image.
[0082] In step B2, the normalized central moments η pq are calculated as follows:
[0083]
[0084] where is the rth power of the zeroth central moment.
[0085] In step B3, the Hu moments are composed of the combination of the second central moments and the third central moments, which remain unchanged under translation, rotation, and scaling of the image. The Hu moments include 7 statistical features, Φ1-Φ7, whose calculation formulas are as follows:
[0086] Φ1 = η 20 + η 02
[0087]
[0088] Φ3 = (η 30 - 3η 12 ) 2 + (η 03 - 3η 21 ) 2
[0089] Φ4 = (η 30 + η 12 ) 2 + (η 03 + η 21 ) 2
[0090] Φ5 = (η 30 - 3η 12 )(η 30 + η 12 )[(η 30 + η 12 ) 2 - 3(η 21 + η 03 ) 2 ]+ (η 03 - 3η 21 )(η 03 + η 21 )[(η 03 + η 21 ) 2 - 3(η 12 + η 30 ) 2 ]
[0091] Φ6 = (η 20 - η 02 )[(η 30 + η 12 ) 2 - (η 21 + η 03 ) 2 ]+ 4η 11 (η 30 + η 12 )(η 03 + η 21 )
[0092] Φ7 = (3η 21 - η 03 )(η 30 + η 12 )[(η 30 + η 12 ) 2 - 3(η 21 + η 03 ) 2 ]+ (η 30 - 3η 12 )(η 03 + η 21 )[(η 03 + η 21 ) 2 - 3(η 12 + η 30 ) 2 ]
[0093] Since steps B1 to B3 are prior art, they are not described here again.
[0094] According to the definition of the Hu moment, the seven moment features can be converted into polynomials of different order normalized central moments and zero order central moment u 00 The higher the power is, the more divergent the value is, which tends to be close to 0 or infinity. Therefore, the differences between the characteristic values of the Hu moment are large, which is not conducive to feature extraction and classification.
[0095] Based on the above problems, the present application normalizes the power and proposes a Hu extended moment.
[0096] In step 104, the expression of the Hu extended moment is:
[0097]
[0098] In the formula, sig() is a sign function, k is an integer from 1 to 7, Φ1-Φ7 are respectively the seven characteristic values of the Hu moment of the preprocessed image, β1=1, β2=1 / 2, β3=β4=2 / 5, β5=1 / 5, β6=2 / 7, and β7=1 / 5.
[0099] The differences between the seven characteristic values in the Hu extended moment are small, which can effectively represent the characteristic information of the preprocessed image and be used for image classification.
[0100] Next, for step 106, based on the Hu extended moment and at least one combination coefficient vector calculated in advance, the actual linear combination features corresponding to each combination coefficient vector of the preprocessed image are calculated, wherein each combination coefficient vector is calculated based on the image set of two known space targets.
[0101] In this step, for multiple known categories of space targets, a combination coefficient vector can be determined between each two known space targets. In some embodiments, the combination coefficient vector of each two known space targets can be calculated by the following method:
[0102] For the image set of any two known space targets, the following operations are performed:
[0103] C1, the Hu extended moment of each image in the first image set of the first known space target and the second image set of the second known space target is calculated respectively;
[0104] C2, based on each Hu extended moment, the mean vector and the covariance matrix of the Hu extended moment of the first known space target and the second known space target are calculated respectively;
[0105] C3, based on the mean vector and the covariance matrix, the intra-class scatter matrix and the inter-class scatter matrix between the first known space target and the second known space target are calculated;
[0106] C4, based on the within-class scatter matrix and the between-class scatter matrix, a target function for solving the combination coefficient vector corresponding to the current two classes of known space targets is constructed;
[0107] C5, based on the Lagrange multiplier method, the optimal solution of the target function is solved, and the combination coefficient vector corresponding to the current two classes of known space targets is obtained, wherein the product of the combination coefficient vector and its transpose is equal to 1.
[0108] For step C1, each image set of each class includes multiple images, so that the accuracy of the calculated combination coefficient vector can be improved. For example, the first class of known targets is a satellite, and the corresponding first image set is 100 images. The second class of known targets is a spaceship, and the corresponding second image set is 150 images. Then, for each image, the method provided by steps 100, 102 and 104 is used to calculate the Hu extended moment of each image.
[0109] For step C2, the calculation formulas of the mean vector and the covariance matrix of the Hu extended moment of each known space target are as follows:
[0110]
[0111] In the formula, M k is the number of images of the kth known space target, Θ k,i is the Hu extended moment feature of the ith sample of the kth known space target, is the mean vector of the kth known space target, ∑ k is the covariance matrix of the kth known space target.
[0112] For step C3, the within-class scatter matrix S w and the between-class scatter matrix S b are calculated as follows:
[0113]
[0114] In the formula, M1 is the number of images of the first class of known space targets, M2 is the number of images of the second class of known space targets, ∑1 is the covariance matrix of the first class of known space targets, ∑2 is the covariance matrix of the second class of known space targets, is the mean vector of the first class of known space targets, is the mean vector of the second class of known space targets.
[0115] For step C4, the calculation formula of the target function J(w) for solving the combination coefficient vector corresponding to the current two classes of known space targets is as follows:
[0116]
[0117] Based on the objective function, solving the combination coefficient vector can be converted into the maximization optimization problem of the above objective function.
[0118] For step C5, the Lagrange multiplier method is applied, that is, the optimal linear combination coefficient vector w of the first type of known space target and the second type of known space target can be solved by the following formula.
[0119]
[0120] In the formula, w is a vector containing 7 combination coefficients, which satisfies w T w = 1.
[0121] The above steps give the calculation process of solving the optimal linear combination coefficient vector of the first type of known space target and the second type of known space target. This method is suitable for the calculation process of the optimal linear combination coefficient vector between any two types of known space targets.
[0122] In some embodiments, based on the Hu extended moment and the at least one combination coefficient vector calculated in advance, the actual linear combination features corresponding to each combination coefficient vector of the preprocessed image are calculated, including:
[0123] The product of the transpose of each combination coefficient vector and the Hu extended moment is calculated respectively to obtain the actual linear combination features corresponding to each combination coefficient vector of the preprocessed image. The specific calculation process is as follows:
[0124]
[0125] In the formula, Θ is the Hu extended moment of the preprocessed image, w is any one of the calculated combination coefficient vectors, and w k is the kth value in the combination coefficient vector w, Θ k is the kth torch in the Hu extended moment Θ of the preprocessed image.
[0126] Through the above method, the same number of actual linear combination features as the combination coefficient vector w can be obtained, which are used for subsequent classification of the image.
[0127] Finally, for step 108, based on the inclusion relationship between each actual linear combination feature and the confidence interval of the standard linear combination feature of each type of known space target calculated in advance, the category of the space target image to be processed is determined.
[0128] In this step, the confidence interval of the standard linear combination feature of each type of known space target is calculated by the following method:
[0129] The Hu extended moment of each image in the image set corresponding to the current type of known space target is calculated respectively;
[0130] Calculate the product of each Hu extended moment and the transpose of the combination coefficient vector corresponding to the known space target of the current class, respectively, to obtain the linear combination features of each image;
[0131] Based on the numerical distribution of each linear combination feature, determine the confidence interval of the standard linear combination feature of the known space target of the current class.
[0132] For example, based on 100 images of a satellite, 100 Hu extended moments can be calculated, and based on the image set of the satellite and a spaceship, a combination coefficient vector can be calculated. Then, multiplying the 100 Hu extended moments with the transpose of the combination coefficient vector, respectively, 100 linear combination features can be obtained. The numerical values of the 100 linear combination features are mainly distributed in the range of 1.0-1.5, and thus the confidence interval of the standard linear combination feature of the satellite is 1.0-1.5.
[0133] Similarly, the confidence interval of the standard linear combination feature of the spaceship can be calculated by the above method, such as 2.0-1.4. Of course, the confidence interval of the standard linear combination feature of a rocket debris, a meteorite, and other targets can also be calculated.
[0134] In some embodiments, step 108 comprises:
[0135] Respectively, determine the closeness of each actual linear combination feature to each confidence interval;
[0136] The class corresponding to the confidence interval with the closest closeness is taken as the class of the space target image to be processed.
[0137] In this embodiment, it is assumed that there are three classes of known space targets, and the confidence interval of the standard linear combination feature of each target can be calculated by the above method, for example, the confidence interval of the standard linear combination feature of the satellite is 1.0-1.5, the confidence interval of the standard linear combination feature of the spaceship is 2.0-1.4, and the confidence interval of the standard linear combination feature of the rocket debris is 5.2-5.7. At the same time, three combination coefficient vectors are calculated for the three classes of known space targets, and then three actual linear combination features, 1.3, 1.8, and 3.7, can be calculated for the space target image to be processed. Then, comparing the three actual linear combination features with each confidence interval, respectively, it can be found that only 1.3 is located in the confidence interval of the satellite, and thus the class of the space target image to be processed is determined as the satellite.
[0138] It should be noted that the approximate categories of spatial targets within a specific time and region are known. Therefore, image sets of various common and known spatial targets can be obtained in advance for training. Then, for unknown targets appearing in the same time and region, their linear combination features can be calculated using the method of this invention, and then compared with the confidence interval obtained based on the training set to determine the category of the unknown target. If, after detection, the unknown targets do not belong to any of the aforementioned known categories, they require special attention.
[0139] After completing the above feature extraction and classification, this invention can also evaluate its linearly separable types. The specific evaluation method is as follows:
[0140] For the two types of space targets, their linear separability is evaluated using the following formula:
[0141]
[0142] In the formula, w is the optimal linear combination coefficient vector of the two types of spatial objectives, J(w) is its objective function, and S w Let S be the within-class scatter matrix of the two types of space targets. b Let be the inter-class scatter matrix of the two types of spatial targets.
[0143] The larger the value of J(w), the stronger the linear separability of the spatial target features based on the Hu extended moment, and the more accurate the description of the two types of targets by the feature vector based on the Hu extended moment.
[0144] For multiple types of space targets, their linear separability is evaluated using the following formula:
[0145]
[0146] In the formula, N is the number of space target types, i and j represent the i-th and j-th target types respectively, and M i M is the number of images of the i-th type of target. j J is the number of images of the j-th type of target. i,j This represents the optimal objective function value between the i-th and j-th objective classes.
[0147] The larger the value D, the more accurately the feature vector based on the Hu extended moment describes the image set of the multi-class spatial targets, and the better the classification effect can be achieved by the corresponding linear combination features.
[0148] like Figure 2 , Figure 3 As shown, this invention provides a feature extraction and classification device for spatial target images based on Hu extended moments. The device can be implemented in software, hardware, or a combination of both. From a hardware perspective, such as... Figure 2As shown in the figure, a hardware architecture diagram of an electronic device in which the device for feature extraction and classification of a spatial target image based on Hu extended moments is provided in the embodiment of the application. In addition to the processor, the memory, the network interface, and the non-volatile memory shown in the figure, the electronic device in which the device is located in the embodiment can also generally include other hardware, such as a forwarding chip responsible for processing packets, and the like. For example, as shown in the figure, the device for feature extraction and classification of a spatial target image based on Hu extended moments provided in the embodiment of the application includes a processor, a memory, a network interface, and a non-volatile memory. Figure 2 In addition to the processor, the memory, the network interface, and the non-volatile memory shown in the figure, the electronic device in which the device is located in the embodiment can also generally include other hardware, such as a forwarding chip responsible for processing packets, and the like. For example, as shown in the figure, the device for feature extraction and classification of a spatial target image based on Hu extended moments provided in the embodiment of the application includes a processor, a memory, a network interface, and a non-volatile memory. Figure 3 As shown in the figure, as a logically meaningful device, it is formed by reading the corresponding computer program in the non-volatile memory into the memory and running by the CPU of the electronic device in which it is located. The device for feature extraction and classification of a spatial target image based on Hu extended moments provided in the embodiment includes:
[0149] The preprocessing module 300 is configured to pre-process the spatial target image to be processed to obtain a pre-processed image.
[0150] The first calculation module 302 is configured to calculate the Hu torch of the pre-processed image.
[0151] The second calculation module 304 is configured to calculate the Hu extended moments of the pre-processed image based on the Hu torch, and the Hu extended moments are used to represent the feature information of the pre-processed image.
[0152] The third calculation module 306 is configured to calculate the actual linear combination features corresponding to each combination coefficient vector of the pre-processed image based on the Hu extended moments and at least one combination coefficient vector calculated in advance, wherein each combination coefficient vector is calculated based on the image set of two types of known spatial targets.
[0153] The determination module 308 is configured to determine the category of the spatial target image to be processed based on the inclusion relationship between each actual linear combination feature and the confidence interval of the standard linear combination feature of each type of known spatial target calculated in advance.
[0154] In the embodiment of the application, the preprocessing module 300 can be used to execute step 100 in the above-mentioned method embodiment, the first calculation module 302 can be used to execute step 102 in the above-mentioned method embodiment, the second calculation module 304 can be used to execute step 104 in the above-mentioned method embodiment, the third calculation module 306 can be used to execute step 106 in the above-mentioned method embodiment, and the determination module 308 can be used to execute step 108 in the above-mentioned method embodiment.
[0155] In some embodiments, the preprocessing module 300 is configured to perform the following operations:
[0156] Determine the target boundary point of the spatial target image to be processed based on an edge point detection method.
[0157] Determine a convex polygon based on convex hull points in the target boundary points, the convex hull points being outermost points in the target boundary points, the convex polygon being connected by the convex hull points, and the convex polygon enclosing all the boundary points;
[0158] Determine a minimum circumscribed rectangle of the convex polygon, the minimum circumscribed rectangle being a rectangle circumscribed to the convex polygon and having a minimum perimeter;
[0159] Rotate the target region based on parameters of the minimum circumscribed rectangle, keep the aspect ratio unchanged, scale the minimum circumscribed rectangle to a preset size, and obtain a preprocessed image.
[0160] In some embodiments, the first calculation module 302 is configured to perform the following operations:
[0161] Define the ordinary moment and the central moment of the preprocessed image;
[0162] Normalize the central moment to obtain a normalized central moment;
[0163] Calculate the Hu moment of the preprocessed image based on the normalized central moment.
[0164] In some embodiments, the expression of the Hu extended moment is as follows:
[0165]
[0166] In the formula, sig() is a sign function, k is an integer from 1 to 7, Φ1-Φ7 are respectively seven eigenvalues of the Hu moment of the preprocessed image, β1=1, β2=1 / 2, β3=β4=2 / 5, β5=1 / 5, β6=2 / 7, and β7=1 / 5.
[0167] In some embodiments, each combination coefficient vector is calculated based on image sets of two types of known space targets in the following manner:
[0168] For image sets of any two types of known space targets, the following operations are performed:
[0169] Calculate the Hu extended moment of each image in the first image set of the first type of known space target and the second image set of the second type of known space target, respectively;
[0170] Based on each Hu extended moment, calculate the mean vector and the covariance matrix of the Hu extended moment of the first type of known space target and the second type of known space target, respectively;
[0171] Based on the mean vector and the covariance matrix, calculate the intra-class scatter matrix and the inter-class scatter matrix between the first type of known space target and the second type of known space target;
[0172] The target function for solving the combination coefficient vector corresponding to the current two classes of known space targets is constructed based on the within-class scatter matrix and the between-class scatter matrix;
[0173] The optimal solution of the target function is solved based on the Lagrange multiplier method to obtain the combination coefficient vector corresponding to the current two classes of known space targets, wherein the product of the combination coefficient vector and its transpose is equal to 1.
[0174] In some embodiments, the third calculation module 306 is configured to perform the following operations:
[0175] The product of the transpose of each combination coefficient vector and the Hu extended matrix is calculated to obtain the actual linear combination features of the preprocessed image corresponding to each combination coefficient vector.
[0176] In some embodiments, the confidence interval of the standard linear combination features of each class of known space targets is calculated in the following manner:
[0177] The Hu extended matrix of each image in the image set corresponding to the current class of known space targets is calculated;
[0178] The product of each Hu extended matrix and the transpose of the combination coefficient vector corresponding to the current class of known space targets is calculated to obtain the linear combination features of each image;
[0179] Based on the numerical distribution of each linear combination feature, the confidence interval of the standard linear combination features of the current class of known space targets is determined.
[0180] In some embodiments, the determination module 308 is configured to perform the following operations:
[0181] The closeness of each actual linear combination feature to each confidence interval is determined;
[0182] The class corresponding to the confidence interval with the closest closeness is determined as the class of the space target image to be processed.
[0183] It can be understood that the structure of the embodiments of the present application does not constitute a specific limitation on the Hu extended matrix-based space target image feature extraction and classification device. In other embodiments of the present application, the Hu extended matrix-based space target image feature extraction and classification device can include more or fewer components than the illustration, or combine certain components, or split certain components, or different component arrangements. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.
[0184] The information interaction, execution process, and the like between the modules in the above device are based on the same concept as the method embodiments of the present application, and the specific content can be referred to the description in the method embodiments of the present application, which will not be described here.
[0185] The embodiment of the present application also provides an electronic device, comprising a memory and a processor, the memory stores a computer program, and the processor executes the computer program to realize the feature extraction and classification method of the space target image based on Hu extended moments in any embodiment of the present application.
[0186] The embodiment of the present application also provides a computer readable storage medium, the computer readable storage medium stores a computer program, and the computer program, when executed by a processor, causes the processor to execute the feature extraction and classification method of the space target image based on Hu extended moments in any embodiment of the present application.
[0187] Specifically, a system or device provided with a storage medium can be provided, the storage medium stores software program codes realizing the functions of any embodiment of the above-mentioned embodiments, and the computer (or CPU or MPU) of the system or device reads out and executes the program codes stored in the storage medium.
[0188] In this case, the program codes read from the storage medium can realize the functions of any embodiment of the above-mentioned embodiments, and thus the program codes and the storage medium storing the program codes constitute a part of the present application.
[0189] The storage medium embodiments for providing the program codes include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), magnetic tapes, nonvolatile memory cards and ROMs. Alternatively, the program codes can be downloaded from a server computer through a communication network.
[0190] In addition, it should be clear that not only the program codes read by the computer can be executed, but also the operating system and the like operating on the computer can be caused to perform part or all of the actual operations based on the instructions of the program codes, so as to realize the functions of any embodiment of the above-mentioned embodiments.
[0191] In addition, it can be understood that the program codes read from the storage medium are written into the memory provided in the expansion board inserted into the computer or the memory provided in the expansion module connected to the computer, and then part and all of the actual operations are performed based on the instructions of the program codes by the CPU and the like installed on the expansion board or the expansion module, so as to realize the functions of any embodiment of the above-mentioned embodiments.
[0192] It should be noted that, in the present document, relational terms such as first and second and the like can be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.
[0193] Those skilled in the art can understand that all or part of the steps of the above-mentioned method embodiments can be completed by program instruction related hardware, and the foregoing program can be stored in a computer readable storage medium, and the program performs the steps of the above-mentioned method embodiments when executed; and the foregoing storage medium includes various storage media that can store program codes, such as ROM, RAM, magnetic disk or optical disk.
[0194] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements for some technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for feature extraction and classification of spatial target images based on Hu extended moments, characterized in that, include: The spatial target image to be processed is preprocessed to obtain the preprocessed image; Calculate the Hu moments of the preprocessed image; Based on the Hu moments, the Hu extended moments of the preprocessed image are calculated, and the Hu extended moments are used to characterize the feature information of the preprocessed image. Based on the Hu extended moments and at least one pre-calculated combination coefficient vector, the actual linear combination features of the preprocessed image and each combination coefficient vector are calculated, wherein each combination coefficient vector is calculated based on image sets of two known spatial targets; The category of the spatial target image to be processed is determined based on the inclusion relationship between the confidence intervals of each actual linear combination feature and the pre-calculated standard linear combination features of each class of known spatial targets. The expression for the Hu extended moment is: In the formula, Let k be a sign function, where k is an integer from 1 to 7. ~ These are the seven feature values of the Hu moments of the preprocessed image. , , , , , ; Each of the aforementioned combination coefficient vectors is calculated based on image sets of two known spatial targets in the following manner: For any two sets of images containing known spatial targets, perform the following operations: Calculate the Hu spread moment for each image in the first image set of the first type of known spatial targets and the second image set of the second type of known spatial targets, respectively; Based on each Hu extended moment, the mean vector and covariance matrix of the Hu extended moments for the first type of known space targets and the second type of known space targets are calculated respectively. Based on the mean vector and the covariance matrix, calculate the intra-class scatter matrix and inter-class scatter matrix between the first class of known spatial targets and the second class of known spatial targets; Based on the intra-class scatter matrix and the inter-class scatter matrix, an objective function is constructed to solve for the combined coefficient vector corresponding to the two known spatial targets of the current class; The optimal solution of the objective function is obtained by solving the Lagrange multiplier method, which yields a combined coefficient vector corresponding to the two known spatial objectives. The product of the combined coefficient vector and its transpose is equal to 1.
2. The method according to claim 1, characterized in that, The preprocessing of the spatial target image to be processed to obtain the preprocessed image includes: The target boundary points of the spatial target image to be processed are determined based on the edge point detection method. Based on the convex hull points in the target boundary points, a convex polygon is determined. The convex hull points are the outermost points in the target boundary points. The convex polygon is formed by connecting the convex hull points and the convex polygon surrounds all boundary points. Determine the minimum bounding rectangle of the convex polygon, wherein the minimum bounding rectangle is the rectangle that is circumscribed in the convex polygon and has the smallest perimeter; Based on the parameters of the minimum bounding rectangle, the target area is rotated while maintaining the aspect ratio, and the minimum bounding rectangle is scaled to a preset size to obtain the preprocessed image.
3. The method according to claim 1, characterized in that, The calculation of the Hu moments of the preprocessed image includes: Define the ordinary moments and central moments of the preprocessed image; The central moments are normalized to obtain the normalized central moments; Based on the normalized central moments, the Hu moments of the preprocessed image are calculated.
4. The method according to claim 1, characterized in that, The step of calculating the actual linear combination features of the preprocessed image and each of the combined coefficient vectors based on the Hu extended moments and at least one pre-calculated combination coefficient vector includes: Calculate the product of the transpose of each of the combined coefficient vectors and the Hu extended moment to obtain the actual linear combination features of the preprocessed image and each of the combined coefficient vectors.
5. The method according to claim 4, characterized in that, The confidence intervals for the standard linear combination features of each class of known space targets are calculated as follows: Calculate the Hu spread moment for each image in the image set corresponding to the known spatial target of the current class; Calculate the product of each Hu extended moment and the transpose of the combination coefficient vector corresponding to the known spatial target of the current class to obtain the linear combination feature of each image; Based on the numerical distribution pattern of each linear combination feature, the confidence interval of the standard linear combination features of the known spatial targets of the current class is determined.
6. The method according to claim 1, characterized in that, The process of determining the category of the spatial target image to be processed based on the inclusion relationship between the confidence intervals of each actual linear combination feature and the pre-calculated standard linear combination features of each class of known spatial targets includes: Determine the degree of closeness between each actual linear combination feature and each confidence interval; The category corresponding to the confidence interval with the closest similarity is taken as the category of the spatial target image to be processed.
7. A feature extraction and classification device for spatial target images based on Hu extended moments, characterized in that, include: The preprocessing module is used to preprocess the spatial target image to be processed, and obtain the preprocessed image. The first calculation module is used to calculate the Hu moments of the preprocessed image; The second calculation module is used to calculate the Hu extended moment of the preprocessed image based on the Hu moment, wherein the Hu extended moment is used to characterize the feature information of the preprocessed image; The third calculation module is used to calculate the actual linear combination features of the preprocessed image and each of the combined coefficient vectors based on the Hu extended moments and at least one pre-calculated combination coefficient vector, wherein each of the combined coefficient vectors is calculated based on image sets of two known spatial targets; The determination module is used to determine the category of the spatial target image to be processed based on the inclusion relationship between the confidence intervals of each actual linear combination feature and the pre-calculated standard linear combination features of each class of known spatial targets. The expression for the Hu extended moment is: In the formula, Let k be a sign function, where k is an integer from 1 to 7. ~ These are the seven feature values of the Hu moments of the preprocessed image. , , , , , ; Each of the aforementioned combination coefficient vectors is calculated based on image sets of two known spatial targets in the following manner: For any two sets of images containing known spatial targets, perform the following operations: Calculate the Hu spread moment for each image in the first image set of the first type of known spatial targets and the second image set of the second type of known spatial targets, respectively; Based on each Hu extended moment, the mean vector and covariance matrix of the Hu extended moments for the first type of known space targets and the second type of known space targets are calculated respectively. Based on the mean vector and the covariance matrix, calculate the intra-class scatter matrix and inter-class scatter matrix between the first class of known spatial targets and the second class of known spatial targets; Based on the intra-class scatter matrix and the inter-class scatter matrix, an objective function is constructed to solve for the combined coefficient vector corresponding to the two known spatial targets of the current class; The optimal solution of the objective function is obtained by solving the Lagrange multiplier method, which yields a combined coefficient vector corresponding to the two known spatial objectives. The product of the combined coefficient vector and its transpose is equal to 1.
8. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1-6.
Citation Information
Patent Citations
A method for visual image recognition of large-class target of an unmanned ship at sea
CN109165684A
Image classification method and device, electronic equipment and storage medium
CN114519800A