JP4700597B2 - Image binarization apparatus and image binarization method - Google Patents

Image binarization apparatus and image binarization method Download PDF

Info

Publication number
JP4700597B2
JP4700597B2 JP2006332637A JP2006332637A JP4700597B2 JP 4700597 B2 JP4700597 B2 JP 4700597B2 JP 2006332637 A JP2006332637 A JP 2006332637A JP 2006332637 A JP2006332637 A JP 2006332637A JP 4700597 B2 JP4700597 B2 JP 4700597B2
Authority
JP
Japan
Prior art keywords
block
binarization
pixel
threshold
pixels
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
Application number
JP2006332637A
Other languages
Japanese (ja)
Other versions
JP2008147983A (en
Inventor
禎郎 高橋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2006332637A priority Critical patent/JP4700597B2/en
Publication of JP2008147983A publication Critical patent/JP2008147983A/en
Application granted granted Critical
Publication of JP4700597B2 publication Critical patent/JP4700597B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)

Description

本発明は、画像二値化装置、及び画像二値化方法に関し、さらに詳しくは、光源の一定しない画像入力装置等で入力された多値画像の輝度ムラや影を取り除いて二値化する画像二値化装置及び画像二値化方法に関するものである。   The present invention relates to an image binarization apparatus and an image binarization method, and more specifically, an image that is binarized by removing luminance unevenness and shadows of a multi-valued image input by an image input apparatus or the like having a non-constant light source The present invention relates to a binarization apparatus and an image binarization method.

従来、文書を電子化して保存する場合、専ら画像入力装置としてスキャナ、または複写機もしくはファクシミリ装置のスキャナ部を使用していた。この様なスキャナ部は光源を装置内に備え、その光源から出た光を文書に当て、その反射光をCCDなどで読み取り、必要に応じて画像を二値化して保存していた。この様な場合では、光源および光学系が一定であるので光源や光学系に起因する画像の輝度ムラや影の発生は一定したものであるため補正が容易であり、高品質の画像を出力することができる。従ってこの様なデジタル画像を高品質で二値化することは容易であった。
一方、近年は、ビデオカメラやデジタルカメラが発達し、この様な機器から入力した画像を文字認識したいという要求も高まっている。特にデジタルカメラは、高画素化と小型化が著しく、携帯情報収集ツールとして様々な用途に使用され始めている。例えば文書、看板、広告などの文字情報は二値画像で十分な情報が得られ、しかも保存に必要な記憶容量も多値画像に比して小さいので、二値化画像として保存することが有利である。また、二値化した画像をファクシミリ送信したり、文字認識をしたり再利用することもできる。
Conventionally, when a document is digitized and stored, a scanner or a scanner unit of a copying machine or a facsimile machine has been used exclusively as an image input device. Such a scanner unit is provided with a light source in the apparatus, the light emitted from the light source is applied to a document, the reflected light is read by a CCD or the like, and the image is binarized and stored as necessary. In such a case, since the light source and the optical system are constant, the occurrence of uneven brightness and shadows in the image due to the light source and the optical system are constant, so correction is easy and a high-quality image is output. be able to. Therefore, it was easy to binarize such a digital image with high quality.
On the other hand, in recent years, video cameras and digital cameras have been developed, and there is an increasing demand for character recognition of images input from such devices. In particular, digital cameras are remarkably high in pixel size and downsized, and have begun to be used for various purposes as portable information collection tools. For example, text information such as documents, signboards, and advertisements can be stored as a binary image because sufficient information can be obtained with a binary image and the storage capacity required for storage is smaller than that of a multi-value image. It is. In addition, the binarized image can be transmitted by facsimile, character recognition, and reuse.

この様な、デジタル画像を適切に二値化するために特許文献1には、ウィンドウ内の各画素につき、それぞれの明るさと特定画素の明るさとの差と、着目した画像部分のコントラストに比例するパラメータとを比較してウィンドウ内の画像を2値化処理する2値化回路部と、この2値化回路部で得た2値パターンにつき輪郭部の画像パターンとしての適否を判断する判断回路とを備えることにより、高品質な二値化画像を得る技術が開示されている。
また、特許文献2には、多値画像より輝度値のヒストグラムを作成し、ヒストグラムから白画素代表値と黒画素代表値とを決定し、その平均から二値化閾値を決定し、二値化閾値に基づいて多値画像を二値化する技術、及び画像をブロックに分割し、ブロック毎の二値化閾値または白画素代表値/黒画素代表値を求め、文字のないブロックは周囲から補間し、ブロックの二値化閾値を画素毎の閾値とすることで、画像中の輝度ムラや影を取り除く技術が開示されており、高品質な二値化を行うことが可能となっている。
更に、特許文献3には、画像の局所の明るさに応じた閾値を用いて画像の二値化を行うことにより上述の従来技術よりも高品質の二値画像をより低いコストで得ることができる画像二値化装置について開示されている。
特開平3−237571号公報 特開平7−212591号公報 特開2002−354248公報
In order to appropriately binarize such a digital image, Patent Document 1 discloses that for each pixel in the window, the difference between the brightness of each pixel and the brightness of a specific pixel is proportional to the contrast of the focused image portion. A binarization circuit unit that binarizes the image in the window by comparing the parameters, and a determination circuit that determines whether the binary pattern obtained by the binarization circuit unit is appropriate as an image pattern of the contour portion; A technique for obtaining a high-quality binarized image by providing the above is disclosed.
In Patent Document 2, a histogram of luminance values is created from a multi-valued image, a white pixel representative value and a black pixel representative value are determined from the histogram, a binarization threshold is determined from the average, and binarization is performed. A technique for binarizing a multi-valued image based on a threshold value, and dividing the image into blocks, obtaining a binarization threshold value or white pixel representative value / black pixel representative value for each block, and interpolating blocks without characters from surroundings However, a technique for removing luminance unevenness and shadows in an image by using a binarization threshold value of a block as a threshold value for each pixel is disclosed, and high-quality binarization can be performed.
Furthermore, in Patent Document 3, it is possible to obtain a binary image with higher quality than the above-described conventional technique at a lower cost by performing binarization of an image using a threshold value corresponding to the local brightness of the image. A possible image binarization apparatus is disclosed.
JP-A-3-237571 Japanese Patent Laid-Open No. 7-212591 JP 2002-354248 A

しかしながら、従来の技術では以下の問題点があった。即ち、画像の局所毎にヒストグラムを求めたり、画像の平均的な明るさを求めたりして、さらに二値化閾値も局所的、つまり画素毎に異なる値を演算して求めたりすることで非常に高品質の二値画像が得られているが、それだけに原始的な二値化方法と比較して二値化の実行にコストがかかったり、あるいは時間がかかったりする。特に文字を中心とした文書を走査して画像入力した場合、背景だけで情報をもたない部分領域も多く、それらの領域も二値化対象とすることは無駄であり、低コストで高速に二値化処理を行うことはできなかった。
本発明は、かかる課題に鑑みてなされたものであり、従来技術と同等の高品質な二値化処理をさらなる高速、低コストで実現する画像二値化装置、及び画像二値化方法を提供することを目的とする。
However, the conventional technique has the following problems. In other words, by obtaining a histogram for each local area of the image, calculating the average brightness of the image, and further calculating the binarization threshold locally, that is, by calculating a different value for each pixel. High-quality binarized images are obtained, however, the binarization is costly or time-consuming compared to the original binarization method. Especially when scanning a document centered on characters and inputting images, there are many partial areas that do not have information only in the background, and it is useless to binarize these areas as well, and at low cost and high speed. The binarization process could not be performed.
The present invention has been made in view of such problems, and provides an image binarization apparatus and an image binarization method that realize high-quality binarization processing equivalent to that of the prior art at higher speed and lower cost. The purpose is to do.

本発明はかかる課題を解決するために、請求項1は、多値画像を入力し、該多値画像に対して複数の画素を含むブロックを設定する第一ブロック設定手段と、該第一ブロック設定手段により設定された第一ブロック内のブロック毎のブロック二値化閾値を輝度平均値に基づいて算出するブロック二値化閾値算出手段と、前記多値画像に対して第一のブロックより少ない画素を含む第二のブロックを設定する第二のブロック設定手段と、該第二のブロック設定手段により設定された第二のブロック内の画素の輝度値と前記ブロック二値化閾値とを比較し、該輝度値が小さい場合に、注目している前記第二ブロックおよび注目している当該第二のブロックに隣接する複数第二のブロックを本二値化実行ブロックに設定する本二値化実行ブロック設定手段と、該本二値化実行ブロック設定手段により設定された二値化実行ブロック内において、各画素の輝度値と、該画素の周辺の前記複数の第一のブロックのブロック二値化閾値に基づいて算出した画素閾値とを比較して二値化を実行する本二値化手段と、を備えたことを特徴とする。
請求項2は、前記ブロック二値化閾値算出手段は、入力された第一ブロックから画素をサンプリングするサンプリング手段と、該画素が低輝度値を有する場合に輝度平均算出の対象から除外するための低輝度除外手段と、平均輝度を算出する平均輝度算出手段と、該平均輝度より所定の演算によりブロック二値化閾値を算出するブロック二値化閾値算出手段と、を備えたことを特徴とする。
In order to solve this problem, the present invention provides a first block setting means for inputting a multi-value image and setting a block including a plurality of pixels for the multi-value image, and the first block. Block binarization threshold value calculation means for calculating a block binarization threshold value for each block in the first block set by the setting means based on the luminance average value, and the multivalued image is less than the first block compares the second block setting means for setting a second block including the pixel, the luminance values of the pixels of the second block set by said second block setting means and the said block binarization threshold , when the luminance value is small, attention to which the second block and attention to that the present binary to a plurality of second blocks adjacent to the second block is set to the binarization performed block Execution block And setting means, in the present binarization execution block set by the main binarization execution block setting means, and the luminance value of each pixel, block binarization of the plurality of first blocks surrounding the pixel And a binarization unit that performs binarization by comparing with a pixel threshold calculated based on the threshold.
According to a second aspect of the present invention, the block binarization threshold value calculation means is a sampling means for sampling a pixel from the input first block, and for excluding the pixel from a luminance average calculation target when the pixel has a low luminance value. A low luminance exclusion unit; an average luminance calculation unit that calculates an average luminance; and a block binarization threshold calculation unit that calculates a block binarization threshold by a predetermined calculation from the average luminance. .

請求項3は、前記本二値化実行ブロック設定手段は、入力された第二ブロックから画素をサンプリングするサンプリング手段と、該画素を前記ブロック二値化閾値算出手段で求めたブロック二値化閾値を用いて二値化する前二値化手段と、該前二値化手段により黒と判定された画素が存在する場合に該注目している第二ブロックおよび注目している第二のブロックに隣接する複数の第二ブロックを本二値化実行ブロックと判定する本二値化実行ブロック判定手段と、を備えたことを特徴とする。
請求項4は、前記本二値化手段は、入力された第二ブロックの中から本二値化実行ブロックと判定されたブロックのみを選択する二値化ブロック選択手段と、ブロック二値化閾値から二値化すべき画素の位置における画素閾値を補間する画素閾値補間手段と、前記第二ブロックの全画素を前記画素閾値で二値化する二値化手段と、を備えたことを特徴とする。
請求項5は、前記本二値化手段は、第二ブロックを入力し本二値化実行ブロックを選択して出力する二値化ブロック選択手段と、前記選択された第二のブロック内の複数の画素からなる画素塊周辺の複数の第一のブロックに対応するブロック二値化閾値から前記画素塊に対する二値化閾値を算出する画素閾値補間手段と、前記第二ブロックの全画素を前記画素塊を単位として算出した二値化閾値で二値化する二値化手段とを有することを特徴とする。
Claim 3, wherein the binarization execution block setting means includes sampling means for sampling the pixels from the second block input block binarization of obtaining the pixel in the block binarized threshold calculating means Pre-binarization means for binarization using a threshold, and the second block of interest and the second of interest when there is a pixel determined to be black by the pre-binarization means And a binarization execution block determination unit that determines a plurality of second blocks adjacent to the block as a binarization execution block.
According to a fourth aspect of the present invention, the binarization unit selects a block that is determined to be the binarization execution block from the input second blocks, and a block binarization threshold value. A pixel threshold interpolating means for interpolating a pixel threshold at a position of a pixel to be binarized, and a binarizing means for binarizing all the pixels of the second block with the pixel threshold. .
Claim 5, wherein the binarizing means receives the second block, the two and binarization block selection means for the value of the execution block selectively outputs the selected second block a pixel threshold interpolation means for calculating a binarization threshold value for the pixel block from the block binarization thresholds corresponding to the plurality of first blocks of the peripheral pixel blocks comprising a plurality of pixels of all pixels of the second block And binarizing means for binarizing with a binarization threshold value calculated with the pixel block as a unit.

請求項6は、多値画像を入力し、該多値画像に対して複数の画素を含むブロックを設定する第一ブロック設定ステップと、該第一ブロック設定ステップにより設定された第一ブロック内のブロック毎のブロック二値化閾値を輝度平均値に基づいて算出するブロック二値化閾値算出ステップと、前記多値画像に対して第一のブロックより少ない画素を含む第二のブロックを設定する第二のブロック設定ステップと、該第二のブロック設定ステップにより設定された第二のブロック内の画素の輝度値と前記ブロック二値化閾値とを比較し、該輝度値が小さい場合に、注目している前記第二ブロックおよび注目している当該第二のブロックに隣接する複数第二のブロックを本二値化実行ブロックに設定する本二値化実行ブロック設定ステップと、該本二値化実行ブロック設定手段により設定された二値化実行ブロック内において、各画素の輝度値と、該画素の周辺の前記複数の第一のブロックのブロック二値化閾値に基づいて算出した画素閾値とを比較して二値化を実行する本二値化ステップと、を有することを特徴とする。
請求項7は、前記ブロック二値化閾値算出ステップは、入力された第一ブロックから画素をサンプリングするサンプリングステップと、該画素が低輝度値を有する場合に輝度平均算出の対象から除外するための低輝度除外ステップと、平均輝度を算出するステップと、該平均輝度より所定の演算によりブロック二値化閾値を算出するステップと、を有することを特徴とする。
The present invention provides a first block setting step for inputting a multi-valued image and setting a block including a plurality of pixels for the multi-valued image, and a first block setting step set in the first block setting step. A block binarization threshold value calculating step for calculating a block binarization threshold value for each block based on a luminance average value; and a second block including fewer pixels than the first block for the multi-valued image. The second block setting step and the luminance value of the pixel in the second block set by the second block setting step are compared with the block binarization threshold, and attention is paid when the luminance value is small. and that said second block and attention to that the second of the binarization execution block setting step of setting a plurality of second blocks in the present binarization execution blocks adjacent to the block and This in binarization execution block set by the main binarization execution block setting means, and the luminance value of each pixel, based on the block binarization threshold of the plurality of first blocks surrounding the pixel And a binarization step for performing binarization by comparing with the calculated pixel threshold value.
According to a seventh aspect of the present invention, the block binarization threshold value calculating step includes: a sampling step of sampling pixels from the input first block; and a case where the pixels have a low luminance value, so as to be excluded from a luminance average calculation target A low luminance exclusion step; a step of calculating an average luminance; and a step of calculating a block binarization threshold value by a predetermined calculation from the average luminance.

