A three-dimensional measurement method, device, electronic device, and storage medium
By acquiring the 3D model and point cloud data of the calibration block, and using filtering, feature extraction, and registration algorithms to calibrate the shooting pose of the 3D camera, the problem of insufficient measurement accuracy in the existing technology is solved, and efficient, accurate, and effective detection of workpiece parameters is achieved.
Patent Information
- Application Number
- CN202210438044.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-25
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2042-04-25
AI Technical Summary
Existing hand-eye systems have low measurement accuracy in workpiece inspection, making it difficult to meet high-precision requirements.
By acquiring 3D model data and point cloud data of the calibration block, filtering, feature extraction, registration and stitching algorithms are used to calibrate the shooting pose data of the 3D camera and improve measurement accuracy.
It enables high-precision measurement of workpiece parameters, improving inspection efficiency and accuracy.
Smart Images

Figure CN114862930B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of 3D vision technology, and in particular to a three-dimensional measurement method, device, electronic device, and storage medium. Background Technology
[0002] Currently, in the process of workpiece inspection, a hand-eye system consisting of a robotic arm and a 3D camera is often used to acquire the relevant parameters of the workpiece. However, the measurement accuracy of existing hand-eye systems is relatively low. Therefore, how to provide a 3D measurement method to improve the measurement accuracy of workpiece parameters has become an urgent problem to be solved. Summary of the Invention
[0003] The present invention aims to at least solve one of the technical problems existing in the prior art. To this end, the present invention proposes a three-dimensional measurement method that can improve the measurement accuracy of workpiece parameters.
[0004] The present invention also proposes a three-dimensional measuring device having the above-mentioned three-dimensional measuring method.
[0005] The present invention also proposes an electronic device having the above-described three-dimensional measurement method.
[0006] The present invention also proposes a storage medium.
[0007] A three-dimensional measurement method according to a first aspect of the present invention, the method comprising:
[0008] Obtain the preset calibration block and the 3D model data of the calibration block;
[0009] The first point cloud data of the calibration block is acquired using a preset 3D camera;
[0010] The first point cloud data is filtered to obtain the second point cloud data;
[0011] The second point cloud data is subjected to feature extraction processing to obtain the third point cloud data;
[0012] The 3D model data of the calibration block and the third point cloud data are registered to obtain the shooting pose data of the 3D camera.
[0013] The fourth point cloud data of the target workpiece is acquired through the 3D camera;
[0014] Based on the shooting pose data, the fourth point cloud data is stitched together to obtain the target point cloud data.
[0015] The three-dimensional measurement method according to embodiments of the present invention has at least the following beneficial effects: This three-dimensional measurement method acquires a preset calibration block and its 3D model data; acquires first point cloud data of the calibration block using a preset 3D camera; filters the first point cloud data to obtain second point cloud data; performs feature extraction processing on the second point cloud data to obtain third point cloud data; performs registration processing on the 3D model data of the calibration block and the third point cloud data to obtain the shooting pose data of the 3D camera; acquires fourth point cloud data of the target workpiece using the 3D camera; and stitches the fourth point cloud data according to the shooting pose data to obtain the target point cloud data. In this way, the shooting pose data of the 3D camera can be calibrated, thereby improving the measurement accuracy of workpiece parameters.
[0016] According to some embodiments of the present invention, acquiring the first point cloud data of the calibration block using a preset 3D camera includes:
[0017] The 3D camera is fixed on a pre-set robotic arm;
[0018] Obtain the motion trajectory of the robotic arm;
[0019] The robotic arm moves according to the motion trajectory, so that the 3D camera is displaced and the first point cloud data is acquired through the 3D camera.
[0020] According to some embodiments of the present invention, the step of performing feature extraction processing on the second point cloud data to obtain the third point cloud data includes:
[0021] The normal vector data of the second point cloud data is obtained using the KDTree algorithm;
[0022] The third point cloud data is obtained by performing feature extraction processing on the second point cloud data using the normal vector data.
[0023] According to some embodiments of the present invention, the registration process of the 3D model data of the calibration block and the third point cloud data to obtain the shooting pose data of the 3D camera includes:
[0024] The 3D model data and the third point cloud data are registered using the ICP algorithm to obtain the shooting pose data.
[0025] According to some embodiments of the present invention, acquiring the fourth point cloud data of the target workpiece through the 3D camera includes:
[0026] The robotic arm moves according to the motion trajectory;
[0027] The fourth point cloud data is acquired using a 3D camera on the robotic arm.
[0028] According to some embodiments of the present invention, after stitching the fourth point cloud data based on the shooting pose data to obtain the target point cloud data, the method further includes:
[0029] The target point cloud data is processed by a preset detection algorithm to obtain the detection result.
[0030] According to some embodiments of the present invention, the calibration block has a trapezoidal boss.
[0031] According to a second aspect of the present invention, a three-dimensional measuring apparatus includes:
[0032] The first acquisition module is used to acquire a preset calibration block and the 3D model data of the calibration block;
[0033] The second acquisition module is used to acquire the first point cloud data of the calibration block through a preset 3D camera;
[0034] The filtering module is used to filter the first point cloud data to obtain the second point cloud data.
[0035] The extraction module is used to perform feature extraction processing on the second point cloud data to obtain the third point cloud data;
[0036] The registration module is used to register the 3D model data of the calibration block and the third point cloud data to obtain the shooting pose data of the 3D camera.
[0037] The third acquisition module is used to acquire the fourth point cloud data of the target workpiece through the 3D camera;
[0038] The stitching module is used to stitch the fourth point cloud data according to the shooting pose data to obtain the target point cloud data.
[0039] The three-dimensional measuring device according to embodiments of the present invention has at least the following beneficial effects: This three-dimensional measuring device acquires a preset calibration block and its 3D model data via a first acquisition module; a second acquisition module acquires first point cloud data of the calibration block via a preset 3D camera; a filtering module filters the first point cloud data to obtain second point cloud data; an extraction module performs feature extraction processing on the second point cloud data to obtain third point cloud data; a registration module registers the 3D model data of the calibration block and the third point cloud data to obtain the shooting pose data of the 3D camera; a third acquisition module acquires fourth point cloud data of the target workpiece via the 3D camera; and a stitching module stitches the fourth point cloud data according to the shooting pose data to obtain the target point cloud data. This three-dimensional measurement method improves the measurement accuracy of workpiece parameters by acquiring the point cloud data of the trapezoidal boss to calibrate the shooting pose data of the 3D camera.
[0040] An electronic device according to a third aspect of the present invention includes a memory, a processor, and a computer program on the memory and executable on the processor, wherein the processor executes the program to implement the three-dimensional measurement method of the first aspect of the present invention described above.
[0041] The electronic device according to embodiments of the present invention has at least the following beneficial effects: This electronic device employs the aforementioned three-dimensional measurement method to acquire a preset calibration block and its 3D model data; acquires first point cloud data of the calibration block using a preset 3D camera; filters the first point cloud data to obtain second point cloud data; performs feature extraction processing on the second point cloud data to obtain third point cloud data; performs registration processing on the 3D model data of the calibration block and the third point cloud data to obtain the shooting pose data of the 3D camera; acquires fourth point cloud data of the target workpiece using the 3D camera; and stitches the fourth point cloud data according to the shooting pose data to obtain the target point cloud data. This three-dimensional measurement method improves the measurement accuracy of workpiece parameters by acquiring the point cloud data of the trapezoidal boss to calibrate the shooting pose data of the 3D camera.
[0042] According to a fourth aspect of the present invention, a computer-readable storage medium stores computer-executable instructions for performing the three-dimensional measurement method of the first aspect of the present invention.
[0043] The computer-readable storage medium according to embodiments of the present invention has at least the following beneficial effects: the computer-readable storage medium stores computer-executable instructions, which, by employing the above-described three-dimensional measurement method, acquire a preset calibration block and its 3D model data; acquire first point cloud data of the calibration block using a preset 3D camera; filter the first point cloud data to obtain second point cloud data; perform feature extraction processing on the second point cloud data to obtain third point cloud data; perform registration processing on the 3D model data of the calibration block and the third point cloud data to obtain the shooting pose data of the 3D camera; acquire fourth point cloud data of the target workpiece using the 3D camera; and stitch the fourth point cloud data according to the shooting pose data to obtain the target point cloud data. This three-dimensional measurement method improves the measurement accuracy of workpiece parameters by acquiring the point cloud data of the trapezoidal boss to calibrate the shooting pose data of the 3D camera.
[0044] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0045] The present invention will be further described below with reference to the accompanying drawings and embodiments, wherein:
[0046] Figure 1 This is a flowchart of a three-dimensional measurement method according to an embodiment of the present invention;
[0047] Figure 2 This is a schematic diagram of the structure of a three-dimensional measurement method according to another embodiment of the present invention;
[0048] Figure 3 This is a schematic diagram of the structure of a three-dimensional measurement method according to another embodiment of the present invention;
[0049] Figure 4 yes Figure 1 Flowchart of step S200;
[0050] Figure 5 This is a schematic diagram of the structure of a three-dimensional measurement method according to another embodiment of the present invention;
[0051] Figure 6 This is a schematic diagram of the structure of a three-dimensional measurement method according to another embodiment of the present invention;
[0052] Figure 7 yes Figure 1 Flowchart of step S400;
[0053] Figure 8 This is a schematic diagram of the structure of a three-dimensional measurement method according to another embodiment of the present invention;
[0054] Figure 9 yes Figure 1 Flowchart of step S600;
[0055] Figure 10 This is a schematic diagram of the structure of a three-dimensional measuring device according to another embodiment of the present invention.
[0056] Reference numerals: 1010, First acquisition module; 1020, Second acquisition module; 1030, Filtering module; 1040, Extraction module; 1050, Registration module; 1060, Third acquisition module; 1070, Stitching module. Detailed Implementation
[0057] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0058] In the description of this invention, it should be understood that the orientation descriptions, such as up, down, front, back, left, right, etc., are based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limiting this invention.
[0059] In the description of this invention, "several" means one or more, "multiple" means two or more, "greater than," "less than," and "exceeding" are understood to exclude the stated number, while "above," "below," and "within" are understood to include the stated number. The use of "first" and "second" in the description is merely for distinguishing technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of indicated technical features, or implicitly indicating the order of the indicated technical features.
[0060] In the description of this invention, unless otherwise explicitly defined, terms such as "set up," "install," and "connect" should be interpreted broadly, and those skilled in the art can reasonably determine the specific meaning of the above terms in this invention in conjunction with the specific content of the technical solution.
[0061] In the description of this invention, the terms "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer 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.
[0062] Firstly, referring to Figure 1 , Figure 2 and Figure 3 The three-dimensional measurement method of this invention includes:
[0063] S100, acquire the preset calibration block and the 3D model data of the calibration block;
[0064] S200 acquires the first point cloud data of the calibration block through a preset 3D camera;
[0065] S300 filters the first point cloud data to obtain the second point cloud data;
[0066] S400: Perform feature extraction processing on the second point cloud data to obtain the third point cloud data;
[0067] The S500 performs registration processing on the 3D model data of the calibration block and the third point cloud data to obtain the shooting pose data of the 3D camera.
[0068] The S600 acquires the fourth point cloud data of the target workpiece using a 3D camera.
[0069] The S700 stitches together the fourth point cloud data based on the shooting pose data to obtain the target point cloud data.
[0070] When inspecting the target workpiece, the calibration block and its 3D model data are first acquired. The calibration block features a trapezoidal boss, which consists of a top surface, side surfaces, and a bottom surface. The top and bottom surfaces are regular polygons, while the side surfaces are multiple planes connecting the top and bottom surfaces. This trapezoidal boss design allows the 3D camera to acquire point cloud data of multiple faces of the trapezoidal boss from a general viewpoint. Furthermore, this trapezoidal boss needs to exhibit spatial rotational asymmetry, meaning that it will not coincide with its initial state after any rotation in space. This avoids misregistration during subsequent registration processing of the 3D model data of the calibration block and the third point cloud data. Therefore, at least one face of the top or bottom surface of the trapezoidal boss must exhibit rotational asymmetry in the normal direction of its plane. The angle between the side and top surfaces of the trapezoidal boss is no greater than 45 degrees. This ensures that the 3D camera does not experience point cloud data loss due to excessively large viewing angles relative to the side surfaces of the trapezoidal boss when acquiring data from the calibration block. In a specific embodiment, the top surface of the trapezoidal boss is an isosceles trapezoid with rotational asymmetry in the normal direction of the top surface. The bottom surface of the trapezoidal boss is an isosceles trapezoid proportionally enlarged from the top surface shape. The angle between the side and top surfaces of the trapezoidal boss is 45 degrees. Furthermore, the 3D model data of the calibration block can be obtained from the model-building software. The first point cloud data of the calibration block is acquired using a preset 3D camera. Based on the normal vector characteristics of each plane of the trapezoidal boss, the shooting viewpoint of the 3D camera is obtained, and the first point cloud data of the calibration block is acquired through the 3D camera. This first point cloud data comprises the surface contour point cloud data of the trapezoidal boss and a portion of the calibration block. The first point cloud data is filtered to obtain the second point cloud data. A pass-through filter is used to remove redundant parts from the first point cloud data, retaining only the point cloud data of the trapezoidal boss. The second point cloud data is then the point cloud data containing only the surface contour of the trapezoidal boss. Feature extraction is then performed on the second point cloud data to obtain the third point cloud data. Specifically, the edge point cloud data of the trapezoidal boss is deleted, resulting in the point cloud data of the surface features of the trapezoidal boss. The third point cloud data is then the point cloud data of the surface features of the trapezoidal boss. Registration processing is performed between the 3D model data of the calibration block and the third point cloud data to obtain the shooting pose data of the 3D camera. Specifically, after registering the 3D model data of the trapezoidal boss and the third point cloud data, accurate 3D camera shooting pose data is obtained. The fourth point cloud data of the target workpiece is then acquired using the 3D camera. The 3D camera acquires the fourth point cloud data of the target workpiece according to the previously set shooting viewpoint. The fourth point cloud data is the point cloud data of the surface features of the target workpiece. Based on the shooting pose data, the fourth point cloud data is stitched together to obtain the target point cloud data. Specifically, based on the shooting pose data of the previously obtained 3D camera, the fourth point cloud data is stitched together to obtain the overall surface point cloud data of the target workpiece. The target point cloud data is the overall surface point cloud data of the target workpiece.This 3D measurement method improves the accuracy of workpiece parameter measurement by acquiring point cloud data of the trapezoidal boss to calibrate the shooting pose data of the 3D camera.
[0071] Reference Figure 4 , Figure 5 and Figure 6 In some embodiments, step S200 includes:
[0072] S210, which fixes a 3D camera on a pre-set robotic arm;
[0073] S220, acquire the motion trajectory of the robotic arm;
[0074] S230 moves the robotic arm according to the motion trajectory so that the 3D camera is displaced and the first point cloud data is acquired by the 3D camera.
[0075] When inspecting the target workpiece, after placing the calibration block in a preset position, a 3D camera is first fixed on a preset robotic arm. It should be noted that the 3D camera can be a structured light area array 3D camera. Then, based on the normal vector characteristics of the trapezoidal boss on the calibration block, the initial shooting viewpoint of the 3D camera is selected to obtain the surface contour point cloud data of the calibration block. The shooting viewpoints are then adjusted according to the actual needs of the target workpiece to determine the final shooting viewpoint of the 3D camera. The corresponding teaching points of the robotic arm are recorded, thus obtaining the motion trajectory of the robotic arm. Finally, the robotic arm is moved according to the motion trajectory, and the 3D camera on the robotic arm scans the calibration block, acquiring the surface point cloud data of the trapezoidal boss on the calibration block. The first point cloud data consists of the surface contour point cloud data of the trapezoidal boss and a portion of the calibration block. It should be noted that an appropriate static time can be set for the 3D camera to acquire data according to actual needs. After obtaining the first point cloud data, a pass-through filter is used to remove the point cloud data of the calibration block that does not contain the trapezoidal boss, thus obtaining the point cloud data of the trapezoidal boss.
[0076] Reference Figure 7 and Figure 8 In some embodiments, step S400 includes:
[0077] S410, obtains the normal vector data of the second point cloud data through the KDTree algorithm;
[0078] S420 uses normal vector data to perform feature extraction on the second point cloud data to obtain the third point cloud data.
[0079] After obtaining the second point cloud data, for each point m in the second point cloud data, use the KDTree algorithm structure to select the k nearest points x. i The normal vector data of the second point cloud data is calculated using the following formula, with P as the neighborhood fitting plane.
[0080]
[0081] Where m represents the target point, x i Let P represent the neighborhood of the target point m and all its neighboring points x. i The fitted plane, where n represents the normal vector of plane P and is also the normal vector of target point m.
[0082] Then, iterate through all target points and use the following formula to detect points whose change between their own normal vector n and the normal vector n0 of their neighboring points does not exceed a preset angle threshold ε.
[0083]
[0084] Furthermore, these target points are retained while other points are deleted, thus obtaining the point cloud data of the surface features of the trapezoidal boss. The third point cloud data is the point cloud data of the surface features of the trapezoidal boss.
[0085] In some embodiments, step S500 includes:
[0086] The 3D model data and the third point cloud data are registered using the ICP algorithm to obtain the shooting pose data.
[0087] Specifically, the ICP point cloud matching algorithm is used to match and locate the 3D model data of the calibration block with the third point cloud data. Based on the ICP point cloud matching results, accurate shooting pose data of the 3D camera is obtained.
[0088] Reference Figure 9 In some embodiments, step S600 includes:
[0089] S610 moves the robotic arm according to the motion trajectory;
[0090] The S620 acquires fourth-point cloud data using a 3D camera on a robotic arm.
[0091] Specifically, after obtaining the shooting pose data from the 3D camera, the calibration block is removed, and the target workpiece is placed in a preset position, ensuring that the center of the target workpiece coincides with the center of the trapezoidal boss. Then, the robotic arm is moved according to the previously obtained motion trajectory, and the fourth point cloud data is acquired through the 3D camera on the robotic arm. The fourth point cloud data is the point cloud data of the surface features of the target workpiece.
[0092] In some embodiments, after step S700, the three-dimensional detection method further includes:
[0093] The target point cloud data is processed by a preset detection algorithm to obtain the detection results.
[0094] After obtaining the overall point cloud data of the target workpiece, the tolerances of the target workpiece are measured using a feature detection algorithm to obtain the corresponding detection results. It should be noted that by repeating steps S600 and S700, the next workpiece to be inspected can be inspected without performing calculations for each inspection, thus improving inspection efficiency. It should also be noted that the inspection of the target workpiece includes shape tolerances such as straightness, flatness, and roundness, as well as positional tolerances such as parallelism, perpendicularity, and positional tolerances.
[0095] In some embodiments, the calibration block has a trapezoidal boss. In designing the trapezoidal boss, the measurable feature of a known calibration block can be determined first. Taking a calibration block with a hole as an example, the center of the geometric circle on the upper surface of the hole is taken as the center position of the feature to be measured, and the normal vector of the circular feature originating from the center is taken as the normal vector of the feature. Then, the center of the bottom surface of the designed trapezoidal boss coincides with the center of the hole, thereby replacing the calibration block with the one having the trapezoidal boss.
[0096] Secondly, referring to Figure 10 The three-dimensional measuring device of this invention includes:
[0097] The first acquisition module 1010 is used to acquire a preset calibration block and the 3D model data of the calibration block;
[0098] The second acquisition module 1020 is used to acquire the first point cloud data of the calibration block through a preset 3D camera;
[0099] The filtering module 1030 is used to filter the first point cloud data to obtain the second point cloud data;
[0100] The extraction module 1040 is used to perform feature extraction processing on the second point cloud data to obtain the third point cloud data.
[0101] The registration module 1050 is used to register the 3D model data of the calibration block and the third point cloud data to obtain the shooting pose data of the 3D camera.
[0102] The third acquisition module 1060 is used to acquire the fourth point cloud data of the target workpiece through a 3D camera;
[0103] The stitching module 1070 is used to stitch the fourth point cloud data according to the shooting pose data to obtain the target point cloud data.
[0104] During the inspection of the target workpiece, the first acquisition module 1010 acquires a preset calibration block and its 3D model data; the second acquisition module 1020 acquires the first point cloud data of the calibration block through a preset 3D camera; then, the filtering module 1030 filters the first point cloud data to obtain the second point cloud data; the extraction module 1040 performs feature extraction on the second point cloud data to obtain the third point cloud data; the registration module 1050 registers the 3D model data of the calibration block and the third point cloud data to obtain the shooting pose data of the 3D camera; the third acquisition module 1060 acquires the fourth point cloud data of the target workpiece through the 3D camera; and the stitching module 1070 stitches the fourth point cloud data according to the shooting pose data to obtain the target point cloud data. This three-dimensional measurement method improves the measurement accuracy of workpiece parameters by acquiring the point cloud data of the trapezoidal boss to calibrate the shooting pose data of the 3D camera.
[0105] Thirdly, the electronic device of the present invention includes at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores instructions which are executed by the at least one processor to enable the at least one processor to implement the three-dimensional measurement method as described in the first aspect embodiment when executing the instructions.
[0106] This electronic device employs the aforementioned three-dimensional measurement method. It acquires a preset calibration block and its 3D model data; uses a preset 3D camera to acquire the first point cloud data of the calibration block; filters the first point cloud data to obtain the second point cloud data; performs feature extraction on the second point cloud data to obtain the third point cloud data; registers the 3D model data of the calibration block and the third point cloud data to obtain the shooting pose data of the 3D camera; acquires the fourth point cloud data of the target workpiece using the 3D camera; and stitches the fourth point cloud data according to the shooting pose data to obtain the target point cloud data. This three-dimensional measurement method improves the measurement accuracy of workpiece parameters by acquiring the point cloud data of the trapezoidal boss to calibrate the shooting pose data of the 3D camera.
[0107] Fourthly, the present invention also provides a computer-readable storage medium. The computer-readable storage medium stores computer-executable instructions for causing a computer to perform the three-dimensional measurement method as described in the first aspect embodiment.
[0108] The computer-readable storage medium stores computer-executable instructions. These instructions employ the aforementioned three-dimensional measurement method to acquire a preset calibration block and its 3D model data; acquire first point cloud data of the calibration block using a preset 3D camera; filter the first point cloud data to obtain second point cloud data; perform feature extraction on the second point cloud data to obtain third point cloud data; register the 3D model data of the calibration block and the third point cloud data to obtain the shooting pose data of the 3D camera; acquire fourth point cloud data of the target workpiece using the 3D camera; and stitch the fourth point cloud data together with the shooting pose data to obtain the target point cloud data. This three-dimensional measurement method improves the measurement accuracy of workpiece parameters by acquiring the point cloud data of the trapezoidal boss to calibrate the shooting pose data of the 3D camera.
[0109] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments, and various changes can be made within the scope of knowledge possessed by those skilled in the art without departing from the spirit of the present invention. Furthermore, the embodiments of the present invention and the features thereof can be combined with each other unless otherwise specified.
Claims
1. A three-dimensional measurement method, characterized in that, include: Obtain a preset calibration block and its 3D model data; wherein the calibration block has a trapezoidal boss; The first point cloud data of the calibration block is acquired by a preset 3D camera; wherein, the first point cloud data includes the surface contour point cloud data of the trapezoidal boss and a portion of the calibration block. The surface contour point cloud data of the calibration block portion of the first point cloud data is filtered using a pass-through filtering method to obtain the second point cloud data; wherein, the second point cloud data is the surface contour point cloud data of the trapezoidal boss. The normal vector data of the second point cloud data is obtained using the KDTree algorithm; The second point cloud data is processed by extracting features from the normal vector data to obtain the third point cloud data; wherein, the third point cloud data is the point cloud data of the surface features of the trapezoidal protrusion. The 3D model data of the calibration block and the third point cloud data are registered to obtain the shooting pose data of the 3D camera. The fourth point cloud data of the target workpiece is acquired through the 3D camera; Based on the shooting pose data, the fourth point cloud data is stitched together to obtain the target point cloud data; The target point cloud data is processed by a preset detection algorithm to obtain the detection result; The process of obtaining the normal vector data of the second point cloud data using the KDTree algorithm, and then performing feature extraction processing on the second point cloud data using the normal vector data to obtain the third point cloud data, includes: For each point m in the second point cloud data, use the KDTree algorithm to find the k nearest points. As the neighborhood fitting plane The normal vector data of the second point cloud data is calculated using the following formula: ; in, Indicates the target point. Represents the neighborhood of the target point. Let represent the plane formed by fitting the target point m with all its neighboring points xi. Representing a plane The normal vector, and The target point The normal vector; Traverse all target points and use the following formula to detect their own normal vectors. Its neighboring point normal vector The change does not exceed the preset angle threshold. Points: ; These target points are retained, and other points are deleted to obtain the point cloud data of the surface features of the trapezoidal protrusion. The point cloud data of the surface features of the trapezoidal protrusion is the third point cloud data.
2. The three-dimensional measurement method according to claim 1, characterized in that, The step of acquiring the first point cloud data of the calibration block using a preset 3D camera includes: The 3D camera is fixed on a pre-set robotic arm; Obtain the motion trajectory of the robotic arm; The robotic arm moves according to the motion trajectory, so that the 3D camera is displaced and the first point cloud data is acquired through the 3D camera.
3. The three-dimensional measurement method according to claim 1, characterized in that, The registration process between the 3D model data of the calibration block and the third point cloud data to obtain the shooting pose data of the 3D camera includes: The 3D model data and the third point cloud data are registered using the ICP algorithm to obtain the shooting pose data.
4. The three-dimensional measurement method according to claim 2, characterized in that, The acquisition of the fourth point cloud data of the target workpiece through the 3D camera includes: The robotic arm moves according to the motion trajectory; The fourth point cloud data is acquired using a 3D camera on the robotic arm.
5. A three-dimensional measuring device, characterized in that, include: The first acquisition module is used to acquire a preset calibration block and the 3D model data of the calibration block; wherein the calibration block has a trapezoidal boss; The second acquisition module is used to acquire the first point cloud data of the calibration block through a preset 3D camera; wherein, the first point cloud data includes the surface contour point cloud data of the trapezoidal boss and a portion of the calibration block. The filtering module is used to filter the surface contour point cloud data of the calibration block portion of the first point cloud data using a pass-through filtering method to obtain the second point cloud data; wherein, the second point cloud data is the surface contour point cloud data of the trapezoidal boss; The extraction module is used to obtain the normal vector data of the second point cloud data through the KDTree algorithm; and to perform feature extraction processing on the second point cloud data through the normal vector data to obtain the third point cloud data; wherein, the third point cloud data is the point cloud data of the surface features of the trapezoidal protrusion. The registration module is used to register the 3D model data of the calibration block and the third point cloud data to obtain the shooting pose data of the 3D camera. The third acquisition module is used to acquire the fourth point cloud data of the target workpiece through the 3D camera; The stitching module is used to stitch the fourth point cloud data according to the shooting pose data to obtain target point cloud data; and to detect the target point cloud data through a preset detection algorithm to obtain detection results. The process of obtaining the normal vector data of the second point cloud data using the KDTree algorithm, and then performing feature extraction processing on the second point cloud data using the normal vector data to obtain the third point cloud data, includes: For each point m in the second point cloud data, use the KDTree algorithm to find the k nearest points. As the neighborhood fitting plane The normal vector data of the second point cloud data is calculated using the following formula: ; in, Indicates the target point. Represents the neighborhood of the target point. Let represent the plane formed by fitting the target point m with all its neighboring points xi. Representing a plane The normal vector, and The target point The normal vector; Traverse all target points and use the following formula to detect their own normal vectors. Its neighboring point normal vector The change does not exceed the preset angle threshold. The points: ; These target points are retained, and other points are deleted to obtain the point cloud data of the surface features of the trapezoidal protrusion. The point cloud data of the surface features of the trapezoidal protrusion is the third point cloud data.
6. An electronic device comprising a memory, a processor, and a computer program on the memory and executable on the processor, wherein the processor executes the program to implement a three-dimensional measurement method as described in any one of claims 1 to 4.
7. A storage medium, characterized in that, The storage medium is a computer-readable storage medium that stores computer-executable instructions for performing a three-dimensional measurement method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Panoramic environment perception method based on two-dimensional image and three-dimensional point cloud data fusion
CN109544456A
Key point position determination method and device in robot hand-eye calibration based on calibration block
CN110930442A