JP6700873B2 - Image processing device, image processing method, and program - Google Patents
Image processing device, image processing method, and program Download PDFInfo
- Publication number
- JP6700873B2 JP6700873B2 JP2016044662A JP2016044662A JP6700873B2 JP 6700873 B2 JP6700873 B2 JP 6700873B2 JP 2016044662 A JP2016044662 A JP 2016044662A JP 2016044662 A JP2016044662 A JP 2016044662A JP 6700873 B2 JP6700873 B2 JP 6700873B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- area
- line
- value
- region
- 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.)
- Expired - Fee Related
Links
- 238000012545 processing Methods 0.000 title claims description 123
- 238000003672 processing method Methods 0.000 title claims description 4
- 238000009499 grossing Methods 0.000 claims description 33
- 238000000034 method Methods 0.000 description 58
- 230000008569 process Effects 0.000 description 49
- 238000012952 Resampling Methods 0.000 description 5
- 230000009467 reduction Effects 0.000 description 5
- 230000008859 change Effects 0.000 description 4
- 238000001514 detection method Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 3
- 238000006243 chemical reaction Methods 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 239000000428 dust Substances 0.000 description 2
- 238000012935 Averaging Methods 0.000 description 1
- 239000000470 constituent Substances 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000011946 reduction process Methods 0.000 description 1
Images
Description
本発明は、入力画像を処理する画像処理装置、画像処理方法、及びプログラムに関する。 The present invention relates to an image processing device that processes an input image, an image processing method, and a program.
従来、被写体等を撮像した画像内の各画素が、線を構成している画素であるかどうかを判定し、線を構成していると判定された各画素の輝度値を平滑化することで、画像内の被写体像の形状を保ちつつ、その画像のノイズを低減可能にする方法が知られている。線を構成する画素であるか否かを判定する技術としては、様々な公知技術がある。例えば、非特許文献1には、画像に対して線領域と背景領域を設定し、それら領域ごとに、画素の輝度値の平均値を求め、線領域の平均値が背景領域の平均値と大きく異なる場合、線領域の各画素は線を構成する画素であると判定する技術が開示されている。非特許文献1に記載の技術では、線領域を複数方向に設定して、それら各設定方向について、線領域の平均値が背景領域の平均値と大きく異なるかどうかを見ることにより、様々な方向の線を検出可能としている。
Conventionally, it is possible to determine whether or not each pixel in an image of a subject or the like is a pixel forming a line, and smooth the luminance value of each pixel determined to form a line. There is known a method capable of reducing noise in an image while maintaining the shape of a subject image in the image. There are various known techniques for determining whether or not pixels are pixels that form a line. For example, in Non-Patent
前述した従来の技術の場合、画像から例えば線領域のような所定の形状性(線形性)を有する領域を判定する際に用いる画像領域が、例えば3×3画素程度の小さい画像領域であれば、画像処理の実行時間は短時間で済む。しかしながら、線等の領域の判定精度を高めるために例えば画像領域を大きくすると、その画像領域内の各画素の輝度値の平均値を求めるための計算量が増大してしまい、画像処理の実行時間が長くなってしまう。 In the case of the above-mentioned conventional technique, if the image area used for determining an area having a predetermined shape (linearity) such as a line area from the image is a small image area of about 3×3 pixels, for example. The image processing execution time is short. However, if, for example, the image area is enlarged in order to improve the determination accuracy of areas such as lines, the amount of calculation for obtaining the average value of the brightness values of each pixel in the image area increases, and the execution time of the image processing is increased. Will be long.
そこで、本発明は、画像処理に用いる領域の大きさによらず、所定の形状性を有する領域を判定する画像処理を、短時間に実行可能にすることを目的とする。 Therefore, an object of the present invention is to make it possible to execute image processing for determining an area having a predetermined shape property in a short time regardless of the size of the area used for image processing.
本発明は、入力画像を回転させた回転画像を生成し、入力画像の各画素値を積分した積分画像と回転画像の各画素値を積分した積分画像とを生成し、入力画像の注目画素の近傍領域に対応する積分画像の領域から算出される積分値に基づいて、線領域を特定することを特徴とする。 The present invention generates a rotated image obtained by rotating an input image, generates an integral image obtained by integrating each pixel value of the input image and an integral image obtained by integrating each pixel value of the rotated image, and The feature is that the line region is specified based on the integral value calculated from the region of the integral image corresponding to the neighborhood region.
本発明によれば、画像処理に用いる領域の大きさによらず、所定の形状性を有する領域を判定する画像処理を、短時間に実行可能となる。 According to the present invention, it is possible to execute image processing for determining an area having a predetermined shape property in a short time regardless of the size of the area used for image processing.
以下、本発明の実施形態について、図面を参照しながら説明する。
<画像処理装置の構成例(並列処理の構成例)>
図1(A)は、本実施形態の画像処理装置100の機能構成を示すブロック図である。本実施形態の画像処理装置100の図1(A)に示した各部は、ハードウェア構成として形成されていてもよいし、CPU等が本実施形態の画像処理プログラムを実行することにより実現されてもよい。
Embodiments of the present invention will be described below with reference to the drawings.
<Configuration Example of Image Processing Device (Configuration Example of Parallel Processing)>
FIG. 1A is a block diagram showing the functional arrangement of the
画像処理装置100は、例えば被写体が撮影されて得られた画像信号等が、入力画像101として供給され、その入力画像101に対してノイズ低減処理等の画像処理を行って生成した画像信号を、出力画像102として出力する装置である。なお、入力画像101は、撮像装置が被写体を撮影している画像信号に限定されず、記録媒体から読み出された画像信号、通信路等を経由して供給された画像信号など、様々な経路を介した画像信号の何れであってもよい。本実施形態の画像処理装置100は、線領域決定部103と線領域処理部104とを有して構成されている。
The
線領域決定部103は、入力画像101内に、所定形状の領域の一例である線領域が存在するか判定し、線領域が存在する場合には、その線領域が、どの位置に在り、その線の向きが何れの方向であるかを検出する。具体的には、線領域決定部103は、それぞれ複数の、画像回転部、積分画像生成部、線形性算出部を有し、また、一つの線形性最大領域選択部を有している。画像回転部は回転手段の一例であり、積分画像生成部は生成手段の一例であり、線形性算出部及び線形性最大領域選択部は特定手段の一例である。なお、図1(A)の例では、線領域決定部103内の構成として、複数の画像回転部105B〜105D、複数の積分画像生成部106A〜106D、複数の線形性算出部107A〜107Dのみ、及び一つの線形性最大領域選択部108を図示している。
The line
画像回転部105B〜105Dは、入力画像101を傾けるようにそれぞれ異なる回転角度に回転させた複数の回転画像を生成する。例えば、画像回転部105Bは、入力画像101を、例えば22.5度回転させてリサンプリングする回転処理を行って、回転画像を生成する。同様に、画像回転部105Cは入力画像101を例えば45度回転、画像回転部105Dは入力画像101を例えば67.5度回転して、それぞれリサンプリングする回転処理を行ってそれぞれ回転画像を生成する。これら回転角度は一例である。各回転角度は、入力画像101から検出したい線の方向(画像の水平(x軸)又は垂直(y軸)に対する角度)に応じて任意に設定可能である。入力画像101に対する回転角度を前述の22.5度、45度、67.5度よりも更に細かく設定する場合、画像回転部は、それら設定される角度に応じて図1(A)の例よりも多く設けられる。なおこの場合、画像回転部に対応させて、後段の積分画像生成部、線形性算出部についても同様に設けられることになる。また、本実施形態では、回転処理のリサンプリング時に線形補間を用いるが、リサンプリング時の補間方法は他の公知の補間方法が用いられてもよい。各画像回転部105B〜105Dは、それぞれ回転画像の信号を出力するとともに、回転処理の際の画像の回転角度(回転量)の情報と、入力画像101の各画素の座標情報をも出力する。画像回転部105B〜105Dからそれぞれ出力された回転画像の信号、回転角度の情報、入力画像101の各画素の座標情報は、それぞれ対応した積分画像生成部106に送られる。
The
積分画像生成部106Aは、入力画像101から積分画像を生成する。また、積分画像生成部106B〜106Dは、各々対応した画像回転部105B〜105Dより供給された回転画像から、それぞれ積分画像を生成する。
The integral
以下、図2(A)〜図2(C)を参照して積分画像について説明する。なお、図2(A)〜図2(C)において点線で区切られた各四角はそれぞれ画素を表している。図2(A)は、入力画像101の左上角の画素p11を原点とした場合に、原点及びその近傍の各画素p11〜p13,・・・,p21〜p23,・・・,p31〜p33,・・・と、それら各画素の各輝度値(図中の各数値は輝度値を表す。)の例を示している。また、図2(B)は、図2(A)の画像から算出される積分画像を示している。図2(B)の積分画像の各画素P11〜P13,・・・,P21〜P23,・・・,P31〜P33,・・・の数値は、それぞれ積分値を表している。これら図2(B)の各画素P11〜P33の各積分値は、図2(A)の原点画素p11から、注目画素までの間の、水平,垂直方向の各画素からなる矩形領域に含まれる各輝度値を積分した値となっている。なお、本実施形態において、注目画素とは、画像を構成する全画素のうち、ある画素に注目して説明を行う際に用いる表記であり、画像内の全ての画素がそれぞれ注目画素であるとする。
The integrated image will be described below with reference to FIGS. 2(A) to 2(C). 2A to 2C, each square delimited by a dotted line represents a pixel. 2A, when the pixel p11 at the upper left corner of the
ここで、積分画像の生成の際、入力画像101に対し、例えば水平方向の行の左端から右端へ走査がなされ、右端に到達した後は一行分だけ垂直方向に下がって再び水平方向の行の左端から右端への走査がなされるとする。この場合、注目画素の積分値は、その注目画素の行内において注目画素から左側の各画素の輝度値と、既に積分値算出済みの行において注目画素に対して垂直方向に隣接した画素の積分値とを、加算することにより算出される。例えば、図2(A)の画素p33を注目画素とし、図2(B)内で図2(A)の注目画素p33に対応した画素P33の積分値を求める場合には以下のようにして算出される。注目画素p33の行内において、注目画素p33の左側の各画素p31,p32と注目画素p33の各輝度値は「3,1,5」である。また、積分値算出済みの行において、注目画素p33に対して垂直方向に隣接した画素の積分値は、図2(B)の画素P20の積分値「20」である。このため、注目画素p33の行内の各画素p31,p32,p33の輝度値「3,1,5」と、積分値計算済みの行で注目画素p33に隣接した画素P20の積分値「20」とを加算することにより、図2(B)の画素P33の積分値「29」が算出される。このように、積分画像の生成処理は画素当たりの計算量が一定であり、積分画像は画像全体を一度走査するだけで生成可能である。
Here, when the integrated image is generated, the
また、積分画像を用いれば、その積分画像の任意の矩形領域内の各画素の輝度値の合計、つまり矩形領域の積分値は、その矩形領域の大きさに関わらず一定の計算量で算出することができる。例えば、図2(C)に示す入力画像101において、図中の太線で示した矩形領域220内の各画素の輝度値合計、つまり矩形領域220の積分値を求める場合には、以下のようにして求めることができる。矩形領域220の積分値は、矩形領域220の角の丸(○)で示した隣接画素201〜204の各積分値を積分画像から読み出し、隣接画素201と204の積分値の加算値から、隣接画素202と203の積分値の加算値を減算することで求められる。
If an integral image is used, the sum of the brightness values of the pixels in an arbitrary rectangular area of the integral image, that is, the integral value of the rectangular area is calculated with a constant calculation amount regardless of the size of the rectangular area. be able to. For example, in the
図1に説明を戻す。
積分画像生成部106Aは、積分画像の画像信号と、入力画像101の回転角度(入力画像101は回転されていないため回転角度は0度)の情報と、入力画像101の各画素の座標情報とを、線形性算出部107Aに対して出力する。なお、入力画像101の回転角度は0度であるため、積分画像生成部106Aは、入力画像101の回転角度の情報については出力を行わないようにしてもよい。また、積分画像生成部106B〜106Dは、各々が生成した積分画像の画像信号を、画像回転部105B〜105Dからの回転角度情報及び入力画像101の各画素の座標情報と共に、各々対応した線形性算出部107B〜107Dに出力する。
Returning to FIG.
The integral
線形性算出部107Aは、積分画像生成部106Aにて生成された積分画像と回転角度情報及び入力画像101の各画素の座標情報とに基づいて、入力画像101の各画素(各注目画素)について所定の形状性を表す値を算出する。具体的には、線形性算出部107Aは、入力画像101の各画素を各々注目画素とした場合、注目画素の近傍領域に対応した積分画像領域を所定の形状性を表す値を算出するための判定領域として設定し、各判定領域の注目画素について形状性を表す値を算出する。本実施形態の場合、線形性算出部107Aは、所定の形状性を表す値として、画像の線形状性(以下、「線形性」と表記する。)を表す値を算出する。また、本実施形態において、線形性算出部107Aでは、判定領域(積分画像領域)として、第1の領域と第2の領域との少なくとも二つの領域から形成される矩形の判定領域を設定する。判定領域と線形性及びその線形性を表す値の詳細については後述する。
The
同様に、線形性算出部107B〜107Dは、各々対応した積分画像生成部106B〜106Dより供給された積分画像と、回転角度情報及び入力画像101の各画素の座標情報とに基づいて、入力画像101の各画素に対応した線形性を表す値を算出する。線形性算出部107B〜107Dは、入力画像101の注目画素ごとに設定される判定領域を用いて、注目画像ごとに線形性を表す値を算出する。
Similarly, the
以下、線形性算出部107Aを例に挙げて、判定領域について説明する。線形性算出部107Aは、入力画像101の注目画素を例えば中心にした判定領域を設定する。図3(A),図3(B)は、一例としての判定領域300,310を示している。
The determination region will be described below by taking the
図3(A)は、注目画素ptが、入力画像101内で横方向(水平方向)の線を構成する画素である可能性が高いかどうかを検出するための判定領域300を示している。判定領域300は、注目画素ptを中心とした9×9画素の矩形領域である。判定領域300には、第1の領域として、横方向の線領域301が設定され、第2の領域として、線領域以外の背景領域302が設定さる。背景領域302は、線領域301を挟むようにして設定される。また、図3(A)に示す判定領域300は、それら線領域301と背景領域302の縦方向における幅の割合が1:8に設定されている。前述のように、これら線領域301と背景領域302はそれぞれ矩形領域となされている。したがって、本実施形態では、入力画像101の積分画像を用いることにより、それら矩形領域の線領域301の積分値と背景領域302の積分値が、その矩形領域の大きさに関わらず一定の計算量で算出可能である。
FIG. 3A shows a
図3(B)は、注目画素ptが、入力画像101内で縦方向(垂直方向)の線を構成する画素である可能性が高いかどうかを検出するための判定領域310を示している。判定領域310は、注目画素ptを中心とした9×9画素の矩形領域であり、第1の領域として、縦方向の線領域311が設定され、第2の領域として、線領域311を挟む背景領域312が設定された領域である。また、図3(B)に示す判定領域310は、それら線領域311と背景領域312の横方向における幅の割合が1:8に設定されている。図3(A)の場合と同様に、これら線領域311と背景領域312はそれぞれ矩形領域となされている。したがって、入力画像101の積分画像を用いることにより、それら矩形領域の線領域311の積分値と背景領域312の積分値は、その矩形領域の大きさに関わらず一定の計算量で算出可能である。
FIG. 3B shows a
線形性算出部107Aは、注目画素ptに対して、前述のような図3(A)の判定領域300と図3(B)の判定領域310を設定する。そして、線形性算出部107Aは、図3(A)の判定領域300の線領域301の積分値と背景領域302の積分値とに基づいて、注目画素ptが入力画像101内で横線を構成する画素である可能性の高さを表す値、すなわち線形性を表す値を算出する。同様に、線形性算出部107Aは、図3(B)の判定領域310の線領域311の積分値と背景領域312の積分値とに基づいて、注目画素ptが入力画像101内で縦線を構成する画素である可能性の高さを表す線形性の値を算出する。線形性及びその値の算出処理の詳細については後述する。
The
線形性算出部107B〜107Dは、それぞれ対応した積分画像生成部106B〜106Dより供給された積分画像に対して、前述同様の判定領域を設定する。ただし、この場合の判定領域は、回転画像から生成された積分画像内において、入力画像101の注目画素に対応した画素(以下、この画素も注目画素と表記する。)を中心にした領域として設定される。そして、線形性算出部107B〜107Dは、回転画像から生成された積分画像に設定された判定領域内の注目画素について線形性の値を算出する。これら線形性算出部107B〜107Dにおいて行われる判定領域の設定処理と線形性の値算出の詳細については後述する。線形性算出部107A〜107Dは、判定領域ごとに算出した注目画素の線形性の値を、それぞれの回転角度情報及び座標情報と共に、線形性最大領域選択部108に対して出力する。
The
線形性最大領域選択部108は、各線形性算出部107A〜107Dで算出された線形性の値の中で最も大きい値の線形性の注目画素に対応した判定領域を選択し、その選択した判定領域に基づいて入力画像101の線領域を特定する。ここで、本実施形態において、線形性最大領域選択部108にて選択される判定領域は、入力画像101(回転角度が0度)、22.5度、45度、67.5度の各回転画像の何れかで設定された判定領域である。したがって、線形性最大領域選択部108は、例えば45度の回転画像の判定領域を選択した場合、入力画像101の中で、45度の回転画像の判定領域に対応した位置に、45度傾いた線領域が在ることを検出できる。なお、詳細は後述するが、判定領域の選択が行われない場合もある。そして、線形性最大領域選択部108は、選択された判定領域の線領域に対応した注目画素の線形性の値と、回転角度情報及び座標情報とを、線領域処理部104の線領域平滑化部109に出力する。
The maximum linearity
線領域処理部104の線領域平滑化部109は、平滑手段の一例である。線領域平滑化部109には、入力画像101も供給されている。線領域平滑化部109は、線領域決定部103にて選択された判定領域の線領域に対応した注目画素の線形性の値と、回転角度情報及び座標情報とに基づいて、入力画像101の中の線領域を識別して、その線領域に対する平滑化処理を行う。そして、線領域平滑化部109は、平滑化処理後の線領域を用いて、入力画像101の線領域を更新する。線領域平滑化部109における平滑化処理は、例えば、線領域の各画素の平均値を求め、その平均値により線領域の各画素値を更新する処理となされている。なお、本実施形態では、線領域の各画素の平均値により、線領域の各画素値を更新するような平滑化を行うが、これは一例であり、他の平滑化処理が行われてもよい。平滑化された線領域による更新後の画像信号は、画像処理装置100によるノイズ低減後の出力画像102として、図示しない例えば表示装置に表示、又は記録装置により記録媒体へ記録、又は印刷装置により印刷、又は通信装置により通信等される。
The line
図4(A)は、図1(A)の画像処理装置100における画像処理の処理手順を示したフローチャートである。図4(A)のフローチャートは、図1(A)の線領域決定部103にて実行される処理である。また、図4(B)は線領域処理部104が実行する処理のフローチャートである。これら図4(A)と図4(B)のフローチャートの処理は、図示しないCPU等がROMに保存されている本実施形態の画像処理プログラムを実行することにより実現されてもよい。以下の説明において、フローチャート内の各ステップについては、各参照符号のS105B〜S105D、S106A〜106D、S107A〜S107D等のみで表記し、これは後述する他のフローチャートにおいても同様とする。
FIG. 4A is a flowchart showing a processing procedure of image processing in the
先ず、図4(A)に示した画像処理のフローチャートから説明する。
図4(A)のS106Aは積分画像生成部106Aにて行われる処理であり、S107Aは線形性算出部107Aにて行われる処理である。また、S105Bは画像回転部105B、S106Bは積分画像生成部106B、S107Bは線形性算出部107Bにて行われる処理である。同様に、S105Cは画像回転部105C、S106Cは積分画像生成部106C、S107Cは線形性算出部107C、S105Dは画像回転部105D、S106Dは積分画像生成部106D、S107Dは線形性算出部107Dにて行われる処理である。
First, the flowchart of the image processing shown in FIG. 4A will be described.
4A is a process performed by the integral
図4(A)のフローチャートにおいて、入力画像101が供給されることで線領域決定部103の処理が開始する。線領域決定部103の処理が開始すると、S106A〜S107Aと、S105B〜S107Bと、S105C〜S107Cと、S105D〜S107Dとの各処理が、並列に実行される。
In the flowchart of FIG. 4A, the processing of the line
以下、S106AとS107Aの処理から説明する。
S106Aでは、積分画像生成部106Aは、入力画像101の積分画像を生成する。S106Aの後、線領域決定部103の処理は、線形性算出部107Aにて行われるS107Aに進む。S107Aでは、線形性算出部107Aは、積分画像生成部106Aにて生成された積分画像に対して、前述したような判定領域を設定する。そして、線形性算出部107Aは、前述したように判定領域に対応した注目画素における線形性の値を算出する。
The processing of S106A and S107A will be described below.
In S106A, the integral
図5は、線形性算出部107Aが図4(A)のS107Aにて行う判定領域設定から線形性算出までの詳細な処理のフローチャートである。図5のフローチャートの処理は、入力画像101の各画素(つまり各注目画素)についてそれぞれ行われる処理である。
FIG. 5 is a flowchart of detailed processing from the determination area setting to the linearity calculation performed by the
線形性算出部107Aは、S301において、入力画像101の注目画素を例えば中心にした前述の図3(A)と図3(B)の判定領域300と310を設定する。S301の領域設定処理の後、線形性算出部107Aの処理は、S302に進む。
In step S301, the
S302では、線形性算出部107Aは、S301で設定した図3(A)の判定領域300について、線領域301の積分値(線領域301内の各画素の輝度値合計)と、背景領域302の積分値(背景領域302内の各画素の輝度値合計)とを算出する。同様に、線形性算出部107Aは、図3(B)の判定領域310について、線領域311の積分値と、背景領域312の積分値とを算出する。S302の積分値算出処理の後、線形性算出部107Aの処理は、S303に進む。
In S302, the
S303では、線形性算出部107Aは、判定領域300について、線領域301の積分値をその領域内の画素数で割って平均値を算出し、背景領域302の積分値をその領域内の画素数で割って平均値を算出する。同様に、線形性算出部107Aは、判定領域310について、線領域311の平均値を算出し、背景領域312の平均値を算出する。S303の平均値算出処理の後、線形性算出部107Aの処理は、S304に進む。
In S303, the
S304では、線形性算出部107Aは、判定領域300の線領域301の平均値と背景領域302の平均値との比を算出する。同様に、線形性算出部107Aは、判定領域310の線領域311の平均値と背景領域312の平均値との比を算出する。ここで、判定領域300において線領域301と背景領域302の両平均値の差が大きく、それら平均値の比が大きな値であるほど、その判定領域300の注目画素ptは、入力画像101内で横(水平)方向の線を構成する画素である可能性が高いと言える。また、判定領域310において線領域311と背景領域312の両平均値の差が大きく、それら平均値の比が大きな値であるほど、判定領域310の注目画素ptは、入力画像101内で縦(垂直)方向の線を構成する画素である可能性が高いと言える。このように、S304で算出される比の値は、注目画素ptが線を構成する画素である可能性の高さを表す値、すなわち線形性を表す値となっている。線形性算出部107Aは、S304で算出した比の値を、注目画素ptにおける線形性を表す値として算出する。
In S304, the
図4(A)のフローチャートに説明を戻し、S105C〜S107Cの処理について説明する。なお、S105B〜S107B、S105D〜S107Dの各処理は、回転画像の回転角度が異なっていること以外、S105C〜S107Cの処理と同じであるため、それらの説明は省略する。 Returning to the flowchart of FIG. 4A, the processing of S105C to S107C will be described. The processes of S105B to S107B and S105D to S107D are the same as the processes of S105C to S107C except that the rotation angle of the rotated image is different, and thus the description thereof will be omitted.
S105Cにおいて、画像回転部105Cは、前述したように入力画像101を45度回転させてリサンプリングする回転処理を行って、回転画像を生成する。S105Cの後、線領域決定部103の処理は、積分画像生成部106Cにて行われるS106Cに進む。S106Cでは、積分画像生成部106Cは、画像回転部105Cから供給された回転画像から積分画像を生成する。S106Cの後、線領域決定部103の処理は、線形性算出部107Cにて行われるS107Cに進む。
In S105C, the
図6は、線形性算出部107Cが図4(A)のS107Cにて行う処理の詳細なフローチャートである。図6のフローチャートの処理は、入力画像101を45度回転させた回転画像の積分画像のうち、入力画像101の各注目画素に対応した画素について行われる処理である。線形性算出部107Cは、図4(A)のS107Cの処理に進むと、先ずS501の処理を行う。S501〜S506は、入力画像101の注目画素ごとに対応させて行われる処理である。
FIG. 6 is a detailed flowchart of the processing performed by the
S501では、線形性算出部107Cは、積分画像生成部106Cから送られてきた注目画像の座標(つまり入力画像101の注目画素の座標値)を、S105Cにて45度回転処理された回転画像の座標系の座標に変換する。なお、座標情報の変換処理は、S105Cで画像回転の際に用いられる処理と同様である。
In S501, the
ここで、図7(A)〜図7(C)を用いて、入力画像101と回転画像の各画素の関係を詳細に説明する。図7(A)は入力画像101の一部を示し、図中の点線で区切られた各四角は画素であるとする。図7(B)と図7(C)は入力画像101が45度回転された後の回転画像700の一部を示しており、図中の実線で区切られた各四角は回転画像700の各画素であるとする。また、図7(B)と図7(C)の図中の枠701で囲われた範囲は、図7(A)の大きさの入力画像101に対応しているとする。なお、図7(B)と図7(C)は、回転画像700との対応関係を判り易くするために入力画像101も示している。
Here, the relationship between each pixel of the
図7(B)に示したように、入力画像101の各画素の座標(中心座標)と、回転画像700の各画素の座標(中心座標)とは、それぞれ一致せず、異なっていることが容易にわかる。また、図7(C)は、入力画像101の注目画素ptと、その注目画素ptに対応した回転画像700内の近傍画素との関係を示している。この図7(C)に示すように、入力画像101の注目画素ptは、回転画像700の太枠710の中の例えば四つの近傍画素から補間して求めることができる。このため、S501において、線形性算出部107Cは、入力画像101の注目画素ptの座標から、回転画像700の各近傍画素の座標を算出するような座標変換を行う。S501の後、線形性算出部107Cの処理は、S502に進む。
As shown in FIG. 7B, the coordinates (center coordinates) of each pixel of the
S502〜S505は、回転画像700の近傍画素ごとに行われる処理である。S502〜S505は、前述の図5のフローチャートにおける注目画素が近傍画素になされること以外は前述のS301〜S304と同様の処理であるため、これらS502〜S505の詳細な説明は省略する。S505の後、線形性算出部107Cの処理は、S506に進む。
S502 to S505 are the processes performed for each neighboring pixel of the rotated
S506では、線形性算出部107Cは、S502〜S505で近傍画素ごとに求められた線形性の値から、例えば線形補間により、入力画像101の注目画素に対応した線形性の値を算出する。なお、ここでは線形補間を用いたが、他の公知の補間方法により注目画素の線形性の値を求めてもよい。
In S506, the
図4(A)のフローチャートに説明を戻す。S107A〜S107Dにて線形性算出部107A〜107Dがそれぞれ算出した各判定領域の注目画素に対応した線形性の値は、前述したように、各々対応した回転角度情報及び座標情報と共に、線形性最大領域選択部108に送られる。そして、線領域決定部103の処理は、線形性最大領域選択部108にて行われるS108に進む。なお、線領域決定部103では、線形性最大領域選択部108に対して、線形性算出部107A〜107から線形性の値や回転角度情報及び座標情報が供給されるタイミングを合わせようにもなされている。タイミング合わせは、例えば、積分画像生成部106A〜106Dの積分画像、又は、線形性算出部107A〜107による線形性の値や回転角度情報及び座標情報を、図示しないメモリ等に一時的に蓄積して読み出しタイミングを合わせることにより行う。
Description will be returned to the flowchart of FIG. As described above, the linearity value corresponding to the pixel of interest in each determination region calculated by the
S108では、線形性最大領域選択部108は、S107A〜S107Dにてそれぞれ求められた線形性の値のうち、最も大きい値の線形性を有する注目画素に対応した判定領域を選択して、入力画像101の中の線領域を特定する。ただし、本実施形態では、線形性最大領域選択部108は、最も大きい線形性の値が、所定の閾値以下であれば、線形性の値を用いた判定領域の選択そのものを行わないようにする。本実施形態の場合、線形性最大領域選択部108は、前述した判定領域の線領域の平均値が背景領域の平均値の倍となる場合の比の値を、所定の閾値として用いる。なお、所定の閾値は予め設定した閾値等の他の閾値を用いてもよいし、判定領域選択の際には所定の閾値を用いないようにしてもよい。所定の閾値を用いない場合には、前述のように、最も大きい値の線形性を有する注目画素に対応した判定領域が選択される。S108の後、線領域決定部103は、図4(A)のフローチャートの処理を終了する。そして、線形性最大領域選択部108からは、特定した線領域を表す情報として、その線領域に対応した注目画素の線形性の値と、その注目画素に対応した回転角度情報及び座標情報とが、線領域処理部104の線領域平滑化部109に送られる。
In S108, the maximum linearity
図4(B)は、線領域処理部104の線領域平滑化部109にて行われる処理のフローチャートである。図4(B)のフローチャートの処理は、図4(A)のS108の処理が終了したことで開始される。図4(B)のフローチャートの処理が開始されると、S109において、線領域平滑化部109は、線領域の平滑化処理を行い、その平滑化後の線領域を用いて入力画像101を更新する。
FIG. 4B is a flowchart of processing performed by the line
S109では、線領域平滑化部109は、線領域決定部103で特定された線領域に対応した注目画素の線形性の値と、注目画素の回転角度情報及び座標情報とに基づいて、入力画像101の中の線領域を識別して、その線領域の平滑化と更新を行う。S109の後、線領域処理部104の処理は終了する。
In S109, the line
以上説明したように、本実施形態の画像処理装置100は、入力画像101とその入力画像101を各々異なる回転角度で回転させた複数の回転画像とから、それぞれ積分画像を生成し、その積分画像に対して線領域を検出するための所定の判定領域を設定する。そして、画像処理装置100は、所定の判定領域の積分値に基づいて、判定領域ごとに線形性の値を算出し、線形性の値が最も大きくなっている判定領域に応じて、入力画像101の線領域を検出している。このように本実施形態の画像処理装置100によれば、積分画像の積分値を用いているため、線領域の検出に用いる判定領域の大きさに関わらず、画素当たりの計算量が一定になり、様々な方向の線領域を高速に検出することが可能となっている。また、画像処理装置100は、入力画像101と複数の回転画像に対する処理を並列に行っているため、高速処理が可能となる。これにより、本実施形態の画像処理装置100は、高速に線領域のノイズ低減処理を行うことができる。
As described above, the
<画像処理装置の他の構成例(逐次処理の構成例)>
図1(A)は、回転角度0度の入力画像101から各々異なる回転角度の回転画像を並列に生成し、それら入力画像101と各回転画像について並列に、積分画像の生成及び線形性の値の算出を行う例を挙げたが、それら各処理は逐次処理で行われてもよい。図1(B)は、回転画像の生成、積分画像の生成、線形性の値の算出の各処理を、画像回転を行うごとに逐次処理する場合の画像処理装置120の構成例を示している。図1(B)の画像処理装置120の各部は、ハードウェア構成として形成されていてもよいし、CPU等が画像処理プログラムを実行することにより実現されてもよい。図1(B)に示す画像処理装置120は、線領域決定部130と線領域処理部104とを有して構成されている。なお、図1(B)において、前述の図1(A)に示した各部と同じものには、同一の参照符号を付して、それらの説明は省略する。
<Another Configuration Example of Image Processing Device (Configuration Example of Sequential Processing)>
In FIG. 1A, a rotation image having a different rotation angle is generated in parallel from an
図1(B)の構成例の場合、線領域決定部130は、保持部131と、制御部132と、それぞれ一つの画像回転部105、積分画像生成部106、線形性算出部107、線形性最大領域選択部108と、を有して構成されている。
In the case of the configuration example of FIG. 1B, the line
保持部131は、入力画像101を保持する。保持部131に保持された入力画像101は、制御部132による制御の下、画像回転部105に送られる。画像回転部105は、制御部132により画像回転角度が逐次設定される。本実施形態では、制御部132は、保持部131から入力画像101を読み出すごとに、画像回転部105に対して、回転角度0度、22.5度、45度、67.5度のように、画像回転角度を逐次変更するように設定する。これにより、画像回転部105からは、回転角度0度の入力画像101、22.5度、45度、67.5度の各回転画像が逐次出力される。なお、回転処理により画質劣化が生じないのであれば、画像回転部105にて回転処理された後の画像を、画像回転部105にフィードバックして更に回転処理することで、各回転画像を生成してもよい。
The holding
画像回転部105から逐次出力された画像信号は、積分画像生成部106に送られる。積分画像生成部106は、画像回転部105から逐次供給される回転角度0度、22.5度、45度、67.5度の各画像から、逐次、積分画像を生成する。積分画像生成部106にて生成された各積分画像は、逐次、線形性算出部107に送られる。
The image signals sequentially output from the
線形性算出部107は、積分画像生成部106で逐次生成された各積分画像と、各積分画像に各々対応した回転角度情報及び入力画像101の各画素(各注目画素)の座標情報とに基づいて、入力画像101の注目画素に対応した線形性の値を逐次算出する。なお、回転角度情報と座標情報は、前述の図1(A)の場合と同様、画像回転部105から積分画像生成部106を経て線形性算出部107に供給されてもよいが、図1(B)の例では制御部132が生成して線形性算出部107に供給する例を挙げている。線形性算出部107は、前述の図1(A)の線形性算出部107A〜107Dの場合と同様に、入力画像101の注目画素ごとに対応させて所定の判定領域を設定し、それら各判定領域の注目画素に対応した線形性の値を算出する。そして、線形性算出部107は、入力画像101の注目画素ごとに対応して算出した線形性の値と、その注目画素の回転角度情報及び座標情報とを、線形性最大領域選択部108に対して出力する。
The
線形性最大領域選択部108と、線領域処理部104の線領域平滑化部109とは、前述の図1(A)と同様のものである。これにより、図1(B)の画像処理装置120からは、ノイズ低減後の出力画像102が得られることになる。
The maximum linearity
図4(C)は、逐次処理により線領域を決定する図1(B)の画像処理装置120における画像処理の処理手順を示したフローチャートである。図4(C)のフローチャートは、図1(B)の線領域決定部130にて実行される処理であり、制御部132により回転角度が逐次設定されるごとに行われる処理である。図4(C)のフローチャートの処理は、図示しないCPU等がROMに保存されている本実施形態の画像処理プログラムを実行することにより実現されてもよい。
FIG. 4C is a flowchart showing a processing procedure of image processing in the
図4(C)のフローチャートにおいて、画像回転部105は、制御部132により回転角度が逐次設定されるごとに、その設定された回転角度により、入力画像101を回転処理して回転画像を生成する。例えば、S105にて画像回転部105から回転角度0度の画像(入力画像101)が出力されると、線領域決定部130の処理は、積分画像生成部106にて行われるS106に進む。
In the flowchart of FIG. 4C, the
S106では、積分画像生成部106は、前述の図1(A)の積分画像生成部106A〜106Dと同様に、画像回転部105より供給される回転画像から積分画像を逐次生成する。S106では、例えば画像回転部105から回転角度0度の画像(入力画像101)が供給された場合、その画像から積分画像を生成する。そして、S106の後、線領域決定部103の処理は、線形性算出部107にて行われるS107に進む。
In S106, the integral
S107では、線形性算出部107は、前述の図1(A)の線形性算出部107A〜107Dと同様に、積分画像生成部106より供給される積分画像から線形性の値を逐次算出する。S107では、例えば積分画像生成部106から回転角度0度の画像(入力画像101)の積分画像が供給された場合、その積分画像から線形性の値を算出する。
In S107, the
S107の処理が終わるとS105の処理に戻り、画像回転部105は、制御部132により次の回転角度に設定される。前述したように回転角度が0度に設定されていた場合、次の回転角度は例えば22.5度に設定される。なお、この回転角度の設定は一例であり、別の回転角度に設定されてもよい。このように、S105〜S107の処理が、回転角度が逐次設定されるごとに行われる。
When the process of S107 ends, the process returns to the process of S105, and the
そして、制御部132による回転角度の設定が終わり、S107において、それら回転角度ごとに算出された各線形性の値が、線形性最大領域選択部108に出力されると、図4(C)のフローチャートの処理は終了する。
Then, when the setting of the rotation angle by the
図1(B)及び図4(C)の逐次処理を行う画像処理装置120は、前述した並列処理を行う画像処理装置100よりも多少処理時間は長くなるが、高速に線領域のノイズ低減処理を行うことができる。一方、逐次処理を行う画像処理装置120は、並列処理を行う画像処理装置100の構成よりも小型化が可能になる。例えば、前述した並列処理を行う画像処理装置100の場合、回転処理の回転角度を細かく設定すると、画像回転部、積分画像生成部、線形性算出部の数が多くなる。これに対し、逐次処理を行う画像処理装置120の場合は、画像回転部、積分画像生成部、線形性算出部がそれぞれ一つで済むため、構成の小型化とコストの低減が可能となる。また、逐次処理を行う画像処理装置120の場合は、制御部132が回転角度の設定を制御するため、回転角度の設定変更が非常に容易である。
The
<判定領域の他の例>
前述の例では、所定の判定領域として図3(A)の判定領域300と図3(B)の判定領域310を用い、入力画像101から縦方向と横方向の2方向、22.5度、45度、67.5度の各回転画像からそれぞれ同じく2方向の線判定が行われる。このように前述の例では合計で8方向の線を検出可能となされているが、回転角度を更に細かく設定すれば、より多くの方向の線を検出することも可能となる。
<Other example of determination area>
In the above example, the
また、前述の例では、所定の判定領域として図3(A)の判定領域300と図3(B)の判定領域310を挙げているが、判定領域はこれらの例に限定されない。例えば、図3(C)に示すような判定領域が設定されてもよい。図3(C)は、図3(A)と同様に、注目画素ptに対応した横(水平)方向の線を検出するため判定領域320の設定例である。図3(C)の判定領域320は、線領域321に対して、線領域321を直径とする円に近似するように背景領域322,323が設定されている。例えば、判定領域320内の端部等に縦方向の線324が存在した場合、前述の図3(A)の例を用いたとすると、線領域301と背景領域302の平均値の比の値が、線324の存在により低い値(線形性の値が低い値)になる可能性がある。これに対し、図3(C)の例の場合、判定領域320内の端等に縦方向の線324が存在した場合であっても、線領域321と背景領域322の平均値の比の値は、線324により低い値になることはなく、線形性の値として高い値が得られる。このため、図3(C)の判定領域320を用いれば、検出したい横線以外の線が端部等に存在していたとしても、横線の線形性の値を精度良く求めることができる。
Further, in the above-described example, the
他の例として、図3(D)に示すような判定領域330が設定されてもよい。図3(D)の判定領域330は、横(水平)方向の線領域331と縦(垂直)方向の線領域332とが注目画素ptで直交するように設定され、それら線領域331,332以外が背景領域333として設定されている。この図3(D)の判定領域330を用いれば、直交する横(水平)方向の線と縦(垂直)方向の線の線形性の値を検出することができるようになる。これら図3(C)や図3(D)の例以外にも、矩形領域の組み合わせにより様々な判定領域を設定することができる。
As another example, a
さらに他の例として、例えば図8(A)の判定領域800、図8(B)の判定領域810、図8(C)の判定領域820、図9(A)の判定領域900、図9(B)の判定領域910、図9(C)の判定領域920のような各判定領域が設定されてもよい。
As still another example, for example, the
図8(A)〜図8(C)は、様々な太さの線に対する線形性の値を算出可能にする判定領域の例を示している。図8(A)の判定領域800は、線領域801と背景領域802の縦方向における幅の割合が1:6となるように設定された例である。図8(B)の判定領域810は、線領域811と背景領域812の縦方向における幅の割合が3:4となるように設定された例である。図8(C)の判定領域820は、線領域821と背景領域822の縦方向における幅の割合が5:2となるように設定された例である。これら図8(A)〜図8(C)の判定領域例によれば、それぞれ異なる太さの線領域を検出することが可能となる。なお、図8(A)〜図8(C)の例は横の線領域を判定する判定領域を挙げたが、各線領域を縦方向に設定すれば、様々な太さの縦線に対する線形性の値を算出することも可能になる。
FIG. 8A to FIG. 8C show examples of the determination region that enables calculation of linearity values for lines of various thicknesses. The
図8(A)〜図8(C)の例によれば、様々な太さの線を検出する場合であっても、画像処理装置は、判定に用いる判定領域の大きさに関わらず、画素あたりの計算量を一定に抑えることができ、様々な方向と様々な太さの線判定を高速に行うことができる。 According to the examples of FIGS. 8A to 8C, even when detecting lines with various thicknesses, the image processing apparatus does not depend on the size of the determination region used for determination The amount of calculation per hit can be kept constant, and line determination in various directions and with various thicknesses can be performed at high speed.
図9(A)〜図9(C)は、様々な長さの線に対する線形性の値を算出可能にする判定領域の例を示している。図9(A)の判定領域900は、線領域901と背景領域902の縦方向における幅の割合が1:2となるように設定された例であり、図9(B)の判定領域910は、図9(A)の設定例に対して線領域911の長さが5/3倍に拡大された設定例である。また、図9(C)の判定領域920は、線領域921の長さが図9(A)の例に対して7/3倍に拡大された設定例である。これら図9(A)〜図9(C)の判定領域例によれば、それぞれ異なる長さの線領域を検出することが可能となる。なお、図9(A)〜図9(C)の例は横の線領域を判定する判定領域を挙げたが、各線領域を縦方向に設定すれば、様々な長さの縦線に対する線形性の値を算出することも可能になる。
9(A) to 9(C) show examples of the determination region that enables calculation of linearity values for lines of various lengths. The
図9(A)〜図9(C)の例によれば、様々な長さの線を検出する場合であっても、画像処理装置は、判定に用いる判定領域の大きさに関わらず、画素あたりの計算量を一定に抑えることができ、様々な方向と様々な長さの線判定を高速に行うことができる。 According to the examples of FIGS. 9A to 9C, even when detecting lines of various lengths, the image processing apparatus does not depend on the size of the determination area used for the determination The amount of calculation per hit can be kept constant, and line determination in various directions and various lengths can be performed at high speed.
<変形例>
前述の実施形態では、線領域処理部104は、線領域の平均化により平滑化を行う例を挙げたが、例えば線領域ごとに平滑化の強さを表すパラメータを設定し、そのパラメータを変更することにより、線領域ごとに平滑化の強さを異ならせることも可能である。一例として、ガウシアンフィルタを用いて線領域の平滑化を行う場合、ガウシアンフィルタのパラメータであるシグマ(分散値)を変更することで、平滑化の強さを変更して、線領域のボケ具合を変えること等が可能となる。より具体的には、線形性の値が大きい(線形性が強い)と判定された線領域に対しては、弱めに平滑化を行うことが望ましい場合もあり、このような場合にパラメータを変更すれば、容易に平滑化の強さを変更することができる。
<Modification>
In the above-described embodiment, the line
また、前述の実施形態では、ノイズ低減処理を例に挙げたが、前述したような線領域の算出処理は、例えばパターンマッチングにおける特徴量の算出など、様々な用途に容易に応用することも可能である。例えば、特徴量の算出例では、線形性の値が画像の特徴量として求められ、その線形性の値で表される特徴量に基づいてパターンマッチングを行うことができる。 Further, in the above-described embodiment, the noise reduction process is taken as an example, but the line region calculation process as described above can be easily applied to various applications such as calculation of a feature amount in pattern matching. Is. For example, in the calculation example of the characteristic amount, the linearity value is obtained as the characteristic amount of the image, and the pattern matching can be performed based on the characteristic amount represented by the linearity value.
また、前述の実施形態では、線領域を判定する例を挙げたが、例えば前述した線領域と背景領域などの領域の設定を変更すれば、例えばエッジの判定、平坦領域の判定などにも適用可能である。例えば、エッジの判定では、画像に対して第1の領域と第2の領域の二つを設定し、それら第1、第2の領域について前述のような積分値の平均値を求め、それら第1、第2の領域の差(比率)が大きければ、エッジであると判定可能である。また例えば、平坦領域については、第1、第2の領域の差(比率)が殆どなければ、平坦領域であると判定可能となる。 Further, in the above-described embodiment, an example in which the line area is determined has been described, but if the settings of the areas such as the line area and the background area described above are changed, the present invention is also applied to edge determination, flat area determination, and the like. It is possible. For example, in edge determination, two regions, a first region and a second region, are set for an image, the average value of the integrated values as described above is calculated for the first and second regions, and the If the difference (ratio) between the first and second areas is large, it can be determined that the area is an edge. Further, for example, with respect to the flat area, if there is almost no difference (ratio) between the first and second areas, it can be determined as the flat area.
さらに、前述した実施形態のような線領域の判定、前述したエッジの判定、平坦領域の判定などをそれぞれ行い、それら複数の判定結果に応じて、後段でそれぞれ異なる処理を行うような画像処理も可能となる。 Furthermore, image processing such as performing the line area determination, the edge determination, the flat area determination, and the like as in the above-described embodiment, and performing different processing in each subsequent stage according to the plurality of determination results is also possible. It will be possible.
また、前述した線領域の判定は、例えば入力画像を生成する撮像デバイスの撮像面上のキズ領域等(塵等による塵領域も含む)の検出にも適用可能である。そして、線領域の判定に基づいてキズ領域等を検出した場合、後段の処理では、その検出されたキズ領域に対して所定の注意喚起画像(例えばキズ領域を囲む丸印アイコン画像など)を入力画像に重畳表示させるようなことを行う。また、この例の場合、線形性の値は、キズ領域である可能性があるかどうかを表す値として用いることができ、例えばその線形性の値に応じて、所定の注意喚起画像の表示形態を変更することも可能となる。一例として、線形性の値が大きければキズである可能性が高いとして注意喚起画像を赤色表示にするような表示形態例が考えられる。 Further, the above-described determination of the line area can be applied to, for example, detection of a scratch area or the like (including a dust area due to dust or the like) on the image pickup surface of the image pickup device that generates the input image. Then, when a flaw area or the like is detected based on the determination of the line area, a predetermined attention image (for example, a circle icon image surrounding the flaw area or the like) is input to the detected flaw area in the subsequent process. Something like superimposing it on the image. In addition, in the case of this example, the linearity value can be used as a value indicating whether or not there is a possibility of being a scratched area, and for example, according to the linearity value, the display form of a predetermined attention image is displayed. It is also possible to change. As an example, a display form example is conceivable in which the attention image is displayed in red when the linearity value is large and the possibility of a flaw is high.
前述の実施形態では、全ての画素が注目画素になされる例を挙げたが、注目画素は、例えば所定の間隔ごとの画素であってもよい。このように、注目画素を所定の間隔ごとの画素にした場合、間隔を空けて線判定が行われることになって、線判定の実行時間の短縮が可能になり、また必要十分な検出精度を得ることも可能になるため、実行時間と検出精度のバランスをとることができる。 In the above-described embodiment, the example in which all the pixels are the target pixels has been described, but the target pixels may be pixels at predetermined intervals, for example. In this way, when the target pixel is a pixel at every predetermined interval, line determination is performed at intervals, which makes it possible to shorten the line determination execution time, and also to achieve necessary and sufficient detection accuracy. Since it is also possible to obtain it, the execution time and the detection accuracy can be balanced.
その他、前述の実施形態では、二次元画像を扱ったが、三次元画像の画像処理も可能である。この場合、三次元画像についてそれぞれ回転した三次元画像を生成して、その三次元画像について前述のような領域設定を行って、例えば線領域やエッジ、平坦領域等の判定を行えばよい。 In addition, although the two-dimensional image is handled in the above-described embodiment, image processing of a three-dimensional image is also possible. In this case, it is sufficient to generate a rotated three-dimensional image for each three-dimensional image, set the region as described above for the three-dimensional image, and determine, for example, a line region, an edge, a flat region, or the like.
<その他の実施形態>
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
<Other embodiments>
The present invention supplies a program that implements one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in a computer of the system or apparatus read and execute the program. It can also be realized by the processing. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.
上述の実施形態は、何れも本発明を実施するにあたっての具体化の例を示したものに過ぎず、これらによって本発明の技術的範囲が限定的に解釈されてはならないものである。即ち、本発明は、その技術思想、又はその主要な特徴から逸脱することなく、様々な形で実施することができる。 The above-described embodiments are merely examples of specific embodiments for carrying out the present invention, and the technical scope of the present invention should not be limitedly interpreted by these. That is, the present invention can be implemented in various forms without departing from the technical idea or the main features thereof.
100,120 画像処理装置、103,130 線領域決定部、104 線領域処理部、105B〜105D,105 画像回転部、106A〜106D,106 積分画像生成部、107A〜107D,107 線形性算出部、108 線形性最大領域選択部、109 線領域平滑化部 100, 120 image processing device, 103, 130 line area determination unit, 104 line area processing unit, 105B to 105D, 105 image rotation unit, 106A to 106D, 106 integral image generation unit, 107A to 107D, 107 linearity calculation unit, 108 linearity maximum region selection unit, 109 line region smoothing unit
Claims (17)
前記入力画像の各画素値を積分した積分画像と前記回転画像の各画素値を積分した積分画像とを生成する生成手段と、
前記入力画像の注目画素の近傍領域に対応する前記積分画像の領域から算出される積分値に基づいて、線領域を特定する特定手段と、
を有することを特徴とする画像処理装置。 Rotating means for generating a rotated image by rotating the input image;
Generating means for generating an integral image obtained by integrating each pixel value of the input image and an integral image obtained by integrating each pixel value of the rotated image;
Specifying means for specifying a line region based on an integral value calculated from a region of the integral image corresponding to a region near the pixel of interest of the input image;
An image processing apparatus comprising:
前記入力画像の注目画素の近傍領域に対応する前記積分画像の領域として、前記積分画像の中に第1の領域と第2の領域とにより形成される判定領域を設定して、前記第1の領域の積分値と前記第2の領域の積分値とに基づいて、前記線領域の形状性である線形状性を表す値を算出し、
前記算出された線形状性を表す値に基づいて、前記入力画像の中で線領域を特定することを特徴とする請求項1に記載の画像処理装置。 The identifying means is
As a region of the integral image corresponding to a region near the pixel of interest in the input image, a determination region formed by a first region and a second region is set in the integral image, and the first region is set. Calculating a value representing the linear shape characteristic of the linear area based on the integral value of the area and the integral value of the second area,
The image processing apparatus according to claim 1, wherein a line region is specified in the input image based on the calculated value representing the line shape property.
前記入力画像の各画素値を積分した積分画像と前記回転画像の各画素値を積分した積分画像とを生成する生成手段と、
前記入力画像の中で線領域を特定する特定手段と、を有し
前記特定手段は、
前記入力画像の注目画素に対応させて、前記積分画像の中に第1の領域と第2の領域とにより形成される判定領域を設定し、前記第1の領域の積分値と前記第2の領域の積分値とに基づいて、前記線領域の形状性である線形状性を表す値を算出し、
前記入力画像の注目画素に対応させて前記算出された線形状性を表す値に基づいて、前記入力画像の中で線領域を特定することを特徴とする画像処理装置。 Rotating means for generating a rotated image by rotating the input image;
Generating means for generating an integral image obtained by integrating each pixel value of the input image and an integral image obtained by integrating each pixel value of the rotated image;
Specifying means for specifying a line area in the input image, and the specifying means,
In correspondence to the pixel of interest of the input image, and sets a determination area formed by the first and second regions in said integral image, the first area integral value and the second of Based on the integrated value of the area, calculate a value representing the linear shape that is the shape of the line region ,
An image processing apparatus, characterized in that a line region is specified in the input image based on a value representing the calculated line shape property corresponding to a pixel of interest of the input image.
前記生成手段は、前記回転画像ごとに前記積分画像を生成し、
前記特定手段は、
前記積分画像ごとに前記入力画像の注目画素に対応させて前記判定領域を設定して、前記線形状性を表す値を算出し、
前記積分画像ごとに前記入力画像の注目画素に対応させて前記算出された、複数の前記線形状性を表す値に基づいて、前記入力画像の中で前記線領域を特定することを特徴とする請求項2又は3に記載の画像処理装置。 The rotation means generates a plurality of rotation images obtained by rotating the input image at different rotation angles,
The generating unit generates the integral image for each of the rotation images,
The identifying means is
Wherein by setting the determination region in correspondence to the pixel of interest of the input image for each of the integral image, calculates a value representative of the line shape of,
It is characterized in that the line region is specified in the input image based on a plurality of values representing the line shape characteristics calculated in association with the target pixel of the input image for each of the integrated images. The image processing device according to claim 2.
前記生成手段は、前記回転画像ごとに並列に前記積分画像を生成し、
前記特定手段は、
前記並列に生成された前記積分画像ごとに、並列に、前記入力画像の注目画素に対応した前記判定領域を設定して、前記入力画像の注目画素に対応した前記線形状性を表す値を算出し、
前記並列に算出された複数の前記線形状性を表す値に基づいて、前記入力画像の中で前記線領域を特定することを特徴とする請求項4に記載の画像処理装置。 The rotating means generates the plurality of rotated images in parallel,
The generation unit generates the integrated image in parallel for each of the rotation images,
The identifying means is
For each of the integrated images generated in parallel, the determination region corresponding to the target pixel of the input image is set in parallel, and the value representing the linear shape property corresponding to the target pixel of the input image is calculated. Then
The image processing apparatus according to claim 4, wherein the line region is specified in the input image based on a plurality of values representing the line shape characteristics calculated in parallel.
前記生成手段は、前記回転画像の生成がなされるごとに前記積分画像を逐次生成し、
前記特定手段は、
前記積分画像の生成がなされるごとに、前記入力画像の注目画素に対応した前記線形状性を表す値を逐次算出し、
前記逐次算出された複数の前記線形状性を表す値に基づいて、前記入力画像の中で前記線領域を特定することを特徴とする請求項4に記載の画像処理装置。 The rotation means generates the plurality of rotation images by sequentially changing and rotating the rotation angle with respect to the input image,
The generation unit sequentially generates the integral image every time the rotation image is generated,
The identifying means is
Wherein each time the generation of the integral image is made, and sequentially calculates a value representative of the line shape of which corresponds to the pixel of interest of the input image,
The image processing apparatus according to claim 4, wherein the line region is specified in the input image based on the values of the plurality of line shapes that are sequentially calculated.
前記第1の領域の積分値の平均値と前記第2の領域の積分値の平均値との比の値を、前記入力画像の注目画素に対する前記線形状性を表す値として算出し、
前記算出された前記複数の線形状性を表す値が最大の値となった判定領域に基づいて、前記入力画像の中で前記線領域を特定することを特徴とする請求項4乃至6の何れか1項に記載の画像処理装置。 The identifying means is
The value of the ratio of the average value of the integrated value of the first region average value and the second region of the integral value of, calculated as a value representing the line shape with respect to the pixel of interest of the input image,
7. The line area is specified in the input image based on a determination area in which the calculated values representing the plurality of line shape characteristics have a maximum value. The image processing device according to item 1.
前記線領域を前記第1の領域とし、前記線領域以外の背景領域を前記第2の領域とした前記判定領域を設定し、
前記算出された前記複数の線形状性を表す値が最大の値となった判定領域に基づいて、前記入力画像の中で前記線領域を特定することを特徴とする請求項7乃至9の何れか1項に記載の画像処理装置。 The identifying means is
The line area is set to the first area, and the determination area in which the background area other than the line area is set to the second area is set,
10. The line area is specified in the input image based on a determination area in which the calculated values representing the plurality of line shape characteristics have the maximum values. The image processing device according to item 1.
前記平滑手段は、前記入力画像の注目画素の座標情報と前記回転画像の回転角度の情報とに基づいて、前記入力画像の中の前記線領域を識別して前記平滑化と前記更新を行うことを特徴とする請求項13に記載の画像処理装置。 The specifying means outputs, as the information indicating the specified line area, at least coordinate information of a pixel of interest of the input image and rotation angle information of the rotation image to the smoothing means,
The smoothing unit identifies the line region in the input image based on the coordinate information of the pixel of interest of the input image and the rotation angle information of the rotated image to perform the smoothing and the updating. The image processing apparatus according to claim 13, wherein:
前記平滑手段は、前記線形状性を表す値に応じて、前記平滑化の強さを変更することを特徴とする請求項14に記載の画像処理装置。 The specifying means further outputs, as the information indicating the specified line area, a value indicating a linear shape characteristic of the line area to the smoothing means,
It said smoothing means, in accordance with the value representing the line shape of the image processing apparatus according to claim 14, characterized in that to vary the strength of the smoothing.
入力画像を回転させて回転画像を生成し、
前記入力画像の各画素値を積分した積分画像と前記回転画像の各画素値を積分した積分画像とを生成し、
前記入力画像の注目画素の近傍領域に対応する前記積分画像の領域から算出される積分値に基づいて、前記線領域を特定する
ことを特徴とする画像処理方法。 In an image processing method executed by an image processing apparatus for detecting a line area having line shape from an input image,
Rotate the input image to generate a rotated image,
Generate an integral image that integrates each pixel value of the input image and an integral image that integrates each pixel value of the rotated image,
An image processing method, characterized in that the line region is specified based on an integral value calculated from a region of the integral image corresponding to a region near a pixel of interest of the input image.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016044662A JP6700873B2 (en) | 2016-03-08 | 2016-03-08 | Image processing device, image processing method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016044662A JP6700873B2 (en) | 2016-03-08 | 2016-03-08 | Image processing device, image processing method, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2017162089A JP2017162089A (en) | 2017-09-14 |
JP6700873B2 true JP6700873B2 (en) | 2020-05-27 |
Family
ID=59857099
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2016044662A Expired - Fee Related JP6700873B2 (en) | 2016-03-08 | 2016-03-08 | Image processing device, image processing method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6700873B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023113466A1 (en) * | 2021-12-14 | 2023-06-22 | 주식회사 모빌린트 | Image processing device and method for integral image processing, and recording medium |
-
2016
- 2016-03-08 JP JP2016044662A patent/JP6700873B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2017162089A (en) | 2017-09-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4727720B2 (en) | Image processing method and image processing apparatus | |
JP6016061B2 (en) | Image generation apparatus, image display apparatus, image generation method, and image generation program | |
JP5182229B2 (en) | Image processing apparatus, image processing method, and program | |
JP5295431B2 (en) | Image processing device | |
JP2008090601A (en) | Image processing apparatus, control method of image processing apparatus, control program of image processing apparatus | |
JP5603798B2 (en) | Defect detection apparatus, defect detection method, and computer program | |
JP2013005258A (en) | Blur correction apparatus, blur correction method, and business form | |
JP6332951B2 (en) | Image processing apparatus, image processing method, and program | |
US9689668B2 (en) | Image processing apparatus and image processing method | |
CN110569845A (en) | test paper image correction method and related device | |
EP2536123B1 (en) | Image processing method and image processing apparatus | |
JP5987114B2 (en) | High resolution image generation apparatus, high resolution image generation method, and high resolution image generation program | |
JP6700873B2 (en) | Image processing device, image processing method, and program | |
JP3812770B2 (en) | Camera shake parameter detection method and information recording medium | |
JP6485322B2 (en) | Image processing apparatus and image processing method | |
JP6532328B2 (en) | Image processing apparatus, control method therefor, and control program | |
JP6579816B2 (en) | Image processing apparatus, image processing method, and program | |
JP6991700B2 (en) | Information processing equipment, information processing method, program | |
CN111801709B (en) | Circular feature detection method, processing system and device with storage function | |
CN112150532A (en) | Image processing method and device, electronic equipment and computer readable medium | |
JP4468019B2 (en) | Image processing device | |
JP2022095121A (en) | Image processing device, image processing method and program | |
JP5636966B2 (en) | Error detection apparatus and error detection program | |
JP4351090B2 (en) | Image processing apparatus and image processing method | |
JP4504861B2 (en) | Image processing method and image processing apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20190227 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20200110 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20200121 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20200306 |
|
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: 20200317 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20200501 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 6700873 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
LAPS | Cancellation because of no payment of annual fees |