請求項8は、前記本二値化実行ブロック設定ステップは、入力された第二ブロックから画素をサンプリングするサンプリングステップと、該画素を前記ブロック二値化閾値算出ステップで求めたブロック二値化閾値を用いて二値化する前二値化ステップと、該前二値化ステップにより黒と判定された画素が存在する場合に該注目している第二ブロックおよび注目している第二のブロックに隣接する複数の第二ブロックを本二値化実行ブロックと判定する本二値化実行ブロック判定ステップと、を有することを特徴とする。
請求項9は、前記本二値化ステップは、入力された第二ブロックの中から本二値化実行ブロックと判定されたブロックのみを選択する二値化ブロック選択ステップと、ブロック二値化閾値から二値化すべき画素の位置における画素閾値を補間する画素閾値補間ステップと、該第二ブロックの全画素を該画素閾値で二値化する二値化ステップと、を有することを特徴とする。
請求項10は、前記本二値化ステップは、第二ブロックを入力し本二値化実行ブロックを選択して出力する二値化ブロック選択ステップと、前記選択された第二のブロック内の複数の画素からなる画素塊周辺の複数の第一のブロックに対応するブロック二値化閾値から前記画素塊に対する二値化閾値を算出する画素閾値補間ステップと、前記第二のブロックの全画素を前記画素塊を単位として算出した二値化閾値で二値化する二値化手段とを有することを特徴とする。
Claim 8, wherein the binarization execution block setting step includes a sampling step of sampling the pixels from the second block input block binarization of obtaining the pixel in the block binarized threshold calculating step A pre-binarization step for binarization using a threshold value, and a second block of interest and a second of interest when there are pixels determined to be black by the pre-binarization step A binarization execution block determination step for determining a plurality of second blocks adjacent to the block as a binarization execution block.
The present binarization step includes a binarization block selection step of selecting only a block determined to be the present binarization execution block from the input second block, and a block binarization threshold value A pixel threshold interpolation step for interpolating a pixel threshold at a position of a pixel to be binarized, and a binarization step for binarizing all the pixels of the second block with the pixel threshold.
Claim 10, wherein the binarization step is to enter the second block, the two and binarization block selection step the value of the execution block selectively outputs the selected second block a pixel threshold interpolation calculating a binarization threshold value for the pixel block from the block binarization thresholds corresponding to the plurality of first blocks of the peripheral pixel blocks comprising a plurality of pixels of all pixels of the second block And binarizing means for binarizing with a binarization threshold value calculated with the pixel block as a unit.

本発明によれば、多値画像を入力し、多値画像に対して複数の画素を含むブロックを設定する第一ブロック設定手段と、この第一ブロック設定手段により設定された第一ブロック内のブロック毎のブロック二値化閾値を輝度平均値に基づいて算出するブロック二値化閾値算出手段と、多値画像に対して第一のブロックより少ない画素を含むブロックを設定する第二のブロック設定手段と、この第二のブロック設定手段により設定された第二ブロック内の画素の輝度値とブロック二値化閾値とを比較し、輝度値が小さい場合に、第二ブロックおよび注目している当該ブロックと同じグループの近傍のブロックを本二値化実行ブロックに設定する本二値化実行ブロック設定手段と、本二値化実行ブロック設定手段により設定された二値化実行ブロック内において、各画素の輝度値とブロック二値化閾値を補間した画素閾値とを比較して二値化を実行する本二値化手段と、を備えたので、高品質の画像二値化を高速、低コストで実行することができる。   According to the present invention, a first block setting unit that inputs a multi-value image and sets a block including a plurality of pixels for the multi-value image, and a first block setting unit that is set by the first block setting unit. Block binarization threshold value calculation means for calculating a block binarization threshold value for each block based on the luminance average value, and second block setting for setting a block including fewer pixels than the first block for a multi-valued image And the luminance value of the pixel in the second block set by the second block setting means and the block binarization threshold value, and if the luminance value is small, the second block and the relevant attention The binarization execution block setting means for setting a block in the same group as the block as the binarization execution block, and the binarization execution block set by the binarization execution block setting means. The binarization means for performing binarization by comparing the luminance value of each pixel with the pixel threshold obtained by interpolating the block binarization threshold in the image, so that high-quality image binarization is provided. Can be executed at high speed and low cost.

以下、本発明を図に示した実施形態を用いて詳細に説明する。但し、この実施形態に記載される構成要素、種類、組み合わせ、形状、その相対配置などは特定的な記載がない限り、この発明の範囲をそれのみに限定する主旨ではなく単なる説明例に過ぎない。
図1は本発明の画像二値化装置を表すブロック図である。この画像二値化装置100は、多値画像1を入力し、多値画像1に対して複数の画素を含むブロックを設定する第一ブロック設定器(第一ブロック設定手段)2と、第一ブロック設定器2により設定された第一ブロック内のブロック毎のブロック二値化閾値を輝度平均値に基づいて算出する第一ブロック二値化閾値算出器(ブロック二値化閾値算出手段)3と、多値画像に対して第一のブロックより少ない画素を含むブロックを設定する第二ブロック設定器(第二のブロック設定手段)4と、第二ブロック設定器4により設定された第二ブロック内の画素の輝度値とブロック二値化閾値とを比較し、輝度値が小さい場合に、第二ブロックおよび注目している当該ブロックと同じグループの近傍のブロックを本二値化実行ブロックに設定する本二値化実行ブロック設定器(本二値化実行ブロック設定手段)5と、本二値化実行ブロック設定器5により設定された二値化実行ブロック内において、各画素の輝度値とブロック二値化閾値を補間した画素閾値とを比較して二値化を実行する本二値化処理器(本二値化手段)6と、を備えて構成されている。
Hereinafter, the present invention will be described in detail with reference to embodiments shown in the drawings. However, the components, types, combinations, shapes, relative arrangements, and the like described in this embodiment are merely illustrative examples and not intended to limit the scope of the present invention only unless otherwise specified. .
FIG. 1 is a block diagram showing an image binarization apparatus of the present invention. This image binarization apparatus 100 receives a multi-value image 1 and sets a first block setting device (first block setting means) 2 for setting a block including a plurality of pixels for the multi-value image 1; A first block binarization threshold value calculator (block binarization threshold value calculation means) 3 for calculating a block binarization threshold value for each block in the first block set by the block setting device 2 based on the average luminance value; A second block setting device (second block setting means) 4 for setting a block including fewer pixels than the first block for the multi-valued image, and the second block setting device 4 When the luminance value is small, the second block and a block in the vicinity of the same group as the target block are set as the binarization execution block. Book In the binarization execution block set by the binarization execution block setting device (the present binarization execution block setting means) 5 and the binarization execution block setting device 5, the luminance value of each pixel and the block binarization This binarization processor (the present binarization means) 6 that executes binarization by comparing the pixel threshold value obtained by interpolating the threshold value is configured.

まず、8ビットグレースケールの多値画像1を入力する。入力画像がカラー画像の場合にはあらかじめ輝度信号を抽出して8ビットグレースケール画像に変換しておく。この画像が第一ブロック設定器2に入力される。第一ブロック設定器2は、図2のように画像を128x128画素単位のブロックに分割する。また、第一ブロック二値化閾値算出器3は、各第一ブロックを入力とし、まずサンプリング器で以降の演算を行うための画素位置および値を抽出する。
サンプリングは図3に示すように、水平垂直それぞれ8画素毎にサンプリングされる。サンプリングされた画素値は比較器で低輝度除外閾値と比較される。
First, an 8-bit grayscale multilevel image 1 is input. When the input image is a color image, a luminance signal is extracted in advance and converted into an 8-bit grayscale image. This image is input to the first block setting device 2. The first block setting device 2 divides the image into blocks of 128 × 128 pixels as shown in FIG. The first block binarization threshold value calculator 3 receives each first block as an input, and first extracts a pixel position and a value for performing a subsequent calculation by the sampler.
As shown in FIG. 3, sampling is performed every 8 pixels in the horizontal and vertical directions. The sampled pixel value is compared with a low luminance exclusion threshold by a comparator.

図4は第一ブロック二値化閾値算出器の内部構成を表すブロック図である。第一ブロック二値化閾値算出器3は、入力された第一ブロック10から画素をサンプリングするサンプリング器(サンプリング手段)11と、画素が低輝度値を有する場合に輝度平均算出の対象から除外するための比較器12と低輝度除外閾値メモリ16により構成される低輝度除外手段と、平均輝度を算出する平均輝度算出器(平均輝度算出手段)13と、平均輝度より所定の演算により第一ブロック二値化閾値15を算出するブロック二値化閾値算出手段と、を備えて構成され、画素の輝度値が低輝度除外閾値より高ければ、輝度値は平均輝度算出器13に出力されて平均輝度を算出する対象となるが、それ以下の場合は出力されない。これは、ほぼ黒べたの領域を後の二値化処理で正しく黒と二値化するために行う処理である。平均輝度算出器13は平均輝度算出の対象となる画素値を加算し、その平均値を算出する。もし、当該第一ブロック内に平均輝度を算出する対象画素が存在しない場合、平均輝度算出器13は低輝度除外閾値を係数メモリ18に格納されている係数で割った値を出力する。これは、後述する乗算器14の出力(=第一ブロック二値化閾値)が低輝度除外閾値と等しい値になることを意味する。乗算器14は平均輝度算出器13が算出した平均輝度に係数メモリ18に記憶された1未満の正の係数を乗算して第一ブロック二値化閾値15を算出する。
第二ブロック設定器4は、図5のように画像を16x16画素単位の第二ブロックに分割する。第一ブロックより分割単位が小さいのは、文字の多い文書では、行間、文字間など細かくて黒がない部分が多いため、ブロックサイズを小さくすることにより、黒がある部分だけを二値化する効率が向上するからである。
FIG. 4 is a block diagram showing the internal configuration of the first block binarization threshold value calculator. The first block binarization threshold value calculator 3 excludes a sampling unit (sampling means) 11 that samples pixels from the input first block 10 and a luminance average calculation target when the pixel has a low luminance value. A low-luminance exclusion means comprising a comparator 12 and a low-luminance exclusion threshold memory 16, an average luminance calculator (average luminance calculation means) 13 for calculating average luminance, and a first block by a predetermined calculation from the average luminance Block binarization threshold value calculating means for calculating the binarization threshold value 15, and if the luminance value of the pixel is higher than the low luminance exclusion threshold value, the luminance value is output to the average luminance calculator 13 and average luminance Is not output if it is less than that. This is a process performed in order to binarize a substantially black solid area into black correctly in a later binarization process. The average luminance calculator 13 adds pixel values that are targets of average luminance calculation, and calculates the average value. If there is no target pixel for calculating the average luminance in the first block, the average luminance calculator 13 outputs a value obtained by dividing the low luminance exclusion threshold by the coefficient stored in the coefficient memory 18. This means that an output (= first block binarization threshold) of a multiplier 14 described later becomes a value equal to the low luminance exclusion threshold. The multiplier 14 multiplies the average luminance calculated by the average luminance calculator 13 by a positive coefficient less than 1 stored in the coefficient memory 18 to calculate the first block binarization threshold 15.
The second block setting device 4 divides the image into second blocks of 16 × 16 pixel units as shown in FIG. The reason why the division unit is smaller than the first block is that in a document with many characters, there are many portions that are fine and black, such as line spacing and characters, so only the portion with black is binarized by reducing the block size. This is because the efficiency is improved.

図6は本二値化実行ブロック設定器の内部構成を表すブロック図である。この本二値化実行ブロック設定器は、入力された第二ブロック20から画素をサンプリングするサンプリング器(サンプリング手段)21と、画素を第一ブロック二値化閾値算出器3で求めたブロック二値化閾値を用いて二値化する前二値化器(前二値化手段)22と、前二値化器22により黒と判定された画素が存在する場合に第二ブロックおよびその近傍第二ブロックを本二値化実行ブロックと判定する本二値化実行ブロック判定器(本二値化実行ブロック判定手段)23と、を備えて構成され、16x16画素単位の第二ブロックを入力し、その中で二値化後に黒となる画素があるかないかを判定し、黒となる画素が存在するならば当該第二ブロックとその周囲の第二ブロックを本二値化実行ブロックとする。図6に従って具体的に説明する。まず、16x16の第二ブロックが入力され、サンプリング器で画素をサンプリングする。これは、図4のサンプリング器11と同等の働きをする。次に、前二値化器22はサンプリングされた画素を二値化する。当該第二ブロックを含む第一ブロックの第一ブロック二値化閾値とサンプリングされた画素の輝度値とを比較することにより当該画素が二値化される。第一ブロック二値化閾値より画素の輝度値が小さければ黒となり、そうでなければ白となる。第二ブロックの中には4つのサンプリングされた画素が存在するので前二値化器22はこの4つの画素の黒白を出力する。本二値化実行ブロック判定器23は、4つの画素の黒白を入力とし、そのうちひとつ以上黒が存在すれば、図7に示すように注目している第二ブロックb(i、j)とその近傍の三つの第二ブロック(左上b(i−1、j−1)、上b(i、j−1)、左b(i−1、j))において本二値化を実行するための本二値化実行ブロックのフラグを立て、本二値化実行ブロック位置メモリに格納する。   FIG. 6 is a block diagram showing an internal configuration of the binarization execution block setting device. This binarization execution block setting device includes a sampling device (sampling means) 21 that samples pixels from the input second block 20, and a block binary value obtained by the pixels using the first block binarization threshold calculator 3. A pre-binarizer (pre-binarization means) 22 for binarization using a binarization threshold, and a second block and its neighborhood second when there are pixels determined to be black by the pre-binarizer 22 A binarization execution block determination unit (main binarization execution block determination means) 23 that determines a block as a main binarization execution block, and inputs a second block of 16 × 16 pixel units. It is determined whether or not there is a pixel that becomes black after binarization. If there is a pixel that becomes black, the second block and the surrounding second block are set as the binarization execution block. This will be specifically described with reference to FIG. First, a 16 × 16 second block is input, and a pixel is sampled by a sampler. This works in the same way as the sampler 11 of FIG. Next, the pre-binarizer 22 binarizes the sampled pixels. The pixel is binarized by comparing the first block binarization threshold of the first block including the second block with the luminance value of the sampled pixel. If the luminance value of the pixel is smaller than the first block binarization threshold, the pixel is black, otherwise it is white. Since there are four sampled pixels in the second block, the pre-binarizer 22 outputs the black and white of these four pixels. The binarization execution block decision unit 23 receives the black and white of the four pixels, and if one or more of them are present, the second block b (i, j) of interest as shown in FIG. To perform this binarization in the three neighboring second blocks (upper left b (i-1, j-1), upper b (i, j-1), left b (i-1, j)) The flag of the binarization execution block is set and stored in the binarization execution block position memory.

図8は本二値化処理器の内部構成を表すブロック図である。この本二値化処理器6は、入力された第二ブロック33の中から本二値化実行ブロックと判定されたブロックのみを選択する二値化ブロック選択器(二値化ブロック選択手段)34と、ブロック二値化閾値から二値化すべき画素の位置における画素閾値を補間する画素閾値補間器(画素閾値補間手段)32と、第二ブロック33の全画素を画素閾値で二値化する二値化器(二値化手段)35と、を備えて構成され、本二値化処理器6は、本二値化実行ブロックのフラグがたっている第二ブロックのみ二値化処理を実行する。二値化ブロック選択器34は、入力された第二ブロックが本二値化実行ブロックであるか否かを本二値化実行ブロックのフラグにより判定する。本二値化実行ブロックであると判定された場合に、画素閾値補間器32で補間された画素単位の二値化閾値を用いて当該第二ブロックの各画素を二値化器35は二値化する。各画素の輝度値が補間された閾値より小さければ黒(1)、そうでなければ白(0)と判定し、予め全白(オール0)に設定されていた二値画像メモリに黒の情報を書き出す。   FIG. 8 is a block diagram showing the internal configuration of the binarization processor. The present binarization processor 6 selects a binarization block selector (binarization block selection means) 34 for selecting only a block determined to be the present binarization execution block from the input second block 33. A pixel threshold interpolator (pixel threshold interpolation means) 32 for interpolating the pixel threshold at the position of the pixel to be binarized from the block binarization threshold, and binarizing all the pixels of the second block 33 with the pixel threshold. The binarization processing unit 6 executes binarization processing only on the second block for which the flag of the binarization execution block is set. The binarization block selector 34 determines whether or not the input second block is the binarization execution block based on the flag of the binarization execution block. When it is determined that this is the binarization execution block, the binarizer 35 binarizes each pixel of the second block using the binarization threshold of the pixel unit interpolated by the pixel threshold interpolator 32. Turn into. If the luminance value of each pixel is smaller than the interpolated threshold, it is determined to be black (1), otherwise it is determined to be white (0), and black information is stored in the binary image memory that has been set to all white (all 0) in advance. Write out.

図9は画素閾値補間器の詳細な動作説明行なう図である。図9(a)は4つの第一ブロックとその内側に画素単位の二値化閾値を補間する領域を示した図である。斜線部分37が画素単位の二値化閾値を補間する領域で各ブロックの第一ブロック二値化閾値a、b、c、dより二値化閾値を算出する。
次に、図9(b)に基づいて補間方法を説明する。補間領域のサイズ(画素単位)を水平方向xbnum、垂直方向ybnumとする。斜線領域内の左上を原点aとして画素位置を(m、l)と定義すると、
leftth = (a*(ybnum - l)+c*l)/ybnum
rightth = (b*(ybnum - l)+d*l)/ybnum
leftthとrightthより画素の二値化閾値th(m、l)を決定する。
th(m、l) = (leftth*(xbnum-m)+rightth*m)/xbnum
なお、入力画像の端部の場合は、四つのブロック二値化閾値が得られず、一つあるいは二つしか得られない。この場合は得られた第一ブロック二値化閾値を得られていない箇所に代入して使用することにより上記の補間式を使用する。例えば画像の左上端の二値化閾値を求める時、得られる第一ブロック二値化閾値はdのみでa、b、cは得られない。したがってa、b、cの値をdの値で代用する。
FIG. 9 is a diagram for explaining the detailed operation of the pixel threshold interpolator. FIG. 9A is a diagram showing four first blocks and a region in which a binarization threshold value in units of pixels is interpolated. The binarized threshold value is calculated from the first block binarization threshold values a, b, c, and d of each block in the area where the hatched portion 37 interpolates the binarization threshold value in pixel units.
Next, an interpolation method will be described based on FIG. The size (pixel unit) of the interpolation area is defined as a horizontal direction xbnum and a vertical direction ybnum. If the pixel position is defined as (m, l) with the upper left in the shaded area as the origin a,
leftth = (a * (ybnum-l) + c * l) / ybnum
rightth = (b * (ybnum-l) + d * l) / ybnum
The binarization threshold th (m, l) of the pixel is determined from leftth and rightth.
th (m, l) = (leftth * (xbnum-m) + rightth * m) / xbnum
In the case of the edge of the input image, four block binarization threshold values cannot be obtained, and only one or two can be obtained. In this case, the above-described interpolation formula is used by substituting and using the obtained first block binarization threshold in a place where it has not been obtained. For example, when obtaining the binarization threshold value at the upper left corner of the image, the obtained first block binarization threshold value is only d, and a, b, and c are not obtained. Therefore, the values of a, b and c are substituted with the value of d.

図10は本二値化の方法をソフトウェアで実現するときのフローチャートである。図10のフローチャートの詳細を図13〜図15に示し、それを説明する。まず、多値画像を第一ブロック設定ステップS1において、図2のように128x128画素単位のブロックに分割する。   FIG. 10 is a flowchart for realizing the binarization method by software. Details of the flowchart of FIG. 10 are shown in FIGS. 13 to 15 and will be described. First, in the first block setting step S1, the multi-valued image is divided into blocks of 128 × 128 pixels as shown in FIG.

図11は本発明の本二値化実行ブロック設定器の他の実施例を示す図である。同じ構成要素には図6と同じ参照番号を付して説明する。本二値化実行ブロック設定器と異なるのは、前二値化器22で使用する二値化閾値をブロック二値化閾値でなく、画素閾値補間器26により画素単位に補間した二値化閾値とする点である。まず、第二ブロック20が入力され、サンプリング器21はその中から水平垂直それぞれ8画素ごとにサンプリングを行う。画素閾値補間器26はサンプリングされた画素が含まれる第一ブロックおよびその近傍の第一ブロックの二値化閾値を第一ブロック二値化閾値メモリ25から読み出し、サンプリングされた画素の位置における画素閾値を補間する。前二値化器22は補間された閾値とサンプリングされた画素の輝度値を比較することにより二値化を行い、当該第二ブロックが本二値化実行ブロックであるか否かを本二値化実行ブロック判定器23は判定する。ここで使用する画素閾値補間器26の画素補間の手順は図8で示した画素閾値補間器32と同等である。
図6と比較して、画素閾値を補間により求めるためコストが少しアップするが、前二値化器22はより高品質な二値化を行うことが可能になり、本二値化実行ブロック判定をより高精度に行うことができるようになる。
FIG. 11 is a diagram showing another embodiment of the binarization execution block setting device of the present invention. The same components will be described with the same reference numerals as in FIG. The difference from this binarization execution block setting device is that the binarization threshold value used in the previous binarization device 22 is not the block binarization threshold value, but the pixel threshold value interpolator 26 interpolates pixel by pixel. This is the point. First, the second block 20 is input, and the sampler 21 performs sampling every 8 pixels in the horizontal and vertical directions. The pixel threshold interpolator 26 reads the binarization threshold values of the first block including the sampled pixels and the first block in the vicinity thereof from the first block binarization threshold value memory 25, and the pixel threshold value at the position of the sampled pixels Is interpolated. The previous binarizer 22 performs binarization by comparing the interpolated threshold value and the luminance value of the sampled pixel, and determines whether or not the second block is the binarization execution block. The execution block determination unit 23 makes the determination. The pixel interpolation procedure of the pixel threshold interpolator 26 used here is the same as that of the pixel threshold interpolator 32 shown in FIG.
Compared with FIG. 6, the cost is slightly increased because the pixel threshold value is obtained by interpolation, but the previous binarizer 22 can perform binarization with higher quality, and this binarization execution block determination Can be performed with higher accuracy.

図12は本二値化実行ブロック設定ステップを説明するフローチャートである。図12が図14と異なるのは、前二値化ステップS43で使用する二値化閾値を第一ブロック二値化閾値でなく、画素単位に補間した二値化閾値とする点である。図14と異なる点を説明する。前二値化ステップS43の直前に画素閾値補間ステップS42が挿入される。画素閾値補間ステップS42はサンプリングされた画素が属する第一ブロックおよびその近傍のブロックの二値化閾値を用いてサンプリングされた画素の位置における画素閾値を補間する。補間された閾値とサンプリングされた画素の輝度値を比較することにより前二値化を行う。ここで使用する画素閾値補間の手順は図15で示した画素閾値補間ステップS32と同等の手順で画素閾値を補間する。   FIG. 12 is a flowchart for explaining the binarization execution block setting step. FIG. 12 differs from FIG. 14 in that the binarization threshold used in the previous binarization step S43 is not the first block binarization threshold but the binarization threshold interpolated in pixel units. Differences from FIG. 14 will be described. A pixel threshold interpolation step S42 is inserted immediately before the previous binarization step S43. The pixel threshold interpolation step S42 interpolates the pixel threshold at the position of the sampled pixel using the binarization threshold of the first block to which the sampled pixel belongs and the blocks in the vicinity thereof. Pre-binarization is performed by comparing the interpolated threshold value and the luminance value of the sampled pixel. The pixel threshold interpolation procedure used here interpolates the pixel threshold in the same procedure as the pixel threshold interpolation step S32 shown in FIG.

図13は第一ブロック二値化閾値算出ステップを説明するフローチャートである。第一ブロック選択ステップS11において、第一ブロック二値化閾値を算出する対象のブロックを選択する。選択されたブロックは、サンプリングステップS12において、画素の輝度値の平均値を求める演算を行うための画素位置および値を抽出する。サンプリングは図3に示すように、水平垂直それぞれ8画素おきにサンプリングされる。サンプリングされた画素値は低輝度除外ステップS13において低輝度除外閾値と比較される。画素値が低輝度除外閾値より高ければ、次の平均輝度算出ステップS14に出力されて平均輝度を算出する対象となるが、それ以下の場合は出力されない。平均輝度算出ステップS14は平均輝度算出の対象となる画素値を加算し、その平均値を算出する。もし、ブロック内に平均輝度を算出する対象画素が存在しない場合は、後述する第一ブロック二値化閾値算出ステップS15の出力が低輝度除外閾値と等しい値になるような所定の値を出力する。第一ブロック二値化閾値算出ステップは平均輝度算出ステップが算出した平均輝度に1未満の正の係数を乗算してブロック二値化閾値を算出する。   FIG. 13 is a flowchart for explaining the first block binarization threshold value calculation step. In the first block selection step S11, a target block for calculating the first block binarization threshold is selected. The selected block extracts a pixel position and a value for performing calculation for obtaining an average value of the luminance values of the pixels in the sampling step S12. As shown in FIG. 3, sampling is performed every 8 pixels in the horizontal and vertical directions. The sampled pixel value is compared with a low luminance exclusion threshold value in a low luminance exclusion step S13. If the pixel value is higher than the low-luminance exclusion threshold, it is output to the next average luminance calculation step S14 to be the target for calculating the average luminance. In the average luminance calculation step S14, pixel values to be subjected to average luminance calculation are added, and the average value is calculated. If there is no target pixel for calculating the average luminance in the block, a predetermined value is output so that the output of the first block binarization threshold calculation step S15 described later is equal to the low luminance exclusion threshold. . The first block binarization threshold calculation step calculates the block binarization threshold by multiplying the average luminance calculated by the average luminance calculation step by a positive coefficient less than 1.

図14は本二値化実行ブロック設定ステップを説明するフローチャートである。第二ブロック設定ステップは、図5のように画像を16x16画素単位のブロックに分割する。本二値化実行ブロック設定ステップは、第二ブロック全体から本二値化を実行するブロックを決定する。第二ブロック選択ステップS20において、前二値化するための第二ブロックを選択する。選択された第二ブロックはサンプリングステップS21で画素を数画素毎(例えば4画素)にサンプリングを行い、選択抽出された画素位置の輝度は前二値化ステップS22において、画素の位置が属する第一ブロックの第一ブロック二値化閾値と比較され、ブロック二値化閾値より画素の輝度値が大きければ白、そうでなければ黒と判定する。選択された第二ブロック内のサンプリングされた画素が1つ以上黒画素であれば本二値化フラグ設定ステップS24において、当該第二ブロックおよび近傍のブロックを本二値化の対象とする本二値化フラグを立てる。近傍のブロックとは、図7で示すように、右下のブロックが当該第二ブロックとすると、その左上、上、左の3つのブロックのことをいう。したがって、当該ブロックおよび近傍3ブロックの4つのブロックを本二値化実行ブロックと判定する。   FIG. 14 is a flowchart for explaining the binarization execution block setting step. In the second block setting step, the image is divided into blocks of 16 × 16 pixel units as shown in FIG. In the binarization execution block setting step, a block for executing the binarization is determined from the entire second block. In the second block selection step S20, a second block for pre-binarization is selected. The selected second block samples the pixels every several pixels (for example, 4 pixels) in the sampling step S21, and the luminance of the selected pixel position is the first pixel to which the pixel position belongs in the previous binarization step S22. It is compared with the first block binarization threshold of the block, and if the luminance value of the pixel is larger than the block binarization threshold, it is determined to be white, otherwise it is determined to be black. If one or more sampled pixels in the selected second block are one or more black pixels, in the present binarization flag setting step S24, the second block and the neighboring blocks that are subject to the binarization are selected. Set the value flag. As shown in FIG. 7, the neighboring block means three blocks on the upper left, upper, and left when the lower right block is the second block. Therefore, the four blocks of the block and the neighboring three blocks are determined as the binarization execution block.

図15は本二値化処理ステップを説明するフローチャートである。第二ブロック選択ステップS30で第二ブロックを選択し、当該ブロックが本二値化フラグを有するか否かを判定する(S31)。<本二値化フラグ>を有すると判定したときは、画素閾値補間ステップS32において、当該画素位置における画素閾値を第一ブロック二値化閾値から補間する。そうでなければ次のブロックを選択する。この補間方法は既に述べたものと同等である。その後、補間した画素閾値を用いて本二値化ステップS33で画素の二値化を行う。画素の輝度値が画素閾値と比較して大きければ白、そうでなければ黒と判定する。全ての画素、全てのブロックに対して本二値化処理を行って終了とする。
全ての実施形態にいえることだが、本二値化の際に、画素単位で二値化閾値を補間している。これを画素単位ではなく、2x2画素等のさらに小さいブロック単位で求めるならば、演算量は減少し、更なる二値化実行の高速化を図ることができる。
FIG. 15 is a flowchart for explaining the binarization processing step. The second block is selected in the second block selection step S30, and it is determined whether or not the block has the present binarization flag (S31). When it is determined that the <binarization flag> is present, the pixel threshold at the pixel position is interpolated from the first block binarization threshold in the pixel threshold interpolation step S32. Otherwise, select the next block. This interpolation method is equivalent to that already described. Thereafter, the pixel is binarized in this binarization step S33 using the interpolated pixel threshold. If the luminance value of the pixel is larger than the pixel threshold value, it is determined to be white, otherwise it is determined to be black. This binarization process is performed on all pixels and all blocks, and the process ends.
As in all the embodiments, the binarization threshold value is interpolated in units of pixels during the binarization. If this is calculated not in units of pixels but in units of smaller blocks such as 2 × 2 pixels, the amount of calculation is reduced, and further speeding up of binarization can be achieved.

本発明の画像二値化装置を表すブロック図である。It is a block diagram showing the image binarization apparatus of this invention. 画像を128x128画素単位のブロックに分割した図である。It is the figure which divided | segmented the image into the block of a 128x128 pixel unit. 水平垂直それぞれ8画素毎にサンプリングする図である。It is a figure which samples every 8 pixels horizontally and vertically. 第一ブロック二値化閾値算出器の内部構成を表すブロック図である。It is a block diagram showing the internal structure of a 1st block binarization threshold value calculator. 画像を16x16画素単位の第二ブロックに分割した図である。It is the figure which divided | segmented the image into the 2nd block of a 16x16 pixel unit. 本二値化実行ブロック設定器の内部構成を表すブロック図である。It is a block diagram showing the internal structure of this binarization execution block setting device. 本二値化実行ブロック判定を説明する図である。It is a figure explaining this binarization execution block determination. 本二値化処理器の内部構成を表すブロック図である。It is a block diagram showing the internal structure of this binarization processor. 画素閾値補間器の詳細な動作説明行なう図である。It is a figure explaining detailed operation | movement of a pixel threshold value interpolator. 本二値化の方法をソフトウェアで実現するときのフローチャートである。It is a flowchart when implement | achieving this binarization method by software. 本発明の本二値化実行ブロック設定器の他の実施例を示す図である。It is a figure which shows the other Example of this binarization execution block setting device of this invention. 本二値化実行ブロック設定ステップを説明するフローチャートである。It is a flowchart explaining this binarization execution block setting step. 第一ブロック二値化閾値算出ステップを説明するフローチャートである。It is a flowchart explaining a 1st block binarization threshold value calculation step. 本二値化実行ブロック設定ステップを説明するフローチャートである。It is a flowchart explaining this binarization execution block setting step. 本二値化処理ステップを説明するフローチャートである。It is a flowchart explaining this binarization process step.

符号の説明Explanation of symbols

1 多値画像、2 第一ブロック設定器、3 第一ブロック二値化閾値算出器、4 第二ブロック設定器、5 本二値化実行ブロック設定器、6 本二値化処理器、7 二値化画像、100 画像二値化装置   1 multi-valued image, 2 first block setter, 3 first block binarization threshold calculator, 4 second block setter, 5 binarization execution block setter, 6 binarization processor, 7 2 Binary image, 100 image binarization device

Claims (10)

多値画像を入力し、該多値画像に対して複数の画素を含むブロックを設定する第一ブロック設定手段と、
該第一ブロック設定手段により設定された第一ブロック内のブロック毎のブロック二値化閾値を輝度平均値に基づいて算出するブロック二値化閾値算出手段と、
前記多値画像に対して第一のブロックより少ない画素を含む第二のブロックを設定する第二のブロック設定手段と、
該第二のブロック設定手段により設定された第二のブロック内の画素の輝度値と前記ブロック二値化閾値とを比較し、該輝度値が小さい場合に、注目している前記第二ブロックおよび注目している当該第二のブロックに隣接する複数第二のブロックを本二値化実行ブロックに設定する本二値化実行ブロック設定手段と、
該本二値化実行ブロック設定手段により設定された二値化実行ブロック内において、各画素の輝度値と、該画素の周辺の前記複数の第一のブロックのブロック二値化閾値に基づいて算出した画素閾値とを比較して二値化を実行する本二値化手段と、を備えたことを特徴とする画像二値化装置。
A first block setting means for inputting a multi-value image and setting a block including a plurality of pixels for the multi-value image;
Block binarization threshold value calculating means for calculating a block binarization threshold value for each block in the first block set by the first block setting means based on the luminance average value;
A second block setting means for setting a second block containing fewer pixels than the first block with respect to the multi-valued image,
Comparing the brightness value of the pixel of the second block set by said second block setting means and the said block binarization threshold, if the luminance value is small, the second block of interest and the binarization execution block setting means in which a plurality of the second block is set to the binarization execution block and adjacent to the second block of interest,
This in binarization execution block set by the main binarization execution block setting means, and the luminance value of each pixel, based on the block binarization threshold of the plurality of first blocks surrounding the pixel An image binarization apparatus comprising: a binarization unit that performs binarization by comparing with a calculated pixel threshold value.
前記ブロック二値化閾値算出手段は、入力された第一ブロックから画素をサンプリングするサンプリング手段と、該画素が低輝度値を有する場合に輝度平均算出の対象から除外するための低輝度除外手段と、平均輝度を算出する平均輝度算出手段と、該平均輝度より所定の演算によりブロック二値化閾値を算出するブロック二値化閾値算出手段と、を備えたことを特徴とする請求項1に記載の画像二値化装置。   The block binarization threshold value calculation means includes sampling means for sampling pixels from the input first block, and low luminance exclusion means for excluding them from the target of luminance average calculation when the pixels have low luminance values. The average luminance calculation means for calculating the average luminance, and the block binarization threshold value calculation means for calculating a block binarization threshold value by a predetermined calculation from the average luminance. Image binarization device. 前記本二値化実行ブロック設定手段は、入力された第二ブロックから画素をサンプリングするサンプリング手段と、該画素を前記ブロック二値化閾値算出手段で求めたブロック二値化閾値を用いて二値化する前二値化手段と、該前二値化手段により黒と判定された画素が存在する場合に該注目している第二ブロックおよび注目している第二のブロックに隣接する複数の第二ブロックを本二値化実行ブロックと判定する本二値化実行ブロック判定手段と、を備えたことを特徴とする請求項1に記載の画像二値化装置。 The present binarization execution block setting means, two with a sampling means for sampling the pixels from the second block input, the block binarization threshold determined the pixel in the block binarized threshold calculating means before binarizing means for binarizing a plurality of adjacent second block being the second block and interest are the focus when there are pixels determined as black by front binarizing means image binarization apparatus of claim 1, the second the block and the binarization execution blocks and determining the binarizing performed block determination unit, characterized by comprising a. 前記本二値化手段は、入力された第二ブロックの中から本二値化実行ブロックと判定されたブロックのみを選択する二値化ブロック選択手段と、前記第二ブロックの全画素を前記画素閾値で二値化する二値化手段と、を備えたことを特徴とする請求項1に記載の画像二値化装置。 The present binarizing means, said a binarization block selecting means for selecting only the blocks determined as the binarization execution block from the second block input, all the pixels of the second block The image binarization apparatus according to claim 1, further comprising: binarization means for binarizing with a pixel threshold value. 前記本二値化手段は、第二ブロックを入力し本二値化実行ブロックを選択して出力する二値化ブロック選択手段と、前記選択された第二のブロック内の複数の画素からなる画素塊周辺の複数の第一のブロックに対応するブロック二値化閾値から前記画素塊に対する二値化閾値を算出する画素閾値補間手段と、前記第二ブロックの全画素を前記画素塊を単位として算出した二値化閾値で二値化する二値化手段とを有することを特徴とする請求項1に記載の画像二値化装置。 The present binarizing means receives the second block, the binarization block selecting means for selecting and outputting the binarized execution block, a plurality of pixels of the second block of the selected a pixel threshold interpolation means for calculating a binarization threshold value for the pixel block from the block binarization thresholds corresponding to the plurality of first blocks of the peripheral pixel blocks comprising, the pixel block of all the pixels of the second block The image binarization apparatus according to claim 1, further comprising: binarization means for binarizing with a binarization threshold calculated as a unit. 多値画像を入力し、該多値画像に対して複数の画素を含むブロックを設定する第一ブロック設定ステップと、
該第一ブロック設定ステップにより設定された第一ブロック内のブロック毎のブロック二値化閾値を輝度平均値に基づいて算出するブロック二値化閾値算出ステップと、
前記多値画像に対して第一のブロックより少ない画素を含む第二のブロックを設定する第二のブロック設定ステップと、
該第二のブロック設定ステップにより設定された第二のブロック内の画素の輝度値と前記ブロック二値化閾値とを比較し、該輝度値が小さい場合に、注目している前記第二ブロックおよび注目している当該第二のブロックに隣接する複数第二のブロックを本二値化実行ブロックに設定する本二値化実行ブロック設定ステップと、
該本二値化実行ブロック設定手段により設定された二値化実行ブロック内において、各画素の輝度値と、該画素の周辺の前記複数の第一のブロックのブロック二値化閾値に基づいて算出した画素閾値とを比較して二値化を実行する本二値化ステップと、を有することを特徴とする画像二値化方法。
A first block setting step for inputting a multi-value image and setting a block including a plurality of pixels for the multi-value image;
A block binarization threshold value calculating step for calculating a block binarization threshold value for each block in the first block set by the first block setting step based on the luminance average value;
A second block setting step of setting a second block containing fewer pixels than the first block with respect to the multi-valued image,
Comparing the brightness value of the pixel of the second block set by said second block setting step and the said block binarization threshold, if the luminance value is small, the second block of interest and the binarization execution block setting step in which a plurality of the second block is set to the binarization execution block and adjacent to the second block of interest,
This in binarization execution block set by the main binarization execution block setting means, and the luminance value of each pixel, based on the block binarization threshold of the plurality of first blocks surrounding the pixel An image binarization method comprising: a binarization step for performing binarization by comparing with a calculated pixel threshold value.
前記ブロック二値化閾値算出ステップは、入力された第一ブロックから画素をサンプリングするサンプリングステップと、該画素が低輝度値を有する場合に輝度平均算出の対象から除外するための低輝度除外ステップと、平均輝度を算出するステップと、該平均輝度より所定の演算によりブロック二値化閾値を算出するステップと、を有することを特徴とする請求項6に記載の画像二値化方法。   The block binarization threshold value calculating step includes a sampling step for sampling pixels from the input first block, and a low luminance exclusion step for excluding from the target of luminance average calculation when the pixel has a low luminance value; The image binarization method according to claim 6, further comprising: calculating an average luminance, and calculating a block binarization threshold value by a predetermined calculation from the average luminance. 前記本二値化実行ブロック設定ステップは、入力された第二ブロックから画素をサンプリングするサンプリングステップと、該画素を前記ブロック二値化閾値算出ステップで求めたブロック二値化閾値を用いて二値化する前二値化ステップと、該前二値化ステップにより黒と判定された画素が存在する場合に該注目している第二ブロックおよび注目している第二のブロックに隣接する複数の第二ブロックを本二値化実行ブロックと判定する本二値化実行ブロック判定ステップと、を有することを特徴とする請求項6に記載の画像二値化方法。 The present binarization execution block setting step, two with a sampling step of sampling the pixels from the second block input, the block binarization threshold determined the pixel in the block binarized threshold calculating step a binarization step prior to digitizing, a plurality adjacent to the second block being the second block and interest are the focus when there are pixels determined as black by the front binarization step image binarization method of claim 6, characterized in that it comprises second and the binarization execution block determining step determines that the binarization execution block blocks, a. 前記本二値化ステップは、入力された第二ブロックの中から本二値化実行ブロックと判定されたブロックのみを選択する二値化ブロック選択ステップと、ブロック二値化閾値から二値化すべき画素の位置における画素閾値を補間する画素閾値補間ステップと、該第二ブロックの全画素を該画素閾値で二値化する二値化ステップと、を有することを特徴とする請求項6に記載の画像二値化方法。   The binarization step should be binarized from a binarization block selection step for selecting only a block determined to be the binarization execution block from the input second block, and a block binarization threshold. The pixel threshold interpolation step for interpolating the pixel threshold at the pixel position, and the binarization step for binarizing all the pixels in the second block with the pixel threshold. Image binarization method. 前記本二値化ステップは、第二ブロックを入力し本二値化実行ブロックを選択して出力する二値化ブロック選択ステップと、前記選択された第二のブロック内の複数の画素からなる画素塊周辺の複数の第一のブロックに対応するブロック二値化閾値から前記画素塊に対する二値化閾値を算出する画素閾値補間ステップと、前記第二のブロックの全画素を前記画素塊を単位として算出した二値化閾値で二値化する二値化手段とを有することを特徴とする請求項6に記載の画像二値化方法。 The present binarization step is to enter the second block, the binarization block selecting step of selecting and outputting the binarized execution block, a plurality of pixels of the second block of the selected a pixel threshold interpolation calculating a binarization threshold value for the pixel block from the block binarization thresholds corresponding to the plurality of first blocks of the peripheral pixel blocks comprising, the pixel block of all the pixels of the second block The image binarization method according to claim 6, further comprising: binarization means for binarizing with a binarization threshold calculated as a unit.
JP2006332637A 2006-12-08 2006-12-08 Image binarization apparatus and image binarization method Expired - Fee Related JP4700597B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006332637A JP4700597B2 (en) 2006-12-08 2006-12-08 Image binarization apparatus and image binarization method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006332637A JP4700597B2 (en) 2006-12-08 2006-12-08 Image binarization apparatus and image binarization method

Publications (2)

Publication Number Publication Date
JP2008147983A JP2008147983A (en) 2008-06-26
JP4700597B2 true JP4700597B2 (en) 2011-06-15

Family

ID=39607668

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006332637A Expired - Fee Related JP4700597B2 (en) 2006-12-08 2006-12-08 Image binarization apparatus and image binarization method

Country Status (1)

Country Link
JP (1) JP4700597B2 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001008032A (en) * 1999-04-21 2001-01-12 Ricoh Co Ltd Image binarization device, image pickup device, image binarization method, image pickup method and computer- readable recording medium recording program to activate computer as each process of the method
JP2002354248A (en) * 2001-05-23 2002-12-06 Ricoh Co Ltd Method, device and program for binarizing image

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001008032A (en) * 1999-04-21 2001-01-12 Ricoh Co Ltd Image binarization device, image pickup device, image binarization method, image pickup method and computer- readable recording medium recording program to activate computer as each process of the method
JP2002354248A (en) * 2001-05-23 2002-12-06 Ricoh Co Ltd Method, device and program for binarizing image

Also Published As

Publication number Publication date
JP2008147983A (en) 2008-06-26

Similar Documents

Publication Publication Date Title
JP3768052B2 (en) Color image processing method, color image processing apparatus, and recording medium therefor
JP5887770B2 (en) Image processing apparatus and image processing program
KR101172399B1 (en) Image forming apparatus and image improvement method thereof
JP3576810B2 (en) Image processing device
KR20130016213A (en) Text enhancement of a textual image undergoing optical character recognition
KR101597739B1 (en) Image processing apparatus, image processing method, and computer readable medium
KR20080021832A (en) Binarization of an image
US20090185236A1 (en) Image binarization using dynamic sub-image division
US7885486B2 (en) Image processing system, method for processing image and computer readable medium
JP5818552B2 (en) Image processing apparatus, image processing method, and program
US8538191B2 (en) Image correction apparatus and method for eliminating lighting component
JP5870745B2 (en) Image processing apparatus, binarization threshold value calculation method, and computer program
US9332154B2 (en) Image binarization using dynamic sub-image division
JP2009152901A (en) Image processing device, and image processing method
JP4454297B2 (en) Binarization processing apparatus and binarization processing method
JP4700597B2 (en) Image binarization apparatus and image binarization method
JP3906221B2 (en) Image processing method and image processing apparatus
JP7030425B2 (en) Image processing device, image processing method, program
JP6826472B2 (en) Image processing device and its control method
JP2004104635A (en) Image processing apparatus
JP4728297B2 (en) Two-dimensional code reading apparatus and method
JP2008021207A (en) Image processing system and image processing program
JP2002300404A (en) Image processing method and image processor
JP6548857B1 (en) Deformation detection device and deformation detection method
JP3358133B2 (en) Image processing device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090907

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20101118

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20101214

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110202

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20110222

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110304

LAPS Cancellation because of no payment of annual fees