Industrial part registration method based on machine vision
By identifying and dividing the closed areas in the part image, calculating distance attributes, matching part models, and adjusting the initial posture, three-dimensional point cloud data fitting of industrial parts is achieved, and the problem of insufficient accuracy of part alignment in the existing technology is solved. Improved the identification and positioning capabilities of parts.
Patent Information
- Application Number
- CN202411174177.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-26
- Publication Date
- 2024-12-03
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In complex or changing industrial environments, it is difficult for the prior art to achieve a comprehensive reconstruction of the surface of industrial parts, especially the bottom or difficult-to-reach areas, resulting in insufficient accuracy of part alignment.
By obtaining part images containing target parts, identifying and dividing closed areas, generating multiple object areas, calculating distance attributes, matching part models, adjusting initial poses to obtain standard poses, realizing three-dimensional point cloud data fitting and precise registration of parts .
Improve the accuracy and robustness of part registration, reduce manual intervention, reduce the impact of error and noise, and enhance the identification and positioning capabilities of complex parts.
Smart Images

Figure CN119068030A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of machine vision, and in particular relates to an industrial parts registration method based on machine vision. Background Art
[0002] With the rapid development of industrial automation and intelligent manufacturing, accurate part identification and positioning have become increasingly important on production lines. As a key technology, machine vision has been widely used in automated inspection, robot guidance, quality control and other fields. Machine vision simulates the human visual system to enable machines to perceive, identify and process image information, thereby realizing the detection and positioning of objects.
[0003] In a complex or changing industrial environment, for example, a Chinese patent document with publication number CN118298110A discloses a three-dimensional point cloud image reconstruction method and system for a part manufacturing process, the method comprising: obtaining a first point cloud image set and a second point cloud image set of an industrial part; performing point cloud image rapid registration on the first point cloud image set and the second point cloud image set to obtain a third point cloud image set and obtain a rotation matrix; using the rotation matrix as prior information, performing point cloud image rapid registration on the third point cloud image set to obtain a final point cloud registered image.
[0004] Due to the limited field of view of visual sampling, it may be difficult to achieve full reconstruction of the part surface, especially for the bottom of complex parts or hard-to-reach areas. Therefore, an industrial part registration method is needed to determine the multi-view posture of industrial parts during the registration process, so as to improve the accuracy of part registration. Summary of the invention
[0005] To solve the above problems, the present invention provides an industrial parts registration method based on machine vision to solve the problems in the prior art.
[0006] In order to achieve the above-mentioned object of the invention, the present invention proposes an industrial parts registration method based on machine vision, comprising: S1: Acquire a part image containing a target part, the part image including distance information from the target part to a photographing device, identify the part image, acquire a closed area of the target part, and divide the closed area into multiple object areas; S2: acquiring a distance attribute of each of the object regions, defining the object region with the smallest distance attribute as a first region, comparing the first region with each plane of each part model in the first database, defining a plane with the highest similarity to the first region as a target plane, and defining the part model including the target plane as a target model; S3: generating three-dimensional point cloud data of the target part based on the part image, fitting the three-dimensional point cloud data with each of the target models, calculating fitting values between the three-dimensional point cloud data and each of the target models, and selecting an optimal model from the target models based on the fitting values; S4: Determine the initial posture of the target part based on the relative relationship between the first area and the target plane in the optimal model, adjust the initial posture based on the relative relationship to obtain the standard posture of the target part, and install the target part based on the standard posture.
[0007] Furthermore, obtaining the closed area of the target part includes the following steps: Identify the pixel area occupied by each part in the part image, mark a plurality of edge points at the edge of the pixel area, connect adjacent edge points to generate a plurality of first curves, define the angle between adjacent first curves as a turning angle, locate the turning point at the position of the turning angle if the turning angle is less than a first threshold, connect the edge points between the turning points in sequence to obtain a second curve, correct the second curve to obtain a third curve, and define the closed space enclosed by the third curve as the closed area.
[0008] Further, correcting the second curve comprises the following steps: The edge point between two adjacent turning points in the second curve is defined as a point to be corrected, and a supplementary point is added between the points to be corrected. The x-axis coordinate of the supplementary point is the average value of the sum of the horizontal coordinates of the two adjacent points to be corrected, the y-axis coordinate of the supplementary point is the average value of the sum of the vertical coordinates of the two adjacent points to be corrected, and the z-axis coordinate of the supplementary point is the average value of the sum of the height values of the two adjacent points to be corrected. The points to be corrected and the supplementary point between the two turning points are connected in order of position to obtain the third curve.
[0009] Further, calculating the distance attribute of the object area includes the following steps: The area enclosed by adjacent third curves is defined as the object area, the third curves constituting the object area are defined as edge curves, a plurality of reference points are selected at equal intervals on the edge curves, the distance information of each reference point is obtained, and the average value of the distance information of all the reference points is used as the distance attribute of the object area.
[0010] Furthermore, selecting the optimal model from the target model includes the following steps: Extracting one of the target models as a model to be compared, matching and aligning the three-dimensional point cloud data with the model to be compared with the first area and the target plane as references, calculating a first distance between each point cloud in the three-dimensional point cloud data and each plane in the target model, combining the first distances corresponding to the same point cloud to generate a distance group, selecting the first distance with the smallest value from the distance group, defining it as a second distance, and defining the plane corresponding to the second distance as a reference plane; Preprocessing the second distance, wherein if the point cloud is located on a side of the reference plane away from the center of gravity of the model to be compared, the second distance is processed as a negative value; if the point cloud is located on a side of the reference plane close to the center of gravity of the model to be compared, the second distance is processed as a positive value, and the processed second distance is defined as the fitting value; Counting the distribution values of the fitting values, if the number of positive values of the fitting values is greater than a second threshold value, and the number of negative values is less than or equal to the second threshold value, then eliminating the first model from the remaining target models, the first model being the target model having a volume greater than the model to be compared, if the number of positive values of the fitting values is less than or equal to the second threshold value, and the number of negative values is greater than the second threshold value, then eliminating the second model from the remaining target models, the second model being the target model having a volume smaller than the model to be compared; The models to be compared are continuously extracted from the target models excluding the first model or the second model until all the target models whose fitting values are smaller than the second threshold are screened, and such target models to be compared are defined as the optimal models.
[0011] Furthermore, identifying the pixel area occupied by each part in the part image comprises the following steps: The part image is converted into a grayscale image, the grayscale value of each pixel in the grayscale image is obtained, the pixel points are clustered based on the grayscale value, the pixel points located in the same clustering result are defined as cluster points, and the area formed by the cluster points is located as the pixel area occupied by a single part.
[0012] Furthermore, the pixel points are clustered using a mean shift algorithm.
[0013] Furthermore, the first threshold is 170 degrees.
[0014] Furthermore, the similarity is Hausdorff distance.
[0015] Further, the relative relationship between the first area and the target plane includes rotation angles in the directions of the X-axis, the Y-axis and the Z-axis.
[0016] Compared with the prior art, the beneficial effects of the present invention are at least as follows: Compared with the prior art, the beneficial effects of the present invention are at least as follows: The present invention obtains a part image containing a target part and distance information from the target part to a photographing device, and screens out a closed area containing only the target part, thereby determining the three-dimensional spatial area of the target part; the closed area is transformed into multiple object areas, and the position information of multiple plane areas of the target part under the viewing angle of the photographing device is determined; and the object area with the smallest distance attribute is taken as the first area, which is compared with each plane in the part model in the first database, and the plane with the highest similarity is defined as the target plane, and the part model containing the target plane is defined as the target model, so that the model that best matches the first area can be found, providing a good starting point for subsequent alignment work.
[0017] Based on the part image, three-dimensional point cloud data of the target part is generated, the three-dimensional point cloud data is automatically fitted with each of the target models, and the fitting values of the three-dimensional point cloud data and each target model are calculated. Using three-dimensional data for model fitting can more accurately capture the geometric shape and spatial position of the part, reduce errors that may occur in two-dimensional image processing, and improve the robustness of the algorithm to noise and outliers; the optimal standard posture is obtained by adjusting the initial posture, which reduces the need for manual intervention, reduces human errors, and improves the accuracy of the target part in the alignment process. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A flowchart of the steps of a method for industrial parts registration based on machine vision of the present invention; DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0020] It is understood that the terms "first", "second", etc. used in this application may be used herein to describe various elements, but unless otherwise specified, these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, without departing from the scope of this application, a first xx script may be referred to as a second xx script, and similarly, a second xx script may be referred to as a first xx script.
[0021] like Figure 1 As shown, a method for industrial part registration based on machine vision includes: S1: Acquire a part image containing a target part, the part image includes distance information from the target part to a shooting device, identify the part image, acquire a closed area of the target part, and divide the closed area into multiple object areas.
[0022] Specifically, in the process of industrial parts registration, the present invention uses a shooting device such as a depth camera or a shooting device on a robot arm to obtain a part image of a target part. Assuming that the target part is a screw, a distance detection device is installed on the shooting device to obtain distance information from the target part to the shooting device. The captured part image includes not only the target part screw, but may also include non-target parts such as nuts, bolts, etc. Therefore, it is necessary to identify the part image and obtain the image area containing the screw. Such an area is defined as a closed area, which only includes one target part, the screw, and the closed area is composed of multiple object areas, each object area is used to represent a different surface of the screw, and each object area only includes one plane or one curved surface.
[0023] S2: Obtain the distance attribute of each object area, define the object area with the smallest distance attribute as the first area, compare the first area with each plane of each part model in the first database, define the plane with the highest similarity to the first area as the target plane, and define the part model containing the target plane as the target model.
[0024] Specifically, a three-dimensional target part is composed of multiple planes or curved surfaces. In the process of using a shooting device to shoot the target part, the present invention has a distance attribute corresponding to each object area, which refers to the distance value between the shooting device and the object area. A plane closest to the shooting device is obtained as the first area. It is assumed that the target part screw includes a hexagonal head and a threaded cylindrical rod, and the first area detected is the hexagonal head area. The first database stores models of various industrial parts, such as bolt models, screw models, and nut models. The hexagonal head area is compared with each plane of various part models in the first database, and the Hausdorff distance is used to compare the similarity of the first area and other plane contours. The plane with the highest similarity in the first area is screened out and defined as the target plane. The target plane may come from different target models. The automated area selection and model comparison process reduces manual intervention, improves efficiency and may reduce human errors.
[0025] S3: Generate three-dimensional point cloud data of the target part based on the part image, fit the three-dimensional point cloud data with each target model, calculate the fitting value between the three-dimensional point cloud data and each target model, and select the optimal model from the target model based on the fitting value.
[0026] Specifically, three-dimensional point cloud data of the target part is generated based on the part image. The three-dimensional point cloud data can more accurately capture the geometric shape of the target part and the spatial position of each pixel point. Based on the position and direction of the first area in the target part, the three-dimensional point cloud data is converted to the same coordinate system as the target model. The larger the fitting value, the more matched the target model and the target part. Determining the optimal model helps to optimize the alignment process, reduce the error accumulation of the target part during the alignment process, and improve the accuracy of target part recognition.
[0027] S4: Based on the relative relationship between the first region and the target plane in the optimal model, determine the initial posture of the target part, adjust the initial posture based on the relative relationship, obtain the standard posture of the target part, and install the target part based on the standard posture.
[0028] Specifically, based on the relative relationship between the first area and the corresponding target plane in the optimal model, the relative relationship includes the rotation angles in the X, Y and Z axis directions, and the initial posture of the target part is determined based on the rotation angles in each direction. For example, if the direction of the target plane is upward and the direction of the first area is rightward, it can be determined that the initial direction of the first area is obtained by rotating the target plane 90 degrees clockwise, and the initial posture of the target part is determined based on this. The default posture corresponding to the optimal model is the standard posture of the target part during the alignment process, and the initial posture is consistent with the default posture in shape, but the direction may require a rotation angle to achieve the standard posture. The accurate standard posture optimizes the initial posture, making the posture more accurate, thereby reducing the amount of calculation required to achieve the ideal alignment and improving the alignment accuracy.
[0029] The present invention obtains a part image containing a target part and distance information from the target part to a photographing device, and screens out a closed area containing only the target part, thereby determining the three-dimensional spatial area of the target part; the closed area is transformed into multiple object areas, and the position information of multiple plane areas of the target part under the viewing angle of the photographing device is determined; and the object area with the smallest distance attribute is taken as the first area, which is compared with each plane in the part model in the first database, and the plane with the highest similarity is defined as the target plane, and the part model containing the target plane is defined as the target model, so that the model that best matches the first area can be found, providing a good starting point for subsequent alignment work.
[0030] Generate 3D point cloud data of the target part based on the part image, automatically fit the 3D point cloud data with each target model, and calculate the fitting value of the 3D point cloud data with each target model. Use 3D data for model fitting to more accurately capture the geometric shape and spatial position of the part, reduce possible errors in 2D image processing, and improve the robustness of the algorithm to noise and outliers; optimally obtain the standard posture by adjusting the initial posture, reducing the need for manual intervention, reducing human errors, and improving the registration accuracy of the target part.
[0031] As a preferred technical solution of the present invention, obtaining the closed area of the target part includes the following steps: Identify the pixel area occupied by each part in the part image, mark multiple edge points on the edge of the pixel area, connect adjacent edge points to generate multiple first curves, define the angle between adjacent first curves as the turning angle, if the turning angle is less than a first threshold, locate the turning point at the position of the turning angle, connect the edge points between the turning points in sequence to obtain the second curve, correct the second curve to obtain the third curve, and define the closed space enclosed by the third curve as a closed area.
[0032] Specifically, adjacent edge points are connected to generate multiple first curves, and the angle between adjacent first curves is defined as the turning angle. The edge points at the turning angle represent significant changes in the part contour, such as corners and bending points of curves. The first curve is a preliminary approximate description of the target part contour. The size of the turning angle between adjacent first curves is judged. Generally, if the turning angle between the curves is 180 degrees, it means that there is no turning point between the curves, that is, it is a straight line. Here, in order to reserve a fault tolerance value, only the first threshold value of 170 degrees is set. In other embodiments, it can also be set to 180 degrees. If the turning angle is less than 170 degrees, the turning point is located at the turning angle, and the edge points between the turning points are connected to obtain the second curve.
[0033] The second curve describes the approximate outline of the target part in three-dimensional space. Due to the accuracy of the detection algorithm, the generated second curve may not be smooth enough. Therefore, the second curve needs to be corrected to obtain the third curve. The closed space enclosed by the third curve is defined as a closed area. The closed area is a three-dimensional target part area.
[0034] Correcting the second curve includes the following steps: The edge point between two adjacent turning points in the second curve is defined as a point to be corrected, and a supplementary point is added between the points to be corrected. The x-axis coordinate of the supplementary point is the average value of the sum of the horizontal coordinates of the two adjacent points to be corrected, the y-axis coordinate of the supplementary point is the average value of the sum of the vertical coordinates of the two adjacent points to be corrected, and the z-axis coordinate of the supplementary point is the average value of the sum of the height values of the two adjacent points to be corrected. The points to be corrected and the supplementary points between the two turning points are connected in order of position to obtain the third curve.
[0035] Specifically, the point to be corrected is an edge point located between two adjacent turning points, and a supplementary point is added between the points to be corrected. The three-dimensional position coordinates of the supplementary point are based on the average value of the sum of the coordinates of the two adjacent points to be corrected on the x-axis, y-axis and z-axis. Finally, the point to be corrected and the supplementary point between the two turning points are connected in sequence according to the position order to obtain the third curve. By adding new points between the points to be corrected, the third curve improves the continuity and smoothness of the contour of the target part in three-dimensional space compared to the first curve.
[0036] Calculating the distance attribute of an object area includes the following steps: The area enclosed by adjacent third curves is defined as the object area, and the third curves constituting the object area are defined as edge curves. Multiple reference points are selected at equal intervals on the edge curves, and the distance information of each reference point is obtained. The average value of the distance information of all reference points is used as the distance attribute of the object area.
[0037] Specifically, the area surrounded by adjacent third curves is the object area, each object area is equivalent to the first surface or plane of the target part, all third areas constituting the object area are edge curves, and multiple reference points are selected at equal intervals on the edge curve, and the average value of the distance information of all reference points is taken as the distance attribute of the object area. The larger the distance attribute, the farther the object area is from the shooting device. The present invention chooses to select multiple reference points at equal intervals on the edge curve instead of selecting all the pixel points in the object area as reference points, so as to reduce the amount of calculation and improve the efficiency of the algorithm.
[0038] Screening out the optimal model from the target model includes the following steps: A target model is extracted as the model to be compared, and the 3D point cloud data and the model to be compared are matched and aligned with each other with reference to the first area and the target plane. The first distance between each point cloud in the 3D point cloud data and each plane in the target model is calculated, and the first distances corresponding to the same point cloud are combined to generate a distance group. The first distance with the smallest value is selected from the distance group and defined as the second distance. The plane corresponding to the second distance is defined as the reference plane.
[0039] The second distance is preprocessed, wherein if the point cloud is located on the side of the reference plane away from the center of gravity of the model to be compared, the second distance is processed as a negative value; if the point cloud is located on the side of the reference plane close to the center of gravity of the model to be compared, the second distance is processed as a positive value, and the processed second distance is defined as a fitting value.
[0040] The distribution value of the statistical fitting value is calculated. If the number of positive fitting values is greater than the second threshold and the number of negative fitting values is less than or equal to the second threshold, the first model is eliminated from the remaining target models, and the first model is a target model with a volume larger than the model to be compared. If the number of positive fitting values is less than or equal to the second threshold and the number of negative fitting values is greater than the second threshold, the second model is eliminated from the remaining target models, and the second model is a target model with a volume smaller than the model to be compared.
[0041] Models to be compared are continuously extracted from the target models excluding the first model or the second model until all target models whose fitting values are less than the second threshold are screened, and such models to be compared are defined as the optimal models.
[0042] Specifically, any part model that contains a target plane can be used as a model to be compared. The first area in the target part and the target plane in the model to be compared are used as references for matching and alignment. The first distance between the point cloud in the three-dimensional point cloud data of each object area and each plane in the target model is calculated. According to the first distance from the point cloud to each plane, the plane with the smallest value, that is, the plane closest to the point cloud, is selected, namely the reference plane, and the distance between the reference plane and the point cloud is defined as the second distance.
[0043] If the point cloud is located on the side of the reference plane away from the center of gravity of the model to be compared, that is, the point cloud is outside the target model, the second distance is processed as a negative value. If the first numerical label is a negative value, if the point cloud is located on the side of the reference plane close to the center of gravity of the model to be compared, that is, the point cloud is inside the target model, the second distance is processed as a positive value, and the processed second distance is defined as the fitting value.
[0044] Determine the quantity distribution of fitting values. Assume that there are 1000 point clouds in a closed area of a target part. If the number of positive fitting values is greater than the second threshold (assuming it is 2), and the number of negative fitting values is less than or equal to 2, it means that the point cloud of the target part is inside the target model, and the target model is larger than the target part. In the subsequent model matching process, the target model with a volume larger than the model to be compared is eliminated. On the contrary, if the number of positive fitting values is less than or equal to 2, and the number of negative fitting values is greater than 2, it means that the point cloud of the target part is outside the target model, and the target model is smaller than the target part, then the target model with a volume smaller than the comparison model needs to be eliminated until all target models with fitting values less than the second threshold are screened out, and such models to be compared are defined as the optimal models.
[0045] By eliminating target models that do not meet the requirements, the matching efficiency between target parts and models can be further improved.
[0046] Identifying the pixel areas occupied by each part in the part image includes the following steps: The part image is converted into a grayscale image, the grayscale value of each pixel in the grayscale image is obtained, the pixels are clustered based on the grayscale value, the pixels in the same clustering result are defined as cluster points, and the area composed of the cluster points is located as the pixel area occupied by a single part.
[0047] Specifically, different parts will have different grayscale values in the grayscale image. The part image is converted into a grayscale image, and the grayscale value is used to cluster the pixels in the image. The clustering uses the mean shift algorithm to divide different areas belonging to the same target part into the same clustering result.
[0048] It should be understood that, although each step in the flow chart of each embodiment of the present invention is shown in sequence according to the indication of the arrow, these steps are not necessarily performed in sequence according to the order indicated by the arrow. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be performed in other orders. Moreover, at least a portion of the steps in each embodiment may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.
[0049] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the above-mentioned program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0050] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0051] The above embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for those of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
[0052] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for industrial parts registration based on machine vision, characterized in that: The method comprises the following steps: S1: Acquire a part image containing a target part, the part image including distance information from the target part to a photographing device, identify the part image, acquire a closed area of the target part, and divide the closed area into multiple object areas; S2: acquiring a distance attribute of each of the object regions, defining the object region with the smallest distance attribute as a first region, comparing the first region with each plane of each part model in the first database, defining a plane with the highest similarity to the first region as a target plane, and defining the part model including the target plane as a target model; S3: generating three-dimensional point cloud data of the target part based on the part image, fitting the three-dimensional point cloud data with each of the target models, calculating fitting values between the three-dimensional point cloud data and each of the target models, and selecting an optimal model from the target models based on the fitting values; S4: Determine the initial posture of the target part based on the relative relationship between the first area and the target plane in the optimal model, adjust the initial posture based on the relative relationship to obtain the standard posture of the target part, and install the target part based on the standard posture.
2. The method according to claim 1, characterized in that Acquiring the closed area of the target part comprises the following steps: Identify the pixel area occupied by each part in the part image, mark a plurality of edge points at the edge of the pixel area, connect adjacent edge points to generate a plurality of first curves, define the angle between adjacent first curves as a turning angle, locate the turning point at the position of the turning angle if the turning angle is less than a first threshold, connect the edge points between the turning points in sequence to obtain a second curve, correct the second curve to obtain a third curve, and define the closed space enclosed by the third curve as the closed area.
3. The method according to claim 2, characterized in that Correcting the second curve comprises the following steps: The edge point between two adjacent turning points in the second curve is defined as a point to be corrected, and a supplementary point is added between the points to be corrected. The x-axis coordinate of the supplementary point is the average value of the sum of the horizontal coordinates of the two adjacent points to be corrected, the y-axis coordinate of the supplementary point is the average value of the sum of the vertical coordinates of the two adjacent points to be corrected, and the z-axis coordinate of the supplementary point is the average value of the sum of the height values of the two adjacent points to be corrected. The points to be corrected and the supplementary point between the two turning points are connected in order of position to obtain the third curve.
4. The method according to claim 3, characterized in that Calculating the distance attribute of the object area comprises the following steps: The area enclosed by adjacent third curves is defined as the object area, the third curves constituting the object area are defined as edge curves, a plurality of reference points are selected at equal intervals on the edge curves, the distance information of each reference point is obtained, and the average value of the distance information of all the reference points is used as the distance attribute of the object area.
5. The method according to claim 4, characterized in that Screening out the optimal model from the target model comprises the following steps: Extracting one of the target models as a model to be compared, matching and aligning the three-dimensional point cloud data with the model to be compared with the first area and the target plane as references, calculating a first distance between each point cloud in the three-dimensional point cloud data and each plane in the target model, combining the first distances corresponding to the same point cloud to generate a distance group, selecting the first distance with the smallest value from the distance group, defining it as a second distance, and defining the plane corresponding to the second distance as a reference plane; Preprocessing the second distance, wherein if the point cloud is located on a side of the reference plane away from the center of gravity of the model to be compared, the second distance is processed as a negative value; if the point cloud is located on a side of the reference plane close to the center of gravity of the model to be compared, the second distance is processed as a positive value, and the processed second distance is defined as the fitting value; Counting the distribution values of the fitting values, if the number of positive values of the fitting values is greater than a second threshold value, and the number of negative values is less than or equal to the second threshold value, then eliminating the first model from the remaining target models, the first model being the target model having a volume greater than the model to be compared, if the number of positive values of the fitting values is less than or equal to the second threshold value, and the number of negative values is greater than the second threshold value, then eliminating the second model from the remaining target models, the second model being the target model having a volume smaller than the model to be compared; The models to be compared are continuously extracted from the target models excluding the first model or the second model until all the target models whose fitting values are smaller than the second threshold are screened, and such target models to be compared are defined as the optimal models.
6. The method according to claim 2, characterized in that Identifying the pixel area occupied by each part in the part image comprises the following steps: The part image is converted into a grayscale image, the grayscale value of each pixel in the grayscale image is obtained, the pixel points are clustered based on the grayscale value, the pixel points located in the same clustering result are defined as cluster points, and the area formed by the cluster points is located as the pixel area occupied by a single part.
7. The method according to claim 6, characterized in that The pixel points are clustered using a mean shift algorithm.
8. The method according to claim 2, characterized in that: The first threshold is 170 degrees.
9. The method according to claim 1, characterized in that: The similarity is the Hausdorff distance.
10. The method according to claim 1, characterized in that The relative relationship between the first area and the target plane includes rotation angles in the directions of the X-axis, the Y-axis and the Z-axis.
Citation Information
Cited By
Automobile part machining and positioning method and equipment
CN119290085A
Rail train part anomaly detection method based on point-surface distance
CN120580233A
A track train part abnormality detection method based on point-to-face distance
CN120580233B
Industrial part alignment method and system based on visual analysis and storage medium
CN121073994A
Vision analysis based industrial part alignment method, system, and storage medium
CN121073994B
