JP4346620B2 - Image processing apparatus, image processing method, and image processing program - Google Patents
Image processing apparatus, image processing method, and image processing program Download PDFInfo
- Publication number
- JP4346620B2 JP4346620B2 JP2006075310A JP2006075310A JP4346620B2 JP 4346620 B2 JP4346620 B2 JP 4346620B2 JP 2006075310 A JP2006075310 A JP 2006075310A JP 2006075310 A JP2006075310 A JP 2006075310A JP 4346620 B2 JP4346620 B2 JP 4346620B2
- Authority
- JP
- Japan
- Prior art keywords
- background
- brightness
- lightness
- unit
- candidate
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000012545 processing Methods 0.000 title claims description 49
- 238000003672 processing method Methods 0.000 title claims description 7
- 238000004364 calculation method Methods 0.000 claims description 38
- 238000001514 detection method Methods 0.000 claims description 34
- 230000006870 function Effects 0.000 claims description 20
- 239000013589 supplement Substances 0.000 claims description 13
- 230000015654 memory Effects 0.000 claims description 9
- 230000004927 fusion Effects 0.000 claims description 4
- 230000001502 supplementing effect Effects 0.000 claims description 4
- 238000000034 method Methods 0.000 description 52
- 238000010586 diagram Methods 0.000 description 7
- 238000011156 evaluation Methods 0.000 description 6
- 238000003384 imaging method Methods 0.000 description 4
- 239000003086 colorant Substances 0.000 description 3
- 238000012804 iterative process Methods 0.000 description 3
- 230000009469 supplementation Effects 0.000 description 3
- 238000012805 post-processing Methods 0.000 description 2
- 238000010187 selection method Methods 0.000 description 2
- 230000001174 ascending effect Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000010191 image analysis Methods 0.000 description 1
- 238000007500 overflow downdraw method Methods 0.000 description 1
- 230000003252 repetitive effect Effects 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
- 230000000153 supplemental effect Effects 0.000 description 1
- -1 that is Substances 0.000 description 1
Images
Landscapes
- Image Processing (AREA)
- Facsimile Image Signal Circuits (AREA)
Description
本発明は、例えば文書画像等の画像を二値化する画像処理装置、画像処理方法および画像処理プログラムに関する。 The present invention relates to an image processing apparatus, an image processing method, and an image processing program for binarizing an image such as a document image.
画像の二値化方法としては、二値化対象画像の撮影・撮像対象や撮影条件に合わせて様々な方法が提案されており、スキャナー等の撮像装置で撮像した文書画像や図面については、大津の方法等の単一しきい値法が有効であることが広く知られている(非特許文献1参照)。 Various image binarization methods have been proposed in accordance with the binarization target image shooting / imaging target and shooting conditions. For document images and drawings captured by an imaging device such as a scanner, Otsu It is widely known that the single threshold method such as the above method is effective (see Non-Patent Document 1).
これに対して、デジタルカメラ等の撮像装置で撮影した画像で、照明条件や感度が画像内で一定していない場合には、単一のしきい値での二値化が妥当でないため、画像内の位置により二値化しきい値を変化させる動的しきい値法が用いられる。 On the other hand, in an image taken with an imaging device such as a digital camera, if the lighting conditions and sensitivity are not constant in the image, binarization with a single threshold is not appropriate. A dynamic threshold method is used in which the binarization threshold value is changed according to the position within.
動的しきい値法としては、様々な方法が提案されており、代表的な方法としては、部分画像分割法が知られている(非特許文献2参照)。 Various methods have been proposed as the dynamic threshold method, and a partial image division method is known as a typical method (see Non-Patent Document 2).
部分画像分割法では、画像を小領域に分割し、分割した領域ごとに大津の方法等でしきい値を求め、求めたしきい値を各小領域の中心点でのしきい値として採用する。そして、中心点でのしきい値を滑らかに補完して各画素での二値化しきい値を決定する。
しかしながら、従来の動的しきい値法の多くは、図と地に対応する二色の画像を対象としたものであり、小領域内でもそれが成立するという前提の上に成り立っている。 However, many of the conventional dynamic threshold methods are intended for two-color images corresponding to the figure and the ground, and are based on the premise that this is true even in a small area.
また、文書等の二色の画像であってもデジタルカメラでの撮像の際に影がかかって少領域内に図、地、影の三色が映り込むこともあり、そのような領域については二値化処理で二値化の誤りが起こることがあった。 In addition, even if the image is a two-color image such as a document, a shadow is applied when the image is taken with a digital camera, and the three colors of figure, ground, and shadow may be reflected in a small area. Binarization errors sometimes occurred in the binarization process.
また、内部が全て図または地のどちらか一方であるような小領域については、二値化処理の際に誤りが生じないよう、例えば小領域の大きさの調整など、処理対象に依存した工夫が必要であった。 In addition, for small areas where the interior is either the figure or the ground, there is a device that depends on the processing target, for example, adjustment of the size of the small area, so that no error occurs during the binarization process. Was necessary.
本発明はこのような課題を解決するためになされたもので、影がかかっている画像や広い図の領域または広い地の領域を含む画像について安定した二値化処理を行うことのできる画像処理装置、画像処理方法および画像処理プログラムを提供することを目的としている。 The present invention has been made to solve such a problem, and is capable of performing stable binarization processing on a shadowed image, an image including a wide figure region, or a wide ground region. It is an object to provide an apparatus, an image processing method, and an image processing program.
上記した目的を達成するために、本発明の画像処理装置は、原画像を複数の部分領域に分割し、前記部分領域の各々について明度の代表値を検出して前記部分領域における背景の明度の複数の候補とする背景明度候補検出部と、前記背景明度候補検出部で検出された前記背景の明度の複数の候補を前記部分領域毎に一つずつ選択し、選択した候補の組み合わせを基に前記原画像の背景の明度の分布を求める背景明度分布推定部と、前記背景明度分布推定部により求められた背景の明度の分布から前記原画像の二値化処理のためのしきい値を算出するしきい値算出部と、前記しきい値算出部により算出されたしきい値により前記原画像を二値化する二値化部とを具備したことを特徴とする。 To achieve the above object, the image processing apparatus of the present invention, the original image is divided into multiple partial regions, the brightness of the background in the partial region each said partial area by detecting a representative value of brightness for the A plurality of candidates for the background lightness candidate detection unit and a plurality of background lightness candidates detected by the background lightness candidate detection unit, one for each partial region, and based on the combination of the selected candidates wherein the background brightness distribution estimating unit for determining the distribution of the brightness of the background of the original image, the threshold for the binarization processing of the background lightness distribution the original image from the distribution of the brightness of calculated et background by the estimation unit in And a binarization unit that binarizes the original image using the threshold calculated by the threshold calculation unit.
本発明の画像処理プログラムは、コンピュータに画像処理を実行させる画像処理プログラムであって、前記コンピュータを、原画像を複数の部分領域に分割し、前記部分領域の各々について明度の代表値を検出して前記部分領域における背景の明度の複数の候補とする背景明度候補検出部と、前記背景明度候補検出部で検出された前記背景の明度の複数の候補を前記部分領域毎に一つずつ選択し、選択した候補の組み合わせを基に前記原画像の背景の明度の分布を求める背景明度分布推定部と、前記背景明度分布推定部により求められた背景の明度の分布から前記原画像の二値化処理のためのしきい値を算出するしきい値算出部と、前記しきい値算出部により算出されたしきい値により前記原画像を二値化する二値化部として機能させることを特徴とする。 The image processing program of the present invention is an image processing program for executing the image processing in a computer, the computer, the original image is divided into several partial areas, detecting a representative value of brightness for each of the partial region And selecting a background lightness candidate detection unit as a plurality of background lightness candidates in the partial region and a plurality of background lightness candidates detected by the background lightness candidate detection unit one by one for each partial region and, of the original image from the and the background brightness distribution estimating unit for determining the distribution of the brightness of the background of the original image, the background brightness distribution estimating unit by seeking et lightness distribution of the background based on the combination of the selected candidate two A threshold value calculation unit that calculates a threshold value for the binarization process; and a binarization unit that binarizes the original image using the threshold value calculated by the threshold value calculation unit. And features.
本発明の画像処理方法は、画像処理装置が画像処理を行う画像処理方法であって、前記画像処理装置が、原画像を複数の部分領域に分割し、前記部分領域の各々について明度の代表値を検出して前記部分領域における背景の明度の複数の候補とし、前記背景の明度の複数の候補を前記部分領域毎に一つずつ選択し、選択した候補の組み合わせを基に前記原画像の背景の明度の分布を求め、求めた背景の明度の分布から前記原画像の二値化処理のためのしきい値を算出し、算出したしきい値により前記原画像を二値化することを特徴とする。 The image processing method of the present invention is an image processing method by the image processing apparatus performs the image processing, the image processing apparatus divides the original image into multiple subregions, each representative of the brightness for the partial region Detecting a value as a plurality of candidates for background brightness in the partial area, selecting a plurality of background brightness candidates for each partial area, and based on the combination of the selected candidates , Obtaining a distribution of lightness of the background, calculating a threshold value for binarization processing of the original image from the calculated distribution of lightness of the background , and binarizing the original image by the calculated threshold value. Features.
本発明では、原画像を複数の部分領域に分割し、分割した部分領域毎に原画像の背景の明度として用いる明度値の候補を検出しその候補を用いて原画像の背景明度分布を推定する。つまり原画像の画像領域全体での変動が極力小さくなるように背景明度を推定し、推定した背景明度を基に二値化しきい値を算出するので、影等による局所的な変動に対して安定した二値化処理を行うことができる。 In the present invention, the original image is divided into a plurality of partial areas, a lightness value candidate used as the lightness of the background of the original image is detected for each divided partial area, and the background lightness distribution of the original image is estimated using the candidates. . In other words, the background brightness is estimated so that the fluctuation in the entire image area of the original image is minimized, and the binarization threshold value is calculated based on the estimated background brightness, so it is stable against local fluctuations due to shadows, etc. Binarization processing can be performed.
以上説明したように本発明によれば、影がかかっている画像や広い図の領域または広い地の領域を含む画像について安定した二値化処理を行うことができる。 As described above, according to the present invention, it is possible to perform stable binarization processing on a shadowed image, an image including a wide figure region, or an image including a wide ground region.
以下、本発明の実施の形態を図面を参照して詳細に説明する。図1は本発明の一つの実施形態に係る画像処理装置の構成を示すブロック図、図2乃至図5は原画像の分割例を示す図である。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. FIG. 1 is a block diagram illustrating a configuration of an image processing apparatus according to an embodiment of the present invention, and FIGS. 2 to 5 are diagrams illustrating exemplary divisions of an original image.
図1に示すように、この画像処理装置は、デジタルカメラ1などの撮像装置とこのデジタルカメラ1を接続したコンピュータ2(以下PC2と称す)とから構成されている。
As shown in FIG. 1, the image processing apparatus includes an imaging apparatus such as a
この画像処理装置では、デジタルカメラ1は、文字認識対象の帳票の表面を撮像して画像を読み取り取得する画像取得手段として機能する。帳票には、所定の情報として文字などが記入されているものとし、デジタルカメラ1により得られる帳票の画像は、白色と黒色とその他の色、つまり中間色が混在しグレースケールとなる。
In this image processing apparatus, the
以下、「記入」とは、文字などが手書きされた場合と、印刷された場合の双方の意味を含む。 Hereinafter, “entry” includes both the meanings when characters and the like are handwritten and printed.
画像情報は、デジタルカメラ1に限らず、スキャナーなどで読み取ったものでも良く、文書ファイルからの変換によって取得しても良い。また他のコンピュータに蓄積されている画像情報をLANなどのネットワークを通じてPC2が取得しても良い。
The image information is not limited to the
PC2の機能は、CPU、RAM、ROMなどのメモリ、ハードディスク装置などの補助記憶装置、キーボードなどの入力装置およびマウスなどの指示装置、モニタなどの表示装置、デジタルカメラ1とのインターフェースボードなどのハードウェアと、オペレーティングシステム(以下OSと称す)および画像処理ソフトウェアなどのプログラムとが協動して実現される。
The functions of the PC 2 include CPU, RAM, ROM and other memories, an auxiliary storage device such as a hard disk device, an input device such as a keyboard and a pointing device such as a mouse, a display device such as a monitor, and a hardware such as an interface board with the
PC2は、記憶部21、背景明度候補検出部22、背景明度候補補足部25、背景明度分布推定部26、しきい値算出部29および二値化部33を備える。
The PC 2 includes a
背景明度候補検出部22は、ヒストグラム補正部23およびフレーム間ヒストグラム加算部24を有している。
The background lightness candidate detection unit 22 includes a
ヒストグラム補正部23は、部分領域の近傍のヒストグラムを当該部分領域のヒストグラムに加算したヒストグラムを生成し、生成したヒストグラムを当該フレームのヒストグラムの代わりに用いる。
The
フレーム間ヒストグラム加算部24は、原画像が動画像の1フレームである場合に、背景明度候補検出を行うことで求められた、当該フレームより前のフレームにおける明度ヒストグラムを当該フレームのヒストグラムに加算してヒストグラムを生成し、生成したヒストグラムを当該フレームのヒストグラムの代わりに用いる。
When the original image is one frame of a moving image, the inter-frame
なお、これらヒストグラム補正部23およびフレーム間ヒストグラム加算部24は、必須の構成ではない。またこれらをまとめて一つとしても良い。
The
背景明度候補検出部22は、予め決められた手順に従い原画像を部分領域に分割し、各部分領域毎に原画像の背景の明度値の候補を検出する。 The background lightness candidate detection unit 22 divides the original image into partial areas according to a predetermined procedure, and detects background lightness value candidates of the original image for each partial area.
背景明度候補補足部25は、背景明度候補検出部22により検出された原画像の背景の明度値の候補を所定の計算式(式1)などにより補正(補足)し、その補正(補足)した値を背景明度候補として記憶部21へ記憶する。背景明度候補補足部25は、原画像が動画像の1フレームである場合に、部分領域の背景明度候補を当該フレームより前のフレームにおける背景明度候補の集合で補足する。
The background lightness
背景明度分布推定部26は、記憶部21に記憶された背景の明度値の候補を読み出し、その候補の中から評価関数を用いて候補を選定する処理を行い(図14参照)、選定した候補を用いて原画像の背景の明度分布を推定する。つまり背景明度分布推定部26は、候補の中から選定した明度値を用いて原画像の背景の明度分布を計算する。
The background lightness distribution estimation unit 26 reads the background lightness value candidates stored in the
背景明度分布推定部26は、背景明度分布候補列挙部27および背景明度分布選択部28を有している。
The background lightness distribution estimation unit 26 includes a background lightness distribution
背景明度分布候補列挙部27は、部分領域毎に原画像の背景の明度値として用いる候補を記憶部21またはバッファなどのメモリに記憶し、個々の部分領域を初期状態とした部分領域のグループを反復的に融合して一つのグループを生成し、生成したグループの融合のたびにメモリの該当候補を更新し、融合完了時にメモリに記憶されていた部分領域毎の候補を基に背景明度分布の候補を列挙する。
The background lightness distribution
背景明度分布選択部28は、予め定められた手順で候補番号Sを定め、画像全体で当該番号の候補を背景明度推定結果として出力、つまり記憶部21へ記憶する。
The background lightness
しきい値算出部29は、背景明度分布推定部26により推定(計算)された背景明度分布(記憶部21の背景明度推定結果)を基に、原画像を二値化するための二値化しきい値を算出する。 The threshold calculation unit 29 binarizes the original image based on the background lightness distribution estimated (calculated) by the background lightness distribution estimation unit 26 (background lightness estimation result in the storage unit 21). Calculate the threshold.
しきい値算出部29は、明度補正部30、補正前しきい値算出部31、しきい値逆補正部32を有している。
The threshold calculation unit 29 includes a
明度補正部30は、記憶部21より読み出した背景明度分布を所定の計算式((式29)または(式30)など)に代入して原画像を補正、つまり原画像のシェーディングによる補正を行うことで補正画像を生成する。
The
補正前しきい値算出部31は、明度補正部30により生成された補正画像に対して所定の計算式(大津の方法など)を用いて補正前しきい値を算出する。
The pre-correction threshold
しきい値逆補正部32は、補正前しきい値算出部31により算出された補正前しきい値を所定の計算式に代入して二値化しきい値を算出する。
The threshold
二値化部33は、しきい値算出部29により算出されたしきい値(記憶部21の二値化しきい値)を用いて、記憶部21より読み出した原画像を二値化する。
The
記憶部21は、メモリ、ハードディスク装置などにより実現される。記憶部21には、以下に説明する各式および選択条件(評価関数など)が記憶されている。記憶部21には、デジタルカメラ1から入力された画像データが記憶される。記憶部21は、各部が画像処理を行う際の画像データおよび各部が式を用いて求めたデータの一時記憶領域(作業領域)として機能する。
The
この画像処理装置は、コンピュータに本発明を実現するソフトウェアを組み込むことによって構成できるため、以下ではそのような構成を仮定して説明を行う。但し、本発明は各部を専用ハードウェアや、その集合体、または分散処理用のコンピュータネットワークとしても構成することもでき、ここで挙げた構成に関わらずどのようなもので実装しても良い。 Since this image processing apparatus can be configured by incorporating software that implements the present invention into a computer, the following description will be made assuming such a configuration. However, in the present invention, each unit can be configured as dedicated hardware, an aggregate thereof, or a computer network for distributed processing, and may be implemented with any configuration regardless of the configuration listed here.
また、上記実施形態で示す構成は一例にしか過ぎず、実施形態の各構成は、すべてが必須の構成とは限らず、その中からいくつかの構成を選択して利用しても良く、また他の構成を追加しても良い。 In addition, the configuration shown in the above embodiment is only an example, and each configuration in the embodiment is not necessarily an essential configuration, and some configurations may be selected and used. Other configurations may be added.
この画像処理装置では、原画像上での画素の横座標をx、縦座標をyとおき、座標(x,y)の原画像上での明度をf(x,y)、二値画像上での画素値をo(x,y)と定める。 In this image processing apparatus, the abscissa of a pixel on the original image is x, the ordinate is y, the brightness of the coordinate (x, y) on the original image is f (x, y), and the binary image The pixel value at is defined as o (x, y).
背景明度候補検出部22では、原画像を予め定められた手順、つまり下記いくつかの方法で分割し、分割したそれぞれの部分領域における背景明度候補を検出する。 The background lightness candidate detection unit 22 divides the original image by a predetermined procedure, that is, the following several methods, and detects background lightness candidates in the divided partial areas.
背景明度候補検出部22は、図2に示すように、原画像を格子状に分割して部分領域を生成する。格子状に分割された部分領域の縦方向の位置をiで表し、横方向の位置をjで表し、縦方向の分割数をmで表し、横方向の分割数をnで表し、領域の位置を(i,j)で表し、領域の番号を、
背景明度候補検出部22が原画像を部分領域に分割する場合の、画像の分割方法は、上記以外に、例えば図3に示すように、原画像を横方向に分割しても良く、図4に示すように、原画像を縦方向に分割しても良い。さらに図5に示すように、原画像を不均一な形状の部分領域に分割しても良く、分割数が有限である限りいかなる分割方法で分割しても良い。 In the case where the background lightness candidate detection unit 22 divides the original image into partial regions, the image dividing method may be divided in the horizontal direction as shown in FIG. The original image may be divided in the vertical direction as shown in FIG. Further, as shown in FIG. 5, the original image may be divided into partial regions having a non-uniform shape, and may be divided by any division method as long as the number of divisions is limited.
背景明度候補検出部22は、背景明度候補を検出する場合、原画像を分割したそれぞれの部分領域について下記方法a,b,cのうちのいずれかの方法により明度ヒストグラムを生成し、生成した各部分領域毎の明度ヒストグラムから背景明度候補を検出する。 When detecting the background lightness candidate, the background lightness candidate detecting unit 22 generates a lightness histogram for each of the partial regions obtained by dividing the original image by any one of the following methods a, b, and c. A background lightness candidate is detected from the lightness histogram for each partial region.
図6は背景明度候補検出部22により生成される明度ヒストグラムの一例であり、この例では、ピーク毎の極値を背景明度候補p1,p2,p3,p4として検出する。この方法を方法aと称す。 FIG. 6 is an example of a brightness histogram generated by the background brightness candidate detection unit 22, and in this example, extreme values for each peak are detected as background brightness candidates p 1 , p 2 , p 3 , and p 4 . This method is referred to as method a.
つまり、この方法aの場合、背景明度候補検出部22は、原画像を分割した各部分領域について、明度ヒストグラムのピークにおける明度の極値を検出することで、原画像の背景の明度値を求めるための候補とする。 That is, in the case of method a, the background lightness candidate detection unit 22 obtains the lightness value of the background of the original image by detecting the extreme value of the lightness at the peak of the lightness histogram for each partial region obtained by dividing the original image. Candidate for.
この他、例えば背景明度候補は、原画像を分割した領域の各々について明度ヒストグラムを生成し、生成したヒストグラムの階級のうち度数で上位N階級までの階級の代表値として検出しても良い。但し、Nは予め定めた定数である。 In addition to this, for example, a background brightness candidate may be detected as a representative value of a class up to the upper N class in terms of frequency among the classes of the generated histogram by generating a brightness histogram for each of the regions obtained by dividing the original image. N is a predetermined constant.
図7は上位4階級までの階級の代表値を背景明度候補とした場合の背景明度候補検出例であり、この例では、背景明度候補p1,p2,p3,p4が検出されている。この方法を方法bと称す。 FIG. 7 is an example of background lightness candidate detection in the case where the representative values of the classes up to the upper 4 classes are used as background lightness candidates. In this example, background lightness candidates p 1 , p 2 , p 3 , and p 4 are detected. Yes. This method is referred to as method b.
また背景明度候補は、原画像を分割したそれぞれの部分領域について、明度の標本値に対してk-means法(既存の代表値算出方法)などを適用し、クラスタの代表値として求めても良い。この方法を方法cと称す。 The background lightness candidate may be obtained as a cluster representative value by applying a k-means method (existing representative value calculation method) or the like to the lightness sample value for each partial region obtained by dividing the original image. . This method is referred to as method c.
この他、背景明度候補の検出方法としては、背景明度の候補を検出できると期待できる方法ならば、いかなる方法を用いても良い。 In addition, as a method for detecting a background lightness candidate, any method may be used as long as it can be expected that a background lightness candidate can be detected.
上記方法a、方法bにおける明度ヒストグラムとしては、それぞれの部分領域において独立して求めたヒストグラムをそのまま用いても良く、以下に説明するヒストグラム補正部23により補正処理したヒストグラムを用いても良い。
As the brightness histogram in the method a and the method b, a histogram obtained independently in each partial region may be used as it is, or a histogram corrected by the
ここで、ヒストグラム補正部23により補正処理したヒストグラムを用いることについて説明する。
Here, the use of the histogram corrected by the
ヒストグラム補正部23は、注目分割領域の近傍のヒストグラムを注目分割領域のヒストグラムに加算する。補正前のヒストグラムの階級番号をl、分割領域(i,j)のヒストグラムをh(l;i,j)で、分割領域(i,j)の補正後のヒストグラムをh’(l;i,j)で表すと、ヒストグラム補正部23による処理は、下記(式1)で表される。
The
また、i+u<0、i+u≧m、j+v<0またはj+v≧nの場合は、
h(l;i+u,j+v)=0とする。
If i + u <0, i + u ≧ m, j + v <0 or j + v ≧ n,
It is assumed that h (l; i + u, j + v) = 0.
また、原画像が動画像の1フレームである場合、当該フレームより前のフレームにおける明度ヒストグラムを加算するフレーム間ヒストグラム加算部24による処理を施すこともできる。
Further, when the original image is one frame of the moving image, the processing by the inter-frame
フレームの番号をt、分割領域(i,j)のヒストグラムをh(l;i,j,t)で、分割領域(i,j)の補正後のヒストグラムをh’(l;i,j,t)で表すと、フレーム間ヒストグラム加算部24による処理は、下記(式2)で表される。
また、t−θが最初のフレーム番号より小さい場合はh’(l;i,j,t−θ)=0
とする。
If t−θ is smaller than the first frame number, h ′ (l; i, j, t−θ) = 0.
And
さらに、上記ヒストグラム補正部23による処理と上記フレーム間ヒストグラム加算部24による処理をまとめて下記(式3)でヒストグラムを補正しても良い。
背景明度候補検出部22で検出した背景明度候補は、そのまま用いても良く、以下に説明する背景明度候補補足部25により補正し、その補正値を用いても良い。
The background lightness candidate detected by the background lightness candidate detection unit 22 may be used as it is, or may be corrected by the background lightness
背景明度候補補足部25は、注目分割領域の背景明度候補を近傍の分割領域の背景明度候補で補足する。
The background lightness
分割領域(i,j)の補足前の背景明度候補数をN(i,j)で表し、背景明度候補の集合をP(i,j)={p1,…,pN(i,j)}で表し、補足後の背景明度候補の集合をP’(i,j)で表すと、背景明度候補補足部25による処理は、下記(式4)で表される。
The number of background lightness candidates before supplementation of the divided area (i, j) is represented by N (i, j), and a set of background lightness candidates is represented by P (i, j) = {p 1 ,..., P N (i, j ) expressed in}, to represent the set of background lightness candidate after supplemented with P '(i, j), treatment with the background brightness candidate
また、原画像が動画像の1フレームである場合、背景明度候補補足部25においては当該フレームより前のフレームにおける背景明度候補の集合で当該フレームの背景明度候補を補足しても良い。
When the original image is one frame of a moving image, the background brightness
フレームの番号tにおける分割領域(i,j)の補足前の背景明度候補数をN(i,j,t)で表し、背景明度候補の集合をP(i,j,t)={p1,…,pN(i,j,t)}で表し、補足後の背景明度候補の集合をP’(i,j,t)で表すと、背景明度候補補足部25による処理は、下記(式5)で表される。
The number of background lightness candidates before supplementation of the divided region (i, j) at frame number t is represented by N (i, j, t), and a set of background lightness candidates is P (i, j, t) = {p 1 ,..., P N (i, j, t) }, and a set of background lightness candidates after supplementation is represented by P ′ (i, j, t), the processing by the background lightness
背景明度候補補足部25の処理結果は、そのまま背景明度候補として用いても良いが、k−means法等で求めた代表値による置き換え等で減数してから用いても良い。
The processing result of the background lightness
背景明度分布推定部26では、背景明度候補検出部22により検出された背景明度候補を用いて背景明度分布を推定する。 The background lightness distribution estimation unit 26 estimates the background lightness distribution using the background lightness candidates detected by the background lightness candidate detection unit 22.
背景明度分布推定部26は、背景明度分布を推定するにあたり、画素毎に背景明度を推定する。なお画素の座標(x,y)における背景明度推定結果をb(x,y)とする。 The background brightness distribution estimation unit 26 estimates the background brightness for each pixel when estimating the background brightness distribution. The background brightness estimation result at the pixel coordinates (x, y) is b (x, y).
背景明度分布推定部26は、画素毎の背景明度推定結果b(x,y)を、以下の2段階の処理により求める。 The background lightness distribution estimation unit 26 obtains a background lightness estimation result b (x, y) for each pixel by the following two steps.
1)背景明度候補検出部22で検出された背景明度候補を基に、後述する背景明度分布候補列挙部27で、b(x,y)の候補c(x,y;1),c(x,y;2),…c(x,y;γ)を求める。ただし、γは背景明度分布の候補数である。 1) Based on the background lightness candidates detected by the background lightness candidate detection unit 22, a background lightness distribution candidate enumeration unit 27 (to be described later) uses b (x, y) candidates c (x, y; 1) and c (x , Y; 2),... C (x, y; γ). Where γ is the number of candidates for the background brightness distribution.
2)後述する背景明度分布選択部28で、候補番号Sを設定し、画像全体で当該番号の候補を背景明度推定結果とする。
2) A candidate number S is set by a background brightness
b(x,y)=c(x,y;S) …(式6) b (x, y) = c (x, y; S) (Formula 6)
背景明度分布候補列挙部27では、背景明度候補検出部22により分割された部分領域毎に背景明度の候補C(k;s)を生成し、それを当該領域内の画素の背景明度候補とする。
The background lightness distribution
c(x,y;s)=C(k(x,y);s) …(式7)
但し、sは候補番号、k(x,y)は座標(x,y)の画素を含む分割領域の番号とする。
c (x, y; s) = C (k (x, y); s) (Expression 7)
Here, s is a candidate number, and k (x, y) is a number of a divided region including a pixel at coordinates (x, y).
以下、図8のフローチャートを参照し、部分領域について「グループ」という概念を導入し、部分領域毎に背景明度の候補C(k;s)を列挙する計算手順(背景明度分布候補列挙部27の動作)について説明する。
Hereinafter, with reference to the flowchart of FIG. 8, the concept of “group” is introduced for a partial region, and a calculation procedure for enumerating background lightness candidates C (k; s) for each partial region (the background lightness distribution
グループは、一つ以上の部分領域の集合であり、初期状態では、各部分領域の中の一つの領域が1グループであり、分割領域毎に背景明度の候補C(k;s)の計算完了時には全部分領域が一つのグループを構成する。 A group is a set of one or more partial areas. In the initial state, one area in each partial area is one group, and calculation of the background brightness candidate C (k; s) is completed for each divided area. Sometimes all partial areas form one group.
背景明度分布候補列挙部27は、初期状態では、各部分領域の第s候補C(k;s)を、背景明度候補検出部22により当該領域において検出されたs番目の背景明度候補を用いて初期化する(図8のステップ101)。なおステップをSと省略する。
In the initial state, the background lightness distribution
記憶部21に記憶される部分領域毎の背景明度の候補C(k;s)は、以下の4段階の処理を反復することによって更新する。
The background lightness candidate C (k; s) for each partial region stored in the
各部分領域における背景明度の候補数は、グループG内で一定値ΓGである。q番目の反復ではRq個のグループGq,1,Gq,2,…,Gq,Rqが融合されて1個のグループとなる。反復処理は、全部分領域が1つのグループを構成するようになるまで繰り返す。 The number of background brightness candidates in each partial region is a constant value Γ G within the group G. In the q-th iteration, R q groups G q, 1 , G q, 2 ,..., G q, Rq are merged into one group. The iterative process is repeated until all the partial areas form one group.
1.各グループGq,1,Gq,2,…,Gq,Rqにおいて、1つずつ背景明度の候補番号を選択することによって定まる組合せ(s1,s2,…,sRq)を全て列挙する(S102)。
1. Each
2.各組合せ(s1,s2,…,sRq)と領域番号kについて、新背景明度候補D(k;s1,s2,…,sRq)を下記(式8)で定める。 2. For each combination (s 1 , s 2 ,..., S Rq ) and area number k, a new background brightness candidate D (k; s 1 , s 2 ,..., S Rq ) is defined by the following (formula 8).
背景明度分布候補列挙部27は、新背景明度候補D(k;s1,s2,…,sRq)を下記(式9)に適用してコスト関数E(k;s1,s2,…,sRq)を算出し、求める(S103)。
例えば図9に示すように、原画像に不均一な部分領域を6つ設けた場合、Ωは以下の集合となる。図中の番号は部分領域の番号を示す。
Ω={(1,2),(1,3),(1,4),(2,3),(2,5),(3,4),(3,5),(3,6),(4,6),(5,6) …(式10)
但し(式9)は、コスト関数E(k;s1,s2,…,sRq)の計算式の一例であり、コスト関数E(k;s1,s2,…,sRq)の計算式としては、背景明度候補C(k;s)の変動の大小を評価する式ならば、いかなる式を用いても良い。
For example, as shown in FIG. 9, when six non-uniform partial areas are provided in the original image, Ω is a set as follows. The numbers in the figure indicate the numbers of the partial areas.
Ω = {(1, 2), (1, 3), (1, 4), (2, 3), (2, 5), (3,4), (3, 5), (3, 6) , (4, 6), (5, 6) (Equation 10)
However (Equation 9), the
3.第1段階において列挙した組合せのうちから、第2段階で求めたコスト関数E(k;s1,s2,…,sRq)において下位ΓMAX個の組合せを選出する。 3. From the combinations listed in the first stage, the lower ΓMAX combinations are selected in the cost function E (k; s 1 , s 2 ,..., S Rq ) obtained in the second stage.
第1段階において、列挙した組合せがΓMAX個未満の場合は、全ての組合せを選出結果とする。選出した組合せの個数をZ個、組合せの番号をz、z番目にコスト関数E(k;s1,s2,…,sRq)が小さい組合せをζzとする(S104)。 In the first stage, when the number of listed combinations is less than ΓMAX, all combinations are selected. Assume that the number of selected combinations is Z, the combination number is z, and the z-th combination having the smallest cost function E (k; s 1 , s 2 ,..., S Rq ) is ζz (S104).
4.一定値ΓG=Zとして、Z個の候補を下記更新式(式11)で更新する(S105)。
このようにして背景明度分布候補列挙部27は、更新(反復処理)を繰り返し、全部分領域が一つのグループを構成しているか否かを判定し(S106)、全部分領域が一つのグループを構成している場合(S106の真)、処理を終了する。
In this way, the background lightness distribution
以上の反復処理の第3段階で、コスト関数E(k;s1,s2,…,sRq)で下位の候補を列挙することにより、背景明度分布候補列挙部27では、画像全体での背景明度分布の変動が小さくなるよう背景明度分布の候補が列挙される。
In the third stage of the above iterative process, the background brightness distribution
このようにして列挙された候補を用いることで背景明度分布推定部26では、明るさの変動が小さくなるように背景明度を推定できる。 By using the candidates listed in this way, the background brightness distribution estimation unit 26 can estimate the background brightness so that the variation in brightness is reduced.
各反復において融合するグループの個数Rqと組合せGq,1,Gq,2,…Gq,Rは、任意であり、上記反復処理の第1段階で列挙する組合せ(s1,s2,…,sRq)の数が許容可能な範囲内ならば、グループの個数Rqと組合せGq,1,Gq,2,…Gq,Rをどのように定めても良い。 The number R q of groups to be merged in each iteration and the combinations G q, 1 , G q, 2 ,... G q, R are arbitrary, and combinations (s 1 , s 2) listed in the first stage of the above iterative processing. , ..., if the range number is acceptable for s Rq), the number of groups R q and combining G q, 1, G q, 2, ... G q, may be determined how the R.
但し、ここでいう許容可能な範囲とは、本発明による画像処理を実施するにあたって必要となるハードウェア資源や計算時間が、利用可能な範囲内に収まる範囲のことである。 However, the allowable range here is a range in which hardware resources and calculation time required for performing image processing according to the present invention fall within an available range.
図10は原画像を格子状に分割し、縦・横4つの部分領域(合計16個の部分領域)に細分して設定したことを示す図、図11は、図10のように16個の部分領域を設定した場合に、各反復で融合するグループの個数と組合せの一例を示す図である。 FIG. 10 is a diagram showing that the original image is divided into a grid pattern and subdivided into four vertical and horizontal partial areas (16 partial areas in total), and FIG. 11 shows 16 pieces as shown in FIG. It is a figure which shows an example of the number of groups and a combination which are united by each repetition when a partial area | region is set.
図10で示す組合せでは、どの反復でも4グループが融合され、第1反復から第4反復で融合したグループを第5反復で再び融合している。第1反復から第4反復からを第1段階、第5反復を第2段階とみなし、段階の番号をλで表すと、各段階では、部分領域数4λのグループ4個を融合している。 In the combination shown in FIG. 10, four groups are fused in every iteration, and a group fused in the first iteration to the fourth iteration is fused again in the fifth iteration. If the first iteration to the fourth iteration are regarded as the first stage, the fifth iteration is regarded as the second stage, and the stage number is represented by λ, each group is composed of 4 groups of 4 λ partial regions. .
この融合方法を一般化して、段階の数をΛとし、各段階でR個のグループを再帰的に融合すると、各段階で融合されるグループ内の部分領域数はRλ、総部分領域数はK=RΛ、各段階辺りの反復数はRΛ−λとなる。 Generalizing this fusion method, if the number of stages is Λ and R groups are recursively merged at each stage, the number of partial areas in the group fused at each stage is R λ and the total number of partial areas is K = R Λ , and the number of iterations per stage is R Λ−λ .
例えば、格子状に部分領域を設定し、各段階で融合するグループ数をR=r2と、縦方向と横方向の分割数をm=n=rΛと、段内における反復の番号をρと、反復の通し番号をqと、各反復で融合するグループをGq,1,…,Gq,Rと、グループGq,gに属するυ番目の部分領域の番号をkq,p,g(υ)とし、qとkq,p,g(υ)を下記(式12)〜(式21)で定義し、グループを融合する。 For example, partial areas are set in a lattice shape, the number of groups to be merged at each stage is R = r 2 , the number of divisions in the vertical and horizontal directions is m = n = r Λ, and the number of iterations in the stage is ρ , The repetition serial number is q, the group to be fused in each repetition is G q, 1 ,..., G q, R, and the number of the υth partial region belonging to the group G q, g is k q, p, g (υ), q and k q, p, g (υ) are defined by the following (formula 12) to (formula 21), and the groups are merged.
図11は、r=2,Λ=4,λ=2の場合の例を示す図、図12は、r=2,Λ=4の各段階でのグループの融合の様子を示す図である。
背景明度分布選択部28は、以下の手順で候補番号Sを定め、画像全体で当該番号の候補を背景明度推定結果とする。((式6)参照)
The background lightness
すなわち、図14に示すように、背景明度分布選択部28は、各候補番号s(1≦s≦γ)について、背景濃度分布c(x,y;s)から以下に示す評価関数L(s)を算出し、候補番号sと評価関数の対(s,L(s))を列挙する(S111)。
そして、背景明度分布選択部28は、列挙した評価関数の対(s,L(s))を評価関数L(s)の昇順に整列し(S112)、σ番目の対の候補番号sを(式6)での候補番号Sとする(S113)。
The background lightness
但し、σ=λである。また、処理対象の画像や条件によっては、σ=1、σ=min(2,λ)、σ=max(λ−1,1)等がより好適な場合もあり、σの決定方法としては、上記の方法の他、いかなる方法を用いても良い。 However, σ = λ. In some cases, σ = 1, σ = min (2, λ), σ = max (λ-1, 1), and the like are more suitable depending on an image to be processed and conditions. Any method other than the above method may be used.
以上、背景明度分布推定部26での背景明度推定方法を説明したが、背景明度候補b(x,y)の変動が小さくなると期待できる方法ならば、上記の方法に限らず、どのような方法を用いても良い。 The background lightness estimation method in the background lightness distribution estimation unit 26 has been described above. However, any method can be used as long as the method can be expected to reduce the fluctuation of the background lightness candidate b (x, y). May be used.
例えば、分割領域の全体が少ない場合には、各分割領域での候補番号の組合せ(s1,s2,…,sk)を全て列挙し、下記(式23)〜(式25)を用いて定義するEglobal(s1,s2,…,sk)が最小となる(s1,s2,…,sk)について、下記(式26)により画素毎の背景明度推定結果b(x,y)を算出して、求めても良い。
また、背景明度分布推定部26で推定された背景明度推定結果b(x,y)に対して後処理を行っても良い。 Further, post-processing may be performed on the background lightness estimation result b (x, y) estimated by the background lightness distribution estimation unit 26.
例えば、横方向及び縦方向の分散がσx,σyのガウス関数H(σx,σy)((式28)参照)との畳み込み積分の結果b’(x,y)でb(x,y)を置き換えても良い。((式27)参照)
背景明度推定結果b(x,y)に対して後処理を行った場合、b(x,y)の変化がなだらかとなり、部分領域の境界等での二値化結果のひずみが緩和される。 When post-processing is performed on the background lightness estimation result b (x, y), the change in b (x, y) becomes gentle, and the distortion of the binarization result at the boundary of the partial region is alleviated.
しきい値算出部29では、背景明度分布推定部26により推定された背景明度分布を基に二値化しきい値を算出する。 The threshold value calculation unit 29 calculates a binarization threshold value based on the background lightness distribution estimated by the background lightness distribution estimation unit 26.
以下では、座標(x,y)での二値化しきい値をτ(x,y)とする。
しきい値算出部29は、以下の三段階の手順で二値化しきい値を算出する。
Hereinafter, the binarization threshold value at the coordinates (x, y) is τ (x, y).
The threshold value calculation unit 29 calculates a binarized threshold value by the following three steps.
1)明度補正部30が記憶部21より読み出した原画像を、下記関数式に従って補正して補正画像を生成する。
1) The corrected image is generated by correcting the original image read out from the
2)補正前しきい値算出部31は、明度補正部30により生成された補正画像に対して補正前しきい値を算出する。
2) The pre-correction threshold
3)しきい値逆補正部32は、補正前しきい値算出部31により算出された補正前しきい値を用いて二値化しきい値を算出する。
3) The threshold
明度補正部30は、原画像f(x,y)のシェーディングによる明暗を補正する。
明度補正部30は、背景明度候補検出部22により推定された背景明度b(x,y)を用いて、下記(式29)により上記補正画像の明度値g(x,y)を求める。
g(x,y)=f(x,y)−b(x,y) …(式29)
The
The
g (x, y) = f (x, y) −b (x, y) (Equation 29)
また、明度補正部30は、下記(式30)に基づいて補正処理を行っても良く、原画像のシェーディングを補正し得る方法ならば、いかなる方法で補正しても良い。
但し、εは正の実数である。補正前しきい値算出部31は、明度補正部30により求められた補正画像の明度値g(x,y)に対して単一の二値化しきい値βを求める。補正前しきい値算出部31で算出したしきい値βを補正前しきい値と呼ぶ。
Where ε is a positive real number. The pre-correction threshold
補正前しきい値βは、補正画像の明度値g(x,y)に対して、最小2乗基準に基づく自動しきい値選定法(既存のしきい値算出方法)などを適用して求める。 The pre-correction threshold value β is obtained by applying an automatic threshold selection method (existing threshold value calculation method) based on the least square criterion to the lightness value g (x, y) of the corrected image. .
補正前しきい値βの算出方法としては、補正画像の明度値g(x,y)に対する単一の二値化しきい値を求める方法ならば、いかなる方法を用いても良い。 As a method for calculating the threshold value β before correction, any method may be used as long as it is a method for obtaining a single binarization threshold value for the lightness value g (x, y) of the corrected image.
しきい値逆補正部32は、補正前しきい値算出部31により算出された補正前しきい値βから、原画像f(x,y)に対する二値化しきい値τ(x,y)を算出する。
The threshold
しきい値逆補正部32は、補正画像の明度値g(x,y)をしきい値βで二値化した結果と、原画像f(x,y)を二値化しきい値τ(x,y)で二値化した結果とが一致するように二値化しきい値τ(x,y)を算出する。
The threshold value
明度補正部30が上記(式29)を用いて明度補正を行う場合、二値化しきい値τ(x,y)は下記(式31)で算出する。
τ(x,y)=β+b(x,y) …(式31)
When the
τ (x, y) = β + b (x, y) (Equation 31)
また、明度補正部30が上記(式30)を用いて明度補正を行う場合、二値化しきい値τ(x,y)は下記(式32)を用いて算出する。
また、二値化しきい値τ(x,y)は、補正画像g(x,y)をしきい値βで二値化した結果と、原画像f(x,y)を二値化しきい値τ(x,y)で二値化した結果とが類似するように算出しても良い。 The binarization threshold τ (x, y) is obtained by binarizing the corrected image g (x, y) with the threshold β and the original image f (x, y). You may calculate so that the result binarized by (tau) (x, y) may be similar.
例えば、明度補正部30が上記(式30)を用いて明度補正を行う場合、二値化しきい値τ(x,y)は下記(式33)で算出しても良い。
For example, when the
τ(x,y)=βb(x,y) …(式33) τ (x, y) = βb (x, y) (Expression 33)
また、しきい値算出部29は、背景明度分布推定部26により推定された背景明度の定数α倍として二値化しきい値を算出しても良い。 Further, the threshold value calculation unit 29 may calculate the binarization threshold value as a constant α times the background lightness estimated by the background lightness distribution estimation unit 26.
τ(x,y)=αb(x,y) …(式34) τ (x, y) = αb (x, y) (Formula 34)
しきい値算出部29としては、推定した背景明度に従って適応的に二値化しきい値が算出される機能を備えていれば、いかなる手段を用いても良い。 As the threshold value calculation unit 29, any means may be used as long as it has a function of adaptively calculating a binarization threshold value according to the estimated background lightness.
二値化部33は、しきい値算出部29により算出されたしきい値を用いて原画像を二値化する。
The
二値化部33は、原画像の各画素について明度f(x,yを二値化しきい値τ(x,y)でしきい値処理し、二値画像の画素値o(x,y)を算出する。
このようにこの実施形態の画像処理装置によれば、原画像を予め決められた手順に従って複数の部分領域に分割し各部分領域毎に原画像の背景の明度として用いる明度値の候補を検出する背景明度候補検出部22と、検出した候補を用いて原画像の背景明度分布を推定する背景明度分布推定部26と、推定した背景明度分布に基づいて原画像の二値化処理のためのしきい値を算出するしきい値算出部29と、算出したしきい値により原画像を二値化する二値化部33とを備えたことで、原画像の画像領域全体での変動が極力小さくなるように背景明度を推定し、推定した背景明度を基に二値化しきい値を算出するので、影等による局所的な変動に対して安定した二値化処理を行うことができる。
As described above, according to the image processing apparatus of this embodiment, the original image is divided into a plurality of partial areas according to a predetermined procedure, and lightness value candidates used as the lightness of the background of the original image are detected for each partial area. A background lightness candidate detection unit 22, a background lightness distribution estimation unit 26 that estimates the background lightness distribution of the original image using the detected candidates, and a binarization process for the original image based on the estimated background lightness distribution. By including the threshold value calculation unit 29 for calculating the threshold value and the
1…デジタルカメラ、2…コンピュータ、21…記憶部、22…背景明度候補検出部、23…ヒストグラム補正部、24…フレーム間ヒストグラム加算部、25…背景明度候補補足部、26…背景明度分布推定部、27…背景明度分布候補列挙部、28…背景明度分布選択部、29…しきい値算出部、30…明度補正部、31…補正前しきい値算出部、32…しきい値逆補正部、33…二値化部。
DESCRIPTION OF
Claims (10)
前記背景明度候補検出部で検出された前記背景の明度の複数の候補を前記部分領域毎に一つずつ選択し、選択した候補の組み合わせを基に前記原画像の背景の明度の分布を求める背景明度分布推定部と、
前記背景明度分布推定部により推定された背景の明度の分布から前記原画像の二値化処理のためのしきい値を算出するしきい値算出部と、
前記しきい値算出部により算出されたしきい値により前記原画像を二値化する二値化部と
を具備することを特徴とする画像処理装置。 The original image is divided into multiple partial regions, and the background brightness candidate detection unit, wherein for each of the partial areas by detecting a representative value of brightness and a plurality of candidates of the brightness of the background in the partial region,
The background brightness detected by the candidate detection unit the brightness of the background plural candidates selected one by one for each of the partial regions, the background to determine the distribution of the brightness of the background of the original image based on the combination of the selected candidate A brightness distribution estimation unit;
A threshold value calculation unit for calculating a threshold value for binarization processing of the original image from the distribution of lightness of the background estimated by the background lightness distribution estimation unit;
An image processing apparatus comprising: a binarization unit that binarizes the original image based on the threshold value calculated by the threshold value calculation unit.
前記部分領域毎に前記背景の明度の複数の候補から候補を一つずつ選択した組み合わせを複数求め、前記組み合わせの各々から背景明度分布の候補を求める背景明度分布候補列挙部を具備し、
前記背景明度分布推定部では前記組み合わせの各々において、選択した背景の明度の候補の画像全体にわたる変動が小さくなるように、背景の明度の候補の選択を行うことを特徴とする請求項1記載の画像処理装置。 The background lightness distribution estimation unit,
Obtaining a plurality of combinations of candidates selected one by one from a plurality of candidates for the background brightness for each partial region, and comprising a background brightness distribution candidate enumeration unit for obtaining a background brightness distribution candidate from each of the combinations ,
The background lightness distribution estimation unit performs background lightness candidate selection so that variation in the entire background lightness candidate image selected in each of the combinations is reduced . Image processing device.
前記部分領域毎に前記原画像の背景の明度値として用いる候補をメモリに記憶し、個々の部分領域を初期状態とした部分領域のグループを反復的に融合して一つのグループを生成し、
前記グループの融合のたびに前記メモリの該当候補を更新し、
融合完了時に前記メモリに記憶されていた部分領域毎の候補を基に背景明度分布の候補を列挙することを特徴とする請求項2記載の画像処理装置。 The background lightness distribution candidate enumeration unit
Candidates used as lightness values of the background of the original image for each partial area are stored in a memory, and a group of partial areas with each partial area as an initial state is repeatedly fused to generate one group,
Update the corresponding candidate in the memory every time the group is merged,
The image processing apparatus according to claim 2, wherein candidates for background lightness distribution are listed based on candidates for each partial area stored in the memory when fusion is completed.
前記原画像を分割したそれぞれの部分領域の明度を求め、各領域の明度と出現頻度との関係を示す明度ヒストグラムを生成し、
生成した明度ヒストグラム上でピークの画素値を、前記原画像の背景の明度の候補として検出する
ことを特徴とする請求項1記載の画像処理装置。 The background lightness candidate detection unit,
Finding the brightness of each partial area obtained by dividing the original image, generating a brightness histogram showing the relationship between the brightness of each area and the appearance frequency ,
The image processing apparatus according to claim 1 , wherein a peak pixel value on the generated brightness histogram is detected as a background brightness candidate of the original image .
前記部分領域の近傍のヒストグラムを当該部分領域のヒストグラムに加算したヒストグラムを、当該フレームのヒストグラムの代わりに用いるヒストグラム補正部を具備することを特徴とする請求項4記載の画像処理装置。 The background lightness candidate detection unit,
The image processing apparatus according to claim 4, further comprising a histogram correction unit that uses a histogram obtained by adding a histogram in the vicinity of the partial area to the histogram of the partial area, instead of the histogram of the frame.
前記コンピュータを、
原画像を複数の部分領域に分割し、前記部分領域の各々について明度の代表値を検出して前記部分領域における背景の明度の複数の候補とする背景明度候補検出部と、
前記背景明度候補検出部で検出された前記背景の明度の複数の候補を前記部分領域毎に一つずつ選択し、選択した候補の組み合わせを基に前記原画像の背景の明度の分布を求める背景明度分布推定部と、
前記背景明度分布推定部により求められた背景の明度の分布から前記原画像の二値化処理のためのしきい値を算出するしきい値算出部と、
前記しきい値算出部により算出されたしきい値により前記原画像を二値化する二値化部として機能させることを特徴とする画像処理プログラム。 An image processing program for causing a computer to execute image processing,
The computer,
The original image is divided into multiple partial regions, and the background brightness candidate detection unit, wherein for each of the partial areas by detecting a representative value of brightness and a plurality of candidates of the brightness of the background in the partial region,
The background brightness detected by the candidate detection unit the brightness of the background plural candidates selected one by one for each of the partial regions, the background to determine the distribution of the brightness of the background of the original image based on the combination of the selected candidate A brightness distribution estimation unit;
And a threshold calculation unit that calculates a threshold value for binarization of the original image from the distribution of the brightness of the background brightness distribution estimating unit by seeking et background,
An image processing program that functions as a binarization unit that binarizes the original image based on the threshold value calculated by the threshold value calculation unit.
前記画像処理装置が、
原画像を複数の部分領域に分割し、前記部分領域の各々について明度の代表値を検出して前記部分領域における背景の明度の複数の候補とし、
前記背景の明度の複数の候補を前記部分領域毎に一つずつ選択し、選択した候補の組み合わせを基に前記原画像の背景の明度の分布を求め、
求めた背景の明度の分布から前記原画像の二値化処理のためのしきい値を算出し、
算出したしきい値により前記原画像を二値化する
ことを特徴とする画像処理方法。 An image processing method in which an image processing apparatus performs image processing,
The image processing apparatus is
The original image is divided into multiple partial regions, wherein for each of the partial areas by detecting a representative value of brightness and a plurality of candidates of the brightness of the background in the partial region,
A plurality of candidates for the background brightness are selected one by one for each of the partial regions, and a distribution of the brightness of the background of the original image is obtained based on the combination of the selected candidates .
It said calculating a threshold value for binarization of the original image from the distribution of the brightness of the obtained background,
An image processing method, wherein the original image is binarized by a calculated threshold value.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006075310A JP4346620B2 (en) | 2006-03-17 | 2006-03-17 | Image processing apparatus, image processing method, and image processing program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006075310A JP4346620B2 (en) | 2006-03-17 | 2006-03-17 | Image processing apparatus, image processing method, and image processing program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2007249836A JP2007249836A (en) | 2007-09-27 |
JP4346620B2 true JP4346620B2 (en) | 2009-10-21 |
Family
ID=38594019
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006075310A Active JP4346620B2 (en) | 2006-03-17 | 2006-03-17 | Image processing apparatus, image processing method, and image processing program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4346620B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4790031B2 (en) * | 2009-02-13 | 2011-10-12 | 日本電信電話株式会社 | Image processing apparatus, image processing method, program, and recording medium |
CN110599433B (en) * | 2019-07-30 | 2023-06-06 | 西安电子科技大学 | A double-exposure image fusion method based on dynamic scenes |
-
2006
- 2006-03-17 JP JP2006075310A patent/JP4346620B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2007249836A (en) | 2007-09-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101143218B1 (en) | Color segmentation-based stereo 3d reconstruction system and process | |
US9697583B2 (en) | Image processing apparatus, image processing method, and computer-readable recording medium | |
KR101032446B1 (en) | Apparatus and method for detecting vertices of images | |
JP6547386B2 (en) | Image processing apparatus and method | |
JP6115214B2 (en) | Pattern processing apparatus, pattern processing method, and pattern processing program | |
JP2011128990A (en) | Image processor and image processing method | |
JP2006285310A (en) | Forest crown evaluation method and crown evaluation program | |
AU2011265380B2 (en) | Determining transparent fills based on a reference background colour | |
EP2782065A1 (en) | Image-processing device removing encircling lines for identifying sub-regions of image | |
JP6546385B2 (en) | IMAGE PROCESSING APPARATUS, CONTROL METHOD THEREOF, AND PROGRAM | |
JP5617841B2 (en) | Image processing apparatus, image processing method, and image processing program | |
JP4346620B2 (en) | Image processing apparatus, image processing method, and image processing program | |
US20130259373A1 (en) | Image processing device capable of determining types of images accurately | |
JP2017085570A (en) | Image correction method and image correction apparatus | |
CN112016505B (en) | Living body detection method, equipment, storage medium and device based on face image | |
JP2019106173A (en) | Image processing method, image processing apparatus and program | |
Fursov et al. | Correction of distortions in color images based on parametric identification | |
CN111898408A (en) | Rapid face recognition method and device | |
CN110824451A (en) | Processing method and device of radar echo map, computer equipment and storage medium | |
US11200708B1 (en) | Real-time color vector preview generation | |
CN114202665A (en) | A kind of image similarity determination method and apparatus, equipment, storage medium | |
CN113763496A (en) | Image coloring method, device and computer readable storage medium | |
JP7297720B2 (en) | Camera calibration method, apparatus and program | |
JP7643590B2 (en) | IMAGE CORRECTION DEVICE, IMAGE CORRECTION METHOD, AND IMAGE CORRECTION PROGRAM | |
JP2020027357A (en) | Image processing device and control method of the same |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090317 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20090518 |
|
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: 20090623 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20090714 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 4346620 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120724 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130724 Year of fee payment: 4 |
|
S531 | Written request for registration of change of domicile |
Free format text: JAPANESE INTERMEDIATE CODE: R313531 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
S533 | Written request for registration of change of name |
Free format text: JAPANESE INTERMEDIATE CODE: R313533 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |