Calibration method, apparatus, electronic equipment, and computer-readable storage medium for external parameters of a linear shape measuring machine.
By dividing and optimizing contour point clouds using constraint relationships and target optimization functions, the method effectively calibrates the external parameters of a linear shape measuring machine, improving measurement accuracy.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- HANGZHOU HIKROBOT TECH CO LTD
- Filing Date
- 2023-05-24
- Publication Date
- 2026-05-11
AI Technical Summary
The challenge in accurately determining the contour information of an object using a linear shape measuring machine lies in calibrating the external parameters between the machine and the measuring table, which is essential for precise measurement.
A method involving point cloud division, constraint relationship construction, and target optimization function optimization is employed to calibrate the external parameters by obtaining contour point clouds from a calibration block, dividing them into surface point clouds, constructing constraint relationships based on surface features, and optimizing transformation parameters between the linear shape measuring machine and the measuring table coordinate systems.
This approach enables precise calibration of external parameters, ensuring accurate determination of contour information by optimizing transformation parameters, thereby enhancing the measurement precision of the linear shape measuring machine.
Smart Images

Figure 0007856795000010 
Figure 0007856795000011 
Figure 0007856795000012
Abstract
Description
[Technical Field]
[0001] (Cross-reference of related applications) This application claims priority based on the Chinese patent application filed with the State Intellectual Property Administration of China on May 26, 2022, application number 202210582401.7, with the title of invention "Method, apparatus and electronic device for calibrating external parameters of a linear shape measuring machine." All of the contents of the said application are incorporated herein by reference.
[0002] This application relates to the field of measurement technology, and more particularly to a method, apparatus, and electronic equipment for calibrating external parameters of a linear shape measuring machine. [Background technology]
[0003] A linear shape measuring machine is a precision instrument used to measure the contour line shape and cross-sectional contour shape of various machine parts. Generally, when measuring an object with a linear shape measuring machine, the object is placed on a measuring platform, which can usually move the object by rotation or translation. The linear shape measuring machine continuously collects contour point clouds of the object as it moves, and then determines the contour information of the object based on the contour point cloud collected by the linear shape measuring machine.
[0004] In the process described above, it is necessary to determine the contour information of the object to be measured using the contour point cloud collected by the linear shape measuring machine. In the process of determining the contour information of the object to be measured, it is necessary to utilize external parameters between the linear shape measuring machine and the measuring table. Therefore, before determining the contour information, it is necessary to calibrate the external parameters between the linear shape measuring machine and the measuring table so that these external parameters can be determined. For this reason, how to calibrate the external parameters between the linear shape measuring machine and the measuring table is a technical challenge that urgently needs to be resolved. [Overview of the Initiative]
[0005] The present invention aims to provide a method, apparatus, and electronic equipment for calibrating the external parameters of a linear shape measuring machine, for achieving calibration of the external parameters of the linear shape measuring machine. The specific technical proposal is as follows.
[0006] In a first aspect, the present embodiment provides a method for calibrating the external parameters of a linear shape measuring machine, the method for calibrating the external parameters of a linear shape measuring machine includes: obtaining a contour point cloud of multiple frames collected on the calibration block by the linear shape measuring machine while the calibration block is being moved by the measuring stand; performing point cloud division on each contour point cloud to obtain a surface point cloud belonging to a different measuring surface; constructing a constraint relationship for each surface point cloud based on each feature point in the surface point cloud and the surface features of the measuring surface to which the surface point cloud belongs, wherein the surface features of each measuring surface are features that indicate the geometric attributes of the measuring surface; constructing a target optimization function for the inferred transformation relationship based on the inferred transformation relationship between the linear shape measuring machine coordinate system and the measuring stand coordinate system and the constraint relationship of each surface point cloud; optimizing the target optimization function and obtaining the optimized transformation parameters between the linear shape measuring machine coordinate system and the measuring stand coordinate system as external parameters between the linear shape measuring machine and the measuring stand.
[0007] Preferably, performing point cloud division on each contour point group to obtain surface point groups belonging to different measurement surfaces includes performing point cloud division on each contour point group based on a division policy corresponding to the type of calibration block, thereby obtaining surface point groups belonging to different measurement surfaces.
[0008] Preferably, performing point cloud division on the contour point cloud based on a division policy corresponding to the type of calibration block to obtain surface point clouds belonging to different measurement surfaces includes, if the calibration block is a cone, performing curve fitting and linear fitting on each feature point in the contour point cloud, determining each feature point corresponding to the fitted curve as a conical surface point cloud and the feature points corresponding to the fitted linear as a base surface point cloud; and if the calibration block is a sphere, performing circle fitting and linear fitting on each feature point in the contour point cloud, determining each feature point corresponding to the fitted curve as a spherical point cloud and the feature points corresponding to the fitted linear as a base surface point cloud.
[0009] Preferably, before constructing a target optimization function for the inferred transformation relationship based on the inferred transformation relationship between the linear shape measuring machine coordinate system and the measuring table coordinate system and the constraint relationship of each surface point cloud, the calibration method for the external parameters of the linear shape measuring machine further includes determining the coordinate system transformation relationship between the linear shape measuring machine coordinate system and the measuring table coordinate system as an inferred transformation relationship based on the contour point clouds of the obtained multiple frames.
[0010] Preferably, determining the coordinate system transformation relationship between the linear shape measuring machine coordinate system and the measuring table coordinate system as an inferred transformation relationship based on the contour point cloud of the obtained plurality of frames includes determining the initial transformation parameters between the linear shape measuring machine coordinate system and the measuring table coordinate system based on the contour point cloud of the plurality of frames, and obtaining an inferred transformation relationship by using the initial transformation parameters as inferred values for each parameter in the transformation formula between the linear shape measuring machine coordinate system and the measuring table coordinate system.
[0011] Preferably, the initial transformation parameters include initial rotation parameters, and determining the initial transformation parameters between the linear shape measuring machine coordinate system and the measuring table coordinate system based on the contour point cloud of the plurality of frames includes determining the inclination of the fitting line corresponding to each bottom feature point in the contour point cloud of the plurality of frames, determining the first rotation angle of the linear shape measuring machine coordinate system relative to the measuring table coordinate system based on the inclination, wherein the bottom feature point is a feature point belonging to the measuring table, determining the feature point with the maximum height in the contour point cloud of the plurality of frames as the maximum feature point, calculating the ratio of the height of the maximum feature point to the actual height of the calibration block, determining the second rotation angle of the linear shape measuring machine coordinate system relative to the measuring table coordinate system based on the ratio, and determining the initial rotation parameters based on the first rotation angle and the second rotation angle.
[0012] Preferably, the initial transformation parameters include initial translation parameters, and determining the initial transformation parameters between the linear shape measuring machine coordinate system and the measuring table coordinate system based on the contour point clouds of the plurality of frames includes determining a first height difference of the feature point with the maximum height in the contour point clouds of any two adjacent frames, determining the curved arc length and the horizontal displacement within each sampling interval of the calibration block corresponding to the first height difference based on the surface features of the calibration block, determining a first displacement of the linear shape measuring machine coordinate system in a first direction relative to the measuring table coordinate system based on the curved arc length and the horizontal displacement, determining a second displacement of the linear shape measuring machine coordinate system in a second direction relative to the measuring table coordinate system based on the curved arc length and the first height difference, wherein the first direction and the second direction are orthogonal, and determining the initial translation parameters based on the first displacement and the second displacement.
[0013] Preferably, optimizing the target optimization function and obtaining the transformation parameters between the optimized linear shape measuring machine coordinate system and the measuring table coordinate system as external parameters between the linear shape measuring machine and the measuring table involves iteratively optimizing the transformation parameters in the target optimization function until the residual of the target optimization function is smaller than a preset threshold, making the transformation parameters in the target optimization function when the residual of the target optimization function is smaller than a preset threshold external parameters between the linear shape measuring machine and the measuring table, obtaining contour point clouds of multiple frames collected by the linear shape measuring machine while the calibration block is moving with the measuring table, and performing feature point segmentation on each feature point in the contour point cloud of each frame to obtain a set of multiple contour feature points. The method includes: ensuring that each feature point in each set of contour feature points belongs to the same surface; constructing a constraint relationship corresponding to each set of contour feature points based on each feature point in the set of contour feature points and the surface features corresponding to the set of contour feature points, wherein the surface features corresponding to each set of contour feature points are the surface features of the surface to which each feature point in the set of contour feature points belongs; constructing a target optimization function based on the inferred coordinate system transformation relationship and the constraint relationship corresponding to each set of contour feature points, wherein the coordinate system transformation relationship is a transformation relationship between the linear shape measuring machine coordinate system and the measuring table coordinate system; and optimizing the target optimization function to obtain the optimized transformation parameter between the linear shape measuring machine coordinate system and the measuring table coordinate system as an external parameter of the linear shape measuring machine.
[0014] Preferably, performing feature point segmentation on each feature point in the contour point cloud of the frame to obtain a set of multiple contour feature points includes performing feature point segmentation on each feature point in the contour point cloud of the frame to obtain a set of multiple contour feature points based on a segmentation policy corresponding to the type of calibration block.
[0015] Preferably, performing feature point division on each feature point in the contour point cloud of the frame based on a division policy corresponding to the type of calibration block to obtain a set of multiple contour feature points includes, if the calibration block is a cone, performing curve fitting and linear fitting on each feature point in the contour point cloud of the frame, determining a set of conical feature points based on the feature points corresponding to the curves obtained by fitting, and determining a set of bottom feature points based on the feature points corresponding to the lines obtained by fitting; and if the calibration block is a sphere, performing circle fitting and linear fitting on each feature point in the contour point cloud of the frame, determining a set of spherical feature points based on the feature points corresponding to the curves obtained by fitting, and determining a set of bottom feature points based on the feature points corresponding to the lines obtained by fitting.
[0016] Preferably, before constructing a target optimization function based on the inferred coordinate system transformation relationship and the constraint relationship corresponding to each set of contour feature points, the calibration method for the external parameters of the linear shape measuring machine further includes inferring initial transformation parameters between the linear shape measuring machine coordinate system and the measuring table coordinate system based on the obtained contour point cloud, and obtaining the inferred coordinate system transformation relationship using the initial transformation parameters as initial values for the transformation relationship between the linear shape measuring machine coordinate system and the measuring table coordinate system.
[0017] Preferably, the initial transformation parameters include initial rotation parameters, and estimating the initial transformation parameters between the linear shape measuring machine coordinate system and the measuring table coordinate system based on the obtained contour point cloud includes determining the inclination of the fitting line corresponding to each bottom feature point in the obtained contour point cloud, determining the first rotation angle of the linear shape measuring machine coordinate system relative to the measuring table coordinate system based on the inclination, wherein the bottom feature point is a feature point belonging to the measuring table, determining the feature point with the maximum height in each contour point cloud as the maximum feature point, calculating the ratio of the height of the maximum feature point to the corresponding height of the calibration block, determining the second rotation angle of the linear shape measuring machine coordinate system relative to the measuring table coordinate system based on the ratio, and determining the initial rotation parameters based on the first rotation angle and the second rotation angle.
[0018] Preferably, the initial transformation parameters include initial translation parameters, and inferring the initial transformation parameters between the linear shape measuring machine coordinate system and the measuring table coordinate system based on the obtained contour point cloud includes determining a first height difference of the feature point with the maximum height in the contour point clouds of any two adjacent frames, determining the curved arc length corresponding to the first height difference and the horizontal displacement within the sampling interval of the calibration block based on the surface features of the calibration block, determining a first displacement in a first direction of the linear shape measuring machine coordinate system relative to the measuring table coordinate system based on the curved arc length and the horizontal displacement, determining a second displacement in a second direction of the linear shape measuring machine coordinate system relative to the measuring table coordinate system based on the curved arc length and the first height difference, wherein the first and second directions are orthogonal, and determining the initial translation parameters based on the first and second displacements.
[0019] Preferably, optimizing the target optimization function and obtaining, as external parameters of the linearity shape measuring machine, the conversion parameters between the optimized linearity shape measuring machine coordinate system and the measurement table coordinate system includes iteratively optimizing the conversion parameters between the linearity shape measuring machine coordinate system and the measurement table coordinate system until the residual of the target optimization function becomes smaller than a preset threshold value.
[0020] Preferably, the target optimization function further includes the sampling interval of the linearity shape measuring machine, and the calibration method for the external parameters of the linearity shape measuring machine is further including obtaining the optimized sampling interval by optimizing the target optimization function.
[0021] As a second aspect, the embodiments of the present application provide a calibration device for external parameters of a linearity shape measuring machine. The calibration device for external parameters of the linearity shape measuring machine includes: obtaining a plurality of frames of contour point clouds collected by the linearity shape measuring machine for the calibration block during the movement of the calibration block by the measurement table; a point cloud acquisition module; performing point cloud segmentation on each contour point cloud to obtain surface point clouds belonging to different measurement surfaces; a point cloud segmentation module; for each surface point cloud, constructing a constraint relationship of the surface point cloud based on each feature point in the surface point cloud and the surface feature of the measurement surface to which the surface point cloud belongs; a relationship construction module; constructing a target optimization function for the inferred conversion relationship based on the inferred conversion relationship between the linearity shape measuring machine coordinate system and the measurement table coordinate system and the constraint relationship of each surface point cloud; a function construction module; optimizing the target optimization function and obtaining, as external parameters between the linearity shape measuring machine and the measurement table, the conversion parameters between the optimized linearity shape measuring machine coordinate system and the measurement table coordinate system; a function optimization module.
[0022] As a third aspect, the embodiments of the present application provide an electronic device including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory communicate with each other through the communication bus, the memory is used to store a computer program, and when the processor executes the program stored in the memory, it is used to implement the steps of the calibration method for the external parameters of the linearity shape measuring instrument described in the first aspect.
[0023] As a fourth aspect, the embodiments of the present application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the calibration method for the external parameters of the linearity shape measuring instrument described in the first aspect.
[0024] Beneficial effects of the embodiments of the present application: In the calibration method for external parameters of a linear shape measuring machine provided in the embodiment of the present invention, while the calibration block is moving with the measuring table, contour point clouds of multiple frames obtained on the calibration block by the linear shape measuring machine are collected, point cloud division is performed on each contour point cloud to obtain surface point clouds belonging to different measuring surfaces, a constraint relationship for each surface point cloud is constructed based on each feature point in the surface point cloud and the surface features of the measuring surface to which the surface point cloud belongs, a target optimization function for the inferred transformation relationship is constructed based on the inferred transformation relationship between the linear shape measuring machine coordinate system and the measuring table coordinate system and the constraint relationship of each surface point cloud, the target optimization function is optimized, and the optimized transformation parameters between the linear shape measuring machine coordinate system and the measuring table coordinate system can be obtained as external parameters between the linear shape measuring machine and the measuring table. By collecting contour point clouds from multiple frames of the calibration block using a linear shape measuring machine, and dividing the contour point cloud of each frame into surface point clouds of different measuring surfaces based on the measuring surface to which the contour point cloud belongs, and because the geometric model of the calibration block is known, i.e., the surface features of each measuring surface of the calibration block are known, a constraint relationship for the surface point clouds belonging to each measuring surface can be constructed based on the surface features of each measuring surface, a target optimization function can be constructed, and the transformation parameters between the linear shape measuring machine coordinate system and the measuring table coordinate system can be optimized to obtain external parameters between the linear shape measuring machine and the measuring table. From this, it can be seen that the embodiment of the present invention realizes calibration of the external parameters of the linear shape measuring machine, i.e., calibration of the external parameters between the linear shape measuring machine and the measuring table has been realized.
[0025] Of course, it is not necessary to achieve all of the above advantages simultaneously when implementing any of the products or methods of this application. [Brief explanation of the drawing]
[0026] To more clearly explain the embodiments of this application and the technical concepts of the prior art, the drawings used in the embodiments or the prior art will be briefly described below. The drawings described below are merely examples of some embodiments of this application, and it will be obvious to those skilled in the art that other embodiments can be obtained based on these drawings without any creative effort. [Figure 1] Figure 1 is a flowchart of the calibration method for the external parameters of the first linear shape measuring machine provided in the embodiment of the present invention. [Figure 2] Figure 2 is a schematic diagram of sampling using a linear shape measuring instrument provided in the embodiment of the present invention. [Figure 3] Figure 3 is a schematic diagram of the contour provided in the present embodiment. [Figure 4] Figure 4 is a schematic diagram of the contour of each calibration block provided in the embodiment of the present invention. [Figure 5] Figure 5 is a flowchart of the calibration method for the external parameters of the second linear shape measuring machine provided in the embodiment of the present invention. [Figure 6] Figure 6 is a schematic diagram that determines the positive direction of the X-axis as provided in the embodiment of the present invention. [Figure 7] Figure 7 is a flowchart of the calibration method for the external parameters of the third linear shape measuring machine provided in the embodiment of the present invention. [Figure 8] Figure 8 is a flowchart of the calibration method for the external parameters of the fourth linear shape measuring machine provided in the embodiment of the present invention. [Figure 9] Figure 9 is a schematic diagram of the calibration of a linear shape measuring machine for a cone provided in the embodiment of the present invention. [Figure 10] Figure 10 is a flowchart of the calibration method for the external parameters of the fifth linear shape measuring machine provided in the present embodiment. [Figure 11] Figure 11 is a schematic diagram of the configuration of a calibration device for the external parameters of a linear shape measuring machine provided in the embodiment of the present invention. [Figure 12] Figure 12 is a schematic diagram of the configuration of the electronic device provided in the present embodiment. [Modes for carrying out the invention]
[0027] The present application will be described in detail below with reference to the drawings, including examples, in order to further clarify its objectives, technical proposal, and advantages. Of course, the examples described are only a part of the examples of the present application, and not all of them. All other examples that can be obtained by a person skilled in the art without requiring any creative work based on the examples of the present application are all within the scope of protection of the present application.
[0028] To achieve calibration of external parameters of a linear shape measuring machine, this embodiment provides a calibration method, apparatus, and electronic device for the external parameters of a linear shape measuring machine.
[0029] Furthermore, the embodiments of this application can be applied to electronic devices such as personal computers, servers, smartphones, and other devices with data processing capabilities. The calibration method for the external parameters of the linear shape measuring machine provided in the embodiments of this application may be implemented by software, hardware, or a combination thereof.
[0030] The calibration method for the external parameters of a linear shape measuring machine provided in the embodiment of this application is: Obtaining a contour point cloud of multiple frames collected from the calibration block by a linear shape measuring machine while the calibration block is moving along with the measuring platform, Point cloud segmentation is performed on each contour point cloud to obtain surface point clouds belonging to different measurement surfaces. For each surface point group, a constraint relationship is constructed based on each feature point in the surface point group and the surface features of the measurement surface to which the surface point group belongs, wherein the surface features of each measurement surface are features that indicate the geometric attributes of the measurement surface. Based on the inferred transformation relationship between the linear shape measuring machine coordinate system and the measuring table coordinate system, and the constraint relationship of each surface point cloud, a target optimization function for the inferred transformation relationship is constructed. This includes optimizing the target optimization function and obtaining the transformation parameters between the optimized linear shape measuring machine coordinate system and the measuring table coordinate system as external parameters between the linear shape measuring machine and the measuring table.
[0031] In the technical solution provided in the above embodiment of the present application, contour point clouds of multiple frames of a calibration block can be collected using a linear shape measuring machine, and the contour point cloud of each frame can be divided into surface point clouds of different measuring surfaces based on the measuring surface to which the contour point cloud belongs. Furthermore, the geometric model of the calibration block is known, meaning that the surface characteristics of each measuring surface of the calibration block are known. Therefore, based on the surface characteristics of each measuring surface, constraint relationships for the surface point cloud belonging to that measuring surface can be constructed, a target optimization function can be constructed, and the transformation parameters between the linear shape measuring machine coordinate system and the measuring table coordinate system can be optimized to obtain external parameters between the linear shape measuring machine and the measuring table. Thus, it has been shown that this embodiment of the present invention can achieve calibration of the external parameters of the linear shape measuring machine.
[0032] The calibration method for the external parameters of the linear shape measuring machine provided in this embodiment will be described in detail below with reference to the drawings.
[0033] As shown in Figure 1, the calibration method for the external parameters of the linear shape measuring machine provided in the embodiment of the present invention may include the following steps.
[0034] S101, While the calibration block is being moved by the measuring table, a contour point cloud of multiple frames collected from the calibration block is obtained by a linear shape measuring machine. A calibration block is an object with a specific geometric shape, such as a cone, sphere, crater, or frustum. When it is necessary to calibrate the external parameters of a linear shape measuring machine, since the linear shape measuring machine can only collect one linear contour point cloud at a time, it is necessary to move the linear shape measuring machine and the calibration block relative to each other to obtain complete contour information of the calibration block. This allows the linear shape measuring machine to continuously collect data on the calibration block throughout its entire movement, thereby obtaining complete contour information of the calibration block.
[0035] In this embodiment, by placing the calibration block on a measuring platform that can rotate or move in parallel, the linear shape measuring machine can continue to collect data from the calibration block while the calibration block is moving with the measuring platform. When the measuring platform rotates, the calibration block can move in a circular motion along with the rotation of the measuring platform, and when the measuring platform moves in parallel, the calibration block can move in a linear direction along with the measuring platform.
[0036] Figure 2 is a schematic diagram of data collection by the linear shape measuring machine provided in the embodiment of the present invention. In the figure, the bottom disk is the measuring platform, the cone on the bottom disk is the calibration block, the cube represents the linear shape measuring machine, and the triangle below the cube is the data sampling plane of the linear shape measuring machine, i.e., the laser plane of the linear shape measuring machine. The measuring platform rotates around its central axis, and the cone moves in a circular motion in conjunction with the rotation of the measuring platform. When the cone passes through the measurement area of the linear shape measuring machine while in motion, i.e., when the cone comes into contact with the data sampling plane of the linear shape measuring machine, the linear shape measuring machine can collect a contour point cloud of the cone at a constant sampling frequency. Between the time the cone enters the data sampling plane and the time it leaves the data sampling plane, the linear shape measuring machine can collect contour point clouds of multiple frames of the cone. The data sampling plane is the optical plane from which the linear shape measuring machine emits a laser. In Figure 2, coordinate system Oobj is the calibration block coordinate system, coordinate system Osys is the measuring table coordinate system, and coordinate system Osnr is the projected coordinate system of the linear shape measuring machine. The X, Y, and Z axes of the projected coordinate system of the linear shape measuring machine coincide with the linear shape measuring machine coordinate system (not shown in Figure 2), and its origin is the projection point of the center point of the linear shape measuring machine on the measuring table.
[0037] The linear shape measuring machine described above can measure depth data in a straight line by emitting a laser. Figure 3 is a schematic diagram of the contour point cloud collected by the linear shape measuring machine provided in the embodiment of the present invention. In the figure, the horizontal coordinate is the X-axis of the linear shape measuring machine coordinate system, and the vertical coordinate is the Z-axis of the linear shape measuring machine coordinate system. The contour point cloud of each frame collected by the linear shape measuring machine is a collection of feature points, and for any feature point in any contour point cloud, the coordinates of that feature point are (X, 0, Z). Therefore, for the linear shape measuring machine, each collected feature point is 0 in the Y-axis direction of the linear shape measuring machine coordinate system, and data is only present in the X-axis and Z-axis directions of the linear shape measuring machine coordinate system.
[0038] S102, point cloud division is performed on each contour point cloud to obtain surface point clouds belonging to different measurement surfaces. In order to obtain the constraint relationships corresponding to each feature point in the contour point cloud, in this embodiment, point cloud division is performed for each contour point cloud, and then surface point clouds belonging to different measurement surfaces can be obtained.
[0039] Since a linear shape measuring machine measures depth data in a straight line by emitting a laser, this means that the contour point cloud of each frame collected by the linear shape measuring machine usually contains feature points belonging to different measurement surfaces. The measurement surfaces consist of the geometric surface of the calibration block and the measuring platform. Taking the contour point cloud shown in Figure 3 as an example, the contour point cloud generally consists of a left straight line segment, an intermediate curved line segment, and a right straight line segment. The feature points corresponding to the left straight line segment and the right straight line segment are feature points generated when the linear shape measuring machine measures the measuring platform, while the feature points corresponding to the intermediate curved line segment are feature points generated when the linear shape measuring machine measures the geometric surface of the calibration block.
[0040] In order to correctly establish the constraint relationships, in the embodiment of this invention, it is necessary to perform point cloud division for each contour point group and obtain surface point groups belonging to different measurement surfaces.
[0041] When different calibration blocks are measured, the resulting contour point cloud typically includes surface point clouds of different measurement surfaces. For example, the contour point cloud obtained from measuring a conical calibration block includes a conical surface point cloud and a base surface point cloud, where the conical surface point cloud includes characteristic points of the cone and the base surface point cloud includes characteristic points of the measurement platform. The contour point cloud obtained from measuring a spherical calibration block includes a spherical surface point cloud and a base surface point cloud, where the spherical point cloud includes characteristic points of the sphere and the base surface point cloud includes characteristic points of the measurement platform.
[0042] Preferably, for each contour point cloud, point cloud division is performed based on a division policy corresponding to the type of calibration block, thereby obtaining surface point clouds belonging to different measurement surfaces.
[0043] As described above, when measuring different calibration blocks, the resulting contour point cloud typically includes surface point clouds of different measurement surfaces, requiring the contour point cloud to be divided using different division policies.
[0044] Figure 4 is a schematic diagram of the contours of each type of calibration block provided in the embodiment of the present invention, where the straight line segments are positions where the optical plane of the linear shape measuring machine (i.e., the laser plane of the linear shape measuring machine) and the calibration block can intersect. The frustum calibration block intersects with the laser plane of the linear shape measuring machine at different angles and positions, and there are at most eight types of surface contours that can appear, i.e., there are at most eight types of surface contours in the contour point cloud that can be collected by the linear shape measuring machine, the crater calibration block has five types of surface contours, the cone calibration block has three types of surface contours, and the spherical calibration block has two types of surface contours.
[0045] For point cloud segmentation, the simpler the intersecting contours, the easier the segmentation becomes, and the more robust it is to various materials and environments.
[0046] In one embodiment, when the calibration block is a cone, curve fitting and linear fitting are performed on each feature point in the contour point cloud. The feature points corresponding to the curves obtained by fitting are defined as the conical surface point cloud, and the feature points corresponding to the linear lines obtained by fitting are defined as the base surface point cloud. If the calibration block is a cone, the resulting contour point cloud will include the characteristic points of the cone and the characteristic points of the measuring platform. By curve fitting the characteristic points of the cone, a conic section can be obtained, and by linear fitting the characteristic points of the measuring platform, a straight line can be obtained. Therefore, after the contour point cloud is obtained, curve fitting and linear fitting can be used to determine each characteristic point in the contour point cloud that corresponds to the curve obtained by fitting, as a conical surface point cloud, and the characteristic points and base point cloud that correspond to the straight line obtained by fitting can be determined.
[0047] In one embodiment, when the calibration block is spherical, circular fitting and linear fitting are performed on each feature point in the contour point group. The feature points corresponding to the curves obtained by fitting are designated as the spherical point group, and the feature points corresponding to the straight lines obtained by fitting are designated as the base point group.
[0048] If the calibration block is spherical, it means that the resulting contour point cloud includes feature points of the sphere and feature points of the measurement platform. By curve fitting the feature points of the sphere, a spherical curve can be obtained, and by linear fitting the feature points of the measurement platform, a straight line can be obtained. Therefore, after the contour point cloud is obtained, curve fitting and linear fitting are performed to determine each feature point in the contour point cloud that corresponds to the curve obtained by fitting, and each feature point that corresponds to the straight line obtained by fitting is designated as the base point cloud.
[0049] In one embodiment, when the calibration block is a frustum, linear fitting is performed on each feature point in the contour point group to obtain a plurality of fitting lines, the plurality of fitting lines are divided to obtain endpoint lines including the endpoints and midpoint lines not including the endpoints, the feature points corresponding to the midpoint lines are made into an upper point group, and the feature points corresponding to the endpoint lines are made into a bottom point group.
[0050] If the calibration block is a frustum, it means that the obtained contour point cloud includes feature points of the frustum and the measuring platform. The feature points of the frustum and the measuring platform are divided into straight line sections, and in both cases, straight lines can be obtained as fitting lines. For multiple fitting lines, the endpoint lines that include the endpoints belong to the measuring platform, so each feature point corresponding to the endpoint line is made into the bottom point cloud. The midline lines that do not include the endpoints belong to the frustum, so each feature point corresponding to the midline line is made into the top point cloud.
[0051] S103. For each surface point group, a constraint relationship is constructed based on each feature point in the surface point group and the surface features of the measurement surface to which the surface point group belongs. The surface features of each measurement surface are features that indicate the geometric attributes of the measurement surface. After dividing the contour point cloud to obtain a surface point cloud, constraint relationships can be constructed for the surface point cloud. Each feature point in each surface point cloud corresponds to a feature point on the corresponding measurement surface, and since the surface features of each measurement surface can be determined based on the geometric model of the calibration block, constraint relationships can be constructed for the surface point cloud based on each feature point in the surface point cloud and the surface features of the measurement surface to which the surface point cloud belongs.
[0052] For example, the established constraint relationship can be expressed by the following equation.
[0053]
number
[0054] The specific constraint relationships depend on the type of calibration block; different calibration blocks have different measuring surfaces, and different measuring surfaces have different surface characteristics.
[0055] When the measurement surface is a plane, the constraint relationship between the surface features of that plane and the corresponding surface point cloud is expressed by the following formula.
[0056]
number
[0057] When the feature points of the surface point cloud corresponding to the measurement surface are conical surfaces, the constraint relationship between the surface features of the conical surface and the corresponding surface point cloud is expressed by the following equation.
[0058]
number
[0059] When the feature points of the surface point cloud corresponding to the measurement surface are spherical, the constraint relationship between the surface features of that sphere and the corresponding surface point cloud is expressed by the following equation.
[0060]
number
[0061] In each of the above constraint relationships, the coordinates of each feature point are the coordinates in the calibration block coordinate system O of the corresponding feature point. However, since the coordinates of each feature point in the surface point group are the coordinates in the linearity shape measurement machine coordinate system S, it is necessary to convert the linearity shape measurement machine coordinate system S into the coordinates in the calibration block coordinate system O.
[0062] Exemplarily, referring to FIG. 2, the calibration block coordinate system is denoted as O, i.e., Oobj in FIG. 2, the measurement pedestal coordinate system is denoted as M, i.e., Osys in FIG. 2, the linearity shape measurement machine coordinate system is S, and the projection coordinate system fixedly connected relative to the linearity shape measurement machine coordinate system is M', i.e., Osnr in FIG. 2. However, the directions of the X-axis, Y-axis, and Z-axis of the coordinate system M' are the same as those of the linearity shape measurement machine coordinate system S, and its origin is the projection point of the center point of the linearity shape measurement machine on the measurement pedestal.
[0063] The conversion relationship for changing the linearity shape measurement machine coordinate system into the calibration block coordinate system is expressed by the following formula.
[0064]
Equation
[0065] When the measurement pedestal rotates, the above conversion relationship is expanded as follows.
[0066]
Equation
number
[0067] The above transformation relationship is a calibration target that includes external parameters between the linear shape measuring machine coordinate system and the measuring table coordinate system.
[0068] For each surface point group, the transformation is performed based on the above transformation relationship to obtain the constraint relationship for each surface point group by converting it to each feature point in the calibration block coordinate system and substituting it into the aforementioned constraint relationships.
[0069] S104. Based on the inferred transformation relationship between the linear shape measuring machine coordinate system and the measuring table coordinate system, and the constraint relationship of each surface point cloud, a target optimization function for the inferred transformation relationship is constructed. Since the inferred transformation relationship includes estimated values of external parameters between the linear shape measuring machine coordinate system and the measuring table coordinate system, these estimated values can be substituted into the constraint relationships of each surface point cloud described above to obtain constraint relationships that include the estimated values. The above estimated values are obtained by inferring each collected contour point cloud, and specific embodiments will be described in detail in subsequent embodiments, but of course, these estimated values may be null.
[0070] After obtaining the constraint relationships including the estimated values, a target optimization function may be constructed based on each preset constraint relationship. Preferably, the residuals of each surface point group that can be constructed based on the constraint relationships of each surface point group are expressed by the following formula.
[0071]
number
[0072] Furthermore, the target optimization function that is constructed is expressed by the following equation.
[0073]
number
[0074] The target optimization function is used to calculate the minimum value of the sum of residuals corresponding to each surface point group.
[0075] In S105, the target optimization function is optimized, and the transformation parameters between the optimized linear shape measuring machine coordinate system and the measuring table coordinate system are obtained as external parameters between the linear shape measuring machine and the measuring table.
[0076] After obtaining the target optimization function, the transformation parameters in the target optimization function may be iteratively optimized, and after each iteration, it may be determined whether the residual of the target optimization function is smaller than a preset threshold. If the residual of the target optimization function is smaller than the preset threshold, it means that each parameter in the currently iterated target optimization function satisfies the condition, and in this case, the transformation parameters in the target optimization function when the residual of the target optimization function is smaller than the preset threshold can be the external parameters between the linear shape measuring machine and the measuring stand. If the residual of the target optimization function is greater than or equal to the preset threshold, the iteration continues until the residual of the target optimization function becomes smaller than the preset threshold. The above preset threshold may be determined according to needs and experience. The residual of the target optimization function is the sum of the residuals corresponding to each surface point cloud.
[0077] In the above-described technical solution provided in the embodiment of the present invention, contour point clouds of multiple frames of a calibration block are collected by a linear shape measuring machine, and the contour point cloud of each frame can be divided into surface point clouds of different measuring surfaces based on the measuring surface to which the contour point cloud belongs. Furthermore, since the geometric model of the calibration block is known, that is, the surface features of each measuring surface of the calibration block are known, a constraint relationship of the surface point clouds belonging to each measuring surface can be constructed based on the surface features of each measuring surface, a target optimization function can be constructed, and the transformation parameters between the linear shape measuring machine coordinate system and the measuring table coordinate system can be optimized to obtain external parameters between the linear shape measuring machine and the measuring table. Thus, it has been shown that the embodiment of the present invention achieves calibration of the linear shape measuring machine with respect to external parameters.
[0078] A further calibration method for the external parameters of another linear shape measuring machine provided in the embodiments of this application is, after step S104, This further includes determining, as an inferred transformation relationship, the coordinate system transformation relationship between the linear shape measuring machine coordinate system and the measuring table coordinate system based on the contour point cloud obtained from multiple frames.
[0079] After obtaining contour point clouds from multiple frames, the coordinate system transformation relationship between the linear shape measuring machine coordinate system and the measuring table coordinate system may be inferred as an inferred transformation relationship based on the obtained contour point clouds from multiple frames. In this inferred transformation relationship, the external parameters between the linear shape measuring machine coordinate system and the measuring table coordinate system are inferred values and are not accurate, but performing the subsequent optimization of the target optimization function based on these inferred values can improve both the optimization efficiency and the accuracy of the optimization.
[0080] In one embodiment, as shown in Figure 5, steps S501 to S502 may be included to determine the coordinate system transformation relationship between the linear shape measuring machine coordinate system and the measuring table coordinate system as an inferred transformation relationship based on the contour point cloud of the multiple frames obtained above.
[0081] S501: Based on contour point clouds from multiple frames, the initial transformation parameters between the linear shape measuring machine coordinate system and the measuring table coordinate system are determined. In the embodiment of this application, the measuring table coordinate system has the center of the measuring table as the origin, the direction perpendicular to the measuring table and upward as the Z-axis direction, and the direction pointing towards the linear shape measuring machine as the X-axis direction, and the Y-axis direction in the measuring table coordinate system is determined based on the Z-axis and X-axis directions. The calibration block coordinate system has the geometric center of the calibration block as the origin, and its X-axis, Y-axis and Z-axis directions are the same as those of the measuring table coordinate system. The linear shape measuring machine coordinate system has the center of the linear shape measuring machine geometry as the origin, its X-axis direction is parallel to the X-axis direction of the measuring table coordinate system, and the positive direction of the X-axis in the linear shape measuring machine coordinate system may be determined based on the contour point cloud.
[0082] Preferably, in one embodiment, Figure 6 is a schematic diagram that determines the positive direction of the X-axis provided in the embodiment of the present application.
[0083] In Figure 6, the outermost semicircular arc represents the trajectory of the calibration block's circular motion; the circles in the figure are plan views of the cone or sphere calibration block; the multiple line segments diverging outward from the center point of the semicircular arc represent lines connecting the vertices of the calibration block and the center point of the measurement plane at each sampling time; the line segments with arrows represent the sampling positions of the linear shape measuring machine relative to the calibration block at each sampling time; and the origin of the line segments with arrows represents the position where the maximum feature point in the contour point cloud obtained by the linear shape measuring machine at each sampling time is located.
[0084] In this configuration, the coordinates of the feature point with the maximum value in the contour point cloud of each frame are calculated, and the curvature of the line connecting the feature points with the maximum value in the contour point cloud of each frame is determined, and the direction of curvature is determined as the positive direction of the X-axis of the linear shape measuring machine coordinate system. For example, if the curvature direction is negative, the positive direction of the X-axis of the linear shape measuring machine coordinate system points away from the center of the measuring table, and conversely, if the curvature direction is positive, the positive direction of the X-axis of the linear shape measuring machine coordinate system points towards the center point of the measuring table. The positive direction of the X-axis of the linear shape measuring machine coordinate system determined in this way can be used to determine the direction of the subsequent Euler angle.
[0085] The initial transformation parameters between the linear shape measuring machine coordinate system and the measuring table coordinate system may include initial rotation parameters and / or initial translation parameters. Each rotation parameter indicates the angle by which each directional axis should rotate when transforming the linear shape measuring machine coordinate system to the measuring table coordinate system, and each translation parameter indicates the distance moved from each origin along each directional axis when transforming the linear shape measuring machine coordinate system to the measuring table coordinate system. For ease of understanding, the process of determining the initial transformation parameters will be explained in detail in subsequent embodiments.
[0086] S502, the initial transformation parameters are used as estimated values for each parameter in the transformation equation between the linear shape measuring machine coordinate system and the measuring table coordinate system to obtain the estimated transformation relationship.
[0087] After obtaining the initial transformation parameters between the linear shape measuring machine coordinate system and the measuring table coordinate system, the inferred transformation relationship can be obtained by using these initial transformation parameters as estimated values for each parameter in the transformation equation between the linear shape measuring machine coordinate system and the measuring table coordinate system.
[0088] According to the above-described technical solution provided in the embodiment of this application, calibration for external parameters between the linear shape measuring machine and the measuring table can be achieved. At the same time, the inferred transformation relationship between the linear shape measuring machine coordinate system and the measuring table coordinate system can be estimated from the contour point cloud of multiple frames, thereby improving the optimization efficiency and accuracy of the target optimization function.
[0089] Preferably, in one embodiment, the initial transformation parameter includes the initial rotation parameter. In this case, as shown in Figure 7, the embodiment of the present invention further provides a method for calibrating external parameters of other linear shape measuring machines, and step S501 may include steps S701 to S703.
[0090] S701 determines the inclination of the fitting line corresponding to each bottom feature point in the contour point cloud of multiple frames, and determines the first rotation angle of the linear shape measuring machine coordinate system relative to the measuring table coordinate system based on this inclination. The bottom feature points are feature points belonging to the measuring platform. As shown in Figure 3, the slope of the fitting line corresponding to the bottom point cloud may be calculated and denoted as ry. Then, ry may be converted to an angle value and used as the first rotation angle of the linear shape measuring machine coordinate system relative to the measuring platform coordinate system.
[0091] S702 identifies the feature point with the maximum height in the contour point cloud of multiple frames as the maximum feature point, calculates the ratio of the height of the maximum feature point to the actual height of the calibration block, and determines the second rotation angle of the linear shape measuring machine coordinate system relative to the measurement table coordinate system based on this ratio. Preferably, the second rotation angle can be calculated using the largest vertex and denoted as rx. Each frame's contour point cloud has a vertex, and the distance from the vertex to the base line is the measured height of the vertex. In all contour point clouds, the vertex with the maximum height is at the position of the cone apex, so rx can be obtained by calculating the ratio of this height to the actual height of the cone. Then, rx can be converted into an angle value and used as the second rotation angle of the linear shape measuring machine coordinate system relative to the measuring table coordinate system.
[0092] S703 determines the initial rotation parameters based on the first and second rotation angles.
[0093] In this step, after obtaining the first and second rotation angles, the first and second rotation angles may be used as initial rotation parameters.
[0094] According to the above-described technical solution provided in the embodiment of this application, calibration for external parameters between the linear shape measuring machine and the measuring table can be achieved. At the same time, the initial rotation parameters between the linear shape measuring machine coordinate system and the measuring table coordinate system can be determined from the contour point cloud of multiple frames, thereby providing a foundation for improving the optimization efficiency and accuracy of the target optimization function.
[0095] Preferably, in one embodiment, the initial transformation parameter includes the initial translation parameter. In this case, as shown in Figure 8, the embodiment of the present invention further provides a method for calibrating the external parameters of other linear shape measuring machines, and step S502 may include steps S801 to S805.
[0096] S801. For contour point clouds of any two adjacent frames, the first height difference of the feature point with the maximum height in the contour point clouds of those two frames is determined. Figure 9 is a schematic diagram of the height difference provided in the embodiment of the present invention. In Figure 9, the solid and dotted lines on the left represent the position of the calibration block in a plan view for two adjacent measurements as the calibration block moves along the measurement plane, respectively. The right side of Figure 9 is a schematic diagram of the calibration block, where the dotted line represents the center line of the calibration block, and the two solid line segments on the calibration block represent the measurement position of the linear shape measuring machine for two adjacent measurements as the calibration block moves along the measurement plane. The first height difference is the height difference of the feature point with the maximum height difference value in each adjacent contour point group, and is denoted as the first height difference, i.e., dz in Figure 9.
[0097] S802 determines the curved arc length corresponding to the first height difference and the horizontal displacement within each sampling interval of the calibration block based on the surface characteristics of the calibration block. After determining the first height difference, the surface features of the measurement surface of the calibration block are combined to determine the curved arc length corresponding to the first height difference, i.e., the distance on the calibration block surface between the two feature points with the maximum height difference value, i.e., dx in Figure 9, and the horizontal displacement of the calibration block within the sampling interval, i.e., dy in Figure 9.
[0098] S803, based on the curved surface arc length and horizontal displacement, the first displacement in the first direction of the linear shape measuring machine coordinate system relative to the measuring table coordinate system is determined. The ratio between the curved surface arc length and the horizontal displacement is calculated, and the first displacement in the first direction of the linear shape measuring machine coordinate system relative to the measuring table coordinate system is determined. Preferably, this first direction may be the Z-axis direction, that is, the displacement in the Z-axis direction of the linear shape measuring machine coordinate system relative to the measuring table coordinate system is calculated and taken as the first displacement.
[0099] In S804, based on the curved surface arc length and the first height difference, the second displacement in the second direction of the linear shape measuring machine coordinate system relative to the measuring table coordinate system is determined, and the first and second directions are orthogonal. The ratio between the curved surface arc length and the first height difference is calculated, and further, the second displacement of the linear shape measuring machine coordinate system in a second direction relative to the measuring table coordinate system is determined. Preferably, this second direction may be the X-axis direction, that is, the displacement of the linear shape measuring machine coordinate system in the X-axis direction relative to the measuring table coordinate system is determined and taken as the second displacement.
[0100] S805, the initial translation parameters are determined based on the first and second displacements.
[0101] In this step, the first and second displacements may be used as initial translation parameters. Furthermore, the initial translation parameters may include ty=0, meaning that the translation distance in the Y-axis direction of the linear shape measuring machine coordinate system relative to the measuring table coordinate system may be 0.
[0102] According to the technical solution provided in the embodiment of this application, calibration for external parameters between the linear shape measuring machine and the measuring table can be achieved. At the same time, the initial translation parameters between the linear shape measuring machine coordinate system and the measuring table coordinate system can be determined from the contour point cloud of multiple frames, thereby providing a foundation for improving the optimization efficiency and accuracy of the target optimization function.
[0103] Preferably, in other embodiments in which the initial transformation parameters include initial translation parameters, the calibration block may be a frustum. In this case, as shown in Figure 10 above the embodiment shown in Figure 5, the present embodiment further provides a method for calibrating external parameters of other linear shape measuring machines, and step S502 may include steps S1001 to S1003.
[0104] S1001, based on the contour point cloud of each frame, the horizontal coordinate of a specified point on the frustum is determined as the third displacement, and the specified point is any point on the frustum. In this step, the transverse coordinate of a specified point on the frustum may be determined as the third displacement based on the contour point cloud of each frame. The specified point is any point on the frustum, for example, the center point of the vertex of the vertex, or any of the vertices of the four corners of the vertex, or any of the vertices of the four corners of the base of the frustum. Preferably, the third displacement may be 0.
[0105] Preferably, if the designated point is the center point of the vertex of the frustum, the contour point group located at the intermediate position may be determined from the contour point group of each frame, and the horizontal coordinate of the feature point at the intermediate position may be determined as the third displacement.
[0106] S1002, the height of the frustum may be determined as the fourth displacement based on the surface point group belonging to the apex of the frustum and the base point group belonging to the measuring platform. Preferably, the difference in elevation between the top surface of the frustum and the bottom surface of the measuring platform can be determined as the height of the frustum, i.e., the fourth displacement, using the surface point group belonging to the top surface of the frustum and the bottom surface point group belonging to the measuring platform.
[0107] S1003, the initial translation parameters are determined based on the third and fourth displacements.
[0108] In this step, the third and fourth displacements may be used as initial translation parameters. Furthermore, the initial translation parameters may include ty=0, meaning that the translation distance in the Y-axis direction of the linear shape measuring machine coordinate system relative to the measuring table coordinate system may be 0.
[0109] According to the technical solution provided in the embodiment of this application, calibration of external parameters between the linear shape measuring machine and the measuring table can be achieved. At the same time, the initial translation parameters between the linear shape measuring machine coordinate system and the measuring table coordinate system can be determined from the contour point cloud of multiple frames, thereby providing a foundation for improving the optimization efficiency and accuracy of the target optimization function.
[0110] As shown in Figure 11, according to the method provided in the above embodiment of the present application, the embodiment of the present application further provides a calibration device for the external parameters of a linear shape measuring machine, and the calibration device for the external parameters of a linear shape measuring machine is During the movement of the calibration block by the measuring stand, a linear shape measuring machine is used to obtain contour point clouds of multiple frames collected from the calibration block, using a point cloud acquisition module 1101. A point cloud division module 1102 performs point cloud division on each contour point cloud to obtain surface point clouds belonging to different measurement surfaces, For each surface point group, a relationship building module 1103 constructs a constraint relationship for the surface point group based on each feature point in the surface point group and the surface features of the measurement surface to which the surface point group belongs. A function construction module 1104 constructs a target optimization function for the inferred transformation relationship based on the inferred transformation relationship between the linear shape measuring machine coordinate system and the measuring table coordinate system, and the constraint relationship of each surface point cloud. The system includes a function optimization module 1105 that optimizes the target optimization function and obtains transformation parameters between the optimized linear shape measuring machine coordinate system and the measuring table coordinate system as external parameters between the linear shape measuring machine and the measuring table.
[0111] Preferably, the point cloud division module is used to perform point cloud division on each contour point cloud based on a division policy corresponding to the type of calibration block, thereby obtaining surface point clouds belonging to different measurement surfaces.
[0112] Preferably, the point cloud division module is used to: when the calibration block is a cone, perform curve fitting and linear fitting on each feature point in the contour point cloud, determine each feature point corresponding to the fitted curve as a conical surface point cloud, and determine each feature point corresponding to the fitted linear as a base surface point cloud; when the calibration block is a sphere, perform circle fitting and linear fitting on each feature point in the contour point cloud, determine each feature point corresponding to the fitted curve as a spherical point cloud, and determine each feature point corresponding to the fitted linear as a base surface point cloud; when the calibration block is a frustum, perform linear fitting on each feature point in the contour point cloud to obtain a plurality of fitting lines, and by dividing the plurality of fitting lines, obtain endpoint lines including the endpoints and midpoint lines not including the endpoints, determine each feature point corresponding to the midpoint lines as an upper surface point cloud, and determine each feature point corresponding to the endpoint lines as a base surface point cloud.
[0113] Preferably, the calibration device for the external parameters of the linear shape measuring machine is The function construction module further includes a relationship estimation module that, before constructing a target optimization function for the inferred transformation relationship based on the inferred transformation relationship between the linear shape measuring machine coordinate system and the measuring table coordinate system and the constraint relationship of each surface point cloud, determines the coordinate system transformation relationship between the linear shape measuring machine coordinate system and the measuring table coordinate system as an inferred transformation relationship based on the contour point clouds of multiple frames obtained.
[0114] Preferably, the relationship estimation module is used specifically to determine initial transformation parameters between the linear shape measuring machine coordinate system and the measuring table coordinate system based on the contour point cloud of the multiple frames, and to obtain an estimated transformation relationship by using the initial transformation parameters as estimated values for each parameter in the transformation formula between the linear shape measuring machine coordinate system and the measuring table coordinate system.
[0115] Preferably, the initial transformation parameters include initial rotation parameters. The relation estimation module is used to determine the inclination of a fitting line corresponding to each bottom feature point in the contour point cloud of the multiple frames, to determine the first rotation angle of the linear shape measuring machine coordinate system relative to the measuring table coordinate system based on the inclination, wherein the bottom feature point is a feature point belonging to the measuring table, to determine the feature point with the maximum height in the contour point cloud of the multiple frames as the maximum feature point, to calculate the ratio of the height of the maximum feature point to the actual height of the calibration block, to determine the second rotation angle of the linear shape measuring machine coordinate system relative to the measuring table coordinate system based on the ratio, and to determine the initial rotation parameter based on the first rotation angle and the second rotation angle.
[0116] Preferably, the initial transformation parameters include initial translation parameters. Specifically, the relation estimation module determines, for any two adjacent frame contour point clouds, the first height difference of the feature point with the maximum height in the contour point clouds of the two frames; determines the curved arc length corresponding to the first height difference and the horizontal displacement within each sampling interval of the calibration block based on the surface features of the calibration block; determines the first displacement in the first direction of the linear shape measuring machine coordinate system relative to the measurement table coordinate system based on the curved arc length and the horizontal displacement; and determines the linear shape measuring machine coordinate system relative to the measurement table coordinate system based on the curved arc length and the first height difference This method is used to determine a second displacement in a second direction, wherein the first and second directions are orthogonal, and to determine the initial translation parameters based on the first and second displacements; or to determine the transverse coordinate of a specified point on the frustum as a third displacement based on the contour point cloud of each frame, wherein the specified point is any point on the frustum, and to determine the height of the frustum as a fourth displacement based on the surface point cloud belonging to the apex of the frustum and the base point cloud belonging to the measuring platform, and to determine the initial translation parameters based on the third and fourth displacements.
[0117] Preferably, the function optimization module is used specifically to iteratively optimize the transformation parameters in the target optimization function until the residual of the target optimization function becomes smaller than a preset threshold, and to use the transformation parameters in the target optimization function when the residual of the target optimization function is smaller than the preset threshold as external parameters between the linear shape measuring machine and the measuring stand.
[0118] In the above-described technical solution provided in the embodiment of the present invention, contour point clouds of multiple frames of a calibration block are collected by a linear shape measuring machine, and the contour point cloud of each frame can be divided into surface point clouds of different measuring surfaces based on the measuring surface to which the contour point cloud belongs. Furthermore, since the geometric model of the calibration block is known, that is, the surface characteristics of each measuring surface of the calibration block are known, a constraint relationship of the surface point clouds belonging to each measuring surface can be constructed based on the surface characteristics of each measuring surface, a target optimization function can be constructed, and the transformation parameters between the linear shape measuring machine coordinate system and the measuring table coordinate system can be optimized to obtain external parameters between the linear shape measuring machine and the measuring table. Thus, it has been shown that the embodiment of the present invention has achieved calibration of the linear shape measuring machine with respect to external parameters.
[0119] As shown in Figure 12, the present embodiment is an electronic device including a processor 1201, a communication interface 1202, a memory 1203, and a communication bus 1204, wherein the processor 1201, the communication interface 1202, and the memory 1203 communicate with each other via the communication bus 1204. Memory 1203 is used to store computer programs. The processor 1201 is used to execute a program stored in memory 1203 and to implement the steps of the method provided in the above embodiment of the present invention.
[0120] The communication bus mentioned in the above-mentioned electronic devices may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus is divided into an address bus, a data bus, a control bus, etc. In the diagram, for illustrative purposes, it is shown with a single thick line, but this does not mean that there is only one bus or only one type of bus.
[0121] The communication interface is used for communication between the above-mentioned electronic device and other devices.
[0122] The memory may include random access memory (RAM) or non-volatile memory (NVM), and may be, for example, at least one magnetic disk memory. Preferably, the memory may further be at least one storage device located away from the aforementioned processor.
[0123] The processor described above may be a general-purpose processor including a Central Processing Unit (CPU), a Network Processor (NP), etc., or it may be a general-purpose processor including a Digital Signal Processing (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other reprogrammable logic device, a discrete gate or transistor logic device, or a discrete hardware assembly.
[0124] Further embodiments of the present invention provide a computer-readable storage medium that, when executed by a processor, stores in the processor a computer program that enables steps of a calibration method for the external parameters of any of the linear shape measuring machines described above.
[0125] Further embodiments of the present invention provide a computer program product including commands, which, when executed on a computer, causes the computer to implement a calibration method for the external parameters of any of the linear shape measuring machines described in the above embodiments.
[0126] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer commands. When the computer program commands are loaded and executed on a computer, all or part of the embodiments implement the flows or functions described in the embodiments of the present application. The computer may be a general-purpose computer, an application-specific computer, a computer network, or other programmable device. The computer commands are stored on a computer-readable storage medium or can be transmitted from one computer-readable storage medium to another. For example, the computer commands can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, radio, microwave, etc.). The computer-readable storage medium may be any available medium that a computer can read and write, or it may be a data storage device including a server, data center, etc., which integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or solid state drives (SSDs), etc.
[0127] In this text, relational terms such as “First” and “Second” are used solely to distinguish one entity or operation from another, and do not require or suggest any actual relationship or order between these entities or operations. Furthermore, the terms “includes,” “contains,” or any other variation of “contains” mean non-exclusive. Therefore, a flow, method, product, or device containing a set of elements does not include only those elements, but also other elements not explicitly mentioned, or elements specific to such a flow, method, product, or device. Unless otherwise specified, an element limited by the phrase “contains one…” does not preclude other identical elements from being included in a flow, method, product, or device containing the described element.
[0128] Each example in this specification is described in relation to the others, but any identical or similar parts between the examples should be cross-referenced, and each example focuses on the differences from the other examples. In particular, the examples of apparatus, equipment, and systems are basically similar to the method examples and are therefore described briefly. For relevant points, please refer to the description in the method examples section.
Claims
1. A method for calibrating the external parameters of a linear shape measuring machine, performed by a calibration device, During the movement of the calibration block on the measuring stand, a contour point cloud of multiple frames collected from the calibration block by a linear shape measuring machine is obtained, Point cloud segmentation is performed on each contour point cloud to obtain surface point clouds belonging to different measurement surfaces. For each surface point group, a constraint relationship is constructed based on each feature point in the surface point group and the surface features of the measurement surface to which the surface point group belongs, wherein the surface features of each measurement surface are features that indicate the geometric attributes of the measurement surface. Based on the inferred transformation relationship between the linear shape measuring machine coordinate system and the measuring table coordinate system, and the constraint relationship of each surface point cloud, a target optimization function is constructed for the said inferred transformation relationship. The method is characterized by including optimizing the target optimization function and using the optimized transformation parameters between the linear shape measuring machine coordinate system and the measuring table coordinate system as external parameters between the linear shape measuring machine and the measuring table. Calibration method for external parameters of a linear shape measuring machine.
2. Performing point cloud division on each of the aforementioned contour point groups to obtain surface point groups belonging to different measurement surfaces is, The method is characterized by including, for each contour point cloud, performing point cloud division based on a division policy corresponding to the type of calibration block, to obtain surface point clouds belonging to different measurement surfaces. A method for calibrating the external parameters of a linear shape measuring machine according to claim 1.
3. Based on the division policy corresponding to the type of calibration block, point cloud division is performed on the contour point cloud to obtain surface point clouds belonging to different measurement surfaces. If the calibration block is a cone, curve fitting and linear fitting are performed on each feature point in the contour point cloud, and the feature points corresponding to the curves obtained by fitting are determined as the conical surface point cloud, and the feature points corresponding to the linear lines obtained by fitting are determined as the base surface point cloud. If the calibration block is a sphere, circular fitting and linear fitting are performed on each feature point in the contour point cloud, the feature points corresponding to the curves obtained by fitting are made into a spherical point cloud, and the feature points corresponding to the straight lines obtained by fitting are made into a base point cloud. If the calibration block is a frustum, the method includes performing linear fitting on each feature point in the contour point cloud to obtain multiple fitting lines, dividing the multiple fitting lines into endpoint lines including the endpoints and midpoint lines not including the endpoints, forming the upper point cloud with the feature points corresponding to the midpoint lines and the lower point cloud with the feature points corresponding to the endpoint lines. A method for calibrating the external parameters of a linear shape measuring machine according to claim 2.
4. Before constructing a target optimization function for the inferred transformation relationship based on the inferred transformation relationship between the linear shape measuring machine coordinate system and the measuring table coordinate system, and the constraint relationship of each surface point cloud, the calibration method for the external parameters of the linear shape measuring machine is as follows: The method further includes determining the coordinate system transformation relationship between the linear shape measuring machine coordinate system and the measuring table coordinate system as an inferred transformation relationship based on the contour point cloud of multiple frames obtained, A method for calibrating the external parameters of a linear shape measuring machine according to any one of claims 1 to 3.
5. Based on the contour point cloud of the multiple frames obtained, determining the coordinate system transformation relationship between the linear shape measuring machine coordinate system and the measuring table coordinate system as an inferred transformation relationship is: Based on the contour point cloud of the multiple frames, the initial transformation parameters between the linear shape measuring machine coordinate system and the measuring table coordinate system are determined. The method is characterized by obtaining an estimated transformation relationship by using the initial transformation parameters as estimated values for each parameter in the transformation equation between the linear shape measuring machine coordinate system and the measuring table coordinate system. A method for calibrating the external parameters of a linear shape measuring machine according to claim 4.
6. The aforementioned initial transformation parameters include initial rotation parameters, Determining the initial transformation parameters between the linear shape measuring machine coordinate system and the measuring table coordinate system based on the contour point cloud of the multiple frames is: The inclination of the fitting line corresponding to each bottom feature point in the contour point cloud of the plurality of frames is determined, and the first rotation angle of the linear shape measuring machine coordinate system relative to the measuring table coordinate system is determined based on the inclination, wherein the bottom feature point is a feature point belonging to the measuring table, The feature point with the maximum height in the contour point cloud of the multiple frames is determined as the maximum feature point, the ratio of the height of the maximum feature point to the actual height of the calibration block is calculated, and the second rotation angle of the linear shape measuring machine coordinate system relative to the measurement table coordinate system is determined based on this ratio. The method is characterized by including determining the initial rotation parameters based on the first rotation angle and the second rotation angle, A method for calibrating the external parameters of a linear shape measuring machine according to claim 5.
7. The aforementioned initial transformation parameters include initial translation parameters, Determining the initial transformation parameters between the linear shape measuring machine coordinate system and the measuring table coordinate system based on the contour point cloud of the multiple frames is: For any two adjacent frame contour point clouds, this includes determining a first height difference of the feature point with the maximum height in the contour point clouds of the two frames; determining the curved arc length corresponding to the first height difference and the horizontal displacement within each sampling interval of the calibration block based on the surface features of the calibration block; determining a first displacement in a first direction of the linear shape measuring machine coordinate system relative to the measuring table coordinate system based on the curved arc length and the horizontal displacement; determining a second displacement in a second direction of the linear shape measuring machine coordinate system relative to the measuring table coordinate system based on the curved arc length and the first height difference, wherein the first and second directions are orthogonal; and determining the initial translation parameter based on the first and second displacements, or When the calibration block is a frustum, the method includes determining the transverse coordinate of a designated point on the frustum as a third displacement based on the contour point cloud of each frame, wherein the designated point is any point on the frustum; determining the height of the frustum as a fourth displacement based on the surface point cloud belonging to the apex of the frustum and the base point cloud belonging to the measuring platform; and determining the initial translation parameter based on the third and fourth displacements. A method for calibrating the external parameters of a linear shape measuring machine according to claim 5.
8. Optimizing the aforementioned target optimization function and obtaining the optimized transformation parameters between the linear shape measuring machine coordinate system and the measuring table coordinate system as external parameters between the linear shape measuring machine and the measuring table is, The transformation parameters in the target optimization function are iteratively optimized until the residuals of the target optimization function become smaller than a preset threshold. The present invention is characterized in that, when the residual of the target optimization function is smaller than a preset threshold, the transformation parameter in the target optimization function is set to an external parameter between the linear shape measuring machine and the measuring stand. A method for calibrating the external parameters of a linear shape measuring machine according to any one of claims 1 to 3.
9. A point cloud acquisition module that obtains contour point clouds of multiple frames collected on the calibration block by a linear shape measuring machine while the calibration block is being moved on a measuring stand, A point cloud division module that performs point cloud division on each contour point cloud to obtain surface point clouds belonging to different measurement surfaces, For each surface point group, a relation building module is used to construct constraint relationships for that surface point group based on each feature point in that surface point group and the surface features of the measurement surface to which the surface point group belongs, wherein the surface features of each measurement surface are features that indicate the geometric attributes of that measurement surface, A function construction module constructs a target optimization function for the inferred transformation relationship between the linear shape measuring machine coordinate system and the measuring table coordinate system, based on the constraint relationship of each surface point cloud, The system includes a function optimization module that optimizes the target optimization function and uses the optimized transformation parameters between the linear shape measuring machine coordinate system and the measuring table coordinate system as external parameters between the linear shape measuring machine and the measuring table. Calibration device for external parameters of a linear shape measuring machine.
10. The point cloud division module is characterized in that, for each contour point cloud, it is used to perform point cloud division on the contour point cloud based on a division policy corresponding to the type of calibration block, and to obtain surface point clouds belonging to different measurement surfaces. Calibration device for external parameters of a linear shape measuring machine according to claim 9.
11. The point cloud division module is characterized in that, when the calibration block is a cone, it performs curve fitting and linear fitting on each feature point in the contour point cloud, determining each feature point corresponding to the fitted curve as a conical surface point cloud and each feature point corresponding to the fitted linear as a base point cloud; when the calibration block is a sphere, it performs circular fitting and linear fitting on each feature point in the contour point cloud, determining each feature point corresponding to the fitted curve as a spherical point cloud and each feature point corresponding to the fitted linear as a base point cloud; when the calibration block is a frustum, it performs linear fitting on each feature point in the contour point cloud to obtain multiple fitting lines, and divides the multiple fitting lines into endpoint lines including the endpoints and midpoint lines not including the endpoints, determining each feature point corresponding to the midpoint lines as an upper point cloud and each feature point corresponding to the endpoint lines as a base point cloud. Calibration device for external parameters of a linear shape measuring machine according to claim 10.
12. The function construction module further includes a relationship estimation module that, before constructing a target optimization function for the estimated transformation relationship based on the estimated transformation relationship between the linear shape measuring machine coordinate system and the measuring table coordinate system and the constraint relationship of each surface point cloud, determines the coordinate system transformation relationship between the linear shape measuring machine coordinate system and the measuring table coordinate system as an estimated transformation relationship based on the contour point clouds of multiple frames obtained, Calibration device for external parameters of a linear shape measuring machine according to any one of claims 9 to 11.
13. The relationship estimation module is characterized by being used to determine initial transformation parameters between the linear shape measuring machine coordinate system and the measuring table coordinate system based on the contour point cloud of the multiple frames, and to obtain an estimated transformation relationship by using the initial transformation parameters as estimated values for each parameter in the transformation formula between the linear shape measuring machine coordinate system and the measuring table coordinate system. Calibration device for external parameters of a linear shape measuring machine according to claim 12.
14. An electronic device comprising a processor, a communication interface, memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus. Memory is used to store computer programs. The processor is characterized in that, upon executing a program stored in memory, it is used to realize the steps of the calibration method for external parameters of a linear shape measuring machine described in any one of claims 1 to 3. electronic equipment.
15. The processor stores a computer program that, when executed, implements the steps of the calibration method for external parameters of a linear shape measuring machine according to any one of claims 1 to 3. Computer-readable storage medium.