Feature extraction method of bogie logo image based on multi-view intensity domain and frequency domain fusion
By collecting images in the viewing angle range of 45-135 degrees and combining Harris corner detection and Laplacian extreme value detection, combined with intensity domain and frequency domain feature fusion, the inaccuracy and low efficiency of feature extraction caused by changes in image viewing angles are solved. problem, achieving high-precision and high-efficiency image feature extraction.
Patent Information
- Application Number
- CN202111247210.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-26
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2041-10-26
AI Technical Summary
Existing image feature extraction methods are inaccurate and inefficient when facing changes in image viewing angle, and cannot effectively overcome the difficulty of feature point matching caused by rotation, displacement, and brightness changes.
A bogie logo image feature extraction method that integrates multi-view intensity domain and frequency domain is adopted. By collecting images in the viewing angle range of 45-135 degrees, Harris corner point detection and Laplacian extreme value detection are performed, combining intensity domain and frequency domain. Domain feature fusion constructs regional descriptors to improve the accuracy and efficiency of feature extraction.
It effectively improves the accuracy and efficiency of image feature extraction, reduces the impact of viewing angle changes on feature extraction, enhances the texture feature description ability of regional descriptors, and improves the accuracy of image matching.
Smart Images

Figure CN113963174B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of image processing technology, and relates to the image processing technology of rail vehicles, and specifically, to a bogie identification image feature extraction method by fusing multi-view intensity domain and frequency domain. Background Art
[0002] Image feature extraction is an important part of image processing and graphic recognition. In image recognition, image matching and image correction processing, the corresponding feature points are found through regional feature extraction and regional descriptors, and then image depth processing is performed. However, the images obtained during image processing usually have changes such as rotation, displacement, brightness or perspective. If these changes are to be overcome and the matching of feature points is to be accurately found, it is necessary to extract strong features from the range of interest around the feature points to construct a regional descriptor with stable descriptive properties, and find the matching image feature points through the regional descriptor to achieve image feature extraction. At present, the commonly used image feature extraction method is the scale-invariant feature transformation algorithm (abbreviated as: SIFT), which has a good regional descriptor for feature point extraction matching, but it has the disadvantages of complex feature calculation, high dimensionality and slow speed. In response to this problem, scholars at home and abroad have conducted a series of studies and proposed image feature extraction methods such as PCA-SIFT algorithm, GLOH algorithm, LBP algorithm, CS-LBP algorithm, etc. Among them: PCA-SIFT algorithm reduces the feature dimension through PCA to improve the disadvantage of SIFT algorithm in slow feature point matching. However, compared with SIFT algorithm, the matching effect of PCA-SIFT algorithm is not as good as that of SIFT algorithm, and there is a disadvantage of poor matching effect. GLOH algorithm is an improved version of SIFT algorithm in terms of performance. It can extract more detailed feature information, and then use PCA to reduce the feature dimension to the same as SIFT algorithm. It is better than SIFT algorithm in matching effect, but its disadvantage is that it takes more time to calculate features and the feature extraction efficiency is low. LBP algorithm is mainly used in face recognition, background extraction and other technologies. This algorithm requires a relatively high dimension to record image features and is not suitable for constructing regional descriptors based on feature points. CS-LBP algorithm records image features by changing the LBP calculation feature, which reduces the dimension of the constructed feature vector a lot, but still requires a lot of dimensions to record features, which is also not suitable for the description of feature points. Summary of the invention
[0003] In view of the above-mentioned problems of inaccurate image feature extraction and low extraction efficiency in the prior art, the present invention provides a bogie identification image feature extraction method that fuses multi-perspective intensity domain and frequency domain, which can solve the problem of inaccurate image feature extraction caused by large changes in image perspective, improve the image feature extraction accuracy, and have high extraction efficiency.
[0004] In order to achieve the above object, the present invention provides a bogie identification image feature extraction method by fusing multi-view intensity domain and frequency domain, and the specific steps are as follows:
[0005] Image acquisition steps: select any three angles from the front of the marked side of the bogie component within the viewing angle range of 45-135 degrees to collect images of different scales;
[0006] Image feature point detection steps: Perform Harris corner point detection on images of different scales to find candidate feature points in the image, perform Laplace extreme value detection on the candidate feature points, and find the maximum value among the candidate feature points after extreme value detection as the final image feature point;
[0007] Steps for constructing the region descriptor: Calculate the orientation of the image feature points, and rotate the image block centered on the image feature points based on the main direction of the image feature points to make it consistent with the main direction of the image feature points. On the rotated image block, construct the region descriptor by fusing the intensity domain features with the frequency domain features.
[0008] Image feature description step: The intensity domain and frequency domain are fused and matched to complete the image feature extraction.
[0009] Preferably, in the image feature point detection step, the specific steps of performing Harris corner point detection on images of different scales are:
[0010] Perform Gaussian blur on the image to obtain a Gaussian blurred image;
[0011] With standard deviation σ = 1.5, on a scale of s n =σ n Harris corner detection is performed on three Gaussian blurred images of different scales with n=1, 2, and 3. The detection expression is:
[0012] Corn ity =det(C(x,s n )-αtrace(C(x,s n ))) (1)
[0013] In the formula, Corn ity is the corner point strength value, det is the determinant value; α is a constant, the value is 0.04; trace is the trace number of the matrix; C(x,s n ) is a second-order matrix, which is defined as:
[0014]
[0015] Where, L x (x,s n ) indicates that point x is at s nThe horizontal gradient on the scaled image, L y (x,s n ) represents the point x in the scaled image s n The horizontal and vertical gradients;
[0016] Using expression (1), a corner strength value Corn can be calculated for each point x in the scale image. ity ; Corner strength value Corn for each point x ity Corner strength value in the adjacent 5×5 area ity Make a comparison and find the maximum value in the area as the candidate feature point x candidate .
[0017] Preferably, in the step of detecting the image feature points, the specific steps of performing Laplace extreme value detection on the candidate feature points are:
[0018] Find candidate feature points x from each image candidate After that, for the candidate feature point x candidate and its 8 neighbors, that is, 9 points in each image, a total of 27 points, are Laplace operated using formula (3) to obtain 3 candidate feature points x candidate and the extreme values of the other 24 adjacent points, formula (3) is expressed as:
[0019]
[0020] Where, L Lap is the candidate feature point x candidate The extreme value obtained after Laplace operation, L xx (x candidate ,s n ) is the candidate feature point x candidate In s n The second-order derivative in the horizontal direction on the scaled image, L yy (x candidate ,s n ) is the candidate feature point x candidate In s n The second derivative in the vertical direction on the scaled image.
[0021] Preferably, in the image feature point detection step, the specific steps of finding the maximum value among the candidate feature points after extreme value detection as the final image feature point are:
[0022] After the Laplace extreme value detection, the candidate feature point x candidate Filter out candidate feature points with low contrast and candidate feature points located on the edge of the image;
[0023] Compare candidate feature points x candidateThe extreme value calculated by formula (3) with the 24 adjacent points, if the candidate feature point x candidate has the largest extreme value, then the candidate feature point x candidate is the final image feature point.
[0024] Preferably, in the image feature point detection step, the candidate feature point x after the Laplace extreme value detection is completed candidate The specific steps for filtering are:
[0025] Use Taylor series expansion to convert the candidate feature points x candidate Expanded, the expression is:
[0026]
[0027] Where, L Lap (x candidate ) is the Gaussian function difference value, T is the transposed matrix;
[0028] According to the Taylor series expansion, the candidate feature points are corrected, and then:
[0029]
[0030] In the formula, is the characteristic point value corrected according to the Taylor series expansion, is the Gaussian function difference value modified according to the Taylor series expansion, which is used to filter out points with low contrast; x candidate =(x,y,σ) T is the displacement of the candidate feature point, x is the horizontal coordinate of the candidate feature point in the image, and y is the vertical coordinate of the candidate feature point in the image;
[0031] The candidate feature point x candidate Substitute the value of into formula (5), if Then the candidate feature point x candidate The contrast of the candidate feature point x is low. candidate Remove;
[0032] The Hessian matrix is used to filter out candidate feature points located on the edge of the image. The expression of the Hessian matrix is:
[0033]
[0034] Where H is the square matrix composed of the second-order partial derivatives of the candidate feature points on the edge of the image in the x and y directions;
[0035] According to the properties of the Hessian matrix, the two eigenvalues δ1 and δ2 of the Hessian matrix are obtained, where the eigenvalue δ1 is larger and the eigenvalue δ2 is smaller;
[0036] The trace number and row and column values of the Hessian matrix H are calculated by formula (7), which is expressed as:
[0037]
[0038] Where trace(H) is the trace number of the Hessian matrix H, and det(H) is the row and column value of the Hessian matrix H;
[0039] According to the set threshold γ, it is judged whether formula (8) is valid. Formula (8) is expressed as:
[0040]
[0041] When γ=10, if formula (8) holds, it means that the candidate feature point is located on the edge of the image, and the candidate feature point located on the edge of the image is deleted.
[0042] Preferably, in the step of constructing the region descriptor, the specific steps of calculating the orientation of the image feature points and rotating the image blocks are:
[0043] Taking the image feature point as the center, take a 16×16 area in the image, and calculate the gradient intensity and gradient direction of all pixel positions in the area by formula (9). Formula (9) is expressed as:
[0044]
[0045] Where m(x,y) is the gradient strength of the pixel at the coordinate position (x,y); the closer to the feature point, the larger the Gaussian weight is assigned; θ(x,y) is the gradient direction of the pixel at the coordinate position (x,y); L represents all pixel positions in the region;
[0046] The gradient strength at each angle is statistically distributed through the directional gradient histogram, and the angle with the largest peak in the statistical result is taken as the main direction of the image feature point;
[0047] After the main direction of each image feature point is obtained, the image block around the image feature point is rotated according to this direction. Based on the image feature point, the image block centered on the image feature point is rotated to a direction aligned with the main direction at 0 degrees.
[0048] Preferably, in the step of constructing the region descriptor, the specific steps of constructing the region descriptor by fusing the intensity domain and frequency domain features are as follows:
[0049] Take a circular area around the image feature point as the region of interest, and cut it into multiple small blocks in a radial manner. Subtract the grayscale value of all pixels in each small block from the grayscale value of the image feature point, and we have:
[0050] C(p)=I(p)-I(pc ) (10)
[0051] Where C(p) is the difference between the grayscale value of the pixel and the grayscale value of the image feature point, p is the pixel located in the region of interest, I(p) is the grayscale value of pixel p, and p c is the image feature point, I(p c ) is the image feature point p c Gray value of
[0052] The difference C(p) obtained by formula (10) has two cases: greater than or equal to 0 and less than 0. The sum of the two differences is calculated by formula (11) and the average is taken. Formula (11) is expressed as:
[0053]
[0054] In the formula, R i Represents a small block within the region of interest; The number of gray values in the small block that are greater than or equal to the gray value of the image feature points; The number of gray values in the small block that are less than the gray value of the image feature point; and The intensity domain feature value of the image feature point is obtained by dividing the sum of the two differences by the number of pixels;
[0055] Then the intensity domain features of the image feature points are expressed as follows:
[0056]
[0057] Perform discrete cosine transform on the four 8×8 small blocks adjacent to the image feature points to obtain four sets of frequency domain coefficients, which are i=1,2,3,4, and then take these four sets of frequency domain coefficients as new features and add them to the region descriptor to obtain a new region descriptor. The new region descriptor consists of 16-dimensional intensity domain features and 16-dimensional frequency domain features, expressed as:
[0058]
[0059] Where DCT_p v is the region descriptor, w is the setting weight;
[0060] The region descriptor DCT_p obtained by formula (13) v That is to construct the region descriptor.
[0061] Preferably, in the image feature description step, the specific steps of matching the intensity domain and frequency domain fusion feature descriptions are: calculating the Euclidean distances of all region descriptors in image I and all region descriptors in image I', finding the pairing with the first closest distance and the pairing with the second closest distance, comparing the first closest distance with the second closest distance, and making a judgment through formula (14), which is expressed as:
[0062] Dist(p c ,p c ') <threshold×Dist(p c ,p c ”) (14)
[0063] In the formula, p c is an image feature point in image I, p c 'with p c ” are respectively the image I' and p c The closest and second closest image feature points are paired, Dist(p c ,p c ”) is the Euclidean distance between the two image feature point region descriptors; threshold is the weight;
[0064] When the found image feature point pairing meets the judgment of formula (14), it means that the descriptions of the two image feature points have a fairly high similarity, and it is determined that the two image feature points match each other.
[0065] Compared with the prior art, the advantages and positive effects of the present invention are:
[0066] (1) When collecting bogie identification images, the present invention uses any three viewing angles within a viewing angle of 45-135 degrees to collect images, thereby avoiding the problem of inaccurate image feature extraction caused by large changes in image viewing angles, and effectively improving the accuracy of image feature extraction.
[0067] (2) The present invention performs Harris corner point detection on images of different scales to find candidate feature points, and performs Laplace extremum detection on the candidate feature points to find the final image feature points. In the process of finding the final image feature points, the candidate feature points after Laplace extremum detection are first filtered out to remove candidate feature points with low contrast and on the edge, and then the candidate feature points with the largest extremum are found as image feature points, thereby improving the accuracy of image feature extraction.
[0068] (3) The present invention constructs a regional descriptor by fusing intensity domain and frequency domain features, and uses the image intensity domain robust features with reduced dimensions to fuse a small amount of low-frequency features extracted from the image by discrete cosine transform, thereby enhancing the description of texture features by the regional descriptor, thereby reducing the intensity domain dimension and increasing the frequency domain features, thereby improving the speed and accuracy of image feature extraction. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] Figure 1 A simplified flow chart of the bogie identification image feature extraction method of the present invention by fusing multi-view intensity domain and frequency domain;
[0070] Figure 2 This is a flow chart of a method for extracting features of a bogie identification image by fusing multi-view intensity domain and frequency domain according to an embodiment of the present invention;
[0071] Figure 3 Schematic diagram of the arrangement of multi-angle industrial cameras according to an embodiment of the present invention;
[0072] Figure 4 This is a schematic diagram of Harris corner point detection of an image according to an embodiment of the present invention;
[0073] Figure 5 Schematic diagram of Laplace extreme value detection of candidate feature points according to an embodiment of the present invention;
[0074] Figure 6 This is a statistical diagram of the orientation of image feature points in an embodiment of the present invention;
[0075] Figure 7 A schematic diagram of image block rotation according to an embodiment of the present invention;
[0076] Figure 8 This is a schematic diagram of the distribution of frequency domain characteristic coefficients according to an embodiment of the present invention;
[0077] Fig. 9 This is a schematic diagram of pixel statistics of image feature points according to an embodiment of the present invention;
[0078] Fig.10 This is a schematic diagram of frequency domain feature extraction according to an embodiment of the present invention;
[0079] Fig.11 Schematic diagram of a feature vector region descriptor according to an embodiment of the present invention.
[0080] In the figure, 1. industrial camera, 2. bogie parts, 3. identification, 4. 0 degree baseline, 5. 45 degree baseline, 6. 90 degree baseline, 7. 135 degree baseline, 8. candidate feature points, 9. region of interest, 10. surrounding feature points, 11. low frequency region, 12. medium frequency region, 13. high frequency region, 14. main direction, 15. feature vector region descriptor. DETAILED DESCRIPTION
[0081] The present invention is described in detail below by way of exemplary embodiments. However, it should be understood that elements, structures, and features in one embodiment may also be beneficially combined in other embodiments without further description.
[0082] See also Figure 1 The present invention provides a bogie identification image feature extraction method by fusing multi-view intensity domain and frequency domain, and the steps are as follows:
[0083] S1. Image acquisition step: select any three angles in the range of 45-135 degrees from the front of the side with the mark on the bogie component to collect images, and obtain images of different scales;
[0084] S2, image feature point detection step: perform Harris corner point detection on images of different scales to find candidate feature points in the image, perform Laplace extreme value detection on the candidate feature points, and find the maximum value among the candidate feature points after extreme value detection as the final image feature point;
[0085] S3, step of constructing a region descriptor: calculating the orientation of the image feature point, taking the main direction of the image feature point as a reference, rotating the image block centered on the image feature point to make it consistent with the main direction of the image feature point, and constructing a region descriptor on the rotated image block by fusing the intensity domain feature with the frequency domain feature;
[0086] S4, image feature description step: the intensity domain and frequency domain are fused and matched, and the image feature extraction is completed.
[0087] The present invention can quickly and reliably extract image features, form effective feature region descriptors, and reduce the impact of various image transformation factors on the robustness of image processing. On the one hand, it selects any three angles within the viewing angle range of 45-135 degrees to capture images, and collects image information from multiple viewing angles, thereby avoiding the problem of inaccurate image feature extraction caused by large changes in image viewing angles. On the other hand, in the process of constructing the region descriptor, a scale-invariant and feature transformation correction method is adopted, that is, the region descriptor is constructed by fusing intensity domain features with frequency domain features, and a small amount of low-frequency features extracted by discrete cosine transform of the image are fused using image intensity domain robust features of simplified dimensions, thereby enhancing the description of texture features by the region descriptor, thereby improving the rapidity and accuracy of image feature extraction.
[0088] The method of the present invention is described in detail below by taking obtaining images of bogie components from three angles as an example.
[0089] Example: See Figure 2 The embodiment of the present invention provides a bogie identification image feature extraction method by fusing multi-view intensity domain and frequency domain, and the specific steps are as follows:
[0090] S1. Image acquisition steps: see Figure 3 Three industrial cameras are used to collect identification images from three viewing angles. The angles of the three industrial cameras are 45 degrees, 90 degrees, and 135 degrees respectively. They are installed in front of the steering parts with identification and collect images from three viewing angles of 45 degrees, 90 degrees, and 135 degrees respectively.
[0091] It should be noted that the angles of the three industrial cameras can be adjusted according to actual needs, and are not limited to 45 degrees, 90 degrees, and 135 degrees. They can also be 60 degrees, 90 degrees, 120 degrees, or 50 degrees, 90 degrees, and 130 degrees. Here, only 45 degrees, 90 degrees, and 135 degrees are used as examples for explanation.
[0092] S2, image feature point detection step: perform Harris corner point detection on images of different scales to find candidate feature points in the image, perform Laplace extreme value detection on the candidate feature points, and find the maximum value among the candidate feature points after extreme value detection as the final image feature point.
[0093] Specifically, see Figure 4 ,The specific steps of Harris corner detection on images of different scales are:
[0094] (1) Perform Gaussian blur G on the image three times to obtain a Gaussian blurred image G'.
[0095] Let I(x,y) be the input image, G(x,y,σ) be the Gaussian smoothness of each image, and its expression is:
[0096]
[0097] Where σ is the standard deviation;
[0098] G'(x,y,σ) is the established Gaussian scale space, and its expression is:
[0099] G'(x,y,σ)=G(x,y,σ)×I(x,y)
[0100] (2) With standard deviation σ = 1.5, at scale s n =σ n Harris corner detection is performed on three Gaussian blurred images of different scales with n=1, 2, and 3. The detection expression is:
[0101] Corn ity =det(C(x,s n )-αtrace(C(x,s n ))) (1)
[0102] In the formula, Cornity is the corner point strength value, det is the determinant value; α is a constant, the value is 0.04; trace is the trace number of the matrix; C(x,s n ) is a second-order matrix, which is defined as:
[0103]
[0104] Where, L x (x,s n ) indicates that point x is at s n The horizontal gradient on the scaled image, L y (x,s n ) represents the point x in the scaled image s n The horizontal and vertical gradients;
[0105] Using expression (1), a corner strength value Corn can be calculated for each point x in the scale image. ity ; Corner strength value Corn for each point x ity Corner strength value in the adjacent 5×5 area ity Make a comparison and find the maximum value in the area as the candidate feature point x candidate .
[0106] It should be noted that Harris corner points are defined as those whose grayscale values will change significantly when moving in any direction of the image. In a small local area, if the grayscale value does not change when moving in the image area, then there is no corner point in the window. If one side changes significantly while the other side does not change when moving in a certain direction, then this area is located at the edge of the object. Harris corner point detection can quickly find candidate area points in the image.
[0107] Specifically, see Figure 5 , the specific steps of Laplace extreme value detection for candidate feature points are:
[0108] Find candidate feature points x from each image candidate After that, for the candidate feature point x candidate and the 8 feature points around it, that is, 9 feature points per image, a total of 27 feature points are Laplace operated by formula (3) to obtain 3 candidate feature points x candidate and the extreme values of the remaining 24 surrounding feature points, formula (3) is expressed as:
[0109]
[0110] Where, L Lap is the candidate feature point x candidate The extreme value obtained after Laplace operation, Lxx (x candidate ,s n ) is the candidate feature point x candidate In s n The second-order derivative in the horizontal direction on the scaled image, L yy (x candidate ,s n ) is the candidate feature point x candidate In s n The second derivative in the vertical direction on the scaled image.
[0111] Specifically, the specific steps for finding the maximum value among the candidate feature points after extreme value detection as the final image feature point are:
[0112] (1) After the Laplace extreme value detection, the candidate feature point x candidate Filter out candidate feature points with low contrast and candidate feature points located on the edge of the image. The specific steps are:
[0113] After the Laplace extreme value detection, the candidate feature point x candidate The specific steps for filtering are:
[0114] Use Taylor series expansion to convert the candidate feature points x candidate Expanded, the expression is:
[0115]
[0116] Where, L Lap (x candidate ) is the Gaussian function difference value, T is the transposed matrix;
[0117] According to the Taylor series expansion, the candidate feature points are corrected, and then:
[0118]
[0119] In the formula, is the feature point value corrected according to the Taylor series expansion, is the Gaussian function difference value modified according to the Taylor series expansion, which is used to filter out points with low contrast; x candidate =(x,y,σ) T is the displacement of the candidate feature point, x is the horizontal coordinate of the candidate feature point in the image, and y is the vertical coordinate of the candidate feature point in the image;
[0120] The candidate feature point x candidate Substitute the value of into formula (5), if Then the candidate feature point x candidate The contrast of the candidate feature point x is low. candidate Remove;
[0121] The Hessian matrix is used to filter out candidate feature points located on the edge of the image. The expression of the Hessian matrix is:
[0122]
[0123] Where H is the square matrix composed of the second-order partial derivatives of the candidate feature points on the edge of the image in the x and y directions;
[0124] According to the properties of the Hessian matrix, the two eigenvalues δ1 and δ2 of the Hessian matrix are obtained, where the eigenvalue δ1 is larger and the eigenvalue δ2 is smaller;
[0125] The trace number and row and column values of the Hessian matrix H are calculated by formula (7), which is expressed as:
[0126]
[0127] Where trace(H) is the trace number of the Hessian matrix H, and det(H) is the row and column value of the Hessian matrix H;
[0128] According to the set threshold γ, it is judged whether formula (8) is valid. Formula (8) is expressed as:
[0129]
[0130] When γ=10, if formula (8) holds, it means that the candidate feature point is located on the edge of the image, and the candidate feature point located on the edge of the image is deleted.
[0131] By deleting candidate feature points with low contrast and on the edge in the above manner, the accuracy of image feature extraction can be improved.
[0132] (2) Compare candidate feature points x candidate The extreme value calculated by formula (3) with the 24 adjacent points, if the candidate feature point x candidate has the largest extreme value, then the candidate feature point x candidate is the final image feature point.
[0133] S3, step of constructing region descriptor: calculate the orientation of image feature points, and rotate the image block centered on the image feature points based on the main direction of the image feature points to make it consistent with the main direction of the image feature points, and construct the region descriptor on the rotated image block by fusing intensity domain features with frequency domain features.
[0134] Specifically, the specific steps of calculating the orientation of image feature points and rotating image blocks are:
[0135] (1) Taking the image feature point as the center, take a 16×16 area in the image and calculate the gradient intensity and gradient direction of all pixel positions in the area using formula (9). Formula (9) is expressed as:
[0136]
[0137] Where m(x,y) is the gradient strength of the pixel at the coordinate position (x,y); the closer to the feature point, the larger the Gaussian weight is assigned; θ(x,y) is the gradient direction of the pixel at the coordinate position (x,y); L represents all pixel positions in the region.
[0138] (2) See Figure 6 , the gradient strength at each angle is statistically distributed through the directional gradient histogram; the angle is 45 degrees per unit, there are 8 directions in total, and the angle with the largest peak in the statistical result is taken as the main direction of the image feature point.
[0139] (3) See Figure 7 After finding the main direction of each image feature point, the image block around the image feature point is rotated according to this direction. Taking the image feature point as the reference, the image block centered on the image feature point is rotated to a direction aligned with the main direction at 0 degrees.
[0140] It should be noted that after removing the candidate feature points with low contrast and on the edge, the accuracy of image feature extraction is improved, but when the image is rotated, the matching rate of the image feature points will also decrease. In the process of bogie component identification, if the same logo is rotated, it will lead to misjudgment. Therefore, it is necessary to give the image feature points a main direction, that is, rotation invariance. In this embodiment, the image block centered on the image feature point is rotated based on the main direction of the image feature point to ensure rotation invariance, avoid misjudgment, and ensure the matching rate of the image feature points.
[0141] In order to enhance the description of the texture features of the region descriptor, the texture features extracted by discrete cosine transform of the image are added on the basis of the intensity domain. In general, since the more important details in the image are in the low frequency domain (see Figure 8 ), after an image is transformed by discrete cosine transform, a set of coefficient values converted from the image element value to the frequency domain will be obtained. These coefficient values correspond to different fundamental frequencies and are used to represent the result of the numerical image corresponding to the frequency domain.
[0142] Perform discrete cosine transform on the image elements to obtain the corresponding frequency domain coefficients, which are calculated as follows:
[0143]
[0144] Where (i, j) is the frequency domain coefficient position; (x, y) is the spatial domain pixel position; f(x, y) is the pixel value at the (x, y) position; D(i, j) is the frequency domain coefficient value at the (i, j) position; N is the resolution of the image; C(i) and C(j) functions depend on whether the values of variables i and j are 0, respectively. If i is 0, then C(i) is If j is 0, then C(j) is Conversely, if i is not 0, then C(i) is 1, and if j is not 0, then C(j) is 1.
[0145] Specifically, the specific steps of constructing a regional descriptor by fusing intensity domain and frequency domain features are as follows:
[0146] (1) See Fig. 9 , take a circular area around the image feature point as the region of interest, and cut it into multiple small blocks in a radial manner, and subtract the grayscale value of all pixels in each small block from the grayscale value of the image feature point, respectively, and we have:
[0147] C(p)=I(p)-I(p c ) (10)
[0148] Where C(p) is the difference between the grayscale value of the pixel and the grayscale value of the image feature point, p is the pixel located in the region of interest, I(p) is the grayscale value of pixel p, and p c is the image feature point, I(p c ) is the image feature point p c Gray value of
[0149] The difference C(p) obtained by formula (10) has two cases: greater than or equal to 0 and less than 0. The sum of the two differences is calculated by formula (11) and the average is taken. Formula (11) is expressed as:
[0150]
[0151] In the formula, R i Represents a small block within the region of interest; The number of gray values in the small block that are greater than or equal to the gray value of the image feature points; The number of gray values in the small block that are less than the gray value of the image feature point; and The intensity domain feature value of the image feature point is obtained by dividing the sum of the two differences by the number of pixels;
[0152] Then the intensity domain features of the image feature points are expressed as follows:
[0153]
[0154] (2) See Fig.10 , perform discrete cosine transform on the four 8×8 small blocks adjacent to the image feature points, and obtain four sets of frequency domain coefficients, which are i=1,2,3,4, and then take these four sets of frequency domain coefficients as new features and add them to the region descriptor to obtain a new region descriptor. The new region descriptor consists of 16-dimensional intensity domain features and 16-dimensional frequency domain features, expressed as:
[0155]
[0156] Where DCT_p v is the region descriptor, w=350 is the setting weight;
[0157] The region descriptor DCT_p obtained by formula (13) v That is to construct the region descriptor.
[0158] S4, image feature description step: match the intensity domain and frequency domain fusion feature description, and image feature extraction is completed. The specific steps of matching the intensity domain and frequency domain fusion feature description are:
[0159] Calculate the Euclidean distance between all region descriptors in image I and all region descriptors in image I', find the pair with the first closest distance and the pair with the second closest distance, compare the first closest distance with the second closest distance, and make a judgment using formula (14), which is expressed as:
[0160] Dist(p c ,p c ') <threshold×Dist(p c ,p c ”) (14)
[0161] In the formula, p c is an image feature point in image I, p c 'with p c ” are respectively the image I' and p c The closest and second closest image feature points are paired, Dist(p c ,p c ”) is the Euclidean distance between two image feature point region descriptors; threshold = 0.6 is the weight;
[0162] When the found image feature point pairing meets the judgment of formula (14), it means that the descriptions of the two image feature points have a fairly high similarity, and it is determined that the two image feature points match each other.
[0163] Through the above judgment, some pairs that are closest but actually wrong can be excluded, thereby increasing the proportion of correct matches in all matches and further improving the accuracy of image feature extraction.
[0164] The above embodiments are used to explain the present invention rather than to limit the present invention. Any modification and change made to the present invention within the spirit of the present invention and the protection scope of the claims shall fall within the protection scope of the present invention.
Claims
1. A bogie identification image feature extraction method based on multi-view intensity domain and frequency domain fusion, characterized in that: The specific steps are: Image acquisition steps: select any three angles from the front of the marked side of the bogie component within the viewing angle range of 45-135 degrees to collect images of different scales; Image feature point detection steps: perform Harris corner point detection on images of different scales to find candidate feature points in the image, perform Laplace extreme value detection on the candidate feature points, and find the maximum value among the candidate feature points after extreme value detection as the final image feature point; region descriptor construction steps: calculate the orientation of the image feature point, and rotate the image block centered on the image feature point based on the main direction of the image feature point to make it consistent with the main direction of the image feature point, and construct the region descriptor on the rotated image block by fusing the intensity domain feature with the frequency domain feature; the specific steps of constructing the region descriptor by fusing the intensity domain and frequency domain features are as follows: Take a circular area around the image feature point as the region of interest, and cut it into multiple small blocks in a radial manner. Subtract the grayscale value of all pixels in each small block from the grayscale value of the image feature point, and we have: C(p)=I(p)-I(p c ) (10) Where C(p) is the difference between the grayscale value of the pixel and the grayscale value of the image feature point, p is the pixel located in the region of interest, I(p) is the grayscale value of pixel p, and p c is the image feature point, I(p c ) is the image feature point p c Gray value of The difference C(p) obtained by formula (10) has two cases: greater than or equal to 0 and less than 0. The sum of the two differences is calculated by formula (11) and the average is taken. Formula (11) is expressed as: In the formula, R i Represents a small block within the region of interest; The number of gray values in the small block that are greater than or equal to the gray value of the image feature points; The number of gray values in the small block that are less than the gray value of the image feature point; and The intensity domain feature value of the image feature point is obtained by dividing the sum of the two differences by the number of pixels; Then the intensity domain features of the image feature points are expressed as follows: Perform discrete cosine transform on the four 8×8 small blocks adjacent to the image feature points to obtain four sets of frequency domain coefficients, which are i=1,2,3,4, and then take these four sets of frequency domain coefficients as new features and add them to the region descriptor to obtain a new region descriptor. The new region descriptor consists of 16-dimensional intensity domain features and 16-dimensional frequency domain features, expressed as: Where DCT_p v is the region descriptor, w is the setting weight; The region descriptor DCT_p obtained by formula (13) v That is to construct a regional descriptor; Image feature description step: The intensity domain and frequency domain are fused and matched to complete the image feature extraction.
2. The bogie identification image feature extraction method of multi-view intensity domain and frequency domain fusion as claimed in claim 1 is characterized in that: In the image feature point detection step, the specific steps of performing Harris corner point detection on images of different scales are: Perform Gaussian blur on the image to obtain a Gaussian blurred image; With standard deviation σ = 1.5, on a scale of s n =σ n Harris corner detection is performed on three Gaussian blurred images of different scales with n=1, 2, and 3. The detection expression is: Corn ity =det(C(x,s n )-αtrace(C(x,s n ))) (1) In the formula, Corn ity is the corner point strength value, det is the determinant value; α is a constant; trace is the trace number of the matrix; C(x,s n ) is a second-order matrix, which is defined as: Where, L x (x,s n ) indicates that point x is at s n The horizontal gradient on the scaled image, L y (x,s n ) represents the point x in the scaled image s n The horizontal and vertical gradients; Using expression (1), a corner strength value Corn can be calculated for each point x in the scale image. ity ; Corner strength value Corn for each point x ity Corner strength value in the adjacent 5×5 area ity Make a comparison and find the maximum value in the area as the candidate feature point x candidate .
3. The bogie identification image feature extraction method of multi-view intensity domain and frequency domain fusion as claimed in claim 2 is characterized in that: In the image feature point detection step, the specific steps of performing Laplace extreme value detection on candidate feature points are: Find candidate feature points x from each image candidate After that, for the candidate feature point x candidate and its 8 neighbors, that is, 9 points in each image, a total of 27 points, are Laplace operated using formula (3) to obtain 3 candidate feature points x candidate and the extreme values of the other 24 adjacent points, formula (3) is expressed as: Where, L Lap is the candidate feature point x candidate The extreme value obtained after Laplace operation, L xx (x candidate ,s n ) is the candidate feature point x candidate In s n The second-order derivative in the horizontal direction on the scaled image, L yy (x candidate ,s n ) is the candidate feature point x candidate In s n The second derivative in the vertical direction on the scaled image.
4. The bogie identification image feature extraction method of multi-view intensity domain and frequency domain fusion as claimed in claim 3 is characterized in that: In the image feature point detection step, the specific steps of finding the maximum value among the candidate feature points after the extreme value detection as the final image feature point are as follows: for the candidate feature point x after the Laplace extreme value detection candidate Filter out candidate feature points with low contrast and candidate feature points located on the edge of the image; Compare candidate feature points x candidate The extreme value calculated by formula (3) with the 24 adjacent points, if the candidate feature point x candidate has the largest extreme value, then the candidate feature point x candidate is the final image feature point.
5. The bogie identification image feature extraction method of multi-view intensity domain and frequency domain fusion as claimed in claim 4 is characterized in that: In the image feature point detection step, the candidate feature point x after Laplace extreme value detection is candidate The specific steps for filtering are: Use Taylor series expansion to convert the candidate feature points x candidate Expanded, the expression is: Where, L Lap (x candidate ) is the Gaussian function difference value, T is the transposed matrix; According to the Taylor series expansion, the candidate feature points are corrected, and then: In the formula, is the feature point value corrected according to the Taylor series expansion, is the Gaussian function difference value modified according to the Taylor series expansion, which is used to filter out points with low contrast; x candidate =(x,y,σ) T is the displacement of the candidate feature point, x is the horizontal coordinate of the candidate feature point in the image, and y is the vertical coordinate of the candidate feature point in the image; The candidate feature point x candidate Substitute the value of into formula (5), if Then the candidate feature point x candidate The contrast of the candidate feature point x is low. candidate Remove; The Hessian matrix is used to filter out candidate feature points located on the edge of the image. The expression of the Hessian matrix is: Where H is the square matrix composed of the second-order partial derivatives of the candidate feature points on the edge of the image in the x and y directions; According to the properties of the Hessian matrix, the two eigenvalues δ1 and δ2 of the Hessian matrix are obtained, where the eigenvalue δ1 is larger and the eigenvalue δ2 is smaller; The trace number and row and column values of the Hessian matrix H are calculated by formula (7), which is expressed as: Where trace(H) is the trace number of the Hessian matrix H, and det(H) is the row and column value of the Hessian matrix H; According to the set threshold γ, it is judged whether formula (8) is valid. Formula (8) is expressed as: When γ=10, if formula (8) holds, it means that the candidate feature point is located on the edge of the image, and the candidate feature point located on the edge of the image is deleted.
6. The bogie identification image feature extraction method of multi-view intensity domain and frequency domain fusion as claimed in claim 4 is characterized in that: In the step of constructing the region descriptor, the specific steps of calculating the orientation of the image feature points and rotating the image blocks are as follows: Taking the image feature point as the center, take a 16×16 area in the image, and calculate the gradient intensity and gradient direction of all pixel positions in the area by formula (9). Formula (9) is expressed as: Where m(x,y) is the gradient strength of the pixel at the coordinate position (x,y); θ(x,y) is the gradient direction of the pixel at the coordinate position (x,y); L represents all pixel positions in the region; The gradient strength at each angle is statistically distributed through the directional gradient histogram, and the angle with the largest peak in the statistical result is taken as the main direction of the image feature point; After the main direction of each image feature point is obtained, the image block around the image feature point is rotated according to this direction. Based on the image feature point, the image block centered on the image feature point is rotated to a direction aligned with the main direction at 0 degrees.
7. The bogie identification image feature extraction method of multi-view intensity domain and frequency domain fusion as claimed in claim 1, characterized in that: In the image feature description step, the specific steps of matching the intensity domain and frequency domain fusion feature description are as follows: calculating the Euclidean distances of all region descriptors in image I and all region descriptors in image I', finding the pairing with the first closest distance and the pairing with the second closest distance, comparing the first closest distance with the second closest distance, and making a judgment through formula (14), which is expressed as: Dist(p c ,p c ')<threshold×Dist(p c ,p c ”) (14) In the formula, p c is an image feature point in image I, p c 'with p c ” are respectively the image I' and p c The closest and second closest image feature points are paired, Dist(p c ,p c ”) is the Euclidean distance between the two image feature point region descriptors; threshold is the weight; When the found image feature point pairing meets the judgment of formula (14), it means that the descriptions of the two image feature points have a fairly high similarity, and it is determined that the two image feature points match each other.
Citation Information
Patent Citations
Train bogie edge detecting method under dim light condition
CN103295225A
Railway vehicle appearance inspection device
JP2017215220A
Train component crack damage monitoring method and system
WO2019201177A1
