Blade cutting edge measuring method fusing Patch Match and adaptive SAD matching cost calculation

By integrating Patch Match and adaptive SAD matching cost calculation, and combining black and white checkerboard calibration and Zernike matrix subpixel level detection, the matching accuracy and robustness issues of the blade edge region are solved, achieving efficient and accurate 3D measurement.

CN121746450APending Publication Date: 2026-03-27NANJING GONGDA CNC TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-21
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing stereo vision algorithms lack sufficient matching accuracy and robustness in the blade edge region, making it difficult to meet the requirements of high-precision and high-efficiency online detection, especially in areas with high curvature edges, low texture, or strong reflectivity.

Method used

By integrating the Patch Match algorithm with adaptive SAD matching cost calculation, and combining black and white checkerboard calibration, guided filtering, Zernike matrix subpixel level detection, and multiple iterative optimizations, a high-precision disparity map is generated.

Benefits of technology

It significantly improves the accuracy and reliability of three-dimensional measurement of blade cutting edge, taking into account edge detection accuracy and algorithm robustness, and meets the real-time requirements of industrial sites.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121746450A_ABST
    Figure CN121746450A_ABST
Patent Text Reader

Abstract

The invention discloses a blade cutting edge measuring method fusing Patch Match and adaptive SAD matching cost calculation. Firstly, a checkerboard calibration plate is adopted to carry out three-dimensional calibration on a left camera and a right camera, and internal and external parameters and distortion parameters of the cameras are accurately obtained. Secondly, the left camera and the right camera are used for synchronously collecting images of the cutting edge of the blade, a Bouguet stereo correction algorithm is executed based on a stereo calibration result, and image distortion is effectively eliminated; in order to improve the image quality, guided filtering is adopted to preprocess the corrected image, and the filtering can preserve the key edge information of the cutting edge while removing noise. And then, in a cutting edge edge detection link, an optimized Zernike moment algorithm is adopted for the edge of the preprocessed cutting edge image, the algorithm can accurately position the edge of the cutting edge under a complex background, and the detection precision reaches a sub-pixel level. And finally, completing stereo matching by adopting a Patch Match and self-adaptive SAD matching cost calculation method to obtain a high-precision disparity map of the cutting edge, thereby laying a good foundation for subsequent cutting edge measurement.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of binocular vision detection, and particularly to a blade edge measurement method fusing Patch Match and adaptive SAD matching cost calculation. BACKGROUND

[0002] In the fields of precision manufacturing, mechanical processing and aerospace, the edge state (such as wear, edge collapse, geometric accuracy) of a tool, especially a blade, is a key factor directly affecting the processing quality, product accuracy, production efficiency and cost control. Therefore, it is of important engineering application value and urgent market demand to realize high-precision, high-efficiency and non-contact online or offline measurement of the geometric appearance of the blade edge.

[0003] Stereo vision is a key step to obtain three-dimensional topography, and its core lies in accurate calculation of pixel disparity between image pairs. The classic local matching algorithm (such as SAD and SSD based on fixed square window) performs poorly in the edge area: it is difficult for the fixed window to adapt to the high-curvature edge of the edge, and it is easy to contain background interference or invalid information; strong light reflection leads to local image saturation or darkness, making the intensity difference of pixels in the window unreliable; low texture or repeated texture leads to high ambiguity of matching, and the algorithm is prone to fail at sub-pixel level accuracy, resulting in a large number of false matches or noises. Although global optimization algorithms (such as Graph Cuts and Belief Propagation) or semi-global matching (SGM) can improve the matching accuracy and robustness to some extent, their huge computational complexity makes it difficult to meet the real-time requirements of industrial field for fast and online detection of the edge.

[0004] The Patch Match algorithm can efficiently generate a dense disparity map through its unique random initialization, iterative propagation (forward and backward transmission, spatial propagation) and random search mechanism, and is significantly faster than traditional global methods in processing large-size images, meeting the real-time requirement. However, the matching accuracy and robustness thereof are highly dependent on the accuracy of the bottom matching cost calculation. In the difficult area of the edge, the traditional single and fixed cost calculation, even the commonly used one in the Patch Match, is still insufficient. Therefore, the adaptive SAD matching cost calculation is fused with the efficient framework of the Patch Match, so that the disparity map can be more effectively generated. The core of the adaptive SAD lies in dynamically adjusting the shape, size and weight of the support area of the cost calculation according to the local image features of the edge, such as the texture richness, gradient direction and light consistency, so that the effective information can be better focused and the noise and glare interference can be suppressed. The fusion aims to inherit the speed advantage of the Patch Match, and significantly improve the matching accuracy and stability of the Patch Match in the challenging areas of the low texture, high glare and complex edge of the blade edge, so as to lay a key technical foundation for the high-precision and high-efficiency three-dimensional measurement of the blade edge. SUMMARY

[0005] The purpose of the present application is to provide a blade edge measurement method fusing Patch Match and adaptive SAD matching cost calculation to obtain a high-quality blade edge disparity map.

[0006] To achieve the high-quality blade edge disparity map, the present application specifically provides the following technical solutions. A blade edge measurement method fusing Patch Match and adaptive SAD matching cost calculation, comprising the following steps: Step S1, performing a stereo calibration experiment on the left and right two industrial cameras by using a black-and-white interlaced checkerboard calibration board; Step S2, photographing a left image and a right image of the blade edge by using the left and right two industrial cameras, performing Bouguet stereo correction based on the stereo calibration result of step S1, eliminating image distortion and ensuring that the corresponding points in the left and right images are located on the same horizontal line; Step S3, applying guided filtering to the stereo-corrected blade edge image for smooth denoising pretreatment, while sharply retaining the key edge edge information; Step S4, performing Zernike moment sub-pixel level detection on the edge of the pretreated blade edge image; Step S5, performing stereo matching on the blade edge image by using the fusion of Patch Match and adaptive SAD matching cost calculation to obtain a high-precision blade edge disparity map, thereby laying a good foundation for subsequent edge measurement.

[0007] The step S1 camera stereo calibration experiment steps are as follows: Step S1.1, adjust the working distance between the left and right cameras and the black and white alternating checkerboard calibration board, so that the checkerboard calibration board is in the common field of view of the left and right cameras; Step S1.2, using a high-precision black and white alternating checkerboard calibration board, 20 groups of checkerboard calibration board synchronous images are collected at different positions and different postures such as the upper left corner, the upper right corner, the lower left corner, the lower right corner, etc. Step S1.3, calling find Chessboard Corners() of OpenCV library to detect the corner points of the checkerboard calibration board, and optimizing the detection accuracy to 0.1 pixel through corner Sub Pix(); Step S1.4, setting the plane of the checkerboard calibration board as the Z=0 plane of the world coordinate system, and the world coordinates of each internal corner point are , Among them: is the row and column index of the internal corner point, starting from 0; is the actual physical size of each square of the checkerboard calibration board, and the actual physical size of the checkerboard calibration board used is 0.75mm; Step S1.5, using the cv2.calibrateCamera() function, inputting the world coordinate system points, image coordinate system points and image size, and outputting the internal parameters, external parameters and distortion coefficients of the left and right two cameras.

[0008] The principle of the step S3 application of guided filtering for smoothing and denoising preprocessing of the corrected blade edge image is as follows: Step S31, assuming that there is a local linear relationship between the output image q and the guide image I: ; Among them: is the pixel index, is the local window centered on pixel k, and are the linear coefficients in the window , which remain unchanged for all pixels in the window; Step S32, solving and by the least square fitting function, and obtaining ; Among them: p is the input image, and are the mean and variance of the guide image I in the window , respectively, is the mean of the input image p in , It represents the number of pixels within the window; Step S3.3, the output image q is represented by all pixels. The average value of the window linear coefficients: ; in: It is all pixels The central collection of windows.

[0009] Step S4 employs an optimized Zernike moment sub-pixel level edge detection process as follows: Step S4.1: Utilizing the orthogonality of Zernike moments on the unit circle, by calculating the moment values ​​of the three key orders (0,0), (1,1), and (2,0), an ideal mathematical model of the step edge with rotation invariance and noise robustness is constructed, which accurately describes the four key parameters of the edge: normal direction, position offset, step intensity, and background grayscale. Step S4.2: Pre-calculate and solidify a 7×7 Zernike moment template matrix, which includes the zero-order moment M00, the real part of the first-order moment M11R, the imaginary part M11I, and the second-order moment M20, to eliminate real-time calculation overhead; at the same time, load the grayscale image data of the blade edge to provide an input source for subsequent processing. Step S4.3: Use a 9×9 kernel median filter to eliminate salt and pepper noise in the blade edge image and maintain edge sharpness; apply a dual-threshold Canny operator with a low threshold of 80 and a high threshold of 240 to perform pixel-level initial edge localization, effectively distinguishing the real blade edge from texture noise. Step S4.4: The image boundary problem is addressed using a boundary replication and expansion strategy. The Canny edge point set is traversed; a 7×7 neighborhood is extracted for each edge point, and convolved with a pre-stored template to calculate the moment value; the edge normal angle is then calculated. and sub-pixel offset ,through After verification, the sub-pixel level blade edge coordinates are calculated using geometric relationships; The geometric relation is: ; in: Here are the original pixel-level edge coordinates, and N is the Zernike rectangular template size.

[0010] Step S5 uses a combination of Patch Match and adaptive SAD matching cost calculation to perform stereo matching on the blade edge image, obtaining a high-precision disparity map of the blade edge. The stereo matching algorithm steps are as follows: Step S5.1, Pre-calculation: Generate Gaussian weights corresponding to the patch size, which are used to calculate the matching cost of pixels within the patch, and calculate the local standard deviation around each pixel to distinguish between low-texture and high-texture regions; Step S5.2, random initialization: in the disparity range, for each pixel point Randomly select a disparity value , get a point on the time difference plane Randomly initialize the normal vector Randomly select each dimension in the range of (-1, 1), and finally unitize; Step S5.3, optimize the disparity and normal vector by multiple forward-backward iterations, and update the state by combining the spatial propagation and random search strategy in each iteration; Step S5.4, adaptive SAD matching cost calculation: based on the texture classification result, adaptively select Truncated Sum of Absolute Differences (TSAD) or Gradient-Weighted Sum of Absolute Differences (GSAD) function to calculate the matching cost; Step S5.5, post-processing: for the left and right disparity maps obtained in the above steps, left-right consistency check, occlusion filling and median first and then weighted least squares WLS filtering optimization are adopted, and finally a high-quality disparity map is obtained.

[0011] Optimize the disparity and normal vector by multiple forward-backward iterations, and update the state by combining the spatial propagation and random search strategy in each iteration. In forward transmission: from top to bottom, from left to right; and backward transmission: from bottom to top, from right to left, both need to go through random search and spatial propagation. In random search, try several disparity values, calculate the cost and keep the best. In spatial propagation, refer to the disparity of the neighbor pixels. In forward transmission, look at the left and upper neighbors. In backward transmission, look at the right and lower neighbors. Calculate the cost and keep the best. After random search, spatial propagation and 5 iterations, the disparity of each pixel will gradually converge to a better solution; In the step S5.4, adaptive SAD matching cost calculation, in the low texture area, truncated absolute difference and TSAD is used, the expression is: ; Wherein: is the coordinate of the current pixel to be matched, d is the candidate disparity, r is the radius of the local image block, is the precomputed Gaussian kernel weight kernel, is the gray function of the left view and the right view, is the truncation threshold, min() is the truncation of the pixel difference exceeding ; In the high texture area, gradient-weighted absolute difference and (GSAD) is used, the expression is: ; Wherein: is a balance factor, is a horizontal gradient of the left view, is a horizontal gradient of the right view, and other symbols are defined as TSAD.

[0012] The present application has the following advantages: The present application sharpens the retained blade edge during denoising by guided filtering, realizes sub-pixel level accurate edge positioning by combining optimized Zernike moment algorithm, and fuses Patch Match efficient matching and adaptive SAD cost calculation to efficiently generate high-precision disparity map in complex background, thereby laying a solid foundation for three-dimensional measurement of blade edge. The core advantage is to balance edge detection accuracy, algorithm robustness and matching efficiency, thereby significantly improving the accuracy and reliability of binocular vision measurement. BRIEF DESCRIPTION OF DRAWINGS

[0013] Figure 1 is a blade edge measurement method flowchart of the present application embodiment which fuses Patch Match and adaptive SAD matching cost calculation; Figure 2 is a blade edge image sub-pixel level edge detection diagram in the present application embodiment; Figure 3 is a stereo matching algorithm flowchart in the present application embodiment; Figure 4 is a median filter diagram in the post-processing process of the blade edge image stereo matching algorithm in the present application embodiment; Figure 5 is a final disparity map of the blade edge in the present application embodiment; DETAILED DESCRIPTION

[0014] The technical solutions in the embodiments of the present application will be described in detail below with reference to the drawings of the embodiments of the present application. Obviously, the described embodiments are only some of the 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 work fall within the scope of protection of the present application; The present application provides a blade edge measurement method which fuses Patch Match and adaptive SAD matching cost calculation, Figure 1 is a flowchart of the blade edge measurement method which fuses Patch Match and adaptive SAD matching cost calculation of the present application embodiment, and the following will be described in combination with Figure 1 to illustrate the present embodiment; A blade edge measurement method which fuses Patch Match and adaptive SAD matching cost calculation, comprising the following steps: Step S1, a black-and-white checkerboard calibration plate is used to perform stereo calibration experiment on the left and right two industrial cameras; Step S2: Use two industrial cameras to capture left and right images of the blade edge. Based on the stereo calibration results of step S1, perform Bouguet stereo calibration to eliminate image distortion and ensure that corresponding points in the left and right images are on the same horizontal line. Step S3: Apply guided filtering to perform smoothing and denoising preprocessing on the stereo-corrected cutting edge image, while sharply preserving the key cutting edge information. Step S4: Perform Zernike moment subpixel level detection on the preprocessed blade edge image. Step S5: The blade edge image is stereo matched by fusion Patch Match and adaptive SAD matching cost calculation to obtain a high-precision disparity map of the blade edge, which lays a good foundation for subsequent edge measurement.

[0015] The camera stereo calibration experiment steps in step S1 are as follows: Step S1.1: Adjust the working distance between the left and right cameras and the black and white checkerboard calibration board so that the checkerboard calibration board is within the common field of view of the left and right cameras. Step S1.2: Using a high-precision black and white checkerboard calibration board, collect 20 sets of synchronized images of the checkerboard calibration board at different positions and postures, such as the upper left corner, upper right corner, lower left corner, and lower right corner. Step S1.3: Call the OpenCV library's find Chessboard Corners() function to detect the corner points of the chessboard calibration board, and optimize the detection accuracy to 0.1 pixels using corner Sub Pix(). Step S1.4: Set the plane containing the chessboard calibration plate as the Z=0 plane of the world coordinate system, and the world coordinates of each interior corner point are... , in: The row and column indices of the interior corner points, starting from 0; The actual physical size of each square on the checkerboard calibration board is given; the actual physical size of the checkerboard calibration board used is 0.75 mm. Step S1.5: Use the cv2.calibrateCamera() function to input the world coordinate system points, image coordinate system points, and image size, and output the intrinsic parameters, extrinsic parameters, and distortion coefficients of the left and right cameras.

[0016] The principle behind step S3, which applies guided filtering to smooth and denoise the stereo-corrected blade edge image, is as follows: Step S31, assuming a local linear relationship exists between the output image q and the guiding image I: ; in: is the pixel index, is the local window centered at pixel k, and is the linear coefficient within the window which remains constant for all pixels within the window; Step S32, solving the least square fitting function and , we have where p is the input image, and are the mean and variance of the guide image I within the window is the mean of the input image p within the window is the number of pixels within the window; Step S3.3, the output image q is represented as the average of the linear coefficients of all windows containing pixel : where: is the set of window centers containing pixel .

[0017] The step S4 employs the optimized Zernike moment sub-pixel level edge detection step as follows: Step S4.1, by taking advantage of the orthogonality of Zernike moments on the unit circle, a mathematical model with rotation invariance and noise robustness is constructed by calculating the moment values of three key orders (0, 0), (1, 1), (2, 0), which accurately describes the four key parameters of the edge, including the normal direction, position offset, step strength and background gray scale; Step S4.2, a 7x7 size Zernike moment template matrix is pre-calculated and solidified, which contains zero-order moment M00, first-order moment real part M11R, imaginary part M11I and second-order moment M20, eliminating the real-time calculation overhead; At the same time, the gray image data of the blade edge is loaded, providing input source for subsequent processing; Step S4.3, a 9x9 kernel median filter is used to eliminate the salt and pepper noise in the edge image, and the edge sharpness is maintained; A double-threshold Canny operator is applied, with a low threshold of 80 and a high threshold of 240, to perform pixel-level edge initial positioning, effectively distinguishing the real edge of the blade from texture noise; Step S4.4, the image boundary problem is handled by the boundary replication expansion strategy, and the Canny edge point set is traversed; For each edge point, a 7x7 neighborhood is extracted, and the moment value is calculated by convolution with the pre-stored template; The edge normal angle and the sub-pixel offset are calculated, and the​​​​ After verification, the sub-pixel level edge coordinates are calculated by a geometric relationship; The geometric relationship is: ; Wherein: is the original pixel level edge coordinates, and N is the Zernike matrix template size.

[0018] The step S5 adopts the fusion Patch Match and adaptive SAD matching cost calculation to perform stereo matching on the blade edge image, and obtains a high-precision disparity map of the blade edge. The steps of the stereo matching algorithm are as follows: Step S5.1, pre-computation: generate a Gaussian weight corresponding to the patch size, which is used for weighted calculation of the matching cost of the pixels in the patch, and calculate the local standard deviation around each pixel, which is used to distinguish low-texture areas and high-texture areas; Step S5.2, random initialization: in the disparity range, for each pixel point a disparity value is randomly selected , to get a point on the disparity plane , and a normal vector is randomly initialized , each dimension is randomly selected in the range of (-1, 1), and finally unitized; Step S5.3, optimize the disparity and normal vector through multiple forward-backward iterations, and update the state by combining the spatial propagation and random search strategy in each iteration; Step S5.4, adaptive SAD matching cost calculation: based on the texture classification result, adaptively select Truncated Sum of Absolute Differences (TSAD) or Gradient-Weighted Sum of Absolute Differences (GSAD) function to calculate the matching cost; Step S5.5, post-processing: for the left and right disparity maps obtained in the above steps, left-right consistency check, occlusion filling, and first median then weighted least squares WLS filtering optimization are adopted, and finally a high-quality disparity map is obtained.

[0019] Through multiple forward-backward iterations to optimize the disparity and normal vector, and in each iteration, the state is updated by combining the spatial propagation and random search strategy. In the forward transmission: from top to bottom, from left to right; and backward transmission: from bottom to top, from right to left, both need to go through random search and spatial propagation. In random search, several disparity values are tried, the cost is calculated and the optimal one is reserved. In spatial propagation, the disparity of the neighbor pixels is referred to. In forward transmission, the left neighbor and the upper neighbor are looked at. In backward transmission, the right neighbor and the lower neighbor are looked at. The cost is calculated and the optimal one is reserved. After random search, spatial propagation and 5 iterations, the disparity of each pixel will gradually converge to a better solution; In the step S5.4, in the adaptive SAD matching cost calculation, the low-texture region adopts the truncated absolute difference sum TSAD, and the expression is as follows: ; Wherein: is the coordinate of the current pixel to be matched, d is the candidate disparity, r is the radius of the local image block, is the pre-calculated Gaussian kernel weight kernel, is the gray function of the left view and the right view, is the truncated threshold, min() is the truncation of the pixel difference exceeding ; the high-texture region adopts the gradient weighted absolute difference sum (GSAD), and the expression is as follows: ; Wherein: is the balance factor, is the horizontal gradient of the left view, is the horizontal gradient of the right view, and other symbols are the same as the definition of TSAD.

Claims

1. A blade cutting edge measurement method integrating Patch Match and adaptive SAD matching cost calculation, characterized in that, Includes the following steps: Step S1: Use a black and white checkerboard calibration plate to perform a stereo calibration experiment on the left and right industrial cameras. Step S2: Use two industrial cameras to capture left and right images of the blade edge. Based on the stereo calibration results of step S1, perform Bouguet stereo calibration to eliminate image distortion and ensure that corresponding points in the left and right images are on the same horizontal line. Step S3: Apply guided filtering to perform smoothing and denoising preprocessing on the stereo-corrected cutting edge image, while sharply preserving the key cutting edge information. Step S4: Perform Zernike moment subpixel level detection on the preprocessed blade edge image. Step S5: The blade edge image is stereo matched by fusion Patch Match and adaptive SAD matching cost calculation to obtain a high-precision disparity map of the blade edge, which lays a good foundation for subsequent edge measurement.

2. The blade edge measurement method integrating Patch Match and adaptive SAD matching cost calculation according to claim 1, characterized in that, The camera stereo calibration experiment steps in step S1 are as follows: Step S1.1: Adjust the working distance between the left and right cameras and the black and white checkerboard calibration board so that the checkerboard calibration board is within the common field of view of the left and right cameras. Step S1.2: Using a high-precision black and white checkerboard calibration board, collect 20 sets of synchronized images of the checkerboard calibration board at different positions and postures, such as the upper left corner, upper right corner, lower left corner, and lower right corner. Step S1.3: Call the OpenCV library's find Chessboard Corners() function to detect the corner points of the chessboard calibration board, and optimize the detection accuracy to 0.1 pixels using corner Sub Pix(). Step S1.4: Set the plane containing the chessboard calibration plate as the Z=0 plane of the world coordinate system, and the world coordinates of each interior corner point are... , in: The row and column indices of the interior corner points, starting from 0; The actual physical size of each square on the checkerboard calibration board is given; the actual physical size of the checkerboard calibration board used is 0.75 mm. Step S1.5: Use the cv2.calibrateCamera() function to input the world coordinate system points, image coordinate system points, and image size, and output the intrinsic parameters, extrinsic parameters, and distortion coefficients of the left and right cameras.

3. The blade edge measurement method integrating Patch Match and adaptive SAD matching cost calculation according to claim 1, characterized in that, The principle behind step S3, which applies guided filtering to smooth and denoise the stereo-corrected blade edge image, is as follows: Step S31, assuming a local linear relationship exists between the output image q and the guiding image I: ; in: It is a pixel index. It is a local window centered on pixel k. and It is a window The linear coefficients within the window remain unchanged for all pixels within the window; Step S32, solve using the least squares fitting function and , can be obtained ; Where: p is the input image. and These are the guide image I in the window. Mean and variance within, Is the input image p in The mean within, It represents the number of pixels within the window; Step S3.3, the output image q is represented by all pixels. The average value of the window linear coefficients: ; in: It is all pixels The central collection of windows.

4. The blade cutting edge measurement method integrating Patch Match and adaptive SAD matching cost calculation according to claim 1, characterized in that, Step S4 employs an optimized Zernike moment sub-pixel level edge detection process as follows: Step S4.1: Utilizing the orthogonality of Zernike moments on the unit circle, by calculating the moment values ​​of the three key orders (0,0), (1,1), and (2,0), an ideal mathematical model of the step edge with rotation invariance and noise robustness is constructed, which accurately describes the four key parameters of the edge: normal direction, position offset, step intensity, and background grayscale. Step S4.2: Pre-calculate and solidify a 7×7 Zernike moment template matrix, which includes the zero-order moment M00, the real part of the first-order moment M11R, the imaginary part M11I, and the second-order moment M20, to eliminate real-time calculation overhead; at the same time, load the grayscale image data of the blade edge to provide an input source for subsequent processing. Step S4.3: Use a 9×9 kernel median filter to eliminate salt and pepper noise in the blade edge image and maintain edge sharpness; apply a dual-threshold Canny operator with a low threshold of 80 and a high threshold of 240 to perform pixel-level initial edge localization, effectively distinguishing the real blade edge from texture noise. Step S4.4: The image boundary problem is addressed using a boundary replication and expansion strategy. The Canny edge point set is traversed; a 7×7 neighborhood is extracted for each edge point, and convolved with a pre-stored template to calculate the moment value; the edge normal angle is then calculated. and sub-pixel offset ,through After verification, the sub-pixel level blade edge coordinates are calculated using geometric relationships; The geometric relation is: ; in: represents the original pixel-level edge coordinates, and N is the Zernike rectangular template size.

5. The blade edge measurement method integrating Patch Match and adaptive SAD matching cost calculation according to claim 1, characterized in that, Step S5 uses a combination of Patch Match and adaptive SAD matching cost calculation to perform stereo matching on the blade edge image, obtaining a high-precision disparity map of the blade edge. The stereo matching algorithm steps are as follows: Step S5.1, Pre-calculation: Generate Gaussian weights corresponding to the patch size, which are used to calculate the matching cost of pixels within the patch, and calculate the local standard deviation around each pixel to distinguish between low-texture and high-texture regions; Step S5.2, Random Initialization: Within the parallax range, for each pixel... Randomly select a disparity value To obtain a point on the time difference plane Randomly initialize the normal vector Each dimension is randomly selected within the range of (-1,1), and then normalized. Step S5.3: Optimize disparity and normal vector through multiple forward-backward iterations, and update the state in each iteration by combining spatial propagation and random search strategies; Step S5.4, Adaptive SAD matching cost calculation: Based on the texture classification results, adaptively select the Truncated Sum of Absolute Differences (TSAD) or Gradient-Weighted Sum of Absolute Differences (GSAD) function to calculate the matching cost; Step S5.5, Post-processing: The left and right disparity maps obtained in the above steps are optimized by left-right consistency check, occlusion filling and median-weighted least squares (WLS) filtering to finally obtain a high-quality disparity map.

6. The blade edge measurement method according to claim 1, which integrates Patch Match and adaptive SAD matching cost calculation, optimizes disparity and normal vector through multiple forward-backward iterations, and updates the state in each iteration by combining spatial propagation and random search strategies, is characterized in that... In forward propagation (from top to bottom, from left to right) and backward propagation (from bottom to top, from right to left), random search and spatial propagation must be performed first. In random search, several disparity values ​​are tried, the cost is calculated and the optimal value is retained. In spatial propagation, the disparity of neighboring pixels is used. Forward propagation looks at the left and top neighbors, and backward propagation looks at the right and bottom neighbors. The cost is calculated and the optimal value is retained. After random search, spatial propagation and 5 iterations, the disparity of each pixel will gradually converge to a better solution.

7. The blade edge measurement method integrating Patch Match and adaptive SAD matching cost calculation according to claim 1, characterized in that, In step S5.4, during the adaptive SAD matching cost calculation, the low-texture region uses truncated absolute difference and TSAD, expressed as follows: ; in: Let be the coordinates of the pixel to be matched, d be the candidate disparity, and r be the radius of the local image patch. For the pre-calculated Gaussian kernel weight kernel, The grayscale function for the left and right views. The threshold is min(), which is used to truncate the data. The pixel differences are truncated; the gradient-weighted sum of absolute differences (GSAD) is used for high-texture regions, and its expression is: ; in: It is a balancing factor. It is the horizontal gradient of the left view. This is the horizontal gradient of the right view; other symbols are defined the same as in TSAD.