JP2020114028A - Image processing apparatus, image processing method, and program - Google Patents

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

Info

Publication number
JP2020114028A
JP2020114028A JP2020073667A JP2020073667A JP2020114028A JP 2020114028 A JP2020114028 A JP 2020114028A JP 2020073667 A JP2020073667 A JP 2020073667A JP 2020073667 A JP2020073667 A JP 2020073667A JP 2020114028 A JP2020114028 A JP 2020114028A
Authority
JP
Japan
Prior art keywords
image
character
detection unit
unit
detection
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.)
Granted
Application number
JP2020073667A
Other languages
Japanese (ja)
Other versions
JP6923037B2 (en
JP2020114028A5 (en
Inventor
卓治 鎌田
Takuji Kamata
卓治 鎌田
大内 敏
Satoshi Ouchi
敏 大内
作山 宏幸
Hiroyuki Sakuyama
宏幸 作山
真也 伊藤
Shinya Ito
真也 伊藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Publication of JP2020114028A publication Critical patent/JP2020114028A/en
Publication of JP2020114028A5 publication Critical patent/JP2020114028A5/ja
Application granted granted Critical
Publication of JP6923037B2 publication Critical patent/JP6923037B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

To provide an image processing apparatus that can accurately detect characters from a multi-valued image.SOLUTION: An image processing apparatus 1 comprises: a first detection unit 11 that detects edges of characters from a multi-valued image Im1; an edge emphasis unit 12 that emphasizes the edges of the characters included in the multi-valued image Im1 by using a result of character edge detection performed by the first detection unit 11; a second detection unit 13 that detects a character area from an edge emphasized image Im2 in which the edges of the characters are emphasized; and a separation unit 14 that separates the multi-valued image Im1 into a character image Im3 and a background image Im4 by using a result of character edge detection performed by the first detection unit 11 and a result of character area detection performed by the second detection unit 13.SELECTED DRAWING: Figure 2

Description

本発明は、画像処理装置、画像処理方法およびプログラムに関する。 The present invention relates to an image processing device, an image processing method and a program.

高圧縮と高画質とを両立させる画像圧縮技術として、高圧縮PDF(Portable Document Format)と呼ばれる技術が知られている。高圧縮PDFは、多値画像を、文字領域の画像(以下、「文字画像」と呼ぶ)と、文字領域以外の画像(以下、「背景画像」と呼ぶ)とに分離し、それぞれの画像に適した画像処理および圧縮を施した後に、1つの画像ファイルにまとめる技術である。 A technology called high compression PDF (Portable Document Format) is known as an image compression technology that achieves both high compression and high image quality. The high compression PDF separates a multi-valued image into an image of a character area (hereinafter, referred to as “character image”) and an image other than the character area (hereinafter, referred to as “background image”), and separates each image. This is a technique for performing suitable image processing and compression and then combining them into one image file.

多値画像から文字画像と背景画像とを適切に分離するには、多値画像から文字を精度よく検出する必要がある。多値画像から文字を検出する方法としては、例えば、文字が線画として表現されることが多いことに着目し、局所的な分析により文字のエッジを検出する方法が知られている(例えば、特許文献1を参照)。また、文字が行を構成していることが多いことに着目し、大局的な分析により文字行の抽出を行って、文字行に含まれる文字領域を検出する方法が知られている(例えば、特許文献2を参照)。 In order to properly separate the character image and the background image from the multivalued image, it is necessary to accurately detect the character from the multivalued image. As a method of detecting a character from a multi-valued image, for example, a method of detecting the edge of the character by local analysis is known, focusing on the fact that the character is often expressed as a line drawing (for example, patents Reference 1). In addition, focusing on the fact that characters often form lines, a method is known in which character lines are extracted by global analysis to detect character regions included in the character lines (for example, (See Patent Document 2).

しかし、これらの方法は、文字の種類によっては精度よく文字を検出できない場合がある。例えば、局所的な分析により文字のエッジを検出する方法では、太文字、白色文字、色地上文字などに対して、文字の内部領域を適切に検出できなかったり、逆に文字エッジに隣接する背景部分を文字と誤検出したりすることがしばしば生じる。また、大局的な分析により文字領域を検出する方法では、例えば、コントラストの低い文字を適切に検出できない、あるいはコントラストの低い文字を検出しようとすると背景との区別が難しくなるといった問題がある。このため、多値画像から文字をより精度よく検出できる技術が望まれている。 However, these methods may not be able to detect a character accurately depending on the type of character. For example, in the method of detecting the edge of a character by local analysis, the internal area of the character cannot be properly detected for a bold character, a white character, a color ground character, or the background adjacent to the character edge is conversely detected. It often happens that a part is erroneously detected as a character. In addition, the method of detecting a character region by global analysis has a problem that, for example, a character with low contrast cannot be detected appropriately, or when trying to detect a character with low contrast, it is difficult to distinguish it from the background. Therefore, there is a demand for a technique capable of detecting a character with higher accuracy from a multi-valued image.

上述した課題を解決するために、本発明は、多値画像から文字のエッジを検出する第1の検出部と、前記第1の検出部の検出結果を用いて、前記多値画像に含まれる文字のエッジを強調するエッジ強調部と、文字のエッジが強調された前記多値画像から文字領域を検出する第2の検出部と、少なくとも前記第2の検出部の検出結果を用いて、前記多値画像を文字画像と背景画像とに分離する分離部と、を備える。 In order to solve the above-mentioned problem, the present invention includes a first detection unit that detects an edge of a character from a multi-valued image, and a detection result of the first detection unit, and is included in the multi-valued image. Using an edge enhancement unit that enhances the edge of a character, a second detection unit that detects a character region from the multi-valued image in which the edge of the character is enhanced, and a detection result of at least the second detection unit, A separation unit that separates the multi-valued image into a character image and a background image.

本発明によれば、多値画像から文字を高精度に検出できるという効果を奏する。 According to the present invention, there is an effect that a character can be detected with high accuracy from a multi-valued image.

図1は、第1実施形態の画像処理装置のハードウェア構成例を示すブロック図である。FIG. 1 is a block diagram showing a hardware configuration example of the image processing apparatus of the first embodiment. 図2は、第1実施形態の画像処理装置の機能的な構成例を示すブロック図である。FIG. 2 is a block diagram showing a functional configuration example of the image processing apparatus of the first embodiment. 図3は、第1実施形態の画像処理装置による動作の流れを説明するフローチャートである。FIG. 3 is a flowchart illustrating the flow of operations performed by the image processing apparatus according to the first embodiment. 図4は、第1の検出部による処理の一例を説明するフローチャートである。FIG. 4 is a flowchart illustrating an example of processing performed by the first detection unit. 図5は、第2の検出部による処理の一例を説明するフローチャートである。FIG. 5 is a flowchart illustrating an example of processing by the second detection unit. 図6は、文字領域検出結果の具体例を説明する図である。FIG. 6 is a diagram illustrating a specific example of the character area detection result. 図7は、分離部による処理の一例を説明するフローチャートである。FIG. 7 is a flowchart illustrating an example of processing performed by the separation unit. 図8は、色地上文字を判定する方法の一例を説明する図である。FIG. 8 is a diagram illustrating an example of a method of determining a color ground character. 図9は、色地上文字を判定する方法の他の例を説明する図である。FIG. 9 is a diagram illustrating another example of the method for determining a color ground character. 図10は、白色文字を判定する方法の一例を説明する図である。FIG. 10 is a diagram illustrating an example of a method for determining a white character. 図11は、白色文字を判定する方法の他の例を説明する図である。FIG. 11 is a diagram illustrating another example of the method for determining white characters. 図12は、実施形態の画像処理装置による効果の一例を説明する図である。FIG. 12 is a diagram illustrating an example of effects of the image processing apparatus according to the embodiment. 図13は、第3変形例の画像処理装置の機能的な構成例を示すブロック図である。FIG. 13 is a block diagram showing a functional configuration example of the image processing apparatus of the third modified example. 図14は、第4変形例の画像処理装置の機能的な構成例を示すブロック図である。FIG. 14 is a block diagram showing a functional configuration example of an image processing apparatus of the fourth modified example. 図15は、第2実施形態の複合機のハードウェア構成例を示すブロック図である。FIG. 15 is a block diagram showing a hardware configuration example of the multifunction peripheral of the second embodiment. 図16は、第2実施形態の複合機の機能的な構成例を示すブロック図である。FIG. 16 is a block diagram showing a functional configuration example of the multi-function peripheral of the second embodiment. 図17は、ユーザによる動作モードの選択を受け付ける操作画面の一例を示す図である。FIG. 17 is a diagram showing an example of an operation screen for accepting the selection of the operation mode by the user. 図18は、動作モードと文字検出動作との対応関係を定めた関係テーブルの一例を示す図である。FIG. 18 is a diagram showing an example of a relationship table that defines the correspondence relationship between operation modes and character detection operations. 図19は、動作モードの選択に加えて処理速度の選択を受け付ける操作画面の一例を示す図である。FIG. 19 is a diagram showing an example of an operation screen for accepting the selection of the processing speed in addition to the selection of the operation mode. 図20は、動作モードと処理速度との組み合わせに対する文字検出動作の対応関係を定めた関係テーブルの一例を示す図である。FIG. 20 is a diagram showing an example of a relationship table that defines the correspondence relationship of the character detection operation with respect to the combination of the operation mode and the processing speed. 図21は、第3実施形態の複合機の機能的な構成例を示すブロック図である。FIG. 21 is a block diagram showing a functional configuration example of the multifunction peripheral of the third embodiment. 図22は、第3実施形態における第1の検出部の構成例を示すブロック図である。FIG. 22 is a block diagram showing a configuration example of the first detection unit in the third embodiment. 図23は、M×M画素からなるマトリックスの画素比較方向を示す図である。FIG. 23 is a diagram showing pixel comparison directions of a matrix of M×M pixels. 図24は、N×N画素からなるブロックの一例を示す図である。FIG. 24 is a diagram showing an example of a block composed of N×N pixels. 図25は、注目ブロックと周囲ブロックの関係を示す図である。FIG. 25 is a diagram showing the relationship between the block of interest and the surrounding blocks. 図26は、色判定部の構成例を示すブロック図である。FIG. 26 is a block diagram showing a configuration example of the color determination unit. 図27は、色処理/UCR部の構成例を示すブロック図である。FIG. 27 is a block diagram showing a configuration example of the color processing/UCR unit. 図28は、第1変形例の複合機の機能的な構成例を示すブロック図である。FIG. 28 is a block diagram showing a functional configuration example of the multifunction peripheral of the first modified example. 図29は、文字領域補正部の構成例を示すブロック図である。FIG. 29 is a block diagram showing a configuration example of the character area correction unit. 図30は、マスク補正回路が用いるマスクの一例を示す図である。FIG. 30 is a diagram showing an example of a mask used by the mask correction circuit.

以下に添付図面を参照しながら、本発明に係る画像処理装置、画像処理方法およびプログラムの具体的な実施形態について詳しく説明する。以下で示す実施形態は、例えばフルカラーで表現される多値画像の高圧縮PDFファイルを生成する画像処理装置への適用例である。ただし、本発明はこの例に限らず、多値画像を文字画像と背景画像とに分離する処理を行う様々な画像処理装置に対して有効に適用可能である。 Hereinafter, specific embodiments of an image processing apparatus, an image processing method, and a program according to the present invention will be described in detail with reference to the accompanying drawings. The embodiment described below is an application example to an image processing apparatus that generates a highly compressed PDF file of a multi-valued image expressed in full color, for example. However, the present invention is not limited to this example, and can be effectively applied to various image processing apparatuses that perform processing for separating a multi-valued image into a character image and a background image.

[第1実施形態]
<画像処理装置の構成>
図1は、本実施形態の画像処理装置1のハードウェア構成例を示すブロック図である。画像処理装置1は、ハードウェアとして、例えばPC(パーソナルコンピュータ)などのコンピュータシステムを用いることができる。すなわち、画像処理装置1は、例えば図1に示すように、CPU101などのプロセッサと、RAM102、ROM103、HDD104などの記憶装置と、LANなどのネットワークに接続する通信インタフェースであるネットワークI/F105とを備え、これらがバス110を介して接続された構成とされる。
[First Embodiment]
<Structure of image processing device>
FIG. 1 is a block diagram showing an example of the hardware configuration of the image processing apparatus 1 of this embodiment. The image processing apparatus 1 can use a computer system such as a PC (personal computer) as hardware. That is, for example, as shown in FIG. 1, the image processing apparatus 1 includes a processor such as a CPU 101, a storage device such as a RAM 102, a ROM 103, and an HDD 104, and a network I/F 105 that is a communication interface connected to a network such as a LAN. It has a configuration in which these are connected via a bus 110.

本実施形態の画像処理装置1は、例えば、ネットワークに接続されたスキャナやホストコンピュータから処理対象の多値画像をネットワークI/F105を介して取得する。そして、画像処理装置1は、この多値画像を処理することで高圧縮PDFファイルを生成し、生成した高圧縮PDFファイルをHDD104に蓄積したり、ネットワークI/F105を介してネットワークに接続されたホストコンピュータに送信したりする。多値画像から高圧縮PDFファイルを生成する機能は、例えば、CPU101が、RAM102をワークエリアとして利用し、ROM103やHDD104などに格納された所定のプログラムを実行することにより実現される。 The image processing apparatus 1 according to the present embodiment acquires, for example, a multivalued image to be processed from a scanner or a host computer connected to a network via the network I/F 105. Then, the image processing apparatus 1 processes the multi-valued image to generate a highly compressed PDF file, stores the generated highly compressed PDF file in the HDD 104, or connects to the network via the network I/F 105. It is sent to the host computer. The function of generating a highly compressed PDF file from a multi-valued image is realized, for example, by the CPU 101 using the RAM 102 as a work area and executing a predetermined program stored in the ROM 103, the HDD 104, or the like.

なお、本実施形態の画像処理装置1は、例えばコピー機や複合機など、スキャナを備える画像形成装置の一機能として実現することもできる。この場合、図1に示すようなコンピュータシステムを画像形成装置が備える。そして、例えば、画像形成装置内部のCPU101が、RAM102をワークエリアとして利用し、ROM103やHDD104などに格納された所定のプログラムを実行することにより、スキャナエンジンによる原稿の読み取り、あるいはネットワークを介して取得した多値画像から高圧縮PDFファイルを生成する機能が実現される。 The image processing apparatus 1 according to the present embodiment can also be realized as one function of an image forming apparatus including a scanner, such as a copying machine or a multifunction peripheral. In this case, the image forming apparatus has a computer system as shown in FIG. Then, for example, the CPU 101 inside the image forming apparatus uses the RAM 102 as a work area and executes a predetermined program stored in the ROM 103, the HDD 104, or the like to read a document by the scanner engine or acquire it via a network. The function of generating a highly compressed PDF file from the multivalued image is realized.

図2は、本実施形態の画像処理装置1の機能的な構成例を示すブロック図である。画像処理装置1は、多値画像から高圧縮PDFファイルを生成するための機能的な構成要素として、例えば図2に示すように、第1の検出部11と、エッジ強調部12と、第2の検出部13と、分離部14と、ファイル生成部15とを備える。本実施形態の画像処理装置1では、処理対象として取得された多値画像Im1が第1の検出部11、エッジ強調部12および分離部14に入力され、この多値画像Im1に対応する高圧縮PDFファイルFImがファイル生成部15から出力される。 FIG. 2 is a block diagram showing a functional configuration example of the image processing apparatus 1 of this embodiment. The image processing apparatus 1 has, as functional components for generating a highly compressed PDF file from a multi-valued image, for example, as shown in FIG. The detection unit 13, the separation unit 14, and the file generation unit 15 are provided. In the image processing apparatus 1 of this embodiment, the multi-valued image Im1 acquired as the processing target is input to the first detection unit 11, the edge enhancement unit 12, and the separation unit 14, and the high compression corresponding to this multi-valued image Im1 is performed. The PDF file FIm is output from the file generation unit 15.

第1の検出部11は、入力した多値画像Im1に対して文字のエッジを検出する処理を行い、その結果(以下、「文字エッジ検出結果」と呼ぶ)を出力する。この第1の検出部11が行う処理は、例えば特許文献1に記載された方法と同様に、多値画像Im1に対する局所的な分析により、多値画像Im1に含まれる文字のエッジ(線画)を検出する処理である。この処理は、小文字やコントラストの低い文字を効率よく検出できる反面、太文字の内部領域を検出できない、色地上文字や白色文字の検出において誤検出が生じやすいといった特性がある。したがって、処理対象の多値画像Im1に太文字、色地上文字、白色文字などが含まれている場合、第1の検出部11が出力する文字エッジ検出結果には、太文字の内部領域の検出漏れ、色地上文字や白色文字のエッジ周辺における誤検出などが生じ得る。 The first detection unit 11 performs processing for detecting an edge of a character in the input multi-valued image Im1 and outputs the result (hereinafter, referred to as “character edge detection result”). The process performed by the first detection unit 11 is similar to the method described in Patent Document 1, for example, and the edge (line drawing) of a character included in the multi-valued image Im1 is detected by local analysis on the multi-valued image Im1. This is the process of detecting. This processing has the characteristics that it can efficiently detect small letters and low-contrast characters, but cannot detect the internal area of bold characters, and is prone to erroneous detection in the detection of ground-colored characters and white characters. Therefore, when the multi-valued image Im1 to be processed includes a bold character, a color ground character, a white character, etc., the character edge detection result output by the first detection unit 11 detects the internal area of the bold character. Leakage, erroneous detection around the edge of the color ground character or white character, etc. may occur.

ここで文字エッジ検出結果とは、例えば、第1の検出部11により文字のエッジとして検出された画素群の多値画像Im1における座標位置を表す座標データである。この文字エッジ検出結果は、エッジ強調部12と分離部14とに入力される。なお、第1の検出部11による処理の詳細は後述する。 Here, the character edge detection result is, for example, coordinate data representing the coordinate position in the multi-valued image Im1 of the pixel group detected as the edge of the character by the first detection unit 11. The character edge detection result is input to the edge enhancing unit 12 and the separating unit 14. The details of the processing by the first detection unit 11 will be described later.

エッジ強調部12は、第1の検出部11から入力した文字エッジ検出結果を用いて、処理対象の多値画像Im1に含まれる文字のエッジを強調する処理を行い、文字のエッジが強調された多値画像(以下、「エッジ強調画像」と呼ぶ)Im2を出力する。このエッジ強調画像Im2は、第2の検出部13に入力される。 The edge emphasizing unit 12 uses the character edge detection result input from the first detecting unit 11 to perform the process of emphasizing the edge of the character included in the multivalued image Im1 to be processed, and the edge of the character is emphasized. A multi-valued image (hereinafter referred to as “edge-enhanced image”) Im2 is output. This edge-enhanced image Im2 is input to the second detection unit 13.

第2の検出部13は、エッジ強調部12から入力したエッジ強調画像Im2に対して文字領域を検出する処理を行い、その結果(以下、「文字領域検出結果」と呼ぶ)を出力する。この第2の検出部13による処理は、例えば特許文献2に記載された方法と同様に、大局的な分析によりエッジ強調画像Im2から文字行を抽出し、文字行に含まれる文字領域を検出する処理である。この処理は、太文字、色地上文字、白色文字などを精度よく検出できる反面、コントラストの低い灰文字などを正しく検出するのが難しいといった特性がある。したがって、処理対象の多値画像Im1に灰文字などが含まれている場合、第2の検出部13が出力する文字領域検出結果には、灰文字の検出漏れなどが生じ得る。 The second detection unit 13 performs a process of detecting a character area on the edge-emphasized image Im2 input from the edge emphasis unit 12, and outputs the result (hereinafter, referred to as “character area detection result”). In the processing by the second detection unit 13, a character line is extracted from the edge-emphasized image Im2 by global analysis, and the character region included in the character line is detected, as in the method described in Patent Document 2, for example. Processing. This process has a characteristic that it is possible to accurately detect a bold character, a ground character, a white character, and the like, but it is difficult to correctly detect a gray character having a low contrast. Therefore, when the multi-valued image Im1 to be processed includes gray characters or the like, the character area detection result output by the second detection unit 13 may include omission of gray characters or the like.

ここで文字領域検出結果とは、例えば、第2の検出部13により文字領域として検出された画素群の多値画像Im1における座標位置を表す座標データである。この文字領域検出結果は、分離部14に入力される。なお、第2の検出部13による処理の詳細は後述する。 Here, the character area detection result is, for example, coordinate data representing the coordinate position in the multi-valued image Im1 of the pixel group detected as the character area by the second detection unit 13. The character area detection result is input to the separation unit 14. The details of the processing by the second detection unit 13 will be described later.

分離部14は、第1の検出部11から入力した文字エッジ検出結果と、第2の検出部13から入力した文字領域検出結果とを用いて、多値画像Im1を文字画像Im3と背景画像Im4とに分離する。具体的には分離部14は、例えば、文字領域検出結果と多値画像Im1とを用いて、多値画像Im1における色地上文字の領域および白色文字の領域を検出し、文字エッジ検出結果に色地上文字のエッジあるいは白色文字のエッジとして検出している部分があればそれを除去する。そして、分離部14は、色地上文字のエッジや白色文字のエッジを除去した文字エッジ検出結果と文字領域検出結果とのOR演算により両者を統合(マージ)し、統合した検出結果が示す多値画像Im1における画像領域を抜き出したものを文字画像Im3とする。また、分離部14は、多値画像Im1と文字画像Im3との差分を背景画像Im4とする。これら文字画像Im3および背景画像Im4は、ファイル生成部15に入力される。 The separation unit 14 uses the character edge detection result input from the first detection unit 11 and the character region detection result input from the second detection unit 13 to convert the multi-valued image Im1 into the character image Im3 and the background image Im4. And separate. Specifically, the separating unit 14 detects the area of the color ground character and the area of the white character in the multi-valued image Im1 by using the character area detection result and the multi-valued image Im1, and adds the color to the character edge detection result. If there is a part detected as an edge of a ground character or an edge of a white character, remove it. Then, the separation unit 14 integrates (merges) the character edge detection result obtained by removing the edge of the color ground character and the edge of the white character and the character region detection result by the OR operation, and the multi-value indicated by the integrated detection result. A character image Im3 is obtained by extracting the image area in the image Im1. Further, the separation unit 14 sets the difference between the multi-valued image Im1 and the character image Im3 as the background image Im4. The character image Im3 and the background image Im4 are input to the file generation unit 15.

なお、本実施形態では、多値画像Im1に色地上文字の領域と白色文字の領域の双方が含まれている場合に、分離部14がこれら色地上文字の領域と白色文字の領域双方の領域を検出し、文字エッジ検出結果から色地上文字のエッジと白色文字のエッジの双方を除去するものとするが、これに限らない。分離部14は、多値画像Im1に含まれる色地上文字の領域のみを検出し、文字エッジ検出結果から色地上文字のエッジのみを除去するような構成であってもよいし、多値画像Im1に含まれる白色文字の領域のみを検出し、文字エッジ検出結果から白色文字のエッジのみを除去するような構成であってもよい。 In the present embodiment, when the multi-valued image Im1 includes both the area of the color ground character and the area of the white character, the separating unit 14 determines the area of both the area of the color ground character and the area of the white character. Is detected and both the edge of the ground character and the edge of the white character are removed from the character edge detection result, but the present invention is not limited to this. The separating unit 14 may be configured to detect only the area of the color ground character included in the multi-valued image Im1 and remove only the edge of the color ground character from the character edge detection result, or the multi-valued image Im1. It is also possible to detect only the area of the white character included in the above and remove only the edge of the white character from the character edge detection result.

ファイル生成部15は、分離部14から入力した文字画像Im3と背景画像Im4とを互いに異なる方式で圧縮した後に統合し、多値画像Im1に対応する高圧縮PDFファイルFImを生成する。具体的にはファイル生成部15は、例えば、文字画像Im3に対しては、色数を限定する減色処理を行った上でMMRなどの符号化方式による圧縮を行う。一方、背景画像Im4に対しては、ダウンサンプリングによるデータ量削減を行った上でJPEGなどの符号化方式による圧縮を行う。そして、圧縮された文字画像Im3と圧縮された背景画像Im4とを、例えばPDF形式で1つの画像ファイル上で統合することで、多値画像Im1に対応する高圧縮PDFファイルFImを生成する。 The file generation unit 15 compresses the character image Im3 and the background image Im4 input from the separation unit 14 by different methods and then integrates them to generate a high-compression PDF file FIm corresponding to the multi-valued image Im1. Specifically, for example, the file generation unit 15 performs, on the character image Im3, a color reduction process that limits the number of colors, and then compresses the image by an encoding method such as MMR. On the other hand, with respect to the background image Im4, the amount of data is reduced by downsampling and then compressed by an encoding method such as JPEG. Then, the compressed character image Im3 and the compressed background image Im4 are integrated on one image file in PDF format, for example, to generate a highly compressed PDF file FIm corresponding to the multi-valued image Im1.

なお、文字画像Im3や背景画像Im4を圧縮する方式は上記の例に限定されるものではなく、文字画像Im3や背景画像Im4のそれぞれに対して適した方式で圧縮が行われればよい。また、圧縮された文字画像Im3と圧縮された背景画像Im4とを統合する画像ファイルの形式もPDF形式に限定されるものではなく、例えばJPM形式など、背景と前景とを重ね合わせて1つの画像とする様々な形式を利用することができる。 The method of compressing the character image Im3 and the background image Im4 is not limited to the above example, and compression may be performed by a method suitable for each of the character image Im3 and the background image Im4. Further, the format of the image file that integrates the compressed character image Im3 and the compressed background image Im4 is not limited to the PDF format. For example, the JPM format or the like is used to overlap the background and the foreground to form one image. Various formats can be used.

ファイル生成部15により生成された高圧縮PDFファイルFImは、上述したように、例えば、HDD104に蓄積される、あるいは、ネットワークI/F105を介してネットワークに接続されたホストコンピュータなどに送信される。 The high compression PDF file FIm generated by the file generation unit 15 is, for example, accumulated in the HDD 104 or transmitted to the host computer or the like connected to the network via the network I/F 105, as described above.

<画像処理装置の動作>
次に、以上のように構成される本実施形態の画像処理装置1の動作の概要を説明する。図3は、本実施形態の画像処理装置1による動作の流れを説明するフローチャートである。
<Operation of image processing device>
Next, an outline of the operation of the image processing apparatus 1 of the present embodiment configured as described above will be described. FIG. 3 is a flowchart illustrating the flow of operations performed by the image processing apparatus 1 according to this embodiment.

本実施形態の画像処理装置1の動作が開始されると、まず、ステップS1において、処理対象となる多値画像Im1が取得される。この多値画像Im1は、第1の検出部11、エッジ強調部12および分離部14に入力される。 When the operation of the image processing apparatus 1 of the present embodiment is started, first, in step S1, the multivalued image Im1 to be processed is acquired. The multi-valued image Im1 is input to the first detection unit 11, the edge enhancement unit 12, and the separation unit 14.

次に、ステップS2において、ステップS1で取得した多値画像Im1に対して、第1の検出部11による処理が行われる。そして、第1の検出部11が出力する文字エッジ検出結果が、エッジ強調部12と分離部14とに入力される。 Next, in step S2, the process by the first detection unit 11 is performed on the multi-valued image Im1 acquired in step S1. Then, the character edge detection result output by the first detection unit 11 is input to the edge emphasis unit 12 and the separation unit 14.

次に、ステップS3において、エッジ強調部12により、ステップS2の文字エッジ検出結果を用いて、ステップS1で取得した多値画像Im1に含まれる文字のエッジを強調する処理が行われ、エッジ強調画像Im2が生成される。このエッジ強調画像Im2は、第2の検出部13に入力される。 Next, in step S3, the edge emphasis unit 12 uses the character edge detection result of step S2 to emphasize the edge of the character included in the multi-valued image Im1 acquired in step S1. Im2 is generated. This edge-enhanced image Im2 is input to the second detection unit 13.

次に、ステップS4において、ステップS3で生成されたエッジ強調画像Im2に対して、第2の検出部13による処理が行われる。そして、第2の検出部13が出力する文字領域検出結果が、分離部14に入力される。 Next, in step S4, the second detection unit 13 performs the process on the edge-enhanced image Im2 generated in step S3. Then, the character area detection result output by the second detection unit 13 is input to the separation unit 14.

次に、ステップS5において、分離部14により、ステップS2の文字エッジ検出結果とステップS4の文字領域検出結果とを用いて、ステップS1で取得した多値画像Im1を文字画像Im3と背景画像Im4とに分離する処理が行われる。これら文字画像Im3および背景画像Im4は、ファイル生成部15に入力される。 Next, in step S5, the separation unit 14 uses the character edge detection result of step S2 and the character area detection result of step S4 to convert the multi-valued image Im1 acquired in step S1 into a character image Im3 and a background image Im4. The process of separating into. The character image Im3 and the background image Im4 are input to the file generation unit 15.

次に、ステップS6において、ファイル生成部15により、ステップS5で生成された文字画像Im3と背景画像Im4に対し、それぞれに適した画像処理および圧縮が行われた後、1つの画像ファイルへの統合が行われ、ステップS1で取得した多値画像Im1に対応する高圧縮PDFファイルFImが生成される。 Next, in step S6, the file generation unit 15 performs appropriate image processing and compression on the character image Im3 and the background image Im4 generated in step S5, and then merges them into one image file. Is performed, and the high compression PDF file FIm corresponding to the multi-valued image Im1 acquired in step S1 is generated.

そして最後に、ステップS7において、ステップS6で生成された高圧縮PDFファイルFImがファイル生成部15から出力され、例えばHDD104に蓄積される、あるいは、ネットワークI/F105を介してネットワークに接続されたホストコンピュータなどに送信される。 Finally, in step S7, the highly compressed PDF file FIm generated in step S6 is output from the file generation unit 15 and stored in, for example, the HDD 104, or a host connected to the network via the network I/F 105. Sent to a computer, etc.

<第1の検出部による処理の具体例>
次に、第1の検出部11による処理の具体例について、図4を参照して説明する。図4は、第1の検出部11による処理の一例を説明するフローチャートである。
<Specific Example of Processing by First Detecting Unit>
Next, a specific example of the processing by the first detection unit 11 will be described with reference to FIG. FIG. 4 is a flowchart illustrating an example of processing performed by the first detection unit 11.

第1の検出部11による処理は、上述したように、局所的な分析により多値画像Im1に含まれる文字のエッジを検出する処理であり、例えば特許文献1に記載の技術を利用して、多値画像Im1に含まれる線画を文字のエッジとして検出することで実現できる。 As described above, the processing performed by the first detection unit 11 is processing for detecting the edge of a character included in the multi-valued image Im1 by local analysis, and, for example, using the technique described in Patent Document 1, This can be realized by detecting the line drawing included in the multi-valued image Im1 as the edge of the character.

第1の検出部11は、まず、処理対象の多値画像Im1に対して、フィルタリングによるMTF補正を行う(ステップS101)。MTF補正は、次の3値化の精度を高めるために実施される前処理である。このMTF補正用のフィルタには、例えば特許文献1に記載のものを用いることができる。 The first detection unit 11 first performs MTF correction by filtering on the multivalued image Im1 to be processed (step S101). The MTF correction is a pre-process that is performed to improve the accuracy of the next ternarization. As the filter for MTF correction, for example, the filter described in Patent Document 1 can be used.

次に、第1の検出部11は、MTF補正された多値画像Im1に対し3値化を実施して(ステップS102)、多値画像Im1を黒画素、白画素、灰色画素に分ける。 Next, the first detection unit 11 performs ternarization on the MTF-corrected multi-valued image Im1 (step S102) and divides the multi-valued image Im1 into black pixels, white pixels, and gray pixels.

次に、第1の検出部11は、例えば特許文献1に記載されているように、黒連結画素や白連結画素のパターンマッチングにより多値画像Im1から黒線画や白線画を抽出することで、多値画像Im1に含まれる文字のエッジを検出する(ステップS103)。このとき、ステップS102の3値化における閾値を適切に設定することで、多値画像Im1に灰文字が含まれている場合でも、その灰文字のエッジを適切に検出することができる。 Next, the first detection unit 11 extracts a black line drawing or a white line drawing from the multi-valued image Im1 by pattern matching of black connected pixels or white connected pixels, as described in Patent Document 1, for example, The edge of the character included in the multi-valued image Im1 is detected (step S103). At this time, by appropriately setting the threshold value in the ternarization in step S102, even when the multi-valued image Im1 includes a gray character, the edge of the gray character can be appropriately detected.

そして、第1の検出部11は、ステップS103の処理結果を文字エッジ検出結果として出力し(ステップS104)、一連の処理を終了する。 Then, the first detection unit 11 outputs the processing result of step S103 as the character edge detection result (step S104), and ends the series of processing.

<第2の検出部による処理の具体例>
次に、第2の検出部13による処理の具体例について、図5を参照して説明する。図5は、第2の検出部13による処理の一例を説明するフローチャートである。
<Specific Example of Processing by Second Detection Unit>
Next, a specific example of the processing by the second detection unit 13 will be described with reference to FIG. FIG. 5 is a flowchart illustrating an example of processing performed by the second detection unit 13.

第2の検出部13による処理は、上述したように、大局的な分析により画像から文字領域を検出する処理であり、例えば特許文献2に記載の技術を利用して、エッジ強調画像Im2から文字行を抽出し、文字行から文字領域を検出することで実現できる。ここで、本実施形態の画像処理装置1では、処理対象となる多値画像Im1に対して第2の検出部13による処理を行うのではなく、第1の検出部11の処理結果である文字エッジ検出結果を用いてエッジ強調部12により生成されたエッジ強調画像Im2に対して、第2の検出部13による処理を行う。したがって、多値画像Im1からそのまま文字領域を検出する場合と比較して、文字領域の検出精度が高い。 As described above, the process performed by the second detection unit 13 is a process of detecting a character region from an image by global analysis, and for example, using the technique described in Patent Document 2, a character is detected from the edge-enhanced image Im2. It can be realized by extracting a line and detecting a character area from the character line. Here, in the image processing device 1 of the present embodiment, the multi-valued image Im1 to be processed is not processed by the second detection unit 13, but is a character that is the processing result of the first detection unit 11. The second detection unit 13 performs processing on the edge-enhanced image Im2 generated by the edge enhancement unit 12 using the edge detection result. Therefore, the detection accuracy of the character area is higher than that in the case of detecting the character area as it is from the multi-valued image Im1.

第2の検出部13は、まず、エッジ強調部12により生成されたエッジ強調画像Im2に対して2値化を実施する(ステップS201)。ここでの2値化は背景よりも低輝度(例えば黒)の文字行を抽出するための処理であり、低輝度の文字行を背景と区別できる適切な閾値が設定される。また、背景との分離精度を高めるために動的閾値2値化を用いてもよい。 The second detection unit 13 first binarizes the edge-emphasized image Im2 generated by the edge enhancement unit 12 (step S201). The binarization here is a process for extracting a character line having a lower brightness (for example, black) than the background, and an appropriate threshold value that can distinguish the low brightness character line from the background is set. Also, dynamic threshold binarization may be used to increase the accuracy of separation from the background.

次に、第2の検出部13は、例えば特許文献2に記載されているように、ステップS201で得られた2値化画像から、水平方向に並ぶ黒画素のランと垂直方向に並ぶ黒画素のランを連結して連結成分を取得する(ステップS202)。 Next, as described in, for example, Patent Document 2, the second detection unit 13 determines, from the binarized image obtained in step S201, a run of black pixels arranged in the horizontal direction and a black pixel arranged in the vertical direction. The runs are connected to obtain a connected component (step S202).

次に、第2の検出部13は、ステップS202で取得した連結成分のうち、サイズが小さい文字(以下、「小文字」と呼ぶ)と推定される連結成分を除去する(ステップS203)。この処理は、次の文字行の抽出における計算量を削減するための処理である。すなわち、文字行の抽出は、取得した連結成分を種々の条件に従って文字行として統合していく処理となるが、小文字と推定される連結成分が多数含まれている場合、連結成分の統合において組み合わせのパターンが膨大となり、計算量が著しく増加する。一方、多値画像Im1に含まれる低輝度(例えば黒)の小文字は、第1の検出部11により検出されて文字エッジ検出結果として出力される可能性が高く、第2の検出部13による検出対象から除外しても検出漏れが生じないと想定される。そこで、本実施形態では、低輝度の小文字と推定される連結成分を除去した上で次の文字行の抽出を行うことで、計算量の削減を図るようにしている。なお、低輝度の小文字かどうかの判断は、例えば、ステップS202で2値化画像から取得される連結成分の外接矩形の大きさが所定値以下であり、かつ、その連結成分の近傍に外接矩形が所定値を超える連結成分が存在しないといった基準に従って行えばよい。 Next, the second detection unit 13 removes, from the connected components acquired in step S202, connected components that are estimated to be small-sized characters (hereinafter referred to as "lowercase letters") (step S203). This process is a process for reducing the calculation amount in the extraction of the next character line. That is, extraction of a character line is a process of integrating the acquired connected components as a character line according to various conditions. However, when a large number of connected components estimated to be in lowercase are included, the combination of the connected components is combined. The number of patterns will become huge and the amount of calculation will increase significantly. On the other hand, a low-luminance (eg, black) lowercase letter included in the multi-valued image Im1 is likely to be detected by the first detection unit 11 and output as a character edge detection result, and detected by the second detection unit 13. Even if it is excluded from the target, it is assumed that there will be no omission in detection. Therefore, in the present embodiment, the amount of calculation is reduced by removing the connected component that is estimated to be a low-luminance lowercase letter and then extracting the next character line. It should be noted that whether or not the letter is a low-luminance lowercase letter is determined by, for example, the size of the circumscribed rectangle of the connected component acquired from the binarized image in step S202 being equal to or smaller than a predetermined value, and the circumscribed rectangle near the connected component. May be performed according to the criterion that there is no connected component that exceeds a predetermined value.

次に、第2の検出部13は、ステップS202で取得され、ステップS203で除去されなかった連結成分を、例えば特許文献2に記載の方法により統合して、背景よりも低輝度の文字行を抽出する(ステップS204)。 Next, the second detection unit 13 integrates the connected components acquired in step S202 and not removed in step S203 by, for example, the method described in Patent Document 2 to form a character line having a lower luminance than the background. Extract (step S204).

次に、第2の検出部13は、エッジ強調部12により生成されたエッジ強調画像Im2に対して、再度、2値化を実施する(ステップS205)。ここでの2値化は背景よりも高輝度(例えば白)の文字行を抽出するための処理であり、高輝度の文字行を背景と区別できる適切な閾値が設定される。また、背景との分離精度を高めるために動的閾値2値化を用いてもよい。 Next, the second detection unit 13 re-binarizes the edge emphasized image Im2 generated by the edge emphasis unit 12 (step S205). The binarization here is a process for extracting a character line having a higher brightness (for example, white) than the background, and an appropriate threshold value that can distinguish the high brightness character line from the background is set. Also, dynamic threshold binarization may be used to increase the accuracy of separation from the background.

次に、第2の検出部13は、例えば特許文献2に記載されているように、ステップS205で得られた2値化画像から、水平方向に並ぶ白画素のランと垂直方向に並ぶ白画素のランを連結して連結成分を取得する(ステップS206)。 Next, as described in, for example, Patent Document 2, the second detection unit 13 uses the run of white pixels arranged in the horizontal direction and the white pixels arranged in the vertical direction from the binarized image obtained in step S205. The runs are connected to obtain a connected component (step S206).

次に、第2の検出部13は、ステップS206で取得された連結成分を、例えば特許文献2に記載の方法により統合して、背景よりも高輝度の文字行を抽出する(ステップS207)。 Next, the second detection unit 13 integrates the connected components acquired in step S206 by, for example, the method described in Patent Document 2 to extract a character line having a higher brightness than the background (step S207).

次に、第2の検出部13は、ステップS204で抽出した文字行とステップS207で抽出した文字行とで、エッジ強調画像Im2における位置が重なる文字行があるかどうかを判断する(ステップS208)。そして、重なる文字行があれば(ステップS208:Yes)、それらの文字行の外接矩形のサイズを比較して、外接矩形のサイズが小さい方の文字行を削除する(ステップS209)。 Next, the second detection unit 13 determines whether or not there is a character line whose position in the edge-enhanced image Im2 overlaps with the character line extracted in step S204 and the character line extracted in step S207 (step S208). .. If there are overlapping character lines (step S208: Yes), the sizes of the circumscribing rectangles of these character lines are compared, and the character line having the smaller circumscribing rectangle size is deleted (step S209).

次に、第2の検出部13は、以上の処理によりエッジ強調画像Im2から抽出された文字行に含まれる文字を文字領域として検出する(ステップS210)。そして、第2の検出部13は、ステップS210の処理結果を文字領域検出結果として出力し(ステップS211)、一連の処理を終了する。 Next, the 2nd detection part 13 detects the character contained in the character line extracted from the edge emphasis image Im2 by the above process as a character area (step S210). Then, the second detection unit 13 outputs the processing result of step S210 as the character area detection result (step S211), and ends the series of processing.

図6は、第2の検出部13による処理によって得られる文字領域検出結果の具体例を説明する図である。この図6では、エッジ強調画像Im2から黒文字の文字領域「あいうえお」が検出される例を示している。 FIG. 6 is a diagram illustrating a specific example of the character area detection result obtained by the processing by the second detection unit 13. In this FIG. 6, an example in which a character area “aiueo” of black characters is detected from the edge emphasized image Im2 is shown.

図5のステップS201の処理により、図6の601のような2値化画像が得られたとする。この2値化画像に対して図5のステップS202の処理を行うと、図6の602で示す連結成分が取得される。そして、図5のステップS203の処理により、小文字の連結成分が除去されて、図6の603のような連結成分が残る。この連結成分を対象として図5のステップS204の処理を行うことで、図6の604のように、文字行が抽出される。そして、図5のステップS210の処理によって、図6の605のように、文字行に含まれる「あいうえお」の文字領域が検出され、文字領域検出結果として出力される。 It is assumed that a binarized image such as 601 in FIG. 6 is obtained by the processing in step S201 in FIG. When the process of step S202 in FIG. 5 is performed on this binarized image, the connected component indicated by 602 in FIG. 6 is acquired. Then, by the processing of step S203 in FIG. 5, the lowercase connected components are removed, and the connected components such as 603 in FIG. 6 remain. By performing the process of step S204 of FIG. 5 on this connected component, a character line is extracted as indicated by 604 of FIG. Then, by the process of step S210 of FIG. 5, the character area of “aiueo” included in the character line is detected as in 605 of FIG. 6, and is output as the character area detection result.

<分離部による処理の具体例>
次に、分離部14による処理の具体例について、図7を参照して説明する。図7は、分離部14による処理の一例を説明するフローチャートである。
<Specific example of processing by the separation unit>
Next, a specific example of the processing performed by the separation unit 14 will be described with reference to FIG. 7. FIG. 7 is a flowchart illustrating an example of processing performed by the separating unit 14.

分離部14による処理は、上述したように、第1の検出部11による文字エッジ検出結果と、第2の検出部13による文字領域検出結果とを用いて、多値画像Im1を文字画像Im3と背景画像Im4とに分離する処理である。ここで、本実施形態の画像処理装置1では、分離部14が、まず、多値画像Im1における色地上文字の領域および白色文字の領域を検出して、文字エッジ検出結果に色地上文字のエッジあるいは白色文字のエッジとして検出している部分があればそれを除去する。これにより、第1の検出部11の処理では誤検出が生じやすい色地上文字や白色文字のエッジを除去して、文字エッジ検出結果の信頼性を高めることができる。そして、信頼性が向上した文字エッジ検出結果と文字領域検出結果とを統合し、統合した検出結果を用いて多値画像Im1を文字画像Im3と背景画像Im4とに分離することで、画像の分離精度を高めることができる。 As described above, the processing by the separation unit 14 uses the character edge detection result by the first detection unit 11 and the character area detection result by the second detection unit 13 to convert the multi-valued image Im1 into the character image Im3. This is a process of separating the background image Im4. Here, in the image processing device 1 of the present embodiment, the separating unit 14 first detects the area of the color ground character and the area of the white character in the multi-valued image Im1, and detects the edge of the color ground character in the character edge detection result. Alternatively, if there is a portion detected as the edge of the white character, it is removed. As a result, in the processing of the first detection unit 11, it is possible to remove the edges of the color ground characters and white characters that are likely to be erroneously detected, and improve the reliability of the character edge detection result. Then, the character edge detection result and the character area detection result with improved reliability are integrated, and the multi-valued image Im1 is separated into the character image Im3 and the background image Im4 by using the integrated detection result, thereby separating the images. The accuracy can be increased.

分離部14は、まず、第2の検出部13から入力した文字領域検出結果と多値画像Im1とを用いて、多値画像Im1に色地上文字が含まれているかどうかを判定する(ステップS301)。 First, the separation unit 14 determines whether the multi-valued image Im1 includes a color ground character by using the character area detection result input from the second detection unit 13 and the multi-valued image Im1 (step S301). ).

図8は、色地上文字を判定する方法の一例を説明する図である。この図8では、黄色地上に黒文字「あいうえお」が存在する例を示し、図8の801は、第2の検出部13により抽出された「あいうえお」を含む文字行の外接矩形の多値画像Im1における位置を表し、図8の802は、第2の検出部13により検出された文字領域「あいうえお」を表している。 FIG. 8 is a diagram illustrating an example of a method of determining a color ground character. FIG. 8 shows an example in which the black character “aiueo” exists on the yellow ground. Reference numeral 801 in FIG. 8 indicates a multi-valued image Im1 of a circumscribed rectangle of a character line including “aiueo” extracted by the second detection unit 13. 8 represents the position, and 802 in FIG. 8 represents the character area “aiueo” detected by the second detection unit 13.

分離部14は、図8の801で示す多値画像Im1上の外接矩形から図8の802で示す文字領域「あいうえお」を除去することにより、図8の803で示すように、文字領域「あいうえお」の下地領域を抽出することができる。そして、この下地領域の色が有彩色かどうかを判定することで、多値画像Im1に色地上文字が含まれているかどうかを判定することができる。図8の例では、下地領域の色が黄色であるため、多値画像Im1に色地上文字が含まれていると判定されることになる。 The separating unit 14 removes the character area “Aiueo” shown by 802 in FIG. 8 from the circumscribed rectangle on the multi-valued image Im1 shown by 801 in FIG. Can be extracted. Then, it is possible to determine whether or not the ground value character is included in the multi-valued image Im1 by determining whether or not the color of the base region is a chromatic color. In the example of FIG. 8, since the color of the background area is yellow, it is determined that the multi-valued image Im1 includes color ground characters.

図9は、色地上文字を判定する方法の他の例を説明する図であり、矩形に近い文字が色地上文字かどうかを判定する方法を示している。この図9では、黄色地上に黒文字の長音符「ー」が存在する例を示し、図9の901は、第2の検出部13により抽出された「ー」を含む文字行の外接矩形の多値画像Im1における位置を表し、図9の902は、第2の検出部13により検出された文字領域「ー」を表している。 FIG. 9 is a diagram for explaining another example of the method for determining a color ground character, and shows a method for determining whether a character close to a rectangle is a color ground character. In this FIG. 9, an example in which a black long note “−” exists on the yellow ground is shown, and 901 in FIG. 9 is a multi-valued circumscribed rectangle of a character line including “−” extracted by the second detection unit 13. The position in the image Im1 is represented, and 902 in FIG. 9 represents the character area “−” detected by the second detection unit 13.

この図9の例のように、第2の検出部13により検出された文字領域が矩形に近い場合、図8に示した方法で文字領域の下地領域を適切に抽出することができない。そこで、分離部14は、第2の検出部13により検出された文字領域が矩形に近い場合は、図9の903に示すように、文字領域に近い周辺領域を判定の対象とし、この周辺領域の色が有彩色かどうかを判定することで、多値画像Im1に色地上文字が含まれているかどうかを判定する。図9の例では、周辺領域の色が黄色であるため、多値画像Im1に色地上文字が含まれていると判定されることになる。 As in the example of FIG. 9, when the character area detected by the second detection unit 13 is close to a rectangle, the background area of the character area cannot be appropriately extracted by the method shown in FIG. Therefore, when the character region detected by the second detection unit 13 is close to a rectangle, the separation unit 14 determines the peripheral region close to the character region as a determination target, as shown in 903 of FIG. By determining whether or not the color is a chromatic color, it is determined whether or not the multi-valued image Im1 includes color ground characters. In the example of FIG. 9, since the color of the peripheral area is yellow, it is determined that the multi-valued image Im1 includes color ground characters.

分離部14は、ステップS301で多値画像Im1に色地上文字が含まれていると判定した場合(ステップS301:Yes)、第1の検出部11による文字エッジ検出結果を多値画像Im1と照合して、文字エッジ検出結果に色地上文字のエッジを検出している部分が含まれていればその色地上文字のエッジを除去する(ステップS302)。一方、多値画像Im1に色地上文字が含まれていなければ(ステップS301:No)、ステップS303に進む。 When the separation unit 14 determines in step S301 that the multi-valued image Im1 includes color ground characters (step S301: Yes), the character edge detection result by the first detection unit 11 is collated with the multi-valued image Im1. Then, if the character edge detection result includes a portion in which the edge of the color ground character is detected, the edge of the color ground character is removed (step S302). On the other hand, if the multi-valued image Im1 does not include the color ground characters (step S301: No), the process proceeds to step S303.

次に、分離部14は、第2の検出部13から入力した文字領域検出結果と多値画像Im1とを用いて、多値画像Im1に白色文字が含まれているかどうかを判定する(ステップS303)。 Next, the separating unit 14 uses the character region detection result input from the second detecting unit 13 and the multi-valued image Im1 to determine whether the multi-valued image Im1 includes white characters (step S303). ).

図10は、白色文字を判定する方法の一例を説明する図である。この図10では、黒色地上に白色文字の「あいうえお」が存在する例を示し、図10の1001は、第2の検出部13により検出された文字領域「あいうえお」の多値画像Im1における位置を表している。 FIG. 10 is a diagram illustrating an example of a method for determining a white character. In this FIG. 10, an example in which a white character “AIUEO” exists on a black ground is shown, and 1001 in FIG. 10 indicates the position in the multi-valued image Im1 of the character area “AIUEO” detected by the second detection unit 13. It represents.

分離部14は、図10の1001で示す多値画像Im1上の文字領域「あいうえお」から、図10の1002に示すように、文字の内部領域を抽出する。そして、抽出した文字の内部領域の色が白色かどうかを判定することで、多値画像Im1に白色文字が含まれているかどうかを判定することができる。ここで、文字の内部領域を判定の対象とするのは、文字のエッジを文字色の判定の対象に含めると、文字のエッジに下地の色が混在している場合に文字色を正しく判定できないためである。図10の例では、文字の内部領域の色が白色であるため、多値画像Im1に白色文字が含まれていると判定されることになる。 The separating unit 14 extracts the internal area of the character from the character area “aiueo” on the multi-valued image Im1 shown by 1001 in FIG. 10 as shown by 1002 in FIG. Then, by determining whether or not the color of the internal area of the extracted character is white, it is possible to determine whether or not the multi-valued image Im1 includes a white character. Here, the target of the internal area of the character is that if the edge of the character is included in the target of the character color determination, the character color cannot be correctly determined when the background color is mixed in the edge of the character. This is because. In the example of FIG. 10, since the color of the internal area of the character is white, it is determined that the multi-valued image Im1 includes white characters.

図11は、白色文字を判定する方法の他の例を説明する図であり、判定対象となる文字が細い文字の場合の判定方法を示している。この図11では、黒色地上に細い白色文字の「あいうえお」が存在する例を示し、図11の1101は、第2の検出部13により抽出された「あいうえお」を含む文字行の外接矩形の多値画像Im1における位置を表し、図11の1102は、第2の検出部13により検出された文字領域「あいうえお」を表している。 FIG. 11 is a diagram for explaining another example of the method for determining a white character, and shows the determination method when the character to be determined is a thin character. FIG. 11 shows an example in which a thin white character “aiueo” exists on a black ground, and 1101 in FIG. 11 indicates that many circumscribed rectangles of a character line including “aiueo” extracted by the second detection unit 13 are included. The position in the value image Im1 is represented, and 1102 in FIG. 11 represents the character area “aiueo” detected by the second detection unit 13.

この図11の例のように、第2の検出部13により検出された文字領域が細い文字である場合、図10に示した例のように文字の内部領域を適切に抽出することができない。そこで、分離部14は、第2の検出部13により検出された文字領域が細い文字の場合は、図11の1101で示す多値画像Im1上の外接矩形から図11の1102で示す文字領域「あいうえお」を除去することにより、図11の1103で示すように、文字領域「あいうえお」の下地領域を抽出する。そして、この下地領域の色と文字領域の色とを用いて、文字領域の色が下地領域の色と同系色でかつ下地領域よりも高輝度であるかどうかを判定することで、多値画像Im1に白色文字が含まれているかどうかを判定する。ここで、文字領域の色が下地領域の色と同系色であることを条件の一つとしているのは、文字のエッジに下地の色が混在していても文字色が白色かどうかを判定できるようにするためである。図11の例では、文字領域の色(白色)が下地領域の色(黒色)と同系色でかつ下地領域よりも高輝度であるため、多値画像Im1に白色文字が含まれていると判定されることになる。 As in the example of FIG. 11, when the character region detected by the second detection unit 13 is a thin character, the internal region of the character cannot be properly extracted as in the example shown in FIG. Therefore, when the character region detected by the second detection unit 13 is a thin character, the separation unit 14 determines from the circumscribed rectangle on the multi-valued image Im1 1101 in FIG. 11 to the character region “1102 in FIG. By removing "aiueo", the background area of the character area "aiueo" is extracted as indicated by 1103 in FIG. Then, by using the color of the background area and the color of the character area, it is determined whether or not the color of the character area is a color similar to the color of the background area and has a higher brightness than the background area. It is determined whether Im1 includes a white character. Here, one of the conditions is that the color of the character area is similar to the color of the background area. Even if the background color is mixed at the edge of the character, it can be determined whether the character color is white. To do so. In the example of FIG. 11, since the color of the character area (white) is similar to the color of the background area (black) and has a higher brightness than the background area, it is determined that the multi-valued image Im1 contains white characters. Will be done.

分離部14は、ステップS303で多値画像Im1に白色文字が含まれていると判定した場合(ステップS303:Yes)、第1の検出部11による文字エッジ検出結果を多値画像Im1と照合して、文字エッジ検出結果に白色文字のエッジを検出している部分が含まれていればその白色文字のエッジを除去する(ステップS304)。一方、多値画像Im1に白色文字が含まれていなければ(ステップS303:No)、ステップS305に進む。 When it is determined in step S303 that the multi-valued image Im1 includes white characters (step S303: Yes), the separation unit 14 collates the character edge detection result by the first detection unit 11 with the multi-valued image Im1. If the character edge detection result includes a portion in which the edge of the white character is detected, the edge of the white character is removed (step S304). On the other hand, if the multi-valued image Im1 does not include white characters (step S303: No), the process proceeds to step S305.

次に、分離部14は、第1の検出部11による文字エッジ検出結果から色地上文字のエッジや白色文字のエッジを除去した文字エッジ検出結果と、第2の検出部13による文字領域検出結果とのOR演算により両者を統合する。そして、分離部14は、統合した検出結果が示す画像領域を多値画像Im1から抽出することで、文字画像Im3を生成する(ステップS305)。また、分離部14は、ステップS305で生成した文字画像Im3と多値画像Im1との差分を、背景画像Im4として生成する(ステップS306)。 Next, the separation unit 14 detects the character edge detection result obtained by removing the edge of the ground character and the edge of the white character from the character edge detection result obtained by the first detection unit 11, and the character area detection result obtained by the second detection unit 13. The two are integrated by OR operation with. Then, the separation unit 14 generates the character image Im3 by extracting the image area indicated by the integrated detection result from the multi-valued image Im1 (step S305). Further, the separation unit 14 generates a background image Im4 by using the difference between the character image Im3 generated in step S305 and the multi-valued image Im1 (step S306).

そして、分離部14は、ステップS305およびステップS306で生成した文字画像Im3および背景画像Im4を出力し(ステップS307)、一連の処理を終了する。 Then, the separation unit 14 outputs the character image Im3 and the background image Im4 generated in steps S305 and S306 (step S307), and ends the series of processes.

<実施形態の効果>
以上、具体的な例を挙げながら詳細に説明したように、本実施形態の画像処理装置1は、局所的な分析により文字のエッジを検出する第1の検出部11と、大局的な分析により文字領域を検出する第2の検出部13とを備え、これら第1の検出部11による文字エッジ検出結果と第2の検出部13による文字領域検出結果とを複合的に用いて、最終的に処理対象の多値画像Im1に含まれる文字領域を検出するようにしている。したがって、本実施形態の画像処理装置1によれば、処理対象の多値画像Im1が様々な種類の文字を含む場合であっても、この多値画像Im1から文字を高精度に検出することができる。
<Effects of the embodiment>
As described above in detail with reference to specific examples, the image processing apparatus 1 according to the present embodiment uses the first detection unit 11 that detects the edge of a character by the local analysis and the global analysis. A second detection unit 13 for detecting a character region is provided, and the character edge detection result by the first detection unit 11 and the character region detection result by the second detection unit 13 are used in combination to finally The character area included in the multi-valued image Im1 to be processed is detected. Therefore, according to the image processing apparatus 1 of the present embodiment, even if the multi-valued image Im1 to be processed includes various types of characters, it is possible to detect a character from the multi-valued image Im1 with high accuracy. it can.

特に、本実施形態の画像処理装置1では、エッジ強調部12が、第1の検出部11による文字エッジ検出結果を用いて多値画像Im1に含まれる文字のエッジを強調することで、エッジ強調画像Im2を生成する。そして、第2の検出部13は、このエッジ強調部12により生成されたエッジ強調画像Im2から文字領域を検出するようにしている。したがって、第2の検出部13による文字領域の検出精度を高めることができる。 Particularly, in the image processing device 1 of the present embodiment, the edge enhancement unit 12 enhances the edge enhancement by enhancing the edges of the characters included in the multi-valued image Im1 by using the character edge detection result by the first detection unit 11. The image Im2 is generated. Then, the second detection unit 13 detects the character area from the edge emphasized image Im2 generated by the edge emphasis unit 12. Therefore, the detection accuracy of the character area by the second detection unit 13 can be improved.

また、本実施形態の画像処理装置1では、分離部14が、第1の検出部11による文字エッジ検出結果と第2の検出部13による文字領域検出結果とを統合し、統合した検出結果を用いて、処理対象の多値画像Im1を文字画像Im3と背景画像Im4とに分離するようにしている。したがって、多値画像Im1を文字画像Im3と背景画像Im4とに精度よく分離することができる。 Further, in the image processing apparatus 1 according to the present embodiment, the separation unit 14 integrates the character edge detection result by the first detection unit 11 and the character area detection result by the second detection unit 13, and outputs the integrated detection result. The multi-valued image Im1 to be processed is separated into the character image Im3 and the background image Im4. Therefore, the multi-valued image Im1 can be accurately separated into the character image Im3 and the background image Im4.

また、本実施形態の画像処理装置1では、分離部14が、第1の検出部11による文字エッジ検出結果から色地上文字や白色文字のエッジを除去した上で第2の検出部13による文字領域検出結果と統合するようにしている。したがって、第1の検出部11による文字エッジ検出結果に色地上文字や白色文字のエッジ周辺での誤検出が含まれている場合であっても、この誤検出の影響によって文字画像Im3の精度が低下する不都合を有効に抑制することができる。 Further, in the image processing apparatus 1 of the present embodiment, the separation unit 14 removes the edges of the color ground characters and the white characters from the character edge detection result by the first detection unit 11 and then the characters by the second detection unit 13. It is designed to be integrated with the area detection result. Therefore, even when the character edge detection result by the first detection unit 11 includes an erroneous detection near the edge of a color ground character or a white character, the accuracy of the character image Im3 is affected by the erroneous detection. The reduced inconvenience can be effectively suppressed.

また、本実施形態の画像処理装置1では、第2の検出部13が、エッジ強調画像Im2から取得した連結成分のうち、小文字と推定される連結成分を除去した上で文字行への統合を行うようにしている。したがって、文字行の抽出にかかる計算量を削減して、第2の検出部13の処理負荷を軽減することができる。 In addition, in the image processing apparatus 1 of the present embodiment, the second detection unit 13 removes the connected component estimated to be lowercase letters from the connected components acquired from the edge-enhanced image Im2, and then performs integration into a character line. I'm trying to do it. Therefore, it is possible to reduce the calculation amount required for extracting the character line and reduce the processing load of the second detection unit 13.

図12は、本実施形態の画像処理装置1による効果の一例を説明する図であり、処理対象の多値画像Im1から生成される文字画像Im3と背景画像Im4の具体例を示している。図12の1201は、第1の検出部11の処理により得られる文字エッジ検出結果の具体例を示し、図12の1202は、第2の検出部13の処理により得られる文字領域検出結果の具体例を示している。 FIG. 12 is a diagram for explaining an example of the effect of the image processing apparatus 1 of the present embodiment, and shows specific examples of the character image Im3 and the background image Im4 generated from the multivalued image Im1 to be processed. Reference numeral 1201 in FIG. 12 shows a specific example of the character edge detection result obtained by the processing of the first detection unit 11, and 1202 of FIG. 12 shows a specific example of the character area detection result obtained by the processing of the second detection unit 13. An example is shown.

図12の例で示すように、処理対象の多値画像Im1に太文字が含まれている場合、第1の検出部11は太文字の内部領域を適切に検出できないため、文字エッジ検出結果1201は、太文字の内部領域に抜けが生じている。また、処理対象の多値画像Im1に色地上文字や白色文字が含まれている場合(図12では色地上文字かつ白色文字が多値画像Im1に含まれている例を示している)、第1の検出部11は色地上文字や白色文字の検出において誤検出が生じやすいため、文字エッジ検出結果1201には、白色文字(色地上文字)のエッジ近傍に誤検出が含まれている。また、処理対象の多値画像Im1に灰文字が含まれている場合、第2の検出部13は低コントラストの文字を適切に検出できないため、文字領域検出結果1202には、灰文字の文字領域が含まれていない。 As shown in the example of FIG. 12, when the multi-valued image Im1 to be processed includes a bold character, the first detection unit 11 cannot properly detect the internal area of the bold character, so the character edge detection result 1201 Is missing in the internal area of bold characters. In the case where the multi-valued image Im1 to be processed includes a color ground character and a white character (FIG. 12 shows an example in which a color ground character and a white character are included in the multi-valued image Im1), Since the detection unit 11 of No. 1 is likely to make an erroneous detection when detecting a color ground character or a white character, the character edge detection result 1201 includes an erroneous detection near the edge of a white character (color ground character). When the multi-valued image Im1 to be processed includes gray characters, the second detection unit 13 cannot properly detect low-contrast characters, and therefore the character region detection result 1202 shows the gray character regions. Is not included.

しかし、本実施形態の画像処理装置1では、第1の検出部11による文字エッジ検出結果1201から色地上文字や白色文字のエッジ部分を除去した上で第2の検出部13による文字領域検出結果1202と統合し、統合した検出結果が示す画像領域を多値画像Im1から抽出することで、文字画像Im3を生成する。そして、この文字画像Im3と多値画像Im1との差分を背景画像Im4として生成する。このため、図12の例で示すように、処理対象の多値画像Im1に太文字、色地上文字、白色文字、灰文字などの様々な種類の文字が含まれている場合であっても、この多値画像Im1から文字を高精度に検出して、多値画像Im1を文字画像Im3と背景画像Im4とに精度よく分離することができる。 However, in the image processing apparatus 1 of the present embodiment, the character edge detection result by the first detection unit 11 is removed from the character edge detection result 1201 by the first detection unit 11, and then the character area detection result by the second detection unit 13 is removed. The character image Im3 is generated by integrating with 1202 and extracting the image area indicated by the integrated detection result from the multi-valued image Im1. Then, the difference between the character image Im3 and the multi-valued image Im1 is generated as the background image Im4. Therefore, as shown in the example of FIG. 12, even when the multi-valued image Im1 to be processed includes various types of characters such as bold characters, ground characters, white characters, and gray characters, A character can be detected from the multi-valued image Im1 with high accuracy, and the multi-valued image Im1 can be accurately separated into the character image Im3 and the background image Im4.

<第1変形例>
なお、以上説明した第1実施形態においては、第2の検出部13が文字行の抽出を行う際に、小文字と推定される連結成分を除去した上で残った連結成分を文字行として統合するようにしている。しかし、このような小文字と推定される連結成分を除去することなく、取得されたすべての連結成分を対象として、文字行への統合を行うように構成してもよい。この場合、小文字と推定される連結成分を除去する場合と比べて第2の検出部13による処理負荷は増大するが、多値画像Im1に含まれる小文字をより精度よく検出することが可能になる。
<First Modification>
In the first embodiment described above, when the second detection unit 13 extracts character lines, the connected components that are estimated to be lowercase letters are removed and the remaining connected components are integrated as character lines. I am trying. However, all the acquired connected components may be integrated into a character line without removing such connected components estimated to be lowercase. In this case, the processing load on the second detection unit 13 is increased as compared with the case of removing the connected component estimated to be the lowercase character, but the lowercase character included in the multi-valued image Im1 can be detected more accurately. ..

<第2変形例>
また、上述した第1実施形態においては、分離部14が、第1の検出部11による文字エッジ検出結果から色地上文字や白色文字のエッジ部分を除去した上で第2の検出部13による文字領域検出結果1202と統合するようにしている。しかし、このような色地上文字や白色文字のエッジ部分の除去を行わずに、文字エッジ検出結果と文字領域検出結果との統合を行うように構成してもよい。この場合、統合した検出結果に第1の検出部11による誤検出の影響が残る可能性があるが、分離部14での処理負荷を軽減して処理時間の短縮を図ることができる。
<Second Modification>
Further, in the above-described first embodiment, the separating unit 14 removes the edge portions of the ground character and the white character from the character edge detection result by the first detecting unit 11, and then the character by the second detecting unit 13. The area detection result 1202 is integrated. However, the character edge detection result and the character area detection result may be integrated without removing the edge portion of the color ground character or the white character. In this case, there is a possibility that the integrated detection result may be affected by the erroneous detection by the first detection unit 11, but the processing load on the separation unit 14 can be reduced and the processing time can be shortened.

<第3変形例>
また、上述した第1実施形態においては、第1の検出部11による文字エッジ検出結果を、エッジ強調部12によるエッジ強調画像Im2の生成と、分離部14による文字画像Im3の生成との双方に用いるようにしている。しかし、第1の検出部11による文字エッジ検出結果をエッジ強調画像Im2の生成のみに用い、文字画像Im3の生成には用いないように構成してもよい。
<Third Modification>
Further, in the above-described first embodiment, the character edge detection result by the first detection unit 11 is used for both the generation of the edge emphasized image Im2 by the edge emphasis unit 12 and the generation of the character image Im3 by the separation unit 14. I am trying to use it. However, the character edge detection result by the first detection unit 11 may be used only for generating the edge-enhanced image Im2 and not for generating the character image Im3.

図13は、本変形例の画像処理装置1’の機能的な構成例を示すブロック図である。図13に示すように、本変形例の画像処理装置1’では、第1の検出部11による文字エッジ検出結果がエッジ強調部12にのみ入力され、分離部14には入力されない。したがって、分離部14は、第1の検出部11による文字エッジ検出結果と第2の検出部13による文字領域検出結果との統合は行わず、第2の検出部13による文字領域検出結果が示す画像領域を多値画像Im1から抽出することで、文字画像Im3を生成する。 FIG. 13 is a block diagram showing a functional configuration example of the image processing apparatus 1 ′ of this modification. As shown in FIG. 13, in the image processing apparatus 1 ′ of this modification, the character edge detection result by the first detection unit 11 is input only to the edge emphasis unit 12 and not to the separation unit 14. Therefore, the separation unit 14 does not integrate the character edge detection result by the first detection unit 11 and the character area detection result by the second detection unit 13, and the character area detection result by the second detection unit 13 indicates. The character image Im3 is generated by extracting the image area from the multi-valued image Im1.

本変形例のように、分離部14が第2の検出部13による文字領域検出結果のみを用いて文字画像Im3を生成する構成であっても、第2の検出部13による文字領域の検出は、第1の検出部11による文字エッジ検出結果を用いてエッジ強調部12が生成するエッジ強調画像Im2を対象として行われるため、文字領域を精度よく検出することができ、多値画像Im1を文字画像Im3と背景画像Im4とに精度よく分離することができる。 Even if the separation unit 14 generates the character image Im3 using only the character area detection result by the second detection unit 13 as in the present modification, the second detection unit 13 does not detect the character area. , The edge emphasized image Im2 generated by the edge emphasizing unit 12 using the character edge detection result by the first detecting unit 11 is targeted, so that the character area can be accurately detected, and the multi-valued image Im1 can be detected. The image Im3 and the background image Im4 can be accurately separated.

<第4変形例>
また、上述した第1実施形態においては、第1の検出部11による文字エッジ検出結果を、エッジ強調部12によるエッジ強調画像Im2の生成と、分離部14による文字画像Im3の生成との双方に用いるようにしている。しかし、第1の検出部11による文字エッジ検出結果を文字画像Im3の生成のみに用い、エッジ強調画像Im2の生成は行わないように構成してもよい。
<Fourth Modification>
Further, in the above-described first embodiment, the character edge detection result by the first detection unit 11 is used for both the generation of the edge emphasized image Im2 by the edge emphasis unit 12 and the generation of the character image Im3 by the separation unit 14. I am trying to use it. However, the character edge detection result by the first detection unit 11 may be used only for generating the character image Im3, and the edge emphasized image Im2 may not be generated.

図14は、本変形例の画像処理装置1’’の機能的な構成例を示すブロック図である。図14に示すように、本変形例の画像処理装置1’’では、エッジ強調部12が設けられておらず、第1の検出部11による文字エッジ検出結果が分離部14のみに入力される。したがって、第2の検出部13は、上述した実施形態のようにエッジ強調画像Im2を対象として文字領域を検出する処理を行うのではなく、多値画像Im1を対象として文字領域を検出する処理を行う。 FIG. 14 is a block diagram showing a functional configuration example of the image processing apparatus 1 ″ of this modification. As shown in FIG. 14, in the image processing apparatus 1 ″ of this modification, the edge enhancement unit 12 is not provided, and the character edge detection result by the first detection unit 11 is input only to the separation unit 14. .. Therefore, the second detection unit 13 does not perform the process of detecting the character region for the edge-enhanced image Im2 as in the above-described embodiment, but performs the process of detecting the character region for the multi-valued image Im1. To do.

本変形例のように、第2の検出部13が多値画像Im1を対象として文字領域を検出する処理を行う構成であっても、分離部14において第1の検出部11による文字エッジ検出結果と第2の検出部13による文字領域検出結果とが統合され、統合された検出結果を用いて多値画像Im1に含まれる文字領域が最終的に特定されるので、多値画像Im1を文字画像Im3と背景画像Im4とに精度よく分離することができる。 Even if the second detection unit 13 is configured to detect the character region for the multi-valued image Im1 as in this modification, the character edge detection result by the first detection unit 11 in the separation unit 14 is detected. And the character area detection result of the second detection unit 13 are integrated, and the character area included in the multi-valued image Im1 is finally specified using the integrated detection result. Im3 and the background image Im4 can be accurately separated.

<補足説明>
上述した第1実施形態および変形例において説明した画像処理装置1の機能的な構成要素(第1の検出部11、エッジ強調部12、第2の検出部13、分離部14およびファイル生成部15)は、上述したように、例えば図1に示したハードウェアとソフトウェア(プログラム)との協働により実現することができる。この場合、上記プログラムは、画像処理装置1にインストール可能な形式または実行可能な形式のファイルでCD−ROM、フレキシブルディスク(FD)、CD−R、DVDなどのコンピュータで読み取り可能な記録媒体に記録して提供される。また、上記プログラムを、インターネットなどのネットワークに接続されたコンピュータ上に格納し、ネットワーク経由で画像処理装置1にダウンロードさせることにより提供するように構成してもよい。さらに、上記プログラムを、インターネットなどのネットワーク経由で提供または配布するように構成してもよい。また、上記プログラムを、例えば画像処理装置1内のROM103やHDD104などに予め組み込んで提供するようにしてもよい。
<Supplementary explanation>
Functional components of the image processing apparatus 1 described in the above-described first embodiment and modification (first detection unit 11, edge enhancement unit 12, second detection unit 13, separation unit 14, and file generation unit 15). ) Can be realized by the cooperation of the hardware and software (program) shown in FIG. 1, for example, as described above. In this case, the program is recorded in a computer-readable recording medium such as a CD-ROM, a flexible disk (FD), a CD-R, or a DVD as a file in a format installable or executable in the image processing apparatus 1. Will be provided. Further, the program may be stored in a computer connected to a network such as the Internet and provided by being downloaded to the image processing apparatus 1 via the network. Furthermore, the above program may be configured to be provided or distributed via a network such as the Internet. Further, the above program may be provided by being previously incorporated in the ROM 103, the HDD 104, or the like in the image processing apparatus 1, for example.

また、上述した第1実施形態および変形例において説明した画像処理装置1の機能的な構成要素は、その一部または全部を、例えばASIC(Application Specific Integrated Circuit)やFPGA(Field-Programmable Gate Array)などの専用のハードウェアを用いて実現することもできる。 In addition, some or all of the functional components of the image processing apparatus 1 described in the above-described first embodiment and modified example are, for example, ASIC (Application Specific Integrated Circuit) and FPGA (Field-Programmable Gate Array). It can also be realized by using dedicated hardware such as.

また、上述した第1実施形態および変形例では、画像処理装置1を単体の装置として実現する例を想定したが、画像処理装置1の機能的な構成要素を物理的に分離した複数の装置に分散して設け、これら複数の装置の連携により、画像処理装置1としての動作が実現されるように構成してもよい。 Further, in the above-described first embodiment and modified example, an example in which the image processing device 1 is realized as a single device is assumed, but the functional components of the image processing device 1 may be physically separated into a plurality of devices. The image processing apparatus 1 may be provided in a distributed manner and the operation of the image processing apparatus 1 may be realized by cooperation of these plural apparatuses.

[第2実施形態]
次に、第2実施形態について説明する。本実施形態は、大局的な分析により文字領域を検出する第2の検出部13による処理を実行するか否かを、ユーザにより選択された動作モードに応じて切り替え可能とした例である。本実施形態では、上述の画像処理装置としての機能を、複合機(MFP:Multifunction Peripheral/Printer)において実現した例を挙げる。この複合機では、局所的な分析により文字のエッジを検出する第1の検出部11がASICなどのハードウェア実装により実現され、大局的な分析により文字領域を検出する第2の検出部13がソフトウェア実装により実現されているものとする。
[Second Embodiment]
Next, a second embodiment will be described. The present embodiment is an example in which whether or not to execute the process by the second detection unit 13 that detects the character region by the global analysis can be switched according to the operation mode selected by the user. In the present embodiment, an example in which the above-described function as the image processing apparatus is realized in a multifunction peripheral (MFP) is given. In this multi-function peripheral, the first detection unit 11 that detects the edge of the character by local analysis is realized by hardware implementation such as ASIC, and the second detection unit 13 that detects the character region by global analysis is used. It shall be realized by software implementation.

上述した第1実施形態では、第1の検出部11による処理と第2の検出部13による処理とを組み合わせることで、処理対象の多値画像Im1から文字を高精度に検出し、多値画像Im1を文字画像Im3と背景画像Im4とに分離する際の分離性能を高めている。この方法は、文字画質を重視するユーザからは高い満足度が得られる反面、処理に要する時間が比較的長くなるため、生産性を重視するユーザにとっては不満の残るものとなる懸念がある。特に、大局的な分析により文字領域を検出する第2の検出部13はハードウェア実装が難しく、ソフトウェア実装により実現されるのが一般的である。このため、第2の検出部13の処理には比較的長い時間を要することとなり、生産性を重視するユーザが不満を抱く要因となる。 In the above-described first embodiment, by combining the processing by the first detection unit 11 and the processing by the second detection unit 13, a character is detected with high accuracy from the multivalued image Im1 to be processed, and the multivalued image is obtained. Separation performance is improved when Im1 is separated into the character image Im3 and the background image Im4. Although this method provides a high degree of satisfaction to users who place importance on character image quality, it takes a relatively long time to perform processing, which may cause dissatisfaction to users who place importance on productivity. In particular, it is difficult to mount the second detection unit 13 that detects the character region by the global analysis in hardware, and it is generally realized by software. For this reason, the processing of the second detection unit 13 requires a relatively long time, which causes a user who attaches importance to productivity to be dissatisfied.

そこで、本実施形態では、例えば「標準モード」と「文字優先モード」(あるいは「絵柄優先モード」と「文字優先モード」)といったように、ユーザが選択可能な動作モードを用意する。そして、ユーザにより選択された動作モードに応じて、第2の検出部13による処理を実行するか否か、つまり、第2の検出部13をアクティブにするかノンアクティブにするかを切り替えるようにしている。上記の例では、ユーザにより「標準モード」が選択された場合は第2の検出部13がノンアクティブとされ、ユーザにより「文字優先モード」が選択された場合は第2の検出部13がアクティブとされる。 Therefore, in the present embodiment, operation modes selectable by the user, such as “standard mode” and “character priority mode” (or “picture priority mode” and “character priority mode”), are prepared. Then, according to the operation mode selected by the user, whether to execute the process by the second detection unit 13, that is, whether to activate or deactivate the second detection unit 13 is switched. ing. In the above example, when the “standard mode” is selected by the user, the second detection unit 13 is inactive, and when the “character priority mode” is selected by the user, the second detection unit 13 is active. It is said that

なお、第1の検出部11はハードウェア実装されるため高速処理が可能である。このため、ユーザにより選択された動作モードに関わらず、第1の検出部11による処理は常に実行されるものとする。上記の例では、ユーザにより「標準モード」が選択された場合は第1の検出部11がアクティブ、第2の検出部13がノンアクティブとされ、ユーザにより「文字優先モード」が選択された場合は第1の検出部11と第2の検出部13の双方がアクティブとされる。 Since the first detection unit 11 is implemented by hardware, high speed processing is possible. Therefore, regardless of the operation mode selected by the user, the processing by the first detection unit 11 is always executed. In the above example, when the "standard mode" is selected by the user, the first detection unit 11 is active, the second detection unit 13 is inactive, and the "character priority mode" is selected by the user. Both the first detection unit 11 and the second detection unit 13 are activated.

図15は、本実施形態の複合機200のハードウェア構成例を示すブロック図である。本実施形態の複合機200は、例えば図15に示すように、コントローラ210と、オペレーションパネル220と、FCU(Facsimile Control Unit)230と、USB(Universal Serial Bus)デバイス240と、MLB(Media Link Board)250と、スキャナエンジン260と、プロッタエンジン270とを備える。 FIG. 15 is a block diagram showing an example of the hardware configuration of the multifunction machine 200 of this embodiment. As shown in, for example, FIG. 15, the multifunction device 200 of the present embodiment includes a controller 210, an operation panel 220, an FCU (Facsimile Control Unit) 230, a USB (Universal Serial Bus) device 240, and an MLB (Media Link Board). ) 250, a scanner engine 260, and a plotter engine 270.

オペレーションパネル220は、複合機200を使用するユーザが各種の設定入力を行ったり、ユーザに提示する各種情報を表示したりするユーザインタフェースである。上述のユーザによる動作モードの選択は、例えば、このオペレーションパネル220を用いて行われる。 The operation panel 220 is a user interface that allows the user of the multifunction peripheral 200 to input various settings and display various information presented to the user. The above-described operation mode selection by the user is performed using the operation panel 220, for example.

FCU230は、複合機200のファクシミリ機能を制御する制御ユニットである。USBデバイス240は、USBにより複合機200に接続される機器である。MLB250は、画像データのフォーマット変換を行う変換ボードである。スキャナエンジン260は原稿の読み取りを行うエンジンであり、プロッタエンジン270は印刷を行うエンジンである。本実施形態では、スキャナエンジン260による原稿の読み取りによって、処理対象の多値画像Im1が取得されるものとする。 The FCU 230 is a control unit that controls the facsimile function of the multi function device 200. The USB device 240 is a device connected to the multifunction device 200 by USB. The MLB 250 is a conversion board that converts the format of image data. The scanner engine 260 is an engine for reading a document, and the plotter engine 270 is an engine for printing. In the present embodiment, it is assumed that the multi-valued image Im1 to be processed is acquired by reading the document with the scanner engine 260.

コントローラ210は、複合機200の動作を制御する制御装置である。コントローラ210は、図15に示すように、CPU211と、システムメモリ212と、HDD(Hard Disk Drive)213と、PHY214と、ASIC215とを含む。オペレーションパネル220は、コントローラ210のASIC215に接続されている。また、FCU230、USBデバイス240、MLB250、スキャナエンジン260およびプロッタエンジン270は、データ転送バス280を介してコントローラ210のASIC215に接続されている。 The controller 210 is a control device that controls the operation of the multifunction peripheral 200. As shown in FIG. 15, the controller 210 includes a CPU 211, a system memory 212, a HDD (Hard Disk Drive) 213, a PHY 214, and an ASIC 215. The operation panel 220 is connected to the ASIC 215 of the controller 210. Further, the FCU 230, the USB device 240, the MLB 250, the scanner engine 260, and the plotter engine 270 are connected to the ASIC 215 of the controller 210 via the data transfer bus 280.

本実施形態の複合機200では、上述の画像処理装置としての機能が、主にコントローラ210によって実現される。すなわち、図2に示した第1実施形態の画像処理装置1の機能的な構成要素のうち、第1の検出部11およびエッジ強調部12は、例えば、コントローラ210のASIC215により実現される。また、第2の検出部13、分離部14およびファイル生成部15は、例えば、コントローラ210のCPU211がシステムメモリ212を利用して所定のプログラム(ソフトウェア)を実行することにより実現される。 In the multifunction machine 200 of this embodiment, the function as the image processing apparatus described above is realized mainly by the controller 210. That is, of the functional components of the image processing apparatus 1 of the first embodiment shown in FIG. 2, the first detection unit 11 and the edge enhancement unit 12 are realized by, for example, the ASIC 215 of the controller 210. The second detection unit 13, the separation unit 14, and the file generation unit 15 are realized, for example, by the CPU 211 of the controller 210 executing a predetermined program (software) using the system memory 212.

図16は、本実施形態の複合機200の機能的な構成例を示すブロック図である。本実施形態の複合機200は、例えば図16に示すように、第1の処理部310と、第2の処理部320と、切り替え部330とを備える。 FIG. 16 is a block diagram showing an example of the functional configuration of the multifunction machine 200 of this embodiment. The multifunction device 200 of the present embodiment includes, for example, as shown in FIG. 16, a first processing unit 310, a second processing unit 320, and a switching unit 330.

第1の処理部310は、コントローラ210のASIC215により実現される機能モジュールであり、第1の検出部11およびエッジ強調部12を含む。第1の検出部11およびエッジ強調部12は、上述した第1実施形態と同様である。すなわち、第1の検出部11は、処理対象の多値画像Im1(本実施形態ではスキャナエンジン260の読み取り画像)に対して、例えば図4に示した処理を実行することにより、多値画像Im1に含まれる文字のエッジを検出する。また、エッジ強調部12は、第1の検出部11による文字エッジ検出結果を用いて多値画像Im1に含まれる文字のエッジを強調する処理を行って、エッジ強調画像Im2を生成する。 The first processing unit 310 is a functional module implemented by the ASIC 215 of the controller 210, and includes the first detection unit 11 and the edge enhancement unit 12. The first detection unit 11 and the edge enhancement unit 12 are the same as in the above-described first embodiment. That is, the first detection unit 11 executes, for example, the process shown in FIG. 4 on the multi-valued image Im1 to be processed (the image read by the scanner engine 260 in the present embodiment), so that the multi-valued image Im1. To detect the edges of the characters contained in. Further, the edge emphasizing unit 12 performs a process of emphasizing the edges of the characters included in the multi-valued image Im1 by using the character edge detection result of the first detecting unit 11 to generate the edge emphasizing image Im2.

第2の処理部320は、コントローラ210のCPU211がシステムメモリ212を利用して所定のプログラム(ソフトウェア)を実行することにより実現される機能モジュールであり、第2の検出部13、分離部14およびファイル生成部15を含む。第2の検出部13、分離部14およびファイル生成部15は、上述した第2実施形態と同様である。すなわち、第2の検出部13は、エッジ強調画像Im2に対して例えば図5に示した処理を実行することにより、処理対象の多値画像Im1に含まれる文字領域を検出する。また、分離部14は、第1の検出部11による文字エッジ検出結果と、第2の検出部13による文字領域検出結果とを用いて、例えば図7に示した処理を実行することにより、多値画像Im1を文字画像Im3と背景画像Im4とに分離する。また、ファイル生成部15は、分離部14により多値画像Im1から分離された文字画像Im3と背景画像Im4とを互いに異なる方式で圧縮した後に統合し、多値画像Im1に対応する高圧縮PDFファイルFImを生成する。 The second processing unit 320 is a functional module realized by the CPU 211 of the controller 210 executing a predetermined program (software) using the system memory 212, and includes the second detection unit 13, the separation unit 14, and the The file generation unit 15 is included. The second detection unit 13, the separation unit 14, and the file generation unit 15 are the same as those in the second embodiment described above. That is, the second detection unit 13 detects the character region included in the multi-valued image Im1 to be processed by executing, for example, the process shown in FIG. 5 on the edge-enhanced image Im2. Further, the separation unit 14 uses the character edge detection result by the first detection unit 11 and the character area detection result by the second detection unit 13 to execute the process shown in FIG. The value image Im1 is separated into a character image Im3 and a background image Im4. In addition, the file generation unit 15 compresses the character image Im3 and the background image Im4 separated from the multi-valued image Im1 by the separation unit 14 by different methods and then integrates them into a high compression PDF file corresponding to the multi-valued image Im1. Generate FIm.

ただし、本実施形態では、第2の検出部13による処理を実行するか否か、つまり、第2の検出部13をアクティブにするかノンアクティブにするかが、切り替え部330によって切り替えられる。そして、分離部14は、第2の検出部13がアクティブの場合は第1実施形態と同様の処理を行うが、第2の検出部13がノンアクティブの場合は、第1の検出部11による文字エッジ検出結果のみに基づいて、多値画像Im1を文字画像Im3と背景画像Im4とに分離する。 However, in the present embodiment, the switching unit 330 switches whether to execute the process by the second detection unit 13, that is, whether to activate or deactivate the second detection unit 13. Then, the separation unit 14 performs the same process as in the first embodiment when the second detection unit 13 is active, but when the second detection unit 13 is inactive, the separation unit 14 uses the first detection unit 11. The multi-valued image Im1 is separated into a character image Im3 and a background image Im4 based on only the character edge detection result.

第1の処理部310から第2の処理部320へのデータの受け渡しは、HDD213(記憶部)を介して行われる。すなわち、第1の処理部310から第2の処理部320へ受け渡すデータ(処理対象の多値画像Im1、エッジ強調部12により生成されたエッジ強調画像Im2および第1の検出部11による文字エッジ検出結果)は、HDD213に一旦格納される。そして、第2の処理部320の第2の検出部13および分離部14は、必要なデータをHDD213から随時読み出して上述の処理を行う。この際、HDD213の容量を有効利用するために、HDD213に格納するデータに対して任意の圧縮処理を行い、HDD213から圧縮データを読み出して復号処理を行う構成とする。 Data is transferred from the first processing unit 310 to the second processing unit 320 via the HDD 213 (storage unit). That is, the data to be passed from the first processing unit 310 to the second processing unit 320 (the multivalued image Im1 to be processed, the edge emphasized image Im2 generated by the edge emphasis unit 12 and the character edge by the first detection unit 11). The detection result) is temporarily stored in the HDD 213. Then, the second detection unit 13 and the separation unit 14 of the second processing unit 320 read necessary data from the HDD 213 as needed and perform the above-described processing. At this time, in order to effectively use the capacity of the HDD 213, an arbitrary compression process is performed on the data stored in the HDD 213, the compressed data is read from the HDD 213, and the decryption process is performed.

以上のように、HDD213を介して第1の処理部310から第2の処理部320へのデータの受け渡しを行うことにより、HDD213を、第1の処理部310の処理速度と第2の処理部320の処理速度との速度差を吸収するバッファとして機能させることができる。すなわち、ASIC215を用いたハードウェア実装により実現される第1の処理部310の処理速度と比較して、ソフトウェア実装により実現される第2の処理部320の処理速度は長くなる。このため、第1の処理部310の処理速度と第2の処理部320の処理速度との速度差を吸収するバッファがないと、例えば、多数ページからなる原稿をスキャナエンジン260で読み取って高圧縮PDFファイルFImを生成するジョブの実行時などに、先行するページに対する第2の処理部320の処理が終わるまで後続するページに対する第1の処理部310の処理を実行できない。その結果、スキャナエンジン260による原稿の読み取りに時間がかかり、複合機200の設置場所にユーザを長時間待機させることになる。これに対して、第1の処理部310の処理速度と第2の処理部320の処理速度との速度差をHDD213により吸収する構成とすることにより、スキャナエンジン260による原稿の読み取りを短時間で行って、ユーザを複合機200の設置場所から早期に解放することができる。 As described above, by passing the data from the first processing unit 310 to the second processing unit 320 via the HDD 213, the HDD 213 is transferred to the processing speed of the first processing unit 310 and the second processing unit 320. It can function as a buffer that absorbs the speed difference from the processing speed of 320. That is, the processing speed of the second processing unit 320 realized by software implementation becomes longer than the processing speed of the first processing unit 310 realized by hardware implementation using the ASIC 215. Therefore, if there is no buffer that absorbs the speed difference between the processing speed of the first processing unit 310 and the processing speed of the second processing unit 320, for example, a document having a large number of pages is read by the scanner engine 260 and highly compressed. When the job of generating the PDF file FIm is executed, the processing of the first processing unit 310 on the subsequent page cannot be executed until the processing of the second processing unit 320 on the preceding page is completed. As a result, it takes time to read the document by the scanner engine 260, which causes the user to wait for a long time at the installation location of the multifunction machine 200. On the other hand, by adopting a configuration in which the HDD 213 absorbs the speed difference between the processing speed of the first processing unit 310 and the processing speed of the second processing unit 320, the reading of the document by the scanner engine 260 can be performed in a short time. By doing so, the user can be released from the installation place of the multi function device 200 at an early stage.

切り替え部330は、ユーザにより選択された動作モードに応じて、第2の検出部13による処理を実行するか否か、つまり、第2の検出部13をアクティブにするかノンアクティブにするかを切り替える。ユーザによる動作モードの選択は、例えばオペレーションパネル220に表示される操作画面を通じて行われる。 The switching unit 330 determines whether to execute the process by the second detection unit 13 according to the operation mode selected by the user, that is, whether to activate or deactivate the second detection unit 13. Switch. The operation mode is selected by the user through, for example, an operation screen displayed on the operation panel 220.

図17は、ユーザによる動作モードの選択を受け付ける操作画面の一例を示す図である。この図17に示す操作画面170は、スキャナジョブの実行時にオペレーションパネル220に表示される画面であり、動作モード選択領域171に、ユーザがタッチ操作可能な「標準モード」ボタン172と「文字優先モード」ボタン173とが設けられている。この操作画面170上でユーザが「標準モード」ボタン172をタッチすると、動作モードとして「標準モード」を指定するモード選択信号がオペレーションパネル220から切り替え部330に伝達される。一方、操作画面170上でユーザが「文字優先モード」ボタン173をタッチすると、動作モードとして「文字優先モード」を指定するモード選択信号がオペレーションパネル220から切り替え部330に送られる。 FIG. 17 is a diagram showing an example of an operation screen for accepting the selection of the operation mode by the user. The operation screen 170 shown in FIG. 17 is a screen displayed on the operation panel 220 when a scanner job is executed. In the operation mode selection area 171, a “standard mode” button 172 and a “character priority mode” that can be touch-operated by the user are displayed. Button 173 is provided. When the user touches the “standard mode” button 172 on the operation screen 170, a mode selection signal designating the “standard mode” as the operation mode is transmitted from the operation panel 220 to the switching unit 330. On the other hand, when the user touches the “character priority mode” button 173 on the operation screen 170, a mode selection signal designating the “character priority mode” as the operation mode is sent from the operation panel 220 to the switching unit 330.

切り替え部330は、オペレーションパネル220から伝達されたモード選択信号に基づいて、ユーザにより選択された動作モードを判断する。そして、切り替え部330は、例えば、動作モードと文字検出動作との対応関係を定めた関係テーブルを参照して、第2の検出部13による処理を実行するか否かを決定する。 The switching unit 330 determines the operation mode selected by the user based on the mode selection signal transmitted from the operation panel 220. Then, the switching unit 330 determines whether or not to execute the process by the second detection unit 13 with reference to, for example, a relationship table that defines the correspondence relationship between the operation mode and the character detection operation.

図18は、動作モードと文字検出動作との対応関係を定めた関係テーブルの一例を示す図である。この図18に示す関係テーブルT1は、動作モードとして「標準モード」が選択された場合は第1の検出部11をアクティブ、第2の検出部13をノンアクティブとし、動作モードとして「文字優先モード」が選択された場合は、第1の検出部11と第2の検出部13の双方をアクティブとすることを示している。 FIG. 18 is a diagram showing an example of a relationship table that defines the correspondence relationship between operation modes and character detection operations. In the relation table T1 shown in FIG. 18, when the “standard mode” is selected as the operation mode, the first detection unit 11 is activated, the second detection unit 13 is set to non-active, and the operation mode is the “character priority mode”. Is selected, it indicates that both the first detection unit 11 and the second detection unit 13 are activated.

切り替え部330は、第2の検出部13による処理を実行すると決定した場合は、第2の処理部320に対して第2の検出部13をアクティブにする制御信号を送り、第2の検出部13による処理を実行しないと決定した場合は、第2の処理部320に対して第2の検出部13をノンアクティブにする制御信号を送る。これにより、ユーザにより選択された動作モードに応じて、第2の検出部13のアクティブ/ノンアクティブが切り替えられる。 When it is determined that the processing by the second detection unit 13 is to be executed, the switching unit 330 sends a control signal for activating the second detection unit 13 to the second processing unit 320, and the second detection unit If it is decided not to execute the processing by 13, the control signal for deactivating the second detection unit 13 is sent to the second processing unit 320. As a result, the active/non-active state of the second detection unit 13 is switched according to the operation mode selected by the user.

以上説明したように、本実施形態では、ユーザにより選択された動作モードに応じて、比較的処理時間のかかる第2の検出部13による処理を実行するか否かを切り替えるようにしている。したがって、本実施形態によれば、高圧縮PDFファイルFImを生成する際に両立が困難な処理速度(あるいは生産性)と文字の分離性能(あるいは文字部の高画質化)のどちらを優先するかを、ユーザの希望に沿って選択することができ、ユーザの不満を緩和することができる。 As described above, in the present embodiment, whether or not to execute the processing by the second detection unit 13 which requires a relatively long processing time is switched according to the operation mode selected by the user. Therefore, according to the present embodiment, which of the processing speed (or productivity) and the character separation performance (or the higher image quality of the character portion), which are difficult to achieve when generating the high compression PDF file FIm, is prioritized. Can be selected according to the user's wishes, and the user's dissatisfaction can be alleviated.

<第1変形例>
なお、上述した第2実施形態においては、動作モードとして「標準モード」が選択された場合に、第1の検出部11をアクティブ、第2の検出部13をノンアクティブとしているが、動作モードとして「標準モード」が選択された場合に、第1の検出部11と第2の検出部13の双方をノンアクティブとしてもよい。この場合は、多値画像Im1から文字が検出されないため分離部14による処理も実行されず、多値画像Im1に含まれる文字と背景とで圧縮方式は共通となる。
<First Modification>
In the second embodiment described above, when the “standard mode” is selected as the operation mode, the first detection unit 11 is active and the second detection unit 13 is non-active, but the operation mode is When the “standard mode” is selected, both the first detection unit 11 and the second detection unit 13 may be inactive. In this case, since the character is not detected from the multi-valued image Im1, the processing by the separating unit 14 is not executed, and the characters and the background included in the multi-valued image Im1 have the same compression method.

本変形例を実施するためには、例えばオペレーションパネル220を用いたユーザの所定操作などに応じて、例えば図18に示したような関係テーブルT1のうち、「標準モード」に対応する第1の検出部11の状態をアクティブからノンアクティブに変更すればよい。なお、このような関係テーブルT1の変更は、一般ユーザが行えるようにしてもよいし、例えば管理者などの特定のユーザのみが行えるようにしてもよい。 In order to carry out this modification, for example, in accordance with a predetermined operation of the user using the operation panel 220, for example, the first table corresponding to the “standard mode” in the relationship table T1 as shown in FIG. The state of the detection unit 11 may be changed from active to non-active. In addition, such a change of the relationship table T1 may be performed by a general user, or may be performed by only a specific user such as an administrator.

本変形例では、「標準モード」が選択された場合に、文字の画質が低下する懸念はあるものの、絵柄において文字ではない部分が文字と誤って検出されることがなくなる。このため、絵柄の画質を重視するユーザにとっては「標準モード」を選択することで、好ましい結果が得られることになる。 In this modified example, when the “standard mode” is selected, the image quality of the character may be degraded, but a portion other than the character in the pattern is not erroneously detected as the character. Therefore, for the user who attaches great importance to the image quality of the design, a preferable result can be obtained by selecting the “standard mode”.

<第2変形例>
また、上述した第2実施形態においては、動作モードに関わらず、HDD213に格納するデータの圧縮処理およびHDD213から読み出したデータの復号処理を行うようにしているが、動作モードとして「標準モード」が選択された場合はこのような圧縮/復号処理を行わない構成としてもよい。
<Second Modification>
Further, in the above-described second embodiment, the compression processing of the data stored in the HDD 213 and the decoding processing of the data read from the HDD 213 are performed regardless of the operation mode, but the “standard mode” is set as the operation mode. When selected, such a compression/decoding process may not be performed.

動作モードとして「標準モード」を選択するユーザは、文字の分離性能(あるいは文字部の高画質化)よりも、処理速度(あるいは生産性)や絵柄の画質を重視するユーザであることが想定される。HDD213に格納するデータの圧縮処理およびHDD213から読み出したデータの復号処理は、上述したように、HDD213の容量を有効利用する上で有用な処理ではあるが、処理速度(あるいは生産性)を重視するユーザにとっては、このような圧縮/復号処理による処理時間の増大が、不満の要因となる懸念がある。また、圧縮/復号処理の方式によっては絵柄の画質劣化を伴う場合もあり、絵柄の画質を重視するユーザに不満を抱かせる懸念がある。 It is assumed that the user who selects the "standard mode" as the operation mode is a user who attaches importance to the processing speed (or productivity) and the image quality of the picture rather than the character separation performance (or the high image quality of the character portion). It As described above, the compression processing of the data stored in the HDD 213 and the decoding processing of the data read from the HDD 213 are useful for effectively using the capacity of the HDD 213, but the processing speed (or productivity) is emphasized. For the user, the increase in processing time due to such compression/decoding processing may cause dissatisfaction. Further, depending on the compression/decoding processing method, the image quality of the design may be deteriorated, which may cause dissatisfaction to the user who attaches importance to the image quality of the design.

本変形例では、動作モードとして「標準モード」が選択された場合は、HDD213に格納するデータの圧縮処理およびHDD213から読み出したデータの復号処理を行わない構成とすることで、「標準モード」を選択するユーザの上述した不満を緩和することができる。また、動作モードとして「標準モード」が選択された場合は、HDD213に格納するデータの圧縮処理およびHDD213から読み出したデータの復号処理を行わないことに加え、あるいは、圧縮/復号処理を行わないことに代えて、HDD213に対するデータの格納や読み出しをページ単位で行うことも有効である。 In this modified example, when the “standard mode” is selected as the operation mode, the compression process of the data stored in the HDD 213 and the decryption process of the data read from the HDD 213 are not performed so that the “standard mode” is set. The above-mentioned dissatisfaction of the user who selects can be alleviated. Further, when the “standard mode” is selected as the operation mode, in addition to not performing the compression processing of the data stored in the HDD 213 and the decoding processing of the data read from the HDD 213, or not performing the compression/decoding processing. Instead of this, it is also effective to store and read data in the HDD 213 in page units.

<第3変形例>
また、上述した第2実施形態においては、ユーザにより選択された動作モードに応じて第2の検出部13による処理を実行するか否かを切り替えるようにしているが、動作モードに加えて処理速度をユーザが選択できるようにして、ユーザにより選択された動作モードと処理速度との組み合わせに応じて、第2の検出部13による処理を実行するか否かを切り替える構成としてもよい。
<Third Modification>
Further, in the above-described second embodiment, whether to execute the process by the second detection unit 13 is switched according to the operation mode selected by the user. However, in addition to the operation mode, the processing speed is changed. May be selected by the user, and whether or not to execute the process by the second detection unit 13 may be switched depending on the combination of the operation mode and the processing speed selected by the user.

図19は、動作モードの選択に加えて処理速度の選択を受け付ける操作画面の一例を示す図である。この図19に示す操作画面190は、図17に示した操作画面170に対して、動作モードごとに処理速度を選択できるチェックボックス191,192が追加された構成である。 FIG. 19 is a diagram showing an example of an operation screen for accepting the selection of the processing speed in addition to the selection of the operation mode. The operation screen 190 shown in FIG. 19 has a configuration in which check boxes 191, 192 for selecting the processing speed for each operation mode are added to the operation screen 170 shown in FIG.

この図19に示す操作画面190において、「標準モード」に対応するチェックボックス191はデフォルト設定では「中速」が選択された状態となっている。このデフォルト設定の状態でユーザが「標準モード」ボタン172をタッチして「標準モード」を選択すると、上述したように、第1の検出部11がアクティブで第2の検出部13がノンアクティブとなる。これに対し、ユーザが「標準モード」に対応するチェックボックス191で「低速」を選択し、「標準モード」ボタン172をタッチして「標準モード」を選択すると、例えば、第1の検出部11と第2の検出部13の双方がアクティブとなる。また、ユーザが「標準モード」に対応するチェックボックス191で「高速」を選択し、「標準モード」ボタン172をタッチして「標準モード」を選択すると、例えば、第1の検出部11と第2の検出部13の双方がノンアクティブとなる。 In the operation screen 190 shown in FIG. 19, the check box 191 corresponding to the "standard mode" is in a state where "medium speed" is selected by default. When the user touches the “standard mode” button 172 to select “standard mode” in the state of this default setting, as described above, the first detection unit 11 is active and the second detection unit 13 is non-active. Become. On the other hand, when the user selects “low speed” in the check box 191 corresponding to the “standard mode” and touches the “standard mode” button 172 to select “standard mode”, for example, the first detection unit 11 And the second detection unit 13 are both activated. When the user selects “high speed” in the check box 191 corresponding to the “standard mode” and touches the “standard mode” button 172 to select “standard mode”, for example, the first detection unit 11 and Both of the two detection units 13 become non-active.

また、図19に示す操作画面190において、「文字優先モード」に対応するチェックボックス192はデフォルト設定では「低速」が選択された状態となっている。このデフォルト設定の状態でユーザが「文字優先モード」ボタン173をタッチして「文字優先モード」を選択すると、上述したように、第1の検出部11と第2の検出部13の双方がアクティブとなる。これに対し、ユーザが「文字優先モード」に対応するチェックボックス192で「中速」を選択し、「文字優先モード」ボタン173をタッチして「文字優先モード」を選択すると、例えば、第1の検出部11がアクティブで第2の検出部13がノンアクティブとなる。また、ユーザが「文字優先モード」に対応するチェックボックス192で「高速」を選択し、「文字優先モード」ボタン173をタッチして「文字優先モード」を選択すると、例えば、第1の検出部11と第2の検出部13の双方がノンアクティブとなる。 Further, on the operation screen 190 shown in FIG. 19, the check box 192 corresponding to the “character priority mode” is in a state where “low speed” is selected by default. When the user touches the “character priority mode” button 173 and selects the “character priority mode” in the state of this default setting, as described above, both the first detection unit 11 and the second detection unit 13 are active. Becomes On the other hand, when the user selects “medium speed” in the check box 192 corresponding to the “character priority mode” and touches the “character priority mode” button 173 to select the “character priority mode”, for example, the first The detection unit 11 is active and the second detection unit 13 is non-active. When the user selects “high speed” in the check box 192 corresponding to the “character priority mode” and touches the “character priority mode” button 173 to select “character priority mode”, for example, the first detection unit Both 11 and the second detection unit 13 are non-active.

以上は、単純に、ユーザが選択する処理速度が「高速」であれば第1の検出部11と第2の検出部13の双方をノンアクティブとし、ユーザが選択する処理速度が「中速」であれば第1の検出部11をアクティブ、第2の検出部13をノンアクティブとし、ユーザが選択する処理速度が「低速」であれば第1の検出部11と第2の検出部13の双方をアクティブとする例である。しかし、動作モードと処理速度との組み合わせに対する文字検出動作の対応関係を定めた関係テーブルに従って、第1の検出部11と第2の検出部13のアクティブ/ノンアクティブを切り替えるようにしてもよい。 In the above, if the processing speed selected by the user is “high speed”, both the first detection unit 11 and the second detection unit 13 are made inactive, and the processing speed selected by the user is “medium speed”. If so, the first detection unit 11 is made active, the second detection unit 13 is made inactive, and if the processing speed selected by the user is “low speed”, the first detection unit 11 and the second detection unit 13 In this example, both are activated. However, the active/non-active state of the first detection unit 11 and the second detection unit 13 may be switched according to a relationship table that defines the correspondence relationship of the character detection operation with respect to the combination of the operation mode and the processing speed.

図20は、動作モードと処理速度との組み合わせに対する文字検出動作の対応関係を定めた関係テーブルの一例を示す図である。この図20に示す関係テーブルT2は、動作モードとして「標準モード」が選択され、処理速度として「低速」が選択された場合、処理速度として「中速」が選択された場合と同様に、第1の検出部11をアクティブ、第2の検出部13をノンアクティブとすることを示している。この例では、絵柄の画質を重視するユーザが「標準モード」を選択することを想定し、動作モードとして「標準モード」が選択され、処理速度として「低速」が選択された場合は、例えば絵柄の解像度を制御して絵柄先鋭度を高くする処理を行う。このため、第2の検出部13をノンアクティブとすることで文字の検出に要する時間は短縮されるが、トータルの処理時間は長くなる。 FIG. 20 is a diagram showing an example of a relationship table that defines the correspondence relationship of the character detection operation with respect to the combination of the operation mode and the processing speed. In the relationship table T2 shown in FIG. 20, when the "standard mode" is selected as the operation mode, the "low speed" is selected as the processing speed, and the "medium speed" is selected as the processing speed, It is shown that the first detector 11 is made active and the second detector 13 is made inactive. In this example, assuming that the user who attaches importance to the image quality of the pattern selects the “standard mode”, if the “standard mode” is selected as the operation mode and the “low speed” is selected as the processing speed, for example, The process of increasing the sharpness of the pattern by controlling the resolution of the. Therefore, by making the second detection unit 13 inactive, the time required for character detection is shortened, but the total processing time is lengthened.

また、図20に示す関係テーブルT2は、動作モードとして「文字優先モード」が選択され、処理速度として「高速」が選択された場合、処理速度として「中速」が選択された場合と同様に、第1の検出部11をアクティブ、第2の検出部13をノンアクティブとすることを示している。この例では、「文字優先モード」を選択するユーザは、高速といえども文字の画質をある程度は確保したいと望むことを想定し、動作モードとして「文字優先モード」が選択され、処理速度として「高速」が選択された場合は、第1の検出部11をアクティブにしてある程度の文字の画質を確保しつつ、例えば絵柄の解像度を低くすることにより処理速度の高速化を図り、トータルの処理時間を短くする。 Further, in the relationship table T2 shown in FIG. 20, when “character priority mode” is selected as the operation mode and “high speed” is selected as the processing speed, the same as when “medium speed” is selected as the processing speed. , The first detection unit 11 is made active, and the second detection unit 13 is made inactive. In this example, it is assumed that the user who selects the "character priority mode" wants to secure the image quality of the character to some extent even at a high speed, so that the "character priority mode" is selected as the operation mode and the "processing speed" is selected. When “high speed” is selected, the first detection unit 11 is activated to secure a certain character image quality, and the processing speed is increased by lowering the resolution of the pattern, for example, to reduce the total processing time. To shorten.

本変形例では、ユーザにより選択された動作モードと処理速度との組み合わせに応じて、第2の検出部13による処理を実行するか否かを切り替える構成としているので、ユーザの意向をより忠実に反映させた処理が可能となる。 In the present modification, whether or not to execute the process by the second detection unit 13 is switched according to the combination of the operation mode selected by the user and the processing speed, so that the intention of the user is more faithful. The reflected processing becomes possible.

<その他の変形例>
上述した第1実施形態の第1変形例乃至第4変形例は、第2実施形態においても適用可能である。
<Other modifications>
The first to fourth modified examples of the first embodiment described above are also applicable to the second embodiment.

[第3実施形態]
次に、第3実施形態について説明する。本実施形態は、第2実施形態と同様に、上述の画像処理装置としての機能を複合機において実現した例であり、スキャナエンジン260の読み取り画像を処理対象の多値画像Im1とする。ただし、本実施形態では、スキャナエンジン260の読み取り画像を元に高圧縮PDFファイルFImを生成する用途(以下、この用途で画像処理を行う場合を「ファイル生成時」と呼ぶ)だけでなく、スキャナエンジン260の読み取り画像を元にプロッタエンジン270(図15参照)がカラー画像を記録媒体に記録する用途(以下、この用途で画像処理を行う場合を「コピー再生時」と呼ぶ)も想定する。そして、本実施形態では、ファイル生成時とコピー再生時とで、第1の検出部11による処理を切り替えるようにしている。ファイル生成時かコピー再生時かの判断は、例えば、ユーザがオペレーションパネル220を用いてジョブの設定を行うことで出力されるジョブ設定信号に基づいて判断できる。
[Third Embodiment]
Next, a third embodiment will be described. Similar to the second embodiment, the present embodiment is an example in which the function as the above-described image processing apparatus is realized in a multifunction machine, and the image read by the scanner engine 260 is the multivalued image Im1 to be processed. However, in the present embodiment, not only the purpose of generating the high compression PDF file FIm based on the image read by the scanner engine 260 (hereinafter, the case of performing image processing for this purpose is referred to as “during file generation”), but also the scanner It is also assumed that the plotter engine 270 (see FIG. 15) records a color image on a recording medium based on the image read by the engine 260 (hereinafter, the case where image processing is performed for this purpose is referred to as “during reproduction”). Then, in the present embodiment, the processing by the first detection unit 11 is switched between the time of file generation and the time of copy reproduction. Whether the file is generated or the copy is reproduced can be determined based on, for example, a job setting signal output when the user sets a job using the operation panel 220.

第1の検出部11は、上述したように、処理対象の多値画像Im1を3値化することによって得られる黒画素や白画素の連続性、パターンを利用して、文字を構成するエッジを検出する。したがって、第1の検出部11によるエッジの検出精度は、多値画像Im1を3値化する際に用いる閾値によって制御できる。ここで、ファイル生成時には、上述したように、多値画像Im1に含まれる灰文字などの低コントラスト文字のエッジも適切に検出できるようにするために、3値化の閾値として、エッジの検出精度が高くなる閾値を設定することが望まれる。一方、コピー再生時には、ファイル生成時と同じ閾値を用いて多値画像Im1を3値化すると、画質の観点から絵柄として扱う方が望ましい部分も文字のエッジとして検出される問題がある。例えば、コピー再生時には黒文字の領域を黒(K)単色で再生するが、新聞の文字のように比較的濃度の高い背景の中の文字を黒単色で再生すると、文字周辺の背景とのギャップが大きくなり、画質劣化の要因となる。また、絵柄の中には局所的にコントラストが非常に高いエッジ部分は少ないものの、低コントラストのエッジ部分は多く存在する。このため、コピー再生時にファイル生成時と同じ閾値を用いて多値画像Im1を3値化すると、画質劣化の要因となる。 As described above, the first detection unit 11 uses the continuity and the pattern of black pixels and white pixels obtained by ternarizing the multivalued image Im1 to be processed to detect the edges that form a character. To detect. Therefore, the accuracy of edge detection by the first detection unit 11 can be controlled by the threshold value used when the multi-valued image Im1 is ternarized. Here, at the time of generating the file, as described above, in order to appropriately detect the edge of the low-contrast character such as the gray character included in the multi-valued image Im1, the threshold of the ternarization is used as the edge detection accuracy. It is desirable to set a threshold value at which On the other hand, at the time of copy reproduction, if the multi-valued image Im1 is ternarized using the same threshold value as that at the time of file generation, there is a problem that a portion that should be treated as a pattern from the viewpoint of image quality is also detected as a character edge. For example, when reproducing a copy, the area of black characters is reproduced in black (K) single color, but when the characters in a background with a relatively high density such as newspaper characters are reproduced in black single color, a gap with the background around the characters is generated. It becomes large and causes deterioration of image quality. Further, although there are few edge portions having extremely high contrast locally in the pattern, many edge portions having low contrast exist. For this reason, when the multi-valued image Im1 is ternarized using the same threshold value as that at the time of file generation during copy reproduction, it becomes a factor of image quality deterioration.

そこで、本実施形態では、第1の検出部11による処理の切り替えの一例として、多値画像Im1を3値化する際に用いる閾値をファイル生成時とコピー再生時とで切り替えることにより、ファイル生成時には第1の検出部11によるエッジ検出精度をコピー生成時よりも高くし、コピー再生時には第1の検出部11によるエッジ検出精度をファイル生成時よりも低くするようにしている。つまり、ファイル生成時にはエッジを検出し易くなるように3値化の閾値を設定し、コピー再生時にはファイル生成時と比較してエッジを検出しにくくなるように3値化の閾値を設定する。これにより、3値化の閾値を固定とした場合にはトレードオフの関係となるファイル生成時の効率的な圧縮と、コピー再生時の高画質化とを両立させることができる。 Therefore, in the present embodiment, as an example of switching the processing by the first detection unit 11, the threshold used when the multi-valued image Im1 is ternarized is switched between the file generation and the copy reproduction to thereby generate the file. At times, the edge detection accuracy of the first detection unit 11 is set higher than that at the time of copy generation, and at the time of copy reproduction, the edge detection accuracy of the first detection unit 11 is set lower than that at the time of file generation. That is, the threshold for ternarization is set so that the edge can be easily detected when the file is generated, and the threshold for ternarization is set so that the edge is less likely to be detected when the copy is reproduced as compared with the time when the file is generated. As a result, when the threshold for ternarization is fixed, it is possible to achieve both efficient compression at the time of file generation, which is in a trade-off relationship, and high image quality at the time of copy reproduction.

また、本実施形態では、コピー再生時での処理を考慮して、第1の検出部11の構成が上述の第1実施形態や第2実施形態とは若干異なる。すなわち、本実施形態における第1の検出部11は、上述の第1実施形態や第2実施形態と同様の方法によるエッジ検出に加えて、注目画素が白背景画素であるかの判定と、注目画素が網点を構成する画素であるかの判定とを行い、これらの判定結果を総合的に判断することにより、処理対象の多値画像Im1から文字のエッジを検出する。また、本実施形態では、第1の検出部11による処理と併せて、注目画素が有彩ブロックの画素か無彩ブロックの画素かの判定(色判定)も行う。そして、コピー再生時には、これら第1の検出部11の判定結果と色判定の結果とに基づいて、処理対象の多値画像Im1をプロッタエンジン270が処理できる画像信号に変換する処理が行われる。 Further, in the present embodiment, the configuration of the first detection unit 11 is slightly different from the above-described first and second embodiments in consideration of the processing at the time of copy reproduction. That is, in addition to the edge detection by the same method as in the above-described first and second embodiments, the first detection unit 11 in the present embodiment determines whether the target pixel is a white background pixel, and It is determined whether the pixel is a pixel forming a halftone dot, and the determination result is comprehensively determined to detect the edge of the character from the multivalued image Im1 to be processed. In addition, in the present embodiment, in addition to the processing by the first detection unit 11, it is also determined (color determination) whether the target pixel is a chromatic block pixel or an achromatic block pixel. Then, at the time of copy reproduction, a process of converting the multivalued image Im1 to be processed into an image signal that can be processed by the plotter engine 270 is performed based on the determination result of the first detection unit 11 and the color determination result.

以下、本実施形態の複合機の構成例について説明する。なお、以下では、上述の第1実施形態や第2実施形態と共通もしくは対応する構成要素には同一の符号を付し、重複した説明を適宜省略する。また、本実施形態の複合機のハードウェア構成は、上述の第2実施形態の複合機200と同様の構成(図15参照)をそのまま採用できるため、説明を省略する。 Hereinafter, a configuration example of the multifunction peripheral of this embodiment will be described. Note that, in the following, constituent elements that are common or correspond to those of the above-described first and second embodiments will be denoted by the same reference numerals, and redundant description will be omitted as appropriate. The hardware configuration of the multi-function peripheral of this embodiment can be the same as that of the multi-function peripheral 200 of the above-described second embodiment (see FIG. 15), and the description thereof will be omitted.

図21は、本実施形態の複合機200Aの機能的な構成例を示すブロック図である。本実施形態の複合機200Aでは、図21に示すように、第1の処理部310が、第1の検出部11とエッジ強調部12に加えて、ガンマ補正部311と、色判定部312と、データインタフェース部313と、色処理/UCR部314と、プリンタ補正部315とを備える。 FIG. 21 is a block diagram showing a functional configuration example of the multifunction peripheral 200A of this embodiment. In the multifunction machine 200A of the present embodiment, as shown in FIG. 21, the first processing unit 310 includes a gamma correction unit 311 and a color determination unit 312 in addition to the first detection unit 11 and the edge enhancement unit 12. A data interface unit 313, a color processing/UCR unit 314, and a printer correction unit 315 are provided.

ガンマ補正部311は、処理対象の多値画像Im1(スキャナエンジン260の読み取り画像)に対し、色ごとの階調バランスを整えるために各色信号に一次変換処理(ガンマ補正)を施す。本実施形態では、処理対象の多値画像Im1がRGB各色8ビットで表現されるRGB画像信号であり、ガンマ補正部311による変換後の信号は濃度リニア(白が信号値0)のRGB画像信号であるものとする。ガンマ補正部311によってガンマ補正が施された多値画像Im1は、第1の検出部11、エッジ強調部12、色判定部312およびデータインタフェース部313に送られる。 The gamma correction unit 311 performs a primary conversion process (gamma correction) on each color signal in order to adjust the gradation balance for each color of the multi-valued image Im1 to be processed (the image read by the scanner engine 260). In the present embodiment, the multivalued image Im1 to be processed is an RGB image signal represented by 8 bits for each RGB color, and the signal after conversion by the gamma correction unit 311 is a density linear (white is a signal value 0) RGB image signal. Shall be The multi-valued image Im1 that has been gamma-corrected by the gamma correction unit 311 is sent to the first detection unit 11, the edge enhancement unit 12, the color determination unit 312, and the data interface unit 313.

図22は、本実施形態における第1の検出部11の構成例を示すブロック図である。本実施形態における第1の検出部11は、図22に示すように、エッジ検出回路401と、白背景検出回路402と、網点検出回路403と、総合判定回路404とを備える。 FIG. 22 is a block diagram showing a configuration example of the first detection unit 11 in this embodiment. As shown in FIG. 22, the first detection unit 11 in this embodiment includes an edge detection circuit 401, a white background detection circuit 402, a halftone dot detection circuit 403, and a comprehensive determination circuit 404.

エッジ検出回路401は、上述の第1実施形態や第2実施形態における第1の検出部11と同様の方法により、ガンマ補正後の多値画像Im1から文字のエッジを検出する。すなわち、エッジ検出回路401は、ガンマ補正後の多値画像Im1(濃度リニア)を2つの閾値(th_wとth_b:th_w<th_b)で3値化することにより、黒画素、白画素、灰色画素に分ける。そして、黒連結画素や白連結画素のパターンマッチングにより多値画像Im1から黒線画や白線画を抽出することで、多値画像Im1に含まれる文字のエッジを検出する。 The edge detection circuit 401 detects a character edge from the gamma-corrected multivalued image Im1 by the same method as the first detection unit 11 in the above-described first and second embodiments. That is, the edge detection circuit 401 ternarizes the multi-valued image Im1 (density linear) after gamma correction with two threshold values (th_w and th_b: th_w<th_b) to convert it into a black pixel, a white pixel, and a gray pixel. Divide. Then, by extracting a black line drawing or a white line drawing from the multi-valued image Im1 by pattern matching of the black connected pixels or the white connected pixels, the edge of the character included in the multi-valued image Im1 is detected.

このとき、エッジ検出回路401は、オペレーションパネル220から入力されるジョブ設定信号Yに基づき、ファイル生成時かコピー再生時かを判断する。そして、エッジ検出回路401は、ファイル生成時とコピー再生時とで、ガンマ補正後の多値画像Im1を3値化する際に用いる閾値th_w,th_bを切り替える。例えば、コピー再生時に用いる高濃度側の閾値th_bをth_b0、ファイル生成時に用いる高濃度側の閾値th_bをth_b1としたときに、th_b1<th_b0となるように、高濃度側の閾値th_bを切り替える。これにより、ファイル生成時には低コントラストのエッジを文字のエッジとして検出し易くなり、コピー再生時には低コントラストのエッジを文字のエッジとして検出しにくくなる。また、コピー再生時に用いる低濃度側の閾値th_wをth_w0、ファイル生成時に用いる低濃度側の閾値th_wをth_w1としたときに、th_w1>th_w0となるように、低濃度側の閾値th_wを切り替える。これにより、ファイル生成時には濃度が比較的高い背景の中のエッジを文字のエッジとして検出し易くなり、コピー再生時には濃度が比較的高い背景の中のエッジを文字のエッジとして検出しにくくなる。なお、3値化の閾値th_w,th_bの切り替えは、高濃度側の閾値th_bと低濃度側の閾値th_wのいずれか一方のみで行うようにしてもよいし、双方で行うようにしてもよい。 At this time, the edge detection circuit 401 determines based on the job setting signal Y input from the operation panel 220 whether the file is generated or the copy is reproduced. Then, the edge detection circuit 401 switches the threshold values th_w and th_b used for ternarizing the multi-valued image Im1 after gamma correction between the file generation and the copy reproduction. For example, when the high density threshold th_b used during copy reproduction is th_b0 and the high density threshold th_b used during file generation is th_b1, the high density threshold th_b is switched so that th_b1<th_b0. As a result, it becomes easier to detect a low-contrast edge as a character edge during file generation, and it becomes difficult to detect a low-contrast edge as a character edge during copy reproduction. Further, when the low density threshold th_w used during copy reproduction is th_w0 and the low density threshold th_w used during file generation is th_w1, the low density threshold th_w is switched so that th_w1>th_w0. This makes it easier to detect an edge in the background having a relatively high density as a character edge during file generation, and makes it difficult to detect an edge in the background having a relatively high density as a character edge during copy reproduction. The threshold values th_w and th_b for ternarization may be switched by only one of the high-density threshold value th_b and the low-density threshold value th_w, or by both.

エッジ検出回路401は、以上の処理により多値画像Im1に含まれる文字のエッジを検出し、その結果を総合判定回路404に出力する。エッジ検出回路401の出力は1画素1ビットであり、検出された文字のエッジをアクティブとする。 The edge detection circuit 401 detects the edge of the character included in the multi-valued image Im1 by the above processing, and outputs the result to the comprehensive determination circuit 404. The output of the edge detection circuit 401 is 1 bit per pixel, and the edge of the detected character is activated.

白背景検出回路402は、ガンマ補正後の多値画像Im1に対して、白背景か非白背景かの判定を行い、その結果を総合判定回路404に出力する。白背景検出回路402は、例えば、ガンマ補正後の多値画像Im1を所定の閾値で2値化して白画素と黒画素に切り分けた後、注目画素の左右あるいは上下両方向に白画素が存在する場合に、白背景と判定する。このとき、左右上下の参照領域のサイズを制御することにより、所望の線幅以下の文字のエッジは白背景として判定し、所望の線幅を超える文字のエッジは非白背景として判定することができる。白背景検出回路402の出力は、白背景をアクティブとする。 The white background detection circuit 402 determines whether the multivalued image Im1 after gamma correction is a white background or a non-white background, and outputs the result to the comprehensive determination circuit 404. The white background detection circuit 402, for example, binarizes the multi-valued image Im1 after gamma correction into a white pixel and a black pixel by binarizing the multi-valued image Im1 and separates the white pixel and the black pixel from each other. Then, the white background is determined. At this time, by controlling the sizes of the reference regions on the left, right, top, and bottom, it is possible to determine the edges of the characters having the desired line width or less as the white background and the edges of the characters exceeding the desired line width as the non-white background. it can. The output of the white background detection circuit 402 activates the white background.

網点検出回路403は、ガンマ補正後の多値画像Im1の各画素に対して、網点判定(画像中の山/谷ピーク画素の繰り返しパターンにより判定)し、その結果を総合判定回路404に出力する。 The halftone dot detection circuit 403 performs halftone dot judgment (judgment based on a repeating pattern of peak/valley peak pixels in the image) for each pixel of the multivalued image Im1 after gamma correction, and the result is stored in the comprehensive judgment circuit 404. Output.

より詳細には、網点検出回路403は、ガンマ補正後の多値画像Im1の各画素に対して、予め定めたM×M画素からなるマトリックス、例えば、図23(a)〜(c)に示す如き3×3画素サイズのマトリックス(M=3)、4×4画素サイズのマトリックス(M=4)あるいは5×5画素サイズのマトリックス(M=5)を順次適用し、当該マトリックスの中心画素m(図23(a)〜(c)参照)が濃度変化の山または谷を示す極点であるか否かを周囲の画素m〜mとの濃度関係から検出する。加えて、網点検出回路403は、N×N画素(但し、N>M)からなるブロックB、例えば図24に示すような9×9画素サイズ(N=9)からなるブロックBを単位として画像を分割する。 More specifically, the halftone dot detection circuit 403, for each pixel of the multi-valued image Im1 after gamma correction, has a matrix of predetermined M×M pixels, for example, as shown in FIGS. A matrix of 3×3 pixel size (M=3), a matrix of 4×4 pixel size (M=4) or a matrix of 5×5 pixel size (M=5) as shown in FIG. m 0 (see FIG. 23 (a) ~ (c) ) for detecting whether or not a pole showing a peak or valley density changes from the concentration relationship between the surrounding pixels m 1 ~m i. In addition, the halftone dot detection circuit 403 uses the block B composed of N×N pixels (where N>M), for example, the block B composed of 9×9 pixel size (N=9) as shown in FIG. 24 as a unit. Divide the image.

そして、網点検出回路403は、ブロックごとに山を示す極点画素数と谷を示す極点画素数とをそれぞれ計数し、計数値の大きい側の極点画素数を当該ブロックの極点画素数として決定する。その後、網点検出回路403は、図25に示す注目ブロックBの極点画素数P0と、これを囲む上下左右斜めの各周囲ブロックB〜Bの各極点画素数Pとの関係から当該注目ブロックBの中心画素n(図24参照)、あるいは当該注目ブロックB内の全ての画素n〜n80が網点領域に属するか否かを判定する。網点検出回路403の出力は、網点領域をアクティブとする。 Then, the halftone dot detection circuit 403 counts the number of pole pixels indicating peaks and the number of pole pixels indicating valleys for each block, and determines the number of pole pixels on the side with the larger count value as the number of pole pixels of the block. .. Thereafter, halftone detection circuit 403, the the relationship between the pole number of pixels P0 of the target block B 0 shown in FIG. 25, each pole number of pixels P of the upper, lower, left and right diagonal of each surrounding blocks B 1 .about.B 8 surrounding the central pixel n 0 of the target block B 0 (see FIG. 24), or all of the pixels n 0 ~n 80 of the block of interest B within 0 determines whether belonging to the halftone dot region. The output of the halftone dot detection circuit 403 activates the halftone dot area.

総合判定回路404は、エッジ検出回路401の判定結果と、白背景検出回路402の判定結果と、網点検出回路403の判定結果とを総合的に判断して、注目画素が文字であるか否かを示す判定結果(文字/非文字[絵柄])X1を出力する。すなわち、総合判定回路404は、注目画素がエッジ検出回路401でアクティブ、白背景検出回路402でアクティブ、網点検出回路403でノンアクティブの場合に、注目画素を文字とする判定結果X1を出力する。ファイル生成時には、この総合判定回路404が出力する判定結果X1が、上述した第1実施形態および第2実施形態における文字エッジ検出結果に相当する。総合判定回路404が出力する判定結果X1は、エッジ強調部12およびデータインタフェース部313に送られる。なお、ファイル生成時は、総合判定回路404が出力する判定結果X1に代えて、エッジ検出結果401の出力を文字エッジ検出結果として利用する構成としてもよい。 The comprehensive determination circuit 404 comprehensively determines the determination result of the edge detection circuit 401, the determination result of the white background detection circuit 402, and the determination result of the halftone dot detection circuit 403 to determine whether or not the pixel of interest is a character. A determination result (character/non-character [pattern]) X1 indicating whether or not is output. That is, when the target pixel is active in the edge detection circuit 401, active in the white background detection circuit 402, and inactive in the halftone dot detection circuit 403, the comprehensive determination circuit 404 outputs a determination result X1 in which the target pixel is a character. .. When a file is generated, the determination result X1 output by the comprehensive determination circuit 404 corresponds to the character edge detection result in the above-described first and second embodiments. The determination result X1 output by the comprehensive determination circuit 404 is sent to the edge enhancement unit 12 and the data interface unit 313. Note that when generating a file, the output of the edge detection result 401 may be used as the character edge detection result instead of the determination result X1 output by the comprehensive determination circuit 404.

エッジ強調部12は、第1の検出部11の総合判定回路404の判定結果X1を用い、多値画像Im1に含まれる文字のエッジを強調する処理を行って、エッジ強調画像Im2を生成する。エッジ強調部12により生成されたエッジ強調画像Im2は、データインタフェース部313に送られる。 The edge enhancement unit 12 uses the determination result X1 of the comprehensive determination circuit 404 of the first detection unit 11 to perform the process of enhancing the edges of the characters included in the multi-valued image Im1 to generate the edge enhanced image Im2. The edge emphasized image Im2 generated by the edge emphasizing unit 12 is sent to the data interface unit 313.

色判定部312は、ガンマ補正後の多値画像Im1について、注目の画素ブロック(4×4画素)が有彩色ブロックであるか、あるいは無彩色ブロックであるかを判定する。図26は、色判定部312の構成例を示すブロック図である。色判定部312は、例えば図26に示すように、最大値算出部411と、第1の比較部412と、有彩画素カウンタ413と、第2の比較部414とを備える。 The color determination unit 312 determines whether the pixel block of interest (4×4 pixels) is a chromatic color block or an achromatic color block in the multi-valued image Im1 after gamma correction. FIG. 26 is a block diagram showing a configuration example of the color determination unit 312. The color determination unit 312 includes a maximum value calculation unit 411, a first comparison unit 412, a chromatic pixel counter 413, and a second comparison unit 414, as shown in FIG. 26, for example.

最大値算出部411は、ガンマ補正後の多値画像Im1の画素ごとに、RGBの差の絶対値の最大値d[i,j](=ΔRGB)を算出する。 The maximum value calculation unit 411 calculates the maximum value d[i,j] (=ΔRGB) of the absolute value of the RGB difference for each pixel of the multi-valued image Im1 after gamma correction.

第1の比較部412は、最大値算出部411が算出した最大値d[i,j]を所定の画素判定閾値th_pixと比較する。そして、最大値d[i,j]が画素判定閾値th_pixを超える画素を有彩画素、最大値d[i,j]が画素判定閾値th_pix以下の画素を無彩画素と判定する。 The first comparison unit 412 compares the maximum value d[i,j] calculated by the maximum value calculation unit 411 with a predetermined pixel determination threshold th_pix. Then, a pixel whose maximum value d[i,j] exceeds the pixel determination threshold th_pix is determined as a chromatic pixel, and a pixel whose maximum value d[i,j] is less than or equal to the pixel determination threshold th_pix is determined as an achromatic pixel.

有彩画素カウンタ413は、ガンマ補正後の多値画像Im1に含まれる所定画素数(例えば4ライン×4画素)の画素ブロックごとに、当該画素ブロックに含まれる有彩画素の数C1をカウントする。 The chromatic pixel counter 413 counts, for each pixel block of a predetermined number of pixels (for example, 4 lines×4 pixels) included in the multi-valued image Im1 after gamma correction, the number C1 of chromatic pixels included in the pixel block. ..

第2の比較部414は、有彩画素カウンタ413がカウントした画素ブロック内の有彩画素の数C1を所定のブロック判定閾値th_blcと比較する。そして、有彩画素の数C1がブロック判定閾値th_blcを超える画素ブロックを有彩ブロック、有彩画素の数C1がブロック判定閾値th_blc以下の画素ブロックを無彩ブロックと判定し、判定結果(有彩色/無彩色)X2を出力する。第2の比較部414が出力する判定結果X2は、データインタフェース部313に送られる。 The second comparison unit 414 compares the number C1 of chromatic pixels in the pixel block counted by the chromatic pixel counter 413 with a predetermined block determination threshold th_blc. A pixel block in which the number C1 of chromatic pixels exceeds the block determination threshold th_blc is determined to be a chromatic block, and a pixel block in which the number C1 of chromatic pixels is equal to or less than the block determination threshold th_blc is determined to be an achromatic block. /Achromatic) X2 is output. The determination result X2 output by the second comparison unit 414 is sent to the data interface unit 313.

データインタフェース部313は、ファイル生成時に、ガンマ補正後の多値画像Im1、第1の検出部11の判定結果X1(文字エッジ検出結果に相当)、エッジ強調部12により生成されたエッジ強調画像Im2、および色判定部312の判定結果X2をHDD213に一時保存する際のHDD管理インタフェースである。ファイル生成時には、上述の第2実施形態と同様に、第2の処理部320の第2の検出部13および分離部14が、必要なデータをHDD213から随時読み出して上述の処理を行う。そして、ファイル生成部15が、分離部14により多値画像Im1から分離された文字画像Im3と背景画像Im4とを互いに異なる方式で圧縮した後に統合し、多値画像Im1に対応する高圧縮PDFファイルFImを生成する。 The data interface unit 313 generates a multi-valued image Im1 after gamma correction, a determination result X1 of the first detection unit 11 (corresponding to a character edge detection result), and an edge-enhanced image Im2 generated by the edge enhancement unit 12 when a file is generated. , And a determination result X2 of the color determination unit 312 when temporarily stored in the HDD 213. At the time of file generation, as in the second embodiment described above, the second detection unit 13 and the separation unit 14 of the second processing unit 320 read necessary data from the HDD 213 as needed and perform the above-described processing. Then, the file generation unit 15 compresses the character image Im3 and the background image Im4 separated from the multi-valued image Im1 by the separation unit 14 by different methods and then integrates them to obtain a high compression PDF file corresponding to the multi-valued image Im1. Generate FIm.

一方、コピー再生時には、ガンマ補正後の多値画像Im1、第1の検出部11の判定結果X1および色判定部312の判定結果X2が、データインタフェース部313を介して、色処理/UCR部314に送られる。 On the other hand, at the time of copy reproduction, the multi-valued image Im1 after gamma correction, the determination result X1 of the first detection unit 11 and the determination result X2 of the color determination unit 312 are transmitted via the data interface unit 313 to the color processing/UCR unit 314. Sent to.

色処理/UCR部314は、画素あるいは画素ブロックごとの判定結果X1,X2に基づいて色処理やUCR処理を選択し、ガンマ補正後の多値画像Im1(RGB画像信号)をプロッタエンジン270が処理できる画像信号に変換する。 The color processing/UCR unit 314 selects color processing or UCR processing based on the determination results X1 and X2 for each pixel or pixel block, and the plotter engine 270 processes the gamma-corrected multivalued image Im1 (RGB image signal). Convert to an image signal that can be.

図27は、色処理/UCR部314の構成例を示すブロック図である。色処理/UCR部314は、例えば図27に示すように、第1の色処理部421と、UCR部422と、第2の色処理部423と、セレクタ424とを備える。データインタフェース部313から画素ごとに出力されるガンマ補正後の多値画像Im1(RGB画像信号)は、第1の色処理部421と第2の色処理部423とに並列に入力される。 FIG. 27 is a block diagram showing a configuration example of the color processing/UCR unit 314. The color processing/UCR unit 314 includes a first color processing unit 421, a UCR unit 422, a second color processing unit 423, and a selector 424, as shown in FIG. 27, for example. The multi-valued image Im1 (RGB image signal) after gamma correction output for each pixel from the data interface unit 313 is input in parallel to the first color processing unit 421 and the second color processing unit 423.

第1の色処理部421は、非黒文字用の色再現処理を行う。第1の色処理部421は、処理対象の多値画像Im1に忠実な色再現を実現するために、例えば下記式(1)に示すような3×3のマトリクス演算によりRGB→CMYの変換を行う。この際、色再現の精度向上のために、例えばRGB空間を分割してそれぞれの領域ごとにマトリクス演算を行うようにしてもよい。

Figure 2020114028
The first color processing unit 421 performs color reproduction processing for non-black characters. The first color processing unit 421 performs RGB→CMY conversion by, for example, a 3×3 matrix calculation represented by the following expression (1) in order to realize color reproduction faithful to the multivalued image Im1 to be processed. To do. At this time, in order to improve the accuracy of color reproduction, for example, the RGB space may be divided and the matrix calculation may be performed for each area.
Figure 2020114028

UCR部422は、第1の色処理部421の色再現処理により得られたCMYから、下記式(2)〜(5)に従って、墨信号生成および墨信号への置き換えを行う。UCR部422の処理により得られたc,m,y,Bk画像信号はセレクタ424に入力される。なお、下記式(2)のαは0〜1.0の値をとる調整パラメータである。
Bk=α×min(C,M,Y) ・・・(2)
c=C−Bk ・・・(3)
m=M−Bk ・・・(4)
y=Y−Bk ・・・(5)
The UCR unit 422 performs black signal generation and black signal replacement from CMY obtained by the color reproduction processing of the first color processing unit 421 according to the following equations (2) to (5). The c, m, y, Bk image signals obtained by the processing of the UCR unit 422 are input to the selector 424. In addition, α in the following formula (2) is an adjustment parameter that takes a value of 0 to 1.0.
Bk=α×min (C, M, Y) (2)
c=C-Bk (3)
m=M-Bk (4)
y=Y-Bk (5)

一方、第2の色処理部423は、黒文字用の色再現処理を行う。第2の色処理部423の色再現処理は、例えばRGB画像信号から輝度相当の信号(Bk0画像信号)を算出する処理である。第2の色処理部423の処理により得られたBk0画像信号(C=M=Y=0)は、セレクタ424に入力される。 On the other hand, the second color processing unit 423 performs color reproduction processing for black characters. The color reproduction process of the second color processing unit 423 is a process of calculating a signal (Bk0 image signal) corresponding to luminance from an RGB image signal, for example. The Bk0 image signal (C=M=Y=0) obtained by the processing of the second color processing unit 423 is input to the selector 424.

セレクタ424は、データインタフェース部313から出力される判定結果X1,X2に基づいて、非黒文字用のc,m,y,Bk画像信号、あるいは黒文字用のBk0画像信号を選択して、プリンタ補正部315に出力する。すなわち、セレクタ424は、注目画素が判定結果X1により文字であり、かつ、判定結果X2により無彩色であれば、Bk0画像信号を選択してプリンタ補正部315に出力する。一方、注目画素が判定結果X1により火文字である、または判定結果X2により有彩色であれば、c,m,y,Bk画像信号を選択してプリンタ補正部315に出力する。 The selector 424 selects the c, m, y, Bk image signals for non-black characters or the Bk0 image signal for black characters based on the determination results X1, X2 output from the data interface unit 313, and the printer correction unit. Output to 315. That is, the selector 424 selects the Bk0 image signal and outputs it to the printer correction unit 315 if the pixel of interest is a character according to the determination result X1 and is achromatic according to the determination result X2. On the other hand, if the pixel of interest is a fire letter based on the determination result X1, or if it is a chromatic color based on the determination result X2, the c, m, y, Bk image signals are selected and output to the printer correction unit 315.

プリンタ補正部315は、色処理/UCR部314から出力される画像信号に対してプロッタエンジン270の固有の特性に応じたガンマ補正処理やディザ処理を施して、プロッタエンジン270に出力する。転写印字ユニットであるプロッタエンジン270は、プリンタ補正部315から出力される画像信号に基づいて、トナーやインクなどの記録材を記録媒体に付着させる。これにより、処理対象の多値画像Im1(スキャナエンジン260の読み取り画像)に応じたカラー画像が記録媒体に記録される。 The printer correction unit 315 subjects the image signal output from the color processing/UCR unit 314 to gamma correction processing and dither processing according to the characteristic peculiar to the plotter engine 270, and outputs the image signal to the plotter engine 270. The plotter engine 270, which is a transfer printing unit, attaches a recording material such as toner or ink to the recording medium based on the image signal output from the printer correction unit 315. As a result, a color image corresponding to the multivalued image Im1 to be processed (the image read by the scanner engine 260) is recorded on the recording medium.

以上説明したように、本実施形態では、ファイル生成時とコピー再生時とで第1の検出部11による処理を切り替えるようにしている。より具体的には、ファイル生成時とコピー再生時とで、エッジ検出回路401で実施する3値化の閾値を切り替えるようにしている。したがって、本実施形態によれば、3値化の閾値を固定とした場合にはトレードオフの関係となるファイル生成時の効率的な圧縮と、コピー再生時の高画質化とを両立させることができる。 As described above, in the present embodiment, the processing by the first detection unit 11 is switched between the time of file generation and the time of copy reproduction. More specifically, the threshold value of the ternarization performed by the edge detection circuit 401 is switched between the file generation and the copy reproduction. Therefore, according to the present embodiment, when the threshold for ternarization is fixed, it is possible to achieve both efficient compression at the time of file generation, which is in a trade-off relationship, and high image quality at the time of copy reproduction. it can.

<第1変形例>
なお、以上説明した第3実施形態においては、ファイル生成時に、第2の処理部320の分離部14が第1の検出部11の判定結果X1(文字エッジ検出結果に相当)と、第2の検出部13による文字領域検出結果とを用いて、多値画像Im1を文字画像Im3と背景画像Im4とに分離するものとしている。しかし、分離部14による処理に、第1の検出部11の判定結果X1をそのまま用いるのではなく、この判定結果X1を補正した上で用いるように構成してもよい。
<First Modification>
In the third embodiment described above, when the file is generated, the separation unit 14 of the second processing unit 320 detects the determination result X1 (corresponding to the character edge detection result) of the first detection unit 11 and the second determination result X1. It is assumed that the multi-valued image Im1 is separated into the character image Im3 and the background image Im4 using the detection result of the character area by the detection unit 13. However, the determination result X1 of the first detection unit 11 may not be used as it is for the processing by the separation unit 14, but the determination result X1 may be corrected and then used.

図28は、本変形例の複合機200A’の機能的な構成例を示すブロック図である。図28に示すように、本変形例の複合機200A’では、第2の処理部320に文字領域補正部321が追加されている。それ以外は上述の第3実施形態の構成(図21参照)と同様である。 FIG. 28 is a block diagram showing a functional configuration example of a multifunction peripheral 200A' of the present modification. As shown in FIG. 28, in the multifunction peripheral 200A' of the present modification, a character area correction unit 321 is added to the second processing unit 320. Other than that, the configuration is the same as that of the third embodiment (see FIG. 21).

第1の検出部11の判定結果X1を補正したい理由としては、例えば以下の点が挙げられる。すなわち、第1の検出部11の判定結果X1は文字のエッジを検出した結果であるが、ファイル生成時の効率的な圧縮を考えると、文字のエッジだけでなく文字の内部の領域も文字として扱うことが望ましい。一方、文字の背景は文字近傍の背景とその周囲とで、それぞれに利用する圧縮方式によってはテクスチャ差が目立ってしまう。したがって、文字の背景は非文字(絵柄)に再判定するように、第1の検出部11の判定結果X1を補正することが望ましい。なお、文字の内部の領域は第2の検出部13での大局的な分析により文字として検出できる構成としているが、第1の検出部11の判定結果X1を補正することにより、第2の検出部13の検出漏れを補う効果もある。 The reasons for wanting to correct the determination result X1 of the first detection unit 11 include, for example, the following points. That is, the determination result X1 of the first detection unit 11 is the result of detecting the edge of the character, but considering efficient compression at the time of file generation, not only the edge of the character but also the area inside the character becomes a character. It is desirable to handle. On the other hand, the background of a character is a background near the character and its surroundings, and a texture difference becomes conspicuous depending on the compression method used for each. Therefore, it is desirable to correct the determination result X1 of the first detection unit 11 so that the background of the character is determined again as a non-character (pattern). The area inside the character is configured to be detected as a character by the global analysis in the second detection unit 13. However, by correcting the determination result X1 of the first detection unit 11, the second detection is performed. There is also an effect of compensating for the detection omission of the part 13.

図29は、文字領域補正部321の構成例を示すブロック図である。文字領域補正部321は、例えば図29に示すように、輝度信号算出回路431と、2値化回路432と、ラインバッファ433と、マスク補正回路434とを備える。 FIG. 29 is a block diagram showing a configuration example of the character area correction unit 321. For example, as shown in FIG. 29, the character area correction unit 321 includes a luminance signal calculation circuit 431, a binarization circuit 432, a line buffer 433, and a mask correction circuit 434.

輝度信号算出回路431は、ガンマ補正後の多値画像Im1(RGB画像信号)の画素ごとに、下記式(6)に従って、輝度信号相当の信号Lを算出する。なお、下記式(6)のa,b,cは、予め実験により求めた係数である。
L=a×R+b×G+c×B ・・・(6)
The luminance signal calculation circuit 431 calculates the signal L corresponding to the luminance signal according to the following equation (6) for each pixel of the multi-valued image Im1 (RGB image signal) after gamma correction. In addition, a, b, and c in the following equation (6) are coefficients that have been previously obtained by experiments.
L=a×R+b×G+c×B (6)

2値化回路432は、輝度信号算出回路431により算出された信号Lに対し、所定の閾値th_Lにて2値化(L≧th_L→黒画素、L<th_L→白画素)処理を行う。ラインバッファ433は、2値化回路432の処理結果を保持して、マスク補正回路434での処理に必要な情報をマスク補正回路434に入力する。 The binarization circuit 432 performs binarization (L≧th_L→black pixel, L<th_L→white pixel) processing on the signal L calculated by the luminance signal calculation circuit 431 with a predetermined threshold th_L. The line buffer 433 holds the processing result of the binarization circuit 432 and inputs the information necessary for the processing in the mask correction circuit 434 to the mask correction circuit 434.

マスク補正回路434は、注目画素が黒画素であって、かつ、注目画素を中心とした7×7のマスクの中に、第1の検出部11の判定結果X1がアクティブとなっている画素が1つでも存在すれば、注目画素に対する判定結果X1をアクティブとし、そうでなければノンアクティブに判定し直す。図30は、マスク補正回路434が用いるマスクの一例を示す図である。この図30に示すマスクの中心の画素(図中のハッチングを付した画素)が、注目画素である。 The mask correction circuit 434 determines that the pixel of interest is a black pixel, and the pixel of which the determination result X1 of the first detection unit 11 is active is in the 7×7 mask centered on the pixel of interest. If there is even one, the determination result X1 for the pixel of interest is made active, and if not, the determination is made non-active again. FIG. 30 is a diagram showing an example of a mask used by the mask correction circuit 434. The pixel at the center of the mask shown in FIG. 30 (pixel with hatching in the figure) is the target pixel.

以上のような文字領域補正部321の処理により、第1の検出部11の判定結果X1は、文字の内部をアクティブとし、文字の背景をノンアクティブとするように補正される。そして、分離部14が多値画像Im1を文字画像Im3と背景画像Im4とに分離する処理を行う際に、この文字領域補正部321により補正された判定結果X1を用いることで、分離部14による分離性能をさらに向上させることができる。 By the processing of the character area correction unit 321, the determination result X1 of the first detection unit 11 is corrected so that the inside of the character is active and the background of the character is inactive. Then, when the separating unit 14 performs the process of separating the multi-valued image Im1 into the character image Im3 and the background image Im4, the separating unit 14 uses the determination result X1 corrected by the character area correcting unit 321. The separation performance can be further improved.

<第2変形例>
また、上述した第3実施形態では、ファイル生成時とコピー再生時とで第1の検出部11の処理を切り替える一例として、第1の検出部11のエッジ検出回路401における3値化の閾値を切り替える例を説明した。しかし、この3値化の閾値の切り替えだけでなく、他の方法により第1の検出部11の処理を切り替える構成としてもよい。例えば、ファイル生成時とコピー再生時とで、第1の検出部11に入力する多値画像Im1の信号を切り替えるようにしてもよい。
<Second Modification>
Further, in the above-described third embodiment, as an example of switching the processing of the first detection unit 11 between file generation and copy reproduction, the threshold value for ternarization in the edge detection circuit 401 of the first detection unit 11 is set. The example of switching has been described. However, in addition to the switching of the threshold for ternarization, the processing of the first detection unit 11 may be switched by another method. For example, the signal of the multi-valued image Im1 input to the first detection unit 11 may be switched between when the file is generated and when the copy is reproduced.

具体的には、例えばコピー再生時には、第1の検出部11による処理の効率化のため、ガンマ補正後の多値画像Im1であるRGB画像信号のG信号を第1の検出部11に入力する。これに対し、ファイル生成時には、ガンマ補正後の多値画像Im1であるRGB画像信号から上記式(6)に従って輝度信号相当の信号Lを算出し、この信号Lを第1の検出部11に入力する。第1の検出部11による処理をG信号に基づいて行う場合は処理を効率化できる反面、緑色部分に対するレスポンスが低いため、緑文字のエッジを検出しにくくなる。これに対し、輝度信号相当の信号Lに基づいて第1の検出部11による処理を行うようにすれば、緑文字のエッジを検出し易くなる。 Specifically, for example, at the time of copy reproduction, the G signal of the RGB image signal which is the multi-valued image Im1 after gamma correction is input to the first detection unit 11 in order to improve the efficiency of the processing by the first detection unit 11. .. On the other hand, at the time of generating the file, the signal L corresponding to the luminance signal is calculated from the RGB image signal which is the multi-valued image Im1 after gamma correction according to the above equation (6), and the signal L is input to the first detection unit 11. To do. When the processing by the first detection unit 11 is performed based on the G signal, the processing can be made efficient, but the response to the green portion is low, so that it is difficult to detect the edge of the green character. On the other hand, if the processing by the first detection unit 11 is performed based on the signal L corresponding to the luminance signal, it becomes easier to detect the edge of the green character.

また、緑文字のエッジだけでなく、黄色文字のエッジも積極的に検出したい場合には、ファイル生成時に輝度信号相当の信号Lに代えて、RGBの最大値max(R,G,B)を第1の検出部11に入力する構成としてもよい。 When it is desired to positively detect not only the edge of the green character but also the edge of the yellow character, the maximum value max(R, G, B) of RGB is used instead of the signal L corresponding to the luminance signal at the time of file generation. It may be configured to input to the first detection unit 11.

<第3変形例>
また、上述の第3実施形態では、第1の検出部11の白背景検出回路402や網点検出回路403を文字エッジの検出のみに用いる構成としている。しかし、白背景検出回路402の出力や網点検出回路403の出力を分離部14での処理、つまり多値画像Im1を文字画像Im3と背景画像Im4とに分離する際に利用する構成としてもよい。また、白背景検出回路402の出力や網点検出回路403の出力に基づいて、ファイル生成部15が画像を圧縮する際の圧縮方式を切り替える構成としてもよい。このような構成を実現するには、白背景検出回路402の出力や網点検出回路403の出力を、第1の検出部11の判定結果X1とは独立してデータインタフェース部313に送り、HDD213に一時保存すればよい。
<Third Modification>
Further, in the above-described third embodiment, the white background detection circuit 402 and the halftone dot detection circuit 403 of the first detection unit 11 are used only for detecting the character edge. However, the output of the white background detection circuit 402 and the output of the halftone dot detection circuit 403 may be used in the processing in the separation unit 14, that is, when the multi-valued image Im1 is separated into the character image Im3 and the background image Im4. .. Further, the compression method may be switched when the file generation unit 15 compresses the image based on the output of the white background detection circuit 402 and the output of the halftone dot detection circuit 403. In order to realize such a configuration, the output of the white background detection circuit 402 and the output of the halftone dot detection circuit 403 are sent to the data interface unit 313 independently of the determination result X1 of the first detection unit 11, and the HDD 213 is operated. You can save it temporarily in.

<その他の変形例>
上述した第1実施形態乃至第3実施形態とそれらの変形例は、適宜、組み合わせて実施することができる。例えば、第1実施形態または第2実施形態の構成において、第3実施形態のようにファイル生成時かコピー再生時かによって第1の検出部11による処理(例えば3値化の閾値)を切り替えるようにしてもよい。
<Other modifications>
The above-described first to third embodiments and their modifications can be appropriately combined and implemented. For example, in the configuration of the first embodiment or the second embodiment, the processing by the first detection unit 11 (for example, a threshold for ternarization) is switched depending on whether the file is generated or the copy is reproduced as in the third embodiment. You may

以上、本発明の具体的な実施形態および変形例について説明したが、上述した実施形態は本発明の一適用例を示したものである。本発明は、上述した実施形態そのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で様々な変形や変更を加えて具体化することができる。 Although specific embodiments and modifications of the present invention have been described above, the above-described embodiments show one application example of the present invention. The present invention is not limited to the above-described embodiments as they are, and can be embodied by making various modifications and changes within a range not departing from the gist of the invention in an implementation stage.

1 画像処理装置
11 第1の検出部
12 エッジ強調部
13 第2の検出部
14 分離部
15 ファイル生成部
200 複合機
213 HDD
330 切り替え部
Im1 多値画像
Im2 エッジ強調画像
Im3 文字画像
Im4 背景画像
FIm 高圧縮PDFファイル
DESCRIPTION OF SYMBOLS 1 Image processing apparatus 11 1st detection part 12 Edge emphasis part 13 2nd detection part 14 Separation part 15 File generation part 200 Multifunction machine 213 HDD
330 Switching unit Im1 multi-valued image Im2 edge enhanced image Im3 character image Im4 background image FIm highly compressed PDF file

特許第3088010号公報Japanese Patent No. 3088010 特許第4471202号公報Japanese Patent No. 4471202

Claims (15)

多値画像から文字のエッジを検出する第1の検出部と、
前記第1の検出部の検出結果を用いて、前記多値画像に含まれる文字のエッジを強調するエッジ強調部と、
文字のエッジが強調された前記多値画像から文字領域を検出する第2の検出部と、
少なくとも前記第2の検出部の検出結果を用いて、前記多値画像を文字画像と背景画像とに分離する分離部と、を備える画像処理装置。
A first detection unit for detecting a character edge from a multi-valued image;
An edge enhancement unit that enhances an edge of a character included in the multi-valued image using the detection result of the first detection unit;
A second detection unit for detecting a character area from the multi-valued image in which the edges of the character are emphasized;
An image processing apparatus comprising: a separation unit that separates the multi-valued image into a character image and a background image using at least the detection result of the second detection unit.
前記分離部は、前記第1の検出部の検出結果と、前記第2の検出部の検出結果とを用いて、前記多値画像を文字画像と背景画像とに分離する、請求項1に記載の画像処理装置。 The separation unit separates the multi-valued image into a character image and a background image using the detection result of the first detection unit and the detection result of the second detection unit. Image processing device. 前記分離部は、前記第2の検出部の検出結果と前記多値画像とを用いて、前記多値画像における色地上文字の領域と白色文字の領域との少なくとも一方を検出し、検出した領域に含まれる文字のエッジを除いた前記第1の検出部の検出結果と、前記第2の検出部の検出結果とを用いて、前記多値画像を文字画像と背景画像とに分離する、請求項2に記載の画像処理装置。 The separating unit detects at least one of a color ground character region and a white character region in the multi-valued image using the detection result of the second detecting unit and the multi-valued image, and detects the detected region. Separating the multi-valued image into a character image and a background image by using the detection result of the first detection unit excluding the edge of the character included in the above and the detection result of the second detection unit. Item 2. The image processing device according to item 2. 前記第2の検出部は、文字のエッジが強調された前記多値画像を2値化した2値化画像から連結成分を取得し、取得した連結成分のうち、外接矩形の大きさが所定の大きさに満たない連結成分を削除し、残った連結成分を統合することで前記文字領域を検出する、請求項2または3に記載の画像処理装置。 The second detection unit acquires a connected component from a binarized image obtained by binarizing the multi-valued image in which the edges of the characters are emphasized, and the size of the circumscribed rectangle is predetermined among the acquired connected components. The image processing device according to claim 2, wherein the character region is detected by deleting a connected component that is less than a size and integrating the remaining connected components. 多値画像から文字のエッジを検出する第1の検出部と、
前記多値画像から文字領域を検出する第2の検出部と、
前記第2の検出部の検出結果と前記多値画像とを用いて、前記多値画像における色地上文字の領域と白色文字の領域との少なくとも一方を検出し、検出した領域に含まれる文字のエッジを除いた前記第1の検出部の検出結果と、前記第2の検出部の検出結果とを用いて、前記多値画像を文字画像と背景画像とに分離する分離部と、を備える画像処理装置。
A first detection unit for detecting a character edge from a multi-valued image;
A second detection unit for detecting a character area from the multi-valued image;
Using the detection result of the second detection unit and the multi-valued image, at least one of the area of the color ground character and the area of the white character in the multi-valued image is detected, and the character included in the detected area is detected. An image including a separation unit that separates the multi-valued image into a character image and a background image by using the detection result of the first detection unit excluding edges and the detection result of the second detection unit. Processing equipment.
前記分離部は、前記第1の検出部の検出結果と、前記第2の検出部の検出結果とを統合して前記文字画像を分離し、
前記多値画像と前記文字画像との差分を前記背景画像として分離する、請求項1乃至5のいずれか一項に記載の画像処理装置。
The separation unit integrates the detection result of the first detection unit and the detection result of the second detection unit to separate the character image,
The image processing apparatus according to claim 1, wherein a difference between the multi-valued image and the character image is separated as the background image.
前記文字画像と前記背景画像とを互いに異なる方式で圧縮した後に統合し、前記多値画像に対応する圧縮画像ファイルを生成するファイル生成部をさらに備える、請求項1乃至6のいずれか一項に記載の画像処理装置。 7. The file generation unit according to claim 1, further comprising a file generation unit that compresses the character image and the background image by different methods and then integrates them to generate a compressed image file corresponding to the multi-valued image. The image processing device described. ユーザにより選択された動作モードに応じて、前記第2の検出部による処理を実行するか否かを切り替える切り替え部をさらに備え、
前記分離部は、前記第2の検出部による処理が実行された場合に、少なくとも前記第2の検出部の検出結果を用いて、前記多値画像を前記文字画像と前記背景画像とに分離し、前記第2の検出部による処理が実行されない場合は、前記第1の検出部の検出結果を用いて、前記多値画像を前記文字画像と前記背景画像とに分離する、請求項1乃至7のいずれか一項に記載の画像処理装置。
A switching unit for switching whether or not to execute the process by the second detection unit according to the operation mode selected by the user;
The separation unit separates the multi-valued image into the character image and the background image using at least the detection result of the second detection unit when the process by the second detection unit is executed. The multi-valued image is separated into the character image and the background image by using the detection result of the first detection unit when the process by the second detection unit is not executed. The image processing device according to claim 1.
前記切り替え部は、ユーザにより選択された動作モードと、ユーザにより選択された処理速度との組み合わせに応じて、前記第2の検出部による処理を実行するか否かを切り替える、請求項8に記載の画像処理装置。 The switching unit switches whether or not to execute the process by the second detection unit according to a combination of an operation mode selected by the user and a processing speed selected by the user. Image processing device. 少なくとも前記多値画像を格納する記憶部をさらに備え、
前記第2の検出部は、前記記憶部から読み出した前記多値画像から文字領域を検出し、
前記分離部は、少なくとも前記第2の検出部の検出結果を用いて、前記記憶部から読み出した前記多値画像を文字画像と背景画像とに分離する、請求項1乃至9のいずれか一項に記載の画像処理装置。
Further comprising a storage unit for storing at least the multi-valued image,
The second detection unit detects a character area from the multi-valued image read from the storage unit,
10. The separation unit separates the multi-valued image read from the storage unit into a character image and a background image using at least the detection result of the second detection unit. The image processing device according to 1.
前記第1の検出部は、前記多値画像に対応する圧縮画像ファイルを生成する場合と、前記多値画像に応じた画像を記録媒体に記録する場合とで、前記多値画像から文字のエッジを検出する処理を切り替える、請求項1乃至10のいずれか一項に記載の画像処理装置。 The first detection unit generates a compressed image file corresponding to the multi-valued image and records an image corresponding to the multi-valued image on a recording medium. The image processing apparatus according to any one of claims 1 to 10, which switches processing for detecting a. 前記第1の検出部による処理は、前記多値画像を3値化する処理を含み、
前記第1の検出部は、前記多値画像に対応する圧縮画像ファイルを生成する場合と、前記多値画像に応じた画像を記録媒体に記録する場合とで、前記多値画像を3値化する際の閾値を切り替える、請求項11に記載の画像処理装置。
The processing by the first detection unit includes processing for ternarizing the multi-valued image,
The first detection unit ternarizes the multi-valued image depending on whether a compressed image file corresponding to the multi-valued image is generated or an image corresponding to the multi-valued image is recorded on a recording medium. The image processing apparatus according to claim 11, wherein a threshold value for switching is switched.
前記第1の検出部は、前記多値画像に対応する圧縮画像ファイルを生成する場合は、前記多値画像に応じた画像を記録媒体に記録する場合よりも、エッジを検出し易い閾値を用いて前記多値画像を3値化する、請求項12に記載の画像処理装置。 The first detection unit uses a threshold value that is easier to detect an edge when generating a compressed image file corresponding to the multi-valued image than when an image corresponding to the multi-valued image is recorded on a recording medium. 13. The image processing apparatus according to claim 12, wherein the multi-valued image is ternarized. 画像処理装置において実行される画像処理方法であって、
多値画像から文字のエッジを検出する第1の検出ステップと、
前記第1の検出ステップの検出結果を用いて、前記多値画像に含まれる文字のエッジを強調するエッジ強調ステップと、
文字のエッジが強調された前記多値画像から文字領域を検出する第2の検出ステップと、
少なくとも前記第2の検出ステップの検出結果を用いて、前記多値画像を文字画像と背景画像とに分離する分離ステップと、を含む画像処理方法。
An image processing method executed in an image processing apparatus, comprising:
A first detection step of detecting an edge of a character from a multi-valued image,
An edge emphasis step of emphasizing an edge of a character included in the multi-valued image using the detection result of the first detection step;
A second detection step of detecting a character area from the multi-valued image in which edges of characters are emphasized,
An image processing method including a separation step of separating the multi-valued image into a character image and a background image using at least the detection result of the second detection step.
コンピュータに、
多値画像から文字のエッジを検出する第1の検出部の機能と、
前記第1の検出部の検出結果を用いて、前記多値画像に含まれる文字のエッジを強調するエッジ強調部の機能と、
文字のエッジが強調された前記多値画像から文字領域を検出する第2の検出部の機能と、
少なくとも前記第2の検出部の検出結果を用いて、前記多値画像を文字画像と背景画像とに分離する分離部の機能と、を実現させるためのプログラム。
On the computer,
The function of the first detection unit that detects the edge of a character from a multi-valued image,
A function of an edge enhancement unit that enhances edges of characters included in the multi-valued image using the detection result of the first detection unit;
A function of a second detection unit that detects a character area from the multi-valued image in which edges of characters are emphasized,
A program for realizing a function of a separation unit that separates the multi-valued image into a character image and a background image by using at least the detection result of the second detection unit.
JP2020073667A 2015-07-24 2020-04-16 Image processing equipment, image processing methods and programs Active JP6923037B2 (en)

Applications Claiming Priority (5)

Application Number Priority Date Filing Date Title
JP2015146534 2015-07-24
JP2015146534 2015-07-24
JP2015247263 2015-12-18
JP2015247263 2015-12-18
JP2016134341A JP6693310B2 (en) 2015-07-24 2016-07-06 Image processing apparatus, image processing method and program

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2016134341A Division JP6693310B2 (en) 2015-07-24 2016-07-06 Image processing apparatus, image processing method and program

Publications (3)

Publication Number Publication Date
JP2020114028A true JP2020114028A (en) 2020-07-27
JP2020114028A5 JP2020114028A5 (en) 2021-07-26
JP6923037B2 JP6923037B2 (en) 2021-08-18

Family

ID=59232277

Family Applications (2)

Application Number Title Priority Date Filing Date
JP2016134341A Active JP6693310B2 (en) 2015-07-24 2016-07-06 Image processing apparatus, image processing method and program
JP2020073667A Active JP6923037B2 (en) 2015-07-24 2020-04-16 Image processing equipment, image processing methods and programs

Family Applications Before (1)

Application Number Title Priority Date Filing Date
JP2016134341A Active JP6693310B2 (en) 2015-07-24 2016-07-06 Image processing apparatus, image processing method and program

Country Status (1)

Country Link
JP (2) JP6693310B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6705237B2 (en) 2016-03-18 2020-06-03 株式会社リコー Image compression apparatus, image forming apparatus, image compression method and program
JP6874387B2 (en) 2017-01-26 2021-05-19 株式会社リコー Image processing equipment, image processing methods and programs
JP7377661B2 (en) * 2019-09-30 2023-11-10 Toppanエッジ株式会社 Image semantic region segmentation device, region detection sensitivity improvement method, and program

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000175032A (en) * 1998-12-02 2000-06-23 Ricoh Co Ltd Image processing unit
JP2003283821A (en) * 2002-03-25 2003-10-03 Ricoh Co Ltd Image processor
JP2005204206A (en) * 2004-01-19 2005-07-28 Ricoh Co Ltd Image processing apparatus, image processing program, and storage medium
JP2010074318A (en) * 2008-09-16 2010-04-02 Ricoh Co Ltd Image processing apparatus and method, and image processing program
JP2010279076A (en) * 2010-08-31 2010-12-09 Konica Minolta Business Technologies Inc Image processor
JP2019092027A (en) * 2017-11-14 2019-06-13 株式会社リコー Image processing apparatus, image processing method, and image processing program

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000175032A (en) * 1998-12-02 2000-06-23 Ricoh Co Ltd Image processing unit
JP2003283821A (en) * 2002-03-25 2003-10-03 Ricoh Co Ltd Image processor
JP2005204206A (en) * 2004-01-19 2005-07-28 Ricoh Co Ltd Image processing apparatus, image processing program, and storage medium
JP2010074318A (en) * 2008-09-16 2010-04-02 Ricoh Co Ltd Image processing apparatus and method, and image processing program
JP2010279076A (en) * 2010-08-31 2010-12-09 Konica Minolta Business Technologies Inc Image processor
JP2019092027A (en) * 2017-11-14 2019-06-13 株式会社リコー Image processing apparatus, image processing method, and image processing program

Also Published As

Publication number Publication date
JP2017118480A (en) 2017-06-29
JP6693310B2 (en) 2020-05-13
JP6923037B2 (en) 2021-08-18

Similar Documents

Publication Publication Date Title
JP3741090B2 (en) Image processing device
JP6648580B2 (en) Document type recognition device, image forming device, document type recognition method and program
JP4498233B2 (en) Image processing apparatus and image processing method
JP6923037B2 (en) Image processing equipment, image processing methods and programs
US9773319B2 (en) Image processing apparatus, method, and medium
JP6939449B2 (en) Image processing equipment, image processing method and image processing program
JP2006319682A (en) Image processing apparatus, image processing method and computer readable recording medium
JP4637054B2 (en) Image processing apparatus, control method therefor, computer program, and computer-readable storage medium
JP2009135796A (en) Image processing apparatus, image processing method, image processing program, image forming apparatus, storage medium
US9948824B2 (en) Image compressing device, image forming apparatus, image compressing method, and recording medium
JP6740612B2 (en) Image processing apparatus, image processing method and program
US11356578B2 (en) Apparatus and control method for enhancement based on achromatic signal value replacing pixel color information
JP6676962B2 (en) Image processing apparatus, image processing method, and program
US8577132B2 (en) Electronic document generation system, electronic document generation method, and program
JP5165043B2 (en) Device, method and program capable of detecting line
JP6641982B2 (en) Image processing apparatus, image processing method, and program
JP7077925B2 (en) Image processing equipment, image processing methods, and programs
JP2015088910A (en) Image processing device
US11924390B2 (en) Apparatus, method, and storage medium for performing color reduction processing
US11405525B2 (en) Image processing apparatus, control method, and product capable of improving compression efficiency by converting close color to background color in a low light reading mode
RU2737001C1 (en) Image processing device and method and data medium
JP2010232952A (en) Image processor, and image processing program
JP2007189275A (en) Image processor
JP2001352453A (en) Image-reproducing device
JP5165137B2 (en) Device, method and program capable of detecting line

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200514

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210526

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210712

R151 Written notification of patent or utility model registration

Ref document number: 6923037

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151