JP2010113554A - Image processing apparatus and image processing method - Google Patents

Image processing apparatus and image processing method Download PDF

Info

Publication number
JP2010113554A
JP2010113554A JP2008285994A JP2008285994A JP2010113554A JP 2010113554 A JP2010113554 A JP 2010113554A JP 2008285994 A JP2008285994 A JP 2008285994A JP 2008285994 A JP2008285994 A JP 2008285994A JP 2010113554 A JP2010113554 A JP 2010113554A
Authority
JP
Japan
Prior art keywords
interpolation
component
image
value
input
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
JP2008285994A
Other languages
Japanese (ja)
Inventor
Yuta Seki
雄太 関
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.)
Sharp Corp
Original Assignee
Sharp Corp
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 Sharp Corp filed Critical Sharp Corp
Priority to JP2008285994A priority Critical patent/JP2010113554A/en
Publication of JP2010113554A publication Critical patent/JP2010113554A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processing apparatus and an image processing method, having a high processing speed and capable of reducing a circuit area and cost. <P>SOLUTION: When calculating an interpolation value P of a luminance component, an interpolation processing part 223 calculates intermediate values PA to PD based on sixteen image data P<SB>11</SB>to P<SB>44</SB>and a weight coefficient received from a coefficient part 224. An output data control part 225 adds the intermediate values PA to PD to calculate an interpolation value P. When calculating an interpolation value of a color difference component, the interpolation processing part 223 respectively calculates the intermediate values PA to PD as Cb and Cr components of a first interpolation point and Cb and Cr components of a second interpolation point based on four Cb data PA<SB>22</SB>to PA<SB>33</SB>and four Cr data PB<SB>22</SB>to PB<SB>33</SB>of the first interpolation point, four Cb data PC<SB>22</SB>to PC<SB>33</SB>and four Cr data PD<SB>22</SB>to PD<SB>33</SB>of the second interpolation point, and the weight coefficient received from the coefficient part 224. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、画像を変形する処理を行う画像処理装置および画像処理方法に関する。   The present invention relates to an image processing apparatus and an image processing method for performing processing for deforming an image.

画像処理装置は、画像を拡大、縮小あるいは回転など変形して表示するとき、画像を表す画像データに対して幾何変換を行って表示する。幾何変換は、画像データを所定の座標変換式によって別の座標系に射影する変換である。画像データがベクトル型データであるときは、座標変換処理を行うだけで幾何変換を行うことができるが、画像データがラスタ型データであるときは、座標変換処理の他に、画像再配列処理および画像データの内挿処理を行う必要がある。   When the image processing apparatus displays the image by enlarging, reducing, rotating, or transforming it, the image processing apparatus performs geometric conversion on the image data representing the image and displays it. Geometric transformation is transformation for projecting image data to another coordinate system using a predetermined coordinate transformation formula. When the image data is vector type data, geometric transformation can be performed only by performing coordinate transformation processing. However, when the image data is raster type data, in addition to coordinate transformation processing, image rearrangement processing and It is necessary to perform image data interpolation processing.

座標変換処理は、入力画像の画像データを出力画像の座標系での画像データに変換する処理、または出力画像の画像データを入力画像の座標系での画像データに変換する処理である。画像再配列処理は、座標変換処理後の画像データが示す画像の各画素を、出力画像の座標系で定められる格子状の画素位置(以下「格子点」という)に対応するように、入力画像の各画素を並べ直す処理である。   The coordinate conversion process is a process of converting the image data of the input image into image data in the coordinate system of the output image, or a process of converting the image data of the output image into image data in the coordinate system of the input image. In the image rearrangement process, the input image is set so that each pixel of the image indicated by the image data after the coordinate conversion process corresponds to a grid-like pixel position (hereinafter referred to as a “grid point”) determined by the coordinate system of the output image. This is a process for rearranging the pixels.

画像データの内挿処理は、座標変換処理によって変換された画像データが示す出力画像の各画素の位置が格子点の位置に一致しない場合、格子点に配置する画素の値を内挿補間によって算出する処理である。内挿補間の方法には、いくつかの方法があり、処理の単純さ、精度、あるいは歪みの発生などの影響を考慮して、目的に応じた方法を選択する必要がある。   In the image data interpolation process, if the position of each pixel of the output image indicated by the image data converted by the coordinate conversion process does not match the position of the grid point, the value of the pixel placed at the grid point is calculated by interpolation. It is processing to do. There are several methods of interpolation, and it is necessary to select a method according to the purpose in consideration of influences such as simplicity of processing, accuracy, and occurrence of distortion.

画像処理装置の多様化に伴い、多くの画像処理装置は、画像の拡大表示あるいは縮小表示を行う機能を有している。画像処理装置として、たとえばディジタルスチルカメラでは、ディジタルズーム機能によって、ディジタル信号処理によるカラー画像の拡大縮小を行うことができる。画像の拡大縮小は、内挿する点(以下「補間点」という)の画素の値(以下「補間値」という)をどのような方法で算出するかによって、画質および処理速度に大きな影響を与える。   Along with diversification of image processing apparatuses, many image processing apparatuses have a function of performing enlarged display or reduced display of an image. As an image processing apparatus, for example, a digital still camera can perform enlargement / reduction of a color image by digital signal processing by a digital zoom function. Image scaling greatly affects image quality and processing speed depending on the method used to calculate the pixel value (hereinafter referred to as “interpolation value”) of the point to be interpolated (hereinafter referred to as “interpolation point”). .

内挿補間の方法には、たとえば最近隣内挿法(以下「ニアレストネイバー法」ともいう)、共1次内挿法(以下「バイリニア法」ともいう)および3次たたみ込み内挿法(以下「バイキュービック法」ともいう)がある。ニアレストネイバー法およびバイリニア法は、バイキュービック法よりも、演算処理が簡易で処理速度は速いが、補間精度が低く、画質の面で劣る。バイキュービック法は、ニアレストネイバー法およびバイリニア法よりも、補間精度が高く、画質の面で優れているが、演算処理が複雑であり、処理に時間がかかる。したがって要求される仕様が処理速度を重視するか画質を重視するかによって、補間方法を選択する必要がある。   Examples of the interpolation method include nearest neighbor interpolation (hereinafter also referred to as “nearest neighbor method”), bilinear interpolation (hereinafter also referred to as “bilinear method”), and cubic convolution interpolation ( (Hereinafter also referred to as “bicubic method”). The nearest neighbor method and the bilinear method are simpler and faster than the bicubic method, but the interpolation accuracy is low and the image quality is inferior. The bicubic method has higher interpolation accuracy and better image quality than the nearest neighbor method and the bilinear method, but the calculation processing is complicated and takes time. Therefore, it is necessary to select an interpolation method depending on whether the required specification emphasizes processing speed or image quality.

図14は、従来の技術による画像処理装置100の構成を示すブロック図である。画像処理装置100は、2つの補間方法を用いて画像の拡大縮小を行う装置であり、入力画像メモリ101、補間演算部102および出力画像メモリ103を含んで構成される。入力画像メモリ101は、入力される画像を表す画像データを記憶するメモリであり、画像データを、色成分の種類たとえば輝度成分および色差成分などの種類ごとに記憶する。補間演算部102は、第1の補間処理部102aおよび第2の補間処理部102bを含む。出力画像メモリ103は、補間演算部102で演算された補間値を色成分の種類ごとに記憶するメモリである。   FIG. 14 is a block diagram illustrating a configuration of an image processing apparatus 100 according to a conventional technique. The image processing apparatus 100 is an apparatus that enlarges or reduces an image using two interpolation methods, and includes an input image memory 101, an interpolation calculation unit 102, and an output image memory 103. The input image memory 101 is a memory that stores image data representing an input image, and stores image data for each type of color component, such as a luminance component and a color difference component. The interpolation calculation unit 102 includes a first interpolation processing unit 102a and a second interpolation processing unit 102b. The output image memory 103 is a memory that stores the interpolation value calculated by the interpolation calculation unit 102 for each type of color component.

第1の補間処理部102aおよび第2の補間処理部102bは、それぞれ異なる補間方法によって補間値を算出する。たとえば、第1の補間処理部102aは、バイキュービック法によって第1成分である輝度成分の補間値を算出し、第2の補間処理部102bは、バイリニア法によって第2成分および第3成分である色差成分の補間値を算出する。図14に示した補間演算部102は、2つの補間処理部を含むが、色成分の種類が3つ以上ある場合は、それぞれの成分に対応する補間処理部を設けることによって、それぞれの成分の補間値を並行して算出することができる。   The first interpolation processing unit 102a and the second interpolation processing unit 102b calculate interpolation values by different interpolation methods. For example, the first interpolation processing unit 102a calculates the interpolated value of the luminance component that is the first component by the bicubic method, and the second interpolation processing unit 102b has the second component and the third component by the bilinear method. An interpolated value of the color difference component is calculated. The interpolation calculation unit 102 illustrated in FIG. 14 includes two interpolation processing units. When there are three or more types of color components, by providing an interpolation processing unit corresponding to each component, Interpolated values can be calculated in parallel.

たとえば特許文献1に記載の画像処理装置は、投影法などの高品位の画素密度変換を行う第1の画素密度変換部と、単純間引きなどの高速な画素密度変換を行う第2の画素密度変換部と含む。第1の画素密度変換部は、YUV画像データから得られるY信号つまり輝度信号に対して画素密度変換を行う。第2の画素密度変換部は、2つの画素密度変換部を含み、YUV画像データから得られるU信号およびV信号つまり2つの色差信号に対して画素密度変換を行う。   For example, an image processing apparatus described in Patent Literature 1 includes a first pixel density conversion unit that performs high-quality pixel density conversion such as a projection method, and a second pixel density conversion that performs high-speed pixel density conversion such as simple thinning. Including parts. The first pixel density conversion unit performs pixel density conversion on a Y signal obtained from YUV image data, that is, a luminance signal. The second pixel density conversion unit includes two pixel density conversion units, and performs pixel density conversion on the U signal and the V signal obtained from the YUV image data, that is, two color difference signals.

第1の画素密度変換部は、図14に示した補間処理部102aつまりバイキュービック法によって補間値を算出する補間処理部に対応し、第2の画素密度変換部は、図14に示した補間処理部102bつまりバイリニア法によって補間値を算出する補間処理部に対応する。   The first pixel density conversion unit corresponds to the interpolation processing unit 102a shown in FIG. 14, that is, the interpolation processing unit that calculates the interpolation value by the bicubic method, and the second pixel density conversion unit is the interpolation shown in FIG. This corresponds to the processing unit 102b, that is, an interpolation processing unit that calculates an interpolation value by the bilinear method.

特許文献2に記載の画像処理装置は、輝度信号を4×4画素以上の演算領域の内挿法たとえば立体たたみ込み内挿法、すなわち3次たたみ込み内挿法を用いて信号処理を行う輝度信号処理部と、色差信号を立体たたみ込み内挿法とは異なる2×2画素以内の演算領域の内挿法である他の内挿法を用いて信号処理を行う色差信号処理部とを含み、画像信号を輝度信号と色差信号とに分けて異なる補間方法を用いて信号処理を行う。信号処理は、内挿法に対応する補間プログラムを実行することによって処理される。   The image processing apparatus described in Patent Document 2 performs luminance processing on a luminance signal by performing signal processing using an interpolation method of a calculation area of 4 × 4 pixels or more, for example, a three-dimensional convolution interpolation method, that is, a third-order convolution interpolation method. A signal processing unit, and a color difference signal processing unit that performs signal processing using another interpolation method that is an interpolation method of a calculation area within 2 × 2 pixels that is different from the three-dimensional convolution interpolation of the color difference signal The image signal is divided into a luminance signal and a color difference signal, and signal processing is performed using different interpolation methods. The signal processing is processed by executing an interpolation program corresponding to the interpolation method.

他の内挿法は、たとえば共1次内挿法、最近隣内挿法、単純間引きあるいは単純補間である。それぞれの内挿法に対応した補間プログラムをROM(Read Only Memory)に記憶しておき、目的の内挿法に対応する補間プログラムを選択して実行することも可能である。色差信号に演算領域の狭い補間方法を用いているので、位置が離れているために生じる色の違いを低く抑えると共に、色ずれを防止することができる。   Other interpolation methods are, for example, bilinear interpolation, nearest neighbor interpolation, simple decimation or simple interpolation. It is also possible to store an interpolation program corresponding to each interpolation method in a ROM (Read Only Memory) and select and execute the interpolation program corresponding to the target interpolation method. Since the interpolation method with a narrow calculation area is used for the color difference signal, it is possible to suppress the color difference caused by the distant position and to prevent color misregistration.

特開平9−298660号公報Japanese Patent Laid-Open No. 9-298660 特開2001−14454号公報Japanese Patent Laid-Open No. 2001-14454

特許文献1に記載の画像処理装置では、人の目が色差信号よりも輝度信号のほうに敏感であることを利用しており、演算量を減らして、画質の劣化の少ない画像に変換することができる。特許文献1の画像処理装置は、高速な処理は可能であるが、輝度信号および2つの色差信号ごとに画素密度変換を行う回路が必要となるので、回路面積が増大するという問題がある。   The image processing apparatus described in Patent Document 1 utilizes the fact that human eyes are more sensitive to luminance signals than color difference signals, and reduces the amount of computation to convert the images into those with less image quality degradation. Can do. The image processing apparatus disclosed in Patent Document 1 can perform high-speed processing, but requires a circuit that performs pixel density conversion for each of the luminance signal and the two color difference signals, which increases the circuit area.

特許文献2に記載の画像処理装置では、補間プログラムを実行することによって所定の補間方法による信号処理が行われるので、ハードウェアによる信号処理に比べて時間がかかり、実時間処理には適していない。実時間処理が要求される装置に適用するためには、内挿法による補間処理をハードウェアによって実現する必要がある。しかし、前記補間処理をハードウェアによって実現した場合、特許文献1の画像処理装置と同様に、回路面積が増大するという問題がある。   In the image processing apparatus described in Patent Document 2, since signal processing is performed by a predetermined interpolation method by executing an interpolation program, it takes more time than signal processing by hardware and is not suitable for real-time processing. . In order to apply to an apparatus that requires real-time processing, it is necessary to implement interpolation processing by interpolation using hardware. However, when the interpolation processing is realized by hardware, there is a problem that the circuit area increases as in the image processing apparatus of Patent Document 1.

本発明の目的は、処理速度が早く、かつ回路面積およびコストの低減化を図ることができる画像処理装置および画像処理方法を提供することである。   An object of the present invention is to provide an image processing apparatus and an image processing method capable of achieving high processing speed and reducing circuit area and cost.

本発明は、相互に異なる第1〜第3成分からなる画素によって構成される画像を表す画像データを入力する入力手段と、
画像のサイズを変更する倍率を指示する指示手段と、
3次たたみ込み内挿法または共1次内挿法によって補間値を算出する補間値算出手段と、
補間値算出手段を用いて、入力手段によって入力される画像データを、指示手段によって指示される倍率で変更したサイズの画像を表す画像データに変換する変換手段と、
変換手段によって変換される画像データを出力する出力手段とを含み、
変換手段は、変換前の座標系において変換後の画像データが示す画像の画素に対応する位置である補間点での第1〜第3成分の補間値を補間値算出手段によって算出させるとき、
第1成分については、補間点ごとにそれぞれ、入力手段によって入力される画像データが示す入力画像の画素のうち、補間点を囲む4個の画素およびこの4個の画素を囲む12個の画素を含む16個の画素の第1成分に基づいて、3次たたみ込み内挿法によって第1成分の補間値を算出させ、
第2成分および第3成分については、2つの補間点ごとに同時に、2つの補間点のうちの第1の補間点での第2成分の補間値を、前記入力画像の画素のうちの第1の補間点を囲む4個の画素の第2成分に基づいて、第1の補間点での第3成分の補間値を第1の補間点を囲む前記4個の画素の第3成分に基づいて、2つの補間点のうちの第1の補間点とは異なる第2の補間点での第2成分の補間値を、前記入力画像の画素のうちの第2の補間点を囲む4個の画素の第2成分に基づいて、および第2の補間点での第3成分の補間値を第2の補間点を囲む前記4個の画素の第3成分に基づいて、共1次内挿法によって算出させ、
補間値算出手段によって算出される第1成分の補間値を第1成分、補間値算出手段によって算出される第2成分の補間値を第2成分、および補間値算出手段によって算出される第3成分の補間値を第3成分とする画素によって構成される画像を表す画像データを変換後の画像データとすることを特徴とする画像処理装置である。
The present invention comprises an input means for inputting image data representing an image constituted by pixels composed of mutually different first to third components;
An instruction means for instructing a magnification for changing the size of the image;
Interpolation value calculating means for calculating an interpolation value by a cubic convolution interpolation method or a bilinear interpolation method;
Conversion means for converting the image data input by the input means into image data representing an image having a size changed by the magnification indicated by the instruction means, using the interpolation value calculation means;
Output means for outputting image data converted by the conversion means,
When the conversion means causes the interpolation value calculation means to calculate the interpolation values of the first to third components at the interpolation points that are positions corresponding to the pixels of the image indicated by the image data after conversion in the coordinate system before conversion,
For the first component, for each interpolation point, among the pixels of the input image indicated by the image data input by the input means, four pixels surrounding the interpolation point and twelve pixels surrounding the four pixels are included. Based on the first component of the 16 pixels including, the interpolation value of the first component is calculated by the third-order convolution interpolation method,
For the second component and the third component, the interpolation value of the second component at the first interpolation point of the two interpolation points is simultaneously calculated for each of the two interpolation points, and the first of the pixels of the input image. Based on the second component of the four pixels surrounding the interpolation point, the interpolation value of the third component at the first interpolation point is based on the third component of the four pixels surrounding the first interpolation point. Interpolation values of the second component at the second interpolation point different from the first interpolation point of the two interpolation points are the four pixels surrounding the second interpolation point of the pixels of the input image. And the interpolated value of the third component at the second interpolation point based on the third component of the four pixels surrounding the second interpolation point by bilinear interpolation Let me calculate
The interpolation value of the first component calculated by the interpolation value calculation means is the first component, the interpolation value of the second component calculated by the interpolation value calculation means is the second component, and the third component is calculated by the interpolation value calculation means. The image processing apparatus is characterized in that image data representing an image constituted by pixels having the third interpolation value as the third component is converted image data.

また本発明は、相互に異なる第1〜第3成分からなる画素によって構成される画像を表す画像データを入力する入力ステップと、
画像のサイズを変更する倍率を指示する指示ステップと、
3次たたみ込み内挿法または共1次内挿法によって補間値を算出する補間値算出部によって、入力ステップで入力された画像データを、指示ステップで指示された倍率で変更したサイズの画像を表す画像データに変換する変換ステップであって、
変換前の座標系において変換後の画像データが示す画像の画素に対応する位置である補間点での第1〜第3成分の補間値を補間値算出部によって算出するとき、
第1成分については、補間点ごとにそれぞれ、入力ステップで入力された画像データが示す入力画像の画素のうち、補間点を囲む4個の画素およびこの4個の画素を囲む12個の画素を含む16個の画素の第1成分に基づいて、3次たたみ込み内挿法によって第1成分の補間値を算出し、
第2成分および第3成分については、2つの補間点ごとに同時に、2つの補間点のうちの第1の補間点での第2成分の補間値を、前記入力画像の画素のうちの第1の補間点を囲む4個の画素の第2成分に基づいて、第1の補間点での第3成分の補間値を第1の補間点を囲む前記4個の画素の第3成分に基づいて、2つの補間点のうちの第1の補間点とは異なる第2の補間点での第2成分の補間値を、前記入力画像の画素のうちの第2の補間点を囲む4個の画素の第2成分に基づいて、および第2の補間点での第3成分の補間値を第2の補間点を囲む前記4個の画素の第3成分に基づいて、共1次内挿法によって算出し、
補間値算出部によって算出された第1成分の補間値を第1成分、補間値算出部によって算出された第2成分の補間値を第2成分、および補間値算出部によって算出された第3成分の補間値を第3成分とする画素によって構成される画像を表す画像データを変換後の画像データとする変換ステップと、
変換ステップで変換された画像データを出力する出力ステップとを含むことを特徴とする画像処理方法である。
According to another aspect of the present invention, there is provided an input step for inputting image data representing an image constituted by pixels including first to third components different from each other;
An instruction step for instructing a magnification for changing the size of the image;
An image having a size obtained by changing the image data input in the input step by the magnification specified in the instruction step by the interpolation value calculation unit that calculates the interpolation value by the cubic convolution interpolation method or the bilinear interpolation method. A conversion step for converting into image data representing,
When the interpolation value calculation unit calculates the interpolation values of the first to third components at the interpolation point that is the position corresponding to the pixel of the image indicated by the image data after conversion in the coordinate system before conversion,
For the first component, for each interpolation point, among the pixels of the input image indicated by the image data input in the input step, four pixels surrounding the interpolation point and twelve pixels surrounding the four pixels are included. Calculating an interpolated value of the first component by a third-order convolution method based on the first component of the 16 pixels included;
For the second component and the third component, the interpolation value of the second component at the first interpolation point of the two interpolation points is simultaneously calculated for each of the two interpolation points, and the first of the pixels of the input image. Based on the second component of the four pixels surrounding the interpolation point, the interpolation value of the third component at the first interpolation point is based on the third component of the four pixels surrounding the first interpolation point. Interpolation values of the second component at the second interpolation point different from the first interpolation point of the two interpolation points are the four pixels surrounding the second interpolation point of the pixels of the input image. And the interpolated value of the third component at the second interpolation point based on the third component of the four pixels surrounding the second interpolation point by bilinear interpolation Calculate
The interpolation value of the first component calculated by the interpolation value calculator is the first component, the interpolation value of the second component calculated by the interpolation value calculator is the second component, and the third component calculated by the interpolation value calculator A conversion step of converting image data representing an image constituted by pixels having the interpolation value of the third component into image data after conversion;
And an output step for outputting the image data converted in the conversion step.

本発明によれば、入力手段によって、相互に異なる第1〜第3成分からなる画素によって構成される画像を表す画像データが入力され、指示手段によって、画像のサイズを変更する倍率が指示される。補間値算出手段によって、3次たたみ込み内挿法または共1次内挿法によって補間値が算出される。変換手段によって、補間値算出手段を用いて、入力手段によって入力される画像データが、指示手段によって指示される倍率で変更したサイズの画像を表す画像データに変換され、出力手段によって、変換手段によって変換される画像データが出力される。   According to the present invention, image data representing an image composed of mutually different first to third components is input by the input means, and the magnification for changing the size of the image is instructed by the instruction means. . The interpolation value calculation means calculates the interpolation value by the cubic convolution interpolation method or the bilinear interpolation method. The conversion means converts the image data input by the input means using the interpolation value calculation means into image data representing an image having a size changed at the magnification indicated by the instruction means, and the output means converts the image data by the conversion means. The converted image data is output.

さらに、変換手段によって、変換前の座標系において変換後の画像データが示す画像の画素に対応する位置である補間点での第1〜第3成分の補間値が補間値算出手段によって算出されるとき、第1成分については、補間点ごとにそれぞれ、入力手段によって入力される画像データが示す入力画像の画素のうち、補間点を囲む4個の画素およびこの4個の画素を囲む12個の画素を含む16個の画素の第1成分に基づいて、3次たたみ込み内挿法によって第1成分の補間値が算出される。   Further, the interpolation value calculation means calculates the interpolation values of the first to third components at the interpolation points at the positions corresponding to the pixels of the image indicated by the converted image data in the coordinate system before the conversion. For the first component, for each interpolation point, among the pixels of the input image indicated by the image data input by the input means, four pixels surrounding the interpolation point and 12 pixels surrounding the four pixels are included. Based on the first component of the 16 pixels including the pixel, the interpolation value of the first component is calculated by the third-order convolution interpolation method.

第2成分および第3成分については、2つの補間点ごとに同時に、2つの補間点のうちの第1の補間点での第2成分の補間値が、前記入力画像の画素のうちの第1の補間点を囲む4個の画素の第2成分に基づいて、第1の補間点での第3成分の補間値が第1の補間点を囲む前記4個の画素の第3成分に基づいて、2つの補間点のうちの第1の補間点とは異なる第2の補間点での第2成分の補間値が、前記入力画像の画素のうちの第2の補間点を囲む4個の画素の第2成分に基づいて、および第2の補間点での第3成分の補間値が第2の補間点を囲む前記4個の画素の第3成分に基づいて、共1次内挿法によって算出される。   As for the second component and the third component, the interpolation value of the second component at the first interpolation point of the two interpolation points is the first of the pixels of the input image at the same time every two interpolation points. Based on the second component of the four pixels surrounding the interpolation point, the third component interpolation value at the first interpolation point is based on the third component of the four pixels surrounding the first interpolation point. Four pixels whose second component interpolation value at a second interpolation point different from the first interpolation point of the two interpolation points surrounds the second interpolation point of the pixels of the input image. And the interpolated value of the third component at the second interpolation point based on the third component of the four pixels surrounding the second interpolation point by bilinear interpolation Calculated.

そして、補間値算出手段によって算出される第1成分の補間値を第1成分、補間値算出手段によって算出される第2成分の補間値を第2成分、および補間値算出手段によって算出される第3成分の補間値を第3成分とする画素によって構成される画像を表す画像データが変換後の画像データとされる。   Then, the interpolation value of the first component calculated by the interpolation value calculation means is the first component, the interpolation value of the second component calculated by the interpolation value calculation means is the second component, and the first value calculated by the interpolation value calculation means. Image data representing an image composed of pixels having the third component interpolation value as the third component is the converted image data.

したがって、3次たたみ込み内挿法または共1次内挿法によって補間値を算出する補間値算出手段として、たとえばハードウェアによって構成される手段を有しているので、補間値を算出するプログラムを実行して逐次計算するよりも短時間で3次たたみ込み内挿法による補間値を算出することができ、その補間値算出手段を用いて、共1次内挿法によって算出される補間値を算出することができるので、共1次内挿法によって補間値を算出するためのハードウェアが不要であり、回路面積およびコストの低減化を図ることができる。すなわち、処理速度が早く、かつ回路面積およびコストの少ない回路で画像の補間を行うことができる。   Therefore, since the interpolation value calculation means for calculating the interpolation value by the cubic convolution interpolation method or the bilinear interpolation method has means configured by hardware, for example, a program for calculating the interpolation value is provided. It is possible to calculate the interpolation value by the third-order convolution interpolation method in a shorter time than the execution and sequential calculation, and the interpolation value calculation means can be used to calculate the interpolation value calculated by the bilinear interpolation method. Since it can be calculated, hardware for calculating an interpolation value by bilinear interpolation is not required, and the circuit area and cost can be reduced. That is, the image can be interpolated with a circuit having a high processing speed and a small circuit area and cost.

また本発明によれば、入力ステップでは、相互に異なる第1〜第3成分からなる画素によって構成される画像を表す画像データを入力し、指示ステップでは、画像のサイズを変更する倍率を指示する。   According to the invention, in the input step, image data representing an image composed of mutually different first to third components is input, and in the instruction step, a magnification for changing the size of the image is instructed. .

変換ステップでは、3次たたみ込み内挿法または共1次内挿法よって補間値を算出する補間値算出部によって、入力ステップで入力された画像データを、指示ステップで指示された倍率で変更したサイズの画像を表す画像データに変換するにあたって、変換前の座標系において変換後の画像データが示す画像の画素に対応する位置である補間点での第1〜第3成分の補間値を補間値算出部によって算出するとき、第1成分については、補間点ごとにそれぞれ、入力ステップで入力された画像データが示す画像の画素のうち、補間点を囲む4個の画素およびこの4個の画素を囲む12個の画素を含む16個の画素の第1成分に基づいて、3次たたみ込み内挿法によって第1成分の補間値を算出する。   In the conversion step, the image data input in the input step is changed by the magnification specified in the instruction step by the interpolation value calculation unit that calculates the interpolation value by the cubic convolution interpolation method or the bilinear interpolation method. When converting to image data representing a size image, the interpolation values of the first to third components at the interpolation point at the position corresponding to the pixel of the image indicated by the image data after conversion in the coordinate system before conversion are interpolated values When calculating by the calculation unit, for the first component, for each interpolation point, among the pixels of the image indicated by the image data input in the input step, four pixels surrounding the interpolation point and the four pixels are included. Based on the first component of the 16 pixels including the 12 surrounding pixels, the interpolated value of the first component is calculated by the cubic convolution interpolation method.

第2成分および第3成分については、2つの補間点ごとに同時に、2つの補間点のうちの第1の補間点での第2成分の補間値を、前記入力画像の画素のうちの第1の補間点を囲む4個の画素の第2成分に基づいて、第1の補間点での第3成分の補間値を第1の補間点を囲む前記4個の画素の第3成分に基づいて、2つの補間点のうちの第1の補間点とは異なる第2の補間点での第2成分の補間値を、前記入力画像の画素のうちの第2の補間点を囲む4個の画素の第2成分に基づいて、および第2の補間点での第3成分の補間値を第2の補間点を囲む前記4個の画素の第3成分に基づいて、共1次内挿法によって算出する。   For the second component and the third component, the interpolation value of the second component at the first interpolation point of the two interpolation points is simultaneously calculated for each of the two interpolation points, and the first of the pixels of the input image. Based on the second component of the four pixels surrounding the interpolation point, the interpolation value of the third component at the first interpolation point is based on the third component of the four pixels surrounding the first interpolation point. Interpolation values of the second component at the second interpolation point different from the first interpolation point of the two interpolation points are the four pixels surrounding the second interpolation point of the pixels of the input image. And the interpolated value of the third component at the second interpolation point based on the third component of the four pixels surrounding the second interpolation point by bilinear interpolation calculate.

そして、補間値算出部によって算出された第1成分の補間値を第1成分、補間値算出部によって算出された第2成分の補間値を第2成分、および補間値算出部によって算出された第3成分の補間値を第3成分とする画素によって構成される画像を表す画像データを変換後の画像データとする。さらに、出力ステップでは、変換ステップで変換された画像データを出力する。   Then, the interpolation value of the first component calculated by the interpolation value calculation unit is the first component, the interpolation value of the second component calculated by the interpolation value calculation unit is the second component, and the first value calculated by the interpolation value calculation unit is Image data representing an image composed of pixels having the third component interpolation value as the third component is defined as converted image data. Further, in the output step, the image data converted in the conversion step is output.

したがって、本発明に係る画像処理方法を適用すれば、3次たたみ込み内挿法または共1次内挿法によって補間値を算出する補間値算出部として、たとえばハードウェアによって構成される回路を用いるので、補間値を算出するプログラムを実行して逐次計算するよりも短時間で3次たたみ込み内挿法による補間値を算出することができ、その補間値算出部を用いて、共1次内挿法によって算出される補間値を算出することができるので、共1次内挿法によって補間値を算出するためのハードウェアが不要であり、回路面積およびコストの低減化を図ることができる。すなわち、処理速度が早く、かつ回路面積およびコストを少なくすることができる。   Therefore, when the image processing method according to the present invention is applied, a circuit configured by hardware, for example, is used as an interpolation value calculation unit that calculates an interpolation value by a cubic convolution interpolation method or a bilinear interpolation method. Therefore, it is possible to calculate the interpolated value by the third-order convolution interpolation method in a shorter time than executing the program for calculating the interpolated value and sequentially calculating, and using the interpolated value calculating unit, Since the interpolation value calculated by the interpolation method can be calculated, hardware for calculating the interpolation value by the bilinear interpolation method is unnecessary, and the circuit area and cost can be reduced. That is, the processing speed is high, and the circuit area and cost can be reduced.

図1は、本発明の実施の一形態である画像処理装置1の概略の構成を示すブロック図である。画像処理装置1は、画像を変形する処理たとえば拡大、縮小あるいは回転などの処理を行う装置であり、入力画像メモリ11、補間演算部12および出力画像メモリ13を含んで構成される。本発明に係る画像処理方法は、画像処理装置1で処理される。   FIG. 1 is a block diagram showing a schematic configuration of an image processing apparatus 1 according to an embodiment of the present invention. The image processing device 1 is a device that performs processing for transforming an image, such as enlargement, reduction, or rotation, and includes an input image memory 11, an interpolation calculation unit 12, and an output image memory 13. The image processing method according to the present invention is processed by the image processing apparatus 1.

入力画像メモリ11は、たとえばイメージセンサなどの入力手段である図示しない入力装置によって入力される画像を表す画像データを記憶するメモリである。入力画像メモリ11は、画像データを、画像データが示す画像を構成する各画素の成分の種類たとえば画像をYCbCr(Luma Chroma-blue Croma-red)方式で表した場合の輝度成分および色差成分などの種類ごとに記憶する。図1に示した画像データAがたとえば輝度成分を表すデータであり、画像データBがたとえば2つの色差成分のうちの1つの色差成分を表すデータである。   The input image memory 11 is a memory that stores image data representing an image input by an input device (not shown) that is an input unit such as an image sensor. The input image memory 11 is a component of each pixel constituting the image indicated by the image data, such as a luminance component and a color difference component when the image is represented by a YCbCr (Luma Chroma-blue Croma-red) method. Remember for each type. The image data A shown in FIG. 1 is data representing, for example, a luminance component, and the image data B is data representing, for example, one color difference component of two color difference components.

補間演算部12は、3次たたみ込み内挿法であるバイキュービック法、共1次内挿法であるバイリニア法およびニアレストネイバー法のうちのいずれかの補間方法を選択し、選択した補間方法を用いて補間値を算出することができる。補間演算部12は、これらの補間方法を用いることによって、指示手段である図示しない操作部によって指示される倍率で、入力画像を出力画像に変換する。   The interpolation calculation unit 12 selects any one of a bicubic method that is a cubic convolution interpolation method, a bilinear method that is a bilinear interpolation method, and a nearest neighbor method, and the selected interpolation method Can be used to calculate the interpolation value. By using these interpolation methods, the interpolation calculation unit 12 converts the input image into an output image at a magnification indicated by an operation unit (not shown) that is an instruction unit.

補間演算部12は、入力データ制御部121、補間処理部122、出力データ制御部123および入出力制御部124を含んで構成される。入力データ制御部121は、入出力制御部124から指示される画素で、かつその画素の成分のうち入出力制御部124から指示される成分を表す画素データを入力画像メモリ11から読み出し、読み出した画素データもしくは入出力制御部124から指示される値が「0」である成分のデータ、および入出力制御部124から指示される補間係数を、補間処理部122に入力する。補間係数は、補間値を算出すために必要な係数であり、バイキュービック法の補間係数、バイリニア法の補間係数およびニアレストネイバー法の補間係数がある。以下、補間係数のことを重み係数ともいう。   The interpolation calculation unit 12 includes an input data control unit 121, an interpolation processing unit 122, an output data control unit 123, and an input / output control unit 124. The input data control unit 121 reads out and reads out from the input image memory 11 pixel data representing a pixel instructed by the input / output control unit 124 and a component instructed from the input / output control unit 124 among the components of the pixel. The pixel data or the component data whose value instructed from the input / output control unit 124 is “0” and the interpolation coefficient instructed from the input / output control unit 124 are input to the interpolation processing unit 122. The interpolation coefficient is a coefficient necessary for calculating the interpolation value, and includes a bicubic interpolation coefficient, a bilinear interpolation coefficient, and a nearest neighbor interpolation coefficient. Hereinafter, the interpolation coefficient is also referred to as a weighting coefficient.

補間処理部122は、補間値を算出するための中間値を算出する論理回路であり、入力データ制御部121によって入力される入力データおよび重み係数に基づいて、中間値を算出し、算出した中間値を出力データ制御部123に入力する。出力データ制御部123は、補間処理部122から入力される中間値に対して、入出力制御部124から指示される画素の成分に対応する演算を行って補間値を算出し、算出した補間値を変換後の画像データとして出力画像メモリ13に書き込む。演算の必要がない場合は、補間処理部122から入力される中間値を補間値として扱い、その補間値を変換後の画像データとして出力画像メモリ13に書き込む。   The interpolation processing unit 122 is a logic circuit that calculates an intermediate value for calculating an interpolation value, calculates an intermediate value based on input data and a weighting factor input by the input data control unit 121, and calculates the calculated intermediate value. A value is input to the output data control unit 123. The output data control unit 123 calculates an interpolation value by performing an operation corresponding to the pixel component instructed from the input / output control unit 124 on the intermediate value input from the interpolation processing unit 122, and calculates the calculated interpolation value. Are written in the output image memory 13 as converted image data. When there is no need for calculation, the intermediate value input from the interpolation processing unit 122 is treated as an interpolation value, and the interpolation value is written in the output image memory 13 as converted image data.

入出力制御部124は、入力データ制御部121および出力データ制御部123を制御する。入力データ制御部121に対しては、入力画像メモリ11から読み出す画素データの画像および成分、値を「0」とする成分、ならびに重み係数を指示する。出力データ制御部123に対しては、補間値を算出する画素の成分を指示する。   The input / output control unit 124 controls the input data control unit 121 and the output data control unit 123. The input data control unit 121 is instructed with an image and a component of pixel data read from the input image memory 11, a component whose value is “0”, and a weighting coefficient. The output data control unit 123 is instructed with a pixel component for which an interpolation value is calculated.

出力画像メモリ13は、補間演算部12で演算される補間値つまり変換後の画像データを画像の成分ごとに記憶するメモリである。たとえば、画像データA’が輝度成分を表す画像データであり、画像データB’が2つの色差成分のうちの1つの色差成分を表す画像データである。出力画像メモリ13に記憶される画像データは、液晶ディスプレイあるいはプリンタなどの出力手段である図示しない出力装置に出力される。   The output image memory 13 is a memory that stores the interpolation value calculated by the interpolation calculation unit 12, that is, the converted image data, for each image component. For example, the image data A ′ is image data representing a luminance component, and the image data B ′ is image data representing one color difference component of two color difference components. Image data stored in the output image memory 13 is output to an output device (not shown) which is an output means such as a liquid crystal display or a printer.

入力画像メモリ11、入力データ制御部121、補間処理部122、出力データ制御部123および出力画像メモリ13は、補間値算出手段あるいは補間値算出部である。入出力制御部124は、変換手段である。   The input image memory 11, the input data control unit 121, the interpolation processing unit 122, the output data control unit 123, and the output image memory 13 are interpolation value calculation means or an interpolation value calculation unit. The input / output control unit 124 is a conversion unit.

図2は、入力画像メモリ11に記憶される画像データが示す画像を構成する各画素51の位置と補間点52の位置との関係を示す図である。各画素51は、格子状に配列され、各格子点に1つの画素51が配置される。XY座標軸における各格子点の位置は、X座標およびY座標ともに整数の値の位置である。   FIG. 2 is a diagram illustrating the relationship between the position of each pixel 51 and the position of the interpolation point 52 that form the image indicated by the image data stored in the input image memory 11. Each pixel 51 is arranged in a grid, and one pixel 51 is arranged at each grid point. The position of each lattice point on the XY coordinate axis is an integer value position for both the X coordinate and the Y coordinate.

補間点52の位置は、入力画像の画素を出力画像に変換したとき、出力画像の画素を入力画像の座標系で表した位置であり、座標(u,v)で表す。補間点52での補間値をP(u,v)とする。バイキュービック法を用いて補間値P(u,v)(以下単に「P」ともいう)を算出する場合は、領域53内にある16個の画素、つまり補間点52を囲む4個の画素およびこの4個の画素を囲む12個の画素を含む16個の画素に基づいて算出し、バイリニア法を用いて補間値Pを算出する場合は、領域54内にある4個の画素、つまり補間点52を囲む4個の画素に基づいて算出する。   The position of the interpolation point 52 is a position that represents the pixel of the output image in the coordinate system of the input image when the pixel of the input image is converted into the output image, and is represented by coordinates (u, v). The interpolation value at the interpolation point 52 is P (u, v). When the interpolation value P (u, v) (hereinafter also simply referred to as “P”) is calculated using the bicubic method, 16 pixels in the region 53, that is, four pixels surrounding the interpolation point 52, and When calculating based on 16 pixels including 12 pixels surrounding these 4 pixels and calculating the interpolation value P using the bilinear method, four pixels in the region 54, that is, interpolation points The calculation is performed based on the four pixels surrounding 52.

図3は、図2に示した領域53を拡大した図である。画像データP11,P12,P13,P14,P21,P22,P23,P24,P31,P32,P33,P34,P41,P42,P43,P44(以下「P11〜P44」ともいう)は、領域53内にある各画素の演算対象の成分を示す。バイキュービック法を用いる場合、補間値P(u,v)は、式(1)〜(3)から算出することができる。変数x〜xは、補間点から領域53内にある16個の画素までのX軸方向の距離であり、変数y〜yは、補間点から領域53内にある16個の画素までのY軸方向の距離である。重み係数f(x)〜f(x)およびf(y)〜f(y)は、式(3)の変数tに、式(2)によって求められる変数x〜xおよび変数y〜yを代入して求められる係数である。式(2),(3)における[]は、少数部分を切り捨てて整数部分をとるガウス記号である。 FIG. 3 is an enlarged view of the region 53 shown in FIG. Image data P 11, P 12, P 13 , P 14, P 21, P 22, P 23, P 24, P 31, P 32, P 33, P 34, P 41, P 42, P 43, P 44 ( (Hereinafter, also referred to as “P 11 to P 44 ”) indicates the calculation target components of each pixel in the region 53. When the bicubic method is used, the interpolation value P (u, v) can be calculated from the equations (1) to (3). Variables x 1 to x 4 are distances in the X-axis direction from the interpolation point to 16 pixels in the region 53, and variables y 1 to y 4 are 16 pixels in the region 53 from the interpolation point. Is the distance in the Y-axis direction. The weighting factors f (x 1 ) to f (x 4 ) and f (y 1 ) to f (y 4 ) are the variables t 1 to x 4 and the variables t 1 to x 4 and It is a coefficient obtained by substituting variables y 1 to y 4 . [] In Equations (2) and (3) is a Gaussian symbol that rounds off the decimal part and takes the integer part.

Figure 2010113554
Figure 2010113554

x1=1+(u-[u]),x2=(u-[u]),x3=1-(u-[u]),x4=2-(u-[u]),
y1=1+(v-[v]),y2=(v-[v]),y3=1-(v-[v]),y4=2-(v-[v]) …(2)
f(t)=sin(πt)/(πt) …(3)
x 1 = 1 + (u- [u]), x 2 = (u- [u]), x 3 = 1- (u- [u]), x 4 = 2- (u- [u]),
y 1 = 1 + (v- [v]), y 2 = (v- [v]), y 3 = 1- (v- [v]), y 4 = 2- (v- [v])… (2)
f (t) = sin (πt) / (πt) (3)

式(3)に含まれるsin関数をディジタル的に演算することができないので、補間演算部12は、式(4)に示す積和演算のみで表現した近似式を用いて演算する。定数aは実数であり、定数aの値を変化させることによって補間特性を制御することができる。画像処理装置1では、定数aの値は、たとえば「−1」である。   Since the sine function included in Expression (3) cannot be calculated digitally, the interpolation calculation unit 12 calculates using the approximate expression expressed only by the product-sum operation shown in Expression (4). The constant a is a real number, and the interpolation characteristic can be controlled by changing the value of the constant a. In the image processing apparatus 1, the value of the constant a is “−1”, for example.

Figure 2010113554
Figure 2010113554

図4は、図2に示した領域54を拡大した図である。図2では、領域54内の4個の画素の成分はP22,P23,P32,P33であるが、図4では、一般化してPij,Pij+1,Pi+1j,Pi+1j+1で表している。変数iおよびjは、正の整数である。バイリニア法を用いる場合、補間値Pは、補間点を囲む4個の画素と補間点との距離に応じた重み係数を用いて、式(5),(6)から算出することができる。バイリニア法は、バイキュービック法と比べて、補間精度は低いが演算量が少ないという利点がある。式(6)における[]は、ガウス記号である。
P={(i+1)-u}{(j+1)-v}Pij+{(i+1)-u}(v-j)Pij+1
+{(u-i){(j+1)-v}Pi+1j+(u-i)(v-j)Pi+1j+1 …(5)
i=[u],j=[v] …(6)
FIG. 4 is an enlarged view of the region 54 shown in FIG. In FIG. 2, the components of the four pixels in the region 54 are P 22 , P 23 , P 32 , and P 33 , but in FIG. 4, they are generalized as P ij , P ij + 1 , P i + 1j , and P i + 1j + 1 . ing. Variables i and j are positive integers. When the bilinear method is used, the interpolation value P can be calculated from equations (5) and (6) using a weighting factor corresponding to the distance between the four pixels surrounding the interpolation point and the interpolation point. Compared with the bicubic method, the bilinear method has an advantage that the amount of calculation is small although the interpolation accuracy is low. [] In Equation (6) is a Gaussian symbol.
P = {(i + 1) -u} {(j + 1) -v} P ij + {(i + 1) -u} (vj) P ij + 1
+ {(ui) {(j + 1) -v} P i + 1j + (ui) (vj) P i + 1j + 1 (5)
i = [u], j = [v] (6)

図5は、ニアレストネイバー法を用いて補間値を求める例を説明するための図である。ニアレストネイバー法は、補間点を囲む画素に基づいて、式(7),(8)によって補間値を算出する。ニアレストネイバー法は、位置精度は最大で画素間隔の距離の1/2の距離がずれるが、元の画素の成分の値がそのまま適用され変化しないという利点がある。さらに、バイリニア法に比して演算量が少ない。式(8)における[]は、ガウス記号である。
P=Pmn …(7)
m=[u+0.5],n=[v+0.5] …(8)
FIG. 5 is a diagram for explaining an example in which an interpolation value is obtained using the nearest neighbor method. In the nearest neighbor method, an interpolation value is calculated by Expressions (7) and (8) based on pixels surrounding an interpolation point. The nearest neighbor method has the advantage that the position accuracy is maximum and the distance of ½ of the distance between the pixels is shifted, but the value of the original pixel component is applied as it is and does not change. Furthermore, the amount of calculation is small compared to the bilinear method. [] In Equation (8) is a Gaussian symbol.
P = P mn (7)
m = [u + 0.5], n = [v + 0.5] (8)

バイキュービック法の演算量とバイリニア法の演算量とを比較するために、それぞれの算出式を変形する。バイキュービック法については、式(1)を展開して、式(9)〜(13)に変形する。式(9)〜(12)によって算出されるPA〜PDは、最終的な補間値Pを求めるための途中結果である中間値であり、図3に示した16画素を左上の4画素、左下の4画素、右上の4画素、および右下の4画素に等分割した各4画素についての計算結果である。補間値Pは、中間値PA〜PDの和であり、式(13)によって算出される。
PA=P11f(x1)f(y1)+P21f(x2)f(y1)+P12f(x1)f(y2)+P22f(x2)f(y2) …(9)
PB=P31f(x3)f(y1)+P41f(x4)f(y1)+P32f(x3)f(y2)+P42f(x4)f(y2) …(10)
PC=P13f(x1)f(y3)+P23f(x2)f(y3)+P14f(x1)f(y4)+P24f(x2)f(y4) …(11)
PD=P33f(x3)f(y3)+P43f(x4)f(y3)+P34f(x3)f(y4)+P44f(x4)f(y4) …(12)
P=PA+PB+PC+PD …(13)
In order to compare the calculation amount of the bicubic method and the calculation amount of the bilinear method, the respective calculation formulas are modified. For the bicubic method, Formula (1) is expanded and transformed into Formulas (9) to (13). PA to PD calculated by the equations (9) to (12) are intermediate values that are intermediate results for obtaining the final interpolation value P, and the 16 pixels shown in FIG. These are the calculation results for each of the four pixels equally divided into four pixels, four upper right pixels, and four lower right pixels. The interpolation value P is the sum of the intermediate values PA to PD, and is calculated by the equation (13).
PA = P 11 f (x 1 ) f (y 1 ) + P 21 f (x 2 ) f (y 1 ) + P 12 f (x 1 ) f (y 2 ) + P 22 f (x 2 ) f ( y 2 ) (9)
PB = P 31 f (x 3 ) f (y 1 ) + P 41 f (x 4 ) f (y 1 ) + P 32 f (x 3 ) f (y 2 ) + P 42 f (x 4 ) f ( y 2 )… (10)
PC = P 13 f (x 1 ) f (y 3 ) + P 23 f (x 2 ) f (y 3 ) + P 14 f (x 1 ) f (y 4 ) + P 24 f (x 2 ) f ( y 4 )… (11)
PD = P 33 f (x 3 ) f (y 3 ) + P 43 f (x 4 ) f (y 3 ) + P 34 f (x 3 ) f (y 4 ) + P 44 f (x 4 ) f ( y 4 )… (12)
P = PA + PB + PC + PD… (13)

バイリニア法については、式(5),(6)を式(14),(15)に変形する。
f(x1)=(i+1)-u,f(x2)=u-i,f(y1)=(j+1)-v,f(y2)=v-j …(14)
P=f(x1)f(y1)Pij+ f(x1)f(y2)Pij+1+f(x2)f(y1))Pi+1j+f(x2)f(y2)Pi+1j+1
…(15)
For the bilinear method, equations (5) and (6) are transformed into equations (14) and (15).
f (x 1 ) = (i + 1) -u, f (x 2 ) = ui, f (y 1 ) = (j + 1) -v, f (y 2 ) = vj… (14)
P = f (x 1 ) f (y 1 ) P ij + f (x 1 ) f (y 2 ) P ij + 1 + f (x 2 ) f (y 1 )) P i + 1j + f (x 2 ) f (y 2 ) P i + 1j + 1
… (15)

重み係数については、バイリニア法は、補間点を囲む4個の画素に基づいて、式(14)によって算出するが、バイキュービック法は、補間点を囲む4個の画素およびこの4個の画素を囲む12個の画素を含む16個の画素に基づいて、式(2),(4)によって算出する。すなわち、バイキュービック法で重み係数を算出する演算量は、バイリニア法で重み係数を算出する演算量よりも多い。   As for the weighting coefficient, the bilinear method is calculated according to the equation (14) based on the four pixels surrounding the interpolation point. The bicubic method calculates the four pixels surrounding the interpolation point and the four pixels. Based on 16 pixels including 12 surrounding pixels, the calculation is performed using equations (2) and (4). That is, the amount of calculation for calculating the weighting coefficient by the bicubic method is larger than the amount of calculation for calculating the weighting coefficient by the bilinear method.

これらの重み係数は、倍率および補間精度が予め決まっている場合は、予め算出しておくことが可能である。予め算出した重み係数をテーブル化したデータとして記憶しておき、記憶されている重み係数を用いて補間計算を行うことによって、演算量を低減し、処理時間の短縮を図ることができる。   These weighting factors can be calculated in advance if the magnification and interpolation accuracy are determined in advance. By storing the weighting factors calculated in advance as tabulated data and performing interpolation calculation using the stored weighting factors, the amount of calculation can be reduced and the processing time can be shortened.

補間計算については、バイキュービック法の計算式である式(9)〜(12)と、バイリニア法の計算式である式(15)とを比較すると、式(15)の項の構成は、式(9)〜(12)のそれぞれの項の構成と同じである。したがって、重み係数をテーブル化したとしても、バイキュービック法での演算量は、バイリニア法での演算量の4倍であり、論理回路の構成によっては、バイキュービック法はバイリニア法よりも処理時間がかかる。   As for the interpolation calculation, when the formulas (9) to (12) that are the calculation formulas of the bicubic method are compared with the formula (15) that is the calculation formula of the bilinear method, the configuration of the term of the formula (15) is (9) It is the same as the structure of each term of (12). Therefore, even if the weighting factor is tabulated, the amount of computation in the bicubic method is four times the amount of computation in the bilinear method, and depending on the configuration of the logic circuit, the bicubic method requires more processing time than the bilinear method. Take it.

図6は、補間処理部122の構成を示すブロック図である。図6では、重み係数を予め算出したデータがテーブル化されて記憶される係数部125が追加されている。図1では、重み係数は、入出力制御部124で演算され、演算された重み係数が入出力制御部124から入力データ制御部121を介して補間処理部122に入力されたが、図6では、係数部125に記憶される重み係数が補間処理部122に入力され、処理時間の短縮を図っている。   FIG. 6 is a block diagram illustrating a configuration of the interpolation processing unit 122. In FIG. 6, a coefficient unit 125 is added in which data in which weight coefficients are calculated in advance is tabulated and stored. In FIG. 1, the weighting factor is calculated by the input / output control unit 124, and the calculated weighting factor is input from the input / output control unit 124 to the interpolation processing unit 122 via the input data control unit 121. In FIG. The weighting factor stored in the coefficient unit 125 is input to the interpolation processing unit 122 to shorten the processing time.

補間処理部122は、8個の論理回路部(以下「CAL」という)31〜38を含んで構成される。バイキュービック法によって補間値を算出する場合、入力データ制御部121は、補間点を囲む4個の画素およびこの4個の画素を囲む12個の画素を含む16画素の画像データP11〜P44を補間処理部122に入力する。係数部125は、重み係数f(x)〜f(x)およびf(y)〜f(y)を補間処理部122に入力する。補間処理部122は、各CAL31〜38で算出された中間値PA〜PDを出力し、出力データ制御部123に入力する。出力データ制御部123は、中間値PA〜PDを加算して補間値Pを出力する。 The interpolation processing unit 122 includes eight logic circuit units (hereinafter referred to as “CAL”) 31 to 38. When the interpolation value is calculated by the bicubic method, the input data control unit 121 includes 16 pixels of image data P 11 to P 44 including four pixels surrounding the interpolation point and twelve pixels surrounding the four pixels. Is input to the interpolation processing unit 122. The coefficient unit 125 inputs weighting coefficients f (x 1 ) to f (x 4 ) and f (y 1 ) to f (y 4 ) to the interpolation processing unit 122. The interpolation processing unit 122 outputs the intermediate values PA to PD calculated by the CALs 31 to 38 and inputs them to the output data control unit 123. The output data control unit 123 adds the intermediate values PA to PD and outputs the interpolation value P.

図7は、補間処理部122の論理回路図である。図8は、補間処理部122のうち中間値PAを算出する部分の論理回路図である。CAL31は、3つの乗算器311,312,314および1つの加算器313によって構成され、CAL33は、3つの乗算器331,332,334および1つの加算器333によって構成される。乗算器311,312,314,331,332,334はそれぞれ2つの入力の乗算を行い、加算器313,333はそれぞれ2つの入力の加算を行う。   FIG. 7 is a logic circuit diagram of the interpolation processing unit 122. FIG. 8 is a logic circuit diagram of a portion of the interpolation processing unit 122 that calculates the intermediate value PA. The CAL 31 includes three multipliers 311, 312, 314 and one adder 313, and the CAL 33 includes three multipliers 331, 332, 334 and one adder 333. Multipliers 311, 312, 314, 331, 332, and 334 each multiply two inputs, and adders 313 and 333 each add two inputs.

乗算器311には、画像データP11および重み係数f(x)が入力され、乗算器312には、画像データP21および重み係数f(x)が入力される。加算器313には、乗算器311の出力および乗算器312の出力が入力され、乗算器314には、加算器313の出力および重み係数f(y)が入力される。乗算器331には、画像データP12および重み係数f(x)が入力され、乗算器332には、画像データP22および重み係数f(x)が入力される。加算器333には、乗算器331の出力および乗算器332の出力が入力され、乗算器334には、加算器333の出力および重み係数f(y)が入力される。CAL31の出力およびCAL33の出力は、加算器391に入力され、加算器391によって加算された値が中間値PAとして出力される。 The multiplier 311 receives the image data P 11 and the weighting factor f (x 1 ), and the multiplier 312 receives the image data P 21 and the weighting factor f (x 2 ). The output of the multiplier 311 and the output of the multiplier 312 are input to the adder 313, and the output of the adder 313 and the weighting factor f (y 1 ) are input to the multiplier 314. The multiplier 331 receives the image data P 12 and the weighting factor f (x 1 ), and the multiplier 332 receives the image data P 22 and the weighting factor f (x 2 ). The adder 333 receives the output of the multiplier 331 and the output of the multiplier 332, and the multiplier 334 receives the output of the adder 333 and the weighting factor f (y 2 ). The output of CAL31 and the output of CAL33 are input to an adder 391, and the value added by the adder 391 is output as an intermediate value PA.

中間値PBを出力するためのCAL32、CAL34および加算器392の組み合わせ、中間値PCを出力するためのCAL35、CAL37および加算器393の組み合わせ、ならびに中間値PDを出力するためのCAL36、CAL38および加算器394の組み合わせは、CAL31、CAL33および加算器391の組合せと同じ論理回路構成であり、重複を避けるために説明は省略する。   Combination of CAL32, CAL34 and adder 392 for outputting intermediate value PB, combination of CAL35, CAL37 and adder 393 for outputting intermediate value PC, and CAL36, CAL38 and addition for outputting intermediate value PD The combination of the units 394 has the same logic circuit configuration as the combination of the CAL31, CAL33, and the adder 391, and a description thereof will be omitted to avoid duplication.

中間値PA〜PDは、式(9)〜(12)を変形した式(16)〜(19)に基づいて算出される。
PA={P11f(x1)+P21f(x2)}f(y1)+{P12f(x1)+P22f(x2)}f(y2) …(16)
PB={P31f(x3)+P41f(x4)}f(y1)+{P32f(x3)+P42f(x4)}f(y2) …(17)
PC={P13f(x1)+P23f(x2)}f(y3)+{P14f(x1)+P24f(x2)}f(y4) …(18)
PD={P33f(x3)+P43f(x4)}f(y3)+{P34f(x3)+P44f(x4)}f(y4) …(19)
Intermediate values PA to PD are calculated based on equations (16) to (19) obtained by modifying equations (9) to (12).
PA = {P 11 f (x 1 ) + P 21 f (x 2 )} f (y 1 ) + {P 12 f (x 1 ) + P 22 f (x 2 )} f (y 2 )… (16 )
PB = {P 31 f (x 3 ) + P 41 f (x 4 )} f (y 1 ) + {P 32 f (x 3 ) + P 42 f (x 4 )} f (y 2 )… (17 )
PC = {P 13 f (x 1 ) + P 23 f (x 2 )} f (y 3 ) + {P 14 f (x 1 ) + P 24 f (x 2 )} f (y 4 )… (18 )
PD = {P 33 f (x 3 ) + P 43 f (x 4 )} f (y 3 ) + {P 34 f (x 3 ) + P 44 f (x 4 )} f (y 4 )… (19 )

CAL31は、式(16)の第1項を演算する論理回路であり、CAL32は、式(17)の第1項を加算する論理回路であり、CAL33は、式(16)の第2項を加算する論理回路であり、CAL34は、式(17)の第2項を加算する論理回路であり、CAL35は、式(18)の第1項を加算する論理回路であり、CAL36は、式(19)の第1項を加算する論理回路であり、CAL37は、式(18)の第2項を加算する論理回路であり、CAL38は、式(19)の第2項を加算する論理回路である。   CAL31 is a logic circuit that calculates the first term of Equation (16), CAL32 is a logic circuit that adds the first term of Equation (17), and CAL33 is the second term of Equation (16). CAL34 is a logic circuit that adds the second term of Equation (17), CAL35 is a logic circuit that adds the first term of Equation (18), and CAL36 is 19) is a logic circuit for adding the first term of the equation, CAL37 is a logic circuit for adding the second term of the equation (18), and CAL38 is a logic circuit for adding the second term of the equation (19). is there.

CAL31〜38は、それぞれ3つの乗算器と1つの加算器から構成され、補間処理部122は、それらに4つの加算器を加えて構成される。すなわち合計で24個の乗算器と12個の加算器とから構成される。それに対して、補間処理部122を式(9)〜(12)に基づいて、論理構成すると、32個の乗算器と12個の加算器が必要になる。したがって、式(16)〜(19)に基づいて論理構成することによって、式(9)〜(12)に基づいて論理構成する場合よりも、乗算器を8個削減することができ、回路規模を小さくすることができる。   Each of the CALs 31 to 38 includes three multipliers and one adder, and the interpolation processing unit 122 includes four adders. That is, it is composed of a total of 24 multipliers and 12 adders. On the other hand, if the interpolation processing unit 122 is logically configured based on the equations (9) to (12), 32 multipliers and 12 adders are required. Therefore, by configuring the logic based on the equations (16) to (19), the number of multipliers can be reduced by 8 as compared with the case where the logic configuration is based on the equations (9) to (12). Can be reduced.

図9は、補間演算部12を用いてバイリニア法による補間値を1つ算出するときに用いる画素データの配置を示す図である。補間演算部12は、バイリニア法によって補間値を1つ求める場合、領域54内の画素データつまり補間点を囲む4個の画素の画素データを用い、他の12個の画素データの値を「0」とする。   FIG. 9 is a diagram illustrating an arrangement of pixel data used when one interpolation value by the bilinear method is calculated using the interpolation calculation unit 12. When obtaining one interpolation value by the bilinear method, the interpolation calculation unit 12 uses pixel data in the region 54, that is, pixel data of four pixels surrounding the interpolation point, and sets the values of the other 12 pixel data to “0”. "

具体的には、補間演算部12は、補間点を囲む4個の画素の画素データP22,P32,P23,P33(以下「P22〜P33」という)を補間処理部122に入力し、16個の画素データP11〜P44のうち前記4個の画素データP22〜P33を除く他の12個の画素データとして「0」のデータを補間処理部122に入力する。そして、式(14)によって求めた重み係数f(x)、f(x)、f(y)およびf(y)を、式(9)〜(12)の項のうち入力される画素データの値が「0」でない項の重み係数、つまり画素データP22〜P33が含まれる項の重み係数f(x)、f(x)、f(y)およびf(y)として補間処理部122に入力し、式(9)〜(13)によって補間値Pを算出する。式(9)〜(12)の重み係数f(x)、f(x)、f(y)およびf(y)の値は、画像データの値が0であるのでどんな値でもよい。 Specifically, the interpolation calculation unit 12 supplies pixel data P 22 , P 32 , P 23 , P 33 (hereinafter referred to as “P 22 to P 33 ”) of four pixels surrounding the interpolation point to the interpolation processing unit 122. Then, “0” data is input to the interpolation processing unit 122 as the other 12 pieces of pixel data excluding the four pieces of pixel data P 22 to P 33 among the 16 pieces of pixel data P 11 to P 44 . Then, the weighting factors f (x 1 ), f (x 2 ), f (y 1 ), and f (y 2 ) obtained by the equation (14) are inputted among the terms of the equations (9) to (12). The weighting coefficient of the term whose pixel data value is not “0”, that is, the weighting factors f (x 2 ), f (x 3 ), f (y 2 ), and f () of the term including the pixel data P 22 to P 33. y 3 ) is input to the interpolation processing unit 122, and the interpolation value P is calculated by equations (9) to (13). Since the values of the weighting factors f (x 1 ), f (x 4 ), f (y 1 ), and f (y 4 ) in the equations (9) to (12) are 0, any value can be used. Good.

まず、式(9)〜(12)に、4個の画素データP22〜P33、16個の画素データP11〜P44のうち4個の画素データP22〜P33を除く他の12個の画素データとして「0」を代入すると、式(9)〜(12)は、それぞれ式(20)〜(23)と表される。
PA=0・f(x1)f(y1)+0・f(x2)f(y1)+0・f(x1)f(y2)+P22f(x2)f(y2) …(20)
PB=0・f(x3)f(y1)+0・f(x4)f(y1)+P32f(x3)f(y2)+0・f(x4)f(y2) …(21)
PC=0・f(x1)f(y3)+P23f(x2)f(y3)+0・f(x1)f(y4)+0・f(x2)f(y4) …(22)
PD=P33f(x3)f(y3)+0・f(x4)f(y3)+0・f(x3)f(y4)+0・f(x4)f(y4) …(23)
First, in Expressions (9) to (12), four pixel data P 22 to P 33 and 12 pixel data P 11 to P 44 other than the four pixel data P 22 to P 33 are excluded. When “0” is substituted as pixel data, Expressions (9) to (12) are expressed as Expressions (20) to (23), respectively.
PA = 0 ・ f (x 1 ) f (y 1 ) +0 ・ f (x 2 ) f (y 1 ) +0 ・ f (x 1 ) f (y 2 ) + P 22 f (x 2 ) f ( y 2 )… (20)
PB = 0 ・ f (x 3 ) f (y 1 ) +0 ・ f (x 4 ) f (y 1 ) + P 32 f (x 3 ) f (y 2 ) +0 ・ f (x 4 ) f ( y 2 )… (21)
PC = 0 ・ f (x 1 ) f (y 3 ) + P 23 f (x 2 ) f (y 3 ) +0 ・ f (x 1 ) f (y 4 ) +0 ・ f (x 2 ) f ( y 4 )… (22)
PD = P 33 f (x 3 ) f (y 3 ) +0 ・ f (x 4 ) f (y 3 ) +0 ・ f (x 3 ) f (y 4 ) +0 ・ f (x 4 ) f ( y 4 )… (23)

次に、式(20)〜(23)を変形すると式(24)〜(27)となる。
PA=P22f(x2)f(y2) …(24)
PB=P32f(x3)f(y2) …(25)
PC=P23f(x2)f(y3) …(26)
PD=P33f(x3)f(y3) …(27)
Next, equations (20) to (23) are transformed into equations (24) to (27).
PA = P 22 f (x 2 ) f (y 2 )… (24)
PB = P 32 f (x 3 ) f (y 2 )… (25)
PC = P 23 f (x 2 ) f (y 3 )… (26)
PD = P 33 f (x 3 ) f (y 3 )… (27)

さらに、式(24)〜(27)によって算出される中間値PA〜PDを式(13)に代入し、式(28)よって、補間値Pを算出する。
P=PA+PB+PC+PD=P22f(x2)f(y2)+P32f(x3)f(y2)+P23f(x2)f(y3)+P33f(x3)f(y3)
…(28)
Further, the intermediate values PA to PD calculated by the equations (24) to (27) are substituted into the equation (13), and the interpolation value P is calculated by the equation (28).
P = PA + PB + PC + PD = P 22 f (x 2 ) f (y 2 ) + P 32 f (x 3 ) f (y 2 ) + P 23 f (x 2 ) f (y 3 ) + P 33 f (x 3 ) f (y 3 )
… (28)

式(28)は、バイリニア法によって補間値を算出する式(15)の4個の画素データと重み係数とを置き換えた式である。換言すれば、12個の画像データの値を「0」とし、かつ重み係数をバイリニア法の重み係数とすれば、バイキュービック法によって補間値を算出する補間演算部12によって、バイリニア法による補間値を算出することができる。   Expression (28) is an expression obtained by replacing the four pixel data and weighting coefficient of Expression (15) for calculating the interpolation value by the bilinear method. In other words, if the value of 12 pieces of image data is set to “0” and the weighting factor is a weighting factor of the bilinear method, the interpolation value calculated by the bicubic method is used by the interpolation calculation unit 12 to calculate the interpolation value by the bilinear method. Can be calculated.

たとえば、画素をYCbCr方式で表して、輝度成分であるY成分の補間値をバイキュービック法によって算出し、色差成分であるCb成分およびCr成分の補間値をバイリニア法によって算出する場合、補間演算部12は、まず、バイキュービック法によって第1成分の補間値であるY成分の補間値を算出し、次にバイリニア法によって第2成分の補間値であるCb成分の補間値を算出し、最後にバイリニア法によって第3成分の補間値であるCr成分の補間値を算出する。   For example, when the pixel is represented by the YCbCr system, the interpolation value of the Y component that is the luminance component is calculated by the bicubic method, and the interpolation value of the Cb component and the Cr component that are the color difference components is calculated by the bilinear method, 12 first calculates an interpolated value of the Y component that is the interpolated value of the first component by the bicubic method, then calculates an interpolated value of the Cb component that is the interpolated value of the second component by the bilinear method, and finally The Cr component interpolation value, which is the third component interpolation value, is calculated by the bilinear method.

図10は、補間演算部12を用いてバイリニア法による補間値を同時に4つ算出するときに用いる画素データの配置を示す図である。補間演算部12は、バイリニア法によって、2つの補間点についてのそれぞれ2つの色素成分つまり合計4つの色素成分について、同時に4つの補間値を求める場合、領域55内の4個の画素データP11,P21,P12,P22を1つの色差成分を求めるために用い、領域56内の4個の画素データP31,P41,P32,P42を1つの色差成分を求めるために用い、領域57内の4個の画素データP13,P23,P14,P24を1つの色差成分を求めるために用い、領域58内の4個の画素データP33,P43,P34,P44を1つの色差成分を求めるために用いる。 FIG. 10 is a diagram illustrating an arrangement of pixel data used when four interpolation values by the bilinear method are calculated simultaneously using the interpolation calculation unit 12. When the interpolation operation unit 12 obtains four interpolation values simultaneously for two pigment components for two interpolation points, that is, a total of four pigment components, by the bilinear method, the four pixel data P 11 , P 21 , P 12 , and P 22 are used to obtain one color difference component, and the four pixel data P 31 , P 41 , P 32 , and P 42 in the area 56 are used to obtain one color difference component, The four pieces of pixel data P 13 , P 23 , P 14 , and P 24 in the region 57 are used to obtain one color difference component, and the four pieces of pixel data P 33 , P 43 , P 34 , and P in the region 58 are used. 44 is used to obtain one color difference component.

具体的には、2つの補間点の画素のうち第1の補間点の画素のCb成分を求めるための4個の画素データのCb成分をPA22,PA23,PA32,PA33(以下「PA22〜PA33」という)とし、第1の補間点の画素のCr成分を求めるための4個の画素データのCr成分をPB22,PB23,PB32,PB33(以下「PB22〜PB33」という)とし、第2の補間点の画素のCb成分を求めるための4個の画素データのCb成分をPC22,PC23,PC32,PC33(以下「PC22〜PC33」という)とし、第2の補間点の画素のCr成分を求めるための4個の画素データのCr成分をPD22,PD23,PD32,PD33(以下「PD22〜PD33」という)とすると、補間演算部12は、第1の補間点を囲む4個の画素のCb成分の画素データPA22〜PA33を、16個の画素データP11〜P44のうちの4個の画素データP11,P21,P12,P22として補間処理部122に入力し、第1の補間点を囲む4個の画素のCr成分の画素データPB22〜PB33を、16個の画素データP11〜P44のうちの4個の画素データP31,P41,P32,P42として補間処理部122に入力し、第2の補間点を囲む4個の画素のCr成分の画素データPC22〜PC33を、16個の画素データP11〜P44のうちの4個の画素データP13,P23,P14,P24として補間処理部122に入力し、第2の補間点を囲む4個の画素のCr成分の画素データPD22〜PD33を、16個の画素データP11〜P44のうちの4個の画素データP33,P43,P34,P44として補間処理部122に入力する。 Specifically, among the pixels at the two interpolation points, the Cb components of the four pieces of pixel data for obtaining the Cb component of the pixel at the first interpolation point are referred to as PA 22 , PA 23 , PA 32 , PA 33 (hereinafter “ PA 22 to PA 33 ), and the Cr components of the four pieces of pixel data for obtaining the Cr component of the pixel at the first interpolation point are PB 22 , PB 23 , PB 32 , PB 33 (hereinafter referred to as “PB 22 ˜ PB 33 ”) and the Cb components of the four pieces of pixel data for obtaining the Cb component of the pixel at the second interpolation point are PC 22 , PC 23 , PC 32 , PC 33 (hereinafter“ PC 22 to PC 33 ”). And the Cr components of the four pieces of pixel data for obtaining the Cr component of the pixel at the second interpolation point as PD 22 , PD 23 , PD 32 , PD 33 (hereinafter referred to as “PD 22 to PD 33 ”). You If, interpolation operation unit 12, the pixel data PA 22 ~PA 33 of Cb components of the four pixels surrounding the first interpolation point, sixteen four pixel data of the pixel data P 11 to P 44 P 11 , P 21 , P 12 , P 22 are input to the interpolation processing unit 122, and the four pixel Cr component pixel data PB 22 to PB 33 surrounding the first interpolation point are converted into 16 pixel data P 11 input as four pixel data P 31, P 41, P 32 , P 42 of the to P 44 to the interpolation processing unit 122, pixel data PC of Cr components of the four pixels surrounding the second interpolation points 22 to PC 33 are input to the interpolation processing unit 122 as four pieces of pixel data P 13 , P 23 , P 14 and P 24 out of the 16 pieces of pixel data P 11 to P 44 , and the second interpolation point is set as the second interpolation point. Pixel component of Cr component of four surrounding pixels The data PD 22 ~PD 33, and inputs to the interpolation processing unit 122 as four pixel data P 33, P 43, P 34 , P 44 of the 16 pieces of pixel data P 11 to P 44.

そして、第1の補間点のCb成分について式(14)によって求めた重み係数f(x)、f(x)、f(y)およびf(y)を、式(16)の重み係数f(x)、f(x)、f(y)およびf(y)として補間処理部122に入力し、第1の補間点のCr成分について式(14)によって求めた重み係数f(x)、f(x)、f(y)およびf(y)を、式(17)の重み係数f(x)、f(x)、f(y)およびf(y)として補間処理部122に入力し、第2の補間点のCb成分について式(14)によって求めた重み係数f(x)、f(x)、f(y)およびf(y)を、式(18)の重み係数f(x)、f(x)、f(y)およびf(y)として補間処理部122に入力し、第2の補間点のCr成分について式(14)によって求めた重み係数f(x)、f(x)、f(y)およびf(y)を、式(19)の重み係数f(x)、f(x)、f(y)およびf(y)として補間処理部122に入力する。これらの値を式(16)〜(19)に代入して変形すると、式(16)〜(19)は、それぞれ式(29)〜(32)と表される。
PA=PA22f(x1)f(y1)+PA32f(x2)f(y1)+PA23f(x1)f(y2)+PA33f(x2)f(y2) …(29)
PB=PB22f(x3)f(y1)+PB32f(x4)f(y1)+PB23f(x3)f(y2)+PB33f(x4)f(y2) …(30)
PC=PC22f(x1)f(y3)+PC32f(x2)f(y3)+PC23f(x1)f(y4)+PC33f(x2)f(y4) …(31)
PD=PD22f(x3)f(y3)+PD32f(x4)f(y3)+PD23f(x3)f(y4)+PD33f(x4)f(y4) …(32)
Then, the weighting factors f (x 1 ), f (x 2 ), f (y 1 ), and f (y 2 ) obtained by the equation (14) for the Cb component at the first interpolation point are expressed by the equation (16). The weighting factors f (x 1 ), f (x 2 ), f (y 1 ), and f (y 2 ) are input to the interpolation processing unit 122, and the Cr component at the first interpolation point is obtained by Expression (14). The weighting factors f (x 1 ), f (x 2 ), f (y 1 ), and f (y 2 ) are replaced with the weighting factors f (x 3 ), f (x 4 ), and f (y 1 ) in Expression (17). ) And f (y 2 ) are input to the interpolation processing unit 122, and the weighting coefficients f (x 1 ), f (x 2 ), f (y 1 ) obtained by the expression (14) for the Cb component of the second interpolation point ) and f a (y 2), the weighting factor f (x 1 of the formula (18)), f (x 2), and f (y 3) and f (y 4) Input to the interpolation processing unit 122, a second weighting coefficient determined by equation (14) for the Cr component of the interpolation point f (x 1), f a (x 2), f (y 1) and f (y 2) The weighting coefficients f (x 3 ), f (x 4 ), f (y 3 ), and f (y 4 ) of Expression (19) are input to the interpolation processing unit 122. When these values are substituted into the equations (16) to (19) and transformed, the equations (16) to (19) are expressed as equations (29) to (32), respectively.
PA = PA 22 f (x 1 ) f (y 1 ) + PA 32 f (x 2 ) f (y 1 ) + PA 23 f (x 1 ) f (y 2 ) + PA 33 f (x 2 ) f ( y 2 )… (29)
PB = PB 22 f (x 3 ) f (y 1 ) + PB 32 f (x 4 ) f (y 1 ) + PB 23 f (x 3 ) f (y 2 ) + PB 33 f (x 4 ) f ( y 2 )… (30)
PC = PC 22 f (x 1 ) f (y 3 ) + PC 32 f (x 2 ) f (y 3 ) + PC 23 f (x 1 ) f (y 4 ) + PC 33 f (x 2 ) f ( y 4 )… (31)
PD = PD 22 f (x 3 ) f (y 3 ) + PD 32 f (x 4 ) f (y 3 ) + PD 23 f (x 3 ) f (y 4 ) + PD 33 f (x 4 ) f ( y 4 )… (32)

式(29)〜(32)は、バイリニア法によって補間値を算出する式(15)の4個の画素データと重み係数とを置き換えた式である。換言すれば、画像データを2つの補間点のCb成分およびCr成分の画素データとし、かつ重み係数を2つの補間点でのCb成分およびCr成分を算出するためのバイリニア法の重み係数とすれば、バイキュービック法によって補間値を算出する補間演算部12によって、色差成分であるCb成分およびCr成分のバイリニア法による補間値を、2つの補間点について同時に算出することができる。   Expressions (29) to (32) are expressions in which the four pixel data and the weighting coefficient in Expression (15) for calculating the interpolation value by the bilinear method are replaced. In other words, if the image data is the pixel data of the Cb component and the Cr component at the two interpolation points, and the weighting factor is the weighting factor of the bilinear method for calculating the Cb component and the Cr component at the two interpolation points. The interpolation calculation unit 12 that calculates the interpolation value by the bicubic method can simultaneously calculate the interpolation values by the bilinear method of the Cb component and the Cr component that are color difference components for two interpolation points.

たとえば、画素をYCbCr方式で表し、輝度成分であるY成分の補間値をバイキュービック法によって算出し、色差成分であるCb成分およびCr成分の補間値をバイリニア法によって算出する場合、補間演算部12は、まず、第1の補間点および第2の補間点について、バイキュービック法によって第1成分であるY成分の補間値をそれぞれ算出し、次にバイリニア法によって第2成分であるCb成分および第3成分であるCr成分の補間値を、第1の補間点および第2の補間点について同時に算出する。したがって、2つの補間点についての補間値を算出する場合、図9に示した場合は、バイキュービック法によって2回そしてバイリニア法によって4回合計6回の処理が必要であったが、補間演算部12の場合は、バイキュービック法によって2回そしてバイリニア法によって1回合計3回の処理で算出することができ、処理時間を1/2に低減することができる。   For example, when the pixel is represented by the YCbCr system, the Y component interpolation value that is the luminance component is calculated by the bicubic method, and the Cb component and Cr component interpolation values that are the color difference components are calculated by the bilinear method, the interpolation calculation unit 12 First, for each of the first interpolation point and the second interpolation point, the interpolation value of the Y component that is the first component is calculated by the bicubic method, and then the second component Cb and the second component are calculated by the bilinear method. The interpolation value of the Cr component, which is the three components, is calculated simultaneously for the first interpolation point and the second interpolation point. Therefore, when calculating the interpolation values for two interpolation points, in the case shown in FIG. 9, the bicubic method required two times and the bilinear method required four times in total, but the interpolation calculation unit In the case of 12, it can be calculated by the bicubic method twice and the bilinear method once in a total of three times, and the processing time can be reduced to ½.

図11は、本発明の実施の他の形態であるディジタルスチルカメラ2の構成を示すブロック図である。画像処理装置であるディジタルスチルカメラ2は、図1に示した画像処理装置1をディジタルスチルカメラに適用した例であり、入力装置20、画像メモリ21、サイズ変換処理部22、出力装置23および制御プロセッサ24を含んで構成される。本発明に係る画像処理方法は、ディジタルスチルカメラ2で処理される。   FIG. 11 is a block diagram showing a configuration of a digital still camera 2 according to another embodiment of the present invention. A digital still camera 2 that is an image processing apparatus is an example in which the image processing apparatus 1 shown in FIG. 1 is applied to a digital still camera, and includes an input device 20, an image memory 21, a size conversion processing unit 22, an output device 23, and a control. A processor 24 is included. The image processing method according to the present invention is processed by the digital still camera 2.

入力手段である入力装置20は、たとえばイメージセンサによって構成され、撮像した画像の画像データを、具体的には、画像をYCbCr方式で表す場合、輝度成分であるY成分ならびに色差成分であるCb成分およびCr成分の画像データに変換して、画像メモリ21に送り記憶させる。画像メモリ21は、たとえば半導体メモリあるいはハードディスク装置などの記憶装置によって構成され、入力装置20から受け取る画像データおよびサイズ変換処理部22から受け取る画像データを記憶する。   The input device 20 that is an input means is constituted by, for example, an image sensor, and specifically represents image data of a captured image. Specifically, when the image is expressed in the YCbCr system, the Y component that is a luminance component and the Cb component that is a color difference component And converted to Cr component image data, and sent to the image memory 21 for storage. The image memory 21 is configured by a storage device such as a semiconductor memory or a hard disk device, for example, and stores image data received from the input device 20 and image data received from the size conversion processing unit 22.

画像をYCbCr方式で表す場合、ディジタルスチルカメラ2は、輝度成分であるY成分の補間値をバイキュービック法によって算出し、色差成分であるCb成分およびCr成分の補間値をバイリニア法によって算出する。これは、人の目が色差成分よりも輝度成分のほうに敏感であることを利用したものであり、画質の劣化が少なく、かつ演算量を少なくする上で、非常に効果的である。さらに、色差成分であるCb成分およびCr成分の補間値を算出するために、バイキュービック法での算出に必要な補間点を囲む4個の画素およびこの4個の画素を囲む12個の画素を含む16画素よりも少ない画素、つまり補間点を囲む4画素の成分で算出しているので、位置が離れているために生じる色の違いを低く抑えると共に、色ずれを防止することができる。   When the image is represented by the YCbCr system, the digital still camera 2 calculates the interpolation value of the Y component that is the luminance component by the bicubic method, and calculates the interpolation values of the Cb component and the Cr component that are the color difference components by the bilinear method. This utilizes the fact that the human eye is more sensitive to the luminance component than the color difference component, and is very effective in reducing image quality degradation and reducing the amount of computation. Furthermore, in order to calculate the interpolated values of the Cb component and the Cr component which are color difference components, four pixels surrounding the interpolation points necessary for the calculation by the bicubic method and 12 pixels surrounding the four pixels are calculated. Since the calculation is performed with the components of less than 16 pixels, that is, four pixels surrounding the interpolation point, it is possible to suppress the color difference caused by the distant positions and to prevent color misregistration.

サイズ変換処理部22は、画像入力部221、入力データ制御部222、補間処理部223、係数部224、出力データ制御部225、画像出力部226およびコントローラ部227を含んで構成される。   The size conversion processing unit 22 includes an image input unit 221, an input data control unit 222, an interpolation processing unit 223, a coefficient unit 224, an output data control unit 225, an image output unit 226, and a controller unit 227.

画像入力部221は、たとえば半導体メモリによって構成される入力バッファ221aを含み、コントローラ部227から指示される画像データを画像メモリ21から読み出しし、読み出した画像データを入力バッファ221aに記憶する。具体的には、画像メモリ21に記憶される画像データのうち、コントローラ部227から指示される成分の画素データから、コントローラ部227から指示される画素についての画素データを選択して読み出し、読み出した画素データを入力バッファ221aに記憶する。   The image input unit 221 includes an input buffer 221a configured by, for example, a semiconductor memory, reads image data instructed from the controller unit 227 from the image memory 21, and stores the read image data in the input buffer 221a. Specifically, out of the image data stored in the image memory 21, the pixel data for the pixel instructed from the controller unit 227 is selected and read out from the pixel data of the component instructed from the controller unit 227. Pixel data is stored in the input buffer 221a.

たとえばコントローラ部227から1つの補間点について輝度成分が指示されると、画像入力部221は、輝度成分つまりY成分の画素データから、コントローラ部227から指示される16個の画素、つまり補間点を囲む4個の画素およびこの4個の画素を囲む12個の画素を含む4×4の画素の画素データP11〜P44を選択して読み出し、読み出した16個の画素データP11〜P44を入力バッファ221aに記憶する。そして、入力バッファ221aに記憶した16個の画素データP11〜P44を入力データ制御部222に送る。 For example, when a luminance component is instructed for one interpolation point from the controller unit 227, the image input unit 221 determines 16 pixels, that is, interpolation points, instructed from the controller unit 227 from the luminance component, that is, Y component pixel data. The pixel data P 11 to P 44 of 4 × 4 pixels including the surrounding four pixels and the 12 pixels surrounding the four pixels are selected and read out, and the read out 16 pixel data P 11 to P 44. Is stored in the input buffer 221a. Then, the 16 pieces of pixel data P 11 to P 44 stored in the input buffer 221 a are sent to the input data control unit 222.

あるいはコントローラ部227から1つの補間点について色差成分が指示されると、画像入力部221は、色差成分つまりCb成分およびCr成分の画素データから、コントローラ部227から指示される4個の画素のCb成分の画素データ、つまり補間点を囲む2×2の画素のCb成分の画素データ、および4個のCr成分の画素データ、つまり補間点を囲む2×2の画素のCb成分の画素データ、たとえば4個のCb成分の画素データPA22〜PA33および4個のCr成分のPB22〜PB33を選択して読み出し、読み出した4個のCb成分の画素データPA22〜PA33および4個のCr成分の画素データPB22〜PB33を入力バッファ221aに記憶する。 Alternatively, when the color difference component is instructed for one interpolation point from the controller unit 227, the image input unit 221 determines the Cb of the four pixels instructed from the controller unit 227 from the color difference component, that is, the pixel data of the Cb component and the Cr component. Component pixel data, that is, Cb component pixel data of 2 × 2 pixels surrounding the interpolation point, and four Cr component pixel data, that is, Cb component pixel data of 2 × 2 pixels surrounding the interpolation point, for example, Four Cb component pixel data PA 22 to PA 33 and four Cr component PB 22 to PB 33 are selected and read out, and the read four Cb component pixel data PA 22 to PA 33 and four pieces of Cb component pixel data PA 22 to PA 33 are selected. The Cr component pixel data PB 22 to PB 33 are stored in the input buffer 221a.

さらに、コントローラ部227から2つの補間点について色差成分が指示されると、画像入力部221は、色差成分つまりCb成分およびCr成分の画素データから、コントローラ部227から指示される第1の補間点を囲む4個の画素のCb成分の画素データおよび4個のCr成分の画素データ、たとえば4個のCb成分の画素データPA22〜PA33および4個のCr成分のPB22〜PB33、ならびにコントローラ部227から指示される第2の補間点を囲む4個の画素のCb成分の画素データおよび4個のCr成分の画素データ、たとえば4個のCb成分の画素データPC22〜PC33および4個のCr成分のPD22〜PD33を選択して読み出す。そして、読み出した第1の補間点についての4個のCb成分の画素データPA22〜PA33および4個のCr成分の画素データPB22〜PB33、ならびに第2の補間点についての4個のCb成分の画素データPC22〜PC33および4個のCr成分の画素データPD22〜PD33を入力バッファ221aに記憶する。 Furthermore, when the color difference component is instructed from the controller unit 227 for two interpolation points, the image input unit 221 uses the first interpolation point instructed from the controller unit 227 from the color difference component, that is, the pixel data of the Cb component and the Cr component. 4 Cb component pixel data and 4 Cr component pixel data, for example, 4 Cb component pixel data PA 22 to PA 33 and 4 Cr component PB 22 to PB 33 , and Cb component pixel data and four Cr component pixel data of four pixels surrounding the second interpolation point instructed by the controller unit 227, for example, four Cb component pixel data PC 22 to PC 33 and 4 Select and read out PD 22 to PD 33 of Cr components. Then, four Cb component pixel data PA 22 to PA 33 and four Cr component pixel data PB 22 to PB 33 for the read first interpolation point, and four Cb component pixel data PB 22 to PB 33 for the second interpolation point are obtained. The Cb component pixel data PC 22 to PC 33 and the four Cr component pixel data PD 22 to PD 33 are stored in the input buffer 221a.

入力データ制御部222は、画像入力部221から受け取る画素データを、補間処理部223への入力データに変換して、補間処理部223に送る。補間処理部223は、図1に示した補間処理部122と同じ回路構成であり、重複を避けるために回路構成の詳細な説明は省略する。補間処理部223は、入力データ制御部222から受け取る16個の画像データ、および係数部224から受け取る重み係数に基づいて、中間値PA〜PDを算出し、算出した中間値PA〜PDを出力データ制御部225に送る。   The input data control unit 222 converts the pixel data received from the image input unit 221 into input data to the interpolation processing unit 223 and sends it to the interpolation processing unit 223. The interpolation processing unit 223 has the same circuit configuration as the interpolation processing unit 122 illustrated in FIG. 1, and detailed description of the circuit configuration is omitted to avoid duplication. The interpolation processing unit 223 calculates intermediate values PA to PD based on the 16 pieces of image data received from the input data control unit 222 and the weighting coefficient received from the coefficient unit 224, and outputs the calculated intermediate values PA to PD as output data. The data is sent to the control unit 225.

記憶手段である係数部224は、たとえば不揮発性のメモリによって構成され、式(2),(4),(14)によって求められる重み係数を予め計算しテーブル化して記憶する。そして、係数部224に記憶する補間係数情報であるテーブルから、コントローラ部227から指示される重み係数を読み出し、読み出した重み係数を補間処理部223に入力する。   The coefficient unit 224 that is a storage unit is configured by, for example, a non-volatile memory, and calculates and stores in advance a weighting coefficient obtained by the equations (2), (4), and (14). Then, the weighting factor instructed from the controller unit 227 is read from the table which is interpolation coefficient information stored in the coefficient unit 224, and the read weighting factor is input to the interpolation processing unit 223.

具体的には、係数部224は、コントローラ部227から輝度成分が指示されると、式(2),(4)から求められる重み係数f(x)〜f(x)およびf(y)〜f(y)を係数部224に記憶するテーブルから読み出し、読み出した重み係数f(x)〜f(x)およびf(y)〜f(y)を補間処理部223に送る。あるいは、コントローラ部227から色差成分が指示されると、式(14)から求められる重み係数f(x)、f(x)、f(y)およびf(y)を係数部224に記憶するテーブルから読み出し、読み出した重み係数f(x)、f(x)、f(y)およびf(y)を、それぞれ式(16)〜(19)の重み係数f(x)〜(x)およびf(y)〜f(y)として、補間処理部223に送る。 Specifically, when the luminance component is instructed from the controller unit 227, the coefficient unit 224 weights coefficients f (x 1 ) to f (x 4 ) and f (y) obtained from the equations (2) and (4). 1 ) to f (y 4 ) are read from the table stored in the coefficient unit 224, and the read weight coefficients f (x 1 ) to f (x 4 ) and f (y 1 ) to f (y 4 ) are interpolated. 223. Alternatively, when the color difference component is instructed from the controller unit 227, the weighting coefficients f (x 1 ), f (x 2 ), f (y 1 ), and f (y 2 ) obtained from the equation (14) are used as the coefficient unit 224. The weighting factors f (x 1 ), f (x 2 ), f (y 1 ), and f (y 2 ) read out from the table stored in FIG. x 1 ) to (x 4 ) and f (y 1 ) to f (y 4 ) are sent to the interpolation processing unit 223.

出力データ制御部225は、補間処理部223から受け取る中間値に基づいて補間値を算出し、算出した補間値を画像出力部226に送る。輝度成分については、補間処理部223から受け取る中間値PA〜PDを加算して補間値Pを求め、求めた補間値Pを画像出力部226に送る。色差成分については、補間処理部223から受け取る中間値PAを補間値PAとして、補間処理部223から受け取る中間値PBを補間値PBとして、補間処理部223から受け取る中間値PCを補間値PCとして、補間処理部223から受け取る中間値PDを補間値PDとして、画像出力部226に送る。   The output data control unit 225 calculates an interpolation value based on the intermediate value received from the interpolation processing unit 223, and sends the calculated interpolation value to the image output unit 226. For the luminance component, the intermediate values PA to PD received from the interpolation processing unit 223 are added to obtain the interpolation value P, and the obtained interpolation value P is sent to the image output unit 226. For the color difference component, the intermediate value PA received from the interpolation processing unit 223 is used as the interpolation value PA, the intermediate value PB received from the interpolation processing unit 223 is used as the interpolation value PB, and the intermediate value PC received from the interpolation processing unit 223 is used as the interpolation value PC. The intermediate value PD received from the interpolation processing unit 223 is sent to the image output unit 226 as the interpolation value PD.

画像出力部226は、たとえば半導体メモリによって構成される出力バッファ226aを含み、出力データ制御部225から受け取る補間値PをY成分の画素データとして、出力データ制御部225から受け取る補間値PAおよび補間値PBを第1の補間点についてのCb成分の画素データおよびCr成分の画素データとして、出力データ制御部225から受け取る補間値PCおよび補間値PDを第2の補間点についてのCb成分の画素データおよびCr成分の画素データとして、出力バッファ226aに記憶する。そして、出力バッファ226aに記憶するY成分の画素データ、あるいはCb成分の画素データおよびCr成分の画素データを画像メモリ21に送り記憶させる。   The image output unit 226 includes an output buffer 226a configured by, for example, a semiconductor memory, and the interpolation value PA and the interpolation value received from the output data control unit 225 using the interpolation value P received from the output data control unit 225 as Y component pixel data. The interpolated value PC and the interpolated value PD received from the output data control unit 225 are the pixel data of the Cb component for the second interpolation point and the interpolated value PC and the interpolated value PD received from the output data control unit 225 as the Cb component pixel data and the Cr component pixel data for the first interpolation point. The pixel data of the Cr component is stored in the output buffer 226a. Then, the Y component pixel data, or the Cb component pixel data and the Cr component pixel data stored in the output buffer 226a are sent to and stored in the image memory 21.

コントローラ部227は、たとえば半導体メモリによって構成される制御レジスタ227aを含み、制御レジスタ227aに記憶されるパラメータに基づいて、画像入力部221、入力データ制御部222、補間処理部223、係数部224、出力データ制御部225および画像出力部226を制御する。   The controller unit 227 includes a control register 227a configured by, for example, a semiconductor memory, and based on parameters stored in the control register 227a, an image input unit 221, an input data control unit 222, an interpolation processing unit 223, a coefficient unit 224, The output data control unit 225 and the image output unit 226 are controlled.

制御レジスタ227aに記憶されるパラメータは、制御プロセッサ24およびコントローラ部227によって設定される。制御プロセッサ24によって設定されるパラメータは、画素を構成する成分、つまり輝度成分および色差成分のうち処理する成分を示す処理成分指定情報、入力画像のサイズを表す入力画像サイズ情報、および拡大または縮小する倍率を表す拡大縮小倍率情報などの情報を含む。   The parameters stored in the control register 227a are set by the control processor 24 and the controller unit 227. Parameters set by the control processor 24 include processing component designation information indicating components to be processed, that is, components to be processed among luminance components and color difference components, input image size information indicating the size of the input image, and enlargement or reduction. It includes information such as enlargement / reduction ratio information indicating the magnification.

制御プロセッサ24は、指示手段である図示しない操作部から、ユーザによって入力される情報に基づいて、入力画像サイズ情報および拡大縮小倍率情報などの情報を生成し、生成した情報をパラメータとして制御レジスタ227aに設定し記憶させる。制御レジスタ227aに記憶されるパラメータは、画像入力部221、入力データ制御部222、補間処理部223、係数部224、出力データ制御部225および画像出力部226から参照される。   The control processor 24 generates information such as input image size information and enlargement / reduction ratio information based on information input by the user from an operation unit (not shown) which is an instruction unit, and the generated information is used as a parameter in the control register 227a. Set to and memorize. The parameters stored in the control register 227a are referred to by the image input unit 221, the input data control unit 222, the interpolation processing unit 223, the coefficient unit 224, the output data control unit 225, and the image output unit 226.

コントローラ部227は、制御プロセッサ24から処理の開始を指示されると、サイズ変換処理を開始する。コントローラ部227は、制御レジスタ227aに記憶される入力画像サイズ情報および拡大縮小倍率情報などの情報に基づいて、出力画像サイズおよび出力画像の座標計算を行い、計算結果を制御レジスタ227aに記憶した後、画像入力部221、入力データ制御部222、補間処理部223、係数部224、出力データ制御部225および画像出力部226に動作の開始を指示する。   When instructed to start processing from the control processor 24, the controller unit 227 starts size conversion processing. The controller unit 227 calculates the output image size and output image coordinates based on information such as input image size information and enlargement / reduction ratio information stored in the control register 227a, and stores the calculation result in the control register 227a. The image input unit 221, the input data control unit 222, the interpolation processing unit 223, the coefficient unit 224, the output data control unit 225, and the image output unit 226 are instructed to start operations.

動作の開始を指示された画像入力部221、入力データ制御部222、補間処理部223、係数部224、出力データ制御部225および画像出力部226は、制御レジスタ227aに記憶されるパラメータを参照することによって、コントローラ部227からの指示を受け処理を行う。   The image input unit 221, the input data control unit 222, the interpolation processing unit 223, the coefficient unit 224, the output data control unit 225, and the image output unit 226 instructed to start the operation refer to parameters stored in the control register 227a. In response to the instruction from the controller unit 227, the process is performed.

コントローラ部227は、補間値を算出するとき、2つの補間点単位で補間値を算出する。具体的には、2つの補間点のうち第1の補間点について輝度成分であるY成分の補間値をバイキュービック法によって算出し、次に第2の補間点について輝度成分であるY成分の補間値をバイキュービック法によって算出し、最後に第1の補間点および第2の補間点について色素成分であるCb成分およびCr成分の補間値を、図10に示したバイリニア法によって算出する。補間点の数が奇数であり、最後に1つ残った場合、その補間点については、輝度成分であるY成分の補間値をバイキュービック法によって算出し、次に色素成分であるCb成分およびCr成分の補間値を第1の補間点とし、かつ第2の補間点の係数を0として図10に示したバイリニア法によって算出する。   When calculating the interpolation value, the controller unit 227 calculates the interpolation value in units of two interpolation points. Specifically, a Y component interpolation value that is a luminance component is calculated for the first interpolation point of the two interpolation points by the bicubic method, and then the Y component interpolation is performed for the second interpolation point. The values are calculated by the bicubic method, and finally, the interpolation values of the Cb component and the Cr component, which are the pigment components, are calculated by the bilinear method shown in FIG. 10 for the first interpolation point and the second interpolation point. If the number of interpolation points is an odd number and one remains at the end, the interpolation value of the Y component that is the luminance component is calculated by the bicubic method for the interpolation point, and then the Cb component and Cr that are the pigment components The component interpolation value is set as the first interpolation point, and the coefficient of the second interpolation point is set to 0, which is calculated by the bilinear method shown in FIG.

出力手段である出力装置23は、液晶ディスプレイなどの表示装置よって構成され、制御プロセッサ24から指示される画像データを画像メモリ21から読み出し、読み出した画像データを表示装置に表示する。制御プロセッサ24は、たとえばプログラムおよびデータを記憶する記憶装置と、記憶装置に記憶されるプログラムを実行する中央処理装置(Central Processing Unit:以下「CPU」という)とを含んで構成される。CPUは、記憶装置に記憶されるプログラムを実行することによって、入力装置20、サイズ変換処理部22および出力装置23を制御する。   The output device 23 which is an output means is configured by a display device such as a liquid crystal display, reads image data instructed from the control processor 24 from the image memory 21, and displays the read image data on the display device. The control processor 24 includes, for example, a storage device that stores a program and data, and a central processing unit (hereinafter referred to as “CPU”) that executes a program stored in the storage device. The CPU controls the input device 20, the size conversion processing unit 22, and the output device 23 by executing a program stored in the storage device.

画像メモリ21、画像入力部221、入力データ制御部222、補間処理部223、出力データ制御部225および画像出力部226は、補間値算出手段あるいは補間値算出部である。コントローラ部227および制御プロセッサ24は、変換手段である。   The image memory 21, the image input unit 221, the input data control unit 222, the interpolation processing unit 223, the output data control unit 225, and the image output unit 226 are interpolation value calculation means or an interpolation value calculation unit. The controller unit 227 and the control processor 24 are conversion means.

図12は、制御プロセッサ24および補間演算部22が実行するサイズ変換処理の処理手順を示すフローチャートである。サイズ変換処理は、色素成分の補間値を算出する場合、図10に示したように、2つの補間点について同時に4つの補間値を算出する場合の処理である。図12に示したフローチャートの前処理ステップで、入力装置20によって画像データが入力され、入力された画像データが画像メモリ21に記憶され、図示しない操作部から画像サイズを変更する倍率が指示されると、ステップA1に移る。   FIG. 12 is a flowchart showing the processing procedure of the size conversion process executed by the control processor 24 and the interpolation calculation unit 22. The size conversion process is a process for calculating four interpolation values for two interpolation points at the same time as shown in FIG. In the preprocessing step of the flowchart shown in FIG. 12, image data is input by the input device 20, the input image data is stored in the image memory 21, and a magnification for changing the image size is instructed from an operation unit (not shown). Then, the process proceeds to step A1.

ステップA1では、パラメータを設定する。具体的には、制御プロセッサ24は、処理成分指定情報、入力画像サイズ情報および拡大縮小倍率情報などの情報を生成し、生成した情報をパラメータとして制御レジスタ227aに設定し記憶させる。制御プロセッサ24は、制御レジスタ227aにパラメータを設定した後、処理の開始をコントローラ部227に指示する。コントローラ部227は、制御プロセッサ24から処理の開始を指示されると、処理を開始する。   In step A1, parameters are set. Specifically, the control processor 24 generates information such as processing component designation information, input image size information, and enlargement / reduction ratio information, and sets and stores the generated information in the control register 227a as a parameter. After setting the parameters in the control register 227a, the control processor 24 instructs the controller unit 227 to start processing. When instructed to start processing from the control processor 24, the controller unit 227 starts processing.

ステップA2では、座標計算を行う。具体的には、コントローラ部227は、制御レジスタ227aに記憶される入力画像サイズ情報および拡大縮小倍率情報などの情報に基づいて、出力画像サイズおよび出力画像の座標計算を行い、計算結果を制御レジスタ227aに記憶した後、画像入力部221、入力データ制御部222、補間処理部223、係数部224、出力データ制御部225および画像出力部226に動作の開始を指示する。   In step A2, coordinate calculation is performed. Specifically, the controller unit 227 calculates the output image size and the coordinates of the output image based on information such as the input image size information and the enlargement / reduction ratio information stored in the control register 227a, and outputs the calculation result to the control register. After the data is stored in 227a, the image input unit 221, the input data control unit 222, the interpolation processing unit 223, the coefficient unit 224, the output data control unit 225, and the image output unit 226 are instructed to start operations.

ステップA3では、入力画像データを取得する。具体的には、動作の開始を指示された画像入力部221は、制御レジスタ227aに記憶されたパラメータを参照し、参照したパラメータによって指示される画像データを画像メモリ21から読み出し、読み出した画像データを入力バッファ221aに記憶する。   In step A3, input image data is acquired. Specifically, the image input unit 221 instructed to start the operation refers to the parameter stored in the control register 227a, reads the image data instructed by the referenced parameter from the image memory 21, and reads the read image data. Is stored in the input buffer 221a.

たとえば参照した処理成分指定情報が輝度成分を指定していると、画像入力部221は、補間値を算出する補間点を囲む4個の画素およびこの4個の画素を囲む12個の画素を含む16個の画素のY成分の画素データP11〜P44を画像メモリ21から読み出し、読み出した16個のY成分の画素データP11〜P44を入力バッファ221aに記憶する。あるいは参照した処理成分指定情報が色差成分を指定していると、第1の補間点を囲む4個の画素のCb成分の画素データPA22〜PA33およびCr成分の画素データPB22〜PB33、ならびに第2の補間点を囲む4個の画素のCb成分の画素データPC22〜PC33およびCr成分の画素データPD22〜PD33を読み出し、読み出した4個のCb成分の画素データPA22〜PA33および4個のCr成分の画素データPB22〜PB33、ならびに4個のCb成分の画素データPC22〜PC33および4個のCr成分の画素データPD22〜PD33を入力バッファ221aに記憶する。 For example, when the referred processing component designation information designates a luminance component, the image input unit 221 includes four pixels surrounding an interpolation point for calculating an interpolation value and twelve pixels surrounding the four pixels. The 16 pixel Y component pixel data P 11 to P 44 of the 16 pixels are read from the image memory 21, and the read 16 Y component pixel data P 11 to P 44 are stored in the input buffer 221a. Or if the referenced processing component specifying information specifies a color difference component, the first pixel data PA 22 of Cb components of the four pixels surrounding the interpolation point ~PA 33 and Cr components of the pixel data PB 22 ~PB 33 , and second read pixel data PC 22 to PC 33 and Cr components of the pixel data PD 22 -PD 33 of Cb components of the four pixels surrounding the interpolation point, the four Cb component read pixel data PA 22 ˜PA 33 and four Cr component pixel data PB 22 to PB 33 , four Cb component pixel data PC 22 to PC 33 and four Cr component pixel data PD 22 to PD 33 are input buffer 221a. To remember.

さらに、画像入力部221は、処理成分指定情報が輝度成分を指定している場合は、入力バッファ221aに記憶した16個のY成分の画素データP11〜P44を入力データ制御部222に送る。処理成分指定情報が色差成分を指定している場合は、入力バッファ221aに記憶した4個のCb成分の画素データPA22〜PA33および4個のCr成分の画素データPB22〜PB33、ならびに4個のCb成分の画素データPC22〜PC33および4個のCr成分の画素データPD22〜PD33を読み出し、読み出した4個のCb成分の画素データPA22〜PA33および4個のCr成分の画素データPB22〜PB33、ならびに4個のCb成分の画素データPC22〜PC33および4個のCr成分の画素データPD22〜PD33を、入力データ制御部222に送る。 Further, when the processing component designation information designates a luminance component, the image input unit 221 sends the 16 Y component pixel data P 11 to P 44 stored in the input buffer 221 a to the input data control unit 222. . If the processing component specifying information specifies a color difference component, the input buffer 221a pixel data of the four Cb components stored in PA 22 ~PA 33 and four Cr components of the pixel data PB 22 ~PB 33, and The four Cb component pixel data PC 22 to PC 33 and the four Cr component pixel data PD 22 to PD 33 are read, and the read four Cb component pixel data PA 22 to PA 33 and the four Cr component data are read out. Component pixel data PB 22 to PB 33 , four Cb component pixel data PC 22 to PC 33, and four Cr component pixel data PD 22 to PD 33 are sent to the input data control unit 222.

ステップA4では、補間計算処理を行う。具体的には、入力データ制御部222は、画像入力部221から受け取る16個の画素データを、補間処理部223への入力データとして補間処理部223に送る。補間処理部223への入力データへの変換が必要であれば、補間処理部223への入力データに変換して補間処理部223に送る。補間処理部223は、入力データ制御部222から受け取る16個の画像データP11〜P44、および係数部224から受け取る重み係数f(x)〜f(x)およびf(y)〜f(y)に基づいて、中間値PA〜PDを算出し、算出した中間値PA〜PDを出力データ制御部225に送る。 In step A4, an interpolation calculation process is performed. Specifically, the input data control unit 222 sends 16 pieces of pixel data received from the image input unit 221 to the interpolation processing unit 223 as input data to the interpolation processing unit 223. If conversion to input data to the interpolation processing unit 223 is necessary, it is converted to input data to the interpolation processing unit 223 and sent to the interpolation processing unit 223. The interpolation processing unit 223 includes 16 pieces of image data P 11 to P 44 received from the input data control unit 222 and weight coefficients f (x 1 ) to f (x 4 ) and f (y 1 ) to f received from the coefficient unit 224. Based on f (y 4 ), intermediate values PA to PD are calculated, and the calculated intermediate values PA to PD are sent to the output data control unit 225.

出力データ制御部225は、補間処理部223から受け取る中間値に基づいて補間値を算出し、算出した補間値を画像出力部226に送る。輝度成分の場合は、中間値PA〜PDを加算して補間値Pを算出し、算出した補間値Pを画像出力部226に送る。色差成分の場合は、補間処理部223から受け取った中間値PA〜PDを補間値PA〜PDとして画像出力部226に送る。ステップA4の補間計算処理は、図13に示す補間計算処理を呼び出すことによって処理される。   The output data control unit 225 calculates an interpolation value based on the intermediate value received from the interpolation processing unit 223, and sends the calculated interpolation value to the image output unit 226. In the case of the luminance component, the intermediate values PA to PD are added to calculate the interpolation value P, and the calculated interpolation value P is sent to the image output unit 226. In the case of the color difference component, the intermediate values PA to PD received from the interpolation processing unit 223 are sent to the image output unit 226 as the interpolation values PA to PD. The interpolation calculation process of step A4 is processed by calling the interpolation calculation process shown in FIG.

ステップA5では、出力画像データ送信を行う。具体的には、画像出力部226は、輝度成分の場合は、出力データ制御部225から受け取る補間値PをY成分の画素データとして出力バッファ226aに記憶し、色差成分の場合は、出力データ制御部225から受け取る補間値PA〜PDのうち、補間値PAを第1の補間点のCb成分の画素データとして、補間値PBを第1の補間点のCr成分の画素データとして、補間値PCを第2の補間点のCb成分の画素データとして、補間値PDを第2の補間点のCr成分の画素データとして出力バッファ226aに記憶する。そして、出力バッファ226aに記憶するY成分の画素データ、あるいはCb成分の画素データおよびCr成分の画素データを画像メモリ21に送り、出力画像データとして記憶させる。   In step A5, output image data is transmitted. Specifically, the image output unit 226 stores the interpolation value P received from the output data control unit 225 in the output buffer 226a as the Y component pixel data in the case of the luminance component, and outputs data control in the case of the color difference component. Among the interpolation values PA to PD received from the unit 225, the interpolation value PA is used as the pixel data of the Cb component of the first interpolation point, the interpolation value PB is used as the pixel data of the Cr component of the first interpolation point, and the interpolation value PC is used. As the pixel data of the Cb component at the second interpolation point, the interpolation value PD is stored in the output buffer 226a as the pixel data of the Cr component at the second interpolation point. Then, the Y component pixel data or the Cb component pixel data and the Cr component pixel data stored in the output buffer 226a are sent to the image memory 21 and stored as output image data.

ステップA6では、すべての出力画像データを作成したか否かを判定する。コントローラ部227は、1つの色成分について、出力画像サイズに変換された出力画像のすべての画素について、出力画像データに変換されると、すべての出力画像データを作成したと判定し、ステップA7に進む。1つの色成分について、出力画像サイズに変換された出力画像のすべての画素について、出力画像データに変換されていないと、すべての出力画像データを作成していないと判定し、ステップA2に戻り、ステップA2〜ステップA5を繰り返す。   In step A6, it is determined whether all output image data has been created. When all the pixels of the output image converted into the output image size are converted into the output image data for one color component, the controller unit 227 determines that all the output image data has been created, and the process proceeds to Step A7. move on. If it is not converted to output image data for all pixels of the output image converted to the output image size for one color component, it is determined that all output image data has not been created, and the process returns to step A2. Repeat step A2 to step A5.

ステップA7では、すべての色成分を処理したか否かを判定する。制御プロセッサ24は、すべての色成分つまり輝度成分および色差成分を処理したと判定すると、サイズ変換処理を終了し、すべての色成分つまり輝度成分および色差成分を処理していないと判定すると、制御レジスタ227aに記憶される処理成分指定情報を次の色成分に変更し、ステップA1に戻り、次の色成分について、ステップA1〜ステップA6を繰り返す。   In step A7, it is determined whether or not all color components have been processed. When the control processor 24 determines that all the color components, that is, the luminance component and the color difference component have been processed, the control processor 24 ends the size conversion process, and when it determines that all the color components, that is, the luminance component and the color difference component have not been processed, The processing component designation information stored in 227a is changed to the next color component, the process returns to step A1, and steps A1 to A6 are repeated for the next color component.

図12に示したサイズ変換処理画像が終了すると、図12に示していない後処理ステップで、メモリ21に記憶される出力画像データは、出力装置23によって出力される。   When the size conversion processing image shown in FIG. 12 is completed, output image data stored in the memory 21 is output by the output device 23 in a post-processing step not shown in FIG.

図13は、補間演算部22が実行する補間計算処理の処理手順を示すフローチャートである。図12に示したステップA4が実行されると、補間計算処理が呼び出され、ステップB1に移る。   FIG. 13 is a flowchart illustrating the processing procedure of the interpolation calculation process executed by the interpolation calculation unit 22. When step A4 shown in FIG. 12 is executed, the interpolation calculation process is called, and the process proceeds to step B1.

ステップB1では、輝度成分の処理であるか否かが判定される。具体的には、入力データ制御部222および出力データ制御部225は、制御レジスタ227aに記憶される処理成分指定情報を参照し、処理成分指定情報が輝度成分を指定していると、輝度成分の処理であると判定し、ステップB2に進む。制御レジスタ227aに記憶される処理成分指定情報を参照し、処理成分指定情報が色差成分を指定していると、輝度成分の処理でないと判定し、ステップB3に進む。   In step B1, it is determined whether or not the process is a luminance component. Specifically, the input data control unit 222 and the output data control unit 225 refer to the processing component designation information stored in the control register 227a, and if the processing component designation information designates the luminance component, the luminance component It determines with it being a process and progresses to step B2. With reference to the processing component designation information stored in the control register 227a, if the processing component designation information designates a color difference component, it is determined that the processing is not a luminance component, and the process proceeds to step B3.

ステップB2では、輝度成分の補間計算を行う。具体的には、入力データ制御部222は、画像入力部221から受け取る16個の画素データP11〜P44を、変換することなく入力データとして補間処理部223に送る。補間処理部223は、入力データ制御部222から受け取る16個の画像データP11〜P44、および係数部224から受け取る重み係数f(x)〜f(x)およびf(y)〜f(y)に基づいて、中間値PA〜PDを算出し、算出した中間値PA〜PDを出力データ制御部225に送る。出力データ制御部225は、補間処理部223から受け取る中間値PA〜PDを加算して補間値Pを算出し、算出した補間値Pを画像出力部226に送り、補間計算処理を終了する。 In step B2, a luminance component interpolation calculation is performed. Specifically, the input data control unit 222 sends the 16 pieces of pixel data P 11 to P 44 received from the image input unit 221 to the interpolation processing unit 223 as input data without conversion. The interpolation processing unit 223 includes 16 pieces of image data P 11 to P 44 received from the input data control unit 222 and weight coefficients f (x 1 ) to f (x 4 ) and f (y 1 ) to f received from the coefficient unit 224. Based on f (y 4 ), intermediate values PA to PD are calculated, and the calculated intermediate values PA to PD are sent to the output data control unit 225. The output data control unit 225 adds the intermediate values PA to PD received from the interpolation processing unit 223 to calculate the interpolation value P, sends the calculated interpolation value P to the image output unit 226, and ends the interpolation calculation processing.

ステップB3では、入力データを生成する。具体的には、入力データ制御部222は、置き換え式である式(33)に従って、画像入力部221から受け取る4個のCb成分の画像データPA22〜PA33および4個のCr成分の画像データPB22〜PB33、ならびに4個のCb成分の画素データPC22〜PC33および4個のCr成分の画素データPD22〜PD33を、16個の画素データP11〜P44に置き換える。
P11=PA22,P12=PA23,P13=PC22,P14=PC23,P21=PA32,P22=PA33,P23=PC32,P24=PC33,
P31=PB22,P32=PB23,P33=PD22,P34=PD23,P41=PB32,P42=PB33,P43=PD32,P44=PD33 …(33)
In step B3, input data is generated. Specifically, the input data control unit 222 performs the four Cb component image data PA 22 to PA 33 and the four Cr component image data received from the image input unit 221 according to Expression (33) which is a replacement expression. The PB 22 to PB 33 , the four Cb component pixel data PC 22 to PC 33 and the four Cr component pixel data PD 22 to PD 33 are replaced with 16 pixel data P 11 to P 44 .
P 11 = PA 22 , P 12 = PA 23 , P 13 = PC 22 , P 14 = PC 23 , P 21 = PA 32 , P 22 = PA 33 , P 23 = PC 32 , P 24 = PC 33 ,
P 31 = PB 22 , P 32 = PB 23 , P 33 = PD 22 , P 34 = PD 23 , P 41 = PB 32 , P 42 = PB 33 , P 43 = PD 32 , P 44 = PD 33 … (33 )

入力データ制御部222は、置き換え後の16個の画素データP11〜P44を入力データとして補間処理部223に送る。 The input data control unit 222 sends the 16 pieces of pixel data P 11 to P 44 after replacement to the interpolation processing unit 223 as input data.

ステップB4では、色差成分の補間計算を行う。具体的には、補間処理部223は、入力データ制御部222から受け取る16個の画像データP11〜P44、および係数部224から受け取る重み係数f(x)〜f(x)およびf(y)〜f(y)に基づいて、中間値PA〜PDを算出し、算出した中間値PA〜PDを出力データ制御部225に送る。 In step B4, interpolation calculation of color difference components is performed. Specifically, the interpolation processing unit 223 includes 16 pieces of image data P 11 to P 44 received from the input data control unit 222 and weighting factors f (x 1 ) to f (x 4 ) and f received from the coefficient unit 224. Based on (y 1 ) to f (y 4 ), intermediate values PA to PD are calculated, and the calculated intermediate values PA to PD are sent to the output data control unit 225.

ステップB5では、出力データを生成して、補間計算処理を終了する。具体的には、出力データ制御部225は、補間処理部223から中間値PA〜PDを受け取ると、受け取った中間値PA〜PDを補間値PA〜PDとして画像出力部226に送り、補間計算処理を終了する。図12に示したステップA1〜A7は、変換ステップである。   In step B5, output data is generated and the interpolation calculation process is terminated. Specifically, when the output data control unit 225 receives the intermediate values PA to PD from the interpolation processing unit 223, the output data control unit 225 sends the received intermediate values PA to PD to the image output unit 226 as the interpolation values PA to PD, and performs interpolation calculation processing. Exit. Steps A1 to A7 shown in FIG. 12 are conversion steps.

上述した実施の形態では、輝度成分にバイキュービック法を、そして色差成分にバイリニア法を適用したが、適用する補間方法の組み合わせは、目的に応じて自由に変更してもよい。さらに、画像をYCbCr方式つまりYUV方式で表した画像データに対して適用したが、画像を他の方式たとえばRGB(Red Green Blue)方式あるいはYIQ(Luma
In-phase Quadrature)方式で表した画像データにも適用可能である。
In the above-described embodiment, the bicubic method is applied to the luminance component and the bilinear method is applied to the chrominance component. However, the combination of interpolation methods to be applied may be freely changed according to the purpose. Further, the image is applied to the image data represented by the YCbCr method, that is, the YUV method. However, the image may be applied to other methods such as RGB (Red Green Blue) method or YIQ (Luma
The present invention can also be applied to image data represented by an In-phase Quadrature) method.

上述した実施の形態では、補間演算部12を画像処理装置1に適用し、補間演算部22をディジタルスチルカメラ2に適用したが、補間演算部12あるいは補間演算部22は、補間計算を行う他の装置にも適用可能である。   In the above-described embodiment, the interpolation calculation unit 12 is applied to the image processing apparatus 1 and the interpolation calculation unit 22 is applied to the digital still camera 2. However, the interpolation calculation unit 12 or the interpolation calculation unit 22 performs an interpolation calculation. It can be applied to other devices.

このように、図示しない入力装置あるいは入力装置20によって、相互に異なるY成分、Cb成分およびCr成分からなる画素によって構成される画像を表す画像データが入力され、図示しない操作部によって、画像のサイズを変更する倍率が指示される。補間値算出手段、具体的には、入力画像メモリ11、入力データ制御部121、補間処理部122、出力データ制御部123および出力画像メモリ13あるいは画像メモリ21、画像入力部221、入力データ制御部222、補間処理部223、出力データ制御部225および画像出力部226によって、3次たたみ込み内挿法または共1次内挿法によって補間値が算出される。   As described above, image data representing an image composed of pixels having different Y components, Cb components, and Cr components is input by the input device or the input device 20 (not shown), and the size of the image is input by the operation unit (not shown). The magnification for changing is indicated. Interpolation value calculating means, specifically, input image memory 11, input data control unit 121, interpolation processing unit 122, output data control unit 123 and output image memory 13 or image memory 21, image input unit 221, input data control unit 222, the interpolation processing unit 223, the output data control unit 225, and the image output unit 226 calculate an interpolation value by the cubic convolution interpolation method or the bilinear interpolation method.

入出力制御部124あるいはコントローラ部227および制御プロセッサ24によって、前記補間値算出手段を用いて、図示しない入力装置あるいは入力装置20によって入力される画像データが、図示しない操作部によって指示される倍率で変更したサイズの画像を表す画像データに変換される。図示しない出力装置あるいは出力装置23によって、入出力制御部124あるいはコントローラ部227および制御プロセッサ24によって変換される画像データが出力される。   The input / output control unit 124 or the controller unit 227 and the control processor 24 use the interpolation value calculation means to convert image data input by an input device (not shown) or the input device 20 at a magnification indicated by an operation unit (not shown). It is converted into image data representing the image of the changed size. Image data converted by the input / output control unit 124 or the controller unit 227 and the control processor 24 is output by an output device or an output device 23 (not shown).

さらに、入出力制御部124あるいはコントローラ部227および制御プロセッサ24によって、変換前の座標系において変換後の画像データが示す画像の画素に対応する位置である補間点でのY成分、Cb成分およびCr成分の補間値が、前記補間値算出手段によって算出されるとき、Y成分については、補間点ごとにそれぞれ、図示しない入力装置あるいは入力装置20によって入力される画像データが示す入力画像の画素のうち、補間点を囲む4個の画素およびこの4個の画素を囲む12個の画素を含む16個の画素のY成分に基づいて、3次たたみ込み内挿法によってY成分の補間値が算出される。   Further, by the input / output control unit 124 or the controller unit 227 and the control processor 24, the Y component, the Cb component, and the Cr at the interpolation point that is the position corresponding to the pixel of the image indicated by the image data after conversion in the coordinate system before conversion When the interpolated value of the component is calculated by the interpolated value calculating means, for the Y component, for each interpolation point, among the pixels of the input image indicated by the input device (not shown) or the image data input by the input device 20 Based on the Y components of 16 pixels including four pixels surrounding the interpolation point and 12 pixels surrounding the four pixels, the interpolation value of the Y component is calculated by the cubic convolution interpolation method. The

第2成分および第3成分については、2つの補間点ごとに同時に、2つの補間点のうちの第1の補間点のCb成分の補間値が、前記入力画像の画素のうちの第1の補間点を囲む4個の画素のCb成分に基づいて、第1の補間点のCr成分の補間値が第1の補間点を囲む前記4個の画素のCr成分に基づいて、2つの補間点のうちの第1の補間点とは異なる第2の補間点のCb成分の補間値が、前記入力画像の画素のうちの第2の補間点を囲む4個の画素のCb成分に基づいて、および第2の補間点のCr成分の補間値が第2の補間点を囲む前記4個の画素のCr成分に基づいて、共1次内挿法によって算出される。   As for the second component and the third component, the interpolation value of the Cb component at the first interpolation point of the two interpolation points is the first interpolation among the pixels of the input image at the same time every two interpolation points. Based on the Cb component of the four pixels surrounding the point, the interpolation value of the Cr component of the first interpolation point is based on the Cr component of the four pixels surrounding the first interpolation point. The interpolation value of the Cb component of the second interpolation point different from the first interpolation point is based on the Cb components of the four pixels surrounding the second interpolation point of the pixels of the input image, and The interpolated value of the Cr component at the second interpolation point is calculated by bilinear interpolation based on the Cr components of the four pixels surrounding the second interpolation point.

そして、補間値算出手段によって算出される第1成分の補間値を第1成分、補間値算出手段によって算出される第2成分の補間値を第2成分、および補間値算出手段によって算出される第3成分の補間値を第3成分とする画素によって構成される画像を表す画像データが変換後の画像データとされる。   Then, the interpolation value of the first component calculated by the interpolation value calculation means is the first component, the interpolation value of the second component calculated by the interpolation value calculation means is the second component, and the first value calculated by the interpolation value calculation means. Image data representing an image composed of pixels having the third component interpolation value as the third component is the converted image data.

そして、前記補間値算出手段によって算出されるY成分の補間値をY成分、前記補間値算出手段によって算出されるCb成分の補間値をCb成分、および前記補間値算出手段によって算出されるCr成分の補間値をCr成分とする画素によって構成される画像を表す画像データが変換後の画像データとされる。   The Y component interpolation value calculated by the interpolation value calculation means is the Y component, the Cb component interpolation value calculated by the interpolation value calculation means is the Cb component, and the Cr component is calculated by the interpolation value calculation means. The image data representing an image constituted by pixels having the interpolation value of Cr as the Cr component is the converted image data.

したがって、3次たたみ込み内挿法または共1次内挿法によって補間値を算出する補間値算出手段として、たとえばハードウェア、具体的には、入力画像メモリ11、入力データ制御部121、補間処理部122、出力データ制御部123および出力画像メモリ13あるいは画像メモリ21、画像入力部221、入力データ制御部222、補間処理部223、出力データ制御部225および画像出力部226を有しているので、補間値を算出するプログラムを実行して逐次計算するよりも短時間で3次たたみ込み内挿法による補間値を算出することができる。さらに、3次たたみ込み内挿法によって補間値を算出する前記ハードウェアを用いて、共1次内挿法によって算出される補間値を算出することができるので、共1次内挿法によって補間値を算出するためのハードウェアが不要であり、回路面積およびコストの低減化を図ることができる。すなわち、処理速度が早く、かつ回路面積およびコストの少ない回路で画像の補間を行うことができる。   Therefore, as an interpolation value calculation means for calculating an interpolation value by cubic convolution interpolation or bilinear interpolation, for example, hardware, specifically, input image memory 11, input data control unit 121, interpolation processing Section 122, output data control section 123 and output image memory 13 or image memory 21, image input section 221, input data control section 222, interpolation processing section 223, output data control section 225, and image output section 226. The interpolation value can be calculated by the third-order convolution interpolation method in a shorter time than when the program for calculating the interpolation value is executed and sequentially calculated. Furthermore, since the interpolation value calculated by the bilinear interpolation method can be calculated using the hardware that calculates the interpolation value by the cubic convolution interpolation method, the interpolation is performed by the bilinear interpolation method. Hardware for calculating the value is not required, and the circuit area and cost can be reduced. That is, the image can be interpolated with a circuit having a high processing speed and a small circuit area and cost.

さらに、係数部125あるいは係数部224によって、3次たたみ込み内挿法によって補間値を算出するために必要なY成分の補間係数、および共1次内挿法によって補間値を算出するために必要なCb成分およびCr成分の補間係数を表すテーブルが記憶される。   Further, the coefficient part 125 or the coefficient part 224 needs to calculate the interpolation coefficient of the Y component necessary for calculating the interpolation value by the cubic convolution interpolation method and the interpolation value by the bilinear interpolation method. A table representing interpolation coefficients of the Cb component and Cr component is stored.

入力画像メモリ11、入力データ制御部121、補間処理部122、出力データ制御部123および出力画像メモリ13あるいは画像メモリ21、画像入力部221、入力データ制御部222、補間処理部223、出力データ制御部225および画像出力部226によって、前記16個の画素のY成分、および係数部125あるいは係数部224に記憶されるテーブルが示すY成分の補間係数に基づいて、Y成分の補間値が算出される。   Input image memory 11, input data control unit 121, interpolation processing unit 122, output data control unit 123, and output image memory 13 or image memory 21, image input unit 221, input data control unit 222, interpolation processing unit 223, output data control The Y component interpolation value is calculated by the unit 225 and the image output unit 226 based on the Y component of the 16 pixels and the Y component interpolation coefficient indicated by the table stored in the coefficient unit 125 or the coefficient unit 224. The

前記第1の補間点または第2の補間点を囲む4個の画素のCb成分、および係数部125あるいは係数部224に記憶されるテーブルが示すCb成分およびCr成分の補間係数に基づいて、Cb成分の補間値が算出され、前記第1の補間点または第2の補間点を囲む4個の画素のCr成分、および係数部125あるいは係数部224に記憶されるテーブルが示すCb成分およびCr成分の補間係数に基づいて、Cr成分の補間値が算出される。   Based on the Cb component of the four pixels surrounding the first interpolation point or the second interpolation point, and the interpolation coefficient of the Cb component and the Cr component indicated by the table stored in the coefficient unit 125 or the coefficient unit 224, Cb Interpolated values of the components are calculated, the Cr components of the four pixels surrounding the first interpolation point or the second interpolation point, and the Cb component and the Cr component indicated by the table stored in the coefficient part 125 or the coefficient part 224 Based on the interpolation coefficient, the interpolation value of the Cr component is calculated.

すなわち、補間値を計算するために必要な補間係数を内挿法ごとに予め計算して記憶しているので、補間値を算出する内挿法に応じて補間係数を選択することができ、さらに補間係数を算出するために必要な処理時間を削減することができる。   That is, since the interpolation coefficient necessary for calculating the interpolation value is calculated and stored in advance for each interpolation method, the interpolation coefficient can be selected according to the interpolation method for calculating the interpolation value. Processing time required to calculate the interpolation coefficient can be reduced.

さらに、入力画像メモリ11、入力データ制御部121、補間処理部122、出力データ制御部123および出力画像メモリ13あるいは画像メモリ21、画像入力部221、入力データ制御部222、補間処理部223、出力データ制御部225および画像出力部226は、補間点の位置をXY座標系で表したとき、前記16個の画素のうちの1つの画素の第1成分とその第1成分に対応するX軸方向の第1の補間係数とを乗算する2つの第1の乗算器、たとえば乗算器311,312と、2つの第1の乗算器の出力を加算する第1の加算器、たとえば加算器313と、第1の加算器の出力と前記第1成分に対応するY軸方向の第1の補間係数とを乗算する第2の乗算器、たとえば乗算器314とを備える8つの論理回路部CAL31〜38と、8つの論理回路部CAL31〜38を4つのグループに分けたとき、各グループの2つの第2の乗算器の出力を加算する4つの第2の加算器391〜394とを含む。したがって、式(9)〜(12)によって回路を構成する場合よりも乗算器の数を低減することができる。   Furthermore, the input image memory 11, the input data control unit 121, the interpolation processing unit 122, the output data control unit 123, and the output image memory 13 or the image memory 21, the image input unit 221, the input data control unit 222, the interpolation processing unit 223, and the output When the position of the interpolation point is represented in the XY coordinate system, the data control unit 225 and the image output unit 226 have the first component of one of the 16 pixels and the X-axis direction corresponding to the first component. Two first multipliers, for example, multipliers 311 and 312, and a first adder for adding the outputs of the two first multipliers, for example, adder 313, Eight logic circuit portions CAL31 to CAL3 each including a second multiplier, for example, a multiplier 314, for multiplying the output of the first adder and the first interpolation coefficient in the Y-axis direction corresponding to the first component. If, when the divided eight logic circuit CAL31~38 into four groups, including four of the second adder 391 to 394 for adding the outputs of the two second multipliers of each group. Therefore, the number of multipliers can be reduced as compared with the case where the circuit is configured by the equations (9) to (12).

さらに、入力画像メモリ11、入力データ制御部121、補間処理部122、出力データ制御部123および出力画像メモリ13あるいは画像メモリ21、画像入力部221、入力データ制御部222、補間処理部223、出力データ制御部225および画像出力部226によって、3次たたみ込み内挿法によって補間値が算出されるとき、前記16個の画素のY成分、および記憶手段に記憶される補間係数情報が示す第1の補間係数が、前記8つの論理回路部CAL31〜38に入力され、前記4つのグループの第2の加算器の出力が加算されることによって、Y成分の補間値が算出される。   Furthermore, the input image memory 11, the input data control unit 121, the interpolation processing unit 122, the output data control unit 123, and the output image memory 13 or the image memory 21, the image input unit 221, the input data control unit 222, the interpolation processing unit 223, and the output When the data control unit 225 and the image output unit 226 calculate an interpolation value by cubic convolution interpolation, the Y component of the 16 pixels and the first interpolation coefficient information stored in the storage unit are shown. Are input to the eight logic circuit units CAL31 to CAL38, and the outputs of the four adders of the second adder are added to calculate the interpolation value of the Y component.

さらに、共1次内挿法によって4つの補間値が算出されるとき、前記第1の補間点を囲む4個の画素のCb成分、および記憶手段に記憶される補間係数情報が示す第2の補間係数が、前記4つのグループのうちの第1のグループの2つの論理回路部に入力され、第1のグループの出力が第1の補間点のCb成分の補間値とされる。前記第1の補間点を囲む4個の画素のCr成分、および記憶手段に記憶される補間係数情報が示す第2の補間係数が、前記4つのグループのうちの第2のグループの2つの論理回路部に入力され、第2のグループの出力が第1の補間点のCr成分の補間値とされる。前記第2の補間点を囲む4個の画素のCb成分、および記憶手段に記憶される補間係数情報が示す第2の補間係数が、前記4つのグループのうちの第3のグループの2つの論理回路部に入力され、第3のグループの出力が第2の補間点のCb成分の補間値とされる。そして、前記第2の補間点を囲む4個の画素のCr成分、および記憶手段に記憶される補間係数情報が示す第2の補間係数が、前記4つのグループのうちの第4のグループの2つの論理回路部に入力され、第4のグループの出力が第2の補間点のCr成分の補間値とされる。   Further, when four interpolation values are calculated by the bilinear interpolation method, the Cb components of the four pixels surrounding the first interpolation point and the second interpolation coefficient information stored in the storage means are shown. The interpolation coefficient is input to the two logic circuit units of the first group of the four groups, and the output of the first group is used as the interpolation value of the Cb component at the first interpolation point. The Cr components of the four pixels surrounding the first interpolation point and the second interpolation coefficient indicated by the interpolation coefficient information stored in the storage means are the two logics of the second group of the four groups. Input to the circuit unit, and the output of the second group is the interpolation value of the Cr component of the first interpolation point. The Cb components of the four pixels surrounding the second interpolation point and the second interpolation coefficient indicated by the interpolation coefficient information stored in the storage means are two logics of the third group of the four groups. The output of the third group is input to the circuit unit, and the interpolation value of the Cb component of the second interpolation point is used. Then, the Cr components of the four pixels surrounding the second interpolation point and the second interpolation coefficient indicated by the interpolation coefficient information stored in the storage means are 2 in the fourth group of the four groups. The fourth group output is used as an interpolation value of the Cr component at the second interpolation point.

したがって、3次たたみ込み内挿法については1つの補間値を算出し、共1次内挿法については4つの補間値を同時に算出することができる。   Therefore, one interpolation value can be calculated for the cubic convolution method, and four interpolation values can be calculated simultaneously for the bilinear interpolation method.

さらに、図12に示したフローチャートにおいて、図示しない前処理ステップでは、相互に異なるY成分、Cb成分およびCr成分からなる画素によって構成される画像を表す画像データを入力し、画像のサイズを変更する倍率を指示する。   Furthermore, in the pre-processing step (not shown) in the flowchart shown in FIG. 12, image data representing an image composed of pixels having different Y components, Cb components, and Cr components is input, and the size of the image is changed. Specify the magnification.

ステップA1〜A7では、3次たたみ込み内挿法または共1次内挿法によって補間値を算出する補間値算出部、具体的には入力画像メモリ11、入力データ制御部121、補間処理部122、出力データ制御部123および出力画像メモリ13あるいは画像メモリ21、画像入力部221、入力データ制御部222、補間処理部223、出力データ制御部225および画像出力部226によって、図示しないステップで入力された画像データを、図示しない前処理ステップで指示された倍率で変更したサイズの画像を表す画像データに変換するにあたって、変換前の座標系において変換後の画像データが示す画像の画素に対応する位置である補間点での第1〜第3成分の補間値を、前記補間値算出部によって算出するとき、第1成分については、補間点ごとにそれぞれ、図示しない前処理ステップで入力された画像データが示す入力画像の画素のうち、補間点を囲む4個の画素およびこの4個の画素を囲む12個の画素を含む16個の画素のY成分に基づいて、3次たたみ込み内挿法によってY成分の補間値を算出する。   In steps A1 to A7, an interpolation value calculation unit that calculates an interpolation value by a cubic convolution interpolation method or a bilinear interpolation method, specifically, the input image memory 11, the input data control unit 121, and the interpolation processing unit 122. The output data control unit 123 and the output image memory 13 or the image memory 21, the image input unit 221, the input data control unit 222, the interpolation processing unit 223, the output data control unit 225, and the image output unit 226 are input in steps not shown. When the converted image data is converted into image data representing an image having a size changed at a magnification designated in a preprocessing step (not shown), a position corresponding to the pixel of the image indicated by the converted image data in the coordinate system before conversion When the interpolation value of the first to third components at the interpolation point is calculated by the interpolation value calculator, the first component Each of the interpolation points includes four pixels surrounding the interpolation point and twelve pixels surrounding the four pixels among the pixels of the input image indicated by the image data input in the preprocessing step (not shown). Based on the Y component of each pixel, an interpolated value of the Y component is calculated by cubic convolution interpolation.

さらに、第2成分および第3成分については、2つの補間点ごとに同時に、2つの補間点のうちの第1の補間点のCb成分の補間値を、前記入力画像の画素のうちの第1の補間点を囲む4個の画素のCb成分に基づいて、第1の補間点のCr成分の補間値を第1の補間点を囲む前記4個の画素のCr成分に基づいて、2つの補間点のうちの第1の補間点とは異なる第2の補間点のCb成分の補間値を、前記入力画像の画素のうちの第2の補間点を囲む4個の画素のCb成分に基づいて、および第2の補間点のCr成分の補間値を第2の補間点を囲む前記4個の画素のCr成分に基づいて、共1次内挿法によって算出する。   Further, with respect to the second component and the third component, the interpolation value of the Cb component at the first interpolation point of the two interpolation points is simultaneously set to the first of the pixels of the input image for every two interpolation points. Based on the Cb component of the four pixels surrounding the interpolation point, the interpolation value of the Cr component of the first interpolation point is calculated based on the Cr component of the four pixels surrounding the first interpolation point. The interpolation value of the Cb component of the second interpolation point different from the first interpolation point among the points is based on the Cb components of the four pixels surrounding the second interpolation point of the pixels of the input image. And the interpolated value of the Cr component of the second interpolation point is calculated by bilinear interpolation based on the Cr components of the four pixels surrounding the second interpolation point.

そして、前記補間値算出部によって算出されたY成分の補間値をY成分、前記補間値算出部によって算出されたCb成分の補間値をCb成分、および前記補間値算出部によってによって算出されたCr成分の補間値をCr成分とする画素によって構成される画像を表す画像データを変換後の画像データとする。さらに、図示しない後処理ステップでは、ステップA1〜A7で変換された画像データを出力する。   Then, the interpolation value of the Y component calculated by the interpolation value calculation unit is the Y component, the interpolation value of the Cb component calculated by the interpolation value calculation unit is the Cb component, and Cr is calculated by the interpolation value calculation unit. Image data representing an image composed of pixels whose component interpolation values are Cr components is assumed to be converted image data. Further, in a post-processing step (not shown), the image data converted in steps A1 to A7 is output.

したがって、本発明に係る画像処理方法を適用すれば、3次たたみ込み内挿法または共1次内挿法によって補間値を算出する補間値算出部として、たとえばハードウェア、具体的には、入力画像メモリ11、入力データ制御部121、補間処理部122、出力データ制御部123および出力画像メモリ13あるいは画像メモリ21、画像入力部221、入力データ制御部222、補間処理部223、出力データ制御部225および画像出力部226を用いるので、補間値を算出するプログラムを実行して逐次計算するよりも短時間で3次たたみ込み内挿法による補間値を算出することができる。そして、3次たたみ込み内挿法によって補間値を算出する前記ハードウェアを用いて、共1次内挿法によって算出される補間値を算出することができるので、共1次内挿法によって補間値を算出するためのハードウェアが不要であり、回路面積およびコストの低減化を図ることができる。すなわち、処理速度が早く、かつ回路面積およびコストを少なくすることができる。   Therefore, when the image processing method according to the present invention is applied, as an interpolation value calculation unit that calculates an interpolation value by a cubic convolution interpolation method or a bilinear interpolation method, for example, hardware, specifically, an input Image memory 11, input data control unit 121, interpolation processing unit 122, output data control unit 123 and output image memory 13 or image memory 21, image input unit 221, input data control unit 222, interpolation processing unit 223, output data control unit Since the image output unit 226 and the image output unit 226 are used, it is possible to calculate the interpolation value by the third-order convolution interpolation method in a shorter time than when the program for calculating the interpolation value is executed and sequentially calculated. Since the interpolation value calculated by the bilinear interpolation method can be calculated using the hardware that calculates the interpolation value by the cubic convolution interpolation method, the interpolation is performed by the bilinear interpolation method. Hardware for calculating the value is not required, and the circuit area and cost can be reduced. That is, the processing speed is high, and the circuit area and cost can be reduced.

本発明の実施の一形態である画像処理装置1の概略の構成を示すブロック図である。1 is a block diagram illustrating a schematic configuration of an image processing apparatus 1 according to an embodiment of the present invention. 入力画像メモリ11に記憶される画像データが示す画像を構成する各画素51の位置と補間点52の位置との関係を示す図である。FIG. 4 is a diagram illustrating a relationship between the position of each pixel 51 and the position of an interpolation point 52 that form an image indicated by image data stored in an input image memory 11. 図2に示した領域53を拡大した図である。FIG. 3 is an enlarged view of a region 53 shown in FIG. 2. 図2に示した領域54を拡大した図である。FIG. 3 is an enlarged view of a region 54 shown in FIG. 2. ニアレストネイバー法を用いて補間値を求める例を説明するための図である。It is a figure for demonstrating the example which calculates | requires an interpolation value using the nearest neighbor method. 補間処理部122の構成を示すブロック図である。3 is a block diagram illustrating a configuration of an interpolation processing unit 122. FIG. 補間処理部122の論理回路図である。3 is a logic circuit diagram of an interpolation processing unit 122. FIG. 補間処理部122のうち中間値PAを算出する部分の論理回路図である。FIG. 6 is a logic circuit diagram of a portion for calculating an intermediate value PA in the interpolation processing unit 122. 補間演算部12を用いてバイリニア法による補間値を1つ算出するときに用いる画素データの配置を示す図である。It is a figure which shows arrangement | positioning of the pixel data used when calculating one interpolation value by a bilinear method using the interpolation calculating part. 補間演算部12を用いてバイリニア法による補間値を同時に4つ算出するときに用いる画素データの配置を示す図である。It is a figure which shows arrangement | positioning of the pixel data used when calculating four interpolation values by a bilinear method simultaneously using the interpolation calculating part. 本発明の実施の他の形態であるディジタルスチルカメラ2の構成を示すブロック図である。It is a block diagram which shows the structure of the digital still camera 2 which is the other embodiment of this invention. 制御プロセッサ24および補間演算部22が実行するサイズ変換処理の処理手順を示すフローチャートである。5 is a flowchart showing a processing procedure of size conversion processing executed by a control processor 24 and an interpolation calculation unit 22; 補間演算部22が実行する補間計算処理の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the interpolation calculation process which the interpolation calculating part 22 performs. 従来の技術による画像処理装置100の構成を示すブロック図である。It is a block diagram which shows the structure of the image processing apparatus 100 by a prior art.

符号の説明Explanation of symbols

1 画像処理装置
2 ディジタルスチルカメラ
11,101 入力画像メモリ
12,102 補間演算部
13,103 出力画像メモリ
20 入力装置
21 画像メモリ
22 サイズ変換処理部
23 出力装置
24 制御プロセッサ
31〜38 CAL
51 画素
52 補間点
221 画像入力部
221a 入力バッファ
121,222 入力データ制御部
122,223 補間処理部
123,225 出力データ制御部
124 入出力制御部
125,224 係数部
226 画像出力部
226a 出力バッファ
227 コントローラ部
227a 制御レジスタ
311,312,314,331,332,334 乗算器
313,333,391〜394 加算器
DESCRIPTION OF SYMBOLS 1 Image processing apparatus 2 Digital still camera 11,101 Input image memory 12,102 Interpolation calculating part 13,103 Output image memory 20 Input apparatus 21 Image memory 22 Size conversion process part 23 Output apparatus 24 Control processor 31-38 CAL
51 pixels 52 interpolation points 221 image input unit 221a input buffer 121, 222 input data control unit 122, 223 interpolation processing unit 123, 225 output data control unit 124 input / output control unit 125, 224 coefficient unit 226 image output unit 226a output buffer 227 Controller unit 227a Control register 311, 312, 314, 331, 332, 334 Multiplier 313, 333, 391-394 Adder

Claims (5)

相互に異なる第1〜第3成分からなる画素によって構成される画像を表す画像データを入力する入力手段と、
画像のサイズを変更する倍率を指示する指示手段と、
3次たたみ込み内挿法または共1次内挿法によって補間値を算出する補間値算出手段と、
補間値算出手段を用いて、入力手段によって入力される画像データを、指示手段によって指示される倍率で変更したサイズの画像を表す画像データに変換する変換手段と、
変換手段によって変換される画像データを出力する出力手段とを含み、
変換手段は、変換前の座標系において変換後の画像データが示す画像の画素に対応する位置である補間点での第1〜第3成分の補間値を補間値算出手段によって算出させるとき、
第1成分については、補間点ごとにそれぞれ、入力手段によって入力される画像データが示す入力画像の画素のうち、補間点を囲む4個の画素およびこの4個の画素を囲む12個の画素を含む16個の画素の第1成分に基づいて、3次たたみ込み内挿法によって第1成分の補間値を算出させ、
第2成分および第3成分については、2つの補間点ごとに同時に、2つの補間点のうちの第1の補間点での第2成分の補間値を、前記入力画像の画素のうちの第1の補間点を囲む4個の画素の第2成分に基づいて、第1の補間点での第3成分の補間値を第1の補間点を囲む前記4個の画素の第3成分に基づいて、2つの補間点のうちの第1の補間点とは異なる第2の補間点での第2成分の補間値を、前記入力画像の画素のうちの第2の補間点を囲む4個の画素の第2成分に基づいて、および第2の補間点での第3成分の補間値を第2の補間点を囲む前記4個の画素の第3成分に基づいて、共1次内挿法によって算出させ、
補間値算出手段によって算出される第1成分の補間値を第1成分、補間値算出手段によって算出される第2成分の補間値を第2成分、および補間値算出手段によって算出される第3成分の補間値を第3成分とする画素によって構成される画像を表す画像データを変換後の画像データとすることを特徴とする画像処理装置。
Input means for inputting image data representing an image constituted by pixels composed of mutually different first to third components;
An instruction means for instructing a magnification for changing the size of the image;
Interpolation value calculating means for calculating an interpolation value by a cubic convolution interpolation method or a bilinear interpolation method;
Conversion means for converting the image data input by the input means into image data representing an image having a size changed by the magnification indicated by the instruction means, using the interpolation value calculation means;
Output means for outputting image data converted by the conversion means,
When the conversion means causes the interpolation value calculation means to calculate the interpolation values of the first to third components at the interpolation points that are positions corresponding to the pixels of the image indicated by the image data after conversion in the coordinate system before conversion,
For the first component, for each interpolation point, among the pixels of the input image indicated by the image data input by the input means, four pixels surrounding the interpolation point and twelve pixels surrounding the four pixels are included. Based on the first component of the 16 pixels including, the interpolation value of the first component is calculated by the third-order convolution interpolation method,
For the second component and the third component, the interpolation value of the second component at the first interpolation point of the two interpolation points is simultaneously calculated for each of the two interpolation points, and the first of the pixels of the input image. Based on the second component of the four pixels surrounding the interpolation point, the interpolation value of the third component at the first interpolation point is based on the third component of the four pixels surrounding the first interpolation point. Interpolation values of the second component at the second interpolation point different from the first interpolation point of the two interpolation points are the four pixels surrounding the second interpolation point of the pixels of the input image. And the interpolated value of the third component at the second interpolation point based on the third component of the four pixels surrounding the second interpolation point by bilinear interpolation Let me calculate
The interpolation value of the first component calculated by the interpolation value calculation means is the first component, the interpolation value of the second component calculated by the interpolation value calculation means is the second component, and the third component is calculated by the interpolation value calculation means. An image processing apparatus characterized in that image data representing an image composed of pixels having a third component as an interpolation value is used as converted image data.
3次たたみ込み内挿法によって補間値を算出するために必要な第1の補間係数、および共1次内挿法によって補間値を算出するために必要な第2の補間係数を表す補間係数情報を記憶する記憶手段をさらに含み、
前記補間値算出手段は、
前記16個の画素の第1成分、および記憶手段に記憶される補間係数情報が示す第1の補間係数に基づいて、前記第1成分の補間値を算出し、
前記第1の補間点または第2の補間点を囲む4個の画素の第2成分、および記憶手段に記憶される補間係数情報が示す第2の補間係数に基づいて、前記第2成分の補間値を算出し、
前記第1の補間点または第2の補間点を囲む4個の画素の第3成分、および記憶手段に記憶される補間係数情報が示す第2の補間係数に基づいて、前記第3成分の補間値を算出することを特徴とする請求項1に記載の画像処理装置。
Interpolation coefficient information representing the first interpolation coefficient necessary for calculating the interpolation value by the cubic convolution interpolation method and the second interpolation coefficient necessary for calculating the interpolation value by the bilinear interpolation method Further includes storage means for storing
The interpolation value calculating means includes
Based on the first component of the 16 pixels and the first interpolation coefficient indicated by the interpolation coefficient information stored in the storage means, the interpolation value of the first component is calculated,
Interpolation of the second component based on the second component of the four pixels surrounding the first interpolation point or the second interpolation point and the second interpolation coefficient indicated by the interpolation coefficient information stored in the storage means Calculate the value,
Interpolation of the third component based on the third component of the four pixels surrounding the first interpolation point or the second interpolation point and the second interpolation coefficient indicated by the interpolation coefficient information stored in the storage means The image processing apparatus according to claim 1, wherein a value is calculated.
前記補間値算出手段は、
補間点の位置をXY座標系で表したとき、前記16個の画素のうちの1つの画素の第1成分とその第1成分に対応するX軸方向の第1の補間係数とを乗算する2つの第1の乗算器と、2つの第1の乗算器の出力を加算する第1の加算器と、第1の加算器の出力と前記第1成分に対応するY軸方向の第1の補間係数とを乗算する第2の乗算器とを備える8つの論理回路部と、
8つの論理回路部を4つのグループに分けたとき、各グループの2つの第2の乗算器の出力を加算する4つの第2の加算器とを含むことを特徴とする請求項2に記載の画像処理装置。
The interpolation value calculating means includes
When the position of the interpolation point is expressed in the XY coordinate system, the first component of one of the 16 pixels is multiplied by the first interpolation coefficient in the X-axis direction corresponding to the first component 2 A first adder for adding the outputs of the two first multipliers, and a first interpolation in the Y-axis direction corresponding to the output of the first adder and the first component Eight logic circuit units comprising a second multiplier for multiplying the coefficients;
3. The four second adders for adding the outputs of the two second multipliers of each group when the eight logic circuit units are divided into four groups. Image processing device.
前記補間値算出手段は、
3次たたみ込み内挿法によって補間値を算出するとき、前記16個の画素の第1成分、および記憶手段に記憶される補間係数情報が示す第1の補間係数を、前記8つの論理回路部に入力し、前記4つのグループの第2の加算器の出力を加算することによって、前記第1成分の補間値を算出し、
共1次内挿法によって4つの補間値を算出するとき、前記第1の補間点を囲む4個の画素の第2成分、および記憶手段に記憶される補間係数情報が示す第2の補間係数を前記4つのグループのうちの第1のグループの2つの論理回路部に入力し、第1のグループの出力を第1の補間点での第2成分の補間値とし、前記第1の補間点を囲む4個の画素の第3成分、および記憶手段に記憶される補間係数情報が示す第2の補間係数を前記4つのグループのうちの第2のグループの2つの論理回路部に入力し、第2のグループの出力を第1の補間点での第3成分の補間値とし、前記第2の補間点を囲む4個の画素の第2成分、および記憶手段に記憶される補間係数情報が示す第2の補間係数を前記4つのグループのうちの第3のグループの2つの論理回路部に入力し、第3のグループの出力を第2の補間点での第2成分の補間値とし、前記第2の補間点を囲む4個の画素の第3成分、および記憶手段に記憶される補間係数情報が示す第2の補間係数を前記4つのグループのうちの第4のグループの2つの論理回路部に入力し、第4のグループの出力を第2の補間点での第3成分の補間値とすることを特徴とする請求項3に記載の画像処理装置。
The interpolation value calculating means includes
When the interpolation value is calculated by the cubic convolution interpolation method, the eight logic circuit units represent the first interpolation coefficient indicated by the first component of the 16 pixels and the interpolation coefficient information stored in the storage means. And calculating the interpolated value of the first component by adding the outputs of the second adders of the four groups,
When four interpolation values are calculated by bilinear interpolation, the second component of the four pixels surrounding the first interpolation point and the second interpolation coefficient indicated by the interpolation coefficient information stored in the storage means Are input to two logic circuit units of the first group of the four groups, and the output of the first group is set as the interpolation value of the second component at the first interpolation point, and the first interpolation point The third component of the four pixels surrounding the second interpolation coefficient and the second interpolation coefficient indicated by the interpolation coefficient information stored in the storage means are input to the two logic circuit sections of the second group of the four groups, The output of the second group is the third component interpolation value at the first interpolation point, the second component of the four pixels surrounding the second interpolation point, and the interpolation coefficient information stored in the storage means Two theory of the third group out of the four groups indicating the second interpolation factor Input to the circuit unit, the output of the third group as the second component interpolation value at the second interpolation point, the third component of the four pixels surrounding the second interpolation point, and stored in the storage means The second interpolation coefficient indicated by the interpolation coefficient information to be input is input to the two logic circuit sections of the fourth group of the four groups, and the output of the fourth group is the third at the second interpolation point. The image processing apparatus according to claim 3, wherein an interpolated value of the component is used.
相互に異なる第1〜第3成分からなる画素によって構成される画像を表す画像データを入力する入力ステップと、
画像のサイズを変更する倍率を指示する指示ステップと、
3次たたみ込み内挿法または共1次内挿法によって補間値を算出する補間値算出部によって、入力ステップで入力された画像データを、指示ステップで指示された倍率で変更したサイズの画像を表す画像データに変換する変換ステップであって、
変換前の座標系において変換後の画像データが示す画像の画素に対応する位置である補間点での第1〜第3成分の補間値を補間値算出部によって算出するとき、
第1成分については、補間点ごとにそれぞれ、入力ステップで入力された画像データが示す入力画像の画素のうち、補間点を囲む4個の画素およびこの4個の画素を囲む12個の画素を含む16個の画素の第1成分に基づいて、3次たたみ込み内挿法によって第1成分の補間値を算出し、
第2成分および第3成分については、2つの補間点ごとに同時に、2つの補間点のうちの第1の補間点での第2成分の補間値を、前記入力画像の画素のうちの第1の補間点を囲む4個の画素の第2成分に基づいて、第1の補間点での第3成分の補間値を第1の補間点を囲む前記4個の画素の第3成分に基づいて、2つの補間点のうちの第1の補間点とは異なる第2の補間点での第2成分の補間値を、前記入力画像の画素のうちの第2の補間点を囲む4個の画素の第2成分に基づいて、および第2の補間点での第3成分の補間値を第2の補間点を囲む前記4個の画素の第3成分に基づいて、共1次内挿法によって算出し、
補間値算出部によって算出された第1成分の補間値を第1成分、補間値算出部によって算出された第2成分の補間値を第2成分、および補間値算出部によって算出された第3成分の補間値を第3成分とする画素によって構成される画像を表す画像データを変換後の画像データとする変換ステップと、
変換ステップで変換された画像データを出力する出力ステップとを含むことを特徴とする画像処理方法。
An input step of inputting image data representing an image constituted by pixels composed of mutually different first to third components;
An instruction step for instructing a magnification for changing the size of the image;
An image having a size obtained by changing the image data input in the input step by the magnification specified in the instruction step by the interpolation value calculation unit that calculates the interpolation value by the cubic convolution interpolation method or the bilinear interpolation method. A conversion step for converting into image data representing,
When the interpolation value calculation unit calculates the interpolation values of the first to third components at the interpolation point that is the position corresponding to the pixel of the image indicated by the image data after conversion in the coordinate system before conversion,
For the first component, for each interpolation point, among the pixels of the input image indicated by the image data input in the input step, four pixels surrounding the interpolation point and twelve pixels surrounding the four pixels are included. Calculating an interpolated value of the first component by a third-order convolution method based on the first component of the 16 pixels included;
For the second component and the third component, the interpolation value of the second component at the first interpolation point of the two interpolation points is simultaneously calculated for each of the two interpolation points, and the first of the pixels of the input image. Based on the second component of the four pixels surrounding the interpolation point, the interpolation value of the third component at the first interpolation point is based on the third component of the four pixels surrounding the first interpolation point. Interpolation values of the second component at the second interpolation point different from the first interpolation point of the two interpolation points are the four pixels surrounding the second interpolation point of the pixels of the input image. And the interpolated value of the third component at the second interpolation point based on the third component of the four pixels surrounding the second interpolation point by bilinear interpolation Calculate
The interpolation value of the first component calculated by the interpolation value calculator is the first component, the interpolation value of the second component calculated by the interpolation value calculator is the second component, and the third component calculated by the interpolation value calculator A conversion step of converting image data representing an image constituted by pixels having the interpolation value of the third component into image data after conversion;
An image processing method comprising: an output step of outputting the image data converted in the conversion step.
JP2008285994A 2008-11-06 2008-11-06 Image processing apparatus and image processing method Pending JP2010113554A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008285994A JP2010113554A (en) 2008-11-06 2008-11-06 Image processing apparatus and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008285994A JP2010113554A (en) 2008-11-06 2008-11-06 Image processing apparatus and image processing method

Publications (1)

Publication Number Publication Date
JP2010113554A true JP2010113554A (en) 2010-05-20

Family

ID=42302067

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008285994A Pending JP2010113554A (en) 2008-11-06 2008-11-06 Image processing apparatus and image processing method

Country Status (1)

Country Link
JP (1) JP2010113554A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011152531A1 (en) * 2010-06-03 2011-12-08 株式会社ニコン Image capture device

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011152531A1 (en) * 2010-06-03 2011-12-08 株式会社ニコン Image capture device
JP2011253431A (en) * 2010-06-03 2011-12-15 Nikon Corp Imaging apparatus
US8941771B2 (en) 2010-06-03 2015-01-27 Nikon Corporation Image-capturing device
US9494766B2 (en) 2010-06-03 2016-11-15 Nikon Corporation Image-capturing device
CN106842386A (en) * 2010-06-03 2017-06-13 株式会社尼康 Filming apparatus
US9992393B2 (en) 2010-06-03 2018-06-05 Nikon Corporation Image-capturing device
CN106842386B (en) * 2010-06-03 2019-08-30 株式会社尼康 Filming apparatus
US10511755B2 (en) 2010-06-03 2019-12-17 Nikon Corporation Image-capturing device
US10955661B2 (en) 2010-06-03 2021-03-23 Nikon Corporation Image-capturing device

Similar Documents

Publication Publication Date Title
Sun et al. Learned image downscaling for upscaling using content adaptive resampler
JP5914045B2 (en) Image processing apparatus, image processing method, and program
JPH05502534A (en) Digital image denoising system and method
JP2007193508A (en) Image processor and image processing program
JP4317619B2 (en) Image processing device
JP2014086956A (en) Image processing apparatus and image processing method
JP3830304B2 (en) Interpolation method and apparatus
JP5460987B2 (en) Image processing apparatus, image processing method, and image processing program
CN106296614B (en) Image processing apparatus and image processing method
JP2011199407A (en) Imaging device, image processor, and image processing method
JP2010113554A (en) Image processing apparatus and image processing method
JP2020017229A (en) Image processing apparatus, image processing method and image processing program
JP5482589B2 (en) Image processing apparatus, image processing method, and image processing program
JP2009140091A (en) Image processing apparatus and image processing method
JP2006238188A (en) Interpolation filter and video signal processing device
JP4265363B2 (en) Image processing device
WO2014156669A1 (en) Image processing device and image processing method
JP4345027B2 (en) Image processing program and image processing apparatus
JP2005293265A (en) Image processing device, and method
JP4265362B2 (en) Image processing device
KR102548993B1 (en) Image scaling system and method for supporting various image mode
JP2006060629A (en) Image processor, imaging device and image processing program
JP3655814B2 (en) Enlarged image generation apparatus and method
JP4590973B2 (en) Image processing apparatus and image processing method
JP5085589B2 (en) Image processing apparatus and method