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

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

Info

Publication number
WO2012172761A1
WO2012172761A1 PCT/JP2012/003746 JP2012003746W WO2012172761A1 WO 2012172761 A1 WO2012172761 A1 WO 2012172761A1 JP 2012003746 W JP2012003746 W JP 2012003746W WO 2012172761 A1 WO2012172761 A1 WO 2012172761A1
Authority
WO
WIPO (PCT)
Prior art keywords
pixel
image
unit
pixel data
correction
Prior art date
Application number
PCT/JP2012/003746
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 JP2013520425A priority Critical patent/JP5942203B2/ja
Priority to US14/126,176 priority patent/US9275463B2/en
Priority to EP12801211.9A priority patent/EP2711891B1/en
Publication of WO2012172761A1 publication Critical patent/WO2012172761A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C3/00Measuring distances in line of sight; Optical rangefinders
    • G01C3/02Details
    • G01C3/06Use of electric means to obtain final indication
    • G01C3/08Use of electric radiation detectors
    • G01C3/085Use of electric radiation detectors with electronic parallax measurement
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/80Geometric correction
    • 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/20Special algorithmic details
    • G06T2207/20024Filtering details
    • 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/20172Image enhancement details
    • G06T2207/20182Noise reduction or smoothing in the temporal domain; Spatio-temporal filtering
    • 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/20228Disparity calculation for image-based rendering
    • 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
    • G06T2207/30261Obstacle

