WO2020209040A1 - 画像処理装置、及び画像処理方法 - Google Patents

画像処理装置、及び画像処理方法 Download PDF

Info

Publication number
WO2020209040A1
WO2020209040A1 PCT/JP2020/012664 JP2020012664W WO2020209040A1 WO 2020209040 A1 WO2020209040 A1 WO 2020209040A1 JP 2020012664 W JP2020012664 W JP 2020012664W WO 2020209040 A1 WO2020209040 A1 WO 2020209040A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
depth
correction
image processing
pixels
Prior art date
Application number
PCT/JP2020/012664
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 CN202080026996.7A priority Critical patent/CN113710986A/zh
Priority to JP2021513545A priority patent/JPWO2020209040A1/ja
Priority to US17/600,894 priority patent/US20220188997A1/en
Priority to EP20788238.2A priority patent/EP3954967A4/en
Publication of WO2020209040A1 publication Critical patent/WO2020209040A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • 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/77Retouching; Inpainting; Scratch removal
    • 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/571Depth or shape recovery from multiple images from focus
    • 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
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N13/10Processing, recording or transmission of stereoscopic or multi-view image signals
    • H04N13/106Processing image signals
    • H04N13/128Adjusting depth or disparity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10028Range image; Depth image; 3D point clouds
    • 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
    • G06T2207/20032Median 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/20212Image combination
    • G06T2207/20221Image fusion; Image merging
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N2013/0074Stereoscopic image analysis
    • H04N2013/0081Depth or disparity estimation from stereoscopic image signals

Definitions

  • the present disclosure relates to an image processing apparatus and an image processing method.
  • a technique for calculating a depth value from a stereo image or an image plane phase difference pixel is known.
  • the depth value is, for example, the distance from the image pickup device to the subject. If a stereo image is used to calculate the depth value, the image processing device calculates, for example, the parallax amount between the reference image and the reference image input as the stereo image, and triangulates based on the calculated parallax amount. Calculate the distance to the target in principle.
  • the conventional method may not be able to obtain a highly accurate depth value or depth image.
  • the value of a plurality of pixels around the pixel for which the depth value is calculated is used for calculating the depth value of one pixel.
  • the depth value is calculated on the assumption that a plurality of pixels are at the same distance, so that a highly accurate depth value can be obtained when pixels of different distances are mixed in the plurality of pixels. It may not be calculated.
  • the present disclosure proposes an image processing device capable of acquiring a highly accurate depth value or depth image, and an image processing method.
  • the image processing apparatus of one form according to the present disclosure determines the contribution ratio of a predetermined pixel or a predetermined region in the depth calculation of each of the plurality of pixels or the plurality of regions included in the input image. It includes a contribution ratio calculation unit for calculating, and a correction unit for correcting the depth value of the predetermined pixel or the predetermined region based on the contribution ratio.
  • FIG. It is a figure which shows an example of a stereo image. It is an enlarged view of a part range of the reference image shown in FIG. It is a figure which shows the state that the pseudo depth occurred. It is a template image of 3 ⁇ 3 in length ⁇ width. It is a template image of 7 ⁇ 7 in length ⁇ width. This is an example in which a pair of image plane phase difference pixels is arranged in 14 ⁇ 14 pixels. It is a figure which shows the corrected depth image corrected by the method shown in this embodiment. It is a figure which shows the structural example of the image processing apparatus which concerns on Embodiment 1. FIG. It is a figure which shows the structural example of the parallax calculation part. It is a figure which shows the structural example of the depth correction part.
  • Embodiment 1 2-1. Configuration of image processing device 2-2. Operation of image processing device 3. Embodiment 2 (correction based on correction strength) 3-1. Configuration of image processing device 3-2. Operation of image processing device 4. Embodiment 3 (calculation of correction strength based on uneven distribution) 4-1. Configuration of image processing device 4-2. Operation of image processing device 5. Modification example 6.
  • the image processing apparatus 10 of the present embodiment generates a depth image based on a stereo image in stereo image processing or a phase difference detection signal (image plane phase difference pixel) in image plane phase difference AF (Image Plane Phase Detection Autofocus). It is a device that (or calculates the depth value).
  • the image processing apparatus 10 of the present embodiment uses a depth image or depth value generated based on a stereo image or a phase difference detection signal (image plane phase difference pixel) in calculation of the depth value (hereinafter referred to as depth calculation). By correcting using the contribution ratio of each pixel, the pseudo depth generated during the depth calculation is corrected. As a result, it is possible to improve the accuracy of applications such as foreground and background extraction and refocusing processing using depth images.
  • the technique described in this embodiment is a technique for correcting an output result calculated based on comparison of image signals represented by template matching or the like. More specifically, this technique is a technique for correcting an output result erroneously estimated by the apparatus when the output value of the image signal used for calculating the output result is not uniform. Therefore, the present technology has an advantage that it can be widely applied to various tasks in the field of computer vision for calculating the output from the comparison of image signals. In addition to depth estimation, this technology can be used to correct the output results of various tasks such as optical flow estimation and object detection / tracking.
  • the method of finding the distance from a captured image represented by stereo image processing does not require alignment between the captured image and the depth image that is the distance estimation result, and does not require additional hardware other than the camera. Widely used in the field of vision.
  • FIG. 1 is a diagram showing an example of a stereo image.
  • the image processing device calculates the amount of parallax between the reference image and the reference image input as the stereo image, and calculates the distance to the target based on the calculated parallax amount by the principle of triangulation.
  • Template matching has been used for a long time to calculate the amount of parallax because of the advantage that it can be closely associated.
  • the image processing device sets an image around a pixel (hereinafter referred to as a target pixel) for which a depth value is calculated as a template image (a template image of a reference image shown in FIG. 1), and an image corresponding to the template image.
  • a region template image of the reference image shown in FIG. 1 is searched from the reference image.
  • the evaluation value calculation used as the index of association in template matching is performed on the assumption that the pixels in the template image are at the same distance, the target pixel of the template image and the area other than the target pixel (peripheral pixel). ) And the depth calculation breaks down when the distance is different.
  • FIG. 2 is an enlarged view of a part of the reference image shown in FIG. Specifically, FIG. 2 is an enlarged view of the range A1 of the reference image shown in FIG.
  • the texture region having abundant image features and the flat region having less abundant image features are at different distances in the depth direction.
  • the left hand of the teddy bear is the texture area
  • the wall behind the teddy bear is the flat area. The two are separated in the depth direction.
  • the target pixel is in the flat area and a part of the peripheral pixels is in the texture area.
  • the image features of the peripheral pixels affect the depth determination in the process of calculating the evaluation value
  • the depth of the target pixel position in the flat region is erroneously estimated as the depth of the texture region.
  • a phenomenon occurs in which a pseudo depth different from the original depth is assigned as the depth of the target pixel position.
  • FIG. 3 is a diagram showing a state in which pseudo depth is generated.
  • the depth of the target pixel which should be originally located on the wall behind the teddy bear, is erroneously estimated as the depth of the left hand of the teddy bear.
  • the left hand whose tip should be on the line L1 extends to the line L2.
  • FIG. 4A is a template image of 3 ⁇ 3 in length ⁇ width.
  • FIG. 4B is a template image having a length ⁇ width of 7 ⁇ 7.
  • One cell in the figure is one pixel.
  • the template image shown in FIG. 4A is composed of, for example, a Bayer-arranged R, G, and B 3 ⁇ 3 pixel group.
  • the template image shown in FIG. 4B is composed of, for example, a Bayer-arranged 7 ⁇ 7 pixel group of R, G, and B.
  • the phase shift becomes maximum when the depths of the peripheral pixels of the template image are erroneously assigned to the target pixels.
  • the pseudo-depth generation range can be described by the following equation (1) using the floor function.
  • R is the length of one side of the template image.
  • the deviation of 1 pixel and 3 pixels is the generation range of the pseudo depth, respectively.
  • Pseudo-depth occurs not only in distance estimation based on stereo images (depth calculation), but also in distance estimation based on image plane phase difference pixels (depth calculation).
  • depth calculation distance estimation based on image plane phase difference pixels
  • the range of occurrence of the pseudo depth generated by the distance estimation based on the image plane phase difference pixels will be described.
  • the signal obtained from the array of pairs of image plane phase difference pixels that shield the left and right pixels on the image sensor is regarded as the template image of the stereo matching reference image and the reference image to determine the distance.
  • the distance of the subject is the distance at which the array group of paired signals matches the image plane phase difference pixels most.
  • the pair of image plane phase difference pixels is not limited to a pair of pixels that shield each of the left and right pixels, and may be, for example, a pair of pixels provided with slits at symmetrical positions.
  • FIG. 5 shows an example in which a pair of image plane phase difference pixels is arranged in 14 ⁇ 14 pixels.
  • One cell in the figure is one pixel.
  • one cell in the figure is, for example, any of the Bayer-arranged pixels of R, G, and B.
  • the center pixel position of the pair of image plane phase difference pixels is set as the signal detection position.
  • the image processing apparatus may erroneously allocate the depth of the pixels within the range of the thick frame in FIG.
  • (M1) Depth correction method using smoothing and optimization using the captured image as a reference image For example, a method using a filter using the signal similarity of the captured image to correct the depth image, or a Markov random field (Markov). A method using an optimization method assuming Random Field) is assumed.
  • a method using the above-mentioned filter for example, a joint bilateral filter (for example, Patent Document 1), a method for speeding up the joint bilateral filter (for example, Non-Patent Document 1), and a method using a domain transform filter (non-patent document 1).
  • Patent Document 2 Further, as a method using a Markov random field, there is a method using a graph cut (Patent Document 2) and a method using a probability propagation method (Belief Propagation) (Non-Patent Document 3).
  • both methods have the effect of rearranging the depth boundaries along the image structure of the captured image to be referenced, but they are smoothed and optimized based on the misestimated depth, so the correct depth is obtained. Is not expected to be obtained.
  • the size of the template image tends to be set wide, and the erroneous estimation area becomes wide. , It is expected that this issue will become prominent.
  • (M2) Depth correction method using the reliability of the depth For example, when correcting the depth by filtering using the signal similarity of the captured image or weighted averaging, in addition to the feature amount calculated from the captured image, A method for improving the accuracy of correction (for example, Patent Document 3) is assumed by using the reliability of the output depth as a weight. By using image features such as the evaluation value of template matching when determining the depth and the edge gradient of the captured image as the reliability of the depth, it is assumed that highly accurate correction using a highly reliable and stable depth will be realized. Will be done.
  • the reliability in the mis-estimated area where the flat area and the texture area are mixed in the template image to be corrected is higher than when the template image is composed of the flat area. Since it is assumed that the degree is high, it is assumed that the misestimated depth caused by the template matching targeted by this embodiment cannot be corrected.
  • the image processing device 10 of the present embodiment executes the following processing.
  • the image processing device 10 targets an output result calculated by comparing image signals represented by template matching or the like, and an erroneous estimation result that occurs when regions in which different output values are expected coexist in the template image. To correct.
  • the image processing device 10 corrects the pseudo depth that occurs in the case where pixels at different distances are mixed in the template image.
  • the image processing device 10 corrects the pseudo-depth erroneously estimated in the flat region when the texture region and the flat region at different distances exist in the template image.
  • the image processing device 10 executes the following processing.
  • the image processing device 10 calculates the contribution rate indicating the degree of influence of each pixel in the template image when the depth of the target pixel is calculated in order to correct the pseudo depth generated by the template matching. Then, the image processing device 10 distributes the depth of the target pixel to each pixel in the template image based on the calculated contribution ratio.
  • FIG. 6 is a diagram showing a corrected depth image corrected by the method shown in the present embodiment.
  • the depth of the left hand of the teddy bear that has extended to the line L2 has receded to the line L1 that should have been in the example of FIG.
  • the pseudo depth can be reduced by using the method shown in the present embodiment.
  • Embodiment 1 The outline of the present embodiment has been described above, but the image processing apparatus 10 according to the first embodiment will be described in detail below.
  • the image processing device 10 calculates the depth value based on the stereo image, but of course, the image processing device 10 may calculate the depth value based on the image plane phase difference pixels. Good.
  • the image processing device 10 shall calculate the depth value of each pixel of the input image (for example, the captured image).
  • the target pixel for which the depth value is calculated may be each pixel of the captured luminance image, or may be each image plane phase difference pixel discretely arranged in the image sensor.
  • the image processing device 10 may calculate the depth value of a predetermined region of the input image instead of the depth value of each pixel.
  • the image processing apparatus 10 may use a region represented by one pair of image plane retardation pixels (for example, a region of 14 ⁇ 14 pixels in the example of FIG. 5) as a depth value calculation target. This deformation can be applied not only when the depth value is calculated based on the image plane retardation pixel, but also when the depth value is calculated based on the stereo image.
  • the calculation target of the depth value is not a pixel but an area, the description of "pixel" appearing in the following description is appropriately replaced with "area".
  • FIG. 7 is a diagram showing a configuration example of the image processing device 10 according to the first embodiment.
  • the image processing device 10 is a device having an image processing function. Specific examples of the image processing device 10 include a mobile phone, a smart device (smartphone or tablet), a camera (for example, a digital still camera, a digital video camera), a PDA (Personal Digital Assistant), and a personal computer.
  • the image processing device 10 may be a car navigation device, a head-up display, a navigation display, an M2M (Machine to Machine) device, or an IoT (Internet of Things) device.
  • the image processing device 10 may be a device mounted on these devices (for example, an image processing processor).
  • the image processing device 10 may be a device mounted on a moving body.
  • the image processing device 10 is a system that supports maneuvering (driving) of a moving body (for example, an automatic braking system (also referred to as a collision avoidance system, a collision damage mitigation system, or an automatic stop system), a danger detection system, and tracking. It may be a device that constitutes a part of a system (a system, a car navigation system, etc.), or a device that constitutes a part of a system (for example, an automatic driving system) that controls autonomous traveling of a moving body.
  • the image processing device 10 may simply be a device that constitutes a part of a system that controls the traveling of the moving body.
  • the image processing device 10 may be a system itself that supports maneuvering (driving) of a moving body, or may be a system itself that controls autonomous traveling of the moving body. Of course, the image processing device 10 may be the system itself that controls the traveling of the moving body. Further, the image processing device 10 may be a moving body itself.
  • the moving body may be a moving body (for example, a vehicle such as a car, a bicycle, a bus, a truck, a motorcycle, a train, a linear motor car, etc.) that moves on land (ground in a narrow sense), or in the ground. It may be a moving body (eg, a subway) that moves (eg, in a tunnel). Further, the moving body may be a moving body moving on water (for example, a ship such as a passenger ship, a cargo ship, or a hovercraft), or a moving body moving underwater (for example, a submersible, a submarine, an unmanned submarine, etc.). Submersible).
  • a moving body for example, a vehicle such as a car, a bicycle, a bus, a truck, a motorcycle, a train, a linear motor car, etc.
  • the moving body may be a moving body moving on water (for example, a ship such as a passenger ship, a cargo ship, or a hovercraft), or a
  • the moving body may be a moving body moving in the atmosphere (for example, an aircraft such as an airplane, an airship, or a drone), or a moving body moving outside the atmosphere (for example, an artificial satellite, a spaceship, or a space station).
  • An artificial celestial body such as a spacecraft).
  • the concept of an aircraft includes not only heavy aircraft such as airplanes and gliders, but also light aircraft such as balloons and airships.
  • the concept of an aircraft includes not only heavy aircraft and light aircraft, but also rotary-wing aircraft such as helicopters and autogyros.
  • the aircraft station device (or the aircraft on which the aircraft station device is mounted) may be an unmanned aerial vehicle such as a drone.
  • the image processing device 10 is not limited to a system that controls autonomous driving of a moving body, which constitutes a part or all of a system that supports the running of a moving body, and is, for example, one of a systems for surveying and monitoring. It may be a device that constitutes a part or the whole.
  • the image processing device 10 includes an input / output unit 11, an imaging unit 12, a storage unit 13, and a control unit 14.
  • the configuration shown in FIG. 7 is a functional configuration, and the hardware configuration may be different from this. Further, the functions of the image processing device 10 may be distributed and mounted in a plurality of physically separated devices.
  • the input / output unit 11 is a user interface for exchanging information with the user.
  • the input / output unit 11 is an operation device for the user to perform various operations such as a keyboard, a mouse, operation keys, and a touch panel.
  • the input / output unit 11 is a display device such as a liquid crystal display (Liquid Crystal Display) or an organic EL display (Organic Electroluminescence Display).
  • the input / output unit 11 may be an audio device such as a speaker or a buzzer.
  • the input / output unit 11 may be a lighting device such as an LED (Light Emitting Diode) lamp.
  • the input / output unit 11 functions as an input / output means (input means, output means, operation means, or notification means) of the image processing device 10.
  • the input / output unit 11 may be a communication interface for communicating with another device.
  • the input / output unit 11 may be a network interface or a device connection interface.
  • the input / output unit 11 may be a LAN (Local Area Network) interface such as a NIC (Network Interface Card), or a USB interface composed of a USB (Universal Serial Bus) host controller, a USB port, or the like. You may.
  • the input / output unit 11 may be a wired interface or a wireless interface.
  • the input / output unit 11 functions as a communication means of the image processing device 10.
  • the input / output unit 11 communicates with another device according to the control of the control unit 14.
  • the imaging unit 12 is a camera provided with an image sensor that images an object.
  • the image pickup unit 12 may be a camera capable of capturing a still image or a camera capable of capturing a moving image.
  • the imaging unit 12 is, for example, a stereo camera.
  • the imaging unit 12 may be a monocular camera.
  • the image pickup unit 12 may have an image sensor in which image plane retardation pixels are discretely embedded.
  • the image pickup unit 12 functions as an image pickup means of the image processing device 10.
  • the storage unit 13 is a storage device capable of reading and writing data such as a DRAM (Dynamic Random Access Memory), a SRAM (Static Random Access Memory), a flash memory, and a hard disk.
  • the storage unit 13 functions as a storage means for the image processing device 10.
  • the storage unit 13 stores, for example, an image captured by the imaging unit 12 (for example, a luminance image) and a depth image generated by the parallax calculation unit 142 or the like described later.
  • the control unit 14 is a controller that controls each unit of the image processing device 10.
  • the control unit 14 is realized by, for example, a processor such as a CPU (Central Processing Unit) or an MPU (Micro Processing Unit).
  • the control unit 14 may be configured to control an image processor that executes a depth correction process described later outside the control unit 14, or may be configured to be able to execute the depth correction process itself.
  • the function of the control unit 14 is realized, for example, by executing various programs stored in the storage device inside the image processing device 10 by the processor using a RAM (Random Access Memory) or the like as a work area.
  • the control unit 14 may be realized by an integrated circuit such as an ASIC (Application Specific Integrated Circuit) or an FPGA (Field Programmable Gate Array).
  • the CPU, MPU, ASIC, and FPGA can all be regarded as controllers.
  • the control unit 14 includes an acquisition unit 141, a parallax calculation unit 142, a depth correction unit 143, and an output control unit 144.
  • Each block (acquisition unit 141 to output control unit 144) constituting the control unit 14 is a functional block indicating the function of the control unit 14.
  • These functional blocks may be software blocks or hardware blocks.
  • each of the above-mentioned functional blocks may be one software module realized by software (including a microprocessor), or may be one circuit block on a semiconductor chip (die).
  • each functional block may be one processor or one integrated circuit.
  • the method of configuring the functional block is arbitrary.
  • the control unit 14 may be configured in a functional unit different from the above-mentioned functional block.
  • the depth image is generated by the parallax calculation unit 142, and the depth image is corrected by the depth correction unit 143.
  • the functional block included in the parallax calculation unit 142 and the depth correction unit 143 may be one software module realized by software or one circuit block on a semiconductor chip. Of course, each functional block may be one processor or one integrated circuit. The method of configuring the functional block is arbitrary.
  • the parallax calculation unit 142 and the depth correction unit 143 may be configured in functional units different from the functional blocks shown below.
  • the parallax calculation unit 142 calculates the depth value of each pixel (or each region) of the captured image (hereinafter, referred to as depth calculation), and generates a depth image based on the depth value.
  • FIG. 8 is a diagram showing a configuration example of the parallax calculation unit 142.
  • the parallax calculation unit 142 includes a template image determination unit 142a, an evaluation value calculation unit 142b, and a parallax determination unit 142c.
  • the template image determination unit 142a acquires an captured image from the storage unit 13.
  • the captured image may be acquired by the acquisition unit 141 from the imaging unit 12, or may be acquired by the acquisition unit 141 from an external device via the input / output unit 11.
  • the template image determination unit 142a determines the calculation range of the evaluation value. Then, the evaluation value calculation unit 142b calculates the evaluation value. Then, the parallax determination unit 142c generates a depth image based on the evaluation value.
  • the parallax calculation unit 142 may generate a depth image by a conventional method, or may generate a depth image by a method different from the conventional method.
  • the depth correction unit 143 corrects the depth image generated by the parallax calculation unit 142 and generates a corrected depth image. At this time, the depth correction unit 143 calculates the corrected depth value by correcting the depth value calculated by the parallax calculation unit 142. Then, the depth correction unit 143 generates a correction depth image based on the correction depth value.
  • FIG. 9 is a diagram showing a configuration example of the depth correction unit 143.
  • the depth correction unit 143 includes a contribution ratio calculation unit 143a and a correction unit 143b.
  • the contribution rate calculation unit 143a acquires an captured image from the storage unit 13 and also acquires a depth image corresponding to the captured image.
  • the depth image may be generated by the parallax calculation unit 142, or may be acquired by the acquisition unit 141 from an external device via the input / output unit 11.
  • the contribution ratio calculation unit 143a calculates the contribution ratio of the target pixel (or target region) in the depth calculation of each of the plurality of pixels (or a plurality of regions) included in the input image (captured image).
  • the correction unit 143b corrects the depth value of the target pixel (or target region) based on the contribution rate calculated by the contribution rate calculation unit 143a. Then, the correction unit 143b generates a correction depth image based on the correction depth value.
  • the image processing device 10 executes a depth correction process for correcting the depth image.
  • the depth correction process is executed by the depth correction unit 143 of the image processing device 10.
  • FIG. 10 is a diagram showing an example of an input signal input to the depth correction unit 143 and a correction depth image output from the depth correction unit 143.
  • the captured image and the depth image corresponding to the captured image are input to the depth correction unit 143 as an input signal.
  • the depth image may be generated by the parallax calculation unit 142 by the depth calculation.
  • the depth correction unit 143 outputs a depth rearrangement image as a correction depth image.
  • FIG. 11 is a flowchart showing the depth correction process according to the first embodiment.
  • the depth correction process is executed by the depth correction unit 143.
  • the depth correction unit 143 starts the depth correction process when, for example, the depth image and the captured image are input.
  • the processing shown below may be partially or completely realized by software (program) or may be realized by a hardware circuit.
  • the case of stereo image processing will be described as an example, but the application of the present embodiment is not limited to stereo image processing.
  • the contribution rate calculation unit 143a of the depth correction unit 143 acquires the depth image and the captured image (step S101).
  • the captured image may include a reference image and a reference image.
  • the contribution ratio calculation unit 143a instead of the parallax calculation unit 142, may determine the depth of the target pixel i by template matching.
  • the parallax calculation unit 142 may determine the depth of the target pixel i.
  • the target pixel i is a pixel for which the depth value is calculated, and is, for example, the i-th pixel among a plurality of pixels included in the reference image.
  • the contribution rate calculation unit 143a calculates the contribution rate based on at least one image of the reference image and the reference image.
  • the contribution rate calculation unit 143a calculates the contribution rate of the target pixel in the depth calculation of each of the plurality of pixels included in the captured image (step S102).
  • the contribution rate calculation unit calculates the contribution rate of the target pixel based on the feature amount of each of the plurality of pixels included in the captured image.
  • the contribution rate calculation unit 143a may calculate the contribution rate based on at least one image of the reference image and the reference image.
  • the feature amount indicates the feature of the image. Taking the image of FIG. 2 as an example, for example, the feature amount of the pixel in the flat region is a small value, and the feature amount of the pixel in the texture region is a large value. Become. Of course, the features of the feature amount are not limited to this example. For example, the feature amount may be such that the feature amount becomes larger as the pixel is located at the edge portion in the image.
  • the contribution rate calculation unit 143a may calculate the feature amount based on at least one image of the reference image and the reference image.
  • the feature amount is, for example, edge strength.
  • the contribution rate calculation unit 143a determines the contribution rate of the target pixel based on the edge strength of each of a plurality of pixels (for example, the target pixel and eight pixels adjacent to the target pixel) in a predetermined range including the target pixel i. May be calculated.
  • the contribution ratio calculation unit 143a calculates the intensity of the edge of each pixel j in the template image (for example, a predetermined range of the reference image including the target pixel i) used when determining the depth value in the target pixel i. Then, the contribution ratios Ri and j are calculated according to the strength of the edge.
  • the contribution ratios R i and j indicate the contribution ratio of the pixel j in determining the depth value of the target pixel i.
  • the contribution rate calculation unit 143a calculates the contribution rates R i and j by the following equation (3).
  • I j is the edge strength of the pixel j.
  • the edge strength may be, for example, a strength calculated using a Sobel filter, a Prewitt filter, a first-order differential filter, a Laplacian filter, or the Canny method, or these are calculated in the direction perpendicular to the stereo epipolar line. It may be strong.
  • the method for calculating the edge strength is not limited to these, and various known methods can be adopted. Of course, the contribution ratio calculation unit 143a may calculate the edge strength by using a unique edge calculation method.
  • the contribution rate calculation unit 143a calculates the contribution rate in determining the depth value of the pixel (hereinafter referred to as pixel j) in which the target pixel i itself is involved for all the target pixels i.
  • the contribution ratio of the target pixel i in determining the depth value of the pixel j is R j, i by exchanging i and j of Ri , j shown in the equation (3).
  • the size and shape of the predetermined range for calculating the contribution rate are not limited to the size and shape of 3 ⁇ 3 in length ⁇ width. The size and shape of the predetermined range can be appropriately changed according to the process of step S103 described later.
  • the correction unit 143b calculates the correction depth value for all the target pixels i based on the contribution rate and the depth image. Then, the correction unit 143b generates a correction depth image (depth rearrangement image) based on the correction depth value (step S103).
  • the correction unit 143b has a correction depth value Y i 'obtained by correcting the depth value Y i of the target pixel i, may be calculated by the following equation (4).
  • the image composed of the corrected depth value Y i ′ becomes the corrected depth image (depth rearranged image).
  • FIG. 12 is an explanatory diagram for explaining the depth rearrangement.
  • N represents the number of pixels j (including the target pixel i) involved in the calculation of the depth value of the target pixel i among the pixels in the template image T1.
  • Y j indicates the depth value of the pixel j (j ⁇ N).
  • the depth value of the target pixel i is calculated from the pixels in the range of 3 ⁇ 3 (template image T2 shown in FIG. 12) centered on the target pixel i. Therefore, in the example of FIG. 12, N is 9.
  • the template image T2 shown in FIG. 12 is an image in a range smaller than the template image T1 located in the template image T1, and the number of pixels thereof is M.
  • the template image T2 falls within a predetermined range in the above-mentioned contribution rate calculation.
  • the template image T2 is an image having a size and shape of 3 ⁇ 3, so M is 9.
  • the size and shape of the template image T2 are not limited to the size and shape shown in FIG. M does not necessarily have to be 9. Not only the template image T2 but also the size and shape of the template image T1 can be arbitrarily changed. N does not necessarily have to be 9.
  • the contribution ratios R j and i indicate the contribution ratio of the pixel i in determining the depth value Y j of the pixel j .
  • the contribution ratios Rj and i will be described with reference to FIGS. 13A to 13I.
  • 13A to 13I are diagrams for explaining contribution ratios Rj and i .
  • the correspondence between the value of j and the position of the pixel j does not necessarily have to be the relationship shown in FIGS. 13A to 13I.
  • FIG. 13A is a diagram for explaining contribution ratios R j and i when j is 1.
  • the depth value Y j of the pixel j is determined by the nine pixels of the template image T2 shown in gray in the figure.
  • the contribution ratio of the pixel i in determining the depth value Y j is R 1, i .
  • FIG. 13B is a diagram for explaining contribution ratios R j and i when j is 2.
  • the depth value Y j of the pixel j is determined by the nine pixels of the template image T2 shown in gray in the figure.
  • the contribution ratio of the pixel i in determining the depth value Y j is R 2, i .
  • FIG. 13C is a diagram for explaining contribution ratios R j and i when j is 3.
  • the depth value Y j of the pixel j is determined by the nine pixels of the template image T2 shown in gray in the figure.
  • the contribution ratio of the pixel i in determining the depth value Y j is R 3, i .
  • FIG. 13D is a diagram for explaining contribution ratios R j and i when j is 4.
  • the depth value Y j of the pixel j is determined by the nine pixels of the template image T2 shown in gray in the figure.
  • the contribution ratio of the pixel i in determining the depth value Y j is R 4, i .
  • FIG. 13E is a diagram for explaining contribution ratios R j and i when j is 5.
  • the depth value Y j of the pixel j is determined by the nine pixels of the template image T2 shown in gray in the figure.
  • the contribution ratio of the pixel i in determining the depth value Y j is R 5, i .
  • FIG. 13F is a diagram for explaining contribution ratios R j and i when j is 6.
  • the depth value Y j of the pixel j is determined by the nine pixels of the template image T2 shown in gray in the figure.
  • the contribution ratio of the pixel i in determining the depth value Y j is R 6, i .
  • FIG. 13G is a diagram for explaining contribution ratios R j and i when j is 7.
  • the depth value Y j of the pixel j is determined by the nine pixels of the template image T2 shown in gray in the figure.
  • the contribution ratio of the pixel i in determining the depth value Y j is R 7, i .
  • FIG. 13H is a diagram for explaining contribution ratios R j and i when j is 8.
  • the depth value Y j of the pixel j is determined by the nine pixels of the template image T2 shown in gray in the figure.
  • the contribution ratio of the pixel i in determining the depth value Y j is R8 , i .
  • FIG. 13I is a diagram for explaining contribution ratios R j and i when j is 9.
  • the depth value Y j of the pixel j is determined by the nine pixels of the template image T2 shown in gray in the figure.
  • the contribution ratio of the pixel i in determining the depth value Y j is R 9, i .
  • the correction unit 143b calculates the correction depth value Y i ′ of the target pixel i based on the contribution ratios R j and i . More specifically, as shown in the above equation (4), the correction unit 143b sets the correction depth value Y i ′ of the target pixel i as the weight of the contribution ratios R j and i to N pixels j ( Calculated based on the weighted average of (including the target pixel i).
  • the method of calculating the correction depth value Y i ′ of the target pixel i is not limited to the above method.
  • the correction unit 143b sets the correction depth value Y i ′ of the target pixel i as N pixels j (target pixel i) with the contribution ratios R j and i as weights. It may be calculated based on the weighted median of.).
  • FIG. 14 is a diagram showing a depth image and a corrected depth image obtained by correcting the depth image.
  • the output control unit 144 of the image processing device 10 controls the input / output unit 11 to output a corrected depth image.
  • the correction unit 143b completes the depth correction process.
  • the image processing device 10 corrects the depth value of the target pixel i based on the contribution ratio of the target pixel i in the depth calculation of each of the plurality of pixels j included in the captured image.
  • the contribution ratio of the target pixel i itself is high in the calculation of the depth value of the target pixel i (for example, when the target pixel i is in the texture region)
  • the depth value of the target pixel i is maintained.
  • the contribution ratio of the target pixel i is low in the calculation of the depth value of the target pixel i (for example, when the target pixel i is in a flat region near the texture area)
  • the target pixel is calculated in the depth value.
  • the value is corrected in the direction of inheriting the depth values of other pixels in the vicinity where the contribution rate of i is high.
  • the image processing apparatus 10 can generate a highly accurate depth image (corrected depth image) with less pseudo depth.
  • Embodiment 2 (correction based on correction strength) >> Next, the image processing device 10 of the second embodiment will be described.
  • the proposed rearrangement technique has a denoise effect due to rearrangement in the non-subject boundary region in addition to the phase correction effect in the subject boundary region, but this smoothing effect has an adverse effect of blurring the depth image.
  • the pseudo depth can be reduced, but as can be seen from FIG. 14, the output corrected depth image may be an image that is totally blurred. Therefore, we propose a method for suppressing the above-mentioned depth blur by limiting the processing to the subject area where the phase retrieval effect is expected.
  • the image processing device 10 calculates the correction intensity (correction intensity image) and reduces the output blur by controlling the correction of the correction depth value using the calculated correction intensity (correction intensity image).
  • the correction intensity image is an image of the correction intensity of each pixel.
  • the correction intensity is, for example, a value indicating the weight of the composition for each pixel when the depth image and the correction depth image (depth rearrangement image) are combined.
  • the correction intensity is high at the location (pixels) where the depth image is better, and the correction intensity is low at the location (pixel) where the correction depth image is better.
  • the image processing device 10 of the second embodiment reduces output blur by controlling the composition of the depth image and the corrected depth image by using the correction intensity.
  • the correction strength will be described in detail later.
  • Image processing device configuration First, the configuration of the image processing device 10 of the second embodiment will be described.
  • the configuration of the image processing apparatus 10 of the second embodiment is the same as that of the image processing apparatus 10 of the first embodiment shown in FIGS. 7 and 8, but the configuration of the depth correction unit 143 is partially the depth of the first embodiment. It is different from the correction unit 143.
  • the depth correction unit 143 of the second embodiment corrects the depth image generated by the parallax calculation unit 142 and generates a corrected depth image, similarly to the depth correction unit 143 of the first embodiment. At this time, the depth correction unit 143 calculates the corrected depth value by correcting the depth value calculated by the parallax calculation unit 142. Then, the depth correction unit 143 generates a correction depth image (depth rearrangement image) based on the correction depth value. Further, the depth correction unit 143 acquires the updated correction depth image by updating the correction depth image (depth rearrangement image) based on the correction intensity.
  • the "updated corrected depth image" is a kind of corrected depth image.
  • FIG. 15 is a diagram showing a configuration example of the depth correction unit 143.
  • the depth correction unit 143 includes a contribution ratio calculation unit 143a, a correction unit 143b, and a correction strength calculation unit 143c.
  • the correction intensity calculation unit 143c acquires a captured image from the storage unit 13 and also acquires a depth image corresponding to the captured image.
  • the depth image may be generated by the parallax calculation unit 142, or may be acquired by the acquisition unit 141 from an external device via the input / output unit 11.
  • the correction strength calculation unit 143c calculates the correction strength based on the captured image. The calculation method of the correction strength will be described in detail later.
  • the contribution rate calculation unit 143a calculates the contribution rate of the target pixel (or target area) in the depth calculation of each of the plurality of pixels (or a plurality of areas) included in the input image (captured image). Then, the correction unit 143b corrects the depth value of the target pixel (or target region) based on the contribution rate calculated by the contribution rate calculation unit 143a. Then, the correction unit 143b generates a correction depth image (depth rearrangement image) based on the correction depth value. Further, the correction unit 143b acquires the updated correction depth image by updating the correction depth image (depth rearrangement image) based on the correction intensity.
  • the configuration other than the depth correction unit 143 is the same as that of the image processing device 10 of the first embodiment.
  • FIG. 16 is a flowchart showing the depth correction process according to the second embodiment.
  • the depth correction process shown in FIG. 16 is executed by the depth correction unit 143 of the image processing device 10.
  • the depth correction unit 143 includes a correction strength calculation unit 143c for calculating the correction strength.
  • the correction unit 143b of the depth correction unit 143 acquires the updated correction depth image by updating the correction depth image (depth rearrangement image) based on the correction strength calculated by the correction intensity calculation unit 143c.
  • FIG. 17 is a diagram showing how the correction unit 143b updates the correction depth image.
  • the correction unit 143b acquires an updated correction depth image (phase correction image) by ⁇ -blending the depth image and the depth rearrangement image using the correction intensity.
  • the correction intensity is a coefficient for ⁇ -blending the depth image and the depth rearranged image.
  • the depth correction unit 143 starts the depth correction process when, for example, the depth image and the captured image are input.
  • the processing shown below may be partially or completely realized by software (program) or may be realized by a hardware circuit.
  • stereo image processing will be described as an example, but the application of the present embodiment is not limited to stereo image processing.
  • the correction intensity calculation unit 143c of the depth correction unit 143 acquires the depth image and the captured image (step S201).
  • the captured image may include a reference image and a reference image.
  • the correction strength computing section 143c calculates the correction intensity W i of the target pixel i on the basis of the captured image (step S202). For example, the correction strength computing section 143c calculates the correction intensity W i based on the feature amount of the pixel i.
  • the feature amount is, for example, edge strength.
  • the correction strength Wi is calculated based on the edge strength of the target pixel i.
  • the correction strength computing section 143c calculates the correction intensity W i by the following equation (6).
  • I i ' is the normalized edge intensity between the edge intensity I i of the target pixel i from 0 1.
  • Edge intensities I i comprising the calculated source edge intensity I i ', for example, Sobel filter or Prewitt filter, primary differential filter, Laplacian filter, may be a strength calculated using the Canny method, these The intensity may be calculated perpendicular to the stereo epipolar line.
  • the method of calculating the edge intensity I i is not limited thereto, and can employ various well-known methods.
  • the correction strength calculation unit 143c may calculate the edge strength I i using a unique edge calculation method.
  • Correction intensity W i shown in equation (6) when the target pixel i is on the edge becomes a small value, a large value if the target pixel i is remote from the edge.
  • the correction depth image may be a sharper image.
  • Correction intensity calculation unit 143c calculates the correction intensity W i for all the target pixel i. At this time, a correction intensity image may be generated based on the calculated correction intensity.
  • the correction intensity image is an image of the correction intensity of each pixel.
  • the contribution rate calculation unit 143a calculates the contribution rate of the target pixel in the depth calculation of each of the plurality of pixels included in the captured image (step S203). Then, the correction unit 143b calculates the correction depth value for all the target pixels i based on the contribution rate and the depth image. Then, the correction unit 143b generates a correction depth image (depth rearrangement image) based on the correction depth value (step S204).
  • the processing of steps S203 and S204 may be the same as the processing of steps S102 and S103 of the first embodiment.
  • the correction unit 143b updates the correction depth image using the correction intensity image and the depth image (step S205). For example, the correction unit 143b updates the correction depth image by ⁇ -blending the depth image and the correction depth image using the correction intensity image.
  • the correction depth value Y i' a correction depth value of the target pixel i in the correction depth image Y i of the update results in a correction depth value Y i ", for example, the following equation (7) Can be calculated by
  • the correction unit 143b updates the corrected depth image based on the corrected depth value Y i ".
  • the output control unit 144 of the image processing device 10 controls the input / output unit 11 to output the updated corrected depth image.
  • the correction unit 143b completes the depth correction process.
  • the correction unit 143b may expand the correction depth image (depth rearrangement image) generated in step S204 once into a buffer and then blend it with the depth image, or buffer the correction depth image (depth rearrangement image).
  • the corrected depth value Y i ′′ may be applied directly to the depth image without expanding.
  • the image processing device 10 since the image processing device 10 updates the corrected depth image (depth rearranged image) based on the correction intensity, a sharp corrected depth image can be generated.
  • Embodiment 3 (calculation of correction strength based on uneven distribution) >> Next, the image processing apparatus 10 of the third embodiment will be described.
  • the output corrected depth image may be an image that is totally blurred.
  • a phenomenon may occur in which a part of the foreground depth is scraped.
  • FIG. 18 is a diagram for explaining a problem that occurs in the corrected depth image. As you can see from FIG. 18, it can be seen that a part of the head of the teddy bear has been scraped. It is considered that this is because the foreground depth (true) is pulled by the double edge and the background depth (false) is invaded.
  • the double edge means, for example, a state in which different edges are included in the template image T2. For example, it refers to a state in which two edges, top and bottom or left and right, run on the template image T2.
  • the image processing apparatus 10 calculates the correction intensity W i on the basis of the feature amount of deviation in the template image T2 (localized level).
  • the image processing apparatus 10 when the feature quantity of the template image T2 is biased (e.g., when the edge is not running only one in the template image T2) to strengthen the correction intensity W i, template image
  • the correction strength Wi is weakened.
  • the image processing apparatus 10 of the third embodiment reduces the error at the double edge by controlling the composition of the depth image and the corrected depth image by using the correction intensity calculated in this way.
  • Image processing device configuration First, the configuration of the image processing device 10 of the third embodiment will be described.
  • the configuration of the image processing device 10 of the third embodiment is the same as that of the image processing device 10 of the second embodiment, but the function of the depth correction unit 143 is partially different from that of the depth correction unit 143 of the second embodiment.
  • the depth correction unit 143 of the third embodiment includes a contribution ratio calculation unit 143a, a correction unit 143b, and a correction strength calculation unit 143c, similarly to the depth correction unit 143 of the second embodiment shown in FIG.
  • the correction intensity calculation unit 143c acquires a captured image from the storage unit 13 and also acquires a depth image corresponding to the captured image.
  • the depth image may be generated by the parallax calculation unit 142, or may be acquired by the acquisition unit 141 from an external device via the input / output unit 11.
  • the correction strength calculation unit 143c calculates the correction strength based on the captured image. The calculation method of the correction strength will be described in detail later.
  • the contribution rate calculation unit 143a calculates the contribution rate of the target pixel (or target area) in the depth calculation of each of the plurality of pixels (or a plurality of areas) included in the input image (captured image). Then, the correction unit 143b corrects the depth value of the target pixel (or target region) based on the contribution rate calculated by the contribution rate calculation unit 143a. Then, the correction unit 143b generates a depth rearrangement image (correction depth image) based on the correction depth value. Further, the correction unit 143b generates a phase correction image (updated correction depth image) by updating the depth rearrangement image (correction depth image) based on the correction intensity.
  • a phase-corrected image is a type of corrected depth image.
  • the configuration other than the depth correction unit 143 is the same as that of the image processing device 10 of the second embodiment.
  • FIG. 19 is a flowchart showing the depth correction process according to the third embodiment.
  • the depth correction process shown in FIG. 19 is executed by the depth correction unit 143 of the image processing device 10.
  • the depth correction unit 143 includes a correction strength calculation unit 143c for calculating the correction strength.
  • the correction unit 143b of the depth correction unit 143 updates the phase correction image (updated correction depth image) by updating the depth rearrangement image (correction depth image) based on the correction intensity calculated by the correction intensity calculation unit 143c. Generate.
  • FIG. 20 is a diagram showing how the correction unit 143b generates a phase correction image.
  • the correction unit 143b generates a phase correction map based on the gradient map (edge image) of the captured image.
  • this phase correction map becomes a correction intensity image.
  • the correction unit 143b generates a phase correction image by ⁇ -blending the depth image and the depth rearrangement image using the correction intensity (correction intensity image).
  • the correction intensity is a coefficient for ⁇ -blending the depth image and the depth rearranged image.
  • the depth correction unit 143 starts the depth correction process when, for example, the depth image and the captured image are input.
  • the processing shown below may be partially or completely realized by software (program) or may be realized by a hardware circuit.
  • stereo image processing will be described as an example, but the application of the present embodiment is not limited to stereo image processing.
  • the correction intensity calculation unit 143c of the depth correction unit 143 acquires the depth image and the captured image (step S301).
  • the captured image may include a reference image and a reference image.
  • the correction strength computing section 143c calculates the correction intensity W i of the target pixel i on the basis of the captured image (step S302).
  • the correction strength computing section 143c is a correction intensity W i on the basis of and the "feature amount of deviation in the template image T2 used for depth calculation of the target pixel i (uneven distribution of)""characteristic quantity of the target pixel i" calculate.
  • the “feature amount of the target pixel i” is, for example, the edge strength I i of the target pixel i.
  • the feature amount of deviation in the template image T2 used for depth calculation of the target pixel i is a deviation D i of the edge in the template image T2 used for depth calculation of the target pixel i.
  • Deviation D i of the edge can be calculated by the following equation (8).
  • M is the same as M shown in the first embodiment. That is, M is the number of pixels of the template image T2. In the example of FIG. 12, M is 9.
  • (x j , y j ) indicates the relative position of the pixel j in the template image T2 of the target pixel i with respect to the target pixel i.
  • the contribution ratios R i and j indicate the contribution ratio of the pixel j in determining the depth value Y i of the pixel i .
  • the contribution ratios Ri and j will be described with reference to FIGS. 21A to 21I.
  • 21A to 21I are diagrams for explaining contribution ratios Ri and j .
  • the correspondence between the value of j and the position of the pixel j does not necessarily have to be the relationship shown in FIGS. 21A to 21I.
  • FIG. 21A is a diagram for explaining contribution ratios Ri and j when j is 1.
  • the depth value Y i of the pixel i is determined by the nine pixels of the template image T2 shown in gray in the figure.
  • the relative position (x j , y j ) of the pixel j is (-1, 1), and the contribution ratio of the pixel j in determining the depth value Y i is R i, 1 .
  • 21B is a diagram for j to explain the contribution ratio R i, j when the 2.
  • the depth value Y i of the pixel i is determined by the nine pixels of the template image T2 shown in gray in the figure.
  • the relative position (x j , y j ) of the pixel j is (0, 1)
  • the contribution ratio of the pixel j in determining the depth value Y i is R i, 2 .
  • Figure 21C is a diagram for explaining the contribution ratio R i, j when the j is 3.
  • the depth value Y i of the pixel i is determined by the nine pixels of the template image T2 shown in gray in the figure.
  • the relative position (x j , y j ) of the pixel j is (1,1)
  • the contribution ratio of the pixel j in determining the depth value Y i is R i, 3 .
  • Figure 21D is a diagram for j to explain the contribution ratio R i, j when the 4.
  • the depth value Y i of the pixel i is determined by the nine pixels of the template image T2 shown in gray in the figure.
  • the relative position (x j , y j ) of the pixel j is (-1,0), and the contribution ratio of the pixel j in determining the depth value Y i is R i, 4 .
  • Figure 21E is a diagram for j to explain the contribution ratio R i, j when the 5.
  • the depth value Y i of the pixel i is determined by the nine pixels of the template image T2 shown in gray in the figure.
  • the relative position (x j , y j ) of the pixel j is (0,0)
  • the contribution ratio of the pixel j in determining the depth value Y i is R i, 5 .
  • Figure 21F is a diagram for explaining the contribution ratio R i, j when the j is 6.
  • the depth value Y i of the pixel i is determined by the nine pixels of the template image T2 shown in gray in the figure.
  • the relative position (x j , y j ) of the pixel j is (1,0)
  • the contribution ratio of the pixel j in determining the depth value Y i is R i, 6 .
  • Figure 21G is a diagram for explaining the contribution ratio R i, j when the j is 7.
  • the depth value Y i of the pixel i is determined by the nine pixels of the template image T2 shown in gray in the figure.
  • the relative position (x j , y j ) of the pixel j is (-1, -1), and the contribution ratio of the pixel j in determining the depth value Y i is R i, 7 .
  • Figure 21H is a diagram for explaining the contribution ratio R i, j when the j is 8.
  • the depth value Y i of the pixel i is determined by the nine pixels of the template image T2 shown in gray in the figure.
  • the relative position (x j , y j ) of the pixel j is (0, -1), and the contribution ratio of the pixel j in determining the depth value Y i is R i, 8 .
  • Figure 21I is a diagram for explaining the contribution ratio R i, j when the j is 9.
  • the depth value Y i of the pixel i is determined by the nine pixels of the template image T2 shown in gray in the figure.
  • the relative position (x j , y j ) of the pixel j is (1, -1), and the contribution ratio of the pixel j in determining the depth value Y i is R i, 9 .
  • Correction intensity calculation unit 143c calculates the correction intensity W i on the basis of the deviation D i of the edge strength and the edge of the target pixel i. For example, the correction strength computing section 143c calculates the correction intensity W i by the following equation (9).
  • I i ' is the normalized edge intensity between the edge intensity I i of the target pixel i from 0 1.
  • Edge intensities I i comprising the calculated source edge intensity I i ', for example, Sobel filter or Prewitt filter, primary differential filter, Laplacian filter, may be a strength calculated using the Canny method, these The intensity may be calculated perpendicular to the stereo epipolar line.
  • the method of calculating the edge intensity I i is not limited thereto, and can employ various well-known methods.
  • the correction strength calculation unit 143c may calculate the edge strength I i using a unique edge calculation method.
  • Correction intensity W i shown in equation (9) becomes a large value when the characteristic amounts of the template image T2 in determining the depth value Y i of the target pixel i was biased, the feature amount of the template image T2 is It is a small value when it is not biased (for example, when there are double edges or when there are no edges).
  • Correction intensity calculation unit 143c calculates the correction intensity W i for all the target pixel i. At this time, a correction intensity image may be generated based on the calculated correction intensity.
  • the contribution rate calculation unit 143a calculates the contribution rate of the target pixel in the depth calculation of each of the plurality of pixels included in the captured image (step S303). Then, the correction unit 143b calculates the correction depth value for all the target pixels i based on the contribution rate and the depth image. Then, the correction unit 143b generates a correction depth image (depth rearrangement image) based on the correction depth value (step S304).
  • the processing of steps S203 and S204 may be the same as the processing of steps S102 and S103 of the first embodiment.
  • the correction unit 143b updates the correction depth image using the correction intensity image and the depth image (step S305). For example, the correction unit 143b updates the correction depth image by ⁇ -blending the depth image and the correction depth image using the correction intensity image.
  • the correction depth value Y i' a correction depth value of the target pixel i in the correction depth image Y i corrected depth value Y i is the result of updating "is calculated by the above equation (7) It is possible.
  • FIG. 22 is a diagram showing a depth image and a phase-corrected image obtained by correcting the depth image.
  • the output control unit 144 of the image processing device 10 controls the input / output unit 11 to output a phase-corrected image.
  • the correction unit 143b completes the depth correction process.
  • the correction unit 143b may expand the correction depth image (depth rearrangement image) generated in step S304 once into a buffer and then blend it with the depth image, or buffer the correction depth image (depth rearrangement image).
  • the corrected depth value Y i ′′ may be applied directly to the depth image without expanding.
  • FIG. 23 is a diagram showing a part of the depth rearranged image and a part of the phase correction image corresponding to the part. As can be seen from FIG. 23, it can be seen that in the depth rearranged image, a part of the head was cut off, but in the phase correction image, it is improved. Moreover, it can be seen that the pseudo depth is not generated in the left hand part, and the pseudo depth reduction effect is maintained. Moreover, it can be seen that the image is sharp and the output blur is reduced.
  • the image processing device 10 generates a depth image (corrected depth image) by inputting a still image.
  • the image processing device 10 may generate a depth image (corrected depth image) by inputting a moving image.
  • the image processing apparatus 10 a correction intensity W i of the target pixel i described in Embodiment 2 and 3, further, by using the calculated depth edge map E using the target image and the image before and after the frame You may calculate.
  • the depth edge map E for example, the method of Aleksander Holynski and Johannes Kopf, Fast depth densification for occlusion-aware augmented reality, ACM Transactions on Graphics (TOG), Vol. 37, 2018. can be used. ..
  • the image processing device 10 can calculate the depth edge map E by calculating the optical flow between the target image and the front and rear frames and adding the gradient intensity of the calculated optical flow.
  • the depth edge map E it becomes possible to efficiently select only the edges having the depth difference from the edges of the image, and it is applied only to the image area aiming at the effect of the present embodiment. Therefore, it is possible to improve the correction accuracy.
  • the contribution rate calculation unit 143a calculates the contribution rate based on the feature amount such as the edge strength, but based on the sum of the feature amounts of each of the plurality of pixels of the template image T2 including the target pixel i.
  • the contribution rate may be calculated.
  • the contribution rate calculation unit 143a calculates the contribution rate based on the edge strength, but the method of calculating the contribution rate is not limited to the method using the edge strength.
  • the captured image is assumed to be a stereo image including a reference image and a reference image.
  • the contribution rate calculation unit 143a is a matching evaluation value indicating the degree of matching between the template image (predetermined range) of the reference image including the target pixel i and the template image (corresponding range) of the reference image corresponding to the template image. May be used as a feature amount to calculate the contribution rate.
  • the control device that controls the image processing device 10 of the present embodiment may be realized by a dedicated computer system or a general-purpose computer system.
  • a program for executing the above operation (for example, depth correction processing, etc.) is stored and distributed in a computer-readable recording medium such as an optical disk, a semiconductor memory, a magnetic tape, or a flexible disk.
  • the control device is configured by installing the program on a computer and executing the above-mentioned processing.
  • the control device may be an external device (for example, a personal computer) of the image processing device 10 or an internal device (for example, a control unit 14) of the image processing device 10.
  • the above communication program may be stored in a disk device provided in a server device on a network such as the Internet so that it can be downloaded to a computer or the like.
  • the above-mentioned functions may be realized by collaboration between the OS (Operating System) and the application software.
  • the part other than the OS may be stored in a medium and distributed, or the part other than the OS may be stored in the server device so that it can be downloaded to a computer or the like.
  • each component of each device shown in the figure is a functional concept, and does not necessarily have to be physically configured as shown in the figure. That is, the specific form of distribution / integration of each device is not limited to the one shown in the figure, and all or part of the device is functionally or physically dispersed / physically distributed in arbitrary units according to various loads and usage conditions. It can be integrated and configured.
  • the present embodiment includes a device or any configuration constituting the system, for example, a processor as a system LSI (Large Scale Integration), a module using a plurality of processors, a unit using a plurality of modules, a unit, and the like. It can also be implemented as a set or the like (that is, a part of the configuration of the device) to which the above functions are added.
  • a processor as a system LSI (Large Scale Integration)
  • a module using a plurality of processors a unit using a plurality of modules, a unit, and the like.
  • a unit that is, a part of the configuration of the device
  • the system means a set of a plurality of components (devices, modules (parts), etc.), and it does not matter whether all the components are in the same housing. Therefore, a plurality of devices housed in separate housings and connected via a network, and a device in which a plurality of modules are housed in one housing are both systems. ..
  • the present embodiment can have a cloud computing configuration in which one function is shared by a plurality of devices via a network and jointly processed.
  • regions in which different output values are expected are mixed in the template image for the output result calculated by comparing image signals represented by template matching or the like. It is possible to correct the erroneous estimation result that occurs in the case of. For example, in the case of stereo image processing, it is possible to correct the pseudo depth that occurs when pixels at different distances are mixed in the template image. Specifically, when there are texture regions and flat regions at different distances in the template image, it is possible to correct the pseudo depth that is erroneously estimated in the flat region.
  • This embodiment can be applied to applications such as foreground / background extraction and refocusing processing using a depth image. Further, the present embodiment can be widely applied to the correction of the output result calculated by comparing the image signals, and can correct the output result such as optical flow estimation and object detection.
  • the present technology can also have the following configurations.
  • a contribution rate calculation unit that calculates the contribution rate of a predetermined pixel or a predetermined area in the depth calculation of each of a plurality of pixels or a plurality of areas included in the input image
  • a correction unit that corrects the depth value of the predetermined pixel or the predetermined region based on the contribution rate is provided.
  • Image processing device (2)
  • the contribution rate calculation unit calculates the contribution rate of the predetermined pixel in the depth calculation of each of the plurality of pixels in the predetermined range of the input image including the predetermined pixel.
  • the correction unit calculates the correction depth value of the predetermined pixel based on the contribution ratio of the predetermined pixel in the depth calculation of each of the plurality of pixels in the predetermined range.
  • the correction unit is based on a weighted average of the depth values of the plurality of pixels, weighted by the contribution ratio of the predetermined pixels in the depth calculation of each of the plurality of pixels in the predetermined range. Calculate the corrected depth value of the depth value of The image processing apparatus according to (2) above.
  • the correction unit is based on a weighted median of the depth values of the plurality of pixels, which is weighted by the contribution ratio of the predetermined pixels in the depth calculation of each of the plurality of pixels in the predetermined range. Calculate the corrected depth value of the depth value of The image processing apparatus according to (2) above.
  • the contribution ratio calculation unit calculates the contribution ratio of the predetermined region in the depth calculation of each of the plurality of regions of the predetermined range of the input image including the predetermined region.
  • the correction unit calculates the correction depth value of the predetermined region based on the contribution ratio of the predetermined region in the depth calculation of each of the plurality of regions in the predetermined range.
  • the image processing apparatus according to (1) above.
  • the correction unit is based on a weighted average of the depth values of the plurality of regions, weighted by the contribution rate of the predetermined region in the depth calculation of each of the plurality of regions in the predetermined range. Calculate the corrected depth value of the depth value of The image processing apparatus according to (5) above.
  • the correction unit is based on the weighted median of the depth values of the plurality of regions, which is weighted by the contribution ratio of the predetermined regions in the depth calculation of each of the plurality of regions in the predetermined range. Calculate the corrected depth value of the depth value of The image processing apparatus according to (5) above.
  • the correction intensity is a coefficient for ⁇ -blending the depth image and the correction depth image.
  • the correction strength calculation unit calculates the correction strength based on the feature amounts of each of the plurality of pixels included in the input image.
  • (11) The correction intensity calculation unit calculates the correction intensity based on the bias of the feature amount within a predetermined range of the input image including the predetermined pixel.
  • (12) The correction strength calculation unit calculates the correction strength based on the feature amounts of each of the plurality of regions included in the input image.
  • (13) The correction strength calculation unit calculates the correction strength based on the bias of the feature amount within a predetermined range of the input image including the predetermined region.
  • the contribution ratio calculation unit calculates the contribution ratio of the predetermined pixel or the predetermined region based on the feature amounts of the plurality of pixels or the plurality of regions included in the input image.
  • the image processing apparatus according to any one of (1) to (13).
  • the feature amount is edge strength.
  • the contribution rate calculation unit calculates the contribution rate of the predetermined pixel based on the edge strength of each of a plurality of pixels in a predetermined range of the input image including the predetermined pixel.
  • the image processing apparatus according to (14) above.
  • the input image is a stereo image including a first image as a reference image and a second image as a reference image.
  • the contribution calculation unit calculates the feature amount based on at least one image of the first image and the second image.
  • the contribution rate calculation unit calculates the contribution rate based on the sum of the feature amounts of each of a plurality of pixels in a predetermined range of the input image including the predetermined pixel.
  • the input image is a stereo image including a first image as a reference image and a second image as a reference image.
  • the contribution rate calculation unit features a matching evaluation value indicating a degree of matching between a predetermined range of the first image including the predetermined pixel and a corresponding range of the second image corresponding to the predetermined range. Calculate the contribution rate as an amount,

Landscapes

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

Abstract

画像処理装置は、入力画像に含まれる複数の画素或いは複数の領域それぞれのデプス計算での所定の画素或いは所定の領域の寄与率を算出する寄与率演算部と、寄与率に基づいて前記所定の画素或いは前記所定の領域のデプス値を補正する補正部と、を備える。

Description

画像処理装置、及び画像処理方法
 本開示は、画像処理装置、及び画像処理方法に関する。
 ステレオ画像や像面位相差画素からデプス値を算出する技術が知られている。デプス値は、例えば、撮像装置から被写体までの距離である。デプス値の算出にステレオ画像を使用するのであれば、画像処理装置は、例えば、ステレオ画像として入力される基準画像と参照画像との視差量を算出し、算出した視差量を基に三角測量の原理で対象までの距離を算出する。
特開2004-139219号公報 特開2017-27101号公報 国際公開第2013/145554号
Jonathan T Barron and Ben Poole, "The fast bilateral solver", In European Conference on Computer Vision (ECCV), pages 617-632, Springer International Publishing, 2016 E.S.L.Gastal and M.M.Oliveira, "Domain transform for edge-aware image and video processing", ACM Transactions on Graphics, vol.30, no.4, 2011 J.Sun, N.Zheng, and H.Y.Shum, "Stereo matching using belief propagation", IEEE Transactions on Pattern Analysis and Machine Intelligence, vol.25, no.7, pp.787-800, 2003
 しかしながら、従来の方法では、場合によって、精度の高いデプス値或いはデプス画像が得られない恐れがある。例えば、ステレオ画像や像面位相差画素を使ったデプス値の算出方法の場合、1画素のデプス値の算出に、デプス値の算出対象となる画素の周囲にある複数画素の値を使用する。しかしながら、この方法では、複数画素が同一距離にあるとの仮定の下でデプス値を算出しているため、複数画素の中に異なる距離の画素が混じっている場合に、精度の高いデプス値が算出されない恐れがある。
 そこで、本開示では、精度の高いデプス値或いはデプス画像を取得可能な画像処理装置、及び画像処理方法を提案する。
 上記の課題を解決するために、本開示に係る一形態の画像処理装置は、入力画像に含まれる複数の画素或いは複数の領域それぞれのデプス計算での所定の画素或いは所定の領域の寄与率を算出する寄与率演算部と、前記寄与率に基づいて前記所定の画素或いは前記所定の領域のデプス値を補正する補正部と、を備える。
ステレオ画像の一例を示す図である。 図1の示す基準画像の一部範囲の拡大図である。 擬似デプスが発生した様子を示す図である。 縦×横が3×3のテンプレート画像である。 縦×横が7×7のテンプレート画像である。 14×14画素に1組の像面位相差画素のペアを配置した例である。 本実施形態で示す方法により補正された補正デプス画像を示す図である。 実施形態1に係る画像処理装置の構成例を示す図である。 視差演算部の構成例を示す図である。 デプス補正部の構成例を示す図である。 デプス補正部に入力される入力信号とデプス補正部から出力される補正デプス画像の例を示す図である。 実施形態1に係るデプス補正処理を示すフローチャートである。 デプス再配置を説明するための説明図である。 寄与率を説明するための図である。 寄与率を説明するための図である。 寄与率を説明するための図である。 寄与率を説明するための図である。 寄与率を説明するための図である。 寄与率を説明するための図である。 寄与率を説明するための図である。 寄与率を説明するための図である。 寄与率を説明するための図である。 デプス画像とそのデプス画像を補正した補正デプス画像を示す図である。 デプス補正部の構成例を示す図である。 実施形態2に係るデプス補正処理を示すフローチャートである。 補正部が補正デプス画像を更新する様子を示す図である。 補正デプス画像に生じる問題を説明するための図である。 実施形態3に係るデプス補正処理を示すフローチャートである。 補正部が位相補正画像を生成する様子を示す図である。 寄与率を説明するための図である。 寄与率を説明するための図である。 寄与率を説明するための図である。 寄与率を説明するための図である。 寄与率を説明するための図である。 寄与率を説明するための図である。 寄与率を説明するための図である。 寄与率を説明するための図である。 寄与率を説明するための図である。 デプス画像とそのデプス画像を補正した位相補正画像を示す図である。 デプス再配置画像の一部とその部分に対応する位相補正画像の一部を示す図である。
 以下に、本開示の実施形態について図面に基づいて詳細に説明する。なお、以下の各実施形態において、同一の部位には同一の符号を付することにより重複する説明を省略する。
 以下に示す項目順序に従って本開示を説明する。
  1.はじめに
  2.実施形態1
   2-1.画像処理装置の構成
   2-2.画像処理装置の動作
  3.実施形態2(補正強度に基づく補正)
   3-1.画像処理装置の構成
   3-2.画像処理装置の動作
  4.実施形態3(偏在度に基づく補正強度の算出)
   4-1.画像処理装置の構成
   4-2.画像処理装置の動作
  5.変形例
  6.むすび
<<1.はじめに>>
 本実施形態の画像処理装置10は、ステレオ画像処理におけるステレオ画像、或いは像面位相差AF(Image Plane Phase Detection Autofocus)における位相差検出信号(像面位相差画素)に基づいて、デプス画像を生成(或いはデプス値を算出)する装置である。本実施形態の画像処理装置10は、ステレオ画像或いは位相差検出信号(像面位相差画素)に基づいて生成したデプス画像或いはデプス値を、デプス値の計算(以下、デプス計算という。)での各画素の寄与率を用いて補正することで、デプス計算の際に生じた疑似デプスを補正する。これにより、デプス画像を用いた前景、背景抽出やリフォーカシング処理などのアプリケーションの高精度化を実現できる。
 本実施形態で説明する技術(以下、本技術という。)は、テンプレートマッチングなどに代表される画像信号の比較に基づき演算した出力結果を補正する技術である。より具体的には、本技術は、出力結果の計算に使用した画像信号の出力値が均一でない場合に、装置が誤って推定した出力結果を補正する技術である。そのため、本技術には、画像信号の比較から出力を計算するコンピュータビジョン分野の様々なタスクに広く適用可能な利点がある。本技術は、デプス推定以外にも、オプティカルフロー推定や、物体検出・追跡などの様々なタスクの出力結果の補正に利用可能である。
 以下、本実施形態の画像処理装置10の詳細な説明に入る前に、本実施形態の概要を述べる。
 ステレオ画像処理に代表される撮影画像から距離を求める手法は、撮影画像と距離推定結果であるデプス画像との位置合わせが不要なことや、カメラ以外の追加のハードウェアが不要なことから、コンピュータビジョン分野で広く用いられている。
 図1は、ステレオ画像の一例を示す図である。ステレオ画像処理の場合、画像処理装置は、ステレオ画像として入力された基準画像と参照画像との視差量を計算し、計算した視差量を基に三角測量の原理で対象までの距離を計算する。
 視差量の計算には、密に対応付けが可能な利点から、テンプレートマッチング(ブロックマッチング)が古くから用いられている。例えば、画像処理装置は、デプス値の計算対象となる画素(以下、対象画素という。)の周辺の画像をテンプレート画像(図1に示す基準画像のテンプレート画像)とし、そのテンプレート画像に対応する画像領域(図1に示す参照画像のテンプレート画像)を参照画像の中から探索する。
 しかしながら、テンプレートマッチングで対応付けの指標とする評価値計算は、テンプレート画像内の画素が同一距離であるとの仮定の下で行われるため、テンプレート画像の対象画素と対象画素以外の領域(周辺画素)とが異なる距離である場合にデプス計算が破綻する。
 図2は、図1の示す基準画像の一部範囲の拡大図である。具体的には、図2は、図1の示す基準画像の範囲A1の拡大図である。例えば、図2に示すように、画像特徴量が豊富なテクスチャ領域と画像特徴量があまり豊富でない平坦領域とが奥行き方向で異なる距離にあるとする。図2の例では、熊のぬいぐるみの左手がテクスチャ領域であり、熊のぬいぐるみの背後の壁が平坦領域である。両者は奥行き方向で離間している。
 ここで、対象画素が平坦領域にあり、その周辺画素の一部がテクスチャ領域にあるとする。このような場合、評価値計算の過程で、周辺画素の画像特徴がデプス決定に影響するため、平坦領域にある対象画素位置のデプスが、テクスチャ領域のデプスと誤推定される。そうなると、本来のデプスとは異なる疑似デプスが対象画素位置のデプスとして割り当てられる現象が発生する。
 図3は、擬似デプスが発生した様子を示す図である。図3の例では、本来、熊のぬいぐるみの背後の壁に位置するはずの対象画素のデプスが、熊のぬいぐるみの左手のデプスと誤推定されていることが分かる。図3の例では、本来、その先端がラインL1上にあるはずの左手が、ラインL2にまで広がっている。
 以上、擬似デプスが発生原理について簡単に述べたが、以下、テンプレートマッチングにおける、疑似デプスの発生範囲とテンプレート画像サイズとの関係を説明する。
 図4Aは、縦×横が3×3のテンプレート画像である。また、図4Bは、縦×横が7×7のテンプレート画像である。図中の1つのセルが1画素である。図4Aに示したテンプレート画像は、例えば、ベイヤー配列されたR、G、Bの3×3の画素群で構成される。また、図4Bに示したテンプレート画像は、例えば、ベイヤー配列されたR、G、Bの7×7の画素群で構成される。
 テンプレートマッチングにより、テンプレート画像の各画素位置のデプスをテンプレート画像中心の対象画素でのデプスとして割り振る場合を考える。この場合、テンプレート画像の周囲画素のデプスを、対象画素に誤って割り振った場合に位相ズレが最大となる。この発生し得る位相ズレの最大値を疑似デプスの発生範囲とすると、疑似デプスの発生範囲は、床関数を用いて以下の式(1)のように記述できる。
Figure JPOXMLDOC01-appb-M000001
 ここで、Rは、テンプレート画像の一辺の長さである。図4Aと図4Bの例では、それぞれ1画素と3画素のズレが、疑似デプスの発生範囲となる。
 なお、擬似デプスは、ステレオ画像に基づく距離推定(デプス計算)のみならず、像面位相差画素に基づく距離推定(デプス計算)でも同様に発生する。以下、像面位相差画素に基づく距離推定で発生する疑似デプスの発生範囲について説明する。
 カメラのフォーカス合わせ等で用いられる距離推定として、近年、像面位相差画素を用いた距離推定が広く採用されている。像面位相差画素を用いた距離推定が広く採用される理由としては、ミラー構造を排除したコンパクトな設計が可能な点が一例として挙げられる。本距離推定では、例えば、イメージセンサ上の画素の左右をそれぞれ遮蔽した像面位相差画素のペアの配列から得られる信号を、ステレオマッチングの基準画像と参照画像のテンプレート画像とみなして距離を決定する。異なる距離にフォーカスした際の信号組の対応付けが、ステレオマッチングの視差探索に相当し、像面位相差画素もペア信号の配列群が最も一致した距離を被写体の距離とする。なお、像面位相差画素のペアは、左右それぞれを遮蔽した画素のペアに限定されず、例えば、左右対称位置にスリットを設けた画素のペアであってもよい。
 像面位相差画素は、イメージセンサ上に離散的に配置されため、像面位相差画素を用いた距離推定では、ステレオマッチングでの距離推定時よりも疑似デプスが拡大する特性がある。図5は、14×14画素に1組の像面位相差画素のペアを配置した例である。図中の1つのセルが1画素である。図5の例では、図中の1つのセルは、例えば、ベイヤー配列されたR、G、Bのいずれかの画素である。理解を容易にするため、像面位相差画素のペアの中心画素位置を信号検出位置とする。この場合、画像処理装置は、像面位相差画素を用いた距離検出では、図5の太枠の範囲内の画素のデプスを、誤って対象画素に割り振る可能性がある。つまり、T×Tの範囲に1組配置した像面位相差画素のペアを、R×R組用いてデプスを計算する場合、疑似デプスの発生範囲は以下の式(2)のように記述できる。
Figure JPOXMLDOC01-appb-M000002
 これを解決する手法として、例えば以下の(M1)と(M2)に示した手法が想定され得る。
 (M1)撮影画像を参照画像とした平滑化や最適化を用いたデプス補正手法
 例えば、デプス画像の補正に、撮影画像の信号の類似度を利用したフィルタを用いる手法や、マルコフ確率場(Markov Random Field)を仮定した最適化手法を用いる手法が想定される。前述のフィルタを用いた手法として、例えば、ジョイントバイラテラルフィルタ(例えば、特許文献1)やそれを高速化した手法(例えば、非特許文献1)、及び、ドメイントランスフォームフィルタを用いた手法(非特許文献2)がある。また、マルコフ確率場を用いた手法に、グラフカットを用いた手法(特許文献2)や確率伝播法(Belief Propagation)を用いた手法(非特許文献3)がある。
 しかし、いずれの手法も、参照する撮影画像の画像構造に沿ってデプスの境界が再配置される効果があるものも、誤推定したデプスをもとに平滑化、最適化されるため、正しいデプスが得られないと想定される。特に、高ノイズ環境下でのデプス推定や、位相差画素間隔の広い位相差画素情報を用いたデプス推定では、テンプレート画像のサイズを広く設定する傾向があり、誤推定領域が広域化することから、本課題が顕著になると想定される。
 (M2)デプスの信頼度を用いたデプス補正手法
 例えば、前述の撮影画像の信号の類似度を利用したフィルタリングや加重平均によりデプスを補正する際に、撮影画像から計算した特徴量に加えて、出力したデプスの信頼度を重みとして利用することで、補正の高精度化を図る手法(例えば、特許文献3)が想定される。デプスを決定した際のテンプレートマッチングの評価値や撮影画像のエッジ勾配などの画像特徴量をデプスの信頼度として用いることで、信頼度が高く安定したデプスを用いた高精度な補正が実現すると想定される。しかし、信頼度に評価値を利用した場合も、テンプレート画像が平坦領域で構成されている場合よりも、補正対象とするテンプレート画像に平坦領域とテクスチャ領域が混在している誤推定領域での信頼度が高いことが想定されるため、本実施形態がターゲットとするテンプレートマッチングにより生じた誤推定デプスを補正することができないと想定される。
 そこで、本実施形態の画像処理装置10は、以下の処理を実行する。
 例えば、画像処理装置10は、テンプレートマッチングなどに代表される画像信号の比較により計算した出力結果を対象に、テンプレート画像内に異なる出力値が期待される領域が混在する場合に発生する誤推定結果を補正する。例えば、ステレオ画像処理の場合は、画像処理装置10は、テンプレート画像内に異なる距離にある画素が混在するケースで発生する疑似デプスを補正する。例えば、画像処理装置10は、テンプレート画像内に、異なる距離にあるテクスチャ領域と平坦領域が存在する場合に、平坦領域で誤推定された疑似デプスを補正する。
 具体的には、画像処理装置10は、以下の処理を実行する。
 例えば、画像処理装置10は、テンプレートマッチングで発生した疑似デプスを補正するために、対象画素のデプスを計算した際のテンプレート画像内の各画素の影響度を示す寄与率を計算する。そして、画像処理装置10は、計算した寄与率に基づき、対象画素のデプスをテンプレート画像内の各画素に分配する。
 これにより、テンプレート画像内の画素でデプス計算に寄与した画素にデプスが再配置され、疑似デプスが低減される。図6は、本実施形態で示す方法により補正された補正デプス画像を示す図である。上述の図3の例で、ラインL2にまで広がっていた熊のぬいぐるみの左手のデプスが、図6の例では、本来あるべきラインL1にまで後退していることが分かる。図3と図6とを比較すれば分かるように、本実施形態で示す方法を使用することにより、疑似デプスの低減が実現される。
<<2.実施形態1>>
 以上、本実施形態の概要を述べたが、以下、実施形態1に係る画像処理装置10について詳細に説明する。
 なお、以下の説明では、画像処理装置10はステレオ画像に基づいてデプス値を算出するものとするが、勿論、画像処理装置10は、像面位相差画素に基づいてデプス値を算出してもよい。
 また、以下の説明では、理解を容易にするため、画像処理装置10は入力画像(例えば、撮像画像)の各画素のデプス値を算出するものとする。このとき、デプス値の算出対象となる対象画素は、撮像された輝度画像の各画素であってもよいし、イメージセンサに離散的に配置された各像面位相差画素であってもよい。
 なお、画像処理装置10は、各画素のデプス値ではなく、入力画像の所定の領域のデプス値を算出してもよい。例えば、画像処理装置10は、像面位相差画素のペア1つが代表する領域(例えば、図5の例では、14×14画素の領域)をデプス値の算出対象としてもよい。この変形は、像面位相差画素に基づいてデプス値を算出する場合のみならず、ステレオ画像に基づいてデプス値を算出する場合にも適用可能である。デプス値の算出対象を画素ではなく領域とする場合、以下の説明で登場する「画素」の記載は適宜「領域」に置き換える。
<2-1.画像処理装置の構成>
 最初に、実施形態1の画像処理装置10の構成を説明する。
 図7は、実施形態1に係る画像処理装置10の構成例を示す図である。画像処理装置10は、画像の処理機能を備えた装置である。画像処理装置10の具体例としては、例えば、携帯電話、スマートデバイス(スマートフォン、又はタブレット)、カメラ(例えば、デジタルスチルカメラ、デジタルビデオカメラ)PDA(Personal Digital Assistant)、及びパーソナルコンピュータが挙げられる。なお、画像処理装置10は、カーナビゲーション装置、ヘッドアップディスプレイ、ナビゲーションディスプレイ、M2M(Machine to Machine)デバイス、又はIoT(Internet of Things)デバイスであってもよい。画像処理装置10はこれらの装置に搭載される装置(例えば、画像処理プロセッサ)であってもよい。
 また、画像処理装置10は、移動体に搭載される装置であってもよい。このとき、画像処理装置10は、移動体の操縦(運転)をサポートするシステム(例えば、自動ブレーキシステム(衝突回避システム、衝突被害軽減システム、又は自動停止システムともいう。)、危険検知システム、追従システム、カーナビケーションシステム等)の一部を構成する装置であってもよいし、移動体の自律走行を制御するシステム(例えば、自動運転システム)の一部を構成する装置であってもよい。勿論、画像処理装置10は、単に、移動体の走行を制御するシステムの一部を構成する装置であってもよい。なお、画像処理装置10は、移動体の操縦(運転)をサポートするシステムそのものであってもよいし、移動体の自律走行を制御するシステムそのものであってもよい。勿論、画像処理装置10は、移動体の走行を制御するシステムそのものであってもよい。また、画像処理装置10は、移動体そのものであってもよい。
 ここで、移動体は、陸上(狭義の地上)を移動する移動体(例えば、自動車、自転車、バス、トラック、自動二輪車、列車、リニアモーターカー等の車両)であってもよいし、地中(例えば、トンネル内)を移動する移動体(例えば、地下鉄)であってもよい。また、移動体は、水上を移動する移動体(例えば、旅客船、貨物船、ホバークラフト等の船舶)であってもよいし、水中を移動する移動体(例えば、潜水艇、潜水艦、無人潜水機等の潜水船)であってもよい。また、移動体は、大気圏内を移動する移動体(例えば、飛行機、飛行船、ドローン等の航空機)であってもよいし、大気圏外を移動する移動体(例えば、人工衛星、宇宙船、宇宙ステーション、探査機等の人工天体)であってもよい。
 なお、航空機という概念には、飛行機、グライダー等の重航空機のみならず、気球、飛行船等の軽航空機も含まれる。また、航空機という概念には、重航空機や軽航空機のみならず、ヘリコプターやオートジャイロ等の回転翼機も含まれる。なお、航空機局装置(又は、航空機局装置が搭載される航空機)は、ドローン等の無人航空機であってもよい。
 なお、画像処理装置10は、移動体の走行をサポートするシステムの一部又は全部を構成する装置移動体の自律走行を制御するシステムに限らず、例えば、測量や監視を目的とするシステムの一部又は全部を構成する装置であってもよい。
 画像処理装置10は、図7に示すように、入出力部11と、撮像部12と、記憶部13と、制御部14と、を備える。なお、図7に示した構成は機能的な構成であり、ハードウェア構成はこれとは異なっていてもよい。また、画像処理装置10の機能は、複数の物理的に分離された装置に分散して実装されてもよい。
 入出力部11は、ユーザと情報をやりとりするためのユーザインタフェースである。例えば、入出力部11は、キーボード、マウス、操作キー、タッチパネル等、ユーザが各種操作を行うための操作装置である。又は、入出力部11は、液晶ディスプレイ(Liquid Crystal Display)、有機ELディスプレイ(Organic Electroluminescence Display)等の表示装置である。入出力部11は、スピーカー、ブザー等の音響装置であってもよい。また、入出力部11は、LED(Light Emitting Diode)ランプ等の点灯装置であってもよい。入出力部11は、画像処理装置10の入出力手段(入力手段、出力手段、操作手段又は通知手段)として機能する。
 入出力部11は、他の装置と通信するための通信インタフェースであってもよい。このとき、入出力部11は、ネットワークインタフェースであってもよいし、機器接続インタフェースであってもよい。例えば、入出力部11は、NIC(Network Interface Card)等のLAN(Local Area Network)インタフェースであってもよいし、USB(Universal Serial Bus)ホストコントローラ、USBポート等により構成されるUSBインタフェースであってもよい。なお、入出力部11は、有線インタフェースであってもよいし、無線インタフェースであってもよい。入出力部11は、画像処理装置10の通信手段として機能する。入出力部11は、制御部14の制御に従って他の装置と通信する。
 撮像部12は、物体を撮像するイメージセンサを備えたカメラである。撮像部12は、静止画が撮像可能なカメラであってもよいし、動画が撮像可能なカメラであってもよい。撮像部12は、例えば、ステレオカメラである。なお、撮像部12は、単眼カメラであってもよい。撮像部12は、像面位相差画素が離散的に埋め込まれたイメージセンサを有していてもよい。撮像部12は、画像処理装置10の撮像手段として機能する。
 記憶部13は、DRAM(Dynamic Random Access Memory)、SRAM(Static Random Access Memory)、フラッシュメモリ、ハードディスク等のデータ読み書き可能な記憶装置である。記憶部13は、画像処理装置10の記憶手段として機能する。記憶部13には、例えば、撮像部12で撮像された画像(例えば、輝度画像)や、後述の視差演算部142等で生成されたデプス画像が格納される。
 制御部14は、画像処理装置10の各部を制御するコントローラ(Controller)である。制御部14は、例えば、CPU(Central Processing Unit)、MPU(Micro Processing Unit)等のプロセッサにより実現される。制御部14は、制御部14の外部にある後述のデプス補正処理を実行するイメージプロセッサを制御するよう構成されていてもよいし、自身がデプス補正処理を実行可能に構成されていてよい。制御部14の機能は、例えば、画像処理装置10内部の記憶装置に記憶されている各種プログラムを、プロセッサがRAM(Random Access Memory)等を作業領域として実行することにより実現される。なお、制御部14は、ASIC(Application Specific Integrated Circuit)やFPGA(Field Programmable Gate Array)等の集積回路により実現されてもよい。CPU、MPU、ASIC、及びFPGAは何れもコントローラとみなすことができる。
 制御部14は、取得部141と、視差演算部142と、デプス補正部143と、出力制御部144と、を備える。制御部14を構成する各ブロック(取得部141~出力制御部144)はそれぞれ制御部14の機能を示す機能ブロックである。これら機能ブロックはソフトウェアブロックであってもよいし、ハードウェアブロックであってもよい。例えば、上述の機能ブロックが、それぞれ、ソフトウェア(マイクロプログラムを含む。)で実現される1つのソフトウェアモジュールであってもよいし、半導体チップ(ダイ)上の1つの回路ブロックであってもよい。勿論、各機能ブロックがそれぞれ1つのプロセッサ又は1つの集積回路であってもよい。機能ブロックの構成方法は任意である。なお、制御部14は上述の機能ブロックとは異なる機能単位で構成されていてもよい。
 デプス画像の生成は、視差演算部142で行われ、デプス画像の補正はデプス補正部143で行われる。以下、視差演算部142及びデプス補正部143それぞれが有する機能を、機能ブロック図を使って説明する。なお、視差演算部142及びデプス補正部143が備える機能ブロックは、ソフトウェアで実現される1つのソフトウェアモジュールであってもよいし、半導体チップ上の1つの回路ブロックであってもよい。勿論、各機能ブロックがそれぞれ1つのプロセッサ又は1つの集積回路であってもよい。機能ブロックの構成方法は任意である。なお、視差演算部142及びデプス補正部143は以下に示す機能ブロックとは異なる機能単位で構成されていてもよい。
 [視差演算部]
 視差演算部142は、撮像画像の各画素(或いは各領域)のデプス値を計算(以下、デプス計算という。)するとともに、デプス値に基づきデプス画像を生成する。図8は、視差演算部142の構成例を示す図である。視差演算部142は、テンプレート画像決定部142aと、評価値演算部142bと、視差決定部142cと、を備える。テンプレート画像決定部142aは、記憶部13から撮像画像を取得する。撮像画像は、取得部141が撮像部12から取得したものであってもよいし、取得部141が入出力部11を介して外部の装置から取得したものであってもよい。そして、テンプレート画像決定部142aは、評価値の算出範囲を決定する。そして、評価値演算部142bは評価値を算出する。そして、視差決定部142cは、評価値に基づいてデプス画像を生成する。なお、視差演算部142は、従来の方法でデプス画像を生成してもよいし、従来とは異なる方法でデプス画像を生成してもよい。
 [デプス補正部]
 デプス補正部143は、視差演算部142が生成したデプス画像を補正し、補正デプス画像を生成する。このとき、デプス補正部143は、視差演算部142が算出したデプス値を補正することにより、補正デプス値を算出する。そして、デプス補正部143は、補正デプス値に基づいて補正デプス画像を生成する。
 図9は、デプス補正部143の構成例を示す図である。デプス補正部143は、寄与率演算部143aと、補正部143bと、を備える。寄与率演算部143aは、記憶部13から撮像画像を取得するとともに、当該撮像画像に対応するデプス画像を取得する。デプス画像は視差演算部142が生成したものであってもよいし、取得部141が入出力部11を介して外部の装置から取得したものであってもよい。そして、寄与率演算部143aは、入力画像(撮像画像)に含まれる複数の画素(或いは複数の領域)それぞれのデプス計算での対象画素(或いは対象領域)の寄与率を算出する。そして、補正部143bは、寄与率演算部143aが算出した寄与率に基づいて対象画素(或いは対象領域)のデプス値を補正する。そして、補正部143bは、補正デプス値に基づいて補正デプス画像を生成する。
<2-2.画像処理装置の動作>
 次に、実施形態1の画像処理装置10の動作について説明する。
 画像処理装置10はデプス画像を補正するデプス補正処理を実行する。デプス補正処理は画像処理装置10のデプス補正部143で実行される。図10は、デプス補正部143に入力される入力信号とデプス補正部143から出力される補正デプス画像の例を示す図である。図10の例では、デプス補正部143には入力信号として撮像画像とその撮像画像に対応するデプス画像が入力されている。デプス画像は、視差演算部142がデプス計算により生成したものであってもよい。そして、デプス補正部143は、補正デプス画像としてデプス再配置画像を出力する。
 以下、実施形態1のデプス補正処理について詳しく説明する。図11は、実施形態1に係るデプス補正処理を示すフローチャートである。上述したように、デプス補正処理はデプス補正部143で実行される。デプス補正部143は、例えば、デプス画像及び撮像画像が入力されると、デプス補正処理を開始する。なお、以下に示す処理は、一部又は全てがソフトウェア(プログラム)で実現されてもよいし、ハードウェア回路で実現されてもよい。以下では、ステレオ画像処理の場合を例に説明するが、本実施形態の適用はステレオ画像処理に限定されない。
 まず、デプス補正部143の寄与率演算部143aは、デプス画像及び撮像画像を取得する(ステップS101)。撮影画像には、基準画像と参照画像とが含まれていてもよい。なお、視差演算部142ではなく、寄与率演算部143aが、本ステップで、テンプレートマッチングにより対象画素iのデプスを決定してもよい。勿論、視差演算部142が対象画素iのデプスを決定してもよい。対象画素iは、デプス値の計算対象となる画素であり、例えば、基準画像に含まれる複数の画素のうちのi番目の画素である。寄与率演算部143aは、基準画像と参照画像の少なくとも一方の画像に基づき寄与率を算出する。
 そして、寄与率演算部143aは、撮像画像に含まれる複数の画素それぞれのデプス計算での対象画素の寄与率を算出する(ステップS102)。寄与率演算部は、撮像画像に含まれる複数の画素それぞれの特徴量に基づいて対象画素の寄与率を算出する。寄与率演算部143aは、基準画像と参照画像の少なくとも一方の画像に基づき寄与率を算出してもよい。
 特徴量は、画像の特徴を示すものであり、図2の画像を例に説明すると、例えば、平坦領域にある画素の特徴量は小さな値となり、テクスチャ領域にある画素の特徴量は大きな値となる。勿論、特徴量の特徴はこの例に限定されない。例えば、特徴量は、画像中のエッジ部分にある画素ほど特徴量が大きくなるようなものであってもよい。寄与率演算部143aは、基準画像と参照画像の少なくとも一方の画像に基づき特徴量を算出してもよい。
 特徴量は例えばエッジ強度である。このとき、寄与率演算部143aは、対象画素iを含む所定の範囲の複数の画素(例えば、対象画素及び対象画素に隣接する8つの画素)それぞれのエッジ強度に基づいて、対象画素の寄与率を算出してもよい。例えば、寄与率演算部143aは、対象画素iでデプス値を決定した際に使用したテンプレート画像(例えば、対象画素iを含む基準画像の所定の範囲)での各画素jのエッジの強度を計算し、エッジの強度に応じて寄与率Ri,jを算出する。ここで、寄与率Ri,jは、対象画素iのデプス値の決定における画素jの寄与率を示す。例えば、寄与率演算部143aは、以下の式(3)により寄与率Ri,jを算出する。
