JP2013114477A - Image processing device, image processing method and image processing program - Google Patents

Image processing device, image processing method and image processing program Download PDF

Info

Publication number
JP2013114477A
JP2013114477A JP2011260402A JP2011260402A JP2013114477A JP 2013114477 A JP2013114477 A JP 2013114477A JP 2011260402 A JP2011260402 A JP 2011260402A JP 2011260402 A JP2011260402 A JP 2011260402A JP 2013114477 A JP2013114477 A JP 2013114477A
Authority
JP
Japan
Prior art keywords
pixel
parallax image
image
parallax
image processing
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
JP2011260402A
Other languages
Japanese (ja)
Other versions
JP5747797B2 (en
Inventor
Takehiko Sashida
岳彦 指田
Motohiro Asano
基広 浅野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Konica Minolta Inc
Original Assignee
Konica Minolta Inc
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 Konica Minolta Inc filed Critical Konica Minolta Inc
Priority to JP2011260402A priority Critical patent/JP5747797B2/en
Publication of JP2013114477A publication Critical patent/JP2013114477A/en
Application granted granted Critical
Publication of JP5747797B2 publication Critical patent/JP5747797B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Measurement Of Optical Distance (AREA)
  • Processing Or Creating Images (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an image processing device, an image processing method and an image processing program that enable higher-accuracy correction of a parallax image.SOLUTION: The image processing device includes: parallax image generation means for generating a parallax image from at least two input images acquired by imaging a subject from different view points; reliability calculation means for calculating reliability of a pixel included in the parallax image generated by the parallax image generation means; and parallax image correction means for correcting the parallax image generated by the parallax image generation means and outputting the parallax image after correction. The parallax image correction means includes: eligibility calculation means for, on the basis of reliability and color information of pixels around a corrected pixel included in the parallax image generated by the parallax image generation means, calculating eligibility of the corrected pixel for a corrected pixel candidate; and determination means for, on the basis of the calculated eligibility, determining a pixel used for the correction of the corrected pixel.

Description

本発明は、被写体の立体視表示などに用いられる視差画像を生成するための画像処理装置、画像処理方法および画像処理プログラムに関する。   The present invention relates to an image processing apparatus, an image processing method, and an image processing program for generating a parallax image used for stereoscopic display of a subject.

近年の表示デバイスの開発とも相まって、被写体を立体視表示するための画像処理技術の開発が進められている。このような立体視表示を実現する典型的な方法として、人間が感じる両眼視差を利用する方法がある。このような両眼視差を利用する場合には、被写体を異なる視点で撮像することで取得される少なくとも2つの入力画像の間について、視差を算出する方法が一般的に採用される。算出された各画素位置の視差を表現するために視差画像が用いられることが多い。視差画像は、いずれかの入力画像の画素位置を基準として、各画素の視差をその画素値とするものである。視差画像は、各画素の画素値を濃淡で表現することもできる。   In conjunction with the development of display devices in recent years, development of image processing techniques for stereoscopically displaying a subject has been promoted. As a typical method for realizing such stereoscopic display, there is a method using binocular parallax felt by humans. When such binocular parallax is used, a method of calculating parallax between at least two input images acquired by imaging a subject from different viewpoints is generally employed. In many cases, a parallax image is used to express the calculated parallax of each pixel position. The parallax image is obtained by using the parallax of each pixel as the pixel value with reference to the pixel position of any input image. In the parallax image, the pixel value of each pixel can also be expressed by shading.

このような視差画像は、入力画像間の視差を算出することで生成されるが、様々な要因によって、この算出される視差には誤差が生じ得る。そのため、このような誤差を補正することが好ましい。誤差を含む視差画像を用いて立体視表示を行なうと、視差が局所的に大きく変動するなどの違和感をユーザーに与える可能性がある。   Such a parallax image is generated by calculating the parallax between the input images. However, an error may occur in the calculated parallax due to various factors. Therefore, it is preferable to correct such an error. When stereoscopic display is performed using a parallax image including an error, there is a possibility of giving the user a sense of incongruity such that the parallax greatly varies locally.

このような視差画像の補正に関して、以下のような先行技術が知られている。
特開2001−116513号公報(特許文献1)は、より密に物体までの距離分布を算出する、ステレオ照合における相関演算装置を開示する。より具体的には、この相関演算装置は、一対の撮像装置で物体を撮像し、その一方の画像データに測定点を設定し、他方の画像とx方向に沿ってシティブロック距離による相関演算を行なうことで相関曲線を得る。そして、相関演算装置は、相関曲線の複数の極小値に視差候補を設定し、極小値及び極小部の頂角から視差候補の信頼度を判定する。さらに、相関演算装置は、所定のレベル以上であればその候補を高信頼度測定点とし、以下であれば低信頼度測定点とする。また、相関演算装置は、低信頼度測定点が2方向で高信頼度測定点と連続していれば、低信頼度測定点の視差候補からそれらの視差に最も近い視差を選択する。これにより、物体を構成する高信頼度測定点の数が多くなり、その視差から物体までの距離分布が密に求まる。
The following prior arts are known for such parallax image correction.
Japanese Patent Laying-Open No. 2001-116513 (Patent Document 1) discloses a correlation calculation device in stereo matching that calculates a distance distribution to an object more densely. More specifically, this correlation calculation device images an object with a pair of imaging devices, sets a measurement point in one of the image data, and performs a correlation calculation based on the city block distance along the other image with the x direction. A correlation curve is obtained by performing. Then, the correlation calculation device sets a parallax candidate for a plurality of minimum values of the correlation curve, and determines the reliability of the parallax candidate from the minimum value and the apex angle of the minimum portion. Further, the correlation calculation device sets the candidate as a high reliability measurement point if it is above a predetermined level, and sets it as a low reliability measurement point if it is below. Further, if the low reliability measurement point is continuous with the high reliability measurement point in two directions, the correlation calculation device selects the parallax closest to the parallax from the parallax candidates of the low reliability measurement point. As a result, the number of high reliability measurement points constituting the object increases, and the distance distribution from the parallax to the object can be obtained densely.

特開2003−269917号公報(特許文献2)は、信頼度が低い部分を含む画像においても、照度及び対象物に関係なく、高精度に距離情報を取得することができる距離計測方法などを開示する。この距離計測方法では、異なるパラメータで、ステレオカメラにより撮像された複数枚のステレオ画像から、夫々複数の信頼度画像及び距離画像が生成される。これらの画像から、信頼度画像内の所定の閾値より高い高信頼度領域における距離画像の距離データが合成され、低信頼度領域における距離データは高信頼度領域における距離データにより補間し、距離画像が生成される。   Japanese Patent Laying-Open No. 2003-269917 (Patent Document 2) discloses a distance measurement method and the like that can acquire distance information with high accuracy even in an image including a portion with low reliability regardless of illuminance and an object. To do. In this distance measurement method, a plurality of reliability images and distance images are generated from a plurality of stereo images captured by a stereo camera with different parameters. From these images, the distance data of the distance image in the high reliability area higher than the predetermined threshold in the reliability image is synthesized, and the distance data in the low reliability area is interpolated by the distance data in the high reliability area, and the distance image Is generated.

特開2001−116513号公報JP 2001-116513 A 特開2003−269917号公報JP 2003-269917 A

しかしながら、特許文献1に記載の相関演算装置では、近くにある信頼度の高い点という条件に基づいて判断するものであり、信頼度の高い点が同一のオブジェクトではない可能性がある。そのため、例えば、隣接した2物体が被写体である場合などには、全く異なる視差を用いて補正してしまう可能性がある。   However, in the correlation calculation device described in Patent Document 1, the determination is made based on the condition of a nearby highly reliable point, and the highly reliable point may not be the same object. Therefore, for example, when two adjacent objects are subjects, there is a possibility that correction is performed using completely different parallax.

また、特許文献2に記載の距離計測方法では、信頼度が低い部分が存在した場合には、被写体を再度撮像する必要があり、より多くの処理時間を要するとともに、適用可能な用途が限定される。   In addition, in the distance measurement method described in Patent Document 2, if there is a portion with low reliability, it is necessary to image the subject again, which requires more processing time, and applicable applications are limited. The

そこで、本発明は、かかる問題を解決するためになされたものであり、その目的は、視差画像をより高い精度で補正できる画像処理装置、画像処理方法および画像処理プログラムを提供することである。   Therefore, the present invention has been made to solve such a problem, and an object thereof is to provide an image processing apparatus, an image processing method, and an image processing program capable of correcting a parallax image with higher accuracy.

本発明のある局面に従う画像処理装置は、被写体を異なる視点で撮像することで取得された少なくとも2つの入力画像から視差画像を生成するための視差画像生成手段と、視差画像生成手段によって生成された視差画像に含まれる画素についての信頼度を算出するための信頼度算出手段と、視差画像生成手段によって生成された視差画像を補正して出力するための視差画像補正手段とを含む。視差画像補正手段は、視差画像生成手段によって生成された視差画像に含まれる被補正画素の周辺にある画素の信頼度および色情報に基づいて、当該被補正画素についての補正画素候補としての適性を算出するための適性算出手段と、算出された適性に基づいて、当該被補正画素の補正に用いる画素を決定するための決定手段とを含む。   An image processing apparatus according to an aspect of the present invention is generated by a parallax image generating unit for generating a parallax image from at least two input images acquired by imaging a subject from different viewpoints, and the parallax image generating unit. Reliability calculation means for calculating the reliability of the pixels included in the parallax image, and parallax image correction means for correcting and outputting the parallax image generated by the parallax image generation means. The parallax image correcting means determines the suitability of the corrected pixel as a corrected pixel candidate based on the reliability and color information of the pixels around the corrected pixel included in the parallax image generated by the parallax image generating means. Suitability calculating means for calculating and determining means for determining a pixel to be used for correcting the corrected pixel based on the calculated suitability.

好ましくは、色情報は、被補正画素の周辺にある画素の色の分布を含む。
好ましくは、色情報は、被補正画素の周辺にある画素の各色の周波数情報を含む。
Preferably, the color information includes a color distribution of pixels around the corrected pixel.
Preferably, the color information includes frequency information of each color of a pixel around the corrected pixel.

好ましくは、適性算出手段は、色情報と被補正画素からの距離とに基づいて、適性を算出する。   Preferably, the aptitude calculation means calculates aptitude based on the color information and the distance from the corrected pixel.

好ましくは、適性算出手段は、被補正画素の周辺にある画素のうち、対応する信頼度が所定値を超えたものについて適性を算出する。   Preferably, the aptitude calculation means calculates the aptitude for the pixels around the corrected pixel whose corresponding reliability exceeds a predetermined value.

好ましくは、決定手段は、適性が所定値を超える画素が存在しない場合には、適性にかかわらず、被補正画素の周辺にある画素を補正に用いる。   Preferably, when there is no pixel whose suitability exceeds a predetermined value, the determination unit uses pixels around the corrected pixel regardless of suitability.

好ましくは、視差画像生成手段は、少なくとも2つの入力画像に対する対応点探索処理の結果に基づいて視差画像を生成し、信頼度算出手段は、対応点探索処理における評価値に基づいて信頼度を算出する。   Preferably, the parallax image generation unit generates a parallax image based on the result of the corresponding point search process for at least two input images, and the reliability calculation unit calculates the reliability based on the evaluation value in the corresponding point search process To do.

さらに好ましくは、対応点探索処理は、位相限定相関法による対応点探索処理を含む。
さらに好ましくは、適性算出手段は、位相限定相関法による対応点探索処理において算出される周波数情報に基づいて、適性を算出する。
More preferably, the corresponding point search process includes a corresponding point search process using a phase only correlation method.
More preferably, the aptitude calculation means calculates aptitude based on frequency information calculated in the corresponding point search process by the phase only correlation method.

本発明の別の局面に従う画像処理方法は、被写体を異なる視点で撮像することで取得された少なくとも2つの入力画像から視差画像を生成するステップと、生成された視差画像に含まれる画素についての信頼度を算出するステップと、生成された視差画像を補正して出力するステップとを含む。視差画像を補正して出力するステップは、生成された視差画像に含まれる被補正画素の周辺にある画素の信頼度および色情報に基づいて、当該被補正画素についての補正画素候補としての適性を算出するステップと、算出された適性に基づいて、当該被補正画素の補正に用いる画素を決定するステップとを含む。   An image processing method according to another aspect of the present invention includes a step of generating a parallax image from at least two input images acquired by capturing an image of a subject from different viewpoints, and a trust for pixels included in the generated parallax image. A step of calculating the degree, and a step of correcting and outputting the generated parallax image. In the step of correcting and outputting the parallax image, based on the reliability and color information of the pixels around the corrected pixel included in the generated parallax image, the suitability of the corrected pixel as a corrected pixel candidate is determined. A step of calculating, and a step of determining a pixel to be used for correcting the corrected pixel based on the calculated aptitude.

本発明のさらに別の局面に従う画像処理プログラムは、コンピューターに画像処理を実行させる画像処理プログラムであって、コンピューターを、被写体を異なる視点で撮像することで取得された少なくとも2つの入力画像から視差画像を生成するための視差画像生成手段と、視差画像生成手段によって生成された視差画像に含まれる画素についての信頼度を算出するための信頼度算出手段と、視差画像生成手段によって生成された視差画像を補正して出力するための視差画像補正手段として機能させ、視差画像補正手段は、視差画像生成手段によって生成された視差画像に含まれる被補正画素の周辺にある画素の信頼度および色情報に基づいて、当該被補正画素についての補正画素候補としての適性を算出するための適性算出手段と、算出された適性に基づいて、当該被補正画素の補正に用いる画素を決定するための決定手段とを含む。   An image processing program according to still another aspect of the present invention is an image processing program for causing a computer to execute image processing, and a parallax image from at least two input images acquired by imaging the subject from different viewpoints. A parallax image generated by the parallax image generating unit, a reliability calculating unit for calculating the reliability of the pixels included in the parallax image generated by the parallax image generating unit, and the parallax image generated by the parallax image generating unit The parallax image correction unit functions as a reliability and color information of pixels around the corrected pixel included in the parallax image generated by the parallax image generation unit. An aptitude calculation means for calculating the aptitude of the corrected pixel as the correction pixel candidate based on The Based on suitability, and a determination means for determining the pixel used for correction of the object to be corrected pixel.

本発明によれば、視差画像をより高い精度で補正できる。   According to the present invention, a parallax image can be corrected with higher accuracy.

本発明の実施の形態に従う画像処理装置をパーソナルコンピューターにより実現した場合の構成を示すブロック図である。It is a block diagram which shows the structure at the time of implement | achieving the image processing apparatus according to embodiment of this invention with a personal computer. 本発明の実施の形態に従う画像処理装置をデジタルカメラ類似の構成により実現した場合の構成を示すブロック図である。It is a block diagram which shows the structure at the time of implement | achieving the image processing apparatus according to embodiment of this invention by the structure similar to a digital camera. 本発明の実施の形態に従う画像処理装置の機能構成を示すブロック図である。It is a block diagram which shows the function structure of the image processing apparatus according to embodiment of this invention. 本発明の実施の形態に従う画像処理装置における全体処理手順を示すフローチャートである。It is a flowchart which shows the whole process sequence in the image processing apparatus according to the embodiment of the present invention. 本発明の実施の形態に従う対応点探索処理の内容を説明するための図である。It is a figure for demonstrating the content of the corresponding point search process according to embodiment of this invention. 本発明の実施の形態に従う対応点探索処理によって生成される視差画像の一例を示す図である。It is a figure which shows an example of the parallax image produced | generated by the corresponding point search process according to embodiment of this invention. 本発明の実施の形態に従う補正画素候補の抽出処理の内容を説明するための図である。It is a figure for demonstrating the content of the extraction process of the correction pixel candidate according to embodiment of this invention. 本発明の実施の形態に従う適性の算出処理の内容を説明するための図である。It is a figure for demonstrating the content of the calculation process of the aptitude according to embodiment of this invention. 本発明の実施の形態に従う適性の算出処理の内容を説明するための図である。It is a figure for demonstrating the content of the calculation process of the aptitude according to embodiment of this invention. 本発明の実施の形態に従う適性の算出処理の内容を説明するための図である。It is a figure for demonstrating the content of the calculation process of the aptitude according to embodiment of this invention. 本発明の実施の形態に従う適性の算出処理の内容を説明するための図である。It is a figure for demonstrating the content of the calculation process of the aptitude according to embodiment of this invention. 本発明の実施の形態に従う適性の算出処理の内容を説明するための図である。It is a figure for demonstrating the content of the calculation process of the aptitude according to embodiment of this invention.

本発明の実施の形態について、図面を参照しながら詳細に説明する。なお、図中の同一または相当部分については、同一符号を付してその説明は繰り返さない。   Embodiments of the present invention will be described in detail with reference to the drawings. In addition, about the same or equivalent part in a figure, the same code | symbol is attached | subjected and the description is not repeated.

<A.概要>
本発明の実施の形態に従う画像処理装置は、被写体を異なる視点で撮像することで取得された少なくとも2つの入力画像から視差画像を生成する。視差画像の生成にあたって、対応点探索処理などの失敗によって、視差画像に誤差が生じる場合がある。そこで、本実施の形態に従う画像処理装置では、画素の信頼度だけではなく、画素の色情報に基づいて、ある被補正画素を補正するために使用されることの適性を周辺の補正画素候補について評価する。そして、それぞれの補正画素候補についての適性に基づいて、当該被補正画素の補正に用いる補正画素候補を決定する。これにより、より補正の精度を高めることができる。
<A. Overview>
The image processing device according to the embodiment of the present invention generates a parallax image from at least two input images acquired by imaging a subject from different viewpoints. When generating a parallax image, an error may occur in the parallax image due to a failure such as a corresponding point search process. Therefore, in the image processing apparatus according to the present embodiment, the suitability of being used for correcting a certain corrected pixel based on not only the pixel reliability but also the color information of the pixel is determined for peripheral correction pixel candidates. evaluate. Then, based on suitability for each correction pixel candidate, a correction pixel candidate used for correcting the correction target pixel is determined. Thereby, the correction accuracy can be further improved.

<B.システム構成>
まず、本発明の実施の形態に従う画像処理装置の構成について説明する。
<B. System configuration>
First, the configuration of the image processing apparatus according to the embodiment of the present invention will be described.

[b1:パーソナルコンピューターによる実現例]
図1は、本発明の実施の形態に従う画像処理装置をパーソナルコンピューターにより実現した場合の構成を示すブロック図である。
[B1: Example using a personal computer]
FIG. 1 is a block diagram showing a configuration when an image processing apparatus according to an embodiment of the present invention is realized by a personal computer.

図1を参照して、画像処理装置100は、主として、汎用的なアーキテクチャーを有するコンピューター上に実装される。図1を参照して、画像処理装置100は、主たるコンポーネントとして、CPU(Central Processing Unit)102と、RAM(Random Access Memory)104と、ROM(Read Only Memory)106と、ネットワークインターフェイス(I/F)108と、補助記憶装置110と、表示部120と、入力部122と、メモリーカードインターフェイス(I/F)124とを含む。各コンポーネントは、バス130を介して、互いに通信可能に接続されている。   Referring to FIG. 1, an image processing apparatus 100 is mainly implemented on a computer having a general-purpose architecture. Referring to FIG. 1, an image processing apparatus 100 includes, as main components, a CPU (Central Processing Unit) 102, a RAM (Random Access Memory) 104, a ROM (Read Only Memory) 106, and a network interface (I / F). ) 108, auxiliary storage device 110, display unit 120, input unit 122, and memory card interface (I / F) 124. Each component is communicably connected to each other via a bus 130.

CPU102は、ROM106や補助記憶装置110などに格納された、オペレーティングシステム(OS:Operating System)や画像処理プログラムなどの各種プログラムを実行することで、画像処理装置100の全体を制御する。RAM104は、CPU102でプログラムを実行するためのワーキングメモリとして機能し、プログラムの実行に必要な各種データを一次的に格納する。ROM106は、画像処理装置100において起動時に実行される初期プログラム(ブートプログラム)などを格納する。   The CPU 102 controls the entire image processing apparatus 100 by executing various programs such as an operating system (OS) and an image processing program stored in the ROM 106 and the auxiliary storage device 110. The RAM 104 functions as a working memory for executing a program by the CPU 102, and temporarily stores various data necessary for executing the program. The ROM 106 stores an initial program (boot program) that is executed when the image processing apparatus 100 is started.

ネットワークインターフェイス108は、各種の通信媒体を介して、他の装置(サーバー装置など)とデータを遣り取りする。より具体的には、ネットワークインターフェイス108は、イーサネット(登録商標)などの有線回線(LAN(Local Area Network)やWAN(Wide Area Network)など)、および/または、無線LANなどの無線回線を介してデータ通信を行なう。   The network interface 108 exchanges data with other devices (such as server devices) via various communication media. More specifically, the network interface 108 is connected via a wired line (LAN (Local Area Network) or WAN (Wide Area Network)) such as Ethernet (registered trademark) and / or a wireless line such as a wireless LAN. Perform data communication.

補助記憶装置110は、典型的には、ハードディスクなどの大容量磁気記憶媒体などからなり、本実施の形態に従う各種を実現するための画像処理プログラム112および処理対象の入力画像114などを格納する。さらに、補助記憶装置110には、オペレーティングシステムなどのプログラムが格納されてもよい。   The auxiliary storage device 110 typically includes a large-capacity magnetic storage medium such as a hard disk, and stores an image processing program 112 for realizing various types according to the present embodiment, an input image 114 to be processed, and the like. Further, the auxiliary storage device 110 may store a program such as an operating system.

入力画像114は、被写体を異なる視点で撮像することで取得された少なくとも2つの画像を含む。但し、画像処理装置100本体が被写体を撮像する機能を有していなくともよい。この場合、後述するようなデジタルカメラに類似した機構を用いて、少なくとも2つの入力画像を取得し、それらの入力画像を任意の方法で画像処理装置100へ入力するようにしてもよい。より具体的には、上述のネットワークインターフェイス108やメモリーカードインターフェイス124を介して、入力画像が画像処理装置100へ入力される。   The input image 114 includes at least two images acquired by imaging the subject from different viewpoints. However, the main body of the image processing apparatus 100 may not have a function of capturing an image of a subject. In this case, at least two input images may be acquired using a mechanism similar to a digital camera as described later, and these input images may be input to the image processing apparatus 100 by an arbitrary method. More specifically, an input image is input to the image processing apparatus 100 via the network interface 108 and the memory card interface 124 described above.

表示部120は、オペレーティングシステムが提供するGUI(Graphical User Interface)画面や画像処理プログラム112の実行によって生成される画像などを表示する。好ましくは、表示部120は、画像処理プログラム112の実行によって生成される視差画像を用いて生成される立体視画像を用いて、被写体を立体視表示できることが好ましい。この場合、表示部120としては、3次元表示方式に対応した任意の表示デバイスによって構成される。このような3次元表示方式としては、パララックスバリア方式などを採用することができる。このパララックスバリア方式では、液晶表示面にパララックスバリアを設けることで、ユーザーの右眼で右眼用画像を視認させ、ユーザーの左眼で左眼用画像を視認させることができる。あるいは、シャッタメガネ方式を採用してもよい。このシャッタメガネ方式では、左眼用画像および右眼用画像を交互に高速で切り替えて表示するとともに、この画像の切り替えに同期して開閉するシャッターが搭載された専用メガネをユーザーが装着することで、立体視表示を楽しむことができる。   The display unit 120 displays a GUI (Graphical User Interface) screen provided by the operating system, an image generated by executing the image processing program 112, and the like. Preferably, the display unit 120 can stereoscopically display the subject using a stereoscopic image generated using a parallax image generated by executing the image processing program 112. In this case, the display unit 120 is configured by an arbitrary display device that supports a three-dimensional display method. As such a three-dimensional display method, a parallax barrier method or the like can be employed. In this parallax barrier method, by providing a parallax barrier on the liquid crystal display surface, the right eye image can be visually recognized by the user's right eye, and the left eye image can be visually recognized by the user's left eye. Alternatively, a shutter glasses method may be adopted. In this shutter glasses method, the left eye image and the right eye image are alternately switched at high speed and displayed, and the user wears special glasses equipped with a shutter that opens and closes in synchronization with the switching of the image. , You can enjoy stereoscopic display.

入力部122は、典型的には、キーボード、マウス、タッチパネルなどからなり、ユーザーから受付けた指示の内容をCPU102などへ出力する。   The input unit 122 typically includes a keyboard, a mouse, a touch panel, and the like, and outputs the content of instructions received from the user to the CPU 102 or the like.

メモリーカードインターフェイス124は、SD(Secure Digital)カードやCF(Compact Flash(登録商標))カードなどの各種メモリーカード(不揮発性記憶媒体)126との間で、データの読み書きを行なう。典型的には、メモリーカードインターフェイス124には、何らかの装置で取得した入力画像を格納したメモリーカード126が装着され、そのメモリーカード126から読み出された入力画像が補助記憶装置110へ格納(コピー)される。   The memory card interface 124 reads / writes data from / to various memory cards (non-volatile storage media) 126 such as an SD (Secure Digital) card and a CF (Compact Flash (registered trademark)) card. Typically, a memory card 126 storing an input image acquired by any device is attached to the memory card interface 124, and the input image read from the memory card 126 is stored (copied) in the auxiliary storage device 110. Is done.

補助記憶装置110に格納される画像処理プログラム112は、CD−ROM(Compact Disk-Read Only Memory)などの記憶媒体に格納されて流通し、あるいは、ネットワークを介してサーバー装置などから配信される。画像処理プログラム112は、画像処理装置100(パーソナルコンピューター)で実行されるオペレーティングシステムの一部として提供されるプログラムモジュールのうち必要なモジュールを、所定のタイミングおよび順序で呼出して処理を実現するようにしてもよい。この場合、画像処理プログラム112自体には、オペレーティングシステムによって提供されるモジュールは含まれず、オペレーティングシステムと協働して画像処理が実現される。また、画像処理プログラム112は、単体のプログラムではなく、何らかのプログラムの一部に組込まれて提供されてもよい。このような場合にも、画像処理プログラム112自体には、当該何らかのプログラムにおいて共通に利用されるようなモジュールは含まれず、当該何らかのプログラムと協働して画像処理が実現される。このような一部のモジュールを含まない画像処理プログラム112であっても、本実施の形態に従う画像処理装置100の趣旨を逸脱するものではない。   The image processing program 112 stored in the auxiliary storage device 110 is stored and distributed in a storage medium such as a CD-ROM (Compact Disk-Read Only Memory), or distributed from a server device or the like via a network. The image processing program 112 calls a necessary module among program modules provided as part of an operating system executed by the image processing apparatus 100 (personal computer) at a predetermined timing and in order to realize the processing. May be. In this case, the image processing program 112 itself does not include a module provided by the operating system, and image processing is realized in cooperation with the operating system. Further, the image processing program 112 may be provided by being incorporated in a part of some program instead of a single program. Even in such a case, the image processing program 112 itself does not include a module that is commonly used in the program, and image processing is realized in cooperation with the program. Even such an image processing program 112 that does not include some modules does not depart from the spirit of the image processing apparatus 100 according to the present embodiment.

さらに、画像処理プログラム112によって提供される機能の一部または全部を専用のハードウェアによって実現してもよい。   Furthermore, part or all of the functions provided by the image processing program 112 may be realized by dedicated hardware.

[b2:デジタルカメラ類似の構成による実現例]
図2は、本発明の実施の形態に従う画像処理装置をデジタルカメラ類似の構成により実現した場合の構成を示すブロック図である。
[B2: Realization example with a configuration similar to a digital camera]
FIG. 2 is a block diagram showing a configuration when the image processing apparatus according to the embodiment of the present invention is realized by a configuration similar to a digital camera.

図2を参照して、画像処理装置200は、実際に被写体を撮像することで少なくとも2つの入力画像を取得し、この取得した入力画像を用いて視差画像を出力できる。画像処理装置200は、主たるコンポーネントとして、画像処理エンジン202と、入力部204と、表示部206と、一対のレンズ212,222と、一対のCCD(Charge Coupled Device)イメージセンサー214,224とを含む。   Referring to FIG. 2, the image processing apparatus 200 can acquire at least two input images by actually capturing a subject, and can output a parallax image using the acquired input images. The image processing apparatus 200 includes an image processing engine 202, an input unit 204, a display unit 206, a pair of lenses 212 and 222, and a pair of CCD (Charge Coupled Device) image sensors 214 and 224 as main components. .

画像処理エンジン202は、本実施の形態に従う画像処理を含む各種のデジタル処理を実行する。画像処理エンジン202は、典型的には、DSP(Digital Signal Processor)、ASIC(Application Specific Integrated Circuit)、LSI(Large Scale Integration)、FPGA(Field-Programmable Gate Array)などからなる。   The image processing engine 202 executes various digital processes including image processing according to the present embodiment. The image processing engine 202 typically includes a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an LSI (Large Scale Integration), an FPGA (Field-Programmable Gate Array), and the like.

入力部204は、典型的には、各種キーボタン、タッチパネルなどからなり、ユーザーから受付けた指示の内容を画像処理エンジン202へ出力する。   The input unit 204 typically includes various key buttons, a touch panel, and the like, and outputs the contents of instructions received from the user to the image processing engine 202.

表示部206は、被写体の撮像などに関するユーザーインターフェイス画面を表示する。好ましくは、表示部206は、画像処理エンジン202によって生成される視差画像を用いて生成される立体視画像を用いて、被写体を立体視表示できることが好ましい。この場合、表示部206としては、上述の表示部120(図1)と同様に、3次元表示方式に対応した任意の表示デバイスによって構成される。   The display unit 206 displays a user interface screen related to imaging of a subject. Preferably, the display unit 206 can stereoscopically display the subject using a stereoscopic image generated using a parallax image generated by the image processing engine 202. In this case, the display unit 206 is configured by an arbitrary display device corresponding to the three-dimensional display method, similarly to the above-described display unit 120 (FIG. 1).

一対のレンズ212,222は、画像処理装置200の本体の異なる位置に設けられており、被写体を異なる視点でそれぞれ撮像することできる。すなわち、一対のレンズ212,222には、被写体からの互いに異なる反射光がそれぞれ入射する。一対のCCD214,224は、一対のレンズ212,222にそれぞれ対応付けられており、レンズ212,222によって集光された被写体からの光(像)を受光するとともに、その像を示す電気信号を画像処理エンジン202へ出力する。   The pair of lenses 212 and 222 are provided at different positions on the main body of the image processing apparatus 200, and can image the subject from different viewpoints. That is, different reflected lights from the subject are incident on the pair of lenses 212 and 222, respectively. The pair of CCDs 214 and 224 are associated with the pair of lenses 212 and 222, respectively, receive light (image) from the subject condensed by the lenses 212 and 222, and receive an electrical signal indicating the image as an image. Output to the processing engine 202.

[b3:その他の構成による実現例]
上述したパーソナルコンピューターにより実現する例、および、デジタルカメラ類似の構成による実現する例に加えて、携帯電話上に実装してもよい。さらに、少なくとも1つのサーバー装置が本実施の形態に従う処理を実現する、いわゆるクラウドサービスのような形態であってもよい。この場合、ユーザーは、自身の端末(パーソナルコンピューターやスマートフォンなど)を用いて、少なくとも2つの入力画像をサーバー装置(クラウド側)へ送信し、当該送信された入力画像に対して、サーバー装置側が本実施の形態に従う画像処理を行なうような構成が想定される。さらに、サーバー装置側がすべての機能(処理)を行なう必要はなく、ユーザー側の端末とサーバー装置とが協働して、本実施の形態に従う画像処理を実現するようにしてもよい。
[B3: Implementation example with other configuration]
In addition to the example realized by the personal computer described above and the example realized by a configuration similar to a digital camera, it may be mounted on a mobile phone. Further, it may be in the form of a so-called cloud service in which at least one server device realizes processing according to the present embodiment. In this case, the user transmits at least two input images to the server device (cloud side) using his / her terminal (such as a personal computer or a smart phone), and the server device side transmits the input image to the transmitted input image. A configuration that performs image processing according to the embodiment is assumed. Furthermore, it is not necessary for the server device side to perform all functions (processing), and the user side terminal and the server device may cooperate to realize the image processing according to the present embodiment.

<C.機能構成>
次に、本実施の形態に従う画像処理装置の機能構成について説明する。
<C. Functional configuration>
Next, the functional configuration of the image processing apparatus according to the present embodiment will be described.

図3は、本発明の実施の形態に従う画像処理装置の機能構成を示すブロック図である。図3を参照して、本実施の形態に従う画像処理装置は、その機能構成として、視差画像生成部10と、信頼度算出部20と、視差画像補正部30とを含む。これらの機能構成は、図1に示す画像処理装置100においては、CPU102が画像処理プログラムを実行することで実現され、図2に示す画像処理装置200においては、画像処理エンジン202によって実現される。   FIG. 3 is a block diagram showing a functional configuration of the image processing apparatus according to the embodiment of the present invention. Referring to FIG. 3, the image processing device according to the present embodiment includes a parallax image generation unit 10, a reliability calculation unit 20, and a parallax image correction unit 30 as functional configurations. These functional configurations are realized by the CPU 102 executing an image processing program in the image processing apparatus 100 shown in FIG. 1, and realized by the image processing engine 202 in the image processing apparatus 200 shown in FIG. 2.

視差画像生成部10は、少なくとも2つの入力画像(図3に示す例では、入力画像AおよびB)から視差画像を生成する。この少なくとも2つの入力画像は、被写体を異なる視点で撮像することで取得される。より具体的には、視差画像生成部10は、少なくとも2つの入力画像に対する対応点探索処理の結果に基づいて視差画像を生成する。この対応点探索処理およびその結果に基づく視差画像の生成処理の詳細については後述する。   The parallax image generation unit 10 generates a parallax image from at least two input images (in the example illustrated in FIG. 3, the input images A and B). The at least two input images are acquired by imaging the subject from different viewpoints. More specifically, the parallax image generation unit 10 generates a parallax image based on the result of the corresponding point search process for at least two input images. Details of the corresponding point search process and the parallax image generation process based on the result will be described later.

信頼度算出部20は、視差画像生成部10によって生成された視差画像に含まれる画素についての信頼度を算出する。より具体的には、信頼度算出部20は、視差画像生成部10での対応点探索処理における評価値に基づいて信頼度を算出する。この信頼度の算出処理の詳細については後述する。   The reliability calculation unit 20 calculates the reliability of the pixels included in the parallax image generated by the parallax image generation unit 10. More specifically, the reliability calculation unit 20 calculates the reliability based on the evaluation value in the corresponding point search process in the parallax image generation unit 10. Details of the reliability calculation process will be described later.

視差画像補正部30は、視差画像生成部10によって生成された視差画像を補正して出力する。この出力される補正後の視差画像を視差画像(補正後)とも記す。視差画像補正部30は、視差画像に含まれる画素の単位で視差を補正する。より具体的には、視差画像補正部30は、被補正画素抽出部31と、適性算出部32と、決定部33と、補正実行部34とを含む。被補正画素抽出部31は、視差画像生成部10によって生成された視差画像に含まれる画素のうち、その視差を補正すべきである対象の画素(以下「被補正画素」とも称す。)を抽出する。適性算出部32は、視差画像生成部10によって生成された視差画像に含まれる被補正画素の周辺にある画素の信頼度および色情報に基づいて、当該被補正画素についての補正画素候補としての適性を算出する。決定部33は、算出された適性に基づいて、当該被補正画素の補正に用いる画素を決定する。補正実行部34は、被補正画素を決定部33によって決定された画素の情報で補正する。視差画像の補正処理の詳細については後述する。   The parallax image correction unit 30 corrects and outputs the parallax image generated by the parallax image generation unit 10. This output parallax image after correction is also referred to as parallax image (after correction). The parallax image correction unit 30 corrects the parallax in units of pixels included in the parallax image. More specifically, the parallax image correction unit 30 includes a corrected pixel extraction unit 31, an aptitude calculation unit 32, a determination unit 33, and a correction execution unit 34. The corrected pixel extracting unit 31 extracts a target pixel (hereinafter, also referred to as “corrected pixel”) whose parallax should be corrected among the pixels included in the parallax image generated by the parallax image generating unit 10. To do. Based on the reliability and color information of the pixels around the corrected pixel included in the parallax image generated by the parallax image generation unit 10, the aptitude calculation unit 32 determines the aptitude of the corrected pixel as a correction pixel candidate. Is calculated. The determination unit 33 determines a pixel to be used for correcting the correction target pixel based on the calculated aptitude. The correction execution unit 34 corrects the corrected pixel with the pixel information determined by the determination unit 33. Details of the parallax image correction processing will be described later.

<D.全体処理手順>
次に、本実施の形態に従う画像処理装置における全体処理手順について説明する。
<D. Overall procedure>
Next, an overall processing procedure in the image processing apparatus according to the present embodiment will be described.

図4は、本発明の実施の形態に従う画像処理装置における全体処理手順を示すフローチャートである。図4を参照して、画像処理装置(視差画像生成部10)は、少なくとも2つの入力画像を取得する(ステップS2)。続いて、画像処理装置(視差画像生成部10)は、取得した少なくとも2つの入力画像に対して対応点探索処理を実行する(ステップS4)。そして、画像処理装置(視差画像生成部10)は、対応点探索処理の結果に基づいて、視差画像を生成する(ステップS6)。   FIG. 4 is a flowchart showing an overall processing procedure in the image processing apparatus according to the embodiment of the present invention. Referring to FIG. 4, the image processing apparatus (parallax image generation unit 10) acquires at least two input images (step S2). Subsequently, the image processing apparatus (parallax image generation unit 10) performs corresponding point search processing on the acquired at least two input images (step S4). Then, the image processing apparatus (parallax image generation unit 10) generates a parallax image based on the result of the corresponding point search process (step S6).

このステップS4およびS6の処理と並行して、または、連続して、画像処理装置(信頼度算出部20)は、生成された視差画像に含まれるそれぞれの画素についての信頼度を算出する(ステップS8)。   In parallel with or in succession to the processes of steps S4 and S6, the image processing apparatus (reliability calculation unit 20) calculates the reliability of each pixel included in the generated parallax image (step). S8).

これらの処理が完了すると、以下に示す視差画像の補正処理が実行される。
すなわち、画像処理装置(被補正画素抽出部31)は、ステップS6において生成された視差画像に含まれる画素を注目画素に設定する(ステップS10)。そして、画像処理装置(被補正画素抽出部31)は、設定した注目画素が被補正画素であるか否かを判断する(ステップS12)。設定した注目画素が被補正画素ではない場合(ステップS12においてNOの場合)には、処理は、ステップS20へ進む。
When these processes are completed, the following parallax image correction process is executed.
That is, the image processing apparatus (corrected pixel extraction unit 31) sets a pixel included in the parallax image generated in step S6 as a target pixel (step S10). Then, the image processing apparatus (corrected pixel extraction unit 31) determines whether or not the set target pixel is a corrected pixel (step S12). If the set target pixel is not a corrected pixel (NO in step S12), the process proceeds to step S20.

設定した注目画素が被補正画素である場合(ステップS12においてYESの場合)には、画像処理装置(適性算出部32)は、注目画素(被補正画素)の周辺にある画素の信頼度および色情報に基づいて、当該被補正画素についての補正画素候補としての適性を算出する(ステップS14)。続いて、画像処理装置(決定部33)は、ステップS14において算出された適性に基づいて、被補正画素の補正に用いる画素を決定する(ステップS16)。そして、画像処理装置(補正実行部34)は、ステップS16において決定された画素の情報で被補正画素を補正する(ステップS18)。そして、処理は、ステップS20へ進む。   If the set target pixel is a corrected pixel (YES in step S12), the image processing apparatus (appropriate calculation unit 32) determines the reliability and color of pixels around the target pixel (corrected pixel). Based on the information, the suitability of the corrected pixel as a corrected pixel candidate is calculated (step S14). Subsequently, the image processing apparatus (determination unit 33) determines a pixel to be used for correcting the correction target pixel based on the suitability calculated in step S14 (step S16). Then, the image processing apparatus (correction execution unit 34) corrects the corrected pixel with the pixel information determined in step S16 (step S18). Then, the process proceeds to step S20.

ステップS20において、画像処理装置(被補正画素抽出部31)は、ステップS6において生成された視差画像に含まれるすべての画素が注目画素に設定済であるか否かを判断する。ステップS6において生成された視差画像に含まれる画素のうち注目画素に設定されていない画素が存在する場合(ステップS20においてNOの場合)には、画像処理装置(被補正画素抽出部31)は、注目画素に設定されたことのないいずれかの画素を注目画素に設定する(ステップS22)。そして、ステップS12以下の処理が再度実行される。   In step S20, the image processing apparatus (corrected pixel extraction unit 31) determines whether or not all the pixels included in the parallax image generated in step S6 have been set as the target pixel. When there is a pixel that is not set as the target pixel among the pixels included in the parallax image generated in step S6 (in the case of NO in step S20), the image processing device (corrected pixel extraction unit 31) Any pixel that has not been set as the target pixel is set as the target pixel (step S22). And the process after step S12 is performed again.

ステップS6において生成された視差画像に含まれるすべての画素が注目画素に設定済である場合(ステップS20においてYESの場合)には、画像処理装置は、補正後の視差画像を出力する(ステップS24)。そして、処理は終了する。   If all the pixels included in the parallax image generated in step S6 have been set as the pixel of interest (YES in step S20), the image processing apparatus outputs a corrected parallax image (step S24). ). Then, the process ends.

