WO2011033971A1 - 測距装置、測距方法、及びプログラム - Google Patents

測距装置、測距方法、及びプログラム Download PDF

Info

Publication number
WO2011033971A1
WO2011033971A1 PCT/JP2010/065368 JP2010065368W WO2011033971A1 WO 2011033971 A1 WO2011033971 A1 WO 2011033971A1 JP 2010065368 W JP2010065368 W JP 2010065368W WO 2011033971 A1 WO2011033971 A1 WO 2011033971A1
Authority
WO
WIPO (PCT)
Prior art keywords
distance
imaging
subject
unit
imaging condition
Prior art date
Application number
PCT/JP2010/065368
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 US13/496,137 priority Critical patent/US8768010B2/en
Priority to DE112010003649.7T priority patent/DE112010003649B4/de
Publication of WO2011033971A1 publication Critical patent/WO2011033971A1/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/491Details of non-pulse systems
    • G01S7/4912Receivers
    • G01S7/4915Time delay measurement, e.g. operational details for pixel components; Phase measurement
    • 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/88Lidar systems specially adapted for specific applications
    • G01S17/89Lidar systems specially adapted for specific applications for mapping or imaging
    • G01S17/8943D imaging with simultaneous measurement of time-of-flight at a 2D array of receiver pixels, e.g. time-of-flight cameras or flash lidar
    • GPHYSICS
    • G02OPTICS
    • G02BOPTICAL ELEMENTS, SYSTEMS OR APPARATUS
    • G02B7/00Mountings, adjusting means, or light-tight connections, for optical elements
    • G02B7/28Systems for automatic generation of focusing signals
    • G02B7/30Systems for automatic generation of focusing signals using parallactic triangle with a base line
    • G02B7/32Systems for automatic generation of focusing signals using parallactic triangle with a base line using active means, e.g. light emitter
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/56Cameras or camera modules comprising electronic image sensors; Control thereof provided with illuminating means

Definitions

  • the present invention relates to a distance measuring device, a distance measuring method, and a program, and more particularly, to a distance measuring device, a distance measuring method, and a program for measuring a subject using an image sensor.
  • an image sensor As described in JP-A-2001-281336 and JP-A-8-313215, it is known to use an image sensor as a distance measuring sensor using a time-of-flight (TOF) method.
  • the TOF method measures the distance of a subject by irradiating the subject with light and measuring the time from when the light is emitted until the return light from the subject returns.
  • an object of the present invention is to provide a distance measuring device, a distance measuring method, and a program capable of improving the accuracy of distance measurement of a subject. .
  • the present invention provides a distance measuring device, a light source that emits light, an imaging unit that captures reflected light that is emitted from the light source and reflected from a subject, and the imaging unit A distance information conversion unit that converts pixel values of pixels obtained by imaging into distance information indicating a distance to the subject, an imaging condition setting unit that sets a first imaging condition based on the distance information, and An imaging control unit that controls the light source and the imaging unit to image the subject under the first imaging condition.
  • the imaging condition setting unit may set the first imaging condition such that a pixel value of a pixel that receives reflected light of a subject closest to the distance becomes a first threshold value.
  • a distance measurement accuracy analysis unit that analyzes the distance measurement accuracy under the first imaging condition and identifies an accuracy-decreasing distance in which the distance measurement accuracy is smaller than a predetermined value is further provided, and the imaging condition setting unit includes the accuracy When there is a subject that is farther than the lowering distance, a second imaging condition that can obtain brightness information brighter than the first imaging condition is set, and the imaging control unit controls the light source and the imaging unit. Then, the subject may be imaged under the first imaging condition and the second imaging condition.
  • a distance information combining unit that combines the distance information captured and converted under the first imaging condition and the distance information captured and converted under the second imaging condition may be further provided.
  • the imaging condition setting unit is configured to set the second imaging condition such that a pixel value of a pixel that receives reflected light of a subject that is the closest among the subjects that are more than the accuracy-decreasing distance becomes a second threshold value. May be set.
  • a distance change calculation unit that calculates a degree of a distance change of the subject; and a threshold change unit that changes at least one of the first threshold and the second threshold according to the degree of the distance change.
  • the unit has a plurality of pixels arranged two-dimensionally, and the distance information conversion unit converts each of the plurality of pixel values obtained by imaging by the imaging unit into distance information and The image distance data of the sheet may be obtained, and the distance change calculation unit may calculate the degree of the distance change of the subject by comparing the plurality of image distance data.
  • the difference between the second threshold and the pixel saturation value may be larger than the difference between the first threshold and the pixel saturation value.
  • the subject may be a subject selected by a user or a subject imaged in a predetermined area of the imaging unit.
  • the present invention includes a light emitting step of emitting light from a light source, an imaging step of imaging an reflected portion of light reflected by a subject emitted from the light source, and a distance information converting unit.
  • the distance information conversion step of converting the pixel value of the pixel obtained by imaging into distance information indicating the distance to the subject, and the imaging condition setting unit sets the first imaging condition based on the distance information.
  • An imaging condition setting step to be set, and an imaging control unit includes an imaging control step of controlling the light source and the imaging unit to image the subject under the first imaging condition.
  • the present invention is a program, a distance measuring device including a light source that emits light and an imaging unit that captures reflected light that is emitted from the light source and reflected from a subject.
  • a distance information conversion unit that converts a pixel value of a pixel obtained by imaging the imaging unit into distance information indicating a distance to a subject, and imaging that sets a first imaging condition based on the distance information
  • a condition setting unit, the light source, and the imaging unit are controlled to function as an imaging control unit that images the subject under the first imaging condition.
  • ranging accuracy can be improved, and the distance to the subject can be accurately measured.
  • the light emitting device 12 includes a light source 30 that emits light and a drive unit 32 that emits the light source 30.
  • the drive unit 32 causes the light source 30 to emit light according to the imaging conditions sent from the control unit 18. Thereby, the light emission intensity, light emission time, light emission timing, etc. of the light source 30 are controlled.
  • the light emitting device 12 irradiates the subject with light emitted from the light source 30.
  • the light emitting device 12 may irradiate intensity-modulated light.
  • the imaging unit 14 includes a lens 40, a diaphragm 42, a diaphragm driving circuit (not shown) that drives the diaphragm 42, an imaging element 44, and a unit circuit 46.
  • the diaphragm 42 controls the amount of light incident on the image sensor 44.
  • the diaphragm drive circuit drives the diaphragm 42 according to the imaging conditions set by the control unit.
  • the amount of light incident on the image sensor 44 varies depending on the degree of aperture (aperture value) by the aperture 42, the exposure time, and the light emission amount of the light emitting device 12.
  • the imaging element 44 images a subject through the lens 40 and the aperture 42.
  • the image pickup device 44 is controlled so as to pick up an image of a subject and obtain image data at a constant cycle (a constant frame rate), for example, at 30 fps.
  • a constant cycle a constant frame rate
  • the subject need not be imaged at regular intervals.
  • the time intervals of images obtained by imaging may be different.
  • the interval may not be constant.
  • Imaging means photoelectric conversion of received light to accumulate charges, and photoelectric conversion and charge accumulation are performed by each pixel of the image sensor 44.
  • Image data is a set of charge amounts (pixel values received by each pixel) accumulated by each pixel.
  • the image sensor 44 has a function as an electronic shutter, and the exposure time of the image sensor 44 can be adjusted by the electronic shutter.
  • the image sensor 44 may output the electric charge accumulated at a constant cycle interval, for example, 30 fps to the unit circuit 46.
  • the image sensor 44 may be a CCD or a CMOS.
  • the unit circuit 46 includes an A / D converter that converts image data of an analog signal output from the image sensor 44 into a digital signal (A / D conversion).
  • the A / D converter performs digital conversion for each pixel.
  • the A / D converter may be capable of changing the gain (conversion gain).
  • the imaging unit 14 outputs the charge amount of each pixel to the image distance data conversion unit 16.
  • Image distance data conversion unit (distance information conversion unit) 16 converts captured image data into image distance data by the TOF method. Since the TOF method is a well-known technique, it will not be described in detail. However, in order to obtain image distance data by the TOF method, the imaging unit 14 images the subject a plurality of times at different imaging timings, and the image distance data conversion unit 16 obtains the image distance data. One piece of distance image data is obtained from the obtained plurality of image data.
  • the image distance data conversion unit 16 outputs the image distance data to the control unit 18, the image distance data synthesis unit 20, and the image distance data output unit (distance information output unit) 22.
  • One image distance data is obtained by converting the image data obtained in one frame period.
  • the image distance data conversion unit 16 may be configured by a processor such as a DSP.
  • the imaging unit 14 performs imaging a plurality of times during this one frame period, and the image distance data conversion unit 16 obtains one image distance data from the plurality of image data obtained by the imaging.
  • the control unit 18 includes an imaging condition setting unit 50, an imaging control unit 52, and a ranging accuracy analysis unit 54.
  • the control unit 18 may be configured by a processor such as a CPU.
  • the imaging condition setting unit 50 analyzes each pixel distance data of the image distance data and creates a histogram of the subject. The histogram represents the distance of the subject and the number of pixels. Then, the imaging condition setting unit 50 sets an optimal imaging condition according to the distance to the subject based on the created histogram.
  • the imaging conditions include the amount of light emitted from the light emitting device 12 to the subject, that is, the amount of light emitted from the light source 30, the exposure time in one frame period of the image sensor 44, the aperture value of the aperture 42, and the gain value. Since the imaging unit 14 performs imaging a plurality of times in one frame period, the exposure time of each imaging in one frame period is also set as an imaging condition.
  • the imaging control unit 52 controls the light emitting device 12 so as to emit light under the set imaging conditions.
  • the imaging control unit 52 controls the imaging unit 14 so that the subject is imaged under the set imaging conditions.
  • the aperture 42 is controlled according to the set aperture value, and the image sensor 44 is exposed for the set exposure time.
  • the gain adjustment is performed with the gain value set by the unit circuit 46.
  • the imaging unit 14 can perform imaging according to the distance of the subject. For example, short-distance imaging and long-distance imaging can be performed.
  • the ranging accuracy analysis unit 54 analyzes the imaging conditions set by the imaging condition setting unit 50 and specifies a distance (distance position) at which the ranging accuracy is lower than a predetermined value.
  • the distance measurement accuracy analysis unit 54 determines whether to synthesize image distance data based on the analyzed distance measurement accuracy. When combining the image distance data, if the subject exists at a position far from the position where the distance measurement accuracy is lower than a predetermined value, it is determined to combine the image distance data.
  • An image distance data synthesis unit (distance information synthesis unit) 20 synthesizes a plurality of image distance data captured by the imaging unit 14 under different imaging conditions and converted by the image distance data conversion unit 16 according to subjects at different distances. To do. That is, composite image distance data is created from a plurality of image distance data.
  • the image distance data synthesis unit 20 may be configured by a processor such as a DSP.
  • the subject does not indicate each object such as a person, a building, a bridge, or a cat, but what is captured by the imaging unit 14 is referred to as a subject. Therefore, the subject 111 may include a plurality of objects such as people and buildings.
  • FIG. 2B shows the characteristics of the amount of charge accumulated in the pixels of the image sensor depending on the imaging conditions.
  • the characteristic 112 is a characteristic in which the charge amount (pixel value) of the pixel becomes a threshold when the subject in Z1 is imaged.
  • the higher the pixel value the larger the gradient of the absolute value of the characteristic 112. Therefore, when the pixel value is A / D converted, the higher the pixel value, the higher the pixel value resolution can be maintained.
  • the lower the pixel value of the characteristic 112 the smaller the slope of the absolute value of the characteristic 112. Therefore, the resolution of the pixel value is reduced by A / D conversion, and high-precision distance measurement is performed. I can't.
  • the pixel value of the pixel that receives the reflected light from the subject 111 is not in a high resolution range, and the accuracy of distance measurement cannot be improved. That is, since the subject 111 that is actually imaged is distributed between Z2 and Z3, the pixel value range 122 of the pixel that receives the reflected light of the subject 111 is a low resolution range.
  • the characteristic 114 is a characteristic in which the pixel value becomes a threshold value when the subject in Z4 is imaged. Since the subject 111 is between Z2 and Z3, the distance of which is shorter than Z4, the pixel that receives the reflected light of the subject 111 is saturated and the accumulated charge amount overflows (overflows). An effective pixel value cannot be obtained.
  • the imaging condition is changed to the imaging condition indicating the characteristic 113 in which the pixel value of the pixel that has received the reflected light from the subject at the closest position Z2 among the subjects 111 is a threshold value.
  • the range 121 of the charge amount accumulated in the pixels by receiving the reflected light from the subject 111 is a range in which the resolution of the pixel values is high, and the ranging accuracy can be increased.
  • the pixel that receives the reflected light from the closest subject is specified. For example, the pixel having the largest pixel value may be specified as the pixel that receives the reflected light from the closest subject.
  • the characteristic 112 When the characteristic 112 is changed to the characteristic 113, it can be adjusted by increasing the amount of light emitted from the light emitting device 12, increasing the exposure time, or decreasing the aperture value.
  • the characteristic 114 When the characteristic 114 is changed to the characteristic 113, it can be adjusted by reducing the amount of light emitted from the light emitting device 12, shortening the exposure time, and increasing the aperture value.
  • changing from the characteristic 112 to the characteristic 113 or changing the characteristic 114 to the characteristic 113 is not necessarily an imaging condition for the next imaging, and the characteristics 112 to the characteristic 113 or the characteristic 114 are performed after a plurality of continuous imaging. To the characteristic 113 may be adjusted so as to be gradually adjusted at a constant rate.
  • the pixel value of the pixel that has received the reflected light from the subject at the closest position Z2 may be changed to an imaging condition that indicates a characteristic that is just saturated.
  • the distance to the subject 111 is measured by pre-ranging, the distance to the subject that has been measured may not be accurate. Further, since it is assumed that the subject moves as time elapses, there is a possibility that the subject is actually closer to the pre-ranged Z2. In such a case, the charge of the pixel that has received the subject 111 overflows. Therefore, it is preferable to use a threshold value.
  • the threshold value is a value obtained by subtracting a certain value or a certain ratio from a value at which the pixel is saturated.
  • the pixel value depends not only on the distance but also on the reflectance of the subject, when the subject 111 has a reflectance distribution, the pixel indicating the nearest distance Z2 and the pixel having the maximum pixel value are displayed. It does not necessarily match. In that case, the characteristic 113 is adjusted so that the pixel having the maximum pixel value becomes the threshold value. Therefore, it should be noted here that the closest distance is an expression for easily explaining that the obtained pixel value is the maximum.
  • the amount of charge accumulated in the pixel by receiving the reflected light of the subject 132 has a high resolution of the pixel value, and the accuracy of distance measurement can be improved.
  • a plurality of subjects are mixed in a long distance range such as a short distance or a long distance
  • images are captured under two or more different imaging conditions. It is necessary to selectively combine pixel values to generate a wide dynamic range image distance.
  • the subject 131 existing in Z5 to Z6 can be measured with high accuracy, but the subject 132 existing in Z7 to Z8 cannot be measured with high accuracy. That is, the ranging accuracy of the subject 132 existing in Z7 to Z8 is lowered.
  • the subject 132 existing in Z7 to Z8 can measure the distance with high accuracy, but the pixel receiving the reflected light of the subject 131 existing in Z5 to Z6 overflows, and the subject 131 cannot be measured. Therefore, each of the subject 131 and the subject 132 is imaged under an imaging condition suitable for each.
  • FIG. 4B shows an optimal imaging condition for measuring the subject 151.
  • imaging is performed under the imaging condition of the characteristic 161 in which the pixel value of the pixel that receives the reflected light from the subject of the closest Z9 among the subjects 151 is a threshold value.
  • Z10 is a distance at which the resolution of the pixel value due to the characteristic 161 is lowered. That is, Z10 is a distance at which the ranging accuracy becomes lower than a predetermined value.
  • the image area of the subject Z9 to Z10 is specified from the image distance data obtained under the imaging condition of the characteristic 161, and the image area of the subject Z10 to Z11 is obtained under the imaging condition of the characteristic 162. It is specified from the obtained image distance data. Then, by combining the image distance data of the specified image area, it is possible to generate image distance data with a wide dynamic range.
  • the distance measurement accuracy refers to fluctuations between a plurality of frames when an image is captured under the same imaging condition.
  • a dispersion value of pixel values is obtained from a plurality of frames, a standard deviation is used as a fluctuation, and converted into a distance to obtain a measurement error in distance conversion.
  • this method may be used for calculation of distance measurement accuracy, since it is necessary to hold a plurality of frames, in this embodiment, a method of logically calculating and predicting distance measurement accuracy is used.
  • the principle of measuring distance by the TOF method will be described.
  • the method and calculation formula used for explanation are for simply explaining the distance measurement principle, and are only one form of the TOF method.
  • z is a distance from the light source to the subject
  • k is a coefficient determined by imaging conditions, the reflectance of the subject, the transmittance of the lens 40, the photoelectric conversion rate of the imaging element 44, and the like.
  • a pixel value having a high S / N ratio can be obtained by repeating the light emission and exposure patterns as shown in FIG. 5 during one frame period and integrating the charge amount obtained by photoelectric conversion. Therefore, the substantial exposure time is adjusted according to the number of repetitions of light emission and exposure.
  • the imaging element 44 may use a configuration capable of holding a plurality of charge amounts. Specifically, the pattern of light emission and the exposure shown in FIG. 5, at the same time retain the accumulated charge Q 1, Q 2 by the image pickup device 44, and may read the accumulated charges Q 1, Q 2. For convenience, the influence of environmental light such as the sun and indoor lighting is ignored, but it is clear that the influence of environmental light can be removed by using the imaging result when there is no light emitted from the light source. Needless to say, it is possible to carry out distance measurement without the influence of ambient light.
  • the fluctuations of the charge amounts Q 1 and Q 2 and the exposure time Ts may be converted into errors of the distance z, and the sum of the converted values may be calculated.
  • this method will be described. First, fluctuation of the charge amount Q 1 (standard deviation) and Delta] Q 1, obtains a measurement error Delta] z 1 generated by Delta] Q 1.
  • FIG. 6 is a diagram for explaining the conversion of the accumulated charge fluctuation into a distance measurement error.
  • the characteristic 191 shown in FIG. 6 represents the characteristic represented by the expression (2)
  • the expression (7) represents the slope of the characteristic 191.
  • (1/2) ⁇ k ⁇ 1 ⁇ z 3 ⁇
  • ⁇ Q 1 is the amount of fluctuation of the accumulated charge amount Q 1 output from the image sensor 44, and is, for example, the total amount of fluctuation caused by light shot noise, circuit-induced noise, quantization noise, and the like.
  • This ⁇ z indicates ranging accuracy. That is, the distance z is obtained by the equation (6), and ⁇ z corresponding to the distance z is also obtained. As ⁇ z increases, the distance measurement accuracy decreases, so the distance corresponding to ⁇ z greater than the predetermined value may be, for example, the distance Z10 in FIG.
  • ⁇ z may be represented by either ⁇ z 1 or ⁇ z 2 in order to reduce the calculation cost. That is, even if the absolute value of the slope of one of the charge amounts Q 1 and Q 2 is the absolute value of the distance measurement accuracy, it can be said that the distance measurement accuracy is simply shown.
  • a distance position where the absolute value is smaller than a certain value may be a distance position where the distance measurement accuracy is smaller than a predetermined value. Further, the position of the distance of the subject where the pixel value of the pixel receiving the reflected light of the subject is smaller than a certain value may be set as the position of the distance where the distance measurement accuracy is smaller than a predetermined value.
  • the imaging control unit 52 causes the imaging unit 14 to image the subject under predetermined imaging conditions (step S2).
  • the imaging control unit 52 may cause the imaging unit 14 to image the subject under an arbitrary imaging condition.
  • the captured image data is converted by the image distance data conversion unit 16 and output to the imaging condition setting unit 50.
  • the imaging condition setting unit 50 creates and analyzes a histogram of the subject based on the image distance data (step S4). That is, the created histogram is analyzed to identify the closest subject. That is, the distance indicated by the shortest (closest) pixel distance data among the plurality of pixel distance data is specified.
  • Z2 is the closest position
  • Z5 is the closest position
  • Z9 is the closest position.
  • the imaging condition setting unit 50 may specify the nearest pixel distance data from a predetermined area that is a part of the entire area, not from the entire area of the image distance area data.
  • the predetermined area may be an area selected by the user, or may be a predetermined area (for example, a central area of the image). This is because the user usually captures an image so that the subject whose distance is to be measured is in a predetermined area of the image.
  • the imaging condition setting unit 50 sets the first imaging condition based on the specified distance (step S6).
  • the imaging condition setting unit 50 sets the first imaging condition so that the pixel value of the pixel that receives the reflected light of the subject from the specified distance becomes a threshold value. That is, the first imaging condition is set so that the pixel value of the pixel representing the shortest distance in the pixel distance data becomes the threshold value.
  • the imaging condition setting unit 50 outputs the set first imaging condition to the distance measurement accuracy analysis unit 54.
  • the distance measurement accuracy analysis unit 54 analyzes the histogram generated in step S4 and the first imaging condition, and estimates a distance (distance position) where the distance measurement accuracy is smaller than a predetermined value (step S8). . If the imaging conditions are known, the characteristics of the charge amount (Q 1 , Q 2 ) accumulated in the pixel and the charge amount accumulated in the pixel by irradiation of the light emitting device 12 can be predicted. The accuracy can be estimated. Therefore, it is possible to estimate a distance whose distance measurement accuracy is smaller than a predetermined value.
  • the distance measurement accuracy analysis unit 54 determines whether or not to perform synthesis processing (step S10).
  • the distance measurement accuracy analysis unit 54 determines whether or not the subject exists at a position that is more than the distance estimated in step S8, and determines that the composition processing is performed if it exists. This determination is made based on whether or not there is pixel distance data at a distance that is longer than the distance estimated in step S8.
  • the distance measurement accuracy analysis unit 54 outputs a determination result on whether to perform the synthesis process to the imaging condition setting unit 50.
  • the estimated distance when the estimated distance is not less than Z6 and not more than Z7, it is determined that the composition process is performed because the subject 132 exists at the estimated distance and a position farther than the estimated distance.
  • the estimated distance when the estimated distance is Z10, it is determined that a part of the subject 151 is at the estimated distance and a position farther than the estimated distance, so that the synthesis process is performed.
  • a predetermined area it is determined whether or not there is a subject farther than the specified position in the predetermined area. That is, it may be determined whether there is pixel distance data farther than the specified position among the pixel distance data in the predetermined area.
  • the imaging condition setting unit 50 determines whether or not the frame rate that can be imaged under the first imaging condition set in step S6 is equal to or higher than a predetermined frame rate. (Step S12).
  • the predetermined frame rate may be determined in advance or may be arbitrarily determined by the user.
  • the imaging condition setting unit 50 shortens the exposure time by changing the setting of the first imaging condition set in step S6 (step S14). Proceed to step S16. At this time, since the exposure amount decreases as the exposure time becomes shorter, the imaging condition setting unit 50 may decrease the aperture degree, increase the gain value, or increase the light emission intensity to compensate for this. In this case, the imaging condition setting unit 50 outputs the first imaging condition after the setting change in step S14 to the imaging control unit 52.
  • step S12 determines whether the frame rate is equal to or higher than the predetermined frame rate. If it is determined in step S12 that the frame rate is equal to or higher than the predetermined frame rate, the process proceeds to step S16. In this case, the imaging condition setting unit 50 outputs the first imaging condition set in step S6 to the imaging control unit 52.
  • step S16 the imaging control unit 52 causes the imaging unit 14 to image the subject under the first imaging condition set most recently.
  • Image data captured under the first imaging condition is converted into image distance data by the image distance data conversion unit 16 and output from the image distance data output unit 22. Thereby, it is possible to capture image data that can maintain high ranging accuracy.
  • the process returns to step S4 and the above-described operation is repeated.
  • the operation in step S4 after step S16 may be analyzed by generating a histogram based on the image data captured in step S16.
  • the imaging condition setting unit 50 sets a second imaging condition that can obtain an image brighter than the first imaging condition (step S18). Specifically, the position of the closest subject among the subjects existing at a position more than the distance estimated in step S8 is specified, and the second imaging condition is determined based on the position of the specified distance. Set. That is, the second imaging condition is set so that the pixel value of the pixel that receives the reflected light of the subject from the specified position becomes the threshold value. More specifically, the second imaging condition is set so that the pixel value of the pixel with the closest pixel distance data among the plurality of pixel distance data that is more than the estimated distance becomes a threshold value. Note that a bright image can be obtained when the same subject is imaged from the same distance under the same environment. Specifically, this means that the gain value is high, the exposure time is long, the degree of aperture is small, or the light emission intensity of the light source is strong.
  • the position of the subject specified in this step S18 is specified, and the reflection of the subject 132 from the specified position is specified.
  • the second imaging condition is set so that the pixel value of the pixel that has received the light becomes a threshold value.
  • the distance Z10 is specified, and the pixel value of the pixel that receives the reflected light of the subject 151 from the specified Z10 is the threshold value. 2 imaging conditions are set.
  • the imaging condition setting unit 50 adds the frame rate that can be imaged under the first imaging condition set in step S6 and the frame rate that can be imaged under the second imaging condition set in step S18. It is determined whether the rate is equal to or greater than a predetermined frame rate (step S20).
  • the predetermined frame rate in step S20 may be different from the predetermined frame rate in step S12.
  • step S20 If it is determined in step S20 that the frame rate is not equal to or higher than the predetermined frame rate, the first imaging condition set in step S6 and the second imaging condition set in step S18 are changed to change the first setting.
  • the total exposure time for the imaging condition and the second imaging condition is shortened (step S22), and the process proceeds to step S24.
  • the imaging condition setting unit 50 may decrease the aperture degree, increase the gain value, or increase the light emission intensity to compensate for this.
  • the imaging condition setting unit 50 outputs the first imaging condition and the second imaging condition after the setting change in step S22 to the imaging control unit 52.
  • step S20 if it is determined in step S20 that the combined frame rate is equal to or higher than the predetermined frame rate, the process directly proceeds to step S24.
  • the imaging condition setting unit 50 outputs the first imaging condition set in step S6 and the second imaging condition set in step S18 to the imaging control unit 52.
  • step S24 the imaging control unit 52 causes the imaging unit 14 to image the subject under the first imaging condition and the second imaging condition set most recently.
  • the image distance data combining unit 20 captures image distance data captured under the first imaging condition and converted into image distance data, and image distance data captured under the second imaging condition and converted into image distance data. Synthesis (step S26).
  • the image distance data composition unit 20 uses the image distance data obtained under the first imaging condition as the image distance data of the subject shorter than the distance estimated in step S8.
  • Composite image distance data is generated using the image distance data obtained under the second imaging condition.
  • the generated composite image distance data is output from the image distance data output unit 22.
  • step S8 image distance data simply obtained under the first imaging condition and image distance data obtained under the second imaging condition If combined, discontinuity of the subject will occur in the combined image distance data. That is, the subject distance data is discontinuous. Therefore, the subject distance data of the image distance data obtained under the first imaging condition and the subject distance data of the image distance data obtained under the second imaging condition may be weighted and combined. As a result, smooth subject distance data can be obtained.
  • the threshold value is fixed, but the threshold value may be changed according to the degree of change in the distance of the subject. For example, when the degree of change in the distance of the subject is high, that is, comparing the image distance data obtained before and the image distance data obtained later, the greater the degree of change in distance, The threshold value may be separated from the pixel saturation value. In other words, the greater the degree of change in the distance of the subject, the more likely that the obtained image distance data is not accurate. In such a case, if the threshold is brought close to the pixel saturation value, overflow occurs as described above. Because it ends up.
  • control unit 18 further includes a distance change calculation unit and a threshold value change unit, and the distance change calculation unit calculates the degree of distance change of the subject.
  • the distance change calculation unit can calculate the degree of distance change by comparing the image distance data.
  • the threshold value changing unit may change the threshold value according to the calculated degree of distance change.
  • the imaging condition setting unit sets at least one of the first imaging condition and the second imaging condition using the threshold changed by the threshold changing unit.
  • the threshold value used for setting the first imaging condition (referred to as the first threshold value) and the threshold value used for setting the second imaging condition (referred to as the second threshold value) are the same.
  • different threshold values may be used. The farther the subject is, the lower the ranging accuracy tends to be. Therefore, the difference between the second threshold and the pixel saturation value may be larger than the difference between the first threshold and the pixel saturation value.
  • the threshold value changing unit may change at least one of the first threshold value and the second threshold value according to the degree of the distance change.
  • the threshold value changing unit may change the difference between the second threshold value and the pixel saturation value so as to be larger than the difference between the first threshold value and the pixel saturation value.
  • the threshold value is changed according to the degree of change in distance.
  • the distribution of the reflectance of the subject A threshold value change according to the degree may be added.
  • the distribution of pixel values obtained is also large. Therefore, it is easier to cope with changes in the subject if the threshold value has a margin for pixel saturation.
  • the reflectance distribution can be derived from the equation (2), or an imaging result obtained when there is no light emitted from the light source may be used.
  • the imaging condition is set using one piece of distance image data (including the composite image distance data) obtained immediately before, but a plurality of the same imaging conditions are used.
  • the imaging conditions may be set using a plurality of image distance data obtained by continuously capturing images. This is because it is possible to improve the distance measurement accuracy by setting the imaging condition by determining the distance of the subject from the plurality of image distance data, rather than setting the imaging condition with one image distance data. This method is particularly effective when the subject is not a moving object. Accordingly, the control unit 18 may calculate the degree of change in the distance of the subject and change the number of image distance data used for setting the imaging condition in accordance with the degree of change in distance.
  • the imaging conditions are set after obtaining 20 pieces of image distance data obtained by continuous imaging 20 times. In this case, the imaging conditions change every time the image is taken 20 times.
  • the next imaging condition is set with two pieces of image distance data obtained by performing continuous imaging twice. In this case, the imaging condition changes every time imaging is performed twice.
  • step S16 and step S26 Since the image distance data obtained in step S16 and step S26 is image distance data with high distance measurement accuracy, the process returns to step S4 through one of the operations in steps S16 and S26.
  • the pixel saturation value at which the pixel is saturated or a value closer to the pixel saturation value may be used instead of the threshold value used for setting the imaging conditions in step S6 and step S18. Further, the threshold value may be made closer to the pixel saturation value step by step. Thereby, the range of pixel values with good resolution can be expanded.
  • the image distance data obtained under the first imaging condition and the image distance data obtained under the second imaging condition are combined and then obtained again under the first imaging condition.
  • the image distance data and the image distance data obtained again under the second imaging condition are synthesized.
  • the time interval of the synthesized image distance data obtained after the synthesis is the image distance obtained by conversion. It becomes longer than the time interval of data. Therefore, the respective image distance data obtained and converted by the imaging unit 14 may be combined with the image distance data obtained immediately thereafter.
  • FIG. 8 is a diagram schematically showing composite image distance data generated from each image distance data.
  • Image distance data sequentially obtained and converted by the imaging unit 14 is obtained in a manner such as frame A1, frame B1, frame A2, frame B2, frame A3, and so on.
  • Frame A shows image distance data obtained under the first imaging condition
  • frame B shows image distance data obtained under the second imaging condition.
  • the image distance data composition unit 20 generates composite image distance data C1 from the frames A1 and B1, and generates composite image distance data C2 from the frames B1 and A2.
  • the composite image distance data C3 is generated from the frame A2 and the frame B2, and the composite image distance data C4 is generated from the frame B2 and the frame A3.
  • the combined image distance data is sequentially generated from the obtained image distance data.
  • the imaging condition setting unit 50 generates a histogram, but it does not have to generate a histogram. In short, any method may be used as long as the imaging condition setting unit 50 can know the distance distribution of the subject.
  • the image distance data obtained under the first imaging condition and the image distance data obtained under the second imaging condition are synthesized. However, they may not be synthesized. This is because ranging accuracy can be improved without combining.
  • the image sensor may not be an image sensor in which pixels are two-dimensionally arranged in a matrix. This is because it is also possible to obtain one-dimensional or two-dimensional image distance data by optical or mechanical scanning (scanning) using image sensors that are individually or one-dimensionally arranged.
  • continuous moving image capturing is assumed.
  • an optimal image capturing condition is predicted from continuous moving image capturing, and then a plurality of image distances are predicted under the predicted optimal image capturing condition. Data may be acquired. This is because if a plurality of pieces of image distance data captured under the same imaging conditions are integrated, one piece of image distance data with higher accuracy can be acquired.
  • an image sensor having two-dimensionally arranged pixels is used.
  • an image sensor having one-dimensionally arranged pixels may be used.
  • image distance data in which distance information is arranged in a matrix can be obtained by using an image sensor having pixels arranged one-dimensionally.

