JP6883864B2 - Image processing equipment, image processing method, and image processing program - Google Patents

Image processing equipment, image processing method, and image processing program Download PDF

Info

Publication number
JP6883864B2
JP6883864B2 JP2018195832A JP2018195832A JP6883864B2 JP 6883864 B2 JP6883864 B2 JP 6883864B2 JP 2018195832 A JP2018195832 A JP 2018195832A JP 2018195832 A JP2018195832 A JP 2018195832A JP 6883864 B2 JP6883864 B2 JP 6883864B2
Authority
JP
Japan
Prior art keywords
pixel
edge
diagonal line
pixels
image processing
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
JP2018195832A
Other languages
Japanese (ja)
Other versions
JP2020064449A (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.)
Axell Corp
Original Assignee
Axell 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 Axell Corp filed Critical Axell Corp
Priority to JP2018195832A priority Critical patent/JP6883864B2/en
Publication of JP2020064449A publication Critical patent/JP2020064449A/en
Application granted granted Critical
Publication of JP6883864B2 publication Critical patent/JP6883864B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)

Description

本発明は、入力画像を高品質に拡大する画像処理装置、画像処理方法、及びそのプログラムに関し、特に、入力画像を複数の三角形により領域分割して画素を補間するデータ依存性三角形分割手法 (Data Dependent Triangulation:DDT法)を用いて、入力画像を高品質に拡大することができる画像処理装置、画像処理方法、及びそのプログラムに関する。 The present invention relates to an image processing device for enlarging an input image with high quality, an image processing method, and a program thereof. In particular, a data-dependent triangle division method (Data) in which an input image is divided into regions by a plurality of triangles and pixels are interpolated. Dependent Triangulation (DDT method) is used to relate to an image processing apparatus capable of enlarging an input image with high quality, an image processing method, and a program thereof.

ビットマップ画像等のラスタ画像の拡大、回転、変形等をする際に、画像中に存在するエッジの角度を算出し、算出されたエッジの角度に基づいて作成したベクトルデータを用いて画素を補間する技術として、例えばDDT法が知られている(非特許文献1)。
DDT法は、コスト関数やエッジの角度に基づいて、ラスタ画像を複数の三角形によって領域分割する。ラスタ画像を領域分割する三角形メッシュデータはベクトルデータである。DDT法は、三角形の頂点に対応する画素の画素値と、ベクトルデータである三角形メッシュデータとを用いて、三角形メッシュ内の領域に画素を線形補間する。
上記DDT法を画像拡大処理に応用した画像処理方法として、特許文献2が挙げられる。
When enlarging, rotating, deforming, etc. a raster image such as a bitmap image, the angle of the edge existing in the image is calculated, and the pixels are interpolated using the vector data created based on the calculated edge angle. For example, the DDT method is known as a technique for interpolating (Non-Patent Document 1).
The DDT method divides the raster image into regions by a plurality of triangles based on the cost function and the angle of the edge. The triangular mesh data that divides the raster image into regions is vector data. In the DDT method, the pixel values of the pixels corresponding to the vertices of the triangle and the triangle mesh data which is the vector data are used to linearly interpolate the pixels in the region in the triangle mesh.
Patent Document 2 is mentioned as an image processing method in which the above DDT method is applied to image enlargement processing.

特開2018−32301号公報Japanese Unexamined Patent Publication No. 2018-32301

X.Yu, B.S. Morse, and T.W. Sederberg, “Image Reconstruction UsingData-Dependent Triangulation”, IEEE Computer Graphics and Applications, Vol.21, No. 3, pp. 62-68 May/Jun. (2001)X.Yu, B.S. Morse, and T.W. Sederberg, “Image Reconstruction UsingData-Dependent Triangulation”, IEEE Computer Graphics and Applications, Vol.21, No. 3, pp. 62-68 May / Jun. (2001)

特許文献1において、三角形メッシュの形状を決定する際には、コスト関数を最小化するような分割パターンを仮決定した後に、各分割パターンの整合性を確認する処理を実行する。仮に、分割パターン同士の接続が整合しない場合には、整合するようにパターンを修正する処理を実行していくので、処理の負荷が増大する虞がある。
本発明は上述の事情に鑑みてなされたものであり、画像処理における負荷の増大を抑制することを目的とする。
In Patent Document 1, when determining the shape of a triangular mesh, a process of confirming the consistency of each division pattern is executed after provisionally determining a division pattern that minimizes the cost function. If the connections between the divided patterns do not match, the process of modifying the patterns so that they match is executed, which may increase the processing load.
The present invention has been made in view of the above circumstances, and an object of the present invention is to suppress an increase in load in image processing.

上記の課題を解決するために、本発明は、複数の元画素により構成される元画像をメッシュに分割する画像処理装置であって、前記複数の元画素を含む第一画素領域における各画素値に基づいてエッジの角度を算出し、算出された前記各エッジの角度に対応する画素値を夫々有した中間画素により構成された中間画像を生成するエッジ画像生成手段と、複数の前記中間画素により形成される矩形領域の対角線を検出する複数種類の前記対角線の検出パターンの中から選択された前記検出パターンに基づいて、選択された該検出パターンに対応した矩形領域の対角線が通過する前記中間画素を判定対象画素に設定し、全ての前記判定対象画素が示す前記エッジの角度が、選択された前記検出パターンに対応する対角線の角度に対して所定の角度範囲内にあるとき、該対角線を抽出するエッジ抽出手段と、を備えることを特徴とする。

In order to solve the above problems, the present invention is an image processing device that divides an original image composed of a plurality of original pixels into a mesh, and each pixel value in a first pixel region including the plurality of original pixels. An edge image generation means that calculates an edge angle based on the above and generates an intermediate image composed of intermediate pixels having pixel values corresponding to the calculated edge angles, and a plurality of the intermediate pixels. The intermediate pixel through which the diagonal line of the rectangular region corresponding to the selected detection pattern passes based on the detection pattern selected from the plurality of types of detection patterns of the diagonal line for detecting the diagonal line of the rectangular region to be formed. Is set as the determination target pixel , and when the edge angle indicated by all the determination target pixels is within a predetermined angle range with respect to the angle of the diagonal line corresponding to the selected detection pattern, the diagonal line is extracted. It is characterized by comprising an edge extraction means for performing.

一実施態様によれば、画像処理における負荷の増大を抑制することが可能となる。 According to one embodiment, it is possible to suppress an increase in load in image processing.

本発明の一実施形態に係る画像処理装置の機能構成を示すブロック図である。It is a block diagram which shows the functional structure of the image processing apparatus which concerns on one Embodiment of this invention. 本発明の一実施形態に係るコンピュータのハードウェア構成を示すブロック図である。It is a block diagram which shows the hardware structure of the computer which concerns on one Embodiment of this invention. (a)〜(c)は、本発明の一実施形態に係る画像処理装置によるエッジ算出方法の概要について説明する図である。(A)-(c) is a figure explaining the outline of the edge calculation method by the image processing apparatus which concerns on one Embodiment of this invention. エッジ算出部が生成する中間画像を示す図である。It is a figure which shows the intermediate image generated by the edge calculation part. エッジ抽出部による対角線の抽出方法の一例について説明する模式図である。It is a schematic diagram explaining an example of the diagonal line extraction method by an edge extraction part. (a)〜(f)は、分割エッジとして抽出される対角線の検出パターンの一例を示す図である。(A) to (f) are diagrams showing an example of a diagonal detection pattern extracted as a dividing edge. (a)、(b)は、判定用の角度範囲の決定方法の一例について説明する模式図である。(A) and (b) are schematic views explaining an example of the method of determining the angle range for determination. (a)〜(d)は、補間される分割エッジの一例を示す図である。(A) to (d) are diagrams showing an example of the divided edges to be interpolated. 本発明の一実施形態に係る画像の処理手順を示したフローチャートである。It is a flowchart which showed the image processing procedure which concerns on one Embodiment of this invention.

以下、本発明を図に示した実施形態を用いて詳細に説明する。但し、この実施形態に記載される構成要素、種類、組み合わせ、形状、その相対配置などは特定的な記載がない限り、この発明の範囲をそれのみに限定する主旨ではなく単なる説明例に過ぎない。 Hereinafter, the present invention will be described in detail using the embodiments shown in the drawings. However, unless there is a specific description, the components, types, combinations, shapes, relative arrangements, etc. described in this embodiment are merely explanatory examples, not the purpose of limiting the scope of the present invention to that alone. ..

〔機能構成〕
図1は、本発明の一実施形態に係る画像処理装置の機能構成を示すブロック図である。
画像処理装置100は、ビットマップ画像等(ラスタ画像の一例)の入力画像を拡大・回転・変形し、高解像度化した或いは高品質化した出力画像を生成する装置である。画像処理装置100は、複数の画素により構成される入力画像(元画像)を、入力画像中のエッジを活用した複数の三角形によりメッシュ状に領域分割する。入力画像を三角形メッシュにより領域分割する領域分割情報はベクターデータである。画像処理装置100は、領域分割情報に基づいて入力画像を拡大して出力画像を生成する。
画像処理装置100は、エッジ算出部(画素値取得手段、エッジ算出手段)110、メッシュ生成部120、エッジ強調部130、及びラスタライズ部140を備える。
エッジ算出部110は、入力画像から複数の画素(元画素)を含む第一画素領域を選択し、第一画素領域における各画素の画素値に基づいてエッジの角度を算出する手段である。また、エッジ算出部110は、算出された各エッジの角度に対応する画素値を夫々有した中間画素により構成された中間画像を生成するエッジ画像生成手段としても機能する。エッジ算出部110は、コントラスト算出部(差分算出手段)111、グラディエント算出部112、及び、アウトライヤ算出部113を備える。
[Functional configuration]
FIG. 1 is a block diagram showing a functional configuration of an image processing apparatus according to an embodiment of the present invention.
The image processing device 100 is a device that enlarges, rotates, and transforms an input image such as a bitmap image (an example of a raster image) to generate a high-resolution or high-quality output image. The image processing device 100 divides an input image (original image) composed of a plurality of pixels into a mesh-like region by a plurality of triangles utilizing edges in the input image. The area division information for dividing the input image into areas by a triangular mesh is vector data. The image processing device 100 enlarges the input image and generates an output image based on the area division information.
The image processing device 100 includes an edge calculation unit (pixel value acquisition means, edge calculation means) 110, a mesh generation unit 120, an edge enhancement unit 130, and a rasterization unit 140.
The edge calculation unit 110 is a means for selecting a first pixel region including a plurality of pixels (original pixels) from an input image and calculating an edge angle based on the pixel value of each pixel in the first pixel region. The edge calculation unit 110 also functions as an edge image generation means for generating an intermediate image composed of intermediate pixels having pixel values corresponding to the calculated angles of each edge. The edge calculation unit 110 includes a contrast calculation unit (difference calculation means) 111, a gradient calculation unit 112, and an outliner calculation unit 113.

メッシュ生成部120は、エッジ算出部110により算出されたエッジの角度に基づいて、入力画像を複数の三角形により領域分割する手段である。メッシュ生成部120は、エッジ抽出部(エッジ抽出手段)121、検出パターン記憶部122、メッシュ補間部123、及び、補間パターン記憶部124を備える。
エッジ強調部130は、入力画像のエッジを強調した鮮鋭化画像を生成する。
ラスタライズ部140は、エッジ強調部130から出力される鮮鋭化画像を、メッシュ生成部120から出力される領域分割情報を用いて拡大すると共に、必要に応じてバイリニア法やバイキュービック法等を用いてピクセル補間を行って、高解像度化した出力画像を生成する。
上記画像処理装置100を構成する各部は電子回路(ハードウェア)により実現されるが、一般的なコンピュータが実行するソフトウェアにより実現されてもよい。
The mesh generation unit 120 is a means for dividing the input image into regions by a plurality of triangles based on the edge angle calculated by the edge calculation unit 110. The mesh generation unit 120 includes an edge extraction unit (edge extraction means) 121, a detection pattern storage unit 122, a mesh interpolation unit 123, and an interpolation pattern storage unit 124.
The edge enhancement unit 130 generates a sharpened image in which the edges of the input image are emphasized.
The rasterization unit 140 enlarges the sharpened image output from the edge enhancement unit 130 by using the region division information output from the mesh generation unit 120, and also uses a bilinear method, a bicubic method, or the like as necessary. Pixel interpolation is performed to generate a high-resolution output image.
Each part constituting the image processing apparatus 100 is realized by an electronic circuit (hardware), but may be realized by software executed by a general computer.

〔コンピュータの構成〕
図1に示した画像処理装置の各部をソフトウェアにより実現する場合のコンピュータのハードウェア構成の一例について説明する。
図2は、本発明の一実施形態に係るコンピュータのハードウェア構成を示すブロック図である。
画像処理装置100は、CPU(Central Processing Unit)151、ROM(Read Only Memory)152、RAM(Random Access Memory)153、及びバス154を備える。各構成要素は、バス154により接続される。なお、画像処理装置100は、記憶装置155、外部I/F156、リーダライタ157の何れか又は全部を備えてもよい。
[Computer configuration]
An example of the hardware configuration of the computer when each part of the image processing apparatus shown in FIG. 1 is realized by software will be described.
FIG. 2 is a block diagram showing a hardware configuration of a computer according to an embodiment of the present invention.
The image processing device 100 includes a CPU (Central Processing Unit) 151, a ROM (Read Only Memory) 152, a RAM (Random Access Memory) 153, and a bus 154. Each component is connected by a bus 154. The image processing device 100 may include any or all of the storage device 155, the external I / F 156, and the reader / writer 157.

CPU151は、ROM152に格納されたプログラム等を用いて画像処理装置100全体の制御をする。ROM152は、CPU151に画像処理装置100全体を制御する処理を実行させるための制御プログラムを記憶する不揮発性の記憶手段である。画像処理装置100全体を制御する処理を実行させるための制御プログラムは、画像処理装置100が備える記憶装置155に記憶されてもよい。ここで、記憶装置155は例えばHDD(Hard Disk Drive)やSSD(Solid State Drive)等である。
画像処理装置100全体を制御する処理を実行させるための制御プログラムは、記録媒体162に記憶され、画像処理装置100が備えるリーダライタ157で読み出されてROM152又は画像処理装置100が備える記憶装置155に記憶されてもよい。記録媒体162は、例えば、SDメモリーカード(SD Memory Card)、FD(Floppy Disk)、CD(Compact Disc)、DVD(Digital Versatile Disk)、BD(Blu-ray(登録商標) Disk)、およびフラッシュメモリなどの非一時的記録媒体である。
The CPU 151 controls the entire image processing apparatus 100 by using a program or the like stored in the ROM 152. The ROM 152 is a non-volatile storage means for storing a control program for causing the CPU 151 to execute a process of controlling the entire image processing device 100. The control program for executing the process of controlling the entire image processing device 100 may be stored in the storage device 155 included in the image processing device 100. Here, the storage device 155 is, for example, an HDD (Hard Disk Drive), an SSD (Solid State Drive), or the like.
The control program for executing the process of controlling the entire image processing device 100 is stored in the recording medium 162, read by the reader / writer 157 included in the image processing device 100, and stored in the ROM 152 or the storage device 155 included in the image processing device 100. It may be stored in. The recording medium 162 includes, for example, an SD memory card (SD Memory Card), an FD (Floppy Disk), a CD (Compact Disc), a DVD (Digital Versatile Disk), a BD (Blu-ray (registered trademark) Disk), and a flash memory. It is a non-temporary recording medium such as.

RAM153は、ROM152から読み出されたプログラムやデータ等を一時的に格納する揮発性の記憶手段である。CPU151が起動時にROM152から制御プログラムを読み出してRAM153に展開し、RAM153をワークスペースとして制御プログラムを実行することにより、各種の機能が実現される。
外部I/F156は、画像処理装置100と外部記憶装置161とを接続する。外部記憶装置161は、入力画像や出力画像等、各種のデータを記憶する。外部記憶装置161は、例えば、HDDやSSD等である。
図1に示したエッジ算出部110、メッシュ生成部120、エッジ強調部130、及びラスタライズ部140は、夫々、CPU151が制御プログラムをROM152等から読み出してRAM153に展開して実行することにより実現される。また、検出パターン記憶部122及び補間パターン記憶部124は、記憶装置155により実現される。
The RAM 153 is a volatile storage means for temporarily storing programs, data, and the like read from the ROM 152. Various functions are realized by the CPU 151 reading the control program from the ROM 152 at startup, expanding it into the RAM 153, and executing the control program using the RAM 153 as a workspace.
The external I / F 156 connects the image processing device 100 and the external storage device 161. The external storage device 161 stores various data such as an input image and an output image. The external storage device 161 is, for example, an HDD, an SSD, or the like.
The edge calculation unit 110, the mesh generation unit 120, the edge enhancement unit 130, and the rasterization unit 140 shown in FIG. 1 are each realized by the CPU 151 reading the control program from the ROM 152 or the like, expanding it into the RAM 153, and executing the control program. .. Further, the detection pattern storage unit 122 and the interpolation pattern storage unit 124 are realized by the storage device 155.

〔エッジ算出部〕
<処理概要>
図3(a)〜(c)は、本発明の一実施形態に係る画像処理装置によるエッジ算出方法の概要について説明する図である。
コントラスト算出部111は、図3(a)に示す入力画像10から、複数の画素11により形成される所定形状の第一画素領域12を選択し、第一画素領域12の各画素11の画素値(例えば輝度値)を取得する。コントラスト算出部111は、第一画素領域12を構成する各画素11の各画素値に基づいて、第一画素領域12における画素の画素値の差、即ちコントラストC(f_cont)を算出する(図3(b))。
[Edge calculation unit]
<Outline of processing>
3A to 3C are diagrams illustrating an outline of an edge calculation method by an image processing apparatus according to an embodiment of the present invention.
The contrast calculation unit 111 selects a first pixel region 12 having a predetermined shape formed by a plurality of pixels 11 from the input image 10 shown in FIG. 3A, and the pixel value of each pixel 11 in the first pixel region 12 (For example, brightness value) is acquired. The contrast calculation unit 111 calculates the difference between the pixel values of the pixels in the first pixel region 12, that is, the contrast C (f_cont), based on the pixel values of the pixels 11 constituting the first pixel region 12 (FIG. 3). (B)).

グラディエント算出部112、及びアウトライヤ算出部113は、第一画素領域12のエッジ13の角度を算出する(図3(c))。本例において、グラディエント算出部112はエッジ13の角度を0〜90度の範囲で算出し、アウトライヤ算出部113はエッジ13の向き(右下方向、又は左下方向)を算出する。
グラディエント算出部112は、第一画素領域12のコントラストCの大きさに応じて第一画素領域12を含む参照領域15(15a、15b)を設定する(図3(c))。即ち、グラディエント算出部112は、コントラストCが閾値Cτ未満の場合に第一画素領域12を参照領域15aとして設定し、コントラストCが閾値Cτ以上の場合に第一画素領域12よりも広い第二画素領域を参照領域15bとして設定する。グラディエント算出部112は、設定した参照領域15の各画素11の画素値を取得し、参照領域15における各画素の画素値を用いて第一画素領域12のエッジ13の角度を算出する。
アウトライヤ算出部113は、第一画素領域12の各画素11の画素値を取得し、第一画素領域12における各画素の画素値を用いて第一画素領域12のエッジ13の向きを算出する。
The gradient calculation unit 112 and the outliner calculation unit 113 calculate the angle of the edge 13 of the first pixel region 12 (FIG. 3 (c)). In this example, the gradient calculation unit 112 calculates the angle of the edge 13 in the range of 0 to 90 degrees, and the outliner calculation unit 113 calculates the direction of the edge 13 (lower right direction or lower left direction).
The gradient calculation unit 112 sets the reference area 15 (15a, 15b) including the first pixel area 12 according to the magnitude of the contrast C of the first pixel area 12 (FIG. 3 (c)). That is, the gradient calculation unit 112 sets the first pixel region 12 as the reference region 15a when the contrast C is less than the threshold value Cτ, and the second pixel wider than the first pixel region 12 when the contrast C is the threshold value Cτ or more. The area is set as the reference area 15b. The gradient calculation unit 112 acquires the pixel value of each pixel 11 of the set reference region 15, and calculates the angle of the edge 13 of the first pixel region 12 using the pixel value of each pixel in the reference region 15.
The outliner calculation unit 113 acquires the pixel value of each pixel 11 in the first pixel region 12, and calculates the orientation of the edge 13 of the first pixel region 12 using the pixel value of each pixel in the first pixel region 12.

以下、各部の動作について、具体例を用いて詳細に説明する。
<コントラスト算出部>
<<1要素画像の場合>>
図3(a)に示すように、コントラスト算出部111は、入力画像10の例えば左上から複数の画素11を含む第一画素領域12を順次設定し、各第一画素領域12に含まれる各画素の輝度値を取得する。コントラスト算出部111は第一画素領域12のコントラストC、言い換えれば、第一画素領域12における画素の輝度値の差を算出する。
ここで、第一画素領域12を2×2画素領域(2×2行列A)とし、各画素の輝度値(2×2行列Aの成分)をa,b,c,dとした場合、コントラストC(f_cont)は、例えば、

Figure 0006883864
・・・式(1)
のように算出される。なお、符号
Figure 0006883864
は、小数点以下の数値を切り捨てる床関数である。
このように、コントラスト算出部111は、第一画素領域12における最大輝度値と最小輝度値の差をコントラストCとして算出することができる。 Hereinafter, the operation of each part will be described in detail with reference to specific examples.
<Contrast calculation unit>
<< In the case of 1-element image >>
As shown in FIG. 3A, the contrast calculation unit 111 sequentially sets the first pixel area 12 including a plurality of pixels 11 from the upper left of the input image 10, and each pixel included in each first pixel area 12. Get the brightness value of. The contrast calculation unit 111 calculates the contrast C of the first pixel region 12, in other words, the difference in the brightness values of the pixels in the first pixel region 12.
Here, when the first pixel area 12 is a 2 × 2 pixel area (2 × 2 matrix A) and the luminance value (component of the 2 × 2 matrix A) of each pixel is a, b, c, d, the contrast C (f_cont) is, for example,
Figure 0006883864
... Equation (1)
It is calculated as. The code
Figure 0006883864
Is a floor function that truncates numbers after the decimal point.
In this way, the contrast calculation unit 111 can calculate the difference between the maximum luminance value and the minimum luminance value in the first pixel region 12 as the contrast C.

<<多要素画像の場合>>
仮に、入力画像が、その各画素が夫々R(Red)、G(Green)、B(Blue)の各要素について夫々輝度値を有するRGB画像(多要素画像、特に3要素画像の一例)である場合、コントラストC(f_cont)は、第一画素領域12を2×2画素領域、要素Xに係る各画素の輝度値(行列Axの成分)をax,bx,cx,dxとして、

Figure 0006883864

Figure 0006883864

Figure 0006883864

Figure 0006883864
・・・式(2)
のように算出される。
このように、コントラスト算出部111は、入力画像が、入力画像の各画素が夫々複数の要素を有した多要素画像である場合も1要素画像の場合と同様に、コントラストCを算出することができる。 << For multi-factor images >>
Suppose that the input image is an RGB image (an example of a multi-element image, particularly a three-element image) in which each pixel has a brightness value for each element of R (Red), G (Green), and B (Blue). In the case of contrast C (f_cont), the first pixel area 12 is a 2 × 2 pixel area, and the brightness value (component of the matrix Ax) of each pixel related to the element X is ax, bx, cx, dx.
Figure 0006883864

Figure 0006883864

Figure 0006883864

Figure 0006883864
... Equation (2)
It is calculated as.
As described above, the contrast calculation unit 111 can calculate the contrast C even when the input image is a multi-element image in which each pixel of the input image has a plurality of elements, as in the case of the one-element image. it can.

<<第一画素領域の形状>>
本例では第一画素領域を2×2画素により構成される正方形状の画素領域としているが、第一画素領域を、複数の画素を含むその他の矩形状の画素領域としてもよい。また、第一画素領域を、複数の画素を含む任意の形状の画素領域(例えば円形の画素領域)としてもよい。この場合、コントラスト算出部111は、矩形状の画素領域を選択し、不要な画素をマスクすることで、任意の形状の画素領域を第一画素領域として設定することができる。
<< Shape of first pixel area >>
In this example, the first pixel area is a square pixel area composed of 2 × 2 pixels, but the first pixel area may be another rectangular pixel area including a plurality of pixels. Further, the first pixel region may be a pixel region having an arbitrary shape including a plurality of pixels (for example, a circular pixel region). In this case, the contrast calculation unit 111 can set a pixel region having an arbitrary shape as the first pixel region by selecting a rectangular pixel region and masking unnecessary pixels.

<グラディエント算出部>
グラディエント算出部112は、図3(c)に示すようにコントラストCの大きさに応じて第一画素領域12を含む参照領域15(15a,15b)を設定する。具体的には、グラディエント算出部112は、コントラストCの大きさに応じて、第一画素領域12(参照領域15a)又は第一画素領域12よりも広い領域(参照領域15b)を参照領域15として設定する。グラディエント算出部112は、設定した参照領域15における各画素の輝度値を用いて第一画素領域12のエッジ13の角度θが0度〜90度の範囲で示されたグラディエントG(f_grad、(gx,gy))を算出する。
<Gradient calculation unit>
As shown in FIG. 3C, the gradient calculation unit 112 sets the reference area 15 (15a, 15b) including the first pixel area 12 according to the magnitude of the contrast C. Specifically, the gradient calculation unit 112 sets the first pixel region 12 (reference region 15a) or a region wider than the first pixel region 12 (reference region 15b) as the reference region 15 according to the magnitude of the contrast C. Set. The gradient calculation unit 112 uses the brightness value of each pixel in the set reference region 15 to indicate the gradient G (f_grad, (gx)) in which the angle θ of the edge 13 of the first pixel region 12 is shown in the range of 0 degrees to 90 degrees. , Gy)) is calculated.

<<2×2グラディエント関数>>
グラディエント算出部112は、コントラストCが閾値Cτ未満の場合に第一画素領域12を参照領域15aとして設定する(図3(c))。
参照領域15aが2×2画素領域であり、2×2行列Aとして表現される場合、グラディエント算出部112は、以下の式(3)に示される2×2グラディエント関数により参照領域15aの水平方向における輝度値の変化量(又は変化率)gxと、垂直方向における輝度値の変化量(又は変化率)gyと、を算出する。

Figure 0006883864
・・・式(3)
なお、記号「*」は行列のたたみ込みを表し、各行列の夫々の成分の積を足し合わせることを意味する。参照領域15aの各画素の輝度値(行列Aの成分)をa,b,c,dとしてグラディエントG(f_grad)を具体的に示せば、
Figure 0006883864

Figure 0006883864

Figure 0006883864
・・・式(4)
となる。式(4)に示すように、本例においてgxとgyは、共に正の数となる。 << 2 × 2 gradient function >>
The gradient calculation unit 112 sets the first pixel region 12 as the reference region 15a when the contrast C is less than the threshold value Cτ (FIG. 3C).
When the reference area 15a is a 2 × 2 pixel area and is expressed as a 2 × 2 matrix A, the gradient calculation unit 112 uses the 2 × 2 gradient function shown in the following equation (3) to move the reference area 15a in the horizontal direction. The amount of change (or rate of change) gx of the luminance value in the vertical direction and the amount of change (or rate of change) gy of the luminance value in the vertical direction are calculated.
Figure 0006883864
... Equation (3)
The symbol "*" represents the convolution of the matrix, and means that the products of the components of each matrix are added together. If the gradient G (f_grad) is specifically shown with the luminance values (components of the matrix A) of each pixel in the reference region 15a as a, b, c, and d,
Figure 0006883864

Figure 0006883864

Figure 0006883864
... Equation (4)
Will be. As shown in the formula (4), both gx and gy are positive numbers in this example.

仮に、入力画像が、入力画像の各画素が夫々R(Red)、G(Green)、B(Blue)の各要素について夫々輝度値を有するRGB画像(多要素画像、特に3要素画像の一例)である場合、そのグラディエントG(f_grad)は、各要素X(X∈{R,G,B})に係るグラディエントGの総和として求めることができる。

Figure 0006883864
・・・式(5) Suppose that the input image is an RGB image (an example of a multi-element image, particularly a three-element image) in which each pixel of the input image has a brightness value for each element of R (Red), G (Green), and B (Blue). If, the gradient G (f_grad) can be obtained as the sum of the gradient G related to each element X (X ∈ {R, G, B}).
Figure 0006883864
... Equation (5)

<<4×4グラディエント関数>>
グラディエント算出部112は、コントラストCが閾値Cτ以上の場合に第一画素領域12を含み、且つ第一画素領域12よりも大きい領域(第二画素領域)を参照領域15bとして設定する(図3(c))。
本例において、グラディエント算出部112は、第一画素領域12よりも一回り大きい4×4画素領域を参照領域15bとして設定する。
<< 4 × 4 gradient function >>
The gradient calculation unit 112 sets a region (second pixel region) including the first pixel region 12 and larger than the first pixel region 12 as the reference region 15b when the contrast C is equal to or higher than the threshold value Cτ (FIG. 3 (FIG. 3). c)).
In this example, the gradient calculation unit 112 sets a 4 × 4 pixel area, which is one size larger than the first pixel area 12, as the reference area 15b.

参照領域15bが4×4画素領域である場合(4×4行列Bとして表現される)、グラディエント算出部112は、以下の式(6)に示される4×4グラディエント関数により参照領域15bの水平方向における輝度値の変化量(又は変化率)gxと、垂直方向における輝度値の変化量(又は変化率)gyと、を算出する。

Figure 0006883864
・・・式(6) When the reference area 15b is a 4 × 4 pixel area (expressed as a 4 × 4 matrix B), the gradient calculation unit 112 is horizontal to the reference area 15b by the 4 × 4 gradient function shown in the following equation (6). The amount of change (or rate of change) gx of the luminance value in the direction and the amount of change (or rate of change) gy of the luminance value in the vertical direction are calculated.
Figure 0006883864
... Equation (6)

グラディエント算出部112は、参照領域15bの各画素の輝度値に対し、第一画素領域12に含まれる画素との位置関係に応じた重み付け係数を乗じた上でエッジの角度(グラディエント)を算出する。即ち、グラディエント算出部112は、第一画素領域12を構成する画素の輝度値に対して重み付け係数「+4」又は「−4」を乗じ、第一画素領域12に対して水平又は垂直方向に隣接する画素の輝度値に対して重み付け係数「+2」又は「−2」を乗じ、他の画素の輝度値に対して重み付け係数「+1」又は「−1」を乗じている。
上記、重み付け係数には2のべき乗値が設定されている。重み付け係数に2のべき乗値を設定することにより、ビットをずらして計算するシフト演算が利用できるようになり、処理速度の向上を図ることができる。
The gradient calculation unit 112 calculates the edge angle (gradient) after multiplying the brightness value of each pixel in the reference region 15b by a weighting coefficient according to the positional relationship with the pixels included in the first pixel region 12. .. That is, the gradient calculation unit 112 multiplies the luminance value of the pixels constituting the first pixel region 12 by the weighting coefficient "+4" or "-4", and is adjacent to the first pixel region 12 in the horizontal or vertical direction. The brightness value of the pixel to be used is multiplied by the weighting coefficient "+2" or "-2", and the brightness value of the other pixels is multiplied by the weighting coefficient "+1" or "-1".
A power value of 2 is set for the weighting coefficient. By setting a power value of 2 to the weighting coefficient, a shift operation for calculating by shifting the bits can be used, and the processing speed can be improved.

<<エッジの角度θ>>
グラディエント算出部112は、式(3)又は式(6)により求めたグラディエントG(gx,gy)から、逆三角関数により第一画素領域12のエッジ13の角度θ(0°≦θ≦90°)を求めることができる。

Figure 0006883864
・・・式(7)
即ち、グラディエント算出部112は、参照領域15の水平方向における輝度値の変化率gxと垂直方向における輝度値の変化率gyとに基づいてエッジ13の角度θを算出する。
なお、逆三角関数の計算は処理負荷が高いため、式(7)の代わりに、角度θの正接
Figure 0006883864
・・・式(8)
を求めてもよい。
グラディエント算出部112は、コントラストCが閾値Cτ以上の場合に、第一画素領域12よりも広い参照領域15bの各画素の輝度値に基づいてグラディエントGを算出するため、より正確にエッジ13の角度θを算出可能となる。また、参照領域15bの各輝度値に対して、第一画素領域12との位置関係に応じた重み付け係数を乗じることにより、より正確にエッジ13の角度θを算出できる。 << Edge angle θ >>
The gradient calculation unit 112 uses an inverse trigonometric function to calculate the angle θ (0 ° ≦ θ ≦ 90 °) of the edge 13 of the first pixel region 12 from the gradient G (gx, gy) obtained by the formula (3) or the formula (6). ) Can be obtained.
Figure 0006883864
... Equation (7)
That is, the gradient calculation unit 112 calculates the angle θ of the edge 13 based on the rate of change gx of the brightness value in the horizontal direction of the reference region 15 and the rate of change gy of the brightness value in the vertical direction.
Since the calculation of the inverse trigonometric function has a high processing load, the tangent of the angle θ is used instead of the equation (7).
Figure 0006883864
... Equation (8)
May be sought.
When the contrast C is equal to or greater than the threshold value Cτ, the gradient calculation unit 112 calculates the gradient G based on the brightness value of each pixel in the reference region 15b wider than the first pixel region 12, so that the angle of the edge 13 is more accurately calculated. θ can be calculated. Further, the angle θ of the edge 13 can be calculated more accurately by multiplying each luminance value of the reference region 15b by a weighting coefficient according to the positional relationship with the first pixel region 12.

<アウトライヤ算出部>
アウトライヤ算出部113は、第一画素領域12における局所的なエッジ13の強さと方向を推定する値であるアウトライヤ(f_outlier)を算出する。
<Outlier calculation unit>
The outlier calculation unit 113 calculates an outlier (f_outlier) which is a value for estimating the strength and direction of the local edge 13 in the first pixel region 12.

例えば、第一画素領域12を2×2画素領域(行列A)とした場合、アウトライヤ(f_outlier)は、

Figure 0006883864
・・・式(9)
のように算出される。なお、記号「*」は行列のたたみ込みを表し、各行列の夫々の成分の積を足し合わせることを意味する。 For example, when the first pixel area 12 is a 2 × 2 pixel area (matrix A), the outlier (f_outlier) is
Figure 0006883864
... Equation (9)
It is calculated as. The symbol "*" represents the convolution of the matrix, and means that the products of the components of each matrix are added together.

第一画素領域12の各画素の輝度値(行列Aの成分)をa,b,c,dとしてアウトライヤ(f_outlier)を具体的に示せば、以下のようになる。

Figure 0006883864
・・・式(10)
即ち、アウトライヤ(f_outlier)の大きさは、斜め方向における輝度変化の大きさを示し、アウトライヤ(f_outlier)の符号は、エッジ13の向きを表す。アウトライヤ(f_outlier)が正の数をとるときエッジ13は右下方向を向き、負の数をとるときエッジ13は左下方向に向いていることを示す。
グラディエントGから求められるエッジの角度θが0〜90度の範囲であっても、アウトライヤの値を求めることによって、エッジの角度θを0〜180度の範囲で特定することができる。 The outliers (f_outlier) are specifically shown with the luminance values (components of the matrix A) of each pixel in the first pixel region 12 as a, b, c, and d as follows.
Figure 0006883864
... Equation (10)
That is, the magnitude of the outlier (f_outlier) indicates the magnitude of the change in brightness in the oblique direction, and the sign of the outlier (f_outlier) indicates the direction of the edge 13. When the outlier (f_outlier) takes a positive number, the edge 13 points in the lower right direction, and when the outlier (f_outlier) takes a negative number, the edge 13 points in the lower left direction.
Even if the edge angle θ obtained from the gradient G is in the range of 0 to 90 degrees, the edge angle θ can be specified in the range of 0 to 180 degrees by obtaining the outliner value.

<エッジ算出部が生成する中間画像>
図4は、エッジ算出部が生成する中間画像を示す図である。
最終的に、エッジ算出部110は、夫々の第一画素領域12における各エッジ13の角度θ(0〜90度、又は0〜180度)、又はこれを示す値(グラディエント(gx,gy)、及びアウトライヤ)を画素値として夫々有した複数の中間画素21により構成される中間画像20を生成する。即ち、エッジ算出部110は、各画素がエッジの角度情報を有する中間画像20を生成するエッジ画像生成手段として機能する。本例において中間画像20は、各中間画素21がグラディエントの値を有したグラディエント画像と、各中間画素21がアウトライヤの値を有したアウトライヤ画像の複数の画像から構成される。
各中間画素21が有するアウトライヤとグラディエントの値は、元画像(入力画像10)において第一画素領域12を構成する4つの画素11の関係性を示すものである。中間画像20は、入力画像10の各画素11の画素中心を頂点とする正方形状の領域として表される複数の中間画素21から構成される。また、中間画像20は入力画像10に対して右下方向に半画素ずれた位置関係となる。
<Intermediate image generated by the edge calculation unit>
FIG. 4 is a diagram showing an intermediate image generated by the edge calculation unit.
Finally, the edge calculation unit 110 determines the angle θ (0 to 90 degrees, or 0 to 180 degrees) of each edge 13 in each first pixel region 12, or a value indicating this (gradient (gx, gy), And an outliner) as pixel values, respectively, to generate an intermediate image 20 composed of a plurality of intermediate pixels 21. That is, the edge calculation unit 110 functions as an edge image generation means for generating an intermediate image 20 in which each pixel has edge angle information. In this example, the intermediate image 20 is composed of a plurality of images of a gradient image in which each intermediate pixel 21 has a gradient value and an outline image in which each intermediate pixel 21 has an outliner value.
The outliner and gradient values of each intermediate pixel 21 indicate the relationship between the four pixels 11 constituting the first pixel region 12 in the original image (input image 10). The intermediate image 20 is composed of a plurality of intermediate pixels 21 represented as a square region having the pixel center of each pixel 11 of the input image 10 as a vertex. Further, the intermediate image 20 has a positional relationship that is shifted by half a pixel in the lower right direction with respect to the input image 10.

<変形例>
本実施形態においては、グラディエントを算出するための参照領域15を設定するに際して、第一画素領域12の輝度のコントラスト(輝度値の差)を利用しているが、色のコントラスト(色差)等、画素の持つ輝度値以外の画素値の差を利用してもよい。輝度のコントラストに代えて、色のコントラスト(色を表す画素値の差)を用いてもよい。
グラディエント算出部112は、上記実施形態とは異なり、コントラストCが閾値Cτ未満の場合に第一画素領域12よりも広い領域を参照領域として設定し、コントラストCが閾値Cτ以上の場合に第一画素領域12を参照領域として設定してもよい。
<Modification example>
In the present embodiment, when setting the reference area 15 for calculating the gradient, the brightness contrast (difference in luminance value) of the first pixel region 12 is used, but the color contrast (color difference) and the like are used. The difference in pixel values other than the brightness value of the pixels may be used. Instead of the brightness contrast, a color contrast (difference in pixel values representing colors) may be used.
Unlike the above embodiment, the gradient calculation unit 112 sets a region wider than the first pixel region 12 as a reference region when the contrast C is less than the threshold value Cτ, and sets the first pixel when the contrast C is the threshold value Cτ or more. Area 12 may be set as a reference area.

〔メッシュ生成部〕
<処理概要>
メッシュ生成部120は、入力画像10中のエッジを活用して、入力画像10を複数の三角形により領域分割する。即ち、入力画像10中のエッジが、入力画像10を領域分割する三角形のエッジとなるように、入力画像10を分割する三角形を選択する。
エッジ抽出部121は、エッジ算出部110により算出されたエッジの角度θ(エッジの角度を示す値を含む)、又はこれを示す値(例えば、グラディエント(gx,gy)及びアウトライヤ)に基づいて、入力画像10を領域分割する三角形の辺である分割エッジ(対角線23)を順次抽出する。
メッシュ補間部123は、入力画像10の全体が三角形により領域分割されるように、メッシュが不完全な部分について分割エッジを補間する。
[Mesh generator]
<Outline of processing>
The mesh generation unit 120 utilizes the edges in the input image 10 to divide the input image 10 into regions by a plurality of triangles. That is, the triangle that divides the input image 10 is selected so that the edge in the input image 10 becomes the edge of the triangle that divides the input image 10 into a region.
The edge extraction unit 121 is based on the edge angle θ (including a value indicating the edge angle) calculated by the edge calculation unit 110 or a value indicating this (for example, a gradient (gx, gy) and an outliner). The division edges (diagonal lines 23), which are the sides of the triangle that divides the input image 10 into regions, are sequentially extracted.
The mesh interpolation unit 123 interpolates the divided edges with respect to the incomplete mesh portion so that the entire input image 10 is divided into regions by triangles.

<エッジ抽出部:対角線の抽出方法>
図5は、エッジ抽出部による対角線の抽出方法の一例について説明する模式図である。以下、対角線を形成する矩形領域が右3×2画素領域である場合の例により説明する。なお、「右3×2画素領域」とは、図中、対角線が右下方向に伸び、且つ3×2画素からなる矩形領域を意味する。対角線が図中左下方向に伸びる場合は「左・・・画素領域」と表現する。
エッジ抽出部121は、図4に示す中間画像20から、複数の中間画素21により形成される矩形領域22(ここでは右3×2画素領域)を選択する。エッジ抽出部121は、矩形領域22の対角線23が通過する中間画素を判定対象画素24(図中、着色部分)として設定する。エッジ抽出部121は、矩形領域22中の全ての判定対象画素24が示す夫々のエッジ13の角度θが対角線23の角度φに対して所定の角度範囲内にあるとき、対角線23を、入力画像を領域分割する三角形の辺を構成する分割エッジとして抽出する。
<Edge extraction part: Diagonal extraction method>
FIG. 5 is a schematic diagram illustrating an example of a diagonal line extraction method by the edge extraction unit. Hereinafter, an example will be described in which the rectangular region forming the diagonal line is the right 3 × 2 pixel region. The “right 3 × 2 pixel area” means a rectangular area in the drawing in which the diagonal line extends in the lower right direction and is composed of 3 × 2 pixels. When the diagonal line extends in the lower left direction in the figure, it is expressed as "left ... pixel area".
The edge extraction unit 121 selects a rectangular region 22 (here, a right 3 × 2 pixel region) formed by a plurality of intermediate pixels 21 from the intermediate image 20 shown in FIG. The edge extraction unit 121 sets an intermediate pixel through which the diagonal line 23 of the rectangular region 22 passes as a determination target pixel 24 (colored portion in the figure). When the angle θ of each edge 13 indicated by all the determination target pixels 24 in the rectangular region 22 is within a predetermined angle range with respect to the angle φ of the diagonal line 23, the edge extraction unit 121 inputs the diagonal line 23 to the input image. Is extracted as the dividing edge that constitutes the side of the triangle that divides the area.

<分割エッジの検出パターン>
図6(a)〜(f)は、分割エッジとして抽出される対角線の検出パターンの一例を示す図である。
検出パターン記憶部122(図1)は、複数種類の対角線の検出パターンを記憶している。具体的には、検出パターン記憶部122は、矩形領域22である右3×2画素領域、左3×2画素領域(図6(a))、右2×3画素領域、左2×3画素領域(図6(b))、右3×1画素領域、左3×1画素領域(図6(c))、右1×3画素領域、左1×3画素領域(図6(d))、右2×1画素領域、左2×1画素領域(図6(e))、右1×2画素領域、左1×2画素領域(図6(f))の夫々の対角線に係る検出パターンを記憶している。なお、右1×1画素領域と左1×1画素領域の対角線は、補間対象の分割エッジとして取り扱われるため(図7参照)、検出パターンとしては記憶されていない。
本例において検出パターン記憶部122は、3×3画素領域よりも面積が小さい矩形領域の対角線を検出パターンとして記憶しているが、検出パターン記憶部122は、これよりも大きい矩形領域の対角線に係る検出パターンを記憶してもよい。
<Detection pattern of split edge>
6 (a) to 6 (f) are diagrams showing an example of a diagonal detection pattern extracted as a dividing edge.
The detection pattern storage unit 122 (FIG. 1) stores a plurality of types of diagonal detection patterns. Specifically, the detection pattern storage unit 122 has a rectangular area 22, a right 3 × 2 pixel area, a left 3 × 2 pixel area (FIG. 6A), a right 2 × 3 pixel area, and a left 2 × 3 pixel. Region (FIG. 6 (b)), right 3 × 1 pixel region, left 3 × 1 pixel region (FIG. 6 (c)), right 1 × 3 pixel region, left 1 × 3 pixel region (FIG. 6 (d)) , Right 2 × 1 pixel area, left 2 × 1 pixel area (FIG. 6 (e)), right 1 × 2 pixel area, left 1 × 2 pixel area (FIG. 6 (f)). I remember. Since the diagonal lines of the right 1 × 1 pixel area and the left 1 × 1 pixel area are treated as the divided edges to be interpolated (see FIG. 7), they are not stored as detection patterns.
In this example, the detection pattern storage unit 122 stores the diagonal line of the rectangular area smaller than the 3 × 3 pixel area as the detection pattern, but the detection pattern storage unit 122 stores the diagonal line of the rectangular area larger than this as the detection pattern. Such a detection pattern may be stored.

検出パターン記憶部122は、互いに重複しない角度関係にある対角線に係る検出パターンを記憶する。特に、検出パターン記憶部122は、端点以外の対角線上に中間画素の交点(角部)を含まない対角線を検出パターンとして記憶することが望ましい。すなわち、検出パターンとして記憶される対角線を形成する矩形領域は、矩形領域の対角線と同一角度の対角線を有する小矩形領域を内部に含まない、互いに直行する2辺の長さが「互いに素」の関係にある矩形領域であることが望ましい。2辺の長さが「互いに素」とは、矩形領域を構成する直行する2辺の長さの最大公約数が1である関係を意味する。
例えば、6×4画素領域はその内部に4個の3×2画素領域を含み、6×4画素領域の対角線上には3×2画素領域の角部(交点)を含むため、検出パターン記憶部122は3×2画素領域の対角線を検出パターンとして記憶してもよいが、6×4画素領域の対角線は検出パターンとして記憶しないことが望ましい。これは、ラスタライズ時には、三角形メッシュの頂点に位置する元画素の画素値を参照して三角形メッシュ内を塗りつぶす画素値が決定されることに起因する。例えば、6×4画素領域の対角線を抽出する場合、この対角線を含んで構成される三角形メッシュの各辺の中央には3×2画素領域の角部が存在するが、各辺の中央に位置する元画素の画素値はラスタライズ時に参照されないため、元画像の再現率が低下する虞がある。検出パターン記憶部122に「互いに素」の関係にある矩形領域に係る対角線のみを検出パターンとして記憶させておくことにより、ラスタライズ時において元画像の再現率を向上させ、より元画像に近い画像を出力することが可能となる。
The detection pattern storage unit 122 stores the detection patterns related to the diagonal lines having an angular relationship that does not overlap with each other. In particular, it is desirable that the detection pattern storage unit 122 stores a diagonal line other than the end point on the diagonal line that does not include the intersection (corner portion) of the intermediate pixels as the detection pattern. That is, the rectangular region forming the diagonal line stored as the detection pattern does not include a small rectangular region having a diagonal line at the same angle as the diagonal line of the rectangular region, and the lengths of the two sides orthogonal to each other are "elementary to each other". It is desirable that the rectangular area is related. When the lengths of the two sides are "disjoint", it means that the greatest common divisor of the lengths of the two orthogonal sides forming the rectangular region is 1.
For example, since the 6 × 4 pixel area includes four 3 × 2 pixel areas and includes the corners (intersection points) of the 3 × 2 pixel area on the diagonal line of the 6 × 4 pixel area, the detection pattern is stored. The unit 122 may store the diagonal line of the 3 × 2 pixel area as a detection pattern, but it is desirable that the diagonal line of the 6 × 4 pixel area is not stored as a detection pattern. This is because at the time of rasterization, the pixel value to be filled in the triangular mesh is determined by referring to the pixel value of the original pixel located at the apex of the triangular mesh. For example, when extracting the diagonal line of the 6 × 4 pixel area, the corner part of the 3 × 2 pixel area exists in the center of each side of the triangular mesh including the diagonal line, but the position is located in the center of each side. Since the pixel value of the original pixel is not referred to at the time of rasterization, the reproduction rate of the original image may decrease. By storing only the diagonal lines related to the rectangular regions that are "disjoint" in the detection pattern storage unit 122 as the detection pattern, the recall rate of the original image is improved at the time of rasterization, and an image closer to the original image can be obtained. It becomes possible to output.

検出パターン記憶部122(図1)には、各対角線23の検出パターンに対して、判定対象画素24の位置と、判定用の角度範囲(パラメータa,b、アウトライヤ符号)とが対応付けて判定テーブルとして記憶されている。さらに、各対角線23の検出パターンには、検出対象である対角線23の基点23aの位置と、判定対象画素24のうち最初に判定が行われる注目画素25の位置とに係る情報が対応付けられている。なお、検出対象である対角線23の基点23aを有した判定対象画素24が注目画素25である。つまり、各対角線23の検出パターンは、注目画素25と注目画素25以外の判定対象画素24との位置関係を示す情報を含むと言える。
検出パターン記憶部122に記憶される判定用の角度範囲は、エッジ抽出部121によって抽出される対角線が互いに交差しないように設定されている。
In the detection pattern storage unit 122 (FIG. 1), the position of the determination target pixel 24 and the determination angle range (parameters a, b, outliner code) are associated with each other for the detection pattern of each diagonal line 23 for determination. It is stored as a table. Further, the detection pattern of each diagonal line 23 is associated with information relating to the position of the base point 23a of the diagonal line 23 to be detected and the position of the attention pixel 25 in which the determination is first performed among the determination target pixels 24. There is. The determination target pixel 24 having the base point 23a of the diagonal line 23 to be detected is the attention pixel 25. That is, it can be said that the detection pattern of each diagonal line 23 includes information indicating the positional relationship between the attention pixel 25 and the determination target pixel 24 other than the attention pixel 25.
The determination angle range stored in the detection pattern storage unit 122 is set so that the diagonal lines extracted by the edge extraction unit 121 do not intersect with each other.

図7(a)、(b)は、判定用の角度範囲の決定方法の一例について説明する模式図である。以下、右3×2画素からなる矩形領域22に係る対角線23を検出するための、判定用の角度範囲を決定する場合の例により説明する。
まず、抽出対象となる対角線23に対して、反時計回り方向に最も近い矩形領域(右2×1画素領域)の対角線d1と、時計回り方向に最も近い矩形領域(右1×1画素領域)の対角線d2とを見つける。ここで、対角線23の角度をφ、対角線d1の角度をα、対角線d2の角度をβとする。
対角線23の角度φと対角線d1の角度αを等角度分割した角度(φ+α)/2と、対角線23の角度φと対角線d2の角度βを等角度分割した角度(φ+β)/2との間を、判定用の角度範囲とする。

Figure 0006883864
・・・式(11)
なお、θは各中間画素21が示すエッジの角度である。 7 (a) and 7 (b) are schematic views illustrating an example of a method for determining an angle range for determination. Hereinafter, an example of determining an angle range for determination for detecting the diagonal line 23 related to the rectangular region 22 composed of the right 3 × 2 pixels will be described.
First, the diagonal line d1 of the rectangular area closest to the counterclockwise direction (right 2 × 1 pixel area) and the rectangular area closest to the clockwise direction (right 1 × 1 pixel area) with respect to the diagonal line 23 to be extracted. Find the diagonal line d2 of. Here, the angle of the diagonal line 23 is φ, the angle of the diagonal line d1 is α, and the angle of the diagonal line d2 is β.
Between the angle φ of the diagonal line 23 and the angle α of the diagonal line d1 divided equally (φ + α) / 2 and the angle φ of the diagonal line 23 and the angle β of the diagonal line d2 divided equally (φ + β) / 2. , The angle range for judgment.
Figure 0006883864
... Equation (11)
Note that θ is the angle of the edge indicated by each intermediate pixel 21.

ところで、中間画素21のエッジの角度θは、中間画素21のグラディエントを(gx,gy)とするとき、以下の式(12)により求められる。

Figure 0006883864
・・・式(12)
しかし、逆三角関数の計算は複雑であり、これを中間画素ごとに計算する場合には、回路の複雑化と処理負荷の増大を招くという問題がある。そこで、式(12)を以下の式(13)ように変形して、グラディエント比(gy/gx)の下限値をパラメータa、上限値をパラメータbとして判定テーブル(図6)に記憶させることで、逆三角関数の計算を省略することが可能となる。
Figure 0006883864
・・・式(13) By the way, the angle θ of the edge of the intermediate pixel 21 is obtained by the following equation (12) when the gradient of the intermediate pixel 21 is (gx, gy).
Figure 0006883864
... Equation (12)
However, the calculation of the inverse trigonometric function is complicated, and when this is calculated for each intermediate pixel, there is a problem that the circuit becomes complicated and the processing load increases. Therefore, the equation (12) is transformed into the following equation (13) and stored in the determination table (FIG. 6) with the lower limit value of the gradient ratio (gy / gx) as the parameter a and the upper limit value as the parameter b. , It is possible to omit the calculation of the inverse trigonometric function.
Figure 0006883864
... Equation (13)

なお、図6に示す検出パターンにおいて、各対角線(角度φ)を決定するパラメータa,bは、a<tanφ、tanφ<bを満たす任意の値に設定することができる。また、各対角線を決定する角度範囲は、異なる対角線を決定するパラメータ同士で重複する部分を有していてもよい。例えば、図6に示す検出パターンにおいては、図6(c)に示す左右3×1画素領域のパラメータaと、図6(d)に示す左右1×3画素領域のパラメータbについては、判定されないエッジの範囲が生じないように、エッジの判定範囲を拡大している。また、図6(e)に示す左右2×1画素領域の対角線と、図6(f)に示す左右1×2画素領域の対角線は、誤検出が少ないことから、判定用の角度範囲を拡大している。
更に、左右3×1画素領域と、左右1×3画素領域については、水平方向のエッジと垂直方向のエッジを誤検出しないようにするために、グラディエントのy成分gyがゼロである場合は対角線を抽出しないように設定されている。
In the detection pattern shown in FIG. 6, the parameters a and b for determining each diagonal line (angle φ) can be set to arbitrary values satisfying a <tanφ and tanφ <b. Further, the angle range for determining each diagonal line may have a portion overlapping between the parameters for determining different diagonal lines. For example, in the detection pattern shown in FIG. 6, the parameter a in the left and right 3 × 1 pixel area shown in FIG. 6 (c) and the parameter b in the left and right 1 × 3 pixel area shown in FIG. 6 (d) are not determined. The edge judgment range is expanded so that the edge range does not occur. Further, since the diagonal lines of the left and right 2 × 1 pixel areas shown in FIG. 6 (e) and the diagonal lines of the left and right 1 × 2 pixel areas shown in FIG. 6 (f) are less likely to be erroneously detected, the angle range for determination is expanded. doing.
Further, in the left and right 3 × 1 pixel area and the left and right 1 × 3 pixel area, in order to prevent erroneous detection of the horizontal edge and the vertical edge, when the y component gy of the gradient is zero, it is a diagonal line. Is set not to be extracted.

<対角線の検出手順>
エッジ抽出部121は、面積の大きい矩形領域に係る対角線を、面積の小さい矩形領域に係る対角線に優先して抽出するように、分割エッジの抽出処理を実行する。即ち、エッジ抽出部121は、検出パターン記憶部122から検出パターンを読み出して、図6(a)〜(f)に示す順番で対角線を抽出するように分割エッジの抽出処理を実行する。エッジ抽出部121は、面積の大きい矩形領域に係る対角線を、面積の小さい矩形領域に係る対角線に優先して抽出することで、分割エッジが交差しないように対角線を抽出することができる。
<Diagonal detection procedure>
The edge extraction unit 121 executes the division edge extraction process so as to preferentially extract the diagonal line related to the rectangular area having a large area over the diagonal line related to the rectangular area having a small area. That is, the edge extraction unit 121 reads the detection pattern from the detection pattern storage unit 122, and executes the division edge extraction process so as to extract the diagonal lines in the order shown in FIGS. 6A to 6F. The edge extraction unit 121 can extract the diagonal lines so that the divided edges do not intersect by extracting the diagonal lines related to the rectangular area having a large area in preference to the diagonal lines related to the rectangular area having a small area.

具体的には、エッジ抽出部121は、図5に示すように、中間画像20(図4)の例えば左上から順番に一の中間画素21を選択し、注目画素25として設定する。エッジ抽出部121は、注目画素25のエッジ13の角度θと対角線23の判定用の角度範囲とを、面積の大きい矩形領域22に係る対角線23の検出パターンから順番に比較する。エッジ抽出部121は、注目画素25のエッジの角度θが、ある対角線23の判定用の角度範囲に含まれるとき、当該対角線23の検出パターンに基づいて注目画素25以外の判定対象画素24を設定する。エッジ抽出部121は、新たに設定した判定対象画素24のエッジ13の角度θと判定用の角度範囲とを比較する。エッジ抽出部121は、全ての判定対象画素24が示すエッジ13の角度θが判定用の角度範囲内にあるとき、当該対角線23を、入力画像10(図3(a))を領域分割する三角形の辺を構成する分割エッジとして抽出する。
仮に、何れかの判定対象画素24が示すエッジ13の角度θが対角線23の角度φに対して判定用の角度範囲を逸脱するとき、エッジ抽出部121は、注目画素25のエッジ13の角度θを、次に面積が大きい矩形領域に係る対角線の判定用の角度範囲と比較する。エッジ抽出部121は、比較結果に基づいて新たに注目画素25以外の判定対象画素24を設定する。
エッジ抽出部121は、以上の処理を順次実行することにより、中間画像20の全領域から分割エッジとしての対角線23を抽出する。
Specifically, as shown in FIG. 5, the edge extraction unit 121 selects one intermediate pixel 21 in order from, for example, the upper left of the intermediate image 20 (FIG. 4), and sets it as the attention pixel 25. The edge extraction unit 121 compares the angle θ of the edge 13 of the pixel of interest 25 and the angle range for determining the diagonal line 23 in order from the detection pattern of the diagonal line 23 related to the rectangular region 22 having a large area. When the angle θ of the edge of the pixel of interest 25 is included in the angle range for determination of a certain diagonal line 23, the edge extraction unit 121 sets the determination target pixel 24 other than the pixel of interest 25 based on the detection pattern of the diagonal line 23. To do. The edge extraction unit 121 compares the angle θ of the edge 13 of the newly set determination target pixel 24 with the angle range for determination. When the angle θ of the edge 13 indicated by all the determination target pixels 24 is within the angle range for determination, the edge extraction unit 121 divides the diagonal line 23 into a triangle that divides the input image 10 (FIG. 3A) into a region. It is extracted as a dividing edge that constitutes the side of.
If the angle θ of the edge 13 indicated by any of the determination target pixels 24 deviates from the angle range for determination with respect to the angle φ of the diagonal line 23, the edge extraction unit 121 determines the angle θ of the edge 13 of the pixel of interest 25. Is compared with the angle range for determining the diagonal line relating to the rectangular region having the next largest area. The edge extraction unit 121 newly sets the determination target pixel 24 other than the attention pixel 25 based on the comparison result.
The edge extraction unit 121 extracts the diagonal line 23 as the divided edge from the entire region of the intermediate image 20 by sequentially executing the above processes.

<メッシュ補間部>
エッジ抽出部121が抽出した対角線23のみでは完全なメッシュを形成できないため、メッシュ補間部123は、メッシュが不完全な部分について分割エッジを補間し、入力画像10の全体を三角形により領域分割する。
図8(a)〜(d)は、補間される分割エッジの一例を示す図である。本図に示す分割エッジは、補間パターン記憶部124(図1)に記憶されている。
エッジ抽出部121は、メッシュが不完全な部分について図8(a)〜(d)の順に分割エッジを挿入することにより、入力画像10の全体を三角形により領域分割することができる。但し、エッジ抽出部121は、既に抽出されている分割エッジと交差しない場合にのみ、図示する分割エッジを挿入する。
なお、メッシュ生成部120のエッジ抽出部121は、上記以外の方法により算出された元画素のエッジの角度(或いはグラディエントの値)を用いて、分割エッジを抽出しても構わない。
<Mesh interpolation section>
Since a complete mesh cannot be formed only by the diagonal line 23 extracted by the edge extraction unit 121, the mesh interpolation unit 123 interpolates the divided edges for the portion where the mesh is incomplete, and divides the entire input image 10 into regions by triangles.
8 (a) to 8 (d) are diagrams showing an example of the divided edges to be interpolated. The divided edges shown in this figure are stored in the interpolation pattern storage unit 124 (FIG. 1).
The edge extraction unit 121 can divide the entire input image 10 into regions by triangles by inserting the divided edges in the order of FIGS. 8A to 8D for the portion where the mesh is incomplete. However, the edge extraction unit 121 inserts the illustrated divided edge only when it does not intersect the already extracted divided edge.
The edge extraction unit 121 of the mesh generation unit 120 may extract the divided edges by using the edge angle (or gradient value) of the original pixel calculated by a method other than the above.

〔フローチャート〕
図9は、本発明の一実施形態に係る画像の処理手順を示したフローチャートである。
ステップS1において、画像処理装置100は、入力画像10(図3(a))を取得する。入力画像10は、エッジ算出部110とエッジ強調部130に入力される。
ステップS3において、コントラスト算出部111は、複数の画素11を含む第一画素領域12を順次設定し、各第一画素領域12に含まれる各画素11の輝度値を取得する。コントラスト算出部111は、第一画素領域12に含まれる各画素11の輝度値に基づいて第一画素領域12のコントラストCを算出する(図3(b))。
ステップS5において、グラディエント算出部112は、第一画素領域12のコントラストCの大きさに基づいて、参照領域15を設定する。即ち、グラディエント算出部112は、コントラストCが閾値Cτ未満の場合に第一画素領域12を参照領域15aとして設定し、コントラストCが閾値Cτ以上の場合に第一画素領域12を含み、且つ第一画素領域12よりも大きい領域(第二画素領域)を参照領域15bとして設定する(図3(c))。
〔flowchart〕
FIG. 9 is a flowchart showing an image processing procedure according to an embodiment of the present invention.
In step S1, the image processing device 100 acquires the input image 10 (FIG. 3A). The input image 10 is input to the edge calculation unit 110 and the edge enhancement unit 130.
In step S3, the contrast calculation unit 111 sequentially sets the first pixel region 12 including the plurality of pixels 11, and acquires the brightness value of each pixel 11 included in each first pixel region 12. The contrast calculation unit 111 calculates the contrast C of the first pixel region 12 based on the brightness value of each pixel 11 included in the first pixel region 12 (FIG. 3B).
In step S5, the gradient calculation unit 112 sets the reference area 15 based on the magnitude of the contrast C of the first pixel area 12. That is, the gradient calculation unit 112 sets the first pixel region 12 as the reference region 15a when the contrast C is less than the threshold value Cτ, and includes the first pixel region 12 when the contrast C is the threshold value Cτ or more, and is the first. A region larger than the pixel region 12 (second pixel region) is set as the reference region 15b (FIG. 3 (c)).

ステップS7において、グラディエント算出部112は、設定した参照領域15に含まれる各画素11の輝度値を取得する。グラディエント算出部112は、参照領域15に含まれる各画素11の輝度値に基づいて、第一画素領域12のグラディエントG(gx,gy)を算出する。なお、グラディエントGは、第一画素領域12に存在するエッジ13の角度θを0〜90度の範囲で示す値である。本処理により、グラディエント算出部112は、各第一画素領域12のグラディエントGを画素値として有する複数の画素から構成されるグラディエント画像(中間画像)を生成する。
ステップS9において、アウトライヤ算出部113は、第一画素領域12における局所的なエッジ13の強さと方向を推定する値であるアウトライヤを算出する。アウトライヤ算出部113は、第一画素領域12に含まれる各画素11の輝度値に基づいてアウトライヤを算出する。本処理により、アウトライヤ算出部113は、各第一画素領域12のアウトライヤを画素値として有する複数の画素から構成されるアウトライヤ画像(中間画像)を生成する。
エッジ算出部110からは、各画素がグラディエントGとアウトライヤの情報とを有する中間画像20(図4)が、メッシュ生成部120に対して出力される。
In step S7, the gradient calculation unit 112 acquires the brightness value of each pixel 11 included in the set reference area 15. The gradient calculation unit 112 calculates the gradient G (gx, gy) of the first pixel region 12 based on the brightness value of each pixel 11 included in the reference region 15. The gradient G is a value indicating the angle θ of the edge 13 existing in the first pixel region 12 in the range of 0 to 90 degrees. By this processing, the gradient calculation unit 112 generates a gradient image (intermediate image) composed of a plurality of pixels having the gradient G of each first pixel region 12 as a pixel value.
In step S9, the outliner calculation unit 113 calculates an outliner which is a value for estimating the strength and direction of the local edge 13 in the first pixel region 12. The outliner calculation unit 113 calculates the outliner based on the brightness value of each pixel 11 included in the first pixel region 12. By this processing, the outliner calculation unit 113 generates an outliner image (intermediate image) composed of a plurality of pixels having an outliner of each first pixel region 12 as a pixel value.
The edge calculation unit 110 outputs an intermediate image 20 (FIG. 4) in which each pixel has gradient G and outliner information to the mesh generation unit 120.

ステップS11において、メッシュ生成部120のエッジ抽出部121は、グラディエント算出部112とアウトライヤ算出部113により生成された中間画像20の各中間画素21が示すエッジ13の角度θに基づいて、入力画像10を領域分割する三角形の辺を構成する分割エッジを抽出する。即ち、図5に示すように、エッジ抽出部121は、複数の中間画素21により形成される矩形領域22を設定し、矩形領域22の対角線23が通過する判定対象画素24の全てが対角線23を含む所定の角度範囲内にあるとき、その対角線23を、入力画像10を領域分割する三角形の辺を構成する分割エッジとして抽出する。本処理において、エッジ抽出部121は、面積の大きい矩形領域22に係る対角線23が面積の小さい矩形領域22に係る対角線23に優先して抽出されるように、図6(a)〜(f)に示す検出パターンの順に対角線を抽出する。 In step S11, the edge extraction unit 121 of the mesh generation unit 120 receives the input image 10 based on the angle θ of the edge 13 indicated by each intermediate pixel 21 of the intermediate image 20 generated by the gradient calculation unit 112 and the outliner calculation unit 113. Extract the dividing edges that make up the sides of the triangle that divides the area. That is, as shown in FIG. 5, the edge extraction unit 121 sets a rectangular region 22 formed by a plurality of intermediate pixels 21, and all of the determination target pixels 24 through which the diagonal line 23 of the rectangular region 22 passes pass through the diagonal line 23. When it is within a predetermined angle range including, the diagonal line 23 is extracted as a dividing edge constituting the side of the triangle that divides the input image 10 into a region. In this process, the edge extraction unit 121 extracts the diagonal line 23 related to the rectangular area 22 having a large area with priority over the diagonal line 23 related to the rectangular area 22 having a small area (a) to 6 (f). Diagonal lines are extracted in the order of the detection patterns shown in.

ステップS13において、メッシュ生成部120のメッシュ補間部123は、補間パターン記憶部124から補間対象となる分割エッジを読み出して、メッシュが不完全な部分について分割エッジを図8(a)〜(d)の順番で補間し、入力画像10の全体を三角形により領域分割する。入力画像10を領域分割する領域分割情報は、ベクターデータであり、拡大・縮小によってもその鮮鋭さを失うことのない情報である。
ステップS15において、エッジ強調部130は、入力画像10のエッジを強調して鮮鋭化した鮮鋭化画像を生成する。
ステップS17において、ラスタライズ部140は、エッジ強調部130から出力される鮮鋭化画像を、メッシュ生成部120から出力される領域分割情報を用いて拡大する。また、ラスタライズ部140は、三角形メッシュの頂点に相当する画素11の画素値を用いて、三角形メッシュ内を塗りつぶすための画素値を決定し、決定された画素値を用いて三角形メッシュ内を塗りつぶす。また、ラスタライズ部140は、必要に応じてバイリニア法やバイキュービック法等を用いてピクセル補間を行って、高解像度化した出力画像を生成する。
In step S13, the mesh interpolation unit 123 of the mesh generation unit 120 reads out the divided edge to be interpolated from the interpolation pattern storage unit 124, and sets the divided edge for the portion where the mesh is incomplete (a) to 8 (d). Interpolate in the order of, and the entire input image 10 is divided into regions by triangles. The area division information for dividing the input image 10 into areas is vector data, and is information that does not lose its sharpness even when enlarged or reduced.
In step S15, the edge enhancement unit 130 generates a sharpened image in which the edge of the input image 10 is emphasized and sharpened.
In step S17, the rasterization unit 140 enlarges the sharpened image output from the edge enhancement unit 130 by using the region division information output from the mesh generation unit 120. Further, the rasterization unit 140 determines the pixel value for filling the inside of the triangle mesh by using the pixel value of the pixel 11 corresponding to the apex of the triangle mesh, and fills the inside of the triangle mesh using the determined pixel value. Further, the rasterization unit 140 performs pixel interpolation using a bilinear method, a bicubic method, or the like as necessary to generate a high-resolution output image.

〔本発明の実施態様例と作用、効果のまとめ〕
<第一の実施態様>
本態様は、複数の元画素(画素11)により構成される元画像(入力画像10)をメッシュに分割する画像処理装置100であって、複数の元画素を含む第一画素領域12における各画素値に基づいてエッジの角度θを算出し、算出された各エッジの角度に対応する画素値を夫々有した中間画素21により構成された中間画像20を生成するエッジ画像生成手段(エッジ算出部110)と、複数の中間画素により形成される矩形領域22の対角線23が通過する中間画素を判定対象画素24とし、全ての判定対象画素が示すエッジの角度が対角線の角度に対して所定の角度範囲内にあるとき、該対角線を抽出するエッジ抽出手段(エッジ抽出部121)と、を備えることを特徴とする。
本態様によれば、メッシュによる分割パターンの整合性を図る必要がないため、画像処理における負荷の増大を抑制することが可能となる。
[Summary of Examples of Embodiments of the Present Invention, Actions, and Effects]
<First embodiment>
This aspect is an image processing device 100 that divides an original image (input image 10) composed of a plurality of original pixels (pixels 11) into a mesh, and each pixel in the first pixel region 12 including the plurality of original pixels. An edge image generation means (edge calculation unit 110) that calculates an edge angle θ based on the values and generates an intermediate image 20 composed of intermediate pixels 21 having pixel values corresponding to the calculated edge angles. ) And the intermediate pixel through which the diagonal line 23 of the rectangular region 22 formed by the plurality of intermediate pixels passes is defined as the determination target pixel 24, and the edge angles indicated by all the determination target pixels are in a predetermined angle range with respect to the diagonal angle. It is characterized by comprising an edge extraction means (edge extraction unit 121) for extracting the diagonal line when it is inside.
According to this aspect, since it is not necessary to achieve consistency of the division pattern by the mesh, it is possible to suppress an increase in the load in the image processing.

<第二の実施態様>
本態様に係る画像処理装置100において、エッジ抽出手段(エッジ抽出部121)は、面積の大きい矩形領域22に係る対角線23を面積の小さい矩形領域に係る対角線に優先して抽出することを特徴とする。
本態様によれば、エッジが交差しないように対角線を抽出することができる。
<Second embodiment>
In the image processing apparatus 100 according to this aspect, the edge extraction means (edge extraction unit 121) is characterized in that the diagonal line 23 related to the rectangular region 22 having a large area is preferentially extracted over the diagonal line related to the rectangular region having a small area. To do.
According to this aspect, the diagonal lines can be extracted so that the edges do not intersect.

<第三の実施態様>
本態様に係る画像処理装置100は、各対角線23の検出パターンに対して、それぞれ判定対象画素24の位置と判定用の角度範囲(パラメータa,b、アウトライヤ符号)とを対応付けて記憶した記憶手段(検出パターン記憶部122)を備え、記憶手段は、互いに重複しない角度関係にある対角線に係る検出パターンを記憶することを特徴とする。
本態様によれば、エッジが交差しないように対角線を抽出することができる。即ち、メッシュによる分割パターンの整合性を図る必要がないため、画像処理における負荷の増大を抑制することが可能となる。
<Third embodiment>
The image processing apparatus 100 according to this embodiment stores the detection pattern of each diagonal line 23 in association with the position of the determination target pixel 24 and the determination angle range (parameters a and b, outliner code). A means (detection pattern storage unit 122) is provided, and the storage means stores detection patterns related to diagonal lines having an angular relationship that does not overlap with each other.
According to this aspect, the diagonal lines can be extracted so that the edges do not intersect. That is, since it is not necessary to ensure the consistency of the division pattern by the mesh, it is possible to suppress an increase in the load in the image processing.

<第四の実施態様>
本態様に係る画像処理装置100において、記憶手段(検出パターン記憶部122)は、端点以外の対角線23上に中間画素21の交点を含まない検出パターンを記憶することを特徴とする。
ラスタライズ時には、三角形メッシュの頂点に位置する元画素の画素値を参照して三角形メッシュ内を塗りつぶす。抽出される対角線を形成する矩形領域がこれと相似な複数の小矩形領域を内部に含む場合、三角形メッシュの各辺の中間部に位置する各小矩形領域の角部に相当する元画素の画素値が反映されなくなり、元画像の再現性が低下するという問題がある。
本態様によれば、元画像に対して再現性の高い画像を生成することができる。
<Fourth Embodiment>
In the image processing apparatus 100 according to this aspect, the storage means (detection pattern storage unit 122) is characterized in that a detection pattern that does not include the intersection of the intermediate pixels 21 is stored on the diagonal line 23 other than the end point.
At the time of rasterization, the inside of the triangular mesh is filled with reference to the pixel value of the original pixel located at the apex of the triangular mesh. When the rectangular area forming the diagonal line to be extracted contains a plurality of small rectangular areas similar to this, the pixel of the original pixel corresponding to the corner part of each small rectangular area located in the middle of each side of the triangular mesh. There is a problem that the value is not reflected and the reproducibility of the original image is lowered.
According to this aspect, it is possible to generate an image having high reproducibility with respect to the original image.

<第五の実施態様>
本態様に係る画像処理装置100において、判定用の角度範囲(パラメータa、b、アウトライヤ符号)は、エッジ抽出手段(エッジ抽出部121)によって抽出される対角線23が互いに交差しないように設定されていることを特徴とする。
本態様によれば、メッシュによる分割パターンの整合性を図る必要がないため、画像処理における負荷の増大を抑制することが可能となる。
<Fifth embodiment>
In the image processing apparatus 100 according to this aspect, the angle range (parameters a, b, outliner code) for determination is set so that the diagonal lines 23 extracted by the edge extraction means (edge extraction unit 121) do not intersect with each other. It is characterized by being.
According to this aspect, since it is not necessary to achieve consistency of the division pattern by the mesh, it is possible to suppress an increase in the load in the image processing.

10…入力画像、11…画素、12…第一画素領域、13…エッジ、15…参照領域、15a…参照領域、15b…参照領域(第二画素領域)、20…中間画像、21…中間画素、22…矩形領域、23…対角線、23a…基点、24…判定対象画素、25…注目画素、100…画像処理装置、110…エッジ算出部(画素値取得手段、エッジ算出手段)、111…コントラスト算出部(差分算出手段)、112…グラディエント算出部、113…アウトライヤ算出部、120…メッシュ生成部、121…エッジ抽出部、122…検出パターン記憶部、123…メッシュ補間部、124…補間パターン記憶部、130…エッジ強調部、140…ラスタライズ部、151…CPU、152…ROM、153…RAM、154…バス、155…記憶装置、156…外部I/F、157…リーダライタ、161…外部記憶装置、162…記録媒体、d1、d2…対角線 10 ... Input image, 11 ... Pixel, 12 ... First pixel area, 13 ... Edge, 15 ... Reference area, 15a ... Reference area, 15b ... Reference area (second pixel area), 20 ... Intermediate image, 21 ... Intermediate pixel , 22 ... Rectangular area, 23 ... Diagonal line, 23a ... Base point, 24 ... Pixel to be determined, 25 ... Pixel of interest, 100 ... Image processing device, 110 ... Edge calculation unit (pixel value acquisition means, edge calculation means), 111 ... Contrast Calculation unit (difference calculation means), 112 ... gradient calculation unit, 113 ... outliner calculation unit, 120 ... mesh generation unit, 121 ... edge extraction unit, 122 ... detection pattern storage unit, 123 ... mesh interpolation unit, 124 ... interpolation pattern storage Unit, 130 ... Edge enhancement part, 140 ... Rasterize part, 151 ... CPU, 152 ... ROM, 153 ... RAM, 154 ... Bus, 155 ... Storage device, 156 ... External I / F, 157 ... Reader / writer, 161 ... External storage Device, 162 ... Recording medium, d1, d2 ... Diagonal

Claims (7)

複数の元画素により構成される元画像をメッシュに分割する画像処理装置であって、
前記複数の元画素を含む第一画素領域における各画素値に基づいてエッジの角度を算出し、算出された前記各エッジの角度に対応する画素値を夫々有した中間画素により構成された中間画像を生成するエッジ画像生成手段と、
複数の前記中間画素により形成される矩形領域の対角線を検出する複数種類の前記対角線の検出パターンの中から選択された前記検出パターンに基づいて、選択された該検出パターンに対応した矩形領域の対角線が通過する前記中間画素を判定対象画素に設定し、全ての前記判定対象画素が示す前記エッジの角度が、選択された前記検出パターンに対応する対角線の角度に対して所定の角度範囲内にあるとき、該対角線を抽出するエッジ抽出手段と、
を備えることを特徴とする画像処理装置。
An image processing device that divides an original image composed of a plurality of original pixels into meshes.
An intermediate image composed of intermediate pixels having pixel values corresponding to the calculated edge angles calculated by calculating the edge angle based on each pixel value in the first pixel region including the plurality of original pixels. Edge image generation means to generate
A diagonal line of a rectangular area corresponding to the selected detection pattern based on the detection pattern selected from a plurality of types of detection patterns of the diagonal line for detecting the diagonal line of the rectangular area formed by the plurality of intermediate pixels. The intermediate pixel through which is passed is set as the determination target pixel, and the angle of the edge indicated by all the determination target pixels is within a predetermined angle range with respect to the angle of the diagonal line corresponding to the selected detection pattern. When the edge extraction means for extracting the diagonal line and
An image processing device comprising.
前記エッジ抽出手段は、面積の大きい前記矩形領域に係る前記対角線を面積の小さい前記矩形領域に係る前記対角線に優先して抽出することを特徴とする請求項1に記載の画像処理装置。 The image processing apparatus according to claim 1, wherein the edge extraction means extracts the diagonal line of the rectangular region having a large area in preference to the diagonal line of the rectangular region having a small area. 前記各対角線の検出パターンに対して、それぞれ前記判定対象画素と、前記エッジ抽出手段が判定用の角度範囲として用いる前記所定の角度範囲とを対応付けて記憶した記憶手段を備え、
前記記憶手段は、互いに重複しない角度関係にある前記対角線に係る前記検出パターンを記憶することを特徴とする請求項1又は2に記載の画像処理装置。
Each of the diagonal detection patterns is provided with a storage means that stores the determination target pixel and the predetermined angle range used by the edge extraction means as a determination angle range in association with each other.
The image processing apparatus according to claim 1 or 2, wherein the storage means stores the detection patterns related to the diagonal lines that do not overlap each other.
前記記憶手段は、端点以外の前記対角線上に前記中間画素の交点を含まない前記検出パターンを記憶することを特徴とする請求項3に記載の画像処理装置。 The image processing apparatus according to claim 3, wherein the storage means stores the detection pattern that does not include the intersection of the intermediate pixels on the diagonal line other than the end point. 前記判定用の角度範囲は、前記エッジ抽出手段によって抽出される前記対角線が互いに交差しないように設定されていることを特徴とする請求項3又は4に記載の画像処理装置。 The image processing apparatus according to claim 3 or 4, wherein the angle range for determination is set so that the diagonal lines extracted by the edge extraction means do not intersect with each other. 複数の元画素により構成される元画像をメッシュに分割する画像処理方法であって、
前記複数の元画素を含む第一画素領域における各画素値に基づいてエッジの角度を算出し、算出された前記各エッジの角度に対応する画素値を夫々有した中間画素により構成された中間画像を生成するエッジ画像生成ステップと、
複数の前記中間画素により形成される矩形領域の対角線を検出する複数種類の前記対角線の検出パターンの中から選択された前記検出パターンに基づいて、選択された該検出パターンに対応した矩形領域の対角線が通過する前記中間画素を判定対象画素に設定し、全ての前記判定対象画素が示す前記エッジの角度が、選択された前記検出パターンに対応する対角線の角度に対して所定の角度範囲内にあるとき、該対角線を抽出するエッジ抽出ステップと、
を実行することを特徴とする画像処理方法。
An image processing method that divides an original image composed of a plurality of original pixels into meshes.
An intermediate image composed of intermediate pixels having pixel values corresponding to the calculated edge angles calculated by calculating the edge angle based on each pixel value in the first pixel region including the plurality of original pixels. And the edge image generation step to generate
A diagonal line of a rectangular area corresponding to the selected detection pattern based on the detection pattern selected from a plurality of types of detection patterns of the diagonal line for detecting the diagonal line of the rectangular area formed by the plurality of intermediate pixels. The intermediate pixel through which is passed is set as the determination target pixel, and the angle of the edge indicated by all the determination target pixels is within a predetermined angle range with respect to the angle of the diagonal line corresponding to the selected detection pattern. When the edge extraction step to extract the diagonal line and
An image processing method characterized by executing.
複数の元画素により構成される元画像をメッシュに分割するコンピュータを、
前記複数の元画素を含む第一画素領域における各輝度値に基づいてエッジの角度を算出し、算出された前記各エッジの角度に対応する画素値を夫々有した中間画素により構成された中間画像を生成するエッジ画像生成手段と、
複数の前記中間画素により形成される矩形領域の対角線を検出する複数種類の前記対角線の検出パターンの中から選択された前記検出パターンに基づいて、選択された該検出パターンに対応した矩形領域の対角線が通過する前記中間画素を判定対象画素に設定し、全ての前記判定対象画素が示す前記エッジの角度が、選択された前記検出パターンに対応する対角線の角度に対して所定の角度範囲内にあるとき、該対角線を抽出するエッジ抽出手段と、
として機能させることを特徴とする画像処理プログラム。
A computer that divides an original image composed of multiple original pixels into meshes,
An intermediate image composed of intermediate pixels having pixel values corresponding to the calculated edge angles calculated by calculating the edge angle based on each luminance value in the first pixel region including the plurality of original pixels. Edge image generation means to generate
A diagonal line of a rectangular area corresponding to the selected detection pattern based on the detection pattern selected from a plurality of types of detection patterns of the diagonal line for detecting the diagonal line of the rectangular area formed by the plurality of intermediate pixels. The intermediate pixel through which is passed is set as the determination target pixel, and the angle of the edge indicated by all the determination target pixels is within a predetermined angle range with respect to the angle of the diagonal line corresponding to the selected detection pattern. When the edge extraction means for extracting the diagonal line and
An image processing program characterized by functioning as.
JP2018195832A 2018-10-17 2018-10-17 Image processing equipment, image processing method, and image processing program Active JP6883864B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018195832A JP6883864B2 (en) 2018-10-17 2018-10-17 Image processing equipment, image processing method, and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018195832A JP6883864B2 (en) 2018-10-17 2018-10-17 Image processing equipment, image processing method, and image processing program

Publications (2)

Publication Number Publication Date
JP2020064449A JP2020064449A (en) 2020-04-23
JP6883864B2 true JP6883864B2 (en) 2021-06-09

Family

ID=70387276

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018195832A Active JP6883864B2 (en) 2018-10-17 2018-10-17 Image processing equipment, image processing method, and image processing program

Country Status (1)

Country Link
JP (1) JP6883864B2 (en)

Also Published As

Publication number Publication date
JP2020064449A (en) 2020-04-23

Similar Documents

Publication Publication Date Title
RU2419881C2 (en) Anisometric texture synthesis
Parsania et al. A comparative analysis of image interpolation algorithms
JP3915563B2 (en) Image processing apparatus and image processing program
CN104732479B (en) Resizing an image
KR102158390B1 (en) Method and apparatus for image processing
JP7246103B2 (en) Image processing device, image processing method, and image processing program
CN115330986A (en) Partitioned rendering mode graphic processing method and system
US9514526B2 (en) Device and method for detecting angle of rotation from normal position of image
JP6883864B2 (en) Image processing equipment, image processing method, and image processing program
US10481774B2 (en) Area-dependent image enhancement
US11503870B2 (en) Pattern filling in garment pieces
JP4126541B2 (en) Image processing apparatus, image processing method, image processing program, and storage medium
EP3175613B1 (en) Projection apparatus, image processing apparatus, and image processing method
CN113424231A (en) Apparatus and method for generating light intensity image
Mishiba et al. Block-based seam carving
US9761152B2 (en) Method for harmonizing colors, corresponding computer program and device
US10970817B2 (en) Image magnifying apparatus
JP2005312014A (en) Resolution converting method
JP5678295B2 (en) Image display processing method and image display processing apparatus
JP2013218523A (en) Image enlargement processor
KR100587979B1 (en) Interpolation method for image enlargement based on edge and corner
CN111626935B (en) Pixel map scaling method, game content generation method and device
JP2015106318A (en) Image processor and image processing method
US20220383581A1 (en) Texture mapping method using reference image, and computing apparatus performing texture mapping method
WO2024000173A1 (en) Method and apparatus for generating mode detection model, and computer device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20191018

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20201127

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20201208

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210204

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: 20210406

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210428

R150 Certificate of patent or registration of utility model

Ref document number: 6883864

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250