JP2013115650A - Image processing device, image processing method, and computer program - Google Patents
Image processing device, image processing method, and computer program Download PDFInfo
- Publication number
- JP2013115650A JP2013115650A JP2011260662A JP2011260662A JP2013115650A JP 2013115650 A JP2013115650 A JP 2013115650A JP 2011260662 A JP2011260662 A JP 2011260662A JP 2011260662 A JP2011260662 A JP 2011260662A JP 2013115650 A JP2013115650 A JP 2013115650A
- Authority
- JP
- Japan
- Prior art keywords
- pixel
- image
- reference image
- color
- missing
- 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.)
- Pending
Links
Images
Landscapes
- Color Television Image Signal Generators (AREA)
Abstract
【課題】従来の複数枚超解像の方法よりもメモリの使用量を削減し、少ない枚数の低解像度画像で高解像化を行う画像処理装置を提供する。
【解決手段】画像処理装置が、ベイヤー配列を有する複数枚の画像から基準画像と非基準画像とを選択し、基準画像を拡大して拡大基準画像と保存用画像とを生成する。画像処理装置が、拡大基準画像の着目画素が非基準画像の参照画素と同色であるかを判断し、同色である場合に、この着目画素に参照画素を挿入する。また、画像処理装置が、拡大基準画像の着目画素が非基準画像の参照画素と同色でない場合に、所定の評価値に基づいて、挿入対象の参照画素を決定し、決定した参照画素を保存用画像の参照画素に挿入する。
【選択図】図1
The present invention provides an image processing apparatus that uses a smaller amount of memory than a conventional multiple-resolution super-resolution method and achieves high resolution with a small number of low-resolution images.
An image processing apparatus selects a reference image and a non-reference image from a plurality of images having a Bayer array, and enlarges the reference image to generate an enlarged reference image and a storage image. The image processing apparatus determines whether the target pixel of the enlarged standard image has the same color as the reference pixel of the non-standard image. If the target pixel has the same color, the reference pixel is inserted into the target pixel. In addition, when the target pixel of the enlarged standard image is not the same color as the reference pixel of the non-standard image, the image processing apparatus determines a reference pixel to be inserted based on a predetermined evaluation value, and stores the determined reference pixel for storage Insert into the reference pixel of the image.
[Selection] Figure 1
Description
本発明は、画像処理装置、画像処理方法およびコンピュータプログラムに関する。 The present invention relates to an image processing apparatus, an image processing method, and a computer program.
複数枚の低解像度画像を用いて、1枚の高解像度画像を作成する複数枚超解像が提案されている。複数枚超解像の技術はデジタルカメラにおいて、電子ズームの画質を上げるために用いられる。従来、画像処理装置は、ベイヤー配列の色フィルタを有する撮像素子により得られた低解像度画像を用いて、以下のように1枚の高解像度画像を作成していた。画像処理装置は、ベイヤー配列の低解像度画像から1枚の高解像度画像を作成する為に、出力と同じ解像度を有する画像を色成分毎に作成し、それぞれの画像について複数枚超解像の処理を実行する。 A plurality of super-resolutions that create one high-resolution image using a plurality of low-resolution images have been proposed. The multiple-image super-resolution technique is used in a digital camera to improve the image quality of electronic zoom. Conventionally, an image processing apparatus has created a single high-resolution image as follows using a low-resolution image obtained by an image sensor having a Bayer array color filter. In order to create a single high-resolution image from a Bayer-array low-resolution image, the image processing apparatus creates an image having the same resolution as the output for each color component, and processes multiple images for each image. Execute.
なお、特許文献1は、複数枚の低解像度画像から高解像度画像を色成分毎に作成する際に、G成分のみ複数枚超解像の処理を行い、R成分、B成分については1枚の画像で単純な補間処理を行い、高解像度画像を作成する画像処理システムを開示する。 In Patent Document 1, when a high-resolution image is created for each color component from a plurality of low-resolution images, a plurality of G components are subjected to super-resolution processing, and one R-component and B-component are processed. An image processing system that performs simple interpolation processing on an image to create a high-resolution image is disclosed.
出力と同じ解像度を有する画像を色成分毎に作成し複数枚超解像の処理を行う従来技術では、メモリを大量に使用してしまうという問題がある。また、この従来技術では、色成分毎の画像を出力と同じ解像度で必要とするので、欠落画素の補間に必要な低解像度画像の枚数が多くなるという問題がある。また、特許文献1が開示する画像処理システムでは、色成分毎に高解像度化の効果が大きく異なるという問題がある。 In the conventional technique in which an image having the same resolution as the output is generated for each color component and a plurality of super-resolution processes are performed, there is a problem that a large amount of memory is used. In addition, since this conventional technique requires an image for each color component at the same resolution as the output, there is a problem that the number of low-resolution images necessary for interpolation of missing pixels increases. Further, the image processing system disclosed in Patent Document 1 has a problem that the effect of increasing the resolution greatly differs for each color component.
本発明は、従来の複数枚超解像の方法よりもメモリの使用量を削減し、少ない枚数の低解像度画像で高解像化を行う画像処理装置の提供を目的とする。 It is an object of the present invention to provide an image processing apparatus that uses a smaller amount of memory than a conventional multiple-resolution super-resolution method and achieves high resolution with a small number of low-resolution images.
本発明の一実施形態の画像処理装置は、予め決められた第1の画素配列を有する複数枚の画像を撮像する撮影手段と、前記撮影された複数枚の画像から1枚の画像を基準画像を選択するとともに、前記複数枚の画像のうち前記基準画像以外の画像を非基準画像とする画像選択手段と、前記基準画像が有する画素の座標を前記非基準画像が有する画素の座標に変換する座標変換係数を算出し、該算出した座標変換係数を記憶手段に記憶する変換係数算出手段と、前記基準画像を予め決められた拡大倍率で拡大して拡大基準画像とする画像拡大手段と、前記拡大基準画像が有する画素のうち、前記第1の画素配列上に配置されている画素を第1の非欠落画素、該第1の画素配列上に配置されていない画素を第1の欠落画素として決定して該拡大基準画像を記憶手段に記憶する拡大基準画像記憶手段と、前記拡大基準画像が有する前記基準画像の画素のうち、前記基準画像が有する画素配列と同じ画素配列上に配置されていない画素を第2の非欠落画素として有し、該拡大基準画像が有する画素のうち、前記第2の非欠落画素以外の画素を第2の欠落画素として有する保存用画像を生成して記憶手段に記憶する保存用画像生成手段と、前記基準画像の拡大倍率と前記座標変換係数とを用いて、前記拡大基準画像が有する第1の欠落画素の座標を変換して参照座標とし、各々の非基準画像が有する画素のうち、前記参照座標との距離が最も近い画素を前記第1の欠落画素に対応する近傍画素として決定する近傍画素決定手段と、予め決められた第2の画素配列と前記第1の欠落画素の座標とに基づいて、該第1の欠落画素の色を判別し、判別した該第1の欠落画素の色が前記近傍画素の色と同じであるかを判断する色判断処理を行う色判断手段と、前記第1の欠落画素の色が前記近傍画素の色と同じであると判断された場合に、非基準画像が有する近傍画素のうち、対応する前記参照座標との距離が最も近い近傍画素を第1の参照画素として決定する第1参照画素決定手段と、前記第1の欠落画素の色が前記近傍画素の色と同じでないと判断された場合に、該第1の欠落画素の色と、該近傍画素の色と、前記非基準画像が有する近傍画素と前記第1の参照座標との距離とに応じた、前記近傍画素の評価値を算出する評価値算出手段と、非基準画像が有する近傍画素のうち、前記算出された評価値が最も大きい近傍画素を第2の参照画素として決定する第2参照画素決定手段と、前記第1の参照画素を前記第1の欠落画素に挿入する第1の画素挿入手段と、前記第2の参照画素を前記第2の欠落画素に挿入する第2の画素挿入手段とを備える。 An image processing apparatus according to an embodiment of the present invention includes a photographing unit that captures a plurality of images having a predetermined first pixel arrangement, and a reference image that is a single image from the plurality of photographed images. And selecting an image selection unit that uses an image other than the reference image among the plurality of images as a non-reference image, and converting the coordinates of the pixels included in the reference image into the coordinates of the pixels included in the non-reference image. A conversion coefficient calculating means for calculating a coordinate conversion coefficient and storing the calculated coordinate conversion coefficient in a storage means; an image enlarging means for enlarging the reference image at a predetermined enlargement magnification to obtain an enlarged reference image; Among the pixels included in the enlarged reference image, pixels arranged on the first pixel array are defined as first non-missing pixels, and pixels not arranged on the first pixel array are defined as first missing pixels. Determine the expansion group An enlarged reference image storage means for storing an image in the storage means, and pixels of the reference image that the enlarged reference image has that are not arranged on the same pixel array as the pixel array that the reference image has A storage image that is generated as a non-missing pixel and generates a storage image having a pixel other than the second non-missing pixel as a second missing pixel among the pixels of the enlarged reference image, and stores the image in the storage unit Using the generation means, the magnification of the reference image, and the coordinate conversion coefficient, the coordinates of the first missing pixel of the enlarged reference image are converted into reference coordinates, and the pixels of each non-standard image are converted. Of these, neighboring pixel determining means for determining a pixel closest to the reference coordinate as a neighboring pixel corresponding to the first missing pixel, a predetermined second pixel array, and the first missing pixel Coordinates and Based on the color determination means for determining the color of the first missing pixel and performing a color determination process for determining whether the determined color of the first missing pixel is the same as the color of the neighboring pixel; When it is determined that the color of the first missing pixel is the same as the color of the neighboring pixel, the neighboring pixel having the closest distance to the corresponding reference coordinate among the neighboring pixels of the non-reference image is the first. First reference pixel determining means for determining the reference pixel of the first missing pixel, and when it is determined that the color of the first missing pixel is not the same as the color of the neighboring pixel, the color of the first missing pixel and the neighborhood Evaluation value calculation means for calculating an evaluation value of the neighboring pixel according to the color of the pixel and the distance between the neighboring pixel of the non-standard image and the first reference coordinate; and the neighboring pixel of the non-reference image Among the neighboring pixels having the largest calculated evaluation value, the second reference image A second reference pixel determining means for determining as a prime; a first pixel inserting means for inserting the first reference pixel into the first missing pixel; and a second reference pixel as the second missing pixel. Second pixel insertion means for inserting.
本発明の画像処理装置によれば、従来の複数枚超解像の方法よりもメモリの使用量を削減し、少ない枚数の低解像度画像で高解像化を行うことができる。 According to the image processing apparatus of the present invention, the amount of memory used can be reduced as compared with the conventional multi-image super-resolution method, and high resolution can be achieved with a small number of low-resolution images.
図1は、本実施形態の画像処理装置の構成例を示す図である。この画像処理装置は、複数枚の低解像度の画像から1枚の高解像度の画像を生成する。この画像処理装置は、光学系101、撮像素子102、A(Analog)/D(Digital)変換部103、画像処理部104、システム制御部105、操作部106、表示部107、記録部108を備える。
FIG. 1 is a diagram illustrating a configuration example of an image processing apparatus according to the present embodiment. The image processing apparatus generates one high-resolution image from a plurality of low-resolution images. The image processing apparatus includes an
光学系101は、ズームレンズやフォーカスレンズから構成されるレンズ群、絞り調整装置、および、シャッター装置を備える。光学系101は、撮像素子102に到達する被写体像の倍率やピント位置、あるいは、光量を調整する。撮像素子102は、光学系101を通過した被写体の光束を光電変換し、電気信号に変換するCCDやCMOSセンサ等の光電変換素子である。CCDは、Charge Coupled Deiceの略称である。また、CMOSは、Complementary Metal Oxide Semiconcuctorの略称である。
The
本実施形態では、撮像素子102は、ベイヤー配列の色フィルタを備えた単板式の撮像素子である。すなわち、撮像素子102は、予め決められた第1の画素配列(ベイヤー配列)を有する複数枚の画像を撮影する撮影手段として機能する。
In the present embodiment, the
A/D変換部103は、入力された映像信号をデジタルの画像に変換する。画像処理部104は、通常の信号処理の他に、入力された複数枚の画像を用いて超解像処理を行う。画像処理部104はA/D変換部103から出力された画像のみでなく、記録部108から読み出した画像に対しても同様の画像処理を行うことができる。システム制御部105は、画像処理装置全体の動作を制御、統括する制御機能部である。画像処理部104で処理された画像から得られる輝度値や操作部106から送信された指示に基づいて、光学系101や撮像素子102の駆動制御も行う。
The A /
表示部107は、液晶ディスプレイや有機EL(Electro Luminescence)ディスプレイを有する。表示部107は、撮像素子102が生成した画像や、記録部108から読み出した画像を表示する。記録部108は、画像を記録する機能を有する。記録部108は、例えば、半導体メモリが搭載されたメモリカードや光磁気ディスク等の回転記録体を収容したパッケージなどを用いた情報記録媒体を備える。記録部108に、この情報記録媒体が着脱可能であってもよい。バス109は、画像処理部104、システム制御部105、表示部107、および、記録部108の間で画像をやり取りするために用いられる。
The
図2は、画像処理部の一部の構成を示す図である。図2に、画像処理部104が実行する超解像処理に関わる処理部を示す。画像処理部104は、基準画像選択部201、メモリ部202、座標変換係数算出部203、画像生成部204、画素間距離算出部205、評価値算出部206、欠落画素判定部207、画素挿入部208、RGB同時化部209、YUV変換部210を備える。本実施形態の画像処理方法は、図2に示す画像処理部104が備える処理部の機能によって実現される。また、本実施形態のコンピュータプログラムは、この画像処理方法をコンピュータに実行させることを特徴とする。
FIG. 2 is a diagram illustrating a partial configuration of the image processing unit. FIG. 2 shows a processing unit related to the super-resolution processing executed by the
基準画像選択部201は、画像処理部104に入力された複数枚の画像から1枚の画像を基準画像を選択するとともに、複数枚の画像のうち基準画像以外の画像を非基準画像とする画像選択手段として機能する。メモリ部202は、基準画像選択部201乃至RGB同時化部209が実行する処理に関する画像データを記憶する記憶手段として機能する。座標変換係数算出部203は、基準画像に対する非基準画像の位置合わせを行い、該位置合わせ結果をメモリ部202に記憶する位置合わせ手段として機能する。具体的には、座標変換係数算出部203は、変換係数算出手段として機能する。すなわち、座標変換係数算出部203は、基準画像が有する画素の座標を非基準画像が有する画素の座標に変換する座標変換式の係数を算出し、該算出した座標変換式の係数を位置合わせ結果とする。
The reference
画像生成部204は、基準画像を予め決められた拡大倍率で拡大して拡大基準画像を生成する画像拡大手段として機能する。また、画像生成部204は、拡大基準画像が有する画素のうち、第1の画素配列上すなわちベイヤー配列上に配置されている画素を第1の非欠落画素として決定する。また、画像生成部204は、該第1の画素配列上に配置されていない画素を第1の欠落画素として決定する。そして、画像生成部204は、拡大基準画像をメモリ部202に記憶する拡大基準画像記憶手段として機能する。
The
また、画像生成部204は、保存用画像を生成してメモリ部202に記憶する保存用画像生成手段として機能する。保存用画像は、拡大基準画像が有する基準画像の画素のうち、基準画像が有する画素配列(ベイヤー配列)と同じ画素配列上に配置されていない画素を第2の非欠落画素として有する。また、保存用画像は、拡大基準画像が有する画素のうち、第2の非欠落画素以外の画素を第2の欠落画素として有する。
The
画素間距離算出部205は、基準画像の拡大倍率とメモリ部202内の座標変換式とを用いて、拡大基準画像が有する第1の欠落画素の座標を変換して参照座標とする。そして、画素間距離算出部205は、参照画素と参照座標との距離dを算出する。参照座標は、拡大基準画像が有する欠落画素に対応する、非基準画像上の座標である。参照画素は、非基準画像が有する画素のうち、参照座標との距離が最も近い画素(近傍画素)である。
The inter-pixel
具体的には、画素間距離算出部205は、基準画像の拡大倍率とメモリ部202内の座標変換式とを用いて、拡大基準画像が有する欠落画素の座標を変換して参照座標とする。そして、画素間距離算出部205は、各々の非基準画像について参照画素を決定し、決定した参照画素と参照座標との距離dを算出する。すなわち、画素間距離算出部205は、各々の非基準画像が有する画素のうち、参照座標との距離が最も近い画素を第1の欠落画素に対応する近傍画素として決定する近傍画素決定手段として機能する。
Specifically, the inter-pixel
また、画素間距離算出部205は、以下の色判断処理を実行する色判断手段として機能する。すなわち、画素間距離算出部205は、予め決められた第2の画素配列(例えば、ベイヤー配列)と第1の欠落画素の座標とに基づいて、該第1の欠落画素の色を判別し、判別した該第1の欠落画素の色が参照画素(近傍画素)の色と同じであるかを判断する。そして、画素間距離算出部205は、第1の欠落画素の色が参照画素の色と同じであると判断した場合に、非基準画像が有する参照画素のうち、対応する参照座標との距離が最も近い参照画素を第1の参照画素として決定する第1参照画素決定手段として機能する。
Further, the inter-pixel
評価値算出部206は、第1の欠落画素の色が参照画素(近傍画素)の色と同じでないと判断された場合に、近傍画素の評価値を算出する評価値算出手段として機能する。評価値算出部206は、第1の欠落画素の色と、近傍画素の色と、非基準画像が有する近傍画素と第1の参照座標との距離dとに応じた評価値を、近傍画素の評価値として算出する。また、評価値算出部206は、非基準画像が有する近傍画素のうち、算出された評価値が最も大きい近傍画素を第2の参照画素として決定する第2参照画素決定手段として機能する。
The evaluation
欠落画素判定部207は、メモリ部202から拡大基準画像を読み出し、読み出した拡大基準画像の着目画素すなわち処理対象の画素が欠落画素であるかを判断する。また、欠落画素判定部207は、メモリ部202から保存用画像を読み出し、読み出した保存用画像の着目画素すなわち処理対象の画素が欠落画素であるかを判断する。欠落画素判定部207は、拡大基準画像の着目画素について欠落画素であるかを判断した後、当該拡大基準画像の着目画素と同じ位置にある保存用画像の着目画素について、欠落画素であるかを判断する。
The missing
画素挿入部208は、欠落画素判定部207が、拡大基準画像の着目画素が欠落画素であると判断した場合に、第1の参照画素を第1の欠落画素に挿入する第1の画素挿入手段として機能する。また、画素挿入部208は、欠落画素判定部207が、保存用画像の着目画素が欠落画素であると判断した場合に、第2の参照画素を第2の欠落画素に挿入する第2の画素挿入手段として機能する。画素挿入部208は、参照画素が挿入された拡大基準画像、保存用画像をメモリ部202に記憶する。
The
RGB同時化部209は、第1の参照画素が第1の欠落画素に挿入された拡大基準画像をメモリ部202から読み出す。また、RGB同時化部209は、第2の参照画素が第2の欠落画素に挿入された保存用画像をメモリ部202から読み出す。そして、RGB同時化部209は、読み出した拡大基準画像と保存用画像とに基づいて、色同時化処理を行う色同時化手段として機能する。YUV変換部210は、色同時化処理後の画像が有する画素のRGB信号をYUV信号に変換して出力画像として出力する。
The
(実施例1)
図3は、実施例1の画像処理を説明するフローチャートである。実施例1では、画像処理装置は、ベイヤー配列の低解像度画像を複数枚用いて、水平、垂直方向それぞれ3倍に画素数を拡大したベイヤー配列の高解像度画像を生成し、高解像度化を実現する。
Example 1
FIG. 3 is a flowchart illustrating image processing according to the first embodiment. In the first embodiment, the image processing apparatus uses a plurality of low-resolution images of the Bayer array to generate a high-resolution image of the Bayer array in which the number of pixels is expanded three times in the horizontal and vertical directions, thereby realizing high resolution. To do.
まず、A/D変換部103が、画像処理部104に対して、n枚の低解像度の画像を入力する(ステップS301)。ここで、n枚の画像は、手持ち状態で連続撮像された画像とする。なお、入力する低解像度の画像は、手持ち状態で撮像された画像に限らず、撮像者の意図した動き(パンニングまたはズーミング)、あるいはカメラの光学装置や撮像素子に機械的に動きを与える構成から得てもよい。
First, the A /
次に、基準画像選択部201が、超解像処理により高解像度画像とする対象となる画像を基準画像として選択する(ステップS302)。そして、残りの画像を非基準画像としてメモリ部202に保存する。ここでは、基準画像選択部201は、はじめに入力された画像を基準画像とし、残りのn−1枚の画像を非基準画像とする。なお、基準画像の選択基準はこの方法に限らず、基準画像選択部201が、はじめに入力された画像以外から選択するようにしてもよい。
Next, the reference
次に、座標変換係数算出部203が、基準画像と非基準画像間の位置合わせに必要な座標変換式の係数を算出する(ステップS303)。本実施例では、座標変換式として射影変換の式を用いる。画像の予め決められた位置(例えば中心の位置)の座標を(0,0)とすると、基準画像の着目画素の座標(x、y)に対応する非基準画像の座標(x’,y’)を表す射影変換の式は、下記の式(1)である。
Next, the coordinate conversion
次に、座標変換係数算出部203が、算出した座標変換係数を、非基準画像の枚数分、メモリ部202に保存する(ステップS304)。保存した座標変換係数は、ステップS306において用いられる。
Next, the coordinate conversion
次に、画像生成部204が、基準画像を水平方向、垂直方向それぞれ3倍に拡大する(ステップS305)。本実施例では、画像生成部204は、ベイヤー配列を維持したまま、基準画像を拡大する。なお、ステップS305の処理は、ステップS303の処理の前に行ってもよい。
Next, the
図4は、ステップS305における基準画像の拡大方法を説明する図である。図4(A)は、拡大前の基準画像である。この基準画像は、水平画素数W、垂直画素数Hのベイヤー配列を有する。画像生成部204は、図4(A)に示す基準画像を水平方向、垂直方向それぞれ3倍に拡大して、拡大基準画像を生成する。図4(B)は、拡大基準画像である。画像生成部204は、拡大基準画像が含む画素のうち、基準画像が有する画素すなわちベイヤー配列上に配置されている画素を第1の非欠落画素とする。画像生成部204は、拡大基準画像が含む画素のうち、基準画像が有する画素以外の画素、すなわちベイヤー配列上に配置されてない画素を第1の欠落画素とする。画像生成部204は、第1の欠落画素に、値として0を挿入し、拡大基準画像をメモリ部202に記憶する。
FIG. 4 is a diagram for explaining the reference image enlargement method in step S305. FIG. 4A shows a reference image before enlargement. This reference image has a Bayer array with a horizontal pixel number W and a vertical pixel number H. The
図4(B)のように、水平画素数W×2、垂直画素数H×2のベイヤー配列の基準画像を作成すると、拡大前の基準画像の画素のうち、G成分の画素を非欠落画素として残すことができる。しかし、R成分,B成分の画素に関しては、それぞれ拡大基準画像のG成分の箇所に位置するので、非欠落画素として残した場合、拡大基準画像はベイヤー配列を維持できない。ここで、後で色同時化処理を行う場合に、非欠落画素の情報が多い方が良い。従って、R,Bの画素を拡大基準画像とは別に保存する必要がある。 As shown in FIG. 4B, when a reference image having a Bayer array with the number of horizontal pixels W × 2 and the number of vertical pixels H × 2 is created, among the pixels of the reference image before enlargement, the G component pixels are non-missing pixels. Can be left as. However, since the pixels of the R component and the B component are respectively located at the position of the G component of the enlarged reference image, when the pixels are left as non-missing pixels, the enlarged reference image cannot maintain the Bayer array. Here, when performing the color synchronization processing later, it is better that there is more information on the non-missing pixels. Therefore, it is necessary to store the R and B pixels separately from the enlarged reference image.
すなわち、画像生成部204は、ベイヤー配列が維持される拡大基準画像とは別に、図4(C)に示すような、水平画素数W×2、垂直画素数H×2の保存用画像を生成する。画像生成部204は、保存用画像の画素のうち、図4(C)に示すR成分、B成分の画素を第2の非欠落画像とする。また、画像生成部204は、保存用画像の画素のうち、図4(C)に示すR成分、B成分の画素以外の画素を第2の非欠落画像とする。画像生成部204は、第2の欠落画素に、値として0を挿入し、保存用画像をメモリ部202に記憶する。
That is, the
図3に戻り、ステップS306において、画像処理装置が、n−1枚の非基準画像から挿入対象の第1の参照画素の候補pixと、第2の参照画素の候補sub_pixを選択する(挿入画素選択処理を実行する)。 Returning to FIG. 3, in step S306, the image processing apparatus selects the first reference pixel candidate pix to be inserted and the second reference pixel candidate sub_pix from the n−1 non-standard images (inserted pixel). Perform selection process).
図5は、図3のステップS306における挿入画素選択処理を説明するフローチャートの例である。まず、画素間距離算出部205が、変数iを初期化する(ステップS501)。変数iは、n−1枚の非基準画像を一意に識別する識別情報である。本実施例では、i+1枚目の非基準画像を非基準画像[i]、非基準画像[i]に対応する座標変換係数を座標変換係数[i]とする。なお、ステップS505以降で使用するd[i]、pix[i]、e[i]、sub_pix[i]、color_id[i]は、それぞれ、非基準画像[i]に対応するd,pix、e、sub_pix、color_idを示す。
FIG. 5 is an example of a flowchart for explaining the inserted pixel selection process in step S306 of FIG. First, the inter-pixel
次に、画素間距離算出部205が、非基準画像[i]をメモリ部202から読み込む(ステップS502)。続いて、画素間距離算出部205が、非基準画像[i]に対応する座標変換係数[i]をメモリ部202から読み込む(ステップS503)。
Next, the inter-pixel
次に、画素間距離算出部205が、ステップS503で読み込んだ座標変換係数[i]を用いて、基準画像の着目画素の座標(x、y)に対応する非基準画像[i]の参照座標(x’,y’)を算出する(ステップS504)。具体的には、画素間距離算出部205は、上述した式(1)で示す射影変換の式を用いて、参照座標を算出する。
Next, the reference coordinates of the non-standard image [i] corresponding to the coordinates (x, y) of the target pixel of the standard image using the coordinate conversion coefficient [i] read by the inter-pixel
次に、画素間距離算出部205が、ステップS504で算出した非基準画像[i]の参照座標(x’,y’)に対し、最近傍にある非基準画像[i]の画素(nx,ny)を参照画素(近傍画素)とする。そして、画素間距離算出部205が、参照画素と参照座標との距離d[i]を算出する(ステップS505)。
Next, the inter-pixel
図6は、図5のステップS505における距離d[i]の算出処理を説明する図である。図6(A)は拡大画像を示す。図6(B)は、非基準画像を示す。図6(A)の拡大基準画像上の着目画素601の座標(x、y)に対し、対応する非基準画像(図6(B))の参照座標602は、(x’,y’)である。 FIG. 6 is a diagram for explaining the calculation process of the distance d [i] in step S505 in FIG. FIG. 6A shows an enlarged image. FIG. 6B shows a non-reference image. For the coordinates (x, y) of the pixel of interest 601 on the enlarged reference image in FIG. 6A, the reference coordinates 602 of the corresponding non-reference image (FIG. 6B) are (x ′, y ′). is there.
画素間距離算出部205は、参照座標602を包含し、かつ参照座標602の最近傍に位置する画素である画素603を当該参照座標602に対応する参照画素として決定する。参照画素603の座標は、(nx,ny)であるものとすると、画素間距離算出部205は、参照画素と参照座標との距離dを、以下の式(2)を用いて算出する。
The inter-pixel
上記のようにして、画素間距離算出部205は、非基準画像[i]の参照座標(x’,y’)に対応する非基準画像[i]の参照画素(nx,ny)を決定する。また、画素間距離算出部205は、非基準画像[i]の参照座標(x’,y’)に対応する距離d[i]を算出する。
As described above, the inter-pixel
図5に戻って、画素間距離算出部205が、非基準画像[i]の参照画素と拡大基準画像の着目画素と同色であるかを判断(色判断処理を実行)する(ステップS506)。着目画素が参照画素と同色である場合は、ステップS507に進む。着目画素が参照画素と同色でない場合は、ステップS508に進む。
Returning to FIG. 5, the inter-pixel
図7は、色判断処理を説明する図である。図7中には、水平画素数W×3、垂直画素数H×3の拡大基準画像の各画素の色を示す。すなわち、この拡大基準画像はベイヤー配列を有する。欠落画素を非欠落画素に置き換えるためには、欠落画素の位置に記載されている色の画素で置き換えなければならない。 FIG. 7 is a diagram for explaining the color determination process. FIG. 7 shows the color of each pixel of the enlarged reference image having the horizontal pixel number W × 3 and the vertical pixel number H × 3. That is, this enlarged reference image has a Bayer array. In order to replace a missing pixel with a non-missing pixel, it must be replaced with a pixel of a color described at the position of the missing pixel.
拡大基準画像の最も左上の画素の座標を(0,0)、最も右下の画素の座標を(2W−1,2H−1)とする。画素間距離算出部205は、着目画素(x、y)の色を、下記の式(3)で判別する。
(x&1)=0かつ(y&1)=0ならR
(x&1)=1かつ(y&1)=0、または(x&1)=0かつ(y&1)=1ならG (x&1)=1かつ(y&1)=1ならB
・・・式(3)
The coordinates of the upper left pixel of the enlarged reference image are (0, 0), and the coordinates of the lower right pixel are (2W-1, 2H-1). The inter-pixel
R if (x & 1) = 0 and (y & 1) = 0
G if (x & 1) = 1 and (y & 1) = 0, or (x & 1) = 0 and (y & 1) = 1, B if (x & 1) = 1 and (y & 1) = 1
... Formula (3)
上記の式(x&1),(y&1)は、x座標、y座標がそれぞれ偶数であるか、奇数であるかを判別する式である。(x&1),(y&1)の値が0である時は、x,y座標が偶数、値が1である時は、x,y座標が奇数であることを示す。 The above equations (x & 1) and (y & 1) are equations for determining whether the x-coordinate and y-coordinate are even or odd, respectively. When the values of (x & 1) and (y & 1) are 0, the x and y coordinates are even, and when the value is 1, the x and y coordinates are odd.
なお、画素間距離算出部205は、非基準画像[i]の参照画素(nx、ny)の色についても、最も左上の画素の座標を(0,0)、最も右下の画素の座標を(W−1,H−1)として、式(3)を用いて判別する。そして、画素間距離算出部205は、判別した着目画素(x,y)の色が参照画素(nx,ny)の色と同色であるかを判断する。つまり、画素間距離算出部205は、第2の画素配列としてベイヤー配列を用いて色判断処理を実行する。
Note that the inter-pixel
図5に戻って、画素間距離算出部205が、基準画像の着目画素と同色であると判断された非基準画像[i]の参照画素をpix[i]として、ステップS505で算出したd[i]と共に、メモリ部202に保存する(ステップS507)。そして、処理がステップS510に進む。
Returning to FIG. 5, the inter-pixel
ステップS508においては、評価値算出部206が、拡大基準画像の着目画素の色と、該着目画像の色と同色でないと判断された非基準画像[i]の参照画素の色と、ステップS505で算出した距離d[i]に応じて、評価値e[i]を算出する。評価値e[i]は、非基準画像[i]の参照画素(近傍画素)に対する、第2の参照画素として選択する基準となる基準値である。評価値が高い参照画素ほど、第2の参照画素として選択され易くなる。また、評価値は、参照座標との距離dが近いほど高くなる。
In step S508, the evaluation
図9は、評価値e[i]の算出を説明する図である。評価値算出部206は、図9(A)、(B)、または(C)に示すグラフに従って、距離d[i]に応じた評価値e[i]を算出する。図9中に示すグラフの横軸は距離d[i]であり、縦軸は評価値e[i]である。グラフ中のR,G,Bは、それぞれのグラフ線に対応する非基準画像[i]の参照画素の色である。
FIG. 9 is a diagram illustrating calculation of the evaluation value e [i]. The evaluation
図9(A)は、基準画像の着目画素がRの場合のグラフであり、このグラフ中のGは、非基準画像の参照画像がGである場合の、距離d[i]と評価値e[i]との関係を示す。このグラフ中のBは、非基準画像の参照画像がBである場合の、距離d[i]と評価値e[i]との関係を示す。 FIG. 9A is a graph when the target pixel of the standard image is R. G in this graph is the distance d [i] and the evaluation value e when the reference image of the non-standard image is G. The relationship with [i] is shown. B in this graph indicates the relationship between the distance d [i] and the evaluation value e [i] when the reference image of the non-standard image is B.
図9(B)は、基準画像の着目画素がGの場合のグラフであり、このグラフ中のR,Bは、非基準画像の参照画像がRまたはBである場合の、距離d[i]と評価値e[i]との関係を示す。 FIG. 9B is a graph when the pixel of interest of the base image is G, and R and B in this graph are distances d [i] when the reference image of the non-base image is R or B. And the evaluation value e [i].
図9(C)は、基準画像の着目画素がBの場合のグラフであり、このグラフ中のGは、非基準画像の参照画像がGである場合の、距離d[i]と評価値e[i]との関係を示す。このグラフ中のRは、非基準画像の参照画像がRである場合の、距離d[i]と評価値e[i]との関係を示す。 FIG. 9C is a graph when the target pixel of the standard image is B, and G in this graph is the distance d [i] and the evaluation value e when the reference image of the non-standard image is G. The relationship with [i] is shown. R in this graph indicates the relationship between the distance d [i] and the evaluation value e [i] when the reference image of the non-standard image is R.
本実施例では、保存用画像の欠落画素を、輝度系信号の寄与する割合の大きいGの非欠落画素と多く置き換えることができるようにするために、参照画素がGの場合は、R、Bの時よりも評価値[i]が大きくなるように、予めグラフを設定する。例えば、図9(A)、(C)に示すグラフのように、非基準画像[i]の参照画素の色がRまたはBの時よりもGの方が評価値e[i]の値が大きくなるようにグラフを設定する。 In this embodiment, in order to be able to replace many missing pixels in the storage image with non-missing pixels of G having a large contribution ratio of the luminance system signal, when the reference pixel is G, R, B A graph is set in advance so that the evaluation value [i] is larger than that in the above case. For example, as in the graphs shown in FIGS. 9A and 9C, the evaluation value e [i] is higher in G than in the case where the color of the reference pixel of the non-standard image [i] is R or B. Set the graph to be larger.
図5に戻って、評価値算出部206が、非基準画像[i]の参照画素の色をcolor_id[i]、画素値をsub_pix[i]として、ステップS508で算出した評価値e[i]と共にメモリ部202に保存する(ステップS509)。color_id[i]は、0から2までの値が代入される。color_id[i]の値「0」は、G成分を示す。color_id[i]の値「1」は、R成分を示す。color_id[i]の値「2」は、B成分を示す。
Returning to FIG. 5, the evaluation
次に、評価値算出部206が、n−1枚全ての非基準画像について処理を完了したかを判断する(ステップS508)。処理を完了していない非基準画像がある場合、評価値算出部206が、iをインクリメントして(ステップS509)、ステップS502に戻る。全ての非基準画像について処理を完了している場合は、ステップS512に進む。
Next, the evaluation
次に、評価値算出部206が、メモリ部202に保存した評価値e[i]の中で最大の値である評価値e[i]の値をe_max として選択する(ステップS512)。メモリ部202に保存した評価値e[i]が1つもない場合、評価値算出部206が、e_maxに、設定可能な最小値(例えば「0」)を代入する。
Next, the evaluation
次に、評価値算出部206が、ステップS512で選択されたe_max(e[i])に対応する参照画素sub_pix[i]を非欠落画素の候補sub_pixとして選択する(ステップS513)。メモリ部202に保存したe[i]が1つもない場合、評価値算出部206は、sub_pix の値に0を代入する。
Next, the evaluation
次に、評価値算出部206が、ステップS512で選択されたe_maxに対応する参照画素の色color_id[i]を非欠落画素の候補sub_pix の色を示すcolor_idとして選択する(ステップS514)。メモリ部202に保存したe[i]が1つもない場合、評価値算出部206は、color_idの値に0を代入する。
Next, the evaluation
次に、評価値算出部206が、メモリ部202に保存した距離d[i]の中で最小の値である距離d[i]の値を、d_minとして選択する(ステップS515)。メモリ部202に保存した距離d[i]が1つもない場合、評価値算出部206が、d_min
に、設定可能な最大値(例えば、「1」)を代入する。
Next, the evaluation
Is substituted with a settable maximum value (for example, “1”).
次に、評価値算出部206が、ステップS515で選択された距離d_minに対応する参照画素pix[i]を非欠落画素の候補pixとして選択する(ステップS516)。メモリ部202に保存した距離d[i]が1つもない場合、評価値算出部206は、pixの値に0を代入する。続いて、評価値算出部206が、e_max、sub_pix、color_id、d_min、pixを出力する(ステップS517)。
Next, the evaluation
図3に戻って、画素挿入部208が、画素挿入処理を実行する(ステップS307)。具体的には、画素挿入部208が、拡大基準画像の第1の欠落画素の値を、第1の参照画像であるpixの値に置き換える処理を行う。また、画素挿入部208が、保存用画像の第2の欠落画素の値を、第2の参照画像であるsub_pixの値に置き換える処理を行う。
Returning to FIG. 3, the
図8は、画素挿入処理の一例を説明するフローチャートを示す図である。まず、画素挿入部208が、基準画像の着目画素が欠落画素であるかを判断する(ステップS801)。基準画像の着目画素が欠落画素である場合は、ステップS802に進む。基準画像の着目画素が欠落画素でない場合は、ステップS804に進む。
FIG. 8 is a flowchart illustrating an example of the pixel insertion process. First, the
ステップS802において、画素挿入部208が、d_minの値が閾値TH_d未満であるかを判断する(ステップS802)。閾値TH_dは、予め決められる。閾値TH_dとして、経験則または実験によって求めた値を用いてもよい。
In step S802, the
ステップS803において、画素挿入部208が、基準画像の着目画素を非欠落画素の候補pixと置き換える。ステップS804においては、画素挿入部208は、基準画像の着目画素を非欠落画素の候補pixと置き換えない。そして、処理がステップS805に進む。
In step S803, the
ステップS805乃至S808の処理は、保存用画像の着目画素に対して行う処理である。処理対象となる保存用画像の着目画素の位置は、ステップS801乃至S804において処理対象となった基準画像の着目画素の位置と同じである。 The processing in steps S805 to S808 is processing performed on the target pixel of the storage image. The position of the target pixel of the storage image to be processed is the same as the position of the target pixel of the reference image that has been processed in steps S801 to S804.
まず、画素挿入部208が、保存用画像の着目画素が欠落画素であるかを判断する(ステップS805)。保存用画像の着目画素が欠落画素である場合は、ステップS806に進む。保存用画像の着目画素が欠落画素でない場合は、ステップS808に進む。
First, the
ステップS806において、画素挿入部208が、e_maxの値が閾値TH_e以上であるかを判断する(ステップS806)。閾値TH_dは、予め決められる。閾値TH_dとして、経験則または実験によって求めた値を用いてもよい。e_maxの値が閾値TH_e以上である場合は、ステップS807に進む。e_maxの値が閾値TH_e未満である場合は、ステップS808に進む。
In step S806, the
ステップS807において、画素挿入部208が、保存用画像の着目画素を非欠落画素の候補sub _pixと置き換える(ステップS807)。また、ステップS808において、画素挿入部208が、保存用画像の着目画素を非欠落画素の候補pixと置き換えない。そして、処理が終了する。
In step S807, the
図3に戻って、画素挿入部208が、基準画像と保存用画像における全ての画素を処理したかを判断する(ステップS308)。基準画像と保存用画像における全ての画素を処理した場合は、ステップS309に進む。基準画像と保存用画像において未処理の画素がある場合は、着目画素を変更して、ステップS306に戻る。
Returning to FIG. 3, the
次に、RGB同時化部209が、画素挿入処理後の拡大基準画像と保存用画像とに基づいて、R,G,B同時化処理(色同時化処理)を実行する(ステップS309)。
Next, the
図10は、R,G,B同時化処理の例を説明する図である。図10(A)は、画素挿入処理後の拡大基準画像である。この例では、当該拡大基準画像は、水平画素数W×2、垂直画素数H×2のベイヤー配列の画像である。図10(B)は、画素挿入処理後の保存用画像である。 FIG. 10 is a diagram for explaining an example of the R, G, B synchronization processing. FIG. 10A is an enlarged reference image after pixel insertion processing. In this example, the enlarged reference image is a Bayer array image having a horizontal pixel number W × 2 and a vertical pixel number H × 2. FIG. 10B shows an image for storage after pixel insertion processing.
RGB同時化部209は、図10(A)に示す拡大基準画像と、図10(B)に示す保存用画像を用いて、R,G,B同時化処理を行って、図10(C)乃至(E)に示す画像を得る。具体的には、RGB同時化部209は、水平画素数W×2、垂直画素数H×2の画像をR,G,B毎に作成する。R,G,B同時化処理を行う際には、水平画素数W×2、垂直画素数H×2のプレーンの画素に、拡大基準画像、保存用画像それぞれの非欠落画素を設定していく。
The
設定対象の画素について、拡大基準画像にも保存用画像にも同色の非欠落画素が存在しない場合には、RGB同時化部209は当該画素の画素値を、画素周辺にある非欠落画素を線形補間した値によって作成する。本実施例では線形補間を使用するが、RGB同時化部209が、適応補間によって同時化処理を行うようにしてもよい。
When there is no non-missing pixel of the same color in the enlarged reference image or the storage image for the setting target pixel, the
図3に戻って、YUV変換部210が、R,G,B同時化処理後の画像に基づいて、YUV画像を生成する(ステップS310)。ステップS310においては、YUV変換部210は、R,G,B同時化処理によって得られるR,G,Bの画像を用いて、画素毎にRGB信号からYUV信号への変換を行う。これにより、水平画素数W×2、垂直画素数H×2のYUV画像が作成される。YUV変換部210は、下記の式(4)を用いて、RGB信号からYUV信号に変換する。
Y=0.299R+0.587G+0.114B
U=−0.169R−0.331G+0.500B
V=0.500R−0.419G−0.081B ・・・式(4)
Returning to FIG. 3, the
Y = 0.299R + 0.587G + 0.114B
U = −0.169R−0.331G + 0.500B
V = 0.500R-0.419G-0.081B Formula (4)
YUV変換部210は、ステップS310で生成したYUV画像を出力信号として超解像処理を終了とする。
The
本実施例の画像処理装置は、ベイヤー配列の低解像度画像を複数枚用いて、水平、垂直方向それぞれ3倍に画素数を拡大したベイヤー配列の高解像度画像を生成し、高解像度化を実現する超解像処理を行うことができる。すなわち、本実施例の画像処理装置は、1枚の拡大基準画像をメモリ部202に記憶させておき、この拡大基準画像の欠落画素を、ベイヤー配列を有する非基準画像を用いて、当該拡大基準画像においてベイヤー配列が維持されるように埋めていく。従って、本実施例の画像処理装置によれば、出力と同じ解像度を有する画像を色成分毎に作成する従来の複数枚超解像の方法よりも、メモリの使用量を削減し、少ない枚数の低解像度画像で高解像化を行うことができる。
The image processing apparatus according to the present embodiment uses a plurality of Bayer-array low-resolution images to generate a Bayer-array high-resolution image in which the number of pixels is increased three times in the horizontal and vertical directions, thereby realizing high resolution. Super-resolution processing can be performed. In other words, the image processing apparatus according to the present embodiment stores one enlarged reference image in the
また、本実施例の画像処理装置は、拡大基準画像が有する基準画像の画素のうち、基準画像が有する画素配列(ベイヤー配列)と同じ画素配列上に配置されていない画素を非欠落画素として有する保存用画像を、拡大基準画像とは別に生成して保存する。画像処理装置は、拡大基準画像の着目画素の色が非基準画像の参照画素の色と同色でない場合に、所定の評価値に基づいて挿入対象の参照画素を決定し、決定した参照画素を保存用画像の着目画素に挿入する。そして、画像処理装置は、画素挿入処理後の拡大基準画像と保存用画像とに基づいてR,G,B同時化処理を実行する。このように、本実施例の画像処理装置は、拡大基準画像と、基準画像の画素を非欠落画素として有する保存用画像とを用いてR,G,B同時化処理を実行するので、拡大基準画像のみを用いてR,G,B同時化処理を実行する場合よりも高解像度化を実現できる。 In addition, the image processing apparatus according to the present embodiment includes, as non-missing pixels, pixels that are not arranged on the same pixel array as the pixel array (Bayer array) included in the reference image among the pixels of the reference image included in the enlarged reference image. A storage image is generated and stored separately from the enlarged reference image. The image processing apparatus determines a reference pixel to be inserted based on a predetermined evaluation value and saves the determined reference pixel when the color of the pixel of interest of the enlarged standard image is not the same as the color of the reference pixel of the non-standard image Is inserted into the target pixel of the image. Then, the image processing apparatus executes R, G, B synchronization processing based on the enlarged reference image and the storage image after the pixel insertion processing. As described above, the image processing apparatus according to the present embodiment executes the R, G, B synchronization processing using the enlarged reference image and the storage image having the pixels of the reference image as non-missing pixels. Higher resolution can be realized than when the R, G, B synchronization processing is executed using only the image.
なお、本実施例の画像処理方法は、基準画像の拡大率を2倍にする場合のみならず、3倍、4倍に水平垂直方向に基準画像を拡大する場合に適用することができる。 Note that the image processing method of the present embodiment can be applied not only when the enlargement ratio of the reference image is doubled but also when the reference image is enlarged three times or four times in the horizontal and vertical directions.
(実施例2)
実施例2の画像処理装置は、画像処理部104に入力される低解像度画像の枚数に応じて、基準画像の拡大方法を変更する。実施例2の画像処理装置の構成は、実施例1の画像処理装置の構成と同様である。また、実施例2の画像処理部の構成は、実施例1の画像処理部の構成と同様である。
(Example 2)
The image processing apparatus according to the second exemplary embodiment changes the reference image enlargement method according to the number of low-resolution images input to the
図11は、実施例2の画像処理を説明するフローチャートである。ステップS1101乃至S1104は、図3のステップS301乃至S304と同様である。 FIG. 11 is a flowchart illustrating image processing according to the second embodiment. Steps S1101 to S1104 are the same as steps S301 to S304 in FIG.
ステップS1104において、画像生成部204が、ステップS1101で入力された低解像度画像の枚数が閾値TH1未満であるかを判断する(ステップS1105)。閾値TH1は、予め決められる。閾値TH1として、経験則または実験によって求めた値を用いてもよい。
In step S1104, the
ステップS1101で入力された低解像度画像の枚数が閾値TH1未満である場合は、ステップS1107に進む。ステップS1101で入力された低解像度画像の枚数が閾値TH1未満でない場合は、画像生成部204が、ステップS1101で入力された低解像度画像の枚数が閾値TH2未満であるかを判断する(ステップS1106)。閾値TH2は、閾値TH1より大きい値であって、予め決められる。閾値TH2として、経験則または実験によって求めた値を用いてもよい。
If the number of low resolution images input in step S1101 is less than the threshold TH1, the process proceeds to step S1107. If the number of low resolution images input in step S1101 is not less than the threshold TH1, the
ステップS1101で入力された低解像度画像の枚数が閾値TH2未満である場合は、ステップS1108に進む。ステップS1101で入力された低解像度画像の枚数が閾値TH2未満でない場合は、ステップS1109に進む。 If the number of low-resolution images input in step S1101 is less than the threshold value TH2, the process proceeds to step S1108. If the number of low resolution images input in step S1101 is not less than the threshold TH2, the process proceeds to step S1109.
ステップS1107において、画像生成部204が、基準画像について、第1の拡大方法を用いた拡大処理を実行する。第1の拡大方法を用いた拡大処理は、基準画像が有するベイヤー配列が維持されるように該基準画像を予め決められた拡大倍率で拡大して第1の拡大基準画像を生成する処理である。
In step S1107, the
図12は、基準画像の拡大処理を説明する図である。図12(A)は、拡大前の基準画像である。画像生成部204が第1の拡大方法を用いた拡大処理を実行する場合、画像生成部204は、図12(B)に示すように、基準画像が有するベイヤー配列が維持されるように、基準画像を2倍に拡大する。これにより、1プレーンの第1の拡大基準画像が生成される。図12(B)中のハッチングが施されていない画素が非欠落画素である。
FIG. 12 is a diagram for explaining the reference image enlargement process. FIG. 12A shows a reference image before enlargement. When the
ステップS1108において、画像生成部204が、基準画像について、第2の拡大方法を用いた拡大処理を実行する。第2の拡大方法を用いた拡大処理を行う場合、画像生成部204は、基準画像をG成分の画像とRB成分の画像に分離する。画像生成部204は、G成分の画像を水平方向垂直方向共に2倍に拡大して第2の拡大基準画像を生成する。また、画像生成部204は、基準画像のRB成分の画像をR成分とB成分とが市松状に配置されるように水平方向垂直方向共に2倍に拡大することによって、第3の拡大基準画像を生成する。
In step S1108, the
図12(C)、(D)は、第2の拡大方法を用いて生成される2プレーンの拡大基準画像を示す。図12(C)は、第2の拡大基準画像である。第2の拡大基準画像は、G成分のみの画素が配置される画素配列を有する。図12(D)は、第3の拡大基準画像である。第3の拡大基準画像は、R成分とB成分とが市松状に配置される画素配列を有する。 FIGS. 12C and 12D show two-plane enlarged reference images generated using the second enlargement method. FIG. 12C is a second enlarged reference image. The second enlarged reference image has a pixel array in which pixels of only the G component are arranged. FIG. 12D is a third enlarged reference image. The third enlarged reference image has a pixel array in which the R component and the B component are arranged in a checkered pattern.
図12(C)に示すように、第2の拡大基準画像は、図12(B)に示す第1の拡大基準画像よりも、G成分の非欠落画素の数が多い。従って、第2の拡大基準画像に基づいて生成されるG成分の高解像度画像は、図12(B)に示す第1の拡大基準画像に基づいて生成されるG成分の高解像度画像よりも、解像度が高くなる。 As shown in FIG. 12C, the second enlarged reference image has more G component non-missing pixels than the first enlarged reference image shown in FIG. Therefore, the high-resolution image of the G component generated based on the second enlarged reference image is higher than the high-resolution image of the G component generated based on the first enlarged reference image shown in FIG. Increases resolution.
ステップS1109において、画像生成部204が、基準画像について、第3の拡大方法を用いた拡大処理を実行する。第3の拡大方法を用いた拡大処理を行う場合、画像生成部204は、基準画像を色成分毎に分離した画像を作成する。そして、画像生成部204は、作成した各々の画像を水平方向垂直方向共に所定の拡大倍率で拡大することによって、第4、5、および6の拡大基準画像を生成する。具体的には、画像生成部204は、G成分の画像を2倍に拡大することによって、第4の拡大基準画像を生成する。画像生成部204は、R成分の画像を2倍に拡大することによって、第5の拡大基準画像を生成する。また、画像生成部204は、B成分の画像を2倍に拡大することによって、第6の拡大基準画像を生成する。
In step S1109, the
図12(E)乃至(G)は、第3の拡大方法を用いて生成される3プレーンの拡大基準画像を示す。図12(E)は、第4の拡大基準画像である。第4の拡大基準画像は、G成分のみの画素が配置される画素配列を有する。第5の拡大基準画像は、R成分のみの画素が配置される画素配列を有する。第6の拡大基準画像は、B成分のみの画素が配置される画素配列を有する。 FIGS. 12E to 12G show three-plane enlarged reference images generated using the third enlargement method. FIG. 12E is a fourth enlarged reference image. The fourth enlarged reference image has a pixel array in which pixels of only the G component are arranged. The fifth enlarged reference image has a pixel array in which pixels of only the R component are arranged. The sixth enlarged reference image has a pixel array in which pixels of only the B component are arranged.
図11のステップS1110以降の処理は、図3のステップS306以降の処理と同様である。なお、ステップS1110の挿入画素選択処理において行われる色判断処理は、以下のようにして実行される。画素間距離算出部205は、第1の拡大基準画像については、第2の画素配列としてベイヤー配列を用いて色判断処理を実行する。
The processing after step S1110 in FIG. 11 is the same as the processing after step S306 in FIG. Note that the color determination process performed in the insertion pixel selection process in step S1110 is performed as follows. The inter-pixel
画素間距離算出部205は、第2の拡大基準画像については、第2の画素配列としてG成分のみの画素が配置される配列を用いて色判断処理を実行する。すなわち、第2の拡大基準画像の着目画素の色を全てGとした上で、参照画素の色と比較する。画素間距離算出部205は、第3の拡大基準画像については、第2の画素配列としてR成分とB成分とが市松状に配置される画素配列を用いて色判断処理を実行する。すなわち、画素間距離算出部205は、第3の拡大基準画像の着目画素の色を、当該R成分とB成分とが市松状に配置される画素配列に応じて決まる色に決定した上で、参照画素の色と比較する。
For the second enlarged reference image, the inter-pixel
画素間距離算出部205は、第4の拡大基準画像については、第2の画素配列としてG成分のみの画素が配置される配列を用いて色判断処理を実行する。すなわち、第2の拡大基準画像の着目画素の色を全てGとした上で、参照画素の色と比較する。画素間距離算出部205は、第5の拡大基準画像については、第2の画素配列としてR成分のみの画素が配置される配列を用いて色判断処理を実行する。すなわち、第2の拡大基準画像の着目画素の色を全てRとした上で、参照画素の色と比較する。画素間距離算出部205は、第6の拡大基準画像については、第2の画素配列としてB成分のみの画素が配置される配列を用いて色判断処理を実行する。すなわち、第2の拡大基準画像の着目画素の色を全てBとした上で、参照画素の色と比較する。
The inter-pixel
第3の拡大方法を用いた拡大処理結果に基づく色判断処理を実行することによって、以下の効果が得られる。参照画素の色は、3プレーンの拡大基準画像のそれぞれにおける同じ位置の着目画素のいずれかと同色となる。従って、当該着目画素が欠落画素である場合には、3プレーンの拡大基準画像のうちのいずれかのプレーンの当該着目画素に参照画素が挿入される。これにより、効率的に拡大基準画像の欠落画素を埋めていくことができる。さらに、低解像度画像の枚数が多いほど、参照画素の提供元である非基準画像の数が多くなるので、拡大基準画像を3プレーンとしても、欠落画素が埋まりやすくなる。その結果、後に実行されるR,G,B同時化処理において、RGB同時化部209の処理負荷を減らすことができる。
By executing the color determination process based on the enlargement process result using the third enlargement method, the following effects can be obtained. The color of the reference pixel is the same color as one of the target pixels at the same position in each of the three-plane enlarged reference images. Therefore, when the target pixel is a missing pixel, a reference pixel is inserted into the target pixel of any plane of the three-plane enlarged reference image. Thereby, the missing pixels of the enlarged reference image can be filled efficiently. Furthermore, as the number of low-resolution images increases, the number of non-standard images from which reference pixels are provided increases. Therefore, even if the enlarged standard image has three planes, missing pixels are more likely to be filled. As a result, it is possible to reduce the processing load of the
本実施例の画像処理装置によれば、入力される低解像度画像の枚数に応じて、メモリの使用量を抑えるか、G成分の解像度を高くするか、R,G,B同時化処理の負荷を減らすかのいずれかを実現することができる。 According to the image processing apparatus of this embodiment, depending on the number of input low resolution images, the memory usage is reduced, the resolution of the G component is increased, or the load of the R, G, B synchronization processing is increased. Either can be realized.
(その他の実施例)
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。この場合、そのプログラム、及び該プログラムを記憶した記憶媒体は本発明を構成することになる。
(Other examples)
The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, or the like) of the system or apparatus reads the program. It is a process to be executed. In this case, the program and the storage medium storing the program constitute the present invention.
101 光学系
102 撮像素子
103 A/D変換部
104 画像処理部
105 システム制御部
106 操作部
107 表示部
108 記録部
DESCRIPTION OF
Claims (7)
前記撮影された複数枚の画像から1枚の画像を基準画像を選択するとともに、前記複数枚の画像のうち前記基準画像以外の画像を非基準画像とする画像選択手段と、
前記基準画像が有する画素の座標を前記非基準画像が有する画素の座標に変換する座標変換係数を算出し、該算出した座標変換係数を記憶手段に記憶する変換係数算出手段と、
前記基準画像を予め決められた拡大倍率で拡大して拡大基準画像とする画像拡大手段と、
前記拡大基準画像が有する画素のうち、前記第1の画素配列上に配置されている画素を第1の非欠落画素、該第1の画素配列上に配置されていない画素を第1の欠落画素として決定して該拡大基準画像を記憶手段に記憶する拡大基準画像記憶手段と、
前記拡大基準画像が有する前記基準画像の画素のうち、前記基準画像が有する画素配列と同じ画素配列上に配置されていない画素を第2の非欠落画素として有し、該拡大基準画像が有する画素のうち、前記第2の非欠落画素以外の画素を第2の欠落画素として有する保存用画像を生成して記憶手段に記憶する保存用画像生成手段と、
前記基準画像の拡大倍率と前記座標変換係数とを用いて、前記拡大基準画像が有する第1の欠落画素の座標を変換して参照座標とし、各々の非基準画像が有する画素のうち、前記参照座標との距離が最も近い画素を前記第1の欠落画素に対応する近傍画素として決定する近傍画素決定手段と、
予め決められた第2の画素配列と前記第1の欠落画素の座標とに基づいて、該第1の欠落画素の色を判別し、判別した該第1の欠落画素の色が前記近傍画素の色と同じであるかを判断する色判断処理を行う色判断手段と、
前記第1の欠落画素の色が前記近傍画素の色と同じであると判断された場合に、非基準画像が有する近傍画素のうち、対応する前記参照座標との距離が最も近い近傍画素を第1の参照画素として決定する第1参照画素決定手段と、
前記第1の欠落画素の色が前記近傍画素の色と同じでないと判断された場合に、該第1の欠落画素の色と、該近傍画素の色と、前記非基準画像が有する近傍画素と前記第1の参照座標との距離とに応じた、前記近傍画素の評価値を算出する評価値算出手段と、
非基準画像が有する近傍画素のうち、前記算出された評価値が最も大きい近傍画素を第2の参照画素として決定する第2参照画素決定手段と、
前記第1の参照画素を前記第1の欠落画素に挿入する第1の画素挿入手段と、
前記第2の参照画素を前記第2の欠落画素に挿入する第2の画素挿入手段とを備える
ことを特徴とする画像処理装置。 Photographing means for capturing a plurality of images having a predetermined first pixel arrangement;
An image selection means for selecting one image as a reference image from the plurality of captured images, and setting an image other than the reference image among the plurality of images as a non-reference image;
A conversion coefficient calculation unit that calculates a coordinate conversion coefficient for converting the coordinates of the pixel included in the reference image into the coordinates of the pixel included in the non-reference image, and stores the calculated coordinate conversion coefficient in a storage unit;
Image enlargement means for enlarging the reference image at a predetermined enlargement magnification to obtain an enlarged reference image;
Of the pixels of the enlarged reference image, the pixels arranged on the first pixel array are the first non-missing pixels, and the pixels not arranged on the first pixel array are the first missing pixels. An enlarged reference image storage means for determining and storing the enlarged reference image in a storage means;
Among the pixels of the reference image that the enlarged reference image has, pixels that are not arranged on the same pixel array as the pixel array that the reference image has as a second non-missing pixel, and that the enlarged reference image has A storage image generating unit that generates a storage image having a pixel other than the second non-missing pixel as a second missing pixel, and stores the storage image in a storage unit;
Using the enlargement magnification of the reference image and the coordinate conversion coefficient, the coordinates of the first missing pixel included in the enlarged reference image are converted to reference coordinates, and the reference among the pixels included in each non-reference image Neighboring pixel determining means for determining a pixel having the closest distance to the coordinates as a neighboring pixel corresponding to the first missing pixel;
Based on a predetermined second pixel array and the coordinates of the first missing pixel, the color of the first missing pixel is determined, and the determined color of the first missing pixel is the color of the neighboring pixel. Color determination means for performing color determination processing to determine whether the color is the same;
When it is determined that the color of the first missing pixel is the same as the color of the neighboring pixel, the neighboring pixel having the closest distance to the corresponding reference coordinate among the neighboring pixels included in the non-standard image is the first pixel. First reference pixel determining means for determining one reference pixel;
When it is determined that the color of the first missing pixel is not the same as the color of the neighboring pixel, the color of the first missing pixel, the color of the neighboring pixel, and the neighboring pixel that the non-reference image has Evaluation value calculating means for calculating an evaluation value of the neighboring pixels according to a distance from the first reference coordinate;
A second reference pixel determining unit that determines a neighboring pixel having the largest calculated evaluation value as a second reference pixel among neighboring pixels included in the non-reference image;
First pixel insertion means for inserting the first reference pixel into the first missing pixel;
An image processing apparatus comprising: a second pixel insertion unit that inserts the second reference pixel into the second missing pixel.
ことを特徴とする請求項1に記載の画像処理装置。 Based on the enlarged reference image in which the first reference pixel is inserted into the first missing pixel and the storage image in which the second reference pixel is inserted into the second missing pixel, The image processing apparatus according to claim 1, further comprising color synchronization means for performing synchronization processing.
ことを特徴とする請求項1または請求項2に記載の画像処理装置。 The image processing apparatus according to claim 1, wherein the image enlargement unit enlarges the reference image at the enlargement magnification so that the first pixel arrangement is maintained.
ことを特徴とする請求項1乃至3のいずれか1項に記載の画像処理装置。 The image processing apparatus according to any one of claims 1 to 3, wherein the first and second pixel arrays are Bayer arrays.
前記画像拡大手段は、前記撮影された画像の枚数に応じて、前記基準画像を、第1の拡大方法、第2の拡大方法または第3の拡大方法のいずれかで拡大し、
前記第1の拡大方法は、前記基準画像が有するベイヤー配列が維持されるように該基準画像を前記拡大倍率で拡大して第1の拡大基準画像を生成し、
前記第2の拡大方法は、前記基準画像をG成分の画像とRB成分の画像に分離し、G成分の画像を水平方向垂直方向共に前記拡大倍率で拡大を行って第2の拡大基準画像を生成するとともに、前記基準画像のRB成分の画像をR成分とB成分とが市松状に配置されるように水平方向垂直方向共に前記拡大倍率で拡大することによって、第3の拡大基準画像を生成し、
前記第3の拡大方法は、前記基準画像を色成分毎に分離した画像を作成し、作成した各々の画像を水平方向垂直方向共に前記拡大倍率で拡大することによって、第4、5、および6の拡大基準画像を生成し、
前記色判断手段は、
前記第1の拡大基準画像については、前記第2の画素配列としてベイヤー配列を用いて前記色判断処理を実行し、
前記第2の拡大基準画像については、前記第2の画素配列としてG成分のみの画素が配置される配列を用いて前記色判断処理を実行し、前記第3の拡大基準画像については、前記第2の画素配列としてR成分とB成分とが市松状に配置される画素配列を用いて前記色判断処理を実行し、
前記第4の拡大基準画像については、前記第2の画素配列としてG成分のみの画素が配置される配列を用いて前記色判断処理を実行し、前記第5の拡大基準画像については、前記第2の画素配列としてR成分のみの画素が配置される配列を用いて前記色判断処理を実行し、前記第6の拡大基準画像については、前記第2の画素配列としてB成分のみの画素が配置される配列を用いて前記色判断処理を実行する
ことを特徴とする請求項1または請求項2に記載の画像処理装置。 The first pixel array is a Bayer array;
The image enlargement means enlarges the reference image by any one of the first enlargement method, the second enlargement method, and the third enlargement method according to the number of the taken images.
The first enlargement method generates the first enlarged reference image by enlarging the reference image at the enlargement magnification so that the Bayer array of the reference image is maintained.
In the second enlargement method, the reference image is separated into a G component image and an RB component image, the G component image is enlarged in the horizontal and vertical directions at the enlargement magnification, and the second enlarged reference image is obtained. And generating a third enlarged reference image by enlarging the image of the RB component of the reference image in the horizontal and vertical directions at the enlargement magnification so that the R component and the B component are arranged in a checkered pattern. And
In the third enlargement method, an image obtained by separating the reference image for each color component is created, and each of the created images is enlarged in the horizontal direction and the vertical direction at the enlargement magnification. An enlarged reference image of
The color determining means is
For the first enlarged reference image, the color determination process is performed using a Bayer array as the second pixel array,
For the second enlarged reference image, the color determination process is executed using an array in which pixels of only the G component are arranged as the second pixel array, and for the third enlarged reference image, the second enlarged reference image The color determination process is executed using a pixel array in which R component and B component are arranged in a checkered pattern as the pixel array of 2.
For the fourth enlarged reference image, the color determination process is executed using an array in which pixels of only the G component are arranged as the second pixel array, and for the fifth enlarged reference image, The color determination process is executed using an array in which pixels of only the R component are arranged as the second pixel array, and only the B component is arranged as the second pixel array in the sixth enlarged reference image. The image processing apparatus according to claim 1, wherein the color determination process is executed using an array to be processed.
前記撮影された複数枚の画像から1枚の画像を基準画像を選択するとともに、前記複数枚の画像のうち前記基準画像以外の画像を非基準画像とする工程と、
前記基準画像が有する画素の座標を前記非基準画像が有する画素の座標に変換する座標変換係数を算出し、該算出した座標変換係数を記憶手段に記憶する工程と、
前記基準画像を予め決められた拡大倍率で拡大して拡大基準画像とする工程と、
前記拡大基準画像が有する画素のうち、前記第1の画素配列上に配置されている画素を第1の非欠落画素、該第1の画素配列上に配置されていない画素を第1の欠落画素として決定して該拡大基準画像を記憶手段に記憶する工程と、
前記拡大基準画像が有する前記基準画像の画素のうち、前記基準画像が有する画素配列と同じ画素配列上に配置されていない画素を第2の非欠落画素として有し、該拡大基準画像が有する画素のうち、前記第2の非欠落画素以外の画素を第2の欠落画素として有する保存用画像を生成して記憶手段に記憶する工程と、
前記基準画像の拡大倍率と前記座標変換係数とを用いて、前記拡大基準画像が有する第1の欠落画素の座標を変換して参照座標とし、各々の非基準画像が有する画素のうち、前記参照座標との距離が最も近い画素を前記第1の欠落画素に対応する近傍画素として決定する工程と、
予め決められた第2の画素配列と前記第1の欠落画素の座標とに基づいて、該第1の欠落画素の色を判別し、判別した該第1の欠落画素の色が前記近傍画素の色と同じであるかを判断する色判断処理を行う工程と、
前記第1の欠落画素の色が前記近傍画素の色と同じであると判断された場合に、非基準画像が有する近傍画素のうち、対応する前記参照座標との距離が最も近い近傍画素を第1の参照画素として決定する工程と、
前記第1の欠落画素の色が前記近傍画素の色と同じでないと判断された場合に、該第1の欠落画素の色と、該近傍画素の色と、前記非基準画像が有する近傍画素と前記第1の参照座標との距離とに応じた、前記近傍画素の評価値を算出する工程と、
非基準画像が有する近傍画素のうち、前記算出された評価値が最も大きい近傍画素を第2の参照画素として決定する工程と、
前記第1の参照画素を前記第1の欠落画素に挿入する工程と、
前記第2の参照画素を前記第2の欠落画素に挿入する工程とを有する
ことを特徴とする画像処理方法。 Capturing a plurality of images having a predetermined first pixel arrangement;
Selecting a reference image as one image from the plurality of captured images, and setting an image other than the reference image as a non-reference image among the plurality of images;
Calculating a coordinate conversion coefficient for converting the coordinates of the pixel included in the reference image into the coordinates of the pixel included in the non-reference image, and storing the calculated coordinate conversion coefficient in a storage unit;
Enlarging the reference image at a predetermined enlargement magnification to obtain an enlarged reference image;
Of the pixels of the enlarged reference image, the pixels arranged on the first pixel array are the first non-missing pixels, and the pixels not arranged on the first pixel array are the first missing pixels. And storing the enlarged reference image in a storage means,
Among the pixels of the reference image that the enlarged reference image has, pixels that are not arranged on the same pixel array as the pixel array that the reference image has as a second non-missing pixel, and that the enlarged reference image has Generating a storage image having a pixel other than the second non-missing pixel as the second missing pixel, and storing it in the storage unit;
Using the enlargement magnification of the reference image and the coordinate conversion coefficient, the coordinates of the first missing pixel included in the enlarged reference image are converted to reference coordinates, and the reference among the pixels included in each non-reference image Determining a pixel closest to the coordinate as a neighboring pixel corresponding to the first missing pixel;
Based on a predetermined second pixel array and the coordinates of the first missing pixel, the color of the first missing pixel is determined, and the determined color of the first missing pixel is the color of the neighboring pixel. A step of performing color determination processing for determining whether the color is the same;
When it is determined that the color of the first missing pixel is the same as the color of the neighboring pixel, the neighboring pixel having the closest distance to the corresponding reference coordinate among the neighboring pixels included in the non-standard image is the first pixel. Determining as one reference pixel;
When it is determined that the color of the first missing pixel is not the same as the color of the neighboring pixel, the color of the first missing pixel, the color of the neighboring pixel, and the neighboring pixel that the non-reference image has Calculating an evaluation value of the neighboring pixels according to a distance from the first reference coordinates;
Determining a neighboring pixel having the largest calculated evaluation value among neighboring pixels included in the non-reference image as a second reference pixel;
Inserting the first reference pixel into the first missing pixel;
Inserting the second reference pixel into the second missing pixel. An image processing method comprising:
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2011260662A JP2013115650A (en) | 2011-11-29 | 2011-11-29 | Image processing device, image processing method, and computer program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2011260662A JP2013115650A (en) | 2011-11-29 | 2011-11-29 | Image processing device, image processing method, and computer program |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2013115650A true JP2013115650A (en) | 2013-06-10 |
Family
ID=48710808
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2011260662A Pending JP2013115650A (en) | 2011-11-29 | 2011-11-29 | Image processing device, image processing method, and computer program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2013115650A (en) |
-
2011
- 2011-11-29 JP JP2011260662A patent/JP2013115650A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP6139713B2 (en) | Dual aperture zoom digital camera | |
| JP5451782B2 (en) | Image processing apparatus and image processing method | |
| JP5341010B2 (en) | Image processing apparatus, imaging apparatus, program, and image processing method | |
| US9538085B2 (en) | Method of providing panoramic image and imaging device thereof | |
| JP6372983B2 (en) | FOCUS DETECTION DEVICE, ITS CONTROL METHOD, AND IMAGING DEVICE | |
| JP6222514B2 (en) | Image processing apparatus, imaging apparatus, and computer program | |
| JP2013165485A (en) | Image processing apparatus, image capturing apparatus, and computer program | |
| JP2013165488A (en) | Image processing apparatus, image capturing apparatus, and program | |
| JP5959194B2 (en) | Imaging device | |
| JP6702792B2 (en) | Image processing apparatus and control method thereof | |
| US10075687B2 (en) | Imaging apparatus and imaging method to obtain high quality luminance images | |
| JP5820720B2 (en) | Imaging device | |
| JP5607266B2 (en) | IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, AND CONTROL PROGRAM | |
| US20240430568A1 (en) | Imaging element including processor configured to receive vibration information related to a vibration exerted on the imaging element, imaging apparatus, operation method of imaging element, and program | |
| JP5455728B2 (en) | Imaging apparatus, image processing apparatus, and image processing method | |
| JP6639276B2 (en) | Image processing apparatus and control method thereof, imaging apparatus, and program | |
| JP6274744B2 (en) | Image processing apparatus and image processing method | |
| JP2019047145A (en) | IMAGE PROCESSING APPARATUS, IMAGING APPARATUS, CONTROL METHOD OF IMAGE PROCESSING APPARATUS, AND PROGRAM | |
| JP6245847B2 (en) | Image processing apparatus and image processing method | |
| JP6218520B2 (en) | Image processing apparatus, image processing method, and program | |
| JP6012167B2 (en) | Image processing apparatus, image processing method, and computer program | |
| JP2013115650A (en) | Image processing device, image processing method, and computer program | |
| JP2015156559A (en) | Solid-state imaging device and imaging system | |
| JP2012142676A (en) | Imaging device and image generation method | |
| JP2017126889A (en) | Image processing apparatus, imaging device, image processing method and program |