JP4545167B2 - Image processing method, image processing apparatus, image forming apparatus, computer program, and recording medium - Google Patents

Image processing method, image processing apparatus, image forming apparatus, computer program, and recording medium Download PDF

Info

Publication number
JP4545167B2
JP4545167B2 JP2007088665A JP2007088665A JP4545167B2 JP 4545167 B2 JP4545167 B2 JP 4545167B2 JP 2007088665 A JP2007088665 A JP 2007088665A JP 2007088665 A JP2007088665 A JP 2007088665A JP 4545167 B2 JP4545167 B2 JP 4545167B2
Authority
JP
Japan
Prior art keywords
image
ratio
pixel
determination
edge
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2007088665A
Other languages
Japanese (ja)
Other versions
JP2008252292A (en
Inventor
牧生 後藤
章人 吉田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sharp Corp
Original Assignee
Sharp Corp
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 Sharp Corp filed Critical Sharp Corp
Priority to JP2007088665A priority Critical patent/JP4545167B2/en
Publication of JP2008252292A publication Critical patent/JP2008252292A/en
Application granted granted Critical
Publication of JP4545167B2 publication Critical patent/JP4545167B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Facsimile Image Signal Circuits (AREA)

Description

本発明は、画像の領域判定(例えば、小さな文字の領域が多く含まれている領域又は網点上文字領域、あるいは、万線領域など)を行う画像処理方法、画像処理装置、該画像処理装置を備える画像形成装置、前記画像処理装置を実現するためのコンピュータプログラム、並びに該コンピュータプログラムを記録した記録媒体に関する。   The present invention relates to an image processing method, an image processing device, and an image processing device that perform image region determination (for example, a region including many small character regions, a character region on halftone dots, or a line region). The present invention relates to an image forming apparatus including the image processing apparatus, a computer program for realizing the image processing apparatus, and a recording medium on which the computer program is recorded.

電子写真プロセスあるいはインクジェット方式などを用いた複写機又はプリンタなどの画像形成装置は、デジタル画像処理技術の進展に伴って、カラー画像を高画質に再現することが可能となり、フルカラーのデジタル複写機、複合機などが製品化されている。このような画像形成装置を用いて複写される原稿から得られる画像には、文字、網点写真、線画、写真(印画紙写真等の連続階調領域)、又はそれらが混在したものがあり、原稿を複写して良好な再現画像を得るためには、それぞれの原稿の種別に適合した画像処理を行う必要がある。   An image forming apparatus such as a copying machine or a printer using an electrophotographic process or an inkjet method can reproduce a color image with high image quality along with the progress of digital image processing technology. Multifunction devices have been commercialized. Images obtained from a document copied using such an image forming apparatus include characters, halftone photographs, line drawings, photographs (continuous gradation areas such as photographic paper photographs), or a mixture of them. In order to obtain a good reproduction image by copying a document, it is necessary to perform image processing suitable for each type of document.

例えば、原稿を読み取って得られた画像信号から原稿中の文字に属する画素又は画素ブロック、写真に属する画素又は画素ブロック、網点に属する画素又は画素ブロックを計数して、原稿全体の画素又は画素ブロックに対する比率を算出し、算出した比率に基づいて、空間フィルタ処理、色補正処理、黒生成処理、下色除去処理、中間調処理、又はガンマ補正処理の少なくとも1つの処理の制御をすることにより、原稿の種類(種別)に応じた最適な処理を行う画像処理装置が提案されている(特許文献1参照)。   For example, the pixel or pixel block belonging to the character in the document, the pixel or pixel block belonging to the photograph, the pixel or pixel block belonging to the halftone dot is counted from the image signal obtained by reading the document, and the pixel or pixel of the entire document By calculating a ratio to the block and controlling at least one of the spatial filter process, the color correction process, the black generation process, the under color removal process, the halftone process, or the gamma correction process based on the calculated ratio An image processing apparatus that performs optimal processing according to the type of document has been proposed (see Patent Document 1).

一方、原稿の中には、階調表現として網点ではなく万線(ラインスクリーン)を用いる場合があり、このような原稿については、エッジの検出を行うと、万線も細線で階調を表現するものであるためエッジが存在し、文字と万線とを正確に領域分離することができないという問題がある。   On the other hand, not all halftone dots but line lines (line screens) are used in some originals as gradation representations. For such originals, when edge detection is performed, all lines are displayed with fine lines. Since it is expressed, there is an edge, and there is a problem that it is impossible to accurately separate a character and a line.

そこで、例えば、5×5画素のマスクを設定し、主走査方向および副走査方向毎に各画素値の加算値P1〜P5を算出し、算出された加算値P1〜P5の差分を求めて、濃度の凹凸(濃淡)が所定のパターンと一致するか否かを判定する。さらに、文字領域と区別するために、濃度の「濃」部分と濃度の「淡」部分との差が、予め定められる閾値より小さいか否か判定し、濃度の凹凸と所定のパターンが一致し、かつ濃度の濃淡の差が大きすぎない場合、万線であると判定し、パターンが一致しない場合、あるいは、濃度の濃淡の差が大きい場合、万線ではないと判定することにより、読み取った原稿が特定の万線パターンに該当するか否かを判定する画像処理装置が提案されている(特許文献2参照)。   Therefore, for example, a mask of 5 × 5 pixels is set, the addition values P1 to P5 of the respective pixel values are calculated for each of the main scanning direction and the sub scanning direction, and the difference between the calculated addition values P1 to P5 is obtained. It is determined whether or not the density unevenness (shading) matches a predetermined pattern. Further, in order to distinguish from the character area, it is determined whether or not the difference between the “dark” portion of the density and the “light” portion of the density is smaller than a predetermined threshold, and the unevenness of the density matches the predetermined pattern. If the density difference is not too large, it is determined that the line is a line. If the pattern does not match, or if the density difference is large, it is determined that the line is not a line. An image processing apparatus that determines whether a document corresponds to a specific line pattern has been proposed (see Patent Document 2).

また、特許文献2の画像処理装置は、上述の判定処理によって万線ではないと判定された画素を注目画素とし、この注目画素の周囲に、例えば、4つのブロックを設定し、各ブロック内において上述の判定処理によって万線であると判定された画素の数を計数する。そして、計数された画素の数を所定の基準値と比較し、基準値以上である場合、この注目画素を万線であるとすることにより、上述の判定処理における判定結果の補正を行う。
特開平7−298074号公報 特開2002−300388号公報
In addition, the image processing apparatus disclosed in Patent Document 2 uses, as a pixel of interest, a pixel that is determined not to be a line by the above-described determination processing, and, for example, four blocks are set around the pixel of interest. The number of pixels determined to be a line by the above determination process is counted. Then, the counted number of pixels is compared with a predetermined reference value, and if it is equal to or larger than the reference value, the determination result in the above-described determination process is corrected by setting this target pixel as a line.
Japanese Patent Laid-Open No. 7-298074 JP 2002-300388 A

しかしながら、特許文献1の画像処理装置にあっては、原稿中の、非常に小さい文字(例えば、フォントサイズが4ポイント程度で印刷された文字)が多く含まれる領域、又は複雑な網点上の文字(例えば、複雑な地図、カタログの仕様書などで着色された背景上に印刷された小さい文字)が多く含まれる領域では、原稿の種別が文字であると判定することが非常に困難となり、網点と判定されるなど誤った種別に判定される可能性が高かった。文字原稿であるにもかかわらず、網点原稿であると誤判定されることにより、例えば、フィルタ処理では平滑化処理がされてしまい、あるいは、階調性を重視した中間調処理がされてしまい、文字の鮮鋭性が損なわれ、却って画質が劣化するという問題があった。   However, in the image processing apparatus disclosed in Patent Document 1, an area containing a lot of very small characters (for example, characters printed with a font size of about 4 points) or a complex halftone dot in a document. In an area that contains a lot of characters (for example, small characters printed on a background colored with complicated maps, catalog specifications, etc.), it is very difficult to determine that the type of document is a character, There was a high possibility that it was judged as an incorrect type, such as a halftone dot. Even though it is a text document, it is erroneously determined to be a halftone document, and for example, the filtering process may be smoothed, or the gradation process may be halftone processed. However, there is a problem that the sharpness of characters is lost and the image quality is deteriorated.

また、特許文献2の画像処理装置にあっては、万線のパターンには種々のものが存在するため、パターンが一致するか否かに基づいて判定を行う場合、予め多くのパターンを記憶しておく必要があり、また、多くのパターンに対して判定処理を行うことにより、判定処理が複雑になり、処理量も膨大なものとなる。したがって、実現性を考慮した場合には、万線のパターンの種類を制限することにより、検出可能な万線のパターンを特定のものに限定する必要があった。   Further, in the image processing apparatus of Patent Document 2, since there are various types of line patterns, many patterns are stored in advance when the determination is made based on whether the patterns match. In addition, by performing determination processing on many patterns, the determination processing becomes complicated and the amount of processing becomes enormous. Therefore, in consideration of feasibility, it is necessary to limit the types of detectable line patterns to specific ones by limiting the types of line patterns.

本発明は、斯かる事情に鑑みてなされたものであり、その目的とするところは、画像に様々なパターンの万線、小さい文字、複雑な網点上の文字など(以下、擬似文字ともいう)が含まれるか否かの判定を精度よく行い、擬似文字が含まれる場合には、最適な画像処理を施すことによって画質の劣化を防止することができる画像処理方法、画像処理装置、該画像処理装置を備える画像形成装置、前記画像処理装置をコンピュータによって実現するためのコンピュータプログラム、及び該コンピュータプログラムを記録した記録媒体を提供することにある。   The present invention has been made in view of such circumstances. The object of the present invention is to create various patterns of lines, small characters, characters on complex halftone dots, etc. (hereinafter also referred to as pseudo characters). ) Is accurately determined, and when pseudo characters are included, an image processing method, an image processing apparatus, and an image processing method that can prevent image quality deterioration by performing optimal image processing An object of the present invention is to provide an image forming apparatus including a processing apparatus, a computer program for realizing the image processing apparatus by a computer, and a recording medium on which the computer program is recorded.

本発明の他の目的は、画像に万線、あるいは、小文字又は網点上文字が含まれているか否かを精度良く判定することができる画像処理方法、画像処理装置、該画像処理装置を備える画像形成装置を提供することにある。   Another object of the present invention is to provide an image processing method, an image processing apparatus, and the image processing apparatus capable of accurately determining whether or not an image includes a line or a lowercase letter or a halftone dot character. An object is to provide an image forming apparatus.

本発明の他の目的は、画像を複数の画素ブロックに分割し、分割された画素ブロック毎に領域判定を行うことにより、画像の所要の領域毎に擬似文字の有無を判定することができる画像処理装置、該画像処理装置を備える画像形成装置を提供することにある。   Another object of the present invention is to divide an image into a plurality of pixel blocks and perform region determination for each divided pixel block, thereby determining whether or not there is a pseudo character for each required region of the image. A processing apparatus and an image forming apparatus including the image processing apparatus are provided.

また、本発明の他の目的は、同一の種類であると判定された画素ブロックの数に基づいて、画像が得られた原稿が万線領域、あるいは、小文字領域又は網点上文字領域を含む原稿であるか否かを精度良く判定することができる画像処理装置、該画像処理装置を備える画像形成装置を提供することにある。   Another object of the present invention is that a document from which an image is obtained includes a line area, a lower case area, or a halftone dot character area based on the number of pixel blocks determined to be the same type. An object of the present invention is to provide an image processing apparatus capable of accurately determining whether a document is an original, and an image forming apparatus including the image processing apparatus.

本発明に係る画像処理方法は、複数の画素から構成される原稿の画像の前記画素が有する画素値に基づいて前記画像の種類を判定する処理を行う画像処理方法において、前記画像の各画素の画素値に基づいてエッジ画素を検出する第1エッジ検出ステップと、該第1エッジ検出ステップで検出されたエッジ画素基づいて、原稿全体の画像の総画素数に対するエッジ画素の数の比率である第1特徴量を算出する第1算出ステップと、前記画像を縮小する縮小ステップと、該縮小ステップで縮小された画像の各画素の画素値に基づいてエッジ画素を検出する第2エッジ検出ステップと、該第2エッジ検出ステップで検出されたエッジ画素基づいて、縮小された原稿全体の画像の総画素数に対するエッジ画素の数の比率である第2特徴量を算出する第2算出ステップと、前記第1算出ステップで算出された第1特徴量に対する、前記第2算出ステップで算出された第2特徴量の割合を算出する割合算出ステップと、複数の方向について、前記画像の濃度分布に係る特徴量をそれぞれ算出する特徴量算出ステップと、該特徴量算出ステップで算出された各方向の特徴量に基づいて、前記画像の濃度分布の角度依存性の有無を判定する角度依存性判定ステップと、前記割合算出ステップで算出された割合及び前記角度依存性判定ステップでの判定結果に基づいて、前記画像の種類を判定する判定ステップとを含むことを特徴とする。 An image processing method according to the present invention is an image processing method for performing a process of determining the type of an image based on a pixel value of the pixel of an image of a document composed of a plurality of pixels. a first edge detecting step of detecting an edge pixel based on pixel values, on the basis of the detected edge pixel in the first edge detection step is the ratio of the number of edge pixels to the total number of pixels in the original entire image A first calculation step for calculating a first feature amount, a reduction step for reducing the image, and a second edge detection step for detecting an edge pixel based on a pixel value of each pixel of the image reduced in the reduction step; , based on the detected edge pixel in the second edge detecting step, calculating a second feature quantity is the ratio of the number of edge pixels to the total number of pixels of the reduced original entire image A plurality of directions, a ratio calculating step for calculating a ratio of the second feature amount calculated in the second calculation step with respect to the first feature amount calculated in the first calculation step, and a plurality of directions, A feature amount calculating step for calculating a feature amount related to the density distribution of the image, and determining whether or not there is an angle dependency of the density distribution of the image based on the feature amount in each direction calculated in the feature amount calculating step. And a determination step of determining the type of the image based on the ratio calculated in the ratio calculation step and the determination result in the angle dependency determination step.

本発明に係る画像処理方法は、前記第1算出ステップは、前記第1エッジ検出ステップで検出されたエッジ画素の数を計数する第1計数ステップと、該第1計数ステップで計数されたエッジ画素の数の、前記画像中の画素の総数に対する第1比率を算出するステップとを含み、前記第2算出ステップは、前記第2エッジ検出ステップで検出されたエッジ画素の数を計数する第2計数ステップと、該第2計数ステップで計数されたエッジ画素の数の、前記縮小ステップで縮小された画像中の画素の総数に対する第2比率を算出するステップとを含むことを特徴とする。 Image processing method according to the present invention, the first calculation step, a first counting step of counting the number of detected edge pixels in the first edge detection step, the edge pixels that are counted in the first counting step A first ratio with respect to the total number of pixels in the image, wherein the second calculating step counts the number of edge pixels detected in the second edge detecting step. And calculating a second ratio of the number of edge pixels counted in the second counting step to the total number of pixels in the image reduced in the reduction step.

本発明に係る画像処理方法は、前記判定ステップは、前記割合算出ステップで算出された割合が所定の閾値以下であるか否かを判断する判断ステップと、該判断ステップで前記割合が所定の閾値以下であると判断され、前記角度依存性判定ステップでの判定結果が有りである場合、万線を含む画像であると判定するステップとを含むことを特徴とする。
また、本発明に係る画像処理方法は、複数の画素から構成される原稿の画像の前記画素が有する画素値に基づいて前記画像の種類を判定する処理を行う画像処理方法において、 前記画像の各画素の画素値に基づいてエッジ画素を検出する第1エッジ検出ステップと、原稿のエッジ画素の数である第3特徴量を算出する第3算出ステップと、前記画像を縮小する縮小ステップと、該縮小ステップで縮小された画像の各画素の画素値に基づいてエッジ画素を検出する第2エッジ検出ステップと、縮小された原稿のエッジ画素の数である第4特徴量を算出する第4算出ステップと、前記第3算出ステップで算出された第3特徴量に対する、前記第4算出ステップで算出された第4特徴量の割合を算出する第2割合算出ステップと、複数の方向について、前記画像の濃度分布に係る特徴量をそれぞれ算出する特徴量算出ステップと、該特徴量算出ステップで算出された各方向の特徴量に基づいて、前記画像の濃度分布の角度依存性の有無を判定する角度依存性判定ステップと、前記第2割合算出ステップで算出された割合及び前記角度依存性判定ステップでの判定結果に基づいて、前記画像の種類を判定する第2判定ステップとを含むことを特徴とする。
また、本発明に係る画像処理方法は、前記第2判定ステップは、前記第2割合算出ステップで算出された割合が所定の閾値以下であるか否かを判断する判断ステップと、該判断ステップで前記割合が所定の閾値以下であると判断され、前記角度依存性判定ステップでの判定結果が有りである場合、万線を含む画像であると判定するステップとを含むことを特徴とする。
In the image processing method according to the present invention, the determination step includes a determination step of determining whether the ratio calculated in the ratio calculation step is equal to or less than a predetermined threshold, and the ratio is determined to be a predetermined threshold in the determination step. And determining that the image includes a line when the determination result in the angle dependency determining step is “Yes”.
The image processing method according to the present invention is an image processing method for performing processing for determining a type of the image based on pixel values included in the pixel of the image of a document composed of a plurality of pixels, each of the image A first edge detecting step for detecting an edge pixel based on a pixel value of the pixel; a third calculating step for calculating a third feature amount that is the number of edge pixels of the document; a reducing step for reducing the image; A second edge detecting step for detecting an edge pixel based on the pixel value of each pixel of the image reduced in the reduction step, and a fourth calculation step for calculating a fourth feature amount that is the number of edge pixels of the reduced document. A second ratio calculating step for calculating a ratio of the fourth feature amount calculated in the fourth calculation step with respect to the third feature amount calculated in the third calculation step, and a plurality of directions. A feature amount calculating step for calculating a feature amount related to the density distribution of the image, and whether or not there is an angle dependency of the density distribution of the image based on the feature amount in each direction calculated in the feature amount calculating step. An angle dependency determining step for determining, and a second determining step for determining the type of the image based on the ratio calculated in the second ratio calculating step and the determination result in the angle dependency determining step. It is characterized by.
In the image processing method according to the present invention, the second determination step includes a determination step of determining whether or not the ratio calculated in the second ratio calculation step is equal to or less than a predetermined threshold value, and the determination step. And determining that the image includes a line when the ratio is determined to be equal to or less than a predetermined threshold value and the determination result in the angle dependency determination step is present.

本発明に係る画像処理装置は、複数の画素から構成される原稿の画像の前記画素が有する画素値に基づいて前記画像の種類を判定する処理を行う画像処理装置において、前記画像の各画素の画素値に基づいてエッジ画素を検出する第1エッジ検出手段と、該第1エッジ検出手段が検出したエッジ画素基づいて、原稿全体の画像の総画素数に対するエッジ画素の数の比率である第1特徴量を算出する第1算出手段と、前記画像を縮小する縮小手段と、該縮小手段が縮小した画像の各画素の画素値に基づいてエッジ画素を検出する第2エッジ検出手段と、該第2エッジ検出手段が検出したエッジ画素基づいて、縮小された原稿全体の画像の総画素数に対するエッジ画素の数の比率である第2特徴量を算出する第2算出手段と、前記第1算出手段が算出した第1特徴量に対する、前記第2算出手段が算出した第2特徴量の割合を算出する割合算出手段と、複数の方向について、前記画像の濃度分布に係る特徴量をそれぞれ算出する特徴量算出手段と、該特徴量算出手段が算出した各方向の特徴量に基づいて、前記画像の濃度分布の角度依存性の有無を判定する角度依存性判定手段と、前記割合算出手段が算出した割合及び前記角度依存性判定手段の判定結果に基づいて、前記画像の種類を判定する判定手段とを備えることを特徴とする。 An image processing apparatus according to the present invention is an image processing apparatus that performs a process of determining the type of an image based on a pixel value of the pixel of an image of a document composed of a plurality of pixels. a first edge detecting means for detecting an edge pixel based on pixel values, on the basis of edge pixels first edge detecting unit detects, first is the ratio of the number of edge pixels to the total number of pixels in the original entire image A first calculating means for calculating one feature, a reducing means for reducing the image, a second edge detecting means for detecting an edge pixel based on a pixel value of each pixel of the image reduced by the reducing means, Second calculation means for calculating a second feature amount, which is a ratio of the number of edge pixels to the total number of pixels of the entire reduced image , based on the edge pixels detected by the second edge detection means; Calculation A ratio calculation unit that calculates a ratio of the second feature amount calculated by the second calculation unit with respect to the first feature amount calculated by, and a feature that calculates the feature amount related to the density distribution of the image for a plurality of directions, respectively. The amount calculation means, the angle dependency determination means for determining the presence or absence of the angle dependency of the density distribution of the image, and the ratio calculation means based on the feature amount in each direction calculated by the feature amount calculation means And a determination unit that determines the type of the image based on the ratio and the determination result of the angle dependency determination unit.

本発明に係る画像処理装置は、前記第1算出手段は、前記第1エッジ検出手段が検出したエッジ画素の数を計数する第1計数手段と、該第1計数手段が計数したエッジ画素の数の、前記画像中の画素の総数に対する第1比率を算出する手段とを有し、前記第2算出手段は、前記第2エッジ検出手段が検出したエッジ画素の数を計数する第2計数手段と、該第2計数手段が計数したエッジ画素の数の、前記縮小手段が縮小した画像中の画素の総数に対する第2比率を算出する手段とを有することを特徴とする。 The image processing apparatus according to the present invention, the number of the first calculating means includes a first counting means for counting the number of edge pixels by the first edge detecting unit detects the edge pixels first counting means has counted Means for calculating a first ratio with respect to the total number of pixels in the image, and the second calculation means includes second counting means for counting the number of edge pixels detected by the second edge detection means; And a means for calculating a second ratio of the number of edge pixels counted by the second counting means to the total number of pixels in the image reduced by the reducing means.

本発明に係る画像処理装置は、前記特徴量算出手段は、前記画像の各方向について、隣接する各画素の画素値の差の絶対値の総和をそれぞれ算出するように構成してあり、前記角度依存性判定手段は、各方向について算出された前記総和に基づいて、角度依存性の有無を判定するように構成してあることを特徴とする。   The image processing apparatus according to the present invention is configured such that the feature amount calculating unit calculates a sum of absolute values of differences between pixel values of adjacent pixels in each direction of the image, and the angle The dependency determining means is configured to determine whether or not there is angle dependency based on the sum calculated for each direction.

本発明に係る画像処理装置は、前記判定手段は、前記割合算出手段が算出した割合が所定の閾値以下であるか否かを判断する判断手段と、該判断手段によって前記割合が所定の閾値以下であると判断され、前記角度依存性判定手段の判定結果が有りである場合、万線を含む画像であると判定する手段とを有することを特徴とする。   In the image processing apparatus according to the present invention, the determination unit determines whether or not the ratio calculated by the ratio calculation unit is equal to or less than a predetermined threshold, and the ratio is equal to or less than the predetermined threshold by the determination unit. And a means for determining that the image includes a line when there is a determination result of the angle dependence determination means.

本発明に係る画像処理装置は、前記判定手段は、前記判断手段によって前記割合が所定の閾値以下であると判断され、前記角度依存性判定手段の判定結果が無しである場合、小文字又は網点上文字を含む画像であると判定する手段を有することを特徴とする。   In the image processing apparatus according to the present invention, when the determination unit determines that the ratio is equal to or less than a predetermined threshold by the determination unit, and the determination result of the angle dependency determination unit is none, lowercase letters or halftone dots It has a means to determine that it is an image containing the upper character.

本発明に係る画像処理装置は、前記判定手段は、複数の画素から構成される画素ブロック毎に画像の種類を判定するように構成してあることを特徴とする。   The image processing apparatus according to the present invention is characterized in that the determination means is configured to determine an image type for each pixel block including a plurality of pixels.

本発明に係る画像処理装置は、前記判定手段によって同一の種類であると判定された画素ブロックの数を計数する手段と、該手段で計数された画素ブロックの数に基づいて、前記画像が得られた原稿の種類を判別する手段とを備えることを特徴とする。
また、本発明に係る画像処理装置は、複数の画素から構成される原稿の画像の前記画素が有する画素値に基づいて前記画像の種類を判定する処理を行う画像処理装置において、 前記画像の各画素の画素値に基づいてエッジ画素を検出する第1エッジ検出手段と、原稿のエッジ画素の数である第3特徴量を算出する第3算出手段と、前記画像を縮小する縮小手段と、該縮小手段が縮小した画像の各画素の画素値に基づいてエッジ画素を検出する第2エッジ検出手段と、縮小された原稿のエッジ画素の数である第4特徴量を算出する第4算出手段と、前記第3算出手段が算出した第3特徴量に対する、前記第4算出手段が算出した第4特徴量の割合を算出する第2割合算出手段と、複数の方向について、前記画像の濃度分布に係る特徴量をそれぞれ算出する特徴量算出手段と、該特徴量算出手段が算出した各方向の特徴量に基づいて、前記画像の濃度分布の角度依存性の有無を判定する角度依存性判定手段と、前記第2割合算出手段が算出した割合及び前記角度依存性判定手段の判定結果に基づいて、前記画像の種類を判定する第2判定手段とを備えることを特徴とする
また、本発明に係る画像処理装置は、前記特徴量算出手段は、前記画像の各方向について、隣接する各画素の画素値の差の絶対値の総和をそれぞれ算出するように構成してあり、前記角度依存性判定手段は、各方向について算出された前記総和に基づいて、角度依存性の有無を判定するように構成してあることを特徴とする。
また、本発明に係る画像処理装置は、前記第2判定手段は、前記第2割合算出手段が算出した割合が所定の閾値以下であるか否かを判断する判断手段と、該判断手段によって前記割合が所定の閾値以下であると判断され、前記角度依存性判定手段の判定結果が有りである場合、万線を含む画像であると判定する手段とを有することを特徴とする。
また、本発明に係る画像処理装置は、前記第2判定手段は、前記判断手段によって前記割合が所定の閾値以下であると判断され、前記角度依存性判定手段の判定結果が無しである場合、小文字又は網点上文字を含む画像であると判定する手段を有することを特徴とする。
また、本発明に係る画像処理装置は、前記第2判定手段は、複数の画素から構成される画素ブロック毎に画像の種類を判定するように構成してあることを特徴とする。
また、本発明に係る画像処理装置は、前記第2判定手段によって同一の種類であると判定された画素ブロックの数を計数する手段と、該手段で計数された画素ブロックの数に基づいて、前記画像が得られた原稿の種類を判別する手段とを備えることを特徴とする。
The image processing apparatus according to the present invention obtains the image on the basis of means for counting the number of pixel blocks determined to be the same type by the determination means, and the number of pixel blocks counted by the means. And means for discriminating the type of the original document.
The image processing apparatus according to the present invention is an image processing apparatus that performs processing for determining the type of the image based on pixel values included in the pixel of the image of the composed document of a plurality of pixels, each of the image First edge detection means for detecting edge pixels based on pixel values of pixels, third calculation means for calculating a third feature quantity that is the number of edge pixels of the document, reduction means for reducing the image, A second edge detecting means for detecting edge pixels based on pixel values of each pixel of the image reduced by the reducing means; a fourth calculating means for calculating a fourth feature quantity that is the number of edge pixels of the reduced document; A second ratio calculating unit that calculates a ratio of the fourth feature amount calculated by the fourth calculating unit to a third feature amount calculated by the third calculating unit; and a plurality of directions in the density distribution of the image. These feature quantities A feature amount calculating means for calculating, an angle dependency determining means for determining presence / absence of an angle dependency of the density distribution of the image based on the feature amount in each direction calculated by the feature amount calculating means, and the second ratio. And a second determination unit that determines the type of the image based on the ratio calculated by the calculation unit and the determination result of the angle dependency determination unit .
Further, the image processing apparatus according to the present invention is configured such that the feature amount calculating unit calculates the sum of absolute values of differences between pixel values of adjacent pixels for each direction of the image, The angle dependency determining means is configured to determine the presence or absence of angle dependency based on the sum calculated for each direction.
In the image processing apparatus according to the present invention, the second determination unit determines whether the ratio calculated by the second ratio calculation unit is equal to or less than a predetermined threshold, and the determination unit And a means for determining that the image includes a line when it is determined that the ratio is equal to or less than a predetermined threshold value and the determination result of the angle dependency determination means is present.
In the image processing apparatus according to the present invention, when the second determination unit determines that the ratio is equal to or less than a predetermined threshold by the determination unit, and the determination result of the angle dependency determination unit is none, It has a means to determine that it is an image containing a small letter or a character on a halftone dot.
Moreover, the image processing apparatus according to the present invention is characterized in that the second determination means is configured to determine the type of image for each pixel block composed of a plurality of pixels.
Further, the image processing apparatus according to the present invention is based on means for counting the number of pixel blocks determined to be the same type by the second determination means, and based on the number of pixel blocks counted by the means, And means for discriminating the type of document from which the image is obtained.

本発明に係る画像形成装置は、上述した画像処理装置のいずれかひとつと、該画像処理装置で処理された画像に基づいて出力画像を形成する画像形成手段とを備えることを特徴とする。   An image forming apparatus according to the present invention includes any one of the above-described image processing apparatuses and an image forming unit that forms an output image based on an image processed by the image processing apparatus.

本発明に係るコンピュータプログラムは、コンピュータに、複数の画素から構成される原稿の画像の前記画素が有する画素値に基づいて前記画像の種類を判定させるためのコンピュータプログラムにおいて、コンピュータに、前記画像の各画素の画素値に基づいてエッジ画素を検出させる第1エッジ検出ステップと、コンピュータに、該第1エッジ検出ステップで検出されたエッジ画素基づいて、原稿全体の画像の総画素数に対するエッジ画素の数の比率である第1特徴量を算出させる第1算出ステップと、コンピュータに、前記画像を縮小させる縮小ステップと、コンピュータに、該縮小ステップで縮小された画像の各画素の画素値に基づいてエッジ画素を検出させる第2エッジ検出ステップと、コンピュータに、該第2エッジ検出ステップで検出されたエッジ画素基づいて、縮小された原稿全体の画像の総画素数に対するエッジ画素の数の比率である第2特徴量を算出させる第2算出ステップと、コンピュータに、前記第1算出ステップで算出された第1特徴量に対する、前記第2算出ステップで算出された第2特徴量の割合を算出させる割合算出ステップと、コンピュータに、複数の方向について、前記画像の濃度分布に係る特徴量をそれぞれ算出させる特徴量算出ステップと、コンピュータに、該特徴量算出ステップで算出された各方向の特徴量に基づいて、前記画像の濃度分布の角度依存性の有無を判定させる角度依存性判定ステップと、コンピュータに、前記割合算出ステップで算出された割合及び前記角度依存性判定ステップでの判定結果に基づいて、前記画像の種類を判定させる判定ステップとを含むことを特徴とする。
また、本発明に係るコンピュータプログラムは、コンピュータに、複数の画素から構成される原稿の画像の前記画素が有する画素値に基づいて前記画像の種類を判定させるためのコンピュータプログラムにおいて、コンピュータに、前記画像の各画素の画素値に基づいてエッジ画素を検出させる第1エッジ検出ステップと、コンピュータに、原稿のエッジ画素の数である第3特徴量を算出させる第3算出ステップと、コンピュータに、前記画像を縮小させる縮小ステップと、コンピュータに、該縮小ステップで縮小された画像の各画素の画素値に基づいてエッジ画素を検出させる第2エッジ検出ステップと、コンピュータに、縮小された原稿のエッジ画素の数である第4特徴量を算出させる第4算出ステップと、コンピュータに、前記第3算出ステップで算出された第3特徴量に対する、前記第4算出ステップで算出された第4特徴量の割合を算出させる第2割合算出ステップと、コンピュータに、複数の方向について、前記画像の濃度分布に係る特徴量をそれぞれ算出させる特徴量算出ステップと、コンピュータに、該特徴量算出ステップで算出された各方向の特徴量に基づいて、前記画像の濃度分布の角度依存性の有無を判定させる角度依存性判定ステップと、コンピュータに、前記第2割合算出ステップで算出された割合及び前記角度依存性判定ステップでの判定結果に基づいて、前記画像の種類を判定させる判定ステップとを含むことを特徴とする。
A computer program according to the present invention is a computer program for causing a computer to determine the type of an image based on a pixel value of the pixel of an image of an original composed of a plurality of pixels. A first edge detecting step for detecting an edge pixel based on a pixel value of each pixel; and an edge pixel corresponding to the total number of pixels of the image of the entire document based on the edge pixel detected by the computer at the first edge detecting step. a first calculation step of calculating a first characteristic quantity is the ratio of the number of the computer, a reduced step to shrink the image, to the computer, based on the pixel value of each pixel of the reduced image in said reduced step a second edge detecting step for detecting an edge pixel Te, the computer, the second edge detection stearate Based on the detected edge pixel in-flop, a second calculation step of calculating a second feature quantity is the ratio of the number of edge pixels to the total number of pixels of the reduced original entire image, to the computer, the first A ratio calculation step for calculating a ratio of the second feature quantity calculated in the second calculation step with respect to the first feature quantity calculated in the calculation step; and causing the computer to relate to the density distribution of the image in a plurality of directions. A feature amount calculating step for calculating each feature amount; and an angle dependency for causing the computer to determine whether or not there is an angle dependency of the density distribution of the image based on the feature amount in each direction calculated in the feature amount calculating step. And determining the image based on the ratio calculated in the ratio calculation step and the determination result in the angle dependence determination step. Characterized in that it comprises a determining step of determining the type.
A computer program according to the present invention is a computer program for causing a computer to determine the type of the image based on a pixel value of the pixel of an image of an original composed of a plurality of pixels. A first edge detecting step of detecting edge pixels based on a pixel value of each pixel of the image; a third calculating step of causing a computer to calculate a third feature amount that is the number of edge pixels of the document; and A reduction step for reducing the image; a second edge detection step for causing the computer to detect an edge pixel based on a pixel value of each pixel of the image reduced in the reduction step; and an edge pixel of the reduced document in the computer. A fourth calculation step of calculating a fourth feature quantity that is a number of A second ratio calculating step for calculating a ratio of the fourth feature amount calculated in the fourth calculation step with respect to the third feature amount calculated in the step; and causing the computer to calculate the density distribution of the image in a plurality of directions. A feature amount calculating step for calculating the feature amount, and an angle dependency for causing the computer to determine whether or not there is an angle dependency of the density distribution of the image based on the feature amount in each direction calculated in the feature amount calculating step. And a determination step for causing the computer to determine the type of the image based on the ratio calculated in the second ratio calculation step and the determination result in the angle dependency determination step. To do.

本発明に係る記録媒体は、上述したコンピュータプログラムが記録してあることを特徴とする。   A recording medium according to the present invention is recorded with the computer program described above.

本発明によれば、縮小する前の画像の各画素の画素値に基づいてエッジ画素を検出し、検出されたエッジ画素基づいて前記第1特徴量(第3特徴量)を算出する。前記画像を縮小し、縮小された画像の各画素の画素値に基づいてエッジ画素を検出し、検出されたエッジ画素基づいて第2特徴量(第4特徴量)を算出する。第1特徴量(第3特徴量)に対する第2特徴量(第4特徴量)の割合を算出する。また、複数の方向について画像の濃度分布に係る特徴量を算出し、算出された各方向の特徴量に基づいて前記画像の濃度分布の角度依存性の有無を判定する。上述した第1特徴量(第3特徴量)に対する第2特徴量(第4特徴量)の割合と、前記角度依存性の有無とに基づいて前記画像の種類を判定する。 According to the present invention, an edge pixel is detected based on the pixel value of each pixel of the image before reduction, and the first feature amount (third feature amount) is calculated based on the detected edge pixel . The image is reduced, an edge pixel is detected based on the pixel value of each pixel of the reduced image, and a second feature amount (fourth feature amount) is calculated based on the detected edge pixel . A ratio of the second feature value (fourth feature value) to the first feature value (third feature value) is calculated. In addition, a feature amount related to the density distribution of the image is calculated for a plurality of directions, and the presence / absence of angle dependency of the density distribution of the image is determined based on the calculated feature amount of each direction. The type of the image is determined based on the ratio of the second feature value (fourth feature value) to the first feature value (third feature value) described above and the presence or absence of the angle dependency.

また、本発明によれば、前記第1特徴量として、縮小する前の画像の各画素の画素値に基づいて検出されたエッジ画素の数の、画像の全画素数に対する第1比率を算出し、前記第2特徴量として、縮小(又は低解像度変換)された画像の各画素の画素値に基づいて検出されたエッジ画素の数の、縮小後の画像の全画素数に対する第2比率を算出する。そして、第1比率に対する第2比率の割合を算出する。 According to the invention, as the first feature amount, a first ratio of the number of edge pixels detected based on a pixel value of each pixel of the image before the reduction to the total number of pixels of the image is calculated. As the second feature amount, a second ratio of the number of edge pixels detected based on the pixel value of each pixel of the reduced (or low resolution converted) image to the total number of pixels of the reduced image is calculated. To do. Then, the ratio of the second ratio to the first ratio is calculated.

ここで、例えば、小さい文字(例えば、フォントサイズが4ポイント程度)を多く含む画像あるいは複雑な網点上文字を含む画像を縮小した場合、文字同士の離隔寸法が小さくなり文字同士が繋がって一体化し、あるいは文字の形状がくずれ、文字として認識することが困難となる。また、万線を含む画像を縮小した場合、万線同士が繋がって一体化し、万線として認識することが困難となる。すなわち、小さい文字を多く含む画像、複雑な網点上文字、あるいは万線を含む画像(縮小前の画像)においては、第1比率(第3特徴量)に比べて第2比率(第4特徴量)が非常に小さくなる。 Here, for example, when an image containing many small characters (for example, a font size of about 4 points) or an image containing complicated halftone dots is reduced, the distance between the characters is reduced and the characters are connected together. Or the shape of the character is broken, making it difficult to recognize the character. Further, when an image including a line is reduced, the lines are connected and integrated, making it difficult to recognize the line. That is, in an image including many small characters, complex halftone characters, or an image including a line (image before reduction), the second ratio (fourth feature ) compared to the first ratio (third feature amount). Amount) becomes very small.

これに対して、例えば、通常用いられる文字(例えば、フォントサイズが9〜11ポイント程度)を含む画像を縮小した場合、文字同士の離隔寸法が小さくなったとしても、文字同士が繋がることは少なく、あるいは文字の形状がくずれることもなく、文字として認識することができる。すなわち、通常用いられる文字を含む画像(縮小前の画像)においては、第1比率(第3特徴量)に比べて第2比率(第4特徴量)は若干小さくなるものの、小さい文字を多く含む画像、複雑な網点上文字、あるいは万線を含む画像の場合に比べて、比率の減少度合いは少ない。これにより、算出された第1比率(第3特徴量)に対する第2比率(第4特徴量)の割合に基づいて、画像に擬似文字が含まれるか否かの判定を行うことができる。 On the other hand, for example, when an image including normally used characters (for example, font size is about 9 to 11 points) is reduced, even if the distance between the characters is reduced, the characters are rarely connected. Or, the character can be recognized as a character without being deformed. That is, in an image including characters that are normally used (image before reduction), the second ratio (fourth feature amount) is slightly smaller than the first ratio (third feature amount) , but many small characters are included. Compared to the case of an image, a character on a halftone dot, or an image including a line, the rate of decrease in the ratio is small. Accordingly, it is possible to determine whether or not a pseudo character is included in the image based on the ratio of the second ratio (fourth feature quantity) to the calculated first ratio (third feature quantity) .

尚、本発明において、小さな文字が多く含まれている場合、「小文字」が含まれている、あるいは、小文字領域が含まれていると表現している。また、小さい文字を多く含むとは、例えば、フォントサイズが4ポイント、5ポイント程度の文字よりなる文章が複数行存在する場合や3cm×3cm程度の領域に上記サイズの文字で書かれた領域が存在する場合をいう。上記小さい文字の領域が判別できるか否かは、スキャナやデジタル複写機などの画像形成装置の性能に依存するので、これらの装置の性能に応じて上記小さい文字が含まれる領域の範囲(下限)を決めれば良い。   In the present invention, when many small characters are included, it is expressed that “lowercase” is included or a lowercase area is included. Also, including many small characters means, for example, that there are multiple lines of text consisting of characters with a font size of 4 points or 5 points, or an area written in the above size in an area of about 3 cm × 3 cm. The case where it exists. Whether or not the small character area can be determined depends on the performance of an image forming apparatus such as a scanner or a digital copying machine. Therefore, the range of the area including the small character (lower limit) according to the performance of these apparatuses. You can decide.

また、万線は複数の平行な直線により構成され、複数の直線は角度依存性を有しているため、複数の方向での特徴量を比較することにより、濃度分布の角度依存性から複数の直線の角度依存性を得ることができる。複数の直線が角度依存性を有している場合には、この直線を含む画像が万線を含む画像であると精度よく判定できる。濃度分布に係る特徴量を各方向について算出するのみでよいため、万線の判定を簡単に行うことができる。従って、上述した第1比率(第3特徴量)に対する第2比率(第4特徴量)の割合に基づいて擬似文字が含まれると判定された画像に対して、画像の濃度分布の角度依存性の有無に基づいて、擬似文字のうちの万線が含まれる画像であるか否かの判定を行うことができる。 In addition, since each line is composed of a plurality of parallel straight lines, and the plurality of straight lines have an angle dependency, by comparing feature amounts in a plurality of directions, a plurality of lines can be obtained from the angle dependency of the density distribution. The angle dependence of the straight line can be obtained. When a plurality of straight lines have an angle dependency, it can be accurately determined that an image including the straight lines is an image including a parallel line. Since it is only necessary to calculate the feature amount related to the density distribution in each direction, it is possible to easily determine the line. Accordingly, the angle dependency of the density distribution of the image with respect to the image determined to contain the pseudo character based on the ratio of the second ratio (fourth feature quantity) to the first ratio (third feature quantity) described above. It is possible to determine whether or not the image includes a line of pseudo characters based on the presence or absence of.

尚、本発明において、濃度分布、あるいは、エッジが角度依存性を有するとは、特定の方向(例えば、0度の方向(主走査方向))の濃度分布に係る特徴量が大きな値となる、あるいは、エッジの出現頻度が大きくなることを意味し、濃度分布、あるいは、エッジの角度依存性が無いとは、濃度分布、あるいは、エッジが上記の条件を充たさない場合を意味するものとする。   In the present invention, the fact that the density distribution or the edge has an angle dependency means that the feature amount related to the density distribution in a specific direction (for example, the direction of 0 degree (main scanning direction)) is a large value. Alternatively, it means that the appearance frequency of the edge increases, and that there is no density distribution or edge angle dependency means that the density distribution or the edge does not satisfy the above condition.

本発明によれば、画像の複数の方向について、隣接する画素間での濃度値の差の絶対値の総和を算出する。この総和は、画像の濃度分布に係る特徴量であり、濃度変化の多い方向では総和が大きくなり、少ない方向では総和が小さい値となる。濃度変化の少ない方向が、万線を構成する複数の直線の方向であるため、上記総和の角度依存性の有無を調べることにより、万線を含むか否かを判定することができる。加算、減算及び比較のみで判定を行うことができるため、処理が簡単である。   According to the present invention, the sum of absolute values of differences in density values between adjacent pixels is calculated for a plurality of directions of an image. This sum is a feature amount related to the density distribution of the image. The sum is large in the direction where the density change is large, and the sum is small in the direction where the density is small. Since the direction in which the density change is small is the direction of a plurality of straight lines constituting the line, whether or not the line is included can be determined by examining the presence or absence of the angle dependency of the sum. Since the determination can be performed only by addition, subtraction, and comparison, the processing is simple.

本発明によれば、縮小前の画像に基づく第1比率(第3特徴量)に対する、縮小後の画像に基づく第2比率(第4特徴量)の割合が所定の閾値以下であり、複数の方向について算出された画像の濃度分布に係る特徴量に角度依存性が有る場合、万線を含む画像であると判定する。また、前記割合が所定の閾値以下であり、複数の方向について算出された画像の濃度分布に係る特徴量に角度依存性が無い場合、小文字又は網点上文字を含む画像であると判定する。よって、画像に万線、あるいは、小文字又は網点上文字が含まれているか否かを精度良く判定することができる。 According to the present invention, the ratio of the second ratio (fourth feature amount) based on the image after reduction to the first ratio (third feature amount) based on the image before reduction is equal to or less than a predetermined threshold, and a plurality of If the feature amount related to the density distribution of the image calculated with respect to the direction has angle dependency, it is determined that the image includes a line. Further, when the ratio is equal to or less than a predetermined threshold value and the feature amount related to the density distribution of the image calculated for a plurality of directions has no angle dependency, it is determined that the image includes lowercase letters or halftone characters. Therefore, it is possible to accurately determine whether the image includes a line, a lowercase letter, or a halftone dot character.

また、画像に万線、あるいは、小文字又は網点上文字が含まれると判定された場合には、判定信号を出力することにより、画像の種類に応じて最適な画像処理を施して品質の良い画像を形成することが可能となる。具体的には、例えば、フィルタ処理では、万線を含む画像に対しては、文字及び印刷写真が混在している文字/印刷写真原稿に用いられるフィルタで処理を行うよりも平滑化されるフィルタ係数を用い、小さい文字を多く含む画像に対しては、文字/印刷写真原稿に用いられるフィルタで処理を行うよりも多少文字がくっきりするフィルタ係数を用いる。また、中間調処理(階調再現処理部)では、万線を含む画像に対しては、階調性を重視したディザ処理又は誤差拡散処理を行い、小さい文字を多く含む画像に対しては、解像力を重視した処理を行う。   In addition, when it is determined that the image contains lines, lowercase letters, or halftone dots, a determination signal is output to perform optimum image processing according to the type of the image and to have high quality. An image can be formed. Specifically, for example, in the filter process, a filter that is smoother than an image including a line is processed by a filter used for a character / printed photo document in which characters and a printed photo are mixed. For images containing many small characters using a coefficient, a filter coefficient is used that makes the characters slightly sharper than when processing with a filter used for a character / printed photographic document. In the halftone processing (gradation reproduction processing unit), dither processing or error diffusion processing that emphasizes gradation is performed on an image including a line, and for an image including many small characters, Performs processing that emphasizes resolution.

本発明によれば、画像を複数の画素ブロック(例えば、4×4画素、8×8画素など)に分割し、分割された画素ブロック毎に算出された第1比率(第3特徴量)に対する第2比率(第4特徴量)の割合、濃度分布に係る特徴量に基づいて、各画素ブロックに万線、あるいは、小文字又は網点上文字が含まれるか否かの領域判定を行う。これにより、画像の所要の領域毎に擬似文字の有無を判定することができる。 According to the present invention, an image is divided into a plurality of pixel blocks (for example, 4 × 4 pixels, 8 × 8 pixels, etc.), and the first ratio (third feature amount) calculated for each divided pixel block is used. Based on the ratio of the second ratio (fourth feature amount) and the feature amount related to the density distribution, an area determination is performed as to whether or not each pixel block includes a line, a lower case character, or a halftone dot character. Thereby, the presence or absence of a pseudo character can be determined for each required area of the image.

本発明によれば、分割された画素ブロック毎に万線、あるいは、小文字又は網点上文字が含まれるか否かの領域判定を行い、万線、あるいは、小文字又は網点上文字が含まれると判定された画素ブロックの数に基づき、画像が得られた原稿に万線領域、あるいは、小文字領域又は網点上文字領域が含まれると判定する。これにより、原稿に万線領域、あるいは、小文字領域又は網点上文字領域が含まれるか否かを精度良く判定することができる。具体的には、判定された画素ブロックの数が所定の閾値より大きい場合、画像が得られた原稿に万線領域、あるいは、小文字領域又は網点上文字領域が含まれると判定する。   According to the present invention, it is determined whether each divided pixel block includes a line or a lowercase letter or halftone dot character, and a line or a lowercase letter or halftone dot character is included. Based on the number of pixel blocks determined to be, it is determined that the original from which the image was obtained includes a line area, a lowercase area, or a character area on halftone dots. As a result, it is possible to accurately determine whether the original includes a line area, a lower case area, or a halftone character area. Specifically, when the determined number of pixel blocks is larger than a predetermined threshold, it is determined that the original from which the image is obtained includes a line area, a lowercase area, or a halftone dot character area.

本発明によれば、記録媒体に上述のコンピュータプログラムを記録する。コンピュータが記録媒体からコンピュータプログラムを読み出して、画像に万線、あるいは、小文字又は網点上文字が含まれるか否かを判定する処理を行うことが可能となる。   According to the present invention, the above-described computer program is recorded on a recording medium. The computer can read out the computer program from the recording medium and perform a process of determining whether the image includes a line, a lowercase letter, or a halftone dot character.

本発明にあっては、縮小する前の画像に基づいてエッジ画素を検出し、検出されたエッジ画素基づいて第1特徴量(第3特徴量)を算出し、前記画像を縮小し、縮小された画像に基づいてエッジ画素を検出し、検出されたエッジ画素基づいて第2特徴量(第4特徴量)を算出する。算出された第1特徴量(第3特徴量)に対する第2特徴量(第4特徴量)の割合に基づいて、画像に擬似文字(万線、小文字、又は網点上文字)が含まれるか否かの判定を行うことにより、擬似文字の有無を精度よく判定することができる。また、画像の濃度分布に係る特徴量を複数の方向について算出し、濃度分布の角度依存性の有無に基づいて、画像に万線が含まれるか否かの判定を行うことにより、万線の有無を精度よく判定することができる。更に、擬似文字が含まれると判定された画像に対して最適な画像処理を施すことができ、画像形成を行う場合などに、画質の劣化を防止し、画質を高めることができる。 In the present invention, an edge pixel is detected based on an image before reduction, a first feature amount (third feature amount) is calculated based on the detected edge pixel , and the image is reduced and reduced. An edge pixel is detected based on the detected image, and a second feature amount (fourth feature amount) is calculated based on the detected edge pixel . Whether the image includes pseudo characters (lines, lowercase letters, or halftone dots) based on the ratio of the second feature value (fourth feature value) to the calculated first feature value (third feature value) By determining whether or not there is a pseudo character, it is possible to accurately determine the presence or absence of a pseudo character. In addition, the feature amount related to the density distribution of the image is calculated for a plurality of directions, and based on the presence / absence of the angle dependency of the density distribution, it is determined whether or not the image includes a line. Presence / absence can be accurately determined. Furthermore, optimal image processing can be performed on an image determined to contain pseudo characters, and image quality deterioration can be prevented and image quality can be improved when image formation is performed.

また、本発明にあっては、縮小前の画像に基づく第1比率を第1特徴量として算出し、縮小後の画像に基づく第2比率を第2特徴量として算出する。第1比率に対する第2比率の割合に基づいて、画像に擬似文字が含まれるか否かを判定する構成とすることにより、簡単な演算のみで擬似文字を含む画像であるか否かを制度よく判定することができる。また、精度よく擬似文字を含む画像であることを判定できるため、擬似文字を含む画像に対して最適な画像処理を確実に施すことができ、画質を確実に高めることができる。   In the present invention, the first ratio based on the image before reduction is calculated as the first feature amount, and the second ratio based on the image after reduction is calculated as the second feature amount. Based on the ratio of the second ratio to the first ratio, it is determined whether or not the image includes a pseudo character by simply determining whether the image includes the pseudo character or not. Can be determined. Further, since it can be accurately determined that the image includes pseudo characters, it is possible to reliably perform optimal image processing on the image including pseudo characters, and to reliably improve image quality.

更に、本発明にあっては、画像の複数の方向について、隣接する画素間での濃度値の差の絶対値の総和を特徴量として算出し、この総和を基に角度依存性の有無を判定する構成とすることにより、前記総和を算出するのみで簡単に万線を含む画像であるか否かを判定することができる。また、精度よく万線を含む画像であることを判定できるため、万線を含む画像に対して最適な画像処理を確実に施すことができ、画質を確実に高めることができる。   Furthermore, in the present invention, the sum of absolute values of differences in density values between adjacent pixels is calculated as a feature amount for a plurality of directions of an image, and the presence / absence of angle dependency is determined based on this sum. With this configuration, it is possible to easily determine whether or not the image includes a line by simply calculating the sum. In addition, since it can be accurately determined that the image includes a line, optimal image processing can be reliably performed on the image including a line, and the image quality can be reliably improved.

本発明にあっては、縮小前の画像に基づく第1比率(第3特徴量)に対する、縮小後の画像に基づく第2比率(第4特徴量)の割合が所定の閾値以下であり、複数の方向について算出された画像の濃度分布に係る特徴量に角度依存性が有る場合、万線を含む画像であると判定し、前記割合が所定の閾値以下であり、複数の方向について算出された画像領域の濃度分布に係る特徴量に角度依存性が無い場合、小文字又は網点上文字を含む画像であると判定する。よって、画像に万線、あるいは、小文字又は網点上文字が含まれているか否かを精度良く判定することができる。 In the present invention, the ratio of the second ratio (fourth feature amount) based on the image after reduction to the first ratio (third feature amount) based on the image before reduction is equal to or less than a predetermined threshold, and If the feature amount related to the density distribution of the image calculated for the direction of the image has angle dependency, it is determined that the image includes a line, the ratio is equal to or less than a predetermined threshold value, and the image is calculated for a plurality of directions. When the feature amount related to the density distribution of the image region has no angle dependency, it is determined that the image includes lowercase letters or halftone dots. Therefore, it is possible to accurately determine whether the image includes a line, a lowercase letter, or a halftone dot character.

本発明にあっては、画像を複数の画素ブロック(例えば、4×4画素、8×8画素など)に分割し、分割された画素ブロック毎に万線、あるいは、小文字又は網点上文字が含まれるか否かの領域判定を行う。これにより、画像の所要の領域毎に万線、あるいは、小文字又は網点上文字の有無を判定することができる。   In the present invention, an image is divided into a plurality of pixel blocks (for example, 4 × 4 pixels, 8 × 8 pixels, etc.), and each divided pixel block has a line, lowercase letters or halftone dots. The area is determined whether or not it is included. Accordingly, it is possible to determine the presence or absence of lines, lowercase letters or halftone dots for each required area of the image.

本発明にあっては、同一の種類(万線、あるいは、小文字又は網点上文字を含む領域)であると判定された画素ブロックの数に基づいて、画像が得られた原稿に万線領域、あるいは、小文字領域又は網点上文字領域が含まれると判定する。これにより、原稿に万線領域、あるいは、小文字領域又は網点上文字領域が含まれるか否かを精度良く判定することができる。   In the present invention, the line area is added to the original from which the image is obtained based on the number of pixel blocks determined to be of the same type (line or area including lowercase letters or halftone dots). Alternatively, it is determined that a lowercase character area or a halftone dot character area is included. As a result, it is possible to accurately determine whether the original includes a line area, a lower case area, or a halftone character area.

本発明にあっては、記録媒体に上述のコンピュータプログラムを記録する構成とすることにより、コンピュータが記録媒体からコンピュータプログラムを読み出して、画像に万線、あるいは、小文字又は網点上文字が含まれるか否かを判定する処理を行うことが可能となるため、各画像に最適な画像処理を行う機能を簡単に実現することができる。   In the present invention, the computer program is recorded on the recording medium so that the computer reads the computer program from the recording medium, and the image includes lines, lowercase letters or halftone dots. Therefore, it is possible to easily perform a function of performing image processing optimal for each image.

(実施の形態1)
以下、本発明をその実施の形態を示す図面に基づいて詳述する。図1は本発明に係る画像処理装置を備える画像形成装置100の構成を示すブロック図である。画像形成装置100(例えば、デジタルカラー複写機、又は、複合機能、プリンタ機能、ファックス機能及び電子メール配信機能等を備えた複合機)は、カラー画像入力装置1、カラー画像処理装置2(画像処理装置)、画像形成手段としてのカラー画像出力装置3、各種操作を行うための操作パネル4などを備える。カラー画像入力装置1で原稿を読み取ることにより得られたRGB(R:赤、G:緑、B:青)のアナログ信号の画像データは、カラー画像処理装置2へ出力され、カラー画像処理装置2で所定の処理が行われ、CMYK(C:シアン、M:マゼンタ、Y:イエロー、K:黒)のデジタルカラー信号としてカラー画像出力装置3へ出力される。
(Embodiment 1)
Hereinafter, the present invention will be described in detail with reference to the drawings illustrating embodiments thereof. FIG. 1 is a block diagram illustrating a configuration of an image forming apparatus 100 including an image processing apparatus according to the present invention. The image forming apparatus 100 (for example, a digital color copying machine or a multi-function machine having a multi-function, a printer function, a fax function, an e-mail delivery function, etc.) includes a color image input device 1 and a color image processing device 2 (image processing). Apparatus), a color image output device 3 as image forming means, an operation panel 4 for performing various operations, and the like. Image data of RGB (R: red, G: green, B: blue) analog signals obtained by reading a document with the color image input device 1 is output to the color image processing device 2, and the color image processing device 2. Then, a predetermined process is performed and output to the color image output device 3 as a digital color signal of CMYK (C: cyan, M: magenta, Y: yellow, K: black).

カラー画像入力装置1は、例えば、CCD(Charged Coupled Device)を備えたスキャナであり、原稿画像からの反射光像をRGBのアナログ信号として読み取り、読み取ったRGB信号をカラー画像処理装置2へ出力する。また、カラー画像出力装置3は、原稿画像の画像データを記録紙上に出力する電子写真方式やインクジェット方式などを用いた画像形成手段である。また、カラー画像出力装置3は、ディスプレイ等の表示装置であってもよい。   The color image input device 1 is, for example, a scanner including a CCD (Charged Coupled Device), reads a reflected light image from a document image as an RGB analog signal, and outputs the read RGB signal to the color image processing device 2. . The color image output device 3 is an image forming unit using an electrophotographic system or an inkjet system that outputs image data of a document image onto a recording sheet. The color image output device 3 may be a display device such as a display.

カラー画像処理装置2は、A/D変換部20、シェーディング補正部21、原稿種別判別部22、入力階調補正部23、領域分離処理部24、色補正部25、黒生成下色除去部26、空間フィルタ処理部27、出力階調補正部28、階調再現処理部29、これらのハードウェア各部の動作を制御するCPU(Central Processing Unit )またはASIC(Application Specific Integrated Circuit)などにより構成される。   The color image processing apparatus 2 includes an A / D conversion unit 20, a shading correction unit 21, a document type determination unit 22, an input tone correction unit 23, a region separation processing unit 24, a color correction unit 25, and a black generation and under color removal unit 26. , A spatial filter processing unit 27, an output tone correction unit 28, a tone reproduction processing unit 29, and a CPU (Central Processing Unit) or ASIC (Application Specific Integrated Circuit) that controls the operation of each of these hardware units. .

A/D変換部20は、カラー画像入力装置1から入力されたRGB信号を、例えば、10ビットのデジタル信号に変換し、変換後のRGB信号をシェーディング補正部21へ出力する。   The A / D conversion unit 20 converts the RGB signal input from the color image input device 1 into, for example, a 10-bit digital signal, and outputs the converted RGB signal to the shading correction unit 21.

シェーディング補正部21は、入力されたRGB信号に対して、カラー画像入力装置1の照明系、結像系、撮像系などで生じた各種の歪みを取り除く補正処理を行う。また、シェーディング補正部21は、カラーバランスの調整を行い、調整後のRGB信号を原稿種別判別部22へ出力する。   The shading correction unit 21 performs correction processing for removing various distortions generated in the illumination system, imaging system, imaging system, and the like of the color image input apparatus 1 on the input RGB signal. The shading correction unit 21 adjusts the color balance, and outputs the adjusted RGB signal to the document type determination unit 22.

原稿種別判別部22は、シェーディング補正部21にて各種の歪みが取り除かれ、カラーバランスの調整がなされたRGB信号(RGBの反射率信号)を濃度信号などカラー画像処理装置2に採用されている画像処理システムの扱い易い信号に変換するとともに、原稿種別の判別を行う。原稿種別判別部22は、原稿種別の判別結果である原稿種別判別信号を入力階調補正部23、色補正部25、黒生成下色除去部26、空間フィルタ処理部27、階調再現処理部29へ出力する。なお、原稿種別の判別については後述する。また、原稿種別判別部22は、シェーディング補正部21から入力されたRGB信号をそのまま入力階調補正部23へ出力する。   The original type discriminating unit 22 is used in the color image processing apparatus 2 such as a density signal using an RGB signal (RGB reflectance signal) from which various distortions have been removed by the shading correction unit 21 and the color balance has been adjusted. The signal is converted into an easy-to-handle signal for the image processing system, and the document type is determined. The document type determination unit 22 outputs a document type determination signal, which is a determination result of the document type, to an input tone correction unit 23, a color correction unit 25, a black generation and under color removal unit 26, a spatial filter processing unit 27, and a tone reproduction processing unit. To 29. The document type determination will be described later. The document type determination unit 22 outputs the RGB signal input from the shading correction unit 21 to the input tone correction unit 23 as it is.

入力階調補正部23は、入力されたRGB信号(RGBの反射率信号)に対して、カラーバランスを整える処理を行うとともに、下地濃度の除去又はコントラストなど画質調整処理を施し、処理後のRGB信号を領域分離処理部24へ出力する。   The input tone correction unit 23 performs a process of adjusting the color balance on the input RGB signal (RGB reflectance signal), and performs an image quality adjustment process such as removal of background density or contrast, and the processed RGB signal The signal is output to the region separation processing unit 24.

領域分離処理部24は、入力されたRGB信号に基づき、入力された画像中の各画素が、文字領域、網点領域、写真領域の何れであるかを分離する。領域分離処理部24は、分離結果に基づいて、各画素がどの領域に属しているかを示す領域識別信号を色補正部25、黒生成下色除去部26、空間フィルタ処理部27、階調再現処理部29へ出力する。また、領域分離処理部24は、入力されたRGB信号をそのまま後段の色補正部25へ出力する。   Based on the input RGB signal, the region separation processing unit 24 separates whether each pixel in the input image is a character region, a halftone dot region, or a photographic region. Based on the separation result, the region separation processing unit 24 outputs a region identification signal indicating which region each pixel belongs to, a color correction unit 25, a black generation and under color removal unit 26, a spatial filter processing unit 27, a tone reproduction The data is output to the processing unit 29. The region separation processing unit 24 outputs the input RGB signal as it is to the subsequent color correction unit 25.

色補正部25は、入力されたRGB信号をCMYの色空間に変換し、カラー画像出力装置3の特性に合わせて色補正を行い、補正後のCMY信号を黒生成下色除去部26へ出力する。具体的には、色補正部25は、色再現の忠実化のため、不要吸収成分を含むCMY色材の分光特性に基づいた色濁りを取り除く処理を行う。   The color correction unit 25 converts the input RGB signal into a CMY color space, performs color correction in accordance with the characteristics of the color image output device 3, and outputs the corrected CMY signal to the black generation and under color removal unit 26. To do. Specifically, the color correction unit 25 performs a process of removing color turbidity based on the spectral characteristics of CMY color materials including unnecessary absorption components in order to make color reproduction faithful.

黒生成下色除去部26は、色補正部25から入力されたCMY信号に基づいて、K(黒)信号を生成するとともに、入力されたCMY信号からK信号を差し引いて新たなCMY信号を生成し、生成したCMYK信号を空間フィルタ処理部27へ出力する。   The black generation and under color removal unit 26 generates a K (black) signal based on the CMY signal input from the color correction unit 25 and generates a new CMY signal by subtracting the K signal from the input CMY signal. Then, the generated CMYK signal is output to the spatial filter processing unit 27.

黒生成下色除去部26における処理の一例を示す。例えば、スケルトンブラックによる黒生成を行う処理の場合、スケルトンカーブの入出力特性をy=f(x)とし、入力されるデータをC、M、Yとし、出力されるデータをC′、M′、Y′、K′とし、UCR(Under Color Removal)率をα(0<α<1)とすると、黒生成下色除去処理により出力されるデータ夫々は、K′=f{min(C、M、Y)}、C′=C−αK′、M′=M−αK′、Y′=Y−αK′で表される。   An example of processing in the black generation and under color removal unit 26 is shown. For example, in the process of generating black by skeleton black, the input / output characteristic of the skeleton curve is y = f (x), the input data is C, M, Y, and the output data is C ′, M ′. , Y ′, K ′, and a UCR (Under Color Removal) rate α (0 <α <1), the data output by the black generation and under color removal processing is K ′ = f {min (C, M, Y)}, C ′ = C−αK ′, M ′ = M−αK ′, and Y ′ = Y−αK ′.

空間フィルタ処理部27は、黒生成下色除去部26から入力されたCMYK信号に対して、領域識別信号に基づいたデジタルフィルタによる空間フィルタ処理を行う。これにより、画像データの空間周波数特性が補正され、カラー画像出力装置3における出力画像のぼやけ、又は粒状性劣化を防止する。例えば、空間フィルタ処理部27は、領域分離処理部24において文字領域に分離された領域を、特に黒文字又は色文字の再現性を高めるため、鮮鋭強調処理を施し高周波成分を強調する。また、空間フィルタ処理部27は、領域分離処理部24において網点領域に分離された領域を、入力網点成分を除去するためのローパス・フィルタ処理を施す。空間フィルタ処理部27は、処理後のCMYK信号を出力階調補正部28へ出力する。   The spatial filter processing unit 27 performs spatial filter processing on the CMYK signal input from the black generation and under color removal unit 26 using a digital filter based on the region identification signal. As a result, the spatial frequency characteristics of the image data are corrected, and blurring of the output image in the color image output device 3 or deterioration of graininess is prevented. For example, the spatial filter processing unit 27 performs sharp enhancement processing on the region separated into character regions by the region separation processing unit 24 to enhance the reproducibility of black characters or color characters, and emphasizes high frequency components. The spatial filter processing unit 27 performs low-pass filter processing for removing the input halftone component on the region separated into the halftone dot region by the region separation processing unit 24. The spatial filter processing unit 27 outputs the processed CMYK signal to the output tone correction unit 28.

出力階調補正部28は、空間フィルタ処理部27から入力されたCMYK信号に対して、カラー画像出力装置3の特性値である網点面積率に変換する出力階調補正処理を行い、出力階調補正処理後のCMYK信号を階調再現処理部29へ出力する。   The output tone correction unit 28 performs an output tone correction process for converting the CMYK signal input from the spatial filter processing unit 27 into a halftone dot area ratio that is a characteristic value of the color image output device 3, and The CMYK signal after the tone correction processing is output to the gradation reproduction processing unit 29.

階調再現処理部29は、領域分離処理部24から入力された領域識別信号に基づいて、出力階調補正部28から入力されたCMYK信号に対して所定の処理を行う。例えば、階調再現処理部29は、領域分離処理部24において文字領域に分離された領域を、特に黒文字又は色文字の再現性を高めるため、カラー画像出力装置3における高周波成分の再現に適するように二値化処理又は多値化処理を行う。   The gradation reproduction processing unit 29 performs predetermined processing on the CMYK signal input from the output gradation correction unit 28 based on the region identification signal input from the region separation processing unit 24. For example, the tone reproduction processing unit 29 is suitable for reproducing high-frequency components in the color image output apparatus 3 in order to improve the reproducibility of the black character or the color character in the region separated into the character region by the region separation processing unit 24. A binarization process or a multi-level process is performed.

また、階調再現処理部29は、領域分離処理部24において網点領域に分離された領域を、最終的に画像を画素に分離して、それぞれの階調を再現できるように階調再現処理(中間調生成)を行う。さらに、階調再現処理部29は、領域分離処理部24において写真領域に分離された領域を、カラー画像出力装置3における階調再現性に適するように二値化処理又は多値化処理を行う。   In addition, the gradation reproduction processing unit 29 performs gradation reproduction processing so that the region separated by the halftone dot region in the region separation processing unit 24 can be finally separated into pixels and the respective gradations can be reproduced. (Generate halftone). Further, the gradation reproduction processing unit 29 performs binarization processing or multi-value quantization processing on the region separated into the photographic region by the region separation processing unit 24 so as to be suitable for gradation reproducibility in the color image output device 3. .

カラー画像処理装置2は、階調再現処理部29で処理された画像データ(CMYK信号)を記憶部(不図示)に一旦記憶し、画像形成をする所定のタイミングで記憶部に記憶した画像データを読み出し、読み出した画像データをカラー画像出力装置3へ出力する。   The color image processing apparatus 2 temporarily stores the image data (CMYK signal) processed by the gradation reproduction processing unit 29 in a storage unit (not shown), and stores the image data in the storage unit at a predetermined timing for image formation. And the read image data is output to the color image output device 3.

操作パネル4は、例えば、液晶ディスプレイなどの表示部と設定ボタンなどより構成され、操作パネル4より入力された情報に基づいてカラー画像入力装置1、カラー画像処理装置2、カラー画像出力装置3の動作が制御される。   The operation panel 4 includes, for example, a display unit such as a liquid crystal display and a setting button. The color image input device 1, the color image processing device 2, and the color image output device 3 are based on information input from the operation panel 4. Operation is controlled.

図2は原稿種別判別部22の構成を示すブロック図である。原稿種別判別部22は、信号変換部2201、補間演算部2202、最小濃度値算出部2203、最大濃度値算出部2204、反転回数算出部2205、エッジ検出部2206、最大濃度差算出部2207、最大濃度差判定部2208、反転回数判定部2209、総合判定部2210、エッジ検出結果演算部2211、メモリ2212、文字画素ブロック計数部2213、網点画素ブロック計数部2214、その他の画素ブロック計数部2215、エッジ計数比率判定部2216、原稿判定部2217、総和濃度繁雑度算出部2218などを備えている。   FIG. 2 is a block diagram illustrating a configuration of the document type determination unit 22. The document type determination unit 22 includes a signal conversion unit 2201, an interpolation calculation unit 2202, a minimum density value calculation unit 2203, a maximum density value calculation unit 2204, an inversion number calculation unit 2205, an edge detection unit 2206, a maximum density difference calculation unit 2207, and a maximum. Density difference determination unit 2208, inversion number determination unit 2209, comprehensive determination unit 2210, edge detection result calculation unit 2211, memory 2212, character pixel block counting unit 2213, halftone pixel block counting unit 2214, other pixel block counting unit 2215, An edge count ratio determination unit 2216, a document determination unit 2217, a total density busyness calculation unit 2218, and the like are provided.

原稿種別判別部22は、原稿を予備走査(プレスキャン)し、副走査方向(スキャナの走査方向に平行な方向)に対しては主走査(本スキャン)の2倍あるいは4倍などの速度で走査し、主走査方向(スキャナの走査方向と垂直な方向)に対しては補間演算を行うことにより縮小された画像を生成し、生成した縮小画像を後段の処理のため一旦画像メモリ(不図示)に記憶する。原稿種別判別部22は、縮小画像を所定の画素ブロック(例えば、4×4画素)に分割し、分割した画素ブロック毎に文字領域、網点領域、その他の領域などの領域判定を行うことにより原稿の種別を判別する。   The document type discriminating unit 22 performs preliminary scanning (pre-scanning) on the document, and in the sub-scanning direction (direction parallel to the scanning direction of the scanner) at a speed such as twice or four times the main scanning (main scanning). Scan and generate a reduced image by performing an interpolation operation in the main scanning direction (a direction perpendicular to the scanning direction of the scanner), and the generated reduced image is temporarily stored in an image memory (not shown) for subsequent processing. ). The document type determination unit 22 divides the reduced image into predetermined pixel blocks (for example, 4 × 4 pixels), and performs area determination such as a character area, a dot area, and other areas for each divided pixel block. The type of document is determined.

また、原稿種別判別部22は、縮小画像のエッジ検出を行い、縮小画像の総画素数に対するエッジの数の比率と、原稿を主走査して得られた画像のエッジ検出を行い、画像の総画素数に対するエッジの数の比率とに基づいて、擬似文字(例えば、フォントサイズが4ポイント程度の小さい文字、複雑な網点上の文字、あるいは万線など)を含む領域であるか否かの領域判定を行うことにより、原稿に擬似文字が含まれるか否かを判定する。   Further, the document type discrimination unit 22 detects the edge of the reduced image, detects the ratio of the number of edges to the total number of pixels of the reduced image, and detects the edge of the image obtained by performing main scanning on the document, thereby obtaining the total image. Based on the ratio of the number of edges to the number of pixels, whether or not the region includes pseudo characters (for example, a character whose font size is as small as about 4 points, a character on a complex halftone dot, or a line) By performing the area determination, it is determined whether or not the original includes pseudo characters.

更に、原稿種別判別部22は、擬似文字を含む領域において、原稿を主走査して得られた画像の濃度分布に係る特徴量(総和濃度繁雑度)を算出し、算出した総和濃度繁雑度が角度依存性を有するか否かに基づいて、万線を含む領域であるか否かの領域判定を行うことにより、原稿に万線が含まれるか否かを判定する。このように、原稿種別判別部22は、擬似文字を含む領域であると判定された場合には、擬似文字のうちの万線を含む領域であるか否かの判定を行い、この判定結果に基づいて最終的な判別結果である原稿種別判別信号を出力する。   Further, the document type determination unit 22 calculates a feature amount (total density busyness) related to the density distribution of an image obtained by performing main scanning on the document in an area including pseudo characters, and the calculated total density busyness is Based on whether or not there is an angle dependency, it is determined whether or not the document includes a line by determining whether or not the area includes a line. As described above, when the document type determination unit 22 determines that the region includes a pseudo character, the document type determination unit 22 determines whether the region includes a line of pseudo characters. Based on this, a document type discrimination signal as a final discrimination result is output.

信号変換部2201は、予備走査時及び主走査時に、シェーディング補正部21から入力されたRGB信号(RGBの反射率信号)を輝度信号(L信号)に変換し、変換後の輝度信号を補間演算部2202及び総和濃度繁雑度算出部2218へ出力する。例えば、各画素の輝度信号Ljは、各画素RGBの色成分を夫々Rj、Gj、Bjとし、Lj=0.30×Rj+0.59×Gj+0.11×Bjで表すことができる。なお、上式に限らず、RGB信号をCIE1976L*** 信号に変換することもできる。また、信号変換部2201は、予備走査時及び主走査時のいずれかのみ、輝度信号を総和濃度繁雑度算出部2218へ出力するようにしてもよい。 The signal conversion unit 2201 converts the RGB signal (RGB reflectance signal) input from the shading correction unit 21 into a luminance signal (L signal) during preliminary scanning and main scanning, and performs an interpolation operation on the converted luminance signal. Output to the unit 2202 and the total density busyness calculation unit 2218. For example, the luminance signal Lj of each pixel can be expressed as Lj = 0.30 × Rj + 0.59 × Gj + 0.11 × Bj, where Rj, Gj, and Bj are the color components of each pixel RGB. Note that the RGB signal is not limited to the above formula, and can be converted into a CIE1976L * a * b * signal. Further, the signal conversion unit 2201 may output the luminance signal to the total density busyness calculation unit 2218 only during either the preliminary scan or the main scan.

補間演算部(縮小手段)2202は、予備走査時に、主走査方向の画像データに対して画素を間引くことにより補間演算を行い、補間演算後の画像データ(すなわち、縮小画像の画像データ)を最小濃度値算出部2203、最大濃度値算出部2204、反転回数算出部2205、エッジ検出部2206へ出力する。また、補間演算部2202は、主走査時には補間演算を行わずに、入力された画像データ(すなわち、縮小されていない画像の画像データ)をエッジ検出部2206へ出力する。   An interpolation calculation unit (reduction means) 2202 performs interpolation calculation by thinning out pixels from image data in the main scanning direction during preliminary scanning, and minimizes image data after the interpolation calculation (that is, image data of a reduced image). The density value calculation unit 2203, the maximum density value calculation unit 2204, the inversion number calculation unit 2205, and the edge detection unit 2206 are output. Further, the interpolation calculation unit 2202 outputs the input image data (that is, image data of an unreduced image) to the edge detection unit 2206 without performing the interpolation calculation during main scanning.

最小濃度値算出部2203は、補間演算部2202から入力された縮小画像の画素ブロックの中で最小濃度値を算出し、算出した最小濃度値を最大濃度差算出部2207へ出力する。最大濃度値算出部2204は、補間演算部2202から入力された縮小画像の画素ブロックの中で最大濃度値を算出し、算出した最大濃度値を最大濃度差算出部2207へ出力する。   The minimum density value calculation unit 2203 calculates the minimum density value in the pixel block of the reduced image input from the interpolation calculation unit 2202 and outputs the calculated minimum density value to the maximum density difference calculation unit 2207. The maximum density value calculation unit 2204 calculates the maximum density value in the pixel block of the reduced image input from the interpolation calculation unit 2202 and outputs the calculated maximum density value to the maximum density difference calculation unit 2207.

最大濃度差算出部2207は、最小濃度値算出部2203及び最大濃度値算出部2204から入力された最小濃度値及び最大濃度値の差分(最大濃度差)を算出し、算出した最大濃度差を最大濃度差判定部2208へ出力する。   The maximum density difference calculation unit 2207 calculates a difference (maximum density difference) between the minimum density value and the maximum density value input from the minimum density value calculation unit 2203 and the maximum density value calculation unit 2204, and the calculated maximum density difference is maximized. Output to the density difference determination unit 2208.

最大濃度差判定部2208は、最大濃度差算出部2207から入力された最大濃度差を閾値処理し、最大濃度差が閾値THsubよりも大きい場合、画素ブロックを文字領域又は網点領域(判定信号「0」)と判定し、最大濃度差が閾値THsub以下の場合、画素ブロックをその他の領域(判定信号「1」)と判定し、判定信号を総合判定部2210へ出力する。   The maximum density difference determination unit 2208 performs threshold processing on the maximum density difference input from the maximum density difference calculation unit 2207. If the maximum density difference is larger than the threshold value THsub, the pixel block is converted into a character area or a dot area (determination signal “ If the maximum density difference is equal to or smaller than the threshold value THsub, the pixel block is determined as another region (determination signal “1”), and the determination signal is output to the comprehensive determination unit 2210.

反転回数算出部2205は、補間演算部2202から入力された縮小画像の画素ブロック内の各画素値の平均値を求め、この平均値を用いて各画素値を二値化する。反転回数算出部2205は、画素ブロック内の二値化データを走査して、主走査方向の反転回数Kh及び副走査方向の反転回数Kvを算出し、算出した主走査方向の反転回数Kh及び副走査方向の反転回数Kvを反転回数判定部2209へ出力する。   The inversion number calculation unit 2205 obtains an average value of each pixel value in the pixel block of the reduced image input from the interpolation calculation unit 2202 and binarizes each pixel value using the average value. The inversion number calculation unit 2205 scans the binarized data in the pixel block, calculates the inversion number Kh in the main scanning direction and the inversion number Kv in the sub scanning direction, and calculates the inversion number Kh and the sub number in the main scanning direction. The inversion number Kv in the scanning direction is output to the inversion number determination unit 2209.

反転回数判定部2209は、反転回数Kh≧所定の閾値THdt、かつ、反転回数Kv≧所定の閾値THdtである場合、画素ブロックを網点領域(判定信号「1」)と判定し、反転回数Kh<所定の閾値THdt、あるいは、反転回数Kv<所定の閾値THdtである場合、画素ブロックを文字領域(判定信号「0」)と判定し、判定信号を総合判定部2210へ出力する。   The inversion number determination unit 2209 determines that the pixel block is a halftone area (determination signal “1”) when the inversion number Kh ≧ the predetermined threshold value THdt and the inversion number Kv ≧ the predetermined threshold value THdt, and the inversion number Kh. If <predetermined threshold THdt or inversion count Kv <predetermined threshold THdt, the pixel block is determined to be a character region (determination signal “0”), and a determination signal is output to the overall determination unit 2210.

総合判定部2210は、最大濃度差判定部2208から入力された判定信号及び反転回数判定部2209から入力された判定信号に基づいて、画素ブロックがいずれの領域(例えば、文字領域、網点領域、その他の領域)であるかを最終判定する。総合判定部2210は、最終判定結果に応じて文字画素ブロック計数部2213、網点画素ブロック計数部2214、又はその他の画素ブロック計数部2215のいずれかに判定信号を出力する。例えば、画素ブロックが文字領域であると最終判定された場合、判定信号「1」が文字画素ブロック計数部2213へ出力され、画素ブロックが網点領域であると最終判定された場合、判定信号「1」が網点画素ブロック計数部2214へ出力され、画素ブロックがその他の領域であると最終判定された場合、判定信号「1」がその他の画素ブロック計数部2215へ出力される。   Based on the determination signal input from the maximum density difference determination unit 2208 and the determination signal input from the inversion number determination unit 2209, the comprehensive determination unit 2210 determines which region (for example, a character region, a dot region, It is finally determined whether the area is other area. The overall determination unit 2210 outputs a determination signal to any one of the character pixel block counting unit 2213, the halftone pixel block counting unit 2214, and the other pixel block counting unit 2215 according to the final determination result. For example, when the pixel block is finally determined to be a character region, the determination signal “1” is output to the character pixel block counting unit 2213, and when the pixel block is finally determined to be a halftone dot region, the determination signal “ 1 ”is output to the halftone pixel block counting unit 2214, and when it is finally determined that the pixel block is in another region, the determination signal“ 1 ”is output to the other pixel block counting unit 2215.

図3は総合判定部2210の最終判定方法を示す説明図である。図に示すように、総合判定部2210は、最大濃度差判定部2208からの判定信号が「0」であり、反転回数判定部2209からの判定信号が「1」である場合、画素ブロックは網点領域であると最終判定し、最大濃度差判定部2208からの判定信号が「0」であり、反転回数判定部2209からの判定信号が「0」である場合、画素ブロックは文字領域であると最終判定し、最大濃度差判定部2208からの判定信号が「1」である場合、反転回数判定部2209からの判定信号が「1」あるいは「0」いずれであっても、画素ブロックはその他の領域であると最終判定する。   FIG. 3 is an explanatory diagram illustrating a final determination method of the comprehensive determination unit 2210. As shown in the figure, when the determination signal from the maximum density difference determination unit 2208 is “0” and the determination signal from the inversion number determination unit 2209 is “1”, the comprehensive determination unit 2210 displays the pixel block as a network. When it is finally determined that the region is a point region, and the determination signal from the maximum density difference determination unit 2208 is “0” and the determination signal from the inversion number determination unit 2209 is “0”, the pixel block is a character region. When the determination signal from the maximum density difference determination unit 2208 is “1”, the pixel block is in other cases regardless of whether the determination signal from the inversion number determination unit 2209 is “1” or “0”. It is finally determined that this is the area.

なお、画素ブロックの領域判定に用いる閾値、具体的には、最大濃度差に対する閾値THsub、反転回数に対する閾値THdtは、画素ブロックのサイズを設定し、種々の画像サンプルを用いて領域を判定し、文字領域、網点領域、その他の領域に精度良く分離される値を設定すればよい。また、複数の画素ブロックの判定結果を格納しておき、周辺の画素ブロックの判定結果を参照して判定結果を補正することもできる。   Note that the threshold used for determining the area of the pixel block, specifically, the threshold THsub for the maximum density difference and the threshold THdt for the number of inversions set the size of the pixel block, determine the area using various image samples, What is necessary is just to set the value isolate | separated to a character area | region, a dot area | region, and another area | region accurately. It is also possible to store the determination results of a plurality of pixel blocks and correct the determination results with reference to the determination results of surrounding pixel blocks.

文字画素ブロック計数部2213は、総合判定部2210が出力した判定信号「1」を計数し、縮小画像の画素ブロックの総数に対する判定信号の計数値の比率を算出し、算出した比率を原稿判定部2217へ出力する。網点画素ブロック計数部2214は、総合判定部2210が出力した判定信号「1」を計数し、縮小画像の画素ブロックの総数に対する判定信号の計数値の比率を算出し、算出した比率を原稿判定部2217へ出力する。その他の画素ブロック計数部2215は、総合判定部2210が出力した判定信号「1」を計数し、縮小画像の画素ブロックの総数に対する判定信号の計数値の比率を算出し、算出した比率を原稿判定部2217へ出力する。   The character pixel block counting unit 2213 counts the determination signal “1” output from the comprehensive determination unit 2210, calculates the ratio of the count value of the determination signal to the total number of pixel blocks of the reduced image, and calculates the calculated ratio as the document determination unit. To 2217. The halftone pixel block counting unit 2214 counts the determination signal “1” output from the comprehensive determination unit 2210, calculates the ratio of the count value of the determination signal to the total number of pixel blocks of the reduced image, and determines the calculated ratio as a document determination Output to the unit 2217. The other pixel block counting unit 2215 counts the determination signal “1” output from the comprehensive determination unit 2210, calculates the ratio of the count value of the determination signal to the total number of pixel blocks of the reduced image, and determines the calculated ratio as a document determination Output to the unit 2217.

エッジ検出部(第2エッジ検出手段)2206は、予備走査時に、補間演算部2202から出力された補間演算後の画像(すなわち、縮小画像)の画素ブロック内の各画素を注目画素として走査し、注目画素と該注目画素に隣接する周辺画素の濃度差を閾値THedと比較することによりエッジを検出し、画素ブロック毎に検出されたエッジ画像をエッジ検出結果演算部2211へ出力する。また、エッジ検出部(第1エッジ検出手段)2206は、主走査時に、補間演算部2202から入力された画像(すなわち、縮小されていない画像)の画素ブロック内の各画素を注目画素として走査し、注目画素と該注目画素に隣接する周辺画素の濃度差を閾値THedと比較することによりエッジを検出し、画素ブロック毎に検出されたエッジ画像をエッジ検出結果演算部2211へ出力する。   The edge detection unit (second edge detection unit) 2206 scans each pixel in the pixel block of the post-interpolation image (that is, the reduced image) output from the interpolation calculation unit 2202 as a target pixel during preliminary scanning. The edge is detected by comparing the density difference between the target pixel and the neighboring pixels adjacent to the target pixel with the threshold value THed, and the edge image detected for each pixel block is output to the edge detection result calculation unit 2211. In addition, the edge detection unit (first edge detection unit) 2206 scans each pixel in the pixel block of the image (that is, an unreduced image) input from the interpolation calculation unit 2202 as the target pixel during main scanning. The edge is detected by comparing the density difference between the target pixel and the neighboring pixels adjacent to the target pixel with the threshold value THed, and the edge image detected for each pixel block is output to the edge detection result calculation unit 2211.

図4はエッジ検出方法の一例を示す説明図である。図に示すように、注目画素と該注目画素に隣接する周辺画素の濃度差は、主走査方向の隣接画素、及び副走査方向の隣接画素について求め、何れかが閾値THed以上(例えば、画素値が256階調で表されている場合、20〜30程度)の場合、エッジであると判定する。   FIG. 4 is an explanatory diagram showing an example of an edge detection method. As shown in the figure, the density difference between the target pixel and the neighboring pixels adjacent to the target pixel is obtained for the adjacent pixel in the main scanning direction and the adjacent pixel in the sub-scanning direction. Is represented by 256 gradations, it is determined that it is an edge.

なお、図4で示すエッジ検出方法は、一例であって、エッジ検出方法はこれに限定されるものではない。例えば、ゾーベルフィルタあるいはラプラシアンフィルタなどのエッジ検出フィルタを用いて、画像データとの畳み込み積分演算を行い、演算結果を閾値処理する(演算結果が閾値以上のとき、エッジと判定する)ことにより、エッジを検出するようにしてもよい。   Note that the edge detection method shown in FIG. 4 is an example, and the edge detection method is not limited to this. For example, by performing a convolution integral calculation with image data using an edge detection filter such as a Sobel filter or a Laplacian filter, and performing a threshold process on the calculation result (determining an edge when the calculation result is equal to or greater than the threshold), An edge may be detected.

エッジ検出結果演算部(第2計数手段、第2算出手段)2211は、予備走査時にエッジ検出部2206から入力されたエッジ画像に基づいて、縮小された原稿全体の画像の総画素数に対するエッジ画素の数(エッジの数)の比率Csを算出し、算出した比率Csをメモリ2212に記憶する。また、エッジ検出結果演算部(第1計数手段、第1算出手段)2211は、主走査時にエッジ検出部2206から入力されたエッジ画像に基づいて、縮小されていない原稿全体の画像の総画素数に対するエッジ画素の数(エッジの数)の比率Coを算出し、算出した比率Coをエッジ計数比率判定部2216へ出力する。   An edge detection result calculation unit (second counting unit, second calculation unit) 2211 is based on the edge image input from the edge detection unit 2206 at the time of preliminary scanning, and edge pixels with respect to the total number of pixels of the entire reduced document image. The ratio Cs of the number of edges (number of edges) is calculated, and the calculated ratio Cs is stored in the memory 2212. The edge detection result calculation unit (first counting unit, first calculation unit) 2211 is based on the edge image input from the edge detection unit 2206 during the main scanning, and is the total number of pixels of the entire original image that has not been reduced. The ratio Co of the number of edge pixels (number of edges) with respect to is calculated, and the calculated ratio Co is output to the edge count ratio determination unit 2216.

エッジ計数比率判定部(割合算出手段)2216は、メモリ2212に記憶された比率Csを読み出し、エッジ検出結果演算部2211から入力された比率Coに対する比率Csの比(Cs/Co)を求め、比(Cs/Co)と閾値THtcとを比較する。エッジ計数比率判定部2216は、比(Cs/Co)≦閾値THtcである場合、原稿に擬似文字(例えば、フォントサイズが4ポイント程度の小さい文字、複雑な網点上文字、あるいは、万線など)が含まれていると判定する。また、エッジ計数比率判定部2216は、比(Cs/Co)>閾値THtcである場合、原稿に擬似文字が含まれていないと判定し、それぞれの判定結果を原稿判定部2217へ出力する。   The edge count ratio determination unit (ratio calculation means) 2216 reads the ratio Cs stored in the memory 2212, obtains the ratio (Cs / Co) of the ratio Cs to the ratio Co input from the edge detection result calculation unit 2211, (Cs / Co) is compared with a threshold value THtc. When the ratio (Cs / Co) ≦ threshold value THtc, the edge count ratio determination unit 2216 includes pseudo characters (for example, small characters with a font size of about 4 points, complex halftone characters, or lines). ) Is included. Further, when the ratio (Cs / Co)> threshold value THtc, the edge count ratio determination unit 2216 determines that the document does not include pseudo characters, and outputs each determination result to the document determination unit 2217.

総和濃度繁雑度算出部(特徴量算出手段、角度依存性判定手段)2218は、主走査時に、信号変換部2201から入力された画像(縮小されていない画像)の各画素を注目画素として走査して総和濃度繁雑度を算出し、算出した総和濃度繁雑度が角度依存性を有するか否かを判定する。なお、万線を構成する平行な複数の直線は方向依存性を有しており、所定領域内で直線の方向依存性の有無を判定することにより、角度依存性の有無を判定し、所定領域が万線領域であるか否かを判定することができる。   A total density busyness calculation unit (feature amount calculation unit, angle dependency determination unit) 2218 scans each pixel of an image (an unreduced image) input from the signal conversion unit 2201 as a target pixel during main scanning. The total density busyness is calculated, and it is determined whether or not the calculated total density busyness has angle dependency. In addition, a plurality of parallel straight lines constituting a line have direction dependency, and by determining the presence or absence of the direction dependency of the straight line within the predetermined region, the presence or absence of angle dependency is determined, and the predetermined region It can be determined whether or not is a line region.

図5は万線領域の判定方法を説明するための模式図である。総和濃度繁雑度算出部2218は、例えば、注目画素(図5にはハッチングを付して示してある)を含む7×7の正方形の領域(以下、7×7領域という)毎に、領域内に平行な複数の直線が存在し、この複数の直線が方向依存性を有しているか否かを判定することによって、注目画素が万線領域内の画素であるか否かを判定するようにしてある。   FIG. 5 is a schematic diagram for explaining a method for determining the line region. The total density busyness calculation unit 2218, for example, for each 7 × 7 square region (hereinafter referred to as 7 × 7 region) including the target pixel (shown with hatching in FIG. 5). A plurality of straight lines that are parallel to each other exist, and it is determined whether or not the target pixel is a pixel in the line region by determining whether or not the plurality of straight lines have direction dependency. It is.

7×7領域内に平行な複数の直線が存在し、この複数の直線が方向依存性を有しているか否かの判定は、例えば0°(図5(A)参照)、90°(図5(B)参照)、45°(図5(C)参照)、135°(図5(D)参照)の4つの方向について、隣接する画素間での画素値(濃度)の差の絶対値の総和(総和濃度繁雑度)をそれぞれ算出し、予め定められた閾値とそれぞれ比較することによって行うことができる。   A plurality of parallel straight lines exist in the 7 × 7 region, and whether or not the plurality of straight lines have direction dependency is determined by, for example, 0 ° (see FIG. 5A), 90 ° (see FIG. 5 (B)), 45 ° (see FIG. 5C), and 135 ° (see FIG. 5D), the absolute value of the difference in pixel value (density) between adjacent pixels. The total sum (total density busyness) is calculated and compared with a predetermined threshold value.

ここで、4つの方向のいずれかの方向に対して角度依存性を有している場合、特定の方向にのみ総和濃度繁雑度の値が小さく、他の方向では総和濃度繁雑度の値が大きくなる。よって、総和濃度繁雑度算出部2218は、算出した4つの総和濃度繁雑度と予め定められた閾値とを比較し、特定の方向についての総和濃度繁雑度のみが閾値より小さい場合、この注目画素を万線領域に含まれる画素であると判定することができる。   Here, when there is angle dependency with respect to any one of the four directions, the value of the total density busyness is small only in a specific direction, and the value of the total density busyness is large in the other directions. Become. Therefore, the total density busyness calculation unit 2218 compares the calculated four total density busyness with a predetermined threshold value, and when only the total density busyness in a specific direction is smaller than the threshold value, It can be determined that the pixel is included in the line region.

総和濃度繁雑度算出部2218は、この処理を信号変換部2201から入力された画像の画像ブロックの全画素について繰り返して行うことによって、各画像ブロックが万線を含む領域であるか否かを判定する。また、総和濃度繁雑度算出部2218は、この処理を画像の全画素ブロックについて繰り返して行い、万線を含む領域であると判定された画素ブロックの数の、画像の総画素ブロック数に対する比率を算出し、算出した比率と予め定められた閾値とを比較する。総和濃度繁雑度算出部2218は、算出した比率が閾値以上である場合、万線を含む原稿であると判定し、算出した比率が閾値未満である場合、万線を含まない原稿であると判定し、それぞれの判定結果を原稿判定部2217へ出力する。なお、各閾値は、種々の原稿画像において、エッジの角度依存性が的確に判定できる値であればよい。   The total density busyness calculation unit 2218 determines whether each image block is a region including a line by repeating this processing for all pixels of the image block of the image input from the signal conversion unit 2201. To do. The total density busyness calculation unit 2218 repeats this process for all the pixel blocks of the image, and calculates the ratio of the number of pixel blocks determined to be a region including a line to the total number of pixel blocks of the image. The calculated ratio is compared with a predetermined threshold value. When the calculated ratio is greater than or equal to the threshold, the total density busyness calculation unit 2218 determines that the document includes a line, and when the calculated ratio is less than the threshold, determines that the document does not include a line. Each determination result is output to the document determination unit 2217. Each threshold may be a value that can accurately determine the edge angle dependency in various document images.

また、総和濃度繁雑度算出部2218は、0°及び90°の総和濃度繁雑度の差分と、45°及び135°の総和濃度繁雑度の差分とを更に算出し、2つの差分のいずれかが閾値より大きい場合に、この注目画素を万線領域に含まれる画素であると判定することもできる。なお、総和濃度繁雑度算出部2218は、主走査時、予備走査時、またはその両方で、総和濃度繁雑度を算出し、算出した総和濃度繁雑度に基づいて各画素が万線領域に含まれる画素であるか否かの判定を行えばよい。また、総和濃度繁雑度算出部2218は、所定領域(例えば、7×7領域)における総和濃度繁雑度の角度依存性の有無だけでなく、所定領域中の最大濃度値及び最小濃度値の差分である最大濃度差の角度依存性の有無を判定してもよい。   The total density busyness calculation unit 2218 further calculates a difference between the total density busyness of 0 ° and 90 ° and a difference between the total density busyness of 45 ° and 135 °, and any one of the two differences is calculated. If it is larger than the threshold, it is possible to determine that this pixel of interest is a pixel included in the line region. The total density busyness calculation unit 2218 calculates the total density busyness during the main scan, the preliminary scan, or both, and each pixel is included in the line area based on the calculated total density busyness. What is necessary is just to determine whether it is a pixel. In addition, the total density busyness calculation unit 2218 determines not only the presence / absence of the angle dependency of the total density busyness in a predetermined area (for example, a 7 × 7 area) but also a difference between the maximum density value and the minimum density value in the predetermined area. It may be determined whether or not there is an angle dependency of a certain maximum density difference.

図2において、原稿判定部(判定手段)2217は、文字画素ブロック計数部2213、網点画素ブロック計数部2214、及びその他の画素ブロック計数部2215から入力された各画素ブロックの比率とそれぞれの閾値とを比較し、原稿全体の種別(種類)の判別を行う。例えば、文字画素ブロックの比率と網点画素ブロックの比率とが、それぞれ閾値以上の場合は、文字/網点原稿(文字印刷写真原稿)であると判定する。上記閾値は、処理を行う画素ブロックの大きさを設定して、設定された画素ブロックを用いて種々の画像サンプルで評価を行って適切な値を設定することができる。なお、原稿の種別の判別結果である原稿種別判別信号は、予備走査が終了した段階では出力せずに保持しておく。   In FIG. 2, a document determination unit (determination unit) 2217 includes a ratio of pixel blocks input from a character pixel block counting unit 2213, a halftone pixel block counting unit 2214, and other pixel block counting units 2215 and respective threshold values. And the type (type) of the entire document is determined. For example, if the ratio of the character pixel block and the ratio of the halftone pixel block are each equal to or greater than the threshold value, it is determined that the character / halftone original (character-printed photo original). The threshold value can be set to an appropriate value by setting the size of the pixel block to be processed and evaluating the various image samples using the set pixel block. Note that the document type determination signal, which is the result of determining the document type, is held without being output when the preliminary scanning is completed.

また、原稿判定部2217は、予備走査及び主走査の結果、エッジ計数比率判定部2216及び総和濃度繁雑度算出部2218から入力された判定結果に基づいて、保持している原稿種別判別信号を必要に応じて変更し、変更後の原稿種別判別信号を出力する。図6は原稿判定部2217の原稿判別方法を示す説明図である。図に示すように、原稿判定部2217は、例えば、予備走査において、原稿に文字が含まれていると判定し(例えば、文字原稿、文字/印刷写真原稿、文字/印画紙写真原稿など)、エッジ計数比率判定部2216からの判定結果に基づいて、原稿に擬似文字(万線、または、フォントサイズが4ポイント程度の小さい文字)が含まれていると判定した場合、総和濃度繁雑度算出部2218からの判定結果に基づいて、原稿の総和濃度繁雑度が角度依存性を有しているか否かを判定する。   The document determination unit 2217 needs the document type determination signal held based on the determination results input from the edge count ratio determination unit 2216 and the total density busyness calculation unit 2218 as a result of the preliminary scan and the main scan. The document type determination signal after the change is output. FIG. 6 is an explanatory diagram showing a document determination method of the document determination unit 2217. As shown in the figure, the document determination unit 2217 determines, for example, that characters are included in the document in preliminary scanning (for example, a character document, a character / print photo document, a character / print paper photo document, etc.) Based on the determination result from the edge count ratio determination unit 2216, when it is determined that the document contains pseudo characters (a line or a small character whose font size is about 4 points), the total density busyness calculation unit Based on the determination result from 2218, it is determined whether or not the total density busyness of the document has angle dependency.

原稿判定部2217は、原稿の総和濃度繁雑度が角度依存性を有しておれば、万線を含む原稿に原稿種別判別信号を変更し、原稿の総和濃度繁雑度が角度依存性を有していなければ、小さい文字を多く含む原稿に原稿種別判別信号を変更して出力する。また、原稿判定部2217は、予備走査において原稿に文字が含まれていないと判定した場合、又は、予備走査において原稿に文字が含まれていると判定し、エッジ計数比率判定部2216からの判定結果に基づいて原稿に擬似文字が含まれていないと判定した場合、予備走査時の原稿種別判別信号をそのまま出力する。   If the total density busyness of the document has an angle dependency, the document determination unit 2217 changes the document type determination signal to a document including a line, and the total density busyness of the document has an angle dependency. If not, the original type discrimination signal is changed and output to an original containing many small characters. The document determination unit 2217 determines that the document does not include characters in the preliminary scan, or determines that the document includes characters in the preliminary scan, and determines from the edge count ratio determination unit 2216. If it is determined that the original does not contain pseudo characters based on the result, the original type determination signal at the time of preliminary scanning is output as it is.

上述したように、本実施の形態1の原稿種別判別部22は、複数の画素からなる画素ブロックについて、文字、網点、その他(例えば、写真のような連続階調領域)の各領域に分離して原稿種別の判別を行う構成を有するが、例えば、注目画素を中心とした各画素ブロックの最大濃度差及び総和濃度繁雑度を算出し、注目画素毎に、文字、網点、印画紙写真、下地領域などに分離して原稿種別の判別を行うように構成しても良い。この場合、エッジ検出部2206によるエッジ検出処理は画素毎に行われる。また、各画素について、エッジが方向性を有するか否かの判定は、上述した総和濃度繁雑度を用いて、角度依存性を有するか否かに基いて行えばよい。   As described above, the document type determination unit 22 according to the first embodiment separates a pixel block composed of a plurality of pixels into each region of characters, halftone dots, and other (for example, continuous tone regions such as photographs). For example, the maximum density difference and the total density busyness of each pixel block centered on the target pixel are calculated, and characters, halftone dots, and photographic paper photographs are calculated for each target pixel. Alternatively, the document type may be determined separately in the background area. In this case, the edge detection processing by the edge detection unit 2206 is performed for each pixel. Further, for each pixel, whether or not the edge has directionality may be determined based on whether or not the edge has angle dependency by using the total density busyness described above.

次に、原稿に含まれる擬似文字(例えば、小さい文字が多く含まれている領域、複雑な網点上の文字、万線など)を判別する方法について説明する。ここで、小さい文字が多く含まれている領域とは、例えば、原稿中にフォントサイズが4ポイント程度の文字が印刷されているような場合(カタログの仕様の一覧など)であり、複雑な網点上の文字とは、例えば、原稿中に複雑な地図、カタログの仕様書などで着色された背景上に小さい文字が印刷されているような場合であり、万線(万線パターン)とは、原稿中に画像の濃淡を表すため間隔の狭い平行線で構成されるパターンが印刷されているような場合である。   Next, a method for discriminating pseudo characters (for example, a region containing many small characters, characters on complex halftone dots, lines, etc.) included in the document will be described. Here, the area containing many small characters is, for example, a case where characters having a font size of about 4 points are printed in a document (a list of catalog specifications, etc.), and a complex network. A dot character is, for example, a case where small characters are printed on a background colored with a complicated map, catalog specification, etc. in a manuscript. This is the case where a pattern composed of parallel lines with a narrow interval is printed in the document to represent the density of the image.

図7は文字が印刷された原稿の画像の一例を示す模式図であり、図8は万線パターンに文字が印刷された原稿の画像の一例を示す模式図である。図7(a)は、例えば、A4サイズの用紙に「ABCDEFGH」なる文字(小さくない文字)が適宜の間隔を設けて4段に印刷されている原稿の画像A1を示し、図7(b)は図7(a)の原稿(画像)を約20%の大きさに縮小した原稿の画像A2を示す。   FIG. 7 is a schematic diagram illustrating an example of an image of a document on which characters are printed, and FIG. 8 is a schematic diagram illustrating an example of an image of a document on which characters are printed in a line pattern. FIG. 7A shows, for example, an image A1 of a document in which characters “ABCDEFGH” (non-small characters) are printed in four rows on an A4 size paper with appropriate intervals, and FIG. FIG. 7A shows an original image A2 obtained by reducing the original (image) of FIG. 7A to a size of about 20%.

それぞれの画像A1、A2に対してエッジを検出する。画像A1の場合、原稿全体に文字が多いので、検出されるエッジ画素(文字)の数は多くなる。原稿全体の総画素数に対するエッジ画素の比率Coは、例えば、10%である。   Edges are detected for each of the images A1 and A2. In the case of the image A1, since there are many characters in the entire document, the number of detected edge pixels (characters) increases. The ratio Co of edge pixels to the total number of pixels of the entire document is, for example, 10%.

一方、画像A1を縮小した画像A2では、画像が縮小されたことで、エッジの検出精度が若干低下し、検出されるエッジ画素の数は多少減るものの、原稿全体の総画素数に対するエッジ画素の比率Csは、縮小前の画像A1と比較して大差はなく、例えば、8%である。これは、通常原稿に印刷されている普通のフォントサイズの文字(小さくない文字)は、画像を縮小した場合であっても、エッジ検出による文字の認識精度があまり低下せず、文字の認識を十分に行うことができるからである。したがって、普通のフォントサイズの文字が印刷された原稿の縮小前の比率Coに対する縮小後の比率Csの比(Cs/Co)は、「0.8」程度になる。   On the other hand, in the image A2 obtained by reducing the image A1, the edge detection accuracy is slightly lowered due to the reduction of the image, and the number of detected edge pixels is slightly reduced, but the number of edge pixels relative to the total number of pixels of the entire document is reduced. The ratio Cs is not much different from the image A1 before reduction, and is 8%, for example. This is because characters with normal font size (not small characters) printed on a normal document are not degraded much by the edge detection even if the image is reduced. This is because it can be performed sufficiently. Accordingly, the ratio (Cs / Co) of the ratio Cs after the reduction to the ratio Co before the reduction of the document on which characters having a normal font size are printed is about “0.8”.

一方、図8(a)は、例えば、A4サイズの用紙に背景として万線パターンが印刷され、その上に「ABCDEFGH」なる文字(小さくない文字)が1段に印刷されている原稿の画像B1を示し、図8(b)は図8(a)の原稿(画像)を約20%の大きさに縮小した原稿の画像B2を示す。   On the other hand, FIG. 8A shows, for example, a document image B1 in which a line pattern is printed as a background on an A4 size paper, and characters “ABCDEFGH” (not small characters) are printed in one row thereon. FIG. 8B shows an original image B2 obtained by reducing the original (image) of FIG. 8A to a size of about 20%.

それぞれの画像B1、B2に対してエッジを検出する。画像B1の場合、原稿全体に文字が少ないものの、背景に万線パターンが多数あり、万線パターンがエッジとして検出されるため、検出されるエッジ画素(文字)の数は多くなる。原稿全体の総画素数に対するエッジ画素の比率Coは、例えば、10%である。   Edges are detected for each of the images B1 and B2. In the case of the image B1, although there are few characters in the entire document, there are many line patterns in the background, and the line patterns are detected as edges, so the number of edge pixels (characters) detected is large. The ratio Co of edge pixels to the total number of pixels of the entire document is, for example, 10%.

一方、画像B1を縮小した画像B2では、画像が縮小されたことで、万線パターンの平行線の間隔が一層狭くなり平行線同士が1つの線の如く認識されてしまい、背景の万線パターンがエッジとして検出されなくなる。このため、原稿全体の総画素数に対するエッジ画素の比率Csは、縮小前の画像B1と比較して少なくなり、例えば、2%である。これは、万線パターンのパターン同士が一体化してしまいパターンが認識されなくなるからである。   On the other hand, in the image B2 obtained by reducing the image B1, since the image is reduced, the interval between the parallel lines of the line pattern is further narrowed and the parallel lines are recognized as one line, and the background line pattern Are no longer detected as edges. For this reason, the ratio Cs of edge pixels to the total number of pixels of the entire document is smaller than that of the image B1 before reduction, for example, 2%. This is because the patterns of the line patterns are integrated with each other and the pattern is not recognized.

したがって、万線パターンが印刷された原稿の縮小前の比率Coに対する縮小後の比率Csの比(Cs/Co)は、「0.2」程度になる。すなわち、原稿の画像の縮小前後の比(Cs/Co)を求め、閾値処理(例えば、閾値THtc(=0.5)以下)を行うことにより、万線パターンが印刷された原稿か否かを判定することができる。   Therefore, the ratio (Cs / Co) of the ratio Cs after the reduction to the ratio Co before the reduction of the original on which the line pattern is printed is about “0.2”. That is, the ratio (Cs / Co) before and after reduction of the image of the document is obtained, and threshold processing (for example, threshold THtc (= 0.5) or less) is performed to determine whether or not the document has a printed line pattern. Can be determined.

小さい文字が多く印刷された原稿、複雑な網点上の文字が印刷された原稿についても、小さい文字や複雑な網点上文字は、原稿を縮小することで、文字同士が一体化して形状がくずれ、さらに文字として認識不能になるため、万線パターンが印刷された原稿と同様に、原稿の画像の縮小前後の比(Cs/Co)を求め、閾値処理(例えば、閾値THtc(=0.5)以下)を行うことにより、小さい文字が多く印刷された原稿であるか否か、複雑な網点上の文字が印刷された原稿であるか否かを判定することができる。   Even for originals with many small characters printed, and originals with complicated halftone dots, small characters and complicated halftone dots can be reduced by reducing the size of the original so that the characters are integrated into a shape. As a result, the ratio of the original image before and after reduction (Cs / Co) is obtained and threshold processing (for example, threshold THtc (= 0. By performing the following 5), it is possible to determine whether or not the document is printed with many small characters and whether or not the document is printed with characters on complicated halftone dots.

なお、ここでいう原稿(画像)の縮小とは、副走査方向(スキャナの走査方向に平行な方向)は光学的に縮小された画像であり、主走査方向(スキャナの走査方向と垂直な方向)は補間演算(ニアレストネーバー、バイリニア、バイキュービックなど)により、求められた画像(間引かれた画像データ)を意味している。   The reduction of the document (image) here is an image optically reduced in the sub-scanning direction (direction parallel to the scanning direction of the scanner), and the main scanning direction (direction perpendicular to the scanning direction of the scanner). ) Means an image (thinned image data) obtained by interpolation calculation (nearest naver, bilinear, bicubic, etc.).

また、原稿(画像)の縮小方法としては、上述の方法の他に、予備走査(主走査の2倍、あるいは4倍の速度でスキャン)して得られた画像(画像データ)を用いることもできる。この場合には、特に小さい文字や複雑な網点上の文字、水平方向の万線原稿の場合に有効である。また、予備走査の画像データと主走査方向の画像データに対して補間演算により画素を間引いた画像データ、主走査方向及び副走査方向とも補間演算により間引いた画像データ(低解像度変換された画像データ)、さらに、図9(a)に示すようなガウシアン・フィルタ、図9(b)に示すようなフィルタ係数を用いて平滑化された画像データを用いることもできる。   In addition to the method described above, an image (image data) obtained by preliminary scanning (scanning at a speed twice or four times that of main scanning) can be used as a method for reducing an original (image). it can. This is particularly effective for small characters, characters on complex halftone dots, and horizontal line manuscripts. Also, image data obtained by thinning out pixels by interpolation calculation for image data in the pre-scan and main scanning direction, image data thinned out by interpolation calculation in both the main scanning direction and the sub-scanning direction (image data subjected to low resolution conversion) Further, a Gaussian filter as shown in FIG. 9A and image data smoothed using a filter coefficient as shown in FIG. 9B can be used.

すなわち、画像の縮小には、スキャン時に光学的に縮小する場合、補間演算により画像データを間引きする場合(解像度を低くする場合)がある。縮小するのと同様な効果があるものとしては、平滑化処理がある。なお、フィルタ係数は、種々の画像データを用いて平滑化処理を行ってエッジ検出を行い、その結果に基づいて適切な値を設定すればよい。   That is, image reduction includes optical reduction during scanning and image data thinning out by interpolation calculation (decreasing resolution). A smoothing process is an effect similar to the reduction. The filter coefficient may be set to an appropriate value based on the result of performing edge detection by performing smoothing processing using various image data.

次に、画像形成装置100の動作について説明する。図10乃至図12は原稿種別判別処理の手順を示すフローチャートである。なお、原稿種別判別処理は、専用のハードウェア回路で構成するだけでなく、原稿種別判別処理の手順を定めたコンピュータプログラムをRAMにロードしてCPU(いずれも不図示)で実行させることにより行うこともできる。なお、以下の説明では、カラー画像処理装置2を「処理部」という。   Next, the operation of the image forming apparatus 100 will be described. 10 to 12 are flowcharts showing the procedure of the document type discrimination process. The document type discrimination process is not only configured by a dedicated hardware circuit, but is also performed by loading a computer program that defines the procedure of the document type discrimination process into the RAM and executing it by a CPU (both not shown). You can also. In the following description, the color image processing apparatus 2 is referred to as a “processing unit”.

処理部は、予備走査を行い(S11)、原稿全体の画像の部分画像(画素ブロックに対応)を取得する。処理部は、予備走査で得られたRGB信号を輝度信号(L信号)に変換し(S12)、主走査方向の画像データに対して補間演算を行い、縮小画像を生成する(S13)。なお、生成された縮小画像は1つの画素ブロックに相当する。また、生成された縮小画像は後段の処理のため画像メモリ(不図示)に記憶される。   The processing unit performs preliminary scanning (S11), and acquires a partial image (corresponding to a pixel block) of the entire document. The processing unit converts the RGB signal obtained by the preliminary scanning into a luminance signal (L signal) (S12), performs an interpolation operation on the image data in the main scanning direction, and generates a reduced image (S13). The generated reduced image corresponds to one pixel block. The generated reduced image is stored in an image memory (not shown) for subsequent processing.

処理部は、縮小画像(画素ブロック)の領域判定処理を行う(S14)。なお、領域判定処理の詳細は後述する。処理部は、領域判定処理の結果に基づいて、画素ブロックの最終領域判定である総合判定処理を行い(S15)、画素ブロックの総合判定結果に応じて、文字画素ブロック、網点画素ブロック、あるいはその他の画素ブロックのいずれかの画素ブロック数を加算する(S16)。   The processing unit performs a reduced image (pixel block) region determination process (S14). Details of the area determination process will be described later. The processing unit performs comprehensive determination processing that is final region determination of the pixel block based on the result of the region determination processing (S15), and depending on the comprehensive determination result of the pixel block, the character pixel block, the halftone pixel block, or The number of pixel blocks of any other pixel block is added (S16).

処理部は、画像メモリに記憶された縮小画像(画素ブロック)を読み出して、縮小画像のエッジを検出し(S17)、エッジ数を算出する(S18)。なお、ステップS14〜S16の処理と、ステップS17及びS18の処理とは、並行に行うことができる。処理部は、すべての画素ブロックの処理が終了したか否かを判定する(S19)。すべての画素ブロックの処理が終了していない場合(S19でNO)、処理部は、ステップS11以降の処理を続け、原稿の画像の部分画像を取得し、上述の処理を繰り返す。   The processing unit reads the reduced image (pixel block) stored in the image memory, detects edges of the reduced image (S17), and calculates the number of edges (S18). Note that the processes in steps S14 to S16 and the processes in steps S17 and S18 can be performed in parallel. The processing unit determines whether or not the processing of all the pixel blocks has been completed (S19). If all the pixel blocks have not been processed (NO in S19), the processing unit continues the processing after step S11, acquires a partial image of the original image, and repeats the above-described processing.

すべての画素ブロックの処理が終了した場合(S19でYES)、処理部は、原稿全体の画素ブロックの総数に対する文字画素ブロック、網点画素ブロック、あるいはその他の画素ブロックの画素ブロック数の比率に基づいて、原稿種別の判別を行う(S20)。   When the processing of all the pixel blocks is completed (YES in S19), the processing unit is based on the ratio of the number of pixel blocks of character pixel blocks, halftone pixel blocks, or other pixel blocks to the total number of pixel blocks of the entire document. Then, the document type is determined (S20).

処理部は、縮小された原稿全体の画素数に対するエッジ数の比率Csを算出し(S21)、算出した比率Csをメモリ2212に記憶する(S22)。なお、ステップS20の処理と、ステップS21及びS22の処理とは、並行に行うことができる。処理部は、主走査を行い(S23)、原稿全体の画像を取得する。処理部は、主走査で得られたRGB信号を輝度信号(L信号)に変換し(S24)、変換後の画像(縮小されていない画像)のエッジを検出する(S25)。処理部は、検出したエッジのエッジ数を算出し(S26)、原稿全体の画素数に対するエッジ数の比率Coを算出する(S27)。   The processing unit calculates a ratio Cs of the number of edges to the number of pixels of the entire reduced document (S21), and stores the calculated ratio Cs in the memory 2212 (S22). Note that the process of step S20 and the processes of steps S21 and S22 can be performed in parallel. The processing unit performs main scanning (S23), and acquires an image of the entire document. The processing unit converts the RGB signal obtained by the main scanning into a luminance signal (L signal) (S24), and detects an edge of the converted image (an unreduced image) (S25). The processing unit calculates the number of detected edges (S26), and calculates the ratio Co of the number of edges to the number of pixels of the entire document (S27).

処理部は、ステップS24で変換された画像(縮小されていない画像)に基づいて総和濃度繁雑度を算出する(S28)。具体的には、処理部は、画素ブロックの各画素に対して、4つの方向についての総和濃度繁雑度を算出する。なお、ステップS25〜S27の処理と、ステップS28の処理とは、並行に行うことができる。   The processing unit calculates the total density busyness based on the image (the image that has not been reduced) converted in step S24 (S28). Specifically, the processing unit calculates the total density busyness in four directions for each pixel of the pixel block. In addition, the process of step S25-S27 and the process of step S28 can be performed in parallel.

処理部は、ステップS22でメモリ2212に記憶させた比率Csを読み出し、ステップS27で算出された比率Coに対する比率Csの比(Cs/Co)を算出し、比(Cs/Co)が閾値THtc以下であるか否かを判定する(S29)。比(Cs/Co)が閾値THtc以下である場合(S29でYES)、処理部は、ステップS28で算出した総和濃度繁雑度が角度依存性を有しているか否かを判定する(S30)。   The processing unit reads the ratio Cs stored in the memory 2212 in step S22, calculates the ratio (Cs / Co) of the ratio Cs to the ratio Co calculated in step S27, and the ratio (Cs / Co) is equal to or less than the threshold value THtc. It is determined whether or not (S29). When the ratio (Cs / Co) is equal to or less than the threshold value THtc (YES in S29), the processing unit determines whether or not the total density busyness calculated in step S28 has angle dependency (S30).

処理部は、角度依存性を有すると判定した場合(S30でYES)、原稿に万線領域(万線パターンを含む領域)が含まれていると判定し(S31)、角度依存性を有しないと判定した場合(S30でNO)、原稿に小さい文字が多く含まれていると判定し(S32)、原稿種別判別信号を出力して(S33)、処理を終了する。   When it is determined that the processing unit has angle dependency (YES in S30), the processing unit determines that the document includes a line area (area including a line pattern) (S31) and does not have angle dependency. Is determined (NO in S30), it is determined that many small characters are included in the document (S32), a document type determination signal is output (S33), and the process ends.

一方、比(Cs/Co)が閾値THtc以下でない場合(S29でNO)、処理部は、原稿に擬似文字領域(擬似文字)が含まれていないと判定し(S34)、ステップS20で判別された原稿種別判別結果を示す原稿種別判別信号を出力する(S33)。   On the other hand, if the ratio (Cs / Co) is not equal to or less than the threshold value THtc (NO in S29), the processing unit determines that the pseudo character area (pseudo character) is not included in the document (S34), and is determined in step S20. A document type determination signal indicating the document type determination result is output (S33).

図13は領域判定処理の手順を示すフローチャートである。処理部は、画素ブロック内の最小濃度値を算出し(S101)、最大濃度値を算出し(S102)、算出した最大濃度値と最小濃度値との差分である最大濃度差を算出する(S103)。処理部は、最大濃度差閾値処理を行い(S104)、最大濃度差が閾値THsubより大きい場合、画素ブロックを文字領域又は網点領域(判定信号「0」)と判定し、最大濃度差が閾値THsub以下の場合、画素ブロックをその他の領域(判定信号「1」)と判定する。   FIG. 13 is a flowchart showing the procedure of the area determination process. The processing unit calculates a minimum density value in the pixel block (S101), calculates a maximum density value (S102), and calculates a maximum density difference that is a difference between the calculated maximum density value and the minimum density value (S103). ). The processing unit performs a maximum density difference threshold process (S104). When the maximum density difference is larger than the threshold value THsub, the pixel block is determined as a character area or a halftone dot area (determination signal “0”), and the maximum density difference is a threshold value. If it is equal to or lower than THsub, the pixel block is determined as another region (determination signal “1”).

処理部は、画素ブロックを二値化し(S105)、二値化データを走査して、主走査方向及び副走査方向の反転回数Kh、Kvを算出する(S106)。処理部は、反転回数閾値処理を行い(S107)、反転回数Kh≧所定の閾値THdt、かつ、反転回数Kv≧所定の閾値THdtの場合、画素ブロックは網点領域(判定信号「1」)であると判定するとともに、反転回数Kh<所定の閾値THdt、あるいは、反転回数Kv<所定の閾値THdtである場合、画素ブロックは文字領域(判定信号「0」)であると判定し、処理を終了する。なお、ステップS101〜S104の処理と、ステップS105〜S107の処理とは並行して行うことができる。   The processing unit binarizes the pixel block (S105), scans the binarized data, and calculates the inversion times Kh and Kv in the main scanning direction and the sub-scanning direction (S106). The processing unit performs a reversal count threshold process (S107), and if reversal count Kh ≧ predetermined threshold THdt and reversal count Kv ≧ predetermined threshold THdt, the pixel block is a halftone area (determination signal “1”). If the number of inversions Kh <predetermined threshold THdt or the number of inversions Kv <predetermined threshold THdt, it is determined that the pixel block is a character area (determination signal “0”), and the process ends. To do. In addition, the process of step S101-S104 and the process of step S105-S107 can be performed in parallel.

原稿に万線が含まれていると判定された場合、あるいは、原稿に小さい文字が多く含まれていると判定された場合、領域分離処理において、文字検知を行なわないようにエッジ検出の閾値を変更することができる。また、フィルタ処理において、万線を含む原稿に対しては、文字及び印刷写真が混在している文字/印刷写真原稿に用いられるフィルタで処理を行うよりも平滑化されるフィルタ係数を用い、小さい文字を多く含む原稿に対しては、文字/印刷写真原稿に用いられるフィルタで処理を行うよりも多少文字がくっきりするフィルタ係数を用いる。   If it is determined that the document contains lines, or if it is determined that the document contains many small characters, the edge detection threshold is set so that character detection is not performed in the region separation process. Can be changed. Further, in the filter process, for a document including a line, a filter coefficient that is smoothed is smaller than that performed by a filter used for a character / print photo document in which characters and print photos are mixed, and is small. For a document containing many characters, a filter coefficient that makes the characters slightly sharper than when processing with a filter used for a character / printed photo document is used.

更に、中間調処理(階調再現処理部29)では、万線を含む原稿に対しては、階調性を重視したディザ処理又は誤差拡散処理を行い、小さい文字を多く含む原稿に対しては、解像力を重視した処理を行う。上記フィルタ係数、ディザマトリクスの大きさや閾値、誤差拡散処理の拡散係数については、種々の原稿について画像を出力し、品質の良い画像が得られる条件を設定することができる。   Further, in the halftone processing (tone reproduction processing unit 29), dither processing or error diffusion processing that emphasizes gradation is performed on a document including a line, and a document including many small characters is processed. , Processing that emphasizes resolving power is performed. With respect to the filter coefficient, the dither matrix size and threshold value, and the diffusion coefficient for error diffusion processing, it is possible to set conditions for outputting images of various originals and obtaining high-quality images.

(実施の形態2)
実施の形態1では、原稿を予備走査(プレスキャン)することにより、原稿の全体画像のうち所定のサイズの部分画像を順次読み込むとともに、主走査方向の画像データに対して補間演算を行い、画素ブロック毎の縮小画像を生成する構成であったが、予備走査を行わずに原稿種別の判別を行うこともできる。
(Embodiment 2)
In the first embodiment, by performing preliminary scanning (pre-scanning) of a document, partial images of a predetermined size are sequentially read out of the entire image of the document, and interpolation calculation is performed on image data in the main scanning direction. Although the configuration is such that a reduced image is generated for each block, it is also possible to determine the document type without performing preliminary scanning.

図14は実施の形態2の原稿種別判別部22の構成を示すブロック図である。実施の形態1(図2参照)との相違点は、補間演算部2202を介さずに信号変換部2201で変換された輝度信号(L信号)を直接に最小濃度値算出部2203、最大濃度値算出部2204、反転回数算出部2205へ出力し、エッジ検出部2206及びエッジ検出結果演算部2211を並列に2段構成とし、補間演算部2202を介して信号変換部2201から出力される輝度信号を一方のエッジ検出部2206へ出力するとともに、補間演算部2202を介さず輝度信号を直接に他方のエッジ検出部2206へ出力するように構成していることである。   FIG. 14 is a block diagram illustrating the configuration of the document type determination unit 22 according to the second embodiment. The difference from the first embodiment (see FIG. 2) is that the luminance signal (L signal) converted by the signal conversion unit 2201 without using the interpolation calculation unit 2202 is directly used as the minimum density value calculation unit 2203 and the maximum density value. The luminance signal output from the signal conversion unit 2201 via the interpolation calculation unit 2202 is output to the calculation unit 2204 and the inversion count calculation unit 2205, and the edge detection unit 2206 and the edge detection result calculation unit 2211 are configured in two stages in parallel. In addition to being output to one edge detection unit 2206, the luminance signal is directly output to the other edge detection unit 2206 without going through the interpolation calculation unit 2202.

この場合、補間演算部2202は、信号変換部2201から入力された画像データ(輝度信号)の主走査方向及び副走査方向それぞれの画像データに対して画素を間引くことにより補間演算を行い、補間演算後の画像データ(すなわち、縮小された画像の画像データ)を一方のエッジ検出部2206へ出力する。エッジ検出部2206、エッジ検出結果演算部2211で実施の形態1と同様の処理を行うことにより、縮小された原稿全体の画像の総画素数に対するエッジ画素の数(エッジの数)の比率Csが算出され、算出された比率Csはエッジ計数比率判定部2216へ出力される。   In this case, the interpolation calculation unit 2202 performs interpolation calculation by thinning out pixels from the image data (luminance signal) input from the signal conversion unit 2201 in each of the main scanning direction and the sub-scanning direction. The subsequent image data (that is, the image data of the reduced image) is output to one edge detection unit 2206. The edge detection unit 2206 and the edge detection result calculation unit 2211 perform the same processing as in the first embodiment, so that the ratio Cs of the number of edge pixels (the number of edges) to the total number of pixels of the image of the entire reduced document is obtained. The calculated ratio Cs is output to the edge count ratio determination unit 2216.

一方、補間演算部2202を介さずに信号変換部2201から直接に他方のエッジ検出部2206へ出力された画像データ(すなわち、縮小されていない画像の画像データ)は、エッジ検出部2206、エッジ検出結果演算部2211で実施の形態1と同様の処理を行うことにより、縮小されていない原稿全体の画像の総画素数に対するエッジ画素の数(エッジの数)の比率Coが算出され、算出された比率Coはエッジ計数比率判定部2216へ出力される。   On the other hand, image data output from the signal conversion unit 2201 directly to the other edge detection unit 2206 without passing through the interpolation calculation unit 2202 (that is, image data of an unreduced image) By performing the same processing as in the first embodiment in the result calculation unit 2211, the ratio Co of the number of edge pixels (the number of edges) to the total number of pixels of the entire unreduced document image is calculated and calculated. The ratio Co is output to the edge count ratio determination unit 2216.

エッジ計数比率判定部2216は、比(Cs/Co)を求め、比(Cs/Co)と閾値THtcとを比較することにより、実施の形態1と同様に原稿に擬似文字(例えば、フォントサイズが4ポイント程度の小さい文字の領域、複雑な網点上文字、あるいは、万線パターンなど)が含まれているか否かの判定を行う。これにより、予備走査を行うことなく、原稿に擬似文字が含まれているか否かを判定することができる。   The edge count ratio determination unit 2216 obtains the ratio (Cs / Co) and compares the ratio (Cs / Co) with the threshold value THtc, so that pseudo characters (for example, the font size is added to the document) as in the first embodiment. It is determined whether or not a small character area of about 4 points, a complex halftone dot character, a line pattern, or the like is included. As a result, it is possible to determine whether or not the manuscript includes pseudo characters without performing preliminary scanning.

なお、実施の形態2では、補間演算により縮小されていない画像データを用いて、最大濃度差判定、反転回数判定を行って文字領域、網点領域、その他の領域などの領域判定(原稿種別判別)を行う構成であるが、補間演算を行った画像データを用いる構成とすることもできる。   In the second embodiment, the determination of the maximum density difference and the number of inversions are performed using image data that has not been reduced by the interpolation calculation to determine the region such as the character region, the dot region, and other regions (document type determination). However, it is also possible to use a configuration using image data subjected to interpolation calculation.

(実施の形態3)
実施の形態2では、予備走査を行わず原稿の画像全体に対して縮小した画像と縮小していない画像とで比率Cs、Coを算出する構成であったが、これに限定されるものではなく、原稿の画像全体に対して処理を行う代わりに、画像を画素ブロックに分割し、画素ブロック毎に擬似文字が含まれているか否かを判定することもできる。この場合、原稿種別の判別(領域判定)も画素ブロック毎に行うことができる。
(Embodiment 3)
In the second embodiment, the ratios Cs and Co are calculated based on the reduced image and the unreduced image with respect to the entire image of the document without performing preliminary scanning. However, the present invention is not limited to this. Instead of performing processing on the entire image of the document, it is also possible to divide the image into pixel blocks and determine whether or not a pseudo character is included in each pixel block. In this case, the document type determination (region determination) can also be performed for each pixel block.

図15は実施の形態3の原稿種別判別部22の構成を示すブロック図である。実施の形態2(図14参照)との相違点は、エッジ計数比率判定部2216の後段に擬似文字画素ブロック計数部2219を備える点である。   FIG. 15 is a block diagram illustrating the configuration of the document type determination unit 22 according to the third embodiment. The difference from the second embodiment (see FIG. 14) is that a pseudo character pixel block counting unit 2219 is provided at the subsequent stage of the edge counting ratio determining unit 2216.

エッジ検出部2206、2206、エッジ検出結果演算部2211、2211、エッジ計数比率判定部2216での各処理は、画素ブロック(例えば、縮小された画像データの場合、4×4画素のブロック、縮小されていない画像データの場合、8×8画素のブロック)単位で行われる。   Each processing in the edge detection units 2206 and 2206, the edge detection result calculation units 2211 and 2211, and the edge count ratio determination unit 2216 is reduced to a pixel block (for example, a 4 × 4 pixel block in the case of reduced image data). In the case of non-image data, it is performed in units of 8 × 8 pixel blocks).

従って、補間演算部2202の後段のエッジ検出部2206、エッジ検出結果演算部2211によって、補間演算後の画像データ(すなわち、縮小された画像の画像データ)における画素ブロックの総画素数に対するエッジ画素の数(エッジの数)の比率Esが算出され、算出された比率Esはエッジ計数比率判定部2216へ出力される。一方、補間演算部2202を介さずに信号変換部2201から直接に画像データを取得するエッジ検出部2206、エッジ検出結果演算部2211によって、画像データ(すなわち、縮小されていない画像の画像データ)における画素ブロックの総画素数に対するエッジ画素の数の比率Eoが算出され、算出された比率Eoはエッジ計数比率判定部2216へ出力される。   Therefore, the edge detection unit 2206 and the edge detection result calculation unit 2211 in the subsequent stage of the interpolation calculation unit 2202 perform edge pixel matching with respect to the total number of pixels in the pixel block in the image data after the interpolation calculation (that is, the image data of the reduced image). A ratio Es of the number (number of edges) is calculated, and the calculated ratio Es is output to the edge count ratio determination unit 2216. On the other hand, the edge detection unit 2206 and the edge detection result calculation unit 2211 that directly acquire the image data from the signal conversion unit 2201 without using the interpolation calculation unit 2202 in the image data (that is, the image data of the unreduced image). A ratio Eo of the number of edge pixels with respect to the total number of pixels of the pixel block is calculated, and the calculated ratio Eo is output to the edge count ratio determination unit 2216.

エッジ計数比率判定部2216は、比(Es/Eo)と閾値THtcとを比較する。比(Es/Eo)≦閾値THtcである場合、画素ブロックに擬似文字(例えば、フォントサイズが4ポイント程度の小さい文字の領域、複雑な網点上文字、あるいは、万線など)が含まれていると判定し、判定信号「1」を擬似文字画素ブロック計数部2219へ出力する。また、エッジ計数比率判定部2216は、比(Es/Eo)>閾値THtcである場合、画素ブロックに擬似文字が含まれていないと判定し、判定信号「0」を擬似文字画素ブロック計数部2219へ出力する。   The edge count ratio determination unit 2216 compares the ratio (Es / Eo) with the threshold value THtc. When the ratio (Es / Eo) ≦ threshold THtc, the pixel block includes a pseudo character (for example, a small character region having a font size of about 4 points, a complex halftone character, or a line). The determination signal “1” is output to the pseudo character pixel block counting unit 2219. In addition, when the ratio (Es / Eo)> threshold THtc, the edge count ratio determination unit 2216 determines that the pixel block does not include a pseudo character, and sends a determination signal “0” to the pseudo character pixel block count unit 2219. Output to.

擬似文字画素ブロック計数部2219には、総和濃度繁雑度算出部2218からの判定結果(総和濃度繁雑度の角度依存性の有無)も入力されており、擬似文字画素ブロック計数部2219は、総和濃度繁雑度の角度依存性の有無に基づいて、各画素ブロックが万線領域であるか、または小さい文字を多く含む領域であるかに分けて、エッジ計数比率判定部2216が出力した判定信号「1」を計数する。擬似文字画素ブロック計数部2219は、それぞれの領域に分けて算出した判定信号の計数値の、原稿全体の画素ブロックの総数に対する比率をそれぞれ算出し、算出した比率を原稿判定部2217へ出力する。   The pseudo character pixel block counting unit 2219 also receives the determination result (whether or not there is an angular dependency of the total density busyness) from the total density busyness calculating unit 2218, and the pseudo character pixel block counting unit 2219 receives the total density. The determination signal “1” output by the edge count ratio determination unit 2216 is divided into whether each pixel block is a line area or an area containing many small characters based on the presence or absence of the angle dependency of the degree of complexity. Is counted. The pseudo character pixel block counting unit 2219 calculates the ratio of the count value of the determination signal calculated separately for each region to the total number of pixel blocks in the entire document, and outputs the calculated ratio to the document determination unit 2217.

原稿判定部2217は、文字画素ブロック計数部2213、網点画素ブロック計数部2214、その他の画素ブロック計数部2215及び擬似文字画素ブロック計数部2219から入力された各画素ブロックの比率とそれぞれの閾値とを比較し、原稿全体の種別の判別を行う。なお、上記閾値は、処理を行う画素ブロックの大きさを設定し、設定された画素ブロックを用いて種々の画像サンプルで評価を行い適切な値を設定することができる。   The document determination unit 2217 includes a character pixel block counting unit 2213, a halftone pixel block counting unit 2214, a ratio of each pixel block input from the other pixel block counting unit 2215, and a pseudo character pixel block counting unit 2219, and respective threshold values. Are compared to determine the type of the entire document. Note that the threshold value can be set to an appropriate value by setting the size of a pixel block to be processed and evaluating various image samples using the set pixel block.

図16及び図17は実施の形態3の原稿種別判別処理の手順を示すフローチャートである。処理部は、主走査で得られたRGB信号を輝度信号に変換し(S41)、変換後の画像データを一旦画像メモリ(不図示)に記憶する。処理部は、変換後の画像データから所定サイズの画素ブロック(例えば、8×8画素)を抽出して画素ブロックの領域判定処理を行う(S42)。なお、領域判定処理は図13の処理と同様であるので説明は省略する。   16 and 17 are flowcharts showing the procedure of document type discrimination processing according to the third embodiment. The processing unit converts the RGB signal obtained by the main scanning into a luminance signal (S41), and temporarily stores the converted image data in an image memory (not shown). The processing unit extracts a pixel block of a predetermined size (for example, 8 × 8 pixels) from the converted image data and performs pixel block region determination processing (S42). The area determination process is the same as the process of FIG.

処理部は、領域判定処理の結果に基づいて、画素ブロックの最終領域判定である総合判定処理を行い(S43)、画素ブロックの総合判定結果に応じて、文字画素ブロック、網点画素ブロック、あるいはその他の画素ブロックのいずれかの画素ブロック数を加算する(S44)。   The processing unit performs comprehensive determination processing that is final region determination of the pixel block based on the result of the region determination processing (S43), and depending on the comprehensive determination result of the pixel block, the character pixel block, the halftone pixel block, or The number of pixel blocks of any other pixel block is added (S44).

処理部は、万線領域を含む画素ブロック数S1及び小さい文字を含む画素ブロック数S2をそれぞれ「0」に設定し(S45)、画像メモリに記憶された画像データから所定サイズの画素ブロック(例えば、8×8画素)を抽出して画像のエッジを検出し(S46)、画素ブロックの総画素数に対するエッジ数の比率Eoを算出する(S47)。   The processing unit sets the number of pixel blocks S1 including the line region and the number S2 of pixel blocks including the small character to “0” (S45), and the pixel block of a predetermined size (for example, from the image data stored in the image memory) , 8 × 8 pixels) are extracted to detect the edge of the image (S46), and the ratio Eo of the number of edges to the total number of pixels in the pixel block is calculated (S47).

処理部は、画像メモリに記憶された画像データに対して、主走査方向及び副走査方向の補間演算を行い所定サイズの画素ブロック(例えば、4×4画素)、すなわち、縮小画像を生成する(S48)。処理部は、縮小画像のエッジを検出し(S49)、画素ブロックの総画素数に対するエッジ数の比率Esを算出する(S50)。   The processing unit performs interpolation calculation in the main scanning direction and the sub-scanning direction on the image data stored in the image memory, and generates a pixel block of a predetermined size (for example, 4 × 4 pixels), that is, a reduced image ( S48). The processing unit detects the edge of the reduced image (S49), and calculates the ratio Es of the number of edges to the total number of pixels in the pixel block (S50).

処理部は、ステップS41で変換された画像(縮小されていない画像)における画素ブロックの総和濃度繁雑度を算出する(S51)。なお、ステップS46及びS47の処理と、ステップS48〜S50の処理と、ステップS51の処理とは、並行に行うことができる。   The processing unit calculates the total density busyness of the pixel blocks in the image converted in step S41 (the image that has not been reduced) (S51). In addition, the process of step S46 and S47, the process of step S48-S50, and the process of step S51 can be performed in parallel.

処理部は、ステップS47で算出された比率Eoに対する、ステップS50で算出された比率Esの比(Es/Eo)を算出し、比(Es/Eo)が閾値THtc以下であるか否かを判定する(S52)。比(Es/Eo)が閾値THtc以下である場合(S52でYES)、処理部は、ステップS51で算出した総和濃度繁雑度が角度依存性を有するか否かを判定する(S53)。   The processing unit calculates a ratio (Es / Eo) of the ratio Es calculated in step S50 to the ratio Eo calculated in step S47, and determines whether the ratio (Es / Eo) is equal to or less than a threshold value THtc. (S52). When the ratio (Es / Eo) is equal to or less than the threshold value THtc (YES in S52), the processing unit determines whether the total density busyness calculated in step S51 has angle dependency (S53).

処理部は、角度依存性を有すると判定した場合(S53でYES)、万線領域を含む画素ブロック数S1に「1」を加算し(S54)、角度依存性を有しないと判定した場合(S53でNO)、小さい文字を含む画素ブロック数S2に「1」を加算し(S55)、すべての画素ブロックの処理が終了したか否かを判定する(S56)。比(Es/Eo)が閾値THtc以下でない場合(S52でNO)、処理部は、ステップS56以降の処理を行う。なお、ステップS42〜S44の処理と、ステップS45〜S55の処理とは、並行に行うことができる。   When it is determined that the processing unit has angle dependency (YES in S53), “1” is added to the number S1 of pixel blocks including the line region (S54), and when it is determined that there is no angle dependency (S54). “NO” in S53), “1” is added to the number S2 of pixel blocks including small characters (S55), and it is determined whether or not the processing of all the pixel blocks is completed (S56). When the ratio (Es / Eo) is not equal to or less than the threshold value THtc (NO in S52), the processing unit performs the processing after step S56. In addition, the process of step S42-S44 and the process of step S45-S55 can be performed in parallel.

すべての画素ブロックの処理が終了していない場合(S56でNO)、処理部は、ステップS41以降の処理を続け、画素ブロック毎の上述の処理を繰り返す。すべての画素ブロックの処理が終了した場合(S56でYES)、処理部は、原稿全体の画素ブロックの総数に対する文字画素ブロック、網点画素ブロック、その他の画素ブロック、あるいは、擬似文字画素ブロック(万線パターンを含む画素ブロック又は小さい文字を含む画素ブロック)の画素ブロック数の比率に基づいて、原稿種別の判別を行い(S57)、原稿種別判別信号を出力し(S58)、処理を終了する。   If all the pixel blocks have not been processed (NO in S56), the processing unit continues the processing from step S41 and repeats the above-described processing for each pixel block. When the processing of all the pixel blocks is completed (YES in S56), the processing unit performs a character pixel block, a halftone pixel block, other pixel blocks, or a pseudo character pixel block (10,000 pixels) with respect to the total number of pixel blocks of the entire document. Based on the ratio of the number of pixel blocks of a pixel block including a line pattern or a pixel block including a small character), the document type is determined (S57), a document type determination signal is output (S58), and the process ends.

(実施の形態4)
上述した実施の形態1〜3は、原稿種別判別処理に本発明を適用した例であったが、本発明の適用範囲はこれに限定されるものではなく、画像の領域分離処理に適用することもできる。
(Embodiment 4)
The first to third embodiments described above are examples in which the present invention is applied to the document type determination processing. However, the scope of the present invention is not limited to this, and the present invention is applied to image region separation processing. You can also.

図18は実施の形態4の画像形成装置100の構成を示すブロック図である。実施の形態1〜3との相違点は、原稿種別判別部22が除かれている点と、領域分離処理部24で擬似文字領域(万線パターン又は小さい文字を多く含む領域)の有無の判定を含めた領域分離処理を行う点である。すなわち、シェーディング補正部21は、入力されたRGB信号に対して、カラー画像入力装置1の照明系、結像系、撮像系などで生じた各種の歪みを取り除く補正処理を行うとともに、カラーバランスの調整を行い、調整後のRGB信号を入力階調補正部23へ出力する。   FIG. 18 is a block diagram illustrating a configuration of the image forming apparatus 100 according to the fourth embodiment. The difference from the first to third embodiments is that the original type discriminating unit 22 is excluded and the region separation processing unit 24 determines whether or not there is a pseudo character region (a line pattern or a region containing many small characters). This is the point of performing region separation processing including That is, the shading correction unit 21 performs a correction process for removing various distortions generated in the illumination system, the imaging system, the imaging system, and the like of the color image input apparatus 1 on the input RGB signal, and at the same time, the color balance. The adjustment is performed, and the adjusted RGB signal is output to the input tone correction unit 23.

図19は実施の形態4の領域分離処理部24の構成を示すブロック図である。領域分離処理部24は、信号変換部2401、補間演算部2402、最小濃度値算出部2403、最大濃度値算出部2404、反転回数算出部2405、エッジ検出部2406、2406、最大濃度差算出部2407、最大濃度差判定部2408、反転回数判定部2409、総合判定部2410、エッジ検出結果演算部2411、2411、エッジ計数比率判定部2416、総和濃度繁雑度算出部2418などを備えている。   FIG. 19 is a block diagram illustrating a configuration of the region separation processing unit 24 according to the fourth embodiment. The region separation processing unit 24 includes a signal conversion unit 2401, an interpolation calculation unit 2402, a minimum density value calculation unit 2403, a maximum density value calculation unit 2404, an inversion number calculation unit 2405, edge detection units 2406 and 2406, and a maximum density difference calculation unit 2407. A maximum density difference determination unit 2408, an inversion number determination unit 2409, an overall determination unit 2410, edge detection result calculation units 2411 and 2411, an edge count ratio determination unit 2416, a total density busyness calculation unit 2418, and the like.

領域分離処理部24は、原稿を走査(主走査でも予備走査でもよいが、以下では、主走査を行う場合について説明する。)して得られた画像データを所定のサイズの画素ブロックに分割し、分割した画素ブロック毎に文字領域、網点領域、その他の領域、あるいは、擬似文字領域(例えば、フォントサイズが4ポイント程度の小さい文字、複雑な網点上の文字、あるいは万線などが含まれる領域)などの領域分離処理を行う。   The area separation processing unit 24 divides image data obtained by scanning a document (which may be main scanning or preliminary scanning, but will be described below in the case of performing main scanning) into pixel blocks of a predetermined size. For each divided pixel block, character area, halftone dot area, other area, or pseudo-character area (for example, small characters with a font size of about 4 points, complex halftone characters, or lines) Region separation processing is performed.

なお、画素ブロックに擬似文字が含まれるか否かの判定は、実施の形態1〜3と同様に、縮小画像の総画素数に対するエッジの数の比率と、縮小されていない画像の総画素数に対するエッジの数の比率とに基づいて行う。また、擬似文字のうちの万線パターンが画素ブロックに含まれるか否かの判定は、実施の形態1〜3と同様に、縮小されていない画像の所定のサイズの画素ブロックの総数に対する、総和濃度繁雑度が角度依存性を有する画素ブロックの比率に基づいて行う。なお、縮小画像の画素ブロックは、画像データを主走査方向及び副走査方向に補間演算することにより生成される。   Whether or not the pixel block includes pseudo characters is determined by the ratio of the number of edges to the total number of pixels of the reduced image and the total number of pixels of the unreduced image, as in the first to third embodiments. And the ratio of the number of edges to. Further, the determination as to whether or not the line pattern of the pseudo characters is included in the pixel block is the sum of the total number of pixel blocks of a predetermined size of the unreduced image as in the first to third embodiments. This is performed based on the ratio of pixel blocks whose density complexity is angle-dependent. Note that the pixel block of the reduced image is generated by interpolating image data in the main scanning direction and the sub-scanning direction.

信号変換部2401は、入力階調補正部23から入力されたRGB信号(RGBの反射率信号)を輝度信号(L信号)に変換し、変換後の画像データを一旦画像メモリ(不図示)に記憶する。最小濃度値算出部2403、最大濃度値算出部2404、反転回数算出部2405、補間演算部2402、エッジ検出部2406、総和濃度繁雑度算出部2418は、変換後の画像データから所定サイズの画素ブロック(例えば、8×8画素)を抽出して画素ブロック毎に各処理を行う。   The signal converter 2401 converts the RGB signal (RGB reflectance signal) input from the input tone correction unit 23 into a luminance signal (L signal), and temporarily converts the converted image data into an image memory (not shown). Remember. The minimum density value calculating unit 2403, the maximum density value calculating unit 2404, the inversion number calculating unit 2405, the interpolation calculating unit 2402, the edge detecting unit 2406, and the total density busyness calculating unit 2418 are pixel blocks of a predetermined size from the converted image data. (For example, 8 × 8 pixels) is extracted and each process is performed for each pixel block.

最小濃度値算出部2403は、画素ブロックの中で最小濃度値を算出し、算出した最小濃度値を最大濃度差算出部2407へ出力する。最大濃度値算出部2404は、画素ブロックの中で最大濃度値を算出し、算出した最大濃度値を最大濃度差算出部2407へ出力する。   The minimum density value calculation unit 2403 calculates the minimum density value in the pixel block, and outputs the calculated minimum density value to the maximum density difference calculation unit 2407. The maximum density value calculation unit 2404 calculates the maximum density value in the pixel block, and outputs the calculated maximum density value to the maximum density difference calculation unit 2407.

最大濃度差算出部2407は、最小濃度値算出部2403及び最大濃度値算出部2404から入力された最小濃度値及び最大濃度値の差分(最大濃度差)を算出し、算出した最大濃度差を最大濃度差判定部2408へ出力する。   The maximum density difference calculation unit 2407 calculates a difference (maximum density difference) between the minimum density value and the maximum density value input from the minimum density value calculation unit 2403 and the maximum density value calculation unit 2404, and the calculated maximum density difference is maximized. The data is output to the density difference determination unit 2408.

最大濃度差判定部2408は、最大濃度差算出部2407から入力された最大濃度差を閾値処理し、最大濃度差が閾値THsubより大きい場合、画素ブロックを文字領域又は網点領域(判定信号「0」)と判定し、最大濃度差が閾値THsub以下の場合、画素ブロックをその他の領域(判定信号「1」)と判定し、判定信号を総合判定部2410へ出力する。   The maximum density difference determination unit 2408 performs threshold processing on the maximum density difference input from the maximum density difference calculation unit 2407. If the maximum density difference is larger than the threshold value THsub, the pixel block is converted into a character area or a dot area (determination signal “0”). If the maximum density difference is equal to or less than the threshold value THsub, the pixel block is determined as another region (determination signal “1”), and the determination signal is output to the comprehensive determination unit 2410.

反転回数算出部2405は、画素ブロックの画像データの平均値を求め、この平均値を用いて各画素を二値化する。反転回数算出部2405は、画素ブロック内の二値化データを走査して、主走査方向の反転回数Kh、副走査方向の反転回数Kvを算出し、算出した主走査方向の反転回数Kh、副走査方向の反転回数Kvを反転回数判定部2409へ出力する。   The inversion number calculation unit 2405 obtains an average value of the image data of the pixel block, and binarizes each pixel using the average value. The inversion number calculation unit 2405 scans the binarized data in the pixel block, calculates the inversion number Kh in the main scanning direction and the inversion number Kv in the sub scanning direction, and calculates the inversion number Kh in the main scanning direction, The inversion number Kv in the scanning direction is output to the inversion number determination unit 2409.

反転回数判定部2409は、反転回数Kh≧所定の閾値THdt、かつ、反転回数Kv≧所定の閾値THdtの場合、画素ブロックは網点領域(判定信号「1」)であると判定し、反転回数Kh<所定の閾値THdt、あるいは、反転回数Kv<所定の閾値THdtである場合、画素ブロックは文字領域(判定信号「0」)であると判定し、判定信号を総合判定部2410へ出力する。   The inversion number determination unit 2409 determines that the pixel block is a halftone dot region (determination signal “1”) when the inversion number Kh ≧ the predetermined threshold value THdt and the inversion number Kv ≧ the predetermined threshold value THdt, and the inversion number If Kh <predetermined threshold THdt or the number of inversions Kv <predetermined threshold THdt, it is determined that the pixel block is a character region (determination signal “0”), and a determination signal is output to the comprehensive determination unit 2410.

補間演算部2402は、画素ブロックの主走査方向及び副走査方向それぞれの画像データに対して画素を間引くことにより補間演算を行い、所定のサイズの画素ブロック(例えば、4×4画素、すなわち、縮小された画像の画像データ)を生成し、生成した画素ブロックを後段のエッジ検出部2406へ出力する。   The interpolation calculation unit 2402 performs an interpolation calculation by thinning out pixels from the image data in the main scanning direction and the sub-scanning direction of the pixel block, and performs a pixel block of a predetermined size (for example, 4 × 4 pixels, that is, a reduction). Image data of the generated image) is generated, and the generated pixel block is output to the edge detection unit 2406 at the subsequent stage.

エッジ検出部2406は、補間演算後の画素ブロック内の各画素を注目画素として走査し、注目画素と該注目画素に隣接する周辺画素の濃度差を閾値THedと比較することによりエッジを検出し、画素ブロック毎に検出されたエッジ画像をエッジ検出結果演算部2411へ出力する。   The edge detection unit 2406 scans each pixel in the pixel block after the interpolation calculation as a target pixel, detects an edge by comparing the density difference between the target pixel and a neighboring pixel adjacent to the target pixel with a threshold value THed, The edge image detected for each pixel block is output to the edge detection result calculation unit 2411.

エッジ検出結果演算部2411は、エッジ検出部2406から出力されたエッジ画像に基づいて、縮小された画素ブロックの総画素数に対するエッジ画素の数(エッジの数)の比率Esを算出し、算出した比率Esをエッジ計数比率判定部2416へ出力する。   The edge detection result calculation unit 2411 calculates the ratio Es of the number of edge pixels (the number of edges) to the total number of pixels of the reduced pixel block based on the edge image output from the edge detection unit 2406 and calculates The ratio Es is output to the edge count ratio determination unit 2416.

他方のエッジ検出部2406は、縮小されていない画素ブロック内の各画素を注目画素として走査し、注目画素と該注目画素に隣接する周辺画素の濃度差を閾値THedと比較することによりエッジを検出し、画素ブロック毎に検出されたエッジ画像をエッジ検出結果演算部2411へ出力する。   The other edge detection unit 2406 scans each pixel in the pixel block that has not been reduced as a target pixel, and detects an edge by comparing the density difference between the target pixel and a neighboring pixel adjacent to the target pixel with a threshold value THed. Then, the edge image detected for each pixel block is output to the edge detection result calculation unit 2411.

エッジ検出結果演算部2411は、エッジ検出部2406から入力されたエッジ画像に基づいて、画素ブロックの総画素数に対するエッジ画素の数(エッジの数)の比率Eoを算出し、算出した比率Eoをエッジ計数比率判定部2416へ出力する。   Based on the edge image input from the edge detection unit 2406, the edge detection result calculation unit 2411 calculates a ratio Eo of the number of edge pixels (number of edges) to the total number of pixels of the pixel block, and calculates the calculated ratio Eo. The data is output to the edge count ratio determination unit 2416.

エッジ計数比率判定部2416は、エッジ検出結果演算部2411、2411から入力された比率Eo、Esに基づいて、比率Eoに対する比率Esの比(Es/Eo)を求め、比(Es/Eo)と閾値THtcとを比較する。比(Es/Eo)≦閾値THtcである場合、画素ブロックに擬似文字(例えば、フォントサイズが4ポイント程度の小さい文字、複雑な網点上文字、あるいは、万線パターンなど)が含まれている(判定信号「1」)と判定する。また、エッジ計数比率判定部2416は、比(Es/Eo)>閾値THtcである場合、画素ブロックに擬似文字が含まれていない(判定信号「0」)と判定し、それぞれの判定信号を総合判定部2410へ出力する。   The edge count ratio determination unit 2416 obtains a ratio (Es / Eo) of the ratio Es to the ratio Eo based on the ratios Eo and Es input from the edge detection result calculation units 2411 and 2411, and the ratio (Es / Eo) and The threshold value THtc is compared. When the ratio (Es / Eo) ≦ threshold THtc, the pixel block includes a pseudo character (for example, a small character having a font size of about 4 points, a complex halftone character, a line pattern, or the like). (Determination signal “1”). In addition, when the ratio (Es / Eo)> threshold value THtc, the edge count ratio determination unit 2416 determines that the pixel block does not include a pseudo character (determination signal “0”), and combines each determination signal. The data is output to the determination unit 2410.

総和濃度繁雑度算出部2418は、画素ブロックに対して、4つの方向について隣接する画素間での総和濃度繁雑度をそれぞれ算出し、算出した4つの総和濃度繁雑度と予め定められた閾値とを比較する。総和濃度繁雑度算出部2418は、特定の方向についての総和濃度繁雑度のみが閾値より小さい場合、この画素ブロックの総和濃度繁雑度が角度依存性を有していると判定し(判定信号「1」)、それ以外の場合、この画素ブロックの総和濃度繁雑度が角度依存性を有していないと判定し(判定信号「0」)、それぞれの判定信号を総合判定部2410へ出力する。   The total density busyness calculation unit 2418 calculates the total density busyness between adjacent pixels in the four directions for each pixel block, and calculates the calculated four total density busyness and a predetermined threshold value. Compare. When only the total density busyness in a specific direction is smaller than the threshold value, the total density busyness calculating unit 2418 determines that the total density busyness of this pixel block has an angle dependency (determination signal “1”). In other cases, it is determined that the total density busyness of this pixel block does not have angle dependency (determination signal “0”), and each determination signal is output to the comprehensive determination unit 2410.

総合判定部2410は、最大濃度差判定部2408、反転回数判定部2409、エッジ計数比率判定部2416、総和濃度繁雑度算出部2418からそれぞれ入力された判定信号に基づいて、画素ブロックがいずれの領域、具体的には、文字領域、網点領域、その他の領域、あるいは、擬似文字領域(万線パターン又は小さい文字を含む領域)であるかを最終判定し、判定結果である領域識別信号を出力する。   The overall determination unit 2410 determines which region the pixel block is based on the determination signals input from the maximum density difference determination unit 2408, the inversion number determination unit 2409, the edge count ratio determination unit 2416, and the total density busyness calculation unit 2418. Specifically, it is finally determined whether it is a character area, halftone dot area, other area, or pseudo-character area (area including a line pattern or a small character), and an area identification signal as a determination result is output. To do.

図20は実施の形態4の総合判定部2410の最終判定方法を示す説明図である。図に示すように、最大濃度差判定部2408からの判定信号が「1」である場合、反転回数判定部2409、エッジ計数比率判定部2416、総和濃度繁雑度算出部2418からの判定信号にかかわらず、最終判定はその他となる。また、最大濃度差判定部2408からの判定信号が「0」であり、反転回数判定部2409からの判定信号が「1」である場合、エッジ計数比率判定部2416、総和濃度繁雑度算出部2418からの判定信号にかかわらず、最終判定は網点となる。   FIG. 20 is an explanatory diagram illustrating a final determination method of the comprehensive determination unit 2410 according to the fourth embodiment. As shown in the figure, when the determination signal from the maximum density difference determination unit 2408 is “1”, the determination signal from the inversion number determination unit 2409, the edge count ratio determination unit 2416, and the total density busyness calculation unit 2418 is related. First, the final judgment is other. Further, when the determination signal from the maximum density difference determination unit 2408 is “0” and the determination signal from the inversion number determination unit 2409 is “1”, the edge count ratio determination unit 2416 and the total density busyness calculation unit 2418. Regardless of the determination signal from, the final determination is a halftone dot.

また、最大濃度差判定部2408、反転回数判定部2409及びエッジ計数比率判定部2416からの判定信号が「0」である場合、総和濃度繁雑度算出部2418からの判定信号にかかわらず、最終判定は文字となる。更に、最大濃度差判定部2408及び反転回数判定部2409からの判定信号が「0」であり、エッジ計数比率判定部2416からの判定信号が「1」である場合、総和濃度繁雑度算出部2418からの判定信号が「0」であるときは、最終判定は小さい文字を多く含む領域となり、総和濃度繁雑度算出部2418からの判定信号が「1」であるときは、最終判定は万線パターンを含む領域となる。   When the determination signals from the maximum density difference determination unit 2408, the inversion number determination unit 2409, and the edge count ratio determination unit 2416 are “0”, the final determination is performed regardless of the determination signal from the total density busyness calculation unit 2418. Becomes a character. Furthermore, when the determination signal from the maximum density difference determination unit 2408 and the inversion number determination unit 2409 is “0” and the determination signal from the edge count ratio determination unit 2416 is “1”, the total density busyness calculation unit 2418. When the determination signal from “0” is “0”, the final determination is an area including many small characters. When the determination signal from the total density busyness calculation unit 2418 is “1”, the final determination is a line pattern. It becomes the area including.

図21及び図22は実施の形態4の領域分離処理の手順を示すフローチャートである。処理部は、主走査で得られたRGB信号を輝度信号に変換し(S71)、変換後の画像データを一旦画像メモリに記憶する。処理部は、変換後の画像データから所定サイズの画素ブロック(例えば、8×8画素)を抽出して画素ブロックの領域判定処理を行い(S72)、判定信号(具体的には、最大濃度差判定部2408及び反転回数判定部2409から出力された判定信号)を記憶する(S73)。なお、領域判定処理は図13の処理と同様であるので説明は省略する。   21 and 22 are flowcharts showing the procedure of the region separation process according to the fourth embodiment. The processing unit converts the RGB signal obtained by the main scanning into a luminance signal (S71), and temporarily stores the converted image data in the image memory. The processing unit extracts a pixel block of a predetermined size (for example, 8 × 8 pixels) from the converted image data, performs pixel block region determination processing (S72), and determines a determination signal (specifically, the maximum density difference). The determination signal output from the determination unit 2408 and the inversion number determination unit 2409 is stored (S73). The area determination process is the same as the process of FIG.

処理部は、画像メモリに記憶された画像データから所定サイズの画素ブロック(例えば、8×8画素)を抽出して画像のエッジを検出し(S74)、画素ブロックの総画素数に対するエッジ数の比率Eoを算出する(S75)。   The processing unit extracts a pixel block of a predetermined size (for example, 8 × 8 pixels) from the image data stored in the image memory, detects an edge of the image (S74), and determines the number of edges relative to the total number of pixels of the pixel block. The ratio Eo is calculated (S75).

処理部は、画像メモリに記憶された画像データに対して、主走査方向及び副走査方向の補間演算を行い所定サイズの画素ブロック(例えば、4×4画素)、すなわち、縮小画像を生成する(S76)。処理部は、縮小画像のエッジを検出し(S77)、画素ブロックの総画素数に対するエッジ数の比率Esを算出する(S78)。処理部は、ステップS71で変換された画像(縮小されていない画像)の総和濃度繁雑度を算出する(S79)。なお、ステップS74及びS75の処理と、ステップS76〜S78の処理と、ステップS79の処理とは、並行に行うことができる。   The processing unit performs interpolation calculation in the main scanning direction and the sub-scanning direction on the image data stored in the image memory, and generates a pixel block of a predetermined size (for example, 4 × 4 pixels), that is, a reduced image ( S76). The processing unit detects the edge of the reduced image (S77), and calculates the ratio Es of the number of edges to the total number of pixels in the pixel block (S78). The processing unit calculates the total density busyness of the image (the image that has not been reduced) converted in step S71 (S79). Note that the processes of steps S74 and S75, the processes of steps S76 to S78, and the process of step S79 can be performed in parallel.

処理部は、比(Es/Eo)が閾値THtc以下であるか否かに基づいてエッジ計数比率判定部2416から出力される判定信号、及び総和濃度繁雑度が角度依存性を有しているか否かに基づいて総和濃度繁雑度算出部2418から出力される判定信号を記憶する(S80)。なお、ステップS72及びS73の処理と、ステップS74〜S80の処理とは、並行に行うことができる。   The processing unit determines whether the determination signal output from the edge count ratio determination unit 2416 based on whether the ratio (Es / Eo) is equal to or less than the threshold value THtc, and whether the total density busyness has an angle dependency. The determination signal output from the total density busyness calculation unit 2418 is stored based on the determination (S80). In addition, the process of step S72 and S73 and the process of step S74-S80 can be performed in parallel.

処理部は、ステップS73及びS80で記憶した判定信号に基づいて、画素ブロックの領域分離のための総合判定処理を行う(S81)。具体的には、処理部は、最大濃度差判定部2408から出力された判定信号が「1」である場合、処理対象の画素ブロックをその他の領域に分離し、最大濃度差判定部2408から出力された判定信号が「0」であり、反転回数判定部2409から出力された判定信号が「1」である場合、処理対象の画素ブロックを網点領域に分離する。   The processing unit performs comprehensive determination processing for pixel block region separation based on the determination signals stored in steps S73 and S80 (S81). Specifically, when the determination signal output from the maximum density difference determination unit 2408 is “1”, the processing unit separates the pixel block to be processed into other regions and outputs from the maximum density difference determination unit 2408. When the determined determination signal is “0” and the determination signal output from the inversion number determination unit 2409 is “1”, the pixel block to be processed is separated into halftone areas.

また、処理部は、最大濃度差判定部2408、反転回数判定部2409及びエッジ計数比率判定部2416から出力された判定信号が「0」である場合、処理対象の画素ブロックを文字領域に分離する。更に、処理部は、最大濃度差判定部2408及び反転回数判定部2409から出力された判定信号が「0」であり、エッジ計数比率判定部2416から出力された判定信号が「1」である場合に、総和濃度繁雑度算出部2418から出力された判定信号が「0」であるときは、処理対象の画素ブロックを小さい文字を多く含む領域に分離し、総和濃度繁雑度算出部2418から出力された判定信号が「1」であるときは、処理対象の画素ブロックを万線パターンを含む領域に分離する。   In addition, when the determination signals output from the maximum density difference determination unit 2408, the inversion number determination unit 2409, and the edge count ratio determination unit 2416 are “0”, the processing unit separates the pixel block to be processed into character regions. . Further, when the determination signal output from the maximum density difference determination unit 2408 and the inversion number determination unit 2409 is “0” and the determination signal output from the edge count ratio determination unit 2416 is “1”, the processing unit is “1”. In addition, when the determination signal output from the total density busyness calculation unit 2418 is “0”, the pixel block to be processed is separated into regions containing many small characters, and is output from the total density busyness calculation unit 2418. When the determination signal is “1”, the pixel block to be processed is separated into regions including line patterns.

処理部は、すべての画素ブロックの処理が終了したか否かを判定し(S82)、すべての画素ブロックの処理が終了していない場合(S82でNO)、処理部は、ステップS71以降の処理を続け、画素ブロック毎の上述の処理を繰り返す。すべての画素ブロックの処理が終了した場合(S82でYES)、処理部は、処理を終了する。   The processing unit determines whether or not the processing of all the pixel blocks has been completed (S82). If the processing of all the pixel blocks has not been completed (NO in S82), the processing unit performs the processing from step S71 onward. And the above-described processing for each pixel block is repeated. When the processing for all the pixel blocks is completed (YES in S82), the processing unit ends the processing.

画素ブロックが万線を含む領域であると判定された場合、フィルタ処理において、文字及び印刷写真が混在している文字/印刷写真原稿に用いられるフィルタで処理を行うよりも平滑化されるフィルタ係数を用い、中間調処理において、階調性を重視したディザ処理又は誤差拡散処理を行う。また、画素ブロックが小さい文字を多く含む領域であると判定された場合、フィルタ処理において、文字/印刷写真原稿に用いられるフィルタで処理を行うよりも多少文字がくっきりするフィルタ係数を用い、中間調処理において、解像力を重視した処理を行う。   When it is determined that the pixel block is an area including a line, a filter coefficient that is smoothed in the filter process, rather than performing a process using a filter used for a character / printed photo document in which characters and a printed photo are mixed In the halftone processing, dither processing or error diffusion processing that emphasizes gradation is performed. Also, if it is determined that the pixel block is an area including many small characters, the filter processing uses a filter coefficient that makes the characters slightly sharper than the processing performed by the filter used for characters / printed photo originals. In the processing, processing with an emphasis on resolution is performed.

以上説明したように、本発明にあっては、画像に小さい文字、複雑な網点上の文字、あるいは様々なパターンの万線などの擬似文字が含まれている場合に、擬似文字の有無だけでなく、擬似文字のうちの小さい文字が多く含まれているか、又は擬似文字のうちの万線が含まれているかを精度よく判定することができ、それぞれに対応する処理を行うことにより画質の劣化を防止することができる。また、画像を所要の画素ブロックに分割し、画素ブロック毎に擬似文字の有無を判定することができる。また、原稿が擬似文字を含む原稿であるか否かを精度良く判定することができる。   As described above, in the present invention, when the image includes small characters, characters on complex halftone dots, or pseudo characters such as various lines of lines, only the presence or absence of the pseudo characters In addition, it is possible to accurately determine whether a small number of pseudo characters are included or whether a line of pseudo characters is included, and image quality can be improved by performing processing corresponding to each. Deterioration can be prevented. Also, the image can be divided into required pixel blocks, and the presence or absence of pseudo characters can be determined for each pixel block. Further, it can be accurately determined whether or not the document is a document including pseudo characters.

また、フォントサイズが4ポイントなどの小さい文字を多く含む領域、複雑な網点上文字(着色した領域に小さい文字で印刷された領域)に対して領域分離処理を施すと、文字領域であると判定される場合と、網点領域であると判定される場合とがあり、正しく文字領域であると判定されない場合がある。その結果、フィルタ処理を施す際に文字領域であると判定された領域はエッジが強調され、網点領域であると判定された領域(例えば、「へん」や「つくり」の複雑な箇所)は平滑化されるので、部分的にぼやけてしまい画質が劣化する。さらに、万線を含む領域は、本来、平滑化処理が施されるべきであるが、エッジとして検出されやすいため、強調処理が施され、この場合も画質が劣化する。したがって、小さい文字が多く含まれているか否か又は万線が含まれているか否か判定し、小さい文字が多く含まれている又は万線が含まれている場合は、領域分離処理で、これらの領域を検出しにくくするように、エッジを検出する際の閾値を変更して画質の劣化を抑制することができる。   In addition, when region separation processing is performed on an area including a large number of small characters, such as a font size of 4 points, or a complex halftone dot character (an area printed with small characters on a colored area), the character area In some cases, it is determined that the area is a halftone dot area, and in some cases, the area is not correctly determined as a character area. As a result, the region that is determined to be a character region when performing the filtering process is emphasized with an edge, and the region that is determined to be a halftone dot region (for example, a complicated part of “hen” or “making”) Since the image is smoothed, the image is partially blurred and the image quality is deteriorated. Further, the area including the line should be subjected to smoothing processing, but is easily detected as an edge, so that enhancement processing is performed, and in this case, the image quality also deteriorates. Therefore, it is determined whether or not many small characters are included or whether or not a line is included. If many small characters or a line is included, the region separation process The image quality degradation can be suppressed by changing the threshold value when detecting the edge so as to make it difficult to detect the region.

上述の実施の形態では、エッジを検出し、検出したエッジの数と原稿又は画素ブロックの総画素数との比率を算出し、縮小又は低解像度変換された画像における比率と、縮小又は低解像度変換されていない画像における比率との比(割合)を所定の閾値と比較することにより擬似文字の有無を判定する構成であるが、縮小又は低解像度変換された画像におけるエッジの数と、縮小又は低解像度変換されていない画像におけるエッジの数との比を閾値と比較する構成であってもよい。この場合、縮小率あるいは低解像度変換率の大小に応じて閾値を変更すれば同様の効果を得ることができ、擬似文字の有無を判定することができる。   In the above-described embodiment, edges are detected, the ratio between the number of detected edges and the total number of pixels of the document or pixel block is calculated, and the ratio in the reduced or low resolution converted image and the reduced or low resolution conversion are calculated. In this configuration, the presence or absence of pseudo characters is determined by comparing the ratio (ratio) with the ratio in the image that has not been processed to a predetermined threshold. The configuration may be such that the ratio of the number of edges in an image that has not undergone resolution conversion is compared with a threshold value. In this case, if the threshold value is changed according to the reduction rate or the low resolution conversion rate, the same effect can be obtained, and the presence or absence of a pseudo character can be determined.

上述の実施の形態において、カラー画像入力装置1としては、例えば、フラットベッドスキャナ、フィルムスキャナ、デジタルカメラ、携帯電話機などが用いられる。また、カラー画像出力装置3としては、例えば、CRTディスプレイ、液晶ディスプレイなどの画像表示装置、処理結果を記録紙などに出力する電子写真方式又はインクジェット方式のプリンタなどが用いられる。さらに、画像形成装置100としては、ネットワークを介してサーバ装置などに接続するための通信手段としてのモデムなどを備えることもできる。また、カラー画像入力装置1からカラー画像データを取得する代わりに、ネットワークを介して外部記憶装置、サーバ装置などからカラー画像データを取得する構成であってもよい。   In the above-described embodiment, as the color image input device 1, for example, a flat bed scanner, a film scanner, a digital camera, a mobile phone, or the like is used. Further, as the color image output device 3, for example, an image display device such as a CRT display or a liquid crystal display, an electrophotographic system or an ink jet system printer that outputs processing results to recording paper or the like is used. Further, the image forming apparatus 100 may include a modem as a communication unit for connecting to a server apparatus or the like via a network. Further, instead of acquiring the color image data from the color image input device 1, the color image data may be acquired from an external storage device, a server device, or the like via a network.

本発明はコンピュータに実行させるためのコンピュータプログラムのプログラムコード(実行形式プログラム、中間コードプログラム、ソースプログラム)を記録したコンピュータでの読み取り可能な記録媒体に、原稿種別判別処理、領域分離処理などを行うプログラムコードを記録することもできる。この結果、上記処理を行うプログラムコードを記録した記録媒体を持ち運び自在に提供することができる。記録媒体としては、マイクロコンピュータで処理が行われるために図示しないメモリ、例えばROMのようなプログラムメディアであってもよく、図示しない外部記憶装置としてのプログラム読取装置が設けられ、そこに記録媒体を挿入することで読み取り可能なプログラムメディアであってもよい。   The present invention performs a document type determination process, an area separation process, and the like on a computer-readable recording medium in which a program code (execution format program, intermediate code program, source program) of a computer program to be executed by a computer is recorded. Program code can also be recorded. As a result, it is possible to provide a portable recording medium on which the program code for performing the above processing is recorded. The recording medium may be a non-illustrated memory, for example, a program medium such as a ROM because processing is performed by a microcomputer, and a program reading device as an external storage device (not illustrated) is provided, and the recording medium is stored therein. It may be a program medium that can be read by being inserted.

いずれの場合においても、格納されているプログラムコードはマイクロプロセッサがアクセスして実行させる構成であってもよいし、プログラムコードを読み出し、読み出されたプログラムコードは、マイクロコンピュータの図示されていないプログラム記憶エリアにダウンロードされて、そのプログラムコードが実行される方式であってもよい。この場合、ダウンロード用のコンピュータプログラムは予め本体装置に格納されているものとする。   In any case, the stored program code may be configured to be accessed and executed by the microprocessor, or the program code is read, and the read program code is a program (not shown) of the microcomputer. The program code may be downloaded to the storage area and executed. In this case, it is assumed that the computer program for download is stored in the main device in advance.

ここで、上記プログラムメディアは、本体と分離可能に構成される記録媒体であり、磁気テープやカセットテープ等のテープ系、フレキシブルディスクやハードディスク等の磁気ディスク並びにCD−ROM/MO/MD/DVD等の光ディスクのディスク系、ICカード(メモリカードを含む)/光カード等のカード系、あるいはマスクROM、EPROM(Erasable Programmable Read Only Memory)、EEPROM(Electrically Erasable Programmable Read Only Memory)、フラッシュROM等による半導体メモリを含めた固定的にプログラムコードを担持する媒体であってもよい。   Here, the program medium is a recording medium configured to be separable from the main body, such as a tape system such as a magnetic tape or a cassette tape, a magnetic disk such as a flexible disk or a hard disk, and a CD-ROM / MO / MD / DVD. Semiconductors such as optical discs, IC cards (including memory cards) / optical cards, etc., or mask ROM, EPROM (Erasable Programmable Read Only Memory), EEPROM (Electrically Erasable Programmable Read Only Memory), flash ROM, etc. It may be a medium that carries a fixed program code including a memory.

また、この場合、インターネットを含む通信ネットワークを接続可能なシステム構成であることから、通信ネットワークからプログラムコードをダウンロードするように流動的にプログラムコードを担持する媒体であってもよい。なお、このように通信ネットワークからプログラムコードをダウンロードする場合には、そのダウンロード用のコンピュータプログラムは予め本体装置に格納しておくか、あるいは別の記録媒体からインストールされるものであってもよい。なお、本発明は、上記プログラムコードが電子的な伝送で具現化された、搬送波に埋め込まれたコンピュータデータ信号の形態でも実現され得る。   In this case, since the system configuration is capable of connecting a communication network including the Internet, the medium may be a medium that dynamically carries the program code so as to download the program code from the communication network. When the program code is downloaded from the communication network in this way, the computer program for downloading may be stored in the main device in advance or may be installed from another recording medium. The present invention can also be realized in the form of a computer data signal embedded in a carrier wave in which the program code is embodied by electronic transmission.

本発明に係る画像処理装置を備える画像形成装置の構成を示すブロック図である。1 is a block diagram illustrating a configuration of an image forming apparatus including an image processing apparatus according to the present invention. 原稿種別判別部の構成を示すブロック図である。4 is a block diagram illustrating a configuration of a document type determination unit. FIG. 総合判定部の最終判定方法を示す説明図である。It is explanatory drawing which shows the final determination method of a comprehensive determination part. エッジ検出方法の一例を示す説明図である。It is explanatory drawing which shows an example of the edge detection method. 万線領域の判定方法を説明するための模式図である。It is a schematic diagram for demonstrating the determination method of a line area | region. 原稿判定部の原稿判別方法を示す説明図である。FIG. 6 is an explanatory diagram illustrating a document determination method of a document determination unit. 文字が印刷された原稿の画像の一例を示す模式図である。It is a schematic diagram which shows an example of the image of the original in which the character was printed. 万線パターンに文字が印刷された原稿の画像の一例を示す模式図である。It is a schematic diagram showing an example of an image of a document in which characters are printed on a line pattern. 画像データの平滑化処理に用いるフィルタを説明するための模式図である。It is a schematic diagram for demonstrating the filter used for the smoothing process of image data. 原稿種別判別処理の手順を示すフローチャートである。6 is a flowchart illustrating a procedure of document type determination processing. 原稿種別判別処理の手順を示すフローチャートである。6 is a flowchart illustrating a procedure of document type determination processing. 原稿種別判別処理の手順を示すフローチャートである。6 is a flowchart illustrating a procedure of document type determination processing. 領域判定処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of an area | region determination process. 実施の形態2の原稿種別判別部の構成を示すブロック図である。6 is a block diagram illustrating a configuration of a document type determination unit according to Embodiment 2. FIG. 実施の形態3の原稿種別判別部の構成を示すブロック図である。FIG. 10 is a block diagram illustrating a configuration of a document type determination unit according to a third embodiment. 実施の形態3の原稿種別判別処理の手順を示すフローチャートである。10 is a flowchart illustrating a procedure of document type determination processing according to the third embodiment. 実施の形態3の原稿種別判別処理の手順を示すフローチャートである。10 is a flowchart illustrating a procedure of document type determination processing according to the third embodiment. 実施の形態4の画像形成装置の構成を示すブロック図である。FIG. 10 is a block diagram illustrating a configuration of an image forming apparatus according to a fourth embodiment. 実施の形態4の領域分離処理部の構成を示すブロック図である。FIG. 10 is a block diagram illustrating a configuration of a region separation processing unit according to a fourth embodiment. 実施の形態4の総合判定部の最終判定方法を示す説明図である。FIG. 10 is an explanatory diagram illustrating a final determination method of a comprehensive determination unit according to a fourth embodiment. 実施の形態4の領域分離処理の手順を示すフローチャートである。14 is a flowchart illustrating a procedure of region separation processing according to the fourth embodiment. 実施の形態4の領域分離処理の手順を示すフローチャートである。14 is a flowchart illustrating a procedure of region separation processing according to the fourth embodiment.

符号の説明Explanation of symbols

1 カラー画像入力装置
2 カラー画像処理装置
3 カラー画像出力装置
22 原稿種別判別部
24 領域分離処理部
2201、2401 信号変換部
2202、2402 補間演算部
2203、2403 最小濃度値算出部
2204、2404 最大濃度値算出部
2205、2405 反転回数算出部
2206、2406 エッジ検出部
2207、2407 最大濃度差算出部
2208、2408 最大濃度差判定部
2209、2409 反転回数判定部
2210、2410 総合判定部
2211、2411 エッジ検出結果演算部
2212 メモリ
2213 文字画素ブロック計数部
2214 網点画素ブロック計数部
2215 その他の画素ブロック計数部
2216、2416 エッジ計数比率判定部
2217 原稿判定部
2218、2418 総和濃度繁雑度算出部
100 画像形成装置
DESCRIPTION OF SYMBOLS 1 Color image input device 2 Color image processing device 3 Color image output device 22 Original type discrimination | determination part 24 Area | region separation processing part 2201,2402 Signal conversion part 2202,2402 Interpolation operation part 2203,2403 Minimum density value calculation part 2204,2404 Maximum density Value calculation unit 2205, 2405 Inversion number calculation unit 2206, 2406 Edge detection unit 2207, 2407 Maximum density difference calculation unit 2208, 2408 Maximum density difference determination unit 2209, 2409 Inversion number determination unit 2210, 2410 General determination unit 2211, 2411 Edge detection Result calculation unit 2212 Memory 2213 Character pixel block counting unit 2214 Halftone pixel block counting unit 2215 Other pixel block counting units 2216 and 2416 Edge count ratio determination unit 2217 Document determination units 2218 and 2418 Sum total Busyness calculating section 100 an image forming apparatus

Claims (22)

複数の画素から構成される原稿の画像の前記画素が有する画素値に基づいて前記画像の種類を判定する処理を行う画像処理方法において、
前記画像の各画素の画素値に基づいてエッジ画素を検出する第1エッジ検出ステップと、
該第1エッジ検出ステップで検出されたエッジ画素基づいて、原稿全体の画像の総画素数に対するエッジ画素の数の比率である第1特徴量を算出する第1算出ステップと、
前記画像を縮小する縮小ステップと、
該縮小ステップで縮小された画像の各画素の画素値に基づいてエッジ画素を検出する第2エッジ検出ステップと、
該第2エッジ検出ステップで検出されたエッジ画素基づいて、縮小された原稿全体の画像の総画素数に対するエッジ画素の数の比率である第2特徴量を算出する第2算出ステップと、
前記第1算出ステップで算出された第1特徴量に対する、前記第2算出ステップで算出された第2特徴量の割合を算出する割合算出ステップと、
複数の方向について、前記画像の濃度分布に係る特徴量をそれぞれ算出する特徴量算出ステップと、
該特徴量算出ステップで算出された各方向の特徴量に基づいて、前記画像の濃度分布の角度依存性の有無を判定する角度依存性判定ステップと、
前記割合算出ステップで算出された割合及び前記角度依存性判定ステップでの判定結果に基づいて、前記画像の種類を判定する判定ステップと
を含むことを特徴とする画像処理方法。
In an image processing method for performing a process of determining the type of the image based on a pixel value of the pixel of an image of a document composed of a plurality of pixels,
A first edge detecting step of detecting an edge pixel based on a pixel value of each pixel of the image;
A first calculation step of calculating a first feature amount that is a ratio of the number of edge pixels to the total number of pixels of the image of the entire document based on the edge pixels detected in the first edge detection step;
A reduction step of reducing the image;
A second edge detection step for detecting an edge pixel based on a pixel value of each pixel of the image reduced in the reduction step;
A second calculation step of calculating a second feature amount, which is a ratio of the number of edge pixels to the total number of pixels of the image of the entire reduced document, based on the edge pixels detected in the second edge detection step;
A ratio calculating step for calculating a ratio of the second feature quantity calculated in the second calculation step to the first feature quantity calculated in the first calculation step;
A feature amount calculating step for calculating a feature amount related to the density distribution of the image for a plurality of directions;
An angle dependency determining step for determining the presence or absence of angle dependency of the density distribution of the image based on the feature amount in each direction calculated in the feature amount calculating step;
An image processing method comprising: a determination step of determining a type of the image based on the ratio calculated in the ratio calculation step and the determination result in the angle dependency determination step.
前記第1算出ステップは、
前記第1エッジ検出ステップで検出されたエッジ画素の数を計数する第1計数ステップと、
該第1計数ステップで計数されたエッジ画素の数の、前記画像中の画素の総数に対する第1比率を算出するステップとを含み、
前記第2算出ステップは、
前記第2エッジ検出ステップで検出されたエッジ画素の数を計数する第2計数ステップと、
該第2計数ステップで計数されたエッジ画素の数の、前記縮小ステップで縮小された画像中の画素の総数に対する第2比率を算出するステップとを含む
ことを特徴とする請求項1に記載の画像処理方法。
The first calculation step includes
A first counting step for counting the number of edge pixels detected in the first edge detecting step;
Calculating a first ratio of the number of edge pixels counted in the first counting step to the total number of pixels in the image,
The second calculating step includes
A second counting step of counting the number of edge pixels detected in the second edge detecting step;
The method according to claim 1, further comprising: calculating a second ratio of the number of edge pixels counted in the second counting step to the total number of pixels in the image reduced in the reduction step. Image processing method.
前記判定ステップは、
前記割合算出ステップで算出された割合が所定の閾値以下であるか否かを判断する判断ステップと、
該判断ステップで前記割合が所定の閾値以下であると判断され、前記角度依存性判定ステップでの判定結果が有りである場合、万線を含む画像であると判定するステップと
を含むことを特徴とする請求項1又は2に記載の画像処理方法。
The determination step includes
A determination step of determining whether the ratio calculated in the ratio calculation step is equal to or less than a predetermined threshold;
Determining that the ratio is equal to or less than a predetermined threshold in the determination step, and determining that the image includes a line when there is a determination result in the angle dependency determination step. The image processing method according to claim 1 or 2.
複数の画素から構成される原稿の画像の前記画素が有する画素値に基づいて前記画像の種類を判定する処理を行う画像処理方法において、In an image processing method for performing a process of determining the type of the image based on a pixel value of the pixel of an image of a document composed of a plurality of pixels,
前記画像の各画素の画素値に基づいてエッジ画素を検出する第1エッジ検出ステップと、A first edge detecting step of detecting an edge pixel based on a pixel value of each pixel of the image;
原稿のエッジ画素の数である第3特徴量を算出する第3算出ステップと、A third calculation step of calculating a third feature amount that is the number of edge pixels of the document;
前記画像を縮小する縮小ステップと、A reduction step of reducing the image;
該縮小ステップで縮小された画像の各画素の画素値に基づいてエッジ画素を検出する第2エッジ検出ステップと、A second edge detection step for detecting an edge pixel based on a pixel value of each pixel of the image reduced in the reduction step;
縮小された原稿のエッジ画素の数である第4特徴量を算出する第4算出ステップと、A fourth calculation step of calculating a fourth feature amount that is the number of edge pixels of the reduced document;
前記第3算出ステップで算出された第3特徴量に対する、前記第4算出ステップで算出された第4特徴量の割合を算出する第2割合算出ステップと、A second ratio calculating step for calculating a ratio of the fourth feature amount calculated in the fourth calculation step to the third feature amount calculated in the third calculation step;
複数の方向について、前記画像の濃度分布に係る特徴量をそれぞれ算出する特徴量算出ステップと、A feature amount calculating step for calculating a feature amount related to the density distribution of the image for a plurality of directions;
該特徴量算出ステップで算出された各方向の特徴量に基づいて、前記画像の濃度分布の角度依存性の有無を判定する角度依存性判定ステップと、An angle dependency determining step for determining the presence or absence of angle dependency of the density distribution of the image based on the feature amount in each direction calculated in the feature amount calculating step;
前記第2割合算出ステップで算出された割合及び前記角度依存性判定ステップでの判定結果に基づいて、前記画像の種類を判定する第2判定ステップとA second determination step of determining the type of the image based on the ratio calculated in the second ratio calculation step and the determination result in the angle dependence determination step;
を含むことを特徴とする画像処理方法。An image processing method comprising:
前記第2判定ステップは、The second determination step includes
前記第2割合算出ステップで算出された割合が所定の閾値以下であるか否かを判断する判断ステップと、A determination step of determining whether the ratio calculated in the second ratio calculation step is equal to or less than a predetermined threshold;
該判断ステップで前記割合が所定の閾値以下であると判断され、前記角度依存性判定ステップでの判定結果が有りである場合、万線を含む画像であると判定するステップとDetermining that the ratio is equal to or less than a predetermined threshold in the determination step, and determining that the image includes a line when there is a determination result in the angle dependency determination step;
を含むことを特徴とする請求項4に記載の画像処理方法。The image processing method according to claim 4, further comprising:
複数の画素から構成される原稿の画像の前記画素が有する画素値に基づいて前記画像の種類を判定する処理を行う画像処理装置において、
前記画像の各画素の画素値に基づいてエッジ画素を検出する第1エッジ検出手段と、
該第1エッジ検出手段が検出したエッジ画素基づいて、原稿全体の画像の総画素数に対するエッジ画素の数の比率である第1特徴量を算出する第1算出手段と、
前記画像を縮小する縮小手段と、
該縮小手段が縮小した画像の各画素の画素値に基づいてエッジ画素を検出する第2エッジ検出手段と、
該第2エッジ検出手段が検出したエッジ画素基づいて、縮小された原稿全体の画像の総画素数に対するエッジ画素の数の比率である第2特徴量を算出する第2算出手段と、
前記第1算出手段が算出した第1特徴量に対する、前記第2算出手段が算出した第2特徴量の割合を算出する割合算出手段と、
複数の方向について、前記画像の濃度分布に係る特徴量をそれぞれ算出する特徴量算出手段と、
該特徴量算出手段が算出した各方向の特徴量に基づいて、前記画像の濃度分布の角度依存性の有無を判定する角度依存性判定手段と、
前記割合算出手段が算出した割合及び前記角度依存性判定手段の判定結果に基づいて、前記画像の種類を判定する判定手段と
を備えることを特徴とする画像処理装置。
In an image processing apparatus for performing a process of determining the type of the image based on a pixel value of the pixel of an image of a document including a plurality of pixels,
First edge detection means for detecting an edge pixel based on a pixel value of each pixel of the image;
First calculation means for calculating a first feature amount, which is a ratio of the number of edge pixels to the total number of pixels of the image of the entire document , based on the edge pixels detected by the first edge detection means;
Reduction means for reducing the image;
Second edge detection means for detecting an edge pixel based on the pixel value of each pixel of the image reduced by the reduction means;
Second calculation means for calculating a second feature amount, which is a ratio of the number of edge pixels to the total number of pixels of the image of the entire reduced document, based on the edge pixels detected by the second edge detection means;
A ratio calculation means for calculating a ratio of the second feature quantity calculated by the second calculation means to the first feature quantity calculated by the first calculation means;
A feature amount calculating means for calculating a feature amount related to the density distribution of the image for a plurality of directions;
Angle dependency determination means for determining the presence or absence of angle dependency of the density distribution of the image based on the feature value in each direction calculated by the feature value calculation means;
An image processing apparatus comprising: a determination unit that determines a type of the image based on a ratio calculated by the ratio calculation unit and a determination result of the angle dependency determination unit.
前記第1算出手段は、
前記第1エッジ検出手段が検出したエッジ画素の数を計数する第1計数手段と、
該第1計数手段が計数したエッジ画素の数の、前記画像中の画素の総数に対する第1比率を算出する手段とを有し、
前記第2算出手段は、
前記第2エッジ検出手段が検出したエッジ画素の数を計数する第2計数手段と、
該第2計数手段が計数したエッジ画素の数の、前記縮小手段が縮小した画像中の画素の総数に対する第2比率を算出する手段とを有する
ことを特徴とする請求項に記載の画像処理装置。
The first calculation means includes
First counting means for counting the number of edge pixels detected by the first edge detecting means;
Means for calculating a first ratio of the number of edge pixels counted by the first counting means to the total number of pixels in the image;
The second calculation means includes
Second counting means for counting the number of edge pixels detected by the second edge detecting means;
7. The image processing according to claim 6 , further comprising: a unit that calculates a second ratio of the number of edge pixels counted by the second counting unit to the total number of pixels in the image reduced by the reduction unit. apparatus.
前記特徴量算出手段は、前記画像の各方向について、隣接する各画素の画素値の差の絶対値の総和をそれぞれ算出するように構成してあり、
前記角度依存性判定手段は、各方向について算出された前記総和に基づいて、角度依存性の有無を判定するように構成してある
ことを特徴とする請求項6又は7に記載の画像処理装置。
The feature amount calculating means is configured to calculate a sum of absolute values of differences between pixel values of adjacent pixels for each direction of the image,
The image processing apparatus according to claim 6, wherein the angle dependency determination unit is configured to determine whether or not there is angle dependency based on the sum calculated for each direction. .
前記判定手段は、
前記割合算出手段が算出した割合が所定の閾値以下であるか否かを判断する判断手段と、
該判断手段によって前記割合が所定の閾値以下であると判断され、前記角度依存性判定手段の判定結果が有りである場合、万線を含む画像であると判定する手段と
を有することを特徴とする請求項6から8のいずれかひとつに記載の画像処理装置。
The determination means includes
Determination means for determining whether the ratio calculated by the ratio calculation means is equal to or less than a predetermined threshold;
And a means for determining that the image includes a line when the determination means determines that the ratio is equal to or less than a predetermined threshold value and the determination result of the angle dependence determination means is present. The image processing apparatus according to any one of claims 6 to 8 .
前記判定手段は、前記判断手段によって前記割合が所定の閾値以下であると判断され、前記角度依存性判定手段の判定結果が無しである場合、小文字又は網点上文字を含む画像であると判定する手段を有することを特徴とする請求項に記載の画像処理装置。 The determination unit determines that the image includes lowercase letters or halftone dots when the determination unit determines that the ratio is equal to or less than a predetermined threshold and the determination result of the angle dependency determination unit is none. The image processing apparatus according to claim 9 , further comprising: 前記判定手段は、複数の画素から構成される画素ブロック毎に画像の種類を判定するように構成してあることを特徴とする請求項6から10のいずれかひとつに記載の画像処理装置。 The image processing apparatus according to claim 6 , wherein the determination unit is configured to determine a type of an image for each pixel block including a plurality of pixels. 前記判定手段によって同一の種類であると判定された画素ブロックの数を計数する手段と、
該手段で計数された画素ブロックの数に基づいて、前記画像が得られた原稿の種類を判別する手段と
を備えることを特徴とする請求項11に記載の画像処理装置。
Means for counting the number of pixel blocks determined to be the same type by the determination means;
The image processing apparatus according to claim 11 , further comprising: a unit that determines a type of a document from which the image is obtained based on the number of pixel blocks counted by the unit.
複数の画素から構成される原稿の画像の前記画素が有する画素値に基づいて前記画像の種類を判定する処理を行う画像処理装置において、In an image processing apparatus for performing a process of determining the type of the image based on a pixel value of the pixel of an image of a document including a plurality of pixels,
前記画像の各画素の画素値に基づいてエッジ画素を検出する第1エッジ検出手段と、First edge detection means for detecting an edge pixel based on a pixel value of each pixel of the image;
原稿のエッジ画素の数である第3特徴量を算出する第3算出手段と、Third calculating means for calculating a third feature amount that is the number of edge pixels of the document;
前記画像を縮小する縮小手段と、Reduction means for reducing the image;
該縮小手段が縮小した画像の各画素の画素値に基づいてエッジ画素を検出する第2エッジ検出手段と、Second edge detection means for detecting an edge pixel based on the pixel value of each pixel of the image reduced by the reduction means;
縮小された原稿のエッジ画素の数である第4特徴量を算出する第4算出手段と、Fourth calculating means for calculating a fourth feature amount that is the number of edge pixels of the reduced document;
前記第3算出手段が算出した第3特徴量に対する、前記第4算出手段が算出した第4特徴量の割合を算出する第2割合算出手段と、Second ratio calculating means for calculating a ratio of the fourth feature value calculated by the fourth calculating means to the third feature value calculated by the third calculating means;
複数の方向について、前記画像の濃度分布に係る特徴量をそれぞれ算出する特徴量算出手段と、A feature amount calculating means for calculating a feature amount related to the density distribution of the image for a plurality of directions;
該特徴量算出手段が算出した各方向の特徴量に基づいて、前記画像の濃度分布の角度依存性の有無を判定する角度依存性判定手段と、Angle dependency determination means for determining the presence or absence of angle dependency of the density distribution of the image based on the feature value in each direction calculated by the feature value calculation means;
前記第2割合算出手段が算出した割合及び前記角度依存性判定手段の判定結果に基づいて、前記画像の種類を判定する第2判定手段とSecond determination means for determining the type of the image based on the ratio calculated by the second ratio calculation means and the determination result of the angle dependence determination means;
を備えることを特徴とする画像処理装置。An image processing apparatus comprising:
前記特徴量算出手段は、前記画像の各方向について、隣接する各画素の画素値の差の絶対値の総和をそれぞれ算出するように構成してあり、The feature amount calculating means is configured to calculate a sum of absolute values of differences between pixel values of adjacent pixels for each direction of the image,
前記角度依存性判定手段は、各方向について算出された前記総和に基づいて、角度依存性の有無を判定するように構成してある  The angle dependency determining means is configured to determine the presence or absence of angle dependency based on the sum calculated for each direction.
ことを特徴とする請求項13に記載の画像処理装置。The image processing apparatus according to claim 13.
前記第2判定手段は、The second determination means includes
前記第2割合算出手段が算出した割合が所定の閾値以下であるか否かを判断する判断手段と、Determining means for determining whether the ratio calculated by the second ratio calculating means is equal to or less than a predetermined threshold;
該判断手段によって前記割合が所定の閾値以下であると判断され、前記角度依存性判定手段の判定結果が有りである場合、万線を含む画像であると判定する手段とMeans for determining that the image includes a line when the determination means determines that the ratio is equal to or less than a predetermined threshold value and the determination result of the angle dependence determination means is;
を有することを特徴とする請求項13又は14に記載の画像処理装置。The image processing apparatus according to claim 13 or 14, characterized by comprising:
前記第2判定手段は、前記判断手段によって前記割合が所定の閾値以下であると判断され、前記角度依存性判定手段の判定結果が無しである場合、小文字又は網点上文字を含む画像であると判定する手段を有することを特徴とする請求項15に記載の画像処理装置。The second determination means is an image including lowercase letters or halftone characters when the determination means determines that the ratio is equal to or less than a predetermined threshold value and the determination result of the angle dependence determination means is none. The image processing apparatus according to claim 15, further comprising a determination unit. 前記第2判定手段は、複数の画素から構成される画素ブロック毎に画像の種類を判定するように構成してあることを特徴とする請求項13から16のいずれかひとつに記載の画像処理装置。The image processing apparatus according to claim 13, wherein the second determination unit is configured to determine an image type for each pixel block including a plurality of pixels. . 前記第2判定手段によって同一の種類であると判定された画素ブロックの数を計数する手段と、Means for counting the number of pixel blocks determined to be of the same type by the second determination means;
該手段で計数された画素ブロックの数に基づいて、前記画像が得られた原稿の種類を判別する手段と  Means for discriminating the type of document from which the image is obtained based on the number of pixel blocks counted by the means;
を備えることを特徴とする請求項17に記載の画像処理装置。The image processing apparatus according to claim 17, further comprising:
請求項6から18のいずれか一つに記載の画像処理装置と、
該画像処理装置で処理された画像に基づいて出力画像を形成する画像形成手段と
を備えることを特徴とする画像形成装置。
An image processing device according to any one of claims 6 to 18 ,
An image forming apparatus comprising: an image forming unit that forms an output image based on an image processed by the image processing apparatus.
コンピュータに、複数の画素から構成される原稿の画像の前記画素が有する画素値に基づいて前記画像の種類を判定させるためのコンピュータプログラムにおいて、
コンピュータに、前記画像の各画素の画素値に基づいてエッジ画素を検出させる第1エッジ検出ステップと、
コンピュータに、該第1エッジ検出ステップで検出されたエッジ画素基づいて、原稿全体の画像の総画素数に対するエッジ画素の数の比率である第1特徴量を算出させる第1算出ステップと、
コンピュータに、前記画像を縮小させる縮小ステップと、
コンピュータに、該縮小ステップで縮小された画像の各画素の画素値に基づいてエッジ画素を検出させる第2エッジ検出ステップと、
コンピュータに、該第2エッジ検出ステップで検出されたエッジ画素基づいて、縮小された原稿全体の画像の総画素数に対するエッジ画素の数の比率である第2特徴量を算出させる第2算出ステップと、
コンピュータに、前記第1算出ステップで算出された第1特徴量に対する、前記第2算出ステップで算出された第2特徴量の割合を算出させる割合算出ステップと、
コンピュータに、複数の方向について、前記画像の濃度分布に係る特徴量をそれぞれ算出させる特徴量算出ステップと、
コンピュータに、該特徴量算出ステップで算出された各方向の特徴量に基づいて、前記画像の濃度分布の角度依存性の有無を判定させる角度依存性判定ステップと、
コンピュータに、前記割合算出ステップで算出された割合及び前記角度依存性判定ステップでの判定結果に基づいて、前記画像の種類を判定させる判定ステップと
を含むことを特徴とするコンピュータプログラム。
In a computer program for causing a computer to determine the type of an image based on a pixel value of the pixel of an image of a document composed of a plurality of pixels,
A first edge detection step for causing a computer to detect an edge pixel based on a pixel value of each pixel of the image;
A first calculation step of causing a computer to calculate a first feature amount that is a ratio of the number of edge pixels to the total number of pixels of an image of the entire document , based on the edge pixels detected in the first edge detection step;
A reduction step of causing the computer to reduce the image;
A second edge detection step for causing the computer to detect an edge pixel based on a pixel value of each pixel of the image reduced in the reduction step;
A second calculation step of causing the computer to calculate a second feature amount that is a ratio of the number of edge pixels to the total number of pixels of the image of the entire reduced document based on the edge pixels detected in the second edge detection step; When,
A ratio calculation step for causing a computer to calculate a ratio of the second feature quantity calculated in the second calculation step to the first feature quantity calculated in the first calculation step;
A feature amount calculating step for causing the computer to calculate a feature amount related to the density distribution of the image for a plurality of directions;
An angle dependency determining step for causing a computer to determine the presence or absence of angle dependency of the density distribution of the image based on the feature amount in each direction calculated in the feature amount calculating step;
A computer program comprising: a determination step for causing a computer to determine the type of the image based on the ratio calculated in the ratio calculation step and the determination result in the angle dependency determination step.
コンピュータに、複数の画素から構成される原稿の画像の前記画素が有する画素値に基づいて前記画像の種類を判定させるためのコンピュータプログラムにおいて、In a computer program for causing a computer to determine the type of an image based on a pixel value of the pixel of an image of a document composed of a plurality of pixels,
コンピュータに、前記画像の各画素の画素値に基づいてエッジ画素を検出させる第1エッジ検出ステップと、A first edge detection step for causing a computer to detect an edge pixel based on a pixel value of each pixel of the image;
コンピュータに、原稿のエッジ画素の数である第3特徴量を算出させる第3算出ステップと、A third calculation step for causing the computer to calculate a third feature amount that is the number of edge pixels of the document;
コンピュータに、前記画像を縮小させる縮小ステップと、A reduction step of causing the computer to reduce the image;
コンピュータに、該縮小ステップで縮小された画像の各画素の画素値に基づいてエッジ画素を検出させる第2エッジ検出ステップと、A second edge detection step for causing the computer to detect an edge pixel based on a pixel value of each pixel of the image reduced in the reduction step;
コンピュータに、縮小された原稿のエッジ画素の数である第4特徴量を算出させる第4算出ステップと、A fourth calculation step of causing a computer to calculate a fourth feature amount that is the number of edge pixels of the reduced document;
コンピュータに、前記第3算出ステップで算出された第3特徴量に対する、前記第4算出ステップで算出された第4特徴量の割合を算出させる第2割合算出ステップと、A second ratio calculating step for causing the computer to calculate a ratio of the fourth feature quantity calculated in the fourth calculation step to the third feature quantity calculated in the third calculation step;
コンピュータに、複数の方向について、前記画像の濃度分布に係る特徴量をそれぞれ算出させる特徴量算出ステップと、A feature amount calculating step for causing the computer to calculate a feature amount related to the density distribution of the image for a plurality of directions;
コンピュータに、該特徴量算出ステップで算出された各方向の特徴量に基づいて、前記画像の濃度分布の角度依存性の有無を判定させる角度依存性判定ステップと、An angle dependency determining step for causing a computer to determine the presence or absence of angle dependency of the density distribution of the image based on the feature amount in each direction calculated in the feature amount calculating step;
コンピュータに、前記第2割合算出ステップで算出された割合及び前記角度依存性判定ステップでの判定結果に基づいて、前記画像の種類を判定させる判定ステップとA determination step for causing the computer to determine the type of the image based on the ratio calculated in the second ratio calculation step and the determination result in the angle dependence determination step;
を含むことを特徴とするコンピュータプログラム。A computer program comprising:
請求項20又は21に記載のコンピュータプログラムが記録してあることを特徴とするコンピュータでの読み取りが可能な記録媒体。 A computer-readable recording medium on which the computer program according to claim 20 or 21 is recorded.
JP2007088665A 2007-03-29 2007-03-29 Image processing method, image processing apparatus, image forming apparatus, computer program, and recording medium Active JP4545167B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007088665A JP4545167B2 (en) 2007-03-29 2007-03-29 Image processing method, image processing apparatus, image forming apparatus, computer program, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007088665A JP4545167B2 (en) 2007-03-29 2007-03-29 Image processing method, image processing apparatus, image forming apparatus, computer program, and recording medium

Publications (2)

Publication Number Publication Date
JP2008252292A JP2008252292A (en) 2008-10-16
JP4545167B2 true JP4545167B2 (en) 2010-09-15

Family

ID=39976763

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007088665A Active JP4545167B2 (en) 2007-03-29 2007-03-29 Image processing method, image processing apparatus, image forming apparatus, computer program, and recording medium

Country Status (1)

Country Link
JP (1) JP4545167B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6965723B2 (en) * 2017-12-19 2021-11-10 沖電気工業株式会社 Image formation system and image formation condition setting method
JP7377435B2 (en) * 2020-01-24 2023-11-10 京セラドキュメントソリューションズ株式会社 Image processing device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002300388A (en) * 2001-03-30 2002-10-11 Ricoh Co Ltd Ten thousand lines discrimination device, image area separation device, image processing unit, image formation device, program and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07298074A (en) * 1994-04-28 1995-11-10 Ricoh Co Ltd Image processing unit
JP3736099B2 (en) * 1998-02-13 2006-01-18 富士ゼロックス株式会社 Image processing apparatus and image processing method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002300388A (en) * 2001-03-30 2002-10-11 Ricoh Co Ltd Ten thousand lines discrimination device, image area separation device, image processing unit, image formation device, program and storage medium

Also Published As

Publication number Publication date
JP2008252292A (en) 2008-10-16

Similar Documents

Publication Publication Date Title
JP4137890B2 (en) Image processing apparatus, image forming apparatus, image reading processing apparatus, image processing method, image processing program, and computer-readable recording medium
JP4495197B2 (en) Image processing apparatus, image forming apparatus, image processing program, and recording medium for recording image processing program
JP4170353B2 (en) Image processing method, image processing apparatus, image reading apparatus, image forming apparatus, program, and recording medium
JP4118886B2 (en) Image processing apparatus, image forming apparatus, image reading processing apparatus, image processing method, image processing program, and computer-readable recording medium
CN100477722C (en) Image processing apparatus, image forming apparatus, image reading process apparatus and image processing method
US7880927B2 (en) Image forming apparatus, image forming method, program, and recording medium
JP2009100121A (en) Image processing method, image processing apparatus, image forming apparatus, computer program and recording medium
JP4731595B2 (en) Image processing apparatus, image forming apparatus, computer program, recording medium, and image processing method
JP4105539B2 (en) Image processing apparatus, image forming apparatus including the same, image processing method, image processing program, and recording medium
JP4545167B2 (en) Image processing method, image processing apparatus, image forming apparatus, computer program, and recording medium
JP2008305099A (en) Image processing method, image processor, image forming device, computer program and recording medium
JP2009017208A (en) Image processing apparatus, image forming apparatus, image processing method, computer program, and computer readable recording medium
JP4549227B2 (en) Image processing apparatus, image forming apparatus, image processing method, computer program, and recording medium
JP4260774B2 (en) Image processing apparatus, image forming apparatus, image processing method, image processing program, and recording medium
JP6262102B2 (en) Image processing apparatus, image processing system, computer program, and recording medium
JP2011015172A (en) Device for processing image, device for forming image, method and program for processing image, and recording medium recording program for processing image
JP2010206725A (en) Image processor, image forming device, image processing method, program, and recording medium
JP2010278924A (en) Image processing apparatus, image forming apparatus, image processing method, program, and recording medium
JP4545134B2 (en) Image processing method, image processing apparatus, image forming apparatus, computer program, and recording medium
JP4080252B2 (en) Image processing apparatus, image forming apparatus, image processing method, program, and recording medium
JP4808282B2 (en) Image processing apparatus, image forming apparatus, image processing method, image processing program, and recording medium for recording image processing program
JP2005072635A (en) Image processing apparatus, image forming apparatus, image reading apparatus, image processing method, image processing program, and computer-readable recording medium stored with the image processing program
JP4498316B2 (en) Image processing apparatus, image processing method, image forming apparatus, and computer program
JP5122507B2 (en) Image processing apparatus, image forming apparatus, image processing method, program, and recording medium
JP4086537B2 (en) Image processing method, image processing apparatus, image forming apparatus, computer program, and recording medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090218

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100406

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100603

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

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100629

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130709

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4545167

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150