Landscapes

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

Abstract

 被写体の測距の高精度化を図ることができる測距装置、測距方法、及びプログラムを提供する。測距装置(10)は、光を発光する光源(30)と、光源(30)により発光されて、被写体で反射された反射光を撮像する撮像部(14)と、撮像部(14)が撮像することにより得られた画像データを、被写体までの距離を示す画像距離データに変換する画像距離データ変換部(16)と、画像距離データに基づいて第1の撮像条件を設定する撮像条件設定部(50)と、光源(30)及び撮像部(14)を制御して、第1の撮像条件で被写体を撮像させる撮像制御部(52)とを備える。

Description

測距装置、測距方法、及びプログラム
 本発明は、測距装置、測距方法、及びプログラムに係り、特に、撮像素子を用いて被写体を測距する測距装置、測距方法、及びプログラムに関する。
 特開2001-281336及び特開平8-313215に記載されているように、タイムオブフライト(TOF)法を用いて、撮像素子を測距センサとして用いることが知られている。TOF法は、被写体に対して光を照射し、光が放射されてから、被写体からの戻り光が戻ってくるまでの時間を測定することで、被写体の距離を測定する。
 また、特許第3074967号及び特開2002-64449に記載されているように、撮像素子を用いた輝度の濃淡画像のセンシングにおいて、長時間露光と、短時間露光の2種類の画像を撮像して得られた2枚の画像データを合成することで、輝度差の大きい濃淡画像であってもS/N比の高い、広ダイナミックレンジの画像データを得ることが知られている。
 撮像素子を測距センサとして用いる場合は、光源により被写体に光を照射するため、被写体に届く光は、光源と被写体との距離の2乗に比例して減衰してしまう。したがって、近距離の被写体に合わせて光を照射すると、遠距離の被写体に届く光が少なくなり、遠距離の被写体の測距精度が低下する。逆に、遠距離の被写体に合わせて光を照射すると、近距離の被写体に届く光は多くなり、画素の電荷が飽和してしまうので、近距離の被写体の測距が不可能になる。
 そこで本発明は、かかる従来の問題点に鑑みてなされたものであり、被写体の測距の高精度化を図ることができる測距装置、測距方法、及びプログラムを提供することを目的とする。
 上記目的を達成するために、本発明は、測距装置であって、光を発光する光源と、前記光源により発光されて、被写体で反射された反射光を撮像する撮像部と、前記撮像部が撮像することにより得られた画素の画素値を、被写体までの距離を示す距離情報に変換する距離情報変換部と、前記距離情報に基づいて第1の撮像条件を設定する撮像条件設定部と、前記光源及び前記撮像部を制御して、前記第1の撮像条件で前記被写体を撮像させる撮像制御部と、を備える。
 前記撮像条件設定部は、最も距離が近い被写体の反射光を受光する画素の画素値が第1閾値となるように、前記第1の撮像条件を設定してよい。
 前記第1の撮像条件下における測距精度を解析して、前記測距精度が所定値より小さくなる精度低下距離を特定する測距精度解析部をさらに備え、前記撮像条件設定部は、前記精度低下距離以上遠くにある被写体がある場合は、前記第1の撮像条件より明るい輝度情報を得ることができる第2の撮像条件を設定し、前記撮像制御部は、前記光源及び前記撮像部を制御して、前記第1の撮像条件及び前記第2の撮像条件で前記被写体を撮像させてよい。
 前記第1の撮像条件で撮像されて変換された前記距離情報と、前記第2の撮像条件で撮像されて変換された前記距離情報とを合成する距離情報合成部をさらに備えてよい。
 前記撮像条件設定部は、前記精度低下距離以上遠くにある前記被写体のうち、最も距離が近い被写体の反射光を受光する画素の画素値が第2閾値となるように、前記第2の撮像条件を設定してよい。
 被写体の距離変化の度合いを算出する距離変化算出部と、前記距離変化の度合いに応じて前記第1閾値及び前記第2閾値の少なくとも1つを変更する閾値変更部と、をさらに備え、前記撮像部は2次元に配列された複数の画素を有しており、前記距離情報変換部は、前記撮像部が撮像することにより得られた前記複数の画素値のそれぞれを距離情報に変換して1枚の画像距離データを得、前記距離変化算出部は、複数枚の前記画像距離データを比較して、被写体の距離変化の度合いを算出してよい。
 前記第2閾値と画素飽和値との差は、前記第1閾値と画素飽和値の差よりも大きくてもよい。
 前記被写体は、ユーザによって選択された被写体または、前記撮像部の所定の領域で撮像された被写体であってよい。
 上記目的を達成するために、本発明は、光源により光を発光する発光工程と、前記光源により発光されて、被写体で反射された反射光を撮像部が撮像する撮像工程と、距離情報変換部が、撮像することにより得られた画素の画素値を、被写体までの距離を示す距離情報に変換する距離情報変換工程と、撮像条件設定部が、前記距離情報に基づいて第1の撮像条件を設定する撮像条件設定工程と、撮像制御部が、前記光源及び前記撮像部を制御して前記第1の撮像条件で前記被写体を撮像させる撮像制御工程と、を備えることを特徴とする。
 上記目的を達成するために、本発明は、プログラムであって、光を発光する光源と、前記光源により発光されて、被写体で反射された反射光を撮像する撮像部とを備えた測距装置を、前記撮像部が撮像することにより得られた画素の画素値を、被写体までの距離を示す距離情報に変換する距離情報変換部、前記距離情報に基づいて第1の撮像条件を設定する撮像条件設定部、前記光源及び前記撮像部を制御して、前記第1の撮像条件で前記被写体を撮像させる撮像制御部、として機能させることを特徴とする。
 本願発明によれば、測距精度を向上させることができ、正確に被写体までの距離を測距することができる。
本発明の実施の形態に係る測距装置の電気的な概略構成を示すブロック図である。 制御部の撮像条件の設定方法の原理を説明する図である。 被写体が複数ある場合に、合成処理に必要な画像距離データを得るために必要な、撮像条件の特性を説明するための図である。 被写体が近距離と遠距離との広範囲に跨る場合に、合成処理に必要な画像距離データを得るために必要な、撮像条件の特性を説明するための図である。 露光タイミングを示すタイムチャートである。 蓄積された電荷の揺らぎを距離の測定誤差に換算することを説明するための図である。 測距装置の動作を示すフローチャートである。 それぞれの画像距離データから生成される合成画像距離データを模式的に示した図である。
 本発明に係る測距装置について、好適な実施の形態を掲げ、添付の図面を参照しながら以下、詳細に説明する。
 図1は、本発明の実施の形態に係る測距装置の電気的な概略構成を示すブロック図である。測距装置10は、発光装置12、撮像部14、画像距離データ変換部(距離情報変換部)16、制御部18、画像距離データ合成部(距離情報合成部)20、及び画像距離データ出力部22を備える。CPU等の情報処理装置が図示しないメモリに記録されたプログラムを読み込むことによって、測距装置10として機能する。
 発光装置12は、光を発光する光源30、光源30を発光させる駆動部32を有する。駆動部32は、制御部18から送られてきた撮像条件にしたがって、光源30を発光させる。これにより、光源30の発光強度、発光時間、発光タイミング等が制御される。発光装置12は、被写体に対して、光源30が発光した光を照射する。なお、発光装置12は、強度変調された光を照射してもよい。
 撮像部14は、レンズ40と、絞り42と、絞り42を駆動させる絞り駆動回路(図示略)と、撮像素子44と、ユニット回路46とを有する。絞り42は、撮像素子44に入射する光の量を制御する。絞り駆動回路は、制御部が設定した撮像条件にしたがって、絞り42を駆動させる。撮像素子44に入射する光量は、絞り42による絞りの度合い(絞り値)、及び露光時間、発光装置12の発光量によって変わる。
 撮像素子44は、レンズ40、絞り42を介して被写体を撮像する。撮像素子44は、一定周期(一定のフレームレート)毎に、たとえば、30fpsで被写体を撮像して画像データを得るように制御される。なお、一定周期間隔で被写体を撮像しなくてもよい。例えば、撮像して得られる画像の時間間隔は異なってもよい。撮像条件の異なる画像を撮像する場合は、一定周期間隔でなくてもよい。撮像とは、受光した光を光電変換して、電荷を蓄積することをいい、光電変換及び電荷の蓄積は、撮像素子44のそれぞれの画素が行う。画像データとは、それぞれの画素が蓄積した電荷量(それぞれの画素が受光した画素値)の集合である。撮像素子44は、電子シャッターとしての機能を有し、この電子シャッターにより撮像素子44の露光時間を調整できる。撮像素子44は、一定周期間隔、たとえば、30fpsで蓄積した電荷をユニット回路46に出力してよい。撮像素子44は、CCDであってもよく、CMOSであってもよい。
 ユニット回路46は、撮像素子44から出力されるアナログ信号の画像データをデジタル信号に変換(A/D変換)するA/D変換器を有する。A/D変換器は、画素毎にデジタル変換を行う。A/D変換器はゲイン(変換利得)を変更可能であってもよい。撮像部14は、それぞれの画素の電荷量を画像距離データ変換部16に出力する。
 画像距離データ変換部(距離情報変換部)16は、TOF手法により、撮像された画像データを画像距離データに変換する。TOF手法は、周知技術なので詳しくは説明しないが、撮像部14は、TOF手法によって画像距離データを得るために、異なる撮像タイミングで複数回被写体を撮像し、画像距離データ変換部16は、該得られた複数の画像データから1枚の距離画像データを得る。
 画像距離データ変換部16は、それぞれの画素の画素値を距離データに変換する。これにより、それぞれの画素が受光した被写体までの距離を示す距離データを画素毎に得ることができる。ここでは、便宜上それぞれの画素における距離データを画素距離データ(距離情報)と呼ぶ。画素距離データが集まって画像距離データとなる。つまり、画像距離データは、画像データではないが、それぞれの画素距離データがマトリクス状に配置されたデータであるので、画像距離データと呼ぶ。
 これにより、被写体までの距離を画素毎に得ることができる。画像距離データ変換部16は、画像距離データを制御部18、画像距離データ合成部20、及び画像距離データ出力部(距離情報出力部)22に出力する。1フレーム期間に得られた画像データを変換することで、1つの画像距離データが得られる。画像距離データ変換部16は、DSPなどのプロセッサによって構成されてよい。撮像部14は、この1フレーム期間に撮像を複数回行い、画像距離データ変換部16は、該撮像により得られた複数の画像データから1つの画像距離データを得る。
 制御部18は、撮像条件設定部50、撮像制御部52、及び測距精度解析部54を備える。制御部18は、CPU等のプロセッサで構成されてよい。撮像条件設定部50は、画像距離データのそれぞれの画素距離データを解析して、被写体のヒストグラムを作成する。ヒストグラムは、被写体の距離と、画素数とを表したものである。そして、撮像条件設定部50は作成したヒストグラムに基づいて、被写体までの距離に合わせた最適な撮像条件を設定する。撮像条件としては、発光装置12が被写体に対して発光する光量、つまり、光源30が発光する光の光量、撮像素子44の1フレーム期間における露光時間、絞り42の絞り値、ゲイン値を含む。撮像部14は、1フレーム期間において複数回撮像を行うので、1フレーム期間における各撮像の露光時間も撮像条件として設定される。
 撮像制御部52は、設定された撮像条件で光を発光するように発光装置12を制御する。また、撮像制御部52は、設定された撮像条件で、被写体を撮像させるように撮像部14を制御する。具体的には、設定された絞り値に応じて絞り42を制御し、設定された露光時間で撮像素子44に露光させる。また、ユニット回路46で設定されたゲイン値で利得調整を行わせる。これにより、撮像部14は、被写体の距離に応じた撮像を行うことができる。たとえば、近距離用の撮像と、遠距離用の撮像を行うことができる。
 また、測距精度解析部54は、撮像条件設定部50が設定した撮像条件を解析して測距精度が所定値より低くなる距離(距離の位置)を特定する。また、測距精度解析部54は、解析した測距精度に基づいて、画像距離データを合成するか否かを判断する。画像距離データを合成する場合としては、測距精度が所定値より低くなる位置より遠い位置に被写体が存在する場合は、合成すると判断する。
 画像距離データ合成部(距離情報合成部)20は、撮像部14により異なる距離の被写体に応じて、異なる撮像条件で撮像され、画像距離データ変換部16により変換された複数の画像距離データを合成する。つまり、複数の画像距離データから合成画像距離データを作成する。画像距離データ合成部20は、DSP等のプロセッサで構成されてよい。
 図2は、制御部18の撮像条件の設定方法の原理を説明する図である。図2Aは、距離Z2~Z3の間に分布する被写体111のヒストグラムを示す。ヒストグラムの縦軸は、画素数を表している。この被写体111をより高精度に測距するために撮像条件を調整する。なお、高精度な測距を行うために、まず、所定の撮像条件、または、任意の撮像条件で被写体を撮像して、予め被写体の測距(プレ測距、予備測距)を行う必要があり、図2Aは、プレ測距により得られたものである。したがって、プレ測距によって得られた被写体111の距離は、実際の距離とずれている(測定精度が低い)可能性がある。ここで、被写体は、人、ビル、橋、猫等のそれぞれのオブジェクトを指すのではなく、撮像部14が撮像したものを被写体と呼ぶ。したがって、被写体111には、人やビル等の複数のオブジェクトが含まれてよい。
 図2Bは、撮像条件によって撮像素子の画素に蓄積される電荷量の特性を示す。上述したように、発光装置12が照射する光の強度は、距離の二乗に比例して減衰するので、特性は、距離が遠くなればなるほど、単位距離あたりの電荷量の変動が少なくなる。特性112は、Z1にある被写体を撮像した場合に画素の電荷量(画素値)が閾値となる特性である。特性112のうち、画素値が高い部分ほど、特性112の絶対値の傾きが大きくなるので、画素値がA/D変換された場合、画素値が高い方が画素値の分解能を高く維持できる。逆に、特性112のうち、画素値が低い部分ほど、特性112の絶対値の傾きが小さくなるので、A/D変換によって画素値の分解能は低くなってしまい、高精度な測距を行うことができない。
 被写体111がZ1~Z2に間にない場合は、被写体111の反射光を受光した画素の画素値は、分解能が高い範囲になく、測距の高精度化を図れない。つまり、実際に撮像される被写体111は、Z2からZ3の間に分布しているので、被写体111の反射光を受光した画素の画素値の範囲122は、分解能が低い範囲となる。
 また、特性114は、Z4にある被写体を撮像した場合に画素値が閾値となる特性である。被写体111は、Z4より距離が短いZ2~Z3の間にあるので、被写体111の反射光を受光した画素は、飽和して蓄積した電荷量が溢れ出てしまう(オーバーフローしてしまう)ために、有効な画素値が得られなくなる。
 そこで、被写体111のうち、最も近い位置Z2の被写体からの反射光を受光した画素の画素値が閾値となる特性113を示す撮像条件に変更する。これにより、被写体111からの反射光を受光することで画素に蓄積される電荷量の範囲121は、画素値の分解能が高い範囲となり、測距精度を高くすることができる。撮像素子44の複数の画素の画素値から、最も近い位置の被写体からの反射光を受光した画素を特定する。例えば、画素値が最大の画素を最も近い被写体からの反射光を受光した画素と特定してもよい。特性112を特性113にする場合は、発光装置12が照射する光量を多くする、露光時間を長くする、絞り値を小さくすることにより調整することができる。また、特性114を特性113にする場合は、発光装置12が照射する光量を小さくする、露光時間を短く、絞り値を大きくすることにより調整することができる。なお、特性112から特性113にする、あるいは特性114を特性113にするのは、必ずしも次の撮像の撮像条件でなくてよく、連続した複数回の撮像を経て特性112から特性113、あるいは特性114から特性113に一定割合で徐々にあわせるように調節してもよい。
 ここで、被写体111のうち、最も近い位置Z2の被写体からの反射光を受光した画素の画素値が、ちょうど飽和する値となる特性を示す撮像条件に変更してもよい。しかし、上述したように、プレ測距で被写体111までの距離を測っているので、測距した被写体までの距離が正確でない可能性がある。また、時間経過により被写体が移動することも想定されるので、プレ測距したZ2よりも実際は近い位置にある可能性がある。このような場合には、被写体111を受光した画素の電荷がオーバーフローしてしまう。したがって、閾値を用いたほうが好ましい。閾値は、画素が飽和する値から、一定値、又は、一定割合減算した値である。
 また、画素値は距離のみではなく被写体の反射率にも依存するので、被写体111が反射率の分布を持つような場合は、最も近い距離Z2を示す画素と、画素値が最大になる画素が必ずしも一致するとは限らない。その場合、画素値が最大の画素が閾値となるように特性113を調節する。したがって、最も距離が近いとは、得られる画素値が最大であることを分かりやすく説明するための表現であることをここで断っておく。
 図3は、被写体が複数ある場合に、合成処理に必要な画像距離データを得るために必要な、撮像条件の特性を説明するための図である。図3Aは、距離Z5~Z6の間に分布する被写体131、及び、距離Z7~Z8の間に分布する被写体132のヒストグラムを示す。図3Aのヒストグラムは、プレ測距により得られたものである。
 図3Bは、被写体131、及び被写体132を測距するために最適な撮像条件を示す。被写体131を精度良く測距するために、被写体131のうち、最も近いZ5の被写体からの反射光を受光した画素の画素値が閾値となる特性141の撮像条件で撮像を行う。これにより、被写体131の反射光を受光した画素の画素値は、分解能が高く、測距の高精度化を図れる。また、特性141の撮像条件で撮像すると、測距精度が所定値より低くなる距離に、または該距離より遠い位置に存在する被写体132を精度良く測距するために、被写体132のうち、最も近いZ7の被写体からの反射光を受光した画素の画素値が閾値となる特性142の撮像条件で撮像を行う。
 これにより、被写体132の反射光を受光して画素に蓄積された電荷量は、画素値の分解能が高く、測距の高精度化を図れる。このように、複数の被写体が近距離や遠距離等の長い距離範囲に混在する場合において、近距離も遠距離も高精度に測距するためには、2種類以上の異なる撮像条件で撮像した画素値を選択的に組み合わせて広ダイナミックレンジの画像距離を生成する必要がある。
 たとえば、特性141の撮像条件では、Z5~Z6に存在する被写体131では高精度に測距可能であるが、Z7~Z8に存在する被写体132は精度良く測距できない。つまり、Z7~Z8に存在する被写体132の測距精度は低くなってしまう。また、特性142の撮像条件では、Z7~Z8に存在する被写体132では高精度に測距可能であるが、Z5~Z6に存在する被写体131の反射光を受光した画素はオーバーフローしてしまい、被写体131を測距できない。したがって、被写体131、及び被写体132にそれぞれに適した撮像条件でそれぞれ撮像する。ここで、Z5からの反射光を受光した画素値が閾値となる撮像条件で撮像すると、測距精度が所定値より低くなる距離以上遠い位置に被写体132は存在するものとする。
 そして、画像距離データ合成部20が、特性141の撮像条件で撮像して得られ変換された被写体131の画像距離データと、特性142の撮像条件で得られ変換された被写体132の画像距離データとを合成することで、広ダイナミックレンジの画像距離データを得ることができる。具体的には、この被写体131の画像領域を、特性141の撮像条件で得られた画像距離データから特定し、被写体132の画像領域を、特性142の撮像条件で得られた画像距離データから特定する。そして、特定した画像領域の画像距離データを合成すれば、広ダイナミックレンジの画像距離データを生成することができる。
 図4は、被写体が近距離と遠距離との広範囲に跨る場合に、合成処理に必要な画像距離データを得るために必要な、撮像条件の特性を説明するための図である。図4Aは、Z9~Z11の近距離から遠距離に分布する被写体151のヒストグラムを示す。図4Aのヒストグラムは、プレ測距により得られたものである。
 図4Bは、被写体151を測距するための最適な撮像条件を示す。被写体151を精度良く測距するために、被写体151のうち、最も近いZ9の被写体からの反射光を受光した画素の画素値が閾値となる特性161の撮像条件で撮像を行う。しかしながら、特性161の撮像条件での撮像は、Z9~Z11の距離のうち、Z10より遠い被写体に対しては測距の高精度化を図ることができない。Z10は、特性161による画素値の分解能が低くなる距離である。つまり、Z10は、測距精度が所定値より低くなってしまう距離である。したがって、被写体151のうち、Z10以上離れている被写体に対しても測距の高精度化を図るために、Z10の被写体からの反射光を受光した画素の画素値が閾値となる特性162の撮像条件で撮像を行う。そして、画像距離データ合成部20が、特性161の撮像条件で得られ変換された被写体151のZ9~Z10までの画像距離データと、特性162の撮像条件で得られ変換された被写体151のZ10~Z11までの画像距離データとを合成することで、広ダイナミックレンジの画像距離データを得ることができる。
 具体的には、被写体のZ9~Z10までの画像領域を、特性161の撮像条件で得られた画像距離データから特定し、被写体のZ10~Z11までの画像領域を、特性162の撮像条件で得られた画像距離データから特定する。そして、特定した画像領域の画像距離データを合成すれば、広ダイナミックレンジの画像距離データを生成することができる。
 ここで、測距精度の算出方法について説明する。測距精度とは、同一の撮像条件で画像を撮像した際の複数のフレーム間での揺らぎをさすものとする。もっとも直接的な方法としては、複数のフレームから画素値の分散値を求め、その標準偏差を揺らぎとして、距離に変換することで距離換算の測定誤差を求める方法が挙げられる。測距精度の算出にこの方法を用いてもよいが、複数のフレームの保持が必要となるので、本実施の形態では、距離の測定精度を論理的に計算して予測する手法を用いる。
 距離の測定精度について説明する前に、TOF法で距離を測定する原理を説明する。説明に用いる手法や計算式は、距測原理を簡単に説明するためのものであり、あくまでTOF法の一形態である。上述したように、放射光の光量は、距離の二乗に比例して減衰する。したがって、光源が定常的に発光している場合は、反射光により撮像素子44で光電変換される電荷量Qは、
=k/z ・・・ (1)
と表すことができる。ここで、zは光源から被写体までの距離、kは、撮像条件、被写体の反射率、レンズ40の透過率、撮像素子44の光電変換率等で決まる係数とする。(1)式を変形すると、
z=(k/Q1/2 ・・・(2)
となる。また、図5に示すように、発光終了と同時のタイミングで露光を開始することで、照射光が被写体で反射して戻ってくるまでの遅延時間Tdの期間反射光で露光され得られる電荷量Qを測定する。光の遅延時間Tdは、
Td=2z/c ・・・(3)
で表すことできる。cは光速を表す。光強度測定用の露光タイミングの露光時間をTsとすると、露光タイミングで蓄積される電荷量Qは、Qとの比で表すことができ、
=Q×Td/Ts ・・・(4)となる。
 (4)式に(1)式、(3)式を代入すると、
=2/(Ts×c) ×k/z ・・・(5)
となる。したがって、電荷量Qは距離zに依存して減衰することがわかる。また(4)式に(3)式を代入すると、
=Q×2z/(Ts×c)となり、変形して、
z=(Ts×c)/2 × Q/Q ・・・(6)
となり、蓄積電荷量QとQの比により、被写体までの距離が測定できる。
 また、1フレーム期間中に図5に示すような発光と露光とのパターンを繰り返し、光電変換で得られる電荷量を積分していくことでS/N比の高い画素値を得ることができる。したがって、発光と露光との繰り返し回数により、実質的な露光時間の調整を行う。撮像素子44は複数の電荷量を保持可能な構成を用いても良い。具体的には、図5に示す発光と露光とのパターンにより、撮像素子44で蓄積電荷QとQを同時に保持し、そして蓄積電荷QとQを読み出してもよい。なお、便宜上、太陽や室内照明等の環境光の影響を無視したが、光源の照射光のないときの撮像結果を用いることで、環境光の影響を除去できることは明らかであり、本実施の形態においても環境光の影響を排除した測距測定を実施することができることは言うまでもない。
 蓄積電荷量Q、Q、露光時間Tsの揺らぎは、予め測定、予測することが可能である。したがって、距離zの測距精度は、(6)式に基づいて、誤差伝播の法則で算出できる。誤差伝播の法則は、既知の測定値(例えば、蓄積電荷量Q、Q、露光時間Ts)の分散から、間接的に求められる値(例えば、距離z)の分散を求める手法であり、一般的に広く知られた法則であるのでここでは説明しない。したがって、距離zの測距精度が所定値より低くなる距離を距離Z10としてよい。
 また、電荷量Q、Q、露光時間Tsの揺らぎをそれぞれ距離zの誤差に換算し、換算値の総和を算出してもよい。以下、この方法について説明する。まず、電荷量Qの揺らぎ量(標準偏差)をΔQとし、ΔQで生じる測定誤差Δzを求める。(2)式をQで微分して、
Δz/ΔQ=k1/2×(-1/2)×Q -3/2
に(1)式を代入して、
Δz/ΔQ=k1/2×(-1/2)×(k/z-3/2
=-1/(2k) ×zとなる。
 したがって、
|Δz/ΔQ|=(1/2)×k-1×z ・・・(7)
となる。
 図6は、蓄積された電荷の揺らぎを距離の測定誤差に換算することを説明するための図である。図6で示した特性191が(2)式で表される特性を表すとすると、(7)式は、特性191の傾きを表す。揺らぎ量ΔQの間の傾きを線形近似して距離の測定誤差Δzを求めると、
|Δz|=(1/2)×k-1×z×|ΔQ| ・・・(8)
となる。ΔQは、撮像素子44から出力される蓄積電荷量Qの揺らぎ量であり、たとえば、光ショットノイズ、回路起因ノイズ、量子化ノイズ等で発生する揺らぎ量の総和である。
 次に、電荷量Qの揺らぎ量(標準偏差)をΔQとし、ΔQで生じる測定誤差Δzを求める。(5)式を変形して、
z=2/(Ts×c)×k/Q ・・・(9)
となる。(9)式をQで微分して、
Δz/ΔQ=-2k/(Ts×c)×1/Q
=-2k/(Ts×c)×1/(k/z×2/(Ts×c))
=-2k/(Ts×c)×(z×Ts×c)/(2k)
=-(1/2)×Ts×c×k-1×z
したがって、
|Δz/ΔQ|=(1/2)×Ts×c×k-1×z ・・・(10)
となる。揺らぎ量ΔQの間の傾きを線形近似して距離の測定誤差Δzを求めると、
|Δz|=(1/2)×Ts×c×k-1×z×|ΔQ| ・・・(11)
となる。
 最後に、信号のジッタなどで生じるTsの揺らぎ(標準偏差)をΔTsとする。光の遅延を測定するので、ΔTsの間に光の進む距離が距離換算の誤差となる。したがって、ΔTsを距離の測定誤差に換算した値をΔzとすると、
Δz=c×ΔTs ・・・(12)
となる。
 そして、(8)式、(11)式、(12)式で求まる値の総和が距離の測定誤差(標準偏差)Δzとなる。したがって、
Δz=(|Δz+|Δz+|Δz1/2 ・・・(13)
となる。
 このΔzが測距精度を示す。すなわち(6)式で距離zが求まり、それに対応したΔzも求まる。Δzが大きくなると、測距精度が低くなるので、所定値より大きくなるΔzに対応する距離を、例えば、図4の距離Z10としてよい。
 なお、計算コスト削減のため、ΔzをΔzあるいはΔzのいずれか片方で代表させてもよい。すなわち、電荷量Q、Qのいずれか片方の特性の傾きの絶対値であっても、測距精度を簡易的に示しているといえるので、設定された撮像条件が示す特性の傾きの絶対値が一定値より小さくとなる距離の位置を、測距精度が所定値より小さくなる距離の位置としてもよい。また、被写体の反射光を受光した画素の画素値が一定値より小さくなる被写体の距離の位置を、測距精度が所定値より小さくなる距離の位置としてもよい。
 次に、測距装置10の動作を図7のフローチャートにしたがって説明する。
 撮像制御部52は、所定の撮像条件で、被写体を撮像部14に撮像させる(ステップS2)。撮像制御部52は、任意の撮像条件で、被写体を撮像部14に撮像させてもよい。撮像された画像データは、画像距離データ変換部16で変換され、撮像条件設定部50に出力される。
 次いで、撮像条件設定部50は、画像距離データに基づいて、被写体のヒストグラムを作成して、解析する(ステップS4)。つまり、作成したヒストグラムを解析して、最も近い被写体を特定する。つまり、複数の画素距離データのうち、最も短い(近い)画素距離データが示す距離を特定する。図2の場合はZ2が最も近い位置となり、図3の場合はZ5が最も近い位置となり、図4の場合はZ9が最も近い位置となる。
 なお、撮像条件設定部50は、画像距離領域データの全領域の中からではなく、全領域の一部である所定領域の中から、最も近い画素距離データを特定してもよい。所定領域は、ユーザによって選択された領域であってもよいし、予め定められた領域(例えば、画像の中央領域)であってもよい。通常、ユーザは、測距したい被写体が画像の所定領域にくるようにして撮像するからである。
 次いで、撮像条件設定部50は、特定した距離に基づいて第1の撮像条件を設定する(ステップS6)。撮像条件設定部50は、特定した距離からの被写体の反射光を受光した画素の画素値が閾値となるように第1の撮像条件を設定する。つまり、画素距離データが最も短い距離を表す画素の画素値が、閾値となるように第1の撮像条件を設定する。撮像条件設定部50は、設定した第1の撮像条件を測距精度解析部54に出力する。
 次いで、測距精度解析部54は、ステップS4で生成したヒストグラム、及び第1の撮像条件を解析して、測距精度が所定値より小さくなる距離(距離の位置)を推定する(ステップS8)。撮像条件が分かれば、発光装置12の照射により、画素に蓄積される電荷量(Q、Q)、画素に蓄積される電荷量の特性が予測でき、上述した方法で、距離の測距精度を推定することができる。したがって、測距精度が所定値より小さくなる距離を推定することができる。
 次いで、測距精度解析部54は、合成処理を行うか否かを判断する(ステップS10)。測距精度解析部54は、ステップS8で推定した距離以上遠い位置に被写体が存在するか否かを判断し、存在する場合は合成処理を行うと判断する。この判断は、ステップS8で推定した距離以上遠い距離の画素距離データが存在するか否かで判断する。測距精度解析部54は、合成処理を行うか否かの判断結果を撮像条件設定部50に出力する。
 例えば、図3に示すように、推定した距離がZ6以上Z7以下となる場合は、推定した距離、及び該距離より遠い位置に被写体132が存在するので、合成処理を行うと判断する。また、図4に示すように、推定した距離がZ10となる場合は、被写体151の一部は、該推定した距離、及び該距離より遠い位置にあるので、合成処理を行うと判断する。なお、所定領域を考慮する場合は、所定領域内に、特定した位置より遠い被写体があるか否かを判断する。つまり、所定領域内の画素距離データの中で、特定した位置より遠い画素距離データがあるか否かを判断してよい。
 ステップS10で、合成処理を行わないと判断すると、撮像条件設定部50は、ステップS6で設定した第1の撮像条件で撮像することができるフレームレートが所定のフレームレート以上か否かを判断する(ステップS12)。この所定のフレームレートは、予め決められていてもよいし、ユーザが任意に決めてもよい。
 ステップS12で、所定のフレームレート以上でないと判断すると、撮像条件設定部50は、ステップS6で設定した第1の撮像条件の設定を変更することで、露光時間を短縮して(ステップS14)、ステップS16に進む。このとき、露光時間が短くなると露光量が減ってしまうので、それを補うべく、撮像条件設定部50は、絞り度合いを小さくしたり、ゲイン値を上げたり、発光強度を上げてもよい。この場合は、撮像条件設定部50は、ステップS14の設定変更後の第1の撮像条件を撮像制御部52に出力する。
 一方、ステップS12で、所定のフレームレート以上であると判断すると、そのままステップS16に進む。この場合は、撮像条件設定部50は、ステップS6で設定した第1の撮像条件を撮像制御部52に出力する。
 ステップS16に進むと、撮像制御部52は、直近に設定された第1の撮像条件で撮像部14に被写体を撮像させる。この第1の撮像条件で撮像された画像データは、画像距離データ変換部16により画像距離データに変換され、画像距離データ出力部22から出力される。これにより、測距精度を高く維持できる画像データを撮像することができる。ステップS16で被写体を撮像すると、ステップS4に戻り、上記した動作を繰り返す。ステップS16を経た後の、ステップS4の動作は、ステップS16で撮像された画像データに基づいてヒストグラムを生成して解析してよい。
 一方、ステップS10で、合成処理をすると判断すると、撮像条件設定部50は、第1の撮像条件より明るい画像を得ることができる第2の撮像条件を設定する(ステップS18)。具体的には、ステップS8で推定した距離以上遠い位置に存在する被写体のうち、最も近い被写体の距離がどの位置であるかを特定し、該特定した距離の位置に基づいて第2の撮像条件を設定する。つまり、該特定した位置からの被写体の反射光を受光した画素の画素値が閾値となるように第2の撮像条件を設定する。詳しく説明するならば、推定した距離以上遠い複数の画素距離データのうち、最も近い画素距離データの画素の画素値が、閾値となるように第2の撮像条件を設定する。なお、明るい画像を得ることができるとは、同一の環境下で、同一の被写体を同一の距離から撮像した場合に明るいということである。具体的には、ゲイン値が高い、又は、露光時間が長い、または、絞り度合いが小さい、または光源の発光強度が強いことをいう。
 このステップS18で特定される被写体の位置は、例えば、図3に示すように、推定した距離がZ6以上Z7以下となる場合は、距離Z7を特定し、該特定した位置からの被写体132の反射光を受光した画素の画素値が閾値となるように第2の撮像条件を設定する。また、図4に示すように、推定した距離がZ10となる場合は、距離Z10を特定し、該特定したZ10からの被写体151の反射光を受光した画素の画素値が閾値となるように第2の撮像条件を設定する。
 次いで、撮像条件設定部50は、ステップS6で設定した第1の撮像条件で撮像することができるフレームレート及びステップS18で設定した第2の撮像条件で撮像することができるフレームレートを合算したフレームレートが、所定のフレームレート以上か否かを判断する(ステップS20)。ステップS20の所定のフレームレートは、ステップS12の所定フレームレートと異なっていてもよい。
 ステップS20で、所定のフレームレート以上でないと判断すると、ステップS6で設定した第1の撮像条件及びステップS18で設定した第2の撮像条件のうち少なくとも一方の設定を変更することで、第1の撮像条件及び第2の撮像条件の合計露光時間を短縮して(ステップS22)、ステップS24に進む。このとき、露光時間が短くなると露光量が減ってしまうので、それを補うべく、撮像条件設定部50は、絞り度合いを小さくしたり、ゲイン値を上げたり、発光強度を上げてもよい。撮像条件設定部50は、ステップS22の設定変更後の第1の撮像条件及び第2の撮像条件を撮像制御部52に出力する。
 一方、ステップS20で、合算したフレームレートが所定のフレームレート以上であると判断すると、そのままステップS24に進む。この場合は、撮像条件設定部50は、ステップS6で設定した第1の撮像条件及びステップS18で設定した第2の撮像条件を撮像制御部52に出力する。
 ステップS24に進むと、撮像制御部52は、直近に設定された第1の撮像条件と第2の撮像条件で撮像部14に被写体をそれぞれ撮像させる。
 次いで、画像距離データ合成部20は、第1の撮像条件で撮像され画像距離データに変換された画像距離データと、第2の撮像条件で撮像され画像距離データに変換された画像距離データとを合成する(ステップS26)。画像距離データ合成部20は、ステップS8で推定した距離より短い被写体の画像距離データは、第1の撮像条件で得られた画像距離データを用い、推定した距離以上の被写体の画像距離データは、第2の撮像条件で得られた画像距離データを用いて、合成画像距離データを生成する。この生成された合成画像距離データは、画像距離データ出力部22から出力される。これにより、画像距離データの広ダイナミックレンジ化を図ることができ、測距精度を高く維持できる画像データを得ることができる。
 なお、上記実施の形態は、以下のような変形も可能である。
(1)ステップS8で推定した距離を跨って被写体が移動している場合に、単に第1の撮像条件で得られた画像距離データと、第2の撮像条件で得られた画像距離データとを、合成してしまうと、合成画像距離データに被写体の不連続性が生じてしまう。つまり、被写体の距離データが不連続となってしまう。したがって、第1の撮像条件で得られた画像距離データの被写体の距離データと、第2の撮像条件で得られた画像距離データの被写体の距離データとを重み付けして合成してもよい。これにより、滑らかな被写体の距離データを得ることができる。
 (2)上記実施の形態では、閾値を一定にしたが、被写体の距離の変化度合いに応じて閾値を変更してもよい。例えば、被写体の距離の変化度合いが高い場合は、つまり、前に撮像され得られた画像距離データと後に撮像され得られた画像距離データとを比較して、距離の変化の度合いが大きいほど、閾値を画素飽和値から離してもよい。つまり、被写体の距離変化の度合いが大きいほど、得られた画像距離データは正確でない可能性が高く、このような場合に閾値を画素飽和値に近づけてしまうと、上述したようにオーバーフローが起きてしまうからである。この場合は、制御部18は、距離変化算出部及び閾値変更部をさらに備え、該距離変化算出部が被写体の距離変化の度合いを算出する。距離変化算出部は、画像距離データを比較することで、距離変化の度合いを算出することができる。閾値変更部は、算出された距離変化の度合いに応じて閾値を変更してよい。そして、撮像条件設定部は、閾値変更部が変更した閾値を用いて第1の撮像条件及び第2の撮像条件の少なくとも1つを設定する。
 (3)上記実施の形態では、第1の撮像条件の設定に用いられる閾値(第1閾値と呼ぶ)と第2の撮像条件の設定に用いられる閾値(第2閾値と呼ぶ)とを同じにしたが、異なる閾値を用いてもよい。被写体が遠ければ遠いほど測距精度が低くなりがちである。したがって、第2閾値と画素飽和値との差は、第1閾値と画素飽和値の差よりも大きくするようにしてもよい。
 (4)上記変形例(2)及び(3)において、閾値変更部は、距離変化の度合いに応じて第1閾値及び第2閾値の少なくとも1つを変更してよい。この場合、閾値変更部は、第2閾値と画素飽和値との差が第1閾値と画素飽和値の差よりも大きくなるように変更してもよい。
 (5)上記変形例(2)、(3)及び(4)では、閾値を距離変化の度合いに応じて変更するとしたが、実際は被写体の反射率にも依存するので、被写体の反射率の分布度合いに応じた閾値変更を付け加えてもよい。例えば、反射率の分布度合いが大きい被写体の場合、得られる画素値の分布も大きくなるので、閾値も画素飽和に対し余裕を持つようにしたほうが、被写体の変化に対応しやすい。なお、反射率の分布は、(2)式から導くことができるし、また光源の照射光のないときの撮像結果を用いてもよい。
 (6)上記実施の形態では、直前に撮像され得られた1枚の距離画像データ(合成画像距離データを含む)を用いて、撮像条件を設定するようにしたが、同一の撮像条件で複数枚連続して撮像して得られた複数の画像距離データを用いて、撮像条件を設定するようにしてもよい。1枚の画像距離データで撮像条件を設定するより、複数枚の画像距離データから被写体の距離を判断して撮像条件を設定したほうが、測距精度を高めることができるからである。また、この方法は、被写体が移動体でないときに特に有効である。したがって、制御部18が被写体の距離変化の度合いを算出して、距離変化の度合い応じて、撮像条件の設定に用いられる画像距離データの枚数を変えてもよい。被写体の距離変化が少ない場合は、例えば、20回連続撮像して得られた20枚の画像距離データを得てから撮像条件を設定する。この場合は、20回撮像する毎に撮像条件が変わる。被写体の距離変化が比較的大きい場合は、例えば、2回連続撮像して得られた2枚の画像距離データで次の撮像条件を設定する。この場合は、2回撮像する毎に撮像条件が変わる。
 (7)上記実施の形態では、第1の撮像条件、第2の撮像条件を用いて得られた2枚の画像距離データを合成する例を説明したが、3つ以上の撮像条件を用いて得られた3枚の画像距離データを合成するようにしてもよい。例えば、第1の撮像条件下における測距精度が所定値より低くなる位置以上離れた被写体が存在する場合は、第2の撮像条件で画像距離データを得る。そして、第2の撮像条件下における測距精度が所定値より低くなる位置以上離れた被写体が存在する場合には、第3の撮像条件で画像距離データを得るという具合に、複数の撮像条件を用いて画像距離データを得て、該得られた複数の画像距離データを合成してよい。
 (8)ステップS16及びステップS26で得られた画像距離データは、測距精度が高い画像距離データなので、ステップS16及びステップS26の動作のうち、いずれか一方の動作を経て、ステップS4に戻った場合は、以後、ステップS6及びステップS18で撮像条件の設定に用いる閾値に代えて、画素が飽和する画素飽和値か、画素飽和値により近い値を用いてもよい。また、段階的に閾値を画素飽和値に近づけるようにしてもよい。これにより、分解能がよい画素値の範囲を広げることができる。
 (9)上記実施の形態では、第1の撮像条件で得られた画像距離データと第2の撮像条件で得られた画像距離データとを合成した後、第1の撮像条件で再び得られた画像距離データと第2の撮像条件で再び得られた画像距離データとを合成するようにしたが、この方法では、合成後に得られる合成画像距離データの時間間隔は、変換されて得られる画像距離データの時間間隔よりも長くなってしまう。したがって、撮像部14の撮像によって得られて変換されたそれぞれの画像距離データと、その直後に得られた画像距離データとを合成するようにしてもよい。
 図8は、それぞれの画像距離データから生成される合成画像距離データを模式的に示した図である。フレームA1、フレームB1、フレームA2、フレームB2、フレームA3・・・、という具合に、撮像部14によって順次得られ変換された画像距離データが得られる。フレームAは、第1の撮像条件で得られた画像距離データを示し、フレームBは、第2の撮像条件で得られた画像距離データを示す。画像距離データ合成部20は、フレームA1とフレームB1から合成画像距離データC1を生成し、フレームB1とフレームA2から合成画像距離データC2を生成する。また、フレームA2とフレームB2から合成画像距離データC3を生成し、フレームB2とフレームA3から合成画像距離データC4を生成するという具合に、それぞれ順次得られた画像距離データと、その直後に得られた画像距離データとをから順次合成画像距離データを生成する。
 (10)上記実施の形態では、撮像条件設定部50は、ヒストグラムを生成するようにしたが、ヒストグラムを生成しなくてもよい。要は、撮像条件設定部50が、被写体の距離の分布がわかる方法であればよい。
 (11)上記実施の形態では、第1の撮像条件で得られた画像距離データと第2の撮像条件で得られた画像距離データとを合成するようにしたが、合成しなくてもよい。合成しなくても、測距精度を向上させることができるからである。
 (12)上記実施形態では、フレームレートが所定のフレームレート以上になるようにしたが、所定のフレームレート以上が実現できる場合であっても、データ出力後、なにもしない(ブランキング)期間を設け、ブランキング期間を調節することで、常に等間隔の所定のフレームレート(例えば30fps)でデータ出力するようにしてもよい。ユーザは被写体の変化に応じてフレームレートが変化するよりも、固定フレームレートの方が扱いやすい場合もあるからである。一方、当然であるが、被写体が近距離であればあるほど、測距精度を確保したまま、露光時間が短くできフレームレートも高速化できるので、より近距離の被写体に対してはより高速なフレームレートを出力できるようにしてもよい。危険回避等のアプリケーションを考えれば、被写体が近距離であればあるほど危険のリスクが高くなるため、より高速なフレームレートを必要とするからである。
 (13)上記実施形態では、2次元の画像距離データを用いたが、1次元の距離画像データの撮像であってもよい。
 (14)また、画素がマトリクス状に2次元配列された撮像素子でなくてもよい。単独あるいは1次元状に配列された撮像素子を用いて、光学的あるいは機械的な走査(スキャン)で1次元あるいは2次元の画像距離データを得ることもできるからである。
 (15)上記実施形態では、連続動画的な撮像を想定したが、例えば、連続動画的な撮像から、最適な撮像条件を予測し、その後、予測された最適な撮像条件で複数枚の画像距離データを取得してもよい。同一の撮像条件で撮像した複数の画像距離データを積分すれば、より高精度な1枚の画像距離データを取得できるからである。
 (16)上記実施の形態では、2次元配列された画素を有する撮像素子を用いるようにしたが、1次元配列された画素を有する撮像素子を用いてもよい。この場合は、1次元配列された画素を有する撮像素子を用いることで、距離情報がマトリクス状に配置された画像距離データを得ることができる。
 (17)上記変形例(1)~(16)を矛盾が生じない範囲内で、適宜組み合わせた態様であってもよい。
 以上、本発明を実施の形態を用いて説明したが、本発明の技術的範囲は上記実施の形態に記載の範囲には限定されない。上記実施の形態に、多様な変更または改良を加えることが可能であることが当業者に明らかである。その様な変更または改良を加えた形態も本発明の技術的範囲に含まれ得ることが、特許請求の範囲の記載から明らかである。

Claims (10)

  1.  光を発光する光源(30)と、
     前記光源(30)により発光されて、被写体で反射された反射光を撮像する撮像部(14)と、
     前記撮像部(14)が撮像することにより得られた画素の画素値を、被写体までの距離を示す距離情報に変換する距離情報変換部(16)と、
     前記距離情報に基づいて第1の撮像条件を設定する撮像条件設定部(50)と、
     前記光源(30)及び前記撮像部(14)を制御して、前記第1の撮像条件で前記被写体を撮像させる撮像制御部(52)と、
     を備える測距装置(10)。
  2.  請求項1に記載の測距装置(10)であって、
     前記撮像条件設定部(50)は、最も距離が近い被写体の反射光を受光する画素の画素値が第1閾値となるように、前記第1の撮像条件を設定することを特徴とする測距装置(10)。
  3.  請求項1に記載の測距装置(10)であって、
     前記第1の撮像条件下における測距精度を解析して、前記測距精度が所定値より小さくなる精度低下距離を特定する測距精度解析部(54)をさらに備え、
     前記撮像条件設定部(50)は、前記精度低下距離以上遠くにある被写体がある場合は、前記第1の撮像条件より明るい輝度情報を得ることができる第2の撮像条件を設定し、
     前記撮像制御部(52)は、前記光源(30)及び前記撮像部(14)を制御して、前記第1の撮像条件及び前記第2の撮像条件で前記被写体を撮像させることを特徴とする測距装置(10)。
  4.  請求項3に記載の測距装置(10)であって、
     前記第1の撮像条件で撮像されて変換された前記距離情報と、前記第2の撮像条件で撮像されて変換された前記距離情報とを合成する距離情報合成部(20)をさらに備えることを特徴とする測距装置(10)。
  5.  請求項3に記載の測距装置(10)であって、
     前記撮像条件設定部(50)は、前記精度低下距離以上遠くにある前記被写体のうち、最も距離が近い被写体の反射光を受光する画素の画素値が第2閾値となるように、前記第2の撮像条件を設定することを特徴とする測距装置(10)。
  6.  請求項5に記載の測距装置(10)であって、
     被写体の距離変化の度合いを算出する距離変化算出部と、
     前記距離変化の度合いに応じて前記第1閾値及び前記第2閾値の少なくとも1つを変更する閾値変更部と、
     をさらに備え、
     前記撮像部(14)は2次元に配列された複数の画素を有しており、
     前記距離情報変換部(16)は、前記撮像部(14)が撮像することにより得られた前記複数の画素値のそれぞれを距離情報に変換して1枚の画像距離データを得、
     前記距離変化算出部は、複数枚の前記画像距離データを比較して、被写体の距離変化の度合いを算出することを特徴とする測距装置(10)。
  7.  請求項5に記載の測距装置(10)であって、
     前記第2閾値と画素飽和値との差は、前記第1閾値と画素飽和値の差よりも大きくすることを特徴とする測距装置(10)。
  8.  請求項1に記載の測距装置(10)であって、
     前記被写体は、前記撮像部(14)の所定の領域で撮像された被写体であることを特徴とする測距装置(10)。
  9.  測距装置(10)が被写体の距離を測定する測距方法であって、
     光源(30)により光を発光する発光工程と、
     前記光源(30)により発光されて、被写体で反射された反射光を撮像部(14)が撮像する撮像工程と、
     距離情報変換部(16)が、撮像することにより得られた画素の画素値を、被写体までの距離を示す距離情報に変換する距離情報変換工程と、
     撮像条件設定部(50)が、前記距離情報に基づいて第1の撮像条件を設定する撮像条件設定工程と、
     撮像制御部(52)が、前記光源(30)及び前記撮像部(14)を制御して前記第1の撮像条件で前記被写体を撮像させる撮像制御工程と、
     を備えることを特徴とする測距方法。
  10.  光を発光する光源(30)と、前記光源(30)により発光されて、被写体で反射された反射光を撮像する撮像部(14)とを備えた測距装置(10)を、
     前記撮像部(14)が撮像することにより得られた画素の画素値を、被写体までの距離を示す距離情報に変換する距離情報変換部(16)、
     前記距離情報に基づいて第1の撮像条件を設定する撮像条件設定部(50)、
     前記光源(30)及び前記撮像部(14)を制御して、前記第1の撮像条件で前記被写体を撮像させる撮像制御部(52)、
     として機能させることを特徴とするプログラムを記録した記録媒体。
PCT/JP2010/065368 2009-09-15 2010-09-08 測距装置、測距方法、及びプログラム WO2011033971A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US13/496,137 US8768010B2 (en) 2009-09-15 2010-09-08 Distance measuring apparatus, distance measuring method, and program
DE112010003649.7T DE112010003649B4 (de) 2009-09-15 2010-09-08 Distanzmessvorrichtung, Distanzmessverfahren und Programm

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2009-213420 2009-09-15
JP2009213420A JP5743390B2 (ja) 2009-09-15 2009-09-15 測距装置、及び測距方法

Publications (1)

Publication Number Publication Date
WO2011033971A1 true WO2011033971A1 (ja) 2011-03-24

Family

ID=43758579

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2010/065368 WO2011033971A1 (ja) 2009-09-15 2010-09-08 測距装置、測距方法、及びプログラム

Country Status (4)

Country Link
US (1) US8768010B2 (ja)
JP (1) JP5743390B2 (ja)
DE (1) DE112010003649B4 (ja)
WO (1) WO2011033971A1 (ja)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018185179A (ja) * 2017-04-25 2018-11-22 株式会社リコー 測距装置、監視装置、3次元計測装置、移動体、ロボット及び測距方法
US10816667B2 (en) 2016-02-16 2020-10-27 Sony Corporation Imaging apparatus and imaging control method

Families Citing this family (38)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012168322A2 (en) 2011-06-06 2012-12-13 3Shape A/S Dual-resolution 3d scanner
JP5576851B2 (ja) * 2011-12-27 2014-08-20 本田技研工業株式会社 測距システム及び測距方法
JP5781918B2 (ja) * 2011-12-28 2015-09-24 浜松ホトニクス株式会社 距離測定装置
US9477303B2 (en) 2012-04-09 2016-10-25 Intel Corporation System and method for combining three-dimensional tracking with a three-dimensional display for a user interface
CN104470757B (zh) 2012-07-09 2017-05-17 布莱特瓦维森有限公司 立体选通成像系统和方法
US20140037135A1 (en) * 2012-07-31 2014-02-06 Omek Interactive, Ltd. Context-driven adjustment of camera parameters
DE102014206236B4 (de) * 2013-04-04 2020-11-19 pmdtechnologies ag Lichtlaufzeitkamera für ein Fahrzeug
DE102014206898B4 (de) * 2013-04-10 2020-11-19 pmdtechnologies ag Lichtlaufzeitkamera für ein Fahrzeug
EP3015882B1 (en) 2013-06-27 2020-12-09 Panasonic Semiconductor Solutions Co., Ltd. Distance measuring device
JP6587185B2 (ja) * 2014-01-14 2019-10-09 パナソニックIpマネジメント株式会社 距離画像生成装置及び距離画像生成方法
DE102014004787A1 (de) * 2014-04-02 2015-10-08 Audi Ag Erfassungseinrichtung, insbesondere zur Nutzung in einem Kraftfahrzeug und Kraftfahrzeug
JP6731135B2 (ja) * 2014-05-30 2020-07-29 パナソニックセミコンダクターソリューションズ株式会社 センシングシステム及び運転支援システム
WO2016075945A1 (ja) * 2014-11-14 2016-05-19 株式会社デンソー 光飛行型測距装置
US9881235B1 (en) * 2014-11-21 2018-01-30 Mahmoud Narimanzadeh System, apparatus, and method for determining physical dimensions in digital images
DE102014117399B4 (de) * 2014-11-27 2017-05-11 Sick Ag Sensorsystem
DE102015106140A1 (de) * 2015-04-22 2016-10-27 Valeo Schalter Und Sensoren Gmbh Verfahren zum Betreiben eines optoelektronischen Sensors für ein Kraftfahrzeug mit Anpassung des Aussendens der Sendesignale, optoelektronischer Sensor, Fahrerassistenzsystem sowie Kraftfahrzeug
DE102015218822A1 (de) 2015-09-30 2017-03-30 Ifm Electronic Gmbh Lichtlaufzeitkamera mit verstellbarer Blende
JP2017133853A (ja) 2016-01-25 2017-08-03 株式会社リコー 測距装置
JP6848364B2 (ja) 2016-11-10 2021-03-24 株式会社リコー 測距装置、移動体、ロボット、3次元計測装置、監視カメラ及び測距方法
WO2018101187A1 (ja) 2016-11-29 2018-06-07 パナソニックIpマネジメント株式会社 距離測定装置
EP3550261A4 (en) 2016-12-05 2019-12-25 Panasonic Intellectual Property Management Co., Ltd. IMAGE CAPTURE DEVICE AND IMAGE CAPTURE ELEMENT USED THEREIN
JPWO2018181250A1 (ja) * 2017-03-30 2020-02-06 パナソニックIpマネジメント株式会社 距離画像生成装置及び距離画像生成方法
JP6846708B2 (ja) * 2017-03-30 2021-03-24 パナソニックIpマネジメント株式会社 画像認識装置および距離画像生成方法
US10999524B1 (en) 2018-04-12 2021-05-04 Amazon Technologies, Inc. Temporal high dynamic range imaging using time-of-flight cameras
US10708484B2 (en) 2018-06-20 2020-07-07 Amazon Technologies, Inc. Detecting interference between time-of-flight cameras using modified image sensor arrays
CN112639513A (zh) * 2018-07-02 2021-04-09 布鲁克曼科技株式会社 测距装置、照相机、检查调整装置、测距装置的驱动调整方法及检查调整方法
US10681338B1 (en) 2018-07-24 2020-06-09 Amazon Technologies, Inc. Detecting interference in depth images captured using overlapping depth cameras
EP3855215A4 (en) 2018-09-18 2021-11-10 Panasonic Intellectual Property Management Co., Ltd. DEPTH ACQUISITION DEVICE, DEPTH ACQUISITION PROCESS AND PROGRAM
EP3855395B1 (en) 2018-09-18 2024-05-15 Panasonic Intellectual Property Management Co., Ltd. Depth acquisition device, depth acquisition method and program
CN112513934A (zh) 2018-09-27 2021-03-16 松下知识产权经营株式会社 纵深取得装置、纵深取得方法以及程序
WO2020066637A1 (ja) 2018-09-28 2020-04-02 パナソニックIpマネジメント株式会社 奥行取得装置、奥行取得方法およびプログラム
US10915783B1 (en) 2018-12-14 2021-02-09 Amazon Technologies, Inc. Detecting and locating actors in scenes based on degraded or supersaturated depth data
US20220146648A1 (en) * 2019-02-22 2022-05-12 Sony Semiconductor Solutions Corporation Distance measuring device, method for controlling distance measuring device, and electronic device
EP3977718A1 (en) * 2019-05-31 2022-04-06 Ricoh Company, Ltd. Imaging system, imaging method, and carrier means
JP2021050988A (ja) * 2019-09-25 2021-04-01 ソニーセミコンダクタソリューションズ株式会社 測距装置及び電子機器
JP7364439B2 (ja) 2019-11-25 2023-10-18 ファナック株式会社 Tofセンサを用いた物体検出システム
JPWO2022137919A1 (ja) * 2020-12-22 2022-06-30
CN116068568B (zh) * 2023-04-07 2023-07-28 天津宜科自动化股份有限公司 一种获取物体距离的数据处理系统

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09197045A (ja) * 1996-01-24 1997-07-31 Nissan Motor Co Ltd 車両用レーダ装置
JP2008145263A (ja) * 2006-12-11 2008-06-26 Fujifilm Corp 撮影装置および方法並びにプログラム
JP2009047460A (ja) * 2007-08-15 2009-03-05 Lasertec Corp 共焦点顕微鏡

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0374967A (ja) 1989-08-17 1991-03-29 Toshiba Corp 画像補正回路
JP3074967B2 (ja) 1992-10-27 2000-08-07 松下電器産業株式会社 高ダイナミックレンジ撮像・合成方法及び高ダイナミックレンジ撮像装置
JPH08313215A (ja) * 1995-05-23 1996-11-29 Olympus Optical Co Ltd 2次元距離センサ
JP2000098478A (ja) * 1998-09-22 2000-04-07 Casio Comput Co Ltd 電子カメラ及びその制御方法
JP2001281336A (ja) 2000-03-31 2001-10-10 Olympus Optical Co Ltd 距離画像撮像装置
JP3901434B2 (ja) 2000-08-23 2007-04-04 株式会社日立製作所 情報配信システム及び情報表示装置
JP4235729B2 (ja) * 2003-02-03 2009-03-11 国立大学法人静岡大学 距離画像センサ
JP4727388B2 (ja) * 2005-10-28 2011-07-20 セコム株式会社 侵入検知装置
DE102006060108A1 (de) 2006-12-20 2008-06-26 Sick Ag Laserscanner
JP5190663B2 (ja) * 2007-03-27 2013-04-24 スタンレー電気株式会社 距離画像生成装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09197045A (ja) * 1996-01-24 1997-07-31 Nissan Motor Co Ltd 車両用レーダ装置
JP2008145263A (ja) * 2006-12-11 2008-06-26 Fujifilm Corp 撮影装置および方法並びにプログラム
JP2009047460A (ja) * 2007-08-15 2009-03-05 Lasertec Corp 共焦点顕微鏡

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10816667B2 (en) 2016-02-16 2020-10-27 Sony Corporation Imaging apparatus and imaging control method
JP2018185179A (ja) * 2017-04-25 2018-11-22 株式会社リコー 測距装置、監視装置、3次元計測装置、移動体、ロボット及び測距方法

Also Published As

Publication number Publication date
DE112010003649B4 (de) 2014-08-21
US8768010B2 (en) 2014-07-01
JP5743390B2 (ja) 2015-07-01
JP2011064498A (ja) 2011-03-31
DE112010003649T5 (de) 2012-08-02
US20120177252A1 (en) 2012-07-12

Similar Documents

Publication Publication Date Title
WO2011033971A1 (ja) 測距装置、測距方法、及びプログラム
US9188663B2 (en) Time-of-flight imager
US10928518B2 (en) Range image generation apparatus and range image generation method
JP5367640B2 (ja) 撮像装置および撮像方法
US9927516B2 (en) Distance measuring apparatus and distance measuring method
US8159598B2 (en) Distance estimation apparatus, distance estimation method, storage medium storing program, integrated circuit, and camera
US7379100B2 (en) Method and system to increase dynamic range of time-of-flight (TOF) and/or imaging sensors
US7796239B2 (en) Ranging apparatus and ranging method
US20190007592A1 (en) Imaging device and solid-state imaging element used in same
US8537264B2 (en) Image capturing apparatus, method, and program for performing an auto focus operation using invisible and visible light
JP2012225807A (ja) 距離画像カメラおよび距離画像合成方法
JP2010286307A (ja) 画像撮像装置
US20140146140A1 (en) Image capturing device, semiconductor integrated circuit, and image capturing method
US20220099836A1 (en) Method for measuring depth using a time-of-flight depth sensor
JP3820087B2 (ja) 3次元画像検出装置
JP4105801B2 (ja) 3次元画像入力装置
JP2020052001A (ja) 奥行取得装置、奥行取得方法およびプログラム
JP2003185412A (ja) 画像取得装置および画像取得方法
JP4369574B2 (ja) 3次元画像検出装置
JP4369575B2 (ja) 3次元画像検出装置
JP2020051991A (ja) 奥行取得装置、奥行取得方法およびプログラム
JP4604112B2 (ja) 被写体情報測定方法及び被写体情報測定装置、並びに露光制御方法及び、露光制御装置
CN109981992B (zh) 一种在高环境光变化下提升测距准确度的控制方法及装置
JP4595135B2 (ja) 距離測定システムおよび距離測定方法
JP5482560B2 (ja) 測光装置、撮像装置、およびフリッカの検出方法

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: 10817084

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 13496137

Country of ref document: US

WWE Wipo information: entry into national phase

Ref document number: 112010003649

Country of ref document: DE

Ref document number: 1120100036497

Country of ref document: DE

122 Ep: pct application non-entry in european phase

Ref document number: 10817084

Country of ref document: EP

Kind code of ref document: A1