JP2005057529A - Method and apparatus for image processing, and program - Google Patents

Method and apparatus for image processing, and program Download PDF

Info

Publication number
JP2005057529A
JP2005057529A JP2003286787A JP2003286787A JP2005057529A JP 2005057529 A JP2005057529 A JP 2005057529A JP 2003286787 A JP2003286787 A JP 2003286787A JP 2003286787 A JP2003286787 A JP 2003286787A JP 2005057529 A JP2005057529 A JP 2005057529A
Authority
JP
Japan
Prior art keywords
color
filter
image
data
image conversion
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
Application number
JP2003286787A
Other languages
Japanese (ja)
Inventor
Shinichiro Nishioka
伸一郎 西岡
Yuji Nagaishi
裕二 永石
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2003286787A priority Critical patent/JP2005057529A/en
Publication of JP2005057529A publication Critical patent/JP2005057529A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4007Scaling of whole images or parts thereof, e.g. expanding or contracting based on interpolation, e.g. bilinear interpolation

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Color Television Image Signal Generators (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)
  • Image Processing (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To maintain image quality after processing while evading arithmetic redundancy such that data are temporarily increased by color interpolation and decreased again by resizing when resizing processing is for reduction in color imaging by a digital camera etc. <P>SOLUTION: Provided are an apparatus, a method, and a program for image processing, for evading the arithmetic redundancy accompanying a conventional way of individually performing color interpolation processing and resizing processing and avoiding low data loss even when resizing is reduction to hold an image of high quality. For the purpose, the color interpolation processing and resizing processing are integrated with image conversion including a filter as shown in Fig.; and up-sampling processing is moved to behind the integrated image conversion filter 502 and down-sampling processing is moved to before it, so as to eliminate the arithmetic redundancy. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

撮像画像データの変換を効率的に行う画像処理の装置、方法およびプログラムに関する。 The present invention relates to an image processing apparatus, method, and program for efficiently converting captured image data.

ディジタルカメラ機器、たとえばディジタルカメラや携帯電話付属カメラなどにより被写体を動画や静止画としてカラー撮像しそれを記録、表示するとき、通常は撮像したデータを縮小して、つまり撮像装置が有している解像度で撮像したデータよりも低い解像度に下げてデータ量を少なくしてから、記録あるいはプレビュー表示する。図12に示すように、カメラ機器での撮像可能画素数に比較して表示の画素数あるいは動画記録の画素数は通常は十分の1前後とかなり小さい。またカラー撮像素子(画素)から得られる撮像データは画素に配置した色フィルタの色の輝度の値しか得られないので、他の色値を得るには色補間する処理が必要である。   When a subject is color-captured as a moving image or a still image using a digital camera device such as a digital camera or a camera attached to a mobile phone, and is recorded and displayed, usually the captured data is reduced, that is, the imaging device has Recording or preview display is performed after reducing the data amount to a lower resolution than the data captured at the resolution. As shown in FIG. 12, the number of pixels for display or the number of pixels for moving image recording is usually considerably smaller than about 1 in comparison with the number of pixels that can be imaged by a camera device. In addition, since image data obtained from a color image sensor (pixel) can only obtain the brightness value of the color filter arranged in the pixel, color interpolation processing is required to obtain other color values.

したがってディジタルカラー画像処理において、撮像から記録あるいは表示までの処理の途中で、色補間と縮小リサイズの処理が必要となる。
図13は従来の一般的な画像処理装置の構成例である。図中の撮像手段1301では、色フィルタ、たとえば図14(a)に示すR、G、Bの配列からなる原色フィルタ、あるいは同図(b)に示すYe、Cy、Mg、Grの配列からなる補色フィルタがCCD(Charge-Coupled Devices)からなる撮像素子を覆っているので、撮像素子に配置された色の輝度値をその画素の色の値として得る。これをローデータ(Raw Data)あるいは原画像データと呼ぶ。ここでは説明の便宜上、色フィルタが原色フィルタであって、その色の配列が図14(a)に示した、広く使われているベイア(Bayer)配列とする。ベイア配列では、G色は他のR色、B色と異なって配列単位を構成する4画素のうち2画素を占め市松状に配置されている。
Therefore, in digital color image processing, color interpolation and reduction / resize processing are required during the processing from imaging to recording or display.
FIG. 13 shows a configuration example of a conventional general image processing apparatus. In the imaging means 1301 in the figure, a color filter, for example, a primary color filter having an arrangement of R, G, and B shown in FIG. 14A, or an array of Ye, Cy, Mg, and Gr shown in FIG. Since the complementary color filter covers an image pickup device composed of a CCD (Charge-Coupled Devices), the luminance value of the color arranged in the image pickup device is obtained as the color value of the pixel. This is called raw data or original image data. Here, for convenience of explanation, it is assumed that the color filter is a primary color filter and the color arrangement is a widely used Bayer arrangement shown in FIG. In the Bayer array, the G color is different from the other R colors and B colors, and occupies 2 out of 4 pixels constituting the array unit, and is arranged in a checkered pattern.

こうして撮像した原画像データに対して、図13の撮像処理部分1302内の色補間手段1303で色補間し、その結果の画像に対してリサイズ手段1304でリサイズを行う。原画像データは各画素1色から成る画像データであり、画素のそれ以外の色の値を仮に0値としてその色値を推定、算出するための演算処理が狭義の色補間処理である。図15に示すように、空間処理的にみれば、色補間はR、B、G各色ごとに原画像と同じサイズの画像データを実記憶域または仮想のデータプレーン上に得ることである。   The original image data captured in this way is subjected to color interpolation by the color interpolation means 1303 in the imaging processing portion 1302 of FIG. 13 and the resulting image is resized by the resizing means 1304. The original image data is image data composed of one color of each pixel, and arithmetic processing for estimating and calculating the color value assuming that the value of the other color of the pixel is 0 is a narrowly defined color interpolation process. As shown in FIG. 15, in terms of spatial processing, color interpolation is to obtain image data of the same size as the original image for each color of R, B, and G on a real storage area or a virtual data plane.

また図16に示すように信号処理的にみれば、色補間は原画像であるローデータの水平または垂直方向のデータを順次入力し、そのデータに対して↓2のダウンサンプリングによる指定色分離、抽出のための間引き(データ量は2分の1に)と、↑2のアップサンプリングによるデータ間へのひとつの0値挿入(データ量は2倍に)とを行う処理のことである。この図の例では、水平方向の画像データが間引かれて、その代わりにダミーとして0値のデータが挿入され、後で補間値が与えられる様子を示している。この色補間の処理を模式的に示したものが図17(a)の1701である。ここでHcは色補間フィルタである。なお原画像データに対する色分離と0値挿入の過程は、元来は撮像手段1301で行うべき処理とも考えられるが、ここでは色補間処理の一部とみなす。ただし原画像データから特定の色分離後のデータも原画像データと呼ぶことがあり、この場合の原画像データに対しては色分離は必要ないので、色補間にも色分離は含めない。今後特に断りがなければ原画像データは色分離前の画像データを言う。   Further, as shown in FIG. 16, in terms of signal processing, color interpolation is performed by sequentially inputting raw data in the horizontal or vertical direction, which is the original image, and specifying the specified color separation by downsampling of ↓ 2 for the data. This is a process of performing thinning for extraction (the data amount is halved) and one zero value insertion (data amount is doubled) between the data by upsampling of ↑ 2. In the example of this figure, the image data in the horizontal direction is thinned out, and instead, 0-value data is inserted as a dummy and an interpolation value is given later. Reference numeral 1701 in FIG. 17A schematically shows this color interpolation processing. Here, Hc is a color interpolation filter. The process of color separation and zero value insertion for the original image data is considered to be a process that should be originally performed by the imaging unit 1301, but is regarded as a part of the color interpolation process here. However, data after specific color separation from the original image data may also be referred to as original image data. Since color separation is not necessary for the original image data in this case, color separation is not included in the color interpolation. Unless otherwise specified, the original image data refers to image data before color separation.

次に、図13のリサイズ手段1304は、色補間された画像データのサイズ変更であるリサイズ(サイズ変更)を行う。リサイズを模式的に表現したものが図17(a)のリサイズ処理1702である。これは画像の水平、垂直方向のリサイズがともにU/Dの時のリサイズの処理部分を表している。↑UはデータをU倍に増加するアップサンプリングを、↓DはD分の1に間引くダウンサンプリングを表している。詳しく言うと、↑Uはデータひとつのデータに対して、そのデータの直後に、色補間の場合と同様にU-1個の0値のデータを挿入する。また↓DはD個のデータに対してそのうちたとえば最初の1個だけを抽出し他は捨てる処理を行う。   Next, the resizing means 1304 in FIG. 13 performs resizing (size changing) which is a size change of the color-interpolated image data. A schematic representation of resizing is resizing processing 1702 in FIG. This represents a resizing processing portion when the horizontal and vertical resizing of the image is U / D. ↑ U represents upsampling that increases the data by U times, and ↓ D represents downsampling that thins out to 1 / D. More specifically, ↑ U inserts U-1 0-value data immediately after the data as in the case of color interpolation. Also, ↓ D performs a process of extracting only the first one of the D data and discarding the others.

さて、ここでデータ量に注目すると、色補間は↓2でローデータから当該色値のみ抽出した後は↑2で当該色のデータ量を2倍に増加させる処理であり、一方で縮小リサイズは当該色のデータ量を削減する処理である。このように色補間処理でいったん増加させたデータをリサイズでまた縮小するということは、これらの処理に冗長性があることを意味している。   Now, paying attention to the data amount, the color interpolation is the process of increasing the data amount of the color twice at ↑ 2 after extracting only the color value from the raw data at ↓ 2, while the reduction resizing is This is processing for reducing the data amount of the color. Thus, reducing the data once increased by the color interpolation process by resizing means that these processes have redundancy.

従来技術における色補間、リサイズの冗長性をなくすための先行技術が特許文献1に開示されている。この先行技術では、画素のベイア配列のパターンを維持したまま、リサイズを先に行い、その後に色補間を行うので、縮小リサイズの場合にも上記のような冗長性はなく演算量は大幅に削減できる。
特開2002−84547号公報
The prior art for eliminating the redundancy of color interpolation and resizing in the prior art is disclosed in Patent Document 1. In this prior art, resizing is performed first while maintaining the pattern of the pixel Bayer array, and then color interpolation is performed. Therefore, even in the case of reduced resizing, there is no redundancy as described above, and the amount of computation is greatly reduced. it can.
JP 2002-84547 A

しかしながら特許文献1では縮小でのリサイズ処理を色補間処理よりも先に行うため、原画像データの縮小に伴うローデータの損失が発生し、その後に行う色補間処理による画像の復元品位の低下をきたすことになる。このローデータの損失による復元品位の低下は、色補間を先に行う従来技術では生じなかったものである。
本発明は、上記の問題点に鑑み、色補間処理とリサイズ処理とを従来技術のように別処理として行なうことに伴う演算冗長性をなくし、しかもローデータ損失による画質劣化のない画像処理の装置、方法、プログラムを提供する。
However, in Patent Document 1, since the resizing process in the reduction is performed before the color interpolation process, a loss of raw data due to the reduction of the original image data occurs, and the restoration quality of the image is lowered by the color interpolation process performed thereafter. Will come. This reduction in restoration quality due to the loss of raw data did not occur in the prior art in which color interpolation is performed first.
In view of the above-described problems, the present invention eliminates the operational redundancy associated with performing color interpolation processing and resizing processing as separate processing as in the prior art, and does not deteriorate image quality due to loss of raw data. , Provide methods and programs.

上記問題を解決するため、
(1) 本発明の画像処理装置は、色フィルタを備えた複数のカラー撮像素子により撮像された原画像データに対し撮像素子に配置された色以外の色の値を補間する色補間と、色補間で補間された画像データに対し画像サイズを変更するリサイズとを一括して行う画像変換手段を備える、ことを特徴とする。
To solve the above problem,
(1) An image processing apparatus according to the present invention includes color interpolation that interpolates color values other than colors arranged in an image sensor with respect to original image data captured by a plurality of color image sensors including color filters, and color An image conversion unit that collectively performs resizing for changing the image size with respect to the image data interpolated by the interpolation is provided.

(2)また、前記色補間は前記原画像データに対する色分離と、色補間のためにデータ拡張を行う第1アップサンプリングと、補間値算出のための色補間フィルタ処理とに相当するデータ変換であり、前記リサイズは前記色補間処理後の画像データに対するデータ拡張を行う第2アップサンプリングと、画像サイズ変更データ算出のためのリサイズフィルタの処理と、データ縮小を行うダウンサンプリングとに相当するデータ変換であって、前記画像変換手段は、該色補間フィルタ処理と該リサイズフィルタ処理とを一括して処理する画像変換フィルタと、該第1アップサンプリングを行うひとつ以上の第1アップサンプラと該第2アップサンプリングを行うひとつ以上の第2アップサンプラと、該ダウンサンプリングを行うひとつ以上のダウンサンプラと、を備え、該第1アップサンプラと該第2アップサンプラとは該画像変換フィルタの後段に配置し、該ダウンサンプラは該画像変換フィルタの前段に配置することを特徴とする。   (2) The color interpolation is data conversion corresponding to color separation for the original image data, first upsampling for data expansion for color interpolation, and color interpolation filter processing for calculating an interpolation value. The resizing is a data conversion corresponding to a second upsampling that performs data expansion on the image data after the color interpolation process, a resizing filter process for calculating image size change data, and a downsampling that performs data reduction. The image conversion means includes an image conversion filter that collectively processes the color interpolation filter processing and the resizing filter processing, one or more first upsamplers that perform the first upsampling, and the second One or more second upsamplers that perform upsampling and one or more downsamplers that perform the downsampling Comprising a Npura, and the first up-sampler and the second up-sampler disposed downstream of said image transform filter, the down-sampler is characterized by placing in front of the image transform filter.

なおこの構成で色分離の処理部がなければ、処理対象は色分離後の原画像データであり、色分離の処理部が構成にあれば、処理対象は色分離前の原画像データである。
(3)さらに、前記色フィルタの色はベイア配列であって、前記画像変換手段は、ベイア配列の配列単位4画素のうち2画素に配置されるGの色を別色のG1、G2とみなして4色の原画像データに対し色別に前記画像変換を行い、前記画像処理装置はさらに、前記画像変換で得られたG1色,G2色の画像変換データをもとにして低域G色と高域G色の各画像データとを生成する帯域分割手段と、該高域G色をもとにしてR色、該低域G色、B色の各画像変換データの高域補償を行う高域補償手段と、を備えることを特徴とする
としてもよい。
If there is no color separation processing unit in this configuration, the processing target is original image data after color separation, and if the color separation processing unit is in the configuration, the processing target is original image data before color separation.
(3) Further, the color of the color filter is a Bayer array, and the image conversion means regards the G colors arranged in two of the four pixels in the array unit of the Bayer array as different colors G1 and G2. The image conversion is performed on the original image data of four colors for each color, and the image processing apparatus further converts the low-frequency G color and the low-frequency G color based on the G1 color and G2 color image conversion data obtained by the image conversion. Band division means for generating high-frequency G color image data, and high-frequency compensation for high-frequency compensation of the R, low-G color, and B-color image conversion data based on the high-frequency G color It is good also as providing an area compensation means.

(4)また前記色フィルタの色はベイア配列であって、前記画像変換手段は、RとBの2色については前記画像変換により処理し、Gの色については、ベイア配列4要素のうち2画素に配置されるGの色を別色のG1、G2とみなして4色の原画像データに対し水平または垂直いずれか一方の方向に画像変換し、該画像変換されたG1、G2データをマージしたデータに対して、もうひとつの方向にリサイズのみを行うことにより処理することを特徴とする、としてもよい。   (4) Further, the color of the color filter is a Bayer array, and the image converting means processes the two colors R and B by the image conversion, and the G color is 2 of 4 elements in the Bayer array. Considering the G color arranged in the pixel as G1 and G2 of different colors, convert the original image data of four colors in either horizontal or vertical direction, and merge the G1 and G2 data that have been converted The processed data may be processed only by resizing in the other direction.

(5)上記問題を解決するため、本発明の画像変換の方法は、色フィルタを備えた撮像素子により撮像された原画像データに対し行う色補間とリサイズの処理の方法であって、該色補間と該リサイズの各データ変換を画像変換として一括して行い、該画像変換は、該色補間のためのフィルタである色補間フィルタと該リサイズのためのフィルタであるリサイズフィルタとを統合した画像変換フィルタの処理ステップと、該色補間のための第1アップサンプリングステップと、該リサイズのための第2アップサンプリングステップとダウンサンプリングステップと、を含み、該第1アップサンプリングステップと該第2アップサンプリングのステップとを該画像変換フィルタの処理ステップの後に行い、該ダウンサンプリングステップを該画像変換フィルタの処理ステップの前に行うことを特徴とする。   (5) In order to solve the above problem, an image conversion method according to the present invention is a method of color interpolation and resizing processing performed on original image data captured by an image sensor provided with a color filter. Interpolation and data conversion of the resizing are collectively performed as image conversion, and the image conversion is an image in which a color interpolation filter that is a filter for the color interpolation and a resizing filter that is a filter for the resizing are integrated A transform filter processing step; a first upsampling step for the color interpolation; and a second upsampling step and a downsampling step for the resizing, the first upsampling step and the second upsampling step. A sampling step is performed after the processing step of the image conversion filter, and the downsampling step is performed on the image conversion filter. And performing the previous filter processing steps.

(6)上記問題を解決するため、本発明の画像変換のプログラムは、色フィルタを備えた撮像素子により撮像された原画像データに対し行う色補間とリサイズの処理をコンピュータに実行させるプログラムであって、該色補間と該リサイズの各データ変換を画像変換として一括して行い、該画像変換は、該色補間のためのフィルタである色補間フィルタと該リサイズのためのフィルタであるリサイズフィルタとを統合した画像変換フィルタの処理と、該色補間のための第1アップサンプリングの処理と、該リサイズのための第2アップサンプリング処理と、ダウンサンプリング処理と、を含み、該第1アップサンプリングの処理と該第2アップサンプリングの処理とを該画像変換フィルタの処理の後に行い、該ダウンサンプリング処理を該画像変換フィルタの処理の前に行うことを特徴とする。   (6) In order to solve the above problem, the image conversion program of the present invention is a program that causes a computer to execute color interpolation and resizing processing performed on original image data captured by an image sensor having a color filter. The color interpolation and the resizing data conversion are collectively performed as image conversion, and the image conversion includes a color interpolation filter that is a filter for the color interpolation, and a resizing filter that is a filter for the resizing. Including a first upsampling process for the color interpolation, a second upsampling process for the resizing, and a downsampling process. Processing and second upsampling processing are performed after the image conversion filter processing, and the downsampling processing is performed on the image. And performing before treatment conversion filter.

本発明の画像処理装置は、
色フィルタを備えた複数のカラー撮像素子により撮像された原画像データに対し撮像素子に配置された色以外の色の値を補間する色補間と、
色補間で補間された画像データに対し画像サイズを変更するリサイズとを
一括して行う画像変換手段
を備える。
The image processing apparatus of the present invention
Color interpolation for interpolating color values other than colors arranged in the image sensor with respect to original image data captured by a plurality of color image sensors having color filters;
Image conversion means for collectively performing resizing to change the image size for the image data interpolated by color interpolation is provided.

この構成により、色補間とリサイズの処理は従来技術では別々のハードモジュールにおいてそれぞれのフィルタ演算回路などにより処理されてきたが、本発明のこの構成により、色補間とリサイズの2つの処理モジュールが画像変換モジュールに1本化、簡素化される。
さらに色補間とリサイズの両処理の全体での演算最適化をして冗長性をなくすための前提条件が整う。
With this configuration, the color interpolation and resizing processes have been processed by the respective filter operation circuits in separate hardware modules in the prior art, but with this configuration of the present invention, the two processing modules of color interpolation and resizing can be performed on an image. One conversion module is simplified.
Furthermore, the preconditions for eliminating the redundancy by optimizing the operation of both the color interpolation and resizing processes are established.

また、本発明の画像処理装置は、その画像変換手段が、色補間フィルタ処理とリサイズフィルタ処理とを一括して処理する画像変換フィルタと、色補間のための第1アップサンプリングを行うひとつ以上の第1アップサンプラと、リサイズのための第2アップサンプリングを行うひとつ以上の第2アップサンプラと、リサイズのためのダウンサンプリングを行うひとつ以上のダウンサンプラとを備え、第1アップサンプラと第2アップサンプラとは画像変換フィルタの後段に配置し、ダウンサンプラは画像変換フィルタの前段に配置することを特徴とする。   In the image processing apparatus of the present invention, the image conversion means includes one or more image conversion filters that collectively perform color interpolation filter processing and resizing filter processing, and one or more that performs first upsampling for color interpolation. The first upsampler and the second upsampler include a first upsampler, one or more second upsamplers that perform second upsampling for resizing, and one or more downsamplers that perform downsampling for resizing. The sampler is disposed in the subsequent stage of the image conversion filter, and the down sampler is disposed in the preceding stage of the image conversion filter.

この構成は、色補間とリサイズの処理に関して文献1で開示された技術を除く従来技術における場合と機能的に等価な処理であり、しかも演算の冗長性のない最適化された構成である。したがって画像品位を落とすことがなく、しかも従来に比べて演算量を大幅に軽減できる。
さらに、本発明の画像処理装置は、撮像素子の色フィルタがベイア配列であり、その配列単位4画素のうち2画素に配置されるGの色を別色のG1、G2とみなして4色の原画像データに対し色別に前記画像変換を行い、前記画像変換で得られたG1色,G2色の画像変換データをもとにして低域G色と高域G色の各画像データとを生成する帯域分割手段と、該高域G色をもとにしてR色、該低域G色、B色の各画像変換データの高域補償を行う高域補償手段とを備える、
としてもよい。
This configuration is functionally equivalent to the case of the prior art except for the technology disclosed in Document 1 regarding the color interpolation and resizing processing, and is an optimized configuration with no operational redundancy. Therefore, the image quality is not deteriorated, and the calculation amount can be greatly reduced as compared with the conventional case.
Furthermore, in the image processing apparatus of the present invention, the color filter of the image sensor is a Bayer array, and the G colors arranged in two pixels of the four pixels in the array unit are regarded as different colors G1 and G2, and the four colors. Performs image conversion for each color of the original image data, and generates low-frequency G color and high-frequency G color image data based on the G1 and G2 color image conversion data obtained by the image conversion Band dividing means, and high-frequency compensation means for performing high-frequency compensation of each image conversion data of the R color, the low-frequency G color, and the B color based on the high-frequency G color,
It is good.

この構成によれば、画像変換の後でさらに画像データの高域化の処理も行うので、後の記録・再生レベルの要求に対応できる。
また、本発明の画像処理装置は、撮像素子の色フィルタがベイア配列であり、画像変換手段は、RとBの2色については前記画像変換により処理し、Gの色については、ベイア配列4要素のうち2画素に配置されるGの色を別色のG1、G2とみなして4色の原画像データに対し水平または垂直いずれか一方の方向に画像変換し、該画像変換されたG1、G2データをマージしたデータに対して、もうひとつの方向にリサイズのみを行うことにより処理する、としてもよい。
According to this configuration, since the processing for increasing the frequency of the image data is further performed after the image conversion, it is possible to cope with a request for a later recording / reproduction level.
In the image processing apparatus of the present invention, the color filter of the image sensor is a Bayer array, and the image conversion means processes the two colors R and B by the image conversion and the Bayer array 4 for the G color. Considering the G colors arranged in two pixels of the elements as G1 and G2 of different colors, image conversion is performed in either the horizontal or vertical direction with respect to the original image data of four colors, and the image converted G1, The data obtained by merging the G2 data may be processed by only resizing in the other direction.

この構成によれば、画像データの生成は低域に限定される。したがって高域補正の演算が不要であり、G1、G2データ生成の演算も前述の場合の約半分で済む。後の工程で独自の高域補償をする場合や、低域データによるプレビュー表示の場合にも利用できる。
本発明の画像変換の方法は、色フィルタを備えた撮像素子により撮像された原画像データに対し行う色補間とリサイズの処理の方法であって、該色補間と該リサイズの各データ変換を画像変換として一括して行い、該画像変換は、該色補間のためのフィルタである色補間フィルタと該リサイズのためのフィルタであるリサイズフィルタとを統合した画像変換フィルタの処理ステップと、該色補間のための第1アップサンプリングステップと、該リサイズのための第2アップサンプリングステップとダウンサンプリングステップと、を含み、該第1アップサンプリングステップと該第2アップサンプリングのステップとを該画像変換フィルタの処理ステップの後に行い、該ダウンサンプリングステップを該画像変換フィルタの処理ステップの前に行うことを特徴とする。
According to this configuration, the generation of image data is limited to a low frequency range. Therefore, high-frequency correction calculation is unnecessary, and calculation of G1 and G2 data generation is about half that in the above case. It can also be used when performing original high-frequency compensation in a later process or preview display with low-frequency data.
The image conversion method of the present invention is a method of color interpolation and resizing processing performed on original image data captured by an image sensor having a color filter, and each color conversion and resizing data conversion is performed on an image. The image conversion is performed collectively as a conversion, and the image conversion is performed by integrating a color interpolation filter that is a filter for the color interpolation and a resize filter that is a filter for the resizing; A first upsampling step for the resizing, a second upsampling step and a downsampling step for the resizing, the first upsampling step and the second upsampling step of the image conversion filter After the processing step, the downsampling step is performed before the processing step of the image conversion filter It is characterized by that.

本発明の画像変換のプログラムは、色フィルタを備えた撮像素子により撮像された原画像データに対し行う色補間とリサイズの処理をコンピュータに実行させるプログラムであって、該色補間と該リサイズの各データ変換を画像変換として一括して行い、該画像変換は、該色補間のためのフィルタである色補間フィルタと該リサイズのためのフィルタであるリサイズフィルタとを統合した画像変換フィルタの処理と、該色補間のための第1アップサンプリングの処理と、該リサイズのための第2アップサンプリング処理とダウンサンプリング処理と、を含み、該第1アップサンプリングの処理と該第2アップサンプリングの処理とを該画像変換フィルタの処理の後に行い、該ダウンサンプリング処理を該画像変換フィルタの処理の前に行うものであり、コンピュータ上で実行させる。   The image conversion program of the present invention is a program for causing a computer to perform color interpolation and resizing processing performed on original image data captured by an image sensor having a color filter, and each of the color interpolation and resizing Data conversion is performed collectively as image conversion, and the image conversion is performed by an image conversion filter that integrates a color interpolation filter that is a filter for color interpolation and a resize filter that is a filter for resizing; A first upsampling process for the color interpolation, a second upsampling process and a downsampling process for the resizing, the first upsampling process and the second upsampling process It is performed after the image conversion filter processing, and the downsampling processing is performed before the image conversion filter processing. Run on a computer.

本発明のプログラムを実行すれば、カメラ機器で画像処理専用の論理回路に代わりマイクロプロセッサのもとで動作させることができる。またあらかじめ記録しておいた撮像データを汎用のコンピュータで高速処理することにも使える。   By executing the program of the present invention, the camera device can be operated under a microprocessor instead of a logic circuit dedicated to image processing. It can also be used for high-speed processing of pre-recorded image data on a general-purpose computer.

(実施の形態1)
実施の形態1における画像処理装置の全体構成を図1に示す。実施の形態1の特徴的な部分は図の画像変換手段103とその後処理を行う帯域分割手段104、エッジ検出手段105、高域補償手段106である。次にこれらについて手段毎に説明する。
まず画像変換手段103は、従来技術の図13の色補間手段1303とリサイズ手段1304を統合したものであるので、画像変換手段の構成は色補間手段とリサイズ手段の構成によって定義される。したがって色補間手段とリサイズ手段の統合の結果だけではなくその過程も説明する。
(Embodiment 1)
FIG. 1 shows the overall configuration of the image processing apparatus according to the first embodiment. Characteristic parts of the first embodiment are the image conversion means 103 in the figure, a band dividing means 104, an edge detection means 105, and a high frequency compensation means 106 for performing subsequent processing. Next, these will be described for each means.
First, since the image conversion unit 103 is obtained by integrating the color interpolation unit 1303 and the resizing unit 1304 of FIG. 13 of the prior art, the configuration of the image conversion unit is defined by the configuration of the color interpolation unit and the resizing unit. Therefore, not only the result of the integration of the color interpolation means and the resizing means but also the process will be described.

画像変換フィルタの元となる色補間フィルタHc、リサイズフィルタHRはともに線形であり、また水平方向、垂直方向に分離可能とする。これらのフィルタは伝達関数で表現できる。伝達関数の例を、色補間フィルタのタップ数が7の場合、およびリサイズフィルタのタップ数が12の場合について図19の(a)と(b)にそれぞれ示す。
今後特に断りのない限り、フィルタはどれも水平あるいは垂直の方向に関するものとする。なお水平、あるいは垂直の方向は便宜的なものであり、画像データの画素の並びが行列状であるので、行あるいは列のどちらかを水平、もう一方を垂直方向とみなせばよい。
The color interpolation filter Hc and the resizing filter HR that are the basis of the image conversion filter are both linear and separable in the horizontal and vertical directions. These filters can be expressed by transfer functions. Examples of transfer functions are shown in FIGS. 19A and 19B for the case where the number of taps of the color interpolation filter is 7 and the number of taps of the resize filter is 12, respectively.
Unless otherwise noted, all filters will be in the horizontal or vertical direction. Note that the horizontal or vertical direction is convenient, and the arrangement of the pixels of the image data is a matrix, so that either the row or the column may be regarded as horizontal and the other as the vertical direction.

画像変換フィルタを作成するための前処理として、リサイズフィルタHRを周知のポリフェーズ分解の方法によってU個に分割し、アップサンプラ(↑U)をリサイズフィルタの前段から後段に移動する。ここで前段とは処理の流れのなかで上流側を、後段とは下流側を意味する。この移動結果を図4(a)に示す。同図の402がリサイズフィルタである。そして色補間フィルタ401とリサイズフィルタ402とを統合して画像変換フィルタ403を作成する。色補間フィルタ、リサイズフィルタとその分割フィルタは線形であることから、画像変換フィルタのU分割フィルタ(U 個の部分フィルタHi)は、次式のようにそれらの積として与えられる。この様子を図4(b)に示す。   As preprocessing for creating an image conversion filter, the resize filter HR is divided into U pieces by a known polyphase decomposition method, and the upsampler (↑ U) is moved from the front stage to the rear stage of the resize filter. Here, the former stage means the upstream side in the processing flow, and the latter stage means the downstream side. The movement result is shown in FIG. Reference numeral 402 in the figure denotes a resize filter. Then, the color interpolation filter 401 and the resizing filter 402 are integrated to create an image conversion filter 403. Since the color interpolation filter, the resizing filter, and its division filter are linear, the U division filter (U number of partial filters Hi) of the image conversion filter is given as a product of them as shown in the following equation. This state is shown in FIG.

Hi = Hc・RRi ここでi=0,1,…,U-1
ここでフィルタ演算の項数であるタップ数について述べる。統合前のリサイズフィルタHRのタップ数をMとするとU個のRRiのそれぞれのタップ数はM/Uとなる。ここでM/Uが割り切れないで商がm、余りがnのときは、ポリフェーズ分解の定義により、iが大きい順にn個までの分割フィルタRRiは(m+1)タップ、それ以外はmタップとなる。したがってポリフェーズ分解してもタップ総数は分割前と変わらない。Hcのタップ数をN とすると、RRiのタップ数はM/UなのでHiの部分フィルタのタップ数は(N―1+M/U)となる。
Hi = Hc · RRi where i = 0,1, ..., U-1
Here, the number of taps, which is the number of terms in the filter operation, will be described. If the number of taps of the resize filter HR before integration is M, the number of taps of each of the U RRIs is M / U. Here, when M / U is not divisible and the quotient is m and the remainder is n, according to the definition of polyphase decomposition, up to n division filters Rri in the order of increasing i are (m + 1) taps, otherwise m taps. Become. Therefore, even if polyphase decomposition is performed, the total number of taps remains the same as before division. If the number of taps in Hc is N, the number of taps in Rri is M / U, so the number of taps in the Hi partial filter is (N-1 + M / U).

次に、図4(b)の画像変換手段の最適な構成を求める。そのためにアップサンプラ、ダウンサンプラの一般的な振舞いを見てみたい。フィルタの前段にアップサンプラ↑nがあるときを考える。アップサンプラ↑nは入力されたデータひとつに対して(n−1)個の0値データを生成、付加して出力する処理を行う。つまりアップサンプラによりデータはn倍になるが殆どが0値である。これらのデータがフィルタに入ったとき、フィルタはその伝達関数に相当する積和の演算を行うが、0値のデータに対する演算は無駄となる。したがってフィルタの前にアップサンプラがあるときは演算の冗長性を避けるためにはそれをフィルタの後段に移動すればよい。   Next, the optimum configuration of the image conversion means in FIG. For that purpose, I would like to see the general behavior of upsamplers and downsamplers. Consider a case where there is an upsampler ↑ n in front of the filter. The upsampler ↑ n generates (n−1) 0-value data for one piece of input data, adds it, and outputs it. In other words, the data is increased n times by the upsampler, but most of them are 0 values. When these data enter the filter, the filter performs a product-sum operation corresponding to the transfer function, but the operation for 0-value data is wasted. Therefore, if there is an upsampler in front of the filter, it can be moved to the subsequent stage of the filter in order to avoid redundancy of operation.

次は逆にフィルタの後段にダウンサンプラ↓nがあるときを考える。ダウンサンプラ↓nは入力されたデータn個に対してひとつだけ採用して出力し、残りはすべて捨てる間引き処理を行う。つまりフィルタで演算した結果のデータの大部分は無駄になってしまう。したがってフィルタの後にダウンサンプラがあるときは演算の冗長性を避けるためにはそれをフィルタの前段に移動すればよい。   Next, consider the case where there is a downsampler ↓ n in the subsequent stage of the filter. The downsampler ↓ n adopts and outputs only one of n pieces of input data, and performs a thinning process that discards the rest. That is, most of the data obtained as a result of calculation by the filter is wasted. Therefore, if there is a downsampler after the filter, it can be moved to the previous stage of the filter in order to avoid redundancy of operation.

なおアップサンプラやダウンサンプラのこれらの移動の前と後の構成においては、入力データが同じなら出力データも同じとなる。
上記の理由から、図4(b)の画像変換手段の構成を最適化するために色補間のアップサンプラ↑2を画像変換フィルタ403の後段に、またリサイズのダウンサンプラ↓Dを前段に移動する。画像変換のU分割フィルタHiをそれぞれさらに2個づつにポリフェーズ分解(2分割フィルタHi,j(j=0,1)ができる)してから、色補間のアップサンプラ↑2を各部分フィルタの後段に移動する。そして2U個のHi,jフィルタをさらにそれぞれD個にポリフェーズ分解(D分割フィルタHi,j,k(k=0,1,…,D-1)ができる)してから、リサイズのダウンサンプラ↓Dを前段に移動する。こうして水平方向あるいは垂直方向の画像変換を行う2DU個の部分フィルタHi,j,kからなる画像変換フィルタを得る。これを図5の502に示す。この部分フィルタHi,j,kのタップ数は平均で(N−1+M/U)/2Dとなる。
In the configuration before and after the movement of the up sampler and the down sampler, if the input data is the same, the output data is also the same.
For the above reasons, the color interpolation upsampler ↑ 2 is moved to the rear stage of the image conversion filter 403 and the resized downsampler ↓ D is moved to the front stage in order to optimize the configuration of the image conversion means in FIG. . After polyphase decomposition (two-division filter Hi, j (j = 0,1) can be performed) for each two U-division filters Hi for image conversion, the upsampler ↑ 2 for color interpolation is added to each partial filter. Move to the next stage. Then, 2U Hi, j filters are further polyphase-decomposed into D pieces (D-division filters Hi, j, k (k = 0,1, ..., D-1) can be generated), and then the resized downsampler ↓ Move D to the previous stage. In this way, an image conversion filter comprising 2DU partial filters Hi, j, k for performing horizontal or vertical image conversion is obtained. This is shown at 502 in FIG. The number of taps of this partial filter Hi, j, k is (N-1 + M / U) / 2D on average.

さて、アップサンプラ、ダウンサンプラの移動の結果、画像変換フィルタで行う演算は、従来のように色補間、リサイズの処理順で行ったときと同じ画像データの出力をするのにもかかわらず、これらの出力データを生成するのに必要かつ十分な処理あるいは演算だけになる。
したがって従来技術のように「色補間で拡大してからリサイズで縮小」での冗長性、あるいは「ローデータの縮減後に色補間」での画質劣化がない、演算的に最適化された構成を得る。この図5の構成が、リサイズがU/D倍での実施の形態1での、水平または垂直の画像変換を行う部分の画像変換手段における構成である。色補間フィルタ、リサイズフィルタの伝達関数が固定していても、リサイズのパラメタであるU、Dが異なると図5の構成も異なる。したがって、実際的にはあらかじめU、Dのいくつかの値の対のそれぞれについての図5の画像変換の構成を用意しておくことになる。なお図5の画像変換部501は、水平用と垂直用の2種類がある。
Now, as a result of the movement of the upsampler and downsampler, the calculation performed by the image conversion filter is performed in spite of outputting the same image data as when performing the color interpolation and resizing processing order as before. Only necessary or sufficient processing or calculation is required to generate the output data.
Therefore, as in the prior art, an arithmetically optimized configuration is obtained in which there is no redundancy in “enlargement by color interpolation and then reduction by resizing” or image quality deterioration in “color interpolation after reduction of raw data”. . The configuration in FIG. 5 is the configuration in the image conversion means of the part that performs horizontal or vertical image conversion in the first embodiment in which the resizing is U / D times. Even if the transfer functions of the color interpolation filter and the resizing filter are fixed, the configurations shown in FIG. 5 are different if the resizing parameters U and D are different. Therefore, in practice, the image conversion configuration of FIG. 5 is prepared for each of several pairs of U and D in advance. Note that there are two types of image conversion units 501 in FIG. 5, horizontal and vertical.

画像変換の構成の例として、リサイズフィルタの伝達関数がタップ数(演算項数)12、リサイズが2/3倍、つまりアップサンプリング↑2、ダウンサンプリング↓3でリサイズする場合について、図4(b)のリサイズフィルタ402の2分割フィルタの各伝達関数を図7(a)に示す。同じ条件で図5の2分割フィルタ503内の各D分割フィルタの伝達関数を図7(b)に示す。   As an example of the configuration of image conversion, the resizing filter has a transfer function of 12 taps (the number of computation terms) and a resizing of 2/3 times, that is, resizing with upsampling ↑ 2 and downsampling ↓ 3, as shown in FIG. Each transfer function of the two-divided filter of the resize filter 402 of FIG. FIG. 7B shows the transfer function of each D-divided filter in the 2-divided filter 503 in FIG. 5 under the same conditions.

フィルタを実現する演算回路の設計方法は、従来技術と同様であるので、ここでは簡単に述べる。たとえば、各部分フィルタの伝達関数が図7の(b)のときの図5の2分割フィルタ503に対応する回路図の例を、図6(a)の604に示す。この図6の601が図5のD分割フィルタH0,0,0の、602がH0,0,1の、603がH0,0,2の演算回路である。たとえば601は1データクロック前に入力されたデータをレジスタ0にストアしておきそれと係数a7との積と、最新の入力データと係数a1の積との和を出力する。602,603もそれぞれ同様に演算出力し、それぞれの出力データの総和を604の出力値としていることを示している。なお図のDFF(D-フリップフロップ)は1遅延素子である。   Since the design method of the arithmetic circuit for realizing the filter is the same as that of the prior art, it will be briefly described here. For example, an example of a circuit diagram corresponding to the two-divided filter 503 in FIG. 5 when the transfer function of each partial filter is in FIG. 7B is shown at 604 in FIG. 6A. 601 in FIG. 6 is an arithmetic circuit of the D-division filter H0,0,0 in FIG. 5, 602 is H0,0,1 and 603 is H0,0,2. For example, 601 stores data input one data clock before in register 0 and outputs the sum of the product of it and the coefficient a7 and the product of the latest input data and the coefficient a1. 602 and 603 are calculated and output in the same manner, and the total sum of the output data is the output value of 604. In the figure, DFF (D-flip-flop) is a delay element.

図6(a)ではひとつの部分フィルタでひとつの演算回路が対応しているが、実際には必ずしも1対1対応である必要はない。たとえば図6(b)は同図(a)の部分フィルタごとの演算回路をひとつの演算回路611にして3個の部分フィルタ間で共有し、セレクタとレジスタの使用により同図(a)と等価な演算処理を行っている。セレクタ613,614,615はセレクト信号SelをSel=2,1,0の演算サイクル順に制御することによりフィルタ係数の切替えとデータ格納先のレジスタの選択を行う。ひとつのSelで指定された積和の結果を累積レジスタ加算部612で和しておき、3サイクル目のSelが0で演算を終えたとき、累積レジスタの出力イネーブル信号oeをオンにして出力し、累積レジスタをクリアする。   In FIG. 6 (a), one arithmetic circuit corresponds to one partial filter, but actually it does not necessarily have a one-to-one correspondence. For example, FIG. 6 (b) is equivalent to FIG. 6 (a) by using the arithmetic circuit for each partial filter in FIG. 6 (a) as one arithmetic circuit 611 and sharing it among the three partial filters, and using a selector and a register. Is performing an arithmetic operation. The selectors 613, 614, and 615 control the select signal Sel in the order of calculation cycles of Sel = 2, 1, 0 to switch the filter coefficient and select the data storage destination register. The result of sum of products specified by one Sel is summed by the cumulative register adder 612. When the Sel in the third cycle is 0 and the operation is completed, the output enable signal oe of the cumulative register is turned on and output. , Clear the cumulative register.

このようにすると、上記3サイクル分の演算は、6タップフィルタを3サイクルに1回演算するのと等価であり、もとの2分割フィルタ6タップに必要な乗算器6個が2個に、加算器5個が2個に節減できる。これまで図5の2分割フィルタ503を実行する回路の例を説明してきたが、同じく2分割フィルタである504のデータ入力が503と全く同じであることに注目して、両者で回路を共有し、可変部分のデータと係数をレジスタにおくことにより部分フィルタごとの演算をレジスタ内容の置き換えで行うことができ、さらに回路の簡素化、節減を図ることができるが、回路最適化は本題ではないのでこれ以上の説明は省略する。   In this way, the calculation for the above three cycles is equivalent to calculating the 6-tap filter once every three cycles, and the number of 6 multipliers required for the original 2-divided filter 6-tap is reduced to 2, Five adders can be reduced to two. The example of the circuit that executes the two-divided filter 503 in FIG. 5 has been described so far. However, paying attention to the fact that the data input of the same two-divided filter 504 is the same as 503, both share the circuit. By putting the variable part data and coefficients in the register, the operation for each partial filter can be performed by replacing the register contents. Further, the circuit can be simplified and saved, but circuit optimization is not the main subject. Therefore, further explanation is omitted.

画像変換手段103は、ベイア配列のG色のうち上側をG1、下側をG2と記して別色扱いし、R、B、G1、G2の4色のデータごとに、以下の順で水平方向または垂直方向にR、B、G1、G2の画像変換データを生成する。
ある色について画像変換したい場合、当該色は色分離前の原画像データにおいては1行おき、あるいは1列おきに存在するので、画像変換手段103は当該色が存在する行または列をひとつおきに選択する。原画像の水平方向(行)または垂直方向(列)のある当該色のデータの列を、画像変換手段103はまず図5で示した構成で処理するが、同図の↓2のダウンサンプラ511により当該色だけがデータの列から分離される。ここで画像変換手段で処理する対象の原画像データがすでに色分離済みである場合には、図5の色分離のダウンサンプラ511は必要がない。
The image conversion means 103 treats the G colors in the Bayer arrangement as G1 on the upper side and G2 on the lower side, and treats them as different colors. For each of the four colors R, B, G1, and G2, the horizontal direction in the following order Alternatively, R, B, G1, and G2 image conversion data are generated in the vertical direction.
When it is desired to perform image conversion for a certain color, since the color exists every other row or every other column in the original image data before color separation, the image conversion means 103 every other row or column where the color exists. select. The image conversion means 103 first processes the data row of the color in the horizontal direction (row) or vertical direction (column) of the original image with the configuration shown in FIG. 5, but the downsampler 511 indicated by ↓ 2 in FIG. To separate only that color from the data sequence. If the original image data to be processed by the image conversion means has already been color-separated, the color separation down-sampler 511 of FIG. 5 is not necessary.

色分離済みの当該色のデータの列は基準のタイミング(クロック)で図5の画像変換部501に順次入力され、いくつかのルートをたどって画像変換の部分フィルタに入っていく。あるルートでは1/Dに間引かれて、ここで抽出された場合はすぐに部分フィルタに、また同じデータが別ルートでは1遅延(図のzマイナス1乗の記号部分)の箇所を次のデータタイミングのときに通過し、同じように1/Dに間引かれるが、ここで抽出された場合は当該の部分フィルタに入力される、という具合に処理されていく。これらの部分フィルタでは、伝達関数で決められたフィルタ係数とそのフィルタ入力(あるいは入力済み)データとの積和の演算が行われる。   A sequence of the color-separated data of the color is sequentially input to the image conversion unit 501 in FIG. 5 at a reference timing (clock), and enters a partial filter for image conversion following several routes. One route is thinned to 1 / D. If it is extracted here, it is immediately applied to the partial filter, and another route is the same data in the case of 1 delay (symbol part of z minus 1 in the figure). It passes at the time of data timing and is thinned out to 1 / D in the same way, but when extracted here, it is input to the relevant partial filter. In these partial filters, the sum of products of the filter coefficient determined by the transfer function and the filter input (or already input) data is calculated.

既述の数値例では従来技術でのリサイズの分割された部分フィルタも実施の形態1での画像変換の部分フィルタもどちらも2タップの演算であることは同じである。図5の画像変換部501では2分割フィルタHi,jの単位で演算データ出力を行う。つまりD分割フィルタHi,j,kの演算値のk=0,1,…,D-1 についての総和が画像変換部の出力データのひとつとなる。   In the numerical example described above, it is the same that both the resized divided partial filter in the prior art and the image conversion partial filter in the first embodiment are 2-tap operations. The image conversion unit 501 in FIG. 5 outputs calculation data in units of the two-divided filter Hi, j. That is, the sum of the calculated values of the D-divided filters Hi, j, k for k = 0, 1,..., D−1 is one of the output data of the image conversion unit.

以上のようにして、処理したい色のある原画像データのすべての行データについて画像変換することで、原画像データの水平画像変換を行い、水平画像変換されたデータに対してさらに垂直画像変換を行う。この画像変換の様子を図8に示す。図8ではまず水平画像変換により、水平方向のサイズ(画素数)がH、垂直方向のサイズがVの原画像データを入力して、当該色の色分離後、図5の水平変換用の構成全体により水平画像変換を行う。こうして得られた水平方向のサイズがH(U/D)、垂直方向のサイズがV/2の当該色データに対して、垂直方向だけの色補間とリサイズとを図5の垂直変換用の画像変換部501の構成による垂直画像変換により行う。   As described above, by performing image conversion on all the row data of the original image data having the color to be processed, the horizontal image conversion of the original image data is performed, and the vertical image conversion is further performed on the data subjected to the horizontal image conversion. Do. The state of this image conversion is shown in FIG. In FIG. 8, first, by horizontal image conversion, original image data having a horizontal size (number of pixels) of H and a vertical size of V is input, and after color separation of the color, the horizontal conversion configuration of FIG. Perform horizontal image conversion as a whole. For the color data obtained in this way with the horizontal size of H (U / D) and the vertical size of V / 2, color interpolation and resizing only in the vertical direction are performed as shown in FIG. This is performed by vertical image conversion by the configuration of the conversion unit 501.

なお水平と垂直の変換順序は逆でも同じ結果を得るが、その場合も同様にして垂直画像変換では、原画像データが色分離前なら図5の色分離のダウンサンプラ511を含む垂直用の構成全体を、色分離後なら図5の垂直用の画像変換部501を使用し、水平画像変換では図5の水平用の画像変換部501を使用する。
色補間やリサイズのフィルタはどちらもLPF(Low Pass Filter:低域通過フィルタ)の特性を有しているため、画像変換フィルタ502も同様の特性を継承する。そのため上述の画像変換手段で水平・垂直画像変換処理された画像変換データも高域部分が欠落しているので、ここでは低域色データと呼び、RL、BL、G1、G2データと記すことにする。
Note that the same result can be obtained even if the horizontal and vertical conversion orders are reversed, but in this case as well, in the vertical image conversion, if the original image data is before color separation, the vertical configuration including the color separation downsampler 511 of FIG. If the entire image is color-separated, the vertical image conversion unit 501 shown in FIG. 5 is used. In the horizontal image conversion, the horizontal image conversion unit 501 shown in FIG. 5 is used.
Since both color interpolation and resizing filters have LPF (Low Pass Filter) characteristics, the image conversion filter 502 inherits the same characteristics. For this reason, the image conversion data that has been subjected to the horizontal / vertical image conversion processing by the above-described image conversion means also lacks the high-frequency portion, so here it is referred to as low-frequency color data, referred to as RL, BL, G1, G2 data. To do.

実施の形態1では、まずRとB色に関して画像変換手段で上述の画像変換を行って、低域のRLデータ、BLデータを得る。次にG1、G2についても別色とみなして、それぞれR、Bデータと同様にして画像変換を行う。ここでG1の画像変換データをG1データ、G2の変換データをG2データと記すことにする。
G1の画像変換データであるG1データを図9(a)に、またG2データを同図(b)に示す。
次に図1の帯域分割手段104によりG1、G2データをもとに、低域GであるGLデータ、高域GであるGHデータを生成する。
GLデータは
GL=(G1+G2)/2
の式で求める。
In the first embodiment, first, the above-described image conversion is performed on the R and B colors by the image conversion means to obtain low-frequency RL data and BL data. Next, G1 and G2 are also considered as different colors, and image conversion is performed in the same manner as R and B data, respectively. Here, G1 image conversion data is referred to as G1 data, and G2 conversion data is referred to as G2 data.
G1 data which is G1 image conversion data is shown in FIG. 9A, and G2 data is shown in FIG. 9B.
Next, the band dividing means 104 in FIG. 1 generates GL data that is a low band G and GH data that is a high band G based on the G1 and G2 data.
GL data is
GL = (G1 + G2) / 2
Calculate by the following formula.

ここで、上の式はある画素のGLの値は、同じ画素位置のG1とG2の各色値の平均値と定義している。こうしてR、G、Bのローデータはいずれも低域データとして画像変換された。
次に画像変換データの後処理として図1の高域補償手段106により高域補償を行なう。まずG高域データであるGHをG1、G2各変換データからGLと同じように同じ画素位置の値を使って次式で求める。
Here, the above formula defines the GL value of a certain pixel as the average value of the color values of G1 and G2 at the same pixel position. In this way, R, G, and B raw data were all converted to low-frequency data.
Next, high-frequency compensation is performed by the high-frequency compensation means 106 in FIG. 1 as post-processing of the image conversion data. First, GH, which is G high-frequency data, is obtained from the converted data of G1 and G2 using the same pixel position values as in GL, using the following equation.

GH = G1−G2 またはG2−G1
上記右辺のどちらを選ぶかは図1のエッジ検出手段105によりエッジを算出して決める。図10(a)に示すようにGHを求めたい画素A1の位置で水平方向のエッジ△H、垂直方向のエッジ△Vを算出する。ここで図10のA1、A2等の意味は、AがRL、GL、BL、G1、G2の各色のうちあらかじめ決めておいた任意の1色のことであり、添え字の番号は画素の相対位置を指し、1がエッジ算出対象の画素を、2がその上、3が左等を意味する。そして△H>△Vなら水平強調となるようにG1―G2を採用し、それ以外は垂直強調の G2―G1 を採用する。
GH = G1-G2 or G2-G1
Which of the right side is selected is determined by calculating an edge by the edge detecting means 105 in FIG. As shown in FIG. 10A, the horizontal edge ΔH and the vertical edge ΔV are calculated at the position of the pixel A1 for which GH is to be obtained. Here, the meaning of A1, A2, etc. in FIG. 10 means that A is an arbitrary one of the predetermined colors among RL, GL, BL, G1, and G2, and the subscript numbers are relative to the pixels. It indicates the position, 1 means the pixel for edge calculation, 2 means it, 3 means left and so on. If △ H> △ V, G1-G2 is adopted so that horizontal emphasis is applied. Otherwise, G2-G1 of vertical emphasis is adopted.

次に図1の高域補償手段106により高域補償を行う。GHが画素ごとに決まれば図10(b)に示すように、次の式により高域補償を色ごとの補正値(色係数とGHの積)を加えることにより行い、広域化されたR、G、Bである広域色データRα、Gα、Bαデータを得る。
広域色データ = 低域色データ + 色係数・GH
ここで色係数は色ごとに定義されるGHデータのゲインであり、固定値を用意してもよいし、エッジ情報に応じて調整してもよい。
Next, high frequency compensation is performed by the high frequency compensation means 106 of FIG. If GH is determined for each pixel, as shown in FIG. 10 (b), high frequency compensation is performed by adding a correction value (product of color coefficient and GH) for each color by the following formula, and R Wide color data Rα, Gα, and Bα data that are G and B are obtained.
Wide-area color data = Low-pass color data + Color coefficient / GH
Here, the color coefficient is a gain of GH data defined for each color, and a fixed value may be prepared or may be adjusted according to edge information.

以上が実施の形態1に固有な部分であり、図1の構成のうち残りの手段は従来技術と同様である。なお画像変換について説明の便宜上、水平または垂直方向の1次元画像変換としたが、水平・垂直の画像変換はそれと等価な2次元の画像変換でも同様な結果が得られるので2次元による方法でもよい。その場合はフィルタ計算も2次元(面積)データに対する演算となる。図1で示すその他の手段は従来技術と同様である。以上が本発明の第1の実施の形態である。   The above is the part unique to the first embodiment, and the remaining means in the configuration of FIG. 1 are the same as in the prior art. For convenience of explanation, the image conversion is a one-dimensional image conversion in the horizontal or vertical direction. However, the horizontal / vertical image conversion can be obtained by a two-dimensional method because the same result can be obtained by a two-dimensional image conversion equivalent thereto. . In that case, the filter calculation is also an operation for two-dimensional (area) data. Other means shown in FIG. 1 are the same as those of the prior art. The above is the first embodiment of the present invention.

次に同じ画像データを処理した場合、従来技術に比べて画像変換への統合により演算がどれだけ軽減できるかを説明する。
比較のため、従来技術での最適化構成を求めておく。まず色補間処理とリサイズ処理のアップサンプラである↑2と↑Uを対応する各フィルタの後に移行するために、色補間フィルタを2個に、またリサイズフィルタをU個にそれぞれポリフェーズ分解する。その結果を図17(b)に示す。さらにリサイズフィルタの各部分フィルタをD分割し、リサイズ処理のアップサンプラである↓Dをリサイズフィルタの前に移行する。移行した結果が従来技術として演算的に最適化された構成であり、これを図18に示す。先ほど説明した画像変換の数値例の場合リサイズフィルタをD分割した各部分フィルタのタップ数は同じく2となり、リサイズの伝達関数も係数など画像変換フィルタと異なる値ではあるものの、画像変換フィルタのD分割フィルタと同様な2項積和の演算式となる。
Next, a description will be given of how much the calculation can be reduced by integration with image conversion when the same image data is processed, compared to the conventional technology.
For comparison, an optimized configuration in the prior art is obtained. First, in order to shift ↑ 2 and ↑ U, which are upsamplers of color interpolation processing and resizing processing, to each corresponding filter, polyphase decomposition is performed on two color interpolation filters and U resize filters. The result is shown in FIG. Furthermore, each partial filter of the resize filter is divided into D parts, and the upsampler ↓ D that is the resize process is shifted to before the resize filter. The result of the shift is a configuration that is computationally optimized as the prior art, and this is shown in FIG. In the case of the numerical example of the image conversion described above, the number of taps of each partial filter obtained by dividing the resize filter into D is the same, and the resize transfer function is different from the image conversion filter, such as coefficients, but the D division of the image conversion filter. This is a binary sum-of-products operation similar to a filter.

次に演算量の重要な因子となるデータレートについて述べる。一般にポリフェーズ分解の際にダウンサンプラ↓nをフィルタの前に、あるいはアップサンプラ↑nを後にすると、フィルタへの入力データレートは1/nになる。データレートが1/nになるとは単位時間あたりのデータ量、あるいは入力データ総数が1/nになるということであり、演算(乗算と加算)量も比例してほぼ1/nになることを意味する。   Next, the data rate, which is an important factor for the amount of calculation, will be described. Generally, when the downsampler ↓ n is placed before the filter or after the upsampler ↑ n during the polyphase decomposition, the input data rate to the filter becomes 1 / n. A data rate of 1 / n means that the amount of data per unit time or the total number of input data is 1 / n, and that the amount of operations (multiplication and addition) is also proportionally 1 / n. means.

データレート倍率は、色分離↓2の直後を基準1とする。演算回数は、基準データレートでの入力データのクロック(データ間周期)あたりの値として示す。
またフィルタのタップ数を、色補間フィルタがNタップ、リサイズフィルタがMタップ、リサイズはU/D倍とする。
乗算回数は分割フィルタ数とそのタップ数とデータレート倍率の積で決まり、加算回数はフィルタタップ総数から1減じた数値に対してデータレート倍率を掛けたものに等しい。
従来の一般的な技術の場合、
色補間処理で
分割フィルタ数: 2
分割フィルタタップ数: N/2
データレート倍率:1
乗算回数:2(N/2)
加算回数:N-1
リサイズ処理で
分割フィルタ数: DU
分割フィルタタップ数: M/(DU)
データレート倍率:2/D
乗算回数:2/D(M/(DU))DU = 2M/D
加算回数: (2/D)((DU)M/(DU)-1)=2(M-1)/D
したがって合計では
乗算回数: N+2M/D
加算回数: N-1+2(M-1)/D
一方、本発明では
分割フィルタ数: 2DU
分割フィルタタップ数:(N-1+M/U)/(2D)
データレート倍率:1/D
乗算回数:2DU(N-1+M/U)/(2D)(/D) = (N-1)U/D+M/D
加算回数:(1/D)((2DU)(N-1+M/U)/(2D)-1)=(N-1)U/D+(M-1)/D
演算量は対応項を見ると、乗算、加算ともに半分近くまで減少することがわかる。
The data rate magnification is set to reference 1 immediately after color separation ↓ 2. The number of operations is indicated as a value per clock (inter-data cycle) of input data at the reference data rate.
The number of filter taps is N taps for the color interpolation filter, M taps for the resizing filter, and U / D times for resizing.
The number of multiplications is determined by the product of the number of divided filters, the number of taps thereof, and the data rate magnification. The number of additions is equal to the value obtained by subtracting 1 from the total number of filter taps multiplied by the data rate magnification.
For conventional general technology,
Number of division filters in color interpolation processing: 2
Number of division filter taps: N / 2
Data rate magnification: 1
Number of multiplications: 2 (N / 2)
Number of additions: N-1
Resize processing: Number of division filters: DU
Number of division filter taps: M / (DU)
Data rate magnification: 2 / D
Number of multiplications: 2 / D (M / (DU)) DU = 2M / D
Number of additions: (2 / D) ((DU) M / (DU) -1) = 2 (M-1) / D
Therefore, the total number of multiplications: N + 2M / D
Number of additions: N-1 + 2 (M-1) / D
On the other hand, in the present invention, the number of division filters: 2DU
Number of division filter taps: (N-1 + M / U) / (2D)
Data rate magnification: 1 / D
Number of multiplications: 2DU (N-1 + M / U) / (2D) (/ D) = (N-1) U / D + M / D
Number of additions: (1 / D) ((2DU) (N-1 + M / U) / (2D) -1) = (N-1) U / D + (M-1) / D
From the corresponding terms, it can be seen that both the multiplication and addition decrease to nearly half.

数値の例として、以下にN=7、M=12、U=2、D=3の場合について両者を比較する。
従来技術では
乗算回数:15
加算回数:14
本発明では
乗算回数:8
加算回数:8
このように1本化されたフィルタによって、演算回路が簡素化されるだけでなく、アップサンプラ、ダウンサンプラの移動が容易にでき、その結果画像変換フィルタの構築が容易にできる。しかもフィルタ入力のデータレートが大幅に低減できるので、演算回路もそれに比例して低減できることになり、ひいては回路規模や消費電力を削減できる。
As an example of numerical values, the following is a comparison between N = 7, M = 12, U = 2, and D = 3.
In the prior art, the number of multiplications: 15
Number of additions: 14
In the present invention, the number of multiplications: 8
Number of additions: 8
Such a single filter not only simplifies the arithmetic circuit, but also facilitates movement of the upsampler and downsampler, and as a result, an image conversion filter can be easily constructed. In addition, since the data rate of the filter input can be greatly reduced, the arithmetic circuit can also be reduced proportionally, thereby reducing the circuit scale and power consumption.

(実施の形態2)
実施の形態2における画像処理装置の構成を図2に示し、画像変換手段の詳細を図3に示す。実施の形態2では低域R、Bの各データは実施の形態1で述べた低域のR、Bと同様に水平・垂直画像変換301で画像変換して得るが、G1、G2を使った高域補償はしない。またG 色については、G1、G2を別色扱いしない。1プレーンのGデータを作成するために、まず低域のRまたはBの変換データをもとに画像中央付近の任意に選択した画素を対象として図3のエッジ検出部302によりエッジを算出し、その方向により以下の処理を行う。
(Embodiment 2)
The configuration of the image processing apparatus according to the second embodiment is shown in FIG. 2, and the details of the image conversion means are shown in FIG. In the second embodiment, the low-frequency R and B data are obtained by performing image conversion by horizontal / vertical image conversion 301 in the same manner as the low-frequency R and B described in the first embodiment, but G1 and G2 are used. There is no high frequency compensation. For G color, G1 and G2 are not treated as different colors. In order to create one plane of G data, first, an edge is calculated by the edge detection unit 302 in FIG. 3 for an arbitrarily selected pixel near the center of the image based on low-frequency R or B conversion data, The following processing is performed depending on the direction.

エッジが水平方向の場合、G1、G2の水平(行)方向の画像変換を行い、その画像変換データの各行をインターリーブでマージする。このインタリーブでマージするとは、まずG1データの第1行、ついでG2データの第1行、G1データの第2行、ついでG2データの第2行と上から順にG1、G2データの各行を交互に選んで合成していくことである。
こうしてマージしたデータに対して、次は垂直(列)方向のリサイズ処理のみを行う。その様子を図3の(a)と(b)に示す。
When the edge is in the horizontal direction, image conversion in the horizontal (row) direction of G1 and G2 is performed, and each row of the image conversion data is merged by interleaving. To merge with this interleaving, the first row of G1 data, then the first row of G2 data, the second row of G1 data, then the second row of G2 data, and the rows of G1 and G2 data in turn from the top alternately It is to select and synthesize.
Next, only the resizing process in the vertical (column) direction is performed on the merged data. This is shown in FIGS. 3 (a) and 3 (b).

エッジが垂直方向の場合、垂直方向の画像変換を行い、その画像変換データの各列をインターリーブでマージしたデータにたいし、水平方向のリサイズ処理のみを行う。
実施の形態2は実施の形態1のようにG1、G2の水平、垂直の画像変換を両方行う必要はなく、また低域GデータであるGLの生成、高域GデータであるGHの生成、およびGHデータによる高域補償のどれも行わないので、実施の形態1よりも演算量をさらに大幅に軽減できる。以上が実施の形態2に固有な手段の説明であり、図1の構成のうち残りの手段は従来技術と同様である。
When the edge is in the vertical direction, vertical image conversion is performed, and only the resizing process in the horizontal direction is performed on the data obtained by merging the columns of the image conversion data by interleaving.
In the second embodiment, it is not necessary to perform both horizontal and vertical image conversion of G1 and G2 as in the first embodiment, and GL that is low-frequency G data and GH that is high-frequency G data are generated. In addition, since none of the high-frequency compensation by the GH data is performed, the amount of calculation can be further reduced as compared with the first embodiment. The above is a description of the means unique to the second embodiment, and the remaining means in the configuration of FIG. 1 are the same as in the prior art.

(その他の変形例)
本発明に関する2つの実施の形態に基いてこれまで説明してきたが、本発明は上記の実施の形態に限定されないのはもちろんである。以下のような場合も本発明に含まれる。
発明は、色配列がベイア配列のかわりに他の原色配列あるいは補色配列としてもよい。これらの配列でも画像変換手段はベイア配列のときと同様である。
(Other variations)
Although the above description has been made based on two embodiments relating to the present invention, the present invention is of course not limited to the above-described embodiments. The following cases are also included in the present invention.
In the present invention, the primary color array or the complementary color array may be used instead of the Bayer array. In these arrays, the image conversion means is the same as in the Bayer array.

発明は、実施の形態で説明したステップを含む方法であるとしてもよい。
またこれらの方法を、コンピュータシステムを用いて実現するためのコンピュータプログラムであるとしてもよいし、前記プログラムを表すデジタル信号であるとしてもよい。
図1の画像変換手段103を画像変換のプログラムで実現するための処理のフローを図11に示す。図11(a)は画像変換のプログラムのメイン部であり、4色の色ごと(図中のS101)に水平(S102)、垂直(S103)の画像変換により画像変換を行う。
The invention may be a method including the steps described in the embodiments.
Further, these methods may be a computer program for realizing the method using a computer system, or may be a digital signal representing the program.
FIG. 11 shows a flow of processing for realizing the image conversion means 103 in FIG. 1 by an image conversion program. FIG. 11A shows the main part of the image conversion program. Image conversion is performed by horizontal (S102) and vertical (S103) image conversion for each of the four colors (S101 in the figure).

同図(b)の水平画像変換ルーチンは、指定色の水平画像変換を行う。指定色のデータを含む行ごと(S201)に色データだけ間引いたデータ列を作成し(S202)、データ変換ルーチンを呼び出して(S203)、このデータ列の画像変換を行い変換データを出力する。
同図(c)はデータ変換ルーチンは、図5に示したようにU分割(S302)、2分割(S303)と順に分割した2分割フィルタHi,jの演算値を画像変換データとして出力(S307)する。ここで2分割フィルタHi,jは、D分割フィルタHi,j,k(k=U-1,U-2,…,0)の集合なので、その演算値はこれらのD分割フィルタ演算値の合計により得られる(S304、S305、S306)。
The horizontal image conversion routine in FIG. 5B performs horizontal image conversion of a specified color. A data string in which only the color data is thinned out is created for each row including the data of the designated color (S201) (S202), a data conversion routine is called (S203), image conversion of this data string is performed, and converted data is output.
FIG. 6C shows a data conversion routine in which the operation values of the two-divided filter Hi, j divided in order of U division (S302) and two divisions (S303) as shown in FIG. 5 are output as image conversion data (S307). ) Here, since the two-divided filter Hi, j is a set of D-divided filters Hi, j, k (k = U-1, U-2,..., 0), the calculated value is the sum of these D-divided filter calculated values. (S304, S305, S306).

なお同図(c)のダウンサンプルデータサイクル(S301)の意味は、色データ列の処理を進める際に、最初0番目のデータ開始でサイクル0とし、その0番目データが図5の2分割フィルタ内の1番下にあるD分割フィルタHi,j,U-1に入力したタイミングで、図5の一番下のD分割フィルタから順に2分割フィルタHi,jのすべてのD分割フィルタの演算値の和を求め、それを上述した2分割フィルタHi,jの演算値として出力する。そして次に駒を進めてサイクル1(データ列D番目)で同様な処理、サイクル2(同2D番目)、と以下同様にサイクルが
データ数/D (を超えない最大整数)
に至るまで同様な処理を繰り返して、水平画像変換データを順次出力する。なお垂直画像変換ルーチンの処理は、入力が水平画像変換データのすべての列のデータであることを除き水平画像変換の処理と同様なので図示していない。以上が本発明のプログラムによる実施例である。
The meaning of the downsample data cycle (S301) in FIG. 6C is that when the color data string is processed, the cycle 0 is started at the beginning of the 0th data, and the 0th data is the 2-part filter of FIG. Calculated values of all D-divided filters of the two-divided filter Hi, j in order from the bottom D-divided filter in FIG. 5 at the timing input to the D-divided filter Hi, j, U-1 at the bottom of And outputs it as the operation value of the above-described two-divided filter Hi, j. Next, advance the piece and perform the same processing in cycle 1 (data string Dth), cycle 2 (2Dth in the same), and so on.
The same processing is repeated until the horizontal image conversion data is sequentially output. The processing of the vertical image conversion routine is not shown because it is the same as the processing of horizontal image conversion except that the input is data of all columns of the horizontal image conversion data. The above is the embodiment according to the program of the present invention.

また、本発明は、電気通信回線、無線又は有線通信回線、若しくはインターネットに代表されるネットワーク等を経由して伝送される前記プログラム又は前記デジタル信号であるとしてもよい。
また、本発明は、CPU及びメモリを備えたコンピュータシステムであり、前記メモリは前記プログラムを記憶しており、前記CPUは前記メモリに記憶されている前記プログラムに従って動作することにより、前記方法を実現するとしてもよい。
Further, the present invention may be the program or the digital signal transmitted via an electric communication line, a wireless or wired communication line, a network represented by the Internet, or the like.
Further, the present invention is a computer system including a CPU and a memory, wherein the memory stores the program, and the CPU realizes the method by operating according to the program stored in the memory. You may do that.

また、前記プログラムは、前記記録媒体に記録されて移送され、若しくは、前記ネットワーク等を経由して移送され、独立した他のコンピュータシステムにおいて実施されるとしてもよい。   The program may be recorded on the recording medium and transferred, or transferred via the network or the like, and executed in another independent computer system.

本発明はカラーディジタルカメラ機器類に利用でき、またプログラムとしてディジタルカメラによりあらかじめ撮像しておいた原画像データの処理にも利用できる。   The present invention can be used for color digital camera devices, and can also be used for processing original image data previously captured by a digital camera as a program.

本発明の実施の形態1の構成を示すブロック図である。It is a block diagram which shows the structure of Embodiment 1 of this invention. 本発明の実施の形態2の構成を示すブロック図である。It is a block diagram which shows the structure of Embodiment 2 of this invention. 本発明の実施の形態2の画像変換手段の詳細ブロック図である。It is a detailed block diagram of the image conversion means of Embodiment 2 of this invention. 従来技術の色補間フィルタとリサイズフィルタから本発明の画像変換フィルタの 統合の様子を示す図である。It is a figure which shows the mode of integration of the image conversion filter of this invention from the color interpolation filter and resizing filter of a prior art. 本発明の画像変換手段の構成図である。It is a block diagram of the image conversion means of this invention. 本発明の画像変換フィルタを実現する回路の例である。It is an example of the circuit which implement | achieves the image conversion filter of this invention. 本発明の画像変換フィルタの伝達関数の例である。It is an example of the transfer function of the image conversion filter of this invention. 本発明の水平・垂直画像変換フィルタによるデータ変換の様子を示す図である。It is a figure which shows the mode of the data conversion by the horizontal / vertical image conversion filter of this invention.


G1、G2データ、低域と高域のGデータの各々を示す図である。It is a figure which shows each of G1, G2 data, G data of a low region and a high region. エッジの算出と高域補償処理の様子を示す図である。It is a figure which shows the mode of an edge calculation and a high region compensation process. 本発明のプログラムの処理のフローチャートである。It is a flowchart of the process of the program of this invention. カメラ撮像時、記録時、表示時のそれぞれの画像サイズ例を示す図である。It is a figure which shows each example of image size at the time of camera imaging, at the time of recording, and a display. 従来の一般的な画像処理の構成を示すブロック図である。It is a block diagram which shows the structure of the conventional general image processing. カラーフィルタ配列を示す図である。It is a figure which shows a color filter arrangement | sequence. 原色フィルタでの色補間の2次元の処理図である。It is a two-dimensional processing diagram of color interpolation in a primary color filter. 色補間、リサイズの流れを信号処理的に示す図である。It is a figure which shows the flow of color interpolation and resizing in signal processing. 従来技術における色補間とリサイズの処理の構成を示す図である。It is a figure which shows the structure of the color interpolation and resizing process in a prior art. 従来技術における色補間とリサイズのそれぞれの処理の最適化された構成を 示す図である。FIG. 10 is a diagram showing an optimized configuration of each of color interpolation and resizing in the prior art. 従来技術における色補間とリサイズのフィルタの伝達関数の例である。It is an example of the transfer function of the color interpolation and resizing filter in the prior art.

符号の説明Explanation of symbols

101 撮像手段
102 撮像処理部
103 画像変換手段
104 帯域分割手段
105 エッジ検出手段
106 高域補償手段
201 画像処理部
202 画像変換手段
301 水平・垂直画像変換
302 エッジ検出部
401 色補間フィルタ
402 リサイズフィルタ
403 画像変換フィルタ
501 画像変換部
502 画像変換フィルタ
503 2分割フィルタ
504 2分割フィルタ
511 色分離のダウンサンプラ
601 D分割フィルタH0,0,0実現回路例
602 D分割フィルタH0,0,1実現回路例
603 D分割フィルタH0,0,2実現回路例
611 2分割フィルタH0,0実現回路例
612 2分割フィルタH0,0演算結果
613 第1項係数セレクタ
614 データレジスタセレクタ
615 第2項係数セレクタ
1301 撮像手段
1302 撮像処理部
1303 色補間手段
1304 リサイズ手段
1701 色補間処理部
1702 リサイズ処理部
1801 色補間処理部
1802 リサイズ処理部
DESCRIPTION OF SYMBOLS 101 Imaging means 102 Imaging processing part 103 Image conversion means 104 Band division means 105 Edge detection means 106 High frequency compensation means 201 Image processing part 202 Image conversion means 301 Horizontal / vertical image conversion 302 Edge detection part 401 Color interpolation filter 402 Resize filter 403 Image conversion filter 501 Image conversion unit 502 Image conversion filter 503 Two-part filter 504 Two-part filter 511 Color separation downsampler 601 D-partition filter H0,0,0 implementation circuit example 602 D-partition filter H0,0,1 implementation circuit example 603 D-division filter H0,0,2 implementation circuit example 611 2-division filter H0,0 implementation circuit example 612 2-division filter H0,0 calculation result 613 First term coefficient selector 614 Data register selector 615 Second term coefficient selector 1301 Imaging means 1302 Imaging processing unit 1303 color interpolation means 1304 Size 1701 color interpolation processing unit 1702 resizing section 1801 color interpolation processing unit 1802 resizing section

Claims (6)

色フィルタを備えた複数のカラー撮像素子により撮像された原画像データに対し撮像素子に配置された色以外の色の値を補間する色補間と、
色補間で補間された画像データに対し画像サイズを変更するリサイズと
を一括して行う画像変換手段
を備えることを特徴とする画像処理装置。
Color interpolation for interpolating color values other than colors arranged in the image sensor with respect to original image data captured by a plurality of color image sensors having color filters;
An image processing apparatus comprising: image conversion means for collectively performing resizing for changing the image size of image data interpolated by color interpolation.
前記色補間は前記原画像データに対する色分離と、
色補間のためにデータ拡張を行う第1アップサンプリングと、
補間値算出のための色補間フィルタ処理と
に相当するデータ変換であり、
前記リサイズは前記色補間処理後の画像データに対する
データ拡張を行う第2アップサンプリングと、
画像サイズ変更データ算出のためのリサイズフィルタの処理と、
データ縮小を行うダウンサンプリングと
に相当するデータ変換であって、
前記画像変換手段は、
該色補間フィルタ処理と該リサイズフィルタ処理とを
一括して処理する画像変換フィルタと、
該第1アップサンプリングを行うひとつ以上の第1アップサンプラと
該第2アップサンプリングを行うひとつ以上の第2アップサンプラと、
該ダウンサンプリングを行うひとつ以上のダウンサンプラと
を備え、
該第1アップサンプラと該第2アップサンプラとは
該画像変換フィルタの後段に配置し、
該ダウンサンプラは該画像変換フィルタの前段に配置する
ことを特徴とする請求項1に記載の画像処理装置。
The color interpolation is color separation for the original image data;
A first upsampling for data expansion for color interpolation;
Data conversion equivalent to color interpolation filter processing for interpolation value calculation,
The resizing is a second upsampling that performs data expansion on the image data after the color interpolation process;
Resize filter processing for calculating image size change data,
Data conversion equivalent to downsampling to reduce data,
The image conversion means includes
An image conversion filter that collectively processes the color interpolation filter processing and the resizing filter processing;
One or more first upsamplers for performing the first upsampling and one or more second upsamplers for performing the second upsampling;
One or more downsamplers for performing the downsampling, and
The first upsampler and the second upsampler are arranged after the image conversion filter,
The image processing apparatus according to claim 1, wherein the down sampler is arranged in front of the image conversion filter.
前記色フィルタの色はベイア配列であって、
前記画像変換手段は
ベイア配列の配列単位4画素のうち2画素に配置されるGの色を別色のG1、G2とみなして4色の原画像データに対し色別に前記画像変換を行い、
前記画像処理装置はさらに、
前記画像変換で得られたG1色,G2色の画像変換データをもとにして低域G色と高域G色の各画像データとを生成する帯域分割手段と、
該高域G色をもとにしてR色、該低域G色、B色の各画像変換データの高域補償を行う高域補償手段と、
を備えることを特徴とする請求項2に記載の画像処理装置。
The color of the color filter is a Bayer array,
The image conversion means regards the G color arranged in two of the four pixels in the Bayer arrangement unit as G1 and G2 of different colors, and performs the image conversion for each of the four colors of the original image data,
The image processing apparatus further includes:
Band division means for generating low-frequency G color and high-frequency G color image data based on the G1 color and G2 color image conversion data obtained by the image conversion,
High-frequency compensation means for performing high-frequency compensation of each image conversion data of the R color, the low-frequency G color, and the B color based on the high-frequency G color,
The image processing apparatus according to claim 2, further comprising:
前記色フィルタの色はベイア配列であって、
前記画像変換手段は、
RとBの2色については前記画像変換により処理し、
Gの色については、ベイア配列4要素のうち2画素に配置されるGの色を別色のG1、G2とみなして4色の原画像データに対し水平または垂直いずれか一方の方向に画像変換し、該画像変換されたG1、G2データをマージしたデータに対して、もうひとつの方向にリサイズのみを行うことにより処理する、
ことを特徴とする請求項2に記載の画像処理装置。
The color of the color filter is a Bayer array,
The image conversion means includes
The two colors R and B are processed by the image conversion,
Regarding the G color, the G color arranged in 2 pixels of the four elements of the Bayer array is regarded as different colors G1 and G2, and the image is converted in either the horizontal or vertical direction with respect to the original image data of the four colors. Then, the data obtained by merging the image-converted G1 and G2 data is processed by performing only resizing in the other direction.
The image processing apparatus according to claim 2.
色フィルタを備えた撮像素子により撮像された原画像データに対し行う色補間とリサイズの処理の方法であって、
該色補間と該リサイズの各データ変換を画像変換として一括して行い
該画像変換は、
該色補間のためのフィルタである色補間フィルタと該リサイズのためのフィルタであるリサイズフィルタとを統合した画像変換フィルタの処理ステップと、
該色補間のための第1アップサンプリングステップと、
該リサイズのための第2アップサンプリングステップとダウンサンプリングステップと、
を含み、
該第1アップサンプリングステップと該第2アップサンプリングのステップと
を該画像変換フィルタの処理ステップの後に行い、
該ダウンサンプリングステップ
を該画像変換フィルタの処理ステップの前に行う
ことを特徴とする画像変換の方法。
A method of color interpolation and resizing processing performed on original image data captured by an image sensor having a color filter,
The color interpolation and the resizing data conversion are collectively performed as an image conversion.
An image conversion filter processing step in which a color interpolation filter that is a filter for color interpolation and a resize filter that is a filter for resizing are integrated;
A first upsampling step for the color interpolation;
A second upsampling step and a downsampling step for the resizing;
Including
Performing the first upsampling step and the second upsampling step after the image conversion filter processing step;
The image conversion method, wherein the downsampling step is performed before the processing step of the image conversion filter.
色フィルタを備えた撮像素子により撮像された原画像データに対し行う色補間とリサイズの処理をコンピュータに実行させるプログラムであって、
該色補間と該リサイズの各データ変換を画像変換として一括して行い、
該画像変換は、該色補間のためのフィルタである色補間フィルタと該リサイズのためのフィルタであるリサイズフィルタとを統合した画像変換フィルタの処理と、
該色補間のための第1アップサンプリングの処理と、
該リサイズのための第2アップサンプリング処理とダウンサンプリング処理と、
を含み、
該第1アップサンプリングの処理と該第2アップサンプリングの処理と
を該画像変換フィルタ処理の後に行い、
該ダウンサンプリング処理
を該画像変換フィルタ処理の前に行う
ことを特徴とする画像変換のプログラム。
A program for causing a computer to perform color interpolation and resizing processing performed on original image data captured by an image sensor having a color filter,
The color interpolation and the resizing data conversion are collectively performed as image conversion,
The image conversion includes processing of an image conversion filter that integrates a color interpolation filter that is a filter for color interpolation and a resize filter that is a filter for resizing;
A first upsampling process for the color interpolation;
A second upsampling process and a downsampling process for the resizing;
Including
The first upsampling process and the second upsampling process are performed after the image conversion filter process,
An image conversion program, wherein the downsampling process is performed before the image conversion filter process.
JP2003286787A 2003-08-05 2003-08-05 Method and apparatus for image processing, and program Pending JP2005057529A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003286787A JP2005057529A (en) 2003-08-05 2003-08-05 Method and apparatus for image processing, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003286787A JP2005057529A (en) 2003-08-05 2003-08-05 Method and apparatus for image processing, and program

Publications (1)

Publication Number Publication Date
JP2005057529A true JP2005057529A (en) 2005-03-03

Family

ID=34365987

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003286787A Pending JP2005057529A (en) 2003-08-05 2003-08-05 Method and apparatus for image processing, and program

Country Status (1)

Country Link
JP (1) JP2005057529A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006187004A (en) * 2004-12-24 2006-07-13 Sony Taiwan Ltd Image signal processing apparatus
JP2010257257A (en) * 2009-04-24 2010-11-11 Nikon Corp Apparatus and method for processing hereditary, and program
JP2010262407A (en) * 2009-04-30 2010-11-18 Nikon Corp Genetic processor, genetic processing method, and program
JP5633518B2 (en) * 2009-11-27 2014-12-03 株式会社ニコン Data processing device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006187004A (en) * 2004-12-24 2006-07-13 Sony Taiwan Ltd Image signal processing apparatus
JP2010257257A (en) * 2009-04-24 2010-11-11 Nikon Corp Apparatus and method for processing hereditary, and program
JP2010262407A (en) * 2009-04-30 2010-11-18 Nikon Corp Genetic processor, genetic processing method, and program
JP5633518B2 (en) * 2009-11-27 2014-12-03 株式会社ニコン Data processing device

Similar Documents

Publication Publication Date Title
JP4657564B2 (en) Electronic still camera and image processing method
KR100780932B1 (en) Color interpolation method and device
US20040061902A1 (en) Color data image acquistion and processing
JP2003143615A (en) Apparatus and method for processing output data from image sensor
JP4317619B2 (en) Image processing device
JP4361991B2 (en) Image processing device
KR101816661B1 (en) Ringing suppression in video scalers
US7751642B1 (en) Methods and devices for image processing, image capturing and image downscaling
Chen et al. VLSI implementation of an adaptive edge-enhanced color interpolation processor for real-time video applications
JPH01269183A (en) Spatial filter picture processor
JP2005057529A (en) Method and apparatus for image processing, and program
JP5643576B2 (en) Image processing apparatus and control method thereof
JP5246045B2 (en) Moving image processing apparatus and video camera apparatus using the same
JPH02300977A (en) Digital image conversion
KR20070119482A (en) Image resampling method
JP2001086366A (en) Digital filter and processing method thereof
JP2017215941A (en) Image processor and control method thereof
JP2006303693A (en) Electronic camera provided with function of generating reduced picture
KR100665485B1 (en) Digital signal processor and digital signal processing method
US20040264809A1 (en) Image processing apparatus, image processing method and image processing system
CN118233764A (en) Image demosaicing method and device
JP2010206301A (en) Image processing apparatus and imaging apparatus
TW202335489A (en) Method and image processor unit for processing raw image data
Rubini et al. Design of Low Cost Image Scaling Processor Using Single Line Buffer Based on VLSI Architecture
Yalıman High performance image demosaicing hardware designs