JP2011188109A - Document image analysis apparatus - Google Patents

Document image analysis apparatus Download PDF

Info

Publication number
JP2011188109A
JP2011188109A JP2010049439A JP2010049439A JP2011188109A JP 2011188109 A JP2011188109 A JP 2011188109A JP 2010049439 A JP2010049439 A JP 2010049439A JP 2010049439 A JP2010049439 A JP 2010049439A JP 2011188109 A JP2011188109 A JP 2011188109A
Authority
JP
Japan
Prior art keywords
pixel
image
pixels
luminance
document
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.)
Pending
Application number
JP2010049439A
Other languages
Japanese (ja)
Inventor
Naoki Akihiro
直紀 秋廣
Masahiro Kawashima
正裕 川島
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 JP2010049439A priority Critical patent/JP2011188109A/en
Publication of JP2011188109A publication Critical patent/JP2011188109A/en
Pending legal-status Critical Current

Links

Abstract

<P>PROBLEM TO BE SOLVED: To accurately detect unwanted streaks in an image generated during printing of a document. <P>SOLUTION: An image analysis apparatus includes a step of detecting a luminance gradient direction of each of pixels constituting the image and its strength, based on Y (luminance) data of images of a document, respectively (S105). While switching a pixel to be defined as a pixel of interest sequentially over an entire screen, pixels being present within a predetermined region (e.g., a rectangular region of five pixels respectively in longitudinal and lateral directions) around the pixel of interest are then classified based on the luminance gradient direction of these pixels (S106). When the pixels within the predetermined region are classified eccentrically to a specific direction range group and there is considerable luminance fluctuation in the luminance gradient direction in the pixel of interest, the pixel of interest is determined as an edge pixel (S107). Further, based on a distribution density of pixels determined to correspond to the edge pixel, presence of unwanted streaks in the document is discriminated and moreover, a direction of the unwanted streaks is discriminated based on the luminance gradient direction of the edge pixels (S108). <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、原稿から読み取った画像のデータを解析する装置に係り、特に、原稿の印刷時に生じた画像中のスジを検出する装置に関する。   The present invention relates to an apparatus for analyzing image data read from an original, and more particularly to an apparatus for detecting streaks in an image generated when an original is printed.

特許文献1に記載されているように、ライン型のインクジェットヘッドを備えた印刷装置が知られている。ライン型のインクジェットヘッドは、印刷用紙幅に対応したサイズを有し、印刷装置本体に固定されており、ライン方向(主走査方向)に垂直な方向(副走査方向)に搬送される印刷用紙に対してインクを吐出することで画像を形成する。   As described in Patent Document 1, a printing apparatus including a line-type inkjet head is known. The line-type inkjet head has a size corresponding to the width of the printing paper, is fixed to the printing apparatus main body, and is a printing paper conveyed in a direction (sub-scanning direction) perpendicular to the line direction (main scanning direction). On the other hand, an image is formed by ejecting ink.

図8(a)は、ライン型のインクジェットヘッドの構成の一例と吐出されるインクドットを説明する図である。本図に示すように、解像度を高めるために所定の数単位(本図では3個)で斜めに配置されたノズルがライン方向に多数設けられたノズルユニット240a、240bが張り合わされて1つのブロック230が形成される。そして、図8(b)に示すように、このブロック230がライン方向に複数個(本図では1ブロック〜6ブロックの6個)並べられてライン型のインクジェットヘッド220が形成される。   FIG. 8A is a diagram illustrating an example of the configuration of a line-type inkjet head and ejected ink dots. As shown in this figure, nozzle units 240a and 240b each having a plurality of nozzles arranged obliquely in a predetermined number unit (three in this figure) in the line direction to increase the resolution are bonded together to form one block. 230 is formed. Then, as shown in FIG. 8B, a plurality of the blocks 230 are arranged in the line direction (six blocks of 1 to 6 in the figure) to form a line-type inkjet head 220.

図8(a)に示すように、ノズルユニット240aとノズルユニット240bとは、ライン方向に間隔p1でずらして張り合わされている。間隔p1は、ノズルのピッチdpの1/2となるように設定されており、ライン方向においてノズルユニット240aのノズルとノズルの中間にノズルユニット240bのノズルが配置されるようになっている。これにより、ノズルユニット240aの各ノズルとノズルユニット240bの各ノズルから吐出されるインク滴によって、等間隔で濃度むらのないドットが形成される。   As shown in FIG. 8A, the nozzle unit 240a and the nozzle unit 240b are bonded to each other with a gap p1 in the line direction. The interval p1 is set to be 1/2 of the nozzle pitch dp, and the nozzle of the nozzle unit 240b is arranged between the nozzle of the nozzle unit 240a and the nozzle in the line direction. Thereby, dots with uniform density are formed at equal intervals by the ink droplets ejected from each nozzle of the nozzle unit 240a and each nozzle of the nozzle unit 240b.

インクジェットヘッド220は、工業製品であるから製品毎に多少のバラツキが生じる。このため、図8(c)に示すように、ノズルユニット240aとノズルユニット240bとの間隔p2が、ノズルのピッチdpの1/2よりも広かったり、狭かったりするブロックが存在し得る。このようなブロック230では、ノズルピッチに周期的な偏りが生じる。すなわち、隣り合う2個のノズルがセットとなって、セット内のドットの間隔が狭まり、セット間のドットの間隔が広まることになる。   Since the inkjet head 220 is an industrial product, there is some variation between products. Therefore, as shown in FIG. 8C, there may be a block in which the interval p2 between the nozzle unit 240a and the nozzle unit 240b is wider or narrower than 1/2 of the nozzle pitch dp. In such a block 230, a periodic deviation occurs in the nozzle pitch. That is, two adjacent nozzles form a set, the interval between dots in the set is reduced, and the interval between dots between sets is increased.

図8(d)に示すように、ブロック230がライン方向に対して傾いて配置される場合も起こり得る。このようなブロック230でもノズルピッチに周期的な偏りが生じる。すなわち、隣り合う2個のノズルがセットとなって、セット内のドットの間隔が狭まり、セット間のドットの間隔が広まることになる。   As shown in FIG. 8D, a case where the block 230 is arranged to be inclined with respect to the line direction may occur. Even in such a block 230, a periodic deviation occurs in the nozzle pitch. That is, two adjacent nozzles form a set, the interval between dots in the set is reduced, and the interval between dots between sets is increased.

また、図8(e)に示すように、ノズルユニット240aとノズルユニット240bとの間隔p1が適切であり、ブロック230が適切に配置されている場合でも、ノズル241a、ノズル241bのように、インク吐出量が少ないノズルがあるとき、あるいはブロック230全体としてインク吐出量が少ない場合には、ドットの間隔が広まることになる。   Further, as shown in FIG. 8E, even when the interval p1 between the nozzle unit 240a and the nozzle unit 240b is appropriate and the block 230 is appropriately arranged, the ink can be used like the nozzle 241a and the nozzle 241b. When there is a nozzle with a small discharge amount, or when the ink discharge amount is small as a whole block 230, the interval between dots is widened.

ドットの間隔が空くと、その部分で印刷結果にスジが生じることになる。例えば、図9(a)に示すようなべた塗りの元画像を、ドットの間隔が空いたライン型のインクジェットヘッド220を用いて印刷すると、図9(b)に示すように用紙搬送方向にスジが生じることになる。また、ライン型のインクジェットヘッド以外の印刷装置を用いて印刷を行った場合にも、種々の理由で一方向に不要なスジが生じた印刷結果が得られることがある。   If the dot interval is large, streaks occur in the printing result at that portion. For example, when a solid-painted original image as shown in FIG. 9A is printed using a line-type inkjet head 220 with an interval between dots, as shown in FIG. Will occur. Also, when printing is performed using a printing apparatus other than a line-type inkjet head, a printing result in which unnecessary stripes are generated in one direction for various reasons may be obtained.

特開平8−132645号公報JP-A-8-132645

このようなスジが生じた印刷結果を、複写装置を用いて複写印刷を行う場合、図9(c)に示すように、スジがそのまま、あるいは、強調されて印刷されることになり、複写画質が劣化してしまう。特に、複写装置もライン型のインクジェットヘッドを採用している場合には、図9(d)に示すように、さらにスジが増えてしまうことも起こり得る。また、スジの方向は、印刷方向と読取方向との関係で読み取った画像データの縦方向にも横方向にも発生し得る。スジを目立たなくするために、読み取った画像データを一律に平滑化することも考えられるが、全体的にぼけて劣化した印刷結果が得られてしまう。   When the printing result in which such a streak is generated is copied using a copying apparatus, as shown in FIG. 9C, the streak is printed as it is or emphasized, and the copy image quality is increased. Will deteriorate. In particular, when the copying apparatus employs a line-type ink jet head, as shown in FIG. 9D, streaks may further increase. Further, the streak direction can occur in both the vertical and horizontal directions of the image data read due to the relationship between the printing direction and the reading direction. In order to make the streak inconspicuous, it may be possible to uniformly smooth the read image data. However, an overall blurred and deteriorated print result is obtained.

本発明は前記事情に鑑みなされたものであり、本発明の目的は、原稿の印刷の際に生じた画像の不要なスジを精度良く検出することができる原稿の画像解析装置を提供することにある。   The present invention has been made in view of the above circumstances, and an object of the present invention is to provide a document image analysis apparatus capable of accurately detecting unnecessary streaks in an image generated during printing of a document. is there.

上記目的を達成するために、本発明は、
原稿から読み取った画像のデータを解析して、前記原稿の印刷時に生じた前記画像中のスジを検出する装置(例えば、図1の複写装置10)であって、
前記画像のデータを構成する各画素について、周囲の画素に対する輝度勾配方向をそれぞれ検出する輝度勾配方向検出手段(例えば、図2のS105)と、
前記各画素を、前記輝度勾配方向の分布範囲を複数に分割した複数の方向範囲群のうち、前記各画素の前記輝度勾配方向検出手段により検出された輝度勾配方向が属する方向範囲群にそれぞれ分類する分類手段(例えば、図2のS106)と、
前記データにおける注目画素の位置を順次切り換えつつ、該注目画素を中心とする所定領域内に存在する画素の特定の前記方向範囲群に対する分類偏重度に基づいて、前記注目画素が、前記特定の方向範囲群に代表される特定方向への輝度勾配変化が多いエッジ画素であるか否かを判定する判定手段(例えば、図2のS107)と、
前記データ中の前記判定手段により前記エッジ画素であると判定された各画素の分布密度と前記特定方向とに基づいて、前記原稿の印刷時に生じた前記画像中のスジの有無及びその方向を判別するスジ判別手段(例えば、図2のS108)と、
を備えることを特徴とする。
In order to achieve the above object, the present invention provides:
An apparatus (for example, the copying apparatus 10 in FIG. 1) that analyzes data of an image read from a document and detects streaks in the image generated when the document is printed.
For each pixel constituting the image data, a luminance gradient direction detecting means (for example, S105 in FIG. 2) that detects a luminance gradient direction with respect to surrounding pixels,
Each pixel is classified into a direction range group to which the luminance gradient direction detected by the luminance gradient direction detection unit of each pixel belongs among a plurality of direction range groups obtained by dividing the distribution range of the luminance gradient direction into a plurality of ranges. Classification means to perform (for example, S106 in FIG. 2);
While sequentially switching the position of the pixel of interest in the data, the pixel of interest is in the specific direction based on the classification weight of the pixel existing in the predetermined area centered on the pixel of interest with respect to the specific direction range group. Determination means (for example, S107 in FIG. 2) for determining whether or not the pixel is an edge pixel having a large change in luminance gradient in a specific direction represented by a range group;
Based on the distribution density of each pixel determined to be the edge pixel by the determination means in the data and the specific direction, the presence / absence of a streak in the image generated at the time of printing the document and its direction are determined. Streak determining means (for example, S108 in FIG. 2),
It is characterized by providing.

本発明によれば、各画素の輝度勾配方向に応じて各画素を、輝度勾配方向の分布範囲を複数に分割したいずれかの方向範囲群に分類し、特定の方向範囲群に対する画素の分類偏重度に基づいて、原稿の印刷時に生じた画像の不要なスジのエッジ候補となるエッジ画素を抽出している。そして、抽出したエッジ画素の分布密度に基づいて、原稿の画像中の不要なスジの有無を判別し、また、画素が偏って分類された特定の方向範囲群に対応する特定方向に基づいて、原稿の画像中の不要なスジの方向を判別している。したがって、画像がそのイメージの一部として本来的に有しているスジを、原稿の印刷時に生じたスジと見分ける能力を高めて、原稿の印刷の際に生じた画像の不要なスジを精度良く検出することができる。   According to the present invention, according to the luminance gradient direction of each pixel, each pixel is classified into any one of the direction range groups obtained by dividing the distribution range of the luminance gradient direction into a plurality, and the pixel classification bias with respect to the specific direction range group Based on the degree, edge pixels that are candidates for unnecessary streak edges of the image generated when the document is printed are extracted. Then, based on the distribution density of the extracted edge pixels, the presence or absence of unnecessary streaks in the image of the document is determined, and on the basis of a specific direction corresponding to a specific direction range group in which the pixels are classified biased, The direction of unnecessary stripes in the original image is determined. Therefore, the ability to distinguish the streaks that the image originally has as part of the image from the streaks that occurred during the printing of the original document is enhanced, and the unnecessary streaks of the image that occurred during the printing of the original document can be accurately detected. Can be detected.

また、上記発明において、
前記各画素を注目画素として、該注目画素とその周辺の所定範囲内に存在する画素との平均濃度値を、前記注目画素に対応する濃度値として算出する濃度値算出手段(例えば、図2のS108)をさらに備えており、
前記判定手段は、前記濃度値算出手段により算出された前記濃度値が所定の濃度基準値以上である前記注目画素を対象に、前記判定を行うことを特徴とする。
In the above invention,
With each pixel as a target pixel, a density value calculating unit (for example, FIG. 2) calculates an average density value between the target pixel and a pixel existing within a predetermined range around the target pixel as a density value corresponding to the target pixel. S108)
The determination unit performs the determination on the target pixel whose density value calculated by the density value calculation unit is equal to or greater than a predetermined density reference value.

上記発明によれば、画像の不要なスジのエッジ候補となるエッジ画素の中から、その周辺の画素を含めた平均濃度値が所定の濃度基準値以上であるエッジ画素を抽出して、これを、エッジ画素の分布密度に基づいた画像の不要なスジの有無の判別に用いている。したがって、原稿の印刷時に誤差拡散処理が施されて画像中に発生した網点のような、濃度がある程度高い周囲の画素から孤立した(分布密度の低い)エッジ画素を、画像の不要なスジの有無の判別対象から除外して、原稿の印刷の際に生じた画像の不要なスジをより精度良く検出することができる。   According to the above invention, an edge pixel whose average density value including peripheral pixels is equal to or higher than a predetermined density reference value is extracted from edge pixels that are candidates for unnecessary streak edges in an image, and is extracted. This is used to determine the presence or absence of unnecessary streaks in the image based on the distribution density of edge pixels. Therefore, edge pixels that are isolated from surrounding pixels with a relatively high density (low distribution density), such as halftone dots generated in the image by performing error diffusion processing when the document is printed, By excluding it from the presence / absence determination target, it is possible to detect an unnecessary streak of an image generated at the time of printing a document with higher accuracy.

さらに、上記発明において、
前記スジ判別手段により前記画像中にスジが存在すると判別された場合に、前記エッジ画素のうち、前記スジの方向が属する前記方向範囲群を前記特定の方向範囲群とする前記エッジ画素に対して、平滑化処理を行う平滑化処理手段又はステップ(例えば、図2のS109)をさらに備える、
ことを特徴とする。
Furthermore, in the above invention,
When it is determined by the streak determining means that a streak exists in the image, among the edge pixels, the edge pixel in which the direction range group to which the streak direction belongs belongs to the specific direction range group. , Further comprising a smoothing processing means or step (for example, S109 in FIG. 2) for performing the smoothing processing,
It is characterized by that.

上記発明によれば、原稿の印刷時に生じた画像中の不要なスジが存在すると判別された場合に、その不要なスジを構成するエッジ画素に対して平滑化処理を施すことになる。したがって、画像中の不要なスジがなくなるように、又は、目立たなくなるように加工した画像が、原稿の複写によって得られるようになる。このため、原稿の印刷の際に生じた画像の不要なスジを精度良く検出した上で、品質の高い複写画像を原稿の画像から得られるようにすることができる。   According to the above invention, when it is determined that there is an unnecessary streak in the image generated at the time of printing the document, the smoothing process is performed on the edge pixels constituting the unnecessary streak. Accordingly, an image processed so as to eliminate unnecessary stripes in the image or to be inconspicuous can be obtained by copying a document. For this reason, it is possible to obtain a high-quality copy image from the original image after accurately detecting unnecessary streaks in the image generated when the original is printed.

本発明によれば、原稿の印刷の際に生じた画像の不要なスジを精度良く検出することができる。   According to the present invention, it is possible to accurately detect unnecessary streaks in an image generated when a document is printed.

本発明による画像形成装置の一実施形態に係る複写装置の構成を示すブロック図である。1 is a block diagram illustrating a configuration of a copying apparatus according to an embodiment of an image forming apparatus according to the present invention. 複写処理について説明するフローチャートである。It is a flowchart explaining a copy process. 各画素の輝度勾配方向の検出について説明するための図である。It is a figure for demonstrating the detection of the luminance gradient direction of each pixel. 各画素の輝度勾配方向の検出について説明するための図である。It is a figure for demonstrating the detection of the luminance gradient direction of each pixel. 各画素の輝度勾配方向の検出について説明するための図である。It is a figure for demonstrating the detection of the luminance gradient direction of each pixel. 各画素の分類について説明するための図である。It is a figure for demonstrating the classification | category of each pixel. 平滑化処理について説明するための図である。It is a figure for demonstrating a smoothing process. ライン型のインクジェットヘッドを説明する図である。It is a figure explaining a line type ink jet head. 印刷の際に不要なスジが生じた原稿について説明する図である。FIG. 5 is a diagram for explaining a document in which unnecessary streaks are generated during printing.

以下、本発明の実施形態について図面を参照しながら説明する。図1は、本発明による画像解析装置の一実施形態に係る複写装置の構成を示すブロック図である。図1中引用符号10で示す本実施形態の複写装置10は、画像読取部110と印刷機構部120とを備えており、画像読取部110で原稿から読み取った画像のデータに基づいて印刷機構部120で印刷を行うことで原稿の複写を行うことができる。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing a configuration of a copying apparatus according to an embodiment of an image analysis apparatus according to the present invention. 1 includes an image reading unit 110 and a printing mechanism unit 120, and a printing mechanism unit based on image data read from a document by the image reading unit 110. A document can be copied by printing at 120.

画像読取部110は、原稿を載置するための原稿台、CCD等の受光素子をライン上に並べたラインセンサ、光源、ラインセンサを搭載したキャリッジ、キャリッジを搬送するモータ等を備えている。印刷機構部120は、印刷エンジン、給排紙機構等を備えている。本実施形態における印刷機構部120が備える印刷エンジンは、ライン型のインクジェット方式を採用しているものとする。本発明は、ライン型のインクジェット方式で印刷した原稿を、ライン型のインクジェット方式で複写印刷する場合に特に効果的に適用することができる。ただし、本発明の複写装置は、ライン型のインクジェット方式に限られず、シリアル型のインクジェット方式、レーザ方式等種々の方式を用いることができる。   The image reading unit 110 includes a document table on which a document is placed, a line sensor in which light receiving elements such as a CCD are arranged on a line, a light source, a carriage on which the line sensor is mounted, a motor for transporting the carriage, and the like. The printing mechanism unit 120 includes a print engine, a paper supply / discharge mechanism, and the like. It is assumed that the print engine included in the printing mechanism unit 120 in this embodiment employs a line-type inkjet method. The present invention can be applied particularly effectively when a document printed by a line-type ink jet method is copied and printed by a line-type ink jet method. However, the copying apparatus of the present invention is not limited to the line type ink jet method, and various types such as a serial type ink jet method and a laser method can be used.

また、複写装置10は、ユーザインタフェース部130と制御部140とを備えている。ユーザインタフェース部130は、液晶表示装置、操作パネル等により構成され、ユーザから各種操作を受け付けたり、複写装置10に関する各種情報を表示したりする。制御部140は、CPU・メモリ・画像処理装置・通信処理装置等により構成され、後述するような複写装置10における各種処理の制御を行う。   Further, the copying apparatus 10 includes a user interface unit 130 and a control unit 140. The user interface unit 130 includes a liquid crystal display device, an operation panel, and the like, and accepts various operations from the user and displays various information related to the copying apparatus 10. The control unit 140 includes a CPU, a memory, an image processing device, a communication processing device, and the like, and controls various processes in the copying apparatus 10 as will be described later.

図1に示すように本実施形態では、制御部140に、読取制御部141、特殊複写判定部142、画像処理部143、印刷制御部144、記憶部145が構成される。読取制御部141は、画像読取部110における画像読取処理を制御する。   As shown in FIG. 1, in this embodiment, the control unit 140 includes a reading control unit 141, a special copy determination unit 142, an image processing unit 143, a print control unit 144, and a storage unit 145. The reading control unit 141 controls image reading processing in the image reading unit 110.

特殊複写判定部142は、画像読取部110で画像データを読み取った原稿が、所定の特性を有した印刷物、具体的には、一方向にスジが生じている印刷物であるかどうかを判定する。   The special copy determination unit 142 determines whether the document whose image data has been read by the image reading unit 110 is a printed material having a predetermined characteristic, specifically, a printed material in which streaks are generated in one direction.

具体的には、読み取った画像データから輝度データを抽出し、抽出した輝度データに基づいて、読み取った画像データに含まれる所定条件を満たすエッジ画素を抽出し、抽出結果に応じて、原稿にスジが含まれているかどうかと、含まれているスジの方向とを判定する。エッジ画素の抽出は、各画素の輝度勾配方向とその変化の多さに基づいて行うことができる。また、原稿にスジが含まれているかどうかは、周辺の画素を含めた平均輝度値が所定の濃度基準値以上であるエッジ画素の連続性に基づいて行うことができる。   Specifically, luminance data is extracted from the read image data, edge pixels satisfying a predetermined condition included in the read image data are extracted based on the extracted luminance data, and a streak is printed on the document according to the extraction result. And whether the streak direction is included is determined. Edge pixel extraction can be performed based on the luminance gradient direction of each pixel and the number of changes. Further, whether or not a streak is included in the document can be determined based on the continuity of edge pixels whose average luminance value including peripheral pixels is equal to or higher than a predetermined density reference value.

原稿の画像にスジが生じている印刷物は、例えば、ライン型のインクジェット方式の印刷装置で印刷された印刷物が代表的である。このようなスジは原稿の印刷の際に生じるものであり本来不要なものである。   A printed material on which an image of a document has streaks is typically a printed material printed by a line-type ink jet printing apparatus. Such a streak is generated when a document is printed and is essentially unnecessary.

画像処理部143は、画像読取部110で読み取ったRGB形式の画像データをCMYK形式に変換するとともに、必要な画像処理や、中間調処理等を行う。また、画像処理部143は、特殊複写用処理部146を含んでいる。   The image processing unit 143 converts the RGB format image data read by the image reading unit 110 into the CMYK format, and performs necessary image processing, halftone processing, and the like. The image processing unit 143 includes a special copy processing unit 146.

特殊複写用処理部146は、特殊複写判定部142が所定の特性を有した印刷物であると判定した場合に、その画像データに対してスジを目立たなくする処理を行う。具体的には、例えば縦方向のスジが含まれていると判定された場合に、抽出した輝度データに対して横方向の平滑化処理を行い、例えば横方向のスジが含まれていると判定された場合に、抽出した輝度データに対して縦方向の平滑化処理を行って前記読み取った画像データを補正する。   The special copy processing unit 146 performs processing for making the image data inconspicuous when the special copy determination unit 142 determines that the printed matter has predetermined characteristics. Specifically, for example, when it is determined that vertical streaks are included, the horizontal smoothing process is performed on the extracted luminance data, and for example, it is determined that horizontal streaks are included. In such a case, the read image data is corrected by performing vertical smoothing on the extracted luminance data.

印刷制御部144は、印刷機構部120における印刷処理を制御する。記憶部145は、メモリにより構成され画像データ、印刷データ等を格納したり、CPUの作業領域として用いられる。   The print control unit 144 controls printing processing in the printing mechanism unit 120. The storage unit 145 is configured by a memory and stores image data, print data, and the like, and is used as a work area for the CPU.

次に、本実施形態の複写処理について図2のフローチャートを参照して説明する。複写処理では、まず、画像読取部110が原稿台に載置された原稿の画像をRGB形式の画像データとして読み取る(S101)。なお、読取に先立ち、ユーザインタフェース部130を介して、複写処理の詳細な設定、例えば、拡大・縮小、複写品質、部数等の指定を受け付けるようにしてもよい。   Next, the copying process of this embodiment will be described with reference to the flowchart of FIG. In the copying process, first, the image reading unit 110 reads an image of a document placed on the document table as image data in RGB format (S101). Prior to reading, detailed settings for copy processing such as enlargement / reduction, copy quality, number of copies, and the like may be received via the user interface unit 130.

読み取った画像はRGB形式のまま記憶部145に格納する(S102)。次いで、特殊複写判定部142が、読み取った原稿が一方向にスジが生じている印刷物であるかどうかを判定する。このための前準備として、RGB形式の画像データをYCbCr形式に変換する(S103)。ここで、YCbCr形式は、色をY(輝度)とCbCr(色差)で表現する形式である。一般に、印刷の際に生じる不要なスジは濃度の濃い部分(輝度の低い部分)で目立つ。このため、本実施形態では、RGB形式の画像データをYCbCr形式に変換し、判定にY(輝度)を用いるようにしている。   The read image is stored in the storage unit 145 in the RGB format (S102). Next, the special copy determination unit 142 determines whether or not the read original is a printed matter in which streaks are generated in one direction. As preparation for this, image data in RGB format is converted to YCbCr format (S103). Here, the YCbCr format is a format in which colors are expressed by Y (luminance) and CbCr (color difference). In general, unnecessary streaks that occur during printing are conspicuous in a portion having a high density (a portion having a low luminance). For this reason, in the present embodiment, RGB format image data is converted to YCbCr format, and Y (luminance) is used for determination.

なお、RGB形式からYCbCr形式への変換は、例えば、下記(式1)、
Y=(77×R+150×G+29×B)/256
Cb=(−43×R−+85×G+128×B)/256
Cr=(128×R−107×G−21×B)/256
(以上、式1)
に従って行うことができる。ここでは、RGB各8ビットの場合を示している。ただし、他の方法を用いてYCbCr形式に変換してもよい。また、Y(輝度)が取得できれば他の色表現形式であってもよい。例えば、HSV形式やL表色系に変換してV(明度)やL(明度)をY(輝度)の代わりに用いてもよい。
The conversion from the RGB format to the YCbCr format is, for example, the following (formula 1),
Y = (77 × R + 150 × G + 29 × B) / 256
Cb = (− 43 × R− + 85 × G + 128 × B) / 256
Cr = (128 * R-107 * G-21 * B) / 256
(Equation 1)
Can be done according to. Here, a case of 8 bits for each of RGB is shown. However, you may convert into YCbCr format using another method. Further, as long as Y (luminance) can be acquired, other color expression formats may be used. For example, V (lightness) or L * (lightness) may be used instead of Y (luminance) after conversion to the HSV format or L * a * b * color system.

YCbCr形式に変換すると、Y(輝度)データを抽出する(S104)。すなわち、スジに関する処理は、Y(輝度)データを対象に行い、CbCr(色差)データに対しては処理を行わない。そして、抽出したY(輝度)データに基づいて、原稿に不要なスジが存在するか否かの判定(S105〜S108)を行う。   After conversion to the YCbCr format, Y (luminance) data is extracted (S104). That is, the process related to stripes is performed on Y (luminance) data, and is not performed on CbCr (color difference) data. Then, based on the extracted Y (luminance) data, it is determined whether or not an unnecessary streak exists in the document (S105 to S108).

具体的には、まず、画像を構成する各画素について、輝度勾配方向とその強さをそれぞれ検出する(S105)。この検出を行うためには、まず、輝度勾配方向を検出する対象の画素(Ix,Iy)について、画像の横方向(x方向)及び縦方向(y方向)の輝度勾配(横方向勾配、縦方向勾配)を求める。   Specifically, first, a luminance gradient direction and its intensity are detected for each pixel constituting the image (S105). In order to perform this detection, first, with respect to a pixel (Ix, Iy) whose luminance gradient direction is to be detected, the luminance gradient (lateral gradient, vertical direction) in the horizontal direction (x direction) and vertical direction (y direction) of the image. Directional gradient).

ここで、横方向勾配TZ(Ix,Iy)は、対象画素(Ix,Iy)の横方向(x方向)における両隣の周辺画素(Ix−1,Iy)、(Ix+1,Iy)のY(輝度)の差値(絶対値)によって求める。また、縦方向勾配TH(Ix,Iy)は、対象画素(Ix,Iy)の縦方向(y方向)における両隣の周辺画素(ix,Iy−1)、(Ix,Iy+1)のY(輝度)の差値(絶対値)によって求める。これを式で表すと、下記(式2)、
TZ(Ix,Iy)=|Y(Ix+1,Iy)−Y(Ix−1,Iy)|
TH(Ix,Iy)=|Y(Ix,Iy+1)−Y(Ix,Iy−1)|
(以上、式2)
となる。
Here, the horizontal gradient TZ (Ix, Iy) is Y (luminance) of neighboring pixels (Ix-1, Iy) and (Ix + 1, Iy) on both sides in the horizontal direction (x direction) of the target pixel (Ix, Iy). ) Difference value (absolute value). The vertical gradient TH (Ix, Iy) is the Y (luminance) of the neighboring pixels (ix, Iy−1) and (Ix, Iy + 1) on both sides in the vertical direction (y direction) of the target pixel (Ix, Iy). It is calculated by the difference value (absolute value). This is expressed by the following formula (Formula 2),
TZ (Ix, Iy) = | Y (Ix + 1, Iy) −Y (Ix−1, Iy) |
TH (Ix, Iy) = | Y (Ix, Iy + 1) −Y (Ix, Iy−1) |
(Equation 2)
It becomes.

そして、対象画素(Ix,Iy)の輝度勾配方向D(Ix,Iy)は、上述のように求めた縦方向勾配TH(Ix,Iy)と横方向勾配TZ(Ix,Iy)との比(TH(Ix,Iy)/TZ(Ix,Iy))のtan−1を求め、これに、180゜/πを乗じて検出する。即ち、対象画素(Ix,Iy)の輝度勾配方向D(Ix,Iy)は、下記(式3)、
D(Ix,Iy)=tan−1{TH(Ix,Iy)/TZ(Ix,Iy)}
×(180゜/π) (式3)
となる。
The luminance gradient direction D (Ix, Iy) of the target pixel (Ix, Iy) is a ratio of the vertical gradient TH (Ix, Iy) and the horizontal gradient TZ (Ix, Iy) obtained as described above ( Tan −1 of TH (Ix, Iy) / TZ (Ix, Iy)) is obtained, and this is detected by multiplying it by 180 ° / π. That is, the luminance gradient direction D (Ix, Iy) of the target pixel (Ix, Iy) is expressed by the following (formula 3):
D (Ix, Iy) = tan −1 {TH (Ix, Iy) / TZ (Ix, Iy)}
× (180 ° / π) (Formula 3)
It becomes.

また、対象画素(Ix,Iy)の輝度勾配方向D(Ix,Iy)における輝度変化の大きさを示す輝度勾配の強さG(Ix,Iy)は、上述のように求めた縦方向勾配TH(Ix,Iy)と横方向勾配TZ(Ix,Iy)との二乗和平方根によって求める。即ち、対象画素(Ix,Iy)の輝度勾配方向D(Ix,Iy)の強さG(Ix,Iy)は、下記(式4)、
G(Ix,Iy)=√{TH(Ix,Iy)2 +TZ(Ix,Iy)2 }
(式4)
となる。
Further, the intensity G of the luminance gradient (Ix, Iy) indicating the magnitude of the luminance change in the luminance gradient direction D (Ix, Iy) of the target pixel (Ix, Iy) is the vertical gradient TH obtained as described above. It is obtained by the square sum of squares of (Ix, Iy) and the lateral gradient TZ (Ix, Iy). That is, the intensity G (Ix, Iy) of the luminance gradient direction D (Ix, Iy) of the target pixel (Ix, Iy) is expressed by the following (formula 4):
G (Ix, Iy) = √ {TH (Ix, Iy) 2 + TZ (Ix, Iy) 2}
(Formula 4)
It becomes.

例えば、図3に示すような横方向のスジが画像に存在する場合、対象画素(Ix,Iy)の輝度勾配方向D(Ix,Iy)は、図中網掛けで示す黒ベタ部分の輝度値が20、図中白抜きで示すスジ部分の輝度値が200であるとすると、上記(式3)から、
D(Ix,Iy)=tan−1{(200−20)/(20−20)}
×(180゜/π)
=90°
となり、画像の縦方向(y方向)に輝度勾配が存在することを示す「90°」が輝度勾配方向D(Ix,Iy)として求まる。
For example, when a horizontal streak as shown in FIG. 3 exists in the image, the luminance gradient direction D (Ix, Iy) of the target pixel (Ix, Iy) is the luminance value of the black solid portion indicated by shading in the figure. Is 20 and the brightness value of the streak portion indicated by white in the figure is 200, from the above (Equation 3),
D (Ix, Iy) = tan −1 {(200−20) / (20−20)}
× (180 ° / π)
= 90 °
Thus, “90 °” indicating that a luminance gradient exists in the vertical direction (y direction) of the image is obtained as the luminance gradient direction D (Ix, Iy).

また、この場合の対象画素(Ix,Iy)の輝度勾配方向D(Ix,Iy)における輝度勾配の強さG(Ix,Iy)は、上記(式4)から、
G(Ix,Iy)=√{(200−20)2 +(20−20)2 }
=180
となる。
In addition, the intensity G (Ix, Iy) of the luminance gradient in the luminance gradient direction D (Ix, Iy) of the target pixel (Ix, Iy) in this case is obtained from the above (Expression 4).
G (Ix, Iy) = √ {(200−20) 2 + (20−20) 2}
= 180
It becomes.

一方、図4に示すような縦方向のスジが画像に存在する場合、対象画素(Ix,Iy)の輝度勾配方向D(Ix,Iy)は、図中網掛けで示す黒ベタ部分の輝度値が20、図中白抜きで示すスジ部分の輝度値が200であるとすると、上記(式3)から、
D(Ix,Iy)=tan−1{(20−20)/(200−20)}
×(180゜/π)
=0°
となり、画像の横方向(x方向)に輝度勾配が存在することを示す「0°」が輝度勾配方向D(Ix,Iy)として求まる。
On the other hand, when vertical streaks as shown in FIG. 4 are present in the image, the luminance gradient direction D (Ix, Iy) of the target pixel (Ix, Iy) is the luminance value of the black solid portion indicated by shading in the figure. Is 20 and the brightness value of the streak portion indicated by white in the figure is 200, from the above (Equation 3),
D (Ix, Iy) = tan −1 {(20-20) / (200-20)}
× (180 ° / π)
= 0 °
Thus, “0 °” indicating that a luminance gradient exists in the horizontal direction (x direction) of the image is obtained as the luminance gradient direction D (Ix, Iy).

また、この場合の対象画素(Ix,Iy)の輝度勾配方向D(Ix,Iy)における輝度勾配の強さG(Ix,Iy)は、上記(式4)から、
G(Ix,Iy)=√{(20−20)2 +(200−20)2 }
=180
となる。
In addition, the intensity G (Ix, Iy) of the luminance gradient in the luminance gradient direction D (Ix, Iy) of the target pixel (Ix, Iy) in this case is obtained from the above (Expression 4).
G (Ix, Iy) = √ {(20−20) 2+ (200−20) 2}
= 180
It becomes.

さらに、図5に示すような斜め45゜方向のスジが画像に存在する場合、対象画素(Ix,Iy)の輝度勾配方向D(Ix,Iy)は、図中網掛けで示す黒ベタ部分の輝度値が20、図中白抜きで示すスジ部分の輝度値が200であるとすると、上記(式3)から、
D(Ix,Iy)=tan−1{(200−20)/(200−20)}
×(180゜/π)
=45°
となり、画像の斜め45゜方向に輝度勾配が存在することを示す「45°」が輝度勾配方向D(Ix,Iy)として求まる。
Furthermore, when a streak in the oblique 45 ° direction as shown in FIG. 5 is present in the image, the luminance gradient direction D (Ix, Iy) of the target pixel (Ix, Iy) is the black solid portion indicated by shading in the figure. Assuming that the luminance value is 20 and the luminance value of the streak portion indicated by white in the figure is 200, from the above (Equation 3),
D (Ix, Iy) = tan −1 {(200-20) / (200-20)}
× (180 ° / π)
= 45 °
Thus, “45 °” indicating that there is a luminance gradient in an oblique 45 ° direction of the image is obtained as the luminance gradient direction D (Ix, Iy).

また、この場合の対象画素(Ix,Iy)の輝度勾配方向D(Ix,Iy)における輝度勾配の強さG(Ix,Iy)は、上記(式4)から、
G(Ix,Iy)=√{(200−20)2 +(200−20)2 }
≒254
となる。
In addition, the intensity G (Ix, Iy) of the luminance gradient in the luminance gradient direction D (Ix, Iy) of the target pixel (Ix, Iy) in this case is obtained from the above (Expression 4).
G (Ix, Iy) = √ {(200−20) 2 + (200−20) 2}
≒ 254
It becomes.

次に、図2に示すように、各画素をその輝度勾配方向D(Ix,Iy)に基づいて分類する(S106)。この分類とは、図6に示す注目画素(Ix,Iy)の位置を、画面の全体に亘って横方向及び縦方向に順次切り換えつつ、注目画素(Ix,Iy)を中心とする所定領域内(本図では縦横5画素ずつの矩形領域)に存在する各画素(本図では25画素)を、それらの各画素の輝度勾配方向D(Ix,Iy)に基づいて分類することを言う。この分類は、輝度勾配方向D(Ix,Iy)の選択範囲である0°〜90゜を4つの方向範囲群(方向範囲群1:0°〜22.5°未満、方向範囲群2:22.5°〜45゜未満、方向範囲群3:45゜〜67.5°未満、方向範囲群4:67.5°〜90゜)に分割し、この4つのうちいずれか該当する方向範囲群に、所定領域内の各画素を仕分けることによって行う。   Next, as shown in FIG. 2, each pixel is classified based on its luminance gradient direction D (Ix, Iy) (S106). In this classification, the position of the pixel of interest (Ix, Iy) shown in FIG. 6 is sequentially switched in the horizontal and vertical directions over the entire screen, and within a predetermined area centered on the pixel of interest (Ix, Iy). This means that each pixel (25 pixels in this figure) existing in the rectangular area (vertical area of 5 pixels vertically and horizontally in this figure) is classified based on the luminance gradient direction D (Ix, Iy) of each pixel. In this classification, the selection range of the luminance gradient direction D (Ix, Iy) is changed from 0 ° to 90 ° into four direction range groups (direction range group 1: 0 to less than 22.5 °, direction range group 2:22. .5 ° to less than 45 °, direction range group 3: 45 ° to less than 67.5 °, direction range group 4: 67.5 ° to 90 °), and any of these four direction range groups In addition, each pixel in the predetermined area is sorted.

続いて、図2に示すように、各注目画素(Ix,Iy)についての所定領域内に存在する画素の分類結果を用いて、各注目画素(Ix,Iy)が画像の不要なスジのエッジ候補となるエッジ画素に該当するか否かを判定する(S107)。この判定は、原則的に、各注目画素(Ix,Iy)が特定の輝度勾配方向において輝度勾配が大きく変化しているかどうかによって行われる。   Next, as shown in FIG. 2, by using the classification result of the pixels existing in the predetermined area for each pixel of interest (Ix, Iy), each pixel of interest (Ix, Iy) has an edge of an unnecessary line in the image. It is determined whether it corresponds to a candidate edge pixel (S107). This determination is made in principle depending on whether or not the luminance gradient of each pixel of interest (Ix, Iy) has changed significantly in a specific luminance gradient direction.

上記の判定に当たっては、各注目画素(Ix,Iy)を中心とする所定領域内の画素が、特定の方向範囲群に偏って分類されているかどうかと、各注目画素(Ix,Iy)において輝度勾配方向D(Ix,Iy)に大きな輝度の変動があるかどうかとが確認される。この確認に当たっては、特定の方向範囲群が他の方向範囲群よりも画素の分類数で優位な差を有していることを保証するために、画素の分類数に対して所定の閾値Th1を使用する。また、注目画素(Ix,Iy)において輝度勾配方向D(Ix,Iy)に大きな輝度の変動があることを保証するために、輝度勾配方向D(Ix,Iy)における輝度勾配の強さG(Ix,Iy)に対して所定の閾値Th2を使用する。   In the above determination, whether or not the pixels in the predetermined area centered on each pixel of interest (Ix, Iy) are classified in a specific direction range group and the luminance at each pixel of interest (Ix, Iy) It is confirmed whether there is a large luminance variation in the gradient direction D (Ix, Iy). In this confirmation, in order to ensure that a specific direction range group has a dominant difference in the number of pixel classifications over other direction range groups, a predetermined threshold Th1 is set for the number of pixel classifications. use. Further, in order to ensure that there is a large luminance variation in the luminance gradient direction D (Ix, Iy) at the target pixel (Ix, Iy), the intensity G of the luminance gradient in the luminance gradient direction D (Ix, Iy) ( A predetermined threshold Th2 is used for Ix, Iy).

続いて、以下に具体的なケースを考える。ここでは、方向範囲群1(特定の方向範囲群)に分類された所定領域内の画素の個数がN1、方向範囲群4に分類された所定領域内の画素の個数がN4であるものとする。   Next, a specific case is considered below. Here, it is assumed that the number of pixels in the predetermined area classified into the direction range group 1 (specific direction range group) is N1, and the number of pixels in the predetermined area classified into the direction range group 4 is N4. .

まず、方向範囲群1を特定の方向範囲群としてその分布の偏りを分布偏重度として判定するケースを考える。このケースでは、以下の(条件1)、
N1>N4×Th1 かつ G(Ix,Iy)>Th2 (条件1)
が満たされたならば、画面の縦方向(y方向)における輝度の変化が横方向(x方向)における輝度の変化に比べて多く、かつ、注目画素(Ix,Iy)において輝度勾配方向D(Ix,Iy)の輝度勾配の強さG(Ix,Iy)が大きく変動している画素であるということになる。
First, consider a case where the direction range group 1 is set as a specific direction range group and the distribution bias is determined as the distribution weight. In this case, the following (condition 1),
N1> N4 × Th1 and G (Ix, Iy)> Th2 (Condition 1)
Is satisfied, the luminance change in the vertical direction (y direction) of the screen is larger than the luminance change in the horizontal direction (x direction), and the luminance gradient direction D (( This means that the intensity gradient intensity G (Ix, Iy) of Ix, Iy) varies greatly.

この(条件1)が満たされた場合、その注目画素(Ix,Iy)は、画面の縦方向(y方向)における輝度勾配変化が大きいので、エッジ画素であると判定される。そして、エッジ画素に該当するこの注目画素(Ix,Iy)には、画面の縦方向(y方向)における輝度勾配変化が大きいことを示す「−1」の値が、エッジ画素を示す関数F(Ix,Iy)の値として設定される。この値「−1」は、エッジ画素に該当する注目画素(Ix,Iy)が分類された方向範囲群1(0°〜22.5°未満)に対応する代表的な輝度勾配方向(特定方向)が、画面の縦方向(y方向)であることを示している。   When this (Condition 1) is satisfied, the pixel of interest (Ix, Iy) is determined to be an edge pixel because the luminance gradient change in the vertical direction (y direction) of the screen is large. Then, in the target pixel (Ix, Iy) corresponding to the edge pixel, a value “−1” indicating that the luminance gradient change in the vertical direction (y direction) of the screen is large is a function F ( Ix, Iy). This value “−1” is a representative luminance gradient direction (specific direction) corresponding to the direction range group 1 (0 ° to less than 22.5 °) in which the target pixel (Ix, Iy) corresponding to the edge pixel is classified. ) Indicates the vertical direction (y direction) of the screen.

次に、方向範囲群4を特定の方向範囲群としてその分布の偏りを分布偏重度として判定するケースを考える。このケースでは、以下の(条件2)、
N4>N1×Th1 かつ G(Ix,Iy)>Th2 (条件2)
が満たされたならば、画面の横方向(x方向)における輝度の変化が縦方向(y方向)における輝度の変化に比べて多く、かつ、注目画素(Ix,Iy)において輝度勾配方向D(Ix,Iy)の輝度勾配の強さG(Ix,Iy)が大きく変動している画素であるということになる。
Next, a case is considered in which the direction range group 4 is set as a specific direction range group and the distribution bias is determined as the distribution weight. In this case, the following (condition 2),
N4> N1 × Th1 and G (Ix, Iy)> Th2 (Condition 2)
Is satisfied, the luminance change in the horizontal direction (x direction) of the screen is larger than the luminance change in the vertical direction (y direction), and the luminance gradient direction D (( This means that the intensity gradient intensity G (Ix, Iy) of Ix, Iy) varies greatly.

この(条件2)が満たされた場合、その注目画素(Ix,Iy)は、画面の横方向(x方向)における輝度勾配変化が大きいので、エッジ画素であると判定される。そして、エッジ画素に該当するこの注目画素(Ix,Iy)には、画面の横方向(x方向)における輝度勾配変化が大きいことを示す「1」の値が、エッジ画素を示す関数F(Ix,Iy)の値として設定される。この値「1」は、エッジ画素に該当する注目画素(Ix,Iy)が分類された方向範囲群4(67.5°〜90゜)に対応する代表的な輝度勾配方向(特定方向)が、画面の横方向(x方向)であることを示している。   When this (condition 2) is satisfied, the pixel of interest (Ix, Iy) is determined to be an edge pixel because the change in the luminance gradient in the horizontal direction (x direction) of the screen is large. Then, in this target pixel (Ix, Iy) corresponding to the edge pixel, a value of “1” indicating that the luminance gradient change in the horizontal direction (x direction) of the screen is large is a function F (Ix indicating the edge pixel. , Iy). This value “1” indicates a representative luminance gradient direction (specific direction) corresponding to the direction range group 4 (67.5 ° to 90 °) in which the target pixel (Ix, Iy) corresponding to the edge pixel is classified. , Indicating the horizontal direction (x direction) of the screen.

ところで、上記の(条件1)や(条件2)が満たされてエッジ画素であると判定された注目画素(Ix,Iy)の中には、実際には、原稿の印刷時に画像のデータに対して誤差拡散処理を施したために生じた網点が含まれる場合がある。つまり、網点は周辺の網点から孤立していることがあり、その場合には、網点とその周囲の白抜き部分との輝度差が、輝度勾配として捉えられることになる。   By the way, among the target pixels (Ix, Iy) that are determined to be edge pixels when the above (Condition 1) and (Condition 2) are satisfied, actually, the image data at the time of printing the document is not included. In some cases, halftone dots generated by performing error diffusion processing are included. That is, the halftone dots may be isolated from the surrounding halftone dots, and in this case, the luminance difference between the halftone dots and the surrounding white portions is regarded as a luminance gradient.

したがって、このような周囲の網点から孤立した網点を、エッジ画素から排除するように構成することもできる。その場合には、注目画素(Ix,Iy)とその周辺の所定範囲内に存在する画素との平均濃度値Iarea(Ix,Iy)を、所定の濃度基準値Th_densと比較する。そして、以下の(条件3)、
Iarea(Ix,Iy)<Th_dens (条件3)
の関係が成立する注目画素(Ix,Iy)については、上記の(条件1)や(条件2)が満たされるか否かに拘わらず、エッジ画素でないことを意味する「0」の値を、関数F(Ix,Iy)の値として設定する。
Therefore, it is possible to exclude halftone dots isolated from the surrounding halftone dots from the edge pixels. In that case, the average density value Iarea (Ix, Iy) of the pixel of interest (Ix, Iy) and the pixels existing in the surrounding predetermined range is compared with a predetermined density reference value Th_dens. And the following (Condition 3),
Iarea (Ix, Iy) <Th_dens (Condition 3)
For the pixel of interest (Ix, Iy) for which the above relationship is established, a value of “0”, which means that the pixel is not an edge pixel, regardless of whether the above (Condition 1) or (Condition 2) is satisfied, Set as value of function F (Ix, Iy).

なお、ここでは、輝度勾配方向が横方向(x方向)である画素が分類される方向範囲群1(0°〜22.5°未満)や、輝度勾配方向が縦方向(y方向)である画素が分類される方向範囲群4(67.5°〜90゜)に、他の方向範囲群よりも偏って画素が数多く分類されているか否か(画素の分類数が多いか否か)を確認した。   Here, the direction range group 1 (0 ° to less than 22.5 °) in which pixels whose luminance gradient direction is the horizontal direction (x direction) is classified, and the luminance gradient direction is the vertical direction (y direction). Whether or not a number of pixels are classified in the direction range group 4 (67.5 ° to 90 °) in which the pixels are classified more than the other direction range groups (whether the number of pixel classifications is large). confirmed.

しかし、他の方向範囲群2(22.5°〜45゜未満)や方向範囲群3(45゜〜67.5°未満)についても同様に、他の方向範囲群よりも偏って画素が数多く分類されているか否か(画素の分類数が多いか否か)を確認する構成としてもよい。   However, in the other direction range group 2 (22.5 ° to less than 45 °) and the direction range group 3 (45 ° to less than 67.5 °), the number of pixels is also more biased than the other direction range group. It is good also as a structure which confirms whether it is classified (whether there are many pixel classification numbers).

そのように構成する場合は、方向範囲群2(22.5°〜45゜未満)や方向範囲群3(45゜〜67.5°未満)にそれぞれ分類された画素の個数N2,N3と閾値Th1、及び、注目画素(Ix,Iy)の輝度勾配方向D(Ix,Iy)における輝度勾配の強さG(Ix,Iy)と閾値Th2を用いて、上述した(条件1)や(条件2)と同様の条件を満たすかどうかを確認すればよい。   In such a configuration, the numbers N2 and N3 of pixels and threshold values classified into the direction range group 2 (22.5 ° to less than 45 °) and the direction range group 3 (45 ° to less than 67.5 °), respectively. Using the intensity gradient strength G (Ix, Iy) and the threshold value Th2 in Th1 and the luminance gradient direction D (Ix, Iy) of the target pixel (Ix, Iy), the above (condition 1) and (condition 2) ).

このときにも、周囲の網点から孤立した網点を、エッジ画素から排除するように構成することもできる。その場合には、注目画素(Ix,Iy)とその周辺の所定範囲内に存在する画素との平均濃度値Iarea(Ix,Iy)と所定の濃度基準値Th_densとを用いて、上述した(条件3)を満たすかどうかを確認すればよい。そして、この(条件3)満たす注目画素(Ix,Iy)については、方向範囲群2や方向範囲群3についてのエッジ画素であると判定されたエッジ画素であっても、エッジ画素でないことを意味する「0」の値を関数F(Ix,Iy)の値として設定すればいよい。   Also at this time, it is possible to exclude halftone dots isolated from the surrounding halftone dots from the edge pixels. In this case, the above-described (conditions) are used by using the average density value Iarea (Ix, Iy) of the pixel of interest (Ix, Iy) and the pixels existing in the surrounding predetermined range and the predetermined density reference value Th_dens. 3) It should be confirmed whether it satisfies. The pixel of interest (Ix, Iy) that satisfies this (Condition 3) is not an edge pixel even if it is determined to be an edge pixel for the direction range group 2 or the direction range group 3. The value “0” to be set may be set as the value of the function F (Ix, Iy).

次に、図2に示すように、原稿から読み取った画像が、印刷の際に生じる不要なスジを含むものであるかどうかの判断を行う(S108)。この判断は、以下に示すように自動に行うようにしてもよいし、ユーザインタフェース部130を介してユーザから設定を受け付けることで判断してもよい。   Next, as shown in FIG. 2, it is determined whether or not the image read from the document includes unnecessary stripes generated during printing (S108). This determination may be performed automatically as described below, or may be determined by receiving settings from the user via the user interface unit 130.

自動的に判断する場合には、まず、S107でエッジ画素に該当すると判定された画素の分布密度に基づいて、原稿に不要なスジが存在するか否かの判別を行う。また、不要なスジが存在すると判別した場合は、さらに、各エッジ画素の関数F(Ix,Iy)の値によって示される、分類された方向範囲群に対応する代表的な輝度勾配方向(特定方向)に基づいて、存在するスジの方向を判別する。   In the case of automatic determination, first, based on the distribution density of the pixels determined to correspond to the edge pixels in S107, it is determined whether or not an unnecessary streak exists in the document. When it is determined that an unnecessary streak exists, a representative luminance gradient direction (specific direction) corresponding to the classified direction range group indicated by the value of the function F (Ix, Iy) of each edge pixel is further displayed. ) To determine the direction of existing stripes.

まず、エッジ画素に該当すると判定された画素の分布密度として、関数F(Ix,Iy)の値が「0」でない画素の数が、これに対する閾値Th_edge_cntを上回っているか否か、即ち、下記(条件4)
Σ{F(Ix,Iy)}>Th_edge_cnt
但し、F(Ix,Iy)≠0 (条件4)
が成立するか否かを確認する。(条件4)が成立すれば、不要なスジが画像に存在すると判別される。(条件4)が成立しなければ、不要なスジが画像に存在しないと判別される。
First, as the distribution density of the pixels determined to correspond to the edge pixels, whether or not the number of pixels whose function F (Ix, Iy) is not “0” exceeds the threshold Th_edge_cnt, that is, Condition 4)
Σ {F (Ix, Iy)}> Th_edge_cnt
However, F (Ix, Iy) ≠ 0 (Condition 4)
It is confirmed whether or not is established. If (Condition 4) is satisfied, it is determined that an unnecessary streak exists in the image. If (Condition 4) is not satisfied, it is determined that no unnecessary streak exists in the image.

次に、不要なスジが画像に存在すると判別された場合の、エッジ画素の輝度勾配方向(特定方向)として、エッジ画素に該当する各画素の関数F(Ix,Iy)の合計値が、正の値か負の値かを確認する。合計値が正の値ならばスジの方向は横方向(x方向)であり、負の値ならばスジの方向は縦方向(y方向)である。   Next, when it is determined that an unnecessary streak exists in the image, the total value of the function F (Ix, Iy) of each pixel corresponding to the edge pixel is positive as the luminance gradient direction (specific direction) of the edge pixel. Check whether the value is negative or negative. If the total value is a positive value, the streak direction is the horizontal direction (x direction), and if the total value is a negative value, the streak direction is the vertical direction (y direction).

なお、方向範囲群2(22.5°〜45゜未満)や方向範囲群3(45゜〜67.5°未満)に、他の方向範囲群よりも偏って画素が数多く分類されていることも確認する構成とする場合は、エッジ画素に該当する各画素の関数F(Ix,Iy)の合計値がどの数値範囲に属するかを、正負よりも細かい範囲に分けて確認するようにしてもよい。これにより、不要なスジの方向を、横方向(x方向)や縦方向(y方向)以外の、方向範囲群2(22.5°〜45゜未満)や方向範囲群3(45゜〜67.5°未満)にそれぞれ対応する代表的な輝度勾配方向(特定方向)についても判別することができる。   In addition, the direction range group 2 (22.5 ° to less than 45 °) and the direction range group 3 (45 ° to less than 67.5 °) have a larger number of pixels than the other direction range groups. In this configuration, the numerical value range to which the total value of the function F (Ix, Iy) of each pixel corresponding to the edge pixel belongs can be divided into smaller ranges than positive and negative. Good. As a result, the direction of unnecessary stripes can be set in the direction range group 2 (22.5 ° to less than 45 °) or the direction range group 3 (45 ° to 67 °) other than the horizontal direction (x direction) and the vertical direction (y direction). It is also possible to discriminate the representative luminance gradient directions (specific directions) respectively corresponding to less than .5 °).

この結果、原稿から読み取った画像が、印刷の際に生じる不要なスジを含むと判断した場合(S108:Yes)には、生じている不要なスジの方向に応じた内容の平滑化処理を、特殊複写用処理部146がY(輝度)データに対して施す(S109)。この平滑化処理は、画像のデータの全画素に対して施してもよい。あるいは、不要なスジの方向と直交する方向を輝度勾配方向D(Ix,Iy)とするエッジ画素に対して限定的に施してもよい。   As a result, when it is determined that the image read from the document includes unnecessary streaks that occur during printing (S108: Yes), the content is smoothed according to the direction of the unnecessary streaks. The special copy processing unit 146 performs the processing on the Y (luminance) data (S109). This smoothing process may be performed on all the pixels of the image data. Or you may carry out limitedly with respect to the edge pixel which makes the direction orthogonal to the direction of an unnecessary streak the brightness | luminance gradient direction D (Ix, Iy).

そして、不要なスジの方向が横方向(x方向)である場合の平滑化処理は、図7(a)に示すようなものである。図7(a)は、不要なスジの方向が横方向(x方向)である場合の平滑化処理の一例を示す図である。本図の例では、注目画素bの輝度Ybについて、上下方向に隣接した画素aの輝度Yaと画素cの輝度Ycとを用いて、Yb=Y_smooth=(Ya+Yc)/2とすることで平滑化を行うようにしている。   Then, the smoothing process in the case where the unnecessary stripe direction is the horizontal direction (x direction) is as shown in FIG. FIG. 7A is a diagram illustrating an example of the smoothing process when the direction of unnecessary stripes is the horizontal direction (x direction). In the example of this figure, the luminance Yb of the target pixel b is smoothed by setting Yb = Y_smooth = (Ya + Yc) / 2 using the luminance Ya of the pixel a adjacent in the vertical direction and the luminance Yc of the pixel c. Like to do.

また、不要なスジの方向が縦方向(y方向)である場合の平滑化処理は、図7(b)に示すようなものである。図7(b)は、不要なスジの方向が縦方向(y方向)である場合の平滑化処理の一例を示す図である。本図の例では、注目画素bの輝度Ybについて、左右方向に隣接した画素aの輝度Yaと画素cの輝度Ycとを用いて、Yh=Y_smooth=(Ya+Yc)/2とすることで平滑化を行うようにしている。   Further, the smoothing process in the case where the unnecessary streak direction is the vertical direction (y direction) is as shown in FIG. FIG. 7B is a diagram illustrating an example of the smoothing process when the direction of unnecessary stripes is the vertical direction (y direction). In the example of this figure, the luminance Yb of the target pixel b is smoothed by setting Yh = Y_smooth = (Ya + Yc) / 2 using the luminance Ya of the pixel a adjacent in the left-right direction and the luminance Yc of the pixel c. Like to do.

なお、平滑化処理の具体的な方法は、上述した方法とは異なる他の平滑化方法であってもよい。   Note that the specific method of the smoothing process may be another smoothing method different from the method described above.

このように、本実施形態では、スジと垂直な1方向について平滑化を行うことで過度の画像ぼけを防ぎつつ、スジが目立たないようにしている。   As described above, in the present embodiment, smoothing is performed in one direction perpendicular to the streak, thereby preventing excessive image blur and preventing the streak from conspicuous.

一方、読み取った原稿が、印刷の際に生じる不要なスジを含む画像でないと判断した場合(S108:No)には、Y(輝度)に対する処理は行わない。   On the other hand, when it is determined that the read original is not an image including unnecessary streaks that occur during printing (S108: No), the process for Y (luminance) is not performed.

いずれの場合も、YCbCr形式に変換された画像データをRGB形式に再変換する(S110)。この際、平滑化によりY(輝度)データが変更された場合は、平滑化後のY(輝度)データを用いてRGB形式に変換する。なお、YCbCr形式からRGB形式への変換は、例えば、下記(式5)
R=(256×Y+359×Cr)/256
G=(256×Y−88×Cb−183×Cr)/256
B=(256×Y+454×Cb)/256
(以上、式5)
に従って行うことができる。ただし、他の方法を用いてRGB形式に変換してもよい。
In either case, the image data converted into the YCbCr format is reconverted into the RGB format (S110). At this time, if the Y (luminance) data is changed by the smoothing, the Y (luminance) data after the smoothing is converted into the RGB format. The conversion from the YCbCr format to the RGB format is, for example, the following (formula 5)
R = (256 × Y + 359 × Cr) / 256
G = (256 * Y-88 * Cb-183 * Cr) / 256
B = (256 × Y + 454 × Cb) / 256
(Equation 5 above)
Can be done according to. However, you may convert into RGB format using another method.

その後は、CMYK形式への変換、中間調処理等の従来通りの画像処理を行って(S111)、印刷を実行する(S112)。これにより、印刷の際に不要なスジが生じた原稿の複写処理において、スジの目立たない印刷結果を得ることができる。   Thereafter, conventional image processing such as conversion to CMYK format and halftone processing is performed (S111), and printing is executed (S112). As a result, it is possible to obtain a print result in which stripes are not conspicuous in the copying process of an original in which unnecessary stripes are generated during printing.

なお、上記の例では、ライン型のインクジェットヘッドの印刷装置で印刷された原稿における不要なスジの有無を想定していたが、シリアル型のインクジェットヘッドを用いた印刷装置でも不要なスジが発生した印刷結果が得られる場合もある。例えば、ドットゲインの小さい印刷用紙に対して印刷を行った場合には、印字されるドット間に隙間が発生しやすいため、シリアル型のインクジェットヘッドを用いた印刷装置でもスジが発生する場合がある。このような状況には、例えば、上記の閾値等を変更することで対応することができる。具体的には、上述のように実験的に定めることができるTh_edge_cnt等の閾値を、シリアル型のインクジェットヘッドを用いた印刷装置で印刷した原稿を用いて実験的に調整することで、シリアル型のインクジェットヘッドを用いた印刷装置に適した値を設定することができる。   In the above example, the presence or absence of unnecessary streaks in the original printed with the line-type inkjet head printing device was assumed, but unnecessary streaks were also generated in the printing device using the serial-type inkjet head. A print result may be obtained. For example, when printing is performed on a printing paper having a small dot gain, a gap is likely to be generated between dots to be printed, and thus streaks may occur even in a printing apparatus using a serial type ink jet head. . Such a situation can be dealt with, for example, by changing the threshold value or the like. Specifically, the threshold value such as Th_edge_cnt, which can be experimentally determined as described above, is experimentally adjusted using a document printed by a printing apparatus using a serial type inkjet head. A value suitable for a printing apparatus using an inkjet head can be set.

また、上記の例において、スジのエッジ候補となるエッジ画素の検出、スジの有無の判定等に用いた閾値は、開発時の実験等によってあらかじめ設定しておくようにしていた。これらの閾値をユーザからの指示に基づいて調整可能なようにしてもよい。ユーザの使用環境、装置の個体差等により、開発時の設定値が最適であるとは限らない可能性もあるからである。ユーザからの指示は、ユーザインタフェース部130を介したメニュー操作で受け付けることができる。   In the above example, threshold values used for detection of edge pixels that are streak edge candidates, determination of the presence or absence of streaks, and the like have been set in advance by experiments during development. You may enable it to adjust these threshold values based on the instruction | indication from a user. This is because there is a possibility that the setting value at the time of development may not be optimal depending on the use environment of the user, individual differences among devices, and the like. An instruction from the user can be received by a menu operation via the user interface unit 130.

例えば、スジが目立たないにもかかわらず、スジが発生していると判定されて画像が平滑化され、印刷結果のシャープさが失われる傾向がある場合には、ユーザからの指示に基づいて、スジ判定の感度を下げるように閾値を調整することができる。具体的には、エッジ判定に用いる閾値Th1、Th2の値を大きくする。あるいは、スジの有無の判定に用いる閾値Th_edge_cntの値を大きくするようにしてもよい。   For example, when it is determined that a streak is generated even though the streak is not noticeable and the image is smoothed and the sharpness of the print result tends to be lost, based on an instruction from the user, The threshold value can be adjusted so as to reduce the sensitivity of the streak determination. Specifically, the threshold values Th1 and Th2 used for edge determination are increased. Alternatively, the threshold value Th_edge_cnt used for determining the presence or absence of streaks may be increased.

逆に、スジが発生しているにもかかわらず、スジが発生していないと判定されて画像が平滑化されず、スジが目立つ傾向がある場合には、ユーザからの指示に基づいて、スジ判定の感度をあげるように閾値を調整することができる。具体的には、エッジ判定に用いる閾値Th1、Th2の値を小さくする。あるいは、スジの有無の判定に用いる閾値Th_edge_cntの値を小さくするようにしてもよい。   On the other hand, when it is determined that no streak is generated despite the occurrence of a streak and the image is not smoothed and the streak tends to be noticeable, the streak is determined based on an instruction from the user. The threshold value can be adjusted to increase the sensitivity of determination. Specifically, the threshold values Th1 and Th2 used for edge determination are reduced. Alternatively, the threshold Th_edge_cnt used for determining the presence or absence of streaks may be reduced.

さらに、上記の例では、原稿の印刷の際に生じた画像の不要なスジとその方向を判別した上で、その不要なスジがなくなるように、又は、目立たなくなるように、エッジ画素の平滑化を行う構成について説明した。しかし、エッジ画素の平滑化を行うための構成は省略してもよい。   Further, in the above example, after the unnecessary streaks of the image generated during the printing of the document and its direction are discriminated, the edge pixels are smoothed so that the unnecessary streaks disappear or become inconspicuous. The configuration for performing is described. However, the configuration for smoothing the edge pixels may be omitted.

また、本実施形態では、画像を構成する画素に関する0°〜90゜の輝度勾配方向D(Ix,Iy)を、22.5°、45゜、67.5°で区切って4分割するものとした。しかし、4分割後する際の区切りとなる角度値は、本実施形態のパターンに限定されない。また、4分割の各方向範囲群の各角度範囲の広さが方向範囲群毎に異なってもよい。さらに、輝度勾配方向D(Ix,Iy)の分割数は4つに限らず3以下でも5以上であってもよい。   In the present embodiment, the luminance gradient direction D (Ix, Iy) of 0 ° to 90 ° related to the pixels constituting the image is divided into 22.5 °, 45 °, 67.5 ° and divided into four. did. However, the angle value that becomes a break when dividing into four is not limited to the pattern of the present embodiment. Moreover, the width of each angle range of each of the four divided direction range groups may be different for each direction range group. Furthermore, the number of divisions in the luminance gradient direction D (Ix, Iy) is not limited to four, and may be three or less or five or more.

10 複写装置
110 画像読取部
120 印刷機構部
130 ユーザインタフェース部
140 制御部
141 読取制御部
142 特殊複写判定部
143 画像処理部
144 印刷制御部
145 記憶部
146 特殊複写用処理部
220 インクジェットヘッド
230 ブロック
240a ノズルユニット
240b ノズルユニット
241a ノズル
241b ノズル
DESCRIPTION OF SYMBOLS 10 Copy apparatus 110 Image reading part 120 Printing mechanism part 130 User interface part 140 Control part 141 Reading control part 142 Special copy determination part 143 Image processing part 144 Print control part 145 Storage part 146 Special copying process part 220 Inkjet head 230 Block 240a Nozzle unit 240b Nozzle unit 241a Nozzle 241b Nozzle

Claims (3)

原稿から読み取った画像を解析して、前記原稿の印刷時に生じた前記画像中のスジを検出する装置であって、
前記画像を構成する各画素について、周囲の画素に対する輝度勾配方向をそれぞれ検出する輝度勾配方向検出手段と、
前記各画素を、前記輝度勾配方向の分布範囲を複数に分割した複数の方向範囲群のうち、前記輝度勾配方向検出手段により検出された輝度勾配方向が属する方向範囲群にそれぞれ分類する分類手段と、
前記各画素を中心とする所定領域内に存在する画素が特定の方向範囲群に分類される程度の偏りを示す分類偏重度に基づいて、前記各画素が、前記特定の方向範囲群に対応する特定方向への輝度勾配変化が多いエッジ画素であるか否かを判定する判定手段と、
前記判定手段により前記エッジ画素であると判定された各画素の分布密度と前記特定方向とに基づいて、前記画像中のスジの有無及びその方向を判別するスジ判別手段と、
を備えることを特徴とする原稿の画像解析装置。
An apparatus that analyzes an image read from a document and detects streaks in the image generated when the document is printed,
For each pixel constituting the image, a luminance gradient direction detecting means for detecting a luminance gradient direction with respect to surrounding pixels, and
Classification means for classifying each pixel into a direction range group to which the brightness gradient direction detected by the brightness gradient direction detection means belongs, among a plurality of direction range groups obtained by dividing the brightness gradient direction distribution range into a plurality of directions. ,
Each pixel corresponds to the specific direction range group based on the classification weight indicating the degree of deviation that the pixels existing in the predetermined area centered on the pixel are classified into the specific direction range group. A determination means for determining whether or not the edge pixel has a large change in luminance gradient in a specific direction;
A streak discriminating unit that discriminates the presence / absence of a streak in the image and its direction based on the distribution density of each pixel determined to be the edge pixel by the determining unit and the specific direction;
An apparatus for analyzing an image of a document.
前記各画素を注目画素として、該注目画素とその周辺の所定範囲内に存在する画素との平均濃度値を、前記注目画素に対応する濃度値として算出する濃度値算出手段をさらに備えており、
前記判定手段は、前記濃度値算出手段により算出された前記濃度値が所定の濃度基準値以上である前記注目画素に基づいて、前記判定を行う、
ことを特徴とする請求項1記載の原稿の画像解析装置。
A density value calculating unit that calculates each pixel as a target pixel, and calculates an average density value of the target pixel and pixels existing within a predetermined range around the target pixel as a density value corresponding to the target pixel;
The determination unit performs the determination based on the target pixel whose density value calculated by the density value calculation unit is equal to or greater than a predetermined density reference value.
The document image analyzing apparatus according to claim 1, wherein:
前記スジ判別手段により前記画像中にスジが存在すると判別された場合に、前記エッジ画素のうち、前記スジの方向が属する前記方向範囲群を前記特定の方向範囲群とする前記エッジ画素に対して、平滑化処理を行う平滑化処理手段をさらに備える、
ことを特徴とする請求項1又は2記載の原稿の画像解析装置。
When it is determined by the streak determining means that a streak exists in the image, among the edge pixels, the edge pixel in which the direction range group to which the streak direction belongs belongs to the specific direction range group. , Further comprising a smoothing processing means for performing a smoothing process,
3. The document image analyzing apparatus according to claim 1, wherein the document image analyzing apparatus is an image analyzing apparatus.
JP2010049439A 2010-03-05 2010-03-05 Document image analysis apparatus Pending JP2011188109A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010049439A JP2011188109A (en) 2010-03-05 2010-03-05 Document image analysis apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010049439A JP2011188109A (en) 2010-03-05 2010-03-05 Document image analysis apparatus

Publications (1)

Publication Number Publication Date
JP2011188109A true JP2011188109A (en) 2011-09-22

Family

ID=44793895

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010049439A Pending JP2011188109A (en) 2010-03-05 2010-03-05 Document image analysis apparatus

Country Status (1)

Country Link
JP (1) JP2011188109A (en)

Similar Documents

Publication Publication Date Title
EP3305532B1 (en) Image inspection device, image inspection method, program, and ink jet printing system
US9649839B2 (en) Image processing apparatus and image processing method
US7450268B2 (en) Image reproduction
JP5895734B2 (en) Image processing apparatus and image processing method
US20160142560A1 (en) Inspecting device, method for changing threshold, and computer-readable storage medium
JP2008017051A (en) Image processor, image processing method, and program
JP5740212B2 (en) Image processing apparatus, image processing method, and image processing program
JP5058695B2 (en) Image processing apparatus, image processing method, and image processing program
JP2013009075A (en) Image processing system and program
JP5181647B2 (en) Printing apparatus and printing method
US20120170849A1 (en) Image processing apparatus and computer-readable recording medium
JP6566277B2 (en) Image processing device
JP2011188109A (en) Document image analysis apparatus
JP6094278B2 (en) Image processing apparatus, image forming apparatus, image processing method, and program
JP2015154229A (en) image forming apparatus
JP2010016488A (en) Copying machine and image processing method
US20230202203A1 (en) Recording device and recording method
JP6025475B2 (en) Image area determination apparatus, image area determination method, and image processing apparatus
JP2007081793A (en) Image forming apparatus
US11800019B2 (en) Image inspection apparatus and program product correcting image blur caused by floating paper to increase inspection accuracy of printed image
JP6414710B2 (en) Image processing device
JP2022131103A (en) Image forming apparatus
JP2021068159A (en) Image processing apparatus, image processing method, and program
US20200101728A1 (en) Information processing apparatus, method and storage medium
JP2024004757A (en) Image processing device