Definitions

  • the present invention relates to a stereo image processing apparatus and a stereo image processing method for calculating a parallax of a corresponding point of a reference image of a stereo image with respect to a reference point of the reference image of the stereo image.
  • stereo image processing apparatus that measures a distance to an object based on a stereo image.
  • the stereo image processing apparatus extracts from the reference image a point where the same object as the reference point of the reference image is captured (hereinafter referred to as “corresponding point”), and the difference between the camera parameter and the corresponding point with respect to the reference point The distance to the object is calculated based on the amount of parallax.
  • the application of the stereo image processing device to a safety device that measures the distance to a vehicle ahead or a pedestrian taken by an in-vehicle camera is being studied.
  • miniaturization of stereo cameras is required.
  • the distance between the camera that captures the standard image and the camera that captures the reference image becomes narrower. Since the parallax is reduced by reducing the interval, high-precision parallax calculation is required.
  • Patent Document 1 As a technique for calculating parallax with high accuracy, for example, there is a conventional technique described in Patent Document 1.
  • This conventional technique calculates a parallax using a one-dimensional POC (PhaseCOnly Correlation) method. Specifically, a one-dimensional pixel data sequence is cut out from each of the standard image and the reference image using a Hanning window, and subjected to a one-dimensional Fourier transform to be synthesized. The amplitude component of the synthesized data string is normalized, and a one-dimensional inverse Fourier transform is performed to obtain a phase-only correlation coefficient. Then, the parallax is calculated based on the correlation peak of the phase only correlation coefficient.
  • POC PhaseCOnly Correlation
  • image area size in the baseline length direction occupied on the stereo image
  • An object of the present invention is to provide a stereo image processing apparatus and a stereo image processing method capable of calculating parallax with high accuracy even for an object having a small image area size in the baseline length direction.
  • the stereo image processing apparatus includes an image matching unit that acquires a corresponding point of the reference image with respect to a reference point of the reference image by performing image matching processing on the reference image and the reference image, and a plurality of pixel rows. And a plurality of pixel columns, the first two-dimensional pixel data including the reference point is extracted from the reference image, the second two-dimensional pixel data includes a plurality of pixel rows and a plurality of pixel columns, and includes the corresponding points.
  • each of the first two-dimensional pixel data and the second two-dimensional pixel data is converted into a first primary An image reconstruction unit for reconstructing original pixel data and second one-dimensional pixel data;
  • a peak position detector that calculates parallax based on a correlation between the first one-dimensional pixel data and the second one-dimensional pixel data.
  • the stereo image processing method of the present invention includes: a step of acquiring a corresponding point of the reference image with respect to a reference point of the reference image by performing image matching processing on the reference image and the reference image; A first two-dimensional pixel data including the reference point, extracted from the reference image, a plurality of pixel rows and a plurality of pixel columns, the second two-dimensional including the corresponding points Extracting the pixel data from the reference image, and based on a predetermined reconstruction rule, the first two-dimensional pixel data and the second two-dimensional pixel data, respectively, Reconstructing into second one-dimensional pixel data; and calculating parallax based on a correlation between the first one-dimensional pixel data and the second one-dimensional pixel data.
  • parallax can be calculated with high accuracy even for an object having a small image area size in the baseline length direction.
  • FIG. 1 is a block diagram showing an example of a configuration of a stereo image processing apparatus according to Embodiment 1 of the present invention.
  • FIG. 3 is a block diagram showing an example of the configuration of a stereo image processing apparatus according to Embodiment 2 of the present invention.
  • the block diagram which shows an example of a structure of the filter part in Embodiment 2 of this invention.
  • the schematic diagram which shows the concept of the reconstruction rule in Embodiment 2 of this invention
  • the flowchart which shows an example of operation
  • summary of the process from the extraction of the image range in the second embodiment of the present invention to the identification of corresponding points The flowchart which shows an example of the subpixel level calculation process in Embodiment 2 of this invention.
  • summary of an example of the reconstruction rule in Embodiment 2 of this invention Schematic diagram for explaining anti-aliasing in the second embodiment of the present invention
  • summary of the process from reconstruction of the image range to filtering in Embodiment 2 of this invention Schematic diagram for explaining the concept of filtering by antiphase filter coefficients in the second embodiment of the present invention
  • FIG. 9 is a block diagram showing an example of a configuration of a stereo image processing apparatus according to Embodiment 3 of the present invention.
  • the block diagram which shows an example of a structure of the filter part in Embodiment 3 of this invention.
  • FIG. 9 is a block diagram showing an example of a configuration of a stereo image processing apparatus according to Embodiment 3 of the present invention.
  • FIG. 9 is a block diagram illustrating an example of a configuration of a vertical pixel correction image generation unit according to Embodiment 3 of the present invention.
  • summary of the vertical pixel correction process in Embodiment 3 of this invention Schematic figure which shows an example of the outline
  • FIG. 7 is a block diagram showing an example of the configuration of a stereo image processing apparatus according to Embodiment 4 of the present invention.
  • Embodiment 1 of the present invention is an example of a basic aspect of the present invention.
  • FIG. 1 is a block diagram showing an example of the configuration of the stereo image processing apparatus according to the present embodiment.
  • the stereo image processing apparatus 100 includes a stereo image acquisition unit 101, an image cutout unit 201, an image reconstruction unit 202, and a peak position detection unit 104.
  • the stereo image acquisition unit 101 acquires a stereo image including a standard image and a reference image.
  • the image cutout unit 201 cuts out an image range including a plurality of pixel rows parallel to the base line length direction of the stereo image and a plurality of pixel columns from each of the standard image and the reference image.
  • the image reconstruction unit 202 reconstructs the pixel values (two-dimensional pixel data) of each pixel in the clipped image range in a one-dimensional manner according to a predetermined reconstruction rule (hereinafter simply referred to as “reconstruction rule”).
  • reconstruction rule One-dimensional pixel data is generated.
  • One-dimensional pixel data is generated for each of the standard image and the reference image.
  • the reconstruction rule is such that the ratio of the interval before reconstruction and the interval after reconstruction of any pixels included in the same pixel row of the image range is the same for all the pixels included in the image range. It is.
  • the peak position detection unit 104 Based on the correlation between the reference pixel data, which is one-dimensional pixel data generated from the reference image, and the reference pixel data, which is one-dimensional pixel data generated from the reference image, the peak position detection unit 104 The parallax of the corresponding point of the reference image with respect to the reference point is calculated.
  • the stereo image processing apparatus 100 includes a storage medium such as a CPU (central processing unit) and a RAM (random access memory). In this case, each functional unit described above is realized by the CPU executing the control program.
  • a storage medium such as a CPU (central processing unit) and a RAM (random access memory).
  • each functional unit described above is realized by the CPU executing the control program.
  • Such a stereo image processing apparatus 100 can reconstruct the pixel values of each pixel in the image range of a plurality of pixel rows ⁇ a plurality of pixel columns into one-dimensional pixel data in the form of up-sampling the row components. Then, the stereo image processing apparatus 100, based on the correlation between the reference pixel data obtained from the reference image and the reference pixel data obtained from the reference image, the parallax of the corresponding point of the reference image with respect to the reference point of the reference image Can be calculated. In addition, the direction of the pixel row can be matched with the baseline length direction. Thereby, since the stereo image processing apparatus 100 can take a long one-dimensional pixel data string as compared with the related art, the parallax can be calculated with high accuracy even for an object having a small image area size in the baseline length direction. be able to.
  • the stereo image processing apparatus 100 may include an image matching unit 102, an image cutout unit 201, an image reconstruction unit 202, and a peak position detection unit 104. That is, a stereo image is acquired from an external device, and the image matching unit 102 performs image matching processing based on the stereo image. That is, the image matching unit 102 performs an image matching process on the standard image and the reference image, thereby acquiring a corresponding point of the reference image with respect to a standard point of the standard image.
  • the second embodiment of the present invention is an example in which the present invention is applied to an apparatus that processes a stereo image whose baseline length direction substantially matches the horizontal direction.
  • FIG. 2 is a block diagram showing an example of the configuration of the stereo image processing apparatus according to the present embodiment.
  • 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 standard image and a reference image of a stereo image.
  • the stereo image acquisition unit 101 acquires stereo images captured by two or more imaging systems (that is, cameras).
  • the stereo image includes a standard image and a reference image in which the same object is captured by two different cameras.
  • the stereo image acquisition unit 101 outputs the acquired stereo image to the image matching unit 102 and the filter unit 103.
  • the stereo image acquisition unit 101 inputs stereo images taken by two cameras whose base line length directions substantially coincide with the horizontal direction.
  • the image matching unit 102 acquires a corresponding point of the reference image with respect to the reference point of the reference image. That is, the image matching unit 102 performs an image matching process on the standard image and the reference image, thereby acquiring a corresponding point of the reference image with respect to a standard point of the standard image.
  • the image matching unit 102 obtains corresponding points of the reference image with respect to the reference point of the reference image by performing image matching processing on the reference image and the reference image acquired by the stereo image acquisition unit 101. . Then, the image matching unit 102 calculates a “pixel level deviation amount n” of the position on the image of the corresponding point of the reference image with respect to the position of the reference point on the image. The image matching unit 102 outputs the information indicating the position of the reference point and the position of the corresponding point of the reference image, for example, information indicating the position of the reference point, the pixel level deviation amount n, and the direction of the deviation. Output to the unit 103.
  • the image matching unit 102 uses a predetermined one pixel included in the reference image as a “reference point”, and cuts out a peripheral partial image centered on the reference point (hereinafter referred to as “unit reference image”) from the reference image. .
  • the image matching unit 102 cuts out a plurality of partial images (hereinafter referred to as “unit reference images”) included in the reference image and having the same size as the unit standard image from the reference image.
  • the plurality of unit reference images are cut out from different positions in the reference image.
  • the image matching unit 102 may cut out a plurality of unit reference images by changing the cutout position in the baseline length direction. Then, a deviation amount 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 deviation amount n described above.
  • the image matching unit 102 specifies a unit reference image having the highest matching degree with the unit standard image from the plurality of unit reference images that are cut out.
  • the specified unit reference image one pixel corresponding to the reference point becomes a corresponding point on the reference image.
  • an index indicating the degree of matching for example, an SAD (pixel luminance difference: Sum of Absolute Differences) value indicating a luminance difference is used.
  • the filter unit 103 performs a filtering process on the reference image based on the standard image.
  • the filter unit 103 calculates a filter coefficient based on the position of the reference image and the reference point, and performs a filtering process on the partial image around the corresponding point of the reference image using the calculated filter coefficient.
  • FIG. 3 is a block diagram illustrating an example of the configuration of the filter unit 103.
  • the filter unit 103 includes an image clipping unit 201, an image reconstruction unit 202, an anti-aliasing unit 203, a windowing unit 204, and a filter generation unit 205.
  • the image cutout unit 201 cuts out a partial image (two-dimensional pixel data) including a plurality of pixel rows and a plurality of pixel columns parallel to the baseline length direction of the stereo image from the reference image as a unit reference image for subpixel estimation. (Extraction step). Similarly, the image cutout unit 201 subtracts a partial image (two-dimensional pixel data) having the same number of pixel rows and the same number of pixel columns (same size) as the subpixel estimation unit standard image from the reference image. Cut out as an estimation unit reference image (extraction step).
  • the image cutout unit 201 has a plurality of pixel rows and a plurality of pixel columns, extracts first two-dimensional pixel data including the reference point from the reference image, and includes a plurality of pixel rows and a plurality of pixel columns.
  • the second two-dimensional pixel data including the corresponding point is extracted from the reference image.
  • the image cutout unit 201 outputs the subpixel estimation unit reference image and the subpixel estimation unit reference image to the image reconstruction unit 202.
  • the image cutout unit 201 determines the cutout position of the image in the reference image so that the reference point is included in the unit reference image for subpixel estimation. In addition, the image cutout unit 201 determines the cutout position of the image so that the corresponding point is included in the unit reference image for subpixel estimation.
  • the image cutout unit 201 may determine the unit reference image for subpixel estimation to have a size different from that of the unit reference image described above. Further, the image cutout unit 201 may designate each “image range” of the unit pixel image for subpixel estimation and the unit reference image for subpixel estimation, and output the designated image range to the image reconstruction unit 202. Good.
  • the “image range” can be represented by, for example, barycentric coordinates, width, and height, but is not limited thereto.
  • the image reconstruction unit 202 reconstructs the pixel values of each pixel of the subpixel estimation unit reference image and the subpixel estimation unit reference image obtained from the image cutout unit 201 in a one-dimensional manner according to the reconstruction rule. One-dimensional pixel data is generated.
  • the image range is a superordinate concept of the unit pixel image for subpixel estimation and the unit reference image for subpixel estimation.
  • the reconstruction rule is such that the ratio of the pre-reconstruction interval and the post-reconstruction interval between arbitrary pixels included in the same pixel row of the image range is the same for all pixels included in the image range.
  • This is a rule for reconfiguration in one dimension. That is, the image reconstruction unit 202 separates pixels arranged at equal intervals in each pixel row included in the image range by a predetermined interval, and adds pixels included in other pixel rows between the separated pixels. Each pixel row is linearly combined so as to be embedded.
  • the reconstruction rule is a rule for reconstructing one-dimensional pixel data so that the interval after reconstruction between pixels included in the same pixel row of the image range is larger than the interval before reconstruction.
  • the predetermined interval is, in principle, one less than the number of pixel rows in the image range. Specifically, for example, a case where the image is a black and white image and the number of pixel rows in the image range is 3 and the number of pixel columns is 3 will be described.
  • the image reconstruction unit 202 separates three adjacent pixels that are arranged adjacent to each other before reconstruction in any pixel row included in the image range by two pixels. Then, the image reconstruction unit 202 linearly combines the three pixel rows by disposing the pixels of other pixel rows between the separated pixels. An example of a specific method of linear combination will be described later.
  • FIG. 4 is a schematic diagram showing the concept of the reconstruction rule.
  • each pixel row data in the image range is treated as independent data.
  • the image reconstruction unit 202 can increase the sampling frequency by separating the pixels of the data in each pixel row and interpolating between the pixels with zero (this is generally referred to as “upsampling”). However, if the data obtained by upsampling is left as it is, aliasing noise is picked up. Therefore, it is necessary for the anti-aliasing section 203 (anti-aliasing section) to perform anti-aliasing by passing the data obtained by upsampling through a low-pass filter.
  • the image reconstruction unit 202 can combine each pixel row after up-sampling and anti-aliasing each pixel row.
  • the object shown in the image is an object extending in the vertical direction (for example, a pedestrian)
  • the amount of deviation between the reference image and the reference image is the same in any pixel row in the image range. is there. Therefore, even if the same offset is added to the pixel position in the standard image and the reference image, the shift amount does not change. That is, even if the pixel positions of the standard image and the reference image are shifted by the same amount and in the same direction in the baseline length direction, the calculation of the shift amount between the standard image and the reference image is not affected. Accordingly, it is possible to calculate the amount of deviation between the standard image and the reference image using data obtained by adding a certain offset to the pixel position for each pixel row and combining the data.
  • the stereo image processing apparatus 100 can calculate the shift amount from the data obtained by up-sampling and linearly combining the pixel rows and then anti-aliasing through, for example, a low-pass filter.
  • the order (1) to (9) when scanning in the right direction while moving the row from the upper left to the lower direction is the number of each pixel.
  • the image reconstruction unit 202 decomposes the image into each pixel row.
  • the image reconstruction unit 202 up-samples each pixel row by the number of pixel columns.
  • the first pixel row 401 which is the first pixel row is “(1) (0) (0) (2) (0) (0) (3) (0) (0) sequentially from the left.
  • the second pixel row 402 which is the second pixel row is “(4) (0) (0) (5) (0) (0) (6) (0) (0)” in order from the left.
  • the third pixel row 403 which is the third pixel row is “(7) (0) (0) (8) (0) (0) (9) (0) (0))” in order from the left.
  • (0) indicates a pixel obtained by interpolating zero.
  • the image reconstruction unit 202 adds no offset to the pixel positions of the first pixel row 401 that is the first pixel row with respect to the three upsampled rows ( That is, offset 0 is added), offset 1 is added to the pixel position of the second pixel row 402, offset 2 is added to the pixel position of the third pixel row 403, and the three pixel rows are added. Join by.
  • the image reconstruction unit 202 also performs the same process on the sub-pixel estimation unit reference image to obtain one-dimensional pixel data.
  • the offset amount added to the pixel position of each pixel row when linearly combining the pixel rows is not limited to the above example, and is an integer not less than 0 and not more than 1 less than the number of pixel rows.
  • the pixel positions before reconstruction in the pixel rows need only be different from each other so that they do not have the same position.
  • the image reconstruction unit 202 adds “(1) (7) (4) (2) (8) (5) (3) (9” by adding another offset amount to the pixel position of each pixel row. ) (6) "or the like may be obtained.
  • the image reconstruction unit 202 then generates the one-dimensional pixel data generated from the sub-pixel estimation unit reference image (hereinafter referred to as “reference pixel data”) and the one-dimensional data generated from the sub-pixel estimation unit reference image. Pixel data (hereinafter referred to as “reference pixel data”) is output to the anti-aliasing unit 203.
  • the above-described pixel rows are parallel to the base line length direction (epipolar line direction) of the stereo image.
  • the reconstruction rule described above sets the one-dimensional pixel data so that the interval between any pixel in the image range and the pixel adjacent to the pixel row in the direction of the pixel row is wider than the interval before reconstruction. It is assumed that the content is generated.
  • the reconstruction rule is that the interval between an arbitrary pixel in the image range and a pixel adjacent to the pixel in the baseline length direction (horizontal direction) (that is, in the same pixel row) is orthogonal to the baseline length direction ( This is a content for generating one-dimensional pixel data so as to be wider than the interval between any other pixels arranged in the vertical direction (that is, in the same pixel column).
  • the pixel value is a luminance value for each pixel, for example.
  • the anti-aliasing unit 203 removes aliasing noise (aliasing) generated by the above reconstruction from the one-dimensional pixel data (base pixel data and reference pixel data) (this is generally called “anti-aliasing”). Specifically, the anti-aliasing unit 203 removes aliasing noise from the one-dimensional pixel data using, for example, a low-pass filter. Then, the anti-aliasing unit 203 outputs the one-dimensional pixel data (standard pixel data and reference pixel data) from which aliasing noise has been removed to the windowing unit 204.
  • Window hanging part 204 The windowing unit 204 performs windowing on the one-dimensional pixel data. Then, the windowing unit 204 outputs the one-dimensional pixel data subjected to windowing to the filter generation unit 205.
  • the filter generation unit 205 calculates an antiphase filter coefficient obtained by inverting the position of each pixel in the reference pixel data in the arrangement direction. Then, the filter generation unit 205 performs a filtering process on the reference pixel data using an antiphase filter coefficient. Details of the filtering process will be described later. Then, the filter generation unit 205 outputs the result of the filtering process (hereinafter referred to as “filtering result”) to the peak position detection unit 104 in FIG.
  • ⁇ Peak position detection unit 104 The peak position detection unit 104 acquires a relative positional relationship in which the degree of correlation between the standard pixel data and the reference pixel data is the highest in the filtering result. Then, the peak position detection unit 104 calculates a deviation amount of the sub-pixel level of the corresponding point of the sub-pixel estimation unit reference image with respect to the reference point of the sub-pixel estimation unit reference image based on the acquired relative positional relationship. .
  • the peak position detection unit 104 calculates the amount of deviation by detecting the peak position in the filtering result.
  • the peak in the filtering result is a position where the filtering result becomes the maximum value.
  • the stereo image processing apparatus 100 includes a storage medium such as a CPU and a RAM, for example. In this case, each functional unit described above is realized by the CPU executing the control program.
  • Such a stereo image processing apparatus 100 performs one-dimensional pixel data (reference pixel data and reference) by up-sampling a pixel value of each pixel in an image range of a plurality of pixel rows ⁇ a plurality of pixel columns in a baseline length direction component. Pixel data). Then, the stereo image processing apparatus 100 calculates the standard based on the correlation between the standard pixel data that is one-dimensional pixel data obtained from the standard image and the reference pixel data that is one-dimensional pixel data obtained from the reference image. The sub-pixel level parallax of the corresponding point of the reference image with respect to the reference point of the image is calculated.
  • the stereo image processing apparatus 100 can use a long one-dimensional pixel data sequence for parallax calculation as compared with the related art, and thus the parallax can be accurately performed even on an object having a small image area size in the baseline length direction. Can be calculated.
  • one pixel is one coordinate point with the horizontal direction of the image as the X axis and the vertical direction of the image as the Y axis.
  • the epipolar line direction baseline length direction
  • the epipolar line direction is assumed to be parallel to the X axis in the entire image.
  • FIG. 5 is a flowchart showing an example of the operation of the stereo image processing apparatus 100.
  • the image matching unit 102 performs image matching processing on the reference image and the reference image while moving the reference point throughout the reference image.
  • the stereo image processing apparatus 100 performs the following steps S1 to S8 for all reference points.
  • step S ⁇ b> 1 the image matching unit 102 determines the position of a reference point that is a target for parallax calculation.
  • the image matching unit 102 cuts out a unit reference image from the reference image.
  • the unit reference image is an image of a partial region including the reference point determined in step S1.
  • the unit of the size of the unit reference image is a pixel. That is, the unit reference image is an image of a plurality of pixel rows ⁇ a plurality of pixel columns.
  • the image matching unit 102 determines a search range and a search start position in the reference image based on the position of the reference point determined in step S2.
  • the parallax of the stereo image is determined on the basis of 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 to be measured by the principle of triangulation. That is, the parallax is proportional to the baseline and the focal length, and inversely proportional to the distance to the object. Since the base line length and the focal length are fixed by camera parameters, the search range may be determined based on the distance from the stereo camera to the object to be measured. Since the object at infinity from the stereo camera is captured at the same position in 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 determines a cutout position in the reference image, and cuts out a unit reference image having the same number of pixel rows and pixel columns as the unit standard image.
  • the image matching unit 102 determines the search start position determined in step S3 as the first cutout position, for example, and thereafter moves the cutout position.
  • 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 S ⁇ b> 6 the image matching unit 102 performs a process end determination process for the search range. That is, the image matching unit 102 determines whether the cutout position has covered the search range due to movement. If the processing for the search range has not ended (S6: No), the image matching unit 102 returns to step S4. As a result, the image matching unit 102 moves the cutout position within the search range so that the cutout region of the unit reference image in step S4 is shifted. In this way, the processing from steps S4 to S6 is repeated until the processing for the search range is completed (S6: Yes).
  • step S7 the image matching unit 102 specifies the cut-out position of the unit reference image having the maximum matching degree based on the plurality of matching degrees obtained by the processes in steps S4 to S6.
  • the image matching unit 102 specifies the cut-out position of the unit reference image that has the minimum or minimum brightness difference. Then, the image matching unit 102 specifies the cutout position with the highest matching degree as the corresponding point of the reference image with respect to the reference point.
  • steps S2 to S7 will be specifically described.
  • FIG. 6 is a schematic diagram showing an outline of processing from image region extraction to corresponding point specification.
  • the image matching unit 102 cuts out a peripheral partial image around the reference point (xa, ya) 311 as a unit reference image 312 in the above-described step S2.
  • the unit reference image 312 is cut out using a rectangular window 313 having a predetermined size (vertical size: wv pixel, horizontal size: wh pixel).
  • a rectangular window 313 having a predetermined size (vertical size: wv pixel, horizontal size: wh pixel).
  • the image matching unit 102 determines a search range and a search start position in the reference image based on the position of the reference point determined in step S1. For example, the same coordinates (xa, ya) as the reference point in the reference image are used as the search start position (initial coordinates for cutting out the unit reference image in the reference image).
  • the image matching unit 102 cuts out the cutout position 321 as a unit reference image 322 from the reference image in the peripheral partial image centered on the search start position in step S ⁇ b> 4.
  • the same rectangular window as the rectangular window 313 used for extracting the unit standard image is used.
  • the image matching unit 102 calculates the degree of matching between the unit standard image 312 and each unit reference image 322 in step S5 described above.
  • 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 cut-out position as illustrated in FIG. 6B and uses the new unit reference image 323 as a reference image. Cut out from.
  • the position to be cut out is shifted by one pixel.
  • the shifting direction is the direction of the right arrow extending from the coordinates (xa, ya) of the reference image in FIG. 6B.
  • the image matching unit 102 calculates each matching degree for a plurality of unit reference images for one unit standard image 312. Then, the image matching unit 102 specifies the unit reference image having the maximum matching degree based on the plurality of matching degrees obtained by the processes of steps S4 to S6 in step S7. Specifically, the image matching unit 102 specifies the unit reference image 323 having the highest matching degree (for example, the smallest SAD value) among the plurality of matching degrees. When the coordinates of the specified unit reference image cut-out position 323 are (xa + n, ya), n is a pixel level shift amount. Then, the image matching unit 102 specifies the cutout position 323 that maximizes the matching degree as a corresponding point of the reference image with respect to the reference point 321.
  • the index of matching degree is not limited to the SAD value, and any other index can be used as long as it can be used as an index of matching degree.
  • the image matching unit 102 may use SSD (Sum of Squared Differences) as an index of matching degree.
  • step S8 of FIG. 5 the filter unit 103 and the peak position detection unit 104 sub-pixel based on the corresponding points of the reference image obtained in step S7 and the reference image and reference image received from the stereo image acquisition unit 101. Perform level calculation processing.
  • FIG. 7 is a flowchart showing details of the sub-pixel level calculation process.
  • step S10 the filter unit 103 cuts out a peripheral partial image centered on the reference point from the reference image as a sub-pixel estimation unit reference image.
  • a rectangular window 313 similar to that used for extracting the unit reference image is used.
  • step S11 the filter unit 103 cuts out a peripheral partial image centered on the corresponding point detected in step S7 from the reference image as a sub-pixel estimation unit reference image.
  • the same rectangular window as that in the case of the sub-pixel estimation unit reference image is also used for the cut-out process of the sub-pixel estimation unit reference image.
  • the rectangular window is set around the corresponding point (xa + n, ya).
  • the size of the rectangular window may be different from that used to cut out the unit reference image.
  • the unit reference image for subpixel estimation has been described as being newly cut out from the reference image.
  • the unit reference image used in the image matching unit 102 is used as the unit reference image for subpixel estimation as it is. It may be used.
  • step S12 the image reconstruction unit 202 reconstructs the unit reference image for subpixel estimation into one-dimensional image data. That is, the image reconstruction unit 202 generates “reference pixel data” by reconstructing the pixel values of each pixel of the sub-pixel estimation unit reference image in a one-dimensional manner according to the reconstruction rule.
  • step S13 the image reconstruction unit 202 reconstructs the sub-pixel estimation unit reference image into one-dimensional image data. That is, the image reconstruction unit 202 generates “reference pixel data” by reconstructing the pixel values of each pixel of the unit reference image for subpixel estimation in a one-dimensional manner according to a reconstruction rule.
  • FIG. 8 is a schematic diagram showing an outline of an example of the reconstruction rule.
  • the first pixel row is “(1) (2) (3) (4)” sequentially from the left, and the second pixel row is “(5) (6) (7) ( 8) ".
  • the third pixel row is “(9) (10) (11) (12)” in order from the left, and the fourth pixel row is “(13) (14) (15) ( 16) ".
  • the first pixel column is “(1) (5) (9) (13)” in order from the top, and the second pixel column is “(2) (6) (10) ( 14) ".
  • the third pixel column is “(3) (7) (11) (15)” in order from the top, and the fourth pixel column is “(4) (8) (12) ( 16) ".
  • the image reconstruction unit 202 performs the scanning of the pixels while moving the column from the upper left to the right as shown in FIG. 8B. Reconfigure the pixel value arrangement. That is, the image reconstructing unit 202 “(1) (5) (9) (13) (2) (6) (10) (14) (3) (7) (11) (15) (4) ( 8) (12) (16) ", the pixel values of each pixel are arranged one-dimensionally. Then, the image reconstruction unit 202 sets the data obtained by arranging in one dimension as reference pixel data (reference pixel data) 334.
  • reference pixel data (reference pixel data) 334 reconstructed in this way, for example, the interval 335 between adjacent pixels in the first pixel row “(1) (2) (3) (4)”. The ratio remains “1: 1: 1” and remains unchanged.
  • the reference pixel data (reference pixel data) 334 is in a state where the components in the horizontal direction (pixel row direction) are upsampled.
  • the pixel arrangement after the reconstruction is “(1) (5) (9) (13) (2) (6) (10) (14) (3) (7) (11)”.
  • (15) (4) (8) (12) (16) the order of the pixels is not limited thereto.
  • the intervals between adjacent pixels in each pixel row before reconstruction need only be the same in the pixel arrangement after reconstruction.
  • the pixel arrangement after the reconstruction is “(1) (9) (5) (13) (2) (10) (6) (14) (3) (11) (7) (15 ) (4) (12) (8) (16) "and” (5) (1) (9) (13) (6) (2) (10) (14) (7) (3) (11) (15) (8) (4) (12) (16) "etc. may be used.
  • Such upsampling makes it possible to use information on the upper and lower ranges of the reference point and the corresponding point and to increase the number of pixel data used for parallax calculation. Also, by increasing the number of pixel data used for parallax calculation, it is possible to reduce the influence of the second window function applied in the subsequent stage on the parallax calculation. That is, the stereo image processing apparatus 100 can perform parallax calculation that is robust to noise.
  • the stereo image processing apparatus 100 performs anti-aliasing processing described below.
  • the anti-aliasing unit 203 performs anti-aliasing processing on the reference pixel data.
  • the anti-aliasing process is a process for removing the above-described aliasing generated by upsampling.
  • step S15 the anti-aliasing unit 203 performs anti-aliasing processing on the reference pixel data.
  • FIG. 9 is a schematic diagram for explaining anti-aliasing.
  • the subsequent peak position detection unit 104 performs parallax calculation based on the correlation between the base pixel data and the reference pixel data. For this reason, high-precision parallax cannot be calculated unless aliasing noise is removed.
  • the anti-aliasing unit 203 applies a low-pass filter 344 having a cutoff frequency of 1/2 of the Nyquist frequency to the standard pixel data and the reference pixel data. Thereby, the anti-aliasing unit 203 can obtain an upsampled signal having the same amplitude characteristic 342 as that of the original signal.
  • the cutoff frequency of the low-pass filter depends on the number of pixel rows (height) of the unit pixel image for subpixel estimation and the unit reference image for subpixel estimation. For example, when the number of pixel rows is two, the anti-aliasing unit 203 sets the cutoff frequency of the low-pass filter to 1/2 of the Nyquist frequency, and when the number of pixel rows is three, the anti-aliasing unit 203 sets the cutoff frequency of the low-pass filter to 1 / Nyquist frequency. 3. Therefore, the anti-aliasing unit 203 may dynamically change the cutoff frequency of the low-pass filter in accordance with the up-sampling sampling frequency in the image reconstruction unit 202.
  • step S ⁇ b> 16 in FIG. 7 the windowing unit 204 performs windowing on the reference pixel data on which the anti-aliasing processing has been performed using the second window function.
  • the second window function is, for example, a Hanning window window function w (m) represented by Expression (2).
  • N represents the number of taps (number of pixels of the reference pixel data).
  • m represents the position in the Hanning window.
  • step S17 the windowing unit 204 uses a window function similar to that used for the reference pixel data subjected to the anti-aliasing process, with respect to the reference pixel data subjected to the anti-aliasing process. Make windows.
  • a window function of a Hanning window is used, but the present invention is not limited to this, and a Hamming window, a Blackman window, a Kaiser window, or the like may be used as a window function. Good.
  • These window functions are selected according to which of the characteristics of the unit reference image for subpixel estimation (for example, frequency power characteristics, phase characteristics, cut-out edge continuity) is regarded as important. For example, when importance is attached to the phase characteristics, the Kaiser window is suitable. However, if the Kaiser window is used, the calculation becomes considerably complicated. On the other hand, the Hanning window is suitable from the viewpoint of reducing the amount of calculation.
  • the image cutout process in the image matching unit 102 is performed in units of pixels, for example, and therefore, the emphasis is placed on reducing the number of computations rather than the accuracy of image cutout.
  • the second window function is preferably a function in which changes at both ends of the window are continuous (for example, a function in which values at both ends of the window are zero).
  • the continuity of the standard pixel data and the reference pixel data is maintained, and the noise component due to clipping included in the characteristics of the antiphase filter described later can be reduced.
  • the first window function has a narrower main lobe than the second window function. The amplitude of the side lobe is large.
  • step S18 the filter unit 103 calculates an antiphase filter coefficient from the reference pixel data on which aliasing noise is removed and windowed. Specifically, the filter unit 103 rearranges the signal sequence in the reverse order so as to invert the position of each pixel value of the reference pixel data subjected to the removal of aliasing noise and windowing in the arrangement direction.
  • step S19 the filter unit 103 filters the reference pixel data that has been subjected to aliasing noise removal and windowing using the antiphase filter coefficient calculated in step S16.
  • step S20 the peak position detection unit 104 can calculate a sub-pixel level shift amount (parallax) between the reference image and the reference image based on the peak position detected by the filtering result. Then, the stereo image processing apparatus 100 returns to the process of FIG.
  • FIG. 10 is a schematic diagram showing an outline of processing from image range reconstruction to filtering.
  • the image reconstruction unit 202 reconstructs the sub-pixel estimation unit reference image 352 cut out from the reference image 351 into reference pixel data 353 composed of N pixel values. As shown in FIG. 10B, the image reconstruction unit 202 reconstructs the sub-pixel estimation unit reference image 355 cut out from the reference image 354 into reference pixel data 356 composed of N pixel values.
  • the anti-aliasing unit 203 performs anti-aliasing processing on each of the base pixel data 353 and the reference pixel data 356.
  • the windowing unit 204 uses a Hanning window having a size of N pixels centered on the reference point (xa, ya) and the corresponding point (xa + n, ya) as the second window function w (m) 357.
  • the size of the second window function w (m) is not limited to N.
  • the filter generation unit 205 does not necessarily need to separately calculate the antiphase filter coefficient, and may perform an operation so as to obtain a filtering result when the antiphase filter coefficient is applied. That is, the filter generation unit 205 performs a filtering process using, for example, the following expression (3).
  • f ′′ (m) represents the pixel value of the standard image
  • g ′′ (m) represents the pixel value of the reference image.
  • FIG. 11 is a schematic diagram for explaining the concept of filtering using antiphase filter coefficients.
  • the length (N) of the window function w (m) is 5 pixels.
  • the reference pixel data subjected to aliasing noise removal and windowing is “1, 2, 3, 4, 5” as shown in FIG. 11A.
  • the reference pixel data x (m) subjected to aliasing noise removal and windowing is also “1, 2, 3, 4, 5”.
  • the pixel value used for filtering is a luminance value.
  • the filter unit 103 calculates “5, 4, 3, 2, 1” as the antiphase filter coefficient h (k).
  • the filter part 103 performs a filtering process with respect to reference pixel data using an antiphase filter coefficient h (k), as shown to FIG. 11B.
  • This filtering process is specifically performed as follows.
  • the filter unit 103 performs the following operation on the signal sequence whose constituent signal coordinates are “k ⁇ 2, k ⁇ 1, k, k + 1, k + 2”.
  • a filtering process is performed by multiplying the antiphase filter coefficient h (k), and the sum of each multiplication result is calculated as a filtering result z (m).
  • m takes an integer value of 0-4.
  • the reference pixel data x (m) is “0, 0, 1, 2, 3, 4, 5, 0, 0 ".
  • m (m: 0 to 4) in FIG. 11A is the coordinate point of the reference pixel data, the filtering process is performed as follows.
  • the filter unit 103 obtains “26, 40, 55, 40, 26” as the filtering result z (m).
  • the anti-phase filter corresponds to 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 is shifted, the output signal is shifted by the same amount as the input signal.
  • the parallax is smaller and the pixel level deviation amount n is smaller when the object is far away from the stereo camera than when it is nearby.
  • the image area size in the baseline length direction of the object on the stereo image is also reduced.
  • the stereo image processing apparatus 100 sets the number of taps of the anti-phase filter in accordance with the magnitude of the pixel level shift amount n detected by the image matching unit 102.
  • 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 and the pixel level deviation n is smaller when the object is far away from the stereo camera than when the object is near.
  • the tap length of the antiphase filter can be adaptively changed. 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. Therefore, theoretically, the filtering result is the true deviation amount except for the distortion correction error of the lens, the error of gain noise caused by the image sensor such as CCD, and the error of the calculation accuracy of the image cutout by windowing. It is expressing. Therefore, the true peak position at the sub-pixel level 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 units of pixels.
  • FIG. 12 is a schematic diagram showing an outline of an example of peak position detection processing using a sinc function.
  • 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 peak position detection unit 104 performs a convolution operation on the discretized filtering result using a sinc function. As a result, the peak position detection unit 104 can interpolate the signal data at intervals of pixels, and derives the true peak position of the filtering result z (m) obtained by theoretically interpolating the signal data even at the subpixel level. can do.
  • the peak position detection unit 104 detects the peak position of the filtering result by, for example, a binary search.
  • the peak position detection unit 104 calculates the value of the position C, which is the midpoint between the binary search reference point (position A) and the binary search use point (position B), based on the sampling theorem, for example, 4).
  • T is a sampling interval (pixel pitch).
  • 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 accuracy. That is, the peak position detection unit 104 may perform the above-described process once if the required subpixel accuracy is 1/2 pixel. In addition, the peak position detection unit 104 determines the number of repetitions according to the required sub-pixel accuracy, twice if the required sub-pixel accuracy is 1/4 pixel accuracy, and three times if the required sub-pixel accuracy is 1/8 pixel. That's fine.
  • the peak position detection unit 104 treats the finally obtained midpoint as the detected peak position ⁇ .
  • the peak position detection unit 104 may search for a peak position by a combination of a sinc function and a gradient method. That is, the peak position detection unit 104 can use various maximum value detection methods as long as the discretized filtering result is convolved with a sinc function to interpolate signal data at intervals of pixels. .
  • the peak position detection unit 104 may detect the peak position of the filtering result using quadratic curve approximation. Thereby, the peak position detection part 104 can reduce the amount of calculations for peak position detection. In this case, the peak position detection unit 104 fits the discretized filtering result with a quadratic curve, and detects the position of the maximum value of the quadratic curve as the peak position. Thereby, the peak position detection part 104 can obtain
  • FIG. 13 is a schematic diagram showing an outline of an example of processing for detecting a peak position of a filtering result using quadratic curve approximation.
  • the calculated peak position ⁇ of the filtering result is calculated by multiplying the number of pixel rows used in the image reconstruction. That is, the shift amount ⁇ ′ at the sub-pixel level is calculated by dividing the peak position ⁇ of the filtering result by the number of pixel rows used in the image reconstruction.
  • the parallax of the reference point in the reference image is obtained by adding the pixel level deviation amount n and the sub-pixel level deviation amount ⁇ '.
  • steps S10 to S17 is not limited to the order shown in the flowchart of FIG. S10, S12, S14, and S16, which are processes related to the reference image, and S11, S13, S15, and S17, which are processes related to the reference image, are executed in this order, and the processes of S10 to S17 are completed before S18. Just do it.
  • step S ⁇ b> 9 the image matching unit 102 performs a distance measurement target region end determination process. That is, the image matching unit 102 determines whether or not there is an unprocessed area in which the processes from Step S1 to Step S8 have not yet been performed in the entire reference image. If there is an unprocessed area (S9: No), the image matching unit 102 returns to step S1, shifts the position of the reference point, and performs the processes of steps S1 to S8. Further, when there is no unprocessed area (S9: Yes), the image matching unit 102 ends the series of operations.
  • the stereo image processing apparatus 100 performs one-dimensional reference pixel data and reference in the form of up-sampling the component in the baseline length direction in the image range of a plurality of rows and a plurality of columns of the reference image and the reference image. Pixel data can be reconstructed.
  • the stereo image processing apparatus 100 can detect the peak position of the reference pixel data having the highest correlation with the reference point included in the reference pixel data with high accuracy by applying anti-aliasing and a window function. . Thereby, the stereo image processing apparatus 100 can calculate parallax with high accuracy.
  • the stereo image processing apparatus 100 performs one-dimensional processing by up-sampling at least one component in the pixel row direction and the pixel column direction in an image range of multiple rows ⁇ multiple columns. Pixel data can be reconstructed. Then, the stereo image processing apparatus 100 can calculate the parallax based on the correlation between the reference pixel data obtained from the reference image and the reference pixel data obtained from the reference image. As a result, the stereo image processing apparatus 100 can take a longer pixel data string used for parallax calculation than in the prior art, and thus can calculate parallax with high accuracy even for an object with a small image area size in the baseline length direction. can do.
  • the stereo image processing apparatus 100 generates reference pixel data and reference pixel data in a form in which at least a component in a direction parallel to the baseline length direction (horizontal direction) of the stereo image is up-sampled. Thereby, the stereo image processing apparatus 100 calculates the parallax with higher accuracy for an object having a shape extending in the vertical direction, such as a pedestrian on the road, or an object having a small image area size in the baseline length direction. be able to.
  • the stereo image processing apparatus 100 acquires corresponding points with respect to the reference point of the reference image in the reference image by image matching, and sets the surrounding partial region as a target for generating one-dimensional pixel data. Thereby, the stereo image processing apparatus 100 can calculate parallax efficiently and with higher accuracy.
  • the stereo image processing apparatus 100 performs a filtering process using an antiphase filter coefficient, and sets a position where the filtering result is a peak as a shift amount between the reference pixel data and the reference pixel data (disparity between the reference point and the corresponding point). calculate. Thereby, the stereo image processing apparatus 100 can calculate parallax with higher accuracy.
  • the stereo image processing apparatus 100 calculates the correlation between the reference pixel data and the reference pixel data after performing anti-aliasing processing and windowing. Therefore, since the stereo image processing apparatus 100 can increase the amount of information without changing the frequency characteristic of the input stereo image, the parallax calculation accuracy can be further improved. That is, as described above, the stereo image processing apparatus 100 uses the vertical information in the image and takes a long pixel data string for parallax calculation. Therefore, the second window function for the information of the one-dimensional pixel data string is used. The influence of can be reduced. Then, as described above, the stereo image processing apparatus 100 removes aliasing noise by anti-aliasing processing. Therefore, the stereo image processing apparatus 100 can combine the pixel data of a plurality of pixel rows while maintaining the original frequency characteristics (amplitude characteristics and phase characteristics) of each pixel row.
  • a reconstruction rule to be applied to Bayer array image data is that at least one of an R pixel value (red pixel value), a G pixel value (green pixel value), and a B pixel value (blue pixel value) is image range.
  • R pixel value red pixel value
  • G pixel value green pixel value
  • B pixel value blue pixel value
  • FIG. 14 is a schematic diagram showing the configuration of a Bayer array image.
  • the Bayer array image 361 includes an R pixel 362, a G pixel 363, a G pixel 364, and a B pixel 365 as one constituent unit (hereinafter referred to as “color pixel unit”) 366. .
  • the Bayer array image 361 includes R data 367, G data 368, and B data 369.
  • the R data 367 is image data having only the pixel value of the R pixel 362.
  • the G data 368 is image data of only the pixel value of the G pixel 363 or 364.
  • the B data 369 is image data having only the pixel value of the B pixel 365.
  • the R pixels 362 are arranged every other pixel in the pixel row direction. The same applies to the other G pixels 363 and 364 and the B pixel 365.
  • the image reconstruction unit 202 cuts out, for example, an image range from the G data 368 in each of the standard image and the reference image, and generates the above-described standard pixel data and reference pixel data.
  • FIG. 15 is a schematic diagram illustrating an example of upsampling with respect to the Bayer array image 361.
  • the color pixel unit 366 in one unit row is an image range for generating one-dimensional pixel data.
  • the image reconstruction unit 202 can perform upsampling of the G pixel value by extracting the G pixel value for each pixel row and linearly combining the plurality of extracted G pixel values.
  • the color pixel units 366 in a plurality of unit rows are in an image range for generating one-dimensional pixel data.
  • the image reconstruction unit 202 extracts G pixel values for each pixel row, and performs linear interpolation on the plurality of extracted G pixel values after performing zero interpolation, thereby performing upsampling of the G pixel values. It can be carried out.
  • the image reconstruction unit 202 complements two zeros immediately before each boundary of the color pixel unit 366 with respect to the G pixel values of the first pixel row and the fourth pixel row. Two zeros are complemented immediately after each boundary of the color pixel unit 366 for the G pixel value in the third pixel row.
  • the image reconstruction unit 202 extracts a pixel value of a specific color for each pixel row. Then, the image reconstruction unit 202 performs upsampling of the pixel values of all colors by linearly combining the extracted G pixel value, B pixel value, and R pixel value after performing zero interpolation. Can do. As shown in FIG. 15C, different one-dimensional pixel data is obtained depending on the position where zero compensation is performed.
  • the stereo image processing apparatus 100 can easily perform the upsampling process by using the property of the Bayer array image.
  • the stereo image processing apparatus 100 can perform parallax calculation with higher accuracy by using the G data 368 than in the case of using the R data 367 and the B data 369.
  • the effective image resolution deteriorates.
  • R data 367, G data 368, and B data 369 having different wavelengths are used as they are, pixel locking occurs, so that the data cannot be used as RAW data.
  • the R data 367, the G data 368, and the B data 369 can be used as they are.
  • Embodiment 3 of the present invention parallelization correction processing is performed on an image before input to the image matching unit, and a deviation amount on the image after the parallelization correction processing is calculated with high accuracy and at high speed. This is an example.
  • FIG. 16 is a block diagram showing an example of the configuration of the stereo image processing apparatus according to the present embodiment, and corresponds to FIG. 2 of the second embodiment. The same parts as those in FIG.
  • the stereo image processing apparatus 100a includes a parallelization correction processing unit 106a and a parallelization correction information storage unit 105a in addition to the configuration of FIG.
  • the parallelization correction information storage unit 105a stores parallelization correction information in advance.
  • the parallelization correction information is a conversion rule when performing distortion correction processing and parallelization correction processing on each of the standard image and the reference image acquired by the stereo image acquisition unit 101.
  • the conversion rule for the reference image is referred to as “reference image parallelization correction information”, and the conversion rule for the reference image is referred to as “reference image parallelization correction information”.
  • the distortion correction process is a process for reducing the influence of distortion of the lens used for imaging, and is a process for correcting an object that is a straight line in real space so that it appears in a straight line in an image.
  • the parallelization correction process is a process of making the optical axis parallel between the standard image and the reference image, and includes a coordinate conversion process and an image shift process. As long as an arbitrary object is present at a position where the distance from the camera in the camera optical axis direction is the same, the coordinate transformation process is performed so that the same image area size is obtained at any position in the image. This is a process of converting coordinates.
  • the image shift process is a process in which the optical axis of the camera is made pseudo-parallel so that the object at the infinity point appears in the same position in the reference image and the reference image.
  • distortion correction and parallelization correction are collectively referred to as “distortion parallelization correction”
  • distortion correction processing and parallelization correction processing are collectively referred to as “distortion parallelization correction processing”.
  • the parallelization correction information indicates a position in the stereo image before the parallelization correction that is referred to (corresponding) by each pixel of the parallelization correction image by a real value.
  • the parallelization correction image is an image obtained by performing distortion parallelization correction processing.
  • the parallelization correction processing unit 106a performs distortion parallelization correction processing on the stereo image (standard image and reference image) based on the parallelization correction information stored in the parallelization correction information storage unit 105a. Then, the parallelization correction processing unit 106a generates a parallelization correction image for each of the standard image and the reference image.
  • the parallelization correction processing unit 106a may perform distortion parallelization correction by performing an image shift process after the coordinate conversion process, or may perform a coordinate conversion process after the image shift process. That is, the method is not particularly limited as long as both the lens distortion correction and the positional relationship correction between the two cameras can be performed.
  • the image matching unit 102 uses the parallelization correction processing unit 106a to treat the parallelized correction images of the standard image and the reference image as the standard image and the reference image, and obtain corresponding points.
  • the detailed acquisition method is the same as that of the above-described embodiment.
  • the image matching unit 102 outputs the position of the reference point and the position of the corresponding point to the filter unit 103a.
  • the stereo image processing apparatus 100a converts the color image into a grayscale image as pre-input processing to the image matching unit 102, and the image matching unit 102 converts the grayscale image into a grayscale image.
  • the corresponding point of the reference image with respect to the reference point of the reference image may be specified.
  • the stereo image processing apparatus 100a since the stereo image processing apparatus 100a according to the present embodiment performs the image matching after performing the distortion parallelization correction process on the standard image and the reference image, the corresponding points can be obtained with high accuracy.
  • the filter unit 103a performs the same filtering process as in the second embodiment. However, the position of the reference point and the position of the corresponding point acquired by the image matching unit 102 are the positions on the parallelization corrected image, but the filter unit 103a is on the stereo image acquired by the stereo image acquiring unit 101. The sub-pixel level parallax is calculated.
  • FIG. 17 is a block diagram illustrating an example of the configuration of the filter unit 103a when the parallelization correction processing unit 106a is added to the stereo image processing apparatus 100, and corresponds to FIG. 3 of the second embodiment. .
  • the same parts as those in FIG. 3 are denoted by the same reference numerals, and description thereof will be omitted.
  • the filter unit 103a includes a coordinate conversion unit 207a in addition to the configuration shown in FIG.
  • the coordinate conversion unit 207a uses the reference image (hereinafter referred to as the reference image) acquired by the stereo image acquisition unit 101 based on the parallelization correction information stored in the parallelization correction information storage unit 105a, based on the position of the reference point acquired from the image matching unit 102. In this embodiment, it is converted to a position on the “original reference image”.
  • the coordinate conversion unit 207a determines the position of the corresponding point acquired from the image matching unit 102 based on the parallelization correction information in the parallelization correction information storage unit 105a and the reference image ( Hereinafter, in this embodiment, it is converted to a position on the “original reference image”.
  • original image the original standard image and the original reference image are collectively referred to as “original image”.
  • the coordinate conversion unit 207a outputs the obtained position of the reference point on the original reference image and the position of the corresponding point on the original reference image to the image cutout unit 201.
  • the coordinate conversion unit 207a calculates the position coordinates of the reference point on the original reference image based on the position of the reference point on the parallelization correction image and the parallelization correction information.
  • the position coordinates of the reference point on the parallelization corrected image are integer values, and the position coordinates of the reference point on the original reference image are real values.
  • the coordinate conversion unit 207a converts the position coordinates of the reference point on the original reference image into an integer value by rounding off the first decimal place of the position coordinates of the reference point on the original reference image.
  • the coordinate conversion unit 207a calculates the position coordinates of the corresponding point on the original reference image for the position of the corresponding point on the parallelization correction image.
  • the position coordinates of the corresponding points on the parallelization corrected image are integer values, and the position coordinates of the corresponding points on the original reference image are real values.
  • the coordinate conversion unit 207a for example, rounds off the first decimal place of the position coordinate of the corresponding point on the original reference image, thereby rounding the position coordinate of the corresponding point on the original reference image. Is converted to an integer value.
  • the coordinate conversion unit 207a rounds up or down when converting the position coordinates of the reference point to an integer value, and rounds up or down when converting the position coordinates of the corresponding point to an integer value.
  • the difference from the value is calculated as the shift amount Z. Note that the coordinate conversion unit 207a treats the rounded down value as plus and the rounded up value as minus.
  • the coordinate conversion unit 207a rounds off the first decimal place of the position coordinate and converts it to an integer value, whereby the position coordinate of the reference point on the original reference image becomes (2, 2), and the original reference The position coordinates of the corresponding point on the image are (4, 2).
  • the coordinate conversion unit 207a outputs the position coordinates of the reference point converted to an integer value, the position coordinates of the corresponding point converted to an integer value, and the shift amount Z to the peak position detection unit 104.
  • the processing of the filter unit 103 after the image cutout unit 201 is the same as that of the above-described embodiment.
  • the peak position detection unit 104 uses the parallelization correction image to calculate the amount of deviation on the parallelization correction image.
  • the peak position detection unit 104 first adds the sub-pixel level shift amount ⁇ ′ to the pixel level shift amount n.
  • This shift amount ⁇ ′ is a value obtained by dividing the shift amount ⁇ at the sub-pixel level obtained by the peak value calculation by the number of pixel rows of the unit reference image used in the image reconstruction.
  • the peak position detection unit 104 adds the displacement value ⁇ ′ of the sub-pixel level to the displacement amount n of the pixel level, and further converts the real-value position coordinates to an integer value by the coordinate conversion unit 207a.
  • the shift amount Z generated when the position coordinates are converted is added.
  • the peak position detection unit 104 can calculate the parallax with high accuracy.
  • the stereo image processing apparatus 100a specifies corresponding points by performing image matching using the parallelized corrected image, and calculates sub-pixel level parallax using the original image. To do. Thereby, the stereo image processing apparatus 100a can calculate the parallax efficiently and with higher accuracy.
  • the distortion parallelization correction process is described as an example of the pre-input process to the image matching unit 102.
  • the present invention is not limited to this, and the image reduction process is performed. Also good.
  • the stereo image processing apparatus 100a can calculate the pixel level shift amount n at high speed by using the reduced image in the image matching unit 102. Then, the stereo image processing apparatus 100a can calculate the shift amount ⁇ ′ at the sub-pixel level with high accuracy by using the original image in the filter unit 103a.
  • the stereo image processing apparatus 100a may perform image reduction processing after performing distortion parallelization correction processing.
  • the stereo image processing apparatus 100a can calculate the pixel level shift amount n at high speed by using the reduced parallelized correction image in the image matching unit 102. Then, the stereo image processing apparatus 100a can calculate the shift amount ⁇ 'at the sub-pixel level with high accuracy by using the original standard image and the original reference image in the filter unit 103a.
  • the coordinate conversion unit 207a of the filter unit 103a has been described as converting the position of the reference point and the corresponding point on the parallelized correction image to the position on the original reference image or the original reference image.
  • the present invention is not limited to this, and a sub-pixel level using a “vertical pixel correction standard image” obtained by correcting the original standard image only in the vertical direction and a “vertical pixel correction reference image” obtained by correcting the original reference image only in the vertical direction.
  • the parallax may be calculated. In that case, the stereo image processing apparatus 100a can greatly reduce the amount of calculation.
  • the distortion parallelization correction only in the vertical direction is referred to as “vertical pixel correction”
  • the pixel value obtained by the vertical pixel correction is referred to as “vertical pixel correction value”.
  • the vertical pixel correction reference image and the vertical pixel correction reference image are collectively referred to as “vertical pixel correction image”. That is, the pixel value of the vertical pixel correction image is a vertical pixel correction value obtained by performing vertical pixel correction on the original image.
  • FIG. 18 is a block diagram illustrating an example of a configuration of a stereo image processing apparatus that specifies a corresponding point for a stereo image of a Bayer array image using a vertical pixel correction image and calculates a sub-pixel level parallax.
  • the stereo image processing apparatus 100b newly includes a vertical pixel correction image generation unit 107b in addition to the configuration of FIG. FIG. 18 corresponds to FIG. 16 of the third embodiment, and the same parts as those in FIG. 16 are denoted by the same reference numerals, and description thereof will be omitted.
  • the vertical pixel correction image generation unit 107b performs the vertical direction on the stereo image acquired by the stereo image acquisition unit 101, that is, the original image, based on the parallelization correction information stored in the parallelization correction information storage unit 105a. Only the distortion parallelization correction process is performed. Then, the vertical pixel correction image generation unit 107b generates a vertical pixel correction image obtained by performing vertical pixel correction on the original image.
  • FIG. 19 is a block diagram illustrating an example of the configuration of the vertical pixel correction image generation unit 107b.
  • the vertical pixel correction image generation unit 107b includes a Bayer array definition unit 108b, a parallelization correction information acquisition unit 109b, and a vertical pixel correction processing unit 110b.
  • the Bayer array definition unit 108b defines how Bayer arrays are arranged in the vertical pixel correction image. Specifically, the Bayer array definition unit 108b defines that the upper left of the image starts with R (red) or the upper left of the image starts with B (blue).
  • the definition method may be embedded in a program or may be defined using a setting file or the like. Note that the arrangement of Bayer arrays in the vertical pixel correction reference image and the vertical pixel correction reference image is the same.
  • the parallelization correction information acquisition unit 109b acquires the parallelization correction information stored in the parallelization correction information storage unit 105a.
  • the vertical pixel correction processing unit 110b performs vertical pixel correction on the original image based on the parallelization correction information acquired by the parallelization correction information acquisition unit 109b, and generates a vertical pixel correction image.
  • the parallelization correction information is originally a conversion rule used to correct distortion parallelization in both the vertical and horizontal directions.
  • the vertical pixel correction processing unit 110b uses the parallelization correction information to perform distortion only in the vertical direction. Parallelization correction (that is, vertical pixel correction) is performed.
  • FIG. 20A, 20C, and 20D An example of processing for generating a vertical pixel correction reference image by performing vertical pixel correction on the original reference image will be described with reference to FIG. 20A, 20C, and 20D, one section represents one pixel.
  • FIG. 20A shows a vertical pixel correction reference image generated by the vertical pixel correction image generation unit 107b.
  • an image having a pixel number of 480 ⁇ 640 is generated in the case of a VGA image and 960 ⁇ 1280 in the case of a 1.3 MEGA image.
  • the numbers (1) to (12) when scanning in the right direction while moving the row from the upper left to the lower direction are the numbers of the respective pixels.
  • the pixel specified by the number of each pixel is referred to as “pixel (“ pixel number ”)”.
  • FIG. 20B shows an example of the reference image parallelization correction information acquired by the parallelization correction information acquisition unit 109b.
  • the format shown in FIG. 20B is an example, and the present invention is not limited to this.
  • the reference image parallelization correction information in FIG. 20B indicates the correspondence between the position coordinates on the image after distortion parallelization correction processing in both the vertical and horizontal directions and the position coordinates on the original reference image.
  • the position coordinate (1.6, 1.2) is calculated.
  • original coordinates the position coordinates used to calculate the pixel values on the image after the distortion parallelization correction processing in both the vertical and horizontal directions.
  • FIG. 20C shows the array of Bayer arrays of the original reference image
  • FIG. 20D shows the array of Bayer arrays of the vertical pixel correction reference image defined by the Bayer array definition unit 108b.
  • FIG. 20C for example, an array of Bayer arrays arranged in order of G (green), B (blue), and G (green) from the left in the first pixel row is shown.
  • the arrangement of the Bayer array by R, G, and B is also shown for the second to fourth pixel rows.
  • FIG. 20D also shows the arrangement of Bayer arrays by R, G, and B.
  • the original reference image holds pixel value data for each position coordinate whose X coordinate and Y coordinate are both integer values.
  • a pixel 2007 whose position coordinates are (0, 0) (in FIG. 20C, 0 is expressed as 0.0) has a pixel value of color G, and its position coordinates are (1, 0) (in FIG. 20C, 0).
  • a pixel 2004 having a color of B holds a pixel value of B. That is, the position coordinates of the pixel values held as the original reference image are discrete.
  • the original coordinates indicated by the reference image parallelization correction information are real values such as (1.5, 1.2). Therefore, the pixel indicated by the original coordinates does not exist on the original reference image.
  • the vertical pixel correction process a plurality of pixels on the original reference pixel are selected using values after the decimal point of the original coordinates, and a vertical pixel correction value is calculated using the pixel values of the selected pixels.
  • FIG. 33 is a flowchart showing the flow of vertical pixel correction processing. A method of generating the vertical pixel correction reference image shown in FIG. 20A by the vertical pixel correction processing will be described with reference to FIG.
  • the vertical pixel correction image generation unit 107b selects a pixel that is a target of vertical pixel correction value calculation (hereinafter, referred to as “vertical pixel correction target pixel”) in the vertical pixel correction reference image (S3301).
  • the vertical pixel correction image generation unit 107b selects, for example, the pixel (1) 2006 in FIG. 20 as the first vertical pixel correction target pixel. Then, for example, the vertical pixel correction image generation unit 107b scans the vertical pixel correction reference image in the right direction while moving the row from the upper left to the lower direction, and the pixels (1) to (12) as the vertical pixel correction target pixels. Select in order.
  • the vertical pixel correction image generation unit 107b refers to the Bayer array arrangement of the vertical pixel correction reference image (FIG. 20D) and determines the color of the vertical pixel correction target pixel (S3302). For example, when the pixel (5) 2001 whose position coordinates are (1, 1) is selected as the vertical pixel correction target pixel in step S3301, the vertical pixel correction image generation unit 107b performs a Bayer of the vertical pixel correction reference image. Reference is made to the color 2003 of the position coordinate (1, 1) of the array (FIG. 20D). In this example, the vertical pixel correction image generation unit 107b determines that the color of the vertical pixel correction target pixel (pixel (5)) is “B”.
  • the vertical pixel correction image generation unit 107b refers to the parallelization correction information and acquires the original coordinates of the vertical pixel correction target pixel (S3303).
  • the vertical pixel correction image generation unit 107b refers to the parallelization correction information (FIG. 20B), and the original coordinates of the pixel (5) ( 1.6, 1.2).
  • the vertical pixel correction image generation unit 107b acquires the position coordinates of the vertical pixel correction target pixel on the original reference image (S3303). Since the vertical pixel correction processing unit 110b corrects the parallel distortion of the original reference image only in the vertical direction, the X coordinate of the original coordinate is not used as the position coordinate on the original reference image of the vertical pixel correction target pixel. Use only coordinates. That is, the vertical pixel correction image generation unit 107b uses the X coordinate of the original coordinates (1.6, 1.2) as the position coordinate on the original reference image of the vertical pixel correction target pixel, and the X of the vertical pixel correction target pixel. The position coordinates (1, 1.2) replaced by the coordinates are the position coordinates on the original reference image of the vertical pixel correction target pixel.
  • the vertical pixel correction original coordinates are position coordinates obtained by replacing the X coordinates of the original coordinates with the X coordinates of the vertical pixel correction target pixels.
  • the vertical pixel correction original coordinates of the pixel (5) 2001 are (1, 1.2). ).
  • the vertical pixel correction image generation unit 107b refers to the arrangement of the Bayer array of the original reference image (FIG. 20C), and determines the color of the pixel of the vertical pixel correction original coordinates acquired in step S3303 (S3304). .
  • the color of the pixel 2002 whose position coordinates are (1, 1.2) in the original reference image is “G”. Therefore, in this example, the vertical pixel correction image generation unit 107b determines that the color of the pixel of the vertical pixel correction original coordinates of the vertical pixel correction target pixel (pixel (5)) is “G”.
  • the vertical pixel correction image generation unit 107b determines whether or not the vertical pixel correction target pixel determined in S3302 and the pixel of the vertical pixel correction original coordinates of the vertical pixel correction target pixel determined in step S3304 are the same color. Is determined (S3305).
  • the color determined by the vertical pixel correction image generation unit 107b in S3302 is “B”
  • the color determined in S3304 is “G”.
  • the vertical pixel correction image generation unit 107b determines that the colors are not the same, and proceeds to step S3307 to calculate a vertical pixel correction value when the colors are not the same. Details of the vertical pixel correction value calculation in the case of a different color in step S3307 will be described later.
  • FIG. 21A is a vertical pixel correction reference image
  • FIG. 21B is reference image parallelization correction information
  • FIG. 21C is an array of Bayer arrays of original reference images
  • FIG. 20D is an array of Bayer arrays of vertical pixel correction reference images. It is an example.
  • FIGS. 21A, 21C, and 21D as in FIG. 20, one section represents one pixel.
  • step S3301 the vertical pixel correction image generation unit 107b selects, for example, the pixel (8) 2101 in FIG. 21 as the vertical pixel correction target pixel.
  • step S3302 the vertical pixel correction image generation unit 107b determines the color of the vertical pixel correction target pixel with reference to the array of Bayer arrays of the vertical pixel correction reference image (FIG. 21D).
  • the determination method is the same as that when the pixel (5) 2001 is selected as the vertical pixel correction target pixel in step S3301.
  • the vertical pixel correction image generation unit 107b determines that the color of the vertical pixel correction target pixel (pixel (8) 2101) is “G”.
  • the vertical pixel correction image generation unit 107b refers to the parallelization correction information and acquires the vertical pixel correction source coordinates of the vertical pixel correction target pixel.
  • the acquisition method is the same as that when the pixel (5) 2001 is selected as the vertical pixel correction target pixel in step S3301.
  • the vertical pixel correction image generation unit 107b acquires the vertical pixel correction original coordinates (1.0, 2.8) of the pixel (8) 2101 that is the vertical pixel correction target pixel.
  • step S3304 the vertical pixel correction image generation unit 107b determines the color of the pixel of the original coordinates for vertical pixel correction with reference to the array of Bayer arrays of the original reference image (FIG. 21C).
  • the determination method is the same as that when the pixel (5) 2001 is selected as the vertical pixel correction target pixel in step S3301.
  • the vertical pixel correction image generation unit 107b determines that the color of the pixel of the vertical pixel correction original coordinates of the vertical pixel correction target pixel (pixel (8) 2101) is “G”.
  • step S3305 the vertical pixel correction image generation unit 107b has the same pixel as the vertical pixel correction target pixel determined in step S3302 and the vertical pixel correction original coordinate pixel of the vertical pixel correction target pixel determined in step S3304. Determine whether or not.
  • the vertical pixel correction target pixel is the pixel (8) 2101
  • the color determined by the vertical pixel correction image generation unit 107b in S3302 is “G”
  • the color determined in Step S3304 is also “G”. .
  • the vertical pixel correction image generation unit 107b determines that the colors are the same, and proceeds to step S3306 to calculate a vertical pixel correction value for the same color. Details of the vertical pixel correction value calculation in the case of the same color in step S3306 will be described later.
  • step S3308 the vertical pixel correction image generation unit 107b determines whether the pixel is the final vertical pixel correction target pixel. For example, when the vertical pixel correction image generation unit 107b selects the pixels (1) to (12) in this order as the vertical pixel correction target pixels, calculation of the vertical pixel correction values up to the pixel (12) is completed. (Yes), the process of the flowchart of FIG. 33 ends.
  • the vertical pixel correction image generation unit 107b proceeds to step S3301, and selects the next vertical pixel correction target pixel.
  • step S3307 vertical pixel correction value calculation for different colors
  • the vertical pixel correction processing unit 110b is located above and below the pixel of the vertical pixel correction original coordinate in the original reference image.
  • a vertical pixel correction value is calculated based on a pixel value of a pixel having the same color as the vertical pixel correction target pixel among the pixels located.
  • FIG. 34 is a flowchart of vertical pixel correction value calculation in the case of different colors, which is step S3307 of the flowchart of FIG.
  • step S3301 of the flowchart in FIG. 33 a case will be described as an example where pixel (5) 2001 in FIG. 20A is selected as the vertical pixel correction target pixel in step S3301 of the flowchart in FIG. 33 and it is determined in step S3305 that the colors are not the same.
  • step S3401 the vertical pixel correction image generation unit 107b determines whether the first decimal place of the Y coordinate of the vertical pixel correction target pixel is 4 or less.
  • Step S3402 When the first decimal place of the Y coordinate of the vertical pixel correction target pixel is 4 or less (Yes), the vertical pixel correction image generation unit 107b proceeds to Step S3402, and when it is not 4 or less (No), the process proceeds to Step S3403.
  • the vertical pixel correction image generation unit 107b uses a value that is rounded down when the Y coordinate of the vertical pixel correction target pixel is rounded off to the first decimal place (hereinafter referred to as a “rounded down value”).
  • the weighting factor k is calculated by summing the value with the rounded down value.
  • the weight coefficient k is a coefficient used for calculating a weight added to the pixel value in the vertical pixel correction value calculation described later.
  • the vertical pixel correction image generation unit 107b proceeds to step S3404.
  • step S3403 the vertical pixel correction image generation unit 107b uses a value that is rounded up when the Y coordinate of the vertical pixel correction target pixel is rounded off to the first decimal place (hereinafter referred to as “rounded up value”).
  • the weighting factor k which is a value obtained by dividing the rounded-up value from 1, is calculated, and the process advances to step S3404.
  • step S3404 the vertical pixel correction image generation unit 107b calculates the vertical pixel correction value of the vertical pixel correction target pixel using the weighting coefficient k calculated in step S3402 or step S3403.
  • Expression (6) an expression when linear interpolation is used for calculating the vertical pixel correction value is shown as Expression (6).
  • a ⁇ 1 is the pixel value of the pixel 2004 positioned one above the vertical pixel correction original coordinate 2002
  • a 1 is the pixel 2005 positioned one level below the vertical pixel correction original coordinate 2002.
  • Pixel value. Therefore, when the pixel (5) 2001 is the vertical pixel correction target pixel, the vertical pixel correction value calculated by substituting k 1.2 into the equation (6) is 0.4 ⁇ A ⁇ 1 +0. .6 ⁇ A 1 That is, the vertical pixel correction value is a value calculated based on the pixel values of a plurality of pixels in the vicinity of the pixel located at the original coordinates for vertical pixel correction.
  • the weight added to each pixel value of the neighboring pixels when calculating the vertical pixel correction value depends on how much the original coordinate is deviated from the plurality of pixels with respect to the original pixel for vertical pixel correction. To do.
  • the vertical pixel correction image generation unit 107b finishes the processing of the flowchart of FIG. 34 (vertical pixel correction value calculation for different colors).
  • step S3307 (calculation of vertical pixel correction value for the same color) in the flowchart of FIG. 33 will be described.
  • the vertical pixel correction processing unit 110b includes the pixel of the vertical pixel correction original coordinate and the pixel of the vertical pixel correction original coordinate in the original reference image.
  • the vertical pixel correction value is calculated based on the pixel values of pixels of the same color located two pixels above or two pixels below.
  • FIG. 35 is a flowchart of the vertical pixel correction value calculation in the case of the same color, which is step S3306 in the flowchart of FIG.
  • step S3501 the vertical pixel correction image generation unit 107b determines whether the first decimal place of the Y coordinate of the vertical pixel correction target pixel is 4 or less.
  • Step S3502 When the first decimal place of the Y coordinate of the vertical pixel correction target pixel is 4 or less (Yes), the vertical pixel correction image generation unit 107b proceeds to Step S3502, and when it is not 4 or less (No), the process proceeds to Step S3503. move on.
  • the pixel (8) 2101 is selected as the vertical pixel correction target pixel
  • the Y coordinate of the pixel 2102 of the original coordinate for vertical pixel correction is 2.8
  • the first decimal place value is 8
  • the vertical pixel correction image generation unit 107b proceeds to step S3503.
  • step S3502 the vertical pixel correction image generation unit 107b calculates the weighting factor k using the cut-off value. Specifically, the weight coefficient k is set as a rounded down value.
  • step S3504 the vertical pixel correction image generation unit 107b calculates the vertical pixel correction value of the vertical pixel correction target pixel using the weighting coefficient k calculated in step S3502.
  • the equation when linear interpolation is used to calculate the vertical pixel correction value is the same as equation (6).
  • a ⁇ 1 is the pixel value of the pixel of the original coordinates for vertical pixel correction
  • a 1 is the pixel value of the pixel located above the two pixels in the original reference image.
  • a ⁇ 1 is the pixel value of the vertical pixel correction pixel 2102
  • a 1 is the pixel value of the pixel 2104 located on two pixels of the vertical pixel correction pixel.
  • step S3503 the vertical pixel correction image generation unit 107b calculates the weighting coefficient k as a value obtained by subtracting the rounded value from the number 2 using the first decimal place value (hereinafter, rounded value). The process proceeds to step S3505.
  • the weight coefficient k is 1.8 between 2.0 and 0.2.
  • step S3505 the vertical pixel correction image generation unit 107b calculates the vertical pixel correction value of the vertical pixel correction target pixel using the weighting coefficient k calculated in step S3503.
  • the equation when linear interpolation is used to calculate the vertical pixel correction value is the same as equation (6). Therefore, the pixel value after vertical pixel correction is obtained by 0.1 ⁇ A ⁇ 1 + 0.9 ⁇ A 1 .
  • a 1 is the pixel value of the pixel of the original coordinates for vertical pixel correction
  • a ⁇ 1 is the pixel value of the pixel located above the two pixels in the original reference image.
  • a ⁇ 1 is a vertical pixel correction pixel 2104 (in FIG. 21, it is expressed as G ⁇ 1 to indicate that it is the same color (G) as the vertical pixel correction target pixel).
  • the pixel value A ⁇ 1 is the pixel value of the pixel 2102 (G 1 ) of the original coordinates for vertical pixel correction.
  • the vertical pixel correction image generation unit 107b ends the processing of the flowchart of FIG. 35 (vertical pixel correction value calculation for the same color) by calculating the vertical pixel correction value of the vertical pixel correction target pixel in step S3504 or step S3505.
  • the pixel value of the pixel at the original coordinate for vertical pixel correction is used as it is.
  • the pixel value of the pixel 2102 of the vertical pixel correction original coordinate is directly used as the vertical pixel correction value.
  • the pixel value of the pixel 2104 of the vertical pixel correction original coordinate is directly used as the vertical pixel correction value.
  • the vertical pixel correction processing unit 110b is a pixel positioned above and below the pixel of the original standard image to be referred to based on the Y coordinate of the pixel of the original standard image to be referred to for distortion parallelization correction. Is used to calculate the pixel value of the color set by the Bayer array definition unit 108b. Although the vertical pixel correction value calculation method for the standard image has been specifically described here, the vertical pixel correction processing unit 110b similarly uses the reference image parallelization correction information and the original reference image for the reference image as well. A vertical pixel correction value is calculated, and a vertical pixel correction reference image is generated.
  • the vertical pixel correction processing unit 110b is configured to perform vertical pixel correction of the entire image before the filtering process by the filter unit 103b.
  • the present invention is not limited to this configuration, and the vertical pixel correction processing unit 110b may perform vertical pixel correction only on the target region every time before the image cutout unit 201 of the filter unit 103b cuts out an image.
  • the filter unit 103b performs the same filtering process as the filter unit 103a. However, while the filter unit 103a calculates the sub-pixel level parallax on the stereo image (original standard image and original reference image), the filter unit 103b calculates the vertical pixel correction image (vertical pixel correction standard image and vertical pixel). The parallax at the sub-pixel level in the corrected reference image) is calculated.
  • FIG. 22 is a block diagram illustrating an example of the configuration of the filter unit 103b when the vertical pixel correction image generation unit 107b is added to the stereo image processing apparatus 100a, and corresponds to FIG. 17 of the third embodiment. is there.
  • the same parts as those in FIG. 17 are denoted by the same reference numerals, and description thereof will be omitted.
  • the filter unit 103b includes a Bayer array adjustment unit 208b instead of the coordinate conversion unit 207a in the configuration illustrated in FIG.
  • the Bayer array adjustment unit 208b is a Bayer array of the vertical pixel correction reference image and the vertical pixel correction reference image based on the X coordinates of the reference point and the corresponding point obtained on the parallelization correction image acquired from the image matching unit 102. It is determined whether or not the sequence of matches.
  • the Bayer array adjustment unit 208b matches the Bayer array of the vertical pixel correction reference image and the vertical pixel correction reference image.
  • the acquired reference points and corresponding points are sent to the image cutout unit 201 as they are.
  • the Bayer array adjustment unit 208b When one of the X coordinates of the reference point and the corresponding point is an even number and the other is an odd number, the Bayer array adjustment unit 208b does not match the Bayer array arrangement of the vertical pixel correction reference image and the vertical pixel correction reference image. For example, the X coordinate of the corresponding point is incremented by one. Then, the Bayer array adjustment unit 208b sends a pixel obtained by adding 1 to the X coordinate of the acquired corresponding point as a new corresponding point to the image clipping unit 201 together with the acquired reference point.
  • the Bayer array adjustment unit 208b notifies the peak position detection unit 104 of the information that +1 is added, and when the peak position detection unit 104 obtains the parallax, the pixel level shift amount n and the sub-pixel level shift amount ⁇ . In addition to ', +1 adjusted by the Bayer array adjustment unit 208b is also added.
  • the X coordinate of the corresponding point may be shifted to ⁇ 1, that is, one pixel to the left.
  • -1 adjusted by the Bayer array adjustment unit is also added. (That is, 1 is subtracted from the sum of the pixel level deviation amount n and the sub-pixel level deviation amount ⁇ '.)
  • the stereo image processing apparatus 100b calculates the sub-pixel level parallax using the vertical pixel correction image. Thereby, the stereo image processing apparatus 100b can calculate parallax with higher accuracy.
  • the stereo image processing apparatus 100b converts the Bayer array image into a grayscale image as a pre-input process to the image matching unit 102, acquires corresponding points using the grayscale image, and performs vertical correction on the Bayer array image.
  • Sub-pixel level parallax may be calculated using an image.
  • the filter unit 103b may have another configuration.
  • FIG. 23 shows another configuration of the filter unit 103b that speeds up the processing.
  • FIG. 23 is another configuration of the filter unit 103b of FIG. 22, and is configured to output the processing results of the image reconstruction unit 202 and the anti-aliasing unit 203 to the Bayer array adjustment unit 208b.
  • the filter unit 103c calculates a sub-pixel level parallax with respect to a certain reference point based on the corresponding points obtained by the image matching unit 102. At this time, if the pixel row for calculating the sub-pixel level parallax of a certain reference point matches the pixel row for which the reference pixel and the sub-pixel level parallax have been calculated in the immediately preceding sub-pixel level parallax calculation processing, The filter unit 103c can share the image reconstruction process and the anti-aliasing process.
  • the filter unit 103c Since the image input to the filter unit 103c is an image corrected in the vertical direction by the vertical pixel correction image generation unit 107b, the coordinate in the vertical direction is the same as the parallelized correction image used in the image matching unit 102. I'm doing it. Therefore, while the pixel rows that include the reference points match, the pixel rows that calculate the sub-pixel level parallax also match, so the sub-pixel level parallax is calculated in the pixel row direction (horizontal direction). In the case of going, the filter unit 103c can perform image reconstruction and anti-aliasing processing on a single pixel row.
  • the image cutout unit 201 cuts out and uses the necessary data from the data after the anti-aliasing process, thereby eliminating processing waste. As a result, the stereo image processing apparatus 100b can greatly reduce the amount of calculation, and can calculate the parallax with higher speed and higher accuracy.
  • the present embodiment describes a method for performing more appropriate windowing processing in accordance with a position where the correlation between the standard pixel data and the reference pixel data is high (hereinafter referred to as “correlation peak”) in the stereo image processing apparatus 100. Is.
  • Embodiment 2 the windowing process using the second window function in the windowing unit 204 has been described.
  • the windowing process using the second window function is intended to reduce noise components generated by cutting out the reference pixel data and the reference pixel data.
  • the windowing process using the second window function when the window function having the maximum value in the correlation peak is used, there is room for the filtering result in the filter unit 103 to be obtained with higher accuracy.
  • the windowing process using the window function having the maximum value in the correlation peak is a windowing process in accordance with the correlation peak.
  • the fourth embodiment of the present invention uses a feature that reconstructs an image range into one-dimensional pixel data, so that the amount of calculation is smaller than that of the conventional method and the memory used is small.
  • the multiplication process is disclosed.
  • FIG. 24 is a block diagram showing an example of the configuration of the stereo image processing apparatus 100c according to the present embodiment.
  • FIG. 24 corresponds to FIG. 2 of the second embodiment.
  • the stereo image processing apparatus 100c shown in FIG. 24 differs from FIG. 2 in that it has a filter unit 103d instead of the filter unit 103, has a peak position detection unit 104b instead of the peak position detection unit 104, and has sub-pixel parallax. The point is that it further includes an estimation unit 107.
  • symbol is attached
  • the sub-pixel parallax estimation unit 107 calculates an approximate value of parallax at the sub-pixel level.
  • the sub-pixel level parallax calculated by the sub-pixel parallax estimation unit 107 may be at least an approximate value with an accuracy equal to or greater than the reciprocal of the data extraction interval. For example, when the data extraction interval is 8, the sub-pixel level parallax may have an accuracy of 1/8 pixel. The data extraction interval will be described later.
  • the approximate value of the sub-pixel level parallax can be calculated by using, for example, the “conformal straight line fitting method” or the “quadratic curve fitting method”.
  • the parallax output by the equiangular straight line fitting method and the quadratic curve fitting method is inferior in accuracy to the parallax output by the peak position detection unit 104, but the sub-pixel level parallax can be calculated with a small amount of calculation.
  • an outline of processing of the subpixel parallax estimation unit 107 when the equiangular straight line fitting method is used will be described.
  • the sub-pixel parallax estimation unit 107 acquires the base image, the reference image, the coordinates of the base point of the base image, and the coordinates of the corresponding point of the reference image from the image matching unit 102.
  • the parallax of the corresponding point with respect to the predetermined reference point is n
  • the coordinate of the corresponding point with respect to the coordinate (xa, ya) of the reference point is (xa + n, ya).
  • the SAD value of the corresponding point with respect to the reference point is represented by SAD (n) as shown in Expression (1).
  • the coordinates of the point left by one pixel and the point right by one pixel in the x-axis direction from the corresponding point are (xa + n ⁇ 1, ya) and (xa + n + 1, ya), respectively.
  • the SAD values of the points are SAD (n ⁇ 1) and SAD (n + 1), respectively.
  • the sub-pixel parallax estimation unit 107 can calculate the sub-pixel level parallax ns as shown in Expression (7).
  • FIG. 25 is a diagram for explaining the relationship between the parallax and the SAD value.
  • the points where the SAD values for the parallax are plotted for the pixel left one pixel in the x-axis direction from the corresponding point, the corresponding point, and the pixel right one pixel in the x-axis direction from the corresponding point are a, Indicated by b and c.
  • the straight line passing through points a and b is L1
  • the inclination of L1 is k
  • the straight line passing through point c is -k
  • the parallax value at the intersection d of L1 and L2 is the sub-value at the reference point.
  • the method for obtaining the approximate value of the sub-pixel level parallax is not limited to the equiangular straight line fitting method and the quadratic curve fitting method, and other methods may be used.
  • FIG. 26 is a block diagram illustrating an example of the configuration of the filter unit 103d in the stereo image processing apparatus 100c.
  • FIG. 26 corresponds to FIG. 3 of the second embodiment.
  • FIG. 26 is different from FIG. 3 in that the filter unit 103d further includes a data extraction unit 208.
  • the same parts as those in FIG. 3 are denoted by the same reference numerals, and description thereof will be omitted.
  • the data extraction unit 208 performs data extraction at regular intervals on the one-dimensional pixel data from which aliasing noise has been removed by the anti-aliasing unit 203. Thereby, the data amount handled by the subsequent windowing unit 204 and the filter generation unit 205 is reduced, and the calculation amount can be reduced. At this time, the data extraction unit 208 shifts the data extraction start position based on the approximate value of the sub-pixel level parallax, thereby enabling windowing processing in accordance with the correlation peak.
  • One-dimensional pixel data obtained as a result of data extraction by the data extraction unit 208 is referred to as extracted one-dimensional pixel data.
  • FIG. 32 is a diagram for explaining the operation of the data extraction unit 208.
  • the operation of the data extraction unit 208 will be described with reference to FIG.
  • the data extraction unit 208 includes data extraction start position calculation (S1001), data extraction (S1002), and parallax correction value calculation (S1003). This will be specifically described below.
  • the data extraction unit 208 calculates a position where data extraction at equal intervals with respect to the one-dimensional pixel data is started (S1001).
  • the data extraction unit 208 calculates the data extraction start position based on the approximate value of the sub-pixel level parallax obtained by the sub-pixel parallax estimation unit 107. A specific calculation procedure is shown below.
  • N, W, and K which are coefficients necessary for calculating the data extraction start position, are obtained.
  • the coefficient N is an integer value obtained by dividing the number of pixel rows by two. For example, when the number of pixel rows is 4, the coefficient N is 2, and when the number of pixel rows is 3, the coefficient N is 1.
  • the coefficient W is a value obtained by dividing 0.5 by the number of pixel rows. For example, when the number of pixel rows is 2, the coefficient W is 0.25.
  • the coefficient K is a value obtained by subtracting 0.5 from the value after the decimal point of the approximate value of parallax at the sub-pixel level. That is, -0.5 ⁇ K ⁇ 0.5. Data extraction is started by substituting these coefficients into Equation (8) when the number of pixel rows in the image range is odd, and into Equation (9) when the number of pixel rows in the image range is even. A position difference D is calculated.
  • FIG. 30 shows an equation for calculating the difference D of the data extraction start position when the number of pixel rows in the image range cut out to calculate the parallax from the standard image and the reference image is 2, 3, and 4.
  • the data extraction start position difference D Using the data extraction start position difference D, the data extraction start position in the one-dimensional pixel data reconstructed from the image range of the standard image and the reference image is changed.
  • the data extraction start position in the reference pixel data is changed from the leftmost pixel of the one-dimensional pixel data to the right pixel by the absolute value of D.
  • the difference D is negative, the data extraction start position in the reference pixel data is changed from the leftmost pixel of the one-dimensional pixel data to the right pixel by the absolute value of D.
  • the difference D is 0, the data extraction start position is not changed.
  • the data extraction unit 208 holds in advance information on data extraction intervals when performing data extraction.
  • the value of the number of pixel rows in the original image range when the stereo image is a grayscale image, or the value of a multiple of the number of pixel rows when the stereo image is a color image and Bayer array image data May be set, or a smaller value may be set for the purpose of ensuring the redundancy of the one-dimensional pixel data and increasing the error resistance.
  • the data extraction unit 208 extracts the extracted one-dimensional pixel by performing data extraction at equal intervals from the one-dimensional pixel data of the image range of the standard image and the reference image based on the data extraction start position and the data extraction interval value. Get the data.
  • FIG. 28 shows an example of data extraction at equal intervals when the stereo image is a color image and is Bayer array image data.
  • FIG. 28A shows data after the image range of the pixel row number 2 shown in FIG. 28D, that is, the unit row number 1, is reconstructed into one-dimensional pixel data.
  • FIG. 28B shows data after anti-aliasing by the low-pass filter.
  • FIG. 28C shows data after data extraction for every four pixels is performed with the third pixel counting from the beginning as the data extraction start position.
  • FIG. 31 shows an example in which data extraction processing is performed on one-dimensional pixel data while changing the data extraction start position based on the difference D in the data extraction start position.
  • FIG. 31 shows that each of the stereo images is a color image and is Bayer array image data, and when the number of pixel rows in the image range is 4, 8 pixels which are the maximum values that can take a data extraction interval.
  • the parallax correction value is ⁇ 0.25.
  • the parallax correction is performed after the peak position detection unit 104b in the subsequent stage performs peak position detection to calculate the parallax. Therefore, the correction value calculated by the data extraction unit 208 is given as an input to the peak position detection unit 104b.
  • a window function having a size calculated by dividing the size of the one-dimensional pixel data by the data extraction interval is stored in advance.
  • the windowing unit 204 in the present embodiment performs windowing processing using the extracted one-dimensional pixel data extracted by the data extraction unit 208 as an input. Other processes are the same as those of the windowing unit 204 in the first to third embodiments.
  • the peak position detection unit 104b corrects the parallax value after performing the same processing as the peak detection unit 104. Specifically, after obtaining the sub-pixel level parallax by the same processing as that of the peak detection unit 104, the parallax correction value according to the difference between the data extraction start positions of the base pixel data and the reference pixel data (of the filter unit 103d) The parallax value is corrected by adding (calculated in the data extraction unit 208) to the sub-pixel level parallax.
  • the parallax value after correction is 14.875.
  • the peak position detection unit 104b outputs the parallax value after performing such parallax correction.
  • the one-dimensional pixel data from which aliasing noise has been removed by the anti-aliasing unit 203 can be used to obtain the density of the imaging target necessary for calculating the parallax at the sub-pixel level even if data extraction is performed at intervals of the number of pixel rows in the original image range. Does not lose the brightness information it represents.
  • the stereo image is a color image and is Bayer array image data
  • it is twice the number of pixel rows in the original image range with respect to the one-dimensional pixel data from which aliasing noise has been removed by the anti-aliasing unit 203. Even if data extraction is performed at intervals, luminance information representing the density of an imaging target necessary for sub-pixel level parallax calculation is not lost.
  • the stereo image is a color image and is Bayer array image data
  • the number of pixel rows in the image range is 2, even if data extraction is performed every four pixels, which is twice the number of pixel rows, Luminance information indicating the density of the imaging target necessary for sub-pixel level parallax calculation is not lost.
  • the one-dimensional pixel data is generated by reconstructing the image range in the standard image or reference image, and no parallax occurs in the vertical direction in the image range. There is no effect on the calculation accuracy.
  • the stereo image is a color image and is Bayer array image data
  • a change in shading that occurs in a two-pixel cycle in the baseline length direction in the image range is generated by the R, G, and B Bayer arrays. This is not caused by the density of the imaging target.
  • elements for imaging visible light of different wavelengths such as RGRG... And GBGB. Yes.
  • the resolution in the base line length direction is halved compared to a monochrome element.
  • FIG. 27 illustrates an example in which the image cutout unit 201 cuts out an image range 300 of 2 ⁇ 8 pixels from a standard image or a reference image that is Bayer array image data.
  • the 2 ⁇ 8 pixel image range 300 cut out by the image cutout unit 201 is converted into 1 ⁇ 16 pixel one-dimensional pixel data 301 by the image reconstruction unit 202.
  • 2701 in FIG. 27 corresponds to the light and shade change occurring in the vertical direction of the image range
  • 2702 in FIG. 27 corresponds to the light and shade change generated by the Bayer array. In this case, the change in shading of the four-pixel period in the one-dimensional pixel data does not affect the calculation accuracy of the calculated parallax.
  • the data extraction unit 208 uses the luminance representing the lightness and darkness of the imaging target necessary for performing the sub-pixel level parallax calculation from the one-dimensional pixel data. By performing data extraction so as not to lose information, it is possible to leave only data necessary for performing sub-pixel level parallax calculation.
  • the stereo image processing apparatus 100c can reduce the amount of calculation in the subsequent processing while maintaining the accuracy of the sub-pixel level parallax calculation by using the extracted one-dimensional pixel data extracted from the one-dimensional pixel data. .
  • FIG. 29 shows an example in which data extraction for every four pixels is performed on one-dimensional pixel data.
  • 2901 in FIG. 29 is one-dimensional pixel data
  • 2902 in FIG. 29 is extracted one-dimensional pixel data after data extraction is performed every four pixels from the first pixel
  • 2903 in FIG. 29 is data every four pixels from the fourth pixel.
  • the extracted one-dimensional pixel data after performing extraction is shown.
  • the data size of the extracted one-dimensional pixel data is 8 pixels.
  • the extracted one-dimensional pixel data has the thirteenth and seventeenth pixels in the center of the one-dimensional pixel data.
  • the window function of 8 pixels having the maximum value at the center it is equivalent to performing windowing using the window function having the maximum value at the position on the left side from the center for the one-dimensional pixel data.
  • the data size of the extracted one-dimensional pixel data is 8 pixels.
  • the extracted one-dimensional pixel data has the 16th pixel and the 20th pixel in the center of the one-dimensional pixel data.
  • an 8-pixel window function having a maximum value at the center it is equivalent to performing windowing using a window function having a maximum value at a position on the right side of the center from one-dimensional pixel data.
  • the complex calculation for obtaining the window function matched with the correlation peak is not performed, and the coefficients of the window functions matched with the plurality of assumed correlation peaks are statically calculated. It is possible to perform a windowing process in accordance with the correlation peak without preparing in advance as target data.
  • each functional unit of the stereo image processing apparatus in each embodiment described above may be configured by an integrated circuit, for example.
  • Each functional unit of the stereo image processing apparatus may be individually made into one chip, or a plurality of parts may be made into one chip.
  • the integrated circuit can be an LSI (large scale integration), an IC (integrated circuit), a system LSI, a super LSI, or an ultra LSI, depending on the degree of integration.
  • the integrated circuit may be realized by a dedicated circuit or a general-purpose processor.
  • the integrated circuit may be an FPGA (field programmable gate array) that can be programmed after its manufacture, or a configurable processor in which connection and setting of internal circuit cells can be reconfigured.
  • each functional unit of the stereo image processing apparatus is realized by being integrated by another integrated circuit technology (for example, biotechnology) replacing LSI in accordance with advancement of semiconductor technology or other derived technology. May be.
  • the stereo image processing apparatus and stereo image processing method according to the present invention are useful as a stereo image processing apparatus and a stereo image processing method capable of calculating parallax with high accuracy even for an object having a small image area size in the baseline length direction. It is.
  • Stereo image processing apparatus 100a Stereo image processing apparatus 100b Stereo image processing apparatus 100c Stereo image processing apparatus 101 Stereo image acquisition part 102 Image matching part 103 Filter part 103a Filter part 103b Filter part 103c Filter part 103d Filter part 104 Peak position detection part 104d Peak position detection unit 105a Parallelization correction information storage unit 106a Parallelization correction processing unit 107b Vertical pixel correction image generation unit 108b Bayer array definition unit 109b Parallelization correction information acquisition unit 110b Vertical pixel correction processing unit 201 Image cutout unit 202 Image reconstruction Unit 203 anti-aliasing unit 204 windowing unit 205 filter generation unit 207a coordinate conversion unit 208 data extraction unit 208b Bayer array adjustment unit 300 image range 301 one Original pixel data 311 reference point 312 units reference image 313 rectangular window 321 cut out position 322 units reference image 331 reference image (reference image) 332 unit pixel image for subpixel estimation (unit reference image for subpixel estimation) 333 Reference point (corresponding point) 3

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Electromagnetism (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Processing (AREA)
  • Geometry (AREA)
  • Measurement Of Optical Distance (AREA)
  • Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)

Abstract

 基線長方向の画像領域サイズが小さい対象物についても高精度に視差を算出することができるステレオ画像処理装置。この装置では、画像マッチング部(102)は、基準画像の基準点に対する参照画像の対応点を取得する。画像切り出し部(201)は、基準点を含む第1の二次元画素データを基準画像から抽出し、対応点を含む第2の二次元画素データを参照画像から抽出する。画像再構成部(202)は、第1の二次元画素データ及び第2の二次元画素データのそれぞれを、第1の一次元画素データ及び第2の一次元画素データに再構成する。ピーク位置検出部(104)は、第1の一次元画素データと、第2の一次元画素データとの相関に基づいて、視差を算出する。

Description

ステレオ画像処理装置およびステレオ画像処理方法
 本発明は、ステレオ画像の基準画像の基準点に対するステレオ画像の参照画像の対応点の視差を算出するステレオ画像処理装置およびステレオ画像処理方法に関する。
 従来、ステレオ画像に基づいて対象物までの距離を測定するステレオ画像処理装置(以下、単に「ステレオ画像処理装置」という)が知られている。ステレオ画像処理装置は、参照画像から、基準画像の基準点と同一の対象物が撮影されている点(以下、「対応点」という)を抽出し、カメラパラメータと、基準点に対する対応点のずれ量である視差とに基づいて、対象物までの距離を算出する。
 ステレオ画像処理装置は、車載カメラで撮影した前方車両または歩行者までの距離を測定する安全装置などへの適用が検討されている。近年、この様な安全装置が小型車へも普及してきているため、ステレオカメラの小型化が要求されている。ステレオカメラの小型化に伴い、基準画像を撮影するカメラと参照画像を撮影するカメラとの間隔が狭くなる。その間隔が狭くなることで視差が小さくなるため、高精度な視差算出が要求されている。
 高精度な視差算出の技術として、例えば、特許文献1に記載の従来技術がある。この従来技術は、1次元POC(Phase Only Correlation)方式を用いて視差を算出する。具体的には、基準画像および参照画像のそれぞれから、1次元の画素データ列がハニング窓を用いて切り出され、1次元フーリエ変換が施されて合成される。合成されたデータ列の振幅成分は正規化され、1次元逆フーリエ変換されることにより位相限定相関係数が求まる。そして、位相限定相関係数の相関ピークに基づいて視差が算出される。
特開2008-123141号公報
 しかしながら、従来技術は、カメラから遠くに位置する歩行者など、ステレオ画像上で占める基線長方向における画像領域のサイズ(以下、「基線長方向の画像領域サイズ」という)が小さい対象物については、高精度に視差を算出することが困難であった。
 本発明の目的は、基線長方向の画像領域サイズが小さい対象物についても高精度に視差を算出することができる、ステレオ画像処理装置およびステレオ画像処理方法を提供することである。
 本発明のステレオ画像処理装置は、基準画像と参照画像とに対して画像マッチング処理することで、前記基準画像の基準点に対する前記参照画像の対応点を取得する画像マッチング部と、複数の画素行及び複数の画素列を有し、前記基準点を含む第1の二次元画素データを前記基準画像から抽出し、複数の画素行及び複数の画素列を有し、前記対応点を含む第2の二次元画素データを前記参照画像から抽出する画像切り出し部と、所定の再構成ルールに基づいて、前記第1の二次元画素データ及び前記第2の二次元画素データのそれぞれを、第1の一次元画素データ及び第2の一次元画素データに再構成する画像再構成部と、
 前記第1の一次元画素データと、前記第2の一次元画素データとの相関に基づいて、視差を算出するピーク位置検出部と、を備える。
 本発明のステレオ画像処理方法は、基準画像と参照画像とに対して画像マッチング処理することで、前記基準画像の基準点に対する前記参照画像の対応点を取得するステップと、複数の画素行及び複数の画素列を有し、前記基準点を含む第1の二次元画素データを前記基準画像から抽出し、複数の画素行及び複数の画素列を有し、前記対応点を含む第2の二次元画素データを前記参照画像から抽出するステップと、所定の再構成ルールに基づいて、前記第1の二次元画素データ及び前記第2の二次元画素データのそれぞれを、第1の一次元画素データ及び第2の一次元画素データに再構成するステップと、前記第1の一次元画素データと、前記第2の一次元画素データとの相関に基づいて、視差を算出するステップと、を有する。
 本発明によれば、基線長方向の画像領域サイズが小さい対象物についても高精度に視差を算出することができる。
本発明の実施の形態1に係るステレオ画像処理装置の構成の一例を示すブロック図 本発明の実施の形態2に係るステレオ画像処理装置の構成の一例を示すブロック図 本発明の実施の形態2におけるフィルタ部の構成の一例を示すブロック図 本発明の実施の形態2における再構成ルールの概念を示す模式図 本発明の実施の形態2に係るステレオ画像処理装置の動作の一例を示すフローチャート 本発明の実施の形態2における画像範囲の切り出しから対応点の特定までの処理の概要を示す模式図 本発明の実施の形態2におけるサブピクセルレベル演算処理の一例を示すフローチャート 本発明の実施の形態2における再構成ルールの一例の概要を示す模式図 本発明の実施の形態2におけるアンチエイリアシングを説明するための模式図 本発明の実施の形態2における画像範囲の再構成からフィルタリングまでの処理の概要を示す模式図 本発明の実施の形態2における逆位相フィルタ係数によるフィルタリングの概念を説明するための模式図 本発明の実施の形態2におけるsinc関数を用いたピーク位置検出の処理の一例の概要を示す模式図 本発明の実施の形態2における二次曲線近似を用いたピーク位置検出の処理の一例の概要を示す模式図 本発明の実施の形態2におけるベイヤ配列画像の構成を示す模式図 本発明の実施の形態2におけるベイヤ配列画像に対するアップサンプリングの例を示す模式図 本発明の実施の形態3に係るステレオ画像処理装置の構成の一例を示すブロック図 本発明の実施の形態3におけるフィルタ部の構成の一例を示すブロック図 本発明の実施の形態3に係るステレオ画像処理装置の構成の一例を示すブロック図 本発明の実施の形態3における縦画素補正画像生成部の構成の一例を示すブロック図 本発明の実施の形態3における縦画素補正処理の概要の一例を示す模式図 本発明の実施の形態3における縦画素補正処理の概要の一例を示す模式図 本発明の実施の形態3におけるフィルタ部の構成の一例を示すブロック図 本発明の実施の形態3におけるフィルタ部の構成の一例を示すブロック図 本発明の実施の形態4に係るステレオ画像処理装置の構成の一例を示すブロック図 本発明の実施の形態4におけるサブピクセルレベルの視差の概算値を算出する概念を示す模式図 本発明の実施の形態4におけるフィルタ部の構成の一例を示すブロック図 本発明の実施の形態4にて等間隔のデータ抽出が可能な理由を説明する模式図 本発明の実施の形態4におけるデータ抽出の例を示す模式図 本発明の実施の形態4におけるデータ抽出の開始位置の変更が相関ピークに合わせた窓掛け処理に必要な理由を説明する模式図 本発明の実施の形態4におけるデータ抽出開始位置の差Dを算出する概念を示す模式図 本発明の実施の形態4におけるデータ抽出処理の概念を示す模式図 本発明の実施の形態4におけるデータ抽出処理の一例を示すフローチャート 本発明の実施の形態3における縦画素補正処理の一例を示すフローチャート 本発明の実施の形態3における異色の場合の補正画素値算出処理の一例を示すフローチャート 本発明の実施の形態3における同色の場合の補正画素値算出処理の一例を示すフローチャート
 以下、本発明の各実施の形態について、図面を参照して詳細に説明する。なお、従来技術は、画像領域サイズが小さい場合、背景など周囲の画像の影響を低減するために1次元の画素データ列を小さくする必要があった。1次元の画素データ列を小さくするほど相関ピークの精度は低くなるからである。本発明は、この課題意識に基づいて創作された。
 (実施の形態1)
 本発明の実施の形態1は、本発明の基本的態様の一例である。
 図1は、本実施の形態に係るステレオ画像処理装置の構成の一例を示すブロック図である。
 図1において、ステレオ画像処理装置100は、ステレオ画像取得部101、画像切り出し部201、画像再構成部202、およびピーク位置検出部104を有する。
 ステレオ画像取得部101は、基準画像および参照画像を含むステレオ画像を取得する。
 画像切り出し部201は、基準画像および参照画像のそれぞれから、ステレオ画像の基線長方向に平行な複数の画素行と、複数の画素列とから成る画像範囲を切り出す。
 画像再構成部202は、切り出した画像範囲の各画素の画素値(二次元画素データ)を、所定の再構成ルール(以下、単に「再構成ルール」という)に従って1次元に再構成することにより、一次元画素データを生成する。一次元画素データは、基準画像および参照画像のそれぞれについて生成される。再構成ルールは、画像範囲の同一画素行に含まれる任意の画素同士の、再構成前の間隔と再構成後の間隔との比が、画像範囲に含まれる全ての画素同士について同一になる内容である。
 ピーク位置検出部104は、基準画像から生成された一次元画素データである基準画素データと、参照画像から生成された一次元画素データである参照画素データとの相関関係に基づいて、基準画像の基準点に対する参照画像の対応点の視差を算出する。
 ステレオ画像処理装置100は、例えば、CPU(central processing unit)、RAM(random access memory)などの記憶媒体を有する。この場合、上述の各機能部は、CPUが制御プログラムを実行することにより実現される。
 このようなステレオ画像処理装置100は、複数画素行×複数画素列の画像範囲の各画素の画素値を、行の成分をアップサンプリングする形で、一次元画素データに再構成することができる。そして、ステレオ画像処理装置100は、基準画像から得られた基準画素データと、参照画像から得られた参照画素データとの相関関係に基づいて、基準画像の基準点に対する参照画像の対応点の視差を算出することができる。また、画素行の方向は、基線長方向に一致させることができる。これにより、ステレオ画像処理装置100は、従来技術に比べて1次元の画素データ列を長く取ることができるので、基線長方向の画像領域サイズが小さい対象物についても、高精度に視差を算出することができる。
 なお、図示しないが、ステレオ画像処理装置100は、画像マッチング部102、画像切り出し部201、画像再構成部202、およびピーク位置検出部104を有する構成でもよい。すなわち、ステレオ画像は、外部機器から取得し、画像マッチング部102は、ステレオ画像に基づいて、画像マッチング処理をする。すなわち、画像マッチング部102は、基準画像と参照画像とに対して画像マッチング処理することで、前記基準画像の基準点に対する前記参照画像の対応点を取得する。
 (実施の形態2)
 本発明の実施の形態2は、本発明を、基線長方向が水平方向にほぼ一致するステレオ画像を処理対象とする装置に適用した例である。
 まず、ステレオ画像処理装置100の構成について説明する。
 図2は、本実施の形態に係るステレオ画像処理装置の構成の一例を示すブロック図である。
 図2において、ステレオ画像処理装置100は、ステレオ画像取得部101と、画像マッチング部102と、フィルタ部103と、ピーク位置検出部104とを有する。
 <ステレオ画像取得部101>
 ステレオ画像取得部101は、ステレオ画像の基準画像および参照画像を取得する。
 具体的には、ステレオ画像取得部101は、2つ以上の撮像系(つまり、カメラ)で撮影されたステレオ画像を取得する。ステレオ画像には、2つの異なるカメラによって同一対象物が撮影された基準画像および参照画像が含まれる。そして、ステレオ画像取得部101は、取得したステレオ画像を、画像マッチング部102およびフィルタ部103へ出力する。なお、本実施の形態において、ステレオ画像取得部101は、基線長方向が水平方向にほぼ一致する2つのカメラにより撮影されたステレオ画像を、入力するものとする。
 <画像マッチング部102>
 画像マッチング部102は、基準画像の基準点に対する参照画像の対応点を取得する。すなわち、画像マッチング部102は、基準画像と参照画像とに対して画像マッチング処理することで、前記基準画像の基準点に対する前記参照画像の対応点を取得する。
 具体的には、画像マッチング部102は、ステレオ画像取得部101により取得された基準画像および参照画像に対して画像マッチング処理を行うことにより、基準画像の基準点に対する参照画像の対応点を取得する。そして、画像マッチング部102は、基準点の画像上の位置に対する参照画像の対応点の画像上の位置の「ピクセルレベルのずれ量n」を算出する。画像マッチング部102は、基準点の位置と参照画像の対応点の位置とを、例えば、基準点の位置、ピクセルレベルのずれ量n、およびそのずれの方向を示す情報を出力することにより、フィルタ部103へ出力する。
 例えば、画像マッチング部102は、基準画像に含まれる所定の1ピクセルを「基準点」とし、基準点を中心とした周辺の部分画像(以下、「単位基準画像」という)を、基準画像から切り出す。また、画像マッチング部102は、参照画像に含まれ、かつ、単位基準画像と同一サイズである部分画像(以下、「単位参照画像」という)を、参照画像から複数切り出す。複数の単位参照画像は、参照画像において、異なる位置から切り出される。
 ステレオ画像の場合、基準画像と参照画像との視差はカメラの基線長方向にしか発生しない。したがって、画像マッチング部102は、基線長方向に切り出し位置を変更して、複数の単位参照画像を切り出せばよい。そして、基準画像における基準点の位置と、参照画像の対応点の位置とのずれ量が、上記したずれ量nとして算出される。
 そして、画像マッチング部102は、切り出された複数の単位参照画像から、単位基準画像とのマッチング度が最も大きい単位参照画像を特定する。特定された単位参照画像において、基準点に対応する1ピクセルが、参照画像上の対応点になる。マッチング度を表す指標としては、例えば、輝度相違度を示すSAD(画素輝度の相違度:Sum of Absolute Differences)値が用いられる。
 <フィルタ部103>
 フィルタ部103は、基準画像に基づいて、参照画像に対するフィルタリング処理を行う。
 具体的には、フィルタ部103は、基準画像および基準点の位置に基づいてフィルタ係数を算出し、算出されたフィルタ係数を用いて、参照画像の対応点周辺の部分画像に対するフィルタリング処理を行う。
 <フィルタ部103の構成>
 図3は、フィルタ部103の構成の一例を示すブロック図である。
 図3において、フィルタ部103は、画像切り出し部201、画像再構成部202、アンチエイリアシング部203、窓掛け部204、およびフィルタ生成部205を有する。
 <画像切り出し部201>
 画像切り出し部201は、基準画像から、ステレオ画像の基線長方向に平行な複数の画素行と複数の画素列とから成る部分画像(二次元画素データ)を、サブピクセル推定用単位基準画像として切り出す(抽出ステップ)。また、画像切り出し部201は、同様に、参照画像から、サブピクセル推定用単位基準画像と同一の画素行数、画素列数(同一サイズ)からなる部分画像(二次元画素データ)を、サブピクセル推定用単位参照画像として切り出す(抽出ステップ)。すなわち、画像切り出し部201は、複数の画素行及び複数の画素列を有し、前記基準点を含む第1の二次元画素データを前記基準画像から抽出し、複数の画素行及び複数の画素列を有し、前記対応点を含む第2の二次元画素データを前記参照画像から抽出する。
 そして、画像切り出し部201は、サブピクセル推定用単位基準画像およびサブピクセル推定用単位参照画像を、画像再構成部202へ出力する。
 なお、本実施の形態において、画像切り出し部201は、サブピクセル推定用単位基準画像に基準点が含まれるように、基準画像における画像の切り出し位置を決定するものとする。また、画像切り出し部201は、サブピクセル推定用単位参照画像に対応点が含まれるように、画像の切り出し位置を決定するものとする。
 なお、画像切り出し部201は、サブピクセル推定用単位基準画像を、前述の単位基準画像と異なるサイズとなるように決定してもよい。また、画像切り出し部201は、サブピクセル推定用単位基準画像およびサブピクセル推定用単位参照画像のそれぞれの「画像範囲」を指定し、指定した画像範囲を、画像再構成部202へ出力してもよい。「画像範囲」は、例えば、重心座標と幅と高さで表すことができるが、これに限定されるものではない。
 <画像再構成部202>
 画像再構成部202は、画像切り出し部201から取得した、サブピクセル推定用単位基準画像およびサブピクセル推定用単位参照画像の各画素の画素値を、再構成ルールに従って1次元に再構成することにより、一次元画素データを生成する。なお、画像範囲は、サブピクセル推定用単位基準画像およびサブピクセル推定用単位参照画像の上位概念である。
 再構成ルールは、画像範囲の同一画素行に含まれる任意の画素同士の、再構成前の間隔と再構成後の間隔との比が、画像範囲に含まれる全ての画素同士について同一となるように、1次元上に再構成するルールである。すなわち、画像再構成部202は、画像範囲に含まれる各画素行において、等間隔に並んだ画素同士を所定の間隔だけ離隔し、離隔した画素の間に、他の画素行に含まれる画素を入れ込むようにして、各画素行を線形結合する。また、再構成ルールは、画像範囲の同一画素行に含まれる画素同士の再構成後の間隔が、再構成前の間隔より大きくなるように、一次元画素データを再構成するルールである。
 所定の間隔とは、原則として、画像範囲の画素行の数より1少ない数である。具体的に、たとえば、白黒画像であって、かつ、画像範囲の画素行の数が3で画素列の数が3である場合について説明する。画像再構成部202は、画像範囲に含まれる任意の画素行において、再構成前に隣接して並ぶ3つの画素をそれぞれ2画素ずつ離隔する。そして、画像再構成部202は、離隔された画素の間に、他の画素行の画素を配置することにより、3つの画素行を線形結合する。線形結合の具体的な方法の一例については、後述する。
 ここで、再構成ルールの概念について、図面を用いて説明する。
 図4は、再構成ルールの概念を示す模式図である。
 再構成ルールでは、画像範囲の各画素行のデータは、それぞれ独立したデータとして扱われる。画像再構成部202は、各画素行のデータの画素を離隔し、画素間をゼロで補間することにより、サンプリング周波数を上げることが出来る(これは、一般的に「アップサンプリング」といわれる)。但し、アップサンプリングにより得られたデータは、そのままでは、折り返しノイズを拾ってしまう。そのため、アンチエイリアシング部203(anti-aliasing section)が、アップサンプリングにより得られたデータをローパスフィルタに通して、アンチエイリアシングする必要がある。
 ここで、各画素行のデータは、独立であるため、画像再構成部202は、各画素行をアップサンプリングし、アンチエイリアシングした上で、各画素行を結合することが可能である。その際、画像に写っている物体が垂直方向に伸びた物体(例えば、歩行者など)である場合、基準画像と参照画像間とのずれ量は、画像範囲のいずれの画素行においても同じである。そのため、基準画像および参照画像における画素の位置に同じオフセットを加えても、ずれ量は変わらない。すなわち、基準画像および参照画像の画素の位置を同じだけ、かつ、基線長方向の同じ方向にずらしても、基準画像と参照画像とのずれ量の算出に影響はない。したがって、画素行毎に画素の位置に一定のオフセットを加えた上で結合したデータを用いて、基準画像と参照画像のずれ量を算出することができる。
 また、アンチエイリアシングフィルタは、線形フィルタであるため、各画素行のデータから、アンチエイリアシングしたデータへの変換に対し線形性が成り立つ。そのため、ステレオ画像処理装置100は、各画素行をアップサンプリングし、線形結合してから、例えばローパスフィルタに通してアンチエイリアシングしたデータから、ずれ量を算出することができる。
 次に、複数の画素行を線形結合する具体的な方法の一例について、説明する。図4Aに示すように、画像再構成部に入力された、サブピクセル推定用単位基準画像が、基準点を中心とする3つの画素行×3つの画素列=画素数9のサイズであったとする。ここで、説明の便宜のため、左上から下方向へ行を移動しながら右方向に走査していったときの順序(1)~(9)を、各画素の番号とする。
 最初に、画像再構成部202は、画像を各画素行に分解する。次に、図4Bに示すように、画像再構成部202は、それぞれの画素行を画素列の数だけアップサンプリングする。この場合、1行目の画素行である第1の画素行401は、左から順に「(1)(0)(0)(2)(0)(0)(3)(0)(0)」となる。2行目の画素行である第2の画素行402は、左から順に「(4)(0)(0)(5)(0)(0)(6)(0)(0)」となる。3行目の画素行である第3の画素行403は、左から順に「(7)(0)(0)(8)(0)(0)(9)(0)(0))」となる。なお、(0)は、ゼロを補間した画素を示す。
そして、図4Cに示すように、画像再構成部202は、アップサンプリングされた3行に対し、1行目の画素行である第1の画素行401の画素の位置にはオフセットを加えず(つまり、オフセット0を加える)、第2の画素行402の画素の位置にはオフセット1を加え、第3の画素行403の画素の位置にはオフセット2を加えて、3つの画素行を加算することによって結合する。
この結果、図4Dに示すように、「(1)(4)(7)(2)(5)(8)(3)(6)(9)」という構成のデータが得られる。また、画像再構成部202は、サブピクセル推定用単位参照画像についても同様の処理を施し、一次元画素データを得る。
 なお、各画素行を線形結合する際に各画素行の画素の位置に加えられるオフセット量は、上述の例に限定されず、0以上、画素行の数より1だけ少ない数以下の整数であり、各画素行の再構成前の画素の位置が同じにならないよう、互いに異なっていればよい。例えば、画像再構成部202は、別のオフセット量を各画素行の画素の位置に加えることにより、「(1)(7)(4)(2)(8)(5)(3)(9)(6)」などの一次元画素データを得るようにしてもよい。
 以上で、再構成ルールの概念についての説明を終える。
 そして、画像再構成部202は、サブピクセル推定用単位基準画像から生成された一次元画素データ(以下、「基準画素データ」という)、および、サブピクセル推定用単位参照画像から生成された一次元画素データ(以下、「参照画素データ」という)を、アンチエイリアシング部203へ出力する。
 なお、本実施の形態において、上述の画素行は、ステレオ画像の基線長方向(エピポーラ線の方向)に平行であるものとする。そして、上述の再構成ルールは、画像範囲の任意の画素と、当該画素が画素行の方向に隣接する画素との間隔が、再構成前の間隔よりも広くなるように、一次元画素データを生成する内容であるものとする。また、再構成ルールは、画像範囲の任意の画素と、当該画素が基線長方向(水平方向)に(すなわち、同じ画素行の)隣接する画素との間隔が、基線長方向に直交する方向(垂直方向)に並んだ(すなわち、同じ画素列の)他のいずれの画素との間隔よりも広くなるように、一次元画素データを生成する内容である。また、画素値とは、例えば、画素ごとの輝度値である。
 <アンチエイリアシング部203>
 アンチエイリアシング部203は、一次元画素データ(基準画素データおよび参照画素データ)から、上述の再構成により生じる折り返しノイズ(エイリアシング)を除去する(これは、一般的に「アンチエイリアシング」といわれる)。具体的には、アンチエイリアシング部203は、例えばローパスフィルタを用いて、一次元画素データから折り返しノイズを除去する。そして、アンチエイリアシング部203は、折り返しノイズの除去が行われた一次元画素データ(基準画素データおよび参照画素データ)を、窓掛け部204へ出力する。
 <窓掛け部204>
 窓掛け部204は、一次元画素データに対して、窓掛けを行う。そして、窓掛け部204は、窓掛けが行われた一次元画素データを、フィルタ生成部205へ出力する。
 <フィルタ生成部205>
 フィルタ生成部205は、基準画素データの各画素の位置を、配列方向において反転させて得られる、逆位相フィルタ係数を算出する。そして、フィルタ生成部205は、参照画素データに対して、逆位相フィルタ係数を用いてフィルタリング処理を行う。フィルタリング処理の詳細については後述する。そして、フィルタ生成部205は、フィルタリング処理の結果(以下、「フィルタリング結果」という)を、図2のピーク位置検出部104へ出力する。
 <ピーク位置検出部104>
 ピーク位置検出部104は、フィルタリング結果において、基準画素データと参照画素データとの相関度が最も高くなる相対位置関係を取得する。そして、ピーク位置検出部104は、取得した相対位置関係に基づいて、サブピクセル推定用単位基準画像の基準点に対する、サブピクセル推定用単位参照画像の対応点のサブピクセルレベルのずれ量を算出する。
 具体的には、ピーク位置検出部104は、フィルタリング結果におけるピークの位置を検出することにより、かかるずれ量を算出する。ここで、フィルタリング結果におけるピークとは、フィルタリング結果が最大値となる位置である。このサブピクセルレベルのずれ量と、画像マッチング部102において算出されるピクセルレベルのずれ量(上記したずれ量n)を加算することにより、基準画像と参照画像との間の正確なずれ量が算出される。
 ステレオ画像処理装置100は、例えば、CPU、RAMなどの記憶媒体を有する。この場合、上述の各機能部は、CPUが制御プログラムを実行することにより実現される。
 このようなステレオ画像処理装置100は、複数画素行×複数画素列の画像範囲の各画素の画素値を、基線長方向の成分をアップサンプリングすることにより、一次元画素データ(基準画素データおよび参照画素データ)に再構成することができる。そして、ステレオ画像処理装置100は、基準画像から得られた一次元画素データである基準画素データと、参照画像から得られた一次元画素データである参照画素データとの相関関係に基づいて、基準画像の基準点に対する参照画像の対応点のサブピクセルレベルの視差を算出する。これにより、ステレオ画像処理装置100は、従来技術に比べて長い1次元の画素データ列を視差算出に用いることができるので、基線長方向の画像領域サイズが小さい対象物についても、高精度に視差を算出することができる。
 以上で、ステレオ画像処理装置100の構成についての説明を終える。
 次に、以上の構成を有するステレオ画像処理装置100の動作について説明する。
 なお、以下では、画像横方向をX軸、画像縦方向をY軸として、1画素が1座標点であるものとして説明する。また、説明の便宜のため、エピポーラ線の方向(基線長方向)は、画像全体において、X軸に平行であるものとする。
 図5は、ステレオ画像処理装置100の動作の一例を示すフローチャートである。
 画像マッチング部102は、ステレオ画像取得部101からステレオ画像が入力されるごとに、その基準画像の全体で基準点を移動させながら、基準画像および参照画像に対して画像マッチング処理を行う。ステレオ画像処理装置100は、以下のステップS1~S8の動作を、全ての基準点について行う。
 <基準点の位置決定処理>
 ステップS1において、画像マッチング部102は、視差算出の対象となる基準点の位置を決定する。
 <単位基準画像の切り出し処理>
 ステップS2において、画像マッチング部102は、基準画像から、単位基準画像を切り出す。単位基準画像は、ステップS1において決定された基準点を含む部分領域の画像である。単位基準画像の大きさの単位は、上述の通り、ピクセル(画素)である。つまり、単位基準画像は、複数の画素行×複数の画素列の画像である。
 <サーチ範囲およびサーチ開始位置の決定処理>
 ステップS3において、画像マッチング部102は、ステップS2で決定された基準点の位置に基づいて、参照画像におけるサーチ範囲およびサーチ開始位置を決定する。ステレオ画像の視差は、三角測量の原理により、カメラ間の距離である基線長とレンズの焦点距離と、ステレオカメラから測距の対象物までの距離に基づいて決定される。すなわち、視差は、基線張と焦点距離に比例し、対象物までの距離に反比例する。基線長と焦点距離はカメラパラメータで固定のため、サーチ範囲は、ステレオカメラから測距の対象物までの距離に基づいて決定すればよい。ステレオカメラから無限遠にある対象物は基準画像と参照画像において同じ位置に撮像されるため、参照画像におけるサーチ開始位置は基準画像における基準点と同じ座標を設定してもよい。
 <単位参照画像の切り出し処理>
 ステップS4において、画像マッチング部102は、参照画像における切り出し位置を決定し、画素行の数と画素列の数が単位基準画像と同一の単位参照画像を切り出す。画像マッチング部102は、ステップS3で決定されたサーチ開始位置を例えば最初の切り出し位置に決定し、以降、切り出し位置を移動させていく。
 <マッチング度の算出処理>
 ステップS5において、画像マッチング部102は、単位基準画像と単位参照画像とのマッチング度を算出する。このマッチング度には、例えば、輝度相違度を示すSAD値や輝度類似度が用いられる。
 <サーチ範囲の終了判定処理>
 ステップS6において、画像マッチング部102は、サーチ範囲に対する処理の終了判定処理を行う。すなわち、画像マッチング部102は、切り出し位置が移動によりサーチ範囲を網羅したか否かを判定する。画像マッチング部102は、サーチ範囲に対する処理が終了していない場合(S6:No)、ステップS4へ戻る。この結果、画像マッチング部102は、ステップS4での単位参照画像の切り出し領域がずれるように、切り出し位置をサーチ範囲内において移動させる。このようにして、ステップS4~S6までの処理は、サーチ範囲に対する処理が終了するまで(S6:Yes)、繰り返される。
 <対応点の特定処理>
 ステップS7において、画像マッチング部102は、ステップS4~S6の処理によって得られた、複数のマッチング度に基づいて、マッチング度が最大となる単位参照画像の切り出し位置を特定する。マッチング度として輝度相違度が用いられている場合には、画像マッチング部102は、輝度相違度が極小ないし最小となる単位参照画像の切り出し位置を特定する。そして、画像マッチング部102は、マッチング度が最大となる切り出し位置を、基準点に対する参照画像の対応点として特定する。
 ここで、ステップS2~S7の処理について、具体的に説明する。
 図6は、画像範囲の切り出しから対応点の特定までの処理の概要を示す模式図である。
 図6Aに示すように、画像マッチング部102は、上述のステップS2において、基準点(xa,ya)311を中心とした周辺の部分画像を、単位基準画像312として切り出す。この単位基準画像312の切り出しには、所定サイズ(縦サイズ:wvピクセル、横サイズ:whピクセル)の矩形窓313が用いられる。なお、ここでは、第1の窓関数によって規定される矩形窓313の中心と基準点311の位置とを一致させるものとして説明を行うが、厳密に中心でなくてもよく、矩形窓313の中心付近に基準点311が存在していればよい。
 次に、画像マッチング部102は、上述のステップS3において、ステップS1において決定された基準点の位置に基づいて、参照画像におけるサーチ範囲およびサーチ開始位置を決定する。サーチ開始位置(参照画像において単位参照画像を切り出す初期座標)は、例えば、基準画像における基準点と同じ座標(xa,ya)が用いられる。次に、画像マッチング部102は図6Bに示すように、切り出し位置321を、ステップS4で参照画像からサーチ開始位置を中心とした周辺の部分画像を単位参照画像322として切り出す。この単位参照画像322の切り出しには、単位基準画像の切り出しに用いられる矩形窓313と同じ矩形窓が用いられる。
 そして、画像マッチング部102は、上述のステップS5において、単位基準画像312と各単位参照画像322とのマッチング度を算出する。このマッチング度には、例えば、輝度相違度を示すSAD値が用いられる。このSAD値は、次の式(1)によって算出される。
Figure JPOXMLDOC01-appb-M000001
 そして、画像マッチング部102は、上述のステップS6において、サーチ範囲が終了していないと判定される場合には、図6Bに示すように、切り出す位置をずらして新たな単位参照画像323を参照画像から切り出す。切り出す位置は、ここでは1ピクセルずつずらされる。また、ずらす方向は、図6Bにおける参照画像の座標(xa,ya)から伸びる右矢印の方向である。
 このようにして、画像マッチング部102は、1つの単位基準画像312に対する複数の単位参照画像について、それぞれのマッチング度を算出する。そして、画像マッチング部102は、ステップS7でステップS4~S6の処理によって得られた複数のマッチング度に基づいて、マッチング度が最大となる単位参照画像を特定する。具体的には、画像マッチング部102は、複数のマッチング度の内で、最もマッチング度が最大(例えば、SAD値が最小)である単位参照画像323を特定する。この特定された単位参照画像の切り出し位置323の座標を(xa+n、ya)とすると、nは、ピクセルレベルのずれ量となる。そして、画像マッチング部102は、マッチング度が最大となる切り出し位置323を、基準点321に対する参照画像の対応点として特定する。
 なお、マッチング度の指標としてはSAD値に限定されるものではなく、マッチング度の指標として用いることができるものであれば他の指標を用いることができる。例えば、画像マッチング部102は、マッチング度の指標として、SSD(Sum of Squared Differences)を用いてもよい。
 以上で、ステップS2~S7の処理についての具体的な説明を終える。
 <サブピクセルレベル演算処理>
 図5のステップS8において、フィルタ部103およびピーク位置検出部104は、ステップS7で得られた参照画像の対応点と、ステレオ画像取得部101から受け取る基準画像および参照画像とに基づいて、サブピクセルレベル演算処理を行う。
 図7は、サブピクセルレベル演算処理の詳細を示すフローチャートである。
 <サブピクセル推定用単位基準画像の切り出し処理>
 ステップS10において、フィルタ部103は、基準画像から基準点を中心とした周辺の部分画像を、サブピクセル推定用単位基準画像として切り出す。このサブピクセル推定用単位基準画像の切り出しには、上述の単位基準画像の切り出しに用いたものと同様の矩形窓313が用いられる。
 <サブピクセル推定用単位参照画像の切り出し処理>
 ステップS11において、フィルタ部103は、参照画像から、ステップS7で検出された対応点を中心とした周辺の部分画像を、サブピクセル推定用単位参照画像として切り出す。サブピクセル推定用単位参照画像の切り出し処理にも、サブピクセル推定用単位基準画像の場合と同じ矩形窓が用いられる。但し、矩形窓は、対応点(xa+n、ya)を中心に設定される。
 なお、矩形窓のサイズは単位基準画像の切り出しに用いたものと異なってもよい。また、本実施の形態においては、サブピクセル推定用単位基準画像を、新たに基準画像から切り出すものとして説明したが、画像マッチング部102で用いた単位基準画像をそのままサブピクセル推定用単位基準画像として用いてもよい。
 <サブピクセル推定用単位基準画像の画像再構成処理>
 ステップS12において、画像再構成部202は、サブピクセル推定用単位基準画像を1次元画像データに再構成する。すなわち、画像再構成部202は、サブピクセル推定用単位基準画像の各画素の画素値を、再構成ルールに従って1次元に再構成することによって、「基準画素データ」を生成する。
 <サブピクセル推定用単位参照画像の画像再構成処理>
 ステップS13において、画像再構成部202は、サブピクセル推定用単位参照画像を1次元画像データに再構成する。すなわち、画像再構成部202は、サブピクセル推定用単位参照画像の各画素の画素値を、再構成ルールに従って1次元に再構成することによって、「参照画素データ」を生成する。
 図8は、再構成ルールの一例の概要を示す模式図である。
 図8Aに示すように、基準画像(参照画像)331のサブピクセル推定用単位基準画像(サブピクセル推定用単位参照画像)332は、基準点(対応点)333を含む4つの画素行×4つの画素列=画素数16のサイズであったとする。なお、サブピクセル推定用単位基準画像(サブピクセル推定用単位参照画像)332をこのサイズとしたのは、ステレオカメラから遠くに位置する歩行者のように、その画像領域サイズが小さく、基線長方向の情報量が少ない場合を想定しているためであるが、これに限定されない。
 ここで、説明の便宜のため、サブピクセル推定用単位基準画像(サブピクセル推定用単位参照画像)332を左上から下方向へ行を移動しながら右方向に走査していったときの順序(1)~(16)を、各画素の番号とする。
 すなわち、第1の画素行は、左から順に「(1)(2)(3)(4)」であり、第2の画素行は、左から順に「(5)(6)(7)(8)」である。また、第3の画素行は、左から順に「(9)(10)(11)(12)」であり、第4の画素行は、左から順に「(13)(14)(15)(16)」である。
 また、第1の画素列は、上から順に「(1)(5)(9)(13)」であり、第2の画素列は、上から順に「(2)(6)(10)(14)」である。また、第3の画素列は、上から順に「(3)(7)(11)(15)」であり、第4の画素列は、上から順に「(4)(8)(12)(16)」である。
 ここでは、画像再構成部202は、図8Bに示すように、左上から右方向へ列を移動しながら下方向に走査していったときの順序で、図8Cに示すように、各画素の画素値の配置を再構成する。すなわち、画像再構成部202は、「(1)(5)(9)(13)(2)(6)(10)(14)(3)(7)(11)(15)(4)(8)(12)(16)」という画素の順序で、各画素の画素値を1次元に並べる。そして、画像再構成部202は、1次元に並べて得られるデータを、基準画素データ(参照画素データ)334とする。
 このようにして再構成された基準画素データ(参照画素データ)334では、例えば、第1の画素行「(1)(2)(3)(4)」において隣接する画素の間の間隔335の比は、「1:1:1」のまま変化していない。
 また、第1の画素行「(1)(2)(3)(4)」を含めた全ての画素行において、隣接する画素の間の間隔は3画素に広がっている。したがって、基準画素データ(参照画素データ)334は、横方向(画素行方向)の成分がアップサンプリングされた状態となっている。
 なお、上記の例では、再構成後の画素の配列は、「(1)(5)(9)(13)(2)(6)(10)(14)(3)(7)(11)(15)(4)(8)(12)(16)」という画素の順序としたが、これに限定されない。再構成前の各画素行において隣接する画素の間隔が、再構成後の画素の配列においてすべて同じであればよい。具体的には、再構成後の画素の配列は、「(1)(9)(5)(13)(2)(10)(6)(14)(3)(11)(7)(15)(4)(12)(8)(16)」や、「(5)(1)(9)(13)(6)(2)(10)(14)(7)(3)(11)(15)(8)(4)(12)(16)」等でもよい。
 このようなアップサンプリングにより、基準点および対応点の上下範囲の情報を利用し、かつ、視差算出に用いる画素データの数も多く取ることができるようになる。また、視差算出に用いる画素データの数を多くすることにより、後段で適用される第2の窓関数の視差算出への影響を少なくすることができる。すなわち、ステレオ画像処理装置100は、ノイズにロバストな視差算出を行うことが可能となる。
 ところが、アップサンプリングにより、縦方向(画素列方向)の成分が等間隔で配置されることになるため、同時に、本来は画像上に存在しない高周波成分の信号(エイリアシング)が発生することになる。そこで、ステレオ画像処理装置100は、以降に説明するアンチエイリアシング処理を行う。
 <基準画素データのアンチエイリアシング処理>
 図7のステップS14において、アンチエイリアシング部203は、基準画素データに対し、アンチエイリアシング処理を行う。アンチエイリアシング処理は、アップサンプリングにより発生する上述のエイリアシングを除去する処理である。
 <参照画素データのアンチエイリアシング処理>
 ステップS15において、アンチエイリアシング部203は、参照画素データに対し、アンチエイリアシング処理を行う。
 図9は、アンチエイリアシングを説明するための模式図である。
 ここで、基準画素データおよび参照画素データが画像信号となる前の元の信号波形および振幅特性は、図9Aに示すような状態であったとする。これを標本化すると、図9Bのように、信号は離散化し、標本化周波数の半分であるナイキスト周波数341よりも低い周波数において、元信号と同じ振幅特性342が現れる。したがって、標本化した信号を2倍アップサンプリングした場合、ナイキスト周波数は2倍となり、図9Cに示すように、標本化による折り返しノイズ(エイリアシング)343が現れる。
 後段のピーク位置検出部104では、基準画素データと参照画素データとの相関関係に基づいて視差算出を行う。このため、折り返しノイズを除去しなければ、高精度な視差算出を行うことができない。
 そこで、アンチエイリアシング部203は、ナイキスト周波数の1/2を遮断周波数としたローパスフィルタ344を基準画素データと参照画素データに適用する。これにより、アンチエイリアシング部203は、元信号と同じ振幅特性342となる、アップサンプリングされた信号を得ることができる。
 なお、ローパスフィルタの遮断周波数は、サブピクセル推定用単位基準画像、およびサブピクセル推定用単位参照画像の、画素行の数(高さ)に依存する。例えば、アンチエイリアシング部203は、画素行の数が2つの場合、ローパスフィルタの遮断周波数をナイキスト周波数の1/2、画素行の数が3つの場合、ローパスフィルタの遮断周波数をナイキスト周波数の1/3とする。したがって、アンチエイリアシング部203は、画像再構成部202でのアップサンプリングのサンプリング周波数に応じて、ローパスフィルタの遮断周波数を動的に変更するようにしてもよい。
 <基準画素データの窓掛け処理>
 図7のステップS16において、窓掛け部204は、アンチエイリアシング処理が行われた基準画素データに対して、第2の窓関数を用いて窓掛けを行う。第2の窓関数は、例えば、式(2)で表されるハニング窓の窓関数w(m)である。Nは、タップ数(基準画素データの画素数)を表す。mは、ハニング窓における位置を表す。
Figure JPOXMLDOC01-appb-M000002
 <参照画素データの窓掛け処理>
 ステップS17において、窓掛け部204は、アンチエイリアシング処理が行われた参照画素データに対して、アンチエイリアシング処理が行われた基準画素データに対して用いられたものと同様の窓関数を用いて、窓掛けを行う。
 なお、ここでは、ハニング窓の窓関数が用いられる場合について説明するが、本発明はこれに限定されるものではなく、窓関数として、ハミング窓、ブラックマン窓、カイザー窓などが用いられてもよい。これらの窓関数は、サブピクセル推定用単位基準画像の特性(例えば、周波数パワー特性、位相特性、切り出し端連続性)のうち、どの特性を重要視するかに応じて選択される。例えば、位相特性を重要視する場合には、カイザー窓が適している。但し、カイザー窓を用いると、演算がかなり複雑となる。一方、演算量削減の観点からは、ハニング窓が適している。
 ここで、サブピクセルレベルの演算処理では、切り出された画像にノイズが含まれないことが重要である。これは、サブピクセルレベルのずれ量を精度よく算出するためである。一方、画像マッチング部102における画像切り出し処理は、例えば、ピクセル単位で行われるため、画像切り出しの精度よりも演算回数を削減することに重きが置かれる。
 したがって、画像マッチング部102で用いられる第1の窓関数には、単に画像データを切り出すだけの窓関数が用いられる。これに対して、サブピクセルレベルの演算処理で用いられる第2の窓関数は、ノイズが少ないことが重要視される。このため、第2の窓関数は、窓の両端における変化が連続的である関数(例えば、窓の両端の値がゼロである関数)であることが好ましい。
 このような第2の窓関数を用いることにより、基準画素データ、および参照画素データの連続性が保たれ、後述する逆位相フィルタの特性に含まれる、切り出しによるノイズ成分を低減することができる。なお、第1の窓関数と第2の窓関数とを周波数特性について比較すると、第1の窓関数の方が、第2の窓関数よりも、メインローブ(main-lobe)の幅が狭く、サイドローブ(side-lobe)の振幅が大きい。
 <逆位相フィルタ係数算出処理>
 ステップS18において、フィルタ部103は、折り返しノイズの除去および窓掛けが行われた基準画素データから、逆位相フィルタ係数を算出する。具体的には、フィルタ部103は、折り返しノイズの除去および窓掛けが行われた基準画素データの各画素値の位置を、配列方向において反転させる形で、信号列を逆の順番に並べ換える。
 <フィルタリング処理>
 ステップS19において、フィルタ部103は、折り返しノイズの除去および窓掛けが行われた参照画素データを、ステップS16で算出された逆位相フィルタ係数を用いてフィルタリングする。
 <ピーク位置の検出処理>
 ステップS20において、ピーク位置検出部104は、フィルタリング結果によって検出されたピーク位置に基づいて、基準画像と参照画像とのサブピクセルレベルのずれ量(視差)を算出することができる。そして、ステレオ画像処理装置100は、図5の処理へ戻る。
 ここで、ステップS10~S20の処理について、説明する。
 まず、画像範囲の再構成からフィルタリングまでの処理の概要について説明する。
 図10は、画像範囲の再構成からフィルタリングまでの処理の概要を示す模式図である。
 図10Aに示すように、画像再構成部202は、基準画像351から切り出されたサブピクセル推定用単位基準画像352を、N個の画素値から成る基準画素データ353に再構成する。また、図10Bに示すように、画像再構成部202は、参照画像354から切り出されたサブピクセル推定用単位参照画像355を、N個の画素値から成る参照画素データ356に再構成する。アンチエイリアシング部203は、これら基準画素データ353および参照画素データ356のそれぞれに対して、アンチエイリアシング処理を行う。
 そして、窓掛け部204は、基準点(xa,ya)および対応点(xa+n,ya)を中心とするNピクセルのサイズのハニング窓を、第2の窓関数w(m)357として用いる。なお、第2の窓関数w(m)のサイズは、Nに限定されない。
 フィルタ生成部205は、必ずしも逆位相フィルタ係数を別途算出する必要はなく、逆位相フィルタ係数を適用した場合のフィルタリング結果が得られるような演算を行えばよい。すなわち、フィルタ生成部205は、例えば、以下に示す式(3)を用いて、フィルタリング処理を行う。ここで、f'’(m)は、基準画像の画素値を表し、g’'(m)は、参照画像の画素値を表す。
Figure JPOXMLDOC01-appb-M000003
 以上で、画像範囲の再構成からフィルタリングまでの処理の概要についての説明を終える。
 次に、フィルタリングの概念について説明する。
 図11は、逆位相フィルタ係数によるフィルタリングの概念を説明するための模式図である。
 本実施の形態において、窓関数w(m)の長さ(N)は、5画素であるものとする。そして、折り返しノイズの除去および窓掛けが行われた基準画素データは、図11Aに示すように、「1,2,3,4,5」であるものとする。また、折り返しノイズの除去および窓掛けが行われた参照画素データx(m)も、「1,2,3,4,5」であるものとする。また、フィルタリングに用いる画素値は、輝度値であるものとする。
 基準画素データが「1,2,3,4,5」の場合、フィルタ部103は、逆位相フィルタ係数h(k)として、「5,4,3,2,1」を算出する。
 そして、フィルタ部103は、図11Bに示すように、逆位相フィルタ係数h(k)を用いて、参照画素データに対してフィルタリング処理を施す。
 このフィルタリング処理は、具体的には次のように行われる。参照画素データにおける、任意の構成信号の座標をkとした場合、フィルタ部103は、構成信号の座標が「k-2、k-1、k、k+1、k+2」となる信号列に対して、逆位相フィルタ係数h(k)を乗算することによりフィルタリング処理を施し、各乗算結果の総和を、フィルタリング結果z(m)として算出する。ここで、mは、0~4の整数値を取る。
 ここで、参照画素データの両端の外側に存在する、画素値が0である仮想的な座標点を考慮すると、図11Aに示すように、参照画素データx(m)は、「0,0,1,2,3,4,5,0,0」となる。図11Aにおけるm(m:0~4)を参照画素データの座標点とした場合、フィルタリング処理は、次のように行われる。
 フィルタ部103は、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)となる。
 また、フィルタ部103は、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となる。
 したがって、フィルタ部103は、フィルタリング結果z(m)として、「26、40、55、40、26」を得る。
 このようなフィルタリング処理は、上述の式(3)によって表される。式(3)において、基準画素データが反転されたf’(-k)は、逆位相フィルタのフィルタ係数h(k)として用いられている。また、g’(m)は、参照画素データの画素値である。
 逆位相フィルタを用いたフィルタリング処理によるフィルタリング結果z(m)は、図11Cに示すように、対称(図11では、m=2を中心として左右対称)になると共に、中央付近にピークが存在するという特徴を有する。
 また、逆位相フィルタは、いわゆるFIRフィルタの一種に相当するものであり、線形推移不変システムであるという特徴を有する。ここで、線形推移不変システムとは、入力信号にずれがある場合には、出力信号にも入力信号と同じだけのずれが生じるシステムである。
 上述した具体例では、基準画素データと参照画素データとの間にずれがない場合を例にとって説明した。ところが、参照画素データが基準画素データに対してサンプリング間隔より小さなずれが存在する場合、フィルタリング結果であるz(m)にも同じだけのずれが生じることになる。
 なお、実空間において同一サイズの対象物の視差を求める場合、対象物がステレオカメラから遠くに存在する場合は近くに存在する場合よりも視差は小さく、ピクセルレベルのずれ量nも小さくなる。それと同時に、ステレオ画像上の対象物の基線長方向の画像領域サイズも小さくなる。
 したがって、ステレオ画像処理装置100は、逆位相フィルタのタップ数を、画像マッチング部102で検出されたピクセルレベルのずれ量nの大きさに応じて設定することが望ましい。
 例えば、ピクセルレベルのずれ量nが小さい場合には、それに応じて逆位相フィルタのタップ長も短く設定される。すなわち、実空間において同一サイズの物体の視差を求める場合、物体がステレオカメラから遠くに存在する場合は近くに存在する場合よりも視差は小さく、ピクセルレベルのずれ量nも小さくなる。それと同時に、ステレオ画像中に撮影される画像領域サイズも小さくなるため、ずれ量nの大きさに応じてサブピクセル推定用単位基準画像およびサブピクセル推定用単位参照画像のサイズを変更することにより、逆位相フィルタのタップ長も適応的に変更することができる。これにより測距対象の物体のサイズに合わせた視差を算出することができる。
 また、フィルタリング結果は、線形推移不変システムの出力である。したがって、フィルタリング結果は、レンズの歪補正の誤差、CCDなどのイメージセンサに起因するゲインノイズ等の誤差、窓掛けによる画像切り出しの演算精度の誤差を除けば、理論的には真のずれ量を表現していることになる。よって、ピクセル単位で離散化されている逆位相フィルタの出力をサンプリング定理に従ってピクセル間の数値を補間することにより、サブピクセルレベルでの真のピーク位置を求めることができる。
 以上で、フィルタリングの概念についての説明を終える。
 次に、フィルタリング結果におけるピーク位置検出の処理の概要を説明する。
 図12は、sinc関数を用いたピーク位置検出の処理の一例の概要を示す模式図である。
 sinc関数は、sin(πx)/πxで定義される関数であり、離散化されたサンプリングデータを元の連続データに戻す場合に用いられる関数である。サンプリングされた離散データとsinc関数との畳み込み演算を行うことにより、元の連続データを完全に復元可能であることは、サンプリング定理によって証明されている。
 したがって、ピーク位置検出部104は、離散化されているフィルタリング結果をsinc関数によって畳み込み演算する。これにより、ピーク位置検出部104は、ピクセル単位の間隔の信号データを補間することができ、サブピクセルレベルでも理論的に信号データが補間されたフィルタリング結果z(m)の真のピーク位置を導出することができる。
 図12に示すように、ピーク位置検出部104は、例えば、2分探索によって、フィルタリング結果のピーク位置を検出する。
 例えば、ピーク位置検出部104は、フィルタリング結果z(m)が最大となる位置m=0(位置A)を2分探索基準点とする。ピーク位置検出部104は、その2分探索基準点(位置A)から左右に1ピクセルずつずれた位置のフィルタリング結果であるz(+1)とz(-1)とを比較する。そして、ピーク位置検出部104は、フィルタリング結果が大きい方の位置(ここでは、m=1である位置Bを2分探索使用点とする。
 そして、ピーク位置検出部104は、2分探索基準点(位置A)と2分探索使用点(位置B)との中点である位置Cの値を、サンプリング定理に基づき、例えば以下の式(4)を用いて算出する。なお、Tは、サンプリング間隔(画素ピッチ)である。
Figure JPOXMLDOC01-appb-M000004
 そして、ピーク位置検出部104は、位置Cを新たな2分探索基準点として、上記と同様の処理を繰り返す。
 この処理の繰り返し回数は、必要な精度に応じた数とすることができる。すなわち、ピーク位置検出部104は、必要なサブピクセル精度が1/2ピクセルであれば、上記した処理を1回行えばよい。また、ピーク位置検出部104は、必要なサブピクセル精度が1/4ピクセル精度であれば2回、1/8ピクセルであれば3回と、必要なサブピクセル精度に応じて繰り返し回数を決定すればよい。
 そして、ピーク位置検出部104は、最後に得られた中点を、検出したピーク位置δとして扱う。
 なお、以上の説明では、sinc関数および2分探索法を用いてピーク位置を検出する方法について説明を行った。しかしながら、本発明はこれに限定されるものではなく、例えば、ピーク位置検出部104は、sinc関数と勾配法との組み合わせによって、ピーク位置を探索してもよい。すなわち、ピーク位置検出部104は、離散化されているフィルタリング結果をsinc関数によって畳み込み演算してピクセル単位の間隔の信号データを補間した後であれば、各種の最大値検出方法を用いることができる。
 または、ピーク位置検出部104は、二次曲線近似を用いてフィルタリング結果のピーク位置を検出してもよい。これにより、ピーク位置検出部104は、ピーク位置検出のための演算量を削減することができる。この場合、ピーク位置検出部104は、離散化されているフィルタリング結果を二次曲線でフィッティングし、その二次曲線の極大値の位置を、ピーク位置として検出する。これにより、ピーク位置検出部104は、離散化の間隔以下の精度で、フィルタリング結果のピーク位置を求めることができる。
 図13は、二次曲線近似を用いたフィルタリング結果のピーク位置検出の処理の一例の概要を示す模式図である。
 図13に示すように、ピーク位置検出部104は、まず、ピクセル単位の間隔のフィルタリング結果z(m)が最大となる、位置m=0における値z(0)を求める。また、ピーク位置検出部104は、その最大位置m=0から左右に1ピクセルずつずれた、位置m=+1、-1のフィルタリング結果である、z(+1)、z(-1)を取得する。そして、ピーク位置検出部104は、これら3点を通る二次曲線を求め、さらにその二次曲線が極大値をとる位置を、フィルタリング結果のピーク位置δとして検出する。このピーク位置δは、例えば、次の式(5)を用いて算出することができる。
Figure JPOXMLDOC01-appb-M000005
 なお、基準画素データおよび参照画素データは、画像再構成で使用された画素行数分、画素行方向の画素値がアップサンプリングされている。このため、算出されたフィルタリング結果のピーク位置δは、画像再構成で使用された画素行数倍されて算出される。つまり、サブピクセルレベルのずれ量δ’は、フィルタリング結果のピーク位置δを画像再構成で使用された画素行数で除算することで算出される。
 基準画像における基準点の視差は、ピクセルレベルのずれ量nと、サブピクセルレベルのずれ量δ’を加算することによって求められる。
 以上で、フィルタリング結果におけるピーク位置検出の処理の概要についての説明を終える。また、ステップS10~S20の処理についての具体的な説明を終える。
 なお、ステップS10~S17の処理の順序については、図7のフローチャートで示した順序に限らない。基準画像に関する処理であるS10、S12、S14、S16と参照画像に関する処理であるS11、S13、S15、S17がそれぞれこれらの順序で実行され、S10~S17の処理がS18の前までに完了していればよい。
 <測距対象領域の終了判定処理>
 ステップS9において、画像マッチング部102は、測距対象領域の終了判定処理を行う。すなわち、画像マッチング部102は、基準画像の全体において、未だステップS1~ステップS8までの処理が行われていない未処理領域が存在するか否かを判定する。画像マッチング部102は、未処理領域が存在する場合には(S9:No)、ステップS1へ戻り、基準点の位置をずらしてステップS1~ステップS8の処理を行う。また、画像マッチング部102は、未処理領域が存在しない場合には(S9:Yes)、一連の動作を終了する。
 以上のような動作により、ステレオ画像処理装置100は、基準画像および参照画像の複数行×複数列の画像範囲を、基線長方向の成分をアップサンプリングする形で、一次元の基準画素データおよび参照画素データに再構成することができる。そして、ステレオ画像処理装置100は、基準画素データに含まれる基準点との相関関係が最も高くなる参照画素データのピーク位置を、アンチエイリアシングおよび窓関数の適用により、高い精度で検出することができる。これにより、ステレオ画像処理装置100は、高い精度で視差を算出することができる。
 以上で、ステレオ画像処理装置100の動作についての説明を終える。
 以上説明したように、本実施の形態に係るステレオ画像処理装置100は、複数行×複数列の画像範囲を、画素行方向および画素列方向の少なくとも一方の成分をアップサンプリングする形で、一次元画素データに再構成することができる。そして、ステレオ画像処理装置100は、基準画像から得られた基準画素データと、参照画像から得られた参照画素データとの相関関係に基づいて、視差を算出することができる。これにより、ステレオ画像処理装置100は、従来技術に比べて視差算出に用いる画素データ列を長く取ることができるので、基線長方向の画像領域サイズが小さい対象物についても、高精度に視差を算出することができる。
 また、ステレオ画像処理装置100は、少なくとも、ステレオ画像の基線長方向(水平方向)に平行な方向の成分をアップサンプリングする形で、基準画素データおよび参照画素データを生成する。これにより、ステレオ画像処理装置100は、路上の歩行者など、垂直方向に伸びた形状の対象物や、基線長方向の画像領域サイズが小さい対象物に対して、より高精度に視差を算出することができる。
 また、ステレオ画像処理装置100は、画像マッチングにより、参照画像における、基準画像の基準点に対する対応点を取得し、その周辺の部分領域を、一次元画素データの生成の対象とする。これにより、ステレオ画像処理装置100は、効率よく、かつ、より高い精度で、視差を算出することができる。
 また、ステレオ画像処理装置100は、逆位相フィルタ係数によるフィルタリング処理を行い、フィルタリング結果がピークとなる位置を、基準画素データと参照画素データとのずれ量(基準点と対応点との視差)として算出する。これにより、ステレオ画像処理装置100は、より高い精度で、視差を算出することができる。
 また、ステレオ画像処理装置100は、アンチエイリアシング処理および窓掛けを行ってから、基準画素データと参照画素データとの相関関係を算出する。これにより、ステレオ画像処理装置100は、入力されたステレオ画像の周波数特性を変化させずに情報量を増加させることが可能となるため、視差算出精度を更に向上させることができる。すなわち、ステレオ画像処理装置100は、上述の通り、画像における上下方向の情報を利用し、かつ視差算出に用いる画素データ列を長く取れるため、一次元画素データ列が持つ情報に対する第2の窓関数の影響を少なくすることが出来る。そして、ステレオ画像処理装置100は、上述の通り、折り返しノイズをアンチエイリアシング処理により除去する。したがって、ステレオ画像処理装置100は、元の各画素行の周波数特性(振幅特性と位相特性)をそのまま維持した状態で、複数の画素行の画素データを組み合わせることができる。
 なお、上述の再構成ルールは、図8で説明した例に限定されない。例えば、ステレオ画像がカラー画像で、画素のデータとしてはベイヤ配列の画像データである場合にも適用可能である。ベイヤ配列の画像データへ適用する再構成ルールは、R画素値(赤の画素値)、G画素値(緑の画素値)、およびB画素値(青の画素値)の少なくとも1つを画像範囲から抽出することにより、一次元画素データを生成する内容とすることができる。ベイヤ配列画像では、R画素値、G画素値、およびB画素値は、それぞれ等間隔に配置されており、この配置を利用することにより、上述のアップサンプリング処理を簡単に行うことができる。
 図14は、ベイヤ配列画像の構成を示す模式図である。
 図14に示すように、ベイヤ配列画像361は、R画素362、G画素363、G画素364、B画素365を、1つの構成単位(以下、「カラー画素ユニット」という)366として構成されている。ベイヤ配列画像361は、Rデータ367、Gデータ368、およびBデータ369から成る。Rデータ367は、R画素362の画素値のみの画像データである。Gデータ368は、G画素363もしくは364の画素値のみの画像データである。Bデータ369は、B画素365の画素値のみの画像データである。
 例えば、R画素362は、画素行方向において、1画素おきに配置されている。他のG画素363、364、B画素365についても同様である。
 そこで、画像再構成部202は、基準画像と参照画像のそれぞれにおいて、例えば、Gデータ368から画像範囲を切り出し、上述の基準画素データおよび参照画素データを生成する。
 図15は、ベイヤ配列画像361に対するアップサンプリングの例を示す模式図である。
 図15Aに示すように、1ユニット行のカラー画素ユニット366が、一次元画素データを生成するための画像範囲である場合を想定する。この場合、画像再構成部202は、画素行毎にG画素値を抽出し、抽出した複数のG画素値を線形結合することにより、G画素値のアップサンプリングを行うことができる。
 また、図15Bに示すように、複数ユニット行のカラー画素ユニット366が、一次元画素データを生成するための画像範囲である場合を想定する。この場合、画像再構成部202は、画素行毎にG画素値を抽出し、抽出した複数のG画素値を、ゼロ補完を行った上で線形結合することにより、G画素値のアップサンプリングを行うことができる。この例では、画像再構成部202は、1画素行目および4画素行目のG画素値に対して、カラー画素ユニット366の各境目の直前にゼロを2個補完し、2画素行目および3画素行目のG画素値に対して、カラー画素ユニット366の各境目の直後にゼロを2個補完する。
 なお、図15Cに示すように、画像再構成部202は、画素行毎に特定の色の画素値を抽出する。そして、画像再構成部202は、抽出したG画素値、B画素値、およびR画素値を、ゼロ補完を行った上で線形結合することで、全ての色の画素値のアップサンプリングを行うことができる。ゼロ補完する位置によって、図15Cに示すように、異なる一次元画素データが得られる。
 このように、ステレオ画像処理装置100は、ベイヤ配列画像の性質を利用することにより、アップサンプリング処理を、簡単に行うことができる。
 また、特にG画素363、364は、カラー画素ユニット366を構成する4画素のうちの2画素を占めているため、全体の輝度への影響が大きい。したがって、ステレオ画像処理装置100は、Gデータ368を用いることにより、Rデータ367およびBデータ369を用いる場合に比べて、より高い精度での視差算出を行うことができる。
 また、上述のベイヤ配列のように、複数の画素値から1画素の画素値を推定するような場合には、実効の画像解像度が劣化するが、ステレオ画像処理装置100は、このような場合にも、高精度な視差算出を行うことが可能となる。
 また、一般的には、波長の異なるRデータ367、Gデータ368、およびBデータ369をそのまま用いるとピクセルロッキングが発生するため、RAWデータとして利用することはできないが、ステレオ画像処理装置100は、Rデータ367、Gデータ368、およびBデータ369をそのまま利用することができる。
 (実施の形態3)
 一般的なステレオカメラから得られる画像は、カメラのレンズの歪み等の影響を受ける。画像の各所の歪み量は、画像中心から離れるほど大きい。また、左右のレンズで設置環境(角度、明るさなど)が異なるため、撮影した画像をそのまま用いた場合、精度よく視差を算出できない場合が多い。そのため、撮影された画像に前処理を施し、画像からレンズの歪み等の影響を取り除く必要がある。
 本発明の実施の形態3は、画像マッチング部への入力前に、画像に対して平行化補正処理を行い、平行化補正処理後の画像上でのずれ量を高精度にかつ、高速に算出するようにした例である。
 図16は、本実施の形態に係るステレオ画像処理装置の構成の一例を示すブロック図であり、実施の形態2の図2に対応するものである。図2と同一部分には同一符号を付し、これについての説明を省略する。
 図16において、ステレオ画像処理装置100aは、図2の構成に加えて、平行化補正処理部106aおよび平行化補正情報格納部105aを有する。
 <平行化補正情報格納部105a>
 平行化補正情報格納部105aは、平行化補正情報を予め格納する。平行化補正情報は、ステレオ画像取得部101が取得した基準画像および参照画像のそれぞれに対して、歪み補正処理および平行化補正処理を行う際の変換ルールである。基準画像に対する変換ルールを「基準画像用平行化補正情報」、参照画像に対する変換ルールを「参照画像用平行化補正情報」という。
 ここで、歪み補正処理は、撮像に用いられたレンズの歪みの影響を低減する処理であり、実空間で直線である物体が画像においても直線に映るように補正する処理である。平行化補正処理は、基準画像および参照画像との間で光軸を平行にする処理であり、座標変換処理および画像シフト処理を含む。座標変換処理は、任意の対象物が、カメラ光軸方向におけるカメラからの距離が同一である位置に存在する限り、画像中のどの位置に撮像されても同一の画像領域サイズとなるように、座標を変換する処理である。画像シフト処理は、カメラの光軸を擬似的に平行にし、無限遠点にある対象物が、基準画像と参照画像の同一の位置に映るようにする処理である。なお、以下、歪み補正および平行化補正を総称して、「歪み平行化補正」、歪み補正処理および平行化補正処理を総称して、「歪み平行化補正処理」という。
 具体的には、平行化補正情報は、平行化補正画像の各画素が参照する(対応する)、平行化補正前のステレオ画像における位置を、実数値で示している。平行化補正画像は、歪み平行化補正処理を行うことによって得られる画像である。
 <平行化補正処理部106a>
 平行化補正処理部106aは、平行化補正情報格納部105aに格納されている平行化補正情報に基づいて、ステレオ画像(基準画像および参照画像)に対して、歪み平行化補正処理を行う。そして平行化補正処理部106aは、基準画像および参照画像それぞれの平行化補正画像を生成する。
 なお、平行化補正処理部106aは、座標変換処理後に画像シフト処理を行うことによって歪み平行化補正を行ってもよいし、画像シフト処理後に座標変換処理を行ってもよい。すなわち、レンズの歪み補正と、2つのカメラの位置関係の補正との両方を行うことができれば、その方法は特に限定されるものではない。
 画像マッチング部102は、平行化補正処理部106aにより、基準画像および参照画像それぞれの平行化補正画像を、基準画像および参照画像として扱い、対応点を取得する。詳細な取得方法は、前述の実施の形態と同様である。画像マッチング部102は、基準点の位置と対応点の位置とを、フィルタ部103aへ出力する。
 なお、基準画像および参照画像がカラー画像の場合、ステレオ画像処理装置100aは、画像マッチング部102への入力前処理として、カラー画像をグレースケール画像に変換し、画像マッチング部102はグレースケール画像を用いて、基準画像の基準点に対する参照画像の対応点を特定するとしてもよい。
 このように、本実施の形態のステレオ画像処理装置100aは、基準画像および参照画像に対して歪み平行化補正処理を行ってから画像マッチングを行うので、対応点を精度良く取得することができる。
 <フィルタ部103a>
 フィルタ部103aは、実施の形態2と同様のフィルタリング処理を行う。但し、画像マッチング部102で取得される基準点の位置と対応点の位置は、平行化補正画像上での位置であるが、フィルタ部103aは、ステレオ画像取得部101が取得したステレオ画像上でのサブピクセルレベルの視差を算出する。
 <フィルタ部103aの構成>
 図17は、ステレオ画像処理装置100に、平行化補正処理部106aを追加した場合の、フィルタ部103aの構成の一例を示すブロック図であり、実施の形態2の図3に対応するものである。図3と同一部分には同一符号を付し、これについての説明を省略する。
 フィルタ部103aは、図3に示す構成に加えて、座標変換部207aを有する。
 座標変換部207aは、画像マッチング部102から取得した基準点の位置を、平行化補正情報格納部105aが格納する平行化補正情報に基づいて、ステレオ画像取得部101で取得された基準画像(以下、本実施の形態において「原基準画像」という)上の位置に変換する。
 同様に、座標変換部207aは、画像マッチング部102から取得した対応点の位置を、平行化補正情報格納部105aの平行化補正情報に基づいて、ステレオ画像取得部101で取得された参照画像(以下、本実施の形態において「原参照画像」という)上の位置に変換する。(以下、本実施の形態において、原基準画像と原参照画像を総称して「原画像」という)。
 そして、座標変換部207aは、得られた原基準画像上の基準点の位置と、原参照画像上の対応点の位置とを、画像切り出し部201へ出力する。
 具体的には、座標変換部207aは、平行化補正画像上の基準点の位置と、平行化補正情報とに基づいて、原基準画像上の基準点の位置座標を算出する。平行化補正画像上の基準点の位置座標は整数値であり、原基準画像上の基準点の位置座標は実数値となる。そして、座標変換部207aは、例えば、原基準画像上の基準点の位置座標の小数点以下第一位を四捨五入することにより、原基準画像上での基準点の位置座標を整数値に変換する。
 同様に、座標変換部207aは、平行化補正画像上の対応点の位置についても、原参照画像上の対応点の位置座標を算出する。平行化補正画像上の対応点の位置座標は整数値であり、原基準画像上の対応点の位置座標は実数値となる。そして、基準点に対する処理と同様に、座標変換部207aは、例えば、原参照画像上の対応点の位置座標の小数点以下第一位を四捨五入することにより、原参照画像上の対応点の位置座標を整数値に変換する。
 座標変換部207aは、画素行方向において、基準点の位置座標を整数値に変換する場合に切り上げもしくは切り捨てられた値と、対応点の位置座標を整数値に変換する場合に切り上げもしくは切り捨てられた値との差を、ずれ量Zとして算出する。なお、座標変換部207aは、切り捨てられた値をプラス、切り上げられた値をマイナスとして扱う。
 以下に、具体的な値を用いて説明する。原基準画像上の基準点の位置座標が(2.3,1.5)、原参照画像上の対応点の位置座標が(3.5,1.5)であったとする。この場合、座標変換部207aが位置座標の小数点以下第一位を四捨五入して、整数値に変換することにより、原基準画像上の基準点の位置座標は、(2,2)となり、原参照画像上の対応点の位置座標は、(4,2)となる。
 このとき、基準点の位置座標は画素行方向に0.3切り捨てられ、対応点の位置座標は画素行方向に0.5切り上げられている。よって、この場合のずれ量Zは、0.3-(-0.5)=0.8となる。このずれ量Zは、平行化補正画像上のずれ量を算出する際に使用される値である。座標変換部207aは、整数値に変換された基準点の位置座標、整数値に変換された対応点の位置座標、ずれ量Zをピーク位置検出部104へ出力する。
 画像切り出し部201以降のフィルタ部103の処理は、前述の実施の形態と同様である。
 <ずれ量算出方法>
 本実施の形態のピーク位置検出部104は、平行化補正画像を用いて、平行化補正画像上でのずれ量の算出を行う。ピーク位置検出部104は、まず、ピクセルレベルのずれ量nに、サブピクセルレベルのずれ量δ’を加算する。このずれ量δ’は、ピーク値算出で求めたサブピクセルレベルのずれ量δを、画像再構成の際に使用した単位基準画像の画素行数で除算して得られる値である。
 そして、ピーク位置検出部104は、ピクセルレベルのずれ量nに、サブピクセルレベルのずれ量δ’を加算して得られた値に、更に、座標変換部207aで実数値の位置座標を整数値の位置座標に変換した際に発生したずれ量Zを加算する。これにより、ピーク位置検出部104は、高精度に視差を算出することが可能となる。
 以上説明したように、本実施の形態に係るステレオ画像処理装置100aは、平行化補正画像を用いて画像マッチングを行うことで対応点を特定し、原画像を用いてサブピクセルレベルの視差を算出する。これにより、ステレオ画像処理装置100aは、効率良く、かつ、より高精度に、視差を算出することができる。
 なお、本実施の形態においては、画像マッチング部102への入力前処理として、歪み平行化補正処理を例に説明したが、本発明はこれに限定されるものではなく、画像縮小処理を行ってもよい。この場合、ステレオ画像処理装置100aは、画像マッチング部102において、縮小画像を用いることにより、ピクセルレベルのずれ量nを高速に算出することができる。そして、ステレオ画像処理装置100aは、フィルタ部103aにおいて、原画像を用いることにより、サブピクセルレベルのずれ量δ’を高精度に算出することができる。
 また、ステレオ画像処理装置100aは、歪み平行化補正処理を行った後に、画像縮小処理を行ってもよい。この場合、ステレオ画像処理装置100aは、画像マッチング部102において、縮小された平行化補正画像を用いることにより、ピクセルレベルのずれ量nを高速に算出することができる。そして、ステレオ画像処理装置100aは、フィルタ部103aにおいて、原基準画像と原参照画像を用いることにより、サブピクセルレベルのずれ量δ’を高精度に算出することができる。
 なお、上記ではフィルタ部103aの座標変換部207aにおいて、平行化補正画像上の基準点の位置および対応点の位置を、原基準画像または原参照画像上の位置に変換するものとして説明した。しかし、これに限らず、原基準画像を縦方向にのみ補正した「縦画素補正基準画像」、および、原参照画像を縦方向にのみ補正した「縦画素補正参照画像」を用いてサブピクセルレベルの視差を算出してもよい。その場合、ステレオ画像処理装置100aは、演算量を大幅に削減することができる。
 以下、縦方向にのみ歪み平行化補正することを「縦画素補正」、縦画素補正によって求められた画素値を「縦画素補正値」という。また、縦画素補正基準画像と縦画素補正参照画像を総称して「縦画素補正画像」という。すなわち、縦画素補正画像の画素値は、原画像を縦画素補正することによって得られた縦画素補正値である。
 縦画素補正画像を用いたサブピクセルレベルの視差算出についての具体的な方法を、以下に説明する。
 図18は、ベイヤ配列画像のステレオ画像に対して、縦画素補正画像を用いて対応点を特定し、サブピクセルレベルの視差を算出するステレオ画像処理装置の構成の一例を示すブロック図である。
 図18において、ステレオ画像処理装置100bは、図16の構成に加えて、縦画素補正画像生成部107bを新たに有する。なお、図18は、実施の形態3の図16に対応するものであり、図16と同一部分には同一符号を付し、これについての説明を省略する。
 <縦画素補正画像生成部107b>
 縦画素補正画像生成部107bは、平行化補正情報格納部105aに格納された平行化補正情報に基づいて、ステレオ画像取得部101で取得されたステレオ画像、すなわち原画像に対して、縦方向についてのみ、歪み平行化補正処理を行う。そして、縦画素補正画像生成部107bは、原画像に対して縦画素補正した、縦画素補正画像を生成する。
 <縦画素補正画像生成部107bの構成>
 図19は、縦画素補正画像生成部107bの構成の一例を示すブロック図である。
 図19において、縦画素補正画像生成部107bは、ベイヤ配列定義部108b、平行化補正情報取得部109b、縦画素補正処理部110bを有する。
 <ベイヤ配列定義部108b>
 ベイヤ配列定義部108bは、縦画素補正画像におけるベイヤ配列の並び方を定義する。具体的には、ベイヤ配列定義部108bは、画像の左上がR(赤)で始まる、または画像の左上がB(青)で始まるなどを定義する。また、定義方法は、プログラムに埋め込むとしてもよいし、設定ファイル等を用いて定義するとしてもよい。なお、縦画素補正基準画像と縦画素補正参照画像におけるベイヤ配列の並び方は、同一である。
 <平行化補正情報取得部109b>
 平行化補正情報取得部109bは、平行化補正情報格納部105aに格納されている、平行化補正情報を取得する。
 <縦画素補正処理部110b>
 縦画素補正処理部110bは、平行化補正情報取得部109bが取得した平行化補正情報をもとに、原画像を縦画素補正し、縦画素補正画像を生成する。平行化補正情報は、本来、縦横両方の方向について歪み平行化補正をするために用いる変換ルールであるが、縦画素補正処理部110bは、平行化補正情報を用いて、縦方向にのみ、歪み平行化補正(すなわち、縦画素補正)を行う。
 図20を用いて、原基準画像を縦画素補正して、縦画素補正基準画像を生成する処理の一例を説明する。なお、図20A、C、Dにおいては、1つの区画が1つの画素を表している。
 図20Aに、縦画素補正画像生成部107bが生成する縦画素補正基準画像を示す。ここでは、縦画素補正基準画像が4つの画素行×3つの画素列=画素数12のサイズであるとして説明する。実際は、VGA画像の場合、480×640、1.3MEGA画像の場合は960×1280の画素数の画像を生成する。ここで、説明の便宜のため、左上から下方向へ行を移動しながら右方向に走査していったときの順序(1)~(12)を、各画素の番号とする。以下、各画素の番号で特定される画素を、「画素(”画素番号”)」と表記する。
 図20Bに平行化補正情報取得部109bが取得した基準画像用平行化補正情報の一例を示す。なお、図20Bに示したフォーマットは一例であり、これに限るものではない。図20Bの基準画像用平行化補正情報は、縦横両方の方向についての歪み平行化補正処理後の画像上での位置座標と、原基準画像上での位置座標との対応を示すものである。
 例えば、縦画素補正画像上での位置座標が(1,1)である画素(5)の画素値(すなわち、縦画素補正値)を算出するために、位置座標(1.6,1.2)が用いられることを示している。以下、縦横両方の方向についての歪み平行化補正処理後の画像上での画素値を算出するために用いられる位置座標を「元座標」という。
 図20Cに、原基準画像のベイヤ配列の並びを、図20Dに、ベイヤ配列定義部108bで定義された、縦画素補正基準画像のベイヤ配列の並びを示す。図20Cにおいては、例えば、1画素行目における、左からG(緑)、B(青)、G(緑)の順に並んでいるベイヤ配列の並びが示されている。また、2画素行目から4画素行目についても同様に、R、G、Bによるベイヤ配列の並びが示されている。図20Dについても同様に、R、G、Bによるベイヤ配列の並びが示されている。
 また、図20Cに示すように、原基準画像は、X座標、Y座標がともに整数値である位置座標ごとに画素値のデータを保持する。例えば、位置座標が(0,0)(図20Cでは、0を0.0と表記)である画素2007は色がGの画素値、位置座標が(1,0)(図20Cでは、0を0.0と表記し、1を1.0と表記する)である画素2004は色がBの画素値を保持する。すなわち、原基準画像として保持された画素値の位置座標は、離散的である。
 しかし、基準画像用平行化補正情報によって示されている元座標は、(1.5,1.2)のような実数値である。したがって、元座標が指し示す画素は原基準画像上に存在しない。縦画素補正処理においては、元座標の小数点以下の値を用いて、原基準画素上の複数の画素を選択し、選択した画素の画素値を用いて縦画素補正値が算出される。
 図33は、縦画素補正処理の流れを示すフローチャートである。縦画素補正処理によって、図20Aに示す縦画素補正基準画像を生成する方法を、図33を用いて説明する。
 縦画素補正画像生成部107bは、縦画素補正基準画像において、縦画素補正値算出の対象である画素(以下、「縦画素補正対象画素」という)を選択する(S3301)。縦画素補正画像生成部107bは、最初の縦画素補正対象画素として、例えば、図20の画素(1)2006を選択する。そして、縦画素補正画像生成部107bは、例えば、左上から下方向へ行を移動しながら右方向に縦画素補正基準画像を走査し、縦画素補正対象画素として画素(1)~(12)の順に選択する。
 次に、縦画素補正画像生成部107bは、縦画素補正基準画像のベイヤ配列の並び(図20D)を参照して、縦画素補正対象画素の色を判定する(S3302)。例えば、ステップS3301において、縦画素補正対象画素として、位置座標が(1,1)である画素(5)2001が選択された場合、縦画素補正画像生成部107bは、縦画素補正基準画像のベイヤ配列の並び(図20D)の位置座標(1,1)の色2003を参照する。この例においては、縦画素補正画像生成部107bは、縦画素補正対象画素(画素(5))の色は、「B」であると判定する。
 次に、縦画素補正画像生成部107bは、平行化補正情報を参照して、縦画素補正対象画素の元座標を取得する(S3303)。例えば、縦画素補正対象画素として、画素(5)2001が選択された場合、縦画素補正画像生成部107bは、平行化補正情報(図20B)を参照して、画素(5)の元座標(1.6,1.2)を取得する。
 更に、縦画素補正画像生成部107bは、縦画素補正対象画素の原基準画像上での位置座標を取得する(S3303)。縦画素補正処理部110bは、原基準画像を縦方向にのみ歪み平行化補正するため、縦画素補正対象画素の原基準画像上での位置座標として、元座標のX座標は使用せず、Y座標のみ使用する。すなわち、縦画素補正画像生成部107bは、縦画素補正対象画素の原基準画像上での位置座標として、元座標(1.6,1.2)のX座標を、縦画素補正対象画素のX座標で置き換えた(1,1.2)を縦画素補正対象画素の原基準画像上での位置座標とする。
 以下、縦画素補正値算出のために参照する原基準画像の画素の位置座標を「縦画素補正用元座標」という。縦画素補正用元座標は、元座標のX座標を、縦画素補正対象画素のX座標で置き換えた位置座標であり、画素(5)2001の縦画素補正用元座標は(1,1.2)である。
 次に、縦画素補正画像生成部107bは、原基準画像のベイヤ配列の並び(図20C)を参照して、ステップS3303で取得した縦画素補正用元座標の画素の色を判定する(S3304)。図20Cに示すように、原基準画像において位置座標が(1,1.2)である画素2002の色は「G」である。したがって、この例においては、縦画素補正画像生成部107bは、縦画素補正対象画素(画素(5))の縦画素補正用元座標の画素の色は、「G」であると判定する。
 次に、縦画素補正画像生成部107bは、S3302で判定した、縦画素補正対象画素と、ステップS3304で判定した、縦画素補正対象画素の縦画素補正用元座標の画素とが、同色か否かを判断する(S3305)。縦画素補正対象画素が画素(5)であった場合には、縦画素補正画像生成部107bがS3302で判定した色は「B」であり、S3304で判定した色は「G」である。
 したがって、この場合、縦画素補正画像生成部107bは、同色でないと判断してステップS3307に進み、同色でない場合の縦画素補正値算出を行う。ステップS3307の異色の場合の縦画素補正値算出の詳細については、後述する。
 ここまでは、縦画素補正対象画素として画素(5)を選択した場合を例にして、ステップS3305において、縦画素補正画像生成部107bが、同色でないと判断する場合について説明した。次に、ステップS3305において縦画素補正画像生成部107bが、同色であると判断する場合のステップS3301~ステップS3305の処理を、図21を用いて説明する。
 図20と同様、図21Aは縦画素補正基準画像、図21Bは基準画像用平行化補正情報、図21Cは原基準画像のベイヤ配列の並び、図20Dは縦画素補正基準画像のベイヤ配列の並びの一例である。なお、図21A、C、Dにおいては、図20と同様、1つの区画が1つの画素を表している。
 まず、ステップS3301において、縦画素補正画像生成部107bは、縦画素補正対象画素として、例えば、図21の画素(8)2101を選択する。
 次に、ステップS3302において、縦画素補正画像生成部107bは、縦画素補正基準画像のベイヤ配列の並び(図21D)を参照して、縦画素補正対象画素の色を判定する。判定方法は、ステップS3301において、縦画素補正対象画素として画素(5)2001が選択された場合と同様である。結果として、縦画素補正画像生成部107bは、縦画素補正対象画素(画素(8)2101)の色は、「G」であると判定する。
 次に、ステップS3303において、縦画素補正画像生成部107bは、平行化補正情報を参照して、縦画素補正対象画素の縦画素補正元座標を取得する。取得方法は、ステップS3301において、縦画素補正対象画素として画素(5)2001が選択された場合と同様である。結果として、縦画素補正画像生成部107bは、縦画素補正対象画素である画素(8)2101の縦画素補正用元座標(1.0,2.8)を取得する。
 次に、ステップS3304において、縦画素補正画像生成部107bは、原基準画像のベイヤ配列の並び(図21C)を参照して、縦画素補正用元座標の画素の色を判定する。判定方法は、ステップS3301において、縦画素補正対象画素として画素(5)2001が選択された場合と同様である。結果として、縦画素補正画像生成部107bは、縦画素補正対象画素(画素(8)2101)の縦画素補正用元座標の画素の色は、「G」であると判定する。
 次に、ステップS3305において、縦画素補正画像生成部107bは、S3302で判定した縦画素補正対象画素と、ステップS3304で判定した縦画素補正対象画素の縦画素補正用元座標の画素が同色であるかどうかを判断する。縦画素補正対象画素が画素(8)2101であった場合には、縦画素補正画像生成部107bがS3302で判定した色は「G」であり、ステップS3304で判定した色も「G」である。
 よって、この場合、縦画素補正画像生成部107bは、同色であると判断してステップS3306に進み、同色の場合の縦画素補正値算出を行う。ステップS3306の同色の場合の縦画素補正値算出の詳細については、後述する。
 ステップS3306または、ステップS3307の処理が終了した後、ステップS3308において、縦画素補正画像生成部107bは、最終の縦画素補正対象画素であるかどうかを判断する。例えば、縦画素補正画像生成部107bが、縦画素補正対象画素として画素(1)~(12)の順に選択する場合には、画素(12)までの縦画素補正値算出が終了していれば(Yes)、図33のフローチャートの処理は終了する。
 また、画素(12)までの縦画素補正値算出が終了していない場合(No)、縦画素補正画像生成部107bは、ステップS3301に進み、次の縦画素補正対象画素を選択する。
 以上で、図33のフローチャートの説明を終える。
 次に、図33のフローチャートのステップS3307(異色の場合の縦画素補正値算出)について説明する。
 縦画素補正対象画素と、縦画素補正対象画素の縦画素補正用元座標の画素とが異色の場合、縦画素補正処理部110bは、原基準画像において縦画素補正用元座標の画素の上下に位置する画素のうち、縦画素補正対象画素の色と同じ色の画素の画素値に基づいて、縦画素補正値を算出する。
 図34は、図33のフローチャートのステップS3307である、異色の場合の縦画素補正値算出のフローチャートである。
 ここでは、図33のフローチャートのステップS3301において、縦画素補正対象画素として、図20Aの画素(5)2001が選択され、ステップS3305において、同色ではないと判断された場合を例にして説明する。
 まず、ステップS3401において、縦画素補正画像生成部107bは、縦画素補正対象画素のY座標の小数点以下第一位が4以下であるかどうかを判断する。
 縦画素補正対象画素のY座標の小数点以下第一位が4以下の場合(Yes)、縦画素補正画像生成部107bは、ステップS3402に進み、4以下でない場合(No)、ステップS3403に進む。
 ステップS3402において、縦画素補正画像生成部107bは、縦画素補正対象画素のY座標を小数点以下第一位で四捨五入した場合に切り捨てられる値(以下、「切り捨て値」という)を用いて、数値1と切り捨て値との和算により、重み係数kを算出する。重み係数kは、後述する縦画素補正値算出において画素値に加えられる重みの算出に用いられる係数である。
 ここでは、縦画素補正対象画素として、画素(5)2001が選択されているので、縦画素補正用元座標の画素2002のY座標は1.2であり、小数点以下第一位は2となる。よって、切り捨て値は0.2となり、重み係数kは1.2(1.0+0.2)となる。そして、縦画素補正画像生成部107bは、ステップS3404に進む。
 また、ステップS3403においては、縦画素補正画像生成部107bは、縦画素補正対象画素のY座標を小数点以下第一位で四捨五入した場合に切り上げられる値(以下、「切り上げ値」という)を用いて、1から切り上げ値を除算した値である重み係数kを算出し、ステップS3404に進む。
 次に、ステップS3404において、縦画素補正画像生成部107bは、ステップS3402またはステップS3403において算出された重み係数kを用いて、縦画素補正対象画素の縦画素補正値を算出する。縦画素補正値の算出に、線形補間が用いられる場合の式を、一例として式(6)として示す。
Figure JPOXMLDOC01-appb-M000006
 ここで、A-1は、縦画素補正用元座標2002の1つ上に位置する画素2004の画素値であり、Aは、縦画素補正用元座標2002の1つ下に位置する画素2005の画素値である。したがって、画素(5)2001を縦画素補正対象画素とした場合、k=1.2を式(6)に代入することにより、算出される縦画素補正値は、0.4×A-1+0.6×Aとなる。すなわち、縦画素補正値は、縦画素補正用元座標に位置する画素の近傍の複数の画素の画素値に基づいて算出される値である。また、縦画素補正値算出の際に近傍の画素の画素値のそれぞれに加えられる重みは、縦画素補正用元座標に対し、元座標が複数の画素のうちどちらにどれだけずれているかに依存する。
 以上で、縦画素補正画像生成部107bは、図34のフローチャート(異色の場合の縦画素補正値算出)の処理を終了する。
 さらに、図33のフローチャートのステップS3307(同色場合の縦画素補正値の算出)の詳細について説明する。
 縦画素補正対象画素と、縦画素補正用元座標の画素が同色の場合、縦画素補正処理部110bは、縦画素補正用元座標の画素と、原基準画像において縦画素補正用元座標の画素の2画素上または2画素下に位置する同色の画素の画素値に基づいて、縦画素補正値を算出する。
 図35は、図33のフローチャートのステップS3306である、同色の場合の縦画素補正値算出のフローチャートである。
 ここでは、図33のフローチャートのステップS3301において、縦画素補正対象画素として、図21Aの画素(8)2101が選択され、ステップS3305において同色であると判断された場合を例にして説明する。
 まず、ステップS3501において、縦画素補正画像生成部107bは、縦画素補正対象画素のY座標の小数点以下第一位が4以下であるかどうかを判断する。
 縦画素補正対象画素のY座標の小数点以下第一位が4以下の場合(Yes)、縦画素補正画像生成部107bは、ステップS3502に進み、4以下でない場合(No)には、ステップS3503に進む。ここでは、縦画素補正対象画素として、画素(8)2101が選択されているので、縦画素補正用元座標の画素2102のY座標は2.8であり、小数点以下第一位の値は8となるので、縦画素補正画像生成部107bは、ステップS3503に進む。
 ステップS3502において、縦画素補正画像生成部107bは、切り捨て値を用いて、重み係数kを算出する。具体的には、重み係数kを、切り捨て値とする。
 次に、ステップS3504において、縦画素補正画像生成部107bは、ステップS3502において算出された重み係数kを用いて、縦画素補正対象画素の縦画素補正値を算出する。縦画素補正値の算出に、線形補間が用いられる場合の式は、式(6)と同様である。
 ただし、式(6)における、A-1は、縦画素補正用元座標の画素の画素値であり、Aは、原基準画像において、その2画素上に位置する画素の画素値を示す。例えば、図21の例においては、A-1は縦画素補正用画素2102の画素値、Aは、縦画素補正用画素の2画素上に位置する画素2104の画素値である。
 また、ステップS3503においては、縦画素補正画像生成部107bは、小数点以下第一位の値(以下、切り上げ値)を用いて、数字2から切り上げ値を減算した値として、重み係数kを算出し、ステップS3505に進む。
 画素(8)2101の縦画素補正用元座標の画素2102のY座標は2.8であり、小数点以下第一位は8であるため、切り上げ値は0.2となる。よって、重み係数kは2.0-0.2で1.8となる。
 次に、ステップS3505において、縦画素補正画像生成部107bは、ステップS3503において算出された重み係数kを用いて、縦画素補正対象画素の縦画素補正値を算出する。縦画素補正値の算出に、線形補間が用いられる場合の式は、式(6)と同様である。したがって、縦画素補正後の画素値は、0.1×A-1+0.9×Aで求められる。
 ただし、式(6)における、Aは、縦画素補正用元座標の画素の画素値であり、A-1は、原基準画像において、その2画素上に位置する画素の画素値を示す。例えば、図21の例においては、A-1は縦画素補正用画素2104(図21においては、縦画素補正対象画素と同じ色(G)であることを示すために、G-1と表記)の画素値、A-1は、縦画素補正用元座標の画素2102(同G)の画素値である。
 縦画素補正画像生成部107bは、ステップS3504またはステップS3505における縦画素補正対象画素の縦画素補正値算出により、図35のフローチャート(同色の場合の縦画素補正値算出)の処理を終了する。
 なお、縦画素補正用元座標のY座標が整数値となった場合には、縦画素補正値を算出するために原基準画像上の複数の画素の画素値を用いる必要がないため、縦画素補正値として、縦画素補正用元座標の画素の画素値がそのまま採用される。例えば、縦画素補正用元座標のY座標が3.0であった場合は、縦画素補正値として、縦画素補正用元座標の画素2102の画素値がそのまま採用される。また、例えば、縦画素補正用元座標のY座標が1.0であった場合は、縦画素補正値として、縦画素補正用元座標の画素2104の画素値がそのまま採用される。
 以上のように、縦画素補正処理部110bは、歪み平行化補正をするために参照すべき原基準画像の画素のY座標に基づいて、参照すべき原基準画像の画素の上下に位置する画素の画素値を用いて、ベイヤ配列定義部108bで設定した色の画素値を算出する。なお、ここでは基準画像の縦画素補正値算出方法について具体的に説明したが、縦画素補正処理部110bは、参照画像についても、参照画像用平行化補正情報および原参照画像を用いて同様に縦画素補正値を算出し、縦画素補正参照画像を生成する。
 なお、本実施例においては、高速化のため、縦画素補正処理部110bは、フィルタ部103bによるフィルタリング処理の前に画像全体の縦画素補正を行う構成とした。しかし、この構成に限らず、縦画素補正処理部110bは、フィルタ部103bの画像切り出し部201において画像を切り出す前に、毎回対象領域のみを縦画素補正するとしても構わない。
 <フィルタ部103b>
 フィルタ部103bは、フィルタ部103aと同様のフィルタリング処理を行う。ただし、フィルタ部103aではステレオ画像上(原基準画像および原参照画像)でのサブピクセルレベルの視差を算出したのに対し、フィルタ部103bでは縦画素補正画像上(縦画素補正基準画像および縦画素補正参照画像)でのサブピクセルレベルの視差を算出する。
 <フィルタ部103bの構成>
 図22は、ステレオ画像処理装置100aに、縦画素補正画像生成部107bを追加した場合の、フィルタ部103bの構成の一例を示すブロック図であり、実施の形態3の図17に対応するものである。図17と同一部分には同一符号を付し、これについての説明を省略する。
 フィルタ部103bは、図17に示す構成のうち座標変換部207aに替え、ベイヤ配列調整部208bを有する。
 ベイヤ配列調整部208bは、画像マッチング部102から取得した、平行化補正画像上で求められた基準点と対応点のそれぞれのX座標から、縦画素補正基準画像と縦画素補正参照画像のベイヤ配列の並びが一致しているかどうかを判断する。
 具体的には、ベイヤ配列調整部208bは、基準点と対応点のX座標が偶数同士、もしくは奇数同士であれば、縦画素補正基準画像と縦画素補正参照画像のベイヤ配列の並びが一致していると判断し、取得した基準点と対応点をそのまま画像切り出し部201へ送る。
 基準点と対応点のX座標の一方が偶数でもう一方が奇数の場合は、縦画素補正基準画像と縦画素補正参照画像のベイヤ配列の並びが一致していないため、ベイヤ配列調整部208bは、例えば対応点のX座標を+1する。そして、ベイヤ配列調整部208bは、取得した対応点のX座標を+1した画素を新たな対応点として、取得した基準点とともに画像切り出し部201へ送る。
 この際、ベイヤ配列調整部208bは、+1したという情報をピーク位置検出部104に通知し、ピーク位置検出部104において視差を求める際に、ピクセルレベルのずれ量nとサブピクセルレベルのずれ量δ’に加え、ベイヤ配列調整部208bで調整した+1も合わせて加算する。
 なお、ここでは対応点のX座標を+1、すなわち、1画素右にずらした場合について説明したが、対応点のX座標を-1、すなわち、1画素左にずらすとしてもよい。その場合、ピーク位置検出部104において視差を求める際には、ピクセルレベルのずれ量nとサブピクセルレベルのずれ量δ’に加え、ベイヤ配列調整部で調整した-1も合わせて加算する。(つまり、ピクセルレベルのずれ量nとサブピクセルレベルのずれ量δ’を加算した値から1減算する。)
 以上説明したように、本実施の形態に係るステレオ画像処理装置100bは、縦画素補正画像を用いてサブピクセルレベルの視差を算出する。これにより、ステレオ画像処理装置100bは、より高精度に、視差を算出することができる。
 なお、ステレオ画像処理装置100bは、画像マッチング部102への入力前処理として、ベイヤ配列画像をグレースケール画像に変換し、グレースケール画像で対応点を取得し、ベイヤ配列画像を縦補正した縦補正画像を用いてサブピクセルレベルの視差を算出するとしてもよい。
 さらに、処理を高速化するために、フィルタ部103bを別の構成としてもよい。処理を高速化するフィルタ部103bの別の構成を、図23に示す。
 図23のフィルタ部103cは、図22のフィルタ部103bの別の構成であり、画像再構成部202およびアンチエイリアシング部203による処理結果を、ベイヤ配列調整部208bに出力する構成となっている。
 フィルタ部103cは、ある基準点に対し、画像マッチング部102で求めた対応点に基づいて、サブピクセルレベルの視差を算出する。この際、ある基準点のサブピクセルレベルの視差を算出する画素行が、直前のサブピクセルレベルの視差算出処理において、基準点とサブピクセルレベルの視差を算出した画素行と一致している場合、フィルタ部103cは、画像再構成処理およびアンチエイリアシング処理を共通化することができる。
 フィルタ部103cに入力される画像は、縦画素補正画像生成部107bにて縦方向に対して補正された画像であるため、画像マッチング部102で使用した平行化補正画像と縦方向の座標が一致している。そのため、基準点が含まれる画素行が一致している間、サブピクセルレベルの視差を算出する画素行も一致しているため、画素行方向(横方向)にサブピクセルレベルの視差を算出していく場合、フィルタ部103cは、1画素行まとめて画像再構成およびアンチエイリアシング処理を行うことができる。画像切り出し部201は、アンチエイリアシング処理後のデータから必要となるデータを切り出して使用することで処理の無駄を省くことができる。これにより、ステレオ画像処理装置100bは、演算量を大幅に削減することができ、より高速かつ高精度に、視差を算出することができる。
 (実施の形態4)
 本実施例は、ステレオ画像処理装置100において、基準画素データと参照画素データとの相関が高くなる位置(以下、「相関ピーク」という)に合わせた窓掛け処理をより適切に行う方法について記載するものである。
 実施の形態2において、窓掛け部204における第2の窓関数を用いた窓掛け処理について説明した。第2の窓関数を用いた窓掛け処理は、基準画素データおよび参照画素データの切り出しにより発生するノイズ成分の低減を目的とするものである。
 しかし、第2の窓関数を用いた窓掛け処理において、相関ピークに最大値を有する窓関数を用いた場合、フィルタ部103におけるフィルタリング結果が、より高精度に求まる余地がある。なお、相関ピークに最大値を持つ窓関数を用いた窓掛け処理は、すなわち、相関ピークに合わせた窓掛け処理である。
 相関ピークに合わせた窓掛け処理は、相関ピークと窓関数の最大値とが一致するように、係数を計算して窓関数を生成する方法が知られているが、三角関数に基づいて再計算する必要があるため窓掛け処理を行うための演算量が膨大になる。また、想定される複数の相関ピークに合わせた複数の窓関数の係数を、それぞれ静的データとして予め用意しておく方法が知られているが、係数を保持するために必要なメモリサイズが膨大になってしまう。
 本発明の実施の形態4は、画像範囲を一次元画素データに再構成する特徴を利用することで、従来の方法よりも、演算量が少なく、使用するメモリが小さい、相関ピークに合わせた窓掛け処理を開示する。
 <実施の形態4におけるステレオ画像処理装置100cの構成>
 図24は、本実施の形態に係るステレオ画像処理装置100cの構成の一例を示すブロック図である。図24は、実施の形態2の図2に対応するものである。
 図24に示すステレオ画像処理装置100cが図2と異なるのは、フィルタ部103の代わりにフィルタ部103dを有し、ピーク位置検出部104の代わりにピーク位置検出部104bを有し、サブピクセル視差概算部107を更に有する点である。なお、図2と同一部分には同一符号を付し、これについての説明を省略する。
 <サブピクセル視差概算部107>
 サブピクセル視差概算部107は、視差の概算値をサブピクセルレベルで算出する。サブピクセル視差概算部107で算出されるサブピクセルレベルの視差は、少なくとも、データ抽出間隔の逆数以上の精度の概算値で良い。例えば、データ抽出間隔が8の場合、サブピクセルレベルの視差は1/8ピクセルの精度でよい。なお、データ抽出間隔については後述する。
 サブピクセル視差概算部107において、サブピクセルレベルの視差の概算値は、例えば「等角直線フィッティング法」や「二次曲線フィッティング法」などを用いることで算出できる。等角直線フィッティング法および二次曲線フィッティング法が出力する視差は、ピーク位置検出部104が出力する視差よりも精度は劣るが、少ない演算量でサブピクセルレベルの視差を計算することができる。以下の説明においては、等角直線フィッティング法を用いた場合のサブピクセル視差概算部107の処理概要を説明する。
 サブピクセル視差概算部107は、画像マッチング部102から、基準画像と、参照画像と、基準画像の基準点の座標と、参照画像の対応点の座標とを取得する。所定の基準点に対する対応点の視差がnであるとき、基準点の座標(xa、ya)に対する対応点の座標は(xa+n、ya)である。このとき、基準点に対する対応点のSAD値は、式(1)に示すようにSAD(n)で表される。
 また、対応点からx軸方向に1画素だけ左の点、および1画素だけ右の点の座標は、それぞれ(xa+n-1、ya)、および(xa+n+1、ya)であり、基準点に対するこれらの点のSAD値はそれぞれSAD(n-1)、SAD(n+1)である。このとき、サブピクセル視差概算部107は、サブピクセルレベルの視差nsを式(7)のように計算することが出来る。
Figure JPOXMLDOC01-appb-M000007
 図25は、視差とSAD値との関係の説明に供する図である。図25において、対応点からx軸方向に1画素だけ左の画素と、対応点と、対応点からx軸方向に1画素だけ右の画素とについて、視差に対するSAD値をプロットした点をa、b、およびcで示している。点a、bを通る直線をL1、L1の傾きをk、点cを通って傾き-kである直線をL2としたとき、L1とL2との交点dにおける視差の値が、基準点におけるサブピクセルレベルの視差nsとなる。
 なお、サブピクセルレベルの視差の概算値を求める方法は、等角直線フィッティング法、および二次曲線フィッティング法に限るものではなく、他の手法を用いても良い。
 <フィルタ部103dの構成>
 図26は、ステレオ画像処理装置100cにおける、フィルタ部103dの構成の一例を示すブロック図である。図26は、実施の形態2の図3に対応する。
 図26に示すフィルタ部103dが図3と異なるのは、フィルタ部103dがデータ抽出部208を更に有する点である。図26において、図3と同一部分には同一符号を付し、これについての説明を省略する。
 <データ抽出部208>
 データ抽出部208は、アンチエイリアシング部203によって折り返しノイズが除去された一次元画素データについて、等間隔のデータ抽出を行う。これにより、以降の窓掛け部204およびフィルタ生成部205で扱うデータ量が削減され、演算量を削減できる。また、その際、データ抽出部208がサブピクセルレベルの視差の概算値に基づいてデータ抽出の開始位置をずらすことにより、相関ピークに合わせた窓掛け処理が可能となる。データ抽出部208によるデータ抽出の結果得られた一次元画素データを、抽出一次元画素データと呼ぶ。
 図32は、データ抽出部208の動作の説明に供する図である。以下、図32により、データ抽出部208の動作について説明する。
 データ抽出部208は、データ抽出開始位置算出(S1001)と、データ抽出(S1002)と、視差の補正値算出(S1003)とを含む。以下、具体的に説明する。
 (動作1:データ抽出開始位置算出)
 データ抽出部208は、一次元画素データに対する等間隔のデータ抽出を開始する位置を算出する(S1001)。データ抽出部208は、サブピクセル視差概算部107で求めた、サブピクセルレベルの視差の概算値に基づいて、データ抽出開始位置を算出する。具体的な算出手順を以下に示す。
 まず、データ抽出開始位置を算出するために必要な係数であるN、W、およびKを求める。係数Nは、画素行数を2で割った整数値である。例えば、画素行数4の場合、係数Nは2であり、画素行数3の場合、係数Nは1である。また、係数Wは、0.5を画素行数で割った値である。例えば、画素行数2の場合、係数Wは0.25である。また、係数Kは、サブピクセルレベルの視差の概算値の小数点以下の値から0.5を引いた値である。すなわち、-0.5≦K<0.5で表される。そして、これらの係数を、画像範囲の画素行数が奇数の場合は式(8)に代入し、画像範囲の画素行数が偶数の場合は式(9)に代入することで、データ抽出開始位置の差Dが算出される。
Figure JPOXMLDOC01-appb-M000008
Figure JPOXMLDOC01-appb-M000009
 図30において、基準画像および参照画像から視差を算出するために切り出した画像範囲の画素行数が2、3、および4の場合における、データ抽出開始位置の差Dを算出する式を示す。
 データ抽出開始位置の差Dを使用して、基準画像および参照画像の画像範囲から再構成した一次元画素データにおけるデータ抽出開始位置を変更する。
 差Dが正の場合、参照画素データにおけるデータ抽出開始位置を、一次元画素データの左端の画素からDの絶対値だけ右の画素に変更する。差Dが負の場合、基準画素データにおけるデータ抽出開始位置を、一次元画素データの左端の画素からDの絶対値だけ右の画素に変更する。差Dが0の場合、データ抽出開始位置を変更しない。
 (動作2:データ抽出)
 データ抽出部208における、基準画像および参照画像の画像範囲の一次元画素データに対するデータ抽出について説明する。
 データ抽出部208は、データ抽出を行う際のデータ抽出間隔の情報を予め保持する。データ抽出間隔として、ステレオ画像がグレースケール画像の場合は元の画像範囲の画素行数の値、ステレオ画像がカラー画像であり、ベイヤ配列の画像データである場合は、画素行数の倍数の値が設定されるようにしてもよいし、一次元画素データの冗長性を確保してエラー耐性を高める目的で、より小さな値が設定されるようにしてもよい。
 データ抽出部208は、データ抽出開始位置およびデータ抽出間隔の値をもとに、基準画像および参照画像の画像範囲の一次元画素データから、等間隔のデータ抽出を行うことで、抽出一次元画素データを得る。
 図28は、ステレオ画像がカラー画像であり、ベイヤ配列の画像データである場合の、等間隔のデータ抽出の例を示す。図28Aは、図28Dで示される画素行数2、すなわちユニット行数1、の画像範囲を一次元画素データに再構成した後のデータを示す。図28Bはローパスフィルタによるアンチエイリアシングを行った後のデータを示す。図28Cは先頭から数えて3画素目をデータ抽出の開始位置として4画素毎のデータ抽出を行った後のデータを示す。
 また図31において、データ抽出開始位置の差Dをもとにデータ抽出開始位置を変更しながら、一次元画素データに対するデータ抽出処理を行う例を示す。図31はそれぞれ、ステレオ画像がカラー画像であり、ベイヤ配列の画像データである場合において、画像範囲の画素行数が4である際に、データ抽出間隔を取り得る値の最大値である8画素とした場合の、データ抽出結果の例を示している。このとき、例えばサブピクセルレベルの視差の概算値が0.1(K=-0.4)であった場合には、D=-2となり、データ抽出結果は図31における3101となる。
 (動作3:視差の補正値算出)
 データ抽出部208における、視差の補正値算出について説明する。データ抽出部208において基準画像と参照画像のデータ抽出開始位置の差Dが0でない場合、その差の量に応じて得られる視差の値も変化するため、視差の補正を行うことが必要となる。データ抽出部208ではこの視差の補正値は、基準画素データと参照画素データのデータ抽出開始位置の差を、画素行数によって除算することによって算出する。
 例えば、画素行数が4で、基準画素データと参照画素データのデータ抽出開始位置の差が-1の場合、視差の補正値は-0.25となる。
 視差の補正は、後段のピーク位置検出部104bにおいてピーク位置検出を行って視差を算出した後に行う。そのためデータ抽出部208で算出したこの補正値は、ピーク位置検出部104bに入力として与えられる。
 <窓掛け部204>
 本実施の形態における窓掛け部204では、一次元画素データのサイズをデータ抽出間隔で除算することで算出されるサイズの窓関数を予め記憶しておく。そして本実施の形態における窓掛け部204は、データ抽出部208において抽出される抽出一次元画素データを入力として窓掛け処理を行う。その他の処理は、実施の形態1乃至3における窓掛け部204の処理と同様である。
 <ピーク位置検出部104b>
 ピーク位置検出部104bの処理を説明する。ピーク位置検出部104bでは、ピーク検出部104と同様の処理を行った後に、視差の値を補正する。具体的には、ピーク検出部104と同様の処理によってサブピクセルレベルの視差を求めた後に、基準画素データと参照画素データのデータ抽出開始位置の差に応じた視差の補正値(フィルタ部103dのデータ抽出部208において算出済み)をサブピクセルレベルの視差に足し合わせることにより、視差の値を補正する。
 例えば、ピーク検出処理の結果として算出したサブピクセルレベルの視差が15.25であり、視差の補正値が-0.375である場合、補正後の視差の値は14.875となる。ピーク位置検出部104bは、このような視差の補正を実施した後の視差の値を出力する。
 (原理の説明1:データ抽出で原理的に精度劣化が無いことの説明)
 本実施例において、視差の算出精度を維持したままデータ抽出を行うことが出来る原理について説明する。
 アンチエイリアシング部203によって折り返しノイズが除去された一次元画素データは、元の画像範囲における画素行数の間隔でデータ抽出を行っても、サブピクセルレベルの視差算出に必要な、撮像対象の濃淡を表す輝度情報を失わない。
 また、ステレオ画像がカラー画像であり、ベイヤ配列の画像データである場合は、アンチエイリアシング部203によって折り返しノイズが除去された一次元画素データに対して元の画像範囲の画素行数の2倍の間隔でデータ抽出を行っても、サブピクセルレベルの視差算出に必要な、撮像対象の濃淡を表す輝度情報を失わない。
 例えば、ステレオ画像がカラー画像であって、ベイヤ配列の画像データであり、画像範囲の画素行数が2である場合、画素行数の2倍である4画素毎のデータ抽出を行っても、サブピクセルレベルの視差算出に必要な、撮像対象の濃淡を表す輝度情報を失わない。
 一次元画素データは、基準画像または参照画像における画像範囲を再構成して生成されており、画像範囲における縦方向に視差は生じないため、画像範囲の縦方向に生じている濃淡変化は、視差の算出精度に影響が無い。
 また、ステレオ画像がカラー画像であり、ベイヤ配列の画像データである場合には、画像範囲における基線長方向に2画素周期で生じている濃淡の変化は、R、G、Bのベイヤ配列によって生じているものであり、撮像対象の濃淡によって生じているものでは無い。画像範囲の基線長方向には例えば、RGRG・・・や、GBGB・・・というように異なる波長の可視光を撮像する素子が交互に配置されており、2画素周期で濃淡の変化が生じている。ベイヤ配列のカラー素子の場合には、モノクロ素子の場合と比較して、基線長方向の解像度が1/2になる。
 以上より、一次元画素データにおいては、少なくとも元の画像範囲の画素行数の値を周期とする濃淡の変化は、算出される視差の精度に影響が無く、またベイヤ配列のカラー素子における一次元画素データにおいては、元の画像範囲の画素行数の2倍の画素数を周期とする濃淡の変化は、算出される視差の精度に影響が無い。
 このような一次元画素データの性質について、図27を用いて補足する。図27は、画像切り出し部201が、ベイヤ配列の画像データである基準画像または参照画像から、2×8画素の画像範囲300を切り出した例を示している。画像切り出し部201が切り出した2×8画素の画像範囲300は、画像再構成部202によって1×16画素の一次元画素データ301に変換される。図27の2701が画像範囲の縦方向に生じている濃淡変化に相当し、図27の2702がベイヤ配列によって生じている濃淡変化に相当する。この場合、一次元画素データにおける4画素周期の濃淡変化は、算出される視差の算出精度に影響が無い。
 算出される視差の精度に影響が無い情報は削除することが出来るため、データ抽出部208において、一次元画素データからサブピクセルレベルの視差算出を行うために必要な、撮像対象の濃淡を表す輝度情報を失わないようにデータ抽出を行うことにより、サブピクセルレベルの視差算出を行うために必要なデータのみを残すことができる。
 よって、ステレオ画像処理装置100cは、一次元画素データから抽出された抽出一次元画素データを使用することで、サブピクセルレベルの視差算出の精度を維持したまま、後段の処理における演算量を削減出来る。
 (原理の説明2:開始位置を変更することで相関ピークに合う理由の説明)
 一次元画素データに対するデータ抽出を行う際に開始位置を変更することで、相関ピークに合わせた窓掛け処理が実現出来る原理について、図29を用いて説明する。
 図29では、一次元画素データに対して4画素毎のデータ抽出を行った例を示す。図29の2901は一次元画素データ、図29の2902は1画素目から4画素毎にデータ抽出を行った後の抽出一次元画素データ、図29の2903は4画素目から4画素毎にデータ抽出を行った後の抽出一次元画素データを示す。
 図29の2902に示すように、32画素からなる一次元画素データの1画素目から4画素毎にデータ抽出をした場合、抽出一次元画素データのデータサイズは8画素となる。そして図29の2904に示すように、抽出一次元画素データは、一次元画素データにおける13画素目と17画素目を中央に持つ。このとき中央に最大値を持つ8画素の窓関数を適用した場合、一次元画素データに対して中央から左寄りの位置に最大値を持つ窓関数を使用して窓掛けを行うことと同等となる。
 また同様に図29の2903に示すように、32画素からなる一次元画素データの4画素目から4画素毎にデータ抽出をした場合、抽出一次元画素データのデータサイズは8画素となる。そして図29の2905に示すように、抽出一次元画素データは、一次元画素データにおける16画素目と20画素目を中央に持つ。このとき中央に最大値を持つ8画素の窓関数を適用した場合、一次元画素データに対して中央から右寄りの位置に最大値を持つ窓関数を使用して窓掛けを行うことと同等となる。
 このように、等間隔のデータ抽出を行う際にデータ抽出の開始位置をずらすことで、同じ中央に最大値を持つ窓関数を使用した場合でも、一次元画素データの異なる位置に最大値を持つ窓掛け処理が可能となる。よって、目的とする相関ピークに合わせた窓掛け処理を行える。
 以上の通り説明した動作、および原理により、相関ピークに合わせた窓関数を得るための複雑な計算を行うこと無く、また、想定される複数の相関ピークに合わせた複数の窓関数の係数を静的データとして予め用意しておくこと無く、相関ピークに合わせた窓掛け処理を行うことが可能となる。
 また、以上説明した各実施の形態におけるステレオ画像処理装置の各機能部は、例えば、集積回路により構成されてもよい。ステレオ画像処理装置の各機能部は、個別に1チップ化されていてもよいし、複数で1チップ化されてもよい。集積回路は、集積度の違いにより、LSI(large scale integration)、IC(integrated circuit)、システムLSI、スーパーLSI、またはウルトラLSI等とすることができる。また、集積回路は、専用回路または汎用プロセッサにより実現されるものであってもよい。また、集積回路は、その製造後にプログラムすることが可能なFPGA(field programmable gate array)や、内部の回路セルの接続や設定を再構成可能なコンフィギュラブル・プロセッサとしてもよい。更には、ステレオ画像処理装置の各機能部は、半導体技術の進歩または派生する別技術に応じて、LSIに置き換わる他の集積回路化の技術(たとえばバイオ技術)により集積化されたものにより実現されてもよい。
 2011年6月17日出願の特願2011-135191の日本出願に含まれる明細書、図面および要約書の開示内容は、すべて本願に援用される。
 本発明に係るステレオ画像処理装置およびステレオ画像処理方法は、基線長方向の画像領域サイズが小さい対象物についても高精度に視差を算出することができる、ステレオ画像処理装置およびステレオ画像処理方法として有用である。
 100 ステレオ画像処理装置
 100a ステレオ画像処理装置
 100b ステレオ画像処理装置
 100c ステレオ画像処理装置
 101 ステレオ画像取得部
 102 画像マッチング部
 103 フィルタ部
 103a フィルタ部
 103b フィルタ部
 103c フィルタ部
 103d フィルタ部
 104 ピーク位置検出部
 104d ピーク位置検出部
 105a 平行化補正情報格納部
 106a 平行化補正処理部
 107b 縦画素補正画像生成部
 108b ベイヤ配列定義部
 109b 平行化補正情報取得部
 110b 縦画素補正処理部
 201 画像切り出し部
 202 画像再構成部
 203 アンチエイリアシング部
 204 窓掛け部
 205 フィルタ生成部
 207a 座標変換部
 208 データ抽出部
 208b ベイヤ配列調整部
 300 画像範囲
 301 一次元画素データ
 311 基準点
 312 単位基準画像
 313 矩形窓
 321 切り出し位置
 322 単位参照画像
 331 基準画像(参照画像)
 332 サブピクセル推定用単位基準画像(サブピクセル推定用単位参照画像)
 333 基準点(対応点)
 334 基準画素データ(参照画素データ)
 335 第1の画素行において隣接する画素の間の間隔
 341 ナイキスト周波数
 342 振幅特性
 343 エイリアシング
 344 ローパスフィルタ
 351 基準画像
 352 サブピクセル推定用単位基準画像
 353 基準画素データ
 354 参照画像
 355 参照画素データ
 356 参照画素データ
 357 第2の窓関数
 361 ベイヤ配列画像
 362 R画素
 363 G画素
 364 G画素
 365 B画素
 366 カラー画素ユニット
 367 Rデータ
 368 Gデータ
 369 Bデータ
 401 第1の画素行
 402 第2の画素行
 403 第3の画素行
 2001 縦画素補正対象画素(画素(5))
 2002 縦画素補正対象画素(画素(5))の縦画素補正用元座標の画素
 2003 縦画素補正対象画素(画素(5))の色
 2004 縦画素補正値算出に用いる画素
 2005 縦画素補正値算出に用いる画素
 2006 縦画素補正対象画素(画素(1))
 2007 原基準画像の画素(画素(1))
 2101 縦画素補正対象画素(画素(8))
 2102 縦画素補正値算出に用いる画素
 2103 縦画素補正対象画素(画素(8))の縦画素補正用元座標の画素
 2104 縦画素補正値算出に用いる画素

Claims (12)

  1.  基準画像と参照画像とに対して画像マッチング処理することで、前記基準画像の基準点に対する前記参照画像の対応点を取得する画像マッチング部と、
     複数の画素行及び複数の画素列を有し、前記基準点を含む第1の二次元画素データを前記基準画像から抽出し、複数の画素行及び複数の画素列を有し、前記対応点を含む第2の二次元画素データを前記参照画像から抽出する画像切り出し部と、
     所定の再構成ルールに基づいて、前記第1の二次元画素データ及び前記第2の二次元画素データのそれぞれを、第1の一次元画素データ及び第2の一次元画素データに再構成する画像再構成部と、
     前記第1の一次元画素データと、前記第2の一次元画素データとの相関に基づいて、視差を算出するピーク位置検出部と、を備える、
     ステレオ画像処理装置。
  2.  前記所定の再構成ルールは、二次元画素データのうち同一画素行に含まれる任意の画素同士の、再構成前の間隔と再構成後の間隔との比が、二次元画素データに含まれる全ての画素同士について同一になるように、二次元画素データを一次元画素データに再構成するルールである、
     請求項1に記載のステレオ画像処理装置。
  3.  前記所定の再構成ルールは、前記画素行の方向における画素の間隔が元の間隔以上になるように、前記1次元画素データを生成する内容である、
     請求項1に記載のステレオ画像処理装置。
  4.  前記第1の二次元画素データと、前記第2の二次元画素データとは、同一の画素データ数を含む、
     請求項1に記載のステレオ画像処理装置。
  5.  前記再構成によって生じる折り返しノイズを、前記第1の一次元画素データ及び前記第2の一次元画素データから除去するアンチエイリアシング部と、
     前記ノイズが除去された第1の一次元画素データの各画素値の位置を配列方向において反転して得られる逆位相フィルタ係数を算出し、前記ノイズが除去された第2の一次元画素データに対して、前記逆位相フィルタ係数を用いてフィルタリング処理するフィルタ生成部と、
     を更に備え、
     前記ピーク位置検出部は、
     前記ノイズが除去された第1の一次元画素データと、前記ノイズが除去された第2の一次元画素データとの相関に基づいて、視差を算出する、
     請求項1に記載のステレオ画像処理装置。
  6.  前記ノイズが除去された第1の一次元画素データ及び第2の一次元画素データに対して、窓の両端における変化が連続的である窓関数を用いて窓掛けを行う窓掛け部を、更に有し、
     前記窓関数の窓長は、前記基準点の基準画像上の位置と前記対応点の前記参照画像上の位置のずれ量に応じて設定され、
     前記フィルタ生成部は、前記窓掛けされた第1の一次元画素データの各画素値の位置を配列方向において反転させて得られる逆位相フィルタ係数を算出し、前記窓掛けされた第2の一次元画素データに対して、前記逆位相フィルタ係数を用いてフィルタリング処理を行う、
     請求項5に記載のステレオ画像処理装置。
  7.  前記基準画像及び前記参照画像に対して歪み補正及び平行化補正を行い、前記歪み補正及び平行化補正された基準画像及び参照画像を、前記画像マッチング部へ出力する平行化補正処理部と、
     前記基準点及び前記対応点のそれぞれの座標を、前記基準画像及び前記参照画像における座標に変換し、前記変換の際に画素行方向に切り上げ、もしくは切り捨てられた値を前記ピーク位置検出部へ出力する座標変換部を、更に有し、
     ピーク位置検出部は、前記フィルタリング処理の結果における前記基準画素データと前記参照画素データとの相関関係に基づいて算出した、基準画像上の前記座標変換部による変換後の基準点と、参照画像上の前記座標変換部による変換後の対応点とのずれ量に、前記変換の際に画素行方向において切り上げ、もしくは切り捨てられた値を加算することにより視差を算出する、
     請求項5に記載のステレオ画像処理装置。
  8.  前記基準画像及び前記参照画像に対して、縦方向にのみ歪み補正および平行化補正を行い、前記基準画像に対して縦方向にのみ歪み補正および平行化補正した画像である縦画素補正基準画像と、参照画像に対して縦方向にのみ歪み補正および平行化補正した画像である縦画素補正参照画像とを、前記画像切り出し部へ出力する縦画素補正画像生成部を、更に有し、
     前記座標変換部は、前記基準点及び前記画像マッチング部から取得した前記対応点のそれぞれの座標を前記縦画素補正基準画像および前記縦画素補正参照画像上での座標に変換し、
     前記画像切り出し部は、前記縦画素補正基準画像および前記縦画素補正参照画像から画像範囲を切り出し、
     フィルタ生成部は、前記縦画素補正基準画像から生成され、折り返しノイズが除去された1次元画素データである基準画素データの各画素値の位置を配列方向において反転させて得られる逆位相フィルタ係数を算出し、前記縦画素補正参照画像から生成され、折り返しノイズが除去された1次元画素データである参照画素データ対して、前記逆位相フィルタ係数を用いてフィルタリング処理を行い、
     前記ピーク位置検出部は、前記フィルタリング処理の結果における前記基準画素データと前記参照画素データとの相関関係に基づいて算出した、前記座標変換部の変換によって得られた前記縦画素補正基準画像上の基準点と前記縦画素補正参照画像上の対応点との視差を算出する、
     請求項7に記載のステレオ画像処理装置。
  9.  サブピクセルレベルの視差概算値を算出するサブピクセル視差概算部と、
     前記サブピクセルレベルの視差概算値に基づいてデータ抽出開始位置を求め、前記1次元画素データに対して前記データ抽出開始位置に基づいたデータ抽出を行うことで抽出1次元画素データを得るデータ抽出部を更に有し、
     前記窓掛け部は、前記抽出1次元画素データに対して窓掛けを行い、
     前記ピーク位置検出部は、前記データ抽出開始位置に基づいて、算出する視差を補正する、
     請求項8に記載のステレオ画像処理装置。
  10.  前記ステレオ画像はベイヤ配列画像であり、
     前記画像切り出し部は、単数もしくは複数の画素行と複数の画素列から成る二次元画素データを抽出し、
     前記再構成ルールは、R画素値、G画素値、およびB画素値の少なくとも1つを前記画像範囲から抽出することにより一次元画素データを生成する内容である、
     請求項1に記載のステレオ画像処理装置。
  11.  前記ステレオ画像はベイヤ配列画像であり、
     縦画素補正基準画像と縦画素補正参照画像のベイヤ配列の並びが一致していない場合、並びが一致するよう前記マッチング部が算出した前記対応点の位置をずらすベイヤ配列調整部を更に有し、
     前記再構成ルールは、R画素値、G画素値、およびB画素値の少なくとも1つを前記画像範囲から抽出することにより一次元画素データを生成する内容である、
     請求項8に記載のステレオ画像処理装置。
  12.  基準画像と参照画像とに対して画像マッチング処理することで、前記基準画像の基準点に対する前記参照画像の対応点を取得するステップと、
     複数の画素行及び複数の画素列を有し、前記基準点を含む第1の二次元画素データを前記基準画像から抽出し、複数の画素行及び複数の画素列を有し、前記対応点を含む第2の二次元画素データを前記参照画像から抽出するステップと、
     所定の再構成ルールに基づいて、前記第1の二次元画素データ及び前記第2の二次元画素データのそれぞれを、第1の一次元画素データ及び第2の一次元画素データに再構成するステップと、
     前記第1の一次元画素データと、前記第2の一次元画素データとの相関に基づいて、視差を算出するステップと、を有する、
     ステレオ画像処理方法。
     
PCT/JP2012/003746 2011-06-17 2012-06-08 ステレオ画像処理装置およびステレオ画像処理方法 WO2012172761A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2013520425A JP5942203B2 (ja) 2011-06-17 2012-06-08 ステレオ画像処理装置およびステレオ画像処理方法
US14/126,176 US9275463B2 (en) 2011-06-17 2012-06-08 Stereo image processing device and stereo image processing method
EP12801211.9A EP2711891B1 (en) 2011-06-17 2012-06-08 Stereo image processing device and stereo image processing method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2011-135191 2011-06-17
JP2011135191 2011-06-17

Publications (1)

Publication Number Publication Date
WO2012172761A1 true WO2012172761A1 (ja) 2012-12-20

Family

ID=47356769

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2012/003746 WO2012172761A1 (ja) 2011-06-17 2012-06-08 ステレオ画像処理装置およびステレオ画像処理方法

Country Status (4)

Country Link
US (1) US9275463B2 (ja)
EP (1) EP2711891B1 (ja)
JP (1) JP5942203B2 (ja)
WO (1) WO2012172761A1 (ja)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103700099A (zh) * 2013-12-18 2014-04-02 同济大学 一种旋转和尺度不变的宽基线立体匹配方法
JP2014238558A (ja) * 2013-06-10 2014-12-18 株式会社リコー 撮像装置及び視差検出方法

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102014112648A1 (de) * 2014-08-29 2016-03-03 Carl Zeiss Ag Bildaufnahmevorrichtung und Verfahren zur Bildaufnahme
CN104331872B (zh) * 2014-11-26 2017-06-30 中测新图(北京)遥感技术有限责任公司 图像拼接方法
CN104574277A (zh) * 2015-01-30 2015-04-29 京东方科技集团股份有限公司 图像插值方法和图像插值装置
CN104820987B (zh) * 2015-04-30 2017-11-17 中国电子科技集团公司第四十一研究所 一种基于光学图像及微波图像检测目标散射性能缺陷的方法
WO2017008246A1 (en) * 2015-07-14 2017-01-19 SZ DJI Technology Co., Ltd. Method, apparatus, and system for determining a movement of a mobile platform
US9779328B2 (en) * 2015-08-28 2017-10-03 Intel Corporation Range image generation
WO2017162744A1 (de) * 2016-03-22 2017-09-28 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. Vorrichtung und verfahren zum verknüpfen von messsignalen aus beleuchtungssignalen
JP6585006B2 (ja) * 2016-06-07 2019-10-02 株式会社東芝 撮影装置および車両
DE102016119857B4 (de) 2016-10-18 2019-01-31 Julius Mayerhofer Werkzeugcontainer und Verfahren zur Herstellung eines Werkzeugcontainers
JP6636963B2 (ja) * 2017-01-13 2020-01-29 株式会社東芝 画像処理装置及び画像処理方法
US11272163B2 (en) * 2017-02-07 2022-03-08 Sony Corporation Image processing apparatus and image processing method
CN106991645B (zh) 2017-03-22 2018-09-28 腾讯科技(深圳)有限公司 图像拼接方法及装置
US10267281B2 (en) * 2017-04-10 2019-04-23 Caterpillar Inc. Filter for fuel injection systems
JP7253323B2 (ja) * 2018-02-14 2023-04-06 オムロン株式会社 3次元計測システム及び3次元計測方法
JP7005458B2 (ja) 2018-09-12 2022-01-21 株式会社東芝 画像処理装置、及び、画像処理プログラム、並びに、運転支援システム
US11350063B2 (en) 2020-04-14 2022-05-31 Apple Inc. Circuit for correcting lateral chromatic abberation
US11763421B2 (en) 2021-01-07 2023-09-19 Apple Inc. Circuit for combined down sampling and correction of image data

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000200351A (ja) * 1999-01-06 2000-07-18 Sankyo Seiki Mfg Co Ltd テンプレ―トの作成方法
JP2008123141A (ja) 2006-11-09 2008-05-29 Yamatake Corp 対応点探索方法および3次元位置計測方法
WO2010113389A1 (ja) * 2009-03-31 2010-10-07 パナソニック株式会社 ステレオ画像処理装置およびステレオ画像処理方法
JP2011135191A (ja) 2009-12-22 2011-07-07 Canon Inc 撮像装置及び画像処理装置

Family Cites Families (13)

* 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 対応点検索方法及びこれを利用した三次元位置計測方法
JP3261115B2 (ja) * 1999-09-22 2002-02-25 富士重工業株式会社 ステレオ画像処理装置
US7224357B2 (en) 2000-05-03 2007-05-29 University Of Southern California Three-dimensional modeling based on photographic images
US7317819B2 (en) * 2002-08-28 2008-01-08 Imaging3, Inc. Apparatus and method for three-dimensional imaging
US7576332B2 (en) * 2003-08-01 2009-08-18 St. George's Healthcare Nhs Trust Imaging system
US7697749B2 (en) * 2004-08-09 2010-04-13 Fuji Jukogyo Kabushiki Kaisha Stereo image processing device
US8085388B2 (en) * 2005-02-01 2011-12-27 Laser Projection Technologies, Inc. Laser radar projection with object feature detection and ranging
US7835785B2 (en) * 2005-10-04 2010-11-16 Ascension Technology Corporation DC magnetic-based position and orientation monitoring system for tracking medical instruments
JP4872836B2 (ja) * 2007-07-06 2012-02-08 コニカミノルタホールディングス株式会社 情報処理システム
JP4937933B2 (ja) * 2008-01-18 2012-05-23 富士重工業株式会社 車外監視装置
US8090195B2 (en) * 2008-02-12 2012-01-03 Panasonic Corporation Compound eye imaging apparatus, distance measuring apparatus, disparity calculation method, and distance measuring method
JP5409107B2 (ja) 2009-05-13 2014-02-05 任天堂株式会社 表示制御プログラム、情報処理装置、表示制御方法、および情報処理システム
CA2714235C (en) * 2010-04-27 2014-01-07 Centre De Recherche Industrielle Du Quebec Method and system for stabilizing dry-based density of wood chips to be fed to a chip refining process

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000200351A (ja) * 1999-01-06 2000-07-18 Sankyo Seiki Mfg Co Ltd テンプレ―トの作成方法
JP2008123141A (ja) 2006-11-09 2008-05-29 Yamatake Corp 対応点探索方法および3次元位置計測方法
WO2010113389A1 (ja) * 2009-03-31 2010-10-07 パナソニック株式会社 ステレオ画像処理装置およびステレオ画像処理方法
JP2011135191A (ja) 2009-12-22 2011-07-07 Canon Inc 撮像装置及び画像処理装置

Non-Patent Citations (1)

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

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014238558A (ja) * 2013-06-10 2014-12-18 株式会社リコー 撮像装置及び視差検出方法
CN103700099A (zh) * 2013-12-18 2014-04-02 同济大学 一种旋转和尺度不变的宽基线立体匹配方法

Also Published As

Publication number Publication date
US9275463B2 (en) 2016-03-01
EP2711891A1 (en) 2014-03-26
EP2711891A4 (en) 2014-11-26
US20150036917A1 (en) 2015-02-05
JPWO2012172761A1 (ja) 2015-02-23
EP2711891B1 (en) 2016-03-23
JP5942203B2 (ja) 2016-06-29

Similar Documents

Publication Publication Date Title
JP5942203B2 (ja) ステレオ画像処理装置およびステレオ画像処理方法
CN108352074B (zh) 光学流估计的图像处理系统和方法
JP6258209B2 (ja) ステレオ画像処理装置およびステレオ画像処理方法
TWI399975B (zh) 藉由多孔徑成像系統捕捉的影像之融合
JP5810314B2 (ja) ステレオ画像処理装置およびステレオ画像処理方法
US10007972B2 (en) Image processing apparatus and method for performing preprocessing to obtain image with improved sharpness
JP6843212B2 (ja) ホモグラフィの修正
WO2012060093A1 (ja) ステレオ画像処理装置及びステレオ画像処理方法
CN113196334B (zh) 用于生成超分辨率图像的方法和相关设备
WO2012086173A1 (ja) ステレオ画像処理装置及びステレオ画像処理方法
WO2020139493A1 (en) Systems and methods for converting non-bayer pattern color filter array image data
Yoo et al. 3D image reconstruction from multi-focus microscope: axial super-resolution and multiple-frame processing
JP2020140497A (ja) 演算装置、視差算出方法
CN111951159B (zh) 一种强噪声条件下光场epi图像超分辨率的处理方法
JP6378531B2 (ja) 超解像装置及びプログラム
US9432576B2 (en) Method and apparatus for fusing images from an array of cameras
WO2022059335A1 (ja) 三次元モデル生成方法及び三次元モデル生成装置
KR101532686B1 (ko) 경계 적응적 필터를 이용한 영상 처리 장치 및 그 방법
JP6363878B2 (ja) 超解像画像最適化装置及びプログラム
JPWO2015083499A1 (ja) 画像処理装置、該方法および該プログラム
JP2015082242A (ja) 画像処理装置、画像処理方法、及びプログラム
JP2018169948A (ja) 超解像画像生成装置、プログラム、および、集積回路
Osterweil et al. Workshop on software Engineering in Health Care (SEHC)

Legal Events

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

Ref document number: 12801211

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2013520425

Country of ref document: JP

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 2012801211

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 14126176

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE