Method, measuring device and computer program
The described procedure and measuring device address the limitations of conventional optical measuring devices by using an optical sensor to generate a sharpness cloud and create a surface profile, achieving efficient and accurate 3D data capture without the need for tactile sensors.
Patent Information
- Application Number
- DE102021111706
- Authority / Receiving Office
- DE · DE
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-05-05
- Publication Date
- 2025-04-24
- Estimated Expiration
- 2041-05-05
AI Technical Summary
Conventional optical measuring devices can only capture 2D data, requiring additional technologies to determine depth information in the Z direction, which can increase costs and complexity by integrating tactile sensors or using methods like Shape from Focus (SFF) that are time-consuming and prone to errors.
A procedure and measuring device that utilize an optical sensor to record a stack of images while moving laterally, generating a sharpness cloud by transforming sharpness cards into a defined reference system, and creating a surface profile based on local sharpness maxima, allowing for efficient 3D data capture without the need for tactile sensors.
This approach enables rapid and precise collection and processing of 3D surface data, reducing the need for complex registrations and improving edge detection, resulting in a more robust and accurate surface reconstruction compared to traditional methods.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
[0001] The present invention relates to a method for measuring a surface of a workpiece using an optical sensor of a measuring device. Furthermore, the present invention relates to a measuring device, in particular a coordinate measuring machine or a microscope, for measuring a surface of a workpiece. Furthermore, the present invention relates to a computer program.
[0002] Such a method and such a device are known, for example, from the document US 5 151 609 A.
[0003] Measuring instruments for measuring the surface of a workpiece, also called a measurement object, are well known in the art. Industrial metrology generally requires measuring instruments that can measure 3D information of a workpiece. Various types of sensors can be used in such measuring instruments to capture the coordinates of the workpiece to be measured.
[0004] For example, tactile measuring sensors are known for this purpose. Here, the surface of the workpiece to be measured is contacted with a stylus whose coordinates in the measuring space are constantly known. Such a stylus can also be moved along the surface of a workpiece, allowing a large number of measurement points to be recorded at specified time intervals in such a measuring process as part of a so-called "scanning process."
[0005] Optical measuring devices that use optical sensors are also known. These optical sensors enable non-contact detection of a workpiece's coordinates. In optical measuring devices, the workpiece to be measured is clamped on a table acting as a workpiece holder. The table forms an XY plane. The optical sensor is spaced from the workpiece to be measured perpendicular to this plane, i.e., in the Z direction of a Cartesian coordinate system.
[0006] Since conventional optical measuring devices, such as microscopes or coordinate measuring machines, can only record 2D data, the image depth or depth information in the Z direction is determined using an additional technique.
[0007] For example, it is known to use tactile sensors together with optical sensors. However, tactile sensors must be integrated into the measuring device along with the optical system, increasing the cost and complexity of the measuring device. Furthermore, the tactile sensor must be in contact with the workpiece, which is not always desirable.
[0008] A non-invasive and inexpensive solution is to determine the depth information in the Z direction using optical measurements. Image blur caused by optical defocusing changes in a predictable manner. The optical system of the optical sensor has a focal plane, which is the plane of greatest sharpness. If an object point lying on the surface of the workpiece is moved towards the focal plane, the image of the object point becomes sharper. If the object point is moved away from the focal plane, the image of the object point becomes blurrier. If the object point is located in the focal plane, the image of the object point is at its sharpest. Image blur can thus be controlled by varying the distance between the workpiece and the optical system. By capturing images while the workpiece is moved through the focus, a focal image stack is created.Based on the focal image stack, depth information of the object points can be extracted using a technique called Shape from Focus (SFF). In other words, SFF is a method that allows the reconstruction of 3D information based on a focal image stack of 2D images.
[0009] Examples of applications of the SFF method are described in the publication US 5 151 609 A and in the article Nayar, SK; Nakagwa, Y.: Shape from focus. IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 16, 1994, No. 8, pp. 824-831, DOI: 10.1109 / 34.308479.
[0010] For example, US Pat. No. 5,151,609 A discloses detecting the fixed shape of an object by viewing the object along a Z-axis direction. Multiple images of the object are acquired at different focal planes with correspondingly different Z-axis coordinate values. Focus measurements are calculated with respect to each of the pixels located in each of the object images, which are characterized by the same X and Y coordinate values. The focus measurements of the pixels in the object images with the same X and Y coordinate values are compared to detect maximum focus measurements. The fixed shape of the object is then estimated based on the Z coordinate value of the focal plane of the object image with the maximum detected focus measurements.
[0011] In other words, with the SFF technique for reconstructing 3D information, a sharpness map, also called a focus map, is calculated for each image of the acquired focal image stack using a specific sharpness metric. This results in a sharpness map stack. A corresponding sharpness metric is described, for example, in the article Pertuz, S., Puig, D., Garcia, MA: Analysis of focus measure operators for shape-from-focus. Pattern Recognition, Vol. 46, 2013, No. 5, pp. 1415-1432, DOI: 10.1016 / j.patcog.2012.11.011.
[0012] A sharpness profile can be determined for each pixel of the camera sensor based on the sharpness map stack. The sharpness profile maps the sharpness value relative to the Z coordinate. The maximum of the sharpness profile corresponds to the depth value, i.e., the Z coordinate, of the corresponding pixel. The maximum of the sharpness profile can be determined using various methods. For example, the maximum can be determined using a least-squares approximation (least-squares fitting) of a Gaussian curve to the sharpness profile. A depth map can then be generated based on the evaluation of the sharpness maps of all pixels.
[0013] Fig. 1 shows an example of a depth map of a surface of a workpiece. Fig. Figure 2 shows the sharpness profile of an exemplary pixel to which a Gaussian curve can be fitted.
[0014] In order to capture an area of a workpiece's surface and generate a depth map of it that is larger than the area that can be captured by the camera sensor, it is necessary to acquire multiple focal image stacks, each of which images different sub-areas of the workpiece's surface. Together, these sub-areas cover the surface area to be captured. To achieve this, the relative arrangements of the camera sensor to the workpiece can be changed between individual acquisition processes of the focal image stacks, for example, by moving the camera sensor and / or the workpiece in space. However, this is time-consuming.
[0015] To reduce the overall measurement time of a surface area larger than the camera sensor's detection range, a focal image stack can be acquired while the measuring device or just the camera sensor is moved laterally. This avoids waiting times while the measuring device or just the camera sensor is stationary. The resulting focal image stack, however, is laterally shifted. In other words, the acquired images are shifted laterally relative to one another. Laterally shifted refers to an offset in the XY plane. This means that object points of the workpiece in the images of the focal image stack are mapped to different pixels of the camera sensor for different focus settings.
[0016] In order to generate a depth map of the workpiece area based on this focal image stack, the image stack must be registered with sub-pixel accuracy to align the corresponding pixel centers evenly, particularly in alignment. For this purpose, grayscale interpolation of the images can be performed to align them with respect to a defined reference system. Only a reduced portion of the entire captured area can be evaluated for this purpose, because sharpness values are required for all focus positions.
[0017] Fig. Figure 3 shows an example of an image stack 100. The image stack 100 comprises four images 102, 104, 106, 108. Each pixel of the images has a pixel center 110. The image stack was acquired during a lateral movement of the optical sensor. The lateral movement is represented by an arrow with the reference symbol 112. Due to the lateral movement, object points of the workpiece are imaged on different pixels of the camera sensor. Only object points that are imaged in all acquired images can be evaluated. The pixel centers are aligned using grayscale interpolation.
[0018] The current approach to evaluating an image stack captured during a lateral movement of the optical sensor presents the following problems. First, the offset image stack must be registered to an artificial grid using sub-pixel-accurate interpolation of gray values. This reduces accuracy and increases computation time. Furthermore, vertical edges cannot be reliably determined because the sharpness profiles of pixels in the immediate vicinity of the edge are distorted and cannot be described by a Gaussian curve.
[0019] Fig. 4 shows an example of a distorted sharpness profile of a pixel in the immediate vicinity of an edge, in particular at an edge, ie the transition between different workpiece heights.
[0020] Document EP 2 590 139 A1 discloses a method comprising determining a sharpest image point of an individual receiver as focus information based on the individual receiver of an imaging system. The intersection point of the surface and the object-side focal plane is determined, and the three-dimensional position of the imaging system relative to the object is evaluated as position information together with the focus information to determine the measured surface topography of the object. Document EP 2 590 139 A1 further discloses a device for the planar optical three-dimensional measurement of the surface topography of an object by evaluating focus information obtained from a surface receiver of an imaging system.
[0021] Furthermore, WO 2013 / 116299 A1 discloses a method comprising imaging a surface with at least one imaging sensor, wherein the surface and the imaging sensor are in relative translational motion. The imaging sensor includes a lens with a focal plane oriented at a non-zero angle with respect to an xy-plane of a surface coordinate system. A sequence of images of the surface is registered and stacked along a z-direction of a camera coordinate system to form a volume. For each location in the volume, a sharpness of the focus value is determined, wherein the locations lie in a plane perpendicular to the z-direction of the camera coordinate system.Using the sharpness of the focus values, a depth of maximum focus along the z-direction in the camera coordinate system is determined for each location in the volume, and based on the depths of maximum focus, a three-dimensional location of each point on the surface can be determined.
[0022] Furthermore, JP 2013 104 814 A discloses a shape measuring device comprising: an imaging device for imaging a measurement object illuminated by light from a light source; an imaging optical system for forming a conjugate surface conjugated with a light-receiving surface of the imaging device in such a manner that the conjugate surface does not become parallel to the light-receiving surface; and a shape information acquisition unit for acquiring information regarding a shape of the measurement object by acquiring a position in an image for a portion illuminated by light from the imaging result by the imaging device. The imaging optical system is provided with a lens group including lens elements.The lens elements are configured such that: cross-sectional shapes are asymmetric with respect to an axis connecting by a straight line approximate centers of an image surface and an object surface on an orthogonal surface that is orthogonal to an intersection point of a surface containing the light-receiving surface and a surface containing the conjugate surface in a region through which a light flux forming the image passes; and with respect to the part farthest from the intersection point and the part closest thereto, the dimensions of the cross-sectional shapes on the orthogonal surface decrease or increase from the farthest part to the farthest part.
[0023] Furthermore, the document DE 10 2014 209 342 A1 describes a method for determining geometric data of an object using a measuring microscope and a measuring microscope. The method comprises capturing a first optical image of the object in a first object position; capturing a second optical image of the object in a second object position; capturing position data of the object positions of the object with a reference to the respective optical image; determining a weight and a center of mass of the object as calibration data; determining image coordinates of the object by determining prominent points in the optical images; transforming the image coordinates into object coordinates taking the position data into account; and transforming the object coordinates into calibrated object coordinates taking the calibration data into account.The measuring microscope comprises at least three force measuring probes arranged at the base for determining a weight and a center of mass of the object and a computing unit for determining the calibrated object coordinates of the object from the individual images in different focus positions, the weight and the center of mass.
[0024] Against this background, there is still room for improvement, particularly with regard to the acquisition and processing of data in order to be able to determine the surface profile of a workpiece surface as quickly and accurately as possible.
[0025] It is therefore an object of the present invention to provide a method for measuring a surface of a workpiece with an optical sensor of a measuring device as well as a corresponding measuring device and computer program by means of which the acquisition and processing of the data for measuring a surface of a workpiece with an optical sensor of a measuring device is improved.
[0026] In a first aspect of the present invention, a method for measuring a surface of a workpiece using an optical sensor of a measuring device is provided. The method comprises the following steps: - capturing a plurality of images of the surface of the workpiece by means of the optical sensor, wherein each image depicts a region of the surface of the workpiece, wherein each image is assigned a defined 6-DOF (degree of freedom) pose of the optical sensor and a defined focal plane position of the optical sensor, and wherein the captured images form an image stack; - determining a sharpness value of each pixel of each image of the image stack to generate a sharpness map for each image of the image stack, the sharpness maps of the images forming a sharpness map stack; - Transforming the focus maps of the focus map stack into a defined reference system based on the respective assigned 6-DOF pose and focal plane position of the optical sensor to generate a focus cloud; and - generating a surface profile of the workpiece based on the sharpness cloud, in particular based on local sharpness maxima of the sharpness cloud, the method further comprising the following step: - Moving the optical sensor and the workpiece relative to each other during the detecting step in order to change the 6-DOF pose of the optical sensor in space relative to the workpiece, wherein in the moving step the optical sensor is moved rotationally, in particular tilted and / or rotated.
[0027] In a second aspect of the present invention, a method for measuring a surface of a workpiece using an optical sensor of a measuring device is provided. The method comprises the following steps: - capturing a plurality of images of the surface of the workpiece by means of the optical sensor, wherein each image depicts a region of the surface of the workpiece, wherein each image is assigned a defined 6-DOF (degree of freedom) pose of the optical sensor and a defined focal plane position of the optical sensor, and wherein the captured images form an image stack; - determining a sharpness value of each pixel of each image of the image stack to generate a sharpness map for each image of the image stack, the sharpness maps of the images forming a sharpness map stack; - Transforming the focus maps of the focus map stack into a defined reference system based on the respective assigned 6-DOF pose and focal plane position of the optical sensor to generate a focus cloud; and - generating a surface profile of the workpiece based on the sharpness cloud, in particular based on local sharpness maxima of the sharpness cloud, the method further comprising the following step: - Changing the focal plane position of the optical sensor during the acquisition step.
[0028] In a third aspect of the present invention, a method for measuring a surface of a workpiece using an optical sensor of a measuring device is provided. The method comprises the following steps: - capturing a plurality of images of the surface of the workpiece by means of the optical sensor, wherein each image depicts a region of the surface of the workpiece, wherein each image is assigned a defined 6-DOF (degree of freedom) pose of the optical sensor and a defined focal plane position of the optical sensor, and wherein the captured images form an image stack; - determining a sharpness value of each pixel of each image of the image stack to generate a sharpness map for each image of the image stack, the sharpness maps of the images forming a sharpness map stack; - Transforming the focus maps of the focus map stack into a defined reference system based on the respective assigned 6-DOF pose and focal plane position of the optical sensor to generate a focus cloud; and - Generating a surface profile of the workpiece based on the sharpness cloud, in particular based on local sharpness maxima of the sharpness cloud, wherein a neural network is used to generate the surface profile, which is trained to generate the surface profile based on the sharpness cloud.
[0029] In a fourth aspect of the present invention, a measuring device, in particular a coordinate measuring machine or a microscope, is provided for measuring a surface of a workpiece. The measuring device comprises an optical sensor and a control device, wherein the optical sensor is configured to capture images of a region of the surface of the workpiece, wherein the control device is configured to perform the following control steps: - capturing a plurality of images of the surface of the workpiece by means of the optical sensor, wherein each image depicts a region of the surface of the workpiece, wherein each image is assigned a defined 6-DOF pose of the optical sensor and a defined focal plane position of the optical sensor, and wherein the captured images form an image stack; - determining a sharpness value of each pixel of each image of the image stack to generate a sharpness map for each image of the image stack, the sharpness maps of the images forming a sharpness map stack; - Transforming the focus maps of the focus map stack into a defined reference system based on the respective assigned 6-DOF pose and focal plane position of the optical sensor to generate a focus cloud; and - generating a surface profile of the workpiece based on the sharpness cloud, in particular based on local sharpness maxima of the sharpness cloud, wherein the control device is further configured to carry out the following control step: - Moving the optical sensor and the workpiece relative to each other during the detecting step in order to change the 6-DOF pose of the optical sensor in space relative to the workpiece, wherein in the moving step the optical sensor is moved rotationally, in particular tilted and / or rotated.
[0030] In a fifth aspect of the present invention, a measuring device, in particular a coordinate measuring machine or a microscope, is provided for measuring a surface of a workpiece. The measuring device comprises an optical sensor and a control device, wherein the optical sensor is configured to capture images of a region of the surface of the workpiece, wherein the control device is configured to perform the following control steps: - capturing a plurality of images of the surface of the workpiece by means of the optical sensor, wherein each image depicts a region of the surface of the workpiece, wherein each image is assigned a defined 6-DOF pose of the optical sensor and a defined focal plane position of the optical sensor, and wherein the captured images form an image stack; - determining a sharpness value of each pixel of each image of the image stack to generate a sharpness map for each image of the image stack, the sharpness maps of the images forming a sharpness map stack; - Transforming the focus maps of the focus map stack into a defined reference system based on the respective assigned 6-DOF pose and focal plane position of the optical sensor to generate a focus cloud; and - generating a surface profile of the workpiece based on the sharpness cloud, in particular based on local sharpness maxima of the sharpness cloud, wherein the control device is further configured to carry out the following control step: - Changing the focal plane position of the optical sensor during the acquisition step.
[0031] In a sixth aspect of the present invention, a measuring device, in particular a coordinate measuring machine or a microscope, is provided for measuring a surface of a workpiece. The measuring device comprises an optical sensor and a control device, wherein the optical sensor is configured to capture images of a region of the surface of the workpiece, wherein the control device is configured to perform the following control steps: - capturing a plurality of images of the surface of the workpiece by means of the optical sensor, wherein each image depicts a region of the surface of the workpiece, wherein each image is assigned a defined 6-DOF pose of the optical sensor and a defined focal plane position of the optical sensor, and wherein the captured images form an image stack; - determining a sharpness value of each pixel of each image of the image stack to generate a sharpness map for each image of the image stack, the sharpness maps of the images forming a sharpness map stack; - Transforming the focus maps of the focus map stack into a defined reference system based on the respective assigned 6-DOF pose and focal plane position of the optical sensor to generate a focus cloud; and - Generating a surface profile of the workpiece based on the sharpness cloud, in particular based on local sharpness maxima of the sharpness cloud, wherein a neural network is used to generate the surface profile, which is trained to generate the surface profile based on the sharpness cloud.
[0032] In particular, the control device of the measuring device of the fourth to sixth aspects is configured to carry out the method steps of the corresponding method according to the first to third aspects or one of its embodiments. In particular, the control device is configured to control the components of the measuring device, in particular the optical sensor. For this purpose, the control device can, for example, have a control unit that can send control commands to the components of the measuring device, in particular to the optical sensor. The calculation steps for generating the surface profile of the workpiece can also be carried out by means of the control device of the measuring device. For this purpose, the control device can, for example, have a data processing unit that carries out the steps for generating the surface profile.
[0033] In a seventh aspect of the present invention, a computer program is provided which comprises instructions which, when executed by a computer, cause the computer to carry out the method according to the first to third aspects of the invention.
[0034] Advantageously, the novel method is implemented using a processing unit or a control device, which may be a general-purpose computer or a special-purpose computer, wherein an appropriate computer program is stored and executed, the computer program being designed and configured to measure the surface of the workpiece according to the aforementioned methods.
[0035] A workpiece is an object, in particular a measurement object, that is being measured. The workpiece has a surface. Images of an area of the surface can be captured using an optical sensor in a measuring device. The captured area of the workpiece's surface depends on the 6-DOF pose of the optical sensor relative to the workpiece. In general, a 6-DOF pose of an object defines the position and orientation of the object in space. Position and orientation in space together have six degrees of freedom. The 6-DOF pose of the optical sensor relative to the workpiece is therefore the position and orientation of the optical sensor relative to the workpiece. If the workpiece and the optical sensor are moved relative to each other, for example, the 6-DOF pose of the optical sensor relative to the workpiece also changes.
[0036] The measuring device can, in particular, be a coordinate measuring machine. The optical sensor can, for example, comprise an image sensor and an optical system. The image sensor can, for example, be a charge-coupled semiconductor element sensor, also known as a CCD (charge-couple device) sensor. The CCD sensor can be a monochrome sensor or a color sensor. Alternatively, the image sensor can be a semiconductor detector for light measurement, also known as a CMOS sensor. The optical system can image the area of the surface of the workpiece onto the image sensor. The optical system preferably comprises a lens that is telecentric at least on the object side. The lens can, in particular, be telecentric on both the image and object sides.
[0037] As already explained at the beginning, the optical sensor has a focal plane, which is the plane of greatest sharpness. Objects or object points that lie in the focal plane are imaged more sharply than objects or object points that do not lie in the focal plane. The focal plane is determined by the optical system of the optical sensor. The focal plane is arranged in space. The focal plane is spaced from the optical sensor. The focal plane therefore has a position in space. This position is called the focal plane position. The focal plane position can be described by the distance vector of the optical sensor to the focal plane, in particular by the distance of the optical sensor to the focal plane.
[0038] An image captured with an optical sensor consists of a plurality of pixels. Each pixel represents an object point of the corresponding area of the workpiece's surface with a defined focal plane position of the optical sensor. Current optical sensors can have resolutions of several megapixels. The number of pixels in a captured image, and accordingly the number of imaged object points, corresponds to the number of pixels in the optical sensor. The captured images can thus contain several million pixels.
[0039] A plurality of images are captured using the measuring device's optical sensor. The captured images form an image stack. Each image can have the same number of pixels. Each image is assigned a defined 6-DOF pose of the optical sensor relative to the workpiece and a defined focal plane position of the optical sensor. Each image thus depicts the respective area of the workpiece according to the assigned 6-DOF pose of the optical sensor relative to the workpiece and the assigned focal plane position of the optical sensor. The captured image is recorded in a local reference system of the optical sensor. The local reference system of the optical sensor can, for example, be represented by a Cartesian coordinate system. The optical sensor can be positioned at the origin of the Cartesian coordinate system. The Cartesian coordinate system has an X coordinate, a Y coordinate, and a Z coordinate.The focal plane extends in the X and Y directions and is spaced apart from the optical sensor in the Z direction. Each object point on the surface of the workpiece has a position in the sensor's local reference system, specifically an X position in the X direction, a Y position in the Y direction, and a Z position in the Z direction.
[0040] Depending on the distance of the imaged object point from the focal plane, the object point is imaged more or less sharply. A sharpness value is determined for each image point. The sharpness value can also be called a focus value. The sharpness value indicates how sharply the respective image point is displayed. In other words, a sharpness value describes the image sharpness at a corresponding point in the focal plane. Each sharpness value thus indicates the image sharpness at a specific point on the focal plane in the local reference system of the optical sensor at the time the respective image is captured.
[0041] To determine the sharpness value, for example, the brightness, contrast value, or gray value of a pixel can be considered. In particular, to determine the focus value, a gradient of the brightness, contrast value, or gray value relative to the surrounding pixels can be determined. The greater the gradient, the sharper the pixel and the greater the sharpness value.
[0042] Based on the determined sharpness values of each image, a sharpness map is generated for each image. The sharpness map can also be called a focus map. The sharpness map of an image contains a corresponding sharpness value for each pixel. In other words, the sharpness map assigns a corresponding sharpness value to each imaged point in the focal plane in the local reference system of the optical sensor. The sharpness maps together form a sharpness map stack. The sharpness map stack can also be called a focus map stack.
[0043] The focus maps of the focus map stack are transformed into a defined reference system. For this purpose, the respective assigned 6-DOF pose and focal plane position of the optical sensor are used. The defined reference system is a common or global coordinate system. In particular, the defined reference system is a reference system in which the workpiece has a fixed arrangement, i.e., a 6-DOF pose. In other words, the defined reference system is a workpiece-fixed reference system. The defined reference system can also be a Cartesian coordinate system. For the transformation, a translation vector and / or a rotation matrix can be determined based on the respective 6-DOF pose of the sensor relative to the workpiece, using which the respective local reference system can be converted into the defined, global reference system.Each sharpness map can be transformed into the defined global reference system using the corresponding translation vector and / or the corresponding rotation matrix.
[0044] The transformed sharpness maps together form a sharpness cloud in the defined, global reference system. The sharpness cloud is a point cloud in the defined reference system, with each point in the point cloud assigned a sharpness value. In other words, the sharpness cloud forms a three-dimensional scalar field that assigns a sharpness value to each point in the space of the defined reference system. The points of a transformed sharpness map form a section of the three-dimensional scalar field.
[0045] The surface profile of the workpiece is generated or determined based on the focus cloud. The focus cloud exhibits local sharpness maxima at the locations where an object point on the workpiece's surface is in focus. In other words, the positions of the local sharpness maxima correspond to surface points on the workpiece. Thus, the surface profile of the workpiece can be determined based on the local sharpness maxima.
[0046] Since the surface of the workpiece is continuous, the local sharpness maxima of the sharpness cloud are simply connected and form one or more surfaces of maximum sharpness. Each surface of maximum sharpness represents at least part of the surface profile of the workpiece. In other words, the local sharpness maxima span one or more 2D subspaces of the 3D space of the defined reference system, with each 2D subspace being simply connected. The determined surface profile of the workpiece thus provides 3D information about the workpiece, in particular a 3D image of the workpiece in the defined reference system.
[0047] In other words, by calculating sharpness maps of the captured images and by transforming the sharpness maps from the local reference system of the optical sensor into a defined, global reference system, a sharpness cloud can be generated by means of which the surface profile of the workpiece is determined.
[0048] The transformation requires the 6-DOF pose of the optical sensor, i.e., the position and orientation of the optical sensor relative to the workpiece. In particular, the position of the center of the optical sensor, the pixel offset, as well as the tilt and rotation of the optical sensor can be used as transformation parameters. These parameters can be determined based on the standard calibration of the optical sensor.
[0049] A registration step and a gray value adjustment are not required with the new approach because the focus information is evaluated directly at the position in space where it was captured by the optical sensor.
[0050] The resulting focus cloud can then be processed to determine the 3D information, i.e., the surface profile, of the workpiece. Various methods are already known in the state of the art for analyzing a point cloud or a three-dimensional scalar field to identify a surface within this field. For example, algorithms known from X-ray metrology can be used to evaluate the focus cloud. Each of these methods can be used to determine the surface profile of the workpiece based on the focus cloud.
[0051] The described new approach for capturing, processing, and analyzing a focus cloud for surface reconstruction of a workpiece has the following advantages. First, registration with sub-pixel accuracy of offset image stacks acquired during lateral movement is no longer required. Instead, the focus information is evaluated directly at the position in space where it was acquired by the optical sensor. Furthermore, the new approach is not based on fixed model functions. Therefore, edges can be reconstructed more reliably. Furthermore, the surface reconstruction becomes more robust and accurate because not only a focus profile in one axial direction, but rather the entire available 3D focus information is used.
[0052] In the first and fourth aspects, the optical sensor and the workpiece are moved relative to each other during the sensing step to change the 6-DOF pose of the optical sensor in space relative to the workpiece. In this way, the field of view of the optical sensor, in which the area of the workpiece surface to be detected lies, and / or the spatial arrangement of the focal plane of the optical sensor can be varied relative to the workpiece.
[0053] In the first and fourth aspects, the optical sensor is further moved in a rotational manner, in particular tilted and / or rotated, in the moving step. A rotational movement changes the alignment, i.e., orientation, of the optical sensor relative to the workpiece. The rotational movement can be a tilting movement and / or a rotating movement. The tilting movement is a rotation about the X-axis and / or Y-axis of the local reference system of the optical sensor. During the tilting movement, different areas of the surface of the workpiece are thus recorded with different focal planes. The rotating movement is a rotation about the Z-axis of the local reference system of the optical sensor. The rotational movement can be a combination of a tilting movement and a rotating movement.
[0054] In the second and fifth aspects, the focal plane position of the optical sensor is changed during the detection step. Changing the focal plane position means that the distance of the optical sensor to its focal plane is changed. For example, the distance can be increased, decreased, or varied sinusoidally. For example, the focal plane position can be varied by moving the lens of the optical system of the optical sensor and / or the CCD sensor relative to each other. By changing the focal plane position, the spatial arrangement of the focal plane of the optical sensor relative to the workpiece is varied. This allows areas of the workpiece surface to be scanned in the depth direction, i.e., in the Z direction of the local reference system of the optical sensor. For example, the focal plane position can be changed according to a predefined setting.The predefined setting can be determined, for example, by a measuring program or manually.
[0055] In the third and sixth aspects, a neural network trained to generate the surface profile based on the sharpness cloud is used to generate the surface profile. In particular, the neural network can generate the surface profile based on the segmented sharpness cloud. In particular, the neural network can be trained to determine or recognize areas of maximum sharpness in the sharpness cloud. The evaluation of a sharpness cloud using a neural network is described, for example, in the article Raina, P., Mudur, S., Popa, T.: Sharpness fields in point clouds using deep learning. Computers & Graphics, Vol. 78, 2019, pp. 37-53, DOI: 10.016 / j.cag.2018.11.003.
[0056] The task posed at the beginning is thus completely solved.
[0057] In a first embodiment, the method may further comprise the following step: - Arranging the workpiece on a workpiece holder.
[0058] In particular, the measuring device can include a workpiece holder. By arranging the workpiece on a workpiece holder, the workpiece is assigned a fixed, defined 6-DOF pose in space relative to the workpiece holder.
[0059] In a further embodiment, in the acquisition step, the images can be acquired while the optical sensor and the workpiece are moved relative to each other, wherein each image is assigned a different, defined 6-DOF pose of the optical sensor.
[0060] In a further embodiment, the optical sensor and the workpiece holder can be moved relative to each other in the moving step.
[0061] As a result, the workpiece, which is arranged on the workpiece holder, and the optical sensor are also moved relative to one another. As a result, the workpiece and the optical sensor can be moved relative to one another in a simple and defined manner. The measuring device can in particular have a drive device by means of which the optical sensor and / or the workpiece holder are moved. The drive device can be controlled by means of the control device of the measuring device. The drive device can, for example, have a piezoelectric drive, a direct drive or a spindle drive. The drive device can be designed to move the optical sensor and / or the workpiece holder in one or more spatial directions. In particular, the measuring device can have two drive devices, a first for moving the optical sensor and a second for moving the workpiece holder.
[0062] In a further embodiment, in the moving step, the optical sensor can be moved translationally, in particular laterally to the workpiece.
[0063] A translational movement changes the position of the optical sensor relative to the workpiece. The translational movement can be lateral, i.e. parallel to the focal plane, and / or vertical, i.e. perpendicular to the focal plane. The lateral movement is a movement in the X and / or Y direction of the local reference system of the optical sensor. With a lateral movement, different areas of the workpiece surface are recorded, whereby the focal plane of the optical sensor remains the same relative to the workpiece. The vertical movement is a movement in the Z direction of the local reference system of the optical sensor. With a vertical movement, the focal plane is shifted, particularly in the Z direction, whereby the detected area of the workpiece surface remains the same. The translational movement can be a combination of lateral and vertical movement.
[0064] In a further embodiment, in the step of moving, the optical sensor can be moved along a predefined path.
[0065] For example, the predefined path can be such that the optical sensor uses the acquired images to detect the entire surface or at least those parts of the surface not obscured by the workpiece holder. The predefined path can, for example, be a linear, closed, spiral, or wave-shaped path that runs around or along the workpiece. The predefined path can be adjusted according to the size and arrangement of the workpiece on the workpiece holder. The predefined path can, for example, be defined by a measuring program or manually.
[0066] In a further embodiment, in the step of capturing, the images can be captured while the focal plane position of the optical sensor is changed, wherein each image is assigned a different, defined focal plane position of the optical sensor.
[0067] In a further embodiment, the method may further comprise the following step: - Determining the 6-DOF pose and / or the focal plane position of the optical sensor while capturing an image with the optical sensor, wherein the determined 6-DOF pose and / or the determined focal plane position is assigned to the captured image.
[0068] For example, the drive unit of the measuring device can be precalibrated. If the optical sensor and the workpiece holder are moved relative to each other according to a predefined path, the calibration allows the 6-DOF pose of the optical sensor relative to the workpiece holder and thus also relative to the workpiece. Accordingly, the optical system of the optical sensor can also be precalibrated. If the focal plane position is changed according to the predefined setting, the focal plane position of the optical sensor can be determined by calibrating the optical system. Alternatively, the 6-DOF pose sensor and / or the focal plane position of the optical sensor can also be measured at the time an image is captured.
[0069] In a further embodiment, the sharpness value of each pixel can be determined based on a sharpness of the pixel.
[0070] As already explained at the beginning, the sharpness value of a pixel can be determined, for example, based on a gradient or the local gray value variance to the surrounding pixels of the corresponding image.
[0071] In a further embodiment, a segmentation of the sharpness cloud can be carried out in the generating step, in particular wherein the sharpness cloud is filtered on the basis of a sharpness threshold method.
[0072] Segmentation identifies areas of high sharpness in the sharpness cloud. Surface points of the workpiece lie only in these areas. A sharpness thresholding method can be used to segment the sharpness cloud. By filtering the sharpness cloud according to sharpness thresholds, the surface profile of the workpiece can be estimated. Using the sharpness thresholding method, at least a rough 3D view of the workpiece is obtained. Furthermore, the amount of image data is reduced because out-of-focus areas are discarded.
[0073] In a further embodiment, local sharpness maxima of the sharpness cloud can be determined in the generating step, wherein each local sharpness maximum represents a surface point of the workpiece.
[0074] As already described at the beginning, the locations of the local sharpness maxima correspond to surface points of the workpiece. By determining the local sharpness maxima, the surface profile of the workpiece can be generated. The local sharpness maxima can be determined, in particular, based on the segmented sharpness cloud.
[0075] In a further embodiment, one or more areas of maximum sharpness can be determined in the generating step, wherein the areas of maximum sharpness represent the surface of the workpiece.
[0076] As already described above, local sharpness maxima of the sharpness cloud form simply connected areas of maximum sharpness. These areas of maximum sharpness correspond to areas of the workpiece's surface. By determining these areas in the sharpness cloud, the surface profile can be easily generated.
[0077] In a further embodiment, the moving least squares method can be applied to the sharpness cloud to generate the surface profile, in particular using sharpness values as weighting factors.
[0078] The moving least squares method is also called the "moving least squares method." It is a method for reconstructing continuous functions from a set of disorganized point samples, specifically by computing a weighted least squares measure centered on a region around the point to be reconstructed. In other words, the moving least squares method can be used to generate a 3D surface from a point cloud by either downsampling or upsampling. Preferably, sharpness values are used as weighting factors. The moving least squares method is particularly applied to the segmented sharpness cloud. The moving least squares method can thus be used to determine the areas of maximum sharpness in the sharpness cloud.The use of the moving least squares method to generate surfaces is described, for example, in the article Lancaster, P. Salkauskas, K.: Surfaces generated by moving least squares methods. Mathematics of Computation, Vol. 37, 1981, No. 155, pp. 141-158, DOI: 10.1090 / S0025-5718-1981-0616367-1.
[0079] In a further embodiment, one or more defined geometries can be adapted to the sharpness cloud to generate the surface profile, in particular by means of a weighted least squares method.
[0080] The defined geometries are specifically adapted to the segmented sharpness cloud. Using these geometries, the areas of maximum sharpness in the sharpness cloud can be determined and the surface profile of the workpiece can be reconstructed. These are two-dimensional surfaces with a defined shape. The defined geometries are preferably regular or standardized geometries such as spheres, spherical surfaces, planes, cones, or conical surfaces. In particular, the defined geometries can also be more complex geometries. In particular, the defined geometries can also be images of a CAD model of the workpiece.
[0081] In a further embodiment, the method may further comprise the following step: - Outputting the surface profile using an output device.
[0082] The measuring device preferably has the output device. The output device can, for example, have a display, wherein the depth map can be shown on the display. Furthermore, the output device can be designed to output the depth map to an electronic storage device, to another device, or to an external display. The electronic storage device can, for example, be a storage medium, in particular a hard disk, a flash memory, or a cloud. The other device can, for example, use the depth map to perform further processes. The external display can, for example, be designed to show the depth map.
[0083] In a further embodiment, the measuring device can further comprise a workpiece holder for the workpiece.
[0084] The workpiece holder can have a support surface or a holder on or in which the workpiece can be positioned. By positioning the workpiece on a workpiece holder, the workpiece is assigned a fixed, defined 6-DOF pose in space relative to the workpiece holder.
[0085] In a further embodiment, the measuring device can further comprise a drive device for moving the optical sensor and / or the workpiece holder.
[0086] The drive device is designed to move the optical sensor and / or the workpiece holder in space, in particular relative to one another. As already explained above, the drive device can be controlled by the control device of the measuring device. The drive device can, for example, have a piezoelectric drive, a direct drive, or a spindle drive. The drive device can be designed to move the optical sensor and / or the workpiece holder in one or more spatial directions. In particular, the measuring device can have two drive devices, a first for moving the optical sensor and a second for moving the workpiece holder.
[0087] In a further embodiment, the measuring device may further comprise an output device for outputting the generated surface profile.
[0088] The output device can, for example, have a display, wherein the depth map can be shown on the display. Furthermore, the output device can be configured to output the surface profile to an electronic storage device, to another device, or to an external display. The electronic storage device can, for example, be a storage medium, in particular a hard disk, a flash memory, or a cloud. The other device can, for example, use the surface profile to perform further processes. The external display can, for example, be configured to display the surface profile.
[0089] It is understood that the features mentioned above and those to be explained below can be used not only in the combination specified in each case, but also in other combinations or on their own, without departing from the scope of the present invention.
[0090] Embodiments of the invention are illustrated in the drawings and explained in more detail in the following description. They show: Fig. 1 an exemplary representation of a depth map from the state of the art; Fig. 2 an exemplary representation of a sharpness profile from the prior art; Fig. 3 an exemplary representation of a staggered image stack from the prior art; Fig. 4 an exemplary representation of a distorted sharpness profile from the prior art; Fig. 5 a schematic view of a measuring device; Fig. 6 a schematic view showing a translational movement of an optical sensor of the measuring device from Fig. 5; Fig. 7 is a schematic view illustrating a rotational movement of the optical sensor of the measuring device from Fig. 5; Fig. 8 is a schematic view showing different focal plane positions of the optical sensor of the measuring device from Fig. 5; Fig. 9 is a schematic view of a method for measuring a surface of a workpiece; Fig. 10 an exemplary side view of a sharpness cloud; and Fig. 11 an exemplary view of a segmented sharpness cloud.
[0091] Fig. Figure 5 shows a measuring device 10. The measuring device can be a coordinate measuring machine or a microscope. The measuring device 10 is used to measure a workpiece 12. For this purpose, the measuring device 10 has an optical sensor 14. In addition to the optical sensor 14, further sensors can of course be provided, for example, tactile sensors, which, however, are not shown in the present schematic view.
[0092] The workpiece 12 to be measured is arranged on a workpiece holder 16. The workpiece holder 16 can be a measuring table, a work table, or an object table.
[0093] The optical sensor 14 can include an optical system 30 and an image sensor. The optical system 30 images a region of the surface of the workpiece 12 onto the image sensor. The optical sensor 14 can use the image sensor to capture an image of the region of the surface of the workpiece 12. Furthermore, the measuring device 10 can include an illumination device 32. The illumination device is designed to illuminate at least the region of the surface of the workpiece 12.
[0094] The optical sensor 14 detects the area of the surface of the workpiece 12 in a local reference system 38. The local reference system 38 is a Cartesian coordinate system. The local reference system 38 is a sensor-fixed reference system. The optical sensor 14 has a fixed 6-DOF pose in the coordinate system 38. The image of the detected area of the surface of the workpiece 12 extends in the X and Y directions of the local reference system 38. Object points of the workpiece 12 that lie in the detected area of the surface of the workpiece 12 are spaced from the optical sensor in the Z direction of the local reference system 38. The optical sensor 14 further has a focal plane. The focal plane extends in the X and Y directions of the local reference system 38 and is spaced from the optical sensor in the Z direction of the local reference system 38. The arrangement of the focal plane in the local reference system 38 can be called focal plane position.The focal plane position, in particular the distance of the focal plane from the optical sensor 14, is determined by the arrangement of the optical system 30 and the image sensor. The focal plane position is preferably variable. For example, the focal plane position can be changed by moving a lens of the optical system 30 and / or the image sensor in the Z direction of the local reference system 38.
[0095] The workpiece 12, the optical sensor 14, and the workpiece holder 16 are arranged in space relative to a defined reference system 18. The defined reference system 18 is a Cartesian coordinate system. In the defined reference system 18, the optical sensor 14 has a 6-DOF pose 20, the workpiece 12 has a 6-DOF pose 22, and the workpiece holder 16 has a 6-DOF pose 34. In other words, the optical sensor 14, the workpiece 12, and the workpiece holder 16 each have a defined position and orientation in the defined reference system 18. The coordinate system 18 is a workpiece-fixed reference system. The workpiece holder 16 as well as the workpiece 12, when arranged on the workpiece holder 16, therefore have a fixed 6-DOF pose in the coordinate system 18. The 6-DOF pose 20 of the optical sensor 14 in the coordinate system 18 can be changed.The 6-DOF pose 20 of the optical sensor 14 in the coordinate system 18 corresponds to a 6-DOF pose of the optical sensor 14 relative to the workpiece 12.
[0096] In the view shown, the workpiece holder 16 is aligned in an XY plane of the coordinate system 18. A Z direction of the coordinate system 18 extends perpendicular to the workpiece holder 16.
[0097] The optical sensor 14 and / or the workpiece holder 16 can be designed to be movable in space. When the optical sensor 14 and / or the workpiece holder 16 are moved in space, the 6-DOF pose of the optical sensor 14 changes relative to the workpiece 12. In the workpiece-fixed coordinate system 18, the 6-DOF pose 20 of the optical sensor 14 thus changes. In principle, it can be provided for this purpose that the workpiece holder 16 and / or the optical sensor 14 can be moved translationally and / or rotationally, for example by means of a suitable mechanism 24.
[0098] The measuring device 10 can further comprise a drive device 28. The drive device 28 is designed to move the workpiece holder 16 and / or the optical sensor 14 in space. Preferably, the drive device 28 is designed to move the optical sensor 14 in space. For this purpose, the drive device 28 can, for example, comprise drive means that move the mechanism 24 in order to thereby move the optical sensor 14. Alternatively, the drive device 28 can also be designed to move the workpiece holder 16 in space. Of course, the drive device 28 can also be designed to move both the optical sensor 14 and the workpiece holder 16 in the depth direction 20. For this purpose, in particular, two drive devices can be provided.
[0099] The measuring device 10 further comprises a control device 26. The control device 26 is configured to control the individual components of the measuring device and to process data. For this purpose, the control device 26 can, for example, have various subunits, each of which controls a component and / or processes data. For example, the control device 26 can have a control unit that controls the drive device 28, the optical sensor 14, and / or the illumination device 32. Furthermore, the control device 26 can have a data processing unit that is configured to evaluate images acquired by the optical sensor. The data processing unit can, for example, generate a surface profile of the workpiece 12 based on a plurality of acquired images that form an image stack.
[0100] The control device 26 may be connected to or include a non-volatile data memory in which a computer program is stored. In some embodiments, the control device 26 is a general-purpose computer, such as a commercially available personal computer running Windows®, Linux, or MacOS, and the computer program from the memory includes program code designed and configured to implement embodiments of the novel method in combination with the optical sensor 14 and the drive device 28. In an alternative embodiment, the control device 26 is a logic circuit, such as a field-programmable gate array (FPGA), an application-specific integrated circuit (ASIC), a microcontroller, or any other suitable programmable electrical circuit.Therein, the embodiments of the novel method, in particular control and determination steps, can be implemented with the logic circuit, so that the logic circuit is designed and configured to implement embodiments of the novel method in combination with the optical sensor 14 and the drive device 28. Any suitable programming language or hardware description language can be used to implement embodiments of the novel method in the logic circuit, such as C, VHDL, Cuda, OpenCL, and the like.
[0101] Furthermore, the measuring device 10 can have an output device 36. The output device 36 is configured to output the generated surface profile of the workpiece 12. The output device 36 can, for example, have a display on which the surface profile of the workpiece 12 can be shown. Alternatively or additionally, the output device 36 can be configured to output the surface profile of the workpiece 12 to an electronic storage device, to another device, or to an external display.
[0102] Furthermore, the measuring device 10 can also have an input device with which a user can make inputs. For example, a movement path of the optical sensor 14 and / or the workpiece holder 16 can be entered using the input device, or the optical sensor 14 and / or the workpiece holder 16 can be moved manually. Furthermore, the focal plane position of the optical sensor 14 can also be specified or changed using the input device.
[0103] Alternatively or additionally, it can also be provided that the control device 26 operates according to a measuring program. The measuring program can, for example, comprise control commands that regulate the movement of the optical sensor and / or the workpiece holder, the setting of the focal plane position, and the acquisition of the images. In particular, the measuring program can specify a measuring sequence for measuring the workpiece. For this purpose, the measuring program can, for example, specify a movement path along which the optical sensor 14 and / or the workpiece holder 16 are to be moved. Furthermore, the measuring program can specify how the focal plane position is to be changed. Furthermore, the measuring program can define the times at which images are to be acquired by means of the optical sensor 14. The control device 26 can control the optical sensor 14 and the drive device 28 according to the control commands.
[0104] The measurement program can, for example, be stored in the data memory to which the control device 26 is connected or which the control device 26 has. The measurement program can also run on an external device, for example, a computer, with corresponding control commands of the measurement program being sent to the control device 26.
[0105] To measure the workpiece 12, a plurality of images are acquired using the optical sensor, wherein the images form an image stack. At the time an image is acquired, the optical sensor 14 has a corresponding 6-DOF pose relative to the workpiece 12 and a corresponding focal plane position. Therefore, each acquired image is assigned a defined 6-DOF pose of the optical sensor 14 relative to the workpiece 12 and a defined focal plane position of the optical sensor 14. During the acquisition of the plurality of images, the 6-DOF pose of the optical sensor 14 relative to the workpiece 12 and the focal plane position of the optical sensor 14 can be changed, so that different 6-DOF poses and / or different focal plane positions are assigned to the images. For example, during the acquisition of the images, the optical sensor can be moved laterally to the workpiece and the focal plane position can be varied.The image stack can then be evaluated by the control device 26 to generate the surface profile of the surface of the workpiece 12.
[0106] The Fig. 6 and Fig. 7 shows exemplary changes in the 6-DOF pose of the optical sensor 14 relative to the workpiece 12. In particular, the 6-DOF pose of the optical sensor 14 relative to the workpiece 12 can be changed during image acquisition. The 6-DOF pose can be changed stepwise or continuously.
[0107] In Fig. 6, the optical sensor 14 is moved translationally. The translational movement is represented by an arrow with the reference symbol 40. The optical sensor 14 is moved from a 6-DOF pose 20 to a 6-DOF pose 20'. The local reference system 38 is also shifted translationally with respect to the reference system 18. The shifted arrangement of the reference system 38 is represented by 38'. In principle, the direction of movement of the movement 40 in space can be arbitrary. The direction of movement in which the optical sensor in Fig. 6 is moved laterally to the workpiece 12. Alternatively, the direction of movement can also be perpendicular or transverse to the workpiece 12. Transverse means that the direction of movement has both a lateral and a vertical component.
[0108] Alternatively, the workpiece holder 16 can also be moved translationally to change the 6-DOF pose of the optical sensor 14 relative to the workpiece 12.
[0109] In Fig. 7, the optical sensor 14 is moved in a rotational manner. The rotational movement is represented by an arrow with the reference symbol 42. The optical sensor 14 is pivoted from a 6-DOF pose 20 to a 6-DOF pose 20'. The local reference system 38 is also rotated with respect to the reference system 18. The rotated arrangement of the reference system 38 is represented by 38'. In principle, the direction of rotation of the rotational movement 42 can be arbitrary in space. In Fig. 6, the optical sensor 14 is pivoted relative to the workpiece 12 in order to detect different areas of the workpiece. Preferably, the direction of rotation is a rotation around the origin of the local reference system 38. In Fig. 6, the direction in which the optical sensor is rotated is a rotation around the X-axis of the local reference system 38. Specifically, the optical sensor is rotated around the X-axis of the local reference system. Alternatively, the rotation can also be around the Y-axis, the Z-axis, or in any other direction around the origin of the local reference system 38.
[0110] Alternatively, the workpiece holder 16 can also be moved rotationally to change the 6-DOF pose of the optical sensor 14 relative to the workpiece 12.
[0111] Fig. Figure 8 shows an example of a change in the focal plane position of the optical sensor 14. Basically, the optical sensor has a focal plane 44, which is spaced at a distance 46 from the optical sensor. In Fig. Figure 7 shows two different focal plane positions 44', 44' with different distances 46', 46". A change in the focal plane position results in the focal plane being shifted in direction 48. Direction 48 corresponds to the Z direction of the local reference system 38.
[0112] In particular, the focal plane position, i.e., the distance 46 from the focal plane 44, can be changed, for example, increased or decreased, during image acquisition. The change in the focal plane position can occur stepwise or continuously.
[0113] Fig. 9 shows a method 50 for measuring a surface of the workpiece 12 with the optical sensor 14 of the measuring device 10. Optional steps of the method are shown in Fig. 9 is shown with dashed lines. The method can be carried out in particular by means of the control device 26. The workpiece 12 can be arranged on the workpiece holder 16 for measurement. The optical sensor 14 can capture a region of the surface of the workpiece 12 with a defined focal plane position from a defined 6-DOF pose relative to the workpiece 12.
[0114] In a first, optional step 52 of the method 50, the workpiece 12 is arranged on the workpiece holder 16.
[0115] In a further step 54 of the method 50, a plurality of images of the surface of the workpiece 12 are acquired by means of the optical sensor 14, wherein each image depicts a region of the surface of the workpiece 12, wherein each image is assigned a defined 6-DOF pose of the optical sensor 14 relative to the workpiece 12 and a defined focal plane position of the optical sensor 14, and wherein the acquired images form an image stack.
[0116] In a further, optional step 56 of the method 50, the optical sensor 14 and the workpiece 12 are moved relative to one another during the acquisition step 54 in order to change the 6-DOF pose of the optical sensor 14 in space relative to the workpiece 12. In particular, in the acquisition step 54, the images are acquired while the optical sensor 14 and the workpiece 12 are moved relative to one another, with each image being assigned a different, defined 6-DOF pose of the optical sensor 14 relative to the workpiece 12.
[0117] In the moving step 56, the optical sensor 14 and the workpiece holder 16 can be moved relative to one another. For example, the optical sensor 14 and / or the workpiece holder 16 can be moved by means of the drive device 28.
[0118] In particular, the optical sensor 14 can be moved translationally and / or rotationally. For the translational movement 40, the optical sensor 14 can be moved laterally or perpendicularly to the workpiece. For the rotational movement 42, the optical sensor 14 can be tilted and / or rotated. Alternatively or additionally, the workpiece holder 16 can also be moved translationally and / or rotationally.
[0119] In particular, the optical sensor 14 can be moved along a predefined path.
[0120] In a further, optional step 58 of the method 50, the focal plane position of the optical sensor 14 is changed during the detection step 54. In doing so, the distance 46 of the optical sensor 14 to its focal plane 44 is changed.
[0121] In particular, in the capturing step 54, the images are captured while changing the focal plane position of the optical sensor 14, wherein each image is assigned a different, defined focal plane position of the optical sensor 14.
[0122] In a further optional step 60 of the method 50, the 6-DOF pose and / or the focal plane position of the optical sensor 14 is determined while an image is being acquired with the optical sensor 14, wherein the determined 6-DOF pose and / or the determined focal plane position is assigned to the acquired image.
[0123] In a further step 62 of method 50, a sharpness value of each pixel of each image in the image stack is determined to generate a sharpness map for each image in the image stack, wherein the sharpness maps of the images form a sharpness map stack. In particular, the sharpness value of each pixel is determined based on the sharpness of the pixel.
[0124] In a further step 64 of the method 50, the sharpness maps of the sharpness map stack are transformed into a defined reference system 18 based on the respective assigned 6-DOF pose and focal plane position of the optical sensor 14 in order to generate a sharpness cloud.
[0125] In a further step 66 of the method 50, a surface profile of the workpiece is generated on the basis of the sharpness cloud, in particular on the basis of local sharpness maxima of the sharpness cloud.
[0126] In the generating step 66, a segmentation of the sharpness cloud can be performed, in particular wherein the sharpness cloud is filtered on the basis of a sharpness threshold method.
[0127] In the generating step 66, local sharpness maxima of the sharpness cloud, in particular one or more areas of maximum sharpness, can be determined, wherein each local sharpness maximum maps a surface point of the workpiece, in particular wherein the areas of maximum sharpness map the surface of the workpiece. For example, the sharpness threshold method can be used to determine the local sharpness maxima. Alternatively, the local sharpness maxima, in particular the areas of maximum sharpness, can be determined based on the segmented sharpness cloud.
[0128] In the generating step 66, the moving least squares method may be applied to the segmented sharpness cloud to generate the surface profile, in particular using sharpness values as weighting factors.
[0129] In the generation step 66, geometries defined for generating the surface profile can be adapted to the sharpness cloud, in particular by means of a weighted least squares method.
[0130] In the generating step 66, a neural network trained to generate the surface profile based on the sharpness cloud can also be used to generate the surface profile.
[0131] In a further, optional step 68 of the method 50, the surface profile is output by means of the output device 36.
[0132] Fig. 10 shows an exemplary side view of a focus cloud, wherein the focus cloud is based on images acquired from different focal plane positions while the optical sensor 14 was moved laterally to the workpiece 12. The side view thus shows individual sections in the Z direction of the reference system 18, with each section being assigned to an image.
[0133] Fig. Figure 11 shows an example view of a segmented sharpness cloud, where the sharpness cloud was filtered using the sharpness threshold method. The segmented sharpness cloud provides a rough estimate of the surface profile of the workpiece 12 to be measured.
Claims
[1] Method (50) for measuring a surface of a workpiece (12) with an optical sensor (14) of a measuring device (10), comprising the following steps: - capturing (54) a plurality of images of the surface of the workpiece (12) by means of the optical sensor (14), wherein each image depicts a region of the surface of the workpiece (12), wherein each image is assigned a defined 6-DOF pose of the optical sensor (14) relative to the workpiece (12) and a defined focal plane position of the optical sensor (14), and wherein the captured images form an image stack; - determining (62) a sharpness value of each pixel of each image of the image stack to generate a sharpness map for each image of the image stack, the sharpness maps of the images forming a sharpness map stack; - transforming (64) the sharpness maps of the sharpness map stack into a defined reference system based on the respective associated 6-DOF pose and focal plane position of the optical sensor (14) to generate a sharpness cloud; and - generating (66) a surface profile of the workpiece (12) based on the sharpness cloud, in particular based on local sharpness maxima of the sharpness cloud, wherein the method (50) further comprises the following step: - moving (56) the optical sensor (14) and the workpiece (12) relative to each other during the detecting step (54) in order to change the 6-DOF pose of the optical sensor (14) in space relative to the workpiece (12), wherein in the moving step (56) the optical sensor (14) is moved rotationally, in particular tilted and / or rotated. [2] The method (50) of claim 1, wherein in the step of capturing (54) the images are captured while the optical sensor (14) and the workpiece (12) are moved relative to each other, each image being assigned a different, defined 6-DOF pose of the optical sensor (14). [3] Method (50) according to claim 1 or 2, wherein in the step of moving (56) the optical sensor (14) and the workpiece holder (16) are moved relative to each other, in particular wherein the optical sensor (14) and / or the workpiece holder (16) are moved by means of a drive device (28) of the measuring device (10). [4] Method (50) according to one of claims 1 to 3, wherein in the step of moving (56) the optical sensor (14) is moved translationally, in particular laterally to the workpiece (12). [5] Method (50) according to one of claims 1 to 4, wherein in the step of moving (56) the optical sensor (14) is moved along a predefined path. [6] Method (50) for measuring a surface of a workpiece (12) with an optical sensor (14) of a measuring device (10), comprising the following steps: - capturing (54) a plurality of images of the surface of the workpiece (12) by means of the optical sensor (14), wherein each image depicts a respective region of the surface of the workpiece (12), wherein each image is assigned a defined 6-DOF pose of the optical sensor (14) relative to the workpiece (12) and a defined focal plane position of the optical sensor (14), and wherein the captured images form an image stack; - determining (62) a sharpness value of each pixel of each image of the image stack to generate a sharpness map for each image of the image stack, the sharpness maps of the images forming a sharpness map stack; - transforming (64) the sharpness maps of the sharpness map stack into a defined reference system based on the respective associated 6-DOF pose and focal plane position of the optical sensor (14) to generate a sharpness cloud; and - generating (66) a surface profile of the workpiece (12) based on the sharpness cloud, in particular based on local sharpness maxima of the sharpness cloud, wherein the method (50) further comprises the following step: - Changing (58) the focal plane position of the optical sensor (14) during the detecting step (54). [7] Method (50) for measuring a surface of a workpiece (12) with an optical sensor (14) of a measuring device (10), comprising the following steps: - capturing (54) a plurality of images of the surface of the workpiece (12) by means of the optical sensor (14), wherein each image depicts a respective region of the surface of the workpiece (12), wherein each image is assigned a defined 6-DOF pose of the optical sensor (14) relative to the workpiece (12) and a defined focal plane position of the optical sensor (14), and wherein the captured images form an image stack; - determining (62) a sharpness value of each pixel of each image of the image stack to generate a sharpness map for each image of the image stack, the sharpness maps of the images forming a sharpness map stack; - transforming (64) the sharpness maps of the sharpness map stack into a defined reference system based on the respective associated 6-DOF pose and focal plane position of the optical sensor (14) to generate a sharpness cloud; and - generating (66) a surface profile of the workpiece (12) on the basis of the sharpness cloud, in particular on the basis of local sharpness maxima of the sharpness cloud, wherein a neural network is used to generate the surface profile, which is trained to generate the surface profile on the basis of the sharpness cloud. [8] The method (50) of claim 1, wherein the method (50) further comprises the step of: - Arranging (52) the workpiece (12) on a workpiece holder (16). [9] Method (50) according to one of claims 1 to 8, wherein in the step of capturing (54) the images are captured while the focal plane position of the optical sensor (14) is changed, wherein each image is assigned a different, defined focal plane position of the optical sensor (14). [10] The method (50) according to any one of claims 1 to 9, wherein the method (50) further comprises the following step: - determining (60) the 6-DOF pose and / or the focal plane position of the optical sensor (14) while an image is being captured with the optical sensor (14), wherein the determined 6-DOF pose and / or the determined focal plane position is assigned to the captured image. [11] The method (50) of any one of claims 1 to 10, wherein the sharpness value of each pixel is determined based on a sharpness of the pixel. [12] Method (50) according to one of claims 1 to 11, wherein in the step of generating (66) a segmentation of the sharpness cloud is carried out, in particular wherein the sharpness cloud is filtered on the basis of a sharpness threshold method. [13] Method (50) according to one of claims 1 to 12, wherein in the step of generating (66) local sharpness maxima of the sharpness cloud, in particular one or more areas of maximum sharpness, are determined, wherein each local sharpness maximum maps a surface point of the workpiece (12), in particular wherein the areas of maximum sharpness map the surface of the workpiece (12). [14] The method (50) of any one of claims 1 to 13, further comprising the step of: - Outputting (68) the surface profile by means of an output device (36). [15] Measuring device (10), in particular a coordinate measuring device or a microscope, for measuring a surface of a workpiece (12), wherein the measuring device (10) has an optical sensor (14) and a control device (26), wherein the optical sensor (14) is designed to capture images of a region of the surface of the workpiece (12), wherein the control device (26) is designed to carry out the following control steps: - capturing a plurality of images of the surface of the workpiece (12) by means of the optical sensor (14), wherein each image depicts a region of the surface of the workpiece (12), wherein each image is assigned a defined 6-DOF pose of the optical sensor (14) and a defined focal plane position of the optical sensor (14), and wherein the captured images form an image stack; - determining a sharpness value of each pixel of each image of the image stack to generate a sharpness map for each image of the image stack, the sharpness maps of the images forming a sharpness map stack; - transforming the sharpness maps of the sharpness map stack into a defined reference system based on the respective associated 6-DOF pose and focal plane position of the optical sensor (14) to generate a sharpness cloud; and - generating a surface profile of the workpiece (12) on the basis of the sharpness cloud, in particular on the basis of local sharpness maxima of the sharpness cloud, wherein the control device (26) is further configured to carry out the following control step: - moving (56) the optical sensor (14) and the workpiece (12) relative to each other during the detecting step (54) in order to change the 6-DOF pose of the optical sensor (14) in space relative to the workpiece (12), wherein in the moving step (56) the optical sensor (14) is moved rotationally, in particular tilted and / or rotated. [16] Measuring device (10), in particular a coordinate measuring device or a microscope, for measuring a surface of a workpiece (12), wherein the measuring device (10) has an optical sensor (14) and a control device (26), wherein the optical sensor (14) is designed to capture images of a region of the surface of the workpiece (12), wherein the control device (26) is designed to carry out the following control steps: - capturing a plurality of images of the surface of the workpiece (12) by means of the optical sensor (14), wherein each image depicts a region of the surface of the workpiece (12), wherein each image is assigned a defined 6-DOF pose of the optical sensor (14) and a defined focal plane position of the optical sensor (14), and wherein the captured images form an image stack; - determining a sharpness value of each pixel of each image of the image stack to generate a sharpness map for each image of the image stack, the sharpness maps of the images forming a sharpness map stack; - transforming the sharpness maps of the sharpness map stack into a defined reference system based on the respective associated 6-DOF pose and focal plane position of the optical sensor (14) to generate a sharpness cloud; and - generating a surface profile of the workpiece (12) on the basis of the sharpness cloud, in particular on the basis of local sharpness maxima of the sharpness cloud, wherein the control device (26) is further configured to carry out the following control step: - Changing (58) the focal plane position of the optical sensor (14) during the detecting step (54). [17] Measuring device (10), in particular a coordinate measuring device or a microscope, for measuring a surface of a workpiece (12), wherein the measuring device (10) has an optical sensor (14) and a control device (26), wherein the optical sensor (14) is designed to capture images of a region of the surface of the workpiece (12), wherein the control device (26) is designed to carry out the following control steps: - capturing a plurality of images of the surface of the workpiece (12) by means of the optical sensor (14), wherein each image depicts a region of the surface of the workpiece (12), wherein each image is assigned a defined 6-DOF pose of the optical sensor (14) and a defined focal plane position of the optical sensor (14), and wherein the captured images form an image stack; - determining a sharpness value of each pixel of each image of the image stack to generate a sharpness map for each image of the image stack, the sharpness maps of the images forming a sharpness map stack; - transforming the sharpness maps of the sharpness map stack into a defined reference system based on the respective associated 6-DOF pose and focal plane position of the optical sensor (14) to generate a sharpness cloud; and - generating a surface profile of the workpiece (12) on the basis of the sharpness cloud, in particular on the basis of local sharpness maxima of the sharpness cloud, wherein a neural network is used to generate the surface profile, which is trained to generate the surface profile on the basis of the sharpness cloud. [18] Measuring device (10) according to one of claims 15 to 17, wherein the measuring device (10) further comprises a workpiece holder (16) for the workpiece (12). [19] Measuring device (10) according to one of claims 15 to 18, wherein the measuring device (10) further comprises a drive device (28) for moving the optical sensor (14) and / or the workpiece holder (16). [20] Measuring device (10) according to one of claims 15 to 19, wherein the measuring device (10) further comprises an output device (36) for outputting the generated surface profile. [21] A computer program comprising instructions which, when the computer program is executed by a computer, cause the computer to carry out the method according to any one of claims 1 to 14.
Citation Information
Patent Citations
Methods for determining the geometric data of an object using a measuring microscope and measuring microscope
DE102014209342A1
Method and apparatus for extensive optical three-dimensional measurement of surface topographies
EP2590139A1
Shape measurement apparatus, structure manufacturing system and structure manufacturing method
JP2013104814A
Method of detecting solid shape of object with autofocusing and image detection at each focus level
US5151609A
Method and apparatus for measuring the three dimensional structure of a surface
WO2013116299A1
Cited By
Measurement techniques for correcting images with extended depth of field
US12664623B2
Measurement Techniques for Correcting Images with Extended Depth of Field
US20240029216A1