JP6395398B2 - Image processing apparatus and image processing method - Google Patents
Image processing apparatus and image processing method Download PDFInfo
- Publication number
- JP6395398B2 JP6395398B2 JP2014042769A JP2014042769A JP6395398B2 JP 6395398 B2 JP6395398 B2 JP 6395398B2 JP 2014042769 A JP2014042769 A JP 2014042769A JP 2014042769 A JP2014042769 A JP 2014042769A JP 6395398 B2 JP6395398 B2 JP 6395398B2
- Authority
- JP
- Japan
- Prior art keywords
- pixel
- color
- pixel data
- data
- copy
- 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.)
- Active
Links
Images
Landscapes
- Color Television Image Signal Generators (AREA)
- Studio Devices (AREA)
Description
本発明は、画像処理装置および画像処理方法に関し、特に、注目画素の処理を、その周囲の画素を参照して行うために用いて好適なものである。 The present invention relates to an image processing apparatus and an image processing method, and is particularly suitable for performing processing of a pixel of interest with reference to surrounding pixels.
一般に、デジタルカメラ等に搭載されているCMOS型及びCCD型の撮像素子では、R(赤)色1個、G(緑)色2個、B(青)色1個のカラーフィルタから構成される2×2画素を単位としたベイヤー配列が多く使用されている。
しかし、近年、モアレの発生防止といった目的で、従来のベイヤー配列以外のカラーフィルタ配列を有する撮像素子が製品化されている。非特許文献1では、6×6画素を単位とした非周期性の高いカラーフィルタ配列を持つ撮像素子が開示されている。カラーフィルタ配列の非周期性の向上により、このカラーフィルタ配列では、従来のベイヤー配列と比較して、モアレの発生を軽減することができる。
Generally, CMOS and CCD image sensors mounted on digital cameras and the like are composed of color filters of one R (red) color, two G (green) colors, and one B (blue) color. A Bayer array in units of 2 × 2 pixels is often used.
However, in recent years, an image pickup device having a color filter array other than the conventional Bayer array has been commercialized for the purpose of preventing the occurrence of moire. Non-Patent
画像処理装置では、撮像素子から出力された画素データに対して、一次元または二次元フィルタを使用して、エッジ強調処理やローパスフィルタによる補正処理等が実施される。前記フィルタを使用する処理では、画像データ全域に対して処理を行う際に、フィルタの注目画素が画像データの端部に位置した場合、参照画素の一部が存在しない。ここで、注目画素はフィルタ係数の中心位置となる画素であり、参照画素はフィルタ係数の中心位置以外の周囲に位置する画素である。
特許文献1には、フィルタを使用する処理において、注目画素に対する参照画素の一部が存在しない場合に、存在しない参照画素の位置に画像データの端部の有効画素データをコピーして外挿することが開示されている。
In the image processing apparatus, the pixel data output from the image sensor is subjected to edge enhancement processing, correction processing using a low-pass filter, and the like using a one-dimensional or two-dimensional filter. In the process using the filter, when the pixel of interest of the filter is located at the end of the image data when performing the process on the entire image data, a part of the reference pixel does not exist. Here, the target pixel is a pixel at the center position of the filter coefficient, and the reference pixel is a pixel located around other than the center position of the filter coefficient.
In
しかしながら、非特許文献1で開示されているような特殊なカラーフィルタ配列を有する撮像素子で撮像された画像データに対し特許文献1に記載の技術を用いると、コピーされた参照画素となる画素データとコピー元の画素データとの間隔が長くなる虞がある。
一般に、画像データの2つの画素間の間隔が長い場合、各画素の捉える被写体物も異なり、色も異なるため、各画素の画素値の差が大きくなることが多い。したがって、画像端部にコピーされる参照画素は、画像端部の近傍に位置する画素であって注目画素と同色の有効画素であることが望ましい。
本発明は、このような課題を鑑みて成されたものであり、注目画素に対する参照画素のデータとして有効画素のデータをコピーする際に、コピー元の有効画素の位置とコピー先の位置との間隔とを短縮することを目的とする。
However, when the technique described in
In general, when the interval between two pixels of image data is long, the subject captured by each pixel is different and the color is also different, so the difference in pixel value of each pixel often increases. Therefore, it is desirable that the reference pixel copied to the image end portion is a pixel located in the vicinity of the image end portion and an effective pixel having the same color as the target pixel.
The present invention has been made in view of such problems, and when copying effective pixel data as reference pixel data for a target pixel, the position of a copy source effective pixel and a copy destination position are determined. The purpose is to shorten the interval.
本発明の画像処理装置は、M×N(M、Nは正の整数)の色の配列を有するカラーフィルタであって、ベイヤー配列以外の色の配列を有するカラーフィルタを備えた撮像素子から出力された画素データを取得する取得手段と、前記画素データにより定まる画像の端部の外側の領域であって、当該画素データを処理する際の参照画素のそれぞれに、前記カラーフィルタにおける前記色の配列の繰り返しパターンが保持されるように、色を配置する配置手段と、前記参照画素からなる領域である参照画素領域における画素ブロックに対して前記配置手段により配置された色の組み合わせと同じ色の組み合わせとなる画素ブロックを、水平方向または垂直方向を探索の方向として、前記画素データに基づく画像の領域である有効画素領域から探索する探索手段と、前記探索手段により探索された前記有効画素領域における前記画素ブロックに含まれる画素のデータを、前記参照画素領域における前記画素ブロックに含まれる画素のデータとしてコピーするコピー手段と、を有し、前記探索手段は、前記参照画素領域における前記画素ブロックに対して前記配置手段により配置された色の組み合わせと同じ色の組み合わせとなる前記画素ブロックであって、当該参照画素領域における前記画素ブロックに最も近い前記画素ブロックを、前記有効画素領域から探索することを特徴とする。 An image processing apparatus according to the present invention is a color filter having a color arrangement of M × N (M and N are positive integers), and is output from an image sensor having a color filter having a color arrangement other than a Bayer arrangement. And an array of the colors in the color filter in each of the reference pixels when the pixel data is processed, an acquisition means for acquiring the pixel data and an area outside the edge of the image determined by the pixel data And a combination of the same color as the combination of colors arranged by the arranging unit with respect to the pixel block in the reference pixel area, which is an area composed of the reference pixels, so that the repetitive pattern is maintained. The search is performed from the effective pixel area, which is the area of the image based on the pixel data, with the horizontal or vertical direction as the search direction. Yes and searching means, the data of pixels included in the pixel block in the effective pixel region which is searched by the searching means, and copying means for copying the data of pixels included in the pixel block in the reference pixel region, the The search means is the pixel block having the same color combination as the color combination arranged by the arrangement means for the pixel block in the reference pixel area, and the pixel block in the reference pixel area The pixel block closest to is searched from the effective pixel region .
本発明によれば、注目画素に対する参照画素のデータとして有効画素のデータをコピーする際に、コピー元の有効画素の位置とコピー先の位置との間隔とを短縮することができる。 According to the present invention, when valid pixel data is copied as reference pixel data with respect to a target pixel, the interval between the copy source valid pixel position and the copy destination position can be shortened.
本発明の実施形態を説明する前に、本発明の実施形態の前提となる技術を説明する。
ここでは、ベイヤー配列のカラーフィルタ配列を有する撮像素子から出力されたR、G、Bの各色の画素データに対し、同色の画素データに5画素分のタップ数を有する1次元フィルタ処理を行う際の画像端部における参照画素の拡張処理を例に挙げて説明する。本例の1次元フィルタ処理では、処理対象となる注目画素を中心に左右4画素分のデータを必要とする。
図11は、ベイヤー配列のカラーフィルタ配列を有する撮像素子から出力された画素データに対して、左右4画素ずつ画像端部の有効画素データをコピーして、参照画素を画像端部の外側に拡張処理した際の概念を示す図である。以下、画像端部の有効画素データをコピーして、参照画素を画像端部の外側に拡張する処理を画素コピー処理と称する。また、図12は、ベイヤー配列を示す図である。
図11(a)は、ベイヤー配列のカラーフィルタ配列を有する撮像素子から画像処理装置(画素コピー処理部)に入力される1ライン分の画素データを示す図である。撮像素子からの画素データは、画素データR0(1101)、G0(1102)、R1(1103)、G1(1104)、・・・、R98(1109)、G98(1110)、R99(1111)、G99(1112)の順で画素コピー処理部に入力する。ここで、R*(*:数字)はR色の画素データを、G*はG色の画素データをそれぞれ表す。
Prior to describing the embodiments of the present invention, the technology that is the premise of the embodiments of the present invention will be described.
Here, when one-dimensional filter processing is performed on pixel data of R, G, and B colors output from an image sensor having a color filter array of Bayer array, the pixel data of the same color has a tap number of 5 pixels. The reference pixel expansion process at the image edge will be described as an example. In the one-dimensional filter processing of this example, data for four pixels on the left and right are required centering on the target pixel to be processed.
FIG. 11 shows that pixel data output from an image sensor having a color filter array of Bayer array is copied from the effective pixel data at the image edge by four pixels on the left and right sides, and the reference pixel is extended outside the image edge. It is a figure which shows the concept at the time of processing. Hereinafter, the process of copying the effective pixel data at the image end and expanding the reference pixel to the outside of the image end is referred to as a pixel copy process. FIG. 12 is a diagram showing a Bayer array.
FIG. 11A is a diagram illustrating pixel data for one line that is input to an image processing apparatus (pixel copy processing unit) from an image sensor having a Bayer color filter array. Pixel data from the image sensor is pixel data R0 (1101), G0 (1102), R1 (1103), G1 (1104),..., R98 (1109), G98 (1110), R99 (1111), G99. Input to the pixel copy processing unit in the order of (1112). Here, R * (*: number) represents R pixel data, and G * represents G pixel data.
画像処理装置の内部において画素コピー処理部の後段にあるフィルタ処理部は、前記5画素分のタップ数を有する1次元フィルタ処理を実施する。1次元フィルタ処理では、画素データR0(1101)が注目画素になった際に、画素データR0(1101)を中心として左右2画素分の同色の画素データが必要となる。そのため、画素コピー処理部では、入力された画素データに対して、注目画素と同色の画素が左右2画素分含まれるように左右4画素ずつ画像の端部から有効画素データを抽出し、抽出した有効画像データを参照画素データとして拡張した後に出力を実施する。 A filter processing unit in the subsequent stage of the pixel copy processing unit in the image processing apparatus performs one-dimensional filter processing having the number of taps corresponding to the five pixels. In the one-dimensional filter processing, when the pixel data R0 (1101) becomes the target pixel, pixel data of the same color for two pixels on the left and right with the pixel data R0 (1101) as the center is required. For this reason, the pixel copy processing unit extracts and extracts effective pixel data from the end of the image by four pixels on the left and right sides so that pixels of the same color as the target pixel are included in the left and right pixels with respect to the input pixel data. Output is performed after valid image data is expanded as reference pixel data.
図11(b)は、画素コピー処理が行われた後の1ライン分の画素データを示す図である。
画像の左端部では、図11(b)に示すように、画像の左端部の有効画素データR0(1101)、G0(1102)を2画素ずつ、4画素分の画素コピー処理を行う。その結果、画像の左端部の外側に拡張される形で画素データR0(1121)、G0(1122)、R0(1123)、G0(1124)が参照画素として画素コピー処理される。画素コピー処理により、後段のフィルタ処理部で画素データR0(1101)が注目画素となった際にも、画素データR0(1101)と同色の参照画素として画素データR0(1121)及びR0(1123)を使用することが可能である。
FIG. 11B is a diagram illustrating pixel data for one line after the pixel copy process is performed.
At the left end portion of the image, as shown in FIG. 11B, pixel copy processing for four pixels is performed for each of the effective pixel data R0 (1101) and G0 (1102) at the left end portion of the image. As a result, the pixel data R0 (1121), G0 (1122), R0 (1123), and G0 (1124) is subjected to pixel copy processing with reference pixels being expanded outside the left end of the image. Even when the pixel data R0 (1101) becomes a target pixel in the subsequent filter processing unit by the pixel copy processing, the pixel data R0 (1121) and R0 (1123) are used as reference pixels having the same color as the pixel data R0 (1101). Can be used.
一方、画像の右端部では、図11(b)に示すように、画像の右端部の有効画素データR98(1111)、R99(1112)を2画素ずつ、4画素分の画素コピー処理を行う。その結果、画像の右端部の外側に拡張される形で画素データR99(1125)、G99(1126)、R99(1127)、G99(1128)が参照画素として画素コピー処理される。画素コピー処理により、後段のフィルタ処理部で画素データG99(1112)が注目画素となった際にも、画素データG99(1112)と同色の参照画素として画素データG99(1126)及びG99(1128)を使用することが可能である。
尚、G色、B色の画素データを含むラインから読み出された画素データに対する画素コピー処理の方法も同様である。
On the other hand, at the right end portion of the image, as shown in FIG. 11B, pixel copy processing for four pixels is performed for each of the effective pixel data R98 (1111) and R99 (1112) at the right end portion of the image. As a result, pixel copy processing is performed using the pixel data R99 (1125), G99 (1126), R99 (1127), and G99 (1128) as reference pixels in a form expanded outside the right end of the image. Even when the pixel data G99 (1112) becomes the target pixel in the subsequent filter processing unit by the pixel copy processing, the pixel data G99 (1126) and G99 (1128) are used as reference pixels having the same color as the pixel data G99 (1112). Can be used.
The pixel copy processing method for pixel data read from a line including pixel data of G color and B color is the same.
図13は、非特許文献1で開示されている特殊なカラーフィルタ配列を有する撮像素子から出力された画素データにおける画像の左端部に、参照画素として、同一ラインの4画素分の画素データについての画素コピー処理を実施した例を示す図である。図10は、非特許文献1で開示されているカラーフィルタ配列を示す図である。
ここで、画素コピー処理後の後段のフィルタ処理におけるフィルタ係数の位置を考慮して、カラーフィルタ配列の色の順番を保持したまま、参照画素の画素コピー処理を実施する。
したがって、第1ライン目では、参照画素となるB色の画素データ1301は、当該画素データ1301と同一のライン内の画像の最左端部に位置する同色のB色の有効画素データ1202から画素コピー処理されたものになる。図10に示すカラーフィルタ配列の周期は6画素単位である。このため、画素コピー処理された参照画素となるB色の画素データ1301とコピー元のB色の有効画素データ1302との間隔は6画素となる。
FIG. 13 shows pixel data for four pixels on the same line as a reference pixel at the left end of an image in pixel data output from an image sensor having a special color filter array disclosed in
Here, in consideration of the position of the filter coefficient in the subsequent filter processing after the pixel copy processing, the pixel copy processing of the reference pixel is performed while maintaining the color order of the color filter array.
Therefore, in the first line, the B
第6ライン目では、参照画素となるR色の画素データ1303は、当該画素データ1303と同一のライン内の画像の左端部に位置する同色のR色の有効画素データ1304から画素コピー処理されたものになる。画素コピー処理された参照画素となるR色の画素データ1303とコピー元のB色の有効画素データ1304との間隔は6画素となる。
一方、図12に示すベイヤー配列のカラーフィルタ配列を有する撮像素子では、カラーフィルタ配列の周期が2画素単位である。このため、図11に示すように、画像の端部で画素コピー処理された参照画素となる画素データとコピー元となる画素データとの間隔は2画素となる。
In the sixth line, the
On the other hand, in the image sensor having the color filter array of the Bayer array shown in FIG. 12, the period of the color filter array is in units of two pixels. For this reason, as shown in FIG. 11, the interval between the pixel data to be the reference pixel that has been subjected to the pixel copy process at the edge of the image and the pixel data to be the copy source is two pixels.
このように、ベイヤー配列以外のカラーフィルタ配列のカラーフィルタで得られた画素データについて前述した画素コピー処理を行うと、画素コピー処理された参照画素とコピー元の有効画素との間隔が、ベイヤー配列時のものと比較して長くなる。したがって、参照画素となる画素データとコピー元の有効画素との画素値の差異もベイヤー配列時のものに比較して大きくなることがある。また、画素コピー処理部から出力された画素データを処理する後段のフィルタ処理部においても、参照画素となる画素データの画素値の差異の影響を受ける。
以上のような課題の下、以下に説明する本発明の実施形態に想到した。
As described above, when the pixel copy processing described above is performed on the pixel data obtained by the color filter of the color filter array other than the Bayer array, the interval between the reference pixel subjected to the pixel copy processing and the effective pixel of the copy source is set to the Bayer array. Longer than that of time. Therefore, the pixel value difference between the pixel data serving as the reference pixel and the effective pixel as the copy source may be larger than that in the Bayer array. Further, the subsequent filter processing unit that processes the pixel data output from the pixel copy processing unit is also affected by the difference in the pixel value of the pixel data serving as the reference pixel.
Under the problems as described above, the present inventors have arrived at an embodiment of the present invention described below.
以下、図面を参照して本発明の一実施形態を説明する。
図1は、画像処理装置100の機能的な構成の一例を示す図である。ここでは、画像処理装置100がデジタルカメラである場合を例に挙げて示す。
図1において、結像光学系101は、レンズや絞り等を含み、フォーカス調節や露出調節を行う。
撮像素子102は、光学像を電気信号に変換する光電変換機能を有し、CCDやCMOSセンサ等で構成される。撮像素子102には、図10に示す6×6画素単位の周期を持ったR(赤)、G(緑)、B(青)のカラーフィルタが配置される。各画素から出力される信号レベルは、R、G、B色の何れかに対応した信号レベルとなる。結像光学系101に入射した光は、撮像素子102の受光面に結像され、撮像素子102からアナログの画像信号として出力される。
Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
FIG. 1 is a diagram illustrating an example of a functional configuration of the
In FIG. 1, an imaging optical system 101 includes a lens, a diaphragm, etc., and performs focus adjustment and exposure adjustment.
The
A/D変換器103は、撮像素子102から出力されたアナログの画像信号を、図10に示す6×6画素単位のカラーフィルタ配列のRAW画像信号(デジタルの画像データ)に変換する。
The A /
画像処理回路104は、A/D変換器103から出力された画像データを取得し、取得した画像データに対して後述の画素補間処理や色変換処理等の現像処理を実施する。
メモリインターフェース(I/F)105は、DRAMで構成されたメモリ106との間で、画像処理回路104で処理された画像データや各種制御データの書き込み/読み出しを行う。
CPU107は、画像処理装置100の各種制御を司る。
表示部108は、液晶モニター等で構成される。表示部108は、画像処理回路104にて処理された画像データに基づく画像を随時表示し、ユーザがリアルタイムで被写体の様子を観察できるようにする。
The
A memory interface (I / F) 105 writes / reads image data processed by the
The
The
図2は、画像処理装置100の画像処理回路104の構成の一例を示す図である。
オフセット補正処理部201及びゲイン補正処理部202は、撮像素子102及びA/D変換器103のアナログ特性のばらつき(列アンプの特性ばらつき等)を補正するため、入力された画素信号に対して、オフセット補正及びゲイン補正を行う。
FIG. 2 is a diagram illustrating an example of the configuration of the
The offset
本実施形態の画素コピー処理部203は、後述する画素コピー処理を実施する。
フィルタ処理部204は、画素コピー処理が実施された画素データに対して、例えば、注目画素の左右3画素分の参照画素を必要とする7画素分のフィルタ係数を有するローパスフィルタ処理を実施する。
同時化処理部205は、画素補間演算処理を実施して、各画素におけるR色、G色、B色の信号値を算出し、同時化処理を実施する。
YUV変換処理部206は、RGBの信号データを、輝度信号Y、色差信号U、Vから構成されるYUVの信号データに変換する。
ガンマ補正処理部207は、信号値の変換テーブルを元に、YUV変換処理部206から出力されたYUVの信号データの信号値の変換を行うガンマ補正処理を実施する。その後は、目的に応じた各種画像処理が実施される。
The pixel
The
The
The YUV
The gamma
図3は、画像処理回路104の画素コピー処理部203の構成の一例を示す図である。
画素コピー処理制御部330は、画素コピー処理部203全体の制御を司る。
画素コピー処理制御部330には、前段のゲイン補正処理部202から有効画素データが入力されたことを通知するVALID_IN信号(Sig_302)が入力される。また、画素コピー処理制御部330は、有効画素データが出力されることを後段のフィルタ処理部204へ通知するVALID_OUT信号(Sig_305)を出力する。
また、画素コピー処理制御部330は、後段のフィルタ処理部204からの処理停止信号STOP_IN信号(Sig_304)を入力する。STOP_IN信号(Sig_304)がHighレベルの時は、画素コピー処理制御部330は、画素コピー処理部203の処理を停止させる。
FIG. 3 is a diagram illustrating an example of the configuration of the pixel
The pixel copy
The pixel copy
Further, the pixel copy
STOP_OUT信号(Sig_301)がHighレベルの時に、画素コピー処理制御部330は、前段のゲイン補正処理部202からの有効画素データの入力を停止させる。画素コピー処理制御部330は、HighレベルのSTOP_IN信号(Sig_304)の入力時と、画素データコピー処理部332の画素コピー処理中に、ゲイン補正処理部202へHighレベルのSTOP_OUT信号(Sig_301)を出力する。これにより、画素コピー処理制御部330は、ゲイン補正処理部202から画素コピー処理部203に有効画素データが入力することを停止させる。
When the STOP_OUT signal (Sig_301) is at a high level, the pixel copy
ラインバッファメモリ部331は、1ラインの画素データの数とカラーフィルタ配列の画素周期の数(図10のカラーフィルタ配列の場合は6画素)とを加算した数分のラインバッファメモリ(FIFO形式)を有する。
ラインバッファメモリ部331は、前段のゲイン補正処理部202から画素データを転送するDATA_IN信号(Sig_303)を入力する。ラインバッファメモリ部331は、VALID_IN信号(Sig_302)がHighレベルの時に、DATA_IN信号(Sig_303)を有効画素データとして記憶する。各有効画素データは、VALID_IN信号(Sig_302)がHighレベルの時にクロック1サイクルにつき1画素取り込まれる。
The line buffer memory unit 331 has as many line buffer memories (FIFO format) as the sum of the number of pixel data of one line and the number of pixel periods of the color filter array (six pixels in the case of the color filter array in FIG. 10). Have
The line buffer memory unit 331 receives a DATA_IN signal (Sig_303) for transferring pixel data from the gain
LINEBUF_OUTEN信号(Sig_311)は、画素コピー処理制御部330からのラインバッファメモリ部331の読み出し信号である。LINEBUF_OUTEN信号(Sig_311)がHighレベル時に、ラインバッファメモリ部331から有効画素データがBUF_DATA_OUT信号(Sig_320)として出力される。
画素データコピー処理部332は、画像の端部の有効画素データを、画像の端部の外側に参照画素データとして付加する画素コピー処理を実施する。ここで、画像コピー処理が行われた参照画素データとは、フィルタ処理部204におけるローパスフィルタ処理で使用される、7画素分のフィルタ係数を有するフィルタの注目画素が、画像の端部に位置する際に参照される画素データである。
The LINEBUF_OUTEN signal (Sig_311) is a read signal of the line buffer memory unit 331 from the pixel copy
The pixel data
画素データコピー処理部332は、画像データの2ライン分の有効画素データのうち、左端部と右端部の有効画素データと、出力処理中の次のラインの左端部と右端部の参照画素データと、を保存するバッファメモリ部340を有する。
バッファメモリ部340は、有効画素データ格納用のバッファメモリM_1L(351)、M_1R(352)、M_2L(353)、M_2R(354)を有する。さらにバッファメモリ部340は、参照画素データ格納用のバッファメモリM_REF_L(355)、M_REF_R(356)を有する。
バッファメモリM_1L(351)、M_1R(352)、M2_L(353)、M2_R(354)は、それぞれ、図10に示すカラーフィルタ配列の画素周期の数(6画素分)の画素データを格納する。
The pixel data
The
Each of the buffer memories M_1L (351), M_1R (352), M2_L (353), and M2_R (354) stores pixel data corresponding to the number of pixel periods (for six pixels) of the color filter array shown in FIG.
バッファメモリM_1L(351)、M_2L(353)には、第1ライン目、第2ライン目の画像データの左端部の有効画素データ6画素分が、それぞれ格納される。
バッファメモリM_1R(352)、M_2R(354)には、第1ライン目、第2ライン目の画像データの右端部の有効画素データ6画素分が、それぞれ格納される。
また、画素データコピー処理部332は、画素コピー処理された参照画素データを1ライン遅れで出力するため、当該参照画素データを格納するためのバッファメモリを2個有する。当該参照画素データを格納するためのバッファメモリM_REF_L(355)、M_REF_R(356)には、1ライン遅れで出力されるラインの左端部の参照画素データ、右端部の参照画素データが格納される。
In the buffer memories M_1L (351) and M_2L (353), the effective pixel data of 6 pixels at the left end portion of the image data of the first line and the second line are respectively stored.
The buffer memories M_1R (352) and M_2R (354) store the effective pixel data of 6 pixels at the right end of the image data of the first line and the second line, respectively.
Further, the pixel data
画素データコピー処理部332は、画素コピー処理制御部330からのCOPYBUF_INEN信号(Sig_340)がHighレベルの時に、画像の端部の有効画素データを、4個のバッファメモリに順序格納する。格納される順番は、バッファメモリM_1L(351)→M_1R(352)→M_2L(353)→M_2R(354)→M_1L(351)→・・・の順番である。1つのバッファメモリに6画素分の画素データの書き込みが完了したら、次のバッファメモリに対する書き込みが行われる。
When the COPYBUF_INEN signal (Sig_340) from the pixel copy
画素コピー処理制御部330は、画素コピー処理の開始の時に、HighレベルのCOPY_START信号(Sig_341)を画素データコピー処理部332に1パルス分出力し、画素コピー処理の開始を指示する。
画像の左端部と右端部の各端部の画素コピー処理の完了時に、画素データコピー処理部332は、HighレベルのCOPY_END信号(Sig_351)を画素コピー処理制御部330に出力し、画素コピー処理の完了を通知する。
The pixel copy
Upon completion of the pixel copy processing at each of the left and right end portions of the image, the pixel data
画素データコピー処理部332から画素コピー処理制御部330へ出力されるCOPY_VALID_OUT信号(Sig_350)は、バッファメモリ部340から参照画素データが読み出されている際にHighレベルとなる。読み出された参照画素データは、COPY_DATA_OUT信号(Sig_321)としてセレクタ部333に出力される。
画素コピー処理制御部330は、COPY_VALID_OUT信号(Sig_350)がHihgレベルの時にHighレベルのVALID_OUT信号(Sig_305)を出力する。これにより、前述したように、有効画素データが出力されることがフィルタ処理部204へ通知される。
The COPY_VALID_OUT signal (Sig_350) output from the pixel data
The pixel copy
画素データコピー処理部332のカラーID探索部341は、バッファメモリ部340に格納された有効画素データのうち、どの有効画素データを参照画素データとして出力するかを探索し、設定する。カラーID探索部341の動作については後に詳述する。
セレクタ部333は、後段のフィルタ処理部204へ、画素データ信号DATA_OUT信号(Sig_306)を出力する。画素コピー処理制御部330からセレクタ部333に出力されるSEL信号(Sig_314)がHighレベルのとき、DATA_OUT信号(Sig_306)として、参照画素データであるCOPY_DATA_OUT信号(Sig_321)が出力される。一方、SEL信号(Sig_314)がLowレベルのとき、DATA_OUT信号(Sig_306)として、ラインバッファメモリ部331に記憶された有効画素データであるBUF_DATA_OUT信号(Sig_320)が出力される。
The color
The
レジスタ部334は、画素コピー処理部203を制御するための設定値を書き込む複数のレジスタを有する。各レジスタは、画素コピー処理制御部330、画素データコピー処理部332へ結線されており、各処理部で適時レジスタ値が読み出される。尚、画素コピー処理が開始される前に、CPU(システム制御部)107からのRead/Write信号により、レジスタ部334のレジスタに対する設定値の読み出し、書き込みが実行される。
以下、レジスタ部334の有するレジスタの一例について説明する。
画像データの水平画素数及び垂直画素数は、レジスタ部334のH_PIXレジスタ及びV_PIXレジスタに設定される。
画素コピー処理される参照画素データの画素数として、左端部の参照画像データの画素数は、HL_REF_PIXレジスタに設定され、右端部の参照画像データの画素数は、HR_REF_PIXレジスタに設定される。
The
Hereinafter, an example of a register included in the
The number of horizontal pixels and the number of vertical pixels of the image data are set in the H_PIX register and the V_PIX register of the
As the number of reference pixel data to be subjected to pixel copy processing, the number of pixels of the reference image data at the left end is set in the HL_REF_PIX register, and the number of pixels of the reference image data at the right end is set in the HR_REF_PIX register.
画素コピー処理のコピー元となる有効画素データの画素数として、左端部の有効画素データの画素数は、HL_VAL_PIXレジスタに設定され、右端部の有効画素データの画素数は、HR_VAL_PIXレジスタに設定される。
図4(a)は、カラーID探索部341が参照するカラーIDレジスタの設定値の一例を示す図である。尚、以下の説明では、カラーIDレジスタを必要に応じてCIDレジスタと称する。
As the number of effective pixel data to be copied from the pixel copy process, the number of effective pixel data at the left end is set in the HL_VAL_PIX register, and the number of effective pixel data at the right end is set in the HR_VAL_PIX register. .
FIG. 4A is a diagram illustrating an example of setting values of the color ID register referred to by the color
レジスタ部334のCIDレジスタは、図10に示すカラーフィルタ配列の周期に合わせて6×6画素分の設定値を保持可能なレジスタ構成を有する。
CIDレジスタには、カラーフィルタの各色に対応したカラーID値が設定される。本実施形態では、R色の画素位置に「0」、G色の画素位置に「1」、B色の画素位置に「2」のカラーID値が設定される。CIDレジスタのカラーID値は、カラーID探索部341で、参照画素データのコピー元となる有効画素データの画素位置を探索する際に参照される。
The CID register of the
A color ID value corresponding to each color of the color filter is set in the CID register. In this embodiment, a color ID value of “0” is set at the R pixel position, “1” is set at the G pixel position, and “2” is set at the B pixel position. The color ID value in the CID register is referred to when the color
CIDレジスタは、図4(a)に示す水平方向のカラーIDアドレス値CIDXと、垂直方向のカラーIDアドレス値CIDYとを持ち、これらにより、各カラーIDの位置を指定することができる。以下の説明では、水平方向のカラーIDアドレス値CIDXと、垂直方向のカラーIDアドレス値CIDYの組み合わせを必要に応じてCIDアドレス値と称する。参照画素データの画素位置や有効画素データの画素位置は、CIDアドレス値により指定される。 The CID register has a horizontal color ID address value CIDX and a vertical color ID address value CIDY shown in FIG. 4A, and the position of each color ID can be specified by these. In the following description, a combination of the color ID address value CIDX in the horizontal direction and the color ID address value CIDY in the vertical direction is referred to as a CID address value as necessary. The pixel position of the reference pixel data and the pixel position of the effective pixel data are specified by the CID address value.
画像データの第1ライン目の左端部における参照画素データの始点画素位置は、CIDアドレス値を用いて、レジスタ部334のL_REF_CIDXレジスタ及びL_REF_CIDYレジスタに設定される。
有効画素データの始点画素位置は、レジスタ部334のL_VAL_CIDXレジスタ及びL_VAL_CIDYレジスタに設定される。
同じく画像データの第1ライン目の右端部における参照画素データの始点画素位置は、CIDアドレス値を用いて、レジスタ部334のR_REF_CIDXレジスタ及びR_REF_CIDYレジスタに設定される。
The start pixel position of the reference pixel data at the left end of the first line of the image data is set in the L_REF_CIDX register and the L_REF_CIDY register of the
The starting pixel position of the effective pixel data is set in the L_VAL_CIDX register and the L_VAL_CIDY register of the
Similarly, the start pixel position of the reference pixel data at the right end of the first line of the image data is set in the R_REF_CIDX register and the R_REF_CIDY register of the
有効画素データの終点画素位置は、レジスタ部334のR_VAL_CIDXレジスタ及びR_VAL_CIDYレジスタに設定される。
参照画像データの探索用として使用するカラーIDの組み合わせ画素ブロック数の水平画素数及び垂直画素数は、レジスタ部334のBLK_Xレジスタ及びBLK_Yレジスタに設定される。
The end pixel position of the valid pixel data is set in the R_VAL_CIDX register and the R_VAL_CIDY register of the
The number of horizontal pixels and the number of vertical pixels of the number of combined pixel blocks of the color ID used for searching the reference image data are set in the BLK_X register and BLK_Y register of the
図5は、画像の両端部の画素コピー処理の結果の一例を示す図である。図5中の白色の画素データは、画素コピー処理により、画像の左端部及び右端部に外挿される参照画素データである。一方、網点の画素データは、有効画素データを示す。
第1ライン目及び第2ライン目の左端部の画素ブロック501、502、503は画素コピー処理された参照画素データを表す。
第1ライン目及び第2ライン目の右端部の画素ブロック508、509、510は、画素コピー処理された参照画素データを表す。
第1ライン目及び第2ライン目の画素ブロック504〜507は有効画素データを表す。
FIG. 5 is a diagram illustrating an example of a result of pixel copy processing at both ends of an image. The white pixel data in FIG. 5 is reference pixel data extrapolated to the left end portion and the right end portion of the image by pixel copy processing. On the other hand, the pixel data of halftone dots indicates effective pixel data.
Pixel blocks 501, 502, and 503 at the left end of the first line and the second line represent reference pixel data subjected to pixel copy processing.
Pixel blocks 508, 509, and 510 at the right end of the first line and the second line represent reference pixel data subjected to pixel copy processing.
The pixel blocks 504 to 507 in the first line and the second line represent effective pixel data.
以下に説明する画素コピー処理により、画像の左端部の画素ブロック501及び503の参照画素データには、画素ブロック505のR色とG色の有効画素データが上下反転されてコピー処理される。画素ブロック502の参照画素データには、画素ブロック504のG色とB色の有効画素データが上下反転されてコピー処理される。
画像の右端部の画素ブロック508及び510の参照画素データには、画素ブロック506のB色とG色の有効画素データが上下反転されてコピー処理される。画素ブロック509の参照画素データには、画素ブロック507のG色とR色の有効画素データが上下反転されてコピー処理される。
By the pixel copy processing described below, the reference pixel data of the pixel blocks 501 and 503 at the left end portion of the image is subjected to copy processing by inverting the R and G effective pixel data of the
For the reference pixel data of the pixel blocks 508 and 510 at the right end of the image, the B and G effective pixel data of the
第3ライン目、第4ライン目の画像の左端部の画素ブロック531及び533の参照画素データには、画素ブロック534の2画素分のG色の有効画素データがコピー処理される。画素ブロック532の参照画素データには、画素ブロック535のR色とB色の有効画素データが上下反転されてコピー処理される。
第3ライン目、第4ライン目の画像の右端部の画素ブロック538及び540の参照画素データには、画素ブロック538の2画素分のG色の有効画素データがコピー処理される。画素ブロック539の参照画素データには、画素ブロック536のB色とR色の有効画素データが上下反転されてコピー処理される。
For the reference pixel data of the pixel blocks 531 and 533 at the left end of the images of the third line and the fourth line, G-color effective pixel data for two pixels of the
For the reference pixel data of the pixel blocks 538 and 540 at the right end of the images of the third line and the fourth line, the G effective pixel data for two pixels of the
第5ライン目、第6ライン目の画像の左端部の画素ブロック551及び553の参照画素データには、画素ブロック554のR色とG色の有効画素データが上下反転されてコピー処理される。画素ブロック552の参照画素データには、画素ブロック554のR色とG色の有効画素データが上下反転されてコピー処理される。
第5ライン目、第6ライン目の画像の右端部の画素ブロック558及び560の参照画素データには、画素ブロック556のG色とR色の有効画素データが上下反転されてコピー処理される。画素ブロック559の参照画素データには、画素ブロック556のG色とR色の有効画素データが上下反転されてコピー処理される。
The reference pixel data of the pixel blocks 551 and 553 at the left end of the images of the fifth line and the sixth line are subjected to copy processing by inverting the R and G effective pixel data of the
For the reference pixel data of the pixel blocks 558 and 560 at the right end of the images of the fifth and sixth lines, the G and R effective pixel data of the
図6は、図3に示す画素コピー処理部203内の各信号の処理内容の概要の一例を示すタイミングチャートである。
以下、図6のタイミングチャートを参照しながら、図5に示す4ライン分(第1〜4ライン目)の左端部及び右端部に、水平方向3画素分の参照画素データをコピーする(画素コピー処理を実施する)際の動作の一例を説明する。
FIG. 6 is a timing chart showing an example of an outline of processing contents of each signal in the pixel
Hereinafter, with reference to the timing chart of FIG. 6, reference pixel data for three pixels in the horizontal direction is copied to the left end and the right end of four lines (first to fourth lines) shown in FIG. An example of the operation when the processing is performed) will be described.
図6の期間Aにおいて、DATA_IN信号(Sig_303)として有効画素データが入力されるより以前に、CPU107(システム制御部)は、レジスタ部334の各レジスタに対して以下の設定値を書き込む。
本実施形態では、画像データのサイズが1280×960ピクセルであるものとする。したがって、「H_PIXレジスタ=1280、V_PIXレジスタ=960」を設定する。
画像の左端部及び右端部に水平方向3画素分の参照画素データをコピーする(画素コピー処理を実施する)ので、「HL_REF_PIXレジスタ=3、HR_REF_PIXレジスタ=3」を設定する。
In the period A in FIG. 6, before valid pixel data is input as the DATA_IN signal (Sig_ 303), the CPU 107 (system control unit) writes the following setting values to each register of the
In the present embodiment, it is assumed that the size of the image data is 1280 × 960 pixels. Therefore, “H_PIX register = 1280, V_PIX register = 960” is set.
Since the reference pixel data for three pixels in the horizontal direction are copied to the left and right end portions of the image (perform pixel copy processing), “HL_REF_PIX register = 3, HR_REF_PIX register = 3” is set.
CIDレジスタには、図10に示すカラーフィルタ配列の組み合わせに合わせて、図4(a)に示すカラーIDの値を設定する。
図5に示す参照画素データの始点画素位置は、第1ライン目の左端のG色の画素データの位置(画素ブロック501のG色の画素の位置)となる。CIDレジスタで、この位置に対応するカラーIDのCIDアドレス値は、図4(b)の画素位置401(CIDX=0、CIDY=0)となる。したがって、「L_REF_CIDXレジスタ=0、L_REF_CIDYレジスタ=0」の設定を行う。
In the CID register, the value of the color ID shown in FIG. 4A is set in accordance with the combination of the color filter arrays shown in FIG.
The starting point pixel position of the reference pixel data shown in FIG. 5 is the position of the G pixel data at the left end of the first line (the position of the G pixel in the pixel block 501). In the CID register, the CID address value of the color ID corresponding to this position is the pixel position 401 (CIDX = 0, CIDY = 0) in FIG. 4B. Therefore, “L_REF_CIDX register = 0, L_REF_CIDY register = 0” is set.
図5に示す有効画素データの始点画素位置は、第1ライン目の4番目のG色の画素データの位置(画素ブロック504のG色の画素の位置)となる。CIDレジスタで、この位置に対応するカラーIDのCIDアドレス値は、図4(b)の画素位置402(CIDX=3、CIDY=0)となる。したがって、「L_VAL_CIDXレジスタ=3、L_VAL_CIDYレジスタ=0」の設定を行う。
図5に示す参照画素データの始点画素位置は、第1ライン目の右端のG色の画素データの位置(画素ブロック508のG色の画素の位置)となる。CIDレジスタで、この位置に対応するカラーIDのCIDアドレス値は、図4(c)の画素位置408(CIDX=3、CIDY=0)となる。したがって、「R_REF_CIDXレジスタ=3、R_REF_CIDYレジスタ=0」の設定を行う。
The start pixel position of the effective pixel data shown in FIG. 5 is the position of the fourth G pixel data on the first line (the position of the G pixel in the pixel block 504). In the CID register, the CID address value of the color ID corresponding to this position is the pixel position 402 (CIDX = 3, CIDY = 0) in FIG. 4B. Therefore, “L_VAL_CIDX register = 3, L_VAL_CIDY register = 0” is set.
The starting point pixel position of the reference pixel data shown in FIG. 5 is the position of the G pixel data at the right end of the first line (the position of the G pixel in the pixel block 508). In the CID register, the CID address value of the color ID corresponding to this position is the pixel position 408 (CIDX = 3, CIDY = 0) in FIG. Therefore, “R_REF_CIDX register = 3, R_REF_CIDY register = 0” is set.
図5に示す有効画素データの終点画素位置は、第1ライン目の右端から4番目のG色の画素データの位置(画素ブロック507のG色の画素の位置)となる。CIDレジスタで、この位置に対応するカラーIDのCIDアドレス値は、図4(c)の画素位置412(CIDX=2、CIDY=0)となる。したがって、「R_VAL_CIDXレジスタ=2、R_VAL_CIDYレジスタ=0」の設定を行う。
図10に示す本実施形態の撮像素子102のカラーフィルタ配列は、上端の2ラインは、上下にG色及びR色の組み合わせと、B色及びG色の組み合わせとで構成される。中央の2ラインは、上下にG色及びG色の組み合わせとB色及びR色の組み合わせとで構成される。下端の2ラインは、上下にB色及びG色の組み合わせとG色及びR色の組み合わせとで構成される。
The end pixel position of the effective pixel data shown in FIG. 5 is the position of the fourth G pixel data from the right end of the first line (the position of the G pixel in the pixel block 507). In the CID register, the CID address value of the color ID corresponding to this position is the pixel position 412 (CIDX = 2, CIDY = 0) in FIG. Therefore, “R_VAL_CIDX register = 2, R_VAL_CIDY register = 0” is set.
In the color filter array of the
よって、画素コピー処理される参照画素データを、2ラインに跨る上下の色の組み合わせからなる画素ブロック(サイズは水平画素数1、垂直画素数2)に設定すれば、当該2ライン内に、上下の色の組み合わせが同じコピー元の有効画素データが必ず存在する。以上より、カラーID探索部341で、参照画素データの探索用として使用するカラーIDの組み合わせ画素ブロック数は、水平画素数「1」、垂直画素数「2」となる。したがって、「BLK_Xレジスタ=1、BLK_Yレジスタ=2」を設定する。
また、図10に示すカラーフィルタの配列は6画素周期である。画素コピー処理のコピー元となる有効画素データは、1周期内に必ず存在する。したがって、「HL_VAL_PIXレジスタ=6、HR_VAL_PIXレジスタ=6」に設定する。前述したように、HL_VAL_PIXレジスタ、HR_VAL_PIXレジスタの値は、画素コピー処理のコピー元となる有効画素データの左端部・右端部の画素数である。
Therefore, if the reference pixel data to be subjected to pixel copy processing is set to a pixel block (size is 1 horizontal pixel and 2 vertical pixels) that is a combination of upper and lower colors across two lines, Effective pixel data of the copy source having the same color combination always exists. As described above, the number of combined pixel blocks of the color ID used for searching the reference pixel data in the color
The color filter array shown in FIG. 10 has a period of 6 pixels. Effective pixel data as a copy source of the pixel copy process always exists within one cycle. Therefore, “HL_VAL_PIX register = 6, HR_VAL_PIX register = 6” is set. As described above, the values of the HL_VAL_PIX register and the HR_VAL_PIX register are the numbers of pixels at the left end and the right end of the effective pixel data that is the copy source of the pixel copy process.
図6において、DATA_IN信号(Sig_303)の画素データ1Lは、第1ライン目の画素データの左端部の有効画素データ6画素分を示す。当該6画素分の画素データが、画像の左端部の画素コピー処理の際に、コピー元となる有効画素データとなる。以下、図6の表記で、画素データ2L、3L、・・・は、2ライン目、3ライン目・・・の左端部のコピー元となる有効画素データ6画素分を示す。
同様に図6において、DATA_IN信号(Sig_303)の画素データ1Rは、第1ライン目の画素データの右端部の有効画素データ6画素分を示す。当該6画素分の画素データが、画像の右端部の画素コピー処理の際に、コピー元となる有効画素データとなる。以下、図6の表記で、画素データ2R、3R・・・は、2ライン目、3ライン目・・・の右端部のコピー元となる有効画素データ6画素分を示す。
In FIG. 6, pixel data 1L of the DATA_IN signal (Sig_303) indicates 6 pixels of effective pixel data at the left end of the pixel data on the first line. The pixel data for the six pixels becomes effective pixel data to be a copy source in the pixel copy process at the left end portion of the image. Hereinafter, in the notation of FIG. 6, pixel data 2L, 3L,... Indicates 6 pixels of effective pixel data that is a copy source of the left end of the second line, the third line,.
Similarly, in FIG. 6, pixel data 1R of the DATA_IN signal (Sig_303) indicates 6 pixels of effective pixel data at the right end of the pixel data on the first line. The pixel data for the six pixels becomes effective pixel data that is a copy source in the pixel copy process at the right end of the image. Hereinafter, in the notation of FIG. 6, pixel data 2R, 3R,... Indicate effective pixel data of 6 pixels that are the copy source at the right end of the second line, the third line,.
図6の表記で、DATA_IN信号(Sig_303)の画素データ1Mは、第1ライン目の画素データのうち、画素データ1L及び1R以外の画素データであり、画素コピー処理の際には使用されない。以下、図6の表記で、画素データ2M、3M・・・は、2ライン目、3ライン目・・・の画素データのうち、画素データ2L及び2R、3L及び3R・・・以外の画素データを示す。 In the notation of FIG. 6, the pixel data 1M of the DATA_IN signal (Sig_303) is pixel data other than the pixel data 1L and 1R among the pixel data on the first line, and is not used in the pixel copy process. Hereinafter, in the notation of FIG. 6, pixel data 2M, 3M... Is pixel data other than pixel data 2L and 2R, 3L and 3R. Indicates.
一方、図6において、DATA_OUT信号(Sig_306)の画素データ1L'は、第1ライン目の左端部の画素コピー処理された参照画素データ3画素分を示す。以下、図6の表記で、画素データ2L'、3L'・・・は2ライン目、3ライン目・・・の左端部の画素コピー処理された参照画素データを示す。
同様に、図6において、DATA_OUT信号(Sig_306)の画素データ1R'は、第1ライン目の右端部の画素コピー処理された参照画素データ3画素分を示す。以下、図6の表記で、画素データ2R'、3R'・・・は2ライン目、3ライン目・・・の右端部の画素コピー処理された参照画素データを示す。
On the other hand, in FIG. 6, pixel data 1L ′ of the DATA_OUT signal (Sig_306) indicates three pixels of reference pixel data subjected to pixel copy processing at the left end of the first line. Hereinafter, in the notation of FIG. 6, pixel data 2L ′, 3L ′,... Indicate reference pixel data subjected to pixel copy processing at the left end of the second line, the third line,.
Similarly, in FIG. 6, pixel data 1R ′ of the DATA_OUT signal (Sig_306) indicates three pixels of reference pixel data subjected to pixel copy processing at the right end of the first line. Hereinafter, in the notation of FIG. 6, pixel data 2R ′, 3R ′,... Indicate reference pixel data subjected to pixel copy processing at the right end of the second line, the third line,.
図6に示す期間A中に、前段のゲイン補正処理部202からDATA_IN信号(Sig_303)として1ライン目の有効画素データ(画素データ1L、1M、1R)と2ライン目の左端部の6画素分の有効画素データ(画素データ2L)が入力される。
画素コピー処理制御部330は、レジスタ部334のレジスタの値(「H_PIXレジスタ=1280」と、「HL_VAL_PIXレジスタ=6、HR_VAL_PIXレジスタ=6」)とを参照し、以下の処理を実施する。前述したように、H_PIXレジスタは、画像データの水平画素数である。HL_VAL_PIXレジスタは、コピー元となる有効画素データの左端部の画素数であり、HR_VAL_PIXレジスタは、コピー元となる有効画素データの右端部の画素数である。
During the period A shown in FIG. 6, the effective pixel data (pixel data 1L, 1M, 1R) for the first line and the six pixels at the left end of the second line are sent as the DATA_IN signal (Sig_303) from the gain
The pixel copy
画素コピー処理制御部330は、これらのレジスタの値を元に、カウンタ回路(不図示)により制御タイミングを作成し、COPYBUF_INEN信号(Sig_340)を生成する。COPYBUF_INEN信号(Sig_340)は、画素データ1L、1R、2L、2R、3L、3RがDATA_IN信号(Sig_303)として入力される際にHighレベルとなる。COPYBUF_INEN信号(Sig_340)がHighレベルの期間中に、画素データコピー処理部332は、バッファメモリ部340に画素データ1L、1R、2L、2R・・を順番に格納する。
The pixel copy
図7(a)〜(d)は、各期間において、バッファメモリ部340のバッファメモリM_1L、M_1R、M_2L、M_2R及びバッファメモリM_REF_L、M_REF_Rに格納される画素データの内容の一例を模式的に示す図である。具体的に図7(a)、(b)、(c)、(d)は、各々、図6に示す期間A、C、F、Iが完了したときの状態を示す。
尚、図7に表記されるアドレス値ML_CIDX、MR_CIDXは、各々、バッファメモリM_1L(351)及びM_2L(353)、M_1R(352)及びM_2R(354)のアドレス値を示す。これらのアドレス値は、CIDレジスタのCIDアドレス値CIDXに対応する。
7A to 7D schematically illustrate an example of the contents of pixel data stored in the buffer memories M_1L, M_1R, M_2L, and M_2R and the buffer memories M_REF_L and M_REF_R of the
The address values ML_CIDX and MR_CIDX shown in FIG. 7 indicate the address values of the buffer memories M_1L (351) and M_2L (353), M_1R (352) and M_2R (354), respectively. These address values correspond to the CID address value CIDX of the CID register.
「ML_CIDX=0」の位置は「L_VAL_CIDXレジスタ」で指定されるCIDアドレス値となり、「L_VAL_CIDXレジスタ=3」よりCIDレジスタの「CIDX=3」の位置に対応する。尚、前述したように、L_VAL_CIDXレジスタは、第1ライン目の左端部における有効画素データの始点画素位置を示す。以降順番に「ML_CIDX=1,2,3,4,5」はCIDレジスタの「CIDX=4,5,0,1,2」に対応する。 The position of “ML_CIDX = 0” is the CID address value specified by “L_VAL_CIDX register”, and corresponds to the position of “CIDX = 3” of the CID register from “L_VAL_CIDX register = 3”. As described above, the L_VAL_CIDX register indicates the start pixel position of the effective pixel data at the left end of the first line. Thereafter, “ML_CIDX = 1, 2, 3, 4, 5” sequentially corresponds to “CIDX = 4, 5, 0, 1, 2” of the CID register.
一方、「MR_CIDX=5」の位置は「R_VAL_CIDXレジスタ」で指定されるCIDアドレス値となり、「R_VAL_CIDXレジスタ=2」よりCIDレジスタの「CIDX=2」の位置に対応する。尚、前述したように、R_VAL_CIDXレジスタは、第1ライン目の右端部における有効画素データの始点画素位置を示す。以降順番に「MR_CIDX=4,3,2,1,0」はCIDレジスタの「CIDX=1,0,5,4,3」に対応する。 On the other hand, the position of “MR_CIDX = 5” is the CID address value specified by “R_VAL_CIDX register”, and corresponds to the position of “CIDX = 2” of the CID register from “R_VAL_CIDX register = 2”. As described above, the R_VAL_CIDX register indicates the start pixel position of the effective pixel data at the right end of the first line. Thereafter, “MR_CIDX = 4, 3, 2, 1, 0” sequentially corresponds to “CIDX = 1, 0, 5, 4, 3” of the CID register.
カラーID探索部341は、参照画素データのコピー元となる有効画素データの位置をCIDレジスタにより判定し、その結果に基づいて、ML_CIDX及びMR_CIDXで示される位置に格納されている有効画素データを読み出す。
期間Aでは、図7(a)に示すように、バッファメモリM_1L(351)、M_1R(352)、M2_L(353)に、有効画素データ1L、1R、2Lがそれぞれ格納される。また、ラインバッファメモリ部331に、1ライン目の有効画素データ(1L、1M、1R)と有効画素データ2Lとが格納される。
The color
In the period A, as shown in FIG. 7A, the effective pixel data 1L, 1R, and 2L are stored in the buffer memories M_1L (351), M_1R (352), and M2_L (353), respectively. The line buffer memory unit 331 stores effective pixel data (1L, 1M, 1R) and effective pixel data 2L for the first line.
次に、期間Bでは、画素コピー処理制御部330は、前段のゲイン補正処理部202に対して、HighレベルのSTOP_OUT信号(Sig_301)を出力し、DATA_IN信号(Sig_303)への有効画素データの入力を停止させる。
次に、画素コピー処理制御部330は、HighレベルのCOPY_START信号(Sig_341)を画素データコピー処理部332に出力する。これにより、画素データコピー処理部332は画素コピー処理を開始する。期間Bでは、第1ライン目の左端部の参照画素データの画素コピー処理が実施される。
Next, in the period B, the pixel copy
Next, the pixel copy
以下、図4及び図7を参照しながら、画素コピー処理の内容の一例について説明する。
期間Bの第1の処理として、1ライン目の左端1画素目の参照画素データ(図5の画素ブロック501のG色)の画素コピー処理が行われる。
ここでは、「L_REF_CIDXレジスタ=0、L_REF_CIDYレジスタ=0」の設定になっている。したがって、画素コピー処理される画素ブロック501のカラーIDの組み合わせは、図4(b)の画素ブロック411の組み合わせ(1,0)に対応する。尚、前述したように、L_REF_CIDXレジスタ及びL_REF_CIDYレジスタは、第1ライン目の左端部における参照画素データの始点画素位置を示すものである。
Hereinafter, an example of the content of the pixel copy process will be described with reference to FIGS. 4 and 7.
As the first processing in the period B, pixel copy processing of the reference pixel data (G color of the
Here, “L_REF_CIDX register = 0, L_REF_CIDY register = 0” is set. Therefore, the combination of color IDs of the
ここでは、「L_VAL_CIDXレジスタ=3、L_VAL_CIDYレジスタ=0」の設定になっている。したがって、画素コピー処理のコピー元となる有効画素データの画素ブロック504のカラーIDの組み合わせは、図4(b)の画素ブロック414の組み合わせ(1,2)に対応する。尚、前述したように、L_VAL_CIDXレジスタ、L_VAL_CIDYレジスタは、第1ライン目の左端部における有効画素データの始点画素位置を示すものである。
In this example, “L_VAL_CIDX register = 3, L_VAL_CIDY register = 0” is set. Therefore, the combination of the color IDs of the
また、画素ブロック414のCIDアドレス値は「CIDX=3」であり、このCIDアドレス値は、図7(a)のバッファメモリのアドレス値「ML_CIDX=0」の位置が対応する。従って、画素ブロック414に対応する有効画素データは、バッファメモリM_1L及びM_2Lに格納されている画素ブロック701の有効画素データとなる。
カラーID探索部341は、図4(b)に示すCIDレジスタの画素ブロック414からカラーIDの値の読み出しを開始し、図中右方向に各画素ブロックのカラーIDの値を最大6アドレス分読み出す。尚、「CIDX=5」の位置まで移動した場合は、次に「CIDX=0」の位置に移動する。
The CID address value of the
The color
比較回路(不図示)にて、読み出されたカラーIDの値と、参照画素データの画素ブロック411のカラーIDの組み合わせ(1,0)とを比較し、同じカラーIDの組み合わせを有する画素ブロックを探索する。
画素ブロック414のカラーIDの組み合せは(1,2)であるから、その右隣の画素ブロック415に移行する。
画素ブロック415のカラーIDの組み合わせは(0,1)であるから、比較回路で、参照画素データの画素ブロック411のカラーIDの組み合わせ(1,0)と等しいと判定される。
A comparison circuit (not shown) compares the read color ID value with the color ID combination (1, 0) of the
Since the combination of the color IDs of the
Since the combination of the color IDs of the
また、画素ブロック415のCIDアドレス値は「CIDX=4」であり、図7(a)のバッファメモリのアドレス値「ML_CIDX=1」の位置が対応する。従って、画素ブロック415に対応する有効画素データは、ラインバッファメモリM_1L及びM_2Lに格納されている画素ブロック702の有効画素データとなる。
次に、このラインバッファメモリM_2Lの画素ブロック702のG色が1ライン目の左端1画素目の参照画素データ(図5の画素ブロック501のG色)として、COPY_DATA_OUT信号(Sig_321)に出力される。尚、期間B中は、セレクタ部333により、COPY_DATA_OUT信号(Sig_321)がDATA_OUT信号(Sig_306)と接続される。
The CID address value of the
Next, the G color of the pixel block 702 of the line buffer memory M_2L is output to the COPY_DATA_OUT signal (Sig_321) as reference pixel data (G color of the
同時に、画素データコピー処理部332は、画素コピー処理制御部330に、HighレベルのCOPY_VALID_OUT信号(Sig_350)を出力する。これにより、画素コピー処理制御部330は、HighレベルのVALID_OUT信号(Sig_305)を出力する。HighレベルのCOPY_DATA_OUT信号(Sig_350)の出力完了後に、LowレベルのCOPY_DATA_OUT信号(Sig_350)が出力される。
一方、ラインバッファメモリM_1L及びM_2Lの画素ブロック702のR色は、2ライン目の左端1画素目の参照画素データになるため、バッファメモリM_REF_L(355)に格納される。
At the same time, the pixel data
On the other hand, the R color of the pixel block 702 of the line buffer memories M_1L and M_2L is stored in the buffer memory M_REF_L (355) because it becomes the reference pixel data of the first pixel at the left end of the second line.
期間Bの第2の処理として、1ライン目の左端2画素目の参照画素データ(図5の画素ブロック502のB色)の画素コピー処理が行われる。
期間Bの第1の処理では、「L_REF_CIDXレジスタ=0、L_REF_CIDYレジスタ=0」の設定により、画素コピー処理される画素ブロック501のカラーIDの組み合わせは、画素ブロック411の組み合わせに対応すると判定される。そこで、画素コピー処理される参照画素データの画素ブロック502のカラーIDの組み合わせは、図4(b)において、画素ブロック411の右隣りの画素ブロック412の組み合わせ(2,1)に移動する。
As the second processing in the period B, pixel copy processing of reference pixel data (B color of the pixel block 502 in FIG. 5) of the second pixel at the left end of the first line is performed.
In the first process in the period B, it is determined that the combination of the color IDs of the
ここでは、「L_VAL_CIDXレジスタ=3、L_VAL_CIDYレジスタ=0」の設定となっている。したがって、期間Bの第1の処理と同様に、画素コピー処理のコピー元となる有効画素データの画素ブロック504のカラーIDの組み合わせは、図4(b)の画素ブロック414の組み合わせ(1,2)に対応する。カラーID探索部341は、図4(b)に示すCIDレジスタの画素ブロック414からカラーIDの値の読み出しを開始し、図中右方向に各画素ブロックのカラーIDの値を最大6アドレス分読み出す。
比較回路(不図示)にて、読み出されたカラーIDの値と、参照画素データの画素ブロック412のカラーIDの組み合わせ(2,1)とを比較し、同じカラーIDの組み合わせを有する画素ブロックを探索する。
画素ブロック414のカラーIDの組み合わせは(1,2)であるから、比較回路で、参照画素データの画素ブロック412のカラーIDの組み合わせ(2,1)と等しいと判定される。
In this example, “L_VAL_CIDX register = 3, L_VAL_CIDY register = 0” is set. Therefore, as in the first process in the period B, the combination of the color IDs of the pixel blocks 504 of the effective pixel data that is the copy source of the pixel copy process is the combination (1, 2) of the
A comparison circuit (not shown) compares the read color ID value with the color ID combination (2, 1) of the
Since the combination of the color IDs of the
前述したように、画素ブロック414は、図7(a)に示すラインバッファM_1L及びM_2Lに格納されている画素データでは画素ブロック701に対応する。
次に、このラインバッファメモリM_2Lの画素ブロック701のB色が1ライン目の左端の2画素目の参照画素データ(図5の画素ブロック502のB色)として、COPY_DATA_OUT信号(Sig_321)に出力される。
As described above, the
Next, the B color of the pixel block 701 in the line buffer memory M_2L is output to the COPY_DATA_OUT signal (Sig_321) as the reference pixel data of the second pixel at the left end of the first line (B color of the pixel block 502 in FIG. 5). The
同時に、画素データコピー処理部332は、画素コピー処理制御部330に、HighレベルのCOPY_VALID_OUT信号(Sig_350)を出力する。これにより、画素コピー処理制御部330は、HighレベルのVALID_OUT信号(Sig_305)を出力する。HighレベルのCOPY_DATA_OUT信号(Sig_350)の出力完了後に、LowレベルCOPY_DATA_OUT信号(Sig_350)
が出力される。
一方、ラインバッファメモリM_1L及びM_2Lの画素ブロック701のB色は、2ライン目の左端2画素目の参照画素データになるため、バッファメモリM_REF_L(355)に格納される。
At the same time, the pixel data
Is output.
On the other hand, the B color of the pixel block 701 of the line buffer memories M_1L and M_2L becomes the reference pixel data of the second pixel at the left end of the second line and is stored in the buffer memory M_REF_L (355).
期間Bの第3の処理として、1ライン目の左端3画素目の参照画素データ(図5の画素ブロック503のG色)の画素コピー処理が行われる。
前述したように、期間Bの第2の処理では、画素コピー処理される参照画素データの画素ブロック502のカラーIDの組み合わせは、画素ブロック412の組み合わせ(2,1)に対応する。そこで、画素コピー処理される参照画素データの画素ブロック503のカラーIDの組み合わせは、図4(b)において、画素ブロック412の右隣りの画素ブロック413の組み合わせ(1,0)に移動する。
As the third process in the period B, the pixel copy process of the reference pixel data (G color of the
As described above, in the second process in the period B, the combination of the color IDs of the pixel block 502 of the reference pixel data subjected to the pixel copy process corresponds to the combination (2, 1) of the
ここでは、「L_VAL_CIDXレジスタ=3、L_VAL_CIDYレジスタ=0」の設定となっている。したがって、期間Bの第1の処理と同様に、画素コピー処理のコピー元となる有効画素データの画素ブロック504のカラーIDの組み合わせは、図4(b)の画素ブロック414の組み合わせ(1,2)に対応する。カラーID探索部341は、図4(b)に示すCIDレジスタの画素ブロック414からカラーIDの値の読み出しを開始し、図中右方向に各画素ブロックのカラーIDの値を最大6アドレス分読み出す。
比較回路(不図示)にて、読み出されたカラーIDの値と、参照画素データの画素ブロック413のカラーIDの組み合わせ(1,0)とを比較し、同じカラーIDの組み合わせを有する画素ブロックを探索する。そして、期間Bの第1の処理と同様に、画素ブロック415のカラーIDの組み合わせは(0,1)であるから、比較回路で、参照画素データの画素ブロック413のカラーIDの組み合わせ(1,0)と等しいと判定される。
In this example, “L_VAL_CIDX register = 3, L_VAL_CIDY register = 0” is set. Therefore, as in the first process in the period B, the combination of the color IDs of the pixel blocks 504 of the effective pixel data that is the copy source of the pixel copy process is the combination (1, 2) of the
A comparison circuit (not shown) compares the read color ID value with the color ID combination (1,0) of the
また、画素ブロック415のCIDアドレス値は「CIDX=4」であり、図7(a)のバッファメモリのアドレス値「ML_CIDX=1」の位置が対応する。従って、画素ブロック415に対応する有効画素データは、ラインバッファメモリM_1L及びM_2Lに格納されている画素ブロック702の有効画素データに対応する。
次に、このラインバッファメモリM_2Lの画素ブロック702のG色が1ライン目の左端3画素目の参照画素データ(図5の画素ブロック503のG色)として、COPY_DATA_OUT信号(Sig_321)に出力される。尚、期間B中は、セレクタ部333により、COPY_DATA_OUT信号(Sig_321)がDATA_OUT信号(Sig_306)と接続される。
The CID address value of the
Next, the G color of the pixel block 702 of the line buffer memory M_2L is output to the COPY_DATA_OUT signal (Sig_321) as reference pixel data (G color of the
同時に、画素データコピー処理部332は、画素コピー処理制御部330に、HighレベルのCOPY_VALID_OUT信号(Sig_350)を出力する。これにより、画素コピー処理制御部330は、HighレベルのVALID_OUT信号(Sig_350)を出力する。HighレベルのCOPY_DATA_OUT信号(Sig_350)の出力完了後に、LowレベルのCOPY_DATA_OUT信号(Sig_350)が出力される。
一方、ラインバッファメモリM_1L及びM_2Lの画素ブロック702のR色は、2ライン目の左端3画素目の参照画素データになるため、バッファメモリM_REF_L(355)に格納される。
At the same time, the pixel data
On the other hand, the R color of the pixel block 702 of the line buffer memories M_1L and M_2L is stored in the buffer memory M_REF_L (355) because it becomes the reference pixel data of the third pixel on the left end of the second line.
以上で、「HL_REF_PIXレジスタ=3」で設定された左端3画素分の参照画素データの画素コピー処理が完了する。よって、画素データコピー処理部332は、HighレベルのCOPY_END信号(Sig_351)を1パルス分、画素コピー処理制御部330に出力する。
This completes the pixel copy processing of the reference pixel data for the leftmost three pixels set in “HL_REF_PIX register = 3”. Therefore, the pixel data
次に、期間Cにおいて、画素コピー処理制御部330は、ラインバッファメモリ部331に、HighレベルのLINEBUF_OUTEN信号(Sig_311)を出力する。これにより、ラインバッファメモリ部331から、画素データ1L、1M、1Rが読み出され、BUF_DATA_OUT信号(Sig_320)として出力される。尚、期間C中は、セレクタ部333により、BUF_DATA_OUT信号(Sig_320)がDATA_OUT(Sig_306)信号と接続される。
同じく期間C中は、HighレベルのVALID_IN信号(Sig_302)がラインバッファメモリ部331に入力され、2ライン目の画素データ2M、2R及び3ライン目の画素データ3Lがラインバッファメモリ部331に格納される。
Next, in the period C, the pixel copy
Similarly, during the period C, the High level VALID_IN signal (Sig_302) is input to the line buffer memory unit 331, and the pixel data 2M of the second line, 2R, and the pixel data 3L of the third line are stored in the line buffer memory unit 331. The
図7(b)は、期間Cが完了した時のバッファメモリ部340の4つのラインバッファM_1L(351)、M_1R(352)、M_2L(353)、M_2R(354)に格納される画素データの一例を模式的に示す図である。ラインバッファメモリM_1L(351)、M_1R(352)、M_2L(353)、M_2R(354)には、画素データ3L、1R、2L、2Rがそれぞれ格納される。バッファメモリM_REF_L(355)には、2ライン目の左端部の参照画素データ2L'が格納される。
FIG. 7B illustrates an example of pixel data stored in the four line buffers M_1L (351), M_1R (352), M_2L (353), and M_2R (354) of the
期間Dの第1の処理として、1ライン目の右端1画素目の参照画素データ(図5の画素ブロック508のG色)の画素コピー処理が行われる。
「R_REF_CIDXレジスタ=3、R_REF_CIDYレジスタ=0」の設定により、画素コピー処理される画素ブロック508のカラーIDの組み合わせは、図4(c)の画素ブロック418の組み合わせ(1,2)に対応する。また、ここでは、「R_VAL_CIDXレジスタ=2、R_VAL_CIDYレジスタ=0」の設定になっている。したがって、画素コピー処理のコピー元となる有効画素データの画素ブロック507のカラーIDの組み合わせは、図4(c)の画素ブロック417の組み合わせ(1,0)に対応する。
As the first processing in the period D, pixel copy processing of reference pixel data (G color of the
With the setting of “R_REF_CIDX register = 3, R_REF_CIDY register = 0”, the combination of color IDs of the
また、画素ブロック417のCIDアドレス値は「CIDX=2」であり、このCIDアドレス値は、図7(b)のバッファメモリのアドレス値「MR_CIDX=5」の位置が対応する。従って、画素ブロック417に対応する有効画素データは、バッファメモリM_1R及びM_2Rに格納されている画素ブロック704の有効画素データとなる。
カラーID探索部341は、図4(c)のCIDレジスタの画素ブロック417からカラーIDの値の読み出しを開始し、図中左方向に各画素ブロックのカラーIDの値を最大6アドレス分読み出す。尚、「CIDX=0」の位置まで移動した場合は、次に「CIDX=5」の位置に移動する。
The CID address value of the
The color
比較回路(不図示)にて、読み出されたカラーIDの値と、参照画素データの画素ブロック418のカラーIDの組み合わせ(1,2)とを比較し、同じカラーIDの組み合わせを有する画素ブロックを探索する。
画素ブロック417のカラーIDの組み合わせは(1,0)であるから、その左隣の画素ブロック416に移行する。
画素ブロック416のカラーIDの組み合わせは(2,1)であるから、比較回路で、参照画素データの画素ブロック418のカラーIDの組み合わせ(1,2)と等しいと判定される。
In a comparison circuit (not shown), the read color ID value is compared with the color ID combination (1, 2) of the
Since the combination of the color IDs of the
Since the combination of color IDs of the
また、画素ブロック416のCIDアドレスは「CIDX=1」であり、図7(b)のバッファメモリのアドレス値「ML_CIDX=4」の位置が対応する。従って、画素ブロック416に対応する有効画素データは、バッファメモリM_1R及びM_2Rに格納されている画素ブロック703の有効画素データに対応する。
次に、このラインバッファメモリM_2Rの画素ブロック703のG色が1ライン目の右端1画素目の参照画素データ(図5の画素ブロック508のG色)として、COPY_DATA_OUT信号(Sig_321)に出力される。尚、期間C中は、セレクタ部333により、COPY_DATA_OUT信号(Sig_321)がDATA_OUT信号(Sig_306)と接続される。
The CID address of the
Next, the G color of the pixel block 703 of the line buffer memory M_2R is output to the COPY_DATA_OUT signal (Sig_321) as reference pixel data (G color of the
同時に、画素データコピー処理部332は、画素コピー処理制御部330に、HighレベルのCOPY_VALID_OUT信号(Sig_350)を出力する。これにより、画素コピー処理制御部330は、HighレベルのVALID_OUT信号(Sig_305)を出力する。HighレベルのCOPY_DATA_OUT信号(Sig_350)の出力完了後に、LowレベルのCOPY_DATA_OUT信号(Sig_350)が出力される。
一方、ラインバッファメモリM_1R及びM_2Rの画素ブロック703のB色は、2ライン目の左端1画素目の参照画素データになるため、バッファメモリM_REF_R(356)に格納される。
At the same time, the pixel data
On the other hand, the B color of the pixel block 703 of the line buffer memories M_1R and M_2R is stored in the buffer memory M_REF_R (356) because it becomes the reference pixel data of the first pixel at the left end of the second line.
期間Dの第2の処理として、1ライン目の右端2画素目の参照画素データ(図5の画素ブロック509のR色)の画素コピー処理が行われる。
期間Dの第1の処理では、「R_REF_CIDXレジスタ=3、R_REF_CIDYレジスタ=0」の設定により、画素コピー処理される画素ブロック508のカラーIDの組み合わせは、画素ブロック418の組み合わせに対応すると判定される。そこで、画素コピー処理される参照画素データの画素ブロック509のカラーIDの組み合わせは、図4(c)において、画素ブロック418の右隣りの画素ブロック419の組合せ(0,1)に移動する。
As the second processing in the period D, pixel copy processing of reference pixel data (R color of the
In the first processing in the period D, it is determined that the combination of the color IDs of the
ここでは、「R_VAL_CIDXレジスタ=2、R_VAL_CIDYレジスタ=0」の設定になっている。したがって、期間Dの第1の処理と同様に、画素コピー処理のコピー元となる有効画素データの画素ブロック507のカラーIDの組み合わせは、図4(c)の画素ブロック417の組み合わせ(1,0)に対応する。カラーID探索部341は、図4(c)に示すCIDレジスタの画素ブロック417からカラーID値の読み出しを開始し、図中左方向に各画素ブロックのカラーID値を最大6アドレス分読み出す。
比較回路(不図示)にて、読み出されたカラーIDの値と、参照画素データの画素ブロック417のカラーIDの組み合わせ(0,1)とを比較し、同じカラーIDの組み合わせを有する画素ブロックを探索する。
画素ブロック417のカラーIDの組み合わせは(1,0)であるから、比較回路で、参照画素データの画素ブロック417のカラーIDの組み合わせ(0,1)と等しいと判定される。
Here, “R_VAL_CIDX register = 2, R_VAL_CIDY register = 0” is set. Therefore, as in the first process in the period D, the combination of the color IDs of the pixel blocks 507 of the effective pixel data that is the copy source of the pixel copy process is the combination (1,0) of the
In a comparison circuit (not shown), the read color ID value is compared with the color ID combination (0, 1) of the
Since the combination of the color IDs of the
尚、画素ブロック417は、図7(b)のラインバッファM_1R及びM_2Rに格納されている画素データでは画素ブロック704に対応する。
次に、このラインバッファメモリM_2Rの画素ブロック704のR色が1ライン目の右端2画素目の参照画素データ(図5の画素ブロック509のR色)として、COPY_DATA_OUT信号(Sig_321)に出力される。
The
Next, the R color of the pixel block 704 of the line buffer memory M_2R is output to the COPY_DATA_OUT signal (Sig_321) as reference pixel data (R color of the
同時に、画素データコピー処理部332は、画素コピー処理制御部330に、HighレベルのCOPY_VALID_OUT信号(Sig_350)を出力する。これにより、画素コピー処理制御部330は、HighレベルのVALID_OUT信号(Sig_305)を出力する。HighレベルのCOPY_DATA_OUT信号(Sig_350)の出力完了後に、LowレベルCOPY_DATA_OUT信号(Sig_350)
が出力される。
一方、ラインバッファメモリM_1R及びM2_Rの画素ブロック704のG色は、2ライン目の右端2画素目の参照画素データになるため、バッファメモリM_REF_R(356)に格納される。
At the same time, the pixel data
Is output.
On the other hand, the G color of the pixel block 704 in the line buffer memories M_1R and M2_R is stored in the buffer memory M_REF_R (356) because it becomes the reference pixel data of the second pixel at the right end of the second line.
期間Dの第3の処理として、1ライン目の右端3画素目の参照画素データ(図5の画素ブロック510のG色)の画素コピー処理が行われる。
前述したように、期間Dの第2の処理では、画素コピー処理される参照画素データの画素ブロック509のカラーIDの組み合わせは、画素ブロック419の組み合わせ(0,1)に対応する。そこで、画素コピー処理される参照画素データの画素ブロック510のカラーIDの組み合わせは、図4(c)において、画素ブロック419の右隣りの画素ブロック420の組み合わせ(1,2)に移動する。
As the third process in the period D, the pixel copy process of the reference pixel data (G color of the
As described above, in the second process in the period D, the combination of the color IDs of the
ここでは、「R_VAL_CIDXレジスタ=2、R_VAL_CIDYレジスタ=0」の設定になっている。したがって、期間Dの第1の処理と同様に、画素コピー処理のコピー元となる有効画素データの画素ブロック507のカラーIDの組み合わせは、図4(c)の画素ブロック417の組み合わせ(1,0)に対応する。カラーID探索部341は、図4(c)に示すCIDレジスタの画素ブロック417からカラーIDの値の読み出しを開始し、図中右方向に各画素ブロックのカラーIDの値を最大6アドレス分読み出す。
比較回路(不図示)にて、読み出されたカラーIDの値と、参照画素データの画素ブロック420のカラーIDの組み合わせ(1,2)とを比較し、同じカラーIDの組み合わせを有する画素ブロックを探索する。そして、期間Dの第1の処理と同様に、画素ブロック417のカラーIDの組み合わせは(1,0)であるから、その左隣の画素ブロック416に移行する。画素ブロック416のカラーIDの組み合わせは(2,1)であるから、比較回路で、参照画素データの画素ブロック418のカラーIDの組み合わせ(1,2)と等しいと判定される。
Here, “R_VAL_CIDX register = 2, R_VAL_CIDY register = 0” is set. Therefore, as in the first process in the period D, the combination of the color IDs of the pixel blocks 507 of the effective pixel data that is the copy source of the pixel copy process is the combination (1,0) of the
In a comparison circuit (not shown), the read color ID value is compared with the color ID combination (1, 2) of the
また、画素ブロック416のCIDアドレス値は「CIDX=1」であり、図7(b)のバッファメモリのアドレス値「ML_CIDX=4」の位置が対応する。従って、画素ブロック416に対応する有効画素データは、ラインバッファメモリM_1L及びM_2Lに格納されている画素ブロック703の有効画素データに対応する。
次に、このラインバッファメモリM_2Rの画素ブロック703のG色が1ライン目の右端3画素目の参照画素データ(図5の画素ブロック510のG色)として、COPY_DATA_OUT信号(Sig_321)に出力される。尚、期間D中は、セレクタ部333により、COPY_DATA_OUT信号(Sig_321)がDATA_OUT信号(Sig_306)と接続される。
The CID address value of the
Next, the G color of the pixel block 703 of the line buffer memory M_2R is output to the COPY_DATA_OUT signal (Sig_321) as reference pixel data (G color of the
同時に、画素データコピー処理部332じゃ、画素コピー処理制御部330に、HighレベルのCOPY_VALID_OUT信号(Sig_350)を出力する。これにより、画素コピー処理制御部330は、HighレベルのVALID_OUT信号(Sig_305)を出力する。HighレベルのCOPY_DATA_OUT信号(Sig_350)の出力完了後に、LowレベルのCOPY_DATA_OUT信号(Sig_350)が出力される。
一方、ラインバッファメモリM_1R,M_2Rの画素ブロック703のB色は、2ライン目の右端3画素目の参照画素データになるため、バッファメモリM_REF_R(356)に格納される。
At the same time, the pixel data
On the other hand, the B color of the pixel block 703 of the line buffer memories M_1R and M_2R becomes the reference pixel data of the third pixel at the right end of the second line and is stored in the buffer memory M_REF_R (356).
次に、期間Eにおいて、画素データコピー処理部332は、バッファメモリM_REF_L(355)に格納されている2ライン目の左端部の参照画素データ2L'を、COPY_DATA_OUT信号(Sig_321)に出力する。尚、期間E中は、セレクタ部333により、COPY_DATA_OUT信号(Sig_321)がDATA_OUT信号(Sig_306)と接続される。
Next, in the period E, the pixel data
同時に、画素データコピー処理部332は、画素コピー処理制御部330に、HighレベルのCOPY_VALID_OUT信号(Sig_350)を出力する。これにより、画素コピー処理制御部330は、HighレベルのVALID_OUT信号(Sig_305)を出力する。HighレベルのCOPY_DATA_OUT信号(Sig_350)の出力完了後に、LowレベルのCOPY_DATA_OUT信号(Sig_350)が出力される。
以上で、「HR_REF_PIXレジスタ=3」、「HL_REF_PIXレジスタ=3」で設定された左端3画素分及び右端3画素分の参照画素データの画素コピー処理が完了する。よって、画素データコピー処理部332は、HighレベルのCOPY_END信号(Sig_351)を1パルス分、画素コピー処理制御部330に出力する。
At the same time, the pixel data
This completes the pixel copy processing of the reference pixel data for the leftmost three pixels and the rightmost three pixels set by “HR_REF_PIX register = 3” and “HL_REF_PIX register = 3”. Therefore, the pixel data
続く期間Fにおいて、画素コピー処理制御部330は、ラインバッファメモリ部331に、HighレベルのLINEBUF_OUTEN信号(Sig_311)を出力する。これにより、ラインバッファメモリ部331から、画素データ2L、2M、2Rが読み出され、BUF_DATA_OUT信号(Sig_320)として出力される。尚、期間F中は、セレクタ部333により、BUF_DATA_OUT信号(Sig_320)がDATA_OUT信号(Sig_306)と接続される。
同じく期間F中は、HighレベルのVALID_IN信号(Sig_302)がラインバッファメモリ部331に入力され、3ライン目の画素データ3M、3R及び4ライン目の画素データ4Lがラインバッファメモリ部331に格納される。
In the subsequent period F, the pixel copy
Similarly, during the period F, a High-level VALID_IN signal (Sig_302) is input to the line buffer memory unit 331, and the pixel data 3M and 3R for the third line and the pixel data 4L for the fourth line are stored in the line buffer memory unit 331. The
図7(c)は、期間Fが完了した時のバッファメモリ部340の4つのラインバッファM_1L(351)、M_1R(352)、M_2L(353)、M_2R(354)に格納される画素データの一例を模式的に示す図である。ラインバッファメモリM_1L(351)、M_1R(352)、M_2L(353)、M_2R(354)には、画素データ3L、3R、4L、2Rがそれぞれ格納される。バッファメモリM_REF_R(356)には、2ライン目の右端部の参照画素データ2R'が格納される。
FIG. 7C illustrates an example of pixel data stored in the four line buffers M_1L (351), M_1R (352), M_2L (353), and M_2R (354) of the
続く期間Gにおいて、画素データコピー処理部332は、バッファメモリM_REF_R(356)に格納されている2ライン目の右端部の参照画素データ2R'を、COPY_DATA_OUT信号(Sig_321)に出力する。尚、期間G中は、セレクタ部333により、COPY_DATA_OUT信号がDATA_OUT信号と接続される。
同時に、画素データコピー処理部332は、画素コピー処理制御部330に、HighレベルのCOPY_VALID_OUT信号(Sig_350)を出力する。これにより、画素コピー処理制御部330は、HighレベルのVALID_OUT信号(Sig_305)を出力する。HighレベルのCOPY_DATA_OUT信号(Sig_350)の出力完了後に、LowレベルのCOPY_DATA_OUT信号(Sig_350)が出力される。
In the subsequent period G, the pixel data
At the same time, the pixel data
以上の処理で、参照画素データが両端に付加された1ライン目及び2ライン目の画素データの出力が完了する。 With the above processing, the output of the pixel data of the first line and the second line with the reference pixel data added to both ends is completed.
次に、期間Hにおいて、3ライン目の左端3画素分の参照画素データ(図5の画素ブロック531のG色、532のB色、533のG色)の画素コピー処理が行われる。
期間Hでは、期間Bの処理と同様の画素コピー処理を実施する。ただし、画素コピー処理される参照画素データは、参照画素データの画素ブロック501から画素ブロック531に移行する。したがって、画素コピー処理される画素ブロック531のカラーIDの組み合わせは、図4(b)の画素ブロック411ではなく、画素ブロック431の組み合せ(1,1)に対応する。
同様に、画素コピー処理のコピー元となる有効画素データの画素ブロックは、画素ブロック504から画素ブロック534に移行する。したがって、画素コピー処理のコピー元となる有効画素データの画素ブロック534のカラーIDの組み合わせは、図4(b)の画素ブロック414ではなく、画素ブロック434の組み合わせ(1,1)に対応する。
Next, in the period H, pixel copy processing of reference pixel data (G color of the
In the period H, a pixel copy process similar to the process in the period B is performed. However, the reference pixel data subjected to the pixel copy process shifts from the
Similarly, the pixel block of the effective pixel data that is the copy source of the pixel copy process moves from the
また、画素ブロック434のCIDアドレスは「CIDX=3」であり、このCIDアドレス値は、図7(c)のバッファメモリのアドレス値「ML_CIDX=0」の位置が対応する。従って、画素ブロック434に対応する有効画素データは、バッファメモリM_1L及びM_2Lに格納されている画素ブロック705の有効画素データとなる。
以上のようにして期間Hにおいて、3ライン目の左端3画素分の参照画素データの画素コピー処理が完了すると、期間Iへ移行する。
The CID address of the
As described above, in the period H, when the pixel copy processing of the reference pixel data for the leftmost three pixels on the third line is completed, the process proceeds to the period I.
期間Iでは、期間Cの処理における画素データ1L、1M、1Rを画素データ3L、3M、3Rに、画素データ2M、2R、2Lを画素データ4M、4R、5Lにそれぞれ置き換えた処理が実行される。
次に、期間Jでは、期間Dの処理と同様の画素コピー処理を実施する。ただし、画素コピー処理される参照画素データは、参照画素データの画素ブロック508から画素ブロック538に移行する。したがって、画素コピー処理される画素ブロック538のカラーIDの組み合わせは、図4(c)の画素ブロック418から画素ブロック438の組み合わせ(1,1)に対応する。
In the period I, the pixel data 1L, 1M, and 1R in the process of the period C are replaced with the pixel data 3L, 3M, and 3R, and the pixel data 2M, 2R, and 2L are replaced with the pixel data 4M, 4R, and 5L, respectively. .
Next, in the period J, a pixel copy process similar to the process in the period D is performed. However, the reference pixel data to be subjected to pixel copy processing is transferred from the
同様に、画素コピー処理のコピー元となる有効画素データの画素ブロックは、画素ブロック507から画素ブロック537に移行する。したがって、画素コピー処理のコピー元となる有効画素データの画素ブロック537のカラーIDの組み合わせは、図4(c)の画素ブロック417ではなく、画素ブロック437の組み合わせ(1,1)に対応する。
また、画素ブロック437のCIDアドレス値は「CIDX=2」であり、図7(d)のバッファメモリのアドレス値「MR_CIDX=5」の位置が対応する。従って、画素ブロック437に対応する有効画素データは、バッファメモリM_1L及びM_2Lに格納されている画素ブロック706の有効画素データとなる。
以上のようにして期間Jにおいて、3ライン目の右端3画素分の参照画素データの画素コピー処理が完了すると、期間Kへ移行する。
Similarly, the pixel block of the effective pixel data that is the copy source of the pixel copy process moves from the
The CID address value of the
As described above, when the pixel copy process of the reference pixel data for the rightmost three pixels on the third line is completed in the period J, the process proceeds to the period K.
期間Kでは、バッファメモリM_REF_L(355)内の参照画素データ4L'が出力される。
次の期間Lでは、期間Fの処理における画素データ2L、2M、2Rを画素データ4L、4M、4Rに、画素データ3M、3R、4Lを画素データ5M、5R、6Lにそれぞれ置き換えた処理が実行される。
最後の期間Mでは、バッファメモリM_REF_R(356)内の参照画素データ4R'が出力される。
以降、画像データの最終ラインまで画素コピー処理が実行され、画素データコピー処理部332の処理が完了する。
In the period K, the reference pixel data 4L ′ in the buffer memory M_REF_L (355) is output.
In the next period L, the pixel data 2L, 2M, and 2R in the process of the period F are replaced with the pixel data 4L, 4M, and 4R, and the pixel data 3M, 3R, and 4L are replaced with the pixel data 5M, 5R, and 6L, respectively. Is done.
In the last period M, the reference pixel data 4R ′ in the buffer memory M_REF_R (356) is output.
Thereafter, the pixel copy process is executed up to the final line of the image data, and the process of the pixel data
図8は、画像の左端部が、図10に示すカラーフィルタ配列のフィルタ色に対して異なる位置になった際の画素コピー処理の結果の一例を示す図である。図8中の白色の画素データは、画素コピー処理により、画像の左端部に外挿される参照画素データである。一方、網点の画素データは、有効画素データを示す。
図8(a)は、画像の左端部(画素ブロック807の左端位置)が、上部からG色、B色、G色、G色、R色、G色のカラーフィルタ配列となる場合を示す図である。
第1ライン目及び第2ライン目の参照画素データとなる画素ブロック801、803には、画素コピー処理により、同一のカラーフィルタ色の組み合わせを有する有効画素データの画素ブロック807のG色の画素データとB色の画素データがコピーされる。
FIG. 8 is a diagram illustrating an example of a result of pixel copy processing when the left end portion of the image is located at a different position with respect to the filter colors of the color filter array illustrated in FIG. 10. The white pixel data in FIG. 8 is reference pixel data extrapolated to the left end portion of the image by pixel copy processing. On the other hand, the pixel data of halftone dots indicates effective pixel data.
FIG. 8A shows a case where the left end portion of the image (the left end position of the pixel block 807) is a color filter array of G color, B color, G color, G color, R color, and G color from the top. It is.
The pixel blocks 801 and 803 serving as reference pixel data for the first line and the second line are subjected to pixel copy processing, and G pixel data of the pixel block 807 of effective pixel data having the same combination of color filter colors is obtained. And B color pixel data are copied.
参照画素データとなる画素ブロック802には、画素コピー処理により、同一のカラーフィルタ色の組み合わせを有する有効画素データの画素ブロック808のR色の画素データとG色の画素データがコピーされる。
参照画素データとなる画素ブロック804、806には、画素コピー処理により、同一のカラーフィルタ色の組み合わせを有する有効画素データの画素ブロック808のR色の画素データとG色の画素データが上下反転されてコピーされる。
R pixel data and G pixel data of the pixel block 808 of effective pixel data 808 having the same combination of color filter colors are copied to the
In the pixel blocks 804 and 806 serving as reference pixel data, the R color pixel data and the G color pixel data of the pixel block 808 of the effective pixel data 808 having the same color filter color combination are inverted by pixel copy processing. To be copied.
参照画素データとなる画素ブロック805には、画素コピー処理により、同一のカラーフィルタ色の組み合わせを有する有効画素データの画素ブロック807のG色の画素データとB色の画素データがコピー処理される。
同様に、第3ライン目及び第4ライン目と第5ライン目及び第6ライン目でも画素コピー処理が実施される。
The pixel block 805 serving as reference pixel data is subjected to a copy process of the G pixel data and the B pixel data of the pixel block 807 of the effective pixel data 807 having the same combination of color filter colors by the pixel copy process.
Similarly, pixel copy processing is also performed on the third line, the fourth line, the fifth line, and the sixth line.
参照画素データとなる実線で囲まれる画素ブロックには、有効画素データの左端部の画素ブロックの画素データであって、同一のカラーフィルタ色の組み合わせを有する実線で囲まれる画素ブロックの画素データがコピーされる。参照画素データの画素ブロックとコピー元の有効画素データの画素ブロックとで、カラーフィルタ色が上下反転している場合には、有効画素データの画素データが上下反転されて、参照画素データの画素ブロックにコピーされる。 In the pixel block surrounded by the solid line as the reference pixel data, the pixel data of the pixel block surrounded by the solid line having the same color filter color combination, which is the pixel data of the pixel block at the left end of the effective pixel data, is copied. Is done. When the color filter color is inverted vertically between the pixel block of the reference pixel data and the pixel block of the effective pixel data of the copy source, the pixel data of the effective pixel data is inverted up and down, and the pixel block of the reference pixel data To be copied.
同様に、参照画素データとなる破線で囲まれる画素ブロックには、有効画素データの左端部の画素ブロックの画素データであって、同一のカラーフィルタ色の組み合わせを有する破線で囲まれる画素ブロックの画素データがコピーされる。同様に、参照画素データの画素ブロックとコピー元の有効画素データの画素ブロックとで、カラーフィルタ色が上下反転している場合には、有効画素データの画素データが上下反転されて参照画素データの画素ブロックにコピーされる。 Similarly, a pixel block surrounded by a broken line serving as reference pixel data includes pixel data of a pixel block surrounded by a broken line that has the same color filter color combination and is the pixel data of the pixel block at the left end of the effective pixel data. Data is copied. Similarly, when the color filter color is inverted vertically between the pixel block of the reference pixel data and the pixel block of the effective pixel data of the copy source, the pixel data of the effective pixel data is inverted upside down and the reference pixel data Copied to pixel block.
尚、前述した画素コピー処理のように、第1ライン目で、同一ライン内でB色の有効画素データを画素コピー処理する場合は、B色の画素データ810から参照画素データとしてコピーされる。従って、B色の画素データ間の間隔が、本実施形態で説明した画素コピー処理を行った場合よりも長くなる。したがって、参照画素データとなるコピーされる参照画素データとコピー元の有効画素データの画素値の差が大きくなる可能性が高くなる。
同様に、前述した画素コピー処理のように、第2ライン目で、同一ライン内でR色の有効画素データを画素コピー処理する場合は、R色の画素データ809から参照画素データとしてコピーされる。従って、R色の画素データ間の間隔が、本実施形態で説明した画素コピー処理を行った場合よりも長くなる。したがって、参照画素データとなるコピーされる参照画素データとコピー元の有効画素データの画素値の差が大きくなる可能性が高くなる。
同様に第2〜第6ライン目の画素データの場合においても、本実施形態で説明した画素コピー処理を行った場合の方がコピーされる参照画素データとコピー元の有効画素データとの距離を短くすることが可能である(図8(a)の二重線の四角の画素を参照)。
Note that, when the B-color effective pixel data is subjected to pixel copy processing within the same line in the first line as in the pixel copy processing described above, the B-
Similarly, when the effective pixel data of the R color is subjected to the pixel copy process within the same line in the second line as in the pixel copy process described above, the
Similarly, in the case of the pixel data on the second to sixth lines, the distance between the reference pixel data to be copied and the effective pixel data of the copy source when the pixel copy processing described in the present embodiment is performed is set. It is possible to shorten the length (see the double-line square pixels in FIG. 8A).
図8(b)は、画像の左端部が、上部からR色、G色、R色、B色、G色、B色のカラーフィルタ配列となる場合を示す図である。
図8(c)は、画像の左端部が、上部からG色、B色、G色、G色、R色、G色のカラーフィルタ配列となる場合を示す図である。
何れの場合も、図8(a)と同様の図示の仕方をしている。本実施形態で説明した画素コピー処理を行った場合の方が、同一のライン内で同色の画素データを画素コピー処理する方式よりもコピーされる参照画素データとコピー元の有効画素データとの間隔を短くすることが可能であることを示す。
FIG. 8B is a diagram illustrating a case where the left end portion of the image is an R, G, R, B, G, B color filter array from the top.
FIG. 8C is a diagram illustrating a case where the left end portion of the image is a color filter array of G color, B color, G color, G color, R color, and G color from the top.
In either case, the illustration is the same as in FIG. In the case of performing the pixel copy processing described in the present embodiment, the interval between the reference pixel data to be copied and the effective pixel data of the copy source, compared to the method of performing pixel copy processing on pixel data of the same color in the same line It is possible to shorten the time.
以上のように本実施形態では、有効画素データの領域である有効画素領域の端(左端・右端)の外側の領域であって、当該端からローパスフィルタ処理等の画素補間処理で必要なサイズ分の領域である参照画素領域を設定する。参照画素領域の各画素に、カラーフィルタの配列の繰り返しパターンが保持されるように(くずれないように)色を設定する。参照画素領域を、複数の画素からなる画素ブロックに分け、有効画素領域における画素ブロックであって、参照画素領域における画素ブロックと同じサイズの画素ブロックのうち、参照画素領域における画素ブロックに最も近い画素ブロックを選択する。そして、それらの画素ブロックの色の組み合わせが同じであるか否かを判定する。有効画素領域における画素ブロックと、参照画素領域における画素ブロックの色の組み合わせが同じでない場合には、同じになるまで、有効画素データにおける画素ブロックを水平方向に1つずつずらして前記の判定を行う。 As described above, in the present embodiment, an area outside the end (left end / right end) of the effective pixel area, which is an area of effective pixel data, is the size necessary for pixel interpolation processing such as low-pass filter processing from the end. A reference pixel area, which is an area of, is set. A color is set for each pixel in the reference pixel region so that a repetitive pattern of the color filter array is held (so as not to be broken). The reference pixel area is divided into pixel blocks composed of a plurality of pixels, and the pixel block in the effective pixel area, the pixel block having the same size as the pixel block in the reference pixel area, the pixel closest to the pixel block in the reference pixel area Select a block. Then, it is determined whether or not the color combinations of these pixel blocks are the same. When the color combination of the pixel block in the effective pixel region and the pixel block in the reference pixel region is not the same, the determination is performed by shifting the pixel blocks in the effective pixel data one by one in the horizontal direction until they are the same. .
具体的に、M×N(M、Nは正の整数)の色の配列を有するカラーフィルタを備えた撮像素子102から出力された画素データに対して画素コピー処理を行う際に、以下のようにする。すなわち、P×Qの画素ブロックの単位で、参照画素領域における画素ブロックと色の組み合わせが同じになる画素ブロックを有効画素領域から探索する。ここで、PはM以下の整数であり、QはN以下の整数であり、PとQの少なくとも何れかが2以上の整数であり、P×QはM×Nよりも小さい。また、P×Qの画素ブロックは、参照画素領域から有効画素領域への探索方向において、参照画素領域における画素ブロックの色の組み合わせが有効画素領域に存在する範囲で最小の大きさを有するようにするのが好ましい。
Specifically, when pixel copy processing is performed on pixel data output from the
以上のようにすることで、コピー処理された参照画素とコピー元となる有効画素との間の間隔を短縮できる。これにより、コピー処理された参照画素とコピー元となる有効画素との間の画素値の差異も従来の処理と比較して小さくできる。また、画素コピー処理部203から出力された画素データを処理する後段の画像処理部(フィルタ処理部204)においても、参照画素となる画素データの画素値の差異の影響を受けることを低減できる。
As described above, the interval between the reference pixel subjected to the copy process and the effective pixel as the copy source can be shortened. As a result, the difference in pixel value between the reference pixel subjected to the copy process and the effective pixel as the copy source can be reduced as compared with the conventional process. Further, in the subsequent image processing unit (filter processing unit 204) that processes the pixel data output from the pixel
本実施形態では、画像の左端部及び右端部の画素コピー処理の手順を例に挙げて記載した。しかしながら、画像の上端部及び下端部の画素コピー処理にも、本実施形態で説明した画素コピー処理を適用することが可能である。 In the present embodiment, the procedure of pixel copy processing at the left end portion and the right end portion of the image is described as an example. However, it is possible to apply the pixel copy processing described in the present embodiment to the pixel copy processing at the upper end portion and the lower end portion of the image.
図9は、画像の上端部(4画素分)の画素コピー処理の結果の一例を示す図である。図9中の白色の画素データは、画素コピー処理により、画像上端部に外挿される参照画素データである。一方、網点の画素データは、有効画素データを示す。
画像の上端部の画素コピー処理では、画像の左端部及び右端部の画素コピー処理時と同様に、図10に示すカラーフィルタ配列の規則性から、垂直方向にカラーフィルタの2列分に跨り、探索を行う。従って、探索用となる画素ブロックの画素サイズとして、水平方向の画素数を「2」、垂直方向の画素数を「1」にそれぞれ設定する。
FIG. 9 is a diagram illustrating an example of a result of pixel copy processing of the upper end portion (for four pixels) of an image. The white pixel data in FIG. 9 is reference pixel data extrapolated to the upper end of the image by pixel copy processing. On the other hand, the pixel data of halftone dots indicates effective pixel data.
In the pixel copy process at the upper end of the image, as with the pixel copy process at the left and right ends of the image, the regularity of the color filter array shown in FIG. Perform a search. Therefore, as the pixel size of the pixel block for search, the number of pixels in the horizontal direction is set to “2”, and the number of pixels in the vertical direction is set to “1”.
参照画素データとなる第1列目及び第2列目の画素ブロック901には、画素コピー処理により、同一のカラーフィルタ色の組み合わせを有する有効画素データである画素ブロック905のG色の画素データとR色の画素データがコピーされる。
参照画素データとなる画素ブロック902、904には、画素コピー処理により、同一のカラーフィルタ色の組み合わせを有する有効画素データである画素ブロック906が左右反転してコピーされる。
参照画素データとなる画素ブロック903には、画素コピー処理により、同一のカラーフィルタ色の組み合わせを有する有効画素データである画素ブロック905が左右反転してコピーされる。
The
In the pixel blocks 902 and 904 serving as reference pixel data, a
A
第3列目及び第4列目と第5列目及び第6列目では、参照画素データとなる実線で囲まれる画素ブロックには、有効画素データの上端部の画素ブロックのデータであって、同一のカラーフィルタ色の組み合わせを有する実線で囲まれる画素データがコピーされる。参照画素データの画素ブロックとコピー元の有効画素データの画素ブロックとで、カラーフィルタ色が左右反転している場合には、有効画素データの画素データが左右反転されて参照画素データの画素ブロックにコピーされる。 In the third column, the fourth column, the fifth column, and the sixth column, the pixel block surrounded by the solid line as the reference pixel data is the pixel block data at the upper end of the effective pixel data, Pixel data surrounded by a solid line having the same color filter color combination is copied. When the color filter color is horizontally reversed between the pixel block of the reference pixel data and the pixel block of the effective pixel data of the copy source, the pixel data of the effective pixel data is inverted horizontally and becomes the pixel block of the reference pixel data. Copied.
同様に、参照画素データとなる破線で囲まれる画素ブロックには、有効画素データの上端部の画素ブロックのデータであって、同一の色の組み合わせを有する破線で囲まれる画素データがコピーされる。同様に、参照画素データの画素ブロックとコピー元の有効画素データの画素ブロックとで、カラーフィルタ色が左右反転している場合には、有効画素データの画素データが左右反転されて参照画素データの画素ブロックにコピーされる。 Similarly, pixel data surrounded by a broken line having the same color combination, which is the data of the pixel block at the upper end of the effective pixel data, is copied to the pixel block surrounded by the broken line as reference pixel data. Similarly, when the color filter color is inverted horizontally between the pixel block of the reference pixel data and the pixel block of the effective pixel data of the copy source, the pixel data of the effective pixel data is inverted horizontally and the reference pixel data Copied to pixel block.
尚、図10に示すカラーフィルタ配列で画像の上端部の画素コピー処理と、画像の左端部及び右端部の画素コピー処理を同時に実行する際には、探索用となる画素ブロックの画素サイズを個別に設定する。具体的に説明すると、画像の左端部及び右端部の画素コピー処理では、探索用となる画素ブロックの画素サイズとして、水平方向の画素数を「1」、垂直方向の画素数を「2」に設定する。一方、画像の上端部の画素コピー処理では、探索用となる画素ブロックの画素サイズとして、水平方向の画素数を「2」、垂直方向の画素数を「1」に設定する。 When the pixel copy processing at the upper end portion of the image and the pixel copy processing at the left end portion and the right end portion of the image are simultaneously executed with the color filter array shown in FIG. 10, the pixel size of the pixel block for search is individually set. Set to. More specifically, in the pixel copy process at the left end and right end of the image, the pixel size of the pixel block for search is set to “1” in the horizontal direction and “2” in the vertical direction. Set. On the other hand, in the pixel copy process at the upper end of the image, the pixel size of the pixel block for search is set to “2” for the number of pixels in the horizontal direction and “1” for the number of pixels in the vertical direction.
さらに、撮像素子の有するカラーフィルタ配列におけるカラーフィルタ色の組み合わせの並び方によって、探索用の画素ブロックの画素サイズを、水平方向及び垂直方向の少なくとも何れか一方において変更することが可能である。すなわち、探索用の画素ブロックの(同一の方向における)画素ブロックのサイズは、本実施形態のように全て同一でなくてもよく、場所によって異ならせてもよい。 Furthermore, the pixel size of the search pixel block can be changed in at least one of the horizontal direction and the vertical direction depending on the arrangement of the color filter colors in the color filter array of the image sensor. That is, the pixel block sizes (in the same direction) of the search pixel blocks do not have to be the same as in this embodiment, and may differ depending on the location.
また、本実施形態では、探索用に、参照画素データのカラーIDの組み合せを用いて、画素コピー処理のコピー元となる画素ブロックを、画像の端から探索する場合を例に挙げて説明した。しかしながら、例えば、以下のような処理方式を採用しても構わない。
参照画素データの画素ブロックのカラーフィルタ配列上の位置から、画像の端部におけるコピー元の有効画素データの画素ブロックの位置が分かっている場合には、探索処理を省略して画素コピー処理を行う構成にしてもよい。
Further, in the present embodiment, an example has been described in which a pixel block that is a copy source of pixel copy processing is searched from the end of an image by using a combination of color IDs of reference pixel data for searching. However, for example, the following processing method may be adopted.
If the position of the pixel block of the effective pixel data of the copy source at the edge of the image is known from the position on the color filter array of the pixel block of the reference pixel data, the pixel copy process is performed with the search process omitted It may be configured.
尚、前述した実施形態は、何れも本発明を実施するにあたっての具体化の例を示したものに過ぎず、これらによって本発明の技術的範囲が限定的に解釈されてはならないものである。すなわち、本発明はその技術思想、又はその主要な特徴から逸脱することなく、様々な形で実施することができる。 The above-described embodiments are merely examples of implementation in carrying out the present invention, and the technical scope of the present invention should not be construed in a limited manner. That is, the present invention can be implemented in various forms without departing from the technical idea or the main features thereof.
(その他の実施例)
本発明は、前述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
(Other examples)
The present invention supplies a program that realizes one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in a computer of the system or apparatus read and execute the program This process can be realized. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.
100:画像処理装置、104:画像処理回路、203:画素コピー処理部 100: Image processing device 104: Image processing circuit 203: Pixel copy processing unit
Claims (6)
前記画素データにより定まる画像の端部の外側の領域であって、当該画素データを処理する際の参照画素のそれぞれに、前記カラーフィルタにおける前記色の配列の繰り返しパターンが保持されるように、色を配置する配置手段と、
前記参照画素からなる領域である参照画素領域における画素ブロックに対して前記配置手段により配置された色の組み合わせと同じ色の組み合わせとなる画素ブロックを、水平方向または垂直方向を探索の方向として、前記画素データに基づく画像の領域である有効画素領域から探索する探索手段と、
前記探索手段により探索された前記有効画素領域における前記画素ブロックに含まれる画素のデータを、前記参照画素領域における前記画素ブロックに含まれる画素のデータとしてコピーするコピー手段と、
を有し、
前記探索手段は、前記参照画素領域における前記画素ブロックに対して前記配置手段により配置された色の組み合わせと同じ色の組み合わせとなる前記画素ブロックであって、当該参照画素領域における前記画素ブロックに最も近い前記画素ブロックを、前記有効画素領域から探索することを特徴とする画像処理装置。 Acquisition of pixel data output from an image sensor having a color filter having a color arrangement of M × N (M and N are positive integers) and having a color arrangement other than a Bayer arrangement Means,
The color is such that a repetitive pattern of the color arrangement in the color filter is held in each of the reference pixels when processing the pixel data, which is an area outside the edge of the image determined by the pixel data. Arranging means for arranging;
The pixel block having the same color combination as the color combination arranged by the arrangement unit with respect to the pixel block in the reference pixel area, which is an area composed of the reference pixels, with the horizontal direction or the vertical direction as the search direction, Search means for searching from an effective pixel area which is an area of an image based on pixel data;
Copy means for copying pixel data included in the pixel block in the effective pixel area searched by the search means as pixel data included in the pixel block in the reference pixel area;
I have a,
The search means is the pixel block having the same color combination as the color combination arranged by the arrangement means with respect to the pixel block in the reference pixel area, and is most similar to the pixel block in the reference pixel area. An image processing apparatus , wherein the pixel block that is near is searched from the effective pixel region .
前記画素データにより定まる画像の端部の外側の領域であって、当該画素データを処理する際の参照画素のそれぞれに、前記カラーフィルタにおける前記色の配列の繰り返しパターンが保持されるように、色を配置する配置工程と、
前記参照画素からなる領域である参照画素領域における画素ブロックに対して前記配置工程により配置された色の組み合わせと同じ色の組み合わせとなる画素ブロックを、水平方向または垂直方向を探索の方向として、前記画素データに基づく画像の領域である有効画素領域から探索する探索工程と、
前記探索工程により探索された前記有効画素領域における前記画素ブロックに含まれる画素のデータを、前記参照画素領域における前記画素ブロックに含まれる画素のデータとしてコピーするコピー工程と、
を有し、
前記探索工程は、前記参照画素領域における前記画素ブロックに対して前記配置工程により配置された色の組み合わせと同じ色の組み合わせとなる前記画素ブロックであって、当該参照画素領域における前記画素ブロックに最も近い前記画素ブロックを、前記有効画素領域から探索することを特徴とする画像処理方法。 Acquisition of pixel data output from an image sensor having a color filter having a color arrangement of M × N (M and N are positive integers) and having a color arrangement other than a Bayer arrangement Process,
The color is such that a repetitive pattern of the color arrangement in the color filter is held in each of the reference pixels when processing the pixel data, which is an area outside the edge of the image determined by the pixel data. An arrangement step of arranging,
The pixel block having the same color combination as the color combination arranged in the arrangement step with respect to the pixel block in the reference pixel area, which is an area composed of the reference pixels, with the horizontal direction or the vertical direction as the search direction, A search step for searching from an effective pixel area which is an area of an image based on pixel data;
A copy step of copying pixel data included in the pixel block in the effective pixel region searched in the search step as pixel data included in the pixel block in the reference pixel region;
I have a,
The searching step is the pixel block having the same color combination as the color combination arranged by the arrangement step with respect to the pixel block in the reference pixel region, and is the most similar to the pixel block in the reference pixel region. An image processing method characterized by searching for the near pixel block from the effective pixel region .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014042769A JP6395398B2 (en) | 2014-03-05 | 2014-03-05 | Image processing apparatus and image processing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014042769A JP6395398B2 (en) | 2014-03-05 | 2014-03-05 | Image processing apparatus and image processing method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2015170897A JP2015170897A (en) | 2015-09-28 |
JP6395398B2 true JP6395398B2 (en) | 2018-09-26 |
Family
ID=54203300
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2014042769A Active JP6395398B2 (en) | 2014-03-05 | 2014-03-05 | Image processing apparatus and image processing method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6395398B2 (en) |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4313907B2 (en) * | 1999-08-26 | 2009-08-12 | キヤノン株式会社 | Imaging apparatus and control method thereof |
EP1746846B1 (en) * | 2004-04-12 | 2019-03-20 | Nikon Corporation | Image processing device having color shift-correcting function, image processing program, and electronic camera |
JP5400573B2 (en) * | 2009-11-09 | 2014-01-29 | シャープ株式会社 | Image processing apparatus and imaging apparatus |
JP6381219B2 (en) * | 2014-02-06 | 2018-08-29 | キヤノン株式会社 | Image processing apparatus, image processing method, and program |
-
2014
- 2014-03-05 JP JP2014042769A patent/JP6395398B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2015170897A (en) | 2015-09-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5740465B2 (en) | Imaging apparatus and defective pixel correction method | |
JP2008199177A (en) | Image processor and its method, and electronic camera | |
JP6515455B2 (en) | Imaging device and imaging display device | |
JP4991907B2 (en) | Image processing apparatus and method for controlling image processing apparatus | |
US20140111672A1 (en) | Image processing device and image capture device | |
JP2005286621A (en) | Exposure device | |
JP5829122B2 (en) | Imaging apparatus and evaluation value generation apparatus | |
JP2009157733A (en) | Image distortion correction method, image distortion correction device, and image forming apparatus | |
JP2015231052A (en) | Imaging device and method and program | |
JP2010141661A (en) | Image processing device | |
US10277811B2 (en) | Display control device and imaging device | |
JP2009164674A (en) | Distortion correction device | |
JP6395398B2 (en) | Image processing apparatus and image processing method | |
JP2010028758A (en) | Image processing apparatus and method, program, and imaging apparatus | |
JP2006211402A (en) | Camera apparatus and image processing method | |
JP6557451B2 (en) | Imaging apparatus, control method therefor, and program | |
JP2017055309A (en) | Imaging apparatus and its control method | |
JP2017201749A (en) | Image processing apparatus and control method thereof | |
JP6318894B2 (en) | Image processing apparatus, image processing method, and imaging apparatus | |
JP6415086B2 (en) | Image processing apparatus, image processing method, and program | |
JP2009033498A (en) | Optical distortion correction device, method and program therefor, and imaging apparatus | |
JP6045247B2 (en) | Image processing apparatus, control method thereof, and control program | |
JP5333163B2 (en) | Imaging device | |
JP2008191921A (en) | Optical distortion correction method and device, imaging device with video recording function, and optical distortion correction program | |
JP3810685B2 (en) | Resolution converter and digital camera |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20170228 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20171204 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20180109 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20180208 |
|
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: 20180731 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20180828 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 6395398 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |