JP6883864B2 - Image processing equipment, image processing method, and image processing program - Google Patents
Image processing equipment, image processing method, and image processing program Download PDFInfo
- 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
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.
特許文献1において、三角形メッシュの形状を決定する際には、コスト関数を最小化するような分割パターンを仮決定した後に、各分割パターンの整合性を確認する処理を実行する。仮に、分割パターン同士の接続が整合しない場合には、整合するようにパターンを修正する処理を実行していくので、処理の負荷が増大する虞がある。
本発明は上述の事情に鑑みてなされたものであり、画像処理における負荷の増大を抑制することを目的とする。
In
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.
以下、本発明を図に示した実施形態を用いて詳細に説明する。但し、この実施形態に記載される構成要素、種類、組み合わせ、形状、その相対配置などは特定的な記載がない限り、この発明の範囲をそれのみに限定する主旨ではなく単なる説明例に過ぎない。 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
The
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
メッシュ生成部120は、エッジ算出部110により算出されたエッジの角度に基づいて、入力画像を複数の三角形により領域分割する手段である。メッシュ生成部120は、エッジ抽出部(エッジ抽出手段)121、検出パターン記憶部122、メッシュ補間部123、及び、補間パターン記憶部124を備える。
エッジ強調部130は、入力画像のエッジを強調した鮮鋭化画像を生成する。
ラスタライズ部140は、エッジ強調部130から出力される鮮鋭化画像を、メッシュ生成部120から出力される領域分割情報を用いて拡大すると共に、必要に応じてバイリニア法やバイキュービック法等を用いてピクセル補間を行って、高解像度化した出力画像を生成する。
上記画像処理装置100を構成する各部は電子回路(ハードウェア)により実現されるが、一般的なコンピュータが実行するソフトウェアにより実現されてもよい。
The
The
The
Each part constituting the
〔コンピュータの構成〕
図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
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
The control program for executing the process of controlling the entire
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
The external I /
The edge calculation unit 110, the
〔エッジ算出部〕
<処理概要>
図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
グラディエント算出部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
The
The
以下、各部の動作について、具体例を用いて詳細に説明する。
<コントラスト算出部>
<<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)は、例えば、
・・・式(1)
のように算出される。なお、符号
は、小数点以下の数値を切り捨てる床関数である。
このように、コントラスト算出部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
Here, when the
... Equation (1)
It is calculated as. The code
Is a floor function that truncates numbers after the decimal point.
In this way, the
<<多要素画像の場合>>
仮に、入力画像が、その各画素が夫々R(Red)、G(Green)、B(Blue)の各要素について夫々輝度値を有するRGB画像(多要素画像、特に3要素画像の一例)である場合、コントラストC(f_cont)は、第一画素領域12を2×2画素領域、要素Xに係る各画素の輝度値(行列Axの成分)をax,bx,cx,dxとして、
・・・式(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
... Equation (2)
It is calculated as.
As described above, the
<<第一画素領域の形状>>
本例では第一画素領域を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
<グラディエント算出部>
グラディエント算出部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
<<2×2グラディエント関数>>
グラディエント算出部112は、コントラストCが閾値Cτ未満の場合に第一画素領域12を参照領域15aとして設定する(図3(c))。
参照領域15aが2×2画素領域であり、2×2行列Aとして表現される場合、グラディエント算出部112は、以下の式(3)に示される2×2グラディエント関数により参照領域15aの水平方向における輝度値の変化量(又は変化率)gxと、垂直方向における輝度値の変化量(又は変化率)gyと、を算出する。
・・・式(3)
なお、記号「*」は行列のたたみ込みを表し、各行列の夫々の成分の積を足し合わせることを意味する。参照領域15aの各画素の輝度値(行列Aの成分)をa,b,c,dとしてグラディエントG(f_grad)を具体的に示せば、
・・・式(4)
となる。式(4)に示すように、本例においてgxとgyは、共に正の数となる。
<< 2 × 2 gradient function >>
The
When the reference area 15a is a 2 × 2 pixel area and is expressed as a 2 × 2 matrix A, the
... 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,
... 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の総和として求めることができる。
・・・式(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}).
... Equation (5)
<<4×4グラディエント関数>>
グラディエント算出部112は、コントラストCが閾値Cτ以上の場合に第一画素領域12を含み、且つ第一画素領域12よりも大きい領域(第二画素領域)を参照領域15bとして設定する(図3(c))。
本例において、グラディエント算出部112は、第一画素領域12よりも一回り大きい4×4画素領域を参照領域15bとして設定する。
<< 4 × 4 gradient function >>
The
In this example, the
参照領域15bが4×4画素領域である場合(4×4行列Bとして表現される)、グラディエント算出部112は、以下の式(6)に示される4×4グラディエント関数により参照領域15bの水平方向における輝度値の変化量(又は変化率)gxと、垂直方向における輝度値の変化量(又は変化率)gyと、を算出する。
・・・式(6)
When the
... Equation (6)
グラディエント算出部112は、参照領域15bの各画素の輝度値に対し、第一画素領域12に含まれる画素との位置関係に応じた重み付け係数を乗じた上でエッジの角度(グラディエント)を算出する。即ち、グラディエント算出部112は、第一画素領域12を構成する画素の輝度値に対して重み付け係数「+4」又は「−4」を乗じ、第一画素領域12に対して水平又は垂直方向に隣接する画素の輝度値に対して重み付け係数「+2」又は「−2」を乗じ、他の画素の輝度値に対して重み付け係数「+1」又は「−1」を乗じている。
上記、重み付け係数には2のべき乗値が設定されている。重み付け係数に2のべき乗値を設定することにより、ビットをずらして計算するシフト演算が利用できるようになり、処理速度の向上を図ることができる。
The
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°)を求めることができる。
・・・式(7)
即ち、グラディエント算出部112は、参照領域15の水平方向における輝度値の変化率gxと垂直方向における輝度値の変化率gyとに基づいてエッジ13の角度θを算出する。
なお、逆三角関数の計算は処理負荷が高いため、式(7)の代わりに、角度θの正接
・・・式(8)
を求めてもよい。
グラディエント算出部112は、コントラストCが閾値Cτ以上の場合に、第一画素領域12よりも広い参照領域15bの各画素の輝度値に基づいてグラディエントGを算出するため、より正確にエッジ13の角度θを算出可能となる。また、参照領域15bの各輝度値に対して、第一画素領域12との位置関係に応じた重み付け係数を乗じることにより、より正確にエッジ13の角度θを算出できる。
<< Edge angle θ >>
The
... Equation (7)
That is, the
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).
... Equation (8)
May be sought.
When the contrast C is equal to or greater than the threshold value Cτ, the
<アウトライヤ算出部>
アウトライヤ算出部113は、第一画素領域12における局所的なエッジ13の強さと方向を推定する値であるアウトライヤ(f_outlier)を算出する。
<Outlier calculation unit>
The
例えば、第一画素領域12を2×2画素領域(行列A)とした場合、アウトライヤ(f_outlier)は、
・・・式(9)
のように算出される。なお、記号「*」は行列のたたみ込みを表し、各行列の夫々の成分の積を足し合わせることを意味する。
For example, when the
... 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)を具体的に示せば、以下のようになる。
・・・式(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
... 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
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
The outliner and gradient values of each
<変形例>
本実施形態においては、グラディエントを算出するための参照領域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
Unlike the above embodiment, the
〔メッシュ生成部〕
<処理概要>
メッシュ生成部120は、入力画像10中のエッジを活用して、入力画像10を複数の三角形により領域分割する。即ち、入力画像10中のエッジが、入力画像10を領域分割する三角形のエッジとなるように、入力画像10を分割する三角形を選択する。
エッジ抽出部121は、エッジ算出部110により算出されたエッジの角度θ(エッジの角度を示す値を含む)、又はこれを示す値(例えば、グラディエント(gx,gy)及びアウトライヤ)に基づいて、入力画像10を領域分割する三角形の辺である分割エッジ(対角線23)を順次抽出する。
メッシュ補間部123は、入力画像10の全体が三角形により領域分割されるように、メッシュが不完全な部分について分割エッジを補間する。
[Mesh generator]
<Outline of processing>
The
The
The
<エッジ抽出部:対角線の抽出方法>
図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
<分割エッジの検出パターン>
図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
In this example, the detection
検出パターン記憶部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
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
検出パターン記憶部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
The determination angle range stored in the detection
図7(a)、(b)は、判定用の角度範囲の決定方法の一例について説明する模式図である。以下、右3×2画素からなる矩形領域22に係る対角線23を検出するための、判定用の角度範囲を決定する場合の例により説明する。
まず、抽出対象となる対角線23に対して、反時計回り方向に最も近い矩形領域(右2×1画素領域)の対角線d1と、時計回り方向に最も近い矩形領域(右1×1画素領域)の対角線d2とを見つける。ここで、対角線23の角度をφ、対角線d1の角度をα、対角線d2の角度をβとする。
対角線23の角度φと対角線d1の角度αを等角度分割した角度(φ+α)/2と、対角線23の角度φと対角線d2の角度βを等角度分割した角度(φ+β)/2との間を、判定用の角度範囲とする。
・・・式(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
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
Between the angle φ of the
... Equation (11)
Note that θ is the angle of the edge indicated by each
ところで、中間画素21のエッジの角度θは、中間画素21のグラディエントを(gx,gy)とするとき、以下の式(12)により求められる。
・・・式(12)
しかし、逆三角関数の計算は複雑であり、これを中間画素ごとに計算する場合には、回路の複雑化と処理負荷の増大を招くという問題がある。そこで、式(12)を以下の式(13)ように変形して、グラディエント比(gy/gx)の下限値をパラメータa、上限値をパラメータbとして判定テーブル(図6)に記憶させることで、逆三角関数の計算を省略することが可能となる。
・・・式(13)
By the way, the angle θ of the edge of the
... 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.
... 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
具体的には、エッジ抽出部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
If the angle θ of the
The
<メッシュ補間部>
エッジ抽出部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
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
The
〔フローチャート〕
図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
In step S3, the
In step S5, the
ステップ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
In step S9, the
The edge calculation unit 110 outputs an intermediate image 20 (FIG. 4) in which each pixel has gradient G and outliner information to the
ステップ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
ステップS13において、メッシュ生成部120のメッシュ補間部123は、補間パターン記憶部124から補間対象となる分割エッジを読み出して、メッシュが不完全な部分について分割エッジを図8(a)〜(d)の順番で補間し、入力画像10の全体を三角形により領域分割する。入力画像10を領域分割する領域分割情報は、ベクターデータであり、拡大・縮小によってもその鮮鋭さを失うことのない情報である。
ステップS15において、エッジ強調部130は、入力画像10のエッジを強調して鮮鋭化した鮮鋭化画像を生成する。
ステップS17において、ラスタライズ部140は、エッジ強調部130から出力される鮮鋭化画像を、メッシュ生成部120から出力される領域分割情報を用いて拡大する。また、ラスタライズ部140は、三角形メッシュの頂点に相当する画素11の画素値を用いて、三角形メッシュ内を塗りつぶすための画素値を決定し、決定された画素値を用いて三角形メッシュ内を塗りつぶす。また、ラスタライズ部140は、必要に応じてバイリニア法やバイキュービック法等を用いてピクセル補間を行って、高解像度化した出力画像を生成する。
In step S13, the
In step S15, the
In step S17, the
〔本発明の実施態様例と作用、効果のまとめ〕
<第一の実施態様>
本態様は、複数の元画素(画素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
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
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
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
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
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又は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.
前記複数の元画素を含む第一画素領域における各画素値に基づいてエッジの角度を算出し、算出された前記各エッジの角度に対応する画素値を夫々有した中間画素により構成された中間画像を生成するエッジ画像生成ステップと、
複数の前記中間画素により形成される矩形領域の対角線を検出する複数種類の前記対角線の検出パターンの中から選択された前記検出パターンに基づいて、選択された該検出パターンに対応した矩形領域の対角線が通過する前記中間画素を判定対象画素に設定し、全ての前記判定対象画素が示す前記エッジの角度が、選択された前記検出パターンに対応する対角線の角度に対して所定の角度範囲内にあるとき、該対角線を抽出するエッジ抽出ステップと、
を実行することを特徴とする画像処理方法。 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.
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) |
-
2018
- 2018-10-17 JP JP2018195832A patent/JP6883864B2/en active Active
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 |