Priority is claimed in this application from japanese patent application No. 2020-8974, filed on 23/1/2020, the contents of which are incorporated by reference into this application.
Disclosure of Invention
In the correction method described in patent document 1, a change (broken line) in the amount of received light (accumulation amount) during exposure is obtained while shifting the exposure timing by a predetermined width, and a correction coefficient is calculated from the ratio of the accumulation amounts at a predetermined exposure timing between the two in comparison with the change in the amount of received light in an environment where there is no multipath (broken line of reference data). Therefore, the processing load for correction such as controlling the exposure timing and acquiring the temporal change in the amount of received light increases, the apparatus configuration becomes complicated, and the apparatus cost is expected to increase. Further, the degree of influence of multipath depends on the measurement environment such as a wall and a floor, and the correction coefficient differs depending on the magnitude of the measurement distance, that is, the short-distance measurement and the long-distance measurement. In the technique of patent document 1, calculation of the correction coefficient based on the magnitude of the measurement distance is not particularly considered.
An object of the present invention is to provide a method for correcting a measured distance, a distance measuring device, and a distance measuring system, which can perform correction processing of a distance error due to a multipath phenomenon more easily in a distance measuring device using a TOF method, and can perform correction appropriately according to the magnitude of the measured distance.
The present invention is a method for correcting a measured distance in a distance measuring device for measuring a distance to an object based on a propagation time of light,
as a preparatory step for making the correction, there are included:
a step of arranging a measurement sample so that a distance from the measurement device is a set value L1;
a step of obtaining a measurement value L2 by measuring the distance from the measurement sample by the distance measuring device;
a step of changing the set value L1 and acquiring the measured values L2 corresponding to a plurality of kinds of the set values L1; and
and a step of generating a correction expression for transforming the measured value L2 to the set value L1 based on the obtained relationship between the set value L1 and the measured value L2.
The actual measurement step of measuring the distance to the object includes:
a step of obtaining an actual measurement value x by measuring a distance between the distance measuring device and the object;
correcting the measured value x by the correction formula, and calculating a correction value y of the measured distance; and
and outputting the correction value y.
Further, the present invention is a distance measuring device for measuring a distance to an object based on a propagation time of light, including:
a light emitting unit that emits irradiation light to the object;
a light receiving unit that detects reflected light from the object;
a light emission control unit that controls the light emitting unit;
a distance calculation unit for calculating a distance to the object based on the propagation time of the reflected light detected by the light receiving unit; and
a distance correction unit for correcting the distance calculated by the distance calculation unit by a correction formula,
the correction formula is an approximate formula as follows:
a measurement sample is arranged at a distance of a set value L1 from the distance measuring device in advance, the distance from the measurement sample is measured by the distance measuring device as a measured value L2, and an approximate expression is generated for converting the measured value L2 into the set value L1 based on the relationship between the plurality of types of set values L1 and the measured value L2.
Further, the present invention is a distance measuring system including a distance measuring device that measures a distance to an object based on a propagation time of light, and an external processing device that corrects the measured distance measured by the distance measuring device, characterized in that:
the distance measuring device includes:
a light emitting unit that emits irradiation light to the object;
a light receiving unit that detects reflected light from the object;
a light emission control unit that controls the light emitting unit; and
a distance calculating unit for calculating the distance to the object based on the propagation time of the reflected light detected by the light receiving unit,
the external processing device is used for processing the external processing device,
a distance correction unit for correcting the distance calculated by the distance calculation unit of the distance measuring device by a correction formula,
the correction formula is an approximate formula as follows:
a measurement sample is arranged at a distance of a set value L1 from the distance measuring device in advance, the distance from the measurement sample is measured by the distance measuring device as a measured value L2, and an approximate expression is generated for converting the measured value L2 into the set value L1 based on the relationship between the plurality of types of set values L1 and the measured value L2.
According to the present invention, the processing load for distance correction in the distance measuring device can be greatly reduced, and correction can be appropriately performed according to the magnitude of the measured distance.
Detailed Description
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. However, the present invention is not to be construed as being limited to the description of the embodiments shown below. It will be readily understood by those skilled in the art that the specific structure may be changed without departing from the spirit or scope of the invention.
In the structure of the invention described below, the same reference numerals are used for the same portions or portions having the same functions in common between different drawings, and redundant description may be omitted.
[ example 1 ]
Fig. 1 is a diagram showing a configuration of a distance measuring device according to embodiment 1. In the following example, a case where the distance to the person is measured as the measurement target object is described, but the present invention is not limited thereto.
The distance measuring device (TOF device) 1 includes a light emitting unit 11 that irradiates pulsed light from a light source such as a Laser Diode (LD) or a Light Emitting Diode (LED) to an object, a light receiving unit 12 that receives the pulsed light reflected from the object by a CCD sensor or a CMOS sensor, a light emission control unit 13 that controls the on/off state or the light emission amount of the light emitting unit 11, and a distance calculating unit 14 that calculates the distance from the object from a detection signal (light receiving data) of the light receiving unit 12. Further, in the present embodiment, the distance correction unit 15 for correcting the distance data output from the distance calculation unit 14 is provided, and the correction formula 16 for correction is stored in advance in a memory in the device.
The corrected distance data is transmitted to the external processing device 2. The external processing device 2 is constituted by, for example, a personal computer, generates a distance image by performing a colorization process for changing the hue of each portion of the object based on the distance correction data (image processing operation), and outputs and displays the distance image on a display (display operation). Further, by analyzing the change in the position of the object (person or the like) based on the distance data, the movement locus (line of motion) of the person or the like can be obtained.
Fig. 2 is a diagram illustrating the principle of distance measurement using the TOF method. The relationship of the TOF apparatus 1 and an object 3 (e.g. a person) is shown. The TOF apparatus 1 includes a light emitting portion 11 and a light receiving portion 12, and emits irradiation light 31 for distance measurement from the light emitting portion 11 to the object 3. The light receiving unit 12 receives the reflected light 32 reflected by the object 3 with a two-dimensional sensor 12a such as a CCD. The object 3 is present at a distance L from the light emitting unit 11 and the light receiving unit 12. Here, assuming that the light velocity is c and the time difference between the emission of the irradiation light 31 from the light emitting unit 11 and the reception of the reflected light 32 by the light receiving unit 12 is t, the distance L to the object 3 can be determined by L ═ c × t/2. In the practical distance measurement by the distance calculating unit 14, an irradiation pulse of a predetermined width is emitted instead of the time difference t, and for this purpose, the exposure shutter of the two-dimensional sensor 12a is subjected to light reception with a timing shifted, and the distance L is calculated from the value of the amount of light received (accumulated amount) at different timings.
Fig. 3 is a diagram illustrating a multipath phenomenon. The irradiation light emitted from the light emitting unit 11 is reflected by the object 3 and returns to the light receiving unit 12, and is normally an optical path shown by a solid line 30, which is the shortest path. The light on this optical path is referred to as "direct light". However, in an environment where a wall or floor 4 made of a material having a high reflectance is present, a part of the irradiation light is reflected by the wall or floor 4 and returns to the light receiving unit 12 through an optical path indicated by a broken line 40. This phenomenon is referred to as "multipath phenomenon", and light on this optical path is referred to as "indirect light". That is, since the optical path between the light emitting unit 11 and the object 3 or between the object 3 and the light receiving unit 12 is not a straight line, but a broken line, the optical path 40 of indirect light has a longer optical path length than the optical path 30 of direct light. The light receiving unit 12 receives direct light and indirect light in a mixed manner, and therefore, this is a cause of an error in the measured distance in the TOF apparatus.
When the multipath phenomenon occurs, the number of paths of indirect light is often not only 1 but also a plurality, and the intensity ratio of indirect light to direct light is also various. In the case of the exposure shutter method, since the light receiving unit 12 receives direct light and a plurality of indirect light beams having a time delay therebetween, the amount of light received detected in a predetermined shutter period deviates from the original amount of light received (there is no multipath), and thus a distance error is expressed in the distance calculation.
Fig. 4 is a diagram showing an example of a distance error occurring in the multipath phenomenon. Fig. 4 (a) compares the measured distance values obtained by the TOF device with each other as to whether or not multipath occurs. The horizontal axis represents the actual distance L0 from the TOF apparatus to the object, and the vertical axis represents the measurement value of the TOF apparatus, indicating the case where there is a multipath (L2) and the case where there is no multipath (L1). The measured value L1 when there is no multipath is equal to the actual distance L0 to the object, but the measured value L2 when there is a multipath is a value greater than the actual distance L0.
Fig. 4 (b) shows errors of the measured values caused by the multipath phenomenon in the vertical axis. It is found that the distance error (L2-L1) due to multipath is not fixed, but changes according to the actual distance L0 from the TOF apparatus to the object. This means that the influence of the measurement environment (the degree of indirect light reflected on the floor or wall) varies depending on the position of the object.
Fig. 5 is a diagram illustrating the influence of the distance error on the dynamic line measurement. It is assumed that a plurality of TOF apparatuses are provided to determine a moving path of an object (person) in a room. For example, in an environment where marble having a high reflectance is used for a peripheral wall or floor such as an elevator hall, the occurrence of a motion line due to a multipath phenomenon is a problem of twofold.
Fig. 5 (a) is a diagram for explaining a method of measuring a moving line. Here, 2 TOF apparatuses 1a and 1b are provided to measure the motion line of the person 3. Assuming that the set positions of the TOF device 1a are (Xa, Ya) and the set positions of the TOF device 1b are (Xb, Yb), measured values La, Lb of the distance to the person 3 are obtained with the respective devices. Thereby, the position coordinates of the person 3 are calculated (X3, Y3).
Fig. 5 (b) and 5 (c) convert the position of the person 3 into a plan view based on the measured distance. Fig. 5 (b) shows a case where no multipath exists, and fig. 5 (c) shows a case where a multipath exists.
In the case where there is no multipath in fig. 5 (b), the position of the person 3 calculated from the measurement value La of the TOF apparatus 1a matches the position of the person 3 calculated from the measurement value Lb of the TOF apparatus 1b, and the position coordinates (X3, Y3) are uniquely determined.
However, in the case of the multipath in fig. 5 (c), the measurement value La 'of the TOF apparatus 1a and the measurement value Lb' of the TOF apparatus 1b include an error, and are measured to be longer than the actual distance. That is, the position coordinates (X3a, Y3a) of the person 3 calculated by the TOF device 1a do not match the position coordinates (X3b, Y3b) of the person 3 calculated by the TOF device 1 b. As a result, the same person is captured as the coordinates of different persons 3a and 3b, and thus the action line is split into two. Alternatively, the coordinates of the joint between the TOF apparatuses 1a and 1b are not continuous, and the motion line is interrupted.
In order to cope with such a multipath phenomenon, in the present embodiment, the TOF apparatus is set in an environment to be measured, and an object (sample) is placed at a predetermined distance in advance to measure the distance to the object. Next, when the measured distance is longer than the actual distance (true value), a correction formula for correcting the distance error is generated in accordance with the generated distance error. The operation up to this point is referred to as a "preparation step". When the distance is actually measured by the TOF apparatus, the distance measurement value is corrected by a correction formula, thereby reducing an error due to multipath. This operation is referred to as "actual measurement step".
Fig. 6 is a diagram illustrating a method of measuring a distance error in the preparation step. First, the TOF apparatus 1 is set in an actual usage environment. In this example, the TOF apparatus 1 is mounted on a ceiling. The object to be measured (sample) used in the preparation step is preferably similar to the object to be measured in the actual measurement step in reflection characteristics, and a person 3' is used here. The person 3 'as a sample stands at a distance L1 from the TOF apparatus, and the distance to the person 3' is measured by the TOF apparatus 1 to obtain a measured value L2.
Specifically, the position of the person 3' as a sample is set to be 1m apart in a section having a distance L1 of 2 to 8m, for example, from the TOF apparatus 1. In addition, by checking the setting of the distance L1 using a laser distance meter or the like, it is possible to provide an accurate distance L1 obtained only by direct light (solid line) without being affected by multipath. On the other hand, the distance L2 is a measurement value including indirect light (broken line) affected by multipath.
In this way, for each position of the person 3 '(distance L1), the TOF apparatus 1 acquires the measured value L2 of the distance to the person 3', and then performs calculation of the distance error and generation of the correction equation based on these data. The correction formula can be generated using the external processing device (personal computer) 2.
Fig. 7 is a diagram illustrating an example of generating a correction formula for a distance error. As an approximation method for correction, fig. 7 (a) shows linear approximation using a primary expression, and fig. 7 (b) shows nonlinear approximation using a secondary expression. These values are plotted by taking the distance set value L1 of the person 3' illustrated in fig. 6 as the vertical axis (y-axis) and the corresponding distance measurement value L2 obtained by the TOF apparatus 1 as the horizontal axis (x-axis). In the figure, the measurement points are indicated by ● and the solid lines connecting them. An approximate expression representing the relationship between the L2 value and the L1 value is obtained by a least square method or the like, and a correction expression of the distance error shown by a broken line is obtained. In the correction formula, L2 is used as variable x, and L1 is used as variable y.
Fig. 7 (a) shows a case where linear approximation is performed by a linear expression, and fig. 7 (b) shows a case where nonlinear approximation is performed by a quadratic expression, and shows examples of the respective approximate correction expressions. Of course, the distance error can be further reduced by using the quadratic expression in fig. 7 (b) as the correction expression. The approximate expression is not limited to these, and may be a higher-order polynomial or an expression in which a function is embedded.
The correction expressions generated here or the coefficients of these correction expressions are stored as correction expressions 16 in the TOF apparatus 1 of fig. 1. Then, the distance correction unit 15 corrects the distance measurement value calculated by the distance calculation unit 14 by using the correction formula 16.
According to the correction method, the correction process of the distance error caused by the multipath phenomenon can be more easily performed, and the correction process can be performed by an appropriate correction coefficient according to the magnitude of the measured distance.
It is expected that the multipath phenomenon is influenced to a different degree not only by the distance from the object (person) but also by the direction (azimuth angle) of the object as viewed from the TOF apparatus. Therefore, the measurement of the distance error in fig. 6 and the correction formula generation in fig. 7 are preferably performed by changing the azimuth angles of the plurality of types of objects viewed from the TOF apparatus, and correction formulas for the respective azimuth angles are generated. Then, the distance correction unit 15 performs correction using the corresponding correction formula not only based on the distance measurement value with respect to the object but also based on which azimuth angle the object is present, thereby further reducing the distance error.
Fig. 8 is a flowchart showing a flow of distance correction in the present embodiment. The distance correction of the present embodiment includes a preparation step and a measurement step.
S101: the TOF apparatus 1 is set up in the measurement site. S102 to S105 below are preparation steps.
S102: a sample of the measurement target object (e.g., the human figure 3') is arranged at a predetermined distance L1 (referred to as a set value) from the TOF apparatus 1. For confirmation of the set value L1, a laser distance meter or the like is used. A plurality of values are predetermined for the set value L1 and are sequentially executed.
S103: the distance from the measurement sample configured as the set value L1 was measured with the TOF apparatus 1, and the obtained measurement value was taken as L2. Returning to S102, the set value L1 is changed, and the process is repeated until all the set values determined in advance are completed.
S104: the measurement error at each distance is counted based on the relationship between the set value L1 of the measurement sample and the measured value L2 of the TOF apparatus 1.
S105: a correction expression for the distance error, that is, a correction expression 16 for converting the measured value L2 to the set value L1 is generated and stored in the memory of the distance correction unit 15. Thus, the preparation step is completed, and the process proceeds to the actual measurement step from S106.
S106: the distance to the object is actually measured by the TOF apparatus 1 as an actual measurement value x. For example, if the line measurement is performed, the distance to the person at each time is measured.
S107: the distance correction unit 15 corrects the actual measurement value x in S106 using the correction formula 16, and calculates a correction value y. Then, returning to S106, the process is repeated until a series of measurements are completed.
S108: and outputting the corrected distance data y. For example, a trajectory of a line of action of a person captured by the TOF apparatus 1 is output.
Although the above description has been made for 1 TOF apparatus, when a plurality of TOF apparatuses are provided, the TOF apparatuses are implemented separately.
In the above-described flow, the preparation steps of S102 to S105 have been described as operations performed by the user, but the operations may be automated. For example, the set value L1 and the measured value L2 at each position can be automatically acquired while moving the object sample (moving object), and the coefficient of the approximate expression for correction can be automatically calculated from the relationship between the acquired set value L1 and the measured value L2.
According to embodiment 1, a distance error caused by the influence of multipath in an environment in which a TOF apparatus is installed is determined in advance in a preparation step, and a correction formula for correcting the distance error is generated. Therefore, the processing load of the TOF apparatus for distance correction can be significantly reduced in the actual measurement step. The correction formula used in this case is generated in accordance with the actual measurement environment, and therefore, for example, correction can be appropriately performed in accordance with the size of the measurement distance, and as a result, a distance measuring apparatus with high measurement accuracy can be provided.
[ example 2 ]
In embodiment 1, the distance correction unit 15 for correcting the distance data is configured inside the distance measuring device (TOF device) 1, and in embodiment 2, the distance data is corrected by an external processing device.
Fig. 9 is a diagram showing a configuration of a distance measuring system according to embodiment 2. The distance measuring system is composed of a distance measuring device (TOF device) 1 'and an external processing device 2'. The TOF apparatus 1 'includes a light emitting unit 11, a light receiving unit 12, a light emission control unit 13, and a distance calculation unit 14, as in embodiment 1 (fig. 1), but the distance correction unit 15 and the correction equation 16 are configured to move to the external processing apparatus 2'. That is, the distance calculation unit 14 of the TOF apparatus 1 ' outputs the distance data before correction to the external processing apparatus 2 ', and the distance correction unit 15 of the external processing apparatus 2 ' corrects the distance data by using the correction equation 16. The modified expression 16 is generated in the same manner as in example 1.
According to the configuration of embodiment 2, as in embodiment 1, a distance measuring system capable of significantly reducing the processing load for distance correction and appropriately performing correction according to the magnitude of the measured distance can be provided. In addition, according to embodiment 2, the TOF apparatus 1 'can be further reduced in size and simplified, and it is suitable for a case where a plurality of TOF apparatuses 1' are used. On the other hand, the external processing device 2 'is connected to the plurality of TOF devices 1', and thus, it is possible to more efficiently perform processing such as line of sight measurement using a plurality of distance data.