以下、各ステップにおける処理の詳細について説明する。
<E.視差画像生成処理>
視差画像生成部10は、入力画像(入力画像Aおよび入力画像B)に対して、対応点探索処理を行なうとともに、その結果に基づいて、視差画像を生成する(図4のステップS2〜S6)。
Hereinafter, details of processing in each step will be described.
<E. Parallax image generation processing>
The parallax image generation unit 10 performs corresponding point search processing on the input images (the input image A and the input image B), and generates a parallax image based on the result (steps S2 to S6 in FIG. 4). .

図5は、本発明の実施の形態に従う対応点探索処理の内容を説明するための図である。図6は、本発明の実施の形態に従う対応点探索処理によって生成される視差画像の一例を示す図である。   FIG. 5 is a diagram for illustrating the contents of the corresponding point search process according to the embodiment of the present invention. FIG. 6 is a diagram showing an example of the parallax image generated by the corresponding point search process according to the embodiment of the present invention.

図5を参照して、視差画像生成部10は、入力された入力画像の間で、ある入力画像の任意の点(以下「注目点」とも称す。)に関して、他の入力画像において対応する点(以下「対応点」とも称す。)を探索する。なお、注目点を設定する入力画像を基準画像と称し、対応点を探索する入力画像を参照画像と称す。そして、注目点と対応点との間の位置ずれが視差に相当する。典型的には、一方の入力画像(基準画像)上の注目点の座標と、他方の入力画像(参照画像)上の対応点の座標との差(座標差)が視差として算出される。   With reference to FIG. 5, the parallax image generation unit 10 corresponds to an arbitrary point (hereinafter, also referred to as a “point of interest”) of a certain input image among other input images among the input images input. (Hereinafter also referred to as “corresponding point”). An input image for setting a point of interest is referred to as a standard image, and an input image for searching for a corresponding point is referred to as a reference image. And the position shift between an attention point and a corresponding point is equivalent to parallax. Typically, the difference (coordinate difference) between the coordinates of the target point on one input image (standard image) and the coordinates of the corresponding point on the other input image (reference image) is calculated as parallax.

視差画像生成部10は、基準画像に対して注目点を順次設定するとともに、対応する対応点を順次探索する。基本的には、この注目点は、所定の画素単位で設定される。理想的には、基準画像の各画素を注目点に設定するとともに、参照画像上の対応点を探索することが好ましい。処理速度や処理能力の制約から、所定領域(例えば、8画素×8画素)ごとに注目点を設定し、対応する対応点を探索するようにしてもよい。   The parallax image generation unit 10 sequentially sets attention points with respect to the reference image, and sequentially searches for corresponding points. Basically, this attention point is set in predetermined pixel units. Ideally, it is preferable to set each pixel of the base image as a point of interest and search for a corresponding point on the reference image. Due to limitations on processing speed and processing capacity, attention points may be set for each predetermined area (for example, 8 pixels × 8 pixels), and corresponding corresponding points may be searched.

それぞれ算出される視差は、被写体上の各部分についての距離情報を示す。すなわち、それぞれの視差は、レンズなどの撮像部から、被写体上の注目点に対応する領域までの距離を示す指標値である。視差が大きいほど、撮像部から被写体の注目点に対応する領域までの距離が短い、すなわち撮像部により近接していることを意味する。逆に、視差が小さいほど、撮像部から被写体の注目点に対応する領域までの距離が長い、すなわち撮像部からより離れていることを意味する。なお、この視差が生じる方向は、一対のレンズの位置関係に依存する。   The calculated parallax indicates distance information about each part on the subject. That is, each parallax is an index value indicating a distance from an imaging unit such as a lens to a region corresponding to the point of interest on the subject. The larger the parallax, the shorter the distance from the imaging unit to the area corresponding to the target point of the subject, that is, the closer the imaging unit is. Conversely, the smaller the parallax, the longer the distance from the imaging unit to the region corresponding to the target point of the subject, that is, the farther from the imaging unit. Note that the direction in which this parallax occurs depends on the positional relationship between the pair of lenses.

したがって、それぞれ算出される視差の大きさから、撮像部から被写体の各部までの距離(奥行き)を算出することができる。このような被写体の各部の距離を画像として表現したものを視差画像(あるいは、距離画像)と称す。   Therefore, the distance (depth) from the imaging unit to each part of the subject can be calculated from the calculated parallax size. Such a representation of the distance of each part of the subject as an image is referred to as a parallax image (or distance image).

図6には、視差画像の一例を示す。図6に示す視差画像においては、各領域の視差の大きさ(奥行き方向の位置)は、濃淡を用いて表現される。なお、図6に示す視差画像に対して、スムージング処理を行なってもよい。   FIG. 6 shows an example of a parallax image. In the parallax image shown in FIG. 6, the magnitude of the parallax (position in the depth direction) of each region is expressed using shading. In addition, you may perform a smoothing process with respect to the parallax image shown in FIG.

図5に示すような対応点探索処理は、典型的には、位相限定相関法(POC:Phase-Only Correlation)演算法、SAD(Sum of Absolute Difference)演算法、SSD(Sum of Squared Difference)演算法、NCC(Normalized Cross Correlation)演算法などを用いることができる。本実施の形態においては、一例として、POCによる対応点探索処理を用いる場合について説明する。   Corresponding point search processing as shown in FIG. 5 typically includes a phase-only correlation (POC) calculation method, a SAD (Sum of Absolute Difference) calculation method, and an SSD (Sum of Squared Difference) calculation. Method, NCC (Normalized Cross Correlation) calculation method, etc. can be used. In the present embodiment, as an example, a case of using corresponding point search processing by POC will be described.

POCでは、入力画像に含まれる位相成分を用いて対応点探索を行なう。より具体的には、入力画像に設定される処理領域(ウィンドウ)内に含まれる周波数情報(周波数成分)を算出し、この周波数成分の類似度(相関値)から対応点が探索される。本実施の形態においては、このPOCによる対応点探索処理において算出される周波数情報に基づいて、視差補正を行なうための適性が算出される。このような周波数成分を用いることで、適性の算出処理を効率化できる。   In POC, a corresponding point search is performed using a phase component included in an input image. More specifically, frequency information (frequency component) included in a processing region (window) set in the input image is calculated, and a corresponding point is searched from the similarity (correlation value) of the frequency component. In the present embodiment, the suitability for performing the parallax correction is calculated based on the frequency information calculated in the corresponding point search process by the POC. By using such frequency components, aptitude calculation processing can be made efficient.

<F.信頼度算出処理>
信頼度算出部20は、視差画像生成部10によって生成された視差画像に含まれる画素についての信頼度を算出する(図4のステップS8)。すなわち、信頼度は、対応点探索処理によって得られた対応点の各々がどの程度確からしいのかを示す指標である。信頼度算出部20は、典型的には、対応点探索処理によって算出された類似度(相関値)をそのまま信頼度として出力する。
<F. Reliability calculation processing>
The reliability calculation unit 20 calculates the reliability of the pixels included in the parallax image generated by the parallax image generation unit 10 (step S8 in FIG. 4). That is, the reliability is an index indicating how likely each of the corresponding points obtained by the corresponding point search process is. The reliability calculation unit 20 typically outputs the similarity (correlation value) calculated by the corresponding point search process as the reliability.

POCによる対応点探索処理を用いる場合には、算出されるPOC値(相関値)の最大値が信頼度に相当し、このPOC値が大きいほど信頼できると判断できる。   When using the corresponding point search process by POC, the maximum value of the calculated POC value (correlation value) corresponds to the reliability, and it can be determined that the larger the POC value, the more reliable.

SADによる対応点探索処理を用いる場合には、算出されるSAD値の最小値が信頼度に相当し、このSAD値が小さいほど信頼できると判断できる。   When the corresponding point search process by SAD is used, the minimum value of the calculated SAD value corresponds to the reliability, and it can be determined that the smaller the SAD value, the more reliable.

他の対応点探索処理においても、同様の思想によって信頼度を算出することができる。本発明は、対応点探索処理の種類およびその対応点探索処理の結果に従う信頼度の算出処理について限定されるものではない。   In other corresponding point search processing, the reliability can be calculated based on the same idea. The present invention is not limited to the type of corresponding point search process and the reliability calculation process according to the result of the corresponding point search process.

<G.視差補正処理>
本実施の形態においては、被補正画素の周辺にある画素の信頼度および色情報に基づいて、当該被補正画素についての補正画素候補としての適性を算出することで、視差画像をより適切に補正する。すなわち、視差画像の補正に際して、画素の色情報から補正画素候補としての適性を算出し、この算出された適性がより高いものを優先的に用いて、補正を行なう。
<G. Parallax correction processing>
In the present embodiment, the parallax image is corrected more appropriately by calculating the suitability of the pixel to be corrected as a correction pixel candidate based on the reliability and color information of the pixels around the pixel to be corrected. To do. That is, at the time of correcting the parallax image, the suitability as a candidate for the correction pixel is calculated from the color information of the pixel, and correction is performed by preferentially using the calculated suitability.

[g1:被補正画素の抽出処理]
被補正画素抽出部31は、視差画像生成部10によって生成された視差画像に含まれる画素のうち、その視差を補正すべきである対象の画素(被補正画素)を抽出する(図4のステップS12)。この被補正画素は、各画素についての信頼度の大きさに基づいて抽出される。
[G1: Extraction processing of corrected pixel]
The corrected pixel extraction unit 31 extracts a target pixel (corrected pixel) whose parallax should be corrected among the pixels included in the parallax image generated by the parallax image generation unit 10 (step of FIG. 4). S12). The corrected pixel is extracted based on the reliability level of each pixel.

典型的には、被補正画素抽出部31は、視差画像に含まれる画素のうち、その信頼度が低い画素を被補正画素として決定する。「信頼度が低い」という評価方法としては、絶対的評価方法および相対的評価方法のいずれについても採用することができる。前者の方法については、各画素の信頼度を予め設定したしきい値と比較し、当該しきい値より低い信頼度を有する画素を被補正画素として抽出する(例えば、α以下といった基準)。後者の方法については、視差画像に含まれる各画素の信頼度の分布について、下位側の所定範囲(例えば、β%以下といった基準)に含まれる画素を被補正画素として抽出する。   Typically, the corrected pixel extraction unit 31 determines a pixel having a low reliability among the pixels included in the parallax image as a corrected pixel. As an evaluation method of “low reliability”, both an absolute evaluation method and a relative evaluation method can be employed. As for the former method, the reliability of each pixel is compared with a preset threshold value, and a pixel having a reliability lower than the threshold value is extracted as a corrected pixel (for example, a criterion of α or less). With respect to the latter method, pixels included in a lower predetermined range (for example, a reference of β% or less) are extracted as corrected pixels in the reliability distribution of each pixel included in the parallax image.

[g2:適性算出処理]
適性算出部32は、視差画像生成部10によって生成された視差画像に含まれる被補正画素の周辺にある画素の信頼度および色情報に基づいて、被補正画素についての補正画素候補としての適性を算出する(図4のステップS14)。
[G2: Aptitude calculation process]
The aptitude calculation unit 32 determines the aptitude of the corrected pixel as a correction pixel candidate based on the reliability and color information of the pixels around the corrected pixel included in the parallax image generated by the parallax image generation unit 10. Calculate (step S14 in FIG. 4).

(i)補正画素候補の抽出処理
すべての画素が補正画素候補とはならないので、適性を算出する前に、補正画素候補になり得る画素を抽出しておくことが好ましい。この補正画素候補を抽出する典型的な方法としては、被補正画素の周辺の所定範囲内に存在する画素のうち、その信頼度が高い画素を補正画素候補として決定する。信頼度が低い画素は、補正「される」側の画素(すなわち、被補正画素)とすべきであり、補正画素候補としては不適切であることは明らかであるためである。
(I) Correction Pixel Candidate Extraction Process Since not all pixels are correction pixel candidates, it is preferable to extract pixels that can be correction pixel candidates before calculating suitability. As a typical method for extracting the correction pixel candidate, a pixel having a high reliability is determined as a correction pixel candidate among pixels existing within a predetermined range around the corrected pixel. This is because a pixel with low reliability should be a pixel to be corrected (that is, a pixel to be corrected), and is clearly inappropriate as a correction pixel candidate.

このように、被補正画素の周辺にある画素のうち、対応する信頼度が所定値を超えたものについて適性を算出することが好ましい。   As described above, it is preferable to calculate the aptitude of pixels around the corrected pixel whose corresponding reliability exceeds a predetermined value.

「信頼度が高い」という評価方法としては、上述と同様に、絶対的評価方法および相対的評価方法のいずれについても採用することができる。図7は、本発明の実施の形態に従う補正画素候補の抽出処理の内容を説明するための図である。   As an evaluation method of “high reliability”, both the absolute evaluation method and the relative evaluation method can be adopted as described above. FIG. 7 is a diagram for describing the contents of the correction pixel candidate extraction process according to the embodiment of the present invention.

前者の方法については、図7(a)に示すように、各画素の信頼度を予め設定したしきい値と比較し、当該しきい値より高い信頼度を有する画素を被補正画素として抽出する(例えば、α以上といった基準)。なお、このしきい値をパラメータとして入力できるようにしてもよい。   As for the former method, as shown in FIG. 7A, the reliability of each pixel is compared with a preset threshold value, and a pixel having a higher reliability than the threshold value is extracted as a corrected pixel. (For example, a criterion such as α or more). This threshold value may be input as a parameter.

後者の方法については、図7(b)に示すように、視差画像に含まれる各画素の信頼度の分布について、下位側の所定範囲(例えば、β%以上といった基準)に含まれる画素を被補正画素として抽出する。あるいは、被補正画素の信頼度を基準にしきい値を決定し、あるいは、距離画像に含まれる全画素の信頼度を基準にしきい値を決定(平均値や中央値)してもよい。   With respect to the latter method, as shown in FIG. 7B, the pixels included in the lower predetermined range (for example, a reference of β% or more) are covered in the reliability distribution of each pixel included in the parallax image. Extracted as correction pixels. Alternatively, the threshold value may be determined based on the reliability of the corrected pixel, or the threshold value may be determined (average value or median value) based on the reliability of all the pixels included in the distance image.

(ii)適性の算出処理(その1)
図8および図9は、本発明の実施の形態に従う適性の算出処理の内容を説明するための図である。
(Ii) Suitability calculation process (1)
8 and 9 are diagrams for describing the contents of the aptitude calculation processing according to the embodiment of the present invention.

図8(a)および図8(b)を参照して、適性算出部32は、典型的には、被補正画素の色情報と補正画素候補の色情報との差に基づいて適性を算出する。なお、被補正画素の色情報および補正画素候補の色情報は、入力画像の対応する画素における色情報を意味する。このとき、画素間の色情報の差が小さいほど、補正に用いる画素としての適性が高いといえる。すなわち、被補正画素の色情報と似ている色情報を有する画素ほど、補正画素候補としては相応しいと判断される。これは、色情報が近接していれば、被写体の同一部分を示している可能性が高いためである。   With reference to FIG. 8A and FIG. 8B, the aptitude calculation unit 32 typically calculates aptitude based on the difference between the color information of the corrected pixel and the color information of the correction pixel candidate. . Note that the color information of the pixel to be corrected and the color information of the correction pixel candidate means color information in a corresponding pixel of the input image. At this time, it can be said that the smaller the difference in color information between pixels, the higher the suitability as a pixel used for correction. That is, it is determined that a pixel having color information similar to the color information of the corrected pixel is more suitable as a correction pixel candidate. This is because if the color information is close, there is a high possibility of indicating the same part of the subject.

図8(a)には、RGB色空間を用いた例を示し、図8(b)には、CMY色空間を用いた例を示す。入力画像の各画素の色情報を定義する方法に応じて、適切な色空間座標を用いればよく、このとき、適性は、当該色空間における距離Dfに応じて算出される。   FIG. 8A shows an example using the RGB color space, and FIG. 8B shows an example using the CMY color space. Appropriate color space coordinates may be used according to a method of defining color information of each pixel of the input image, and suitability is calculated according to the distance Df in the color space.

なお、図8に示すような色情報が3次元の値を有する必要はない。すなわち、一色のみの色情報で適性を算出してもよい。この場合には、図9に示すような、1次元の座標系を用いて、適性が算出される。そのため、本実施の形態に従う方法は、グレイスケール画像に対しても適用可能である。   Note that the color information as shown in FIG. 8 need not have a three-dimensional value. That is, the suitability may be calculated using color information for only one color. In this case, suitability is calculated using a one-dimensional coordinate system as shown in FIG. Therefore, the method according to the present embodiment can be applied to a gray scale image.

(iii)適性の算出処理(その2)
さらに、色情報の差分に対して、対応する信頼度を重みとして付加してもよい。このように、色情報と信頼度とを用いることで、色情報の差が同程度の画素が複数ある場合には、より信頼度の高い画素が優先的に補正画素として用いられることになり、視差補正をより安定化させることができる。
(Iii) Suitability calculation process (2)
Furthermore, the corresponding reliability may be added as a weight to the difference in color information. In this way, by using the color information and the reliability, when there are a plurality of pixels having the same difference in color information, a pixel with higher reliability is preferentially used as a correction pixel. The parallax correction can be further stabilized.

この場合には、位相限定相関法(POC)による対応点探索処理において算出される周波数情報に基づいて適性を算出することが好ましい。このように、POCから周波数情報を受け取り、適性の算出に用いることで、不要な算出を削減し、高速な適性算出が可能となる。   In this case, it is preferable to calculate the aptitude based on the frequency information calculated in the corresponding point search process by the phase only correlation method (POC). Thus, by receiving frequency information from the POC and using it for calculating aptitude, unnecessary calculations can be reduced and high-speed aptitude calculation can be performed.

(iv)適性の算出処理(その3)
図10は、本発明の実施の形態に従う適性の算出処理の内容を説明するための図である。図10を参照して、適性の算出処理の別形態として、被補正画素およびその周辺画素の色の分布(テクスチャー)と補正画素候補およびその周辺画素の色の分布との差分に基づく算出方法を採用してもよい。すなわち、適性を算出するために用いられる色情報は、被補正画素の周辺にある画素の色の分布を含む。
(Iv) Suitability calculation process (part 3)
FIG. 10 is a diagram for describing the contents of the aptitude calculation process according to the embodiment of the present invention. Referring to FIG. 10, as another form of the aptitude calculation process, a calculation method based on the difference between the color distribution (texture) of the corrected pixel and its peripheral pixels and the color distribution of the correction pixel candidate and its peripheral pixels is used. It may be adopted. That is, the color information used for calculating the aptitude includes the color distribution of pixels around the corrected pixel.

典型的には、被補正画素を中心としてウィンドウを設定するとともに、補正画素候補を中心として同じサイズのウィンドウを設定する。そして、両ウィンドウ内の色の分布を比較して、両者の差が小さいほど補正に用いる画素としての適性が高いと判断する。すなわち、被補正画素の色の分布と情報と似ている色の分布を有するウィンドウほど、補正画素候補としては相応しいと判断される。これは、色の分布が近接していれば、被写体の同一部分を示している可能性が高いためである。この色の分布としては、より具体的には、ヒストグラムや周波数成分の振幅分布が用いられる。すなわち、適性の算出に用いる色情報は、被補正画素の周辺にある画素の各色の周波数情報を含む。   Typically, a window is set around the corrected pixel, and a window of the same size is set around the correction pixel candidate. Then, the color distributions in the two windows are compared, and the smaller the difference between the two, the higher the suitability as a pixel used for correction. That is, it is determined that a window having a color distribution similar to the color distribution of the pixel to be corrected is more suitable as a correction pixel candidate. This is because if the color distribution is close, it is highly likely that the same part of the subject is shown. More specifically, a histogram or an amplitude distribution of frequency components is used as the color distribution. That is, the color information used for calculating the aptitude includes frequency information of each color of the pixels around the corrected pixel.

(v)適性の算出処理(その4)
さらに、被補正画素と補正画素候補との間の画素間距離に応じた重みを付加してもよい。すなわち、色情報と被補正画素からの距離とに基づいて適性が算出される。
(V) Suitability calculation process (4)
Furthermore, a weight corresponding to the inter-pixel distance between the corrected pixel and the correction pixel candidate may be added. That is, the suitability is calculated based on the color information and the distance from the corrected pixel.

図11および図12は、本発明の実施の形態に従う適性の算出処理の内容を説明するための図である。図11に示すように、距離画像における被補正画素と補正画素候補との間の画素間距離Dに依存した重みが用いられる。一例として、図12に示すように、画素間距離Dがしきい値A以下であれば、重みを「1」に設定し、しきい値Aを超えてしきい値Bに到達するまでの範囲では、重みを漸減させてもよい。この例では、画素間距離Dがしきい値Bを超えれば、重みは「0」に設定される。言い換えれば、画素間距離Dがしきい値Bを超えている画素についての適性は「0」となる。そのため、このような画素については、補正対象画素としては選択されない。   11 and 12 are diagrams for describing the contents of the aptitude calculation processing according to the embodiment of the present invention. As shown in FIG. 11, the weight depending on the inter-pixel distance D between the corrected pixel and the correction pixel candidate in the distance image is used. As an example, as shown in FIG. 12, when the inter-pixel distance D is equal to or less than the threshold A, the weight is set to “1”, and the range from reaching the threshold B beyond the threshold A Then, the weight may be gradually decreased. In this example, if the inter-pixel distance D exceeds the threshold value B, the weight is set to “0”. In other words, the aptitude for a pixel whose inter-pixel distance D exceeds the threshold value B is “0”. Therefore, such a pixel is not selected as a correction target pixel.

図12に示す重みは、以下のようにまとめることができる。
(a)画素間距離D≦しきい値A:重み=1
(b)しきい値A<画素間距離D≦しきい値B:重み=(B−D)/(B−A)
(c)画素間距離D>しきい値B:重み=0
このような重みを採用するのは、色情報がほぼ同じ複数の画素は、同一のオブジェクトである可能性が高いので、このような場合には、被補正画像に近い画素を優先するためである。
The weights shown in FIG. 12 can be summarized as follows.
(A) Inter-pixel distance D ≦ threshold A: Weight = 1
(B) threshold A <inter-pixel distance D ≦ threshold B: weight = (BD) / (BA)
(C) Inter-pixel distance D> Threshold B: Weight = 0
The reason for adopting such a weight is that a plurality of pixels having substantially the same color information are likely to be the same object, and in such a case, priority is given to pixels close to the image to be corrected. .

(vi)適性の算出処理(その5)
上述した適性の算出処理(その1)〜適性の算出処理(その4)については、適宜組み合わせることができる。
(Vi) Suitability calculation process (part 5)
The above-described aptitude calculation processing (part 1) to aptitude calculation processing (part 4) can be combined as appropriate.

[g3:補正画素の決定処理]
決定部33は、適性算出部32によって算出された適性に基づいて、被補正画素の補正に用いる画素を決定する(図4のステップS16)。このような被補正画素の補正に用いる画素としては、典型的には、補正画素候補のうち、最も適性の値が大きい画素が補正に用いられる画素として選択される。
[G3: Correction Pixel Determination Process]
The determining unit 33 determines a pixel to be used for correcting the correction target pixel based on the suitability calculated by the suitability calculating unit 32 (step S16 in FIG. 4). As a pixel used for correction of such a pixel to be corrected, a pixel having the largest suitability value is typically selected as a pixel to be used for correction among the correction pixel candidates.

あるいは、補正画素候補のうち、その適性の値が所定のしきい値以上の補正画素候補や、適性の値が補正画素候補の全体からみて上位にある補正画素候補を選択して、選択した複数の補正画素候補を用いて、補正を行なってもよい。   Alternatively, among the correction pixel candidates, a correction pixel candidate whose aptitude value is equal to or higher than a predetermined threshold or a correction pixel candidate whose aptitude value is higher than the entire correction pixel candidate is selected and selected. Correction may be performed using the correction pixel candidates.

[g4:補正実行処理]
補正実行部34は、決定部33によって決定された画素の情報で被補正画素を補正する(図4のステップS18)。
[G4: Correction execution process]
The correction execution unit 34 corrects the corrected pixel with the pixel information determined by the determination unit 33 (step S18 in FIG. 4).

(i)補正方法(その1)
典型的な補正方法として、決定部33が適性の最も高い補正画素候補を決定した場合には、被補正画素の視差を当該決定した補正画素候補に対応する視差に置き換える。
(I) Correction method (1)
As a typical correction method, when the determination unit 33 determines the most suitable correction pixel candidate, the parallax of the corrected pixel is replaced with the parallax corresponding to the determined correction pixel candidate.

(ii)補正方法(その2)
決定部33が統計的な処理などを行なうことで、複数の補正画素候補を決定した場合には、当該決定した複数の補正画素候補のそれぞれが有する視差の平均値または中央値を算出し、この算出された視差の統計値を被補正画素の視差にする。
(Ii) Correction method (2)
When the determination unit 33 determines a plurality of correction pixel candidates by performing statistical processing or the like, an average value or a median value of parallax included in each of the determined plurality of correction pixel candidates is calculated. The calculated parallax statistical value is used as the parallax of the corrected pixel.

(iii)補正方法(その3)
補正画素候補に適性の高いものが存在しない場合、すなわち、決定部33が適切な補正画素候補を決定できなかった場合には、適性に依存することなく、被補正画素の周辺に位置する画素の視差を用いて、当該被補正画素の視差を補正する。言い換えれば、適性が所定値を超える画素が存在しない場合には、適性にかかわらず、被補正画素の周辺にある画素が補正に用いられる。
(Iii) Correction method (3)
When there is no highly suitable correction pixel candidate, that is, when the determination unit 33 cannot determine an appropriate correction pixel candidate, the pixel of the pixel located around the corrected pixel is not dependent on the suitability. The parallax of the pixel to be corrected is corrected using the parallax. In other words, when there is no pixel whose aptitude exceeds a predetermined value, pixels around the corrected pixel are used for correction regardless of the aptitude.

これは、被補正画素の視差をその周辺に位置する画素の視差と近似させることで、たとえ、適性の高い画素が存在しない場合であっても、視差画像が自然に補正されることを目的とするものである。より具体的な補正方法としては、被補正画素の周辺に位置する複数の画素が有する視差の平均値または中央値が用いられてもよい。   The purpose of this is to approximate the parallax of the pixel to be corrected to the parallax of the pixels located in the vicinity thereof, so that the parallax image is naturally corrected even when there is no highly suitable pixel. To do. As a more specific correction method, an average value or a median value of parallax included in a plurality of pixels located around the corrected pixel may be used.

(iv)補正方法(その4)
視差画像を補正するにあたって、被補正画素の視差だけではなく対応する信頼度についても補正を行なってもよい。より具体的には、被補正画素の視差については、上述したような方法に従って補正を行なうとともに、当該被補正画素の信頼度についても、視差と同様に、信頼度の高い画素の信頼度に置き換えるといった処理を採用してもよい。このような処理を採用することで、視差画像だけではなく、信頼度分布についても、より滑らかな分布を得ることができる。
(Iv) Correction method (4)
In correcting the parallax image, not only the parallax of the pixel to be corrected but also the corresponding reliability may be corrected. More specifically, the parallax of the pixel to be corrected is corrected according to the method described above, and the reliability of the pixel to be corrected is also replaced with the reliability of a highly reliable pixel, similar to the parallax. Such processing may be adopted. By adopting such processing, a smoother distribution can be obtained not only for the parallax image but also for the reliability distribution.

(v)補正方法(その5)
本実施の形態に従う画像処理方法は、静止画だけではなく、動画像についても同様に適用できる。この場合、動画像を構成するフレーム(時間軸に沿って並んでいる)のうち、被補正画像が含まれるフレームに時間軸において近接したフレームの情報を用いて、被補正画像を補正してもよい。
(V) Correction method (5)
The image processing method according to the present embodiment can be applied not only to still images but also to moving images. In this case, even if the image to be corrected is corrected using the information of the frame that is close to the frame including the image to be corrected in the time axis among the frames constituting the moving image (aligned along the time axis). Good.

このような近接したフレームの情報を用いる具体例としては、補正画素候補を探索する際に近接フレームに含まれる領域からも補正画素候補を抽出する。これは、近接フレーム間では被写体の動き量は少なく、ほぼ同じような画が写っていることが期待されるからである。適性の算出などに関しては上述と同様である。但し、フレーム間では画素間距離を算出できないので、代替の方法として、フレーム数に応じた重み付けを行なってもよい。この場合、被補正画素があるフレームにより近接したフレームの方が、より高い適性を有するにように設定されることが好ましい。   As a specific example using information on such close frames, correction pixel candidates are also extracted from regions included in the close frames when searching for correction pixel candidates. This is because the movement amount of the subject is small between adjacent frames, and it is expected that almost the same image is captured. The calculation of aptitude is the same as described above. However, since the inter-pixel distance cannot be calculated between frames, weighting according to the number of frames may be performed as an alternative method. In this case, it is preferable that the frame closer to the frame with the corrected pixel is set to have higher suitability.

(vi)補正方法(その6)
上述した補正方法(その1)〜補正方法(その5)については、適宜組み合わせることができる。
(Vi) Correction method (6)
About the correction method (the 1)-correction method (the 5) mentioned above, it can combine suitably.

[g5:変形例]
上述の例では、被補正画素として信頼度が低い画素を対象とする例を示したが、信頼度が高い画素を対象としてもよい。すなわち、信頼度が高い画素に対して、補正を行なってもよい。この場合、適性を算出する際に、信頼度の値を重み付けとして加算することで、被補正画素の信頼度が高いの場合には補正が行われにくくなり、信頼度の低い画素を被補正画素と設定した場合と同様の効果を得ることができる。
[G5: Modification]
In the above-described example, an example in which a pixel with low reliability is targeted as a corrected pixel is shown, but a pixel with high reliability may be targeted. That is, correction may be performed on pixels with high reliability. In this case, when calculating the aptitude, the reliability value is added as a weight, so that correction is difficult when the pixel to be corrected has high reliability, and a pixel with low reliability is corrected to the pixel to be corrected. It is possible to obtain the same effect as in the case of setting.

<H.視差画像(補正後)の出力およびその利用>
上述のような視差の補正が元の視差画像に対して実行された後、視差画像(補正後)が出力される。上述したように、視差画像は、被写体の距離情報を示すものであり、この視差画像を用いることで、当該被写体を撮像した1枚の入力画像から立体視表示に用いられるステレオ画像を生成することができる。
<H. Output and use of parallax images (after correction)>
After the parallax correction as described above is performed on the original parallax image, the parallax image (after correction) is output. As described above, the parallax image indicates the distance information of the subject, and by using the parallax image, a stereo image used for stereoscopic display is generated from one input image obtained by imaging the subject. Can do.

より具体的には、視差画像(補正後)に基づいて、入力画像を構成する各画素を対応する距離情報(画素数)だけずらすことで、被写体を立体視表示するためのステレオ画像(左眼用画像および右眼用画像)が生成される。このように、視差画像に基づいて、入力画像から被写体を立体視表示するためのステレオ画像が生成される。   More specifically, on the basis of the parallax image (after correction), each pixel constituting the input image is shifted by the corresponding distance information (number of pixels), whereby a stereo image (left eye) for stereoscopic display of the subject is displayed. Image and right-eye image) are generated. In this manner, a stereo image for stereoscopically displaying the subject is generated from the input image based on the parallax image.

もちろん、視差画像は、被写体の立体形状を示しているので、この立体形状の情報を取得するという意味において、視差画像をそのまま利用することもできる。   Of course, since the parallax image shows the three-dimensional shape of the subject, the parallax image can be used as it is in the sense of acquiring information on the three-dimensional shape.

<I.利点>
本発明の実施の形態によれば、画素の信頼度だけではなく、画素の色情報に基づいて、ある被補正画素を補正するために使用されることの適性を算出するので、より補正の精度を高めることができる。
<I. Advantage>
According to the embodiment of the present invention, the aptitude of being used for correcting a certain corrected pixel is calculated based on not only the pixel reliability but also the color information of the pixel. Can be increased.

<J.別形態>
本発明の実施の形態としては、以下のような態様を含む。
<J. Another form>
Embodiments of the present invention include the following aspects.

本発明のある局面に従えば、画像の入力を受けて視差画像を生成するための視差生成手段を有する画像処理装置である。画像処理装置は、視差生成の信頼度を算出するための信頼度算出手段と、生成した視差を補正するための視差補正手段とを有する。視差補正手段は、信頼度と周辺の各点の色情報から、補正候補としての適性を算出し、適性が高い点を優先的に補正に用いる。このように適性を算出することで、適切に視差を補正できる。   According to an aspect of the present invention, there is provided an image processing apparatus having parallax generation means for receiving a input of an image and generating a parallax image. The image processing apparatus includes reliability calculation means for calculating the reliability of parallax generation and parallax correction means for correcting the generated parallax. The parallax correction means calculates suitability as a correction candidate from the reliability and the color information of each peripheral point, and preferentially uses a point with high suitability for correction. By calculating the aptitude as described above, the parallax can be appropriately corrected.

色情報は、対象画素周辺の色の分布であることが好ましい。これにより、周辺画素を含めた形で見ることができ、精度を向上できる。   The color information is preferably a color distribution around the target pixel. Thereby, it can be seen in a form including peripheral pixels, and the accuracy can be improved.

色情報は、対象画素周辺の各色の周波数情報であることが好ましい。これにより、周辺画素を含めた形で見ることができ、精度を向上できる。   The color information is preferably frequency information of each color around the target pixel. Thereby, it can be seen in a form including peripheral pixels, and the accuracy can be improved.

適性は、色情報と画素間距離とにより算出されることが好ましい。これにより、同じ色情報の画素の場合には、より近い画素を優先することになり、高精度な補正ができる。   Suitability is preferably calculated from the color information and the inter-pixel distance. Thus, in the case of pixels having the same color information, priority is given to a closer pixel, and high-accuracy correction can be performed.

適性は、色情報と信頼度とにより算出されることが好ましい。これにより。同じ色情報の画素の場合には、信頼度のより高い画素を優先することになり、高精度な補正ができる。   Suitability is preferably calculated from color information and reliability. By this. In the case of pixels having the same color information, priority is given to pixels with higher reliability, and high-precision correction can be performed.

信頼度を少なくとも高低2段階以上に分割し、低信頼度と判定された画素は適性を算出しないことが好ましい。低信頼度画素は、被補正画素である可能性が高いため、適性の算出対象から除くことで、無駄な処理がなくなり、その結果、高速処理が可能になるとともに、誤判定を抑制できる。   It is preferable to divide the reliability into at least two levels of high and low, and to calculate the aptitude for the pixel determined as low reliability. Since the low-reliability pixel is highly likely to be a corrected pixel, by removing it from the aptitude calculation target, wasteful processing is eliminated. As a result, high-speed processing is possible and erroneous determination can be suppressed.

適性が高い画素が存在しない場合には、適性に依らず周辺画素を補正に用いることが好ましい。これにより、仮に適性の高い画素がなかったとしても、周辺画素を使うことで視聴に違和感の少ない視差補正ができる。   When there is no pixel with high aptitude, it is preferable to use peripheral pixels for correction regardless of the aptitude. Thereby, even if there is no highly suitable pixel, parallax correction with less discomfort can be performed by using peripheral pixels.

視差生成手段はステレオカメラ画像の対応点探索の結果を用いて行われ、信頼度算出手段は対応点探索結果の評価値を信頼度として算出することが好ましい。これにより、ステレオカメラを対象とすることで、違和感の少ない立体形状の測定が可能となる。   It is preferable that the parallax generation unit is performed using the result of the corresponding point search of the stereo camera image, and the reliability calculation unit calculates the evaluation value of the corresponding point search result as the reliability. Thereby, the measurement of a three-dimensional shape with little discomfort can be performed by targeting a stereo camera.

視差生成手段は、位相限定相関法(POC)による対応点探索の結果を用いて行われることが好ましい。POCにより高精度な視差生成が可能になるとともに、POCは画像の位相のみを用いた手法であり色情報は見ていないため、色による適性算出を行なうことで、POCの結果のみでは不可能な補正が可能となる。   The parallax generating means is preferably performed using the result of the corresponding point search by the phase only correlation method (POC). POC enables high-accuracy parallax generation, and POC is a technique that uses only the phase of an image and does not look at color information. Therefore, by calculating the suitability by color, it is impossible only by the result of POC. Correction is possible.

視差補正手段は、POCから周波数情報を受け取り、適性算出を行なうことが好ましい。POCの途中算出で発生する周波数情報を用いることで、不要な算出を削減し、高速な適性算出が可能となる。   The parallax correction means preferably receives the frequency information from the POC and performs aptitude calculation. By using frequency information generated in the middle of POC calculation, unnecessary calculation can be reduced and high-speed aptitude calculation can be performed.

今回開示された実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は上記した説明ではなくて特許請求の範囲によって示され、特許請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。   The embodiment disclosed this time should be considered as illustrative in all points and not restrictive. The scope of the present invention is defined by the terms of the claims, rather than the description above, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims.

10 視差画像生成部、20 信頼度算出部、30 視差画像補正部、31 被補正画素抽出部、32 適性算出部、33 決定部、34 補正実行部、100,200 画像処理装置、102 CPU、104 RAM、106 ROM、108 ネットワークインターフェイス、110 補助記憶装置、112 画像処理プログラム、114 入力画像、120,206 表示部、122,204 入力部、124 メモリーカードインターフェイス、126 メモリーカード、130 バス、202 画像処理エンジン、212,222 レンズ、214,224 イメージセンサー。   DESCRIPTION OF SYMBOLS 10 Parallax image generation part, 20 Reliability calculation part, 30 Parallax image correction part, 31 Corrected pixel extraction part, 32 Aptitude calculation part, 33 Determination part, 34 Correction execution part, 100,200 Image processing apparatus, 102 CPU, 104 RAM, 106 ROM, 108 Network interface, 110 Auxiliary storage device, 112 Image processing program, 114 Input image, 120, 206 Display unit, 122, 204 Input unit, 124 Memory card interface, 126 Memory card, 130 Bus, 202 Image processing Engine, 212, 222 Lens, 214, 224 Image sensor.

Claims (11)

