WO2023276229A1 - 距離測定装置 - Google Patents

距離測定装置 Download PDF

Info

Publication number
WO2023276229A1
WO2023276229A1 PCT/JP2022/004624 JP2022004624W WO2023276229A1 WO 2023276229 A1 WO2023276229 A1 WO 2023276229A1 JP 2022004624 W JP2022004624 W JP 2022004624W WO 2023276229 A1 WO2023276229 A1 WO 2023276229A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
resampling
images
distance measuring
measuring device
Prior art date
Application number
PCT/JP2022/004624
Other languages
English (en)
French (fr)
Inventor
康一 崎田
Original Assignee
日立Astemo株式会社
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 日立Astemo株式会社 filed Critical 日立Astemo株式会社
Priority to DE112022001672.8T priority Critical patent/DE112022001672T5/de
Publication of WO2023276229A1 publication Critical patent/WO2023276229A1/ja

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N13/10Processing, recording or transmission of stereoscopic or multi-view image signals
    • H04N13/106Processing image signals
    • H04N13/133Equalising the characteristics of different image components, e.g. their average brightness or colour balance
    • 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
    • G03PHOTOGRAPHY; CINEMATOGRAPHY; ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ELECTROGRAPHY; HOLOGRAPHY
    • G03BAPPARATUS OR ARRANGEMENTS FOR TAKING PHOTOGRAPHS OR FOR PROJECTING OR VIEWING THEM; APPARATUS OR ARRANGEMENTS EMPLOYING ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ACCESSORIES THEREFOR
    • G03B35/00Stereoscopic photography
    • G03B35/08Stereoscopic photography by simultaneous recording
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N13/20Image signal generators
    • H04N13/204Image signal generators using stereoscopic image cameras
    • H04N13/25Image signal generators using stereoscopic image cameras using two or more image sensors with different characteristics other than in their location or field of view, e.g. having different resolutions or colour pickup characteristics; using image signals from one sensor to control the characteristics of another sensor
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N13/20Image signal generators
    • H04N13/204Image signal generators using stereoscopic image cameras
    • H04N13/239Image signal generators using stereoscopic image cameras using two 2D image sensors having a relative position equal to or related to the interocular distance
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N2013/0074Stereoscopic image analysis
    • H04N2013/0081Depth or disparity estimation from stereoscopic image signals

