Workpiece contour calibration method based on dynamic soft fitting signal matching algorithm
Through the dynamic soft fitting signal matching algorithm, the problem of inaccurate material contour extraction is solved, the accuracy of contour calibration and the accuracy of the equipment model are improved, the difficulty of on-site work is reduced, and more efficient material detection is achieved.
Patent Information
- Application Number
- CN202410988636.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2024-10-18
AI Technical Summary
In existing industrial quality inspection technology, material contour extraction has problems of inaccuracy or failure, especially when using different materials and complex backgrounds, resulting in manual correction that consumes a lot of manpower and increases costs.
A work component contour calibration method based on dynamic soft fitting signal matching algorithm is adopted to improve the contour matching effect through one-dimensional signal similarity matching, including image preprocessing, edge detection, data augmentation, signal gradient calculation and adaptive weighted fusion. Reduce the difficulty of on-site work.
It improves the accuracy of contour calibration and equipment model accuracy, reduces the need for manual correction, and improves process efficiency.
Smart Images

Figure CN118799294A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of defect detection, in particular to a workpiece contour calibration method based on a dynamic soft fitting signal matching algorithm. Background Art
[0002] In the existing industrial quality inspection technology, the material contour extraction method is usually to fix the material on the inspection machine, and the industrial camera scans and identifies the collected pictures according to a specific trajectory under different size fields of view, and extracts the material contour from the scanned material image. The contours of some materials are relatively clear and flat, but due to the limitations of the existing process and equipment of the material, the production process of different materials may produce defects of different forms of materials, such as material skew, folding or missing materials. The occurrence of these defects often causes the extraction failure or inaccuracy of material contour marking and positioning. In addition, the images of materials of different materials taken under the same environment are quite different. The images of some materials with clear and concise backgrounds can accurately extract the edges of the materials through the machine equipment, but the images of materials with complex backgrounds may produce errors when extracting. The existing solution is to use the manual verification method to review the scanned and extracted material contours one by one, and manually correct the material contours. This method consumes a lot of manpower, increases project costs, and is difficult to improve efficiency. Summary of the invention
[0003] The present invention aims to solve at least one of the technical problems existing in the prior art.
[0004] To this end, the present invention proposes a workpiece contour calibration method based on a dynamic soft fitting signal matching algorithm, that is, a one-dimensional signal similarity matching method based on the contour, which improves the contour matching effect and then improves the accuracy of contour calibration, thereby improving the accuracy of the equipment model and reducing the difficulty of on-site work.
[0005] According to an embodiment of the present invention, a workpiece contour calibration method based on a dynamic soft fitting signal matching algorithm comprises the following steps: Step 1: Get data: Get the image to be tested of the signal to be matched ; Get template signal , template signal The length is ; From the template signal The intercept length is The local template signal ,in, , is the local template signal on the horizontal axis, is the local template signal of the ordinate; Step 2: Image preprocessing to obtain a binary image: the image to be tested for the matching signal Perform image preprocessing, grayscale, and use Fourier low-pass filter to obtain a smoothed image to be tested ; Step 3: Edge detection: Use the canny operator to detect the image Perform edge detection and extract the contour features of the target to be measured to obtain the contour coordinate information of the target to be measured, that is, ,right Perform linear fitting, according to the horizontal angle of the fitted straight line Rotate the contour and finally get the coordinate information of the rotated contour ; Step 4, Data Augmentation: Calculation Length With template signal Length The contour length difference , and the contour length difference Divide by and The smallest value in the ratio ; Judgment ratio Is it greater than the set threshold? : When judging the ratio Greater than the set threshold When , spline interpolation is performed and then the fifth step is entered; When judging the ratio Less than or equal to the set threshold If , go directly to step 5; Step 5: Calculate signal gradient: Extract The X and Y coordinates of the signal , and perform periodic extension on it; calculate the first-order derivative after periodic extension, and get , while calculating the template signal The first-order derivative of ; Step 6: Signal matching: Perform a sliding window, where the size of the sliding window is the local template signal Length , the sliding step length is 1 unit length; the signal in each sliding window and the local template signal are calculated in turn The Bhattacharyya distance between them, finally we get two sets of Bhattacharyya distance lists about X coordinate signal and Y coordinate signal , ; Step 7: Adaptive Weighted Fusion , : Adaptive weighted fusion algorithm obtains the fused distance list ,choose The minimum value in the list is taken as the signal segment with the highest similarity.
[0006] The beneficial effect of the present invention is that a one-dimensional signal similarity matching method based on contour is adopted to improve the matching effect of contour, thereby improving the accuracy of contour calibration, thereby improving the accuracy of equipment model and reducing the difficulty of on-site work.
[0007] According to one embodiment of the present invention, in the second step, the formula of Fourier low-pass filtering is: (1) (2) The symbols in formula (1) and formula (2) have the following meanings: The image to be tested represents the signal to be matched The Fourier transform form of It represents a selected filter transformation function, which passes all frequencies without attenuation within the circle with the origin as the center and D as the radius, and cuts off all frequencies outside the circle; Indicates that reduce The result obtained by the high-frequency part is to obtain the smoothed image by using the inverse Fourier transform; Indicates the cutoff frequency of the low-pass filter.
[0008] According to one embodiment of the present invention, in the third step, the horizontal angle of the fitted straight line is The value range is : When the horizontal angle of the fitted straight line When it is greater than zero, the contour is rotated clockwise; When the horizontal angle of the fitted straight line When it is less than zero, the contour is rotated counterclockwise; When the horizontal angle of the fitted straight line When it is equal to zero, no rotation operation is performed on the contour.
[0009] According to one embodiment of the present invention, in the third step, the Sobel operator is used in the Canny edge detection algorithm to calculate the image gradient magnitude and direction. is the horizontal convolution template, is the convolution template in the vertical direction, , ; The calculation formula for the gradient amplitude is: (3) The symbols in formula (3) have the following meanings: represents the gradient amplitude; Represents the horizontal gradient amplitude obtained after convolution with the horizontal template; Represents the vertical gradient amplitude obtained after using the vertical template convolution; The calculation formula for the gradient direction is: (4) The symbols in formula (4) have the following meanings: Indicates the gradient direction.
[0010] According to one embodiment of the present invention, in the third step, The formula for clockwise rotation is: (5) (6) The formula for counterclockwise rotation is: (7) (8) The symbols in formula (5), formula (6), formula (7) and formula (8) have the following meanings: Represents the coordinates before rotation; Represents the coordinates after rotation; Represents the horizontal angle of the fitted straight line.
[0011] According to one embodiment of the present invention, in the fourth step, when the ratio is determined Greater than the set threshold When, the threshold The value of is 0.3, then the coordinate information of the rotated contour Perform cubic spline interpolation. The formula for cubic spline interpolation is: (9) According to one embodiment of the present invention, in the fourth step, when Length If it is too small, upsampling is performed; otherwise, downsampling is performed. Length If it is too large, the contour point set is downsampled.
[0012] According to one embodiment of the present invention, in the fifth step, the calculation formula of the first-order derivative is: (10) (11) The symbols in formula (10) and formula (11) have the following meanings: X represents the X coordinate signal of the signal to be measured; Y represents the Y coordinate signal of the signal to be measured; Indicates the index value of the X coordinate signal.
[0013] According to one embodiment of the present invention, in the sixth step, the calculation formula of the Bhattacharyya distance is: (12) The symbols in formula (12) have the following meanings: Represents the gradient of the signal to be measured; represents the gradient of the template signal; Indicates the length of the sliding window and the local template signal; i represents a value between 1 and Ls, i=1,2,3…,Ls; Represents the Bhattacharyya distance, which ranges from 0 to 1. The closer the distance is to 1, the more similar the signal matches are; conversely, the closer the distance is to 0, the greater the difference.
[0014] According to an embodiment of the present invention, in the seventh step, it is determined whether the fused Bhattacharyya distance is less than a threshold value. , where the threshold It is an empirical value describing the difference between the signal to be tested and the template signal. The value is 0.05; if the Bhattacharyya distance of the signal segment with the highest similarity is less than the threshold , then the signal segment is judged and output as a matched similar signal; if the Bhattacharyya distance of the signal segment with the highest similarity is greater than the threshold , then the match is judged to have failed and this signal segment is output.
[0015] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description and the drawings.
[0016] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 is a flow chart of the present invention; Figure 2 This is the effect diagram after cubic spline interpolation of X coordinate point; Figure 3 This is the effect diagram after cubic spline interpolation of Y coordinate point; Figure 4 This is the effect diagram of the signal being extended periodically; Figure 5 It is a comparison effect diagram of signal similarity calculated using the first-order derivative; Figure 6 This is the contour signal matching effect diagram. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0020] The following describes in detail a workpiece contour calibration method based on a dynamic soft fitting signal matching algorithm according to an embodiment of the present invention with reference to the accompanying drawings.
[0021] See Figure 1 The workpiece contour calibration method based on the dynamic soft fitting signal matching algorithm of the present invention comprises the following steps: Step 1: Get data: Get the image to be tested of the signal to be matched ; Get template signal , template signal The length is ; From the template signal The intercept length is The local template signal ,in, , is the local template signal on the horizontal axis, is the local template signal of the ordinate; Step 2: Image preprocessing to obtain a binary image: the image to be tested for the matching signal Perform image preprocessing, grayscale, and use Fourier low-pass filter to obtain a smoothed image to be tested ; The formula for Fourier low-pass filtering is: (1) (2) The symbols in formula (1) and formula (2) have the following meanings: The image to be tested represents the signal to be matched The Fourier transform form of It represents a selected filter transformation function, which passes all frequencies without attenuation within the circle with the origin as the center and D as the radius, and cuts off all frequencies outside the circle; Indicates that reduce The result obtained by the high-frequency part is to obtain the smoothed image by using the inverse Fourier transform; Indicates the cutoff frequency of the low-pass filter.
[0022] Step 3: Edge detection: Use the canny operator to detect the image Perform edge detection and extract the contour features of the target to be measured to obtain the contour coordinate information of the target to be measured, that is, ,right Perform linear fitting, according to the horizontal angle of the fitted straight line Rotate the contour and finally get the coordinate information of the rotated contour , that is, linear fitting is performed on the contour information, and the X and Y coordinate signals of the contour are obtained respectively , It should be noted that the coordinates X and Y are arranged in time sequence (contour order), and the points X and Y corresponding to each sequence number are the target points on the contour; in step 3, the horizontal angle of the fitted straight line is The value range is : When the horizontal angle of the fitted straight line When it is greater than zero, the contour is rotated clockwise; When the horizontal angle of the fitted straight line When it is less than zero, the contour is rotated counterclockwise; When the horizontal angle of the fitted straight line When it is equal to zero, no rotation operation is performed on the contour.
[0023] The Sobel operator is used in the Canny edge detection algorithm to calculate the image gradient amplitude and direction. is the horizontal convolution template, is the convolution template in the vertical direction, , ; The calculation formula for the gradient amplitude is: (3) The symbols in formula (3) have the following meanings: represents the gradient amplitude; Represents the horizontal gradient amplitude obtained after convolution with the horizontal template; Represents the vertical gradient amplitude obtained after using the vertical template convolution; The calculation formula for the gradient direction is: (4) The symbols in formula (4) have the following meanings: Indicates the gradient direction.
[0024] The formula for clockwise rotation is: (5) (6) The formula for counterclockwise rotation is: (7) (8) The symbols in formula (5), formula (6), formula (7) and formula (8) have the following meanings: Represents the coordinates before rotation; Represents the coordinates after rotation; Represents the horizontal angle of the fitted straight line.
[0025] Step 4, Data Augmentation: Calculation Length With template signal Length The contour length difference , and the contour length difference Divide by and The smallest value in the ratio ; Judgment ratio Is it greater than the set threshold? : When judging the ratio Greater than the set threshold When , spline interpolation is performed and then the fifth step is entered; When judging the ratio Less than or equal to the set threshold If , go directly to step 5; When judging the ratio Greater than the set threshold When, the threshold The value of is 0.3, then the coordinate information of the rotated contour Perform cubic spline interpolation. The formula for cubic spline interpolation is: (9) when Length If it is too small, upsampling is performed; otherwise, downsampling is performed. Length If it is too large, the contour point set is downsampled.
[0026] Step 5: Calculate signal gradient: Extract The X and Y coordinates of the signal , and perform periodic extension on it; calculate the first-order derivative after periodic extension, and get , while calculating the template signal The first-order derivative of ; The formula for calculating the first-order derivative is: (10) (11) The symbols in formula (10) and formula (11) have the following meanings: X represents the X coordinate signal of the signal to be measured; Y represents the Y coordinate signal of the signal to be measured; Indicates the index value of the X coordinate signal.
[0027] Step 6: Signal matching: Perform a sliding window, where the size of the sliding window is the local template signal Length , the sliding step length is 1 unit length; the signal in each sliding window and the local template signal are calculated in turn The Bhattacharyya distance between them, finally we get two sets of Bhattacharyya distance lists about X coordinate signal and Y coordinate signal , , that is, dynamically calculating the Bhattacharyya distance between the signal and the gradient of the image to be measured through a sliding window; The calculation formula of Bhattacharyya distance is: (12) The symbols in formula (12) have the following meanings: represents the gradient of the signal to be measured; represents the gradient of the template signal; Indicates the length of the sliding window and the local template signal; i represents a value between 1 and Ls, i=1,2,3…,Ls; Represents the Bhattacharyya distance, which ranges from 0 to 1. The closer the distance is to 1, the more similar the signal matches are; conversely, the closer the distance is to 0, the greater the difference.
[0028] Step 7: Adaptive Weighted Fusion , :Adaptive weighted fusion algorithm obtains the fused distance list ,choose The minimum value in the list is taken as the signal segment with the highest similarity. Determine whether the fused Bhattacharyya distance is less than the threshold , where the threshold It is an empirical value describing the difference between the signal to be tested and the template signal. The value is 0.05; if the Bhattacharyya distance of the signal segment with the highest similarity is less than the threshold , then the signal segment is judged and output as a matched similar signal; if the Bhattacharyya distance of the signal segment with the highest similarity is greater than the threshold , then the match is judged to have failed and this signal segment is output, that is, the gradient calculation results are fused. Adaptive weighted fusion algorithm formula: (13) (14) The symbols in formula (13) and formula (14) have the following meanings: Indicates the number of sliding windows; Sliding Window represents the Bhattacharyya distance value calculated between the i-th sliding window of the X-coordinate signal and the template signal; represents the Bhattacharyya distance value calculated between the i-th sliding window of the Y coordinate signal and the template signal; Represents the Bhattacharyya distance result after fusion.
[0029] Adaptive weight allocation principle: The smaller the Bhattacharyya distance calculated from two signal segments, the higher the signal similarity, and the higher the assigned weight.
[0030] Since the contour of the image to be tested is longer than the contour of the original template signal, the contour of the image to be tested is downsampled by cubic spline. Figure 2 The left graph in the figure shows the signal of the X coordinate before spline interpolation. Figure 2 The right graph in the middle shows the signal of the X coordinate after spline interpolation.
[0031] Figure 3 The left graph in the figure shows the signal of the Y coordinate before spline interpolation. Figure 3 The right graph in the middle shows the signal of the Y coordinate after spline interpolation.
[0032] Figure 4 The figure on the left in the middle shows the X-coordinate signal before period extension; Figure 4 The figure on the right in the middle shows the X-coordinate signal after period extension.
[0033] Figure 5 Figure a is the local template signal X coordinate signal ; Figure 5 Figure b in the figure is the result of calculating the Bhattacharyya distance using the first-order derivative of the X-coordinate point; Figure 5 Figure c in the figure is the bus distance result diagram using the lateral coordinate signal quantity of the contour point set, that is, the similar signal segments that match correctly on the output original image are drawn and represented by bold lines.
[0034] Figure 6 The black outline in the left image represents the template signal outline, and the gray-white segment represents the intercepted local template signal; Figure 6 The middle right figure shows the image to be detected, and the gray-white segments show similar signal segments found after soft fitting of signal dynamics.
[0035] The workpiece contour calibration method based on the dynamic soft fitting signal matching algorithm of the present invention fully caters to the limitations of existing processes and equipment. The production processes of different materials may produce contours of different shapes of materials, resulting in the current situation of failure of material contour marking and positioning, such as material skewness, folding or material shortage, etc. These situations often cause material contour marking and positioning to fail to extract or be inaccurate. The images of materials of different materials taken under the same environment are quite different. The clear and concise images of some materials with clear backgrounds can accurately extract the edges of materials through machine equipment, but errors may occur when extracting images of materials with complex backgrounds. Therefore, a contour calibration technology of signal dynamic soft fitting is introduced, and the contour is decomposed into two one-dimensional signals of X coordinate and Y coordinate for simultaneous matching. The weighted least squares method is used to fuse the results of the matching of the two signals, thereby improving the matching effect. When calculating the similarity of the signal, the original coordinate data is not directly used for calculation, but the first-order derivative of the coordinate signal is calculated, and then the Bhattacharyya distance is used for similarity calculation, which greatly improves the experimental effect. For details, see Figure 5 In particular, when selecting template signals, it is found that different template signal lengths will have a great impact on the matching results. A large number of experiments have shown that when the length of the local template signal is 0.25 times the length of the original template signal, the matching effect is best. The present invention is applied to material contour marking and positioning to improve the accuracy of contour calibration, thereby improving the accuracy of equipment models and reducing the difficulty of on-site work.
[0036] The above are only preferred specific implementation modes of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical solutions and inventive concepts of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A component contour calibration method based on a dynamic soft fitting signal matching algorithm, characterized in that: The following steps are involved: Step 1: Get data: Get the image to be tested of the signal to be matched ; Get template signal , template signal The length is ; From the template signal The intercept length is The local template signal ,in, , is the local template signal on the horizontal axis, is the local template signal of the ordinate; Step 2: Image preprocessing to obtain a binary image: the image to be tested for the matching signal Perform image preprocessing, grayscale, and use Fourier low-pass filter to obtain a smoothed image to be tested ; Step 3: Edge detection: Use the canny operator to detect the image Perform edge detection and extract the contour features of the target to be measured to obtain the contour coordinate information of the target to be measured, that is, ,right Perform linear fitting, according to the horizontal angle of the fitted straight line Rotate the contour and finally get the coordinate information of the rotated contour ; Step 4, Data Augmentation: Calculation Length With template signal Length The contour length difference , and the contour length difference Divide by and The smallest value in the ratio ; Judgment ratio Is it greater than the set threshold? : When judging the ratio Greater than the set threshold When , spline interpolation is performed and then the fifth step is entered; When judging the ratio Less than or equal to the set threshold If , go directly to step 5; Step 5: Calculate signal gradient: Extract The X and Y coordinates of the signal , and perform periodic extension on it; calculate the first-order derivative after periodic extension, and get , while calculating the template signal The first-order derivative of ; Step 6: Signal matching: Perform a sliding window, where the size of the sliding window is the local template signal Length , the sliding step length is 1 unit length; the signal in each sliding window and the local template signal are calculated in turn The Bhattacharyya distance between them, finally we get two sets of Bhattacharyya distance lists about X coordinate signal and Y coordinate signal , ; Step 7: Adaptive Weighted Fusion , :Adaptive weighted fusion algorithm obtains the fused distance list ,choose The minimum value in the list is taken as the signal segment with the highest similarity.
2. The method for component contour calibration based on dynamic soft fitting signal matching algorithm according to claim 1, characterized in that: In the second step, the formula for Fourier low-pass filtering is: (1) (2) The symbols in formula (1) and formula (2) have the following meanings: The image to be tested represents the signal to be matched The Fourier transform form of It represents a selected filter transformation function, which passes all frequencies without attenuation within the circle with the origin as the center and D as the radius, and cuts off all frequencies outside the circle; Indicates that reduce The result obtained by the high-frequency part is to obtain the smoothed image by using the inverse Fourier transform; Indicates the cutoff frequency of the low-pass filter.
3. The method for component contour calibration based on dynamic soft fitting signal matching algorithm according to claim 1, characterized in that: In the third step, the horizontal angle of the fitted straight line is The value range is : When the horizontal angle of the fitted straight line When it is greater than zero, the contour is rotated clockwise; When the horizontal angle of the fitted straight line When it is less than zero, the contour is rotated counterclockwise; When the horizontal angle of the fitted straight line When it is equal to zero, no rotation operation is performed on the contour.
4. The method for component contour calibration based on dynamic soft fitting signal matching algorithm according to claim 1, characterized in that: In the third step, the Sobel operator is used in the Canny edge detection algorithm to calculate the image gradient magnitude and direction. is the horizontal convolution template, is the convolution template in the vertical direction, , ; The formula for calculating the gradient amplitude is: (3) The symbols in formula (3) have the following meanings: represents the gradient amplitude; Represents the horizontal gradient amplitude obtained after convolution with the horizontal template; Represents the vertical gradient amplitude obtained after using the vertical template convolution; The calculation formula for the gradient direction is: (4) The symbols in formula (4) have the following meanings: Indicates the gradient direction.
5. The method for component contour calibration based on dynamic soft fitting signal matching algorithm according to claim 1, characterized in that: In the third step, The formula for clockwise rotation is: (5) (6) The formula for counterclockwise rotation is: (7) (8) The symbols in formula (5), formula (6), formula (7) and formula (8) have the following meanings: Represents the coordinates before rotation; Represents the coordinates after rotation; Represents the horizontal angle of the fitted straight line.
6. The method for component contour calibration based on dynamic soft fitting signal matching algorithm according to claim 1, characterized in that: In the fourth step, when the ratio is determined Greater than the set threshold When, the threshold The value of is 0.3, then the coordinate information of the rotated contour Perform cubic spline interpolation. The formula for cubic spline interpolation is: (9)。 7. The method for component contour calibration based on dynamic soft fitting signal matching algorithm according to claim 1, characterized in that: In the fourth step, when Length If it is too small, upsampling is performed; Otherwise, downsampling is performed, that is, when Length If it is too large, the contour point set is downsampled.
8. The method for component contour calibration based on dynamic soft fitting signal matching algorithm according to claim 1, characterized in that: In the fifth step, the calculation formula of the first-order derivative is: (10) (11) The symbols in formula (10) and formula (11) have the following meanings: X represents the X coordinate signal of the signal to be measured; Y represents the Y coordinate signal of the signal to be measured; Indicates the index value of the X coordinate signal.
9. The method for component contour calibration based on dynamic soft fitting signal matching algorithm according to claim 1, characterized in that: In the sixth step, the calculation formula of the Bhattacharyya distance is: (12) The symbols in formula (12) have the following meanings: Represents the gradient of the signal to be measured; represents the gradient of the template signal; Indicates the length of the sliding window and the local template signal; i represents a value between 1 and Ls, i=1,2,3…,Ls; Represents the Bhattacharyya distance, which ranges from 0 to 1. The closer the distance is to 1, the more similar the signal matches are; conversely, the closer the distance is to 0, the greater the difference.
10. The method for component contour calibration based on dynamic soft fitting signal matching algorithm according to claim 1, characterized in that: In the seventh step, it is determined whether the fused Bhattacharyya distance is less than the threshold value. , where the threshold It is an empirical value describing the difference between the signal to be tested and the template signal. The value is 0.05; If the Bhattacharyya distance of the signal segment with the highest similarity is less than the threshold , then judge and output this signal segment as a matched similar signal; If the Bhattacharyya distance of the signal segment with the highest similarity is greater than the threshold , then the match is judged to have failed and this signal segment is output.