Figure JPOXMLDOC01-appb-M000003
 式(3)において、Iは、画素jのエッジ強度である。エッジ強度は、例えば、SobelフィルタやPrewittフィルタ、1次微分フィルタ、ラプラシアンフィルタ、Canny法を用いて算出された強度であってもよいし、これらをステレオのエピポーラ線に対して垂直方向に計算した強度であってもよい。エッジ強度の算出方法はこれらに限定されず、既知の様々な方法を採用可能である。勿論、寄与率演算部143aは、独自のエッジ算出方法を使用してエッジ強度を算出してもよい。
 寄与率演算部143aは、全ての対象画素iについて、対象画素i自身が関与した画素(以下、画素jとする。)のデプス値決定における寄与率を算出する。なお、画素jのデプス値決定における対象画素iの寄与率は、式(3)に示すRi,jのiとjが入れ替わってRj,iとなるので注意を要する。なお、寄与率算出のための所定の範囲の大きさ及び形状は、縦×横が3×3の大きさ及び形状に限られない。所定の範囲の大きさ及び形状は、後述のステップS103の処理に合わせ適宜変更可能である。
 次に、補正部143bは、寄与率とデプス画像に基づいて、全ての対象画素iについて補正デプス値を算出する。そして、補正部143bは、補正デプス値に基づいて補正デプス画像(デプス再配置画像)を生成する(ステップS103)。
 ここで、補正部143bは、対象画素iのデプス値Yを補正した補正デプス値Y′を、以下の式(4)により算出してもよい。補正デプス値Y′により構成される画像が補正デプス画像(デプス再配置画像)となる。
Figure JPOXMLDOC01-appb-M000004
 図12は、デプス再配置を説明するための説明図である。式(4)において、Nは、テンプレート画像T1中の画素のうち、対象画素iのデプス値の計算に関与する画素j(対象画素iを含む。)の数を示す。また、Yは、画素j(j∈N)のデプス値を示す。図12の例では、対象画素iを中心とした3×3の範囲(図12に示すテンプレート画像T2)の画素により対象画素iのデプス値を算出する。そのため、図12の例では、Nは9である。
 なお、図12に示すテンプレート画像T2は、テンプレート画像T1中に位置するテンプレート画像T1よりも小さな範囲の画像であり、その画素数はMである。テンプレート画像T2が上述の寄与率計算における所定の範囲となる。図12の例では、テンプレート画像T2は3×3の大きさ及び形状の画像であるので、Mは9である。なお、テンプレート画像T2の大きさ及び形状は図12に示した大きさ及び形状に限定されない。Mは必ずしも9でなくてもよい。テンプレート画像T2のみならず、テンプレート画像T1の大きさと形状も任意に変更可能である。Nも必ずしも9でなくもよい。
 なお、式(4)において、寄与率Rj,iは、画素jのデプス値Y決定における画素iの寄与率を示す。理解を容易にするため、寄与率Rj,iについて図13A~図13Iを用いて説明する。図13A~図13Iは、寄与率Rj,iを説明するための図である。なお、jの値と画素jの位置との対応関係は、必ずしも図13A~図13Iに示す関係でなくてもよい。
 図13Aは、jが1のときの寄与率Rj,iを説明するための図である。jが1のとき、画素jのデプス値Yは、図中のグレーで示したテンプレート画像T2の9つの画素により決定される。この例では、デプス値Y決定における画素iの寄与率はR1,iとなる。
 図13Bは、jが2のときの寄与率Rj,iを説明するための図である。jが2のとき、画素jのデプス値Yは、図中のグレーで示したテンプレート画像T2の9つの画素により決定される。この例では、デプス値Y決定における画素iの寄与率はR2,iとなる。
 図13Cは、jが3のときの寄与率Rj,iを説明するための図である。jが3のとき、画素jのデプス値Yは、図中のグレーで示したテンプレート画像T2の9つの画素により決定される。この例では、デプス値Y決定における画素iの寄与率はR3,iとなる。
 図13Dは、jが4のときの寄与率Rj,iを説明するための図である。jが4のとき、画素jのデプス値Yは、図中のグレーで示したテンプレート画像T2の9つの画素により決定される。この例では、デプス値Y決定における画素iの寄与率はR4,iとなる。
 図13Eは、jが5のときの寄与率Rj,iを説明するための図である。jが5のとき、画素jのデプス値Yは、図中のグレーで示したテンプレート画像T2の9つの画素により決定される。この例では、デプス値Y決定における画素iの寄与率はR5,iとなる。
 図13Fは、jが6のときの寄与率Rj,iを説明するための図である。jが6のとき、画素jのデプス値Yは、図中のグレーで示したテンプレート画像T2の9つの画素により決定される。この例では、デプス値Y決定における画素iの寄与率はR6,iとなる。
 図13Gは、jが7のときの寄与率Rj,iを説明するための図である。jが7のとき、画素jのデプス値Yは、図中のグレーで示したテンプレート画像T2の9つの画素により決定される。この例では、デプス値Y決定における画素iの寄与率はR7,iとなる。
 図13Hは、jが8のときの寄与率Rj,iを説明するための図である。jが8のとき、画素jのデプス値Yは、図中のグレーで示したテンプレート画像T2の9つの画素により決定される。この例では、デプス値Y決定における画素iの寄与率はR8,iとなる。
 図13Iは、jが9のときの寄与率Rj,iを説明するための図である。jが9のとき、画素jのデプス値Yは、図中のグレーで示したテンプレート画像T2の9つの画素により決定される。この例では、デプス値Y決定における画素iの寄与率はR9,iとなる。
 補正部143bは、対象画素iの補正デプス値Y′を寄与率Rj,iに基づいて算出する。より具体的には、補正部143bは、上述の式(4)に示すように、対象画素iの補正デプス値Y′を、寄与率Rj,iを重みとしたN個の画素j(対象画素iを含む。)の重み付き平均に基づき算出する。
 なお、対象画素iの補正デプス値Y′の算出方法は上記の方法に限定されない。例えば、補正部143bは、以下の式(5)に示すように、対象画素iの補正デプス値Y′を、寄与率Rj,iを重みとしたN個の画素j(対象画素iを含む。)の重み付きメディアンに基づき算出してもよい。
Figure JPOXMLDOC01-appb-M000005
 全ての対象画素iについての補正デプス値Y′の算出が完了したら、補正部143bは、補正デプス値Y′に基づいて補正デプス画像(デプス再配置画像)を生成する。図14は、デプス画像とそのデプス画像を補正した補正デプス画像を示す図である。画像処理装置10の出力制御部144は、入出力部11を制御して、補正デプス画像を出力する。補正デプス画像の出力が完了したら、補正部143bはデプス補正処理を完了する。
 本実施形態によれば、画像処理装置10は、撮像画像に含まれる複数の画素jそれぞれのデプス計算での対象画素iの寄与率に基づいて対象画素iのデプス値を補正している。これにより、対象画素iのデプス値の計算に当たり、対象画素i自身の寄与率が高かった場合(例えば、対象画素iがテクスチャ領域にある場合)は、対象画素iのデプス値が維持される。一方で、対象画素iのデプス値の計算に当たり、対象画素iの寄与率が低かった場合(例えば、対象画素iがテクスチャ領域の近くの平坦領域にある場合)は、デプス値の計算に当たり対象画素iの寄与率が高かった周辺の他の画素のデプス値を引き継ぐ方向に値が補正される。この結果、画像処理装置10は、擬似デプスの少ない精度の高いデプス画像(補正デプス画像)を生成できる。
<<3.実施形態2(補正強度に基づく補正)>>
 次に、実施形態2の画像処理装置10について説明する。
 アプリケーションに応じて位相補正画像の平滑度を制御するために、画像構造に合わせて再配置による補正強度を領域制御する手法を提案する。提案する再配置技術は、被写体境界領域での位相補正効果に加えて、非被写体境界領域での再配置によるデノイズ効果があるが、この平滑化効果によりデプス画像がぼける弊害がある。例えば、実施形態1で示す方法を使用すれば、擬似デプスを軽減できるが、図14を見れば分かるように、出力される補正デプス画像が全体的にぼやけた画像となる場合がある。そこで、位相回復効果が見込まれる被写体領域に処理を限定することで、前述のデプスのぼけを抑制する手法を提案する。
 例えば、実施形態2では、画像処理装置10は、補正強度(補正強度画像)を算出し、算出した補正強度(補正強度画像)を用いて補正デプス値の補正を制御することにより出力ボケを軽減する。ここで、補正強度画像は、各画素の補正強度を画像化したものである。補正強度は、例えば、デプス画像と補正デプス画像(デプス再配置画像)を合成する際の、画素ごとの合成の重みを示す値である。デプス画像のままの方がよい箇所(画素)では補正強度が高くなり、補正デプス画像の方がよい箇所(画素)では補正強度が低くなる。実施形態2の画像処理装置10は、補正強度を使って、デプス画像と補正デプス画像の合成を制御することにより出力ボケを軽減する。補正強度については後に詳しく述べる。
<3-1.画像処理装置の構成>
 最初に、実施形態2の画像処理装置10の構成を説明する。実施形態2の画像処理装置10の構成は、図7及び図8に示した実施形態1の画像処理装置10と同様であるが、デプス補正部143の構成が、一部、実施形態1のデプス補正部143とは異なる。
 実施形態2のデプス補正部143は、実施形態1のデプス補正部143と同様に、視差演算部142が生成したデプス画像を補正し、補正デプス画像を生成する。このとき、デプス補正部143は、視差演算部142が算出したデプス値を補正することにより、補正デプス値を算出する。そして、デプス補正部143は、補正デプス値に基づいて補正デプス画像(デプス再配置画像)を生成する。さらに、デプス補正部143は、補正強度に基づいて補正デプス画像(デプス再配置画像)を更新することにより、更新された補正デプス画像を取得する。「更新された補正デプス画像」は補正デプス画像の一種である。
 図15は、デプス補正部143の構成例を示す図である。デプス補正部143は、寄与率演算部143aと、補正部143bと、補正強度演算部143cと、を備える。補正強度演算部143cは、記憶部13から撮像画像を取得するとともに、当該撮像画像に対応するデプス画像を取得する。デプス画像は視差演算部142が生成したものであってもよいし、取得部141が入出力部11を介して外部の装置から取得したものであってもよい。補正強度演算部143cは、撮像画像に基づいて補正強度を算出する。補正強度の算出方法は後に詳しく述べる。
 そして、寄与率演算部143aは、入力画像(撮像画像)に含まれる複数の画素(或いは複数の領域)それぞれのデプス計算での対象画素(或いは対象領域)の寄与率を算出する。そして、補正部143bは、寄与率演算部143aが算出した寄与率に基づいて対象画素(或いは対象領域)のデプス値を補正する。そして、補正部143bは、補正デプス値に基づいて補正デプス画像(デプス再配置画像)を生成する。さらに、補正部143bは、補正強度に基づいて補正デプス画像(デプス再配置画像)を更新することにより、更新された補正デプス画像を取得する。
 デプス補正部143以外の構成は、実施形態1の画像処理装置10と同様である。
<3-2.画像処理装置の動作>
 次に、実施形態2の画像処理装置10の動作について説明する。
 画像処理装置10はデプス画像を補正するデプス補正処理を実行する。図16は、実施形態2に係るデプス補正処理を示すフローチャートである。図16に示すデプス補正処理は画像処理装置10のデプス補正部143で実行される。
 上述したように、デプス補正部143は、補正強度を算出する補正強度演算部143cを備える。デプス補正部143の補正部143bは、補正強度演算部143cが算出した補正強度に基づいて補正デプス画像(デプス再配置画像)を更新することにより、更新された補正デプス画像を取得する。図17は、補正部143bが補正デプス画像を更新する様子を示す図である。図17の例では、補正部143bは、デプス画像とデプス再配置画像とを補正強度を使ってαブレンドすることにより、更新された補正デプス画像(位相補正画像)を取得する。本実施形態では、補正強度は、デプス画像とデプス再配置画像とαブレンディングするための係数となる。
 以下、図16のフローチャートを参照しながら、実施形態2のデプス補正処理について説明する。デプス補正部143は、例えば、デプス画像及び撮像画像が入力されると、デプス補正処理を開始する。なお、以下に示す処理は、一部又は全てがソフトウェア(プログラム)で実現されてもよいし、ハードウェア回路で実現されてもよい。以下では、ステレオ画像処理の場合を例に説明するが、本実施形態の適用はステレオ画像処理に限定されない。
 まず、デプス補正部143の補正強度演算部143cは、デプス画像及び撮像画像を取得する(ステップS201)。撮影画像には、基準画像と参照画像とが含まれていてもよい。
 そして、補正強度演算部143cは、撮像画像に基づいて対象画素iの補正強度Wを算出する(ステップS202)。例えば、補正強度演算部143cは、対象画素iの特徴量に基づき補正強度Wを算出する。特徴量は例えばエッジ強度である。例えば、対象画素iのエッジ強度に基づき補正強度Wを算出する。例えば、補正強度演算部143cは、以下の式(6)により補正強度Wを算出する。
Figure JPOXMLDOC01-appb-M000006
 ここで、I′は、対象画素iのエッジ強度Iを0から1の間に正規化したエッジ強度である。エッジ強度I′の算出元となるエッジ強度Iは、例えば、SobelフィルタやPrewittフィルタ、1次微分フィルタ、ラプラシアンフィルタ、Canny法を用いて算出された強度であってもよいし、これらをステレオのエピポーラ線に対して垂直方向に計算した強度であってもよい。エッジ強度Iの算出方法はこれらに限定されず、既知の様々な方法を採用可能である。勿論、補正強度演算部143cは、独自のエッジ算出方法を使用してエッジ強度Iを算出してもよい。
 式(6)に示す補正強度Wは、対象画素iがエッジ上にある場合は小さな値となり、対象画素iがエッジから離れた場所にある場合は大きな値となる。補正強度Wを使ってデプス画像と補正デプス画像(デプス再配置画像)を合成することにより、画像処理装置10は、補正デプス画像を、よりシャープな画像とすることができる。補正強度演算部143cは、全ての対象画素iについて補正強度Wを算出する。このとき、算出した補正強度に基づき補正強度画像を生成してもよい。補正強度画像は、各画素の補正強度を画像化したものである。
 続いて、寄与率演算部143aは、撮像画像に含まれる複数の画素それぞれのデプス計算での対象画素の寄与率を算出する(ステップS203)。そして、補正部143bは、寄与率とデプス画像に基づいて、全ての対象画素iについて補正デプス値を算出する。そして、補正部143bは、補正デプス値に基づいて補正デプス画像(デプス再配置画像)を生成する(ステップS204)。ステップS203とステップS204の処理は、実施形態1のステップS102とステップS103の処理と同じであってもよい。
 次に、補正部143bは、補正デプス画像を補正強度画像とデプス画像を用いて更新する(ステップS205)。例えば、補正部143bは、デプス画像と補正デプス画像を、補正強度画像を用いてαブレンディングすることにより補正デプス画像を更新する。ここで、補正デプス画像中の対象画素iの補正デプス値をY′とすると、この補正デプス値Y′の更新結果である補正デプス値Y″は、例えば、以下の式(7)により算出可能である。
Figure JPOXMLDOC01-appb-M000007
 全ての対象画素iについての補正デプス値Y”の算出が完了したら、補正部143bは、補正デプス値Y”に基づいて、補正デプス画像を更新する。画像処理装置10の出力制御部144は、入出力部11を制御して、更新された補正デプス画像を出力する。更新された補正デプス画像の出力が完了したら、補正部143bはデプス補正処理を完了する。
 なお、補正部143bは、ステップS204で生成した補正デプス画像(デプス再配置画像)を一度バッファに展開してからデプス画像とブレンドしてもよいし、補正デプス画像(デプス再配置画像)をバッファ展開することなく、ダイレクトに、デプス画像に補正デプス値Y″を適用してもよい。
 本実施形態によれば、画像処理装置10は補正強度に基づいて補正デプス画像(デプス再配置画像)を更新しているので、シャープな補正デプス画像を生成できる。
<<4.実施形態3(偏在度に基づく補正強度の算出)>>
 次に、実施形態3の画像処理装置10について説明する。
 実施形態1で示す方法を使用すれば、擬似デプスを軽減できる。しかしながら、図14を見れば分かるように、実施形態1で示す方法を使用した場合、出力される補正デプス画像が全体的にぼやけた画像となる場合がある。また、前景デプスの一部が削れる現象が起きる場合もある。
 図18は、補正デプス画像に生じる問題を説明するための図である。図18を見れば分かるように、熊のぬいぐるみの頭の一部が削れているのが分かる。この原因は、2重エッジにて前景デプス(真)が引っ張られ、背景デプス(偽)が侵入したためと考えられる。2重エッジとは、例えば、テンプレート画像T2に異なるエッジが入りこんだ状態のことをいう。例えば、テンプレート画像T2に上下或いは左右2本のエッジが走った状態のことをいう。
 そこで、実施形態3では、画像処理装置10は、テンプレート画像T2内の特徴量の偏り(偏在度)に基づいて補正強度Wを算出する。このとき、画像処理装置10は、テンプレート画像T2内の特徴量が偏っている場合(例えば、テンプレート画像T2内にエッジが一本しか走っていない場合)には補正強度Wを強め、テンプレート画像T2内の特徴量が偏っていない場合(例えば、テンプレート画像T2内にエッジが複数走っている場合やエッジがない場合)には補正強度Wを弱める。実施形態3の画像処理装置10は、このように算出された補正強度を使ってデプス画像と補正デプス画像の合成を制御することにより2重エッジでのエラーを軽減する。
<4-1.画像処理装置の構成>
 最初に、実施形態3の画像処理装置10の構成を説明する。実施形態3の画像処理装置10の構成は、実施形態2の画像処理装置10と同様であるが、デプス補正部143の機能が、一部、実施形態2のデプス補正部143とは異なる。
 実施形態3のデプス補正部143は、図15に示した実施形態2のデプス補正部143と同様に、寄与率演算部143aと、補正部143bと、補正強度演算部143cと、を備える。補正強度演算部143cは、記憶部13から撮像画像を取得するとともに、当該撮像画像に対応するデプス画像を取得する。デプス画像は視差演算部142が生成したものであってもよいし、取得部141が入出力部11を介して外部の装置から取得したものであってもよい。補正強度演算部143cは、撮像画像に基づいて補正強度を算出する。補正強度の算出方法は後に詳しく述べる。
 そして、寄与率演算部143aは、入力画像(撮像画像)に含まれる複数の画素(或いは複数の領域)それぞれのデプス計算での対象画素(或いは対象領域)の寄与率を算出する。そして、補正部143bは、寄与率演算部143aが算出した寄与率に基づいて対象画素(或いは対象領域)のデプス値を補正する。そして、補正部143bは、補正デプス値に基づいてデプス再配置画像(補正デプス画像)を生成する。さらに、補正部143bは、補正強度に基づいてデプス再配置画像(補正デプス画像)を更新することにより、位相補正画像(更新された補正デプス画像)を生成する。位相補正画像は、補正デプス画像の一種である。
 デプス補正部143以外の構成は、実施形態2の画像処理装置10と同様である。
<4-2.画像処理装置の動作>
 次に、実施形態3の画像処理装置10の動作について説明する。
 画像処理装置10はデプス画像を補正するデプス補正処理を実行する。図19は、実施形態3に係るデプス補正処理を示すフローチャートである。図19に示すデプス補正処理は画像処理装置10のデプス補正部143で実行される。
 上述したように、デプス補正部143は、補正強度を算出する補正強度演算部143cを備える。デプス補正部143の補正部143bは、補正強度演算部143cが算出した補正強度に基づいてデプス再配置画像(補正デプス画像)を更新することにより、位相補正画像(更新された補正デプス画像)を生成する。
 図20は、補正部143bが位相補正画像を生成する様子を示す図である。図20の例では、補正部143bは、撮像画像の勾配マップ(エッジ画像)に基づいて位相補正マップを生成する。実施形態3では、この位相補正マップが補正強度画像となる。補正部143bは、デプス画像とデプス再配置画像とを補正強度(補正強度画像)を使ってαブレンドすることにより、位相補正画像を生成する。本実施形態では、補正強度は、デプス画像とデプス再配置画像とαブレンディングするための係数となる。
 以下、図19のフローチャートを参照しながら、実施形態3のデプス補正処理について説明する。デプス補正部143は、例えば、デプス画像及び撮像画像が入力されると、デプス補正処理を開始する。なお、以下に示す処理は、一部又は全てがソフトウェア(プログラム)で実現されてもよいし、ハードウェア回路で実現されてもよい。以下では、ステレオ画像処理の場合を例に説明するが、本実施形態の適用はステレオ画像処理に限定されない。
 まず、デプス補正部143の補正強度演算部143cは、デプス画像及び撮像画像を取得する(ステップS301)。撮影画像には、基準画像と参照画像とが含まれていてもよい。
 そして、補正強度演算部143cは、撮像画像に基づいて対象画素iの補正強度Wを算出する(ステップS302)。例えば、補正強度演算部143cは、「対象画素iの特徴量」と「対象画素iのデプス計算に使用したテンプレート画像T2内の特徴量の偏り(偏在度)」とに基づき補正強度Wを算出する。「対象画素iの特徴量」は例えば対象画素iのエッジ強度Iである。また、「対象画素iのデプス計算に使用したテンプレート画像T2内の特徴量の偏り(偏在度)」は、対象画素iのデプス計算に使用したテンプレート画像T2内のエッジの偏りDである。エッジの偏りDは、例えば、以下の式(8)により算出可能である。
Figure JPOXMLDOC01-appb-M000008
 ここで、Mは、実施形態1に示したMと同様である。すなわち、Mは、テンプレート画像T2の画素数である。図12の例であれば、Mは9である。
 また、(x,y)は、対象画素iのテンプレート画像T2内の画素jの、対象画素iを中心とした相対位置を示す。また、寄与率Ri,jは、画素iのデプス値Y決定における画素jの寄与率を示す。理解を容易にするため、寄与率Ri,jについて図21A~図21Iを用いて説明する。図21A~図21Iは、寄与率Ri,jを説明するための図である。なお、jの値と画素jの位置との対応関係は、必ずしも図21A~図21Iに示す関係でなくてもよい。
 図21Aは、jが1のときの寄与率Ri,jを説明するための図である。図21Aの例では、画素iのデプス値Yは、図中のグレーで示したテンプレート画像T2の9つの画素により決定される。この例では、画素jの相対位置(x,y)は(-1,1)であり、デプス値Y決定における画素jの寄与率はRi,1となる。
 図21Bは、jが2のときの寄与率Ri,jを説明するための図である。図21Bの例では、画素iのデプス値Yは、図中のグレーで示したテンプレート画像T2の9つの画素により決定される。この例では、画素jの相対位置(x,y)は(0,1)であり、デプス値Y決定における画素jの寄与率はRi,2となる。
 図21Cは、jが3のときの寄与率Ri,jを説明するための図である。図21Cの例では、画素iのデプス値Yは、図中のグレーで示したテンプレート画像T2の9つの画素により決定される。この例では、画素jの相対位置(x,y)は(1,1)であり、デプス値Y決定における画素jの寄与率はRi,3となる。
 図21Dは、jが4のときの寄与率Ri,jを説明するための図である。図21Dの例では、画素iのデプス値Yは、図中のグレーで示したテンプレート画像T2の9つの画素により決定される。この例では、画素jの相対位置(x,y)は(-1,0)であり、デプス値Y決定における画素jの寄与率はRi,4となる。
 図21Eは、jが5のときの寄与率Ri,jを説明するための図である。図21Eの例では、画素iのデプス値Yは、図中のグレーで示したテンプレート画像T2の9つの画素により決定される。この例では、画素jの相対位置(x,y)は(0,0)であり、デプス値Y決定における画素jの寄与率はRi,5となる。
 図21Fは、jが6のときの寄与率Ri,jを説明するための図である。図21Fの例では、画素iのデプス値Yは、図中のグレーで示したテンプレート画像T2の9つの画素により決定される。この例では、画素jの相対位置(x,y)は(1,0)であり、デプス値Y決定における画素jの寄与率はRi,6となる。
 図21Gは、jが7のときの寄与率Ri,jを説明するための図である。図21Gの例では、画素iのデプス値Yは、図中のグレーで示したテンプレート画像T2の9つの画素により決定される。この例では、画素jの相対位置(x,y)は(-1,-1)であり、デプス値Y決定における画素jの寄与率はRi,7となる。
 図21Hは、jが8のときの寄与率Ri,jを説明するための図である。図21Hの例では、画素iのデプス値Yは、図中のグレーで示したテンプレート画像T2の9つの画素により決定される。この例では、画素jの相対位置(x,y)は(0,-1)であり、デプス値Y決定における画素jの寄与率はRi,8となる。
 図21Iは、jが9のときの寄与率Ri,jを説明するための図である。図21Iの例では、画素iのデプス値Yは、図中のグレーで示したテンプレート画像T2の9つの画素により決定される。この例では、画素jの相対位置(x,y)は(1,-1)であり、デプス値Y決定における画素jの寄与率はRi,9となる。
 補正強度演算部143cは、対象画素iのエッジ強度と上記エッジの偏りDに基づき補正強度Wを算出する。例えば、補正強度演算部143cは、以下の式(9)により補正強度Wを算出する。
Figure JPOXMLDOC01-appb-M000009
 ここで、I′は、対象画素iのエッジ強度Iを0から1の間に正規化したエッジ強度である。エッジ強度I′の算出元となるエッジ強度Iは、例えば、SobelフィルタやPrewittフィルタ、1次微分フィルタ、ラプラシアンフィルタ、Canny法を用いて算出された強度であってもよいし、これらをステレオのエピポーラ線に対して垂直方向に計算した強度であってもよい。エッジ強度Iの算出方法はこれらに限定されず、既知の様々な方法を採用可能である。勿論、補正強度演算部143cは、独自のエッジ算出方法を使用してエッジ強度Iを算出してもよい。
 式(9)に示す補正強度Wは、対象画素iのデプス値Yを決定する際のテンプレート画像T2内の特徴量が偏っていた場合に大きな値となり、テンプレート画像T2内の特徴量が偏っていない場合(例えば、2重エッジの場合やエッジがない場合)に小さな値となる。補正強度Wを使ってデプス画像と補正デプス画像(デプス再配置画像)を合成することにより、画像処理装置10は、補正デプス画像を、エラーの少ない精度の高いものとすることができる。補正強度演算部143cは、全ての対象画素iについて補正強度Wを算出する。このとき、算出した補正強度に基づき補正強度画像を生成してもよい。
 続いて、寄与率演算部143aは、撮像画像に含まれる複数の画素それぞれのデプス計算での対象画素の寄与率を算出する(ステップS303)。そして、補正部143bは、寄与率とデプス画像に基づいて、全ての対象画素iについて補正デプス値を算出する。そして、補正部143bは、補正デプス値に基づいて補正デプス画像(デプス再配置画像)を生成する(ステップS304)。ステップS203とステップS204の処理は、実施形態1のステップS102とステップS103の処理と同じであってもよい。
 次に、補正部143bは、補正デプス画像を補正強度画像とデプス画像を用いて更新する(ステップS305)。例えば、補正部143bは、デプス画像と補正デプス画像を、補正強度画像を用いてαブレンディングすることにより補正デプス画像を更新する。ここで、補正デプス画像中の対象画素iの補正デプス値をY′とすると、この補正デプス値Y′の更新結果である補正デプス値Y″は、上述の式(7)により算出可能である。
 全ての対象画素iについての補正デプス値Y″の算出が完了したら、補正部143bは、補正デプス値Y″に基づいて、補正デプス画像を更新する。図22は、デプス画像とそのデプス画像を補正した位相補正画像を示す図である。画像処理装置10の出力制御部144は、入出力部11を制御して、位相補正画像を出力する。位相補正画像の出力が完了したら、補正部143bはデプス補正処理を完了する。
 なお、補正部143bは、ステップS304で生成した補正デプス画像(デプス再配置画像)を一度バッファに展開してからデプス画像とブレンドしてもよいし、補正デプス画像(デプス再配置画像)をバッファ展開することなく、ダイレクトに、デプス画像に補正デプス値Y″を適用してもよい。
 本実施形態によれば、画像処理装置10は二重エッジ等の原因によるエラーの少ない補正デプス画像を生成できる。図23は、デプス再配置画像の一部とその部分に対応する位相補正画像の一部を示す図である。図23を見れば分かるように、デプス再配置画像では、頭の一部が削れていたものが、位相補正画像では改善されているのが分かる。しかも、左手部分に擬似デプスは発生しておらず、擬似デプス軽減効果は維持されているのが分かる。しかも、画像がシャープになっており、出力ボケも軽減されているのが分かる。
<<5.変形例>>
 上述の各実施形態はそれぞれ一例を示したものであり、種々の変更及び応用が可能である。
 例えば、上述の各実施形態では、画像処理装置10は、静止画像を入力としてデプス画像(補正デプス画像)を生成した。しかし、画像処理装置10は、動画像を入力としてデプス画像(補正デプス画像)を生成してもよい。
 この場合に、画像処理装置10は、実施形態2及び3で説明した対象画素iの補正強度Wを、さらに、対象画像とその前後フレームの画像を用いた計算したデプスエッジマップEを用いて計算してもよい。デプスエッジマップEの計算には、例えば、Aleksander Holynski and Johannes Kopf, Fast depth densification for occlusion-aware augmented reality, ACM Transactions on Graphics (TOG), Vol. 37, 2018.の手法を用いることが可能である。この場合、画像処理装置10は、対象画像と前後フレームとの間でオプティカルフローを計算し、計算したオプティカルフローの勾配強度を加算することでデプスエッジマップEを計算することができる。デプスエッジマップEを追加で利用することで、画像のエッジから、デプス差を有しているエッジのみを効率的に選択できるようになり、本実施形態の効果を狙った画像領域のみに適用することが可能となるため、補正精度を向上させることが可能となる。
 上述の各実施形態では、寄与率演算部143aはエッジ強度等の特徴量に基づいて寄与率を算出したが、対象画素iを含むテンプレート画像T2の複数の画素それぞれの特徴量の総和に基づいて寄与率を算出してもよい。
 また、上述の各実施形態では、寄与率演算部143aはエッジ強度に基づいて寄与率を算出したが、寄与率の算出方法はエッジ強度を使った方法に限定されない。例えば、撮像画像は、基準画像と参照画像を含むステレオ画像であるとする。このとき、寄与率演算部143aは、対象画素iを含む基準画像のテンプレート画像(所定の範囲)とそのテンプレート画像に対応する参照画像のテンプレート画像(対応範囲)とのマッチング度合いを示すマッチング評価値を特徴量として寄与率を算出してもよい。
 本実施形態の画像処理装置10を制御する制御装置は、専用のコンピュータシステムで実現してもよいし、汎用のコンピュータシステムで実現してもよい。
 例えば、上述の動作(例えば、デプス補正処理等)を実行するためのプログラムを、光ディスク、半導体メモリ、磁気テープ、フレキシブルディスク等のコンピュータ読み取り可能な記録媒体に格納して配布する。そして、例えば、該プログラムをコンピュータにインストールし、上述の処理を実行することによって制御装置を構成する。このとき、制御装置は、画像処理装置10の外部の装置(例えば、パーソナルコンピュータ)であってもよいし、画像処理装置10の内部の装置(例えば、制御部14)であってもよい。
 また、上記通信プログラムをインターネット等のネットワーク上のサーバ装置が備えるディスク装置に格納しておき、コンピュータにダウンロード等できるようにしてもよい。また、上述の機能を、OS(Operating System)とアプリケーションソフトとの協働により実現してもよい。この場合には、OS以外の部分を媒体に格納して配布してもよいし、OS以外の部分をサーバ装置に格納しておき、コンピュータにダウンロード等できるようにしてもよい。
 また、上記実施形態において説明した各処理のうち、自動的に行われるものとして説明した処理の全部又は一部を手動的に行うこともでき、あるいは、手動的に行われるものとして説明した処理の全部又は一部を公知の方法で自動的に行うこともできる。この他、上記文書中や図面中で示した処理手順、具体的名称、各種のデータやパラメータを含む情報については、特記する場合を除いて任意に変更することができる。例えば、各図に示した各種情報は、図示した情報に限られない。
 また、図示した各装置の各構成要素は機能概念的なものであり、必ずしも物理的に図示の如く構成されていることを要しない。すなわち、各装置の分散・統合の具体的形態は図示のものに限られず、その全部又は一部を、各種の負荷や使用状況などに応じて、任意の単位で機能的又は物理的に分散・統合して構成することができる。
 また、上記してきた実施形態は、処理内容を矛盾させない領域で適宜組み合わせることが可能である。また、本実施形態のフローチャートに示された各ステップは、適宜順序を変更することが可能である。
 また、本実施形態は、装置またはシステムを構成するあらゆる構成、例えば、システムLSI(Large Scale Integration)等としてのプロセッサ、複数のプロセッサ等を用いるモジュール、複数のモジュール等を用いるユニット、ユニットにさらにその他の機能を付加したセット等(すなわち、装置の一部の構成)として実施することもできる。
 なお、本実施形態において、システムとは、複数の構成要素(装置、モジュール(部品)等)の集合を意味し、全ての構成要素が同一筐体中にあるか否かは問わない。したがって、別個の筐体に収納され、ネットワークを介して接続されている複数の装置、及び、1つの筐体の中に複数のモジュールが収納されている1つの装置は、いずれも、システムである。
 また、例えば、本実施形態は、1つの機能を、ネットワークを介して複数の装置で分担、共同して処理するクラウドコンピューティングの構成をとることができる。
<<6.むすび>>
 以上説明したように、本開示の一実施形態によれば、テンプレートマッチングなどに代表される画像信号の比較により演算した出力結果を対象に、テンプレート画像内に異なる出力値が期待される領域が混在する場合に発生する誤推定結果を補正することができる。例えば、ステレオ画像処理の場合は、テンプレート画像内に異なる距離にある画素が混在するケースで発生する疑似デプスを補正することができる。具体的には、テンプレート画像内に、異なる距離にあるテクスチャ領域と平坦領域が存在する場合に、平坦領域で誤推定された疑似デプスを補正することができる。
 本実施形態は、デプス画像を用いた前景・背景抽出、リフォーカシング処理などのアプリケーションへの応用可能である。さらに、本実施形態は、画像信号の比較により演算した出力結果の補正に広く適用可能であり、オプティカルフロー推定や、物体検出などの出力結果を補正することができる。
 以上、本開示の各実施形態について説明したが、本開示の技術的範囲は、上述の各実施形態そのままに限定されるものではなく、本開示の要旨を逸脱しない範囲において種々の変更が可能である。また、異なる実施形態及び変形例にわたる構成要素を適宜組み合わせてもよい。
 また、本明細書に記載された各実施形態における効果はあくまで例示であって限定されるものでは無く、他の効果があってもよい。
 なお、本技術は以下のような構成も取ることができる。
(1)
 入力画像に含まれる複数の画素或いは複数の領域それぞれのデプス計算での所定の画素或いは所定の領域の寄与率を算出する寄与率演算部と、
 前記寄与率に基づいて前記所定の画素或いは前記所定の領域のデプス値を補正する補正部と、を備える、
 画像処理装置。
(2)
 前記寄与率演算部は、前記所定の画素を含む前記入力画像の所定の範囲の複数の画素それぞれの前記デプス計算での前記所定の画素の寄与率を算出し、
 前記補正部は、前記所定の範囲の複数の画素それぞれの前記デプス計算での前記所定の画素の寄与率に基づいて、前記所定の画素の補正デプス値を算出する、
 前記(1)に記載の画像処理装置。
(3)
 前記補正部は、前記所定の範囲の複数の画素それぞれのデプス計算での前記所定の画素の前記寄与率を重みとした、該複数の画素のデプス値の重み付き平均に基づき、前記所定の画素のデプス値の補正デプス値を算出する、
 前記(2)に記載の画像処理装置。
(4)
 前記補正部は、前記所定の範囲の複数の画素それぞれのデプス計算での前記所定の画素の前記寄与率を重みとした、該複数の画素のデプス値の重み付きメディアンに基づき、前記所定の画素のデプス値の補正デプス値を算出する、
 前記(2)に記載の画像処理装置。
(5)
 前記寄与率演算部は、前記所定の領域を含む前記入力画像の所定の範囲の複数の領域それぞれの前記デプス計算での前記所定の領域の寄与率を算出し、
 前記補正部は、前記所定の範囲の複数の領域それぞれの前記デプス計算での前記所定の領域の寄与率に基づいて、前記所定の領域の補正デプス値を算出する、
 前記(1)に記載の画像処理装置。
(6)
 前記補正部は、前記所定の範囲の複数の領域それぞれのデプス計算での前記所定の領域の前記寄与率を重みとした、該複数の領域のデプス値の重み付き平均に基づき、前記所定の領域のデプス値の補正デプス値を算出する、
 前記(5)に記載の画像処理装置。
(7)
 前記補正部は、前記所定の範囲の複数の領域それぞれのデプス計算での前記所定の領域の前記寄与率を重みとした、該複数の領域のデプス値の重み付きメディアンに基づき、前記所定の領域のデプス値の補正デプス値を算出する、
 前記(5)に記載の画像処理装置。
(8)
 前記デプス計算により得られるデプス画像、及び、前記補正部のデプス値の補正により得られる補正デプス画像、のうちの一方の画像を、他方の画像に基づき補正するための補正強度を算出する補正強度演算部、を備える、
 前記(1)~(7)のいずれか1つに記載の画像処理装置。
(9)
 前記補正強度は、前記デプス画像と前記補正デプス画像とをαブレンディングするための係数である、
 前記(8)に記載の画像処理装置。
(10)
 前記補正強度演算部は、前記入力画像に含まれる複数の画素それぞれの特徴量に基づいて前記補正強度を算出する、
 前記(8)又は(9)に記載の画像処理装置。
(11)
 前記補正強度演算部は、前記所定の画素を含む前記入力画像の所定の範囲内の前記特徴量の偏りに基づいて前記補正強度を算出する、
 前記(10)に記載の画像処理装置。
(12)
 前記補正強度演算部は、前記入力画像に含まれる複数の領域それぞれの特徴量に基づいて前記補正強度を算出する、
 前記(8)又は(9)に記載の画像処理装置。
(13)
 前記補正強度演算部は、前記所定の領域を含む前記入力画像の所定の範囲内の前記特徴量の偏りに基づいて前記補正強度を算出する、
 前記(12)に記載の画像処理装置。
(14)
 前記寄与率演算部は、前記入力画像に含まれる前記複数の画素或いは前記複数の領域それぞれの特徴量に基づいて、前記所定の画素或いは前記所定の領域の前記寄与率を算出する、
 前記(1)~(13)のいずれか1つに記載の画像処理装置。
(15)
 前記特徴量はエッジ強度であり、
 前記寄与率演算部は、前記所定の画素を含む前記入力画像の所定の範囲の複数の画素それぞれのエッジ強度に基づいて、前記所定の画素の前記寄与率を算出する、
 前記(14)に記載の画像処理装置。
(16)
 前記入力画像は、基準画像とされる第1の画像と参照画像とされる第2の画像とを含むステレオ画像であり、
 前記寄与率演算部は、前記第1の画像と前記第2の画像の少なくとも一方の画像に基づいて前記特徴量を算出する、
 前記(14)に記載の画像処理装置。
(17)
 前記寄与率演算部は、前記所定の画素を含む前記入力画像の所定の範囲の複数の画素それぞれの前記特徴量の総和に基づいて前記寄与率を算出する、
 前記(14)に記載の画像処理装置。
(18)
 前記入力画像は、基準画像とされる第1の画像と参照画像とされる第2の画像とを含むステレオ画像であり、
 前記寄与率演算部は、前記所定の画素を含む前記第1の画像の所定の範囲と前記所定の範囲に対応する前記第2の画像の対応範囲とのマッチング度合いを示すマッチング評価値を前記特徴量として前記寄与率を算出する、
 前記(14)に記載の画像処理装置。
(19)
 入力画像に含まれる複数の画素或いは複数の領域それぞれのデプス計算での所定の画素或いは所定の領域の寄与率を算出し、
 前記寄与率に基づいて前記所定の画素或いは前記所定の領域のデプス値を補正する、
 画像処理方法。
(20)
 コンピュータを、
 入力画像に含まれる複数の画素或いは複数の領域それぞれのデプス計算での所定の画素或いは所定の領域の寄与率を算出する寄与率演算部、
 前記寄与率に基づいて前記所定の画素或いは前記所定の領域のデプス値を補正する補正部、
 として機能させるための推定プログラム。
  10 画像処理装置
  11 入出力部
  12 撮像部
  13 記憶部
  14 制御部
  141 取得部
  142 視差演算部
  142a テンプレート画像決定部
  142b 評価値演算部
  142c 視差決定部
  143 デプス補正部
  143a 寄与率演算部
  143b 補正部
  143c 補正強度演算部
  144 出力制御部

Claims (19)

  1.  入力画像に含まれる複数の画素或いは複数の領域それぞれのデプス計算での所定の画素或いは所定の領域の寄与率を算出する寄与率演算部と、
     前記寄与率に基づいて前記所定の画素或いは前記所定の領域のデプス値を補正する補正部と、を備える、
     画像処理装置。
  2.  前記寄与率演算部は、前記所定の画素を含む前記入力画像の所定の範囲の複数の画素それぞれの前記デプス計算での前記所定の画素の寄与率を算出し、
     前記補正部は、前記所定の範囲の複数の画素それぞれの前記デプス計算での前記所定の画素の寄与率に基づいて、前記所定の画素の補正デプス値を算出する、
     請求項1に記載の画像処理装置。
  3.  前記補正部は、前記所定の範囲の複数の画素それぞれのデプス計算での前記所定の画素の前記寄与率を重みとした、該複数の画素のデプス値の重み付き平均に基づき、前記所定の画素のデプス値の補正デプス値を算出する、
     請求項2に記載の画像処理装置。
  4.  前記補正部は、前記所定の範囲の複数の画素それぞれのデプス計算での前記所定の画素の前記寄与率を重みとした、該複数の画素のデプス値の重み付きメディアンに基づき、前記所定の画素のデプス値の補正デプス値を算出する、
     請求項2に記載の画像処理装置。
  5.  前記寄与率演算部は、前記所定の領域を含む前記入力画像の所定の範囲の複数の領域それぞれの前記デプス計算での前記所定の領域の寄与率を算出し、
     前記補正部は、前記所定の範囲の複数の領域それぞれの前記デプス計算での前記所定の領域の寄与率に基づいて、前記所定の領域の補正デプス値を算出する、
     請求項1に記載の画像処理装置。
  6.  前記補正部は、前記所定の範囲の複数の領域それぞれのデプス計算での前記所定の領域の前記寄与率を重みとした、該複数の領域のデプス値の重み付き平均に基づき、前記所定の領域のデプス値の補正デプス値を算出する、
     請求項5に記載の画像処理装置。
  7.  前記補正部は、前記所定の範囲の複数の領域それぞれのデプス計算での前記所定の領域の前記寄与率を重みとした、該複数の領域のデプス値の重み付きメディアンに基づき、前記所定の領域のデプス値の補正デプス値を算出する、
     請求項5に記載の画像処理装置。
  8.  前記デプス計算により得られるデプス画像、及び、前記補正部のデプス値の補正により得られる補正デプス画像、のうちの一方の画像を、他方の画像に基づき補正するための補正強度を算出する補正強度演算部、を備える、
     請求項1に記載の画像処理装置。
  9.  前記補正強度は、前記デプス画像と前記補正デプス画像とをαブレンディングするための係数である、
     請求項8に記載の画像処理装置。
  10.  前記補正強度演算部は、前記入力画像に含まれる複数の画素それぞれの特徴量に基づいて前記補正強度を算出する、
     請求項8に記載の画像処理装置。
  11.  前記補正強度演算部は、前記所定の画素を含む前記入力画像の所定の範囲内の前記特徴量の偏りに基づいて前記補正強度を算出する、
     請求項10に記載の画像処理装置。
  12.  前記補正強度演算部は、前記入力画像に含まれる複数の領域それぞれの特徴量に基づいて前記補正強度を算出する、
     請求項8に記載の画像処理装置。
  13.  前記補正強度演算部は、前記所定の領域を含む前記入力画像の所定の範囲内の前記特徴量の偏りに基づいて前記補正強度を算出する、
     請求項12に記載の画像処理装置。
  14.  前記寄与率演算部は、前記入力画像に含まれる前記複数の画素或いは前記複数の領域それぞれの特徴量に基づいて、前記所定の画素或いは前記所定の領域の前記寄与率を算出する、
     請求項1に記載の画像処理装置。
  15.  前記特徴量はエッジ強度であり、
     前記寄与率演算部は、前記所定の画素を含む前記入力画像の所定の範囲の複数の画素それぞれのエッジ強度に基づいて、前記所定の画素の前記寄与率を算出する、
     請求項14に記載の画像処理装置。
  16.  前記入力画像は、基準画像とされる第1の画像と参照画像とされる第2の画像とを含むステレオ画像であり、
     前記寄与率演算部は、前記第1の画像と前記第2の画像の少なくとも一方の画像に基づいて前記特徴量を算出する、
     請求項14に記載の画像処理装置。
  17.  前記寄与率演算部は、前記所定の画素を含む前記入力画像の所定の範囲の複数の画素それぞれの前記特徴量の総和に基づいて前記寄与率を算出する、
     請求項14に記載の画像処理装置。
  18.  前記入力画像は、基準画像とされる第1の画像と参照画像とされる第2の画像とを含むステレオ画像であり、
     前記寄与率演算部は、前記所定の画素を含む前記第1の画像の所定の範囲と前記所定の範囲に対応する前記第2の画像の対応範囲とのマッチング度合いを示すマッチング評価値を前記特徴量として前記寄与率を算出する、
     請求項14に記載の画像処理装置。
  19.  入力画像に含まれる複数の画素或いは複数の領域それぞれのデプス計算での所定の画素或いは所定の領域の寄与率を算出し、
     前記寄与率に基づいて前記所定の画素或いは前記所定の領域のデプス値を補正する、
     画像処理方法。
PCT/JP2020/012664 2019-04-10 2020-03-23 画像処理装置、及び画像処理方法 WO2020209040A1 (ja)

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN202080026996.7A CN113710986A (zh) 2019-04-10 2020-03-23 图像处理装置和图像处理方法
JP2021513545A JPWO2020209040A1 (ja) 2019-04-10 2020-03-23
US17/600,894 US20220188997A1 (en) 2019-04-10 2020-03-23 Image processing device and image processing method
EP20788238.2A EP3954967A4 (en) 2019-04-10 2020-03-23 IMAGE PROCESSING DEVICE AND IMAGE PROCESSING METHOD

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2019075074 2019-04-10
JP2019-075074 2019-04-10

Publications (1)

Publication Number Publication Date
WO2020209040A1 true WO2020209040A1 (ja) 2020-10-15

Family

ID=72751025

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2020/012664 WO2020209040A1 (ja) 2019-04-10 2020-03-23 画像処理装置、及び画像処理方法

Country Status (5)

Country Link
US (1) US20220188997A1 (ja)
EP (1) EP3954967A4 (ja)
JP (1) JPWO2020209040A1 (ja)
CN (1) CN113710986A (ja)
WO (1) WO2020209040A1 (ja)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11417065B2 (en) * 2019-10-29 2022-08-16 Magic Leap, Inc. Methods and systems for reprojection in augmented-reality displays
US12039663B2 (en) 2021-10-28 2024-07-16 Nvidia Corporation 3D surface structure estimation using neural networks for autonomous systems and applications
US20230136235A1 (en) * 2021-10-28 2023-05-04 Nvidia Corporation 3d surface reconstruction with point cloud densification using artificial intelligence for autonomous systems and applications

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004139219A (ja) 2002-10-16 2004-05-13 Seiko Instruments Inc 画像処理方法および画像処理装置
JP2008160474A (ja) * 2006-12-22 2008-07-10 Canon Inc 画像処理装置およびその方法
WO2013145554A1 (ja) 2012-03-29 2013-10-03 パナソニック株式会社 画像処理装置及び画像処理方法
JP2014215840A (ja) * 2013-04-25 2014-11-17 富士通株式会社 画像処理回路、画像処理装置及び画像処理方法
JP2017027101A (ja) 2015-07-15 2017-02-02 凸版印刷株式会社 デプスマップ生成装置、デプスマップ生成方法及びプログラム

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7103227B2 (en) * 2003-03-19 2006-09-05 Mitsubishi Electric Research Laboratories, Inc. Enhancing low quality images of naturally illuminated scenes
JP5150698B2 (ja) * 2010-09-30 2013-02-20 株式会社東芝 デプス補正装置及び方法
WO2013099169A1 (ja) * 2011-12-27 2013-07-04 パナソニック株式会社 ステレオ撮影装置
KR101938205B1 (ko) * 2012-03-19 2019-01-14 한국전자통신연구원 깊이 영상 필터링 방법 및 그 장치
US20140002441A1 (en) * 2012-06-29 2014-01-02 Hong Kong Applied Science and Technology Research Institute Company Limited Temporally consistent depth estimation from binocular videos
JP2015022458A (ja) * 2013-07-18 2015-02-02 株式会社Jvcケンウッド 画像処理装置、画像処理方法及び画像処理プログラム
CN108107571B (zh) * 2013-10-30 2021-06-01 株式会社摩如富 图像处理装置及方法及非暂时性计算机可读记录介质
JP6643122B2 (ja) * 2016-02-03 2020-02-12 キヤノン株式会社 距離画像装置、撮像装置、および距離画像補正方法
US20190066852A1 (en) * 2017-08-30 2019-02-28 Klee M. Irwin Nano-Engineered Materials for LENR

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004139219A (ja) 2002-10-16 2004-05-13 Seiko Instruments Inc 画像処理方法および画像処理装置
JP2008160474A (ja) * 2006-12-22 2008-07-10 Canon Inc 画像処理装置およびその方法
WO2013145554A1 (ja) 2012-03-29 2013-10-03 パナソニック株式会社 画像処理装置及び画像処理方法
JP2014215840A (ja) * 2013-04-25 2014-11-17 富士通株式会社 画像処理回路、画像処理装置及び画像処理方法
JP2017027101A (ja) 2015-07-15 2017-02-02 凸版印刷株式会社 デプスマップ生成装置、デプスマップ生成方法及びプログラム

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
ACM TRANSACTIONS ON GRAPHICS (TOG, vol. 37, 2018
E. S. L. GASTALM. M. OLIVEIRA: "Domain transform for edge-aware image and video processing", ACM TRANSACTIONS ON GRAPHICS, vol. 30, no. 4, 2011, XP055176069, DOI: 10.1145/2010324.1964964
J. SUNN. ZHENGH. Y. SHUM: "Stereo matching using belief propagation", IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE, vol. 25, no. 7, 2003, pages 787 - 800
JONATHAN T BARRONBEN POOLE: "European Conference on Computer Vision (ECCV", 2016, SPRINGER INTERNATIONAL PUBLISHING, article "The fast bilateral solver", pages: 617 - 632

Also Published As

Publication number Publication date
EP3954967A1 (en) 2022-02-16
EP3954967A4 (en) 2022-06-01
US20220188997A1 (en) 2022-06-16
CN113710986A (zh) 2021-11-26
JPWO2020209040A1 (ja) 2020-10-15

Similar Documents

Publication Publication Date Title
WO2020209040A1 (ja) 画像処理装置、及び画像処理方法
US20220237866A1 (en) Vehicle environment modeling with cameras
US9996941B2 (en) Constrained key frame localization and mapping for vision-aided inertial navigation
WO2020093378A1 (en) Vehicle positioning system using lidar
US10789719B2 (en) Method and apparatus for detection of false alarm obstacle
US10755425B2 (en) Automatic tuning of image signal processors using reference images in image processing environments
US11056001B2 (en) Image generating apparatus, image generating method, and recording medium
US9786062B2 (en) Scene reconstruction from high spatio-angular resolution light fields
EP2992508B1 (en) Diminished and mediated reality effects from reconstruction
US9454851B2 (en) Efficient approach to estimate disparity map
WO2019202397A2 (en) Vehicle environment modeling with a camera
US20180316905A1 (en) Camera parameter set calculation method, recording medium, and camera parameter set calculation apparatus
US10740986B2 (en) Systems and methods for reconstructing a moving three-dimensional object
KR20190030474A (ko) 신뢰도에 기초하여 깊이 맵을 산출하는 방법 및 장치
KR102559203B1 (ko) 포즈 정보를 출력하는 방법 및 장치
US20220122230A1 (en) Methods and systems for video stabilization
Li et al. Sea–sky line detection using gray variation differences in the time domain for unmanned surface vehicles
WO2021215236A1 (ja) 情報処理装置、情報処理方法および記録媒体
US20210398292A1 (en) Movement amount estimation device, movement amount estimation method, and computer readable medium
CN115601275A (zh) 点云增广方法及装置、计算机可读存储介质、终端设备
WO2021010067A1 (ja) 情報処理装置、情報処理方法および情報処理プログラム
CN109376653B (zh) 用于定位车辆的方法、装置、设备和介质
CN109325962B (zh) 信息处理方法、装置、设备以及计算机可读存储介质
US20180001821A1 (en) Environment perception using a surrounding monitoring system
US20220383515A1 (en) Digital video computing system for vehicle

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

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021513545

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2020788238

Country of ref document: EP

Effective date: 20211110