Precise infinitesimal displacement photoelectric measurement system and method thereof
By introducing curvature flow profile extraction based on differential geometry theory and Riemann optimization techniques, the accuracy bottleneck of traditional photoelectric measurement methods under non-ideal light spots is solved, achieving sub-pixel-level displacement measurement and improving measurement accuracy and environmental adaptability.
Patent Information
- Application Number
- CN202511801948.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-02
- Publication Date
- 2026-01-20
- Estimated Expiration
- 2045-12-02
AI Technical Summary
Traditional photoelectric measurement methods suffer from a significant drop in accuracy when dealing with non-ideal light spots, making it difficult to overcome the limitations of pixel resolution and achieve sub-pixel level precision in the measurement of minute displacements.
By employing differential geometry theory, a technical chain is constructed for curvature flow profile extraction, geodesic constraint positioning, and Riemann optimization. Candidate circle centers are identified through curvature flow evolution and geodesic distance field, and gradient descent is performed on the Riemann manifold to achieve sub-pixel accuracy displacement measurement.
The displacement measurement accuracy has been improved to 0.01 pixels, enhancing the system's stability and adaptability in complex environments. The noise resistance has been significantly improved, with the accuracy decreasing by only about 15% when the signal-to-noise ratio is reduced by 20%, and the applicable range has been greatly expanded.
Smart Images

Figure CN121363920A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of photoelectric measurement, in particular to a precise micro-displacement photoelectric measurement system and method thereof, which utilizes the principle of differential geometry to process spot images with sub-pixel accuracy, achieving high-precision displacement measurement at the micron level. BACKGROUND
[0002] Precise micro-displacement measurement has wide applications in micro-nano manufacturing, precision machining, optical element calibration, and material science research. Traditional photoelectric measurement methods mainly include gray centroid method, edge interpolation method, and template matching method, etc. These methods can achieve a measurement accuracy of 0.1 to 0.05 pixels when dealing with ideal spots.
[0003] However, in actual applications, due to factors such as uneven illumination, environmental noise, mirror reflection, and material surface characteristics, the shape of the spot often appears irregular, leading to a significant decrease in accuracy when traditional methods are used to process non-ideal spots. For example, the gray centroid method is prone to systematic deviation under uneven illumination; the edge interpolation method is sensitive to noise and prone to positioning errors at the image edges; and the template matching method is limited by the pre-set template and has poor adaptability to deformed spots.
[0004] In addition, most existing technologies are based on discrete pixel processing, making it difficult to break through the limitations of pixel resolution and face bottlenecks in the field of high-precision micro-displacement measurement. Therefore, there is an urgent need to develop a new type of displacement measurement system that can adapt to complex environments, process non-ideal spots, and achieve sub-pixel level accuracy. SUMMARY
[0005] The purpose of the present application is to provide a precise micro-displacement photoelectric measurement system and method thereof, which introduces the theory of differential geometry to construct a complete technical chain from curvature flow contour extraction, geodesic line constraint positioning to Riemann optimization, achieving high-precision displacement measurement of non-ideal spots in complex environments.
[0006] The present application proposes a precise micro-displacement photoelectric measurement system, comprising:
[0007] A curvature flow contour extraction module is used to process the spot image, represent the target contour in the spot image as a parameterized curve, calculate the curvature values of each point on the parameterized curve, perform curvature flow evolution based on the curvature values, and generate optimized contour description data;
[0008] A geodesic line constraint positioning module is communicatively connected to the curvature flow contour extraction module, configured to receive the optimized contour description data, construct a geodesic distance field based on the optimized contour description data, identify local maximum points in the geodesic distance field as candidate circle centers, evaluate the shape matching degrees of each candidate circle center, and determine the best candidate circle center.
[0009] a Riemann optimization module, communicatively connected with the geodesic constraint positioning module, configured to receive the optimal candidate circle center, convert a sub-pixel positioning problem into an optimization problem on a Riemann manifold, perform gradient descent based on a Riemann metric in a parameter space, and determine a target coordinate with sub-pixel accuracy; and
[0010] a displacement calculation module, communicatively connected with the Riemann optimization module, configured to receive the target coordinate with sub-pixel accuracy, calculate a displacement change between adjacent image frames, and output a micro-displacement measurement result.
[0011] Preferably, the curvature flow contour extraction module comprises:
[0012] a contour parameterization unit, configured to extract an initial contour point set in the light spot image, and represent the initial contour point set as a parameter curve by using equidistant sampling;
[0013] a curvature calculation unit, communicatively connected with the contour parameterization unit, configured to calculate a curvature value of each point of the parameter curve by using local polynomial fitting, and generate a curvature distribution map;
[0014] a curvature flow evolution unit, communicatively connected with the curvature calculation unit, configured to set an evolution step, move a contour point according to a curvature flow direction, perform adaptive step control, and update the parameter curve; and
[0015] a feature point extraction unit, communicatively connected with the curvature flow evolution unit, configured to identify a curvature extreme point and a zero-crossing point from the updated parameter curve as key feature points, and generate an optimized contour containing the key feature points.
[0016] Preferably, the adaptive step control of the curvature flow evolution unit comprises:
[0017] reducing the evolution step to 0.6 times of an original step in a high curvature area;
[0018] increasing the evolution step to 1.2 times of the original step in a low curvature area; and
[0019] limiting the evolution step to a range of 0.01 to 0.1.
[0020] Preferably, the geodesic constraint positioning module comprises:
[0021] a distance field construction unit, configured to construct a calculation domain with the optimized contour description data as a boundary, and construct a geodesic distance field in the calculation domain by using a fast marching method;
[0022] A candidate circle center identification unit, in communication with the distance field construction unit, is configured to find local maximum points in the geodesic distance field as candidate circle centers, and to merge candidate circle centers that are too close to each other to generate a candidate circle center set.
[0023] A circle center evaluation unit, in communication with the candidate circle center identification unit, is configured to evaluate each candidate circle center in the candidate circle center set for its matching degree with the contour, to calculate a comprehensive score based on intersection angle distribution uniformity, intersection point number, and radius stability, and to select the candidate circle center with the highest score as the best candidate circle center.
[0024] Preferably, the circle center evaluation unit further comprises a sub-pixel optimization unit configured to perform a fine search in a 3x3 pixel region around the best candidate circle center with a step size of 0.1 pixels, and to further optimize the circle center position through quadratic interpolation.
[0025] Preferably, the Riemann optimization module comprises:
[0026] A parameter space construction unit is configured to define a parameter vector comprising a circle center coordinate, a radius, and a deformation parameter, to construct an objective function representing a fitting error, and to define an appropriate Riemann metric tensor in the parameter space;
[0027] An optimization search unit, in communication with the parameter space construction unit, is configured to set an initial step size and an iteration termination condition, to calculate a gradient of the objective function on the Riemann manifold, to determine a search direction, to perform a line search, and to iteratively update the parameter vector; and
[0028] A result evaluation unit, in communication with the optimization search unit, is configured to extract a sub-pixel precision target coordinate from the optimized parameter vector, to calculate a fitting residual and a parameter sensitivity, and to perform a reliability rating on the result.
[0029] Preferably, the optimization search unit performs gradient descent on the Riemann manifold using a preconditioned conjugate gradient method, and further comprises a multiple starting point strategy unit configured to perform optimization from different initial points and to select a global optimal solution.
[0030] Preferably, the system further comprises:
[0031] An image acquisition module is configured to acquire an original image containing light spots;
[0032] An image preprocessing module, in communication with the image acquisition module, is configured to perform grayscale, contrast enhancement, and median filtering processing on the original image; and
[0033] A threshold segmentation module, in communication with the image preprocessing module, is configured to perform threshold segmentation on the preprocessed image to generate a binary image, extract a light spot contour in the binary image, and transmit the light spot contour to the curvature flow contour extraction module.
[0034] Preferably, the displacement calculation module further comprises:
[0035] A coordinate transformation unit is configured to convert the sub-pixel accuracy target coordinates from a pixel coordinate system to a physical coordinate system.
[0036] A displacement vector calculation unit, in communication with the coordinate transformation unit, is configured to calculate the difference of target coordinates between adjacent image frames to obtain a displacement vector.
[0037] A result visualization unit, in communication with the displacement vector calculation unit, is configured to draw a displacement trajectory and display real-time displacement values and cumulative displacement values.
[0038] A precise micro-displacement photoelectric measurement method, comprising the following steps:
[0039] An original image containing a light spot is acquired.
[0040] The original image is preprocessed to obtain a grayscale image.
[0041] The grayscale image is subjected to threshold segmentation to obtain a binary image.
[0042] The light spot contour in the binary image is extracted.
[0043] The light spot contour is optimized using curvature flow evolution, including: representing the light spot contour as a parameterized curve, calculating the curvature values of each point on the parameterized curve, performing curvature flow evolution with adaptive step length based on the curvature values, and generating optimized contour description data.
[0044] A geodesic distance field is constructed based on the optimized contour description data, including: constructing a calculation domain with the optimized contour description data as the boundary, and applying a fast marching method to construct a geodesic distance field in the calculation domain.
[0045] Local maximum points in the geodesic distance field are identified as candidate circle centers, the shape matching degrees of each candidate circle center are evaluated, and the best candidate circle center is determined.
[0046] The sub-pixel positioning problem is converted into an optimization problem on a Riemannian manifold, a gradient descent based on Riemannian metric is performed in the parameter space, and the target coordinates of sub-pixel accuracy are determined.
[0047] The displacement change of the target coordinates between adjacent image frames is calculated, and a micro-displacement measurement result is output.
[0048] The beneficial effects of the present application include:
[0049] 1. Improved measurement accuracy: By sub-pixel processing techniques under the framework of differential geometry, the displacement measurement accuracy is improved to 0.01 pixels, which is 5-10 times higher than traditional methods.
[0050] 2. Enhanced environmental adaptability: The curvature flow-based contour extraction naturally has the ability to smooth noise while preserving key features, allowing the system to maintain stable performance under complex lighting conditions and noise interference.
[0051] 3. Improved non-ideal spot processing capability: Geodesic constraint and Riemann optimization techniques enable the system to effectively process various shaped spots, not limited to Gaussian distribution or perfect circular shape, significantly improving the system's applicability.
[0052] 4. Improved system robustness: Multi-module collaborative architecture design combined with adaptive parameter adjustment mechanism makes the system's performance decline significantly less than traditional methods in complex environments. Under a 20% reduction in signal-to-noise ratio, the accuracy only decreases by about 15%, while traditional methods decrease by about 50%. BRIEF DESCRIPTION OF DRAWINGS
[0053] Figure 1 The structure diagram of the precise micro-displacement optoelectronic measurement system provided by the embodiment of the present application.
[0054] Figure 2 The structure diagram of the curvature flow contour extraction module provided by the embodiment of the present application.
[0055] Figure 3 The structure diagram of the geodesic constraint positioning module provided by the embodiment of the present application.
[0056] Figure 4 The structure diagram of the Riemann optimization module provided by the embodiment of the present application.
[0057] Figure 5 The structure diagram of the displacement calculation module provided by the embodiment of the present application.
[0058] Figure 6 The flowchart of the precise micro-displacement optoelectronic measurement method provided by the embodiment of the present application. DETAILED DESCRIPTION
[0059] Please refer to Figures 1-6 , the present application will be further described in detail below in conjunction with the drawings and specific embodiments. It should be understood that the specific embodiments described herein are only for illustration and explanation of the present application, and are not intended to limit the present application.
[0060] Refer to Figure 1The precision micro-displacement photoelectric measurement system provided by the embodiment of the application comprises a curvature flow contour extraction module 1, a geodesic line constraint positioning module 2, a Riemann optimization module 3 and a displacement calculation module 4. Preferably, the system can further comprise an image acquisition module 5, an image preprocessing module 6 and a threshold segmentation module 7.
[0061] The image acquisition module 5 is used to acquire an original image containing a light spot. In an embodiment of the application, the image acquisition module 5 can be a high-resolution CCD camera or a CMOS camera, preferably with a resolution of 1280*1024 or higher and a frame rate of 30 fps or higher.
[0062] The image preprocessing module 6 is in communication connection with the image acquisition module 5 and is used to perform grayscale, contrast enhancement and median filtering processing on the original image. Preferably, the contrast enhancement adopts a histogram equalization method, and the median filtering adopts a 3*3 or 5*5 filtering window, and the size of the filtering window can be adaptively adjusted according to the noise level.
[0063] The threshold segmentation module 7 is in communication connection with the image preprocessing module 6 and is used to perform threshold segmentation on the preprocessed image, generate a binary image, extract a light spot contour in the binary image, and transmit the light spot contour to the curvature flow contour extraction module 1. In a preferred embodiment of the application, the threshold segmentation adopts an OTSU adaptive threshold algorithm to achieve robust segmentation under different illumination conditions.
[0064] The curvature flow contour extraction module 1 is used to process the light spot image, represent a target contour in the light spot image as a parameterized curve, calculate the curvature values of each point on the parameterized curve, perform curvature flow evolution based on the curvature values, and generate optimized contour description data.
[0065] The geodesic line constraint positioning module 2 is in communication connection with the curvature flow contour extraction module 1 and is used to receive the optimized contour description data, construct a geodesic distance field based on the optimized contour description data, identify local maximum points in the geodesic distance field as candidate circle centers, evaluate the shape matching degrees of each candidate circle center, and determine the best candidate circle center.
[0066] The Riemann optimization module 3 is in communication connection with the geodesic line constraint positioning module 2 and is used to receive the best candidate circle center, convert a sub-pixel positioning problem into an optimization problem on a Riemann manifold, perform gradient descent based on Riemann metric in a parameter space, and determine a target coordinate with sub-pixel accuracy.
[0067] The displacement calculation module 4 is in communication connection with the Riemann optimization module 3 and is used to receive the target coordinate with sub-pixel accuracy, calculate the displacement change between adjacent image frames, and output a micro-displacement measurement result.
[0068] The implementation of each module of the application will be described in detail below with reference to specific embodiments.
[0069] Reference Figure 2 In this embodiment of the invention, the curvature flow contour extraction module 1 includes: a contour parameterization unit 11, a curvature calculation unit 12, a curvature flow evolution unit 13, and a feature point extraction unit 14.
[0070] The contour parameterization unit 11 is used to extract an initial contour point set from the spot image, and represents the initial contour point set as a parametric curve using equidistant sampling. Specifically, the contour parameterization unit 11 first receives the spot contour from the binary image from the threshold segmentation module 7, and then extracts sampling points along the contour edge at equal arc length intervals, representing the contour as a parametric curve C(s), where s is the arc length parameter. Preferably, the initial sampling density is one sample point every 2-3 pixels. For a spot with a radius of approximately 50 pixels, 200-500 points are typically sampled to balance computational accuracy and efficiency.
[0071] The curvature calculation unit 12 is communicatively connected to the contour parameterization unit 11 and is used to calculate the curvature values of each point on the parametric curve using local polynomial fitting, generating a curvature distribution map. In one embodiment of the present invention, the curvature calculation employs a local third-order polynomial fitting method. For each point on the parametric curve, 5-7 adjacent points are selected for fitting, and then the curvature of that point is calculated according to the curvature formula in differential geometry. :
[0072] ,
[0073] in: Let be the curvature value of the parametric curve at the arc length parameter s; and These are the parameter curves. Coordinate components in the x and y directions; and These are their first derivatives with respect to the arc length parameter s; and These are the second derivatives.
[0074] The curvature flow evolution unit 13 is communicatively connected to the curvature calculation unit 12. It is used to set the evolution step size, move the contour points according to the curvature flow direction, perform adaptive step size control, and update the parameter curve. Curvature flow evolution is based on the curvature flow theory in differential geometry. Its core idea is to make the curve move along its normal direction at a speed proportional to the curvature, thereby smoothing noise while preserving key features.
[0075] Specifically, the mathematical expression for the evolution of curvature flow is:
[0076] ,
[0077] in: Represents curve Over time The rate of change; For curvature; Let be the unit normal vector of the curve at that point. In practical implementation, the curvature flow evolution unit 13 approximates the continuous evolution process using a discrete iterative approach. For each point on the parametric curve... Its update formula is:
[0078] ,
[0079] ,
[0080] in: and The coordinates of the point in the current iteration; and Update the coordinates of the midpoint in the next iteration; The evolution step size controls the update magnitude; This is the curvature value at that point; It is the unit normal vector component at that point, pointing either inside or outside the curve.
[0081] To adapt to the characteristics of different curvature regions, curvature flow evolution unit 13 implements an adaptive step size control strategy:
[0082] In the high curvature region (i.e.) The evolution step size is reduced to 0.6 times the original step size to prevent excessive evolution from causing curve distortion.
[0083] In the low curvature region (i.e.) The evolution step size is increased to 1.2 times the original step size to accelerate convergence;
[0084] At the same time, the evolution step size is limited to the range of 0.01 to 0.1 to ensure the stability of the evolution process.
[0085] The selection of 0.2 and 0.05 as the thresholds for high and low curvature is based on extensive experimental results, and these values achieve a good balance when processing typical spot images. Furthermore, after every 5 iterations, the curvature flow evolution unit 13 resamples the curve at equal intervals to maintain a uniform distribution of sampling points.
[0086] The iteration termination condition is set to a shape change rate of less than 0.001 pixels or reaching the maximum number of iterations (usually 100). The shape change rate is defined as the root mean square value of the displacement of all points between two adjacent iterations.
[0087] The feature point extraction unit 14 is in communication connection with the curvature flow evolution unit 13, and is used for identifying curvature extreme points and zero-crossing points from the updated parameter curve as key feature points to generate an optimized contour containing the key feature points. The identification rules of the key feature points are as follows:
[0088] Curvature maximum point: corresponding to the convex corner feature of the contour;
[0089] Curvature minimum point: corresponding to the concave corner feature of the contour;
[0090] Curvature zero-crossing point: corresponding to the inflection point feature of the contour;
[0091] In order to avoid too many feature points affecting subsequent processing, the feature point extraction unit 14 also implements a feature point priority sorting and density control mechanism, preferentially retaining points with larger curvature absolute values, and ensuring that the distance between adjacent feature points is not less than 5 sampling points.
[0092] Finally, the feature point extraction unit 14 outputs the optimized contour description data, including the contour point set, the curvature distribution and the key feature point information, to provide a basis for subsequent geodesic line constraint positioning.
[0093] Referring to Figure 3 In the embodiment of the present application, the geodesic line constraint positioning module 2 includes a distance field construction unit 21, a candidate circle center identification unit 22 and a circle center evaluation unit 23.
[0094] The distance field construction unit 21 is used for constructing a calculation domain with the optimized contour description data as a boundary, and constructing a geodesic distance field in the calculation domain by applying the fast marching method. The geodesic distance field is a two-dimensional scalar field representing the shortest path length from each point in the calculation domain to the contour boundary, and it considers the geometric constraint of the contour and can better reflect the true structure of the light spot than the Euclidean distance.
[0095] In the embodiment of the present application, the distance field construction unit 21 first defines the calculation domain with the optimized contour as a boundary, then constructs a uniform grid (usually with a grid step of 0.5 pixels) and initializes the distance field:
[0096] The distance value at the contour point is set to 0;
[0097] The distance value of the internal point is initialized to positive infinity;
[0098] The distance value of the external point is set to a negative value (not participating in the calculation).
[0099] Subsequently, the distance field construction unit 21 solves the Eikonal equation by using the fast marching method (Fast Marching Method):
[0100] ,
[0101] wherein: representing the geodesic distance value at the point; representing the gradient of the distance field, which is a two-dimensional vector ; representing the Euclidean norm of the gradient, i.e. .
[0102] The fast marching method is a high-efficiency numerical method for solving the Eikonal equation, whose core idea is to start from the contour points and gradually push inwards to calculate the distance value of each point. The time complexity of the algorithm is , where n is the number of grid points, which has higher precision and efficiency compared to the traditional distance transformation algorithm.
[0103] The candidate center identification unit 22 is in communication connection with the distance field construction unit 21, and is used for finding local maximum points in the geodesic distance field as candidate circle centers, merging candidate circle centers that are too close to each other, and generating a candidate circle center set. The local maximum point refers to a grid point whose distance value is greater than that of all other points in its 3*3 neighborhood, and these points usually correspond to the "center" position of the contour.
[0104] In order to improve the quality of the candidate circle centers, the candidate center identification unit 22 implements the following screening and merging strategies:
[0105] Threshold screening: only keep candidate points whose distance values are greater than 5% of the contour perimeter, which ensures that the candidate circle centers have sufficient "centrality";
[0106] Candidate point merging: for candidate point pairs with a distance less than 3 pixels, keep the one with the largest distance value, which helps to reduce redundant calculations;
[0107] Candidate set optimization: finally, keep the candidate points whose distance values are in the top 80%, and at most 5, to balance the calculation complexity and the result quality.
[0108] The circle center evaluation unit 23 is in communication connection with the candidate center identification unit 22, and is used for evaluating the matching degree of each candidate circle center in the candidate circle center set with the contour, calculating a comprehensive score based on the intersection angle distribution uniformity, the number of intersections and the radius stability, and selecting the candidate circle center with the highest score as the best candidate circle center.
[0109] Specifically, for each candidate circle center and the corresponding geodesic distance d, the circle center evaluation unit 23 constructs a circle with the point as the center and d as the radius, then calculates the intersection set of the circle and the contour, and evaluates the following three aspects:
[0110] Intersection angle distribution uniformity: calculate the variance of the polar angle distribution of the intersection points, and the smaller the variance, the more uniform the distribution;
[0111] Intersection number: the more intersections, the better the circle fits the contour;
[0112] Radius stability: the smaller the variance of the distance from the intersection to the center, the more stable the circle fitting.
[0113] The formula for calculating the comprehensive score is:
[0114] ,
[0115] where Score is the comprehensive score, ranging from 0 to 1, and the larger the value, the higher the matching degree; is the standard deviation of the intersection angle distribution, in radians; is the number of intersections; is the expected minimum number of intersections (usually set to 8); is the standard deviation of the distance from the intersection to the center, with the same unit as the radius; is the radius of the circle. The weight distribution (0.5, 0.3, 0.2) is determined based on a large number of experiments and reflects the degree of influence of each factor on the final positioning accuracy.
[0116] The center of the circle evaluation unit 23 also includes a sub-pixel optimization unit for fine search within a 3x3 pixel region around the best candidate center with a step size of 0.1 pixels, further optimizing the center position through quadratic interpolation. This step can improve the accuracy of the preliminary positioning from the pixel level to the 0.1 pixel level, providing a good initial value for the subsequent Riemann optimization.
[0117] In specific implementation, the sub-pixel optimization unit generates 31x31=961 grid points within a 3x3 pixel region (i.e. ±1.5 pixels around the best candidate center) with a step size of 0.1 pixels, and repeats the above score calculation for each point. Then, the top 9 points with the highest scores are selected, and a quadratic surface fitting is used:
[0118] ,
[0119] where: is the score value at point (x, y); 、 、 、 、 and are the fitting coefficients determined by the least squares method. By solving the extreme points of the quadratic surface, the optimized center position with sub-pixel accuracy is obtained, with an accuracy of 0.1 pixels.
[0120] Referring to Figure 4 , in the embodiment of the application, the Riemann optimization module 3 includes a parameter space construction unit 31, an optimization search unit 32, and a result evaluation unit 33.
[0121] The parameter space construction unit 31 is configured to define a parameter vector containing the circle center coordinates, the radius, and the deformation parameters, construct a target function representing the fitting error, and define an appropriate Riemann metric tensor in the parameter space. This step converts the sub-pixel positioning problem into an optimization problem on a Riemannian manifold, which is one of the core innovations of the present application.
[0122] Specifically, the parameter space construction unit 31 defines a parameter vector wherein:
[0123] and is related to the circle center coordinates: , ;
[0124] is related to the radius: ;
[0125] and is a parameter describing the non-circular deformation;
[0126] This parameterization method is derived from algebraic geometry and can represent a circle and its deformed shape, and is suitable for processing non-ideal light spots in practical applications.
[0127] The target function is defined as an energy functional of the fitting error:
[0128] ,
[0129] wherein: is the target function, representing the energy value of the fitting error; is the parameter vector ; is the number of points on the contour; is the coordinate of the th point on the contour; is the circle center coordinate, calculated from the parameters , and ; is the radius, also calculated from the parameters , and ; is a regularization coefficient (usually 0.001), used to prevent overfitting; is a regularization term, controlling the degree of non-circular deformation.
[0130] In the parameter space, the parameter space construction unit 31 defines an appropriate Riemann metric tensor , which measures the influence of parameter variation on the objective function. The Riemannian metric tensor can be represented as an approximation of the Hessian matrix of the objective function:
[0131] ,
[0132] where: is the Riemannian metric tensor, which is a symmetric positive definite matrix; is the Jacobian matrix of the objective function with respect to the parameters, with size , the row column element is , where is the fitting error at the th point; is the transpose matrix of ; is a small positive number (usually 0.01) to ensure the positive definiteness of the matrix; is the identity matrix of . Adding the term ensures the positive definiteness of the Riemannian metric tensor and improves the stability of the optimization process.
[0133] The optimization search unit 32 is communicatively connected with the parameter space construction unit 31, used to set the initial step size and iteration termination condition, calculate the gradient of the objective function on the Riemannian manifold, determine the search direction, perform line search, and iteratively update the parameter vector. This process realizes gradient descent on the parameter manifold and is a key step to achieve sub-pixel accuracy positioning.
[0134] On the Riemannian manifold, the calculation of the gradient needs to consider the influence of the metric tensor. The objective function at the parameter is defined as:
[0135] ,
[0136] where: is the Riemannian gradient of the objective function at the parameter , which is a 5-dimensional vector; is the inverse matrix of the Riemannian metric tensor; is the Euclidean gradient of the objective function, also a 5-dimensional vector, with the jth element being .
[0137] The optimization search unit 32 uses the preconditioned conjugate gradient method to perform gradient descent on the Riemannian manifold. The specific steps are as follows:
[0138] 1. Initialization: Set the initial parameters , the initial step size , initial search direction ;
[0139] Iterative update: for the th iteration,
[0140] Perform line search to determine step size ,
[0141] Update parameters: ,
[0142] Compute new Riemannian gradient: ,
[0143] Compute conjugate factor: ,
[0144] Update search direction: .
[0145] 3. Iterative termination condition: the parameter variation is less than , or the gradient norm is less than , or the maximum number of iterations (usually 200) is reached.
[0146] where: is the parameter vector at the th iteration; is the step size at the th iteration; is the search direction at the th iteration; is the Riemannian gradient at the th iteration; is the conjugate factor used to combine the search direction from the previous iteration; denotes the squared norm of the new gradient; denotes the squared norm of the old gradient.
[0147] The line search employs a step size selection strategy that satisfies the Wolfe conditions, ensuring sufficient descent of the objective function and reasonable changes in the gradient direction. In practical implementation, the minimum cubic interpolation method is used to find the optimal step size that satisfies the conditions.
[0148] The optimization search unit 32 also includes a multi-start strategy unit for performing optimization from different initial points to select the globally optimal solution. Specifically, the multi-start strategy unit starts from the best candidate center of the geodesic constraint positioning, sets 3 different initial points (for example, adds a perturbation of ±0.5 pixels based on the origin), performs optimization respectively, and then selects the result with the smallest objective function value as the final solution. This strategy helps to avoid local optimal solutions and improve the probability of obtaining global optimal solutions.
[0149] The result evaluation unit 33 is communicatively connected with the optimization search unit 32 for extracting the sub-pixel precision target coordinates from the optimized parameter vector, calculating the fitting residual and parameter sensitivity, and performing reliability rating on the results. This step ensures that the results output by the system have reliable quality assurance.
[0150] Specifically, the result evaluation unit 33 first extracts the sub-pixel precision target coordinates from the optimized parameter vector p*: and radius and then calculates the following evaluation indicators:
[0151] Fitting residual: calculate the root mean square error (RMSE) of the distance from the contour points to the fitted circle
[0152] Parameter sensitivity: calculate the condition number of the target function Hessian matrix, reflecting the degree of influence of parameter changes on the results
[0153] Cross-validation: randomly divide the contour points into training set and validation set to test the generalization ability of the model
[0154] Based on these indicators, the result evaluation unit 33 performs reliability rating on the results:
[0155] High reliability: RMSE < 0.05 pixels, condition number < 100;
[0156] Medium reliability: RMSE < 0.1 pixels, condition number < 500;
[0157] Low reliability: other cases.
[0158] In addition, the result evaluation unit 33 also calculates the 95% confidence interval of the coordinate error to provide uncertainty evaluation for subsequent displacement calculation.
[0159] Referring to Figure 5 , in the embodiment of the present application, the displacement calculation module 4 includes: a coordinate transformation unit 41, a displacement vector calculation unit 42, and a result visualization unit 43.
[0160] The coordinate transformation unit 41 is used to convert the sub-pixel precision target coordinates from the pixel coordinate system to the physical coordinate system. In actual applications, there is a nonlinear mapping relationship between the pixel coordinates and the physical coordinates, and accurate conversion parameters need to be obtained through calibration.
[0161] In one embodiment of the present application, the coordinate transformation adopts the following second-order polynomial model:
[0162] ,
[0163] ,
[0164] Wherein: X and Y are physical coordinates (usually in units of microns); x and y are pixel coordinates; To and To The conversion coefficients obtained by the calibration process.
[0165] The calibration process usually uses a high-precision calibration board to obtain the corresponding pixel coordinates at known physical positions, and then solves the conversion coefficients by least squares method. For high-precision applications, higher-order polynomial models or piecewise linear interpolation methods can also be used.
[0166] The displacement vector calculation unit 42 is in communication connection with the coordinate conversion unit 41, and is used to calculate the difference value of the target coordinates between adjacent image frames to obtain the displacement vector. Specifically, for the i-th frame and the i-1-th frame image, the calculation formula of the displacement vector ΔP is: The calculation formula of the displacement vector ΔP is:
[0167] ,
[0168] Wherein: is the displacement vector of the i-th frame relative to the i-1-th frame; (x i, y i) is the physical coordinate of the target in the i-th frame; (x i-1, y i-1) is the physical coordinate of the target in the i-1-th frame. , ,
[0169] In order to improve the reliability of displacement calculation, the displacement vector calculation unit 42 also realizes the detection of abnormal values and filtering processing. The detection of abnormal values is based on the continuity of displacement size and direction, and the filtering processing adopts weighted average or Kalman filtering algorithm, which effectively suppresses the influence of random error.
[0170] The result visualization unit 43 is in communication connection with the displacement vector calculation unit 42, and is used to draw the displacement trajectory, display the real-time displacement value and the cumulative displacement value. In an embodiment of the present application, the result visualization unit 43 provides the following functions:
[0171] Real-time displacement display: display the displacement size and direction of the current frame in the form of numerical value and bar chart;
[0172] Displacement trajectory drawing: draw the target motion trajectory in the two-dimensional coordinate system, and support trajectory comparison of different time periods;
[0173] Cumulative displacement statistics: calculate and display the cumulative displacement, average speed and acceleration in a specified time period;
[0174] Error analysis: display the uncertainty range of displacement measurement, and provide reliability evaluation of the measurement result;
[0175] Preferably, the result visualization unit 43 also supports data export function, which can export the displacement measurement results in CSV, Excel or MATLAB format, facilitating subsequent analysis and processing of the user.
[0176] With reference to Figure 6 The precision micro-displacement photoelectric measurement method provided by the embodiment of the present application comprises the following steps:
[0177] Step S1: Collecting an original image containing a light spot.
[0178] Step S2: Preprocessing the original image to obtain a grayscale image. The preprocessing includes operations such as graying, contrast enhancement and median filtering, aiming to improve the image quality and provide a good foundation for subsequent processing.
[0179] Step S3: Performing threshold segmentation on the grayscale image to obtain a binary image. The threshold segmentation preferably adopts the OTSU adaptive threshold algorithm, which can achieve a robust segmentation effect under different lighting conditions.
[0180] Step S4: Extracting the light spot contour in the binary image. The contour extraction usually adopts an edge tracking algorithm to ensure that the extracted contour is closed and continuous.
[0181] Step S5: Optimizing the light spot contour using curvature flow evolution. This step includes: representing the light spot contour as a parameterized curve, calculating the curvature value of each point on the parameterized curve, performing curvature flow evolution with adaptive step length based on the curvature value, and generating optimized contour description data. The curvature flow evolution can effectively smooth noise while preserving key features, providing high-quality contour description for subsequent accurate positioning.
[0182] Step S6: Constructing a geodesic distance field based on the optimized contour description data. Specifically, it includes: constructing a calculation domain with the optimized contour description data as the boundary, and applying the fast marching method in the calculation domain to construct the geodesic distance field. The geodesic distance field can better reflect the geometric characteristics of the contour than the traditional Euclidean distance field, which helps to improve the accuracy of subsequent positioning.
[0183] Step S7: Identifying local maximum points in the geodesic distance field as candidate circle centers, evaluating the shape matching degree of each candidate circle center, and determining the best candidate circle center. This step realizes the preliminary positioning of the light spot center, and the accuracy can reach 0.1 pixel level.
[0184] Step S8: Converting the sub-pixel positioning problem into an optimization problem on the Riemannian manifold, performing gradient descent based on Riemannian metric in the parameter space, and determining the target coordinates with sub-pixel accuracy. This is the core step to achieve ultra-high precision positioning, which can improve the positioning accuracy to 0.01 pixel level.
[0185] Step S9: Calculate the displacement change of the target coordinates between adjacent image frames, output the micro-displacement measurement result. This step includes coordinate transformation, displacement vector calculation and result visualization operations, and finally presents the displacement measurement result in a user-friendly way.
[0186] In a preferred embodiment of the present application, the adaptive step control strategy in step S5 includes: reducing the evolution step to 0.6 times the original step in high curvature area (|κi|>0.2); increasing the evolution step to 1.2 times the original step in low curvature area (|κi|<0.05); at the same time, limiting the evolution step to the range of 0.01 to 0.1, ensuring the stability of the evolution process.
[0187] In step S7, the shape matching degree evaluation of the candidate center is based on the following three aspects: intersection angle distribution uniformity, intersection point number and radius stability. The calculation of the comprehensive score considers the weighted combination of these three factors, where the weight of the angle distribution uniformity is 0.5, the weight of the intersection point number is 0.3, and the weight of the radius stability is 0.2.
[0188] In step S8, the preconditioned conjugate gradient method is used for Riemann optimization, and the iteration termination condition is that the parameter change is less than 10-6, or the gradient norm is less than 10-8, or the maximum iteration number (usually 200 times) is reached. In addition, a multi-start strategy is also implemented, which performs optimization from different initial points and selects the global optimal solution to avoid the problem of local optimal solution.
[0189] To verify the effectiveness of the present application, a series of experimental tests were conducted. The experiment used a CCD camera with a resolution of 1280×1024, and photographed images of different light conditions and different shapes of light spots, and compared with the traditional gray centroid method and edge interpolation method.
[0190] The experimental results show that the precision micro-displacement optoelectronic measurement system and method proposed by the present application have the following performance advantages:
[0191] 1. Measurement accuracy: under standard test conditions (signal-to-noise ratio ≥20dB), the positioning accuracy of the method of the present application can reach 0.01 pixels, which is 10 times higher than that of the traditional gray centroid method (0.1 pixels) and 5 times higher than that of the edge interpolation method (0.05 pixels).
[0192] 2. Anti-noise ability: under the condition that the signal-to-noise ratio is reduced to 15dB, the accuracy of the traditional method decreases by about 50%, while the accuracy of the method of the present application only decreases by about 15%, showing excellent anti-noise ability.
[0193] 3. Non-ideal light spot adaptability: for non-ideal light spots such as elliptical and irregular shapes, the method of the present application can still maintain stable high-precision measurement, while the performance of the traditional method decreases significantly in this case.
[0194] 4. Computational efficiency: Although the method of the present application introduces complex differential geometry concepts, through algorithm optimization, the time for processing a 640x480 image on a common PC (3GHz CPU) is controlled within 50-80ms, meeting the real-time requirements of most industrial applications.
[0195] The present application provides a precise micro-displacement photoelectric measurement system and method, by introducing the theory of differential geometry, a complete technical chain from curvature flow profile extraction, geodesic line constraint positioning to Riemann optimization is constructed, high-precision displacement measurement of non-ideal light spot in complex environment is realized. The system breaks through the precision limit of traditional methods, and improves the sub-pixel positioning precision to 0.01 pixels, while having excellent anti-interference ability and adaptability, providing a high-precision displacement measurement solution for micro-nano manufacturing, precision machining, optical element adjustment and material science research fields.
[0196] The above only describes the preferred embodiments of the present application and is not used to limit the present application. For those skilled in the art, various modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application.
Claims
1. A precision micro-displacement optoelectronic measurement system, characterized in that, The method comprises the following steps: a curvature flow contour extraction module is configured to process a light spot image, represent a target contour in the light spot image as a parameterized curve, calculate curvature values of each point on the parameterized curve, perform curvature flow evolution based on the curvature values, and generate optimized contour description data; a geodesic line constraint positioning module is in communication connection with the curvature flow contour extraction module, configured to receive the optimized contour description data, construct a geodesic distance field based on the optimized contour description data, identify local maximum points in the geodesic distance field as candidate circle centers, evaluate the shape matching degrees of each candidate circle center, and determine the best candidate circle center; a Riemann optimization module is in communication connection with the geodesic line constraint positioning module, configured to receive the best candidate circle center, convert a sub-pixel positioning problem into an optimization problem on a Riemann manifold, perform gradient descent based on a Riemann metric in a parameter space, and determine a target coordinate of sub-pixel accuracy; and a displacement calculation module is in communication connection with the Riemann optimization module, configured to receive the target coordinate of sub-pixel accuracy, calculate displacement changes between adjacent image frames, and output a micro-displacement measurement result. The curvature flow contour extraction module comprises:
2. The precise micro-displacement photoelectric measuring system according to claim 1, characterized in that, a contour parameterization unit is configured to extract an initial contour point set in the light spot image, and represent the initial contour point set as a parameter curve by equidistant sampling; a curvature calculation unit is in communication connection with the contour parameterization unit, configured to calculate curvature values of each point of the parameter curve by using local polynomial fitting, and generate a curvature distribution map; a curvature flow evolution unit is in communication connection with the curvature calculation unit, configured to set an evolution step, move contour points according to a curvature flow direction, perform adaptive step control, and update the parameter curve; and a feature point extraction unit is in communication connection with the curvature flow evolution unit, configured to identify curvature extreme points and zero-crossing points from the updated parameter curve as key feature points, and generate an optimized contour containing the key feature points. The adaptive step control of the curvature flow evolution unit comprises:
3. The precise micro-displacement photoelectric measuring system according to claim 2, characterized in that, the evolution step is reduced to 0.6 times of the original step in a high curvature area; the evolution step is increased to 1.2 times of the original step in a low curvature area; and the evolution step is limited in a range of 0.01 to 0.
1. The geodesic line constraint positioning module comprises:
4. The precision micro-displacement photoelectric measuring system according to claim 1, wherein, a distance field construction unit is configured to construct a calculation domain with the optimized contour description data as a boundary, and construct a geodesic distance field in the calculation domain by applying a fast marching method; a candidate circle center identification unit is in communication connection with the distance field construction unit, configured to find local maximum points in the geodesic distance field as candidate circle centers, merge candidate circle centers that are too close to each other, and generate a candidate circle center set; and a circle center evaluation unit is in communication connection with the candidate circle center identification unit, configured to evaluate the matching degree of each candidate circle center in the candidate circle center set with a contour, calculate a comprehensive score based on intersection angle distribution uniformity, intersection point number, and radius stability, and select the candidate circle center with the highest score as the best candidate circle center. 5. The precise micro-displacement photoelectric measuring system according to claim 4, characterized in that, The center evaluation unit further includes a sub-pixel optimization unit for fine search in a 3*3 pixel region around the best candidate center with a step of 0.1 pixel, and further optimization of the center position by quadratic interpolation.
6. The precision micro-displacement photoelectric measuring system according to claim 1, wherein, The Riemann optimization module includes: a parameter space construction unit for defining a parameter vector containing the center coordinates, radius and deformation parameters, constructing a target function representing the fitting error, and defining a proper Riemann metric tensor in the parameter space; an optimization search unit in communication connection with the parameter space construction unit, for setting an initial step and an iteration termination condition, calculating the gradient of the target function on the Riemann manifold, determining a search direction, performing a line search, and iteratively updating the parameter vector; and a result evaluation unit in communication connection with the optimization search unit, for extracting a sub-pixel precision target coordinate from the optimized parameter vector, calculating the fitting residual and parameter sensitivity, and performing a reliability rating on the result.
7. The precise micro-displacement optoelectronic measuring system according to claim 6, characterized in that, The optimization search unit performs gradient descent on the Riemann manifold using a preconditioned conjugate gradient method, and further includes a multi-start strategy unit for performing optimization from different initial points and selecting a global optimal solution.
8. The precision micro-displacement photoelectric measuring system according to claim 1, wherein, Further including: an image acquisition module for acquiring an original image containing a light spot; an image preprocessing module in communication connection with the image acquisition module, for performing grayscale, contrast enhancement and median filtering processing on the original image; and a threshold segmentation module in communication connection with the image preprocessing module, for performing threshold segmentation on the preprocessed image to generate a binary image, extracting a light spot contour in the binary image, and transmitting the light spot contour to the curvature flow contour extraction module.
9. The precision micro-displacement photoelectric measuring system according to claim 1, wherein, The displacement calculation module further includes: a coordinate transformation unit for converting the sub-pixel precision target coordinate from a pixel coordinate system to a physical coordinate system; a displacement vector calculation unit in communication connection with the coordinate transformation unit, for calculating the difference of the target coordinates between adjacent image frames to obtain a displacement vector; and a result visualization unit in communication connection with the displacement vector calculation unit, for plotting a displacement trajectory and displaying real-time displacement values and cumulative displacement values.
10. A method for precision micro-displacement optoelectronic measurement, using the precision micro-displacement optoelectronic measurement system according to any one of claims 1-9, characterized in that, Including the following steps: acquiring an original image containing a light spot; preprocessing the original image to obtain a grayscale image; performing threshold segmentation on the grayscale image to obtain a binary image; extracting a light spot contour in the binary image; performing optimization on the light spot contour using curvature flow evolution, including: representing the light spot contour as a parameterized curve, calculating the curvature values of each point on the parameterized curve, performing curvature flow evolution with adaptive step length based on the curvature values, and generating optimized contour description data; constructing a geodesic distance field based on the optimized contour description data, including: constructing a calculation domain with the optimized contour description data as the boundary, and constructing a geodesic distance field in the calculation domain using the fast marching method; identifying local maximum points in the geodesic distance field as candidate centers, evaluating the shape matching degrees of each candidate center, and determining the best candidate center; The sub-pixel positioning problem is converted into an optimization problem on a Riemannian manifold, gradient descent based on a Riemannian metric is performed in a parameter space, and a target coordinate of sub-pixel accuracy is determined; and Displacement changes of the target coordinates between adjacent image frames are calculated, and a micro-displacement measurement result is output.
Citation Information
Patent Citations
Optical micro-displacement measuring system
CN109458934A
Propeller blade curved surface three-dimensional reconstruction method based on point cloud data
CN114332173A
Distributed pose graph optimization method and device based on multi-level graph segmentation
CN116758141A
Method and device for detecting circle center position in laser spot image
CN119494872A
Shearography detection and classification
US20200378751A1