Definitions

  • the present invention relates to a distance measuring device.
  • distance measuring methods and distance measuring devices use multiple cameras such as stereo cameras to measure the distance from a predetermined position to an object or the three-dimensional position of an object with high accuracy.
  • a stereo camera a correlation value is calculated between a reference image block containing an image of an object captured by one camera and a comparison image block containing an image of the same object captured by the other camera, and the correlation value is calculated.
  • the degree of matching between images is determined based on size, and distance information to the subject is calculated using the principle of triangulation using the parallax as the difference in image position on the image pickup device of each camera when matching is determined.
  • it is assumed that the images of the two cameras are the same for determining the matching degree of the images it is necessary that the two cameras have the same characteristics as much as possible.
  • Patent Document 1 describes "a parallax detection device (3) for calculating parallax occurring between a plurality of optical systems, wherein the point image distribution of the plurality of optical systems is a predetermined optical system
  • a PSF equalization unit (5) that corrects at least one of a plurality of images obtained from each of a plurality of optical systems so as to be the same as the point spread distribution of the PSF equalization unit (5).
  • a parallax detection device including a parallax calculation unit (9) that calculates parallax generated between a plurality of optical systems using images.
  • Patent Document 2 "After the first light R1 from the subject is reflected by the upper hyperboloid mirror 102, it is further reflected by the lower hyperboloid mirror 103 (the inner hyperboloid mirror 103A). , and then enters the image sensor 105 via the imaging optical system 104.
  • Second light R2 from the subject which is different from the first light R1 is reflected by the lower hyperboloid mirror 103 (outer bi The light is reflected by the curved mirror 103B) and enters the image sensor 105 via the imaging optical system 104, and the first light R1 and the second light R2 enter different locations on the image sensor 105 from different directions.
  • a stereo camera 101 that can calculate the distance to the subject and the like is disclosed.
  • a distance measuring device if the imaging element size and pixel pitch of the two cameras used for distance measurement using the principle of a stereo camera are different, the pixel pitch (sampling pitch/sampling frequency) of the images of the two cameras ) is different. In addition, when the focal lengths of the lenses of the two cameras are different, the size of the image formed on the sensor itself is also different. rice field.
  • the images on the two image sensors are interpolated so that they have the same sampling pitch.
  • an image pickup device with a coarse pixel pitch which originally requires a small amount of data processing.
  • the size of the parallax image becomes smaller and the image density of the parallax image decreases. The problem arises that you can't.
  • an image with a coarse pixel pitch (low sampling frequency) has only signal components up to half the frequency of the low sampling frequency originally determined by the coarse pixel pitch.
  • An image has signal components with half the frequency of a high sampling frequency determined by a fine pixel pitch.
  • a stereo camera which has an optical system with special projection characteristics using a wide-angle lens with large distortion and a curved mirror
  • geometric correction, resampling, or resampling such as enlargement, reduction, or rotation of the image, is performed. are calculated as lattice points in the new image space by a transformation operation.
  • the luminance values on the image newly generated by resampling are not necessarily on the points obtained by geometrically transforming the original sampling points. obtained by interpolation processing from the extracted points and luminance values on the original sampling points. Since the amount of geometric deformation such as distortion differs depending on the points on the image, the sampling frequency conversion in sampling/resampling is not spatially uniform, but has a distribution on the imaging plane.
  • the block position of the reference image and the block position of the search image are different, so even if the image of the same subject is geometrically corrected, there will be a difference in the signal based on the sampling theorem.
  • parallax performance such as parallax accuracy and parallax ratio is lowered.
  • the distance measuring device detects the image positions of at least two images of the same object on the imaging device by determining the degree of matching between the two images, and measures the distance.
  • the image on the image pickup device is sampled at the pixel pitch of the image pickup device, and geometric correction and resampling processing are performed when determining the degree of matching of the images during image position detection. , corrects the signal degradation of the image that occurs during the resampling process.
  • FIG. 1 is a diagram for explaining the principle of distance measurement in a stereo camera.
  • FIG. 2A is a diagram for explaining a problem when imaging elements with different pixel pitches are used in a stereo camera.
  • FIG. 2B is a diagram for explaining a problem when imaging elements with different pixel pitches are used in a stereo camera.
  • 3A is a diagram illustrating a configuration example of a distance measuring device according to the first embodiment;
  • FIG. 3B is a diagram illustrating an example of an image correction method after resampling according to the first embodiment;
  • FIG. 3C is a diagram illustrating another example of the image correction method after resampling according to the first embodiment;
  • FIG. 4A is a diagram illustrating calculation of the sum of absolute differences (SAD), which is the correlation value for each partial image area.
  • FIG. 4B is a diagram showing transition of SAD when an image block is moved by one pixel.
  • FIG. 4C is a diagram illustrating sub-pixel parallax for conformal line fitting.
  • FIG. 5 is a diagram illustrating a configuration example of a distance measuring device according to the first embodiment;
  • FIG. 6 is a flow diagram showing a distance measurement method according to the first embodiment.
  • FIG. 7 is a diagram showing a configuration example of a distance measuring device when two lenses having different focal lengths are used in a stereo camera according to the second embodiment.
  • FIG. 8 is a diagram showing a configuration example of a distance measuring device according to the second embodiment.
  • FIG. 9 is a diagram for explaining the influence of lens distortion.
  • FIG. 10 is a diagram for explaining the influence of lens distortion.
  • FIG. 11 is a diagram explaining stereo matching in the third embodiment.
  • FIG. 12 is a diagram illustrating a configuration example of a distance measuring device according to the third embodiment.
  • the distance measuring device is a distance measuring device 6 having a stereo camera SC composed of an imaging device 30a and an imaging device 30b with different pixel pitches, as shown in FIG. 3A to be described later. be.
  • FIG. 1 is a diagram illustrating an example of distance calculation to an object 4 by a stereo ranging method when two cameras 2, ie, a camera 2a and a camera 2b are used.
  • a camera 2a and a camera 2b which constitute a stereo camera SC of a distance measuring device (also referred to as a distance measuring device) 6r, are placed side by side with a distance B (base line length) from each other such that the optical axes 3a and 3b are parallel to each other.
  • a distance measuring device also referred to as a distance measuring device 6r
  • Optical axis 3a and optical axis 3b represent optical axis 3 of lens 5a and lens 5b.
  • the subject 4 is imaged on the imaging element 1a at a position separated by a distance La from the optical axis 3a, and is imaged on the imaging element 1b at a position separated by a distance Lb from the optical axis 3b.
  • This parallax L changes depending on the size of the distance D from the cameras 2a and 2b of the distance measuring device 6r to the object 4.
  • FIG. If the focal lengths of the cameras 2a and 2b are both focal lengths f, the distance D to the subject 4 is expressed by the following (Equation 1).
  • the imaging elements 1a and 1b are generally composed of light-receiving elements arranged at points on an equal pitch like a lattice and semiconductor devices such as CCDs (Charge Coupled Devices) or CMOSs (Complementary Metal Oxide Semiconductors). Therefore, the luminance signal of the subject image is sampled at equally spaced discrete points on a two-dimensional plane.
  • CCDs Charge Coupled Devices
  • CMOSs Complementary Metal Oxide Semiconductors
  • FIG. 2A is a diagram showing a state in which the same image is formed on a two-dimensional plane and sampled and resampled when imaging devices with different pixel pitches are used.
  • FIG. 2B is a diagram for explaining the state of FIG. 2A in a one-dimensional manner for the sake of simplicity.
  • a two-dimensional plane 22 shows a state in which an image formed on a two-dimensional plane of the imaging device 10a with a coarse pixel pitch is sampled.
  • a two-dimensional plane 21 shows a state in which an image formed on a two-dimensional plane of the image sensor 10b having a finer pixel pitch than that of the image sensor 10a is sampled. It is assumed that the same image is formed on the two-dimensional plane of the imaging element 10a and the two-dimensional plane of the imaging element 10b.
  • a two-dimensional plane 21r shows a state in which the sampled two-dimensional plane 21 is resampled.
  • a two-dimensional plane 24 shows the resampled state of the sampled two-dimensional plane 22 .
  • FIG. 2B shows a one-dimensional sampling state 26 of the coarse pixel pitch imaging device 10a and a one-dimensional sampling state 25 of the fine pixel pitch imaging device 10b.
  • a resampling state 25r obtained by resampling the sampling state 25 and a resampling state 28 obtained by resampling the sampling state 26 are also shown.
  • resampling state 28 resampling adds interpolation points indicated by black circles.
  • images formed on the surfaces of the imaging elements 10a and 10b by the lenses are indicated by dotted lines as "images on the imaging elements". Although they themselves have continuous light distributions, they are sampled according to the pixel pitch of the imaging elements 10a and 10b. According to the sampling theorem, it is assumed that a sampled signal consists only of frequency components that are less than half the sampling frequency. Maintains a shape close to a normal light distribution. On the other hand, since the image pickup device 10a with a coarse pixel pitch cannot have high frequency components, the signal of the original continuous light distribution shape deteriorates (signal deterioration occurs due to sampling).
  • image blocks are compared using a template matching technique.
  • the pixel pitches of the imaging device 10a and the imaging device 10b are different, it is necessary to convert them to the same pixel pitch by interpolation processing or resampling processing.
  • the reason why the imaging device (10b) with a fine pixel pitch is adopted in the system of the distance measuring device in which the imaging devices (10a, 10b) with different pixel pitches are mixed is that an image with a fine pixel pitch is usually required.
  • the sampling frequency for sampling the sampling frequency of the imaging element (10b) with a fine pixel pitch is often used.
  • the signal itself of the image sensor (10a) with a coarse pixel pitch has only a signal component with a frequency half the sampling frequency determined by the coarse pixel pitch.
  • the resampled image (28) is a degraded image with few frequency components.
  • the resampling process may be performed for all images at once, or may be performed for each selection of a reference image and a search image during stereo matching processing. The latter case requires less storage space.
  • the correlation value of two images is calculated and the match between the two images is determined. Therefore, if the errors due to conversion in resampling processing are different, the correlation value will decrease and the parallax performance will deteriorate.
  • FIGS. 3A, 3B, and 3C are diagram illustrating a configuration example of a distance measuring device according to the first embodiment
  • FIG. 3B is a diagram illustrating an example of an image correction method after resampling according to the first embodiment
  • FIG. 3C is a diagram illustrating another example of the image correction method after resampling according to the first embodiment
  • the distance measuring device 6 shown in FIG. 3A is different from the distance measuring device 6r shown in FIG. 1 in that the distance measuring device 6 employs a stereo camera composed of an imaging element 30a and an imaging element 30b with different pixel pitches. be.
  • Other configurations of the distance measuring device 6 shown in FIG. 3A are the same as other configurations of the distance measuring device 6r of FIG.
  • a camera 2a and a camera 2b which constitute a stereo camera SC of a distance measuring device (also referred to as a distance measuring device) 6, are separated by a distance B (base line length) and their optical axes 3a and 3b are parallel to each other. Attached to be.
  • Light rays emitted from the subject 4 pass through the optical centers of the lens 5a of the camera 2a and the lens 5b of the camera 2b, and form an image on the imaging element 30a of the camera 2a and the imaging element 30b of the camera 2b.
  • Optical axis 3a and optical axis 3b represent optical axis 3 of lens 5a and lens 5b.
  • the subject 4 is imaged on the imaging element 30a at a position separated by a distance La from the optical axis 3a, and is imaged on the imaging element 30b at a position separated by a distance Lb from the optical axis 3b.
  • resampling also referred to as resampling
  • signal degradation due to resampling is known.
  • a correction process is performed to correct the difference between .
  • correction processing is performed to restore the signal drop of the imaging device 30a with a coarse pixel pitch by super-resolution processing.
  • FIG. 3C the image data from the imaging device 30b with a fine pixel pitch is subjected to correction processing such as decimation filter (DEF) processing to cut off high frequency components.
  • DEF decimation filter
  • FIG. 3B shows a one-dimensional sampling state 32 of the coarse pixel pitch imaging device 30a and a one-dimensional sampling state 31 of the fine pixel pitch imaging device 30b. After that, resampling is performed on the sampling state 32 and the sampling state 31 .
  • the sampling frequency for resampling here, the sampling frequency of the imaging element (30b) with a fine pixel pitch is used.
  • a resampled state 33 obtained by resampling the sampled state 32 is shown.
  • a resampled state 31r obtained by resampling the sampled state 31 is shown.
  • the pixel pitch is aligned between the resampling state 33 and the resampling state 31r.
  • the resampling state 33 In the resampling state 33, interpolation points indicated by black circles are added by resampling.
  • the resampling state 31r obtained by resampling the sampling state 31 is basically the same.
  • super-resolution processing is performed on the image data in the resampling state 33.
  • correction processing is performed to restore the image data corresponding to the signal drop of the imaging device 30a with a coarse pixel pitch, and the resampling state 33 is converted to the state 34 of the image data after the super-resolution processing.
  • the error between the resampling state 31r and the state 34 of the image data after super-resolution processing is corrected.
  • FIG. 3C similarly to FIG. 3B, a one-dimensional sampling state 32 of the image sensor 30a with a coarse pixel pitch, a one-dimensional sampling state 31 of the image sensor 30b with a fine pixel pitch, and a sampling state 32 are shown.
  • a resampling state 33 obtained by resampling is shown.
  • a resampled state 31r obtained by resampling the sampled state 31 is shown.
  • the sampling frequency for resampling here, the sampling frequency of the imaging element (30b) with a fine pixel pitch is used.
  • the pixel pitch is aligned between the resampling state 33 and the resampling state 31r.
  • decimation filter (DEF) processing is performed on the image data in the resampling state 31r.
  • correction processing is performed to cut off the high frequency components of the image data from the imaging device 30b with a fine pixel pitch, and the resampling state 31r is the image data after the decimation filter (DEF) processing. Transformed into a correction state 36 .
  • the error between the image data correction state 36 after decimation filter (DEF) processing and the resampling state 33 is corrected.
  • correction processing by super-resolution processing (restore processing for signal reduction) and correction processing by decimation filter processing (blocking processing for high-frequency components) are performed to reduce left and right that occur during resampling. to compensate for the difference in signal degradation between the images (31r and 33).
  • the left and right image blocks compared during stereo matching processing errors in the left and right image blocks due to interpolation by left and right sampling and resampling of the block image portion are corrected, and the parallax L is accurately calculated by stereo matching processing. It is possible to provide the distance measuring device 6 capable of obtaining the distance D to the object 4 with high accuracy.
  • image data after correction processing by super-resolution processing (restore processing for signal reduction) or correction processing by decimation filter processing (blocking processing for high frequency components) (for example, state 31r in FIG. 3B and State 34, and states 36 and 33) of FIG. 3C are referred to as images after resampling or images after resampling processing.
  • correction processing by super-resolution processing (restore processing for signal reduction) and correction processing by decimation filter processing are referred to as resampling processing.
  • the resampling process may be performed for all images at once, or may be performed for each selection of a reference image and a search image during stereo matching processing.
  • stereo matching processing is performed after resampling processing is performed on all screens in advance.
  • FIG. 4A is a diagram illustrating calculation of SAD, which is a correlation value for each partial image area.
  • FIG. 4B is a diagram showing transition of SAD when an image block is moved by one pixel.
  • FIG. 4C is a diagram illustrating sub-pixel parallax for conformal line fitting.
  • the correlation value for each partial image area (block area, template image) for the image after resampling from the image sensor 30a and the image after resampling from the image sensor 30b.
  • SAD Sud of Absolute Difference
  • One block area is, for example, an image area of 8 pixels ⁇ 8 pixels.
  • the distance measuring device 6 uses the calculated correlation value to calculate the displacement of the image on the image at the pixel pitch of the images after resampling of the imaging elements 30a and 30b, that is, the parallax L.
  • the SAD is an example of a correlation value
  • the distance measuring device 6 uses a generally known SSD (Sum of Squared Difference) or NCC (Normalized Cross-Correlation), etc. can also be used as a correlation value.
  • a partial area of the reference image REF is selected from the image after resampling from the imaging device 30a.
  • a partial area of the comparison image CMP is selected from the image after resampling from the imaging element 30b, and a correlation value such as SAD is calculated for each partial image area (REF and CMP).
  • the partial area of the comparison image CMP from the image after resampling from the image sensor 30b is shifted by one pixel pitch of the pixel pitch after resampling, for example, to the right, and again the partial image area after the shift ( A correlation value such as SAD between REF and CMP) is calculated.
  • FIG. 4B shows transition of SAD when the image block is moved by one pixel.
  • the pixel shift amount (shift amount) SG at which the SAD is minimized becomes the parallax (L) in units of one pixel.
  • SG is the shift amount (integer parallax) that minimizes SAD
  • S(0) is the correlation value (SAD) at the shift amount SG that minimizes SAD
  • S( ⁇ 1) and S(1) are the shift amount (shift amount) at which the SAD is minimized.
  • parallax (hereinafter referred to as sub-pixel parallax) cannot be obtained with the accuracy of pixels below the decimal point.
  • a method of estimating sub-pixel level parallax has been proposed as a method for obtaining the distance measurement accuracy (ranging accuracy), that is, the parallax detection resolution, not in units of pixels but with higher accuracy.
  • ranging accuracy the distance measurement accuracy
  • the parallax detection resolution not in units of pixels but with higher accuracy.
  • equiangular straight line fitting the sub-pixel parallax estimation method
  • Linear interpolation estimates the actual disparity at the sub-pixel level.
  • a sub-pixel parallax calculation formula for equiangular straight line fitting that is, an interpolation formula is shown in (Formula 3).
  • is the sub-pixel parallax
  • SG is the shift amount (integer parallax) that minimizes SAD
  • S(0) is the correlation value (SAD) at the shift amount SG that minimizes SAD
  • the adjacent shift amount Let SAD be S(-1) and S(1).
  • FIG. 5 is a diagram showing a configuration example of the distance measuring device according to the first embodiment. Note that the distance measuring device 6 of FIG. 5 performs the correction processing (decimation filter processing) described with reference to FIG. ) will be described.
  • the distance measurement device 6 includes a first camera 2a, a second camera 2b, a first resampling circuit 40a, a second resampling circuit 40b, and a parallax calculation circuit 50.
  • the first camera 2a includes a first optical system including a lens 5a and a first imaging element 30a.
  • the second camera 2b includes a second optical system including a lens 5b and a second imaging device 30b.
  • the pixel pitch of the first imaging device 30a is coarser than the pixel pitch of the second imaging device 30b. In other words, the pixel pitch of the second imaging device 30b is set to be finer than the pixel pitch of the first imaging device 30a.
  • the focal lengths of the first camera 2a and the second camera 2b are, in this example, the same, both having a focal length f.
  • the first resampling circuit 40a is provided for resampling after the image formed on the two-dimensional plane of the imaging device 30a is sampled by the imaging device 30a (see: resampling state 33 in FIG. 3C).
  • the second resampling circuit 40b is provided for resampling after the image formed on the two-dimensional plane of the image sensor 30b is sampled by the image sensor 30b (see resampling state 31r in FIG. 3C).
  • the sampling frequency for resampling the sampling frequency of the imaging element (30b) with a fine pixel pitch is used here.
  • the pixel pitch of the image (33) from the first imaging device 30a and the pixel pitch of the image (31r) from the second imaging device 30b are aligned to be the same pixel pitch.
  • the image from the first imaging element 30a and the image from the second imaging element 30b, which have the same pixel pitch, are referred to as images after resampling.
  • the parallax calculation circuit 50 includes a reference position detection circuit (also referred to as a reference image position detection circuit) 51, a comparison image position detection circuit 52, a comparison image correction circuit 53, and a parallax detection circuit 54.
  • the reference position detection circuit 51 detects or selects a partial area of the reference image REF from the resampled image (31r) from the first imaging element 30a.
  • a comparison image position detection circuit 52 detects or selects a partial area of the comparison image CMP portion from the image (33) after resampling from the image sensor 30b.
  • the comparative image correction circuit 53 calculates a correction amount due to the difference between the position of the reference image REF and the position of the comparative image CMP, and corrects the comparative image CMP.
  • correction processing blocking processing of high frequency components
  • decimation filter processing is performed on the comparison image CMP.
  • the parallax detection circuit 54 detects parallax L from the reference image REF and the corrected comparison image CMP. Thereby, the distance measuring device 6 can calculate the accurate distance D to the subject 4 from the detected parallax L using (Equation 1).
  • the comparison image correction circuit 53 is deleted from FIG. 51 and one input of the parallax detection circuit 54 .
  • the output of the comparison image position detection circuit 52 is connected to the other input of the parallax detection circuit 54 .
  • correction processing by super-resolution processing (restore processing for signal reduction) and correction processing by decimation filter processing (blocking processing for high frequency components) are performed, as shown in FIGS. 3B and 3C. If all images are processed at once, the following can be done.
  • a correction circuit that performs correction processing by super-resolution processing is provided between the first resampling circuit 40 a and the reference position detection circuit 51 .
  • a correction circuit that performs correction processing by decimation filter processing is provided between the second resampling circuit 40b and the comparison image position detection circuit 52.
  • FIG. 6 is a flow diagram showing a distance measurement method according to the first embodiment.
  • Step S1 An image of the subject 4 is acquired using the first imaging element 30a of the first camera 2a. Also, an image of the subject 4 is acquired using the second imaging element 30b of the second camera 2b.
  • the pixel pitch of the first imaging device 30a is coarser than the pixel pitch of the second imaging device 30b.
  • Step S2 A reference image block position is set in the image of the subject 4 acquired using the first imaging element 30a of the first camera 2a.
  • the reference image block position is set by the reference position detection circuit 51, for example.
  • Step S3 In order to align the left and right pixel pitches, resampling is performed using the first resampling circuit 40a and the second resampling circuit 40b. As a result, the pixel pitch of the image (33) from the first imaging device 30a and the pixel pitch of the image (31r) from the second imaging device 30b are aligned to be the same pixel pitch.
  • Step S4 A reference image position and a comparison image position are detected in each image after resampling.
  • the reference position detection circuit 51 detects a partial area of the reference image REF from the resampled image (33) from the first imaging device 30a.
  • the comparison image position detection circuit 52 detects the partial area of the comparison image CMP from the resampled image (31r) from the imaging device 30b.
  • Step S5 The comparison image correction circuit 53 calculates a correction amount due to the difference between the reference image position detected in step S4 and the comparison image position.
  • a correction amount for performing correction processing (blocking processing of high frequency components) by decimation filter processing is calculated for the image (31r) after resampling from the image sensor 30b.
  • Step S6 The comparison image correction circuit 53 performs correction processing by decimation filter processing on the resampled image (31r) from the image sensor 30b with the correction amount calculated in step S5.
  • Step S7 A parallax detection circuit 54 detects a parallax L from the reference image REF and the corrected comparison image CMP.
  • Step S8 The parallax detection circuit 54 determines whether the block position of the reference image REF used in step S7 is the final reference image block position. If the block position of the reference image REF used in step S7 is the final reference image block position (Yes), the flow of the distance measurement method ends. On the other hand, if the block position of the reference image REF used in step S7 is not the final reference image block position (No), the process proceeds to step S2. After that, steps S2 to S7 are repeatedly executed until the block position of the reference image REF reaches the final reference image block position.
  • the pixel pitches of the left and right images can be made uniform by resampling.
  • correction processing by super-resolution processing (restore processing for signal drop) and correction processing by decimation filter processing (blocking processing for high-frequency components) are performed to reduce the left and right that occur during resampling. can be corrected for the difference in signal degradation between the images (31 and 33).
  • a second embodiment (Example 2) of the present invention relates to a distance measuring device using different lenses.
  • FIG. 7 is a diagram showing a configuration example of a distance measuring device when two lenses having different focal lengths are used in a stereo camera according to the second embodiment.
  • FIG. 8 is a diagram showing a configuration example of a distance measuring device according to the second embodiment.
  • FIG. 7 shows a configuration example of a distance measuring device 6a having lenses 70a and 70b with different focal lengths in the two cameras 200a and 200b that make up the stereo camera SC.
  • a stereo camera SC using a camera 200a with a lens 70a with a long focal length fa and a camera 200b with a lens 70b with a short focal length fb is shown.
  • the image size (Sa) of the same subject 4 formed on the image sensor 1a through the lens 70a differs from the image size (Sb) formed on the image sensor 1b through the lens 70b ( Sb ⁇ Sa). These are sampled as image data by the image sensors 1a and 1b having the same pixel pitch.
  • parallax performance such as parallax accuracy and parallax rate by performing correction processing that compensates for differences in image characteristics due to resampling.
  • the distance measuring device 6a has a first camera 200a and a second camera 200b as stereo cameras SC.
  • the first camera 200a includes a first optical system including a lens 70a with a long focal length fa, and an imaging device 1a.
  • the second camera 200b includes a second optical system including a lens 70b with a short focal length fb (fb ⁇ fa), and an imaging device 1b.
  • the size (Sa) of the image formed on the image sensor 1a and the size (Sb) of the image formed on the image sensor 1b are different. Since they are different, the configuration is such that resampling is performed after enlarging or contracting the image so that the image has the same pixel pitch and the same size.
  • the comparison image correction circuit 53a performs correction processing for compensating for differences in image characteristics due to resampling on the comparison image.
  • a third embodiment (Example 3) of the present invention relates to a distance measuring device using a distorted lens.
  • FIG. 9 is a diagram for explaining the influence of lens distortion.
  • FIG. 10 is a diagram for explaining the influence of lens distortion.
  • FIG. 11 is a diagram explaining stereo matching in the third embodiment.
  • FIG. 9 shows a dot pattern DA (indicated by white circles) that should be projected and an actual dot pattern DB (indicated by black circles) when a distorted lens is used.
  • the square lattice shape formed by the actual dot pattern DB has little distortion in the central portion CEN of the image, and the square shape is distorted toward the edge PER of the image.
  • the area of the quadrangle formed by the four grid points is also smaller than the area of the quadrangle at the central portion CEN. That is, there occurs a phenomenon that the image of the same subject 4 formed on the peripheral portion of the imaging device becomes smaller than when the same subject 4 is imaged on the central portion of the imaging device (focused on the central portion of the imaging device). Size of the image of the imaged subject 4>Size of the image of the subject 4 imaged on the peripheral portion of the imaging device).
  • FIG. 10 shows a one-dimensional image of a large distortion image formed on the peripheral portion PER of the image sensor at a field angle away from the optical axis and an image formed on the central portion CEN of the image sensor near the optical axis.
  • This is a schematic representation. It is desirable that the image that should be projected (referred to as the original image) be the same in both the peripheral PER and the central CEN. ) (see state 61). Since the central portion CEN is less affected by lens distortion, the original image and the actual image are formed in substantially the same manner (see state 62).
  • the pixel pitch of the image sensor is constant, so the small image of the peripheral portion PER and the large image of the central portion CEN are sampled at the same sampling frequency. Even for images from the same subject 4, the number of sampling points in the peripheral area PER with large distortion is small (3 points in state 63), and the number of sampling points in the central area CEN with small distortion is large (state 64 Then 7 points).
  • FIG. 11 illustrates, as an example, stereo matching when using a stereo camera including two imaging elements (1a, 1b) as in the first and second embodiments. It should be understood by those skilled in the art that the third embodiment can also be applied to one monocular camera including one imaging element.
  • a distance measuring device using a distorted lens includes a detection circuit for detecting the image position of the reference image block REF and the image position of the comparison image block being searched for, and a link caused by the image position difference.
  • a correction circuit is provided for correcting only the sampling error.
  • FIG. 12 is a diagram illustrating a configuration example of a distance measuring device according to the third embodiment.
  • the distance measuring device 6b includes a camera 300, a viewpoint separation circuit 90, a first viewpoint imaging unit resampling circuit 41c, a second viewpoint imaging unit resampling circuit 41d, and a parallax calculation circuit 50.
  • the parallax calculation circuit 50 includes a reference position detection circuit (reference image position detection circuit) 51, a comparison image position detection circuit 52, a comparison image correction circuit 53b, a parallax detection circuit 54, and a reference image correction circuit 55. including.
  • the camera 300 includes an optical system including a distorted lens 80 and an imaging device 1c. An image formed on the two-dimensional plane of the image sensor 1c through the lens 80 is sampled by the image sensor 1c.
  • the viewpoint separation circuit 90 selects the first viewpoint shooting area and the second viewpoint shooting area in the image sampled by the imaging device 1c.
  • the viewpoint separation circuit 90 supplies the first viewpoint image data corresponding to the first viewpoint shooting area to the resampling circuit 41c for the first viewpoint shooting area portion.
  • the viewpoint separation circuit 90 also supplies the first-viewpoint image data corresponding to the second-viewpoint shooting area to the second-viewpoint shooting area resampling circuit 41d.
  • the resampling circuit 41c for the first-viewpoint image data detects the position of the first-viewpoint image data on the imaging device 1c, and resamples the first-viewpoint image data based on the detected position. In order to correct the distortion of the lens 80, the resampling circuit 41c performs geometrical processing such as enlargement/reduction/rotation based on the position of the first viewpoint image data on the imaging device 1c during the resampling process. Transformation and interpolation processing are performed.
  • the resampling circuit 41d for the second-viewpoint image data detects the position of the second-viewpoint image data on the imaging device 1c, and resamples the second-viewpoint image data based on the detected position.
  • the resampling circuit 41d performs geometrical processing such as enlargement/reduction/rotation based on the position of the second viewpoint image data on the imaging device 1c during the resampling process. Transformation and interpolation processing are performed.
  • the resampled first viewpoint image data and the resampled second viewpoint image data have the same pixel pitch.
  • the resampled first viewpoint image data is supplied to the reference position detection circuit 51
  • the resampled second viewpoint image data is supplied to the comparison position detection circuit 52 .
  • the reference position detection circuit 51 detects or selects a partial area of the reference image REF from the resampled first viewpoint image data.
  • the comparison image position detection circuit 52 detects or selects a partial area of the comparison image CMP from the resampled second viewpoint image data.
  • the reference image correction circuit 55 calculates a correction amount due to the position of the reference image REF on the resampled first viewpoint image data, and corrects the reference image REF. That is, the reference image correction circuit 55 performs correction processing for correcting signal degradation of the image of the first viewpoint image data caused by the resampling processing.
  • the comparative image correction circuit 53b calculates a correction amount due to the position of the comparative image CMP on the second viewpoint image data after resampling, and corrects the comparative image CMP. That is, the comparison image correction circuit 53b performs correction processing for correcting signal degradation of the image of the second viewpoint image data caused by the resampling processing.
  • the parallax detection circuit 54 detects the parallax L from the reference image REF corrected by the reference image correction circuit 55 and the comparison image CMP corrected by the comparison image correction circuit 53b. As a result, the distance measuring device 6b using the distorted lens 80 can calculate the accurate distance D to the object 4 from the detected parallax L using (Equation 1).
  • the reference image correction circuit 55 can be deleted.
  • the comparison image correction circuit 53b provides a correction amount due to the difference between the position of the reference image REF on the resampled first viewpoint image data and the position of the comparison image CMP on the resampled second viewpoint image data. is calculated, and correction processing for correcting the comparison image CMP is performed.
  • the parallax detection circuit 54 detects a parallax L from the reference image REF and the comparison image CMP corrected by the comparison image correction circuit 53b.
  • the distance measuring device 6b using the distorted lens 80 can calculate the accurate distance D to the subject 4 from the detected parallax L using (Equation 1).
  • Two images (a reference image REF and a comparison image CMP) for determining the matching degree of the images are on two imaging elements (30a, 30b) having different pixel pitches.
  • Two images (a reference image REF and a comparison image CMP) for determining the matching degree of the images are formed by an optical system including lenses (70a and 70b) having different focal lengths.
  • the distance measuring device of the present invention performs the same geometrical correction as the same object (subject 4) has the same image size during or before the corresponding point search of the stereo camera.
  • a resampling processing unit is provided so that comparison can be made by pixel pitch, and the resampling processing unit performs resampling processing and correction processing for correcting the difference in signal deterioration due to resampling of the reference image and the search image.
  • image data on the image sensor necessary for matching degree evaluation is extracted for at least one of the reference image and the search image, and geometric correction is performed. Then, a resampling process is performed to correct the difference in signal degradation due to the resampling of the images of the reference image and the search image.
  • the respective positions of the two images of the reference image and the search image are detected on the imaging device, and the images generated by the geometric correction and resampling processing at the two image positions are detected. to compensate for signal degradation.
  • the distance measuring device of the present invention for image blocks after geometric correction used in stereo matching, data on the sensor before geometric correction is extracted, and geometric interpolation processing is performed so that block images with the same image size and pixel pitch on the left and right sides are obtained. After that, the difference in the original sampling frequency is corrected and the matching is evaluated. In addition, the pixel position of the reference block and the pixel position of the search block are detected, and the difference in sampling due to the difference in position on the two images for stereo matching is corrected.
  • 1a, 1b, 1c, 30a, 30b image sensor, 2a, 2b, 200a, 200b, 300: camera, 3a, 3b: optical axis, 4: subject, 5a, 5b, 70a, 70b, 80: lens, 6, 6a, 6b: distance measuring device, 40a, 40b, 41a, 41b: resampling circuit, 40c: first viewpoint imaging unit resampling circuit, 40d: second viewpoint imaging unit resampling circuit, 50: parallax calculation circuit, 51: Reference position detection circuit 52: comparison image position detection circuit 53, 53a: comparison image correction circuit 54: parallax detection circuit 55: reference image correction circuit 90: viewpoint separation circuit

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Electromagnetism (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Theoretical Computer Science (AREA)
  • Measurement Of Optical Distance (AREA)

Abstract

画素ピッチの異なる撮像素子、焦点距離の異なるレンズ、または、歪のあるレンズを用いた場合でも、高精度に視差検出を行うことが可能な距離測定装置を提供することにある。一実施の形態による距離測定装置は、撮像素子の上に撮像され、同一物体の少なくとも二つの像の撮像素子の上の像位置を二つの像の一致度判定によって検出し、測距を行う距離測定装置であって、撮像素子の上の像は撮像素子の画素ピッチでサンプリングされ、像位置検出時における像の一致度判定を実施する際に幾何学的な補正と、再サンプリング処理が実施され、再サンプリング処理時に発生する像の信号劣化を補正する。

Description

距離測定装置
 本発明は距離測定装置に関する。
 従来、ステレオカメラなどの複数のカメラを用い、所定の位置から被写体までの距離、もしくは被写体の三次元位置を高精度に測定する距離測定方法及び距離測定装置が知られている。ステレオカメラでは、一方のカメラにより撮像された被写体の像を含む基準画像ブロックと、もう一方のカメラにより撮像された同一の被写体の像を含む比較画像ブロックとの相関値を算出し、相関値の大きさで像の一致度を判定し、一致と判定したときのそれぞれのカメラにおける撮像素子上の画像位置の差を視差として、三角測量の原理を用いて被写体までの距離情報を算出する。このとき像の一致度判定には、二つのカメラの像は同じものであることを前提としているため、2つのカメラはできるだけ同一の特性のものである必要がある。
 国際公開第2011/010438号(特許文献1)には、「複数の光学系間に生じる視差を算出する視差検出装置(3)であって、複数の光学系の点像分布が所定の光学系の点像分布と同一となるように、複数の光学系のそれぞれから得られる複数の画像の少なくとも1つを補正するPSF同一化部(5)と、PSF同一化部(5)によって補正された画像を用いて、複数の光学系間に生じる視差を算出する視差算出部(9)とを備える視差検出装置」が開示されている。
 近年、車載カメラでは、認識対象が広画角範囲かつ広い距離範囲に拡大し、より広範囲で安全を確保するために、歪の大きな広角レンズカメラを利用するケースが増え、またカメラの数も増加する傾向にある。
 そのため、連携するカメラ数を最小に抑えるために、広角高歪レンズや画素ピッチの異なるセンサでのステレオカメラ(多視点化)の検討が重要となる。
 また光学系を駆使し、レンズやミラーの射影方式を利用し、広画角範囲かつ広距離範囲の要求に応える技術も開発されている。特開2021-012075号公報(特許文献2)には、「被写体からの第1の光R1が、上側双曲面ミラー102で反射した後、更に下側双曲面ミラー103(内側双曲面ミラー103A)で反射し、その後結像光学系104を介してイメージセンサ105に入射され、また、被写体からの、第1の光R1とは異なる第2の光R2が、下側双曲面ミラー103(外側双曲面ミラー103B)で反射され、結像光学系104を介してイメージセンサ105に入射され、第1の光R1、第2の光R2が、異なる方向からイメージセンサ105上の異なる箇所に入射されることで、被写体までの距離等が演算可能となるステレオカメラ101」が開示されている。
国際公開第2011/010438号 特開2021-012075号公報
 距離測定装置において、ステレオカメラの原理を用いた測距に使用する二台のカメラの撮像素子サイズ、撮像素子の画素ピッチなどが異なる場合、二つのカメラの画像の画素ピッチ(サンプリングピッチ・サンプリング周波数)が異なるという問題がある。また、二台のカメラのレンズの焦点距離の異なる場合、センサ上に結像する像の大きさ自体が異なり、これもサンプリングピッチの異なる画像を比較して視差を求めなければならないという問題があった。
 このとき、二つの撮像素子上の画像を一旦同じサンプリングピッチの画像になるように補間処理するが、粗い画素ピッチの画像を細かい画素ピッチの画像に変換する際には、元の画像サイズが増大し、本来データ処理量が小さくて済む粗い画素ピッチの撮像素子を使う意味がなくなる。また細かい画素ピッチの画像を粗い画素ピッチの画像に変換する際には、視差画像サイズが小さくなり、視差画像の画像密度が低下するだけでなく、他の認識処理で必要な高解像度画像が使用できなくなるという問題が生じる。
 また、粗い画素ピッチ(低いサンプリング周波数)の画像は、サンプリング定理から、元々粗い画素ピッチで決まる低いサンプリング周波数の半分の周波数までの信号成分しか持たず、一方、細かい画素ピッチ(高いサンプリング周波数)の画像は、細かい画素ピッチで決まる高いサンプリング周波数の半分の周波数の信号成分まで持っており、補間処理によって同じ画素ピッチに変換されても、全く同じ画像にはならないという問題があった。
 さらに、歪の大きな広角レンズや曲面ミラーなどを用いた特殊な射影特性を持つ光学系からなるステレオカメラでは、幾何補正またはリサンプリング、再サンプリングと呼ばれる像の拡大・縮小・回転などの幾何学的な変換操作により、新しい画像空間上の格子点として計算される。
 リサンプリングにより新しく生成した画像上の輝度値は、新しく生成した画像空間の格子点が、元のサンプリング点を幾何学的な変換した点上にあるとは限らず、元のサンプリング点の幾何変換された点と元のサンプリング点上の輝度値とから補間処理によって求められる。歪などの幾何変形量は、画像上の点によって異なっているため、サンプリング・リサンプリングにおけるサンプリング周波数変換は空間上一様ではなく、撮像面上に分布を持つことになる。
 ステレオカメラにおいて、基準画像のブロック位置と探索画像のブロック位置は異なるため、幾何学的な補正は行われているものの、同じ被写体の像であっても、サンプリング定理に基づく信号の違いが生じ、視差精度や視差率などの視差性能を低下させるという問題があった。
 本発明の目的は、上記に鑑みてなされたものであって、画素ピッチの異なる撮像素子、焦点距離の異なるレンズ、または、歪のあるレンズを用いた場合でも、高精度に視差検出を行うことが可能な距離測定装置を提供することにある。
 本発明の前記ならびにその他の目的と新規な特徴については、本明細書の記述および添付図面から明らかになるであろう。
 本発明のうち代表的なものの概要を簡単に説明すれば下記の通りである。
 一実施の形態による距離測定装置は、撮像素子の上に撮像され、同一物体の少なくとも二つの像の撮像素子の上の像位置を二つの像の一致度判定によって検出し、測距を行う距離測定装置であって、撮像素子の上の像は撮像素子の画素ピッチでサンプリングされ、像位置検出時における像の一致度判定を実施する際に幾何学的な補正と、再サンプリング処理が実施され、再サンプリング処理時に発生する像の信号劣化を補正する。
 上記した以外の課題、構成および効果は、以下の発明を実施するための形態の説明により明らかにされる。
 本発明によれば、高精度に視差検出を行うことが可能な距離測定装置を提供できる。
図1は、ステレオカメラにおける距離計測原理を説明するための図である。 図2Aは、相異なる画素ピッチの撮像素子をステレオカメラに用いたときの課題を説明する図である。 図2Bは、相異なる画素ピッチの撮像素子をステレオカメラに用いたときの課題を説明する図である。 図3Aは、実施例1における距離測定装置の構成例を示す図である。 図3Bは、実施例1におけるリサンプリング後の画像補正方法の一例を示す図である。 図3Cは、実施例1におけるリサンプリング後の画像補正方法の他の例を示す図である。 図4Aは、部分画像領域毎の相関値である差分絶対値総和(SAD)の算出を説明する図である。 図4Bは、画像ブロックを1画素ずつ移動させたときのSADの推移を示す図である。 図4Cは、等角直線フィッティングのサブピクセル視差を説明する図である。 図5は、実施例1に係る距離測定装置の構成例を示す図である。 図6は、実施例1に係る距離測定方法を示すフロー図である。 図7は、実施例2における焦点距離の相異なる2つレンズをステレオカメラに用いた場合の距離測定装置の構成例を示す図である。 図8は、実施例2における距離測定装置の構成例を示す図である。 図9は、レンズの歪による影響を説明するための図である。 図10は、レンズの歪による影響を説明するための図である。 図11は、実施例3におけるステレオマッチングを説明する図である。 図12は、実施例3における距離測定装置の構成例を示す図である。
 以下、図面を参照して本発明の実施の形態を説明する。実施の形態または実施例は、本発明を説明するための例示であって、説明の明確化のため、適宜、省略および簡略化がなされている。本発明は、他の種々の形態でも実施することが可能である。特に限定しない限り、各構成要素は単数でも複数でも構わない。
 図面において示す各構成要素の位置、大きさ、形状、範囲などは、発明の理解を容易にするため、実際の位置、大きさ、形状、範囲などを表していない場合がある。このため、本発明は、必ずしも、図面に開示された位置、大きさ、形状、範囲などに限定されない。
 同一あるいは同様の機能を有する構成要素が複数ある場合には、同一の符号に異なる添字を付して説明する場合がある。また、これらの複数の構成要素を区別する必要がない場合には、添字を省略して説明する場合がある。
 実施の形態を説明するための全図において、同一の構成要素や同一の部材には原則として同一の符号を付し、その繰り返しの説明は省略することがある。図面は説明をより明確にするため、実際の態様に比べ、模式的に表される場合があるが、あくまで一例であって、本発明の解釈を限定するものではない。
 本発明の第一の実施形態に係る距離測定装置は、後述する図3Aに示すように、画素ピッチの異なる撮像素子30aと撮像素子30bとで構成されたステレオカメラSCを有する距離測定装置6である。
 まず、図1を用いて、ステレオ測距方式による被写体までの距離算出の例を説明する。図1は、カメラ2a及びカメラ2bの2つのカメラ2を用いた場合の、ステレオ測距方式による被写体4までの距離算出の例を説明する図である。距離測定装置(測距装置とも言う)6rのステレオカメラSCを構成するカメラ2aとカメラ2bとは、互いに距離B(基線長)隔てて、光軸3a、3bが平行になるように併設されている。
 被写体4から出た光線は、カメラ2aのレンズ5aとカメラ2bのレンズ5bの光学中心を通り、カメラ2aの撮像素子1aとカメラ2bの撮像素子1bの上に結像する。光軸3aと光軸3bはレンズ5aとレンズ5bの光軸3を表す。このとき、被写体4は、撮像素子1a上を光軸3aから、距離La離れた位置に結像し、また、撮像素子1b上を光軸3bから、距離Lb離れた位置に結像し、カメラ2aとカメラ2bとの間に視差L(=La-Lb)が生じる。この視差Lは距離測定装置6rのカメラ2a、2bから被写体4までの距離Dの大きさによって変化する。カメラ2a及びカメラ2bの焦点距離がともに焦点距離fとすれば、被写体4までの距離Dは以下の(式1)で表わされる。
 D=f(B/L)     (式1)
 撮像素子1a、1bは通常、格子状に等しいピッチ上の点に配列された受光素子とCCD(Charge Coupled Device)あるいはCMOS(Complementary Metal Oxide Semiconductor)などの半導体デバイスにより構成される。したがって、被写体像の輝度信号は、2次元平面上で等間隔に離散化された点でサンプリングされる。
 次に、図2A、図2Bを用いて、相異なる画素ピッチの撮像素子をステレオカメラに用いたときの課題を説明する。図2A、図2Bにおいて、相異なる画素ピッチの撮像素子として、粗い画素ピッチの撮像素子10aと、撮像素子10aと比較して細かい画素ピッチの撮像素子10bを用いた場合について説明する。図2Aは相異なる画素ピッチの撮像素子を用いた場合の2次元平面上に同じ像が結像し、それらがサンプリングおよびリサンプリングされた状態を示す図である。図2Bは、図2Aの状態を、簡単のために、1次元化して示して説明する図である。
 図2Aにおいて、2次元平面22は粗い画素ピッチの撮像素子10aの2次元平面上に結像した像がサンプリングされた状態を示す。2次元平面21は撮像素子10aと比較して細かい画素ピッチの撮像素子10bの2次元平面上に結像した像がサンプリングされた状態を示す。撮像素子10aの2次元平面上と撮像素子10bの2次元平面上には、同じ像が結像しているものとする。2次元平面21rは、サンプリングした2次元平面21がリサンプリングされた状態を示す。2次元平面24は、サンプリングした2次元平面22がリサンプリングされた状態を示す。リサンプリングにより、2次元平面22の粗い画素ピッチが2次元平面21r(21)の細かい画素ピッチと一致するように変換されて、細かい画素ピッチの2次元平面24が構成される。
 図2Bには、粗い画素ピッチの撮像素子10aの1次元化されたサンプリング状態26と、細かい画素ピッチの撮像素子10bの1次元化されたサンプリング状態25とが示される。また、サンプリング状態25をリサンプリングして得られたリサンプリング状態25rと、サンプリング状態26をリサンプリングして得られたリサンプリング状態28とが示される。リサンプリング状態28では、リサンプリングにより黒丸で示す補間点が追加される。
 図2Bのサンプリング状態25、26において、「撮像素子上の像」として点線で示すように、レンズ(例えば、図1のレンズ5a、5b)によって撮像素子10a、10bの表面上に結像した像自体は連続的な光分布を持つが、これらが撮像素子10a、10bの画素ピッチに応じてサンプリングされる。サンプリング定理によるとサンプリングされた信号は、サンプリング周波数の半分以下の周波数成分だけから構成されることを前提とするので、細かい画素ピッチの撮像素子10bはより高い空間周波数成分を持ち、元の連続的な光分布に近い形状を維持する。一方、粗い画素ピッチの撮像素子10aは高い周波数成分を持つことができないので、元の連続的な光分布形状の信号から劣化してしまう(サンプリングにより信号劣化が発生する)。
 ステレオマッチングでは、テンプレートマッチングの技法を使って、画像ブロック同士の比較を行う。しかしながら、撮像素子10aと撮像素子10bとの画素ピッチが異なるため、補間処理またはリサンプリング処理により、同じ画素ピッチになるように変換する必要がある。異種の画素ピッチの撮像素子(10a、10b)が混在する距離測定装置のシステムにおいて、細かい画素ピッチの撮像素子(10b)を採用する理由は、たいてい細かい画素ピッチの画像が必要であるので、リサンプリングのサンプリング周波数は、画素ピッチの細かい撮像素子(10b)のサンプリング周波数が用いられることが多い。ところが、上述したように、画素ピッチの粗い撮像素子(10a)の信号自体は、粗い画素ピッチで決まるサンプリング周波数の半分の周波数の信号成分しか有しないので、画素ピッチの粗い撮像素子(10a)のリサンプリング後の画像(28)は、周波数成分が少ない劣化した画像になる。
 ここで、リサンプリング処理は、全画像を一括で行っても良いし、ステレオマッチング処理時に基準画像の選択と、探索画像の選択毎に実施しても良い。後者の場合の方が、必要とする記憶領域は少なくて済む。
 テンプレートマッチングでは、二つの画像の相関値を計算し、二つの画像の一致判定を行うので、リサンプリング処理の変換による誤差が異なる場合は、相関値が低下し、視差性能が劣化する。
 次に、図3A、図3B、図3Cを用いて、実施例1におけるリサンプリング後の画像補正方法を説明する。図3Aは、実施例1における距離測定装置の構成例を示す図である。図3Bは、実施例1におけるリサンプリング後の画像補正方法の一例を示す図である。図3Cは、実施例1におけるリサンプリング後の画像補正方法の他の例を示す図である。
 図3Aに示す距離測定装置6が図1の距離測定装置6rと異なる点は、距離測定装置6では、画素ピッチの異なる撮像素子30aと撮像素子30bとで構成されたステレオカメラを採用した点である。図3Aに示す距離測定装置6の他の構成は、図1の距離測定装置6rの他の構成と同じである。
 図3Aに示すように、距離測定装置(測距装置とも言う)6のステレオカメラSCを構成するカメラ2aとカメラ2bとは、互いに距離B(基線長)隔てて、光軸3a、3bが平行になるように併設されている。被写体4から出た光線は、カメラ2aのレンズ5aとカメラ2bのレンズ5bの光学中心を通り、カメラ2aの撮像素子30aとカメラ2bの撮像素子30bの上に結像する。光軸3aと光軸3bはレンズ5aとレンズ5bの光軸3を表す。このとき、被写体4は、撮像素子30a上を光軸3aから、距離La離れた位置に結像し、また、撮像素子30b上を光軸3bから、距離Lb離れた位置に結像し、カメラ2aとカメラ2bとの間に視差L(=La-Lb)が生じる。この視差Lは距離測定装置6のカメラ2a、2bから被写体4までの距離Dの大きさによって変化する。カメラ2a及びカメラ2bの焦点距離がともに焦点距離fとすれば、被写体4までの距離Dは先に説明した(式1)で表わされる。
 図2A、図2Bで説明したリサンプリング(再サンプリングとも言う)において、リサンプリングにより画像信号のどの周波数以上の成分が劣化しているのかが既知なので、本実施例では、リサンプリングに伴う信号劣化の差を補正する補正処理を実施する。図3Bに示す例では、超解像処理により画素ピッチの粗い撮像素子30aの信号低下分を復元する補正処理を実施する。また、図3Cに示す例では、画素ピッチの細かい撮像素子30bからの画像データをデシメーションフィルタ(DEF)処理などの高域周波数成分を遮断するような補正処理を実施する。
 図3Bには、粗い画素ピッチの撮像素子30aの1次元化されたサンプリング状態32と、細かい画素ピッチの撮像素子30bの1次元化されたサンプリング状態31とが示される。その後、サンプリング状態32とサンプリング状態31とに対して、リサンプリングを行う。リサンプリングのサンプリング周波数は、ここでは、画素ピッチの細かい撮像素子(30b)のサンプリング周波数が用いられるものとする。サンプリング状態32をリサンプリングして得られたリサンプリング状態33が示される。サンプリング状態31をリサンプリングして得られたリサンプリング状態31rが示される。これにより、リサンプリング状態33とリサンプリング状態31rとで、画素ピッチが揃えられる。
 リサンプリング状態33では、リサンプリングにより黒丸で示す補間点が追加される。一方、サンプリング状態31をリサンプリングして得られたリサンプリング状態31rは、基本的に同じである。
 その後、リサンプリング状態33の画像データに対して超解像処理を実施する。超解像処理では、画素ピッチの粗い撮像素子30aの信号低下分の画像データを復元する補正処理が実施され、リサンプリング状態33が超解像処理後の画像データの状態34へ変換される。これにより、リサンプリング状態31rと超解像処理後の画像データの状態34と間の誤差分が補正されることになる。
 図3Cでは、図3Bと同様に、粗い画素ピッチの撮像素子30aの1次元化されたサンプリング状態32と、細かい画素ピッチの撮像素子30bの1次元化されたサンプリング状態31と、サンプリング状態32をリサンプリングして得られたリサンプリング状態33が示される。サンプリング状態31をリサンプリングして得られたリサンプリング状態31rが示される。リサンプリングのサンプリング周波数は、ここでは、画素ピッチの細かい撮像素子(30b)のサンプリング周波数が用いられるものとする。これにより、リサンプリング状態33とリサンプリング状態31rとで、画素ピッチが揃えられる。
 リサンプリングの後、リサンプリング状態31rの画像データに対してデシメーションフィルタ(DEF)処理を実施する。デシメーションフィルタ(DEF)処理では、画素ピッチの細かい撮像素子30bからの画像データの高域周波数成分を遮断するような補正処理が実施され、リサンプリング状態31rがデシメーションフィルタ(DEF)処理後の画像データ補正状態36へ変換される。これにより、デシメーションフィルタ(DEF)処理後の画像データ補正状態36とリサンプリング状態33との間の誤差分が補正されることになる。
 つまり、リサンプリングの後に、超解像処理による補正処理(信号低下分の復元処理)やデシメーションフィルタ処理による補正処理(高域周波数成分の遮断処理)を実施することで、リサンプリング時に発生する左右の像間(31rと33)の信号劣化の差を補正する。これにより、ステレオマッチング処理時に比較する左右の画像ブロックに対し、ブロック画像部分の左右サンプリングおよびリサンプリングによる補間に起因する左右の画像ブロックの誤差を補正し、ステレオマッチング処理により正確に視差Lを算出でき、高精度に被写体4までの距離Dを得ることができる距離測定装置6を提供できる。
 超解像処理による補正処理(信号低下分の復元処理)やデシメーションフィルタ処理による補正処理(高域周波数成分の遮断処理)の後、図3Aで説明したように、距離測定装置6において視差Lの算出処理が行われる。
 以下の説明において、超解像処理による補正処理(信号低下分の復元処理)やデシメーションフィルタ処理による補正処理(高域周波数成分の遮断処理)の後の画像データ(たとえば、図3Bの状態31rと状態34、図3Cの状態36と状態33)をリサンプリング後の画像、または、リサンプリング処理後の画像と言うこととする。また、超解像処理による補正処理(信号低下分の復元処理)やデシメーションフィルタ処理による補正処理(高域周波数成分の遮断処理)を、リサンプリング処理と言うこととする。
 前述したように、リサンプリング処理は、全画像を一括で行っても良いし、ステレオマッチング処理時に基準画像の選択と、探索画像の選択毎に実施しても良い。以下では、代表例として、予め全画面一括でリサンプリング処理を実施した後に、ステレオマッチング処理を実施する一例で説明する。
 図4A、図4B、図4Cを用いて本実施例のステレオマッチング処理について説明する。図4Aは、部分画像領域毎の相関値であるSADの算出を説明する図である。図4Bは、画像ブロックを1画素ずつ移動させたときのSADの推移を示す図である。図4Cは、等角直線フィッティングのサブピクセル視差を説明する図である。
 図4Aに示すように、撮像素子30aからのリサンプリング後の画像と、撮像素子30bからのリサンプリング後の画像に対し、それぞれの部分画像領域(ブロック領域、テンプレート画像)毎の相関値であるSAD(Sum of Absolute Difference:差分絶対値総和)を算出する。SADは、式2で示す。1つのブロック領域は、例えば、8ピクセル×8ピクセルの画像領域とされている。
 そして、距離測定装置6は、算出した相関値を用いて、撮像素子30aおよび撮像素子30bのリサンプリング後の画像の画素ピッチでの画像上の画像のずれ、つまり、視差Lを算出する。なお、SADは相関値の一例であり、距離測定装置6は、一般的に知られているSSD(Sum of Squared Difference:差分2乗総和)又はNCC(Normalized Cross-Correlation:正規化相互相関)なども相関値として利用可能である。
 まず、撮像素子30aからのリサンプリング後の画像から基準画像REFの部分領域を選出する。次に、撮像素子30bからのリサンプリング後の画像から比較画像CMPの部分領域を選出し、部分画像領域(REFとCMP)ごとにSADなどの相関値を算出する。次に、撮像素子30bからのリサンプリング後の画像から比較画像CMPの部分領域をリサンプリング後の画素ピッチの1画素ピッチ分だけ、例えば、右側へシフトし、再びそのシフト後における部分画像領域(REFとCMP)のSADなどの相関値を算出する。図4Bに、画像ブロックを1画素ずつ移動させたときのSADの推移を示す。SADが最小となった画素シフト量(ずらし量)SGが1画素単位の視差(L)となる。ここで、SGはSADが最小となるずらし量(整数視差)、S(0)はSADが最小になるずらし量SGでの相関値(SAD)、その隣接するずらし量でのSADをS(-1)、S(1)とする。
 図4A、図4Bの場合、視差(L)の検出精度は1画素となるため、小数点以下の画素の精度で視差(以降、サブピクセル視差と呼ぶ)は求められないことになる。
 距離測定精度(測距精度)つまり視差検出分解能を1画素単位でなく、更に、高精度に求めるための方法として、サブピクセルレベル視差を推定する方法が提案されている。例えば、等角直線フィッティングというサブピクセル視差推定方法では、図4Cに示すように、実際視差を基準にSADの推移が左右での傾きの絶対値が同じであることを仮定することによって、1次線形補間により実際視差がサブピクセルレベルで推定される。等角直線フィッティングのサブピクセル視差算出式、つまり補間式を(式3)に示す。ここで、δはサブピクセル視差、SGはSADが最小となるずらし量(整数視差)、S(0)はSADが最小になるずらし量SGでの相関値(SAD)、その隣接するずらし量でのSADをS(-1)、S(1)とする。
 (式3)により算出された視差に画素ピッチサイズをかけることで、(式1)の視差Lが求められ、被写体4までの距離Dが算出される。
 図5を用いて、距離測定装置6の構成例を説明する。図5は、実施例1に係る距離測定装置の構成例を示す図である。なお、図5の距離測定装置6は、図3Cで説明した補正処理(デシメーションフィルタ処理)を、ステレオマッチング処理時に基準画像の選択と探索画像(比較画像)の選択毎に、探索画像(比較画像)に対して実施される例を説明する。
 距離測定装置6は、第一カメラ2aと、第二カメラ2bと、第一リサンプリング回路40aと、第二リサンプリング回路40bと、視差算出回路50と、を含む。
 第一カメラ2aは、レンズ5aを含む第一光学系と、第一撮像素子30aと、を含む。第二カメラ2bは、レンズ5bを含む第二光学系と、第二撮像素子30bと、を含む。第一撮像素子30aの画素ピッチは、第二撮像素子30bの画素ピッチと比較して、粗い画素ピッチとされている。つまり、第二撮像素子30bの画素ピッチは、第一撮像素子30aの画素ピッチと比較して、細かい画素ピッチとされている。第一カメラ2a及び第二カメラ2bの焦点距離は、この例では、同じであり、ともに焦点距離fである。
 第一リサンプリング回路40aは、撮像素子30aの2次元平面上に結像した像を撮像素子30aによりサンプリングした後にリサンプリングするために設けられる(参照:図3Cのリサンプリング状態33)。第二リサンプリング回路40bは、撮像素子30bの2次元平面上に結像した像を撮像素子30bによりサンプリングした後にリサンプリングするために設けられる(参照:図3Cのリサンプリング状態31r)。リサンプリングのサンプリング周波数は、ここでは、画素ピッチの細かい撮像素子(30b)のサンプリング周波数が用いられる。これにより、第一撮像素子30aからの画像(33)の画素ピッチと第二撮像素子30bからの画像(31r)の画素ピッチとが同一の画素ピッチとなるように揃えられる。ここでは、同一の画素ピッチとされた第一撮像素子30aからの画像と第二撮像素子30bからの画像を、リサンプリング後の画像と言うことにする。
 視差算出回路50は、参照位置検出回路(基準画像位置検出回路とも言う)51と、比較画像位置検出回路52と、比較画像補正回路53と、視差検出回路54と、を含む。同一の画素ピッチとされた第一撮像素子30aからの画像(33)と第二撮像素子30bからの画像(31r)のそれぞれは、参照位置検出回路51と比較画像位置検出回路52とに入力される。参照位置検出回路51は、第一撮像素子30aからのリサンプリング後の画像(31r)から基準画像REFの部分領域を検出または選出する。比較画像位置検出回路52は撮像素子30bからのリサンプリング後の画像(33)から比較画像CMP部の分領域を検出または選出する。
 比較画像補正回路53は、参照画像REFの位置と比較画像CMPの位置の差に起因する補正量を算出し、比較画像CMPを補正する。ここでは、比較画像CMPに対して、デシメーションフィルタ処理による補正処理(高域周波数成分の遮断処理)を実施する。
 視差検出回路54は、参照画像REFと補正された比較画像CMPとから視差Lを検出する。これにより、距離測定装置6は、検出された視差Lから(式1)を用いて、被写体4までの正確な距離Dを算出することができる。
 なお、図3Bの超解像処理による補正処理(信号低下分の復元処理)を実施する場合は、比較画像補正回路53が図5から削除され、代わりに、参照画像補正回路が参照位置検出回路51の出力と視差検出回路54の一方の入力との間に設けられる。そして、この場合、比較画像位置検出回路52の出力が視差検出回路54の他方の入力に接続される。
 ステレオマッチング処理の前に、超解像処理による補正処理(信号低下分の復元処理)やデシメーションフィルタ処理による補正処理(高域周波数成分の遮断処理)を、図3B、図3Cで示すように、全画像を一括で行う場合は、次のようにすることができる。
 図3Bの場合、超解像処理による補正処理を行う補正回路が、第一リサンプリング回路40aと参照位置検出回路51との間に設けられる。
 図3Cの場合、デシメーションフィルタ処理による補正処理を行う補正回路が、第二リサンプリング回路40bと比較画像位置検出回路52と間に設けられる。
 図6を用いて、図5の距離測定装置6の距離測定方法の一例を説明する。図6は、実施例1に係る距離測定方法を示すフロー図である。
 ステップS1:
 第一カメラ2aの第一撮像素子30aを用いて被写体4の画像を取得する。また、第二カメラ2bの第二撮像素子30bを用いて被写体4の画像を取得する。第一撮像素子30aの画素ピッチは、第二撮像素子30bの画素ピッチと比較して、粗い画素ピッチとされている。
 ステップS2:
 第一カメラ2aの第一撮像素子30aを用いて取得した被写体4の画像において、参照画像ブロック位置を設定する。参照画像ブロック位置は、例えば、参照位置検出回路51により設定される。
 ステップS3:
 左右画素ピッチを揃えるために、第一リサンプリング回路40aおよび第二リサンプリング回路40bを用いて、リサンプリングを実施する。これにより、第一撮像素子30aからの画像(33)の画素ピッチと第二撮像素子30bからの画像(31r)の画素ピッチとが同一の画素ピッチとなるように揃えられる。
 ステップS4:
 リサンプリング後の各画像において、参照画像位置と比較画像位置とを検出する。参照位置検出回路51は、第一撮像素子30aからのリサンプリング後の画像(33)から基準画像REFの部分領域を検出する。比較画像位置検出回路52は撮像素子30bからのリサンプリング後の画像(31r)から比較画像CMPの部分領域を検出する。
 ステップS5:
 比較画像補正回路53は、ステップS4で検出した参照画像位置と比較画像位置の差に起因する補正量を算出する。ここでは、撮像素子30bからのリサンプリング後の画像(31r)について、デシメーションフィルタ処理による補正処理(高域周波数成分の遮断処理)を実施するための補正量を算出する。
 ステップS6:
 比較画像補正回路53は、ステップS5で算出した補正量で、撮像素子30bからのリサンプリング後の画像(31r)について、デシメーションフィルタ処理による補正処理を実施する。
 ステップS7:
 視差検出回路54は、参照画像REFと補正された比較画像CMPとから視差Lを検出する。
 ステップS8:
 ステップS7で用いた参照画像REFのブロック位置が最終の参照画像ブロック位置か否かが視差検出回路54により判定される。ステップS7で用いた参照画像REFのブロック位置が最終の参照画像ブロック位置の場合(Yes)、距離測定方法のフローは終了する。一方、ステップS7で用いた参照画像REFのブロック位置が最終の参照画像ブロック位置でない場合(No)、ステップS2へ移行する。その後、参照画像REFのブロック位置が最終の参照画像ブロック位置になるまで、ステップS2~S7が繰り替えし実行される。
 実施例1によれば、以下の1または複数の効果を得ることができる。
 1)相異なる画素ピッチの撮像素子をステレオカメラに用いた場合でも、リサンプリングにより、左右の画像の画素ピッチを揃えることができる。
 2)リサンプリングの後に、超解像処理による補正処理(信号低下分の復元処理)やデシメーションフィルタ処理による補正処理(高域周波数成分の遮断処理)を実施することで、リサンプリング時に発生する左右の画像間(31と33)の信号劣化の差を補正することができる。
 3)上記2)により、ステレオマッチング処理時に比較する左右の画像ブロックに対し、ブロック画像部分の左右サンプリングおよびリサンプリングによる補間に起因する左右の画像ブロックの誤差を補正できる。
 4)相異なる画素ピッチの撮像素子をステレオカメラに用いた場合でも、ステレオマッチング処理により正確に視差Lを算出でき、高精度に被写体4までの距離Dを得ることができる距離測定装置6を提供できる。
 本発明の第二の実施形態(実施例2)は、相異なるレンズを使った距離測定装置に関する。図7は、実施例2における焦点距離の相異なる2つレンズをステレオカメラに用いた場合の距離測定装置の構成例を示す図である。図8は、実施例2における距離測定装置の構成例を示す図である。
 図7には、ステレオカメラSCを構成する2台のカメラ200a、200bにおいて、焦点距離の異なるレンズ70a、70bをもつ距離測定装置6aの構成例が示される。ここでは、長い焦点距離faのレンズ70aをもつカメラ200aと短い焦点距離fbのレンズ70bをもつカメラ200bを用いたステレオカメラSCが示してある。
 同じ被写体4を、レンズ70aを通して、撮像素子1aに結像した像の大きさ(Sa)と、レンズ70bを通して、撮像素子1bに結像した像の大きさ(Sb)とでは像サイズが異なる(Sb<Sa)。これらが、同じ画素ピッチの撮像素子1aと撮像素子1bとによって、画像データとしてサンプリングされる。
 これらの画像はそのままではステレオマッチングに使えないので、同じ画素ピッチで、同じ大きさの像になるように画像の拡大変換や縮小変換を行う必要がある。同じ像サイズになるように変換する際、元の像の大きなカメラ200bにおけるサンプリング点は多く、元の像の小さなカメラ200aのサンプリング点が少ないために、実効的なサンプリング周波数に差が生じ、リサンプリングによる画像特性の差が生じる。
 したがって、実施例1と同様に、リサンプリングによる画像特性の差を補償する補正処理を実施することによって、視差精度や視差率などの視差性能の向上を図ることができる。
 図8に示すように、距離測定装置6aは、第一カメラ200aと第二カメラ200bとをステレオカメラSCとして有しする。第一カメラ200aは、長い焦点距離faのレンズ70aを含む第一光学系と、撮像素子1aとを含む。第二カメラ200bは、短い焦点距離fb(fb<fa)のレンズ70bを含む第二光学系と、撮像素子1bとを含む。
 第一リサンプリング回路41aと第二リサンプリング回路41bは、撮像素子1aに結像した像の大きさ(Sa)と、撮像素子1bに結像した像の大きさ(Sb)とでは像サイズが異なるので、同じ画素ピッチで、同じ大きさの像になるように画像の拡大変換または縮小変換を行った後、リサンプリングを行うように構成されている。
 比較画像補正回路53aは、比較画像に対してリサンプリングによる画像特性の差を補償する補正処理を行う。
 以下に図面を参照して、本発明の第三の実施形態(実施例3)を詳細に説明する。本発明の第三の実施形態(実施例3)は、歪のあるレンズを用いた距離測定装置に関する。図9は、レンズの歪による影響を説明するための図である。図10は、レンズの歪による影響を説明するための図である。図11は、実施例3におけるステレオマッチングを説明する図である。
 図9は、歪のあるレンズを用いたときに、本来映るべきドットパターンDA(白丸で示す)と、実際のドットパターンDB(黒丸で示す)を示したものである。実際のドットパターンDBが作る正方形の格子形状は画像の中央部CENの歪は小さく、画像の端PERに行くにしたがって正方形の形状が歪む。また、画像の端PERでは、4つの格子点がなす四角形の面積も、中央部CENの四角形の面積と比較して、小さくなっている。すなわち、同じ被写体4が撮像素子の中央部に結像したときよりも撮像素子の周辺部に結像したときの方が像が小さくなってしまうという現象が発生する(撮像素子の中央部に結像した被写体4の像のサイズ>撮像素子の周辺部に結像した被写体4の像のサイズ)。
 図10を用いて、この現象による誤差を説明する。図10には、光軸から離れた画角にあり、撮像素子の周辺部PERに結像した歪の大きな像と、光軸近傍の撮像素子の中央部CENに結像した像を一次元で模式的に表したものである。本来映るべき像(本来の像と示す)は周辺部PERも中央部CENも同じであることが望ましいが、周辺部PERはレンズの歪の影響が大きく、実際には小さい像(実際の像と示す)として結像する(状態61参照)。中央部CENは、レンズの歪の影響が少ないので、本来の像と実際の像とはほぼ同じ様に結像する(状態62参照)。
 状態63、64に示すように、撮像素子の画素ピッチは一定なので、周辺部PERの小さな像と中央部CENの大きな像は同じサンプリング周波数でサンプリングされる。同じ被写体4からの像であっても、歪の大きな周辺領域PERでのサンプリング点数は少なく(状態63では、3点)、歪の小さな中央領域CENでのサンプリング点数は多いことになる(状態64では、7点)。
 レンズの歪補正を行う際、歪量に応じて像の拡大縮小補正を行う必要がある(この場合、拡大補正)。歪の大きな周辺部PERは多く縮小しているので、多く拡大する必要があり(状態65参照)、歪のほとんどない中央部CENはほぼ等倍拡大になる(状態66参照)。ところが、同じ被写体4からの像に対するサンプリング点数は、周辺部PERは少なく(3点)、中央部CENは多い(7点)ので、周辺部の画素点を増やすために補間処理によって、リサンプリングする必要がある(状態67、68参照)。このとき、周辺部PERの変換後の像が大きく劣化してしまう。
 このような歪が大きなレンズや特殊な射影方式の光学系からなるステレオマッチングでは、同じ焦点距離のレンズ、同じ画素ピッチの撮像素子を用いたカメラであっても、基準画像ブロックと探索画像ブロックの位置が異なるために、各位置での歪補正が異なるために問題が生じる。
 図11を用いて実施例3におけるステレオマッチングを説明する。図11には、一例として、実施例1、2の様に、2つの撮像素子(1a、1b)の含むステレオカメラを用いた場合のステレオマッチングを説明する。なお、実施例3は、1つ撮像素子を含む1つの単眼カメラの場合にも適用できることは、当業者なら当然として理解できるであろう。
 図11に示すように。基準ブロック(基準画像の部分領域)REFと探索ブロック(比較画像の部分領域)CMP(CMP1)の画像位置が同じ場合(すなわち、画素シフト量が0のとき)、基準ブロックREFと探索ブロックCMP1のレンズ歪は同じであるため、同じリサンプリング処理が実施される。しかしながら、画像シフト量が増えるに従って、基準ブロックREFの位置と探索ブロックCMP2、CMP3の位置の差が大きくなり、基準ブロックREFのリサンプリング処理と探索ブロックのリサンプリング処理が異なることになる。したがって、ステレオマッチング処理時に、基準画像ブロックREFの画像位置と探索している比較画像ブロックCMPの画像位置とを検出し、その画像位置差に起因するリサンプリングの誤差分だけを補正することによって、リサンプリングによる補正量の差を最小に抑えることができる。
 つまり、歪のあるレンズを用いた距離測定装置には、基準画像ブロックREFの画像位置と探索している比較画像ブロックCMPの画像位置とを検出する検出回路と、その画像位置差に起因するリサンプリングの誤差分だけを補正する補正回路とが設けられる。
 次に、図12を用いて、実施例3における歪のあるレンズを用いた単眼カメラを利用した距離測定装置の構成例を説明する。図12は、実施例3における距離測定装置の構成例を示す図である。
 図12に示すように、距離測定装置6bは、カメラ300と、視点分離回路90と、第一視点撮影部リサンプリング回路41cと、第二視点撮影部リサンプリング回路41dと、視差算出回路50と、を含む。視差算出回路50は、参照位置検出回路(基準画像位置検出回路)51と、比較画像位置検出回路52と、比較画像補正回路53bと、視差検出回路54と、および、参照画像補正回路55と、を含む。
 カメラ300は、歪のあるレンズ80を含む光学系と、撮像素子1cと、を含む。レンズ80を介して撮像素子1cの2次元平面上に結像した像は、撮像素子1cによりサンプリングされる。
 視点分離回路90は、撮像素子1cによりサンプリングされた画像において、第一視点撮影領域と、第二視点撮影領域とを選択する。視点分離回路90は、第一視点撮影領域に対応する第一視点画像データを第一視点撮影領域部分のリサンプリング回路41cへ供給する。視点分離回路90は、また、第二視点撮影領域に対応する第一視点画像データを第二視点撮影領域部分のリサンプリング回路41dへ供給する。
 第一視点撮影領域部分のリサンプリング回路41cは、第一視点画像データの撮像素子1cの上の位置を検出し、その位置に基づいて第一視点画像データのリサンプリング処理を実施する。リサンプリング回路41cは、レンズ80の歪の補正を行うため、リサンプリング処理の際、第一視点画像データの撮像素子1cの上の位置に基づいて、拡大・縮小・回転などの幾何学的な変換と、補間処理と、を実施する。
 第二視点撮影領域部分のリサンプリング回路41dは、第二視点画像データの撮像素子1cの上の位置を検出し、その位置に基づいて第二視点画像データのリサンプリング処理を実施する。リサンプリング回路41dは、レンズ80の歪の補正を行うため、リサンプリング処理の際、第二視点画像データの撮像素子1cの上の位置に基づいて、拡大・縮小・回転などの幾何学的な変換と、補間処理と、を実施する。これにより、リサンプリング後の第一視点画像データとリサンプリング後の第二視点画像データの画素のピッチが同じとされる。リサンプリング後の第一視点画像データは参照位置検出回路51へ供給され、リサンプリング後の第二視点画像データは比較位置検出回路52へ供給される。
 参照位置検出回路51は、リサンプリング後の第一視点画像データから基準画像REFの部分領域を検出または選出する。比較画像位置検出回路52は、リサンプリング後の第二視点画像データから比較画像CMPの部分領域を検出または選出する。
 参照画像補正回路55は、リサンプリング後の第一視点画像データ上における参照画像REFの位置に起因する補正量を算出し、参照画像REFを補正する。つまり、参照画像補正回路55は、リサンプリング処理により発生する第一視点画像データの像の信号劣化を補正する補正処理を実施する。
 比較画像補正回路53bは、リサンプリング後の第二視点画像データ上における比較画像CMPの位置に起因する補正量を算出し、比較画像CMPを補正する。つまり、比較画像補正回路53bは、リサンプリング処理により発生する第二視点画像データの像の信号劣化を補正する補正処理を実施する。
 視差検出回路54は、参照画像補正回路55により補正された参照画像REFと比較画像補正回路53bにより補正された比較画像CMPとから視差Lを検出する。これにより、歪のあるレンズ80が用いられた距離測定装置6bは、検出された視差Lから(式1)を用いて、被写体4までの正確な距離Dを算出することができる。
 なお、参照画像補正回路55は削除することが可能である。この場合、比較画像補正回路53bは、リサンプリング後の第一視点画像データ上における参照画像REFの位置とリサンプリング後の第二視点画像データ上における比較画像CMPの位置の差に起因する補正量を算出し、比較画像CMPを補正する補正処理を実施するように構成される。視差検出回路54は、参照画像REFと比較画像補正回路53bにより補正された比較画像CMPとから視差Lを検出する。
 これにより、歪のあるレンズ80が用いられた距離測定装置6bは、検出された視差Lから(式1)を用いて、被写体4までの正確な距離Dを算出することができる。
 実施例1、2,3における距離測定装置の構成例は、以下の様にまとめることができる。
 1)撮像素子上に撮像され、同一物体(被写体4)の少なくとも二つの像(REF,CMP)の撮像素子上の像位置を二つの像の一致度判定によって検出し、測距(距離の測定)を行う距離測定装置(6,6a,6b)であって、
 前記撮像素子上の像は前記撮像素子(30a,30b,1a,1b,1c)の画素ピッチでサンプリングされ、
 前記像位置検出時における像(REF,CMP)の一致度判定を実施する際に幾何学的な補正(実施例1:超解像処理、デシメーションフィルタ処理、実施例2:拡大変換や縮小変換、実施例3:拡大・縮小・回転などの幾何学的な変換)と、再サンプリング処理(補間処理)が実施され、
 前記再サンプリング処理時に発生する像の信号劣化を補正する。
 2)、上記1)の距離測定装置において(実施例3参照)、
 上記像の一致度判定する二つの像(参照画像REF、比較画像CMP)が、一つの撮像素子(1c)上にある。
 3)上記1)の距離測定装置において(実施例1参照)、
 請求項1の距離測定装置であって、
 上記像の一致度判定する二つの像(参照画像REF、比較画像CMP)が、それぞれ画素ピッチの異なる二つの撮像素子(30a、30b)上にある。
 4)上記1)の距離測定装置において(実施例2参照)、
 上記像の一致度判定する二つの像(参照画像REF、比較画像CMP)が、それぞれ焦点距離の異なるレンズ(70a、70b)からなる光学系で形成される。
 5)上記1)の距離測定装置において(実施例1、2、3)、
 上記像位置検出時における像(参照画像REF、比較画像CMP)の一致度判定を実施する際に、少なくとも一方の像の判定に必要な撮像素子上の画像データに対し、幾何学的な補正と、再サンプリング処理が実施され、
 再サンプリング処理時に発生する像の信号劣化を補正する、距離測定装置。
 6)上記1)の距離測定装置において(実施例3)、
 一致度判定する二つの像(参照画像REF、比較画像CMP)の撮像素子上のそれぞれの位置を検出し、
 二つの像位置におけるそれぞれの幾何補正と再サンプリング処理により発生する像の信号劣化を補正する。
 別の言い方をすれは、本発明の距離測定装置は、ステレオカメラの対応点探索時またはその前に、同一物体(被写体4)が同じ像サイズになるような幾何学的な補正部と、同じ画素ピッチで比較できるようにリサンプリング処理部を有し、リサンプリング処理部では、リサンプリング処理と、基準画像と探索画像の像のリサンプリングに伴う信号劣化の差を補正する補正処理をする。
 さらに、視差検出における像の対応点探索を実施する際に、基準画像と探索画像の少なくとも一方の像に対し、一致度評価に必要な撮像素子上の画像データを抽出し、幾何学的な補正と、リサンプリング処理を実施し、基準画像と探索画像の像のリサンプリングに伴う信号劣化の差を補正する。
 またさらに、対応点探索を実施する際に、基準画像と探索画像の二つの像の撮像素子上のそれぞれの位置を検出し、二つの像位置におけるそれぞれの幾何補正とリサンプリング処理により発生する像の信号劣化を補正する。
 これにより、以下の効果を得ることができる。
 1)異なる種類のカメラによるステレオカメラや、広角レンズや曲面ミラーなどを用いた特殊な射影特性を持つ光学系からなるステレオカメラを提供することができる。
 2)異なるカメラのレンズによる像の拡大縮小や画素ピッチの異なる撮像素子に起因する問題を除去することができ、ステレオカメラにおける一致画像探索の性能を向上し、異なるカメラを用いた視差検出精度を向上することができる。
 3)撮像素子(センサ)のサイズ・画素ピッチなどが異なるカメラでのステレオカメラでは、ステレオマッチングを行うために、左右を同じ画像空間に幾何補正で変換する際、センサのサンプリング周波数が異なるため、変換後の像の特性が異なってしまう。また、高歪レンズや特殊な射影方式のレンズ、双曲面ミラーなどの光学系によるステレオカメラでは、ステレオマッチングを行うために、幾何変換(歪補正・幾何補正)により、画素位置の変換を行う際、センサ上の元のサンプリング点が、等間隔で格子状の新しい画素位置上に存在せず、不均一な間隔で存在するため、幾何変換後の画像位置により像の特性が変化する。本発明の距離測定装置では、ステレオマッチで使用する幾何補正後の画像ブロックに対し、幾何補正前のセンサ上のデータを取り出し、左右同じ像サイズ・画素ピッチのブロック画像になるように幾何補間処理した後、元のサンプリング周波数の差を補正して、マッチング評価する。また、基準ブロックの画素位置と探索ブロックの画素位置を検出し、二つのステレオマッチングを行う画像上の位置の違いによるサンプリングの差を補正する。
 以上、本発明者によってなされた発明を実施例に基づき具体的に説明したが、本発明は、上記実施形態および実施例に限定されるものではなく、種々変更可能であることはいうまでもない。
 1a、1b、1c、30a、30b:撮像素子、 2a、2b、200a、200b、300:カメラ、 3a、3b:光軸、 4:被写体、 5a、5b、70a、70b、80:レンズ、 6、6a、6b:距離測定装置、 40a、40b、41a、41b:リサンプリング回路、 40c:第一視点撮像部リサンプリング回路、 40d:第二視点撮像部リサンプリング回路、 50:視差算出回路、 51:参照位置検出回路、 52:比較画像位置検出回路、 53、53a:比較画像補正回路、54:視差検出回路、55:参照画像補正回路、 90:視点分離回路

Claims (6)

  1.  撮像素子の上に撮像され、同一物体の少なくとも二つの像の撮像素子の上の像位置を二つの像の一致度判定によって検出し、測距を行う距離測定装置であって、
     前記撮像素子の上の像は前記撮像素子の画素ピッチでサンプリングされ、
     前記像位置検出時における像の一致度判定を実施する際に幾何学的な補正と、再サンプリング処理が実施され、
     前記再サンプリング処理時に発生する像の信号劣化を補正する、距離測定装置。
  2.  請求項1の距離測定装置であって、
     上記像の一致度判定する二つの像が、一つの撮像素子の上にある、距離測定装置。
  3.  請求項1の距離測定装置であって、
     上記像の一致度判定する二つの像が、それぞれ画素ピッチの異なる二つの撮像素子の上にある、距離測定装置。
  4.  請求項1の距離測定装置であって、
     上記像の一致度判定する二つの像が、それぞれ焦点距離の異なるレンズからなる光学系で形成される、距離測定装置。
  5.  請求項1の距離測定装置であって、
     上記像位置検出時における像の一致度判定を実施する際に、少なくとも一方の像の判定に必要な撮像素子の上の画像データに対し、幾何学的な補正と、再サンプリング処理が実施され、
     再サンプリング処理時に発生する像の信号劣化を補正する、距離測定装置。
  6.  請求項1の距離測定装置であって、
     一致度判定する二つの像の撮像素子の上のそれぞれの位置を検出し、
     二つの像位置におけるそれぞれの幾何補正と再サンプリング処理により発生する像の信号劣化を補正する、距離測定装置。
PCT/JP2022/004624 2021-06-30 2022-02-07 距離測定装置 WO2023276229A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
DE112022001672.8T DE112022001672T5 (de) 2021-06-30 2022-02-07 Abstandsmessvorrichtung

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2021108735A JP2023006232A (ja) 2021-06-30 2021-06-30 距離測定装置
JP2021-108735 2021-06-30

Publications (1)

Publication Number Publication Date
WO2023276229A1 true WO2023276229A1 (ja) 2023-01-05

Family

ID=84691112

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2022/004624 WO2023276229A1 (ja) 2021-06-30 2022-02-07 距離測定装置

Country Status (3)

Country Link
JP (1) JP2023006232A (ja)
DE (1) DE112022001672T5 (ja)
WO (1) WO2023276229A1 (ja)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000102040A (ja) * 1998-09-28 2000-04-07 Olympus Optical Co Ltd 電子ステレオカメラ
JP2005210217A (ja) * 2004-01-20 2005-08-04 Olympus Corp ステレオカメラ
WO2011096251A1 (ja) * 2010-02-02 2011-08-11 コニカミノルタホールディングス株式会社 ステレオカメラ
JP2011160299A (ja) * 2010-02-02 2011-08-18 Konica Minolta Holdings Inc 三次元画像撮影システムおよび三次元画像撮影システム用カメラ

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8723926B2 (en) 2009-07-22 2014-05-13 Panasonic Corporation Parallax detecting apparatus, distance measuring apparatus, and parallax detecting method
JP7134925B2 (ja) 2019-07-05 2022-09-12 株式会社日立製作所 ステレオカメラ

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000102040A (ja) * 1998-09-28 2000-04-07 Olympus Optical Co Ltd 電子ステレオカメラ
JP2005210217A (ja) * 2004-01-20 2005-08-04 Olympus Corp ステレオカメラ
WO2011096251A1 (ja) * 2010-02-02 2011-08-11 コニカミノルタホールディングス株式会社 ステレオカメラ
JP2011160299A (ja) * 2010-02-02 2011-08-18 Konica Minolta Holdings Inc 三次元画像撮影システムおよび三次元画像撮影システム用カメラ

Also Published As

Publication number Publication date
JP2023006232A (ja) 2023-01-18
DE112022001672T5 (de) 2024-03-07

Similar Documents

Publication Publication Date Title
EP1343332B1 (en) Stereoscopic image characteristics examination system
JP6299124B2 (ja) 投影システム、画像処理装置、投影方法およびプログラム
US8717414B2 (en) Method and apparatus for matching color image and depth image
JP4852591B2 (ja) 立体画像処理装置、方法及び記録媒体並びに立体撮像装置
US7150536B2 (en) Projector and projection image correction method thereof
JPH05183916A (ja) イメージセンサの位置合わせシステム及び位置合わせ方法
US20080211956A1 (en) Image Pickup Device
US8588521B2 (en) Image processing apparatus and control method therefor
JP4717863B2 (ja) 複眼撮像装置のキャリブレーション方法および装置ならびにこれに用いられるキャリブレーションチャート
JP6053347B2 (ja) 撮像装置およびその制御方法ならびにプログラム
US20130083171A1 (en) Apparatus, method and recording medium for image processing
US11620732B2 (en) Multi-projection system, image projection method and projector
US8749652B2 (en) Imaging module having plural optical units in which each of at least two optical units include a polarization filter and at least one optical unit includes no polarization filter and image processing method and apparatus thereof
KR20100040643A (ko) 고해상도 영상을 생성하기 위한 영상 처리 장치 및 방법
WO2014069169A1 (ja) 画像処理装置
JP2010199650A (ja) 画像処理装置および画像処理方法
JP2000283753A (ja) ステレオ画像による測距装置
JP2019168967A (ja) 撮像装置、画像処理装置、画像処理方法及びプログラム
JP7195801B2 (ja) 画像処理装置およびその制御方法、距離検出装置、撮像装置、プログラム
JPH08205181A (ja) 色収差補正回路および色収差補正機能付き撮像装置
JP4394487B2 (ja) ステレオ画像処理装置
WO2023276229A1 (ja) 距離測定装置
JP2008298589A (ja) 位置検出装置及び位置検出方法
WO2020175063A1 (ja) 演算装置、視差算出方法
JP6648916B2 (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: 22832397

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 112022001672

Country of ref document: DE