Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP5652243B2 - Image processing apparatus and image processing method - Google Patents
[go: Go Back, main page]

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

Image processing apparatus and image processing method Download PDF

Info

Publication number
JP5652243B2
JP5652243B2 JP2011034264A JP2011034264A JP5652243B2 JP 5652243 B2 JP5652243 B2 JP 5652243B2 JP 2011034264 A JP2011034264 A JP 2011034264A JP 2011034264 A JP2011034264 A JP 2011034264A JP 5652243 B2 JP5652243 B2 JP 5652243B2
Authority
JP
Japan
Prior art keywords
image data
image
fixed
image size
original image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2011034264A
Other languages
Japanese (ja)
Other versions
JP2012173906A5 (en
JP2012173906A (en
Inventor
鈴木 直樹
直樹 鈴木
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson 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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2011034264A priority Critical patent/JP5652243B2/en
Publication of JP2012173906A publication Critical patent/JP2012173906A/en
Publication of JP2012173906A5 publication Critical patent/JP2012173906A5/ja
Application granted granted Critical
Publication of JP5652243B2 publication Critical patent/JP5652243B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)

Description

本発明は、画像データに対して解像度変換を行う画像処理装置及び画像処理方法に関する。   The present invention relates to an image processing apparatus and an image processing method for performing resolution conversion on image data.

従来から、画素ごとの色を階調値で表す画像データにつき、解像度変換を行う技術が存在する。たとえば、ある従来技術においては、解像度変換後の画像を構成する複数の画素の画素位置(以下、「新画素位置」という」)を算出した後に、これらの各画素の画素値を解像度変換前の画像に基づいた補間処理によって計算する。   2. Description of the Related Art Conventionally, there is a technique for performing resolution conversion for image data in which a color for each pixel is represented by a gradation value. For example, in a certain prior art, after calculating pixel positions of a plurality of pixels constituting an image after resolution conversion (hereinafter referred to as “new pixel position”), the pixel values of these pixels are converted to those before resolution conversion. Calculation is performed by interpolation based on the image.

しかし、各画素の画素値を計算によって求めると、システムへの負荷が大きく、処理に時間を要する。   However, when the pixel value of each pixel is obtained by calculation, the load on the system is large and processing takes time.

一方で、あらかじめ用意した係数(フィルター係数)を用いて、それらを用いた重み付け和によって新画素位置の画素値を計算する方法が存在する。その方法においては、解像度変換前の画像を構成する画素(旧画素)がちょうどその位置に存在しない、ある新画素位置の画素値を計算する際、その新画素位置の近傍に存在する旧画素の複数の画素値にそれら重み係数を掛けて、それらの重み付け和によって新画素位置の画素値を計算する方法が存在する。   On the other hand, there is a method of calculating a pixel value at a new pixel position by using a weighted sum using the coefficients (filter coefficients) prepared in advance. In that method, when calculating the pixel value of a certain new pixel position where the pixel (old pixel) constituting the image before resolution conversion does not exist at that position, the old pixel existing in the vicinity of the new pixel position is calculated. There is a method of multiplying a plurality of pixel values by those weighting factors and calculating a pixel value at a new pixel position by a weighted sum thereof.

しかし、あらかじめ用意された重み係数は、あらかじめ決められた画素位置(たとえば、旧画素の1画素区間中の左から1/4,2/4,3/4の位置)についてのみ用意することができる。このため、任意の倍率に適した重みを提供できるわけではない。よって、あらかじめ用意された重み係数を用いて新画素位置の画素値を計算すると、ほとんどの場合において、各画素の画素値を毎回、計算によって求める場合に比べて、生成される画像の品質が低くなる。   However, the weight coefficient prepared in advance can be prepared only for a predetermined pixel position (for example, a position of 1/4, 2/4, 3/4 from the left in one pixel section of the old pixel). . For this reason, a weight suitable for an arbitrary magnification cannot be provided. Therefore, when the pixel value at the new pixel position is calculated using a weighting factor prepared in advance, in most cases, the quality of the generated image is lower than when calculating the pixel value of each pixel every time. Become.

この問題を解決するために、ある画像データについて解像度変換を行う際に、あらかじめ用意された係数を使用して負荷の低減を図りつつ、画像の品質の低下を低減する画像処理が知られている。(特許文献1参照)   In order to solve this problem, when performing resolution conversion on certain image data, there is known an image processing for reducing a decrease in image quality while reducing a load by using a coefficient prepared in advance. . (See Patent Document 1)

特開2010−114767号公報JP 2010-114767 A

上記特許文献1に記載の画像処理装置によれば、ある画像データについて解像度変換を行う際に、あらかじめ用意されたフィルター係数を使用して負荷の低減を図りつつ、画像の品質の低下を低減することは可能であるが、フィルター係数として多数のフィルター係数(分割数の4倍)を必要とし、その演算処理の負荷が大きかった。   According to the image processing apparatus described in Patent Document 1, when resolution conversion is performed on certain image data, a reduction in image quality is reduced while reducing a load by using a filter coefficient prepared in advance. Although it is possible, a large number of filter coefficients (4 times the number of divisions) are required as filter coefficients, and the load of the arithmetic processing is large.

本発明の目的は、画素数の異なる画像データへの変換を多数のフィルター係数を必要とせず、その演算処理の負荷の低減を図ることが可能な画像処理装置及び画像処理方法提供することにある。   An object of the present invention is to provide an image processing apparatus and an image processing method capable of reducing the calculation processing load without requiring a large number of filter coefficients for conversion to image data having a different number of pixels. .

本発明の画像処理装置は、元画像データの画像サイズを格納する元画像サイズ格納部と、前記元画像データの画像サイズを拡大することにより生成される拡大後画像データの画像サイズを格納する拡大後画像サイズ格納部と、前記元画像データの画像サイズと前記拡大後画像データの画像サイズから拡大率を演算する演算部と、演算により算出した前記拡大率を格納する拡大率格納部と、前記拡大率の逆数の固定小数点表記を格納する固定小数点表記格納部と、前記固定小数点表記に対して丸め処理をした小数部を格納する丸め処理固定小数点表記格納部と、拡大後の各画素位置に対応する元画像の画素位置を表す固定小数点表記を格納する固定小数点表記格納部と、元画像の画素位置を表す固定小数点表記データに所定周期画素数毎に所定数ビットを累積的に加算若しくは減算する補間処理をする補間処理部とを備えることを特徴とする。   An image processing apparatus according to the present invention includes an original image size storage unit that stores an image size of original image data, and an enlargement that stores an image size of enlarged image data generated by enlarging the image size of the original image data. A post-image size storage unit, a calculation unit that calculates an enlargement rate from the image size of the original image data and the image size of the post-enlargement image data, an enlargement rate storage unit that stores the enlargement rate calculated by the calculation, A fixed-point notation storage unit that stores a fixed-point notation of the reciprocal of the enlargement ratio, a rounded-up fixed-point notation storage unit that stores a fractional part obtained by rounding the fixed-point notation, and a pixel position after enlargement A fixed-point notation storage unit that stores a fixed-point notation that represents the pixel position of the corresponding original image, and a fixed-point notation data that represents the pixel position of the original image. Characterized in that it comprises an interpolation processor for interpolating process of adding or subtracting the bit cumulatively.

また、本発明の画像処理装置は、前記所定周期画素数を設定する周期設定レジスターと、前記所定数ビットを格納するビット数格納レジスターと、を更に備え、前記補間処理部は、前記元画像データにおける前記所定周期画素数毎の画素の水平方向及び/又は垂直方向のアドレスの下位ビットに前記所定数ビットを加算若しくは減算することがより好ましい。   The image processing apparatus of the present invention further includes a cycle setting register that sets the predetermined number of pixels, and a bit number storage register that stores the predetermined number of bits, and the interpolation processing unit includes the original image data More preferably, the predetermined number of bits are added to or subtracted from the lower bits of the horizontal and / or vertical addresses of the pixels for each of the predetermined number of periodic pixels.

本発明の画像処理方法は、元画像データの画像サイズを取得するステップと、拡大後画像データの画像サイズを取得するステップと、前記元画像データの画像サイズと前記拡大後画像データの画像サイズとから拡大率を演算するステップと、前記拡大率の逆数の固定小数点表記を得るステップと、前記固定小数点表記に対して丸め処理をして小数部を得るステップと、元画像の画素位置を表す固定小数点表記データに所定周期画素数毎に所定数ビットを累積的に加算若しくは減算するステップとを含むことを特徴とする。   The image processing method of the present invention includes: obtaining an image size of the original image data; obtaining an image size of the enlarged image data; and an image size of the original image data and an image size of the enlarged image data. A step of calculating a magnification ratio, a step of obtaining a fixed-point notation of the reciprocal of the magnification ratio, a step of rounding the fixed-point notation to obtain a fractional part, and a fixed representing the pixel position of the original image A step of cumulatively adding or subtracting a predetermined number of bits to the decimal point notation data for each predetermined number of periodic pixels.

また、前記所定周期は、前記固定小数点表記の小数部データが整数となる周期であることを特徴とする。   The predetermined period is a period in which the decimal part data expressed in the fixed point is an integer.

画素数の異なる画像データへの変換(解像度変換)を行う際に多数のフィルター係数を必要とせず、その演算処理の負荷の低減を図ることができる。   When performing conversion (resolution conversion) to image data having a different number of pixels, a large number of filter coefficients are not required, and the load of the arithmetic processing can be reduced.

本発明の実施形態に係る画像処理装置10の構成を示すブロック図である。1 is a block diagram illustrating a configuration of an image processing apparatus 10 according to an embodiment of the present invention. 本発明の実施形態に係る画像処理装置10による画像データの解像度変換の手順の一例を示すフローチャートである。It is a flowchart which shows an example of the procedure of the resolution conversion of the image data by the image processing apparatus 10 which concerns on embodiment of this invention. 本発明の実施形態に係る画像処理装置10による画像データの拡大変換時の解像度変換の原理を説明するための図であり、(a)は元画像の一例を示し、(b)は(a)の元画像を水平方向に拡大した拡大後画像を示し、(c)は拡大後画像の画素に対する補間処理を模式的に示す。It is a figure for demonstrating the principle of the resolution conversion at the time of the expansion conversion of the image data by the image processing apparatus 10 which concerns on embodiment of this invention, (a) shows an example of an original image, (b) is (a). FIG. 4C shows an enlarged image obtained by enlarging the original image in the horizontal direction, and FIG. 5C schematically shows interpolation processing for pixels of the enlarged image. 本発明の実施形態に係る画像処理装置10による補間処理を行わない場合の解像度変換の結果を示す図である。It is a figure which shows the result of the resolution conversion when not performing the interpolation process by the image processing apparatus 10 which concerns on embodiment of this invention. 本発明の実施形態に係る画像処理装置10による補間処理を行った場合の解像度変換の結果を示す図である。It is a figure which shows the result of the resolution conversion at the time of performing the interpolation process by the image processing apparatus 10 which concerns on embodiment of this invention.

図1は、本発明の実施形態に係る画像処理装置10の構成を示すブロック図である。   FIG. 1 is a block diagram illustrating a configuration of an image processing apparatus 10 according to an embodiment of the present invention.

本実施形態に係る画像処理装置10は、画像データの変換に伴う様々な演算を行う演算部(CPU)10aと、RAM10bと、ROM10cと、元画像データの画像サイズを格納する元画像サイズ格納部10dと、拡大後画像データの画像サイズを格納する拡大後画像サイズ格納部10eと、元画像サイズと拡大後画像サイズから演算した拡大率を格納する拡大率格納部10fと、拡大率の逆数の固定小数点表記を格納する固定小数点表記格納部10gと、固定小数点表記に対して丸め処理をした小数部を格納する丸め処理固定小数点表記格納部10hと、小数部ビット格納部10i、拡大後固定小数点表記格納部10jを備え、拡大後の各画素位置に対応する元画像の画素位置を表す固定小数点表記を演算する構成であり、入出力インターフェース10pと共にバスに接続されている。   The image processing apparatus 10 according to the present embodiment includes a calculation unit (CPU) 10a that performs various calculations associated with image data conversion, a RAM 10b, a ROM 10c, and an original image size storage unit that stores the image size of the original image data. 10d, an enlarged image size storage unit 10e that stores the image size of the enlarged image data, an enlargement rate storage unit 10f that stores an enlargement rate calculated from the original image size and the enlarged image size, and a reciprocal of the enlargement rate A fixed-point notation storage unit 10g for storing a fixed-point notation, a rounded fixed-point notation storage unit 10h for storing a fractional part obtained by rounding the fixed-point notation, a fractional part bit storage unit 10i, and an expanded fixed-point A notation storage unit 10j for calculating a fixed-point notation representing a pixel position of the original image corresponding to each pixel position after enlargement; It is connected to the bus with the face 10p.

本実施形態に係る画像処理装置10によって例えば元画像から拡大後画像に画像データを拡大変換する場合は、まず元画像の画像データ(元画像データ)の画像サイズが元画像サイズ格納部10dに格納される。また、例えば予めユーザーにより設定された拡大変換後の画像データ(拡大後画像データ)の画像サイズが拡大後画像サイズ格納部10eに格納される。演算部10aは、元画像サイズ格納部1dに格納された元画像データの画像サイズ、及び拡大後画像サイズ格納部10eに格納された拡大後画像データの画像サイズから拡大率を演算して、拡大率格納部10fに格納する。   When the image processing apparatus 10 according to the present embodiment enlarges and converts image data from an original image to an enlarged image, for example, first, the image size of the original image data (original image data) is stored in the original image size storage unit 10d. Is done. Further, for example, the image size of the image data after enlargement conversion (image data after enlargement) set in advance by the user is stored in the image size storage unit 10e after enlargement. The calculation unit 10a calculates an enlargement ratio from the image size of the original image data stored in the original image size storage unit 1d and the image size of the enlarged image data stored in the enlarged image size storage unit 10e, and enlarges the image. Store in the rate storage unit 10f.

演算部10aは、求められた拡大率に基づき、例えば0〜1の分割数が32である場合、整数である「1」を表す小数部ビット数である65536を導出し、小数部ビット数格納部10iに格納する。演算部10aは、演算した上記拡大率の逆数の固定小数点表記を演算して固定小数点表記格納部10gに格納する。そして、演算部10aは、演算した固定小数点表記に対して丸め処理をして小数部を求めて、丸め固定小数点表記格納部10hに格納する。最後に演算部10aは、全ての拡大後の各画素位置に対応する元画像の画素位置を表す固定小数点表記を演算して、拡大後固定小数表記格納部10jに格納する。   For example, when the division number from 0 to 1 is 32, the arithmetic unit 10a derives 65536, which is the fractional part bit number representing “1” that is an integer, and stores the fractional part bit number. Stored in the unit 10i. The calculation unit 10a calculates a fixed-point notation of the reciprocal of the calculated enlargement ratio and stores it in the fixed-point notation storage unit 10g. Then, the arithmetic unit 10a rounds the calculated fixed-point notation to obtain a decimal part, and stores the decimal part in the rounded fixed-point notation storage unit 10h. Finally, the calculation unit 10a calculates a fixed-point notation representing the pixel position of the original image corresponding to each pixel position after enlargement, and stores the fixed-point notation storage part 10j after enlargement.

また、本実施形態に係る画像処理装置10は、拡大後画像データの画素に対して所定の画素周期毎に所定のビット数を加算(又は減算)する補間処理を行う補間処理部10kと、上記の画素周期及びビット数を設定する画素周期・ビット数設定部10rと、画素周期・ビット数設定部10rによって設定された上記の画素周期を格納する画素周期格納レジスター10mと、画素周期・ビット数設定部10rによって設定された上記のビット数を格納するビット数格納レジスター10nと、をさらに備える。なお、本例の画像処理装置10は、画素周期・ビット数設定部10rが上記の画素周期及びビット数を設定するが、その設定方法は特に限定されない。すなわち、画素周期・ビット数設定部10rは、例えば、予め定められたプログラムに基づいて上記の画素周期及びビット数を設定してもよく、また、ユーザーによる入力に基づいて設定してもよい。   In addition, the image processing apparatus 10 according to the present embodiment includes an interpolation processing unit 10k that performs an interpolation process for adding (or subtracting) a predetermined number of bits for each predetermined pixel period to the pixels of the enlarged image data; A pixel cycle / bit number setting unit 10r for setting the pixel cycle and the number of bits, a pixel cycle storage register 10m for storing the pixel cycle set by the pixel cycle / bit number setting unit 10r, and a pixel cycle / bit number A bit number storage register 10n for storing the number of bits set by the setting unit 10r. In the image processing apparatus 10 of this example, the pixel cycle / bit number setting unit 10r sets the pixel cycle and the bit number, but the setting method is not particularly limited. That is, the pixel period / bit number setting unit 10r may set the pixel period and the number of bits based on a predetermined program, or may be set based on an input by a user.

図2は、画像処理装置10によって1024×768画素の元画像を1536×768画素の画像へと変換する際の処理手順、すなわち画像データを水平方向へ拡大変換する際の処理手順を示すフローチャートである。また、図3は、画像処理装置10が図2のフローに基づいて画像データを拡大変換する場合における解像度変換の原理を説明するための図であり、(a)は元画像の一例(1024×768画素の画像)を示し、(b)は(a)の元画像を水平方向に拡大した拡大後画像(1536×768画素)を示し、(c)は拡大後画像の画素に対して解像度変換の際に行う補間処理を模式的に示す。   FIG. 2 is a flowchart showing a processing procedure for converting an original image of 1024 × 768 pixels into an image of 1536 × 768 pixels by the image processing apparatus 10, that is, a processing procedure for enlarging and converting image data in the horizontal direction. is there. FIG. 3 is a diagram for explaining the principle of resolution conversion when the image processing apparatus 10 enlarges and converts image data based on the flow of FIG. 2. FIG. 3A is an example of an original image (1024 × (B) shows an enlarged image (1536 × 768 pixels) obtained by enlarging the original image of (a) in the horizontal direction, and (c) shows resolution conversion for the pixels of the enlarged image. An interpolation process performed at this time is schematically shown.

本フローでは、まず、演算部10aは、元画像データ(図3(a)参照)の画像サイズ(水平方向:1024画素、垂直方向:768画素)及び拡大後画像データ(図3(b)参照)の画像サイズ(水平方向:1536画素、垂直方向:768画素)を取得して元画像サイズ格納部10d,拡大後画像サイズ格納部10eにそれぞれ格納する(ステップS1)。   In this flow, first, the arithmetic unit 10a first displays the image size (horizontal direction: 1024 pixels, vertical direction: 768 pixels) of the original image data (see FIG. 3A) and the enlarged image data (see FIG. 3B). ) (Horizontal direction: 1536 pixels, vertical direction: 768 pixels) are acquired and stored in the original image size storage unit 10d and the enlarged image size storage unit 10e, respectively (step S1).

次に、画素周期・ビット数設定部10rは、補間処理をすべき画素周期(=3)を設定して画素周期格納レジスター10mへ格納し、さらに、補間処理によって加算(減算)するビット数(=2)を設定してビット数格納レジスター10nへ格納する(ステップS2)。   Next, the pixel cycle / bit number setting unit 10r sets the pixel cycle (= 3) to be interpolated and stores it in the pixel cycle storage register 10m, and further adds (subtracts) the bit number ( = 2) is set and stored in the bit number storage register 10n (step S2).

そして、演算部10aは、整数である「1」を表す小数部ビット数である65536を小数部ビット数格納部10iに格納する(ステップS3)。   Then, the arithmetic unit 10a stores 65536, which is the decimal part bit number representing the integer “1”, in the decimal part bit number storage unit 10i (step S3).

次に、演算部10aは、元画像データの画像サイズと拡大後画像データの画像サイズから水平方向への拡大率1.5を演算して拡大率格納部10fに格納する(ステップS4)。   Next, the calculation unit 10a calculates a horizontal enlargement ratio 1.5 from the image size of the original image data and the image size of the enlarged image data, and stores it in the enlargement ratio storage unit 10f (step S4).

次に、演算部10aは、演算により算出した拡大率(=1.5)の逆数(=0.66666667)の固定小数点表記(=43690.6667)を算出して固定小数点表記格納部10gに格納する(ステップS5)。   Next, the calculation unit 10a calculates a fixed point notation (= 43690.6667) of the reciprocal (= 0.6666666667) of the enlargement ratio (= 1.5) calculated by the calculation and stores it in the fixed point notation storage unit 10g. (Step S5).

また、演算部10aは、この固定小数点表記(=43690.6667)に対して丸め処理をして小数部(=43690)を求めて、丸め固定小数点表記格納部10hに格納する(ステップS6)。   Further, the arithmetic unit 10a rounds the fixed-point notation (= 43690.6667) to obtain a decimal part (= 43690) and stores it in the rounded fixed-point notation storage unit 10h (step S6).

補間処理部10kは、図3(c)に模式的に示すように、拡大後の各画素位置に対応する元画像の画素位置を表す固定小数点表記を演算するに際して、元画像の画素位置を表す固定小数点表記ビットに画素周期格納レジスター10mへ格納されている画素周期(=3)毎にビット数格納レジスター10nへ格納されているビット数(=2)を累積的に加算する補間処理を実行する(ステップS7)。   As shown schematically in FIG. 3C, the interpolation processing unit 10k represents the pixel position of the original image when calculating a fixed-point notation representing the pixel position of the original image corresponding to each pixel position after enlargement. An interpolation process is executed in which the number of bits (= 2) stored in the bit number storage register 10n is cumulatively added to the fixed-point notation bits for each pixel period (= 3) stored in the pixel period storage register 10m. (Step S7).

そして、全ての拡大後の各画素位置に対応する元画像の画素位置を表す固定小数点表記を演算して拡大後固定小数点表記格納部10jに格納する(ステップS8)。以上により本フローは終了する。   Then, the fixed point notation representing the pixel position of the original image corresponding to all the enlarged pixel positions is calculated and stored in the enlarged fixed point notation storage unit 10j (step S8). This flow is completed by the above.

次に、画像処理装置10による上記補間処理を行わずに画像データの解像度変換を行った場合と対比しながら、上記補間処理の特徴について説明する。   Next, characteristics of the interpolation processing will be described in comparison with the case where the resolution conversion of the image data is performed without performing the interpolation processing by the image processing apparatus 10.

図4は、画像処理装置10による補間処理を行わない場合の解像度変換の結果を示す表である。より詳しくは、図4は、元画像(1024×768画素)から拡大後画像(1536×768画素)へ拡大変換した後の拡大後画像における画素位置(拡大後の画素位置)、元画像の画素位置(元画素位置)、元画像の画素位置の整数部(元画素位置(整数部))、元画像の画素位置の小数部(元画素位置(小数部))、固定小数表記(小数部15ビット)による実際の元画素位置、固定小数点表記(小数部15ビット)による理想の元画素位置、の各値の関係を拡大後の画素(1〜1536画素)について示した表である(ただし、図4の表では、拡大後画像における画素のうち、1〜50画素、1022〜1026画素、および1522〜1536画素についてのみ上記各値の関係を示す。)。ここで、0〜1の間を32分割する場合、0〜1の間の小数、及びこれらの小数に対応した固定小数は、図4の表の左側に示す関係となる。   FIG. 4 is a table showing the result of resolution conversion when the interpolation processing by the image processing apparatus 10 is not performed. More specifically, FIG. 4 shows the pixel position (the pixel position after enlargement) in the enlarged image after enlargement conversion from the original image (1024 × 768 pixels) to the enlarged image (1536 × 768 pixels), the pixels of the original image Position (original pixel position), integer part of original image pixel position (original pixel position (integer part)), decimal part of original image pixel position (original pixel position (decimal part)), fixed decimal notation (decimal part 15 (Bit) is a table showing the relationship between each value of an actual original pixel position by bits and an ideal original pixel position by fixed point notation (decimal part 15 bits) for the expanded pixels (1 to 1536 pixels) (however, In the table of FIG. 4, among the pixels in the enlarged image, only the relationship between the above values is shown for 1 to 50 pixels, 1022 to 1026 pixels, and 1522 to 1536 pixels. Here, when dividing 0 to 1 into 32, the decimals between 0 and 1 and the fixed decimals corresponding to these decimals have the relationship shown on the left side of the table of FIG.

図4の表に示す処理結果における、固定小数表記による実際の元画素位置と、固定小数点表記による理想の元画素位置との関係に着目すると、拡大後画像の画素位置は、3画素につき2ビットずつずれが生じており、そのずれが累積していることが判る。   Focusing on the relationship between the actual original pixel position in the fixed decimal notation and the ideal original pixel position in the fixed-point notation in the processing results shown in the table of FIG. 4, the pixel position of the enlarged image is 2 bits per 3 pixels. It can be seen that there is a shift each time and that the shifts are cumulative.

そして、上記ずれが累積されることによって、拡大後の1024画素目で固定小数表記(実際の値)の元画素位置は43008以下となって、上記小数及び固定小数の関係から、0.68625になるべきものが、0.65625になってしまう。   Then, by accumulating the deviation, the original pixel position in the fixed decimal notation (actual value) becomes 43008 or less at the 1024th pixel after the enlargement, and from the relation between the decimal and the fixed decimal, it becomes 0.68625. What is supposed to be is 0.65625.

すなわち、固定小数表記(実際の値)の元画素位置(小数部15ビット)と、固定小数点表記(理想)の元画素位置(小数部15ビット)との関係が拡大後画素の3画素につき2ビットずつずれが生じており、そのずれが累積している。このようなずれが累積することによって、元画像を拡大した拡大後画像は、元画像に対して画素にずれが生じた画像となってしまう。   That is, the relationship between the original pixel position (decimal part 15 bits) in the fixed decimal notation (actual value) and the original pixel position (decimal part 15 bits) in the fixed-point notation (ideal) is 2 per 3 pixels of the enlarged pixels. Deviations occur bit by bit, and the deviations are accumulated. By accumulating such shifts, an enlarged image obtained by enlarging the original image becomes an image in which a pixel shift occurs with respect to the original image.

これに対し、本実施形態に係る画像処理装置10による上記補間処理を行うことによって、図3(c)に示すように、拡大後画素の3画素につき2ビットずつ累積的に付加する。   On the other hand, by performing the above-described interpolation processing by the image processing apparatus 10 according to the present embodiment, as shown in FIG.

図5は、画像処理装置10による上記補間処理を行った場合の解像度変換の処理結果を示す表である。より詳しくは、図5は、元画像(1024×768画素)から拡大後画像(1536×768画素)へ拡大変換した後の拡大後画像における画素位置(拡大後の画素位置)、元画像の画素位置(元画素位置)、元画像の画素位置の整数部(元画素位置(整数部))、元画像の画素位置の小数部(元画素位置(小数部))、固定小数表記(小数部15ビット)による実際の元画素位置、固定小数表記(小数部15ビット)による実際の元画素位置に対して3画素毎に2ビットを加算した値、固定小数点表記(小数部15ビット)による理想の元画素位置、の各値の関係を拡大後画像における各画素(1〜1536画素)について示した表である(ただし、図5の表では、拡大後画像における画素のうち、1〜15画素、1022〜1026画素、および1531〜1536画素についてのみ上記各値の関係を示す。)。ここで、0〜1の間を32分割する場合、0〜1の間の小数、及びこれらの小数に対応した固定小数は、図4の場合と同様の関係となる。   FIG. 5 is a table showing resolution conversion processing results when the above-described interpolation processing is performed by the image processing apparatus 10. More specifically, FIG. 5 shows the pixel position (pixel position after enlargement) in the enlarged image after enlargement conversion from the original image (1024 × 768 pixels) to the enlarged image (1536 × 768 pixels), and the pixels of the original image Position (original pixel position), integer part of original image pixel position (original pixel position (integer part)), decimal part of original image pixel position (original pixel position (decimal part)), fixed decimal notation (decimal part 15 Bit), the actual original pixel position in fixed decimal notation (15 bits in decimal part), the value obtained by adding 2 bits every 3 pixels to the actual original pixel position in fixed decimal notation (15 bits in decimal part), and the ideal in fixed point notation (15 bits in decimal part) FIG. 5 is a table showing the relationship between each value of the original pixel position for each pixel (1 to 1536 pixels) in the enlarged image (however, in the table of FIG. 5, 1 to 15 pixels among the pixels in the enlarged image, 1022-1026 pixels, And the relationship between the above values is shown only for 1531 to 1536 pixels.) Here, when dividing 0 to 1 into 32, the decimals between 0 and 1 and the fixed decimals corresponding to these decimals have the same relationship as in FIG.

図5の表に示す処理結果における、固定小数表記(実際の値)の元画素位置(小数部15ビット)の3画素毎に2を加算(追加)した値と、固定小数点表記(理想)の元画素位置(小数部15ビット)との関係が上記補間処理を行わない場合(図4)では拡大後の3画素につき2ビットずつずれるが、上記補間処理を行うことでそのずれが解消する。   In the processing results shown in the table of FIG. 5, a value obtained by adding (adding) 2 to every three pixels in the original pixel position (15 bits of the decimal part) in the fixed decimal notation (actual value) and the fixed decimal notation (ideal) When the above interpolation process is not performed (FIG. 4), the relationship with the original pixel position (decimal part 15 bits) is shifted by 2 bits for each of the three enlarged pixels, but the deviation is eliminated by performing the above interpolation process.

図5の表に示す処理結果を得るための補間処理では、元画像(1024×768画素)から拡大後画像(1536×768画素)に変換する場合であるので、3画素毎に2ビットを加算しているが、補間処理の際に加算するビット数はこれに限られない。例えば、元画像(1024×768画素)と拡大後画像(1536×768画素)が異なれば、画素周期格納レジスター10mおよびビット数格納レジスター10nに格納される画素周期及びビット数も異なる。   In the interpolation processing for obtaining the processing results shown in the table of FIG. 5, the original image (1024 × 768 pixels) is converted to the enlarged image (1536 × 768 pixels), so 2 bits are added for every three pixels. However, the number of bits to be added in the interpolation process is not limited to this. For example, if the original image (1024 × 768 pixels) is different from the enlarged image (1536 × 768 pixels), the pixel cycle and the number of bits stored in the pixel cycle storage register 10m and the bit number storage register 10n are also different.

また、本実施形態に係る画像処理装置10による上記のような画像データの変換処理は、コンピューターに格納されたプログラムによって実行することも可能である。   Further, the above-described image data conversion processing by the image processing apparatus 10 according to the present embodiment can be executed by a program stored in a computer.

10…画像処理装置、10a…演算部(CPU)、10b…RAM、10c…ROM、10d…元画像サイズ格納部、10e…拡大後画像サイズ格納部、10f…拡大率格納部、10g…固定小数点表記格納部、10h…丸め固定小数点表記格納部、10i…小数部ビット数格納部、10j…拡大後固定小数点表記格納部、10k…補間処理部、10m…画素周期格納レジスター、10n…ビット数格納レジスター、10p…入出力インターフェース、10r…画素周期・ビット数設定部 DESCRIPTION OF SYMBOLS 10 ... Image processing apparatus, 10a ... Arithmetic unit (CPU), 10b ... RAM, 10c ... ROM, 10d ... Original image size storage unit, 10e ... Enlarged image size storage unit, 10f ... Enlargement rate storage unit, 10g ... Fixed point Notation storage unit, 10h: Rounded fixed point notation storage unit, 10i: Decimal part bit number storage unit, 10j: Expanded fixed point notation storage unit, 10k ... Interpolation processing unit, 10m ... Pixel cycle storage register, 10n ... Bit number storage Register, 10p ... Input / output interface, 10r ... Pixel cycle / bit number setting unit

Claims (6)

元画像データの画像サイズを格納する元画像サイズ格納部と、
前記元画像データの画像サイズを拡大することにより生成される拡大後画像データの画像サイズを格納する拡大後画像サイズ格納部と、
前記元画像データの画像サイズ、及び前記拡大後画像データの画像サイズに基づき、拡大後の各画素位置に対応する元画像の画素位置に対応した第1の固定小数点表記を演算する演算部と、
前記第1の固定小数点表記に対して丸め処理をした第2の固定小数点表記を格納する丸め固定小数点表記格納部と、
前記第2の固定小数点表記に、所定周期画素数毎に所定数ビットを累積的に加算若しくは減算する補間処理をする補間処理部と、
前記元画像データの画像サイズ、及び前記拡大後画像データの画像サイズに応じて、前記所定数ビットを設定する設定部と、
を備えることを特徴とする画像処理装置。
An original image size storage unit for storing the image size of the original image data;
An enlarged image size storage unit for storing the image size of the enlarged image data generated by enlarging the image size of the original image data;
An arithmetic unit that calculates a first fixed-point notation corresponding to the pixel position of the original image corresponding to each pixel position after enlargement based on the image size of the original image data and the image size of the enlarged image data;
A rounded fixed-point notation storage unit for storing a second fixed-point notation obtained by rounding the first fixed-point notation;
An interpolation processing unit that performs an interpolation process for cumulatively adding or subtracting a predetermined number of bits for each predetermined number of periodic pixels to the second fixed-point notation;
A setting unit that sets the predetermined number of bits according to the image size of the original image data and the image size of the enlarged image data;
An image processing apparatus comprising:
前記所定周期画素数を格納する画素周期格納レジスターと、
前記所定数ビットを格納するビット数格納レジスターと、
を更に備え、
前記補間処理部は、
前記元画像データにおける前記所定周期画素数毎の画素の水平方向及び/又は垂直方向のアドレスの下位ビットに前記所定数ビットを加算若しくは減算することを特徴とする請求項1に記載の画像処理装置。
A pixel cycle storage register for storing the predetermined cycle pixel number;
A bit number storage register for storing the predetermined number of bits;
Further comprising
The interpolation processing unit
2. The image processing apparatus according to claim 1, wherein the predetermined number of bits is added to or subtracted from a lower bit of a horizontal and / or vertical address of a pixel for each predetermined number of pixels in the original image data. .
前記設定部は、前記前記元画像データの画像サイズ、及び前記拡大後画像データの画像サイズに応じて前記所定周期画素数を設定することを特徴とする請求項1又は2に記載の画像処理装置。  The image processing apparatus according to claim 1, wherein the setting unit sets the predetermined number of periodic pixels according to an image size of the original image data and an image size of the enlarged image data. . 元画像データの画像サイズを取得するステップと、
前記元画像データの画像サイズを拡大することにより生成される拡大後画像データの画像サイズを取得するステップと、
前記元画像データの画像サイズ、及び前記拡大後画像データの画像サイズに基づき、拡大後の各画素位置に対応する元画像の画素位置に対応した第1の固定小数点表記を得るステップと、
前記第1の固定小数点表記に対して丸め処理をして第2の固定小数点表記を得るステップと、
前記元画像データの画像サイズ、及び前記拡大後画像データの画像サイズに応じて、所定数ビットを設定するステップと、
前記第2の固定小数点表記に、所定周期画素数毎に前記所定数ビットを累積的に加算若しくは減算するステップと、
を含むことを特徴とする画像処理方法。
Obtaining the image size of the original image data;
Obtaining an image size of the enlarged image data generated by enlarging the image size of the original image data;
Obtaining a first fixed-point notation corresponding to the pixel position of the original image corresponding to each pixel position after enlargement based on the image size of the original image data and the image size of the enlarged image data;
Rounding the first fixed-point notation to obtain a second fixed-point notation;
Setting a predetermined number of bits according to the image size of the original image data and the image size of the enlarged image data;
Wherein the second fixed-point notation, and the step of the predetermined number of bits to add or subtract cumulatively at every predetermined number cycles of pixels,
An image processing method comprising:
前記所定周期は、前記固定小数点表記の小数部データが整数となる周期であることを特徴とする請求項に記載の画像処理方法。 The image processing method according to claim 4 , wherein the predetermined cycle is a cycle in which the decimal part data represented by the fixed point is an integer. 前記前記元画像データの画像サイズ、及び前記拡大後画像データの画像サイズに応じて前記所定周期画素数を設定するステップを含むことを特徴とする請求項4又は5に記載の画像処理方法。  6. The image processing method according to claim 4, further comprising the step of setting the predetermined number of pixels according to an image size of the original image data and an image size of the enlarged image data.
JP2011034264A 2011-02-21 2011-02-21 Image processing apparatus and image processing method Active JP5652243B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011034264A JP5652243B2 (en) 2011-02-21 2011-02-21 Image processing apparatus and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011034264A JP5652243B2 (en) 2011-02-21 2011-02-21 Image processing apparatus and image processing method

Publications (3)

Publication Number Publication Date
JP2012173906A JP2012173906A (en) 2012-09-10
JP2012173906A5 JP2012173906A5 (en) 2013-12-26
JP5652243B2 true JP5652243B2 (en) 2015-01-14

Family

ID=46976776

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011034264A Active JP5652243B2 (en) 2011-02-21 2011-02-21 Image processing apparatus and image processing method

Country Status (1)

Country Link
JP (1) JP5652243B2 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5237432A (en) * 1991-12-23 1993-08-17 Xerox Corporation Image scaling apparatus
EP0903692A3 (en) * 1997-09-23 2000-01-05 Xerox Corporation System and method for two-dimensional interpolation
JP2001268350A (en) * 2000-03-15 2001-09-28 Digital Electronics Corp Method and device for reducing/enlarging image
JP2003023538A (en) * 2001-07-10 2003-01-24 Sharp Corp Image processing device
JP2010114767A (en) * 2008-11-07 2010-05-20 Seiko Epson Corp Image processing apparatus, image processing method, and computer program

Also Published As

Publication number Publication date
JP2012173906A (en) 2012-09-10

Similar Documents

Publication Publication Date Title
JP5914045B2 (en) Image processing apparatus, image processing method, and program
JP4922091B2 (en) Video signal processing device, video signal processing method, and display device
JP2018120536A (en) Data interpolation apparatus and method therefor, and image processing apparatus
JP2009004848A (en) Mixing device
JP6300444B2 (en) Image processing apparatus, image processing method, and program
JP5652243B2 (en) Image processing apparatus and image processing method
TWI459357B (en) Resolution scaler
JP2013025467A (en) Approximation operation circuit for logarithmic function
JP5175983B2 (en) Arithmetic unit
JP3805303B2 (en) Pixel number conversion method and pixel number conversion device
JP5024112B2 (en) Image signal processing apparatus and image signal processing program
JP4675418B2 (en) Video signal processing apparatus and video signal processing method
JP2022015743A (en) Device, method, and program
JP6262621B2 (en) Image enlargement / reduction processing apparatus and image enlargement / reduction processing method
JP2010033406A (en) Image processing device, image device, and image processing method
CN102760281A (en) Image resizing method
JP5387288B2 (en) Image processing apparatus, image processing method and program thereof
JP2021103346A (en) Data conversion device, data conversion method, and program
JP5387289B2 (en) Image processing apparatus, image processing method and program thereof
JP7532087B2 (en) Apparatus, method, and program
JP5939893B2 (en) Image processing apparatus and image processing method
JP5997480B2 (en) Image processing apparatus, image processing method, and program
JP4693649B2 (en) Image processing apparatus and image data interpolation method
KR102712092B1 (en) Electronic device for image reduction and reduction method therefor
JP2012089947A (en) Image reduction system

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20131107

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20131107

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140703

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140715

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140912

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20141021

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20141103

R150 Certificate of patent or registration of utility model

Ref document number: 5652243

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350