被写体を異なる視点で撮像することで取得された少なくとも2つの入力画像から視差画像を生成するための視差画像生成手段と、
前記視差画像生成手段によって生成された視差画像に含まれる画素についての信頼度を算出するための信頼度算出手段と、
前記視差画像生成手段によって生成された視差画像を補正して出力するための視差画像補正手段とを備え、
前記視差画像補正手段は、
前記視差画像生成手段によって生成された視差画像に含まれる被補正画素の周辺にある画素の信頼度および色情報に基づいて、当該被補正画素についての補正画素候補としての適性を算出するための適性算出手段と、
算出された適性に基づいて、当該被補正画素の補正に用いる画素を決定するための決定手段とを含む、画像処理装置。
Parallax image generation means for generating a parallax image from at least two input images acquired by imaging a subject from different viewpoints;
Reliability calculation means for calculating the reliability of the pixels included in the parallax image generated by the parallax image generation means;
A parallax image correcting unit for correcting and outputting the parallax image generated by the parallax image generating unit;
The parallax image correcting means includes
Suitability for calculating suitability as a correction pixel candidate for the corrected pixel based on reliability and color information of pixels around the corrected pixel included in the parallax image generated by the parallax image generating unit A calculation means;
An image processing apparatus including: a determination unit configured to determine a pixel used for correcting the correction target pixel based on the calculated aptitude;
前記色情報は、前記被補正画素の周辺にある画素の色の分布を含む、請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the color information includes a color distribution of pixels around the corrected pixel. 前記色情報は、前記被補正画素の周辺にある画素の各色の周波数情報を含む、請求項1または2に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the color information includes frequency information of each color of a pixel around the pixel to be corrected. 前記適性算出手段は、前記色情報と前記被補正画素からの距離とに基づいて、適性を算出する、請求項1〜3のいずれか1項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the suitability calculating unit calculates suitability based on the color information and a distance from the corrected pixel. 前記適性算出手段は、前記被補正画素の周辺にある画素のうち、対応する信頼度が所定値を超えたものについて適性を算出する、請求項1〜4のいずれか1項に記載の画像処理装置。   5. The image processing according to claim 1, wherein the aptitude calculation unit calculates the aptitude for a pixel having a corresponding reliability exceeding a predetermined value among pixels around the corrected pixel. apparatus. 前記決定手段は、適性が所定値を超える画素が存在しない場合には、適性にかかわらず、前記被補正画素の周辺にある画素を補正に用いる、請求項1〜5のいずれか1項に記載の画像処理装置。   6. The determination unit according to claim 1, wherein, when there is no pixel whose suitability exceeds a predetermined value, regardless of suitability, the determination unit uses pixels around the correction target pixel for correction. Image processing apparatus. 前記視差画像生成手段は、前記少なくとも2つの入力画像に対する対応点探索処理の結果に基づいて前記視差画像を生成し、
前記信頼度算出手段は、前記対応点探索処理における評価値に基づいて信頼度を算出する、請求項1〜6のいずれか1項に記載の画像処理装置。
The parallax image generating means generates the parallax image based on a result of corresponding point search processing for the at least two input images;
The image processing apparatus according to claim 1, wherein the reliability calculation unit calculates a reliability based on an evaluation value in the corresponding point search process.
前記対応点探索処理は、位相限定相関法による対応点探索処理を含む、請求項7に記載の画像処理装置。   The image processing apparatus according to claim 7, wherein the corresponding point search process includes a corresponding point search process using a phase-only correlation method. 前記適性算出手段は、位相限定相関法による対応点探索処理において算出される周波数情報に基づいて、適性を算出する、請求項8に記載の画像処理装置。   The image processing apparatus according to claim 8, wherein the aptitude calculation unit calculates aptitude based on frequency information calculated in a corresponding point search process using a phase-only correlation method. 被写体を異なる視点で撮像することで取得された少なくとも2つの入力画像から視差画像を生成するステップと、
生成された視差画像に含まれる画素についての信頼度を算出するステップと、
生成された視差画像を補正して出力するステップとを備え、
視差画像を補正して出力する前記ステップは、
生成された視差画像に含まれる被補正画素の周辺にある画素の信頼度および色情報に基づいて、当該被補正画素についての補正画素候補としての適性を算出するステップと、
算出された適性に基づいて、当該被補正画素の補正に用いる画素を決定するステップとを含む、画像処理方法。
Generating a parallax image from at least two input images acquired by imaging a subject from different viewpoints;
Calculating a reliability for a pixel included in the generated parallax image;
And correcting and outputting the generated parallax image,
The step of correcting and outputting the parallax image includes
Calculating suitability of the corrected pixel as a correction pixel candidate based on the reliability and color information of the pixels around the corrected pixel included in the generated parallax image;
Determining a pixel to be used for correcting the corrected pixel based on the calculated aptitude.
コンピューターに画像処理を実行させる画像処理プログラムであって、前記画像処理プログラムは、前記コンピューターを、
被写体を異なる視点で撮像することで取得された少なくとも2つの入力画像から視差画像を生成するための視差画像生成手段と、
前記視差画像生成手段によって生成された視差画像に含まれる画素についての信頼度を算出するための信頼度算出手段と、
前記視差画像生成手段によって生成された視差画像を補正して出力するための視差画像補正手段として機能させ、
前記視差画像補正手段は、
前記視差画像生成手段によって生成された視差画像に含まれる被補正画素の周辺にある画素の信頼度および色情報に基づいて、当該被補正画素についての補正画素候補としての適性を算出するための適性算出手段と、
算出された適性に基づいて、当該被補正画素の補正に用いる画素を決定するための決定手段とを含む、画像処理プログラム。
An image processing program for causing a computer to execute image processing, wherein the image processing program
Parallax image generation means for generating a parallax image from at least two input images acquired by imaging a subject from different viewpoints;
Reliability calculation means for calculating the reliability of the pixels included in the parallax image generated by the parallax image generation means;
Function as a parallax image correction unit for correcting and outputting the parallax image generated by the parallax image generation unit;
The parallax image correcting means includes
Suitability for calculating suitability as a correction pixel candidate for the corrected pixel based on reliability and color information of pixels around the corrected pixel included in the parallax image generated by the parallax image generating unit A calculation means;
An image processing program comprising: determination means for determining a pixel to be used for correcting the corrected pixel based on the calculated aptitude.
JP2011260402A 2011-11-29 2011-11-29 Image processing apparatus, image processing method, and image processing program Expired - Fee Related JP5747797B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011260402A JP5747797B2 (en) 2011-11-29 2011-11-29 Image processing apparatus, image processing method, and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011260402A JP5747797B2 (en) 2011-11-29 2011-11-29 Image processing apparatus, image processing method, and image processing program

Publications (2)

Publication Number Publication Date
JP2013114477A true JP2013114477A (en) 2013-06-10
JP5747797B2 JP5747797B2 (en) 2015-07-15

Family

ID=48709969

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011260402A Expired - Fee Related JP5747797B2 (en) 2011-11-29 2011-11-29 Image processing apparatus, image processing method, and image processing program

Country Status (1)

Country Link
JP (1) JP5747797B2 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015096812A (en) * 2013-11-15 2015-05-21 キヤノン株式会社 Image processor, imaging device and distance correction method
WO2015083499A1 (en) * 2013-12-02 2015-06-11 コニカミノルタ株式会社 Image processing device, method and program
EP2911392A1 (en) 2014-02-25 2015-08-26 Ricoh Company, Ltd. Parallax calculation system, information processing apparatus, information processing method, and program
JP2016038315A (en) * 2014-08-08 2016-03-22 オムロン株式会社 Measuring device, substrate inspection equipment, and method for controlling the same
JP2016136112A (en) * 2015-01-23 2016-07-28 シャープ株式会社 Distance measurement device and distance measurement method
JP2016194956A (en) * 2016-07-26 2016-11-17 キヤノン株式会社 Data processor, imaging device, and data processing method
US10547824B2 (en) 2014-10-27 2020-01-28 Canon Kabushiki Kaisha Data processing apparatus, imaging apparatus and data processing method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000121319A (en) * 1998-10-15 2000-04-28 Sony Corp Image processor, image processing method and supply medium
JP2008216126A (en) * 2007-03-06 2008-09-18 Konica Minolta Holdings Inc Distance image generating device, distance image generation method, and program
JP2011203811A (en) * 2010-03-24 2011-10-13 Fujifilm Corp Image processing apparatus, image processing method, image processing program, and compound eye digital camera

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000121319A (en) * 1998-10-15 2000-04-28 Sony Corp Image processor, image processing method and supply medium
JP2008216126A (en) * 2007-03-06 2008-09-18 Konica Minolta Holdings Inc Distance image generating device, distance image generation method, and program
JP2011203811A (en) * 2010-03-24 2011-10-13 Fujifilm Corp Image processing apparatus, image processing method, image processing program, and compound eye digital camera

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015096812A (en) * 2013-11-15 2015-05-21 キヤノン株式会社 Image processor, imaging device and distance correction method
WO2015083499A1 (en) * 2013-12-02 2015-06-11 コニカミノルタ株式会社 Image processing device, method and program
EP2911392A1 (en) 2014-02-25 2015-08-26 Ricoh Company, Ltd. Parallax calculation system, information processing apparatus, information processing method, and program
JP2016038315A (en) * 2014-08-08 2016-03-22 オムロン株式会社 Measuring device, substrate inspection equipment, and method for controlling the same
US10547824B2 (en) 2014-10-27 2020-01-28 Canon Kabushiki Kaisha Data processing apparatus, imaging apparatus and data processing method
US11044453B2 (en) 2014-10-27 2021-06-22 Canon Kabushiki Kaisha Data processing apparatus, imaging apparatus and data processing method
JP2016136112A (en) * 2015-01-23 2016-07-28 シャープ株式会社 Distance measurement device and distance measurement method
JP2016194956A (en) * 2016-07-26 2016-11-17 キヤノン株式会社 Data processor, imaging device, and data processing method

Also Published As

Publication number Publication date
JP5747797B2 (en) 2015-07-15

Similar Documents

Publication Publication Date Title
JP5747797B2 (en) Image processing apparatus, image processing method, and image processing program
JP6271609B2 (en) Autofocus for stereoscopic cameras
EP3190781B1 (en) Autofocus method, device and electronic apparatus
JP6020471B2 (en) Image processing method, image processing apparatus, and image processing program
US8928736B2 (en) Three-dimensional modeling apparatus, three-dimensional modeling method and computer-readable recording medium storing three-dimensional modeling program
US8224069B2 (en) Image processing apparatus, image matching method, and computer-readable recording medium
CN111066065A (en) System and method for hybrid depth regularization
JP6011862B2 (en) 3D image capturing apparatus and 3D image capturing method
EP2757789A1 (en) Image processing system, image processing method, and image processing program
CN111402170B (en) Image enhancement method, device, terminal and computer readable storage medium
CN108230384B (en) Image depth calculation method and device, storage medium and electronic equipment
JP6452360B2 (en) Image processing apparatus, imaging apparatus, image processing method, and program
JP6052186B2 (en) Image processing device
JP5533529B2 (en) Image processing apparatus and image processing system
US20140192163A1 (en) Image pickup apparatus and integrated circuit therefor, image pickup method, image pickup program, and image pickup system
JPWO2008041518A1 (en) Image processing apparatus, image processing apparatus control method, and image processing apparatus control program
JP2013178684A (en) Depth estimation apparatus, reconfigured image generation device, depth estimation method, reconfigured image generation method and program
JP2013201688A (en) Image processing apparatus, image processing method, and image processing program
JP5741353B2 (en) Image processing system, image processing method, and image processing program
CN111382607B (en) Living body detection method, living body detection device and face authentication system
JP2016062447A (en) Image processor, image processing method, and image processing program
JP3054691B2 (en) Frame processing type stereo image processing device
WO2013088872A1 (en) Corresponding point search method, corresponding point search device, and corresponding point search program
JP4814441B2 (en) 3D information acquisition device
JP5654956B2 (en) Parallax image generation device and parallax image generation program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140312

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20141226

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150113

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150311

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20150414

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150427

R150 Certificate of patent or registration of utility model

Ref document number: 5747797

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees