A handwriting depth measurement method based on laser scanning

By acquiring handwriting point cloud data through laser scanning, fitting a reference datum for semantic segmentation and geometric skeleton extraction, and converting it into low-dimensional depth features, the high computational overhead and noise interference problems of handwriting depth measurement in existing technologies are solved, and efficient and reliable handwriting depth feature extraction and comparison are achieved.

CN121564062BActive Publication Date: 2026-03-24XIAMEN UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610090714.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-23
Publication Date
2026-03-24
Estimated Expiration
2046-01-23

AI Technical Summary

Technical Problem

Existing technologies for acquiring handwritten depth information suffer from large data volumes, high computational costs, and severe noise interference, making it difficult to effectively extract and compare handwriting depth features, resulting in low processing efficiency. This is especially problematic in forensic identification and financial transactions where processing latency and device throughput are limited.

Method used

Handwriting point cloud data is acquired by laser scanning, semantic segmentation is performed by fitting a reference datum, non-handwriting regions are removed, geometric skeletons are extracted and segmented into handwriting units, converted into fixed-length depth profiles, and B-spline parameterized compression is used to obtain low-dimensional handwriting depth features.

Benefits of technology

It reduces data storage and transmission costs, improves the efficiency and accuracy of handwriting depth measurement, ensures that depth features can be repeatedly compared under the same reference system, avoids noise interference and repeated measurement, and is suitable for batch acquisition and long-term storage scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121564062B_ABST
    Figure CN121564062B_ABST
Patent Text Reader

Abstract

The application discloses a handwriting depth measurement method based on laser scanning, comprising the following steps: obtaining handwriting laser point cloud data, fitting a reference base surface for the handwriting laser point cloud data, performing semantic segmentation based on the reference base surface, removing non-handwriting areas, and obtaining handwriting candidate areas; performing geometric skeleton extraction on the handwriting candidate areas, performing graph cutting on the skeleton based on geometric skeleton key points, and forming a plurality of handwriting units; converting depth point clouds of the handwriting units into fixed-length depth profiles along the geometric skeleton, and obtaining low-dimensional handwriting depth features through smoothing and denoising and B-spline parameterization compression.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of handwriting depth measurement technology, and in particular to a method for measuring handwriting depth based on laser scanning. Background Technology

[0002] Depth information in handwriting (such as the depth of stroke indentation, pressure distribution, and edge morphology) is of significant value in forensic identification, financial approval verification, educational handwriting assessment, and document preservation. To obtain this depth information, current technologies typically employ structured light, laser triangulation, and confocal scanning to perform 3D scanning of paper or carrier surfaces, acquiring depth maps or point cloud data. However, handwriting indentations are usually small in scale and shallow in depth, and paper texture, creases, and environmental noise are significant. Therefore, before 3D scan data can be used for actual depth measurement and analysis, it usually requires processing steps such as noise reduction, benchmark establishment, handwriting region localization, stroke-level measurement, and comparison to obtain usable handwriting depth parameters.

[0003] Handwriting point clouds have structural characteristics such as thin and connected strokes, cross-connection, and local breaks. If the entire page or section of handwriting is used as the whole object for depth measurement and feature extraction, different stroke depth information is easily mixed in the cross or adjacent stroke areas, resulting in repeated measurement, mismeasurement, or inconsistent statistical standards. At the same time, the direction and length of the whole object vary greatly, making it difficult to align and compare. Local missing parts and local noise are also more likely to have an amplified impact on the global measurement results.

[0004] Furthermore, scanning a single page of paper often generates hundreds of thousands to millions of points, and each point may contain additional information such as reflection intensity, timestamp, and incident angle in addition to three-dimensional coordinates. This results in high storage requirements and significant bandwidth pressure after data acquisition, and significantly increases the computational overhead for denoising, datum fitting, segmentation, and feature calculation. Especially in scenarios requiring batch acquisition, long-term retention, and cross-institutional transmission and verification, such as forensic identification, financial transactions, or archival protection, directly saving and processing the entire raw point cloud does not offer cost and efficiency advantages, and can easily lead to processing link delays, insufficient real-time performance on the device side, and limited system throughput.

[0005] The purpose of this invention is to design a laser scanning-based handwriting depth measurement method to address the problems existing in the prior art. Summary of the Invention

[0006] In view of this, the purpose of this invention is to propose a laser scanning-based handwriting depth measurement method that can solve the above-mentioned problems.

[0007] This invention provides a method for measuring handwriting depth based on laser scanning, comprising:

[0008] S1 acquires handwriting laser point cloud data, fits a reference datum to the handwriting laser point cloud data, performs semantic segmentation based on the reference datum, removes non-handwriting regions, and obtains handwriting candidate regions.

[0009] S2 extracts the geometric skeleton of the handwriting candidate region, and performs graph segmentation on the skeleton based on the key points of the geometric skeleton to form several handwriting units.

[0010] S3 transforms the depth point cloud of the handwriting unit into a fixed-length depth profile along the geometric skeleton, and obtains low-dimensional handwriting depth features through smoothing, denoising, and B-spline parameterization compression.

[0011] The beneficial effects of this invention are:

[0012] First, candidate handwriting regions are screened out by performing morphological filtering or geometric feature extraction on the 3D point cloud. This solves the problem of high background point ratio in the whole page point cloud, which interferes with subsequent measurements and computations. A local reference plane is established within the candidate handwriting region, and height normalization and noise suppression are performed according to the reference plane. This addresses the problems of inconsistent depth references and depth values ​​containing background components caused by paper warping, texture undulations, and scanning zero drift. This ensures that subsequent indices such as depth, width, and edge slope are repeatable and comparable under the same reference system, reducing the interference of paper texture / undulations on depth profile and edge morphology calculations.

[0013] Secondly, by extracting the central skeleton line from the point cloud / depth map of the handwriting region, a foundation is provided for subsequent sampling of depth profiles and cell alignment along the arc length. This transforms planar / voxel data into linear topology, facilitating node identification and segmentation. Topological nodes such as skeleton endpoints, intersections, and bifurcation points are identified, and the skeleton is segmented at these nodes to generate independent stroke segment cells. This breaks down complex connected handwriting into independent stroke segments, avoiding depth overlap and redundant measurements in intersection areas. Based on the skeleton segmentation results, the original point cloud / depth points are assigned to the corresponding stroke segment cells according to the nearest skeleton, projection distance, or neighborhood connectivity. Each processing step only loads / calculates the current cell point cloud, significantly reducing the computational overhead per cycle.

[0014] Third, by sampling the depth of the stroke segment (relative to the reference plane) according to the arc length using the stroke skeleton as the path, a one-dimensional depth sequence is obtained, transforming the high-dimensional point cloud into an ordered depth profile, which facilitates subsequent filtering, fitting, and feature generation. Robust smoothing and noise suppression are applied to the depth sequence to reduce the impact of noise on depth extrema, slope, and morphological features. B-spline basis functions are used to fit the smoothed depth profile, representing the profile as a low-dimensional coefficient vector, compressing the hundreds of point sequences into a small number of coefficients, significantly reducing storage and transmission costs. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings required in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 This is a flowchart of the method in this embodiment. Detailed Implementation

[0017] To facilitate understanding by those skilled in the art, the structure of the present invention will now be described in further detail with reference to the accompanying drawings. It should be understood that, unless otherwise specified, the order of the steps mentioned in this embodiment can be adjusted according to actual needs, and they can even be executed simultaneously or partially simultaneously.

[0018] like Figure 1 As shown, this embodiment of the invention provides a method for measuring handwriting depth based on laser scanning, including:

[0019] S1 acquires handwriting laser point cloud data, fits a reference datum to the handwriting laser point cloud data, performs semantic segmentation based on the reference datum, removes non-handwriting regions, and obtains handwriting candidate regions.

[0020] In this step, the handwriting laser point cloud data is a set of three-dimensional discrete points obtained by scanning the paper surface and its writing indentation / marking areas using laser 3D measurements (such as line laser profilometers, laser displacement sensors, structured light / laser triangulation, etc.). Each point typically contains coordinates and optional sensor information, such as: ,in,( () indicates the position of the writing on the paper. Indicates the height of the writing (including the overall undulation of the paper and the depth of the indentation)). Indicates the intensity of reflection. Indicates the scan time. The laser incident angle is indicated. Handwriting marks are often shallow and small in scale, while paper texture and deformation are strong, resulting in a lot of noise. Therefore, depth measurement cannot be performed directly from the raw point cloud. A high proportion of non-handwriting areas (paper texture, creases, stains, background, edge reflections) can lead to subsequent mis-segmentation / miscutting. Therefore, this step narrows down the entire scene point cloud to areas that "may contain handwriting," reducing irrelevant points, improving subsequent processing speed and accuracy, and outputting candidate confidence scores for quality control.

[0021] S101 inputs the handwriting laser point cloud data into the point cloud denoising network to obtain the denoised handwriting laser point cloud data and its noise uncertainty.

[0022] S1011 constructs a point cloud denoising network through a coordinate residual regression model. Historical noisy handwriting laser point cloud data is input into the point cloud denoising network to obtain the predicted noise correction amount.

[0023] S1012 calculates the actual noise correction amount based on the corresponding historical clean handwriting laser point cloud data, calculates the loss based on the difference between the predicted noise correction amount and the actual noise correction amount, and backpropagates it to train the point cloud denoising network.

[0024] S1013 inputs the handwriting laser point cloud data to be denoised into the trained point cloud denoising network to obtain the noise correction amount and noise uncertainty, and corrects the input point cloud through the noise correction amount to obtain the denoised handwriting laser point cloud data.

[0025] In this step, traditional filtering often mistakenly removes shallow indentations as noise or leaves residual noise, affecting subsequent datum / segmentation. Point cloud denoising networks, on the other hand, take noisy point clouds as input and learn from real handwriting point clouds through neural networks, outputting handwriting point cloud data that more closely resembles the real surface. A coordinate residual regression model can be used to construct the point cloud denoising network, predicting the correction amount for each point cloud and then correcting the noisy input point cloud accordingly. Its superior suitability for "shallow indentations" compared to traditional filtering lies in its approach: instead of using a fixed threshold to identify outliers, it learns to distinguish them using neighborhood geometry and contextual shape priors. Handwriting indentations are structured, continuous, and minute deformations, while noise is often random and inconsistent perturbations. Furthermore, the neural network can output noise uncertainty to control error propagation; if all points are treated equally in subsequent datum fitting, high-noise points will distort the datum.

[0026] S102 uses noise uncertainty as a weight to perform weighted datum fitting to obtain a datum model, and calculates the datum value, relative depth and datum confidence of each point accordingly.

[0027] S1021 takes the i-th point in the denoised handwriting laser point cloud data and obtains its noise uncertainty. Calculate weights The calculation formula is as follows:

[0028] ,

[0029] in, >0 indicates a preset positive number, used to avoid a denominator of 0 and to suppress extreme weights;

[0030] S1022 is based on the coordinates of each point in the denoised handwriting laser point cloud data. , , ) and their corresponding weights The base plane parameters are solved by weighted least squares method. To minimize the objective function, the base plane model is obtained, and the calculation formula is as follows:

[0031] ,

[0032] Among them, the base model is , Indicates the plane in The slope of the direction, This represents the slope of the plane in the y-direction. This indicates the overall height offset of the plane. This represents the number of denoised point clouds involved in the datum estimation;

[0033] S1023 utilizes the fitted base plane parameters Calculate the base plane value for each point. and relative depth The calculation formula is as follows:

[0034]

[0035] ,

[0036] S1024 is based on the weight of each point and relative depth Calculate the weighted mean square error Based on weighted mean square error With preset scale parameters Calculate the confidence level of the basal plane. The calculation formula is as follows:

[0037] ,

[0038] ,

[0039] in, This represents an exponential function.

[0040] In this step, the z-axis of the laser point cloud often contains a large number of systematic components, such as the overall tilt of the paper, scanning installation angle errors, paper warping / bending, and page curvature. Directly using the raw z-axis to determine "where the dent is" will treat these systematic deformations as "depth," leading to false positives / false negatives.

[0041] The purpose of datum fitting is to establish a reference paper surface model (the simplest being a plane, but it can also be a low-order curved surface) to explain the "overall shape of the paper," leaving only a more accurate representation of localized, minute deformations like "pen indentations." Datum fitting yields a set of model parameters, and calculating datum values ​​involves placing this model onto the position of each point. Relative depth essentially transforms absolute coordinate features into more directly physically meaningful indentation features. If the paper is raised slightly or the scanning stage height changes, the absolute z-axis will drift overall, but the relative depth remains essentially unchanged. However, datum fitting is not always reliable: creases, severe warping, missing areas, residual noise, or incorrect inclusion of pen points in the fit can all render the "datum model" unreliable. Datum confidence quantifies the reliability of the relative depth for subsequent decision-making.

[0042] S103 inputs the denoised handwriting laser point cloud data and its relative depth into the point cloud semantic segmentation network to output point-level handwriting probabilities. Based on noise uncertainty and datum confidence, the handwriting probabilities are fused to obtain point-level fusion scores.

[0043] In this step, the handwriting probability is the confidence level output of the point cloud semantic segmentation network for the i-th handwriting-related point. The larger the value, the more the network considers the point to be handwriting; the smaller the value, the more it considers it to be background (paper surface, paper texture, noise, etc.). However, this handwriting probability can also be unreliable. Therefore, the final fusion score is obtained by weighting the noise uncertainty and the datum confidence. If any one of these factors is very low (unlike handwriting / point unreliability / datum unreliability), the final score will be suppressed, thereby reducing false positives and improving cross-page conditional robustness.

[0044] By locating the handwriting area, establishing a reference plane, and removing noise from the reference plane, subsequent calculations can be performed without blindly calculating on the entire page's high-density point cloud. Instead, they can be performed within a controlled handwriting candidate area and under a unified reference, avoiding the inclusion of a large amount of background information unrelated to handwriting, such as page undulations and paper textures, into subsequent calculations.

[0045] S104 removes handwriting regions with fusion scores below the fusion threshold to obtain a set of suspected handwriting points. The set of suspected handwriting points is then aggregated to obtain candidate handwriting regions and their confidence scores.

[0046] In this step, thresholding only provides a discrete set of suspected handwriting points, but the application layer usually needs region-level results, including the candidate regions and their confidence scores for each stroke / character / segment of stroke. Each stroke corresponds to a cluster of adjacent points, and clustering merges these points into handwriting candidate regions.

[0047] S2 extracts the geometric skeleton of the handwriting candidate region, and performs graph segmentation on the skeleton based on the key points of the geometric skeleton to form several handwriting units.

[0048] In this step, the handwriting candidate region is only a cluster of pixels / point clouds (area-like), but depth measurement requires a "profile along the writing path". Candidate regions often have intersections, overlaps, and connections; directly performing statistics on the region will mix different strokes together (repeated measurements at intersections, inconsistent boundary directions). This leads to redundancy in the subsequently obtained depth feature information, affecting subsequent handwriting identification.

[0049] S201 converts the point cloud of handwriting candidate regions into a skeletonizable two-dimensional representation, performs morphological cleaning, and then extracts the handwriting skeleton.

[0050] S2011 projects the point cloud of the handwriting candidate region onto the base coordinate system and performs rasterization imaging to generate a binary mask of the handwriting.

[0051] S2012 performs morphological cleaning on the binary handwriting mask, repairing breaks, filling holes, and removing small noise to obtain a cleaned handwriting mask.

[0052] S2013 performs skeletonization processing on the purified handwriting mask to obtain a handwriting skeleton with a width of one pixel.

[0053] In this step, since the handwriting candidate area data is still point cloud data, the uneven density, occlusion, missing points, and local outliers in the point cloud data can lead to unstable connectivity. Therefore, it is necessary to project and binarize it. After projecting onto the base plane, the handwriting mainly manifests as the trajectory shape on a two-dimensional plane, and structures such as connectivity, bifurcation, and intersection are easier to define and process.

[0054] If the skeleton is not extracted from the strokes in the mask, the intersection points will become a cluster of regions, making it impossible to determine the "intersection position" and the fragment boundaries will be unclear, resulting in unstable segmentation. After skeletonization, it becomes a single-pixel center line, with one stroke corresponding to one path, which is suitable for subsequent graph modeling and path segmentation.

[0055] S202 converts the handwriting skeleton into skeleton point geometry, calculates the node attributes of each skeleton point, constructs a skeleton graph based on the adjacency relationship between skeleton points, and calculates the edge attributes of each node in the skeleton graph.

[0056] In this step, the handwriting skeleton is converted into a set of skeleton points. The node attributes of each skeleton point are calculated, including adjacency degree (directly characterizing the node type prior (endpoint ≈ 1, ordinary point ≈ 2, intersection ≥ 3)), local direction / curvature (describing the local orientation and degree of bending, used to distinguish inflection points from ordinary points, and improving robustness to noise and jagged edges (more stable through local statistics)), local width (reflecting stroke thickness and imaging / projection errors, helpful for identifying bifurcation morphology and skeleton offset), and the corresponding relative depth (binding the indentation information of the point cloud with the skeleton position, forming a "shape-depth" correspondence, providing a foundation for subsequent depth regression / fragment representation). A skeleton graph is constructed based on the adjacency relationships between skeleton points, resulting in a skeleton graph with skeleton points as nodes and adjacent connections as edges. Edge attributes (such as edge length and direction difference) are calculated for each edge. Edge length and direction difference can characterize the geometric changes between adjacent nodes, used to describe whether a stroke is smooth locally, whether there are sharp turns or abnormal jumps, and can be used as fragment-level aggregation features after segmentation.

[0057] S203 inputs the skeleton graph into a pre-trained graph neural network key point detection model to identify key skeleton points and performs stabilization processing to obtain a set of key points;

[0058] S2031 takes the training set skeleton graph and its key point annotations as input, trains the graph neural network key point detection model, outputs the node key point category and its probability, and updates the model parameters based on backpropagation based on the classification loss.

[0059] S2032 inputs the skeleton graph to be processed into the trained graph neural network key point detection model to obtain the key point category and probability of each skeleton point, forming a key point candidate set.

[0060] S2033 performs non-maximum suppression and neighbor merging on the candidate set of key points, and corrects false key points by combining the skeleton topology consistency rule, thus obtaining the set of key points.

[0061] In this step, key positions (endpoints / intersections / inflection points, etc.) in the handwriting structure are automatically and stably located on the obtained handwriting skeleton map, and a set of key points is output as "segmentation anchor points" for subsequent S204 image segmentation. Segmentation is very sensitive to the position of key points. A drift of a key point by a few pixels may cause significant changes in the length, direction, and number of segments, affecting subsequent segment representation and depth regression. The skeleton map itself cannot guarantee this stability.

[0062] Graph Neural Networks (GNNs) can make judgments based on the context of the neighborhood on the skeleton graph, rather than just looking at the degree of a single point. The essence of key points is "structural events" (bidding, termination, significant turning points), which often require examining the connectivity, directional consistency, curvature changes, and depth statistics of a neighborhood for robust judgment. GNNs fuse information from neighboring nodes through message passing on the graph, learning differences such as "spurious ends vs. true endpoints" and "true intersections vs. multiple nearest-neighbor bifurcation points generated by skeletonization," making them more robust to noise and more generalizable than manual thresholding.

[0063] S204 uses the set of key points as the segmentation anchor points to perform graph segmentation on the skeleton graph, extracts the skeleton paths between key points that do not contain other key points, generates several handwriting fragments, and obtains handwriting units after optimization.

[0064] In this step, the handwriting unit is optimized, including removing excessively short segments, merging adjacent segments that are approximately collinear and continuous, and repairing locally broken segments.

[0065] Instead of character recognition, the handwriting is segmented into "segmentation between key points" based on the skeleton's topological key points. The analysis unit changes from "characters / words" to content-independent structural fragments, thus making it applicable to unknown content (such as signatures, doodles, cursive writing, etc.). The entire complex handwriting image is divided into basic segments with clear topology, simple geometry, and measurability, and stabilized through "removing short segments, merging collinear segments, and repairing breaks," resulting in handwriting units that can be reused across different types of paper, pens, and pressure levels.

[0066] Furthermore, by dividing the handwriting region in the entire point cloud into multiple stroke units, each unit retains only the point cloud / skeleton / profile data related to that stroke segment. Background points and points not in the current stroke segment are no longer included in the unit's data structure, significantly reducing the overall scale of data that needs to be processed and stored. After the entire page of millions of point clouds is divided into multiple small units, depth calculation, feature extraction, and comparison can all be performed independently at the unit level, avoiding high-complexity calculations on the entire point cloud. The units are independent of each other and can be processed in parallel naturally; at the same time, a structured entry point is provided for subsequent "storage / retrieval / comparison by unit", avoiding loading the entire page of data for each comparison.

[0067] S3 transforms the depth point cloud of the handwriting unit into a fixed-length depth profile along the geometric skeleton, and obtains low-dimensional handwriting depth features through smoothing, denoising, and B-spline parameterization compression.

[0068] In this step, the 3D depth point cloud within each trace unit is converted into a fixed-length depth profile sequence that can be aligned and compared along the writing path. Low-dimensional depth features are obtained through denoising, B-spline parameter fitting, and quantization encoding to reduce storage and transmission overhead, while preserving depth shape information (such as concave peaks / valleys, gradual width variations, etc.) as much as possible.

[0069] S301 uniformly resamples each handwriting unit along its geometric skeleton arc length to obtain the sampling position. Within the neighborhood of each sampling position, based on the relative depth of the point cloud, it obtains the depth profile sampling value, forming a unit relative depth sequence. The calculation formula is as follows:

[0070] ,

[0071] ,

[0072] = ,

[0073] in, Represents the relative depth sequence of cells. k Represents the sequence index, with values ​​from 1 to... K , K This indicates the number of sampling points relative to the depth sequence of this unit. Represents a handwriting unit. This represents the depth profile sample value. Indicates the first k One skeleton sampling location, express The set of neighborhood points, This represents the relative depth of point i. This indicates that the sampled values ​​of this depth profile are used as the relative depth sequence of the cell. X The k One element;

[0074] In this step, resampling transforms complex point clouds into fixed-length sequences, facilitating subsequent unified fitting and comparison. Neighborhood convergence converts local point sets into stable statistics, reducing the impact of local missing points and outliers. Sampling along the skeleton arc length allows different units to have consistent parameterized axes from start to end, promoting feature consistency.

[0075] S302 smooths and denoises the relative depth sequence of cells to obtain a smooth sequence;

[0076] S3021 constructs a smoothing objective function for the relative depth sequence of cells, and the calculation formula is as follows:

[0077] ,

[0078] in, Represents the relative depth sequence of cells. k Represents the sequence index, with values ​​from 1 to... K , K This indicates the number of sampling points relative to the depth sequence of this unit. Let the smoothing sequence be to be determined. Represents the loss function. Indicates the first k The residuals between the smoothed values ​​and the original values ​​at each position Represents the smoothing coefficient. Indicates the second-order difference. Represents a smooth sequence. Represents all possible sequences Y In the process, we seek the optimal solution that minimizes the objective function.

[0079] S3022 uses an iterative optimization method to obtain the optimal solution, and outputs it as the cell relative depth sequence after smoothing and denoising.

[0080] In this step, the convergence in step S301 will still leave "jagged edges / burrs" (scanning noise, missing neighborhoods, local missegmentation). Therefore, a smoothing term is needed to suppress high-frequency jitter, but it should not over-smooth out the real indentation changes: the fidelity term ρ is constrained to be consistent with the original sequence, and the robust loss can suppress a small number of outliers but retain the overall shape. This provides a stable input for the fitting in S303, avoids the fitting parameters being driven by noise, and improves the repeatability of the coefficient features.

[0081] S303 uses several preset B-spline basis functions to parametrically fit the smooth sequence, obtaining the B-spline basis function coefficient vector, which is then used as a candidate low-dimensional handwriting depth feature.

[0082] S3031 pre-defines several B-spline basis functions, which are used to fit a smooth sequence. The calculation formula is as follows:

[0083] ,

[0084] in, This represents the number of B-spline basis functions. Represents the B-spline basis function index. Indicates the first A B-spline basis function, Indicates the first The vector coefficients of a B-spline basis function Indicates smooth sequence in The value at;

[0085] S3032 constructs the design matrix, and the coefficient vector of the B-spline basis function is solved using the least squares method. The calculation formula is as follows:

[0086] ,

[0087] ,

[0088] ,

[0089] in, Represents the design matrix. Design function for K OK P A real matrix of columns, This represents the regularization coefficient, used to suppress overfitting. Represents the square of the L2 norm. This represents the coefficient vector of the B-spline basis functions. This represents the difference between the predicted sequence and the smoothed sequence. Indicates all possible In the process, select the optimal solution that minimizes the objective function;

[0090] S3033 uses the B-spline basis function coefficient vector as a candidate low-dimensional handwriting depth feature for handwriting units.

[0091] In this step, the number of K numbers is changed to P coefficients. Subsequently, only 'a' needs to be stored to represent the profile shape, thus achieving data compression and dimensionality reduction. The profile is usually continuous and locally varied. B-splines provide local support, have strong expressive power, and are numerically stable.

[0092] B-spline basis functions are a set of piecewise polynomial basis functions determined by their order and knot vectors, used to linearly represent a spline curve / function. The pen pressure variation in handwriting indentations is often localized—for example, a slight increase in pressure only in the middle of a stroke. This local variation can be expressed using one or more coefficients of the B-spline function, preventing global features from being disrupted by local anomalies. Different stroke segments are already divided into different handwriting units by S2 on the skeleton; the locality of B-splines can accurately characterize the depth variation of each unit without affecting each other.

[0093] S304 standardizes and quantizes candidate low-dimensional handwriting depth features to obtain low-dimensional handwriting depth features.

[0094] In this step, the candidate low-dimensional handwriting depth features are scale-aligned (normalized), and then the floating-point coefficients are quantized into a few-bit integer code to achieve further compression and facilitate storage / retrieval / transmission.

[0095] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0096] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0097] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0098] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0099] It should be noted that any reference signs placed between parentheses in the claims should not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claims. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. The invention can be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The words first, second, and third, etc., do not indicate any order. These words can be interpreted as names.

[0100] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the invention.

[0101] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

[0102] In this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0103] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms should not be construed as necessarily referring to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

Claims

1. A method for measuring handwriting depth based on laser scanning, characterized in that, include: S1 acquires handwriting laser point cloud data, fits a reference datum to the handwriting laser point cloud data, performs semantic segmentation based on the reference datum, removes non-handwriting regions, and obtains handwriting candidate regions, including: S101 inputs the handwriting laser point cloud data into the point cloud denoising network to obtain the denoised handwriting laser point cloud data and its noise uncertainty. S102 uses noise uncertainty as a weight to perform weighted datum fitting to obtain a datum model, and calculates the datum value, relative depth, and datum confidence at each point, including: S1021 takes the i-th point in the denoised handwriting laser point cloud data and obtains its noise uncertainty. Calculate weights The calculation formula is as follows: , in, >0 indicates a preset positive number, used to avoid a denominator of 0 and to suppress extreme weights; S1022 is based on the coordinates of each point in the denoised handwriting laser point cloud data. , , ) and their corresponding weights The base plane parameters are solved by weighted least squares method. To minimize the objective function, the base plane model is obtained, and the calculation formula is as follows: , Among them, the base model is , Indicates the plane in The slope of the direction, This represents the slope of the plane in the y-direction. This indicates the overall height offset of the plane. This represents the number of denoised point clouds involved in the datum estimation; S1023 utilizes the fitted base plane parameters Calculate the base plane value for each point. and relative depth The calculation formula is as follows: , , S1024 is based on the weight of each point and relative depth Calculate the weighted mean square error Based on weighted mean square error With preset scale parameters Calculate the confidence level of the basal plane. The calculation formula is as follows: , , in, Represents an exponential function; S103 inputs the denoised handwriting laser point cloud data and its relative depth into the point cloud semantic segmentation network to output point-level handwriting probabilities. Based on noise uncertainty and datum confidence, the handwriting probabilities are fused to obtain point-level fusion scores. S104 removes handwriting regions with fusion scores below the fusion threshold to obtain a set of suspected handwriting points. The set of suspected handwriting points is then aggregated to obtain candidate handwriting regions and their confidence scores. S2 extracts the geometric skeleton of the handwriting candidate region, and performs graph segmentation on the skeleton based on the key points of the geometric skeleton to form several handwriting units. S3 converts the depth point cloud of the handwriting unit into a fixed-length depth profile along the geometric skeleton, including: For each handwriting unit, uniform resampling is performed along its geometric skeleton arc length to obtain the sampling position. Within the neighborhood of each sampling position, depth profile sampling values ​​are obtained based on the relative depth of the point cloud, forming a unit relative depth sequence. The calculation formula is as follows: , , = , in, Represents the relative depth sequence of cells. k Represents the sequence index, with values ​​from 1 to... K , K This indicates the number of sampling points relative to the depth sequence of this unit. Represents the handwriting unit. This represents the depth profile sample value. Indicates the first k One skeleton sampling location, express The set of neighborhood points, This represents the relative depth of point i. This indicates that the sampled values ​​of this depth profile are used as the relative depth sequence of the cell. X The k One element; Low-dimensional handwriting depth features are obtained through smoothing denoising and B-spline parameterization compression.

2. The method for measuring handwriting depth based on laser scanning according to claim 1, characterized in that, The step of inputting the handwriting laser point cloud data into the point cloud denoising network to obtain the denoised handwriting laser point cloud data and its noise uncertainty includes: S1011 constructs a point cloud denoising network through a coordinate residual regression model. Historical noisy handwriting laser point cloud data is input into the point cloud denoising network to obtain the predicted noise correction amount. S1012 calculates the actual noise correction amount based on the corresponding historical clean handwriting laser point cloud data, calculates the loss based on the difference between the predicted noise correction amount and the actual noise correction amount, and backpropagates it to train the point cloud denoising network. S1013 inputs the handwriting laser point cloud data to be denoised into the trained point cloud denoising network to obtain the noise correction amount and noise uncertainty, and corrects the input point cloud through the noise correction amount to obtain the denoised handwriting laser point cloud data.

3. The method for measuring handwriting depth based on laser scanning according to claim 1, characterized in that, The step of extracting the geometric skeleton of the handwriting candidate region and segmenting the skeleton based on the key points of the geometric skeleton to form several handwriting units includes: S201 converts the point cloud of handwriting candidate regions into a skeletonizable two-dimensional representation, performs morphological cleaning, and then extracts the handwriting skeleton. S202 converts the handwriting skeleton into skeleton point geometry, calculates the node attributes of each skeleton point, constructs a skeleton graph based on the adjacency relationship between skeleton points, and calculates the edge attributes of each node in the skeleton graph. S203 inputs the skeleton map into a pre-trained graph neural network key point detection model to identify key skeleton points and performs stabilization processing to obtain a set of key points; S204 uses the set of key points as the segmentation anchor points to perform graph segmentation on the skeleton graph, extracts the skeleton paths between key points that do not contain other key points, generates several handwriting fragments, and obtains handwriting units after optimization.

4. The method for measuring handwriting depth based on laser scanning according to claim 3, characterized in that, The step of converting the handwriting candidate region point cloud into a skeletonizable two-dimensional representation, performing morphological cleaning, and then extracting the handwriting skeleton includes: S2011 projects the point cloud of the handwriting candidate region onto the base coordinate system and performs rasterization imaging to generate a binary mask of the handwriting. S2012 performs morphological cleaning on the binary handwriting mask, repairing breaks, filling holes, and removing small noise to obtain a cleaned handwriting mask. S2013 performs skeletonization processing on the purified handwriting mask to obtain a handwriting skeleton with a width of one pixel.

5. The method for measuring handwriting depth based on laser scanning according to claim 3, characterized in that, The process of inputting the skeleton map into a pre-trained graph neural network keypoint detection model to identify key skeleton points and performing stabilization processing to obtain a keypoint set includes: S2031 takes the training set skeleton graph and its key point annotations as input, trains the graph neural network key point detection model, outputs the node key point category and its probability, and updates the model parameters based on backpropagation based on the classification loss. S2032 inputs the skeleton graph to be processed into the trained graph neural network key point detection model to obtain the key point category and probability of each skeleton point, forming a key point candidate set. S2033 performs non-maximum suppression and neighbor merging on the candidate set of key points, and corrects false key points by combining the skeleton topology consistency rule, thus obtaining the set of key points.

6. The method for measuring handwriting depth based on laser scanning according to claim 1, characterized in that, The process of converting the depth point cloud of handwriting units into a fixed-length depth profile along a geometric skeleton, and obtaining low-dimensional handwriting depth features through smoothing denoising and B-spline parameterization compression, includes: S302 smooths and denoises the relative depth sequence of cells to obtain a smooth sequence; S303 uses several preset B-spline basis functions to parametrically fit the smooth sequence, obtaining the B-spline basis function coefficient vector, which is then used as a candidate low-dimensional handwriting depth feature. S304 standardizes and quantizes candidate low-dimensional handwriting depth features to obtain low-dimensional handwriting depth features.

7. The method for measuring handwriting depth based on laser scanning according to claim 6, characterized in that, The process of smoothing and denoising the relative depth sequence of the units to obtain a smooth sequence includes: S3021 constructs a smoothing objective function for the relative depth sequence of cells, and the calculation formula is as follows: , in, Represents the relative depth sequence of cells. k Represents the sequence index, with values ​​from 1 to... K , K This indicates the number of sampling points relative to the depth sequence of this unit. Let the smoothing sequence be to be determined. Represents the loss function. Indicates the first k The residuals between the smoothed values ​​and the original values ​​at each position Represents the smoothing coefficient. Indicates the second-order difference. Represents a smooth sequence. Represents all possible sequences Y In the process, we seek the optimal solution that minimizes the objective function. S3022 uses an iterative optimization method to obtain the optimal solution, and outputs it as the cell relative depth sequence after smoothing and denoising.

8. The method for measuring handwriting depth based on laser scanning according to claim 6, characterized in that, The step of parametrically fitting the smooth sequence using several preset B-spline basis functions to obtain the B-spline basis function coefficient vector, and using it as a candidate low-dimensional handwriting depth feature, includes: S3031 pre-defines several B-spline basis functions, which are used to fit a smooth sequence. The calculation formula is as follows: , in, This represents the number of B-spline basis functions. Represents the B-spline basis function index. Indicates the first One B-spline basis function, Indicates the first The vector coefficients of a B-spline basis function Indicates smooth sequence in The value at; S3032 constructs the design matrix, and the coefficient vector of the B-spline basis function is solved using the least squares method. The calculation formula is as follows: , , , in, Represents the design matrix. Design function for K OK P A real matrix of columns, This represents the regularization coefficient, used to suppress overfitting. Represents the square of the L2 norm. This represents the vector of coefficients of the B-spline basis functions. This represents the difference between the predicted sequence and the smoothed sequence. Indicates all possible In the process, select the optimal solution that minimizes the objective function; S3033 uses the B-spline basis function coefficient vector as a candidate low-dimensional handwriting depth feature for handwriting units.

Citation Information

Patent Citations

  • Skeleton data behavior training method and device, storage medium and electronic equipment

    CN117576782A

  • Laser inertial odometer method based on plane merging strategy and computer device

    CN119022955A