Distance measuring device and distance measuring method
The device corrects distance measurement errors caused by saturated sensor values using section-based averaging, ensuring accurate distance measurement with retroreflective materials by dividing the image into sections and applying neighboring pixel averages.
Patent Information
- Application Number
- PCT/JP2024/044637
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-03-21
- Filing Date
- 2024-12-17
- Publication Date
- 2025-09-25
AI Technical Summary
Distance measuring devices fail to accurately measure distances when the sensor value of a pixel detecting reflected light becomes saturated due to the use of retroreflective materials, leading to measurement failures or errors.
A distance measuring device and method that divides the distance measurement image into sections, assigning the average value of neighboring pixels to saturated pixels to correct the measurement image, using a TOF camera with a light emitting unit, sensor, distance conversion, and distance correction unit to handle saturated sensor values.
Enables accurate distance measurement even when sensor values are saturated, ensuring reliable data capture in the presence of retroreflective materials by correcting the measurement image through averaging neighboring pixel values.
Smart Images

Figure JP2024044637_25092025_PF_FP_ABST
Abstract
Description
Distance measuring device and distance measuring method
[0001] The present disclosure relates to a distance measuring device and a distance measuring method.
[0002] For example, in various fields such as object detection in automobiles, self-driving robots using SLAM (Simultaneous Localization and Mapping) technology, and conveyors used in factories, distance measuring devices are used that irradiate an object with light, receive the light reflected by the object, and measure the distance from the position where the light is irradiated to the object (see Patent Document 1 or 2).
[0003] JP 2008-275331 A JP 2019-66185 A
[0004] In some distance measuring devices, the amount of light to be irradiated is set so that the sensor value of the sensor that detects reflected light when irradiating a white board with a reflectance of 94% (known as a white chart) with white paint is not saturated, allowing for distance measurement. The sensor value is the electrical signal level obtained by photoelectric conversion of the light detected by the sensor. In such distance measuring devices, if the object being measured for distance measurement contains a reflector (hereinafter referred to as a retroreflector) that uses retroreflection technology to reflect light incident from a light source back toward the light source, the incident light is reflected with a higher intensity than if it were reflected by a white chart. Therefore, the sensor value of the sensor that detects reflected light is saturated, resulting in distance measurement failure or erroneous distance measurement.
[0005] There is a need for a distance measuring device and a distance measuring method that can obtain distance measurement values at saturated pixels even when the sensor value of a pixel in a sensor that detects reflected light is saturated.
[0006] A first aspect of one or more embodiments provides a distance measurement device comprising: a light emitting unit that irradiates light onto an object to be measured; a sensor that detects reflected light from the object, generates one or more frames consisting of a plurality of pixels arranged horizontally and vertically, and generates a sensor value according to the distance to the object corresponding to each pixel in each frame; a distance conversion unit that converts the sensor value corresponding to each pixel in each frame into a distance and generates a distance measurement image consisting of distance measurement values corresponding to each pixel in each frame; and a distance correction unit that divides the distance measurement image of each frame into a plurality of sections, and when there is a pixel in any section for which a distance measurement value has not been obtained, corrects the distance measurement image by assigning the average value of the distance measurement values of pixels in any section excluding the pixels for which a distance measurement value has not been obtained to the pixel for which a distance measurement value has not been obtained.
[0007] A second aspect of one or more embodiments provides a distance measurement method that irradiates an object to be measured with light emitted from an light emitting unit, detects reflected light reflected by the object, generates one or more frames consisting of a plurality of pixels arranged horizontally and vertically, generates a sensor value corresponding to the distance to the object corresponding to each pixel in each frame, converts the sensor value corresponding to each pixel in each frame into a distance, generates a distance measurement image consisting of distance measurement values corresponding to each pixel in each frame, divides the distance measurement image of each frame into a plurality of sections, and when there is a pixel in any section for which a distance measurement value has not been obtained, corrects the distance measurement image by assigning to the pixel for which a distance measurement value has not been obtained the average value of the distance measurement values of pixels in any section excluding the pixels for which a distance measurement value has not been obtained.
[0008] According to one or more embodiments of the distance measuring device and distance measuring method, even if a pixel whose sensor value is saturated exists in a sensor that detects reflected light, it is possible to obtain a distance measurement value at the saturated pixel.
[0009] FIG. 1 is a block diagram showing a distance measuring device according to a first embodiment. FIG. 2 is a characteristic diagram showing the reflection level of reflected light when near-infrared light is irradiated onto a white chart and the reflection level of reflected light when near-infrared light is irradiated onto a retroreflective material. FIG. 3 is a diagram showing a distance measuring image divided into multiple sections. FIG. 4 is a diagram showing enlarged sections set at the right and bottom ends of a distance measuring image divided into multiple sections. FIG. 5 is a diagram showing an example in which pixels for which distance measurements have not been obtained exist within one section. FIG. 6 is a diagram showing an example of a section selection method for correcting a section for which distance measurements have not been obtained for all pixels. FIG. 7 is a diagram showing an example in which the section selection method for correcting a section for which distance measurements have not been obtained for all pixels is different between the left and right regions of each frame. FIG. 8 is a block diagram showing a distance measuring device according to a second embodiment. FIG. 9 is a diagram conceptually showing a distance measuring image captured by a distance measuring device according to the second embodiment in close-distance mode and the corrected distance measuring image. Fig. 10 is a conceptual diagram showing a distance measurement image obtained by photographing an object in medium distance mode by a distance measuring device according to a second embodiment, and a corrected distance measurement image. Fig. 11 is a conceptual diagram showing a distance measurement image obtained by photographing an object in long distance mode by a distance measuring device according to the second embodiment, and a corrected distance measurement image. Fig. 12 is a block diagram showing a distance measuring device according to a third embodiment. Fig. 13 is a block diagram showing a distance measuring device according to a fourth embodiment.
[0010] Distance measuring devices and distance measuring methods according to first to fourth embodiments will be described below with reference to the accompanying drawings. In the distance measuring devices according to first to fourth embodiments, the same parts are designated by the same reference numerals, and their description may be omitted.
[0011] 1 shows a TOF (Time Of Flight) camera 101, which is a distance measuring device according to the first embodiment. The TOF camera 101 includes a lens 11, a light emitting unit 12, a TOF sensor 13, a distance conversion unit 14, and a distance correction unit 15. The TOF camera 101 captures an image of a subject 20, which includes a retroreflective material 21, as an object to be measured. A distance measurement value utilization device 30 that utilizes distance measurement values generated by the TOF camera 101 is connected to the TOF camera 101.
[0012] For example, the retroreflective material 21 has a honeycomb structure and includes beads or prisms to increase the amount of reflected light. The retroreflective material 21 may be a retroreflective plate such as a road sign, or a guide or warning sign used inside or outside a building. If the subject 20 is a security guard or worker, the retroreflective material 21 may be a retroreflective sheet attached to the uniform worn by the security guard or the work clothes worn by the worker.
[0013] The distance measurement value utilization device 30 may be an object recognition device, or may be a device that estimates the self-position of a moving object using SLAM technology and creates an environmental map. The distance measurement value utilization device 30 may be provided within the TOF camera 101.
[0014] The light-emitting unit 12 is, for example, a vertical cavity surface-emitting laser (VCSEL), and irradiates the subject 20 with near-infrared light having a wavelength of, for example, 940 nm within a predetermined irradiation range. The light-emitting unit 12 has a set amount of emitted near-infrared light so that when the near-infrared light is irradiated onto a white chart with a reflectance of 94%, the TOF sensor 13 can generate a sensor value that can measure distance within an arbitrary distance measurement range without saturating. The sensor value is an electrical signal level obtained by photoelectrically converting light detected by the TOF sensor 13.
[0015] Near-infrared light reflected by the subject 20 is collected by the lens 11 and enters the TOF sensor 13. Here, an indirect sensor is used as the TOF sensor 13. In the indirect distance measurement method, the light emitting unit 12 irradiates the subject 20 with pulsed near-infrared light. The light reflected from the subject 20 is collected by the lens 11 and forms an image on the TOF sensor 13. The TOF sensor 13 detects the reflected light from the subject 20 and obtains an electrical signal level by photoelectrically converting it. The TOF sensor 13 changes the phase of a shutter timing pulse multiple times relative to the timing of generation of the pulsed near-infrared light from the light emitting unit 12. The TOF sensor 13 indirectly calculates the distance to the subject 20 based on the ratio of sensor values obtained at each phase of the shutter timing pulse.
[0016] In this way, the TOF sensor 13 generates a sensor value corresponding to the distance to the subject 20 corresponding to each pixel of each frame. The TOF sensor 13 generates one or more frames each consisting of a plurality of pixels arranged in the horizontal and vertical directions. The TOF sensor 13 generates a sensor value corresponding to the distance to the subject 20 corresponding to each pixel of each frame.
[0017] A direct-type sensor may be used as the TOF sensor 13. The TOF sensor 13 may generate a sensor value corresponding to each pixel of each frame, which directly or indirectly indicates the time from when the light-emitting unit 12 emits near-infrared light to when it receives the reflected light.
[0018] The distance conversion unit 14 converts the sensor values corresponding to each pixel in each frame into distances, and generates a distance image (depth image) made up of distance values corresponding to each pixel in each frame. The distance image is a moving image or a still image. In the case of a moving image, the distance conversion unit 14 generates, for example, 30 distance images per second. Since the method of converting sensor values into distance values is well known, a detailed description thereof will be omitted.
[0019] 2 shows the reflection level of the reflected light when near-infrared light is irradiated onto a white chart and the reflection level of the reflected light when near-infrared light is irradiated onto a retroreflective material 21. In FIG. 2, in order to grasp the reflection level, the sensor value obtained by receiving the reflected light with the TOF sensor 13 is shown as a code value representing the reflection level. The reflection level when near-infrared light is irradiated onto a white chart attenuates as the distance from the TOF camera 101 to the white chart increases. The reflection level when near-infrared light is irradiated onto the retroreflective material 21 is significantly higher than the reflection level from the white chart and varies greatly depending on the distance. Moreover, the reflection level becomes too high at distances greater than a certain distance, saturating and reaching a constant value at the saturation level.
[0020] If the light intensity of the near-infrared light irradiated by the light-emitting unit 12 onto the subject 20 is reduced so as to prevent the reflection level from becoming saturated, the reflection level of the light reflected from a normal subject without the retroreflective material 21 will be reduced, making it impossible to measure the distance or reducing the accuracy of the distance measurement. Therefore, it is not possible to reduce the light intensity of the near-infrared light irradiated by the light-emitting unit 12 onto the subject 20.
[0021] The TOF sensor 13 is configured to output a sensor value of 0 when the reflection level is saturated. Therefore, the distance conversion unit 14 cannot calculate the distance measurement value of a pixel whose reflection level is saturated. Even if the TOF sensor 13 is not configured to output a sensor value of 0 when the reflection level is saturated and instead outputs the saturated value as the sensor value, the distance conversion unit 14 cannot correctly calculate the distance measurement value of a pixel whose reflection level is saturated.
[0022] Therefore, the distance correction unit 15 corrects the distance measurement image output from the distance conversion unit 14 as follows: The distance conversion unit 14 supplies the distance correction unit 15 with a distance measurement image of each frame, for example, 640 pixels horizontally and 480 pixels vertically.
[0023] 3, the distance correction unit 15 divides the ranging image of each frame into multiple sections S. As an example, each section S has 28 pixels in the horizontal and vertical directions, but the number of pixels in the horizontal and vertical directions may be different, such as 24 pixels in the horizontal direction and 32 pixels in the vertical direction.
[0024] When the ranging image of each frame, which is 640 pixels horizontally and 480 pixels vertically, is divided into sections S of 28 pixels horizontally and vertically, a first fractional region of less than 28 pixels horizontally occurs, and a second fractional region of less than 28 pixels vertically occurs. In such a case, as shown in Figure 4, the distance correction unit 15 sets an enlarged section S1 of 52 pixels horizontally and 28 pixels vertically at the right end of each frame by combining the first fractional region generated at the right end with the section S adjacent to it on its left, excluding the enlarged section S3 at the lower right corner.
[0025] The distance correction unit 15 also sets an enlarged section S2 of 28 pixels horizontally and 32 pixels vertically at the bottom of each frame, for example, by combining the second fractional area occurring at the bottom, excluding the enlarged section S3, with the section S adjacent thereto above. The distance correction unit 15 sets an enlarged section S3 of 52 pixels horizontally and 32 pixels vertically at the bottom right corner.
[0026] In this way, the distance correction unit 15 divides each frame into sections S each having a pixel count of (x × y), where x and y are integers equal to or greater than 2, and the number of pixels in the horizontal direction is x and the number of pixels in the vertical direction is y. When a first fractional area having a pixel count less than x occurs in the horizontal direction of each frame, the distance correction unit 15 may set horizontally expanded sections S1 and S3 by merging the first fractional area with the section S having a pixel count of (x × y) that is adjacent to the left or right of the first fractional area.
[0027] When a second fractional area having a pixel count of less than y occurs in the vertical direction of each frame, the distance correction unit 15 may set vertically enlarged sections S2 and S3 by merging the second fractional area with a section S having a pixel count of (x × y) adjacent to the upper or lower side of the second fractional area.
[0028] In section S shown in FIG. 5 , the six pixels shaded in black are pixels for which the sensor value output by the TOF sensor 13 is 0 and for which no distance measurement value has been obtained. The distance correction unit 15 calculates the average value of the distance measurement values of the pixels in section S excluding the pixels for which no distance measurement value has been obtained. The distance correction unit 15 assigns the average value to the six black pixels for which no distance measurement value has been obtained. This results in a state in which distance measurement values are associated with all pixels in section S. If any of the six black pixels contains an invalid value that does not indicate a correct distance measurement value, the distance correction unit 15 simply replaces the invalid value with the average value. Assigning the average value includes replacing the invalid value with the average value.
[0029] 6, the blacked-out sections Sb are sections S in which the sensor value output from the TOF sensor 13 is 0 for all pixels within the sections S and no distance measurement values are obtained. The distance correction unit 15 assigns to each pixel of the sections Sb in which no distance measurement values are obtained for all pixels the average value of the distance measurement values obtained in the adjacent section Sa located above (directly above) the section Sb.
[0030] If there are no pixels in the section Sa for which no distance measurement values have been obtained, the average distance measurement values obtained in the section Sa is the average distance measurement values of all pixels in the section Sa. As in Figure 5, if there are pixels in the section Sa for which no distance measurement values have been obtained, the average distance measurement values obtained in the section Sa is the average distance measurement values of the pixels excluding the pixels for which no distance measurement values have been obtained in the section Sa.
[0031] The distance correction unit 15 may assign to each pixel of the section Sb the average value of the distance measurements obtained in the section Sc adjacent to the left of the section Sb or the section Sd adjacent to the right of the section Sb, regardless of whether there is an adjacent section Sa above. If there is no adjacent section Sa above, the distance correction unit 15 assigns to each pixel of the section Sb the average value of the distance measurements obtained in the section Sc or Sd.
[0032] As shown in Figure 7, the distance correction unit 15 may use different methods for selecting sections S to correct sections S in which distance measurements have not been obtained for all pixels in the left and right regions of each frame.
[0033] In Figure 7, the blacked-out sections Sf and Si are sections S in which the sensor value output by the TOF sensor 13 is 0 for all pixels within the section S, and no distance measurement value is obtained. If the 640 horizontal pixels of each frame are divided into sections S of 28 pixels each in the horizontal and vertical directions, 22 sections S (including the expanded section S1) are set in the horizontal direction. If 11 sections S are assigned to the left side of each frame in the horizontal direction, the left side of each frame becomes an area of 308 horizontal pixels, as shown in Figure 7. The right side of each frame becomes an area of 332 horizontal pixels consisting of the remaining 11 sections S.
[0034] 7, in the horizontal 308-pixel region on the left side of each frame, distance correction unit 15 assigns to each pixel of a section Sf for which no distance measurement values have been obtained for all pixels the average value of the distance measurement values obtained for the section Sg adjacent to the right of the section Sf. The same applies when there is another section S for which no distance measurement values have been obtained for all pixels in the horizontal 308-pixel region on the left side.
[0035] In the horizontal 332-pixel region on the right side of each frame, the distance correction unit 15 assigns to each pixel of a section Si in which no distance measurement values have been obtained for all pixels the average value of the distance measurement values obtained in the section Sh adjacent to the left of the section Si. The same applies when there is another section S in which no distance measurement values have been obtained for all pixels in the horizontal 332-pixel region on the right side.
[0036] In this way, distance correction unit 15 divides the distance measurement image of each frame into multiple sections S. As shown in Fig. 5, there may be pixels in any of the sections S in each frame for which no distance measurement value has been obtained. Distance correction unit 15 corrects the distance measurement image by assigning to the pixels for which no distance measurement value has been obtained the average value of the distance measurement values of the pixels in that section S excluding the pixels for which no distance measurement value has been obtained.
[0037] 6 or 7, each frame may contain a section S in which distance measurement values have not been obtained for all pixels within the section S. The distance correction unit 15 corrects the distance measurement image by assigning to all pixels in the section S in which distance measurement values have not been obtained the average value of the distance measurement values of the pixels in the section S adjacent to the upper, left, or right side of the section S.
[0038] In each frame, the distance correction unit 15 calculates the average value of the distance measurement values for each section S in the top horizontal row of sections S, in the order from the leftmost section S to the rightmost section S. After the average value of the distance measurement values for all sections S in the top row has been calculated, the distance correction unit 15 assigns the average value to pixels in the section S for which no distance measurement value has been obtained or to all pixels in the section S for which no distance measurement value has been obtained, in the order from the leftmost section S to the rightmost section S, as necessary.
[0039] In parallel with the correction for the top row of sections S, distance correction unit 15 calculates the average value of the distance measurement values for each section S in the second horizontal row of sections S, in the order from the leftmost section S to the rightmost section S. After the average value of the distance measurement values for all sections S in the second row has been calculated, distance correction unit 15 assigns the average value to pixels in sections S for which no distance measurement values have been obtained or to all pixels in sections S for which no distance measurement values have been obtained, in the order from the leftmost section S to the rightmost section S, as necessary.
[0040] In parallel with the correction for the section S in the second row, distance correction unit 15 calculates the average value of the distance measurement values for each section S in the third row of horizontal sections S, starting from the leftmost section S to the rightmost section S. Thereafter, distance correction unit 15 repeats the same operation up to the lowest horizontal section S.
[0041] The example described above is an example in which the section S in each row is processed from the top to the bottom of each frame. In this example, the distance correction unit 15 corrects the distance measurement image by assigning the average value of the distance measurement values of the pixels in the section S adjacent to the upper, left, or right of the section S in which distance measurement values have not been obtained for all pixels. As another example, the section S in each row may be processed from the bottom to the top of each frame. In this case, the distance correction unit 15 corrects the distance measurement image by assigning the average value of the distance measurement values of the pixels in the section S adjacent to the lower, left, or right of the section S in which distance measurement values have not been obtained for all pixels. In this way, the distance correction unit 15 corrects the distance measurement image by assigning the average value of the distance measurement values of the pixels in the section S adjacent to the upper, lower, left, or right of the section S in which distance measurement values have not been obtained for all pixels.
[0042] According to the TOF camera 101 and the ranging method executed by the TOF camera 101 described above, even if there are pixels in which the sensor value of the TOF sensor 13 that detects reflected light is saturated due to the presence of retroreflective material 21 in the subject 20, it is possible to obtain ranging values for the saturated pixels. According to the TOF camera 101 and the ranging method executed by the TOF camera 101, it is possible to correct the ranging image in either a state in which ranging values are not obtained for some pixels in the section S or a state in which ranging values are not obtained for all pixels in the section S.
[0043] 8 shows a TOF camera 102, which is a distance measuring device according to a second embodiment. In addition to the configuration of the TOF camera 101, the TOF camera 102 includes a mode selection unit 16 and a mode control unit 17. As with the TOF camera 101, the distance correction unit 15 divides the distance measurement image of each frame into multiple sections S in order to correct pixels for which no distance measurement values have been obtained. The method of correcting the distance measurement image in the distance correction unit 15 is the same as that in the TOF camera 101.
[0044] The mode selection unit 16 selects a mode according to the distance from the light-emitting unit 12 to the subject 20 in accordance with a user operation. The mode selection unit 16 may be a menu for selecting a mode, or may be a button for selecting a mode. The modes according to distance include, for example, three modes: a close-distance mode of 30 cm or more and less than 1.5 m, a medium-distance mode of 1.5 m or more and less than 3 m, and a long-distance mode of 3 m or more and less than 8 m.
[0045] The mode control unit 17 controls the distance correction unit 15 to change the size of the section S according to the mode selected by the mode selection unit 16. The mode control unit 17 controls the light emission unit 12 to change the amount of near-infrared light emitted from the light emission unit 12 according to the mode selected by the mode selection unit 16. The mode control unit 17 may increase the amount of near-infrared light in the order of short distance mode, medium distance mode, and long distance mode. The mode control unit 17 may change the shutter timing of the TOF sensor 13 according to the mode selected by the mode selection unit 16.
[0046] 9A conceptually illustrates a distance measurement image captured by the TOF camera 102 in close-distance mode of the subject 20. A large retroreflective material 21 is present within the frame. When the mode selection unit 16 is set to close-distance mode, the mode control unit 17 sets the amount of near-infrared light to a relatively small amount so that the sensor value does not saturate even if, for example, a white chart with a reflectance of 94% is positioned within the close-distance measurement range of the subject 20. As a result, the near-infrared light is reflected with high intensity only from a small portion of the retroreflective material 21, and only a small number of pixels saturate the sensor value of the TOF sensor 13. Therefore, the small area in the frame where no distance measurement value is obtained due to sensor value saturation is indicated by the blacked-out area.
[0047] In the close-distance mode, it is preferable to reduce the size of the section S. As an example, the mode control unit 17 controls the distance correction unit 15 to set the section S to 20 pixels in the horizontal and vertical directions. By the mode control unit 17 controlling the distance correction unit 15 to set the section S to a small size in the close-distance mode, the distance measurement image is corrected so that there are no areas for which distance measurement values are not obtained, as shown in (b) of Figure 9.
[0048] 10, (a) conceptually shows a distance measurement image captured by the TOF camera 102 in medium distance mode of the subject 20. In the medium distance mode, the mode control unit 17 sets the amount of near-infrared light to a level greater than that in the short distance mode so that the near-infrared light irradiated on the subject 20 does not become weaker due to the longer distance measurement range compared to the short distance mode. As the distance from the TOF camera 102 to the subject 20 increases, the retroreflective material 21 is captured small within the frame. Because the near-infrared light is reflected with high intensity by the entire retroreflective material 21, the sensor value becomes saturated, and therefore no distance measurement value is obtained for the entire retroreflective material 21, as if the entire retroreflective material 21 is painted black.
[0049] In the medium distance mode, it is preferable to make the section S larger than the section S in the short distance mode. As an example, the mode control unit 17 controls the distance correction unit 15 to set the section S to 28 pixels in the horizontal and vertical directions. By the mode control unit 17 controlling the distance correction unit 15 to set the section S in the medium distance mode to be larger than the section S in the short distance mode, the distance measurement image is corrected so that there are no areas of the entire retroreflective material 21 for which distance measurement values have not been obtained, as shown in (b) of Figure 10.
[0050] 11A conceptually shows a distance measurement image of the subject 20 captured by the TOF camera 102 in long-distance mode. The mode control unit 17 sets the amount of near-infrared light in long-distance mode to a greater amount than in medium-distance mode. As the distance from the TOF camera 102 to the subject 20 becomes longer, the retroreflective material 21 is captured even smaller within the frame. Because the sensor value saturates due to the high intensity of near-infrared light reflected from the entire retroreflective material 21, no distance measurement value is obtained over the entire retroreflective material 21, as if the entire retroreflective material 21 is painted black. The area where no distance measurement value is obtained is smaller than that in medium-distance mode.
[0051] In the long distance mode, it is preferable to make the section S smaller than the section S in the medium distance mode. As an example, the mode control unit 17 controls the distance correction unit 15 to set the section S to 18 pixels in the horizontal and vertical directions. By the mode control unit 17 controlling the distance correction unit 15 to set the section S in the long distance mode smaller than the section S in the medium distance mode, the distance measurement image is corrected so that there are no areas of the entire retroreflective material 21 for which distance measurement values have not been obtained, as shown in (b) of Figure 11.
[0052] In the TOF camera 102, the mode selection unit 16 may switch the mode between short-distance mode, medium-distance mode, and long-distance mode for each frame, and the mode control unit 17 may control the distance correction unit 15 to set the size of the section S according to the short-distance mode, medium-distance mode, or long-distance mode for each frame.
[0053] According to the TOF camera 102 and the ranging method executed by the TOF camera 102 described above, in addition to the effects achieved by the first embodiment, ranging images can be accurately corrected in accordance with each of the short-distance mode, medium-distance mode, and long-distance mode.
[0054] 12 shows a TOF camera 103, which is a distance measuring device according to a third embodiment. The TOF camera 103 has an interchangeable lens 311 that is detachable via a lens mount 312, instead of the lens 11 in the TOF camera 101. The TOF camera 103 also has a focal length selection unit 18 in addition to the configuration of the TOF camera 101. The lens mount 312 may be, for example, a C-mount, which conforms to a lens mount standard.
[0055] Similar to the TOF camera 101, the distance correction unit 15 divides the distance measurement image of each frame into multiple sections S in order to correct pixels for which no distance measurement values have been obtained. The method of correcting the distance measurement image in the distance correction unit 15 is similar to that in the TOF camera 101.
[0056] When the user changes the interchangeable lens 311, the user selects the focal length of the interchangeable lens 311 attached to the lens mount 312 using the focal length selection unit 18. As an example, assume that the focal length of the first interchangeable lens 311 is 14 mm and the focal length of the second interchangeable lens 311 is 280 mm. When the second interchangeable lens 311 is attached to the lens mount 312, the size of the subject 20 to be photographed is twice as large as when the first interchangeable lens 311 is attached to the lens mount 312.
[0057] Therefore, the distance correction unit 15 changes the size of the section S depending on the focal length of the interchangeable lens 311 being used. For example, suppose that the distance correction unit 15 sets the section S to 20 pixels in the horizontal and vertical directions when using a first interchangeable lens 311 with a focal length of 14 mm. In this case, the distance correction unit 15 may set the section S to 40 pixels in the horizontal and vertical directions when using a second interchangeable lens 311 with a focal length of 28 mm.
[0058] An electronic contact may be provided on the lens mount 312, and the distance correction unit 15 may be configured to automatically obtain the focal length of the interchangeable lens 311 from the electronic contact. In this case, the focal length selection unit 18 may be omitted. The electronic contact transmits the focal length of the interchangeable lens 311 to the distance correction unit 15. The distance correction unit 15 may change the size of the section S in accordance with the received focal length of the interchangeable lens 311.
[0059] According to the TOF camera 103 and the distance measurement method executed by the TOF camera 103, in addition to the effects achieved by the first embodiment, it is possible to accurately correct the distance measurement image in accordance with the focal length of each interchangeable lens 311.
[0060] The second and third embodiments may be combined. In this case, the distance correction unit 15 determines the size of the section S corresponding to each of the close-distance mode, the medium-distance mode, and the long-distance mode, and also determines the size of the section S corresponding to the focal length of each interchangeable lens 311.
[0061] 13 shows a TOF camera 104, which is a distance measuring device according to a fourth embodiment. The TOF camera 104 includes a zoom lens 411 attached by a lens mount 412, instead of the lens 11 in the TOF camera 101. The lens mount 412 may be, for example, a C-mount. The lens mount 412 includes an electronic contact 413. The electronic contact 413 transmits the focal length of the zoom lens 411 to the distance correction unit 15.
[0062] As an example, let us say that the focal length of the zoom lens 411 at the wide end is 14 mm, and the zoom lens 411 is zoomed to a focal length of 28 mm. At this time, the size of the subject 20 being photographed will be twice as large as when the zoom lens 411 is at the wide end.
[0063] Therefore, the distance correction unit 15 changes the size of the section S according to the received focal length of the zoom lens 411. For example, assume that the distance correction unit 15 sets the section S to 20 pixels in the horizontal and vertical directions when the zoom lens 411 is at the wide end. When the focal length of the zoom lens 411 becomes 28 mm, the distance correction unit 15 sets the section S to 40 pixels in the horizontal and vertical directions.
[0064] It is not essential to provide an electronic contact 413 that transmits the focal length of the zoom lens 411 to the distance correction unit 15 and change the size of the section S according to the focal length of the zoom lens 411 received by the distance correction unit 15 from the electronic contact 413. The distance correction unit 15 may change the size of the section S according to the focal length of the zoom lens 411. It is preferable to provide an electronic contact 413 that transmits the focal length of the zoom lens 411 to the distance correction unit 15 and change the size of the section S according to the focal length of the zoom lens 411 received by the distance correction unit 15.
[0065] According to the TOF camera 104 and the ranging method executed by the TOF camera 104, in addition to the effects achieved by the first embodiment, even if the focal length is changed by the zoom lens 411, the ranging image can be accurately corrected in accordance with the focal length.
[0066] The second embodiment and the fourth embodiment may be combined. In this case, the distance correction unit 15 determines the size of the section S corresponding to each of the close distance mode, the medium distance mode, and the long distance mode, and also determines the size of the section S corresponding to the focal length of the zoom lens 411.
[0067] The present invention is not limited to the first to fourth embodiments described above, and various modifications are possible within the scope of the gist of the present invention.
[0068] This application claims priority based on Japanese Patent Application No. 2024-044613 filed with the Japan Patent Office on March 21, 2024, and Japanese Patent Application No. 2024-044616 filed with the Japan Patent Office on March 21, 2024, the entire disclosures of which are incorporated herein by reference.
Claims
1. A distance measuring device comprising: a light emitting unit that irradiates light onto an object to be measured; a sensor that detects the light reflected from the object, generates one or more frames consisting of a plurality of pixels arranged horizontally and vertically, and generates a sensor value according to the distance to the object corresponding to each pixel in each frame; a distance conversion unit that converts the sensor value corresponding to each pixel in each frame into a distance and generates a distance measurement image consisting of distance measurement values corresponding to each pixel in each frame; and a distance correction unit that divides the distance measurement image of each frame into a plurality of sections, and when there is a pixel in any section for which a distance measurement value has not been obtained, corrects the distance measurement image by assigning to the pixel for which a distance measurement value has not been obtained the average value of the distance measurement values of pixels in any section excluding the pixels for which a distance measurement value has not been obtained.
2. The distance measurement device of claim 1, wherein when there is a section in which distance measurement values have not been obtained for all pixels within the section, the distance correction unit corrects the distance measurement image by assigning to all pixels of the section in which distance measurement values have not been obtained for all pixels the average value of distance measurement values of pixels in sections adjacent to the section above, below, to the left, or to the right of the section in which distance measurement values have not been obtained for all pixels.
3. A distance measuring device as described in claim 1 or 2, wherein x and y are integers of 2 or greater, each frame is divided into sections having a pixel count of (x x y), where x is the number of pixels in the horizontal direction and y is the number of pixels in the vertical direction, and when a first fractional area having a pixel count of less than x occurs in the horizontal direction of each frame, a horizontally expanded section is set by combining the first fractional area with the section having a pixel count of (x x y) adjacent to the left or right of the first fractional area.
4. A ranging device as described in claim 3, wherein when a second fractional area having a pixel count of less than y occurs in the vertical direction of each frame, a vertically expanded section is set by merging the second fractional area with a section having a pixel count of (x x y) adjacent to the upper or lower side of the second fractional area.
5. The distance measuring device of claim 1, further comprising: a mode selection unit that selects a mode according to the distance from the light emitting unit to the object; and a mode control unit that controls the distance correction unit to change the size of the section according to the mode selected by the mode selection unit.
6. The distance measuring device of claim 1, further comprising: an interchangeable lens that focuses the reflected light onto the sensor; and a focal length selection unit that controls the distance correction unit to change the size of the section depending on the focal length of the interchangeable lens used.
7. The distance measuring device according to claim 1, further comprising a zoom lens that focuses the reflected light onto the sensor, wherein the distance correction unit changes the size of the section in accordance with the focal length of the zoom lens.
8. A distance measuring device as described in claim 7, further comprising an electronic contact provided on a lens mount for attaching and detaching the zoom lens, wherein the electronic contact transmits the focal length of the zoom lens to the distance correction unit, and the distance correction unit changes the size of the section in accordance with the focal length of the zoom lens received from the electronic contact.
9. A distance measurement method comprising: irradiating an object to be measured with light emitted from a light emitting unit; detecting the light reflected by the object; generating one or more frames consisting of a plurality of pixels arranged horizontally and vertically; generating a sensor value corresponding to the distance to the object corresponding to each pixel in each frame; converting the sensor value corresponding to each pixel in each frame into a distance; generating a distance measurement image consisting of distance measurement values corresponding to each pixel in each frame; dividing the distance measurement image of each frame into a plurality of sections; and, when a pixel for which no distance measurement value has been obtained exists in any section, correcting the distance measurement image by assigning to the pixel for which no distance measurement value has been obtained the average value of the distance measurement values of pixels in any section excluding the pixels for which no distance measurement value has been obtained.
10. A distance measuring method according to claim 9, wherein the size of the section is changed in accordance with a mode selected in accordance with the distance from the light emitting unit to the object.
Citation Information
Patent Citations
Obstacle detection and terrain classification method
US20050024492A1
Image processing device, control program, and image processing method
WO2020084943A1
Information processing device, control method, program, and storage medium
WO2023152871A1