JP5838775B2 - Image processing method, image processing system, and image processing program - Google Patents

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

Info

Publication number
JP5838775B2
JP5838775B2 JP2011273669A JP2011273669A JP5838775B2 JP 5838775 B2 JP5838775 B2 JP 5838775B2 JP 2011273669 A JP2011273669 A JP 2011273669A JP 2011273669 A JP2011273669 A JP 2011273669A JP 5838775 B2 JP5838775 B2 JP 5838775B2
Authority
JP
Japan
Prior art keywords
parallax
image
smoothing
images
time range
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
JP2011273669A
Other languages
Japanese (ja)
Other versions
JP2013126106A (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 JP2011273669A priority Critical patent/JP5838775B2/en
Publication of JP2013126106A publication Critical patent/JP2013126106A/en
Application granted granted Critical
Publication of JP5838775B2 publication Critical patent/JP5838775B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

本発明は、時間軸に沿って順序付けされた画像間の視差調整に向けられた画像処理方法、画像処理システムおよび画像処理プログラムに関する。   The present invention relates to an image processing method, an image processing system, and an image processing program directed to parallax adjustment between images ordered along a time axis.

近年の表示デバイスの開発とも相まって、立体視表示に係る画像処理技術の開発が進められている。このような立体視表示を実現する典型的な方法として、人間が感じる両眼視差を利用する方法がある。このような両眼視差を利用する場合には、撮像手段から被写体までの距離に応じて視差をつけた一対の画像(以下「ステレオ画像」または「3D画像」とも称す。)を生成する必要がある。   In conjunction with the development of display devices in recent years, development of image processing technology related to stereoscopic display has been promoted. As a typical method for realizing such stereoscopic display, there is a method using binocular parallax felt by humans. When such binocular parallax is used, it is necessary to generate a pair of images (hereinafter also referred to as “stereo images” or “3D images”) with parallax according to the distance from the imaging means to the subject. is there.

このような立体視表示される画像は、静止画だけではなく動画も含む。例えば、特開2009−239388号公報(特許文献1)には、立体動画像を立体視するための立体動画像処理装置を開示している。この立体動画像処理装置は、立体動画像のシーン切り替え時において、立体視を行なうユーザーの疲労感を軽減するための構成を開示する。より具体的には、この立体動画像処理装置は、立体動画像のシーンの切り替わり位置を検出し、シーンの切り替わり位置における奥行き感が徐々に変更されるように、立体動画像の奥行き感を調整する。   Such stereoscopically displayed images include not only still images but also moving images. For example, Japanese Unexamined Patent Application Publication No. 2009-239388 (Patent Document 1) discloses a stereoscopic moving image processing apparatus for stereoscopically viewing a stereoscopic moving image. This stereoscopic moving image processing device discloses a configuration for reducing fatigue of a user who performs stereoscopic viewing at the time of scene switching of a stereoscopic moving image. More specifically, this stereoscopic moving image processing apparatus detects the scene switching position of the stereoscopic moving image and adjusts the depth feeling of the stereoscopic moving image so that the depth feeling at the scene switching position is gradually changed. To do.

上述のように、動画は、静止画とは異なり、ユーザーの視聴時間が長くなるので、視差により生じるユーザーの疲労感を軽減することが重要である。   As described above, since a moving image is different from a still image in that the viewing time of the user becomes longer, it is important to reduce the user's fatigue caused by parallax.

特開2009−239388号公報JP 2009-239388 A

上述のような動画を立体視表示する場合には、発生する視差を、視聴に快適かつ適切なレベルに調整する必要がある。動画に含まれる被写体として、大きな視差を有するものが急に入ってきたような場合には、視差の調整が難しい。例えば、ある風景の撮像中に、車両などがその視野範囲を横切ったような場合などには、撮像手段により近い車両については、ユーザーの手前側(飛出し側)に立体視表示される(立体感を再現できる)ようにある程度の視差を生じさせることが好ましい。   When stereoscopically displaying a moving image as described above, it is necessary to adjust the generated parallax to a level comfortable and appropriate for viewing. When a subject having a large parallax suddenly enters as a subject included in a moving image, it is difficult to adjust the parallax. For example, if a vehicle or the like crosses the field of view during imaging of a certain landscape, the vehicle closer to the imaging means is stereoscopically displayed on the near side (outward side) of the user (stereoscopic). It is preferable to generate a certain amount of parallax so that the feeling can be reproduced).

しかしながら、このような被写体(発生する視差)の変化に伴って、立体視表示される画像の視差全体調整量(視差位置や視差レンジ)を変化させると、ユーザーからみれば、再現される画像全体の立体感が急激に変化することになり、不快感を与えうる。   However, when the overall parallax adjustment amount (parallax position or parallax range) of the stereoscopically displayed image is changed in accordance with such a change in the subject (generated parallax), the entire reproduced image is viewed from the user's viewpoint. The three-dimensional effect of this will change abruptly, which can give an uncomfortable feeling.

そこで、本発明は、かかる問題を解決するためになされたものであり、その目的は、時間軸に沿って順序付けされた複数の画像を用いて、立体感を残しつつ、よりユーザーへの負担の少ない立体視表示を再現できる画像処理方法、画像処理システムおよび画像処理プログラムを提供することである。   Therefore, the present invention has been made to solve such a problem, and the object of the present invention is to use a plurality of images ordered along the time axis and to reduce the burden on the user while leaving a stereoscopic effect. To provide an image processing method, an image processing system, and an image processing program capable of reproducing a small number of stereoscopic displays.

本発明のある局面に従う画像処理方法は、時間軸に沿って順序付けされた複数の第1の入力画像と、時間軸に沿って順序付けされた複数の第2の入力画像とを取得する取得ステ
ップを含む。複数の第1および第2の入力画像は、それぞれ異なる視点から被写体を撮像することで取得されたものである。画像処理方法は、さらに、時間軸上の各位置に対応する第1および第2の入力画像から視差画像を生成する生成ステップと、第1の時間範囲にわたって複数の視差画像を時間軸方向に平滑化する平滑化ステップと、第1の時間範囲に存在する視差画像について、少なくとも飛出し側の視差の大きさを、第1の時間範囲にわたって平滑化した結果に応じた値に補正する補正ステップとを含む。
An image processing method according to an aspect of the present invention includes an acquisition step of acquiring a plurality of first input images ordered along a time axis and a plurality of second input images ordered along a time axis. Including. The plurality of first and second input images are acquired by imaging the subject from different viewpoints. The image processing method further includes a generation step of generating a parallax image from first and second input images corresponding to each position on the time axis, and smoothing a plurality of parallax images in the time axis direction over a first time range. And a correction step for correcting at least the magnitude of the parallax on the fly-out side to a value corresponding to the result of smoothing over the first time range for the parallax image existing in the first time range, and including.

好ましくは、補正ステップは、第1の時間範囲に存在する視差画像について、飛出し側の視差と奥行き側の視差との間の視差レンジを、第1の時間範囲にわたって平滑化した結果に応じた値に制限するステップを含む。   Preferably, the correction step corresponds to a result of smoothing the parallax range between the projection-side parallax and the depth-side parallax over the first time range for the parallax image existing in the first time range. Including the step of limiting to the value.

好ましくは、平滑化ステップは、第1の時間範囲とは異なる第2の時間範囲にわたって複数の視差画像を時間軸方向に平滑化するステップを含み、補正ステップは、第1の時間範囲にわたって平滑化した結果、および、第2の時間範囲にわたる平滑化により得られた視差画像に基づいて、視差画像を補正するステップを含む。   Preferably, the smoothing step includes a step of smoothing a plurality of parallax images in a time axis direction over a second time range different from the first time range, and the correction step is smoothed over the first time range. And correcting the parallax image based on the result and the parallax image obtained by the smoothing over the second time range.

さらに好ましくは、第1の時間範囲は、第2の時間範囲よりも長い。
好ましくは、画像処理方法は、複数の第1の入力画像と、複数の第1の入力画像にそれぞれ対応する補正後の視差画像に従って視差を与えることで生成される複数の画像とを用いて、立体視画像を生成するステップをさらに含む。
More preferably, the first time range is longer than the second time range.
Preferably, the image processing method uses a plurality of first input images and a plurality of images generated by giving parallax according to corrected parallax images respectively corresponding to the plurality of first input images. The method further includes the step of generating a stereoscopic image.

好ましくは、画像処理方法は、複数の第1および第2の入力画像を、対応する補正後の視差画像に従ってそれぞれ視差を調整することで得られる画像を用いて、立体視画像を生成するステップをさらに含む。   Preferably, the image processing method includes a step of generating a stereoscopic image by using a plurality of first and second input images obtained by adjusting the parallax according to the corresponding corrected parallax images, respectively. In addition.

好ましくは、補正ステップは、視差画像に生じる視差の時間軸に沿った変化量である視差増減係数を決定するステップを含む。   Preferably, the correction step includes a step of determining a parallax increase / decrease coefficient that is a change amount along the time axis of the parallax generated in the parallax image.

さらに好ましくは、補正ステップは、視差増減係数を所定範囲に制限するステップを含む。   More preferably, the correction step includes a step of limiting the parallax increase / decrease coefficient to a predetermined range.

好ましくは、補正ステップは、視差画像に生じる視差位置のオフセットを決定するステップを含む。   Preferably, the correcting step includes a step of determining an offset of the parallax position generated in the parallax image.

好ましくは、補正ステップは、第1の時間範囲にわたって平滑化した結果に応じて、視差の最小値を制限するステップを含む。   Preferably, the correcting step includes a step of limiting a minimum value of parallax according to a result of smoothing over the first time range.

好ましくは、平滑化ステップは、時間軸上のある位置に対応する視差画像の視差の最大値または最小値が、時間軸上の近接する位置に対応する視差画像の最大値または最小値に比較して、所定のしきい値を超えて変化している画素については、当該視差の最大値または最小値を当該所定のしきい値に制限するステップを含む。   Preferably, the smoothing step compares the maximum value or the minimum value of the parallax image corresponding to a certain position on the time axis with the maximum value or the minimum value of the parallax image corresponding to an adjacent position on the time axis. For a pixel that has changed beyond a predetermined threshold, the step of limiting the maximum or minimum value of the parallax to the predetermined threshold is included.

好ましくは、平滑化ステップは、時間軸上のある位置に対応する視差画像に含まれる画素が示す視差のうち、平滑化された視差画像に含まれる画素が示す視差に比較して、所定のしきい値を超えて変化している画素については、対応する視差の大きさを当該所定のしきい値に制限するステップを含む。   Preferably, the smoothing step has a predetermined value compared to the parallax indicated by the pixel included in the smoothed parallax image among the parallax indicated by the pixel included in the parallax image corresponding to a certain position on the time axis. For pixels that change beyond the threshold, the step of limiting the corresponding parallax magnitude to the predetermined threshold value is included.

好ましくは、第1の時間範囲は、10秒以上である。
好ましくは、第2の時間範囲は、10秒以下である。
Preferably, the first time range is 10 seconds or more.
Preferably, the second time range is 10 seconds or less.

本発明の別の局面に従う画像処理システムは、時間軸に沿って順序付けされた複数の第1の入力画像と、時間軸に沿って順序付けされた複数の第2の入力画像とを取得する取得手段を含む。複数の第1および第2の入力画像は、それぞれ異なる視点から被写体を撮像することで取得されたものである。画像処理システムは、さらに、時間軸上の各位置に対応する第1および第2の入力画像から視差画像を生成する生成手段と、第1の時間範囲にわたって複数の視差画像を時間軸方向に平滑化する平滑化手段と、第1の時間範囲に存在する視差画像について、少なくとも飛出し側の視差の大きさを、第1の時間範囲にわたって平滑化した結果に応じた値に補正する補正手段とを含む。   An image processing system according to another aspect of the present invention obtains a plurality of first input images ordered along a time axis and a plurality of second input images ordered along a time axis. including. The plurality of first and second input images are acquired by imaging the subject from different viewpoints. The image processing system further includes generating means for generating a parallax image from the first and second input images corresponding to each position on the time axis, and smoothing the plurality of parallax images in the time axis direction over the first time range. Smoothing means for converting, and correction means for correcting the parallax image existing in the first time range to a value corresponding to the result of smoothing at least the size of the parallax on the projecting side over the first time range; including.

本発明の別の局面に従う画像処理プログラムは、コンピューターに、時間軸に沿って順序付けされた複数の第1の入力画像と、時間軸に沿って順序付けされた複数の第2の入力画像とを取得する取得ステップを実行させる。複数の第1および第2の入力画像は、それぞれ異なる視点から被写体を撮像することで取得されたものである。画像処理プログラムは、さらにコンピューターに、時間軸上の各位置に対応する第1および第2の入力画像から視差画像を生成する生成ステップと、第1の時間範囲にわたって複数の視差画像を時間軸方向に平滑化する平滑化ステップと、第1の時間範囲に存在する視差画像について、少なくとも飛出し側の視差の大きさを、第1の時間範囲にわたって平滑化した結果に応じた値に補正する補正ステップとを実行させる。   An image processing program according to another aspect of the present invention obtains a plurality of first input images ordered along a time axis and a plurality of second input images ordered along a time axis in a computer. The acquisition step to be executed is executed. The plurality of first and second input images are acquired by imaging the subject from different viewpoints. The image processing program further causes the computer to generate a parallax image from the first and second input images corresponding to each position on the time axis, and to generate a plurality of parallax images in the time axis direction over the first time range. Smoothing step for smoothing, and correction for correcting the parallax image existing in the first time range to a value corresponding to the result of smoothing the parallax on the projecting side at least over the first time range Step.

本発明によれば、時間軸に沿って順序付けされた複数の画像を用いて、立体感を残しつつ、よりユーザーへの負担の少ない立体視表示を再現できる。   According to the present invention, it is possible to reproduce a stereoscopic display with less burden on the user, while leaving a stereoscopic effect, using a plurality of images ordered along the time axis.

本発明の実施の形態に従う画像処理システムの基本的構成を示すブロック図である。1 is a block diagram showing a basic configuration of an image processing system according to an embodiment of the present invention. 図1に示す撮像部の具体的な構成例を示す図である。It is a figure which shows the specific structural example of the imaging part shown in FIG. 図1に示す画像処理システムを具現化したデジタルカメラの構成を示すブロック図である。It is a block diagram which shows the structure of the digital camera which actualized the image processing system shown in FIG. 図1に示す画像処理システムを具現化したパーソナルコンピューターの構成を示すブロック図である。It is a block diagram which shows the structure of the personal computer which actualized the image processing system shown in FIG. 本発明の実施の形態1に従う全体処理手順を示すフローチャートである。It is a flowchart which shows the whole process procedure according to Embodiment 1 of this invention. 図1に示す撮像部2によって撮像されたあるフレームにおける入力画像の一例を示す図である。It is a figure which shows an example of the input image in a certain flame | frame imaged by the imaging part 2 shown in FIG. 実施の形態1に従う画像処理方法に従って図6に示す一対の入力画像から生成された視差画像の一例を示す図である。7 is a diagram showing an example of a parallax image generated from a pair of input images shown in FIG. 6 according to the image processing method according to the first embodiment. FIG. 本発明の実施の形態1に従う空間的な平滑化処理に用いられる平均化フィルタの一例を示す図である。It is a figure which shows an example of the averaging filter used for the spatial smoothing process according to Embodiment 1 of this invention. 本発明の実施の形態1に従う時間的な平滑化処理を説明するための図である。It is a figure for demonstrating the time smoothing process according to Embodiment 1 of this invention. 図7に示す視差画像に対して空間的および時間的な平滑化処理によって得られた平滑化された視差画像の一例を示す図である。It is a figure which shows an example of the smoothed parallax image obtained by the spatial and temporal smoothing process with respect to the parallax image shown in FIG. 本発明の実施の形態1に従う視差全体調整量決定処理を説明するための図である。It is a figure for demonstrating the parallax whole adjustment amount determination process according to Embodiment 1 of this invention. 図10に示す平滑化後の視差画像に対して視差調整された視差画像の一例を示す図である。It is a figure which shows an example of the parallax image by which parallax adjustment was carried out with respect to the parallax image after smoothing shown in FIG. 本発明の実施の形態1に従う立体視画像生成処理を説明するための図である。It is a figure for demonstrating the stereoscopic vision image generation process according to Embodiment 1 of this invention. 図13に示す立体視画像生成処理の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the stereoscopic vision image generation process shown in FIG. 図6に示す入力画像1および入力画像2を用いて生成されたステレオ画像の一例を示す図である。It is a figure which shows an example of the stereo image produced | generated using the input image 1 and the input image 2 shown in FIG. 本発明の実施の形態1に従う画像処理方法の適用例を示す図である。It is a figure which shows the example of application of the image processing method according to Embodiment 1 of this invention. 図16に示す適用例に対応する各パラメータの時間的変化を示す図である。It is a figure which shows the time change of each parameter corresponding to the example of application shown in FIG. 視差増減係数を制限した場合における図17に示す各パラメータの時間的変化を示す図である。It is a figure which shows the time change of each parameter shown in FIG. 17 when a parallax increase / decrease coefficient is restrict | limited. 本発明の実施の形態2に従う全体処理手順を示すフローチャートである。It is a flowchart which shows the whole process sequence according to Embodiment 2 of this invention. 本発明の実施の形態2に従う画像処理方法の適用例を示す図である。It is a figure which shows the example of application of the image processing method according to Embodiment 2 of this invention. 図20に示す適用例において出力されるステレオ画像の一例を示す図である。It is a figure which shows an example of the stereo image output in the application example shown in FIG.

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

[A.概要]
本発明の実施の形態に従う画像処理システムは、時間軸に沿って順序付けされた複数の第1の入力画像と、時間軸に沿って順序付けされた複数の第2の入力画像とを取得して、時間軸に沿って画像を立体視する(典型的には、立体的に動画を再現する)際に必要な視差画像を生成および調整する。
[A. Overview]
An image processing system according to an embodiment of the present invention acquires a plurality of first input images ordered along a time axis and a plurality of second input images ordered along a time axis, A parallax image necessary for stereoscopically viewing an image along a time axis (typically reproducing a moving image stereoscopically) is generated and adjusted.

より具体的には、画像処理システムは、時間軸上の各位置に対応する視差画像を生成するとともに、それらの生成した視差画像を時間軸方向に平滑化し、再現される画像に与えられる視差全体調整量が当該平滑化により得られた視差画像に応じた値になるように、時間軸上の各位置に対応する視差画像を補正する。この視差全体調整量は、例えば、飛出し側の視差の大きさ、飛出し側の視差と奥行き側の視差との間の視差レンジ、および視差画像に生じる視差位置(あるいは、位置のオフセット)を含む。   More specifically, the image processing system generates a parallax image corresponding to each position on the time axis, smooths the generated parallax image in the time axis direction, and provides the entire parallax given to the reproduced image. The parallax image corresponding to each position on the time axis is corrected so that the adjustment amount becomes a value corresponding to the parallax image obtained by the smoothing. The overall parallax adjustment amount includes, for example, the magnitude of the parallax on the flyout side, the parallax range between the parallax on the flyout side and the parallax on the depth side, and the parallax position (or position offset) generated in the parallax image. Including.

好ましくは、画像処理システムは、時間軸上の各位置に対応する視差画像についても、近接するいくつかの視差画像から平滑化により得られた視差画像を用いる。この平滑化処理は、各視差画像に含まれ得るノイズ成分などを除去することを主目的としている。そのため、上述した視差全体調整量を設定するために用いる平滑化処理とは異なる時間範囲で平滑化される。より具体的には、この時間範囲は、視差全体調整量を設定するために用いる平滑化処理に係る時間範囲に比較して、より短い期間となる。   Preferably, the image processing system also uses parallax images obtained by smoothing from several adjacent parallax images for parallax images corresponding to positions on the time axis. This smoothing process is mainly intended to remove noise components and the like that can be included in each parallax image. Therefore, smoothing is performed in a time range different from the smoothing process used for setting the above-described overall parallax adjustment amount. More specifically, this time range is shorter than the time range related to the smoothing process used to set the overall parallax adjustment amount.

以下の説明においては、説明の便宜上、前者の視差全体調整量を設定するための平滑化処理に係る時間範囲を「長時間範囲」と称し、後者の時間軸上の各位置に対応する視差画像を生成するための平滑化処理に係る時間範囲を「短時間範囲」と称する。なお、動画においては、時間毎の画像を「フレーム」と称し、この「フレーム」が更新される周期を「フレーム間隔」と称する。そのため、平滑化処理に係る時間範囲は、平滑化に用いられる「フレーム」の数、あるいは「フレーム間隔」の対応する倍数などで表現されることもある。   In the following description, for convenience of description, the time range related to the smoothing process for setting the former parallax overall adjustment amount is referred to as a “long-time range”, and the latter parallax image corresponding to each position on the time axis The time range related to the smoothing process for generating the “Short range” is referred to as “short time range”. In a moving image, an image for each time is referred to as a “frame”, and a cycle in which the “frame” is updated is referred to as a “frame interval”. For this reason, the time range related to the smoothing process may be expressed by the number of “frames” used for smoothing or a corresponding multiple of “frame interval”.

なお、時間軸上の各位置に対応する視差画像を生成するための平滑化処理(「短時間範囲」での平滑化処理)については必須ではなく、全く行なわない、あるいは代替の方法を採用してもよい。   Note that smoothing processing (smoothing processing in the “short-time range”) for generating a parallax image corresponding to each position on the time axis is not essential, and is not performed at all, or an alternative method is adopted. May be.

本実施の形態に従う画像処理システムは、視差全体調整量(視差の大きさ、視差レンジ、および視差位置)を、より長い期間にわたって視差画像を平滑化した結果に基づいて調
整するので、部分的に大きな視差を有する被写体が映り込んだとしても、その被写体によって画像全体の視差量が急激に変化することを防止する。この大きな視差を有する被写体が長期間にわたって存在するような場合には、画像全体の視差量が徐々に増大することになる。また、過度に飛出し側に再現されている被写体については、その飛出し量が徐々に低減される。一方で、時間軸上の各位置(各フレーム)における視差画像は、より短い期間にわたる平滑化によって生成されるので、急激に視差が変化するような動画であっても、それに含まれる部分毎に存在する視差の情報は残されるため、各フレームにおける立体感を再現することができる。
The image processing system according to the present embodiment adjusts the overall parallax adjustment amount (parallax magnitude, parallax range, and parallax position) based on the result of smoothing the parallax image over a longer period. Even if a subject having a large parallax is reflected, it is possible to prevent the parallax amount of the entire image from changing suddenly due to the subject. When a subject having such a large parallax exists for a long period of time, the parallax amount of the entire image gradually increases. In addition, for a subject that is excessively reproduced on the fly-out side, the jump-out amount is gradually reduced. On the other hand, since the parallax images at each position (each frame) on the time axis are generated by smoothing over a shorter period, even for a moving image in which the parallax changes suddenly, Since the existing parallax information remains, the stereoscopic effect in each frame can be reproduced.

このように、本実施の形態に従う画像処理システムは、2種類の時間範囲でそれぞれ視差画像を平滑化した結果を用いて、立体感を残しつつ、よりユーザーへの負担の少ない立体視表示を再現する。   As described above, the image processing system according to the present embodiment reproduces a stereoscopic display with less burden on the user while using a result obtained by smoothing the parallax images in two types of time ranges while leaving a stereoscopic effect. To do.

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

《b1:基本的構成》
図1は、本発明の実施の形態に従う画像処理システム1の基本的構成を示すブロック図である。図1を参照して、画像処理システム1は、撮像部2と、画像処理部3と、3D画像出力部4とを含む。図1に示す画像処理システム1においては、撮像部2が被写体を撮像することで一対の入力画像(入力画像1および入力画像2)を取得し、画像処理部3がこの取得された一対の入力画像に対して後述するような画像処理を行なうことで、被写体を立体視表示するためのステレオ画像(各フレームの左眼用画像および右眼用画像)を生成する。そして、3D画像出力部4は、このステレオ画像(左眼用画像および右眼用画像)を表示デバイスなどへ出力する。
<< b1: Basic configuration >>
FIG. 1 is a block diagram showing a basic configuration of an image processing system 1 according to the embodiment of the present invention. With reference to FIG. 1, the image processing system 1 includes an imaging unit 2, an image processing unit 3, and a 3D image output unit 4. In the image processing system 1 shown in FIG. 1, the imaging unit 2 captures a subject to acquire a pair of input images (input image 1 and input image 2), and the image processing unit 3 acquires the acquired pair of inputs. By performing image processing to be described later on the image, a stereo image (left-eye image and right-eye image of each frame) for stereoscopically displaying the subject is generated. Then, the 3D image output unit 4 outputs the stereo image (the left eye image and the right eye image) to a display device or the like.

撮像部2は、同一対象物(被写体)を異なる視点で撮像して一対の入力画像を生成する。本実施の形態に従う画像処理システムは、動画を立体視表示することができるので、撮像部2は、所定の時間間隔(フレーム間隔)で、一対の入力画像を生成する。すなわち、撮像部2からは、時間軸に沿って順序付けされた複数の入力画像1と、時間軸に沿って順序付けされた複数の入力画像2とが、画像処理部3へ与えられる。そして、入力画像1および入力画像2は、それぞれ異なる視点から被写体を撮像することで取得されたものになる。   The imaging unit 2 captures the same object (subject) from different viewpoints and generates a pair of input images. Since the image processing system according to the present embodiment can stereoscopically display a moving image, the imaging unit 2 generates a pair of input images at a predetermined time interval (frame interval). That is, the imaging unit 2 provides the image processing unit 3 with a plurality of input images 1 ordered along the time axis and a plurality of input images 2 ordered along the time axis. Then, the input image 1 and the input image 2 are acquired by imaging the subject from different viewpoints.

より具体的には、撮像部2は、第1カメラ21と、第2カメラ22と、第1カメラ21と接続されたA/D(Analog to Digital)変換部23と、第2カメラ22と接続されたA/D変換部24とを含む。A/D変換部23は、第1カメラ21により撮像された被写体を示す入力画像1を出力し、A/D変換部24は、第2カメラ22により撮像された被写体を示す入力画像2を出力する。   More specifically, the imaging unit 2 is connected to the first camera 21, the second camera 22, an A / D (Analog to Digital) conversion unit 23 connected to the first camera 21, and the second camera 22. A / D converter 24. The A / D conversion unit 23 outputs an input image 1 indicating the subject imaged by the first camera 21, and the A / D conversion unit 24 outputs an input image 2 indicating the subject imaged by the second camera 22. To do.

すなわち、第1カメラ21およびA/D変換部23は、被写体を撮像して第1の入力画像を取得する撮像手段に相当し、第2カメラ22およびA/D変換部24は、第1カメラ21とは異なる視点から被写体を撮像して第2の入力画像を取得する別の撮像手段に相当する。   That is, the first camera 21 and the A / D conversion unit 23 correspond to an imaging unit that captures a subject and obtains a first input image, and the second camera 22 and the A / D conversion unit 24 are the first camera. 21 corresponds to another imaging unit that captures a subject from a different viewpoint and acquires a second input image.

第1カメラ21は、被写体を撮像するための光学系であるレンズ21aと、レンズ21aにより集光された光を電気信号に変換するデバイスである撮像素子21bとを含む。A/D変換部23は、撮像素子21bから出力される被写体を示す映像信号(アナログ電気信号)をデジタル信号に変換して出力する。同様に、第2カメラ22は、被写体を撮像するための光学系であるレンズ22aと、レンズ22aにより集光された光を電気信号に変
換するデバイスである撮像素子22bとを含む。A/D変換部24は、撮像素子22bから出力される被写体を示す映像信号(アナログ電気信号)をデジタル信号に変換して出力する。撮像部2はさらに、各部分を制御するための制御処理回路などを含み得る。
The first camera 21 includes a lens 21a that is an optical system for imaging a subject, and an imaging element 21b that is a device that converts light collected by the lens 21a into an electrical signal. The A / D converter 23 converts a video signal (analog electrical signal) indicating a subject output from the image sensor 21b into a digital signal and outputs the digital signal. Similarly, the second camera 22 includes a lens 22a that is an optical system for imaging a subject, and an imaging element 22b that is a device that converts light collected by the lens 22a into an electrical signal. The A / D converter 24 converts a video signal (analog electrical signal) indicating a subject output from the image sensor 22b into a digital signal and outputs the digital signal. The imaging unit 2 may further include a control processing circuit for controlling each part.

後述するように、本実施の形態に従う画像処理においては、一方のカメラで撮像された入力画像だけを用いても、ステレオ画像(左眼用画像および右眼用画像)を生成することができる。   As will be described later, in the image processing according to the present embodiment, a stereo image (a left-eye image and a right-eye image) can be generated using only the input image captured by one camera.

図2は、図1に示す撮像部2の具体的な構成例を示す図である。より具体的には、図2には、基本的なスペックを同一としたレンズ21aおよび22aからなる撮像部2の一例を示す。この撮像部2においては、いずれのレンズについても光学ズーム機能を搭載してもよい。   FIG. 2 is a diagram illustrating a specific configuration example of the imaging unit 2 illustrated in FIG. 1. More specifically, FIG. 2 shows an example of the imaging unit 2 including lenses 21a and 22a having the same basic specifications. In this imaging unit 2, an optical zoom function may be mounted on any lens.

本実施の形態に従う画像処理方法においては、同一の被写体に対するそれぞれのカメラの視線方向(視点)が異なっていればよいので、撮像部2において、レンズ21aと22aとの配置(縦方向配列または横方向配列)は任意に設定できる。すなわち、図2(a)に示すように縦長方向に配置(縦ステレオ)して撮像してもよいし、図2(b)に示すように横長方向に配置(横ステレオ)して撮像してもよい。   In the image processing method according to the present embodiment, it is only necessary that the line-of-sight directions (viewpoints) of the respective cameras with respect to the same subject are different, so in the imaging unit 2, the arrangement of the lenses 21a and 22a (vertical arrangement or horizontal The direction array can be arbitrarily set. That is, as shown in FIG. 2A, the image may be arranged in the vertically long direction (vertical stereo) or may be picked up in the horizontally long direction (horizontal stereo) as shown in FIG. Also good.

本実施の形態に従う画像処理システムは、時間的に連続して被写体を立体視表示する。そのため、第1カメラ21および第2カメラ22は、互いに同期を取りつつ、所定周期で被写体を撮像することで、それぞれのカメラについての時間軸に沿って順序付けされた一連の画像を取得することができる。また、本実施の形態に従う画像処理方法においては、入力画像は、カラー画像であってもよいし、モノクロ画像であってもよい。   The image processing system according to the present embodiment stereoscopically displays a subject in time. Therefore, the first camera 21 and the second camera 22 can acquire a series of images ordered along the time axis for each camera by capturing the subject in a predetermined cycle while synchronizing with each other. it can. In the image processing method according to the present embodiment, the input image may be a color image or a monochrome image.

再度図1を参照して、画像処理部3は、撮像部2によって取得された一対の入力画像に対して、本実施の形態に従う画像処理方法を実施することで、被写体を立体視表示するためのステレオ画像(各フレームの左眼用画像および右眼用画像)を生成する。より具体的には、画像処理部3は、対応点探索部31と、視差画像生成部32と、平滑化処理部33と、視差全体調整量決定部34と、視差調整部35と、3D画像生成部36とを含む。   Referring to FIG. 1 again, the image processing unit 3 performs stereoscopic display of the subject by performing the image processing method according to the present embodiment on the pair of input images acquired by the imaging unit 2. Stereo images (left eye image and right eye image of each frame) are generated. More specifically, the image processing unit 3 includes a corresponding point search unit 31, a parallax image generation unit 32, a smoothing processing unit 33, an overall parallax adjustment amount determination unit 34, a parallax adjustment unit 35, and a 3D image. And a generation unit 36.

対応点探索部31は、各フレームの一対の入力画像(入力画像1および入力画像2)に対して対応点探索の処理を行なう。この対応点探索の処理は、典型的には、POC(Phase-Only Correlation)演算法、SAD(Sum of Absolute Difference)演算法、SSD(Sum of Squared Difference)演算法、NCC(Normalized Cross Correlation)演算法などを用いることができる。すなわち、対応点探索部31は、入力画像1と入力画像2との間における被写体の各点についての対応関係を探索する。   The corresponding point search unit 31 performs a corresponding point search process on a pair of input images (input image 1 and input image 2) of each frame. Typically, the corresponding point search processing includes POC (Phase-Only Correlation) calculation method, SAD (Sum of Absolute Difference) calculation method, SSD (Sum of Squared Difference) calculation method, NCC (Normalized Cross Correlation) calculation method. The method etc. can be used. That is, the corresponding point search unit 31 searches for a corresponding relationship for each point of the subject between the input image 1 and the input image 2.

視差画像生成部32は、2つの入力画像についての距離情報を取得する。この距離情報は、同一の被写体についての情報の相違に基づいて算出される。典型的には、視差画像生成部32は、対応点探索部31によって探索された被写体の各点についての入力画像の間での対応関係から距離情報を算出する。撮像部2では、異なる視点からそれぞれ被写体を撮像する。そのため、2つの入力画像の間では、被写体のある点(注目点)を表現する画素は、撮像部2と当該被写体の点との距離に応じた距離だけずれることになる。本明細書においては、入力画像1の注目点に対応する画素の画像座標系上の座標と、入力画像2の注目点に対応する画素の画像座標系上の座標との差を「視差」と称する。視差画像生成部32は、対応点探索部31によって探索された被写体の注目点の各々について、視差を算出する。   The parallax image generation unit 32 acquires distance information about the two input images. This distance information is calculated based on the difference in information about the same subject. Typically, the parallax image generation unit 32 calculates distance information from a correspondence relationship between input images for each point of the subject searched by the corresponding point search unit 31. The imaging unit 2 images the subject from different viewpoints. Therefore, between two input images, a pixel representing a certain point (attention point) of the subject is shifted by a distance corresponding to the distance between the imaging unit 2 and the point of the subject. In this specification, the difference between the coordinates on the image coordinate system of the pixel corresponding to the target point of the input image 1 and the coordinates on the image coordinate system of the pixel corresponding to the target point of the input image 2 is referred to as “parallax”. Called. The parallax image generation unit 32 calculates the parallax for each point of interest of the subject searched by the corresponding point search unit 31.

この視差は、撮像部2から被写体の対応する注目点までの距離を示す指標値である。視
差が大きいほど、撮像部2から被写体の対応する注目点までの距離が短い、すなわち撮像部2により近接していることを意味する。本明細書においては、視差、および、視差によって示される被写体の各点の撮像部2からの距離を、総称して「距離情報」という用語を用いる。
This parallax is an index value indicating the distance from the imaging unit 2 to the corresponding point of interest of the subject. The larger the parallax, the shorter the distance from the imaging unit 2 to the corresponding point of interest of the subject, that is, the closer the imaging unit 2 is. In this specification, the term “distance information” is used as a general term for the parallax and the distance from the imaging unit 2 of each point of the subject indicated by the parallax.

なお、入力画像間で視差が生じる方向は、撮像部2における第1カメラ21と第2カメラ22との間の位置関係に依存する。例えば、第1カメラ21と第2カメラ22とを縦方向に所定間隔だけ離して配置した場合には、入力画像1と入力画像2との間での視差は縦方向に生じることになる。   Note that the direction in which the parallax occurs between the input images depends on the positional relationship between the first camera 21 and the second camera 22 in the imaging unit 2. For example, when the first camera 21 and the second camera 22 are arranged at a predetermined interval in the vertical direction, the parallax between the input image 1 and the input image 2 is generated in the vertical direction.

視差画像生成部32は、被写体の各点についての距離情報として算出し、算出したそれぞれの距離情報を画像座標系上の座標に関連付けて表現した視差画像(「距離画像」とも称す。)を生成する。   The parallax image generation unit 32 calculates the distance information about each point of the subject, and generates a parallax image (also referred to as “distance image”) in which the calculated distance information is associated with coordinates on the image coordinate system. To do.

平滑化処理部33は、視差画像生成部32によって生成された視差画像に対してスムージング処理(平滑化処理)する。空間平滑化を行なうとともに、上述したように、本実施の形態においては、2種類の時間範囲でそれぞれ視差画像を平滑化する。平滑化処理部33は、2種類のフレーム数について、それぞれ平滑化処理を行なう。   The smoothing processing unit 33 performs a smoothing process (smoothing process) on the parallax image generated by the parallax image generation unit 32. While performing spatial smoothing, as described above, in the present embodiment, the parallax images are each smoothed in two types of time ranges. The smoothing processing unit 33 performs smoothing processing for each of the two types of frames.

視差全体調整量決定部34は、平滑化処理部33によって平滑化された結果に基づいて、視差全体調整量(視差の大きさ、視差レンジ、および視差位置)を決定する。   The overall parallax adjustment amount determination unit 34 determines the overall parallax adjustment amount (the size of the parallax, the parallax range, and the parallax position) based on the result smoothed by the smoothing processing unit 33.

視差調整部35は、視差全体調整量決定部34によって決定された視差全体調整量に従って、各フレームに係る視差画像(好ましくは、短時間範囲で平滑化された視差画像)を補正する。   The parallax adjustment unit 35 corrects the parallax images (preferably parallax images smoothed in a short time range) related to each frame according to the total parallax adjustment amount determined by the total parallax adjustment amount determination unit 34.

平滑化処理部33、視差全体調整量決定部34および視差調整部35において実行される処理の詳細については後述する。   Details of processes executed in the smoothing processing unit 33, the overall parallax adjustment amount determination unit 34, and the parallax adjustment unit 35 will be described later.

3D画像生成部36は、視差調整部35による調整後の視差画像に基づいて、入力画像を構成する各画素を対応する距離情報(画素数)だけずらすことで、被写体を立体視表示するためのステレオ画像(各フレームの左眼用画像および右眼用画像)を生成する。このように、距離情報に基づいて、入力画像に含まれる画素を横方向にずらすことで被写体を立体視表示するためのステレオ画像が生成される。左眼用画像と右眼用画像との間について見れば、被写体の各点は、視差画像によって示される距離情報(画素数)に応じた距離だけ離れて、すなわち距離情報(画素数)に応じた視差が与えられて表現される。これにより、被写体を立体視表示することができる。   The 3D image generation unit 36 shifts each pixel constituting the input image by the corresponding distance information (number of pixels) based on the parallax image after adjustment by the parallax adjustment unit 35 to display the subject stereoscopically. Stereo images (left eye image and right eye image of each frame) are generated. In this manner, a stereo image for stereoscopically displaying the subject is generated by shifting the pixels included in the input image in the horizontal direction based on the distance information. When viewed between the image for the left eye and the image for the right eye, each point of the subject is separated by a distance corresponding to the distance information (number of pixels) indicated by the parallax image, that is, according to the distance information (number of pixels). It is expressed with given parallax. As a result, the subject can be stereoscopically displayed.

3D画像出力部4は、画像処理部3によって生成されるステレオ画像(各フレームの左眼用画像および右眼用画像)を表示デバイスなどへ出力する。   The 3D image output unit 4 outputs a stereo image (the image for the left eye and the image for the right eye of each frame) generated by the image processing unit 3 to a display device or the like.

図1に示す画像処理システム1は、各部を独立に構成することもできるが、汎用的には、以下に説明するデジタルカメラやパーソナルコンピューターなどとして具現化される場合が多い。そこで、本実施の形態に従う画像処理システム1の具現化例について説明する。   Although the image processing system 1 shown in FIG. 1 can be configured independently of each other, in general, the image processing system 1 is often embodied as a digital camera or a personal computer described below. Therefore, an implementation example of the image processing system 1 according to the present embodiment will be described.

《b2:具現化例1》
図3は、図1に示す画像処理システム1を具現化したデジタルカメラ100の構成を示すブロック図である。図3に示すデジタルカメラ100は、2つのカメラ(第1カメラ121および第2カメラ122)を搭載しており、被写体を立体視表示するためのステレオ
画像を撮像することができる。図3において、図1に示す画像処理システム1を構成するそれぞれのブロックに対応するコンポーネントには、図1と同一の参照符号を付している。
<< b2: Embodiment 1 >>
FIG. 3 is a block diagram showing a configuration of a digital camera 100 that embodies the image processing system 1 shown in FIG. A digital camera 100 illustrated in FIG. 3 includes two cameras (a first camera 121 and a second camera 122), and can capture a stereo image for stereoscopically displaying a subject. In FIG. 3, components corresponding to the respective blocks constituting the image processing system 1 shown in FIG. 1 are denoted by the same reference numerals as in FIG.

デジタルカメラ100では、第1カメラ121で被写体を撮像することで取得される入力画像が記憶および出力され、第2カメラ122で当該被写体を撮像することで取得される入力画像については、主として、上述の対応点探索処理および視差画像生成処理に用いられる。そのため、第1カメラ121についてのみ光学ズーム機能が搭載されているとする。   In the digital camera 100, an input image acquired by imaging a subject with the first camera 121 is stored and output, and an input image acquired by imaging the subject with the second camera 122 is mainly described above. Are used for the corresponding point search process and the parallax image generation process. Therefore, it is assumed that only the first camera 121 has an optical zoom function.

図3を参照して、デジタルカメラ100は、CPU(Central Processing Unit)102と、デジタル処理回路104と、画像表示部108と、カードインターフェイス(I/F)110と、記憶部112と、ズーム機構114と、第1カメラ121と、第2カメラ122とを含む。   Referring to FIG. 3, a digital camera 100 includes a CPU (Central Processing Unit) 102, a digital processing circuit 104, an image display unit 108, a card interface (I / F) 110, a storage unit 112, and a zoom mechanism. 114, a first camera 121, and a second camera 122.

CPU102は、予め格納されたプログラム(画像処理プログラムを含む)などを実行することで、デジタルカメラ100の全体を制御する。デジタル処理回路104は、本実施の形態に従う画像処理を含む各種のデジタル処理を実行する。デジタル処理回路104は、典型的には、DSP(Digital Signal Processor)、ASIC(Application Specific Integrated Circuit)、LSI(Large Scale Integration)、FPGA(Field-Programmable Gate Array)などによって構成される。このデジタル処理回路104は、図1に示す画像処理部3が提供する機能を実現するための画像処理回路106を含む。   The CPU 102 controls the entire digital camera 100 by executing a program (including an image processing program) stored in advance. The digital processing circuit 104 executes various digital processes including image processing according to the present embodiment. The digital processing circuit 104 is typically configured by a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an LSI (Large Scale Integration), an FPGA (Field-Programmable Gate Array), or the like. The digital processing circuit 104 includes an image processing circuit 106 for realizing the functions provided by the image processing unit 3 shown in FIG.

画像表示部108は、第1カメラ121および/または第2カメラ122により提供される画像、デジタル処理回路104(画像処理回路106)によって生成される画像、デジタルカメラ100に係る各種設定情報、および、制御用GUI(Graphical User Interface)画面などを表示する。画像表示部108は、画像処理回路106によって生成されるステレオ画像を用いて、被写体を立体視表示できることが好ましい。この場合、画像表示部108は、3次元表示方式に対応した任意の表示デバイス(3次元表示用の液晶表示装置)によって構成される。このような3次元表示方式としては、パララックスバリア方式などを採用することができる。このパララックスバリア方式では、液晶表示面にパララックスバリアを設けることで、ユーザーの右眼で右眼用画像を視認させ、ユーザーの左眼で左眼用画像を視認させることができる。あるいは、シャッタメガネ方式を採用してもよい。このシャッタメガネ方式では、左眼用画像および右眼用画像を交互に高速で切り替えて表示するとともに、この画像の切り替えに同期して開閉するシャッターが搭載された専用メガネをユーザーが装着することで、立体視表示を楽しむことができる。   The image display unit 108 includes an image provided by the first camera 121 and / or the second camera 122, an image generated by the digital processing circuit 104 (image processing circuit 106), various setting information related to the digital camera 100, and A control GUI (Graphical User Interface) screen or the like is displayed. It is preferable that the image display unit 108 can stereoscopically display the subject using a stereo image generated by the image processing circuit 106. In this case, the image display unit 108 is configured by an arbitrary display device (liquid crystal display device for three-dimensional display) corresponding to the three-dimensional display method. As such a three-dimensional display method, a parallax barrier method or the like can be employed. In this parallax barrier method, by providing a parallax barrier on the liquid crystal display surface, the right eye image can be visually recognized by the user's right eye, and the left eye image can be visually recognized by the user's left eye. Alternatively, a shutter glasses method may be adopted. In this shutter glasses method, the left eye image and the right eye image are alternately switched at high speed and displayed, and the user wears special glasses equipped with a shutter that opens and closes in synchronization with the switching of the image. , You can enjoy stereoscopic display.

カードインターフェイス(I/F)110は、画像処理回路106によって生成された画像データを記憶部112へ書き込み、あるいは、記憶部112から画像データなどを読み出すためのインターフェイスである。記憶部112は、画像処理回路106によって生成された画像データや各種情報(デジタルカメラ100の制御パラメータや動作モードなどの設定値)を格納する記憶デバイスである。この記憶部112は、フラッシュメモリ、光学ディスク、磁気ディスクなどからなり、データを不揮発的に記憶する。   A card interface (I / F) 110 is an interface for writing image data generated by the image processing circuit 106 to the storage unit 112 or reading image data from the storage unit 112. The storage unit 112 is a storage device that stores image data generated by the image processing circuit 106 and various information (setting values such as control parameters and operation modes of the digital camera 100). The storage unit 112 includes a flash memory, an optical disk, a magnetic disk, and the like, and stores data in a nonvolatile manner.

ズーム機構114は、ユーザー操作などに応じて、第1カメラ121の撮像倍率を変更する機構である。ズーム機構114は、典型的には、サーボモーターなどを含み、第1カメラ121を構成するレンズ群を駆動することで、焦点距離を変化させる。   The zoom mechanism 114 is a mechanism that changes the imaging magnification of the first camera 121 according to a user operation or the like. The zoom mechanism 114 typically includes a servo motor and the like, and drives the lens group constituting the first camera 121 to change the focal length.

第1カメラ121は、被写体を撮像することでステレオ画像を生成するための入力画像を生成する。第1カメラ121は、ズーム機構114によって駆動される複数のレンズ群
からなる。第2カメラ122は、後述するような対応点探索処理や視差画像生成処理に用いられ、第1カメラ121によって撮像される同一の被写体を別の視点から撮像する。
The first camera 121 generates an input image for generating a stereo image by imaging a subject. The first camera 121 includes a plurality of lens groups that are driven by the zoom mechanism 114. The second camera 122 is used for corresponding point search processing and parallax image generation processing, which will be described later, and images the same subject imaged by the first camera 121 from different viewpoints.

このように、図3に示すデジタルカメラ100は、本実施の形態に従う画像処理システム1の全体を単体の装置として実装したものである。すなわち、ユーザーは、デジタルカメラ100を用いて被写体を撮像することで、画像表示部108において当該被写体を立体的に視認することができる。   As described above, the digital camera 100 shown in FIG. 3 is obtained by mounting the entire image processing system 1 according to the present embodiment as a single device. That is, the user can visually recognize the subject in a three-dimensional manner on the image display unit 108 by imaging the subject using the digital camera 100.

《b3:具現化例2》
図4は、図1に示す画像処理システム1を具現化したパーソナルコンピューター200の構成を示すブロック図である。図4に示すパーソナルコンピューター200では、一対の入力画像を取得するための撮像部2が搭載されておらず、任意の撮像部2によって取得された一対の入力画像(入力画像1および入力画像2)が外部から入力される構成となっている。このような構成であっても、実施の形態に従う画像処理システム1に含まれ得る。なお、図4においても、図1に示す画像処理システム1を構成するそれぞれのブロックに対応するコンポーネントには、図1と同一の参照符号を付している。
<< b3: Implementation Example 2 >>
FIG. 4 is a block diagram showing a configuration of a personal computer 200 that embodies the image processing system 1 shown in FIG. In the personal computer 200 shown in FIG. 4, the imaging unit 2 for acquiring a pair of input images is not mounted, and a pair of input images (an input image 1 and an input image 2) acquired by an arbitrary imaging unit 2. Is input from the outside. Even such a configuration can be included in the image processing system 1 according to the embodiment. In FIG. 4 as well, components corresponding to the respective blocks constituting the image processing system 1 shown in FIG. 1 are denoted by the same reference numerals as in FIG.

図4を参照して、パーソナルコンピューター200は、パーソナルコンピューター本体202と、モニター206と、マウス208と、キーボード210と、外部記憶装置212とを含む。   Referring to FIG. 4, personal computer 200 includes a personal computer main body 202, a monitor 206, a mouse 208, a keyboard 210, and an external storage device 212.

パーソナルコンピューター本体202は、典型的には、汎用的なアーキテクチャーに従う汎用コンピューターであり、基本的な構成要素として、CPU、RAM(Random Access Memory)、ROM(Read Only Memory)などを含む。パーソナルコンピューター本体202は、図1に示す画像処理部3が提供する機能を実現するための画像処理プログラム204が実行可能になっている。このような画像処理プログラム204は、CD−ROM(Compact Disk-Read Only Memory)などの記憶媒体に格納されて流通し、あるいは、ネットワークを介してサーバー装置から配信される。そして、画像処理プログラム204は、パーソナルコンピューター本体202のハードディスクなどの記憶領域内に格納される。   The personal computer main body 202 is typically a general-purpose computer according to a general-purpose architecture, and includes a CPU, a RAM (Random Access Memory), a ROM (Read Only Memory), and the like as basic components. The personal computer main body 202 can execute an image processing program 204 for realizing a function provided by the image processing unit 3 shown in FIG. Such an image processing program 204 is stored in a storage medium such as a CD-ROM (Compact Disk-Read Only Memory) and distributed, or distributed from a server device via a network. The image processing program 204 is stored in a storage area such as a hard disk of the personal computer main body 202.

このような画像処理プログラム204は、パーソナルコンピューター本体202で実行されるオペレーティングシステム(OS)の一部として提供されるプログラムモジュールのうち必要なモジュールを、所定のタイミングおよび順序で呼出して処理を実現するように構成されてもよい。この場合、画像処理プログラム204自体には、OSが提供するモジュールは含まれず、OSと協働して画像処理が実現される。また、画像処理プログラム204は、単体のプログラムではなく、何らかのプログラムの一部に組込まれて提供されてもよい。このような場合にも、画像処理プログラム204自体には、当該何らかのプログラムにおいて共通に利用されるようなモジュールは含まれず、当該何らかのプログラムと協働して画像処理が実現される。このような一部のモジュールを含まない画像処理プログラム204であっても、本実施の形態に従う画像処理システム1の趣旨を逸脱するものではない。   Such an image processing program 204 implements processing by calling necessary modules among program modules provided as part of an operating system (OS) executed by the personal computer main body 202 at a predetermined timing and order. It may be configured as follows. In this case, the image processing program 204 itself does not include a module provided by the OS, and image processing is realized in cooperation with the OS. Further, the image processing program 204 may be provided by being incorporated in a part of some program instead of a single program. Even in such a case, the image processing program 204 itself does not include a module that is commonly used in the program, and image processing is realized in cooperation with the program. Even such an image processing program 204 that does not include some modules does not depart from the spirit of the image processing system 1 according to the present embodiment.

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

モニター206は、オペレーティングシステム(OS)が提供するGUI画面、画像処理プログラム204によって生成される画像などを表示する。モニター206は、図3に示す画像表示部108と同様に、画像処理プログラム204によって生成されるステレオ画像を用いて、被写体を立体視表示できることが好ましい。この場合、モニター206としては、画像表示部108において説明したのと同様に、パララックスバリア方式やシャ
ッタメガネ方式などの表示デバイスによって構成される。
The monitor 206 displays a GUI screen provided by an operating system (OS), an image generated by the image processing program 204, and the like. As with the image display unit 108 shown in FIG. 3, the monitor 206 is preferably capable of stereoscopically displaying a subject using a stereo image generated by the image processing program 204. In this case, the monitor 206 is configured by a display device such as a parallax barrier method or a shutter glasses method, as described in the image display unit 108.

マウス208およびキーボード210は、それぞれユーザー操作を受付け、その受付けたユーザー操作の内容をパーソナルコンピューター本体202へ出力する。   The mouse 208 and the keyboard 210 each accept a user operation and output the contents of the accepted user operation to the personal computer main body 202.

外部記憶装置212は、何らかの方法で取得された一対の入力画像(入力画像1および入力画像2)を格納しており、この一対の入力画像をパーソナルコンピューター本体202へ出力する。外部記憶装置212としては、フラッシュメモリ、光学ディスク、磁気ディスクなどのデータを不揮発的に記憶するデバイスが用いられる。   The external storage device 212 stores a pair of input images (an input image 1 and an input image 2) obtained by some method, and outputs the pair of input images to the personal computer main body 202. As the external storage device 212, a device that stores data in a nonvolatile manner such as a flash memory, an optical disk, or a magnetic disk is used.

このように、図4に示すパーソナルコンピューター200は、本実施の形態に従う画像処理システム1の一部を単体の装置として実装したものである。このようなパーソナルコンピューター200を用いることで、ユーザーは、任意の撮像部(ステレオカメラ)を用いて異なる視点で被写体を撮像することで取得された一対の入力画像から、当該被写体を立体視表示するためのステレオ画像(左眼用画像および右眼用画像)を生成することができる。さらに、この生成したステレオ画像をモニター206で表示することで、立体視表示を楽しむこともできる。   As described above, personal computer 200 shown in FIG. 4 is obtained by mounting a part of image processing system 1 according to the present embodiment as a single device. By using such a personal computer 200, the user stereoscopically displays the subject from a pair of input images acquired by imaging the subject from different viewpoints using an arbitrary imaging unit (stereo camera). Therefore, a stereo image (a left-eye image and a right-eye image) can be generated. Furthermore, by displaying the generated stereo image on the monitor 206, stereoscopic display can be enjoyed.

[C.実施の形態1]
本発明の実施形態1として、一方の入力画像からステレオ画像(左眼用画像および右眼用画像)を生成する構成について説明する。より具体的には、各フレームの一対の入力画像を用いて視差画像の生成および調整(補正)を行ない、その結果得られた視差画像を用いて一方の入力画像から他方の入力画像を生成する。なお、以下の説明においては、入力画像1を用いて立体視画像(ステレオ画像)を生成する例を示す。すなわち、本実施の形態においては、入力画像1と、入力画像1に対応する補正後の視差画像に従って視差を与えることで生成される画像とを用いて、立体視画像を生成する。
[C. Embodiment 1]
A configuration for generating a stereo image (a left-eye image and a right-eye image) from one input image will be described as Embodiment 1 of the present invention. More specifically, parallax images are generated and adjusted (corrected) using a pair of input images of each frame, and the other input image is generated from one input image using the parallax image obtained as a result. . In the following description, an example in which a stereoscopic image (stereo image) is generated using the input image 1 is shown. That is, in the present embodiment, a stereoscopic image is generated using the input image 1 and an image generated by giving parallax according to the corrected parallax image corresponding to the input image 1.

上述したように、本実施の形態においては、2種類の時間範囲(フレーム間隔)でそれぞれ平滑化処理を行なうことで、体感を残しつつ、よりユーザーへの負担の少ない立体視表示を再現する。   As described above, in the present embodiment, by performing smoothing processing in two types of time ranges (frame intervals), a stereoscopic display with less burden on the user is reproduced while leaving a sensation.

すなわち、立体動画は、再現される視差が大きすぎると見づらく、一方で、小さすぎると立体感が物足りなく見える。そこで、本実施の形態に従う情報処理システムは、例えば、飛出し側に存在する被写体がシーンの途中から撮像された場合には、立体感としての視差情報は残しつつ、その被写体についての飛出し量を徐々に変更するように、全体的な視差調整を行なう。   That is, it is difficult to see the stereoscopic video if the parallax to be reproduced is too large, while if it is too small, the stereoscopic effect looks unsatisfactory. Therefore, the information processing system according to the present embodiment, for example, when a subject existing on the pop-out side is imaged from the middle of the scene, the amount of pop-out for the subject while retaining the parallax information as a stereoscopic effect. The overall parallax adjustment is performed so as to gradually change.

《c1:全体処理手順》
まず、本実施の形態における全体処理手順について説明する。
<< c1: Overall processing procedure >>
First, the overall processing procedure in the present embodiment will be described.

図5は、本発明の実施の形態1に従う全体処理手順を示すフローチャートである。図5を参照して、各フレームの入力画像1および入力画像2が取得される。典型的には、第1カメラ21(レンズ21aおよび撮像素子21b)が被写体を撮像することで入力画像1を生成する。また、第2カメラ22(レンズ22aおよび撮像素子22b)が被写体を撮像することで入力画像2を生成する。すなわち、時間軸に沿って順序付けされた複数の入力画像1と、時間軸に沿って順序付けされた複数の入力画像2とが取得される。   FIG. 5 is a flowchart showing an overall processing procedure according to the first embodiment of the present invention. Referring to FIG. 5, input image 1 and input image 2 of each frame are acquired. Typically, the first camera 21 (the lens 21a and the image sensor 21b) captures the subject and generates the input image 1. The second camera 22 (the lens 22a and the image sensor 22b) captures the subject to generate the input image 2. That is, a plurality of input images 1 ordered along the time axis and a plurality of input images 2 ordered along the time axis are acquired.

まず、入力画像1用の視差画像が各フレームについて生成される(ステップS1)。すなわち、時間軸上の各位置に対応する入力画像1および入力画像2から視差画像が生成される。この視差画像の生成処理は、主として、画像処理部3の対応点探索部31および視
差画像生成部32(図1)によって実行される。
First, a parallax image for the input image 1 is generated for each frame (step S1). That is, a parallax image is generated from the input image 1 and the input image 2 corresponding to each position on the time axis. This parallax image generation processing is mainly executed by the corresponding point search unit 31 and the parallax image generation unit 32 (FIG. 1) of the image processing unit 3.

続いて、生成された各フレームの視差画像に対して、平滑化処理が実行される(ステップS2)。この平滑化処理は、主として、画像処理部3の平滑化処理部33(図1)によって実行される。   Subsequently, a smoothing process is performed on the generated parallax image of each frame (step S2). This smoothing process is mainly executed by the smoothing processing unit 33 (FIG. 1) of the image processing unit 3.

ステップS2の平滑化処理は、各フレームの視差画像内での平滑化(空間平滑化)、短時間範囲にわたる複数フレームの視差画像に対する平滑化(時間平滑化)、および長時間範囲にわたる複数フレームの視差画像に対する平滑化を含む。すなわち、ある時間範囲にわたって複数の視差画像を時間軸方向に平滑化する処理を含む。   The smoothing process in step S2 is performed by smoothing each frame in a parallax image (spatial smoothing), smoothing a parallax image of a plurality of frames over a short time range (time smoothing), and performing a plurality of frames over a long time range. Includes smoothing for parallax images. That is, it includes a process of smoothing a plurality of parallax images in the time axis direction over a certain time range.

続いて、長時間範囲にわたる複数フレームの視差画像に対する平滑化の結果に基づいて、視差全体調整量の調整処理が実行される(ステップS3)。この視差全体調整量の調整処理は、主として、画像処理部3の視差全体調整量決定部34(図1)によって実行される。   Subsequently, based on the result of smoothing the parallax images of a plurality of frames over a long time range, an adjustment process of the overall parallax adjustment amount is executed (step S3). This adjustment process of the overall parallax adjustment amount is mainly executed by the overall parallax adjustment amount determination unit 34 (FIG. 1) of the image processing unit 3.

続いて、各フレームの視差画像内での平滑化(空間平滑化)、および短時間範囲にわたる複数フレームの視差画像に対する平滑化(時間平滑化)によって、生成された視差画像に対して、ステップS3において決定された視差全体調整量に従って、視差を調整する処理が実行される(ステップS4)。この視差調整処理は、主として、画像処理部3の視差調整部35(図1)によって実行される。   Subsequently, step S3 is performed on the generated parallax image by smoothing within the parallax image of each frame (spatial smoothing) and by smoothing the parallax images of a plurality of frames over a short time range (temporal smoothing). The process of adjusting the parallax is executed according to the overall parallax adjustment amount determined in (Step S4). This parallax adjustment processing is mainly executed by the parallax adjustment unit 35 (FIG. 1) of the image processing unit 3.

最終的に、ステップS4において調整された視差画像を用いて、入力画像1からステレオ画像が生成される(ステップS5)。より具体的には、入力画像1は、そのまま左眼用画像として出力され、調整された視差画像を用いて入力画像1に視差を与えることで右眼用画像が出力される。   Finally, a stereo image is generated from the input image 1 using the parallax image adjusted in step S4 (step S5). More specifically, the input image 1 is output as it is as a left-eye image, and the right-eye image is output by giving parallax to the input image 1 using the adjusted parallax image.

この生成されたステレオ画像(各フレームの左眼用画像および右眼用画像)がモニターなどへ出力される。   The generated stereo image (left eye image and right eye image of each frame) is output to a monitor or the like.

以下、各ステップにおける処理について詳述する。
《c2:視差画像生成処理》
ステップS1の視差画像生成処理の詳細について説明する。
Hereinafter, processing in each step will be described in detail.
<< c2: Parallax image generation process >>
Details of the parallax image generation processing in step S1 will be described.

まず、各フレームにおける一対の入力画像(入力画像1および入力画像2)の間の位置関係の対応付けが探索される。この対応点探索処理は、図1に示す対応点探索部31によって実行される。より具体的には、対応点探索処理では、一方の入力画像の注目点にそれぞれ対応する他方の入力画像の画素(座標値)を特定する。このような対応点探索処理は、POC演算法、SAD演算法、SSD演算法、NCC演算法などを用いたマッチング処理が利用される。   First, the correspondence of the positional relationship between a pair of input images (input image 1 and input image 2) in each frame is searched. This corresponding point search processing is executed by the corresponding point search unit 31 shown in FIG. More specifically, in the corresponding point search process, the other input image pixel (coordinate value) corresponding to the target point of one input image is specified. For such a corresponding point search process, a matching process using a POC calculation method, an SAD calculation method, an SSD calculation method, an NCC calculation method, or the like is used.

対応点探索処理においては、一方の入力画像を基準画像に設定するとともに、他方の入力画像を参照画像に設定して、両画像間の対応付けが行なわれる。いずれの入力画像を主体的に用いるかに応じて、この基準画像に設定される入力画像が変更されることになる。   In the corresponding point search process, one input image is set as a reference image, and the other input image is set as a reference image, and the images are associated with each other. Depending on which input image is mainly used, the input image set as the reference image is changed.

続いて、対応点探索処理によって特定された注目点と対応点との間の対応関係に基づいて、被写体の各点の座標に関連付けられた距離情報を示す視差画像を生成するための視差画像生成処理が実行される。この視差画像生成処理は、図1に示す視差画像生成部32によって実行される。この視差画像生成処理では、注目点の各々について、入力画像1の画像座標系における当該注目点の座標と、入力画像2の画像座標系における対応点の座標と
の差(視差)が算出される。
Subsequently, based on the correspondence between the target point identified by the corresponding point search process and the corresponding point, generation of a parallax image for generating a parallax image indicating distance information associated with the coordinates of each point of the subject Processing is executed. This parallax image generation processing is executed by the parallax image generation unit 32 shown in FIG. In this parallax image generation process, for each point of interest, the difference (parallax) between the coordinates of the point of interest in the image coordinate system of the input image 1 and the coordinates of the corresponding point in the image coordinate system of the input image 2 is calculated. .

本実施の形態においては、入力画像1が主体的に用いられるので、対応する入力画像1の注目点の座標に関連付けて算出される視差が記憶される。なお、入力画像2を主体的に用いる場合には、対応する入力画像2の注目点の座標に関連付けて算出される視差が記憶されてもよい。距離情報としては、対応点探索処理によって探索されたそれぞれの注目点について、入力画像1または入力画像2上の座標および対応する視差が関連付けられる。この距離情報を入力画像1または入力画像2の画素配列に対応付けて配列することで、入力画像1または入力画像2の画像座標系に対応して各点の視差を表す視差画像が生成される。   In the present embodiment, since the input image 1 is mainly used, the parallax calculated in association with the coordinates of the target point of the corresponding input image 1 is stored. Note that, when the input image 2 is mainly used, parallax calculated in association with the coordinates of the target point of the corresponding input image 2 may be stored. As the distance information, the coordinates on the input image 1 or the input image 2 and the corresponding parallax are associated with each attention point searched by the corresponding point search process. By arranging this distance information in association with the pixel arrangement of the input image 1 or the input image 2, a parallax image representing the parallax of each point is generated corresponding to the image coordinate system of the input image 1 or the input image 2. .

なお、このような対応点探索処理および視差画像生成処理としては、特開2008−216127号公報に記載された方法を採用してもよい。特開2008−216127号公報には、サブピクセルの粒度で視差(距離情報)を算出するための方法が開示されているが、ピクセルの粒度で視差(距離情報)を算出するようにしてもよい。   In addition, as such a corresponding point search process and a parallax image generation process, you may employ | adopt the method described in Unexamined-Japanese-Patent No. 2008-216127. Japanese Patent Laid-Open No. 2008-216127 discloses a method for calculating parallax (distance information) with subpixel granularity, but parallax (distance information) may be calculated with pixel granularity. .

なお、入力画像がRGBなどのカラー画像である場合には、グレイ画像に変換した後に対応点探索処理を行なってもよい。   When the input image is a color image such as RGB, the corresponding point search process may be performed after conversion to a gray image.

図6は、図1に示す撮像部2によって撮像されたあるフレームにおける入力画像の一例を示す図である。図6(A)は、第1カメラ21によって撮像された入力画像1を示し、図6(B)は、第2カメラ22によって撮像された入力画像2を示す。図6に示す例は、レンズを横方向に所定間隔だけ離して2つ配置した構成において撮像したものである。   FIG. 6 is a diagram illustrating an example of an input image in a certain frame imaged by the imaging unit 2 illustrated in FIG. 1. 6A shows the input image 1 captured by the first camera 21, and FIG. 6B shows the input image 2 captured by the second camera 22. The example shown in FIG. 6 is taken in a configuration in which two lenses are arranged at a predetermined interval in the lateral direction.

図7は、実施の形態1に従う画像処理方法に従って図6に示す一対の入力画像から生成された視差画像の一例を示す図である。この例では、図6(A)に示す入力画像1を基準画像に設定し、図6(B)に示す入力画像2を参照画像に設定した場合の視差画像(距離画像)の一例を示す。   FIG. 7 is a diagram showing an example of the parallax image generated from the pair of input images shown in FIG. 6 according to the image processing method according to the first embodiment. In this example, an example of a parallax image (distance image) when the input image 1 shown in FIG. 6A is set as a standard image and the input image 2 shown in FIG. 6B is set as a reference image is shown.

図7に示すように、入力画像1の各点の各点に関連付けられた視差(距離情報)の大きさは、対応する点の濃淡によって表現される。   As shown in FIG. 7, the magnitude of the parallax (distance information) associated with each point of the input image 1 is expressed by the shade of the corresponding point.

上述した対応点探索処理および視差画像生成処理において、相関演算を行なうことで注目点およびその対応点を特定するので、所定の画素サイズを有する単位領域毎に対応点が探索される。図7には、48画素×48画素の単位領域毎に対応点探索が実行された一例を示す。すなわち、図7には、X軸(横方向)およびY軸(縦方向)のいずれも48画素間隔で規定された単位領域毎に対応点が探索され、その探索された対応点との間の距離の算出結果を示す。この探索された対応点との間の距離を示す視差画像は、入力画像の画素サイズと一致するように生成される。   In the above-described corresponding point search process and parallax image generation process, the attention point and the corresponding point are specified by performing a correlation calculation, and therefore the corresponding point is searched for each unit region having a predetermined pixel size. FIG. 7 shows an example in which the corresponding point search is executed for each unit region of 48 pixels × 48 pixels. That is, in FIG. 7, both the X axis (horizontal direction) and the Y axis (vertical direction) are searched for corresponding points for each unit region defined by a 48-pixel interval, and between the searched corresponding points. The calculation result of distance is shown. The parallax image indicating the distance between the searched corresponding points is generated so as to match the pixel size of the input image.

なお、入力画像の最外周にある48画素分の領域(探索ウィンドウ)については、対応点が存在しないと誤って判断される可能性があるため、対応点探索処理を行なわず、最も近接した位置にある画素の距離(視差)データで代用した。すなわち、入力画像の最外周にある48画素分の領域については、最外周から48画素だけ内側に入った位置にある画素の値を用いた。   Note that the region corresponding to 48 pixels (search window) on the outermost periphery of the input image may be erroneously determined that there is no corresponding point, so the corresponding point search process is not performed and the closest position is determined. The pixel distance (parallax) data is used instead. That is, for the region for 48 pixels at the outermost periphery of the input image, the value of the pixel at the position inside 48 pixels from the outermost periphery is used.

《c3:平滑化処理》
次に、ステップS2の平滑化処理の詳細について説明する。上述したように、本実施の形態において、平滑化処理は、(1)各フレームの視差画像内での平滑化(空間平滑化)、(2)短時間範囲にわたる複数フレームの視差画像に対する平滑化(時間平滑化)、(
3)長時間範囲にわたる複数フレームの視差画像に対する平滑化を含む。以下、それぞれの平滑化の内容について説明する。
<< c3: Smoothing process >>
Next, details of the smoothing process in step S2 will be described. As described above, in the present embodiment, the smoothing processing is performed by (1) smoothing within the parallax image of each frame (spatial smoothing) and (2) smoothing of the parallax images of a plurality of frames over a short time range. (Time smoothing), (
3) It includes smoothing for parallax images of multiple frames over a long time range. Hereinafter, the content of each smoothing is demonstrated.

(c3.1:各フレームの視差画像内での平滑化(空間平滑化))
まず、各フレームの視差画像に対して、空間平滑化が行なわれる。このような空間的な平滑化処理の具現化例として、所定サイズの二次元フィルタを用いる方法がある。
(C3.1: Smoothing within the parallax image of each frame (spatial smoothing))
First, spatial smoothing is performed on the parallax image of each frame. As an embodiment of such a spatial smoothing process, there is a method using a two-dimensional filter of a predetermined size.

図8は、本発明の実施の形態1に従う空間的な平滑化処理に用いられる平均化フィルタの一例を示す図である。この空間的な平滑化処理では、例えば、図8に示すような145画素×145画素の平均化フィルタが適用される。平均化フィルタでは、注目画素を中心とする縦方向145画素および横方向145画素の範囲に含まれる視差画像の画素値(視差)の平均値が当該注目画素の新たな画素値として算出される。より具体的には、フィルタ内に含まれる画素が有する画素値の総和をフィルタの画素サイズで除算することで、注目画素の新たな画素値が算出される。   FIG. 8 is a diagram showing an example of the averaging filter used for the spatial smoothing process according to the first embodiment of the present invention. In this spatial smoothing process, for example, an averaging filter of 145 pixels × 145 pixels as shown in FIG. 8 is applied. In the averaging filter, an average value of the pixel values (parallax) of the parallax images included in the range of the vertical direction 145 pixels and the horizontal direction 145 pixels centered on the target pixel is calculated as a new pixel value of the target pixel. More specifically, a new pixel value of the pixel of interest is calculated by dividing the sum of the pixel values of the pixels included in the filter by the pixel size of the filter.

なお、フィルタ内に含まれるすべての画素の操作をとるのではなく、所定間隔毎(例えば、12画素)に間引いて抽出した画素の平均値を用いてもよい。このような間引き処理を行なった場合であっても、全画素の平均値を用いた場合と同様の平滑化結果が得られる場合があり、そのような場合には、間引き処理を行なうことで処理量を低減できる。   Instead of taking the operation of all the pixels included in the filter, an average value of pixels extracted by thinning out at predetermined intervals (for example, 12 pixels) may be used. Even when such a thinning process is performed, a smoothing result similar to the case where the average value of all pixels is used may be obtained. In such a case, the processing is performed by performing the thinning process. The amount can be reduced.

さらに、空間平滑化については、注目画素に重みを付けた平均化フィルタやメディアンフィルタといった異なる手段を採用してもよい。平滑化によって得られた視差画像のレベルを適切化するため、平滑化に用いるフレーム数も含めて、フィルタサイズなどを調整してもよい。   Further, for spatial smoothing, different means such as an averaging filter or a median filter in which the pixel of interest is weighted may be employed. In order to optimize the level of the parallax image obtained by smoothing, the filter size and the like may be adjusted including the number of frames used for smoothing.

なお、平滑化処理によって得られた視差画像の画素サイズは、入力画像と同一の画素サイズであることが好ましい。画素サイズを同一にすることで、後述するステレオ画像の生成処理において、各画素の距離を一対一で決定することができる。   Note that the pixel size of the parallax image obtained by the smoothing process is preferably the same pixel size as the input image. By making the pixel sizes the same, it is possible to determine the distance of each pixel on a one-to-one basis in a stereo image generation process described later.

(c3.2:時間的な平滑化)
図9は、本発明の実施の形態1に従う時間的な平滑化処理を説明するための図である。図9を参照して、本実施の形態においては、2種類の時間範囲でそれぞれ視差画像を平滑化した結果を用いる。
(C3.2: temporal smoothing)
FIG. 9 is a diagram for explaining temporal smoothing processing according to the first embodiment of the present invention. Referring to FIG. 9, in the present embodiment, results obtained by smoothing parallax images in two types of time ranges are used.

より具体的には、ある処理対象フレームを含む長時間範囲(Aフレーム分)について、その範囲に含まれる各フレームの視差画像における視差の最大値(MAX)および視差の最小値(MIN)が平滑化される。すなわち、Aフレーム分の視差画像の各々について、視差の最大値および最小値がそれぞれ抽出され、続いて、抽出されたすべての最大値の間で平均値が算出されるとともに、抽出されたすべての最小値の間で平均値が算出される。この算出された視差の最大値および最小値の平均値は、処理対象フレームに関連付けて一時的に記憶される。この視差の最大値および最小値の平均値は、視差全体調整量の決定に用いられる。   More specifically, for a long time range (A frame) including a certain processing target frame, the parallax maximum value (MAX) and the parallax minimum value (MIN) in the parallax image of each frame included in the range are smooth. It becomes. That is, for each of the parallax images for A frames, the maximum value and the minimum value of the parallax are respectively extracted, and then an average value is calculated between all the extracted maximum values, and all the extracted An average value is calculated between the minimum values. The calculated average value of the maximum value and the minimum value of the parallax is temporarily stored in association with the processing target frame. The average value of the maximum value and the minimum value of the parallax is used to determine the overall parallax adjustment amount.

また、ある処理対象フレームを含む短時間範囲(Bフレーム分)について、その範囲に含まれる複数フレームの視差画像の間で平滑化される。すなわち、視差画像を構成する各画素について、対応する画素位置についての複数の視差画像における視差量の平均値が算出される。言い換えれば、時間軸方向にも前後の所定フレーム分の各画素値を加算し平均を取ることで平滑化される。この短時間範囲での平滑化処理は、視差画像に生じるノイズなどを除去するために行われるものである。すなわち、局所的な視差の時間変化については、可能な限り視差画像に反映することが好ましいので、短時間範囲のフレーム数は、そ
のような意図に基づいて設定される。
Further, a short time range (for B frames) including a certain processing target frame is smoothed between parallax images of a plurality of frames included in the range. That is, for each pixel constituting the parallax image, the average value of the parallax amounts in the plurality of parallax images for the corresponding pixel position is calculated. In other words, smoothing is performed by adding and averaging the pixel values of predetermined frames before and after in the time axis direction. This smoothing process in a short time range is performed in order to remove noise generated in the parallax image. That is, it is preferable to reflect local parallax temporal changes in the parallax image as much as possible, so the number of frames in the short-time range is set based on such intention.

平滑化処理の高速化のため、例えば、6フレームごとに間引いて平滑化してもよい。
図9に示す長時間範囲(Aフレーム分)にわたる平滑化については、実験的には、10秒以上であることが好ましい。例えば、1秒間に30フレームが更新されるような場合には、長時間範囲としては、処理対象のフレームを含めて、計1081フレーム(36秒)などに設定できる。また、長時間範囲(Bフレーム分)にわたる平滑化については、実験的には、10秒以下であることが好ましい。より好ましくは、5秒以下である。例えば、1秒間に30フレームが更新されるような場合には、短時間範囲としては、処理対象のフレームを含めて、計61フレーム(2秒)などに設定できる。
In order to speed up the smoothing process, for example, thinning may be performed every 6 frames.
The smoothing over a long time range (A frame) shown in FIG. 9 is preferably 10 seconds or more experimentally. For example, when 30 frames are updated per second, the long time range can be set to a total of 1081 frames (36 seconds) including the frames to be processed. Further, the smoothing over a long range (for B frames) is preferably 10 seconds or less experimentally. More preferably, it is 5 seconds or less. For example, when 30 frames are updated per second, the short time range can be set to a total of 61 frames (2 seconds) including the frames to be processed.

なお、フレームレートが異なる場合には、時間範囲の長さ必要なフレーム数を算出すればよい。   When the frame rates are different, the number of frames required for the length of the time range may be calculated.

このように、ステップS2の平滑化処理は、長時間範囲(Aフレーム分)とは異なる短時間範囲(Bフレーム分)にわたって複数の視差画像を時間軸方向に平滑化する処理を含む。   As described above, the smoothing process in step S2 includes a process of smoothing a plurality of parallax images in the time axis direction over a short time range (for B frames) different from the long time range (for A frames).

図10は、図7に示す視差画像に対して空間的および時間的な平滑化処理によって得られた平滑化された視差画像の一例を示す図である。図10に示す平滑化された視差画像では、隣接する画素間で画素値(視差)が大きく変化しないようになっていることがわかる。   FIG. 10 is a diagram illustrating an example of the smoothed parallax image obtained by the spatial and temporal smoothing processing on the parallax image illustrated in FIG. 7. In the smoothed parallax image shown in FIG. 10, it can be seen that the pixel value (parallax) does not change greatly between adjacent pixels.

長時間範囲(Aフレーム分)にわたる平滑化によって得られる結果の利用形態については、後述する。   The usage form of the result obtained by smoothing over a long time range (A frame) will be described later.

さらに、時間平滑化についても、処理対象のフレームに重みを付けた平均化や、中央値での置き換えといった異なる手段を採用してもよい。平滑化によって得られた視差画像のレベルを適切化するため、平滑化に用いるフレーム数も含めて調整してもよい。   Further, for time smoothing, different means such as averaging with weights applied to frames to be processed and replacement with median values may be employed. In order to optimize the level of the parallax image obtained by smoothing, the number of frames used for smoothing may be adjusted.

《c4:視差全体調整量決定処理》
次に、ステップS3の視差全体調整量決定処理の詳細について説明する。視差全体調整量は、図9に示す長時間範囲(Aフレーム分)にわたる平滑化の結果に基づいて決定される。すなわち、処理対象フレームを含む長時間範囲(Aフレーム分)における、視差の最大値(MAX)の平均値(AVE_MAX)および視差の最小値(MIN)の平均値(AVE_MIN)が用いられる。より具体的には、平均値AVE_MAXおよびAVE_MINは、図9に示すように、長時間範囲(この例では、前後1081フレーム分)の最大値(MAX)および最小値(MIN)の総和を平均化(平滑化)することで得られる値である。
<< c4: Overall parallax adjustment amount determination process >>
Next, details of the overall parallax adjustment amount determination process in step S3 will be described. The overall parallax adjustment amount is determined based on the result of smoothing over a long time range (A frame) shown in FIG. That is, the average value (AVE_MAX) of the maximum parallax value (MAX) and the average value (AVE_MIN) of the minimum parallax value (MIN) in the long-time range (A frame) including the processing target frame are used. More specifically, the average values AVE_MAX and AVE_MIN are obtained by averaging the sum of the maximum value (MAX) and the minimum value (MIN) in the long-time range (in this example, for 1081 frames before and after) as shown in FIG. It is a value obtained by (smoothing).

この視差全体調整量は、より快適な視差量で立体視表示できるように、視差を調整するものである。本実施の形態においては、視差全体調整量として、飛出し側の視差の大きさ、飛出し側の視差と奥行き側の視差との間の視差レンジ、および視差画像に生じる視差位置(あるいは、位置のオフセット)を含む。   This overall parallax adjustment amount is for adjusting the parallax so that stereoscopic display can be performed with a more comfortable parallax amount. In the present embodiment, as the overall parallax adjustment amount, the magnitude of the parallax on the flyout side, the parallax range between the parallax on the flyout side and the parallax on the depth side, and the parallax position (or position) generated in the parallax image Offset).

図11は、本発明の実施の形態1に従う視差全体調整量決定処理を説明するための図である。図11を参照して、平滑化処理後の視差画像の画素値(視差量)が予め定められた視差レンジ(ターゲット視差レンジ)内に存在するように、スケーリングを行なう。すなわち、図11に示す視差調整関数の傾きおよび視差オフセットが決定される。   FIG. 11 is a diagram for explaining the overall parallax adjustment amount determination process according to the first embodiment of the present invention. Referring to FIG. 11, scaling is performed so that the pixel value (parallax amount) of the parallax image after the smoothing process is within a predetermined parallax range (target parallax range). That is, the inclination and the parallax offset of the parallax adjustment function shown in FIG. 11 are determined.

視差レンジ(ターゲット視差レンジ)は、飛出し側の視差と奥行き側の視差との差に相当する。ターゲット視差レンジrは、入力画像の横幅を基準として経験的に決定される。このとき、飛出し側の許容値および奥行き側の許容値についても経験的に決定される。   The parallax range (target parallax range) corresponds to the difference between the parallax on the flyout side and the parallax on the depth side. The target parallax range r is determined empirically based on the width of the input image. At this time, the allowable value on the flying side and the allowable value on the depth side are also determined empirically.

このターゲット視差レンジrは、動的に決定してもよいし、予め設定された固定値を用いるようにしてもよい。例えば、例えば、1280画素×760画素の入力画像であれば、経験的に決定された値「22」を用いて、以下のように算出される。   The target parallax range r may be determined dynamically or a fixed value set in advance may be used. For example, for an input image of 1280 pixels × 760 pixels, for example, the value “22” determined empirically is used to calculate as follows.

ターゲット視差レンジr=画像横サイズ/22=1280/22=58
そして、最も飛出している状態の視差と最も奥行き側にある状態の視差との差が、ターゲット視差レンジrになるように、視差調整関数の傾きである視差増減係数cと、視差調整関数の切片である視差オフセットoとが算出される。より具体的には、視差の最大値の平均値(AVE_MAX)および視差の最小値の平均値(AVE_MIN)を用いて、以下の式に従って、視差増減係数cおよび視差オフセットoが算出される。
Target parallax range r = horizontal image size / 22 = 1280/22 = 58
Then, the parallax increase / decrease coefficient c, which is the inclination of the parallax adjustment function, and the parallax adjustment function so that the difference between the parallax in the most projected state and the parallax in the deepest side is the target parallax range r. A parallax offset o that is an intercept is calculated. More specifically, the parallax increase / decrease coefficient c and the parallax offset o are calculated according to the following equations using the average value of the maximum parallax value (AVE_MAX) and the average value of the minimum parallax value (AVE_MIN).

視差増減係数c=ターゲット視差レンジr/(平均値AVE_MAX−平均値AVE_MIN)
視差オフセットo=(平均値AVE_MAX+平均値AVE_MIN)/2
調整後視差(距離)量=視差増減係数c×(調整前視差(距離)量−視差オフセットo)
例えば、飛出し側の許容値が「29.0」で、奥行き側の許容値が「−29.0」であり、かつ、視差の最大値の平均値(AVE_MAX)が「12.7」であり、視差の最小値の平均値(AVE_MIN)が「−14.56」であった場合には、視差増減係数cは「2.13」と算出され、視差オフセットoは「−0.93」と算出される。
Parallax increase / decrease coefficient c = target parallax range r / (average value AVE_MAX−average value AVE_MIN)
Parallax offset o = (average value AVE_MAX + average value AVE_MIN) / 2
Post-adjustment parallax (distance) amount = parallax increase / decrease coefficient c × (pre-adjustment parallax (distance) amount−parallax offset o)
For example, the allowable value on the fly-out side is “29.0”, the allowable value on the depth side is “−29.0”, and the average value (AVE_MAX) of the maximum parallax value is “12.7”. When the average value (AVE_MIN) of the minimum parallax is “−14.56”, the parallax increase / decrease coefficient c is calculated as “2.13”, and the parallax offset o is “−0.93”. Is calculated.

以上のように、ステップS3の視差全体調整量決定処理は、長時間範囲(Aフレーム分)に存在する処理対象フレームの視差画像について、飛出し側の視差の大きさを、長時間範囲(Aフレーム分)にわたって平滑化した結果に応じた値に補正する処理を含む。また、ステップS3の視差全体調整量決定処理は、長時間範囲(Aフレーム分)に存在する視差画像について、飛出し側の視差と奥行き側の視差との間の視差レンジを、長時間範囲(Aフレーム分)にわたって平滑化した結果に応じた値に制限する処理を含む。   As described above, the overall parallax adjustment amount determination process in step S3 is performed by setting the size of the parallax on the fly-out side for the long time range (A) for the parallax image of the processing target frame existing in the long time range (A frame). And a process of correcting to a value corresponding to the result of smoothing over the frame). Also, the overall parallax adjustment amount determination process in step S3 is performed on the parallax range between the projection-side parallax and the depth-side parallax with respect to the parallax image existing in the long-time range (A frame). A process of limiting to a value corresponding to the result of smoothing over A frame).

そして、視差全体調整量決定処理は、視差画像に生じる視差の時間軸に沿った変化量である視差増減係数を決定する処理、および、視差画像に生じる視差位置のオフセットを決定する処理を含む。また、視差全体調整量決定処理では、長時間範囲(Aフレーム分)にわたって平滑化した結果に応じて、視差の最小値を制限する。   The overall parallax adjustment amount determination process includes a process for determining a parallax increase / decrease coefficient that is a change amount along the time axis of the parallax generated in the parallax image, and a process for determining an offset of the parallax position generated in the parallax image. In the overall parallax adjustment amount determination process, the minimum parallax value is limited according to the result of smoothing over a long time range (for A frame).

《c5:視差調整処理》
次に、ステップS4の視差調整処理の詳細について説明する。上述のように、視差全体調整量が決定されると、図11に示される視差調整関数に従って、処理対象のフレームについての視差画像に対して視差調整処理が行われる。すなわち、視差画像を構成する各画素の画素値(調整前視差量)が視差調整関数に入力され、その出力値が調整後視差量として決定される。
<< c5: Parallax adjustment processing >>
Next, details of the parallax adjustment processing in step S4 will be described. As described above, when the overall parallax adjustment amount is determined, the parallax adjustment processing is performed on the parallax image for the processing target frame in accordance with the parallax adjustment function illustrated in FIG. 11. That is, the pixel value (pre-adjustment parallax amount) of each pixel constituting the parallax image is input to the parallax adjustment function, and the output value is determined as the post-adjustment parallax amount.

図12は、図10に示す平滑化後の視差画像に対して視差調整された視差画像の一例を示す図である。   FIG. 12 is a diagram illustrating an example of a parallax image that has been parallax adjusted with respect to the parallax image after smoothing illustrated in FIG. 10.

以上のように、ステップS4の視差調整処理は、長時間範囲(Aフレーム分)にわたって平滑化した結果、および、短時間範囲(Bフレーム分)にわたる平滑化により得られた視差画像に基づいて、視差画像を補正する処理を含む。   As described above, the parallax adjustment processing in step S4 is based on the result of smoothing over a long time range (for A frame) and the parallax image obtained by smoothing over a short time range (for B frame). Including a process of correcting the parallax image.

《c6:立体視画像生成処理》
次に、ステップS5の立体視画像生成処理の詳細について説明する。上述のように、平滑化処理および視差調整処理によって各フレームにおける視差画像が生成されると、立体視画像が生成される。
<< c6: Stereoscopic image generation process >>
Next, details of the stereoscopic image generation processing in step S5 will be described. As described above, when a parallax image in each frame is generated by the smoothing process and the parallax adjustment process, a stereoscopic image is generated.

本実施の形態においては、一例として、入力画像1をそのまま左眼用画像として用いるとともに、入力画像1に視差画像に基づいて視差を与えることで右眼用画像を生成する。より具体的には、入力画像1の各画素を、視差画像の対応する画素の座標値(距離、視差)に応じて位置をずらすことで、右眼用画像が生成される。   In the present embodiment, as an example, the input image 1 is used as it is as a left-eye image, and a right-eye image is generated by giving parallax to the input image 1 based on the parallax image. More specifically, the right-eye image is generated by shifting the position of each pixel of the input image 1 according to the coordinate value (distance, parallax) of the corresponding pixel of the parallax image.

被写体を立体視表示するためには、左眼用画像および右眼用画像との間で、対応する画素が指定された距離(視差)だけ離れていればよいので、入力画像から左眼用画像および右眼用画像をそれぞれ生成してもよい。   In order to stereoscopically display the subject, it is only necessary that the corresponding pixels be separated by a specified distance (parallax) between the left-eye image and the right-eye image. And right eye images may be generated.

図13は、本発明の実施の形態1に従う立体視画像生成処理を説明するための図である。図13には、入力画像1を主体的に用いる場合の処理例を示す。図14は、図13に示す立体視画像生成処理の処理手順を示すフローチャートである。   FIG. 13 is a diagram for describing a stereoscopic image generation process according to the first embodiment of the present invention. FIG. 13 shows a processing example when the input image 1 is used proactively. FIG. 14 is a flowchart showing a processing procedure of the stereoscopic image generation processing shown in FIG.

図13を参照して、立体視画像生成処理においては、視差画像に基づいて、主体的に用いられる入力画像から各フレームのステレオ画像(左眼用画像および右眼用画像)が生成される。   Referring to FIG. 13, in the stereoscopic image generation process, a stereo image (left-eye image and right-eye image) of each frame is generated from an input image that is mainly used based on a parallax image.

より具体的には、主体的に用いられる入力画像を構成するライン単位で画素の位置をずらすことで、他方の右眼用画像または左眼用画像が生成される。図13には、入力画像1をそのまま左眼用画像として用いるとともに、入力画像1から右眼用画像を生成する例を示す。図13には、左眼用画像として用いる入力画像1のあるラインについて、画素位置(座標)が「101」,「102」,・・・,「110」である10個の画素が示されている。各画素位置に対応する距離(視差)がそれぞれ「40」,「40」,「41」,「41」,「41」,「42」,「42」,「41」,「40」,「40」であるとする。これらの情報を用いて、各画素について、ずらし後の画素位置(右眼用画像における座標)が算出される。より具体的には、(ずらし後の画素位置)=(左眼用画像における座標)−(対応する距離(視差))に従って、1ライン分の各画素についてのずらし後の画素位置が算出される。   More specifically, the other right-eye image or left-eye image is generated by shifting the pixel position in units of lines constituting the input image that is used mainly. FIG. 13 shows an example in which the input image 1 is used as it is as the left-eye image and a right-eye image is generated from the input image 1. FIG. 13 shows 10 pixels whose pixel positions (coordinates) are “101”, “102”,..., “110” for a line of the input image 1 used as the left-eye image. Yes. The distance (parallax) corresponding to each pixel position is “40”, “40”, “41”, “41”, “41”, “42”, “42”, “41”, “40”, “40”, respectively. ”. Using these pieces of information, the shifted pixel position (coordinates in the right-eye image) is calculated for each pixel. More specifically, the pixel position after shifting for each pixel for one line is calculated according to (pixel position after shifting) = (coordinates in the image for the left eye) − (corresponding distance (parallax)). .

そして、それぞれの画素値と対応するずらし後の画素位置とに基づいて、右眼用画像の対応する1ライン分の画像が生成される。このとき、距離(視差)の値によっては、対応する画素が存在しない場合がある。図13に示す例では、右眼用画像の画素位置「66」および「68」の画素の情報が存在しない。このような場合には、隣接する画素からの情報を用いて、不足する画素の画素値が補間される。   Then, a corresponding one line image of the right-eye image is generated based on each pixel value and the corresponding shifted pixel position. At this time, there may be no corresponding pixel depending on the value of the distance (parallax). In the example illustrated in FIG. 13, there is no information on the pixels at the pixel positions “66” and “68” of the right-eye image. In such a case, the pixel values of the deficient pixels are interpolated using information from adjacent pixels.

このような処理を入力画像に含まれるすべてのライン分だけ繰り返すことで、右眼用画像が生成される。   By repeating such processing for all lines included in the input image, the right-eye image is generated.

なお、この画素位置をずらす方向は、視差を生じさせるべき方向であり、具体的には、ユーザーに向けて表示した場合に、水平方向となる方向に相当する。   Note that the direction in which the pixel position is shifted is a direction in which parallax should be generated, and specifically corresponds to a direction that becomes the horizontal direction when displayed toward the user.

このような処理手順を示すと、図14のようになる。すなわち、図14を参照して、3D画像生成部36(図1)は、入力画像1の1ライン分の画素について、それぞれのずらし後の画素位置を算出する(ステップS3601)。続いて、3D画像生成部36は、ス
テップS1において算出されたずらし後の画素位置から1ライン分の画像(右眼用画像)を生成する(ステップS3602)。
Such a processing procedure is shown in FIG. That is, with reference to FIG. 14, the 3D image generation unit 36 (FIG. 1) calculates each shifted pixel position for one line of pixels of the input image 1 (step S <b> 3601). Subsequently, the 3D image generation unit 36 generates an image for one line (right eye image) from the shifted pixel position calculated in step S1 (step S3602).

その後、3D画像生成部36(図1)は、入力画像に処理を行なっていないラインが存在するか否かを判断する(ステップS3603)。入力画像に処理を行なっていないラインが存在していれば(ステップS3603においてYES)、次のラインが選択され、ステップS3601およびS1402の処理が繰り返される。   Thereafter, the 3D image generation unit 36 (FIG. 1) determines whether or not there is an unprocessed line in the input image (step S3603). If there is an unprocessed line in the input image (YES in step S3603), the next line is selected, and the processes in steps S3601 and S1402 are repeated.

入力画像のすべてのラインについて処理が完了していれば(ステップS3603においてNO)、3D画像生成部36は、入力画像1(左眼用画像)とともに、生成した右眼用画像を出力する。そして、処理は終了する。   If the processing has been completed for all lines of the input image (NO in step S3603), the 3D image generation unit 36 outputs the generated right-eye image together with the input image 1 (left-eye image). Then, the process ends.

図13および図14には、入力画像1が出力画像として決定された場合、すなわち入力画像1が主体的に用いられる場合の処理について説明したが、入力画像2が出力画像として決定された場合、すなわち入力画像2が主体的に用いられる場合の処理についても同様である。但し、上述の対応点探索処理においては、基準画像と参照画像との関係が入れ替わる。   13 and 14 describe the processing when the input image 1 is determined as the output image, that is, when the input image 1 is mainly used. However, when the input image 2 is determined as the output image, That is, the same applies to the processing when the input image 2 is mainly used. However, in the above-described corresponding point search process, the relationship between the base image and the reference image is switched.

図15は、図6に示す入力画像1および入力画像2を用いて生成されたステレオ画像の一例を示す図である。   FIG. 15 is a diagram illustrating an example of a stereo image generated using the input image 1 and the input image 2 illustrated in FIG. 6.

以上のように、ステップS5の立体視画像生成処理は、フレーム毎の入力画像1と、当該フレーム毎の入力画像1にそれぞれ対応する補正後の視差画像に従って視差を与えることで生成される複数の画像とを用いて、立体視画像を生成する処理を含む。   As described above, the stereoscopic image generation processing in step S5 is performed by giving parallax according to the input image 1 for each frame and the corrected parallax image corresponding to the input image 1 for each frame. And a process of generating a stereoscopic image using the image.

《c7:適用例》
上述した本実施の形態に従う画像処理方法の適用例について説明する。
<< c7: Application example >>
An application example of the image processing method according to the above-described embodiment will be described.

図16は、本発明の実施の形態1に従う画像処理方法の適用例を示す図である。図17は、図16に示す適用例に対応する各パラメータの時間的変化を示す図である。   FIG. 16 is a diagram showing an application example of the image processing method according to the first embodiment of the present invention. FIG. 17 is a diagram showing temporal changes in parameters corresponding to the application example shown in FIG.

図16(A)〜(C)の(1)入力画像に示すように、撮像部2を固定して、道路を走行する車両を所定期間にわたって撮像した場合を考える。このような状況では、遠景側にある建物と近景側を通過する車両との関係で、視差量は、比較的頻繁に変化する。すなわち、撮像部2の近くを物体(車両)が通過するときには、図16(A)〜(C)の(2)視差画像に現れるように、当該物体に対応する位置の視差量が相対的に大きくなることがわかる。   As shown in (1) input images in FIGS. 16A to 16C, consider a case where the imaging unit 2 is fixed and a vehicle traveling on a road is imaged over a predetermined period. In such a situation, the amount of parallax changes relatively frequently due to the relationship between the building on the far side and the vehicle passing on the near side. That is, when an object (vehicle) passes near the imaging unit 2, the amount of parallax at the position corresponding to the object is relatively large, as shown in (2) parallax images in FIGS. You can see it grows.

これに対して、図16(A)〜(C)の(3)視差調整後の視差画像に示すように、本実施の形態に従う平滑化処理および視差調整処理を行なうことで、画像全体としての視差の変化を緩やかに維持しつつ、車両の通過に相当する視差の変化の情報を反映した視差画像を生成できる。   On the other hand, as shown in (3) parallax images after parallax adjustment in FIGS. 16A to 16C, smoothing processing and parallax adjustment processing according to the present embodiment are performed, so that the entire image is obtained. A parallax image reflecting information on the parallax change corresponding to the passage of the vehicle can be generated while the parallax change is gently maintained.

図17(A)に示すように、長時間範囲にわたる平滑化を行なうことによって、入力画像から生成される視差画像における視差の最大値および最小値(太実線)は、比較的大きく変動しているが、視差調整後の視差画像における視差の最大値および最小値(細実線)の変動は、比較的緩やかに抑えられている。そして、視差調整後の視差画像における視差は、予め定められた視差レンジ(ターゲット視差レンジ)(太破線)内になるように調整される。   As shown in FIG. 17A, by performing smoothing over a long time range, the parallax maximum value and minimum value (thick solid line) in the parallax image generated from the input image vary relatively greatly. However, fluctuations in the parallax maximum value and the minimum value (thin solid line) in the parallax image after parallax adjustment are suppressed relatively moderately. Then, the parallax in the parallax image after parallax adjustment is adjusted to be within a predetermined parallax range (target parallax range) (thick broken line).

図17(A)の楕円破線の部分が図16に示す車両が通過した期間を示す。このように、被写体の動きによって、視差画像に含まれる視差が急激に変化しているところであっても、長時間範囲にわたって平滑化されているため、この視差の急激な変化に合わせて、出力されるステレオ画像の視差が急激に増減することはない。そのため、立体視表示される動画の全体的な視差が急激に変化することによる違和感は生じない。このことは、図17(B)に示す視差増減係数cおよび図17(C)に示す視差オフセットoの値が、大きくは変動していないことからもわかる。   A portion indicated by an elliptical broken line in FIG. 17A indicates a period during which the vehicle shown in FIG. 16 passes. In this way, even if the parallax included in the parallax image is changing suddenly due to the movement of the subject, the parallax is smoothed over a long period of time, so that it is output in accordance with the sudden change in parallax. The parallax of the stereo image does not increase or decrease rapidly. Therefore, there is no sense of incongruity due to a sudden change in the overall parallax of a stereoscopically displayed video. This can also be seen from the fact that the values of the parallax increase / decrease coefficient c shown in FIG. 17B and the parallax offset o shown in FIG.

一方で、図16(C)に示すように、視差画像を短時間範囲にわたって平滑化することで、各フレームにおける視差情報(立体感の情報)は残ったままとなり、各フレームにおける適切な立体視を提供できる。   On the other hand, as shown in FIG. 16C, by smoothing the parallax image over a short time range, the parallax information (stereoscopic information) in each frame remains, and appropriate stereoscopic vision in each frame remains. Can provide.

なお、撮像部2の向きを動かして、例えば近くの電柱がずっと撮像され続けられた場合などには、長時間範囲にわたって平滑化されるとしても、その変化が反映されるため、その飛出した視差(電柱)が徐々に奥側に抑えられることになる。   In addition, when the direction of the imaging unit 2 is moved, for example, when a nearby utility pole is continuously imaged, the change is reflected even if smoothed over a long period of time, so that it jumped out The parallax (electric pole) is gradually suppressed to the back side.

《c8:変形例》
(c8.1:視差増減係数の制限)
視差全体調整量を決定する視差増減係数cは、大きくしすぎたり、あるいは小さくしすぎたりしても、その視差調整の誤りを増長させてしまうなど副作用が出る可能性があるので、所定の範囲内に収まるように制限してもよい。例えば、視差増減係数cは、0.5から3.0の間になるよう制限されてもよい。
<< c8: Modification >>
(C8.1: Limit of parallax increase / decrease coefficient)
The parallax increase / decrease coefficient c that determines the overall parallax adjustment amount may cause side effects such as increasing the parallax adjustment error even if it is too large or too small. You may restrict | limit so that it may fit in. For example, the parallax increase / decrease coefficient c may be limited to be between 0.5 and 3.0.

すなわち、視差全体調整量の調整処理(ステップS3)は、視差画像に生じる視差の時間軸に沿った変化量である視差増減係数を決定する処理を含んでもよい。   That is, the adjustment process (step S3) of the overall parallax adjustment amount may include a process of determining a parallax increase / decrease coefficient that is a change amount along the time axis of the parallax generated in the parallax image.

図18は、視差増減係数cを制限した場合における図17に示す各パラメータの時間的変化を示す図である。視差増減係数cを制限すると、図18(B)に示すように、その制限値でクリップされることになり、図18(A)に示すように、視差レンジが不要に変化しすぎることを防止できる。   FIG. 18 is a diagram showing temporal changes of the parameters shown in FIG. 17 when the parallax increase / decrease coefficient c is limited. When the parallax increase / decrease coefficient c is limited, as shown in FIG. 18B, clipping is performed with the limit value, and as shown in FIG. 18A, the parallax range is prevented from changing excessively. it can.

(c8.2:時間方向の平滑化処理)
本実施の形態に係る時間方向の平滑化処理は、処理対象フレームを含む長時間範囲および短時間範囲のそれぞれに含まれるフレームを対象に行なわれる。
(C8.2: smoothing process in time direction)
The smoothing process in the time direction according to the present embodiment is performed on frames included in the long-time range and the short-time range including the processing target frame.

図9には、オフライン処理を想定して、処理対象フレームを中心として、過去および未来のフレームを用いて平滑化する例を示したが、リアルタイム処理の場合には、処理対象フレームから過去のフレームのみを用いて平滑化してもよい。   FIG. 9 shows an example in which smoothing is performed using past and future frames centering on a processing target frame assuming offline processing. In the case of real-time processing, a past frame is processed from a processing target frame. May be used for smoothing.

(c8.3:クリップ処理)
長時間範囲にわたる平滑化処理においては、急激な視差の変化を抑制するため、クリップ処理を行なってもよい。すなわち、入力画像から生成された視差画像における視差の最大値および最小値の時間軸方向での変化が所定のしきい値を超える場合には、その変化を制限してもよい。例えば、処理対象フレームにおける視差の最大値および最小値と1フレーム前における視差の最大値および最小値とを比較し、または、処理対象フレームにおける視差の最大値および最小値と1フレーム前の平滑化後の視差の最大値および最小値とを比較し、所定値(例えば、30)を超えて変化している部分は、急激な変化を抑えるため、所定値にクリップしてもよい。
(C8.3: Clip processing)
In the smoothing process over a long time range, clip processing may be performed in order to suppress a sudden change in parallax. That is, when the change in the time axis direction of the parallax maximum value and minimum value in the parallax image generated from the input image exceeds a predetermined threshold value, the change may be limited. For example, the maximum and minimum values of disparity in the processing target frame are compared with the maximum and minimum values of disparity one frame before, or the maximum and minimum values of disparity in the processing target frame and smoothing one frame before The maximum value and the minimum value of the later parallax are compared, and a portion that changes beyond a predetermined value (for example, 30) may be clipped to a predetermined value in order to suppress a sudden change.

すなわち、平滑化処理は、時間軸上のある位置に対応する視差画像の視差の最大値また
は最小値が、時間軸上の近接する位置に対応する視差画像の最大値または最小値に比較して、所定のしきい値を超えて変化している画素については、当該視差の最大値または最小値を当該所定のしきい値に制限する処理を含んでもよい。
That is, in the smoothing process, the maximum or minimum value of the parallax image corresponding to a certain position on the time axis is compared with the maximum value or minimum value of the parallax image corresponding to a close position on the time axis. For pixels that change beyond a predetermined threshold value, a process of limiting the maximum or minimum value of the parallax to the predetermined threshold value may be included.

(c8.4:ノイズ除去処理)
短時間範囲にわたる平滑化処理においては、時間軸方向での変化量に基づくノイズ除去処理を行なってもよい。例えば、処理対象フレームの視差画像と1フレーム前の視差画像とを比較し、または、処理対象フレームの視差画像と1フレーム前の平滑化後の視差画像とを比較し、その差が所定値(例えば、30)を超えている部分(例えば、図7の領域300)は、ノイズであると判定してもよい。このようにノイズとして判定された部分については、比較対象の、1フレーム前の視差画像、または、1フレーム前の平滑化後の視差画像の対応する部分を用いて置換してもよい。
(C8.4: Noise removal processing)
In smoothing processing over a short time range, noise removal processing based on the amount of change in the time axis direction may be performed. For example, the parallax image of the processing target frame is compared with the parallax image of the previous frame, or the parallax image of the processing target frame is compared with the parallax image after the smoothing of the previous frame, and the difference is a predetermined value ( For example, a portion exceeding 30) (for example, the region 300 in FIG. 7) may be determined as noise. The portion determined as noise in this way may be replaced using the corresponding portion of the parallax image one frame before the comparison or the parallax image after smoothing one frame before.

すなわち、平滑化処理は、時間軸上のある位置に対応する視差画像に含まれる画素が示す視差のうち、平滑化された視差画像に含まれる画素が示す視差に比較して、所定のしきい値を超えて変化している画素については、対応する視差の大きさを当該所定のしきい値に制限する処理を含んでもよい。   That is, the smoothing process is performed at a predetermined threshold compared to the parallax indicated by the pixels included in the smoothed parallax image among the parallaxes indicated by the pixels included in the parallax image corresponding to a certain position on the time axis. For a pixel that has changed beyond the value, a process of limiting the corresponding parallax magnitude to the predetermined threshold value may be included.

(c8.5:視差の最大値のみの平滑化)
視差全体調整量について、視差の変化が大きく問題となりやすいのは飛出し側であるため、飛出し側の視差についてのみ平滑化してもよい。すなわち、長時間範囲にわたる平滑化処理においては、視差画像における視差の最大値(MAX)のみを平滑化してもよい。この場合、視差の最小値(MIN)は、無限遠を想定した一定値を用いることができる。
(C8.5: smoothing only the maximum value of parallax)
As for the overall parallax adjustment amount, since the change in parallax is likely to be a big problem on the flyout side, only the parallax on the flyout side may be smoothed. That is, in the smoothing process over a long time range, only the parallax maximum value (MAX) in the parallax image may be smoothed. In this case, the minimum value (MIN) of the parallax can be a constant value assuming infinity.

(c8.6:その他)
上述の変形例に示した複数の処理を適宜組み合わせてもよい。
(C8.6: other)
You may combine suitably the some process shown in the above-mentioned modification.

[D.実施の形態2]
上述の実施の形態1においては、一対の入力画像のうち、一方の入力画像から立体動画を生成する処理例(1枚モード)について説明した。これに対して、実施の形態2においては、一対の入力画像(ステレオ画像)に対して視差補正を行なうことで立体動画を生成する処理例(2枚モード)について説明する。
[D. Second Embodiment]
In the first embodiment described above, the processing example (one-frame mode) for generating a stereoscopic video from one input image of the pair of input images has been described. On the other hand, in the second embodiment, a processing example (two-frame mode) for generating a stereoscopic moving image by performing parallax correction on a pair of input images (stereo images) will be described.

基本的な処理の内容は、実施の形態1と同様であるので、主として、実施の形態1とは異なる処理について説明する。すなわち、実施の形態2においては、入力画像として、ステレオカメラなどで被写体を撮像して得られる一対の画像(左眼用画像および右眼用画像)が入力される。そして、左眼用画像は、左眼用の視差画像に基づいて視差調整が行なわれることで、視差調整後の左眼用画像が出力され、右眼用画像は、右眼用の視差画像に基づいて視差調整が行なわれることで、視差調整後の右眼用画像が出力される。   Since the content of the basic processing is the same as that of the first embodiment, processing different from that of the first embodiment will be mainly described. That is, in the second embodiment, a pair of images (left-eye image and right-eye image) obtained by imaging a subject with a stereo camera or the like are input as input images. The left-eye image is subjected to parallax adjustment based on the left-eye parallax image, so that the left-eye image after parallax adjustment is output, and the right-eye image is converted into a right-eye parallax image. The parallax adjustment is performed based on this, so that the right-eye image after the parallax adjustment is output.

図19は、本発明の実施の形態2に従う全体処理手順を示すフローチャートである。図19を参照して、各フレームの入力画像1(左眼用画像)および入力画像2(右眼用画像)が取得されると、入力画像1用の視差画像が各フレームについて生成される(ステップS11)とともに、入力画像2用の視差画像が各フレームについて生成される(ステップS12)。これらの処理は、基本的には、図5のステップS1と同様であるが、視差を算出する基準となる画像が互いに異なったものとなる。   FIG. 19 is a flowchart showing an overall processing procedure according to the second embodiment of the present invention. Referring to FIG. 19, when input image 1 (left eye image) and input image 2 (right eye image) of each frame are acquired, a parallax image for input image 1 is generated for each frame (see FIG. 19). Along with step S11), a parallax image for the input image 2 is generated for each frame (step S12). These processes are basically the same as step S1 in FIG. 5, but the images serving as the reference for calculating the parallax are different from each other.

続いて、生成されたそれぞれの視差画像に対して、平滑化処理が実行される(ステップS21およびS22)。この平滑化処理は、主として、画像処理部3の平滑化処理部33(図1)によって実行される。   Subsequently, a smoothing process is performed on each generated parallax image (steps S21 and S22). This smoothing process is mainly executed by the smoothing processing unit 33 (FIG. 1) of the image processing unit 3.

続いて、長時間範囲にわたる複数フレームの視差画像に対する平滑化の結果に基づいて、視差全体調整量の決定処理が実行される(ステップS30)。この視差全体調整量の決定処理については、基本的には、実施の形態1と同様であるが、以下のような点が異なっている。   Subsequently, an overall parallax adjustment amount determination process is executed based on the result of smoothing the parallax images of a plurality of frames over a long time range (step S30). The determination process of the overall parallax adjustment amount is basically the same as that of the first embodiment, but differs in the following points.

すなわち、視差全体調整量に含まれる、視差増減係数cおよび視差オフセットoについては、左眼用画像の視差画像および右眼用画像の視差画像の2種類があるため、それぞれの視差の平均値を用いる。より具体的には、左眼用画像の視差画像における、視差の最大値の平均値(AVE_MAX1)および視差の最小値の平均値(AVE_MIN1)、ならびに、右眼用画像の視差画像における、視差の最大値の平均値(AVE_MAX2)および視差の最小値の平均値(AVE_MIN2)を用いて、以下の式に従って、視差増減係数cおよび視差オフセットoが算出される。   That is, for the parallax increase / decrease coefficient c and the parallax offset o included in the overall parallax adjustment amount, there are two types of parallax images of the left-eye image and parallax image of the right-eye image. Use. More specifically, in the parallax image of the left-eye image, the average value of the maximum parallax value (AVE_MAX1) and the average value of the minimum parallax value (AVE_MIN1), and the parallax image in the parallax image of the right-eye image. Using the average value of the maximum value (AVE_MAX2) and the average value of the minimum value of parallax (AVE_MIN2), the parallax increase / decrease coefficient c and the parallax offset o are calculated according to the following equations.

視差増減係数c=ターゲット視差レンジr×2/(平均値AVE_MAX1−平均値AVE_MIN1+平均値AVE_MAX2−平均値AVE_MIN2)
視差オフセットo=(平均値AVE_MAX1+平均値AVE_MIN1+平均値AVE_MAX2+平均値AVE_MIN2)/4
続いて、生成されたそれぞれの視差画像に対して、ステップS30において決定された視差全体調整量に従って、視差を調整する処理が実行される(ステップS41およびS42)。このステップS41およびS42における処理についても、図5のステップS4と同様であるが、視差を調整する方向が互いに異なったものとなる。
Parallax increase / decrease coefficient c = target parallax range r × 2 / (average value AVE_MAX1−average value AVE_MIN1 + average value AVE_MAX2−average value AVE_MIN2)
Parallax offset o = (average value AVE_MAX1 + average value AVE_MIN1 + average value AVE_MAX2 + average value AVE_MIN2) / 4
Subsequently, a process for adjusting the parallax is performed on each generated parallax image according to the overall parallax adjustment amount determined in step S30 (steps S41 and S42). The processing in steps S41 and S42 is the same as that in step S4 in FIG. 5, but the directions for adjusting the parallax are different from each other.

すなわち、視差の調整については、実施の形態1とは異なり左眼用画像および右眼用画像において視差の存在する状態から、それぞれ変更すべき視差量(1−c)分を左右均等に分配して視差を調整する。ここで、視差調整の加算量は、左眼用画像と右眼用画像とでは、動かす向きが互いに逆になるため、以下のように符合は逆になる。   That is, regarding the parallax adjustment, unlike the first embodiment, the amount of parallax (1-c) to be changed is distributed equally to the left and right from the state where the parallax exists in the left-eye image and the right-eye image. Adjust the parallax. Here, the addition amount of the parallax adjustment is reversed as follows because the moving directions are opposite to each other in the left-eye image and the right-eye image.

左眼用画像の調整後視差(距離)量=((1−視差増減係数c)×(左眼用画像の調整前視差(距離)量−視差オフセットo)+視差オフセットo)/2
右眼用画像の調整後視差(距離)量=−((1−視差増減係数c)×(右眼用画像の調整前視差(距離)量−視差オフセットo)+視差オフセットo)/2
そして、調整後の左眼用画像および右眼用画像がステレオ画像としてモニターなどへ出力される。
Adjusted parallax (distance) amount of left-eye image = ((1-parallax increase / decrease coefficient c) × (pre-adjustment parallax (distance) amount of left-eye image−parallax offset o) + parallax offset o) / 2
Adjusted parallax (distance) amount of right-eye image = − ((1-parallax increase / decrease coefficient c) × (pre-adjustment parallax (distance) amount of right-eye image−parallax offset o) + parallax offset o) / 2
Then, the adjusted left-eye image and right-eye image are output as a stereo image to a monitor or the like.

以上のように、S41およびS42の視差調整処理は、フレーム毎の入力画像1および入力画像2を、対応する補正後の視差画像に従ってそれぞれ視差を調整することで得られる画像を用いて、立体視画像を生成する処理を含む。   As described above, the parallax adjustment processing in S41 and S42 uses the images obtained by adjusting the parallax between the input image 1 and the input image 2 for each frame according to the corresponding corrected parallax images, respectively. Includes processing to generate an image.

図20は、本発明の実施の形態2に従う画像処理方法の適用例を示す図である。図21は、図20に示す適用例において出力されるステレオ画像の一例を示す図である。   FIG. 20 is a diagram showing an application example of the image processing method according to the second embodiment of the present invention. FIG. 21 is a diagram illustrating an example of a stereo image output in the application example illustrated in FIG. 20.

図20(A)および(B)に示すように、本実施の形態においても、長時間範囲にわたって平滑化されているため、局所的なフレームにおける視差の急激な変化があっても、出力されるステレオ画像の視差が急激に増減することはない。そのため、立体視表示される動画の全体的な視差が急激に変化することによる違和感は生じない。一方で、視差画像を短時間範囲にわたって平滑化することで、各フレームにおける視差情報(立体感の情報)は残ったままとなり、各フレームにおける適切な立体視を提供できる。   As shown in FIGS. 20A and 20B, in this embodiment as well, since smoothing is performed over a long range, even if there is a sudden change in parallax in a local frame, it is output. The parallax of the stereo image does not increase or decrease rapidly. Therefore, there is no sense of incongruity due to a sudden change in the overall parallax of a stereoscopically displayed moving image. On the other hand, by smoothing the parallax image over a short time range, the parallax information (stereoscopic information) in each frame remains, and appropriate stereoscopic vision in each frame can be provided.

図21(A)は、入力画像1(左眼用画像)および入力画像2(右眼用画像)の例を示
し、図21(B)には、対応して出力されるステレオ画像(視差調整後の左眼用画像および右眼用画像)の例を示す。上述したように、本実施の形態においては、入力画像1(左眼用画像)および入力画像2(右眼用画像)の別に、視差を調整する方向が互いに逆になる(破線矢印)。
FIG. 21A shows an example of an input image 1 (left eye image) and an input image 2 (right eye image). FIG. 21B shows a correspondingly output stereo image (parallax adjustment). An example of a later left-eye image and right-eye image) is shown. As described above, in the present embodiment, the directions for adjusting the parallax are reversed for each of the input image 1 (left eye image) and the input image 2 (right eye image) (broken arrows).

実施の形態2のその他の構成や処理などについては、実施の形態1と同様であるので、詳細な説明は繰り返さない。また、実施の形態2に対しても、実施の形態1の変形例において説明した処理や構成を適宜採用できる。   Since other configurations and processes of the second embodiment are the same as those of the first embodiment, detailed description will not be repeated. Also for the second embodiment, the processing and configuration described in the modification of the first embodiment can be employed as appropriate.

[E.その他の形態]
本発明は、以下のような別の局面に従う実施の形態を含む。すなわち、本発明の別の局面に従う動画処理方法は、視差量を調整するための少なくとも一つの時間軸方向の平滑化処理を含む画像処理であって、少なくとも飛出し側の視差量を所定の視差以下にする。
[E. Other forms]
The present invention includes an embodiment according to another aspect as follows. That is, the moving image processing method according to another aspect of the present invention is image processing including at least one smoothing process in the time axis direction for adjusting the amount of parallax, and at least sets the amount of parallax on the fly-out side to a predetermined amount of parallax. Below.

好ましくは、視差レンジ(飛出し−奥行き)が所定の視差以下に調整される。
好ましくは、時間軸方向の平滑化処理は、2種類の時間範囲で平滑化を行ない、各画素に対応する視差量を決定する。
Preferably, the parallax range (jumping-depth) is adjusted to a predetermined parallax or less.
Preferably, the smoothing process in the time axis direction performs smoothing in two types of time ranges, and determines a parallax amount corresponding to each pixel.

好ましくは、所定の時間範囲の方が、第2の時間範囲よりも長い。
好ましくは、立体動画は、片方の画像から生成する(1枚モード)、あるいは、両方の画像を視差調整して生成する(2枚モード)。
Preferably, the predetermined time range is longer than the second time range.
Preferably, the stereoscopic video is generated from one of the images (one-frame mode), or is generated by adjusting both images for parallax (two-frame mode).

好ましくは、視差全体調整量の決定は、視差増減係数、視差位置の視差オフセットの少なくとも1つを決定することを含む。   Preferably, the determination of the overall parallax adjustment amount includes determining at least one of a parallax increase / decrease coefficient and a parallax offset of the parallax position.

好ましくは、視差増減係数は、所定範囲を超えないように制限する。
好ましくは、所定の時間範囲での平滑化では、視差の最小値を平滑化する。
Preferably, the parallax increase / decrease coefficient is limited so as not to exceed a predetermined range.
Preferably, in the smoothing in a predetermined time range, the minimum parallax value is smoothed.

好ましくは、所定の時間範囲および第2の時間範囲での平滑化では、時間的に近いフレームと比較し、しきい値を超えて変化している視差は、しきい値にクリップする。   Preferably, in the smoothing in the predetermined time range and the second time range, the parallax that changes beyond the threshold value compared to a frame close in time is clipped to the threshold value.

好ましくは、所定の時間範囲および第2の時間範囲での平滑化では、時間的に平滑化したフレームと比較し、しきい値を超えて変化している視差は、しきい値にクリップする。   Preferably, in the smoothing in the predetermined time range and the second time range, the parallax that changes beyond the threshold value compared with the temporally smoothed frame is clipped to the threshold value.

好ましくは、所定の時間範囲は、10秒以上である。
好ましくは、第2の時間範囲は、5秒以下である。
Preferably, the predetermined time range is 10 seconds or more.
Preferably, the second time range is 5 seconds or less.

[F.利点]
本発明の実施の形態によれば、立体動画を構成する各フレームの立体感を残しつつ、全体的な視差もうまく調整できる。
[F. advantage]
According to the embodiment of the present invention, it is possible to adjust the overall parallax well while leaving the stereoscopic effect of each frame constituting the stereoscopic moving image.

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

1 画像処理システム、2 撮像部、3 画像処理部、4 画像出力部、21,121
第1カメラ、21a,22a レンズ、21b,22b 撮像素子、22,122 第2カメラ、23,24 A/D変換部、31 対応点探索部、32 視差画像生成部、3
3 平滑化処理部、34 視差全体調整量決定部、35 視差調整部、36 画像生成部、100 デジタルカメラ、102 CPU、104 デジタル処理回路、106 画像処理回路、108 画像表示部、112 記憶部、114 ズーム機構、200 パーソナルコンピューター、202 パーソナルコンピューター本体、204 画像処理プログラム、206 モニター、208 マウス、210 キーボード、212 外部記憶装置。
1 image processing system, 2 imaging unit, 3 image processing unit, 4 image output unit, 21, 121
First camera, 21a, 22a Lens, 21b, 22b Image sensor, 22, 122 Second camera, 23, 24 A / D conversion unit, 31 Corresponding point search unit, 32 Parallax image generation unit, 3
3 smoothing processing unit, 34 parallax overall adjustment amount determination unit, 35 parallax adjustment unit, 36 image generation unit, 100 digital camera, 102 CPU, 104 digital processing circuit, 106 image processing circuit, 108 image display unit, 112 storage unit, 114 zoom mechanism, 200 personal computer, 202 personal computer main body, 204 image processing program, 206 monitor, 208 mouse, 210 keyboard, 212 external storage device.

Claims (14)

時間軸に沿って順序付けされた複数の第1の入力画像と、時間軸に沿って順序付けされた複数の第2の入力画像とを取得する取得ステップを備え、前記複数の第1および第2の入力画像は、それぞれ異なる視点から被写体を撮像することで取得された一対のものであり、さらに、
第1および第2の入力画像から時間軸上の各位置に対応する複数の視差画像を生成する生成ステップと、
前記第1の入力画像および前記第2の入力画像を取得した時間範囲のうち、第1の時間範囲と、前記第1の時間範囲内で前記第1の時間範囲よりも短い第2の時間範囲を設定し、前記第1の時間範囲にわたって前記複数の視差画像を時間軸方向に平滑化するとともに、前記第2の時間範囲にわたって前記複数の視差画像を時間軸方向に平滑化する平滑化ステップと、
少なくとも飛出し側の視差の大きさを、前記第1の時間範囲にわたって平滑化した結果に基づいて、視差全体調整量を決定する視差全体調整量決定ステップと、
前記第2の時間範囲にわたり平滑化して得られた視差画像を前記視差全体調整量に従って補正する補正ステップとを備える、画像処理方法。
An acquisition step of acquiring a plurality of first input images ordered along a time axis and a plurality of second input images ordered along a time axis, the plurality of first and second The input images are a pair of images acquired by imaging the subject from different viewpoints,
Generating a plurality of parallax images corresponding to respective positions on the time axis from the first and second input images;
Among the time ranges in which the first input image and the second input image are acquired, a first time range and a second time range shorter than the first time range within the first time range And smoothing the plurality of parallax images in the time axis direction over the first time range, and smoothing the plurality of parallax images in the time axis direction over the second time range; ,
An overall parallax adjustment amount determination step for determining an overall parallax adjustment amount based on a result obtained by smoothing at least the magnitude of the parallax on the fly-out side over the first time range; and
And a correction step of correcting a parallax image obtained by smoothing over the second time range according to the overall parallax adjustment amount.
前記補正ステップは、前記第1の時間範囲に存在する視差画像について、飛出し側の視差と奥行き側の視差との間の視差レンジを、前記第1の時間範囲にわたって平滑化した結果に応じた値に制限するステップを含む、請求項1に記載の画像処理方法。   The correction step corresponds to a result of smoothing the parallax range between the projection-side parallax and the depth-side parallax over the first time range for the parallax image existing in the first time range. The image processing method according to claim 1, further comprising a step of limiting to a value. 前記複数の第1の入力画像と、前記複数の第1の入力画像にそれぞれ対応する補正後の視差画像に従って視差を与えることで生成される複数の画像とを用いて、立体視画像を生成するステップをさらに備える、請求項1または2に記載の画像処理方法。   A stereoscopic image is generated using the plurality of first input images and a plurality of images generated by giving parallax according to corrected parallax images corresponding to the plurality of first input images, respectively. The image processing method according to claim 1, further comprising a step. 前記複数の第1および第2の入力画像を、対応する補正後の視差画像に従ってそれぞれ視差を調整することで得られる画像を用いて、立体視画像を生成するステップをさらに備える、請求項1〜3のいずれか1項に記載の画像処理方法。   The method further comprises generating a stereoscopic image using images obtained by adjusting the parallax of the plurality of first and second input images according to the corresponding parallax images after correction. 4. The image processing method according to any one of items 3. 前記補正ステップは、視差調整関数の傾きである視差増減係数を決定するステップを含む、請求項1〜4のいずれか1項に記載の画像処理方法。   The image processing method according to claim 1, wherein the correcting step includes a step of determining a parallax increase / decrease coefficient that is a slope of a parallax adjustment function. 前記補正ステップは、前記視差増減係数を所定範囲に制限するステップを含む、請求項5に記載の画像処理方法。   The image processing method according to claim 5, wherein the correcting step includes a step of limiting the parallax increase / decrease coefficient to a predetermined range. 前記補正ステップは、視差画像に生じる視差位置のオフセットを決定するステップを含む、請求項1〜6のいずれか1項に記載の画像処理方法。   The image processing method according to claim 1, wherein the correcting step includes a step of determining an offset of a parallax position generated in the parallax image. 前記補正ステップは、前記第1の時間範囲にわたって平滑化した結果に応じて、視差の最小値を制限するステップを含む、請求項1〜7のいずれか1項に記載の画像処理方法。   The image processing method according to claim 1, wherein the correcting step includes a step of limiting a minimum value of parallax according to a result of smoothing over the first time range. 前記平滑化ステップは、時間軸上のある位置に対応する視差画像の視差の最大値または最小値が、時間軸上の近接する位置に対応する視差画像の最大値または最小値に比較して、所定のしきい値を超えて変化している画素については、当該視差の最大値または最小値を当該所定のしきい値に制限するステップを含む、請求項1〜8のいずれか1項に記載の画像処理方法。   In the smoothing step, the maximum value or the minimum value of the parallax image corresponding to a certain position on the time axis is compared with the maximum value or the minimum value of the parallax image corresponding to an adjacent position on the time axis, 9. The pixel according to claim 1, comprising a step of limiting a maximum value or a minimum value of the parallax to the predetermined threshold value for a pixel that has changed beyond a predetermined threshold value. 9. Image processing method. 前記平滑化ステップは、時間軸上のある位置に対応する視差画像に含まれる画素が示す視差のうち、平滑化された視差画像に含まれる画素が示す視差に比較して、所定のしきい値を超えて変化している画素については、対応する視差の大きさを当該所定のしきい値に制限するステップを含む、請求項1〜8のいずれか1項に記載の画像処理方法。   The smoothing step has a predetermined threshold value compared to the parallax indicated by the pixels included in the smoothed parallax image among the parallaxes indicated by the pixels included in the parallax image corresponding to a certain position on the time axis. 9. The image processing method according to claim 1, further comprising a step of limiting a corresponding parallax magnitude to the predetermined threshold value for a pixel that has changed in excess of. 前記第1の時間範囲は、10秒以上である、請求項1〜10のいずれか1項に記載の画像処理方法。   The image processing method according to claim 1, wherein the first time range is 10 seconds or more. 前記第2の時間範囲は、10秒以下である、請求項1〜11のいずれか1項に記載の画像処理方法。   The image processing method according to claim 1, wherein the second time range is 10 seconds or less. 時間軸に沿って順序付けされた複数の第1の入力画像と、時間軸に沿って順序付けされた複数の第2の入力画像とを取得する取得手段を備え、前記複数の第1および第2の入力画像は、それぞれ異なる視点から被写体を撮像することで取得された一対のものであり、さらに、
第第1および第2の入力画像から時間軸上の各位置に対応する複数の視差画像を生成する生成手段と、
前記第1の入力画像および前記第2の入力画像を取得した時間範囲のうち、第1の時間範囲と、前記第1の時間範囲内で前記第1の時間範囲よりも短い第2の時間範囲を設定し、前記第1の時間範囲にわたって前記複数の視差画像を時間軸方向に平滑化するとともに、前記第2の時間範囲にわたって前記複数の視差画像を時間軸方向に平滑化する平滑化手段と、
少なくとも飛出し側の視差の大きさを、前記第1の時間範囲にわたって平滑化した結果に基づいて、視差全体調整量を決定する視差全体調整量決定と、
前記第2の時間範囲にわたり平滑化して得られた視差画像を前記視差全体調整量に従って補正する補正手段とを備える、画像処理システム。
An acquisition unit configured to acquire a plurality of first input images ordered along a time axis and a plurality of second input images ordered along the time axis; The input images are a pair of images acquired by imaging the subject from different viewpoints,
Generating means for generating a plurality of parallax images corresponding to respective positions on the time axis from the first and second input images;
Among the time ranges in which the first input image and the second input image are acquired, a first time range and a second time range shorter than the first time range within the first time range Smoothing means for smoothing the plurality of parallax images in the time axis direction over the first time range and smoothing the plurality of parallax images in the time axis direction over the second time range; ,
An overall parallax adjustment amount determination for determining an overall parallax adjustment amount based on a result obtained by smoothing at least the magnitude of the parallax on the fly-out side over the first time range; and
An image processing system comprising: a correcting unit that corrects a parallax image obtained by smoothing over the second time range according to the overall parallax adjustment amount.
画像処理プログラムであって、コンピューターに、
時間軸に沿って順序付けされた複数の第1の入力画像と、時間軸に沿って順序付けされた複数の第2の入力画像とを取得する取得ステップを実行させ、前記複数の第1および第2の入力画像は、それぞれ異なる視点から被写体を撮像することで取得された一対のものであり、さらに、
第1および第2の入力画像から時間軸上の各位置に対応する複数の視差画像を生成する生成ステップと、
前記第1の入力画像および前記第2の入力画像を取得した時間範囲のうち、第1の時間範囲と、前記第1の時間範囲内で前記第1の時間範囲よりも短い第2の時間範囲を設定し、前記第1の時間範囲にわたって前記複数の視差画像を時間軸方向に平滑化するとともに、前記第2の時間範囲にわたって前記複数の視差画像を時間軸方向に平滑化する平滑化ステップと、
少なくとも飛出し側の視差の大きさを、前記第1の時間範囲にわたって平滑化した結果に基づいて、視差全体調整量を決定する視差全体調整量決定ステップと、
前記第2の時間範囲にわたり平滑化して得られた視差画像を前記視差全体調整量に従って補正する補正ステップとを実行させる、画像処理プログラム。
An image processing program, on a computer,
An acquisition step of acquiring a plurality of first input images ordered along the time axis and a plurality of second input images ordered along the time axis is executed, and the plurality of first and second The input images are a pair of images acquired by capturing the subject from different viewpoints,
Generating a plurality of parallax images corresponding to respective positions on the time axis from the first and second input images;
Among the time ranges in which the first input image and the second input image are acquired, a first time range and a second time range shorter than the first time range within the first time range And smoothing the plurality of parallax images in the time axis direction over the first time range, and smoothing the plurality of parallax images in the time axis direction over the second time range; ,
An overall parallax adjustment amount determination step for determining an overall parallax adjustment amount based on a result obtained by smoothing at least the magnitude of the parallax on the fly-out side over the first time range; and
An image processing program for executing a correction step of correcting a parallax image obtained by smoothing over the second time range according to the overall parallax adjustment amount.
JP2011273669A 2011-12-14 2011-12-14 Image processing method, image processing system, and image processing program Expired - Fee Related JP5838775B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011273669A JP5838775B2 (en) 2011-12-14 2011-12-14 Image processing method, image processing system, and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011273669A JP5838775B2 (en) 2011-12-14 2011-12-14 Image processing method, image processing system, and image processing program

Publications (2)

Publication Number Publication Date
JP2013126106A JP2013126106A (en) 2013-06-24
JP5838775B2 true JP5838775B2 (en) 2016-01-06

Family

ID=48777118

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011273669A Expired - Fee Related JP5838775B2 (en) 2011-12-14 2011-12-14 Image processing method, image processing system, and image processing program

Country Status (1)

Country Link
JP (1) JP5838775B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA3086592A1 (en) 2017-08-30 2019-03-07 Innovations Mindtrick Inc. Viewer-adjusted stereoscopic image display
JP7339278B2 (en) * 2018-02-08 2023-09-05 イノベーションズ マインドトリック インコーポレイテッド Stereoscopic display adjusted to the viewer

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0787598B2 (en) * 1991-06-06 1995-09-20 株式会社エイ・ティ・アール視聴覚機構研究所 Parallax correction device
JPH1040420A (en) * 1996-07-24 1998-02-13 Sanyo Electric Co Ltd Method for controlling sense of depth
JP2011124941A (en) * 2009-12-14 2011-06-23 Mitsubishi Electric Corp Apparatus and method for producing three-dimensional video
CN102388617B (en) * 2010-03-30 2015-09-09 富士胶片株式会社 Compound eye imaging device and disparity adjustment method thereof and program
JP4875762B2 (en) * 2010-05-26 2012-02-15 シャープ株式会社 Image processing apparatus, image display apparatus, and image pickup apparatus
JP5545036B2 (en) * 2010-05-28 2014-07-09 三菱電機株式会社 Image processing apparatus, image processing method, and image display apparatus

Also Published As

Publication number Publication date
JP2013126106A (en) 2013-06-24

Similar Documents

Publication Publication Date Title
JP5963422B2 (en) Imaging apparatus, display apparatus, computer program, and stereoscopic image display system
JP5414947B2 (en) Stereo camera
US8760502B2 (en) Method for improving 3 dimensional effect and reducing visual fatigue and apparatus enabling the same
US9699440B2 (en) Image processing device, image processing method, non-transitory tangible medium having image processing program, and image-pickup device
JP6644371B2 (en) Video display device
WO2012086120A1 (en) Image processing apparatus, image pickup apparatus, image processing method, and program
KR20190000591A (en) Application Processor including function of compensation of disparity, and digital photographing apparatus using the same
WO2012029298A1 (en) Image capture device and image-processing method
JP5814692B2 (en) Imaging apparatus, control method therefor, and program
JPH08317429A (en) Stereoscopic electronic zoom device and stereoscopic picture quality controller
US20140002612A1 (en) Stereoscopic shooting device
WO2012029299A1 (en) Image capture device, playback device, and image-processing method
EP2517472B1 (en) Method and apparatus for optimal motion reproduction in stereoscopic digital cinema
TWI589150B (en) Three-dimensional auto-focusing method and the system thereof
WO2014141653A1 (en) Image generation device, imaging device, and image generation method
US20130208097A1 (en) Three-dimensional imaging system and image reproducing method thereof
JP5838775B2 (en) Image processing method, image processing system, and image processing program
JP5889022B2 (en) Imaging apparatus, image processing apparatus, image processing method, and program
JP2013535120A (en) Method and apparatus for auto-convergence based on auto-focus points for stereoscopic frames
JP2013201688A (en) Image processing apparatus, image processing method, and image processing program
JP5741353B2 (en) Image processing system, image processing method, and image processing program
JP2014135714A (en) Stereoscopic image signal processing device and stereoscopic image capture device
JP5601375B2 (en) Image processing apparatus, image processing method, and program
JP2015029215A (en) Stereoscopic image processing device
JP2024013890A (en) Information processing device, information processing method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140312

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20141128

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20141209

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150206

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20150714

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150916

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20150924

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20151026

R150 Certificate of patent or registration of utility model

Ref document number: 5838775

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees