WO2012001982A1 - ステレオ画像処理装置およびステレオ画像処理方法 - Google Patents

ステレオ画像処理装置およびステレオ画像処理方法 Download PDF

Info

Publication number
WO2012001982A1
WO2012001982A1 PCT/JP2011/003751 JP2011003751W WO2012001982A1 WO 2012001982 A1 WO2012001982 A1 WO 2012001982A1 JP 2011003751 W JP2011003751 W JP 2011003751W WO 2012001982 A1 WO2012001982 A1 WO 2012001982A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
reference image
unit
pixel
thinning
Prior art date
Application number
PCT/JP2011/003751
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/702,168 priority Critical patent/US8903135B2/en
Priority to EP11800452.2A priority patent/EP2592595A4/en
Priority to CN201180025461.9A priority patent/CN102906782B/zh
Priority to JP2011548467A priority patent/JP5810314B2/ja
Publication of WO2012001982A1 publication Critical patent/WO2012001982A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C11/00Photogrammetry or videogrammetry, e.g. stereogrammetry; Photographic surveying
    • G01C11/04Interpretation of pictures
    • G01C11/06Interpretation of pictures by comparison of two or more pictures of the same area
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • G06T7/55Depth or shape recovery from multiple images
    • G06T7/593Depth or shape recovery from multiple images from stereo images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • G06T2207/10012Stereo images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20048Transform domain processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • G06T2207/30201Face
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30248Vehicle exterior or interior
    • G06T2207/30252Vehicle exterior; Vicinity of vehicle
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30248Vehicle exterior or interior
    • G06T2207/30268Vehicle interior

Definitions

  • the present invention relates to a stereo image processing apparatus and a stereo image processing method.
  • a shift between images is calculated from a stereo image (that is, a standard image and a reference image) when the same object is photographed using a stereo camera, and a distance to the object is measured based on the shift.
  • Stereo image processing apparatuses are known.
  • the stereo image processing apparatus estimates, for example, the orientation of the driver's face by measuring the distance from the in-vehicle device that measures the distance to the vehicle ahead, or from the in-vehicle camera to parts of the driver's face (such as eyes and nose). Application to in-vehicle devices is under consideration.
  • the base length of the camera (camera interval) has become shorter.
  • the shift between the stereo images is also reduced, so that the stereo image processing apparatus is required to have a highly accurate parallax calculation function.
  • stereo matching for example, a SAD (Sum of Absolute Differences) method or a POC (Phase Only Correlation) method is used. .
  • SAD Sud of Absolute Differences
  • POC Phase Only Correlation
  • the SAD value is calculated by taking the sum of the values for the entire partial image.
  • the SAD value indicates the degree of difference in image luminance. Then, the position of the rectangular window of the reference image is shifted by one pixel in the base line length direction of the camera, and the position of the first partial image in the standard image and the second in the reference image when the SAD value is minimized.
  • the deviation from the position of the partial image is obtained as “pixel level parallax”.
  • the SAD method has a high analysis resolution and a relatively small amount of calculation.
  • the SAD method has low accuracy of sub-pixel level parallax calculation. Therefore, the accuracy of parallax calculation is limited to about 1/4 to 1/16 pixel.
  • the POC method with high accuracy of parallax calculation has attracted attention.
  • the first partial image and the second partial image cut out by a Hanning window or the like are subjected to a two-dimensional Fourier transform, and the obtained first partial image and the second partial image after the two-dimensional Fourier transform are obtained.
  • a two-dimensional inverse Fourier transform is performed to obtain a phase-only correlation coefficient.
  • an image shift amount is calculated based on the correlation peak of the phase-only correlation coefficient.
  • Such a POC method (referred to as a two-dimensional POC method) has an advantage that the accuracy of parallax calculation is very high.
  • the amount of parallax calculation is enormous, and it is extremely difficult to perform calculation processing in a short time.
  • the two-dimensional POC method is inferior to the SAD method in terms of analysis resolution (size on a screen that enables distance measurement by distinguishing objects having different distances).
  • a one-dimensional POC method in which the calculation amount of the two-dimensional POC method is reduced has also been proposed (for example, see Patent Document 1).
  • this one-dimensional POC method one-dimensional Fourier transformation is performed on the first partial image and the second partial image cut out by a Hanning window or the like, and the first partial image and the second partial image after the one-dimensional Fourier transformation are performed. Of the partial images.
  • a phase-only correlation coefficient is obtained by performing a one-dimensional inverse Fourier transform. That is, the amount of calculation is reduced by performing one-dimensional Fourier transform instead of two-dimensional Fourier transform.
  • this one-dimensional POC method is inferior to the SAD method in terms of analysis resolution (size on a screen that enables distance measurement by distinguishing objects having different distances).
  • An object of the present invention is to provide a stereo image processing apparatus and a stereo image processing method that improve the accuracy of parallax calculation while maintaining a processing amount equivalent to that of the SAD method.
  • a stereo image processing apparatus forms acquisition reference images and thinning reference images by acquiring acquisition means for acquiring a stereo image including a reference image and a reference image, and thinning out the reference image and the reference image.
  • acquisition means for acquiring a stereo image including a reference image and a reference image
  • thinning out the reference image and the reference image By reversing the data sequence of the data sequence composed of the luminance values in the thinning-out reference image, the thinning-out means, the first calculating means for calculating the shift amount in pixel units between the thinning-out reference image and the thinning-out reference image
  • Filtering means for calculating an antiphase filter coefficient, filtering the decimation reference image using the calculated antiphase filter coefficient, and outputting a filtering result; and a peak in the filtering result output from the filtering process means
  • a second calculation means for calculating a shift amount of the sub-pixels comprises a.
  • the stereo image processing method acquires a stereo image including a standard image and a reference image, thins the standard image and the reference image, thereby forming a thinned standard image and a thinned reference image, and performs the thinning.
  • the amount of deviation between the reference image and the thinned reference image is calculated, and the phase sequence coefficient is calculated by inverting the data sequence of the data sequence composed of the luminance values in the thinned reference image, and the thinned reference image Is filtered using the calculated anti-phase filter coefficient, and a peak in the filtering result is detected, thereby calculating a shift amount in sub-pixel units between the decimation reference image and the decimation reference image.
  • the present invention it is possible to provide a stereo image processing apparatus and a stereo image processing method that improve the calculation accuracy of parallax while maintaining a processing amount equivalent to that of the SAD method.
  • FIG. 1 is a block diagram showing a configuration of a stereo image processing apparatus according to Embodiment 1 of the present invention.
  • Flow diagram for explaining the operation of the stereo image processing apparatus Diagram for explaining the processing of the image matching unit Flow chart showing details of sub-unit calculation processing Diagram for explaining processing of filter section
  • FIG. 3 is a block diagram showing a configuration of a stereo image processing apparatus according to Embodiment 2 of the present invention.
  • FIG. 7 is a block diagram showing a configuration of a stereo image processing apparatus according to Embodiment 3 of the present invention.
  • FIG. 6 is a block diagram showing a configuration of a stereo image processing apparatus according to Embodiment 4 of the present invention.
  • FIG. 5 Block diagram showing a configuration of a stereo image processing apparatus according to Embodiment 6 of the present invention.
  • Diagram for explaining cross-correlation processing The figure which compares the ranging accuracy at the time of using the conventional SAD system, a one-dimensional POC system, and the stereo image processing method of this application.
  • FIG. 1 shows a configuration of a stereo image processing apparatus 100 according to Embodiment 1 of the present invention.
  • the stereo image processing apparatus 100 includes a stereo image acquisition unit 101, an image matching unit 102, a filter unit 103, and a peak position detection unit 104.
  • the stereo image acquisition unit 101 acquires a stereo image captured by two or more imaging systems (that is, cameras).
  • a stereo image includes a standard image and a reference image in which the same object is captured by two different imaging systems.
  • the image matching unit 102 calculates the “deviation amount n” between the reference image and the reference image by performing image matching processing based on the reference image and the reference image acquired by the stereo image acquisition unit 101.
  • the unit of the shift amount n calculated by the image matching unit 102 is, for example, a pixel.
  • the unit of “parallax” between the standard image and the reference image obtained by the peak position detection unit 104 described later is, for example, a subpixel.
  • the image matching unit 102 roughly detects the deviation between the standard image and the reference image in a predetermined detection unit, and then the peak position detection unit 104 detects the deviation finely in the sub unit.
  • the image matching unit 102 sets one arbitrary pixel included in the reference image as a “reference point”, and a peripheral partial image centered on the reference point (hereinafter referred to as “unit reference image”) as the reference image. Cut out from. Further, the image matching unit 102 cuts out a plurality of partial images having the same size as the unit standard image (hereinafter referred to as “unit reference images”) from different positions of the reference images. Then, the image matching unit 102 extracts a unit reference image having a maximum matching degree with the unit standard image from the plurality of unit reference images that have been cut out.
  • one pixel corresponding to the “reference point” becomes the “corresponding point” on the reference image.
  • an index indicating the matching degree for example, an SAD value indicating a luminance difference degree is used.
  • the parallax between the base image and the reference image occurs only in the base line length direction of the camera. Therefore, when a plurality of unit reference images are cut out, the cut positions may be changed in the base line length direction. Then, the amount of deviation between the position of the reference point in the reference image and the position of the corresponding point in the reference image is calculated as the amount of deviation n described above.
  • the filter unit 103 acquires the position of the reference point and the shift amount n from the image matching unit 102 and the stereo image from the stereo image acquisition unit 101.
  • the filter unit 103 calculates a filter coefficient based on the standard image, and filters the reference image using the calculated filter coefficient. That is, the filter unit 103 first extracts a partial image from the reference image as a sub-pixel estimation unit reference image, and calculates a filter coefficient from the sub-pixel estimation unit reference image. Next, the filter unit 103 extracts a partial image from the reference image as a unit reference image for subpixel estimation, performs a filtering process on the subpixel estimation unit reference image using the calculated filter coefficient, and performs filtering. The result is output to the peak position detection unit 104.
  • the peak position detection unit 104 detects the peak position in the filtering result acquired from the filter unit 103, thereby calculating the amount of deviation in sub-pixel units between the sub-pixel estimation unit reference image and the sub-pixel estimation unit reference image. To do.
  • the peak position is a position where the filtering result is the maximum value.
  • the sum of the deviation in sub-pixel units and the deviation amount n in pixel units is an accurate deviation amount between the base image and the reference image.
  • FIG. 2 is a flowchart for explaining the operation of the stereo image processing apparatus 100.
  • the process for an arbitrary reference point in the reference image will be described.
  • the parallax is obtained for all pixels in the distance measurement target area in the reference image by sequentially changing the reference point. Calculated.
  • step S1 the image matching unit 102 determines an analysis reference position.
  • the analysis reference position is one coordinate point that is a target for calculating parallax in the reference image, and is the reference point described above.
  • step S ⁇ b> 2 the image matching unit 102 cuts out a unit reference image that is a partial image based on the analysis reference position determined in step S ⁇ b> 1 from the reference image received from the stereo image acquisition unit 101.
  • the unit of the size of the unit reference image is, for example, a pixel.
  • step S3 the image matching unit 102 determines a search range and a search start position in the reference image based on the analysis reference position determined in step S2.
  • the parallax of the stereo camera is determined by the base line length, which is the distance between the cameras, the focal length of the lens, and the distance from the stereo camera to the object. Therefore, the search range may be determined based on the distance from the stereo camera to the object to be measured. Further, since the object at infinity from the stereo camera is picked up at the same position of the standard image and the reference image, the search start position in the reference image may be set to the same coordinates as the standard point in the standard image.
  • step S4 the image matching unit 102 cuts out a peripheral partial image centered on the search start position determined in step S3 as a unit reference image from the reference image received from the stereo image acquisition unit 101.
  • the unit of the size of this unit reference image is, for example, a pixel.
  • step S5 the image matching unit 102 calculates a matching degree between the unit standard image and the unit reference image.
  • a matching degree for example, an SAD value indicating a luminance difference degree or a luminance similarity degree is used.
  • step S6 the image matching unit 102 performs search range end determination processing. If it is determined here that the search range has not ended (step S6: NO), the image matching unit 102 shifts the position to be cut out within the search range determined in step S3 by one pixel, and starts a new operation in step S4. A simple unit reference image. In this way, the processing from steps S4 to S6 is repeated until the search range is completed.
  • step S7 the image matching unit 102 specifies a unit reference image having the highest matching degree based on the plurality of matching degrees obtained by the processes in steps S4 to S6.
  • the image matching unit 102 specifies a unit reference image that has the minimum or minimum brightness difference.
  • step S2 to step S7 will be specifically described with reference to FIG.
  • step S2 the image matching unit 102 cuts out a peripheral partial image around the analysis reference position as a unit reference image.
  • a rectangular window having a predetermined size (vertical size: wv pixel, horizontal size: wh pixel) is used for cutting out the unit reference image.
  • the analysis reference position is a reference point (xa, ya).
  • the center of the rectangular window defined by the window function is described as being coincident with the analysis reference position, but the analysis reference position exists near the center of the rectangular window even if it is not strictly the center. It only has to be.
  • step S3 the image matching unit 102 determines a search range and a search start position in the reference image based on the analysis reference position determined in step S1. For example, the same coordinates (xa, ya) as the analysis reference position in the reference image are used as the search start position (initial coordinates for cutting out the unit reference image in the reference image).
  • step S4 the image matching unit 102 cuts out a peripheral partial image around the search start position as a unit reference image from the reference image.
  • the same rectangular window as the rectangular window used for extracting the unit standard image is used.
  • step S5 the image matching unit 102 calculates the degree of matching between the unit standard image and the unit reference image.
  • this matching degree for example, an SAD value indicating the luminance difference degree is used. This SAD value is calculated by the following equation (1).
  • the image matching unit 102 shifts the cutout position and cuts out a new unit reference image from the reference image.
  • the position to be cut out is shifted by one pixel.
  • the direction of shifting is the direction of the right arrow extending from the coordinates (xa, ya) of the reference image in FIG.
  • the image matching unit 102 specifies a unit reference image having the maximum matching degree based on the plurality of matching degrees obtained by the processes in steps S4 to S6. Specifically, the image matching unit 102 specifies a unit reference image corresponding to, for example, the smallest SAD value among a plurality of SAD values. One pixel corresponding to the “reference point” in the specified unit reference image becomes a “corresponding point” on the reference image. If the coordinates of the corresponding points are (xa + n, ya), n is the amount of deviation in pixel units.
  • the SAD value is used as an index of matching degree, but the present invention is not limited to this, and any one that can be used as an index of matching degree can be used.
  • SSD Squared Differences
  • step S8 the filter unit 103 and the peak position detection unit 104 perform sub-unit calculation processing based on the corresponding points obtained in step S7 and the reference image and reference image received from the stereo image acquisition unit 101.
  • FIG. 4 is a flowchart showing details of the sub-unit calculation process.
  • FIG. 5 is a diagram for explaining the concept of the sub-unit arithmetic processing.
  • step S11 the filter unit 103 cuts out a sub-pixel estimation unit reference image from the reference image.
  • a window function is used to cut out the unit reference image for subpixel estimation.
  • the window function for example, the window function w (m) of the Hanning window represented by the equation (2) can be used.
  • window function of a Hanning window is used as the window function.
  • a Hamming window, a Blackman window, a Kaiser window, or the like may be used as the window function.
  • These window functions are selected depending on which of the characteristics (for example, frequency power characteristics, phase characteristics, cut-out edge continuity) of the unit reference image for subpixel estimation is important. For example, the Kaiser window is selected when importance is attached to the phase characteristics, and the Hanning window is selected when importance is attached to reduction of the calculation amount.
  • the image cutout processing in the image matching unit 102 is performed in units of pixels, for example, and therefore it is important to reduce the number of calculations rather than accuracy. Therefore, the first window function used in the image matching unit 102 is a window function that simply cuts out image data.
  • the function be a target (ie, a function in which the first and last values of one period are zero).
  • the first window function When comparing the first window function and the second window function with respect to frequency characteristics, the first window function has a narrower main lobe than the second window function, The amplitude of the side lobe is large.
  • the second window function w (m) uses a Hanning window whose vertical axis size is 1 pixel (pixel) and whose horizontal axis size is “KJ” pixels. M is an integer from J to K.
  • the second window function w (m) is set around the reference point (xa, ya). As a result, an image having a vertical axis size of 1 pixel and a horizontal axis size of “KJ” pixels centered on the reference point (xa, ya) is cut out as a unit reference image for subpixel estimation.
  • f ′ (m) represents a luminance signal string of the sub-pixel estimation unit reference image.
  • step S12 the filter unit 103 cuts out a sub-pixel estimation unit reference image centered on the corresponding point detected in step S7 from the reference image.
  • the same second window function as that of the sub-pixel estimation unit reference image is used.
  • the second window function is set around the corresponding point (xa + n, ya).
  • g ′ (m) represents a luminance signal string of the sub-pixel estimation unit reference image.
  • the second window function w (m) whose vertical axis size is 1 pixel (pixel) and whose horizontal axis size is “KJ” pixels is used, but this size is an example. Yes, it is not limited to this.
  • a second window function having a vertical axis size of 3 pixels may be used. In that case, first, a partial image having a vertical axis size of 3 pixels is cut out from each of the base image and the reference image using the second window function. Then, in the cut out partial image, the average (average luminance) of the luminances of three pixels having the same value on the vertical axis of the coordinate is calculated, and the subpixel estimation with the vertical axis size constituted by the average luminance is 1 pixel. It may be a unit reference image for use or a unit reference image for subpixel estimation.
  • the second window function having a vertical axis size of 1 pixel for example, in the partial images cut out in three rows including the upper row and the lower row, the values of the vertical axes of the coordinates are the same.
  • An average of the luminance values of the pixels may be calculated, and a sub-pixel estimation unit reference image or a sub-pixel estimation unit reference image configured by the average luminance may be used.
  • the average luminance may be calculated after weighting.
  • the weighting coefficient used in this case may be determined by a window function like a two-dimensional POC.
  • the filter unit 103 calculates anti-phase filter coefficients based on the sub-pixel estimation unit reference image. Specifically, the filter unit 103 rearranges (that is, inverts) the signal sequence (that is, the luminance value signal sequence) in which the luminance values of the respective coordinates in the sub-pixel estimation unit reference image are arranged in order in the reverse order. ) To calculate antiphase filter coefficients. That is, the tap length of the antiphase filter is equal to the horizontal axis size of the unit reference image for subpixel estimation (that is, the window length of the window function).
  • step S14 the filter unit 103 filters the unit reference image for subpixel estimation using the antiphase filter coefficient calculated in step S13, and outputs the filtering result to the peak position detection unit 104.
  • the window length (KJ) of the window function w (m) is 5 pixels
  • the luminance value signal sequence of the unit reference image for subpixel estimation is “1, 2, 3, 4, 5”. It will be explained as being.
  • the luminance value signal sequence x (m) of the sub-pixel estimation unit reference image is “1, 2, 3, 4, 5”.
  • the filter unit 103 performs a filtering process on the luminance value signal sequence of the sub-pixel estimation unit reference image using the antiphase filter coefficient h (k).
  • the signal sequence is such that the coordinates of the constituent signal are “k ⁇ 2, k ⁇ 1, k, k + 1, k + 2”.
  • a filtering process is performed by multiplying the antiphase filter coefficient h (k), and a sum z (m) of each multiplication result is calculated.
  • m takes an integer value.
  • the sub-pixel estimation unit reference image is considered in consideration of the luminance at the coordinate points around the sub-pixel estimation unit reference image.
  • the luminance value signal sequence x (m) of an image including two pixels adjacent to each other is “0, 0, 1, 2, 3, 4, 5, 0, 0”.
  • the sum z (2) is 55
  • the sum z (3) is 40
  • the sum z (4) is 26.
  • f ′ ( ⁇ k) obtained by inverting the luminance value signal sequence of the unit reference image for subpixel estimation is used as the filter coefficient h (k) of the antiphase filter.
  • G ′ (m) is a luminance value of the sub-pixel estimation unit reference image.
  • the anti-phase filter is a kind of so-called FIR filter and has a feature that it is a linear transition invariant system.
  • the linear transition invariant system is a system in which when the input signal has a shift, the output signal is shifted by the same amount as the input signal. That is, in the specific example described above, the case where there is no deviation between the sub-pixel estimation unit reference image and the sub-pixel estimation unit reference image is described as an example. However, the sub-pixel estimation unit reference image is used for sub-pixel estimation. When there is a deviation smaller than the sampling interval with respect to the unit reference image, the same deviation occurs in the signal sequence z (m) as a filtering result.
  • the tap length of the antiphase filter is set according to the size of the shift amount n in pixel units detected by the pixel unit matching. For example, when the shift amount n per pixel is small, the tap length of the antiphase filter is set to be short accordingly. That is, when obtaining the parallax of an object of the same size in real space, the parallax is smaller when the object is far away than when it is near, and the shift amount n in units of pixels is also smaller. At the same time, since the size captured in the image is also reduced, the size of the sub-pixel estimation unit reference image and the sub-pixel estimation unit reference image is changed in accordance with the magnitude of the shift amount n. The tap length of can also be changed adaptively. As a result, the parallax that matches the size of the object to be measured can be calculated.
  • the filtering result is the output of the linear transition invariant system, it excludes errors in lens distortion correction, errors such as gain noise caused by CCD and other image sensors, and errors in the calculation accuracy of image extraction by windowing. In theory, it represents the true amount of deviation. Therefore, the true peak position in the sub-pixel unit can be obtained by interpolating the numerical value between the pixels according to the sampling theorem for the output of the antiphase filter discretized in the pixel unit.
  • step S15 the peak position detection unit 104 detects the peak position in the filtering result. Based on this peak position, it is possible to detect a shift amount in subpixel units between the base image and the reference image.
  • Sinc function is used to detect this peak position.
  • the sinc function is a function defined by sin ( ⁇ x) / ⁇ x, and is a function used when returning the discretized sampling data to the original continuous data. It is proved by the sampling theorem that the original continuous data can be completely restored by performing a convolution operation between the sampled discrete data and the sinc function.
  • the signal data at the pixel unit interval can be interpolated, and the filtering result z (m) in which the signal data is theoretically interpolated even in the sub-pixel unit. ) True peak position can be derived.
  • FIG. 7 is a diagram for explaining the peak position detection using the sinc function
  • a curve 701 is a result of the convolution operation of the signal sequence z (m) that is the filtering result calculated in S14 and the sinc function. It is an example.
  • the numerical value between the filtering results z (1) and z (2) and the signal data between z (2) and z (3) are interpolated.
  • the peak position detection unit 104 detects the peak position of the filtering result z (m) obtained by interpolating the signal data by a binary search.
  • the peak position detection unit 104 repeats the same process as described above, with the position C as a new binary search reference point.
  • the number of repetitions of this process can be set according to the required subpixel accuracy. That is, if the required sub-pixel accuracy is 1/2 pixel, the above-described processing may be performed once. If the accuracy is 1/4 pixel, it is required twice. If it is 1/8 pixel, it is required 3 times. The number of repetitions is determined according to the subpixel accuracy. Then, the peak position detection unit 104 treats the last obtained midpoint as the detected peak position ⁇ .
  • the method for detecting the peak position using the sinc function and the binary search method has been described.
  • the present invention is not limited to this, and the peak position may be searched for by a combination of a sinc function and a gradient method.
  • any maximum value detection method can be used after interpolating the signal data of the pixel unit interval by convolving the discretized filtering result with a sinc function.
  • the peak position detection unit 104 may detect the peak position using quadratic curve approximation. Thereby, the amount of calculation can be reduced.
  • the discretized filtering result is fitted with a quadratic curve, and the position of the maximum value of the quadratic curve is detected as the peak position. Thereby, the peak position can be obtained with an accuracy equal to or less than the discretization interval.
  • FIG. 8 is a diagram for explaining peak position detection using quadratic curve approximation.
  • the value z (0) at the position m 0 where the filtering result z (m) at the pixel unit interval is maximum, and the filtering result at a position shifted by one pixel from the maximum position to the left and right.
  • a quadratic curve is obtained through three points z (+1) and z ( ⁇ 1), and a position where the quadratic curve has a maximum value is detected as a peak position ⁇ .
  • This peak position ⁇ is calculated by the following equation (5).
  • the parallax of the analysis reference position in the reference image is obtained by adding the deviation n in pixel units and the shift ⁇ in subpixel units.
  • step S9 the distance measurement target region end determination process is performed, and if there is an unprocessed region that has not yet been processed in steps S1 to S8, the analysis reference position is shifted to display the unprocessed region. The process from step S1 to step S8 is performed.
  • image matching unit 102 calculates the amount of deviation in units of pixels between the standard image and the reference image.
  • the filter unit 103 calculates an anti-phase filter coefficient by inverting the data sequence of the data sequence composed of the luminance values in the standard image, and filters the reference image using the calculated anti-phase filter coefficient.
  • the peak position detection unit 104 detects a peak in the filtering result, thereby calculating a shift amount in sub-pixel units between the standard image and the reference image.
  • the parallax is obtained by adding the shift amount in pixel units and the shift amount in sub-pixel units.
  • FIG. 9 shows a configuration of stereo image processing apparatus 200 according to Embodiment 2 of the present invention.
  • the stereo image processing apparatus 200 includes a data deletion unit 201.
  • the data deletion unit 201 forms the thinned standard image and the thinned reference image by thinning the image data of the standard image and the reference image. Specifically, the data deletion unit 201 thins out the image data of the standard image and the reference image by sampling at a predetermined sampling period.
  • the band-limited data signal has a larger amount of data but an equal amount of information than the data signal obtained by thinning out the band-limited data.
  • the focal length of the lens When using a camera, it is possible to remove high-band components of image data (data signal) by adjusting the focal length of the lens. That is, by making a blurred image (an image with reduced resolution) before thinning out the data signal, the data signal before thinning and the data signal after thinning can be regarded as equivalent. For example, when a VGA image having a horizontal resolution of 640 ⁇ vertical 480 is reduced to a QVGA image having a horizontal resolution of 320 ⁇ vertical 240, the image is obtained by adjusting the focal length of the lens so that the resolution is halved. The obtained image data may be sampled every other pixel.
  • the thinning standard image and the thinning reference image are output to the image matching unit 102 and the filter unit 103. Therefore, in the stereo image processing apparatus 200, the image matching unit 102 and the filter unit 103 target the thinning reference image and the thinning reference image.
  • Stereo image processing apparatus 200 The operation of the stereo image processing apparatus 200 having the above configuration will be described. Note that the stereo image acquisition unit 101 according to the present embodiment acquires a blurred image (an image with reduced resolution) from which high-frequency components have been removed by adjusting the focal length of the camera lens, and the data deletion unit 201 It shall be handed over.
  • a blurred image an image with reduced resolution
  • FIG. 10 is a flowchart for explaining the operation of the stereo image processing apparatus 200.
  • step S21 the data deleting unit 201 forms the thinned reference image and the thinned reference image by thinning out the image data of the standard image and the reference image.
  • FIG. 11 is a diagram comparing an optical signal (image signal) (FIG. 11A) obtained when the thinning process is not executed and an optical signal (FIG. 11B) obtained when the thinning process is executed.
  • Each of the upper XY planes in FIGS. 11A and 11B is an image (a base image or a reference image) taken with the focal length of the lens adjusted so that the resolution is halved. That is, the image shown on the XY plane is a state in which high-frequency components are removed from the original image.
  • a plurality of rectangles included in the XY plane indicate pixels.
  • the optical signal in FIG. 11A is obtained from pixels (that is, all pixels) indicated by white rectangles included in the XY plane (that is, thinning processing is not performed).
  • the optical signal in FIG. 11B is obtained from pixels (in other words, every other pixel) indicated by white rectangles included in the XY plane (that is, thinning processing is performed).
  • the high frequency components of the original image are removed by halving the resolution.
  • the optical signals reproduced in each case can be regarded as equivalent by the sampling theorem.
  • the amount of image data can be reduced even when averaging is performed with a plurality of pixels (for example, 4 pixels) instead of the thinning process.
  • this process is not a linear process, signal processing is performed in subsequent processes. Processing based on the theory becomes meaningless.
  • the resolution may affect the pixel pitch, which may degrade the accuracy.
  • the resolution is halved, the pixel pitch is doubled, so the distance error is about twice regardless of the parallax calculation accuracy of the matching method.
  • phase correlation is accurately determined only from the image data in other bands. It is possible to obtain the phase characteristics necessary for the calculation. That is, by performing the thinning process, the matching accuracy can be theoretically maintained even if the amount of image data is reduced and the amount of calculation is reduced.
  • the data deletion unit 201 is provided before the image matching unit 102 and the filter unit 103, and thins out the image data of the reference image and the reference image.
  • a thinning standard image and a thinning reference image are formed.
  • the filter unit 103 performs a filtering process using an antiphase filter, which is a matching process based on the phase correlation.
  • the filter unit 103 performs a filtering process using an anti-phase filter, which is a matching process based on the phase correlation, the parallax calculation accuracy can be maintained even if the thinning process is performed.
  • FIG. 12 shows a configuration of stereo image processing apparatus 300 according to Embodiment 3 of the present invention.
  • the stereo image processing apparatus 300 includes a high frequency component deletion unit 301.
  • the high frequency component deletion unit 301 performs a process of extracting only the low frequency component by suppressing the high frequency component among the low frequency component and the high frequency component constituting the image data (data signal) of the standard image and the reference image.
  • the high frequency component means a component having a frequency equal to or higher than 1 ⁇ 2 of the sampling frequency in the data deletion unit 201.
  • the high frequency component deletion unit 301 is configured by, for example, a low-pass filter (low-pass filter). This filter may be a linear filter such as an FIR filter.
  • FIG. 13 is a flowchart for explaining the operation of the stereo image processing apparatus 300.
  • step S31 the high frequency component deletion unit 301 suppresses only the low frequency component by suppressing the high frequency component among the low frequency component and the high frequency component constituting the image data (data signal) of the standard image and the reference image. Perform the extraction process.
  • FIG. 14 shows an amplitude characteristic with respect to the spatial frequency (FIG. 14A) obtained when the high-frequency component suppression process is not executed, and an amplitude characteristic with respect to the spatial frequency (when the high-frequency component suppression process is executed). It is a figure which compares FIG. 14B).
  • FIG. 14B shows the amplitude characteristics with respect to the spatial frequency when the frequency component of 1 ⁇ 2 or more of the sampling frequency in the subsequent data deletion unit 201 is suppressed.
  • the XY plane shown in the upper part of FIG. 14A is image data (data signal) in which high-frequency components are not suppressed
  • the XY plane shown in the upper part of FIG. 14B is image data (data signals) in which high-frequency components are suppressed.
  • the subsequent processing of the data deleting unit 201 is the same as that in the second embodiment.
  • phase characteristics necessary for matching processing based on phase correlation can be obtained from only low frequency components. Therefore, the parallax can be calculated with high accuracy.
  • the high frequency component is not removed by the linear filter, the high frequency component is superimposed on the low frequency component as aliasing noise when performing the thinning process, and therefore the phase characteristics in the low frequency component change, As a result, the parallax accuracy is degraded.
  • the low frequency component is suppressed by suppressing the high frequency component among the low frequency component and the high frequency component constituting the signal of the standard image and the reference image. Process to extract only the components.
  • each of the base image and the reference image is composed of a plurality of channel images (for example, an R (red) channel image, a G (green) channel image, and a B (blue) channel image).
  • a plurality of channel images for example, an R (red) channel image, a G (green) channel image, and a B (blue) channel image.
  • FIG. 15 shows a configuration of stereo image processing apparatus 400 according to Embodiment 4 of the present invention.
  • the stereo image processing apparatus 400 includes a color image data deletion unit 401.
  • the color image data deletion unit 401 extracts only one channel image (for example, an R channel image) from the standard image and the reference image. As a result, other channel images can be deleted, so that the processing amount in the processing of the image matching unit 102 and the processing of the filter unit 103 in the subsequent stage can be reduced.
  • one channel image for example, an R channel image
  • FIG. 16 is a flowchart for explaining the operation of the stereo image processing apparatus 400.
  • step S41 the color image data deletion unit 401 extracts only one channel image from the standard image and the reference image.
  • FIG. 17 is a diagram for explaining a Bayer array image obtained by a color filter.
  • the Bayer array image is configured with R pixels, G pixels, G pixels, and B pixels as one constituent unit (that is, a color pixel unit).
  • the color image data deletion unit 401 extracts only the R channel image from the image data of the standard image and the reference image.
  • R pixels are arranged every other pixel. Therefore, extracting an optical signal (image signal) of only the R channel image is equivalent to a process of thinning out the image data of the standard image and the reference image.
  • FIG. 18 is an image diagram when extracting only the R channel image, and the same effects as the contents described in FIG. 14 can be obtained.
  • each of the standard image and the reference image is composed of a plurality of channel images
  • the color image data deletion unit 401 is By extracting only one channel image from the plurality of channel images, a thinning reference image and a thinning reference image are formed. Accordingly, the amount of image data can be reduced, and the processing amount of the image matching unit 102 and the filter unit 103 can be reduced.
  • the filter unit 103 performs a filtering process using an anti-phase filter, which is a matching process based on the phase correlation.
  • Phase characteristics sufficient to maintain matching accuracy based on phase correlation can be obtained from only one channel image. Therefore, the parallax calculation accuracy can be maintained even when the above-described thinning process is performed.
  • the S / N ratio can be improved by taking the sum of the luminance signals between the pixels arranged in the direction perpendicular to the baseline length direction.
  • the S / N ratio can be improved by taking the sum of the luminance signals between the pixels arranged in the vertical direction. That is, taking the above-described color pixel unit as an example, the parallax calculation accuracy can be improved by taking the sum of the pixel value of the R pixel and the pixel value of the G pixel existing under the R pixel. Note that in the case where the sum of luminance signals is obtained between pixels arranged in a direction perpendicular to the baseline length direction, the sum of pixel values may be obtained between pixels having the same wavelength.
  • the object whose parallax is calculated has a surface that exists at substantially the same distance from the camera.
  • the S / N ratio can be improved by taking the sum of the pixels arranged in the baseline length direction.
  • the left-right direction is the baseline length direction.
  • the S / N ratio can be improved by taking the sum of the luminance signals between the pixels arranged in the left-right direction. That is, taking the above-described color pixel unit as an example, the parallax calculation accuracy can be improved by taking the sum of the pixel value of the R pixel and the pixel value of the G pixel existing under the R pixel.
  • the horizontal coordinate (X coordinate) is different, and pixels having the same wavelength do not take the sum. This is because the sampling interval of the optical signal is not every other pixel, but is equivalent to sampling while averaging two consecutive pixels, and the frequency characteristics of the optical signal cannot be maintained. For example, R (red), G (green), and G (green) in the Bayer array are not summed.
  • the Bayer array shown here is an example, and the present invention is not limited to this.
  • each of the base image and the reference image includes a plurality of channel images (for example, an R (red) channel image, a G (green) channel image, and a B (blue) channel image. ).
  • the color pixel unit is composed of four pixels, that is, an R pixel, a first G pixel, a second G pixel, and a B pixel, the R pixel, the first G pixel, and the B pixel.
  • the luminance values are linearly combined in the first pixel group.
  • FIG. 19 shows the configuration of a stereo image processing apparatus 500 according to Embodiment 5 of the present invention.
  • the stereo image processing apparatus 500 includes a data deletion unit 501, an image matching unit 502, and a filter unit 503.
  • the data deleting unit 501 forms one channel composite image by linearly combining the luminance values in the first pixel group in two pixel groups into which a plurality of pixels constituting the color pixel unit are divided.
  • This channel composite image is formed for each of the standard image and the reference image. That is, a channel composition reference image and a channel composition reference image are formed.
  • the first pixel group includes R pixel, first G pixel, and B pixel. Consists of pixels.
  • the second pixel group includes second G pixels.
  • the image matching unit 502 basically has the same function as the image matching unit 102. However, the image matching unit 502 sets the channel synthesis standard image and the channel synthesis reference image as processing targets, and performs matching processing based on the channel synthesis standard image and the channel synthesis reference image. The image matching unit 502 outputs the reference point and the “deviation amount n” to the filter unit 503 as a result of the matching process. Note that the image matching unit 502 does not process the reference image of the second pixel group and the reference image of the second pixel group.
  • the filter unit 503 calculates the first filter coefficient and the second filter coefficient based on the channel synthesis reference image for the first pixel group of the reference image and the image of the second pixel group, respectively.
  • the filter unit 503 obtains a first filtering result by filtering the channel synthesis reference image using the first filter coefficient.
  • the filter unit 503 obtains a second filtering result by filtering the images of the second image group of the reference image using the second filter coefficient, using the second filter coefficient.
  • the filter unit 503 obtains a final filtering result by adding the first filtering result and the second filtering result.
  • the final filtering result is output to the peak position detection unit 104.
  • the peak detection accuracy can be improved by detecting the peak position using the final filtering result obtained by adding the first filtering result and the second filtering result.
  • FIG. 20 shows a configuration of stereo image processing apparatus 600 according to Embodiment 6 of the present invention.
  • the stereo image processing apparatus 600 includes a cross-correlation unit 601.
  • the cross-correlation unit 601 cuts out a unit reference image for subpixel estimation from a unit reference image based on corresponding points. Then, the cross-correlation unit 601 calculates the cross-correlation between the sub-pixel estimation unit reference image and the sub-pixel estimation unit reference image.
  • FIG. 21 is a diagram for explaining the cross-correlation processing.
  • the cross-correlation unit 601 cuts out a unit reference image for subpixel estimation from the unit reference image based on the corresponding points.
  • the same second window function as that in the case of the sub-pixel estimation unit reference image is also used for extracting the sub-pixel estimation unit reference image.
  • the second window function is set to the corresponding point (xa + n, ya).
  • an image having a vertical axis size of 1 pixel and a horizontal axis size of “KJ” pixels centered on the corresponding point (xa + n, ya) is extracted as a sub-pixel estimation unit reference image.
  • the cross-correlation unit 601 calculates the cross-correlation between the sub-pixel estimation unit reference image and the sub-pixel estimation unit reference image. This cross-correlation is calculated by equation (7).
  • Equation (3) the inside of ⁇ is equivalent to Equation (3), and the range of addition of ⁇ is from -J to -K.
  • J and K indicate the window function range centered on zero. J and K have opposite signs.
  • the order of addition is different only in the mathematical expression, and a calculation result equivalent to the expression (3) can be obtained. That is, the calculation by the antiphase filter can be replaced with the calculation of the cross correlation. Therefore, even when cross-correlation is used, high-precision sub-pixel level matching can be performed as in the method using the anti-phase filter.
  • FIG. 22 shows a result of comparison of ranging accuracy when the conventional SAD method, the one-dimensional POC method, and the stereo image processing method of the present application (hereinafter, this method) are used.
  • the distance measurement accuracy is indicated by the characteristics of the distance to the distance measurement object and the standard deviation of the distance measurement result.
  • the results shown in FIG. 22 are calculated on the basis of a stereo image that is taken while the distance measurement target is a vehicle and the distance from the stereo camera is changed at 10 m intervals.
  • the standard deviation of the distance measurement result is used in order to eliminate error factors of correction of lens distortion and parallelization correction of the stereo camera.
  • a method with a small standard deviation of the distance measurement result is a highly accurate method.
  • the standard deviation is a variation in distance measurement results.
  • the standard deviation of the distance measurement result is calculated by using, as sample points, pixels in the vehicle area that are visually extracted from among the pixels included in the captured stereo image. For the subpixel estimation of this method, quadratic curve approximation with the least amount of calculation was used. As shown in FIG. 22, the POC method ( ⁇ mark) and the present method ( ⁇ mark) show equivalent characteristics, and the standard deviation is smaller than that of the SAD method ( ⁇ mark).
  • FIG. 23 shows the result of comparing the calculation time of the parallax calculation when the SAD method, the one-dimensional POC method, and the present method are used.
  • the stereo image processing method according to the present invention has a calculation time equivalent to that of the SAD method and can achieve distance measurement accuracy equivalent to that of the one-dimensional POC method. There is an effect.
  • the stereo image acquired by the stereo image acquisition unit is directly input to the image matching unit and the filter unit.
  • the following processing may be performed as preprocessing before input.
  • a parallelization correction unit may be provided in front of the image matching unit and the filter unit, and the parallelization correction unit may perform a distortion correction process for the lens of the stereo image and a parallelization correction process for making the optical axis parallel.
  • the distortion correction process is a process for correcting an object that is a straight line in real space so that it appears in a straight line in a camera image using calibration data prepared in advance.
  • the parallel correction process a coordinate conversion process for converting coordinates so that an object having a constant distance in the optical axis direction of the camera is an object image of the same size no matter where the image is captured in the camera image; And an image shift process in which an object at an infinite point is placed at the same position in two camera images with the optical axes of the two being parallel.
  • the parallelization correction is performed by the image shift process after the coordinate conversion process, but the present invention is not limited to this, and the parallelization correction may be performed by the coordinate conversion simultaneously with the lens distortion correction.
  • the method is not particularly limited as long as both the correction of the distortion of the lens and the correction of the positional relationship between the two cameras can be performed.
  • contrast correction performed by normal image processing or edge enhancement using a Laplacian filter may be performed.
  • contrast correction the dynamic range of the luminance change between the standard image and the reference image can be matched, so that more accurate image matching can be performed.
  • edge enhancement using a Laplacian filter a direct current component (that is, a difference in brightness between the reference image and the reference image) resulting from individual differences between cameras can be excluded, and more accurate image matching is performed. be able to.
  • luminance information sampled in units of pixels (at integer value positions) is converted into luminance information at real value positions.
  • an interlinear method using linear interpolation or a bicubic method using luminance information around the conversion target position may be used.
  • the stereo image processing device described in each of the above embodiments may be provided with a matching error detection unit that detects a pixel level matching error based on the filtering result.
  • the matching error detection unit determines that the pixel level matching is a false matching when the output from the filter unit is not symmetric (that is, bilaterally symmetric).
  • the matching error detection unit detects a matching error when the minimum position of the SAD value and the peak position of the output from the filter unit are different at the pixel level (that is, when no peak appears in the output from the filter unit). Judge that there is. Thereby, it is not necessary to perform back matching processing, and the amount of calculation corresponding to that is reduced.
  • each functional block used in the description of each of the above embodiments is typically realized as an LSI which is an integrated circuit. These may be individually made into one chip, or may be made into one chip so as to include a part or all of them. Although referred to as LSI here, it may be referred to as IC, system LSI, super LSI, or ultra LSI depending on the degree of integration.
  • the method of circuit integration is not limited to LSI, and implementation with a dedicated circuit or a general-purpose processor is also possible.
  • An FPGA Field Programmable Gate Array
  • a reconfigurable processor that can reconfigure the connection and setting of circuit cells inside the LSI may be used.
  • the stereo image processing apparatus and stereo image processing method of the present invention are useful for improving the parallax calculation accuracy while maintaining a processing amount equivalent to that of the SAD method.
  • Stereo image processing apparatus 101 Stereo image acquisition unit 102, 502 Image matching unit 103, 503 Filter unit 104 Peak position detection unit 201, 501 Data deletion unit 301 High frequency component deletion unit 401 Color image Data deletion unit 601 cross-correlation unit

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Measurement Of Optical Distance (AREA)
  • Image Analysis (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

 SAD方式と同等の処理量を維持しつつ、視差の算出精度を向上するステレオ画像処理装置及びステレオ画像処理方法。ステレオ画像処理装置(200)において、データ削除部(201)が、画像マッチング部(102)及びフィルタ部(103)の前段に設けられ、基準画像及び参照画像を間引くことにより、間引き基準画像及び間引き参照画像を形成する。そして、フィルタ部(103)は、位相相関に基づくマッチング処理である、逆位相フィルタを用いたフィルタリング処理を行う。こうして間引き処理をすることにより、マッチング精度を維持しつつ、画像データ量を削減することができ、画像マッチング部(102)及びフィルタ部(103)の処理量を削減できる。さらに、フィルタ部103が位相相関に基づくマッチング処理である、逆位相フィルタを用いたフィルタリング処理を行うので、間引き処理を行っても視差算出精度を維持できる。

Description

ステレオ画像処理装置およびステレオ画像処理方法
 本発明は、ステレオ画像処理装置およびステレオ画像処理方法に関する。
 従来から、ステレオカメラを用いて同一の対象物を撮影したときのステレオ画像(つまり、基準画像及び参照画像)から画像間のズレを算出し、そのズレに基づいて対象物までの距離を測定するステレオ画像処理装置が知られている。
 ステレオ画像処理装置は、例えば、前方車両までの距離を測定する車載装置、又は、車内カメラからドライバーの顔の部品(目や鼻など)までの距離を測定してドライバーの顔の向きを推定する車載装置などへ適用されることが検討されている。
 そして、近年のカメラ(車載カメラ又は車内カメラなど)の小型化により、カメラの基線長(カメラの間隔)が短くなっている。その結果、ステレオ画像間のズレも小さくなることから、ステレオ画像処理装置には、高精度の視差演算機能が要求されるようになってきている。
 また、従来、ステレオ画像処理装置では、ステレオマッチング(ステレオ画像処理の視差演算)の方式として、例えば、SAD(Sum of Absolute Differences)方式、又は、POC(Phase Only Correlation)方式などが用いられている。
 SAD方式では、基準画像から矩形窓を用いて切出された第1の部分画像と、参照画像から同様に矩形窓を用いて切出された第2の部分画像との輝度値の差の絶対値を、部分画像全体で総和をとることにより、SAD値が算出される。SAD値は、画像輝度の相違度を示す。そして、参照画像の矩形窓の位置をカメラの基線長方向に1ピクセルずつずらして行き、SAD値が最小となったときの、基準画像における第1の部分画像の位置と参照画像における第2の部分画像の位置とのズレを「ピクセルレベルの視差」として求める。その後、SAD値が最小になる位置のSAD値と、その両隣(ステレオカメラの基線長方向が水平の場合には左と右)の位置において計算される2つのSAD値を用いて等角直線フィッティングを行ない、「サブピクセルレベルの視差」を算出する。基準画像と参照画像の間のズレは、「ピクセルレベルの視差」に「サブピクセルレベルの視差」を加算したものである。
 SAD方式は、分析分解能が高く、比較的に演算量が少ない。しかしながら、SAD方式は、サブピクセルレベルの視差演算の精度が低い。そのため、視差算出の精度は、1/4~1/16ピクセル程度が限界である。
 そこで、近年では、視差演算の精度が高いPOC方式が注目されている。POC方式では、ハニング窓等により画像切り出しされた第1の部分画像及び第2の部分画像に対して2次元フーリエ変換を施し、得られた2次元フーリエ変換後の第1の部分画像及び第2の部分画像を合成する。そして、その合成画像の振幅成分を正規化した後に、2次元逆フーリエ変換を施すことにより、位相限定相関係数を求める。そして、位相限定相関係数の相関ピークに基づいて画像のズレ量が算出される。
 このようなPOC方式(2次元POC方式という)には、視差演算の精度が非常に高いという利点がある。ところが、2次元POC方式は視差演算の演算量が膨大であり、短時間で演算処理を行うことが極めて困難である。また、2次元POC方式は、分析分解能(距離の異なる物体を区別して測距できる画面上での大きさ)の点で、SAD方式より劣っている。
 そこで、最近では、2次元POC方式の演算量を軽減した1次元POC方式も提案されている(例えば、特許文献1参照)。この1次元POC方式では、ハニング窓等により画像切出しされた第1の部分画像及び第2の部分画像に対して1次元フーリエ変換を施し、1次元フーリエ変換後の第1の部分画像及び第2の部分画像を合成する。そして、その合成画像の振幅成分を正規化した後に、1次元逆フーリエ変換を施すことにより、位相限定相関係数を求めている。すなわち、2次元フーリエ変換の代わりに、1次元フーリエ変換を行うことにより、演算量の削減を図っている。
特開2008-123141号公報
 しかしながら、従来の1次元POC方式を用いても視差演算に要する演算量は、SAD方式に比べれば膨大である。従って、従来の1次元POC方式を用いても、短時間で演算処理を行うことは容易ではない。また、この1次元POC方式は、分析分解能(距離の異なる物体を区別して測距できる画面上での大きさ)の点で、SAD方式より劣る。
 本発明の目的は、SAD方式と同等の処理量を維持しつつ、視差の算出精度を向上するステレオ画像処理装置及びステレオ画像処理方法を提供することである。
 本発明の一態様のステレオ画像処理装置は、基準画像及び参照画像を含むステレオ画像を取得する取得手段と、前記基準画像及び前記参照画像を間引くことにより、間引き基準画像及び間引き参照画像を形成する間引き手段と、前記間引き基準画像と前記間引き参照画像とのピクセル単位のズレ量を算出する第1の算出手段と、前記間引き基準画像内の輝度値から成るデータ列のデータ順序を反転させることにより逆位相フィルタ係数を算出し、前記間引き参照画像を前記算出された逆位相フィルタ係数を用いてフィルタリングし、フィルタリング結果を出力するフィルタリング処理手段と、前記フィルタリング処理手段から出力されたフィルタリング結果におけるピークを検出することにより、前記間引き基準画像と前記間引き参照画像とのサブピクセル単位のズレ量を算出する第2の算出手段と、を具備する。
 本発明の一態様のステレオ画像処理方法は、基準画像及び参照画像を含むステレオ画像を取得し、前記基準画像及び前記参照画像を間引くことにより、間引き基準画像及び間引き参照画像を形成し、前記間引き基準画像と前記間引き参照画像とのピクセル単位のズレ量を算出し、前記間引き基準画像内の輝度値から成るデータ列のデータ順序を反転させることにより逆位相フィルタ係数を算出し、前記間引き参照画像を前記算出された逆位相フィルタ係数を用いてフィルタリングし、フィルタリング結果におけるピークを検出することにより、前記間引き基準画像と前記間引き参照画像とのサブピクセル単位のズレ量を算出する。
 本発明によれば、SAD方式と同等の処理量を維持しつつ、視差の算出精度を向上するステレオ画像処理装置及びステレオ画像処理方法を提供することができる。
本発明の実施の形態1に係るステレオ画像処理装置の構成を示すブロック図 ステレオ画像処理装置の動作説明に供するフロー図 画像マッチング部の処理の説明に供する図 サブ単位演算処理の詳細を示すフロー図 フィルタ部の処理の説明に供する図 フィルタ算出処理及びフィルタリング処理の説明に供する図 sinc関数を用いたピーク位置検出の説明に供する図 二次曲線近似を用いたピーク位置検出の説明に供する図 本発明の実施の形態2に係るステレオ画像処理装置の構成を示すブロック図 ステレオ画像処理装置の動作説明に供するフロー図 間引き処理が実行されない場合に得られる光信号(画像信号)と、間引き処理が実行された場合に得られる光信号とを比較する図 本発明の実施の形態3に係るステレオ画像処理装置の構成を示すブロック図 ステレオ画像処理装置の動作説明に供するフロー図 高周波数成分の抑制処理が実行されない場合に得られる、空間周波数に対する振幅特性と、高周波数成分の抑制処理が実行された場合に得られる、空間周波数に対する振幅特性とを比較する図 本発明の実施の形態4に係るステレオ画像処理装置の構成を示すブロック図 ステレオ画像処理装置の動作説明に供するフロー図 カラーフィルタによって得られるベイヤ配列画像の説明に供する図 Rチャネル画像のみの光信号(画像信号)を示す図 本発明の実施の形態5に係るステレオ画像処理装置の構成を示すブロック図 本発明の実施の形態6に係るステレオ画像処理装置の構成を示すブロック図 相互相関処理の説明に供する図 従来のSAD方式、一次元POC方式、及び、本願のステレオ画像処理方法を用いた場合の測距精度を比較する図 SAD方式、一次元POC方式、及び本方式を用いた場合における視差計算の演算時間を比較する図
 以下、本発明の実施の形態について図面を参照して詳細に説明する。なお、実施の形態において、同一の構成要素には同一の符号を付し、その説明は重複するので省略する。
 [実施の形態1]
 [ステレオ画像処理装置100の構成]
 図1は、本発明の実施の形態1に係るステレオ画像処理装置100の構成を示す。図1において、ステレオ画像処理装置100は、ステレオ画像取得部101と、画像マッチング部102と、フィルタ部103と、ピーク位置検出部104とを有する。
 <ステレオ画像取得部101>
 ステレオ画像取得部101は、2つ以上の撮像系(つまり、カメラ)で撮影されたステレオ画像を取得する。ステレオ画像には、2つの異なる撮像系によって同一対象物が撮影された基準画像及び参照画像が含まれる。
 <画像マッチング部102>
 画像マッチング部102は、ステレオ画像取得部101で取得された基準画像及び参照画像に基づいて画像マッチング処理を行うことにより、基準画像と参照画像との「ズレ量n」を算出する。画像マッチング部102で算出されるズレ量nの単位は、例えば、ピクセルである。一方、後述するピーク位置検出部104によって得られる、基準画像と参照画像との「視差」の単位は、例えば、サブピクセルである。すなわち、画像マッチング部102では、基準画像と参照画像とのズレが所定の検出単位で粗く検出され、その後に、ピーク位置検出部104によってズレがサブ単位で細かく検出される。
 具体的には、画像マッチング部102は、基準画像に含まれる任意の1ピクセルを「基準点」とし、基準点を中心とした周辺の部分画像(以下、「単位基準画像」という)を基準画像から切り出す。また、画像マッチング部102は、単位基準画像と同一サイズの部分画像(以下、「単位参照画像」という)を、参照画像の異なる位置から複数切り出す。そして、画像マッチング部102は、切り出された複数の単位参照画像から、単位基準画像とのマッチング度が最大である単位参照画像を抽出する。
 この抽出された単位参照画像において、「基準点」に対応する1ピクセルが、参照画像上の「対応点」になる。マッチング度を表す指標としては、例えば、輝度相違度を示すSAD値が用いられる。ステレオカメラの場合、基準画像と参照画像との視差はカメラの基線長方向にのみ発生するため、複数の単位参照画像を切り出す場合、基線長方向に切出し位置を変更して切り出せばよい。そして、基準画像における基準点の位置と、参照画像における対応点の位置とのズレ量が、上記したズレ量nとして算出される。
 <フィルタ部103>
 フィルタ部103は、画像マッチング部102から基準点の位置、及びズレ量n、並びに、ステレオ画像取得部101からステレオ画像を取得する。
 そして、フィルタ部103は、基準画像に基づいてフィルタ係数を算出し、算出されたフィルタ係数を用いて参照画像をフィルタリングする。すなわち、フィルタ部103は、まず、基準画像から部分画像をサブピクセル推定用単位基準画像として抽出し、当該サブピクセル推定用単位基準画像からフィルタ係数を算出する。フィルタ部103は、次に、参照画像から部分画像をサブピクセル推定用単位参照画像として抽出し、当該サブピクセル推定用単位参照画像に対して、算出したフィルタ係数を用いてフィルタリング処理を行い、フィルタリング結果をピーク位置検出部104へ出力する。
 <ピーク位置検出部104>
 ピーク位置検出部104は、フィルタ部103から取得されたフィルタリング結果におけるピーク位置を検出することにより、サブピクセル推定用単位基準画像とサブピクセル推定用単位参照画像とのサブピクセル単位のズレ量を算出する。ここで、ピーク位置は、フィルタリング結果が最大値となる位置である。このサブピクセル単位のズレと、ピクセル単位のズレ量nとの和が、基準画像と参照画像の正確なズレ量である。
 [ステレオ画像処理装置100の動作]
 以上の構成を有するステレオ画像処理装置100の動作について説明する。なお、以下では、画像横方向をX軸、画像縦方向をY軸として、1画素が1座標点であるものとして説明する。
 図2は、ステレオ画像処理装置100の動作説明に供するフロー図である。なお、以下では、基準画像における任意の1つの基準点についての処理を説明するが、ステレオ画像処理装置100では、基準点を順次変更することにより基準画像における測距対象領域全ての画素について視差が算出される。
 <分析基準位置決定処理>
 ステップS1で、画像マッチング部102は、分析基準位置を決定する。分析基準位置とは、基準画像において視差を算出する対象となる1座標点であり、上述した基準点である。
 <単位基準画像の切出し処理>
 ステップS2で、画像マッチング部102は、ステレオ画像取得部101から受け取る基準画像から、ステップS1で決定された分析基準位置を基準とした部分画像である、単位基準画像を切り出す。この単位基準画像の大きさの単位は、例えば、ピクセルである。
 <サーチ範囲及びサーチ開始位置の決定処理>
 ステップS3で、画像マッチング部102は、ステップS2で決定された分析基準位置に基づいて、参照画像におけるサーチ範囲及びサーチ開始位置を決定する。ステレオカメラの視差は、カメラ間の距離である基線長およびレンズの焦点距離、ならびにステレオカメラから対象物までの距離により決定される。よって、サーチ範囲は、ステレオカメラから測距の対象物までの距離に基づいて決定すればよい。また、ステレオカメラから無限遠にある対象物は基準画像と参照画像の同じ位置に撮像されるため、参照画像におけるサーチ開始位置は基準画像における基準点と同じ座標を設定すればよい。
 <単位参照画像の切出し処理>
 ステップS4で、画像マッチング部102は、ステレオ画像取得部101から受け取る参照画像から、ステップS3で決定されたサーチ開始位置を中心とした周辺の部分画像を単位参照画像として切り出す。この単位参照画像の大きさの単位は、例えば、ピクセルである。
 <マッチング度の算出処理>
 ステップS5で、画像マッチング部102は、単位基準画像と単位参照画像とのマッチング度を算出する。このマッチング度には、例えば、輝度相違度を示すSAD値や輝度類似度が用いられる。
 <サーチ範囲の終了判定処理>
 ステップS6で、画像マッチング部102は、サーチ範囲の終了判定処理を行う。ここでサーチ範囲が終了していないと判定される場合(ステップS6:NO)には、画像マッチング部102は、ステップS3で決定したサーチ範囲内において切り出す位置を1ピクセルずらして、ステップS4で新たな単位参照画像を切り出す。このようにして、ステップS4~S6までの処理は、サーチ範囲が終了するまで繰り返される。
 <マッチング度の最大位置>
 ステップS7で、画像マッチング部102は、ステップS4~S6の処理によって得られた複数のマッチング度に基づいて、マッチング度が最大となる単位参照画像を特定する。マッチング度として輝度相違度を用いられている場合には、画像マッチング部102は、輝度相違度が極小ないし最小となる単位参照画像を特定する。
 ここで、ステップS2~ステップS7の処理を、図3を参照して具体的に説明する。
 ステップS2で、図3に示すように、画像マッチング部102は、分析基準位置を中心とした周辺の部分画像を単位基準画像として切り出す。単位基準画像の切出しには、所定サイズの矩形窓(縦サイズ:wvピクセル、横サイズ:whピクセル)が用いられる。図3において、分析基準位置は、基準点(xa,ya)である。
 なお、ここでは、窓関数によって規定される矩形窓の中心と分析基準位置とを一致させるものとして説明を行うが、厳密に中心でなくても、矩形窓の中心付近に分析基準位置が存在していればよい。
 次に、画像マッチング部102は、ステップS3で、ステップS1において決定された分析基準位置に基づいて、参照画像におけるサーチ範囲及びサーチ開始位置を決定する。サーチ開始位置(参照画像において単位参照画像を切り出す初期座標)は、例えば、基準画像における分析基準位置と同じ座標(xa,ya)が用いられる。
 次に、画像マッチング部102は、ステップS4で、参照画像から、サーチ開始位置を中心とした周辺の部分画像を単位参照画像として切り出す。この単位参照画像の切出しには、単位基準画像の切出しに用いられる矩形窓と同じ矩形窓が用いられる。
 そして、画像マッチング部102は、ステップS5で、単位基準画像と単位参照画像とのマッチング度を算出する。このマッチング度には、例えば、輝度相違度を示すSAD値が用いられる。このSAD値は、次の式(1)によって算出される。
Figure JPOXMLDOC01-appb-M000001
 そして、画像マッチング部102は、ステップS6で、サーチ範囲が終了していないと判定される場合には、切り出す位置をずらして新たな単位参照画像を参照画像から切り出す。切り出す位置は、ここでは1ピクセルずつずらされる。ずらす方向は、図3における参照画像の座標(xa,ya)から伸びる右矢印の方向である。
 このようにして、単位基準画像と複数の単位参照画像とのマッチング度(例えば、SAD値)が算出される。そして、画像マッチング部102は、ステップS7で、ステップS4~S6の処理によって得られた複数のマッチング度に基づいて、マッチング度が最大となる単位参照画像を特定する。具体的には、画像マッチング部102は、複数のSAD値のうち、例えば最小のSAD値に対応する単位参照画像を特定する。この特定された単位参照画像における「基準点」に対応する1ピクセルが、参照画像上の「対応点」になる。対応点の座標を(xa+n、ya)とすると、nは、ピクセル単位のズレ量となる。
 なお、ここでは、マッチング度の指標としてSAD値を用いたが、本発明はこれに限定されるものではなく、マッチング度の指標として用いることができるものであれば代用することができる。例えば、SSD(Sum of Squared Differences)が用いられてもよい。
 <サブ単位演算処理>
 ステップS8で、フィルタ部103及びピーク位置検出部104は、ステップS7で得られた対応点、並びに、ステレオ画像取得部101から受け取る基準画像及び参照画像に基づいて、サブ単位演算処理を行う。
 図4は、サブ単位演算処理の詳細を示すフロー図である。図5は、サブ単位演算処理の概念の説明に供する図である。
 (サブピクセル推定用単位基準画像の切出し処理)
 ステップS11で、フィルタ部103は、基準画像からサブピクセル推定用単位基準画像を切り出す。
 また、サブピクセル推定用単位基準画像の切出しには、窓関数が用いられる。窓関数には、例えば、式(2)で表されるハニング窓の窓関数w(m)を用いることができる。
Figure JPOXMLDOC01-appb-M000002
 なお、ここでは、ハニング窓の窓関数を用いる場合について説明するが、本発明はこれに限定されるものではなく、窓関数として、ハミング窓、ブラックマン窓、カイザー窓などを用いてもよい。これらの窓関数は、サブピクセル推定用単位基準画像の特性(例えば、周波数パワー特性、位相特性、切出し端連続性)の内、どの特性を重要視するかによって選択される。例えば、位相特性を重要視するときカイザー窓が選択され、演算量削減を重要視するときハニング窓が選択される。
 ここで、サブピクセル推定用単位基準画像の切出し処理では、サブピクセル単位のズレを正確に求めるために、切り出された画像にノイズが含まれないことが重要である。一方、画像マッチング部102における画像切出し処理では、例えば、ピクセル単位で行われるため、精度よりも演算回数を削減することが重要である。従って、画像マッチング部102で用いられる第1の窓関数には、単に画像データを切り出すだけの窓関数が用いられる。
 これに対して、サブピクセル単位での画像切出し処理で用いられる第2の窓関数は、ノイズが少ないことが重要視されるため、第1の窓関数に比べて、窓の両端における変化が連続的である関数(つまり、1周期の最初及び最後の値がゼロである関数)であることが好ましい。このような第2の窓関数を用いることにより、サブピクセル推定用単位基準画像の信号列の連続性が保たれ、切出しによるノイズ成分を低減することができる。
 なお、第1の窓関数と第2の窓関数とを周波数特性について比較すると、第1の窓関数の方が、第2の窓関数よりも、メインローブ(main-lobe)の幅が狭く、サイドローブ(side-lobe)の振幅が大きい。
 図5において、第2の窓関数w(m)は、縦軸サイズが1ピクセル(画素)であり横軸サイズが“K-J”ピクセルであるハニング窓が用いられている。そして、mは、J以上K以下の整数である。そして、第2の窓関数w(m)は、基準点(xa,ya)を中心に設定される。これにより、サブピクセル推定用単位基準画像として、基準点(xa,ya)を中心に、縦軸サイズが1ピクセルであり横軸サイズが“K-J”ピクセルである画像が切り出される。図5において、f’(m)は、サブピクセル推定用単位基準画像の輝度信号列を表している。
 (サブピクセル推定用単位参照画像の切出し処理)
 ステップS12で、フィルタ部103は、参照画像から、ステップS7で検出された対応点を中心としたサブピクセル推定用単位参照画像を切り出す。サブピクセル推定用単位参照画像の切出し処理において、サブピクセル推定用単位基準画像の場合と同じ第2の窓関数が用いられる。ただし、第2の窓関数は、対応点(xa+n、ya)を中心に設定される。これにより、サブピクセル推定用単位参照画像として、対応点(xa+n,ya)を中心に、縦軸サイズが1ピクセルであり横軸サイズが“K-J”ピクセルである画像が切り出される。図5において、g’(m)は、サブピクセル推定用単位参照画像の輝度信号列を表している。
 なお、以上の説明では、縦軸サイズが1ピクセル(画素)で、横軸サイズが“K-J”ピクセルである第2の窓関数w(m)を用いているが、このサイズは一例であり、これに限定されるものではない。例えば、縦軸サイズが3ピクセルである第2の窓関数を用いてもよい。その場合には、まず、第2の窓関数を用いて、基準画像と参照画像それぞれから、縦軸サイズが3ピクセルである部分画像を切り出す。そして、切り出した部分画像において、座標の縦軸の値が同じである3つの画素の輝度の平均(平均輝度)を算出し、平均輝度によって構成される、縦軸サイズが1ピクセルのサブピクセル推定用単位基準画像、或いは、サブピクセル推定用単位参照画像としてもよい。
 また、縦軸サイズが1ピクセルの第2の窓関数を用いた場合でも、例えば、上の行と下の行を含む3行でそれぞれ切り出された部分画像において、座標の縦軸の値が同じである画素の輝度値の平均を算出し、平均輝度によって構成される、サブピクセル推定用単位基準画像、或いは、サブピクセル推定用単位参照画像としてもよい。なお、平均輝度を算出する際には、重み付けをして加算した上で算出てもよい。この場合に用いられる重み付け係数は、2次元POCのように、窓関数によって決定されてもよい。このように、近傍のピクセルの平均輝度を用いることにより、ノイズに対してロバストになる。
 (フィルタ算出処理)
 ステップS13で、フィルタ部103は、サブピクセル推定用単位基準画像に基づいて逆位相フィルタ係数を算出する。具体的には、フィルタ部103は、サブピクセル推定用単位基準画像における各座標の輝度値を順番に並べた信号列(つまり、輝度値信号列)を逆の順番に並べ換える(つまり、反転させる)ことにより、逆位相フィルタ係数を算出する。すなわち、逆位相フィルタのタップ長は、サブピクセル推定用単位基準画像の横軸サイズ(つまり、窓関数の窓長)と等しい。
 (フィルタリング処理)
 ステップS14で、フィルタ部103は、ステップS13で算出された逆位相フィルタ係数を用いてサブピクセル推定用単位参照画像をフィルタリングし、フィルタリング結果をピーク位置検出部104へ出力する。
 ここで、上記した逆位相フィルタ係数算出処理及びフィルタリング処理の詳細について、図6を参照して説明する。図6においては、窓関数w(m)の窓長(K-J)が5画素であり、サブピクセル推定用単位基準画像の輝度値信号列が「1,2,3,4,5」であるものとして説明する。また、サブピクセル推定用単位参照画像の輝度値信号列x(m)は、「1,2,3,4,5」である。
 サブピクセル推定用単位基準画像の輝度値信号列が「1,2,3,4,5」の場合、逆位相フィルタ係数h(k)として、「5,4,3,2,1」が算出される。
 そして、フィルタ部103は、逆位相フィルタ係数h(k)を用いて、サブピクセル推定用単位参照画像の輝度値信号列に対してフィルタリング処理を施す。
 具体的には、サブピクセル推定用単位参照画像の任意の構成信号の座標をkとした場合、構成信号の座標が「k-2、k-1、k、k+1、k+2」となる信号列に対して、逆位相フィルタ係数h(k)を乗算することによりフィルタリング処理が施され、各乗算結果の総和z(m)が算出される。ここで、mは整数値をとる。
 ここで、サブピクセル推定用単位参照画像の周辺の座標点における輝度がゼロである場合には、サブピクセル推定用単位参照画像の周辺の座標点の輝度を考慮すると、サブピクセル推定用単位参照画像の両隣の2ピクセルずつを含む画像の輝度値信号列x(m)は、「0,0,1,2,3,4,5,0,0」となる。図6におけるm(m:0~4)をサブピクセル推定用単位参照画像の座標点とした場合(つまり、x(0)=1、x(1)=2、x(2)=3、x(3)=4、x(4)=5)、フィルタリング処理は、次のように行われる。
 m=0の場合には、m=0を中心とする輝度値信号列「0、0、1、2、3」が逆位相フィルタ「5、4、3、2、1」によってフィルタリング処理され、総和z(0)は、26(=0×1+0×2+1×3+2×4+3×5)となる。
 m=1の場合には、m=1を中心とする輝度値信号列「0、1、2、3、4」が逆位相フィルタ「5、4、3、2、1」によってフィルタリング処理され、総和z(1)は、40(=0×1+1×2+2×3+3×4+4×5)となる。
 同様にして、総和z(2)は、55となり、総和z(3)は、40となり、総和z(4)は、26となる。
 従って、信号列z(m)として「26、40、55、40、26」が得られる。
 このようなフィルタリング処理は、次の式(3)によって表される。
Figure JPOXMLDOC01-appb-M000003
 式(3)において、サブピクセル推定用単位基準画像の輝度値信号列が反転されたf’(-k)は、逆位相フィルタのフィルタ係数h(k)として用いられている。また、g’(m)は、サブピクセル推定用単位参照画像の輝度値である。
 信号列z(m)が示すように、逆位相フィルタを用いたフィルタリング処理の処理結果は、対称(図6では、m=2を中心として左右対称)であって、且つ中央付近にピークが存在するという特徴を有する。また、逆位相フィルタは、いわゆるFIRフィルタの一種であり、線形推移不変システムであるという特徴を有する。ここで、線形推移不変システムとは、入力信号にズレがある場合には、出力信号にも入力信号と同じだけのズレが生じるシステムである。すなわち、上記した具体例では、サブピクセル推定用単位基準画像とサブピクセル推定用単位参照画像との間にズレがない場合を例にとって説明したが、サブピクセル推定用単位参照画像がサブピクセル推定用単位基準画像に対してサンプリング間隔より小さなズレが存在する場合、フィルタリング結果である信号列z(m)にも同じだけのズレが生じることになる。
 なお、逆位相フィルタのタップ長は、ピクセル単位のマッチングで検出されたピクセル単位のズレ量nの大きさに応じて設定される。例えば、ピクセル単位のズレ量nが小さい場合には、それに応じて逆位相フィルタのタップ長も短く設定される。すなわち、実空間において同じサイズの物体の視差を求める場合、物体が遠くに存在する場合は近くに存在する場合よりも視差は小さく、ピクセル単位のズレ量nも小さくなる。それと同時に、画像中に撮影されるサイズも小さくなるため、ズレ量nの大きさに応じてサブピクセル推定用単位基準画像及びサブピクセル推定用単位参照画像のサイズを変更することにより、逆位相フィルタのタップ長も適応的に変更することができる。これにより測距対象の物体のサイズに合わせた視差を算出することができる。
 また、フィルタリング結果は、線形推移不変システムの出力であるので、レンズの歪補正の誤差、CCDなどのイメージセンサに起因するゲインノイズ等の誤差、窓掛けによる画像切出しの演算精度の誤差を除けば、理論的には真のズレ量を表現していることになる。よって、ピクセル単位で離散化されている逆位相フィルタの出力をサンプリング定理に従ってピクセル間の数値を補間することにより、サブピクセル単位での真のピーク位置を求めることができる。
 (ピーク位置の検出処理)
 ステップS15で、ピーク位置検出部104は、フィルタリング結果におけるピーク位置を検出する。このピーク位置に基づいて、基準画像と参照画像とのサブピクセル単位のズレ量を検出することができる。
 このピーク位置の検出には、sinc関数が用いられる。sinc関数は、sin(πx)/πxで定義される関数であり、離散化されたサンプリングデータを元の連続データに戻す場合に用いられる関数である。サンプリングされた離散データとsinc関数との畳み込み演算を行うことにより、元の連続データを完全に復元可能であることが、サンプリング定理によって証明されている。
 従って、離散化されているフィルタリング結果をsinc関数によって畳み込み演算することにより、ピクセル単位間隔の信号データを補間することができ、サブピクセル単位でも理論的に信号データが補間されたフィルタリング結果z(m)の真のピーク位置を導出することができる。
 図7は、sinc関数を用いたピーク位置検出の説明に供する図であり、曲線701は、S14で算出したフィルタリング結果である信号列z(m)とsinc関数との畳み込み演算を行った結果の例である。フィルタリング結果z(1)とz(2)の間の数値と、z(2)とz(3)の間の信号データが補間されている。ピーク位置検出部104は、信号データが補間されたフィルタリング結果z(m)のピーク位置を2分探索によって検出する。
 図7は、フィルタリング結果である信号列z(m)において、m=2のときにピークが現れている場合の例を示している。このような場合、ピーク位置検出部104は、m=2を位置A(つまり、2分探索基準点)とする。そして、ピーク位置検出部104は、その位置Aから左右に1ピクセルずつずれた位置のフィルタリング結果であるz(3)とz(1)とを比較し、値が大きい方の位置(ここでは、m=3)を位置B(つまり、2分探索使用点)とする。
 そして、ピーク位置検出部104は、2分探索基準点Aと2分探索使用点Bとの中点である位置C(図7においては、m=1/2)の値702を、サンプリング定理に基づいて以下の式(4)を用いて算出する。
Figure JPOXMLDOC01-appb-M000004
 そして、ピーク位置検出部104は、位置Cを新たな2分探索基準点として、上記と同様の処理を繰り返す。この処理の繰り返し回数は、必要なサブピクセル精度に応じた数とすることができる。すなわち、必要なサブピクセル精度が1/2ピクセルであれば、上記した処理を1回行えば良く、1/4ピクセル精度であれば2回、1/8ピクセルであれば3回と、必要なサブピクセル精度に応じて繰り返し回数が決定される。そして、ピーク位置検出部104は、最後に得た中点を、検出したピーク位置δとして扱う。
 なお、以上の説明では、sinc関数及び2分探索方を用いてピーク位置を検出する方法について説明を行った。しかしながら、本発明はこれに限定されるものではなく、sinc関数及び勾配法の組み合わせによって、ピーク位置を探索してもよい。要は、離散化されているフィルタリング結果をsinc関数によって畳み込み演算することにより、ピクセル単位間隔の信号データを補間した後に、いずれの最大値検出方法も用いることができる。
 又は、ピーク位置検出部104は、二次曲線近似を用いてピーク位置を検出してもよい。これにより、演算量を削減することができる。二次曲線近似を用いたピーク位置の検出処理では、離散化されているフィルタリング結果を二次曲線でフィッティングし、その二次曲線の極大値の位置を、ピーク位置として検出する。これにより、離散化の間隔以下の精度でピーク位置を求めることができる。
 図8は、二次曲線近似を用いたピーク位置検出の説明に供する図である。図8に示すように、ピクセル単位間隔のフィルタリング結果z(m)が最大となる位置m=0における値z(0)と、その最大位置から左右に1ピクセルずつずれた位置のフィルタリング結果であるz(+1)とz(-1)との3点を通り二次曲線を求め、さらにその二次曲線が極大値をとる位置を、ピーク位置δとして検出する。このピーク位置δは、次の式(5)によって算出される。
Figure JPOXMLDOC01-appb-M000005
 基準画像における分析基準位置の視差は、ピクセル単位のズレnとサブピクセル単位のずれδを加算することによって求められる。
 <測距対象領域の終了判定処理>
 ステップS9では、測距対象領域の終了判定処理が行われ、未だステップS1~ステップS8までの処理が行われていない未処理領域が存在する場合には、分析基準位置をずらしてその未処理領域についてステップS1~ステップS8までの処理を行う。
 以上のように本実施の形態によれば、ステレオ画像処理装置100において、画像マッチング部102が、基準画像と参照画像とのピクセル単位のズレ量を算出する。そして、フィルタ部103が、基準画像内の輝度値から成るデータ列のデータ順序を反転させることにより逆位相フィルタ係数を算出し、算出した逆位相フィルタ係数を用いて参照画像をフィルタリングする。そして、ピーク位置検出部104が、フィルタリング結果におけるピークを検出することにより、基準画像と参照画像とのサブピクセル単位のズレ量を算出する。視差は、ピクセル単位のズレ量とサブピクセル単位のズレ量を加算することによって求められる。
 [実施の形態2]
 実施の形態2では、基準画像及び参照画像を間引いた後に、画像マッチング部102の処理及びフィルタ部103の処理を行う。これにより、処理量が削減される。
 [ステレオ画像処理装置200の構成]
 図9は、本発明の実施の形態2に係るステレオ画像処理装置200の構成を示す。図9において、ステレオ画像処理装置200は、データ削除部201を有する。
 データ削除部201は、基準画像及び参照画像の画像データを間引くことにより、間引き基準画像及び間引き参照画像を形成する。具体的には、データ削除部201は、所定のサンプリング周期によってサンプリングすることにより、基準画像及び参照画像の画像データを間引く。
 データ信号を間引くことによりダウンサンプリングする場合、間引く前後のデータ信号が、互いに情報量が同じであるようにするためには、データ信号を間引く前にローパスフィルタを用いて帯域制限する必要がある。すなわち、元のデータ信号に対してローパスフィルタを用いて帯域制限し、帯域制限されたデータ信号に対して、間引きをすることで、間引き後のデータ信号(ダウンサンプリングされたデータ信号)を得る。このようにすることで、帯域制限されたデータ信号は、この帯域制限されたデータを間引いたデータ信号と比較して、データ量は多いが、情報量は等しくなる。
 カメラを用いる場合には、レンズの焦点距離を調整することにより、画像データ(データ信号)の高帯域成分を取り除くことが可能である。つまり、データ信号を間引く前に、ぼけた画像(解像度を落とした画像)にしておくことにより、間引き前のデータ信号と間引き後のデータ信号を同等とみなすことができる。例えば、横640×縦480の解像度を持つVGA画像を、横320×縦240の解像度を持つQVGA画像に縮小する場合、解像度が半分になるようにレンズの焦点距離を調整して撮影し、得られた画像データを1画素置きにサンプリングすればよい。
 この間引き基準画像及び間引き参照画像は、画像マッチング部102及びフィルタ部103へ出力される。従って、ステレオ画像処理装置200において、画像マッチング部102及びフィルタ部103は、間引き基準画像及び間引き参照画像を処理対象とする。
 [ステレオ画像処理装置200の動作]
 以上の構成を有するステレオ画像処理装置200の動作について説明する。なお、本実施の形態のステレオ画像取得部101は、カメラのレンズの焦点距離を調整することにより、高周波成分を取り除いたぼけた画像(解像度を落とした画像)を取得し、データ削除部201に受け渡すものとする。
 図10は、ステレオ画像処理装置200の動作説明に供するフロー図である。
 ステップS21で、データ削除部201は、基準画像及び参照画像の画像データを間引くことにより、間引き基準画像及び間引き参照画像を形成する。
 図11は、間引き処理が実行されない場合に得られる光信号(画像信号)(図11A)と、間引き処理が実行された場合に得られる光信号(図11B)とを比較する図である。図11Aおよび図11Bのそれぞれの上段のXY平面は、いずれも解像度が半分になるようにレンズの焦点距離が調整された状態で撮影された画像(基準画像又は参照画像)であるとする。つまり、XY平面で示される画像は、元の画像から高周波成分が取り除かれている状態である。また、XY平面に含まれる複数の矩形は、それぞれ画素を示している。
 図11Aにおける光信号は、XY平面に含まれる白い矩形で示される画素(つまり、全ての画素)から得られている(つまり、間引き処理が実行されていない)。また、図11Bにおける光信号は、XY平面に含まれる白い矩形で示される画素(つまり、1画素おき)から得られている(つまり、間引き処理が実行されている)。図11A(間引き処理が実行されていない場合)、図11B(間引き処理が実行されている場合)のいずれの場合も、解像度を半分にすることにより元の画像の高周波成分が取り除かれている。また、画素を等間隔にサンプリングしているため、サンプリング定理により、それぞれの場合において再現される光信号を同等とみなすことが可能となる。
 一方、間引き処理でなく、例えば、複数画素(例えば、4画素)で平均をとる場合でも、画像データ量を削減することはできるが、この処理は線形処理ではないため、以後の処理において信号処理理論を前提とした処理が無意味になる。
 ここで、位相相関に基づかない一般的なマッチング処理では、理論的には、式(6)に示すように、解像度が画素ピッチに影響し、精度を劣化させてしまう場合がある。例えば、解像度が1/2になった場合には、画素ピッチが2倍となるため、マッチング方式の視差算出精度とは関係なく、距離誤差は約2倍となる。
Figure JPOXMLDOC01-appb-M000006
 本発明の特徴とする位相相関に基づいたマッチングの場合には、レンズの焦点距離の調整により画像データの高周波成分が取り除かれていても、それ以外の帯域の画像データのみから、位相相関を正確に計算するために必要な位相特性を取得することができる。つまり、間引き処理をすることにより、画像データ量を削減して演算量の削減を行っても、マッチング精度を理論的には維持することができる。
 以上のように本実施の形態によれば、ステレオ画像処理装置200において、データ削除部201が、画像マッチング部102及びフィルタ部103の前段に設けられ、基準画像及び参照画像の画像データを間引くことにより、間引き基準画像及び間引き参照画像を形成する。そして、フィルタ部103は、位相相関に基づくマッチング処理である、逆位相フィルタを用いたフィルタリング処理を行う。
 このように間引き処理をすることにより、マッチング精度を維持しつつ、画像データ量を削減することが可能となり、画像マッチング部102及びフィルタ部103の処理量を削減することができる。さらに、フィルタ部103が位相相関に基づくマッチング処理である、逆位相フィルタを用いたフィルタリング処理を行うので、間引き処理を行っても視差算出精度を維持することができる。
 [実施の形態3]
 実施の形態3では、実施の形態2における間引き処理の前段に、基準画像及び参照画像の画像データ(データ信号)を構成する低周波数成分及び高周波数成分の内、高周波数成分を抑制することにより、低周波数成分のみを抽出する処理を行う。これにより、ステレオ画像を他の用途にも応用する場合などで、レンズの焦点距離を調整することにより、ぼけた画像にすることが望ましくない場合にも精度劣化を防止して演算量を削減することができる。
 [ステレオ画像処理装置300の構成]
 図12は、本発明の実施の形態3に係るステレオ画像処理装置300の構成を示す。図12において、ステレオ画像処理装置300は、高周波成分削除部301を有する。
 高周波成分削除部301は、基準画像及び参照画像の画像データ(データ信号)を構成する低周波数成分及び高周波数成分の内、高周波数成分を抑制することにより、低周波数成分のみを抽出する処理を行う。高周波数成分とは、ここでは、データ削除部201におけるサンプリング周波数の1/2周波数以上の成分をいう。高周波成分削除部301は、例えば、低域通過フィルタ(ローパスフィルタ)で構成される。このフィルタは、FIRフィルタなどの線形フィルタであればよい。
 [ステレオ画像処理装置300の動作]
 以上の構成を有するステレオ画像処理装置300の動作について説明する。図13は、ステレオ画像処理装置300の動作説明に供するフロー図である。
 ステップS31で、高周波成分削除部301は、基準画像及び参照画像の画像データ(データ信号)を構成する低周波数成分及び高周波数成分の内、高周波数成分を抑制することにより、低周波数成分のみを抽出する処理を行う。
 図14は、高周波数成分の抑制処理が実行されない場合に得られる、空間周波数に対する振幅特性(図14A)と、高周波数成分の抑制処理が実行された場合に得られる、空間周波数に対する振幅特性(図14B)とを比較する図である。図14Bは、後段のデータ削除部201におけるサンプリング周波数の1/2周波数以上の周波数成分を抑制した場合の、空間周波数に対する振幅特性を示す。図14A上段に示すXY平面は、高周波成分が抑制されていない画像データ(データ信号)であり、図14B上段に示すXY平面は、高周波成分が抑制された画像データ(データ信号)である。以降のデータ削除部201の処理は、実施の形態2と同じである。
 線形フィルタによって画像データの高周波数成分を除去しても、位相相関に基づくマッチング処理に必要な位相特性は低周波数成分のみからでも得ることができる。よって、高精度に視差を算出することができる。これに対して、線形フィルタによって高周波数成分を除去しない場合には、間引き処理を行う際に高周波成分が折り返しノイズとして低周波数成分に重畳するため、低周波成分における位相特性が変化してしまい、結果として視差精度が劣化してしまうことになる。
 以上のように本実施の形態によれば、ステレオ画像処理装置300において、基準画像及び参照画像の信号を構成する低周波数成分及び高周波数成分の内、高周波数成分を抑制することにより、低周波数成分のみを抽出する処理を行う。
 このようにすることで、カメラ画像をぼかすことなく演算量の削減を行うとともに高精度の視差演算を行うことができる。
 [実施の形態4]
 実施の形態4では、特に、基準画像及び参照画像のそれぞれが、複数のチャネル画像(例えば、R(赤)チャネル画像、G(緑)チャネル画像、B(青)チャネル画像)から構成される。そして、実施の形態4では、複数のチャネル画像の内の1つのみが抽出されるか、又は、種類が異なる複数のチャネル画像が平均化される。これにより、実施の形態2における間引きと同等の効果が得られる。
 [ステレオ画像処理装置400の構成]
 図15は、本発明の実施の形態4に係るステレオ画像処理装置400の構成を示す。図15において、ステレオ画像処理装置400はカラー画像データ削除部401を有する。
 カラー画像データ削除部401は、基準画像及び参照画像から、1つのチャネル画像(例えば、Rチャネル画像)のみを抽出する。これにより、他のチャンネル画像を削除することができるので、後段の画像マッチング部102の処理及びフィルタ部103の処理における処理量を削減することができる。
 [ステレオ画像処理装置400の動作]
 以上の構成を有するステレオ画像処理装置400の動作について説明する。図16は、ステレオ画像処理装置400の動作説明に供するフロー図である。
 ステップS41で、カラーが画像データ削除部401は、基準画像及び参照画像から、1つのチャネル画像のみを抽出する。
 図17は、カラーフィルタによって得られるベイヤ配列画像の説明に供する図である。図17に示すように、ベイヤ配列画像は、R画素,G画素,G画素,B画素を1つの構成単位(つまり、カラー画素ユニット)として構成されている。ここでは、カラー画像データ削除部401は、基準画像及び参照画像それぞれの画像データから、Rチャネル画像のみを抽出する。ベイヤ配列画像において、R画素は、1画素置きに配置されている。そのため、Rチャネル画像のみの光信号(画像信号)を抽出すると、基準画像及び参照画像の画像データを間引く処理と同等になる。
 図18は、Rチャネル画像のみを抽出する際のイメージ図であり、図14で説明した内容と同等の効果を得ることができる。
 以上のように本実施の形態によれば、ステレオ画像処理装置400において、基準画像及び参照画像のそれぞれが複数のチャネル画像から構成され、カラー画像データ削除部401が、基準画像及び参照画像から、複数のチャネル画像の内で1つのチャネル画像のみを抽出することにより、間引き基準画像及び間引き参照画像を形成する。よって、画像データ量を削減することが可能となり、画像マッチング部102及びフィルタ部103の処理量を削減することができる。
 また、フィルタ部103は位相相関に基づくマッチング処理である、逆位相フィルタを用いたフィルタリング処理を行う。位相相関に基づくマッチング精度を維持するために十分な位相特性は、1つのチャネル画像のみからでも得ることが可能である。よって、上記のような間引き処理を行っても視差算出精度を維持することができる。
 また、視差算出は基線長方向に行われるため、基線長方向に対して垂直方向に並ぶ画素同士で輝度信号の和をとることにより、S/N比を向上させることができる。例えば、水平に並べられたカメラによって撮像されたカラーステレオ画像の場合には、左右方向が基線長方向となる。このため、上下方向に並ぶ画素同士で輝度信号の和をとることにより、S/N比を向上させることができる。すなわち、上記したカラー画素ユニットを例にとれば、R画素の画素値と、R画素の下に存在するG画素の画素値との和をとることにより、視差算出精度を向上させることができる。なお、基線長方向に対して垂直方向に並ぶ画素同士で輝度信号の和をとる場合には、同じ波長の画素同士で画素値の和をとってもよい。
 さらに、視差を算出する対象物は、カメラから略同じ距離に存在する面が存在すると考えられる。このため、基線長方向に並ぶ画素同士でも和をとることにより、S/N比を向上させることができる。例えば、水平に並べられたカメラによって撮像されたカラーステレオ画像の場合には、左右方向が基線長方向となる。このため、左右方向に並ぶ画素同士で輝度信号の和をとることにより、S/N比を向上させることができる。すなわち、上記したカラー画素ユニットを例にとれば、R画素の画素値と、R画素の下に存在するG画素の画素値との和をとることにより、視差算出精度を向上させることができる。ただし、水平座標(X座標)が異なり、且つ、同じ波長の画素同士では、和をとらない。なぜならば、光信号のサンプリング間隔が1画素置きではなく、連続した2画素を平均しながらサンプリングしていることと等価となり、光信号の周波数特性を維持できなくなるためである。例えば、ベイヤ配列のR(赤)とG(緑)とG(緑)とは和をとらない。
 また、ここに示したベイヤ配列は一例であって、本発明はこれに限定されるものではない。
 [実施の形態5]
 実施の形態5では、実施の形態4と同様に、基準画像及び参照画像のそれぞれが、複数のチャネル画像(例えば、R(赤)チャネル画像、G(緑)チャネル画像、B(青)チャネル画像)から構成される。実施の形態5では、カラー画素ユニットがR画素,第1のG画素,第2のG画素,B画素の4画素から構成されている場合に、R画素,第1のG画素,及びB画素から成る第1の画素グループと、第2のG画素から成る第2の画素グループとにグルーピングし、第1の画素グループ内で輝度値の線形合成を行う。
 図19は、本発明の実施の形態5に係るステレオ画像処理装置500の構成を示す。図19において、ステレオ画像処理装置500は、データ削除部501と、画像マッチング部502と、フィルタ部503とを有する。
 データ削除部501は、カラー画素ユニットを構成する複数の画素が分けられた2つの画素グループ中の第1の画素グループ内で輝度値を線形合成することにより、1つのチャネル合成画像を形成する。このチャネル合成画像は、基準画像及び参照画像のそれぞれについて形成される。つまり、チャネル合成基準画像及びチャネル合成参照画像が形成される。
 カラー画素ユニットがR画素,第1のG画素,第2のG画素,B画素の4画素から構成されている場合に、第1の画素グループは、R画素,第1のG画素,及びB画素から成る。一方、第2の画素グループは、第2のG画素から成る。こうすることで、カラー画素ユニットの構成画素単位で存在した4個の輝度値が、2つの輝度値に削減される。すなわち、ここでは、チャネル合成基準画像及び第2の画素グループの基準画像の両方が、間引き基準画像に相当し、チャネル合成参照画像及び第2の画素グループの参照画像の両方が、間引き参照画像に相当する。
 画像マッチング部502は、基本的には、画像マッチング部102と同じ機能を有する。ただし、画像マッチング部502は、チャネル合成基準画像及びチャネル合成参照画像を処理対象とし、チャネル合成基準画像及びチャネル合成参照画像に基づいて、マッチング処理を行う。画像マッチング部502は、マッチング処理の結果、基準点及び「ズレ量n」をフィルタ部503へ出力する。なお、画像マッチング部502は、第2の画素グループの基準画像及び第2の画素グループの参照画像は処理対象としない。
 フィルタ部503は、基準画像の第1の画素グループについてのチャネル合成基準画像、及び、第2の画素グループの画像に基づいて、第1のフィルタ係数及び第2のフィルタ係数をそれぞれ算出する。
 そして、フィルタ部503は、第1のフィルタ係数を用いてチャネル合成参照画像をフィルタリングすることにより、第1のフィルタリング結果を得る。また、フィルタ部503は、第2のフィルタ係数を用いて参照画像の第2の画像グループの画像を第2のフィルタ係数を用いてフィルタリングすることにより、第2のフィルタリング結果を得る。そして、フィルタ部503は、第1のフィルタリング結果と第2のフィルタリング結果とを足し合わせることにより、最終的なフィルタリング結果を得る。この最終的なフィルタリング結果が、ピーク位置検出部104へ出力される。
 このように第1のフィルタリング結果と第2のフィルタリング結果を足し合わせた最終的なフィルタリング結果を用いてピーク位置の検出を行うことにより、ピーク検出精度を向上させることができる。
 [実施の形態6]
 実施の形態6では、フィルタ算出処理及びフィルタリング処理の代わりに、相互相関処理を行う。
 [ステレオ画像処理装置600の構成]
 図20は、本発明の実施の形態6に係るステレオ画像処理装置600の構成を示す。図20において、ステレオ画像処理装置600は、相互相関部601を有する。
 相互相関部601は、フィルタ部103と同様に、対応点を基準とする単位参照画像から、サブピクセル推定用単位参照画像を切り出す。そして、相互相関部601は、サブピクセル推定用単位基準画像とサブピクセル推定用単位参照画像との相互相関を算出する。
 [ステレオ画像処理装置600の動作]
 以上の構成を有するステレオ画像処理装置600の動作について説明する。図21は、相互相関処理の説明に供する図である。
 相互相関部601は、対応点を基準とする単位参照画像から、サブピクセル推定用単位参照画像を切り出す。サブピクセル推定用単位参照画像の切出し処理にも、サブピクセル推定用単位基準画像の場合と同じ第2の窓関数が用いられる。ただし、第2の窓関数は、対応点(xa+n、ya)に設定される。これにより、サブピクセル推定用単位参照画像として、対応点(xa+n,ya)を中心に、縦軸サイズが1ピクセルであり横軸サイズが“K-J”ピクセルである画像が切り出される。
 そして、相互相関部601は、サブピクセル推定用単位基準画像とサブピクセル推定用単位参照画像との相互相関を算出する。この相互相関の算出は、式(7)によって算出される。
Figure JPOXMLDOC01-appb-M000007
 式(7)においてiを-kで置き換えると、Σの中は、式(3)と等価になり、Σの加算の範囲は-Jから-Kになる。JとKとはゼロを中心とした窓関数の範囲を示すものである。JとKとは符号が逆である。このため、基本的には、加算の順番が数式上異なるだけであり、式(3)と同等の算出結果を得ることができる。すなわち、逆位相フィルタによる計算を、相互相関の計算に置き換えることができる。よって、相互相関を用いた場合でも、逆位相フィルタを用いた方式と同様に、高精度なサブピクセルレベルのマッチングを行うことができる。
 ここで、最後に、従来のSAD方式、一次元POC方式、及び、本願のステレオ画像処理方法(以下、本方式)を用いた場合の測距精度を比較した結果を図22に示す。測距精度は、測距対象までの距離と測距結果の標準偏差との特性で示される。
 図22が示す結果は、測距対象が車両であって、ステレオカメラからの距離を10m間隔で変化させて撮影されたステレオ画像に基づいて算出されている。評価指標は、レンズ歪みの補正やステレオカメラの平行化補正の誤差要因を排除するために、測距結果の標準偏差を用いている。図22において、測距結果の標準偏差が小さい方式が、精度の高い方式である。ここで、標準偏差とは、測距結果のばらつきである。
 測距結果の標準偏差は、撮影されたステレオ画像に含まれる画素のうち、目視により抽出された車両領域内の画素をサンプル点として算出されている。本方式のサブピクセル推定には、最も演算量が少なくなる2次曲線近似を用いた。図22が示すように、POC方式(◆印)と本方式(■印)は同等の特性を示し、SAD方式(▲印)より標準偏差が小さくなっている。
 図23は、SAD方式、一次元POC方式、及び本方式を用いた場合における視差計算の演算時間を比較した結果を示す。
 図23が示す結果は、ハーフVGA画像(640x240)の1フレームをパソコン(3.33GHz)で演算するのに必要な時間である。本方式はSAD方式に比べて約1.25倍の演算時間が必要だが、一次元POC方式は本方式に比べて30倍以上の演算時間が必要である。
 以上のように、図22及び図23の結果から、本願発明に係るステレオ画像処理方法は、SAD方式と同等の演算時間であり、かつ、一次元POC方式と同等の測距精度を実現できるという効果を奏する。
 [他の実施の形態]
 (1)上記各実施の形態では、ステレオ画像取得部で取得されたステレオ画像を画像マッチング部及びフィルタ部へ直接入力したが、入力前の前処理として次の処理が行われてもよい。
 すなわち、画像マッチング部及びフィルタ部の前段に平行化補正部を設け、この平行化補正部が、ステレオ画像のレンズの歪補正処理及び光軸を平行にする平行化補正処理を行ってもよい。具体的には、歪補正処理では、予め用意しておいたキャリブレーションデータを用いて、実空間で直線である物体がカメラ画像においても直線に映るように補正する処理である。また、平行補正処理では、カメラ光軸方向の距離が一定である物体がカメラ画像中のどの位置に撮像されても同じ大きさの物体画像となるように座標を変換する座標変換処理と、カメラの光軸を平行にして無限遠点にある物体が二つのカメラ映像中の同じ位置になるようにする画像シフト処理とが含まれる。なお、ここでは座標変換処理後に画像シフト処理によって平行化補正を行っているが、本発明はこれに限定されるものではなく、レンズ歪補正と同時に座標変換によって平行化補正を行ってもよい。要は、レンズの歪補正と、二つのカメラの位置関係の補正との両方を行うことができれば、その方法は特に限定されるものではない。
 また、前処理として、通常の画像処理で行うコントラストの補正又はラプラシアンフィルタを用いたエッジ強調などが行われてもよい。コントラストの補正を行った場合には、基準画像と参照画像との輝度変化のダイナミックレンジを合わせることができるので、より正確な画像マッチングを行うことができる。また、ラプラシアンフィルタを用いたエッジ強調を行えば、カメラの個体差から生じる直流成分(つまり、基準画像と参照画像との明るさの差)を除外することができ、より正確な画像マッチングを行うことができる。
 また、一般に、画像の座標変換及びシフトを行なう際に、ピクセル単位で(整数値の位置で)サンプリングされた輝度情報を、実数値の位置の輝度情報に変換することになる。この変換処理には、例えば、線形補間を用いたインターリニア法、又は、変換対象位置の周辺の輝度情報を用いるバイキュービック法などを用いればよい。
 (2)また、上記各実施の形態で説明したステレオ画像処理装置には、フィルタリング結果に基づいて、ピクセルレベルのマッチングエラーを検出するマッチングエラー検出部を設けてもよい。このマッチングエラー検出部は、フィルタ部からの出力が対称(つまり、左右対称)でない場合に、ピクセルレベルのマッチングが誤マッチングであると判定する。又は、このマッチングエラー検出部は、SAD値の極小位置とフィルタ部からの出力のピーク位置がピクセルレベルで異なる場合(つまり、フィルタ部からの出力にピークが現れない場合など)に、マッチングエラーであると判定する。これにより、バックマッチング処理を行う必要がなくなり、その分の演算量が軽減される。
 (3)上記各実施の形態では、本発明をハードウェアで構成する場合を例にとって説明したが、本発明はハードウェアとの連携においてソフトウェアでも実現することも可能である。
 また、上記各実施の形態の説明に用いた各機能ブロックは、典型的には集積回路であるLSIとして実現される。これらは個別に1チップ化されてもよいし、一部または全てを含むように1チップ化されてもよい。ここでは、LSIとしたが、集積度の違いにより、IC、システムLSI、スーパーLSI、ウルトラLSIと呼称されることもある。
 また、集積回路化の手法はLSIに限るものではなく、専用回路または汎用プロセッサで実現してもよい。LSI製造後に、プログラムすることが可能なFPGA(Field Programmable Gate Array)や、LSI内部の回路セルの接続や設定を再構成可能なリコンフィギュラブル・プロセッサーを利用してもよい。
 さらには、半導体技術の進歩または派生する別技術によりLSIに置き換わる集積回路化の技術が登場すれば、当然、その技術を用いて機能ブロックの集積化を行ってもよい。バイオ技術の適用等が可能性としてありえる。
 2010年6月30日出願の特願2010-149425の日本出願に含まれる明細書、図面および要約書の開示内容は、すべて本願に援用される。
 本発明のステレオ画像処理装置及びステレオ画像処理方法は、SAD方式と同等の処理量を維持しつつ、視差の算出精度を向上するものとして有用である。
 100,200,300,400,500,600 ステレオ画像処理装置
 101 ステレオ画像取得部
 102,502 画像マッチング部
 103,503 フィルタ部
 104 ピーク位置検出部
 201,501 データ削除部
 301 高周波成分削除部
 401 カラー画像データ削除部
 601 相互相関部

Claims (6)

  1.  基準画像及び参照画像を含むステレオ画像を取得する取得手段と、
     前記基準画像及び前記参照画像を間引くことにより、間引き基準画像及び間引き参照画像を形成する間引き手段と、
     前記間引き基準画像と前記間引き参照画像とのピクセル単位のズレ量を算出する第1の算出手段と、
     前記間引き基準画像内の輝度値から成るデータ列のデータ順序を反転させることにより逆位相フィルタ係数を算出し、前記間引き参照画像を前記算出された逆位相フィルタ係数を用いてフィルタリングし、フィルタリング結果を出力するフィルタリング処理手段と、
     前記フィルタリング処理手段から出力されたフィルタリング結果におけるピークを検出することにより、前記間引き基準画像と前記間引き参照画像とのサブピクセル単位のズレ量を算出する第2の算出手段と、
     を具備するステレオ画像処理装置。
  2.  前記間引き手段の前段に設けられ、前記間引き手段に入力される前記基準画像及び前記参照画像の信号を構成する低周波数側成分及び高周波数側成分の内、前記高周波数側成分を抑制することにより、前記低周波数側成分のみを抽出し、前記高周波数側成分が除かれた、前記基準画像及び前記参照画像を前記間引き手段へ出力する抽出手段、
     をさらに具備する請求項1に記載のステレオ画像処理装置。
  3.  前記基準画像及び前記参照画像のそれぞれは、複数のチャネル画像から構成され、
     前記間引き手段は、前記基準画像及び前記参照画像から、前記複数のチャネル画像の内で1つのチャネル画像のみを抽出することにより、前記間引き基準画像及び前記間引き参照画像を形成する、
     請求項1に記載のステレオ画像処理装置。
  4.  前記基準画像及び前記参照画像のそれぞれは、複数のチャネル画像から構成され、
     前記間引き手段は、前記複数のチャネル画像を合成して1つの合成チャネル画像を形成することにより、前記間引き基準画像及び前記間引き参照画像を形成する、
     請求項1に記載のステレオ画像処理装置。
  5.  前記基準画像及び前記参照画像のそれぞれは、複数のカラー画素ユニットから構成され、
     各カラー画素ユニットは、赤画素、第1の緑画素、第2の緑画素、青画素の4画素から構成され、
     前記赤画素、前記第1の緑画素、及び前記青画素は第1の画素グループを構成し、前記第2の緑画素は第2の画素グループを構成し、
     前記間引き手段は、前記基準画像の前記第1の画素グループ内でチャネル合成基準画像を形成することにより、前記チャネル合成基準画像と前記第2の画素グループの前記基準画像とから成る前記間引き基準画像を形成し、前記参照画像の前記第1の画素グループ内でチャネル合成参照画像を形成することにより、前記チャネル合成参照画像と前記第2のグループの前記参照画像とから成る前記間引き参照画像を形成し、
     前記第1の算出手段は、前記チャネル合成基準画像及び前記チャネル合成基準画像に基づいて、前記ピクセル単位のズレ量を算出し、
     前記フィルタリング処理手段は、前記チャネル合成基準画像及び前記第2の画素グループの前記基準画像から、第1の逆位相フィルタ係数及び第2の逆位相フィルタ係数を算出し、
     前記チャネル合成参照画像を前記第1の逆位相フィルタ係数を用いてフィルタリングし、前記第2のグループの前記参照画像を前記第2の逆位相フィルタ係数を用いてフィルタリングすることにより得られた第1のフィルタリング結果及び第2のフィルタリング結果を足し合わせることによって得られた最終的なフィルタリング結果を前記第2の算出手段へ出力する、
     請求項1に記載のステレオ画像処理装置。
  6.  基準画像及び参照画像を含むステレオ画像を取得し、
     前記基準画像及び前記参照画像を間引くことにより、間引き基準画像及び間引き参照画像を形成し、
     前記間引き基準画像と前記間引き参照画像とのピクセル単位のズレ量を算出し、
     前記間引き基準画像内の輝度値から成るデータ列のデータ順序を反転させることにより逆位相フィルタ係数を算出し、前記間引き参照画像を前記算出された逆位相フィルタ係数を用いてフィルタリングし、
     フィルタリング結果におけるピークを検出することにより、前記間引き基準画像と前記間引き参照画像とのサブピクセル単位のズレ量を算出する、
     ステレオ画像処理方法。
PCT/JP2011/003751 2010-06-30 2011-06-30 ステレオ画像処理装置およびステレオ画像処理方法 WO2012001982A1 (ja)

Priority Applications (4)

Application Number Priority Date Filing Date Title
US13/702,168 US8903135B2 (en) 2010-06-30 2011-06-30 Stereo image processing apparatus and method of processing stereo image
EP11800452.2A EP2592595A4 (en) 2010-06-30 2011-06-30 Stereo image processing apparatus and method of processing stereo image
CN201180025461.9A CN102906782B (zh) 2010-06-30 2011-06-30 立体图像处理装置及立体图像处理方法
JP2011548467A JP5810314B2 (ja) 2010-06-30 2011-06-30 ステレオ画像処理装置およびステレオ画像処理方法

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2010149425 2010-06-30
JP2010-149425 2010-06-30

Publications (1)

Publication Number Publication Date
WO2012001982A1 true WO2012001982A1 (ja) 2012-01-05

Family

ID=45401720

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2011/003751 WO2012001982A1 (ja) 2010-06-30 2011-06-30 ステレオ画像処理装置およびステレオ画像処理方法

Country Status (5)

Country Link
US (1) US8903135B2 (ja)
EP (1) EP2592595A4 (ja)
JP (1) JP5810314B2 (ja)
CN (1) CN102906782B (ja)
WO (1) WO2012001982A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012060093A1 (ja) * 2010-11-05 2012-05-10 パナソニック株式会社 ステレオ画像処理装置及びステレオ画像処理方法

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013214234A (ja) * 2012-04-03 2013-10-17 Sony Corp 移動制御装置、移動制御方法、およびプログラム
JP6017399B2 (ja) * 2013-10-23 2016-11-02 オリンパス株式会社 撮像装置及び位相差検出方法
CN104977795A (zh) * 2014-04-08 2015-10-14 立普思股份有限公司 立体摄影系统及其方法
JP2017099616A (ja) * 2015-12-01 2017-06-08 ソニー株式会社 手術用制御装置、手術用制御方法、およびプログラム、並びに手術システム
CN105844633B (zh) * 2016-03-21 2019-03-26 西安电子科技大学 基于De序列和相位编码的单帧结构光深度获取方法
JP6894707B2 (ja) * 2017-01-06 2021-06-30 キヤノン株式会社 情報処理装置およびその制御方法、プログラム
US10957068B2 (en) 2017-01-06 2021-03-23 Canon Kabushiki Kaisha Information processing apparatus and method of controlling the same
CN110211053B (zh) * 2019-04-28 2023-09-15 航天智造(上海)科技有限责任公司 用于三维测量的快速精确相位匹配方法

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000171214A (ja) * 1998-12-08 2000-06-23 Meidensha Corp 対応点検索方法及びこれを利用した三次元位置計測方法
JP2008123141A (ja) 2006-11-09 2008-05-29 Yamatake Corp 対応点探索方法および3次元位置計測方法
WO2010113389A1 (ja) * 2009-03-31 2010-10-07 パナソニック株式会社 ステレオ画像処理装置およびステレオ画像処理方法

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050088515A1 (en) * 2003-10-23 2005-04-28 Geng Z. J. Camera ring for three-dimensional (3D) surface imaging
JP3937414B2 (ja) * 2004-08-11 2007-06-27 本田技研工業株式会社 平面検出装置及び検出方法
JP4328692B2 (ja) * 2004-08-11 2009-09-09 国立大学法人東京工業大学 物体検出装置
CN101404777B (zh) * 2008-11-06 2010-12-01 四川虹微技术有限公司 一种基于深度图像的绘制的视图合成方法
CN101729918A (zh) * 2009-10-30 2010-06-09 无锡景象数字技术有限公司 一种实现双目立体图像校正和显示优化的方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000171214A (ja) * 1998-12-08 2000-06-23 Meidensha Corp 対応点検索方法及びこれを利用した三次元位置計測方法
JP2008123141A (ja) 2006-11-09 2008-05-29 Yamatake Corp 対応点探索方法および3次元位置計測方法
WO2010113389A1 (ja) * 2009-03-31 2010-10-07 パナソニック株式会社 ステレオ画像処理装置およびステレオ画像処理方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP2592595A4

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012060093A1 (ja) * 2010-11-05 2012-05-10 パナソニック株式会社 ステレオ画像処理装置及びステレオ画像処理方法
US9148653B2 (en) 2010-11-05 2015-09-29 Panasonic Intellectual Property Management Co., Ltd. Stereo image processing device and stereo image processing method
JP5874039B2 (ja) * 2010-11-05 2016-03-01 パナソニックIpマネジメント株式会社 ステレオ画像処理装置及びステレオ画像処理方法

Also Published As

Publication number Publication date
US8903135B2 (en) 2014-12-02
EP2592595A4 (en) 2017-11-15
US20130094713A1 (en) 2013-04-18
CN102906782B (zh) 2016-03-02
JP5810314B2 (ja) 2015-11-11
JPWO2012001982A1 (ja) 2013-08-22
EP2592595A1 (en) 2013-05-15
CN102906782A (zh) 2013-01-30

Similar Documents

Publication Publication Date Title
JP5810314B2 (ja) ステレオ画像処理装置およびステレオ画像処理方法
JP5567179B2 (ja) ステレオ画像処理装置およびステレオ画像処理方法
US9275463B2 (en) Stereo image processing device and stereo image processing method
US8355564B2 (en) Corresponding point searching method and three-dimensional position measuring method
JP6258209B2 (ja) ステレオ画像処理装置およびステレオ画像処理方法
JP5874039B2 (ja) ステレオ画像処理装置及びステレオ画像処理方法
EP2657901B1 (en) Stereo image processing apparatus and stereo image processing method
CN108765480B (zh) 深度处理设备
JP4403477B2 (ja) 画像処理装置及び画像処理方法
Abdulghani Taha et al. Adaptive Wiener Filter And Non Linera Diffusion Based Deblurring And Denoising Images
KR101532686B1 (ko) 경계 적응적 필터를 이용한 영상 처리 장치 및 그 방법
de Lima et al. An edge directed super resolution technique for multimedia applications
CN114841894A (zh) 一种光谱畸变的校正方法

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201180025461.9

Country of ref document: CN

WWE Wipo information: entry into national phase

Ref document number: 2011548467

Country of ref document: JP

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

Ref document number: 11800452

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 13702168

Country of ref document: US

WWE Wipo information: entry into national phase

Ref document number: 2011800452

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE