JP2012205133A - Image processor and control method therefor - Google Patents

Image processor and control method therefor Download PDF

Info

Publication number
JP2012205133A
JP2012205133A JP2011068676A JP2011068676A JP2012205133A JP 2012205133 A JP2012205133 A JP 2012205133A JP 2011068676 A JP2011068676 A JP 2011068676A JP 2011068676 A JP2011068676 A JP 2011068676A JP 2012205133 A JP2012205133 A JP 2012205133A
Authority
JP
Japan
Prior art keywords
threshold
value
pixels
range
block
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.)
Withdrawn
Application number
JP2011068676A
Other languages
Japanese (ja)
Inventor
Xiao Yan Dai
暁艶 戴
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.)
Canon Inc
Original Assignee
Canon 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 Canon Inc filed Critical Canon Inc
Priority to JP2011068676A priority Critical patent/JP2012205133A/en
Publication of JP2012205133A publication Critical patent/JP2012205133A/en
Withdrawn legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To accurately determine a character area included in an image.SOLUTION: An image processor includes: division means for dividing an image into multiple blocks respectively having a predetermined number of pixels; derivation means for deriving the edge intensity values of the respective pixels; reference value derivation means for deriving a reference value based on the maximum value and minimum value of the edge intensity value of each pixel; threshold setting means for setting a first threshold and a second threshold based on the reference value; counting means for counting the number of pixels having the edge intensity values to be respectively included in a first range equal to or more than the first threshold value and lower than the second threshold value and a second range equal to or more than the second threshold; and determination means for determining a character area when the pixels having the edge intensity values of the second range exist and determining a non-character area when the pixels having the edge intensity values of the second range and the first range do not exist, based on the counting result.

Description

本発明は、画像処理技術に関するものであり、特に、画像に含まれる文字領域を検出する技術に関するものである。   The present invention relates to an image processing technique, and more particularly to a technique for detecting a character area included in an image.

一般に、デジタル複合機等において読み取られる原稿は、文字原稿、写真原稿及び網点印刷原稿の3種類に大別される。網点印刷原稿は、階調のある画像を細かいドットの集合体に分解し、そのドットの大きさ、即ち、濃度で擬似的に階調を表現するものである。スキャナで読み取ったこれらの原稿画像に対して、文字や網点や写真等の領域を識別し、各属性に適した処理を施すことが良く行われる。例えば、文字領域に対しては解像度を重視した処理を施した後、文字認識や文字ベクトル化処理を行い、網点領域や写真領域に対しては階調性を重視した処理を施して画質の向上を図るようにする。そのため、文字や網点等を高い精度で識別することが必要とされる。   In general, a document read by a digital multifunction peripheral or the like is roughly classified into three types: a character document, a photo document, and a halftone print document. A halftone print original is an image in which an image with gradation is decomposed into a collection of fine dots, and the gradation is expressed in a pseudo manner by the size of the dots, that is, the density. For these original images read by the scanner, it is often performed to identify areas such as characters, halftone dots, and photographs, and to perform processing suitable for each attribute. For example, after processing with emphasis on resolution for character areas, character recognition and character vectorization processing are performed, and processing with emphasis on gradation is performed on halftone areas and photo areas. Try to improve. Therefore, it is necessary to identify characters, halftone dots, and the like with high accuracy.

従来、文字や網点等の識別技術として、色情報、或いは、エッジ情報を用いて判定する方法が提案されている。特許文献1では、入力画像を一定の大きさのブロックに分割し、隣接する画素間の濃度差の絶対値の総和をブロック毎に求め、予め決められた閾値と比較することにより、各ブロックが網点領域と文字領域と中間調領域とのいずれであるかを判定する方法が提案されている。また、特許文献2は、主走査方向と副走査方向の少なくとも一方において画素濃度差が大きい境界部が2画素以上続く連続エッジが検出されなければ文字領域と判定し、連続エッジが検出されれば文字以外の領域と判定する。   Conventionally, as a technique for identifying characters, halftone dots, and the like, a method of determining using color information or edge information has been proposed. In Patent Document 1, an input image is divided into blocks of a certain size, the sum of absolute values of density differences between adjacent pixels is obtained for each block, and each block is compared with a predetermined threshold value. There has been proposed a method for determining whether a halftone area, a character area, or a halftone area. Further, in Patent Document 2, if a continuous edge in which a boundary portion having a large pixel density difference in at least one of the main scanning direction and the sub-scanning direction continues for two or more pixels is not detected, it is determined as a character region, and if a continuous edge is detected. Judged as non-character area.

さらに、特許文献3では、ブロックにあるエッジ画素数を算出し、当該算出したエッジ画素数が閾値以上であるブロックを網点領域、閾値未満であるブロックを非網点領域(文字領域)として判定する方法が提案されている。また、特許文献4では、網点や文字線の輪郭成分を抽出し、当該抽出した輪郭成分のうち網点ドットの輪郭成分を除去し、M×N画素ブロック内の黒画素数を計数する。そして、ブロック内の黒画素数により文字領域と中間調画像領域とを識別する。このとき、網点領域の部分は、黒画素数の少ない領域となるので、中間調画像領域として識別される。   Furthermore, in Patent Document 3, the number of edge pixels in a block is calculated, and a block in which the calculated number of edge pixels is equal to or greater than a threshold value is determined as a halftone dot region, and a block in which the calculated edge pixel number is less than the threshold value is determined as a non-halftone dot region (character region). A method has been proposed. Further, in Patent Document 4, a halftone dot or a character line contour component is extracted, a halftone dot contour component is removed from the extracted contour component, and the number of black pixels in the M × N pixel block is counted. Then, the character area and the halftone image area are identified by the number of black pixels in the block. At this time, the halftone dot area is an area having a small number of black pixels, and thus is identified as a halftone image area.

特公平5−50187号公報Japanese Patent Publication No. 5-50187 特開平08−51537号公報Japanese Patent Laid-Open No. 08-51537 特開2002−158873号公報JP 2002-158873 A 特開平01−286571号公報Japanese Patent Laid-Open No. 01-286571

しかしながら、網点領域を構成する網点ドットの密度や構成色によっては、網点領域と文字領域とにおいて、同等のエッジ成分を含んだり、画素間の濃度差が同等になったりする場合がある。このような場合、網点領域と文字領域とを誤認識しやすくなる。   However, depending on the density and composition color of the halftone dots constituting the halftone dot area, the halftone dot area and the character area may contain the same edge component or the density difference between the pixels may be equivalent. . In such a case, it becomes easy to misrecognize the dot area and the character area.

また、図1に示すような網点背景上に文字があるような画像においても以下のような理由で誤認識が発生しやすい。図1(a)は、黒色と白色により構成される網点背景上に、白色の文字が存在する画像を例示的に示す図である。図において、所定サイズのブロック(正方形ブロック)ごとに分割して、各ブロックの領域判定を行うものとする。この例では、網点のみを含むブロック(網点ブロック)も、網点と文字とを含むブロック(文字ブロック)も、白、黒により表現されるため、各ブロック内に含まれる画素間の濃度差では文字ブロックと網点ブロックとの区別が出来ない。また、文字ブロックにも網点ブロックにも黒と白との連続エッジが存在するため、エッジ情報によっても文字ブロックと網点ブロックとの区別が困難である。図1(b)は、薄い青色の背景上にある濃い青色の文字を含む画像を示している。この場合、文字色と背景色の色差が小さいので、色を使った判定では文字ブロックと非文字ブロックの判別が難しい。また、文字と背景の濃度差が小さく、文字周囲における連続エッジの認識が困難であるため、エッジ情報によっても文字ブロックと非文字ブロックとの判定が困難になる。その結果、領域の誤判定が生じ、その誤判定結果に基づいた画像処理を行うと、画質の劣化が発生することになる。   Further, even in an image with characters on a halftone dot background as shown in FIG. 1, erroneous recognition is likely to occur for the following reason. FIG. 1A is a diagram exemplarily showing an image in which white characters are present on a halftone dot background composed of black and white. In the figure, it is assumed that a block of a predetermined size (square block) is divided and the area of each block is determined. In this example, both a block including only halftone dots (halftone dot block) and a block including halftone dots and characters (character block) are expressed in white and black, so that the density between pixels included in each block is expressed. The difference between the character block and the halftone dot block cannot be distinguished. In addition, since black and white continuous edges exist in both the character block and the halftone dot block, it is difficult to distinguish the character block from the halftone dot block based on the edge information. FIG. 1 (b) shows an image containing dark blue letters on a light blue background. In this case, since the color difference between the character color and the background color is small, it is difficult to discriminate between a character block and a non-character block in the determination using colors. In addition, since the density difference between the character and the background is small and it is difficult to recognize continuous edges around the character, it is difficult to determine a character block and a non-character block even by edge information. As a result, erroneous determination of a region occurs, and when image processing based on the erroneous determination result is performed, image quality deterioration occurs.

本発明は上述の問題点に鑑みなされたものであり、画像内の領域の属性を好適に判定する画像処理技術を提供することを目的とする。   The present invention has been made in view of the above-described problems, and an object of the present invention is to provide an image processing technique for suitably determining an attribute of a region in an image.

上述の1以上の問題点を解決するため、本発明の画像処理装置は、画像を、各々が所定数の画素を含む複数のブロックに分割する分割手段と、注目ブロックに含まれる各画素のエッジ強度値を導出する導出手段と、前記注目ブロックに含まれる画素のエッジ強度値の最大値および最小値に基づいて、該注目ブロックにおける基準値を導出する基準値導出手段と、前記導出した基準値に基づいて、該基準値より大きい第1閾値と該第1閾値より大きい第2閾値とを設定する閾値設定手段と、前記注目ブロックにおいて、前記第1閾値以上かつ前記第2閾値未満である第1範囲と前記第2閾値以上である第2範囲との各々に含まれるエッジ強度値を有する画素の個数を計数する計数手段と、前記計数手段による計数の結果に基づいて、前記第2範囲のエッジ強度値を有する画素が存在する場合は前記注目ブロックを文字領域と判定し、前記第2範囲及び前記第1範囲のエッジ強度値を有する画素が存在しない場合は前記注目ブロックを非文字領域と判定する判定手段と、を備える。   In order to solve one or more problems described above, an image processing apparatus according to the present invention includes a dividing unit that divides an image into a plurality of blocks each including a predetermined number of pixels, and an edge of each pixel included in the target block. Deriving means for deriving an intensity value, reference value deriving means for deriving a reference value in the target block based on the maximum and minimum edge intensity values of pixels included in the target block, and the derived reference value Based on the threshold value setting means for setting a first threshold value greater than the reference value and a second threshold value greater than the first threshold, and in the target block, a first threshold value that is greater than or equal to the first threshold value and less than the second threshold value. Counting means for counting the number of pixels having edge intensity values included in each of the first range and the second range equal to or greater than the second threshold, and based on the result of counting by the counting means, the second category. If the pixel having the edge intensity value of the second range and the first range does not exist, the target block is determined to be a non-character region. Determining means.

本発明によれば、画像内の領域の属性を好適に判定する画像処理技術を提供することができる。   ADVANTAGE OF THE INVENTION According to this invention, the image processing technique which determines suitably the attribute of the area | region in an image can be provided.

文字領域と非文字領域との判定が困難な例を示す図である。It is a figure which shows the example in which determination of a character area and a non-character area is difficult. 第1実施形態に係る画像処理装置の機能構成を示すブロック図である。It is a block diagram which shows the function structure of the image processing apparatus which concerns on 1st Embodiment. 図2に示す画像処理装置を実装するデジタル複合機(MFP)のブロック図である。FIG. 3 is a block diagram of a digital multi-function peripheral (MFP) in which the image processing apparatus shown in FIG. 2 is mounted. エッジ特徴量出力処理を説明するフローチャートである。It is a flowchart explaining an edge feature-value output process. 基準値(基準閾値)導出処理を説明する図である。It is a figure explaining a reference value (reference threshold) derivation processing. 第1実施形態に係るエッジ特徴量の各パラメータを説明する図である。It is a figure explaining each parameter of the edge feature-value concerning 1st Embodiment. 第1実施形態に係るエッジ特徴量の各パラメータを導出するフローチャートである。It is a flowchart which derives | leads-out each parameter of the edge feature-value based on 1st Embodiment. 各閾値によるエッジ抽出結果の例を示す図である。It is a figure which shows the example of the edge extraction result by each threshold value. 第1実施形態に係る領域判定処理のフローチャートである。It is a flowchart of the area | region determination process which concerns on 1st Embodiment. 第2実施形態に係るエッジ特徴量の各パラメータを説明する図である。It is a figure explaining each parameter of the edge feature-value concerning 2nd Embodiment. 第2実施形態に係るエッジ特徴量の各パラメータを導出するフローチャートである。It is a flowchart which derives | leads-out each parameter of the edge feature-value which concerns on 2nd Embodiment. 第2実施形態に係る領域判定処理のフローチャートである。It is a flowchart of the area | region determination process which concerns on 2nd Embodiment.

以下に、図面を参照して、この発明の好適な実施の形態を詳しく説明する。なお、以下の実施の形態はあくまで例示であり、本発明の範囲を限定する趣旨のものではない。   Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the drawings. The following embodiments are merely examples, and are not intended to limit the scope of the present invention.

(第1実施形態)
本発明に係る画像処理装置の第1実施形態として、デジタル複合機(MFP)を例に挙げて以下に説明する。
<装置構成>
図3は、本発明に係る画像処理装置を実装するデジタル複合機(MFP)の主な構成を示すブロック図である。また、図2は、第1実施形態に係る画像処理装置のスキャナ画像処理部2080の詳細構成を示すブロック図である。なお、本実施形態ではスキャナ画像処理部2080は電子回路等のハードウェアで構成され、当該スキャナ画像処理部のハードウェアが後述する画像処理を実行するものとして説明するが、これに限るものではない。例えば、CPU2001がHDD2004に格納されたプログラムを実行することにより、スキャナ画像処理部2080の各処理部として機能するよう構成してもよい。
(First embodiment)
A first embodiment of an image processing apparatus according to the present invention will be described below by taking a digital multi-function peripheral (MFP) as an example.
<Device configuration>
FIG. 3 is a block diagram showing a main configuration of a digital multi-function peripheral (MFP) in which the image processing apparatus according to the present invention is mounted. FIG. 2 is a block diagram showing a detailed configuration of the scanner image processing unit 2080 of the image processing apparatus according to the first embodiment. In the present embodiment, the scanner image processing unit 2080 is configured by hardware such as an electronic circuit, and the hardware of the scanner image processing unit is described as executing image processing to be described later, but is not limited thereto. . For example, the CPU 2001 may be configured to function as each processing unit of the scanner image processing unit 2080 by executing a program stored in the HDD 2004.

図3に示すように、MFPは、画像処理装置の制御手段として機能するコントローラユニット2000を備えている。コントローラユニット2000は、画像入力デバイスであるスキャナ2070や画像出力デバイスであるプリンタ2095と、デバイスインタフェース(I/F)を介して接続する。そして、コントローラユニット2000は、スキャナ2070で原稿を読み取ることによって得た画像データを、プリンタ2095によって印刷出力するコピー機能を実現するための制御を行うことが可能である。また、コントローラユニット2000は、LAN1006や公衆回線(WAN)1008を介して他装置との間でパターン画像やデバイス情報等の入出力を行うための制御を行うことが可能である。   As shown in FIG. 3, the MFP includes a controller unit 2000 that functions as a control unit of the image processing apparatus. The controller unit 2000 is connected to a scanner 2070 as an image input device and a printer 2095 as an image output device via a device interface (I / F). Then, the controller unit 2000 can perform control for realizing a copy function for printing out image data obtained by reading a document with the scanner 2070 by the printer 2095. The controller unit 2000 can perform control for inputting / outputting pattern images, device information, and the like to / from other apparatuses via the LAN 1006 or the public line (WAN) 1008.

コントローラユニット2000は、図3に示すように、CPU2001を有している。CPU2001は、ROM2003に格納されているブートプログラムによりオペレーションシステム(OS)を立ち上げる。そして、このOS上でHDD(ハードディスクドライブ)2004に格納されているアプリケーションプログラムを実行することによって各種処理を実行する。CPU2001の作業領域として、RAM2002が用いられる。RAM2002はまた、CPU2001の作業領域だけでなく、画像データを一時記憶するための画像メモリ領域としても用いられる。HDD2004は、上記アプリケーションプログラムや画像データを格納する。   As shown in FIG. 3, the controller unit 2000 has a CPU 2001. The CPU 2001 starts up an operation system (OS) by a boot program stored in the ROM 2003. Various processes are executed by executing application programs stored in an HDD (Hard Disk Drive) 2004 on the OS. A RAM 2002 is used as a work area for the CPU 2001. The RAM 2002 is used not only as a work area for the CPU 2001 but also as an image memory area for temporarily storing image data. The HDD 2004 stores the application program and image data.

CPU2001には、システムバス2007を介して、ROM2003やRAM2002、操作部I/F2006、ネットワークI/F2010、モデム2050及びイメージバスI/F2005が接続されている。   A ROM 2003 and a RAM 2002, an operation unit I / F 2006, a network I / F 2010, a modem 2050, and an image bus I / F 2005 are connected to the CPU 2001 via a system bus 2007.

操作部I/F(インタフェース)2006は、タッチパネルを有する操作部2012とのインタフェースであり、操作部2012に表示する画像データを操作部2012に対して出力する。また、操作部I/F2006は、操作部2012においてユーザにより入力された情報をCPU2001に送出する。   An operation unit I / F (interface) 2006 is an interface with an operation unit 2012 having a touch panel, and outputs image data to be displayed on the operation unit 2012 to the operation unit 2012. Further, the operation unit I / F 2006 sends information input by the user through the operation unit 2012 to the CPU 2001.

また、ネットワークI/F(インタフェース)2010は、LAN1006に接続され、LAN1006を介してLAN1006に接続された各装置との間で情報の入出力を行う。モデム2050は、公衆回線1008に接続し、公衆回線1008を介して他装置との間で情報の入出力を行う。   A network I / F (interface) 2010 is connected to the LAN 1006 and inputs / outputs information to / from each device connected to the LAN 1006 via the LAN 1006. The modem 2050 is connected to the public line 1008 and inputs / outputs information to / from other devices via the public line 1008.

イメージバスI/F(インタフェース)2005は、システムバス2007と画像データを高速で転送する画像バス2008を接続し、データ構造を変換するためのバスブリッジである。画像バス2008は、PCIバス又はIEEE1394から構成される。画像バス2008には、ラスタイメージプロセッサ(RIP)2060、デバイスI/F2020、スキャナ画像処理部2080、プリンタ画像処理部2090、画像回転部2030、及び画像圧縮部2040が接続されている。   An image bus I / F (interface) 2005 is a bus bridge for connecting a system bus 2007 and an image bus 2008 for transferring image data at high speed and converting a data structure. The image bus 2008 includes a PCI bus or IEEE1394. A raster image processor (RIP) 2060, a device I / F 2020, a scanner image processing unit 2080, a printer image processing unit 2090, an image rotation unit 2030, and an image compression unit 2040 are connected to the image bus 2008.

RIP2060は、PDLコードをビットマップイメージに展開するプロセッサである。デバイスI/F2020には、スキャナ2070及びプリンタ2095が接続され、画像データ転送の同期系/非同期系の変換処理を行う。スキャナ画像処理部2080は、スキャナから入力された入力画像データに対して補正、加工、編集処理を行う。プリンタ画像処理部2090は、プリント出力画像データに対して印刷用の補正、解像度変換等を行って印刷データを生成し、プリンタへ当該印刷データの出力を行う。画像回転部2030は、画像データの回転を行う。画像圧縮部2040は、多値画像データをJPEGデータに、2値画像データをJBIG、MMR、MH等のデータに圧縮するとともに、その伸長処理も行う。   The RIP 2060 is a processor that develops a PDL code into a bitmap image. A scanner 2070 and a printer 2095 are connected to the device I / F 2020, and perform synchronous / asynchronous conversion processing of image data transfer. A scanner image processing unit 2080 corrects, processes, and edits input image data input from the scanner. A printer image processing unit 2090 generates print data by performing print correction, resolution conversion, and the like on the print output image data, and outputs the print data to the printer. The image rotation unit 2030 rotates image data. The image compression unit 2040 compresses multi-value image data into JPEG data and binary image data into data such as JBIG, MMR, and MH, and also performs decompression processing.

次に、スキャナ画像処理部2080において、画像内の各領域の属性を判定し、各属性に応じた所定の画像処理を行う際に用いる各処理部の構成を、図2を用いて説明する。ブロック入力部11は、例えば、スキャナ2070を用いて紙原稿を読み取ることにより得たモノクロまたはカラー画像を、各々が所定数の画素を含む複数のブロック画像(以下、単に”ブロック”とも呼ぶ)に分割する。すなわち、入力画像を所定サイズのブロックごとに分割する。そして、当該分割した各ブロック画像をエッジ抽出部12および平滑化処理部15に入力する。   Next, the configuration of each processing unit used when the scanner image processing unit 2080 determines the attribute of each region in the image and performs predetermined image processing according to each attribute will be described with reference to FIG. For example, the block input unit 11 converts a monochrome or color image obtained by reading a paper document using the scanner 2070 into a plurality of block images each including a predetermined number of pixels (hereinafter also simply referred to as “blocks”). To divide. That is, the input image is divided into blocks each having a predetermined size. Then, the divided block images are input to the edge extraction unit 12 and the smoothing processing unit 15.

エッジ抽出部12は、ブロック入力部11から入力されたブロックからエッジ強度を抽出する。この処理で抽出されるエッジ強度は、ブロック内の各画素に対して、公知のプレヴィット(Prewitt)フィルタ、或いは、ゾーベル(Sobel)フィルタを適用することにより得られる微分データを利用することが可能である。エッジ特徴抽出部13は、エッジ抽出部12で算出された各画素のエッジ強度(エッジ強度値)から、ブロックごとにエッジ強度に対する基準値(以下、基準閾値とも呼ぶ)を算出する。この基準閾値からエッジ特徴の取得用のパラメータを設定し、エッジ特徴量を求める。なお、このエッジ特徴抽出処理の詳細については図4〜図7を参照して後述する。領域判定部14は、エッジ特徴抽出部13により決定されたエッジ特徴量に基づき、注目ブロックが文字領域か非文字領域かを判定する。この領域判定処理の詳細について図9を用いて後述する。   The edge extraction unit 12 extracts edge strength from the block input from the block input unit 11. The edge intensity extracted by this processing can use differential data obtained by applying a known Prewitt filter or Sobel filter to each pixel in the block. It is. The edge feature extraction unit 13 calculates a reference value (hereinafter also referred to as a reference threshold) for the edge strength for each block from the edge strength (edge strength value) of each pixel calculated by the edge extraction unit 12. An edge feature acquisition parameter is set from the reference threshold value to obtain an edge feature amount. Details of the edge feature extraction processing will be described later with reference to FIGS. The region determination unit 14 determines whether the block of interest is a character region or a non-character region based on the edge feature amount determined by the edge feature extraction unit 13. Details of this area determination processing will be described later with reference to FIG.

平滑化処理部15は、ブロック入力部11により入力されたブロック画像を平滑化処理する。平滑化処理はブロック画像に含まれる画素毎の細かい変化を少なくし、網点パターンを潰し、色情報の解析をしやすくするためのものである。平滑化処理には、公知のローパスフィルタや移動平均フィルタやエッジ保持型平滑フィルタ等を利用することが可能である。   The smoothing processing unit 15 performs a smoothing process on the block image input by the block input unit 11. The smoothing process is for reducing fine changes for each pixel included in the block image, squashing the halftone dot pattern, and facilitating the analysis of the color information. For the smoothing process, a known low-pass filter, moving average filter, edge holding type smoothing filter, or the like can be used.

代表色選択部16は、平滑化処理部15による平滑化後のブロック画像にある画素の出現色の分布を解析し、領域判定部14のブロックの領域判定結果を参照して代表色(代表色候補)を選択する。領域判定の結果が文字領域であれば、代表色として複数の色(文字の色、背景の色)を選択するが、領域判定の結果が非文字領域(例えば単色の背景)であれば、代表色を1色に決める。代表色選択処理は、ブロックにある各画素の出現色の頻度が高い色を選択する方法を利用することが可能である。   The representative color selection unit 16 analyzes the distribution of the appearance colors of the pixels in the block image smoothed by the smoothing processing unit 15 and refers to the region determination result of the block of the region determination unit 14 to represent the representative color (representative color). Select (Candidate). If the result of area determination is a character area, a plurality of colors (character color, background color) are selected as representative colors. If the result of area determination is a non-character area (for example, a monochrome background), a representative color is selected. Decide on one color. The representative color selection process can use a method of selecting a color having a high frequency of appearance colors of each pixel in the block.

色量子化部17は、注目ブロック内の各画素に対して、代表色選択部16で選択された代表色のいずれかを割り当てる。この色量子化処理は、代表色が複数色選択されたブロック内の各画素に対しては最も色距離が小さい代表色をそれぞれ割り当て、代表色が1色であるブロック内の画素に対しては当該同じ1色をそれぞれ割り当てる方法を利用することが可能である。   The color quantization unit 17 assigns one of the representative colors selected by the representative color selection unit 16 to each pixel in the block of interest. In this color quantization process, a representative color having the shortest color distance is assigned to each pixel in a block in which a plurality of representative colors are selected, and for a pixel in a block having one representative color. It is possible to use a method of assigning the same one color.

また、ブロック単位で画像処理の切り替えを行うよう構成してもよい。例えば、文字ブロックにある文字画素をエッジ強調したり、非文字ブロックにある画素を平滑化したりしてもよい。また、ブロック単位の処理結果及びブロック間の情報を使い、文字部分を接続し、文字単位に分離し、その後、文字認識処理や、文字の輪郭を抽出してベクトルデータに変換するベクトル化処理を行うよう構成してもよい。   Further, the image processing may be switched on a block basis. For example, edge enhancement may be performed on character pixels in a character block, or pixels in a non-character block may be smoothed. Also, using block processing results and information between blocks, connecting character parts and separating them into character units, then performing character recognition processing and vectorization processing that extracts character outlines and converts them into vector data It may be configured to do.

<エッジ特徴量>
図4は、エッジ特徴抽出部13により実行されるエッジ特徴量抽出処理の詳細を示すフローチャートである。
<Edge feature amount>
FIG. 4 is a flowchart showing details of the edge feature amount extraction processing executed by the edge feature extraction unit 13.

ステップS131では、エッジ抽出処理により取得した注目ブロック内の各画素のエッジ強度を入力する。そして、ステップS132では、注目ブロック内の各画素のエッジ強度に基づいて、当該注目ブロックにおける基準値(基準閾値)を導出する(基準値導出手段)。   In step S131, the edge strength of each pixel in the block of interest acquired by the edge extraction process is input. In step S132, a reference value (reference threshold) in the target block is derived based on the edge strength of each pixel in the target block (reference value deriving unit).

図5は、第1実施形態に係る基準閾値の導出処理を説明する図である。実線は、エッジ抽出部12から取得した、ブロック内の各画素のエッジ強度の分布を例示的に示している。原稿画像を分割して得られる複数のブロックにおいて、画素のエッジ強度の最大値と最小値との差(即ち、エッジ強度の範囲)は大きく異なり得る。したがって、複数のブロックの全てに対して同等の処理を行うためには、画素のエッジ強度の範囲を0〜255の値(8ビット値)に正規化した後にエッジ特徴量を判定することが考えられる。(点線は、正規化した場合のエッジ強度の分布を示している。)しかしながら、注目ブロック内の各画素のエッジ強度を正規化処理すると処理負荷が大きくなってしまう。したがって、本実施形態では、各画素のエッジ強度を正規化するのではなく、正規化した場合に用いる閾値Fに基づいて、実際のエッジ強度範囲における閾値Tを以下のように設定する。つまり、0〜255のエッジ強度の範囲において予め設定した閾値F(経験的に設定される値(例えば”120”))を用いて、実際に取得したエッジ強度の範囲における基準閾値Tを以下の式1によって求める。   FIG. 5 is a diagram for explaining a reference threshold value derivation process according to the first embodiment. The solid line exemplarily shows the distribution of the edge intensity of each pixel in the block acquired from the edge extraction unit 12. In a plurality of blocks obtained by dividing a document image, the difference between the maximum value and the minimum value of the edge strength of pixels (that is, the range of edge strength) can vary greatly. Therefore, in order to perform the same processing for all of a plurality of blocks, it is considered that the edge feature amount is determined after normalizing the range of the edge strength of the pixel to a value of 0 to 255 (8-bit value). It is done. (Dotted lines indicate the distribution of edge strength when normalized.) However, if the edge strength of each pixel in the block of interest is normalized, the processing load increases. Therefore, in the present embodiment, instead of normalizing the edge intensity of each pixel, the threshold T in the actual edge intensity range is set as follows based on the threshold F used in normalization. That is, the threshold value F (empirically set value (eg, “120”)) set in advance in the edge strength range of 0 to 255 is used to set the reference threshold T in the actually acquired edge strength range as follows: Obtained by Equation 1.

T=(Emax−Emin)×F/255+Emin (式1)
ここで、 EminおよびEmaxは、それぞれ、抽出処理により求めた注目ブロック内の画素のエッジ強度の最小値と最大値である。つまり、閾値Fの値(所定定数)は各ブロックで共通であるが、EminおよびEmaxの値はブロックごとに異なる。そのため、Tの値はブロックごとに異なり得る。
T = (Emax−Emin) × F / 255 + Emin (Formula 1)
Here, Emin and Emax are the minimum value and the maximum value of the edge intensity of the pixel in the block of interest obtained by the extraction process, respectively. That is, the value of the threshold F (predetermined constant) is common to each block, but the values of Emin and Emax are different for each block. Therefore, the value of T can be different for each block.

ステップS133では、導出した基準閾値Tを用いて、エッジ特徴量導出用のパラメータを設定し(閾値設定手段)、ステップS134では、設定されたパラメータを用いて、エッジ特徴量を導出する。そして、ステップS135では、導出したエッジ特徴量を出力する。   In step S133, an edge feature amount derivation parameter is set using the derived reference threshold value T (threshold setting means), and in step S134, an edge feature amount is derived using the set parameter. In step S135, the derived edge feature amount is output.

図6は、第1実施形態に係るエッジ特徴量を導出する際に用いる各パラメータを説明する図である。エッジ特徴導出用のパラメータは、基準閾値T(第3閾値)及び、当該基準閾値Tに基づいて求める強エッジ判定用閾値ST(第2閾値)と弱エッジ判定用閾値WT(第1閾値)の3つの閾値である。ここで、
基準閾値T
強エッジ判定用閾値ST=T+B
弱エッジ判定用閾値WT=T+C
であり、B,Cは、ST>WT>Tを満たすように設定された予め指定される定数である。例えばB=70、C=50である。
FIG. 6 is a diagram for explaining parameters used when deriving the edge feature amount according to the first embodiment. The edge feature derivation parameters include a reference threshold T (third threshold), a strong edge determination threshold ST (second threshold) obtained based on the reference threshold T, and a weak edge determination threshold WT (first threshold). There are three thresholds. here,
Reference threshold T
Strong edge determination threshold ST = T + B
Weak edge determination threshold WT = T + C
B and C are constants specified in advance set so as to satisfy ST>WT> T. For example, B = 70 and C = 50.

また、エッジ特徴は、注目ブロック内の各画素のエッジ強度と上述のパラメータに基づき導出されるものであり、具体的には、
強エッジ画素数:ST以上(第2閾値以上である第2範囲)のエッジ強度を有する画素の個数
弱エッジ画素数:WT以上かつST未満(第1閾値以上かつ第2閾値未満である第1範囲)のエッジ強度を有する画素の個数
基準エッジ画素数:T以上かつWT未満(第3閾値以上かつ第1閾値未満である第3範囲)のエッジ強度を有する画素の個数
をそれぞれ計数して得られるものである。
In addition, the edge feature is derived based on the edge strength of each pixel in the block of interest and the above parameters. Specifically,
Number of strong edge pixels: number of pixels having edge strength of ST or more (second range of second threshold or more) weak edge pixels: first of WT or more and less than ST (first threshold or more and less than second threshold) Number of pixels having edge strength of (range) Reference edge pixel number: obtained by counting the number of pixels having edge strength of T or more and less than WT (third range that is greater than or equal to the third threshold and less than the first threshold). It is

図7は、第1実施形態に係るエッジ特徴量の各パラメータを導出するフローチャートである。   FIG. 7 is a flowchart for deriving each parameter of the edge feature amount according to the first embodiment.

ステップS13301では、注目ブロック内の各画素のエッジ強度と注目ブロックの基準閾値Tを入力する。そして、ステップS13302では、基準閾値Tからエッジ特徴計算用の各パラメータを設定する。例えば、強エッジ判定用閾値ST、弱エッジ判定用閾値WTを、それぞれ、T+70、T+50に設定する。   In step S13301, the edge strength of each pixel in the block of interest and the reference threshold T of the block of interest are input. In step S 13302, parameters for edge feature calculation are set from the reference threshold T. For example, the strong edge determination threshold ST and the weak edge determination threshold WT are set to T + 70 and T + 50, respectively.

ステップS13303〜S13311では、注目ブロック内の各画素の各々についてエッジ強度の判定を行う(計数手段)。ステップS13303では、処理対象となる画素のエッジ強度が強エッジ判定用閾値ST以上であるか否かを判定する。画素のエッジ強度が強エッジ判定用閾値ST以上である場合は、ステップS13304に進み当該画素を強エッジ画素と判定し、強エッジ画素のカウント値SNを1増加させる。一方、画素のエッジ強度が強エッジ判定用閾値ST未満の場合はステップS13305に進む。   In steps S13303 to S13311, the edge strength is determined for each pixel in the block of interest (counting means). In step S13303, it is determined whether the edge intensity of the pixel to be processed is equal to or greater than the strong edge determination threshold ST. If the edge strength of the pixel is greater than or equal to the strong edge determination threshold ST, the process proceeds to step S13304, where the pixel is determined to be a strong edge pixel, and the count value SN of the strong edge pixel is incremented by one. On the other hand, if the edge strength of the pixel is less than the strong edge determination threshold ST, the process proceeds to step S13305.

ステップS13305では、当該画素のエッジ強度が弱エッジ判定用閾値WT以上か否かを判定する。画素のエッジ強度が弱エッジ判定用閾値WT以上である場合は、ステップS13306に進み当該画素を弱エッジ画素と判定し、弱エッジ画素のカウント値WNを1増加させる。画素のエッジ強度が弱エッジ判定用閾値WT未満の場合はS13307に進む。   In step S13305, it is determined whether the edge intensity of the pixel is equal to or greater than the weak edge determination threshold WT. If the edge strength of the pixel is equal to or greater than the weak edge determination threshold WT, the process proceeds to step S13306, where the pixel is determined to be a weak edge pixel, and the count value WN of the weak edge pixel is increased by one. If the edge strength of the pixel is less than the weak edge determination threshold WT, the process proceeds to S13307.

ステップS13307では、当該画素のエッジ強度が基準閾値T以上か否かを判定する。画素のエッジ強度が基準閾値T以上である場合は、ステップS13308に進み当該画素を基準閾値のエッジ画素と判定し、カウント値TNを1増加させる。画素のエッジ強度が基準閾値T未満の場合はS13311に進む。   In step S13307, it is determined whether the edge intensity of the pixel is greater than or equal to the reference threshold T. If the edge strength of the pixel is greater than or equal to the reference threshold T, the process proceeds to step S13308, where the pixel is determined to be an edge pixel of the reference threshold, and the count value TN is incremented by one. If the edge strength of the pixel is less than the reference threshold T, the process proceeds to S13311.

ステップS13311では、注目ブロック内に含まれる全画素に対して処理が完了したか否かを判定する。未処理の画素があれば、ステップS13303に戻り、次の画素について上述の判定を繰り返す。未処理の画素がなければ、ステップS13312に進み、エッジ特徴量(SN、WN、TN)を出力する。   In step S13311, it is determined whether or not the processing has been completed for all the pixels included in the block of interest. If there is an unprocessed pixel, the process returns to step S13303, and the above determination is repeated for the next pixel. If there is no unprocessed pixel, the process advances to step S13312 to output edge feature amounts (SN, WN, TN).

<各閾値によるエッジ抽出の結果例>
図8は、各閾値によるエッジ特徴抽出結果の例を示す図である。ここでは、文字がはっきりしている”読みやすい文字領域”と、前景と背景が同色などで文字がはっきりしていない”読みにくい文字領域”、及び、”非文字領域”の各々の画像に対するエッジ特徴抽出の結果を示している。エッジ抽出結果を示す図において、白画素は各エッジ特徴を有するとして判定された画素である。図からわかるように、”読みやすい文字領域”では3つの閾値すべてで文字の輪郭が好適に抽出されている。一方、”読みにくい文字領域”では、最も低い閾値(基準閾値)では、文字の輪郭が抽出されているものの、他の2つの閾値ではごく一部しか文字の輪郭が抽出されていない。また。”非文字領域”に関しては、最も低い閾値(基準閾値)においてノイズ成分が抽出されている。
<Example of edge extraction result by each threshold>
FIG. 8 is a diagram illustrating an example of an edge feature extraction result based on each threshold value. Here, the edges for images of “Easy-to-read character area” with clear characters, “Unreadable character area” with unclear characters due to the same color of foreground and background, and “Non-character area” The result of feature extraction is shown. In the diagram showing the edge extraction result, white pixels are pixels determined to have each edge feature. As can be seen from the figure, in the “easy-to-read character region”, the outline of the character is suitably extracted with all three threshold values. On the other hand, in the “hard-to-read character region”, the outline of the character is extracted at the lowest threshold (reference threshold), but only a few outlines of the character are extracted at the other two thresholds. Also. With respect to the “non-character region”, a noise component is extracted at the lowest threshold (reference threshold).

言い換えると、各閾値以上のエッジ強度を有する画素をエッジ画素とした場合の特徴として、以下のようなことが読み取れる。   In other words, the following can be read as characteristics when an edge pixel is a pixel having an edge strength equal to or greater than each threshold value.

強エッジ閾値:”読みやすい文字領域”でのみエッジ画素(強エッジ画素)が所定以上抽出される。   Strong edge threshold: Edge pixels (strong edge pixels) are extracted more than a predetermined value only in the “readable character region”.

弱エッジ閾値:”読みやすい文字領域”においてはエッジ画素(弱エッジ画素)が所定以上抽出され、”読みにくい文字領域”では所々エッジ画素(弱エッジ画素)が抽出される。”非文字領域”では所々エッジ画素(弱エッジ画素)が抽出される場合もあるが、エッジ画素(弱エッジ画素)が抽出されない場合もある。   Weak edge threshold: In the “easy-to-read character region”, edge pixels (weak edge pixels) or more are extracted, and in the “hard-to-read character region”, edge pixels (weak edge pixels) are extracted in some places. In the “non-character region”, edge pixels (weak edge pixels) may be extracted in some places, but edge pixels (weak edge pixels) may not be extracted.

基準閾値:”読みやすい文字領域”および”読みにくい文字領域”においては文字のエッジ画素が抽出される。また、”非文字領域”では、網点などのノイズがある場合は非常に多くのエッジ画素が観測される。一方、網点でない非文字領域の場合、エッジ画素は非常に少ない。   Reference threshold: In the “easy-to-read character region” and “unreadable character region”, the edge pixels of the character are extracted. In the “non-character region”, a large number of edge pixels are observed when there is noise such as halftone dots. On the other hand, in the case of a non-character region that is not a halftone dot, there are very few edge pixels.

<文字領域判定処理>
図9は、第1実施形態に係る領域判定(検出)処理のフローチャートである。
<Character area determination processing>
FIG. 9 is a flowchart of region determination (detection) processing according to the first embodiment.

ステップS1401では、注目ブロックのエッジ特徴量(SN、WN、TN)を入力する。   In step S1401, the edge feature values (SN, WN, TN) of the block of interest are input.

ステップS1402からステップS1407では、注目ブロックが文字領域か非文字領域かを判定する。具体的には、ステップS1402では、強エッジ画素数SNに注目し、強エッジ画素が存在すれば、ステップS1403に進み当該注目ブロックを文字領域と判定する。なお、このとき、ノイズ成分を考慮し、所定の閾値を設けて強エッジ画素が存在するか否かの判定を行うよう構成してもよい。一方、強エッジ画素が存在しない場合、ステップS1404に進み、弱エッジ画素数WNに注目して判定する。   In steps S1402 to S1407, it is determined whether the target block is a character area or a non-character area. Specifically, in step S1402, attention is paid to the strong edge pixel number SN, and if there is a strong edge pixel, the process proceeds to step S1403 to determine the target block as a character area. At this time, in consideration of noise components, a predetermined threshold value may be provided to determine whether or not a strong edge pixel exists. On the other hand, if there is no strong edge pixel, the process proceeds to step S1404, and the determination is made by paying attention to the number WN of weak edge pixels.

弱エッジ画素が存在しなければ、ステップS1405に進み当該注目ブロックを非文字領域と判定する。一方、弱エッジ画素が存在する場合、ステップS1406に進み、基準閾値のエッジ画素数に注目して判定する。つまり、基準閾値のエッジ画素が非常に多い(第1個数以上)、或いは、非常に少ない(第2個数未満)場合は、S1405に進み当該注目ブロックを非文字領域と判定する。基準閾値のエッジ画素数が前記第2個数以上かつ前記第1個数未満の範囲である場合、”読みにくい文字”であるとも”非文字領域”であるとも考えられる。そこで、後処理で補正することを考慮し、ステップS1407では、当該注目ブロックに不確定領域(”UNKNOWN”)を示す判定不能情報を付与するとよい。   If there is no weak edge pixel, the process proceeds to step S1405 and the target block is determined to be a non-character area. On the other hand, if there is a weak edge pixel, the process proceeds to step S1406, and determination is made by paying attention to the number of edge pixels of the reference threshold value. In other words, if the reference threshold edge pixels are very large (first number or more) or very small (less than the second number), the process proceeds to S1405, and the block of interest is determined as a non-character area. When the number of edge pixels of the reference threshold is in the range greater than or equal to the second number and less than the first number, it may be considered as a “hard character” or a “non-character region”. Therefore, in consideration of correction in post-processing, in Step S1407, indeterminate information indicating an uncertain area (“UNKNOWN”) may be given to the block of interest.

以上説明したとおり第1実施形態によれば、注目ブロックに対して複数の閾値を設定し、当該複数の閾値に基づいて設定される各範囲のエッジ強度を有する画素の個数に基づいて文字領域・非文字領域・不確定領域を判定する。つまり、注目ブロックに含まれる画素のエッジ強度の分布に基づいて領域の判定を行う。また、不確定領域と判定された領域に関しては、後処理により領域を決定すればよい。このように構成することにより、従来に比較しより正確に文字領域を判定することが可能となる。特に、中間濃度の網点背景と近い色を持つ文字を含む領域は、非文字領域ではなく、不確定領域として判定されるので、後処理で属性を文字領域として修正するように構成すれば、より精度良く区別できるようになる。その結果、例えば、後工程における文字認識の精度をより高めることが可能となる。なお、判定不能であった領域に対しては不確定領域の情報を設定することにより、例えば、後工程において、ユーザから選択的に領域属性の指定を受け付ける(受付手段)ことが可能となる。   As described above, according to the first embodiment, a plurality of threshold values are set for the block of interest, and the character region / the number of pixels having edge strength in each range set based on the plurality of threshold values is set. Non-character area / indeterminate area is determined. That is, the region is determined based on the distribution of the edge intensity of the pixels included in the block of interest. Moreover, what is necessary is just to determine an area | region by post-processing about the area | region determined as the uncertain area | region. With this configuration, it is possible to determine the character area more accurately than in the past. In particular, an area including a character having a color close to a halftone dot background is determined as an indeterminate area, not a non-character area, so if it is configured to correct the attribute as a character area in post-processing, It becomes possible to distinguish more accurately. As a result, for example, it is possible to further improve the accuracy of character recognition in the subsequent process. Note that by setting information on an indeterminate area for an area that could not be determined, for example, it is possible to selectively accept designation of area attributes from the user (reception means) in a later step.

(第2実施形態)
第2実施形態では、第1実施形態における文字領域か否かの判定と共に、文字領域及び非文字領域の各々において、当該領域が網点を含む領域か否かを併せて識別する例について説明する。つまり、第2実施形態では、”網点背景のみ”、”非網点背景のみ”、”網点背景+文字”、”非網点背景+文字”の4つの何れであるかを識別する。以下では、主に第1実施形態と異なる部分について説明する。
(Second Embodiment)
In the second embodiment, an example will be described in which, in each of the character area and the non-character area, whether or not the area includes a halftone dot is identified together with the determination of whether or not the area is a character area. . That is, in the second embodiment, any one of “halftone background only”, “non-halftone background only”, “halftone background + character”, and “non-halftone background + character” is identified. Below, a different part from 1st Embodiment is mainly demonstrated.

<エッジ特徴量>
図10は、第2実施形態に係るエッジ特徴量の各パラメータを説明する図である。エッジ特徴導出用のパラメータは、基準閾値T(基準値)及び、当該基準閾値Tに基づいて求めた強エッジ判定用閾値ST(第2閾値)と弱エッジ判定用閾値WT(第1閾値)、及び、低閾値LT(第4閾値)の4つの閾値である。ここで、
基準閾値T
強エッジ判定用閾値ST=T+B
弱エッジ判定用閾値WT=T+C
低閾値LT=D
であり、B,C,Dは、ST>WT>T>Dを満たすように設定された予め指定される定数である。
<Edge feature amount>
FIG. 10 is a diagram for explaining each parameter of the edge feature amount according to the second embodiment. The edge feature derivation parameters include a reference threshold T (reference value), a strong edge determination threshold ST (second threshold) and a weak edge determination threshold WT (first threshold) obtained based on the reference threshold T, And four threshold values of a low threshold value LT (fourth threshold value). here,
Reference threshold T
Strong edge determination threshold ST = T + B
Weak edge determination threshold WT = T + C
Low threshold LT = D
And B, C, and D are predetermined constants set to satisfy ST>WT>T> D.

また、エッジ特徴は、注目ブロック内の各画素のエッジ強度と上述のパラメータに基づき導出されるものであり、具体的には、
強エッジ画素数:ST以上(第2範囲)のエッジ強度を有する画素の個数
弱エッジ画素数:WT以上かつST未満(第1範囲)のエッジ強度を有する画素の個数
基準エッジ画素数:T以上かつWT未満(第3範囲)のエッジ強度を有する画素の個数
低エッジ画素数:LT以上かつT未満(第4閾値以上かつ第3閾値未満である第4範囲)のエッジ強度を有する画素の個数
として表されるものである。
In addition, the edge feature is derived based on the edge strength of each pixel in the block of interest and the above parameters. Specifically,
Number of strong edge pixels: number of pixels having edge strength of ST or more (second range) Number of weak edge pixels: number of pixels having edge strength of WT or more and less than ST (first range) Reference edge pixel number: T or more The number of pixels having edge strengths less than WT (third range) Low edge pixel count: Number of pixels having edge strengths greater than or equal to LT and less than T (fourth range greater than or equal to the fourth threshold and less than the third threshold) It is expressed as

図11は、第2実施形態に係るエッジ特徴量の各パラメータを導出するフローチャートである。なお、ステップS13301〜S13308については第1実施形態とほぼ同様である。ただし、ステップS13307において、画素のエッジ強度が基準閾値T未満の場合にS13309に進む点が異なる。   FIG. 11 is a flowchart for deriving each parameter of the edge feature value according to the second embodiment. Steps S13301 to S13308 are substantially the same as those in the first embodiment. However, the difference is that in step S13307, if the edge strength of the pixel is less than the reference threshold T, the process proceeds to S13309.

ステップS13309では、当該画素のエッジ強度が低閾値LT(例えば40)以上か否かを判定する。画素のエッジ強度が低閾値LT以上である場合は、ステップS13310に進み当該画素を低閾値のエッジ画素と判定し、カウント値LNを1増加させる。一方、低閾値LT未満である場合、ステップS13311に進む。   In step S13309, it is determined whether the edge intensity of the pixel is equal to or higher than a low threshold LT (for example, 40). If the edge strength of the pixel is equal to or higher than the low threshold LT, the process advances to step S13310 to determine that the pixel is a low threshold edge pixel, and increment the count value LN by one. On the other hand, if it is less than the low threshold LT, the process proceeds to step S13311.

ステップS13311では、注目ブロック内に含まれる全画素に対して処理が完了したか否かを判定する。未処理の画素があれば、ステップS13303に戻り、次の画素について上述の判定を繰り返す。未処理の画素がなければ、ステップS13312に進み、エッジ特徴量(SN、WN、TN、LN)を出力する。   In step S13311, it is determined whether or not the processing has been completed for all the pixels included in the block of interest. If there is an unprocessed pixel, the process returns to step S13303, and the above determination is repeated for the next pixel. If there is no unprocessed pixel, the process advances to step S13312 to output edge feature amounts (SN, WN, TN, LN).

<文字領域判定処理>
注目ブロックが非網点(下地)上の文字である場合、一様な色の下地においてはエッジ画素が発生しないので、低閾値エッジ画素数は少なくなる。一方、網点上の文字は、網点背景にある網点画素がエッジ画素となるため、低閾値エッジ画素数が非常に多い。文字の無い非網点背景(下地)は、低閾値におけるエッジ画素が少ない。また、文字の無い網点背景では、低閾値におけるエッジ画素が多い。そこで、以下のようにして”網点背景のみ”、”非網点背景のみ”、”網点背景+文字”、”非網点背景+文字”の4つの何れであるかを識別することが出来る。
<Character area determination processing>
When the block of interest is a character on a non-halftone dot (background), no edge pixel is generated on a uniform color background, so the number of low threshold edge pixels is reduced. On the other hand, the character on the halftone dot has a very large number of low threshold edge pixels because the halftone dot pixel in the halftone dot background becomes an edge pixel. A non-halftone dot background (background) without characters has few edge pixels at a low threshold. Also, in a halftone dot background without characters, there are many edge pixels at a low threshold. Therefore, it is possible to identify one of the four types of “halftone background only”, “non-halftone background only”, “halftone background + character”, and “non-halftone background + character” as follows. I can do it.

図12は、第2実施形態に係る領域判定処理のフローチャートである。なお、ステップS1411〜S1417は第1実施形態におけるステップS1401〜S1407とほぼ同様である。ただし、”文字領域”あるいは”非文字領域”と決定された後の処理が第1実施形態と異なる。   FIG. 12 is a flowchart of region determination processing according to the second embodiment. Note that steps S1411 to S1417 are substantially the same as steps S1401 to S1407 in the first embodiment. However, the processing after the “character area” or “non-character area” is determined is different from the first embodiment.

注目ブロックが”文字領域”であると決定(S1413)された後、ステップS1418では、低閾値のエッジ画素の個数LNが所定個数以上であるか否か判定する。低閾値のエッジ画素の個数LNが所定個数以上の場合、網点背景上の文字(網点上文字領域)であると判定する(S1419)。一方、低閾値のエッジ画素の個数LNが所定個数未満の場合、下地上文字領域(非網点背景(下地)上に文字がある非網点上文字領域)であると判定する(S1420)。   After determining that the block of interest is a “character area” (S1413), in step S1418, it is determined whether or not the number LN of low-threshold edge pixels is a predetermined number or more. If the number LN of low threshold edge pixels is greater than or equal to the predetermined number, it is determined that the character is on the halftone dot background (character region on the halftone dot) (S1419). On the other hand, when the number LN of the edge pixels having the low threshold value is less than the predetermined number, it is determined that the character area is an overlying character area (a non-halftone character area with characters on a non-halftone background (background)) (S1420).

同様に、注目ブロックが”非文字領域”であると決定(S1415)された後、ステップS1421では、低閾値のエッジ画素の個数LNが所定個数以上であるか否か判定する。低閾値のエッジ画素の個数LNが所定個数以上の場合、網点(網点背景領域)であると判定する(S1422)。一方、低閾値のエッジ画素の個数LNが所定個数未満の場合、下地(非網点背景領域)であると判定する(S1423)。   Similarly, after it is determined that the target block is a “non-character area” (S1415), in step S1421, it is determined whether or not the number LN of low-threshold edge pixels is a predetermined number or more. When the number LN of low-threshold edge pixels is a predetermined number or more, it is determined that the pixel is a halftone dot (halftone dot background region) (S1422). On the other hand, when the number LN of edge pixels having a low threshold value is less than the predetermined number, it is determined that the background is a background (non-halftone background area) (S1423).

以上説明したとおり第2実施形態によれば、文字領域と非文字領域との判定に加え、網点背景と非網点背景との判定を併せて行うことが可能となる。   As described above, according to the second embodiment, in addition to the determination of the character area and the non-character area, it is possible to perform the determination of the halftone dot background and the non-dot background.

(その他の実施例)
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。
(Other examples)
The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, or the like) of the system or apparatus reads the program. It is a process to be executed.

Claims (8)

画像を、各々が所定数の画素を含む複数のブロックに分割する分割手段と、
注目ブロックに含まれる各画素のエッジ強度値を導出する導出手段と、
前記注目ブロックに含まれる画素のエッジ強度値の最大値および最小値に基づいて、該注目ブロックにおける基準値を導出する基準値導出手段と、
前記導出した基準値に基づいて、該基準値より大きい第1閾値と該第1閾値より大きい第2閾値とを設定する閾値設定手段と、
前記注目ブロックにおいて、前記第1閾値以上かつ前記第2閾値未満である第1範囲と前記第2閾値以上である第2範囲との各々に含まれるエッジ強度値を有する画素の個数を計数する計数手段と、
前記計数手段による計数の結果に基づいて、前記第2範囲のエッジ強度値を有する画素が存在する場合は前記注目ブロックを文字領域と判定し、前記第2範囲及び前記第1範囲のエッジ強度値を有する画素が存在しない場合は前記注目ブロックを非文字領域と判定する判定手段と、
を備えることを特徴とする画像処理装置。
Dividing means for dividing the image into a plurality of blocks each including a predetermined number of pixels;
Derivation means for deriving the edge intensity value of each pixel included in the block of interest;
Reference value deriving means for deriving a reference value in the target block based on the maximum value and the minimum value of the edge intensity values of the pixels included in the target block;
Threshold setting means for setting a first threshold value greater than the reference value and a second threshold value greater than the first threshold based on the derived reference value;
A count for counting the number of pixels having edge intensity values included in each of the first range that is greater than or equal to the first threshold and less than the second threshold and the second range that is greater than or equal to the second threshold in the block of interest. Means,
Based on the result of counting by the counting means, if there is a pixel having an edge intensity value in the second range, the block of interest is determined as a character area, and the edge intensity values in the second range and the first range Determining means for determining that the block of interest is a non-character area when there is no pixel having
An image processing apparatus comprising:
前記閾値設定手段は、更に、前記基準値と等しい第3閾値を設定し、
前記計数手段は、更に、前記第3閾値以上かつ前記第1閾値未満である第3範囲に含まれるエッジ強度値を有する画素の個数を計数し、
前記判定手段は、更に、前記第2範囲のエッジ強度値を有する画素が存在せず、かつ、前記第1範囲のエッジ強度値を有する画素が存在し、かつ、前記第3範囲のエッジ強度値を有する画素の画素数が第1個数以上又は該第1個数より少ない第2個数未満である場合は、前記注目ブロックを非文字領域と判定することを特徴とする請求項1に記載の画像処理装置。
The threshold value setting means further sets a third threshold value equal to the reference value,
The counting means further counts the number of pixels having edge intensity values included in a third range that is greater than or equal to the third threshold and less than the first threshold,
The determination means further includes no pixel having an edge intensity value in the second range, and a pixel having an edge intensity value in the first range, and an edge intensity value in the third range. 2. The image processing according to claim 1, wherein the block of interest is determined to be a non-character region when the number of pixels having a pixel number is greater than or equal to the first number or less than a second number less than the first number. apparatus.
前記判定手段は、更に、前記文字領域とも前記非文字領域とも判定しなかったブロックに対して判定不能であったことを示す判定不能情報を付与することを特徴とする請求項1又は2に記載の画像処理装置。   3. The determination means further provides determination impossible information indicating that determination is impossible for a block that has not been determined as the character area or the non-character area. Image processing apparatus. 前記閾値設定手段は、更に、前記基準値より小さい第4閾値を設定し、
前記計数手段は、更に、前記第4閾値以上かつ前記第3閾値未満である第4範囲に含まれるエッジ強度値を有する画素の個数を計数し、
前記判定手段は、更に、
前記文字領域と判定され、かつ、前記第4範囲のエッジ強度値を有する画素の個数が所定個数以上である場合は、網点上文字領域と判定し、
前記文字領域と判定され、かつ、前記第4範囲のエッジ強度値を有する画素の個数が所定個数未満である場合は、非網点上文字領域と判定し、
前記非文字領域と判定され、かつ、前記第4範囲のエッジ強度値を有する画素の個数が所定個数以上である場合は、網点背景領域と判定し、
前記非文字領域と判定され、かつ、前記第4範囲のエッジ強度値を有する画素の個数が所定個数未満である場合は、非網点背景領域と判定する
ことを特徴とする請求項1乃至3の何れか一項に記載の画像処理装置。
The threshold value setting means further sets a fourth threshold value smaller than the reference value,
The counting means further counts the number of pixels having edge intensity values included in a fourth range that is greater than or equal to the fourth threshold and less than the third threshold,
The determination means further includes:
When it is determined as the character area and the number of pixels having the edge intensity value in the fourth range is a predetermined number or more, it is determined as a character area on a halftone dot,
When it is determined as the character area and the number of pixels having the edge intensity value in the fourth range is less than a predetermined number, it is determined as a non-half-dot character area;
When it is determined as the non-character region and the number of pixels having the edge intensity value in the fourth range is equal to or greater than a predetermined number, it is determined as a halftone dot background region,
4. A non-halftone background region is determined when the number of pixels determined to be the non-character region and having the edge intensity value in the fourth range is less than a predetermined number. The image processing apparatus according to any one of the above.
前記判定不能情報が付与されたブロックに対して、該ブロックが前記文字領域及び前記非文字領域の何れであるかをユーザから受け付ける受付手段を更に備えることを特徴とする請求項1乃至4の何れか一項に記載の画像処理装置。   5. The apparatus according to claim 1, further comprising: a receiving unit configured to receive, from a user, whether the block is the character area or the non-character area with respect to the block to which the undecidable information is given. An image processing apparatus according to claim 1. 前記基準値導出手段は、
前記複数のブロックに対して共通に設定された所定定数と、前記注目ブロックに含まれる画素のエッジ強度値の最大値および最小値とに基づいて、前記注目ブロックにおける基準値を導出することを特徴とする請求項1乃至5の何れか一項に記載の画像処理装置。
The reference value deriving means includes
A reference value in the target block is derived based on a predetermined constant set in common for the plurality of blocks and a maximum value and a minimum value of edge intensity values of pixels included in the target block. The image processing apparatus according to any one of claims 1 to 5.
分割手段が、画像を、各々が所定数の画素を含む複数のブロックに分割する分割工程と、
導出手段が、注目ブロックに含まれる各画素のエッジ強度値を導出する導出工程と、
基準値導出手段が、前記注目ブロックに含まれる画素のエッジ強度値の最大値および最小値に基づいて、該注目ブロックにおける基準値を導出する基準値導出工程と、
閾値設定手段が、前記導出した基準値に基づいて、該基準値より大きい第1閾値と該第1閾値より大きい第2閾値とを設定する閾値設定工程と、
計数手段が、前記注目ブロックにおいて、前記第1閾値以上かつ前記第2閾値未満である第1範囲と前記第2閾値以上である第2範囲との各々に含まれるエッジ強度値を有する画素の個数を計数する計数工程と、
判定手段が、前記計数の結果に基づいて、前記第2範囲のエッジ強度値を有する画素が存在する場合は前記注目ブロックを文字領域と判定し、前記第2範囲及び前記第1範囲のエッジ強度値を有する画素が存在しない場合は前記注目ブロックを非文字領域と判定する判定工程と、
を含むことを特徴とする画像処理装置の制御方法。
A dividing step of dividing the image into a plurality of blocks each including a predetermined number of pixels;
A derivation step in which the derivation means derives an edge intensity value of each pixel included in the block of interest;
A reference value deriving step for deriving a reference value in the target block based on the maximum value and the minimum value of the edge intensity values of the pixels included in the target block;
A threshold value setting step in which a threshold value setting means sets a first threshold value larger than the reference value and a second threshold value larger than the first threshold based on the derived reference value;
The number of pixels having edge intensity values included in each of the first range that is greater than or equal to the first threshold and less than the second threshold and the second range that is greater than or equal to the second threshold in the target block. A counting step for counting
The determination unit determines that the block of interest is a character area when there is a pixel having an edge intensity value in the second range based on the result of the counting, and determines the edge intensity in the second range and the first range. A determination step of determining the block of interest as a non-character region when there is no pixel having a value;
A control method for an image processing apparatus.
コンピュータを、請求項1乃至6の何れか一項に記載の画像処理装置の各手段として機能させるためのプログラム。   The program for functioning a computer as each means of the image processing apparatus as described in any one of Claims 1 thru | or 6.
JP2011068676A 2011-03-25 2011-03-25 Image processor and control method therefor Withdrawn JP2012205133A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011068676A JP2012205133A (en) 2011-03-25 2011-03-25 Image processor and control method therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011068676A JP2012205133A (en) 2011-03-25 2011-03-25 Image processor and control method therefor

Publications (1)

Publication Number Publication Date
JP2012205133A true JP2012205133A (en) 2012-10-22

Family

ID=47185619

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011068676A Withdrawn JP2012205133A (en) 2011-03-25 2011-03-25 Image processor and control method therefor

Country Status (1)

Country Link
JP (1) JP2012205133A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013031104A (en) * 2011-07-29 2013-02-07 Brother Ind Ltd Image processing device and program
JP2015195549A (en) * 2013-12-19 2015-11-05 キヤノン株式会社 Image processing system and image processing method
JP2016062263A (en) * 2014-09-17 2016-04-25 株式会社東芝 Information processor, image alteration method, and program
JP2018106769A (en) * 2018-04-10 2018-07-05 株式会社東芝 Information processor, image alteration method, and program

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013031104A (en) * 2011-07-29 2013-02-07 Brother Ind Ltd Image processing device and program
JP2015195549A (en) * 2013-12-19 2015-11-05 キヤノン株式会社 Image processing system and image processing method
JP2016062263A (en) * 2014-09-17 2016-04-25 株式会社東芝 Information processor, image alteration method, and program
JP2018106769A (en) * 2018-04-10 2018-07-05 株式会社東芝 Information processor, image alteration method, and program

Similar Documents

Publication Publication Date Title
JP5875637B2 (en) Image processing apparatus and image processing method
US8073262B2 (en) Image matching apparatus, image matching method, and image data output processing apparatus
US8384964B2 (en) Image processing apparatus and image processing method
US8050501B2 (en) Image matching apparatus, image matching method, and image data output processing apparatus
US10270938B2 (en) Image-processing-based text separation method, text separation device, and image formation apparatus
US8737749B2 (en) Image processing apparatus, image processing method, and medium storing image processing program
JP5701181B2 (en) Image processing apparatus, image processing method, and computer program
JP6743092B2 (en) Image processing apparatus, image processing control method, and program
JP2015226112A (en) Image processing system, image processing method, and program
JP2018121226A (en) Image processing device, image processing method, and program
US8620081B2 (en) Image processing apparatus, method, and storage medium for determining attributes
JP6923037B2 (en) Image processing equipment, image processing methods and programs
US9167129B1 (en) Method and apparatus for segmenting image into halftone and non-halftone regions
JP2012205133A (en) Image processor and control method therefor
CN107800922B (en) Image processing apparatus, control method thereof, and computer-readable storage medium
JP2017117331A (en) Image processing apparatus, image processing method, and program
US10931852B2 (en) Image processing apparatus, image processing method, and storage medium, with determining whether or not character clipping rectangle determined to be non-character region is character region
JP2012231261A (en) Image processing apparatus and control method thereof
JP6641982B2 (en) Image processing apparatus, image processing method, and program
JP7377435B2 (en) Image processing device
KR20140063378A (en) Image forminag apparatus, method for image forming and computer-readable recording medium
JP4165599B2 (en) Image processing device
JP2004228745A (en) Image processing apparatus
JP2007243330A (en) Image processing apparatus, and information output method of dot character
JP4032735B2 (en) Image processing apparatus and image processing method

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20140603