Method for determining three-dimensional coordinates of object to be measured

By using a projection pattern with regular grayscale arrangement in the measurement probe, the accuracy problem caused by movement and color effects of the non-contact measurement probe is solved, and accurate measurement of the three-dimensional coordinates of the object to be measured is achieved.

CN118670255APending Publication Date: 2024-09-20PMT TECH (SUZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410677078.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-29
Publication Date
2024-09-20

AI Technical Summary

Technical Problem

In the fields of electronics, optics, industrial production and medical equipment, non-contact measurement probes move relative to the object to be measured due to hand shaking and other reasons, resulting in a decrease in measurement accuracy. Moreover, the color projection pattern is affected by the color of the object to be measured, making it difficult to measure accurately.

Method used

A measurement probe composed of a projector and a camera device is used, and the projection pattern is configured to include first and second grayscale elements of two grayscales, and each grayscale element is arranged in a preset pattern to form a unique coding segment. According to the gray-scale arrangement rules, the reflection image is used for gray-scale recognition to determine the three-dimensional coordinates of the object to be measured, and to avoid the influence of color and movement on the measurement accuracy.

Benefits of technology

It achieves improved measurement accuracy under the condition of the color of the object to be measured and the movement of the measurement probe, avoids the problem of inconsistent number of image elements due to changes in depth of field, and ensures the accurate correspondence between the reflected image and the projection pattern.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118670255A
    Figure CN118670255A
Patent Text Reader

Abstract

The invention discloses a method for determining three-dimensional coordinates of an object to be measured, an articulated arm three-coordinate measuring machine, a control device, a computer readable storage medium and a computer program product, and the method comprises the steps: obtaining a reflection image, the reflected image is obtained by receiving reflected light of a projection pattern which is reflected from the object to be measured and projected by the projector through the camera device; wherein the projection pattern is configured to comprise a first gray level element and a second gray level element which belong to two gray levels respectively, and the gray level elements included in the projection pattern are arranged according to a preset rule, so that the gray level arrangement rule in a coding segment formed by any continuous preset number of gray level elements is unique; performing gray identification on the reflection image to determine a decoding sequence, and determining a corresponding relation between the reflection image and the projection pattern based on a sub-sequence of the decoding sequence and the coding segment; and determining the three-dimensional coordinates of the to-be-measured object based on the corresponding relation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of measurement technology, and in particular to a method for determining three-dimensional coordinates of an object to be measured, an articulated arm three-dimensional coordinate measuring machine, a control device, a computer-readable storage medium, and a computer program product. Background Art

[0002] At present, in the fields of electronics, optics, industrial production, or medical equipment, when non-contact measuring probes are used for measurement, in order to improve the measurement efficiency, a measuring probe composed of a projector and a camera device is usually used to measure the object to be measured. During the measurement process, if the measuring probe moves relative to the object to be measured (for example, when the measuring probe of a three-dimensional coordinate measuring machine is held manually, the measuring probe will move relative to the object to be measured due to hand shaking, etc.), then when using multiple time-coded projection patterns projected by the projector within a period of time for measurement, the measurement accuracy will be reduced, or even the measurement results will be unusable.

[0003] In order to solve the problem of unreliable measurement caused by the relative movement of the measuring probe with respect to the object to be measured during the measurement process, a spatially encoded color projection pattern projected by a projector is usually used to measure the object to be measured. However, when using a color projection pattern for measurement, it will be affected by the color of the object to be measured, resulting in reduced measurement accuracy. For example, if the object to be measured is red, the red light in the projected color pattern will merge with the color of the object to be measured, making it difficult to distinguish the red boundary in the image received by the camera device.

[0004] Therefore, how to avoid the influence of the color of the object to be measured and the movement of the measuring probe relative to the object to be measured on the measurement accuracy is a technical problem that needs to be solved urgently. Summary of the invention

[0005] In view of the shortcomings of the related technologies mentioned above, the purpose of the present application is to provide a method for determining the three-dimensional coordinates of an object to be measured, an articulated arm three-dimensional coordinate measuring machine, a control device, a computer-readable storage medium, and a computer program product, which are used to solve the technical problem of how to avoid the influence of the color of the object to be measured and the movement of the measuring probe relative to the object to be measured on the measurement accuracy.

[0006] To achieve the above-mentioned purpose and other related purposes, the first aspect of the present application provides a method for determining the three-dimensional coordinates of an object to be measured, which is used for a measuring device, wherein the measuring device includes a measuring probe having a projector and a camera device, and the method includes: acquiring a reflected image, wherein the reflected image is obtained by receiving the reflected light of a projection pattern projected by the projector reflected from the object to be measured by the camera device; wherein the projection pattern is configured to include a first grayscale element and a second grayscale element belonging to two grayscale levels, and each grayscale element included in the projection pattern is arranged according to a preset rule so that the grayscale arrangement rule within a coding segment composed of any continuous preset number of grayscale elements is unique; performing grayscale recognition on the reflected image to determine a decoding sequence, so as to determine the correspondence between the reflected image and the projection pattern based on a subsequence of the decoding sequence and the coding segment; and determining the three-dimensional coordinates of the object to be measured based on the correspondence.

[0007] In certain embodiments disclosed in the first aspect of the present application, the projection pattern also includes third grayscale elements spaced among the first grayscale elements and the second grayscale elements, so that there are no continuously arranged first grayscale elements and second grayscale elements in the projection pattern.

[0008] In certain embodiments disclosed in the first aspect of the present application, the first grayscale element corresponds to a first light intensity area of ​​a preset width projected by the projector, and the second grayscale element corresponds to a second light intensity area of ​​a preset width projected by the projector; wherein the first light intensity area is configured as a non-illuminated area, and the second light intensity area is configured as an illuminated area, so that a combination of light and dark of the two forms the projection pattern.

[0009] In certain embodiments disclosed in the first aspect of the present application, the projection pattern also includes a third grayscale element spaced between the first grayscale element and the second grayscale element, and the third grayscale element corresponds to a third light intensity area of ​​a preset width projected by the projector so that the light intensities of the three are combined to form the projection pattern.

[0010] In certain embodiments disclosed in the first aspect of the present application, each grayscale element is configured as a stripe pattern so that the projection pattern appears as a stripe pattern.

[0011] In certain embodiments disclosed in the first aspect of the present application, the preset rule is determined using a binary pseudo-random coding sequence.

[0012] In certain embodiments disclosed in the first aspect of the present application, the step of performing grayscale recognition on the reflected image to determine a decoding sequence corresponding to the arrangement of two gray levels includes determining the gray level corresponding to each image element in the reflected image based on a preset grayscale threshold to obtain the decoding sequence.

[0013] In certain embodiments disclosed in the first aspect of the present application, the step of determining the grayscale level corresponding to each image element in the reflected image based on a preset grayscale threshold to obtain the decoding sequence includes modifying the third grayscale level to the previous adjacent grayscale level when it is determined that the image element of the reflected image belongs to the third grayscale level.

[0014] In certain embodiments disclosed in the first aspect of the present application, the step of performing grayscale recognition on the reflected image includes the step of acquiring an auxiliary image for assisting in identifying the reflected image, wherein the auxiliary image is obtained by receiving, by the camera device, reflected light of the reverse projection pattern projected by the projector reflected from the object to be measured.

[0015] In certain embodiments disclosed in the first aspect of the present application, determining the correspondence between the reflected image and the projection pattern based on the subsequence of the decoding sequence and the coding segment includes the following steps: determining a subsequence of the decoding sequence based on a preset number corresponding to the coding segment to obtain a decoding value of each subsequence; searching for position information of a row where the coding value of the coding segment equal to the decoding value is located in a first position list to determine the correspondence between the reflected image and the projection pattern; wherein the first position list is configured to include the position information of each grayscale element and the coding value of its corresponding coding segment, and the position information of each grayscale element and the coding value of its corresponding coding segment are located in the same row.

[0016] In certain embodiments disclosed in the first aspect of the present application, the determination of the correspondence between the reflected image and the projection pattern based on the subsequence of the decoding sequence and the coding segment includes the following steps: determining the subsequence of the decoding sequence based on a preset number corresponding to the coding segment to obtain the decoding value of each subsequence; searching for position information in a second position list whose row number is the decoding value to determine the correspondence between the reflected image and the projection pattern; wherein the second position list is configured to include position information of each grayscale element, and the row number where the position information of each grayscale element is located is the coding value of its corresponding coding segment.

[0017] In certain embodiments disclosed in the first aspect of the present application, the measuring device is an articulated arm three-dimensional coordinate measuring machine, and the method further includes a step of performing hand-eye calibration on the measuring device using the projection pattern before measuring the object to be measured.

[0018] In certain embodiments disclosed in the first aspect of the present application, the step of using the projection pattern to perform hand-eye calibration on the measuring device includes: acquiring a calibration image, wherein the calibration image is obtained by the camera receiving the reflected light of the projection pattern projected by the projector reflected from the calibration piece; wherein the calibration piece is configured as a flat plate; using the first three-dimensional point cloud data of the calibration piece obtained from the calibration image and the second three-dimensional point cloud data obtained by measuring the calibration piece using the contact measurement probe at the far end of the articulated arm three-dimensional coordinate measuring machine, to determine the conversion relationship between the contact measurement probe coordinate system and the camera coordinate system. The second aspect of the present application provides an articulated arm three-dimensional coordinate measuring machine, comprising: a base; an articulated arm having relative proximal and distal ends, the proximal end of which is connected to the base; a measuring probe located at the far end of the articulated arm, comprising a projector and a camera; a control device, which is used to communicate with the measuring probe, and is used to execute the method for determining the three-dimensional coordinates of the object to be measured as described in any embodiment disclosed in the first aspect of the present application.

[0019] The third aspect of the present application provides a control device, comprising: a storage device for storing at least one program; a processing device connected to the storage device, for calling the at least one program from the storage device and executing it to implement the method for determining the three-dimensional coordinates of the object to be measured as described in any embodiment disclosed in the first aspect of the present application.

[0020] The fourth aspect of the present application provides a computer-readable storage medium storing at least one program, which, when called, executes and implements the method for determining the three-dimensional coordinates of an object to be measured as described in any embodiment disclosed in the first aspect of the present application.

[0021] A fifth aspect of the present application provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the method for determining the three-dimensional coordinates of an object to be measured as described in any embodiment disclosed in the first aspect of the present application.

[0022] In summary, the method for determining the three-dimensional coordinates of the object to be measured, the articulated arm three-dimensional coordinate measuring machine, the control device, the computer-readable storage medium, and the computer program product provided by the present application determine the three-dimensional coordinates of the object to be measured by obtaining a reflected image obtained by a camera receiving the reflected light of the projection pattern projected by the projector reflected from the object to be measured. Since the projection pattern is configured to include a first grayscale element and a second grayscale element belonging to two grayscale levels, and each grayscale element is arranged in a preset rule so that the grayscale arrangement rule in the coding segment composed of any continuous preset number of grayscale elements is unique, the object to be measured can be measured using a projection pattern, which not only avoids the influence of the movement of the measuring probe relative to the object to be measured on the measurement accuracy, but also avoids the influence of the color of the object to be measured caused by the large number of colors in the projection pattern on the measurement accuracy; further, the projection pattern also includes a third grayscale element spaced between the first grayscale element and the second grayscale element, which avoids the problem that the number of continuous first grayscale elements or continuous second grayscale elements recognized in the reflected image is inconsistent with the number in the projection pattern due to the change of the depth of field when the camera is shooting, and further improves the measurement accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The specific features of the present application are shown in the attached claims. The features and advantages of the invention involved in the present application can be better understood by referring to the exemplary embodiments and drawings described in detail below. The drawings are briefly described as follows:

[0024] Figure 1 Shown is a schematic structural diagram of an articulated arm three-dimensional coordinate measuring machine in one embodiment of the present application.

[0025] Figure 2 Shown is a schematic diagram of a non-contact measurement probe acquiring measurement data in one embodiment of the present application.

[0026] Figure 3 Shown is a flow chart of a method for determining three-dimensional coordinates of an object to be measured in one embodiment of the present application.

[0027] Figure 4 Shown is a schematic diagram of a projection pattern in one embodiment of the present application.

[0028] Figure 5 Shown is a schematic diagram of a projection pattern in another embodiment of the present application.

[0029] Figure 6 Show this application Figure 4 and Figure 5 A list of first positions corresponding to projection patterns in the illustrated embodiment.

[0030] Figure 7 Show this application Figure 4 and Figure 5 A second position list corresponding to the projection patterns in the illustrated embodiment.

[0031] Figure 8 It is a schematic diagram of a flow chart of determining a correspondence between a subsequence of a decoding sequence and a coding segment in one embodiment of the present application.

[0032] Fig. 9 It is a schematic diagram of a flow chart of determining a correspondence between a subsequence of a decoding sequence and an encoding segment in another embodiment of the present application.

[0033] Fig.10 Shown is a schematic diagram of a process of using projection patterns to perform hand-eye calibration on a measuring device in one embodiment of the present application.

[0034] Fig.11 Shown is a schematic diagram of the structure of a control device in one embodiment of the present application. DETAILED DESCRIPTION

[0035] The following is an explanation of the implementation of the present application by means of specific embodiments. People familiar with the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification.

[0036] The present application is further described in detail below in conjunction with the accompanying drawings and specific embodiments. The technical solutions in the embodiments of the present application are clearly and completely described. Obviously, the described embodiments are only embodiments of a part of the present application, rather than all embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application. "An implementation method", "implementation method" or similar expressions mentioned in the whole text of this specification mean that the specific features, structures or characteristics described together with the implementation method are included in at least one embodiment of the present application. Therefore, in the whole text of this specification, the appearance of the phrases "in an implementation method", "in an implementation method" and similar expressions may (but not necessarily) relate to the same implementation method.

[0037] Although the terms first, second, etc. are used to describe various elements in this article in some instances, these elements should not be limited by these terms. These terms are only used to distinguish one element from another element. For example, the first grayscale element can be referred to as the second grayscale element, and similarly, the second grayscale element can be referred to as the first grayscale element, without departing from the scope of the various described embodiments. The first grayscale element and the second grayscale element are both describing a certain grayscale element, but unless the context clearly indicates otherwise, they are not the same grayscale element. Similar situations also include a first position list and a second position list, etc.

[0038] In view of the technical problems mentioned in the background technology, the present application discloses a method for determining the three-dimensional coordinates of an object to be measured, a three-dimensional coordinate measuring machine of an articulated arm, a control device, a computer-readable storage medium, and a computer program product, wherein the three-dimensional coordinates of the object to be measured are determined by obtaining a reflection image obtained by a camera receiving the reflected light of the projection pattern projected by the projector reflected from the object to be measured. Since the projection pattern is configured to include a first grayscale element and a second grayscale element belonging to two grayscale levels, and each grayscale element is arranged in a preset rule so that the grayscale arrangement rule in the coding segment composed of any continuous preset number of grayscale elements is unique, the object to be measured can be measured using a projection pattern, which not only avoids the influence of the movement of the measuring probe relative to the object to be measured on the measurement accuracy, but also avoids the influence of the color of the object to be measured caused by more grayscale levels on the measurement accuracy; further, the projection pattern also includes a third grayscale element spaced between the first grayscale element and the second grayscale element, which avoids the problem that the number of continuous first grayscale elements or continuous second grayscale elements recognized in the reflected image is inconsistent with the number in the projection pattern due to the change of the depth of field when the camera is shooting, and further improves the measurement accuracy.

[0039] The method for determining the three-dimensional coordinates of an object to be measured described in the present application is applied to a measuring device, and the measuring device is used to measure the three-dimensional coordinates of the object to be measured to determine the geometric features of the object to be measured. In one embodiment, the object to be measured is, for example, a component, assembly, or mold in the fields of electronics, optics, industrial production, or medical equipment, and the geometric features are, for example, the size, shape, surface quality, or / and texture of the object to be measured. For example, the measuring device can be configured as a three-dimensional coordinate measuring machine, and further, can be configured as an articulated arm three-dimensional coordinate measuring machine or a handheld three-dimensional coordinate measuring machine.

[0040] Furthermore, the measuring device includes a measuring probe with a projector and a camera device, so that the three-dimensional coordinates of the object to be measured are determined by the measuring probe. It should be noted that in order to distinguish it from other probes later, this application also refers to the measuring probe with a projector and a camera device as a non-contact measuring probe, and this will be understood in the subsequent references, and this application will not elaborate on this.

[0041] Taking the measurement device configured as a handheld three-dimensional coordinate measuring machine as an example, the handheld three-dimensional coordinate measuring machine may also include a trigger unit and a control device. The staff can hold the measuring device at the object to be measured and trigger the non-contact measurement probe through the trigger unit to obtain measurement data, and then determine the three-dimensional coordinates of the object to be measured through the control device.

[0042] Take the measurement device as an articulated arm three-dimensional coordinate measuring machine as an example, please refer to Figure 1, which is a schematic diagram of the structure of an articulated arm three-dimensional coordinate measuring machine in one embodiment of the present application. The articulated arm three-dimensional coordinate measuring machine may include an articulated arm 1 and a base 2 on the basis of including a non-contact measuring probe 3. The articulated arm 1 has a proximal end and a distal end relative to each other, wherein the proximal end is connected to the base 2 and a probe holder 5 is arranged at the distal end. The non-contact measuring probe 3 is connected to the distal end of the articulated arm 1 through the probe holder 5. The articulated arm 1 provides the measuring probe with a degree of freedom of movement in space so that the measuring probe can move to the object to be measured. For example, the articulated arm 1 may be configured as a seven-axis robot arm to provide seven degrees of freedom of movement (in the form of Figure 1 The articulated arm 1 shown is configured as a seven-axis robotic arm), and can also be configured as a six-axis robotic arm to provide six degrees of freedom. Of course, it can also be configured as a robotic arm with more or fewer axes according to actual needs, and this application does not limit this.

[0043] Furthermore, the probe base 5 may be further provided with a trigger component (eg Figure 1 The handle 6 shown in the figure (the handle can also be replaced by a keypad) is used to trigger the measuring probe to obtain measurement data. The articulated arm 1 includes an encoder that provides rotation information of the articulated arm 1. The rotation information provided by all encoders can determine the position of the measuring probe relative to the base 2. The base 2 can be configured with a control device, which can determine the three-dimensional coordinates of the object to be measured in combination with the measurement data of the measuring probe and the rotation information provided by the encoder.

[0044] It should be understood that the measuring device (eg, a handheld three-dimensional coordinate measuring machine and an articulated arm three-dimensional coordinate measuring machine) may also be configured with a plurality of measuring probes, for example Figure 1 The front end of the probe base 5 of the articulated arm coordinate measuring machine is also provided with a contact measuring probe 4. The control device can also be configured in other devices to communicate with the measuring device and calculate and determine the three-dimensional coordinates of the object to be measured based on the measurement data obtained from the measuring device.

[0045] The following combination Figure 2 The structure of the non-contact measuring probe and the principle of obtaining measurement data by the measuring probe are explained. Figure 2 The schematic diagram of the non-contact measurement probe acquiring measurement data in one embodiment of the present application is shown as follows: Figure 2As shown, the measuring probe 3 includes a projector 31 and a camera 32. The projector 31 and the camera 32 cooperate to obtain measurement data, so that the measuring device can determine the three-dimensional coordinates of the object to be measured based on the measurement data. In one example, the projector 31 projects a projection pattern (also referred to as a coded structured light pattern) onto the object D to be measured, and the object D to be measured reflects the projection pattern to form a reflected light of the projection pattern. The camera 32 receives the reflected light of the projection pattern reflected from the object D to be measured to obtain a reflected image, which is regarded as measurement data. The measuring device can determine the correspondence between the reflected image and the projection pattern based on the reflected image according to the known projection pattern, and then can determine the three-dimensional coordinates of the object to be measured based on the correspondence and the triangulation method.

[0046] In one embodiment, the projector is exemplified by a DLP projector, an LCD projector, or a liquid crystal silicon (LCOS) projector. For example, the projector is a DLP projector, and the DLP projector includes a digital micro-mirror device (DMD), and the projection pattern is projected by controlling the switching duty cycle of each reflector in the digital micro-mirror device (DMD). It should be noted that the above description of the projector is limited to examples. In other embodiments, the projector can also be a device that projects the projection pattern by illuminating a slide with a pattern with a visible light source.

[0047] In one embodiment, the camera device includes a photosensitive sensor (such as CCD or CMOS), and the camera device uses the photosensitive sensor to convert the reflected light of the projection pattern received by the camera device into a reflected image. It should be noted that the number of the camera devices can be one or two or more. Using two or more camera devices to obtain reflected images from different positions can improve measurement accuracy and avoid the influence of measurement blind areas on measurement accuracy. In the following embodiments, the number of the camera device is one for description.

[0048] In one embodiment, the camera device and the projector have a fixed positional relationship so that the camera device can receive reflected light of the projection pattern reflected from the object to be measured. The fixed positional relationship refers to the positional relationship between the projector and the camera device when they are installed on the measuring probe. Among them, the fixed positional relationship includes the distance between the projector and the camera device, and the angle between the projector and the camera device. In one embodiment, the angle is the angle between the optical axes of the projector and the camera device. The distance is the baseline length of the projector and the camera device, and the baseline is a line segment connecting the optical centers of the projector and the camera device.

[0049] It should be noted that Figure 2The fixed positional relationship between the projector and the camera device in the measuring probe of the embodiment shown is only for example and is not a limitation on the measuring probe of the present application. The measuring probe only needs to be equipped with a projector and a camera device that cooperate to perform non-contact measurement of the object to be measured and have a fixed positional relationship between the two.

[0050] See also Figure 3 , which is a flow chart of a method for determining the three-dimensional coordinates of an object to be measured in one embodiment of the present application. As shown in the figure, the method for determining the three-dimensional coordinates of an object to be measured includes step S110, step S120, and step S130. The following takes the method for determining the three-dimensional coordinates of an object to be measured being executed by the control device in the measuring device as an example to describe various embodiments.

[0051] In step S110 , the control device acquires a reflection image.

[0052] The method of obtaining the reflection image can be found in Figure 2 The projection pattern refers to a pattern composed of white light of different light intensities projected by the projector at one time, and the grayscale values ​​of the pattern areas corresponding to different light intensities are different. In other words, the grayscale value can be used to represent the light intensity. For example, a grayscale value of 0 represents no light, a grayscale value of 255 represents the maximum light intensity, and a grayscale value of 128 represents half of the maximum light intensity.

[0053] In one embodiment, the projection pattern is configured to include a first grayscale element and a second grayscale element belonging to two grayscale levels. In one example, the first grayscale element corresponds to a first light intensity area of ​​a preset width projected by the projector, and the second grayscale element corresponds to a second light intensity area of ​​a preset width projected by the projector. The grayscale level of the first grayscale element refers to the grayscale level corresponding to the grayscale value of the first light intensity area, and the grayscale level of the second grayscale element refers to the grayscale level corresponding to the grayscale value of the second light intensity area. Among them, the preset width refers to the width of the grayscale element in the arrangement direction of the grayscale element. It should be noted that the preset widths of the first grayscale element and the second grayscale element can be the same or different, and it is only necessary to ensure that the preset widths of each first grayscale element are equal and the preset widths of each second grayscale element are equal. In the following embodiments, in order to distinguish from the third grayscale level of the third grayscale element in the following text, the grayscale level of the first grayscale element is referred to as the first grayscale level, and the grayscale level of the second grayscale element is referred to as the second grayscale level.

[0054] See also Figure 4, which is a schematic diagram of a projection pattern in an embodiment of the present application. As shown in the figure, the projection pattern includes a first grayscale element A corresponding to a first light intensity area and a second grayscale element B corresponding to a second light intensity area. In order to form a sufficient distinction, the first light intensity area is configured as a non-irradiated area (that is, a non-lighting area), and the second light intensity area is configured as an illuminated area, and then the light and dark combination of the two forms the projection pattern. In one example, the light intensity of the illuminated area is configured as the maximum light intensity. Figure 4 In the embodiment shown, the first grayscale element A corresponding to the maximum light intensity is a white stripe pattern, and the second grayscale element B corresponding to no illumination is a black stripe pattern, and the first grayscale element A and the second grayscale element B are combined to form a black and white stripe pattern. In other examples, the light intensity of the illuminated area may also be an intermediate light intensity, and the intermediate light intensity is any light intensity between the maximum light intensity and the minimum light intensity. In this embodiment, the projection pattern formed by the combination of the non-illuminated area and the illuminated area can make the reflected image have sufficient contrast to facilitate grayscale recognition of the reflected image.

[0055] The grayscale arrangement rule in the coding segment composed of any continuous preset number of grayscale elements in the projection pattern is unique. In other words, the coding segment is composed of any continuous preset number of grayscale elements, and the grayscale arrangement rule in each coding segment is unique. The grayscale arrangement rule refers to the arrangement rule of the grayscale levels of the grayscale elements in the coding segment. Figure 4 Taking the preset number of 8 as an example, the first grayscale element of the projection pattern ( Figure 4 The second grayscale element B located at the edge of the projection pattern and the 7 consecutive first grayscale elements A after the first grayscale element constitute a coding segment M1, the 7 consecutive first grayscale elements A in the projection pattern and the second grayscale element B located after the 7 consecutive first grayscale elements A also constitute a coding segment M2, and so on, multiple coding segments of the projection pattern can be obtained.

[0056] In an embodiment where the number of a grayscale element and its subsequent grayscale elements in the projection pattern is less than a preset number, the first grayscale element of the projection pattern is sequentially filled to the rear side of the last grayscale element of the projection pattern to obtain a coding segment including a preset number of grayscale elements. For example, when the preset number is an integer n, and there is no grayscale element after the last grayscale element, the first grayscale element to the (n-1)th grayscale element of the projection pattern are filled to the rear side of the last grayscale element to form a coding segment of the last grayscale element. It should be noted that the padding operation does not affect the projection pattern, but is only used to form a coding segment of the corresponding grayscale element when the number of the grayscale element and its subsequent grayscale elements is less than the preset number.

[0057] In one embodiment, each coding segment represents the coding segment of the first grayscale element in the coding segment. In other words, the coding segment corresponding to each grayscale element is composed of any continuous preset number of grayscale elements with the grayscale element as the first. Figure 4 As shown, the coding segment M1 is the coding segment of the first grayscale element (i.e., the second grayscale element B) in the coding segment M1, and the coding segment M2 is the coding segment of the first grayscale element (i.e., the first grayscale element A) in the coding segment M2. It should be noted that, in other embodiments, each coding segment may also be a coding segment of other grayscale elements in the corresponding coding segment, for example, each coding segment may also be a coding segment of the second grayscale element in the corresponding coding segment. In the following embodiments, each coding segment is taken as an example to illustrate the coding segment of the first grayscale element in the corresponding coding segment.

[0058] Only using the projection pattern composed of the first grayscale element and the second grayscale element not only facilitates the grayscale recognition of the reflected image described in the embodiments below, but also avoids the influence of the color of the object to be measured on the measurement accuracy caused by more grayscale levels. However, since continuous first grayscale elements and second grayscale elements appear in the projection pattern composed of only the first grayscale element and the second grayscale element, the sizes of the same number of image elements in the reflected image obtained by the camera device under different depths of field are different, which makes it impossible to decode the reflected image to determine the correspondence between each image element and the grayscale element. Among them, the image element is the pixel area corresponding to each grayscale element in the reflected image.

[0059] To this end, in another embodiment, the projection pattern further includes a third grayscale element that is spaced between the first grayscale element and the second grayscale element, and the third grayscale element belongs to a third grayscale level. Thus, the third grayscale element can be used to avoid the first grayscale element and the second grayscale element being arranged continuously. Figure 5 , which is a schematic diagram of a projection pattern in another embodiment of the present application. As shown in the figure, the projection pattern includes a first grayscale element A, a second grayscale element B, and a third grayscale element C. The third grayscale element C can be used to avoid the appearance of the first grayscale element A and the second grayscale element B being arranged continuously.

[0060] In one embodiment, the first grayscale element corresponds to a first light intensity area of ​​a preset width projected by the projector, the second grayscale element corresponds to a second light intensity area of ​​a preset width projected by the projector, and the third grayscale element corresponds to a third light intensity area of ​​a preset width projected by the projector, so that the light intensities of the three are combined to form the projection pattern. In one example, in order to form sufficient distinction, the first light intensity area is configured as a non-irradiated area (that is, a light-free area), the second light intensity area is configured as an irradiated area with the maximum light intensity, and the third light intensity area is configured as an irradiated area with an intermediate light intensity. For example, the intermediate light intensity is half of the maximum light intensity. Figure 5 In the illustrated embodiment, the first grayscale element A corresponding to the maximum light intensity is a white stripe pattern, the second grayscale element B corresponding to no illumination is a black stripe pattern, and the third grayscale element C corresponding to the intermediate light intensity is a gray stripe pattern. The first grayscale element A, the second grayscale element B, and the third grayscale element C are combined to form a black, white, and gray stripe pattern.

[0061] It should be noted that, although the embodiments described above are described by taking the configuration of each grayscale element as a stripe shape as an example, in other embodiments, each grayscale element may also be configured as a square shape, a curve shape, or the like.

[0062] The projection pattern described in any of the above embodiments is formed by the control device controlling the projector to project the corresponding grayscale elements based on a preset rule. The preset rule is pre-stored in the control device. The preset rule indicates the number of grayscale elements in the projection pattern and the grayscale level of each grayscale element. The projection pattern arranged according to the preset rule can make the grayscale arrangement rule in the coding segment composed of any continuous preset number of grayscale elements unique.

[0063] In one embodiment, the preset rule is predetermined by using a binary pseudo-random code sequence, specifically, the binary pseudo-random code sequence includes a value 0 and a value 1, and the arrangement of any consecutive preset number of values ​​in the binary pseudo-random code sequence is unique in the entire binary pseudo-random code sequence. Different values ​​in the binary pseudo-random code sequence are different gray levels of gray elements, and the preset rule can be determined based on the values ​​in the binary pseudo-random code sequence.

[0064] In one example, a grayscale level of 1 indicates that the light intensity of the grayscale element is the maximum light intensity, in other words, the grayscale value of the grayscale element with a grayscale level of 1 is 255; a grayscale level of 0 indicates that the light intensity of the grayscale element is the minimum light intensity, in other words, the grayscale value of the grayscale element with a grayscale level of 0 is 0. It should be noted that the above description of the correspondence between grayscale level and light intensity / grayscale value is limited to examples. In other embodiments, the grayscale value of the grayscale element with a grayscale level of 0 may also be any value between 0 and 255. In the following embodiments, the grayscale level of 1 indicates that the light intensity of the grayscale element is the maximum light intensity, and the grayscale level of 0 indicates that the light intensity of the grayscale element is the minimum light intensity.

[0065] In one embodiment, the binary pseudo-random code sequence is pre-generated using a linear feedback shift register (LFSR). Figure 4 As shown, the binary pseudo-random code sequence is {1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0}, based on Figure 4 The preset rule determined by the binary pseudo-random coding sequence shown can be obtained accordingly. Figure 4 In the projection pattern shown, the grayscale level of the first grayscale element A is 0, and the grayscale level of the second grayscale element is 1.

[0066] In another embodiment, the projection pattern further includes a third grayscale element, the grayscale level of the third grayscale element is 2, that is, the light intensity corresponding to the third grayscale element is the middle light intensity. The preset rule is determined according to the ternary pseudo-random code sequence obtained by converting the binary pseudo-random code sequence. For example, refer to Figure 4 and Figure 5 , Figure 4 The corresponding binary pseudo-random code sequence is {1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0}. It is determined in sequence whether there are repeated values ​​in the binary pseudo-random code sequence. If so, the first repeated value is set to the value 2. For example, if the third bit in the binary pseudo-random code sequence is repeated, the value of the third bit is set to 2. Then, based on the transformed sequence {1, 0, 2, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0}, it is continued to be determined in sequence whether there are repeated values. If the fifth bit in the transformed sequence is repeated, the value of the fifth bit is set to 2, and so on. Finally, we can get Figure 5 The ternary pseudo-random code sequence shown is {1, 0, 2, 0, 2, 0, 2, 0, 1, 0, 1, 2, 0, 2, 0}. Based on the preset rule determined by the ternary pseudo-random code sequence, the corresponding Figure 5 In the projection pattern shown, the grayscale level of the first grayscale element A is 0, the grayscale level of the second grayscale element is 1, and the grayscale level of the third grayscale element is 2.

[0067] After the control device obtains the reflection image, step S120 is executed to determine the correspondence between the reflection image and the projection pattern.

[0068] In step S120, the control device performs gray-scale recognition on the reflection image to determine the decoding sequence, and determines the correspondence between the reflection image and the projection pattern based on the subsequence of the decoding sequence and the coding segment. Among them, the decoding sequence is formed by arranging two gray levels. The correspondence between the reflection image and the projection pattern refers to the correspondence between each image element in the reflection image and each gray-scale element in the projection pattern.

[0069] Specifically, the reflection image includes image elements corresponding to each gray-scale element in the projection pattern. After the control device performs gray-scale recognition on the reflection image, it can determine the gray level corresponding to each image element in the reflection image, and then obtain the decoding sequence arranged in two gray levels. The correspondence between each image element in the reflection image and each gray-scale element in the projection pattern is determined according to each subsequence of the decoding sequence and each coding segment.

[0070] In one embodiment, the control device determines the gray level corresponding to each image element in the reflection image based on a preset gray-scale threshold to obtain the decoding sequence. Specifically, the quantity and magnitude of the preset gray-scale threshold are determined based on the gray values of the gray-scale elements included in the projection pattern.

[0071] In one example, the projection pattern only includes a first gray-scale element and a second gray-scale element, the gray value of the first gray-scale element is 0, and the gray value of the second gray-scale element is 255. Then the preset gray-scale threshold is A1 (0 < A1 < 255). For example, the gray-scale threshold A1 is 128. The gray level of the image elements in the reflection image with gray values less than A1 is 0, and the gray level of the image elements in the reflection image with gray values greater than or equal to A1 is 1. The multiple gray levels corresponding to multiple image elements constitute the decoding sequence. For example, after performing gray-scale recognition on the reflection image corresponding to the projection pattern, the decoding sequence {1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0} can be obtained. Figure 4 After performing gray-scale recognition on the reflection image corresponding to the projection pattern, the decoding sequence {1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0} can be obtained.

[0072] In another example, the projected pattern includes a first grayscale element, a second grayscale element, and a third grayscale element. The grayscale value of the first grayscale element is 0, the grayscale value of the second grayscale element is 255, and the grayscale value of the third grayscale element is 128. Then the preset grayscale thresholds are A1 and A2 (0 < A1 < 128, 128 ≤ A1 < 255). For example, the grayscale thresholds A1 and A2 are 85 and 170 respectively. During the grayscale recognition process, the grayscale level of the image elements in the reflected image with a grayscale value less than A1 is 0, the grayscale level of the image elements in the reflected image with a grayscale value greater than or equal to A1 and less than or equal to A2 is 2, and the grayscale level of the image elements in the reflected image with a grayscale value greater than A2 is 1. Further, when determining that the image element of the reflected image belongs to the third grayscale level, the third grayscale level is modified to the previous adjacent grayscale level to obtain a decoded sequence. For example, if the previous grayscale level of the third grayscale level is 0, then the grayscale level 2 is modified to the grayscale level 0; if the previous grayscale level of the third grayscale level is 1, then the grayscale level 2 is modified to the grayscale level 1. For example, after grayscale recognition of the reflected image corresponding to Figure 5 the projected pattern, a plurality of obtained grayscale levels are {1, 0, 2, 0, 2, 0, 2, 0, 1, 0, 1, 2, 0, 2, 0}. After modifying the third grayscale level, the corresponding decoded sequence {1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0} can be obtained.

[0073] It should be noted that the method for grayscale recognition of the reflected image in this application is not limited to the method in the above embodiment. In other embodiments, grayscale recognition of the reflected image can also be achieved by using a pre-trained neural network or other methods.

[0074] Since the accuracy of the corresponding relationship depends on the accuracy of grayscale recognition of the reflected image, in order to further ensure the accuracy of grayscale recognition, in one embodiment, the control device also acquires an auxiliary image.

[0075] Among them, the auxiliary image is obtained by the imaging device receiving the reflected light of the reverse projected pattern projected by the projector from the object to be measured. Specifically, the projector projects a reverse projected pattern onto the object to be measured, and the object to be measured reflects the reverse projected pattern to form the reflected light of the reverse projected pattern, and the imaging device receives the reflected light of the reverse projected pattern to obtain the auxiliary image. In one embodiment, there is a preset time interval between the projection time of the reverse projected pattern and the projection time of the projected pattern. For example, the projector projects the reverse projected pattern after a preset time after projecting the projected pattern.

[0076] In one embodiment, the first grayscale element in the projection pattern is changed into the second grayscale element, and the second grayscale element in the projection pattern is changed into the first grayscale element, so as to obtain the reverse projection pattern. When the projection pattern also includes a third grayscale element, the first grayscale element in the projection pattern is changed into the second grayscale element, the second grayscale element in the projection pattern is changed into the first grayscale element, and the third grayscale element in the projection pattern remains unchanged, so as to obtain the reverse projection pattern.

[0077] The auxiliary image can be used to assist in identifying the reflected image. In one embodiment, after comparing the auxiliary image with the reflected image, the grayscale recognition of the reflected image can be assisted to improve the accuracy of grayscale recognition. In one example, the control device obtains a plurality of grayscale differences by subtracting the grayscale values ​​of each image element in the reflected image from the corresponding position in the auxiliary image, and verifies the grayscale level of the image element of the initially identified reflected image according to the size of the grayscale difference. Taking the reflected image including the first grayscale element, the second grayscale element, and the third grayscale element as an example, if the grayscale level of an image element in the initially identified reflected image is 0 or 1, but the grayscale difference between the image element and the corresponding position in the auxiliary image is very small (for example, the grayscale difference is less than 50), it means that the image element is recognized incorrectly, and the grayscale level of the image element needs to be set to 2. In another example, the control device preliminarily identifies the reflected image and the auxiliary image, respectively, and subtracts the grayscales at corresponding positions of the two to obtain level differences, and verifies the grayscales of the image elements of the preliminarily identified reflected image based on the magnitude of the level differences. Taking the reflected image including the first grayscale element, the second grayscale element, and the third grayscale element as an example, if the level difference corresponding to an image element in the reflected image is 2 or -2, it means that the grayscale of the image element may be incorrectly identified, and a comprehensive judgment based on the adjacent image elements and / or the auxiliary image of the image element is required to confirm the grayscale corresponding to the image element.

[0078] Further, after obtaining the decoding sequence composed of gray levels, the control device determines the corresponding relationship between the reflected image and the projection pattern using the subsequence of the decoding sequence and the coding segment. Specifically, each grayscale element in the projection pattern has a position information. After determining the position information of the grayscale element in the projection pattern corresponding to each image element in the reflected image, the corresponding relationship between each image element in the reflected image and each grayscale element in the projection pattern can be determined. For example, the position information is the number of grayscale elements in the projection pattern to which the grayscale element corresponds. By determining the number of grayscale elements in the projection pattern to which each image element in the reflected image corresponds, the corresponding relationship between each image element in the reflected image and each grayscale element in the projection pattern can be determined. In the following embodiments, the position information is taken as an example to explain the number of grayscale elements in the projection pattern to which the grayscale element corresponds.

[0079] In one embodiment, the storage device pre-stores a first position list or a second position list. The first position list and the second position list both store position information of each grayscale element, and the position information is used to indicate the position of the grayscale element in the projection pattern. For example, the position information of a grayscale element is the grayscale element number to which the grayscale element belongs in the projection pattern.

[0080] In one embodiment, the first position list and the second position list are obtained by using the code value of the coding segment corresponding to each grayscale element. In one example, the code value is obtained by using the grayscale of all grayscale elements in the coding segment. For example, the grayscale of all grayscale elements in a coding segment is {1, 0, 0, 0, 0, 0, 0, 0}, and the binary value 10000000 is converted to a decimal value as the code value of the coding segment, that is, the code value of the coding segment is 128. It should be noted that the value 10000000 can also be converted into a value obtained by other bases (such as hexadecimal) as the code value. In this embodiment, the binary pseudo-random code sequence that generates the projection pattern can be directly used to calculate the code value. It should be noted that when the projection pattern also includes a third grayscale element, the corresponding ternary pseudo-random code sequence can be converted into a binary pseudo-random code sequence, or the binary pseudo-random code sequence that generates the projection pattern including the third grayscale element can be directly called to calculate the code value.

[0081] In one embodiment, the first position list is configured to include the position information of each grayscale element and the code value of its corresponding code segment, and the position information of each grayscale element and the code value of its corresponding code segment are located in the same row. Figure 6 , shown as this application Figure 4 and Figure 5The first position list corresponding to the projection pattern in the illustrated embodiment is as shown in the figure, the encoding value of the first grayscale element in the projection pattern is 128, the encoding value of the second grayscale element in the projection pattern is 1, ... the encoding value of the fourteenth grayscale element in the projection pattern is 32, and the encoding value of the fifteenth grayscale element in the projection pattern is 64.

[0082] In one embodiment, the second position list is configured to include the position information of each grayscale element, and the row number where the position information of each grayscale element is located is the code value of the corresponding code segment. Figure 7 , shown as this application Figure 4 and Figure 5 The second position list corresponding to the projection pattern in the illustrated embodiment is as shown in the figure, the first grayscale element in the projection pattern is in the 128th row and the encoding value of the first grayscale element is 128, the second grayscale element in the projection pattern is in the 1st row and the encoding value of the second grayscale element is 1, ... the 14th grayscale element in the projection pattern is in the 32nd row and the encoding value of the 14th grayscale element is 32, and the 15th grayscale element in the projection pattern is in the 64th row and the encoding value of the 15th grayscale element is 64.

[0083] In one embodiment, see Figure 8 , which is a flow chart of determining the correspondence between a subsequence of a decoding sequence and a coding segment in one embodiment of the present application. As shown in the figure, the step of determining the correspondence between a subsequence of a decoding sequence and a coding segment includes step S1200 and step S1201.

[0084] In step S1200, the control device determines a subsequence of a decoding sequence based on a preset number of coding segments to obtain a decoding value of each subsequence, wherein the decoding subsequence is composed of a preset number of continuous gray levels in the decoding sequence.

[0085] In one embodiment, the control device determines the number of gray levels constituting the decoding subsequence based on a preset number corresponding to the coding segments, and then multiple subsequences can be obtained based on the number of gray levels and the decoding sequence. The number of obtained subsequences is equal to the number of the coding segments. In other words, the number of obtained subsequences is equal to the number of grayscale elements in the projection pattern.

[0086] In one embodiment, the binary value corresponding to the decoding subsequence is converted into a numerical value having the same base as the encoding value, and the converted numerical value is used as the decoding value of the decoding subsequence. For example, if the base of the encoding value is decimal, the binary value corresponding to the decoding subsequence is converted into a decimal value, and the decimal value of the decoding subsequence is its decoding value.

[0087] In a specific embodiment, taking the decoding sequence as {1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0}, the preset number of encoding segments corresponding to 8, and the encoding value system as decimal as an example, the control device can obtain 15 subsequences based on the preset number and the decoding sequence. The 15 subsequences are: {1, 0, 0, 0, 0, 0, 0, 0}; {0, 0, 0, 0, 0, 0, 1}; {0, 0, 0, 0, 0, 0, 1, 0}; {0, 0, 0, 0, 0, 0, 1, 0}; {0, 0, 0, 0, 0, 0, 1, 0}; {0, 0, 0, 0, 0, 0, 1, 0}; {0, 0, 0, 0, 0, 1, 0, 1}; {0, 0, 0, 0, 1, 0, 1, 0}; {0, 1, 0, 1, 0, 1, 0}; {0, 1 The control device converts the binary values ​​corresponding to the 15 subsequences into decimal values ​​to obtain 15 decoding values, and the 15 decoding values ​​are: 128, 1, 2, 5, 11, 22, 44, 88, 177, 98, 196, 136, 16, 32, 64.

[0088] In step S1201, the control device searches for position information of a row where the coding value of the coding segment equal to the decoding value is located in a first position list to determine the corresponding relationship between the reflected image and the projection pattern.

[0089] The first position list is configured to include the position information of each grayscale element and the encoding value of its corresponding encoding segment, and the position information of each grayscale element and the encoding value of its corresponding encoding segment are located in the same row. The first position list is the same or similar to the above description and will not be repeated here.

[0090] In one embodiment, the control device finds the encoding value equal to the decoded value in the first position list to determine the position information of the row where the encoding value is located, and based on the position information corresponding to each decoded value, the corresponding relationship between each image element in the reflected image and each grayscale element in the projection pattern can be determined. For example, refer to Figure 6 For example, if the decoded value of an image element is 88, the control device compares the decoded value 88 with the coding values ​​in the list in turn. After determining the coding value equal to the decoded value 88, the position information of the row where the coding value 88 is located is 8, then it can be determined that the image element corresponds to the 8th grayscale element in the projection pattern.

[0091] When the control device determines the correspondence between the reflected image and the projection pattern according to the first position list, the decoded value needs to be compared with the coded value in the list in turn, which greatly increases the calculation time for determining the correspondence between the reflected image and the projection pattern.

[0092] To reduce the computation time for determining the correspondence between the reflected image and the projected pattern, see Fig. 9 , which is a flow chart of determining the correspondence between a subsequence of a decoding sequence and a coding segment in another embodiment of the present application. As shown in the figure, the step of determining the correspondence between a subsequence of a decoding sequence and a coding segment includes step S1202 and step S1203.

[0093] In step S1202, the control device determines subsequences of the decoding sequence based on a preset number corresponding to the coding segments to obtain a decoding value of each subsequence.

[0094] The step S1202 is the same as or similar to the step S1200 described above and will not be described again here.

[0095] In step S1203, the control device searches for position information whose row number is the decoded value in a second position list to determine the corresponding relationship between the reflected image and the projection pattern.

[0096] The second position list is configured to include the position information of each grayscale element, and the row number where the position information of each grayscale element is located is the code value of the corresponding code segment. The second position list is the same or similar to the above description, and will not be repeated here.

[0097] In one embodiment, the control device directly uses the position information with the row number of the decoded value in the second position list as the position information corresponding to the image element based on the decoded value of the image element, and then sequentially determines the corresponding relationship between each image element in the reflected image and each grayscale element in the projection pattern. For example, see Figure 7 For example, if the decoded value of an image element is 88, the control device directly extracts the position information 8 of the 88th row, and then determines that the image element corresponds to the 8th grayscale element in the projection pattern. In this way, the calculation time for determining the corresponding relationship between the reflected image and the projection pattern is reduced.

[0098] After the control device determines the corresponding relationship between the reflected image and the projection pattern, step S130 may be executed to determine the three-dimensional coordinates of the object to be measured.

[0099] In step S130, the control device determines the three-dimensional coordinates of the object to be measured based on the corresponding relationship.

[0100] In one embodiment, the control utilizes a triangulation method based on the correspondence between the reflected image and the projection pattern and the fixed positional relationship between the camera device and the projector, so as to determine the three-dimensional coordinates of the area on the object to be measured that is illuminated by the projection pattern.

[0101] In the case where the measuring device is an articulated arm three-dimensional coordinate measuring machine, during the use of the measuring device, the measuring probe may be removed from the end of the articulated arm and then reinstalled to the end of the articulated arm. The position of the measuring probe reinstalled to the end of the articulated arm may change relative to the end of the mechanical arm, thereby affecting the measurement accuracy.

[0102] To this end, in one embodiment, before measuring the object to be measured, the control device can also use the projection pattern to perform hand-eye calibration on the measuring device to avoid position changes between the camera device of the measuring probe and the end of the robotic arm, which affects the measurement accuracy. In one example, the end of the robotic arm is a contact measuring probe, and the control device needs to determine the relative position relationship between the contact measuring probe and the camera device to complete the hand-eye calibration.

[0103] See also Fig.10 , which is a schematic diagram of a process of using a projection pattern to calibrate the hand and eye of a measuring device in one embodiment of the present application. As shown in the figure, the steps of using a projection pattern to calibrate the hand and eye of a measuring device include step S1400 and step S1401.

[0104] In step S1400, the control device acquires a calibration image.

[0105] The calibration image is obtained by receiving the reflected light of the projection pattern projected by the projector reflected from the calibration piece by the camera device. Specifically, the projector projects the projection pattern onto the surface of the calibration piece, and the surface of the calibration piece reflects the projection pattern to form the reflected light of the projection pattern, and the camera device receives the reflected light to obtain the calibration image. The projection pattern is the same or similar to that described above, and will not be repeated here. The calibration piece is configured as a flat plate.

[0106] In step S1401, the control device uses the first three-dimensional point cloud data of the calibration part obtained by the calibration image and the second three-dimensional point cloud data obtained by measuring the calibration part using the contact measurement probe at the far end of the articulated arm three-dimensional coordinate measuring machine, to determine the conversion relationship between the contact measurement probe coordinate system and the camera device coordinate system.

[0107] In one embodiment, the control device can calculate the first three-dimensional point cloud data of the calibration part surface using the calibration image, and use the contact measurement probe at the far end of the articulated arm three-dimensional coordinate measuring machine to perform contact measurement on the calibration part to obtain the second three-dimensional point cloud data of the calibration part surface. Since the two measurement methods measure the surface of the same calibration part and the surface of the calibration part is a plane, the control device can obtain the conversion relationship between the contact measurement probe coordinate system and the camera device coordinate system under the constraint that the planes respectively fitted by the first three-dimensional point cloud data and the second three-dimensional point cloud data are the same. Wherein, the conversion relationship includes the rotation parameters and translation parameters between the two coordinate systems.

[0108] In summary, a projection pattern of the present application only includes grayscale elements corresponding to two or three light intensity areas. Compared with a projection pattern including grayscale elements corresponding to four or more light intensity areas, the present application can not only avoid the influence of the movement of the measuring probe relative to the object to be measured on the measurement accuracy, but also avoid the difficulty in distinguishing the boundaries of different image elements in the reflected image due to the different reflectivity and absorption rates of light of different light intensities due to the different colors of the object to be measured.

[0109] The present application also provides a computer-readable and writable storage medium, on which at least one program is stored. When the at least one program is called, it executes the method for determining the three-dimensional coordinates of the object to be measured described in any of the above embodiments.

[0110] In one embodiment, the present application further provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the above-mentioned related steps to implement the method for determining the three-dimensional coordinates of the object to be measured described in any of the above-mentioned embodiments.

[0111] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application.

[0112] In the embodiments provided in the present application, the computer readable and writable storage medium may include a read-only memory (ROM), a random access memory (RAM), an EEPROM, a CD-ROM or other optical disk storage device, a magnetic disk storage device or other magnetic storage device, a flash memory, a USB flash drive, a mobile hard disk, or any other medium that can be used to store the desired program code in the form of an instruction or data structure and can be accessed by a computer. In addition, any connection can be appropriately referred to as a computer-readable medium. For example, if the instruction is sent from a website, a server or other remote source using a coaxial cable, an optical fiber cable, a twisted pair, a digital subscriber line (DSL), or wireless technologies such as infrared, radio and microwaves, the coaxial cable, optical fiber cable, twisted pair, DSL, or wireless technologies such as infrared, radio and microwaves are included in the definition of the medium. However, it should be understood that computer readable and writable storage media and data storage media do not include connections, carriers, signals or other temporary media, but are intended to be non-temporary, tangible storage media. Disk and disc, as used in this application, includes compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers.

[0113] The present application also discloses a control device, which is used to implement the method for determining the three-dimensional coordinates of the object to be measured described in any of the above embodiments. In one embodiment, the control device is a device capable of performing digital calculation, logic processing, and information processing on data.

[0114] See also Fig.11 , which is a schematic diagram of the structure of a control device in one embodiment of the present application, wherein the control device 9 includes a storage device 90 and a processing device 91 connected to the storage device 90. Further, the control device also includes an interface device 92. The control device 9 can be configured in the measuring device, or configured in other devices to communicate with the measuring device.

[0115] In some embodiments, the storage device 90 is used to store at least one program, and the at least one program can be executed by the processing device 91 to coordinate the method for determining the three-dimensional coordinates of the object to be measured described in any of the above embodiments of the storage device 90.

[0116] Here, the storage device 90 includes, but is not limited to, a read-only memory, a random access memory, and a non-volatile memory. For example, the storage device 90 includes a flash memory device or other non-volatile solid-state storage device. In some embodiments, the storage device 90 may also include a memory away from one or more processing devices 91, such as a network attached memory accessed via an RF circuit or an external port and a communication network, wherein the communication network may be the Internet, one or more intranets, a local area network, a wide area network, a storage area network, etc., or a suitable combination thereof. The memory controller may control access to the memory by other components of the device, such as a CPU and a peripheral interface.

[0117] In some embodiments, the processing device 91 includes one or more processors. The processing device 91 can be operable to perform data read and write operations with the storage device 90. The processing device 91 includes one or more general-purpose microprocessors, one or more application-specific processors (ASICs), one or more digital signal processors, one or more field programmable logic arrays (FPGAs), or any combination thereof.

[0118] In some embodiments, the interface device 92 includes at least one interface unit, each of which is used to output a visual interface, receive a human-computer interaction event generated according to the operation of the staff (for example, receiving the preset rule, the first position list, the second position list, and the preset gray threshold value input by the staff), etc. For example, the interface device 92 includes but is not limited to: a serial interface such as an HDMI interface or a USB interface, or a parallel interface, etc. In one embodiment, the interface device 92 also includes a network communication unit, which is a device for data transmission using a wired or wireless network, and examples thereof include but are not limited to: an integrated circuit including a network card, a local area network module such as a WiFi module or a Bluetooth module, a wide area network module such as a mobile network, etc.

[0119] In one embodiment, the control device further includes an input device, which is exemplified by a touch screen or a keyboard connected to the processing device. The input device is used to provide a human-computer interaction interface for a staff member to input the preset rule, the first position list, the second position list, and the preset grayscale threshold, etc.

[0120] In one or more exemplary aspects, the functions described in the method for determining the three-dimensional coordinates of the object to be measured described in the present application can be implemented in hardware, software, firmware or any combination thereof. When implemented in software, these functions can be stored or transmitted as one or more instructions or codes to a computer-readable medium. The steps of the method or algorithm disclosed in the present application can be embodied in a processor executable software module, wherein the processor executable software module can be located on a tangible, non-temporary computer storage medium. A tangible, non-temporary computer storage medium can be any available medium that a computer can access.

[0121] The flowchart and block diagram in the accompanying drawings described in the present application illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. Based on this, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of the boxes in the block diagram and / or the flowchart can be realized by a dedicated hardware-based system that performs a specified function or operation, or can be realized by a combination of dedicated hardware and computer instructions.

[0122] In summary, the method for determining the three-dimensional coordinates of the object to be measured, the articulated arm three-dimensional coordinate measuring machine, the control device, the computer-readable storage medium, and the computer program product provided by the present application determine the three-dimensional coordinates of the object to be measured by obtaining a reflected image obtained by a camera receiving the reflected light of the projection pattern projected by the projector reflected from the object to be measured. Since the projection pattern is configured to include a first grayscale element and a second grayscale element belonging to two grayscale levels, and each grayscale element is arranged in a preset rule so that the grayscale arrangement rule in the coding segment composed of any continuous preset number of grayscale elements is unique, the object to be measured can be measured using a projection pattern, which not only avoids the influence of the movement of the measuring probe relative to the object to be measured on the measurement accuracy, but also avoids the influence of the color of the object to be measured caused by the large number of colors in the projection pattern on the measurement accuracy; further, the projection pattern also includes a third grayscale element spaced between the first grayscale element and the second grayscale element, which avoids the problem that the number of continuous first grayscale elements or continuous second grayscale elements recognized in the reflected image is inconsistent with the number in the projection pattern due to the change of the depth of field when the camera is shooting, and further improves the measurement accuracy.

[0123] The above embodiments are merely illustrative of the principles and effects of the present application and are not intended to limit the present application. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed in the present application shall still be covered by the claims of the present application.

Claims

1. A method for determining the three-dimensional coordinates of an object to be measured, used in a measuring device, characterized in that: The measuring device comprises a measuring probe having a projector and a camera, and the method comprises: Acquire a reflection image, wherein the reflection image is obtained by receiving, by the camera device, reflected light of a projection pattern projected by the projector reflected from the object to be measured; wherein the projection pattern is configured to include a first grayscale element and a second grayscale element belonging to two grayscale levels, and each grayscale element included in the projection pattern is arranged in a preset pattern so that the grayscale arrangement pattern in a coding segment composed of any continuous preset number of grayscale elements is unique; Performing grayscale recognition on the reflected image to determine a decoding sequence, so as to determine a corresponding relationship between the reflected image and the projection pattern based on a subsequence of the decoding sequence and the coding segment; The three-dimensional coordinates of the object to be measured are determined based on the corresponding relationship.

2. The method for determining the three-dimensional coordinates of an object to be measured according to claim 1, characterized in that: The projection pattern further includes third grayscale elements that are spaced between the first grayscale elements and the second grayscale elements, so that there are no continuously arranged first grayscale elements and second grayscale elements in the projection pattern.

3. The method for determining the three-dimensional coordinates of an object to be measured according to claim 1, characterized in that: The first grayscale element corresponds to a first light intensity area of ​​a preset width projected by the projector, and the second grayscale element corresponds to a second light intensity area of ​​a preset width projected by the projector; wherein the first light intensity area is configured as a non-illuminated area, and the second light intensity area is configured as an illuminated area, so that a combination of light and dark of the two forms the projection pattern.

4. The method for determining the three-dimensional coordinates of an object to be measured according to claim 3, characterized in that: The projection pattern also includes a third grayscale element spaced between the first grayscale element and the second grayscale element, and the third grayscale element corresponds to a third light intensity area of ​​a preset width projected by the projector so that the light intensities of the three are combined to form the projection pattern.

5. The method for determining the three-dimensional coordinates of an object to be measured according to any one of claims 1 to 4, characterized in that: Each grayscale element is configured as a stripe pattern so that the projection pattern appears as a stripe pattern.

6. The method for determining the three-dimensional coordinates of an object to be measured according to claim 1, characterized in that: The preset rule is determined by using a binary pseudo-random code sequence.

7. The method for determining the three-dimensional coordinates of an object to be measured according to claim 1, characterized in that: The step of performing grayscale recognition on the reflected image to determine a decoding sequence corresponding to the arrangement of two grayscale levels includes determining the grayscale corresponding to each image element in the reflected image based on a preset grayscale threshold to obtain the decoding sequence.

8. The method for determining the three-dimensional coordinates of an object to be measured according to claim 7, characterized in that: The step of determining the grayscale corresponding to each image element in the reflected image based on a preset grayscale threshold to obtain the decoding sequence includes modifying the third grayscale to the previous adjacent grayscale when determining that the image element of the reflected image belongs to the third grayscale.

9. The method for determining the three-dimensional coordinates of an object to be measured according to claim 1, characterized in that: The step of performing grayscale recognition on the reflected image includes the step of acquiring an auxiliary image for assisting in the recognition of the reflected image, wherein: The auxiliary image is obtained by receiving, by the camera device, reflected light of the reverse projection pattern projected by the projector that is reflected from the object to be measured.

10. The method for determining the three-dimensional coordinates of an object to be measured according to claim 1, characterized in that: The determining the correspondence between the reflected image and the projection pattern based on the subsequence of the decoding sequence and the coding segment comprises the following steps: Determining subsequences of the decoding sequence based on a preset number corresponding to the coding segments to obtain decoding values ​​for each subsequence; Search a first position list for position information of a row where the coding value of a coding segment equal to the decoded value is located, so as to determine the correspondence between the reflected image and the projection pattern; wherein the first position list is configured to include the position information of each grayscale element and the coding value of its corresponding coding segment, and the position information of each grayscale element and the coding value of its corresponding coding segment are located in the same row.

11. The method for determining the three-dimensional coordinates of an object to be measured according to claim 1, characterized in that: The determining the correspondence between the reflected image and the projection pattern based on the subsequence of the decoding sequence and the coding segment comprises the following steps: Determining subsequences of the decoding sequence based on a preset number corresponding to the coding segments to obtain decoding values ​​for each subsequence; Search for position information whose row number is the decoded value in a second position list to determine the correspondence between the reflected image and the projection pattern; wherein the second position list is configured to include position information of each grayscale element, and the row number where the position information of each grayscale element is located is the encoding value of its corresponding encoding segment.

12. The method for determining the three-dimensional coordinates of an object to be measured according to claim 1, characterized in that: The measuring device is an articulated arm three-dimensional coordinate measuring machine, and the method further comprises the step of performing hand-eye calibration on the measuring device using the projection pattern before measuring the object to be measured.

13. The method for determining the three-dimensional coordinates of an object to be measured according to claim 12, characterized in that: The step of performing hand-eye calibration on the measuring device using the projection pattern comprises: Acquire a calibration image, wherein the calibration image is obtained by receiving, by the camera device, reflected light of the projection pattern projected by the projector reflected from the calibration piece; wherein the calibration piece is configured as a flat plate; The conversion relationship between the contact measurement probe coordinate system and the camera device coordinate system is determined by using the first three-dimensional point cloud data of the calibration part obtained by the calibration image and the second three-dimensional point cloud data obtained by measuring the calibration part using the contact measurement probe at the far end of the articulated arm three-dimensional coordinate measuring machine.

14. An articulated arm three-dimensional coordinate measuring machine, characterized in that: include: Pedestal; an articulated arm having opposing proximal and distal ends, the proximal end of the articulated arm being connected to the base; A measuring probe, located at the distal end of the articulated arm, comprising a projector and a camera device; A control device, used for communicating with the measuring probe, and for executing the method for determining the three-dimensional coordinates of the object to be measured as described in any one of claims 1-13.

15. A control device, characterized in that: include: A storage device for storing at least one program; A processing device is connected to the storage device, and is used to call the at least one program from the storage device and implement the method for determining the three-dimensional coordinates of the object to be measured as described in any one of claims 1-13 when executing.

16. A computer-readable storage medium, characterized in that: At least one program is stored, and when the at least one program is called, it is executed and implements the method for determining the three-dimensional coordinates of the object to be measured as described in any one of claims 1-13.

17. A computer program product, characterized in that When the computer program product is run on a computer, the computer is enabled to execute the method for determining the three-dimensional coordinates of an object to be measured as described in any one of claims 1 to 13.