Distance measuring device and image generating method

文档序号:1821418 发布日期:2021-11-09 浏览:18次 中文

阅读说明:本技术 距离测量装置以及图像生成方法 (Distance measuring device and image generating method ) 是由 斋藤繁 香山信三 石井基范 竹本征人 于 2020-03-17 设计创作,主要内容包括:距离测量装置(1)具备:摄像部(2),对N个区分图像进行摄像,该N个区分图像与对测距范围进行分割的N(N为2以上的整数)个区分距离对应;和距离图像生成部(8),根据所述N个区分图像生成距离图像,所述距离图像生成部(8)从构成所述N个区分图像的区分像素之中处于相同的像素位置的N个区分像素判定具有最大的信号值的区分像素,在所述最大的信号值为阈值以上时,将表示所述最大的信号值的区分像素的区分距离的值决定为所述距离图像中的该像素位置的距离值,在所述最大的信号值比所述阈值小时,设为所述测距范围外。(A distance measuring device (1) is provided with: an imaging unit (2) that images N divisional images corresponding to N (N is an integer of 2 or more) divisional distances that divide a distance measurement range; and a distance image generation unit (8) that generates a distance image from the N divided images, wherein the distance image generation unit (8) determines a divided pixel having a maximum signal value from N divided pixels located at the same pixel position among the divided pixels constituting the N divided images, determines a value indicating a divided distance of the divided pixel having the maximum signal value as a distance value of the pixel position in the distance image when the maximum signal value is equal to or greater than a threshold value, and sets the value as outside the distance range when the maximum signal value is smaller than the threshold value.)

1. A distance measuring device is provided with:

a camera shooting part for shooting N distinguishing images, wherein the N distinguishing images correspond to N distinguishing distances for dividing a distance measuring range, and N is an integer more than 2; and

a distance image generating unit for generating a distance image from the N discrimination images,

the distance image generating section generates a distance image of the object,

determining a division pixel having a maximum signal value from N division pixels at the same pixel position among the division pixels constituting the N division images,

determining a value of a discrimination distance of a discrimination pixel representing the maximum signal value as a distance value of the pixel position in the distance image when the maximum signal value is equal to or greater than a threshold value,

And setting the maximum signal value to be out of the range when the maximum signal value is smaller than the threshold.

2. The distance measuring device according to claim 1,

the distance image generation unit dynamically calculates the threshold value based on the signal values of the N divided pixels.

3. The distance measuring device according to claim 2,

the distance image generating unit excludes at least one divided pixel including the divided pixel having the largest signal value from the N divided pixels for each of the pixel positions, calculates an average value of the excluded divided pixels, and calculates the threshold value based on the average value.

4. The distance measuring apparatus according to claim 2 or 3,

the at least one discrimination pixel is two discrimination pixels of the discrimination pixel having the largest signal value and the discrimination pixel having the 2 nd largest signal value among the N discrimination pixels, and is two discrimination pixels belonging to adjacent two discrimination distances.

5. The distance measuring device according to claim 4,

the at least one discrimination pixel is one discrimination pixel having the largest signal value in a case where two discrimination pixels, the discrimination pixel having the largest signal value and the discrimination pixel having the 2 nd largest value, do not belong to adjacent two discrimination distances.

6. The distance measuring apparatus according to claim 4 or 5,

the imaging unit images the N divided images by repeating the group of pulse-shaped light emission and exposure N times,

the pulse width of the exposure corresponds to the pulse width of the emission.

7. The distance measuring device according to any one of claims 3 to 6,

the distance measuring device comprises a brightness image generating part for generating a brightness image based on the N division images,

the luminance image generation unit determines a value corresponding to the average value as a pixel value of the luminance image for each of the pixel positions.

8. The distance measuring device according to any one of claims 3 to 6,

the distance measuring device comprises a brightness image generating part for generating a brightness image based on the N division images,

the luminance image generation unit determines, for each of the pixel positions, a value corresponding to a value obtained by subtracting the average value from the maximum signal value as a pixel value of the luminance image.

9. The distance measuring device according to any one of claims 3 to 6,

the distance measuring device comprises a brightness image generating part for generating a brightness image based on the N division images,

The luminance image generating section generates a luminance image for each of the pixel positions,

determining a value corresponding to a sum of the N divided pixels as a pixel value of the luminance image when the threshold value is larger than a predetermined value,

when the threshold value is not larger than the predetermined value, a value corresponding to the maximum signal value is determined as a pixel value of the luminance image.

10. The distance measuring device according to any one of claims 3 to 6,

the distance measuring device comprises a brightness image generating part for generating a brightness image based on the N division images,

the luminance image generation unit determines, for each of the pixel positions, a value corresponding to a sum of the N divided pixels as a pixel value of the luminance image.

11. The distance measuring device according to any one of claims 1 to 4,

the imaging unit images the N divided images by repeating the group of pulse-shaped light emission and exposure N times,

the distance measuring device includes a luminance image generating unit that generates a first luminance image that does not depend on reflected light for the pulse-shaped light emission and a second luminance image that depends on reflected light from the N divisional images.

12. The distance measuring device according to any one of claims 3 to 6,

the distance measuring device comprises a luminance image generating unit for generating a first luminance image and a second luminance image from the N divided images,

the luminance image generating section generates a luminance image of the subject,

determining a value corresponding to the average value as a pixel value of the first luminance image for each of the pixel positions,

and determining a value corresponding to a value obtained by subtracting the average value from the maximum signal value as a pixel value of the second luminance image for each of the pixel positions.

13. The distance measuring device according to any one of claims 3 to 6,

the distance measuring device comprises a luminance image generating unit for generating a first luminance image and a second luminance image from the N divided images,

the luminance image generating section generates a luminance image of the subject,

determining a value corresponding to the average value as a pixel value of the first luminance image for each of the pixel positions,

determining a value corresponding to the sum of the N divided pixels as a pixel value of the second luminance image when the threshold value is larger than a predetermined value for each of the pixel positions,

And determining, for each of the pixel positions, a value corresponding to the maximum signal value as a pixel value of the second luminance image when the threshold value is not larger than the predetermined value.

14. The distance measuring device according to any one of claims 3 to 6,

the distance measuring device comprises a luminance image generating unit for generating a first luminance image and a second luminance image from the N divided images,

the luminance image generating section generates a luminance image of the subject,

determining a value corresponding to the average value as a pixel value of the first luminance image for each of the pixel positions,

and determining a value corresponding to the sum of the N divided pixels as a pixel value of the second luminance image for each of the pixel positions.

15. The distance measuring apparatus according to claim 8 or 12,

the luminance image generation unit corrects a value obtained by subtracting the average value from the maximum signal value by using a square of a separation distance corresponding to the maximum signal value.

16. The distance measuring apparatus according to claim 9 or 13,

when the threshold is larger than the predetermined value, the luminance image generation unit corrects the pixel values of the N divisional pixels by using the square of the divisional distance corresponding to the divisional pixel, and determines a value corresponding to the sum of the N divisional pixels after correction as the pixel value of the luminance image.

17. The distance measuring device according to any one of claims 1 to 4, 6 to 10, and 12 to 16,

the imaging unit includes:

a light emitting unit that emits irradiation light in accordance with a light emission pulse;

a light receiving unit that performs exposure in accordance with an exposure pulse to capture the N divided images; and

a control unit that controls the light emitting unit and the light receiving unit by generating N sets of light emission pulses and exposure pulses for each range image,

the time difference between the N sets of light emission pulses and exposure pulses corresponds to the N discrimination distances.

18. An image generating method generates a range image, wherein,

the N discrimination images are picked up corresponding to the N discrimination distances for dividing the range measurement range,

determining a division pixel having a maximum signal value from N division pixels at the same pixel position among the division pixels constituting the N division images,

determining a value of a discrimination distance of a discrimination pixel representing the maximum signal value as a distance value of the pixel position in the distance image when the maximum signal value is equal to or greater than a threshold value,

and if the maximum signal value is smaller than the threshold value, setting the maximum signal value to be outside the ranging range.

Technical Field

The present disclosure relates to a distance measuring device and an image generating method.

Background

In patent document 1, the optical Flight type distance measuring device includes a reliability determination unit that determines reliability Of a calculation result Of a TOF (Time Of Flight) distance calculation unit, and selects, based on the determination result, which Of the calculation result Of the TOF distance calculation unit and the calculation result Of the image distance calculation unit is to be output as the device. The reliability determination means compares, on a pixel-by-pixel basis, the degree of deviation of the operation result of the TOF distance operation means between the frames with a predetermined level (level), thereby determining the reliability of the operation result of the TOF distance operation means, and selects the operation result of the TOF distance operation means as the device output when it is determined that the degree of deviation is smaller than the predetermined level and the reliability of the operation result of the TOF distance operation means is relatively high, and selects the operation result of the image distance operation means as the device output when it is determined that the degree of deviation is equal to or greater than the predetermined level and the reliability of the operation result of the TOF distance operation means is relatively low. Thus, patent document 1 addresses the problem of a decrease in distance measurement accuracy due to saturation of the capacity of the pixel or a decrease in the relative intensity of reflected light in an environment where the intensity of disturbance light is large.

Documents of the prior art

Patent document

Patent document 1: japanese patent No. 6427998

Disclosure of Invention

Problems to be solved by the invention

However, according to the above-described background art, there is a problem that the accuracy of distance measurement is lowered due to the influence of the background light.

An object of the present disclosure is to provide a distance measuring device and an image generating method that suppress a decrease in distance measurement accuracy due to a background.

Means for solving the problems

In order to achieve the above object, one aspect of the distance measuring device according to the present disclosure includes: an imaging unit that images N divisional images corresponding to N (N is an integer of 3 or more) divisional distances that divide a distance measurement range; and a distance image generating unit configured to generate a distance image from the N divided images, wherein the distance image generating unit determines a divided pixel having a maximum signal value from N divided pixels located at the same pixel position among the divided pixels constituting the N divided images, determines a value indicating a divided distance of the divided pixel having the maximum signal value as a distance value of the pixel position in the distance image when the maximum signal value is equal to or greater than a threshold value, and sets the value as outside the distance measurement range when the maximum signal value is smaller than the threshold value.

An aspect of the image generating method according to the present disclosure is an image generating method for generating a range image, wherein N divisional images corresponding to N divisional distances that divide a range are captured, a divisional pixel having a maximum signal value is determined from N divisional pixels that are at the same pixel position among divisional pixels that constitute the N divisional images, a value of the divisional distance of the divisional pixel that indicates the maximum signal value is determined as a distance value of the pixel position in the range image when the maximum signal value is equal to or greater than a threshold value, and the range image is set to be outside the range when the maximum signal value is smaller than the threshold value.

Effects of the invention

According to the distance measuring device and the image generating method of the present disclosure, it is possible to suppress a decrease in distance measurement accuracy due to the background light.

Drawings

Fig. 1 is a block diagram showing a configuration example of a distance measuring device according to an embodiment.

Fig. 2 is a timing chart showing an example of the image pickup processing for 1 frame by the image pickup unit according to the embodiment.

Fig. 3 is a diagram showing an example of signal levels of pixels of each divided image according to the embodiment.

Fig. 4 is a block diagram of a configuration example of the distance image generating unit according to the embodiment.

Fig. 5A is a block diagram showing a first configuration example of the luminance image generating unit according to the embodiment.

Fig. 5B is a block diagram showing a second configuration example of the luminance image generating unit according to the embodiment.

Fig. 5C is a block diagram showing a third configuration example of the luminance image generation unit according to the embodiment.

Fig. 6 is a flowchart showing an example of the overall processing in the distance measuring device according to the embodiment.

Fig. 7 is a flowchart showing an example of the process of capturing a differential image in step S1 in fig. 6.

Fig. 8 is a flowchart showing an example of the processing of generating a distance image in step S2 in fig. 4 and 6.

Fig. 9 is a flowchart showing an example of calculating the threshold value in step S23 in fig. 8.

Fig. 10 is a flowchart showing a first example of processing for generating a luminance image in step S3 in fig. 5A and 6.

Fig. 11 is a flowchart showing a specific example of steps S33 and S34 in fig. 10.

Fig. 12 is a flowchart showing a second example of the processing for generating a luminance image in step S3 in fig. 5B and 6.

Fig. 13 is a flowchart showing a third example of the processing for generating a luminance image in step S3 in fig. 5C and 6.

Fig. 14 is a diagram showing an example of a luminance image according to the embodiment.

Fig. 15A is a diagram showing an example of a distance image according to the embodiment.

Fig. 15B is a diagram showing an example of a distance image according to the comparative example.

Detailed Description

(knowledge and insight underlying the present disclosure)

The inventors of the present invention have found the following problems with respect to the conventional distance measuring device described in the section of "background art".

The distance measuring device of patent document 1 calculates a distance value D and a luminance value a based on equations (1) to (3).

A ═ (C1+ C2+ C3+ C4)/4 … … … … · formula (3)

In this case, the amount of the solvent to be used,the phase difference (delay time) generated by the time of flight of light to and from the object is expressed and defined by equation (1). C1 to C4 represent the charge amounts obtained by exposure to light at periods shifted in phase by 0 °, 45 °, 90 °, and 135 ° with respect to the emission period of the pulse emission. c is the high speed, and f is the frequency of light emission and exposure (the reciprocal of the light emission period). In patent document 1, there is a case where "in the above formula (1), the charge amount of the electric charge due to the background light is canceled out, and therefore the phase difference can be calculated without being affected by the background light. "is described.

However, when the timing of light emission and exposure or the environment to be measured differs, the measurement accuracy may deteriorate due to the influence of background light.

For example, the charge amount C1 is composed of the reflected light component s1 and the background light component b1 as in the formula (4). The charge amount C2 to C4 is also represented by formulas (5) to (7).

C1 ═ s1+ b1 … … formula (4)

C2 ═ s2+ b2 … … formula (5)

C3 ═ s3+ b3 … … formula (6)

C4 ═ s4+ b4 … … formula (7)

In that case, the expressions (1) and (3) are expressed by the following expressions (8) and (9).

A ═ s1+ b1+ s2+ b2+ s3+ b3+ s4+ b4)/4 … … formula (9)

As shown in equations (8) and (9), the following problems (i) to (iii) arise with respect to the distance value D and the luminance value a.

(i) The accuracy of the distance value D decreases. For example, the background light component "b 1-b 3" in the expression (8) is mixed as noise, and thus the SN ratio is degraded. That is, the accuracy of the distance image is lowered.

(ii) The contrast of the luminance value a is lowered. For example, in equation (9), the background light components (b1 to b4) are superimposed on the reflected light components (s1 to s 4). The luminance value a is a value including the background light component (average of b1 to b 4). As a result, the contrast of the luminance image is lowered.

(iii) The distance value D may mis-measure the distance value outside the range. Here, the distance value outside the range is a distance value in a case where an object is not present (or reflected light is not present) within the range in which the distance can be measured. The distance value outside the range should be a value indicating infinity. However, according to the expressions (1) and (2), the distance value outside the range may indicate an erroneous distance due to the background light component.

Accordingly, a first object of the present disclosure is to provide a distance measuring device and an image generating method that suppress a decrease in distance measurement accuracy due to a background, in relation to the problem (i).

A second object of the present disclosure is to provide a distance measuring device and an image generating method that suppress a decrease in contrast of a luminance image, in response to the problem (ii).

A third object of the present disclosure is to provide a distance measuring device and an image generating method for suppressing erroneous measurement distances outside the distance measuring range, in view of the problem (iii).

In order to solve the above problem, a distance measuring device according to an aspect of the present disclosure includes: an imaging unit that images N divisional images corresponding to N (N is an integer of 3 or more) divisional distances that divide a distance measurement range; and a distance image generating unit configured to generate a distance image from the N divided images, wherein the distance image generating unit determines a divided pixel having a maximum signal value from N divided pixels located at the same pixel position among the divided pixels constituting the N divided images, determines a value indicating a divided distance of the divided pixel having the maximum signal value as a distance value of the pixel position in the distance image when the maximum signal value is equal to or greater than a threshold value, and sets the value to be outside a distance measurement range when the maximum signal value is smaller than the threshold value.

With this configuration, the distance measuring device can suppress a decrease in distance measurement accuracy due to the background light. This is because the pixel value as the distance value of the distance image is not calculated based on the charge amount (including the background light component) of the expressions (1) and (2), but represents one of the distance ranges of the N division distances, and is thus less susceptible to the influence of the background light. Further, the distance measuring device can suppress erroneous distance measurement outside the distance measurement range.

Hereinafter, the embodiments will be described in detail with reference to the drawings. The embodiments described below are all preferred specific examples of the present disclosure. The numerical values, shapes, materials, structural elements, arrangement positions and connection manners of the structural elements, steps, and the order of the steps, etc. shown in the following embodiments are examples, and do not limit the scope of the present disclosure. Further, among the structural elements in the following embodiments, structural elements not described in the independent claims showing the highest concept of the present disclosure will be described as arbitrary structural elements constituting a more preferable embodiment. The drawings are schematic and do not necessarily show exact dimensions.

(embodiment mode)

[1.1 Structure of distance measuring device 1 ]

First, the configuration of the distance measuring device 1 according to the embodiment will be described.

Fig. 1 is a block diagram showing a configuration example of a distance measuring device according to an embodiment. As shown in the figure, the distance measuring apparatus 1 includes an imaging unit 2 and a signal processing unit 3. The imaging unit 2 includes a light emitting unit 4, a light receiving unit 5, and a control unit 6. The signal processing unit 3 includes a memory 7, a distance image generating unit 8, and a luminance image generating unit 9.

The imaging unit 2 images N divisional images corresponding to N divisional distances that divide a distance measurement range, by repeating a group of pulse-like light emission and exposure N (N is an integer of 3 or more) times. Here, the ranging range refers to the entire range of measurable distances from the distance measuring device 1 to the object. For example, the range is set to 0 to dmax (m). The N division distances are, for example, partial distance ranges obtained by dividing the distance measurement range by N. The N division distances are not limited to N equal divisions, and the distance range may be a distance range of a part divided unequally. For example, depending on the measurement target and the measurement environment of the distance measuring apparatus 1, the determination may be made such that the N division distances include a division distance in a small distance range and a division distance in a large distance range.

The light emitting unit 4 emits pulsed irradiation light in accordance with a light emission control signal that instructs pulsed light emission. The irradiation light of the light emitting section 4 includes infrared rays.

The light receiving unit 5 is, for example, an image sensor having a plurality of pixels arranged in a two-dimensional pattern, and performs exposure in accordance with an exposure control signal that instructs exposure.

The control unit 6 controls the control unit 6 to supply the light-emitting control signal to the light-emitting unit 4 and supply the exposure control signal to the light-receiving unit 5, thereby controlling the light-emitting unit 4 and the light-receiving unit 5 to capture N divided images. Specifically, the control unit 6 generates a light emission control signal and an exposure control signal so as to generate N sets of light emission pulses and exposure pulses for each 1 frame of distance image, thereby controlling the light emitting unit and the light receiving unit.

Here, the N divisional images imaged by the imaging unit 2 will be described in detail with reference to fig. 2 and 3.

Fig. 2 is a timing chart showing an example of the image pickup processing for 1 frame by the image pickup unit 2 according to the embodiment.

The horizontal axis of fig. 2 represents a time axis. The imaging period of the 1 frame F1 includes N measurement periods, i.e., the first measurement period Tm1 to the nth measurement period TmN. Each of the first measurement period Tm1 to the nth measurement period TmN is constituted by N slots Ts1 to TsN equally divided by N.

The "light emission pulse" on the vertical axis indicates a pulse included in the light emission control signal supplied from the control unit 6 to the light emitting unit 4 and instructing light emission. The light emitting unit 4 emits light in a high level section of the light emission pulse to emit pulse light, and is turned off in a low level section. The control unit 6 generates a light emission pulse for instructing light emission in the first time slot Ts1 during all the measurement periods Tm1 to nth measurement period TmN.

The "reflected light" schematically shows an example of reflected light from an object to which pulsed light from the light-emitting section 4 is irradiated. The timing at which the reflected light appears is proportional to the distance from the distance measuring apparatus 1 and the object. In the same figure, an example is shown in which reflected light appears in the second half of the time slot Ts2 and in the first half of Ts 3.

The "exposure pulse" indicates a pulse included in an exposure control signal supplied from the control unit 6 to the light receiving unit 5 and instructing exposure. The light receiving unit 5 is configured to perform exposure in a high level section of the exposure pulse and not perform exposure in a low level section.

The control unit 6 generates an exposure pulse so that the time difference between the light emission timing and the exposure timing gradually increases in the first measurement period Tm1 to the nth measurement period TmN. The time difference between the light emission timing and the exposure timing corresponds to the distance (distance range) of the object to be imaged, which is generated by the reflected wave received by the light receiving unit 5 during the measurement period. That is, when the reflected light is received during the measurement, the distance from the distance measuring device 1 to the object corresponds to the time difference.

That is, the control unit 6 generates an exposure pulse instructing to perform exposure in the section of the time slot Tsk in the measurement period Tmk. Here, k is an integer of 1 to N.

For example, the control unit 6 generates an exposure pulse instructing exposure in the section of the time slot Ts1 in the first measurement period Tm 1. The light receiving unit 5 generates an image based on the exposure at the time slot Ts1 as a divided image # 1. For example, if the period of each time slot is 10nS, the light receiving unit 5 can receive the reflected light that appears within 10nS from the start of pulse light emission in the time slot Ts1, but does not receive the reflected light that appears thereafter. That is, according to the equation (11), in the time slot Ts1, the light receiving unit 5 can receive the reflected light from the object within the distance range of 0 to 1.5m from the dividing distance #1, and cannot receive the reflected light from the object other than the dividing distance # 1.

2 XL 1 < 10nS × c … … formula (11)

Here, c is the speed of light (3X 108 m/s). L1 denotes a distance range that distinguishes distance # 1. 2 × L1 is the round trip distance of the irradiation light.

As described above, when the reflected wave from the object is received in the first measurement period Tm1, it means that the object is within the range of the discrimination distance #1 (for example, 0 to 1.5 m).

Similarly, the control unit 6 generates an exposure pulse instructing exposure in the section of the time slot Tsk in the k-th measurement period Tmk. The light receiving unit 5 generates an image based on the exposure in the time slot Tsk as a differential image # k. For example, when the period of each time slot is 10nS, the light receiving unit 5 can receive the reflected light that appears in the section of the time slot Tsk in the k-th measurement period Tmk, but cannot receive the reflected light that appears outside this section. That is, according to equation (12), in the k-th measurement period Tmk, the light receiving unit 5 can receive light reflected from an object at a distance range Lk (a distance range from (k-1) × 1.5m to k × 1.5 m), and cannot receive light reflected from an object at a distance other than that.

(k-1). times.10 nS.times.c < 2 xLk < k.times.10 nS.times.c … … formula (12)

Here, 2 × Lk is a round trip distance of the irradiation light.

In this way, when the reflected wave from the object is received in the k-th measurement period Tmk, it means that the object is within the division distance # k (e.g., a distance range from (k-1) × 1.5m to k × 1.5 m).

Next, the manner of appearance of reflected waves in the N divisional images will be described.

Fig. 3 is a diagram showing an example of pixel signal levels of N divisional pixels at the same pixel position among divisional pixels constituting N divisional images according to the embodiment. The horizontal axis in the same figure indicates N divisional pixels #1 to # N at the same pixel position among divisional pixels constituting divisional images #1 to # N, corresponding to divisional distances #1 to # N. The vertical axis represents the pixel signal levels of the division pixels #1 to # N.

In fig. 2, the light emission pulse width and the exposure pulse width are the same, and therefore a pulse-like reflected wave appears in most cases in a manner of crossing the boundary of two adjacent time slots. Rarely occurs in one time slot. In fig. 3, two divided pixels, that is, a divided pixel having a pixel signal level of the maximum value MAX1 and a divided pixel having the 2 nd maximum value MAX2 are adjacent two divided pixels #2 and #3, and a reflected wave from the subject is shown. The object in this case means that the object exists at a distance indicated by the average of the two division distances #2 and # 3. For example, when each slot is 10nS, the distance of the object is determined to be about 3.75m, which is the average of the two separation distances #2 and #3, i.e., about (3.0+ 4.5)/2.

The memory 7 temporarily stores N divisional images #1 to # N generated by the imaging unit 2.

The distance image generating unit 8 generates a distance image from the N segmentation images #1 to # N stored in the memory 7. The pixel values constituting the distance image show the distance.

The luminance image generating unit 9 generates a first luminance image and a second luminance image from the N segmentation images #1 to # N stored in the memory 7. Here, the first luminance image is a luminance image that does not depend on the reflected light for the pulsed light emission, and is a luminance image that depends on the background light, which is also referred to as a BG) image hereinafter. BG is an abbreviation for background. The second luminance image is a luminance image depending on the reflected light with respect to the pulsed light emission, and is hereinafter also referred to as an IR image. IR is an abbreviation for infrared (infra).

In fig. 2, the time slots may not be equally divided but may be divided unevenly among the measurement periods.

[1.2 Structure of distance image generating section 8 ]

Next, the configuration of the distance image generating unit 8 will be described in more detail.

Fig. 4 is a block diagram showing a configuration example of the distance image generating unit 8 according to the embodiment. The distance image generating unit 8 shown in the figure includes a maximum value determining unit 81, a threshold value calculating unit 82, a comparing unit 83, a first distance determining unit 84, a second distance determining unit 85, and a combining unit 86.

The maximum value determination unit 81 determines a division pixel having the maximum value MAX1 from among N division pixels #1 to # N at the same pixel position among the division pixels constituting the N division images #1 to # N generated by the light emitting unit 4, and outputs the maximum value MAX1 and the number # of the division pixel. Hereinafter, one of the numbers of the division images #1 to # N, the division pixels #1 to # N, or the division distances #1 to # N may be abbreviated as # in some cases.

The threshold value calculation unit 82 dynamically calculates a threshold value Th1 for each pixel position based on the pixel values of the N divisional pixels #1 to # N. Specifically, the threshold calculation unit 82 excludes at least one divided pixel including the divided pixel having the maximum value MAX1 from the N divided pixels #1 to # N for each pixel position, calculates an average value BGa of the excluded divided pixels, and calculates a threshold based on the average value BGa. For example, the threshold value calculation unit 82 calculates the threshold value Th1 by adding the offset σ to the average value BGa. At this time, the threshold calculation unit 82 dynamically determines the offset σ for each pixel position based on the average value BGa. The deviation σ may be, for example, the square root of the average value BGa, a standard deviation representing the deviation of the background light, or a value corresponding to the difference between the maximum value of the background light and the average value BGa.

The average value BGa is an average of the divided pixels obtained by removing the divided pixels receiving the reflected light from the N divided distances #1 to # N, and indicates an average level of the background light. The "at least one divided pixel" is two divided pixels, i.e., a divided pixel having a maximum value MAX1 and a divided pixel having a 2 nd maximum value MAX2 among N divided pixels #1 to # N, and is two divided pixels belonging to two adjacent divided distances. In addition, the above-mentioned "at least one divided pixel" is one divided pixel having a maximum value MAX1 in the case where two divided pixels, the divided pixel having the maximum value MAX1 and the divided pixel having the 2 nd largest value MAX2, do not belong to two adjacent divided distances.

The comparator 83 compares the maximum value MAX1 with a threshold value Th1, and determines whether or not the maximum value MAX1 is equal to or greater than a threshold value Th 1.

When it is determined that the maximum value MAX1 is equal to or greater than the threshold value Th1, the first distance determination unit 84 determines the value of the separation distance indicating the separation pixel of the maximum value MAX1 as the pixel value of the pixel position in the distance image.

When it is determined that the maximum value MAX1 is not equal to or greater than the threshold value Th1, the second distance determination unit 85 determines a value indicating that the object does not exist within the distance measurement range as the pixel value of the pixel position in the distance image. The value indicating that the subject does not exist in the distance measurement range means a value indicating that the subject is out of the distance measurement range or a value indicating infinity as a background, and may be a specific value other than a value indicating a distance in the distance measurement range.

The combining unit 86 combines the pixel values determined by the first distance determining unit 84 and the second distance determining unit 85 to generate a distance image.

According to the distance image generating unit 8 of fig. 4, it is possible to suppress a decrease in distance measurement accuracy due to the background light. Specifically, the pixel value determined by the first distance determining unit 84 is not calculated based on the charge amount (including the background light component) of the expressions (1) and (2), but represents one of the distance ranges of the N divisional distances #1 to # N, and therefore is less likely to be affected by the background light, and a decrease in the distance measurement accuracy can be suppressed.

Further, since the pixel value determined by the second distance determination unit 85 is a special value indicating that the subject is not present in the distance measurement range, erroneous distance measurement of the distance value outside the distance measurement range can be suppressed. Further, since the threshold Th1 is dynamically calculated for each pixel position based on the average value of the background light, even when the background light largely fluctuates depending on the environment of the distance measuring apparatus 1, even when there is shot noise (shot noise) in the background light and the background light fluctuates, it is possible to suppress a decrease in the distance measurement accuracy due to the background light.

Next, the first to third configuration examples of the luminance image generating unit 9 will be explained.

[1.3 first configuration example of the luminance image generating unit 9 ]

First, a first configuration example of the luminance image generating unit 9 will be described in detail.

Fig. 5A is a block diagram showing a first configuration example of the luminance image generating unit 9 according to the embodiment. The luminance image generating unit 9 shown in the same figure includes a first luminance determining unit 91, a combining unit 92, a second luminance determining unit 93, a correcting unit 94, and a combining unit 95. The maximum value determination unit 81 and the threshold value calculation unit 82 in the same figure are not elements of the luminance image generation unit 9, but are illustrated for convenience of understanding.

The first luminance determining unit 91 determines a value corresponding to the average value BGa as a pixel value Px of the first luminance image independent of the reflected light for each pixel position. For example, the pixel value Px of the luminance image is determined as the value of the average value BGa.

The combining unit 92 combines the pixel values Px determined by the first luminance determining unit 91 in a two-dimensional manner, and generates a first luminance image (BG image) of 1 frame.

The second luminance determining unit 93 determines, as the pixel value of the luminance image, a value corresponding to a value obtained by subtracting the average value BGa from the maximum value, for each pixel position. More specifically, the second luminance determining unit 93 sets a value obtained by subtracting the average value BGa from the maximum value as the pixel value Px according to equation (13) or equation (14) for each pixel position. More specifically, when the divided pixel having the maximum value MAX1 and the divided pixel having the 2 nd maximum value MAX2 are two divided pixels belonging to two adjacent divided distances, the pixel value Px is calculated by equation (13). When two divided pixels, that is, a divided pixel having the maximum value MAX1 and a divided pixel having the 2 nd largest value MAX2, do not belong to two adjacent divided distances, the pixel value Px is calculated by equation (14).

Px (MAX1+ MAX2)/2-BGa … … formula (13)

Px ═ MAX1-BGa … … formula (14)

By subtracting the average value BGa from the maximum value according to equation (13) or equation (14), it is possible to suppress the reflected light and the background light component from overlapping on the second luminance image and reducing the contrast. For example, when the reflected wave from the subject is received in the time slots Ts2 and Ts3 as in the example of fig. 2, the pixel signal level for distinguishing the pixels #2 and #3 becomes high as in fig. 3. In fig. 3, the discrimination pixel #3 has a pixel signal level of the maximum value MAX 1. Discrimination pixel #2 has a 2 nd largest value MAX 2. The pixel signal level S2(MAX2) of the discrimination pixel #2 is considered to contain the background light component BG 2. The pixel signal level S2(MAX1) of the discrimination pixel #3 is considered to contain the background light component BG 3. On the other hand, the pixel signal levels (S1, S4 to SN) of the divided pixels excluding the divided pixel #2 and #3 do not include the reflected light component and indicate the background light components (BG1, BG4 to BGN) themselves, respectively. Even if it is difficult or impossible to directly measure the signal levels of the background light components BG2 and BG3, the signal levels of the background light components for other divided pixels can be estimated from the signal levels of the background light components, and can be estimated to be equivalent to the average value BGa of the background light, for example. Equations (13) and (14) remove the background light component from the signal level at which the background light component is superimposed on the reflected light.

This can suppress a decrease in contrast due to the background of the second luminance image.

The correction unit 94 corrects the pixel value Px from the second luminance determining unit 93 by using the square of the division distance corresponding to the maximum value. Specifically, when the pixel value Px is calculated by equation (13), the correction unit 94 multiplies the pixel value Px by the square of the average of the two division distances corresponding to MAX1 and MAX2, and corrects the pixel value Px. Alternatively, when the pixel value Px is calculated by equation (14), the correction unit 94 multiplies the pixel value Px by the square of the division distance corresponding to the MAX1 to correct the pixel value Px.

Thereby, the signal level of the reflected light inversely proportional to the square of the distance from the distance measuring device 1 to the object is corrected to a signal level independent of the distance. The contrast of the second luminance image can be suppressed from decreasing by the correction.

The combining unit 95 two-dimensionally combines the pixel values Px corrected by the correction unit 94, and generates a second luminance image (IR image) of 1 frame.

[1.4 second configuration example of the luminance image generating unit 9 ]

Next, a second configuration example of the luminance image generating unit 9 will be described.

Fig. 5B is a block diagram showing a second configuration example of the luminance image generating unit 9 according to the embodiment. The luminance image generating unit 9 shown in the figure is different from that shown in fig. 5A in that the points deleted by the second luminance determining unit 93, the correcting unit 94, and the combining unit 95 are added to the points added by the correcting unit 96, the comparing unit 97, the luminance adding unit 98, the luminance determining unit 99, and the combining unit 100. In the following, the same points will be described with different points as the center, while avoiding repetition of the description.

The correction unit 96, the comparison unit 97, the luminance addition unit 98, the luminance determination unit 99, and the synthesis unit 100 generate a second luminance image (IR image).

The correction unit 96 corrects the pixel values of the N divided pixels by using the square of the division distance corresponding to the divided pixel. Specifically, the correction section 96 performs correction by multiplying the pixel values of the N divided pixels by the square of the dividing distance corresponding to the divided pixel.

The comparator 97 compares the threshold Th1 with a predetermined value Th2, and determines whether or not the threshold Th1 is larger than a predetermined value Th 2. The predetermined value Th2 is a threshold value for determining whether or not the dynamically calculated threshold value Th1 (that is, the average value BGa of the background light + the offset σ) is a threshold value having a magnitude that affects the image quality (for example, the contrast) of the second luminance image (IR image), and is not a static constant.

When it is determined that the threshold Th1 is greater than the predetermined value Th2 for each pixel position, the luminance adder 98 determines the value corresponding to the sum of the pixel signal levels of the N divided pixels after correction as the pixel value Px of the second luminance image.

When it is determined that the threshold Th1 is not larger than the predetermined value Th2 for each pixel position, the luminance determination unit 99 determines the value corresponding to the maximum value as the pixel value of the second luminance image.

The combining unit 100 combines the pixel values determined by the luminance adding unit 98 and the luminance determining unit 99 to generate a second luminance image (IR image).

Further, the correcting unit 96 may correct the pixel values of the N divisional pixels by using the square of the divisional distance corresponding to the divisional pixel when it is determined that the threshold Th1 is greater than the predetermined value Th2, and may correct the maximum value by using the square of the divisional distance corresponding to the divisional pixel when it is determined that the threshold Th1 is not greater than the predetermined value Th 2.

According to the second configuration example of the luminance image generating unit 9, the signal levels of the reflected light and the background light, which are inversely proportional to the square of the distance from the distance measuring device 1 to the object, are corrected to the signal levels independent of the distance, and the decrease in the contrast of the second luminance image can be suppressed.

[1.5 third configuration example of the luminance image generating unit 9 ]

Next, a third configuration example of the luminance image generating unit 9 will be described.

Fig. 5C is a block diagram showing a third configuration example of the luminance image generating unit 9 according to the embodiment. The luminance image generating unit 9 shown in the figure is different from that shown in fig. 5A in the point where the second luminance determining unit 93, the correcting unit 94, and the combining unit 95 are deleted and the point where the luminance adding unit 101 and the combining unit 102 are added. In the following, the same points will be described with different points as the center, while avoiding repetition of the description.

The luminance addition unit 101 and the combining unit 102 generate a second luminance image (IR image).

The luminance adding unit 101 determines, for each pixel position, a value corresponding to the sum of the pixel signal levels of the N divided pixels as a pixel value Px of the second luminance image.

The combining unit 102 combines the pixel values determined by the luminance adding unit 101 to generate a second luminance image (IR image).

According to the third configuration example of the luminance image generating unit 9, the processing load for generating the second luminance image can be reduced.

[2.0 operation of the distance measuring device 1 ]

An image generation method as an example of the operation will be described with respect to the distance measuring device 1 configured as described above.

First, an overall operation example of the image generation method in the distance measuring device 1 will be described.

Fig. 6 is a flowchart showing an example of the overall processing in the distance measuring device 1 according to the embodiment.

The same figure shows an image generation method in the distance measuring apparatus 1. First, the imaging unit 2 captures N divisional images corresponding to N divisional distances that divide the distance measurement range (S1). Further, the distance image generator 8 generates a distance image from the N segmented images (S2), and the luminance image generator 9 generates a distance image from the N segmented images (S3).

Next, a description will be given of a processing example of imaging of N divided images.

Fig. 7 is a flowchart showing an example of the process of capturing a differential image in step S1 in fig. 6. Cycle 1(S11 to S14) of fig. 7 represents N iterations of the imaging unit 2 for generating N divisional images. In the k-th iteration out of the N iterations, the imaging section 2 emits light in the time slot Ts1 shown in fig. 2, and is exposed in the time slot Tsk (S12), and the segmented image # k obtained by this exposure is stored in the memory 7 (S13).

In this way, the imaging unit 2 generates the difference images #1 to # N.

Next, an example of processing for generating a distance image by the distance image generating unit 8 will be described.

Fig. 8 is a flowchart showing an example of the processing of generating a distance image in step S2 in fig. 4 and 6. Loop 1(S21 to S29) in fig. 8 shows that the processing is repeated the same number of times as the number M of pixels in the luminance image. The division pixels #1 to # N at the same pixel position Pa (or pixel address Pa) are repeated 1 time. In the 1 iteration, the distance image generating unit 8 first extracts N divisional pixels #1 to # N at the same pixel position Pa among the divisional pixels constituting the N divisional images #1 to # N (S22), calculates a threshold Th1 from the N divisional pixels #1 to # N (S23), and judges the divisional pixel having the maximum value MAX1 from the N divisional pixels #1 to # N (S24). Further, the distance image generator 8 determines whether or not the maximum value MAX1 is larger than the threshold value Th1 (S25), and when it is determined that the maximum value MAX1 is larger than the threshold value Th1, determines the value indicating the division distance of the division pixel of the maximum value MAX1 as the pixel value of the pixel position in the distance image (S26). When determining that the maximum value MAX1 is not larger than the threshold value Th1, the range image generator 8 determines a value indicating that the object is not within the range finding range as the pixel value of the pixel position in the range image (S27). Further, the synthesizing unit 86 synthesizes the pixel values determined in steps S26 and S27 to generate a distance image (S28).

Further, the distance image generating unit 8 determines in step S24 that the divided pixel having the maximum value MAX1 and the divided pixel having the 2 nd largest value MAX2 are present, and when the divided pixel having the maximum value MAX1 and the divided pixel having the 2 nd largest value MAX2 are located at two adjacent divided distances, determines in step S26 an average value of the two adjacent divided distances as the pixel value of the pixel position in the distance image.

Next, an example of the calculation of the threshold Th1 by the threshold calculation unit 82 will be described.

Fig. 9 is a flowchart showing an example of calculating the threshold value in step S23 in fig. 8. In fig. 9, the threshold value calculation section 82 determines the division pixel having the maximum value MAX1 and the division pixel having the 2 nd largest value MAX2 from the N division pixels (S231), and determines whether or not the division distance of the division pixel having the maximum value MAX1 and the division distance of the division pixel having the 2 nd largest value MAX2 are adjacent to each other (S232). Further, when the two division distances are adjacent to each other, the threshold calculation unit 82 calculates the average value BGa by equation (15) (S233).

BGa ═ (sum-MAX1-MAX2)/(N-2) … … formula (15)

Here, sum is the total of pixel signal levels of the divisional pixels #1 to # N. BGa represents the average level of the background light after the reflected light is removed.

When the two separation distances are not adjacent to each other, the threshold calculation unit 82 calculates the average value BGa by equation (16) (S234).

BGa ═ (sum-MAX1)/(N-1) … … formula (16)

Further, the threshold value calculation unit 82 calculates the threshold value Th1 by adding the offset σ to the average value BGa. The offset σ may be, for example, the square root of the average value BGa.

Since the threshold Th1 is dynamically calculated for each pixel position in this way, it can be set to an appropriate value even when the background light fluctuates or when the background light becomes shot noise.

Next, a first example of processing performed by the luminance image generation unit 9 to generate the first luminance image (BG image) and the second luminance image (IR image) will be described.

Fig. 10 is a flowchart showing a first example of processing for generating a luminance image in step S3 in fig. 5A and 6. The luminance image generating unit 9 according to fig. 10 is a first configuration example shown in fig. 5A. Loop 1(S31 to S36) in fig. 10 shows the repetitive processing for each pixel position. In the 1 iteration, first, the luminance image generator 9 determines and stores a value corresponding to the average value BGa at the pixel position as the pixel value of the first luminance image (BG image) (S32). Further, the luminance image generating unit 9 calculates a luminance value obtained by subtracting the average value BGa from the maximum value MAX1 (S33), corrects the luminance value according to the division distance of the maximum value MAX1 (S34), and determines and stores the corrected value as the pixel value of the second luminance Image (IR) (S35).

Steps S32 and S33 will be described in more detail with reference to fig. 11.

Fig. 11 is a flowchart showing a specific example of steps S33 and S34 in fig. 10. In fig. 11, the luminance image generating unit 9 determines a division pixel having a maximum value MAX1 and a division pixel having a 2 nd largest value MAX2 from N division pixels (S331), and determines whether or not the division distance of the division pixel having the maximum value MAX1 and the division distance of the division pixel having the 2 nd largest value MAX2 are adjacent to each other (S332). Further, when the two division distances are adjacent to each other, the luminance image generating unit 9 calculates the luminance value Px by equation (17) (S333), and corrects the luminance value Px by equation (18) (S334).

Px (MAX1+ MAX2)/2-BGa … … formula (17)

Px ═ Px × ((# MAX1+ # MAX2)/2)2 … … formula (18)

Here, # MAX1 denotes a distance value of the division distance of MAX 1. # MAX2 denotes the distance value of the discrimination distance of MAX 2.

When the two division distances are not adjacent to each other, the luminance image generating unit 9 calculates the luminance value Px by equation (19) (S335), and corrects the luminance value Px by equation (20) (S336).

Px is MAX1-BGa … … formula (19)

Px ═ Px × # MAX12 … … type (20)

The corrected pixel values Px in steps S334 and S336 are stored as pixels of the second luminance image (IR image).

Since the background light component is removed from the pixel signal level in equations (17) and (19), a decrease in contrast due to the background of the second luminance image can be suppressed. In the correction of the equations (18) and (20), the signal level of the reflected light, which is inversely proportional to the square of the distance from the distance measuring device 1 to the object, is corrected to a signal level independent of the distance. This correction can also suppress a decrease in the contrast of the second luminance image.

Next, a second example of processing performed by the luminance image generation unit 9 to generate the first luminance image (BG image) and the second luminance image (IR image) will be described.

Fig. 12 is a flowchart showing a first example of processing for generating a luminance image in step S3 in fig. 5B and 6. The luminance image generating unit 9 according to fig. 12 is a second configuration example shown in fig. 5B. Step S32 of generating the first luminance image (BG image) in fig. 12 is the same as step S32 of fig. 10. The following description will be made centering on generation of the second luminance image (IR image). The luminance image generation unit 9 corrects the pixel values of the N divided pixels by using the square of the division distance corresponding to the divided pixel (S42). The # in the figure indicates the discrimination distance corresponding to the discrimination pixel, and may be a distance value within a range of the discrimination distance, and may be, for example, one of a center value, a maximum value, and a minimum value.

Further, the luminance image generating unit 9 determines whether or not the threshold Th1 is larger than a predetermined value Th2 (S43). When it is determined that the threshold Th1 is greater than the predetermined value Th2, the luminance image generator 9 calculates the sum of the N divided pixels (S44), and determines and stores the sum as the pixel value of the second luminance image (S45). When it is determined that the threshold Th1 is not greater than the predetermined value Th2, the luminance image generator 9 detects a maximum value from the N divided pixels (S46), and determines and stores the maximum value as a pixel value of the second luminance image (S47).

Further, the luminance image generator 9 detects MAX1 and MAX2 as maximum values in step S46, and in step S47, sets the average of MAX1 and MAX2 to the maximum value when MAX1 and MAX2 belong to adjacent distance segments, and sets MAX1 to the maximum value when MAX1 and MAX2 do not belong to adjacent distance segments.

According to the second processing example of fig. 12, the signal level of the background light is corrected to a signal level independent of the distance, and the decrease in the contrast of the second luminance image can be suppressed.

Next, a third example of the processing performed by the luminance image generation unit 9 to generate the first luminance image (BG image) and the second luminance image (IR image) will be described.

Fig. 13 is a flowchart showing a first example of processing for generating a luminance image in step S3 in fig. 5C and 6. The luminance image generating unit 9 according to fig. 13 is a third configuration example shown in fig. 5C. The luminance image generating unit 9 according to fig. 13 is a third configuration example shown in fig. 5C. Step S32 of generating the first luminance image (BG image) in fig. 13 is the same as step S32 of fig. 10. The following description will be made centering on generation of the second luminance image (IR image). The luminance image generator 9 calculates the added value of the N divided pixel additions (S52), and determines and stores the added value as the pixel value of the second luminance image (S53).

As described above, according to the distance measuring device 1 of the embodiment, there are effects of (i) suppressing a decrease in accuracy of the distance image, (ii) suppressing a decrease in contrast between the first luminance image (BG) and the second luminance Image (IR), and (iii) suppressing erroneous distance measurement by the background light when there is no subject in the range in which distance measurement is possible.

Next, examples of the distance image and the luminance image will be described.

Fig. 14 is a diagram showing an example of a luminance image according to the embodiment. The same figure shows the second luminance image (IR image) generated by the luminance image generating unit 9 of fig. 5C. Fig. 15A is a diagram showing an example of a distance image according to the embodiment. The same figure shows an example of the distance image generated by the distance image generating unit 8 of fig. 4. Fig. 15B is a diagram showing an example of a distance image according to a comparative example. The same figure shows an example of a distance image obtained when the threshold Th1 for each pixel position is forcibly fixed to 0 in the distance image generating unit 8 of fig. 4.

In fig. 15A, distance values of 25m, 50m, 55m, and 40m from the left are obtained for four subjects (persons). The region described as "out of range" includes a region displayed in black in a region other than the subject (person), and clearly indicates that the subject is not present in the distance measurement range.

In fig. 15B, distance values of 25m, 50m, 55m, and 40m from the left are also obtained for four subjects (persons). However, among the regions of fig. 15B, a region corresponding to the region "out of range" of fig. 15A is more likely to generate noise or be erroneously measured because it represents some distance value. In this regard, it is understood that in fig. 15A, these noises and erroneous ranging are suppressed.

As described above, the distance measuring device 1 according to the embodiment includes: an imaging unit 2 that images N divisional images corresponding to N (N is an integer of 2 or more) divisional distances that divide a distance measurement range; and a distance image generating unit 8 that generates a distance image from the N divided images, wherein the distance image generating unit 8 determines a divided pixel having a maximum signal value from the N divided pixels located at the same pixel position among the divided pixels constituting the N divided images, determines a value indicating a divided distance of the divided pixel having the maximum signal value as a distance value of the pixel position in the distance image when the maximum signal value is equal to or greater than a threshold value, and sets the distance image outside the distance measurement range when the maximum signal value is smaller than the threshold value.

Accordingly, it is possible to suppress a decrease in accuracy of the distance image and suppress erroneous distance measurement by the background light when there is no subject in the range in which distance measurement is possible.

Here, the distance image generating unit 8 may determine a value indicating that the distance measurement range is out of range as the distance value of the pixel position in the distance image when the maximum signal value is smaller than the threshold value.

Here, the distance image generating unit 8 may dynamically calculate the threshold value from the signal values of the N divided pixels.

Accordingly, since the threshold value is dynamically calculated for each pixel position, even when the background light largely fluctuates depending on the environment of the distance measuring apparatus, even when the background light fluctuates due to shot noise, it is possible to suppress a decrease in distance measurement accuracy due to the background light.

Here, the distance image generating unit 8 may exclude at least one divided pixel including the divided pixel having the largest signal value from the N divided pixels for each pixel position, calculate an average value of the excluded divided pixels, and calculate the threshold value based on the average value.

Accordingly, the average value described above represents the average of the background light not including the reflected wave component, and the decrease in the distance measurement accuracy can be further suppressed by the threshold value calculated based on the average value.

Here, the at least one discrimination pixel may be two discrimination pixels, that is, a discrimination pixel having the largest signal value among the N discrimination pixels and a discrimination pixel having the 2 nd largest value, and may be two discrimination pixels belonging to adjacent two discrimination distances.

Here, at least one of the divided pixels may be the one divided pixel having the largest signal value when two divided pixels, that is, the divided pixel having the largest signal value and the divided pixel having the 2 nd largest value, do not belong to two adjacent divided distances.

Accordingly, in the calculation of the average value, the component of the reflected light can be appropriately excluded both in the case where the largest signal value and the 2 nd largest signal value belong to adjacent division distances and in the case where they do not belong to the same division distances.

Here, the imaging unit may image the N divided images by repeating the group of the pulse-shaped light emission and the exposure N times, and the pulse width of the exposure may be equivalent to the pulse width of the light emission.

Here, the distance measuring device may include a luminance image generating unit 9 that generates a luminance image from the N divided images, and the luminance image generating unit 9 may determine a value corresponding to the average value as a pixel value of the luminance image for each pixel position.

With this, a luminance image (BG image) obtained based on the background light independent of the reflected light can be generated.

Here, the distance measuring device may include a luminance image generating unit 9 that generates a luminance image from the N divided images, and the luminance image generating unit 9 may determine, for each pixel position, a value corresponding to a value obtained by subtracting the average value from the maximum signal value as the pixel value of the luminance image.

Accordingly, the average value representing the average level of the background light is subtracted from the maximum signal value, and therefore, the contrast reduction due to the background light in the luminance image can be suppressed.

Here, the distance measuring device may include a luminance image generating unit 9 that generates a luminance image from the N divided images, and the luminance image generating unit 9 may determine, for each pixel position, a value corresponding to the sum of the N divided pixels as a pixel value of the luminance image when the threshold value is larger than the predetermined value, and determine a value corresponding to the largest signal value as a pixel value of the luminance image when the threshold value is not larger than the predetermined value.

This can suppress a decrease in contrast due to the background light in the luminance image.

Here, the distance measuring device may include a luminance image generating unit 9 that generates a luminance image from the N divided images, and the luminance image generating unit 9 may determine a value corresponding to the sum of the N divided pixels as a pixel value of the luminance image for each pixel position.

This can suppress a decrease in contrast due to the background light in the luminance image.

Here, the imaging unit may image the N divisional images by repeating the group of the pulse-shaped light emission and the exposure N times, and the distance measuring device may include a luminance image generating unit 9 that generates a first luminance image that does not depend on the reflected light for the pulse-shaped light emission and a second luminance image that depends on the reflected light from the N divisional images.

Accordingly, since the first luminance image independent of the reflected light and the second luminance image dependent on the reflected light are generated in addition to the distance image, it is possible to suppress a decrease in contrast due to the background in at least one of the first luminance image and the second luminance image.

Here, the distance measuring device may include a luminance image generating unit 9 that generates the first luminance image and the second luminance image from the N divided images, and the luminance image generating unit 9 may determine a value corresponding to the average value as a pixel value of the first luminance image for each pixel position, and determine a value corresponding to a value obtained by subtracting the average value from the maximum signal value as a pixel value of the second luminance image for each pixel position.

Accordingly, the average value representing the average level of the background light is subtracted from the maximum signal value, and therefore, the contrast reduction due to the background light in the luminance image can be suppressed.

Here, the distance measuring device may include a luminance image generating unit 9 that generates the first luminance image and the second luminance image from the N divided images, wherein the luminance image generating unit 9 determines a value corresponding to the average value as a pixel value of the first luminance image for each pixel position, determines a value corresponding to the sum of the N divided pixels as a pixel value of the second luminance image for each pixel position when the threshold value is larger than the predetermined value, and determines a value corresponding to the maximum signal value as a pixel value of the second luminance image for each pixel position when the threshold value is not larger than the predetermined value.

This can suppress a decrease in contrast due to the background light in the luminance image.

Here, the distance measuring device may include a luminance image generating unit 9 that generates the first luminance image and the second luminance image from the N divided images, and the luminance image generating unit 9 may determine a value corresponding to the average value as a pixel value of the first luminance image for each pixel position, and determine a value corresponding to the sum of the N divided pixels as a pixel value of the second luminance image for each pixel position.

This can suppress a decrease in contrast due to the background light in the luminance image.

Here, the luminance image generation unit 9 may correct a value obtained by subtracting the average value from the maximum signal value by using the square of the division distance corresponding to the maximum signal value.

Accordingly, the signal level of the reflected light that is inversely proportional to the square of the distance from the distance measuring device to the object position can be corrected to a signal level that is independent of the distance, and a decrease in the image quality (e.g., contrast) of the second luminance image can be further suppressed.

Here, when the threshold value is larger than the predetermined value, the luminance image generating unit 9 may correct the pixel values of the N divisional pixels by using the square of the divisional distance corresponding to the divisional pixel, and determine the value corresponding to the sum of the N divisional pixels after correction as the pixel value of the luminance image.

Accordingly, the signal level of the divided pixel is corrected to a signal level independent of the distance, and the contrast of the second luminance image can be suppressed from being lowered.

Here, the imaging unit 2 may include a light emitting unit 4 that emits irradiation light in accordance with light emission pulses, a light receiving unit 5 that performs exposure in accordance with exposure pulses to image N divisional images, and a control unit 6 that generates N sets of light emission pulses and exposure pulses for each distance image to control the light emitting unit and the light receiving unit, and the time difference between the light emission pulses and the exposure pulses of the N sets may correspond to the N divisional distances.

Accordingly, N number of divided images can be easily generated.

The image generation method is an image generation method for generating a distance image, wherein N divisional images are captured, the N divisional images corresponding to N divisional distances that divide a distance measurement range, a divisional pixel having a maximum signal value is determined from N divisional pixels that are at the same pixel position among the divisional pixels that constitute the N divisional images, a value indicating the divisional distance of the maximum signal value is determined as a distance value of the pixel position in the distance image when the maximum signal value is equal to or greater than a threshold value, and the division image is determined to be outside the distance measurement range when the maximum signal value is smaller than the threshold value.

Accordingly, it is possible to suppress a decrease in accuracy of the distance image and suppress erroneous distance measurement by the background light when there is no subject in the range in which distance measurement is possible.

The distance measuring device 1 and the image generating method according to the present disclosure have been described above based on the embodiments, but the present disclosure is not limited to the embodiments. Various modifications that may occur to those skilled in the art are also included in the scope of the present disclosure, as long as they do not depart from the spirit of the present disclosure, and other embodiments are also included in which some of the constituent elements in the embodiments and the modifications are arbitrarily combined and constructed.

Industrial applicability of the invention

The present disclosure is suitable for a distance measuring apparatus and an image generating method, for example, for a TOF camera system.

Description of the reference symbols

1 distance measuring device

2 image pickup part

3 Signal processing part

4 light emitting part

5 light receiving part

6 control part

7 memory

8-distance image generating unit

9 luminance image generating section

81 maximum value determination unit

82 threshold value calculating part

83, 97 comparing part

84 first distance determining part

85 second distance determining part

86, 92, 95, 100, 102 synthesis part

91 first luminance determining part

93 second luminance determining part

94, 96 correction part

98, 101 brightness adding part

99 luminance determining part

33页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:电子设备、电子设备的控制方法以及电子设备的控制程序

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!