JP5533529B2 - Image processing apparatus and image processing system - Google Patents

Image processing apparatus and image processing system Download PDF

Info

Publication number
JP5533529B2
JP5533529B2 JP2010226358A JP2010226358A JP5533529B2 JP 5533529 B2 JP5533529 B2 JP 5533529B2 JP 2010226358 A JP2010226358 A JP 2010226358A JP 2010226358 A JP2010226358 A JP 2010226358A JP 5533529 B2 JP5533529 B2 JP 5533529B2
Authority
JP
Japan
Prior art keywords
correction
image
distance
boundary line
distance information
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.)
Expired - Fee Related
Application number
JP2010226358A
Other languages
Japanese (ja)
Other versions
JP2012079251A (en
Inventor
宏 大和
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 JP2010226358A priority Critical patent/JP5533529B2/en
Publication of JP2012079251A publication Critical patent/JP2012079251A/en
Application granted granted Critical
Publication of JP5533529B2 publication Critical patent/JP5533529B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)
  • Image Analysis (AREA)

Description

本発明は、画像処理装置及び画像処理システムに関する。   The present invention relates to an image processing apparatus and an image processing system.

近年、3次元映像技術を取り入れた3次元テレビの普及が拡大してきている。しかし、3次元映像などのコンテンツに関しては、一部の映画やテレビ用の3次元映像のコンテンツが提供されているが、一般ユーザが個人で楽しむには、3次元映像コンテンツが充分な状態とは言えない。そのため、今後、一般ユーザに対し、一般家庭でも簡単に3次元映像を楽しむことが可能なコンテンツを生成し、3次元映像システムの提供を行うことが必要不可欠になる。   In recent years, the spread of 3D television incorporating 3D video technology has been expanding. However, with regard to content such as 3D video, 3D video content for some movies and televisions is provided. However, 3D video content is sufficient for general users to enjoy individually. I can not say. Therefore, in the future, it will be indispensable for general users to generate content that can easily enjoy 3D video even at home and provide a 3D video system.

しかし、単純に2台以上のカメラにより取得した映像を、立体視映像として表示すると、映画館のような固定サイズの表示ディスプレイであれば、特に問題はないが、一般ユーザ向けの立体視映像としては、個々の所有する表示ディスプレイのサイズが異なる可能性が高いことから、使用するディスプレイ次第では、立体感に欠ける映像となることがある。   However, if images acquired by two or more cameras are simply displayed as stereoscopic images, there is no particular problem if the display is a fixed size display such as a movie theater, but as stereoscopic images for general users. Since there is a high possibility that the size of each display display owned by the user will be different, depending on the display used, the image may lack a stereoscopic effect.

つまり、個々のディスプレイに適した立体感を表示する為の調整を行うために、立体感の調整(視差調整)が重要となる。一般的に視差調整を正確に行う方法としては、各対象領域の距離を計測し、計測データに従って視差量を補正する方法がある。ここで、対象領域の距離計測方法の代表的な方法としては、エリアベースの対応点探索方法がある。   That is, in order to perform adjustment for displaying a stereoscopic effect suitable for each display, adjustment of the stereoscopic effect (parallax adjustment) is important. In general, as a method for accurately adjusting the parallax, there is a method of measuring the distance between each target region and correcting the parallax amount according to the measurement data. Here, as a representative method of the distance measurement method of the target region, there is an area-based corresponding point search method.

例えば、特許文献1では、2種類の対応点探索方法で視差を算出し、それらの差の絶対値が所定の閾値以上である画素は、ミスマッチングが発生していると判定する技術が開示されている。   For example, Patent Document 1 discloses a technique for calculating parallax using two types of corresponding point search methods, and determining that a pixel whose absolute value of the difference between them is equal to or greater than a predetermined threshold is mismatched. ing.

また、特許文献2では、1つの画素に対して複数の対応点が探索された場合、対象画素の周囲にある複数画素の距離値に基づいて、対象画素およびその周囲における被写体形状を算出し、被写体形状との差異が最も小さい対象距離情報を算出した対応点を有効な対応点に決定する技術が提案されている。   Further, in Patent Document 2, when a plurality of corresponding points are searched for one pixel, a target pixel and a subject shape around the target pixel are calculated based on distance values of a plurality of pixels around the target pixel. A technique has been proposed in which a corresponding point for which target distance information having the smallest difference from the subject shape is calculated is determined as an effective corresponding point.

さらに、特許文献3では、基準となる画像を複数の小領域に分割し、それらの小領域の境界線の視差を領域ベースのステレオ法により推定し、各領域において推定された境界線における視差の頻度分布を解析して領域の視差を推定する。分割された小領域を順次統合していく際に画像の特徴量を用いることで、被写体本来の形状により近い画像分割が可能となる。   Furthermore, in Patent Document 3, a reference image is divided into a plurality of small regions, and the parallax of the boundary lines of these small regions is estimated by a region-based stereo method, and the parallax of the boundary line estimated in each region is estimated. The frequency distribution is analyzed to estimate the parallax of the region. By using the image feature amount when sequentially integrating the divided small regions, it is possible to perform image division closer to the original shape of the subject.

特開2009−239485号公報JP 2009-239485 A 特開2009−205193号公報JP 2009-205193 A 特開2005−165969号公報JP 2005-165969 A

しかしながら、特許文献1では、計測点の間違いは分かるものの何れの方法が適切か判別できない。また、特許文献2では、孤立点などのノイズ的な誤対応点に対しては修正可能であるものの、周辺の計測情報が間違っている場合には補正することができないという問題がある。さらに、特許文献3では、境界線の視差の頻度分布を解析して領域の視差を推定するだけでなく、境界線の視差計測方法とその他の計測方法を切り替えるといった複雑な処理が必要となる。   However, in Patent Document 1, it is not possible to determine which method is appropriate although an error in the measurement point is known. Further, Patent Document 2 has a problem that although it can correct a noisy corresponding point such as an isolated point, it cannot be corrected when surrounding measurement information is incorrect. Further, in Patent Document 3, not only is it necessary to analyze the frequency distribution of the parallax of the boundary line to estimate the parallax of the region, but also a complicated process of switching between the parallax measurement method of the boundary line and other measurement methods is required.

また、エリアベースの対応点探索方法においては、設定するエリア内に近距離と遠距離との両方の情報が含まれている場合(遠近競合領域)や、異なる視点による撮影で片方の映像で映っていない場合(オクルージョン領域)などにおいては、正確に視差の計測を行うことが出来ないと言う問題がある。   In addition, in the area-based corresponding point search method, information on both short distance and long distance is included in the set area (distance competing area), or one image is captured by shooting from different viewpoints. If it is not (occlusion region), there is a problem that parallax cannot be measured accurately.

そして、不正確な視差情報を基に、多視点映像を生成し、立体表示を行うと、実際の立体形状より飛び出したり、凹凸感がなかったり、ぼやけたりした立体視映像となり、観察者にとっては遠近感の欠落や対象物の形状の変化により違和感の多い映像となってしまう。   Then, when multi-viewpoint images are generated based on inaccurate parallax information and stereoscopic display is performed, the stereoscopic images are projected out of the actual stereoscopic shape, have no unevenness, or are blurred, which is difficult for the observer. Due to the lack of perspective and the change in the shape of the object, the image has a lot of discomfort.

本発明は、このような事情に鑑みてなされたものであり、遠近競合領域での距離誤差を低下させ、立体画像における遠近視認上の違和感を軽減させる画像処理技術を提供することを目的とする。   The present invention has been made in view of such circumstances, and an object of the present invention is to provide an image processing technique that reduces a distance error in a perspective conflict area and reduces a sense of incongruity in perspective in a stereoscopic image. .

上記課題を解決するために、請求項1の発明は、立体画像処理のための画像処理装置であって、所定の原点位置から被写体各部への距離情報を表現した第1距離画像を取得する第1距離画像取得手段と、前記被写体の2次元画像における前記被写体の複数の領域相互の境界線を抽出する境界線抽出手段と、前記第1距離画像中において、前記2次元画像での前記境界線に対応する位置に仮想境界線を設定するとともに、前記第1距離画像のうち前記仮想境界線をはさんで互いに隣接する領域のうち少なくとも一方を補正範囲としつつ、前記仮想境界線に近づく方向についての距離情報の変化を抑制する補正を前記第1距離画像に対して行うことによって第2距離画像を生成する補正手段と、を備え、前記立体画像処理が、前記第2距離画像に基づいて行われ、前記補正手段は、前記仮想境界線の位置を基準として、前記補正範囲の設定を行う補正範囲設定手段と、前記補正範囲内の画素のうち、所定の補正判定条件を満たす距離情報を持った画素のみを補正対象画素とする補正判定を行う補正判定手段とを備え、前記補正判定条件は、判定対象画素から前記仮想境界線に向かう方向についての、当該判定対象画素の距離情報と、当該判定対象画素に隣接する画素の距離情報との差分の絶対値が、所定値以上となっているという条件であることを特徴とする。 In order to solve the above-mentioned problem, the invention of claim 1 is an image processing apparatus for stereoscopic image processing, wherein a first distance image expressing distance information from a predetermined origin position to each part of a subject is acquired. A one-distance image obtaining unit; a boundary line extracting unit that extracts a boundary line between a plurality of areas of the subject in the two-dimensional image of the subject; and the boundary line in the two-dimensional image in the first distance image A virtual boundary line is set at a position corresponding to, and at least one of areas adjacent to each other across the virtual boundary line in the first distance image is set as a correction range, and the direction approaches the virtual boundary line Correction means for generating a second distance image by performing correction for suppressing a change in distance information on the first distance image, wherein the stereoscopic image processing is performed on the second distance image. Done Zui, the correcting means, based on the position of the imaginary boundary line, a correction range setting means for setting the correction range, among the pixels within the correction range, the predetermined correction determination condition is satisfied distance Correction determination means for performing correction determination with only a pixel having information as a correction target pixel, and the correction determination condition is distance information of the determination target pixel in a direction from the determination target pixel toward the virtual boundary line. If the absolute value of the difference between the distance information of the pixel adjacent to the determination target pixel, wherein the condition der Rukoto that is equal to or greater than a predetermined value.

また、請求項2の発明は、立体画像処理のための画像処理装置であって、所定の原点位置から被写体各部への距離情報を表現した第1距離画像を取得する第1距離画像取得手段と、前記被写体の2次元画像における前記被写体の複数の領域相互の境界線を抽出する境界線抽出手段と、前記第1距離画像中において、前記2次元画像での前記境界線に対応する位置に仮想境界線を設定するとともに、前記第1距離画像のうち前記仮想境界線をはさんで互いに隣接する領域のうち少なくとも一方を補正範囲としつつ、前記仮想境界線に近づく方向についての距離情報の変化を抑制する補正を前記第1距離画像に対して行うことによって第2距離画像を生成する補正手段と、を備え、前記立体画像処理が、前記第2距離画像に基づいて行われ、前記補正手段は、前記仮想境界線の位置を基準として、前記補正範囲の設定を行う補正範囲設定手段と、前記補正範囲内の画素のうち、所定の補正判定条件を満たす距離情報を持った画素のみを補正対象画素とする補正判定を行う補正判定手段とを備え、前記補正判定条件は、判定対象画素から前記仮想境界線に向かう方向についての、当該判定対象画素の距離情報の変化率の絶対値が、所定値以上となっているという条件であることを特徴とする。 Further, the invention of claim 2 is an image processing apparatus for stereoscopic image processing, and a first distance image acquisition means for acquiring a first distance image expressing distance information from a predetermined origin position to each part of the subject. A boundary line extracting means for extracting a boundary line between a plurality of areas of the subject in the two-dimensional image of the subject; and a virtual position at a position corresponding to the boundary line in the two-dimensional image in the first distance image. A boundary line is set, and at least one of areas adjacent to each other across the virtual boundary line in the first distance image is set as a correction range, and a change in distance information in a direction approaching the virtual boundary line is performed. Correction means for generating a second distance image by performing correction to suppress the first distance image, the stereoscopic image processing is performed based on the second distance image, The correction means includes a correction range setting means for setting the correction range with reference to the position of the virtual boundary line, and only pixels having distance information satisfying a predetermined correction determination condition among the pixels in the correction range. Correction determination means for performing correction determination with the correction target pixel as the correction target pixel, and the correction determination condition is an absolute value of a change rate of the distance information of the determination target pixel in a direction from the determination target pixel toward the virtual boundary line but wherein the condition der Rukoto that is equal to or greater than a predetermined value.

また、請求項3の発明は、請求項1または請求項2に記載の画像処理装置であって、前記補正範囲設定手段は、前記補正範囲として、前記第1距離画像において、前記仮想境界線からの平面距離が所定の値以下の画素範囲を設定することを特徴とする。 Further, the invention of claim 3 is the image processing apparatus according to claim 1 or 2, wherein the correction range setting means uses the virtual boundary line as the correction range in the first distance image. A pixel range in which the planar distance is equal to or smaller than a predetermined value is set.

また、請求項4の発明は、請求項1または請求項2に記載の画像処理装置であって、前記補正範囲設定手段は、前記補正範囲として、前記第1距離画像において、前記仮想境界線の距離情報との相違量が所定の値以下の画素範囲を設定することを特徴とする。 The invention according to claim 4 is the image processing apparatus according to claim 1 or 2, wherein the correction range setting means uses the virtual boundary line in the first distance image as the correction range. A pixel range whose difference from the distance information is a predetermined value or less is set.

また、請求項5の発明は、請求項乃至請求項4のいずれかに記載の画像処理装置であって、前記補正範囲設定手段は、前記補正範囲として、前記仮想境界線の両側の領域を設定することを特徴とする。 The invention of claim 5 is the image processing apparatus according to any one of claims 1 to 4, wherein the correction range setting means, as the correction range, the regions on both sides of the said imaginary boundary line It is characterized by setting.

また、請求項6の発明は、請求項1または請求項2に記載の画像処理装置であって、前記補正範囲設定手段は、前記第1距離画像の全体を、前記補正範囲として設定することを特徴とする。 The invention according to claim 6 is the image processing apparatus according to claim 1 or 2, wherein the correction range setting means sets the entire first distance image as the correction range. Features.

また、請求項7の発明は、請求項乃至請求項6のいずれかに記載の画像処理装置であって、前記補正範囲設定手段は、前記仮想境界線が閉曲線を形成していない領域は、前記補正範囲から除外する例外処理を行うことを特徴とする。 The invention of claim 7 is the image processing apparatus according to any one of claims 1 to 6, wherein the correction range setting means, a region where the imaginary boundary line does not form a closed curve, Exception processing to exclude from the correction range is performed.

また、請求項の発明は、請求項1または請求項2に記載の画像処理装置であって、前記補正判定手段は、前記補正判定を、画素単位で行うことを特徴とする。 The invention according to claim 8 is the image processing apparatus according to claim 1 or 2 , wherein the correction determination unit performs the correction determination on a pixel basis.

また、請求項の発明は、請求項1または請求項2に記載の画像処理装置であって、前記補正判定手段は、前記補正判定を、2点間を結びかつ前記仮想境界線と交差する画素列を単位として行うことを特徴とする。 The invention according to claim 9 is the image processing apparatus according to claim 1 or 2 , wherein the correction determination unit connects the correction determination between two points and intersects the virtual boundary line. It is characterized by being performed in units of pixel columns.

また、請求項10の発明は、立体画像処理のための画像処理装置であって、所定の原点位置から被写体各部への距離情報を表現した第1距離画像を取得する第1距離画像取得手段と、前記被写体の2次元画像における前記被写体の複数の領域相互の境界線を抽出する境界線抽出手段と、前記第1距離画像中において、前記2次元画像での前記境界線に対応する位置に仮想境界線を設定するとともに、前記第1距離画像のうち前記仮想境界線をはさんで互いに隣接する領域のうち少なくとも一方を補正範囲としつつ、前記仮想境界線に近づく方向についての距離情報の変化を抑制する補正を前記第1距離画像に対して行うことによって第2距離画像を生成する補正手段と、を備え、前記立体画像処理が、前記第2距離画像に基づいて行われ、用語定義として、着目する補正対象画素に関して、「交差画素列」を、当該補正対象画素を通りかつ前記仮想境界線と交差する線分の画素列によって定義し;「外側画素」を、前記交差画素列のうちで、当該補正対象画素よりも前記仮想境界線に近い側において当該補正対象画素に隣接する画素によって定義し;「内側画素」を、前記交差画素列のうちで、当該補正対象画素よりも前記仮想境界線に遠い側において当該補正対象画素に隣接する画素によって定義し;「同一側画素列」を、前記交差画素列のうちで、前記仮想境界線を基準として当該補正対象画素と同じ側にある部分によって定義し;「反対側画素列」を、前記交差画素列のうちで、前記仮想境界線をはさんで当該補正対象画素と反対側にある部分によって定義したとき、前記補正手段は、同一側画素列と反対側画素列とのうち、少なくとも同一側画素列の内側画素の距離情報を用いて、補正対象画素の距離情報の補正を行うこと特徴とする。 The invention according to claim 10 is an image processing apparatus for stereoscopic image processing, and first distance image acquisition means for acquiring a first distance image expressing distance information from a predetermined origin position to each part of the subject; A boundary line extracting means for extracting a boundary line between a plurality of areas of the subject in the two-dimensional image of the subject; and a virtual position at a position corresponding to the boundary line in the two-dimensional image in the first distance image. A boundary line is set, and at least one of areas adjacent to each other across the virtual boundary line in the first distance image is set as a correction range, and a change in distance information in a direction approaching the virtual boundary line is performed. and a correcting means for generating a second range image by performing suppressing correction on the first distance image, the stereoscopic image processing is performed based on the second distance image, use As a definition, regarding the correction target pixel of interest, an “intersecting pixel column” is defined by a pixel column of a line segment that passes through the correction target pixel and intersects the virtual boundary line; Are defined by pixels adjacent to the correction target pixel on the side closer to the virtual boundary line than the correction target pixel; an “inner pixel” is defined as the correction target pixel in the intersecting pixel column. Defined by a pixel adjacent to the correction target pixel on the side far from the virtual boundary line; “same side pixel column” is the same side of the crossing pixel column as the correction target pixel with respect to the virtual boundary line The “opposite pixel column” is defined by the portion of the intersecting pixel column that is on the opposite side of the correction target pixel across the virtual boundary line. It means, among the same side pixel column opposite pixel column, using the distance information of the inner pixels of at least the same side pixel column, characterized by correcting the distance information correction target pixel.

また、請求項11の発明は、請求項10に記載の画像処理装置であって、前記補正手段は、同一側画素列に属する補正対象画素の距離情報の値を、当該補正対象画素の内側画素の距離情報の値を用いて一定化する補正を行うことを特徴とする。 The invention according to claim 11 is the image processing apparatus according to claim 10 , wherein the correction unit uses a value of distance information of a correction target pixel belonging to the same side pixel column as an inner pixel of the correction target pixel. It is characterized in that correction is performed using the value of the distance information.

また、請求項12の発明は、請求項10に記載の画像処理装置であって、前記補正手段は、同一側画素列に属する補正対象画素の距離情報の変化率を、当該補正対象画素の内側画素における距離情報の変化率を用いて一定化する補正を行うことを特徴とする。 The invention according to claim 12 is the image processing apparatus according to claim 10 , wherein the correction unit calculates a change rate of distance information of the correction target pixels belonging to the same side pixel row, from the inside of the correction target pixels. It is characterized in that correction is made constant by using a change rate of distance information in a pixel.

また、請求項13の発明は、請求項10に記載の画像処理装置であって、前記補正手段は、前記仮想境界線から離れた位置に基準位置を設定し、前記基準位置での距離情報を第1距離情報とし、前記基準位置から前記仮想境界線までの区間内の各補正対象画素について、前記基準位置に関して対称な位置にある画素の距離情報を第2距離情報としたとき、前記補正対象画素についての補正後の距離情報と前記第1距離情報との差が、前記第1距離情報と前記第2距離情報との差の正負符号を反転させた値に比例するように前記補正対象画素についての補正を行うことにより、前記補正対象画素の距離情報の変化を抑制する補正を行うことを特徴とする。 The invention according to claim 13 is the image processing apparatus according to claim 10 , wherein the correction unit sets a reference position at a position away from the virtual boundary line, and obtains distance information at the reference position. When the first distance information is used, and each pixel to be corrected in the section from the reference position to the virtual boundary line is the distance information of a pixel that is symmetrical with respect to the reference position, the second distance information is used as the correction object. The correction target pixel so that the difference between the corrected distance information and the first distance information for the pixel is proportional to a value obtained by inverting the sign of the difference between the first distance information and the second distance information. Correction for suppressing the change of the distance information of the correction target pixel is performed.

また、請求項14の発明は、請求項10に記載の画像処理装置であって、前記補正手段は、前記仮想境界線に近づく方向についての距離情報の変化を段階的に抑制する。 The invention according to claim 14 is the image processing apparatus according to claim 10 , wherein the correction unit suppresses a change in distance information in a direction approaching the virtual boundary line in a stepwise manner.

また、請求項15の発明は、請求項1乃至請求項14のいずれかに記載の画像処理装置と、前記第2距離画像を用いて前記原点位置から見た第1視差画像を生成する第1視差画像生成手段と、前記視差画像生成手段によって生成された第1視差画像に基づいて、前記原点位置とは異なる別位置から前記被写体を観察した距離画像としての第2視点画像を生成する他視点画像生成手段と、を備えることを特徴とする。 The invention of claim 15 produces an image processing apparatus according to claim 1 or Re claim 14 noise, the first parallax image viewed from the origin position by using the second distance image Based on the first parallax image generation unit and the first parallax image generated by the parallax image generation unit, a second viewpoint image is generated as a distance image obtained by observing the subject from a different position from the origin position. And another viewpoint image generation means.

また、請求項16の発明は、請求項15に記載の画像処理システムであって、前記補正手段は、前記他視点画像生成手段での前記第2視点画像の生成において、視点が前記原点位置から前記別位置へと変化する方向に応じて、前記距離情報の変化の抑制を行う部分を選択することを特徴とする。 The invention according to claim 16 is the image processing system according to claim 15 , wherein the correction means generates a second viewpoint image by the other viewpoint image generation means, and the viewpoint is determined from the origin position. According to a direction of changing to the different position, a portion for suppressing the change of the distance information is selected.

請求項1ないし請求項16の発明によれば、第1距離画像での誤差が大きくなりがちな境界領域を補正範囲として、境界に近づく方向について距離情報の変化を抑制する補正を行うことにより、境界をはさんで一方側の領域の距離情報に他方側の領域の距離情報が混入することに起因する誤差を減少ないしは除去できる。このため、このようにして得た第2距離画像に基づいて立体画像処理の後工程を行うことによって、画像領域境界付近での距離誤差が低下し、立体画像における遠近視認上の違和感を軽減することが可能となる。 According to the first to sixteenth aspects of the present invention, by performing a correction that suppresses a change in distance information in a direction approaching the boundary, with a boundary region in which an error in the first distance image tends to be large as a correction range, It is possible to reduce or eliminate an error caused by mixing the distance information of the other area into the distance information of the one area across the boundary. For this reason, by performing the post-process of stereoscopic image processing based on the second distance image obtained in this way, the distance error near the boundary of the image area is reduced, and the sense of discomfort in perspective viewing in the stereoscopic image is reduced. It becomes possible.

請求項ないし請求項7の発明によれば、仮想境界線の位置を基準として、補正範囲の設定を行うことにより、距離情報算出が苦手な領域、すなわち、立体画像における遠近視認上の違和感が生じやすい領域境界線の付近に補正範囲を設定できる。このため、補正の効率化を図ることができる。 According to the invention of claims 1 to 7, with reference to the position of the imaginary boundary line, by performing the setting of the correction range, the distance information calculated weak regions, i.e., discomfort on perspective viewing the stereoscopic image The correction range can be set in the vicinity of the region boundary line that is likely to occur. For this reason, it is possible to improve the efficiency of correction.

請求項1、請求項2、請求項8および請求項9の発明によれば、補正判定を行うことで、距離情報補正を行う必要性が高い画素のみ補正を行うことによって、距離情報補正に要する時間の短縮を図ることができる。 According to the inventions of claim 1, claim 2, claim 8, and claim 9 , it is necessary to correct the distance information by correcting only the pixels that are highly necessary to perform the distance information correction by performing the correction determination. Time can be shortened.

請求項10ないし請求項14の発明によれば、同一側画素列と反対側画素列とのうち、少なくとも同一側画素列の内側画素の距離情報を用いて、補正対象画素の距離情報の補正を行うことにより、内側画素の距離情報との連続性を確保しつつ画像領域境界付近での距離誤差を低下させ、立体画像における遠近視認上の違和感を軽減することが可能となる。 According to the tenth to fourteenth aspects of the present invention, the distance information of the correction target pixel is corrected using at least the distance information of the inner pixel of the same-side pixel column out of the same-side pixel column and the opposite-side pixel column. By doing so, it is possible to reduce the distance error in the vicinity of the image region boundary while ensuring the continuity with the distance information of the inner pixels, and to reduce the sense of discomfort in perspective viewing in the stereoscopic image.

請求項16の発明によれば、他視点画像生成手段での第2視点画像の生成において、視点が原点位置から別位置へと変化する方向に応じて、距離情報の変化の抑制を行う部分を選択することにより視点移動方向に応じた補正が可能となる。
According to the invention of claim 16, in the generation of the second viewpoint image by the other viewpoint image generation means, the portion for suppressing the change of the distance information according to the direction in which the viewpoint changes from the origin position to another position. By selecting, correction according to the viewpoint movement direction is possible.

本発明の一実施形態に係る画像処理システムの概略構成を示す図である。1 is a diagram illustrating a schematic configuration of an image processing system according to an embodiment of the present invention. ステレオカメラによって撮影された画像および得られた距離情報の画像を例示する図である。It is a figure which illustrates the image image | photographed with the stereo camera, and the image of the obtained distance information. 本実施形態に係る画像処理システムの機能構成を示すブロック図を示す。1 is a block diagram showing a functional configuration of an image processing system according to the present embodiment. 本実施形態に係る画像処理システムの機能構成を示すブロック図を示す。1 is a block diagram showing a functional configuration of an image processing system according to the present embodiment. ステレオカメラの使用形態を説明する図である。It is a figure explaining the usage pattern of a stereo camera. ステレオカメラを横置きで使用する場合の撮影イメージを示す図である。It is a figure which shows the imaging | photography image in the case of using a stereo camera horizontally. ステレオカメラで得られた画像を示す図である。It is a figure which shows the image obtained with the stereo camera. 画像境界線抽出方法について説明する図である。It is a figure explaining the image boundary line extraction method. 画像境界線抽出方法について説明する図である。It is a figure explaining the image boundary line extraction method. 画像境界線抽出方法について説明する図である。It is a figure explaining the image boundary line extraction method. 対応点探索処理を説明する概念図である。It is a conceptual diagram explaining corresponding point search processing. 補正範囲の設定方法を説明する概念図である。It is a conceptual diagram explaining the setting method of a correction range. 補正範囲の設定方法を説明する概念図である。It is a conceptual diagram explaining the setting method of a correction range. 補正判定対象位置について説明する図である。It is a figure explaining a correction judgment object position. 補正判定対象位置について説明する図である。It is a figure explaining a correction judgment object position. 補正方法について説明する図である。It is a figure explaining the correction method. 補正方法について説明する図である。It is a figure explaining the correction method. 補正方法について説明する図である。It is a figure explaining the correction method. 補正方法について説明する図である。It is a figure explaining the correction method. 補正方法について説明する図である。It is a figure explaining the correction method. 補正方法について説明する図である。It is a figure explaining the correction method. 本実施形態に係る画像処理システムにおいて実現される基本動作を説明するフローチャートである。It is a flowchart explaining the basic operation | movement implement | achieved in the image processing system which concerns on this embodiment.

<1.用語の定義>
この発明における下記用語は、次のように定義される。
・「画像」の用語は、静止画および動画の双方を包含する概念の用語として使用する。
<1. Definition of terms>
The following terms in this invention are defined as follows.
The term “image” is used as a concept term including both still images and moving images.

また、着目する補正対象画素に関して、
・「交差画素列」の用語は、当該補正対象画素を通りかつ仮想境界線(後述)と交差する線分の画素列として使用し;
・「外側画素」の用語は、交差画素列のうちで、当該補正対象画素よりも仮想境界線に近い側において当該補正対象画素に隣接する画素として使用し;
・「内側画素」の用語は、交差画素列のうちで、当該補正対象画素よりも仮想境界線に遠い側において当該補正対象画素に隣接する画素として使用し;
・「同一側画素列」の用語は、交差画素列のうちで、仮想境界線を基準として当該補正対象画素と同じ側にある部分として使用し;
・「反対側画素列」の用語は、交差画素列のうちで、仮想境界線をはさんで当該補正対象画素と反対側にある部分として使用する。
In addition, regarding the correction target pixel of interest,
The term “intersecting pixel column” is used as a pixel column that passes through the pixel to be corrected and intersects a virtual boundary line (described later);
The term “outside pixel” is used as a pixel adjacent to the correction target pixel on the side closer to the virtual boundary line than the correction target pixel in the intersection pixel row;
The term “inner pixel” is used as a pixel adjacent to the correction target pixel on the side of the intersecting pixel row that is farther from the virtual boundary line than the correction target pixel;
The term “same-side pixel column” is used as a portion of the intersecting pixel column that is on the same side as the correction target pixel with respect to the virtual boundary line;
The term “opposite pixel column” is used as a portion of the intersecting pixel column that is on the opposite side of the correction target pixel across the virtual boundary line.

<2.画像処理システムの概要>
図1は、本発明の一実施形態に係る画像処理システム1の概略構成を示す図である。画像処理システム1は、多視点カメラシステムとして構成されており、撮像部10として2眼のステレオカメラVCを備えるほか、ステレオカメラVCに対してデータの送受信が可能に接続される画像処理装置3を備える。
<2. Overview of image processing system>
FIG. 1 is a diagram showing a schematic configuration of an image processing system 1 according to an embodiment of the present invention. The image processing system 1 is configured as a multi-view camera system, and includes an image processing device 3 connected to the stereo camera VC so as to be able to transmit and receive data, in addition to the binocular stereo camera VC as the imaging unit 10. Prepare.

ステレオカメラVCは、主カメラMCおよび副カメラSCの2つの撮像系から構成されている。主カメラMCおよび副カメラSCは、カメラ正面の被写体(撮像の対象体)OBを、同じタイミングで異なる視点から撮像するように構成される。主カメラMCおよび副カメラSCによる同じタイミングの撮像によって得られる2つの画像信号(以下「画像」と略称する)は、データ線CBを介して画像処理装置3に送信される。   The stereo camera VC is composed of two imaging systems, a main camera MC and a sub camera SC. The main camera MC and the sub camera SC are configured to image a subject (imaging target) OB in front of the camera from different viewpoints at the same timing. Two image signals (hereinafter abbreviated as “image”) obtained by imaging at the same timing by the main camera MC and the sub camera SC are transmitted to the image processing device 3 via the data line CB.

以下では、主カメラMCの撮像によって取得される画像を「第1撮像画像G1」と称し、副カメラSCの撮像によって取得される画像を「第2撮像画像G2」と称する。つまり、第1および第2撮像画像G1,G2は、同一の被写体OBが異なる視点からそれぞれ捉えられた画像の組を成す。   Hereinafter, an image acquired by imaging of the main camera MC is referred to as “first captured image G1”, and an image acquired by imaging of the sub camera SC is referred to as “second captured image G2”. That is, the first and second captured images G1 and G2 form a set of images in which the same subject OB is captured from different viewpoints.

画像処理装置3は、例えばパーソナルコンピュータ(パソコン)のような情報処理装置で構成され、マウスやキーボード等を含む操作部31と、液晶ディスプレイ等で構成されるディスプレイ32と、スピーカ33と、ステレオカメラVCからのデータを受信するインターフェース(I/F)37とを備える。また、画像処理装置3は、記憶装置34と演算制御部36とを有する。   The image processing device 3 is configured by an information processing device such as a personal computer (personal computer), for example, an operation unit 31 including a mouse and a keyboard, a display 32 configured by a liquid crystal display, a speaker 33, and a stereo camera. And an interface (I / F) 37 for receiving data from the VC. The image processing apparatus 3 includes a storage device 34 and an arithmetic control unit 36.

記憶装置34は、例えばハードディスク等で構成され、ステレオカメラVCの撮像によって得られる第1および第2撮像画像G1,G2を記憶する。また、記憶装置34には、後述される距離情報補正を行うためのプログラムPG等が格納される。   The storage device 34 is composed of, for example, a hard disk and stores first and second captured images G1 and G2 obtained by imaging with the stereo camera VC. Further, the storage device 34 stores a program PG for performing distance information correction described later.

入出力部35は、例えば可搬性ディスクドライブを備えて構成され、光ディスク等の可搬性記憶媒体をセットして、演算制御部36との間でデータの授受を行う。   The input / output unit 35 includes, for example, a portable disk drive, sets a portable storage medium such as an optical disk, and exchanges data with the arithmetic control unit 36.

演算制御部36は、プロセッサとして働くCPU36aと、情報を一時的に記憶するメモリ36bとを有し、画像処理装置3の各部を統括的に制御する。演算制御部36では、記憶部34内のプログラムPGが読み込まれて実行されることで、各種機能や各種情報処理等が実現される。なお、メモリ36bには、可搬性記憶媒体に記憶されているプログラムデータを、入出力部35を介して格納させることができる。この格納されたプログラムは、画像処理装置3の動作に適宜反映可能である。   The arithmetic control unit 36 includes a CPU 36 a that functions as a processor and a memory 36 b that temporarily stores information, and comprehensively controls each unit of the image processing apparatus 3. In the arithmetic control unit 36, various functions, various information processing, and the like are realized by reading and executing the program PG in the storage unit 34. The memory 36b can store program data stored in the portable storage medium via the input / output unit 35. This stored program can be appropriately reflected in the operation of the image processing apparatus 3.

演算制御部36は、後述する距離情報補正によって、視差画像および他視点画像を生成し、ディスプレイ32により、特定の被写体OBの画像を可視的に出力する。   The calculation control unit 36 generates a parallax image and another viewpoint image by distance information correction described later, and visually outputs an image of a specific subject OB on the display 32.

<2−1.計測距離情報の一般的性質と前提事情>
この実施形態における画像処理システム1の詳細を説明する準備として、この実施形態の前提となる計測距離情報の一般的性質と、それに伴って生じる現象、すなわち従来技術で生じていた事情を説明しておく。
<2-1. General properties and assumptions of measurement distance information>
As a preparation for explaining the details of the image processing system 1 in this embodiment, the general nature of the measurement distance information that is the premise of this embodiment and the accompanying phenomenon, that is, the circumstances that have occurred in the prior art will be explained. deep.

図2は、ステレオカメラVCによって撮影された画像および得られた距離情報の画像を例示する図である。図2(a)は、主カメラMCの撮像によって取得される第1撮像画像G1を示し、図2(b)は、副カメラSCの撮像によって取得される第2撮像画像G2を示す。なお、ここでは、第1撮像画像G1を基準画像SGとし、第2撮像画像G2を参照画像RGとする。また、図2(c)は、基準画像SGと参照画像RGとの画像から生成される、所定の原点位置(この実施形態ではステレオカメラVCの位置)から被写体各部への距離情報を表現した距離情報画像G3(第1距離画像D1)を示す。   FIG. 2 is a diagram illustrating an image photographed by the stereo camera VC and an image of the obtained distance information. FIG. 2A shows a first captured image G1 acquired by imaging of the main camera MC, and FIG. 2B shows a second captured image G2 acquired by imaging of the sub camera SC. Note that, here, the first captured image G1 is a reference image SG, and the second captured image G2 is a reference image RG. FIG. 2C shows a distance expressing distance information from a predetermined origin position (the position of the stereo camera VC in this embodiment) to each part of the subject, which is generated from the standard image SG and the reference image RG. An information image G3 (first distance image D1) is shown.

図2(c)で示されるように、距離情報画像G3(第1距離画像D1)において、被写体OB1は被写体OB2と比較して所定の原点位置に相当するステレオカメラVCからの距離が相対的に近く表現されているが、近距離領域に相当する被写体OB1と遠距離領域に相当する被写体OB2との領域境界に相当する領域MXは、立体視認が難しい現象が生じる。これは、後述する対応点探索を行う際に生じる誤差によって、境界線をはさんで被写体OB1の領域の近距離情報に被写体OB2の領域の遠距離情報が混入してしまうため、立体視が欠如した画像として表示される事情による。   As shown in FIG. 2C, in the distance information image G3 (first distance image D1), the subject OB1 is relatively far from the stereo camera VC corresponding to a predetermined origin position compared to the subject OB2. Although the expression is close, the region MX corresponding to the region boundary between the subject OB1 corresponding to the short-distance region and the subject OB2 corresponding to the long-distance region has a phenomenon that stereoscopic viewing is difficult. This is because there is a lack of stereoscopic vision because the long distance information of the area of the subject OB2 is mixed into the short distance information of the area of the subject OB1 across the boundary due to an error that occurs when performing the corresponding point search described later. Depending on the circumstances displayed as an image.

このように、被写体の輪郭部分などの領域境界における距離計測では、遠近競合を含む誤距離計測結果が得られる傾向がある。したがって、この不正確な距離情報に基づいて、立体視画像を生成すると、立体画像における遠近視認上の違和感を生じる結果となってしまう。   As described above, the distance measurement at the region boundary such as the contour portion of the subject tends to obtain an erroneous distance measurement result including distance conflict. Therefore, if a stereoscopic image is generated based on the inaccurate distance information, a discomfort in perspective in the stereoscopic image is generated.

このような背景の下、本発明では、画像領域境界付近での距離誤差を低下させるような距離情報の補正を行う。   Under such a background, the present invention corrects distance information so as to reduce the distance error in the vicinity of the image region boundary.

<3.画像処理システムの機能構成>
本発明の実施形態の説明に戻る。画像処理装置3において、距離情報の補正を実行するために演算制御部36で実現される機能的な構成について説明する。
<3. Functional configuration of image processing system>
Returning to the description of the embodiment of the present invention. In the image processing apparatus 3, a functional configuration realized by the arithmetic control unit 36 in order to execute the correction of distance information will be described.

図3は、本実施形態に係る画像処理システム1の機能構成を示すブロック図を示す。図3で示されるように、ステレオカメラVCの基準カメラMCおよび参照カメラSCにより得た基準画像SGおよび参照画像RGから、距離計測部20により距離計測を実施し、第1距離画像取得部40により所定の原点位置から被写体各部への距離情報を表現した第1距離画像D1を取得する。続いて、境界線抽出部30によって基準画像SGから、被写体の2次元画像における当該被写体の複数の領域相互の境界線を抽出し、抽出された境界線および第1距離画像D1に基づいて、距離情報補正部50によって、距離情報の補正を実施し、第2距離画像生成部60により第2距離画像D2を生成する。そして、補正した距離情報に基づいて、視差画像生成部70によって第1視差画像を生成する。最後に、他視点画像生成部80によって、任意の視点で画像を生成することで、立体視が可能な画像処理を施し、ディスプレイ32に立体視画像を表示する。   FIG. 3 is a block diagram showing a functional configuration of the image processing system 1 according to the present embodiment. As shown in FIG. 3, the distance measurement unit 20 performs distance measurement from the standard image SG and the reference image RG obtained by the standard camera MC and the reference camera SC of the stereo camera VC, and the first distance image acquisition unit 40 performs the distance measurement. A first distance image D1 expressing distance information from a predetermined origin position to each part of the subject is acquired. Subsequently, the boundary line extraction unit 30 extracts a boundary line between a plurality of regions of the subject in the two-dimensional image of the subject from the reference image SG, and the distance based on the extracted boundary line and the first distance image D1. The information correction unit 50 corrects the distance information, and the second distance image generation unit 60 generates the second distance image D2. Then, based on the corrected distance information, the parallax image generation unit 70 generates a first parallax image. Finally, the other viewpoint image generation unit 80 generates an image from an arbitrary viewpoint, thereby performing image processing that enables stereoscopic viewing, and displays the stereoscopic image on the display 32.

図4は、本実施形態に係る画像処理システム1(図3参照)における距離情報補正部50で行う内容に特化したブロック図である。図2に示されるように、境界線抽出部30によって抽出された境界線、および、第1距離画像取得部40により得られた第1距離画像に基づいて、補正範囲設定部41によって補正範囲を設定する。この補正範囲に対して、補正判定部42によって補正の必要の有無の判定を実施し、補正が必要という判定結果であれば、距離情報の補正対象とする。   FIG. 4 is a block diagram specialized in the contents performed by the distance information correction unit 50 in the image processing system 1 (see FIG. 3) according to the present embodiment. As shown in FIG. 2, the correction range setting unit 41 sets the correction range based on the boundary line extracted by the boundary line extraction unit 30 and the first distance image obtained by the first distance image acquisition unit 40. Set. The correction determination unit 42 determines whether or not correction is necessary for the correction range. If the determination result indicates that correction is necessary, the correction target of the distance information is set.

最後に、補正距離生成部43により、第1距離画像D1に対して選択した補正を行うことで補正距離を生成する。   Finally, the correction distance generation unit 43 generates a correction distance by performing the selected correction on the first distance image D1.

図3および図4で示されたような演算制御部36の機能的な構成が、プログラムPGの実行によって実現されるものとして説明するが、専用のハードウエア構成で実現されても良い。   Although the functional configuration of the arithmetic control unit 36 as shown in FIGS. 3 and 4 is described as being realized by executing the program PG, it may be realized by a dedicated hardware configuration.

以降、撮像部10、境界線抽出部30、距離計測部20、第1距離画像取得部40、距離情報補正部50、第2距離画像生成部60、視差画像生成部70および、他視点画像生成部80の各処理についての具体的内容を、図3および図4を参照しながら順次説明する。   Thereafter, the imaging unit 10, the boundary line extraction unit 30, the distance measurement unit 20, the first distance image acquisition unit 40, the distance information correction unit 50, the second distance image generation unit 60, the parallax image generation unit 70, and other viewpoint image generation The specific contents of each process of the unit 80 will be sequentially described with reference to FIGS.

<3−1.撮像部10>
図5は、撮像部10のステレオカメラVCの具体的配置例を説明する図である。図5(a)および図5(b)に示すステレオカメラVC1では、主カメラMCと副カメラSCとが基線長L分だけ離れて配置された構成を採り、主カメラMCおよび副カメラSCは、カメラ筐体の一辺に平行となるように配列されている。
<3-1. Imaging unit 10>
FIG. 5 is a diagram illustrating a specific arrangement example of the stereo camera VC of the imaging unit 10. The stereo camera VC1 shown in FIGS. 5A and 5B has a configuration in which the main camera MC and the sub camera SC are separated from each other by the base line length L. The main camera MC and the sub camera SC are They are arranged so as to be parallel to one side of the camera casing.

この主カメラMCおよび副カメラSCの配列が、水平面に対して垂直となるようにステレオカメラVC1を配置した状態を縦置きと呼称する(図5(a)参照)。一方、主カメラMCおよび副カメラSCの配列が、水平面に対して平行となるようにステレオカメラVC1を配置した状態を横置きと呼称する(図5(b)参照)。   A state in which the stereo camera VC1 is arranged so that the arrangement of the main camera MC and the sub camera SC is perpendicular to the horizontal plane is referred to as vertical installation (see FIG. 5A). On the other hand, a state in which the stereo camera VC1 is arranged so that the arrangement of the main camera MC and the sub camera SC is parallel to the horizontal plane is referred to as horizontal placement (see FIG. 5B).

また、図5(c)に示すステレオカメラVC2は、主カメラMCと副カメラSCとが基線長L分だけ離れて配置されている点ではステレオカメラVC1と同じであるが、主カメラMCおよび副カメラSCは、カメラ筐体の何れの辺に対しても斜めとなるように配列されており、この状態を斜め置きと呼称する。なお、上記のような配置状態に対して、上下左右が入れ替わるように配置しても良い。   Further, the stereo camera VC2 shown in FIG. 5C is the same as the stereo camera VC1 in that the main camera MC and the sub camera SC are arranged apart from each other by the base line length L. The cameras SC are arranged so as to be inclined with respect to any side of the camera casing, and this state is referred to as oblique placement. In addition, you may arrange | position so that up and down, right and left may be switched with respect to the above arrangement | positioning states.

構成例として、例えば、主カメラMCは、高精細画像を撮影できるようなハイビジョン放送対応レンズ(HDTVレンズ)等の高解像度で、焦点可変のいわゆるズームレンズを有したデジタルカメラシステムとし、副カメラSCは、携帯電話等に搭載される小型ユニットカメラや、マイクロカメラユニット(MCU)などの低解像度で、単一焦点のデジタルカメラシステムとすることができる。または、両方ともハイビジョン放送対応レンズ・マイクロカメラユニットでの構成にしても良い。なお、副カメラSCのレンズにはズームレンズを用いても良いが、高解像度は要求されない。このように、2つのレンズユニットはどのような構成を取っても良いが、立体視画像を生成するにあたり、主カメラMC側の画像は、他視点画像として使用されることから、副カメラSCと同レベルのレンズ、若しくは、副カメラSCより性能が良いものを使用する方が望ましい。   As a configuration example, for example, the main camera MC is a digital camera system having a so-called zoom lens with a high-resolution, variable focus, such as a high-definition broadcast lens (HDTV lens) that can capture a high-definition image, and the sub camera SC. Can be a low-resolution, single-focus digital camera system such as a small unit camera or a micro camera unit (MCU) mounted on a mobile phone or the like. Alternatively, both may be configured with a high-definition broadcast compatible lens / micro camera unit. A zoom lens may be used as the lens of the sub camera SC, but high resolution is not required. As described above, the two lens units may have any configuration. However, when generating a stereoscopic image, the image on the main camera MC side is used as the other viewpoint image. It is desirable to use a lens having the same level or a better performance than the sub camera SC.

ステレオカメラVCにより得た画像を、そのまま立体視画像として使用する場合は、横置きに構成される必要があるが、本手法では距離計測を実施し、距離情報を基に、立体視用の画像を新しく生成することから、距離情報と他視点画像とを生成するための基準画像SGを取得できれば良いので、図5(b)の横置きの構成だけでなく、図5(a)の縦置きあるいは図5(c)の斜め置きの構成でも可能となる。ただし、図5(b)の横置きの構成では、副カメラSCで取得した画像に基づいて、他視点画像を生成するようにしてもよい。   When an image obtained by the stereo camera VC is used as a stereoscopic image as it is, it is necessary to be configured horizontally, but in this method, distance measurement is performed, and an image for stereoscopic vision is based on the distance information. Therefore, it is sufficient that the reference image SG for generating the distance information and the other viewpoint image can be acquired. Therefore, not only the horizontal arrangement shown in FIG. 5B but also the vertical arrangement shown in FIG. Alternatively, the obliquely arranged configuration shown in FIG. However, in the horizontal configuration of FIG. 5B, another viewpoint image may be generated based on the image acquired by the sub camera SC.

図6は、ステレオカメラVC1を横置きで使用する場合の撮影状況を示す模式図であり、被写体OBおよび背景BGを上方から見た状況に相当する。図6の縦軸は、主カメラMCの位置を原点としたときの、主カメラMCの光軸方向における被写体OBおよび背景BGまでの距離を示している。また横軸は、主カメラMCと副カメラSCとを結ぶ基線方向(水平方向)の距離を示しており、この方向の撮影可能範囲は、主カメラMCおよび副カメラSCで撮影する場合の水平方向の画角に相当する。主カメラMCにおいては3段階の倍率で撮影を行う例を示しており、最も倍率の低い(最も画角の広い)状態で撮影した画像を第1の主カメラ画像と呼称し、その画角をラインL1で示している。次に倍率の高い状態で撮影した画像を第2の主カメラ画像と呼称し、その画角をラインL2で示している。そして、最も倍率の高い(最も画角の狭い)状態で撮影した画像を第3の主カメラ画像と呼称し、その画角をラインL3で示している。一方、副カメラSCはズーム機能がないので画角は1種類だけであり、その画角をラインL4で示している。   FIG. 6 is a schematic diagram illustrating a shooting situation when the stereo camera VC1 is used in a horizontal position, and corresponds to a situation in which the subject OB and the background BG are viewed from above. The vertical axis in FIG. 6 indicates the distance to the subject OB and the background BG in the optical axis direction of the main camera MC when the position of the main camera MC is the origin. The horizontal axis indicates the distance in the base line direction (horizontal direction) connecting the main camera MC and the sub camera SC, and the shootable range in this direction is the horizontal direction when shooting with the main camera MC and the sub camera SC. Corresponds to the angle of view. In the main camera MC, an example is shown in which shooting is performed at three different magnifications. An image shot at the lowest magnification (the widest angle of view) is referred to as a first main camera image, and the angle of view is referred to as the first camera image. This is indicated by line L1. Next, an image taken at a high magnification is referred to as a second main camera image, and the angle of view is indicated by a line L2. An image taken with the highest magnification (the narrowest angle of view) is referred to as a third main camera image, and the angle of view is indicated by a line L3. On the other hand, since the sub camera SC does not have a zoom function, there is only one type of angle of view, and the angle of view is indicated by a line L4.

図7には、図6に示した撮影イメージで得られた画像を示す。図7(a)には主カメラMCで撮影した第1の主カメラ画像を、図7(b)には主カメラMCで撮影した第2の主カメラ画像を、図7(c)には主カメラMCで撮影した第3の主カメラ画像を示している。   FIG. 7 shows an image obtained from the photographed image shown in FIG. 7A shows the first main camera image taken by the main camera MC, FIG. 7B shows the second main camera image taken by the main camera MC, and FIG. 7C shows the main image. The 3rd main camera image image | photographed with the camera MC is shown.

また、図7(d)〜図7(f)には、それぞれ図7(a)〜図7(c)の画像を取得した際に、副カメラSCで得られた副カメラ画像を示している。この副カメラ画像は、何れも同じ倍率の画像となる。なお、副カメラSCの光軸は、基線長L分だけ主カメラMCから離れているので、副カメラSCで得られた画像と主カメラMCで得られた画像との間には、視差に伴う観察方向のズレが生じている。   FIGS. 7D to 7F show sub camera images obtained by the sub camera SC when the images of FIGS. 7A to 7C are acquired, respectively. . These sub-camera images are all images having the same magnification. Since the optical axis of the secondary camera SC is separated from the main camera MC by the baseline length L, there is a parallax between the image obtained by the secondary camera SC and the image obtained by the primary camera MC. There is a deviation in the observation direction.

以上のように、主カメラMCと副カメラSCとの2つのカメラは同じ被写体OBおよび背景BGを撮像しているが、それぞれの視線とレンズの倍率とが異なるため、被写体OBの大きさや画角が異なった画像が得られることになる。   As described above, the two cameras, the main camera MC and the sub camera SC, capture the same subject OB and the background BG. However, since the line of sight and the magnification of the lens are different, the size and angle of view of the subject OB are different. Different images will be obtained.

<3−2.境界線抽出部30>
続いて、境界線抽出部30では、撮像部10で取得された基準画像SGの2次元画像における複数の領域相互の境界線を抽出する。すなわち、他視点画像を生成するためのベースとなる基準画像SGに対して、被写体OBや背景BGを構成する複数の領域相互の境界線を抽出する。なお、図3では、主カメラMCで得られた画像G1を基準画像SGとしている。また、ここにおける「領域」とは、画像の中で明度・彩度・色相などがほぼ連続的に変化している空間範囲を指しており、図7のような画像の例では、人物の顔領域、背景にあるそれぞれの樹木の幹の領域、空の領域などである。通常、これらの領域の相互境界は輪郭線となっている。境界線抽出部30によって、画像領域を対象として輪郭(エッジ)が抽出される処理が行われるが、エッジ情報の抽出方法に関しては、特に特殊な方法を使用する必要はなく、一般的な方法により抽出する。例えば、下記記載のような方法が挙げられる。
<3-2. Boundary line extraction unit 30>
Subsequently, the boundary line extraction unit 30 extracts boundary lines between a plurality of regions in the two-dimensional image of the reference image SG acquired by the imaging unit 10. That is, a boundary line between a plurality of areas constituting the subject OB and the background BG is extracted from the reference image SG serving as a base for generating another viewpoint image. In FIG. 3, the image G1 obtained by the main camera MC is used as the reference image SG. In addition, the “region” in this case refers to a spatial range in which brightness, saturation, hue, and the like change almost continuously in the image. In the example of the image as shown in FIG. The area, the trunk area of each tree in the background, the empty area, etc. Usually, the mutual boundary between these regions is an outline. The boundary line extraction unit 30 performs processing for extracting an outline (edge) for the image region. However, the edge information extraction method does not need to use a special method, and is based on a general method. Extract. For example, the following methods are mentioned.

<3−2−1.画像境界線抽出の第1方法>
図8および図9は、画像境界線抽出の第1方法について説明する図である。図8では、主カメラMCで得られた基準画像SGを入力画像として例示し、図9では、この基準画像SGに対して、一般的なエッジ検出用のフィルタ処理を施した図を示す。図9で示されるように、被写体OBや背景BGのエッジ情報により、輪郭情報を領域候補として抽出することができる。
<3-2-1. First Method for Extracting Image Boundary Line>
FIG. 8 and FIG. 9 are diagrams for explaining the first method of image boundary line extraction. FIG. 8 illustrates the reference image SG obtained by the main camera MC as an input image, and FIG. 9 shows a diagram in which a general edge detection filter process is performed on the reference image SG. As shown in FIG. 9, the contour information can be extracted as a region candidate based on the edge information of the subject OB and the background BG.

<3−2−2.画像境界線抽出の第2方法>
図10は、画像境界線抽出の第2方法について説明する図であり、入力画像は、図8の基準画像SGと同様ではあるが、周辺との色情報または、輝度情報をもとに画像境界線を抽出する方法を説明する図である。具体的には、ある画素の色情報、または輝度情報と、周辺の色情報、または輝度情報との比較を行い、差分値が所定の閾値より小さい場合は、同じ領域として統合し、統合領域の大きさに従って対象領域を抽出し、抽出した後の結果に対して、エッジ検出を実施する。
<3-2-2. Second Method for Extracting Image Boundary Line>
FIG. 10 is a diagram for explaining a second method of image boundary line extraction. The input image is the same as the reference image SG in FIG. 8, but the image boundary is based on color information or luminance information with the periphery. It is a figure explaining the method of extracting a line. Specifically, the color information or luminance information of a certain pixel is compared with the surrounding color information or luminance information, and if the difference value is smaller than a predetermined threshold, they are integrated as the same region, The target region is extracted according to the size, and edge detection is performed on the result after extraction.

<3−2−3.画像境界線抽出のその他の方法>
上記第1、第2方法以外にも、一般的な領域切り出し方法による領域候補抽出を実施することもできる。例えば、特開2010−122734号公報等で公知の平均値シフト法(Mean Shift法)や特開2010−110556号公報等で公知のグラフカットなどが利用できる。
<3-2-3. Other methods of image boundary extraction>
In addition to the first and second methods, region candidate extraction can also be performed by a general region cutout method. For example, a known average shift method (Mean Shift method) disclosed in Japanese Patent Application Laid-Open No. 2010-122734 or a graph cut known in Japanese Patent Application Laid-Open No. 2010-110556 can be used.

<3−3.距離計測部20および第1距離画像取得部40>
距離計測部20では、所定の原点位置から被写体各部への距離を計測する。そして、その計測距離結果に基づいて、第1距離画像取得部40では、距離情報を表現した第1距離画像D1を取得する。この実施形態では、次のような対応点探索処理によって第1距離画像D1を取得する。
<3-3. Distance Measurement Unit 20 and First Distance Image Acquisition Unit 40>
The distance measuring unit 20 measures the distance from the predetermined origin position to each part of the subject. Based on the measurement distance result, the first distance image acquisition unit 40 acquires the first distance image D1 expressing the distance information. In this embodiment, the first distance image D1 is acquired by the following corresponding point search process.

一般に、対応点探索処理では、対応点基準画像上の任意の注目点に対応する対応点参照画像像上の点(対応点)を探索して求め、得られた注目点と対応点との関係から視差情報を得た後、当該視差情報から距離情報を取得する。なお、対応点参照画像とは、対応点基準画像に対応する画像である。具体的には、ステレオ画像においては、同時刻に撮像した一対の画像のうち一方が対応点基準画像であり、他方は対応点参照画像である。また、時系列画像においては、同一のカメラで撮影された画像のうち、時間的に前の画像が対応点基準画像であり、時間的に後の画像が対応点参照画像である。この対応点基準画像上の注目点に対してテンプレートが設定され、このテンプレートと対応する対応点参照画像上のウインドウが探索され、この探索されたウインドウから対応点が求められる。   In general, in the corresponding point search processing, a point (corresponding point) on the corresponding point reference image corresponding to an arbitrary target point on the corresponding point reference image is searched and obtained, and the relationship between the target point and the corresponding point obtained is obtained. After obtaining the parallax information from the information, distance information is obtained from the parallax information. The corresponding point reference image is an image corresponding to the corresponding point standard image. Specifically, in a stereo image, one of a pair of images captured at the same time is a corresponding point reference image, and the other is a corresponding point reference image. In the time-series images, among images taken by the same camera, the temporally previous image is the corresponding point reference image, and the temporally subsequent image is the corresponding point reference image. A template is set for the target point on the corresponding point reference image, a window on the corresponding point reference image corresponding to the template is searched, and a corresponding point is obtained from the searched window.

図11は、この実施形態での対応点探索処理を説明する概念図である。図11(a)は対応点参照画像CRGとしてサブカメラSCで得られた第2撮像画像G2を示し、図11(b)は対応点基準画像CSGとしてメインカメラMCで得られた第1撮像画像G1を示す。対応点基準画像CSG中の各画素について、対応点参照画像CRGの破線で囲まれた領域CP中の対応画素を求めて行く。なお、対応点基準画像CSGの全体領域は、対応点参照画像CRGの領域CPに対応しており、領域CPが拡大されたものとなっている。   FIG. 11 is a conceptual diagram illustrating corresponding point search processing in this embodiment. FIG. 11A shows the second captured image G2 obtained by the sub camera SC as the corresponding point reference image CRG, and FIG. 11B shows the first captured image obtained by the main camera MC as the corresponding point reference image CSG. G1 is shown. For each pixel in the corresponding point reference image CSG, the corresponding pixel in the region CP surrounded by the broken line of the corresponding point reference image CRG is obtained. Note that the entire region of the corresponding point reference image CSG corresponds to the region CP of the corresponding point reference image CRG, and the region CP is enlarged.

このような対応点探索の具体的な方法は公知であり、位相情報により対応点探索を行う方法としては、例えば、下記のような方法が挙げられる。
・位相限定相関法(Phase Only Correlation: POC)を用いた対応点探索
・位相差解析法(Phase Shift Analysis: PSA)を用いた対応点探索
また、輝度情報を基に対応点探索を行う方法としては、例えば、下記のような方法が挙げられる。
・SAD(Sum of Absolute Difference)法を用いた対応点探索
・SSD(Sum of Squared intensity Difference)法を用いた対応点探索
NCC(Normalized Cross Correlation)法を用いた対応点探索
そして、このような対応点探索の結果に基づいてステレオカメラから被写体各部への距離を画素単位で表現した第1距離画像D1を生成する。
A specific method for searching for corresponding points is known, and examples of a method for searching for corresponding points based on phase information include the following methods.
-Corresponding point search using Phase Only Correlation (POC)-Corresponding point search using Phase Shift Analysis (PSA) As a method for searching corresponding points based on luminance information Examples of the method include the following methods.
-Corresponding point search using SAD (Sum of Absolute Difference) method-Corresponding point search using SSD (Sum of Squared intensity Difference) method
Corresponding point search using NCC (Normalized Cross Correlation) method Then, based on the result of such corresponding point search, a first distance image D1 expressing the distance from the stereo camera to each part of the subject in pixel units is generated.

ステレオカメラを用いた第1距離画像D1の生成において、2つの画像のうち画素数が少ない画像を基準画像として使用するときには、サブピクセル単位での対応点探索が行われる。   In generating the first distance image D1 using the stereo camera, when an image having a small number of pixels of the two images is used as a reference image, a corresponding point search is performed in units of subpixels.

図11(c)は、対応点基準画像CSGとして図11(a)における第2撮像画像G2を採用し、それにサブピクセルを設定する例を模式的に示す図である。さらに、図11(d)は、画素数が多い方の図11(b)の第1撮像画像G1に相当する画像を対応点基準画像CSGとした例を示す。   FIG. 11C is a diagram schematically illustrating an example in which the second captured image G2 in FIG. 11A is adopted as the corresponding point reference image CSG, and subpixels are set thereto. Further, FIG. 11D shows an example in which an image corresponding to the first captured image G1 of FIG. 11B having the larger number of pixels is used as the corresponding point reference image CSG.

相関法を用いた対応点探索処理では、対応点基準画像CSG上の注目点に対して対応点参照画像CRG上の対応点を求めるために対応点参照画像CRG上を1画素ずつサンプリングするという処理がなされる。   In the corresponding point search processing using the correlation method, a process of sampling the corresponding point reference image CRG pixel by pixel in order to obtain the corresponding point on the corresponding point reference image CRG for the attention point on the corresponding point reference image CSG. Is made.

図11(d)で示されるように、対応点基準画像CSGの倍率が高く、対応点参照画像CRGの倍率が低いような場合、すなわち、有効画素数の多い側を対応点基準画像CSGとした場合には、複雑な処理を施すことなく、サブピクセル単位まで対応点探索処理を実施することができる。これに対し、図11(c)で示されるように、対応点基準画像CSGの倍率が低く、対応点参照画像CRGの倍率が高いような場合には、サンプリング間隔が大幅に異なり、対応点参照画像CRGの情報が抜け落ちて精度の良い距離情報の取得が困難となる。後記のような距離情報の補正処理は、領域境界付近での距離情報の誤差の補償を主目的とするが、このようなサブピクセル探索に起因する誤差の補償としても有意義である。   As shown in FIG. 11 (d), when the magnification of the corresponding point standard image CSG is high and the magnification of the corresponding point reference image CRG is low, that is, the side with the larger number of effective pixels is used as the corresponding point standard image CSG. In this case, the corresponding point search process can be performed up to the sub-pixel unit without performing a complicated process. On the other hand, as shown in FIG. 11C, when the magnification of the corresponding point reference image CSG is low and the magnification of the corresponding point reference image CRG is high, the sampling interval is significantly different, and the corresponding point reference is performed. The information of the image CRG falls out and it becomes difficult to obtain accurate distance information. The correction processing of distance information as described later is mainly intended to compensate for errors in distance information in the vicinity of the region boundary, but is also significant as compensation for errors caused by such subpixel search.

図11(c)では、サブピクセル単位まで対応点探索処理を実施するために、1つの画素を横方向に3分割して3つのサブピクセルを設定した例を示しているが、画素の分割はこれに限定されるものではなく、また、さらに細かく分割することも可能である。これにより、対応点基準画像CSGと対応点参照画像CRGとで倍率が異なるような場合でも、サンプリング間隔を一致させることができる。すなわち、注目点OPがサブピクセルレベルの位置である場合に、注目点OPであるサブピクセルSPを中心にして探索用テンプレートTPを設定することになる。   FIG. 11C shows an example in which one pixel is divided into three in the horizontal direction and three subpixels are set in order to perform the corresponding point search process up to the subpixel unit. However, the present invention is not limited to this, and can be further finely divided. Thereby, even when the magnification is different between the corresponding point reference image CSG and the corresponding point reference image CRG, the sampling intervals can be matched. That is, when the attention point OP is a sub-pixel level position, the search template TP is set around the sub-pixel SP that is the attention point OP.

なお、サブピクセルの推定方法としては、例えば、特開2001−195597号公報などに、画像間の相関値を算出後、最も相関値の高い位置とその周辺の相関値との位置関係から、画素と画素との間の相関値を直線式または曲線式に当て嵌めることによって補間し、相関値のピーク位置およびピーク値を推定する方法が開示されており、この推定方法を使用することができる。   As a sub-pixel estimation method, for example, in Japanese Patent Application Laid-Open No. 2001-195597, after calculating a correlation value between images, a pixel is calculated based on a positional relationship between a position having the highest correlation value and its surrounding correlation values. A method for interpolating a correlation value between a pixel and a pixel by applying a linear equation or a curve equation to estimate a peak position and a peak value of the correlation value is disclosed, and this estimation method can be used.

これらの対応点探索法のいずれにおいても、領域境界付近など距離情報算出が不得意な対象領域が存在する。それは、領域の境界線をはさんで一方の領域での対応点探索に、他方の領域の画像情報が混入しやすいことに起因する。これはエッジ付近の画像の不鮮明さという原因だけでなく、異なる視線から被写体を見た2つの画像(あるいは異なる時刻で被写体を見た2つの画像)を比較するのであるから、領域境界の画像情報は視差の影響を受けやすいことにも関係している。   In any of these corresponding point search methods, there are target regions that are not good at calculating distance information, such as near the region boundary. This is because the image information of the other region is likely to be mixed in the corresponding point search in one region across the boundary line of the region. This is not only due to the unclearness of the image near the edge, but also because it compares two images of the subject viewed from different lines of sight (or two images of the subject viewed at different times). Is also related to being easily affected by parallax.

このような対応点探索による距離画像の生成だけでなく、後に「変形例」として説明する他の方法によって距離計測を行って距離画像を生成しても、やはり領域境界の付近では距離算出の誤差が生じやすい。   In addition to the generation of the distance image by such a corresponding point search, even if the distance image is generated by performing the distance measurement by another method which will be described later as a `` variation example '', the distance calculation error is still in the vicinity of the region boundary. Is likely to occur.

そこで、この発明の実施形態では、以下のような距離情報の補正処理を行う。   Therefore, in the embodiment of the present invention, the following distance information correction processing is performed.

<3−4.距離情報補正部50および第2距離画像生成部60>
第1距離画像取得部40により取得した第1距離画像D1は、図2および上記で説明したように、被写体の輪郭部分などにおいては遠近競合による計測誤差を含む傾向にあるため、距離情報補正部50により補正を行う。その際、まず、第1距離画像D1中において、基準画像SGでの境界線抽出部30で抽出した境界線に対応する位置に仮想境界線を設定する。次に、第1距離画像D1のうち仮想境界線をはさんで互いに隣接する領域のうち少なくとも一方を補正範囲とする。そして、仮想境界線に近づく方向についての距離情報の変化を抑制する補正を第1距離画像D1に対して行い、最終的に、第2距離画像生成部60によって第2距離画像D2が生成される。ただし、ここにおける「抑制」とは、変化をゼロにして完全に平坦とする場合と、変化率の絶対値を減少させる場合との双方を含む概念である。
<3-4. Distance Information Correction Unit 50 and Second Distance Image Generation Unit 60>
Since the first distance image D1 acquired by the first distance image acquisition unit 40 tends to include a measurement error due to distance competition in the contour portion of the subject, as described above with reference to FIG. 2, the distance information correction unit 50 to correct. At that time, first, in the first distance image D1, a virtual boundary line is set at a position corresponding to the boundary line extracted by the boundary line extraction unit 30 in the reference image SG. Next, at least one of areas adjacent to each other across the virtual boundary line in the first distance image D1 is set as a correction range. Then, the first distance image D1 is corrected to suppress the change in the distance information in the direction approaching the virtual boundary line, and finally the second distance image D2 is generated by the second distance image generation unit 60. . However, “suppression” here is a concept including both a case where the change is made zero and completely flat, and a case where the absolute value of the rate of change is reduced.

ここで、「仮想境界線」と呼ぶのは次のような理由による。すなわち、第1距離画像D1においては境界付近の誤差が大きいため、第1距離画像D1自身から境界線の位置を特定することは好ましくない。そこで、通常の2次元画像である基準画像SGで検出した境界線を流用して第1距離画像D1での境界線の位置を推定するのであるが、その境界線位置は第1距離画像D1自身から抽出したものではないため、第1距離画像D1にとっては借用した境界線、あるいは仮想的な境界線ということになるためである。   Here, the “virtual boundary” is called for the following reason. That is, since the error near the boundary is large in the first distance image D1, it is not preferable to specify the position of the boundary line from the first distance image D1 itself. Accordingly, the boundary line detected in the reference image SG, which is a normal two-dimensional image, is used to estimate the position of the boundary line in the first distance image D1, and the boundary line position is the first distance image D1 itself. This is because the first distance image D1 is a borrowed boundary line or a virtual boundary line.

距離情報補正部50では、仮想境界線の位置を基準として、補正範囲の設定を行う補正範囲設定部41と、当該補正範囲内の画素のうち、所定の判定条件を満たす距離情報を持った画素のみを補正対象画素とする補正判定を行う補正判定部42と、補正距離を生成する補正距離生成部43とを備えている(図4参照)。すなわち、この距離情報の補正は、境界線抽出部30で算出されたエッジ情報に基づいて、第1距離画像D1に対して、補正範囲、補正の有無判定および補正方法の設定を行うことで補正を実施する。なお、上述した対応点探索方法と他の距離計測方法とでは、計測誤差が発生する位置が異なるが、距離情報補正部50により問題なく補正することができる。   In the distance information correction unit 50, a correction range setting unit 41 that sets a correction range with reference to the position of the virtual boundary line, and a pixel having distance information that satisfies a predetermined determination condition among pixels in the correction range A correction determination unit 42 that performs correction determination using only the correction target pixel, and a correction distance generation unit 43 that generates a correction distance (see FIG. 4). That is, the correction of the distance information is performed by setting the correction range, the presence / absence of correction, and the correction method for the first distance image D1 based on the edge information calculated by the boundary line extraction unit 30. To implement. In addition, although the position where a measurement error occurs differs between the above-described corresponding point search method and another distance measurement method, the distance information correction unit 50 can correct it without any problem.

以降、距離情報の補正に関して、図4の補正範囲設定部41、補正判定部42、および、補正距離生成部43のそれぞれの機能について、順次説明する。   Hereinafter, regarding the correction of the distance information, the functions of the correction range setting unit 41, the correction determination unit 42, and the correction distance generation unit 43 in FIG. 4 will be sequentially described.

<3−4−1.補正範囲設定部41>
図12および図13は、第1距離画像D1における補正範囲の設定方法を説明する概念図である。概念図として、図12(a)及び図12(b)の下側に示されるような、近距離領域NDと遠距離領域FDとが重なり合った被写体部分が存在した場合、隣接する2つの領域ND,FDの境界を通る帯状エリアAR内の距離を正確に計測できたとすると、図12(a)の上側で示される距離情報を得ることができる。しかしながら、実際には、図12(b)の上側で示される距離計測結果のように、エリアARの領域境界付近ABに対応した距離情報では、遠近競合の影響による誤距離が発生しやすい。これは、先にも説明したように、エリアARの領域境界付近ABに遠距離と近距離との両方の情報を含んでいるためである。そして、このような領域境界付近ABに対して上述したエリアベースの対応点探索を実施すると、誤距離が発生する可能性が高くなるからである。そこで、このような領域境界を考慮して距離情報を補正するために、補正範囲設定部41では、前述した仮想境界線の位置を基準として、補正範囲の設定を行う。補正範囲の設定方法としては、例えば、下記方法が挙げられる。
<3-4-1. Correction range setting unit 41>
12 and 13 are conceptual diagrams illustrating a method for setting a correction range in the first distance image D1. As a conceptual diagram, when there is a subject portion where the short-distance area ND and the long-distance area FD overlap as shown in the lower side of FIGS. 12A and 12B, two adjacent areas ND , FD, the distance information shown on the upper side of FIG. 12A can be obtained. However, in reality, as shown in the distance measurement result shown on the upper side of FIG. 12B, in the distance information corresponding to the area boundary vicinity AB of the area AR, an erroneous distance due to the influence of perspective conflict is likely to occur. This is because information on both the long distance and the short distance is included in the vicinity of the area boundary AB of the area AR as described above. Then, when the above-described area-based corresponding point search is performed on such a region boundary vicinity AB, the possibility of an erroneous distance increases. Therefore, in order to correct the distance information in consideration of such a region boundary, the correction range setting unit 41 sets the correction range on the basis of the position of the virtual boundary line described above. Examples of the correction range setting method include the following methods.

<3−4−1−1.範囲設定の第1方法>
補正範囲設定部41が、補正範囲として、第1距離画像D1において、仮想境界線からの平面距離が所定の値以下の画素範囲を設定する。すなわち、境界線抽出部30により抽出したエッジ情報を基に、範囲設定を行う。
<3-4-1-1. First method of range setting>
The correction range setting unit 41 sets a pixel range in which the planar distance from the virtual boundary line is a predetermined value or less in the first distance image D1 as the correction range. That is, the range is set based on the edge information extracted by the boundary line extraction unit 30.

図13は、補正範囲の設定を例示した図である。図13(a)では、基準画像SGにおいて、境界線抽出部30で抽出した近距離領域NDの領域境界線NBと遠距離領域FDの領域境界線FBとを示す。図13(b)では、第1距離画像D1において、基準画像SGでの境界線に対応する位置に近距離領域NDでは仮想境界線NB’を示し、遠距離領域FDでは仮想境界線FB’を示している。図13(c)では、第1距離画像D1のうち仮想境界線NB’,FB’からの平面距離(2次元画像上の距離)が所定の値以下の画素範囲をそれぞれ補正範囲NA,FAと設定することを示した図である。   FIG. 13 is a diagram illustrating the setting of the correction range. FIG. 13A shows the region boundary line NB of the short-distance region ND and the region boundary line FB of the long-distance region FD extracted by the boundary line extraction unit 30 in the reference image SG. In FIG. 13B, in the first distance image D1, the virtual boundary line NB ′ is shown in the short distance area ND and the virtual boundary line FB ′ is shown in the far distance area FD at the position corresponding to the boundary line in the reference image SG. Show. In FIG. 13C, pixel ranges in which the planar distance (distance on the two-dimensional image) from the virtual boundary lines NB ′ and FB ′ in the first distance image D1 is equal to or smaller than a predetermined value are corrected ranges NA and FA, respectively. It is the figure which showed setting.

図13で示されるように、エッジ情報を各被写体の領域境界とし、抽出されたエッジ情報上の位置、あるいは、予め指定しておいた範囲の領域に対して、補正処理の範囲を設定する。ここで、指定する範囲の幅としては、各領域境界に対し、一律にしても良いが、図13(c)で示されるように、近距離領域NDの補正範囲NAを規定する帯状領域の幅Wnが、遠距離領域FDの補正範囲FAを規定する帯状領域の幅Wfと比べて大きくなっている。すなわち、第1距離方法画像D1の補正範囲は、仮想境界線FB’,NB’のそれぞれの両側に平面距離Wf/2,Wn/2だけ広げた帯状領域とされるが、その幅、すなわち仮想境界線FB’,NB’から補正範囲の外縁までの平面距離は、当該仮想境界線が囲む領域の距離情報に応じて可変に設定することもできる。   As shown in FIG. 13, the edge information is used as the region boundary of each subject, and the correction processing range is set for the position on the extracted edge information or the region in the range specified in advance. Here, the width of the range to be specified may be uniform with respect to each region boundary. However, as shown in FIG. 13C, the width of the band-shaped region that defines the correction range NA of the short-range region ND. Wn is larger than the width Wf of the band-like region that defines the correction range FA of the long-distance region FD. That is, the correction range of the first distance method image D1 is a band-like area that is widened by two plane distances Wf / 2 and Wn / 2 on both sides of the virtual boundary lines FB ′ and NB ′. The planar distance from the boundary lines FB ′ and NB ′ to the outer edge of the correction range can be variably set according to the distance information of the region surrounded by the virtual boundary line.

例えば、遠距離領域FDの補正範囲FAは、対応点探索を実施する際に設定されるウインドウサイズの領域を補正対象の範囲と設定し、近距離領域NDの補正範囲NAは、距離情報算出結果で得られた被写体各部の視差のうちの最大視差に応じた幅を持つ範囲で実施しても良い。被写体部分が近距離にあるほど視差は大きくなるため、最大視差は、被写体のうちカメラから最も近い部分までの距離を反映しているためである。このような方法で可変にすることで、シーンに応じた最適な補正処理が実施できる。この方法では、例えば、多重解像度変換を行った対応点探索などに効果的である。   For example, the correction range FA of the long-distance area FD sets a window size area set when the corresponding point search is performed as a correction target range, and the correction range NA of the short-distance area ND indicates the distance information calculation result. It may be implemented in a range having a width corresponding to the maximum parallax among the parallaxes of each part of the subject obtained in step (b). This is because the parallax increases as the subject portion becomes closer, so the maximum parallax reflects the distance from the camera to the nearest portion of the subject. By making it variable by such a method, an optimal correction process according to the scene can be performed. This method is effective, for example, for searching for corresponding points after multi-resolution conversion.

<3−4−1−2.範囲設定の第2方法>
補正範囲設定部41が、補正範囲として、第1距離画像D1において、仮想境界線の距離情報との相違量が所定の値以下の距離情報を持つ画素範囲を設定する。すなわち、図13の場合では、近距離領域ND(あるいは遠距離領域FD)内の各画素の距離情報と仮想境界線NB’(あるいは仮想境界線FB’)の距離情報とを比べて、両者の距離情報の相違量が所定の閾値以下である画素からなる範囲が、補正範囲FA(あるいは補正範囲NA)として設定される。
<3-4-1-2. Second method of range setting>
The correction range setting unit 41 sets a pixel range having distance information whose difference from the distance information of the virtual boundary line is equal to or less than a predetermined value in the first distance image D1 as the correction range. That is, in the case of FIG. 13, the distance information of each pixel in the short distance area ND (or the long distance area FD) is compared with the distance information of the virtual boundary line NB ′ (or the virtual boundary line FB ′). A range including pixels whose distance information difference is equal to or less than a predetermined threshold is set as the correction range FA (or correction range NA).

ここで指標となる「相違量」は、差または比で表現することができる。また、第1の方法と同様に、距離情報の相違量の閾値としては、各領域境界に対し、一律にしても良いが、仮想境界線ごとの距離情報に応じて変更しても良い。   The “difference amount” as an index here can be expressed by a difference or a ratio. Similarly to the first method, the threshold value of the difference amount of the distance information may be uniform for each region boundary, but may be changed according to the distance information for each virtual boundary line.

<3−4−1−3.範囲設定の第3方法>
補正範囲設定部41が、第1距離画像D1の全体を、補正範囲として設定する。すなわち、補正範囲の設定方法としては、上記のように領域境界の付近に限定せず、全範囲を補正範囲としても良い。この場合も、境界領域が補正範囲に含まれるから、この発明の特徴に対応した「境界領域での補正」という概念に含まれる。
<3-4-1-3. Third method of range setting>
The correction range setting unit 41 sets the entire first distance image D1 as a correction range. That is, the correction range setting method is not limited to the vicinity of the region boundary as described above, and the entire range may be set as the correction range. Also in this case, since the boundary area is included in the correction range, it is included in the concept of “correction in the boundary area” corresponding to the feature of the present invention.

以上の第1、第2の設定方法において、補正範囲設定部41は、補正範囲として、仮想境界線の両側の領域を設定する。   In the first and second setting methods described above, the correction range setting unit 41 sets areas on both sides of the virtual boundary line as the correction range.

ただし、第1〜第3の方法において、仮想境界線が閉曲線を形成していない領域は、補正範囲設定部41により当該補正範囲から除外する例外処理が行われる。これは、基準画像中の線状ノイズを輪郭線として扱ってしまうことを防止するためである。ここで言う「閉曲線」とは、折れ線で形成された閉じた図形をも含む概念である。   However, in the first to third methods, an exception process in which a region where the virtual boundary line does not form a closed curve is excluded from the correction range by the correction range setting unit 41 is performed. This is to prevent the linear noise in the reference image from being treated as a contour line. The “closed curve” here is a concept including a closed figure formed by a broken line.

閉曲線を形成するか否かの判断にあたっては、画面範囲の外枠に相当する矩形ラインも輪郭線とみなして閉曲線を抽出することにより、一部のみが画角に入っている被写体領域も補正対象とすることができる。   When determining whether or not to form a closed curve, the rectangular line corresponding to the outer frame of the screen range is also regarded as a contour line, and the closed curve is extracted, so that the subject area that is only partially within the angle of view is also subject to correction. It can be.

逆に、画面範囲の外枠に相当する矩形ラインを輪郭線としては扱わないことにより、本来の輪郭線に相当する閉曲線のみを補正の対象とすることもできる。通常、主たる被写体部分は画面の中央領域にあるため、輪郭線が画面の端で切れているような領域を補正対象外としても影響は少ない。   Conversely, by not treating the rectangular line corresponding to the outer frame of the screen range as the contour line, only the closed curve corresponding to the original contour line can be corrected. Usually, since the main subject portion is in the center area of the screen, there is little influence even if the area where the outline is cut off at the edge of the screen is excluded from the correction target.

補正の精緻性を重視する場合には前者を、補正処理の高速性を重視する場合には後者を選択できる。   The former can be selected when emphasizing the precision of correction, and the latter can be selected when emphasizing high-speed correction processing.

<3−4−2.補正判定部42>
補正判定部42では、補正範囲内の画素のうち、所定の判定条件を満たす距離情報を持った画素のみを補正対象画素とする補正判定を行う。すなわち、補正判定部42により、補正範囲設定部41によって設定された補正範囲内において、補正の実施の有無を決定する。補正判定対象位置、および、補正判定条件の例は以下の通りである。
<3-4-2. Correction Determination Unit 42>
The correction determination unit 42 performs correction determination in which only pixels having distance information satisfying a predetermined determination condition among pixels within the correction range are set as correction target pixels. That is, the correction determination unit 42 determines whether or not to perform correction within the correction range set by the correction range setting unit 41. Examples of correction determination target positions and correction determination conditions are as follows.

<3−4−2−1.補正判定対象位置:第1設定方法>
図14は、補正判定対象位置の第1設定方法について説明する図である。図14で示されるように、設定された補正範囲内の各画素P単位で、つまり個々の画素に対して、判定が実施される。すなわち、補正判定部42が、補正判定を補正判定対象として画素単位で行う。
<3-4-2-1. Correction determination target position: first setting method>
FIG. 14 is a diagram for explaining a first setting method of the correction determination target position. As shown in FIG. 14, the determination is performed for each pixel P within the set correction range, that is, for each pixel. That is, the correction determination unit 42 performs correction determination on a pixel basis as a correction determination target.

<3−4−2−2.補正判定対象位置:第2設定方法>
図15は、補正判定対象位置の第2設定方法について説明する図である。図15で示されるように、設定された補正範囲内において、仮想境界線NB’を跨いだ画素P1と画素P2との2点の画素間の間に含まれる画素全てに対して、判定が実施される。ただし、画素P1,P2はそれぞれ、仮想境界線の両側の補正範囲内でそれぞれ選択された画素である。
<3-4-2-2. Correction determination target position: second setting method>
FIG. 15 is a diagram for explaining a second setting method of the correction determination target position. As shown in FIG. 15, the determination is performed for all the pixels included between the two pixels of the pixel P1 and the pixel P2 that straddle the virtual boundary line NB ′ within the set correction range. Is done. However, the pixels P1 and P2 are each selected within the correction range on both sides of the virtual boundary line.

すなわち、補正判定部42が、補正判定を補正判定対象として2点間を結びかつ仮想境界線と交差する画素列を単位として扱い、その画素列のうちの所定個数の画素(あるいは所定割合以上の画素)が下記の補正判定条件を満足すれば、画素P1,P2がそれぞれ属する補正範囲の各画素について補正を行う。   That is, the correction determination unit 42 treats the correction determination as a correction determination target and treats a pixel row that connects two points and intersects the virtual boundary line as a unit, and a predetermined number of pixels in the pixel row (or a predetermined ratio or more). If the pixel) satisfies the following correction determination condition, correction is performed for each pixel in the correction range to which the pixels P1 and P2 belong.

<3−4−2−3.補正判定対象位置:第3設定方法>
補正判定部42が、各領域内の全画素に対して判定が実施される。すなわち、図14および図15の場合、近距離領域NDおよび遠距離領域FDの各領域全てに対して、判定が実施される。したがって、この第3設定方法は、既述した「範囲設定の第3方法」との組合せに適している。
<3-4-2-3. Correction determination target position: third setting method>
The correction determination unit 42 performs determination for all pixels in each region. That is, in the case of FIG. 14 and FIG. 15, the determination is performed on all the short distance area ND and the long distance area FD. Therefore, this third setting method is suitable for the combination with the “third method of range setting” described above.

<3−4−2−4.補正判定条件>
補正判定部42が上記の判定対象画素に対して補正を行うかどうかを判定する。
<3-4-2-4. Correction judgment conditions>
The correction determination unit 42 determines whether to correct the above-described determination target pixel.

その判定条件として好ましい第1例は、判定対象画素から仮想境界線に向かう方向についての、当該判定対象画素の距離情報をRとしたとき、この距離情報Rと、当該判定対象画素に隣接する画素の距離情報(R+ΔR)との差分の絶対値|ΔR|が、所定の閾値以上となっているという条件である。すなわち、その付近での距離情報の変化が大きいときには、仮想境界線の反対側領域の距離情報の影響を受けていると判断して、補正対象とする。   A first example preferable as the determination condition is that when the distance information of the determination target pixel in the direction from the determination target pixel toward the virtual boundary line is R, the distance information R and a pixel adjacent to the determination target pixel The absolute value | ΔR | of the difference from the distance information (R + ΔR) is equal to or greater than a predetermined threshold value. That is, when the change in the distance information in the vicinity thereof is large, it is determined that the distance information in the region opposite to the virtual boundary line is affected, and is set as a correction target.

隣接画素間の水平距離は固定されているから、差分ΔRを指標とするという判定基準は、距離情報Rの変化の微分係数を指標とする判定や、距離情報Rの変化の傾斜角度を指標とする判定と等価である。   Since the horizontal distance between adjacent pixels is fixed, the determination criterion using the difference ΔR as an index is based on the determination using the differential coefficient of the change in the distance information R as an index and the inclination angle of the change in the distance information R as an index. It is equivalent to the determination to do.

ただし、ノイズによって偶発的に差分が大きくなっている画素を除外する目的で、上記差分ΔRは、当該判定対象画素に隣接する1画素との間の差分だけなく、判定対象画素に隣接して連続する複数の画素との間の差分値の平均などを指標としてもよい。   However, for the purpose of excluding pixels whose difference is accidentally increased due to noise, the difference ΔR is not only a difference from one pixel adjacent to the determination target pixel but also adjacent to the determination target pixel. An average of difference values between a plurality of pixels may be used as an index.

判定条件の他の例は、判定対象画素から仮想境界線に向かう方向についての、当該判定対象画素の距離情報の変化率ΔR/Rの絶対値|ΔR/R|が、所定値以上となっているという条件である。この変化率は、隣接する2画素間での変化率であってもよく、判定対象画素に隣接して連続する3以上の画素間での平均変化率であってもよい。   Another example of the determination condition is that the absolute value | ΔR / R | of the change rate ΔR / R of the distance information of the determination target pixel in the direction from the determination target pixel toward the virtual boundary line is a predetermined value or more. It is a condition of being. This rate of change may be a rate of change between two adjacent pixels, or may be an average rate of change between three or more pixels adjacent to the determination target pixel.

<3−4−3.補正距離生成部43>
上記の補正範囲設定部41によって設定された補正範囲内に対して、補正判定部42が行った補正有無の判定結果に基づいて補正が実施される。
<3-4-3. Correction Distance Generation Unit 43>
Correction is performed on the basis of the determination result of the correction presence / absence performed by the correction determination unit 42 within the correction range set by the correction range setting unit 41.

このうち、距離情報補正部50は、補正距離生成部43が、同一側画素列と反対側画素列とのうち、少なくとも同一側画素列の内側画素の距離情報を用いて補正距離を生成し、補正対象画素の距離情報の補正を行う。   Among these, the distance information correction unit 50 generates a correction distance by using the distance information of at least the inner pixel of the same side pixel column, among the same side pixel column and the opposite side pixel column, the correction distance generation unit 43, The distance information of the correction target pixel is corrected.

距離情報補正部50で採用される好ましい補正方法の内容は以下の通りである。それにおいて参照される図16以下の各図において、横軸は画素位置を示し、縦軸は距離情報を示す。補正対象領域CAの画素列の両端のうち境界基準位置QMは仮想的境界線上の位置であり、初期基準位置Q1は、補正対象領域CAの画素列の両端のうち、境界基準位置QMではない方の位置である。さらに、下記では仮想的境界線をはさんだ両側の補正対象領域CA,RAのうち一方領域CAのみについて説明するが、他方領域RAについても同様の補正を行うことができる。他方領域RAについての初期基準位置は、境界基準位置QMをはさんで一方領域CAの開始基準位置Q1の反対側に存在する。   The contents of a preferable correction method employed by the distance information correction unit 50 are as follows. In each of the drawings after FIG. 16 referred to, the horizontal axis indicates the pixel position, and the vertical axis indicates the distance information. The boundary reference position QM is the position on the virtual boundary line of both ends of the pixel column of the correction target area CA, and the initial reference position Q1 is the one that is not the boundary reference position QM of both ends of the pixel column of the correction target area CA. Is the position. Furthermore, although only one area CA of the correction target areas CA and RA on both sides of the virtual boundary line will be described below, the same correction can be performed for the other area RA. The initial reference position for the other area RA exists on the opposite side of the start reference position Q1 of the one area CA across the boundary reference position QM.

また、それぞれの図のうち(a)は補正前の距離情報を示し、(b)は補正後の距離情報を示す。記号S(i)は各画素位置についての距離情報値であり、添字「i」を画素位置の識別符号である。   In each figure, (a) shows distance information before correction, and (b) shows distance information after correction. The symbol S (i) is a distance information value for each pixel position, and the subscript “i” is an identification code for the pixel position.

<3−4−3−1.第1補正方法>
図16は、第1補正方法について説明する図である。図16(a)は、補正前の同一画素列に属する画素が補正対象領域CAであり、境界基準位置QMを境に、反対側画素列として参照対象画素列RAが存在することを示し、図16(b)は、図16(a)の補正後の画素値(距離情報)を示す。
<3-4-3-1. First Correction Method>
FIG. 16 is a diagram illustrating the first correction method. FIG. 16A shows that pixels belonging to the same pixel column before correction are the correction target area CA, and that the reference target pixel column RA exists as an opposite pixel column with the boundary reference position QM as a boundary. 16 (b) shows the pixel value (distance information) after correction in FIG. 16 (a).

図16で示されるように、第1補正方法では、補正対象である距離情報値S(N)を、外側画素に相当する距離情報値S(N−1)をもって、距離情報値S(N)とする補正を行う。なお、距離情報値S(N)とせず、予め決めておいた固定値による補正でも良い。   As shown in FIG. 16, in the first correction method, the distance information value S (N) that is the correction target has the distance information value S (N−1) corresponding to the outer pixel, and the distance information value S (N). To correct. The distance information value S (N) may be used instead of a fixed value determined in advance.

以上のように、距離情報補正部50は、同一側画素列に属する補正対象画素の距離情報の値を、当該補正対象画素の内側画素の距離情報の値を用いて一定化する補正を行う。   As described above, the distance information correction unit 50 performs correction to make the distance information value of the correction target pixel belonging to the same side pixel row constant by using the distance information value of the inner pixel of the correction target pixel.

<3−4−3−2.第2補正方法>
図17は、第2補正方法について説明する図である。図17(a)は、補正前の同一画素列に属する画素が補正対象領域CAであり、境界基準位置QMを境に、反対側画素列として参照対象領域RAが存在することを示し、図17(b)は、図17(a)の補正後の画素を示す。ここで、各画素位置について、隣接する画素との間の距離情報の変化に対応する傾斜角をθ(i)とする。添字「i」は画素位置の識別符号である。
<3-4-3-2. Second Correction Method>
FIG. 17 is a diagram illustrating the second correction method. FIG. 17A shows that the pixels belonging to the same pixel column before correction are the correction target region CA, and that the reference target region RA exists as the opposite pixel column at the boundary reference position QM. FIG. 17B shows the corrected pixel in FIG. Here, for each pixel position, an inclination angle corresponding to a change in distance information between adjacent pixels is θ (i). The suffix “i” is a pixel position identification code.

図17で示されるように、第2補正方法では、補正対象位置QNでの傾斜角θ(N)を、外側画素に相当する傾斜角θ(N−1)をもって、傾斜角θ(N)とする補正を行う。なお、傾斜角をθ(N)とせず、予め決めておいた固定値による補正でも良い。   As shown in FIG. 17, in the second correction method, the inclination angle θ (N) at the correction target position QN is changed to the inclination angle θ (N) with the inclination angle θ (N−1) corresponding to the outer pixel. Make corrections. It should be noted that the inclination angle may not be θ (N) but may be corrected by a fixed value determined in advance.

以上のように、距離情報補正部50は、同一側画素列に属する補正対象画素の距離情報の変化率を、当該補正対象画素の内側画素における距離情報の変化率を用いて一定化する補正を行う。   As described above, the distance information correction unit 50 performs the correction to make the change rate of the distance information of the correction target pixels belonging to the same side pixel row constant by using the change rate of the distance information in the inner pixel of the correction target pixel. Do.

<3−4−3−3.第3補正方法>
図18は、第3補正方法について説明する図である。この方法では、初期基準位置Q1から仮想境界線(境界基準位置QM)までの区間内にある各補正対象画素Paについて、初期基準位置Q1に関して対称な位置にある画素(対称画素)Pbの距離情報Sbとしたときに、補正対象画素Paについての補正後の距離情報Sa’と初期基準位置Q1での距離情報S0との差が、距離情報S0と距離情報Sbとの差の正負符号を比例するように、補正対象画素Paについての補正を行うことにより、各補正対象画素の距離情報の変化を抑制する。
<3-4-3-3. Third Correction Method>
FIG. 18 is a diagram illustrating the third correction method. In this method, for each correction target pixel Pa in the section from the initial reference position Q1 to the virtual boundary line (boundary reference position QM), distance information of a pixel (symmetric pixel) Pb that is symmetric with respect to the initial reference position Q1. When Sb is set, the difference between the corrected distance information Sa ′ for the correction target pixel Pa and the distance information S0 at the initial reference position Q1 is proportional to the sign of the difference between the distance information S0 and the distance information Sb. As described above, the correction of the correction target pixel Pa suppresses the change in the distance information of each correction target pixel.

具体的には、
Sa’−S0=Sb −S0
の関係を満足するように補正を行うことになるから、等価的に、
Sa=2×S0−Sb
を、補正対象画素Paの補正後の距離情報値とする。
In particular,
Sa'-S0 = Sb-S0
Will be corrected to satisfy the relationship, equivalently,
Sa = 2 × S0−Sb
Is the distance information value after correction of the correction target pixel Pa.

たとえば、
Sa=100; S0=40; Sb=20
(ただし、Saは着目画素Paの補正前の距離情報)の場合には、
Sa’=2×40−20=60
に補正される。
For example,
Sa = 100; S0 = 40; Sb = 20
In the case of (where Sa is the distance information before correction of the pixel of interest Pa),
Sa ′ = 2 × 40−20 = 60
It is corrected to.

より一般的には、所定の比例係数k(ただし、k>0)を用いて
Sa’−S0=k×(Sb −S0)
の比例関係となるように、すなわち
Sa’=(1+k)×S0−k×Sb
によって補正をすることが可能であり、このうちk=1の場合が上記の例に相当する。
More generally, using a predetermined proportional coefficient k (where k> 0), Sa′−S0 = k × (Sb−S0)
In other words, Sa ′ = (1 + k) × S0−k × Sb
In this case, k = 1 corresponds to the above example.

以上のように、距離情報補正部50は、仮想境界線から離れた位置に基準位置を設定し、基準位置での距離情報を第1距離情報とし、基準位置から仮想境界線までの区間内の各補正対象画素について、基準位置に関して対称な位置にある画素の距離情報を第2距離情報としたとき、補正対象画素についての補正後の距離情報と第1距離情報との差が、第1距離情報と第2距離情報との差の正負符号を反転させた値に比例するように補正対象画素についての補正を行う。   As described above, the distance information correction unit 50 sets the reference position at a position away from the virtual boundary line, sets the distance information at the reference position as the first distance information, and within the section from the reference position to the virtual boundary line. For each correction target pixel, when the distance information of the pixel at a symmetric position with respect to the reference position is the second distance information, the difference between the corrected distance information and the first distance information for the correction target pixel is the first distance. Correction is performed on the correction target pixel so as to be proportional to a value obtained by inverting the sign of the difference between the information and the second distance information.

<3−4−3−4.第4補正方法>
図19は、第4補正方法について説明する図である。ここでは、補正対象領域CAの画素列の距離情報の変化の傾き(傾斜角度の大きさおよび符号)に応じて、距離情報の補正値を変化させる。たとえば、図19(a)のように境界基準位置QMに向かって距離情報が増加する変化の場合には、その変化の傾き角を小さくするように補正する(図19(b))。一方、図19(c)のように境界基準位置QMに向かって距離情報が減少する変化の場合には、その傾きの符合を逆にするような補正を行う(図19(d))。いずれの場合も、補正前の距離情報の変化と比較して、抑制された距離情報の変化状況となる。
<3-4-3-4. Fourth Correction Method>
FIG. 19 is a diagram illustrating the fourth correction method. Here, the correction value of the distance information is changed in accordance with the inclination (the magnitude and sign of the inclination angle) of the change in the distance information of the pixel column in the correction target area CA. For example, in the case of a change in which the distance information increases toward the boundary reference position QM as shown in FIG. 19A, correction is performed so that the inclination angle of the change is reduced (FIG. 19B). On the other hand, when the distance information changes toward the boundary reference position QM as shown in FIG. 19C, correction is performed so that the sign of the slope is reversed (FIG. 19D). In either case, the change in the distance information is suppressed as compared with the change in the distance information before correction.

以上のように、距離情報補正部50は、同一側画素列に属する補正対象画素の距離情報の変化率(変化の正負符号を含む)を変更して補正を行う。   As described above, the distance information correction unit 50 performs correction by changing the change rate (including the sign of change) of the distance information of the correction target pixels belonging to the same side pixel column.

<3−4−3−5.第5補正方法>
図20は、第5補正方法について説明する図である。図20(b)で示されるように、この第5補正方法では、基準点Q1,QM間の補正対象領域CAの各画素の距離情報値が、段階的に変化するように計測距離情報を補正する。
<3-4-3-5. Fifth correction method>
FIG. 20 is a diagram illustrating the fifth correction method. As shown in FIG. 20B, in the fifth correction method, the distance information value of each pixel in the correction target area CA between the reference points Q1 and QM is corrected in a stepwise manner. To do.

具体的には、距離情報の変化率に応じた複数の隣接画素を小集団とし、小集団を単位として段階的に距離情報値を変換させる。変化率が比較的小さい領域では比較的多くの画素(図示例では3個の画素で示している)で小集団を構成し、変化率が比較的大きい領域では比較的少ない画素(図示例では2個の画素で示している)で小集団を構成する。   Specifically, a plurality of adjacent pixels corresponding to the change rate of the distance information is set as a small group, and the distance information value is converted step by step with the small group as a unit. In a region where the change rate is relatively small, a small group is formed by a relatively large number of pixels (shown by three pixels in the illustrated example), and relatively small pixels (2 in the illustrated example) A small group is composed of pixels).

この第5補正方法では、複数の隣接画素からなる小集団のそれぞれの内部で距離情報の変化が抑制されており、「局所的な変化の抑制」の集合としての補正処理となっている。   In the fifth correction method, the change of the distance information is suppressed inside each of the small groups composed of a plurality of adjacent pixels, and the correction processing is performed as a set of “local change suppression”.

以上のように、距離情報補正部50は、仮想境界線に近づく方向についての距離情報の変化を段階的に抑制する補正を行う。   As mentioned above, the distance information correction | amendment part 50 performs the correction | amendment which suppresses the change of the distance information about the direction approaching a virtual boundary line in steps.

<3−4−3−6.他視点情報を考慮した補正方法>
距離情報補正部50は、後述する他視点画像を生成する際の視線情報によって補正を実施することも可能である。抽出された仮想境界線に対し、予め指定した補正対象領域CAにおいて、2点の基準位置Q’1,Q’2を設定し、後述する他視点画像生成部(第2視点画像生成部)80で設定される視線情報により、傾斜角度が急な傾斜となるように補正するか、あるいは、緩やかな傾斜になるように補正するかを変更し補正する。
<3-4-3-6. Correction method considering other viewpoint information>
The distance information correction unit 50 can also perform correction based on line-of-sight information when generating another viewpoint image described later. For the extracted virtual boundary line, two reference positions Q′1 and Q′2 are set in the correction target area CA designated in advance, and another viewpoint image generation unit (second viewpoint image generation unit) 80 described later is set. In accordance with the line-of-sight information set in (1), the correction is made by changing whether the inclination angle is corrected to be a steep inclination or to be a gentle inclination.

図21は、他視点情報を考慮した補正方法について説明する図である。図21(a)は、補正前の同一画素列に属する画素の距離情報を示し、図21(b)は、図21(a)の補正後の距離情報を示す。   FIG. 21 is a diagram for explaining a correction method in consideration of other viewpoint information. FIG. 21A shows distance information of pixels belonging to the same pixel column before correction, and FIG. 21B shows distance information after correction of FIG. 21A.

図21(c)のように視点を右側に移動させる場合(被写体を左側に移動させる場合)には、被写体中の遠距離領域のうち右側で近距離領域が接している端部A1では距離情報の変化が急峻となるように、あらかじめ定めた基準位置の間の区間において距離情報を補正し、遠距離領域の反対端部A2では距離情報の変化が緩やかになるように距離情報を補正する。視点の移動方向が逆の場合は、これとは逆の補正となる。   When the viewpoint is moved to the right side (when the subject is moved to the left side) as shown in FIG. 21C, the distance information is obtained at the end A1 where the short-distance region is in contact with the right side among the long-distance regions in the subject. The distance information is corrected in a section between predetermined reference positions so that the change in the distance becomes steep, and the distance information is corrected so that the change in the distance information becomes gentle at the opposite end portion A2 of the long-distance region. When the direction of movement of the viewpoint is reversed, the correction is opposite to this.

すなわち、視点を右側に移動させると、遠距離領域の端部A1には近距離領域の左端部分が入り込んでくるため、図21(b)に示すように、基準位置Q’1,Q’2の間の区間において、遠距離領域の端部A1の距離情報値が近距離領域の距離情報値に早く近づくように急峻な変化へと補正する。これに対して、視点を右側に移動させたときの遠距離領域の端部A2では、近距離領域の右端部分が左へ移動して逃げてしまうため、近距離領域の距離情報値へ移行する変化を緩やかにする。後者は、既述した第1補正方法〜第5補正方法における変化の抑制原理と同じ考え方である。   That is, when the viewpoint is moved to the right side, the left end portion of the short-distance area enters the end A1 of the long-distance area. Therefore, as shown in FIG. 21B, the reference positions Q′1, Q′2 In the section between, the distance information value of the end portion A1 of the long-distance region is corrected to a steep change so as to approach the distance information value of the short-distance region quickly. On the other hand, at the end A2 of the long-distance area when the viewpoint is moved to the right side, the right end portion of the short-distance area moves to the left and escapes, so that the shift is made to the distance information value of the short-distance area. Make changes gradual. The latter is based on the same idea as the principle of suppressing change in the first to fifth correction methods described above.

以上のような動作を実現させるには、他視点画像生成部80から視点の移動方向の情報を受け取り、視点の移動方向に応じて、輪郭線で囲まれた領域の左右両端部のうちの一方については距離情報の変化を急峻に、他方については距離情報の変化をゆるやかにするように、補正距離生成部43により補正を行う。   In order to realize the operation as described above, information on the movement direction of the viewpoint is received from the other viewpoint image generation unit 80, and one of the left and right ends of the region surrounded by the contour line according to the movement direction of the viewpoint Correction is performed by the correction distance generation unit 43 so that the change in the distance information is steep and the other is gradual.

上記の基準位置Q’1,Q’2は、基本的には、既述した第1補正方法〜第5補正方法の基準位置Q1,QMと同様の考え方を基礎とし、視点移動量に応じた修正をして定める。   The reference positions Q′1 and Q′2 are basically based on the same idea as the reference positions Q1 and QM of the first to fifth correction methods described above, and correspond to the viewpoint movement amount. Make a correction.

以上を「距離情報の変化の抑制」という観点から見たときには、他視点情報を考慮した補正方法を採用する場合については、視点が原点位置から別位置へと変化する方向に応じて、距離情報の変化の抑制を行う部分を選択し、その選択された部分について距離情報の変化の抑制を行うことになる。   From the viewpoint of “suppressing the change in distance information”, when the correction method considering other viewpoint information is adopted, the distance information depends on the direction in which the viewpoint changes from the origin position to another position. The part which suppresses the change of is selected, and the change of the distance information is suppressed for the selected part.

<3−5.視差画像生成部(第1視差画像生成部)70>
視差画像生成部(第1視差画像生成部)70では、第2距離画像D2を用いて原点位置から見た第1視差画像を生成する。すなわち、第1視差画像の生成は、距離情報補正部50によって補正された距離情報を用いて実施し、後述する他視点画像生成部80で設定される視線情報によって、更に補正処理を実施する。例えば、想定される視線方向について、隣接する領域の距離情報における差分が所定の閾値より小さくなる場合には、隣接する領域のそれぞれの距離情報の平均値を、それら隣接する領域の双方に与えてそれらの領域を統合した上で、第1視差画像を生成する。
<3-5. Parallax image generator (first parallax image generator) 70>
The parallax image generation unit (first parallax image generation unit) 70 generates a first parallax image viewed from the origin position using the second distance image D2. That is, the generation of the first parallax image is performed using the distance information corrected by the distance information correction unit 50, and further correction processing is performed by the line-of-sight information set by the other viewpoint image generation unit 80 described later. For example, when the difference in the distance information of adjacent areas is smaller than a predetermined threshold with respect to the assumed line-of-sight direction, the average value of the distance information of each adjacent area is given to both of the adjacent areas. A first parallax image is generated after integrating these regions.

<3−6.他視点画像生成部(第2視点画像生成部)80>
他視点画像生成部(第2視点画像生成部)80では、視差画像生成部(第1視差画像生成部)70によって生成された第1視差画像に基づいて、原点位置とは異なる別位置から被写体を観察した距離画像としての第2視点画像を生成する。すなわち、図3で示されるように、外部情報IFを取り入れた他視点画像を生成する。具体的に、第2視点画像に相当する左右画像の作成については、以下の方法が挙げられる。
<3-6. Other viewpoint image generation unit (second viewpoint image generation unit) 80>
In the other viewpoint image generation unit (second viewpoint image generation unit) 80, based on the first parallax image generated by the parallax image generation unit (first parallax image generation unit) 70, the subject from another position different from the origin position is displayed. A second viewpoint image is generated as a distance image obtained by observing. That is, as shown in FIG. 3, another viewpoint image incorporating the external information IF is generated. Specifically, the following methods can be used to create the left and right images corresponding to the second viewpoint image.

<3−6−1.左右画像作成の第1方法>
他視点画像生成部80は、視差画像生成部70で生成された第1視差画像と基準画像SGとを基に、左右画像(左目用画像と右目用画像)の両方を作成する。具体的には、視差量の半分ずつずらして、左画像及び右画像を作成する。
<3-6-1. First method for creating left and right images>
The other viewpoint image generation unit 80 generates both left and right images (left eye image and right eye image) based on the first parallax image generated by the parallax image generation unit 70 and the reference image SG. Specifically, the left image and the right image are created by shifting by half the amount of parallax.

<3−6−2.左右画像作成の第2方法>
他視点画像生成部80は、視差画像生成部70で生成された第1視差画像と基準画像SGとを基に、左右画像の何れか一方を作成する。すなわち、基準画像SGを左画像とすれば、右側の視差情報を作成するよう視差量をずらして右画像を作成することになり、基準画像SGを右画像とすれば、左側の視差情報を作成するよう視差量をずらして左画像を作成することになる。
<3-6-2. Second method for creating left and right images>
The other viewpoint image generation unit 80 generates either the left or right image based on the first parallax image generated by the parallax image generation unit 70 and the reference image SG. That is, if the reference image SG is the left image, the right image is created by shifting the amount of parallax so as to create the right-side parallax information, and if the reference image SG is the right image, the left-side parallax information is created. Thus, the left image is created by shifting the amount of parallax.

このように、第1及び第2方法ともに、他視点画像生成部80は、基準画像SGおよび第1視差画像を用いて、左右画像の生成が行われ、ステレオ視画像が生成される。そして、得られたステレオ視画像(左右画像)は、液晶画面等のディスプレイ32に与えられ、3次元表示される。なお、ディスプレイ情報を画像に加味し、視差量を変更することで、画像を作成しても良い。   As described above, in both the first and second methods, the other viewpoint image generation unit 80 generates the left and right images using the reference image SG and the first parallax image, and generates a stereoscopic image. The obtained stereo image (left and right images) is given to a display 32 such as a liquid crystal screen, and is displayed three-dimensionally. Note that an image may be created by adding display information to the image and changing the amount of parallax.

また、他視点画像生成部(第2視点画像生成部)80での第2視点画像の生成において、視点が原点位置から別位置へと変化することにより、被写体のいずれの側の画像部分が視野内に新たに出現し、あるいは視野内から消失することがある。このような場合は、距離情報補正部50によって、前述した距離情報の変化についての補正の程度が変更される。   In addition, in the generation of the second viewpoint image in the other viewpoint image generation unit (second viewpoint image generation unit) 80, the viewpoint changes from the origin position to another position, so that the image portion on either side of the subject can be viewed. May newly appear in or disappear from the visual field. In such a case, the distance information correction unit 50 changes the degree of correction for the above-described change in distance information.

<4.画像処理システムの基本動作>
図22は、本実施形態に係る画像処理システム1において実現される基本動作を説明するフローチャートである。既に各部の個別機能の説明は行ったため(図3および図4参照)、ここでは全体の流れのみ説明する。
<4. Basic operation of image processing system>
FIG. 22 is a flowchart for explaining a basic operation realized in the image processing system 1 according to this embodiment. Since the individual functions of each unit have already been described (see FIGS. 3 and 4), only the overall flow will be described here.

図22に示すように、まず、ステップS1において、撮像部10が、基準画像SGおよび参照画像RGを撮影し、両者の画像を取得する。ここでは、2台のカメラを用いて、基準画像SGは基準カメラMCで得られた画像とし、参照画像RGは参照カメラSCで得られた画像とするが、2台以上のカメラにより、画像の撮影および取得を行ってもよい。   As shown in FIG. 22, first, in step S1, the imaging unit 10 captures the standard image SG and the reference image RG, and acquires both images. Here, using two cameras, the standard image SG is an image obtained by the standard camera MC, and the reference image RG is an image obtained by the reference camera SC, but the image of the image is obtained by two or more cameras. Photography and acquisition may be performed.

ステップS2では、撮像部10によって取得された基準画像SGの2次元画像に対し、境界線抽出部30が、画像の領域境界線を抽出する。   In step S <b> 2, the boundary line extraction unit 30 extracts a region boundary line of the image with respect to the two-dimensional image of the reference image SG acquired by the imaging unit 10.

ステップS3では、ステップS2と並行して、距離計測部20が、基準画像SG内の範囲に対して基準画像SGと参照画像RGとから対応点探索処理などを施して被写体各部への距離を演算によって求め、それに基づいて第1距離画像取得部40が、第1距離画像D1を取得する。なお、ステップS2の領域境界線を抽出する工程とステップS3の距離を計測する工程とは順次処理しても良い。順番に関しては、先に境界線抽出(ステップS2)を行っても、距離計測(ステップS3)を実施しても何れでも良い。   In step S3, in parallel with step S2, the distance measuring unit 20 calculates the distance to each part of the subject by performing corresponding point search processing on the range in the standard image SG from the standard image SG and the reference image RG. Based on this, the first distance image acquisition unit 40 acquires the first distance image D1. Note that the step of extracting the region boundary line in step S2 and the step of measuring the distance in step S3 may be sequentially performed. Regarding the order, either boundary line extraction (step S2) or distance measurement (step S3) may be performed first.

ステップS4では、第1距離画像D1上において、ステップS2で抽出された基準画像SG上の境界線に対応する位置に仮想境界線を設定し、補正範囲設定部41が、当該仮想境界線の位置を基準として第1距離画像D1内に補正範囲を設定する。   In step S4, a virtual boundary line is set at a position corresponding to the boundary line on the reference image SG extracted in step S2 on the first distance image D1, and the correction range setting unit 41 determines the position of the virtual boundary line. Is used as a reference to set a correction range in the first distance image D1.

ステップS5では、補正判定部42が、ステップS4で設定した補正範囲内の画素のうち、計測距離情報の補正有無の判定を実施する。すなわち、所定の判定条件を満たす距離情報を持った画素のみを補正対象画素とする補正判定を行う。   In step S5, the correction determination unit 42 determines whether or not the measurement distance information is corrected among the pixels within the correction range set in step S4. That is, correction determination is performed with only pixels having distance information satisfying a predetermined determination condition as correction target pixels.

ステップS6では、ステップS5で判定した第1距離画像D1内の補正対象画素に対して、補正が実施される。すなわち、補正距離生成部43が、第1距離画像D1内の各補正対象画素に対して補正距離を生成し、第2距離画像生成部60が、第2距離画像D2を生成する。   In step S6, correction is performed on the correction target pixel in the first distance image D1 determined in step S5. That is, the correction distance generation unit 43 generates a correction distance for each correction target pixel in the first distance image D1, and the second distance image generation unit 60 generates a second distance image D2.

ステップS7では、視差画像生成部70が、ステップS6で補正された距離情報に基づいて、第2距離画像D2を用いて原点位置から見た第1視差画像を生成する。   In step S7, the parallax image generation unit 70 generates a first parallax image viewed from the origin position using the second distance image D2 based on the distance information corrected in step S6.

ステップS8では、他視点画像生成部80が、ステップS7で生成された第1視差画像に基づいて、原点位置とは異なる別位置から被写体を観察した距離画像としての第2視点画像(左右画像)を生成する。得られた左右画像は、液晶画面等のディスプレイ32に与えられ、3次元表示される。   In step S8, the second viewpoint image (left and right image) as a distance image in which the other viewpoint image generation unit 80 observes the subject from a different position from the origin position based on the first parallax image generated in step S7. Is generated. The obtained left and right images are given to a display 32 such as a liquid crystal screen and displayed three-dimensionally.

<5.変形例>
※ 第1距離画像の生成の基礎となる被写体各部までの距離計測は、既述した対応点探索法だけでなく、下記のような方法で取得されてもよい。
<5. Modification>
* Distance measurement to each part of the subject, which is the basis for generating the first distance image, may be acquired not only by the corresponding point search method described above but also by the following method.

(1) TOF(Time-of-Flight 距離画像センサ)
TOF方式(例えば、特開2001−304811等で公知技術)では、画像領域内の全画素に対して、距離計測を実施することが難しい。そこで、計測された画素以外の領域に対しては、計測点の補間を行うことが必要となる。補間方法としては、単純に周辺の情報による補間を行う方法があるが、補間を行うだけでなく、エッジ周辺においては、計測誤差が生じやすい。このため、この方法によって得られた第1距離画像について、既述したこの発明の実施形態の補正を行うことに特に意味がある。
(1) TOF (Time-of-Flight distance image sensor)
In the TOF method (for example, a technique known in Japanese Patent Laid-Open No. 2001-304811 or the like), it is difficult to perform distance measurement on all pixels in the image area. Therefore, it is necessary to interpolate measurement points for regions other than the measured pixels. As an interpolation method, there is a method of simply performing interpolation based on peripheral information. However, not only interpolation but also measurement errors are likely to occur around the edge. For this reason, it is particularly meaningful to perform the correction of the above-described embodiment of the present invention for the first distance image obtained by this method.

(2) 距離推定法
これは、2次元画像を3次元画像に変換する為に推定処理により立体視画像を生成する方法である。距離推定を用いた方法として、例えば、下記のような技術を採用することができる。
・3つのシーンモデルにより、撮影シーンを分類し、最も近いモデルにより立体形状を推定した後、画像の輝度情報などを基に前後に視差をずらして立体視画像を生成する技術であり、特開2006−185033号公報や特開2006−186510号公報などに開示されている。
・ 輝度情報を基に、視差の推定を行う技術であり、特開2006−319469号公報などに開示されている。
・時系列情報をベースに距離の推定を行うことで、視差の生成を行う技術であり、特開2000−261828号公報などに開示されている。
(2) Distance estimation method This is a method of generating a stereoscopic image by estimation processing in order to convert a two-dimensional image into a three-dimensional image. As a method using distance estimation, for example, the following technique can be employed.
A technique for classifying shooting scenes by three scene models, estimating a stereoscopic shape by using the closest model, and generating a stereoscopic image by shifting parallax forward and backward based on luminance information of the image, etc. It is disclosed in Japanese Patent Application Laid-Open No. 2006-185033 and Japanese Patent Application Laid-Open No. 2006-186510.
A technique for estimating parallax based on luminance information, which is disclosed in Japanese Patent Application Laid-Open No. 2006-319469.
A technique for generating a parallax by estimating a distance based on time-series information, which is disclosed in Japanese Patent Laid-Open No. 2000-261828.

上記方法においては、実際に距離計測を実施せず、距離を推定により算出していることから、推定に不得意な対象領域が存在する。そこで、既述した補正処理を実施することによってより正しい距離画像が得られる。   In the above method, since distance is not actually measured and the distance is calculated by estimation, there is a target region that is not good at estimation. Therefore, a more correct distance image can be obtained by performing the correction processing described above.

以上のような距離計測を行う場合には、それによって距離画像が得られるから、距離情報を得るためにステレオカメラを用いる必要はなく、2次元画像としては、既述した実施形態における基準画像SGのみを取得すればよい。   When the distance measurement as described above is performed, a distance image is thereby obtained. Therefore, it is not necessary to use a stereo camera to obtain distance information, and the reference image SG in the above-described embodiment is used as a two-dimensional image. Only need to get.

※ 本実施形態では、補正判定を実施した後に補正処理を行ったが、これに限られず、下記方法により補正判定と補正処理とを併合して行っても良い。   * In this embodiment, the correction process is performed after the correction determination is performed. However, the present invention is not limited to this, and the correction determination and the correction process may be performed by the following method.

(方法1)
図16で示されるように、設定した初期基準位置Q1の距離情報値S(1)とその内側画素に相当する距離情報値S(2)との差分の値を算出する。この差分の絶対値が、所定の閾値以上の場合は、補正処理を実施する。
(Method 1)
As shown in FIG. 16, a difference value between the set distance information value S (1) of the initial reference position Q1 and the distance information value S (2) corresponding to the inner pixel is calculated. When the absolute value of the difference is equal to or greater than a predetermined threshold value, correction processing is performed.

この処理を領域境界線上の隣接する画素間において位置QMに向かう方向に順次繰り返して実施する。そして、差分の絶対値|S(N)−S(N−1)|が所定の閾値以上の値を示す距離情報値S(N)が出現すれば、外側画素に相当する距離情報値S(N−1)をもって、距離情報値S(N)とする(この新たなS(N)の値をS’(N)と称する)。そして、距離情報値S(N)とその内側画素に相当する距離情報値S(N+1)との差分計算においては、新たに置き換えられた距離情報値S’(N)を用いて、差分の絶対値|S(N+1)−S’(N)|が算出される。   This process is sequentially repeated in the direction toward the position QM between adjacent pixels on the region boundary line. If a distance information value S (N) indicating that the absolute value | S (N) −S (N−1) | of the difference is equal to or greater than a predetermined threshold value appears, the distance information value S ( N−1) is used as a distance information value S (N) (this new value of S (N) is referred to as S ′ (N)). In calculating the difference between the distance information value S (N) and the distance information value S (N + 1) corresponding to the inner pixel, the absolute value of the difference is calculated using the newly replaced distance information value S ′ (N). The value | S (N + 1) −S ′ (N) | is calculated.

以上のように、距離情報補正部50は、補正判定と補正処理とを併合して、同一側画素列に属する補正対象画素の距離情報の値を、当該補正対象画素の内側画素の距離情報の値を用いて一定化する補正を行ってもよい。   As described above, the distance information correction unit 50 combines the correction determination and the correction process, and calculates the distance information value of the correction target pixel belonging to the same side pixel column as the distance information of the inner pixel of the correction target pixel. Correction that makes the value constant may be performed.

(方法2)
図17で示されるように、設定した初期基準位置Q1の距離情報値S(1)とその内側画素に相当する距離情報値S(2)とを結ぶ直線の傾斜角θ(1)を算出する。この傾斜角が、所定の閾値以上の場合は、補正処理を実施する。この処理を領域境界線上の隣接する画素間において境界基準位置QMに向かう方向に順次繰り返して実施する。そして、傾斜角θ(N)が所定の閾値以上の値を示す位置QNが出現すれば、外側画素に相当する傾斜角θ(N−1)をもって、傾斜角θ(N)とする(この新たな傾斜角θ(N)をθ’(N)と称する)。なお、傾斜角をθ’(N)は、予め決めておいた固定値による補正でも良い。そして、距離情報値S(N+1)と距離情報値S(N+1)とから傾斜角θ(N+1)を計算する際は、新たに置き換えられた距離情報値S’(N)を用いて、傾斜角θ(N+1)が算出される。
(Method 2)
As shown in FIG. 17, an inclination angle θ (1) of a straight line connecting the distance information value S (1) of the set initial reference position Q1 and the distance information value S (2) corresponding to the inner pixel is calculated. . When the inclination angle is equal to or greater than a predetermined threshold value, correction processing is performed. This process is sequentially repeated in the direction toward the boundary reference position QM between adjacent pixels on the region boundary line. If a position QN where the inclination angle θ (N) shows a value equal to or greater than a predetermined threshold appears, the inclination angle θ (N−1) corresponding to the outer pixel is set as the inclination angle θ (N) (this new angle). The tilt angle θ (N) is referred to as θ ′ (N)). The inclination angle θ ′ (N) may be corrected by a fixed value determined in advance. Then, when calculating the tilt angle θ (N + 1) from the distance information value S (N + 1) and the distance information value S (N + 1), the newly replaced distance information value S ′ (N) is used to calculate the tilt angle. θ (N + 1) is calculated.

以上のように、距離情報補正部50は、補正判定と補正処理とを併合して、同一側画素列に属する補正対象画素の距離情報の変化率を、当該補正対象画素の内側画素における距離情報の変化率を用いて一定化する補正を行ってもよい。   As described above, the distance information correction unit 50 combines the correction determination and the correction processing, and calculates the change rate of the distance information of the correction target pixels belonging to the same side pixel column, and the distance information in the inner pixels of the correction target pixels. Correction may be performed using the rate of change.

※ 本実施形態では、動作開始前に、上記第1〜第5補正方法のうち1つを予め選択した上で、補正処理を行ったが、これに限られない。例えば、第1距離画像D1の領域境界付近の状況によって第1距離画像D1の補正に使用する方法を画像部分ごとに切り替えるような場合に、使用する補正方法を選択する機能手段を設けても良い。   * In the present embodiment, the correction process is performed after selecting one of the first to fifth correction methods in advance before the operation is started. However, the present invention is not limited to this. For example, when the method used to correct the first distance image D1 is switched for each image portion depending on the situation near the region boundary of the first distance image D1, a function unit that selects a correction method to be used may be provided. .

10 撮像部
20 距離計測部
30 境界線抽出部
40 第1距離画像取得部
41 補正範囲設定部
42 補正判定部
43 補正距離生成部
50 距離情報補正部
60 第2距離画像生成部
70 視差画像生成部
80 他視点画像生成部
MC 主カメラ
SC 副カメラ
SG 基準画像
RG 参照画像
D1 第1距離画像
D2 第2距離画像
DESCRIPTION OF SYMBOLS 10 Imaging part 20 Distance measurement part 30 Boundary line extraction part 40 1st distance image acquisition part 41 Correction range setting part 42 Correction determination part 43 Correction distance generation part 50 Distance information correction part 60 2nd distance image generation part 70 Parallax image generation part 80 Other viewpoint image generator MC Main camera SC Sub camera SG Standard image RG Reference image D1 First distance image D2 Second distance image

Claims (16)

立体画像処理のための画像処理装置であって、
所定の原点位置から被写体各部への距離情報を表現した第1距離画像を取得する第1距離画像取得手段と、
前記被写体の2次元画像における前記被写体の複数の領域相互の境界線を抽出する境界線抽出手段と、
前記第1距離画像中において、前記2次元画像での前記境界線に対応する位置に仮想境界線を設定するとともに、前記第1距離画像のうち前記仮想境界線をはさんで互いに隣接する領域のうち少なくとも一方を補正範囲としつつ、前記仮想境界線に近づく方向についての距離情報の変化を抑制する補正を前記第1距離画像に対して行うことによって第2距離画像を生成する補正手段と、
を備え、
前記立体画像処理が、前記第2距離画像に基づいて行われ
前記補正手段は、
前記仮想境界線の位置を基準として、前記補正範囲の設定を行う補正範囲設定手段と、
前記補正範囲内の画素のうち、所定の補正判定条件を満たす距離情報を持った画素のみを補正対象画素とする補正判定を行う補正判定手段とを備え、
前記補正判定条件は、
判定対象画素から前記仮想境界線に向かう方向についての、当該判定対象画素の距離情報と、当該判定対象画素に隣接する画素の距離情報との差分の絶対値が、所定値以上となっているという条件であることを特徴とする画像処理装置。
An image processing apparatus for stereoscopic image processing,
First distance image acquisition means for acquiring a first distance image expressing distance information from a predetermined origin position to each part of the subject;
Boundary line extracting means for extracting boundary lines between a plurality of areas of the subject in the two-dimensional image of the subject;
In the first distance image, a virtual boundary line is set at a position corresponding to the boundary line in the two-dimensional image, and regions of the first distance image adjacent to each other across the virtual boundary line are set. Correction means for generating a second distance image by performing correction on the first distance image to suppress a change in distance information in a direction approaching the virtual boundary line while setting at least one of them as a correction range;
With
The stereoscopic image processing is performed based on the second distance image ;
The correction means includes
Correction range setting means for setting the correction range with reference to the position of the virtual boundary line;
Correction determination means for performing correction determination with only pixels having distance information satisfying a predetermined correction determination condition as correction target pixels among the pixels within the correction range;
The correction determination condition is:
The absolute value of the difference between the distance information of the determination target pixel and the distance information of the pixel adjacent to the determination target pixel in the direction from the determination target pixel toward the virtual boundary line is greater than or equal to a predetermined value. the image processing apparatus according to claim condition der Rukoto.
立体画像処理のための画像処理装置であって、
所定の原点位置から被写体各部への距離情報を表現した第1距離画像を取得する第1距離画像取得手段と、
前記被写体の2次元画像における前記被写体の複数の領域相互の境界線を抽出する境界線抽出手段と、
前記第1距離画像中において、前記2次元画像での前記境界線に対応する位置に仮想境界線を設定するとともに、前記第1距離画像のうち前記仮想境界線をはさんで互いに隣接する領域のうち少なくとも一方を補正範囲としつつ、前記仮想境界線に近づく方向についての距離情報の変化を抑制する補正を前記第1距離画像に対して行うことによって第2距離画像を生成する補正手段と、
を備え、
前記立体画像処理が、前記第2距離画像に基づいて行われ、
前記補正手段は、
前記仮想境界線の位置を基準として、前記補正範囲の設定を行う補正範囲設定手段と、
前記補正範囲内の画素のうち、所定の補正判定条件を満たす距離情報を持った画素のみを補正対象画素とする補正判定を行う補正判定手段とを備え、
前記補正判定条件は、
判定対象画素から前記仮想境界線に向かう方向についての、当該判定対象画素の距離情報の変化率の絶対値が、所定値以上となっているという条件であることを特徴とする画像処理装置。
An image processing apparatus for stereoscopic image processing,
First distance image acquisition means for acquiring a first distance image expressing distance information from a predetermined origin position to each part of the subject;
Boundary line extracting means for extracting boundary lines between a plurality of areas of the subject in the two-dimensional image of the subject;
In the first distance image, a virtual boundary line is set at a position corresponding to the boundary line in the two-dimensional image, and regions of the first distance image adjacent to each other across the virtual boundary line are set. Correction means for generating a second distance image by performing correction on the first distance image to suppress a change in distance information in a direction approaching the virtual boundary line while setting at least one of them as a correction range;
With
The stereoscopic image processing is performed based on the second distance image;
The correction means includes
Correction range setting means for setting the correction range with reference to the position of the virtual boundary line;
Correction determination means for performing correction determination with only pixels having distance information satisfying a predetermined correction determination condition as correction target pixels among the pixels within the correction range;
The correction determination condition is:
From the determination object pixel in the direction towards the imaginary boundary line, the image processing apparatus absolute value of the change rate of the distance information of the determination target pixel, wherein the condition der Rukoto that is equal to or greater than a predetermined value.
請求項1または請求項2に記載の画像処理装置であって、
前記補正範囲設定手段は、
前記補正範囲として、前記第1距離画像において、前記仮想境界線からの平面距離が所定の値以下の画素範囲を設定することを特徴とする画像処理装置。
The image processing apparatus according to claim 1 or 2,
The correction range setting means includes
The image processing apparatus according to claim 1, wherein a pixel range in which a planar distance from the virtual boundary line is a predetermined value or less is set as the correction range in the first distance image.
請求項1または請求項2に記載の画像処理装置であって、
前記補正範囲設定手段は、
前記補正範囲として、前記第1距離画像において、前記仮想境界線の距離情報との相違量が所定の値以下の画素範囲を設定することを特徴とする画像処理装置。
The image processing apparatus according to claim 1 or 2,
The correction range setting means includes
The image processing apparatus according to claim 1, wherein a pixel range in which the amount of difference from the distance information of the virtual boundary line is a predetermined value or less is set as the correction range in the first distance image.
請求項乃至請求項4のいずれかに記載の画像処理装置であって、
前記補正範囲設定手段は、
前記補正範囲として、前記仮想境界線の両側の領域を設定することを特徴とする画像処理装置。
An image processing apparatus according to any one of claims 1 to 4,
The correction range setting means includes
An image processing apparatus, wherein regions on both sides of the virtual boundary line are set as the correction range.
請求項1または請求項2に記載の画像処理装置であって、
前記補正範囲設定手段は、
前記第1距離画像の全体を、前記補正範囲として設定することを特徴とする画像処理装置。
The image processing apparatus according to claim 1 or 2,
The correction range setting means includes
An image processing apparatus, wherein the entire first distance image is set as the correction range.
請求項乃至請求項6のいずれかに記載の画像処理装置であって、
前記補正範囲設定手段は、
前記仮想境界線が閉曲線を形成していない領域は、前記補正範囲から除外する例外処理を行うことを特徴とする画像処理装置。
An image processing apparatus according to any one of claims 1 to 6,
The correction range setting means includes
An image processing apparatus that performs exception processing for excluding a region where the virtual boundary line does not form a closed curve from the correction range.
請求項1または請求項2に記載の画像処理装置であって、
前記補正判定手段は、
前記補正判定を、画素単位で行うことを特徴とする画像処理装置。
The image processing apparatus according to claim 1 or 2 ,
The correction determination means includes
An image processing apparatus , wherein the correction determination is performed in units of pixels .
請求項1または請求項2に記載の画像処理装置であって、
前記補正判定手段は、
前記補正判定を、2点間を結びかつ前記仮想境界線と交差する画素列を単位として行うことを特徴とする画像処理装置。
The image processing apparatus according to claim 1 or 2 ,
The correction determination means includes
The image processing apparatus characterized in that the correction determination is performed in units of pixel columns that connect two points and intersect the virtual boundary line .
立体画像処理のための画像処理装置であって、
所定の原点位置から被写体各部への距離情報を表現した第1距離画像を取得する第1距離画像取得手段と、
前記被写体の2次元画像における前記被写体の複数の領域相互の境界線を抽出する境界線抽出手段と、
前記第1距離画像中において、前記2次元画像での前記境界線に対応する位置に仮想境界線を設定するとともに、前記第1距離画像のうち前記仮想境界線をはさんで互いに隣接する領域のうち少なくとも一方を補正範囲としつつ、前記仮想境界線に近づく方向についての距離情報の変化を抑制する補正を前記第1距離画像に対して行うことによって第2距離画像を生成する補正手段と、
を備え、
前記立体画像処理が、前記第2距離画像に基づいて行われ、
用語定義として、着目する補正対象画素に関して、
「交差画素列」を、当該補正対象画素を通りかつ前記仮想境界線と交差する線分の画素列によって定義し;
「外側画素」を、前記交差画素列のうちで、当該補正対象画素よりも前記仮想境界線に近い側において当該補正対象画素に隣接する画素によって定義し;
「内側画素」を、前記交差画素列のうちで、当該補正対象画素よりも前記仮想境界線に遠い側において当該補正対象画素に隣接する画素によって定義し;
「同一側画素列」を、前記交差画素列のうちで、前記仮想境界線を基準として当該補正対象画素と同じ側にある部分によって定義し;
「反対側画素列」を、前記交差画素列のうちで、前記仮想境界線をはさんで当該補正対象画素と反対側にある部分によって定義したとき、
前記補正手段は、同一側画素列と反対側画素列とのうち、少なくとも同一側画素列の内側画素の距離情報を用いて、補正対象画素の距離情報の補正を行うこと特徴とする画像処理装置。
An image processing apparatus for stereoscopic image processing,
First distance image acquisition means for acquiring a first distance image expressing distance information from a predetermined origin position to each part of the subject;
Boundary line extracting means for extracting boundary lines between a plurality of areas of the subject in the two-dimensional image of the subject;
In the first distance image, a virtual boundary line is set at a position corresponding to the boundary line in the two-dimensional image, and regions of the first distance image adjacent to each other across the virtual boundary line are set. Correction means for generating a second distance image by performing correction on the first distance image to suppress a change in distance information in a direction approaching the virtual boundary line while setting at least one of them as a correction range;
With
The stereoscopic image processing is performed based on the second distance image;
As the definition of terms,
“Intersecting pixel column” is defined by a pixel column of a line segment passing through the correction target pixel and intersecting the virtual boundary line;
An “outside pixel” is defined by a pixel adjacent to the correction target pixel on the side closer to the virtual boundary line than the correction target pixel in the intersection pixel row;
“Inner pixel” is defined by a pixel adjacent to the correction target pixel on the side farther from the virtual boundary line than the correction target pixel in the intersection pixel row;
“Same side pixel column” is defined by a portion of the intersecting pixel column that is on the same side as the correction target pixel with respect to the virtual boundary line;
When the “opposite pixel column” is defined by a portion on the opposite side of the correction target pixel across the virtual boundary line in the intersecting pixel column,
The correction means corrects the distance information of the correction target pixel using at least the distance information of the inner pixel of the same side pixel column out of the same side pixel column and the opposite side pixel column. .
請求項10に記載の画像処理装置であって、
前記補正手段は、
同一側画素列に属する補正対象画素の距離情報の値を、当該補正対象画素の内側画素の距離情報の値を用いて一定化する補正を行うことを特徴とする画像処理装置。
The image processing apparatus according to claim 10 ,
The correction means includes
An image processing apparatus that performs correction to make the value of distance information of a correction target pixel belonging to the same side pixel column constant by using the value of distance information of an inner pixel of the correction target pixel .
請求項10に記載の画像処理装置であって、
前記補正手段は、
同一側画素列に属する補正対象画素の距離情報の変化率を、当該補正対象画素の内側画素における距離情報の変化率を用いて一定化する補正を行うことを特徴とする画像処理装置。
The image processing apparatus according to claim 10 ,
The correction means includes
An image processing apparatus that performs correction to make the change rate of the distance information of the correction target pixels belonging to the same side pixel column constant by using the change rate of the distance information in the inner pixel of the correction target pixel .
請求項10に記載の画像処理装置であって、
前記補正手段は、
前記仮想境界線から離れた位置に基準位置を設定し、
前記基準位置での距離情報を第1距離情報とし、
前記基準位置から前記仮想境界線までの区間内の各補正対象画素について、前記基準位置に関して対称な位置にある画素の距離情報を第2距離情報としたとき、
前記補正対象画素についての補正後の距離情報と前記第1距離情報との差が、前記第1距離情報と前記第2距離情報との差の正負符号を反転させた値に比例するように前記補正対象画素についての補正を行うことにより、前記補正対象画素の距離情報の変化を抑制する補正を行うことを特徴とする画像処理装置。
The image processing apparatus according to claim 10 ,
The correction means includes
Set a reference position at a position away from the virtual boundary line,
The distance information at the reference position is the first distance information,
For each correction target pixel in the section from the reference position to the virtual boundary line, when distance information of a pixel at a position symmetric with respect to the reference position is the second distance information,
The difference between the corrected distance information for the correction target pixel and the first distance information is proportional to a value obtained by inverting the sign of the difference between the first distance information and the second distance information. An image processing apparatus that performs correction for suppressing a change in distance information of the correction target pixel by performing correction on the correction target pixel .
請求項10に記載の画像処理装置であって、
前記補正手段は、
前記仮想境界線に近づく方向についての距離情報の変化を段階的に抑制する補正を行うことを特徴とする画像処理装置。
The image processing apparatus according to claim 10 ,
The correction means includes
An image processing apparatus that performs correction that suppresses a change in distance information in a direction approaching the virtual boundary line in a stepwise manner .
請求項1乃至請求項14のいずれかに記載の画像処理装置
前記第2距離画像を用いて前記原点位置から見た第1視差画像を生成する第1視差画像生成手段と、
前記視差画像生成手段によって生成された第1視差画像に基づいて、前記原点位置とは異なる別位置から前記被写体を観察した距離画像としての第2視点画像を生成する他視点画像生成手段と、
を備えることを特徴とする画像処理システム。
An image processing apparatus according to any one of claims 1 to 14 ,
First parallax image generation means for generating a first parallax image viewed from the origin position using the second distance image;
Another viewpoint image generation means for generating a second viewpoint image as a distance image obtained by observing the subject from a different position different from the origin position based on the first parallax image generated by the parallax image generation means;
An image processing system comprising:
請求項15に記載の画像処理システムであって、
前記補正手段は、
前記他視点画像生成手段での前記第2視点画像の生成において、視点が前記原点位置から前記別位置へと変化する方向に応じて、前記距離情報の変化の抑制を行う部分を選択することを特徴とする画像処理システム。
The image processing system according to claim 15 , wherein
The correction means includes
In the generation of the second viewpoint image in the other viewpoint image generation means, selecting a portion for suppressing the change in the distance information according to the direction in which the viewpoint changes from the origin position to the different position. A featured image processing system.
JP2010226358A 2010-10-06 2010-10-06 Image processing apparatus and image processing system Expired - Fee Related JP5533529B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010226358A JP5533529B2 (en) 2010-10-06 2010-10-06 Image processing apparatus and image processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010226358A JP5533529B2 (en) 2010-10-06 2010-10-06 Image processing apparatus and image processing system

Publications (2)

Publication Number Publication Date
JP2012079251A JP2012079251A (en) 2012-04-19
JP5533529B2 true JP5533529B2 (en) 2014-06-25

Family

ID=46239373

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010226358A Expired - Fee Related JP5533529B2 (en) 2010-10-06 2010-10-06 Image processing apparatus and image processing system

Country Status (1)

Country Link
JP (1) JP5533529B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7214940B2 (en) 2019-02-28 2023-01-31 株式会社神戸製鋼所 Heating furnace air volume control method

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5810031B2 (en) * 2012-04-27 2015-11-11 株式会社日立ハイテクノロジーズ Semiconductor circuit pattern measuring apparatus and method
JP5818773B2 (en) * 2012-11-22 2015-11-18 キヤノン株式会社 Image processing apparatus, image processing method, and program
JP2017054337A (en) 2015-09-10 2017-03-16 ソニー株式会社 Image processor and method
JP6752059B2 (en) * 2016-06-01 2020-09-09 キヤノン株式会社 Image processing equipment and image processing methods, programs and storage media
JP6750867B2 (en) * 2016-07-29 2020-09-02 キヤノン株式会社 Image processing apparatus, control method thereof, imaging apparatus, and program
JP6930415B2 (en) * 2017-12-20 2021-09-01 株式会社リコー Distance measuring device, mobile device and distance measuring method
CN114450550A (en) 2019-10-02 2022-05-06 富士通株式会社 Correction method, correction program, and information processing system
WO2022049926A1 (en) * 2020-09-07 2022-03-10 日立Astemo株式会社 Image recognition simulator device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3826236B2 (en) * 1995-05-08 2006-09-27 松下電器産業株式会社 Intermediate image generation method, intermediate image generation device, parallax estimation method, and image transmission display device
JP4296617B2 (en) * 1998-10-15 2009-07-15 ソニー株式会社 Image processing apparatus, image processing method, and recording medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7214940B2 (en) 2019-02-28 2023-01-31 株式会社神戸製鋼所 Heating furnace air volume control method

Also Published As

Publication number Publication date
JP2012079251A (en) 2012-04-19

Similar Documents

Publication Publication Date Title
JP5533529B2 (en) Image processing apparatus and image processing system
US10846913B2 (en) System and method for infinite synthetic image generation from multi-directional structured image array
US10176592B2 (en) Multi-directional structured image array capture on a 2D graph
US9299152B2 (en) Systems and methods for image depth map generation
JP6094863B2 (en) Image processing apparatus, image processing method, program, integrated circuit
EP1785941B1 (en) Virtual view specification and synthesis in free viewpoint television
WO2012086120A1 (en) Image processing apparatus, image pickup apparatus, image processing method, and program
JP5291755B2 (en) Stereoscopic image generation method and stereoscopic image generation system
WO2013038833A1 (en) Image processing system, image processing method, and image processing program
CN106997579B (en) Image splicing method and device
EP3446283B1 (en) Image stitching method and device
KR20110049039A (en) High density multi-view display system and method based on the active sub-pixel rendering
KR20110134142A (en) Method and apparatus for transforming stereoscopic image by using depth map information
US9154765B2 (en) Image processing device and method, and stereoscopic image display device
TWI517136B (en) Image display device and image display method
JP5755571B2 (en) Virtual viewpoint image generation device, virtual viewpoint image generation method, control program, recording medium, and stereoscopic display device
WO2013035457A1 (en) Stereoscopic image processing apparatus, stereoscopic image processing method, and program
US9674503B2 (en) Stereo matching apparatus using image property
JP5464129B2 (en) Image processing apparatus and parallax information generating apparatus
JP5627498B2 (en) Stereo image generating apparatus and method
US9380285B2 (en) Stereo image processing method, stereo image processing device and display device
WO2012014695A1 (en) Three-dimensional imaging device and imaging method for same
JPH09288735A (en) Image processor
JP2010278989A (en) Display-photographing apparatus
JP5431393B2 (en) Stereo image generating apparatus and method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130620

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140117

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140121

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140314

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

R150 Certificate of patent or registration of utility model

Ref document number: 5533529

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140414

LAPS Cancellation because of no payment of annual fees