JP2021108222A - Image processing device, image processing method, and image processing program - Google Patents
Image processing device, image processing method, and image processing program Download PDFInfo
- Publication number
- JP2021108222A JP2021108222A JP2021076266A JP2021076266A JP2021108222A JP 2021108222 A JP2021108222 A JP 2021108222A JP 2021076266 A JP2021076266 A JP 2021076266A JP 2021076266 A JP2021076266 A JP 2021076266A JP 2021108222 A JP2021108222 A JP 2021108222A
- Authority
- JP
- Japan
- Prior art keywords
- pixel
- edge
- region
- value
- area
- 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.)
- Granted
Links
Images
Landscapes
- Image Analysis (AREA)
- Image Processing (AREA)
Abstract
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においては、ラスタ画像中の2×2画素からなる画素領域のエッジの角度を、2×2画素領域の情報のみに基づいて算出するため、エッジの角度の算出精度が低下する虞がある。
本発明は上述の事情に鑑みてなされたものであり、エッジの角度の算出精度を向上させることを目的とする。
In
The present invention has been made in view of the above circumstances, and an object of the present invention is to improve the accuracy of calculating the edge angle.
上記の課題を解決するために、本発明は、複数の画素を含む第一画素領域を含み、前記第一画素領域よりも広い第二画素領域における前記各画素の画素値を取得する画素値取得手段と、前記第二画素領域における前記各画素の画素値を用いて前記第一画素領域のエッジの角度を算出するエッジ算出手段と、前記第一画素領域における前記画素の画素値の最大値と最小値との差を算出する差分算出手段と、を備え、前記エッジ算出手段は、前記画素値の最大値と最小値との差に応じて前記第一画素領域を含む参照領域を設定し、該参照領域における前記各画素の画素値を用いて前記第一画素領域の前記エッジの角度を算出することを特徴とする。 In order to solve the above problems, the present invention includes a first pixel region including a plurality of pixels, and acquires a pixel value of each pixel in a second pixel region wider than the first pixel region. Means, an edge calculating means for calculating the edge angle of the first pixel region using the pixel value of each pixel in the second pixel region, and the maximum value of the pixel value of the pixel in the first pixel region. The edge calculation means includes a difference calculation means for calculating the difference from the minimum value, and the edge calculation means sets a reference area including the first pixel area according to the difference between the maximum value and the minimum value of the pixel value. It is characterized in that the angle of the edge of the first pixel region is calculated by using the pixel value of each pixel in the reference region.
一実施態様によれば、エッジの角度の算出精度を向上させることが可能となる。 According to one embodiment, it is possible to improve the accuracy of calculating the edge angle.
以下、本発明を図に示した実施形態を用いて詳細に説明する。但し、この実施形態に記載される構成要素、種類、組み合わせ、形状、その相対配置などは特定的な記載がない限り、この発明の範囲をそれのみに限定する主旨ではなく単なる説明例に過ぎない。 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
メッシュ生成部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
〔エッジ算出部〕
<処理概要>
図3(a)〜(c)は、本発明の一実施形態に係る画像処理装置によるエッジ算出方法の概要について説明する図である。
コントラスト算出部111は、図3(a)に示す入力画像10から、複数の画素11により形成される所定形状の第一画素領域12を選択し、第一画素領域12の各画素11の画素値(例えば輝度値)を取得する。コントラスト算出部111は、第一画素領域12を構成する各画素11の各画素値に基づいて、第一画素領域12における画素の画素値の差、即ちコントラストC(f_cont)を算出する(図3(b))。
グラディエント算出部112、及びアウトライヤ算出部113は、第一画素領域12のエッジ13の角度を算出する(図3(c))。本例において、グラディエント算出部112はエッジ13の角度を0〜90度の範囲で算出し、アウトライヤ算出部113はエッジ13の向き(右下方向、又は左下方向)を算出する。
[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
The
グラディエント算出部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
Hereinafter, the operation of each part will be described in detail with reference to specific examples.
<コントラスト算出部>
<<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として算出することができる。
<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
... 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
... 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 in which each pixel of the input image has a brightness value for each element of R (Red), G (Green), and B (Blue) (multi-element image, particularly an example of a three-element image). 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)
を求めてもよい。
<< 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.
グラディエント算出部112は、コントラストCが閾値Cτ以上の場合に、第一画素領域12よりも広い参照領域15bの各画素の輝度値に基づいてグラディエントGを算出するため、より正確にエッジ13の角度θを算出可能となる。また、参照領域15bの各輝度値に対して、第一画素領域12との位置関係に応じた重み付け係数を乗じることにより、より正確にエッジ13の角度θを算出できる。
When the contrast C is equal to or greater than the threshold value Cτ, the
<アウトライヤ算出部>
アウトライヤ算出部113は、第一画素領域12における局所的なエッジ13の強さと方向を推定する値であるアウトライヤ(f_outlier)を算出する。
例えば、第一画素領域12を2×2画素領域(行列A)とした場合、アウトライヤ(f_outlier)は、
・・・式(9)
のように算出される。なお、記号「*」は行列のたたみ込みを表し、各行列の夫々の成分の積を足し合わせることを意味する。
<Outlier calculation unit>
The
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
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
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. is 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
ステップ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
〔本発明の実施態様例と作用、効果のまとめ〕
<第一の実施態様>
本態様に係る画像処理装置100は、複数の画素11を含む第一画素領域12を含み、第一画素領域よりも広い第二画素領域(参照領域15b)における各画素の画素値を取得する画素値取得手段(エッジ算出部110)と、第二画素領域における各画素の画素値を用いて第一画素領域のエッジの角度θを算出するエッジ算出手段(エッジ算出部110)と、を備えることを特徴とする。
本態様によれば、第一画素領域よりも広い第二画素領域の各画素の画素値を用いて第一画素領域のエッジの角度を算出するので、エッジの角度の算出精度を向上させることが可能となる。
[Summary of Examples of Embodiments of the Present Invention, Actions, and Effects]
<First embodiment>
The
According to this aspect, since the edge angle of the first pixel area is calculated using the pixel value of each pixel of the second pixel area wider than the first pixel area, it is possible to improve the calculation accuracy of the edge angle. It will be possible.
<第二の実施態様>
本態様に係る画像処理装置100は、第一画素領域12における画素11の画素値の差(コントラストC)を算出する差分算出手段(コントラスト算出部111)を備え、エッジ算出手段(エッジ算出部110)は、画素値の差に応じて第一画素領域を含む参照領域15(15a,15b)を設定し、該参照領域における各画素の画素値を用いて第一画素領域のエッジの角度θを算出することを特徴とする。
本態様によれば、画素値の差に応じて参照領域を設定し、設定した参照領域の各画素の画素値を用いて第一画素領域のエッジの角度を算出するので、エッジの角度の算出精度を向上させることが可能となる。
<Second embodiment>
The
According to this aspect, the reference area is set according to the difference in the pixel values, and the edge angle of the first pixel area is calculated using the pixel value of each pixel of the set reference area. Therefore, the edge angle is calculated. It is possible to improve the accuracy.
<第三の実施態様>
本態様に係る画像処理装置100において、エッジ算出手段(エッジ算出部110)は、画素値の差に応じて、第一画素領域12又は第二画素領域(参照領域15b)を参照領域15に設定することを特徴とする。
本態様において、エッジ算出手段は、画素値の差に応じて第一画素領域又は第二画素領域を参照領域として設定し、設定した参照領域の各画素の画素値を用いて第一画素領域のエッジの角度を算出する。即ち、エッジ算出手段は、画素値の差に応じて、第一画素領域(参照領域15a)を構成する各画素の画素値を用いて第一画素領域のエッジの角度を算出するか、第一画素領域よりも広い第二画素領域(参照領域15b)を構成する各画素の画素値を用いて第一画素領域のエッジの角度を算出する。
本態様によれば、画素値の差に応じて、第一画素領域又は第二画素領域を参照領域に設定して、第一画素領域のエッジの角度を算出するので、エッジの角度の算出精度を向上させることが可能となる。
<Third embodiment>
In the
In this embodiment, the edge calculation means sets the first pixel area or the second pixel area as a reference area according to the difference in pixel values, and uses the pixel values of each pixel of the set reference area to obtain the first pixel area. Calculate the edge angle. That is, the edge calculation means calculates the edge angle of the first pixel region by using the pixel value of each pixel constituting the first pixel region (
According to this aspect, the first pixel area or the second pixel area is set as the reference area according to the difference in the pixel values, and the edge angle of the first pixel area is calculated. Therefore, the calculation accuracy of the edge angle is calculated. Can be improved.
<第四の実施態様>
本態様に係る画像処理装置100において、エッジ算出手段(エッジ算出部110)は、参照領域15の水平方向における画素値の変化率gxと垂直方向における画素値の変化率gyとに基づいてエッジの角度θを算出することを特徴とする。
角度θは、画素値の変化率gx,gyから逆三角関数により直接的に算出してもよいし、角度θの正接(gy/gx)を求めることで間接的に算出してもよい。逆三角関数の計算は処理負荷が高いため、後者の方法を採用すれば計算に係る処理負荷を低減できる。
<Fourth Embodiment>
In the
The angle θ may be calculated directly from the rate of change of the pixel values gx and gy by an inverse trigonometric function, or may be calculated indirectly by obtaining the tangent (gy / gx) of the angle θ. Since the calculation of the inverse trigonometric function has a high processing load, the processing load related to the calculation can be reduced by adopting the latter method.
<第五の実施態様>
本態様に係る画像処理装置100において、エッジ算出手段(エッジ算出部110)は、参照領域15の各画素11の画素値に対し、第一画素領域12に含まれる画素との位置関係に応じた重み付け係数を乗じた上でエッジの角度θを算出することを特徴とする。
本態様によれば、必要に応じて第一画素領域の周辺に位置する画素の画素値を参照しつつ、より正確にエッジの角度を算出できる。
<Fifth embodiment>
In the
According to this aspect, the edge angle can be calculated more accurately while referring to the pixel values of the pixels located around the first pixel region as needed.
<第六の実施態様>
本態様に係る画像処理装置100において、重み付け係数には2のべき乗値が設定されていることを特徴とする。
重み付け係数に2のべき乗値を設定することにより、ビットをずらして計算するシフト演算が利用できるようになり、処理速度の向上を図ることができる。
<Sixth Embodiment>
The
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.
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 (9)
前記第二画素領域における前記各画素の画素値を用いて前記第一画素領域のエッジの角度を算出するエッジ算出手段と、
前記第一画素領域における前記画素の画素値の最大値と最小値との差を算出する差分算出手段と、を備え、
前記エッジ算出手段は、前記画素値の最大値と最小値との差に応じて前記第一画素領域を含む参照領域を設定し、該参照領域における前記各画素の画素値を用いて前記第一画素領域の前記エッジの角度を算出することを特徴とする画像処理装置。 A pixel value acquisition means that includes a first pixel region including a plurality of pixels and acquires a pixel value of each pixel in a second pixel region that is wider than the first pixel region.
An edge calculation means for calculating the edge angle of the first pixel region using the pixel value of each pixel in the second pixel region.
A difference calculation means for calculating the difference between the maximum value and the minimum value of the pixel value of the pixel in the first pixel region is provided.
The edge calculation means sets a reference area including the first pixel area according to the difference between the maximum value and the minimum value of the pixel value, and uses the pixel value of each pixel in the reference area to obtain the first pixel value. An image processing device for calculating the angle of the edge of a pixel region.
前記第二画素領域における前記各画素の画素値を用いて前記第一画素領域のエッジの角度を算出するエッジ算出手段と、
前記第一画素領域における前記画素の画素値の差を算出する差分算出手段と、を備え、
前記エッジ算出手段は、前記画素値の差に応じて前記第一画素領域を含む参照領域を設定し、前記参照領域の各画素の画素値に対し、前記第一画素領域に含まれる画素との位置関係に応じた重み付け係数を乗じた上で、前記参照領域における前記各画素の画素値を用いて前記第一画素領域の前記エッジの角度を算出することを特徴とする画像処理装置。 A pixel value acquisition means that includes a first pixel region including a plurality of pixels and acquires a pixel value of each pixel in a second pixel region that is wider than the first pixel region.
An edge calculation means for calculating the edge angle of the first pixel region using the pixel value of each pixel in the second pixel region.
A difference calculation means for calculating the difference between the pixel values of the pixels in the first pixel region is provided.
The edge calculation means sets a reference area including the first pixel area according to the difference in the pixel values, and the pixel value of each pixel in the reference area is set with the pixel included in the first pixel area. An image processing apparatus characterized in that the angle of the edge of the first pixel region is calculated by multiplying the weighting coefficient according to the positional relationship by using the pixel value of each pixel in the reference region.
前記第二画素領域における前記各画素の画素値を用いて前記第一画素領域のエッジの角度を算出するエッジ算出ステップと、
前記第一画素領域における前記画素の画素値の最大値と最小値との差を算出する差分算出ステップと、を含み、
前記エッジ算出ステップでは、前記画素値の最大値と最小値との差に応じて前記第一画素領域を含む参照領域を設定し、該参照領域における前記各画素の画素値を用いて前記第一画素領域の前記エッジの角度を算出することを特徴とする画像処理方法。 A pixel value acquisition step of acquiring a pixel value of each pixel in a second pixel area that includes a first pixel area including a plurality of pixels and is wider than the first pixel area.
An edge calculation step of calculating the edge angle of the first pixel region using the pixel value of each pixel in the second pixel region, and
Including a difference calculation step of calculating the difference between the maximum value and the minimum value of the pixel value of the pixel in the first pixel region.
In the edge calculation step, a reference area including the first pixel area is set according to the difference between the maximum value and the minimum value of the pixel value, and the pixel value of each pixel in the reference area is used to set the first pixel value. An image processing method characterized by calculating the angle of the edge of a pixel region.
複数の画素を含む第一画素領域を含み、前記第一画素領域よりも広い第二画素領域における前記各画素の画素値を取得する画素値取得手段と、
前記第二画素領域における前記各画素の画素値を用いて前記第一画素領域のエッジの角度を算出するエッジ算出手段と、
前記第一画素領域における前記画素の画素値の最大値と最小値との差を算出する差分算出手段と、として機能させると共に、
前記エッジ算出手段が、前記画素値の最大値と最小値との差に応じて前記第一画素領域を含む参照領域を設定し、該参照領域における前記各画素の画素値を用いて前記第一画素領域の前記エッジの角度を算出するように機能させることを特徴とする画像処理プログラム。 Computer,
A pixel value acquisition means that includes a first pixel region including a plurality of pixels and acquires a pixel value of each pixel in a second pixel region that is wider than the first pixel region.
An edge calculation means for calculating the edge angle of the first pixel region using the pixel value of each pixel in the second pixel region.
It functions as a difference calculation means for calculating the difference between the maximum value and the minimum value of the pixel value of the pixel in the first pixel region, and also functions as a difference calculation means.
The edge calculation means sets a reference area including the first pixel area according to the difference between the maximum value and the minimum value of the pixel value, and the first pixel value of each pixel in the reference area is used. An image processing program characterized in that it functions to calculate the angle of the edge of a pixel region.
前記第二画素領域における前記各画素の画素値を用いて前記第一画素領域のエッジの角度を算出するエッジ算出ステップと、
前記第一画素領域における前記画素の画素値の差を算出する差分算出ステップと、を含み、
前記エッジ算出ステップでは、前記画素値の差に応じて前記第一画素領域を含む参照領域を設定し、前記参照領域の各画素の画素値に対し、前記第一画素領域に含まれる画素との位置関係に応じた重み付け係数を乗じた上で、前記参照領域における前記各画素の画素値を用いて前記第一画素領域の前記エッジの角度を算出することを特徴とする画像処理方法。 A pixel value acquisition step of acquiring a pixel value of each pixel in a second pixel area that includes a first pixel area including a plurality of pixels and is wider than the first pixel area.
An edge calculation step of calculating the edge angle of the first pixel region using the pixel value of each pixel in the second pixel region, and
Includes a difference calculation step of calculating the difference in pixel values of the pixels in the first pixel region.
In the edge calculation step, a reference area including the first pixel area is set according to the difference in the pixel values, and the pixel value of each pixel in the reference area is set with the pixel included in the first pixel area. An image processing method characterized in that the angle of the edge of the first pixel region is calculated using the pixel value of each pixel in the reference region after multiplying by a weighting coefficient according to the positional relationship.
複数の画素を含む第一画素領域を含み、前記第一画素領域よりも広い第二画素領域における前記各画素の画素値を取得する画素値取得手段と、
前記第二画素領域における前記各画素の画素値を用いて前記第一画素領域のエッジの角度を算出するエッジ算出手段と、
前記第一画素領域における前記画素の画素値の差を算出する差分算出手段と、として機能させると共に、
前記エッジ算出手段が、前記画素値の差に応じて前記第一画素領域を含む参照領域を設定し、前記参照領域の各画素の画素値に対し、前記第一画素領域に含まれる画素との位置関係に応じた重み付け係数を乗じた上で、前記参照領域における前記各画素の画素値を用いて前記第一画素領域の前記エッジの角度を算出するように機能させることを特徴とする画像処理プログラム。 Computer,
A pixel value acquisition means that includes a first pixel region including a plurality of pixels and acquires a pixel value of each pixel in a second pixel region that is wider than the first pixel region.
An edge calculation means for calculating the edge angle of the first pixel region using the pixel value of each pixel in the second pixel region.
It functions as a difference calculation means for calculating the difference between the pixel values of the pixels in the first pixel region, and also functions as a difference calculation means.
The edge calculation means sets a reference area including the first pixel area according to the difference in the pixel values, and the pixel value of each pixel in the reference area is set with the pixel included in the first pixel area. Image processing characterized in that it functions to calculate the angle of the edge of the first pixel region by using the pixel value of each pixel in the reference region after multiplying by a weighting coefficient according to the positional relationship. program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2021076266A JP7246103B2 (en) | 2018-10-17 | 2021-04-28 | Image processing device, image processing method, and image processing program |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018195831A JP6884403B2 (en) | 2018-10-17 | 2018-10-17 | Image processing equipment, image processing method, and image processing program |
JP2021076266A JP7246103B2 (en) | 2018-10-17 | 2021-04-28 | Image processing device, image processing method, and image processing program |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018195831A Division JP6884403B2 (en) | 2018-10-17 | 2018-10-17 | Image processing equipment, image processing method, and image processing program |
Publications (3)
Publication Number | Publication Date |
---|---|
JP2021108222A true JP2021108222A (en) | 2021-07-29 |
JP2021108222A5 JP2021108222A5 (en) | 2021-11-18 |
JP7246103B2 JP7246103B2 (en) | 2023-03-27 |
Family
ID=70387258
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018195831A Active JP6884403B2 (en) | 2018-10-17 | 2018-10-17 | Image processing equipment, image processing method, and image processing program |
JP2021076266A Active JP7246103B2 (en) | 2018-10-17 | 2021-04-28 | Image processing device, image processing method, and image processing program |
Family Applications Before (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018195831A Active JP6884403B2 (en) | 2018-10-17 | 2018-10-17 | Image processing equipment, image processing method, and image processing program |
Country Status (1)
Country | Link |
---|---|
JP (2) | JP6884403B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102479976B1 (en) * | 2021-11-15 | 2022-12-20 | 국방과학연구소 | Change detection apparatus and method for detecting changes between different aerial photographs |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004180171A (en) * | 2002-11-28 | 2004-06-24 | Fuji Xerox Co Ltd | Device, method and program for processing image, and storage medium |
-
2018
- 2018-10-17 JP JP2018195831A patent/JP6884403B2/en active Active
-
2021
- 2021-04-28 JP JP2021076266A patent/JP7246103B2/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004180171A (en) * | 2002-11-28 | 2004-06-24 | Fuji Xerox Co Ltd | Device, method and program for processing image, and storage medium |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102479976B1 (en) * | 2021-11-15 | 2022-12-20 | 국방과학연구소 | Change detection apparatus and method for detecting changes between different aerial photographs |
Also Published As
Publication number | Publication date |
---|---|
JP6884403B2 (en) | 2021-06-09 |
JP7246103B2 (en) | 2023-03-27 |
JP2020064448A (en) | 2020-04-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
RU2419881C2 (en) | Anisometric texture synthesis | |
JP3915563B2 (en) | Image processing apparatus and image processing program | |
Parsania et al. | A comparative analysis of image interpolation algorithms | |
US8150197B2 (en) | Apparatus and method of obtaining high-resolution image | |
CN105427253A (en) | Multi-viewpoint RGB-D image super resolution method based on non-local regression and total difference | |
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 | |
US20220020113A1 (en) | Image resizing using seam carving | |
JP6883864B2 (en) | Image processing equipment, image processing method, and image processing program | |
US10481774B2 (en) | Area-dependent image enhancement | |
JP4126541B2 (en) | Image processing apparatus, image processing method, image processing program, and storage medium | |
US11503870B2 (en) | Pattern filling in garment pieces | |
EP3175613B1 (en) | Projection apparatus, image processing apparatus, and image processing method | |
JP2009146150A (en) | Method and device for detecting feature position | |
US9761152B2 (en) | Method for harmonizing colors, corresponding computer program and device | |
JP2005312014A (en) | Resolution converting method | |
JP5678295B2 (en) | Image display processing method and image display processing apparatus | |
KR100587979B1 (en) | Interpolation method for image enlargement based on edge and corner | |
US20190206025A1 (en) | Image magnifying apparatus | |
JP4827137B2 (en) | Resolution conversion processing method, image processing apparatus, image display apparatus, and program | |
JP4265362B2 (en) | Image processing device | |
JP5712385B2 (en) | Image display processing apparatus and image display processing method | |
WO2024000173A1 (en) | Method and apparatus for generating mode detection model, and computer device | |
CN111626935B (en) | Pixel map scaling method, game content generation method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20211006 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20211007 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20221014 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20221018 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20221214 |
|
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: 20230221 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20230307 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7246103 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |