JP5818559B2 - Image processing device - Google Patents

Image processing device Download PDF

Info

Publication number
JP5818559B2
JP5818559B2 JP2011165537A JP2011165537A JP5818559B2 JP 5818559 B2 JP5818559 B2 JP 5818559B2 JP 2011165537 A JP2011165537 A JP 2011165537A JP 2011165537 A JP2011165537 A JP 2011165537A JP 5818559 B2 JP5818559 B2 JP 5818559B2
Authority
JP
Japan
Prior art keywords
pixel
halftone dot
character
interest
attribute
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2011165537A
Other languages
Japanese (ja)
Other versions
JP2013030975A (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.)
Riso Kagaku Corp
Original Assignee
Riso Kagaku 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 Riso Kagaku Corp filed Critical Riso Kagaku Corp
Priority to JP2011165537A priority Critical patent/JP5818559B2/en
Publication of JP2013030975A publication Critical patent/JP2013030975A/en
Application granted granted Critical
Publication of JP5818559B2 publication Critical patent/JP5818559B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

本発明は、原稿画像を読み取って取得された画像データの各画素が網点領域に属する画素であるか否かを判定する属性判定部を備えた画像処理装置に関するものである。   The present invention relates to an image processing apparatus including an attribute determination unit that determines whether each pixel of image data obtained by reading a document image is a pixel belonging to a halftone dot region.

従来、複写機などにおいて原稿画像を光電的に読み取った画像データに基づいて、その画像データ内の文字領域、写真領域、網点領域などの領域判別を行い、その各領域に応じた画像処理を行うことによって高画質な印刷画像を取得する方法が提案されている。   Conventionally, based on image data obtained by photoelectrically reading a manuscript image in a copying machine or the like, character areas, photo areas, halftone areas, etc. in the image data are determined, and image processing corresponding to each area is performed. There has been proposed a method for acquiring a high-quality printed image by performing the above.

たとえば、文字領域に対しては比較的強いエッジ強調処理を施すことによって文字の輪郭がくっきりするようにしたり、写真領域に対しては比較的弱いエッジ強調処理を施すことによってメリハリをつけたり、網点領域に対しては平滑化処理を施すことによってモアレの発生を低減させたりすることが提案されている。   For example, character edges can be sharpened by applying relatively strong edge enhancement processing to character areas, sharp edges can be added to image areas by applying relatively weak edge enhancement processing, and halftone dots. It has been proposed to reduce the occurrence of moire by performing a smoothing process on the region.

ここで、原稿画像の解像度と印刷解像度が近いが少しずれているような場合にはモアレが発生しやすいが、それ以外の場合、たとえば、印刷画像の解像度が低解像度であって誤差拡散処理によって出力画像データを生成するような複写機の場合、網点領域にモアレは発生しにくいため上述したような平滑化処理を行う必要はない。   Here, when the resolution of the original image is close to the print resolution but slightly deviated, moire tends to occur. In other cases, for example, the resolution of the print image is low and error diffusion processing is used. In the case of a copying machine that generates output image data, it is not necessary to perform the above-described smoothing process because moire is unlikely to occur in the halftone dot area.

しかしながら、網点領域と文字領域との判別が適切行われなかった場合、網点領域は文字領域と判別されてしまい、これによりエッジ強調処理が施されてモアレが発生してしまう問題がある。また、たとえば網点領域の一部だけに対してエッジ強調処理が施された場合には、その一部の領域と周辺領域との濃度差が発生して印刷画像の画質が著しく劣化する問題がある。   However, when the discrimination between the halftone dot area and the character area is not properly performed, the halftone dot area is discriminated as the character area, which causes a problem that edge emphasis processing is performed and moire occurs. In addition, for example, when edge enhancement processing is performed on only a part of a halftone dot region, there is a problem that a density difference between the partial region and a peripheral region occurs, and the quality of a printed image is significantly deteriorated. is there.

このような問題を解決するために、網点領域を精度良く検出方法が種々提案されている。たとえば、特許文献1においては、画像データの各画素データに基づいてピーク画素を検出し、図16に示すように、所定の注目画素を中心とする参照領域R内におけるピーク画素PPの数をカウントし、そのピーク画素が所定の閾値以上である場合に上記注目画素を網点領域に属する画素として判別する方法が提案されている。   In order to solve such a problem, various methods for detecting a halftone dot area with high accuracy have been proposed. For example, in Patent Document 1, a peak pixel is detected based on each pixel data of image data, and as shown in FIG. 16, the number of peak pixels PP in a reference region R centered on a predetermined target pixel is counted. However, a method for discriminating the pixel of interest as a pixel belonging to a halftone dot region when the peak pixel is equal to or greater than a predetermined threshold has been proposed.

特開平2−219366号公報JP-A-2-219366

しかしながら、特許文献1の網点の属性の判定方法によれば、図16に示すようなピーク画素PPを複数見つける必要があり、たとえば、100線45度の網点の原稿画像を600dpiで光電的に読み取る場合には、図17に示すように、最低でも9画素×9画素の参照領域を確保する必要がある。なお、図17は模式図であり、100lpiの線の間隔と600dpiの画素の大きさとの関係は正確なものではない。   However, according to the halftone dot attribute determination method of Patent Document 1, it is necessary to find a plurality of peak pixels PP as shown in FIG. 16, for example, an original image with a halftone dot of 100 lines and 45 degrees is photoelectrically generated at 600 dpi. In the case of reading the image, it is necessary to secure a reference area of at least 9 pixels × 9 pixels as shown in FIG. FIG. 17 is a schematic diagram, and the relationship between the line spacing of 100 lpi and the pixel size of 600 dpi is not accurate.

さらに、網点属性の判定精度を上げようとするならば、もっと多くの数のピーク画素を検出する必要があるため、参照領域をもっと広く確保する必要があり、その参照領域に対応する大きさ容量を備えたメモリが必要となり、コストアップになる。   Furthermore, if it is intended to increase the determination accuracy of the halftone dot attribute, it is necessary to detect a larger number of peak pixels, so it is necessary to secure a wider reference area, and the size corresponding to the reference area. A memory with a capacity is required, which increases costs.

本発明は、上記事情に鑑み、上述したような大きな容量のメモリを必要とすることなく、網点領域を適切に判別することができる画像処理装置を提供することを目的とするものである。   SUMMARY OF THE INVENTION In view of the above circumstances, an object of the present invention is to provide an image processing apparatus that can appropriately determine a halftone dot region without requiring a large-capacity memory as described above.

本発明の画像処理装置は、原稿画像を読み取って取得された画像データにおけるピーク候補画素を検出するピーク候補画素検出部と、画像データにおける所定の注目画素を中心とする参照領域内におけるピーク候補画素以外の非ピーク候補画素の数が、所定の網点判定閾値以上である場合に、注目画素が網点領域に属する画素であると判定する属性判定部とを備えたことを特徴とする。   An image processing apparatus according to the present invention includes a peak candidate pixel detection unit that detects a peak candidate pixel in image data obtained by reading a document image, and a peak candidate pixel in a reference region centered on a predetermined target pixel in the image data. And an attribute determination unit that determines that the pixel of interest is a pixel belonging to a halftone dot area when the number of non-peak candidate pixels other than is greater than or equal to a predetermined halftone dot determination threshold.

また、上記本発明の画像処理装置においては、画像データにおける所定の注目画素について、線らしさを表す指標を算出する線らしさ算出部を設け、属性判定部を、線らしさ算出部において算出された線らしさを表す指標が、所定の文字判定閾値以上である場合に、注目画素が文字に属する画素であると判定するものとできる。   In the image processing apparatus of the present invention described above, a line-likeness calculating unit that calculates an index indicating line-likeness is provided for a predetermined pixel of interest in image data, and the attribute determining unit is a line calculated by the line-likeness calculating unit. It can be determined that the pixel of interest is a pixel belonging to a character when the index indicating the likelihood is equal to or greater than a predetermined character determination threshold.

また、画像データにおける所定の注目画素がエッジ画素であるか否かを判定するエッジ画素判定部を設け、属性判定部を、注目画素がエッジ画素であると判定され、かつ線らしさを表す指標が文字判定閾値以上である場合に、注目画素が文字に属する画素であると判定するものとできる。   In addition, an edge pixel determination unit that determines whether or not a predetermined pixel of interest in the image data is an edge pixel is provided, and the attribute determination unit has an index that determines that the pixel of interest is an edge pixel and represents lineiness When it is equal to or greater than the character determination threshold, it can be determined that the pixel of interest is a pixel belonging to the character.

また、属性判定部を、画像データにおける所定の注目画素を中心とする参照領域内における非ピーク候補画素の数が網点判定閾値未満であって、かつ注目画素の線らしさを表す指標が文字判定閾値未満で所定の閾値以上である場合に、注目画素が文字と網点との間に属する画素であると判定するものとできる。   In addition, the attribute determination unit determines whether the number of non-peak candidate pixels in the reference area centered on a predetermined pixel of interest in the image data is less than the halftone threshold and the index indicating the line-likeness of the pixel of interest is character determination. If it is less than the threshold and greater than or equal to the predetermined threshold, it can be determined that the pixel of interest is a pixel that belongs between the character and the halftone dot.

また、属性判定部を、画像データにおける所定の注目画素を中心とする参照領域内における非ピーク候補画素の数が網点判定閾値未満であって、かつ注目画素の線らしさを表す指標が所定の閾値未満である場合に、注目画素が写真に属する画素であると判定するものとできる。   Further, the attribute determination unit determines that the number of non-peak candidate pixels in the reference region centered on the predetermined pixel of interest in the image data is less than the halftone threshold, and the index indicating the line-likeness of the pixel of interest is predetermined. When it is less than the threshold value, it can be determined that the pixel of interest is a pixel belonging to the photograph.

本発明の画像処理装置によれば、原稿画像を読み取って取得された画像データにおけるピーク候補画素を検出し、画像データにおける所定の注目画素を中心とする参照領域内におけるピーク候補画素以外の非ピーク候補画素の数が、所定の網点判定閾値以上である場合に、注目画素が網点領域に属する画素であると判定するようにしたので、上述したようなピーク画素の数に基づいて網点である否かを判定する方法と比較すると参照領域を小さくすることができ、属性判定をする際に用いるメモリの容量を少なくすることができる。   According to the image processing apparatus of the present invention, peak candidate pixels in image data obtained by reading a document image are detected, and non-peaks other than peak candidate pixels in a reference region centered on a predetermined target pixel in image data are detected. Since the target pixel is determined to be a pixel belonging to the halftone dot area when the number of candidate pixels is equal to or greater than a predetermined halftone dot determination threshold, the halftone dot is based on the number of peak pixels as described above. Compared with the method for determining whether or not the reference value is smaller, the reference area can be made smaller, and the capacity of the memory used for attribute determination can be reduced.

また、上記本発明の画像処理装置において、画像データにおける所定の注目画素について、線らしさを表す指標を算出し、その線らしさを表す指標が、所定の文字判定閾値以上である場合に、注目画素が文字に属する画素であると判定するようにした場合には、網点を細線や文字と誤判定することなく、細線や文字を検出することができる。これにより網点に強いエッジ強調処理が施されてモアレが発生することを防止することができるとともに、細線や文字には強いエッジ強調処理を施して輪郭をはっきりさせることができる。   Further, in the image processing apparatus according to the present invention, an index indicating the lineiness is calculated for a predetermined pixel of interest in the image data, and the pixel of interest is equal to or greater than a predetermined character determination threshold value. Is determined to be a pixel belonging to a character, it is possible to detect a thin line or character without erroneously determining the halftone dot as a thin line or character. As a result, it is possible to prevent the moire from being generated due to the strong edge emphasis processing applied to the halftone dots, and it is possible to clarify the outline by applying the strong edge emphasis processing to the fine lines and characters.

また、画像データにおける所定の注目画素がエッジ画素であるか否かを判定し、注目画素がエッジ画素であると判定され、かつ線らしさを表す指標が文字判定閾値以上である場合に、注目画素が文字に属する画素であると判定するようにした場合には、文字をより適切に検出することができるとともに、写真領域内に存在する文字についても適切に検出することができる。なお、ここでいう写真領域とは、文字や絵などを含む写真画像全体の領域のことを意味するものとする。   In addition, it is determined whether or not a predetermined target pixel in the image data is an edge pixel, and it is determined that the target pixel is an edge pixel, and the target pixel is equal to or greater than a character determination threshold value Is determined to be a pixel belonging to a character, the character can be detected more appropriately, and the character existing in the photo area can also be detected appropriately. Note that the photographic area here means an area of the entire photographic image including characters and pictures.

また、画像データにおける所定の注目画素を中心とする参照領域内における非ピーク候補画素の数が網点判定閾値未満であって、かつ注目画素の線らしさを表す指標が文字判定閾値未満で所定の閾値以上である場合に、注目画素が文字と網点との間に属する画素であると判定するようにした場合には、文字と網点との間の中間的な属性の画素を判定し、このような明らかに文字でない属性の画素には、文字のような強いエッジ強調処理を施すことなく、文字と網点との中間的なエッジ強調処理や濃度変換処理を施すようにすることによって、違和感のない画質の印刷画像を得ることができる。   In addition, the number of non-peak candidate pixels in a reference area centered on a predetermined target pixel in the image data is less than a halftone dot determination threshold, and an index indicating the line-likeness of the target pixel is lower than a character determination threshold If the pixel of interest is determined to be a pixel belonging between the character and the halftone dot when the threshold value is equal to or greater than the threshold, determine a pixel having an intermediate attribute between the character and the halftone dot, By applying such an edge emphasis process or density conversion process between characters and halftone dots to such a pixel with an attribute that is not clearly a character, without applying a strong edge emphasis process like a character, It is possible to obtain a print image with an image quality without a sense of incongruity.

また、画像データにおける所定の注目画素を中心とする参照領域内における非ピーク候補画素の数が網点判定閾値未満であって、かつ注目画素の線らしさを表す指標が所定の閾値未満である場合や、参照領域内の全ての画素が非ピーク候補画素である場合に、注目画素が写真に属する画素であると判定するようにした場合には、写真の属性の画素を適切に検出することができ、その属性に応じたエッジ強調処理や濃度変換処理を施すことができる。   In addition, when the number of non-peak candidate pixels in the reference area centered on a predetermined target pixel in the image data is less than the halftone dot determination threshold, and the index indicating the line-likeness of the target pixel is lower than the predetermined threshold Or, if all the pixels in the reference area are non-peak candidate pixels, and if it is determined that the pixel of interest is a pixel belonging to the photograph, it is possible to appropriately detect the pixel having the attribute of the photograph. And edge enhancement processing and density conversion processing according to the attribute can be performed.

本発明の画像処理装置の一実施形態を用いた印刷装置の概略構成を示すブロック図1 is a block diagram showing a schematic configuration of a printing apparatus using an embodiment of an image processing apparatus of the present invention. 図1に示す画像処理部の構成を示すブロック図The block diagram which shows the structure of the image process part shown in FIG. 図2に示す網点らしさ取得部の構成を示すブロック図The block diagram which shows the structure of the halftone dot likeness acquisition part shown in FIG. 本発明の画像処理装置の一実施形態を用いた印刷装置の全体の処理の流れを説明するためのフローチャート6 is a flowchart for explaining the overall processing flow of a printing apparatus using an embodiment of the image processing apparatus of the present invention. 網点らしさ取得部の作用を説明するためのフローチャートFlowchart for explaining operation of halftone dot likeness acquisition unit ラプラシアンフィルタの線画像と孤立点に対する反応を説明するための図Diagram for explaining the response of a Laplacian filter to line images and isolated points ピーク候補画素検出のために用いられるラプラシアンフィルタ係数の一例を示す図The figure which shows an example of the Laplacian filter coefficient used for a peak candidate pixel detection 直交するラプラシアンフィルタ係数のラプラシアン量が同符号の場合と異符号の場合とを説明するための図The figure for demonstrating the case where the Laplacian amount of the orthogonal Laplacian filter coefficient is the same sign, and a different sign 非ピーク候補画素の数をカウントするための参照領域の一例を示す図The figure which shows an example of the reference area for counting the number of non-peak candidate pixels 網点領域のピーク候補画素と非ピーク候補画素との比率と、文字や線のピーク候補画素と非ピーク候補画素との比率との相違を説明するための図The figure for demonstrating the difference with the ratio of the peak candidate pixel of a halftone dot area | region, and a non-peak candidate pixel, and the ratio of the peak candidate pixel of a character or a line, and a non-peak candidate pixel 線らしさ取得部の作用を説明するためのフローチャートFlow chart for explaining the operation of the linearity acquisition unit 線検出フィルタ係数の一例を示す図The figure which shows an example of a line detection filter coefficient エッジ画素判定用の微分フィルタ係数の一例を示す図The figure which shows an example of the differential filter coefficient for edge pixel determination 属性判定部の作用を説明するためのフローチャートFlow chart for explaining the operation of the attribute determination unit 写真の属性の画素に対して濃度変換処理を施す際に用いられるガンマ曲線と、文字の属性の画素に対して濃度変換処理を施す際に用いられるガンマ曲線との一例を示す図The figure which shows an example of the gamma curve used when performing a density conversion process with respect to the pixel of a photograph attribute, and the gamma curve used when performing a density conversion process with respect to the pixel of a character attribute 従来の網点領域の判定方法を説明するための図The figure for demonstrating the determination method of the conventional halftone dot area | region 従来の網点領域の判定方法において必要とされる参照領域の大きさを説明するための図The figure for demonstrating the magnitude | size of the reference area required in the determination method of the conventional halftone dot area | region

以下、図面を参照して本発明の画像処理装置を用いた印刷装置の一実施形態について詳細に説明する。図1は、本実施形態の印刷装置の概略構成を示すブロック図である。   Hereinafter, an embodiment of a printing apparatus using an image processing apparatus of the present invention will be described in detail with reference to the drawings. FIG. 1 is a block diagram illustrating a schematic configuration of a printing apparatus according to the present embodiment.

本実施形態の印刷装置1は、図1に示すように、原稿画像を光電的に読み取って画像データを取得する原稿画像読取部10と、原稿画像読取部10によって読み取られた画像データにおける文字領域、網点領域および写真領域などを判定し、各領域に対してそれぞれに適応した互いに異なる画像処理を施す画像処理部20と、画像処理部20において画像処理の施された処理済画像データに基づいて印刷用紙に対して印刷処理を施す印刷部30とを備えている。   As shown in FIG. 1, the printing apparatus 1 according to the present embodiment includes a document image reading unit 10 that photoelectrically reads a document image to acquire image data, and a character area in the image data read by the document image reading unit 10. A halftone dot area, a photograph area, and the like, based on the image processing section 20 that performs different image processing adapted to each area, and processed image data that has undergone image processing in the image processing section 20 And a printing unit 30 that performs a printing process on the printing paper.

原稿画像読取部10は、原稿画像の画像情報を光電的に読み取るラインイメージセンサを有し、ラインイメージセンサで原稿画像を走査することによって原稿画像を読み取り、原稿画像を表す画像データをビットマップデータとして出力するものである。本実施形態においては、ビットマップデータを構成する各画素データは8ビットで表されるものであり、0〜255の値をとり得るものである。   The document image reading unit 10 includes a line image sensor that photoelectrically reads image information of a document image, scans the document image with the line image sensor, reads the document image, and converts the image data representing the document image into bitmap data. Is output as In the present embodiment, each pixel data constituting the bitmap data is represented by 8 bits and can take a value of 0 to 255.

画像処理部20は、図2に示すように、入力された画像データに基づいて各画素について網点らしさを表す指標を取得する網点らしさ取得部21と、入力された画像データに基づいて各画素がエッジ画素であるか否かを判定するエッジ画素判定部22と、入力された画像データに基づいて各画素について線らしさを表す指標を取得する線らしさ取得部23と、上記の網点らしさを表す指標、エッジ画素判定結果および線らしさを表す指標に基づいて、各画素について、文字領域、網点領域および写真領域などの属性を判定する属性判定部24と、属性判定部24において判定された属性に基づいて、各画素データに対してその属性に適応したエッジ強調処理を施すエッジ強調処理部と、各画素データに対してその属性に適応した濃度変換処理を施す濃度変換処理部26と、エッジ強調処理および濃度変換処理の施された画像データに対してハーフトーニング処理を施すハーフトーニング処理部27とを備えている。上記の各部の詳細な作用については、後で詳述する。   As shown in FIG. 2, the image processing unit 20 includes a halftone dot degree obtaining unit 21 that obtains an index representing the halftone dot degree for each pixel based on the input image data, and each of the image processing unit 20 based on the input image data. An edge pixel determination unit 22 that determines whether or not a pixel is an edge pixel, a line-likeness acquisition unit 23 that acquires an index representing the line-likeness of each pixel based on the input image data, and the above-described halftone dot-likeness Are determined by the attribute determination unit 24 and the attribute determination unit 24 that determine attributes such as a character region, a halftone dot region, and a photo region for each pixel based on the index indicating the edge, the edge pixel determination result, and the index indicating the lineiness. Edge enhancement processing unit that applies edge enhancement processing to each pixel data based on the attribute and density conversion processing adapted to the attribute for each pixel data A density conversion processing section 26 to perform, and a halftone processing section 27 for performing halftoning process on the image data subjected to the edge enhancement processing and density conversion processing. The detailed operation of each of the above parts will be described in detail later.

図3は、画像処理部20における網点らしさ取得部21のより具体的な構成を示すブロック図である。網点らしさ取得部21は、図3に示すように、入力された画像データを一時記憶するデータメモリ40と、データメモリ40に記憶された画像データに基づいて、ピーク候補画素を検出するピーク候補画素検出部41と、ピーク候補画素検出部41によって検出されたピーク候補画素の位置情報を記憶するピークメモリ42と、ピーク候補画素検出部41によって検出されたピーク候補画素に基づいて、所定の参照領域内の非ピーク候補画素の数を算出し、これを網点らしさを表す指標として取得する網点らしさ算出部43とを備えている。上記の各部の詳細な作用についても、後で詳述する。   FIG. 3 is a block diagram showing a more specific configuration of the halftone dot likelihood obtaining unit 21 in the image processing unit 20. As shown in FIG. 3, the halftone dot likelihood acquisition unit 21 temporarily stores input image data and a peak candidate for detecting a peak candidate pixel based on the image data stored in the data memory 40. Based on the pixel detection unit 41, the peak memory 42 that stores the position information of the peak candidate pixel detected by the peak candidate pixel detection unit 41, and the peak candidate pixel detected by the peak candidate pixel detection unit 41, a predetermined reference is made. A halftone dot likelihood calculation unit 43 is provided that calculates the number of non-peak candidate pixels in the region and acquires this as an index representing the halftone dot likelihood. The detailed operation of each of the above parts will also be described in detail later.

印刷部30は、画像処理部20においてエッジ強調処理や濃度変換処理の施された処理済画像データに基づいて、印刷用紙に印刷を施すものである。印刷部30としては、たとえば、孔版印刷やインクジェットプリントやレーザープリントなどを行うものを用いることができる。   The printing unit 30 performs printing on printing paper based on the processed image data that has been subjected to edge enhancement processing and density conversion processing in the image processing unit 20. As the printing part 30, what performs stencil printing, inkjet printing, laser printing, etc. can be used, for example.

次に、本実施形態の印刷装置1の作用について、図4〜図15を適宜参照しながら説明する。なお、図4に示すフローチャートは、印刷装置1における原稿画像の読取りから印刷用紙への印刷処理までの全体の処理の流れを示したものである。また、図5に示すフローチャートは、図4に示す網点らしさの取得(S12)の処理をより詳細に示したものであり、図11に示すフローチャートは、図4に示す線らしさの取得(S16)の処理をより詳細に示したものであり、図14に示すフローチャートは、図4に示す属性の判定(S18)の処理をより詳細に示したものである。   Next, the operation of the printing apparatus 1 of the present embodiment will be described with reference to FIGS. 4 to 15 as appropriate. Note that the flowchart shown in FIG. 4 shows the flow of the entire process from reading an original image to printing processing on printing paper in the printing apparatus 1. Further, the flowchart shown in FIG. 5 shows the process of obtaining the halftone dot quality (S12) shown in FIG. 4 in more detail, and the flowchart shown in FIG. 11 is the acquisition of the line likeness shown in FIG. 4 (S16). ) In more detail, and the flowchart shown in FIG. 14 shows the attribute determination (S18) process shown in FIG. 4 in more detail.

まず、図4に示すフローチャートのように、原稿画像読取部10の原稿台に原稿が設置され、押圧板により押圧された状態でラインイメージセンサにより走査されて画像データが読み取られる(S10)。   First, as shown in the flowchart of FIG. 4, a document is placed on a document table of the document image reading unit 10, scanned by a line image sensor while being pressed by a pressing plate, and image data is read (S10).

そして、原稿画像読取部10において読み取られた画像データは、それぞれ網点らしさ取得部21とエッジ画素判定部22と線らしさ取得部23とに入力され、網点らしさ取得部21においては各画素の網点らしさを表す指標が取得され、エッジ画素判定部22においてはエッジ画素の判定が行われ、線らしさ取得部23においては各画素の線らしさを表す指標が取得される(S12〜S16)。   The image data read by the document image reading unit 10 is input to the halftone dot acquisition unit 21, the edge pixel determination unit 22, and the lineiness acquisition unit 23. An index representing the halftone dot is acquired, the edge pixel determination unit 22 determines the edge pixel, and the line likelihood acquisition unit 23 acquires an index representing the line-likeness of each pixel (S12 to S16).

ここで、まず、網点らしさ取得部21の処理について、図5に示すフローチャートを参照しながら説明する。   Here, first, the processing of the halftone dot likelihood obtaining unit 21 will be described with reference to the flowchart shown in FIG.

原稿画像読取部10から出力された画像データは、網点らしさ取得部21のデータメモリ40に5ライン分ずつ順次記憶される(S30)。   The image data output from the document image reading unit 10 is sequentially stored in units of five lines in the data memory 40 of the halftone dot acquisition unit 21 (S30).

そして、ピーク候補画素検出部41において、データメモリ40に記憶された5ライン分の画像データに基づいて網点検出の基礎となるピーク候補画素の検出が行われるが、本実施形態においては、画像データの濃度振幅の2次微分であるラプラシアン量を算出し、そのラプラシアン量に基づいてピーク候補画素の検出を行う。このようにラプラシアン量を用いるのは、ラプラシアン量は、図6の左側に示すような線の原画像よりも図6の右側に示すような孤立点に対して大きく反応するからである。   In the peak candidate pixel detection unit 41, detection of peak candidate pixels serving as a basis for halftone dot detection is performed based on the image data for five lines stored in the data memory 40. A Laplacian amount that is a second derivative of the density amplitude of data is calculated, and a peak candidate pixel is detected based on the Laplacian amount. The reason why the Laplacian amount is used in this way is that the Laplacian amount is more sensitive to the isolated point as shown on the right side of FIG. 6 than the original image of the line as shown on the left side of FIG.

ピーク候補画素検出部41は、まず、図7(a)〜(d)に示す4組8種類のフィルタ係数を用いて各画素についてラプラシアン量を算出する(S32)。図7(a)〜(d)の各組における2つのフィルタ係数は、互いに直交する方向に0以外の数値が配置されるように作成されたものである。また、図7(a)〜(d)の4組のフィルタ係数は、互いに異なる4つの直交方向のラプラシアン量が算出できるように作成されたものである。なお、本実施形態においては、フィルタ係数として5行×5列のものを利用するようにしたが、これに限らず、これよりも小さい3行×3列のものを用いてもよい。   First, the peak candidate pixel detection unit 41 calculates a Laplacian amount for each pixel using four sets of eight types of filter coefficients shown in FIGS. 7A to 7D (S32). The two filter coefficients in each group of FIGS. 7A to 7D are created so that numerical values other than 0 are arranged in directions orthogonal to each other. Also, the four sets of filter coefficients in FIGS. 7A to 7D are created so that four different Laplacian amounts in the orthogonal direction can be calculated. In the present embodiment, the filter coefficients of 5 rows × 5 columns are used. However, the present invention is not limited to this, and a filter coefficient of 3 rows × 3 columns smaller than this may be used.

具体的には、ピーク候補画素検出部41は、図7(a)に示す2つのフィルタ係数を用いて、下式を算出することによってLap1[a]およびLap2[a]を算出する。なお、data(j,i)は所定の注目画素の座標値(j,i)の画素データの値を示すものであり、jは図7(a)〜(d)に示すように縦方向の座標値を意味し、iは横方向の座標値を意味するものとする。   Specifically, the peak candidate pixel detection unit 41 calculates Lap1 [a] and Lap2 [a] by calculating the following equations using the two filter coefficients shown in FIG. Note that data (j, i) indicates the pixel data value of the coordinate value (j, i) of a predetermined target pixel, and j is the vertical direction as shown in FIGS. It means a coordinate value, and i means a coordinate value in the horizontal direction.

Lap1[a]=−data(j,i)×2+(j−2,i)+data(j+2,i)
Lap2[a]=−data(j,i)×2+(j,i+2)+data(j+2,i-2)
また、ピーク候補画素検出部41は、図7(b)に示す2つのフィルタ係数を用いて、下式を算出することによってLap1[b]およびLap2[b]を算出し、図7(c)に示す2つのフィルタ係数を用いて、下式を算出することによってLap1[c]およびLap2[c]を算出し、図7(d)に示す2つのフィルタ係数を用いて、下式を算出することによってLap1[d]およびLap2[d]を算出する。
Lap1 [a] = − data (j, i) × 2 + (j−2, i) + data (j + 2, i)
Lap2 [a] = − data (j, i) × 2 + (j, i + 2) + data (j + 2, i−2)
Further, the peak candidate pixel detection unit 41 calculates Lap1 [b] and Lap2 [b] by calculating the following equations using the two filter coefficients shown in FIG. 7B, and FIG. Using the two filter coefficients shown in Fig. 7, Lap1 [c] and Lap2 [c] are calculated by calculating the following formula, and the following formula is calculated using the two filter coefficients shown in Fig. 7 (d). Thus, Lap1 [d] and Lap2 [d] are calculated.

Lap1[b]=−data(j,i)×2+(j−2,i+1)+data(j+2,i−1)
Lap2[b]=−data(j,i)×2+(j+1,i+2)+data(j−1,i-2)
Lap1[c]=−data(j,i)×2+(j−2,i+2)+data(j+2,i−2)
Lap2[c]=−data(j,i)×2+(j+2,i+2)+data(j−2,i-2)
Lap1[d]=−data(j,i)×2+(j−1,i+2)+data(j+1,i−2)
Lap2[d]=−data(j,i)×2+(j+2,i+1)+data(j−2,i-1)
次に、ピーク候補画素検出部41は、各画素についてそれぞれ算出された4組のラプラシアン量を参照し、ラプラシアン量Lap1とLap2とが全ての組において同符号となるような画素をピーク候補画素検出対象とし(S34,YES,S36)、4組のラプラシアン量のうちのいずれかの組のラプラシアン量Lap1とLap2とが異符号である画素についてはピーク候補画素検出対象から除外する(S34,NO,S38)。
Lap1 [b] = − data (j, i) × 2 + (j−2, i + 1) + data (j + 2, i−1)
Lap2 [b] = − data (j, i) × 2 + (j + 1, i + 2) + data (j−1, i−2)
Lap1 [c] = − data (j, i) × 2 + (j−2, i + 2) + data (j + 2, i−2)
Lap2 [c] = − data (j, i) × 2 + (j + 2, i + 2) + data (j−2, i−2)
Lap1 [d] = − data (j, i) × 2 + (j−1, i + 2) + data (j + 1, i−2)
Lap2 [d] = − data (j, i) × 2 + (j + 2, i + 1) + data (j−2, i−1)
Next, the peak candidate pixel detection unit 41 refers to the four sets of Laplacian amounts calculated for each pixel, and detects peak candidate pixels for pixels in which the Laplacian amounts Lap1 and Lap2 have the same sign in all sets. Pixels for which the Laplacian amounts Lap1 and Lap2 of any of the four sets of Laplacian amounts have different signs are excluded from the peak candidate pixel detection targets (S34, NO, S36). S38).

ここで、互いに直交する方向のラプラシアン量Lap1とLaP2とが異なる符号であるとは、図8(a)に示すような濃度分布の画素であることを意味し、ラプラシアン量Lap1とLaP2とが同じ符号であるとは、図8(b)に示すような濃度分布の画素であることを意味している。そして、図8(a)に示すような濃度分布である画素は線や文字である可能性が高く、図8(b)に示すようの濃度分布である画素は網点のような孤立点である可能性が高い。   Here, the signs that the Laplacian amounts Lap1 and LaP2 in the directions orthogonal to each other have different signs mean that the pixels have a density distribution as shown in FIG. 8A, and the Laplacian amounts Lap1 and LaP2 are the same. The sign is a pixel having a density distribution as shown in FIG. A pixel having a density distribution as shown in FIG. 8A is likely to be a line or a character, and a pixel having a density distribution as shown in FIG. 8B is an isolated point such as a halftone dot. There is a high possibility.

次いで、ピーク候補画素検出部41は、S36においてピーク候補画素検出対象とされた画素について、各組のラプラシアン量Lap1とLap2とを加算して、その加算した値をピーク値Pvalとして取得する(S40)。そして、各画素について取得された4つのピーク値Pvalが全て正の場合には、その中の最大値を極大値Plus_Maxとして取得し、4つのピーク値Pvalが全て負の場合には、その中の絶対値が最大のものを極小値Minus_Maxとして取得する(S42)。   Next, the peak candidate pixel detection unit 41 adds the respective Laplacian amounts Lap1 and Lap2 for the pixels that are the candidates for peak candidate pixel detection in S36, and acquires the added value as the peak value Pval (S40). ). When the four peak values Pval acquired for each pixel are all positive, the maximum value among them is acquired as the maximum value Plus_Max, and when the four peak values Pval are all negative, The one having the maximum absolute value is acquired as the minimum value Minus_Max (S42).

ここで、各画素について取得された4つのピーク値Pvalが全て正であるということは正のピーク成分が大きく寄与していることになり、すなわち原稿画像としては谷である可能性が高いことになる。逆に、4つのピーク値Pvalが全て負であるということは負のピーク成分が大きく寄与していることになり、すなわち原稿画像としては山である可能性が高いことになる。   Here, the fact that the four peak values Pval acquired for each pixel are all positive means that the positive peak component greatly contributes, that is, there is a high possibility that the original image is a valley. Become. On the other hand, if the four peak values Pval are all negative, the negative peak component greatly contributes, that is, the possibility that the original image is a mountain is high.

次に、上述したようにして取得された極大値Plus_Maxまたは極小値Minus_Maxの絶対値と、予め設定されたピーク閾値とを比較し(S44)、極大値Plus_Maxまたは極小値Minus_Maxの絶対値がピーク閾値よりも大きい場合には、その画素をピーク候補画素として判定する(S46)。一方、極大値Plus_Maxまたは極小値Minus_Maxの絶対値がピーク閾値以下である場合には、その画素を非ピーク候補画素として判定する(S48)。なお、このとき用いるピーク閾値は、例えば、実験的に求めたピーク値に対して、ピーク周辺のピーク候補画素を検出するため、上記ピーク値よりも比較的低い値に設定することが望ましい。また、S38においてピーク候補画素検出対象から除外された画素も非ピーク候補画素として判定されることになる。   Next, the absolute value of the maximum value Plus_Max or the minimum value Minus_Max acquired as described above is compared with a preset peak threshold value (S44), and the absolute value of the maximum value Plus_Max or the minimum value Minus_Max is the peak threshold value. If it is larger, the pixel is determined as a peak candidate pixel (S46). On the other hand, when the absolute value of the maximum value Plus_Max or the minimum value Minus_Max is equal to or less than the peak threshold value, the pixel is determined as a non-peak candidate pixel (S48). Note that the peak threshold value used at this time is preferably set to a value relatively lower than the peak value in order to detect peak candidate pixels around the peak with respect to the peak value obtained experimentally, for example. Further, the pixels excluded from the peak candidate pixel detection targets in S38 are also determined as non-peak candidate pixels.

上述したようにしてピーク候補画素検出部41においてピーク候補画素が検出され、そのピーク候補画素の位置を特定する情報がピークメモリ42に記憶される。   As described above, the peak candidate pixel detection unit 41 detects the peak candidate pixel, and information for specifying the position of the peak candidate pixel is stored in the peak memory 42.

次に、網点らしさ算出部43がピークメモリ42を参照し、図9に示すように、所定の注目画素Pを中心とする5画素×5画素の参照領域内に存在するピーク候補画素の数をカウントし、参照領域内の全画素数25画素からピーク候補画素数を減算して非ピーク候補画素数を算出し、その非ピーク候補画素数を上記注目画素の網点らしさを表す指標として取得する(S50)。そして、画像データを構成する全ての画素を順次注目画素として上記と同様の演算を行うことによって、各画素の網点らしさを表す指標が取得される。なお、このとき参照領域内の画素が全て非ピーク候補画素である場合には、その注目画素については、網点らしさを表す指標を255とし、後述するように写真の属性に判定されるものとする。なお、いわゆる写真領域以外の用紙の余白なども全て非ピーク候補画素となり、写真の属性として判断されることになる。   Next, the halftone dot likelihood calculation unit 43 refers to the peak memory 42 and, as shown in FIG. 9, the number of peak candidate pixels existing in a reference region of 5 pixels × 5 pixels centered on a predetermined target pixel P. The number of non-peak candidate pixels is calculated by subtracting the number of peak candidate pixels from the total number of 25 pixels in the reference region, and the number of non-peak candidate pixels is obtained as an index representing the dot-likeness of the target pixel. (S50). Then, an index representing the dot-likeness of each pixel is obtained by performing the same calculation as above with all the pixels constituting the image data sequentially as the target pixel. At this time, if all the pixels in the reference area are non-peak candidate pixels, the target pixel is determined to be an attribute of a photo as described later, with an index indicating the likelihood of halftone dots being 255. To do. Note that paper margins other than the so-called photo area are all non-peak candidate pixels, and are judged as photo attributes.

本実施形態においては、上述したようにピーク候補画素数ではなく、非ピーク候補画素数を網点らしさを表す指標としているが、このようにするのは画像データ内の比較的狭い領域でピーク候補画素数と非ピーク候補画素数とを比較した場合、たとえば網点領域の場合には、図10(a)に示すように非ピーク候補画素数の方がピーク候補画素数よりも多くなり、文字や線の領域である場合には、図10(b)に示すように網点領域に比較するとピーク候補画素数の割合が大きくなって非ピーク候補画素数が少なくなるからであり、非ピーク候補画素数を網点らしさを表す指標とすることによって文字や線と区別して網点領域を適切に判定することができるからである。   In the present embodiment, as described above, the number of non-peak candidate pixels, not the number of peak candidate pixels, is used as an index representing the likelihood of halftone dots. When the number of pixels is compared with the number of non-peak candidate pixels, for example, in the case of a halftone dot region, the number of non-peak candidate pixels is larger than the number of peak candidate pixels as shown in FIG. If the region is a line region, as shown in FIG. 10B, the ratio of the number of peak candidate pixels increases and the number of non-peak candidate pixels decreases compared to the halftone dot region. This is because, by using the number of pixels as an index representing the likelihood of halftone dots, it is possible to appropriately determine a halftone dot region in distinction from characters and lines.

また、このように比較的狭い領域でのピーク候補画素数と非ピーク候補画素数とを検出するので、上述したデータメモリ40やピークメモリ42の容量を小さくすることができるからである。   In addition, since the number of peak candidate pixels and the number of non-peak candidate pixels in such a relatively narrow region are detected, the capacity of the data memory 40 and the peak memory 42 described above can be reduced.

ただし、細い線を含む文字や単なる細い線などについては、比較的狭い領域内であっても非ピーク候補画素数が増えてくるので、これらの領域を網点領域と誤判定してしまう可能性がある。   However, for characters including thin lines or simple thin lines, the number of non-peak candidate pixels increases even within a relatively narrow area, and these areas may be erroneously determined as halftone dot areas. There is.

そこで、本実施形態においては、上述したようにエッジ画素判定部22や、線らしさ取得部23を設け、これらの処理結果も用いることによって領域判定の精度をより高いものとしている。   Therefore, in the present embodiment, as described above, the edge pixel determination unit 22 and the linearity acquisition unit 23 are provided, and these processing results are also used to increase the accuracy of region determination.

また、詳細は後述するが、本実施形態においては、網点領域と文字領域とのいずれか一方に判定するのではなく、網点と文字との間に属する領域を設定し、この領域に対しては文字と網点との中間の画像処理を施すことによって違和感のない画質の印刷画像を得るようにする。そして、この網点と文字との間に属する領域を判定するためにも、上述した線らしさ取得部23の処理結果を用いるようにしている。   Although details will be described later, in this embodiment, an area that belongs between the halftone dot and the character is set instead of being determined as one of the halftone dot area and the character area. In other words, an intermediate image process between characters and halftone dots is performed to obtain a print image with an uncomfortable image quality. The processing result of the above-described linearity acquisition unit 23 is also used to determine the region that belongs between the halftone dot and the character.

以下、この線らしさ取得部23の処理(図4のS16)について、図11に示すフローチャートを参照しながら説明する。   Hereinafter, the processing (S16 in FIG. 4) of the line likeness acquisition unit 23 will be described with reference to the flowchart shown in FIG.

まず、線らしさ取得部23は、所定の注目画素について、図12に示す4つの線検出フィルタ係数を用いて4つの線成分量line1〜line4を算出する(S60)。なお、線成分量の演算方法については、通常のフィルタ演算と同様であるので詳細な演算式については説明を省略する。   First, the line likelihood acquisition unit 23 calculates four line component amounts line1 to line4 for the predetermined target pixel using the four line detection filter coefficients shown in FIG. 12 (S60). Since the calculation method of the line component amount is the same as that of the normal filter calculation, the detailed calculation formula will not be described.

そして、互いに直交する線検出フィルタ係数の線成分量を1つの組とし、すなわちline1とline2を1つの組、line3とline4を1つの組として、各組について、各線成分量の絶対値の差分をline_valueとして算出する(S62)。   Then, the line component amounts of the line detection filter coefficients orthogonal to each other are set as one set, that is, line 1 and line 2 are set as one set, line 3 and line 4 are set as one set, and the absolute value difference of each line component amount is set for each set. It is calculated as line_value (S62).

次に、上述したようにして算出された2つのline_valueのうちの大きい方の値を線らしさを表す指標として取得する(S64)。なお、このとき後述する属性判定の都合上、線らしさを表す指標は128を最大値とする必要があるため、line_valueを12で除算した値が線らしさを表す指標として取得される。そして、画像データを構成する全ての画素を順次注目画素として上記と同様の演算を行うことによって、各画素の線らしさを表す指標が取得される。   Next, the larger value of the two line_values calculated as described above is acquired as an index representing the linearity (S64). At this time, for convenience of attribute determination to be described later, since the index indicating the linearity needs to have 128 as the maximum value, the value obtained by dividing line_value by 12 is acquired as the index indicating the linearity. Then, an index representing the linearity of each pixel is obtained by performing the same calculation as above with all the pixels constituting the image data as the target pixel in order.

次に、エッジ画素判定部22の処理(図4のS14)について説明する。このエッジ画素判定部22におけるエッジ画素の判定は、文字の輪郭部分を抽出するために行われるものである。   Next, the process of the edge pixel determination unit 22 (S14 in FIG. 4) will be described. The edge pixel determination in the edge pixel determination unit 22 is performed in order to extract a contour portion of a character.

エッジ画素判定部22は、具体的には、所定の注目画素について、図13に示す4つの微分フィルタ係数を用いてエッジ量edge1〜edge4を算出し、このedge1〜edge4の絶対値のうちの最も大きい値をMax_edgeとして取得する。   Specifically, the edge pixel determination unit 22 calculates the edge amounts edge1 to edge4 using the four differential filter coefficients shown in FIG. 13 for a predetermined target pixel, and the edge pixel edge1 is the largest of the absolute values of the edge1 to edge4. A large value is acquired as Max_edge.

そして、このMax_edgeと予め設定されたエッジ閾値とを比較し、Max_edgeの方がエッジ閾値よりも大きい場合には、その注目画素をエッジ画素と判定する。一方、Max_edgeがエッジ閾値以下の場合には、その注目画素を非エッジ画素と判定する。そして、画像データを構成する全ての画素を順次注目画素として上記と同様の演算を行うことによって、エッジ画素であるか否かを示す判定結果が取得される。   Then, this Max_edge is compared with a preset edge threshold value. When Max_edge is larger than the edge threshold value, the target pixel is determined as an edge pixel. On the other hand, when Max_edge is equal to or smaller than the edge threshold, the target pixel is determined as a non-edge pixel. Then, a determination result indicating whether or not the pixel is an edge pixel is obtained by performing the same calculation as above with all the pixels constituting the image data being sequentially set as the target pixel.

上述したようにして、画像データを構成する全ての画素について、それぞれ網点らしさを表す指標と、線らしさを表す指標と、エッジ画素であるか否かを示す判定結果とが取得される。   As described above, for all the pixels constituting the image data, the index indicating the halftone dot, the index indicating the lineiness, and the determination result indicating whether the pixel is an edge pixel are acquired.

そして、この各画素の網点らしさを表す指標、線らしさを表す指標およびエッジ画素判定結果は属性判定部24に入力され、属性判定部24は、これらに基づいて各画素の属性を判定する(図4のS18)。本実施形態においては、細線、文字、網点、文字と網点の間および写真の5つの属性が設定されており、各画素についていずれか1つの属性が割り当てられる。以下、属性判定部24の属性判定方法について、図14に示すフローチャートを参照しながら説明する。なお、ここでは線らしさを表す指標をline_like、網点らしさを表す指標をamiと呼ぶこととする。   Then, the index indicating the dot-likeness of each pixel, the index indicating the lineiness, and the edge pixel determination result are input to the attribute determination unit 24, and the attribute determination unit 24 determines the attribute of each pixel based on these ( S18 of FIG. In the present embodiment, five attributes of fine line, character, halftone dot, between character and halftone dot, and photograph are set, and any one attribute is assigned to each pixel. Hereinafter, the attribute determination method of the attribute determination unit 24 will be described with reference to the flowchart shown in FIG. Here, an index representing the likelihood of a line is referred to as line_like, and an index representing the likelihood of a halftone dot is referred to as ami.

属性判定部24は、まず、各画素のline_likeを参照し、line_likeが50以上である場合には(S70,YES)これを全て50に丸め(S72)、50より小さい場合にはそのままの値とする。なお、ここでline_likeを50に丸めるようにしたのは、実験により文字のline_likeは50以下の値をとることがわかったからである。ただし、これは一つの実験例であってこれに限られるものではない。   The attribute determination unit 24 first refers to the line_like of each pixel. If the line_like is 50 or more (S70, YES), this is all rounded to 50 (S72). To do. Here, the reason why the line_like is rounded to 50 is because it has been found through experiments that the line_like of the character takes a value of 50 or less. However, this is an experimental example and is not limited thereto.

次に、属性判定部24は、各画素のline_likeが38よりも大きいか否かを判定し、38よりも大きい場合には(S74,YES)、その画素の属性を細線と判定する(S76)。なお、ここで閾値として38を用いるようにしたのは、実験により網点のline_likeは38より大きい値をとらないことがわかったからである。ただし、これは一つの実験例であってこれに限られるものではない。   Next, the attribute determining unit 24 determines whether or not the line_like of each pixel is larger than 38 (S74, YES), and determines that the attribute of the pixel is a thin line (S76). . The reason why 38 is used as the threshold value here is that it has been found from experiments that the line_like of the halftone dot does not take a value larger than 38. However, this is an experimental example and is not limited thereto.

次に、各画素のline_likeが27より大きいか否かが判定されるとともに、amiの値が参照され、line_likeが27より大きいまたはami=255の画素であって、かつその画素がエッジ画素である場合には(S78,YES)、その画素の属性は文字と判定される(S80)。なお、ここで閾値として27を用いるようにしたのは、実験により若干の網点のline_likeは27の近傍をとり得ることがわかっているが、文字周りの画素をより多く含めるようにするためである。ただし、これは一つの実験例であってこれに限られるものではない。また、ここでami=255かつエッジ画素である場合に、その属性を文字と判定するようにしているには、写真領域内におけるエッジ部をここで検出するためである。すわなち、本実施形態においては、写真領域内においてもエッジ部や文字については、文字の属性として判定するようにしている。   Next, it is determined whether or not the line_like of each pixel is greater than 27, and the value of ami is referred to. The line_like is a pixel greater than 27 or ami = 255, and the pixel is an edge pixel. In that case (S78, YES), the attribute of the pixel is determined to be a character (S80). The reason why 27 is used as the threshold value here is that it is known from experiments that line_like of some halftone dots can take the vicinity of 27, but to include more pixels around the character. is there. However, this is an experimental example and is not limited thereto. Further, here, when ami = 255 and an edge pixel, the attribute is determined to be a character in order to detect the edge portion in the photographic region here. In other words, in the present embodiment, edge portions and characters are determined as character attributes even in the photo area.

次に、各画素のamiが参照され、amiが8よりも大きい場合には(S82,YES)、その画素の属性は網点と判定される(S84)。なお、ここで閾値として8を用いるようにしたのは、実験により網点のamiが8より大きいことがわかったからであるが、これは一つの実験例であってこれに限られるものではない。   Next, the ami of each pixel is referred to, and when the ami is greater than 8 (S82, YES), the attribute of the pixel is determined to be a halftone dot (S84). Here, the reason why 8 is used as the threshold value is that it has been found by experiments that the halftone dot ami is larger than 8, but this is only an experimental example and is not limited thereto.

次に、各画素のline_likeが参照され、line_likeが15よりも大きい場合には(S86,YES)、その画素の属性は文字と網点の間と判定される(S88)。一方、line_likeが15以下である場合には(S86,NO)、その画素の属性は写真と判定される(S90)。なお、ここでは、line_likeが38以下で比較的大きな値をとったときでも、属性としては網点と文字との中間のようなものであり、中間程度の処理を施すのが良いため、明らかに写真といえる値を考慮して15を採用するようにした。ただし、これは一つの例であってこれに限られるものではない。   Next, the line_like of each pixel is referred to, and when the line_like is larger than 15 (S86, YES), it is determined that the attribute of the pixel is between a character and a halftone dot (S88). On the other hand, when line_like is 15 or less (S86, NO), the attribute of the pixel is determined to be a photograph (S90). Here, even when line_like is 38 or less and takes a relatively large value, the attribute is intermediate between a halftone dot and a character, and it is preferable to perform intermediate processing. Considering the value that can be said to be a photograph, 15 was adopted. However, this is an example and the present invention is not limited to this.

上述のようにして、属性判定部24は、画像データを構成する全ての画素に対して属性を割り当てるが、どの属性かを示す情報として各画素に属性値を割り当てる。具体的には、細線の属性を示す属性値として0、文字の属性を示す属性値として16、網点の属性を示す属性値として128、文字と網点の間の属性を示す属性値として196〜230、写真の属性を示す属性値として255を割り当てる。なお、文字と網点の間の属性を示す属性値は、line_likeの大きさに応じて196〜230まで変化するものであり、line_likeは図14のS86における判定によると16〜50まで変化するものであるので、line_likeが16の場合は230、line_likeが50である場合には196となる。すなわち、line_likeが大きいほど属性値が小さくなることになる。   As described above, the attribute determination unit 24 assigns attributes to all the pixels constituting the image data, and assigns an attribute value to each pixel as information indicating which attribute. Specifically, 0 as an attribute value indicating a thin line attribute, 16 as an attribute value indicating a character attribute, 128 as an attribute value indicating a halftone dot attribute, and 196 as an attribute value indicating an attribute between a character and a halftone dot. ˜230, 255 is assigned as an attribute value indicating the attribute of the photograph. The attribute value indicating the attribute between the character and the halftone dot changes from 196 to 230 depending on the size of line_like, and line_like changes from 16 to 50 according to the determination in S86 of FIG. Therefore, when line_like is 16, it is 230, and when line_like is 50, it is 196. That is, the larger the line_like, the smaller the attribute value.

そして、次に、上述したようにして各画素に割り当てられた属性値に基づいて、エッジ強調処理部25において画像データの各画素データに対してエッジ強調処理が施される(図4のS20)。本実施形態のエッジ強調処理部25は、ラプラシアンフィルタを用いてエッジ強調を施すものである。ラプラシアンのフィルタ係数については、通常用いられるような3×3や5×5のものを用いるようにすればよい。   Then, based on the attribute value assigned to each pixel as described above, the edge enhancement processing unit 25 performs edge enhancement processing on each pixel data of the image data (S20 in FIG. 4). . The edge enhancement processing unit 25 of the present embodiment performs edge enhancement using a Laplacian filter. As for the Laplacian filter coefficient, a 3 × 3 or 5 × 5 filter which is usually used may be used.

そして、エッジ強調処理部25は、具体的には、画像データを構成する各画素データdata(j,i)と、ラプラシアンフィルタを用いて求められたラプラシアン量lapとに基づいて、下式を演算することによって処理済画素sdata(j,i)を算出する。   Specifically, the edge enhancement processing unit 25 calculates the following expression based on each pixel data data (j, i) constituting the image data and a Laplacian amount lap obtained using a Laplacian filter. As a result, the processed pixel sdata (j, i) is calculated.

sdata(j,i)=data(j,i)−lap×weight
上式におけるweightは、各画素データdata(j,i)に割り当てられた属性値に応じて変化するものであり、たとえば、属性値が0(細線)の場合にはweight=1.5とし、属性値が16(文字)の場合にはweight=1とし、属性値が128(網点)または255(写真)の場合にはweight=0とすることができる。
sdata (j, i) = data (j, i) −lap × weight
The weight in the above equation changes according to the attribute value assigned to each pixel data data (j, i). For example, when the attribute value is 0 (thin line), weight = 1.5, When the attribute value is 16 (character), weight = 1 can be set, and when the attribute value is 128 (halftone dot) or 255 (photograph), weight = 0 can be set.

そして、属性値が196〜230(文字と網点の間)の場合には、weightは、たとえば下式によって算出される。なお、line_like’=属性値−196であり、また下式の35は属性値の範囲である。   When the attribute value is 196 to 230 (between characters and halftone dots), the weight is calculated by the following equation, for example. Note that line_like ′ = attribute value−196, and 35 in the following expression is a range of attribute values.

weight=(35−line_like’)/35
上述したようにして、weightを決定してエッジ強調処理を施すことによって、細線の画素データには強めのエッジ強調処理がほどこされ、文字の画素データには通常のエッジ強調処理が施され、文字と網点の間の属性の画素データには、その線らしさの指標に応じた比率のエッジ強調処理が施される。そして、網点と写真の画素データにはエッジ強調処理を施さないようにすることができる。
weight = (35−line_like ′) / 35
As described above, the weight is determined and the edge emphasis process is performed, whereby the fine line pixel data is subjected to the strong edge emphasis process, and the character pixel data is subjected to the normal edge emphasis process, and the character The pixel enhancement data between the halftone dots and the halftone dots is subjected to edge enhancement processing at a ratio corresponding to the index of lineiness. Then, it is possible to prevent the edge enhancement process from being applied to the pixel data of the halftone dots and the photograph.

次に、エッジ強調処理部25においてエッジ強調処理が施された後、濃度変換処理部26においてエッジ強調処理済画素データに対して濃度変換処理が施される(図4のS22)。   Next, after edge enhancement processing is performed in the edge enhancement processing unit 25, density conversion processing is performed on the edge enhanced pixel data in the density conversion processing unit 26 (S22 in FIG. 4).

濃度変換処理は、文字の内部が濃くなるように変換しようとすると写真のシャドー部分がつぶれてしまい、全体的に暗い印象の画像となってしまう。   In the density conversion process, if the conversion is made so that the inside of the character is dark, the shadow portion of the photograph is crushed, resulting in an overall dark impression image.

そこで、これを解消するために、本実施形態の濃度変換処理部26は、文字に対してはコントラストの強いガンマ曲線を用いて濃度変換処理を施し、写真には文字のガンマ曲線よりも明るくなるようなガンマ曲線を用いて濃度変換処理を行うようにする。また、細線に対しては文字と同じガンマ曲線を用いて、網点に対しては写真と同じガンマ曲線を用いて濃度変換処理を行う。図15は、文字と細線の属性の画素に対して濃度変換処理を施す際に用いられるガンマ曲線と、写真と網点の属性の画素に対して濃度変換処理を施す際に用いられるガンマ曲線との一例を示したものである。   Therefore, in order to solve this problem, the density conversion processing unit 26 of the present embodiment performs density conversion processing on a character using a gamma curve having a strong contrast, and the photograph becomes brighter than the gamma curve of the character. The density conversion process is performed using such a gamma curve. Further, the density conversion processing is performed using the same gamma curve as that of characters for thin lines and the same gamma curve as that of photographs for halftone dots. FIG. 15 shows a gamma curve used when density conversion processing is performed on pixels having character and thin line attributes, and a gamma curve used when density conversion processing is performed on pixels having photo and halftone attributes. An example is shown.

そして、濃度変換処理部26は、文字と網点との間の属性の画素に対して濃度変換処理を施す際には、図15に示す写真の画素に対して用いられるガンマ曲線と、文字の画素に対して用いられるガンマ曲線との両方を用い、対象となる画素のami(網点らしさの指標)の大きさに基づいて、これらのガンマ曲線の比率を変化させて濃度変換処理を行う。具体的には、下式に基づいて濃度変換処理済画素データoutdata(j,i)を算出する。   When the density conversion processing unit 26 performs the density conversion process on the attribute pixel between the character and the halftone dot, the gamma curve used for the pixel of the photograph shown in FIG. Both the gamma curve used for the pixel is used, and density conversion processing is performed by changing the ratio of these gamma curves based on the size of the target pixel's ami (an index of dot-likeness). Specifically, the density-converted pixel data outdata (j, i) is calculated based on the following equation.

outdata(j,i)=
{(35−line_like’)*gamma1[data(j,i)] + line_like’×gamma2[data(j,i)]}/35
gamma1:写真、網点用のガンマ曲線を示す式
gamma2:文字、細線用のガンマ曲線を示す式
上述したようにして、画像データの各画素データに対して、その属性に応じた濃度変換処理が施され、その濃度変換処理済画像データは、ハーフトーニング処理部27に入力される。そして、ハーフトーニング処理部27においては、濃度変換処理済画像データに対してハーフトーニング処理が施される(図4のS24)。ハーフトーニング処理としては、たとえば、誤差拡散法やディザ法などがある。
outdata (j, i) =
{(35-line_like ′) * gamma1 [data (j, i)] + line_like ′ × gamma2 [data (j, i)]} / 35
gamma1: Expression showing a gamma curve for photographs and halftone dots gamma2: Expression showing a gamma curve for characters and fine lines As described above, density conversion processing corresponding to the attribute of each pixel data of image data is performed. The density converted image data is input to the halftoning processing unit 27. Then, in the halftoning processing unit 27, the halftoning process is performed on the density-converted image data (S24 in FIG. 4). Examples of the halftoning process include an error diffusion method and a dither method.

そして、ハーフトーニング処理部27においてハーフトーニング処理の施された処理済画像データは、画像処理部20から出力されて印刷部30に入力される。   The processed image data that has been subjected to the halftoning process in the halftoning processing unit 27 is output from the image processing unit 20 and input to the printing unit 30.

そして、印刷部30において、入力された処理済画像データに基づいて印刷用紙に印刷処理が施される(図4のS26)。   Then, the printing unit 30 performs a printing process on the printing paper based on the input processed image data (S26 in FIG. 4).

1 印刷装置
10 原稿画像読取部
20 画像処理部
21 網点らしさ取得部
22 エッジ画素判定部
23 線らしさ取得部
24 属性判定部
25 エッジ強調処理部
26 濃度変換処理部
27 ハーフトーニング処理部
30 印刷部
40 データメモリ
41 ピーク候補画素検出部
42 ピークメモリ
43 網点らしさ算出部
DESCRIPTION OF SYMBOLS 1 Printing apparatus 10 Original image reading part 20 Image processing part 21 Halftone dot acquisition part 22 Edge pixel determination part 23 Linearity acquisition part 24 Attribute determination part 25 Edge emphasis processing part 26 Density conversion processing part 27 Halftoning process part 30 Printing part 40 Data memory 41 Peak candidate pixel detection unit 42 Peak memory 43 Halftone dot calculation unit

Claims (3)

原稿画像を読み取って取得された画像データにおけるピーク候補画素を検出するピーク候補画素検出部と、
前記画像データにおける所定の注目画素について、線らしさを表す指標を算出する線らしさ算出部と、
前記画像データにおける所定の注目画素を中心とする参照領域内における前記ピーク候補画素以外の非ピーク候補画素の数が、所定の網点判定閾値以上である場合に、前記注目画素が網点領域に属する画素であると判定し、前記注目画素の前記線らしさを表す指標が、所定の文字判定閾値以上である場合に、前記注目画素が文字に属する画素であると判定し、前記注目画素を中心とする参照領域内における前記非ピーク候補画素の数が前記網点判定閾値未満であって、かつ前記注目画素の前記線らしさを表す指標が前記文字判定閾値未満で所定の閾値以上である場合に、前記注目画素が文字と網点との間に属する画素であると判定する属性判定部とを備えた画像処理装置。
A peak candidate pixel detection unit for detecting peak candidate pixels in image data obtained by reading a document image;
A linearity calculation unit for calculating an index representing the linearity for a predetermined pixel of interest in the image data;
When the number of non-peak candidate pixels other than the peak candidate pixel in the reference area centered on the predetermined target pixel in the image data is equal to or greater than a predetermined halftone dot determination threshold, the target pixel is included in the halftone dot area. The pixel of interest is determined to be a pixel belonging to a character when the index representing the linearity of the pixel of interest is greater than or equal to a predetermined character determination threshold, and the pixel of interest is centered When the number of the non-peak candidate pixels in the reference region is less than the halftone dot determination threshold and the index indicating the line-likeness of the target pixel is less than the character determination threshold and equal to or greater than a predetermined threshold An image processing apparatus comprising: an attribute determination unit that determines that the target pixel is a pixel that belongs between a character and a halftone dot .
前記属性判定部が、前記画像データにおける所定の注目画素を中心とする参照領域内における前記非ピーク候補画素の数が前記網点判定閾値未満であって、かつ前記注目画素の前記線らしさを表す指標が前記所定の閾値未満である場合に、前記注目画素が写真に属する画素であると判定するものであることを特徴とする請求項記載の画像処理装置。 The attribute determination unit represents the number of the non-peak candidate pixels in a reference region centered on a predetermined pixel of interest in the image data that is less than the halftone dot determination threshold and represents the linearity of the pixel of interest. If the index is less than the predetermined threshold value, the image processing apparatus according to claim 1, wherein the pixel of interest is to determine that the pixel belongs to the photographic. 前記画像データにおける所定の注目画素がエッジ画素であるか否かを判定するエッジ画素判定部を備え、
前記属性判定部が、前記注目画素がエッジ画素であると判定され、かつ前記線らしさを表す指標が前記文字判定閾値以上である場合に、前記注目画素が文字に属する画素であると判定するものであることを特徴とする請求項1または2記載の画像処理装置。
An edge pixel determination unit that determines whether or not a predetermined pixel of interest in the image data is an edge pixel;
The attribute determining unit determines that the pixel of interest is a pixel belonging to a character when the pixel of interest is determined to be an edge pixel and the index indicating the linearity is equal to or greater than the character determination threshold. The image processing apparatus according to claim 1 , wherein the image processing apparatus is an image processing apparatus.
JP2011165537A 2011-07-28 2011-07-28 Image processing device Expired - Fee Related JP5818559B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011165537A JP5818559B2 (en) 2011-07-28 2011-07-28 Image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011165537A JP5818559B2 (en) 2011-07-28 2011-07-28 Image processing device

Publications (2)

Publication Number Publication Date
JP2013030975A JP2013030975A (en) 2013-02-07
JP5818559B2 true JP5818559B2 (en) 2015-11-18

Family

ID=47787593

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011165537A Expired - Fee Related JP5818559B2 (en) 2011-07-28 2011-07-28 Image processing device

Country Status (1)

Country Link
JP (1) JP5818559B2 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3434374B2 (en) * 1994-11-29 2003-08-04 京セラミタ株式会社 Image forming device
JP2002300387A (en) * 2001-03-30 2002-10-11 Ricoh Co Ltd Dot area detector, image forming device, program, storage medium and dot area detection method
JP2003101774A (en) * 2001-09-25 2003-04-04 Ricoh Co Ltd Image processor

Also Published As

Publication number Publication date
JP2013030975A (en) 2013-02-07

Similar Documents

Publication Publication Date Title
US7746505B2 (en) Image quality improving apparatus and method using detected edges
JP5887770B2 (en) Image processing apparatus and image processing program
US9649839B2 (en) Image processing apparatus and image processing method
US6778297B1 (en) Image processing apparatus, method, and computer program product
KR20120132314A (en) Image processing apparatus, image processing method, and computer readable medium
JP4140519B2 (en) Image processing apparatus, program, and recording medium
JP4570534B2 (en) Image processing apparatus, image forming apparatus, image processing method, and computer program
JP5818559B2 (en) Image processing device
TWI395466B (en) Method for auto-cropping image
JP3479161B2 (en) Image processing device
JP2012095173A (en) Image processing device, image formation device, and image processing method
JP5762846B2 (en) Image processing device
JP3966448B2 (en) Image processing apparatus, image processing method, program for executing the method, and recording medium storing the program
JP3783005B2 (en) Image processing device
JP2001285631A (en) Area discrimination method and device
JP4005243B2 (en) Image processing device
JP5482945B1 (en) Image processing apparatus and program
JP2007081793A (en) Image forming apparatus
JP4743899B2 (en) Gradation correction processing method, program for executing the same, and gradation correction processing apparatus
JP7077925B2 (en) Image processing equipment, image processing methods, and programs
KR100537829B1 (en) Method for segmenting Scan Image
JP4524714B2 (en) Image processing apparatus and line pair pattern discrimination method
JP2004104662A (en) Image forming device
JP2647458B2 (en) Halftone dot area separation device
JP2009111786A (en) Image processing apparatus and image processing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140523

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150304

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150310

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150430

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150929

R150 Certificate of patent or registration of utility model

Ref document number: 5818559

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees