WO2019102751A1 - 距離測定装置 - Google Patents

距離測定装置 Download PDF

Info

Publication number
WO2019102751A1
WO2019102751A1 PCT/JP2018/038711 JP2018038711W WO2019102751A1 WO 2019102751 A1 WO2019102751 A1 WO 2019102751A1 JP 2018038711 W JP2018038711 W JP 2018038711W WO 2019102751 A1 WO2019102751 A1 WO 2019102751A1
Authority
WO
WIPO (PCT)
Prior art keywords
histogram
time
value
equation
distance
Prior art date
Application number
PCT/JP2018/038711
Other languages
English (en)
French (fr)
Inventor
大木 光晴
Original Assignee
ソニーセミコンダクタソリューションズ株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ソニーセミコンダクタソリューションズ株式会社 filed Critical ソニーセミコンダクタソリューションズ株式会社
Priority to US16/763,903 priority Critical patent/US11747452B2/en
Publication of WO2019102751A1 publication Critical patent/WO2019102751A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S7/00Details of systems according to groups G01S13/00, G01S15/00, G01S17/00
    • G01S7/48Details of systems according to groups G01S13/00, G01S15/00, G01S17/00 of systems according to group G01S17/00
    • G01S7/483Details of pulse systems
    • G01S7/486Receivers
    • G01S7/487Extracting wanted echo signals, e.g. pulse detection
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C3/00Measuring distances in line of sight; Optical rangefinders
    • G01C3/02Details
    • G01C3/06Use of electric means to obtain final indication
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S17/00Systems using the reflection or reradiation of electromagnetic waves other than radio waves, e.g. lidar systems
    • G01S17/02Systems using the reflection of electromagnetic waves other than radio waves
    • G01S17/06Systems determining position data of a target
    • G01S17/08Systems determining position data of a target for measuring distance only
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S17/00Systems using the reflection or reradiation of electromagnetic waves other than radio waves, e.g. lidar systems
    • G01S17/02Systems using the reflection of electromagnetic waves other than radio waves
    • G01S17/06Systems determining position data of a target
    • G01S17/08Systems determining position data of a target for measuring distance only
    • G01S17/10Systems determining position data of a target for measuring distance only using transmission of interrupted, pulse-modulated waves
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S7/00Details of systems according to groups G01S13/00, G01S15/00, G01S17/00
    • G01S7/48Details of systems according to groups G01S13/00, G01S15/00, G01S17/00 of systems according to group G01S17/00
    • G01S7/4808Evaluating distance, position or velocity data
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S7/00Details of systems according to groups G01S13/00, G01S15/00, G01S17/00
    • G01S7/48Details of systems according to groups G01S13/00, G01S15/00, G01S17/00 of systems according to group G01S17/00
    • G01S7/483Details of pulse systems
    • G01S7/486Receivers
    • G01S7/4861Circuits for detection, sampling, integration or read-out
    • G01S7/4863Detector arrays, e.g. charge-transfer gates

Definitions

  • the present technology relates to a distance measurement device. More particularly, the present invention relates to a distance measuring device that measures a distance to an object based on a signal obtained from a sensor using a single photo avalanche diode (SPAD), a processing method thereof, and a program causing a computer to execute the method.
  • a distance measuring device that measures a distance to an object based on a signal obtained from a sensor using a single photo avalanche diode (SPAD), a processing method thereof, and a program causing a computer to execute the method.
  • SPAD single photo avalanche diode
  • a time-of-flight (ToF) method using SPAD is known.
  • distance measurement is performed by emitting pulse light from the light emitting unit and receiving the light reflected on the object and received by the SPAD sensor.
  • the time from the time when the light emitting unit emits light to the time when the light is received by the SPAD sensor is measured. Then, the time to light is multiplied by the speed of light (c) and divided by 2 to calculate the distance to the object. This is because the light measures the time taken for the round trip distance to the object.
  • the problem here is the detection of peaks. That is, on the histogram, a method is required to determine which time is peak and which time is not peak. Therefore, for example, there has been proposed a distance measuring apparatus which makes a judgment based on whether the peak value is different from other values by a certain threshold value or more (see, for example, Patent Document 1).
  • a peak is determined using a threshold value.
  • the threshold is set as an artificial value, and there is a concern that it may lack in theoretical correctness. Therefore, it can not be said that it is appropriate peak detection, and there was a possibility of causing an erroneous determination.
  • the present technology is produced in view of such a situation, and an object of the present technology is to measure a distance to an object by performing appropriate peak detection based on a histogram indicating a light reception frequency of reflected light.
  • a first aspect of the present technology is an active light component in which an active light emitted from a light emitting unit is reflected on an object and an ambient light are the above-mentioned objects
  • a histogram acquisition unit that acquires a histogram indicating the light reception frequency of the reflected light including the ambient light component reflected in step (g); a detection unit that detects the distribution of the active light component by performing predetermined statistical processing on the histogram; It is a distance measuring device provided with the measurement part which measures distance with the above-mentioned subject as distance information based on distribution of the above-mentioned active light ingredient. This brings about the effect
  • the detection unit may perform, as the predetermined statistical processing, a process of obtaining a probability density function when the occurrence rate of the reflected light is set as a probability variable. This brings about the effect of appropriately measuring the distance to the object based on the probability density function.
  • the detection unit performs, as the predetermined statistical processing, parameters of the function satisfying the relationship with the histogram when the occurrence rate of the reflected light is represented as a function of time as the predetermined statistical processing.
  • a process of determining may be performed. This has the effect of appropriately measuring the distance to the object based on the parameters of the function.
  • the first aspect further includes a histogram noise removal processing unit that performs noise removal processing on the histogram, and the detection unit performs the noise removal processing on the histogram by the histogram noise removal processing unit.
  • the above-mentioned predetermined statistical processing may be applied to the above. This has the effect of appropriately measuring the distance to the object based on the denoised histogram.
  • the histogram noise removal processing unit may adaptively perform weighted addition processing on a plurality of the histograms. This brings about the effect of removing the noise of the histogram.
  • the histogram noise removal processing unit may perform weighted addition processing on the occurrence rates obtained from the plurality of histograms. This brings about the effect of removing the noise of the histogram.
  • the histogram noise removal processing unit may perform noise removal processing of the occurrence rate obtained from the histogram. This brings about the effect
  • a first restriction that restricts the parameters of the function so as to satisfy the relationship with the histogram when the occurrence rate of the reflected light upon light reception is expressed as a function of time;
  • the parameter satisfying the second constraint which restricts the parameters in the neighborhoods in space to satisfy a specific relationship is calculated, and the distance to the object or the luminance is calculated from the calculated parameters. It is also good. This brings about the effect of appropriately measuring the distance to the object or the brightness.
  • a distance information noise removal processing unit may be further provided which performs noise removal processing on the distance information measured by the measurement unit. This brings about the effect
  • the distance information noise removal processing unit may perform weighted addition processing in which weights are added to the pieces of data having the same time and position in the distance information as being similar. This brings about the effect
  • the distance information noise removal processing unit causes a first operator to cause the distance information after noise removal to be equal to the distance information, and the noise that is close in time and space.
  • the distance information after the noise removal is determined so that the sum with the second operator acting to equalize the pair having the smallest difference among the distance information after removal becomes an extreme value. You may This brings about the effect
  • the detection unit determines, for each of the plurality of histograms, the occurrence rate by dividing each value of the histogram by a value obtained by subtracting the smallest frequency from the total number of the histograms;
  • the peak of the incidence rate and the peak area may be determined, and the area of the region of the object may be determined from the ratio of the peak areas.
  • an image input unit for inputting an image obtained by capturing the object, an image dividing unit for dividing the image into a plurality of divided regions, and the distance information for the plurality of divided regions.
  • an assign unit for assigning to the terminal. This brings about the effect
  • the detection unit determines, for each of the plurality of histograms, the occurrence rate by dividing each value of the histogram by a value obtained by subtracting the smallest frequency from the total number of the histograms; It is also possible to deconvolute the above occurrence rate and obtain a sharpened histogram from the deconvoluted occurrence rate. This brings about the effect
  • the detection unit determines, for each of the plurality of histograms, the occurrence rate by dividing each value of the histogram by a value obtained by subtracting the smallest frequency from the total number of the histograms; The peak position of the occurrence rate and the half value width of the peak are obtained, and when the half value width is larger than a predetermined threshold value, it is detected that the object is obliquely placed or in motion. Good. This brings about the effect
  • the probability is based on the state transition that manages the specific time.
  • a process of obtaining a density function may be performed. As a result, even when the specific time until the light reception is performed again is limited, the probability density function is obtained to appropriately measure the distance to the object.
  • the detection unit detects a peak position of the active light component with a time resolution finer than that of the histogram based on the distribution of the active light component and detects the peak position of the active light component.
  • the distance to the object may be measured based on it. This brings about the effect
  • an output unit is further provided, the measurement unit generates a degree of significance of the active light component with respect to the ambient light component, and the output unit includes the distance information and the significance.
  • the degree of gender may be output. This brings about the effect
  • the present technology it is possible to obtain an excellent effect that it is possible to measure a distance to an object by performing appropriate peak detection based on a histogram indicating the light reception frequency of reflected light.
  • the effect described here is not necessarily limited, and may be any effect described in the present disclosure.
  • FIG. 16 is a diagram showing a summary of specific examples of “information” and “proper addition” in the first to sixth examples of the second embodiment of the present technology.
  • 21 is a diagram showing a summary of specific examples of “information” and “appropriate addition” in the first to sixth examples of the third embodiment of the present technology. It is a flowchart which shows an example of the process sequence of the noise removal of the generation rate in 1st Example of 4th Embodiment of this technique. It is a flow chart which shows an example of the processing procedure of denoising of the histogram in the 2nd example of a 4th embodiment of this art. It is a flowchart which shows an example of the process sequence of the noise removal of the generation rate in the 3rd Example of 4th Embodiment of this technique. It is a flow chart which shows an example of the processing procedure of the noise removal of the histogram in the 4th example of a 4th embodiment of this art.
  • Fig. 33 is a flowchart illustrating an example of a processing procedure of a process of determining a region of an object in a third example of the ninth embodiment of the present technology.
  • FIG. 1 is a block diagram showing a schematic configuration example of a vehicle control system that is an example of a mobile object control system to which the technology according to the present disclosure can be applied. It is a figure which shows the example of the installation position of the imaging part 12031 of the vehicle control system which is an example of the mobile body control system to which the technique concerning this indication can be applied.
  • Drawing 1 is a figure showing an example of 1 composition of distance measuring device 10 assumed in an embodiment of this art.
  • the distance measuring device 10 measures the distance to the object 20 based on a signal obtained from a sensor using SPAD (Single Photon Avalanche Diode).
  • the distance measuring device 10 includes a control unit 11, a light emitting unit 12, an SPAD array 13, a time difference detecting unit 14, an accumulating unit 15, an arithmetic unit 16, and an output terminal 17.
  • the SPAD array 13 is a complementary metal oxide semiconductor (CMOS) image sensor (imager) in which SPADs are arranged in a two-dimensional array.
  • CMOS complementary metal oxide semiconductor
  • a lens 13a is attached to the front surface of the SPAD array 13, and the lens 13a condenses the light so that each SPAD can receive light efficiently.
  • the SPAD array 13 may be referred to as a SPAD sensor 13.
  • the light emitting unit 12, the SPAD array 13, the time difference detecting unit 14, the accumulating unit 15, and the calculating unit 16 are controlled by a control signal from the control unit 11.
  • the specific control contents are as follows.
  • the light emitting unit 12 emits light for a short time, and the light 40 reaches the object 20 as active light. Then, the light is reflected by the object 20 and returns to the one SPAD in the SPAD array 13 as light 41.
  • the light does not always come back. In other words, it may come back stochastically or may not come back.
  • the light 42 from the sun 30 also reaches the object 20 as ambient light.
  • the light 42 is then reflected at the object 20 and reaches one SPAD in the SPAD array 13 as light 43.
  • the time from the time of light emission from the light emitting unit 12 to the light reception by each SPAD in the SPAD array 13 is measured in the time difference detection unit 14.
  • a distance measurement method is called a time-of-flight (ToF) method.
  • the time difference detection unit 14 is generally configured by a TDC (Time to Digital Converter). And, in order to measure time for each SPAD, it is general that TDC has the same number as SPAD.
  • the value of this time is sent to the accumulation unit 15.
  • the accumulation unit 15 has a memory (not shown), and histogram data is formed on the memory.
  • the histogram bin corresponding to this time value is incremented by one. This updates the histogram. Note that one histogram is formed for each SPAD.
  • the time difference detection unit 14 and the accumulation unit 15 are an example of a histogram acquisition unit described in the claims.
  • the short-time light emission in the light emitting unit 12 under the control of the control unit 11 is performed a plurality of times. This number of times is M (M is an integer). M is usually several thousands to several tens of thousands.
  • the final histogram data obtained after M measurements are sent to the calculation unit 16.
  • Data (distance data to the object 20) obtained by the processing in the calculation unit 16 is output from the output terminal 17.
  • Each of the SPADs in the SPAD array 13 is a sensor that detects light (photons) that first traveled. Therefore, if the light 41 travels earlier in time than the light 43, distance measurement can be performed correctly. That is, the time detected by the time difference detection unit 14 is the round trip time to the object 20, and the distance to the object 20 can be calculated by multiplying c / 2 (c is the speed of light). . On the other hand, when the light 43 comes earlier in time than the light 41, the correct time for distance measurement can not be measured.
  • Reception of the light 43 (reception of ambient light) always occurs with a constant probability regardless of time.
  • the reception of the light 41 (reception of the active light) occurs concentrated at a certain time (more specifically, a value obtained by dividing twice the distance to the object 20 by c). Therefore, the distance to the object 20 can be determined by detecting the peak on the histogram and determining the time corresponding to the peak.
  • the calculation unit 16 performs the process of detecting a peak from the histogram and the process of calculating the distance by multiplying the time corresponding to the peak by c / 2.
  • the calculation unit 16 is an example of a detection unit and a measurement unit described in the claims.
  • the distance measuring device 10 may be provided with a camera 100.
  • the camera 100 captures an image in the same direction as the direction in which the SPAD array 13 of the distance measuring device 10 measures.
  • An image obtained from the camera 100 is sent to the calculation unit 16 via the input terminal 18 of the distance measuring device 10.
  • the operation may be performed using the image.
  • FIG. 2 is a diagram illustrating an example of a histogram generated by the accumulation unit 15 according to the embodiment of the present technology.
  • time (horizontal axis) is expressed in units of width D. That is, if the value of the time detected by the time difference detection unit 14 is in the range from time 0 to time D, it is added to the frequency of the 0th bin. If it is in the range from time D to time 2D, it is added to the frequency of the first bin. The range from time 2D to time 3D is added to the frequency of the second bin. Thereafter, similarly, if it is in the range from time (N ⁇ 1) ⁇ D to time N ⁇ D, it is added to the frequency of the N ⁇ 1th bin.
  • D is the resolution of TDC.
  • the measurement time is limited to N ⁇ D in one measurement. That is, if the light is not received even if the time of N ⁇ D has elapsed since the light emission, the measurement is ended there. In this case, the time difference detection unit 14 does not output the value of time, and the accumulation unit 15 does not update the histogram.
  • N is a constant.
  • the frequency of all bins may sometimes be summed or less than M.
  • SPAD is arranged at each position (x, y) of the SPAD array 13.
  • x 1 to X
  • y 1 to Y
  • the total number of SPADs is X ⁇ Y.
  • distance measurement is performed by M times of light emission and light reception, and the histogram is completed in the accumulation unit 15. That is, the histogram corresponding to each position (x, y) is completed by light emission and light reception M times.
  • the total number of histograms is X ⁇ Y.
  • the processing "create a histogram with M times of light emission and light reception” is continuously performed.
  • the time taken for the processing of “create histogram by M times of light emission and light reception” is taken as a unit time.
  • the histogram created at the t-th time is output at the accumulation unit 15 at time t.
  • t is an integer of 1 or more.
  • H (t, x, y, n) be a histogram of time t and position (x, y).
  • t is an integer of 1 or more
  • x is an integer of 1 or more and X or less
  • y is an integer of 1 or more and Y or less
  • n represents a bin number and is an integer of 0 or more and N-1 or less.
  • H (t, x, y, n) is simply expressed as h (n) in order to consider only one histogram.
  • n 0 to N-1.
  • the SPAD array 13 may be referred to as the SPAD sensor 13.
  • the occurrence rate is the number of occurrences of an event per unit time.
  • occurrence rate is a commonly used term and is used interchangeably in the embodiments of the present technology. That is, the number of times per unit time that light (photons) fly to the SPAD sensor 13 is called the photon fly incidence rate or simply the incidence rate.
  • the incidence rate in each bin is the probability that photons will fly in the time corresponding to that bin. Let the rate of occurrence at bin n be p (n).
  • the probability that photons will fly in time (D) corresponding to the bin is a value obtained by multiplying the occurrence rate by time D.
  • constant multiplication D multiplication
  • time D may be considered as unit time.
  • the incidence rate p (n) in bin n is the probability that light (photon) will fly to the SPAD sensor 13 between time n ⁇ D and time (n + 1) ⁇ D. It does not matter whether the light (photon) has arrived before time n ⁇ D.
  • the light (photon) detected by the SPAD sensor 13 in the distance measuring device 10 is the light (photon) that first flies, and the light (photon) that flies second and subsequent ones is not detected.
  • light (photon) first comes in at a time corresponding to bin 2
  • a second light (photon) comes in at a time corresponding to bin 4
  • bin 6 When the third light (photon) comes in at the corresponding time, only h (2) is counted on the histogram and not h (4) or h (6).
  • the probability that the frequency of bin 0 is h (0) in M measurements is represented by Formula 1. This is because an event that occurs with the probability of p (0) is a probability that occurs h (0) out of M times.
  • the occurrence rate in bin 2 be p (2).
  • the frequency of bin 2 becomes h (2) despite the fact that h (0) times have occurred at bin 0 and h (1) times have occurred at bin 1 in M measurements.
  • the probability is Equation 3. This is because an event that occurs with the probability of p (2) is a probability that occurs h (2) of M ⁇ h (0) ⁇ h (1) times.
  • Equation 4 the probability that the frequency of bin n will be h (n) is as shown in Equation 4 although h (m) have occurred at bin m in M measurements.
  • m is 0 to n-1.
  • Equation 4 is a binomial distribution, which can be approximated by a normal distribution. That is, the probability density function when the frequency h (n) of the n-th bin in the histogram is a random variable is a normal distribution shown in Equation 5.
  • equation 5 can be approximated to equation 7.
  • the probability density function when the incidence rate p (n) of the n-th bin is a random variable is It will be eight.
  • This equation 8 is the final equation (probability density function of the occurrence rate p (n) when the frequency h (n) of each bin n is observed) derived from the theory in this embodiment.
  • FIG. 3 is a diagram for describing processing in the first embodiment of the present technology.
  • peak detection processing 101 is performed using an artificial threshold value from a histogram, and a distance corresponding to that time is output.
  • processing 102 is performed to calculate a probability density function representing the sensor reaction occurrence rate at each time from the histogram. As a result, since the theoretically correct occurrence rate is calculated, no erroneous result is produced.
  • various processes 130 to be described later are performed using a probability density function representing the occurrence rate.
  • various data can be output correctly.
  • the various processes 130 are, for example, the following processes.
  • FIG. 4 is a diagram for describing various processes 130 in the first embodiment of the present technology.
  • an ambient light component detection process 131 is provided after the process 102 for calculating the probability density function. Thereby, the amount of the ambient light component can be determined. That is, it is possible to output the luminance value when the object 20 is illuminated by the ambient light. Note that "a" in the same figure corresponds to the first embodiment and the fifth embodiment described later.
  • detection processing 132 of time other than the ambient light component is provided at a later stage of processing 102 for calculating the probability density function.
  • the time when light other than the ambient light component, that is, light (active light) from the light emitting portion is irradiated to the object 20 and reflected can be obtained.
  • the reciprocation time of the light to the object 20 can be known, and the distance to the object 20 can be output.
  • b in the figure corresponds to a second embodiment and a fourth embodiment described later.
  • a detection process 133 of the active light component is provided at a stage subsequent to the process 102 of calculating the probability density function. Thereby, the amount of active light components can be determined. That is, the luminance value when the object 20 is illuminated by the active light can be output. Note that "c" in the figure corresponds to the third and sixth embodiments described later.
  • FIG. 5 is a flowchart showing an example of a processing procedure for calculating a probability density function in the first embodiment of the present technology. This process is performed by the calculation unit 16.
  • step S141 a numerical value M, which is the number of measurements made to create a histogram, is input. Then, the process proceeds to step S142.
  • step S143 M (n-1) defined in the above equation 4 is calculated.
  • n 0 to N-1. Then, the process proceeds to step S144.
  • n 0 to N-1.
  • H (n) is the average in the normal distribution of Equation 8 described above. Then, the process proceeds to step S145.
  • n 0 to N-1.
  • ⁇ (n) is a standard deviation in the normal distribution of Equation 8 described above. Then, the process proceeds to step S146.
  • step S146 H (n) is output as the average, and ⁇ (n) is output as the standard deviation, and the series of processing ends.
  • n 0 to N-1.
  • the first embodiment is an example of using the distance measuring device 10 to output a luminance value when the object 20 is illuminated by ambient light.
  • FIG. 6 is a flowchart showing an example of a processing procedure for outputting a luminance value when the object 20 is illuminated by the ambient light in the first example of the first embodiment of the present technology. This process is performed by the calculation unit 16.
  • step S151 the probability density function calculation process shown in FIG. 5 is performed. Then, the process proceeds to step S152.
  • step S152 Iambient satisfying equation 9 below is obtained. Then, the process proceeds to step S153.
  • step S153 Iambient is output as the luminance value when the object 20 is illuminated by the ambient light, and the series of processing is ended.
  • equation 9 is supplemented.
  • the meaning of the set ⁇ n ⁇ appearing on the right side of equation 9 will be described using the drawings.
  • FIG. 7 is a diagram showing the occurrence rate of each bin obtained in step S151 of the first example of the first embodiment of the present technology.
  • two bins (n0 and n1) are representatively shown.
  • the occurrence rates of the n0th and n1th bins are H (n0) and H (n1), respectively, and the standard deviations are ⁇ (n0) and ⁇ (n1), respectively.
  • n0 is not included in the set ⁇ n ⁇ because H (n0) ⁇ (n0) / 2 ⁇ I ⁇ H (n0) + ⁇ (n0) / 2.
  • H (n1) - ⁇ (n1) / 2 ⁇ I ⁇ H (n1) + ⁇ (n1) / 2 n1 is included in the set ⁇ n ⁇ .
  • the occurrence rate at n0 is considered to be H (n0).
  • the probability is about H (n0) ⁇ (n0) / 2 or more and H (n0) + ⁇ (n0) / 2 or less. Even if this uncertainty is taken into consideration, the occurrence rate is considered not to be I.
  • the occurrence rate at n1 is considered to be H (n1).
  • the probability is about H (n1) - ⁇ (n1) / 2 or more and H (n1) + ⁇ (n1) / 2 or less. Given this uncertainty, it is considered probable that the incidence is I. That is, the set ⁇ n ⁇ is a set of bins that are likely to have an occurrence rate of I.
  • Iambient of Expression 9 The value of I at which the number of elements of the set ⁇ n ⁇ is the largest is Iambient. In most bins, the occurrence rate being Iambient is considered to be the occurrence rate due to the reception of ambient light, not the reception of active light. In other words, it represents the amount of ambient light. Therefore, Iambient may be a luminance value when the object 20 is illuminated by ambient light.
  • the absolute value of the set in Equation 9 is a symbol indicating the number of elements of the set. In the set theory, the symbol of absolute value is a symbol generally used to represent the number of elements, and in this embodiment, is also used in the same meaning.
  • the luminance value when the object 20 is illuminated by the ambient light can be obtained.
  • the second embodiment is an example in which the distance measuring device 10 is used to output the distance to the object 20.
  • FIG. 8 is a flow chart showing an example of a processing procedure for outputting the distance to the object 20 in the second example of the first embodiment of the present technology. This process is performed by the calculation unit 16.
  • step S154 the probability density function calculation process shown in FIG. 5 is performed. Then, the process proceeds to step S155.
  • step S155 Iambient satisfying equation 9 described above is obtained. Then, the process proceeds to step S156.
  • step S156 n which satisfies the following equation 10 is obtained. Then, the process proceeds to step S157.
  • DST is a distance corresponding to bin n. The reason is that bin n corresponds to a time of approximately n ⁇ D. Then, the process proceeds to step S158.
  • step S158 DST is output as the distance to the object, and the series of processing ends.
  • Iambient is an incidence rate due to light reception of ambient light as described in the first embodiment.
  • FIG. 9 is a diagram showing the occurrence rate of each bin obtained in step S154 of the second example of the first embodiment of the present technology.
  • two bins (n0 and n1) are representatively shown.
  • Iambient obtained in step S155 is shown in the figure.
  • the occurrence rates of the n0th and n1th bins are H (n0) and H (n1), respectively, and the standard deviations are ⁇ (n0) and ⁇ (n1), respectively.
  • Iambient ⁇ H (n 0) ⁇ 3 ⁇ ⁇ (n 0) / 2 n 0 is included in the set ⁇ n ⁇ of Expression 10.
  • n1 is not included in the set ⁇ n ⁇ of Expression 10 because Iambient ⁇ H (n1) ⁇ 3 ⁇ ⁇ (n1) / 2.
  • the occurrence rate at n0 is considered to be H (n0).
  • H (n0) there is a possibility that there is uncertainty and it is about H (n0) -3 ⁇ ⁇ (n0) / 2 or more and H (n0) + 3 ⁇ ⁇ (n0) / 2 or less, but it may be other than that. Is quite low.
  • the incidence is considered to be Iambient or higher. That is, it is considered to be an occurrence rate due to the reception of active light.
  • the occurrence rate at n1 is considered to be H (n1).
  • Equation 10 it is possible to select the bin in which the occurrence rate due to the reception of the active light has occurred.
  • the distance to the object 20 can be determined by selecting the bin in which the occurrence rate due to the light reception of the active light has occurred.
  • the third embodiment is an example in which the distance measuring device 10 is used to output a luminance value when the object 20 is illuminated by active light.
  • FIG. 10 is a flowchart illustrating an example of a processing procedure for outputting a luminance value when the object 20 is illuminated by active light in the third example of the first embodiment of the present technology. This process is performed by the calculation unit 16.
  • step S161 the probability density function calculation process shown in FIG. 5 is performed. Then, the process proceeds to step S162.
  • step S162 Iambient satisfying equation 9 described above is obtained. Then, the process proceeds to step S163.
  • step S163 I active satisfying the following equation 11 is obtained. Then, the process proceeds to step S164.
  • step S164 Iactive is output as the luminance value when the object 20 is illuminated by the active light, and the series of processing is ended.
  • Equation 11 is supplemented.
  • the accumulated n on the right side of Equation 11 is the same as n satisfying Equation 10. That is, as described in the second embodiment, this is a bin in which the occurrence rate due to the reception of active light is generated. Naturally, the incidence of this bin includes the incidence due to the reception of ambient light. Therefore, by subtracting Iambient from H (n) and accumulating for n as shown in Equation 11, it is possible to calculate only the sum of the incidence due to the reception of active light. That is, the amount of active light can be determined. Therefore, Iactive may be a luminance value when the object 20 is illuminated by active light.
  • the fourth embodiment is an example in which the distance measuring device 10 is used to output the distance to the object 20.
  • FIG. 11 is a flowchart illustrating an example of a processing procedure for outputting the distance to the object 20 in the fourth example of the first embodiment of the present technology. This process is performed by the calculation unit 16.
  • step S165 the probability density function calculation process shown in FIG. 5 is performed. Then, the process proceeds to step S166.
  • step S166 n which satisfies the following equation 12 is obtained. Then, the process proceeds to step S167.
  • DST is a distance corresponding to bin n. The reason is that bin n corresponds to a time of approximately n ⁇ D. Then, the process proceeds to step S168.
  • step S168 DST is output as the distance to the object 20, and the series of processes is ended.
  • Equation 12 will be supplemented with reference to the drawings.
  • FIG. 12 is a diagram illustrating the occurrence rate of each bin obtained in step S165 in the fourth example of the first embodiment of the present technology.
  • the threshold value is Cdist1
  • n is the occurrence rate that is prominent compared to the occurrence rate of other bins . It is equation 12 that such a bin n is selected. Since the projecting occurrence rate is considered to be the occurrence rate due to the reception of active light, it is possible to select the bin in which the occurrence rate due to the reception of active light is generated in Equation 12.
  • the separation degree is used as an example of the determination index as to whether or not the incidence rates of the two bins are different, this embodiment is not limited to the separation degree as the determination index.
  • the distance to the object 20 can be determined.
  • the fifth embodiment is an example of using the distance measuring device 10 to output a luminance value when the object 20 is illuminated by ambient light.
  • FIG. 13 is a flowchart illustrating an example of a processing procedure for outputting a luminance value when the object 20 is illuminated by the ambient light in the fifth example of the first embodiment of the present technology. This process is performed by the calculation unit 16.
  • step S171 the probability density function calculation process shown in FIG. 5 is performed. Then, the process proceeds to step S172.
  • step S172 Iambient satisfying equation 14 below is obtained. Then, the process proceeds to step S173.
  • step S173 Iambient is output as the luminance value when the object 20 is illuminated by the ambient light, and the series of processing is ended.
  • the accumulation target n of H (n) of the numerator on the right side of Formula 14 is as follows. That is, bins with the number of bins (m) whose degree of separation is larger than Cdist2 are Cnum2 or less are accumulation targets. This means that the occurrence rate of the bin n is not a prominent occurrence rate, and is considered to be the occurrence rate due to the reception of ambient light.
  • the right side of Equation 14 is considered to be an occurrence rate due to the reception of ambient light because the average of these H (n) is calculated. Therefore, Iambient may be a luminance value when the object 20 is illuminated by ambient light.
  • the luminance value when the object 20 is illuminated by the ambient light can be obtained.
  • the sixth embodiment is an example of using the distance measuring device 10 to output the luminance value when the object 20 is illuminated by active light.
  • FIG. 14 is a flowchart illustrating an example of a processing procedure for outputting a luminance value when the object 20 is illuminated by active light in a sixth example of the first embodiment of the present technology. This process is performed by the calculation unit 16.
  • step S174 the probability density function calculation process shown in FIG. 5 is performed. Then, the process proceeds to step S175.
  • step S175 Iambient which satisfies the above equation 14 is obtained. Then, the process proceeds to step S176.
  • step S176 I active satisfying the following equation 15 is obtained. Then, the process proceeds to step S177.
  • step S177 Iactive is output as the luminance value when the object 20 is illuminated by the active light, and the series of processing is ended.
  • Equation 15 is supplemented.
  • the accumulated n on the right side of Equation 15 is the same as n satisfying Equation 12 described above. That is, as described in the fourth embodiment, this is a bin in which the occurrence rate due to the reception of active light is generated. Naturally, the incidence of this bin includes the incidence due to the reception of ambient light. Therefore, by subtracting Iambient from H (n) and accumulating for n as shown in Equation 15, it is possible to calculate only the sum of the incidence rates due to the reception of active light. That is, the amount of active light can be determined. Therefore, Iactive may be a luminance value when the object is illuminated by active light.
  • the first embodiment is based on the following points.
  • (1) In the probability density function calculation method Inputting a histogram obtained from the SPAD sensor; Calculating M (n-1) and H (n) from the frequency h (n) corresponding to the time n on the histogram; A probability density function calculation method comprising the step of outputting H (n) as an average value of "probability density function when the occurrence rate of the above time n is a random variable”.
  • ⁇ (n) Further, calculating ⁇ (n); A probability density function calculation method comprising the step of outputting ⁇ (n) as the standard deviation of “probability density function when the occurrence rate of the above time n is a random variable”.
  • the luminance value calculation method Calculating a mode value from the probability density function obtained in (1) or (2) above; Calculating the value of the probability density function for times that do not take the value of the mode value; A method of calculating a luminance value, comprising the step of outputting the value of the probability density function as the luminance value when the object is illuminated by active light.
  • the distance calculation method Selecting, from the probability density function obtained in (1) or (2) above, a time during which the value of the probability density function is projected; Multiplying time by (speed of light / 2) times; A distance calculating method comprising: outputting a multiplication result as a distance to an object.
  • Second embodiment [Overview]
  • the histogram is sharpened by performing adaptively weighted addition of the histogram according to the situation. This reduces false positives.
  • H (t, x, y, n) represents the observed value of the time t, the position (x, y), and the n-th bin (that is, the value obtained by the accumulation unit 15).
  • the values of time t, position (x, y) and nth bin are HNR (t, x, y, n)
  • the calculation unit 16 calculates Equation 16 from the histogram H (t, x, y, n) obtained by the accumulation unit 15 to obtain a sharpened histogram HNR (t, x, y, n).
  • Equation 16 performs weighted averaging for H (t, x, y, n). Weighted averaging removes noise present in the histogram and sharpens the histogram.
  • w is the weight of the corresponding H (t, x, y, n), and W is the sum of w used for normalization.
  • the feature of the second embodiment is that the value of w is adaptively optimal according to the "condition".
  • FIG. 15 is a diagram for explaining a first method in the prior art.
  • the final processing is obtained by performing addition in the “processing for adding histograms in a determined procedure” circuit with respect to the histogram obtained from each pixel.
  • An object in a positional relationship that does not conform to the determined procedure has the problem of causing blurring of the histogram.
  • FIG. 16 is a diagram for explaining a second method in the prior art.
  • histograms corresponding to each are added. These additions are performed by the “processing of adding histograms in the determined procedure 1, 2, 3,...” To the histogram obtained from each pixel. And each confidence degree is calculated. The calculation of the reliability is performed by the “calculation processing of reliability of histogram” circuit. Among the calculated plurality of reliabilities, the one that is the largest is detected in the “process that detects the largest” circuit. Then, the "added histogram” corresponding to this is selected by the “selection processing” circuit to obtain the final histogram. There is a plurality of "processes of adding histograms according to a determined procedure", and there is a problem that a huge amount of calculation is caused.
  • FIG. 17 is a conceptual diagram showing an example of processing in the second embodiment of the present technology.
  • appropriate addition is performed on the histogram obtained from each pixel by the “processing of adding histogram according to information” circuit. That is, since the appropriate addition is performed, the optimum addition is always performed regardless of the positional relationship of the object projected on each pixel. In this way, the present invention can be applied to objects in a positional relationship that does not conform to the determined procedure, and it is possible to eliminate the blurring of the histogram. Also, in this second embodiment, instead of performing a plurality of additions, only one type of appropriate addition is performed. This eliminates the need for a large amount of calculation.
  • the n-th bin of the histogram at the position (x, y) is H (t, x, y, n).
  • Equation 17 the probability density function of the occurrence rate in this bin is expressed by Equation 17.
  • M (t, x, y, n-1) is defined by the following equation 18.
  • the value of the n-offset-th bin of the histogram at the time t1 and the position (x1, y1) is H (t1, x1, y1, n-offset).
  • offset is an arbitrary constant.
  • the occurrence rate at the n-offset-th bin of the histogram of the position (x1, y1) at the time t1 is most likely to be the equation 19.
  • the following two evaluation methods are proposed.
  • it is not necessarily limited to this as an evaluation method of the similarity of two histograms.
  • it may be evaluated by the average value of Equation 20 for all bins.
  • Equation 21 can be obtained from the observed value of the occurrence rate of the n-th bin of the histogram of the position (x, y) at time t, as can be understood from the explanation described above using Equation 6. It is a probable value.
  • FIG. 18 is a flowchart illustrating a first example of a process of calculating an evaluation value of similarity according to the second embodiment of the present technology. This process is to calculate the evaluation value of the similarity of "a histogram obtained by shifting the histogram of time t1, position (x1, y1) by offset” with respect to "histogram of time t, position (x, y)" . When the similarity is high, the evaluation value also becomes large.
  • each bin (denoted by n) of the histogram at time t and position (x, y) is input, and is taken as H (t, x, y, n).
  • H H (t, x, y, n)
  • each bin (n) of the histogram at the position (x1, y1) is input, and it is H (t1, x1, y1, n). Enter the offset value.
  • n is 0 to N-1.
  • step S214 S (t, x, y, t1, x1, y1, offset) is output as the evaluation value of similarity. Then, this series of processing ends.
  • FIG. 19 is a flowchart illustrating a second example of the process of calculating the evaluation value of similarity according to the second embodiment of the present technology. This process is to calculate the evaluation value of the similarity of "a histogram obtained by shifting the histogram of time t1, position (x1, y1) by offset” with respect to "histogram of time t, position (x, y)" . When the similarity is high, the evaluation value also becomes large.
  • each bin (n) of the histogram at the time t and the position (x, y) is input to be H (t, x, y, n).
  • each bin (n) of the histogram at the position (x1, y1) is input, and it is H (t1, x1, y1, n). Enter the offset value.
  • n is 0 to N-1. Then, the process proceeds to step S216.
  • step S218 S (t, x, y, t1, x1, y1, offset) is output as the evaluation value of similarity. Then, this series of processing ends.
  • the distance measurement device 10 is used to perform distance measurement in each SPAD of the SPAD array 13.
  • the present invention is characterized in that the observed histogram obtained from the accumulation unit 15 is sharpened. Sharpening of the histogram is performed by the calculation unit 16.
  • FIG. 20 is a flowchart illustrating an example of the histogram noise removal process according to the first example of the second embodiment of the present technology.
  • step S221 in the space-time, the neighborhood of the time t and the position (x, y) is selected to be (t1, x1, y1).
  • (t1, x1, y1) is in a plurality of sets.
  • the set of (t1, x1, y1) is (T + 1, x, y), (T-1, x, y), (T, x + 1, y), (T, x-1, y), (T, x, y + 1), (T, x, y-1) 6 pairs of Then, the process proceeds to step S222.
  • step S222 the histogram obtained from the accumulation unit 15 is input to each of the plurality (t1, x1, y1), and is set as H (t1, x1, y1, n).
  • n 0 to N-1.
  • H (t + 1, x, y, n) H (t-1, x, y, n), H (t, x + 1, y, n), H (t, x-1, y, n), H (t, x, y + 1, n), H (t, x, y-1, n) It is. Then, the process proceeds to step S223.
  • Os is a desired constant (a constant of 0 or more).
  • the evaluation value of the similarity between “time t + 1, histogram obtained by shifting the histogram at position (x, y) by ⁇ Os” with respect to “histogram at time t, position (x, y)” is calculated.
  • the evaluation value of the similarity of “a histogram obtained by shifting the histogram at time t + 1 and position (x, y) by ⁇ Os + 1” with respect to “a histogram at time t and position (x, y)” is calculated.
  • the evaluation value of the similarity of “a histogram obtained by shifting the histogram at time t + 1 and position (x, y) by ⁇ Os + 2” with respect to “a histogram at time t and position (x, y)” is calculated.
  • the evaluation value of the similarity of “a histogram obtained by shifting the histogram of time t ⁇ 1, position (x, y) by ⁇ Os + 1” with respect to “histogram of time t, position (x, y)” is calculated.
  • the evaluation value of the similarity of “a histogram obtained by shifting the histogram of time t ⁇ 1, position (x, y) by ⁇ Os + 2” with respect to “histogram of time t, position (x, y)” is calculated.
  • step S225 the following equation 23 is calculated.
  • the accumulation target in Expression 23 is (t1, x1, y1) selected in step S221.
  • H (t, x, y, n) H (t + 1, x, y, n-offsetMax (t + 1, x, y)) is added with a weight of S (t, x, y, t + 1, x, y, offsetMax (t + 1, x, y)).
  • H (t, x + 1, y, n-offsetMax (t, x + 1, y)) is added with a weight of S (t, x, y, t, x + 1, y, offsetMax (t, x + 1, y)).
  • weighted addition is performed for other pairs (t1, x1, y1) (t, x-1, y), (t, x, y + 1), and (t, x, y-1). Then, the process proceeds to step S226.
  • step S226 HNR (t, x, y, n), which is the calculation result of equation 23, is output as a sharpened histogram.
  • n 0 to N-1. Then, the series of processing ends.
  • Equation 23 H (t, x, y, n), which is itself, is a weight of 1, and for H (t1, x1, y1, n-offset) at a nearby position, the offset is offsetMax (t1, t1). Only x 1 and y 1) are equivalent to equation 16 in which weights S (t, x, y, t 1, x, y, offsetMax (t 1, x 1, y 1)) are added.
  • the two histograms H (t, x, y, n) and H (t1, x1, y1, n-offsetMax (t1, x1, y1)) are similar. This is because the distance of the object measured by SPAD at time t and position (x, y) of SPAD array 13 and the distance of the object measured by SPAD at time t1 and position (x1, y1) are It means that they are offset by offsetMax (t1, x1, y1) in light speed conversion. Therefore, noise can be removed by adding the histogram H (t, x, y, n) to H (t1, x1, y1, n-offsetMax (t1, x1, y1)). At this time, weighting is performed with the degree of similarity S (t, x, y, t1, x1, y1, offsetMax (t1, x1, y1)) and addition is performed.
  • sharpening of the histogram of the SPAD at each time t and each position (x, y) of the SPAD array 13 is performed.
  • t is all integers of 1 or more
  • x is an integer of 1 or more and X or less
  • y is an integer of 1 or more and Y or less.
  • the computing unit 16 detects a peak for the sharpened histogram.
  • a value obtained by multiplying the bin corresponding to the peak by c ⁇ D / 2 is output from the output terminal 17 as a distance. Since the bin n corresponds to a time of approximately n ⁇ D, the distance can be calculated by c ⁇ D / 2 times.
  • peak detection is performed by a known method.
  • the weight is determined independently of the distance between “time t, position (x, y)” and “time t1, position (x1, y1)” in space-time.
  • the second embodiment is an example in which the weight is determined depending also on the distance between "time t, position (x, y)" and "time t1, position (x1, y1)” in space-time.
  • FIG. 21 is a flow chart showing an example of histogram denoising processing in the second example of the second embodiment of the present technology.
  • step S231 in the space-time, the neighborhood of the time t and the position (x, y) is selected to be (t1, x1, y1).
  • (t1, x1, y1) is in a plurality of sets.
  • the process proceeds to step S232.
  • Step S232 is the same process as step S222 in FIG. 20, and the description will be omitted. Then, the process proceeds to step S233.
  • Step S233 is the same process as step S223 in FIG. 20, and the description will be omitted. Then, the process proceeds to step S234.
  • Step S234 is the same process as step S24 in FIG. 20, and the description will be omitted. Then, the process proceeds to step S235.
  • step S235 the following equation 24 is calculated.
  • the accumulation target in Expression 24 is (t1, x1, y1) selected in step S231. Then, the process proceeds to step S236.
  • step S236 HNR (t, x, y, n) that is the calculation result of equation 24 is output as a sharpened histogram.
  • n 0 to N-1. Then, the series of processing ends.
  • H (t, x, y, n), which is itself, is a weight of 1, and for H (t1, x1, y1, n-offset) at a nearby position, the offset is offsetMax (t1, t1).
  • the weight of H (t1, x1, y1, n-offsetMax (t1, x1, y1)) is S (t, x, y, t1, x, y, offsetMax (t1, x1, y1) )) (“Distance between time t, position (x, y)” and “time t1, position (x1, y1)”), but the value of this weight may exceed one.
  • the weight of H (t, x, y, n) which is oneself is 1. It is not good for weights other than yourself to be heavier than yourself. Therefore, when the weight of each term exceeds 1, the weight may be forced to be 1.
  • the weight is determined based on the similarity between one focused SPAD and each adjacent SPAD.
  • the third embodiment is an example in which a weight is determined based on the similarity between a plurality of SPAD groups centered on a focused SPAD and a nearby SPAD group.
  • a weight is determined based on the similarity between a plurality of SPAD groups centered on a focused SPAD and a nearby SPAD group.
  • FIG. 22 is a flowchart illustrating an example of the histogram noise removal process according to the third example of the second embodiment of the present technology.
  • step S241 in the space-time, the neighborhood of the time t and the position (x, y) is selected to be (t1, x1, y1).
  • (t1, x1, y1) is in a plurality of sets. Then, the process proceeds to step S242.
  • step S 242 the histogram obtained from the accumulation unit 15 is input to each of a plurality of (t 1, x 1, y 1) and its neighborhood, and H (t 1, x 1 + b 1, y 1 + b 2, n) is obtained.
  • n 0 to N-1.
  • B is a desired constant. Then, the process proceeds to step S243.
  • Os is a desired constant (a constant of 0 or more). Then, the process proceeds to step S244.
  • step S245 the following equation 25 is calculated.
  • the accumulation target in Expression 25 is (t1, x1, y1) selected in step S241. Then, the process proceeds to step S246.
  • step S246 HNR (t, x, y, n) that is the calculation result of equation 25 is output as a sharpened histogram.
  • n 0 to N-1. Then, the series of processing ends.
  • H (t, x, y, n) which is itself is a weight 1, and for H (t1, x1, y1, n-offset) at a nearby position, the offset is offsetMax (t1, t1, It is equivalent to Equation 16 in which only x 1 and y 1) are added by weights Sg (t, x, y, t1, x, y, offsetMax (t1, x1, y1)).
  • FIG. 23 is a flowchart illustrating an example of a processing procedure of a process (step S243) of calculating an evaluation value of similarity of histograms in the third example of the second embodiment of the present technology.
  • the evaluation value of the similarity of "a histogram obtained by shifting the histogram of time t1 and position (x1, y1) by offset” with respect to "a histogram of time t and position (x, y)" Calculation.
  • the similarity is high, the evaluation value also becomes large.
  • a difference from the evaluation value calculation method described with reference to FIG. 18 or FIG. 19 is that the histograms in the vicinity are also taken into consideration.
  • each bin (denoted as n) of the histogram in (2B + 1) ⁇ (2B + 1) SPADs centered at time t and position (x, y) is input, and H (t, x + b1, y + b2) is input. , N).
  • each bin (denoted as n) of the histogram in (2B + 1) ⁇ (2B + 1) SPADs centering on the position (x1, y1) is input and taken as H (t1, x1 + b1, y1 + b2, n).
  • b1 -B to B
  • b2 -B to B
  • n 0 to N to 1.
  • step S 252 for each b 1 and each b 2, the similarity of “a histogram obtained by shifting the histogram at time t 1, position (x 1 + b 1, y 1 + b 2) by offset” with respect to “time t, position (x + b 1, y + b 2) histogram”
  • a process (see FIG. 18 or FIG. 19) of calculating the evaluation value of. That is, the process shown in FIG. 18 or 19 is performed (2B + 1) ⁇ (2B + 1) times.
  • step S253 the average value of (2B + 1) ⁇ (2B + 1) S (t, x + b1, y + b2, t1, x1 + b1, y1 + b2, offset) obtained in step S252 is obtained. Let this average value be Sg (t, x, y, t1, x1, y1, offset). Then, the process proceeds to step S254.
  • step S254 Sg (t, x, y, t1, x1, y1, offset) is output as the evaluation value of similarity. Then, this series of processing ends.
  • the distance measurement result of the SPAD on the left of the focus position is 10 meters
  • the distance measurement result of the SPAD on the focus position is 10.1 meters
  • the distance measurement result of the SPAD on the right of the focus position is 12 meters.
  • the objects measured on the left of the target position, the target position, and the SPAD to the right of the target position are not the same.
  • ranging results of three consecutive SPADs have irregular values. Therefore, it is considered that noise removal can not be performed even if the histogram obtained from the SPAD on the left and the histogram obtained from the SPAD on the right are added to the histogram obtained from the SPAD at the focus position. The same applies to the point immediately above and below the target position.
  • the distance measurement result of SPAD at the time immediately before the time of interest is 10 meters
  • the distance measurement result of SPAD at the time of interest is 10.1 meters
  • the distance measurement result of SPAD at the time immediately after the time of interest is 10.2 meters
  • the distance measurement result of SPAD at the time immediately before the target time is 10 meters
  • the distance measurement result of SPAD at the target time is 10.1 meters
  • the distance measurement result of SPAD at the time immediately after the target time is 12 meters.
  • the histogram is added to the direction.
  • FIG. 24 to FIG. 26 are flowcharts showing an example of the histogram noise removal process in the fourth example of the second embodiment of the present technology.
  • step S261 At time t, the histogram obtained from the accumulation unit 15 is input to the position (x ⁇ 1, y), and is assumed to be H (t, x ⁇ 1, y, n). At time t, the histogram obtained from the accumulator 15 is input to the position (x + 1, y), and H (t, x + 1, y, n) is obtained. At time t, position (x, y-1), the histogram obtained from the accumulation unit 15 is input, and H (t, x, y-1, n). At time t, position (x, y + 1), the histogram obtained from the accumulation unit 15 is input, and H (t, x, y + 1, n) is obtained.
  • the histogram obtained from the accumulation unit 15 is input to the position (x, y), and H (t ⁇ 1, x, y, n) is obtained.
  • H (t + 1, for the position (x, y) the histogram obtained from the accumulation unit 15 is input, and H (t + 1, x, y, n) is obtained.
  • n 0 to N-1. Then, the process proceeds to step S262.
  • a process (see FIG. 18 or FIG. 19) of calculating the evaluation value of the similarity of.
  • the evaluation value obtained by this is S (t, x, y, t, x-1, y, offset) and represents the degree of similarity between the position of interest and its left neighbor.
  • offset ⁇ Os to Os. Then, the process proceeds to step S263.
  • a process (see FIG. 18 or 19) of calculating a sex evaluation value is performed.
  • the evaluation value obtained by this is S (t, x, y, t, x + 1, y, offset), which represents the degree of similarity between the position of interest and its right neighbor.
  • offset ⁇ Os to Os. Then, the process proceeds to step S264.
  • a process (see FIG. 18 or FIG. 19) of calculating the evaluation value of the similarity of.
  • the evaluation value obtained by this is S (t, x, y, t, x, y-1, offset), which represents the degree of similarity between the focused position and the position immediately above it.
  • offset ⁇ Os to Os. Then, the process proceeds to step S265.
  • a process (see FIG. 18 or 19) of calculating a sex evaluation value is performed.
  • the evaluation value obtained by this is S (t, x, y, t, x, y + 1, offset), which represents the degree of similarity between the position of interest and that immediately below.
  • offset ⁇ Os to Os. Then, the process proceeds to step S266.
  • a process (see FIG. 18 or FIG. 19) of calculating the evaluation value of the similarity of.
  • the evaluation value obtained by this is S (t, x, y, t-1, x, y, offset), and represents the degree of similarity between the focused position and the position immediately before it.
  • offset ⁇ Os to Os. Then, the process proceeds to step S267.
  • a process (see FIG. 18 or 19) of calculating a sex evaluation value is performed.
  • the evaluation value obtained by this is S (t, x, y, t + 1, x, y, offset), and represents the degree of similarity between the focused position and the position immediately after that.
  • offset ⁇ Os to Os. Then, the process proceeds to step S268.
  • step S268 the average value of the two evaluation values, that is, ⁇ S (t, x, y, t, x-1, y, offset) + S (t, x, y, t, x + 1, y,-offset).
  • Th is a desired threshold. Then, the process proceeds to step S269.
  • step S269 the average value of the two evaluation values, that is, ⁇ S (t, x, y, t, x, y-1, offset) + S (t, x, y, t, x, y + 1,-offset).
  • step S 271 the average value of the two evaluation values, that is, ⁇ S (t, x, y, t ⁇ 1, x, y, offset) + S (t, x, y, t + 1, x, y, ⁇ offset) ⁇
  • step S272 the following equation 26 is calculated. Then, the process proceeds to step S273.
  • step S273 HNR (t, x, y, n) which is the calculation result of equation 26 is output as a sharpened histogram.
  • n 0 to N-1.
  • Equation 26 H (t, x, y, n) which is itself is weight 1, and for the position of the neighborhood, offset is offsetMaxH, offsetMaxV, or only offsetMaxT, weight wH, wV, or It is equivalent to Equation 16 added by wT.
  • Equation 26 is supplemented. Assuming that the distance measured by the SPAD to the left of the target position, the distance measured by the SPAD at the target position, and the distance measured by the SPAD to the right of the target position are equally spaced. , The distance between bins corresponding to the distance is offsetMaxH. The correctness of the assumption is ⁇ S (t, x, y, t, x-1, y, offsetMaxH) + S (t, x, y, t, x + 1, y, -offsetMaxH) ⁇ ⁇ 2.
  • ⁇ S (t, x, y, t, x-1, y, offsetMaxH) + S (t, x, y, t, x + 1, y, -offsetMaxH) ⁇ ⁇ 2 is above a certain threshold (Th) If there is, it is good to add the histogram. Therefore, when ⁇ S (t, x, y, t, x-1, y, offsetMaxH) + S (t, x, y, t, x + 1, y, -offsetMaxH) ⁇ ⁇ 2 or more, the weight wH Is added as one. When it is less than Th, since 0 is set as wH, substantial addition is not performed.
  • the same object is disposed obliquely with respect to the distance measuring device 10, and the bin shift amount according to the degree of the skew is offsetMaxH, so that the histogram adjacent on the left is added with only offsetMaxH.
  • the histogram next to the right adds only by -offsetMaxH. The same applies to the vertical direction and the time direction.
  • a camera 100 provided to the distance measuring device 10 is used.
  • the camera 100 is an apparatus capable of capturing an image, and captures the same direction as the direction measured by the SPAD array 13 of the distance measuring device 10.
  • the pixel value E (t, x, y) in the image of the camera 100 corresponding to the object measured by the SPAD at the focused position (x, y) at the focused time t of the SPAD array 13 and the time t 1 of the SPAD array 13 When the SPAD at position (x1, y1) is similar to the pixel value E (t1, x1, y1) in the image of the camera 100 corresponding to the object being measured, the same object is captured in the camera 100 it seems to do. That is, in this case, the objects measured by the two SPADs are considered to be the same. On the other hand, if the two have different pixel values, it is considered that different objects are being measured.
  • E (t, x, y) is a luminance value when the camera 100 captures an image of the object measured by SPAD at the position (x, y) at time t at time t.
  • E (t1, x1, 1y) is a luminance value when the camera 100 captures an image of the object measured by SPAD at the position (x1, y1) at time t1 at time t1.
  • the weight is determined depending on the distance between "position (x, y)" and “position (x1, y1)”.
  • FIG. 27 is a flowchart illustrating an example of the histogram noise removal process according to the fifth example of the second embodiment of the present technology.
  • step S281 is performed, which is the same as step S221 of FIG. 20, and the description thereof is omitted. Then, the process proceeds to step S282.
  • Step S282 is the same process as step S222 in FIG. 20, and the description will be omitted. Then, the process proceeds to step S283.
  • Step S283 is the same process as step S223 in FIG. Then, the process proceeds to step S284.
  • Step S284 is the same process as step S224 in FIG. 20, and the description will be omitted. Then, the process proceeds to step S285.
  • step S285 the pixel value in the image of the camera 100 corresponding to "the object measured by SPAD in (t, x, y)" is input. Let this pixel value be E (t, x, y). A pixel value in an image of the camera 100 corresponding to “an object measured by SPAD in each of a plurality of (t1, x1, y1)” is input. Let this pixel value be E (t1, x1, y1). Then, the process proceeds to step S286.
  • step S286 the following equation 27 is calculated.
  • the accumulation target in Expression 27 is (t1, x1, y1) selected in step S281. Then, the process proceeds to step S287.
  • step S287 HNR (t, x, y, n) which is the calculation result of Expression 27 is output as a sharpened histogram.
  • n 0 to N-1. Then, the series of processing ends.
  • H (t, x, y, n) which is itself is a weight 1, and for H (t1, x1, y1, n-offset) at a nearby position, the offset is offsetMax (t1, t1). (x1, y1) only, weight 1 ⁇ (distance between "time t, position (x, y)" and “time t1, position (x1, y1)") ⁇ (E, t, x, y) and E (t1 , X1, y1) is equivalent to the equation (16) added by the absolute value of the difference).
  • Equation 27 when the weight of each term exceeds 1, the weight may be forced to be 1.
  • the weight is determined by the similarity (difference between two values) of one pixel value corresponding to one SPAD to be focused on and one pixel value corresponding to each SPAD in the vicinity. It was In the sixth embodiment, the pixel values of a plurality of pixel groups centered on "the pixel corresponding to the target SPAD" are similar to the pixel values of the pixel group centered on the "pixel corresponding to the neighboring SPAD". This is an example of determining the weight according to the gender. There is also the possibility of an erroneous determination if the similarity is determined by comparing one pixel with another, but the comparison of a plurality of pixels makes the determination of the similarity more reliable.
  • FIG. 28 and FIG. 29 are flowcharts showing an example of the histogram denoising process in the sixth example of the second embodiment of the present technology.
  • step S291 the process of step S291 is performed, which is the same as step S281 of FIG. Then, the process proceeds to step S292.
  • Step S292 is the same process as step S282 in FIG. Then, the process proceeds to step S293.
  • Step S293 is the same process as step S283 in FIG. Then, the process proceeds to step S294.
  • Step S294 is the same process as step S284 in FIG. Then, the process proceeds to step S295.
  • step S 295 the pixel position in the image of the camera 100 corresponding to “the object measured by SPAD in (t, x, y)” is set to (u (t, x, y), v (t, x, y )).
  • the pixel values at the position (u (t, x, y) + f1, v (t, x, y) + f2) in the image captured at time t of the camera 100 are input.
  • This pixel value is G (t, u (t, x, y) + f1, v (t, x, y) + f2).
  • the pixel position in the image of the camera 100 corresponding to “an object measured by SPAD at a plurality of (t1, x1, y1)” is (u (t1, x1, y1), v (t1, x1, y1)) I assume.
  • the pixel value at the position (u (t1, x1, 1y) + f1, v (t1, x1, y1) + f2) in the image captured at time t1 of the camera 100 is input.
  • G t1, u (t1, x1, y1) + f1, v (t1, x1, y1) + f2).
  • f1 ⁇ F to F
  • f2 ⁇ F to F.
  • step S296 the following equation 28 is calculated.
  • the accumulation target in Expression 28 is (t1, x1, y1) selected in step S291. Then, the process proceeds to step S297.
  • step S297 HNR (t, x, y, n) which is the calculation result of equation 28 is output as a sharpened histogram.
  • n 0 to N-1. Then, the series of processing ends.
  • H (t, x, y, n) which is itself, is a weight of 1, and for H (t1, x1, y1, n-offset) at a nearby position, the offset is offsetMax (t1, t1, (x1, y1) only, weight 1 ⁇ (distance between "time t, position (x, y)" and "time t1, position (x1, y1)”) ⁇ (corresponding to the pixel position corresponding to the image of the camera 100) It is equivalent to the equation (16) added by the sum of the absolute values of the differences of (2F + 1) ⁇ (2F + 1) pixel groups.
  • Equation 28 zero division may occur as in Equation 27.
  • known conventional means may be used. Equation 28 does not touch on this because it has nothing to do with the purpose of this embodiment.
  • Equation 28 when the weight of each term exceeds 1, the weight may be forced to be 1.
  • Equation 27 is supplemented.
  • the object measured by the SPAD at the position (x, y) at time t has a position (u (t, x, y), v (t, x, y) in the image when the camera 100 takes a picture at time t. ) Is projected.
  • the values (brightness values) of the pixels when projected are G (t, u (t, x, y), v (t, x, y)).
  • FIG. 30 is a diagram showing a summary of specific examples of “information” and “proper addition” in the first to sixth examples of the second embodiment of the present technology.
  • the right side of Formula 16, Formula 23, Formula 24, Formula 25, Formula 26, Formula 27, or Formula 28 is calculated.
  • the value obtained by the calculation is not the sharpened histogram HNR (t, x, y, n) but the sharpened incidence rate (lambda NR (t, x, y, n)).
  • the second embodiment is based on the following points.
  • the first information is the similarity between the first histograms, A histogram sharpening method characterized in that the weight of the first histogram present at the position in the direction of high similarity is made heavier in the space-time, and addition is performed in the addition step.
  • the first information is the similarity between the first histograms, A histogram sharpening method characterized in that weighting is performed according to the degree of similarity, and addition is performed in the addition step.
  • the first information is a distance in the space-time.
  • the first information is the similarity between image data corresponding to the first histogram
  • FIG. 31 is a diagram for explaining a first method in the prior art.
  • the final processing is obtained by performing addition in the “processing for adding histograms in a determined procedure” circuit with respect to the histogram obtained from each pixel.
  • An object in a positional relationship that does not conform to the determined procedure has the problem of causing blurring of the histogram.
  • FIG. 32 is a diagram for explaining a second method in the prior art.
  • histograms corresponding to each are added. These additions are performed by the “processing of adding histograms in the determined procedure 1, 2, 3,...” To the histogram obtained from each pixel. And each confidence degree is calculated. The calculation of the reliability is performed by the “calculation processing of reliability of histogram” circuit. Among the calculated plurality of reliabilities, the one that is the largest is detected in the “process that detects the largest” circuit. Then, the "added histogram” corresponding to this is selected by the “selection processing” circuit to obtain the final histogram. There is a plurality of "processes of adding histograms according to a determined procedure", and there is a problem that a huge amount of calculation is caused.
  • FIG. 33 is a conceptual diagram showing an example of processing in the third embodiment of the present technology.
  • appropriate addition is performed on the histogram obtained from each pixel by the “processing of adding histogram according to information” circuit. That is, since the appropriate addition is performed, the optimum addition is always performed regardless of the positional relationship of the object projected on each pixel. In this way, the present invention can be applied to objects in a positional relationship that does not conform to the determined procedure, and it is possible to eliminate the blurring of the histogram. Further, in the third embodiment, only one type of appropriate addition is performed instead of performing a plurality of additions. This eliminates the need for a large amount of calculation.
  • the observed histogram H (t, x, y, n) is converted into an occurrence rate to sharpen the occurrence rate. That is, sharpening of the generation rate ⁇ (t, x, y, n) represented by the following equation 29 is performed.
  • M (t, x, y, n-1) is defined by the following equation 30. It should be noted that the value of the occurrence rate ⁇ (t, x, y, n) in Equation 29 has an error of the standard deviation ⁇ (t, x, y, n) shown by Equation 31 below It is.
  • ⁇ (t, x, y, n) obtained by the equation 29 from the observed value H (t, x, y, n).
  • ⁇ (t, x, y, n) includes an error of the standard deviation ⁇ (t, x, y, n) represented by Expression 31.
  • HNR (t, x, y, n) is a sharpened histogram. Note that it is clear from the above-mentioned Equation 29 and Equation 30 that this Equation 32 holds.
  • the sharpening of the rate of occurrence in the third embodiment can be expressed by the following equation 33.
  • H (t, x, y, n) represents the observed value of the time t, the position (x, y), and the n-th bin (that is, the value obtained by the accumulation unit 15).
  • the occurrence rate ⁇ (t, x, y, n) is defined in the above-mentioned equation 29.
  • the values of time t, position (x, y), and nth bin are ⁇ NR (t, x, y, n) There is.
  • the arithmetic unit 16 calculates Equations 29 and 33 from the histogram H (t, x, y, n) obtained by the accumulation unit 15 to calculate the sharpened incidence rate ⁇ NR (t, x, y, n). It has gained. Furthermore, if necessary, the sharpened H-gram (t, x, y, n) is obtained by the above-mentioned equation 32. Detecting a peak without false detection by searching for a peak value from a sharpened incidence rate ⁇ NR (t, x, y, n) or a sharpened histogram HNR (t, x, y, n) This enables distance measurement without false detection.
  • peak detection of a histogram is generally performed in distance measurement by SPAD.
  • peak detection may be performed by searching for bin n at the sharpened incidence rate ⁇ NR (t, x, y, n).
  • n 0 to N-1.
  • Equation 33 above performs weighted averaging for ⁇ (t, x, y, n).
  • the weighted average removes noise present in the occurrence rate ⁇ (t, x, y, n) to sharpen the occurrence rate.
  • w (t, x, y, n, t1, x1, y1, n1) is the weight of the corresponding ⁇ (t1, x1, y1, n1)
  • W is the w (t, used for normalization) It is a total value of x, y, n, t1, x1, y1, n1).
  • the probability density functions of time t, position (x, y) and n-th bin occurrence rate obtained from observed values are average ⁇ (t, x, y, n), standard deviation ⁇ (t, x, y, n) n) normal distribution.
  • the probability density functions of time t1 and position (x1, y1) and the occurrence rate of the n1th bin obtained from the observed values have average ⁇ (t1, x1, y1, n1) and standard deviation ⁇ (t1, x1, y1, n1). It becomes a normal distribution of n1).
  • the degree of separation is used as an example of the determination index as to whether the occurrence rates of the two bins are the same or different here, this embodiment is not limited to the degree of separation as the determination index.
  • the distance measuring device 10 is used to perform ranging in each SPAD of the SPAD array 13.
  • it is characterized in that sharpening of the occurrence rate obtained by the above-mentioned Expression 29 from the “histogram that is the observation value of the accumulation unit 15” is achieved. Sharpening of the occurrence rate is performed in the operation unit 16.
  • the occurrence rate ⁇ (t1, x1, y1) in the vicinity of the space-time and the bin with respect to the focus position (x, y) of the focus time t and the occurrence rate ⁇ (t, x, y, n) in the focus bin n , N1) are weighted and added. As a result, noise removal of the incidence rate ⁇ (t, x, y, n) is performed and sharpening is performed.
  • FIG. 34 is a flowchart illustrating an example of a processing procedure of noise removal of an occurrence rate in the first example of the third embodiment of the present technology.
  • noise removal i.e., sharpening
  • the focus position (x, y) at the focus time t and the occurrence rate ⁇ (t, x, y, n) in the focus bin n is performed.
  • step S311 in the space-time and the bin, the neighborhood of the time t, the position (x, y) and the bin n is selected to be (t1, x1, y1 n1).
  • (t1, x1, y1 n1) is one or more sets.
  • (t1, x1, y1 n1) is a set satisfying t-2 ⁇ t1 ⁇ t + 2, x ⁇ 2 ⁇ x1 ⁇ x + 2, y ⁇ 2 ⁇ y1 ⁇ y + 2, and n ⁇ 2 ⁇ n1 ⁇ n + 2.
  • (t1, x1, y1 n1) (t, x, y n) are excluded.
  • n1 may be all the bins, that is, 0 to N-1. Then, the process proceeds to step S312.
  • step S312 the histogram H (t, x, y, n) obtained from the accumulation unit 15 is input. Then, the histogram H (t1, x1, y1, n1) obtained from the accumulation unit 15 is input to each of (t1, x1, y1 n1). Then, the process proceeds to step S313.
  • Equation 29 is calculated for H (t, x, y, n) and H (t1, x1, y1, n1) to obtain ⁇ (t, x, y, n) and ⁇ (t1). , X1, y1, n1). Then, the process proceeds to step S314.
  • step S314 the following equation 35 is calculated.
  • the accumulation target in Expression 35 is (t1, x1, y1 n1) selected in step S311. Then, the process proceeds to step S315.
  • step S315 ⁇ NR (t, x, y, n), which is the calculation result of Expression 35, is output as the sharpened occurrence rate. Then, the series of processing ends.
  • Equation 35 ⁇ (t, x, y, n), which is itself, is a weight 1, and for ⁇ (t1, x1, y1, n1) at nearby positions, the weight “1 ⁇ (“ time t , (N, y), bin n "and” distance at time t1, position (x1, y1), bin n1 "" are equivalent to expression 33.
  • the sharpened incidence rate ⁇ NR (t, x, y, n) of the target bin n at the target position (x, y) at the target time t can be obtained.
  • Equation 35 is supplemented.
  • the occurrence rates near each other in the space of “time t, position (x, y), bin n” are similar to each other, so noise can be removed by adding them. Equation 35 performs this calculation.
  • t is an integer of 1 or more
  • x is an integer of 1 to X
  • y is an integer of 1 to Y
  • n is an integer of 0 to N-1.
  • the distance can be calculated by c ⁇ D / 2 times.
  • peak detection is performed by a known method.
  • a sharpened histogram may be calculated according to the above-mentioned equation 32 for the sharpened incidence rate, and peak detection may be performed on the sharpened histogram.
  • the weight is determined depending on the distance between “time t, position (x, y), bin n” and “time t1, position (x1, y1), bin n1” in space-time. It was The second embodiment is an example of determining weights based on whether two occurrence rates are substantially equal. The noise can be removed by adding ones with almost equal occurrence rates. Furthermore, the weight is also determined according to the degree of accuracy of the occurrence rate to be added. That is, when the occurrence rate contains many errors, the value of the occurrence rate can not be trusted, so the weight is reduced. In other words, the weight is determined according to the reliability of the occurrence rate.
  • FIG. 35 is a flowchart illustrating an example of a processing procedure of noise removal of an occurrence rate in the second example of the third embodiment of the present technology.
  • noise removal i.e., sharpening
  • the process in the second embodiment corresponds to the process in step S314 in the first embodiment described above replaced with the process in step S316 as described below.
  • step S316 Equation 31 is calculated for H (t1, x1, y1, n1) to obtain ⁇ (t1, x1, y1, n1). Then, Equation 36 is calculated.
  • the accumulation target in Expression 36 is (t1, x1, y1 n1) selected in step S311. Then, the process proceeds to step S317.
  • step S317 ⁇ NR (t, x, y, n), which is the calculation result of equation 36, is output as the sharpened occurrence rate. Then, the series of processing ends.
  • Equation 36 ⁇ (t, x, y, n) which is itself is a weight 1, and for ⁇ (t1, x1, y1, n1) at a nearby position, a weight “1 ⁇ (“ time t , Location (x, y), separation rate of bin n and “time t 1, location (x 1, y 1), bin n 1” separation rate ⁇ (“time t 1, location (x 1, y 1), bin
  • the standard deviation of the occurrence rate of n 1 ′ ′) is equivalent to the expression 33 added.
  • Equation 36 when the value of the degree of separation or the standard deviation is 0, zero division occurs in Equation 36. Therefore, practically, in order to avoid zero division, when the degree of separation or standard deviation is 0, it is necessary to replace with a small value. This is a known means, and does not relate to this in Equation 36 because it is not related to the purpose of this embodiment.
  • the weight of the occurrence rate ⁇ (t1, x1, y1, n1) in the vicinity to be added may exceed 1 in some cases.
  • the weight of the occurrence rate ⁇ (t, x, y, n) which is oneself is one. It is not good for weights other than yourself to be heavier than yourself. Therefore, when the weight of each term exceeds 1, the weight may be forced to be 1.
  • the sharpened incidence rate ⁇ NR (t, x, y, n) of the target bin n at the target position (x, y) at the target time t can be obtained.
  • Equation 36 is supplemented. If the degree of separation is small, it means that the two occurrence rates are almost equal. If the occurrence rates are approximately equal, noise can be removed by addition. If the standard deviation ⁇ (t1, x1, y1, n1) of the occurrence rate ⁇ (t1, x1, y1, n1) to be added is large (that is, the reliability is low), “time t1, position (x1, x1 The incidence of y1), bin n1 'is unreliable. Therefore, in such a case, the weight of the occurrence rate ⁇ (t1, x1, y1, n1) should be reduced. Equation 36 performs this calculation.
  • the weight is determined depending on the distance between “time t, position (x, y), bin n” and “time t1, position (x1, y1), bin n1” in space-time. It was also, in the second embodiment, the weight is determined based on whether the two occurrence rates are almost equal. In the third embodiment, the weight is determined in consideration of these two matters.
  • FIG. 36 is a flowchart illustrating an example of a processing procedure of noise removal of an occurrence rate in the third example of the third embodiment of the present technology.
  • noise removal i.e., sharpening
  • the process in the third embodiment corresponds to the process in step S314 in the first embodiment described above replaced with the process in step S318 as described below.
  • step S318 the following equation 37 is calculated.
  • the accumulation target in Expression 37 is (t1, x1, y1 n1) selected in step S311. Then, the process proceeds to step S319.
  • step S319 ⁇ NR (t, x, y, n), which is the calculation result of equation 37, is output as the sharpened occurrence rate. Then, the series of processing ends.
  • Equation 37 ⁇ (t, x, y, n) which is itself is a weight 1, and for ⁇ (t1, x1, y1, n1) at a nearby position, a weight “1 ⁇ (“ time t , Distance between position (x, y), bin n and “time t1, position (x1, y1), bin n1” ⁇ (time t, position (x, y), bin n) It is equivalent to the equation 33 added at the time t1, the position (x1, y1), the separation of the occurrence rate of the bin n1 ′ ′ ”.
  • Equation 37 zero division may occur similarly to Equation 36.
  • known conventional means may be used. Equation 37 does not refer to this because it has nothing to do with the purpose of this embodiment.
  • the sharpened incidence rate ⁇ NR (t, x, y, n) of the target bin n at the target position (x, y) at the target time t can be obtained.
  • Equation 37 is supplemented.
  • the occurrence rates near each other in the space of “time t, position (x, y), bin n” are similar to each other, so noise can be removed by adding them. Also, if the degree of separation is small, it means that the two occurrence rates are approximately equal. If the occurrence rates are approximately equal, noise can be removed by addition. Equation 37 performs this calculation.
  • the weight is determined based on one occurrence rate to which attention is paid and the similarity (separation degree) of each occurrence rate in the vicinity.
  • the fourth embodiment is an example in which a weight is determined based on the similarity between a plurality of occurrence rate groups centered on a position of interest and a nearby occurrence rate group.
  • FIG. 37 is a flowchart illustrating an example of a processing procedure of noise removal of an occurrence rate in the fourth example of the third embodiment of the present technology.
  • noise removal i.e., sharpening
  • the focus position (x, y) at the focus time t and the occurrence rate ⁇ (t, x, y, n) in the focus bin n is performed.
  • step S321 in the space-time and the bin, the neighborhood of the time t, the position (x, y) and the bin n is selected to be (t1, x1, y1 n1).
  • (t1, x1, y1 n1) is one or more sets. Then, the process proceeds to step S322.
  • step S322 the histogram H (t, x + b1, y + b2, n + b3) obtained from the accumulation unit 15 is input. Then, the histogram H (t1, x1 + b1, y1 + b2, n1 + b3) obtained from the accumulation unit 15 is input to each of (t1, x1, y1 n1).
  • b1 ⁇ to ⁇
  • b2 ⁇ to ⁇
  • b3 ⁇ to ⁇ .
  • Equation 29 is calculated for H (t, x + b1, y + b2, n + b3) and H (t1, x1 + b1, y1 + b2, n1 + b3) to obtain ⁇ (t, x + b1, y + b2, n + b3) and ⁇ (t1). , X1 + b1, y1 + b2, n1 + b3).
  • b1 ⁇ to ⁇
  • b2 ⁇ to ⁇
  • b3 ⁇ to ⁇ .
  • step S324 the following equation 38 is calculated.
  • the accumulation target in Expression 38 is (t1, x1, y1 n1) selected in step S321. Then, the process proceeds to step S325.
  • step S 325 ⁇ NR (t, x, y, n), which is the calculation result of equation 38, is output as a sharpened incidence rate. Then, the series of processing ends.
  • Equation 33 ⁇ (t, x, y, n), which is itself, is a weight 1, and for ⁇ (t1, x1, y1, n1) at nearby positions, the weight “1 ⁇ (“ time t , Location (x, y), bin n at the center, and "sum of the separation of the group at time t1, location (x1, y1), bin n1") " Equation 33 is equivalent to
  • Equation 38 zero division may occur similarly to Equation 36. However, as a method of avoiding zero division, as described in the explanation of Equation 36, a known conventional means may be used. Equation 38 does not touch on this because it has nothing to do with the purpose of this embodiment.
  • the sharpened incidence rate ⁇ NR (t, x, y, n) of the target bin n at the target position (x, y) at the target time t can be obtained.
  • Equation 38 performs this calculation.
  • a camera 100 provided to the distance measuring device 10 is used.
  • the camera 100 is an apparatus capable of capturing an image, and captures the same direction as the direction measured by the SPAD array 13 of the distance measuring device 10.
  • the pixel value E (t, x, y) in the image of the camera 100 corresponding to the object measured by the SPAD at the focused position (x, y) at the focused time t of the SPAD array 13 and the time t 1 of the SPAD array 13 If the SPAD at position (x1, y1) is similar to the pixel value E (t1, x1, y1) in the image of the camera 100 corresponding to the object being measured, the same object is photographed in the camera 100 it seems to do. That is, in this case, the objects measured by the two SPADs are considered to be the same. If the pixel values are different, it is considered that a different object is being measured.
  • the target position (x, y) at the target time t is obtained.
  • the weight when adding the histogram or the occurrence rate of the position (x1, y1) at time t1 to the histogram or the occurrence rate is weighted. Otherwise, the weights to be added are reduced or not added. In this way, appropriate histograms or rates can be added, and it is possible to remove histograms or rates of noise.
  • (t1, x1, y1) is the vicinity of (t, x, y) in space-time.
  • E (t, x, y) is a luminance value when the camera 100 captures an image of the object measured by SPAD at the position (x, y) at time t at time t.
  • E (t1, x1, 1y) is a luminance value when the camera 100 captures an image of the object measured by SPAD at the position (x1, y1) at time t1 at time t1.
  • the weight is determined depending on the distance between "position (x, y)" and “position (x1, y1)". There is.
  • FIG. 38 is a flowchart illustrating an example of a processing procedure of noise removal of an occurrence rate in the fifth example of the third embodiment of the present technology.
  • noise removal i.e., sharpening
  • the focus position (x, y) at the focus time t and the occurrence rate ⁇ (t, x, y, n) in the focus bin n is performed.
  • step S331 in the space-time and the bin, the neighborhood of the time t, the position (x, y) and the bin n is selected to be (t1, x1, y1 n1).
  • (t1, x1, y1 n1) is one or more sets. Then, the process proceeds to step S332.
  • step S332 the histogram H (t, x, y, n) obtained from the accumulation unit 15 is input. Then, the histogram H (t1, x1, y1, n1) obtained from the accumulation unit 15 is input to each of (t1, x1, y1 n1). Then, the process proceeds to step S333.
  • step S333 equation 29 is calculated for H (t, x, y, n) and H (t1, x1, y1, n1) to obtain ⁇ (t, x, y, n) and ⁇ (t1). , X1, y1, n1). Then, the process proceeds to step S334.
  • step S334 the pixel value in the image of the camera 100 corresponding to "the object measured by SPAD in (t, x, y)" is input. Let E (t, x, y). A pixel value in an image of the camera 100 corresponding to “an object measured by SPAD in each of (t1, x1, y1)” is input. Let E (t1, x1, y1). Then, the process proceeds to step S335.
  • step S335 the following equation 39 is calculated.
  • the accumulation target in Expression 39 is (t1, x1, y1 n1) selected in step S331. Then, the process proceeds to step S336.
  • step S 336 ⁇ NR (t, x, y, n), which is the calculation result of Expression 39, is output as the sharpened occurrence rate. Then, the series of processing ends.
  • Equation 39 ⁇ (t, x, y, n) which is itself is a weight 1, and for ⁇ (t1, x1, y1, n1) at a nearby position, a weight “1 ⁇ (“ time t , The distance between position (x, y), bin n and "time t1, position (x1, y1), bin n1" ⁇ (E, t, x, y) and E (t1, x1, y1) Is the same as Equation 33 obtained by adding the absolute value of.
  • Equation 39 zero division may occur similarly to Equation 36.
  • a known conventional means may be used. Equation 39 does not refer to this because it has nothing to do with the purpose of this embodiment.
  • the sharpened incidence rate ⁇ NR (t, x, y, n) of the target bin n at the target position (x, y) at the target time t can be obtained.
  • the weight is determined by the similarity (difference between two values) of one pixel value corresponding to one SPAD to be focused on and one pixel value corresponding to each SPAD in the vicinity. It was In the sixth embodiment, the pixel values of a plurality of pixel groups centered on "the pixel corresponding to the target SPAD" are similar to the pixel values of the pixel group centered on the "pixel corresponding to the neighboring SPAD". It is an example which determines a weight by sex. There is also the possibility of an erroneous determination if the similarity is determined by comparing one pixel with another, but the comparison of a plurality of pixels makes the determination of the similarity more reliable.
  • FIG. 39 and FIG. 40 are flowcharts illustrating an example of the processing procedure of the noise removal of the occurrence rate in the sixth example of the third embodiment of the present technology.
  • noise removal i.e., sharpening
  • the focus position (x, y) at the focus time t and the occurrence rate ⁇ (t, x, y, n) in the focus bin n is performed.
  • step S341 is performed, which is the same as step S331 described above, and the description thereof is omitted. Then, the process proceeds to step S342.
  • Step S342 is the same process as step S332 described above, and the description is omitted. Then, the process proceeds to step S343.
  • Step S343 is the same process as step S333 described above, and the description thereof is omitted. Then, the process proceeds to step S344.
  • step S344 the pixel position in the image of the camera 100 corresponding to “the object measured by SPAD in (t, x, y)” is set to (u (t, x, y), v (t, x, y). )).
  • the pixel value of the position (u (t, x, y) + f1, v (t, x, y) + f2) in the image taken at time t of the camera 100 is input. Let these pixel values be G (t, u (t, x, y) + f1, v (t, x, y) + f2).
  • step S345 the following equation 40 is calculated.
  • the accumulation target in Equation 40 is (t1, x1, y1 n1) selected in step S341. Then, the process proceeds to step S346.
  • step S346 ⁇ NR (t, x, y, n), which is the calculation result of equation 40, is output as a sharpened incidence rate. Then, the series of processing ends.
  • Equation 40 ⁇ (t, x, y, n) which is itself is a weight 1, and for ⁇ (t1, x1, y1, n1) at a nearby position, a weight “1 ⁇ (“ time t , Distance between position (x, y), bin n and time t1, position (x1, y1), bin n1) / ((2F + 1) ⁇ (2F + 1) centered on the corresponding pixel position in the image of the camera 100 And the sum of the absolute values of the differences of the values of the pixel group), which is equivalent to the equation (33).
  • Equation 40 zero division may occur similarly to Equation 36.
  • known conventional means may be used. Equation 40 does not mention this because it has nothing to do with the purpose of this embodiment.
  • the sharpened incidence rate ⁇ NR (t, x, y, n) of the target bin n at the target position (x, y) at the target time t can be obtained.
  • the object measured by the SPAD at the position (x, y) at time t has a position (u (t, x, y), v (t, x, y) in the image when the camera 100 takes a picture at time t. ) Is projected.
  • the values (brightness values) of the pixels when projected are G (t, u (t, x, y), v (t, x, y)).
  • F1 -F to F
  • Equation 40 when the values of the pixel group consisting of (2F + 1) ⁇ (2F + 1) pixels are similar (the difference is small), the SPAD at the target position (x, y) at the target time t is measured. Since the object and the object measured by the SPAD at the position (x1, y1) at time t1 are considered to be the same, the weight is added and the addition is performed. If the values of the pixel groups are not similar (the difference is large), the weight is small.
  • FIG. 41 is a diagram showing a summary of specific examples of “information” and “proper addition” in the first to sixth examples of the third embodiment of the present technology.
  • the third embodiment is based on the following points.
  • Histogram or in a method of sharpening the rate of occurrence obtained from the histogram An input step of inputting a first histogram existing at each position in space-time; A first calculating step of calculating a corresponding incidence rate from the first histogram; An addition step of obtaining a second occurrence rate by performing addition for each bin of the first occurrence rate from the first information; Optionally calculating a second histogram from said second incidence rate; A histogram characterized by including the second occurrence rate or an output step of outputting the second histogram, or a sharpening method of the occurrence rate obtained from the histogram.
  • the first information is the space-time and the distance on the bin, A histogram characterized in that weighting is performed in accordance with the closeness of the distance, and addition is performed in the addition step, or a method of sharpening the rate of occurrence obtained from the histogram.
  • the first information is the similarity of each bin of the first occurrence rate, A histogram characterized in that weighting is performed according to the degree of similarity, and addition is performed in the addition step, or a method of sharpening the rate of occurrence obtained from the histogram.
  • a histogram sharpening method characterized in that the first information "the similarity of each bin of the first occurrence rate" is the similarity between a plurality of pairs in the space-time and the bins. .
  • the first information is the reliability of each bin of the first occurrence rate
  • the first information is the similarity between image data corresponding to the first occurrence rate, and A histogram characterized in that weighting is performed according to the degree of similarity, and addition is performed in the addition step, or a method of sharpening the rate of occurrence obtained from the histogram.
  • the first information “a similarity between image data corresponding to the first occurrence rate” is a histogram characterized in that it is a similarity for a plurality of sets of the image data How to sharpen the incidence rate obtained from
  • de-noising is applied to the incidence derived from the histogram. And, if necessary, a histogram is derived from the noise-eliminated occurrence rate. Thereby, finally, the denoised histogram can be calculated.
  • the calculation unit 16 As an example of this embodiment, there is also shown an example of noise removal of a histogram, but more preferably, noise removal of the occurrence rate is better.
  • the observed histogram H (t, x, y, n) is converted into an occurrence rate to perform noise removal on the occurrence rate. That is, noise removal of the occurrence rate ⁇ (t, x, y, n) represented by the following equation 41 is performed.
  • M (t, x, y, n-1) is defined by the following equation 42. It should be noted that the value of the occurrence rate ⁇ (t, x, y, n) in Equation 41 has an error of the standard deviation ⁇ (t, x, y, n) shown by Equation 43 below It is.
  • noise removal is performed on the value ⁇ (t, x, y, n) obtained by the equation 41 from the observed value H (t, x, y, n).
  • ⁇ (t, x, y, n) includes an error of the standard deviation ⁇ (t, x, y, n) represented by Expression 43.
  • HNR (t, x, y, n) is a denoised histogram. It is apparent from the equations 41 and 42 that the equation 44 holds.
  • noise removal is performed on the occurrence rate derived from the histogram as optimal noise removal. That is, the noise removal of the occurrence rate ⁇ (t, x, y, n) shown by the equation 41 including the error in which the standard deviation becomes the equation 43 is performed.
  • an example of denoising on the histogram rather than the incidence is also shown.
  • the standard deviation of this noise is expressed by the following equation 45, as can be understood from the explanation of the equation 7. It should be noted that the value of the observed histogram H (t, x, y, n) has an error of the standard deviation ⁇ H (t, x, y, n) shown by Equation 45.
  • N-dimensional vertical vector HNR (t, x, y) is defined by enumerating the noise-removed histogram HNR (t, x, y, n) for n. That is, it is defined by the following equation 47.
  • n 0 to N-1.
  • N-dimensional vertical vector s (t, x, y) is defined by enumerating scalar variables s (t, x, y, n) described later for n.
  • scalar variables a (t, x, y, n) for n "N-dimensional longitudinal vector a (t, x, y)" is defined.
  • scalar variables b (t, x, y, n) for n we define "N-dimensional vertical vector b (t, x, y)". That is, it defines by the following formula 48.
  • n 0 to N-1.
  • Lp norm is described by Equation 49 below.
  • p is 0 or more, including infinity.
  • this symbol and the definition of Lp norm are used in the same manner as commonly used terms.
  • p is not limited to 0 and 2 in this embodiment.
  • Equation 50 the gradient (gradient) is described by Equation 50. It should be noted that in the example of this embodiment, the symbol ⁇ is an operator for position (x, y) and does not act for time t, bin n.
  • Equation 52 the noise removal of the histogram in the fourth embodiment.
  • the occurrence rate ⁇ NR (t, x) such that the sum of two terms, DataTerm (data term: data term) and SmoothTerm (smoothing term: smooth term or regularization term) is minimized.
  • Y, n or the histogram HNR (t, x, y, n).
  • the data term DataTerm ⁇ is a value ⁇ (t, x, y, n) obtained by the equation 41 from the observed value H (t, x, y, n) And ⁇ NR (t, x, y, n) preferably have the same value.
  • SmoothTerm which is a smoothing term, is a term that acts so that ⁇ NR (t, x, y, n) of the neighbors become similar values.
  • the data term DataTerm H has the same value as the observed value H (t, x, y, n), preferably HNR (t, x, y, n) It is a term that acts as The smoothing term SmoothTermH is a term that acts so that the HNRs (t, x, y, n) of the neighbors become similar values.
  • peak detection of a histogram is generally performed in distance measurement by SPAD.
  • peak detection may be performed by searching for bin n at the denoised incidence rate ⁇ NR (t, x, y, n).
  • n 0 to N-1.
  • the distance measurement device 10 is used to perform distance measurement in each SPAD of the SPAD array 13.
  • noise removal of the occurrence rate obtained by the above-mentioned equation 41 is intended from “a histogram that is an observation value of the accumulation unit 15”.
  • the noise removal of the occurrence rate is performed in the computing unit 16.
  • the denoised incidence rate ⁇ NR (t, x, y, n) shown by the equation 51 is obtained.
  • DataTerm ⁇ is represented by the following Equation 53.
  • SmoothTerm ⁇ is expressed by the following equation 54.
  • ⁇ (t, x, y, n) is a value calculated by Expression 41 from the observed value H (t, x, y, n). Further, ⁇ (t, x, y, n) is a value calculated by Equation 43. As ⁇ NR (t, x, y, n) desired to be finally obtained becomes closer to the observed value ⁇ (t, x, y, n), the value of Expression 53 becomes smaller. In Equation 53, the reason for dividing by ⁇ (t, x, y, n) is to make it depend on the accuracy of the observed value ⁇ (t, x, y, n).
  • Equation 54 The first term on the right side of Equation 54 indicates that ⁇ NR (t, x, y, n) to be finally obtained is smooth in the time direction. That is, the smaller the value obtained by partially differentiating ⁇ NR (t, x, y, n) at time t, the smaller the value of Expression 54 becomes.
  • ⁇ NR (t, x, y, n) to be finally obtained is smooth in the space (x, y) direction. That is, the smaller the value obtained by partially differentiating ⁇ NR (t, x, y, n) in space (x, y), the smaller the value of Expression 54 becomes.
  • Equation 54 The third term on the right side of Equation 54 indicates that ⁇ NR (t, x, y, n) to be finally obtained is smooth in the bin direction. That is, the smaller the value obtained by partially differentiating ⁇ NR (t, x, y, n) with bin n, the smaller the value of Expression 54 becomes.
  • FIG. 42 is a flowchart illustrating an example of a processing procedure of noise removal of an occurrence rate in the first example of the fourth embodiment of the present technology. By this process, noise removal of the occurrence rate is performed.
  • step S411 each histogram H (t, x, y, n) obtained from the accumulation unit 15 is input. Then, the process proceeds to step S412.
  • step S412 Equation 41 is calculated for each H (t, x, y, n) to obtain ⁇ (t, x, y, n). Then, Equation 43 is calculated to obtain ⁇ (t, x, y, n). Then, the process proceeds to step S413.
  • step S413 equation 51 is solved to obtain ⁇ NR (t, x, y, n).
  • DataTerm ⁇ and SmoothTerm ⁇ in Expression 51 are Expression 53 and Expression 54, respectively. Then, the process proceeds to step S414.
  • step S 414 ⁇ NR (t, x, y, n) is output as the noise-eliminated occurrence rate. Then, the series of processing ends.
  • noise removal of the occurrence rate at each time t, each position (x, y), and each bin n of the SPAD array 13 is performed. Thereafter, the calculation unit 16 detects a peak for the noise-eliminated occurrence rate. Then, a value obtained by multiplying the bin corresponding to the peak by c ⁇ D / 2 is output from the output terminal 17 as a distance. Since the bin n corresponds to a time of about n ⁇ D, the distance can be calculated by c ⁇ D / 2 times.
  • peak detection is performed by a known method.
  • the histogram HNR (t, x, y, n) is calculated according to the above equation 44 for the noise-eliminated occurrence rate, and peak detection is performed on the histogram HNR (t, x, y, n) It is also good.
  • Equation 51 may be solved assuming that DataTerm ⁇ and SmoothTerm ⁇ are Equation 53 and Equation 55, respectively.
  • ⁇ x and ⁇ y are the contributions of smoothness in the x direction and y direction, respectively, and are desired constants of 0 or more.
  • the noise removal of the occurrence rate is performed in the first embodiment described above
  • the noise removal of the histogram is performed in the second embodiment. That is, in this second embodiment, distance measurement is performed on each SPAD of the SPAD array 13 using the distance measuring device 10.
  • the present invention is characterized in that noise removal of "a histogram which is an observation value of the accumulation unit 15" is intended.
  • the noise removal of the histogram is performed by the calculation unit 16.
  • the denoised histogram HNR (t, x, y, n) represented by the above-mentioned equation 52 is obtained.
  • DataTermH is expressed by the following equation 56.
  • SmoothTermH is expressed by the following equation 57.
  • FIG. 43 is a flowchart illustrating an example of a processing procedure of denoising a histogram in the second example of the fourth embodiment of the present technology. By this process, noise removal of the histogram is performed.
  • step S421 each histogram H (t, x, y, n) obtained from the accumulation unit 15 is input. Then, the process proceeds to step S422.
  • step S 422 equation 45 is calculated for each H (t, x, y, n) to obtain ⁇ H (t, x, y, n). Then, the process proceeds to step S423.
  • step S423 equation 52 is solved to obtain HNR (t, x, y, n).
  • DataTermH and SmoothTermH in Expression 52 are Expression 56 and Expression 57, respectively. Then, the process proceeds to step S424.
  • step S424 HNR (t, x, y, n) is output as a noise-removed histogram. Then, the series of processing ends.
  • noise removal of the histogram at each time t, each position (x, y), and each bin n of the SPAD array 13 is performed. Thereafter, the computing unit 16 detects a peak for the noise-removed histogram. Then, a value obtained by multiplying the bin corresponding to the peak by c ⁇ D / 2 is output from the output terminal 17 as a distance.
  • peak detection is performed by a known method.
  • Formula 58 may be used as SmoothTerm H instead of Formula 57. That is, Equation 52 may be solved assuming that DataTermH and SmoothTermH are Equation 56 and Equation 58, respectively.
  • ⁇ x and ⁇ y are the contributions of smoothness in the x direction and y direction, respectively, and are desired constants of 0 or more.
  • the camera 100 provided to the distance measuring device 10 is used.
  • the camera 100 is an apparatus capable of capturing an image, and captures the same direction as the direction measured by the SPAD array 13 of the distance measuring device 10.
  • I (t, x, y) be the pixel value (brightness value) in the image of the camera 100 corresponding to the object measured by the SPAD at each position (x, y) at each time t of the SPAD array 13.
  • the pixel value I (t, x, y) is obtained by photographing the SPAD at the position (x, y) at time t in the camera 100. It is a value of a pixel obtained by photographing the same direction as the moving direction.
  • I (t1, x1, y1) and I (t2, x2, y2) have substantially the same value (pixel value)
  • the true histograms or true incidences corresponding to (t1, x1, y1) and (t2, x2, y2) are considered to have the same shape.
  • it is preferable to apply a smoothing term SmoothTermH or SmoothTerm ⁇ so that these two histograms or occurrence rates become as equal as possible.
  • the distance measurement device 10 is used to perform distance measurement in each SPAD of the SPAD array 13.
  • noise removal of the occurrence rate obtained by the above-mentioned equation 41 is intended from “a histogram that is an observation value of the accumulation unit 15”.
  • the noise removal of the occurrence rate is performed by the operation unit 16.
  • the denoised occurrence rate ⁇ NR (t, x, y, n) shown by the equation 51 is obtained.
  • DataTerm ⁇ is represented by the above-mentioned equation 53.
  • SmoothTerm ⁇ is expressed by the following equation 59.
  • the vector s (t, x, y) is defined by the above-described equation 48.
  • eacross (t, x, y), ealong (t, x, y), ⁇ across (t, x, y), and ⁇ along (t, x, y) appearing in expression 59 are the following expressions 60 to equation 63.
  • is a desired minute value (constant)
  • eacross (t, x, y) defined by Equation 60 is a unit direction vector perpendicular to (crossing the edge) the edge direction of the image.
  • Ealong (t, x, y) defined by Equation 61 is a unit direction vector along the edge direction of the image.
  • Equation 59 When the value of partial derivative of I (t, x, y) with respect to x or y is 0, zero division occurs in Equation 59. Therefore, practically, in order to avoid zero division, when the value of partial derivative of I (t, x, y) for x or y is 0, it is necessary to replace it with a minute value. This is a known means, which is not related to the purpose of this embodiment, and is not mentioned in Equation 59.
  • Equation 53 used in the third embodiment has already been described in the first embodiment, and thus the detailed description will be omitted.
  • the first term on the right side of Formula 59 will be described.
  • the x-direction differential value (difference value) of ⁇ NR (t, x, y, n) to be finally obtained and the x-direction differential value (difference value) of the pixel value I (t, x, y) of the corresponding image ) Is a term that acts to be equal to s (t, x, y, n).
  • the ratio to the difference value) is also a term that acts to be equal to s (t, x, y, n). That is, the derivative of ⁇ NR (t, x, y, n) and the derivative of I (t, x, y) have a linear relationship, and the ratio is preferably s (t, x, y, n) Is a term that works to Here, n is 0 to N-1.
  • ⁇ xy is a contribution ratio of the linearity of the derivative of ⁇ NR (t, x, y, n) in the direction of space (x, y) and the derivative of I (t, x, y), and is 0 or more Is the desired constant of
  • Equation 59 is a term that acts on the tolerance of the change in s (t, x, y, n) with respect to the direction across / along the edge.
  • ⁇ edge is a contribution rate related to the allowance of change of s (t, x, y, n) at an edge, and is a desired constant of 0 or more.
  • FIG. 44 is a flowchart illustrating an example of a processing procedure of noise removal of an occurrence rate in the third example of the fourth embodiment of the present technology. By this process, noise removal of the occurrence rate is performed.
  • step S431 each histogram H (t, x, y, n) obtained from the accumulation unit 15 is input.
  • the pixel values (brightness values) I (t, x, y) in the image of the camera 100 corresponding to the object measured by the SPAD at each position (x, y) at each time t are input. Then, the process proceeds to step S432.
  • step S432 Equation 41 is calculated for each H (t, x, y, n) to obtain ⁇ (t, x, y, n). Then, Equation 43 is calculated to obtain ⁇ (t, x, y, n). Then, the process proceeds to step S433.
  • step S433 equation 51 is solved to determine ⁇ NR (t, x, y, n).
  • DataTerm ⁇ and SmoothTerm ⁇ in Expression 51 are Expression 53 and Expression 59, respectively.
  • step S434 ⁇ NR (t, x, y, n) is output as the noise-eliminated occurrence rate. Then, the series of processing ends.
  • noise removal of the occurrence rate at each time t, each position (x, y), and each bin n of the SPAD array 13 is performed.
  • the calculation unit 16 detects a peak with respect to the noise-eliminated occurrence rate.
  • a value obtained by multiplying the bin corresponding to the peak by c ⁇ D / 2 is output from the output terminal 17 as a distance.
  • peak detection is performed by a known method.
  • the histogram HNR (t, x, y, n) is calculated according to the above equation 44 for the noise-eliminated occurrence rate, and peak detection is performed on the histogram HNR (t, x, y, n) It is also good.
  • the noise removal of the occurrence rate is performed in the third embodiment described above
  • the noise removal of the histogram is performed in the fourth embodiment. That is, in the fourth embodiment, distance measurement is performed on each SPAD of the SPAD array 13 using the distance measuring device 10.
  • the present invention is characterized in that noise removal of "a histogram which is an observation value of the accumulation unit 15" is intended.
  • the noise removal of the histogram is performed by the calculation unit 16.
  • the denoised histogram HNR (t, x, y, n) represented by equation 52 is obtained.
  • DataTermH is represented by the above-mentioned equation 56.
  • SmoothTermH is expressed by the following equation 64.
  • the vector s (t, x, y) is defined by the above-described equation 48.
  • eacross (t, x, y), ealong (t, x, y), ⁇ across (t, x, y), and ⁇ along (t, x, y) appearing in the equation 64 are each as described above. Equations 60 to 63 of
  • equation 56 used in the fourth embodiment has already been described in the second embodiment, and thus the detailed description is omitted.
  • FIG. 45 is a flowchart illustrating an example of a processing procedure of denoising a histogram in a fourth example of the fourth embodiment of the present technology. By this process, noise removal of the histogram is performed.
  • step S 441 each histogram H (t, x, y, n) obtained from the accumulation unit 15 is input.
  • the pixel values (brightness values) I (t, x, y) in the image of the camera 100 corresponding to the object measured by the SPAD at each position (x, y) at each time t are input. Then, the process proceeds to step S442.
  • step S 442 equation 45 is calculated for each H (t, x, y, n) to obtain ⁇ H (t, x, y, n). Then, the process proceeds to step S443.
  • step S443 equation 52 is solved to obtain HNR (t, x, y, n).
  • DataTermH and SmoothTermH in Expression 52 are Expression 56 and Expression 64, respectively.
  • step S444 HNR (t, x, y, n) is output as a noise-removed histogram. Then, the series of processing ends.
  • noise removal of the histogram at each time t, each position (x, y), and each bin n of the SPAD array 13 is performed. Thereafter, the computing unit 16 detects a peak for the noise-removed histogram. Then, a value obtained by multiplying the bin corresponding to the peak by c ⁇ D / 2 is output from the output terminal 17 as a distance.
  • peak detection is performed by a known method.
  • distance measurement in each SPAD of the SPAD array 13 is performed using the distance measuring device 10.
  • noise removal of the occurrence rate obtained by the above-mentioned equation 41 is intended from “a histogram that is an observation value of the accumulation unit 15”.
  • the noise removal of the occurrence rate is performed by the operation unit 16.
  • the denoised occurrence rate ⁇ NR (t, x, y, n) shown by the equation 51 is obtained.
  • DataTerm ⁇ is represented by the above-mentioned equation 53.
  • SmoothTerm ⁇ is expressed by the following equation 65.
  • the vector a (t, x, y) and the vector b (t, x, y) are defined by the above-mentioned equation 48.
  • dT, dX, and dY are respectively desired constants of 0 or more.
  • the first-order coefficient in this linear form is a (t, x, y, n), and the zero-order coefficient is b (t, x, y, n).
  • the first term on the right side of Formula 65 is a term that acts to establish this linear relationship as much as possible.
  • n is 0 to N-1.
  • ⁇ 1 is a contribution rate with respect to the degree of establishment of the relationship of linearity, and is a desired constant of 0 or more.
  • the term for canceling the instability is the second term of the right side of Expression 65. Even if a (t, x, y, n) is unstable only with the first term, this second term selects a small value for a (t, x, y, n) It can be made to act and a (t, x, y, n) can be determined.
  • n is 0 to N-1.
  • ⁇ 2 is a contribution rate to this instability cancellation, and is a desired constant of 0 or more.
  • FIG. 46 is a flowchart illustrating an example of a processing procedure of noise removal of an occurrence rate in the fifth example of the fourth embodiment of the present technology. By this process, noise removal of the occurrence rate is performed.
  • step S451 each histogram H (t, x, y, n) obtained from the accumulation unit 15 is input.
  • the pixel values (brightness values) I (t, x, y) in the image of the camera 100 corresponding to the object measured by the SPAD at each position (x, y) at each time t are input. Then, the process proceeds to step S452.
  • step S452 Equation 41 is calculated for each H (t, x, y, n) to obtain ⁇ (t, x, y, n). Then, Equation 43 is calculated to obtain ⁇ (t, x, y, n). Then, the process proceeds to step S453.
  • step S453 equation 51 is solved to obtain ⁇ NR (t, x, y, n).
  • DataTerm ⁇ and SmoothTerm ⁇ in Expression 51 are Expression 53 and Expression 65, respectively.
  • a (t, x, y, n) and b (t, x, y, n) are arbitrary scalar quantities. That is, ⁇ NR (t, x, y, n), a (t, x, y, n), and b (t, x, y, n) such that the sum of Eqs. 53 and 65 is minimized.
  • only ⁇ NR (t, x, y, n) is taken as the calculation result. Then, the process proceeds to step S454.
  • step S454 ⁇ NR (t, x, y, n) is output as the noise-eliminated occurrence rate. Then, the series of processing ends.
  • noise removal of the occurrence rate at each time t, each position (x, y), and each bin n of the SPAD array 13 is performed. Thereafter, the calculation unit 16 detects a peak for the noise-eliminated occurrence rate. Then, a value obtained by multiplying the bin corresponding to the peak by c ⁇ D / 2 is output from the output terminal 17 as a distance.
  • peak detection is performed by a known method.
  • the histogram HNR (t, x, y, n) is calculated according to the above equation 44 for the noise-eliminated occurrence rate, and peak detection is performed on the histogram HNR (t, x, y, n) It is also good.
  • the noise removal of the occurrence rate is performed, but in the sixth embodiment, the noise removal of the histogram is performed. That is, in the sixth embodiment, distance measurement is performed on each SPAD of the SPAD array 13 using the distance measuring device 10.
  • the present invention is characterized in that noise removal of "a histogram which is an observation value of the accumulation unit 15" is intended. The noise removal of the histogram is performed by the calculation unit 16.
  • the denoised histogram HNR (t, x, y, n) shown by the equation 52 is obtained.
  • DataTermH is represented by the above-mentioned equation 56.
  • SmoothTermH is expressed by the following equation 68.
  • the vector a (t, x, y) and the vector b (t, x, y) are defined by the above-mentioned equation 48.
  • dT, dX, and dY are respectively desired constants of 0 or more.
  • equation 56 used in the sixth embodiment has already been described in the second embodiment, and thus the detailed description is omitted.
  • Expression 68 Since the description of Expression 68 is the same as that in Expression 65 by replacing H with H, detailed description will be omitted. Note that ⁇ 1 and ⁇ 2 are desired constants of 0 or more.
  • FIG. 47 is a flowchart illustrating an example of a processing procedure of denoising a histogram in the sixth example of the fourth embodiment of the present technology. By this process, noise removal of the histogram is performed.
  • step S461 each histogram H (t, x, y, n) obtained from the accumulation unit 15 is input.
  • the pixel values (brightness values) I (t, x, y) in the image of the camera 100 corresponding to the object measured by the SPAD at each position (x, y) at each time t are input. Then, the process proceeds to step S462.
  • step S 462 equation 45 is calculated for each H (t, x, y, n) to obtain ⁇ H (t, x, y, n). Then, the process proceeds to step S463.
  • step S463 equation 52 is solved to obtain HNR (t, x, y, n).
  • DataTermH and SmoothTermH in Expression 52 are Expression 56 and Expression 68, respectively.
  • a (t, x, y, n) and b (t, x, y, n) are arbitrary scalar quantities. That is, HNR (t, x, y, n), a (t, x, y, n) and b (t, x, y, n) such that the sum of Eqs. 56 and 68 is minimized. Among them, only HNR (t, x, y, n) is taken as the calculation result. Then, the process proceeds to step S464.
  • step S464 HNR (t, x, y, n) is output as a noise-removed histogram. Then, the series of processing ends.
  • noise removal of the histogram at each time t, each position (x, y), and each bin n of the SPAD array 13 is performed. Thereafter, the computing unit 16 detects a peak for the noise-removed histogram. Then, a value obtained by multiplying the bin corresponding to the peak by c ⁇ D / 2 is output from the output terminal 17 as a distance.
  • peak detection is performed by a known method.
  • the first policy is to correct the histogram or the occurrence rate so as to match the observed value as much as possible.
  • the second policy is to correct the histogram or the occurrence rate of the neighbors so that the change is small.
  • the second policy in addition, by using the correlation with the image obtained from the camera attached to the side, depending on each position (t, x, y) in space-time, manipulate the amount of change between adjacent areas You may
  • the fourth embodiment has the following points as its main point.
  • Histogram or denoising method of the incidence obtained from the histogram An input step of inputting a first histogram or a first occurrence rate existing at each position in space-time; A denoising calculation step of denoising from the first histogram or the first histogram and calculating a second histogram or a second incidence rate; Outputting the second histogram or the second occurrence rate;
  • the second histogram or the second occurrence rate is set so that the sum of the two operators of the second action that causes the histogram or the second occurrence rate to have a specific relationship is an extreme value.
  • a histogram characterized by performing a process of determining, or a method of removing noise from an incidence rate obtained from the histogram.
  • the second operator is obtained from the histogram characterized in that the second histogram of the neighborhoods in space-time or the operator acting to reduce the difference in the second occurrence rate is obtained from the histogram Noise removal method of the occurrence rate.
  • the ratio of “change in pixel value of the image” to “change in the second histogram or the second occurrence rate” becomes constant
  • the second operator is an operator that causes the image and the “second histogram or the second occurrence rate” to have a linear relationship for each local region in space-time.
  • the distance to the object can be determined by detecting the peak on the histogram and determining the time corresponding to the peak. Conventionally, this peak detection is judged by artificial threshold. In the fifth embodiment, this peak detection is performed by theoretical judgment.
  • the probability that photons come in within the time (D) corresponding to the bin is a value obtained by multiplying the occurrence rate by the time D, but in other embodiments, it is multiplied by a constant (D times) Was ignoring and thinking.
  • the occurrence rate it may be considered to be a value D times the generally used term “occurrence rate”.
  • Equation 8 is the final equation (probability density function of the occurrence rate p (n) when the frequency h (n) of each bin n is observed) derived from the theory in this embodiment. Therefore, when the frequency h (n) of each bin n is observed, the sum of the value obtained by dividing the square of the error when the occurrence rate of each bin n is p (n) by the variance is Equation 69 of The smaller the value of this equation 69, the higher the probability that the occurrence rate of each bin n is p (n).
  • n is 0 to N-1.
  • FIG. 48 is a diagram showing the appearance of a first example of distance measurement in the fifth embodiment of the present technology.
  • the SPAD sensor 13 measures the distance between an object (wall surface 501 and wall surface 502) at different distances at the same time.
  • the SPAD sensor 13 does not measure distance in one direction, but in reality measures distance in the entire direction having a certain solid angle (range-finding range in the drawing).
  • the figure shows that the wall surface 501 and the wall surface 502 exist in the distance measurement range.
  • the wall surface 501 and the wall surface 502 are assumed to be present at the distances Z (1) and Z (2), respectively.
  • FIG. 49 is a diagram showing an intensity distribution in a first example of distance measurement in the fifth embodiment of the present technology.
  • the SPAD sensor 13 receives light emitted from the light emitting unit 12 through reflection on the wall surface 501.
  • the intensity distribution is temporally shifted by 2 ⁇ Z (1) ⁇ c with respect to A in the figure.
  • the waveform becomes a (1) times the intensity of A in FIG.
  • a (1) is less than 1 and depends on the reflectance of Z (1) and the wall 501.
  • the SPAD sensor 13 receives light emitted from the light emitting unit 12 through reflection on the wall surface 502.
  • the intensity distribution is shifted by 2 ⁇ Z (2) ⁇ c with respect to A in the figure.
  • the waveform becomes a (2) times the intensity of A in FIG.
  • a (2) is less than 1 and depends on the reflectivity of Z (2) and the wall 502.
  • the SPAD sensor 13 receives ambient light.
  • the ambient light is constant regardless of time as shown by D in the figure, and is b.
  • the intensity of light reception in the SPAD sensor 13 is expressed by the following equation 70.
  • p (n) is expressed by the equation 72, and the equation 69 is minimized b, a (b) k) and Z (k) may be obtained.
  • the determined value is the most probable value when the frequency h (n) of each bin n is observed. That is, b determined is the intensity (luminance value) of the ambient light.
  • a (k) is the intensity (brightness value) when the k-th object is illuminated by active light.
  • Z (k) is the distance to the kth object.
  • k 1 to K.
  • the above-mentioned expression 72 is an expression expressing p (n) as a function of n.
  • the “number of objects having different distances” in the distance measurement range of the SPAD sensor 13 can be known by the following procedure. That is, the "minimum value of Expression 69" is checked while decrementing the value of K one by one from the large value. The value of K immediately before the “minimum value of Expression 69” suddenly becomes a large value is “the number of objects at different distances”.
  • FIG. 50 is a flowchart illustrating an example of a processing procedure of distance measurement processing in the first example of the fifth embodiment of the present technology. This process is performed by the calculation unit 16, and the result is output from the output terminal 17.
  • bK be the obtained solution b.
  • a (k) be aK (k).
  • Z (k) be ZK (k).
  • Kmax is a desired constant.
  • the maximum number assumed as the “number of objects having different distances” in the distance measurement range of the SPAD sensor 13 may be set as Kmax. Then, the process proceeds to step S513.
  • Error (K) be the value obtained by calculating Equation 69.
  • k 1 to K.
  • p (n) in Equation 69 is a function shown in Equation 73. Then, the process proceeds to step S514.
  • K Kmax-1
  • K K + 1
  • K Kopt
  • step S515 bKopt is output from the output terminal 17 as a luminance value when Kopt objects are illuminated by the ambient light.
  • the most probable result obtained from the observed value h (n) can be obtained.
  • the second embodiment is an example in which a state in which multi-pass (in the case where light is received through reflection at a plurality of places) is taken into consideration.
  • FIG. 51 is a diagram showing the appearance of a second example of distance measurement in the fifth embodiment of the present technology.
  • the light emission from the light emitting unit 12 is reflected by the wall surface 501 and received by the SPAD sensor 13 (see an optical path 504 and an optical path 505 in the figure).
  • light emitted from the light emitting unit 12 is first reflected by the wall surface 503 and further reflected by the wall surface 501 and received by the SPAD sensor 13 (see the optical path group 506, the optical path group 507, and the optical path 505).
  • the wall surface 501 is assumed to exist at the distance Z (1). Further, the total distance of the optical path group 506, the optical path group 507, and the optical path 505 is 2 ⁇ Z (2).
  • the light (the optical path group 506, the optical path group 507, and the optical path 505) which reaches the SPAD sensor 13 through the reflection at two places of the wall surface 503 and the wall surface 501 is supplemented. Since diffuse reflection occurs on the wall surface 503, the light reaching the SPAD sensor 13 is not reflected light from one point on the wall surface 503, but is reflected light from all points in a certain area. Therefore, as shown in the figure, the optical path groups 506 and 507 illustrate the light reaching the SPAD sensor 13 with a plurality of arrows as an “optical path group” instead of one “optical path”.
  • FIG. 52 is a diagram showing an intensity distribution in a second example of distance measurement in the fifth embodiment of the present technology.
  • the SPAD sensor 13 receives light emitted from the light emitting unit 12 through the light paths 504 and 505 through reflection on the wall surface 501.
  • the intensity distribution is temporally shifted by 2 ⁇ Z (1) ⁇ c with respect to A in the figure.
  • the waveform becomes a (1) times the intensity of A in FIG.
  • a (1) is less than 1 and depends on the reflectance of Z (1) and the wall 501.
  • the SPAD sensor 13 receives light emitted from the light emitting unit 12 by the optical path group 506, the optical path group 507, and the optical path 505 through reflection on the wall surface 503 and the wall surface 501.
  • the intensity distribution is temporally shifted by 2 ⁇ Z (2) ⁇ c with respect to A in the same figure.
  • the waveform becomes a (2) times the intensity of A in FIG.
  • a (2) is less than 1 and depends on the reflectance of Z (2) and the walls 503 and 501.
  • the optical paths in the optical path group 506 and the optical paths in the optical path group 507 have slightly different distances. Therefore, the distance of light coming through reflection on the wall surface 503 and the wall surface 501 is not exactly 2 ⁇ Z (2) but a value near 2 ⁇ Z (2). That is, as shown to C in the same figure, it has a spread. Expressed mathematically, the variance of the normal distribution of C in the figure is larger than the variance of the normal distribution of A in the figure.
  • the SPAD sensor 13 receives ambient light. As indicated by D in the figure, the ambient light is constant regardless of time, and is b.
  • the intensity of light reception in the SPAD sensor 13 is a value obtained by adding B, C and D in FIG.
  • the occurrence rate p (n) is expressed by the following equation 74.
  • the distance of the k-th object is Z (k)
  • the attenuation factor for that object is a (k)
  • the variance is ⁇ (k).
  • k 1 to K.
  • equation 69 is minimized assuming that p (n) is expressed by equation 74, b, a (b) k), ⁇ (k), Z (k) may be obtained.
  • the determined value is the most probable value when the frequency h (n) of each bin n is observed. That is, b determined is the intensity (luminance value) of the ambient light.
  • a (k) is the intensity (brightness value) when the k-th object is illuminated by active light.
  • Z (k) is the distance to the kth object.
  • k 1 to K.
  • FIG. 53 is a flowchart illustrating an example of a processing procedure of distance measurement processing in the second example of the fifth embodiment of the present technology. This process is performed by the calculation unit 16, and the result is output from the output terminal 17.
  • bK be the obtained solution b.
  • a (k) be aK (k).
  • ⁇ (k) be ⁇ K (k).
  • Z (k) be ZK (k).
  • Kmax is a desired constant. Then, the process proceeds to step S523.
  • a (k) is aK (k)
  • ⁇ (k) is ⁇ K (k)
  • Z (k) is ZK (k).
  • K Kmax-1
  • K K + 1
  • K Kopt
  • step S526 bKopt is output as the luminance value when the object is illuminated by the ambient light.
  • ZKopt (k) as the distance to Ks objects, and as the luminance value when each of the Ks objects is illuminated by active light , AKopt (k) are output.
  • k is an element of S. Then, the series of processing ends.
  • the third embodiment discusses the second embodiment described above from another viewpoint.
  • the occurrence rate is modeled as the sum of a plurality of "convex up functions". And it was judged that the part of "the function convex upwards" with a large dispersion
  • FIG. 54 is a flowchart illustrating an example of a processing procedure of light reception determination in a third example of the fifth embodiment of the present technology. By this processing, it can be determined whether the light corresponding to each peak is the light received through the reflection at a plurality of places.
  • n 0 to N-1.
  • M (n-1) is a value defined in the equation 4. Then, the process proceeds to step S533.
  • step S533 a peak is detected for the function p (n) of n.
  • the detected peak position is m.
  • the method of peak detection is a known method, and the detailed description thereof is omitted. Also, there are one or more peaks. Then, the process proceeds to step S534.
  • step S534 an average value of “absolute value of p (n) ⁇ p (n ⁇ 1)” is obtained in the range of m ⁇ L ⁇ n ⁇ m + L.
  • the degree of inclination in the vicinity of m is calculated. That is, it is calculated whether the peak is steep or broad. Then, the process proceeds to step S535.
  • step S535 when the above-described average value is less than the threshold value Th2, the light reception corresponding to the peak outputs information that the light received through the reflection at a plurality of places is received.
  • Th2 is a desired constant. Then, the series of processing ends.
  • the features of the fifth embodiment are as follows.
  • the occurrence rate is expressed as a function of time t (or bin n proportional thereto).
  • the function is expressed by the sum of a constant value (b) for time and a function convex (func (t)) upward for time.
  • Feature 3) There are one or more “convex functions upward”.
  • the occurrence rate of the feature 1 is obtained from the observed histogram (h (n)) according to the relationship between the occurrence rate and the histogram (the relation which makes the expression 69 a minimum). That is, the intensity (brightness value) when the object is illuminated by the ambient light is determined.
  • the intensity (brightness value) when the object is illuminated by the active light is determined. Then, the distance to the object is obtained.
  • feature 5 If the “convex function upward” that is a component in “the occurrence rate determined in feature 4” has a spread, it is light that has arrived at the SPAD sensor through a plurality of reflections to decide. If the “convex up function” is a steep function, it is determined that the light is reflected directly from the object and returned.
  • feature 6 If the peak in the occurrence rate has a spread, it is determined that the light has arrived at the SPAD sensor through a plurality of reflections. If the peak in the occurrence rate is a sharp peak, it is determined that the light is directly reflected from the object and returned.
  • the advantages of this fifth embodiment are as follows.
  • (Advantage 1) By executing the processing of the fifth embodiment, it is possible to obtain a theoretically correct solution (that is, the most probable solution). That is, the intensity (brightness value) when the object is illuminated by the ambient light can be obtained. Then, the intensity (brightness value) when the object is illuminated by the active light can be obtained. The distance to the object can then be determined.
  • (Advantage 2) It is possible to determine whether the light that has arrived at the SPAD sensor is light that has undergone multiple reflections or is light that reflects directly on the object and is returned.
  • the fifth embodiment is characterized by the following points.
  • (1) In the function fitting method of the occurrence rate obtained from the histogram, A first input step for inputting a histogram; A parameter calculation step of determining a parameter of a function that satisfies the relationship with the histogram when the occurrence rate is expressed as a function of time; A function fitting method of an occurrence rate obtained from a histogram characterized by comprising: a first output step of outputting the parameter.
  • the relationship between the incidence rate p (t) and the histogram h (t) is defined as M, where M is the number of measurements for obtaining the histogram.
  • Distance calculation method The distance calculation method.
  • the sixth embodiment operates so that the observed histogram and the occurrence rate have a theoretically correct relationship, and acts so that the parameters of the occurrence rates of the neighbors in the space-time have a specific relationship. By doing this, the distance or the luminance is correctly determined. That is, the present invention provides a method of performing appropriate noise removal with a small amount of calculation without assuming the positional relationship in advance.
  • the probability that photons come in within the time (D) corresponding to the bin is a value obtained by multiplying the occurrence rate by the time D, but in other embodiments, it is multiplied by a constant (D times) Was ignoring and thinking.
  • the occurrence rate it may be considered to be a value D times the generally used term “occurrence rate”.
  • the final equation derived from the theory in this embodiment according to equation 8 (probability density of the occurrence rate p (n) of bin n when the frequency h (n) of each bin n is observed) Function). Therefore, when the histogram at each time t and each position (x, y) is observed, if the histogram is H (t, x, y, n), the most probable “each time t, each position (x, The occurrence rate p (t, x, y, n) of y) is p (t, x, y, n) which minimizes the following equation 76.
  • n 0 to N-1.
  • Equation 76 H (t, x, y, n) / M (t, x, y, n-1) appearing in the numerator on the right side of Equation 76 corresponds to the average value of the normal distribution shown in Equation 8. doing.
  • the denominator on the right side of Equation 76 corresponds to the standard deviation of the normal distribution shown in Equation 8.
  • Each position in the SPAD array 13 is represented by (u, v).
  • u and v are each real numbers.
  • a (x, y) a region in the SPAD sensor 13 in which the SPAD indicated by (x, y) causes a reaction by the light (photon) coming in. That is, the light (photons) flying to the position (u, v) where (u, v) ⁇ A (x, y) causes the SPAD at the position (x, y) to react. Also, even if light (photon) is incident on the position (u, v), the SPAD does not necessarily react. Let the reaction rate be ⁇ (u, v, x, y).
  • a (x, y) matches the physical area of SPAD indicated by (x, y) in the SPAD sensor 13. That is, ideally, in the case of (x1, y1) ⁇ (x2, y2), there is no overlap between the area A (x1, y1) and the area A (x2, y2).
  • (x1, y1) and (x2, y2) are adjacent SPADs, an overlap of the area A (x1, y1) and the area A (x2, y2) exists. This is because, as the first reason, in the description of FIG. 1 described above, it has been described that light coming in is collected on each SPAD by the lens 13a.
  • the light may not be focused sufficiently and may be blurred. That is, light (photons) flying from the direction to reach the SPAD indicated by (x1, y1) in the SPAD sensor 13 reaches the SPAD indicated by (x2, y2) adjacent to it due to the blurring of the lens. Because there is also, as a second reason, even when light (photons) is incident on a region that is served by SPAD indicated by (x1, y1), the light (photons) travels through the semiconductor forming the SPAD array, This is because it may reach the SPAD indicated by (x2, y2) adjacent to it.
  • FIG. 55 is a diagram for describing the intensity distribution in the sixth embodiment of the present technology.
  • the intensity of light emitted from the light emitting unit 12 changes with time (t1)
  • the intensity is set to f (t1).
  • f (t1) becomes known.
  • a in the same figure shows a time transition of the intensity of light emission from the light emitting unit 12.
  • Active light for example, light from the light emitting unit 12
  • Z (t, u, v) be the distance to the object.
  • Incident light to the position (u, v) of the active light reaches the light emission from the light emitting unit 12 with a delay of 2 ⁇ Z (t, u, v) / c. .
  • light decays in proportion to the square of the distance.
  • the reflectance of the object be a (t u, v).
  • ambient light for example, light from the sun 30
  • the incident light photons
  • C in the figure shows the time transition of the intensity of ambient light incident on the position (u, v).
  • the intensity of light incident on the position (u, v) is the sum of B and C in FIG. Therefore, the occurrence rate of the bin n of SPAD at the position (x, y) is expressed by the following equation 79.
  • This equation 79 is obtained by changing the time t1 to n ⁇ D which is the time of the n-th bin and multiplying the time width D of the n-th bin with respect to the equation 78, and further, the reaction rate ((u, v , X, y) and integrate for (u, v) in the region A (x, y) of SPAD indicated by the position (x, y).
  • the time function f (t1) of the light emission intensity from the light emitting unit 12 can often be approximated by a normal distribution.
  • the light may be diffused after being diffused internally, and the returned light may have a spread than the normal distribution f (t1). That is, the light reflected back is normally distributed with respect to time, and its standard deviation may be larger than the standard deviation of f (t1).
  • the occurrence rate of the bin n of SPAD at the position (x, y) is expressed by the following equation 80.
  • the standard deviation ⁇ is a function of (u, v).
  • H (t, x, y, n) be the histogram.
  • the occurrence rate p (t, x, y, n) of the position (x, y) is p (t, x, y, n) that minimizes the equation 76.
  • n 0 to N-1.
  • p (t, x, y, n) in Expression 76 is expressed by Expression 79 or Expression 80.
  • b (t, u, v), a (t, u, v), Z (t, u) which minimize equation 76 when equation 79 is substituted into equation 76 , V).
  • (u, v) indicate the position in the SPAD array 13.
  • the obtained b (t, u, v) is the intensity (brightness) of the ambient light incident on the position (u, v) at time t.
  • a (t, u, v) is the intensity (brightness) of the active light incident on the position (u, v) at time t.
  • Z (t, u, v) is the distance to the object in the direction of the light incident on position (u, v) at time t.
  • b (t, u, v), a (t, u, v), Z (t) which minimize the equation 76 when the equation 80 is substituted into the equation 76 , U, v) and ⁇ (t, u, v).
  • the determined b (t, u, v), a (t, u, v), and Z (t, u, v) have the same meaning as the solution when equation 79 is substituted into equation 76.
  • the gradient is described by the following equation 84.
  • the symbol ⁇ is an operator for the position (u, v), and is the same as a generally used definition.
  • Equation 85 will be described.
  • the intensity (brightness) b (t, u, v) that is the intensity (brightness) of the ambient light incident on the position (u, v) at time t changes little with respect to time t. And there is little change in the position (u, v). Therefore, the value obtained by partially differentiating b (t, u, v) by t and the value obtained by partially differentiating the position (u, v) should be small values. Therefore, the minimization problem of Equation 81 is solved using these values as SmoothTerm (first and second terms on the right side of Equation 85).
  • Equation 85 respectively indicate the change amount of b (t, u, v) with respect to t and the contribution ratio of the change amount with respect to (u, v) to SmoothTerm, which are desired constants. .
  • ⁇ at and ⁇ as in Expression 85 respectively indicate the change amount of a (t, u, v) with respect to t, and the contribution rate of the change amount with respect to (u, v) to SmoothTerm, which are desired constants. .
  • ⁇ Zt and ⁇ Zs in Equation 85 respectively indicate the amount of change of Z (t, u, v) with respect to t and the contribution of the amount of change with respect to (u, v) to SmoothTerm, which are desired constants. .
  • FIG. 56 is a flowchart illustrating an example of a processing procedure of luminance value and distance calculation processing in the first example of the sixth embodiment of the present technology. This process is performed by the calculation unit 16, and the result is output from the output terminal 17.
  • step S611 the number M of measurements performed to create a histogram is input. Then, histogram data H (t, x, y, n) is input.
  • t is an integer of 1 or more
  • x 1 to X
  • y 1 to Y
  • n 0 to N ⁇ 1. Then, the process proceeds to step S612.
  • step S612 equation 81 is solved to obtain b (t, u, v), a (t, u, v), and Z (t, u, v).
  • DataTerm in Expression 81 is Expression 76
  • p (t, x, y, n) in Expression 76 is Expression 79
  • SmoothTerm in Expression 81 is Expression 85. Then, the process proceeds to step S619.
  • step S619 b (t, u, v) is output as the luminance value when the object is illuminated by the ambient light at each time t and each position (u, v). It outputs a (t, u, v) as the luminance value when the object is illuminated by the active light. Output Z (t, u, v) as the distance to the object. Then, the series of processing ends.
  • equation 86 will be described.
  • the first to sixth terms on the right side of Formula 86 are the same as those of Formula 85, and thus the description thereof is omitted.
  • Equation 86 ⁇ t and ⁇ s respectively indicate the change amount of ⁇ (t, u, v) with respect to t, and the contribution ratio of the change amount with respect to (u, v) to SmoothTerm, which are desired constants. .
  • FIG. 57 is a flowchart illustrating an example of a processing procedure of luminance value and distance calculation processing in a second example of the sixth embodiment of the present technology.
  • the processing of the second embodiment is performed by the operation unit 16, and the result is output from the output terminal 17.
  • Steps S611 and S619 have been described in the above-described first embodiment, and thus the description thereof is omitted here.
  • the following step S613 is executed instead of step S612 of the first embodiment described above.
  • step S613 equation 82 is solved to obtain b (t, u, v), a (t, u, v), Z (t, u, v), and ⁇ (t, u, v).
  • DataTerm in Expression 82 is Expression 76
  • p (t, x, y, n) in Expression 76 is Expression 80
  • SmoothTerm in Expression 82 is Expression 86.
  • the camera 100 provided to the distance measuring device 10 is used.
  • the camera 100 is an apparatus capable of capturing an image, and captures the same direction as the direction measured by the SPAD array 13 of the distance measuring device 10.
  • a pixel value (brightness value) in an image of the camera 100 corresponding to an object being measured at each position (u, v) at each time t of the SPAD array 13 is I (t, u, v).
  • the pixel value I (t, u, v) is the position (u, v) of the SPAD array 13 at time t in the camera 100. Is the value of a pixel taken in the same direction as the direction in which the image is taken.
  • the third to sixth embodiments exhibit particularly high effects when the number of pixels of the camera 100 is larger than the number (X ⁇ Y) of SPADs of the SPAD array 13.
  • the pixel pitch of the image of the camera 100 may be adopted as the pitch of (u, v).
  • I (t1, u1, v1) and I (t2, u2, v2) have substantially the same value (pixel value)
  • the object measured by (t1, u1, v1) of the SPAD array 13 and SPAD The objects (t2, u2, v2) of the array 13 being measured are considered to be the same.
  • b (t, u, v), a (t, u, v), Z (t, u, v), and ⁇ corresponding to (t1, u1, v1) and (t2, u2, v2) (T, u, v) are considered to be the same value.
  • I (t1, u1, v1) and I (t2, u2, v2) are completely different values (pixel values)
  • the object measured by (t1, u1, v1) of the SPAD array 13 and The objects measured by (t2, u2, v2) of the SPAD array 13 are considered to be different.
  • b (t, u, v), a (t, u, v), Z (t, u, v), and ⁇ corresponding to (t1, u1, v1) and (t2, u2, v2) (T, u, v) are considered to be different values.
  • Expression 87 is adopted as SmoothTerm, which is the above-mentioned “real limitation”.
  • DataTerm is Expression 76 when Expression 79 is substituted into Expression 76, and Equation 81 is solved.
  • eacross (t, u, v), ealong (t, u, v), ⁇ across (t, u, v), and ⁇ along (t, u, v) appearing in the equation 87 are the following equations It is defined by 88 to expression 91.
  • is a desired minute value (constant)
  • Equation 88 is a unit direction vector perpendicular to (crossing the edge) the edge direction of the image.
  • Ealong (t, u, v) defined by Equation 89 is a unit direction vector along the edge direction of the image.
  • the differential value (difference value) in the v direction of b (t, u, v) to be finally obtained and the differential value (difference value) in the v direction of the pixel value I (t, u, v) of the corresponding image Is also a term that acts to be equal to sb (t, u, v). That is, the differential value of b (t, u, v) and the differential value of I (t, u, v) are in a linear relationship, and the operation is performed such that the ratio becomes sb (t, u, v) as much as possible.
  • ⁇ bs is a contribution ratio of the linearity of the differential value of b (t, u, v) and the differential value of I (t, u, v) in the space (u, v) direction, and a desired value of 0 or more Is a constant of
  • the amount of change in b (t, u, v) and the amount of change in I (t, u, v) are correlated. This is because in the direction along the edge, the same object (that is, the same distance, the same luminance value) is obtained. Therefore, the amount of change in sb (t, u, v) in this direction is made smaller.
  • the contribution to SmoothTerm is increased by multiplying "the derivative of sb (t, u, v) in this direction" by a large value of ⁇ along (t, x, y).
  • Equation 87 is a term that acts on the tolerance of the change in sb (t, u, v) with respect to the direction across / along the edge.
  • ⁇ be is a contribution rate related to the allowance of change of sb (t, u, v) at an edge, and is a desired constant of 0 or more.
  • ⁇ as is a contribution ratio of the linearity of the differential value of a (t, u, v) and the differential value of I (t, u, v) in the space (u, v) direction
  • Is a constant of ⁇ ae is a contribution related to the tolerance of the change of sa (t, u, v) at the edge, and is a desired constant of 0 or more.
  • ⁇ Zs is a contribution ratio of the linearity of the differential value of Z (t, u, v) in the space (u, v) direction and the differential value of I (t, u, v), and a desired value of 0 or more Is a constant of ⁇ Ze is a contribution related to the allowance of the change of sZ (t, u, v) at an edge, and is a desired constant of 0 or more.
  • FIG. 58 is a flowchart illustrating an example of a processing procedure of luminance value and distance calculation processing in a third example of the sixth embodiment of the present technology.
  • the processing of the third embodiment is performed by the operation unit 16, and the result is output from the output terminal 17.
  • step S621 the number M of measurements performed to create a histogram is input. Then, histogram data H (t, x, y, n) is input.
  • t is an integer of 1 or more
  • x 1 to X
  • y 1 to Y
  • n 0 to N ⁇ 1.
  • pixel values (brightness values) I (t, u, v) in the image of the camera 100 corresponding to the object measured at each position (u, v) at each time t of the SPAD array 13 are input. Then, the process proceeds to step S622.
  • step S 622 equation 81 is solved to obtain b (t, u, v), a (t, u, v), and Z (t, u, v).
  • DataTerm in Expression 81 is Expression 76
  • p (t, x, y, n) in Expression 76 is Expression 79
  • SmoothTerm in Expression 81 is Expression 87.
  • sb (t, u, v), sa (t, u, v), and sZ (t, u, v) are arbitrary scalar quantities, respectively.
  • step S629 for each time t and each position (u, v), b (t, u, v) is output as the luminance value when the object is illuminated by the ambient light. It outputs a (t, u, v) as the luminance value when the object is illuminated by the active light. Output Z (t, u, v) as the distance to the object. Then, the series of processing ends.
  • the seventh term and the eighth term on the right side of the equation 92 are obtained by replacing b (t, u, v) of the first term and the second term with ⁇ (t, u, v), and the explanation thereof Omit.
  • ⁇ s is a contribution ratio of the linearity of the derivative of ⁇ (t, u, v) in the direction of space (u, v) and the derivative of I (t, u, v), and a desired value of 0 or more
  • Is a constant of ⁇ e is a contribution rate related to the allowance of change of s ⁇ (t, u, v) at an edge, and is a desired constant of 0 or more.
  • FIG. 59 is a flowchart illustrating an example of a processing procedure of luminance value and distance calculation processing in a fourth example of the sixth embodiment of the present technology. This process is performed by the calculation unit 16, and the result is output from the output terminal 17.
  • step S621 and step S629 were demonstrated in the above-mentioned 3rd Example, description is abbreviate
  • step S623 is executed in place of step S622 of the third embodiment described above.
  • step S623 equation 82 is solved to obtain b (t, u, v), a (t, u, v), Z (t, u, v), and ⁇ (t, u, v).
  • DataTerm in Expression 82 is Expression 76
  • p (t, x, y, n) in Expression 76 is Expression 80
  • SmoothTerm in Expression 82 is Expression 92.
  • sb (t, u, v), sa (t, u, v), sZ (t, u, v), and s ⁇ (t, u, v) are arbitrary scalar quantities. .
  • b (t, u, v), a (t, u, v), Z (t, u, v), ⁇ (t, Find a set of u, v), sb (t, u, v), sa (t, u, v), sZ (t, u, v), s ⁇ (t, u, v), and b (b) Let t, u, v), a (t, u, v), Z (t, u, v), and only ⁇ (t, u, v) be the calculation results. Also, t 1.
  • the first-order coefficient in this linear form is Ab (t, u, v), and the zero-order coefficient is Bb (t, u, v).
  • the first term on the right side of Formula 93 is a term that acts to establish this linear relationship as much as possible.
  • ⁇ b1 is a contribution rate of the establishment of the relationship of linearity, and is a desired constant of 0 or more.
  • the term for canceling the instability is the second term of the right side of Formula 93. Even if Ab (t, u, v) is unstable only in the first term, this second term may be operated to select a small value of Ab (t, u, v) It is possible to determine Ab (t, u, v).
  • ⁇ b2 is a contribution rate for canceling the instability, and is a desired constant of 0 or more.
  • the third term and the fourth term on the right side of the equation 93 are obtained by replacing b (t + t1, u + u1, v + v1) of the first term and the second term with a (t + t1, u + u1, v + v1), and the explanation thereof Omit.
  • ⁇ a1 is a contribution rate with respect to the establishment of the relationship of linearity, and is a desired constant of 0 or more.
  • ⁇ a2 is the contribution rate for this instability release and is a desired constant of 0 or more.
  • the fifth term and the sixth term on the right side of Formula 93 are obtained by replacing b (t + t1, u + u1, v + v1) of the first term and the second term with Z (t + t1, u + u1, v + v1), Omit.
  • ⁇ Z1 is a contribution rate of the establishment of the relationship of linearity, and is a desired constant of 0 or more.
  • ⁇ Z2 is the contribution for this destabilization and is a desired constant greater than or equal to zero.
  • FIG. 60 is a flowchart illustrating an example of a processing procedure of luminance value and distance calculation processing in a fifth example of the sixth embodiment of the present technology. This process is performed by the calculation unit 16, and the result is output from the output terminal 17.
  • step S621 and step S629 were demonstrated in the above-mentioned 3rd Example, description is abbreviate
  • step S624 is executed in place of step S622 of the third embodiment described above.
  • step S624 equation 81 is solved to obtain b (t, u, v), a (t, u, v), and Z (t, u, v).
  • DataTerm in Expression 81 is Expression 76
  • p (t, x, y, n) in Expression 76 is Expression 79
  • SmoothTerm in Expression 81 is Expression 93.
  • Ab (t, u, v), Bb (t, u, v), Aa (t, u, v), Ba (t, u, v), AZ (t, u, v), and BZ (t, u, v) are each an arbitrary scalar quantity.
  • b (t, u, v), a (t, u, v), and Z (t, u, v) are taken as calculation results.
  • equation 96 will be described, the first to sixth terms on the right side of the equation 96 are the same as those of the equation 93, and thus the description thereof is omitted.
  • the seventh term and the eighth term on the right side of the equation 96 are obtained by replacing b (t + t1, u + u1, v + v1) of the first term and the second term with ⁇ (t + t1, u + u1, v + v1), and the explanation thereof Omit.
  • ⁇ 1 is a contribution rate of the establishment of the relationship of linearity, and is a desired constant of 0 or more.
  • ⁇ 2 is the contribution for this destabilization and is a desired constant greater than or equal to zero.
  • FIG. 61 is a flowchart illustrating an example of a processing procedure of luminance value and distance calculation processing in a sixth example of the sixth embodiment of the present technology. This process is performed by the calculation unit 16, and the result is output from the output terminal 17.
  • step S621 and step S629 were demonstrated in the above-mentioned 3rd Example, description is abbreviate
  • step S625 is executed instead of step S622 in the sixth embodiment described above.
  • step S625 equation 82 is solved to obtain b (t, u, v), a (t, u, v), Z (t, u, v), and ⁇ (t, u, v).
  • DataTerm in Expression 82 is Expression 76
  • p (t, x, y, n) in Expression 76 is Expression 80
  • SmoothTerm in Expression 82 is Expression 96.
  • Ab (t, u, v), Bb (t, u, v), Aa (t, u, v), Ba (t, u, v), AZ (t, u, v), BZ ( t, u, v), A ⁇ (t, u, v), and B ⁇ (t, u, v) are arbitrary scalar quantities, respectively.
  • the brightness or the distance is calculated by taking into consideration two of the following first and second policies. That is, the first policy is to obtain the occurrence rate as closely as possible to the histogram which is the observation value (minimization of DataTerm). The second policy is to make correction so that the change in the rate of occurrence between the neighbors is small (SmoothTerm is minimized). As for the second policy, the amount of change between adjacent units is permitted depending on each position (t, u, v) in space-time by further using the correlation with the image obtained from the camera provided side by side. You may operate the first and second policies. That is, the first policy is to obtain the occurrence rate as closely as possible to the histogram which is the observation value (minimization of DataTerm). The second policy is to make correction so that the change in the rate of occurrence between the neighbors is small (SmoothTerm is minimized). As for the second policy, the amount of change between adjacent units is permitted depending on each position (t, u, v) in space-time by further using the correlation with the image obtained from the camera
  • the sixth embodiment is characterized by the following points.
  • (1) In the method of obtaining the brightness or distance from the histogram, An input step of inputting a histogram present at each position in space-time; Calculating at least one of the distance or the luminance from the histogram, and outputting the distance or the luminance.
  • the first constraint that constrains the parameters of the above function and the above parameters of neighbors in space-time have particular relationships. Calculate the above parameters that satisfy the two constraints of the second constraint that constrains to satisfy A method of determining distance or luminance from a histogram characterized by calculating distance or luminance from the above parameters.
  • the first constraint which is the relationship between the incidence rate p (t) and the histogram h (t), is M, where M is the number of measurements for obtaining the histogram.
  • p (t) h (t) / M (t-1)
  • a method of obtaining a distance or luminance from a histogram characterized in that the second constraint is that the difference between the parameters of neighbors in space-time is small.
  • a method of obtaining distance or the luminance from the histogram in the above (4) A method of obtaining distance or luminance from a histogram characterized in that the correlation is a correlation that the image and the parameter have a linear relationship for each local region in space-time.
  • the seventh embodiment is to remove noise by performing weighted addition of distance data (distance information). That is, the present invention provides a method of performing appropriate noise removal with a small amount of calculation without assuming the positional relationship in advance.
  • a peak is detected from the histogram created at each time t and each position (x, y), and the time corresponding to the peak is multiplied by c / 2 to calculate the distance.
  • the operation is performed in the operation unit 16.
  • i 1 to C (t, x, y).
  • the suffixes i and C (t, x, y) will be described later.
  • FIG. 62 is a diagram showing an example of how distances are measured in the seventh embodiment of the present technology.
  • one SPAD in the SPAD array 13 simultaneously measures an object (wall surface 701 and wall surface 702) at different distances.
  • One SPAD does not measure the distance in one direction, but in reality, it measures the entire direction having a certain solid angle (range-finding range in the drawing). It shows that the wall surface 701 and the wall surface 702 exist in the distance measurement range.
  • the wall surface 701 and the wall surface 702 are assumed to be present at the distances Z (1) and Z (2), respectively.
  • the SPAD may receive light through reflection on the wall surface 701.
  • the SPAD may receive light through reflection on the wall surface 702.
  • ambient light is also received.
  • FIG. 63 is a diagram showing an intensity distribution in an example of distance measurement in the seventh embodiment of the present technology.
  • the SPAD at the position (x, y) in the SPAD array 13 measures an object at C (t, x, y) different distances.
  • C (t, x, y) peaks are detected.
  • C (t, x, y) distances can be calculated by multiplying "c ⁇ D ⁇ 2" for the bins corresponding to these peaks.
  • the calculated distance is taken as Z (t, x, y, i).
  • i 1 to C (t, x, y).
  • the peak area is also used, and accordingly, the computing unit 16 appropriately calculates the peak area corresponding to each peak.
  • the i-th peak area at each time t and each position (x, y) is S (t, x, y, i).
  • i 1 to C (t, x, y).
  • the peak area indicates the size of the peak, and if this value is small, the corresponding distance data can not be trusted. Conversely, if this value is large, the corresponding distance data can be trusted.
  • the methods can be applied. That is, for example, it is a general processing method performed on chromatogram data acquired by a gas chromatograph, a liquid chromatograph or the like. As a specific method, for example, there are methods disclosed in "JP-A 2014-211393: peak detection device” and “JP-A 6-230001: data processing device for chromatograph”, and peak detection is performed by these methods. And the peak area can be determined.
  • the distance data is not limited to one. That is, it is C (t, x, y) pieces.
  • the noise removal of the distance data Z (t, x, y, i) in the seventh embodiment can be expressed by the following equation 97. More specifically, distance data ZNR (t, x, y, i) from which noises are removed is calculated by operation unit 16 using Z (t, x, y, i) as input and expression 97. The removed distance data ZNR (t, x, y, i) is output from the output terminal 17.
  • Equation 97 performs weighted averaging for Z (t, x, y, i). Weighted averaging removes noise present in the distance data.
  • w (t, x, y, i, t1, x1, y1, j) is the weight of the corresponding Z (t1, x1, y1, j) and W (t, x, y, i) is normalized
  • w (t, x, y, i, t1, x1, y1, j) is used to calculate the "time t, i-th distance data of position (x, y)" targeted for noise removal. It is a weight of “time t1, j-th distance data of position (x1, y1)” used in "Time t1, j-th distance data Z (t1, x1, y1, j) at position (x1, y1)” with weight w (t, x, y, i, t1, x1, y1, j) By performing weighted addition, it is possible to obtain "the ith distance data ZNR (t, x, y, i) at time t, position (x, y)" from which noise has been removed.
  • w (t, x, y, i, t1, x1, y1, j) is determined so as to reduce the weight depending on the distance in space-time. . That is, the weight w (t, x, y, i, t1, x1, y1, j) which is the following equation 98 is adopted.
  • Equation 98 if the distance data is not reliable (peak area is small) using the peak area, the weight w (t, x, y, i, t1, x1, y1, j) is reduced When the distance data can be trusted (the peak area is large), the weight w (t, x, y, i, t1, x1, y1, j) is increased.
  • weights w (t, x, y, i, t1, x1, y1, j) in the first embodiment are as follows.
  • the weight w (t, x, y, i, t1, x1, y1, j) is that the space monotonically decreases with distance. This is based on the fact that the objects measured by two SPADs in close proximity are likely to be the same object (distance). If the objects are the same (distance), noise can be removed if they are added.
  • the object having a high probability of being the same object (distance) as the second object is that Z (t, x, y, i) and Z (t1, x1, y1, j) should be similar.
  • the distance measurement device 10 is used to perform distance measurement in each SPAD of the SPAD array 13. From the observed histogram obtained from the accumulation unit 15, peak detection is performed by the calculation unit 16 to obtain distance data. Then, the arithmetic unit 16 performs noise removal on the distance data.
  • FIG. 64 is a flow chart showing an example of a processing procedure of noise removal in the first example of the seventh embodiment of the present technology. By this processing, noise removal is performed on the distance data. This process is performed by the calculation unit 16.
  • step S711 a pair of “peak position and peak area” at each time and each position is obtained from the histogram at each time t and each position (x, y). Note that there may be a plurality of sets of “peak position and peak area” at each time and each position.
  • the number of pairs of “peak position and peak area” at position (x, y) is C (t, x, y).
  • a value obtained by multiplying the peak position by (D ⁇ c / 2) is taken as Z (t, x, y, i).
  • the peak area be S (t, x, y, i).
  • i is a parameter indicating a plurality of sets of “peak position and peak area”, and i takes a value of 1 to C (t, x, y). Then, the process proceeds to step S712.
  • step S 712 the above-mentioned Expression 97 is calculated for each time t, each position (x, y), and each i, and ZNR (t, x, y, i) is obtained.
  • w (t, x, y, i, t1, x1, y1, j) is represented by the above-mentioned equation 98. Then, the process proceeds to step S713.
  • step S 713 ZNR (t, x, y, i) is output from the output terminal 17 as “the i-th distance data of the time (t, position (x, y)) from which noise is removed”. Then, the series of processing ends.
  • the weight w (t, x, y, i, t1, x1, y1, j) may not depend on the peak area for simplification of the calculation. That is, in Equation 98, S (t1, x1, y1, j) may be forcibly solved as 1 (a constant).
  • w (t, x, y, i, t1, x1, y1, j) is determined so as to reduce the weight depending on the distance in the space-time. That is, the weight w (t, x, y, i, t1, x1, y1, j) which is the following expression 99 is adopted.
  • weights w (t, x, y, i, t1, x1, y1, j) in the second embodiment are as follows.
  • the object having a high probability of being the same object (distance) as the second object is that Z (t, x, y, i) and Z (t1, x1, y1, j) should be similar.
  • distance measurement is performed on each SPAD of the SPAD array 13 using the distance measuring device 10. From the observed histogram obtained from the accumulation unit 15, peak detection is performed by the calculation unit 16 to obtain distance data. Then, the arithmetic unit 16 performs noise removal on the distance data.
  • FIG. 65 is a flowchart illustrating an example of a procedure of noise removal in the second example of the seventh embodiment of the present technology. By this processing, noise removal is performed on the distance data. This process is performed by the calculation unit 16.
  • Steps S711 and S719 have been described in the above-described first embodiment, and thus the description thereof is omitted here.
  • the following step S713 is executed in place of step S712 of the first embodiment described above.
  • step S713 Formula 97 is calculated for each time t, each position (x, y), and each i, and ZNR (t, x, y, i) is obtained.
  • w (t, x, y, i, t1, x1, y1, j) is expressed by Expression 99.
  • the weight w (t, x, y, i, t1, x1, y1, j) is determined depending on the direction (time direction, x direction, and y direction) in space-time. That is, the weight w (t, x, y, i, t1, x1, y1, j) which is the following equation 100 is adopted.
  • Heaviside () in the equation 100 is a step function defined by the following equation 101.
  • Th1 is a desired constant (threshold).
  • Equation 102 has a distance similar to “time t, g-th distance data at position (x, y)” in “time t + 1, distance data group at position (x, y)” It is checked whether it is or not.
  • g 1 to C (t, x, y). If the value of Expression 102 is small, it can be determined that “the object (distance) being measured at time t + 1 and time t is the same”.
  • Equation 103 shows that the distance is similar to “time t, g-th distance data at position (x, y)” in “time t ⁇ 1, distance data group at position (x, y)” It is checked whether it exists or not.
  • g 1 to C (t, x, y). If the value of Expression 103 is small, it can be determined that “the object (distance) being measured at time t ⁇ 1 and time t is the same”.
  • the weight is 0, and in the case of “same”, the weight is added as 1/2.
  • the distance data to be added is “C (t + 1, x, y) time t + 1, distance data group ⁇ Z (t + 1, x, y, j)
  • the distance data to be added is “C (t ⁇ 1, x, y) time t ⁇ 1, distance data group at position (x, y) ⁇ Z (t ⁇ 1, x, y, j)
  • j is only the one closest to the value of Z (t, x, y, i) among 1 to C (t-1, x, y) ⁇ .
  • Adopting "only the closest one" is the same as the second embodiment described above.
  • weights w (t, x, y, i, t1, x1, y1, j) in the third embodiment are as follows.
  • (Feature 3-1) Determine the weight w (t, x, y, i, t1, x1, y1, j) depending on the direction (time direction, x direction, and y direction) in space-time There is. If it is determined that the object (distance) being measured is the same for that direction, the weight for that direction is weighted. If it is determined that they are different, the weight is reduced (or set to 0). Note that this determination is made by determining whether or not there is a distance of the same distance (ie, equation 104).
  • distance measurement is performed on each SPAD of the SPAD array 13 using the distance measuring device 10. From the observed histogram obtained from the accumulation unit 15, peak detection is performed by the calculation unit 16 to obtain distance data. Then, the arithmetic unit 16 performs noise removal on the distance data.
  • FIG. 66 is a flowchart illustrating an example of a procedure of noise removal in the third example of the seventh embodiment of the present technology. By this processing, noise removal is performed on the distance data. This process is performed by the calculation unit 16.
  • Steps S711 and S719 have been described in the above-described first embodiment, and thus the description thereof is omitted here.
  • the following step S714 is executed in place of step S712 of the first embodiment described above.
  • step 714 the above-mentioned Expression 97 is calculated for each time t, each position (x, y), and each i, and ZNR (t, x, y, i) is obtained.
  • w (t, x, y, i, t1, x1, y1, j) is represented by the above equation 100.
  • the weight w (t, x, y, i, t1, x1, y1, j) is made heavier for distance data considered to have the same target (distance) being measured. I am trying to do it. That is, the weight w (t, x, y, i, t1, x1, y1, j) which is the following expression 106 is adopted.
  • Equation 107 has a distance similar to “time t, g-th distance data at position (x, y)” in “time t1, distance data group at position (x1, y1)” It is checked whether it is or not.
  • g 1 to C (t, x, y). If the value of Expression 107 is small, "the object (distance) measured at time t, position (x, y)” and the object (distance) measured at time t1, position (x1, y1) Can be determined to be the same.
  • the addition can remove noise. Therefore, weights are added and added as the value of Expression 107 is smaller.
  • the distance data to be added is “C (t1, x1, y1) time t1, distance data group at position (x1, y1) ⁇ Z (t1, x1, 1y, j)
  • j is 1 to C ( Among t1, x1, y1) ⁇ , only the one closest to the value of Z (t, x, y, i).
  • Adopting "only the closest one" is the same as the second embodiment described above. That is, the weight is expressed by equation 106.
  • the weight is also dependent on the distance.
  • the distance dependency is the same as (feature 1-1) in the first embodiment described above.
  • weights w (t, x, y, i, t1, x1, y1, j) in the fourth embodiment are as follows.
  • distance measurement in each SPAD of the SPAD array 13 is performed using the distance measuring device 10. From the observed histogram obtained from the accumulation unit 15, peak detection is performed by the calculation unit 16 to obtain distance data. Then, the arithmetic unit 16 performs noise removal on the distance data.
  • FIG. 67 is a flow chart showing an example of a process procedure of noise removal in a fourth example of the seventh embodiment of the present technology. By this processing, noise removal is performed on the distance data. This process is performed by the calculation unit 16.
  • Steps S711 and S719 have been described in the above-described first embodiment, and thus the description thereof is omitted here.
  • the following step S715 is executed in place of step S712 of the first embodiment described above.
  • step S715 Expression 97 is calculated for each time t, each position (x, y), and each i, and ZNR (t, x, y, i) is obtained.
  • w (t, x, y, i, t1, x1, y1, j) is expressed by Expression 106.
  • the weight w (t, x, y, i, t1, x1, y1, j) is made heavier for distance data considered to have the same target (distance) being measured. I am trying to do it. That is, the weight w (t, x, y, i, t1, x1, y1, j) which is the following equation 108 is adopted.
  • ⁇ in equation 108 is a desired constant.
  • distance data at that time and at that position is used to determine whether or not the target (distance) being measured is the same.
  • distance data around the time and its position, and its position and its position It is judged using.
  • equation 108 will be described. Whether “the object (distance) measured at time t, position (x, y)" and the object (distance) measured at time t1, position (x1, y1) are the same To judge. In this determination, distance data within a region of (2 ⁇ + 1) ⁇ (2 ⁇ + 1) ⁇ (2 ⁇ + 1) in space-time centered on “time t, position (x, y)” is used. Then, distance data within a region of (2 ⁇ + 1) ⁇ (2 ⁇ + 1) ⁇ (2 ⁇ + 1) on the space-time centering on “time t1, position (x1, y1)” is used. That is, it judges by the following formula 109.
  • the weight is added and added as the value of Expression 109 is smaller.
  • the distance data to be added is “C (t1, x1, y1) time t1, distance data group at position (x1, y1) ⁇ Z (t1, x1, 1y, j)
  • j is 1 to C ( Among t1, x1, y1) ⁇ , only the one closest to the value of Z (t, x, y, i).
  • Adopting "only the closest one" is the same as the second embodiment described above. That is, the weight is expressed by Equation 108.
  • weights w (t, x, y, i, t1, x1, y1, j) in the fifth embodiment are as follows.
  • the distance measuring device 10 is used to perform distance measurement in each SPAD of the SPAD array 13. From the observed histogram obtained from the accumulation unit 15, peak detection is performed by the calculation unit 16 to obtain distance data. Then, the arithmetic unit 16 performs noise removal on the distance data.
  • FIG. 68 is a flowchart illustrating an example of a procedure of noise removal in the fifth example of the seventh embodiment of the present technology. By this processing, noise removal is performed on the distance data. This process is performed by the calculation unit 16.
  • Steps S711 and S719 have been described in the above-described first embodiment, and thus the description thereof is omitted here.
  • the following step S716 is executed in place of step S712 of the first embodiment described above.
  • step S716 Formula 97 is calculated for each time t, each position (x, y), and each i, and ZNR (t, x, y, i) is obtained.
  • w (t, x, y, i, t1, x1, y1, j) is expressed by Expression 108.
  • a camera 100 provided to the distance measuring device 10 is used.
  • the camera 100 is an apparatus capable of capturing an image, and captures the same direction as the direction measured by the SPAD array 13 of the distance measuring device 10.
  • the pixel position in the image of the camera 100 corresponding to “the object that SPAD measures at time t, position (x, y)” is (u (t, x, y), v (t, x, y)) I assume. Then, the pixel value of the pixel position (u (t, x, y), v (t, x, y)) in the image captured at time t by the camera 100 is G (t, u (t, x, y) , V (t, x, y)).
  • the pixel value G (t, u (t, x, y), v (t, x, y)) is obtained by
  • the SPAD at the position (x, y) of the SPAD array 13 is the value of a pixel taken in the same direction as the direction in which distance measurement is performed.
  • the pixel values G (t, u (t, x, y), v (t, x, y)) and G (t1, u (t1, x1, y1), v (t1, t1) in the image of the camera 100 are
  • the weight to be added to the distance data at the position (x1, y1) at time t1 is increased. Otherwise, the weight to be added is reduced or addition is not performed. In this way, appropriate distance data can be added, and noise can be removed.
  • the weight w (t, x, y, i, t1, x1, y1, j) which is the expression 110 is adopted.
  • Equation 110 the weight also depends on the distance.
  • the distance dependency is the same as (feature 1-1) in the first embodiment described above.
  • the distance data to be added is “C (t1, x1, y1) time t1, distance data group at position (x1, y1) ⁇ Z (t1, x1, 1y, j)
  • j is 1 to C ( Among t1, x1, y1) ⁇ , only the one closest to the value of Z (t, x, y, i). Adopting "only the closest one" is the same as the second embodiment described above.
  • weights w (t, x, y, i, t1, x1, y1, j) in this sixth embodiment are as follows.
  • the distance measurement apparatus 10 is used to perform distance measurement in each SPAD of the SPAD array 13. From the observed histogram obtained from the accumulation unit 15, peak detection is performed by the calculation unit 16 to obtain distance data. Then, the arithmetic unit 16 performs noise removal on the distance data.
  • FIG. 69 is a flowchart illustrating an example of a procedure of noise removal in the sixth example of the seventh embodiment of the present technology. By this processing, noise removal is performed on the distance data. This process is performed by the calculation unit 16.
  • step S721 the peak position at each time and each position is obtained from the histogram at each time t and each position (x, y).
  • the number of peak positions at position (x, y) is C (t, x, y).
  • a value obtained by multiplying the peak position by (D ⁇ c / 2) is taken as Z (t, x, y, i).
  • i is a parameter indicating a plurality of peak positions, and i takes a value of 1 to C (t, x, y). Then, the process proceeds to step S722.
  • step S722 the image from the camera provided side by side at each time t is input.
  • the pixel position in the image of the camera 100 corresponding to “the object that SPAD measures at time t, position (x, y)” is (u (t, x, y), v (t, x, y)) I assume.
  • the pixel value of the pixel position (u (t, x, y), v (t, x, y)) in the image captured at time t by the camera 100 is G (t, u (t, x, y) , V (t, x, y)).
  • the process proceeds to step S723.
  • Equation 97 is calculated for each time t, each position (x, y), and each i, and ZNR (t, x, y, i) is obtained.
  • w (t, x, y, i, t1, x1, y1, j) is expressed by equation 110. Then, the process proceeds to step S729.
  • step S 729 ZNR (t, x, y, i) is output from the output terminal 17 as “the i-th distance data of time (t, position (x, y) from which noise is removed)”. Then, the series of processing ends.
  • a camera 100 attached to the distance measuring device 10 is used (see FIG. 1).
  • the camera 100 is an apparatus capable of capturing an image, and captures the same direction as the direction measured by the SPAD array 13 of the distance measuring device 10.
  • the pixel position in the image of the camera 100 corresponding to “the object that SPAD measures at time t, position (x, y)” is (u (t, x, y), v (t, x, y)) I assume. Then, the pixel value of the pixel position (u (t, x, y), v (t, x, y)) in the image captured at time t by the camera 100 is G (t, u (t, x, y) , V (t, x, y)).
  • the pixel value G (t, u (t, x, y), v (t, x, y)) is obtained by
  • the SPAD at the position (x, y) of the SPAD array 13 is the value of a pixel taken in the same direction as the direction in which distance measurement is performed.
  • the pixel values G (t, u (t, x, y), v (t, x, y)) and G (t, u (t, x, y) + f1, v (t) in the image of the camera 100 are , X, y) + f2) and G (t1, u (t1, x1, y1), v (t1, x1, y1)) and G (t1, u (t1, x1, y1) + f1, v (t1) respectively.
  • X1, y1) + f2) have substantially the same value, the weight to be added to the distance data at the position (x1, y1) at time t1 is increased. Otherwise, the weight to be added is reduced or addition is not performed. In this way, appropriate distance data can be added, and noise can be removed.
  • the weight w (t, x, y, i, t1, x1, y1, j) which is the following expression 111 is adopted.
  • Equation 111 the weight is also dependent on the distance.
  • the distance dependency is the same as (feature 1-1) in the first embodiment described above.
  • the distance data to be added is “C (t1, x1, y1) time t1, distance data group at position (x1, y1) ⁇ Z (t1, x1, 1y, j)
  • j is 1 to C ( Among t1, x1, y1) ⁇ , only the one closest to the value of Z (t, x, y, i). Adopting "only the closest one" is the same as the second embodiment described above.
  • weights w (t, x, y, i, t1, x1, y1, j) in the seventh embodiment are as follows.
  • the distance measuring device 10 is used to perform distance measurement in each SPAD of the SPAD array 13. From the observed histogram obtained from the accumulation unit 15, peak detection is performed by the calculation unit 16 to obtain distance data. Then, the arithmetic unit 16 performs noise removal on the distance data.
  • FIG. 70 is a flow chart showing an example of a procedure of noise removal in the seventh example of the seventh embodiment of the present technology. By this processing, noise removal is performed on the distance data. This process is performed by the calculation unit 16.
  • Steps S721, S722 and S729 have been described in the above-described sixth embodiment, and thus the description thereof is omitted here.
  • the following step S724 is executed in place of step S723 of the sixth embodiment described above.
  • Equation 97 is calculated for each time t, each position (x, y), and each i, and ZNR (t, x, y, i) is obtained.
  • w (t, x, y, i, t1, x1, y1, j) is represented by Expression 111.
  • the features of the seventh embodiment are as follows. Weighted addition of distance data at each time and each position obtained from the SPAD array 13 is performed. In particular, the weights are determined as follows. (Feature 1-1) The weight is made smaller as the distance is longer, depending on the distance in space-time. (Characteristics 1-2, characteristic 2-1) Weights are made heavier for a plurality of distance data at the same time and at the same position, the more similar the distance data to be denoised. Furthermore, weights are set to 0 except for the most similar one. (Feature 1-3) Depending on the reliability of distance data (that is, the peak area of each histogram obtained from the SPAD array 13), the weight is made heavier as the reliability is larger.
  • (Feature 3-1) The weight is determined depending on the direction in space-time. If it is determined that the object (distance) being measured is the same for that direction, the weight for that direction is weighted. If it is determined that they are different, the weight is reduced (or set to 0). (Feature 4-1) Depending on the similarity between distance data groups at each time and each time, weight is weighted as the similarity is higher. (Feature 5-1) Depending on the similarity between distance data groups in the near region centered at each time and each position, the weight is heavier as the similarity is higher. (Feature 6-1) In the image of the camera 100 provided in parallel, depending on the degree of similarity between pixel values at corresponding pixel positions, the weight is heavier as the degree of similarity is higher. (Feature 7-1) In the image of the camera 100 provided in parallel, depending on the degree of similarity between the corresponding pixel position and the pixel values of the peripheral pixel positions, the weight is heavier as the degree of similarity is higher.
  • the advantages of this seventh embodiment are as follows. That is, by performing weighted addition of distance data appropriately, noise can be removed without specifying the positional relationship of the object and without requiring a large amount of calculation.
  • the seventh embodiment has the following points as its main point.
  • (1) In the method of removing noise from distance data, A first input step of inputting distance data of each position in space-time; And adding a weighted addition of the distance data.
  • the weight In the first addition step, of the distance data at the same time and at the same position, the weight is made heavier as the distance data that is the object of noise removal is similar, the noise is removed from the distance data Method.
  • (2) In the method of removing noise from distance data corresponding to the peak in the ToF histogram, A second input step of inputting distance data of each position in space-time and a peak area of the histogram; And second addition step of weighted addition of the distance data, 9.
  • a noise removing method for distance data characterized in that, in the second addition step, the weight of the corresponding distance data is made heavier as the peak area is larger.
  • the weight is set to 0 except for the distance data that is most similar to the distance data to be noise-removed. How to remove noise.
  • the weight is made smaller as the distance becomes longer depending on the distance in space-time.
  • a method for removing noise from distance data characterized in that, in the first addition step, the weight is made heavier as the similarity is higher, depending on the similarity between distance data at each time and each time.
  • the weight is made heavier as the similarity is higher depending on the time, each position, the time, and the similarity between distance data in the vicinity of the position.
  • Noise removal method In the method for removing noise from distance data in the above (1), (3) to (7), It further comprises a third input step of inputting an image, In the first addition step, the weight is weighted according to the similarity between the pixel values of the image corresponding to the distance data at each time and each position, and the weight is weighted as the similarity is higher. Noise removal method.
  • the distance data to be finally obtained is made as equal as possible to the observed distance data, and a solution that makes it as close as possible between the neighbors is sought, and appropriate noise is obtained. Do the removal. That is, even if the positional relationship is not assumed in advance, appropriate noise removal is performed with a small amount of calculation.
  • a peak is detected from the histogram created at each time t and each position (x, y), and the time corresponding to the peak is multiplied by c / 2 to calculate the distance.
  • the operation is performed in the operation unit 16.
  • i 1 to C (t, x, y).
  • the suffixes i and C (t, x, y) will be described later.
  • FIG. 71 is a diagram illustrating an example of how distances are measured in the eighth embodiment of the present technology.
  • one SPAD in the SPAD array 13 simultaneously measures an object (wall surface 801 and wall surface 802) at different distances.
  • One SPAD does not measure the distance in one direction, but in reality, it measures the entire direction having a certain solid angle (range-finding range in the drawing). It shows that the wall surface 801 and the wall surface 802 exist in the distance measurement range. It is assumed that the wall surface 801 and the wall surface 802 exist at the distances Z (1) and Z (2), respectively.
  • the SPAD may receive light through reflection on the wall surface 801.
  • the SPAD may receive light through reflection on the wall surface 802.
  • ambient light is also received.
  • FIG. 72 is a diagram showing an intensity distribution in an example of distance measurement in the eighth embodiment of the present technology.
  • the SPAD at the position (x, y) in the SPAD array 13 measures an object at C (t, x, y) different distances.
  • C (t, x, y) peaks are detected.
  • C (t, x, y) distances can be calculated by multiplying "c ⁇ D ⁇ 2" for the bins corresponding to these peaks.
  • the calculated distance is taken as Z (t, x, y, i).
  • i 1 to C (t, x, y).
  • the computing unit 16 since the peak area is also used, the computing unit 16 appropriately calculates the peak area corresponding to each peak.
  • the i-th peak area at each time t and each position (x, y) is S (t, x, y, i).
  • i 1 to C (t, x, y).
  • the peak area indicates the size of the peak, and if this value is small, the corresponding distance data can not be trusted. Conversely, if this value is large, the corresponding distance data can be trusted.
  • the methods can be applied. That is, for example, it is a general processing method performed on chromatogram data acquired by a gas chromatograph, a liquid chromatograph or the like. As a specific method, for example, there are methods disclosed in "JP-A 2014-211393: peak detection device” and “JP-A 6-230001: data processing device for chromatograph”, and peak detection is performed by these methods. And the peak area can be determined.
  • the distance data is not limited to one. That is, it is C (t, x, y) pieces.
  • the noise removal of the distance data Z (t, x, y, i) in the eighth embodiment can be expressed by the following equation 112. That is, to calculate ZNR (t, x, y, i) that minimizes the sum of two terms, DataTerm (data term: data term) and SmoothTerm (smoothing term: smooth term or regularization term) It is.
  • DataTerm which is a data term, is a term that acts so that ZNR (t, x, y, i), which is an observation value, can have the same value as much as possible. 113).
  • SmoothTerm which is a smoothing term, is a term that acts such that ZNR (t, x, y, i) of the neighbors become similar values (see Formula 114 described later).
  • the distance measuring device 10 is used to perform distance measurement in each SPAD of the SPAD array 13. From the observed histogram obtained from the accumulation unit 15, peak detection is performed by the operation unit 16, and distance data and a value of the peak area are obtained. Then, the arithmetic unit 16 performs noise removal on the distance data.
  • denoising means finding the solution of equation 112 above.
  • the value S (t, x, y, i) of the peak area is multiplied. This is due to the following reasons. As described above, when the value of the peak area corresponding to the observed distance data Z (t, x, y, i) is small, the distance data Z (t, x, y, i) is not very reliable.
  • the first term of Expression 114 represents the relationship between “time t at which you are watching, position (x, y)” and “time t + 1 immediately after that, position (x, y)”, and “time t at which you watch , The position (x, y) and the “time t ⁇ 1 immediately before that, the position (x, y)” are shown. At times t ⁇ 1, t and t + 1, time is continuous, and the object measured by the SPAD at the same position (x, y) is likely to be at the same distance. Or, it changes smoothly and the difference in distance is sufficiently small.
  • the first term of the equation 114 is the expression of this by an equation.
  • ⁇ t is a contribution rate of smoothness in the time direction, and is a desired constant of 0 or more.
  • ⁇ t 0, the smoothness in the time direction is not considered.
  • Equation 114 is The relationship between “time t of interest, position (x, y)” and “same time t, adjacent position in x direction (x + 1, y)”, The relationship between “time t of interest, position (x, y)” and “same time t, adjacent position in x direction (x ⁇ 1, y)”, The relationship between “time t to watch, position (x, y)” and “same time t, adjacent position to y direction (x, y + 1)”, It shows the relationship between “time t to be observed, position (x, y)” and “same time t, adjacent position to y direction (x, y ⁇ 1)”.
  • ⁇ xy is the contribution of the smoothness in the space direction, which is a desired constant of 0 or more.
  • ⁇ xy 0, the smoothness in the space direction is not considered.
  • Equation 114 acts to smoothly change ZNR (t, x, y, i) in space-time.
  • FIG. 73 is a flowchart illustrating an example of a process procedure of noise removal in the example of the eighth embodiment of the present technology. By this processing, noise removal of distance data is performed.
  • step S811 a set of “peak position and peak area” at each time and each position is obtained from the histogram at each time t and each position (x, y). Note that there may be a plurality of sets of “peak position and peak area” at each time and each position.
  • the number of pairs of “peak position and peak area” at position (x, y) is C (t, x, y).
  • a value obtained by multiplying the peak position by (D ⁇ c / 2) is taken as Z (t, x, y, i).
  • the peak area be S (t, x, y, i).
  • i is a parameter indicating a plurality of sets of “peak position and peak area”, and i takes a value of 1 to C (t, x, y). Then, the process proceeds to step S812.
  • step S812 equation 112 is solved to obtain ZNR (t, x, y, i). Each term in equation 112 is defined by equation 113 and equation 114. Then, the process proceeds to step S813.
  • step S 813 ZNR (t, x, y, i) is output from the output terminal 17 as “the i-th distance data of time (t, position (x, y)) from which noise is removed”. Then, the series of processing ends.
  • noise removal can be performed with a small amount of calculation without assuming the positional relationship in advance.
  • the eighth embodiment has the following points as its main point.
  • (1) In the method of removing noise from distance data, A first input step of inputting first distance data of each position in space-time; Performing noise removal from the first distance data and calculating second distance data; Outputting the second distance data, and In the noise removal calculation step, among the first operators causing the second distance data to be equal to the first distance data, and the adjacent second distance data in space-time.
  • the second distance data is determined such that the sum of the two operators of the second operator acting to equalize the second distance data set whose difference is the smallest becomes the extreme value.
  • a method of removing noise from distance data characterized by performing processing.
  • the first distance data is data calculated from a peak in a ToF histogram, 9.
  • a method for removing noise from distance data characterized in that the first operator is an operator weighted by the peak area of the peak for distance data corresponding to the peak.
  • Ninth embodiment> [Overview] When a plurality of peaks are detected on the histogram corresponding to one SPAD, the distance from each peak to the object can be calculated, but the positions of the boundaries (edges) of these objects (that is, the regions of each object ) But where it is still unknown.
  • the ninth embodiment is made in view of such a situation, and detects an edge position (that is, an area of each object).
  • variable (x, y) is a variable indicating the position of each SPAD of the SPAD array 13 and takes an integer value.
  • variable (u, v) is a variable indicating the position of the SPAD array 13 and takes a real number value.
  • the histogram of the position (x, y) is H (x, y, n).
  • x is an integer of 0 or more and X-1 or less
  • y is an integer of 0 or more and Y-1 or less
  • n represents a bin number and is an integer of 0 or more and N-1 or less.
  • H (x, y, n) is simply written as h (n).
  • n 0 to N-1.
  • the occurrence rate is the same as in the other embodiments, and is the number of occurrences of a certain event per unit time.
  • the probability that photons will fly in time (D) corresponding to the bin is a value obtained by multiplying the occurrence rate by time D.
  • constant multiplication D multiplication
  • time D may be considered as unit time.
  • the definition of the occurrence rate it may be considered to be a value D times the generally used term “occurrence rate”.
  • the occurrence rate p (n) in the bin n is the probability that light (photon) will fly to the SPAD during the time n ⁇ D to the time (n + 1) ⁇ D. It does not matter whether the light (photon) has arrived before time n ⁇ D.
  • the light (photon) detected by each SPAD of the SPAD sensor 13 in the distance measuring device 10 is the light (photon) that first comes in, and the light (photon) that comes in second and subsequent times is not detected.
  • bin 6 When the third light (photon) comes in at the corresponding time, only h (2) is counted on the histogram and not h (4) or h (6).
  • the probability that the frequency of the bin 0 is h (0) in M measurements is represented by the following formula 115. This is because an event that occurs with the probability of p (0) is a probability that occurs h (0) out of M times.
  • Equation 116 The probability that the frequency of bin 1 will be h (1) is as shown in Equation 116 below, although h (0) times have occurred in bin 0 in M measurements. This is because an event that occurs with the probability of p (1) is a probability that occurs h (1) of M ⁇ h (0) times.
  • Equation 117 Equation 117 below. This is because an event that occurs with the probability of p (2) is a probability that occurs h (2) of M ⁇ h (0) ⁇ h (1) times.
  • the probability that the frequency of bin n will be h (n) is as in the following formula 118, although h (m) has occurred at bin m in M measurements.
  • m is 0 to n-1.
  • FIG. 74 is a diagram showing an example of the position of each SPAD in the (u, v) coordinate system in the ninth embodiment of the present technology.
  • each position in the SPAD array 13 is expressed by (u, v).
  • u and v are each real numbers.
  • the physical region of SPAD at position (x, y) is As (x, y) as indicated by equation 120 below.
  • a region in the SPAD sensor 13 in which the SPAD indicated by (x, y) causes a reaction by the light (photon) coming in is denoted by A (x, y). That is, the light (photons) flying to the position (u, v) where (u, v) ⁇ A (x, y) causes the SPAD at the position (x, y) to react. Also, even if light (photon) is incident on the position (u, v), the SPAD does not necessarily react. Let the reaction rate be ⁇ (u, v, x, y).
  • ⁇ (u, v, x, y) depends on the position (u, v) and becomes known by measuring in advance.
  • ⁇ (u, v, x, y) is the (u, v) other than the physical area As (x, y) of SPAD indicated by (x, y) in the SPAD sensor 13.
  • the value of 0 may be 0, and the value may be approximated to a constant value in (u, v) in the physical area As (x, y) of SPAD indicated by (x, y) in the SPAD sensor 13.
  • a (x, y) coincides with the physical area As (x, y) of the SPAD indicated by (x, y) in the SPAD sensor 13. That is, ideally, in the case of (x1, y1) ⁇ (x2, y2), there is no overlap between the area A (x1, y1) and the area A (x2, y2).
  • (x1, y1) and (x2, y2) are adjacent SPADs, an overlap of the area A (x1, y1) and the area A (x2, y2) exists.
  • FIG. 1 it has been described that light coming in is collected on each SPAD by the lens 13a.
  • the light may not be focused sufficiently and may be blurred. That is, light (photons) flying from the direction to reach the SPAD indicated by (x1, y1) in the SPAD sensor 13 reaches the SPAD indicated by (x2, y2) adjacent to it due to the blurring of the lens. Because there is also, as a second reason, even when light (photons) is incident on a region that is served by SPAD indicated by (x1, y1), the light (photons) travels through the semiconductor forming the SPAD array, This is because it may reach the SPAD indicated by (x2, y2) adjacent to it.
  • FIG. 75 is a diagram showing an example of the relationship between A (x, y) and As (x, y) according to the ninth embodiment of the present technology.
  • the physical area As (x, y) of the SPAD at the position (x, y) does not coincide with the area A (x, y) at which the SPAD at the position (x, y) reacts .
  • the reaction rate at an arbitrary position (u, v) in the region A (x, y) is ⁇ (u, v, x, y).
  • FIG. 76 is a diagram showing an intensity distribution in an example of distance measurement in the ninth embodiment of the present technology.
  • the light emission from the light emitting unit 12 (light emission for a short time) changes in intensity with time (t).
  • a in the same figure shows a time transition of the intensity of light emission from the light emitting unit 12.
  • Active light (light from the light emitting unit 12) is incident on each position (u, v) through reflection on the object.
  • the distance to the object be Z (u, v).
  • Incident light to the position (u, v) of the active light reaches the light emission from the light emitting unit 12 with a delay of 2 ⁇ Z (u, v) / c. Also, light decays in proportion to the square of the distance.
  • the reflectance of the object be a (u, v). Taking the above into consideration, the intensity of light incident on the position (u, v) when light is emitted from the light emitting unit 12 is expressed by the following expression 121.
  • ambient light for example, light from the sun 30 in FIG. 1
  • the incident light photons
  • C in the figure shows the time transition of the intensity of ambient light incident on the position (u, v).
  • Equation 123 is obtained by changing the time t to n ⁇ D which is the time of the n-th bin and multiplying the time width D of the n-th bin with respect to the equation 122, and further, the reaction rate ⁇ (u, v, By multiplying x, y), integration is performed for (u, v) in the region A (x, y) of SPAD indicated by the position (x, y).
  • the SPAD at the position (x, y) in the SPAD array 13 measures an object at C (x, y) different distances.
  • One SPAD does not measure the distance in one direction, but practically measures the entire direction having a certain solid angle. In this case, there are a plurality of objects at different distances in the distance measurement range.
  • C (x, y) objects be a (x, y, i).
  • Equation 123 can be transformed into Equation 124 below.
  • the first term on the right side of Expression 124 is constant regardless of n.
  • FIG. 77 is a diagram showing the distribution of the occurrence rate in the example of the distance measurement according to the ninth embodiment of the present technology.
  • the bin corresponding to the peak is 2 ⁇ Z (x, y, i) / c / D.
  • i 1 to C (x, y).
  • FIG. 78 is a diagram showing the distribution of the occurrence rate in the example of the distance measurement according to the ninth embodiment of the present technology.
  • the area of the part surrounded by the dotted line in the figure indicates the peak area at each peak.
  • the peak area be S (x, y, i).
  • i 1 to C (x, y).
  • the “peak area” is a term generally used in the field of gas chromatograph or liquid chromatograph, and in this embodiment, it is used in the same meaning.
  • peak detection and peak area determination since there are known methods for peak detection and peak area determination, those methods may be applied. That is, for example, it is a general processing method performed on chromatogram data acquired by a gas chromatograph, a liquid chromatograph or the like. As a specific method, there are methods disclosed in, for example, Japanese Patent Application Laid-Open Nos. 2014-211393 and 6-230001, and peak detection and peak area can be obtained by this method.
  • This embodiment relates to processing for detecting the positions of the edges of the objects (that is, the regions of the objects) when an SPAD in the SPAD array 13 measures objects at a plurality of different distances. It is a thing. Specifically, the SPAD at the position (x, y) measures a plurality of objects according to whether or not there are a plurality of peaks in the occurrence rate p (x, y, n) represented by the equation 119 Then, processing is performed to detect edge positions (that is, regions of each object).
  • the incidence rate p (x, y, n) has a plurality of peaks, it does not necessarily mean that there is an edge of the object. Therefore, it is judged as pre-processing whether there is an edge of the object or not. This pre-processing will be described below.
  • FIG. 79 is a diagram showing a first example of the state of distance measurement in the ninth embodiment of the present technology. This figure shows the case where the SPAD at position (x, y) is ranging between objects at two different distances. That is, distance measurement is performed on two objects, a wall surface 901 at a distance Z (1) and a wall surface 902 at a distance Z (2).
  • the occurrence rate p (x, y, n) is determined by Equation 119, and the occurrence rate p If the peak at (x, y, n) is determined, two bins of 2 ⁇ Z (1) / c / D and 2 ⁇ Z (2) / c / D are determined.
  • FIG. 80 is a diagram illustrating a second example of the state of distance measurement in the ninth embodiment of the present technology.
  • a translucent object 903 is located at the distance Z (1), and a wall 904 is located at the distance Z (2). Since the translucent object 903 is a translucent object, light (photons) may pass or may be reflected. Therefore, the SPAD may receive the reflection from the translucent object 903 or may receive the reflection from the wall surface 904. As a result, as in the first example, peaks are detected in two bins of 2 ⁇ Z (1) / c / D and 2 ⁇ Z (2) / c / D.
  • this embodiment may be applied to detect the boundary (edge) of the wall surface 901 and the wall surface 902, but in the case of the second example, this embodiment is not applied, You should draw the conclusion that there is no edge.
  • the pre-processing makes this determination.
  • This pre-processing is determined by the status of the peripheral SPAD (for example, SPAD at position (x-1, y) and SPAD at position (x + 1, y)).
  • the peripheral SPAD also measures two objects of the object at the distance of Z (1) and the object at the distance of Z (2) (second example) Now, SPAD at position (x-1, y) and SPAD at position (x + 1, y).
  • FIG. 81 is a flowchart illustrating an example of a processing procedure of pre-processing according to the ninth embodiment of the present technology.
  • this pre-processing it is determined whether there is an edge in the area projected on the SPAD at the position (x, y). This process is performed by the calculation unit 16.
  • step S 911 a histogram that is an observed value of SPAD at a position (x, y) and its surrounding position (for example, 5 ⁇ 5) is input.
  • SPAD at peripheral positions has been described as both sides in the x direction, but it is approximately 5 ⁇ 5 around the position of interest (x, y) SPAD can be assumed. Then, the process proceeds to step S912.
  • step S 912 the occurrence rate of the position (x, y) is obtained from the histogram at the position (x, y) according to Expression 119, and a peak of the occurrence rate is detected.
  • C (x, y) be the number of peaks.
  • a value (that is, a distance) obtained by multiplying c ⁇ D / 2 times the value of the bin at the peak position is taken as Z (x, y, i).
  • i 1 to C (x, y). Then, the process proceeds to step S913.
  • step S 913 it is determined whether C (x, y) is 2 or more. If it is 2 or more, the process proceeds to step S914. If it is less than 2, the process proceeds to step S917.
  • the fact that C (x, y) is less than 2 means that the SPAD at the position (x, y) does not project objects at a plurality of different distances.
  • step S914 from the histogram at each of the peripheral positions (x0, y0), the occurrence rate of the position (x0, y0) is obtained from Expression 119, and the peak of the occurrence rate is detected.
  • the number of peaks be C (x0, y0).
  • a value (that is, a distance) obtained by multiplying c ⁇ D / 2 times the value of the bin at the peak position is taken as Z (x0, y0, i).
  • i 1 to C (x0, y0). Then, the process proceeds to step S915.
  • step S916 the information that “the SPAD at position (x, y) has an edge” is output. Then, the series of processing ends.
  • step S 917 information “the SPAD at position (x, y) has no edge” is output. Then, the series of processing ends.
  • is an assumed error amount, which is a desired small constant.
  • the pre-processing shown here it is possible to determine whether or not there is an edge of an object in the area of SPAD at position (x, y). Before performing each example of this embodiment, this pre-processing is performed, and each example of this embodiment is processed only when it is determined that "SPAD at position (x, y) has an edge". To be done. When it is determined that "the SPAD at position (x, y) has no edge", each example of this embodiment is not performed.
  • C (x, y) at each position (x, y), and Z (x, y, i) and S (x, y, i) can be determined.
  • the region of the object of interest (referred to as the i-th) among C (x, y) objects.
  • the region of the ith object that is the object of interest is expressed by the following equation 127. That is, B ( ⁇ , ⁇ , g) is the area of the ith object.
  • ⁇ , ⁇ , and g are parameters for determining the region, and the magnitude of the vector ( ⁇ , ⁇ ) is 1. Determining these parameters is the final goal of the first embodiment.
  • a set of positions of SPAD (for example, 5 ⁇ 5 around the position of interest (x, y)) around the position of interest (x, y) is G (x, y). That is, 25 positions such as position (x-2, y-2), position (x-2, y-1), position (x-2, y), position (x + 2, y + 2) , Y).
  • the position (x, y) is also included in G (x, y).
  • the SPAD at the position (x1, y1) in the periphery G (x, y) the one equal to the distance Z (x, y, i) of the ith object which is the object of interest is selected. That is, a set A0 (x, y, i) shown by the following equation 128 is determined.
  • the positions (uavg, vavg) indicated by the equation 129 will be described.
  • the position of the SPAD which measures the distance of an object at a distance “equal to the distance Z (x, y, i) of the ith object which is the object of interest” in the periphery G (x, y)
  • the position of the weighted average of x, y) is Equation 129. At this time, a peak area is adopted as a weight.
  • the object at the distance Z (x, y, i) is projected largely on the SPAD at the position (x1, y1) (position (x1 , Y1) is projected onto most of the range measured by the SPAD, and the object at the distance Z (x, y, i) is projected).
  • the target at the distance Z (x, y, i) is projected small on the SPAD at the position (x1, y1) (position (x1 , Y1) in most of the range measured by the SPAD, an object at a distance Z (x, y, i) is not projected).
  • the position (uavg, vavg) can be considered as the center of gravity of the object at the distance Z (x, y, i).
  • FIG. 82 is a diagram showing each position of SPAD at a position included in G (x, y) in the first example of the ninth embodiment of the present technology. That is, the 5 ⁇ 5 SPAD centered on the SPAD at the position (x, y) is illustrated.
  • the position (uavg, vavg) can be considered as the center of gravity of the object at the distance Z (x, y, i).
  • the region of the i-th object of interest among C (x, y) objects is B ( ⁇ , ⁇ , ⁇ , g) can be obtained as follows. That is, ⁇ and ⁇ can be determined by Equations 128 to 130. G can be determined by the equation 132 and the equation obtained by substituting the previously determined ⁇ and ⁇ into the equation 133.
  • the “i-th object area” to be finally obtained may be obtained only in the area of SPAD at the position (x, y), and the following Expression 134 is established.
  • As (x, y) is the physical area of SPAD at position (x, y) as described above.
  • the region represented by Expression 134 is the “region of the i-th object” in the region of SPAD at position (x, y).
  • FIG. 83 is a flowchart illustrating an example of a processing procedure of processing for obtaining a region of an object in the first example of the ninth embodiment of the present technology.
  • This process is a process of obtaining the “area of the i-th object” in the area of SPAD at the position (x, y). This process is performed in the computing unit 16.
  • step S922 equations 128 to 130 are calculated to determine ⁇ and ⁇ . Then, the process proceeds to step S923.
  • step S923 g is determined by equation 132 and the equation obtained by substituting ⁇ and ⁇ obtained in step S922 into equation 133. Then, the process proceeds to step S924.
  • step S 924 the region represented by equation 134 is output from ⁇ , ⁇ , and g determined in steps S 922 and S 923. Then, the series of processing ends.
  • B ( ⁇ 1, ⁇ 1, g1).
  • the complement of B ( ⁇ 1, ⁇ 1, g1) is the area of the second object.
  • B (.,.,.) Is the above-mentioned Formula 127.
  • ⁇ 1, ⁇ 1, and g1 are parameters for determining the region, and the magnitude of the vector ( ⁇ 1, ⁇ 1) is 1. Determining these parameters is the final goal of the second embodiment.
  • the center-of-gravity position (uavg1, vavg1) of the object (first object) at the distance Z (x, y, 1) becomes Expression 135 below.
  • the gravity center position (uavg2, vavg2) of the object (second object) at the distance Z (x, y, 2) is expressed by the following expression 136.
  • the definition of A 0 ( ⁇ , ⁇ ) is the above-mentioned formula 128.
  • FIG. 84 is a diagram showing each position of SPAD at a position included in G (x, y) in the second example of the ninth embodiment of the present technology. That is, the 5 ⁇ 5 SPAD centered on the SPAD at the position (x, y) is illustrated.
  • the position (uavg1, vavg1) can be considered as the center of gravity of the object at the distance Z (x, y, 1).
  • the position (uavg2, vavg2) can be considered as the center of gravity of the object at the distance Z (x, y, 2).
  • Half Plane indicated by ⁇ 1 ⁇ u + ⁇ 1 ⁇ v ⁇ g1.
  • This half plane is B ( ⁇ 1, ⁇ 1, g1).
  • B ( ⁇ 1, ⁇ 1, g1) which is the area of the first object of the two objects in the area of the SPAD at the position (x, y) of interest. That is, ⁇ 1 and ⁇ 1 can be obtained by Expressions 135 to 137. G1 can be obtained by the equation obtained by substituting ⁇ 1 and ⁇ 1 obtained above into the equation 140.
  • the first object area to be finally obtained may be obtained only in the area of SPAD at the position (x, y), and the following Expression 141 holds. Since “the area of the second object” may be obtained only in the area of SPAD at the position (x, y), the following equation 142 is established.
  • FIG. 85 is a flowchart illustrating an example of a processing procedure of processing for obtaining a region of an object in a second example of the ninth embodiment of the present technology.
  • This process is a process of obtaining "the area of the first object” and the "area of the second object” in the area of SPAD at the position (x, y). This process is performed by the calculation unit 16.
  • step S932 Formulas 135 to 137 are calculated to determine ⁇ 1 and ⁇ 1. Then, the process proceeds to step S933.
  • step S933 g1 is determined from the equation obtained by substituting ⁇ 1 and ⁇ 1 obtained in step S932 into equation 140. Then, the process proceeds to step S934.
  • step S934 the regions represented by equation 141 and equation 142 are output from ⁇ 1, ⁇ 1 and g1 determined in steps S932 and S933. Then, the series of processing ends.
  • B1 ( ⁇ 1, ⁇ 1, u0, v0) ⁇ “a complement of B1 ( ⁇ 3, ⁇ 3, u0, v0)”.
  • the region of the second object be B1 ( ⁇ 2, ⁇ 2, u0, v0) ⁇ “a complement of B1 ( ⁇ 1, ⁇ 1, u0, v0)”.
  • the region of the third object be B1 ( ⁇ 3, ⁇ 3, u0, v0) ⁇ “a complement of B1 ( ⁇ 2, ⁇ 2, u0, v0)”.
  • B1 ( ⁇ ) is a set defined by the following Expression 143.
  • ⁇ 1, ⁇ 1, ⁇ 2, ⁇ 2, ⁇ 3, ⁇ 3 and u0, v0 are parameters for determining the region.
  • the magnitude of the vector ( ⁇ 1, ⁇ 1) is 1.
  • the magnitude of the vector ( ⁇ 2, ⁇ 2) is 1.
  • the magnitude of the vector ( ⁇ 3, ⁇ 3) is 1. Determining these parameters is the final goal of the third embodiment.
  • the gravity center position (uavg1, vavg1) of the object (first object) at the distance Z (x, y, 1) is Expression 144 below.
  • FIGS. 86 to 89 are diagrams showing SPAD positions at positions included in G (x, y) in the third example of the ninth embodiment of the present technology. That is, the 5 ⁇ 5 SPAD centered on the SPAD at the position (x, y) is illustrated. These are basically the same view, but are divided into a plurality of views in order to respectively show the regions of a plurality of objects.
  • the SPAD at position (x, y) is displayed in gray.
  • the positions (uavg1, vavg1), (uavg2, vavg2) and (uavg3, vavg3) represented by the formulas 144 to 147 are also illustrated.
  • the position (uavg1, vavg1) can be considered as the center of gravity of the object at the distance Z (x, y, 1).
  • the position (uavg2, vavg2) can be considered as the center of gravity of the object at the distance Z (x, y, 2).
  • the position (uavg3, vavg3) can be considered as the center of gravity of the object at the distance Z (x, y, 3).
  • the region B1 ( ⁇ 1, ⁇ 1, u0, v0) of the first object ⁇ “the complement of B1 ( ⁇ 3, ⁇ 3, u0, v0)” is displayed in gray. It is the intersection of ⁇ 1 ⁇ (u ⁇ u0) + ⁇ 1 ⁇ (v ⁇ v0) ⁇ 0 and ⁇ 3 ⁇ (u ⁇ u0) + ⁇ 3 ⁇ (v ⁇ v0)> 0.
  • the area B1 ( ⁇ 2, ⁇ 2, u0, v0) of the second object ⁇ “the complement of B1 ( ⁇ 1, ⁇ 1, u0, v0)” is displayed in gray. It is the intersection of ⁇ 2 ⁇ (u ⁇ u0) + ⁇ 2 ⁇ (v ⁇ v0) ⁇ 0 and ⁇ 1 ⁇ (u ⁇ u0) + ⁇ 1 ⁇ (v ⁇ v0)> 0.
  • the area B1 ( ⁇ 3, ⁇ 3, u0, v0) of the third object ⁇ “the complement of B1 ( ⁇ 2, ⁇ 2, u0, v0)” is displayed in gray. It is the intersection of ⁇ 3 ⁇ (u ⁇ u0) + ⁇ 3 ⁇ (v ⁇ v0) ⁇ 0 and ⁇ 2 ⁇ (u ⁇ u0) + ⁇ 2 ⁇ (v ⁇ v0)> 0.
  • ⁇ 1, ⁇ 1, ⁇ 2, ⁇ 2, ⁇ 3 and ⁇ 3 can be obtained by Expression 144 to Expression 149.
  • U0 and v0 can be obtained from the equation obtained by substituting ⁇ 1, ⁇ 1, ⁇ 2, ⁇ 2, ⁇ 3, and ⁇ 3 obtained above into the equation 150.
  • first object area to be finally obtained may be obtained only in the area of SPAD at the position (x, y), so the following formula 151 is established. Since “the area of the second object” needs to be obtained only in the area of SPAD at position (x, y), the following equation 152 holds. Since “the area of the third object” needs to be obtained only in the area of SPAD at position (x, y), the following equation 153 holds.
  • FIG. 90 is a flowchart illustrating an example of a processing procedure of processing for obtaining a region of an object in a third example of the ninth embodiment of the present technology. This process is performed by the calculation unit 16.
  • step S942 Formulas 144 to 149 are calculated to determine ⁇ 1, ⁇ 1, ⁇ 2, ⁇ 2, ⁇ 3, and ⁇ 3. Then, the process proceeds to step S943.
  • step S943 u0 and v0 are determined from the equation obtained by substituting ⁇ 1, ⁇ 1, ⁇ 2, ⁇ 2, ⁇ 3, and ⁇ 3 obtained in step S942 into equation 150. Then, the process proceeds to step S944.
  • step S 944 the regions represented by equations 151 to 153 are output from ⁇ 1, ⁇ 1, ⁇ 2, ⁇ 2, ⁇ 3, ⁇ 3, u 0 and v 0 determined in steps S 942 and S 943. Then, the series of processing ends.
  • the occurrence rate is determined from the observed histogram. Determine the incidence peak and peak area. From the ratio of the peak areas, the ratio of the projection area of the object at the corresponding distance in the region of the SPAD of interest is determined (Equation 133, Equation 140 or Equation 150).
  • the center of gravity of the object at each distance including the peripheral pixels is determined, and the direction of the boundary (edge) of the object is determined from the positional relationship of the centers of gravity (“Expression 129 and Expression 130”, “Expression 135 to Expression 137 “or” Formula 144 to Formula 149 ").
  • the projected area of the object at each distance can be determined.
  • the ninth embodiment is characterized by the following points.
  • a second input step of inputting a plurality of histograms A second input step of inputting a plurality of histograms; A first occurrence rate calculation step of obtaining an occurrence rate by dividing a histogram bin by a value obtained by subtracting the frequency of a young bin from the total number of histograms for each of the plurality of histograms; A first peak detection step of determining the peak of the incidence rate and the peak area; An area calculating step of determining an area of the area of the object from the ratio of the peak areas.
  • a third input step for inputting a plurality of histograms A third input step for inputting a plurality of histograms; A second occurrence rate calculation step of obtaining an occurrence rate by dividing a histogram bin by a value obtained by subtracting the frequency of a young bin from the total number of histograms for each of the plurality of histograms; A second peak detection step of determining the peak of the incidence rate and the peak area; A first barycentric position calculating step of calculating a weighted average weighted by the peak area for each position of the histogram for each bin corresponding to the peak; And a first boundary direction calculating step of determining the direction of the boundary of the region of the object from the positional relationship of the center of gravity.
  • Tenth embodiment> [Overview] When a plurality of peaks are detected on the histogram corresponding to one SPAD, the distance from each peak to the object can be calculated, but the positions of the boundaries (edges) of these objects (that is, the regions of each object ) But where it is still unknown.
  • the tenth embodiment is made in view of such a situation, and detects an edge position (that is, an area of each object). More specifically, the tenth embodiment is to increase the resolution of distance data. Then, the detailed position of the edge can be known from the resolution-increased distance data as a result of applying the tenth embodiment.
  • the variable (x, y) is a variable indicating the position of each SPAD of the SPAD array 13 and takes an integer value.
  • the variable (u, v) is a variable indicating the position of the SPAD array 13 and takes a real number value.
  • the variable ( ⁇ , ⁇ ) is a variable indicating the pixel position of the high resolution image obtained from the camera 100.
  • the histogram of the position (x, y) is H (x, y, n).
  • x is an integer of 0 or more and X-1 or less
  • y is an integer of 0 or more and Y-1 or less
  • n represents a bin number and is an integer of 0 or more and N-1 or less.
  • H (x, y, n) is simply written as h (n).
  • n 0 to N-1.
  • the occurrence rate is the same as in the other embodiments, and is the number of occurrences of a certain event per unit time.
  • the probability that photons will fly in time (D) corresponding to the bin is a value obtained by multiplying the occurrence rate by time D.
  • constant multiplication D multiplication
  • time D may be considered as unit time.
  • the definition of the occurrence rate it may be considered to be a value D times the generally used term “occurrence rate”.
  • the occurrence rate p (n) in the bin n is the probability that light (photon) will fly to the SPAD during the time n ⁇ D to the time (n + 1) ⁇ D. It does not matter whether the light (photon) has arrived before time n ⁇ D.
  • the light (photon) detected by each SPAD of the SPAD sensor 13 in the distance measuring device 10 is the light (photon) that first comes in, and the light (photon) that comes in second and subsequent times is not detected.
  • bin 6 When the third light (photon) comes in at the corresponding time, only h (2) is counted on the histogram and not h (4) or h (6).
  • the probability that the frequency of the bin 0 is h (0) in M measurements is represented by the following equation 154. This is because an event that occurs with the probability of p (0) is a probability that occurs h (0) out of M times.
  • the probability that the frequency of bin 1 will be h (1) is as in the following equation 155, although h (0) times have occurred in bin 0 in M measurements. This is because an event that occurs with the probability of p (1) is a probability that occurs h (1) of M ⁇ h (0) times.
  • Equation 156 This is because an event that occurs with the probability of p (2) is a probability that occurs h (2) of M ⁇ h (0) ⁇ h (1) times.
  • the probability that the frequency of bin n will be h (n) is given by the following formula 157, although h (m) has occurred at bin m in M measurements.
  • m is 0 to n-1.
  • FIG. 91 is a diagram illustrating an example of positions of SPADs in the (u, v) coordinate system in the tenth embodiment of the present technology.
  • each position in the SPAD array 13 is expressed by (u, v).
  • u and v are each real numbers.
  • the physical region of SPAD at position (x, y) is A (x, y) as indicated by equation 159 below.
  • FIG. 92 is a diagram showing an intensity distribution in an example of distance measurement in the tenth embodiment of the present technology.
  • the light emission from the light emitting unit 12 (light emission for a short time) changes in intensity with time (t).
  • a in the same figure shows a time transition of the intensity of light emission from the light emitting unit 12.
  • Active light (light from the light emitting unit 12) is incident on each position (u, v) through reflection on the object.
  • the distance to the object be Z (u, v).
  • Incident light to the position (u, v) of the active light reaches the light emission from the light emitting unit 12 with a delay of 2 ⁇ Z (u, v) / c. Also, light decays in proportion to the square of the distance.
  • the reflectance of the object be a (u, v). Taking the above into consideration, the intensity of light incident on the position (u, v) when light is emitted from the light emitting unit 12 is expressed by the following equation 160.
  • ambient light for example, light from the sun 30 in FIG. 1
  • the incident light photons
  • C in the figure shows the time transition of the intensity of ambient light incident on the position (u, v).
  • the intensity of light incident on the position (u, v) is the sum of B and C in FIG.
  • Equation 162 changes time t into n ⁇ D which is the time of the n-th bin with respect to equation 161, The time width D of the n-th bin is multiplied and integrated with respect to (u, v) in the area A (x, y) of SPAD indicated by the position (x, y).
  • the reaction rate ⁇ (u, v, x, y) is multiplied in the derivation of the equation 123 which is an equation corresponding to the equation 162.
  • the reaction rate ⁇ (u, v, x, y) is omitted as it is constant.
  • Equation 123 the domain where SPAD reacts and the physical domain of SPAD are described separately, but in this tenth embodiment, the domain where SPAD reacts and the physical domain of SPAD are It will be described that it is identical and is the equation 159.
  • the SPAD at the position (x, y) in the SPAD array 13 measures an object at C (x, y) different distances.
  • One SPAD does not measure the distance in one direction, but practically measures the entire direction having a certain solid angle. In this case, there are a plurality of objects at different distances in the distance measurement range.
  • C (x, y) objects be a (x, y, i).
  • Equation 162 Equation 163
  • the first term on the right side of Formula 163 is constant regardless of n.
  • FIG. 93 is a diagram showing the distribution of the occurrence rate in the example of the distance measurement according to the tenth embodiment of the present technology.
  • the bin corresponding to the peak is 2 ⁇ Z (x, y, i) / c / D.
  • i 1 to C (x, y).
  • FIG. 94 is a diagram showing the distribution of the occurrence rate in the example of the distance measurement according to the tenth embodiment of the present technology.
  • the area of the part surrounded by the dotted line in the figure indicates the peak area at each peak.
  • the peak area be S (x, y, i).
  • i 1 to C (x, y).
  • the “peak area” is a term generally used in the field of gas chromatograph or liquid chromatograph, and in this embodiment, it is used in the same meaning.
  • ⁇ (A (x, y) ⁇ B (i)) in the equation 164 means the area of A (x, y) ⁇ B (i) which is a region on a two-dimensional plane.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Electromagnetism (AREA)
  • Optical Radar Systems And Details Thereof (AREA)
  • Measurement Of Optical Distance (AREA)

Abstract

反射光の受光頻度を示すヒストグラムに基づいて適切なピーク検出を行って、対象物との距離を測定する。 ヒストグラム取得部は、発光部から発光されたアクティブ光が対象物において反射したアクティブ光成分および環境光が対象物において反射した環境光成分を含む反射光の受光頻度を示すヒストグラムを取得する。検出部は、ヒストグラムに対して所定の統計処理を施すことによりアクティブ光成分の分布を検出する。測定部は、アクティブ光成分の分布に基づいて対象物との距離を距離情報として測定する。

Description

距離測定装置
 本技術は、距離測定装置に関する。詳しくは、SPAD(Single Photon Avalanche Diode)を用いたセンサから得られる信号に基づいて対象物との距離を測定する距離測定装置、および、その処理方法ならびに当該方法をコンピュータに実行させるプログラムに関する。
 距離測定装置(測距センサ)においては、SPADを用いたToF(Time-of-Flight)方式が知られている。このToF方式においては、発光部からパルス光を発光し、対象物に当たり反射してきた光をSPADセンサで受光することによって測距を行う。
 より具体的には、発光部が発光する時刻から、SPADセンサで受光するまでの時間を測定する。そして、この時間に光速(cとする。)を乗算し、それを2で割ることによって、対象物までの距離が計算される。なぜなら、光が対象物までの往復距離を進んだ時間を測定しているからである。
 さて、1回の発光と、その受光では、誤判定を起こす可能性がある。なぜなら、発光してから、対象物に反射して戻ってくるまでの時間内に、外光(環境光)がSPADセンサに入射して、SPADセンサが反応してしまうかもしれないからである。また、発光部からの発光が対象物に反射してSPADセンサに戻ってくるとは限らないからである。これらは、確率的に起きるものである。従って、複数回(例えば数千乃至数万回)の発光と受光による測定を行い、この複数回の測定結果から優位なデータを検出することを行っている。
 より具体的には、横軸に時間、縦軸に頻度というヒストグラムを考える。そして、このヒストグラム上に、発光から受光までの時間をプロットしていく。そして、このヒストグラム上でピークとなる時刻を検出する。この時刻に対して、c/2を乗算することで対象物までの距離が計算できる。
 さて、ここで問題となってくるのが、ピークの検出である。すなわち、ヒストグラム上で、どの時刻がピークであり、どの時刻がピークでないかを判別する方法が必要である。そのため、例えば、ピーク値が、他の値に比べて、あるしきい値以上に差があるかによって判断を行う測距装置が提案されている(例えば、特許文献1参照。)。
特開2010-091377号公報
 上述の従来技術では、発光から受光までの時間を示すヒストグラムにおいて、しきい値を用いてピークを判定している。しかしながら、しきい値は人為的な値として設定されており、理論的な正当性に欠くことが懸念される。そのため、適切なピーク検出とはいえず、誤判定を招くおそれがあった。
 本技術はこのような状況に鑑みて生み出されたものであり、反射光の受光頻度を示すヒストグラムに基づいて適切なピーク検出を行って、対象物との距離を測定することを目的とする。
 本技術は、上述の問題点を解消するためになされたものであり、その第1の側面は、発光部から発光されたアクティブ光が対象物において反射したアクティブ光成分および環境光が上記対象物において反射した環境光成分を含む反射光の受光頻度を示すヒストグラムを取得するヒストグラム取得部と、上記ヒストグラムに対して所定の統計処理を施すことにより上記アクティブ光成分の分布を検出する検出部と、上記アクティブ光成分の分布に基づいて上記対象物との距離を距離情報として測定する測定部とを具備する距離測定装置である。これにより、対象物との距離を適切に測定するという作用をもたらす。
 また、この第1の側面において、上記検出部は、上記所定の統計処理として、上記反射光の受光による生起率を確率変数としたときの確率密度関数を求める処理を行うようにしてもよい。これにより、確率密度関数に基づいて対象物との距離を適切に測定するという作用をもたらす。
 また、この第1の側面において、上記検出部は、上記所定の統計処理として、上記反射光の受光による生起率を時間の関数として表現したときの上記ヒストグラムとの関係を満たす上記関数のパラメータを決定する処理を行うようにしてもよい。これにより、関数のパラメータに基づいて対象物との距離を適切に測定するという作用をもたらす。
 また、この第1の側面において、上記ヒストグラムに対してノイズ除去処理を施すヒストグラムノイズ除去処理部をさらに具備し、上記検出部は、上記ヒストグラムノイズ除去処理部によってノイズ除去処理が施された上記ヒストグラムに対して上記所定の統計処理を施すようにしてもよい。これにより、ノイズ除去されたヒストグラムに基づいて対象物との距離を適切に測定するという作用をもたらす。
 また、この第1の側面において、上記ヒストグラムノイズ除去処理部は、複数の上記ヒストグラムについて適応的に重み付け加算処理を施すようにしてもよい。これにより、ヒストグラムのノイズを除去するという作用をもたらす。
 また、この第1の側面において、上記ヒストグラムノイズ除去処理部は、複数の上記ヒストグラムから得られる生起率に重み付け加算処理を施すようにしてもよい。これにより、ヒストグラムのノイズを除去するという作用をもたらす。
 また、この第1の側面において、上記ヒストグラムノイズ除去処理部は、上記ヒストグラムから得られる生起率のノイズ除去処理を行うようにしてもよい。これにより、生起率のノイズを除去するという作用をもたらす。
 また、この第1の側面において、上記反射光の受光による生起率を時間の関数として表現したときの上記ヒストグラムとの関係を満たすように上記関数のパラメータを制約する第1の制約事項と、時空間における近傍同士の上記パラメータが特定の関係を満たすように制約する第2の制約事項とを満たす上記パラメータを算出し、その算出されたパラメータから上記対象物との距離または輝度を求めるようにしてもよい。これにより、対象物との距離または輝度を適切に測定するという作用をもたらす。
 また、この第1の側面において、上記測定部によって測定された上記距離情報に対してノイズ除去処理を施す距離情報ノイズ除去処理部をさらに具備してもよい。これにより、距離情報のノイズを除去するという作用をもたらす。
 また、この第1の側面において、上記距離情報ノイズ除去処理部は、上記距離情報において時刻および位置が同じデータについて類似しているものほど重みを高くした重み付け加算処理を施すようにしてもよい。これにより、重み付け加算処理によって距離情報のノイズを除去するという作用をもたらす。
 また、この第1の側面において、上記距離情報ノイズ除去処理部は、ノイズ除去後の上記距離情報が上記距離情報と等しくなるように作用させる第1の作用素と、時空間上の近接する上記ノイズ除去後の上記距離情報同士の中で差が最小となる組が等しくなるように作用させる第2の作用素との合計が極値となるように、上記ノイズ除去後の上記距離情報を決定するようにしてもよい。これにより、最小二乗法により距離情報のノイズを除去するという作用をもたらす。
 また、この第1の側面において、上記検出部は、複数の上記ヒストグラムのそれぞれについて、上記ヒストグラムの合計数から最も小さい頻度を減算した値によって上記ヒストグラムの各値を割ることにより生起率を求め、上記生起率のピークおよびピーク面積を求め、そのピーク面積の比から物体の領域の面積を求めるようにしてもよい。これにより、生起率から物体の領域の面積を求めるという作用をもたらす。
 また、この第1の側面において、上記対象物を撮像した画像を入力する画像入力部と、上記画像を複数の分割領域に分割する画像分割部と、上記距離情報を上記複数の分割領域のそれぞれにアサインするアサイン部とをさらに具備してもよい。これにより、距離情報と実際に撮像された画像とをアサインするという作用をもたらす。
 また、この第1の側面において、上記検出部は、複数の上記ヒストグラムのそれぞれについて、上記ヒストグラムの合計数から最も小さい頻度を減算した値によって上記ヒストグラムの各値を割ることにより生起率を求め、上記生起率についてデコンボルーションを行って、そのデコンボルーションされた生起率から先鋭化されたヒストグラムを求めるようにしてもよい。これにより、理想的なレンズを介して得られるヒストグラムに基づいて対象物との距離を適切に測定するという作用をもたらす。
 また、この第1の側面において、上記検出部は、複数の上記ヒストグラムのそれぞれについて、上記ヒストグラムの合計数から最も小さい頻度を減算した値によって上記ヒストグラムの各値を割ることにより生起率を求め、上記生起率のピーク位置およびピークの半値幅を求め、上記半値幅が所定の閾値よりも大きい場合には上記対象物が斜めに配置され、または、動き状態にある旨を検出するようにしてもよい。これにより、ヒストグラムに基づいて対象物の配置状態や動き状態を検出するという作用をもたらす。
 また、この第1の側面において、上記検出部は、上記反射光の受光から特定の時間を経過した後に再び受光を行う条件下においては、上記特定の時間を管理する状態遷移に基づいて上記確率密度関数を求める処理を行うようにしてもよい。これにより、再び受光を行うまでの特定の時間が有限である場合にも、確率密度関数を求めて、対象物との距離を適切に測定するという作用をもたらす。
 また、この第1の側面において、前記検出部は、前記アクティブ光成分の分布に基づいて前記ヒストグラムの時間分解能よりも細かい時間分解能により前記アクティブ光成分のピーク位置を検出して、そのピーク位置に基づいて前記対象物との距離を測定するようにしてもよい。これにより、対象物との距離を測定する際の距離の分解能を向上させるという作用をもたらす。
 また、この第1の側面において、出力部をさらに具備し、前記測定部は、前記環境光成分に対する前記アクティブ光成分の有意性の度合を生成し、前記出力部は、前記距離情報および前記有意性の度合を出力するようにしてもよい。これにより、距離情報とともに有意性の度合を出力するという作用をもたらす。
 本技術によれば、反射光の受光頻度を示すヒストグラムに基づいて適切なピーク検出を行って、対象物との距離を測定することができるという優れた効果を奏し得る。なお、ここに記載された効果は必ずしも限定されるものではなく、本開示中に記載されたいずれかの効果であってもよい。
本技術の実施の形態において想定する距離測定装置10の一構成例を示す図である。 本技術の実施の形態における累積部15により生成されるヒストグラムの一例を示す図である。 本技術の第1の実施の形態における処理を説明するための図である。 本技術の第1の実施の形態における各種処理130を説明するための図である。 本技術の第1の実施の形態における確率密度関数を計算するための処理手順の一例を示す流れ図である。 本技術の第1の実施の形態の第1の実施例において環境光により対象物20が照らし出されたときの輝度値を出力するための処理手順の一例を示す流れ図である。 本技術の第1の実施の形態の第1の実施例のステップS151で求めた各ビンの生起率を示す図である。 本技術の第1の実施の形態の第2の実施例において対象物20までの距離を出力するための処理手順の一例を示す流れ図である。 本技術の第1の実施の形態の第2の実施例のステップS154で求めた各ビンの生起率を示す図である。 本技術の第1の実施の形態の第3の実施例においてアクティブ光により対象物20が照らし出されたときの輝度値を出力するための処理手順の一例を示す流れ図である。 本技術の第1の実施の形態の第4の実施例において対象物20までの距離を出力するための処理手順の一例を示す流れ図である。 本技術の第1の実施の形態の第4の実施例のステップS165で求めた各ビンの生起率を示す図である。 本技術の第1の実施の形態の第5の実施例において環境光により対象物20が照らし出されたときの輝度値を出力するための処理手順の一例を示す流れ図である。 本技術の第1の実施の形態の第6の実施例においてアクティブ光により対象物20が照らし出されたときの輝度値を出力するための処理手順の一例を示す流れ図である。 従来技術における第1の手法を説明するための図である。 従来技術における第2の手法を説明するための図である。 本技術の第2の実施の形態における処理の一例を示す概念図である。 本技術の第2の実施の形態における類似性の評価値を算出する処理の第1の例を示す流れ図である。 本技術の第2の実施の形態における類似性の評価値を算出する処理の第2の例を示す流れ図である。 本技術の第2の実施の形態の第1の実施例におけるヒストグラムのノイズ除去処理の一例を示す流れ図である。 本技術の第2の実施の形態の第2の実施例におけるヒストグラムのノイズ除去処理の一例を示す流れ図である。 本技術の第2の実施の形態の第3の実施例におけるヒストグラムのノイズ除去処理の一例を示す流れ図である。 本技術の第2の実施の形態の第3の実施例におけるヒストグラムの類似性の評価値を算出する処理の処理手順の一例を示す流れ図である。 本技術の第2の実施の形態の第4の実施例におけるヒストグラムのノイズ除去処理の一例を示す流れ図である。 本技術の第2の実施の形態の第4の実施例におけるヒストグラムのノイズ除去処理の一例を示す流れ図である。 本技術の第2の実施の形態の第4の実施例におけるヒストグラムのノイズ除去処理の一例を示す流れ図である。 本技術の第2の実施の形態の第5の実施例におけるヒストグラムのノイズ除去処理の一例を示す流れ図である。 本技術の第2の実施の形態の第6の実施例におけるヒストグラムのノイズ除去処理の一例を示す流れ図である。 本技術の第2の実施の形態の第6の実施例におけるヒストグラムのノイズ除去処理の一例を示す流れ図である。 本技術の第2の実施の形態の第1乃至第6の実施例における「情報」および「適切な加算」の具体例のまとめを示す図である。 従来技術における第1の手法を説明するための図である。 従来技術における第2の手法を説明するための図である。 本技術の第3の実施の形態における処理の一例を示す概念図である。 本技術の第3の実施の形態の第1の実施例における生起率のノイズ除去の処理手順の一例を示す流れ図である。 本技術の第3の実施の形態の第2の実施例における生起率のノイズ除去の処理手順の一例を示す流れ図である。 本技術の第3の実施の形態の第3の実施例における生起率のノイズ除去の処理手順の一例を示す流れ図である。 本技術の第3の実施の形態の第4の実施例における生起率のノイズ除去の処理手順の一例を示す流れ図である。 本技術の第3の実施の形態の第5の実施例における生起率のノイズ除去の処理手順の一例を示す流れ図である。 本技術の第3の実施の形態の第6の実施例における生起率のノイズ除去の処理手順の一例を示す流れ図である。 本技術の第3の実施の形態の第6の実施例における生起率のノイズ除去の処理手順の一例を示す流れ図である。 本技術の第3の実施の形態の第1乃至第6の実施例における「情報」および「適切な加算」の具体例のまとめを示す図である。 本技術の第4の実施の形態の第1の実施例における生起率のノイズ除去の処理手順の一例を示す流れ図である。 本技術の第4の実施の形態の第2の実施例におけるヒストグラムのノイズ除去の処理手順の一例を示す流れ図である。 本技術の第4の実施の形態の第3の実施例における生起率のノイズ除去の処理手順の一例を示す流れ図である。 本技術の第4の実施の形態の第4の実施例におけるヒストグラムのノイズ除去の処理手順の一例を示す流れ図である。 本技術の第4の実施の形態の第5の実施例における生起率のノイズ除去の処理手順の一例を示す流れ図である。 本技術の第4の実施の形態の第6の実施例におけるヒストグラムのノイズ除去の処理手順の一例を示す流れ図である。 本技術の第5の実施の形態における距離測定の第1の例の様子を示す図である。 本技術の第5の実施の形態における距離測定の第1の例における強度分布を示す図である。 本技術の第5の実施の形態の第1の実施例における距離測定処理の処理手順の一例を示す流れ図である。 本技術の第5の実施の形態における距離測定の第2の例の様子を示す図である。 本技術の第5の実施の形態における距離測定の第2の例における強度分布を示す図である。 本技術の第5の実施の形態の第2の実施例における距離測定処理の処理手順の一例を示す流れ図である。 本技術の第5の実施の形態の第3の実施例における受光判断の処理手順の一例を示す流れ図である。 本技術の第6の実施の形態における強度分布を説明するための図である。 本技術の第6の実施の形態の第1の実施例における輝度値および距離の算出処理の処理手順例を示す流れ図である。 本技術の第6の実施の形態の第2の実施例における輝度値および距離の算出処理の処理手順例を示す流れ図である。 本技術の第6の実施の形態の第3の実施例における輝度値および距離の算出処理の処理手順例を示す流れ図である。 本技術の第6の実施の形態の第4の実施例における輝度値および距離の算出処理の処理手順例を示す流れ図である。 本技術の第6の実施の形態の第5の実施例における輝度値および距離の算出処理の処理手順例を示す流れ図である。 本技術の第6の実施の形態の第6の実施例における輝度値および距離の算出処理の処理手順例を示す流れ図である。 本技術の第7の実施の形態における距離測定の様子の一例を示す図である。 本技術の第7の実施の形態における距離測定の例における強度分布を示す図である。 本技術の第7の実施の形態の第1の実施例におけるノイズ除去の処理手順例を示す流れ図である。 本技術の第7の実施の形態の第2の実施例におけるノイズ除去の処理手順例を示す流れ図である。 本技術の第7の実施の形態の第3の実施例におけるノイズ除去の処理手順例を示す流れ図である。 本技術の第7の実施の形態の第4の実施例におけるノイズ除去の処理手順例を示す流れ図である。 本技術の第7の実施の形態の第5の実施例におけるノイズ除去の処理手順例を示す流れ図である。 本技術の第7の実施の形態の第6の実施例におけるノイズ除去の処理手順例を示す流れ図である。 本技術の第7の実施の形態の第7の実施例におけるノイズ除去の処理手順例を示す流れ図である。 本技術の第8の実施の形態における距離測定の様子の一例を示す図である。 本技術の第8の実施の形態における距離測定の例における強度分布を示す図である。 本技術の第8の実施の形態の実施例におけるノイズ除去の処理手順例を示す流れ図である。 本技術の第9の実施の形態において(u,v)座標系における各SPADの位置の例を示す図である。 本技術の第9の実施の形態におけるA(x,y)とAs(x,y)の関係例を示す図である。 本技術の第9の実施の形態における距離測定の例における強度分布を示す図である。 本技術の第9の実施の形態の距離測定の例における生起率の分布を示す図である。 本技術の第9の実施の形態の距離測定の例における生起率の分布を示す図である。 本技術の第9の実施の形態における距離測定の様子の第1の例を示す図である。 本技術の第9の実施の形態における距離測定の様子の第2の例を示す図である。 本技術の第9の実施の形態におけるプレ処理の処理手順例を示す流れ図である。 本技術の第9の実施の形態の第1の実施例におけるG(x,y)に含まれる位置におけるSPADの各位置を示す図である。 本技術の第9の実施の形態の第1の実施例における物体の領域を求める処理の処理手順例を示す流れ図である。 本技術の第9の実施の形態の第2の実施例におけるG(x,y)に含まれる位置におけるSPADの各位置を示す図である。 本技術の第9の実施の形態の第2の実施例における物体の領域を求める処理の処理手順例を示す流れ図である。 本技術の第9の実施の形態の第3の実施例におけるG(x,y)に含まれる位置におけるSPADの各位置を示す図である。 本技術の第9の実施の形態の第3の実施例におけるG(x,y)に含まれる位置におけるSPADの各位置を示す図である。 本技術の第9の実施の形態の第3の実施例におけるG(x,y)に含まれる位置におけるSPADの各位置を示す図である。 本技術の第9の実施の形態の第3の実施例におけるG(x,y)に含まれる位置におけるSPADの各位置を示す図である。 本技術の第9の実施の形態の第3の実施例における物体の領域を求める処理の処理手順例を示す流れ図である。 本技術の第10の実施の形態において(u,v)座標系における各SPADの位置の例を示す図である。 本技術の第10の実施の形態における距離測定の例における強度分布を示す図である。 本技術の第10の実施の形態の距離測定の例における生起率の分布を示す図である。 本技術の第10の実施の形態の距離測定の例における生起率の分布を示す図である。 本技術の第10の実施の形態における距離測定の様子の一例を示す図である。 本技術の第10の実施の形態におけるSPADとカラー画像の画素の位置関係の一例を示す図である。 本技術の第10の実施の形態の第1の実施例におけるSPADとカラー画像の画素の位置関係例を示す図である。 本技術の第10の実施の形態の第1の実施例におけるSPADとカラー画像の画素の位置関係例を示す図である。 本技術の第10の実施の形態の第1の実施例におけるSPADとカラー画像の画素の位置関係例を示す図である。 本技術の第10の実施の形態の第1の実施例におけるSPADとカラー画像の画素の位置関係例を示す図である。 本技術の第10の実施の形態の第1の実施例におけるSPADとカラー画像の画素の位置関係例を示す図である。 本技術の第10の実施の形態の第1の実施例におけるSPADとカラー画像の画素の位置関係例を示す図である。 本技術の第10の実施の形態の第1の実施例におけるSPADとカラー画像の画素の位置関係例を示す図である。 本技術の第10の実施の形態の第1の実施例におけるSPADとカラー画像の画素の位置関係例を示す図である。 本技術の第10の実施の形態の実施例における距離データを確定する処理の処理手順例を示す流れ図である。 本技術の第11の実施の形態における距離測定の様子の一例を示す図である。 本技術の第11の実施の形態の距離測定の例における生起率の分布を示す図である。 本技術の第11の実施の形態の距離測定の例における生起率の分布を示す図である。 本技術の第11の実施の形態の距離測定の例における生起率の分布を示す図である。 本技術の第11の実施の形態の実施例におけるヒストグラムの先鋭化処理の処理手順例を示す流れ図である。 本技術の第12の実施の形態における累積部15により生成されるヒストグラムの一例を示す図である。 本技術の第12の実施の形態において(u,v)座標系における各SPADの位置の例を示す図である。 本技術の第12の実施の形態における距離測定の例における強度分布を示す図である。 本技術の第12の実施の形態における距離測定の様子の第1の例を示す図である。 本技術の第12の実施の形態における光の強度の時間推移を示す図である。 本技術の第12の実施の形態における配置による強度分布の比較例を示す図である。 本技術の第12の実施の形態における距離測定の第1の例における生起率を示す図である。 本技術の第12の実施の形態における距離測定の様子の第2の例を示す図である。 本技術の第12の実施の形態の実施例における物体の状況判断処理の処理手順例を示す流れ図である。 本技術の第12の実施の形態の実施例における物体の状況判断処理の処理手順例を示す流れ図である。 本技術の第13の実施の形態におけるデッドタイムを有するSPADを用いた場合の動作例を示す図である。 本技術の第13の実施の形態におけるデッドタイムを有するSPADを用いた場合の状態遷移の例を示す図である。 本技術の第13の実施の形態におけるSPADを用いた場合の確率密度関数を計算するための処理手順の一例を示す流れ図である。 本技術の第13の実施の形態におけるデッドタイムを有するSPADを用いた場合の他の動作例を示す図である。 本技術の第13の実施の形態におけるSPADを用いた場合の確率密度関数を計算するための処理手順の他の例を示す流れ図である。 本技術の第14の実施の形態における距離測定の強度分布の例を示す図である。 本技術の第14の実施の形態における距離測定の強度分布の例を示す図である。 本技術の第14の実施の形態における生起率の補間の具体例を示す図である。 本技術の第14の実施の形態における生起率のピークを高時間分解能の精度で算出するための処理手順を示す流れ図である。 本技術の第14の実施の形態における測定物体の属性を検出する処理の概念図である。 本技術の第14の実施の形態における測定物体の属性を検出する処理の前提となる強度分布の例を示す図である。 本技術の第14の実施の形態における測定物体の属性を検出する処理の概念図である。 本技術の第14の実施の形態における測定物体の属性を検出する処理の概念図である。 本技術の第15の実施の形態における集合Sの前提を示す図である。 本技術の第15の実施の形態における生起率の例を示す図である。 本技術の第15の実施の形態における確度を算出する処理手順の例を示す流れ図である。 本技術の第15の実施の形態の適用例について示す図である。 本技術の第15の実施の形態における確度を算出して所望の確度以上の距離データのみを出力する処理手順の例を示す流れ図である。 本開示に係る技術が適用され得る移動体制御システムの一例である車両制御システムの概略的な構成例を示すブロック図である。 本開示に係る技術が適用され得る移動体制御システムの一例である車両制御システムの撮像部12031の設置位置の例を示す図である。
 以下、本技術を実施するための形態(以下、実施の形態と称する)について説明する。説明は以下の順序により行う。
 1.距離測定装置
 2.第1の実施の形態
 3.第2の実施の形態
 4.第3の実施の形態
 5.第4の実施の形態
 6.第5の実施の形態
 7.第6の実施の形態
 8.第7の実施の形態
 9.第8の実施の形態
 10.第9の実施の形態
 11.第10の実施の形態
 12.第11の実施の形態
 13.第12の実施の形態
 14.第13の実施の形態
 15.第14の実施の形態
 16.第15の実施の形態
 17.適用例
 <1.距離測定装置>
 [距離測定装置の構成]
 図1は、本技術の実施の形態において想定する距離測定装置10の一構成例を示す図である。
 この距離測定装置10は、SPAD(Single Photon Avalanche Diode)を用いたセンサから得られる信号に基づいて対象物20との距離を測定するものである。この距離測定装置10は、制御部11と、発光部12と、SPADアレイ13と、時間差検出部14と、累積部15と、演算部16と、出力端子17とを備える。
 SPADアレイ13は、SPADを2次元アレイ状に配置したCMOS(Complementary Metal Oxide Semiconductor)イメージセンサ(イメージャ)である。このSPADアレイ13の前面にはレンズ13aが取り付けられており、このレンズ13aにより集光され、各SPADが効率よく受光できるようになっている。なお、本開示においては、SPADアレイ13をSPADセンサ13と表記することもある。
 制御部11からの制御信号により、発光部12、SPADアレイ13、時間差検出部14、累積部15、および、演算部16は制御される。具体的な制御内容は、以下のとおりである。
 制御部11からの制御により、発光部12において短時間の発光が行われて、光40がアクティブ光として対象物20に届く。そして、対象物20において反射されて、光41としてSPADアレイ13内の1つのSPADに戻ってくる。もちろん、常に戻ってくるとは限らない。つまり、確率的に戻ってくる場合もあれば、戻ってこない場合もある。
 また、発光部12からの発光とは別に、太陽30からの光42も環境光として対象物20に届く。そして、光42は対象物20において反射されて、光43としてSPADアレイ13内の1つのSPADに到達する。
 発光部12からの発光の時刻から、SPADアレイ13内の各SPADでの受光までの時間は、時間差検出部14において計測される。このような距離測定方式は、ToF(Time-of-Flight)方式と呼ばれる。ただし、その光が、光41であるか光43であるかは判別できない。なお、時間差検出部14は、TDC(Time To Digital Converter)により構成されるのが一般的である。そして、各SPADに対して、それぞれ、時間を計測するため、TDCはSPADと同数を有するのが一般的である。
 この時間の値は、累積部15に送られる。累積部15は(図示しない)メモリを有し、そのメモリ上にヒストグラムデータが形成される。この時間の値に対応したヒストグラムのビンを1だけインクリメントする。これにより、ヒストグラムの更新が行われる。なお、各SPADに対して、それぞれ、1つのヒストグラムが形成される。なお、時間差検出部14および累積部15は、特許請求の範囲に記載のヒストグラム取得部の一例である。
 制御部11からの制御による発光部12での短時間発光は、複数回行われる。この回数をM(Mは整数)とする。Mは通常、数千乃至数万である。
 M回の測定の後に得られた最終的なヒストグラムのデータは、演算部16に送られる。
 演算部16における処理によって得られるデータ(対象物20までの距離データ)は、出力端子17から出力される。
 SPADアレイ13内の各SPADは、最初に飛来した光(フォトン)を検出するセンサである。したがって、光43よりも光41の方が時間的に早く飛来してくれば、正しく測距を行うことができる。すなわち、時間差検出部14において検出された時間は、対象物20までの往復時間であり、c/2(cは光の速度)を乗算することによって対象物20までの距離を計算することができる。一方、光41よりも光43の方が時間的に早く飛来した場合は、測距のための正しい時間を測定することはできない。
 光43の受光(環境光の受光)は、時間によらず、常に一定の確率で起きる。一方、光41の受光(アクティブ光の受光)は、ある時刻(より具体的には、対象物20までの距離の2倍をcで割った値)に集中して起きる。したがって、ヒストグラム上でピークを検出し、そのピークに対応する時間を求めることにより、対象物20までの距離を求めることができる。
 このように、ヒストグラムからピークを検出する処理と、そのピークに対応する時間にc/2を乗算して距離を算出する処理が、演算部16によって行われる。なお、演算部16は、特許請求の範囲に記載の検出部および測定部の一例である。
 距離測定装置10には、カメラ100を併設してもよい。カメラ100は、距離測定装置10のSPADアレイ13が測定する方向と同じ方向を撮影している。
 カメラ100から得られる画像は、距離測定装置10の入力端子18を介して、演算部16に送られる。演算部16では、その画像を使用して、演算が行われてもよい。
 [ヒストグラム]
 図2は、本技術の実施の形態における累積部15により生成されるヒストグラムの一例を示す図である。
 このヒストグラムにおいて、時間(横軸)は、幅Dの単位で表現されている。つまり、時間差検出部14にて検出される時間の値が、時間0から時間Dまでの範囲であれば、0番目のビンの頻度に加えられる。時間Dから時間2Dまでの範囲であれば、1番目のビンの頻度に加えられる。時間2Dから時間3Dまでの範囲であれば、2番目のビンの頻度に加えられる。以降、同様で、時間(N-1)×Dから時間N×Dまでの範囲であれば、N-1番目のビンの頻度に加えられる。
 ここで、Dは、TDCの分解能である。
 なお、1回の測定では、測定時間をN×Dで制限している。つまり、発光からN×Dだけ時間が経過しても、受光されなかった場合は、そこで測定を終了する。この場合、時間差検出部14では、時間の値を出力せず、累積部15でのヒストグラムの更新も行われない。ここで、Nは定数である。
 したがって、M回の測定の後に得られる最終的なヒストグラムについて、全てのビンの頻度を合計しても、M未満の時もある。
 SPADアレイ13の各位置(x,y)には、SPADが配置されているものとする。ここで、x=1乃至X、y=1乃至Yであり、SPADの総数はX×Y個である。前述のとおり、測距はM回の発光と受光により行われ、ヒストグラムが累積部15にて完成される。すなわち、M回の発光と受光により、各位置(x,y)に対応したヒストグラムが完成される。ヒストグラムの総数は、X×Y個である。
 さらに、時間的に続けて、測距が行われるとする。すなわち、「M回の発光と受光でヒストグラムを作成する」という処理を、連続して行う。「M回の発光と受光でヒストグラムを作成する」という処理にかかる時間を単位時間とする。このように単位時間を定義することで、時刻tでは、時間的にt番目に作成されたヒストグラムが累積部15にて出力されることになる。ここで、tは1以上の整数である。
 時刻t、位置(x,y)のヒストグラムをH(t,x,y,n)とする。ここで、tは1以上の整数、xは1以上X以下の整数、yは1以上Y以下の整数である。そして、nはビンの番号を表しており、0以上N-1以下の整数である。
 ただし、実施の形態によっては、時刻tや位置(x,y)に着目しない場合がある。以下の確率密度関数の導出においては、1つのヒストグラムのみを考慮するため、H(t,x,y,n)を単にh(n)と表す。ここで、n=0乃至N-1である。なお、これ以降では、X=1かつY=1でも良い実施の形態においては、SPADアレイ13をSPADセンサ13と表記することもある。
 [確率密度関数]
 ここでは、まず、用語の解説を行う。生起率とは、あるイベントが単位時間あたりに起こる発生回数である。確率論において、「生起率」は一般的に使われる用語であり、本技術の実施の形態においても、同じ意味で使用する。つまり、SPADセンサ13に光(フォトン)が飛来する単位時間あたりの回数を、フォトン飛来生起率、または、単に、生起率と呼ぶ。各ビンにおける生起率は、そのビンに対応する時間内において、フォトンが飛来する確率である。ビンnにおける生起率をp(n)とする。
 なお、正確に述べると、「そのビンに対応する時間(D)内においてフォトンが飛来する確率」は、生起率に、時間Dを乗算した値である。しかし、ここでは、定数倍(D倍)は無視している。または、時間Dを単位時間と考えてもよい。
 さて、ビンnにおける生起率p(n)は、時間n×Dから時間(n+1)×Dの間に、SPADセンサ13に光(フォトン)が飛来する確率である。時間n×D以前に光(フォトン)が飛来したかどうかに関係しない。
 一方、距離測定装置10内のSPADセンサ13が検出する光(フォトン)は、最初に飛来した光(フォトン)であり、2番目以降に飛来した光(フォトン)は検出されない。具体例を示すと、ビン2に対応する時間に最初に光(フォトン)が飛来して、そして、ビン4に対応する時間に2番目の光(フォトン)が飛来して、さらに、ビン6に対応する時間に3番目の光(フォトン)が飛来した場合、ヒストグラム上には、h(2)だけがカウントされて、h(4)またはh(6)にはカウントされない。
 このように、それ以前に光(フォトン)が飛来したかに無関係な生起率p(n)と、それ以前に光(フォトン)が飛来した場合はカウントされないという頻度h(n)には、明確な違いがある。このことを考慮すると、生起率p(n)と頻度h(n)の関係を導くことができる。
 ビン0における生起率をp(0)とすると、M回の測定で、ビン0の頻度がh(0)となる確率は、式1となる。
Figure JPOXMLDOC01-appb-M000001
なぜなら、p(0)の確率で起きるイベントが、M回のうちh(0)回起きる確率であるからである。
 ビン1における生起率をp(1)とする。M回の測定で、h(0)回はビン0で起きてしまったにもかかわらず、ビン1の頻度がh(1)となる確率は、式2となる。
Figure JPOXMLDOC01-appb-M000002
なぜなら、p(1)の確率で起きるイベントが、M-h(0)回のうちh(1)回起きる確率であるからである。
 ビン2における生起率をp(2)とする。M回の測定で、h(0)回はビン0で起きてしまい、かつ、h(1)回はビン1で起きてしまったにもかかわらず、ビン2の頻度がh(2)となる確率は、式3となる。
Figure JPOXMLDOC01-appb-M000003
なぜなら、p(2)の確率で起きるイベントが、M-h(0)-h(1)回のうちh(2)回起きる確率であるからである。
 同様にして、M回の測定で、h(m)回はビンmで起きてしまったにもかかわらず、ビンnの頻度がh(n)となる確率は、式4となる。ここで、m=0乃至n-1である。
Figure JPOXMLDOC01-appb-M000004
 さらに、式4は、二項分布であり、正規分布で近似することができる。すなわち、ヒストグラムにおいてn番目のビンの頻度h(n)を確率変数としたときの確率密度関数は、式5に示す正規分布となる。
Figure JPOXMLDOC01-appb-M000005
 さらに、次の式6が成立する。
Figure JPOXMLDOC01-appb-M000006
 この式6を用いて、式5は式7に近似することができる。
Figure JPOXMLDOC01-appb-M000007
 したがって、ヒストグラムの各ビンnの頻度h(n)が観測された時に、n番目のビンの生起率p(n)を確率変数としたときの確率密度関数は、式6、式7より、式8となる。
Figure JPOXMLDOC01-appb-M000008
この式8が、この実施の形態における理論から導いた最終式(各ビンnの頻度h(n)が観測された時の生起率p(n)の確率密度関数)である。
 先に述べたように、環境光の受光は、時間によらず、常に一定の確率で起きるため、対応するビンの生起率は一定である。一方、アクティブ光の受光は、ある時刻(すなわち、あるビン)に集中するため、他のビンの生起率よりも高い生起率となる。このことを、式8を用いて、理論的に解くことが可能となる。
 <2.第1の実施の形態>
 [概要]
 第1の実施の形態は、ヒストグラムの各ビンの生起率を確率変数としたときの確率密度関数を正確に求めて、これにより輝度値や距離を正確に求めるものである。
 図3は、本技術の第1の実施の形態における処理を説明するための図である。
 同図におけるaに示すように、従来はヒストグラムから、人為的なしきい値を用いてピーク検出処理101を行い、その時刻に対応する距離を出力していた。
 一方、この第1の実施の形態では、同図におけるbに示すように、ヒストグラムから、各時刻におけるセンサ反応生起率を表現した確率密度関数を計算する処理102を行う。これにより、理論的に正しい生起率が算出されるため、間違えた結果を生じることはない。
 さらに、この第1の実施の形態では、この生起率を表現した確率密度関数を用いて、後述する各種処理130を行う。これにより、種々のデータを正確に出力することができる。ここで、各種処理130とは、例えば、次に示す処理である。
 図4は、本技術の第1の実施の形態における各種処理130を説明するための図である。
 同図におけるaは、確率密度関数を計算する処理102の後段に、環境光成分の検出処理131を設けている。これにより、環境光成分の量を求めることができる。すなわち、環境光により対象物20が照らし出されたときの輝度値を出力することができる。なお、同図におけるaは、後述する第1の実施例および第5の実施例に対応している。
 同図におけるbは、確率密度関数を計算する処理102の後段に、環境光成分以外の時刻の検出処理132を設けている。これにより、環境光成分以外の光、すなわち、発光部からの光(アクティブ光)が対象物20に照射されて反射してきた時の時間を求めることができる。これにより、対象物20までの光の往復時間を知ることができ、対象物20までの距離を出力することができる。なお、同図におけるbは、後述する第2の実施例および第4の実施例に対応している。
 同図におけるcは、確率密度関数を計算する処理102の後段に、アクティブ光成分の検出処理133を設けている。これにより、アクティブ光成分の量を求めることができる。すなわち、アクティブ光により対象物20が照らし出されたときの輝度値を出力することができる。なお、同図におけるcは、後述する第3の実施例および第6の実施例に対応している。
 [確率密度関数]
 図5は、本技術の第1の実施の形態における確率密度関数を計算するための処理手順の一例を示す流れ図である。この処理は、演算部16によって行われる。
 最初に、ステップS141において、ヒストグラム作成のために行った測定回数である数値Mを入力する。そして、ステップS142に進む。
 ステップS142において、累積部15によって作成されたヒストグラムのデータを入力する。すなわち、各ビンnにおける頻度h(n)を入力する。ここで、n=0乃至N-1である。そして、ステップS143に進む。
 ステップS143において、上述の式4に定義されているM(n-1)を計算する。ここで、n=0乃至N-1である。そして、ステップS144に進む。
 ステップS144において、H(n)=h(n)÷M(n-1)を計算する。ここで、n=0乃至N-1である。なお、H(n)は、上述の式8の正規分布における平均である。そして、ステップS145に進む。
 ステップS145において、σ(n)=「(1/M(n-1)×h(n)/M(n-1)×(1-h(n)/M(n-1)))の平方根」を計算する。ここで、n=0乃至N-1である。なお、σ(n)は、上述の式8の正規分布における標準偏差である。そして、ステップS146に進む。
 ステップS146において、平均としてH(n)を、標準偏差としてσ(n)を出力し、一連の処理を終了する。ここで、n=0乃至N-1である。
 このようにして理論的に導いた「n番目のビンの生起率p(n)を確率変数としたときの確率密度関数」を用いて、その具体的な応用例を以下に示す。
 [第1の実施例]
 第1の実施例は、距離測定装置10を使って、環境光により対象物20が照らし出されたときの輝度値を出力する例である。
 図6は、本技術の第1の実施の形態の第1の実施例において環境光により対象物20が照らし出されたときの輝度値を出力するための処理手順の一例を示す流れ図である。この処理は、演算部16によって行われる。
 最初に、ステップS151において、図5に示された確率密度関数計算処理を行う。そして、ステップS152に進む。
 ステップS152において、以下の式9を満たすIambientを求める。そして、ステップS153に進む。
Figure JPOXMLDOC01-appb-M000009
 ステップS153において、環境光により対象物20が照らし出されたときの輝度値として、Iambientを出力し、一連の処理を終了する。
 ここで、式9について補足する。まず、ある値Iに対して、式9の右辺に出てくる集合{n}の意味について、図面を用いて説明する。
 図7は、本技術の第1の実施の形態の第1の実施例のステップS151で求めた各ビンの生起率を示す図である。同図では、代表して、2つのビン(n0とn1)について示している。n0番目およびn1番目のビンの生起率は、それぞれ、平均はH(n0)、H(n1)であり、標準偏差はσ(n0)、σ(n1)である。同図の場合、H(n0)-σ(n0)/2≦I≦H(n0)+σ(n0)/2ではないため、n0は、集合{n}に含まれない。一方、H(n1)-σ(n1)/2≦I≦H(n1)+σ(n1)/2であることから、n1は集合{n}に含まれる。n0における生起率は、H(n0)と考えられる。ただし、不確定性があり、H(n0)-σ(n0)/2以上H(n0)+σ(n0)/2以下程度である可能性は十分ある。この不確定性を考慮しても、生起率はIではないと考えられる。一方、n1における生起率は、H(n1)と考えられる。ただし、不確定性があり、H(n1)-σ(n1)/2以上H(n1)+σ(n1)/2以下程度である可能性は十分ある。この不確定性を考慮すると、生起率がIである可能性は十分あると考えられる。つまり、集合{n}は、生起率がIである可能性が高いビンの集合である。
 次に、式9のIambientについて説明する。集合{n}の要素数が最大となるIの値が、Iambientである。ほとんどのビンにおいて、生起率がIambientであるということは、アクティブ光の受光ではなく、環境光の受光による生起率と考えられる。つまり、環境光の量を表している。したがって、Iambientを環境光により対象物20が照らし出されたときの輝度値としてもよい。なお、式9中の集合の絶対値は、集合の要素数を示す記号である。集合論において、絶対値という記号は、一般的に要素数を表すために使われる記号であり、この実施の形態においても、同じ意味で使用している。
 このように、この第1の実施の形態の第1の実施例では、環境光により対象物20が照らし出されたときの輝度値を求めることができる。
 [第2の実施例]
 第2の実施例は、距離測定装置10を使って、対象物20までの距離を出力する例である。
 図8は、本技術の第1の実施の形態の第2の実施例において対象物20までの距離を出力するための処理手順の一例を示す流れ図である。この処理は、演算部16によって行われる。
 最初に、ステップS154において、図5に示された確率密度関数計算処理を行う。そして、ステップS155に進む。
 ステップS155において、上述の式9を満たすIambientを求める。そして、ステップS156に進む。
 ステップS156において、以下の式10を満たすnを求める。そして、ステップS157に進む。
Figure JPOXMLDOC01-appb-M000010
 ステップS157において、DST=c×n×D÷2を計算する。DSTは、ビンnに対応する距離である。なぜなら、ビンnは、およそn×Dという時間に対応しているからである。そして、ステップS158に進む。
 ステップS158において、対象物までの距離として、DSTを出力し、一連の処理を終了する。
 ここで、式10について、図面を参照して補足する。Iambientは、第1の実施例において説明したように、環境光の受光による生起率である。
 図9は、本技術の第1の実施の形態の第2の実施例のステップS154で求めた各ビンの生起率を示す図である。同図では、代表して、2つのビン(n0とn1)について示している。また、同図には、ステップS155において求めたIambientも示している。n0番目およびn1番目のビンの生起率は、それぞれ、平均はH(n0)、H(n1)であり、標準偏差はσ(n0)、σ(n1)である。同図の場合、Iambient≦H(n0)-3×σ(n0)/2であるため、n0は、式10の集合{n}に含まれる。一方、Iambient≦H(n1)-3×σ(n1)/2ではないため、n1は、式10の集合{n}に含まれない。n0における生起率は、H(n0)と考えられる。ただし、不確定性があり、H(n0)-3×σ(n0)/2以上H(n0)+3×σ(n0)/2以下程度である可能性はあるが、それ以外である可能性はかなり低い。この不確定性を考慮しても、生起率はIambient以上であると考えられる。すなわち、アクティブ光の受光による生起率と考えられる。一方、n1における生起率は、H(n1)と考えられる。ただし、不確定性があり、H(n1)-3×σ(n1)/2以上H(n1)+3×σ(n1)/2以下程度である可能性はある。この不確定性を考慮すると、生起率がIambientである可能性はあると考えられる。すなわち、アクティブ光の受光による生起率とは言い切れない。もし、ピークとして検出できなかった場合には、さらに測距動作を行って再度検出を行うとよい。
 このようにして、式10によって、アクティブ光の受光による生起率が発生したビンを選出することができる。
 このように、この第1の実施の形態の第2の実施例では、アクティブ光の受光による生起率が発生したビンを選出して、対象物20までの距離を求めることができる。
 [第3の実施例]
 第3実施例は、距離測定装置10を使って、アクティブ光により対象物20が照らし出されたときの輝度値を出力する例である。
 図10は、本技術の第1の実施の形態の第3の実施例においてアクティブ光により対象物20が照らし出されたときの輝度値を出力するための処理手順の一例を示す流れ図である。この処理は、演算部16によって行われる。
 最初に、ステップS161において、図5に示された確率密度関数計算処理を行う。そして、ステップS162に進む。
 ステップS162において、上述の式9を満たすIambientを求める。そして、ステップS163に進む。
 ステップS163において、以下の式11を満たすIactiveを求める。そして、ステップS164に進む。
Figure JPOXMLDOC01-appb-M000011
 ステップS164において、アクティブ光により対象物20が照らし出されたときの輝度値として、Iactiveを出力し、一連の処理を終了する。
 ここで、式11について補足する。式11の右辺の累積するnは、式10を満たすnと同じである。すなわち、第2の実施例において説明したように、アクティブ光の受光による生起率が発生したビンである。当然、このビンの生起率には、環境光の受光による生起率も含まれている。そこで、式11に示すようにH(n)からIambientを減算して、nについて累積することにより、アクティブ光の受光による生起率の合計のみを算出することができる。つまり、アクティブ光の量を求めることができる。したがって、Iactiveを、アクティブ光により対象物20が照らし出されたときの輝度値としてもよい。
 このように、この第1の実施の形態の第3の実施例では、アクティブ光により対象物20が照らし出されたときの輝度値を求めることができる。
 [第4の実施例]
 第4の実施例は、距離測定装置10を使って、対象物20までの距離を出力する例である。
 図11は、本技術の第1の実施の形態の第4の実施例において対象物20までの距離を出力するための処理手順の一例を示す流れ図である。この処理は、演算部16によって行われる。
 最初に、ステップS165において、図5に示された確率密度関数計算処理を行う。そして、ステップS166に進む。
 ステップS166において、以下の式12を満たすnを求める。そして、ステップS167に進む。

Figure JPOXMLDOC01-appb-M000012
 ステップS167において、DST=c×n×D÷2を計算する。DSTは、ビンnに対応する距離である。なぜなら、ビンnは、およそn×Dという時間に対応しているからである。そして、ステップS168に進む。
 ステップS168において、対象物20までの距離として、DSTを出力し、一連の処理を終了する。
 ここで、式12について、図面を参照して、補足する。
 図12は、本技術の第1の実施の形態の第4の実施例のステップS165で求めた各ビンの生起率を示す図である。
 同図では、代表して、2つのビン(n0とn1)について示している。n0番目およびn1番目のビンの生起率は、それぞれ、平均はH(n0)、H(n1)であり、標準偏差はσ(n0)、σ(n1)である。この2つの生起率の分離度(Resolution:2つのピークの分離の割合)は、以下の式13となる。
Figure JPOXMLDOC01-appb-M000013
 分離度がある程度(しきい値をCdist1とする)大きければ、2つの真の生起率は異なると言える。そこで、あるビンnについて、nとの分離度がCdist1を超えるビン(m)が多数(Cnum1個以上)あれば、そのnは他のビンの生起率に比べて突出した生起率であるといえる。このようなビンnを選出しているのが、式12である。突出した生起率はアクティブ光の受光による生起率と考えられるため、式12でアクティブ光の受光による生起率が発生したビンを選出することができる。
 なお、2つのビンの生起率が異なるか否かの判断指標の例として分離度を用いたが、この実施の形態は判断指標として分離度に限定するものではない。
 なお、Cdist1およびCnum1は、定数である。
 このように、この第1の実施の形態の第4の実施例では、対象物20までの距離を求めることができる。
 [第5の実施例]
 第5の実施例は、距離測定装置10を使って、環境光により対象物20が照らし出されたときの輝度値を出力する例である。
 図13は、本技術の第1の実施の形態の第5の実施例において環境光により対象物20が照らし出されたときの輝度値を出力するための処理手順の一例を示す流れ図である。この処理は、演算部16によって行われる。
 最初に、ステップS171において、図5に示された確率密度関数計算処理を行う。そして、ステップS172に進む。
 ステップS172において、以下の式14を満たすIambientを求める。そして、ステップS173に進む。
Figure JPOXMLDOC01-appb-M000014
 ステップS173において、環境光により対象物20が照らし出されたときの輝度値として、Iambientを出力し、一連の処理を終了する。
 ここで、式14について補足する。式14の右辺の分子のH(n)の累積対象となるnは、以下のものである。すなわち、分離度がCdist2より大きなビン(m)の数がCnum2以下であるビンが累積対象である。これは、ビンnの生起率は、突出した生起率でないことを意味し、環境光の受光による生起率と考えられる。式14の右辺は、これらH(n)の平均を計算しているため、環境光の受光による生起率と考えられる。したがって、Iambientを、環境光により対象物20が照らし出されたときの輝度値としてもよい。
 なお、Cdist2、および、Cnum2は、定数である。
 このように、この第1の実施の形態の第5の実施例では、環境光により対象物20が照らし出されたときの輝度値を求めることができる。
 [第6の実施例]
 第6実施例は、距離測定装置10を使って、アクティブ光により対象物20が照らし出されたときの輝度値を出力する例である。
 図14は、本技術の第1の実施の形態の第6の実施例においてアクティブ光により対象物20が照らし出されたときの輝度値を出力するための処理手順の一例を示す流れ図である。この処理は、演算部16によって行われる。
 最初に、ステップS174において、図5に示された確率密度関数計算処理を行う。そして、ステップS175に進む。
 ステップS175において、上述の式14を満たすIambientを求める。そして、ステップS176に進む。
 ステップS176において、以下の式15を満たすIactiveを求める。そして、ステップS177に進む。
Figure JPOXMLDOC01-appb-M000015
 ステップS177において、アクティブ光により対象物20が照らし出されたときの輝度値として、Iactiveを出力し、一連の処理を終了する。
 ここで、式15について補足する。式15の右辺の累積するnは、上述の式12を満たすnと同じである。すなわち、第4の実施例において説明したように、アクティブ光の受光による生起率が発生したビンである。当然、このビンの生起率には、環境光の受光による生起率も含まれている。そこで、式15に示すようにH(n)からIambientを減算して、nについて累積することにより、アクティブ光の受光による生起率の合計のみを算出することができる。つまり、アクティブ光の量を求めることができる。したがって、Iactiveを、アクティブ光により対象物が照らし出されたときの輝度値としてもよい。
 このように、この第1の実施の形態の第6の実施例では、アクティブ光により対象物20が照らし出されたときの輝度値を求めることができる。
 [効果]
 このように、この第1の実施の形態によれば、SPADセンサから得られるヒストグラムのデータを理論的に解析することにより、「各ビンの生起率を確率変数としたときの確率密度関数」を求めることができる(図5)。したがって、正確な判断が可能となる。そのため、この確率密度関数を用いて、例えば第2および第4の実施例に示したように、正確な距離測定を行うことが可能となる。また、例えば第1および第5の実施例に示したように、環境光により対象物が照らし出されたときの輝度値測定を、正確に行うことが可能となる。また、例えば第3および第6の実施例に示したように、正確なアクティブ光により対象物20が照らし出されたときの輝度値測定を、正確に行うことが可能となる。
 [要点]
 第1の実施の形態は、以下の点を要点とする。
(1)確率密度関数計算方法において、
 SPADセンサから得られるヒストグラムを入力するステップと、
 ヒストグラム上で、時刻nに対応する頻度h(n)からM(n-1)および、H(n)を計算するステップと、
 H(n)を「上記時刻nの生起率を確率変数としたときの確率密度関数」の平均値として出力するステップを有することを特徴とする確率密度関数計算方法。
(2)上記(1)において、
さらに、σ(n)を計算するステップと、
 σ(n)を「上記時刻nの生起率を確率変数としたときの確率密度関数」の標準偏差として出力するステップを有することを特徴とする確率密度関数計算方法。
(3)輝度値計算方法において、
 上記(1)または上記(2)で得られる確率密度関数より最頻値の値を計算するステップと、
 最頻値を、環境光により対象物が照らし出されたときの輝度値として出力するステップを有することを特徴とする輝度値計算方法。
(4)距離計算方法において、
 上記(1)または上記(2)で得られる確率密度関数より最頻値の値を計算するステップと、
 最頻値の値をとらない時間を選出するステップと、
 選出された時間に(光速/2)倍した値を乗算するステップと、
 乗算結果を、対象物までの距離として出力するステップを有することを特徴とする距離計算方法。
(5)輝度値計算方法において、
 上記(1)または上記(2)で得られる確率密度関数より最頻値の値を計算するステップと、
 最頻値の値をとらない時間に対する確率密度関数の値を計算するステップと、
 確率密度関数の値を、アクティブ光により対象物が照らし出されたときの輝度値として出力するステップを有することを特徴とする輝度値計算方法。
(6)距離計算方法において、
 上記(1)または上記(2)で得られる確率密度関数より、上記確率密度関数の値が突出している時間を選出するステップと、
 時間に(光速/2)倍した値を乗算するステップと、
 乗算結果を、対象物までの距離として出力するステップを有することを特徴とする距離計算方法。
(7)輝度値計算方法において、
 上記(1)または上記(2)で得られる確率密度関数より、上記確率密度関数の値が突出していない時間に対する確率密度関数の値を計算するステップと、
 確率密度関数の値を、環境光により対象物が照らし出されたときの輝度値として出力するステップを有することを特徴とする輝度値計算方法。
(8)輝度値計算方法において、
 上記(1)または上記(2)で得られる確率密度関数より、上記確率密度関数の値が突出している時間に対する確率密度関数の値を計算するステップと、
 確率密度関数の値を、アクティブ光により対象物が照らし出されたときの輝度値として出力するステップを有することを特徴とする輝度値計算方法。
 <3.第2の実施の形態>
 [概要]
 この第2の実施の形態では、演算部16においてヒストグラムからピークを検出する前に、状況に応じて適応的に最適なヒストグラムの重み付け加算を行うことにより、ヒストグラムの先鋭化を行う。これにより、誤検出を減少させる。
 この第2の実施の形態におけるヒストグラムの先鋭化を端的に表現すると以下の式16のようになる。
Figure JPOXMLDOC01-appb-M000016
 ここで、時刻t、位置(x,y)、n番目のビンの観測値(すなわち、累積部15で得られる値)をH(t,x,y,n)としている。そして、この第2の実施の形態を適用することにより得られる先鋭化後のヒストグラムについて、時刻t、位置(x,y)、n番目のビンの値をHNR(t,x,y,n)としている。演算部16では、累積部15で得られるヒストグラムH(t,x,y,n)から式16を計算して、先鋭化されたヒストグラムHNR(t,x,y,n)を得ている。先鋭化されたヒストグラムHNR(t,x,y,n)からピーク値を探すことにより、誤検出のないピークが検出でき、誤検出のない測距が可能となる。
 さらに、式16は、H(t,x,y,n)についての重み付き平均を行っている。重み付き平均により、ヒストグラム内に存在するノイズが除去されて、ヒストグラムの先鋭化が行われる。wは、対応するH(t,x,y,n)の重みであり、Wは正規化のために使用するwの合計値である。この第2の実施の形態の特徴は、このwの値が、「状況」により適応的に最適な値となる点である。
 図15は、従来技術における第1の手法を説明するための図である。この従来技術では、各画素から得られるヒストグラムに対して、「決められた手順でヒストグラムの加算を行うという処理」回路にて加算を行い、最終的なヒストグラムを得ている。決められた手順に合致しない位置関係にある物体では、ヒストグラムの不鮮明化を引き起こすという問題がある。
 図16は、従来技術における第2の手法を説明するための図である。この従来技術では、決められた手順が複数あるため、それぞれに対応したヒストグラムの加算を行う。これら加算は、各画素から得られるヒストグラムに対して、「決められた手順1、2、3、…でヒストグラムの加算を行うという処理」回路で行われる。そして、それぞれの信頼度を計算する。これら信頼度の計算は、「ヒストグラムの信頼度計算処理」回路にて行われる。計算された複数の信頼度から最大となるものを、「最大となるものを検出する処理」回路において検出する。そして、これに対応した「加算されたヒストグラム」を、「選択処理」回路によって選択して、最終的なヒストグラムを得ている。「決められた手順でヒストグラムの加算を行うという処理」が複数あり、計算量の膨大を招くという問題がある。
 図17は、本技術の第2の実施の形態における処理の一例を示す概念図である。この第2の実施の形態では、各画素から得られるヒストグラムに対して、適切な加算を、「情報に則りヒストグラムの加算を行うという処理」回路にて行う。すなわち、適切な加算が行われるため、各画素に投影されている物体の位置関係がどのような場合でも、常に最適な加算が行われる。これにより、決められた手順に合致しない位置関係にある物体に対しても適用することができ、ヒストグラムの不鮮明さを解消することができる。また、この第2の実施の形態では、複数の加算を行うのではなく、適切な加算を一種類だけ行う。これにより、膨大な計算量も必要としない。
 ここで重要となってくるのが、同図における「情報」である。そして、この「情報」を使った「適切な加算」の方法である。これら「情報」と「適切な加算」は、後述する詳細な説明によって明らかになるであろう。なお、「適切な加算」とは、上述の式16に対応するものである。また、「情報」は、上述のwの値を適応的に最適な値とするための「状況」に相当する。
 [ヒストグラムの類似性]
 次に、2つのヒストグラムが与えられたときに、それら2つのヒストグラムの類似性について議論する。2つのヒストグラムとして、時刻t、位置(x,y)のヒストグラムと、時刻t1、位置(x1,y1)のヒストグラムとを想定する。また、2つのヒストグラムについて、offsetだけビンをずらした時の類似性を評価する。
 時刻t、位置(x,y)のヒストグラムのn番目のビンをH(t,x,y,n)とする。上記議論より、このビンにおける生起率の確率密度関数は、式17となる。
Figure JPOXMLDOC01-appb-M000017
ただし、M(t,x,y,n-1)は、以下の式18で定義される。
Figure JPOXMLDOC01-appb-M000018
 一方、時刻t1、位置(x1,y1)のヒストグラムのn-offset番目のビンの値はH(t1,x1,y1,n-offset)である。ここで、offsetは、任意の定数である。時刻t1、位置(x1,y1)のヒストグラムのn-offset番目のビンにおける生起率は、式19となる可能性が一番高い。
Figure JPOXMLDOC01-appb-M000019
 したがって、時刻t、位置(x,y)のヒストグラムのn番目のビンの生起率と、時刻t1、位置(x1,y1)のヒストグラムのn-offset番目のビンの生起率が同じである確率は、式20となる。
Figure JPOXMLDOC01-appb-M000020
 一般に、ヒストグラムのビンのほとんどは、環境光の受光によるカウントである。そして、少数のビンのみがアクティブ光の受光によるカウントである。2つのヒストグラムの類似性として、全てのビンに関する式20の平均値で評価することを考えると、アクティブ光の受光によりカウントされたビンよりは、大多数を占める環境光の受光によりカウントされたビンに左右される。一方、この第2の実施の形態の最終的な目標は、ヒストグラムのピーク検出(アクティブ光の受光によりカウントされたビン)のための先鋭化である。したがって、全てのビンに関する式20の平均値で評価してもよいが、最良の評価法とはいえない。
 そこで、この第2の実施の形態においては、以下の2つの評価方法を提案する。なお、2つのヒストグラムの類似性の評価法として、これに限定するわけではない。もちろん、全てのビンに関する式20の平均値によって評価してもよい。
 [ヒストグラムの類似性の評価値算出の第1の手法]
 アクティブ光の受光によりカウントされたビンの生起率は、他に比べて大きい。そこで、式21に示す値が比較的大きなビンについて、上述の式20を計算し、その計算結果を、2つのヒストグラムの類似性の評価値とする。
Figure JPOXMLDOC01-appb-M000021
なお、式21の値は、式6を用いて先に説明したことから分かるように、時刻t、位置(x,y)のヒストグラムのn番目のビンの生起率の観測値から得られる、最も確からしい値である。
 図18は、本技術の第2の実施の形態における類似性の評価値を算出する処理の第1の例を示す流れ図である。この処理は、「時刻t、位置(x,y)のヒストグラム」に対する、「時刻t1、位置(x1,y1)のヒストグラムをoffsetだけずらしたヒストグラム」の類似性の評価値を算出するものである。なお、類似性が高いときに、評価値も大きくなる。
 まず、ステップS211において、時刻t、位置(x,y)のヒストグラムの各ビン(nとする)を入力し、H(t,x,y,n)とする。時刻t1、位置(x1,y1)のヒストグラムの各ビン(nとする)を入力し、H(t1,x1,y1,n)とする。offsetの値を入力する。ここで、nは0乃至N-1である。そして、ステップS212に進む。
 ステップS212において、n=0乃至N-1の中から、式21の値が大きい方からL個選ぶ。選ばれたL個のnをn1、n2、…、nLとする。ここで、Lは所望の定数である。そして、ステップS213に進む。
 ステップS213において、n=n1、n2、…、nLのL個に対して、式20を計算し、その平均値をS(t,x,y,t1,x1,y1,offset)とする。そして、ステップS214に進む。
 ステップS214において、S(t,x,y,t1,x1,y1,offset)を類似性の評価値として出力する。そして、この一連の処理を終了する。
 [ヒストグラムの類似性の評価値算出の第2の手法]
 アクティブ光の受光によりカウントされたビンの生起率は、他に比べて大きい。2つのヒストグラムの対応するビン同士に大きな生起率があれば類似性の評価値を高くすべきである。逆に言えば、1つのヒストグラムのあるビンの生起率が大きく、他方のヒストグラムの対応するビンの生起率が小さければ、類似性の評価値を小さくすべきである。つまり、生起率の違いが大きなビンに着目して、この違いが大きければ類似性は低く、その違いが小さければ類似性が高い、と判断すればよい。なお、生起率の違いは、式22により算出することができる。
Figure JPOXMLDOC01-appb-M000022
 図19は、本技術の第2の実施の形態における類似性の評価値を算出する処理の第2の例を示す流れ図である。この処理は、「時刻t、位置(x,y)のヒストグラム」に対する、「時刻t1、位置(x1,y1)のヒストグラムをoffsetだけずらしたヒストグラム」の類似性の評価値を算出するものである。なお、類似性が高いときに、評価値も大きくなる。
 まず、ステップS215において、時刻t、位置(x,y)のヒストグラムの各ビン(nとする)を入力し、H(t,x,y,n)とする。時刻t1、位置(x1,y1)のヒストグラムの各ビン(nとする)を入力し、H(t1,x1,y1,n)とする。offsetの値を入力する。ここで、nは0乃至N-1である。そして、ステップS216に進む。
 ステップS216において、n=0乃至N-1の中から、式22の値が大きい方からL個選ぶ。選ばれたL個のnをn1、n2、…、nLとする。ここで、Lは所望の定数である。そして、ステップS217に進む。
 ステップS217において、n=n1、n2、…、nLのL個に対して、式20を計算し、その平均値をS(t,x,y,t1,x1,y1,offset)とする。そして、ステップS218に進む。
 ステップS218において、S(t,x,y,t1,x1,y1,offset)を類似性の評価値として出力する。そして、この一連の処理を終了する。
 [第1の実施例]
 第1の実施例では、距離測定装置10を使って、SPADアレイ13の各SPADにおける測距を行う。特に、累積部15から得られる観測されたヒストグラムの先鋭化を図る点に特徴がある。ヒストグラムの先鋭化は、演算部16にて行われる。
 着目時刻tの着目位置(x,y)におけるSPADのヒストグラムH(t,x,y,n)(ここで、n=0乃至N-1)に対して、時空間上で近傍にあるSPADのヒストグラムの類似性を調べる。そして、類似性の高いヒストグラムがあれば、類似性の度合に応じた重みを付けて、ヒストグラムH(t,x,y,n)に加算する。これにより、ヒストグラムH(t,x,y,n)のノイズ除去が行われ、先鋭化が行われる。
 図20は、本技術の第2の実施の形態の第1の実施例におけるヒストグラムのノイズ除去処理の一例を示す流れ図である。この処理により、累積部15から得られた着目時刻tの着目位置(x,y)のヒストグラムH(t,x,y,n)(ここで、n=0乃至N-1)のノイズ除去(すなわち、先鋭化)が行われる。
 まず、ステップS221では、時空間において、時刻t、位置(x,y)の近傍を選出し、(t1,x1,y1)とする。ここで、 (t1,x1,y1)は、複数組ある。例えば、(t1,x1,y1)の組は、
  (t+1,x,y)、
  (t-1,x,y)、
  (t,x+1,y)、
  (t,x-1,y)、
  (t,x,y+1)、
  (t,x,y-1)
の6組である。そして、ステップS222に進む。
 ステップS222において、複数ある(t1,x1,y1)のそれぞれに対して、累積部15から得られたヒストグラムを入力し、H(t1,x1,y1,n)とする。ここで、n=0乃至N-1である。たとえば、
  H(t+1,x,y,n)、
  H(t-1,x,y,n)、
  H(t,x+1,y,n)、
  H(t,x-1,y,n)、
  H(t,x,y+1,n)、
  H(t,x,y-1,n)
である。そして、ステップS223に進む。
 ステップS223において、複数の(t1,x1,y1)のそれぞれに対して、 かつ、offset=-Os乃至Osに対して、「時刻t、位置(x,y)のヒストグラム」に対する、「時刻t1、位置(x1,y1)のヒストグラムをoffsetだけずらしたヒストグラム」の類似性の評価値を算出する処理(図18または図19参照)を実行する。ここで、Osは所望の定数(0以上の定数)である。たとえば、
「時刻t、位置(x,y)のヒストグラム」に対する、「時刻t+1、位置(x,y)のヒストグラムを-Osだけずらしたヒストグラム」の類似性の評価値を算出する。そして、
「時刻t、位置(x,y)のヒストグラム」に対する、「時刻t+1、位置(x,y)のヒストグラムを-Os+1だけずらしたヒストグラム」の類似性の評価値を算出する。そして、
「時刻t、位置(x,y)のヒストグラム」に対する、「時刻t+1、位置(x,y)のヒストグラムを-Os+2だけずらしたヒストグラム」の類似性の評価値を算出する。以降、同様に、offsetの値を変更して、
「時刻t、位置(x,y)のヒストグラム」に対する、「時刻t+1、位置(x,y)のヒストグラムをOsだけずらしたヒストグラム」の類似性の評価値を算出する。
さらに、
「時刻t、位置(x,y)のヒストグラム」に対する、「時刻t-1、位置(x,y)のヒストグラムを-Osだけずらしたヒストグラム」の類似性の評価値を算出する。そして、
「時刻t、位置(x,y)のヒストグラム」に対する、「時刻t-1、位置(x,y)のヒストグラムを-Os+1だけずらしたヒストグラム」の類似性の評価値を算出する。そして、
「時刻t、位置(x,y)のヒストグラム」に対する、「時刻t-1、位置(x,y)のヒストグラムを-Os+2だけずらしたヒストグラム」の類似性の評価値を算出する。以降、同様に、offsetの値を変更して、
「時刻t、位置(x,y)のヒストグラム」に対する、「時刻t-1、位置(x,y)のヒストグラムをOsだけずらしたヒストグラム」の類似性の評価値を算出する。
さらに、
「時刻t、位置(x,y)のヒストグラム」に対する、「時刻t、位置(x+1,y)のヒストグラムを-Osだけずらしたヒストグラム」の類似性の評価値を算出する。そして、
「時刻t、位置(x,y)のヒストグラム」に対する、「時刻t、位置(x+1,y)のヒストグラムを-Os+1だけずらしたヒストグラム」の類似性の評価値を算出する。そして、
「時刻t、位置(x,y)のヒストグラム」に対する、「時刻t、位置(x+1,y)のヒストグラムを-Os+2だけずらしたヒストグラム」の類似性の評価値を算出する。以降、同様に、offsetの値を変更して、
「時刻t、位置(x,y)のヒストグラム」に対する、「時刻t、位置(x+1,y)のヒストグラムをOsだけずらしたヒストグラム」の類似性の評価値を算出する。
他の(t1,x1,y1)の組である(t,x-1,y)、(t,x,y+1)、(t,x,y-1)についても同様である。
そして、ステップS224に進む。
 ステップS224において、ステップS223によって得られる各(t1,x1,y1)に対応する評価値S(t,x,y,t1,x1,y1,offset)において、offset=-Os乃至Osの中から最大となるoffsetの値をoffsetMax(t1,x1,y1)とする。たとえば、
S(t,x,y,t+1,x,y,offset)において、offset=-Os乃至Osの中から最大となるoffsetの値をoffsetMax(t+1,x,y)とする。また、
S(t,x,y,t-1,x,y,offset)において、offset=-Os乃至Osの中から最大となるoffsetの値をoffsetMax(t-1,x,y)とする。また、
S(t,x,y,t,x+1,y,offset)において、offset=-Os乃至Osの中から最大となるoffsetの値をoffsetMax(t,x+1,y)とする。
他の(t1,x1,y1)の組である(t,x-1,y)、(t,x,y+1)、(t,x,y-1)についても同様である。
そして、ステップS225に進む。
 ステップS225において、以下の式23を計算する。なお、式23における累積対象は、ステップS221で選出された(t1,x1,y1)である。
Figure JPOXMLDOC01-appb-M000023
 たとえば、H(t,x,y,n)に対して、
S(t,x,y,t+1,x,y,offsetMax(t+1,x,y) )の重みをもって、H(t+1,x,y,n-offsetMax(t+1,x,y) )を加算する。さらに、
S(t,x,y,t-1,x,y,offsetMax(t-1,x,y) )の重みをもって、H(t-1,x,y,n-offsetMax(t-1,x,y) )を加算する。さらに、
S(t,x,y,t,x+1,y,offsetMax(t,x+1,y) )の重みをもって、H(t,x+1,y,n-offsetMax(t,x+1,y) )を加算する。
他の(t1,x1,y1)の組である(t,x-1,y)、(t,x,y+1)、(t,x,y-1)についても同様に重み付き加算する。そして、ステップS226に進む。
 ステップS226において、式23の計算結果であるHNR(t,x,y,n)を、先鋭化されたヒストグラムとして出力する。ここで、n=0乃至N-1である。そして、一連の処理を終了する。
 なお、式23は、自分自身であるH(t,x,y,n)を重み1とし、近傍の位置のH(t1,x1,y1,n-offset)については、offsetがoffsetMax(t1,x1,y1)のみ、重みS(t,x,y,t1,x,y,offsetMax(t1,x1,y1))で加算した式16と等価である。
 このようにして、着目時刻tの着目位置(x,y)における先鋭化されたヒストグラムHNR(t,x,y,n)(ここで、n=0乃至N-1)が得られる。
 ここで、式23について補足する。2つのヒストグラムH(t,x,y,n)とH(t1,x1,y1,n-offsetMax(t1,x1,y1) )とは、類似している。これは、SPADアレイ13の時刻t、位置(x,y)におけるSPADが測定している物体の距離と、時刻t1、位置(x1,y1)におけるSPADが測定している物体の距離とが、光速換算でoffsetMax(t1,x1,y1)だけずれていることを意味する。そこで、ヒストグラムH(t,x,y,n)とH(t1,x1,y1,n-offsetMax(t1,x1,y1) )を加算しあうことで、ノイズが除去できる。このとき、類似の度合であるS(t,x,y,t1,x1,y1,offsetMax(t1,x1,y1) )で重みを付けて加算している。
 同図に示す処理を実行することにより、SPADアレイ13の各時刻t、各位置(x,y)におけるSPADのヒストグラの先鋭化が行われる。なお、この処理は、tは1以上の整数、xは1以上X以下の整数、yは1以上Y以下の整数について、全て行われる。この後、演算部16にて、この先鋭化されたヒストグラムに対してピークを検出する。そして、ピークに対応するビンに対して、c×D/2倍した値を、距離として、出力端子17より出力する。なお、ビンnは、およそn×Dという時間に対応しているため、c×D/2倍により距離を算出することができる。ここで、ピーク検出は既知の手法により行われる。
 [第2の実施例]
 上述の第1の実施例では、時空間における「時刻t、位置(x,y)」と「時刻t1、位置(x1,y1)」の距離には非依存で重みが決まっていた。この第2の実施例は、時空間における「時刻t、位置(x,y)」と「時刻t1、位置(x1,y1)」の距離にも依存させて重みを決める例である。
 時空間における距離が近ければ、同じ物体を測定している可能性が高い。逆に、時空間における距離が遠ければ、まったく違う物体を測定している可能性が高い。そこで、距離に依存して重みを付けるとよいことがわかる。
 図21は、本技術の第2の実施の形態の第2の実施例におけるヒストグラムのノイズ除去処理の一例を示す流れ図である。この処理により、累積部15から得られた着目時刻tの着目位置(x,y)のヒストグラムH(t,x,y,n)(ここで、n=0乃至N-1)のノイズ除去(すなわち、先鋭化)が行われる。
 まず、ステップS231では、時空間において、時刻t、位置(x,y)の近傍を選出し、(t1,x1,y1)とする。ここで、 (t1,x1,y1)は、複数組ある。例えば、(t1,x1,y1)の組は、t-2≦t1≦t+2、x-2≦x1≦x+2、y-2≦y1≦y+2で、(t1,x1,y1)=(t,x,y)を除く5×5×5-1=124組である。そして、ステップS232に進む。
 ステップS232は、図20のステップS222と同じ処理であり、説明を省略する。そして、ステップS233に進む。
 ステップS233は、図20のステップS223と同じ処理であり、説明を省略する。そして、ステップS234に進む。
 ステップS234は、図20のステップS24と同じ処理であり、説明を省略する。そして、ステップS235に進む。
 ステップS235において、以下の式24を計算する。なお、式24における累積対象は、ステップS231で選出された(t1,x1,y1)である。
Figure JPOXMLDOC01-appb-M000024
そして、ステップS236に進む。
 ステップS236において、式24の計算結果であるHNR(t,x,y,n)を、先鋭化されたヒストグラムとして出力する。ここで、n=0乃至N-1である。そして、一連の処理を終了する。
 なお、式23は、自分自身であるH(t,x,y,n)を重み1とし、近傍の位置のH(t1,x1,y1,n-offset)については、offsetがoffsetMax(t1,x1,y1)のみ、重みS(t,x,y,t1,x,y,offsetMax(t1,x1,y1))÷(「時刻t、位置(x,y)」と「時刻t1、位置(x1,y1)」の距離)で加算した式16と等価である。
 また、式23において、H(t1,x1,y1,n-offsetMax(t1,x1,y1))の重みは、S(t,x,y,t1,x,y,offsetMax(t1,x1,y1))÷(「時刻t、位置(x,y)」と「時刻t1、位置(x1,y1)」の距離)であるが、この重みの値は1を超える場合もある。一方、自分自身であるH(t,x,y,n)の重みは1である。自分自身以外の重みが、自分自身よりも重いのはよくない。そこで、各項の重みが1を超える場合は、強制的に重みを1とするようにしてもよい。
 このようにして、着目時刻tの着目位置(x,y)における先鋭化されたヒストグラムHNR(t,x,y,n)(ここで、n=0乃至N-1)が得られる。
 [第3の実施例]
 上述の第1の実施例では、着目する1つのSPADと、近傍の各SPADの類似性により、重みを決定していた。この第3の実施例は、着目SPADを中心とする複数のSPAD群と、近傍のSPAD群の類似性により重みを決定する例である。SPAD単体でヒストグラムを比較して類似性を判断すると誤判定の可能性もあるが、複数のSPADのヒストグラム同士を比較することにより、類似性の判断がさらに確実なものとなる。
 図22は、本技術の第2の実施の形態の第3の実施例におけるヒストグラムのノイズ除去処理の一例を示す流れ図である。この処理により、累積部15から得られた着目時刻tの着目位置(x,y)のヒストグラムH(t,x,y,n)(ここで、n=0乃至N-1)のノイズ除去(すなわち、先鋭化)が行われる。
 まず、ステップS241では、時空間において、時刻t、位置(x,y)の近傍を選出し、(t1,x1,y1)とする。ここで、 (t1,x1,y1)は、複数組ある。そして、ステップS242に進む。
 ステップS242において、複数ある(t1,x1,y1)とその近傍のそれぞれに対して、累積部15から得られたヒストグラムを入力し、H(t1,x1+b1,y1+b2,n)とする。ここで、n=0乃至N-1である。そして、b1=-B乃至B、b2=-B乃至Bである。なお、Bは所望の定数である。そして、ステップS243に進む。
 ステップS243において、複数の(t1,x1,y1)のそれぞれに対して、 かつ、offset=-Os乃至Osに対して、「時刻t、位置(x,y)のヒストグラム」に対する、「時刻t1、位置(x1,y1)のヒストグラムをoffsetだけずらしたヒストグラム」の類似性の評価値を近傍のヒストグラムも加味して算出する処理を実行する。この処理については次図を参照して説明する。ここで、Osは所望の定数(0以上の定数)である。そして、ステップS244に進む。
 ステップS244において、ステップS243によって得られる各(t1,x1,y1)に対応する評価値Sg(t,x,y,t1,x1,y1,offset)において、offset=-Os乃至Osの中から最大となるoffsetの値をoffsetMax(t1,x1,y1)とする。そして、ステップS245に進む。
 ステップS245において、以下の式25を計算する。なお、式25における累積対象は、ステップS241で選出された(t1,x1,y1)である。
Figure JPOXMLDOC01-appb-M000025
そして、ステップS246に進む。
 ステップS246において、式25の計算結果であるHNR(t,x,y,n)を、先鋭化されたヒストグラムとして出力する。ここで、n=0乃至N-1である。そして、一連の処理を終了する。
 なお、式25は、自分自身であるH(t,x,y,n)を重み1とし、近傍の位置のH(t1,x1,y1,n-offset)については、offsetがoffsetMax(t1,x1,y1)のみ、重みSg(t,x,y,t1,x,y,offsetMax(t1,x1,y1))で加算した式16と等価である。
 図23は、本技術の第2の実施の形態の第3の実施例におけるヒストグラムの類似性の評価値を算出する処理(ステップS243)の処理手順の一例を示す流れ図である。この処理は、「時刻t、位置(x,y)のヒストグラム」に対する、「時刻t1、位置(x1,y1)のヒストグラムをoffsetだけずらしたヒストグラム」の類似性の評価値を近傍のヒストグラムも加味して算出するものである。なお、類似性が高いときに、評価値も大きくなる。なお、図18または図19を使って説明した評価値算出方法と異なる点は、近傍のヒストグラムも加味している点である。
 まず、ステップS251において、時刻t、位置(x,y)を中心とした(2B+1)×(2B+1)個のSPADにおけるヒストグラムの各ビン(nとする)を入力し、H(t,x+b1,y+b2,n)とする。時刻t1、位置(x1,y1)を中心とした(2B+1)×(2B+1)個のSPADにおけるヒストグラムの各ビン(nとする)を入力し、H(t1,x1+b1,y1+b2,n)とする。offsetの値を入力する。ここで、b1=-B乃至B、b2=-B乃至B、n=0乃至N乃至1である。なお、Bは所望の定数である。たとえば、B=2の場合、
  H(t,x-2,y-2,n)、
  H(t,x-2,y-1,n)、
  H(t,x-2,y,n)、
  H(t,x-2,y+1,n)、
  H(t,x-2,y+2,n)、
  H(t,x-1,y-2,n)、
  H(t,x-1,y-1,n)、
  H(t,x-1,y,n)、
  H(t,x-1,y+1,n)、
  H(t,x-1,y+2,n)、
などが入力される。そして、
  H(t1,x1-2,y1-2,n)、
  H(t1,x1-2,y1-1,n)、
  H(t1,x1-2,y1,n)、
  H(t1,x1-2,y1+1,n)、
  H(t1,x1-2,y1+2,n)、
  H(t1,x1-1,y1-2,n)、
  H(t1,x1-1,y1-1,n)、
  H(t1,x1-1,y1,n)、
  H(t1,x1-1,y1+1,n)、
  H(t1,x1-1,y1+2,n)、
などが入力される。そして、ステップS252に進む。
 ステップS252において、各b1、各b2に対して、「時刻t、位置(x+b1,y+b2)のヒストグラム」に対する、「時刻t1、位置(x1+b1,y1+b2)のヒストグラムをoffsetだけずらしたヒストグラム」の類似性の評価値を算出する処理(図18または図19参照)を実行する。すなわち、図18または図19に示す処理を(2B+1)×(2B+1)回行う。これにより、b1=-B乃至B、b2=-B乃至BにおけるS(t,x+b1,y+b2,t1,x1+b1,y1+b2,offset)が算出される。そして、ステップS253に進む。
 ステップS253において、ステップS252によって得られた(2B+1)×(2B+1)個のS(t,x+b1,y+b2,t1,x1+b1,y1+b2,offset)の平均値を求める。この平均値をSg(t,x,y,t1,x1,y1,offset)とする。そして、ステップS254に進む。
 ステップS254において、Sg(t,x,y,t1,x1,y1,offset)を類似性の評価値として出力する。そして、この一連の処理を終了する。
 ある位置を中心とした(2B+1)×(2B+1)個のSPADにおけるヒストグラムについて、類似性を評価しているため、図18または図19と比べてより確実な評価を行うことができる。
 このようにして、着目時刻tの着目位置(x,y)における先鋭化されたヒストグラムHNR(t,x,y,n)(ここで、n=0乃至N-1)が得られる。
 [第4の実施例]
 着目時刻tの着目位置(x,y)のSPADが測定している物体と同じ物体を測定している近傍のSPADのヒストグラムは加算するとよい。一方、別の物体を測定しているSPADについては加算しない方がよい。
 具体例を用いて説明する。たとえば、着目位置の左隣のSPADの測距結果が10メートル、着目位置のSPADの測距結果が10.1メートル、着目位置の右隣のSPADの測距結果が10.2メートルであったとする。この場合、同じ物体が、距離測定装置10に対して斜めに傾いて配置されていたと考えるのが妥当である。したがって、左隣のSPADから得られえるヒストグラムと、右隣のSPADから得られえるヒストグラムとを、着目位置のSPADから得られるヒストグラムに加算することにより、ノイズ除去を行えることが期待できる。
 一方、着目位置の左隣のSPADの測距結果が10メートル、着目位置のSPADの測距結果が10.1メートル、着目位置の右隣のSPADの測距結果が12メートルであったとする。この場合、着目位置の左隣、着目位置、着目位置の右隣のSPADが測定している物体は同一ではない可能性が高い。なぜなら、連続する3つのSPADの測距結果が不規則な値であるからである。したがって、左隣のSPADから得られえるヒストグラムと、右隣のSPADから得られえるヒストグラムとを、着目位置のSPADから得られるヒストグラムに加算しても、ノイズ除去を行うことはできないと考えられる。着目位置の直上と直下についても同様である。
 たとえば、着目時刻の直前の時刻のSPADの測距結果が10メートル、着目時刻のSPADの測距結果が10.1メートル、着目時刻の直後の時刻のSPADの測距結果が10.2メートルであったとする。この場合、同じ物体が、距離測定装置10に対して、時間とともに遠ざかって行ったと考えるのが妥当である。したがって、直前のSPADから得られえるヒストグラムと、直後のSPADから得られえるヒストグラムとを、着目時刻のSPADから得られるヒストグラムに加算することにより、ノイズ除去を行えることが期待できる。
 一方、着目時刻の直前の時刻のSPADの測距結果が10メートル、着目時刻のSPADの測距結果が10.1メートル、着目時刻の直後の時刻のSPADの測距結果が12メートルであったとする。この場合、直前、着目時刻、直後のSPADが測定している物体は同一ではない可能性が高い。なぜなら、連続する3つのSPADの測距結果が不規則な値であるからである。したがって、直前のSPADから得られえるヒストグラムと、直後のSPADから得られえるヒストグラムとを、着目時刻のSPADから得られるヒストグラムに加算しても、ノイズ除去を行うことはできないと考えられる。
 このように、着目画素の左右の画素、着目画素の上下の画素、着目時刻と前後の画素の類似性から、それぞれ、左右方向(すなわち、SPADアレイ13の水平方向)、上下方向(すなわち、SPADアレイ13の垂直方向)、時間方向に対して、同一の物体を測定しているか判断する。そして、同一の物体を測定している判断をした場合は、その方向に対してヒストグラムの加算を行う。
 図24乃至図26は、本技術の第2の実施の形態の第4の実施例におけるヒストグラムのノイズ除去処理の一例を示す流れ図である。この処理により、累積部15から得られた着目時刻tの着目位置(x,y)のヒストグラムH(t,x,y,n)(ここで、n=0乃至N-1)のノイズ除去(すなわち、先鋭化)が行われる。
 まず、ステップS261において、
時刻t、位置(x-1,y)に対して、累積部15から得られたヒストグラムを入力し、H(t,x-1,y,n)とする。
時刻t、位置(x+1,y)に対して、累積部15から得られたヒストグラムを入力し、H(t,x+1,y,n)とする。
時刻t、位置(x,y-1)に対して、累積部15から得られたヒストグラムを入力し、H(t,x,y-1,n)とする。
時刻t、位置(x,y+1)に対して、累積部15から得られたヒストグラムを入力し、H(t,x,y+1,n)とする。
時刻t-1、位置(x,y)に対して、累積部15から得られたヒストグラムを入力し、H(t-1,x,y,n)とする。
時刻t+1、位置(x,y)に対して、累積部15から得られたヒストグラムを入力し、H(t+1,x,y,n)とする。
ここで、n=0乃至N-1である。そして、ステップS262に進む。
 ステップS262において、offset=-Os乃至Osに対して、「時刻t、位置(x,y)のヒストグラム」に対する、「時刻t、位置(x-1,y)のヒストグラムをoffsetだけずらしたヒストグラム」の類似性の評価値を算出する処理(図18または図19参照)を実行する。これにより得られる評価値は、S(t,x,y,t,x-1,y,offset)であり、着目位置とその左隣との類似性の度合を表している。ここで、offset=-Os乃至Osである。そして、ステップS263に進む。
 ステップS263において、offset=-Os乃至Osに対して、「時刻t、位置(x,y)のヒストグラム」に対する、「時刻t、位置(x+1,y)のヒストグラムをoffsetだけずらしたヒストグラム」の類似性の評価値を算出する処理(図18または図19参照)を実行する。これにより得られる評価値は、S(t,x,y,t,x+1,y,offset)であり、着目位置とその右隣との類似性の度合を表している。ここで、offset=-Os乃至Osである。そして、ステップS264に進む。
 ステップS264において、offset=-Os乃至Osに対して、「時刻t、位置(x,y)のヒストグラム」に対する、「時刻t、位置(x,y-1)のヒストグラムをoffsetだけずらしたヒストグラム」の類似性の評価値を算出する処理(図18または図19参照)を実行する。これにより得られる評価値は、S(t,x,y,t,x,y-1,offset)であり、着目位置とその直上との類似性の度合を表している。ここで、offset=-Os乃至Osである。そして、ステップS265に進む。
 ステップS265において、offset=-Os乃至Osに対して、「時刻t、位置(x,y)のヒストグラム」に対する、「時刻t、位置(x,y+1)のヒストグラムをoffsetだけずらしたヒストグラム」の類似性の評価値を算出する処理(図18または図19参照)を実行する。これにより得られる評価値は、S(t,x,y,t,x,y+1,offset)であり、着目位置とその直下との類似性の度合を表している。ここで、offset=-Os乃至Osである。そして、ステップS266に進む。
 ステップS266において、offset=-Os乃至Osに対して、「時刻t、位置(x,y)のヒストグラム」に対する、「時刻t-1、位置(x,y)のヒストグラムをoffsetだけずらしたヒストグラム」の類似性の評価値を算出する処理(図18または図19参照)を実行する。これにより得られる評価値は、S(t,x,y,t-1,x,y,offset)であり、着目位置とその直前との類似性の度合を表している。ここで、offset=-Os乃至Osである。そして、ステップS267に進む。
 ステップS267で、offset=-Os乃至Osに対して、「時刻t、位置(x,y)のヒストグラム」に対する、「時刻t+1、位置(x,y)のヒストグラムをoffsetだけずらしたヒストグラム」の類似性の評価値を算出する処理(図18または図19参照)を実行する。これにより得られる評価値は、S(t,x,y,t+1,x,y,offset)であり、着目位置とその直後との類似性の度合を表している。ここで、offset=-Os乃至Osである。そして、ステップS268に進む。
 ステップS268では、2つの評価値の平均値、すなわち、{S(t,x,y,t,x-1,y,offset)+S(t,x,y,t,x+1,y,-offset)}÷2において、offset=-Os乃至Osの中から最大となるoffsetの値をoffsetMaxHとする。そして、 {S(t,x,y,t,x-1,y,offsetMaxH)+S(t,x,y,t,x+1,y,-offsetMaxH)}÷2の値がTh以上であれば、wH=1とする。Th未満であればwH=0とする。ここで、Thは所望の閾値である。そして、ステップS269に進む。
 ステップS269では、2つの評価値の平均値、すなわち、{S(t,x,y,t,x,y-1,offset)+S(t,x,y,t,x,y+1,-offset)}÷2において、offset=-Os乃至Osの中から最大となるoffsetの値をoffsetMaxVとする。そして、 {S(t,x,y,t,x,y-1,offsetMaxV)+S(t,x,y,t,x,y+1,-offsetMaxV)}÷2の値がTh以上であれば、wV=1とする。Th未満であればwV=0とする。そして、ステップS271に進む。
 ステップS271では、2つの評価値の平均値、すなわち、{S(t,x,y,t-1,x,y,offset)+S(t,x,y,t+1,x,y,-offset)}÷2において、offset=-Os乃至Osの中から最大となるoffsetの値をoffsetMaxTとする。そして、 {S(t,x,y,t-1,x,y,offsetMaxT)+S(t,x,y,t+1,x,y,-offsetMaxT)}÷2の値がTh以上であれば、wT=1とする。Th未満であればwT=0とする。そして、ステップS272に進む。
 ステップS272において、以下の式26を計算する。
Figure JPOXMLDOC01-appb-M000026
そして、ステップS273に進む。
 ステップS273において、式26の計算結果であるHNR(t,x,y,n)を、先鋭化されたヒストグラムとして出力する。ここで、n=0乃至N-1である。そして、一連の処理を終了する。
 なお、式26は、自分自身であるH(t,x,y,n)を重み1とし、近傍の位置については、offsetが、offsetMaxH、offsetMaxV、または、offsetMaxTのみ、重みwH、wV,または、wTで加算した式16と等価である。
 このようにして、着目時刻tの着目位置(x,y)における先鋭化されたヒストグラムHNR(t,x,y,n)(ここで、n=0乃至N-1)が得られる。
 ここで、式26について補足する。着目位置の左隣のSPADが測定している距離と、着目位置のSPADが測定している距離と、着目位置の右隣のSPADが測定している距離とが、等間隔であると仮定すると、その間隔に対応するビンの隔たりは、offsetMaxHである。その仮定の正しさは、{S(t,x,y,t,x-1,y,offsetMaxH)+S(t,x,y,t,x+1,y,-offsetMaxH)}÷2である。したがって、{S(t,x,y,t,x-1,y,offsetMaxH)+S(t,x,y,t,x+1,y,-offsetMaxH)}÷2が、ある閾値(Th)以上であれば、ヒストグラムを加算するとよい。そこで、{S(t,x,y,t,x-1,y,offsetMaxH)+S(t,x,y,t,x+1,y,-offsetMaxH)}÷2がTh以上のときは、重みwHを1として加算している。Th未満のときは、wHとして0をセットするため、実質加算は行われない。同一物体は、距離測定装置10に対して斜めに傾いて配置されていて、その斜め度合に応じたビンのズレ量はoffsetMaxHであるため、左隣のヒストグラムはoffsetMaxHだけすらして加算を行う。右隣のヒストグラムは-offsetMaxHだけすらして加算を行う。上下方向、時間方向についても同様である。
 [第5の実施例]
 この第5の実施例においては、距離測定装置10に併設したカメラ100を使用する。ここで、カメラ100は、画像を撮影することができる装置であり、距離測定装置10のSPADアレイ13が測定する方向と同じ方向を撮影する。
 SPADアレイ13の着目時刻tの着目位置(x,y)のSPADが測定している物体に対応するカメラ100の画像内の画素値E(t,x,y)と、SPADアレイ13の時刻t1の位置(x1,y1)のSPADが測定している物体に対応するカメラ100の画像内の画素値E(t1,x1,y1)とが類似している場合、カメラ100内で同じ物体を撮影していると考えられる。すなわち、この場合、2つのSPADが測定している物体は同じと考えられる。一方、両者が異なる画素値であれば、違う物体を測定していると考えられる。
 そこで、カメラ100の画像内の画素値E(t,x,y)とE(t1,x1,y1)とがほぼ同じ値であるときには、着目時刻tの着目位置(x,y)のヒストグラムに、時刻t1の位置(x1,y1)のヒストグラムを加算する際の重みを重くする。一方、両者がほぼ同じ値でなければ、加算する重みを小さくする、または、加算を行わない。このようにして、適切なヒストグラムを加算することができ、ヒストグラムのノイズ除去が可能となる。なお、ここで、(t1,x1,y1)は、時空間において(t,x,y)の近傍である。
 なお、E(t,x,y)は、時刻tの位置(x,y)のSPADが測定している物体を、時刻tにおいてカメラ100が撮影したときの輝度値である。E(t1,x1,1y)は、時刻t1の位置(x1,y1)のSPADが測定している物体を、時刻t1においてカメラ100が撮影したときの輝度値である。
 また、この第5の実施例においては、上述の第2の実施例と同様に、「位置(x,y)」と「位置(x1,y1)」の距離にも依存させて重みを決定する。
 図27は、本技術の第2の実施の形態の第5の実施例におけるヒストグラムのノイズ除去処理の一例を示す流れ図である。この処理により、累積部15から得られた着目時刻tの着目位置(x,y)のヒストグラムH(t,x,y,n)(ここで、n=0乃至N-1)のノイズ除去(すなわち、先鋭化)が行われる。
 まず、ステップS281の処理が行われるが、これは、図20のステップS221と同じであり、説明を省略する。そして、ステップS282に進む。
 ステップS282は、図20のステップS222と同じ処理であり、説明を省略する。そして、ステップS283に進む。
 ステップS283は、図20のステップS223と同じ処理であり、説明を省略する。そして、ステップS284に進む。
 ステップS284は、図20のステップS224と同じ処理であり、説明を省略する。そして、ステップS285に進む。
 ステップS285において、「(t,x,y)においてSPADが測定している物体」に対応するカメラ100の画像内の画素値を入力する。この画素値をE(t,x,y)とする。「複数ある(t1,x1,y1)のそれぞれにおいてSPADが測定している物体」に対応するカメラ100の画像内の画素値を入力する。この画素値をE(t1,x1,y1)とする。そして、ステップS286に進む。
 ステップS286において、以下の式27を計算する。なお、式27における累積対象は、ステップS281によって選出された(t1,x1,y1)である。
Figure JPOXMLDOC01-appb-M000027

そして、ステップS287に進む。
 ステップS287において、式27の計算結果であるHNR(t,x,y,n)を、先鋭化されたヒストグラムとして出力する。ここで、n=0乃至N-1である。そして、一連の処理を終了する。
 なお、式27は、自分自身であるH(t,x,y,n)を重み1とし、近傍の位置のH(t1,x1,y1,n-offset)については、offsetがoffsetMax(t1,x1,y1)のみ、重み1÷(「時刻t、位置(x,y)」と「時刻t1、位置(x1,y1)」の距離)÷(E(t,x,y)とE(t1,x1,y1)の差の絶対値)で加算した式16と等価である。
 また、E(t,x,y)=E(t1,x1,y1)の時には、式27においてゼロ割りが発生する。そこで、現実的にはゼロ割り回避のため、E(t,x,y)=E(t1,x1,y1)の時は、「E(t,x,y)とE(t1,x1,y1)の差の絶対値」の代わりに、微小な値を使用する。これは、既知の常套手段であり、この実施の形態の趣旨とは関係ないため、式27ではこれについては触れていない。
 また、上述の第2の実施例において、式24の各項の重みが1を超える場合は、強制的に重みを1としてもよいと述べた。同様のことは、式27においてもいえる。すなわち、式27において、各項の重みが1を超える場合は、強制的に重みを1とするようにしてもよい。
 このようにして、着目時刻tの着目位置(x,y)における先鋭化されたヒストグラムHNR(t,x,y,n)(ここで、n=0乃至N-1)が得られる。
 [第6の実施例]
 上述の第5の実施例では、着目する1つのSPADに対応する1つの画素値と、近傍の各SPADに対応する1つの画素値の類似性(2つの値の差分)により、重みを決定していた。この第6の実施例は、「着目SPADに対応する画素」を中心とする複数の画素群の画素値と、「近傍のSPADに対応する画素」を中心とする画素群の画素値との類似性により、重みを決定する例である。1画素同士の比較による類似性を判断すると誤判定の可能性もあるが、複数の画素同士を比較することにより、類似性の判断がさらに確実となる。
 図28および図29は、本技術の第2の実施の形態の第6の実施例におけるヒストグラムのノイズ除去処理の一例を示す流れ図である。この処理により、累積部15から得られた着目時刻tの着目位置(x,y)のヒストグラムH(t,x,y,n)(ここで、n=0乃至N-1)のノイズ除去(すなわち、先鋭化)が行われる。
 まず、ステップS291の処理が行われるが、これは、図27のステップS281と同じであり、説明を省略する。そして、ステップS292に進む。
 ステップS292は、図27のステップS282と同じ処理であり、説明を省略する。そして、ステップS293に進む。
 ステップS293は、図27のステップS283と同じ処理であり、説明を省略する。そして、ステップS294に進む。
 ステップS294は、図27のステップS284と同じ処理であり、説明を省略する。そして、ステップS295に進む。
 ステップS295において、「(t,x,y)においてSPADが測定している物体」に対応するカメラ100の画像内の画素位置を(u(t,x,y),v(t,x,y))とする。カメラ100の時刻tにおいて撮影された画像内で位置(u(t,x,y)+f1,v(t,x,y)+f2)の画素値を入力する。この画素値をG(t,u(t,x,y)+f1,v(t,x,y)+f2)とする。「複数ある(t1,x1,y1)においてSPADが測定している物体」に対応するカメラ100の画像内の画素位置を(u(t1,x1,y1),v(t1,x1,y1))とする。カメラ100の時刻t1において撮影された画像内で位置(u(t1,x1,1y)+f1,v(t1,x1,y1)+f2 )の画素値を入力する。G(t1,u(t1,x1,y1)+f1,v(t1,x1,y1)+f2)とする。ここで、f1=-F乃至F、f2=-F乃至Fである。なお、Fは所望の定数であり、たとえば、F=2である。そして、ステップS296に進む。
 ステップS296において、以下の式28を計算する。なお、式28における累積対象は、ステップS291で選出された(t1,x1,y1)である。
Figure JPOXMLDOC01-appb-M000028
そして、ステップS297に進む。
 ステップS297において、式28の計算結果であるHNR(t,x,y,n)を、先鋭化されたヒストグラムとして出力する。ここで、n=0乃至N-1である。そして、一連の処理を終了する。
 なお、式28は、自分自身であるH(t,x,y,n)を重み1とし、近傍の位置のH(t1,x1,y1,n-offset)については、offsetがoffsetMax(t1,x1,y1)のみ、重み1÷(「時刻t、位置(x,y)」と「時刻t1、位置(x1,y1)」の距離)÷(カメラ100の画像で対応する画素位置を中心とした(2F+1)×(2F+1)画素群の値の差分の絶対値の和)で加算した式16と等価である。
 また、式28では、式27と同様にゼロ割りが発生する可能性があるが、ゼロ割り回避の方法は、式27の説明において述べたように、既知の常套手段を使えばよい。この実施の形態の趣旨とは関係ないため、式28ではこれについては触れていない。
 また、上述の第2の実施例において、式24の各項の重みが1を超える場合は、強制的に重みを1としてもよいと述べた。同様のことは、式28においてもいえる。すなわち、式28において、各項の重みが1を超える場合は、強制的に重みを1とするようにしてもよい。
 このようにして、着目時刻tの着目位置(x,y)における先鋭化されたヒストグラムHNR(t,x,y,n)(ここで、n=0乃至N-1)が得られる。
 ここで、式27について補足する。時刻tの位置(x,y)のSPADが測定している物体は、時刻tにおいてカメラ100が撮影したときの画像内では位置(u(t,x,y),v(t,x,y))に投影されている。その投影されたときの画素の値(輝度値)は、G(t,u(t,x,y),v(t,x,y))である。f1=-F乃至F、f2=-F乃至FにおけるG(t,u(t,x,y)+f1,v(t,x,y)+f2)は、画像内の位置(u(t,x,y),v(t,x,y))を中心とした(2F+1)×(2F+1)画素より成る画素群の画素値(輝度値)である。G(t1,u(t1,x1,y1)+f1,v(t1,x1,y1)+f2)についても同様である。
 したがって、式27では、(2F+1)×(2F+1)画素より成る画素群の値が似ている(差分が小さい)場合は、着目時刻tの着目位置(x,y)のSPADが測定している物体と時刻t1の位置(x1,y1)のSPADが測定している物体は同一であると考えられるため、重みを重くして、時刻t1の位置(x1,y1)のヒストグラムの加算が行われる。画素群の値が似ていない(差分が大きい)場合は、重みが小さくなる。
 ここで、上述の第5の実施例および第6の実施例について、別の側面から見た特徴を述べる。これらの実施例では、距離測定装置10に併設したカメラ100からの画像をヒントに、ヒストグラム同士の加算が行われる。SPADアレイ13の各SPADと、対応するカメラ100からの画像の各画素値とは、相関があることを利用している。このように、相関を利用することにより、ヒストグラムの先鋭化を図っている。
 図17および式16に関して述べたように、この第2の実施の形態の特徴は、「情報」を使った「適切な加算」にある。第1乃至第6の実施例における「情報」および「適切な加算」の具体例のまとめを図30に示す。すなわち、図30は、本技術の第2の実施の形態の第1乃至第6の実施例における「情報」および「適切な加算」の具体例のまとめを示す図である。これらによれば、ヒストグラム間の類似性、距離の近さ、ヒストグラムに対応する画像データ間の類似性などに応じて、適応的に最適なヒストグラムの加算を行うことにより、ヒストグラムの先鋭化を行うことができる。
 なお、第2の実施の形態においては、ヒストグラムの先鋭化について述べたが、同様に、生起率の先鋭化を行うことも可能である。すなわち、式16、式23、式24、式25、式26、式27、あるいは、式28の右辺に出現する観測値であるヒストグラムH(t,x,y,n)の代わりに、生起率(λ(t,x,y,n)=H(t,x,y,n)÷M(t,x,y,n-1))を用いても良い。そして、式16、式23、式24、式25、式26、式27、あるいは、式28の右辺を計算する。この場合、計算により求まる値は、先鋭化されたヒストグラムHNR(t,x,y,n)ではなく、先鋭化された生起率(λNR(t,x,y,n)とする)となる。
 [効果]
 このように、この第2の実施の形態によれば、各SPADから得られるヒストグラムに対して、情報に則り適切な加算を行うことができる。適切な加算が行われることにより、各画素に投影されている物体の位置関係がどのような場合でも、常に最適な加算が行われる。また、複数の加算を行うのではなく、適切な加算を一種類だけ行うため、膨大な計算量も必要としない。
 [要点]
 第2の実施の形態は、以下の点を要点とする。
(1)ヒストグラムの先鋭化方法において、
 時空間の各位置に存在する第1のヒストグラムを入力する入力ステップと、
 第1の情報から適応的に、上記第1のヒストグラムの加算を行うことで第2のヒストグラムを得る加算ステップと、
 第2のヒストグラムを出力する出力ステップと
を有することを特徴とするヒストグラムの先鋭化方法。
(2)上記(1)におけるヒストグラムの先鋭化方法において、
 上記第1の情報とは、上記第1のヒストグラム間の類似性であり、
 上記時空間において、上記類似性の高い方向の位置に存在する上記第1のヒストグラムの重みを重くして、上記加算ステップでは加算が行われる
ことを特徴とするヒストグラムの先鋭化方法。
(3)上記(1)におけるヒストグラムの先鋭化方法において、
 上記第1の情報とは、上記第1のヒストグラム間の類似性であり、
 上記類似性の高さに応じた重みを付けて、上記加算ステップでは加算が行われる
ことを特徴とするヒストグラムの先鋭化方法。
(4)上記(2)または(3)におけるヒストグラムの先鋭化方法において、
 上記第1の情報である「上記第1のヒストグラム間の類似性」とは、上記時空間における複数の組についての類似性である
ことを特徴とするヒストグラムの先鋭化方法。
(5)上記(1)におけるヒストグラムの先鋭化方法において、
 上記第1の情報とは、上記時空間上での距離であり、
 上記距離の近さに応じた重みを付けて、上記加算ステップでは加算が行われる
ことを特徴とするヒストグラムの先鋭化方法。
(6)上記(1)におけるヒストグラムの先鋭化方法において、
 上記第1の情報とは、上記第1のヒストグラムに対応する画像データ間の類似性であり、
 上記類似性の高さに応じた重みを付けて、上記加算ステップでは加算が行われる
ことを特徴とするヒストグラムの先鋭化方法。
(7)上記(6)におけるヒストグラムの先鋭化方法において、
 上記第1の情報である「上記第1のヒストグラムに対応する画像データ間の類似性」とは、上記画像データの複数の組についての類似性である
ことを特徴とするヒストグラムの先鋭化方法。
 <4.第3の実施の形態>
 [概要]
 この第3の実施の形態では、演算部16においてヒストグラムからピークを検出する前に、ヒストグラムまたはヒストグラムから得られる生起率の各ビンについての重み付け加算を行うことにより、ヒストグラムの各ビンに対して先鋭化を行う。これにより、誤検出を減少させる。すなわち、あらかじめ位置関係を想定しなくても、少ない演算量で適切なヒストグラムの加算を行い、ヒストグラムの先鋭化を行う方法を提供するものである。
 図31は、従来技術における第1の手法を説明するための図である。この従来技術では、各画素から得られるヒストグラムに対して、「決められた手順でヒストグラムの加算を行うという処理」回路にて加算を行い、最終的なヒストグラムを得ている。決められた手順に合致しない位置関係にある物体では、ヒストグラムの不鮮明化を引き起こすという問題がある。
 図32は、従来技術における第2の手法を説明するための図である。この従来技術では、決められた手順が複数あるため、それぞれに対応したヒストグラムの加算を行う。これら加算は、各画素から得られるヒストグラムに対して、「決められた手順1、2、3、…でヒストグラムの加算を行うという処理」回路で行われる。そして、それぞれの信頼度を計算する。これら信頼度の計算は、「ヒストグラムの信頼度計算処理」回路にて行われる。計算された複数の信頼度から最大となるものを、「最大となるものを検出する処理」回路において検出する。そして、これに対応した「加算されたヒストグラム」を、「選択処理」回路によって選択して、最終的なヒストグラムを得ている。「決められた手順でヒストグラムの加算を行うという処理」が複数あり、計算量の膨大を招くという問題がある。
 図33は、本技術の第3の実施の形態における処理の一例を示す概念図である。この第3の実施の形態では、各画素から得られるヒストグラムに対して、適切な加算を、「情報に則りヒストグラムの加算を行うという処理」回路にて行う。すなわち、適切な加算が行われるため、各画素に投影されている物体の位置関係がどのような場合でも、常に最適な加算が行われる。これにより、決められた手順に合致しない位置関係にある物体に対しても適用することができ、ヒストグラムの不鮮明さを解消することができる。また、この第3の実施の形態では、複数の加算を行うのではなく、適切な加算を一種類だけ行う。これにより、膨大な計算量も必要としない。
 ここで重要となってくるのが、同図における「情報」である。そして、この「情報」を使った「適切な加算」の方法である。これら「情報」と「適切な加算」は、後述する詳細な説明によって明らかになるであろう。なお、「適切な加算」とは、後述する式33に対応するものである。
 [生起率の先鋭化]
 この第3の実施の形態においては、観測されたヒストグラムH(t,x,y,n)から生起率に変換して、生起率に対して先鋭化を行う。すなわち、以下の式29によって示される生起率λ(t,x,y,n)の先鋭化を行う。
Figure JPOXMLDOC01-appb-M000029
ここで、M(t,x,y,n-1)は以下の式30により定義される。
Figure JPOXMLDOC01-appb-M000030
なお、式29の生起率λ(t,x,y,n)の値には、以下の式31によって示される標準偏差σ(t,x,y,n)の誤差があることに注意が必要である。
Figure JPOXMLDOC01-appb-M000031
 まとめると、観測値であるH(t,x,y,n)から式29により得られる値λ(t,x,y,n)に関して先鋭化を行う。なお、λ(t,x,y,n)には、式31によって示される標準偏差σ(t,x,y,n)の誤差が含まれている。
 生起率λ(t,x,y,n)の先鋭化の結果をλNR(t,x,y,n)とする。必要に応じて、以下の式32により、HNR(t,x,y,n)を求めてもよい。HNR(t,x,y,n)は、先鋭化されたヒストグラムである。
Figure JPOXMLDOC01-appb-M000032
なお、この式32が成立することは、上述の式29および式30から明らかである。
 この第3の実施の形態における生起率の先鋭化を端的に表現すると以下の式33となる。
Figure JPOXMLDOC01-appb-M000033
ここで、時刻t、位置(x,y)、n番目のビンの観測値(すなわち、累積部15で得られる値)をH(t,x,y,n)としている。そして、生起率λ(t,x,y,n)は、上述の式29において定義されている。この第3の実施の形態を適用することで得られる先鋭化後の生起率について、時刻t、位置(x,y)、n番目のビンの値をλNR(t,x,y,n)としている。演算部16では、累積部15で得られるヒストグラムH(t,x,y,n)から式29および式33を計算して、先鋭化された生起率λNR(t,x,y,n)を得ている。さらに、必要に応じて、上述の式32により先鋭化されたストグラムHNR(t,x,y,n)を得ている。先鋭化された生起率λNR(t,x,y,n)または先鋭化されたヒストグラムHNR(t,x,y,n)からピーク値を探すことで、誤検出のないピークを検出することができ、誤検出のない測距が可能となる。
 ここで、補足すると、SPADによる測距においては、ヒストグラムのピーク検出が、一般的に行われている。しかし、前述の説明から分かるように、ヒストグラムと式29に示すような比例関係にある生起率についてピーク検出を行っても、ヒストグラムのピーク検出と同じ結果を得ることができる。したがって、先鋭化された生起率λNR(t,x,y,n)において、ビンnに関してサーチして、ピーク検出を行えばよい。ここで、n=0乃至N-1である。この場合、先鋭化された生起率λNR(t,x,y,n)から式32(既出)を使って、先鋭化されたストグラムHNR(t,x,y,n)を求める必要はない。
 さらに、上述の式33についての説明を続ける。上述の式33は、λ(t,x,y,n)についての重み付き平均を行っている。重み付き平均により、生起率λ(t,x,y,n)に存在するノイズが除去されて、生起率の先鋭化が行われる。w(t,x,y,n,t1,x1,y1,n1)は、対応するλ(t1,x1,y1,n1)の重みであり、Wは正規化のために使用するw(t,x,y,n,t1,x1,y1,n1)の合計値である。
 [2つの分布の分離度]
 観測値から得られる時刻t、位置(x,y)、n番目のビンの生起率の確率密度関数は、平均λ(t,x,y,n)、標準偏差σ(t,x,y,n)の正規分布となる。観測値から得られる時刻t1、位置(x1,y1)、n1番目のビンの生起率の確率密度関数は、平均λ(t1,x1,y1,n1)、標準偏差σ(t1,x1,y1,n1)の正規分布となる。
 この2つの生起率の分離度(Resolution:2つのピークの分離の割合)は、以下の式34となる。
Figure JPOXMLDOC01-appb-M000034
分離度がある程度大きければ、2つの真の生起率は異なるといえる。逆に、分離度がある程度小さければ、2つの真の生起率は同じであるといえる。分離度が小さい場合には、加算することにより、生起率のノイズ除去を行うことが可能である。
 分離度が高いほど、2つのビンの生起率の類似性は小さい。逆に、分離度が小さいほど、2つのビンの生起率の類似性は大きい。
 なお、ここでは、2つのビンの生起率が同じか、異なるかの判断指標の例として、分離度を用いたが、この実施の形態は判断指標として分離度に限定するものではない。
 [第1の実施例]
 第1の実施例は、距離測定装置10を使って、SPADアレイ13の各SPADにおける測距を行う。特に、「累積部15の観測値であるヒストグラム」から上述の式29により得られる生起率の先鋭化を図っている点に特徴がある。生起率の先鋭化は、演算部16において行われる。
 着目時刻tの着目位置(x,y)、着目ビンnにおける生起率λ(t,x,y,n)に対して、時空間およびビン上で近傍にある生起率λ(t1,x1,y1,n1)を重み付け加算する。これにより、生起率λ(t,x,y,n)のノイズ除去が行われ、先鋭化が行われる。
 図34は、本技術の第3の実施の形態の第1の実施例における生起率のノイズ除去の処理手順の一例を示す流れ図である。この処理により、着目時刻tの着目位置(x,y)、着目ビンnにおける生起率λ(t,x,y,n)のノイズ除去(すなわち、先鋭化)が行われる。
 まず、ステップS311では、時空間およびビンにおいて、時刻t、位置(x,y)、ビンnの近傍を選出し、(t1,x1 ,y1 n1)とする。ここで、 (t1,x1 ,y1 n1)は、1つまたは複数組ある。例えば、(t1,x1 ,y1 n1)は、t-2≦t1≦t+2、x-2≦x1≦x+2、y-2≦y1≦y+2、n-2≦n1≦n+2を満たす組である。ただし、(t1,x1 ,y1 n1)=(t,x ,y n)は除く。なお、n1は、全てのビン、すなわち、0乃至N-1としてもよい。そして、ステップS312に進む。
 ステップS312において、累積部15から得られたヒストグラムH(t,x,y,n)を入力する。そして、(t1,x1 ,y1 n1)のそれぞれに対して、累積部15から得られたヒストグラムH(t1,x1,y1,n1)を入力する。そして、ステップS313に進む。
 ステップS313において、H(t,x,y,n)およびH(t1,x1,y1,n1)に対して、式29を計算して、λ(t,x,y,n)およびλ(t1,x1,y1,n1)を求める。そして、ステップS314に進む。
 ステップS314において、以下の式35を計算する。なお、式35における累積対象は、ステップS311で選出された(t1,x1 ,y1 n1)である。そして、ステップS315に進む。
Figure JPOXMLDOC01-appb-M000035
 ステップS315において、式35の計算結果であるλNR(t,x,y,n)を、先鋭化された生起率として出力する。そして、一連の処理を終了する。
 なお、式35は、自分自身であるλ(t,x,y,n)を重み1とし、近傍の位置のλ(t1,x1,y1,n1)については、重み「1÷(「時刻t、位置(x,y)、ビンn」と「時刻t1、位置(x1,y1)、ビンn1」の距離)」で加算した式33と等価である。
 このようにして、着目時刻tの着目位置(x,y)の着目ビンnの先鋭化された生起率λNR(t,x,y,n)が得られる。
 ここで、式35について補足する。「時刻t、位置(x,y)、ビンn」の空間において近傍にある生起率同士は似ているため、これらを加算することによりノイズを除去することができる。式35は、この計算を行っている。
 同図に示す処理を実行することにより、SPADアレイ13の各時刻t、各位置(x,y)、各ビンnにおける生起率の先鋭化が行われる。なお、同図の処理は、tは1以上の整数、xは1以上X以下の整数、yは1以上Y以下の整数、nは0以上N-1以下の整数について、全て行われる。この後、演算部16にて、この先鋭化された生起率に対してピークを検出する。そして、ピークに対応するビンに対して、c×D/2倍した値を、距離として、出力端子17より出力する。なお、ビンnは、およそn×dという時間に対応しているので、c×D/2倍により距離が算出できる。ここで、ピーク検出は既知の手法により行われる。または、先鋭化された生起率に対して、上述の式32により先鋭化されたヒストグラムを計算し、この先鋭化されたヒストグラムにおいてピーク検出を行ってもよい。
 [第2の実施例]
 上述の第1の実施例では、時空間における「時刻t、位置(x,y)、ビンn」と「時刻t1、位置(x1,y1)、ビンn1」の距離に依存して重みを決めていた。この第2の実施例は、2つの生起率がほぼ等しいかどうかで重みを決定する例である。生起率がほぼ等しいものを加算することにより、ノイズを除去することができる。さらに、加算する生起率の正確度合に応じても重みを決定している。つまり、生起率に誤差が多く含まれている場合は、その生起率の値は信用できないため、重みを小さくするようにしている。換言すれば、生起率の信頼度に応じて、重みを決定している。
 図35は、本技術の第3の実施の形態の第2の実施例における生起率のノイズ除去の処理手順の一例を示す流れ図である。この処理により、着目時刻tの着目位置(x,y)、着目ビンnにおける生起率λ(t,x,y,n)のノイズ除去(すなわち、先鋭化)が行われる。なお、この第2の実施例における処理は、上述の第1の実施例におけるステップS314の処理を、以下に説明するようにステップS316の処理に置換したものに相当する。
 ステップS316において、H(t1,x1,y1,n1)に対して、式31を計算して、σ(t1,x1,y1,n1)を求める。そして、式36を計算する。なお、式36における累積対象は、ステップS311で選出された(t1,x1 ,y1 n1)である。そして、ステップS317に進む。
Figure JPOXMLDOC01-appb-M000036
 ステップS317において、式36の計算結果であるλNR(t,x,y,n)を、先鋭化された生起率として出力する。そして、一連の処理を終了する。
 なお、式36は、自分自身であるλ(t,x,y,n)を重み1とし、近傍の位置のλ(t1,x1,y1,n1)については、重み「1÷(「時刻t、位置(x,y)、ビンn」の生起率と「時刻t1、位置(x1,y1)、ビンn1」の生起率の分離度)÷(「時刻t1、位置(x1,y1)、ビンn1」の生起率の標準偏差)」で加算した式33と等価である。
 また、分離度の値または標準偏差が0の時は、式36においてゼロ割りが発生する。そこで、現実的にはゼロ割り回避のため、分離度または標準偏差が0の時は、微小な値に置き換える必要がある。これは、既知の常套手段であり、この実施の形態の趣旨とは関係ないため、式36ではこれについては触れていない。
 また、式36において、加算する近傍の生起率λ(t1,x1,y1,n1)の重みは1を超える場合もある。一方、自分自身である生起率λ(t,x,y,n)の重みは1である。自分自身以外の重みが、自分自身よりも重いのはよくない。そこで、各項の重みが1を超える場合は、強制的に重みを1とするようにしてもよい。
 このようにして、着目時刻tの着目位置(x,y)の着目ビンnの先鋭化された生起率λNR(t,x,y,n)が得られる。
 ここで、式36について補足する。分離度が小さければ、2つの生起率は、ほぼ等しいことを意味する。ほぼ等しい生起率であれば、加算することによりノイズを除去することができる。また、加算する生起率λ(t1,x1,y1,n1)の標準偏差σ(t1,x1,y1,n1)が大きい場合(すなわち、信頼度が低い場合)、「時刻t1、位置(x1,y1)、ビンn1」の生起率は、信用性に欠ける。そこで、このような場合は、生起率λ(t1,x1,y1,n1)の重みを小さくすべきである。式36は、この計算を行っている。
 [第3の実施例]
 上述の第1の実施例では、時空間における「時刻t、位置(x,y)、ビンn」と「時刻t1、位置(x1,y1)、ビンn1」の距離に依存して重みを決めていた。また、第2の実施例は、2つの生起率がほぼ等しいかどうかで重みを決定していた。この第3の実施例では、この2つの事項を加味して重みを決定する例である。
 図36は、本技術の第3の実施の形態の第3の実施例における生起率のノイズ除去の処理手順の一例を示す流れ図である。この処理により、着目時刻tの着目位置(x,y)、着目ビンnにおける生起率λ(t,x,y,n)のノイズ除去(すなわち、先鋭化)が行われる。なお、この第3の実施例における処理は、上述の第1の実施例におけるステップS314の処理を、以下に説明するようにステップS318の処理に置換したものに相当する。
 ステップS318において、以下の式37を計算する。なお、式37における累積対象は、ステップS311で選出された(t1,x1 ,y1 n1)である。そして、ステップS319に進む。
Figure JPOXMLDOC01-appb-M000037
 ステップS319において、式37の計算結果であるλNR(t,x,y,n)を、先鋭化された生起率として出力する。そして、一連の処理を終了する。
 なお、式37は、自分自身であるλ(t,x,y,n)を重み1とし、近傍の位置のλ(t1,x1,y1,n1)については、重み「1÷(「時刻t、位置(x,y)、ビンn」と「時刻t1、位置(x1,y1)、ビンn1」の距離)÷(「時刻t、位置(x,y)、ビンn」の生起率と「時刻t1、位置(x1,y1)、ビンn1」の生起率の分離度)」で加算した式33と等価である。
 また、式37では、式36と同様にゼロ割りが発生する可能性があるが、ゼロ割り回避の方法は、式36の説明において述べたように、既知の常套手段を使えばよい。この実施の形態の趣旨とは関係ないため、式37ではこれについて触れていない。
 また、第2の実施例において、式36の各項の重みが1を超える場合は、強制的に重みを1としてもよいと述べた。同様のことは、式37においてもいえる。すなわち、式37において、各項の重みが1を超える場合は、強制的に重みを1とするようにしてもよい。
 このようにして、着目時刻tの着目位置(x,y)の着目ビンnの先鋭化された生起率λNR(t,x,y,n)が得られる。
 ここで、式37について補足する。「時刻t、位置(x,y)、ビンn」の空間において近傍にある生起率同士は似ているため、これらを加算することによりノイズを除去することができる。また、分離度が小さければ、2つの生起率は、ほぼ等しいことを意味する。ほぼ等しい生起率であれば、加算することによりノイズを除去することができる。式37は、この計算を行っている。
 [第4の実施例]
 上述の第2の実施例では、着目する1つの生起率と、近傍の各生起率の類似性(分離度)により、重みを決定していた。この第4の実施例は、着目する位置を中心とする複数の生起率群と、近傍の生起率群の類似性により重みを決定する例である。生起率単体での類似性を判断すると誤判定の可能性もあるが、複数の生起率同士を比較することにより、類似性の判断がさらに確実となる。
 図37は、本技術の第3の実施の形態の第4の実施例における生起率のノイズ除去の処理手順の一例を示す流れ図である。この処理により、着目時刻tの着目位置(x,y)、着目ビンnにおける生起率λ(t,x,y,n)のノイズ除去(すなわち、先鋭化)が行われる。
 まず、ステップS321では、時空間およびビンにおいて、時刻t、位置(x,y)、ビンnの近傍を選出し、(t1,x1 ,y1 n1)とする。ここで、 (t1,x1 ,y1 n1)は、1つまたは複数組ある。そして、ステップS322に進む。
 ステップS322において、累積部15から得られたヒストグラムH(t,x+b1,y+b2,n+b3)を入力する。そして、(t1,x1 ,y1 n1)のそれぞれに対して、累積部15から得られたヒストグラムH(t1,x1+b1,y1+b2,n1+b3)を入力する。ここで、b1=-α乃至α、b2=-α乃至α、b3=-β乃至βである。ここで、αおよびβは、所望の定数である。例えば、α=2、β=2である。そして、ステップS323に進む。
 ステップS323において、H(t,x+b1,y+b2,n+b3)およびH(t1,x1+b1,y1+b2,n1+b3)に対して、式29を計算して、λ(t,x+b1,y+b2,n+b3)およびλ(t1,x1+b1,y1+b2,n1+b3)を求める。ここで、b1=-α乃至α、b2=-α乃至α、b3=-β乃至βである。そして、ステップS324に進む。
 ステップS324において、以下の式38を計算する。なお、式38における累積対象は、ステップS321で選出された(t1,x1 ,y1 n1)である。そして、ステップS325に進む。
Figure JPOXMLDOC01-appb-M000038
 ステップS325において、式38の計算結果であるλNR(t,x,y,n)を、先鋭化された生起率として出力する。そして、一連の処理を終了する。
 なお、式38は、自分自身であるλ(t,x,y,n)を重み1とし、近傍の位置のλ(t1,x1,y1,n1)については、重み「1÷(「時刻t、位置(x,y)、ビンn」を中心とする生起率群と「時刻t1、位置(x1,y1)、ビンn1」を中心とする生起率群の分離度の合計値)」で加算した式33と等価である。
 また、式38では、式36と同様にゼロ割りが発生する可能性があるが、ゼロ割り回避の方法は、式36の説明において述べたように、既知の常套手段を使えばよい。この実施の形態の趣旨とは関係ないため、式38ではこれについては触れていない。
 また、上述の第2の実施例において、式36の各項の重みが1を超える場合は、強制的に重みを1としてもよいと述べた。同様のことは、式38においてもいえる。すなわち、式38において、各項の重みが1を超える場合は、強制的に重みを1とするようにしてもよい。
 このようにして、着目時刻tの着目位置(x,y)の着目ビンnの先鋭化された生起率λNR(t,x,y,n)が得られる。
 ここで、式18について補足する。「時刻t、位置(x,y)、ビンn」の空間において生起率群同士の分離度が小さければ、それら生起率群の中心である2つの生起率は、ほぼ等しいことを意味する。ほぼ等しい生起率であれば、加算することによりノイズを除去することができる。式38は、この計算を行っている。
 [第5の実施例]
 この第5の実施例においては、距離測定装置10に併設したカメラ100を使用する。ここで、カメラ100とは画像を撮影することができる装置であり、距離測定装置10のSPADアレイ13が測定する方向と同じ方向を撮影する。
 SPADアレイ13の着目時刻tの着目位置(x,y)のSPADが測定している物体に対応するカメラ100の画像内の画素値E(t,x,y)と、SPADアレイ13の時刻t1の位置(x1,y1)のSPADが測定している物体に対応するカメラ100の画像内の画素値E(t1,x1,y1)とが類似していれば、カメラ100内で同じ物体を撮影していると考えられる。すなわち、この場合、2つのSPADが測定している物体は同じと考えられる。違う画素値であれば、違う物体を測定していると考えられる。そこで、カメラ100の画像内の画素値E(t,x,y)とE(t1,x1,y1)とがほぼ同じ値である場合には、着目時刻tの着目位置(x,y)のヒストグラムまたは生起率に、時刻t1の位置(x1,y1)のヒストグラムまたは生起率を加算する際の重みを重くする。それ以外の場合には、加算する重みを小さくする、または、加算を行わない。このようにして、適切なヒストグラムまたは生起率を加算することができ、ヒストグラムまたは生起率のノイズを除去することが可能となる。なお、ここで、(t1,x1,y1)は、時空間において(t,x,y)の近傍である。
 なお、E(t,x,y)は、時刻tの位置(x,y)のSPADが測定している物体を、時刻tにおいてカメラ100が撮影したときの輝度値である。E(t1,x1,1y)は、時刻t1の位置(x1,y1)のSPADが測定している物体を、時刻t1においてカメラ100が撮影したときの輝度値である。
 また、この第5の実施例においては、上述の第1の実施例と同様に、「位置(x,y)」と「位置(x1,y1)」の距離にも依存させて重みを決めている。
 図38は、本技術の第3の実施の形態の第5の実施例における生起率のノイズ除去の処理手順の一例を示す流れ図である。この処理により、着目時刻tの着目位置(x,y)、着目ビンnにおける生起率λ(t,x,y,n)のノイズ除去(すなわち、先鋭化)が行われる。
 まず、ステップS331では、時空間およびビンにおいて、時刻t、位置(x,y)、ビンnの近傍を選出し、(t1,x1 ,y1 n1)とする。ここで、 (t1,x1 ,y1 n1)は、1つまたは複数組ある。そして、ステップS332に進む。
 ステップS332において、累積部15から得られたヒストグラムH(t,x,y,n)を入力する。そして、(t1,x1 ,y1 n1)のそれぞれに対して、累積部15から得られたヒストグラムH(t1,x1,y1,n1)を入力する。そして、ステップS333に進む。
 ステップS333において、H(t,x,y,n)およびH(t1,x1,y1,n1)に対して、式29を計算して、λ(t,x,y,n)およびλ(t1,x1,y1,n1)を求める。そして、ステップS334に進む。
 ステップS334において、「(t,x,y)においてSPADが測定している物体」に対応するカメラ100の画像内の画素値を入力する。E(t,x,y)とする。「(t1,x1,y1)のそれぞれにおいてSPADが測定している物体」に対応するカメラ100の画像内の画素値を入力する。E(t1,x1,y1)とする。そして、ステップS335に進む。
 ステップS335において、以下の式39を計算する。なお、式39における累積対象は、ステップS331において選出された(t1,x1 ,y1 n1)である。そして、ステップS336に進む。
Figure JPOXMLDOC01-appb-M000039
 ステップS336において、式39の計算結果であるλNR(t,x,y,n)を、先鋭化された生起率として出力する。そして、一連の処理を終了する。
 なお、式39は、自分自身であるλ(t,x,y,n)を重み1とし、近傍の位置のλ(t1,x1,y1,n1)については、重み「1÷(「時刻t、位置(x,y)、ビンn」と「時刻t1、位置(x1,y1)、ビンn1」の距離)÷(E(t,x,y)とE(t1,x1,y1)の差の絶対値)」で加算した式33と等価である。
 また、式39では、式36と同様にゼロ割りが発生する可能性があるが、ゼロ割り回避の方法は、式36の説明において述べたように、既知の常套手段を使えばよい。この実施の形態の趣旨とは関係ないため、式39ではこれについて触れていない。
 また、上述の第2の実施例において、式36の各項の重みが1を超える場合は、強制的に重みを1としてもよいと述べた。同様のことは、式39においてもいえる。すなわち、式39において、各項の重みが1を超える場合は、強制的に重みを1とするようにしてもよい。
 このようにして、着目時刻tの着目位置(x,y)の着目ビンnの先鋭化された生起率λNR(t,x,y,n)が得られる。
 [第6の実施例]
 上述の第5の実施例では、着目する1つのSPADに対応する1つの画素値と、近傍の各SPADに対応する1つの画素値の類似性(2つの値の差分)により、重みを決定していた。この第6の実施例は、「着目SPADに対応する画素」を中心とする複数の画素群の画素値と、「近傍のSPADに対応する画素」を中心とする画素群の画素値との類似性により重みを決定する例である。1画素同士の比較による類似性を判断すると誤判定の可能性もあるが、複数の画素同士を比較することにより、類似性の判断がさらに確実となる。
 図39および図40は、本技術の第3の実施の形態の第6の実施例における生起率のノイズ除去の処理手順の一例を示す流れ図である。この処理により、着目時刻tの着目位置(x,y)、着目ビンnにおける生起率λ(t,x,y,n)のノイズ除去(すなわち、先鋭化)が行われる。
 まず、ステップS341を行うが、これは、上述のステップS331と同じであり、説明を省略する。そして、ステップS342に進む。
 ステップS342は、上述のステップS332と同じ処理であり、説明を省略する。そして、ステップS343に進む。
 ステップS343は、上述のステップS333と同じ処理であり、説明を省略する。そして、ステップS344に進む。
 ステップS344において、「(t,x,y)においてSPADが測定している物体」に対応するカメラ100の画像内の画素位置を(u(t,x,y),v(t,x,y) )とする。カメラ100の時刻tにおいて撮影された画像内で位置(u(t,x,y)+f1,v(t,x,y)+f2 )の画素値を入力する。これら画素値をG(t,u(t,x,y)+f1,v(t,x,y)+f2 )とする。「(t1,x1,y1)においてSPADが測定している物体」に対応するカメラ100の画像内の画素位置を(u(t1,x1,y1),v(t1,x1,y1) )とする。カメラ100の時刻t1において撮影された画像内で位置(u(t1,x1,1y)+f1,v(t1,x1,y1)+f2 )の画素値を入力する。これら画素値をG(t1,u(t1,x1,y1)+f1,v(t1,x1,y1)+f2 )とする。ここで、f1=-F乃至F、f2=-F乃至Fである。なお、Fは所望の定数であり、たとえば、F=2である。そして、ステップS345に進む。
 ステップS345において、以下の式40を計算する。なお、式40における累積対象は、ステップS341で選出された(t1,x1 ,y1 n1)である。そして、ステップS346に進む。
Figure JPOXMLDOC01-appb-M000040
 ステップS346において、式40の計算結果であるλNR(t,x,y,n)を、先鋭化された生起率として出力する。そして、一連の処理を終了する。
 なお、式40は、自分自身であるλ(t,x,y,n)を重み1とし、近傍の位置のλ(t1,x1,y1,n1)については、重み「1÷(「時刻t、位置(x,y)、ビンn」と「時刻t1、位置(x1,y1)、ビンn1」の距離)÷(カメラ100の画像で対応する画素位置を中心とした(2F+1)×(2F+1)画素群の値の差分の絶対値の和)」で加算した式33と等価である。
 また、式40では、式36と同様にゼロ割りが発生する可能性があるが、ゼロ割り回避の方法は、式36の説明において述べたように、既知の常套手段を使えばよい。この実施の形態の趣旨とは関係ないため、式40ではこれについて触れていない。
 また、上述の第2の実施例において、式36の各項の重みが1を超える場合は、強制的に重みを1としてもよいと述べた。同様のことは、式40においてもいえる。すなわち、式40において、各項の重みが1を超える場合は、強制的に重みを1とするようにしてもよい。
 このようにして、着目時刻tの着目位置(x,y)の着目ビンnの先鋭化された生起率λNR(t,x,y,n)が得られる。
 ここで、式40について補足する。時刻tの位置(x,y)のSPADが測定している物体は、時刻tにおいてカメラ100が撮影したときの画像内では位置(u(t,x,y),v(t,x,y))に投影されている。その投影されたときの画素の値(輝度値)は、G(t,u(t,x,y),v(t,x,y))である。、f1=-F乃至F、f2=-F乃至FにおけるG(t,u(t,x,y)+f1,v(t,x,y)+f2)は、画像内の位置(u(t,x,y),v(t,x,y))を中心とした(2F+1)×(2F+1)画素より成る画素群の画素値(輝度値)である。G(t1,u(t1,x1,y1)+f1,v(t1,x1,y1)+f2)についても同様である。
 したがって、式40では、(2F+1)×(2F+1)画素より成る画素群の値が似ている(差分が小さい)場合は、着目時刻tの着目位置(x,y)のSPADが測定している物体と時刻t1の位置(x1,y1)のSPADが測定している物体は同一であると考えられるため、重みを重くして加算が行われる。画素群の値が似ていない(差分が大きい)場合は、重みが小さくなる。
 ここで、この第3の実施の形態の第5の実施例および第6の実施例について、別の側面から見た特徴を述べる。これらの実施例では、距離測定装置10に併設したカメラ100からの画像をヒントに、ヒストグラムから得られる生起率の加算が行われる。SPADアレイ13の各SPADと、対応するカメラ100からの画像の各画素値とは、相関があることを利用している。このように、相関を利用することにより、ヒストグラムから得られる生起率の先鋭化を図っている。
 図33および式33に関して述べたように、この第3の実施の形態の特徴は、「情報」を使った「適切な加算」にある。第1乃至第6の実施例における「情報」および「適切な加算」の具体例のまとめを図41に示す。すなわち、図41は、本技術の第3の実施の形態の第1乃至第6の実施例における「情報」および「適切な加算」の具体例のまとめを示す図である。これらによれば、距離の近さ、ヒストグラムまたはヒストグラムから得られる生起率同士の類似性などに応じて、ヒストグラムまたはヒストグラムから得られる生起率の各ビンについての加算を行うことにより、ヒストグラムまたはヒストグラムから得られる生起率の先鋭化を行うことができる。
 [効果]
 このように、この第3の実施の形態によれば、各SPADから得られるヒストグラム(または、生起率)の各ビンに対して、情報に則り適切な加算を行う。適切な加算が行われるため、各画素に投影されている物体の位置関係がどのような場合でも、常に最適な加算が行われる。また、複数の加算を行うのではなく、適切な加算を一種類だけ行うため、膨大な計算量も必要としない。
 [要点]
 第3の実施の形態は、以下の点を要点とする。
(1)ヒストグラム、または、ヒストグラムから得られる生起率の先鋭化方法において、
 時空間の各位置に存在する第1のヒストグラムを入力する入力ステップと、
 上記第1のヒストグラムから対応する生起率を計算する第1の計算ステップと、
 第1の情報から、上記第1の生起率の各ビンについての加算を行うことで第2の生起率を得る加算ステップと、
 必要に応じて、上記第2の生起率から第2のヒストグラムを計算する第2の計算ステップと、
 上記第2の生起率、または、上記第2のヒストグラムを出力する出力ステップと
を有することを特徴とするヒストグラム、または、ヒストグラムから得られる生起率の先鋭化方法。
(2)上記(1)におけるヒストグラム、または、ヒストグラムから得られる生起率の先鋭化方法において、
 上記第1の情報とは、上記時空間および上記ビン上での距離であり、
 上記距離の近さに応じた重みを付けて、上記加算ステップでは加算が行われる
ことを特徴とするヒストグラム、または、ヒストグラムから得られる生起率の先鋭化方法。
(3)上記(1)におけるヒストグラム、または、ヒストグラムから得られる生起率の先鋭化方法において、
 上記第1の情報とは、上記第1の生起率の各ビンの類似性であり、
 上記類似性の高さに応じた重みを付けて、上記加算ステップでは加算が行われる
ことを特徴とするヒストグラム、または、ヒストグラムから得られる生起率の先鋭化方法。
(4)上記(3)におけるヒストグラム、または、ヒストグラムから得られる生起率の先鋭化方法において、
 上記第1の情報である「上記第1の生起率の各ビンの類似性」とは、上記時空間および上記ビンにおける複数の組についての類似性である
ことを特徴とするヒストグラムの先鋭化方法。
(5)上記(1)におけるヒストグラム、または、ヒストグラムから得られる生起率の先鋭化方法において、
 上記第1の情報とは、上記第1の生起率の各ビンの信頼度であり、
 上記信頼度の高さに応じた重みを付けて、上記加算ステップでは加算が行われる
ことを特徴とするヒストグラム、または、ヒストグラムから得られる生起率の先鋭化方法。
(6)上記(1)におけるヒストグラム、または、ヒストグラムから得られる生起率の先鋭化方法において、
 上記第1の情報とは、上記第1の生起率に対応する画像データ間の類似性であり、
 上記類似性の高さに応じた重みを付けて、上記加算ステップでは加算が行われる
ことを特徴とするヒストグラム、または、ヒストグラムから得られる生起率の先鋭化方法。
(7)上記(6)におけるヒストグラム、または、ヒストグラムから得られる生起率の先鋭化方法において、
上記第1の情報である「上記第1の生起率に対応する画像データ間の類似性」とは、上記画像データの複数の組についての類似性である
ことを特徴とするヒストグラム、または、ヒストグラムから得られる生起率の先鋭化方法。
 <5.第4の実施の形態>
 [概要]
 この第4の実施の形態では、演算部16においてヒストグラムからピークを検出する前に、ヒストグラムのノイズ除去を行う。これにより、誤検出を減少させる。すなわち、あらかじめ位置関係を想定しなくても、少ない演算量で、ヒストグラムのノイズ除去を行う方法を提供するものである。
 なお、正確にいえば、ヒストグラムを直接ノイズ除去するというよりは、ヒストグラムから導出される生起率についてのノイズ除去を行う。そして、必要に応じて、ノイズ除去された生起率からヒストグラムを導出している。これにより、最終的には、ノイズ除去されたヒストグラムを計算することができる。これらの処理は、演算部16によって行われる。この実施の形態の実施例として、ヒストグラムのノイズ除去の例も示すが、より好適には、生起率のノイズ除去の方がよい。
 [生起率のノイズ除去]
 この第4の実施の形態においては、観測されたヒストグラムH(t,x,y,n)から生起率に変換して、生起率に対してノイズ除去を行う。すなわち、以下の式41によって示される生起率λ(t,x,y,n)のノイズ除去を行う。
Figure JPOXMLDOC01-appb-M000041
ここで、M(t,x,y,n-1)は以下の式42によって定義される。
Figure JPOXMLDOC01-appb-M000042
なお、式41の生起率λ(t,x,y,n)の値には、以下の式43によって示される標準偏差σ(t,x,y,n)の誤差があることに注意が必要である。
Figure JPOXMLDOC01-appb-M000043
 まとめると、観測値であるH(t,x,y,n)から式41で得られる値λ(t,x,y,n)に関してノイズ除去を行う。なお、λ(t,x,y,n)には、式43によって示される標準偏差σ(t,x,y,n)の誤差が含まれている。
 生起率λ(t,x,y,n)のノイズ除去の結果をλNR(t,x,y,n)とする。必要に応じて、以下の式44により、HNR(t,x,y,n)を求めてもよい。HNR(t,x,y,n)は、ノイズ除去されたヒストグラムである。
Figure JPOXMLDOC01-appb-M000044
なお、式44が成立することは、式41と式42から明らかである。
 また、先述のとおり、最適なノイズ除去として、ヒストグラムから導出される生起率についてのノイズ除去を行う。すなわち、標準偏差が式43となる誤差を含む、式41によって示す生起率λ(t,x,y,n)のノイズ除去を行う。さらに、生起率ではなく、ヒストグラムについてのノイズ除去の実施例も示す。その際に必要となってくる式をここで記す。すなわち、観測されるヒストグラムのノイズについてである。このノイズの標準偏差は、式7で説明したことから分かるように、以下の式45となる。
Figure JPOXMLDOC01-appb-M000045
観測されたヒストグラムH(t,x,y,n)の値には、式45によって示される標準偏差σH(t,x,y,n)の誤差があることに注意が必要である。
 [変数の定義]
 これ以降で使用する変数を、ここで定義しておく。
 ノイズ除去された生起率λNR(t,x,y,n)をnについて列挙することにより、「N次元縦ベクトルλNR(t,x,y)」を定義する。すなわち、以下の式46によって定義する。ここで、n=0乃至N-1である。
Figure JPOXMLDOC01-appb-M000046
 また、ノイズ除去されたヒストグラムHNR(t,x,y,n)をnについて列挙することにより、「N次元縦ベクトルHNR(t,x,y)」を定義する。すなわち、以下の式47によって定義する。ここで、n=0乃至N-1である。
Figure JPOXMLDOC01-appb-M000047
 また、後述するスカラー変数s(t,x,y,n)をnについて列挙することにより、「N次元縦ベクトルs(t,x,y)」を定義する。スカラー変数a(t,x,y,n)をnについて列挙することで「N次元縦ベクトルa(t,x,y)」を定義する。スカラー変数b(t,x,y,n)をnについて列挙することにより、「N次元縦ベクトルb(t,x,y)」を定義する。すなわち、以下の式48で定義する。ここで、n=0乃至N-1である。
Figure JPOXMLDOC01-appb-M000048
 さらに、記号についても定義する。Lpノルムを、以下の式49によって記述する。ここで、pは0以上であり、無限大も含む。
Figure JPOXMLDOC01-appb-M000049
この実施の形態においては、この記号、および、Lpノルムの定義は、一般的に使われている用語と同様に使用するものである。この実施の形態の実施例においては、解くべき式としてp=0および2の例を示すが、この実施の形態においてはpを0および2に限定するものではない。
 また、勾配(グラディエント)を式50によって記述する。
Figure JPOXMLDOC01-appb-M000050
この実施の形態の実施例においては、この∇という記号は、位置(x,y)についての作用素であり、時間t、ビンnについては作用していない点に注意する必要がある。
 この第4の実施の形態における生起率のノイズ除去を端的に表現すると、以下の式51となる。
Figure JPOXMLDOC01-appb-M000051
 また、この第4の実施の形態におけるヒストグラムのノイズ除去を端的に表現すると、以下の式52となる。
Figure JPOXMLDOC01-appb-M000052
 すなわち、いずれの場合も、DataTerm(データ項:data term)と、SmoothTerm(平滑化項:smooth term、または、regularization term)の2つの項の和を最小とするような生起率λNR(t,x,y,n)またはヒストグラムHNR(t,x,y,n)を求めることである。
 生起率のノイズ除去(式51)の場合、データ項であるDataTermλは、観測値であるH(t,x,y,n)から式41によって得られる値λ(t,x,y,n)と、なるべくλNR(t,x,y,n)とが同じ値になるように作用する項である。そして、平滑化項であるSmoothTermλは、近傍同士のλNR(t,x,y,n)は似たような値になるように作用する項である。
 ヒストグラムのノイズ除去(式52)の場合、データ項であるDataTermHは、観測値であるH(t,x,y,n)と、なるべくHNR(t,x,y,n)が同じ値になるように作用する項である。そして、平滑化項であるSmoothTermHは、近傍同士のHNR(t,x,y,n)は似たような値になるように作用する項である。
 ここで、補足すると、SPADによる測距においては、ヒストグラムのピーク検出が、一般的に行われている。しかし、前述の説明から分かるように、ヒストグラムと式41に示すような比例関係にある生起率についてピーク検出を行っても、ヒストグラムのピーク検出と同じ結果を得ることができる。したがって、ノイズ除去された生起率λNR(t,x,y,n)において、ビンnに関してサーチして、ピーク検出を行えばよい。ここで、n=0乃至N-1である。この場合、ノイズ除去された生起率λNR(t,x,y,n)から上述の式44を用いて、ノイズ除去されたヒストグラムHNR(t,x,y,n)を求める必要はない。
 [第1の実施例]
 この第1の実施例では、距離測定装置10を使って、SPADアレイ13の各SPADにおける測距を行う。特に、「累積部15の観測値であるヒストグラム」から、上述の式41により得られる生起率のノイズ除去を図っている点に特徴がある。生起率のノイズ除去は、演算部16において行われる。
 この第1の実施例においては、式51によって示されるノイズ除去された生起率λNR(t,x,y,n)を求めている。ここで、DataTermλは、以下の式53によって示される。
Figure JPOXMLDOC01-appb-M000053
また、SmoothTermλは、以下の式54によって示される。
Figure JPOXMLDOC01-appb-M000054
 式53において、λ(t,x,y,n)は、観測値であるH(t,x,y,n)から式41で計算される値である。また、σ(t,x,y,n)は、式43によって計算される値である。最終的に求めたいλNR(t,x,y,n)が、観測値であるλ(t,x,y,n)に近い値になればなるほど、式53の値は小さくなる。式53において、σ(t,x,y,n)で割っているのは、観測値であるλ(t,x,y,n)の確度に依存させるためである。すなわち、観測値であるλ(t,x,y,n)が不確かな(標準偏差σ(t,x,y,n)が大きい)ときは、λNR(t,x,y,n)は、それほどλ(t,x,y,n)に近づける必要はない。一方、観測値であるλ(t,x,y,n)の確度が高い(標準偏差σ(t,x,y,n)が小さい)ときは、λ(t,x,y,n)の値は信じられるため、λNR(t,x,y,n)をλ(t,x,y,n)に近づけるとよい。これを反映させるために、式53では、σ(t,x,y,n)で割っている。
 式54の右辺の第1項は、最終的に求めたいλNR(t,x,y,n)は時間方向に対してなめらかであることを示している。すなわち、λNR(t,x,y,n)を時間tで偏微分した値が小さくなればなるほど、式54の値は小さくなる。ここで、αtは、時間方向のなめらかさの寄与率であり、0以上の所望の定数である。なお、αt=0のときは、時間方向のなめらかさは考慮しない場合となる。
 式54の右辺の第2項は、最終的に求めたいλNR(t,x,y,n)は、空間(x,y)方向に対してなめらかであることを示している。すなわち、λNR(t,x,y,n)を空間(x,y)で偏微分した値が小さくなればなるほど、式54の値は小さくなる。ここで、αxyは、空間(x,y)方向のなめらかさの寄与率であり、0以上の所望の定数である。なお、αxy=0のときは、空間(x,y)方向のなめらかさは考慮しない場合となる。
 式54の右辺の第3項は、最終的に求めたいλNR(t,x,y,n)は、ビン方向に対してなめらかであることを示している。すなわち、λNR(t,x,y,n)をビンnで偏微分した値が小さくなればなるほど、式54の値は小さくなる。ここで、αnは、ビン方向のなめらかさの寄与率であり、0以上の所望の定数である。なお、αn=0のときは、ビン方向のなめらかさは考慮しない場合となる。
 図42は、本技術の第4の実施の形態の第1の実施例における生起率のノイズ除去の処理手順の一例を示す流れ図である。この処理により、生起率のノイズ除去が行われる。
 まず、ステップS411において、累積部15から得られた各ヒストグラムH(t,x,y,n)を入力する。そして、ステップS412に進む。
 ステップS412において、各H(t,x,y,n)に対して、式41を計算して、λ(t,x,y,n)を求める。そして、式43を計算して、σ(t,x,y,n)を求める。そして、ステップS413に進む。
 ステップS413において、式51を解き、 λNR(t,x,y,n)を求める。ただし、式51におけるDataTermλとSmoothTermλは、それぞれ、式53と式54である。そして、ステップS414に進む。
 ステップS414において、λNR(t,x,y,n)を、ノイズ除去された生起率として出力する。そして、一連の処理を終了する。
 同図に示す処理を実行することにより、SPADアレイ13の各時刻t、各位置(x,y)、各ビンnにおける生起率のノイズ除去が行われる。この後、演算部16によって、このノイズ除去された生起率に対してピークを検出する。そして、ピークに対応するビンに対して、c×D/2倍した値を、距離として、出力端子17より出力する。なお、ビンnは、およそn×Dという時間に対応しているので、c×D/2倍により距離が算出できる。ここで、ピーク検出は既知の手法により行われる。または、ノイズ除去された生起率に対して、上述の式44によりヒストグラムHNR(t,x,y,n)を計算し、このヒストグラムHNR(t,x,y,n)においてピーク検出を行ってもよい。
 なお、ビン方向のなめらかさを考慮しない場合は、SmoothTermλとして、式54に代えて、以下の式55を用いてもよい。すなわち、DataTermλとSmoothTermλは、それぞれ、式53と式55であるとして、式51を解いてもよい。
Figure JPOXMLDOC01-appb-M000055
ここで、αxおよびαyは、それぞれ、x方向、および、y方向のなめらかさの寄与率であり、0以上の所望の定数である。
 [第2の実施例]
 上述の第1の実施例では生起率のノイズ除去を行っていたが、第2の実施例ではヒストグラムのノイズ除去を行う。すなわち、この第2の実施例では、距離測定装置10を使って、SPADアレイ13の各SPADにおける測距を行う。特に、「累積部15の観測値であるヒストグラム」のノイズ除去を図っている点に特徴がある。ヒストグラムのノイズ除去は、演算部16によって行われる。
 この第2の実施例においては、上述の式52によって示されるノイズ除去されたヒストグラムHNR(t,x,y,n)を求めている。この場合、DataTermHは、以下の式56によって示される。
Figure JPOXMLDOC01-appb-M000056
また、SmoothTermHは、以下の式57によって示される。
Figure JPOXMLDOC01-appb-M000057
 なお、式56の説明は、式53におけるλをHと置き換えれば同じ説明になるため、詳細な説明は省略する。
 また、式57の説明は、式54におけるλをHと置き換えれば同じ説明になるため、詳細な説明は省略する。なお、αt、αxy、および、αnは、0以上の所望の定数である。
 図43は、本技術の第4の実施の形態の第2の実施例におけるヒストグラムのノイズ除去の処理手順の一例を示す流れ図である。この処理により、ヒストグラムのノイズ除去が行われる。
 まず、ステップS421において、累積部15から得られた各ヒストグラムH(t,x,y,n)を入力する。そして、ステップS422に進む。
 ステップS422において、各H(t,x,y,n)に対して、式45を計算して、σH(t,x,y,n)を求める。そして、ステップS423に進む。
 ステップS423において、式52を解いて、 HNR(t,x,y,n)を求める。ただし、式52におけるDataTermHとSmoothTermHは、それぞれ、式56と式57である。そして、ステップS424に進む。
 ステップS424において、HNR(t,x,y,n)を、ノイズ除去されたヒストグラムとして出力する。そして、一連の処理を終了する。
 同図に示す処理を実行することにより、SPADアレイ13の各時刻t、各位置(x,y)、各ビンnにおけるヒストグラムのノイズ除去が行われる。この後、演算部16によって、このノイズ除去されたヒストグラムに対してピークを検出する。そして、ピークに対応するビンに対して、c×D/2倍した値を、距離として、出力端子17より出力する。ここで、ピーク検出は既知の手法により行われる。
 なお、ビン方向のなめらかさを考慮しない場合は、SmoothTermHとして、式57に代えて、以下の式58を用いてもよい。すなわち、DataTermHとSmoothTermHは、それぞれ、式56と式58であるとして、式52を解いてもよい。
Figure JPOXMLDOC01-appb-M000058
ここで、αxおよびαyは、それぞれ、x方向、および、y方向のなめらかさの寄与率であり、0以上の所望の定数である。
 [第3の実施例]
 以下の第3乃至第6の実施例においては、距離測定装置10に併設したカメラ100を使用する。ここで、カメラ100とは画像を撮影することができる装置であり、距離測定装置10のSPADアレイ13が測定する方向と同じ方向を撮影する。
 SPADアレイ13の各時刻tの各位置(x,y)のSPADが測定している物体に対応するカメラ100の画像内の画素値(輝度値)をI(t,x,y)とする。なお、装置10とカメラ100が近接して設置されている場合は、画素値I(t,x,y)は、カメラ100において、時刻tで、位置(x,y)のSPADが撮影している方向と同じ方向を撮影した画素の値である。
 時空間において、(t1,x1,y1)と(t2,x2,y2)が隣接しているものとする。
 I(t1,x1,y1)とI(t2,x2,y2)が、ほぼ同じ値(画素値)であれば、(t1,x1,y1)のSPADが測定している物体と、(t2,x2,y2)のSPADが測定している物体は同じものであると考えられる。したがって、(t1,x1,y1)と(t2,x2,y2)に対応する真のヒストグラムまたは真の生起率は、同じ形状であると考えられる。この場合、これら2つのヒストグラムまたは生起率は、なるべく同じになるように、平滑化項SmoothTermHまたはSmoothTermλを作用させるとよい。
 一方、I(t1,x1,y1)とI(t2,x2,y2)が、まったく異なる値(画素値)であれば、(t1,x1,y1)のSPADが測定している物体と、(t2,x2,y2)のSPADが測定している物体は違うものであると考えられる。したがって、(t1,x1,y1)と(t2,x2,y2)に対応する真のヒストグラムまたは真の生起率は、違う形状であると考えられる。これら形状の違う2つのヒストグラムまたは生起率の間で、なめらかにすることは、かえって真の値から遠ざけることになる。そこで、これら2つについては、平滑化項SmoothTermHまたはSmoothTermλにおいて、なめらかにする作用を小さくするとよい。
 以上の説明は、上述のように、第3乃至第6の実施例について共通のものである。
 第3の実施例では、距離測定装置10を使って、SPADアレイ13の各SPADにおける測距を行う。特に、「累積部15の観測値であるヒストグラム」から、上述の式41によって得られる生起率のノイズ除去を図っている点に特徴がある。生起率のノイズ除去は、演算部16によって行われる。この第3の実施例は、「時間方向を加味したノイズ除去」は行っていない例であり、t=1のみであるとする。
 この第3の実施例においては、式51によって示されるノイズ除去された生起率λNR(t,x,y,n)を求めている。ここで、DataTermλは、上述の式53によって示される。また、SmoothTermλは、以下の式59によって示される。
Figure JPOXMLDOC01-appb-M000059
なお、ベクトルs(t,x,y)は、上述の式48により定義されている。また、式59中に現れるeacross(t,x,y)、ealong(t,x,y)、μacross(t,x,y)、および、μalong(t,x,y)、は、以下の式60乃至式63によって定義される。
Figure JPOXMLDOC01-appb-M000060
Figure JPOXMLDOC01-appb-M000061
Figure JPOXMLDOC01-appb-M000062
Figure JPOXMLDOC01-appb-M000063
ここで、ηは、所望の微小な値(定数)であり、μacross(t,x,y)≦μalong(t,x,y)である。また、式60によって定義されたeacross(t,x,y)は、画像のエッジ方向に対して垂直な(エッジを横切る)単位方向ベクトルである。式61によって定義されたealong(t,x,y)は、画像のエッジ方向に沿った単位方向ベクトルである。
 なお、I(t,x,y)のxまたはyについての偏微分の値が0の時は、式59においてゼロ割りが発生する。そこで、現実的にはゼロ割り回避のため、I(t,x,y)のxまたはyについての偏微分の値が0の時は、微小な値に置き換える必要がある。これは、既知の常套手段であり、この実施の形態の趣旨とは関係ないため、式59ではこれについて触れていない。
 この第3の実施例において使用される式53の説明は、すでに第1の実施例において説明したため、詳細な説明は省略する。
 式59の右辺の第1項について説明する。最終的に求めたいλNR(t,x,y,n)のx方向の微分値(差分値)と、対応する画像の画素値I(t,x,y)のx方向の微分値(差分値)との比が、s(t,x,y,n)と等しくなるように作用する項である。さらに、最終的に求めたいλNR(t,x,y,n)のy方向の微分値(差分値)と、対応する画像の画素値I(t,x,y)のy方向の微分値(差分値)との比も、s(t,x,y,n)と等しくなるように作用する項である。すなわち、λNR(t,x,y,n)の微分値とI(t,x,y)の微分値は線形な関係であり、その比が、なるべくs(t,x,y,n)となるように作用する項である。ここで、nは0乃至N-1である。なお、αxyは、空間(x,y)方向のλNR(t,x,y,n)の微分値とI(t,x,y)の微分値の線形性についての寄与率であり、0以上の所望の定数である。
 式59の右辺の第2項について説明する。
 画像のエッジを横切る方向に対しては、λNR(t,x,y,n)の変化量とI(t,x,y)の変化量には相関がない。なぜなら、エッジがあるということは、物体の境界であり、そのエッジの両側では、まったく違う物体(すなわち、まったく違う距離、まったく違う輝度値)となるからである。そこで、この方向に関するs(t,x,y,n)の変化量は大きくても許容する。「この方向についてのs(t,x,y,n)の微分値」にμacross(t,x,y)という小さな値をかけることにより、SmoothTermλへの寄与を小さくしている。
 画像のエッジに沿った方向に対しては、λNR(t,x,y,n)の変化量とI(t,x,y)の変化量には相関がある。なぜなら、エッジに沿った方向では、同じ物体(すなわち、同じ距離、同じ輝度値)となるからである。そこで、この方向に関するs(t,x,y,n)の変化量は小さくなるようにする。「この方向についてのs(t,x,y,n)の微分値」にμalong(t,x,y)という大きな値をかけることにより、SmoothTermλへの寄与を大きくしている。
 すなわち、式59の右辺の第2項は、エッジを横切る方向/沿った方向に関するs(t,x,y,n)の変化の許容に関して作用する項である。なお、αedgeは、エッジにおけるs(t,x,y,n)の変化の許容に関する寄与率であり、0以上の所望の定数である。
 図44は、本技術の第4の実施の形態の第3の実施例における生起率のノイズ除去の処理手順の一例を示す流れ図である。この処理により、生起率のノイズ除去が行われる。
 まず、ステップS431において、累積部15から得られた各ヒストグラムH(t,x,y,n)を入力する。各時刻tの各位置(x,y)のSPADが測定している物体に対応するカメラ100の画像内の画素値(輝度値)I(t,x,y)を入力する。そして、ステップS432に進む。
 ステップS432において、各H(t,x,y,n)に対して、式41を計算して、λ(t,x,y,n)を求める。そして、式43を計算して、σ(t,x,y,n)を求める。そして、ステップS433に進む。
 ステップS433において、式51を解いて、λNR(t,x,y,n)を求める。ただし、式51におけるDataTermλとSmoothTermλは、それぞれ、式53と式59である。ここで、s(t,x,y,n)は任意のスカラー量である。すなわち、式53と式59を加算した値が、最小となるような、λNR(t,x,y,n)とs(t,x,y,n)の組を求めて、そのうち、λNR(t,x,y,n)だけを計算結果とする。また、t=1である。そして、ステップS434に進む。
 ステップS434において、λNR(t,x,y,n)を、ノイズ除去された生起率として出力する。そして、一連の処理を終了する。
 同図に示す処理を実行することにより、SPADアレイ13の各時刻t、各位置(x,y)、各ビンnにおける生起率のノイズ除去が行われる。この後、演算部16にて、このノイズ除去された生起率に対してピークを検出する。そして、ピークに対応するビンに対して、c×D/2倍した値を、距離として、出力端子17より出力する。ここで、ピーク検出は既知の手法により行われる。または、ノイズ除去された生起率に対して、上述の式44によりヒストグラムHNR(t,x,y,n)を計算し、このヒストグラムHNR(t,x,y,n)においてピーク検出を行ってもよい。
 [第4の実施例]
 上述の第3の実施例では生起率のノイズ除去を行っていたが、第4の実施例ではヒストグラムのノイズ除去を行う。すなわち、この第4の実施例では、距離測定装置10を使って、SPADアレイ13の各SPADにおける測距を行う。特に、「累積部15の観測値であるヒストグラム」のノイズ除去を図っている点に特徴がある。ヒストグラムのノイズ除去は、演算部16によって行われる。この第4の実施例は、「時間方向を加味したノイズ除去」は行っていない例であり、t=1のみであるとする。
 この第4の実施例においては、式52によって示されるノイズ除去されたヒストグラムHNR(t,x,y,n)を求めている。ここで、DataTermHは、上述の式56によって示される。また、SmoothTermHは、以下の式64によって示される。
Figure JPOXMLDOC01-appb-M000064
なお、ベクトルs(t,x,y)は、上述の式48により定義されている。また、式64中に現れるeacross(t,x,y)、ealong(t,x,y)、μacross(t,x,y)、および、μalong(t,x,y)、は、それぞれ、上述の式60乃至式63によって定義される。
 なお、I(t,x,y)のxまたはyについての偏微分の値が0の時は、上述の式59においてゼロ割りが発生する。そこで、現実的にはゼロ割り回避のため、I(t,x,y)のxまたはyについての偏微分の値が0の時は、微小な値に置き換える必要がある。これは、既知の常套手段であり、この実施の形態の趣旨とは関係ないため、上述の式64ではこれについて触れていない。
 この第4の実施例において使用される式56の説明は、すでに第2の実施例において説明したため、詳細な説明は省略する。
 式64の説明は、式59におけるλをHと置き換えれば同じ説明になるため、詳細な説明は省略する。なお、αxy、および、αedgeは、0以上の所望の定数である。
 図45は、本技術の第4の実施の形態の第4の実施例におけるヒストグラムのノイズ除去の処理手順の一例を示す流れ図である。この処理により、ヒストグラムのノイズ除去が行われる。
 まず、ステップS441において、累積部15から得られた各ヒストグラムH(t,x,y,n)を入力する。各時刻tの各位置(x,y)のSPADが測定している物体に対応するカメラ100の画像内の画素値(輝度値)I(t,x,y)を入力する。そして、ステップS442に進む。
 ステップS442において、各H(t,x,y,n)に対して、式45を計算して、σH(t,x,y,n)を求める。そして、ステップS443に進む。
 ステップS443において、式52を解いて、 HNR(t,x,y,n)を求める。ただし、式52におけるDataTermHとSmoothTermHは、それぞれ、式56と式64である。ここで、s(t,x,y,n)は任意のスカラー量である。すなわち、式56と式64を加算した値が最小となるような、HNR(t,x,y,n)とs(t,x,y,n)の組を求めて、そのうち、HNR(t,x,y,n)だけを計算結果とする。また、t=1である。そして、ステップS444に進む。
 ステップS444において、HNR(t,x,y,n)を、ノイズ除去されたヒストグラムとして出力する。そして、一連の処理を終了する。
 同図に示す処理を実行することにより、SPADアレイ13の各時刻t、各位置(x,y)、各ビンnにおけるヒストグラムのノイズ除去が行われる。この後、演算部16によって、このノイズ除去されたヒストグラムに対してピークを検出する。そして、ピークに対応するビンに対して、c×D/2倍した値を、距離として、出力端子17より出力する。ここで、ピーク検出は既知の手法により行われる。
 [第5の実施例]
 第5の実施例では、距離測定装置10を使って、SPADアレイ13の各SPADにおける測距を行う。特に、「累積部15の観測値であるヒストグラム」から、上述の式41により得られる生起率のノイズ除去を図っている点に特徴がある。生起率のノイズ除去は、演算部16によって行われる。
 この第5の実施例においては、式51によって示されるノイズ除去された生起率λNR(t,x,y,n)を求めている。ここで、DataTermλは、上述の式53によって示される。また、SmoothTermλは、以下の式65によって示される。
Figure JPOXMLDOC01-appb-M000065
なお、ベクトルa(t,x,y)およびベクトルb(t,x,y)は、上述の式48により定義されている。また、dT、dX、および、dYは、それぞれ、0以上の所望の定数である。
 この第5の実施例において使用される式53の説明は、すでに第1の実施例において説明したため、詳細な説明は省略する。
 式65の右辺の第1項について説明する。時空間において(t,x,y)を中心とする(2×dT+1,2×dX+1,2×dY+1)の大きさのブロックを考える。たとえば、dT=dX=dY=2である。このローカルなブロック内では、最終的に求めたいλNR(t,x,y,n)と、対応する画像の画素値I(t,x,y)の間には、線形な関係があると考えてよい。なぜなら、ローカルなブロック内では、時空間の各位置における「λNR(t,x,y,n)とI(t,x,y)の組」には相関があるからである。そこで、この線形における1次の係数をa(t,x,y,n)、0次の係数をb(t,x,y,n)とする。式65の右辺の第1項は、この線形性の関係がなるべく成立するように作用する項である。ここで、nは0乃至N-1である。なお、α1は、この線形性の関係の成立具合についての寄与率であり、0以上の所望の定数である。
 式65の右辺の第2項について説明する。時空間において(t,x,y)を中心とする(2×dT+1,2×dX+1,2×dY+1)の大きさのブロック内におけるI(t,x,y)の値に変化が少ないと、a(t,x,y,n)は不安定になる。なぜなら、任意の値a'に対して、以下の式66を満たすようにb'をセットすれば、以下の式67が成立するからである。
Figure JPOXMLDOC01-appb-M000066
Figure JPOXMLDOC01-appb-M000067
ここで、I(t,x,y)の値として、常に一定のIconstとしている。
 そこで、不安定性を解除するための項が、式65の右辺の第2項である。第1項だけではa(t,x,y,n)が不安定であった場合でも、この第2項により、a(t,x,y,n)の値が小さい値を選択するように作用させることができ、a(t,x,y,n)を確定させることができる。ここで、nは0乃至N-1である。なお、α2は、この不安定性解除についての寄与率であり、0以上の所望の定数である。
 図46は、本技術の第4の実施の形態の第5の実施例における生起率のノイズ除去の処理手順の一例を示す流れ図である。この処理により、生起率のノイズ除去が行われる。
 まず、ステップS451において、累積部15から得られた各ヒストグラムH(t,x,y,n)を入力する。各時刻tの各位置(x,y)のSPADが測定している物体に対応するカメラ100の画像内の画素値(輝度値)I(t,x,y)を入力する。そして、ステップS452に進む。
 ステップS452において、各H(t,x,y,n)に対して、式41を計算して、λ(t,x,y,n)を求める。そして、式43を計算して、σ(t,x,y,n)を求める。そして、ステップS453に進む。
 ステップS453において、式51を解いて、 λNR(t,x,y,n)を求める。ただし、式51におけるDataTermλとSmoothTermλは、それぞれ、式53と式65である。ここで、a(t,x,y,n)とb(t,x,y,n)は任意のスカラー量である。すなわち、式53と式65を加算した値が最小となるような、λNR(t,x,y,n)とa(t,x,y,n)とb(t,x,y,n)の組を求めて、そのうち、λNR(t,x,y,n)だけを計算結果とする。そして、ステップS454に進む。
 ステップS454において、λNR(t,x,y,n)を、ノイズ除去された生起率として出力する。そして、一連の処理を終了する。
 同図に示す処理を実行することにより、SPADアレイ13の各時刻t、各位置(x,y)、各ビンnにおける生起率のノイズ除去が行われる。この後、演算部16によって、このノイズ除去された生起率に対してピークを検出する。そして、ピークに対応するビンに対して、c×D/2倍した値を、距離として、出力端子17より出力する。ここで、ピーク検出は既知の手法により行われる。または、ノイズ除去された生起率に対して、上述の式44によりヒストグラムHNR(t,x,y,n)を計算し、このヒストグラムHNR(t,x,y,n)においてピーク検出を行ってもよい。
 [第6の実施例]
 上述の第5の実施例では、生起率のノイズ除去を行っていたが、第6の実施例では、ヒストグラムのノイズ除去を行う。すなわち、この第6の実施例では、距離測定装置10を使って、SPADアレイ13の各SPADにおける測距を行う。特に、「累積部15の観測値であるヒストグラム」のノイズ除去を図っている点に特徴がある。ヒストグラムのノイズ除去は、演算部16によって行われる。
 この第6の実施例においては、式52によって示されるノイズ除去されたヒストグラムHNR(t,x,y,n)を求めている。ここで、DataTermHは、上述の式56によって示される。また、SmoothTermHは、以下の式68によって示される。
Figure JPOXMLDOC01-appb-M000068
なお、ベクトルa(t,x,y)およびベクトルb(t,x,y)は、上述の式48により定義されている。また、dT、dX、および、dYは、それぞれ、0以上の所望の定数である。
 この第6の実施例において使用される式56の説明は、すでに第2の実施例において説明したため、詳細な説明は省略する。
 式68の説明は、式65におけるλをHと置き換えれば同じ説明になるため、詳細な説明は省略する。なお、α1、および、α2は、0以上の所望の定数である。
 図47は、本技術の第4の実施の形態の第6の実施例におけるヒストグラムのノイズ除去の処理手順の一例を示す流れ図である。この処理により、ヒストグラムのノイズ除去が行われる。
 まず、ステップS461において、累積部15から得られた各ヒストグラムH(t,x,y,n)を入力する。各時刻tの各位置(x,y)のSPADが測定している物体に対応するカメラ100の画像内の画素値(輝度値)I(t,x,y)を入力する。そして、ステップS462に進む。
 ステップS462において、各H(t,x,y,n)に対して、式45を計算して、σH(t,x,y,n)を求める。そして、ステップS463に進む。
 ステップS463において、式52を解き、 HNR(t,x,y,n)を求める。ただし、式52におけるDataTermHとSmoothTermHは、それぞれ、式56と式68である。ここで、a(t,x,y,n)とb(t,x,y,n)は任意のスカラー量である。すなわち、式56と式68を加算した値が最小となるような、HNR(t,x,y,n)とa(t,x,y,n)とb(t,x,y,n)の組を求めて、そのうち、HNR(t,x,y,n)だけを計算結果とする。そして、ステップS464に進む。
 ステップS464において、HNR(t,x,y,n)を、ノイズ除去されたヒストグラムとして出力する。そして、一連の処理を終了する。
 同図に示す処理を実行することにより、SPADアレイ13の各時刻t、各位置(x,y)、各ビンnにおけるヒストグラムのノイズ除去が行われる。この後、演算部16によって、このノイズ除去されたヒストグラムに対してピークを検出する。そして、ピークに対応するビンに対して、c×D/2倍した値を、距離として、出力端子17より出力する。ここで、ピーク検出は既知の手法により行われる。
 [効果]
 この第4の実施の形態では、ヒストグラムまたは生起率のノイズ除去を行う際に、2つの方針を加味して補正を行う。すなわち、第1の方針は、観測値になるべく合致するようにヒストグラムまたは生起率の補正を行う、という方針である。また、第2の方針は、近傍同士のヒストグラムまたは生起率については変化が小さくなるように補正を行う、という方針である。第2の方針については、さらに、併設するカメラから得られる画像との相関を利用して、時空間の各位置(t,x,y)に依存して、隣接間の変化の許容量を操作してもよい。
 これにより、この第4の実施の形態では、あらかじめ位置関係を想定しなくても、少ない演算量により、ヒストグラムまたは生起率のノイズ除去を行うことができる。
 [要点]
 第4の実施の形態は、以下の点を要点とする。
(1)ヒストグラム、または、ヒストグラムから得られる生起率のノイズ除去方法において、
 時空間の各位置に存在する第1のヒストグラムまたは第1の生起率を入力する入力ステップと、
 上記第1のヒストグラムまたは上記第1のヒストグラムから、ノイズ除去を行い、第2のヒストグラムまたは第2の生起率を計算するノイズ除去計算ステップと、
 上記第2のヒストグラムまたは上記第2の生起率を出力する出力ステップと
を有し、
 上記ノイズ除去計算ステップでは、
 上記第2のヒストグラムまたは上記第2の生起率が、上記第1のヒストグラムまたは上記第1の生起率と等しくなるように作用させる第1の作用素、および、時空間における近傍同士の上記第2のヒストグラムまたは上記第2の生起率が特定の関係になるように作用させる第2の作用素の上記2つの作用素の合計が極値となるように、上記第2のヒストグラムまたは上記第2の生起率を決定する処理を行う
ことを特徴とするヒストグラム、または、ヒストグラムから得られる生起率のノイズ除去方法。
(2)上記(1)におけるヒストグラム、または、ヒストグラムから得られる生起率のノイズ除去方法において、
 上記第2の作用素は、時空間における近傍同士の上記第2のヒストグラムまたは上記第2の生起率の差が小さくなるように作用させる作用素である
ことを特徴とするヒストグラム、または、ヒストグラムから得られる生起率のノイズ除去方法。
(3)上記(1)におけるヒストグラム、または、ヒストグラムから得られる生起率のノイズ除去方法において、
 画像を入力する画像入力ステップをさらに有し、
 上記第2の作用素は、時空間における上記第2のヒストグラムまたは上記第2の生起率が、上記画像と相関があるように作用させる作用素である
ことを特徴とするヒストグラム、または、ヒストグラムから得られる生起率のノイズ除去方法。
(4)上記(3)におけるヒストグラム、または、ヒストグラムから得られる生起率のノイズ除去方法において、
 上記第2の作用素は、上記画像内のエッジに沿った方向では、「上記画像の画素値の変化」と「上記第2のヒストグラムまたは上記第2の生起率の変化」の割合が一定になるように作用させる作用素である
ことを特徴とするヒストグラム、または、ヒストグラムから得られる生起率のノイズ除去方法。
(5)上記(3)におけるヒストグラム、または、ヒストグラムから得られる生起率のノイズ除去方法において、
 上記第2の作用素は、時空間内のローカル領域ごとに、上記画像と「上記第2のヒストグラムまたは上記第2の生起率」とは、線形な関係になるように作用させる作用素である
ことを特徴とするヒストグラム、または、ヒストグラムから得られる生起率のノイズ除去方法。
 <6.第5の実施の形態>
 [概要]
 上述のように、ヒストグラム上でピークを検出し、そのピークに対応する時間を求めることにより、対象物までの距離を求めることができる。従来は、このピーク検出に、人為的なしきい値で判断していた。この第5の実施の形態においては、このピーク検出を理論的に正しい判断で行うものである。
 なお、「そのビンに対応する時間(D)内においてフォトンが飛来する確率」は、生起率に、時間Dを乗算した値であるところ、他の実施の形態においては、定数倍(D倍)は無視して考えていた。しかし、この第5の実施の形態においては、生起率の定義として、一般的に広く使われている用語「生起率」に対してD倍した値であると考えてもよい。
 上述のように、式8が、この実施の形態における理論から導いた最終式(各ビンnの頻度h(n)が観測された時の生起率p(n)の確率密度関数)である。したがって、各ビンnの頻度h(n)が観測された時に、各ビンnの生起率がp(n)であるとした時の誤差の二乗を、分散で割った値の合計値は、以下の式69となる。
Figure JPOXMLDOC01-appb-M000069
この式69の値が小さければ小さいほど、各ビンnの生起率がp(n)である可能性が高いということである。ここで、nは0乃至N-1である。
 図48は、本技術の第5の実施の形態における距離測定の第1の例の様子を示す図である。
 ここで、SPADセンサ13が、異なる距離にある物体(壁面501と壁面502)を同時に測距している場合を考える。SPADセンサ13は、1つの方向を測距するわけではなく、現実的には、ある程度の立体角をもった方向(図中の測距範囲)の全体を測距している。同図は、その測距範囲内に、壁面501と壁面502が存在している様子を示している。壁面501および壁面502は、それぞれ、距離Z(1)、Z(2)に存在するものとする。
 図49は、本技術の第5の実施の形態における距離測定の第1の例における強度分布を示す図である。
 同図におけるAに示すように、発光部12から発光されたものとする。時間とともに強度は変化するため、この強度をfunc(t)とする。発光部12からの発光の強度を事前に測定しておくことにより、このfunc(t)は既知となる。
 SPADセンサ13は、壁面501における反射を経て、発光部12からの発光を受光する。この場合、同図におけるBに示すように、同図におけるAに対して、時間的に2×Z(1)÷cだけずれた強度分布となる。ただし、減衰されるため、同図におけるAの強度に対して、a(1)倍された波形となる。ここで、a(1)は、1未満であり、Z(1)および壁面501の反射率に依存する。
SPADセンサ13は、壁面502における反射を経て、発光部12からの発光を受光する。この場合、同図におけるCに示すように、同図におけるAに対して、時間的に2×Z(2)÷cだけずれた強度分布となる。ただし、減衰されるため、同図におけるAの強度に対して、a(2)倍された波形となる。ここで、a(2)は、1未満であり、Z(2)および壁面502の反射率に依存する。
 また、SPADセンサ13は、環境光を受光する。環境光は、同図におけるDに示すように、時間によらず一定であり、これをbとする。
 したがって、この第1の例の状況においては、SPADセンサ13における受光の強度は、以下の式70となる。
Figure JPOXMLDOC01-appb-M000070
 上述の第1の例では、2つの物体を想定していたが、これをさらに一般化して、SPADセンサ13がK個の異なる距離にある物体を同時に測距している場合を考える。この場合、受光の強度は、以下の式71となる。
Figure JPOXMLDOC01-appb-M000071
ただし、k番目の物体の距離をZ(k)、その物体に対する減衰率をa(k)とした。ここで、k=1乃至Kである。
 したがって、各ビンnの生起率p(n)は、以下の式72となる。
Figure JPOXMLDOC01-appb-M000072
なお、func(t)は、上述のとおり既知とする。
 以上をまとめると、SPADセンサ13がK個の異なる距離にある物体を同時に測距している場合、p(n)が式72によって表現されるものとして、式69を最小とするb、a(k)、Z(k)を求めればよい。求められた値が、各ビンnの頻度h(n)が観測された時の最も確からしい値である。つまり、求められたbが、環境光の強度(輝度値)である。a(k)が、アクティブ光によりk番目の対象物が照らし出されたときの強度(輝度値)である。Z(k)が、k番目の対象物までの距離である。ここで、k=1乃至Kである。
 次に、上述のKの値について議論する。
 上述の式72は、p(n)をnの関数として表現した式である。実際に、SPADセンサ13がK0個の異なる距離にある物体を同時に測距しているのであれば、「K=K0とした式72」により、真の生起率を表現できる。K1<K0であれば、「K=K1とした式72」では、真の生起率を表現できない。なぜなら、K0=2の場合(図48)であれば光強度は式70によって表現されると説明したことの類推から、K0=2以外の場合についても明らかである。
 逆に、K0<K2となるK2について考える。少なくとも、K0<k≦K2である全てのkについてa(k)=0とすれば、冗長ではあるが「K=K2とした式72」により、真の生起率を表現できる。
 上述の式12について上で説明したことは、「式69の最小化」についても言える。式69を最小化するということは、n=0乃至N-1の全てのnについて、p(n)を「観測値であるh(n)/M(n-1)」に近づけることである。Kの値が大きければ大きいほど、nの関数であるp(n)の自由度は大きくなる。したがって、Kの値が大きければ大きいほど、「式69の最小値」を小さくするこが可能である。つまり、K3<K4であれば、「K=K4の時の式69の最小値」は、「K=K3の時の式69の最小値」以下にできる。実際、K3<k≦K4である全てのkについて、a(k)=0とすれば、「K=K4の時の式69の最小値」は、「K=K3の時の式69の最小値」と同じ値にできる。
 SPADセンサ13がK0個の異なる距離にある物体を同時に測距している場合、式72によって真の生起率が表現できるため、「K=K0の時の式69の最小値」は、かなり小さな値となる。また、K0<K2であれば、式72によって真の生起率が、冗長ではあるが、表現できるため、「K=K2の時の式69の最小値」も、かなり小さな値となる。また、K1<K0であれば、式72で真の生起率が表現できないため、「K=K1の時の式69の最小値」は、大きな値となる。
 このことから、SPADセンサ13の測距範囲にある「距離の異なる物体の数」は、以下の手順により知ることができる。すなわち、Kの値を大きい値から1ずつデクリメントしていきながら「式69の最小値」をチェックする。「式69の最小値」が急激に大きな値になる直前のKの値が「異なる距離にある物体の数」である。
 [第1の実施例]
 図50は、本技術の第5の実施の形態の第1の実施例における距離測定処理の処理手順の一例を示す流れ図である。この処理は、演算部16によって行われ、結果は出力端子17より出力される。
 まず、ステップS511において、ヒストグラム作成のために行った測定の回数Mを入力する。そして、ヒストグラムデータを入力する。すなわち、各時刻(n=0乃至N-1)の頻度h(n)を入力する。そして、ステップS512に進む。
 ステップS512において、K=0乃至Kmaxの各Kについて、以下の式73を解く。
Figure JPOXMLDOC01-appb-M000073
各Kについて、求められた解であるbをbKとする。a(k)をaK(k)とする。Z(k)をZK(k)とする。ただし、k=1乃至Kである。ここで、Kmaxは、所望の定数である。SPADセンサ13の測距範囲にある「距離の異なる物体の数」として想定される最大の数をKmaxとすればよい。そして、ステップS513に進む。
 ステップS513において、K=0乃至Kmaxの各Kについて、bにbKを、a(k)にaK(k)を、Z(k)にZK(k)を代入して、式69の値を求める。各Kについて、式69を計算した値をError(K)とする。ただし、k=1乃至Kである。ここで、式69中のp(n)は、式73中に示されている関数である。そして、ステップS514に進む。
 ステップS514において、K=Kmax-1から順番にK=1まで1ずつデクリメントしていきながら、(Error(K-1)-Error(K))-(Error(K)-Error(K+1))という値をチェックする。この値が、はじめて閾値Th0以上となるKを求める。この時のKをKoptとする。K=1まで到達しても閾値Th0以上となるKがなかった場合のみ、「測距不能」として強制終了する。ここで、Th0は、所望の定数である。そして、ステップS515に進む。
 ステップS515において、環境光によりKopt個の対象物が照らし出されたときの輝度値としてbKoptを出力端子17より出力する。Kopt個の対象物のうちk番目の対象物までの距離として、ZKopt(k)を出力し、かつ、アクティブ光によりk番目の対象物が照らし出されたときの輝度値として、aKopt(k)を出力する。ただし、k=1乃至Koptである。そして、一連の処理を終了する。
 このように第1の実施例においては、観測値h(n)から得られる最も確からしい結果を得ることができる。
 [第2の実施例]
 第2の実施例は、マルチパス(複数箇所での反射を経て受光する場合)が起きている状態も加味した例である。
 図51は、本技術の第5の実施の形態における距離測定の第2の例の様子を示す図である。同図において、発光部12からの発光は、壁面501における反射を経て、SPADセンサ13によって受光される(図中の光路504および光路505参照)。同時に、発光部12からの発光は、最初に壁面503において反射され、さらに壁面501において反射されて、SPADセンサ13によって受光される(光路群506、光路群507、および、光路505参照)。
 なお、壁面501は、距離Z(1)に存在するものとする。また、光路群506、光路群507、および、光路505の合計の距離は、2×Z(2)であるものとする。
 ここで、壁面503と壁面501の2か所における反射を経て、SPADセンサ13に到達する光(光路群506、光路群507、および、光路505)について、補足する。壁面503では、拡散反射(Diffuse Reflection)が起きるため、SPADセンサ13に到達する光は、壁面503のある一点からの反射光ではなく、ある領域内の全ての点からの反射光である。したがって、同図に示すように、光路群506および507は、1つの「光路」ではなく、「光路群」として、複数の矢印をもって、SPADセンサ13へ到達する光を図示している。
 図52は、本技術の第5の実施の形態における距離測定の第2の例における強度分布を示す図である。
 同図におけるAに示すように、発光部12から発光されたものとする。時間とともに強度は変化する。この強度は正規分布であると仮定する。
 SPADセンサ13は、壁面501における反射を経て、光路504および505により、発光部12からの発光を受光する。この場合、同図におけるBに示すように、同図におけるAに対して、時間的に2×Z(1)÷cだけずれた強度分布となる。ただし、減衰されるため、同図におけるAの強度に対して、a(1)倍された波形となる。ここで、a(1)は、1未満であり、Z(1)および壁面501の反射率に依存する。
 SPADセンサ13は、壁面503および壁面501における反射を経て、光路群506、光路群507、および、光路505により、発光部12からの発光を受光する。この場合、同図におけるCに示すように、同図におけるAに対して、時間的に2×Z(2)÷cだけずれた強度分布となる。ただし、減衰されるため、同図におけるAの強度に対して、a(2)倍された波形となる。ここで、a(2)は、1未満であり、Z(2)および壁面503および501の反射率に依存する。
 さらに、光路群506と光路群507内の各光路は、微妙に距離が異なる。したがって、壁面503および壁面501における反射を経て飛来する光の距離は、厳密に2×Z(2)ではなく、2×Z(2)近辺の値となる。つまり、同図におけるCに示すように、広がりを有することになる。数学的に表現するならば、同図におけるAの正規分布の分散よりも、同図におけるCの正規分布の分散は大きくなる。
 また、SPADセンサ13は、環境光を受光する。同図におけるDに示すように、環境光は、時間によらず一定であり、これをbとする。
 この第2の例の状況においては、SPADセンサ13における受光の強度は、同図におけるB、CおよびDを合計した値となる。
 上述の第2の例では、2つの物体を想定していたが、これをさらに一般化して、K個の異なる距離からの反射を同時に測距している場合を考える。この場合、生起率p(n)は、以下の式74となる。
Figure JPOXMLDOC01-appb-M000074
ただし、k番目の物体の距離をZ(k)、その物体に対する減衰率をa(k)、分散をσ(k)とした。ここで、k=1乃至Kである。
 以上をまとめると、SPADセンサ13がK個の異なる距離からの反射を同時に測距している場合、p(n)が式74によって表現されるものとして、式69を最小とするb、a(k)、σ(k)、Z(k)を求めればよい。求められた値が、各ビンnの頻度h(n)が観測された時の最も確からしい値である。つまり、求められたbが、環境光の強度(輝度値)である。a(k)が、アクティブ光によりk番目の対象物が照らし出されたときの強度(輝度値)である。Z(k)が、k番目の対象物までの距離である。ここで、k=1乃至Kである。とくに、σ(k)の値が大きいものは、複数箇所における反射を経て飛来した光であり、Z(k)の距離に実際に物体があるわけではない。つまり、σ(k)の値が大きいもの(例えば、所望の閾値Th1以上)は、除外して、Z(k)を出力すれば、実際に存在する物体までの距離のみを出力することができる。
 図53は、本技術の第5の実施の形態の第2の実施例における距離測定処理の処理手順の一例を示す流れ図である。この処理は、演算部16によって行われ、結果は出力端子17より出力される。
 まず、ステップS521において、ヒストグラム作成のために行った測定の回数Mを入力する。そして、ヒストグラムデータを入力する。すなわち、各時刻(n=0乃至N-1)の頻度h(n)を入力する。そして、ステップS522に進む。
 ステップS522において、K=0乃至Kmaxの各Kについて、以下の式75を解く。
Figure JPOXMLDOC01-appb-M000075
各Kについて、求められた解であるbをbKとする。a(k)をaK(k)とする。σ(k)をσK(k)とする。Z(k)をZK(k)とする。ただし、k=1乃至Kである。ここで、Kmaxは、所望の定数である。そして、ステップS523に進む。
 ステップS523において、K=0乃至Kmaxの各Kについて、bにbKを、a(k)にaK(k)を、σ(k)にσK(k)を、Z(k)にZK(k)を代入して、式69の値を求める。各Kについて、式9を計算した値をError(K)とする。ただし、k=1乃至Kである。ここで、式69中のp(n)は、式75中に示されている関数である。そして、ステップS524に進む。
 ステップS524において、K=Kmax-1から順番にK=1まで1ずつデクリメントしていきながら、(Error(K-1)-Error(K))-(Error(K)-Error(K+1))という値をチェックする。この値が、はじめて閾値Th0以上となるKを求める。この時のKをKoptとする。K=1まで到達しても閾値Th0以上となるKがなかった場合のみ、「測距不能」として強制終了する。ここで、Th0は、所望の定数である。そして、ステップS525に進む。
 ステップS525において、k=1乃至Koptの中でσ(k)が閾値Th1以下となるkの集合をSとする。また、Sの要素数をKsとする。ここで、Th1は、所望の定数である。そして、ステップS526に進む。
 ステップS526において、環境光により対象物が照らし出されたときの輝度値としてbKoptを出力する。Sの要素である全てのkについて、Ks個の対象物までの距離として、ZKopt(k)を出力し、かつ、アクティブ光によりKs個の対象物のそれぞれが照らし出されたときの輝度値として、aKopt(k)を出力する。ただし、kはSの要素である。そして、一連の処理を終了する。
 このように第2の実施例においては、マルチパスも考慮して、観測値h(n)から得られる最も確からしい結果を得ることができる。
 [第3の実施例]
 第3の実施例は、上述の第2の実施例について、別の視点から議論するものである。
 上述の第2の実施例では、生起率を複数の「上に凸な関数」の合計であるとして、モデル化した。そして、分散が大きい「上に凸な関数」の部分は、複数箇所での反射を経て受光した光であると判断した。さて、生起率をモデル化しなくても、従来からある既知のピーク検出の方法によって検出されたピークが急峻なピークでなく、幅広なピークであれば、複数箇所での反射を経て受光した光であると判断することができる。
 図54は、本技術の第5の実施の形態の第3の実施例における受光判断の処理手順の一例を示す流れ図である。この処理により、各ピークに対応する光が、複数箇所での反射を経て受光した光であるか否かを判断することができる。
 まず、ステップS531において、ヒストグラム作成のために行った測定の回数Mを入力する。そして、ヒストグラムデータを入力する。すなわち、各時刻(n=0乃至N-1)の頻度h(n)を入力する。そして、ステップS532に進む。
 ステップS532において、各ビンnについて、p(n)=h(n)/M(n-1)を計算する。ここで、n=0乃至N-1である。なお、M(n-1)は、式4中で定義した値である。そして、ステップS533に進む。
 ステップS533において、nの関数p(n)について、ピークを検出する。検出されたピーク位置をmとする。ピーク検出の方法は、既知の方法であり、その詳細説明を省略する。また、ピークは1つまたは複数ある。そして、ステップS534に進む。
 ステップS534において、m-L≦n≦m+Lの範囲において、「p(n)-p(n-1)の絶対値」の平均値を求める。ここで、Lは所望の定数である。たとえば、L=2である。このステップS534では、mの近傍における傾斜の具合を計算している。すなわち、このピークが急峻であるか、幅広であるかの具合を計算している。そして、ステップS535に進む。
 ステップS535において、上述の平均値が閾値Th2未満の場合は、そのピークに対応する受光は、複数箇所での反射を経て受光した光であるという情報を出力する。Th2以上の場合は、そのピークに対応する受光は、対象物までの1回の反射で戻ってきた光の受光であるという情報を出力する。ここで、Th2は所望の定数である。そして、一連の処理を終了する。
 このようにして、各ピークに対応する光が、複数箇所での反射を経て受光した光であるか否かを判断することができる。
 [まとめ]
 この第5の実施の形態の特徴は以下のとおりである。
(特徴1)生起率を、時間t(または、それに比例するビンn)の関数として表現している。
(特徴2)その関数は、時間について一定の値(b)と、時間について上に凸な関数(func(t))の合計で表現している。
(特徴3)「上に凸な関数」は、1つまたは複数ある。
(特徴4)生起率とヒストグラムの関係(式69を最小とする関係)により、観測されたヒストグラム(h(n))から、特徴1の生起率を求める。すなわち、環境光により対象物が照らし出されたときの強度(輝度値)を求める。そして、アクティブ光により対象物が照らし出されたときの強度(輝度値)を求める。そして、対象物までの距離を求める。
(特徴5)「特徴4で求められた生起率」の中の構成要素である「上に凸な関数」が広がりを持っていれば、複数の反射を経てSPADセンサに到着した光であると判断する。「上に凸な関数」が急峻な関数であれば、物体に直接あたって反射して戻ってきた光であると判断する。
(特徴6)生起率におけるピークが広がりを持っていれば、複数の反射を経てSPADセンサに到着した光であると判断する。生起率におけるピークが急峻なピークであれば、物体に直接あたって反射して戻ってきた光であると判断する。
 なお、これら複数の特徴を全て満たさなくても、少なくとも1つ満たしていれば、この第5の実施の形態の特徴を利用しているといえる。
 この第5の実施の形態の利点は以下のとおりである。
(利点1)この第5の実施の形態の処理を実行することにより、理論的に正しい解(すなわち、最も確からしい解)を求めることができる。すなわち、環境光により対象物が照らし出されたときの強度(輝度値)を求めることができる。そして、アクティブ光により対象物が照らし出されたときの強度(輝度値)を求めることができる。そして、対象物までの距離を求めることができる。
(利点2)SPADセンサに到着した光が、複数の反射を経た光であるか、または、物体に直接あたって反射して戻ってきた光であるか、を判別することができる。
 [要点]
 第5の実施の形態は、以下の点を要点とする。
(1)ヒストグラムから得られる生起率の関数フィッティング方法において、
 ヒストグラムを入力する第1の入力ステップと、
 生起率を時間の関数として表現したときの、上記ヒストグラムとの関係を満たすような関数のパラメータを決定するパラメータ算出ステップと、
 上記パラメータを出力する第1の出力ステップと
を有することを特徴とするヒストグラムから得られる生起率の関数フィッティング方法。
(2)上記(1)において、
 上記生起率p(t)と、上記ヒストグラムh(t)との関係は、上記ヒストグラムを得るための測定回数をMとしたとき、
  p(t)=h(t)/M(t-1)
で表される
ことを特徴とするヒストグラムから得られる生起率の関数フィッティング方法。
(3)上記(1)または(2)において、
 上記関数は、定数と、上に凸な関数の合計として表現される
ことを特徴とするヒストグラムから得られる生起率の関数フィッティング方法。
(4)上記(3)において、
 上記「上に凸な関数」の個数として最小となる場合の数をKpotとし、
 上記関数は、定数と、Kopt個の「上に凸な関数」の合計として表現される
ことを特徴とするヒストグラムから得られる生起率の関数フィッティング方法。
(5)輝度値計算方法において、
 上記(1)乃至(4)で得られるフィッティングされた上記生起率の関数から、上記生起率の極大値を算出する極大値算出ステップと、
 上記極大値をアクティブ光により対象物が照らし出されたときの輝度値として出力する第2の出力ステップと
を有することを特徴とする輝度値計算方法。
(6)輝度値計算方法において、
 上記(1)乃至(4)で得られるフィッティングされた上記生起率の関数から、上記生起率の極大値以外の値を算出する極大値以外の値算出ステップと、
 上記極大値以外の値を環境光により対象物が照らし出されたときの輝度値として出力する第3の出力ステップと
を有することを特徴とする輝度値計算方法。
(7)距離計算方法において、
 上記(1)乃至(4)で得られるフィッティングされた上記生起率の関数から、上記生起率の極大値をとる時刻を算出する第1の時刻算出ステップと、
 上記極大値をとる時刻に(光速/2)倍した値を計算する第1の乗算ステップと
 上記計算結果を、対象物まので距離として出力する第4の出力ステップと
を有することを特徴とする距離計算方法。
(8)距離計算方法において、
 上記(3)または(4)で得られるフィッティングされた上記生起率の関数から、上記「上に凸な関数」のうち、分散の小さい関数の最大値をとる時刻を算出する第2の時刻算出ステップと、
 上記最大値をとる時刻に(光速/2)倍した値を計算する第2の乗算ステップと
 上記計算結果を、対象物まので距離として出力する第5の出力ステップと
を有することを特徴とする距離計算方法。
(9)距離計算方法において、
 ヒストグラムh(t)を入力する第2の入力ステップと、
 tの関数であるh(t)/M(t-1)の値がピークとなる時刻を求めるピーク時刻検出ステップと、
 上記ピークの近傍の時刻における上記「tの関数」の傾斜を求める傾斜計算ステップと、
 上記傾斜が急峻な、上記ピークとなる時刻に対して、(光速/2)倍した値を計算する第3の乗算ステップと
 上記計算結果を、対象物まので距離として出力する第6の出力ステップと
を有することを特徴とする距離計算方法。
 <7.第6の実施の形態>
 [概要]
 この第6の実施の形態は、観測されたヒストグラムと生起率とが理論的に正しい関係となるように作用させるとともに、時空間における近傍同士の生起率のパラメータが特定の関係になるように作用させることにより、距離または輝度を正しく求めるものである。すなわち、あらかじめ位置関係を想定しなくても、少ない演算量で適切なノイズ除去を行う方法を提供するものである。
 なお、「そのビンに対応する時間(D)内においてフォトンが飛来する確率」は、生起率に、時間Dを乗算した値であるところ、他の実施の形態においては、定数倍(D倍)は無視して考えていた。しかし、この第6の実施の形態においては、生起率の定義として、一般的に広く使われている用語「生起率」に対してD倍した値であると考えてもよい。
 上述のように、式8が、この実施の形態における理論から導いた最終式(各ビンnの頻度h(n)が観測された時の、そのビンnの生起率p(n)の確率密度関数)である。したがって、各時刻t、各位置(x,y)のヒストグラムが観測されたとき、そのヒストグラムをH(t,x,y,n)とすると、最も確からしい「各時刻t、各位置(x,y)の生起率p(t,x,y,n)」は、以下の式76を最小とするp(t,x,y,n)である。ここで、n=0乃至N-1である。
Figure JPOXMLDOC01-appb-M000076
なお、式76の右辺の分子に出てくるH(t,x,y,n)/M(t,x,y,n-1)は、式8で示された正規分布の平均値に対応している。式76の右辺の分母は、式8で示された正規分布の標準偏差に対応している。
 [生起率]
 SPADアレイ13内の各位置を(u,v)で表現する。uとvは、それぞれ、実数である。また、SPADセンサ13内の(x,y)で示されるSPADが飛来してくる光(フォトン)により反応を起こす領域を、A(x,y)とする。つまり、(u,v)∈A(x,y)となる位置(u,v)に飛来した光(フォトン)により、位置(x,y)にあるSPADが反応することになる。また、位置(u,v)に光(フォトン)が入射されても、必ず、SPADが反応するわけではない。反応率をη(u,v,x,y)とする。位置(u,v)に光(フォトン)が入射された際に、η(u,v,x,y)の割合で、(x,y)で示されるSPADは反応する。なお、η(u,v,x,y)は、位置(u,v)に依存しており事前に測定しておくことにより、既知となる。測定が困難な場合は、η(u,v,x,y)は、SPADセンサ13内の(x,y)で示されるSPADの物理的領域以外の(u,v)においては0で、SPADセンサ13内の(x,y)で示されるSPADの物理的領域内の(u,v)においては一定の値と近似してもよい。
 なお、ここで、補足すると、理想的には、A(x,y)とは、SPADセンサ13内の(x,y)で示されるSPADの物理的領域と一致する。つまり、理想的には、(x1,y1)≠(x2,y2)の場合、領域A(x1,y1)と領域A(x2,y2)の重なりは存在しない。しかしながら、実際には、(x1,y1)と(x2,y2)が隣接するSPAD同士である場合、領域A(x1,y1)と領域A(x2,y2)の重なりは存在する。なぜなら、第1の理由として、上述の図1の説明において、レンズ13aにより、飛来してくる光は各SPADに集光する旨説明した。もし、安価なレンズを使用した場合であると、十分に集光できずに、ボケることがある。つまり、SPADセンサ13内の(x1,y1)で示されるSPADに到達すべき方向から飛来した光(フォトン)が、レンズのボケにより、隣接する(x2,y2)で示されるSPADに到達することがあるからである。また、第2の理由として、(x1,y1)で示されるSPADの受け持つ領域に光(フォトン)が入射された場合でも、その光(フォトン)がSPADアレイを形成している半導体内を進み、隣接する(x2,y2)で示されるSPADに到達することがあるからである。したがって、ある位置(u,v)について、(x1,y1)≠(x2,y2)でも、η(u,v,x1,y1)≠0かつη(u,v,x2,y2)≠0となることがある。
 図55は、本技術の第6の実施の形態における強度分布を説明するための図である。
 発光部12からの発光は、時間(t1とする)とともに強度が変化するため、その強度をf(t1)とする。発光部12からの発光の強度を事前に測定しておくことにより、f(t1)は既知となる。同図におけるAは、発光部12からの発光の強度の時間推移を示している。
 各位置(u,v)には、アクティブ光(例えば、発光部12からの光)が、対象物での反射を経て、入射される。対象物までの距離を、Z(t,u,v)とする。アクティブ光(発光部12からの光)の位置(u,v)への入射光は、発光部12からの発光に対して、2×Z(t,u,v)/cだけ遅れて到達する。また、光は距離の2乗に比例して減衰していく。対象物での反射率をa(t.u,v)とする。以上を加味すると、発光部12から発光されたときに、位置(u,v)に入射される光の強度は、以下の式77となる。
Figure JPOXMLDOC01-appb-M000077
同図におけるBは、位置(u,v)へ入射するアクティブ光の強度の時間推移を示している。
 また、各位置(u,v)には、環境光(例えば、太陽30からの光)も入射される。この入射される光(フォトン)は、t番目のヒストグラムを作成する間、常に一定の確率で飛来する。この確率をb(t,u,v)とする。同図におけるCは、位置(u,v)へ入射する環境光の強度の時間推移を示している。
 位置(u,v)に入射される光の強度は、同図におけるBおよびCの合計であるから、以下の式78となる。
Figure JPOXMLDOC01-appb-M000078
したがって、位置(x,y)にあるSPADのビンnの生起率は、以下の式79となる。
Figure JPOXMLDOC01-appb-M000079
この式79は、式78に対して、時刻t1をn番目のビンの時刻であるn×Dに変え、n番目のビンの時間幅Dを乗算して、さらに、反応率η(u,v,x,y)を乗算して、位置(x,y)で示されるSPADの領域A(x,y)内の(u,v)について積分している。
 なお、式79や、これ以降で説明される積分の計算が、演算部16において行われるが、実際には、位置(u,v)についての積分ではなく、位置(u,v)についてデジタル化した加算で代用される。この場合(u,v)の粒度は、(x,y)の粒度と等しいか、または、小さい。すなわち、uのピッチは、xのピッチ以下である。vのピッチは、yのピッチ以下である。このような積分を加算で代用する方法は、デジタル信号処理について一般的に行われる既知の手法であり、ここでは、その説明を省略する。
 また、発光部12からの発光強度の時間関数f(t1)は、正規分布で近似できる場合が多い。さらに、反射物体によっては、表面での反射以外にも内部で拡散された後に反射されることもあり、戻ってくる光は、正規分布であるf(t1)よりも広がりを持つ場合がある。すなわち、反射して戻ってくる光は、時間に関して正規分布であり、その標準偏差は、f(t1)の標準偏差よりも大きい場合がある。これを加味すると、位置(x,y)にあるSPADのビンnの生起率は、以下の式80となる。
Figure JPOXMLDOC01-appb-M000080
この式80においては、標準偏差σを(u,v)の関数としている。式79においては、発光部12からの発光と同じ波形f()が、位置(u,v)へ入射するとしていたが、式80においては、この波形が時間方向に広がりをもつことも許す式となっている(σ(u,v)で、広がり具合を表現している)。これにより、対象物での光の反射の際の内部拡散も忠実に表現できる式となる。
 ここまでをまとめると、各時刻t、各位置(x,y)のヒストグラムが観測されたとき、そのヒストグラムをH(t,x,y,n)とすると、最も確からしい「各時刻t、各位置(x,y)の生起率p(t,x,y,n)」は、式76を最小とするp(t,x,y,n)である。ここで、n=0乃至N-1である。なお、式76中のp(t,x,y,n)は、式79または式80によって表現される。
 [式の最小化問題]
 この第6の実施の形態においては、式79を式76に代入したときの、式76を最小とするb(t,u,v)、a(t,u,v)、Z(t,u,v)を求める。ここで、(u,v)は、SPADアレイ13内の位置を示している。この求められたb(t,u,v)は、時刻tにおける位置(u,v)へ入射された環境光の強度(輝度)である。a(t,u,v)は、時刻tにおける位置(u,v)へ入射されたアクティブ光の強度(輝度)である。Z(t,u,v)は、時刻tにおける位置(u,v)へ入射された光の方向にある対象物までの距離である。
 または、この第6の実施の形態においては、式80を式76に代入したときの、式76を最小とするb(t,u,v)、a(t,u,v)、Z(t,u,v)、σ(t,u,v)を求める。求められたb(t,u,v)、a(t,u,v)、Z(t,u,v)は、式79を式76に代入したときの解と同じ意味を持つ。
 さて、式79または式80を式76に代入したときの式76の最小化問題は、解が複数存在する。そこで、現実的な制限を加える。すなわち、式79を式76に代入したときの式76を最小とするb(t,u,v)、a(t,u,v)、Z(t,u,v)を求める代わりに、以下の式81を解く。
Figure JPOXMLDOC01-appb-M000081
この式81において、DataTermは、式79を式76に代入したときの式76である。または、式80を式76に代入したときの式76を最小とするb(t,u,v)、a(t,u,v)、Z(t,u,v)、σ(t,u,v)を求める代わりに、以下の式82を解く。
Figure JPOXMLDOC01-appb-M000082
この式82においてDataTermは、式80を式76に代入したときの式76である。そして、式81または式82中のSmoothTermは、上述の「現実的な制限」であり、その詳細は後述する。
 [記号]
 ここでは、記号について定義する。Lpノルムを以下の式83によって記述する。ここで、pは0以上であり、無限大も含む。
Figure JPOXMLDOC01-appb-M000083
この第6の実施の形態においては、この記号、および、Lpノルムの定義は、一般的に使われている用語と同様に使用するものである。この第6の実施の形態においては、解くべき式としてp=2の例を示すが、この第6の実施の形態においてはpを2に限定するものではない。
 ここで、勾配(グラディエント)を以下の式84により記述する。
Figure JPOXMLDOC01-appb-M000084
この第6の実施の形態においては、この∇という記号は、位置(u,v)についての作用素であり、一般的に使われる定義と同じである。
 [第1の実施例]
 第1の実施例においては、上述の「現実的な制限」であるSmoothTermとして、以下の式85を採用している。
Figure JPOXMLDOC01-appb-M000085
DataTermは、式79を式76に代入したときの式76であり、式81を解く。
 ここで、式85について説明する。一般的に、「時刻tにおける位置(u,v)へ入射された環境光の強度(輝度)であるb(t,u,v)」は、時間tについて変化は少ない。そして、位置(u,v)についても変化は少ない。そこで、b(t,u,v)をtで偏微分した値、および、位置(u,v)で偏微分した値は、小さい値となるはずである。そこで、これら値をSmoothTerm(式85の右辺の第1項および第2項)として、式81の最小化問題を解くようにしている。なお、式85のαbtおよびαbsは、それぞれ、b(t,u,v)のtに対する変化量、(u,v)に対する変化量のSmoothTermへの寄与率を示しており、所望の定数である。
 一般的に、「時刻tにおける位置(u,v)へ入射されたアクティブ光の強度(輝度)であるa(t,u,v)」は、時間tについて変化は少ない。そして、位置(u,v)についても変化は少ない。そこで、a(t,u,v)をtで偏微分した値、および、位置(u,v)で偏微分した値は、小さい値となるはずである。そこで、これら値をSmoothTerm(式85の右辺の第3項および第4項)として、式81の最小化問題を解くようにしている。なお、式85のαatおよびαasは、それぞれ、a(t,u,v)のtに対する変化量、(u,v)に対する変化量のSmoothTermへの寄与率を示しており、所望の定数である。
 一般的に、「時刻tにおける位置(u,v)へ入射された光の方向にある対象物までの距離であるZ(t,u,v)」は、時間tについて変化は少ない。そして、位置(u,v)についても変化は少ない。そこで、Z(t,u,v)をtで偏微分した値、および、位置(u,v)で偏微分した値は、小さい値となるはずである。そこで、これら値をSmoothTerm(式85の右辺の第5項および第6項)として、式81の最小化問題を解くようにしている。なお、式85のαZtおよびαZsは、それぞれ、Z(t,u,v)のtに対する変化量、(u,v)に対する変化量のSmoothTermへの寄与率を示しており、所望の定数である。
 「現実的な制限」として、b(t,u,v)、a(t,u,v)、および、Z(t,u,v)は、時間tおよび位置(u,v)について変化は少ないと言うことを式85は示している。
 図56は、本技術の第6の実施の形態の第1の実施例における輝度値および距離の算出処理の処理手順例を示す流れ図である。この処理は、演算部16によって行われ、結果は出力端子17より出力される。
 まず、ステップS611において、ヒストグラム作成のために行った測定の回数Mを入力する。そして、ヒストグラムデータH(t,x,y,n)を入力する。ここで、tは1以上の整数であり、x=1乃至X、y=1乃至Yであり、n=0乃至N-1である。そして、ステップS612に進む。
 ステップS612において、式81を解き、b(t,u,v)、a(t,u,v)、および、Z(t,u,v)を求める。ただし、式81におけるDataTermは式76であり、式76中のp(t,x,y,n) は式79であり、式81におけるSmoothTermは式85である。そして、ステップS619に進む。
 ステップS619において、各時刻t、各位置(u,v)について、環境光により対象物が照らし出されたときの輝度値としてb(t,u,v)を出力する。アクティブ光により対象物が照らし出されたときの輝度値としてa(t,u,v)を出力する。対象物までの距離としてZ(t,u,v)を出力する。そして、一連の処理を終了する。
 このようにして、各時刻t、各位置(u,v)について、環境光により対象物が照らし出されたときの輝度値を出力することができる。また、アクティブ光により対象物が照らし出されたときの輝度値を出力することができる。そして、対象物までの距離を出力することができる。
 [第2の実施例]
 第2の実施例においては、上述の「現実的な制限」であるSmoothTermとして、以下の式86を採用している。
Figure JPOXMLDOC01-appb-M000086
DataTermは、式80を式76に代入したときの式76であり、式82を解く。
 ここで、式86について説明する。なお、式86の右辺の第1乃至第6項は、式85のそれと同じあるため、説明を省略する。
 一般的に、「時刻tにおける位置(u,v)へ入射されたアクティブ光の標準偏差であるσ(t,u,v)」は、時間tについて変化は少ない。そして、位置(u,v)についても変化は少ない。そこで、σ(t,u,v)をtで偏微分した値、および、位置(u,v)で偏微分した値は、小さい値となるはずである。そこで、これら値をSmoothTerm(式86の右辺の第7項および第8項)として、式82の最小化問題を解くようにしている。なお、式86のασtおよびασsは、それぞれ、σ(t,u,v)のtに対する変化量、(u,v)に対する変化量のSmoothTermへの寄与率を示しており、所望の定数である。
 上述の「現実的な制限」として、b(t,u,v)、a(t,u,v)、Z(t,u,v)、および、σ(t,u,v)は、時間tおよび位置(u,v)について変化は少ないということを式86は示している。
 図57は、本技術の第6の実施の形態の第2の実施例における輝度値および距離の算出処理の処理手順例を示す流れ図である。この第2の実施例の処理は、演算部16によって行われ、結果は出力端子17より出力される。
 ステップS611とステップS619は、上述の第1の実施例において説明したため、ここでは説明を省略する。上述の第1の実施例のステップS612に代えて、以下のステップS613が実行される。
 ステップS613において、式82を解いて、b(t,u,v)、a(t,u,v) 、Z(t,u,v) 、および、σ(t,u,v)を求める。ただし、式82におけるDataTermは式76であり、式76中のp(t,x,y,n) は式80であり、式82におけるSmoothTermは式86である。
 このようにして、各時刻t、各位置(u,v)について、環境光により対象物が照らし出されたときの輝度値を出力することができる。また、アクティブ光により対象物が照らし出されたときの輝度値を出力することができる。そして、対象物までの距離を出力することができる。
 [第3の実施例]
 以下の第3乃至第6の実施例においては、距離測定装置10に併設したカメラ100を使用する。ここで、カメラ100とは画像を撮影することができる装置であり、距離測定装置10のSPADアレイ13が測定する方向と同じ方向を撮影する。
 SPADアレイ13の各時刻tの各位置(u,v)が測定している物体に対応するカメラ100の画像内の画素値(輝度値)をI(t,u,v)とする。なお、距離測定装置10とカメラ100が近接して設置されている場合は、画素値I(t,u,v)は、カメラ100において、時刻tで、SPADアレイ13の位置(u,v)が撮影している方向と同じ方向を撮影した画素の値である。
 SPADアレイ13のSPADの数(X×Y個)よりも、カメラ100の画素数が多いときに、第3乃至第6の実施例は、特に高い効果を奏する。この場合、(u,v)のピッチとして、カメラ100の画像の画素ピッチを採用してもよい。
 時空間において、(t1,u1,v1)と(t2,u2,v2)が隣接した位置であるものとする。
 I(t1,u1,v1)とI(t2,u2,v2)が、ほぼ同じ値(画素値)であれば、SPADアレイ13の(t1,u1,v1)が測定している物体と、SPADアレイ13の(t2,u2,v2)が測定している物体は同じであると考えられる。したがって、(t1,u1,v1)と(t2,u2,v2)に対応するb(t,u,v)、a(t,u,v) 、Z(t,u,v) 、および、σ(t,u,v)は、同じ値であると考えられる。この場合、これら2つのb(t,u,v)同士、a(t,u,v)同士、Z(t,u,v)同士、および、σ(t,u,v)同士は、それぞれ、なるべく同じ値になるように、SmoothTermを作用させるとよい。
 一方、I(t1,u1,v1)とI(t2,u2,v2)が、まったく違う値(画素値)であれば、SPADアレイ13の(t1,u1,v1)が測定している物体と、SPADアレイ13の(t2,u2,v2)が測定している物体は違うと考えられる。したがって、(t1,u1,v1)と(t2,u2,v2)に対応するb(t,u,v)、a(t,u,v) 、Z(t,u,v) 、および、σ(t,u,v)は、違う値であると考えられる。この場合、これら2つのb(t,u,v)同士、a(t,u,v)同士、Z(t,u,v)同士、および、σ(t,u,v)同士は、それぞれ、同じである必要はないため、SmoothTermで作用させないようにするとよい。
 以上の説明は、上述のように、第3乃至第6の実施例について共通のものである。
 第3の実施例においては、上述の「現実的な制限」であるSmoothTermとして、以下の式87を採用している。
Figure JPOXMLDOC01-appb-M000087
DataTermは、式79を式76に代入したときの式76であり、式81を解く。なお、式87中に現れるeacross(t,u,v)、ealong(t,u,v)、μacross(t,u,v)、および、μalong(t,u,v)、は、以下の式88乃至式91によって定義される。
Figure JPOXMLDOC01-appb-M000088
Figure JPOXMLDOC01-appb-M000089
Figure JPOXMLDOC01-appb-M000090
Figure JPOXMLDOC01-appb-M000091
ここで、ξは、所望の微小な値(定数)であり、μacross(t,u,v)≦μalong(t,u,v)である。また、式88によって定義されたeacross(t,u,v)は、画像のエッジ方向に対して垂直な(エッジを横切る)単位方向ベクトルである。式89によって定義されたealong(t,u,v)は、画像のエッジ方向に沿った単位方向ベクトルである。
 なお、I(t,u,v)のuまたはvについての偏微分の値が0の時は、式87においてゼロ割りが発生する。そこで、現実的にはゼロ割り回避のため、I(t,u,v)のuまたはvについての偏微分の値が0の時は、微小な値に置き換える必要がある。これは、既知の常套手段であり、この実施の形態の趣旨とは関係ないため、式87ではこれについて触れていない。
 この実施例は、「現実的な制限」として時間方向に関しては制限を加えていない例であり、t=1のみであるとする。
 ここで、式87の右辺の第1項について説明する。最終的に求めたいb(t,u,v)のu方向の微分値(差分値)と、対応する画像の画素値I(t,u,v)のu方向の微分値(差分値)との比が、sb(t,u,v)と等しくなるように作用する項である。さらに、最終的に求めたいb(t,u,v)のv方向の微分値(差分値)と、対応する画像の画素値I(t,u,v)のv方向の微分値(差分値)との比も、sb(t,u,v)と等しくなるように作用する項である。すなわち、b(t,u,v)の微分値とI(t,u,v)の微分値は線形な関係であり、その比が、なるべくsb(t,u,v)となるように作用する項である。なお、αbsは、空間(u,v)方向のb(t,u,v)の微分値とI(t,u,v)の微分値の線形性についての寄与率であり、0以上の所望の定数である。
 式87の右辺の第2項について説明する。まず、画像のエッジを横切る方向に対しては、b(t,u,v)の変化量とI(t,u,v)の変化量には相関がない。なぜなら、エッジがあるということは、物体の境界であり、そのエッジの両側では、まったく違う物体(すなわち、全く違う距離、全く違う輝度値)となるからである。そこで、この方向に関するsb(t,u,v)の変化量は大きくても許容する。「この方向についてのsb(t,u,v)の微分値」にμacross(t,x,y)という小さな値をかけることによって、SmoothTermへの寄与を小さくしている。
 また、画像のエッジに沿った方向に対しては、b(t,u,v)の変化量とI(t,u,v)の変化量には相関がある。なぜなら、エッジに沿った方向では、同じ物体(すなわち、同じ距離、同じ輝度値)となるからである。そこで、この方向に関するsb(t,u,v)の変化量は小さくなるようにする。「この方向についてのsb(t,u,v)の微分値」にμalong(t,x,y)という大きな値をかけることによって、SmoothTermへの寄与を大きくしている。
 すなわち、式87の右辺の第2項は、エッジを横切る方向/沿った方向に関するsb(t,u,v)の変化の許容に関して作用する項である。なお、αbeは、エッジにおけるsb(t,u,v)の変化の許容に関する寄与率であり、0以上の所望の定数である。
 式87の右辺の第3項および第4項は、上述の第1項および第2項のb(t,u,v)をa(t,u,v)に置き換えたものであり、その説明を省略する。なお、αasは、空間(u,v)方向のa(t,u,v)の微分値とI(t,u,v)の微分値の線形性についての寄与率であり、0以上の所望の定数である。αaeは、エッジにおけるsa(t,u,v)の変化の許容に関する寄与率であり、0以上の所望の定数である。
 式87の右辺の第5項および第6項は、上述の第1項および第2項のb(t,u,v)をZ(t,u,v)に置き換えたものであり、その説明を省略する。なお、αZsは、空間(u,v)方向のZ(t,u,v)の微分値とI(t,u,v)の微分値の線形性についての寄与率であり、0以上の所望の定数である。αZeは、エッジにおけるsZ(t,u,v)の変化の許容に関する寄与率であり、0以上の所望の定数である。
 図58は、本技術の第6の実施の形態の第3の実施例における輝度値および距離の算出処理の処理手順例を示す流れ図である。この第3の実施例の処理は、演算部16によって行われ、結果は出力端子17より出力される。
 まず、ステップS621において、ヒストグラム作成のために行った測定の回数Mを入力する。そして、ヒストグラムデータH(t,x,y,n)を入力する。ここで、tは1以上の整数であり、x=1乃至X、y=1乃至Yであり、n=0乃至N-1である。そして、SPADアレイ13の各時刻tの各位置(u,v)が測定している物体に対応するカメラ100の画像内の画素値(輝度値)I(t,u,v)を入力する。そして、ステップS622に進む。
 ステップS622において、式81を解いて、b(t,u,v)、a(t,u,v)、および、Z(t,u,v)を求める。ただし、式81におけるDataTermは式76であり、式76中のp(t,x,y,n) は式79であり、式81におけるSmoothTermは式87である。ここで、sb(t,u,v)、sa(t,u,v)、および、sZ(t,u,v)は、それぞれ、任意のスカラー量である。すなわち、式76と式87を加算した値が、最小となるような、b(t,u,v)、a(t,u,v)、Z(t,u,v)、sb(t,u,v)、sa(t,u,v)、sZ(t,u,v)の組を求めて、そのうち、b(t,u,v)、a(t,u,v)、および、Z(t,u,v)だけを計算結果とする。また、t=1である。そして、ステップS629に進む。
 ステップS629において、各時刻t、各位置(u,v)について、環境光により対象物が照らし出されたときの輝度値としてb(t,u,v)を出力する。アクティブ光により対象物が照らし出されたときの輝度値としてa(t,u,v)を出力する。対象物までの距離としてZ(t,u,v)を出力する。そして、一連の処理を終了する。
 このようにして、各時刻t、各位置(u,v)について、環境光により対象物が照らし出されたときの輝度値を出力することができる。また、アクティブ光により対象物が照らし出されたときの輝度値を出力することができる。そして、対象物までの距離を出力することができる。
 [第4の実施例]
 第4の実施例においては、上述の「現実的な制限」であるSmoothTermとして、以下の式92を採用している。
Figure JPOXMLDOC01-appb-M000092
DataTermは、式80を式76に代入したときの式76であり、式82を解く。
 なお、式92においてゼロ割りが発生する場合があるが、この回避策としては、式87について説明したことと同様のことを行えばよい。
 この実施例は、「現実的な制限」として時間方向に関しては制限を加えていない例であり、t=1のみであるとする。
 ここで、式92について説明するが、式92の右辺の第1乃至第6項は、上述の式87のそれと同じあるため、説明を省略する。
 式92の右辺の第7項および第8項は、上述の第1項および第2項のb(t,u,v)をσ(t,u,v)に置き換えたものであり、その説明を省略する。なお、ασsは、空間(u,v)方向のσ(t,u,v)の微分値とI(t,u,v)の微分値の線形性についての寄与率であり、0以上の所望の定数である。ασeは、エッジにおけるsσ(t,u,v)の変化の許容に関する寄与率であり、0以上の所望の定数である。
 図59は、本技術の第6の実施の形態の第4の実施例における輝度値および距離の算出処理の処理手順例を示す流れ図である。この処理は、演算部16によって行われ、結果は出力端子17より出力される。
 ステップS621とステップS629は、上述の第3の実施例において説明したため、ここでは説明を省略する。上述の第3の実施例のステップS622に代えて、以下のステップS623が実行される。
 ステップS623において、式82を解いて、b(t,u,v)、a(t,u,v) 、Z(t,u,v) 、および、σ(t,u,v)を求める。ただし、式82におけるDataTermは式76であり、式76中のp(t,x,y,n) は式80であり、式82におけるSmoothTermは式92である。ここで、sb(t,u,v)、sa(t,u,v)、sZ(t,u,v)、および、sσ(t,u,v)は、それぞれ、任意のスカラー量である。すなわち、式76と式92を加算した値が、最小となるような、b(t,u,v)、a(t,u,v)、Z(t,u,v)、σ(t,u,v)、sb(t,u,v)、sa(t,u,v)、sZ(t,u,v)、sσ(t,u,v)の組を求めて、そのうち、b(t,u,v)、a(t,u,v)、Z(t,u,v)、および、σ(t,u,v)だけを計算結果とする。また、t=1である。
 このようにして、各時刻t、各位置(u,v)について、環境光により対象物が照らし出されたときの輝度値を出力することができる。また、アクティブ光により対象物が照らし出されたときの輝度値を出力することができる。そして、対象物までの距離を出力することができる。
 [第5の実施例]
 第5の実施例においては、上述の「現実的な制限」であるSmoothTermとして、以下の式93を採用している。
Figure JPOXMLDOC01-appb-M000093
ここで、ΔT、Δu、および、Δvは、それぞれ、0以上の所望の定数である。DataTermは、式79を式76に代入したときの式76であり、式81を解く。
 式93の右辺の第1項について説明する。時空間において(t,u,v)を中心とする(2×ΔT+1,2×Δu,2×Δv)の大きさの領域を考える。たとえば、ΔT=Δu=Δv=2である。このローカルな領域内では、最終的に求めたいb(t,u,v)と、対応する画像の画素値I(t,u,v)の間には、線形な関係があると考えてよい。なぜなら、ローカルな領域内では、時空間の各位置における「b(t,u,v)とI(t,u,v)の組」には相関があるからである。そこで、この線形における1次の係数をAb(t,u,v)、0次の係数をBb(t,u,v)とする。式93の右辺の第1項は、この線形性の関係がなるべく成立するように作用する項である。なお、αb1は、この線形性の関係の成立具合についての寄与率であり、0以上の所望の定数である。
 式93の右辺の第2項について説明する。時空間において(t,u,v)を中心とする(2×ΔT+1,2×Δu,2×Δv)の大きさの領域内におけるI(t,u,v)の値に変化が少ないと、Ab(t,u,v)は不安定になる。なぜなら、任意の値A'に対して、以下の式94を満たすようにB'をセットすれば、以下の式95が成立するからである。
Figure JPOXMLDOC01-appb-M000094
Figure JPOXMLDOC01-appb-M000095
ここで、I(t,u,v)の値として、常に一定のIconstとしている。
 そこで、不安定性を解除するための項が、式93の右辺の第2項である。第1項だけではAb(t,u,v)が不安定であった場合でも、この第2項により、Ab(t,u,v)の値が小さい値を選択するように作用させることができ、Ab(t,u,v)を確定させることができる。なお、αb2は、この不安定性解除についての寄与率であり、0以上の所望の定数である。
 式93の右辺の第3項および第4項は、上述の第1項および第2項のb(t+t1,u+u1,v+v1)をa(t+t1,u+u1,v+v1)に置き換えたものであり、その説明を省略する。なお、αa1は、この線形性の関係の成立具合についての寄与率であり、0以上の所望の定数である。αa2は、この不安定性解除についての寄与率であり、0以上の所望の定数である。
 式93の右辺の第5項および第6項は、上述の第1項および第2項のb(t+t1,u+u1,v+v1)をZ(t+t1,u+u1,v+v1)に置き換えたものであり、その説明を省略する。なお、αZ1は、この線形性の関係の成立具合についての寄与率であり、0以上の所望の定数である。αZ2は、この不安定性解除についての寄与率であり、0以上の所望の定数である。
 図60は、本技術の第6の実施の形態の第5の実施例における輝度値および距離の算出処理の処理手順例を示す流れ図である。この処理は、演算部16によって行われ、結果は出力端子17より出力される。
 ステップS621とステップS629は、上述の第3の実施例において説明したため、ここでは説明を省略する。上述の第3の実施例のステップS622に代えて、以下のステップS624が実行される。
 ステップS624において、式81を解いて、b(t,u,v)、a(t,u,v) 、Z(t,u,v)を求める。ただし、式81におけるDataTermは式76であり、式76中のp(t,x,y,n) は式79であり、式81におけるSmoothTermは式93である。ここで、Ab(t,u,v)、Bb(t,u,v)、Aa(t,u,v)、Ba(t,u,v)、AZ(t,u,v)、および、BZ(t,u,v)は、それぞれ、任意のスカラー量である。すなわち、式76と式93を加算した値が、最小となるような、b(t,u,v)、a(t,u,v)、Z(t,u,v)、Ab(t,u,v)、Bb(t,u,v)、Aa(t,u,v)、Ba(t,u,v)、AZ(t,u,v)、BZ(t,u,v)の組を求めて、そのうち、b(t,u,v)、a(t,u,v)、および、Z(t,u,v)だけを計算結果とする。
 このようにして、各時刻t、各位置(u,v)について、環境光により対象物が照らし出されたときの輝度値を出力することができる。また、アクティブ光により対象物が照らし出されたときの輝度値を出力することができる。そして、対象物までの距離を出力することができる。
 [第6の実施例]
 第6の実施例においては、上述の「現実的な制限」であるSmoothTermとして、以下の式96を採用している。
Figure JPOXMLDOC01-appb-M000096
DataTermは、式80を式76に代入したときの式76であり、式82を解く。
 ここで、式96について説明するが、式96の右辺の第1乃至第6項は、式93のそれと同じあるため、説明を省略する。
 式96の右辺の第7項および第8項は、上述の第1項および第2項のb(t+t1,u+u1,v+v1)をσ(t+t1,u+u1,v+v1)に置き換えたものであり、その説明を省略する。なお、ασ1は、この線形性の関係の成立具合についての寄与率であり、0以上の所望の定数である。ασ2は、この不安定性解除についての寄与率であり、0以上の所望の定数である。
 図61は、本技術の第6の実施の形態の第6の実施例における輝度値および距離の算出処理の処理手順例を示す流れ図である。この処理は、演算部16によって行われ、結果は出力端子17より出力される。
 ステップS621とステップS629は、上述の第3の実施例において説明したため、ここでは説明を省略する。上述の第6の実施例のステップS622に代えて、以下のステップS625が実行される。
 ステップS625において、式82を解いて、b(t,u,v)、a(t,u,v) 、Z(t,u,v) 、および、σ(t,u,v)を求める。ただし、式82におけるDataTermは式76であり、式76中のp(t,x,y,n) は式80であり、式82におけるSmoothTermは式96である。ここで、Ab(t,u,v)、Bb(t,u,v)、Aa(t,u,v)、Ba(t,u,v)、AZ(t,u,v)、BZ(t,u,v)、Aσ(t,u,v)、および、Bσ(t,u,v)は、それぞれ、任意のスカラー量である。すなわち、式76と式96を加算した値が、最小となるような、b(t,u,v)、a(t,u,v)、Z(t,u,v)、σ(t,u,v)、Ab(t,u,v)、Bb(t,u,v)、Aa(t,u,v)、Ba(t,u,v)、AZ(t,u,v)、BZ(t,u,v)、Aσ(t,u,v)、Bσ(t,u,v)の組を求めて、そのうち、b(t,u,v)、a(t,u,v)、Z(t,u,v)、および、σ(t,u,v)だけを計算結果とする。
 このようにして、各時刻t、各位置(u,v)について、環境光により対象物が照らし出されたときの輝度値を出力することができる。また、アクティブ光により対象物が照らし出されたときの輝度値を出力することができる。そして、対象物までの距離を出力することができる。
 [まとめ]
 この第6の実施の形態においては、以下の第1の方針および第2の方針の2つを加味して、輝度または距離を算出する。すなわち、第1の方針は、観測値であるヒストグラムになるべく合致するように生起率を求めるものである(DataTermの最小化)。第2の方針は、近傍同士の生起率については変化が小さくなるように補正を行うものである(SmoothTermの最小化)。なお、第2の方針については、さらに、併設するカメラから得られる画像との相関を利用して、時空間の各位置(t,u,v)に依存して、隣接間の変化の許容量を操作してもよい。
 これにより、第6の実施の形態では、理論的に最適な解を求めることができる。
 [要点]
 第6の実施の形態は、以下の点を要点とする。
(1)ヒストグラムから輝度または距離を求める方法において、
 時空間の各位置に存在するヒストグラムを入力する入力ステップと、
 上記ヒストグラムから距離または輝度の少なくとも1つを算出する計算ステップと
 上記距離または上記輝度を出力する出力ステップと
を有し、
 上記計算ステップでは、
 生起率を時間の関数として表現したときの、上記ヒストグラムとの関係を満たすように、上記関数のパラメータを制約する第1の制約事項と、時空間における近傍同士の上記パラメータが、特定の関係を満たすように制約する第2の制約事項の2つの制約事項を満たす上記パラメータを算出し、
 上記パラメータから、距離または輝度を算出する
ことを特徴とするヒストグラムから距離または輝度を求める方法。
(2)上記(1)におけるヒストグラムから距離または輝度を求める方法において、
 上記生起率p(t)と、上記ヒストグラムh(t)との関係である上記第1の制約事項は、上記ヒストグラムを得るための測定回数をMとしたとき、
  p(t)=h(t)/M(t-1)
で表される関係である
ことを特徴とするヒストグラムから距離または輝度を求める方法。
(3)上記(1)または(2)におけるヒストグラムから距離または輝度を求める方法において、
 上記第2の制約事項は、時空間における近傍同士の上記パラメータの差は小さいという関係である
ことを特徴とするヒストグラムから距離または輝度を求める方法。
(4)上記(1)または(2)におけるヒストグラムから距離または輝度を求める方法において、
 画像を入力する画像入力ステップをさらに有し、
 上記第2の制約事項は、時空間における上記パラメータが、上記画像と相関関係があるという制約事項である
ことを特徴とするヒストグラムから距離または輝度を求める方法。
(5)上記(4)におけるにおけるヒストグラムから距離または輝度を求める方法において、
 上記相関関係とは、
 上記画像内のエッジに沿った方向では、「上記画像の画素値の変化」と「上記パラメータの変化」の割合が一定になるという相関関係である
ことを特徴とするヒストグラムから距離または輝度を求める方法。
(6)上記(4)におけるにおけるヒストグラムから距離または輝度を求める方法において、
 上記相関関係は、時空間内のローカル領域ごとに、上記画像と上記パラメータとは、線形な関係になるという相関関係である
ことを特徴とするヒストグラムから距離または輝度を求める方法。
 <8.第7の実施の形態>
 [概要]
 この第7の実施の形態は、距離データ(距離情報)の重み付き加算を行うことによりノイズを除去するものである。すなわち、あらかじめ位置関係を想定しなくても、少ない演算量で適切なノイズ除去を行う方法を提供するものである。
 この第7の実施の形態においては、各時刻t、各位置(x,y)において作成されたヒストグラムからピークを検出し、そのピークに対応する時間にc/2を乗算して距離を算出することが、演算部16において行われる。各時刻t、各位置(x,y)において求められた距離をZ(t,x,y,i)とする。ここで、i=1乃至C(t,x,y)である。添え字iとC(t,x,y)については後述する。
 図62は、本技術の第7の実施の形態における距離測定の様子の一例を示す図である。
 同図に示すように、SPADアレイ13内の1つのSPADが、異なる距離にある物体(壁面701と壁面702)を同時に測距している場合を考える。1つのSPADは、1つの方向を測距するわけではなく、現実的には、ある程度の立体角をもった方向(図中の測距範囲)の全体を測距している。その測距範囲内に、壁面701と壁面702が存在している様子を示している。壁面701および壁面702は、それぞれ、距離Z(1)、Z(2)に存在するものとする。
 発光部12からのM回の発光において、壁面701での反射を経てSPADは受光することもある。または、壁面702での反射を経てSPADは受光することもある。もちろん、環境光も受光する。
 図63は、本技術の第7の実施の形態における距離測定の例における強度分布を示す図である。この場合、最終的に得られるヒストグラムには、2つのピークが存在する。すなわち、同図に示すように、距離Z(1)に対応するビン(Z(1)×2÷c÷D)と、距離Z(2)に対応するビン(Z(2)×2÷c÷D)とにピークが現れる。
 さらに一般化して、ある時刻tにおいて、SPADアレイ13内の位置(x,y)のSPADが、C(t,x,y)個の異なる距離にある物体を測距している場合を考える。このような状況で観測されたヒストグラムからピークを検出すると、C(t,x,y)個のピークが検出される。これらピークに対応するビンについて、「c×D÷2」倍することにより、C(t,x,y)個の距離を算出することができる。このようにして、算出された距離を、Z(t,x,y,i)とする。ここで、i=1乃至C(t,x,y)である。
 また、この第7の実施の形態のある実施例においては、ピーク面積も利用するため、適宜、演算部16において、各ピークに対応するピーク面積も計算する。各時刻t、各位置(x,y)におけるi番目のピーク面積をS(t,x,y,i)とする。ここで、i=1乃至C(t,x,y)である。
 ピーク面積は、ピークの大きさを示しており、この値が小さいと、対応する距離データは信用できない。逆に、この値が大きいと、対応する距離データは信用できる。
 なお、ピーク検出およびピーク面積の求め方は、既知の方法があるため、その方法を適用することができる。つまり、例えば、ガスクロマトグラフ、液体クロマトグラフなどで取得されたクロマトグラムデータに対して行われる一般的な処理方法である。具体的な方法としては、例えば、「特開2014-211393:ピーク検出装置」や「特開平6-230001:クロマトグラフ用データ処理装置」に開示されている方法があり、これらの方法によりピーク検出およびピーク面積を求めることができる。
 以上をまとめると、従来からある既知の方法を使って、演算部16によって、各時刻t、各位置(x,y)におけるヒストグラムを解析して距離データを求めることができる。ここで、距離データは1つであるとは限らない。すなわち、C(t,x,y)個である。そして、第7の実施の形態は、各時刻t、各位置(x,y)におけるi番目の距離データZ(t,x,y,i)に対して、演算部16においてノイズ除去を行うことに特徴がある。ここで、tは1以上の整数である。x=1乃至X、y=1乃至Yである。i=1乃至C(t,x,y)である。このノイズ除去において、必要に応じて、ピーク面積の値S(t,x,y,i)も使用する。
 この第7の実施の形態における距離データZ(t,x,y,i)のノイズ除去を端的に表現すると以下の式97となる。
Figure JPOXMLDOC01-appb-M000097
すなわち、Z(t,x,y,i)を入力として、式97を用いて、ノイズ除去された距離データZNR(t,x,y,i)を、演算部16にて計算して、ノイズ除去された距離データZNR(t,x,y,i)を出力端子17より出力する。
 式97は、Z(t,x,y,i)についての重み付き平均を行っている。重み付き平均により、距離データ内に存在するノイズが除去される。w(t,x,y,i,t1,x1,y1,j)は、対応するZ(t1,x1,y1,j)の重みであり、W(t,x,y,i)は正規化のために使用するw(t,x,y,i,t1,x1,y1,j)の合計値である。この第7の実施の形態の特徴は、このw(t,x,y,i,t1,x1,y1,j)の値の設定にもあり、具体的な値は後述する。
 再度述べると、w(t,x,y,i,t1,x1,y1,j)は、ノイズ除去対象としている「時刻t、位置(x,y)のi番目の距離データ」を計算するために使用する「時刻t1、位置(x1,y1)のj番目の距離データ」の重みである。「時刻t1、位置(x1,y1)のj番目の距離データZ(t1,x1,y1,j)」を、重みw(t,x,y,i,t1,x1,y1,j)をもって、重み付き加算することにより、ノイズ除去された「時刻t、位置(x,y)のi番目の距離データZNR(t,x,y,i)」を得ることができる。
 [第1の実施例]
 第1の実施例においては、時空間においての距離に依存して、重みを小さくしていくように、w(t,x,y,i,t1,x1,y1,j)を決定している。すなわち、以下の式98となる重みw(t,x,y,i,t1,x1,y1,j)を採用している。
Figure JPOXMLDOC01-appb-M000098
さらに、式98に示すように、ピーク面積を用いて、距離データが信用できない(ピーク面積が小さい)場合は重みw(t,x,y,i,t1,x1,y1,j)を小さくして、距離データが信用でできる(ピーク面積が大きい)場合は重みw(t,x,y,i,t1,x1,y1,j)を大きくしている。
 第1の実施例における重みw(t,x,y,i,t1,x1,y1,j)の特徴は以下のとおりである。
 (特徴1-1)重みw(t,x,y,i,t1,x1,y1,j)は、時空間において、距離に対して単調減少しているということである。これは、近い距離にある2つのSPADが測定している対象物は、同じ物体(距離)である確率が高いという事実に基づいている。同じ物体(距離)であれば、加算した方が、ノイズを除去することができる。
 (特徴1-2)「C(t1,x1,y1)個の時刻t1、位置(x1,y1)の距離データ群{Z(t1,x1,y1,j)|jは1乃至C(t,x,y)}」について、Z(t,x,y,i)の値に近いほど、重みを重くしている。これは、時刻t1、位置(x1,y1)のSPADが測定しているC(t1,x1,y1)個の対象物うち、時刻t、位置(x,y)のSPADが測定しているi番目の対象物と同じ物体(距離)である確率が高いものは、Z(t,x,y,i)とZ(t1,x1,y1,j)とが似ているはずだからである。
 (特徴1-3)距離データが信用できない(ピーク面積S(t1,x1,y1,j)が小さい)場合は重みw(t,x,y,i,t1,x1,y1,j)を小さくして、距離データが信用でできる(ピーク面積S(t1,x1,y1,j)が大きい)場合は重みw(t,x,y,i,t1,x1,y1,j)を大きくしている。これは、信頼度に応じて、重みを決定した方が、より良いノイズ除去ができるからである。
 第1の実施例では、距離測定装置10を使って、SPADアレイ13の各SPADにおける測距を行う。累積部15から得られる観測されたヒストグラムから、演算部16によってピーク検出を行い、距離データを求める。そして、演算部16において、この距離データに対してノイズ除去を行う。
 図64は、本技術の第7の実施の形態の第1の実施例におけるノイズ除去の処理手順例を示す流れ図である。この処理により、距離データに対してノイズ除去を行う。この処理は、演算部16によって行われる。
 まず、ステップS711において、各時刻t、各位置(x,y)におけるヒストグラムから、各時刻、各位置における「ピーク位置とピーク面積」の組を求める。なお、各時刻、各位置における「ピーク位置とピーク面積」の組は、複数ある場合もある。時刻t、位置(x,y)における「ピーク位置とピーク面積」の組の数をC(t,x,y)とする。ピーク位置を(D×c/2)倍した値を、Z(t,x,y,i)とする。また、ピーク面積をS(t,x,y,i)とする。ここで、iは、複数ある「ピーク位置とピーク面積」の組を示すパラメータであり、iは1乃至C(t,x,y)の値をとる。そして、ステップS712に進む。
 ステップS712において、各時刻t、各位置(x,y)、各iについて、上述の式97を計算し、ZNR(t,x,y,i)を求める。ここで、w(t,x,y,i,t1,x1,y1,j)は、上述の式98によって表される。そして、ステップS713に進む。
 ステップS713において、「ノイズ除去された時刻t、位置(x,y)のi番目の距離データ」として、ZNR(t,x,y,i)を出力端子17より出力する。そして、一連の処理を終了する。
 なお、この第1の実施例において、重みw(t,x,y,i,t1,x1,y1,j)は、計算の簡略化のため、ピーク面積に依存させなくてもよい。すなわち、式98において、S(t1,x1,y1,j)は、強制的に1(定数)として解いてもよい。
 [第2の実施例]
 第2の実施例においては、時空間における距離に依存して、重みを小さくしていくように、w(t,x,y,i,t1,x1,y1,j)を決定している。すなわち、以下の式99となる重みw(t,x,y,i,t1,x1,y1,j)を採用している。
Figure JPOXMLDOC01-appb-M000099
さらに、式99に示すように、「C(t1,x1,y1)個の時刻t1、位置(x1,y1)の距離データ群{Z(t1,x1,y1,j)|jは1乃至C(t,x,y)}」について、Z(t,x,y,i)の値に一番近いものだけを採用して、他のものは重みを0としている。これは、第1の実施例における(特徴1-2)の極端な例である。つまり、「(特徴1-2)『C(t1,x1,y1)個の時刻t1、位置(x1,y1)の距離データ群{Z(t1,x1,y1,j)|jは1乃至C(t,x,y)}』について、Z(t,x,y,i)の値に近いほど、重みを重くしている。」という点において、一番近いもの以外は、重みを0にしているということである。
 再度述べると、第2の実施例における重みw(t,x,y,i,t1,x1,y1,j)の特徴は以下のとおりである。
 (特徴2-1)「C(t1,x1,y1)個の時刻t1、位置(x1,y1)の距離データ群{Z(t1,x1,y1,j)|jは1乃至C(t,x,y)}」について、Z(t,x,y,i)の値に近いもの以外は、重みを0にする。これは、時刻t1、位置(x1,y1)のSPADが測定しているC(t1,x1,y1)個の対象物うち、時刻t、位置(x,y)のSPADが測定しているi番目の対象物と同じ物体(距離)である確率が高いものは、Z(t,x,y,i)とZ(t1,x1,y1,j)とが似ているはずだからである。
 この第2の実施例では、距離測定装置10を使って、SPADアレイ13の各SPADにおける測距を行う。累積部15から得られる観測されたヒストグラムから、演算部16によってピーク検出を行い、距離データを求める。そして、演算部16において、この距離データに対してノイズ除去を行う。
 図65は、本技術の第7の実施の形態の第2の実施例におけるノイズ除去の処理手順例を示す流れ図である。この処理により、距離データに対してノイズ除去を行う。この処理は、演算部16によって行われる。
 ステップS711とステップS719は、上述の第1の実施例において説明したため、ここでは説明を省略する。上述の第1の実施例のステップS712に代えて、以下のステップS713が実行される。
 ステップS713において、各時刻t、各位置(x,y)、各iについて、式97を計算し、ZNR(t,x,y,i)を求める。ここで、w(t,x,y,i,t1,x1,y1,j)は、式99によって表される。
 [第3の実施例]
 第3の実施例においては、時空間において方向(時間方向、x方向、および、y方向)に依存させて、重みw(t,x,y,i,t1,x1,y1,j)を決定している。すなわち、以下の式100となる重みw(t,x,y,i,t1,x1,y1,j)を採用している。
Figure JPOXMLDOC01-appb-M000100
ただし、式100中のHeaviside()は、以下の式101によって定義される階段関数(Step Function)である。また、Th1は、所望の定数(閾値)である。
Figure JPOXMLDOC01-appb-M000101
 ここで、式100について説明する。ノイズ除去対象としている「時刻t、位置(x,y)のg番目(g=1乃至C(t,x,y))の距離データ」に対して、時間的に直前と直後の距離データに着目する。すなわち、t1=t+1、x1=x、y1=yとなる「時刻t1、位置(x1,y1)のh番目の距離データ」に着目する。ここで、h=1乃至C(t+1,x,y)である。そして、t1=t-1、x1=x、y1=yとなる「時刻t1、位置(x1,y1)のk番目の距離データ」に着目する。ここで、k=1乃至C(t-1,x,y)である。
 時刻t+1と時刻tにおいて測定している対象物(距離)が同じであるか否かを判断する。これは、以下の式102により判断することができる。
Figure JPOXMLDOC01-appb-M000102
式102は、「時刻t、位置(x,y)のg番目の距離データ」と似ている距離のものが、「時刻t+1、位置(x,y)の距離データ群」の中に存在しているか否かをチェックしている。ここで、g=1乃至C(t,x,y)である。式102の値が小さければ、「時刻t+1と時刻tにおいて測定している対象物(距離)が同じである」と判断することができる。
 時刻t-1と時刻tにおいて測定している対象物(距離)が同じであるか否かを判断する。これは、以下の式103により判断できる。
Figure JPOXMLDOC01-appb-M000103
式103は、「時刻t、位置(x,y)のg番目の距離データ」と似ている距離のものが、「時刻t-1、位置(x,y)の距離データ群」の中に存在しているか否かをチェックしている。ここで、g=1乃至C(t,x,y)である。式103の値が小さければ、「時刻t-1と時刻tにおいて測定している対象物(距離)が同じである」と判断することができる。
 したがって、時間方向に対して考えたとき、時刻t-1、時刻t、時刻t+1において測定している対象物(距離)が同じであるか否かは、以下の式104により判断することができる。
Figure JPOXMLDOC01-appb-M000104
式104の値が負であれば、時刻t-1、時刻t、時刻t+1において測定している対象物(距離)は違う」と判断することができる。式104の値が0または正であれば、時刻t-1、時刻t、時刻t+1において測定している対象物(距離)は同じ」と判断することができる。そして、「同じ」場合には、加算した方が、ノイズを除去できる。すなわち、以下の式105によって示すように、「違う」場合は重みが0、「同じ」場合は重みが1/2として加算する。
Figure JPOXMLDOC01-appb-M000105
もちろん、加算する距離データは、「C(t+1,x,y)個の時刻t+1、位置(x,y)の距離データ群{Z(t+1,x,y,j)|jは1乃至C(t+1,x,y)}」の中で、Z(t,x,y,i)の値に一番近いものだけである。そして、加算する距離データは、「C(t-1,x,y)個の時刻t-1、位置(x,y)の距離データ群{Z(t-1,x,y,j)|jは1乃至C(t-1,x,y)}」の中で、Z(t,x,y,i)の値に一番近いものだけである。「一番近いものだけ」を採用するのは、上述の第2の実施例と同じである。
 いま、時間方向について説明したが、同様に、x方向について、および、y方向についても同じことがいえるため、結局、重みは上述の式100となる。
 再度述べると、この第3の実施例における重みw(t,x,y,i,t1,x1,y1,j)の特徴は以下のとおりである。
 (特徴3-1)時空間において方向(時間方向、x方向、および、y方向)に依存させて、重みw(t,x,y,i,t1,x1,y1,j)を決定している。その方向に対して、測定している対象物(距離)が同じであると判断した場合は、その方向に対しての重みを重くする。違うと判断した場合は重みを小さくする(または、0にする)。なお、この判断は、同じ距離のものがあるか否かの判断(すなわち、式104)により行われる。
 この第3の実施例では、距離測定装置10を使って、SPADアレイ13の各SPADにおける測距を行う。累積部15から得られる観測されたヒストグラムから、演算部16によってピーク検出を行い、距離データを求める。そして、演算部16において、この距離データに対してノイズ除去を行う。
 図66は、本技術の第7の実施の形態の第3の実施例におけるノイズ除去の処理手順例を示す流れ図である。この処理により、距離データに対してノイズ除去を行う。この処理は、演算部16によって行われる。
 ステップS711とステップS719は、上述の第1の実施例において説明したため、ここでは説明を省略する。上述の第1の実施例のステップS712に代えて、以下のステップS714が実行される。
 ステップ714において、各時刻t、各位置(x,y)、各iについて、上述の式97を計算し、ZNR(t,x,y,i)を求める。ここで、w(t,x,y,i,t1,x1,y1,j)は、上述の式100によって表される。
 [第4の実施例]
 第4の実施例においては、測定している対象物(距離)が同じであると考えられる距離データについては、重みw(t,x,y,i,t1,x1,y1,j)を重くするようにしている。すなわち、以下の式106となる重みw(t,x,y,i,t1,x1,y1,j)を採用している。
Figure JPOXMLDOC01-appb-M000106
 ここで、式106について説明する。「時刻t、位置(x,y)において測定している対象物(距離)」と「時刻t1、位置(x1,y1)において測定している対象物(距離)」が同じであるか否かを判断する。これは、以下の式107により判断することができる。
Figure JPOXMLDOC01-appb-M000107
式107は、「時刻t、位置(x,y)のg番目の距離データ」と似ている距離のものが、「時刻t1、位置(x1,y1)の距離データ群」の中に存在しているか否かをチェックしている。ここで、g=1乃至C(t,x,y)である。式107の値が小さければ、「時刻t、位置(x,y)において測定している対象物(距離)」と「時刻t1、位置(x1,y1)において測定している対象物(距離)」が同じであると判断することができる。
 そして、「同じ」と判断した場合には、加算した方が、ノイズを除去することができる。そこで、式107の値が小さいほど、重みを重くして加算する。もちろん、加算する距離データは、「C(t1,x1,y1)個の時刻t1、位置(x1,y1)の距離データ群{Z(t1,x1,1y,j)|jは1乃至C(t1,x1,y1)}」の中で、Z(t,x,y,i)の値に一番近いものだけである。「一番近いものだけ」を採用するのは、上述の第2の実施例と同じである。つまり、重みは式106となる。
 なお、式106においては、重みを距離にも依存させている。距離依存については、上述の第1の実施例の(特徴1-1)と同じである。
 再度述べると、この第4の実施例における重みw(t,x,y,i,t1,x1,y1,j)の特徴は以下のとおりである。
 (特徴4-1) 「時刻t、位置(x,y)において測定している対象物(距離)」と「時刻t1、位置(x1,y1)において測定している対象物(距離)」が同じであると判断される場合には、重みを重くする。違うと判断した場合は重みを小さくする。なお、この判断は、同じ距離のものがあるか否かの判断(すなわち、式107)により行われる。
 第4の実施例では、距離測定装置10を使って、SPADアレイ13の各SPADにおける測距を行う。累積部15から得られる観測されたヒストグラムから、演算部16によってピーク検出を行い、距離データを求める。そして、演算部16において、この距離データに対してノイズ除去を行う。
 図67は、本技術の第7の実施の形態の第4の実施例におけるノイズ除去の処理手順例を示す流れ図である。この処理により、距離データに対してノイズ除去を行う。この処理は、演算部16によって行われる。
 ステップS711とステップS719は、上述の第1の実施例において説明したため、ここでは説明を省略する。上述の第1の実施例のステップS712に代えて、以下のステップS715が実行される。
 ステップS715において、各時刻t、各位置(x,y)、各iについて、式97を計算し、ZNR(t,x,y,i)を求める。ここで、w(t,x,y,i,t1,x1,y1,j)は、式106によって表される。
 [第5の実施例]
 第5の実施例においては、測定している対象物(距離)が同じであると考えられる距離データについては、重みw(t,x,y,i,t1,x1,y1,j)を重くするようにしている。すなわち、以下の式108となる重みw(t,x,y,i,t1,x1,y1,j)を採用している。なお、式108のαは、所望の定数である。
Figure JPOXMLDOC01-appb-M000108
上述の第4の実施例では、測定している対象物(距離)が同じであるか否かの判断に、その時刻、その位置における距離データを用いていた。これに対し、この第5の実施例では、測定している対象物(距離)が同じであるか否かの判断に、その時刻およびその時刻の周辺、その位置およびその位置の周辺における距離データを用いて判断している。
 ここで、式108について説明する。「時刻t、位置(x,y)において測定している対象物(距離)」と「時刻t1、位置(x1,y1)において測定している対象物(距離)」が同じであるか否かを判断する。この判断には、「時刻t、位置(x,y)」を中心とした時空間上の(2α+1)×(2α+1)×(2α+1)の領域内の距離データを使用する。そして、「時刻t1、位置(x1,y1)」を中心とした時空間上の(2α+1)×(2α+1)×(2α+1)の領域内の距離データを使用する。すなわち、以下の式109により判断する。
Figure JPOXMLDOC01-appb-M000109
 -α≦t0≦α、-α≦x0≦α、-α≦y0≦αの各t0、x0、y0について、「時刻t+t0、位置(x+x0,y+y0)において測定している対象物(距離)」と「時刻t1+t0、位置(x1+x0,y1+y0)において測定している対象物(距離)」が同じであるか否かを判断する。この各t0、x0、y0についての判断は、上述の第4の実施例における判断(式107)と同じである。全てのt0、x0、y0についての判断の合計が式109である。
 着目している「時刻t、位置(x,y)の測距データ」と「時刻t1、位置(x1,y1)の測距データ」のみの比較(第4の実施例における式107)ではなく、周辺の位置についても評価(式109)することによって、より正確な判断が可能となる。
 そして、「同じ」と判断した場合には、加算した方が、ノイズを除去することができる。そこで、式109の値が小さいほど、重みを重くして加算する。もちろん、加算する距離データは、「C(t1,x1,y1)個の時刻t1、位置(x1,y1)の距離データ群{Z(t1,x1,1y,j)|jは1乃至C(t1,x1,y1)}」の中で、Z(t,x,y,i)の値に一番近いものだけである。「一番近いものだけ」を採用するのは、上述の第2の実施例と同じである。つまり、重みは式108となる。
 再度述べると、この第5の実施例における重みw(t,x,y,i,t1,x1,y1,j)の特徴は以下のとおりである。
 (特徴5-1) 「時刻t、位置(x,y)において測定している対象物(距離)」と「時刻t1、位置(x1,y1)において測定している対象物(距離)」が同じであると判断される場合には、重みを重くする。違うと判断した場合は重みを小さくする。なお、この判断は、時空間上の周辺の位置も含めて同じ距離のものがあるか否かの判断(すなわち、式109)により行われる。
 この第5の実施例では、距離測定装置10を使って、SPADアレイ13の各SPADにおける測距を行う。累積部15から得られる観測されたヒストグラムから、演算部16によってピーク検出を行い、距離データを求める。そして、演算部16において、この距離データに対してノイズ除去を行う。
 図68は、本技術の第7の実施の形態の第5の実施例におけるノイズ除去の処理手順例を示す流れ図である。この処理により、距離データに対してノイズ除去を行う。この処理は、演算部16によって行われる。
 ステップS711とステップS719は、上述の第1の実施例において説明したため、ここでは説明を省略する。上述の第1の実施例のステップS712に代えて、以下のステップS716が実行される。
 ステップS716において、各時刻t、各位置(x,y)、各iについて、式97を計算し、ZNR(t,x,y,i)を求める。ここで、w(t,x,y,i,t1,x1,y1,j)は、式108によって表される。
 [第6の実施例]
 第6の実施例においては、距離測定装置10に併設したカメラ100を使用する。ここで、カメラ100とは画像を撮影することができる装置であり、距離測定装置10のSPADアレイ13が測定する方向と同じ方向を撮影する。
 「時間t、位置(x,y)においてSPADが測定している物体」に対応するカメラ100の画像内の画素位置を(u(t,x,y),v(t,x,y))とする。そして、カメラ100が時刻tで撮影した画像内の画素位置(u(t,x,y),v(t,x,y))の画素値をG(t,u(t,x,y),v(t,x,y))とする。
 なお、距離測定装置10とカメラ100が近接して設置されている場合は、画素値G(t,u(t,x,y),v(t,x,y))は、カメラ100において、時刻tで、SPADアレイ13の位置(x,y)のSPADが測距している方向と同じ方向を撮影した画素の値である。
 SPADアレイ13の着目時刻tの着目位置(x,y)のSPADが測定している物体に対応するカメラ100の画像内の画素値G(t,u(t,x,y),v(t,x,y))と、SPADアレイ13の時刻t1の位置(x1,y1)のSPADが測定している物体に対応するカメラ100の画像内の画素値G(t1,u(t1,x1,y1),v(t1,x1,y1))とが類似していれば、カメラ100内で同じ物体を撮影していると考えられ、すなわち、2つのSPADが測定している物体は同じと考えられる。一方、違う画素値であれば、違う物体を測定していると考えられる。
 そこで、カメラ100の画像内の画素値G(t,u(t,x,y),v(t,x,y))とG(t1,u(t1,x1,y1),v(t1,x1,y1))がほぼ同じ値であるときには、時刻t1の位置(x1,y1)の距離データの加算する重みを重くする。そうでなければ、加算する重みを小さくする、または、加算を行わない。このようにして、適切な距離データを加算することができ、ノイズ除去が可能となる。
 したがって、この第6の実施例においては、式110となる重みw(t,x,y,i,t1,x1,y1,j)を採用している。
Figure JPOXMLDOC01-appb-M000110
 なお、式110においては、重みを距離にも依存させている。距離依存については、上述の第1の実施例の(特徴1-1)と同じである。
 また、加算する距離データは、「C(t1,x1,y1)個の時刻t1、位置(x1,y1)の距離データ群{Z(t1,x1,1y,j)|jは1乃至C(t1,x1,y1)}」の中で、Z(t,x,y,i)の値に一番近いものだけである。「一番近いものだけ」を採用するのは、上述の第2の実施例と同じである。
 再度述べると、この第6の実施例における重みw(t,x,y,i,t1,x1,y1,j)の特徴は以下のとおりである。
 (特徴6-1)「時刻t、位置(x,y)において測定している対象物」と「時刻t1、位置(x1,y1)において測定している対象物」が同じであると判断される場合には、重みを重くする。違うと判断した場合は重みを小さくする。なお、この判断は、距離測定装置10に併設したカメラ100の画像において、対応する画素位置の画素値同士の類似度によって行われる。
 この第6の実施例では、距離測定装置10を使って、SPADアレイ13の各SPADにおける測距を行う。累積部15から得られる観測されたヒストグラムから、演算部16によってピーク検出を行い、距離データを求める。そして、演算部16において、この距離データに対してノイズ除去を行う。
 図69は、本技術の第7の実施の形態の第6の実施例におけるノイズ除去の処理手順例を示す流れ図である。この処理により、距離データに対してノイズ除去を行う。この処理は、演算部16によって行われる。
 まず、ステップS721において、各時刻t、各位置(x,y)におけるヒストグラムから、各時刻、各位置におけるピーク位置を求める。なお、各時刻、各位置におけるピーク位置は、複数ある場合もある。時刻t、位置(x,y)におけるピーク位置の数をC(t,x,y)とする。ピーク位置を(D×c/2)倍した値を、Z(t,x,y,i)とする。ここで、iは、複数あるピーク位置を示すパラメータであり、iは1乃至C(t,x,y)の値をとる。そして、ステップS722に進む。
 ステップS722において、各時刻tにおける併設するカメラからの画像を入力する。「時間t、位置(x,y)においてSPADが測定している物体」に対応するカメラ100の画像内の画素位置を(u(t,x,y),v(t,x,y))とする。そして、カメラ100が時刻tで撮影した画像内の画素位置(u(t,x,y),v(t,x,y))の画素値をG(t,u(t,x,y),v(t,x,y))とする。そして、ステップS723に進む。
 ステップS723において、各時刻t、各位置(x,y)、各iについて、式97を計算し、ZNR(t,x,y,i)を求める。ここで、w(t,x,y,i,t1,x1,y1,j)は、式110によって表される。そして、ステップS729に進む。
 ステップS729において、「ノイズ除去された時刻t、位置(x,y)のi番目の距離データ」として、ZNR(t,x,y,i)を出力端子17より出力する。そして、一連の処理を終了する。
 [第7の実施例]
 第7の実施例においては、距離測定装置10に併設したカメラ100を使用する(図1参照)。ここで、カメラ100とは画像を撮影することができる装置であり、距離測定装置10のSPADアレイ13が測定する方向と同じ方向を撮影する。
 「時間t、位置(x,y)においてSPADが測定している物体」に対応するカメラ100の画像内の画素位置を(u(t,x,y),v(t,x,y))とする。そして、カメラ100が時刻tで撮影した画像内の画素位置(u(t,x,y),v(t,x,y))の画素値をG(t,u(t,x,y),v(t,x,y))とする。
 なお、距離測定装置10とカメラ100が近接して設置されている場合は、画素値G(t,u(t,x,y),v(t,x,y))は、カメラ100において、時刻tで、SPADアレイ13の位置(x,y)のSPADが測距している方向と同じ方向を撮影した画素の値である。
 SPADアレイ13の着目時刻tの着目位置(x,y)のSPADが測定している物体に対応するカメラ100の画像内の画素値G(t,u(t,x,y),v(t,x,y))、および、その周辺の画素値G(t,u(t,x,y)+f1,v(t,x,y)+f2)のそれぞれと、SPADアレイ13の時刻t1の位置(x1,y1)のSPADが測定している物体に対応するカメラ100の画像内の画素値G(t1,u(t1,x1,y1),v(t1,x1,y1))、および、その周辺の画素値G(t1,u(t1,x1,y1)+f1,v(t1,x1,y1)+f2)とが類似していれば、カメラ100内で同じ物体を撮影していると考えられ、すなわち、2つのSPADが測定している物体は同じと考えられる。一方、違う画素値であれば、違う物体を測定していると考えられる。ここで、f1=-F乃至F、f2=-F乃至Fである。Fは、所望の定数であり、たとえば、F=2である。
 そこで、カメラ100の画像内の画素値G(t,u(t,x,y),v(t,x,y))およびG(t,u(t,x,y)+f1,v(t,x,y)+f2)のそれぞれとG(t1,u(t1,x1,y1),v(t1,x1,y1))およびG(t1,u(t1,x1,y1)+f1,v(t1,x1,y1)+f2)がほぼ同じ値であるときには、時刻t1の位置(x1,y1)の距離データの加算する重みを重くする。そうでなければ、加算する重みを小さくする、または、加算を行わない。このようにして、適切な距離データを加算することができ、ノイズ除去が可能となる。
 したがって、この第7の実施例においては、以下の式111となる重みw(t,x,y,i,t1,x1,y1,j)を採用している。
Figure JPOXMLDOC01-appb-M000111
 なお、式111においては、重みを距離にも依存させている。距離依存については、上述の第1の実施例の(特徴1-1)と同じである。
 また、加算する距離データは、「C(t1,x1,y1)個の時刻t1、位置(x1,y1)の距離データ群{Z(t1,x1,1y,j)|jは1乃至C(t1,x1,y1)}」の中で、Z(t,x,y,i)の値に一番近いものだけである。「一番近いものだけ」を採用するのは、上述の第2の実施例と同じである。
 再度述べると、この第7の実施例における重みw(t,x,y,i,t1,x1,y1,j)の特徴は以下のとおりである。
 (特徴7-1)「時刻t、位置(x,y)において測定している対象物」と「時刻t1、位置(x1,y1)において測定している対象物」とが同じであると判断される場合には、重みを重くする。違うと判断した場合は重みを小さくする。なお、この判断は、距離測定装置10に併設したカメラ100の画像において、対応する画素位置および周辺の画素位置の画素値同士の類似度によって行われる。
 この第7の実施例では、距離測定装置10を使って、SPADアレイ13の各SPADにおける測距を行う。累積部15から得られる観測されたヒストグラムから、演算部16によってピーク検出を行い、距離データを求める。そして、演算部16において、この距離データに対してノイズ除去を行う。
 図70は、本技術の第7の実施の形態の第7の実施例におけるノイズ除去の処理手順例を示す流れ図である。この処理により、距離データに対してノイズ除去を行う。この処理は、演算部16によって行われる。
 ステップS721、S722およびステップS729は、上述の第6の実施例において説明したため、ここでは説明を省略する。上述の第6の実施例のステップS723に代えて、以下のステップS724が実行される。
 ステップS724において、各時刻t、各位置(x,y)、各iについて、式97を計算し、ZNR(t,x,y,i)を求める。ここで、w(t,x,y,i,t1,x1,y1,j)は、式111によって表される。
 [まとめ]
 この第7の実施の形態の特徴は以下のとおりである。SPADアレイ13から得られる各時刻、各位置における距離データ同士の重み付き加算を行っている。特に、重みは、以下のようにして決める。
(特徴1-1)時空間上の距離に依存させて、距離が長いほど、重みを小さくしている。
(特徴1-2、特徴2-1)同じ時刻、同じ位置における複数ある距離データについて、ノイズ除去対象の距離データと類似しているものほど、重みを重くする。さらには、一番類似しているもの以外は、重みを0とする。
(特徴1-3)距離データの信頼度(すなわち、SPADアレイ13から得られる各ヒストグラムのピーク面積)に依存させて、信頼度が大きいほど、重みを重くしている。
(特徴3-1)時空間において方向に依存させて、重みを決定している。その方向に対して、測定している対象物(距離)が同じであると判断した場合は、その方向に対しての重みを重くする。違うと判断した場合は重みを小さくする(または、0にする)。
(特徴4-1)各時刻、各位置における距離データ群同士の類似度に依存させて、類似度が高いほど、重みを重くする。
(特徴5-1)各時刻、各位置を中心とする近傍領域内の距離データ群同士の類似度に依存させて、類似度が高いほど、重みを重くする。
(特徴6-1)併設するカメラ100の画像において、対応する画素位置の画素値同士の類似度に依存させて、類似度が高いほど、重みを重くする。
(特徴7-1)併設するカメラ100の画像において、対応する画素位置とその周辺画素位置の画素値同士の類似度に依存させて、類似度が高いほど、重みを重くする。
 また、この第7の実施の形態の利点は、以下のとおりである。すなわち、適切に距離データの重み付き加算を行うことにより、物体の位置関係を特定することもなく、かつ、膨大な計算量も必要とせず、ノイズを除去することができる。
 [要点]
 第7の実施の形態は、以下の点を要点とする。
(1)距離データのノイズ除去方法において、
 時空間上の各位置の距離データを入力する第1の入力ステップと、
 上記距離データを重み付き加算する第1の加算ステップと
を有し、
 上記第1の加算ステップでは、同じ時刻、同じ位置における上記距離データの中で、ノイズ除去対象の上記距離データと類似しているものほど、重みを重くする
ことを特徴とする距離データのノイズ除去方法。
(2)ToF方式のヒストグラムにおけるピークに対応する距離データのノイズ除去方法において、
 時空間上の各位置の距離データおよび上記ヒストグラムのピーク面積を入力する第2の入力ステップと、
 上記距離データを重み付き加算する第2の加算ステップと
を有し、
 上記第2の加算ステップでは、上記ピーク面積が大きいほど、対応する上記距離データの重みを重くする
ことを特徴とする距離データのノイズ除去方法。
(3)上記(1)における距離データのノイズ除去方法において、
 上記第1の加算ステップでは、同じ時刻、同じ位置における上記距離データの中で、ノイズ除去対象の上記距離データと最も類似しているもの以外は重みを0とする
ことを特徴とする距離データのノイズ除去方法。
(4)上記(1)または(3)における距離データのノイズ除去方法において、
 上記第1の加算ステップでは、時空間上の距離に依存させて、距離が長いほど、重みを小さくする
ことを特徴とする距離データのノイズ除去方法。
(5)上記(1)、(3)または(4)における距離データのノイズ除去方法において、
 上記第1の加算ステップでは、時空間における方向に依存させて、上記方向の距離データ同士が近い値であればあるほど、上記方向にある距離データの重みを重くする
ことを特徴とする距離データのノイズ除去方法。
(6)上記(1)、(3)乃至(5)における距離データのノイズ除去方法において、
 上記第1の加算ステップでは、各時刻、各位置における距離データ同士の類似度に依存させて、類似度が高いほど、重みを重くする
ことを特徴とする距離データのノイズ除去方法。
(7)上記(1)、(3)乃至(6)における距離データのノイズ除去方法において、
 上記第1の加算ステップでは、各時刻、各位置および上記時刻、上記位置の近傍における距離データ同士の類似度に依存させて、類似度が高いほど、重みを重くする
ことを特徴とする距離データのノイズ除去方法。
(8)上記(1)、(3)乃至(7)における距離データのノイズ除去方法において、
 画像を入力する第3の入力ステップをさらに有し、
 上記第1の加算ステップでは、各時刻、各位置における距離データに対応した上記画像の画素値同士の類似度に依存させて、類似度が高いほど、重みを重くする
ことを特徴とする距離データのノイズ除去方法。
(9)上記(1)、(3)乃至(7)における距離データのノイズ除去方法において、
 画像を入力する第4の入力ステップをさらに有し、
 上記第1の加算ステップでは、各時刻、各位置における距離データに対応した上記画像および周辺の画素値同士の類似度に依存させて、類似度が高いほど、重みを重くする
ことを特徴とする距離データのノイズ除去方法。
 <9.第8の実施の形態>
 [概要]
 この第8の実施の形態では、最終的に得る距離データについて、観測された距離データとなるべく等しくなるようにするとともに、隣接間でなるべく等しくなるような解を求めるようにしており、適切なノイズ除去を行う。すなわち、予め位置関係を想定しなくても、少ない演算量で適切なノイズ除去を行うものである。
 この第8の実施の形態においては、各時刻t、各位置(x,y)において作成されたヒストグラムからピークを検出し、そのピークに対応する時間にc/2を乗算して距離を算出することが、演算部16において行われる。各時刻t、各位置(x,y)において求められた距離をZ(t,x,y,i)とする。ここで、i=1乃至C(t,x,y)である。添え字iとC(t,x,y)については後述する。
 図71は、本技術の第8の実施の形態における距離測定の様子の一例を示す図である。
 同図に示すように、SPADアレイ13内の1つのSPADが、異なる距離にある物体(壁面801と壁面802)を同時に測距している場合を考える。1つのSPADは、1つの方向を測距するわけではなく、現実的には、ある程度の立体角をもった方向(図中の測距範囲)の全体を測距している。その測距範囲内に、壁面801と壁面802が存在している様子を示している。壁面801および壁面802は、それぞれ、距離Z(1)、Z(2)に存在するものとする。
 発光部12からのM回の発光において、壁面801での反射を経てSPADは受光することもある。または、壁面802での反射を経てSPADは受光することもある。もちろん、環境光も受光する。
 図72は、本技術の第8の実施の形態における距離測定の例における強度分布を示す図である。この場合、最終的に得られるヒストグラムには、2つのピークが存在する。すなわち、同図に示すように、距離Z(1)に対応するビン(Z(1)×2÷c÷D)と、距離Z(2)に対応するビン(Z(2)×2÷c÷D)とにピークが現れる。
 さらに一般化して、ある時刻tにおいて、SPADアレイ13内の位置(x,y)のSPADが、C(t,x,y)個の異なる距離にある物体を測距している場合を考える。このような状況で観測されたヒストグラムからピークを検出すると、C(t,x,y)個のピークが検出される。これらピークに対応するビンについて、「c×D÷2」倍することにより、C(t,x,y)個の距離を算出することができる。このようにして、算出された距離を、Z(t,x,y,i)とする。ここで、i=1乃至C(t,x,y)である。
 また、この第8の実施の形態の実施例においては、ピーク面積も利用するため、適宜、演算部16において、各ピークに対応するピーク面積も計算する。各時刻t、各位置(x,y)におけるi番目のピーク面積をS(t,x,y,i)とする。ここで、i=1乃至C(t,x,y)である。
 ピーク面積は、ピークの大きさを示しており、この値が小さいと、対応する距離データは信用できない。逆に、この値が大きいと、対応する距離データは信用できる。
 なお、ピーク検出およびピーク面積の求め方は、既知の方法があるため、その方法を適用することができる。つまり、例えば、ガスクロマトグラフ、液体クロマトグラフなどで取得されたクロマトグラムデータに対して行われる一般的な処理方法である。具体的な方法としては、例えば、「特開2014-211393:ピーク検出装置」や「特開平6-230001:クロマトグラフ用データ処理装置」に開示されている方法があり、これらの方法によりピーク検出およびピーク面積を求めることができる。
 以上をまとめると、従来からある既知の方法を使って、演算部16によって、各時刻t、各位置(x,y)におけるヒストグラムを解析して距離データを求めることができる。ここで、距離データは1つであるとは限らない。すなわち、C(t,x,y)個である。そして、第8の実施の形態は、各時刻t、各位置(x,y)におけるi番目の距離データZ(t,x,y,i)に対して、演算部16においてノイズ除去を行うことに特徴がある。ここで、tは1以上の整数である。x=1乃至X、y=1乃至Yである。i=1乃至C(t,x,y)である。このノイズ除去において、必要に応じて、ピーク面積の値S(t,x,y,i)も使用する。
 この第8の実施の形態における距離データZ(t,x,y,i)のノイズ除去を端的に表現すると以下の式112となる。
Figure JPOXMLDOC01-appb-M000112
すなわち、DataTerm(データ項:data term)と、SmoothTerm(平滑化項:smooth term、または、regularization term)の2つの項の和を最小とするようなZNR(t,x,y,i)求めることである。
 データ項であるDataTermは、観測値であるZ(t,x,y,i)と、なるべくZNR(t,x,y,i)が同じ値になるように作用する項である(後述する式113参照)。そして、平滑化項であるSmoothTermは、近傍同士のZNR(t,x,y,i)は似たような値になるように作用する項である(後述する式114参照)。
 [実施例]
 距離測定装置10を使って、SPADアレイ13の各SPADにおける測距を行う。累積部15から得られる観測されたヒストグラムから、演算部16によってピーク検出を行い、距離データおよび、ピーク面積の値を求める。そして、演算部16において、この距離データに対してノイズ除去を行う。
 ノイズ除去とは、より具体的には、上述の式112の解を求めることである。
 上述の式112中のDataTermは、以下の式113によって定義される。
Figure JPOXMLDOC01-appb-M000113
この式113に示すように、各時刻t、各位置(x,y)におけるi番目の求めたい距離データZNR(t,x,y,i)は、時刻t、位置(x,y)におけるi番目の観測された距離データZ(t,x,y,i)に近づくように作用する。ここで、ピーク面積の値S(t,x,y,i)が乗算されている。これは、以下の理由による。上述のとおり、観測された距離データZ(t,x,y,i)に対応するピーク面積の値が小さい場合は、その距離データZ(t,x,y,i)は、あまり信用できない。信用できない場合は、無理にZNR(t,x,y,i)をZ(t,x,y,i)に近づける必要はない。そこで、信用できない場合は小さい値であるS(t,x,y,i)を乗算することにより、DataTermへの寄与を少なくしている。逆に、信用できる場合は、大きな値であるS(t,x,y,i)を乗算することにより、DataTermへの寄与を多くしている。以上が、S(t,x,y,i)を乗算している理由である。
 上述の式112中のSmoothTermは、以下の式114によって定義される。
Figure JPOXMLDOC01-appb-M000114
 式114の第1項は、「注目している時刻t、位置(x,y)」と「その直後の時刻t+1、位置(x,y)」の関係、および、「注目している時刻t、位置(x,y)」と「その直前の時刻t-1、位置(x,y)」の関係を示している。時刻t-1、t、t+1では、時間が連続しており、同じ位置(x,y)のSPADが測定している対象物は、同じ距離にある可能性が十分高い。または、なめらかに変化しており、距離の差分は十分小さい。すなわち、ZNR(t,x,y,i)と同じ値のものが、ZNR(t+1,x,y,h)(ここで、h=1乃至C(t+1,x,y)である。)の中にあるはずである。すなわち、適切なhを選択すれば、ZNR(t,x,y,i)とZNR(t+1,x,y,h)の値は小さくなるはずである。同様に、適切なhを選択すれば、ZNR(t,x,y,i)とZNR(t-1,x,y,h)の値は小さくなるはずである。このことを式で表現したものが、式114の第1項である。
 ここで、αtは、時間方向のなめらかさの寄与率であり、0以上の所望の定数である。なお、αt=0のときは、時間方向のなめらかさは考慮しない場合となる。
 式114の第2項は、
「注目している時刻t、位置(x,y)」と「同じ時刻t、x方向の隣接した位置(x+1,y)」の関係、
「注目している時刻t、位置(x,y)」と「同じ時刻t、x方向の隣接した位置(x-1,y)」の関係、
「注目している時刻t、位置(x,y)」と「同じ時刻t、y方向の隣接した位置(x,y+1)」の関係、
「注目している時刻t、位置(x,y)」と「同じ時刻t、y方向の隣接した位置(x,y-1)」の関係を示している。これらは、空間的に連続しており、各SPADが測定している対象物は、同じ距離にある可能性が十分高い。または、なめらかに変化しており、距離の差分は十分小さい。すなわち、ZNR(t,x,y,i)と同じ値のものが、ZNR(t,x+1,y,h)(ここで、h=1乃至C(t,x+1,y)である。)の中にあるはずである。すなわち、適切なhを選択すれば、ZNR(t,x,y,i)とZNR(t,x+1,y,h)の値は小さくなるはずである。同様のことは、他の位置関係についてもいえる。このことを式で表現したものが、式114の第2項である。
 ここで、αxyは、空間方向のなめらかさの寄与率であり、0以上の所望の定数である。なお、αxy=0のときは、空間方向のなめらかさは考慮しない場合となる。
 式114は、時空間において、ZNR(t,x,y,i)がなめらかに変化するように作用する。
 図73は、本技術の第8の実施の形態の実施例におけるノイズ除去の処理手順例を示す流れ図である。この処理により、距離データのノイズ除去が行われる。
 まず、ステップS811において、各時刻t、各位置(x,y)におけるヒストグラムから、各時刻、各位置における「ピーク位置とピーク面積」の組を求める。なお、各時刻、各位置における「ピーク位置とピーク面積」の組は、複数ある場合もある。時刻t、位置(x,y)における「ピーク位置とピーク面積」の組の数をC(t,x,y)とする。ピーク位置を(D×c/2)倍した値を、Z(t,x,y,i)とする。また、ピーク面積をS(t,x,y,i)とする。ここで、iは、複数ある「ピーク位置とピーク面積」の組を示すパラメータであり、iは1乃至C(t,x,y)の値をとる。そして、ステップS812に進む。
 ステップS812において、式112を解き、ZNR(t,x,y,i)を求める。なお、式112中の各項は、式113および式114によって定義される。そして、ステップS813に進む。
 ステップS813において、「ノイズ除去された時刻t、位置(x,y)のi番目の距離データ」として、ZNR(t,x,y,i)を出力端子17より出力する。そして、一連の処理を終了する。
 なお、この第8の実施の形態の実施例においては、計算の簡略化のため、ピーク面積に依存させなくてもよい。すなわち、式113において、S(t,x,y,i)は、強制的に1(定数)として解いてもよい。
 このように、この第8の実施の形態の実施例によれば、予め位置関係を想定しなくても、少ない演算量で、ノイズ除去を行うことができる。
 [要点]
 第8の実施の形態は、以下の点を要点とする。
(1)距離データのノイズ除去方法において、
 時空間上の各位置の第1の距離データを入力する第1の入力ステップと、
 上記第1の距離データをから、ノイズ除去を行い、第2の距離データを計算するノイズ除去計算ステップと、
 上記第2の距離データを出力する出力ステップと
を有し、
 上記ノイズ除去計算ステップでは、上記第2の距離データが、上記第1の距離データと等しくなるように作用させる第1の作用素、および、時空間上の近接する上記第2の距離データ同士の中で差が最小となる上記第2の距離データの組が等しくなるように作用させる第2の作用素、の上記2つの作用素の合計が極値となるように、上記第2の距離データを決定する処理を行う
ことを特徴とする距離データのノイズ除去方法。
(2)上記(1)における距離データのノイズ除去方法において、
 上記第1の距離データとは、ToF方式によるヒストグラムにおけるピークより算出されたデータであり、
 上記第1の作用素は、上記ピークに対応する距離データについて、上記ピークのピーク面積により重み付けされた作用素である
ことを特徴とする距離データのノイズ除去方法。
 <10.第9の実施の形態>
 [概要]
 1つのSPADに対応するヒストグラム上に複数のピークが検出された場合、それぞれのピークから物体までの距離を算出することができるが、これら物体の境界(エッジ)の位置(すなわち、各物体の領域)が、どこにあるかは不明のままである。第9の実施の形態は、このような実情に鑑みてなされたものであり、エッジ位置(すなわち、各物体の領域)を検出するものである。
 [ヒストグラム]
 SPADアレイ13の各位置(x,y)には、SPADが配置されているものとする。ここで、x=0乃至X-1、y=0乃至Y-1であり、SPADの総数はX×Y個である。上述の説明においてはSPADの画素位置として1≦x≦X、1≦y≦Yとしたが、この第9の実施の形態では、座標系(u,v)との関係を一致させるために、0≦x≦X-1、0≦y≦Y-1とする。ヒストグラムの総数はX×Y個であり、他の実施の形態と同様である
 なお、(x,y)という変数は、SPADアレイ13の各SPADの位置を示す変数であり、整数の値をとる。一方、後述するように、(u,v)という変数は、SPADアレイ13の位置を示す変数であり、実数の値をとる。
 また、この第9の実施の形態では、時間方向については考慮しないため、位置(x,y)のヒストグラムをH(x,y,n)とする。ここで、xは0以上X-1以下の整数、yは0以上Y-1以下の整数である。そして、nはビンの番号を表しており、0以上N-1以下の整数である。
 [ヒストグラムと生起率の関係]
 ここでは1つのヒストグラムのみを考慮しているため、H(x,y,n)を単にh(n)と書くことにする。ここで、n=0乃至N-1である。
 生起率とは、他の実施の形態と同様であり、あるイベントが単位時間あたりに起こる発生回数である。
 なお、正確に述べると、「そのビンに対応する時間(D)内においてフォトンが飛来する確率」は、生起率に、時間Dを乗算した値である。しかし、ここでは、定数倍(D倍)は無視している。または、時間Dを単位時間と考えてもよい。さらに、または、この実施の形態においては、生起率の定義として、一般的に広く使われている用語「生起率」に対してD倍した値であると考えてもよい。
 さて、ビンnにおける生起率p(n)は、時間n×Dから時間(n+1)×Dの間に、SPADに光(フォトン)が飛来する確率である。時間n×D以前に光(フォトン)が飛来したかどうかに関係しない。
 一方、距離測定装置10内のSPADセンサ13の各SPADが検出する光(フォトン)は、最初に飛来した光(フォトン)であり、2番目以降に飛来した光(フォトン)は検出されない。具体例を示すと、ビン2に対応する時間に最初に光(フォトン)が飛来して、そして、ビン4に対応する時間に2番目の光(フォトン)が飛来して、さらに、ビン6に対応する時間に3番目の光(フォトン)が飛来した場合、ヒストグラム上には、h(2)だけがカウントされて、h(4)またはh(6)にはカウントされない。
 このように、それ以前に光(フォトン)が飛来したかに無関係な生起率p(n)と、それ以前に光(フォトン)が飛来した場合はカウントされないという頻度h(n)には、明確な違いがある。このことを考慮すると、生起率p(n)と頻度h(n)の関係を導くことができる。
 ビン0における生起率をp(0)とすると、M回の測定で、ビン0の頻度がh(0)となる確率は、以下の式115となる。
Figure JPOXMLDOC01-appb-M000115
なぜなら、p(0)の確率で起きるイベントが、M回のうちh(0)回起きる確率であるからである。
 ビン1における生起率をp(1)とする。M回の測定で、h(0)回はビン0で起きてしまったにもかかわらず、ビン1の頻度がh(1)となる確率は、以下の式116となる。
Figure JPOXMLDOC01-appb-M000116
なぜなら、p(1)の確率で起きるイベントが、M-h(0)回のうちh(1)回起きる確率であるからである。
 ビン2における生起率をp(2)とする。M回の測定で、h(0)回はビン0で起きてしまい、かつ、h(1)回はビン1で起きてしまったにもかかわらず、ビン2の頻度がh(2)となる確率は、以下の式117となる。
Figure JPOXMLDOC01-appb-M000117
なぜなら、p(2)の確率で起きるイベントが、M-h(0)-h(1)回のうちh(2)回起きる確率であるからである。
 同様にして、M回の測定で、h(m)回はビンmで起きてしまったにもかかわらず、ビンnの頻度がh(n)となる確率は、以下の式118となる。ここで、m=0乃至n-1である。
Figure JPOXMLDOC01-appb-M000118
 これらの説明から分かるように、各位置(x,y)のヒストグラムが観測されたとき、そのヒストグラムをH(x,y,n)とすると、位置(x,y)の生起率p(x,y,n)は、以下の式119となる。ここで、n=0乃至N-1である。
Figure JPOXMLDOC01-appb-M000119
 [生起率]
 図74は、本技術の第9の実施の形態において(u,v)座標系における各SPADの位置の例を示す図である。
 ここでは、SPADアレイ13内の各位置を(u,v)で表現する。uとvは、それぞれ、実数である。同図に示すように、x=0、y=0のSPADの中心位置は、(u,v)座標の原点(0,0)上にある。位置(x,y)のSPADの物理的領域は、以下の式120によって示されるAs(x,y)である。
Figure JPOXMLDOC01-appb-M000120
 また、SPADセンサ13内の(x,y)で示されるSPADが飛来してくる光(フォトン)により反応を起こす領域を、A(x,y)とする。つまり、(u,v)∈A(x,y)となる位置(u,v)に飛来した光(フォトン)により、位置(x,y)にあるSPADが反応することになる。また、位置(u,v)に光(フォトン)が入射されても、必ず、SPADが反応するわけではない。反応率をη(u,v,x,y)とする。位置(u,v)に光(フォトン)が入射された際に、η(u,v,x,y)の割合で、(x,y)で示されるSPADは反応する。なお、η(u,v,x,y)は、位置(u,v)に依存しており事前に測定しておくことにより、既知となる。測定が困難な場合は、η(u,v,x,y)は、SPADセンサ13内の(x,y)で示されるSPADの物理的領域As(x,y)以外の(u,v)においては0で、SPADセンサ13内の(x,y)で示されるSPADの物理的領域As(x,y)内の(u,v)においては一定の値と近似してもよい。
 なお、ここで、補足すると、理想的には、A(x,y)は、SPADセンサ13内の(x,y)で示されるSPADの物理的領域As(x,y)と一致する。つまり、理想的には、(x1,y1)≠(x2,y2)の場合、領域A(x1,y1)と領域A(x2,y2)の重なりは存在しない。しかしながら、実際には、(x1,y1)と(x2,y2)が隣接するSPAD同士である場合、領域A(x1,y1)と領域A(x2,y2)の重なりは存在する。その第1の理由としては、上述の図1の説明において、レンズ13aにより、飛来してくる光は各SPADに集光する旨説明した。もし、安価なレンズを使用した場合であると、十分に集光できずに、ボケることがある。つまり、SPADセンサ13内の(x1,y1)で示されるSPADに到達すべき方向から飛来した光(フォトン)が、レンズのボケにより、隣接する(x2,y2)で示されるSPADに到達することがあるからである。また、第2の理由として、(x1,y1)で示されるSPADの受け持つ領域に光(フォトン)が入射された場合でも、その光(フォトン)がSPADアレイを形成している半導体内を進み、隣接する(x2,y2)で示されるSPADに到達することがあるからである。したがって、ある位置(u,v)について、(x1,y1)≠(x2,y2)でも、η(u,v,x1,y1)≠0かつη(u,v,x2,y2)≠0となることがある。
 図75は、本技術の第9の実施の形態におけるA(x,y)とAs(x,y)の関係例を示す図である。
 同図に示すように、位置(x,y)のSPADの物理的領域As(x,y)と、位置(x,y)のSPADが反応を起こす領域A(x,y)とは一致しない。また、図中に示すように、領域A(x,y)内の任意の位置(u,v)における反応率はη(u,v,x,y)である。
 図76は、本技術の第9の実施の形態における距離測定の例における強度分布を示す図である。
 発光部12からの発光(短時間発光)は、時間(tとする)とともに強度が変化する。強度をf(t)とする。同図におけるAは、発光部12からの発光の強度の時間推移を示している。
 各位置(u,v)には、アクティブ光(発光部12からの光)が、対象物での反射を経て、入射される。対象物までの距離を、Z(u,v)とする。アクティブ光(発光部12からの光)の位置(u,v)への入射光は、発光部12からの発光に対して、2×Z(u,v)/cだけ遅れて到達する。また、光は距離の2乗に比例して減衰していく。対象物での反射率をa(u,v)とする。以上を加味すると、発光部12から発光されたときに、位置(u,v)に入射される光の強度は、以下の式121となる。
Figure JPOXMLDOC01-appb-M000121
 同図におけるBは、位置(u,v)へ入射するアクティブ光の強度の時間推移を示している。
 また、各位置(u,v)には、環境光(例えば、図1の太陽30からの光)も入射される。この入射される光(フォトン)は、ヒストグラムを作成する間、常に一定の確率で飛来する。この確率をb(u,v)とする。同図におけるCは、位置(u,v)へ入射する環境光の強度の時間推移を示している。
 位置(u,v)に入射される光の強度は、同図におけるBおよびCの合計であるから、以下の式122となる。
Figure JPOXMLDOC01-appb-M000122
 したがって、位置(x,y)にあるSPADのビンnの生起率は、以下の式123となる。
Figure JPOXMLDOC01-appb-M000123
式123は、式122に対して、時刻tをn番目のビンの時刻であるn×Dに変え、n番目のビンの時間幅Dを乗算して、さらに、反応率η(u,v,x,y)を乗算して、位置(x,y)で示されるSPADの領域A(x,y)内の(u,v)について積分している。
 さて、SPADアレイ13内の位置(x,y)のSPADが、C(x,y)個の異なる距離にある物体を測距している場合を考える。1つのSPADは、1つの方向を測距するわけではなく、現実的には、ある程度の立体角をもった方向の全体を測距している。その測距範囲内に、異なる距離にある物体が複数存在している場合である。
 C(x,y)個の対象物の距離をZ(x,y,i)とする。ここで、i=1乃至C(x,y)である。つまり、領域A(x,y)内の任意の位置(u,v)では、距離Z(u,v)の対象物からの反射を受けるが、Z(u,v)は、Z(x,y,i)(i=1乃至C(x,y))のいずれかである。
 C(x,y)個の対象物の反射率をa(x,y,i)とする。ここで、i=1乃至C(x,y)である。つまり、領域A(x,y)内の任意の位置(u,v)では、反射率a(u,v)の対象物からの反射を受けるが、a(u,v)は、a(x,y,i)(i=1乃至C(x,y))のいずれかである。
 つまり、式123により示された「位置(x,y)にあるSPADのビンnの生起率:p(x,y,n)」の式で、Z(u,v)およびa(u,v)の値は、それぞれ、C(x,y)個のZ(x,y,i)およびa(x,y,i)という値しかとらない。これを考慮すると、式123は式変形することができ、以下の式124となる。
Figure JPOXMLDOC01-appb-M000124
なお、ここで、集合B(i)(i=1乃至C(x,y))は、i番目の対象物が投影される位置(u,v)の集合である。また、式124の右辺の第1項は、nによらず一定である。
 図77は、本技術の第9の実施の形態の距離測定の例における生起率の分布を示す図である。
 同図に示すように、生起率p(x,y,n)(n=0乃至N-1)は、C(x,y)個のピークを持つグラフとなる。ピークに対応するビンは、2×Z(x,y,i)/c/Dである。ここで、i=1乃至C(x,y)である。
 図78は、本技術の第9の実施の形態の距離測定の例における生起率の分布を示す図である。
 同図において点線で囲まれた部分の面積は、各ピークにおけるピーク面積を示している。ピーク面積をS(x,y,i)とする。ここで、i=1乃至C(x,y)である。なお、「ピーク面積」は、ガスクロマトグラフや液体クロマトグラフの分野で一般的に使われる用語であり、この実施の形態においても、同じ意味で使用する。
 上述の式124から分かるように、ピーク面積S(x,y,i)は以下の式125を満たす。
Figure JPOXMLDOC01-appb-M000125
 また、C(x,y)=1のときは、位置(x,y)のSPADには1つの距離にある物体しか投影されていないことを意味するため、A(x,y)⊂B(1)である。したがって、C(x,y)=1のときは、上述の式11は以下の式126となる。
Figure JPOXMLDOC01-appb-M000126
 以上をまとめると、以下の通りである。距離測定装置10を用いて、SPADアレイ13の各SPADから得られる観測値であるヒストグラムH(x,y,n)から、式119により生起率p(x,y,n)を求める。生起率p(x,y,n)のn=0乃至N-1におけるピークを検出する。ピークの数をC(x,y)個とする。SPADアレイ13内の位置(x,y)のSPADは、C(x,y)個の異なる距離にある物体を測距していたことが分かる。そして、各ピークのピーク面積をS(x,y,i)とすると、式125の関係がある。特に、C(x,y)=1のときは、式126となる。
 なお、ピーク検出およびピーク面積の求め方は、既知の方法があるため、その方法を適用すればよい。つまり、例えば、ガスクロマトグラフ、液体クロマトグラフなどで取得されたクロマトグラムデータに対して行われる一般的な処理方法である。具体的な方法としては、例えば、特開2014-211393や特開平6-230001等に開示されている方法があり、この方法によりピーク検出およびピーク面積を求めることができる。
 [プレ処理]
 この実施の形態は、SPADアレイ13内のあるSPADが、複数の異なる距離にある物体を測距している場合において、それら物体のエッジの位置(すなわち、各物体の領域)を検出する処理に関するものである。具体的には、式119によって示される生起率p(x,y,n)に複数のピークがあるか否かにより、その位置(x,y)のSPADが、複数の物体を測距しているかを判定し、さらに、エッジ位置(すなわち、各物体の領域)を検出する処理が行われる。
 しかし、生起率p(x,y,n)に複数のピークがあったとしても、物体のエッジがあるとは限らない。そこで、物体のエッジがあるか、そうでないかという判断を、プレ処理として行う。このプレ処理について以下で説明する。
 図79は、本技術の第9の実施の形態における距離測定の様子の第1の例を示す図である。この図では、位置(x,y)のSPADが、2つの異なる距離にある物体を測距している場合を示している。すなわち、距離Z(1)にある壁面901と、距離Z(2)にある壁面902の2つの対象物を測距している。この場合、位置(x,y)のSPADから得られる観測値であるヒストグラムH(x,y,n)から、式119により生起率p(x,y,n)を求め、そして、生起率p(x,y,n)におけるピークを求めると、2×Z(1)/c/Dと2×Z(2)/c/Dの2つのビンが求まることになる。
 図80は、本技術の第9の実施の形態における距離測定の様子の第2の例を示す図である。
 同図において、距離Z(1)の場所に半透明物体903、距離Z(2)の場所に壁面904がある。半透明物体903は、半透明な物体であるため、光(フォトン)が通過する場合もあれば、反射する場合もある。したがって、SPADは、半透明物体903からの反射を受光することもあれば、壁面904からの反射を受光することもある。結果として、第1の例と同じようにピークが2×Z(1)/c/Dと2×Z(2)/c/Dの2つのビンで検出される。
 第1の例の場合は、この実施の形態を適用して、壁面901と壁面902の境界(エッジ)を検出するとよいが、第2の例の場合は、この実施の形態を適用せず、エッジなしという結論を出すべきである。プレ処理では、この判断を行う。
 このプレ処理は、周辺のSPAD(たとえば、位置(x-1,y)のSPAD、および、位置(x+1,y)のSPAD)の状況により判断される。
 第1の例の場合、周辺のSPADには、Z(1)の距離にある対象物のみを測定しているSPADがある(第1の例では、位置(x-1,y)のSPAD)。そして、Z(2)の距離にある対象物のみを測定しているSPADがある(第1の例では、位置(x+1,y)のSPAD)。
 一方、第2の例の場合、周辺のSPADも、Z(1)の距離にある対象物とZ(2)の距離にある対象物の2つの物体を測距している(第2の例では、位置(x-1,y)のSPAD、および、位置(x+1,y)のSPAD)。
 図81は、本技術の第9の実施の形態におけるプレ処理の処理手順例を示す流れ図である。このプレ処理では、位置(x,y)のSPADに投影された領域にエッジがあるか否かの判断が行われる。この処理は、演算部16によって行われる。
 まず、ステップS911において、位置(x,y)およびその周辺の位置(たとえば、5×5個)のSPADの観測値であるヒストグラムを入力する。なお、周辺の位置のSPADとは、上述の第1および第2の例では、x方向の両隣として説明したが、注目している位置(x,y)を中心とした5×5個程度のSPADを想定することができる。そして、ステップS912に進む。
 ステップS912において、位置(x,y)におけるヒストグラムから、式119より、位置(x,y)の生起率を求めて、生起率のピークを検出する。ピークの数をC(x,y)とする。また、ピーク位置のビンの値に対して、c×D/2倍した値(すなわち、距離)をZ(x,y,i)とする。ここで、i=1乃至C(x,y)である。そして、ステップS913に進む。
 ステップS913において、C(x,y)が2以上であるか否かを判定する。2以上であれば、ステップS914に進む。2未満であれば、ステップS917に進む。C(x,y)が2未満であるということは、位置(x,y)のSPADには、複数の異なる距離の物体が投影されていないことを意味する。
 ステップS914において、周辺の位置(x0,y0)のそれぞれにおけるヒストグラムから、式119より、位置(x0,y0)の生起率を求めて、生起率のピークを検出する。ピークの数をC(x0,y0)とする。また、ピーク位置のビンの値に対して、c×D/2倍した値(すなわち、距離)をZ(x0,y0,i)とする。ここで、i=1乃至C(x0,y0)である。そして、ステップS915に進む。
 ステップS915において、C(x,y)個のZ(x,y,i)(i=1乃至C(x,y) )のそれぞれに対して、「C(x0,y0)=1、かつ、Z(x0,y0,1)=Z(x,y,i)」を満たす周辺の位置(x0,y0)が少なくとも1つあるかを判定する。真であれば、ステップS916に進む。偽であれば、ステップS917に進む。この判定により、第1の例の場合は、ステップS916に進む。第2の例の場合は、ステップS917に進む。
 ステップS916において、「位置(x,y)のSPADは、エッジがある」という情報を出力する。そして、一連の処理を終了する。
 ステップS917において、「位置(x,y)のSPADは、エッジがない」という情報を出力する。そして、一連の処理を終了する。
 なお、ステップS915における「Z(x0,y0,1)=Z(x,y,i)」の判定について、補足する。実際には、測定誤差があるため、厳密に「Z(x0,y0,1)=Z(x,y,i)」となることは、ほぼありえない。そこで、誤差を考慮して、「Z(x,y,i)-δ≦Z(x0,y0,1)≦Z(x,y,i)+δ」であるか否かにより判定する。ここで、δは想定される誤差量であり、所望の小さな定数である。
 ここに示したプレ処理により、位置(x,y)のSPADの領域内に、物体のエッジがあるか否かの判定が可能となる。この実施の形態の各実施例を行う前に、このプレ処理を行い、「位置(x,y)のSPADは、エッジがある」と判断された場合のみ、この実施の形態の各実施例が行われる。そして、「位置(x,y)のSPADは、エッジがない」と判断された場合には、この実施の形態の各実施例は行われない。
 [入力データ]
 以降の各実施例において入力されるデータは、各位置(x,y)におけるC(x,y)である。そして、Z(x,y,i)およびS(x,y,i)である。ここで、i=1乃至C(x,y)である。
 これらの値は、以下のようにして算出することができる。距離測定装置10を使って、SPADアレイ13の各SPADから得られる観測値であるヒストグラムH(x,y,n)から、式119により生起率p(x,y,n)を求める。生起率p(x,y,n)のn=0乃至N-1におけるピークを検出する。ピークの数をC(x,y)個とする。ピーク位置のビンの値に対して、c×D/2倍した値(すなわち、距離)をZ(x,y,i)とする。また、各ピークのピーク面積をS(x,y,i)とする。このようにして、各位置(x,y)におけるC(x,y)、そして、Z(x,y,i)およびS(x,y,i)を求めることができる。これら算出処理は、各実施例の処理を行う前に、演算部16において行われる。
 [第1の実施例]
 第1の実施例は、注目している位置(x,y)のSPADの領域内において、C(x,y)個の物体の中の注目している物体(i番目とする。)の領域を決定する処理である。
 注目している物体であるi番目の物体の領域を、以下の式127によって表現する。すなわち、B(α,β,g)が、i番目の物体の領域である。
Figure JPOXMLDOC01-appb-M000127
ここで、α、β、および、gは、領域を確定するためのパラメータであり、ベクトル(α,β)の大きさは1とする。これらパラメータを求めることが、第1の実施例の最終目的である。
 注目している位置(x,y)の周辺のSPAD(たとえば、注目している位置(x,y)を中心とした5×5個)の位置の集合をG(x,y)とする。すなわち、位置(x-2,y-2)、位置(x-2,y-1)、位置(x-2,y)や、位置(x+2,y+2)など25個の位置が、G(x,y)に含まれる。位置(x,y)もG(x,y)に含まれるものとする。周辺G(x,y)内の位置(x1,y1)のSPADに関して、注目している物体であるi番目の物体の距離Z(x,y,i)と等しいものを、選び出すことにする。すなわち、以下の式128で示す集合A0(x,y,i)を確定させる。
Figure JPOXMLDOC01-appb-M000128
 なお、誤差を考慮して、「Z(x,y,i)-δ≦Z(x1,y1,j)≦Z(x,y,i)+δ」であれば、「注目している物体であるi番目の物体の距離Z(x,y,i)と等しい」とする。ここで、δは想定される誤差量であり、所望の小さな定数である。
 集合A0(x,y,i)の各要素に対して、以下の式129によって示される重み付き平均((u,v)座標系における重心位置)を求める。
Figure JPOXMLDOC01-appb-M000129
 式129によって示される位置(uavg,vavg)について説明する。周辺G(x,y)内において、「注目している物体であるi番目の物体の距離Z(x,y,i)と等しい」距離にある対象物を測距しているSPADの位置(x,y)の重み付き平均の位置が、式129である。このとき、重みとして、ピーク面積を採用している。
 ピーク面積S(x1,y1,j)の値が大きい場合、位置(x1,y1)のSPADには、距離Z(x,y,i)にある対象物が大きく投影されている(位置(x1,y1)のSPADが測距している範囲のほとんどに、距離Z(x,y,i)の対象物が投影されている)。
 ピーク面積S(x1,y1,j)の値が小さい場合、位置(x1,y1)のSPADには、距離Z(x,y,i)にある対象物が小さく投影されている(位置(x1,y1)のSPADが測距している範囲のほとんどは、距離Z(x,y,i)の対象物が投影されていない)。
 したがって、位置(uavg,vavg)は、距離Z(x,y,i)の対象物の重心と考えることができる。
 図74を用いて説明したように、。位置(x,y)のSPADの中心位置は、u=x、v=yである。したがって、ベクトル(x-uavg,y-vavg)は、注目している物体であるi番目の物体の境界(エッジ)と直交していると考えるのが妥当である。すなわち、上述の式127内のパラメータαとβは、以下の式130を満たす。
Figure JPOXMLDOC01-appb-M000130
 図82は、本技術の第9の実施の形態の第1の実施例におけるG(x,y)に含まれる位置におけるSPADの各位置を示す図である。すなわち、位置(x,y)のSPADを中心とした5×5のSPADを図示している。
 位置(x,y)のSPADのみ、見やすくするため、灰色で表示している。位置(x,y)のSPADの中心位置は、(u,v)座標系において、u=x、v=yである。また、上述の式129で示される位置(uavg,vavg)も図示している。位置(uavg,vavg)は、距離Z(x,y,i)の対象物の重心と考えることができる。α×u+β×v≦gで示される半平面(Half Plane)も図示している。この半平面がB(α,β,g)である。B(α,β,g)の境界である直線α×u+β×v=gと、ベクトル(x-uavg,y-vavg)は直交している。
 さて、上述の式125におけるB(i)に、上述の式127によって示されるB(α,β,g)を代入すると、以下の式131となる。
Figure JPOXMLDOC01-appb-M000131
 周辺G(x,y)内の位置(x1,y1)のSPADに関して、「注目している物体であるi番目の物体の距離Z(x,y,i)と等しく」、かつ、「その位置(x1,y1)におけるC(x1,y1)が1である」ものを、選び出すことにする。すなわち、以下の式132に示す集合A1(x,y,i)を確定させる。
Figure JPOXMLDOC01-appb-M000132
 なお、誤差を考慮して、「Z(x,y,i)-δ≦Z(x1,y1,j)≦Z(x,y,i)+δ」であれば、「注目している物体であるi番目の物体の距離Z(x,y,i)と等しい」とする。ここで、δは想定される誤差量であり、所望の小さな定数である。
 上述の式125と式126、および、式131と式132より、以下の式133が得られる。
Figure JPOXMLDOC01-appb-M000133
なお、式132に含まれる(x1,y1)についてはC(x1,y1)=1であり、C(x,y)=1のときは、式125は式126となることより、式133が成立することは明らかである。
 以上をまとめると、注目している位置(x,y)のSPADの領域内において、C(x,y)個の物体の中の注目しているi番目の物体の領域であるB(α,β,g)は、以下のようにして求めることができる。すなわち、式128乃至式130により、αとβを求めることができる。式132、および、先に求めたαとβを式133に代入した式により、gを求めることができる。
 なお、最終的に求める「i番目の物体の領域」は、位置(x,y)のSPADの領域内においてのみ求めればよいため、以下の式134が成立する。
Figure JPOXMLDOC01-appb-M000134
ここで、As(x,y)は、既出のとおり、位置(x,y)のSPADの物理的領域である。式134によって示される領域が、位置(x,y)のSPADの領域内における「i番目の物体の領域」である。
 図83は、本技術の第9の実施の形態の第1の実施例における物体の領域を求める処理の処理手順例を示す流れ図である。この処理は、位置(x,y)のSPADの領域内における「i番目の物体の領域」を求める処理である。この処理は、演算部16において行われる。
 まず、ステップS921において、位置(x,y)およびその周辺の位置(たとえば、5×5個)のSPADにおけるC(x,y)を入力する。そして、Z(x,y,i)およびS(x,y,i)も入力する。ここで、i=1乃至C(x,y)である。そして、ステップS922に進む。
 ステップS922において、式128乃至式130を計算して、αとβを確定させる。そして、ステップS923に進む。
 ステップS923において、式132と、ステップS922において求めたαとβを式133に代入した式によって、gを確定させる。そして、ステップS924に進む。
 ステップS924において、ステップS922およびS923において確定したα、βおよびgより、式134によって示す領域を出力する。そして、一連の処理を終了する。
 このようにして、位置(x,y)のSPADの領域内における「i番目の物体の領域」を求めることが可能となる。
 [第2の実施例]
 第2の実施例は、注目している位置(x,y)のSPADの領域内において、C(x,y)=2の場合、2つの物体のそれぞれの領域を決定する処理である。
 1番目の物体の領域を、B(α1,β1,g1)とする。B(α1,β1,g1)の補集合が2番目の物体の領域である。なお、B(・,・,・)の定義は、上述の式127である。ここで、α1、β1、および、g1は、領域を確定するためのパラメータであり、ベクトル(α1,β1)の大きさは1とする。これらパラメータを求めることが、第2の実施例の最終目的である。
 第1の実施例の式129と同様に考えて、距離Z(x,y,1)の対象物(1番目の物体)の重心位置(uavg1,vavg1)は、以下の式135となる。
Figure JPOXMLDOC01-appb-M000135
そして、距離Z(x,y,2)の対象物(2番目の物体)の重心位置(uavg2,vavg2)は、以下の式136となる。
Figure JPOXMLDOC01-appb-M000136
なお、ここで、A0(・,・,・)の定義は、上述の式128である。
 式135と式136によって示される2つの物体の重心位置を結んだベクトル(uavg2-uavg1,vavg2-vavg1)は、B(α1,β1,g1)の境界である直線α1×u+β1×v=g1と直交していると考えるのが妥当である。すなわち、パラメータα1とβ1は、以下の式137を満たす。
Figure JPOXMLDOC01-appb-M000137
 図84は、本技術の第9の実施の形態の第2の実施例におけるG(x,y)に含まれる位置におけるSPADの各位置を示す図である。すなわち、位置(x,y)のSPADを中心とした5×5のSPADを図示している。
 位置(x,y)のSPADのみ、見やすくするため、灰色で表示している。位置(x,y)のSPADの中心位置は、(u,v)座標系において、u=x、v=yである。また、式135および式136によって示される位置(uavg1,vavg1)および(uavg2,vavg2)も図示している。位置(uavg1,vavg1)は、距離Z(x,y,1)の対象物の重心と考えることができる。位置(uavg2,vavg2)は、距離Z(x,y,2)の対象物の重心と考えることができる。α1×u+β1×v≦g1によって示される半平面(Half Plane)も図示している。この半平面がB(α1,β1,g1)である。B(α1,β1,g1)の境界である直線α1×u+β1×v=g1と、ベクトル(uavg2-uavg1,vavg2-vavg1)は直交している。
 さて、第1の実施例の式133の導出と同様に考えると、以下の式138および式139が導出される。
Figure JPOXMLDOC01-appb-M000138
Figure JPOXMLDOC01-appb-M000139
なお、ここで、A1(・,・,・)の定義は、上述の式132の通りである。
 これら式138および式139より、以下の式140が求められる。
Figure JPOXMLDOC01-appb-M000140
 以上をまとめると、注目している位置(x,y)のSPADの領域内において、2個の物体の中の1番目の物体の領域であるB(α1,β1,g1)は、以下のようにして求めることができる。すなわち、式135乃至式137により、α1とβ1を求めることができる。先に求めたα1とβ1を式140に代入した式により、g1を求めることができる。
 なお、最終的に求める「1番目の物体の領域」は、位置(x,y)のSPADの領域内においてのみ求めればよいため、以下の式141が成立する。
Figure JPOXMLDOC01-appb-M000141
「2番目の物体の領域」は、位置(x,y)のSPADの領域内においてのみ求めればよいため、以下の式142が成立する。
Figure JPOXMLDOC01-appb-M000142
 図85は、本技術の第9の実施の形態の第2の実施例における物体の領域を求める処理の処理手順例を示す流れ図である。この処理は、位置(x,y)のSPADの領域内における「1番目の物体の領域」および「2番目の物体の領域」を求める処理である。この処理は、演算部16によって行われる。
 まず、ステップS931において、位置(x,y)およびその周辺の位置(たとえば、5×5個)のSPADにおけるC(x,y)を入力する。そして、Z(x,y,i)およびS(x,y,i)も入力する。ここで、i=1乃至C(x,y)である。そして、ステップS932に進む。
 ステップS932において、式135乃至式137を計算し、α1とβ1を確定させる。そして、ステップS933に進む。
 ステップS933において、ステップS932において求められたα1とβ1を式140に代入した式より、g1を確定させる。そして、ステップS934に進む。
 ステップS934において、ステップS932およびS933において確定したα1、β1およびg1より、式141および式142によって示される領域を出力する。そして、一連の処理を終了する。
 このようにして、位置(x,y)のSPADの領域内における「1番目の物体の領域」および「2番目の物体の領域」を求めることが可能となる。
 [第3の実施例]
 第3の実施例は、注目している位置(x,y)のSPADの領域内において、C(x,y)=3の場合、3つの物体のそれぞれの領域を決定する処理である。
 1番目の物体の領域を、B1(α1,β1,u0,v0)∩「B1(α3,β3,u0,v0)の補集合」とする。2番目の物体の領域を、B1(α2,β2,u0,v0)∩「B1(α1,β1,u0,v0)の補集合」とする。3番目の物体の領域を、B1(α3,β3,u0,v0)∩「B1(α2,β2,u0,v0)の補集合」とする。ここで、B1(・,・,・,・)は、以下の式143によって定義される集合である。
Figure JPOXMLDOC01-appb-M000143
ここで、α1、β1、α2、β2、α3、β3、および、u0、v0は、領域を確定するためのパラメータである。ベクトル(α1,β1)の大きさは1とする。ベクトル(α2,β2)の大きさは1とする。ベクトル(α3,β3)の大きさは1とする。これらパラメータを求めることが、第3の実施例の最終目的である。
 第1の実施例の式129と同様に考えて、距離Z(x,y,1)の対象物(1番目の物体)の重心位置(uavg1,vavg1)は、以下の式144となる。
Figure JPOXMLDOC01-appb-M000144
 そして、距離Z(x,y,2)の対象物(2番目の物体)の重心位置(uavg2,vavg2)は、以下の式145となる。
Figure JPOXMLDOC01-appb-M000145
 そして、距離Z(x,y,3)の対象物(3番目の物体)の重心位置(uavg3,vavg3)は以下の式146となる。
Figure JPOXMLDOC01-appb-M000146
なお、ここで、A0(・,・,・)の定義は、上述の式128の通りである。
 式144および式145によって示される1番目と2番目の物体の重心位置を結んだベクトル(uavg2-uavg1,vavg2-vavg1)は、1番目の物体の領域と2番目の物体の領域の境界である直線α1×(u―u0)+β1×(v―v0)=0と直交していると考えるのが妥当である。すなわち、パラメータα1とβ1は、以下の式147を満たす。
Figure JPOXMLDOC01-appb-M000147
 式145および式146によって示される2番目と3番目の物体の重心位置を結んだベクトル(uavg3-uavg2,vavg3-vavg2)は、2番目の物体の領域と3番目の物体の領域の境界である直線α2×(u―u0)+β2×(v―v0)=0と直交していると考えるのが妥当である。すなわち、パラメータα2とβ2は、以下の式148を満たす。
Figure JPOXMLDOC01-appb-M000148
 式146および式144によって示される3番目と1番目の物体の重心位置を結んだベクトル(uavg1-uavg3,vavg1-vavg3)は、3番目の物体の領域と1番目の物体の領域の境界である直線α3×(u―u0)+β3×(v―v0)=0と直交していると考えるのが妥当である。すなわち、パラメータα3とβ3は、以下の式149を満たす。
Figure JPOXMLDOC01-appb-M000149
 図86乃至図89は、本技術の第9の実施の形態の第3の実施例におけるG(x,y)に含まれる位置におけるSPADの各位置を示す図である。すなわち、位置(x,y)のSPADを中心とした5×5のSPADを図示している。これらは基本的に同じ図であるが、複数の物体の領域をそれぞれ示すために、複数の図に分けて描いている。
 図86においては、位置(x,y)のSPADを灰色によって表示している。位置(x,y)のSPADの中心位置は、(u,v)座標系において、u=x、v=yである。また、式144乃至式147によって示される位置(uavg1,vavg1)、(uavg2,vavg2)および(uavg3,vavg3)も図示している。位置(uavg1,vavg1)は、距離Z(x,y,1)の対象物の重心と考えることができる。位置(uavg2,vavg2)は、距離Z(x,y,2)の対象物の重心と考えることができる。位置(uavg3,vavg3)は、距離Z(x,y,3)の対象物の重心と考えることができる。
 図87においては、1番目の物体の領域B1(α1,β1,u0,v0)∩「B1(α3,β3,u0,v0)の補集合」を灰色によって表示している。α1×(u-u0)+β1×(v-v0)≦0とα3×(u-u0)+β3×(v-v0)>0の交わりである。
 図88においては、2番目の物体の領域B1(α2,β2,u0,v0)∩「B1(α1,β1,u0,v0)の補集合」を灰色によって表示している。α2×(u-u0)+β2×(v-v0)≦0とα1×(u-u0)+β1×(v-v0)>0の交わりである。
 図89においては、3番目の物体の領域B1(α3,β3,u0,v0)∩「B1(α2,β2,u0,v0)の補集合」を灰色によって表示している。α3×(u-u0)+β3×(v-v0)≦0とα2×(u-u0)+β2×(v-v0)>0の交わりである。
 さて、第2の実施例の式140の導出と同様に考えると、以下の式150が導出される。
Figure JPOXMLDOC01-appb-M000150
 以上をまとめると、注目している位置(x,y)のSPADの領域内において、3個の物体の中の
1番目の物体の領域であるB1(α1,β1,u0,v0)∩「B1(α3,β3,u0,v0)の補集合」、
2番目の物体の領域であるB1(α2,β2,u0,v0)∩「B1(α1,β1,u0,v0)の補集合」、
および、
3番目の物体の領域であるB1(α3,β3,u0,v0)∩「B1(α2,β2,u0,v0)の補集合」、
は、以下のようにして求めることができる。すなわち、式144乃至式149により、α1、β1、α2、β2、α3、および、β3を求めることができる。先に求めたα1、β1、α2、β2、α3、および、β3を式150に代入した式により、u0とv0を求めることができる。
 なお、最終的に求める「1番目の物体の領域」は、位置(x,y)のSPADの領域内においてのみ求めればよいため、以下の式151が成立する。
Figure JPOXMLDOC01-appb-M000151
「2番目の物体の領域」は、位置(x,y)のSPADの領域内においてのみ求めればよいため、以下の式152が成立する。
Figure JPOXMLDOC01-appb-M000152
「3番目の物体の領域」は、位置(x,y)のSPADの領域内においてのみ求めればよいため、以下の式153が成立する。
Figure JPOXMLDOC01-appb-M000153
 図90は、本技術の第9の実施の形態の第3の実施例における物体の領域を求める処理の処理手順例を示す流れ図である。この処理は、演算部16によって行われる。
 まず、ステップS941において、位置(x,y)およびその周辺の位置(たとえば、5×5個)のSPADにおけるC(x,y)を入力する。そして、Z(x,y,i)およびS(x,y,i)も入力する。ここで、i=1乃至C(x,y)である。そして、ステップS942に進む。
 ステップS942において、式144乃至式149を計算し、α1、β1、α2、β2、α3、および、β3を確定させる。そして、ステップS943に進む。
 ステップS943において、ステップS942において求めたα1、β1、α2、β2、α3、および、β3を式150に代入した式より、u0とv0を確定させる。そして、ステップS944に進む。
 ステップS944において、ステップS942およびS943において確定したα1、β1、α2、β2、α3、β3、u0とv0より、式151乃至式153によって示す領域を出力する。そして、一連の処理を終了する。
 このようにして、位置(x,y)のSPADの領域内における「1番目の物体の領域」、「2番目の物体の領域」および「3番目の物体の領域」を求めることが可能となる。
 [まとめ]
 まず、プレ処理について、特徴を述べる。注目しているSPADの周辺のSPADについて、それぞれヒストグラムを解析することにより、複数のピークがあるかを調べる(図81のステップS914)。周辺の全てのSPADが、複数のピークを有している(すなわち、各SPADの測距範囲には、複数の異なる距離にある物体がある)場合は、エッジが存在していないと判断する(図81のステップS915で偽という判断:図79の状態ではなく、図80の状態)。これにより、注目しているSPADにエッジが存在しているかの判断が可能となる。
 次に、本発明の各実施例について、特徴を述べる。観測されるヒストグラムから生起率を求める。生起率のピークおよびピーク面積を求める。ピーク面積の比から、注目しているSPADの領域内での、対応する距離にある物体の投影面積の割合を求めている(式133、式140または式150)。
 また、周辺画素も含めて各距離にある物体の重心を求めて、重心の位置関係から、物体の境界(エッジ)の方向を求めている(「式129と式130」、「式135乃至式137」、または、「式144乃至式149」)。
 これらにより、各距離にある物体の投影された領域を確定することができる。
 [要点]
 第9の実施の形態は、以下の点を要点とする。
(1)ヒストグラム情報を使った物体の領域検出方法において、
  複数のヒストグラムを入力する第1の入力ステップと、
 上記複数のヒストグラムのそれぞれについて、ピークの数をカウントするピーク数検知ステップと、
 上記複数のヒストグラムの全てにおいて、上記ピークの数が2以上であるかを判定する判定ステップと、
 上記判定ステップの結果が真である場合には、上記物体の領域の境界が存在していないという情報を出力する出力ステップと
を有する領域検出方法。
(2)ヒストグラム情報を使った物体の領域検出方法において、
 複数のヒストグラムを入力する第2の入力ステップと、
 上記複数のヒストグラムのそれぞれについて、ヒストグラムの合計数から若いビンの頻度を減算した値で、ヒストグラムのビンを割ることで生起率を求める第1の生起率計算ステップと、
 上記生起率のピークおよびピーク面積を求める第1のピーク検知ステップと、
 上記ピーク面積の比から、上記物体の領域の面積を確定させる面積計算ステップと
を有する領域検出方法。
(3)ヒストグラム情報を使った物体の領域検出方法において、
 複数のヒストグラムを入力する第3の入力ステップと、
 上記複数のヒストグラムのそれぞれについて、ヒストグラムの合計数から若いビンの頻度を減算した値で、ヒストグラムのビンを割ることで生起率を求める第2の生起率計算ステップと、
 上記生起率のピークおよびピーク面積を求める第2のピーク検知ステップと、
 上記ピークに対応するビンごとに、上記ヒストグラムの位置について、上記ピーク面積で重みをつけた重み付き平均を計算し重心を求める第1の重心位置計算ステップと、
 上記重心の位置関係から、上記物体の領域の境界の方向を求める第1の境界方向計算ステップと
を有する領域検出方法。
(4)上記(2)におけるヒストグラム情報を使った物体の領域検出方法において、
 上記ピークに対応するビンごとに、上記ヒストグラムの位置について、上記ピーク面積で重みをつけた重み付き平均を計算し重心を求める第2の重心位置計算ステップと、
 上記重心の位置関係から、上記物体の領域の境界の方向を求める第2の境界方向計算ステップと、
 上記面積計算ステップで得られた「上記物体の領域の面積」と、上記第2の境界方向計算ステップで得られた「上記物体の領域の境界の方向」より、上記物体の領域の位置を確定する位置決定ステップと
をさらに有する領域検出方法。
 <11.第10の実施の形態>
 [概要]
 1つのSPADに対応するヒストグラム上に複数のピークが検出された場合、それぞれのピークから物体までの距離を算出することができるが、これら物体の境界(エッジ)の位置(すなわち、各物体の領域)が、どこにあるかは不明のままである。第10の実施の形態は、このような実情に鑑みてなされたものであり、エッジ位置(すなわち、各物体の領域)を検出するものである。より具体的には、第10の実施の形態は、距離データの高解像度化を行うものである。そして、第10の実施の形態を適用した結果である高解像度化された距離データにより、エッジの詳細な位置が分かる。
 [ヒストグラム]
 SPADアレイ13の各位置(x,y)には、SPADが配置されているものとする。ここで、x=0乃至X-1、y=0乃至Y-1であり、SPADの総数はX×Y個である。上述の説明においてはSPADの画素位置として1≦x≦X、1≦y≦Yとしたが、この第10の実施の形態では、座標系(u,v)との関係を一致させるために、0≦x≦X-1、0≦y≦Y-1とする。ヒストグラムの総数はX×Y個であり、他の実施の形態と同様である
 なお、(x,y)という変数は、SPADアレイ13の各SPADの位置を示す変数であり、整数の値をとる。一方、後述するように、(u,v)という変数は、SPADアレイ13の位置を示す変数であり、実数の値をとる。さらに、後述するように、(α,β)という変数は、カメラ100から得られる高解像度の画像の画素位置を示す変数である。
 また、この第10の実施の形態では、時間方向については考慮しないため、位置(x,y)のヒストグラムをH(x,y,n)とする。ここで、xは0以上X-1以下の整数、yは0以上Y-1以下の整数である。そして、nはビンの番号を表しており、0以上N-1以下の整数である。
 [ヒストグラムと生起率の関係]
 ここでは1つのヒストグラムのみを考慮しているため、H(x,y,n)を単にh(n)と書くことにする。ここで、n=0乃至N-1である。
 生起率とは、他の実施の形態と同様であり、あるイベントが単位時間あたりに起こる発生回数である。
 なお、正確に述べると、「そのビンに対応する時間(D)内においてフォトンが飛来する確率」は、生起率に、時間Dを乗算した値である。しかし、ここでは、定数倍(D倍)は無視している。または、時間Dを単位時間と考えてもよい。さらに、または、この実施の形態においては、生起率の定義として、一般的に広く使われている用語「生起率」に対してD倍した値であると考えてもよい。
 さて、ビンnにおける生起率p(n)は、時間n×Dから時間(n+1)×Dの間に、SPADに光(フォトン)が飛来する確率である。時間n×D以前に光(フォトン)が飛来したかどうかに関係しない。
 一方、距離測定装置10内のSPADセンサ13の各SPADが検出する光(フォトン)は、最初に飛来した光(フォトン)であり、2番目以降に飛来した光(フォトン)は検出されない。具体例を示すと、ビン2に対応する時間に最初に光(フォトン)が飛来して、そして、ビン4に対応する時間に2番目の光(フォトン)が飛来して、さらに、ビン6に対応する時間に3番目の光(フォトン)が飛来した場合、ヒストグラム上には、h(2)だけがカウントされて、h(4)またはh(6)にはカウントされない。
 このように、それ以前に光(フォトン)が飛来したかに無関係な生起率p(n)と、それ以前に光(フォトン)が飛来した場合はカウントされないという頻度h(n)には、明確な違いがある。このことを考慮すると、生起率p(n)と頻度h(n)の関係を導くことができる。
 ビン0における生起率をp(0)とすると、M回の測定で、ビン0の頻度がh(0)となる確率は、以下の式154となる。
Figure JPOXMLDOC01-appb-M000154
なぜなら、p(0)の確率で起きるイベントが、M回のうちh(0)回起きる確率であるからである。
 ビン1における生起率をp(1)とする。M回の測定で、h(0)回はビン0で起きてしまったにもかかわらず、ビン1の頻度がh(1)となる確率は、以下の式155となる。
Figure JPOXMLDOC01-appb-M000155
なぜなら、p(1)の確率で起きるイベントが、M-h(0)回のうちh(1)回起きる確率であるからである。
 ビン2における生起率をp(2)とする。M回の測定で、h(0)回はビン0で起きてしまい、かつ、h(1)回はビン1で起きてしまったにもかかわらず、ビン2の頻度がh(2)となる確率は、以下の式156となる。
Figure JPOXMLDOC01-appb-M000156
なぜなら、p(2)の確率で起きるイベントが、M-h(0)-h(1)回のうちh(2)回起きる確率であるからである。
 同様にして、M回の測定で、h(m)回はビンmで起きてしまったにもかかわらず、ビンnの頻度がh(n)となる確率は、以下の式157となる。ここで、m=0乃至n-1である。
Figure JPOXMLDOC01-appb-M000157
 これらの説明から分かるように、各位置(x,y)のヒストグラムが観測されたとき、そのヒストグラムをH(x,y,n)とすると、位置(x,y)の生起率p(x,y,n)は、以下の式158となる。ここで、n=0乃至N-1である。
Figure JPOXMLDOC01-appb-M000158
 [生起率]
 図91は、本技術の第10の実施の形態において(u,v)座標系における各SPADの位置の例を示す図である。
 ここでは、SPADアレイ13内の各位置を(u,v)で表現する。uとvは、それぞれ、実数である。同図に示すように、x=0、y=0のSPADの中心位置は、(u,v)座標の原点(0,0)上にある。位置(x,y)のSPADの物理的領域は、以下の式159によって示されるA(x,y)である。
Figure JPOXMLDOC01-appb-M000159
 図92は、本技術の第10の実施の形態における距離測定の例における強度分布を示す図である。
 発光部12からの発光(短時間発光)は、時間(tとする)とともに強度が変化する。強度をf(t)とする。同図におけるAは、発光部12からの発光の強度の時間推移を示している。
 各位置(u,v)には、アクティブ光(発光部12からの光)が、対象物での反射を経て、入射される。対象物までの距離を、Z(u,v)とする。アクティブ光(発光部12からの光)の位置(u,v)への入射光は、発光部12からの発光に対して、2×Z(u,v)/cだけ遅れて到達する。また、光は距離の2乗に比例して減衰していく。対象物での反射率をa(u,v)とする。以上を加味すると、発光部12から発光されたときに、位置(u,v)に入射される光の強度は、以下の式160となる。
Figure JPOXMLDOC01-appb-M000160
 同図におけるBは、位置(u,v)へ入射するアクティブ光の強度の時間推移を示している。
 また、各位置(u,v)には、環境光(例えば、図1の太陽30からの光)も入射される。この入射される光(フォトン)は、ヒストグラムを作成する間、常に一定の確率で飛来する。この確率をb(u,v)とする。同図におけるCは、位置(u,v)へ入射する環境光の強度の時間推移を示している。
 位置(u,v)に入射される光の強度は、同図におけるBおよびCの合計であるから、以下の式161となる。
Figure JPOXMLDOC01-appb-M000161
 したがって、位置(x,y)にあるSPADのビンnの生起率は、以下の式162となる。
Figure JPOXMLDOC01-appb-M000162
式162は、式161に対して、時刻tをn番目のビンの時刻であるn×Dに変え、
n番目のビンの時間幅Dを乗算して、位置(x,y)で示されるSPADの領域A(x,y)内の(u,v)について積分している。なお、第9の実施の形態においては、式162に相当応する式である式123の導出において、反応率η(u,v,x,y)を乗算している。この第10の実施の形態においては、反応率η(u,v,x,y)は一定であるとして省略している。また、式123の導出において、SPADが反応を起こす領域とSPADの物理的領域を区別して説明したが、この第10の実施の形態においては、SPADが反応を起こす領域とSPADの物理的領域は同一であり、式159であるとして説明する。
 さて、SPADアレイ13内の位置(x,y)のSPADが、C(x,y)個の異なる距離にある物体を測距している場合を考える。1つのSPADは、1つの方向を測距するわけではなく、現実的には、ある程度の立体角をもった方向の全体を測距している。その測距範囲内に、異なる距離にある物体が複数存在している場合である。
 C(x,y)個の対象物の距離をZ(x,y,i)とする。ここで、i=1乃至C(x,y)である。つまり、領域A(x,y)内の任意の位置(u,v)では、距離Z(u,v)の対象物からの反射を受けるが、Z(u,v)は、Z(x,y,i)(i=1乃至C(x,y))のいずれかである。
 C(x,y)個の対象物の反射率をa(x,y,i)とする。ここで、i=1乃至C(x,y)である。つまり、領域A(x,y)内の任意の位置(u,v)では、反射率a(u,v)の対象物からの反射を受けるが、a(u,v)は、a(x,y,i)(i=1乃至C(x,y))のいずれかである。
 つまり、式162により示された「位置(x,y)にあるSPADのビンnの生起率:p(x,y,n)」の式で、Z(u,v)およびa(u,v)の値は、それぞれ、C(x,y)個のZ(x,y,i)およびa(x,y,i)という値しかとらない。これを考慮すると、式162は式変形することができ、以下の式163となる。
Figure JPOXMLDOC01-appb-M000163
なお、ここで、集合B(i)(i=1乃至C(x,y))は、i番目の対象物が投影される位置(u,v)の集合である。また、式163の右辺の第1項は、nによらず一定である。
 図93は、本技術の第10の実施の形態の距離測定の例における生起率の分布を示す図である。
 同図に示すように、生起率p(x,y,n)(n=0乃至N-1)は、C(x,y)個のピークを持つグラフとなる。ピークに対応するビンは、2×Z(x,y,i)/c/Dである。ここで、i=1乃至C(x,y)である。
 図94は、本技術の第10の実施の形態の距離測定の例における生起率の分布を示す図である。
 同図において点線で囲まれた部分の面積は、各ピークにおけるピーク面積を示している。ピーク面積をS(x,y,i)とする。ここで、i=1乃至C(x,y)である。なお、「ピーク面積」は、ガスクロマトグラフや液体クロマトグラフの分野で一般的に使われる用語であり、この実施の形態においても、同じ意味で使用する。
 上述の式163から分かるように、ピーク面積S(x,y,i)は以下の式164を満たす。
Figure JPOXMLDOC01-appb-M000164
なお、式164におけるμ(A(x,y)∩B(i))は、2次元平面上の領域であるA(x,y)∩B(i)の面積を意味する。
 以上をまとめると、以下の通りである。距離測定装置10を用いて、SPADアレイ13の各SPADから得られる観測値であるヒストグラムH(x,y,n)から、式158により生起率p(x,y,n)を求める。生起率p(x,y,n)のn=0乃至N-1におけるピークを検出する。ピークの数をC(x,y)個とする。SPADアレイ13内の位置(x,y)のSPADは、C(x,y)個の異なる距離にある物体を測距していたことが分かる。そして、各ピークのピーク面積をS(x,y,i)とすると、式164の関係がある。つまり、S(x,y,i)は、A(x,y)∩B(i)の面積に比例する。
 なお、ピーク検出およびピーク面積の求め方は、既知の方法があるため、その方法を適用すればよい。つまり、例えば、ガスクロマトグラフ、液体クロマトグラフなどで取得されたクロマトグラムデータに対して行われる一般的な処理方法である。具体的な方法としては、例えば、特開2014-211393や特開平6-230001等に開示されている方法があり、この方法によりピーク検出およびピーク面積を求めることができる。
 図95は、本技術の第10の実施の形態における距離測定の様子の一例を示す図である。
 同図は、C(x,y)=2となる状況の例を示している。すなわち、同図は、位置(x,y)のSPADが、2つの異なる距離にある物体を測距している場合を示している。距離Z(1)にある壁面1001と、距離Z(2)にある壁面1002の2つの対象物を測距している。この場合、位置(x,y)のSPADから得られる観測値であるヒストグラムH(x,y,n)から、式158により生起率p(x,y,n)を求め、そして、生起率p(x,y,n)におけるピークを求めると、2×Z(1)/c/Dと2×Z(2)/c/Dの2つのビンが求められることになる。
 [撮影画像]
 第10の実施の形態においては、距離測定装置10に併設したカメラ100を使用する(図1参照)。ここで、カメラ100とは画像を撮影することができる装置であり、距離測定装置10のSPADアレイ13が測定する方向と同じ方向を撮影する。この実施の形態においては、カメラ100はカラーカメラ、すなわち、撮影画像の各画素はRGBの値を有するものとして説明する。以降では、カラー画像と呼ぶことにする。
 また、カメラ100は、高解像度のカメラであるものとする。すなわち、カラー画像の画素数は、横方向(Q×X)、縦方向(Q×Y)とする。ここで、既出のとおり、Xは、SPADアレイ13の横方向のSPADの数、Yは、縦方向のSPADの数である。Qは1を超える値であり、例えば、Q=2、4、6、8などである。SPADアレイ13の各SPADには、カラー画像の中のQ×Q画素が対応することになる。
 「SPADアレイ13の各位置(x,y)のSPADが測定している物体」に対応する「カメラ100の撮影画像(カラー画像)内の画素の位置」を、(α(x,y,q),β(x,y,q))とする。ここで、q=1乃至Q×Qである。
 換言すれば、「SPADアレイ13の各位置(x,y)のSPADが撮影している測距範囲」である立体角内に含まれる方向を撮影している「カラー画像の画素」は、(α(x,y,q),β(x,y,q))に位置する画素である。ここで、q=1乃至Q×Qである。
 図96は、本技術の第10の実施の形態におけるSPADとカラー画像の画素の位置関係の一例を示す図である。
 同図は、Q=6の例を示している。外側の大きな矩形が、SPADアレイ13の位置(x,y)のSPADを示している。すなわち、この矩形領域内が、A(x,y)である。この領域内には、Q×Q個の「カラー画像の画素」が対応している。すなわち、同図に示すように、(α(x,y,q),β(x,y,q))(q=1乃至Q×Q)に位置するカラー画像の画素が対応している。なお、図中において、小さい36個の矩形が、それぞれ、「カラー画像の画素」である。また、小さい矩形の色の違いについては、後述する。
 従来、X×Y個のSPADを有するSPADアレイ13による測距結果(距離データ)は、X×Y個であった。つまり、解像度はX×Yであった。この実施の形態を適用することにより、カラー画像の画素数と同じ画素数の距離データを得ることができる。すなわち、Q×Q倍の高解像度化を行うことができる。この実施の形態の最終目的は、カラー画像の各画素位置上に距離データを確定させることである。
 以下では、カラー画像の2つの画素の位置(α1,β1)と(α2,β2)が近傍同士であるものとする。画素位置(α1,β1)のRGB値と、画素位置(α2,β2)のRGB値とが、ほぼ同じ値であれば、同じ物体を測定しているといえる。したがって、これら2つの位置に対応する距離データは同じであるといえる。
 一方、画素位置(α1,β1)のRGB値と、画素位置(α2,β2)のRGB値とが、全く違う値であれば、違う物体を測定しているといえる。したがって、これら2つの位置に対応する距離データは同じとはいえない。
 このことを、図96を用いて説明する。同図は、C(x,y)=3の場合の説明図である。すなわち、位置(x,y)のSPADの領域A(x,y)に、3つの異なる距離にある物体が投影されている場合である。Q×Q=36個の(α(x,y,q),β(x,y,q))(q=1乃至Q×Q)の位置のRGB値が似ているもの同士で、3つの組に分けること(領域分割)を考える。3つに分けた結果、図中の小さい白い矩形で表されるグループ、小さい灰色の矩形で表されるグループ、そして、小さい黒い矩形で表されるグループとなったとする。各グループに属する小さい矩形の位置は、同じ距離にある物体が投影されたと考えるのが妥当である。したがって、(α(x,y,q),β(x,y,q))(q=1乃至Q×Q)のうち、白い矩形で表された位置は、距離Z(x,y,1)、Z(x,y,2)、または、Z(x,y,3)のいずれかである。灰色の矩形で表された位置は、距離Z(x,y,1)、Z(x,y,2)、または、Z(x,y,3)のいずれかである。黒い矩形で表された位置は、距離Z(x,y,1)、Z(x,y,2)、または、Z(x,y,3)のいずれかである。これらは排他的である。
 [入力データ]
 後述する実施例において入力されるデータは、各位置(x,y)におけるC(x,y)である。そして、Z(x,y,i)およびS(x,y,i)である。ここで、i=1乃至C(x,y)である。
 これらの値は、以下のようにして算出することができる。距離測定装置10を使って、SPADアレイ13の各SPADから得られる観測値であるヒストグラムH(x,y,n)から、式158により生起率p(x,y,n)を求める。生起率p(x,y,n)のn=0乃至N-1におけるピークを検出する。ピークの数をC(x,y)個とする。ピーク位置のビンの値に対して、c×D/2倍した値(すなわち、距離)をZ(x,y,i)とする。また、各ピークのピーク面積をS(x,y,i)とする。このようにして、各位置(x,y)におけるC(x,y)、そして、Z(x,y,i)およびS(x,y,i)を求めることができる。これら算出処理は、実施例の処理を行う前に、演算部16において行われる。
 [実施例]
 この実施例では、各位置(x,y)におけるC(x,y)を入力とする。また、Z(x,y,i)およびS(x,y,i)も入力とする。ここで、x=0乃至X-1、y=0乃至Y-1、i=1乃至C(x,y)である。さらに、(Q×X)×(Q×Y)個の画素数を有するカラー画像の各画素値(RGB値)も入力とする。
 この実施例を適用することにより、カラー画像の各画素位置における距離データを得ることができる。すなわち、各位置(x,y)に対応しているカラー画像のQ×Q個の画素の位置(α(x,y,q),β(x,y,q))(q=1乃至Q×Q)に距離データをアサインさせることが、この実施の形態の最終目的である。
 まず、注目している位置(x,y)の周辺のSPAD(たとえば、注目している位置(x,y)を中心とした3×3個)の位置の集合をG(x,y)とする。すなわち、位置(x-1,y-1)、位置(x-1,y)、位置(x-1,y+1)や、位置(x+1,y+1)など9個の位置が、G(x,y)に含まれる。位置(x,y)もG(x,y)に含まれるとする。周辺G(x,y)内の位置(x1,y1)のSPADに関して、注目している位置(x,y)の注目している物体であるi番目の物体の距離Z(x,y,i)と等しいものを、選び出すことにする。すなわち、以下の式165で示す集合A0(x,y,i)を確定させる。
Figure JPOXMLDOC01-appb-M000165
ここで、i=1乃至C(x,y)である。なお、誤差を考慮して、「Z(x,y,i)-δ≦Z(x1,y1,j)≦Z(x,y,i)+δ」であれば、「注目している物体であるi番目の物体の距離Z(x,y,i)と等しい」とする。ここで、δは想定される誤差量であり、所望の小さな定数である。
 集合A0(x,y,i)の各要素に対して、以下の式166で示される重み付き平均((u,v)座標系における重心位置)を求める。
Figure JPOXMLDOC01-appb-M000166
 式166で示される位置(uavg(i),vavg(i))について説明する。周辺G(x,y)内において、「注目している物体であるi番目の物体の距離Z(x,y,i)と等しい」距離にある対象物を測距しているSPADの位置(x,y)の重み付き平均の位置が、式166である。このとき、重みとして、ピーク面積を採用している。
 ピーク面積S(x1,y1,j)の値が大きい場合、位置(x1,y1)のSPADには、距離Z(x,y,i)にある対象物が大きく投影されている(位置(x1,y1)のSPADが測距している範囲のほとんどに、距離Z(x,y,i)の対象物が投影されている)。
 ピーク面積S(x1,y1,j)の値が小さい場合、位置(x1,y1)のSPADには、距離Z(x,y,i)にある対象物が小さく投影されている。(位置(x1,y1)のSPADが測距している範囲のほとんどは、距離Z(x,y,i)の対象物が投影されていない。)
 したがって、位置(uavg(i),vavg(i))は、距離Z(x,y,i)の対象物の重心と考えることができる。この事柄は重要であるため、明示的に「性質1」として示す。
性質1:位置(uavg(i),vavg(i))は、距離Z(x,y,i)の対象物の重心である。
 図97乃至図104は、本技術の第10の実施の形態の実施例におけるSPADとカラー画像の画素の位置関係例を示す図である。以下では、具体例として、C(x,y)=3、Q=6の場合について説明する。
 ここでは、G(x,y)に含まれる位置におけるSPADを示している。すなわち、位置(x,y)のSPADを中心とした3×3のSPADを図示している。特に、図97には、各SPADの位置を明示している。
 図98には、式166により計算された位置(uavg(i),vavg(i))を示している。ここで、i=1乃至C(x,y)である。
 図99は、カラー画像の各画素位置を示している。G(x,y)に含まれる9つのSPADのそれぞれの領域内には、Q×Q個の小さな矩形が記されている。この小さな矩形の1つ1つが、カラー画像の画素位置である。
 注目している位置(x,y)のSPAD(図中の中心のSPAD)内に含まれるQ×Q個の画素位置におけるRGB値で似ているもの同士をC(x,y)個のグループに分けること(領域分割)を行う。図100では、白い矩形と、灰色の矩形と、黒い矩形で、この3つのグループ分けの結果を示している。このグループ分けは、図96を用いて説明した事柄と同様である。
 図100において示した白い矩形におけるRGB値の平均値を、RGB(1)とする。また、灰色の矩形におけるRGB値の平均値を、RGB(2)とする。また、黒い矩形におけるRGB値の平均値を、RGB(3)とする。
 上述の「位置(x,y)のSPAD内についてのC(x,y)個のグループに分け」を行った後、残りの位置のSPAD内の画素位置について、グループ分けを行う。すなわち、図101に示す小さな矩形の1つ1つについて、どのグループに属するかを確定させる。各「小さな矩形」の位置におけるRGB値が、RGB(i)(i=1乃至C(x,y))のいずれに近いかを判別する。その結果、RGB(1)に近ければ、白い矩形と同じグループとする。また、RGB(2)に近ければ、灰色と矩形と同じグループとする。また、RGB(3)に近ければ、黒い矩形と同じグループとする。その結果は、例えば、図102のようになる。
 これにより、G(x,y)に含まれる9つのSPADの領域内にある小さな矩形(カラー画像の画素位置)全てについて、いずれのグループに属しているかが決定される。この結果は、例えば、図103のようになる。図103は、図100および図102を合成した図である。
 上述の「G(x,y)に含まれるSPADの領域内にあるカラー画像の画素位置のグループ分け」を行った後、各グループの重心を求める。すなわち、白い矩形のグループに属する画素位置の重心を求めて、その(u,v)座標を(useg(1),vseg(1))とする。灰色の矩形のグループに属する画素位置の重心を求めて、その(u,v)座標を(useg(2),vseg(2))とする。黒い矩形のグループに属する画素位置の重心を求めて、その(u,v)座標を(useg(3),vseg(3))とする。このようにして得られた(useg(i),vseg(i))(i=1乃至C(x,y))を図示したものが、図104である。
 G(x,y)に含まれるSPAD、つまり、G(x,y)に含まれるSPADの領域内にあるカラー画像の画素位置に、C(x,y)個の異なる距離にある物体が投影されているとする。この場合、これらC(x,y)個の異なる距離にある物体は、図103によって示されたC(x,y)個の領域(白い矩形のグループ、灰色の矩形のグループ、および、黒い矩形のグループ)のそれぞれに投影されていると考えるのが妥当である。そして、これらC(x,y)個の異なる距離にある物体の重心は、(useg(i),vseg(i))(i=1乃至C(x,y))に位置すると考えるのが妥当である。この事柄は重要であるため、明示的に「性質2」とする。
性質2:C(x,y)個の異なる距離にある物体それぞれの重心は、(useg(i),vseg(i))(i=1乃至C(x,y))のいずれかに位置する。
 ここで、以下について注意が必要である。距離Z(x,y,1)にある物体の重心位置は、性質1より、(uavg(1),vavg(1))である。しかし、(useg(1),vseg(1))とは言い切れない。距離Z(x,y,1)にある物体の重心位置は、(useg(1),vseg(1))、(useg(2),vseg(2))、または、(useg(3),vseg(3))のいずれかである。同様のことは、距離Z(x,y,2)にある物体、距離Z(x,y,3)にある物体についてもいえる。したがって、集合{(uavg(i),vavg(i))|i=1乃至C(x,y)}と、集合{(useg(i),vseg(i))|i=1乃至C(x,y)}との対応関係を確定する必要がある。
 上述の(useg(i),vseg(i))(i=1乃至C(x,y))を求めた後、集合{(uavg(i),vavg(i))|i=1乃至C(x,y)}と、集合{(useg(i),vseg(i))|i=1乃至C(x,y)}との対応関係を確定させる。ここで、「性質1」と「性質2」を利用する。すなわち、集合{(uavg(i),vavg(i))|i=1乃至C(x,y)}と、集合{(useg(i),vseg(i))|i=1乃至C(x,y)}の要素同士で、距離が近いもの同士のペアを作ればよい。具体的には、以下の式167を満たす置換(permutation)作用素σ(i)(i=1乃至C(x,y))を決定すればよい。
Figure JPOXMLDOC01-appb-M000167
 たとえば、図98よび図104の場合、
(uavg(1),vavg(1))と(useg(1),vseg(1))は近い。
(uavg(2),vavg(2))と(useg(3),vseg(3))は近い。
(uavg(3),vavg(3))と(useg(2),vseg(2))は近い。
したがって、式102を解くことにより、以下のようになる。すなわち、
距離Z(x,y,1)にある物体の重心位置は、(useg(1),vseg(1))である。つまり、白い矩形の画素の位置は、距離Z(x,y,1)にある物体が投影されている。
距離Z(x,y,2)にある物体の重心位置は、(useg(3),vseg(3))である。つまり、黒い矩形の画素の位置は、距離Z(x,y,2)にある物体が投影されている。
距離Z(x,y,3)にある物体の重心位置は、(useg(2),vseg(2))である。つまり、灰色の矩形の画素の位置は、距離Z(x,y,3)にある物体が投影されている。
 つまり、注目している位置(x,y)のSPAD内に含まれるQ×Q個の画素位置(図100の小さな矩形)において、
白い矩形の画素の位置に投影される物体の距離はZ(x,y,1)である。
黒い矩形の画素の位置に投影される物体の距離はZ(x,y,2)である。
灰色の矩形の画素の位置に投影される物体の距離はZ(x,y,3)である。
 以上、具体的な場合について、図97乃至図104を用いて、「注目している位置(x,y)のSPAD内に含まれるQ×Q個の画素位置」の各位置について、距離データをアサインする処理について説明した。これを一般化すると、以下に示す処理手順になる。
 図105は、本技術の第10の実施の形態の実施例における距離データを確定する処理の処理手順例を示す流れ図である。
 まず、ステップS1011において、位置(x,y)およびその周辺の位置G(x,y)(たとえば、3×3個)のSPADにおけるC(x,y)を入力する。そして、Z(x,y,i)およびS(x,y,i)も入力する。ここで、i=1~C(x,y)である。さらに、位置(x,y)およびその周辺の位置(たとえば、3×3個)のSPADの領域内に対応するカラー画像(1つのSPADに対してQ×Q個のカラー画像のRGB値)も入力する。そして、ステップS1012に進む。
 ステップS1012において、式165および式166を計算して、(uavg(i),vavg(i))を求める。ここで、i=1乃至C(x,y)である。そして、ステップS1013に進む。
 ステップS1013において、位置(x,y)のSPADの領域内におけるQ×Q個のカラー画像の画素位置を、C(x,y)個に領域分割する。分割された領域を、「分割領域」と呼ぶことにする。i番目の分割領域内のRGB値の平均値を、RGB(i)とする。ここで、i=1乃至C(x,y)である。そして、ステップS1014に進む。
 なお、領域分割を行うためには、たとえば、k平均法(k-means clustering)等の既知の手法を用いることができる。したがって、ここでは詳細な説明は省略する。
 ステップS1014において、G(x,y)の全てのSPADの領域内におけるカラー画像の画素のそれぞれについて、その画素のRGB値がRGB(i)(i=1乃至C(x,y))のいずれに近いかを計算し、一番近いRGB(i)の領域に属させる。そして、ステップS1015に進む。
 ステップS1015において、ステップS1013およびS1014において確定したそれぞれの分割領域の重心を求め、(useg(i),vseg(i))とする。すなわち、i番目の分割領域の重心である(useg(i),vseg(i))を求める。ここで、i=1乃至C(x,y)である。そして、ステップS1016に進む。
 ステップS1016において、式167によって示される置換作用素 σ(i) を求める。ここで、i=1乃至C(x,y)である。そして、ステップS1017に進む。
 ステップS1017において、位置(x,y)のSPADの領域内におけるQ×Q個のカラー画像の画素位置のそれぞれについて、i番目の分割領域に属するものは、距離データとしてZ(x,y,σ(i))を出力する。そして、一連の処理を終了する。
 なお、上述の説明では、カラー画像を用いることを想定していたが、例えば、白黒画像を用いてもよい。
 また、上述の説明では、ヒストグラムH(x,y,n)から式158により生起率p(x,y,n)を求めて、生起率p(x,y,n)に対してピークやピーク面積を求めるものとしていた。これに代えて、簡易的に、ヒストグラムH(x,y,n)に対してピークやピーク面積を求めてもよい。つまり、近似解となるが、式158に代えて、p(x,y,n)=H(x,y,n)として、生起率p(x,y,n)を求めて、この実施例を適用してもよい。ここで、n=0乃至N-1である。これにより、式158の計算を省略することができ、計算量の削減をすることができる。
 また、ピーク面積S(x,y,i)は、x、yおよびiによらず、定数として近似してもよい。ここで、x=0乃至X-1、y=0乃至Y-1、i=1乃至C(x,y)である。または、ピーク面積S(x,y,i)=1÷C(x,y)として近似してもよい。これにより、ピーク面積の算出処理を省略することができ、計算量の削減をすることができる。
 [まとめ]
 この第10の実施の形態の特徴は以下のとおりである。
 SPADアレイのSPADの数よりも、高解像度の画像を撮影できるカメラを併用する。この高解像度の画像の画素位置における距離データを求める。なお、各SPADから得られる距離データは1つとは限らない。すなわち、C(x,y)個である。ここで、C(x,y)は2以上の場合もありうる。
 特徴1:この際、この高解像度の画像の領域分割を行い、各分割領域に距離データをアサインすることとする。ここで、距離データは、SPADアレイから得られる距離データである。
 特徴2:さらに、SPADアレイから得られる距離データで同じ距離データのものを選び、選ばれた位置の重心を求める。そして、先述の高解像度の画像の各分割領域についても重心を求める。これら重心同士のペアリングをすることにより、上述の高解像度の画像の各分割領域の距離データを確定させる。
 特徴3:さらに、上述ペアリングにおいては、近い距離にあるもの同士をペアとする。
 この第10の実施の形態は、上述の特徴1乃至特徴3の少なくともいずれか1つを満たすものである。
 このように、この第10の実施の形態を適用することにより、SPADアレイのSPADの数よりも高解像度の位置における距離データを求めることができる。
 [要点]
 第10の実施の形態は、以下の点を要点とする。
(1)ヒストグラム情報より求められる測距データの高解像度化方法において、
 ヒストグラムを入力する第1の入力ステップと、
 上記ヒストグラムより距離データを算出する距離算出ステップと、
 上記ヒストグラムの数よりも多い画素数を有する画像を入力する第2の入力ステップと、
 上記画像の領域を分割して分割領域を求める分割ステップと、
 上記分割領域の各々に対して、上記距離データをアサインするアサインステップと、
 上記アサインステップの結果を出力する出力ステップと
を有することを特徴とする測距データの高解像度化方法。
(2)上記(1)における測距データの高解像度化方法において、
 上記アサインステップでは、
 上記距離データについて同じ値をもつグループに分割し、上記グループごとの重心位置である第1の重心位置を求める距離データ重心計算ステップと、
 上記分割領域の各々の重心位置である第2の重心位置を求める領域重心計算ステップと、
 上記第1の重心位置と上記第2の重心位置とのペアリングを行うペアリング処理ステップとを行う
ことを特徴とする測距データの高解像度化方法。
(3)上記(2)における測距データの高解像度化方法において、
 上記ペアリング処理ステップでは、上記第1の重心位置と上記第2の重心位置の距離が近いもの同士をペアリング結果とする
ことを特徴とする測距データの高解像度化方法。
 <12.第11の実施の形態>
 [概要]
 SPADアレイには、効率良く集光するために、レンズが付随している。しかし、レンズとして安価なものを採用すると、完璧な集光ができず、ある広がりをもってしまう。そのようなレンズでは、PSF(Point Spread Function:点拡がり関数)がデルタ関数とはならず、ある広がりをもった関数となってしまう。この第11の実施の形態は、SPADアレイに付随するレンズの特性である「ある広がりをもったPSF」を補正することにより、ヒストグラムの先鋭化を行うものである。
 [ヒストグラム]
 SPADアレイ13の各位置(x,y)には、SPADが配置されているものとする。ここで、x=1乃至X、y=1乃至Yであり、SPADの総数はX×Y個である。上述のとおり、測距はM回の発光と受光により行われ、ヒストグラムが累積部15にて完成される。すなわち、M回の発光と受光により、各位置(x,y)に対応したヒストグラムが完成される。ヒストグラムの総数は、X×Y個である。
 また、この第11の実施の形態では、時間方向については考慮しないため、位置(x,y)のヒストグラムをH(x,y,n)とする。ここで、xは1以上X以下の整数、yは1以上Y以下の整数である。そして、nはビンの番号を表しており、0以上N-1以下の整数である。
 [ヒストグラムと生起率の関係]
 ここでは1つのヒストグラムのみを考慮しているため、H(x,y,n)を単にh(n)と書くことにする。ここで、n=0乃至N-1である。
 生起率とは、他の実施の形態と同様であり、あるイベントが単位時間あたりに起こる発生回数である。
 なお、正確に述べると、「そのビンに対応する時間(D)内においてフォトンが飛来する確率」は、生起率に、時間Dを乗算した値である。しかし、ここでは、定数倍(D倍)は無視している。または、時間Dを単位時間と考えてもよい。さらに、または、この実施の形態においては、生起率の定義として、一般的に広く使われている用語「生起率」に対してD倍した値であると考えてもよい。
 さて、ビンnにおける生起率p(n)は、時間n×Dから時間(n+1)×Dの間に、SPADに光(フォトン)が飛来する確率である。時間n×D以前に光(フォトン)が飛来したかどうかに関係しない。
 一方、距離測定装置10内のSPADセンサ13の各SPADが検出する光(フォトン)は、最初に飛来した光(フォトン)であり、2番目以降に飛来した光(フォトン)は検出されない。具体例を示すと、ビン2に対応する時間に最初に光(フォトン)が飛来して、そして、ビン4に対応する時間に2番目の光(フォトン)が飛来して、さらに、ビン6に対応する時間に3番目の光(フォトン)が飛来した場合、ヒストグラム上には、h(2)だけがカウントされて、h(4)またはh(6)にはカウントされない。
 このように、それ以前に光(フォトン)が飛来したかに無関係な生起率p(n)と、それ以前に光(フォトン)が飛来した場合はカウントされないという頻度h(n)には、明確な違いがある。このことを考慮すると、生起率p(n)と頻度h(n)の関係を導くことができる。
 ビン0における生起率をp(0)とすると、M回の測定で、ビン0の頻度がh(0)となる確率は、以下の式168となる。
Figure JPOXMLDOC01-appb-M000168
なぜなら、p(0)の確率で起きるイベントが、M回のうちh(0)回起きる確率であるからである。
 ビン1における生起率をp(1)とする。M回の測定で、h(0)回はビン0で起きてしまったにもかかわらず、ビン1の頻度がh(1)となる確率は、以下の式169となる。
Figure JPOXMLDOC01-appb-M000169
なぜなら、p(1)の確率で起きるイベントが、M-h(0)回のうちh(1)回起きる確率であるからである。
 ビン2における生起率をp(2)とする。M回の測定で、h(0)回はビン0で起きてしまい、かつ、h(1)回はビン1で起きてしまったにもかかわらず、ビン2の頻度がh(2)となる確率は、以下の式170となる。
Figure JPOXMLDOC01-appb-M000170
なぜなら、p(2)の確率で起きるイベントが、M-h(0)-h(1)回のうちh(2)回起きる確率であるからである。
 同様にして、M回の測定で、h(m)回はビンmで起きてしまったにもかかわらず、ビンnの頻度がh(n)となる確率は、以下の式171となる。ここで、m=0乃至n-1である。
Figure JPOXMLDOC01-appb-M000171
 これらの説明から分かるように、各位置(x,y)のヒストグラムが観測されたとき、そのヒストグラムをH(x,y,n)とすると、位置(x,y)の生起率p(x,y,n)は、以下の式172となる。ここで、n=0乃至N-1である。
Figure JPOXMLDOC01-appb-M000172
 [レンズのPSFと生起率の関係]
 図106は、本技術の第11の実施の形態における距離測定の様子の一例を示す図である。
 同図において、発光部12およびSPADアレイ13(すなわち、距離測定装置10)から距離Z(1)に壁面1101が、距離Z(2)に壁面1102がある場合である。なお、同図にはレンズ13aは図示を省略してある。
 SPADアレイ13内のあるSPAD(S1とする)は、図中のD1の方向を測距しているものとする。そして、
S1に隣接するSPAD(S2とする)は、D2の方向を測距しているものとする。
S2に隣接するSPAD(S3とする)は、D3の方向を測距しているものとする。
S3に隣接するSPAD(S4とする)は、D4の方向を測距しているものとする。
S4に隣接するSPAD(S5とする)は、D5の方向を測距しているものとする。
S5に隣接するSPAD(S6とする)は、D6の方向を測距しているものとする。
S6に隣接するSPAD(S7とする)は、D7の方向を測距しているものとする。
S7に隣接するSPAD(S8とする)は、D8の方向を測距しているものとする。
 図107は、本技術の第11の実施の形態の距離測定の例における生起率の分布を示す図である。
 まず、S1のSPADの生起率を考察する。すなわち、S1のSPADに飛来する光(フォトン)について考察する。飛来する光(フォトン)は前述のとおり2種類ある。1つは、発光部12からの発光(アクティブ光)が壁面1101に反射して戻ってくる光(フォトン)である。他方は、環境光から飛来する光(フォトン)である。前述のとおり、環境光の受光は、時間によらず、常に一定の確率で起きる。この確率をbとする。図107のa1に確率bの値を記す。なお、後述する図108および図109においても同様である。一方、アクティブ光の受光は、時刻2×Z(1)/c(ビンの番号としては、2×Z(1)/c/D)に集中して起きる。したがって、生起率は、同図におけるa1となる。すなわち、2×Z(1)/c/Dのビンの位置にピークを有するグラフとなる。
 S2乃至S4のSPADの生起率も、S1のSPADと同様のことがいえる。したがって、S2乃至S4のSPADの生起率は、それぞれ、同図におけるa2乃至a4となる。
 S5乃至S8のSPADの生起率も、Z(1)に代えてZ(2)とすることにより、S1のSPADと同様のことがいえる。したがって、S5乃至S8のSPADの生起率は、それぞれ、同図におけるa5乃至a8となる。
 さて、ここまでの説明では、レンズ13aのPSFを考慮していなかった。実際のレンズのPSFは、ある広がりを持っており、集光性能が悪い。具体的に説明すると、D4の方向から飛来する光(フォトン)は、理想的にはS4のSPADに到達するはずである。しかし、レンズ13aの集光性能が悪いため、S4の周辺のSPAD(例えば、S5のSPAD)に到達することもある。
 同図におけるb5は、レンズ13aのPSFを考慮した現実的なS5のSPADの生起率を示している。前述のとおり、D4の方向からは、時刻2×Z(1)/c(ビンの番号としては、2×Z(1)/c/D)において、かなりの高確率で光(フォトン)が飛来する。そして、レンズ13aのPSFのため、これら光(フォトン)がS5のSPADの生起率に寄与する。結果として、同図におけるb5に示すように、2×Z(1)/c/Dのビンの位置にピークを有するグラフとなる。
 同図におけるb4は、レンズ13aのPSFを考慮した現実的なS4のSPADの生起率を示している。D4の方向から、時刻2×Z(1)/c(ビンの番号としては、2×Z(1)/c/D)において飛来する光(フォトン)の一部は、S5に到達する。つまり、理想的にD4の方向からS4のSPADに、時刻2×Z(1)/c(ビンの番号としては、2×Z(1)/c/D)において飛来する光(フォトン)よりも少ない光(フォトン)しか、現実的にはS4のSPADには到達しない。つまり、同図におけるb4の2×Z(1)/c/Dのビンの位置のピークは、同図におけるa4の2×Z(1)/c/Dのビンの位置のピークよりも低くなる。
 また、D5の方向から飛来する光(フォトン)は、理想的にはS5のSPADに到達するはずである。しかし、レンズ13aの集光性能が悪いため、S5の周辺のSPAD(例えば、S4のSPAD)に到達することもある。結果として、現実的なS4のSPADの生起率は、同図におけるb4に示すように、2×Z(2)/c/Dのビンの位置にピークを有するグラフとなる。
 このように、現実的なS1乃至S8のSPADの生起率は、それぞれ、同図におけるb1乃至b8となる。
 図108は、本技術の第11の実施の形態の距離測定の例における生起率の分布を示す図である。同図は、S1乃至S8のSPADのうち、ビン番号が2×Z(1)/c/Dであるものを取り出してグラフ化したものである。
 同図におけるAは、理想的な生起率である。すなわち、レンズ13aのPSFがデルタ関数と仮定した場合の生起率である。これは、上述の図107におけるa1乃至a8における2×Z(1)/c/Dのビンの値を並べたものである。
 同図におけるBに、レンズ13aのPSFの強度を示す。現実的なレンズのPSFは、デルタ関数とはならず、ここに示すように、ある広がりをもった関数となる。
 したがって、現実的な各SPADの2×Z(1)/c/Dのビンに飛来する確率は、同図におけるAとBの畳み込み演算(コンボリューション)結果となる。つまり、同図におけるCとなる。これは、上述の図107におけるb1乃至b8における2×Z(1)/c/Dのビンの値を並べたものと同じである。
 図109は、本技術の第11の実施の形態の距離測定の例における生起率の分布を示す図である。同図は、S1乃至S8のSPADのうち、ビン番号が2×Z(2)/c/Dであるものを取り出してグラフ化したものである。
 同図におけるAは、理想的な生起率である。すなわち、レンズ13aのPSFがデルタ関数と仮定した場合の生起率である。これは、上述の図107におけるa1乃至a8における2×Z(2)/c/Dのビンの値を並べたものである。
 同図におけるBに、レンズ13aのPSFの強度を示す。現実的なレンズのPSFは、デルタ関数とはならず、ここに示すように、ある広がりをもった関数となる。
 したがって、現実的な各SPADの2×Z(2)/c/Dのビンに飛来する確率は、同図におけるAとBの畳み込み演算(コンボリューション)結果となる。つまり、同図におけるCとなる。これは、上述の図107におけるb1乃至b8における2×Z(2)/c/Dのビンの値を並べたものと同じである。
 以上の説明を数式で記述すると、以下の式173となる。
Figure JPOXMLDOC01-appb-M000173
ここで、p(x,y,n)は、位置(x,y)の現実的な生起率である。ここで、n=0乃至N-1である。つまり、実際に距離測定装置10を用いて観測される生起率である。
 pideal(x,y,n)は、位置(x,y)の理想的な生起率である。
 f(x,y)は、レンズ13aのPSFである。なお、f(x,y)はレンズの特性であり、ビンには無関係であるため、引数としてnはない。また、あらかじめ、レンズ13aのPSFを測定しておくことにより、f(x,y)を既知とすることができるため、f(x,y)は既知であるものとして、説明を進める。
 上述の式173は、f(x,y)とpideal(x,y,n)との「xおよびyについての畳み込み演算(コンボリューション)」がp(x,y,n)となることを意味している。ここで、n=0乃至N-1である。
 この第11の実施の形態では、実際に距離測定装置10を用いて観測される生起率p(x,y,n)から理想的な生起率pideal(x,y,n)を求め、さらに、理想的なヒストグラムHdeblur(x,y,n)を求めている。ここで、「理想的」とは、「レンズ13aのPSFをデルタ関数と仮定した場合」と同意義である。
 換言すれば、集光性能が悪い(PSFが広がりをもっている)安価なレンズを用いた場合であっても、この第11の実施の形態を適用することによって、集光性能が良い(PSFがデルタ関数である)高価なレンズを用いて観測されるヒストグラムと同等のものが得られるという利点が得られる。
 [実施例]
 図110は、本技術の第11の実施の形態の実施例におけるヒストグラムの先鋭化処理の処理手順例を示す流れ図である。
 まず、ステップS1111において、SPADアレイの各位置(x,y)のSPADから得られるヒストグラムH(x,y,n)を入力する。ここで、n=0乃至N-1である。そして、ステップS1112に進む。
 ステップS1112において、各位置(x,y)、各ビンnにおける生起率p(x,y,n)を式172より求める。そして、ステップS1113に進む。
 ステップS1113において、各nについて、ステップS1112で求めたp(x,y,n)を式173に代入して、pideal(x,y,n)を求める。ここで、n=0乃至N-1である。そして、ステップS1114に進む。
 ステップS1114において、ステップS1113で求めたpideal(x,y,n)より、以下の式174を用いて、Hdeblur(x,y,n)を求める。
Figure JPOXMLDOC01-appb-M000174
そして、ステップS1115に進む。
 ステップS1115において、Hdeblur(x,y,n)を位置(x,y)のヒストグラムとして出力する。ここで、n=0乃至N-1である。Hdeblur(x,y,n)は、レンズのPSFを補正した先鋭化されたヒストグラムである。そして、一連の処理を終了する。
 なお、式172は、ヒストグラムから生起率を求める式であり、式174は、その逆変換、すなわち、生起率からヒストグラムを求める式である。
 また、ステップS1113では,式173を用いて、p(x,y,n)からpideal(x,y,n)を求めるようにしている。この求め方は、デコンボルーション(Deconvolution)と呼ばれ、たとえば、ウィナーフィルタ(Wiener Filter)、ルーシーリチャードソン法(Lucy-Richardson deconvolution)などの既知の手法を採用することができる。これらは既知の手法であるため、詳細な説明は省略する。あるいは、各nについて式173を用いて、p(x,y,n)からpideal(x,y,n)を求める方法として、輪郭を強調するフィルタ、すなわち、エッジ強調フィルタを用いても良い。すなわち、各nについて、xおよびyで示される2次元データp(x,y,n)に対して、エッジ強調フィルタを通すことで、pideal(x,y,n)を求めても良い。
 なお、同図によって示される処理は、演算部16によって行われる。そして、この処理が行われた後、さらに、演算部16によって、レンズのPSFを補正した先鋭化されたヒストグラムHdeblur(x,y,n)について、従来から行われているピーク検出の処理を行い、距離を求めて、その距離のデータを出力端子17より出力する。これにより、集光性能が悪い安価なレンズを使用しても、集光性能が良い高価なレンズを用いた測距と同じ性能の距離データを得ることができる。
 また、Hdeblur(x,y,n)(n=0乃至N-1)におけるピーク位置は、式174から明らかなように、pideal(x,y,n)(n=0乃至N-1)におけるピーク位置と等しい。したがって、pideal(x,y,n)(n=0乃至N-1)においてピーク検出を行い、そのビンの位置に対応する距離を求めて、距離データとしてもよい。この場合、上述の式174の変換式は不要である。
 [まとめ]
 集光性能が悪い(PSFが広がりをもっている)安価な現実的なレンズを用いた場合の生起率と、集光性能が良い(PSFがデルタ関数である)高価な理想的なレンズを用いた場合の生起率の関係を示した(図107乃至図109、および、式173参照)。
 この式173に示した関係を用いることにより、実際の距離測定装置10のレンズ13aを介して得られるヒストグラムH(x,y,n)から、理想的なレンズを介して得られるヒストグラムHdeblur(x,y,n)を、信号処理により作成することができる。
 すなわち、集光性能が悪い安価なレンズを使用しても、集光性能が良い高価なレンズを用いた測距と同じ性能の距離データを得ることができる。
 [要点]
 第11の実施の形態は、以下の点を要点とする。
(1)ヒストグラムの先鋭化方法において、
 複数のヒストグラムを入力する入力ステップと、
 上記複数のヒストグラムのそれぞれについて、ヒストグラムの合計数から若いビンの頻度を減算した値で、ヒストグラムのビンを割ることで生起率を求める生起率計算ステップと、
 上記生起率に関して、デコンボルーション(Deconvolution)を行う逆変換計算ステップと、
 上記デコンボルーションされた生起率から、先鋭化されたヒストグラムを求めるヒストグラム計算ステップと、
 上記先鋭化されたヒストグラムを出力する出力ステップと
を有することを特徴とするヒストグラムの先鋭化方法。
 <13.第12の実施の形態>
 [概要]
 この第12の実施の形態は、1つのSPADが測定している測距範囲内における物体の状態(形状や動きなど)を求める方法を提供するものである。
 [ヒストグラム]
 図111は、本技術の第12の実施の形態における累積部15により生成されるヒストグラムの一例を示す図である。
 この第12の実施の形態においては、時間Dは十分小さいものと想定するため、ヒストグラムの頻度は、D単位での離散的な値ではなく、ビンについて連続的な値と考えることができる。同図において、この連続的な値を点線により表示している。
 SPADアレイ13の各位置(x,y)には、SPADが配置されているものとする。ここで、x=0乃至X-1、y=0乃至Y-1であり、SPADの総数はX×Y個である。上述の説明においてはSPADの画素位置として1≦x≦X、1≦y≦Yとしたが、この第12の実施の形態では、座標系(u,v)との関係を一致させるために、0≦x≦X-1、0≦y≦Y-1とする。ヒストグラムの総数はX×Y個であり、他の実施の形態と同様である
 さらに、時間的に続けて、測距が行われるとする。すなわち、「M回の発光と受光でヒストグラムを作成する」という処理を、連続して行う。「M回の発光と受光でヒストグラムを作成する」という処理にかかる時間を単位時間とする。このように単位時間を定義することで、時刻tでは、時間的にt番目に作成されたヒストグラムが累積部15にて出力されることになる。ここで、tは0以上の整数である。
 各時刻tにおける測定では、M回の発光と受光が行われる。m回目の発光と受光は、時刻t+m/Mにおいて行われる。ここで、mは0乃至M-1である。すなわち、時刻tにおける発光と受光、時刻t+1/Mにおける発光と受光、時刻t+2/Mにおける発光と受光、…、時刻t+(M-1)/Mにおける発光と受光により、時刻tにおけるヒストグラムが完成される。
 なお、m回目の発光と受光によるヒストグラムの更新が行われた後に、m+1回目の発光が行われるため、N×D≦1/Mである。なお、この拘束条件は、この実施の形態において直接関係するものではない。
 時刻t、位置(x,y)のヒストグラムをH(t,x,y,n)とする。ここで、tは0以上の整数、xは0以上X-1以下の整数、yは0以上Y-1以下の整数である。そして、nはビンの番号を表しており、0以上N-1以下の整数である。
 なお、(x,y)という変数は、SPADアレイ13の各SPADの位置を示す変数であり、整数の値をとる。一方、後述するように、(u,v)という変数は、各SPAD内の位置を示す変数である。すなわち、uは0以上1未満の実数の値をとり、vは0以上1未満の実数の値をとる。
 [ヒストグラムと生起率の関係]
 ここでは1つのヒストグラムのみを考慮しているため、H(t,x,y,n)を単にh(n)と書くことにする。ここで、n=0乃至N-1である。
 生起率とは、他の実施の形態と同様であり、あるイベントが単位時間あたりに起こる発生回数である。
 なお、正確に述べると、「そのビンに対応する時間(D)内においてフォトンが飛来する確率」は、生起率に、時間Dを乗算した値である。しかし、ここでは、定数倍(D倍)は無視している。または、時間Dを単位時間と考えてもよい。さらに、または、この実施の形態においては、生起率の定義として、一般的に広く使われている用語「生起率」に対してD倍した値であると考えてもよい。
 さて、ビンnにおける生起率p(n)は、時間n×Dから時間(n+1)×Dの間に、SPADに光(フォトン)が飛来する確率である。時間n×D以前に光(フォトン)が飛来したかどうかに関係しない。
 一方、距離測定装置10内のSPADセンサ13の各SPADが検出する光(フォトン)は、最初に飛来した光(フォトン)であり、2番目以降に飛来した光(フォトン)は検出されない。具体例を示すと、ビン2に対応する時間に最初に光(フォトン)が飛来して、そして、ビン4に対応する時間に2番目の光(フォトン)が飛来して、さらに、ビン6に対応する時間に3番目の光(フォトン)が飛来した場合、ヒストグラム上には、h(2)だけがカウントされて、h(4)またはh(6)にはカウントされない。
 このように、それ以前に光(フォトン)が飛来したかに無関係な生起率p(n)と、それ以前に光(フォトン)が飛来した場合はカウントされないという頻度h(n)には、明確な違いがある。このことを考慮すると、生起率p(n)と頻度h(n)の関係を導くことができる。
 ビン0における生起率をp(0)とすると、M回の測定で、ビン0の頻度がh(0)となる確率は、以下の式175となる。
Figure JPOXMLDOC01-appb-M000175
なぜなら、p(0)の確率で起きるイベントが、M回のうちh(0)回起きる確率であるからである。
 ビン1における生起率をp(1)とする。M回の測定で、h(0)回はビン0で起きてしまったにもかかわらず、ビン1の頻度がh(1)となる確率は、以下の式176となる。
Figure JPOXMLDOC01-appb-M000176
なぜなら、p(1)の確率で起きるイベントが、M-h(0)回のうちh(1)回起きる確率であるからである。
 ビン2における生起率をp(2)とする。M回の測定で、h(0)回はビン0で起きてしまい、かつ、h(1)回はビン1で起きてしまったにもかかわらず、ビン2の頻度がh(2)となる確率は、以下の式177となる。
Figure JPOXMLDOC01-appb-M000177
なぜなら、p(2)の確率で起きるイベントが、M-h(0)-h(1)回のうちh(2)回起きる確率であるからである。
 同様にして、M回の測定で、h(m)回はビンmで起きてしまったにもかかわらず、ビンnの頻度がh(n)となる確率は、以下の式178となる。ここで、m=0乃至n-1である。
Figure JPOXMLDOC01-appb-M000178
 これらの説明から分かるように、各時刻t、各位置(x,y)のヒストグラムが観測されたとき、そのヒストグラムをH(t,x,y,n)とすると、時刻t、位置(x,y)の生起率p(t,x,y,n)は、以下の式179となる。ここで、n=0乃至N-1である。
Figure JPOXMLDOC01-appb-M000179
 [生起率]
 図112は、本技術の第12の実施の形態において各SPADの位置の例を示す図である。
 ここでは、各SPAD内の各位置を(u,v)で表現する。uとvは、それぞれ、0以上1未満の実数である。各PADの大きさは、縦1×横1である。同図に示すように、
位置(0,0)のSPADは、X軸について0以上1未満、Y軸について0以上1未満の領域を占める。
位置(1,0)のSPADは、X軸について1以上2未満、Y軸について0以上1未満の領域を占める。
位置(0,1)のSPADは、X軸について0以上1未満、Y軸について1以上2未満の領域を占める。
位置(1,1)のSPADは、X軸について1以上2未満、Y軸について1以上2未満の領域を占める。
同様に、
位置(x,y)のSPADは、X軸についてx以上x+1未満、Y軸についてy以上y+1未満の領域を占める。
これらを式で表現すると、以下の式180となる。
Figure JPOXMLDOC01-appb-M000180
式180において、A(x,y)は、位置(x,y)のSPADの領域を示している。この範囲内に光(フォトン)が入射すると、位置(x,y)のSPADが反応する。
 図113は、本技術の第12の実施の形態における距離測定の例における強度分布を示す図である。
 発光部12からの発光(短時間発光)は、時間(t1とする)とともに強度が変化する。強度をf(t1)とする。同図におけるAは、発光部12からの発光の強度の時間推移を示している。
 時刻t、位置(x,y)のSPAD内の各位置(u,v)には、アクティブ光(発光部12からの光)が、対象物での反射を経て、入射される。m回目の発光と受光の時(すなわち、時刻t+m/M)における位置(u,v)に対応する対象物までの距離を、Z(x+u,y+v,t+m/M)とする。m回目のアクティブ光(発光部12からの光)の位置(u,v)への入射光は、発光部12からの発光に対して、2×Z(x+u,y+v,t+m/M)/cだけ遅れて、位置(x,y)のSPAD内の位置(u,v)に到達する。また、光は距離の2乗に比例して減衰していく。対象物での反射率をaとする。以上を加味すると、発光部12から発光されたときに、位置(u,v)に入射される光の強度は、以下の式181となる。
Figure JPOXMLDOC01-appb-M000181
 同図におけるBは、位置(u,v)へ入射するm回目のアクティブ光の強度の時間推移を示している。
 また、各位置(u,v)には、環境光(例えば、図1の太陽30からの光)も入射される。この入射される光(フォトン)は、ヒストグラムを作成する間、常に一定の強度で飛来する。この強度をbとする。同図におけるCは、位置(u,v)へ入射する環境光の強度の時間推移を示している。
 位置(u,v)に入射される光の強度は、同図におけるBおよびCの合計であるから、以下の式182となる。
Figure JPOXMLDOC01-appb-M000182
 1つのSPADは、1つの方向を測距するわけではなく、現実的には、ある程度の立体角をもった方向の全体を測距している。すなわち、SPADアレイ13上において、X軸についてx以上x+1未満、Y軸についてy以上y+1未満に入射される光は全て、位置(x,y)にあるSPADに反応を起こさせる。
 つまり、時刻t、位置(x,y)にあるSPADのビンnの生起率は、式182を、u、vのそれぞれについて、0から1まで積分し、さらに、mについて0からM-1まで累積した値に比例する。ここで、t1=n×Dである。
 [対象物の位置と、生起率の関係]
 図114は、本技術の第12の実施の形態における距離測定の様子の第1の例を示す図である。
 ここでは、対象物20が、距離測定装置10に対して斜めに位置している場合を考える。同図には、距離測定装置10内の発光部12と、SPADアレイ13内の3つのSPADのみを図示している。すなわち、位置(x-1,y)、(x,y)、および、(x+1,y)の隣接し合う3つのSPADである。
 先述のとおり、1つのSPADは、1つの方向を測距するわけではなく、現実的には、ある程度の立体角をもった方向の全体を測距している。同図には、その3つのSPADの測距範囲を図示してある。
 位置(x,y)にあるSPADに着目する。このSPADの測距範囲内にある4つの位置(図中のQ1乃至Q4)について考える。
Q1に対応する位置(x,y)にあるSPAD内の位置を(u1,v1)とする。
Q2に対応する位置(x,y)にあるSPAD内の位置を(u2,v2)とする。
Q3に対応する位置(x,y)にあるSPAD内の位置を(u3,v3)とする。
Q4に対応する位置(x,y)にあるSPAD内の位置を(u4,v4)とする。
 対象物20が、同図に示すような斜めの位置にある場合、アクティブ光(発光部12からの光)が対象物20に反射されて、位置(u1,v1)乃至(u4,v4)に入射される時刻は、(u1,v1)、(u2,v2)、(u3,v3)、(u4,v4)の順番である。なぜなら、距離測定装置10に対して、Q1、Q2、Q3、Q4の順に遠くなるからである。
 図115は、本技術の第12の実施の形態における光の強度の時間推移を示す図である。
 同図におけるAは、発光部12からの発光の強度の時間推移を示している。同図におけるBは、位置(u1,v1)へ入射するアクティブ光の強度の時間推移を示している。
同図におけるCは、位置(u2,v2)へ入射するアクティブ光の強度の時間推移を示している。同図におけるDは、位置(u3,v3)へ入射するアクティブ光の強度の時間推移を示している。同図におけるEは、位置(u4,v4)へ入射するアクティブ光の強度の時間推移を示している。
 同図において、B、C、D、Eの順番に強度分布が時間的に遅くなる方向にずれていく。なお、同図には、環境光成分(図113におけるCに対応)は省略してある。
 同図におけるB乃至Eの合計が、位置(x,y)にあるSPADに飛来する光である。したがって、位置(x,y)にあるSPADの生起率は、幅広なピークを有する。より正確に述べるなら、対象物20が距離測定装置10に対して平行に位置する場合の生起率のピークに比べて、対象物20が距離測定装置10に対して斜めに位置している場合の生起率のピークは幅広となる。次図によりこれを説明する。
 図116は、本技術の第12の実施の形態における配置による強度分布の比較例を示す図である。
 同図におけるAは、対象物20が距離測定装置10に対して平行に位置する場合の生起率である。同図におけるBは、対象物20が距離測定装置10に対して斜めに位置している場合の生起率である。同図におけるAのピークの半値幅よりも、同図におけるBのピークの半値幅の方が広い。
 また、同図に示すように、半値幅に対応する時間(t1)の早い方をTa、遅い方をTbとする。なお、ビン換算では、それぞれ、Ta/D番目、Tb/D番目のビンである。ここで、Dは、既出のとおり、各ビンの幅である。このとき、Q1方向の距離が、Ta×c/2であり、Q4方向の距離が、Tb×c/2である。
 以上、位置(x,y)にあるSPADに関して説明したが、同様のことは、位置(x-1,y)にあるSPADおよび位置(x+1,y)にあるSPADについてもいえる。
 図117は、本技術の第12の実施の形態における距離測定の第1の例における生起率を示す図である。
 この図では、上述の図114に示された3つのSPADの生起率を示している。同図におけるAが、位置(x-1,y)にあるSPADの生起率である。同図におけるBが、位置(x,y)にあるSPADの生起率である。同図におけるCが、位置(x+1,y)にあるSPADの生起率である。
 上述の図114は、X方向に正の傾き(X方向に進むにつれて、対象物までの距離が遠くなる。)をもった対象物の例である。この場合、図114の状況から明らかなように、時間(t1)的に、図117におけるAのピーク位置、同図におけるBのピーク位置、同図におけるCのピーク位置の順番となる。
 また、X方向に隣接する3つのSPADについて説明したが、Y方向についても同様のことがいえる。
 上述の説明から、以下の性質1および性質2がいえる。ここで、位置(x+i,y+j)にあるSPADの生起率のピーク位置(ピークとなる時刻)を、Tp(x+i,y+j)とする。ここで、(i,j)の組は、(-1,0)、(1,0)、(0,-1)、(0,1)、(0,0)のいずれかである。
(性質1)位置(x,y)にあるSPADの生起率のピークの半値幅が広い場合、位置(x,y)にあるSPADに対応する方向にある対象物は、X方向に{Tp(x+1,y)×c/2-Tp(x-1,y)×c/2}/2の傾きを持っている。
(性質2)位置(x,y)にあるSPADの生起率のピークの半値幅が広い場合、位置(x,y)にあるSPADに対応する方向にある対象物は、Y方向に{Tp(x,y+1)×c/2-Tp(x,y-1)×c/2}/2の傾きを持っている。
 [対象物の動きと、生起率の関係]
 図118は、本技術の第12の実施の形態における距離測定の様子の第2の例を示す図である。
 ここでは、対象物20が、距離測定装置10に対して奥行き方向に動いている場合を考える。同図には、距離測定装置10内の発光部12と、SPADアレイ13内の1つのSPADのみを図示している。すなわち、位置(x,y)のSPADである。
 時刻tにおける測距に着目する。既出のとおり、時刻tにおける測距は、M回の発光と受光により行われる。すなわち、時刻tにおける発光と受光、時刻t+1/Mにおける発光と受光、時刻t+2/Mにおける発光と受光、…、時刻t+(M-1)/Mにおける発光と受光である。SPADの動作は、既出のとおり、時間間隔1/Mで「発光と受光」の動作を繰り返していき、発光と受光の時間差を検出していく。同図に示すように、対象物20が、距離測定装置10に対して時間とともに遠ざかっていく場合、m回目の発光と受光での時間差は、mが大きくなるほど、大きくなっていく。ここで、m=0乃至M-1である。
 徐々に時間差が大きくなっていくという状況で、M回の発光と受光の時間差をヒストグラム化して、上述の式179により生起率を求めると、時刻t、位置(x,y)におけるSPADの生起率は、幅広なピークを有することになる。より正確に述べるなら、対象物20が距離測定装置10に対して静止している場合の生起率のピークに比べて、対象物20が距離測定装置10に対して奥行き方向に移動している場合の生起率のピークは幅広となる。
 これを図示すると、上述の図116と同様の関係となる。すなわち、図116におけるAが、対象物20が距離測定装置10に対して静止している場合の生起率である。同図におけるBが、対象物20が距離測定装置10に対して奥行き方向に移動している場合の生起率である。同図におけるAのピークの半値幅よりも、同図におけるBのピークの半値幅の方が広い。
 また、同図に示すように、半値幅に対応する時間(t1)の早い方をTa、遅い方をTbとする。なお、ビン換算では、それぞれ、Ta/D番目、Tb/D番目のビンである。ここで、Dは、既出のとおり、各ビンの幅である。このとき、時刻tにおける対象物20の距離が、Ta×c/2であり、時刻t+(M-1)/Mにおける対象物20の距離が、Tb×c/2である。
 逆に、対象物20が、近づいている場合には、時刻tにおける対象物20の距離が、Tb×c/2であり、時刻t+(M-1)/Mにおける対象物20の距離が、Ta×c/2である。
 以上、時刻t、位置(x,y)におけるSPADに関して説明したが、同様のことは、時刻t-1におけるSPADおよび時刻t+1におけるSPADについてもいえる。
 したがって、上述の図118に示された状況において、時刻t-1、時刻t、時刻t+1における位置(x,y)のSPADの生起率は、上述の図117と同様の関係となる。すなわち、図117におけるAが、時刻t-1、位置(x,y)におけるSPADの生起率である。同図におけるBが、時刻t、位置(x,y)におけるSPADの生起率である。同図におけるCが、時刻t+1、位置(x,y)におけるSPADの生起率である。
 上述の図118は、時間が進むにつれて、距離が遠くなる対象物の例である。この状況から明らかなように、時間(t1)的に、図117におけるAのピーク位置、同図におけるBのピーク位置、同図におけるCのピーク位置の順番となる。
 上述の説明から、以下の性質3がいえる。ここで、時刻t+k、位置(x,y)にあるSPADの生起率のピーク位置(ピークとなる時刻)を、Tp(t+k)とする。kは、-1、0、1のいずれかである。
(性質3)時刻t、位置(x,y)におけるSPADの生起率のピークの半値幅が広い場合、位置(x,y)にあるSPADに対応する方向にある対象物は、時間とともに、{Tp(t+1)×c/2-Tp(t-1)×c/2}/2の速さをもって移動している。{Tp(t+1)×c/2-Tp(t-1)×c/2}/2の値が正の場合は、遠ざかっている。負の場合は、近づいている。
 [実施例]
 上述の性質1乃至3を用いることにより、対象物20の状態(装置10に対して斜めに位置するか、奥行き方向に移動しているか)を知ることができる。
 図119および図120は、本技術の第12の実施の形態の実施例における物体の状況判断処理の処理手順例を示す流れ図である。この処理は、演算部16によって行われる。
 まず、ステップS1211において、
時刻t、位置(x,y)におけるSPADの観測値であるヒストグラムH(t,x,y,n)を入力する。
時刻t、位置(x-1,y)におけるSPADの観測値であるヒストグラムH(t,x-1 ,y,n)を入力する。
時刻t、位置(x+1,y)におけるSPADの観測値であるヒストグラムH(t,x+1 ,y,n)を入力する。
時刻t、位置(x,y-1)におけるSPADの観測値であるヒストグラムH(t,x,y-1 ,n)を入力する。
時刻t、位置(x,y+1)におけるSPADの観測値であるヒストグラムH(t,x,y+1 ,n)を入力する。
時刻t-1、位置(x,y)におけるSPADの観測値であるヒストグラムH(t-1 ,x,y,n)を入力する。
時刻t+1、位置(x,y)におけるSPADの観測値であるヒストグラムH(t+1 ,x,y,n)を入力する。
ここで、n=0乃至N-1である。そして、ステップS1212に進む。
 ステップS1212において、
式179より、時刻t、位置(x,y)におけるSPADの生起率p(t,x,y,n)を求める。
式179より、時刻t、位置(x-1,y)におけるSPADの生起率p(t,x-1 ,y,n)を求める。
式179より、時刻t、位置(x+1,y)におけるSPADの生起率p(t,x+1 ,y,n)を求める。
式179より、時刻t、位置(x,y-1)におけるSPADの生起率p(t,x,y-1 ,n)を求める。
式179より、時刻t、位置(x,y+1)におけるSPADの生起率p(t,x,y+1 ,n)を求める。
式179より、時刻t-1、位置(x,y)におけるSPADの生起率p(t-1 ,x,y,n)を求める。
式179より、時刻t+1、位置(x,y)におけるSPADの生起率p(t+1 ,x,y,n)を求める。
ここで、n=0乃至N-1である。そして、ステップS1213に進む。
 ステップS1213において、p(t,x,y,n)のピークの半値幅が、所望の閾値よりも大きいか否かを判断する。大きい場合は、ステップS1214に進む。小さい場合は、ステップS1216に進む。
 なお、ステップS1213における「所望の閾値」とは、対象物を距離測定装置10に対して平行に、かつ、静止させて設置した場合に観測される生起率のピークの半値幅である。この値は、前もって、対象物を距離測定装置10に対して平行に、かつ、静止させて設置して測定しておくことによって、取得することができる。
 また、ピーク位置とその半値幅を求める方法としては既知の手法を用いればよい。たとえば、特開平6-230001に開示されている方法があり、この方法によりピーク位置(同公報の図3におけるRTで示される位置)と半値幅(同公報の図3におけるHT-RTで示される値を2倍した値)を求めることができる。なお、半値幅は、半値全幅(full width at half maximum)と呼ばれることがある。
 ステップS1214において、
p(t,x-1 ,y,n)のピーク位置を求めて、その時刻をTp(t,x-1,y)とする。
p(t,x+1 ,y,n)のピーク位置を求めて、その時刻をTp(t,x+1,y)とする。
p(t,x,y-1 ,n)のピーク位置を求めて、その時刻をTp(t,x,y-1 )とする。
p(t,x,y+1 ,n)のピーク位置を求めて、その時刻をTp(t,x,y+1 )とする。
p(t-1 ,x,y,n)のピーク位置を求めて、その時刻をTp(t-1 ,x,y)とする。
p(t+1 ,x,y,n)のピーク位置を求めて、その時刻をTp(t+1 ,x,y)とする。
なお、ピーク位置をビン換算で求めた場合は、そのビンの番号にD倍した値がTp(*,*,*)である。そして、ステップS1215に進む。
 ステップS1215において、時刻t、位置(x,y)にあるSPADに対応する方向にある対象物は、以下の状況であるという情報を出力する。すなわち、「X方向に{Tp(t,x+1,y)×c/2-Tp(t,x-1,y)×c/2}/2の傾きを持っている。Y方向に{Tp(t,x,y+1)×c/2-Tp(t,x,y-1)×c/2}/2の傾きを持っている。時間とともに、{Tp(t+1,x,y)×c/2-Tp(t-1,x,y)×c/2}/2の速さをもって移動している。」という状況であることを出力する。そして、一連の処理を終了する。
 ステップS1216において、時刻t、位置(x,y)にあるSPADに対応する方向にある対象物は、以下の状況であるという情報を出力する。すなわち、「装置に対して傾きを持っていない。移動していない。」という状況であることを出力する。そして、一連の処理を終了する。
 このようにして、時刻t、位置(x,y)にあるSPADに対応する方向にある対象物20の状況を判定することができる。
 なお、上述の説明では、ヒストグラムH(t,x,y,n)から式179により生起率p(t,x,y,n)を求めて、生起率p(t,x,y,n)に対してピーク位置やピークの半値幅を求めていた。ただし、これに代えて、簡易的に、ヒストグラムH(t,x,y,n)に対してピーク位置やピークの半値幅を求めてもよい。つまり、近似解となるが、式179に代えて、p(t,x,y,n)=H(t,x,y,n)として、生起率p(x,y,n)を求めるようにしてもよい。ここで、n=0乃至N-1である。これにより、式179の計算を省略することができ、計算量を削減することができる。
 [まとめ]
 このように、生起率(または、簡易的には、ヒストグラム)のピークの半値幅の広さにより、対象物の形状や動きを知ることができる。
 [要点]
 第12の実施の形態は、以下の点を要点とする。
(1)ヒストグラム情報を使った物体状況を求める方法において、
 ヒストグラムを入力する第1の入力ステップと、
 上記ヒストグラムの合計数から若いビンの頻度を減算した値で、上記ヒストグラムのビンを割ることで生起率を求める生起率計算ステップと、
 上記生起率のピーク位置およびピークの半値幅を求める第1のピーク検知ステップと、
 上記ピークの半値幅が、所望の閾値よりも大きいか、小さいかを判定する第1の判定ステップと、
 上記第1の判定ステップにおいて大きいと判定された場合には、測定対象物が斜めまたは動きがあるという結果を出力する第1の出力ステップを
を有する物体状況を求める方法。
(2)上記(1)における物体状況を求める方法において、
 上記第1の判定ステップにおいて大きいと判定された場合に、第1のピーク検知ステップにて求まった「時空間における隣接する位置の生起率のピーク位置」の差分値から、上記測定対象物の斜め度合または動きの度合を定量的に算出する第1の計算ステップと
 上記第1の計算ステップの斜め度合または動きの度合を出力する第2の出力ステップと
を有する物体状況を求める方法。
(3)ヒストグラム情報を使った物体状況を求める方法において、
 ヒストグラムを入力する第2の入力ステップと、
 上記ヒストグラムのピーク位置およびピークの半値幅を求める第2のピーク検知ステップと、
 上記ピークの半値幅が、所望の閾値よりも大きいか、小さいかを判定する第2の判定ステップと、
 上記第2の判定ステップにおいて大きいと判定された場合には、測定対象物が斜めまたは動きがあるという結果を出力する第3の出力ステップを
を有する物体状況を求める方法。
(4)上記(3)における物体状況を求める方法において、
 上記第2の判定ステップにおいて大きいと判定された場合に、第2のピーク検知ステップにて求まった「時空間における隣接する位置のヒストグラムのピーク位置」の差分値から、上記測定対象物の斜め度合または動きの度合を定量的に算出する第2の計算ステップと
 上記第2の計算ステップの斜め度合または動きの度合を出力する第4の出力ステップと
を有する物体状況を求める方法。
 <14.第13の実施の形態>
 [概要]
 この第13の実施の形態は、反射光の受光頻度を示すヒストグラムに基づいて適切なピーク検出を行って、対象物との距離を測定するものである。フォトンを検出した後に再び検出可能になるSPADを想定して、その場合のヒストグラムの理論的解析を行う。
 上述の実施の形態では、「SPADは、飛来した複数の光(フォトン)の中で最初に飛来した光(フォトン)のみを検出する」ことを想定していた。そして、「最初の光(フォトン)が飛来した時刻に対応するビンの数をインクリメントする」ことで、ヒストグラムは得られるものとしていた。しかしながら、SPADの種類によっては、最初に飛来した光(フォトン)以外にも、他の光(フォトン)も検出可能な物もある。すなわち、以下のような仕様のSPADも存在する。
 飛来した光(フォトン)を検出すると、その時から所定の時間(デッドタイム(dead time)と言う)だけ検出する動作を行わない。そして、所定の時間後には、再度、飛来した光(フォトン)を検出する動作を行う。すなわち、上述の実施の形態においては、このデッドタイムが無限であることを想定していた。以下では、反射光の受光から有限なデッドタイムを経過した後に、再び受光を行う条件下で、確率密度関数を求める処理について検討する。なお、デッドタイムは、既知の値である。
 このようなSPADを用いた場合、光(フォトン)を検出したすべての時間の値に対応したヒストグラムのビンを1だけインクリメントする。従って、発光部12からの1回の発光において、ヒストグラム上の複数のビンの値がインクリメントされることも起こり得る。
 この動作について、具体例を図121に示す。図121において、横軸は時間を表している。また、横軸として対応するビンの番号も記している。ビンの幅はDである。
 [フォトン検出]
 図121に示す例では、3番目のビンに対応する時間(すなわち、時間3×Dから時間4×Dまでの範囲)において、光(フォトン)が飛来している。さらに、8番目のビンに対応する時間(すなわち、時間8×Dから時間9×Dまでの範囲)において、光(フォトン)が飛来している。13番目のビンに対応する時間(すなわち、時間13×Dから時間14×Dまでの範囲)において、光(フォトン)が飛来している。17番目のビンに対応する時間(すなわち、時間17×Dから時間18×Dまでの範囲)において、光(フォトン)が飛来している。19番目のビンに対応する時間(すなわち、時間19×Dから時間20×Dまでの範囲)において、光(フォトン)が飛来している。22番目のビンに対応する時間(すなわち、時間22×Dから時間23×Dまでの範囲)において、光(フォトン)が飛来している。なお、同図には、それぞれの光(フォトン)に対して、121-1乃至121-6という番号を付してある。
 同図に示す場合、121-1の光(フォトン)はSPADにより検出される。すなわち、3番目のビンは1だけインクリメントされる。同時に、デッドタイムに入る。デッドタイムの長さは、図中に点線矢印121-7で表示している。この期間に飛来する光(フォトン)は検出されない。すなわち、121-2の光(フォトン)はSPADにより検出されず、ヒストグラムのデータも更新(インクリメント)されない。
 次に飛来する光(フォトン)121-3は、既にデッドタイムが終了しているので、SPADにより検出される。すなわち、13番目のビンは1だけインクリメントされる。同時に、再度、デッドタイムに入る。デッドタイムの長さは、図中に点線矢印121-8で表示している。この期間に飛来する光(フォトン)は検出されない。すなわち、121-4および121-5の光(フォトン)はSPADにより検出されず、ヒストグラムのデータも更新(インクリメント)されない。
 次に飛来する光(フォトン)121-6は、既にデッドタイムが終了しているので、SPADにより検出される。すなわち、22番目のビンは1だけインクリメントされる。同時に、再度、デッドタイム(図中の121-9)に入る。
 なお、デッドタイムは、常に一定である。つまり、121-7、121-8、および、121-9は同じ長さである。図121の例では、デッドタイムの時間は、7×Dである。
 以降同様である。デッドタイムのあるSPADは、このように動作する。
このようにデッドタイム後に再度飛来する光(フォトン)を検出できるSPADを距離測定装置10内のSPADアレイ13に採用した場合は、ヒストグラムの各ビンnの頻度h(n)が観測された時に、n番目のビンの生起率p(n)は、式8とは異なる。
 これ以降では、デッドタイム後に再度飛来する光(フォトン)を検出できるSPADを距離測定装置10内のSPADアレイ13に採用した場合の生起率について説明する。
 図122は、本技術の第13の実施の形態におけるデッドタイムを有するSPADの状態遷移図を示している。ここで、Tdead=「dead time」÷Dである。すなわち、Tdeadは、ビン換算におけるデッドタイムの長さである。すなわち、この状態遷移図により、デッドタイムを管理することができる。なお、「Dead(Tdead-3)」乃至「Dead(4)」は、図示省略してある。また、図121の例では、Tdeadは7である。
 まず、最初に光(フォトン)が飛来した場合、状態は「Fire」となる。光(フォトン)が飛来しない場合は、状態は「Dead(1)」となる。「Dead(1)」とは、飛来する光(フォトン)を検出できる状態である。他の状態では、飛来する光(フォトン)は検出できない。
 状態が「Fire」であるとき、次のビンでは状態を「Dead(Tdead)」とする。状態が「Dead(Tdead)」であるとき、次のビンでは状態を「Dead(Tdead-1)」とする。状態が「Dead(Tdead-1)」であるとき、次のビンでは状態を「Dead(Tdead-2)」とする。以降同様に状態が遷移して、状態が「Dead(3)」であるとき、次のビンでは状態を「Dead(2)」とする。そして、状態が「Dead(2)」であるとき、次のビンでは状態を「Dead(1)」とする。「Fire」という状態から「Dead(1)」という状態までの遷移は、光(フォトン)飛来の有無にかかわらず、画一的に遷移していく。
 状態が「Fire」ということは、そのビンに対応する時間において、光(フォトン)が飛来したことを意味する。ビン換算においてTdeadだけ時間が過ぎると、「Dead(1)」の状態となる。つまり、Tdeadの時間は、光(フォトン)の検出を行わないことを意味している。
 状態が「Dead(1)」のときに、光(フォトン)が飛来した場合は、次のビンにおいて状態は「Fire」となる。光(フォトン)が飛来しない場合は、次のビンにおいて状態は「Dead(1)」に留まる。すなわち、この「Dead(1)」においてフォトンの飛来を待つことになる(awaiting)。
 図121に示すデッドタイムを有するSPADの状態遷移図を、行列を用いて定式化すると、次の式183となる。式183は、遷移行列(Transition Matrix)である。
Figure JPOXMLDOC01-appb-M000183
上の式183で示される行列は、「Tdead+1」行「「Tdead+1」列の行列である。また、p(n)は、n番目のビンの生起率である。なお、先述のとおり、正確に述べると、「そのビンに対応する時間(D)内においてフォトンが飛来する確率」をp(n)としている。一般用語としての生起率は単位時間あたりの発生確率であるから、正確に述べると、p(n)は、n番目のビンに対応する時間における「一般用語としての生起率」にDをかけた値である。
 さて、M回の測定(発光)を行ったとき、n番目のビンに対応する状態が、各状態にいる個数を考える。すなわち、次の式184で示される「Tdead+1」次元のベクトルを考える。
Figure JPOXMLDOC01-appb-M000184
 n=-1の時は、便宜的に、次の式185で定義する。これは、n=0を計算するための初期値である。
Figure JPOXMLDOC01-appb-M000185
 このとき、次の式186が成立する。
Figure JPOXMLDOC01-appb-M000186
ここで、nは、0乃至N-1である。
 上の式186(すなわち、「Tstate(n)・Nstate(n-1)」)の第2行目は、n番目のビンにおける状態が「Fire」となっている個数である。つまり、n番目のビンに対応する時間(すなわち、時間n×Dから時間(n+1)×Dまでの範囲)において、SPADが光(フォトン)を検出した回数である。実際に、M回の測定(M回の発光と受光)を行って、n番目のビンに対応する時間でSPADが反応した回数はh(n)回であるから、次の式187が成立する。
Figure JPOXMLDOC01-appb-M000187
 従って、h(n)は観測値であり既知なので、n=0の時の式187および式185により、式183中のp(0)の値が求められる。つまり、Tstate(0)が確定する。さらに、式186により、Nstate(0)も確定する。
 次に、n=1を考える。n=1の時の式187および、先に確定したNstate(0)により、式183中のp(1)の値が求められる。つまり、Tstate(1)が確定する。さらに、式186により、Nstate(1)も確定する。
 次に、n=2を考える。n=2の時の式187および、先に確定したNstate(1)により、式183中のp(2)の値が求められる。つまり、Tstate(2)が確定する。さらに、式186により、Nstate(2)も確定する。
 以降、同様にして、n=0乃至N-1のすべてのnについて、p(n)、Tstate(n)、および、Nstate(n)を求めることができる。
 さて、Tdead+1次元ベクトルであるNstate(n)の第1行目の値をMd(n)とする。ここで、n=0乃至N-1である。また、Nstate(-1)の第1行目の値をMd(-1)とする。すなわち、Md(-1)=Mである。M回の測定において、n-1番目のビンに対応する時間においてDead(1) という状態になっていた回数はMd(n-1)回である。また、n番目のビンに対応する時間において、h(n)回の光(フォトン)の飛来を観測している。したがって、ヒストグラムの各ビンnの頻度h(n)が観測された時に、n番目のビンの生起率p(n)を確率変数としたときの確率密度関数は、平均が式188で、標準偏差が式189の正規分布となる。
Figure JPOXMLDOC01-appb-M000188
Figure JPOXMLDOC01-appb-M000189
 換言すれば、SPADアレイ13で使用されるSPADが「最初に飛来した光(フォトン)のみを検出するSPAD」である場合、生起率を確率変数としたときの確率密度関数は式8で表現されるが、「一度光(フォトン)を検出しても、その後、デッドタイム後に再度飛来する光(フォトン)を検出できるSPAD」である場合は、確率密度関数として次の式190を採用すればよい。すなわち、デッドタイムを管理する状態遷移に基づいて、以下のように確率密度関数が得られる。
Figure JPOXMLDOC01-appb-M000190
 SPADアレイ13で使用されるSPADが、「一度光(フォトン)を検出しても、その後、デッドタイム後に再度飛来する光(フォトン)を検出できるSPAD」である場合は、生起率を確率変数としたときの確率密度関数は、図5の代わりに、図123に示す処理手順により計算できる。
 図123は、本技術の第13の実施の形態における確率密度関数を計算するための処理手順の一例を示す流れ図である。この処理は、演算部16によって行われる。
 最初に、ステップS1301において、ヒストグラム作成のために行った測定回数である数値Mを入力する。そして、ステップS1302に進む。
 ステップS1302において、累積部15によって作成されたヒストグラムのデータを入力する。すなわち、各ビンnにおける頻度h(n)を入力する。ここで、n=0乃至N-1である。そして、ステップS1303に進む。
 ステップS1303において、上述の式185に定義されているTdead+1次元ベクトルであるNstate(-1)をセットする。そして、ステップS1304に進む。
 ステップS1304において、nに0をセットする。そして、ステップS1305に進む。
 ステップS1305において、式187を解いて、p(n)を求める。そして、求められたp(n)を用いて、Tstate(n)を確定させる。なお、Tstate(n)は式183で定義されている。さらに、求められたTstate(n)を用いて、式186により、Nstate(n)を確定させる。Nstate(n)の第1行目の値を、Md(n)とする。そして、ステップS1306に進む。
 ステップS1306において、現在のnの値がN-1以下であるかを調べる。N-1以下であれば、ステップS1307に進む。そうでなければ、ステップS1308に進む。
 ステップS1307において、nの値を1だけインクリメントして、ステップS1305に進む。
 ステップS1308において、Md(-1)にMをセットする。そして、ステップS1309に進む。
 ステップS1309において、平均として、h(n)/Md(n-1)、標準偏差として、「(1/Md(n-1)×h(n)/Md(n-1)×(1-h(n)/Md(n-1)))の平方根」を出力し、一連の処理を終了する。ここで、n=0乃至N-1である。
 先に述べた「第1の実施の形態」乃至「第12の実施の形態」において、式8および図5を用いて説明した「n番目のビンの生起率p(n)を確率変数としたときの確率密度関数」の代わりに、式190および図123を用いて説明した「n番目のビンの生起率p(n)を確率変数としたときの確率密度関数」を使うことで、SPADアレイ13で使用されるSPADが、「一度光(フォトン)を検出しても、その後、デッドタイム後に再度飛来する光(フォトン)を検出できるSPAD」である場合にも、本技術は適用することができる。
 [細分化されたビン]
 ここまでは、デッドタイムの時間は、Tdead=「dead time」÷Dとして、ビンの間隔Dで割り切れるものとしていた。以下では、割り切れない場合について説明していく。すなわち、「dead timeの時間」=Tdead ÷ Udead ×Dと表される場合を考える。ここで、TdeadとUdeadは自然数であり、かつ、Udeadが2以上である場合である。なお、前述の説明では、Udead=1の場合を想定していた。
 Udeadが2以上である場合、各ビンを、Udead個に分割して、「細分化されたビン」を考える。具体的な例として、Udead=3の場合を図124に示す。同図において、横軸は時間を表している。また、横軸として対応するビンの番号も記している。ビンの幅はDである。さらに、横軸として対応する「細分化されたビン」の番号も記している。「ビン」と「細分化されたビン」の比は、Udead(図の例では3)である。なお、同図では、8番目乃至N-1番ン目のビンに対応する時間は図示を省略している。
 図124に示す例では、3番目の「細分化されたビン」に対応する時間(すなわち、時間3×D÷Udeadから時間4×D÷Udeadまでの範囲)において、光(フォトン)が飛来している。さらに、8番目の「細分化されたビン」に対応する時間(すなわち、時間8×D÷Udeadから時間9×D÷Udeadまでの範囲)において、光(フォトン)が飛来している。13番目の「細分化されたビン」に対応する時間(すなわち、時間13×D÷Udeadから時間14×D÷Udeadまでの範囲)において、光(フォトン)が飛来している。17番目の「細分化されたビン」に対応する時間(すなわち、時間17×D÷Udeadから時間18×D÷Udeadまでの範囲)において、光(フォトン)が飛来している。19番目の「細分化されたビン」に対応する時間(すなわち、時間19×D÷Udeadから時間20×D÷Udeadまでの範囲)において、光(フォトン)が飛来している。22番目の「細分化されたビン」に対応する時間(すなわち、時間22×D÷Udeadから時間23×D÷Udeadまでの範囲)において、光(フォトン)が飛来している。同図には、それぞれの光(フォトン)は、124-1乃至124-6という番号を付してある。
 同図に示す場合、124-1の光(フォトン)はSPADにより検出される。すなわち、1番目のビンは1だけインクリメントされる。同時に、デッドタイムに入る。デッドタイムの長さは、図中に点線矢印124-7で表示している。この期間に飛来する光(フォトン)は検出されない。すなわち、124-2の光(フォトン)はSPADにより検出されず、ヒストグラムのデータも更新(インクリメント)されない。
 次に飛来する光(フォトン)124-3は、既にデッドタイムが終了しているので、SPADにより検出される。すなわち、4番目のビンは1だけインクリメントされる。同時に、再度、デッドタイムに入る。デッドタイムの長さは、図中に点線矢印124-8で表示している。この期間に飛来する光(フォトン)は検出されない。すなわち、124-4および124-5の光(フォトン)はSPADにより検出されず、ヒストグラムのデータも更新(インクリメント)されない。
 次に飛来する光(フォトン)124-6は、既にデッドタイムが終了しているので、SPADにより検出される。すなわち、7番目のビンは1だけインクリメントされる。同時に、再度、デッドタイム(図中の124-9)に入る。
 なお、デッドタイムは、常に一定である。つまり、124-7、124-8、および、124-9は同じ長さである。図124の例では、デッドタイムの時間は、7×D÷Udeadである。すなわち、同図ではUdead=3の場合を想定しているため、デッドタイムの時間は、(7/3)×Dとなる。
 以降同様である。デッドタイムのあるSPADは、このように動作する。
 Udead=1でない場合、この「細分化されたビン」において、上記と同様の考察をすることで、生起率を求めることが出来る。つまり、k番目の「細分化されたビン」の生起率ps(k)を求めることが出来る。正確に述べると、 「その細分化されたビンに対応する時間(D÷Udead)内においてフォトンが飛来する確率」をps(k)としている。一般用語としての生起率は単位時間あたりの発生確率であるから、正確に述べると、ps(k)は、k番目の細分化されたビンに対応する時刻における「一般用語としての生起率」に「D÷Udead」をかけた値である。
 さて、図121においては、各ビン(n)について、頻度(h(n))が観測されていた。一方、図124に示す「細分化されたビン」においては、次の式191で示される値のみが、h(n)として観測されることになる。
Figure JPOXMLDOC01-appb-M000191
ここで、hs(k)は、 k番目の「細分化されたビン」に対応する時間(すなわち、時間k×D÷Udeadから時間(k+1)×D÷Udeadまでの範囲)において光(フォトン)が飛来してSPADが反応して光(フォトン)が検出される個数である。
 つまり、k番目の「細分化されたビン」に対応する時間において光(フォトン)が飛来してSPADが反応して光(フォトン)が検出される個数hs(k)は、各kについて観測できない。代わりに、hs(k)をUdead個だけ累加算した値が観測されることになる。ただし、この状態では解くことはできないため、ある仮定を行う。すなわち、次の式192とする。
Figure JPOXMLDOC01-appb-M000192
近傍の時間同士では、生起率が急激に変化をすることはないので、この仮定は妥当である。
 図121で示すデッドタイムを有するSPADの状態遷移図を、行列を用いて定式化(式183)した説明と同様に考えると、この場合、遷移行列(Transition Matrix)は次の式193となる。
Figure JPOXMLDOC01-appb-M000193
上の式193で示される行列は、「Tdead+1」行「Tdead+1」列の行列である。また、ps(k)は、k番目の「細分化されたビン」の生起率である。
 さて、M回の測定(発光)を行ったとき、k番目の「細分化されたビン」に対応する状態が、各状態にいる個数を考える。すなわち、次の式194で示される「Tdead+1」次元のベクトルを考える。
Figure JPOXMLDOC01-appb-M000194
 n=-1の時は、便宜的に、次の式195で定義する。これは、k=0を計算するための初期値である。
Figure JPOXMLDOC01-appb-M000195
 このとき、次の式196が成立する。
Figure JPOXMLDOC01-appb-M000196
ここで、kは、0乃至N×Udead-1である。
 上の式196(すなわち、「Tstate_s(k)・Nstate_s(k-1)」)の第2行目は、k番目の「細分化されたビン」における状態が「Fire」となっている個数である。つまり、k番目の「細分化されたビン」に対応する時間(すなわち、時間k×D÷Udeadから時間(k+1)×D÷Udeadまでの範囲)において、SPADが光(フォトン)を検出した回数である。実際に、M回の測定(M回の発光と受光)を行って、k番目の「細分化されたビン」に対応する時間でSPADが反応した回数はhs(k)回であるから、次の式197が成立する。
Figure JPOXMLDOC01-appb-M000197
 従って、h(n)は観測値であり既知なので、n=0とし、k=Udead×n乃至Udead×(n+1)-1の時の式197、式191、式192、および式195により、k=Udead×n乃至Udead×(n+1)-1の式193中のps(k)の値が求められる。つまり、Tstate_s(k)が確定する。さらに、式196により、Nstate_s(k)も確定する。
 次に、n=1を考える。n=1とし、k=Udead×n乃至Udead×(n+1)-1の時の式197、式191、式192、および、先に確定したNstate_s(Udead×n-1)により、k=Udead×n乃至Udead×(n+1)-1の式193中のps(k)の値が求められる。つまり、Tstate_s(k)が確定する。さらに、式196により、Nstate_s(k)も確定する。
 次に、n=2を考える。n=2とし、k=Udead×n乃至Udead×(n+1)-1の時の式197、式191、式192、および、先に確定したNstate_s(Udead×n-1)により、k=Udead×n乃至Udead×(n+1)-1の式193中のps(k)の値が求められる。つまり、Tstate_s(k)が確定する。さらに、式196により、Nstate_s(k)も確定する。
 以降、同様にして、n=0乃至N-1のすべてのnについて、k=Udead×n乃至Udead×(n+1)-1の時のps(k)、Tstate_s(k)、および、Nstate_s(k)を求めることができる。
 次に、n番目のビンの生起率p(n)を求めることを考える。Nstate_s((n+1)×Udead-1)の第1行目の値を、Md(n)とする。ここで、n=0乃至N-1である。また、Nstate_s(-1)の第1行目の値をMd(-1)とする。すなわち、Md(-1)=Mである。
 さて、時刻n×Dの直前の時刻とは、細分化されたビンにおいて、n×Udeadの直前のビンに対応する。すなわち、 n×Udead-1番目に対応する。従って、M回の測定において、時刻n×Dの直前の時刻でDead(1)という状態になっていた回数は、Md(n-1)回である。また、n番目のビンに対応する時間において、h(n)回の光(フォトン)の飛来を観測している。したがって、ヒストグラムの各ビンnの頻度h(n)が観測された時に、n番目のビンの生起率p(n)を確率変数としたときの確率密度関数は、平均が上述の式188で、標準偏差が上述の式189の正規分布となる。
以上を踏まえて、図123におけるステップS1303および1305の代わりに、それぞれ、図125のステップS1303-1およびS1305-1を行えばよい。この変更により、「dead timeの時間」=Tdead÷Udead×Dと表される場合(Udeadは2以上の整数)にも、生起率の計算が可能となる。
 なお、ステップS1303-1において、上述の式193に定義されているTdead+1次元ベクトルであるNstate_s(-1)をセットする。
 ステップS1305-1において、式191に現在のnの値を代入した式を考える。h( n )は、観測値であり既知である。式192において、現在のnの値を代入した式を考える。式197において、k=n×Udead乃至(n+1)×Udead-1を代入したUdead個の式を考える。式196において、k=n×Udead乃至(n+1)×Udead-1を代入したUdead個の式を考える。これらの式と、既知であるNstate_s(n×Udead-1)により、ps(k)、Tstate_s(k)、Nstate_s(k)を求める(k=n×Udead乃至(n+1)×Udead-1 )。Nstate_s((n+1)×Udead-1) の第1行目の値を、Md(n)とする。
 このように、この第13の実施の形態を適用することにより、デッドタイムが有限である場合のSPADにおけるヒストグラムの理論的解析を行うことができる。
 [要点]
 第13の実施の形態は、以下の点を要点とする。
(1)発光部から発光されたアクティブ光が対象物において反射したアクティブ光成分および環境光が前記対象物において反射した環境光成分を含む反射光の受光頻度を示すヒストグラムを取得するヒストグラム取得部と、
 前記ヒストグラムに対して所定の統計処理を施すことにより前記アクティブ光成分の分布を検出する検出部と、
 前記アクティブ光成分の分布に基づいて前記対象物との距離を距離情報として測定する測定部と
を具備し、
 前記検出部は、前記所定の統計処理として、前記反射光の受光による生起率を確率変数としたときの確率密度関数を求める処理を行い、
 前記受光頻度をカウントする際に特定の時間(デッドタイム)にはカウントされない場合は、前記検出部は、前記デッドタイムと同じ数の状態を有する状態遷移を考慮して、前記確率密度関数を求める処理を行う
距離測定装置。
(2)前記(1)において、
 前記検出部は、前記デッドタイムが、前記ヒストグラムの時間分解能の整数倍でない場合は、時間方向に細分化された時間間隔で、前記デッドタイムと同じ数の状態を有する状態遷移を考慮して、前記確率密度関数を求める処理を行うこととし、
 前記細分化された時間間隔は、整数倍した値が前記ヒストグラムの時間分解能であり、かつ、整数倍した値が前記デッドタイムとなる時間間隔である
距離測定装置。
 <15.第14の実施の形態>
 [概要]
 ここでは、生起率のピークを、D以下の精度で求める実施の形態について説明する。なお、Dとは、既出のとおり、ビンの幅(時間幅)である。生起率のピークを検出して、その位置に対応するビンの番号に時間Dを掛けることで、ピークの位置の時刻を求めることができる。しかし、これでは、Dの単位でしかピーク位置の時刻を求められない。ここでは、補間により、Dの単位以下の精度で求め、時間分解能を向上させる処理について説明する。
 なお、ピーク位置の時刻に、光速(c)を乗算し、それを2で割ることによって、対象物までの距離が計算できることは既に述べた。つまり、ピーク位置の時刻を求める際に、より細かい時間分解能で算出することができれば、より細かい距離分解能の測定装置を提供することができる。
 [距離測定]
 図126は、本技術の第14の実施の形態における距離測定の強度分布の例を示す図である。発光部12からの発光の強度を事前に測定しておくことにより、この強度分布は既知となる。
 同図におけるAに示すように、光は、発光部12から発光されたものとする。時間とともに強度は変化する。なお、ピーク位置を時刻0としている。
 ヒストグラムのn番目のビンには、そのビンに対応する時間(時間(n-1)×Dから時間n×Dの範囲)内において光(フォトン)を検出した回数がデータとして格納されている。つまり、同図におけるAの強度に対して、Dの幅を持ったボックスフィルタ(同図におけるB)とのコンボルーション(畳み込み演算)した結果が、各ビンのデータとなる。つまり、各ビンのデータは、同図におけるCに示す強度と比例する。同図におけるCは、同図におけるAと同図におけるBのコンボルーションした結果である。さらに、同図におけるCの波形を、例えば、多項式で近似する(同図におけるD)。近似式を、Lightorg(t)とする。同図におけるAの強度分布は既知であるから、同図におけるCも既知であり、それを近似した「tの関数であるLightorg(t)」も既知である。
 さて、「各ビンのデータは、同図におけるCに示す強度と比例する。」と直上で述べたが、図127を用いて詳しく考察してみる。
 図127におけるAは、図126におけるAの再掲である。すなわち、発光部12から発光された光の強度である。
 そして、図127におけるBは、図126におけるDの再掲である。
 発光部12から発光された光は、時間tpeakだけ遅れて、SPADアレイ13内のSPADに到達するとする。ここで、tpeakは、「対象物までの距離」×2÷cである。
 当然、「対象物までの距離」の往復分の距離を進むため、強度は減衰する。従って、SPADアレイ13内のSPADに到着する際の光の強度は、図127におけるCに示すように、同図におけるAよりも振幅が小さくなる。つまり、各ビンのデータは、同図におけるDとなる。なお、同図におけるDは、同図におけるBを縦軸方向に定数倍した波形である。
 また、発光部12からの光は、反射面である被写体で内部散乱を起こすことにより、広がりをもってSPADアレイ13内のSPADに到着する場合もありうる。つまり、SPADアレイ13内のSPADは、図127におけるEに示すような強度を受ける。同図におけるEは、同図におけるAの振幅を小さく、かつ、時間方向に広げた波形である。つまり、各ビンのデータは、同図におけるEとなる。なお、同図におけるEは、同図におけるBを縦軸方向に定数倍し、かつ、横軸方向に定数倍した波形である。
 なお、同図におけるC乃至Fは、ピーク位置がtpeakになっている。これは、「対象物までの距離」の往復分の距離を進む時間だけ遅れるからである。
 以上の考察より、Lightorg(t)(上述のとおり既知である)に対して、時間方向に対して定数倍(blightとする)し、さらに、この関数に定数倍(alightとする)した強度の光が、SPADアレイ13内のSPADに到達することが分かる。また、生起率には、時間によらず一定な環境光成分も含まれる。強度は生起率に比例するので、生起率を式で表現すると、次の式198となる。
Figure JPOXMLDOC01-appb-M000198
ここで、alight、blightおよびclightは、状況によって変わる未知数である。clightは環境光成分である。また、n番目のビンに対応する生起率としてp(n)という記号を用いてきたが、ここでは、時間tにおける生起率を考えているので、これと区別するため、pとは別の記号ptを用いている。pt(t)は、時間tにおける生起率である。正確には、p(n)との整合性を考え、pt(t)は、「時間t-D/2から時間t+D/2(時間幅としてD)の間隔内においてフォトンが飛来する確率」をpt(t)としている。一般用語としての生起率は単位時間あたりの発生確率であるから、正確に述べると、pt(t)は、時間tにおける「一般用語としての生起率」にDを掛けた値である。
 p(n)は、時間n×Dから時間(n+1)×Dまでの範囲における光(フォトン)が飛来する確率であるから、p(n)=pt(D×(n+0.5))であると言える。
 この実施の形態においては、pt(t)のピーク位置(極大値となる位置)tpeakを求める処理である。
 各ビンに対応する生起率p(n)は、式6を用いて説明した通りに求めることができるため、この実施の形態においては、既にp(n)は求められているものとして説明する。ここで、nは0乃至N-1である。
 nの関数であるp(n)のピーク位置を検出し、その値をnpとする。npは0乃至N-1である。np番目のビンに対応する時間の近傍に、tpeakは存在する。より厳密に述べると、tpeakは式199を満たす。
Figure JPOXMLDOC01-appb-M000199
 そこで、npの近傍のデータp(n)を使って、式198で示される関数のフィッティングを行う。具体例を図128に示す。同図における棒グラフは、各ビンに対応する生起率を表している。なお、同図において、2乃至np-4およびnp+5乃至N-1のビンの部分は図示を省略している。
 同図では、関数フィッティングのために使用するnpの近傍のデータとして、np-1、np、np+1、np+2、np+3の5点の例を示している。
 生起率p(np-1)は、時間(np-1)×Dから時間(np-1+1)×Dまでの範囲における光(フォトン)が飛来する確率であるから、p(np-1)は時刻D×(np-1+0.5)における生起率と言ってよいであろう。生起率p(np)、p(np+1)、p(np+2)、p(np+3)についても同様である。これらを図示したものが、図128の5つの黒丸である。5つの黒丸は、時刻D×(np-1+0.5)、時刻D×(np+0.5)、時刻D×(np+1+0.5)、時刻D×(np+2+0.5)、時刻D×(np+3+0.5)において、生起率が、それぞれp(np-1)、p(np)、p(np+1)、p(np+2)、p(np+3)であることを示している。
 これら5つの黒丸の点を、なるべく通過するような「式198で表現される関数(図中には一点鎖線で表示)を求めればよい。すなわち、誤差最小二乗法の式である次の式200を満たすalight、blight、clight、および、tpeakを求めればよい。なお、この式200におけるargminは、式の値が最小になるようなalight、blight、clight、および、tpeakを求めることを意味する。
Figure JPOXMLDOC01-appb-M000200
上の式200の右辺のΣは、npの近傍のデータにおける和であり、図128に示す場合、{np-1、np、np+1、np+2、np+3}における和である。また、σ(n)は、既出のとおり、σ(n)=「(1/M(n-1)×h(n)/M(n-1)×(1-h(n)/M(n-1)))の平方根」であり、上述の式8の正規分布における標準偏差である。σ(n)はnによらず定数として近似してもよい。
 これ以降では、関数Lightorg(t)の具体例を示しながら、詳細な説明を行う。
 関数Lightorg(t)の具体例を次の式201に示す。
Figure JPOXMLDOC01-appb-M000201
上の式201に示す関数は、ピーク位置(t=0)の左側は2次関数で表現され、右側は別の2次関数で表現される関数である。発光部12からの発光(短時間発光)は、立ち上がりと立下りで異なる傾きを持っている場合が一般的であり、この式201は、そのような状況を近似する関数として最適である。また、dobsの値を1とすることにより、立ち上がりと立下りが同じ傾きである場合にも対応することができる。
 発光部12からの発光の強度を事前に測定しておくことにより、dobsは既知となる。
 式198に、式201を代入することで、次の式202を得る。
Figure JPOXMLDOC01-appb-M000202
ただし、-alight×(blightの2乗)を新たにalightとしている。そして、alight×elight+clightを新たにclightとしている。この場合、未知数は、alight、clight、および、tpeakである。関数フィッティングのために使用するnpの近傍のデータとして、np-1、np、np+1の3点とする。測定点が3点で、未知数が3個なので、誤差最小二乗法の解法は、単なる3つの連立方程式の解法となる。すなわち、次の式203乃至式205を解くことになる。
Figure JPOXMLDOC01-appb-M000203
Figure JPOXMLDOC01-appb-M000204
Figure JPOXMLDOC01-appb-M000205
上の各式において、左辺はそれぞれ、測定値から求まるnp-1番目、np番目、np+1番目のビンにおける生起率p(np-1)、p(np)、p(np+1)である。dobsは、発光部12からの発光の強度を事前に測定しておくことで既知となる。
 式203乃至式205を、alight、clight、および、tpeakについて、解くことで、ピーク位置の時刻tpeakを求めることができる。すなわち、ヒストグラムの時間分解能よりも細かい時間分解能により、アクティブ光成分のピーク位置が検出される。ただし、tpeakは、上述の式199を満たすものとする。
 以上をまとめると、生起率のピークをD以下の精度で求める処理は、図129に示す処理手順により計算することができる。
 図129は、生起率のピークをD以下の精度で求める処理手順の一例を示す流れ図である。この処理は、演算部16によって行われる。
 なお、この処理が行われる前に、各ビン(n)に対応する生起率p(n)は求められているものとする。ここで、nは0乃至N-1である。
 最初に、ステップS1401において、各ビンにおける生起率を入力する。すなわち、p(n)を入力する。ここで、n=0乃至N-1である。そして、ステップS1402に進む。
 ステップS1402において、生起率 p(n)のピーク位置を検出する。その位置を、npとする。ピーク検出は従来からある手法により行われる。そして、ステップS1403に進む。
 ステップS1403において、式203乃至式205を解いて、alight、clight、および、tpeakを求める。ただし、tpeakは、式199を満たす。そして、ステップS1404に進む。
 ステップS1404において、tpeakを出力し、一連の処理を終了する。
 このようにして、時間分解能がD未満の精度でピーク位置を算出することが可能である。つまり、細かい距離分解能の測定装置を提供することができる。
 ここでは、関数Lightorg(t)の具体例として、ピーク位置左側と右側をそれぞれ2次関数で近似していたが、この他に、例えば、正規分布で近似してもよい。
 なお、生起率ではなくヒストグラムについて、同様の処理を行っても近似的に求めることができる。つまり、上述の説明において、p(n)の代わりに、h(n)を用いて処理してもよい(n=0乃至N-1)。この場合、精度は落ちるが、生起率を計算する処理を省略することができるため、計算量の削減に寄与する。
 [物体の属性検出]
 次に、測定物体の属性を検出する形態について説明する。
 図130は、本技術の実施の形態において想定する距離測定装置10を使って、無機物および有機物を測定対象としている状況を示している。ここでは、無機物として自動車130a、有機物として人肌130bを例にしている。距離測定装置10内の発光部12からの光は、自動車130aおよび人肌130bに当たり、反射されて、レンズ13aを介して、SPADアレイ13の対応するSPADに到達する。
 図131は、無機物および有機物を測定対象とした、物体の測定例を示す図である。発光部12からの光(図131のA)は、反射面である被写体で内部散乱を起こすことにより、広がりをもってSPADアレイ13内のSPADに到着する。被写体が無機物であれば、内部散乱はほとんど起きないので、広がりは起こらない(図131のB)。一方、被写体が有機物であれば、内部散乱が顕著に起こるので、広がりは大きい(図131のC)。すなわち、式198および式200におけるblightの値は、無機物であればほぼ1であり、有機物であれば1よりかなり大きな値となる。
 演算部16において式200を解いたときに、blightの値が所定の値以下であれば「測定対象物は無機物である」という情報を、所定の値を超えていれば「測定対象物は有機物である」という情報を、距離測定装置10内の出力端子17より出力する。これにより、測定対象物までの距離を測定すると同時に、その対象物の属性(無機物であるか、有機物であるか)も得ることができる。
 さて、生起率のピークをD以下の精度で求める実施の形態の説明に戻る。演算部16において式200を満たすalight、blight、clight、および、tpeakを求めればよいことは、既に述べた。もし、未知数alight、blight、clight、および、tpeakのいくつかについて事前に情報を得ることができれば、その情報を加味して、式200を解くと、より正確な解を求めることができる。
 たとえば、距離測定装置10に併設しているカメラ100を用いれば、blightに関する情報を得ることができる。この様子を、図132および図133を用いて説明する。
 昨今の画像認識技術により、カメラで撮影した画像内に投影されている物体の認識が可能となっている。そこで、カメラ100で撮影した画像を、従来からある認識技術を用いて解析することにより、測定対象物を認識することができる。
 例えば、図132に示す場合、カメラ100で撮影した画像を演算部16において解析することにより、測定対象物が自動車130aであることを判断することができる。自動車は無機物であり、式200のblightはほぼ1である。つまり、カメラ100により測定対象物が自動車であると判断された場合は、「blightはほぼ1である」という条件付きで、式200を解くとよい。具体的には、式200の代わりに、次の式206を解けばよい。
Figure JPOXMLDOC01-appb-M000206
 例えば、図133に示す場合、カメラ100で撮影した画像を演算部16において解析することにより、測定対象物が人肌130bであることを判断することができる。人肌は有機物であり、式200のblightは1よりかなり大きい。つまり、カメラ100により測定対象物が人肌であると判断された場合は、「blightは1よりかなり大きい」という条件付きで、式200を解くとよい。具体的には、式200の代わりに、次の式207を解けばよい。
Figure JPOXMLDOC01-appb-M000207
なお、式206および式207におけるConstlightは、所望の定数である。
 このように、距離測定装置10とは別のセンサ(上述の例では、カメラ100)を用いて、未知数alight、blight、clight、および、tpeakのいくつかについて情報を得ることにより、式200の解をより正確に求めることができる。
 このように、この第14の実施の形態を適用することにより、ヒストグラムのビンの値を補間して、ピーク値を小数点以下の精度で求めることができる。
 [要点]
 第14の実施の形態は、以下の点を要点とする。
(1)発光部から発光されたアクティブ光が対象物において反射したアクティブ光成分および環境光が前記対象物において反射した環境光成分を含む反射光の受光頻度を示すヒストグラムを取得するヒストグラム取得部と、
 前記ヒストグラムに対して所定の統計処理を施すことにより前記アクティブ光成分の分布を検出する検出部と、
 前記アクティブ光成分の分布に基づいて、前記ヒストグラムの時間分解能よりも高分解能な精度で、前記アクティブ光成分のピーク位置を検出するピーク位置算出部と、
前記ピーク位置により前記対象物との距離を距離情報として測定する測定部と
を具備する距離測定装置。
(2)前記(1)において、
 前記ピーク位置算出部は、「前記アクティブ光成分の分布におけるピーク位置」の近傍の「前記アクティブ光成分の分布」に、パラメータを有する所定の波形が一致あるいは最もよくあてはまるように、前記パラメータを決定し、さらに、「決定された前記パラメータ」における前記波形のピーク位置を検出する処理を行う
距離測定装置
(3)前記(2)において、
 前記ピーク位置算出部は、さらに、波形の広がりに対応する「決定された前記パラメータ」を解析することで、波形の広がりに応じて、前記対象物の属性を決定する処理を行う
距離測定装置。
(4)前記(2)において、
 前記ピーク位置算出部は、前記対象物の属性に依存して前記パラメータに制限を加えて、前記パラメータを有する前記波形が最もよくあてはまるように、前記パラメータを決定する処理を行う
距離測定装置。
 <16.第15の実施の形態>
 [概要]
 ここでは、測距結果についての確度を出力する形態について説明する。既に述べたように、距離測定装置10は、生起率あるいはヒストグラムのピークを検出することで、対象物までの距離を出力端子17から出力するようにしている。これに加え、出力された距離情報の正しさの度合(確度)も、出力端子17から出力するようにしたものが、この実施の形態である。
 [ピーク検出]
 各ビンに対応する生起率p(n)は、式8を用いて説明した通りに求めることができるため、この実施の形態においては、既にp(n)は求められているものとして説明する。ここで、nは0乃至N-1である。なお、再度説明すると、n番目のビンの生起率p(n)を確率変数としたときの確率密度関数は、式8となる。
 上述の第1の実施の形態と同様に、H(n)=h(n)÷M(n-1)とすると、H(n)は、上述の式8の正規分布における平均である。そして、σ(n)=「(1/M(n-1)×h(n)/M(n-1)×(1-h(n)/M(n-1)))の平方根」とすると、σ(n)は、上述の式8の正規分布における標準偏差である。これらの値は、すでに求めらているものとして説明する。
 装置10内の発光部12からの光(フォトン)は、対象物20によって反射されて、レンズ13aを介してSPADアレイ13に到達する。そして、到達した時間に対応するビンが1だけインクリメントされる。発光部12の発光は、短時間であるから、対応するビンの数は少ない。すなわち、ほとんどのビンでのカウントは、環境光からの光(フォトン)によるものである。
 これを図示すると、図134となる。図中の横軸は、集合Sの要素数である。集合Sは、集合{0,1,2,3,… N-2,N-1}の部分集合である。「環境光からの光(フォトン)のみがカウントされるビンの集合がSであり、かつ、発光部12からの光(フォトン)を検出した時間に対応するビンは集合Sに含まれない」という確率Ppriori(S)を、縦軸に取っている。ただし、Ppriori(S)は相対値で良いので、単位は任意である。
 図134に示す例では、N個のビンの中で、90%のビンは、環境光からの光(フォトン)のみがカウントされるビンであるとしている。すなわち、図中には、横軸が0.9×Nの前後で急激に変化するようになっている。0.9×N以下ではPpriori(S)はほぼ0であり、0.9×Nを超えるとPpriori(S)は大きな値となっている。これは、測距場面を複数想定してテストすることでPpriori(S)を決定すればよく、Ppriori(S)は同図に示す関数に限定されるわけではない。再度述べるが、Ppriori(S)は、事前に測距場面を複数想定してテストすることで既知となる。
 また、測距対象の物体までのおよその距離が分かっている場合には、その距離に対応するビンがSに含まれているときには、Ppriori(S)の値を小さくするようにしてもよい。
 集合Sが「環境光からの光(フォトン)のみがカウントされるビンの集合」である場合を考える。集合Sの各要素nに対して、n番目のビンの生起率は、平均がH(n)、標準偏差σ(n)であるから、集合Sに含まれるビンのみの観測値から推測される「環境光からの光(フォトン)の生起率」は、次の式208となる。すなわち、重み付き平均により計算でき、その値を式208のHav(S)とする。
Figure JPOXMLDOC01-appb-M000208
そして、環境光からの光(フォトン)の生起率が、Hav(S)である確率は、次の式209となる。
Figure JPOXMLDOC01-appb-M000209
 したがって、次の式210に示す集合Sambientについて以下のことが言える。環境光からの光(フォトン)のみがカウントされるビンの集合がSambientであり、かつ、発光部12からの光(フォトン)を検出した時刻に対応するビンは集合Sambientに含まれない。
Figure JPOXMLDOC01-appb-M000210
 したがって、環境光からの光(フォトン)の生起率は、次の式211で表されるHambientであると言える。
Figure JPOXMLDOC01-appb-M000211
 さて、各ビン(n=0乃至N-1)における生起率の平均H(n)について、ピーク位置を求める。ピーク位置をnpとする。なお、ピーク検出は、従来からある手法であり、その手法の説明は省略する。
 ピーク位置npにおける生起率の平均はH(np)であり、標準偏差はσ(np)である。この値が、環境光からの光(フォトン)の生起率Hambientに対して、差が有意であれば、np番目のビンに対応する時間において、発光部12からの光(フォトン)を検出したと言える。つまり、np番目のビンに対応する距離が、対象物20までの距離であると言える。逆に、差が有意でなければ、ノイズのために、たまたまピークとして検出されてしまったと言える。以上、定性的に述べたが、これを定量化して、出力することで、測距結果の確度を使用者に伝えることができる。
 定量化は、次の式212を計算すればよい。
Figure JPOXMLDOC01-appb-M000212
上の式212は、平均H(np)、標準偏差σ(np)の正規分布(確率密度関数)において、Hambientよりも大きな値をとる確率である(図135における灰色部分の面積)。すなわち、この式212により、環境光成分に対するアクティブ光成分の有意性の度合(信頼度)が求められる。なお、図135は、各ビンにおける生起率を示しており、特に、np番目のビンのみ図示しており、他のビンについては図示を省略している。
 [処理手順]
 以上をまとめると、測距結果の信頼度(確度)、すなわち環境光成分に対するアクティブ光成分の有意性の度合を求める処理は、次の図136に示す処理手順により計算できる。
 図136は、測距結果の信頼度(確度)を求める処理手順の一例を示す流れ図である。この処理は、演算部16によって行われる。
 なお、この処理が行われる前に、各ビン(n)に対応する生起率の平均H(n)と標準偏差σ(n)は求められているものとする。ここで、nは0乃至N-1である。
 最初に、ステップS1501において、各ビンにおける生起率を入力する。すなわち、平均H(n)および標準偏差σ(n)を入力する(n=0乃至N-1)。そして、ステップS1502に進む。
 ステップS1502において、n=0乃至N-1における生起率の平均H(n)のピーク位置を検出する。その位置を、npとする。そして、ステップS1503に進む。
 ステップS1503において、式208、式210、および、式211よりHambientを求める。あるいは、式213を解いてHambientを求める。そして、ステップS1504に進む。
Figure JPOXMLDOC01-appb-M000213
 ステップS1504において、式212の値を、出力端子17より出力する。そして、一連の処理を終了する。
 なお、ステップS1503について以下に補足しておく。
 先の説明では、式208、式210、および、式211によりHambientが求められることを説明した。しかし、この計算は複雑である。そこで、式213により、簡易的にHambientを求めてもよい。
 式213は、記号が異なる点を除けば、既出の式9と同じである。式9について説明したことから、式213のHambientは、環境光からの光(フォトン)の生起率と言える。
 すなわち、Hambientを求めるステップS1503では、式208、式210、および、式211によりHambientを求めてもよいし、式213を解いてHambientを求めてもよい。
 なお、生起率ではなくヒストグラムについて、同様の処理を行っても近似的に求めることができる。この場合、精度は落ちるが、生起率を計算する処理を省略することができるため、計算量の削減に寄与する。
 次に、測距結果についての確度を出力する形態の使用例を説明する。図137は、図1に示した距離測定装置10の後段にアプリケーションプロセッサ10aを接続した例を示している。アプリケーションプロセッサ10aは、出力端子17からの距離情報を得て、様々なアプリケーションを処理する。たとえば、物体検出やジェスチャ認識である(距離データを用いたこれらアプリケーションは既知であり、その詳細説明を省略する)。
 距離測定装置10には入力端子17aが具備されている。これにより、アプリケーションプロセッサ10aからの情報を入力することができる。アプリケーションプロセッサ10aからの情報は、入力端子17aを介して制御部11に送られる。制御部11では、この情報を元に様々な制御を行う。
 たとえば、アプリケーションプロセッサ10aが、確度の低い測距データは不要である場合を考える。アプリケーションプロセッサ10aは、所望の閾値を、入力端子17aを介して制御部11に送る。制御部11は、演算部16に、この閾値の情報を送る。そして、演算部16では、図138に示す処理が行われる。
 図138は、測距結果の信頼度(確度)を求めて、所望の確度以上の距離データのみを出力する処理手順の一例を示す流れ図である。この処理は、演算部16によって行われる。
 なお、この処理が行われる前に、各ビン(n)に対応する生起率の平均H(n)と標準偏差σ(n)は求められているものとする。ここで、nは0乃至N-1である。
 図138のステップS1601乃至S1603は、図136のステップS1501乃至S1503のそれぞれと同じであり、その説明を省略する。
 ステップS1603終了後、ステップS1604に進む。ステップS1604において、式212の値が、入力端子17aより指定された確度(所望の閾値)よりも大きい場合のみ、ピーク位置npに対応する距離(すなわち、c×np×D÷2)を出力端子17から出力する。小さい場合は、距離を出力しない。そして、一連の処理を終了する。
 このように、後段のアプリケーション10aが不要とする距離データを距離測定装置10は出力しないようにすることもできる。これにより、距離測定装置10とアプリケーションプロセッサ10aの間のデータ通信量を削減することも可能である。
 別の例として、アプリケーションプロセッサ10aが、測距データについて、確度はそれほど高くなくてもよい場合を考える。
 この場合、図136に示した処理が行われ、後段のアプリケーションプロセッサ10aには、対象物までの距離データと、その確度が伝えられる。アプリケーションプロセッサ10aでは、確度が所望の値より大きい場合には、その旨を、入力端子17aを介して制御部11に伝える。制御部11は、次回の測距では、発光部11での発光量を抑えるように制御する。これにより、次回の測距における発光量は少なくなり、生起率のピークの高さが低くなる。つまり、確度が低くなる。確度が低くなっても、アプリケーションプロセッサ10aでは、その確度で十分なので、問題なく処理できる。そして、発光量を少なくすることにより、消費電力を抑えることができる。すなわち、アプリケーションプロセッサ10aが必要とする確度で測距し、かつ、消費電力を抑えることが可能となる。
 このように、この第15の実施の形態を適用することにより、対象物までの距離に加えて、出力された距離情報の正しさの度合(確度)を出力することができる。
 [要点]
 第15の実施の形態は、以下の点を要点とする。
(1)発光部から発光されたアクティブ光が対象物において反射したアクティブ光成分および環境光が前記対象物において反射した環境光成分を含む反射光の受光頻度を示すヒストグラムを取得するヒストグラム取得部と、
 前記ヒストグラムに対して所定の統計処理を施すことにより前記アクティブ光成分の分布および前記環境光成分を検出する検出部と、
 前記アクティブ光成分の分布に基づいて前記対象物との距離を距離情報として測定し、かつ、前記環境光成分に対する前記アクティブ光成分の有意性の度合(信頼度)を計算する測定部と、
前記距離情報と、前記有意性の度合を出力する出力端子と
を具備する距離測定装置。
(2)発光部から発光されたアクティブ光が対象物において反射したアクティブ光成分および環境光が前記対象物において反射した環境光成分を含む反射光の受光頻度を示すヒストグラムを取得するヒストグラム取得部と、
 前記ヒストグラムに対して所定の統計処理を施すことにより前記アクティブ光成分の分布および前記環境光成分を検出する検出部と、
 前記アクティブ光成分の分布に基づいて前記対象物との距離を距離情報として測定し、かつ、前記環境光成分に対する前記アクティブ光成分の有意性の度合を計算する測定部と、
前記距離情報を出力する出力端子と
を具備し、
 前記有意性の度合が所望の値(第1の値とする)を超える場合のみ、前記出力端子から前記距離情報を出力すること
を特徴とする距離測定装置。
(3)発光部から発光されたアクティブ光が対象物において反射したアクティブ光成分および環境光が前記対象物において反射した環境光成分を含む反射光の受光頻度を示すヒストグラムを取得するヒストグラム取得部と、
 前記ヒストグラムに対して所定の統計処理を施すことにより前記アクティブ光成分の分布および前記環境光成分を検出する検出部と、
 前記アクティブ光成分の分布に基づいて前記対象物との距離を距離情報として測定し、かつ、前記環境光成分に対する前記アクティブ光成分の有意性の度合を計算する測定部と、
 前記距離情報を出力する出力端子と
を具備し、
 前記有意性の度合が所望の値(第2の値とする)を超える場合には、次回の測距において、前記発光部からの発光量を抑えること
を特徴とする距離測定装置。
 <17.適用例>
 本開示に係る技術(本技術)は、様々な製品へ応用することができる。例えば、本開示に係る技術は、自動車、電気自動車、ハイブリッド電気自動車、自動二輪車、自転車、パーソナルモビリティ、飛行機、ドローン、船舶、ロボット等のいずれかの種類の移動体に搭載される装置として実現されてもよい。
 図139は、本開示に係る技術が適用され得る移動体制御システムの一例である車両制御システムの概略的な構成例を示すブロック図である。
 車両制御システム12000は、通信ネットワーク12001を介して接続された複数の電子制御ユニットを備える。図139に示した例では、車両制御システム12000は、駆動系制御ユニット12010、ボディ系制御ユニット12020、車外情報検出ユニット12030、車内情報検出ユニット12040、及び統合制御ユニット12050を備える。また、統合制御ユニット12050の機能構成として、マイクロコンピュータ12051、音声画像出力部12052、及び車載ネットワークI/F(interface)12053が図示されている。
 駆動系制御ユニット12010は、各種プログラムにしたがって車両の駆動系に関連する装置の動作を制御する。例えば、駆動系制御ユニット12010は、内燃機関又は駆動用モータ等の車両の駆動力を発生させるための駆動力発生装置、駆動力を車輪に伝達するための駆動力伝達機構、車両の舵角を調節するステアリング機構、及び、車両の制動力を発生させる制動装置等の制御装置として機能する。
 ボディ系制御ユニット12020は、各種プログラムにしたがって車体に装備された各種装置の動作を制御する。例えば、ボディ系制御ユニット12020は、キーレスエントリシステム、スマートキーシステム、パワーウィンドウ装置、あるいは、ヘッドランプ、バックランプ、ブレーキランプ、ウィンカー又はフォグランプ等の各種ランプの制御装置として機能する。この場合、ボディ系制御ユニット12020には、鍵を代替する携帯機から発信される電波又は各種スイッチの信号が入力され得る。ボディ系制御ユニット12020は、これらの電波又は信号の入力を受け付け、車両のドアロック装置、パワーウィンドウ装置、ランプ等を制御する。
 車外情報検出ユニット12030は、車両制御システム12000を搭載した車両の外部の情報を検出する。例えば、車外情報検出ユニット12030には、撮像部12031が接続される。車外情報検出ユニット12030は、撮像部12031に車外の画像を撮像させるとともに、撮像された画像を受信する。車外情報検出ユニット12030は、受信した画像に基づいて、人、車、障害物、標識又は路面上の文字等の物体検出処理又は距離検出処理を行ってもよい。
 撮像部12031は、光を受光し、その光の受光量に応じた電気信号を出力する光センサである。撮像部12031は、電気信号を画像として出力することもできるし、測距の情報として出力することもできる。また、撮像部12031が受光する光は、可視光であっても良いし、赤外線等の非可視光であっても良い。
 車内情報検出ユニット12040は、車内の情報を検出する。車内情報検出ユニット12040には、例えば、運転者の状態を検出する運転者状態検出部12041が接続される。運転者状態検出部12041は、例えば運転者を撮像するカメラを含み、車内情報検出ユニット12040は、運転者状態検出部12041から入力される検出情報に基づいて、運転者の疲労度合い又は集中度合いを算出してもよいし、運転者が居眠りをしていないかを判別してもよい。
 マイクロコンピュータ12051は、車外情報検出ユニット12030又は車内情報検出ユニット12040で取得される車内外の情報に基づいて、駆動力発生装置、ステアリング機構又は制動装置の制御目標値を演算し、駆動系制御ユニット12010に対して制御指令を出力することができる。例えば、マイクロコンピュータ12051は、車両の衝突回避あるいは衝撃緩和、車間距離に基づく追従走行、車速維持走行、車両の衝突警告、又は車両のレーン逸脱警告等を含むADAS(Advanced Driver Assistance System)の機能実現を目的とした協調制御を行うことができる。
 また、マイクロコンピュータ12051は、車外情報検出ユニット12030又は車内情報検出ユニット12040で取得される車両の周囲の情報に基づいて駆動力発生装置、ステアリング機構又は制動装置等を制御することにより、運転者の操作に拠らずに自律的に走行する自動運転等を目的とした協調制御を行うことができる。
 また、マイクロコンピュータ12051は、車外情報検出ユニット12030で取得される車外の情報に基づいて、ボディ系制御ユニット12020に対して制御指令を出力することができる。例えば、マイクロコンピュータ12051は、車外情報検出ユニット12030で検知した先行車又は対向車の位置に応じてヘッドランプを制御し、ハイビームをロービームに切り替える等の防眩を図ることを目的とした協調制御を行うことができる。
 音声画像出力部12052は、車両の搭乗者又は車外に対して、視覚的又は聴覚的に情報を通知することが可能な出力装置へ音声及び画像のうちの少なくとも一方の出力信号を送信する。図139の例では、出力装置として、オーディオスピーカ12061、表示部12062及びインストルメントパネル12063が例示されている。表示部12062は、例えば、オンボードディスプレイ及びヘッドアップディスプレイの少なくとも一つを含んでいてもよい。
 図140は、撮像部12031の設置位置の例を示す図である。
 図140では、撮像部12031として、撮像部12101、12102、12103、12104、12105を有する。
 撮像部12101、12102、12103、12104、12105は、例えば、車両12100のフロントノーズ、サイドミラー、リアバンパ、バックドア及び車室内のフロントガラスの上部等の位置に設けられる。フロントノーズに備えられる撮像部12101及び車室内のフロントガラスの上部に備えられる撮像部12105は、主として車両12100の前方の画像を取得する。サイドミラーに備えられる撮像部12102、12103は、主として車両12100の側方の画像を取得する。リアバンパ又はバックドアに備えられる撮像部12104は、主として車両12100の後方の画像を取得する。車室内のフロントガラスの上部に備えられる撮像部12105は、主として先行車両又は、歩行者、障害物、信号機、交通標識又は車線等の検出に用いられる。
 なお、図140には、撮像部12101ないし12104の撮影範囲の一例が示されている。撮像範囲12111は、フロントノーズに設けられた撮像部12101の撮像範囲を示し、撮像範囲12112、12113は、それぞれサイドミラーに設けられた撮像部12102、12103の撮像範囲を示し、撮像範囲12114は、リアバンパ又はバックドアに設けられた撮像部12104の撮像範囲を示す。例えば、撮像部12101ないし12104で撮像された画像データが重ね合わせられることにより、車両12100を上方から見た俯瞰画像が得られる。
 撮像部12101ないし12104の少なくとも1つは、距離情報を取得する機能を有していてもよい。例えば、撮像部12101ないし12104の少なくとも1つは、複数の撮像素子からなるステレオカメラであってもよいし、位相差検出用の画素を有する撮像素子であってもよい。
 例えば、マイクロコンピュータ12051は、撮像部12101ないし12104から得られた距離情報を基に、撮像範囲12111ないし12114内における各立体物までの距離と、この距離の時間的変化(車両12100に対する相対速度)を求めることにより、特に車両12100の進行路上にある最も近い立体物で、車両12100と略同じ方向に所定の速度(例えば、0km/h以上)で走行する立体物を先行車として抽出することができる。さらに、マイクロコンピュータ12051は、先行車の手前に予め確保すべき車間距離を設定し、自動ブレーキ制御(追従停止制御も含む)や自動加速制御(追従発進制御も含む)等を行うことができる。このように運転者の操作に拠らずに自律的に走行する自動運転等を目的とした協調制御を行うことができる。
 例えば、マイクロコンピュータ12051は、撮像部12101ないし12104から得られた距離情報を元に、立体物に関する立体物データを、2輪車、普通車両、大型車両、歩行者、電柱等その他の立体物に分類して抽出し、障害物の自動回避に用いることができる。例えば、マイクロコンピュータ12051は、車両12100の周辺の障害物を、車両12100のドライバが視認可能な障害物と視認困難な障害物とに識別する。そして、マイクロコンピュータ12051は、各障害物との衝突の危険度を示す衝突リスクを判断し、衝突リスクが設定値以上で衝突可能性がある状況であるときには、オーディオスピーカ12061や表示部12062を介してドライバに警報を出力することや、駆動系制御ユニット12010を介して強制減速や回避操舵を行うことで、衝突回避のための運転支援を行うことができる。
 撮像部12101ないし12104の少なくとも1つは、赤外線を検出する赤外線カメラであってもよい。例えば、マイクロコンピュータ12051は、撮像部12101ないし12104の撮像画像中に歩行者が存在するか否かを判定することで歩行者を認識することができる。かかる歩行者の認識は、例えば赤外線カメラとしての撮像部12101ないし12104の撮像画像における特徴点を抽出する手順と、物体の輪郭を示す一連の特徴点にパターンマッチング処理を行って歩行者か否かを判別する手順によって行われる。マイクロコンピュータ12051が、撮像部12101ないし12104の撮像画像中に歩行者が存在すると判定し、歩行者を認識すると、音声画像出力部12052は、当該認識された歩行者に強調のための方形輪郭線を重畳表示するように、表示部12062を制御する。また、音声画像出力部12052は、歩行者を示すアイコン等を所望の位置に表示するように表示部12062を制御してもよい。 
 以上、本開示に係る技術が適用され得る車両制御システムの一例について説明した。本開示に係る技術は、以上説明した構成のうち、撮像部12031に適用され得る。具体的には、撮像部12031において撮像された画素データについて物体との距離を測定することにより、上述の自動運転や運転支援を実現することが可能になる。
 なお、上述の実施の形態は本技術を具現化するための一例を示したものであり、実施の形態における事項と、特許請求の範囲における発明特定事項とはそれぞれ対応関係を有する。同様に、特許請求の範囲における発明特定事項と、これと同一名称を付した本技術の実施の形態における事項とはそれぞれ対応関係を有する。ただし、本技術は実施の形態に限定されるものではなく、その要旨を逸脱しない範囲において実施の形態に種々の変形を施すことにより具現化することができる。
 また、上述の実施の形態において説明した処理手順は、これら一連の手順を有する方法として捉えてもよく、また、これら一連の手順をコンピュータに実行させるためのプログラム乃至そのプログラムを記憶する記録媒体として捉えてもよい。この記録媒体として、例えば、CD(Compact Disc)、MD(MiniDisc)、DVD(Digital Versatile Disc)、メモリカード、ブルーレイディスク(Blu-ray(登録商標)Disc)等を用いることができる。
 なお、本明細書に記載された効果はあくまで例示であって、限定されるものではなく、また、他の効果があってもよい。
 なお、本技術は以下のような構成もとることができる。
(1)発光部から発光されたアクティブ光が対象物において反射したアクティブ光成分および環境光が前記対象物において反射した環境光成分を含む反射光の受光頻度を示すヒストグラムを取得するヒストグラム取得部と、
 前記ヒストグラムに対して所定の統計処理を施すことにより前記アクティブ光成分の分布を検出する検出部と、
 前記アクティブ光成分の分布に基づいて前記対象物との距離を距離情報として測定する測定部と
を具備する距離測定装置。
(2)前記検出部は、前記所定の統計処理として、前記反射光の受光による生起率を確率変数としたときの確率密度関数を求める処理を行う
前記(1)に記載の距離測定装置。
(3)前記検出部は、前記所定の統計処理として、前記反射光の受光による生起率を時間の関数として表現したときの前記ヒストグラムとの関係を満たす前記関数のパラメータを決定する処理を行う
前記(1)に記載の距離測定装置。
(4)前記ヒストグラムに対してノイズ除去処理を施すヒストグラムノイズ除去処理部をさらに具備し、
 前記検出部は、前記ヒストグラムノイズ除去処理部によってノイズ除去処理が施された前記ヒストグラムに対して前記所定の統計処理を施す
前記(1)に記載の距離測定装置。
(5)前記ヒストグラムノイズ除去処理部は、複数の前記ヒストグラムについて適応的に重み付け加算処理を施す
前記(4)に記載の距離測定装置。
(6)前記ヒストグラムノイズ除去処理部は、複数の前記ヒストグラムから得られる生起率に重み付け加算処理を施す
前記(4)に記載の距離測定装置。
(7)前記ヒストグラムノイズ除去処理部は、前記ヒストグラムから得られる生起率のノイズ除去処理を行う
前記(4)に記載の距離測定装置。
(8)前記反射光の受光による生起率を時間の関数として表現したときの前記ヒストグラムとの関係を満たすように前記関数のパラメータを制約する第1の制約事項と、時空間における近傍同士の前記パラメータが特定の関係を満たすように制約する第2の制約事項とを満たす前記パラメータを算出し、その算出されたパラメータから前記対象物との距離または輝度を求める前記(1)に記載の距離測定装置。
(9)前記測定部によって測定された前記距離情報に対してノイズ除去処理を施す距離情報ノイズ除去処理部をさらに具備する
前記(1)に記載の距離測定装置。
(10)前記距離情報ノイズ除去処理部は、前記距離情報において時刻および位置が同じデータについて類似しているものほど重みを高くした重み付け加算処理を施す
前記(9)に記載の距離測定装置。
(11)前記距離情報ノイズ除去処理部は、ノイズ除去後の前記距離情報が前記距離情報と等しくなるように作用させる第1の作用素と、時空間上の近接する前記ノイズ除去後の前記距離情報同士の中で差が最小となる組が等しくなるように作用させる第2の作用素との合計が極値となるように、前記ノイズ除去後の前記距離情報を決定する
前記(9)に記載の距離測定装置。
(12)前記検出部は、複数の前記ヒストグラムのそれぞれについて、前記ヒストグラムの合計数から最も小さい頻度を減算した値によって前記ヒストグラムの各値を割ることにより生起率を求め、前記生起率のピークおよびピーク面積を求め、そのピーク面積の比から物体の領域の面積を求める
前記(1)に記載の距離測定装置。
(13)前記対象物を撮像した画像を入力する画像入力部と、
 前記画像を複数の分割領域に分割する画像分割部と、
 前記距離情報を前記複数の分割領域のそれぞれにアサインするアサイン部と
をさらに具備する前記(1)に記載の距離測定装置。
(14)前記検出部は、複数の前記ヒストグラムのそれぞれについて、前記ヒストグラムの合計数から最も小さい頻度を減算した値によって前記ヒストグラムの各値を割ることにより生起率を求め、前記生起率についてデコンボルーションを行って、そのデコンボルーションされた生起率から先鋭化されたヒストグラムを求める
前記(1)に記載の距離測定装置。
(15)前記検出部は、複数の前記ヒストグラムのそれぞれについて、前記ヒストグラムの合計数から最も小さい頻度を減算した値によって前記ヒストグラムの各値を割ることにより生起率を求め、前記生起率のピーク位置およびピークの半値幅を求め、前記半値幅が所定の閾値よりも大きい場合には前記対象物が斜めに配置され、または、動き状態にある旨を検出する
前記(1)に記載の距離測定装置。
(16)前記検出部は、前記反射光の受光から特定の時間を経過した後に再び受光を行う条件下においては、前記特定の時間を管理する状態遷移に基づいて前記確率密度関数を求める処理を行う
前記(2)に記載の距離測定装置。
(17)前記検出部は、前記アクティブ光成分の分布に基づいて前記ヒストグラムの時間分解能よりも細かい時間分解能により前記アクティブ光成分のピーク位置を検出して、そのピーク位置に基づいて前記対象物との距離を測定する
前記(1)に記載の距離測定装置。
(18)出力部をさらに具備し、
 前記測定部は、前記環境光成分に対する前記アクティブ光成分の有意性の度合を生成し、
 前記出力部は、前記距離情報および前記有意性の度合を出力する
前記(1)に記載の距離測定装置。
 10 距離測定装置
 11 制御部
 12 発光部
 13 SPADアレイ
 13a レンズ
 14 時間差検出部
 15 累積部
 16 演算部
 17 出力端子
 18 入力端子
 20 対象物
 30 太陽
 100 カメラ

Claims (18)

  1.  発光部から発光されたアクティブ光が対象物において反射したアクティブ光成分および環境光が前記対象物において反射した環境光成分を含む反射光の受光頻度を示すヒストグラムを取得するヒストグラム取得部と、
     前記ヒストグラムに対して所定の統計処理を施すことにより前記アクティブ光成分の分布を検出する検出部と、
     前記アクティブ光成分の分布に基づいて前記対象物との距離を距離情報として測定する測定部と
    を具備する距離測定装置。
  2.  前記検出部は、前記所定の統計処理として、前記反射光の受光による生起率を確率変数としたときの確率密度関数を求める処理を行う
    請求項1記載の距離測定装置。
  3.  前記検出部は、前記所定の統計処理として、前記反射光の受光による生起率を時間の関数として表現したときの前記ヒストグラムとの関係を満たす前記関数のパラメータを決定する処理を行う
    請求項1記載の距離測定装置。
  4.  前記ヒストグラムに対してノイズ除去処理を施すヒストグラムノイズ除去処理部をさらに具備し、
     前記検出部は、前記ヒストグラムノイズ除去処理部によってノイズ除去処理が施された前記ヒストグラムに対して前記所定の統計処理を施す
    請求項1記載の距離測定装置。
  5.  前記ヒストグラムノイズ除去処理部は、複数の前記ヒストグラムについて適応的に重み付け加算処理を施す
    請求項4記載の距離測定装置。
  6.  前記ヒストグラムノイズ除去処理部は、複数の前記ヒストグラムから得られる生起率に重み付け加算処理を施す
    請求項4記載の距離測定装置。
  7.  前記ヒストグラムノイズ除去処理部は、前記ヒストグラムから得られる生起率のノイズ除去処理を行う
    請求項4記載の距離測定装置。
  8.  前記反射光の受光による生起率を時間の関数として表現したときの前記ヒストグラムとの関係を満たすように前記関数のパラメータを制約する第1の制約事項と、時空間における近傍同士の前記パラメータが特定の関係を満たすように制約する第2の制約事項とを満たす前記パラメータを算出し、その算出されたパラメータから前記対象物との距離または輝度を求める請求項1記載の距離測定装置。
  9.  前記測定部によって測定された前記距離情報に対してノイズ除去処理を施す距離情報ノイズ除去処理部をさらに具備する
    請求項1記載の距離測定装置。
  10.  前記距離情報ノイズ除去処理部は、前記距離情報において時刻および位置が同じデータについて類似しているものほど重みを高くした重み付け加算処理を施す
    請求項9記載の距離測定装置。
  11.  前記距離情報ノイズ除去処理部は、ノイズ除去後の前記距離情報が前記距離情報と等しくなるように作用させる第1の作用素と、時空間上の近接する前記ノイズ除去後の前記距離情報同士の中で差が最小となる組が等しくなるように作用させる第2の作用素との合計が極値となるように、前記ノイズ除去後の前記距離情報を決定する
    請求項9記載の距離測定装置。
  12.  前記検出部は、複数の前記ヒストグラムのそれぞれについて、前記ヒストグラムの合計数から最も小さい頻度を減算した値によって前記ヒストグラムの各値を割ることにより生起率を求め、前記生起率のピークおよびピーク面積を求め、そのピーク面積の比から物体の領域の面積を求める
    請求項1記載の距離測定装置。
  13.  前記対象物を撮像した画像を入力する画像入力部と、
     前記画像を複数の分割領域に分割する画像分割部と、
     前記距離情報を前記複数の分割領域のそれぞれにアサインするアサイン部と
    をさらに具備する請求項1記載の距離測定装置。
  14.  前記検出部は、複数の前記ヒストグラムのそれぞれについて、前記ヒストグラムの合計数から最も小さい頻度を減算した値によって前記ヒストグラムの各値を割ることにより生起率を求め、前記生起率についてデコンボルーションを行って、そのデコンボルーションされた生起率から先鋭化されたヒストグラムを求める
    請求項1記載の距離測定装置。
  15.  前記検出部は、複数の前記ヒストグラムのそれぞれについて、前記ヒストグラムの合計数から最も小さい頻度を減算した値によって前記ヒストグラムの各値を割ることにより生起率を求め、前記生起率のピーク位置およびピークの半値幅を求め、前記半値幅が所定の閾値よりも大きい場合には前記対象物が斜めに配置され、または、動き状態にある旨を検出する
    請求項1記載の距離測定装置。
  16.  前記検出部は、前記反射光の受光から特定の時間を経過した後に再び受光を行う条件下においては、前記特定の時間を管理する状態遷移に基づいて前記確率密度関数を求める処理を行う
    請求項2記載の距離測定装置。
  17.  前記検出部は、前記アクティブ光成分の分布に基づいて前記ヒストグラムの時間分解能よりも細かい時間分解能により前記アクティブ光成分のピーク位置を検出して、そのピーク位置に基づいて前記対象物との距離を測定する
    請求項1記載の距離測定装置。
  18.  出力部をさらに具備し、
     前記測定部は、前記環境光成分に対する前記アクティブ光成分の有意性の度合を生成し、
     前記出力部は、前記距離情報および前記有意性の度合を出力する
    請求項1記載の距離測定装置。
PCT/JP2018/038711 2017-11-22 2018-10-17 距離測定装置 WO2019102751A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US16/763,903 US11747452B2 (en) 2017-11-22 2018-10-17 Distance measuring device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2017224451 2017-11-22
JP2017-224451 2017-11-22

Publications (1)

Publication Number Publication Date
WO2019102751A1 true WO2019102751A1 (ja) 2019-05-31

Family

ID=66630553

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2018/038711 WO2019102751A1 (ja) 2017-11-22 2018-10-17 距離測定装置

Country Status (2)

Country Link
US (1) US11747452B2 (ja)
WO (1) WO2019102751A1 (ja)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021096120A (ja) * 2019-12-16 2021-06-24 株式会社デンソー 測距装置、測距方法、および測距プログラム
WO2021160455A1 (de) * 2020-02-11 2021-08-19 Ibeo Automotive Systems GmbH Einrichtung zur erzeugung von rückstreuungs-histogrammdaten für die bestimmung einer diffusen rückstreuung bei einer optischen laufzeitmessung und verfahren
US20210389462A1 (en) * 2020-06-10 2021-12-16 Samsung Electronics Co., Ltd. System and method for histogram binning for depth detection
WO2022244322A1 (ja) * 2021-05-17 2022-11-24 ソニーセミコンダクタソリューションズ株式会社 光検出装置および光検出システム

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7111497B2 (ja) * 2018-04-17 2022-08-02 株式会社東芝 画像処理装置、画像処理方法、距離計測装置、及び距離計測システム
US11609328B2 (en) * 2018-05-23 2023-03-21 Massachusetts Institute Of Technology Methods and apparatus for improved imaging through scattering media
CN112424639B (zh) * 2018-06-22 2024-05-28 ams有限公司 使用飞行时间和伪随机比特序列测量到物体的距离

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002328168A (ja) * 2001-05-01 2002-11-15 Nikon Corp 測距装置および方法
JP2015108539A (ja) * 2013-12-04 2015-06-11 三菱電機株式会社 レーザレーダ装置
US20160033644A1 (en) * 2014-07-31 2016-02-04 Stmicroelectronics (Research & Development) Ltd. Time of flight determination
JP2016161438A (ja) * 2015-03-03 2016-09-05 株式会社デンソー 演算装置

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0520431A (ja) * 1991-07-17 1993-01-29 Matsushita Electric Ind Co Ltd 外観検査方法
JPH06230001A (ja) 1993-02-03 1994-08-19 Shimadzu Corp クロマトグラフ用データ処理装置
JP3304559B2 (ja) * 1993-10-25 2002-07-22 株式会社日立製作所 光計測方法および装置
JP2001013244A (ja) * 1999-06-30 2001-01-19 Minolta Co Ltd 測距装置
JP4504492B2 (ja) * 2000-02-04 2010-07-14 オリンパス株式会社 主要被写体検出機能を有するカメラ
EP1382979B1 (en) 2001-04-25 2008-03-05 Nikon Corporation Range finder, range finding method, and photoelectric transducing circuit
JP2007074163A (ja) * 2005-09-05 2007-03-22 Sony Corp 撮像装置および撮像方法
JP5206297B2 (ja) 2008-10-07 2013-06-12 トヨタ自動車株式会社 光学式測距装置及び方法
JP6060793B2 (ja) 2013-04-19 2017-01-18 株式会社島津製作所 ピーク検出装置
CN104010191B (zh) * 2014-06-11 2017-04-19 南京机电职业技术学院 一种视频噪声强度检测方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002328168A (ja) * 2001-05-01 2002-11-15 Nikon Corp 測距装置および方法
JP2015108539A (ja) * 2013-12-04 2015-06-11 三菱電機株式会社 レーザレーダ装置
US20160033644A1 (en) * 2014-07-31 2016-02-04 Stmicroelectronics (Research & Development) Ltd. Time of flight determination
JP2016161438A (ja) * 2015-03-03 2016-09-05 株式会社デンソー 演算装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
OH, M. K. ET AL.: "Reduction of range walk error in direct detection laser radar using a Geiger mode avalanche photodiode", OPTICS COMMUNICATIONS, vol. 283, no. 2, 5 October 2009 (2009-10-05), pages 304 - 308, XP026769980, Retrieved from the Internet <URL:https://doi.org/10.1016/j.optcom.2009.10.009> [retrieved on 20190104], DOI: doi:10.1016/j.optcom.2009.10.009 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021096120A (ja) * 2019-12-16 2021-06-24 株式会社デンソー 測距装置、測距方法、および測距プログラム
JP7310587B2 (ja) 2019-12-16 2023-07-19 株式会社デンソー 測距装置、測距方法、および測距プログラム
WO2021160455A1 (de) * 2020-02-11 2021-08-19 Ibeo Automotive Systems GmbH Einrichtung zur erzeugung von rückstreuungs-histogrammdaten für die bestimmung einer diffusen rückstreuung bei einer optischen laufzeitmessung und verfahren
US20210389462A1 (en) * 2020-06-10 2021-12-16 Samsung Electronics Co., Ltd. System and method for histogram binning for depth detection
WO2022244322A1 (ja) * 2021-05-17 2022-11-24 ソニーセミコンダクタソリューションズ株式会社 光検出装置および光検出システム

Also Published As

Publication number Publication date
US20210025980A1 (en) 2021-01-28
US11747452B2 (en) 2023-09-05

Similar Documents

Publication Publication Date Title
WO2019102751A1 (ja) 距離測定装置
JP6682833B2 (ja) 物体認識アルゴリズムの機械学習のためのデータベース構築システム
US8917904B2 (en) Vehicle clear path detection
CN106919908B (zh) 障碍物识别方法及装置、计算机设备及可读介质
Jebamikyous et al. Autonomous vehicles perception (avp) using deep learning: Modeling, assessment, and challenges
JP2019028861A (ja) 信号処理装置、および信号処理方法、プログラム、並びに移動体
CN106934347B (zh) 障碍物识别方法及装置、计算机设备及可读介质
Roy et al. Multi-modality sensing and data fusion for multi-vehicle detection
CN112487905B (zh) 一种车辆周边行人危险等级预测方法及系统
CN112330746A (zh) 一种基于tx2的移动底盘障碍物检测方法
WO2018074085A1 (ja) 測距装置、および、測距装置の制御方法
EP3555854B1 (en) A method of tracking objects in a scene
JP6572696B2 (ja) 画像処理装置、物体認識装置、機器制御システム、画像処理方法およびプログラム
US20220171975A1 (en) Method for Determining a Semantic Free Space
CN113792598A (zh) 基于车载摄像头的汽车碰撞预测系统和方法
US11941889B2 (en) Advanced driver assist system and method of detecting object in the same
JP6972798B2 (ja) 情報処理装置、撮像装置、機器制御システム、移動体、情報処理方法、及びプログラム
US20240193957A1 (en) Advanced driver assist system and method of detecting object in the same
CN111795641B (zh) 用于定位车辆中的传感器的方法和装置
US20230267749A1 (en) System and method of segmenting free space based on electromagnetic waves
CN115690719A (zh) 用于车辆周围的对象接近监测的系统和方法
EP4075329A1 (en) Emergency situation detection and avoidance
Bhupathi Lane Detection of Autonomous Vehicles Using Clustering and Augmented Sliding Windows Techniques
WO2024074246A1 (en) System and method for evaluation of the driving of a vehicle
Shin Object Detection and Classification in 3D Point Cloud Data for Automated Driving

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18880389

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18880389

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP