JP2009110356A - Image processing device, image processing method, and program - Google Patents
Image processing device, image processing method, and program Download PDFInfo
- Publication number
- JP2009110356A JP2009110356A JP2007282974A JP2007282974A JP2009110356A JP 2009110356 A JP2009110356 A JP 2009110356A JP 2007282974 A JP2007282974 A JP 2007282974A JP 2007282974 A JP2007282974 A JP 2007282974A JP 2009110356 A JP2009110356 A JP 2009110356A
- Authority
- JP
- Japan
- Prior art keywords
- data
- distance
- image data
- pixels
- image processing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Abstract
Description
本発明は、被写体を2つの視点から撮像して得た2つの画像から立体画像データを生成する画像処理装置に関し、特に保存するデータのサイズを低減する画像処理装置及び画像処理方法並びにプログラムに関するものである。 The present invention relates to an image processing apparatus that generates stereoscopic image data from two images obtained by imaging a subject from two viewpoints, and more particularly to an image processing apparatus, an image processing method, and a program that reduce the size of data to be stored. It is.
近年、被写体を2つの視点から撮像して得た左右画像データから立体画像データを生成する画像処理装置が提案されており、このような画像処理装置では、生成された画像データを伝送又は記録等するときの利便性から、保存データのサイズの低減が望まれている。 In recent years, there has been proposed an image processing apparatus that generates stereoscopic image data from left and right image data obtained by imaging a subject from two viewpoints. In such an image processing apparatus, the generated image data is transmitted or recorded, etc. In view of convenience, it is desired to reduce the size of stored data.
そこで、撮像して得た左右画像データを、所定の圧縮率に応じて間引くことにより圧縮して記録再生する複眼撮像装置や(特許文献1)、画素数の異なる左右画像を補間又は間引きによって画素数を合わせて測距演算を行う三次元構造推定装置(特許文献2)、左右画像を間引いてサンプリングし、サンプリングの位置情報に応じた色情報計算を行う立体画像作成装置(特許文献3)等が提案されている。
しかしながら従来のように左右画像データを間引いたり、合成したりすることによりサイズダウンして距離を求め、立体画像データを生成する画像処理装置においては、左右画像において画素の間引きや合成を行うと、例えば図18に示す如く、間引き前は左画像Plと右画像Prにおいて対応する点として人物の右目Cが検出できるが、間引き後は左画像Plでは右目Cを検出できても、右画像Prでは右目Cの画素が間引かれてしまって検出することができず、対応点が見つからないために正確な距離が算出できない虞がある。 However, in the image processing apparatus that generates the stereoscopic image data by reducing the size by thinning out the left and right image data as in the past or combining them, and generating the stereoscopic image data, For example, as shown in FIG. 18, the right eye C of a person can be detected as a corresponding point in the left image Pl and the right image Pr before thinning, but after the thinning, the right eye C can be detected in the left image Pl, There is a possibility that the correct distance cannot be calculated because the pixel of the right eye C is thinned out and cannot be detected, and the corresponding point is not found.
本発明はかかる事情に鑑みてなされたものであり、測距精度を下げることなく、保存データのサイズを低減する画像処理装置及び画像処理方法並びにプログラムを提供することを目的とするものである。 The present invention has been made in view of such circumstances, and an object of the present invention is to provide an image processing apparatus, an image processing method, and a program for reducing the size of stored data without reducing ranging accuracy.
本発明の第一の画像処理装置は、被写体を2つの視点から撮像して得た2つの画像データから前記被写体各部までの距離を算出して立体画像データを生成する画像処理装置において、
前記2つの画像データを入力する画像入力手段と、
入力された前記画像データの全ての画素を読み出す読出手段と、
前記立体画像データを保存するために設定された保存データサイズの大きさに応じた間引き率で、前記2つの画像データのうちの一方の画像データを構成する画素を間引く間引き手段と、
該間引き手段による間引き後の画素について前記距離を算出する距離算出手段とを備えてなることを特徴とするものである。
A first image processing apparatus according to the present invention is an image processing apparatus that generates stereoscopic image data by calculating a distance to each part of the subject from two image data obtained by imaging the subject from two viewpoints.
Image input means for inputting the two image data;
Reading means for reading out all pixels of the input image data;
Thinning means for thinning out pixels constituting one of the two image data at a thinning rate according to the size of the saved data size set for saving the stereoscopic image data;
It is characterized by comprising distance calculation means for calculating the distance for the pixels after thinning by the thinning means.
また本発明の第二の画像処理装置は、写体を2つの視点から撮像して得た2つの画像データから前記被写体各部までの距離を算出して立体画像データを生成する画像処理装置において、
前記2つの画像データを入力する画像入力手段と、
入力された前記画像データの全ての画素を読み出す読出手段と、
読み出された前記全ての画素について前記距離を算出する距離算出手段と、
前記立体画像データを保存するために設定された保存データサイズの大きさに応じた間引き率で、前記距離算出手段により算出された距離のデータを合成するか、又は間引くことによりデータサイズを低減するデータサイズ低減手段とを備えてなることを特徴とするものである。
The second image processing apparatus of the present invention is an image processing apparatus that generates stereoscopic image data by calculating a distance from each of two image data obtained by imaging a subject from two viewpoints to each part of the subject.
Image input means for inputting the two image data;
Reading means for reading out all pixels of the input image data;
Distance calculating means for calculating the distance for all the read pixels;
The data size is reduced by synthesizing or thinning out the distance data calculated by the distance calculation means at a thinning rate according to the size of the storage data size set for storing the stereoscopic image data. And a data size reducing means.
なお本発明の第一の画像処理装置は、前記間引き手段が、前記画素のうち周囲の画素とのデータの値の差分値が大きい画素の順に画素を残して間引くものであってもよい。 In the first image processing apparatus of the present invention, the thinning-out unit may thin out the pixels in the order of pixels having a larger difference value of data values from surrounding pixels among the pixels.
また本発明の第二の画像処理装置は、前記データサイズ低減手段が、前記画素のうち周囲の画素とのデータの値の差分値が大きい画素の順に、前記距離算出手段により算出された距離のデータを残して合成するか、又は間引くものであってもよい。 Further, in the second image processing apparatus of the present invention, the data size reduction unit may calculate the distances calculated by the distance calculation unit in the order of the pixels having the largest difference value of data values from the surrounding pixels among the pixels. It may be synthesized by leaving data, or thinned.
また本発明の第二の画像処理装置は、前記データサイズ低減手段が、前記2つの画像データにおける対応する画素間の相関度が高い画素の順に、前記距離算出手段により算出された距離のデータを残して合成するか、又は間引くものであってもよい。 Further, in the second image processing apparatus of the present invention, the data size reduction unit outputs the distance data calculated by the distance calculation unit in the order of pixels having a high degree of correlation between corresponding pixels in the two image data. They may be left behind for synthesis or thinning out.
また本発明の第二の画像処理装置は、前記データサイズ低減手段が、前記距離算出手段により算出された距離に対して、前記2つの画像データにおける対応する画素間の相関度による重み付けを行い、該重み付けの後、前記距離のデータを合成するものであってもよい。 In the second image processing apparatus of the present invention, the data size reduction unit performs weighting on the distance calculated by the distance calculation unit based on the degree of correlation between corresponding pixels in the two image data, After the weighting, the distance data may be synthesized.
なお本発明の画像処理装置は、前記画像入力手段が、2つのカメラからなるものであってもよい。 In the image processing apparatus of the present invention, the image input means may be composed of two cameras.
また本発明の画像処理装置は、前記画像入力手段が、2つのレンズを備えた複眼カメラであってもよい。 In the image processing apparatus of the present invention, the image input unit may be a compound eye camera including two lenses.
本発明の第一の撮像処理方法は、被写体を2つの視点から撮像して得た2つの画像データから前記被写体各部までの距離を算出して立体画像データを生成する画像処理方法において、
前記2つの画像データを入力し、
該入力された前記画像データの全ての画素を読み出し、
前記立体画像データを保存するために設定された保存データサイズの大きさに応じた間引き率で、前記2つの画像データのうちの一方の画像データを構成する画素を間引き、
該間引き後の画素について前記距離を算出することを特徴とするものである。
A first imaging processing method of the present invention is an image processing method for generating stereoscopic image data by calculating a distance to each part of the subject from two image data obtained by imaging the subject from two viewpoints.
Input the two image data,
Read all the pixels of the input image data,
Thinning out pixels constituting one of the two image data at a thinning rate according to the size of the storage data size set for storing the stereoscopic image data,
The distance is calculated for the pixels after the thinning.
また本発明の第二の撮像処理方法は、被写体を2つの視点から撮像して得た2つの画像データから前記被写体各部までの距離を算出して立体画像データを生成する画像処理方法において、
前記2つの画像データを入力し、
該入力された前記画像データの全ての画素を読み出し、
該読み出された前記全ての画素について前記距離を算出し、
前記立体画像データを保存するために設定された保存データサイズの大きさに応じた間引き率で、前記距離算出手段により算出された距離のデータを合成するか、又は間引くことによりデータサイズを低減することを特徴とするものである。
A second imaging processing method of the present invention is an image processing method for generating stereoscopic image data by calculating a distance to each part of the subject from two image data obtained by imaging the subject from two viewpoints.
Input the two image data,
Read all the pixels of the input image data,
Calculating the distance for all the read pixels;
The data size is reduced by synthesizing or thinning out the distance data calculated by the distance calculation means at a thinning rate according to the size of the storage data size set for storing the stereoscopic image data. It is characterized by this.
また本発明の第一の画像処理プログラムは、コンピュータに、被写体を2つの視点から撮像して得た2つの画像データから前記被写体各部までの距離を算出して立体画像データを生成することを実行させるための画像処理プログラムにおいて、
前記2つの画像データを入力し、
該入力された前記画像データの全ての画素を読み出し、
前記立体画像データを保存するために設定された保存データサイズの大きさに応じた間引き率で、前記2つの画像データのうちの一方の画像データを構成する画素を間引き、
該間引き後の画素について前記距離を算出することを実行させるためのものである。
Further, the first image processing program of the present invention executes to generate a stereoscopic image data by calculating a distance to each part of the subject from two image data obtained by imaging the subject from two viewpoints. In an image processing program for
Input the two image data,
Read all the pixels of the input image data,
Thinning out pixels constituting one of the two image data at a thinning rate according to the size of the storage data size set for storing the stereoscopic image data,
This is for causing the distance to be calculated for the pixels after the thinning.
また本発明の第二の画像処理プログラムは、コンピュータに、被写体を2つの視点から撮像して得た2つの画像データから前記被写体各部までの距離を算出して立体画像データを生成することを実行させるための画像処理プログラムにおいて、
前記2つの画像データを入力し、
該入力された前記画像データの全ての画素を読み出し、
該読み出された前記全ての画素について前記距離を算出し、
前記立体画像データを保存するために設定された保存データサイズの大きさに応じた間引き率で、前記距離算出手段により算出された距離のデータを合成するか、又は間引くことによりデータサイズを低減することを実行させるためのものである。
Further, the second image processing program of the present invention executes to generate a stereoscopic image data by calculating a distance to each part of the subject from two image data obtained by imaging the subject from two viewpoints. In an image processing program for
Input the two image data,
Read all the pixels of the input image data,
Calculating the distance for all the read pixels;
The data size is reduced by combining or thinning out the distance data calculated by the distance calculation means at a thinning rate according to the size of the storage data size set for storing the stereoscopic image data. To make things happen.
第一の発明によれば、入力された2つの画像データの全ての画素を読み出し、被写体各部までの距離を算出する前に、立体画像データを保存するために設定された保存データサイズの大きさに応じた間引き率で、一方の画像データについてのみこの画像データを構成する画素を間引き、間引き後の画素についてのみ前記距離を算出するので、距離の算出には全ての画素値を使用することができると共に必要な画素についてのみ距離の算出ができることにより、測距精度を下げることなく保存データのサイズを低減することができると共に距離の算出に要する時間を低減することができる。 According to the first invention, before reading all the pixels of the two input image data and calculating the distance to each part of the subject, the size of the storage data size set to store the stereoscopic image data Since the pixels constituting this image data are thinned out only for one image data at the thinning rate according to the above, and the distance is calculated only for the pixels after thinning, it is possible to use all pixel values for calculating the distance. In addition, since the distance can be calculated only for necessary pixels, the size of stored data can be reduced without lowering the distance measurement accuracy, and the time required for calculating the distance can be reduced.
また第二の発明によれば、入力された2つの画像データの全ての画素を読み出し、全ての画素について被写体各部までの距離を算出して、距離の算出後に、立体画像データを保存するために設定された保存データサイズの大きさに応じた間引き率で前記距離のデータを合成するか、又は間引いてデータサイズを低減するので、距離の算出には全ての画素値を使用することができると共に必要な距離データのみを記録できることにより、測距精度を下げることなく保存データのサイズを低減することができる。 According to the second invention, all the pixels of the two input image data are read out, the distance to each part of the subject is calculated for all the pixels, and after the distance is calculated, the stereoscopic image data is stored. Since the data of the distance is synthesized at a thinning rate according to the set storage data size or thinned to reduce the data size, all pixel values can be used for calculating the distance. Since only necessary distance data can be recorded, the size of stored data can be reduced without lowering the distance measurement accuracy.
以下、本発明にかかる第一の実施形態の画像処理装置1について、図面を参照して詳細に説明する。図1は本実施形態の画像処理装置1の機能構成を示すブロック図である。本実施形態の画像処理装置1は、図1に示す如く、画像入力部(画像入力手段)10、操作部11、表示制御部12、モニタ13、読出部(読出手段)14、保存データサイズ設定部15、間引き部(間引き手段)16、距離算出部(距離算出手段)17、データ圧縮部18、メディア制御部19、記録メディア20、内部メモリ21等を備えており、これらはデータバス22を介して、各種信号、データの送受信を行う。
Hereinafter, an
画像入力部10は、画像を入力するものであり、被写体を2つの視点から撮像して得た2つの画像データが入力される。なお本実施形態では入力される画像データを2つとしたが、異なる視点から撮像された、いわゆる視差画像のデータであれば3つや4つ等の複数の画像データを入力してもよい。
The
操作部11は、動作モードスイッチ、メニュー/OKボタン、上下レバー、左右ボタン、Back(戻り)ボタン、表示切替ボタン、レリーズボタン、電源スイッチ等で構成されるものであり、ユーザがこれらを操作することにより各種設定を行う。
The
表示制御部12は、画像入力部10により入力された画像をモニタ13に表示させる他に、後述の距離算出部17により算出された被写体各部までの距離データつまり奥行きデータに基づいて生成された被写体の立体画像をモニタ13に表示することができる。また表示制御部12は、後述の記録メディア20に記録され、メディア制御部19によって読み出された立体画像データに基づく立体画像をモニタ13に表示させる。
The
モニタ13は、表示制御部12を介して平面画像又は立体画像を表示するものであり、操作部11によって設定操作される各種設定メニュー等も表示する。
The
読出部14は、画像入力部10により入力された画像データを構成する全ての画素の画素値を読み出す。なお読み出された画素値に基づいて公知の変換処理を行うことにより全ての画素について輝度値等の情報を得ることができる。
The
保存データサイズ設定部15は、被写体を2つの視点から撮像して得た2つの画像データから算出される距離データの保存データサイズを設定する。保存データサイズの設定は、ユーザが操作部11を操作することによって行うことができる。
The saved data
間引き部16は、入力された2つの画像データのうちの一方の画像データ、すなわち被写体各部までの距離を算出するときに基準となる画像データを構成する画素を、保存データサイズ部16により設定された保存データサイズの大きさに応じた間引き率で間引くものである。
In the thinning-out
距離算出部17は、間引き部16による間引き後の画素について、2つの画像データから被写体各部までの距離を算出する。なお間引き部16による間引き方法及び距離算出部17による距離の算出方法は、後で詳細に説明する。
The
データ圧縮部18は、算出された距離データを圧縮処理するものであり、圧縮された距離データはメディア制御部19を介して記録メディア20に記録される。
The
メディア制御部19は、記録メディア20に記憶された距離データ等の読み出し、又は距離データ等の書き込みを行う。
The
記録メディア20は、距離データ等の各種データを記憶可能な記録媒体であり、磁気的又は光学的記録媒体、半導体メモリ等によって構成されている。
The
内部メモリ21は、画像処理装置1において設定される各種定数やプログラム等を格納するものであって、画像入力部10により入力された画像データや距離算出部17により算出された距離データ等を記憶するバッファメモリとしても機能する。
The
本実施形態の画像処理装置1は上記のように構成されている。次に画像処理装置1による画像処理について説明する。図2は画像処理装置1による一連の画像処理のフローチャート、図3は間引き部16による間引きの一例である。
The
本実施形態の画像処理装置1は、図2に示す如く、画像入力部10が2つの画像データA、Bを入力し(ステップS1)、読出部14が画像データA及び画像データBの全ての画素における画素値を読み出す(ステップS2)。
In the
また画像処理装置1は、保存データサイズ設定部16が設定した保存データサイズの大きさを判別する(ステップS3)。このとき保存データサイズの大きさは、ユーザが操作部11を操作することによって予め設定されている。
Further, the
そして保存データサイズがフルサイズである場合には(ステップS3;フルサイズ)、図3の左図に示す画像データA1又は画像データA2の如く、間引きを行わずに距離算出部17が全ての画素を用いて被写体各部までの距離を算出する(ステップS4)。
When the stored data size is full size (step S3; full size), the
一方、保存データサイズが例えば半分のサイズである場合には(ステップS3;半分サイズ)、間引き部16が間引き率の50%で、2つの画像データA、Bのうちの一方の画像データ(本実施形態では画像データA)を構成する画素を間引く。
On the other hand, when the stored data size is, for example, half (step S3; half size), the thinning
間引き部16による間引き方法としては、保存データサイズ設定部15が設定した保存データサイズが半分のサイズである場合には、例えば図3の真ん中の上図に示す画像データA1の如く、一画素毎に交互に距離算出を行う画素と行わない画素とを決定し、距離算出を行わない画素を間引く。また図3の真ん中の下図に示す画像データA2の如く、一列毎に交互に距離算出を行う画素の列と行わない画素の列とを決定し、距離算出を行わない画素の列を間引いてもよい。
As a thinning method by the thinning
なお本実施形態では、保存データサイズを半分のサイズとしたが例えば1/4のサイズ等、別のサイズであってもよい。1/4のサイズの場合例えば図3の右上図に示す画像データA1の如く、2×2の画素において1つの画素が距離算出行う画素、他の3つの画素が距離算出を行わない画素となるように、例えば奇数の列は一画素毎に交互に距離算出を行う画素と行わない画素とを決定し、偶数の列は距離算出を行わない画素の列としてもよい。また図3の右下図に示す画像データA2の如く、4列の画素において1列が距離算出を行う画素の列、他の3列が距離算出を行わない画素の列となるように、例えば1列目及び4の倍数列のみを距離算出を行う列としてもよい。このように保存データサイズの大きさに応じて間引き率を変更する。 In the present embodiment, the storage data size is halved, but may be another size such as a quarter size. In the case of the 1/4 size, for example, as in the image data A1 shown in the upper right diagram of FIG. 3, one pixel in the 2 × 2 pixels is a pixel for which distance calculation is performed, and the other three pixels are pixels for which distance calculation is not performed. As described above, for example, odd-numbered columns may alternately determine pixels for which distance calculation is performed and pixels for which distance calculation is not performed, and even-numbered columns may be columns of pixels for which distance calculation is not performed. Further, as in the image data A2 shown in the lower right diagram of FIG. 3, for example, 1 of the 4 columns of pixels is a column of pixels for which distance calculation is performed, and the other 3 columns are columns of pixels for which distance calculation is not performed. Only the column and multiple columns of 4 may be columns for calculating the distance. In this way, the thinning rate is changed according to the size of the stored data size.
なお本実施形態では、距離算出を行う画素を画像データA1又は画像データA2のように決定したが、本発明はこれに限られるものではない。ここで保存データサイズ設定部15が設定した保存データサイズが1/4のサイズである場合の間引き部16による別の間引き方法について説明する。図4は画像データAの一例、図5は間引き部16による間引き処理のフローチャートである。
In the present embodiment, the pixel for calculating the distance is determined like the image data A1 or the image data A2, but the present invention is not limited to this. Here, another thinning method by the thinning
間引き部16は、例えば図4に示す如く、a2b2、a2b3、a3b2、a3、b3の4つの画素A、B、C、Dの中から距離算出を行う画素を決定すべく、図5に示す如く、iにA〜Dを順に代入し(ステップS10)、画素A〜DについてそれぞれステップS11〜ステップS19の処理を実行する。
For example, as shown in FIG. 4, the thinning-out
先ず画素iと、画素iの上の画素(例えば画素Aのときにはa1b1)の輝度差を求めて、iuとする(ステップS11)。次に画素iと、画素iの下の画素(例えば画素Aのときには画素C)の輝度差を求めてidとし(ステップS12)、画素iと、画素iの左の画素(例えば画素Aのときにはa2b1)の輝度差を求めてilとして(ステップS13)、画素iと、画素iの右の画素(例えば画素Aのときには画素B)の輝度差を求めてirとする(ステップS14)。 First, a luminance difference between the pixel i and a pixel above the pixel i (for example, a1b1 in the case of the pixel A) is obtained and set as iu (step S11). Next, the luminance difference between the pixel i and the pixel below the pixel i (for example, the pixel C for the pixel A) is obtained as id (step S12), and the pixel i and the pixel to the left of the pixel i (for example, the pixel A, for example) The luminance difference of a2b1) is obtained as il (step S13), and the luminance difference between the pixel i and the pixel to the right of the pixel i (for example, the pixel B in the case of the pixel A) is obtained as ir (step S14).
そしてステップS11からステップS14にて算出された輝度差iu、id、il。irのうち最も大きい輝度差を判別し(ステップS15)、輝度差iuが最も大きい輝度差である場合には(ステップS15;iu)、iuをMiとしてバッファメモリ(内部メモリ)21に記憶する(ステップS16)。 The luminance differences iu, id, il calculated in steps S11 to S14. The largest luminance difference among ir is discriminated (step S15), and when the luminance difference iu is the largest luminance difference (step S15; iu), iu is stored as Mi in the buffer memory (internal memory) 21 ( Step S16).
また輝度差idが最も大きい輝度差である場合には(ステップS15;id)、idをMiとして、輝度差ilが最も大きい輝度差である場合には(ステップS15;il)、ilをMiとして、輝度差irが最も大きい輝度差である場合には(ステップS15;ir)、irをMiとしてそれぞれバッファ(内部メモリ)21に記憶する(ステップS17〜ステップS19)。 When the luminance difference id is the largest luminance difference (step S15; id), id is set to Mi. When the luminance difference il is the largest luminance difference (step S15; il), il is set to Mi. When the luminance difference ir is the largest luminance difference (step S15; ir), ir is stored as Mi in the buffer (internal memory) 21 (step S17 to step S19).
次にステップS16〜ステップS19にて画素A〜Dについてそれぞれバッファ(内部メモリ)21に記憶されたMA〜MDのうち最も大きい輝度差であるものを判別し(ステップS20)、輝度差MAが最も大きい輝度差である場合には(ステップS20;MA)、画素Aの距離算出(ステップS21)、輝度差MBが最も大きい輝度差である場合には(ステップS20;MB)、画素Bの距離算出(ステップS22)、輝度差MCが最も大きい輝度差である場合には(ステップS20;MC)、画素Cの距離算出(ステップS23)、輝度差MDが最も大きい輝度差である場合には(ステップS20;MD)、画素Dの距離算出をそれぞれ行う(ステップS24)。 Next, in steps S16 to S19, the pixel A to D that has the largest luminance difference among the MA to MD stored in the buffer (internal memory) 21 is determined (step S20), and the luminance difference MA is the largest. When the luminance difference is large (step S20; MA), the distance calculation of the pixel A (step S21), and when the luminance difference MB is the largest luminance difference (step S20; MB), the distance calculation of the pixel B is calculated. (Step S22) When the luminance difference MC is the largest luminance difference (Step S20; MC), the distance calculation of the pixel C (Step S23), and when the luminance difference MD is the largest luminance difference (Step S22) S20; MD) and distance calculation of the pixel D are performed (step S24).
なお画像データAを構成する画素全てにおいて同様の処理を行って、距離算出を行う画素と距離算出を行わない画素を決定し、距離算出を行わない画素を間引くことにより画像データAを構成する画素の3/4を間引いて間引き処理を終了する。 The same processing is performed on all the pixels constituting the image data A, the pixels for which the distance calculation is performed and the pixels for which the distance calculation is not performed are determined, and the pixels which form the image data A are thinned out. Is thinned out to finish the thinning process.
このように輝度差が大きい画素について距離算出を行うことにより、輝度差が大きい画素はエッジすなわち被写体の輪郭部分である可能性が高いため、被写体精度が高くなり距離データの精度を高くすることができる。 By calculating the distance for pixels with a large luminance difference in this way, it is highly possible that a pixel with a large luminance difference is an edge, that is, a contour portion of the subject, so that the subject accuracy is increased and the accuracy of the distance data is increased. it can.
上記のようにして間引き部16による間引き処理が行われると(ステップS5)、図2に示す如く、距離算出部17が間引き部16による間引き後の画素を用いて距離の算出を行う(ステップS6)。ここで図6Aに画像データAと画像データBの一例、図6Bに図6A中のブロックWijの一例をそれぞれ示す。なお本実施形態では、図6Aの画像データAは距離算出を行う画素(図中丸印)と行わない画素(図中バツ印)が一画素毎に交互に決定されたものとして以下説明する。
When the thinning process is performed by the thinning
距離算出部17は、図6A左図に示す如く、画像データAにおいて基準となる画素をAa2Ab2画素とした場合に、Aa2Ab2画素は間引き部16によって距離算出する画素(丸印)に決定されているため、距離算出を行う。距離算出は先ずAa2Ab2画素と該画素の周囲の画素で形成される例えば図6Bに示すような3×3の画素のブロックW22を構成し、図6A右図に示す如く、画像データB中で例えば水平方向にブロックW22を順にずらしながら濃淡等の形状パターンの一致度評価値(相関度)を計算して、画像データBにおいてブロックW22と対応するブロックWijを検出する。なお前記一致度評価値の計算は、例えば各画素の差の絶対値を合計する、または各画素の差を2乗したものを合計するなど、公知の技術を使用することができる。
As shown in the left diagram of FIG. 6A, the
そして画像データAと画像データBにおいて対応するブロックWijの位置情報から視差を算出し、この視差に基づいて三角測量の原理により被写体までの距離を算出する。そして次に図6A左図に示す如く、基準となる画素を水平方向に一画素ずらし、Aa2Ab3画素を基準とするブロックW23を構成する。しかしながらAa2Ab3画素は間引き部16によって距離算出しない画素(バツ印)に決定されている画素であるため、距離算出は行わずに、基準となる画素を水平方向にさらに一画素ずらして上記と同様の処理を行う。 Then, the parallax is calculated from the position information of the corresponding block Wij in the image data A and the image data B, and the distance to the subject is calculated based on the parallax based on the principle of triangulation. Next, as shown in the left diagram of FIG. 6A, the reference pixel is shifted by one pixel in the horizontal direction to form a block W23 based on Aa2Ab3 pixels. However, since the Aa2Ab3 pixels are pixels that are determined not to be distance-calculated by the thinning-out unit 16 (X), the distance is not calculated and the reference pixel is further shifted in the horizontal direction by one pixel in the same manner as described above. Process.
このように間引き部16により距離算出を行うことが決定された画素についてのみ距離算出を行って被写体までの距離データを得るので、距離データを得るのに要する時間を短縮することができる。また読出部14が画像データAを構成する全ての画素について画素値を読み出しているので距離算出を行うときに、図6Bに示す如く、距離算出を行わない画素(図中バツ印)つまり間引かれる画素を使用することができる。従って例えば間引かれる画素が特徴的な形状パターンの一部を有するものであっても距離算出時には使用することができるので、測距精度を下げることなくデータサイズを低減することができる。
As described above, the distance calculation is performed only for the pixels for which the distance calculation is determined by the thinning
なお上記距離算出方法は、いわゆる領域ベースマッチング(area-based matching)といわれる方法を使用したが、本発明はこれに限られるものではなく、先に画像データからエッジやセグメント等の特徴点を見つけ出し、画像データAと画像データBにおけるこの特徴点の相関度から画像データA及び画像データB間の対応を検出して、該対応に基づいて三角測量の原理により被写体までの距離を算出する、いわゆる特徴ベースマッチング(feature-based matching)といわれる方法等を使用しても良い。ここで図7Aに画像データAと画像データBの別の一例、図7Bに図7A中のブロックWAの一例を示す。 The distance calculation method used is a so-called area-based matching method, but the present invention is not limited to this. First, feature points such as edges and segments are found from image data. The correspondence between the image data A and the image data B is detected from the correlation between the feature points in the image data A and the image data B, and the distance to the subject is calculated based on the correspondence based on the principle of triangulation. A method called feature-based matching may be used. Here, FIG. 7A shows another example of the image data A and image data B, and FIG. 7B shows an example of the block WA in FIG. 7A.
特徴ベースマッチング方法を使用する場合、図7A左図に示す如く、前記特徴点を含む画素で構成するブロックWAにおいて、図7Bに示す如く、基準となる画素を例えば中央のAa2Ab2画素に設定し、この基準となる画素が間引き部16により決定された距離算出を行う画素(丸印)であるブロックWAについてのみ、図7A右図に示す如く、画像データBにおいてブロックWBを走査させながらブロックWAと相関度の高いブロックWB’を検出し、ブロックWAとブロックWB間の距離を算出し三角測量の原理に基づいて距離算出を行うようにする。
When using the feature-based matching method, as shown in the left diagram of FIG. 7A, in the block WA composed of pixels including the feature points, as shown in FIG. 7B, for example, the reference pixel is set to the center Aa2Ab2 pixel, Only the block WA whose reference pixel is a pixel (circle) for which the distance calculation determined by the thinning
これにより特徴点を検出するときに画像データを構成する全ての画素が読み出されているので、特徴点を含む画素が読み出しされず間引かれてしまうことにより対応点が見つからなくなるのを防止することができて特徴点の検出精度の低減を防止することができる。また特徴点を含む画素で構成するブロックWAにおいて、例えばAa2Ab1等の間引かれる画素(バツ印)を使用することができるので、上記と同様に測距精度を下げることなくデータサイズを低減することができる。 As a result, since all the pixels constituting the image data are read when the feature points are detected, it is possible to prevent the corresponding points from being lost because the pixels including the feature points are not read and thinned out. Therefore, it is possible to prevent a reduction in detection accuracy of feature points. Further, in the block WA composed of pixels including the feature points, for example, pixels (cross marks) thinned out such as Aa2Ab1 can be used, so that the data size can be reduced without lowering the ranging accuracy as described above. Can do.
距離算出部17は上記のようにして被写体各部までの距離の算出を行う。そして図2に示す如く、距離を算出して距離データを取得すると(ステップS6)、次にデータ圧縮部18が算出した距離データを圧縮し、メディア制御部19が圧縮された距離データを記録メディア20に記録して(ステップS7)、画像処理装置1による画像処理を終了する。
The
本実施形態の画像処理装置1によれば、入力された2つの画像データA,Bの全ての画素を読み出し、被写体各部までの距離を算出する前に、保存データサイズ設定部15により設定された保存データサイズの大きさに応じた間引き率で、画像データAについてのみ画像データAを構成する画素を間引き、間引き後の画素についてのみ前記距離を算出するので、距離の算出には全ての画素値を使用することができると共に必要な画素についてのみ距離の算出ができることにより、測距精度を下げることなく保存データのサイズを低減することができると共に距離の算出に要する時間を低減することができる。
According to the
次に本発明にかかる第二の実施形態の画像処理装置1−2について、図面を参照して詳細に説明する。図8は本実施形態の画像処理装置1−2の機能構成を示すブロック図である。なお本実施形態では便宜上、図8において上記実施形態の画像処理装置1のブロック図(図1)と同様の箇所は同じ符号で示して説明を省略する。
Next, an image processing apparatus 1-2 according to the second embodiment of the present invention will be described in detail with reference to the drawings. FIG. 8 is a block diagram showing a functional configuration of the image processing apparatus 1-2 of the present embodiment. In this embodiment, for the sake of convenience, in FIG. 8, the same parts as those in the block diagram (FIG. 1) of the
本実施形態の画像処理装置1−2は、距離算出部17’が上記実施形態とは異なるものであり、距離算出部17’は読出部14によって読み出された全ての画素について被写体各部までの距離を算出するものである。
The image processing apparatus 1-2 according to the present embodiment is different from the above embodiment in the
また本実施形態では間引き部16は備えずに、データサイズ低減部23を備えている。データサイズ低減部23は、保存データサイズ設定部15により設定された保存データサイズの大きさに応じた間引き率で、距離算出部17’により算出された距離のデータを合成又は間引くことによりデータサイズを低減するものである。なおデータサイズ低減部23によるデータサイズの低減方法は後で詳細に説明する。
In this embodiment, the thinning
本実施形態の画像処理装置1−2は上記のように構成されている。次に画像処理装置1−2による画像処理について説明する。図9は画像処理装置1−2による一連の画像処理のフローチャート、図10(a)はデータサイズ低減部23による距離データの間引きの一例、図10(b)はデータサイズ低減部23による距離データの合成の一例である。 The image processing apparatus 1-2 of the present embodiment is configured as described above. Next, image processing by the image processing apparatus 1-2 will be described. FIG. 9 is a flowchart of a series of image processing performed by the image processing apparatus 1-2, FIG. 10A is an example of thinning of distance data by the data size reduction unit 23, and FIG. 10B is distance data by the data size reduction unit 23. It is an example of the synthesis | combination of.
本実施形態の画像処理装置1−2は、図9に示す如く、画像入力部10が2つの画像データA、Bを入力し(ステップS30)、読出部14が画像データA及び画像データBの全ての画素における画素値を読み出す(ステップS31)。
In the image processing apparatus 1-2 of the present embodiment, as shown in FIG. 9, the
次に距離算出部17’が、画像データAを構成する全ての画素について被写体各部までの距離を算出する(ステップS32)。このとき算出された距離のデータは、バッファ21に記憶しておく。なお距離の算出方法としては上記実施形態と同様の三角測量の原理を用いる方法を使用することができる。そして画像処理装置1−2は、保存データサイズ設定部16が設定した保存データサイズの大きさを判別する(ステップS33)。このとき保存データサイズの大きさは、ユーザが操作部11を操作することによって予め設定されている。
Next, the distance calculation unit 17 'calculates the distance to each part of the subject for all the pixels constituting the image data A (step S32). The distance data calculated at this time is stored in the
そして保存データサイズがフルサイズである場合には(ステップS33;フルサイズ)、図10(a)又は図10(b)の左図に示す画像データA3又は画像データA4の如く、間引きや合成を行わずに距離算出部17’により画像データAを構成する全ての画素について算出された距離データをデータ圧縮部18が圧縮した後で、圧縮された記録データをメディア制御部19が記録メディア20に記録する(ステップS34)。
If the stored data size is the full size (step S33; full size), thinning or combining is performed as in the image data A3 or the image data A4 shown in the left diagram of FIG. 10A or 10B. After the
一方、保存データサイズが例えば半分のサイズである場合には(ステップS33;半分サイズ)、データサイズ低減部23が50%の間引き率で、距離算出部17’により算出された距離データを合成するか、又は間引くことによりデータサイズを半分に低減する(ステップS35)。
On the other hand, when the stored data size is, for example, half (step S33; half size), the data size reduction unit 23 synthesizes the distance data calculated by the
データサイズ低減部23による間引き方法としては、上記実施形態の間引き部16と概略同様の間引き方法を使用することができ、図10(a)に示す如く、画像データAを構成する画素において記録を行う画素と行わない画素を決定し、記録を行わない画素について算出された距離のデータを間引く。
As a thinning method by the data size reduction unit 23, a thinning method substantially similar to the thinning
またデータサイズ低減部23による合成方法としては、間引き率が50%つまり1/2画素分の距離のデータを記録するときには、図10(b)の真ん中の図に示す如く、例えば上下の2画素、a1b1画素とa2b1画素について算出された距離のデータを合成するか、又はどちらか一方を選択して1つの距離データとし、間引き率が75%つまり1/4画素分の距離のデータを記録するときには、例えば隣接する4画素、a1b1画素、a1b2画素、a2b1画素及びa2b2画素について算出された距離のデータを合成するか、又は4つの距離のデータから1つを選択して1つの距離データとする。この距離データは最大値、最小値、中央値を選択してもよいし、平均値を用いても良い。 Further, as a combining method by the data size reduction unit 23, when recording data with a thinning rate of 50%, that is, a distance of 1/2 pixel, as shown in the middle diagram of FIG. , The distance data calculated for the a1b1 pixel and the a2b1 pixel are combined, or one of them is selected as one distance data, and the data of the distance for the thinning rate is 75%, that is, 1/4 pixel is recorded. Sometimes, for example, the distance data calculated for the adjacent four pixels, a1b1 pixel, a1b2 pixel, a2b1 pixel, and a2b2 pixel are combined, or one of the four distance data is selected as one distance data. . As this distance data, a maximum value, a minimum value, or a median value may be selected, or an average value may be used.
ここで図11にデータサイズ低減部23によるデータサイズ低減処理のフローチャートを示す。なお便宜上、図11において図5と同じ処理は同じステップ番号で示して説明を省略する。 FIG. 11 shows a flowchart of the data size reduction process by the data size reduction unit 23. For the sake of convenience, the same processing in FIG. 11 as in FIG.
データ低減部23は、例えば図4に示す如く、a2b2、a2b3、a3b2、a3、b3の画素A、B、C、Dの中から距離データの記録を行う画素を決定すべく、図11に示す如く、iにA〜Dを順に代入し(ステップS10)、画素A〜DについてそれぞれステップS11〜ステップS19処理を実行して輝度差Miをバッファ21に記憶する。
For example, as shown in FIG. 4, the data reduction unit 23 is shown in FIG. 11 in order to determine a pixel for recording distance data from the pixels A, B, C, and D of a2b2, a2b3, a3b2, a3, and b3. As described above, A to D are sequentially substituted for i (step S10), and the processes of steps S11 to S19 are executed for the pixels A to D, respectively, and the luminance difference Mi is stored in the
次にステップS16〜ステップS19にてそれぞれバッファ(内部メモリ)21に記憶されたMA〜MDのうち最も大きい輝度差を判別し(ステップS20)、輝度差MAが最も大きい輝度差である場合には(ステップS20;MA)、図9のステップS32にて画素Aについて算出された距離DAを、記録する距離データとする(ステップS41)。 Next, in step S16 to step S19, the largest luminance difference among the MA to MD stored in the buffer (internal memory) 21 is determined (step S20), and when the luminance difference MA is the largest luminance difference. (Step S20; MA) The distance DA calculated for the pixel A in Step S32 of FIG. 9 is used as distance data to be recorded (Step S41).
また輝度差MBが最も大きい輝度差である場合には(ステップS20;MB)、画素Bについて算出された距離DBを記録する距離データとし(ステップS42)、輝度差MCが最も大きい輝度差である場合には(ステップS20;MC)、画素Cについて算出された距離DCを記録する距離データとし(ステップS43)、輝度差MDが最も大きい輝度差である場合には(ステップS20;MD)、画素Dについて算出された距離DDを記録する距離データとする(ステップS44)。 When the luminance difference MB is the largest luminance difference (step S20; MB), the distance DB calculated for the pixel B is recorded as distance data (step S42), and the luminance difference MC is the largest luminance difference. In this case (step S20; MC), the distance DC calculated for the pixel C is recorded as distance data (step S43). When the luminance difference MD is the largest luminance difference (step S20; MD), the pixel The distance DD calculated for D is used as distance data to be recorded (step S44).
なお画像データAを構成する画素全てにおいて同様の処理を行って、記録する距離データと記録しない距離データとを決定し、4つの画素についてそれぞれ算出された4つの距離データを1つの距離データにすることによりデータサイズを低減して処理を終了する。 The same processing is performed on all the pixels constituting the image data A to determine the distance data to be recorded and the distance data not to be recorded, and the four distance data calculated for each of the four pixels are converted into one distance data. As a result, the data size is reduced and the process is terminated.
このように輝度差が大きい画素について算出された距離を記録する距離データとすることにより、輝度差が大きい画素はエッジすなわち被写体の輪郭部分である可能性が高いため、被写体精度が高くなり距離データの精度を高くすることができる。 By using distance data to record the distance calculated for pixels with a large luminance difference in this way, it is highly possible that a pixel with a large luminance difference is an edge, that is, a contour portion of the subject, and therefore subject accuracy increases and distance data Accuracy can be increased.
次にデータサイズ低減部23による別の低減処理について説明する。図12に別のデータサイズ低減処理のフローチャートを示す。 Next, another reduction process by the data size reduction unit 23 will be described. FIG. 12 shows a flowchart of another data size reduction process.
データサイズ低減部23は、例えば図4に示す如く、a2b2、a2b3、a3b2、a3、b3の画素A、B、C、Dの中から距離データの記録を行う画素を決定すべく、図12に示す如く、iにA〜Dを順に代入し(ステップS50)、図9のステップS32で画素A〜Dについて距離を算出した時の相関度をCA、CB、CC、CDつまりCiとしてバッファ21に記憶する(ステップS51)。
For example, as shown in FIG. 4, the data size reduction unit 23 determines the pixel for recording distance data from among the pixels A, B, C, and D of a2b2, a2b3, a3b2, a3, and b3 in FIG. As shown, A to D are sequentially substituted for i (step S50), and the correlation when the distance is calculated for the pixels A to D in step S32 of FIG. 9 is stored in the
次に画素A〜Dにおけるそれぞれの相関度CA〜CDの中で最も大きい値を判別する(ステップS52)。このとき相関度の値が大きい程、画像データAと画像データBにおける被写体の一致度が高いものとする。 Next, the largest value among the respective correlation degrees CA to CD in the pixels A to D is determined (step S52). At this time, it is assumed that the larger the correlation value, the higher the degree of coincidence of the subject in the image data A and the image data B.
そして相関度CAの値が最も大きい場合(ステップS52;CA)には、図9のステップS32にて画素Aについて算出された距離を記録する距離データとし(ステップS53、相関度CBの値が最も大きい場合(ステップS52;CB)には、画素Bについて算出された距離を記録する距離データする(ステップS54)。また相関度CCの値が最も大きい場合(ステップS52;CC)には、画素Cについて算出された距離を記録する距離データと(ステップS55)、相関度CDの値が最も大きい場合(ステップS52;CD)には、画素Dについて算出された距離を記録する距離データとする(ステップS56)。 If the value of the correlation degree CA is the largest (step S52; CA), the distance data recorded for the pixel A in step S32 of FIG. 9 is recorded as distance data (step S53, the value of the correlation degree CB is the largest). When it is large (step S52; CB), distance data for recording the distance calculated for the pixel B is recorded (step S54), and when the value of the correlation CC is the largest (step S52; CC), the pixel C is recorded. And distance data for recording the distance calculated for the pixel D (step S55), and when the value of the correlation degree CD is the largest (step S52; CD), the distance data for the pixel D is recorded (step S52). S56).
なお画像データAを構成する画素全てにおいて同様の処理を行って、記録する距離データと記録しない距離データとを決定し、4つの画素についてそれぞれ算出された4つの距離データを1つの距離データにすることによりデータサイズを低減して処理を終了する。 The same processing is performed on all the pixels constituting the image data A to determine the distance data to be recorded and the distance data not to be recorded, and the four distance data calculated for each of the four pixels are converted into one distance data. As a result, the data size is reduced and the process is terminated.
このように相関度の値が大きい画素つまり相関度が高い画素について算出された距離を記録する距離データとすることにより、相関度が高い画素は、画像データAと画像データBとで被写体の一致度が高いので被写体精度が高くなり距離データの精度を高くすることができる。 Thus, by using distance data to record the distance calculated for a pixel having a high degree of correlation, that is, a pixel having a high degree of correlation, the pixel having a high degree of correlation matches the subject of image data A and image data B. Since the degree is high, the accuracy of the subject is increased and the accuracy of the distance data can be increased.
次にデータサイズ低減部23によるさらに別の低減処理について説明する。図13にさらに別のデータサイズ低減処理のフローチャートを示す。なお便宜上、図13において図12と同じ処理は同じステップ番号で示して説明を省略する。 Next, still another reduction process by the data size reduction unit 23 will be described. FIG. 13 shows a flowchart of still another data size reduction process. For convenience, the same processing as in FIG. 12 is denoted by the same step number in FIG.
データサイズ低減部23は、図13に示す如く、ステップS51にて相関度をCiとして記憶すると(ステップS51)、次に画素A〜Dについて、それぞれ下記式(1)を求める(ステップS57)。 As shown in FIG. 13, the data size reduction unit 23 stores the correlation degree as Ci in step S51 (step S51), and then obtains the following expression (1) for each of the pixels A to D (step S57).
Di’=Di×Ci/(CA+CB+CC+CD)・・・(1)
ここでCi/(CA+CB+CC+CD)は重み付け係数、Di’は重み付けされた距離である。
Di ′ = Di × Ci / (CA + CB + CC + CD) (1)
Here, Ci / (CA + CB + CC + CD) is a weighting coefficient, and Di ′ is a weighted distance.
そしてステップS57にて重み付けされた距離Di’(DA’、DB’、DC’、DD’)の値を下記式(2)へ代入して求められた距離Dを記録する距離データとする(ステップS58)。 Then, the distance data obtained by substituting the value of the distance Di ′ (DA ′, DB ′, DC ′, DD ′) weighted in step S57 into the following equation (2) is used as the distance data for recording (step). S58).
D=DA’+DB’+DC’+DD’・・・(2)
なお画像データAを構成する画素全てにおいて同様の処理を行って、4つの画素についてそれぞれ算出された4つの距離データを1つの距離データに合成することによりデータサイズを低減して処理を終了する。
D = DA ′ + DB ′ + DC ′ + DD ′ (2)
The same processing is performed on all the pixels constituting the image data A, and the four distance data calculated for the four pixels are combined into one distance data to reduce the data size and the processing is terminated.
このように相関度に応じた重み付けを行うことにより、精度の高い距離データを得ることができる。 Thus, by performing weighting according to the degree of correlation, highly accurate distance data can be obtained.
上記のようにしてデータサイズ低減部23がデータサイズの低減処理を行うと(スッテップS35)、図9に示す如く、データ圧縮部18がデータサイズ低減部23によるデータサイズ低減後の距離データを圧縮し、メディア制御部19が圧縮された距離データを記録メディア20に記録して(ステップS7)、画像処理装置1−2による画像処理を終了する。
When the data size reduction unit 23 performs the data size reduction process as described above (step S35), the
本実施形態の画像処理装置1−2によれば、入力された2つの画像データA,Bの全ての画素を読み出し、全ての画素について被写体各部までの距離を算出して、距離の算出後に、保存データサイズ設定部15により設定された保存データサイズの大きさに応じた間引き率で、保存データサイズの大きさに応じた間引き率で前記距離のデータを合成するか、又は間引いてデータサイズを低減するので、距離の算出には全ての画素値を使用することができると共に必要な距離データのみを記録できることにより、測距精度を下げることなく保存データのサイズを低減することができる。
According to the image processing apparatus 1-2 of the present embodiment, all the pixels of the two input image data A and B are read, the distances to the subject parts are calculated for all the pixels, and after calculating the distances, The data of the distance is synthesized with the thinning rate according to the size of the saved data size set by the saved data
次に、図14及び図15に上述した実施形態の画像入力部10の構成を示すブロック図の一例をそれぞれ示す。上述した実施形態の画像入力部10は、異なる視点から撮像された視差画像として少なくとも2つの画像データを入力するものであり、例えば1つのカメラが、順次視点を変えて撮像して得られた画像データを入力してもよい。
Next, an example of a block diagram showing the configuration of the
また画像入力部10として、図14(a)に示す如く、撮影レンズ等で構成される光学系10a−1、10a−2と、CCD等の撮像素子10b−1、10b−2と、A/D変換部10c−1、10c−2とを有し、異なる視点に位置する少なくとも2眼を備えた複眼カメラ10を使用してもよい。この場合、略同時に撮像された視差画像を得ることができる。
As the
また図14(b)に示す如く、上記と同様の光学系10a−1、10a−2と、1つの撮像素子10bと、1つのA/D変換部10cとを有し、光学系の後方に設けられた図示しないスイッチ等によって光学系10a−1と光学系10a−2をそれぞれ通過した被写体像1、2を交互に撮像素子10bの光電面に結像して、光電変換することにより、2つの視差画像を得るものであってもよい。
Further, as shown in FIG. 14B, the
また画像入力部10は、図15に示す如く、上記と同様の光学系10a−1と、撮像素子10b−1と、A/D変換部10c−1とを備えてなるカメラ10A及び上記と同様の光学系10a−2と、撮像素子10b−2と、A/D変換部10c−2とを備えてなるカメラ10Bの2つのカメラから構成されるものであってもよい。この場合カメラ10Aとカメラ10Bは異なる視点から撮像可能な位置に配設される。なお2つ以上のカメラから構成されるものであってもよい。
Further, as shown in FIG. 15, the
そして上記図14及び図15の画像入力部10は、該画像処理入力部10により得られた視差画像の画像データを、図2のステップS1又は図9のステップ30にて入力する。
14 and 15 inputs the image data of the parallax image obtained by the image
なお上記のように画像入力部10が複眼カメラ又は2つ以上のカメラにより構成されるものである場合には、撮像前に撮像素子10b又は10b−1、10b−2を図示しない撮像素子駆動部で駆動することにより、全画素を読み出さずに画素単位での間引き又は合成を行った後で、間引き又は合成後の画素を読み出しても良い。図16、図17に図14又は図15の画像入力部10を備えてなる画像処理装置1、1−2による一連の画像処理のフローチャートの一例をそれぞれ示す。なお便宜上、図16において図2と同様の処理、図17において図9及び図16と同様の処理はそれぞれ同じステップ番号で示して説明を省略する。
When the
画像処理装置1は、図16に示す如く、例えば2眼の複眼カメラ又は2つのカメラ(画像入力部10)が被写体を撮影し(ステップS60)、撮影時の撮影モードを判別する(ステップS61)。撮影時の撮影モードが測距モードである場合(ステップS61;測距モード)には、読出部14が撮影された画像データA及び画像データBの全ての画素における画素値を読み出した後(ステップS62)、ステップS3〜ステップS7の処理を行う。
In the
一方、撮影モードが測距モード以外である場合(ステップS61;その他)には、画像処理装置1は、保存データサイズ設定部16が設定した保存データサイズの大きさを判別する(ステップS63)。そして保存データサイズがフルサイズである場合には(ステップS63;フルサイズ)、全ての画素を読出し(ステップS64)、半分のサイズである場合には(ステップS63;半分サイズ)、前記撮像素子駆動部を駆動することにより2画素を合成して読み出して(ステップS65)、画像データA及び画像データBを生成する。このとき2画素から1画素を選択して読み出してもよい。
On the other hand, when the shooting mode is other than the distance measurement mode (step S61; other), the
なお合成する方法としては、平均値を用いてよいし、最大値、最小値を用いても良い。また設定された保存データの大きさが1/4サイズ等、半分よりも小さいサイズである場合には、中央値を用いても良い。 In addition, as a synthesis method, an average value may be used, or a maximum value and a minimum value may be used. In addition, when the set size of the stored data is a size smaller than half, such as a quarter size, a median value may be used.
次にA/D変換部10c又は10c-1、10c−2が、画像データA及び画像データBに対してA/D変換を行い(ステップS66)、図示しないデジタル信号処理部によって各種画像処理を行った後(ステップS67)、データ圧縮部18が画像処理後の画像データA及び画像データBを圧縮し、メディア制御部19が圧縮された画像データA及び画像データBを記録メディア20に記録する(ステップS68)。このようにして画像処理装置1による画像処理を終了する。
Next, the A /
また画像処理装置1−2は、図17に示す如く、ステップS61にて測距モードであると判別された場合(ステップS61;測距モード)に、図9と同様のステップS32〜ステップS34の処理を行い、測距モードではないその他のモードであると判別された場合(ステップS61;その他)に、図16と同様のステップS64〜ステップS38の処理を行う。このようにして画像処理装置1−2による画像処理を終了する。 Further, as shown in FIG. 17, when it is determined that the image processing device 1-2 is in the distance measurement mode in step S <b> 61 (step S <b> 61; distance measurement mode), steps S <b> 32 to S <b> 34 similar to FIG. 9 are performed. When it is determined that the mode is other than the distance measurement mode (step S61; other), the processing of step S64 to step S38 similar to FIG. 16 is performed. In this way, the image processing by the image processing apparatus 1-2 is finished.
上記のように複眼カメラ又は2つ以上のカメラを有する画像入力部10を備えた上記画像処理装置1又は上記画像処理装置1−2によれば、距離を算出する場合以外には、速度を優先してデータサイズの低減を行うことができる。
According to the
なお本発明の画像処理装置は、上述した実施形態の画像処理装置に限られるものではなく、本発明の趣旨を逸脱しない範囲において適宜設計変更可能である。 The image processing apparatus of the present invention is not limited to the image processing apparatus of the above-described embodiment, and can be appropriately changed in design without departing from the spirit of the present invention.
1、1−2 画像処理装置
10 画像入力部(画像入力手段)
10A、10B カメラ
10a−1、10a−2 光学系(レンズ)
14 読出部(読出手段)
15 保存データサイズ設定部
16 間引き部(間引き手段)
17、17’距離算出部(距離算出手段)
18 データ圧縮部
23 データサイズ低減部(データサイズ低減手段)
DESCRIPTION OF
10A,
14 Reading unit (reading means)
15 Saved data
17, 17 'distance calculation part (distance calculation means)
18 Data compression unit 23 Data size reduction unit (data size reduction means)
Claims (12)
前記2つの画像データを入力する画像入力手段と、
入力された前記画像データの全ての画素を読み出す読出手段と、
前記立体画像データを保存するために設定された保存データサイズの大きさに応じた間引き率で、前記2つの画像データのうちの一方の画像データを構成する画素を間引く間引き手段と、
該間引き手段による間引き後の画素について前記距離を算出する距離算出手段とを備えてなることを特徴とする画像処理装置。 In an image processing apparatus that generates stereoscopic image data by calculating the distance to each part of the subject from two image data obtained by imaging the subject from two viewpoints,
Image input means for inputting the two image data;
Reading means for reading out all pixels of the input image data;
Thinning means for thinning out pixels constituting one of the two image data at a thinning rate according to the size of the saved data size set for saving the stereoscopic image data;
An image processing apparatus comprising: a distance calculating unit that calculates the distance for the pixels after the thinning by the thinning unit.
前記2つの画像データを入力する画像入力手段と、
入力された前記画像データの全ての画素を読み出す読出手段と、
読み出された前記全ての画素について前記距離を算出する距離算出手段と、
前記立体画像データを保存するために設定された保存データサイズの大きさに応じた間引き率で、前記距離算出手段により算出された距離のデータを合成するか、又は間引くことによりデータサイズを低減するデータサイズ低減手段とを備えてなることを特徴とする画像処理装置。 In an image processing apparatus that generates stereoscopic image data by calculating the distance to each part of the subject from two image data obtained by imaging the subject from two viewpoints,
Image input means for inputting the two image data;
Reading means for reading out all pixels of the input image data;
Distance calculating means for calculating the distance for all the read pixels;
The data size is reduced by synthesizing or thinning out the distance data calculated by the distance calculation means at a thinning rate according to the size of the storage data size set for storing the stereoscopic image data. An image processing apparatus comprising: a data size reduction unit.
前記2つの画像データを入力し、
該入力された前記画像データの全ての画素を読み出し、
前記立体画像データを保存するために設定された保存データサイズの大きさに応じた間引き率で、前記2つの画像データのうちの一方の画像データを構成する画素を間引き、
該間引き後の画素について前記距離を算出することを特徴とする画像処理方法。 In an image processing method for generating stereoscopic image data by calculating a distance to each part of the subject from two image data obtained by imaging the subject from two viewpoints,
Input the two image data,
Read all the pixels of the input image data,
Thinning out pixels constituting one of the two image data at a thinning rate according to the size of the storage data size set for storing the stereoscopic image data,
An image processing method, wherein the distance is calculated for the thinned pixels.
前記2つの画像データを入力し、
該入力された前記画像データの全ての画素を読み出し、
該読み出された前記全ての画素について前記距離を算出し、
前記立体画像データを保存するために設定された保存データサイズの大きさに応じた間引き率で、前記距離算出手段により算出された距離のデータを合成するか、又は間引くことによりデータサイズを低減することを特徴とする画像処理方法。 In an image processing method for generating stereoscopic image data by calculating a distance to each part of the subject from two image data obtained by imaging the subject from two viewpoints,
Input the two image data,
Read all the pixels of the input image data,
Calculating the distance for all the read pixels;
The data size is reduced by synthesizing or thinning out the distance data calculated by the distance calculation means at a thinning rate according to the size of the storage data size set for storing the stereoscopic image data. An image processing method.
前記2つの画像データを入力し、
該入力された前記画像データの全ての画素を読み出し、
前記立体画像データを保存するために設定された保存データサイズの大きさに応じた間引き率で、前記2つの画像データのうちの一方の画像データを構成する画素を間引き、
該間引き後の画素について前記距離を算出することを実行させるための画像処理プログラム。 In an image processing program for causing a computer to calculate a distance to each part of the subject from two pieces of image data obtained by imaging the subject from two viewpoints and generate stereoscopic image data,
Input the two image data,
Read all the pixels of the input image data,
Thinning out pixels constituting one of the two image data at a thinning rate according to the size of the storage data size set for storing the stereoscopic image data,
An image processing program for executing the calculation of the distance for the pixels after the thinning.
前記2つの画像データを入力し、
該入力された前記画像データの全ての画素を読み出し、
該読み出された前記全ての画素について前記距離を算出し、
前記立体画像データを保存するために設定された保存データサイズの大きさに応じた間引き率で、前記距離算出手段により算出された距離のデータを合成するか、又は間引くことによりデータサイズを低減することを実行させるための画像処理プログラム。 In an image processing program for causing a computer to calculate a distance to each part of the subject from two pieces of image data obtained by imaging the subject from two viewpoints and generate stereoscopic image data,
Input the two image data,
Read all the pixels of the input image data,
Calculating the distance for all the read pixels;
The data size is reduced by combining or thinning out the distance data calculated by the distance calculation means at a thinning rate according to the size of the storage data size set for storing the stereoscopic image data. An image processing program for executing this.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007282974A JP5090857B2 (en) | 2007-10-31 | 2007-10-31 | Image processing apparatus, image processing method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007282974A JP5090857B2 (en) | 2007-10-31 | 2007-10-31 | Image processing apparatus, image processing method, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2009110356A true JP2009110356A (en) | 2009-05-21 |
JP5090857B2 JP5090857B2 (en) | 2012-12-05 |
Family
ID=40778772
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007282974A Expired - Fee Related JP5090857B2 (en) | 2007-10-31 | 2007-10-31 | Image processing apparatus, image processing method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5090857B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2012018013A (en) * | 2010-07-06 | 2012-01-26 | Ricoh Co Ltd | Ranging device and imaging apparatus |
JP2018511874A (en) * | 2015-03-17 | 2018-04-26 | アリババ グループ ホウルディング リミテッド | Three-dimensional modeling method and apparatus |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH01183962A (en) * | 1988-01-18 | 1989-07-21 | Nec Corp | Picture signal band compressing system |
JPH09289638A (en) * | 1996-04-23 | 1997-11-04 | Nec Corp | Three-dimensional image encoding/decoding system |
JPH10134187A (en) * | 1996-10-31 | 1998-05-22 | Nec Corp | Three-dimensional structure estimating device |
JP2002152501A (en) * | 2000-11-08 | 2002-05-24 | Fuji Photo Film Co Ltd | Method and system for reducing image and recording medium |
JP2003510702A (en) * | 1999-09-17 | 2003-03-18 | トムソン マルチメディア | How to build a 3D scene by analyzing a series of images |
JP2005092782A (en) * | 2003-09-19 | 2005-04-07 | Minolta Co Ltd | Method, apparatus and computer program for generating three-dimensional model, |
-
2007
- 2007-10-31 JP JP2007282974A patent/JP5090857B2/en not_active Expired - Fee Related
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH01183962A (en) * | 1988-01-18 | 1989-07-21 | Nec Corp | Picture signal band compressing system |
JPH09289638A (en) * | 1996-04-23 | 1997-11-04 | Nec Corp | Three-dimensional image encoding/decoding system |
JPH10134187A (en) * | 1996-10-31 | 1998-05-22 | Nec Corp | Three-dimensional structure estimating device |
JP2003510702A (en) * | 1999-09-17 | 2003-03-18 | トムソン マルチメディア | How to build a 3D scene by analyzing a series of images |
JP2002152501A (en) * | 2000-11-08 | 2002-05-24 | Fuji Photo Film Co Ltd | Method and system for reducing image and recording medium |
JP2005092782A (en) * | 2003-09-19 | 2005-04-07 | Minolta Co Ltd | Method, apparatus and computer program for generating three-dimensional model, |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2012018013A (en) * | 2010-07-06 | 2012-01-26 | Ricoh Co Ltd | Ranging device and imaging apparatus |
JP2018511874A (en) * | 2015-03-17 | 2018-04-26 | アリババ グループ ホウルディング リミテッド | Three-dimensional modeling method and apparatus |
US10789767B2 (en) | 2015-03-17 | 2020-09-29 | Alibaba Group Holding Limited | Reducing computational complexity in three-dimensional modeling based on two-dimensional images |
Also Published As
Publication number | Publication date |
---|---|
JP5090857B2 (en) | 2012-12-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5620651B2 (en) | REPRODUCTION DEVICE, IMAGING DEVICE, AND CONTROL METHOD THEREOF | |
CN107924572B (en) | System and method for performing high speed video capture and depth estimation using an array camera | |
JP6551743B2 (en) | Image processing apparatus and image processing method | |
US8373745B2 (en) | Image processing apparatus, image display apparatus, image apparatus, and image processing method | |
CN106576143A (en) | Image photographing apparatus and image photographing method | |
JP2012070389A (en) | Imaging device, method, and program | |
JP4692849B2 (en) | Stereoscopic image recording apparatus and stereoscopic image recording method | |
CN102801910A (en) | Image sensing device | |
US10074343B2 (en) | Three-dimensional image output apparatus and three-dimensional image output method | |
JP5467993B2 (en) | Image processing apparatus, compound-eye digital camera, and program | |
JP5526233B2 (en) | Stereoscopic image photographing apparatus and control method thereof | |
CN102739958B (en) | Imaging processing apparatus and image processing method | |
JP2012015674A (en) | Imaging device, operation control method for imaging device, and program for imaging device | |
JP5090857B2 (en) | Image processing apparatus, image processing method, and program | |
JP2005503086A (en) | Non-parallel optical axis real-time three-dimensional (stereoscopic) image processing system and method | |
KR20060023714A (en) | System and method for matching stereo image | |
US20090245584A1 (en) | Image processing apparatus, image processing method, and program | |
US10382676B2 (en) | Image display apparatus, image capturing apparatus, image display method, and storage medium | |
JP2013118459A (en) | Imaging apparatus and control method thereof | |
JP5895587B2 (en) | Image recording apparatus, image recording method, image reproducing apparatus, and image reproducing method | |
JP6406804B2 (en) | Image processing apparatus, image processing method and program, and imaging apparatus | |
KR100517876B1 (en) | Method and system for matching stereo image using a plurality of image line | |
CN104737527A (en) | Image processing device, imaging device, image processing method, and image processing program | |
CN114208153B (en) | Multi-shot image capture without anti-shake | |
US20220358667A1 (en) | Image processing apparatus and method, and image capturing apparatus and control method thereof, and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20100707 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20110728 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20110809 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20111011 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120515 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120712 |
|
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: 20120904 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20120913 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20150921 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5090857 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
LAPS | Cancellation because of no payment of annual fees |