Point cloud-based delineation type marking character defect and depth detection system and method
By using a point cloud-based engraving method for detecting character defects and depth, the problems of low detection efficiency, high equipment cost, and insufficient depth measurement in existing technologies are solved. This method achieves simultaneous and accurate measurement of character defects and depth, thereby improving detection efficiency and process stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TIANJIN UNIV OF TECH & EDUCATION (TEACHER DEV CENT OF CHINA VOCATIONAL TRAINING & GUIDANCE)
- Filing Date
- 2026-06-09
- Publication Date
- 2026-07-10
Smart Images

Figure CN122368064A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of machine vision, 3D measurement and industrial automation technology, and in particular to a point cloud-based system and method for detecting defects and depth in engraved character marking. Background Technology
[0002] Scribing technology creates permanent indentations on the surface of hard materials such as metals through physical impact, offering excellent durability, corrosion resistance, and high-temperature stability. However, due to limitations in processing technology and manufacturing environment, various defects are unavoidable during the character generation process, such as incompleteness, skewness, adhesion, multiple printings, misprints, omissions, and duplicate printing. Furthermore, in industrial character defect detection scenarios, the workpiece surface often undergoes multiple modification treatments due to product functionality and aesthetic design requirements, resulting in a non-ideal uniform background for the marking substrate. Current character defect detection methods include manual visual inspection, traditional image processing, deep learning, and multispectral imaging, but each has its limitations.
[0003] Currently, in existing character defect detection technologies, manual visual inspection is time-consuming and prone to false positives due to eye fatigue. While deep learning methods, which target two-dimensional images, offer high accuracy and adaptability to complex environments, they are qualitative methods and cannot provide specific percentages of defect area. Traditional image processing often uses template matching, which is less accurate than deep learning and multispectral imaging and cannot directly pinpoint the size and location of defects. Furthermore, these technologies cannot simultaneously and accurately measure character inscription depth. Character defect detection and depth measurement are typically performed using different sensors in two separate processes, resulting in low detection efficiency, high equipment costs, and an inability to establish a correlation between appearance quality and structural quality.
[0004] Currently, the methods for detecting the depth of marked characters on the market are generally divided into two categories: traditional detection methods that use height measuring instruments and detection methods that use 3D scanning technology to obtain point cloud data. The former is gradually being phased out due to its low detection efficiency, while the latter is currently the mainstream method on the market. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of the prior art and propose a point cloud-based system and method for detecting defects and depth in marking characters. This system can perform pixel-level comparison between the outline of the marked character and the outline of the standard character, achieve accurate positioning of missing and redundant parts, and accurately measure the character marking depth, providing an accurate detection method for production applications with high marking quality requirements.
[0006] The technical problem solved by this invention is achieved through the following technical solution: A point cloud-based method for detecting defects and depth in delineated characters includes the following steps: Step 1: Preprocessing raw point cloud data; Step 1.1: Collect point cloud data through the point cloud data acquisition control module and send the data to the data processing control module in PLY format; Step 1.2: Perform connected component segmentation on the collected data to filter out noisy point clouds; Step 1.3: Perform secondary denoising on the point cloud 3D model after the first denoising; Step 1.4: Process the point cloud 3D model to obtain relevant data for subsequent processing; Step 2: Quantitatively detect character outline defects in the preprocessed data from Step 1 to obtain character defects; Step 2.1: Further filter the point cloud region of each character, remove the background point cloud, and retain the point cloud data of the character itself; Step 2.2: Extract each character region, merge all character regions, obtain the coordinates of the X, Y, and Z directions in the 3D object model, generate an overall depth map, and convert the 3D point cloud projection into a 2D character outline image; Step 2.3: Perform automatic global thresholding on the generated two-dimensional image to obtain a single character region; Step 2.4: Sort the different character regions in ascending order of their horizontal coordinates; Step 2.5: Perform defect detection processing on the sorted character regions sequentially; Step 3: Measure the character engraving depth in the preprocessed data from Step 1 to obtain the depth of each character; Step 3.1: Further filter the point cloud data subset in terms of characters, remove the engraved material accumulation part and the background part from the height, and only retain the point cloud data of the engraving part below the workpiece plane; Step 3.2: Divide the characters into several discontinuous regions and filter them according to the number of point clouds, and then obtain the Z-axis coordinate array of the filtered regions; Step 3.3: The obtained Z-axis coordinate array is progressively narrowed down by step size and filtered using a point threshold to approximate the true depth value; Step 3.4: Set the obtained minimum Z-axis coordinate value as the depth value of the current small region. After obtaining all the depth values of the character region, take the minimum value as the point cloud depth and determine whether it is qualified.
[0007] Moreover, the specific implementation method of step 1.2 is as follows: obtain the Z-axis coordinate array of the original point cloud data, take the middle value and the minimum value as the parameter range, filter the point cloud according to this range, remove the point cloud of the workpiece plane part and the character material accumulation part, and only retain the point cloud of the scratch part; perform the first connected component segmentation on the point cloud of this part, and classify the point cloud with the Euclidean distance less than the first preset parameter into the same instance; then filter according to the number of point clouds of each instance object to remove noisy point clouds.
[0008] Furthermore, the further filtering of each character point cloud region in step 2.1 specifically includes: based on the Y-axis coordinate range of a single character point cloud data set, and based on the obtained values, dividing the character region into two smaller regions at the top and bottom; taking the average Z-axis coordinate of each smaller region and setting it as Z1 and Z2, where Z1>Z2; taking all point clouds in the entire character region with Z-axis coordinates greater than Z1 and less than Z2 as the region of the character itself, in order to remove the background part of the workpiece surface.
[0009] Furthermore, step 2.5 includes the following steps: Step 2.5.1: Perform morphological processing on individual character regions to eliminate noise and holes; Step 2.5.2: Perform an affine transformation on the character region based on the center point coordinates of a single character, and transform the shape of the region to extract features; Step 2.5.3: Retrieve standard characters from the character library and align the standard character area with the character area; Step 2.5.4: Perform a difference operation between the aligned standard character area and the actual marking character area to obtain the non-overlapping area as the defect area; Step 2.5.4: Calculate the ratio of the non-overlapping area to the standard character area, and determine whether it is qualified based on the preset ratio threshold.
[0010] Furthermore, the specific implementation method of the affine transformation in step 2.5.2 is as follows: copy the character region, rotate it 180° around its center point and translate it to the left by a preset multiple of the character width; merge the original character region with the region after the affine transformation; obtain the smallest outer rectangle of the merged entire region, thereby obtaining the tilt angle of the character region relative to the X-axis.
[0011] Moreover, the specific implementation method of step 3.1 is the same as that of step 2.1, removing the background part and material accumulation part on the workpiece surface, and only retaining the point cloud data of the scratch depth.
[0012] Moreover, the specific implementation method of step 3.3 is as follows: obtain the minimum value in the Z-axis coordinate array; and perform a loop, increasing the step size in each loop to filter out the point cloud coordinates falling within the current interval, forming a new one-dimensional array; determine whether the number of point clouds in the new one-dimensional array is greater than the first quantity threshold, and if so, record the minimum Z-axis coordinate value of the current interval; then set a second small step size and reduce the point cloud quantity threshold to the second quantity threshold, and repeat the point cloud filtering, quantity threshold judgment and minimum Z-axis coordinate recording process within the effective interval obtained by the first step size until the minimum Z-axis coordinate value close to the actual depth is obtained.
[0013] A detection system for a point cloud-based method for detecting defects and depth in inscribed characters includes a hardware component and a control component, wherein the control component controls the hardware component. The hardware components include a laser profilometer, a robotic arm motion mechanism, a PLC, and a computer. The control components include a point cloud data acquisition control module and a data processing control module. The point cloud data acquisition control module is used to set acquisition parameters, send a start acquisition signal to the robotic arm motion mechanism via the PLC, and send a start acquisition signal to the laser profilometer. It receives and stores the point cloud data acquired by the laser profilometer, and then transmits the point cloud data to the data processing control module. The data processing control module has parallel processing capabilities and is used to process the received point cloud data using the HALCON algorithm library.
[0014] Moreover, during operation, the initial position of the laser profilometer is first adjusted by the robotic arm, and then the robotic arm's motion trajectory is planned by the computer-controlled robotic arm based on the workpiece size. The point cloud data acquisition and control module pre-sets the amount of data to be collected by the laser profilometer according to the workpiece size. After scanning begins, the robotic arm drives the laser profilometer to maintain a constant height above the workpiece surface in the vertical direction and moves horizontally along the workpiece. During the movement, the laser profilometer scans the workpiece to acquire character point cloud data and transmits the scanned data to the point cloud data acquisition and control module in PLY format. After scanning is completed, the robotic arm is moved to return the laser profilometer to its initial position. The scanning process is repeated as needed.
[0015] The advantages and positive effects of this invention are: 1. In the character point cloud data extraction stage, this invention employs a two-stage progressive connected component segmentation and filtering strategy. The first segmentation significantly reduces the number of instance objects, thereby reducing the time required for point cloud partitioning. During the second segmentation, since noisy point clouds exceeding the threshold of the first segmentation have been removed, there is no need to perform instance partitioning on them again, thus shortening the overall data processing time.
[0016] 2. During marking, the characters may have a certain tilt angle with the X-axis, requiring an affine transformation of the contour image to correct the angle. Because the shapes of numbers or letters are irregular, directly obtaining the angle with the X-axis using the minimum bounding rectangle is inaccurate. This invention proposes a method to obtain the actual tilt angle of the character: rotate the character 180 degrees around its center point and translate it by a certain character width, overlapping it with the original character. Obtain the minimum bounding rectangle based on the overlapping character and calculate the angle with the X-axis, then perform an affine transformation to correct the character angle.
[0017] 3. During the engraving process, the engraving tool inserts into the workpiece surface to carve characters, resulting in material accumulation near the strokes. For contour defect detection and depth measurement, the Z-axis coordinates of the top and bottom of the character are first selected. Then, the midpoint between these two coordinates is taken from the point cloud Z-axis to obtain the Z-axis coordinates Z1 and Z2 of the workpiece surface. Comparing these two coordinates, the portion in the point cloud data that is higher than Z1 and Z2 is the material accumulation area, and the portion lower than Z1 and Z2 is the engraving area. In depth measurement, only the engraving area is selected, and the average depth is calculated based on the strokes to obtain an accurate character engraving depth. This provides a basis for the dynamic adjustment of key parameters such as air pump pressure and impact frequency, ultimately significantly enhancing the product's process stability. Furthermore, removing the material accumulation area reduces the computational load and effectively shortens the program running time. In defect detection, the material accumulation area and the engraving area are merged to obtain a complete character contour, making the final character defect contour more accurate. Attached Figure Description
[0018] Figure 1 This is a structural diagram of the point cloud-based character marking defect and depth detection system provided in an embodiment of the present invention. Figure 2 This is a flowchart illustrating the steps of the point cloud-based method for detecting defects and depth in incised characters in an embodiment of the present invention. Figure 3 for Figure 2 The second part includes a flowchart and effect diagram; Figure 4 for Figure 2 A step-by-step flowchart and effect diagram of step S205 in Part 2; Figure 5 For the sample workpiece drawing; Figure 6 This is a screenshot of the sample detection results. Figure 7 This is a schematic diagram of the sample area; Figure 8 This is a system flowchart. Detailed Implementation
[0019] The present invention will be further described in detail below with reference to the accompanying drawings.
[0020] A point cloud-based system for detecting defects and depth in character marking, such as... Figure 1 As shown, it includes a hardware part and a control part, with the control part controlling the hardware part.
[0021] The hardware components include: a laser profilometer, a robotic arm motion mechanism, a PLC, and a computer; the control components include: a point cloud data acquisition control module and a data processing control module; such as... Figure 8 As shown, the point cloud data acquisition and control module is used to set acquisition parameters, send a start acquisition signal to the robotic arm motion mechanism via PLC, and send a start acquisition signal to the laser profilometer. It receives and stores the point cloud data acquired by the laser profilometer, and then transmits the point cloud data to the data processing and control module. The data processing and control module has parallel processing capabilities and is used to process the received point cloud data using the HALCON algorithm library.
[0022] The laser profilometer is installed at the front end of the robotic arm's motion mechanism. During operation, the robotic arm first adjusts the initial position of the laser profilometer, and then, based on the workpiece size, the robotic arm's motion trajectory is planned via computer-controlled robotic arm movement. The point cloud data acquisition and control module pre-sets the amount of data the laser profilometer will collect based on the workpiece size. After scanning begins, the robotic arm drives the laser profilometer to maintain a constant vertical height above the workpiece surface and moves horizontally along the workpiece. During this movement, the laser profilometer scans the workpiece to acquire character point cloud data and transmits the scanned data to the point cloud data acquisition and control module in PLY format. After scanning is complete, the robotic arm is moved to return the laser profilometer to its initial position. The scanning process is repeated as needed.
[0023] This embodiment uses, as follows Figure 5 The sample workpiece shown is used as an example for illustration, and the sample detection effect is as follows: Figure 6 As shown, the sample workpiece includes 17 characters for detection, with the total length and width of the entire character section being 12cm × 5cm.
[0024] A detection method for a point cloud-based delineation-based character marking defect and depth detection system, such as... Figure 2 As shown, it includes the following steps: Step 1: Preprocessing of raw point cloud data. This step is a prerequisite for steps 2 and 3, and is used to process the point cloud data for subsequent processing in steps 2 and 3.
[0025] Step 1.1: After selecting the controller IP address, connect to the controller and select 2,000,000 point cloud data volume. Then start collecting point cloud data and send the data to the data processing control module in PLY format.
[0026] Step 1.2: Perform connected component segmentation on the collected data to filter out noisy point clouds.
[0027] The Z-axis coordinate array of the raw point cloud data is obtained using the `get_object_model_3d_params` operator. Then, the median and minimum values in the obtained array are used as the parameter range. Based on this range, the `select_points_object_model_3d` operator is used to filter the data, retaining only the point cloud data of the indentation portion extending into the workpiece. For this portion of data, the `connection_object_model_3d` operator is used, setting its `distance_3d` parameter to 0.1 to perform connected component segmentation, grouping point clouds with a Euclidean distance less than the `distance_3d` parameter into the same instance object. Finally, the `select_points_object_model_3d` operator is used to filter the data by setting the number of point clouds to between 10,000 and 1,000,000, with an appropriate threshold.
[0028] Step 1.3: Perform secondary denoising on the point cloud 3D model after the first denoising.
[0029] The `connection_object_model_3d` operator is used to perform another connected component split, with the `distance_3d` parameter set to 0.01. The `select_points_object_model_3d` operator is then used to filter the point cloud data from 10,000 to 1,000,000. This progressive two-stage connected component split effectively reduces program execution time and improves speed. In this example, the single filtering took 3.0 seconds, and the second filtering took 2.2 seconds, resulting in a reduction of approximately 0.8 seconds.
[0030] Step 1.4: Process the point cloud 3D model to obtain relevant data for subsequent processing.
[0031] Step 2: Quantitatively detect character outline defects in the preprocessed data from Step 1 to obtain character defects. This step is executed in parallel with the third part. For example... Figure 3 As shown, it includes the following steps: Step 2.1: Further filter the point cloud region of each character, remove the background point cloud, and retain the point cloud data of the character itself.
[0032] First, based on the Y-axis (vertical direction of the character) coordinate range of the obtained single character point cloud data set, the maximum value of the range is reduced by 0.6, and the minimum value is increased by 0.6. Then, based on the obtained values, the top and bottom edges of the character region, including the adjacent background region, are segmented, such as... Figure 7 As shown, two small region objects are obtained, one above the other. The median Z-axis value of each region object is set as Z1, Z2...2, Assume Z1 > Z2. Take all point clouds in the entire character region where the Z-axis coordinates are greater than Z1 and less than Z2, and define this as the region of the character itself, excluding background data such as workpiece surfaces. Step 2.2: Extract each character region, merge all character regions, obtain the coordinates of the X, Y, and Z directions in the 3D object model, generate an overall depth map, and convert the 3D point cloud projection into a 2D character outline image.
[0033] The `union_object_model_3d` operator merges each character region object, then the `get_object_model_3d_params` operator retrieves the X, Y, and Z coordinates of each point in the overall object's 3D point cloud data. Next, the `tuple_min` and `tuple_max` operators are used to obtain the extreme values of the X and Y axes, creating an envelope for the X and Y axes. Finally, the `gen_image_const` operator, based on the size of the envelope, creates a black background image with all pixels having a grayscale value of 0. This establishes the physical coordinate system of the character's 3D point cloud. Image coordinate system converted to image matrix : in, The point cloud was obtained using the tuple_min operator. Minimum value on the axis. k It is based on the system's preset scanning resolution. In this embodiment, k Preferred .
[0034] Step 2.3: Perform automatic global thresholding on the generated two-dimensional image to obtain a single character region.
[0035] This step can extract features based on different target characteristics, such as area, height, and x and y coordinates. In this example, height is selected for extraction.
[0036] Step 2.4 Sort the different character regions in ascending order of their horizontal coordinates.
[0037] Step 2.5: Perform defect detection processing on the sorted character regions sequentially, such as... Figure 4 As shown, it includes the following steps: Step 2.5.1: Perform morphological processing on individual character regions to eliminate noise and holes.
[0038] Step 2.5.2: Perform an affine transformation on the character region based on the center point coordinates of a single character, and transform the shape of the region to extract features.
[0039] The character region is translated and rotated using the `hom_mat2d_identity` and `vector_angle_to_rigid` operators. For example, the copied character region is rotated 180° around its center point and translated to the left by a certain character width. The translation distance is adjusted from 0.1 to 0.3 times the character width; in this example, 0.2 times is selected. Then, the original character region is merged with the region after affine transformation. The `shape_trans` operator is used to obtain the minimum bounding rectangle of the entire region, including the center coordinates of the rectangle and its tilt angle relative to the X-axis.
[0040] Step 2.5.3: Retrieve standard characters from the character library and align the standard character area with the character area.
[0041] Based on the coordinates of the character region's center point, its tilt angle relative to the X-axis, and its aspect ratio, the template of the standard character is aligned with the currently marked character region using the `hom_mat2d_identity` and `vector_angle_to_rigid` operators, ensuring that the character proportions, center coordinates, and tilt angles of the two regions are consistent. The proportion formula is: Ratio = rectangle1 / rectangle11 Here, rectangle11 is the side length obtained by converting a standard character into a rectangle parallel to the coordinate axis, and rectangle1 is the side length obtained by converting a character region into a rectangle parallel to the coordinate axis.
[0042] Step 2.5.4: Perform a difference operation between the aligned standard character area and the actual marking character area to obtain the non-overlapping area as the defect area.
[0043] Step 2.5.4: Calculate the ratio of the non-overlapping area to the standard character area, and determine whether it is qualified based on the preset ratio threshold. In this embodiment, the preset ratio threshold is selected as 5%, which can be adjusted according to subsequent needs.
[0044] Step 3: Measure the character engraving depth in the preprocessed data from Step 1 to obtain the depth of each character, and execute this step in parallel with the second part.
[0045] Step 3.1: Further filter the point cloud data subset in terms of characters, remove the engraved material accumulation part and the background part from the height, and only retain the point cloud data of the engraving part below the workpiece plane.
[0046] Decrease the maximum value of the range by 0.6 and increase the minimum value by 0.6. Then, based on the obtained values, segment the top and bottom edges of the character area, including the adjacent background area, to obtain two smaller area objects. Next, obtain the median value of the Z-axis coordinate array of the two smaller areas as the Z-axis coordinate range of the workpiece surface, setting the larger value to Z. 1, The smaller value is Z2. In the point cloud data, the area above Z1 represents the material accumulation area, and the area below Z2 represents the scoring area. The Z-axis depth data of the scoring is retained using the select_points_object_model_3d operator. With this processing, when the current workpiece needs to detect the depth of 17 characters, the average detection time per character depth is reduced by 0.21 seconds, and the overall detection time is reduced by about 3.6 seconds.
[0047] Step 3.2: Divide the characters into several discontinuous regions and filter them according to the number of point clouds, and then obtain the Z-axis coordinate array of the filtered regions; Connectivity partitioning is performed by resetting the distance_3d parameter of the connection_object_model_3d operator to 0.01. Then, based on the point cloud data parameter num_points, the discontinuous regions of the point cloud within the character area are segmented using the select_points_object_model_3d operator. Finally, the get_object_model_3d_params operator is used to obtain the Z-axis coordinates of each point within each region.
[0048] Step 3.3: The obtained Z-axis coordinate array is progressively narrowed down by step size and filtered using a point threshold to approximate the true depth value; The Z-axis coordinate array obtained in S3.2 is processed using the `tuple_min` operator to obtain the minimum Z-axis coordinate value in the array. Then, a `for` loop is used to increment the minimum Z-axis coordinate value by 0.1 * the loop count, setting it to `less`. Next, the minimum Z-axis coordinate value is incremented by 0.1 * (the loop count + 1), setting it to `greater`. The Z-axis coordinate array is then filtered using the `tuple_less_elem` and `tuple_greater_elem` operators to select coordinates within the `less` and `greater` ranges, generating a new one-dimensional array. The length of this one-dimensional array is then obtained, and the array is further filtered based on the number of point clouds; only arrays with a point cloud count greater than 200 are considered acceptable. This process is repeated until an array with a sufficient number of point clouds is found. The minimum Z-axis coordinate value of the current one-dimensional array is then obtained, incremented by 0.005, and the above process is repeated, with the point cloud count used as the filtering condition changed to 100, until another array with a sufficient number of point clouds is found. The minimum value of this array is then taken as the depth value closest to the actual depth.
[0049] Step 3.4: Set the obtained minimum Z-axis coordinate value as the depth value of the current small region. After obtaining all the depth values of the character region, take the minimum value as the character depth and determine whether it is qualified.
[0050] In this embodiment, the character engraving depth must be within the range of 0.2mm-0.3mm, and the average depth must not be less than 0.2mm; otherwise, it is judged as unqualified in depth.
[0051] Table 1 Character Depth
[0052] As shown in Table 1, the first, second, and third regions in the table are the small regions after the characters are divided. Since the number of regions is different, they are simplified into three regions. The minimum depth of the three regions is obtained, and the minimum value is taken as the minimum point cloud depth.
[0053] It should be emphasized that the embodiments described in this invention are illustrative rather than limiting. Therefore, this invention includes, but is not limited to, the embodiments described in the specific implementation. Any other implementations derived by those skilled in the art based on the technical solutions of this invention are also within the scope of protection of this invention.
Claims
1. A method for detecting defects and depth in character marking based on point clouds, characterized in that: Includes the following steps: Step 1: Preprocessing raw point cloud data; Step 1.1: Collect point cloud data through the point cloud data acquisition control module and send the data to the data processing control module in PLY format; Step 1.2: Perform connected component segmentation on the collected data to filter out noisy point clouds; Step 1.3: Perform secondary denoising on the point cloud 3D model after the first denoising; Step 1.4: Process the point cloud 3D model to obtain relevant data for subsequent processing; Step 2: Quantitatively detect character outline defects in the preprocessed data from Step 1 to obtain character defects; Step 2.1: Further filter the point cloud region of each character, remove the background point cloud, and retain the point cloud data of the character itself; Step 2.2: Extract each character region, merge all character regions, obtain the coordinates of the X, Y, and Z directions in the 3D object model, generate an overall depth map, and convert the 3D point cloud projection into a 2D character outline image; Step 2.3: Perform automatic global thresholding on the generated two-dimensional image to obtain a single character region; Step 2.4: Sort the different character regions in ascending order of their horizontal coordinates; Step 2.5: Perform defect detection processing on the sorted character regions sequentially; Step 3: Measure the character engraving depth in the preprocessed data from Step 1 to obtain the depth of each character; Step 3.1: Further filter the point cloud data subset in terms of characters, remove the engraved material accumulation part and the background part from the height, and only retain the point cloud data of the engraving part below the workpiece plane; Step 3.2: Divide the characters into several discontinuous regions and filter them according to the number of point clouds, and then obtain the Z-axis coordinate array of the filtered regions; Step 3.3: The obtained Z-axis coordinate array is progressively narrowed down by step size and filtered using a point threshold to approximate the true depth value; Step 3.4: Set the obtained minimum Z-axis coordinate value as the depth value of the current small region. After obtaining all the depth values of the character region, take the minimum value as the point cloud depth and determine whether it is qualified.
2. The point cloud-based method for detecting defects and depth in delineated marking characters, as described in claim 1, is characterized in that: The specific implementation method of step 1.2 is as follows: obtain the Z-axis coordinate array of the original point cloud data, take the middle value and the minimum value as the parameter range, filter the point cloud according to this range, remove the point cloud of the workpiece plane part and the character material accumulation part, and only retain the point cloud of the scratch part. The point cloud is first segmented into connected components, and point clouds with Euclidean distance less than the first preset parameter are grouped into the same instance; then, based on the number of point clouds in each instance, noisy point clouds are removed.
3. The point cloud-based method for detecting defects and depth in delineated marking characters, as described in claim 1, is characterized in that: The further filtering of each character point cloud region in step 2.1 specifically includes: based on the Y-axis coordinate range of a single character point cloud dataset, and based on the obtained values, dividing the character region into two smaller regions at the top and bottom; taking the average Z-axis coordinate of each smaller region and setting it as Z1 and Z2, where Z1 > Z2; and taking all point clouds in the entire character region with Z-axis coordinates greater than Z1 and less than Z2 as the region of the character itself, in order to remove the background part of the workpiece surface.
4. The point cloud-based method for detecting defects and depth in delineated marking characters, as described in claim 1, is characterized in that: Step 2.5 includes the following steps: Step 2.5.1: Perform morphological processing on individual character regions to eliminate noise and holes; Step 2.5.2: Perform an affine transformation on the character region based on the center point coordinates of a single character, and transform the shape of the region to extract features; Step 2.5.3: Retrieve standard characters from the character library and align the standard character area with the character area; Step 2.5.4: Perform a difference operation between the aligned standard character area and the actual marking character area to obtain the non-overlapping area as the defect area; Step 2.5.4: Calculate the ratio of the non-overlapping area to the standard character area, and determine whether it is qualified based on the preset ratio threshold.
5. The point cloud-based method for detecting defects and depth in delineated marking characters according to claim 4, characterized in that: The specific implementation method of affine transformation in step 2.5.2 is as follows: copy the character region, rotate it 180° around its center point and translate it to the left by a preset multiple of the character width; merge the original character region with the region after affine transformation; obtain the minimum outer rectangle of the merged entire region, thereby obtaining the tilt angle of the character region relative to the X-axis.
6. The point cloud-based method for detecting defects and depth in delineated marking characters according to claim 1, characterized in that: The specific implementation method of step 3.1 is the same as that of step 2.1, removing the background part and material accumulation part on the workpiece surface, and only retaining the point cloud data of the scratch depth.
7. The point cloud-based method for detecting defects and depth in delineated marking characters, as described in claim 1, is characterized in that: The specific implementation method of step 3.3 is as follows: obtain the minimum value in the Z-axis coordinate array; and perform a loop, increasing the step size in each loop to filter out the point cloud coordinates falling within the current interval, forming a new one-dimensional array; determine whether the number of point clouds in the new one-dimensional array is greater than the first quantity threshold, and if so, record the minimum Z-axis coordinate value of the current interval; then set a second small step size and reduce the point cloud quantity threshold to the second quantity threshold, and repeat the point cloud filtering, quantity threshold judgment and minimum Z-axis coordinate recording process within the effective interval obtained by the first step size until the minimum Z-axis coordinate value close to the actual depth is obtained.
8. A detection system for a point cloud-based delineation marking character defect and depth detection method as described in any one of claims 1 to 7, characterized in that: It includes a hardware component and a control component, with the control component controlling the hardware component; The hardware components include a laser profilometer, a robotic arm motion mechanism, a PLC, and a computer. The control components include a point cloud data acquisition control module and a data processing control module. The point cloud data acquisition control module is used to set acquisition parameters, send a start acquisition signal to the robotic arm motion mechanism via the PLC, and send a start acquisition signal to the laser profilometer. It receives and stores the point cloud data acquired by the laser profilometer, and then transmits the point cloud data to the data processing control module. The data processing control module has parallel processing capabilities and is used to process the received point cloud data using the HALCON algorithm library.
9. The detection system for the point cloud-based delineation marking character defect and depth detection method according to claim 8, characterized in that: During operation, the initial position of the laser profilometer is first adjusted by the robotic arm. Then, based on the workpiece size, the robotic arm's motion trajectory is planned by the computer-controlled robotic arm system. The point cloud data acquisition and control module pre-sets the amount of data to be collected by the laser profilometer according to the workpiece size. After scanning begins, the robotic arm drives the laser profilometer to maintain a constant height above the workpiece surface in the vertical direction and moves horizontally along the workpiece. During the movement, the laser profilometer scans the workpiece to acquire character point cloud data and transmits the scanned data to the point cloud data acquisition and control module in PLY format. After scanning is completed, the robotic arm is moved to return the laser profilometer to its initial position. The scanning process is repeated as needed.