JP7357853B2 - Image processing device, image processing method, and image processing program - Google Patents

Image processing device, image processing method, and image processing program Download PDF

Info

Publication number
JP7357853B2
JP7357853B2 JP2019196511A JP2019196511A JP7357853B2 JP 7357853 B2 JP7357853 B2 JP 7357853B2 JP 2019196511 A JP2019196511 A JP 2019196511A JP 2019196511 A JP2019196511 A JP 2019196511A JP 7357853 B2 JP7357853 B2 JP 7357853B2
Authority
JP
Japan
Prior art keywords
gradation value
threshold
value
processing
local
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
Application number
JP2019196511A
Other languages
Japanese (ja)
Other versions
JP2021072484A (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.)
Kyocera Document Solutions Inc
Original Assignee
Kyocera Document Solutions Inc
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 Kyocera Document Solutions Inc filed Critical Kyocera Document Solutions Inc
Priority to JP2019196511A priority Critical patent/JP7357853B2/en
Priority to US17/075,813 priority patent/US11128781B2/en
Publication of JP2021072484A publication Critical patent/JP2021072484A/en
Application granted granted Critical
Publication of JP7357853B2 publication Critical patent/JP7357853B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、画像処理装置、画像処理方法及び画像処理プログラムに関し、特に、二値化処理技術に関する。 The present invention relates to an image processing device, an image processing method, and an image processing program, and particularly relates to a binarization processing technique.

地肌ノイズが含まれている原稿を読取り、その読取画像を二値化処理すると不要な地肌ノイズが残存する問題がある。このような問題に対し、たとえば特許文献1は、入力画像の濃度ヒストグラムにおいて、各濃度に対する度数の移動平均を求め、その結果の最大度数に対する濃度値に基づいて二値化スライスレベルを求め、二値化を行う技術を提案している。しかしながら、閾値は、移動平均を取った後のヒストグラムが明確な双峰性を持つことを前提として簡易な方法で設定されているので、明確な双峰性が無い場合には、閾値を設定することができないという問題がある。一方、特許文献2は、n×n画素の「セル」を取得し、そのセルを中心にm×m画素(n<m)の測定領域を設定し、測定領域内の輝度ヒストグラムからセルに対する局所的しきい値を求め、予め設定された制限値の範囲内で局所的しきい値を用いてセルを2値化する技術を提案している。予め設定された制限値の範囲内としているのは、ノイズ成分の取り出しを抑制するためである。 When a document containing background noise is read and the read image is subjected to binarization processing, there is a problem that unnecessary background noise remains. To solve this problem, for example, Patent Document 1 calculates a moving average of the frequency for each density in the density histogram of an input image, calculates a binarized slice level based on the resulting density value for the maximum frequency, and We are proposing a technology for converting values into values. However, the threshold is set using a simple method on the assumption that the histogram after taking the moving average has clear bimodality, so if there is no clear bimodality, the threshold cannot be set. The problem is that I can't. On the other hand, in Patent Document 2, a "cell" of n×n pixels is acquired, a measurement area of m×m pixels (n<m) is set around the cell, and a local area for the cell is determined from a brightness histogram in the measurement area. proposed a technique to obtain a local threshold value and binarize cells using a local threshold value within a preset limit value. The reason for setting the value within the preset limit value is to suppress extraction of noise components.

特開平7-262348号公報Japanese Patent Application Publication No. 7-262348 特開2001-245148号公報Japanese Patent Application Publication No. 2001-245148

しかしながら、本願発明者の知見によれば、地肌の濃度分布が広い場合には、明確な双峰性が認められない場合も多く、特許文献1は、このような画像の二値化に対応することができないという問題がある。一方、本願発明者の解析によれば、ノイズ成分の発生は、地肌の濃度に応じて変動するので、予め設定されている固定の制限値では、ノイズ成分の取り出しと薄い図形や文字の消滅のトレードオフの問題から逃れられないという問題がある。 However, according to the knowledge of the inventor of the present application, when the density distribution of the background is wide, clear bimodality is often not recognized, and Patent Document 1 deals with the binarization of such an image. The problem is that I can't. On the other hand, according to the inventor's analysis, since the generation of noise components varies depending on the density of the background, it is difficult to extract noise components and eliminate thin figures and characters using fixed limit values set in advance. The problem is that we cannot escape the problem of trade-offs.

本発明は、このような状況に鑑みてなされたものであり、低濃度画像の判別と画像ノイズの抑制の両立を改善する二値化処理技術を提供することを目的とする。 The present invention has been made in view of this situation, and an object of the present invention is to provide a binarization processing technique that improves both the discrimination of low-density images and the suppression of image noise.

本発明の画像処理装置は、入力画像データに対して判別分析法で第1のクラスの平均階調値である第1の平均階調値と、背景画像を比較的に多く含む側である第2のクラスの平均階調値である第2の平均階調値とを算出するヒストグラム解析部と、前記第1の平均階調値と前記第2の平均階調値の間において、閾値を調整するためのユーザー入力を受け付ける操作表示部と、前記操作表示部に入力されたユーザー入力に応じて前記閾値を調整し、前記調整された閾値を使用して二値化処理を実行する二値化処理部とを備え、前記操作表示部は、前記閾値を操作に応じて実時間で前記二値化処理後の画像を表示する。 The image processing device of the present invention uses a discriminant analysis method for input image data to determine a first average gradation value, which is an average gradation value of a first class, and a first average gradation value, which is an average gradation value of a first class, and a first average gradation value, which is an average gradation value of a first class, and a first average gradation value, which is an average gradation value of a first class, and a first average gradation value, which is an average gradation value of a first class, for input image data. a histogram analysis unit that calculates a second average gradation value that is an average gradation value of the second class; and a threshold value is adjusted between the first average gradation value and the second average gradation value. an operation display unit that accepts user input to perform the operation; and binarization that adjusts the threshold according to the user input input to the operation display unit and executes binarization processing using the adjusted threshold. and a processing section, and the operation display section displays the image after the binarization process in real time according to the operation of the threshold value.

本発明の画像形成方法は、入力画像データに対して判別分析法で第1のクラスの平均階調値である第1の平均階調値と、背景画像を比較的に多く含む側である第2のクラスの平均階調値である第2の平均階調値とを算出するヒストグラム解析工程と、前記第1の平均階調値と前記第2の平均階調値の間において、閾値を調整するためのユーザー入力を受け付ける操作表示工程と、前記操作表示工程で入力されたユーザー入力に応じて前記閾値を調整し、前記調整された閾値を使用して二値化処理を実行する二値化処理工程とを備え、前記操作表示工程は、前記閾値を操作に応じて実時間で前記二値化処理後の画像を表示する。 The image forming method of the present invention uses a discriminant analysis method for input image data to determine a first average gradation value, which is an average gradation value of a first class, and a first average gradation value, which is the average gradation value of the first class, and a first average gradation value, which is the average gradation value of the first class, and a first average gradation value, which is the average gradation value of the first class, and a first average gradation value, which is the average gradation value of the first class, and a histogram analysis step of calculating a second average gradation value that is an average gradation value of the second class; and adjusting a threshold between the first average gradation value and the second average gradation value. an operation/display step for accepting user input for the operation and display; and a binarization step for adjusting the threshold according to the user input input in the operation/display step, and performing a binarization process using the adjusted threshold. and a processing step, and the operation display step displays the binarized image in real time according to the operation of the threshold value.

本発明の画像処理プログラムは、入力画像データに対して判別分析法で第1のクラスの平均階調値である第1の平均階調値と、背景画像を比較的に多く含む側である第2のクラスの平均階調値である第2の平均階調値とを算出するヒストグラム解析部、前記第1の平均階調値と前記第2の平均階調値の間において、閾値を調整するためのユーザー入力を受け付ける操作表示部、及び前記操作表示部に入力されたユーザー入力に応じて前記閾値を調整し、前記調整された閾値を使用して二値化処理を実行する二値化処理部として画像処理装置を機能させ、前記操作表示部は、前記閾値を操作に応じて実時間で前記二値化処理後の画像を表示する。 The image processing program of the present invention uses a discriminant analysis method for input image data to determine a first average gradation value, which is an average gradation value of a first class, and a first average gradation value, which is an average gradation value of a first class, and a first average gradation value, which is an average gradation value of a first class. a histogram analysis unit that calculates a second average gradation value that is an average gradation value of the second class, and adjusts a threshold between the first average gradation value and the second average gradation value; an operation display unit that accepts user input for the operation, and a binarization process that adjusts the threshold according to the user input input to the operation display unit and executes the binarization process using the adjusted threshold. The operation display section displays the binarized image in real time according to the operation of the threshold value.

本発明によれば、低濃度画像の判別と画像ノイズの抑制の両立を改善する二値化処理技術を提供することができる。 According to the present invention, it is possible to provide a binarization processing technique that improves both the discrimination of low-density images and the suppression of image noise.

本発明の第1実施形態に係る画像形成装置10の全体構成を示す概略構成図である。1 is a schematic configuration diagram showing the overall configuration of an image forming apparatus 10 according to a first embodiment of the present invention. 第1実施形態に係る画像形成装置10の機能的構成を示すブロックダイアグラムである。1 is a block diagram showing a functional configuration of an image forming apparatus 10 according to a first embodiment. 読取画像及び読取画像の輝度ヒストグラムを示す説明図である。FIG. 3 is an explanatory diagram showing a read image and a brightness histogram of the read image. 比較例に係る二値化処理及び比較例の二値化処理用閾値THcを示す説明図である。FIG. 7 is an explanatory diagram showing a binarization process according to a comparative example and a threshold value THc for the binarization process of the comparative example. 第1実施形態に係る二値化処理手順の内容を示すフローチャートである。It is a flowchart which shows the content of the binarization processing procedure based on 1st Embodiment. 第1実施形態に係るローパスフィルタ処理の内容を示す説明図である。FIG. 3 is an explanatory diagram showing the contents of low-pass filter processing according to the first embodiment. 第1実施形態に係るページ閾値設定処理の内容を示すフローチャートである。It is a flowchart which shows the content of page threshold value setting processing concerning a 1st embodiment. 第1実施形態に係るページ閾値設定処理の内容を示す説明図である。It is an explanatory diagram showing the contents of page threshold value setting processing concerning a 1st embodiment. 第1実施形態及び比較例に係る地肌ノイズ判定用閾値設定処理の内容を示す説明図である。FIG. 7 is an explanatory diagram illustrating the content of background noise determination threshold setting processing according to the first embodiment and the comparative example. 第1実施形態及び比較例に係る地肌ノイズ除去処理の内容を示す説明図である。FIG. 3 is an explanatory diagram showing the content of background noise removal processing according to the first embodiment and the comparative example. 第1実施形態に係る地肌ノイズ除去処理及び二値化処理の内容を示す説明図である。FIG. 3 is an explanatory diagram showing the contents of background noise removal processing and binarization processing according to the first embodiment. 第1実施形態に係る二値化処理の内容を示すフローチャートである。It is a flowchart which shows the content of the binarization process based on 1st Embodiment. 第1実施形態に係る着目局所領域選択の様子を示す説明図である。FIG. 3 is an explanatory diagram showing how to select a local region of interest according to the first embodiment. 第1実施形態に係る切替用閾値THSを示すグラフである。It is a graph which shows the threshold value THS for switching based on 1st Embodiment. 第1実施形態に係る二値化処理の内容を示す説明図である。It is an explanatory diagram showing the contents of binarization processing concerning a 1st embodiment. 第2実施形態に係る二値化用閾値調整処理の内容を示すフローチャートである。It is a flowchart which shows the content of the threshold value adjustment process for binarization based on 2nd Embodiment. 第2実施形態に係る操作表示画面を示す説明図である。FIG. 7 is an explanatory diagram showing an operation display screen according to the second embodiment. 変形例に係るフィルタ処理の内容を示す説明図である。It is an explanatory view showing the contents of filter processing concerning a modification.

以下、本発明を実施するための形態(以下、「実施形態」という)を、図面を参照して以下の順序で説明する。
A.第1実施形態:
B.第2実施形態:
C.変形例:
DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, modes for carrying out the present invention (hereinafter referred to as "embodiments") will be described in the following order with reference to the drawings.
A. First embodiment:
B. Second embodiment:
C. Variant:

A.第1実施形態:
図1は、本発明の第1実施形態に係る画像形成装置10の全体構成を示す概略構成図である。図2は、第1実施形態に係る画像形成装置10の機能的構成を示すブロックダイアグラムである。画像形成装置10は、画像読取部100と、制御部210と、画像形成部220と、操作表示部230と、記憶部240と、FAX処理部250とを備えている。画像読取部100は、自動原稿送り装置(ADF)160と原稿台(コンタクトガラス)150とを有し、原稿から画像(原画像)を読み取ってデジタルデータである画像データIDを生成する。
A. First embodiment:
FIG. 1 is a schematic configuration diagram showing the overall configuration of an image forming apparatus 10 according to a first embodiment of the present invention. FIG. 2 is a block diagram showing the functional configuration of the image forming apparatus 10 according to the first embodiment. The image forming apparatus 10 includes an image reading section 100, a control section 210, an image forming section 220, an operation display section 230, a storage section 240, and a FAX processing section 250. The image reading unit 100 includes an automatic document feeder (ADF) 160 and a document table (contact glass) 150, reads an image (original image) from a document, and generates an image data ID that is digital data.

画像形成部220は、画像データIDに基づいて印刷媒体(図示せず)に画像を形成して排出する。画像形成部220は、色変換処理部221と、ハーフトーン処理部222と、画像出力部223とを備える。色変換処理部221は、RGBデータである画像データIDをCMYK画像データに色変換する。ハーフトーン処理部222は、ハーフトーン処理を実行してCMYK画像データのハーフトーンデータを生成する。画像出力部223は、ハーフトーンデータに基づいて画像を形成する。操作表示部230は、タッチパネルとして機能するディスプレイ(図示せず)や各種ボタンやスイッチ(図示せず)からユーザーの操作入力を受け付ける。 The image forming unit 220 forms an image on a print medium (not shown) based on the image data ID and discharges the print medium. The image forming section 220 includes a color conversion processing section 221, a halftone processing section 222, and an image output section 223. The color conversion processing unit 221 converts the image data ID, which is RGB data, into CMYK image data. The halftone processing unit 222 performs halftone processing to generate halftone data of CMYK image data. The image output unit 223 forms an image based on the halftone data. The operation display unit 230 receives user operation inputs from a display (not shown) functioning as a touch panel and various buttons and switches (not shown).

制御部210は、RAMやROM等の主記憶手段、及びMPU(Micro Processing Unit)やCPU(Central Processing Unit)等の制御手段を備えている。また、制御部210は、各種I/O、USB(ユニバーサル・シリアル・バス)、バス、その他ハードウェア等のインターフェイスに関連するコントローラ機能を備え、画像形成装置10全体を制御する。 The control unit 210 includes main storage means such as RAM and ROM, and control means such as MPU (Micro Processing Unit) and CPU (Central Processing Unit). Further, the control unit 210 has controller functions related to interfaces such as various I/Os, a USB (universal serial bus), a bus, and other hardware, and controls the entire image forming apparatus 10 .

記憶部240は、非一時的な記録媒体であるハードディスクドライブやフラッシュメモリー等からなる記憶装置で、制御部210や二値化処理部140が実行する処理の制御プログラム(画像処理プログラムを含む。)やデータを記憶する。 The storage unit 240 is a storage device that is a non-temporary recording medium such as a hard disk drive or flash memory, and stores control programs (including image processing programs) for processing executed by the control unit 210 and the binarization processing unit 140. and memorize data.

画像読取部100は、図2に示されるように、光源ドライバ111と、光源112とを備えている。光源112は、原稿Dに光を照射する複数のLED(図示せず)を有する。光源ドライバ111は、主走査方向に配列されている複数のLEDを駆動するLEDドライバであり、光源112のオンオフ駆動制御を行う。これにより、光源112は、可変の駆動デューティのパルス幅変調(PWM)で原稿Dの原稿面を照射光L1で照射することができる。 The image reading unit 100 includes a light source driver 111 and a light source 112, as shown in FIG. The light source 112 includes a plurality of LEDs (not shown) that irradiate the document D with light. The light source driver 111 is an LED driver that drives a plurality of LEDs arranged in the main scanning direction, and performs on/off drive control of the light source 112. Thereby, the light source 112 can irradiate the document surface of the document D with the irradiation light L1 using pulse width modulation (PWM) with variable drive duty.

照射光L1は、原稿Dの面に垂直な方向に対して45度(傾斜した方向)の角度で照射される。原稿Dは、拡散反射光L2と、正反射光とを含む反射光を反射する。受光素子122は、拡散反射光L2を受光する。 The irradiation light L1 is irradiated at an angle of 45 degrees (in a tilted direction) with respect to a direction perpendicular to the surface of the document D. The document D reflects reflected light including diffusely reflected light L2 and specularly reflected light. The light receiving element 122 receives the diffusely reflected light L2.

画像読取部100は、さらに、図1に示されるように、原稿Dとイメージセンサ121との間に、第1反射鏡113と、第1キャリッジ114と、第2反射鏡115と、第3反射鏡116と、第2キャリッジ117と、集光レンズ118とを備えている。第1反射鏡113は、原稿Dからの拡散反射光L2を第2反射鏡115の方向に反射する。第2反射鏡115は、拡散反射光L2を第3反射鏡116の方向に反射する。第3反射鏡116は、拡散反射光L2を集光レンズ118の方向に反射する。集光レンズ118は、拡散反射光L2をイメージセンサ121が有する複数の受光素子122の各受光面(図示せず)に結像する。 As shown in FIG. 1, the image reading unit 100 further includes a first reflecting mirror 113, a first carriage 114, a second reflecting mirror 115, and a third reflecting mirror between the document D and the image sensor 121. It includes a mirror 116, a second carriage 117, and a condenser lens 118. The first reflecting mirror 113 reflects the diffusely reflected light L2 from the document D toward the second reflecting mirror 115. The second reflecting mirror 115 reflects the diffusely reflected light L2 in the direction of the third reflecting mirror 116. The third reflecting mirror 116 reflects the diffusely reflected light L2 in the direction of the condenser lens 118. The condensing lens 118 forms an image of the diffusely reflected light L2 on each light receiving surface (not shown) of a plurality of light receiving elements 122 included in the image sensor 121.

イメージセンサ121は、R,G,Bの各色成分のカラーフィルタ(図示略)を使用してR,G,Bの3つの色をそれぞれ検知する3本のCCDラインセンサ(図示せず)である。イメージセンサ121は、主走査方向に延びている3本のCCDラインセンサで原稿を走査(副走査)して原稿上の画像をR,G,Bに対応する電圧値の組合せとして取得する。このように、イメージセンサ121は、光電変換処理を行って、主走査方向の画素毎のR,G,Bのアナログ電気信号を出力することができる。 The image sensor 121 is three CCD line sensors (not shown) that detect each of the three colors R, G, and B using color filters (not shown) for each color component of R, G, and B. . The image sensor 121 scans (sub-scans) a document with three CCD line sensors extending in the main scanning direction and acquires an image on the document as a combination of voltage values corresponding to R, G, and B. In this way, the image sensor 121 can perform photoelectric conversion processing and output R, G, and B analog electrical signals for each pixel in the main scanning direction.

第1キャリッジ114は、光源112と第1反射鏡113とを搭載し、副走査方向に往復動する。第2キャリッジ117は、第2反射鏡115と第3反射鏡116とを搭載し、副走査方向に往復動する。第1キャリッジ114及び第2キャリッジ117は、走査制御部として機能する制御部210によって制御される。これにより、光源112は原稿を副走査方向に走査することができるので、イメージセンサ121は、原稿上の2次元画像に応じてアナログ電気信号を出力することができる。 The first carriage 114 carries a light source 112 and a first reflecting mirror 113, and reciprocates in the sub-scanning direction. The second carriage 117 carries a second reflecting mirror 115 and a third reflecting mirror 116, and reciprocates in the sub-scanning direction. The first carriage 114 and the second carriage 117 are controlled by a control section 210 that functions as a scanning control section. Thereby, the light source 112 can scan the original in the sub-scanning direction, so the image sensor 121 can output an analog electrical signal in accordance with the two-dimensional image on the original.

なお、自動原稿送り装置(ADF)160が使用される場合には、第1キャリッジ114及び第2キャリッジ117は、予め設定されている副走査位置に固定され、原稿Dの自動送りによって副走査方向の走査が行われる。なお、ADF160には、片面だけでなく両面を同時にあるいは逐次に読み取るものもある。 Note that when the automatic document feeder (ADF) 160 is used, the first carriage 114 and the second carriage 117 are fixed at a preset sub-scanning position, and the document D is automatically fed in the sub-scanning direction. is scanned. Note that some ADFs 160 read not only one side but also both sides simultaneously or sequentially.

ADF160は、紙送りローラー161と、原稿読取スリット162とを備えている。紙送りローラー161は、原稿の自動送りを行い、原稿の読み取りが原稿読取スリット162を介して行われる。この場合には、第1キャリッジ114が予め設定されている副走査位置に固定されるので、第1キャリッジ114に搭載されている光源112も所定位置に固定されることになる。 The ADF 160 includes a paper feed roller 161 and a document reading slit 162. The paper feed roller 161 automatically feeds the original, and the original is read through the original reading slit 162. In this case, since the first carriage 114 is fixed at a preset sub-scanning position, the light source 112 mounted on the first carriage 114 is also fixed at a predetermined position.

画像読取部100は、図2に示されるように、さらに、信号処理部123と、シェーディング補正部124と、シェーディング補正テーブル124aと、ガンマ変換部125と、二値化処理部140と、AGC処理部130と、白基準板132(図1参照)とを備えている。二値化処理部140は、フィルタ処理部141と、閾値設定部142とを有している。 As shown in FIG. 2, the image reading section 100 further includes a signal processing section 123, a shading correction section 124, a shading correction table 124a, a gamma conversion section 125, a binarization processing section 140, and an AGC processing section. 130, and a white reference plate 132 (see FIG. 1). The binarization processing section 140 includes a filter processing section 141 and a threshold value setting section 142.

信号処理部123は、A/D変換機能を有する可変利得増幅器である。信号処理部123は、AGC処理部130で設定され、記憶部240に格納されている利得でアナログ電気信号を増幅し、増幅されたアナログ電気信号をA/D変換してデジタルデータとする。 The signal processing section 123 is a variable gain amplifier having an A/D conversion function. The signal processing section 123 amplifies the analog electrical signal with the gain set by the AGC processing section 130 and stored in the storage section 240, and A/D converts the amplified analog electrical signal into digital data.

AGC処理部130は、本実施形態では、黒基準信号と白基準信号とを使用して複数の受光素子122のそれぞれに対して最適な利得とオフセット値とを設定する利得調整部である。黒基準信号は、光源112がオフの状態における受光素子122のアナログ電気信号である。白基準信号は、原稿Dの代わりに白基準板132を照射したときの受光素子122のアナログ電気信号である。 In this embodiment, the AGC processing unit 130 is a gain adjustment unit that sets optimal gains and offset values for each of the plurality of light receiving elements 122 using a black reference signal and a white reference signal. The black reference signal is an analog electrical signal of the light receiving element 122 when the light source 112 is off. The white reference signal is an analog electrical signal of the light receiving element 122 when the white reference plate 132 is irradiated instead of the original D.

AGC処理部130は、黒基準信号が信号処理部123によってA/D変換されたときの画像データIDのRGBの各階調値が最小値「0」となるようにオフセット値を設定する。AGC処理部130は、このオフセット値を使用して白基準信号が信号処理部123によってA/D変換されたときの画像データIDのRGBの各階調値が最大値「255」となるように利得を設定する。これにより、最小値「0」から最大値「255」までのダイナミックレンジを有効に利用することができる。 The AGC processing unit 130 sets the offset value so that each RGB gradation value of the image data ID becomes the minimum value “0” when the black reference signal is A/D converted by the signal processing unit 123. The AGC processing unit 130 uses this offset value to set the gain so that each RGB gradation value of the image data ID becomes the maximum value “255” when the white reference signal is A/D converted by the signal processing unit 123. Set. Thereby, the dynamic range from the minimum value "0" to the maximum value "255" can be effectively utilized.

シェーディング補正部124は、デジタルデータに対してシェーディング補正を実行して画像データIDを生成する。シェーディング補正は、光源112の長さ方向の光量不均一性やレンズのコサイン4乗則による周辺減光、主走査方向に配列されている複数の受光素子122の感度ムラに起因して発生するシェーディングを抑制するための補正である。ガンマ変換部125は、画像読取部100の特性に基づいてガンマ変換を行う。これにより、画像読取部100は、RGBの各階調値を有する画像データIDを生成することができる。 The shading correction unit 124 performs shading correction on the digital data to generate image data ID. Shading correction is performed to correct shading that occurs due to non-uniformity of light amount in the length direction of the light source 112, marginal light reduction due to the cosine fourth power law of the lens, and uneven sensitivity of the plurality of light receiving elements 122 arranged in the main scanning direction. This is a correction to suppress the The gamma conversion unit 125 performs gamma conversion based on the characteristics of the image reading unit 100. Thereby, the image reading unit 100 can generate image data ID having each RGB tone value.

二値化処理部140は、輝度値Lの計算式(輝度値L≒0.3R+0.6G+0.1B)を使用し、画像データIDのRGBの各階調値を使用して輝度値Lを算出してモノクロ画像データMD0を生成する。二値化処理部140は、さらに、モノクロ画像データMD0に対して二値化処理を実行して各画素が1ビットで表される二値データBDとする。FAX処理部250は、データサイズが小さな二値データBDを使用してファクシミリの送信処理を実行することができる。 The binarization processing unit 140 uses the calculation formula for the brightness value L (brightness value L≈0.3R+0.6G+0.1B) and calculates the brightness value L using each RGB gradation value of the image data ID. Then, monochrome image data MD0 is generated. The binarization processing unit 140 further performs binarization processing on the monochrome image data MD0 to generate binary data BD in which each pixel is represented by 1 bit. The FAX processing unit 250 can perform facsimile transmission processing using binary data BD having a small data size.

このように、画像読取部100は、原稿D上の画像を読み取って画像データIDを生成し、必要に応じて二値データBDを生成する。画像データIDは、原稿D上の画像をRGBの各階調値(0~255)で表すRGB画像データである。 In this way, the image reading unit 100 reads the image on the document D, generates the image data ID, and generates the binary data BD as necessary. The image data ID is RGB image data that represents the image on the document D using RGB gradation values (0 to 255).

図3は、読取画像及び読取画像の輝度ヒストグラムを示す説明図である。図3(a)は、原稿画像D0を示している。原稿画像D0は、地肌の輝度が比較的に低い視認性の悪い画像である。原稿画像D0は、画像読取部100の読取りによって生成された画像データIDによって表される画像である。 FIG. 3 is an explanatory diagram showing a read image and a brightness histogram of the read image. FIG. 3(a) shows the original image D0. The original image D0 is an image with relatively low background brightness and poor visibility. The original image D0 is an image represented by image data ID generated by reading by the image reading section 100.

図3(b)は、モノクロ画像データMD0の輝度ヒストグラムH0を示している。モノクロ画像データMD0は、原稿画像D0を表す画像データIDの輝度値Lのヒストグラムである。輝度ヒストグラムの横軸は、輝度階調値(0(黒)乃至255(白))であり、縦軸は、画素数(頻度)である。輝度ヒストグラムH0は、黒文字のテキストや罫線といった線画の画像を構成する画素群である線画画素群と、地肌画像を構成する画素群である地肌画素群とを含んでいる。 FIG. 3(b) shows a brightness histogram H0 of the monochrome image data MD0. Monochrome image data MD0 is a histogram of brightness values L of image data ID representing original image D0. The horizontal axis of the brightness histogram is the brightness gradation value (0 (black) to 255 (white)), and the vertical axis is the number of pixels (frequency). The brightness histogram H0 includes a line pixel group that is a pixel group that makes up a line drawing image such as black text or a ruled line, and a background pixel group that is a pixel group that makes up a background image.

図4は、比較例に係る二値化処理及び比較例の二値化処理用閾値THcを示す説明図である。二値化処理用閾値THcは、比較例としての判別分析法(大津の方法)を用いて設定されている。判別分析法は、輝度ヒストグラムを暫定閾値によって2つのクラスに分け、各クラス内の分散値とクラス間の分散値からヒストグラムの形状を調べ、もっとも谷部に位置すると思われる閾値を採用する手法である。なお、判別分析法の処理内容については後述する。 FIG. 4 is an explanatory diagram showing the binarization process according to the comparative example and the binarization process threshold THc of the comparative example. The binarization processing threshold THc is set using a discriminant analysis method (Otsu's method) as a comparative example. Discriminant analysis is a method that divides a brightness histogram into two classes using a provisional threshold value, examines the shape of the histogram from the variance values within each class and the variance values between classes, and adopts the threshold value that is thought to be located in the lowest valley. be. Note that the processing details of the discriminant analysis method will be described later.

図4(a)は、比較例に係る二値化処理の処理結果としての二値化画像Dcを示している。二値化画像Dcは、二値化処理後の二値データBDによって表される画像である。二値データBDは、二値化処理部140によって、入力画像データとしてのモノクロ画像データMD0の線画画素群の輝度階調値を「0(黒)」とし、地肌画素群のうち二値化処理用閾値THcよりも輝度階調値が低い画素の輝度階調値を「0」とする一方、他の画素の輝度階調値を「1(白)」とすることによって生成される画像データである。 FIG. 4A shows a binarized image Dc as a result of the binarization process according to the comparative example. The binarized image Dc is an image represented by the binary data BD after the binarization process. The binary data BD is processed by the binarization processing unit 140 to set the brightness gradation value of the line pixel group of the monochrome image data MD0 as input image data to "0 (black)", and to perform the binarization processing on the background pixel group. Image data that is generated by setting the luminance gradation value of a pixel whose luminance gradation value is lower than the threshold value THc to "0", while setting the luminance gradation value of other pixels to "1 (white)". be.

図4(b)は、比較例に係る二値化処理用閾値THcを示している。二値化処理用閾値THcは、黒文字のテキスト画像をパターン領域と判別するだけでなく、地肌画像のうち輝度の低い画素から構成される画像領域もパターン領域と判別している。パターン領域と判別された地肌画像の輝度は、二値化処理部140によって「0(黒)」に輝度が変更されるので、二値化画像Dcは、二値化処理によって顕著に粒状性が悪化した(荒い)画像となっている(図4(a)参照)。 FIG. 4(b) shows the binarization processing threshold THc according to the comparative example. The binarization processing threshold THc not only discriminates a black text image as a pattern area, but also discriminates an image area composed of pixels with low brightness in a background image as a pattern area. The brightness of the background image determined to be a pattern area is changed to "0 (black)" by the binarization processing unit 140, so that the binarized image Dc has noticeable graininess due to the binarization process. The image is deteriorated (rough) (see FIG. 4(a)).

図5は、第1実施形態に係る二値化処理手順の内容を示すフローチャートである。第1実施形態に係る二値化処理は、上述のような地肌画像に起因する粒状性の悪化を顕著に抑制することができる。 FIG. 5 is a flowchart showing the contents of the binarization processing procedure according to the first embodiment. The binarization process according to the first embodiment can significantly suppress deterioration of graininess caused by the background image as described above.

ステップS100では、二値化処理部140のフィルタ処理部141は、ローパスフィルタ処理を実行する。ローパスフィルタ処理では、二値化処理部140は、たとえば300dpiのモノクロ画像データMD0(入力画像データとも呼ばれる。)に対して、5×5画素のガウシアンフィルタを使用して平滑化処理を実行する。これにより、ローパスフィルタ処理は、地肌画像のノイズを平滑化してモノクロ画像データMD1を生成することができる。地肌画像のノイズは、背景ノイズの一例である。 In step S100, the filter processing unit 141 of the binarization processing unit 140 performs low-pass filter processing. In the low-pass filter processing, the binarization processing unit 140 performs smoothing processing on, for example, 300 dpi monochrome image data MD0 (also referred to as input image data) using a 5×5 pixel Gaussian filter. Thereby, the low-pass filter processing can smooth noise in the background image and generate monochrome image data MD1. Noise in the background image is an example of background noise.

図6は、第1実施形態に係るローパスフィルタ処理の内容を示す説明図である。図6(a)は、ローパスフィルタ処理前のモノクロ画像データMD0の輝度ヒストグラムH0を示している。図6(b)は、ローパスフィルタ処理後のモノクロ画像データMD1の輝度ヒストグラムH1を示している。輝度ヒストグラムH1から分かるように、離散的となっている地肌画素群の階調値分布が単一の山にまとまっている。 FIG. 6 is an explanatory diagram showing the contents of the low-pass filter processing according to the first embodiment. FIG. 6A shows a brightness histogram H0 of monochrome image data MD0 before low-pass filter processing. FIG. 6(b) shows a brightness histogram H1 of the monochrome image data MD1 after low-pass filter processing. As can be seen from the brightness histogram H1, the gradation value distribution of the discrete background pixel group is gathered into a single peak.

ローパスフィルタ処理は、モノクロ画像データMD0の高周波成分(画素値の変動が激しい地肌の階調領域(ノイジーでギザギザな輝度成分))を平滑化し、これにより、背景ノイズ判定用閾値設定処理(ステップS300)で適切な閾値を設定可能とするために実行される。 The low-pass filter process smoothes the high frequency component (the gradation area of the background where the pixel value fluctuates significantly (the noisy and jagged brightness component)) of the monochrome image data MD0, and thereby performs the background noise determination threshold setting process (step S300). ) to be able to set appropriate thresholds.

ステップS200では、二値化処理部140の閾値設定部142は、ローパスフィルタ処理後の輝度ヒストグラムH1に基づいてページ閾値THPを設定する。ページ閾値設定処理では、二値化処理部140は、判別分析法(大津の方法)を使用してページ閾値を設定する。ページ閾値THPは、画像の全面に適用可能な二値化用閾値である。 In step S200, the threshold value setting unit 142 of the binarization processing unit 140 sets the page threshold value THP based on the brightness histogram H1 after the low-pass filter processing. In the page threshold setting process, the binarization processing unit 140 sets a page threshold using a discriminant analysis method (Otsu's method). The page threshold THP is a binarization threshold that can be applied to the entire image.

図7は、第1実施形態に係るページ閾値設定処理(ステップS200)の内容を示すフローチャートである。図8は、第1実施形態に係るページ閾値設定処理の内容を示す説明図である。ステップS210では、二値化処理部140は、ヒストグラム解析部として機能し、暫定閾値を使用して輝度ヒストグラムH1を暫定的にクラス1(第1のクラスとも呼ばれる。)とクラス2(第2のクラスとも呼ばれる。)の2つのクラスにクラス分けする(図8(a)参照)。第2のクラスは、背景画像を比較的に多く含む側のクラスである。 FIG. 7 is a flowchart showing the contents of the page threshold setting process (step S200) according to the first embodiment. FIG. 8 is an explanatory diagram showing the contents of the page threshold setting process according to the first embodiment. In step S210, the binarization processing unit 140 functions as a histogram analysis unit, and uses the provisional threshold to temporarily divide the brightness histogram H1 into class 1 (also called the first class) and class 2 (second class). (also called class) (see FIG. 8(a)). The second class is a class that includes a relatively large number of background images.

ステップS220では、二値化処理部140は、クラス内分散算出処理を実行する。クラス内分散算出処理では、二値化処理部140は、計算式F1を使用してクラス内分散を算出する。ステップS230では、二値化処理部140は、クラス間分散算出処理を実行する。クラス間分散算出処理では、二値化処理部140は、計算式F2を使用してクラス間分散を算出する。ステップS240では、二値化処理部140は、全分散算出処理を実行する。全分散算出処理では、二値化処理部140は、計算式F3を使用して全分散を算出する。全分散は、暫定閾値の評価値として使用することができる。 In step S220, the binarization processing unit 140 executes intra-class variance calculation processing. In the intra-class variance calculation process, the binarization processing unit 140 calculates the intra-class variance using calculation formula F1. In step S230, the binarization processing unit 140 executes an inter-class variance calculation process. In the inter-class variance calculation process, the binarization processing unit 140 calculates the inter-class variance using calculation formula F2. In step S240, the binarization processing unit 140 executes total variance calculation processing. In the total variance calculation process, the binarization processing unit 140 calculates the total variance using calculation formula F3. The total variance can be used as an evaluation value for the provisional threshold.

二値化処理部140は、輝度階調値の全階調値でステップS210乃至ステップS240の処理を繰り返して実行する(ステップS250)。ステップS260では、二値化処理部140は、全分散が最大の階調値にページ閾値THPを設定する。 The binarization processing unit 140 repeatedly executes the processing of steps S210 to S240 for all the luminance gradation values (step S250). In step S260, the binarization processing unit 140 sets the page threshold THP to the gradation value with the maximum total variance.

ステップS300では、二値化処理部140は、背景ノイズ判定用閾値設定部として機能し、地肌ノイズ判定用の閾値である地肌ノイズ判定用閾値THBを設定する。なお、本処理(ステップS300)は、地肌が黒の場合には、スキップするようにしてもよい。地肌ノイズ判定用閾値THBは、背景ノイズ判定用閾値とも呼ばれる。 In step S300, the binarization processing unit 140 functions as a background noise determination threshold setting unit and sets a background noise determination threshold THB, which is a threshold for background noise determination. Note that this process (step S300) may be skipped when the background is black. The background noise determination threshold THB is also called a background noise determination threshold.

図9は、第1実施形態及び比較例に係る地肌ノイズ判定用閾値設定処理の内容を示す説明図である。図10は、第1実施形態及び比較例に係る地肌ノイズ除去処理の内容を示す説明図である。図9(a)は、第1実施形態に係る地肌ノイズ判定用閾値THBを設定する方法を示している。図9(b)は、比較例に係る地肌ノイズ判定用閾値設定処理の内容を示す説明図である。図10(a)は、第1実施形態に係る地肌ノイズ除去処理の内容を示す説明図である。図10(b)は、比較例に係る地肌ノイズ除去処理の内容を示す説明図である。 FIG. 9 is an explanatory diagram showing the contents of the background noise determination threshold setting process according to the first embodiment and the comparative example. FIG. 10 is an explanatory diagram showing the details of the background noise removal processing according to the first embodiment and the comparative example. FIG. 9A shows a method for setting the background noise determination threshold THB according to the first embodiment. FIG. 9B is an explanatory diagram showing the contents of the background noise determination threshold setting process according to the comparative example. FIG. 10A is an explanatory diagram showing the details of the background noise removal process according to the first embodiment. FIG. 10(b) is an explanatory diagram showing the details of the background noise removal process according to the comparative example.

この例では、二値化処理部140は、地肌画像の分布のピーク値PBの画素数であるピーク画素数の所定範囲の割合(たとえば10%)の画素数(頻度)となる輝度階調値を、ピーク値PBの輝度階調値である背景ピーク階調値の側から輝度階調値の低い側(濃度が濃くなる側)に検索する。 In this example, the binarization processing unit 140 generates a brightness gradation value that is the number of pixels (frequency) of a predetermined range (for example, 10%) of the peak pixel number, which is the number of pixels of the peak value PB of the distribution of the background image. is searched from the side of the background peak gradation value, which is the luminance gradation value of the peak value PB, to the side of the lower luminance gradation value (the side where the density becomes higher).

比較例に係る地肌ノイズ判定用閾値THB(図9(b))では、地肌画素群の階調値分布が離散的(ギザギザ)となっているので、二値化処理部140は、地肌ノイズを効果的に排除することができる地肌ノイズ判定用閾値を設定してことができないことが分かる(図10(b)参照)。これに対して、第1実施形態に係る地肌ノイズ判定用閾値THB(図9(a))では、地肌画素群の階調値分布が単一の山にまとまっているので、二値化処理部140は、円滑に適切な地肌ノイズ判定用閾値を設定して地肌ノイズを効果的に排除することができる(図10(a))。 In the background noise determination threshold THB (FIG. 9(b)) according to the comparative example, the gradation value distribution of the background pixel group is discrete (jagged), so the binarization processing unit 140 eliminates the background noise. It can be seen that it is not possible to set a threshold for background noise determination that can effectively eliminate background noise (see FIG. 10(b)). On the other hand, in the background noise determination threshold THB (FIG. 9(a)) according to the first embodiment, the gradation value distribution of the background pixel group is gathered into a single peak, so the binarization processing unit 140 can effectively eliminate background noise by smoothly setting an appropriate background noise determination threshold (FIG. 10(a)).

これにより、二値化処理部140は、検索された閾値を地肌ノイズ判定用閾値THBとして設定することができる。輝度ヒストグラムH1では、上述のように高周波成分(画素値の変動が激しい地肌の階調領域(ノイジーでギザギザな輝度成分))が平滑化されているので、二値化処理部140は、地肌の残存が過度とならないような地肌ノイズ判定用閾値THBを円滑に設定することができる。所定範囲の割合は、5%乃至20%が好ましく、5%乃至15%がより好まく、10%の近傍が最も好ましい。 Thereby, the binarization processing unit 140 can set the searched threshold value as the background noise determination threshold value THB. In the brightness histogram H1, as described above, the high frequency component (the gradation region of the background where pixel values fluctuate significantly (the noisy and jagged brightness component)) is smoothed, so the binarization processing unit 140 It is possible to smoothly set the background noise determination threshold THB so that the residual amount does not become excessive. The ratio in the predetermined range is preferably 5% to 20%, more preferably 5% to 15%, and most preferably around 10%.

ステップS400では、二値化処理部140は、ページ閾値THPと地肌ノイズ判定用閾値THBとを比較し、ページ閾値THPが地肌ノイズ判定用閾値THBよりも大きな場合には、処理をステップS500に進め、ページ閾値THPが地肌ノイズ判定用閾値THB以下の場合には、処理をステップS600に進める。 In step S400, the binarization processing unit 140 compares the page threshold THP and the background noise determination threshold THB, and if the page threshold THP is larger than the background noise determination threshold THB, the process proceeds to step S500. , if the page threshold THP is less than or equal to the background noise determination threshold THB, the process advances to step S600.

ステップS500では、二値化処理部140は、地肌ノイズ判定用閾値THBの値をページ閾値THPの値で置き換えて再設定する。これにより、二値化処理部140は、地肌ノイズ判定用閾値THBが過度に小さく設定された場合に、地肌ノイズ除去処理で過度に地肌ノイズが消去され、残すべきテキスト画像等が削除されるといたことが発生しないようにすることができる。 In step S500, the binarization processing unit 140 replaces and resets the value of the background noise determination threshold THB with the value of the page threshold THP. As a result, the binarization processing unit 140 can detect that when the background noise determination threshold THB is set too small, the background noise is excessively erased in the background noise removal process, and text images etc. that should be left are deleted. You can prevent what happened.

ステップS600では、二値化処理部140は、背景ノイズ低減処理部として機能し、地肌ノイズ除去処理(背景ノイズ低減処理とも呼ばれる。)を実行する。地肌ノイズ除去処理では、二値化処理部140は、地肌ノイズ判定用閾値THBよりも輝度階調値が高い(濃度が薄い)画素の画素値を地肌ノイズ判定用閾値THBの輝度階調値に設定する。 In step S600, the binarization processing unit 140 functions as a background noise reduction processing unit and executes background noise removal processing (also referred to as background noise reduction processing). In the background noise removal process, the binarization processing unit 140 converts the pixel value of a pixel whose luminance gradation value is higher (lower density) than the background noise determination threshold THB into the luminance gradation value of the background noise determination threshold THB. Set.

これにより、二値化処理部140は、輝度ヒストグラムH2を有するモノクロ画像データMD2を生成することができる。輝度ヒストグラムH2では、地肌画像の輝度階調値分布が地肌ノイズ判定用閾値THBに集中して平滑化され、コントラストが低くなるため後述の二値化処理(ステップS700)においてノイズ(特にエッジ)のパターン画像との誤判別を抑制することができる。 Thereby, the binarization processing unit 140 can generate monochrome image data MD2 having the brightness histogram H2. In the brightness histogram H2, the brightness gradation value distribution of the background image is smoothed to concentrate on the background noise determination threshold THB, and the contrast becomes low. Misidentification with pattern images can be suppressed.

図11は、第1実施形態に係る地肌ノイズ除去処理及び二値化処理の内容を示す説明図である。この例では、二値化処理部140は、後述の二値化処理(ステップS700)とは異なり、二値化処理の閾値をページ閾値THPに固定して処理した場合を想定している。図11(a)は、地肌ノイズ除去処理後のモノクロ画像D1を示している。モノクロ画像D1は、地肌画像において、顕著に輝度の低い画素の輝度が高くなる一方、顕著に輝度の高い画素の輝度が低くなるように処理されているので、モノトーンの粒状性が向上した(細かい)背景画像を有している。 FIG. 11 is an explanatory diagram showing the contents of the background noise removal process and the binarization process according to the first embodiment. In this example, unlike the binarization process (step S700) described later, it is assumed that the binarization processing unit 140 performs processing by fixing the threshold value of the binarization process to the page threshold value THP. FIG. 11A shows a monochrome image D1 after background noise removal processing. The monochrome image D1 is processed so that the luminance of pixels with significantly low luminance increases while the luminance of pixels with significantly high luminance decreases in the background image, so the graininess of the monochrome image has improved (fine ) has a background image.

図11(b)は、第1実施形態に係る二値化処理後の二値画像D2を示している。二値画像D2は、第1実施形態に係るページ閾値THPの設定によって、パターン領域の画素と誤判別される背景領域の画素が顕著に減少して、粒状性を悪化させることなく適切な画像となっている。このような誤判別の低減は、地肌ノイズ除去処理によって粒状性が低下し、局所コントラストが低下したことによって実現されている。 FIG. 11(b) shows the binary image D2 after the binarization process according to the first embodiment. By setting the page threshold value THP according to the first embodiment, the binary image D2 has a significantly reduced number of pixels in the background area that are misidentified as pixels in the pattern area, so that the binary image D2 becomes an appropriate image without deteriorating graininess. It has become. Such a reduction in misjudgment is achieved by reducing graininess and reducing local contrast through background noise removal processing.

このように、第1実施形態に係る画像形成装置10は、二値化処理用の閾値を設定する前に前処理としてのローパスフィルタ処理を実行する。これにより、二値化処理部140は、地肌画像のノイズを低減させるとともに輝度階調値の分散を小さくすることができる。地肌画像のノイズ除去は、二値化処理に伴う粒状性の悪化を低減させることができる。輝度階調値の分散の低減は、地肌画像の輝度階調値の平均値を中心として地肌画像の分布の幅を狭くするとともに、分布の階調値変化を滑らかにして地肌ノイズ判定用閾値THBの設定を円滑化することができる。 In this way, the image forming apparatus 10 according to the first embodiment executes low-pass filter processing as pre-processing before setting the threshold value for binarization processing. Thereby, the binarization processing unit 140 can reduce the noise in the background image and reduce the variance of the brightness gradation values. Removal of noise from the background image can reduce deterioration in graininess caused by binarization processing. Reducing the variance of the brightness gradation values is achieved by narrowing the width of the distribution of the background image around the average value of the brightness gradation values of the background image, and by smoothing the changes in the gradation values of the distribution to set the background noise determination threshold THB. settings can be made more smoothly.

図12は、第1実施形態に係る二値化処理(ステップS700)の内容を示すフローチャートである。ステップS710では、二値化処理部140は、着目局所領域選択部として機能し、モノクロ画像データMD2(入力画像データとも呼ばれる。)を構成する複数の画素を(M×N)画素(M及びNは、たとえば3以上の整数)から構成される複数の局所領域に分割し、前記分割された複数の局所領域を着目局所領域として順に選択する。着目局所領域は、たとえば参照サイズが5×5画素の領域である。参照サイズは、たとえば処理対象となる画像の解像度等に応じて設定される。 FIG. 12 is a flowchart showing the contents of the binarization process (step S700) according to the first embodiment. In step S710, the binarization processing unit 140 functions as a local region of interest selection unit and converts a plurality of pixels constituting the monochrome image data MD2 (also referred to as input image data) into (M×N) pixels (M and N (for example, an integer of 3 or more), and the divided local regions are sequentially selected as local regions of interest. The local area of interest is, for example, an area with a reference size of 5×5 pixels. The reference size is set depending on, for example, the resolution of the image to be processed.

図13は、第1実施形態に係る着目局所領域選択の様子を示す説明図である。図14は、第1実施形態に係る切替用閾値THSを示すグラフである。この例では、2つの局所領域LR1,LR2が示されている。着目局所領域として、局所領域LR1が選択されたときには、黒文字のテキスト画像が参照範囲に入っているので、最小輝度値は0に近い値となり、最大輝度値は地肌の輝度値、すなわち地肌ノイズ判定用閾値THBの近傍の輝度値となる。一方、局所領域LR2が選択されたときには、薄いテキスト画像が参照範囲に入っているので、最小輝度値は薄いテキスト画像の輝度値となって、地肌ノイズ判定用閾値THBの近傍の輝度値となり、最大輝度値は地肌の輝度値となる。 FIG. 13 is an explanatory diagram showing how to select a local region of interest according to the first embodiment. FIG. 14 is a graph showing the switching threshold THS according to the first embodiment. In this example, two local regions LR1 and LR2 are shown. When the local region LR1 is selected as the local region of interest, the black text image is within the reference range, so the minimum brightness value is close to 0, and the maximum brightness value is the brightness value of the background, that is, the background noise determination. The brightness value is near the threshold value THB. On the other hand, when the local region LR2 is selected, since the thin text image is within the reference range, the minimum brightness value becomes the brightness value of the thin text image, and becomes the brightness value near the background noise determination threshold THB, The maximum brightness value is the brightness value of the background.

ステップS720では、二値化処理部140は、最大輝度値取得処理を実行する。最大輝度値取得処理では、二値化処理部140は、着目局所領域内の最大輝度値を取得する。具体的には、二値化処理部140は、着目局所領域が局所領域LR1及び局所領域LR2のいずれの場合においても、各局所領域内の地肌の最大輝度値を取得することになる。この例では、二値化処理部140は、局所領域LR2において、局所最大輝度値L_Max(輝度値170)を取得したものとする(図14(a)参照)。最大輝度値は、輝度の最大階調値であり、最も濃度が低い側の濃度階調値である最大階調値でもよい。 In step S720, the binarization processing unit 140 executes maximum brightness value acquisition processing. In the maximum brightness value acquisition process, the binarization processing unit 140 acquires the maximum brightness value within the local area of interest. Specifically, the binarization processing unit 140 obtains the maximum brightness value of the background in each local area, regardless of whether the local area of interest is the local area LR1 or the local area LR2. In this example, it is assumed that the binarization processing unit 140 has acquired the local maximum brightness value L_Max (brightness value 170) in the local region LR2 (see FIG. 14(a)). The maximum luminance value is the maximum gradation value of luminance, and may be the maximum gradation value that is the density gradation value on the lowest density side.

ステップS730では、二値化処理部140は、切替用閾値設定部として機能し、切替用閾値設定処理を実行する。切替用閾値設定処理では、二値化処理部140は、記憶部240から予め設定されている二値化閾値切替用閾値テーブル(閾値切替テーブルとも呼ばれる。)Tを読出して切替用閾値THSを設定可能な状態とする。この例では、二値化処理部140は、局所最大輝度値L_Max(輝度値170)に基づき、切替用閾値THSとして、「30」を取得したものとする。 In step S730, the binarization processing unit 140 functions as a switching threshold setting unit and executes switching threshold setting processing. In the switching threshold setting process, the binarization processing unit 140 reads out a preset binarization threshold switching threshold table (also referred to as a threshold switching table) T from the storage unit 240 and sets the switching threshold THS. Make it possible. In this example, it is assumed that the binarization processing unit 140 has acquired "30" as the switching threshold THS based on the local maximum luminance value L_Max (luminance value 170).

閾値切替テーブルTは、計算式F4で定義される切替用閾値THSを離散化してテーブルとしたものである。切替用閾値THSは、背景領域(この例では地肌画像)の輝度が低いほど、局所領域内で発生しているコントラストがパターン領域に起因するのではなく、背景領域の画像のノイズに起因する可能性が高いという発明者の知見に基づいて設定されている。本願発明者は、最大階調値に応じて切替用閾値THSを変化させることが好ましいことを実験やシミュレーションで見出した。具体的には、切替用閾値THSは、最大階調値が小さくなるほど(濃度が濃くなるほど)大きくなるように設定し、特に線形に変化するように設定することが好ましいことが見いだされた。 The threshold switching table T is a table obtained by discretizing the switching threshold THS defined by the calculation formula F4. The switching threshold THS indicates that the lower the brightness of the background area (the background image in this example), the more likely that the contrast occurring in the local area is not due to the pattern area but to noise in the image of the background area. This setting is based on the inventor's knowledge that the The inventor of the present application found through experiments and simulations that it is preferable to change the switching threshold THS according to the maximum gradation value. Specifically, it has been found that it is preferable to set the switching threshold THS to become larger as the maximum gradation value becomes smaller (as the density becomes darker), and particularly to set it so that it changes linearly.

ステップS740では、二値化処理部140は、局所コントラスト算出処理を実行する。局所コントラスト算出処理では、二値化処理部140は、局所領域内の5×5の25画素のうちの最大輝度値(この例では170)と最小輝度値(この例では120)の間の差を局所コントラストLCとして算出する(計算式F5参照)。この例では、二値化処理部140は、局所コントラストLCとして「50」(=170-120)を取得したものとする。最小輝度値は、輝度の最小階調値であり、最も濃度が濃い側の階調値である最小階調値でもよい。 In step S740, the binarization processing unit 140 executes local contrast calculation processing. In the local contrast calculation process, the binarization processing unit 140 calculates the difference between the maximum brightness value (170 in this example) and the minimum brightness value (120 in this example) of 25 pixels of 5×5 in the local area. is calculated as the local contrast LC (see calculation formula F5). In this example, it is assumed that the binarization processing unit 140 obtains "50" (=170-120) as the local contrast LC. The minimum luminance value is the minimum gradation value of luminance, and may be the minimum gradation value that is the gradation value on the darkest side.

ステップS750では、二値化処理部140は、局所コントラストLCが切替用閾値THSよりも大きい場合には、処理をステップS760に進め、局所コントラストLCが切替用閾値THS以下の場合には、処理をステップS770に進める。これにより、二値化処理部140は、背景領域のノイズがパターン領域のコントラストであるとの誤判別や文字の中抜けを抑制することができる。 In step S750, the binarization processing unit 140 advances the process to step S760 if the local contrast LC is greater than the switching threshold THS, and if the local contrast LC is less than or equal to the switching threshold THS, the binarization processing unit 140 continues the process. The process advances to step S770. Thereby, the binarization processing unit 140 can suppress erroneous determination that noise in the background area is the contrast of the pattern area and suppress hollow characters.

ステップS760では、二値化処理部140は、局所領域LR2の二値化処理に使用される二値化処理用閾値として局所閾値THL(計算式F6参照)を設定する。この例では、計算式F6において、係数αは、たとえば0.1以上の数値である。ステップS770では、二値化処理部140は、局所領域LR2の二値化処理に使用される二値化処理用閾値としてページ閾値THPを設定する。ステップS710乃至ステップS770の処理は、全ての局所領域に対して実行される(ステップS780)。なお、局所閾値は、最大階調値と最小階調値の間の範囲で設定されるものであればよい。 In step S760, the binarization processing unit 140 sets the local threshold THL (see calculation formula F6) as the binarization processing threshold used for the binarization processing of the local region LR2. In this example, in calculation formula F6, the coefficient α is, for example, a numerical value of 0.1 or more. In step S770, the binarization processing unit 140 sets the page threshold THP as the binarization processing threshold used for the binarization processing of the local region LR2. The processes from step S710 to step S770 are executed for all local regions (step S780). Note that the local threshold value may be set within a range between the maximum gradation value and the minimum gradation value.

図15は、第1実施形態に係る二値化処理の内容を示す説明図である。図15(a)は、薄いテキスト画像を示す原稿画像D0aを示している。原稿画像D0aは、原稿画像D0(図3(a)参照)と同様の背景画像を有しているが、説明を分かりやすくするために、地肌を除去して示している。図15(b)は、比較例に係る二値化処理後の画像Dcaを示している。この例において、画像Dcaでは、薄いテキスト画像が背景画像と誤判別されて二値化処理で消滅している。図15(b)は、第1実施形態に係る二値化処理後の画像D2を示している。この例において、画像D2は、薄いテキスト画像がパターン領域の画像と判別されて二値化処理で明確に再現されている。 FIG. 15 is an explanatory diagram showing the contents of the binarization process according to the first embodiment. FIG. 15(a) shows a document image D0a showing a thin text image. The original image D0a has the same background image as the original image D0 (see FIG. 3(a)), but the background image is shown with the background image removed to make the explanation easier to understand. FIG. 15(b) shows the image Dca after the binarization process according to the comparative example. In this example, in image Dca, a thin text image is erroneously determined to be a background image and disappears in the binarization process. FIG. 15(b) shows the image D2 after the binarization process according to the first embodiment. In this example, in image D2, a thin text image is determined to be an image of a pattern area and is clearly reproduced by binarization processing.

このように、第1実施形態に係る画像形成装置10は、局所領域内の最大輝度値に応じて輝度階調値に応じて切替用閾値THSを調整しつつ、切替用閾値THSに基づいて局所閾値THLとページ閾値THPとを適切に切り替えて二値化処理を実行する。これにより、低濃度画像(薄いテキスト等)の判別と画像ノイズの抑制の両立を改善することができる。一方、本画像形成装置10は、地肌ノイズ除去処理によって地肌ノイズのコントラストを低減させているので、背景領域のノイズが低濃度画像のコントラストであるとの誤判別を抑制することもできる。 In this way, the image forming apparatus 10 according to the first embodiment adjusts the switching threshold THS according to the luminance gradation value according to the maximum luminance value in the local area, and locally adjusts the switching threshold THS based on the switching threshold THS. The binarization process is executed by appropriately switching between the threshold THL and the page threshold THP. Thereby, it is possible to improve both the discrimination of low-density images (such as thin text) and the suppression of image noise. On the other hand, since the present image forming apparatus 10 reduces the contrast of the background noise through the background noise removal process, it is also possible to suppress erroneous determination that noise in the background area is the contrast of a low-density image.

B.第2実施形態:
図16は、第2実施形態に係る二値化用閾値調整処理(ステップS800)の内容を示すフローチャートである。第2実施形態に係る二値化処理は、第1実施形態による二値化処理の後で、ユーザーの希望に応じて二値化用閾値を調整し、改めて二値化処理を実行可能となるように構成されている。第2実施形態に係る二値化処理は、第1実施形態の二値化処理に対して、二値化用閾値調整処理(ステップS800)が処理の最後に追加されている点で第1実施形態と相違する。
B. Second embodiment:
FIG. 16 is a flowchart showing the contents of the binarization threshold adjustment process (step S800) according to the second embodiment. In the binarization process according to the second embodiment, after the binarization process according to the first embodiment, the binarization threshold can be adjusted according to the user's wishes, and the binarization process can be executed again. It is configured as follows. The binarization process according to the second embodiment is different from the binarization process of the first embodiment in that a binarization threshold adjustment process (step S800) is added at the end of the process. It differs from the form.

図17は、第2実施形態に係る操作表示画面を示す説明図である。二値化用閾値調整処理(ステップS800)は、二値化処理後において、操作表示部230への所定のユーザー入力に応じて対話型微調整処理モードとして起動される。操作表示部230は、ユーザーインターフェース画面231とスタートボタン232とを有している。ユーザーインターフェース画面231は、対話型微調整処理モードを有し、選択アイコン233と、解除アイコン234と、OKアイコン235と、濃度減少アイコン237dと、濃度増加アイコン237uとを有している。 FIG. 17 is an explanatory diagram showing an operation display screen according to the second embodiment. The binarization threshold adjustment process (step S800) is activated as an interactive fine adjustment process mode in response to a predetermined user input to the operation display unit 230 after the binarization process. The operation display section 230 has a user interface screen 231 and a start button 232. The user interface screen 231 has an interactive fine adjustment processing mode, and includes a selection icon 233, a cancel icon 234, an OK icon 235, a density decrease icon 237d, and a density increase icon 237u.

ステップS810では、操作表示部230は、領域選択のためのユーザー入力を受け付ける。ユーザーは、選択アイコン233をタッチして反転させた状態において、ユーザーインターフェース画面231上において指をスライドさせて選択領域SRを指定することができる。選択領域を改めて選択するときには、解除アイコン234をタッチすることによって選択領域SRの指定を解除することができる。この状態において、OKアイコン235をタッチすると、操作表示部230は、文字入力用ポップアップ画面(図示略)を表示する。 In step S810, the operation display unit 230 receives user input for region selection. The user can designate the selection region SR by touching and inverting the selection icon 233 and sliding his or her finger on the user interface screen 231. When reselecting the selection area, the designation of the selection area SR can be canceled by touching the cancellation icon 234. In this state, when the OK icon 235 is touched, the operation display section 230 displays a pop-up screen for character input (not shown).

ステップS820では、操作表示部230は、文字入力のためのポップアップ画面(図示略)においてユーザー入力を受け付ける。ユーザーが文字を入力し、あるいは入力することなく、ポップアップ画面上のOKアイコン(図示略)をタッチすると、処理がステップS830に進められる。 In step S820, the operation display unit 230 accepts user input on a pop-up screen (not shown) for inputting characters. When the user inputs characters or touches an OK icon (not shown) on the pop-up screen without inputting characters, the process proceeds to step S830.

ステップS830では、制御部210のOCR処理部211は、OCR確度算出処理を実行する。OCR確度算出処理では、OCR処理部211は、入力された文字の認識を実行し、OCR確度(認識の確からしさ)を数値化し、各文字の認識確度の積算値を算出する。OCR処理部211は、第1実施形態に係る閾値TH1やページ閾値の際に設定されたクラス1の平均輝度値M(図8参照)とクラス2の平均輝度値Mとの間において閾値を変更しつつOCR確度を閾値毎に算出する(ステップS840)。OCR処理部211は、文字認識処理部とも呼ばれる。平均輝度値Mは、第1の平均階調値とも呼ばれる。平均輝度値Mは、第2の平均階調値とも呼ばれる。 In step S830, the OCR processing unit 211 of the control unit 210 executes OCR accuracy calculation processing. In the OCR accuracy calculation process, the OCR processing unit 211 recognizes input characters, digitizes the OCR accuracy (recognition certainty), and calculates an integrated value of the recognition accuracy of each character. The OCR processing unit 211 sets a threshold value between the average brightness value M 1 of class 1 (see FIG. 8) and the average brightness value M 2 of class 2, which are set at the time of threshold TH1 and page threshold according to the first embodiment. The OCR accuracy is calculated for each threshold while changing the OCR accuracy (step S840). The OCR processing section 211 is also called a character recognition processing section. The average brightness value M1 is also called the first average gradation value. The average brightness value M2 is also called the second average gradation value.

ステップS850では、制御部210のOCR処理部211は、最高確度閾値を設定する。最高確度閾値は、入力された各文字の認識確度の積算値が最も高い閾値である。二値化処理部140は、最高確度閾値を使用して選択領域SRの二値化処理を実行し、二値化処理後の二値化画像をユーザーインターフェース画面231に実時間で表示する。なお、たとえばユーザーの選択によって、最高確度閾値を使用して二値化処理が行われる対象をページ全体とするようにしてもよい。 In step S850, the OCR processing unit 211 of the control unit 210 sets the highest accuracy threshold. The highest accuracy threshold is a threshold with the highest cumulative value of recognition accuracy for each input character. The binarization processing unit 140 executes the binarization process on the selected region SR using the highest accuracy threshold value, and displays the binarized image after the binarization process on the user interface screen 231 in real time. Note that, for example, depending on the user's selection, the entire page may be subjected to the binarization process using the highest accuracy threshold.

ステップS860では、操作表示部230は、微調整処理のためのユーザー入力を受け付ける。微調整処理では、濃度減少アイコン237dをタッチすることによって閾値を大きくする微調整を可能とし、濃度増加アイコン237uをタッチすることによって閾値を小さくする微調整を可能とする。 In step S860, the operation display unit 230 receives user input for fine adjustment processing. In the fine adjustment process, touching the density decrease icon 237d allows fine adjustment to increase the threshold value, and touching the density increase icon 237u allows fine adjustment to decrease the threshold value.

このように、第2実施形態に係る画像形成装置10は、第1実施形態における自動処理の結果に満足できない場合には、特定の領域又はページ全体において、クラス1の平均輝度値Mとクラス2の平均輝度値Mとの間においてOCR確度が最も高い閾値を自動的に変更して、たとえば自動処理の二値化処理で消滅した文字を対話型微調整処理モードで再現することができる。 In this manner, when the image forming apparatus 10 according to the second embodiment is not satisfied with the result of the automatic processing in the first embodiment, the average brightness value M1 of class 1 and the class By automatically changing the threshold value with the highest OCR accuracy between the average brightness value M2 of 2 and the average brightness value M2 of 2, it is possible to reproduce, for example, characters that disappeared during automatic binarization processing in the interactive fine-tuning processing mode. .

これにより、画像形成装置10は、たとえば異常画像(全白や全黒)に簡易に対処できるとともに、ユーザー好みの二値化処理を実現する事ができる。なお、濃度減少アイコン237d及び濃度増加アイコン237uは、ステップS810乃至ステップS850の処理を実行しなかった場合にも全階調値の範囲又は平均輝度値Mと平均輝度値Mとの間で利用可能とすることが好ましい。 Thereby, the image forming apparatus 10 can easily deal with, for example, an abnormal image (all white or all black), and can also realize binarization processing according to the user's preference. Note that the density decrease icon 237d and the density increase icon 237u are displayed within the range of all gradation values or between the average brightness value M1 and the average brightness value M2 even if the processes of steps S810 to S850 are not executed. It is preferable to make it available.

C.変形例:
本発明は、上記実施形態だけでなく、以下のような変形例でも実施することができる。
C. Variant:
The present invention can be implemented not only in the above embodiment but also in the following modifications.

変形例1:上記実施形態では、ローパスフィルタ処理で使用されるフィルタは、ガウシアンフィルタであるが、それに限定されず、たとえば移動平均フィルタを使用してもよい。さらに、背景画像(たとえば地肌画像)のノイズを除去できる特性を有していれば、DOG(Difference of Gaussian)フィルタ(ガウシアン差分フィルタとも呼ばれる。)のようなノイズの除去とともに線画の強調が可能なバンドパスフィルタも利用可能である。 Modification 1: In the above embodiment, the filter used in the low-pass filter processing is a Gaussian filter, but is not limited thereto, and for example, a moving average filter may be used. Furthermore, if it has the characteristic of removing noise from a background image (for example, a background image), it is possible to remove noise and emphasize line drawings, such as with a DOG (Difference of Gaussian) filter (also called a Gaussian difference filter). Bandpass filters are also available.

図18は、変形例に係るフィルタ処理の内容を示す説明図である。図18(a)は、図9(a)と同一であり、ガウシアンフィルタ処理後のモノクロ画像データMD1のヒストグラムH1を示している。図18(b)は、DOGフィルタ処理後のモノクロ画像データMD1aのヒストグラムH1aを示している。ヒストグラムH1aでは、薄文字のテキストが強調されている。これにより、二値化処理の閾値設定において、薄文字のテキストの残存性を高めるような適切な閾値を設定可能とすることができる。 FIG. 18 is an explanatory diagram showing the contents of filter processing according to a modified example. FIG. 18(a) is the same as FIG. 9(a), and shows the histogram H1 of the monochrome image data MD1 after Gaussian filter processing. FIG. 18(b) shows a histogram H1a of the monochrome image data MD1a after the DOG filter processing. In the histogram H1a, light text is emphasized. Thereby, in threshold setting for binarization processing, it is possible to set an appropriate threshold that increases the survivability of light text.

変形例2:上記実施形態では、輝度階調値と輝度ヒストグラムが使用されているが、たとえば濃度階調値や濃度ヒストグラムを使用してもよい。濃度は、たとえばKの色材を使用して印刷したと仮定した場合のKの色材の濃度階調値である。 Modification 2: In the above embodiment, brightness gradation values and brightness histograms are used, but for example, density gradation values and density histograms may be used. The density is, for example, the density gradation value of the K color material when printing is performed using the K color material.

変形例3:上記実施形態では、本発明は、画像形成装置に適用されているが、必ずしもい画像形成装置に限定されず、画像読み取り装置や携帯端末用のような画像処理装置として機能する電子機器に適用可能である。 Modified Example 3: In the above embodiment, the present invention is applied to an image forming apparatus, but is not necessarily limited to an image forming apparatus, and is applicable to an electronic device that functions as an image processing apparatus such as an image reading apparatus or a mobile terminal. Applicable to equipment.

10 画像形成装置
210 制御部
220 画像形成部
230 操作表示部
240 記憶部
100 画像読取部
111 光源ドライバ
112 光源
121 イメージセンサ
122 受光素子
123 信号処理部
124 シェーディング補正部
130 AGC処理部
140 二値化処理部
141 フィルタ処理部
142 閾値設定部
150 原稿台
160 自動原稿送り装置
162 原稿読取スリット

10 Image forming apparatus 210 Control section 220 Image forming section 230 Operation display section 240 Storage section 100 Image reading section 111 Light source driver 112 Light source 121 Image sensor 122 Light receiving element 123 Signal processing section 124 Shading correction section 130 AGC processing section 140 Binarization processing Section 141 Filter processing section 142 Threshold setting section 150 Document table 160 Automatic document feeder 162 Document reading slit

Claims (7)

入力画像データに対して、二値化処理用の閾値を設定する前に前処理としてのローパスフィルタ処理を実行するフィルタ処理部と、
二値化処理用閾値として、前記ローパスフィルタ処理が実行された入力画像データに基づいて、判別分析法を使用して設定されるページ閾値と、局所閾値とを設定する閾値設定部と、
前記ローパスフィルタ処理が実行された入力画像データに含まれる複数の画素を(M×N)画素(M及びNは、3以上の整数)から構成される局所領域に分割し、前記分割された複数の局所領域を着目局所領域として順に選択する着目局所領域選択部と、
前記着目局所領域を構成する複数の画素が有する階調値のうちで最も濃度が低い側の階調値である最大階調値を取得し、前記最大階調値が小さくなるほど大きくなるように切替用閾値を設定する切替用閾値設定部と、
前記着目局所領域に含まれる複数の画素が有する階調値のうちの前記最大階調値と最小階調値の間の差である局所コントラストと、前記切替用閾値とを比較し、前記局所コントラストが前記切替用閾値よりも大きな場合には、前記最大階調値と前記最小階調値の間の範囲で前記局所コントラストに所定の係数を乗じた値を前記最小階調値に加算した値として設定される前記局所閾値を使用して二値化処理を実行し、前記局所コントラストが前記切替用閾値以下の場合には、前記ページ閾値を使用して二値化処理を実行する二値化処理部と、
前記ローパスフィルタ処理が実行された入力画像データに対して判別分析法で第1のクラスの平均階調値である第1の平均階調値と、背景画像を比較的に多く含む側である第2のクラスの平均階調値である第2の平均階調値とを算出するヒストグラム解析部と、
選択領域を指定するためのユーザー入力を受け付ける操作表示部と、
前記選択領域内の入力画像データに含まれている文字を認識し、前記認識の確からしさである認識確度を算出し、各文字の前記認識確度の積算値を算出する文字認識処理部と、
を備え、
前記二値化処理部は、前記第1の平均階調値と前記第2の平均階調値の間において閾値を変更しつつ、前記変更された閾値を使用して二値化処理を実行し、
前記文字認識処理部は、前記変更された閾値毎に前記認識確度を算出し、入力された各文字の認識確度の積算値が最も高い閾値である最高確度閾値を設定し、
前記二値化処理部は、前記最高確度閾値を使用して前記選択領域内の入力画像データの二値化処理を実行し、
前記操作表示部は、前記二値化処理後の画像を表示する画像処理装置。
a filter processing unit that performs low-pass filter processing as preprocessing on input image data before setting a threshold for binarization processing;
a threshold setting unit that sets a page threshold and a local threshold, which are set using a discriminant analysis method, as thresholds for binarization processing, based on the input image data that has been subjected to the low-pass filter processing;
A plurality of pixels included in the input image data subjected to the low-pass filter processing are divided into local regions composed of (M×N) pixels (M and N are integers of 3 or more), and the divided plurality of pixels are a local region of interest selection unit that sequentially selects local regions of interest as local regions of interest;
Obtain the maximum gradation value, which is the gradation value on the lowest density side among the gradation values of the plurality of pixels constituting the local area of interest, and switch so that the smaller the maximum gradation value is, the larger the gradation value becomes. a switching threshold setting unit that sets a threshold for
The local contrast, which is the difference between the maximum gradation value and the minimum gradation value among the gradation values of a plurality of pixels included in the local area of interest, is compared with the switching threshold, and the local contrast is determined by comparing the switching threshold with the local contrast. is larger than the switching threshold, a value obtained by multiplying the local contrast by a predetermined coefficient in the range between the maximum gradation value and the minimum gradation value is added to the minimum gradation value. Binarization processing that executes binarization processing using the set local threshold, and executes binarization processing using the page threshold when the local contrast is less than or equal to the switching threshold. Department and
A first average gradation value, which is the average gradation value of the first class, and a first average gradation value, which is the average gradation value of the first class, and a first average gradation value, which is the average gradation value of the first class, are determined by the discriminant analysis method on the input image data that has been subjected to the low-pass filter processing . a histogram analysis unit that calculates a second average gradation value that is an average gradation value of the second class;
an operation display section that accepts user input for specifying a selection area ;
a character recognition processing unit that recognizes characters included in the input image data in the selection area, calculates recognition accuracy that is the certainty of the recognition, and calculates an integrated value of the recognition accuracy of each character;
Equipped with
The binarization processing unit executes binarization processing using the changed threshold while changing the threshold between the first average gradation value and the second average gradation value . ,
The character recognition processing unit calculates the recognition accuracy for each of the changed thresholds, and sets a highest accuracy threshold that is a threshold with the highest cumulative value of recognition accuracy for each input character,
The binarization processing unit executes binarization processing of the input image data within the selected area using the highest accuracy threshold,
The operation display unit is an image processing device that displays the image after the binarization process.
請求項1記載の画像処理装置であって、さらに、
前記入力画像データに含まれている文字を認識し、前記認識の確からしさである認識確度を算出し、各文字の前記認識確度の積算値を算出する文字認識処理部を備え、
前記二値化処理部は、前記第1の平均階調値と前記第2の平均階調値の間において、前記閾値を変更しつつ
前記文字認識処理部は、前記選択された閾値毎に前記積算値を算出し、
前記二値化処理部は、前記積算値が最も大きな値を有する閾値を使用して二値化処理を実行する画像処理装置。
The image processing device according to claim 1, further comprising:
comprising a character recognition processing unit that recognizes characters included in the input image data, calculates recognition accuracy that is the certainty of the recognition, and calculates an integrated value of the recognition accuracy of each character,
The binarization processing unit changes the threshold between the first average gradation value and the second average gradation value,
The character recognition processing unit calculates the integrated value for each of the selected threshold values,
The binarization processing unit is an image processing device that executes binarization processing using a threshold value having the largest integrated value.
請求項1又は2に記載の画像処理装置であって、さらに
前記ローパスフィルタ処理が実行された画像データの、横軸が輝度階調値で縦軸が画素数である輝度ヒストグラムを生成し、前記輝度ヒストグラムの地肌画像の分布のピーク値の輝度階調値である背景ピーク階調値の側から濃度が濃くなる階調値の側に前記ピーク値の画素数であるピーク画素数の所定範囲の割合の画素数となる階調値を検索して背景ノイズ判定用閾値を設定する背景ノイズ判定用閾値設定部と、
前記背景ノイズ判定用閾値よりも濃度が薄くなる側の階調値を有する画素の階調値を全て前記背景ノイズ判定用閾値とすることによって背景ノイズを低減させる背景ノイズ低減処理部と、
を備え、
前記ローパスフィルタ処理は、平滑化処理である画像処理装置。
The image processing device according to claim 1 or 2, further comprising :
A brightness histogram of the image data subjected to the low-pass filter processing, whose horizontal axis is the brightness gradation value and the vertical axis is the number of pixels, is generated, and the brightness histogram is calculated using the brightness gradation value of the peak value of the distribution of the background image of the brightness histogram. Background noise is determined by searching for a gradation value that has the number of pixels in a predetermined range of the number of pixels of the peak value, which is the number of pixels of the peak value, from the side of a certain background peak gradation value to the side of the gradation value where the density becomes darker. a background noise determination threshold setting unit that sets a threshold for
a background noise reduction processing unit that reduces background noise by setting all the gradation values of pixels having gradation values on the side where the density is lighter than the background noise determination threshold as the background noise determination threshold;
Equipped with
In the image processing apparatus , the low-pass filter processing is smoothing processing .
請求項3記載の画像処理装置であって、
前記フィルタ処理部は、ガウシアンフィルタを使用して前記ローパスフィルタ処理を実行する画像処理装置。
The image processing device according to claim 3,
The filter processing unit is an image processing device that performs the low-pass filter processing using a Gaussian filter.
請求項3記載の画像処理装置であって、
前記フィルタ処理部は、ガウシアン差分フィルタを使用して前記ローパスフィルタ処理を実行する画像処理装置。
The image processing device according to claim 3,
The filter processing unit is an image processing device that performs the low-pass filter processing using a Gaussian difference filter.
入力画像データに対して、二値化処理用の閾値を設定する前に前処理としてのローパスフィルタ処理を実行するフィルタ処理工程と、
二値化処理用閾値として、前記ローパスフィルタ処理が実行された入力画像データに基づいて、判別分析法を使用して設定されるページ閾値と、局所閾値とを設定する閾値設定工程と、
前記ローパスフィルタ処理が実行された入力画像データに含まれる複数の画素を(M×N)画素(M及びNは、3以上の整数)から構成される局所領域に分割し、前記分割された複数の局所領域を着目局所領域として順に選択する着目局所領域選択工程と、
前記着目局所領域を構成する複数の画素が有する階調値のうちで最も濃度が低い側の階調値である最大階調値を取得し、前記最大階調値が小さくなるほど大きくなるように切替用閾値を設定する切替用閾値設定工程と、
前記着目局所領域に含まれる複数の画素が有する階調値のうちの前記最大階調値と最小階調値の間の差である局所コントラストと、前記切替用閾値とを比較し、前記局所コントラストが前記切替用閾値よりも大きな場合には、前記最大階調値と前記最小階調値の間の範囲で前記局所コントラストに所定の係数を乗じた値を前記最小階調値に加算した値として設定される前記局所閾値を使用して二値化処理を実行し、前記局所コントラストが前記切替用閾値以下の場合には、前記ページ閾値を使用して二値化処理を実行する二値化処理工程と、
前記ローパスフィルタ処理が実行された入力画像データに対して判別分析法で第1のクラスの平均階調値である第1の平均階調値と、背景画像を比較的に多く含む側である第2のクラスの平均階調値である第2の平均階調値とを算出するヒストグラム解析工程と、
選択領域を指定するためのユーザー入力を受け付ける操作表示工程と、
前記選択領域内の入力画像データに含まれている文字を認識し、前記認識の確からしさである認識確度を算出し、各文字の前記認識確度の積算値を算出する文字認識処理工程と、
を備え、
前記二値化処理工程は、前記第1の平均階調値と前記第2の平均階調値の間において閾値を変更しつつ、前記変更された閾値を使用して二値化処理を実行
前記文字認識処理工程は、前記変更された閾値毎に前記認識確度を算出し、入力された各文字の認識確度の積算値が最も高い閾値である最高確度閾値を設定し、
前記二値化処理工程は、前記最高確度閾値を使用して前記選択領域内の入力画像データの二値化処理を実行し、
前記操作表示工程は、前記二値化処理後の画像を表示する画像処理方法。
a filter processing step of performing low-pass filter processing as preprocessing on input image data before setting a threshold for binarization processing;
a threshold setting step of setting a page threshold and a local threshold, which are set using a discriminant analysis method, as thresholds for binarization processing, based on the input image data on which the low-pass filter processing has been performed;
A plurality of pixels included in the input image data subjected to the low-pass filter processing are divided into local regions composed of (M×N) pixels (M and N are integers of 3 or more), and the divided plurality of pixels are a step of selecting a local region of interest as a local region of interest;
Obtain the maximum gradation value, which is the gradation value on the lowest density side among the gradation values of the plurality of pixels constituting the local area of interest, and switch so that the smaller the maximum gradation value is, the larger the gradation value becomes. a switching threshold setting step of setting a threshold for
The local contrast, which is the difference between the maximum gradation value and the minimum gradation value among the gradation values of a plurality of pixels included in the local area of interest, is compared with the switching threshold, and the local contrast is determined by comparing the switching threshold with the local contrast. is larger than the switching threshold, a value obtained by multiplying the local contrast by a predetermined coefficient in the range between the maximum gradation value and the minimum gradation value is added to the minimum gradation value. Binarization processing that executes binarization processing using the set local threshold, and executes binarization processing using the page threshold when the local contrast is less than or equal to the switching threshold. process and
A first average gradation value, which is the average gradation value of the first class, and a first average gradation value, which is the average gradation value of the first class, and a first average gradation value, which is the average gradation value of the first class, are determined by the discriminant analysis method on the input image data that has been subjected to the low-pass filter processing . a histogram analysis step of calculating a second average gradation value that is an average gradation value of the second class;
an operation display step of accepting user input for specifying a selection area ;
a character recognition processing step of recognizing characters included in the input image data in the selected area, calculating a recognition accuracy that is the certainty of the recognition, and calculating an integrated value of the recognition accuracy of each character;
Equipped with
In the binarization processing step, a threshold is changed between the first average gradation value and the second average gradation value, and the binarization processing is performed using the changed threshold . ,
The character recognition processing step calculates the recognition accuracy for each of the changed thresholds, and sets a highest accuracy threshold that is the threshold with the highest cumulative value of recognition accuracy for each input character,
The binarization processing step executes binarization processing of the input image data within the selected area using the highest accuracy threshold,
The operation display step is an image processing method of displaying the image after the binarization processing.
入力画像データに対して、二値化処理用の閾値を設定する前に前処理としてのローパスフィルタ処理を実行するフィルタ処理部、
二値化処理用閾値として、前記ローパスフィルタ処理が実行された入力画像データに基づいて、判別分析法を使用して設定されるページ閾値と、局所閾値とを設定する閾値設定部、
前記ローパスフィルタ処理が実行された入力画像データに含まれる複数の画素を(M×N)画素(M及びNは、3以上の整数)から構成される局所領域に分割し、前記分割された複数の局所領域を着目局所領域として順に選択する着目局所領域選択部、
前記着目局所領域を構成する複数の画素が有する階調値のうちで最も濃度が低い側の階調値である最大階調値を取得し、前記最大階調値が小さくなるほど大きくなるように切替用閾値を設定する切替用閾値設定部、
前記着目局所領域に含まれる複数の画素が有する階調値のうちの前記最大階調値と最小階調値の間の差である局所コントラストと、前記切替用閾値とを比較し、前記局所コントラストが前記切替用閾値よりも大きな場合には、前記最大階調値と前記最小階調値の間の範囲で前記局所コントラストに所定の係数を乗じた値を前記最小階調値に加算した値として設定される前記局所閾値を使用して二値化処理を実行し、前記局所コントラストが前記切替用閾値以下の場合には、前記ページ閾値を使用して二値化処理を実行する二値化処理部、
前記ローパスフィルタ処理が実行された入力画像データに対して判別分析法で第1のクラスの平均階調値である第1の平均階調値と、背景画像を比較的に多く含む側である第2のクラスの平均階調値である第2の平均階調値とを算出するヒストグラム解析部、
選択領域を指定するためのユーザー入力を受け付ける操作表示部、及び
前記選択領域内の入力画像データに含まれている文字を認識し、前記認識の確からしさである認識確度を算出し、各文字の前記認識確度の積算値を算出する文字認識処理部として画像処理装置を機能させ、
前記二値化処理部は、前記第1の平均階調値と前記第2の平均階調値の間において閾値を変更しつつ、前記変更された閾値を使用して二値化処理を実行し、
前記文字認識処理部は、前記変更された閾値毎に前記認識確度を算出し、入力された各文字の認識確度の積算値が最も高い閾値である最高確度閾値を設定し、
前記二値化処理部は、前記最高確度閾値を使用して前記選択領域内の入力画像データの二値化処理を実行し、
前記操作表示部は、前記二値化処理後の画像を表示する画像処理プログラム。
a filter processing unit that performs low-pass filter processing as preprocessing on input image data before setting a threshold for binarization processing;
A threshold setting unit that sets a page threshold and a local threshold, which are set using a discriminant analysis method, as thresholds for binarization processing, based on the input image data on which the low-pass filter processing has been performed;
A plurality of pixels included in the input image data subjected to the low-pass filter processing are divided into local regions composed of (M×N) pixels (M and N are integers of 3 or more), and the divided plurality of pixels are a local region of interest selection unit that sequentially selects the local regions of as the local region of interest;
Obtain the maximum gradation value, which is the gradation value on the lowest density side among the gradation values of the plurality of pixels constituting the local area of interest, and switch so that the smaller the maximum gradation value is, the larger the gradation value becomes. a switching threshold setting unit that sets a threshold for
The local contrast, which is the difference between the maximum gradation value and the minimum gradation value among the gradation values of a plurality of pixels included in the local area of interest, is compared with the switching threshold, and the local contrast is determined by comparing the switching threshold with the local contrast. is larger than the switching threshold, a value obtained by multiplying the local contrast by a predetermined coefficient in the range between the maximum gradation value and the minimum gradation value is added to the minimum gradation value. Binarization processing that executes binarization processing using the set local threshold, and executes binarization processing using the page threshold when the local contrast is less than or equal to the switching threshold. Department,
A first average gradation value, which is the average gradation value of the first class, and a first average gradation value, which is the average gradation value of the first class, and a first average gradation value, which is the average gradation value of the first class, are determined by the discriminant analysis method on the input image data that has been subjected to the low-pass filter processing . a histogram analysis unit that calculates a second average gradation value that is an average gradation value of the second class;
an operation display unit that accepts user input for specifying a selection area ; and an operation display unit that recognizes characters included in the input image data within the selection area, calculates recognition accuracy that is the certainty of the recognition, and calculates the recognition accuracy of each character. causing the image processing device to function as a character recognition processing unit that calculates the cumulative value of the recognition accuracy;
The binarization processing unit executes binarization processing using the changed threshold while changing the threshold between the first average gradation value and the second average gradation value . ,
The character recognition processing unit calculates the recognition accuracy for each of the changed thresholds, and sets a highest accuracy threshold that is a threshold with the highest cumulative value of recognition accuracy for each input character,
The binarization processing unit executes binarization processing of the input image data within the selected area using the highest accuracy threshold,
The operation display section is an image processing program that displays the image after the binarization process.
JP2019196511A 2019-10-29 2019-10-29 Image processing device, image processing method, and image processing program Active JP7357853B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2019196511A JP7357853B2 (en) 2019-10-29 2019-10-29 Image processing device, image processing method, and image processing program
US17/075,813 US11128781B2 (en) 2019-10-29 2020-10-21 Image processing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019196511A JP7357853B2 (en) 2019-10-29 2019-10-29 Image processing device, image processing method, and image processing program

Publications (2)

Publication Number Publication Date
JP2021072484A JP2021072484A (en) 2021-05-06
JP7357853B2 true JP7357853B2 (en) 2023-10-10

Family

ID=75713468

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019196511A Active JP7357853B2 (en) 2019-10-29 2019-10-29 Image processing device, image processing method, and image processing program

Country Status (1)

Country Link
JP (1) JP7357853B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116246265B (en) * 2023-05-12 2023-08-08 威海凯思信息科技有限公司 Property management method and device based on image processing

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008113446A (en) 2002-09-05 2008-05-15 Ricoh Co Ltd Image processing device, image processing program and recording medium
JP2014107589A (en) 2012-11-22 2014-06-09 Canon Inc Image processing system, image processing method, and program thereof
JP2014150525A (en) 2013-01-11 2014-08-21 Canon Inc Image forming apparatus, luminance correction method, and program
JP2016197377A (en) 2015-04-06 2016-11-24 富士通株式会社 Computer program for image correction, image correction device, and image correction method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008113446A (en) 2002-09-05 2008-05-15 Ricoh Co Ltd Image processing device, image processing program and recording medium
JP2014107589A (en) 2012-11-22 2014-06-09 Canon Inc Image processing system, image processing method, and program thereof
JP2014150525A (en) 2013-01-11 2014-08-21 Canon Inc Image forming apparatus, luminance correction method, and program
JP2016197377A (en) 2015-04-06 2016-11-24 富士通株式会社 Computer program for image correction, image correction device, and image correction method

Also Published As

Publication number Publication date
JP2021072484A (en) 2021-05-06

Similar Documents

Publication Publication Date Title
US9135523B2 (en) Apparatus, method of controlling the same and storage medium
US20060039604A1 (en) Image processing method, image processing apparatus and storage medium
CN110619608B (en) Image processing apparatus, control method thereof, and storage medium
JP3046493B2 (en) Image processing device
JP6648580B2 (en) Document type recognition device, image forming device, document type recognition method and program
US6618171B1 (en) Black point adjustment based on image background
US8363946B2 (en) Decoding two-dimensional code using multiple binarization thresholds
US9973653B2 (en) Image processing apparatus and image processing method
JP2001320584A (en) Image processor and image forming device
JP7357853B2 (en) Image processing device, image processing method, and image processing program
KR101317308B1 (en) Image processing apparatus and control method the same
JP6705237B2 (en) Image compression apparatus, image forming apparatus, image compression method and program
US11128781B2 (en) Image processing apparatus
JP4379460B2 (en) Image forming system, image forming program, and recording medium
JP3134292B2 (en) Image processing device
JP7357851B2 (en) Image processing device, image processing method, and image processing program
JP7357852B2 (en) Image processing device, image processing method, and image processing program
US7057767B2 (en) Automatic background removal method and system
JP4222230B2 (en) Image reading apparatus, image forming apparatus, image processing apparatus, and program
US11750760B2 (en) Image forming device, image processing method, and non-transitory recording medium storing program with determining image processing method based on image
JP4123149B2 (en) Image processing device
JP2861410B2 (en) Image processing device
JP6225090B2 (en) Image processing method and image processing apparatus
JP4066902B2 (en) Image processing apparatus, image processing method, and image processing program
JP2019176336A (en) Image processing device, image transmission device, image processing method, and image processing program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20220927

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20230609

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20230622

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20230810

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: 20230828

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230910

R150 Certificate of patent or registration of utility model

Ref document number: 7357853

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150