JP2008257394A - Unit, method and program for image processing - Google Patents

Unit, method and program for image processing Download PDF

Info

Publication number
JP2008257394A
JP2008257394A JP2007097588A JP2007097588A JP2008257394A JP 2008257394 A JP2008257394 A JP 2008257394A JP 2007097588 A JP2007097588 A JP 2007097588A JP 2007097588 A JP2007097588 A JP 2007097588A JP 2008257394 A JP2008257394 A JP 2008257394A
Authority
JP
Japan
Prior art keywords
pixel
ruled line
image
density
dust
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
JP2007097588A
Other languages
Japanese (ja)
Inventor
Michiaki Tokunaga
道昭 徳永
Masahiko Yoshida
昌彦 吉田
Toru Miyamoto
徹 宮本
Tatsuya Nakano
龍也 中野
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson 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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2007097588A priority Critical patent/JP2008257394A/en
Publication of JP2008257394A publication Critical patent/JP2008257394A/en
Pending legal-status Critical Current

Links

Abstract

<P>PROBLEM TO BE SOLVED: To securely detect a position and direction of a ruled line with high accuracy, even when a spurious image is formed in the vicinity of the ruled line, when detecting the position and direction of the ruled line in an image data having the described ruled line. <P>SOLUTION: An image processing method includes the steps of: extracting a plurality of pixel rows each aligned in a substantially perpendicular direction to the ruled line; calculating an average density of the extracted plurality of pixel rows among the pixels disposed in the ruled line direction; comparing the above average density with a predetermined density threshold in a successive order from one end of the pixel rows; obtaining an interval from the first pixel exceeding the predetermined threshold to the last pixel; if the above interval ranges within a predetermined width threshold, detecting the ruled line position to be from the first pixel to the last pixel by determining that a spurious image does not exist from the first pixel to the last pixel, while if the above interval exceeds the predetermined width threshold, determining that the spurious image exists between the first pixel and the last pixel. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、画像処理装置、画像処理方法及び画像処理プログラムに関し、特に、罫線が含まれる画像から罫線を検出する画像処理装置、画像処理方法及び画像処理プログラムに関する。   The present invention relates to an image processing device, an image processing method, and an image processing program, and more particularly, to an image processing device, an image processing method, and an image processing program for detecting ruled lines from an image including ruled lines.

従来、スキャナ等でスキャンされて生成された画像データから文字等の所定の形状を検出し、その形状認識を行う技術としてOCR(Optical Character Recognition)等が知られている。このような形状認識を行う技術では、スキャン対象となる紙面やスキャナの読み取り面に付着するゴミや汚れに起因して、生成された画像データには、検出対象となる形状の周辺にゴミのイメージ(以下、ゴミ画像と称する)が形成されると、検出精度が低下するという課題が存在していた。   Conventionally, OCR (Optical Character Recognition) or the like is known as a technique for detecting a predetermined shape such as a character from image data generated by scanning with a scanner or the like and recognizing the shape. In such a shape recognition technology, the generated image data has an image of dust around the shape to be detected due to dust and dirt adhering to the paper surface to be scanned and the reading surface of the scanner. When (hereinafter referred to as a dust image) is formed, there is a problem that the detection accuracy decreases.

このような課題を解決するために、画像データから1文字分の文字イメージを切り出し、この文字イメージに含まれるセグメント数、各セグメントの面積、文字イメージの線幅の分布、文字辞書と文字イメージとの照合、等に基づいて文字イメージからゴミ画像を消去し、文字認識の精度を向上させる技術が知られている(例えば、特許文献1等)。
特開平7−105312号公報
In order to solve such a problem, a character image for one character is cut out from the image data, the number of segments included in the character image, the area of each segment, the distribution of the line width of the character image, the character dictionary and the character image, A technique is known in which a dust image is erased from a character image based on the collation of the character to improve the accuracy of character recognition (for example, Patent Document 1).
JP-A-7-105312

ところで、画像データ中から所定形状を検出して利用する技術として、画像データの自動トリミングや自動正立回転等も存在する。罫線等の直線で囲まれた範囲のトリミングを行うには、例えば、まず罫線の検出を行う。この罫線の検出では、所定濃度以上の画素が所定幅で直線状に連続して形成された部位を検出することになる。しかしながら、罫線の近傍にゴミ画像が形成されると、罫線の幅が変化してしまい、罫線検出に失敗したり、罫線検出に成功しても検出された罫線位置や罫線方向の精度に問題があったりすることになる。   By the way, as a technique for detecting and using a predetermined shape from image data, there are automatic trimming and automatic upright rotation of image data. In order to perform trimming of a range surrounded by straight lines such as ruled lines, for example, ruled lines are first detected. In this ruled line detection, a part where pixels having a predetermined density or more are continuously formed in a straight line with a predetermined width is detected. However, if a dust image is formed in the vicinity of the ruled line, the width of the ruled line changes, and even if the ruled line detection fails or the ruled line detection is successful, there is a problem with the accuracy of the detected ruled line position and ruled line direction. There will be.

また、正立回転では、特許文献1記載の技術のような文字認識を行い、認識された文字から傾きを求め、求めた傾きを補正する回転処理が行われていた。しかしながら、一般に文字はサイズが小さく、文字の傾きから求められる角度では、精度に限界がある。そのため、精確な正立回転を行うためには、画像データ中に罫線等の直線から成る基準線を記載して、この基準線の傾きを補正する正立回転を行った方が好ましい。   In the upright rotation, the character recognition as in the technique described in Patent Document 1 is performed, the inclination is obtained from the recognized character, and the rotation process is performed to correct the obtained inclination. However, in general, characters are small in size, and there is a limit in accuracy at an angle obtained from the inclination of the characters. Therefore, in order to perform accurate upright rotation, it is preferable to describe a reference line composed of straight lines such as ruled lines in the image data and perform upright rotation to correct the inclination of the reference line.

このように、自動トリミングや自動正立回転を精度よく行うためには、罫線検出を精確に行う必要があり、そのためにはゴミ画像の影響を低減する必要がある。しかしながら、罫線では、一文字分の文字イメージを切り出したり、切り出した文字イメージをセグメントに分解してゴミ画像を検出したり、といったゴミ除去が出来ないため、前述の特許文献1の技術を適用することは難しい。   As described above, in order to perform automatic trimming and automatic upright rotation with high accuracy, it is necessary to accurately detect ruled lines, and for this purpose, it is necessary to reduce the influence of dust images. However, with the ruled lines, it is impossible to remove dust such as cutting out a character image for one character, or decomposing the cut out character image into segments to detect a dust image. Is difficult.

本発明は、前記課題に鑑みてなされたもので、罫線が記載された画像データの罫線位置や罫線方向の検出を行うにあたり、罫線近傍にゴミ画像が形成された場合であっても、罫線位置や罫線方向を精度よく確実に検出可能な画像処理装置、画像処理方法及び画像処理プログラムの提供を目的とする。   The present invention has been made in view of the above problems, and in detecting the ruled line position and ruled line direction of image data in which ruled lines are described, even when a dust image is formed in the vicinity of the ruled line, Another object of the present invention is to provide an image processing apparatus, an image processing method, and an image processing program capable of accurately and reliably detecting the direction of a ruled line.

上記課題を解決するために、本発明は、所定幅の罫線が記載された画像データの罫線位置を検出する画像処理装置であって、前記罫線と略直交する方向に1列に並ぶ画素の列を複数列抽出し、抽出された複数列の画素の列において罫線方向に並ぶ位置にある画素の間で平均濃度を算出する平均濃度算出手段と、画素の列の一方の端から順に前記平均濃度と所定の濃度閾値とを比較し、該所定の濃度閾値を超えた最初の画素から最後の画素までの間隔を求める罫線幅検出手段と、該間隔が所定の幅閾値内に収まれば、前記最初の画素から前記最後の画素までにゴミ画像が存在しないと判別して前記最初の画素から前記最後の画素までを罫線位置として検出する一方、前記間隔が所定の幅閾値を超えると、前記最初の画素から前記最後の画素までにゴミ画像が存在すると判別するゴミ判別手段と、を備える構成としてある。   In order to solve the above-described problem, the present invention provides an image processing apparatus for detecting a ruled line position of image data in which a ruled line having a predetermined width is described, and includes a column of pixels lined up in a direction substantially orthogonal to the ruled line. A plurality of columns, and an average density calculating means for calculating an average density between pixels located in a line in the ruled line direction in the extracted plurality of pixels, and the average density sequentially from one end of the pixel column And a ruled line width detecting means for obtaining an interval from the first pixel to the last pixel that exceeds the predetermined density threshold, and if the interval falls within the predetermined width threshold, It is determined that there is no dust image from the last pixel to the last pixel and the first pixel to the last pixel is detected as a ruled line position, while if the interval exceeds a predetermined width threshold, From pixel to the last pixel It is constituted comprising, a dust determination means for determining that the dust image exists.

また、上述した画像処理装置は、他の機器に組み込まれた状態で実施されたり他の方法とともに実施されたりする等の各種の態様を含む。さらに、本発明は上記画像装置を備える印刷システム、上述した装置の構成に対応した工程を有する制御方法、上述した装置の構成に対応した機能をコンピュータに実現させるプログラム、該プログラムを記録したコンピュータ読み取り可能な記録媒体、等としても実現可能である。これら印刷システム、画像送信方法、画像送信プログラム、該プログラムを記録した媒体、の発明も、上述した作用、効果を奏する。むろん、請求項2〜5に記載した構成も、前記システムや前記方法や前記プログラムや前記記録媒体に適用可能である。
本発明の他の特徴については、本明細書及び添付図面の記載により明らかにする。
Further, the above-described image processing apparatus includes various modes such as being implemented in another device or being implemented together with another method. Furthermore, the present invention provides a printing system including the above-described image device, a control method having a process corresponding to the configuration of the above-described device, a program for causing a computer to realize a function corresponding to the above-described device configuration, and a computer reading that records the program It can also be realized as a possible recording medium. The inventions of the printing system, the image transmission method, the image transmission program, and the medium on which the program is recorded also have the above-described operations and effects. Of course, the configurations described in claims 2 to 5 are also applicable to the system, the method, the program, and the recording medium.
Other features of the present invention will become apparent from the description of the present specification and the accompanying drawings.

本明細書及び添付図面の記載により、少なくとも、以下の事項が明らかとなる。
前記主たる発明の構成によれば、前記平均濃度算出手段が、前記罫線と略直交する方向に1列に隣接する画素の列を複数列抽出し、抽出された複数列の画素の列において罫線方向に並ぶ位置にある画素の間で平均濃度を算出する。つまり、複数の画素の列の間で、濃度を平均するため、各画素の列に一様に含まれうる罫線を除く画像の濃度は低下する。従って、平均濃度の分布においては罫線の濃度のみが顕在化してゴミ画像と罫線との判別が容易になる。
At least the following matters will become clear from the description of the present specification and the accompanying drawings.
According to the configuration of the main invention, the average density calculating unit extracts a plurality of columns of pixels adjacent to one column in a direction substantially orthogonal to the ruled line, and the ruled line direction in the extracted plurality of pixel columns The average density is calculated between the pixels at the positions aligned with. That is, since the density is averaged among the plurality of pixel columns, the density of the image excluding the ruled lines that can be uniformly included in each pixel column decreases. Accordingly, only the density of the ruled lines becomes apparent in the distribution of the average density, and the discrimination between the dust image and the ruled lines becomes easy.

そして、罫線幅検出手段が、画素の列の一方の端から順に前記平均濃度と所定の濃度閾値とを比較し、該所定の濃度閾値を超えた最初の画素から最後の画素までの間隔を求める。つまり、所定の濃度閾値を設定して、閾値以上の濃度を有する最初の画素と最後の画素との間隔を罫線の幅とする。   Then, the ruled line width detection means compares the average density with a predetermined density threshold in order from one end of the pixel row, and obtains an interval from the first pixel to the last pixel that exceeds the predetermined density threshold. . That is, a predetermined density threshold is set, and the interval between the first pixel and the last pixel having a density equal to or higher than the threshold is set as the width of the ruled line.

そして、ゴミ判別手段が、該間隔が所定の幅閾値内に収まれば、前記最初の画素から前記最後の画素までにゴミ画像が存在しないと判別して前記最初の画素から前記最後の画素までを罫線位置として検出する一方、前記間隔が所定の幅閾値を超えると、前記最初の画素から前記最後の画素までにゴミ画像が存在すると判別する。つまり、予め設定された幅閾値と、前記罫線幅検出手段の検出した罫線の幅とを比較する。そのため、仮にゴミ画像が想定以上に画像データに含まれており、前記平均濃度でもゴミ画像の濃度が罫線濃度と比較して十分に低減されない場合であっても、ゴミ画像を罫線と誤認する恐れがない。   When the interval falls within a predetermined width threshold, the dust determination unit determines that there is no dust image from the first pixel to the last pixel, and determines from the first pixel to the last pixel. While it is detected as a ruled line position, if the interval exceeds a predetermined width threshold value, it is determined that a dust image exists from the first pixel to the last pixel. That is, the preset width threshold value is compared with the width of the ruled line detected by the ruled line width detecting means. Therefore, even if a dust image is included in the image data more than expected and the density of the dust image is not sufficiently reduced compared to the ruled line density even with the average density, the dust image may be mistaken for a ruled line. There is no.

ここで、罫線と略直交する方向に1列に並ぶ画素の列とは、罫線方向が1画素であり、罫線と略直交する方向に複数の画素が並ぶものである。また、複数列の画素の列とは、罫線方向に隣接する位置関係にあるものであっても良いし、各画素の列の間に、抽出されない画素の列が存在するような間隙を有する位置関係にあるものであっても良い。また、前記ゴミ画像とは、前記画像データの作成者の意図に反して形成される画像であり、例えば、ノイズ成分や、光学的に原稿読取を行った際に読取面に付着したゴミに起因して読取画像に形成されるものである。   Here, the column of pixels arranged in a line in a direction substantially orthogonal to the ruled line is one pixel in the ruled line direction and a plurality of pixels arranged in a direction substantially orthogonal to the ruled line. Further, the plurality of pixel columns may be adjacent to each other in the ruled line direction, or a position having a gap in which there is a pixel column that is not extracted between the pixel columns. It may be related. The dust image is an image formed contrary to the intention of the creator of the image data. For example, the dust image is caused by noise components or dust attached to the reading surface when optically reading a document. Thus, it is formed on the read image.

かかる画像処理装置において、前記ゴミ判別手段が前記最初の画素から前記最後の画素までにゴミ画像が存在すると判別すると、前記平均濃度の算出に使用された複数の画素の列を、該複数の画素の列の近傍に位置する画素の列で置き換えて前記平均濃度の再算出を行うことが望ましい。このような画像処理装置によれば、最初に平均濃度の算出に利用された複数の画素の列に代えて、ゴミ画像の影響の少ない可能性のある画素の列を平均濃度の算出、ひいては罫線の幅の検出に利用することになり、ゴミ画像の影響を排除できる可能性がある。   In such an image processing apparatus, when the dust determination unit determines that a dust image exists from the first pixel to the last pixel, the plurality of pixels used in the calculation of the average density are determined as the plurality of pixels. It is desirable to perform recalculation of the average density by replacing with a column of pixels located in the vicinity of the column. According to such an image processing apparatus, instead of a plurality of pixel rows used for calculating the average density first, a pixel row that is less likely to be affected by the dust image is calculated, and as a result, a ruled line. This is used for detecting the width of the image, and there is a possibility that the influence of the dust image can be eliminated.

かかる画像処理装置において、前記間隔が前記所定の幅閾値を超えると、前記ゴミ判別手段が、前記平均濃度の算出に使用される画素の列の数を増加させて前記平均濃度を再算出することが望ましい。このような画像処理装置によれば、特定の画素の列にゴミ画像が含まれていても、平均濃度の算出に利用される標本数が増加されるため、ゴミ画像の影響を減少することが出来る。よって、前記罫線幅検出手段で検出される罫線の幅が、正確になる可能性がある。   In such an image processing apparatus, when the interval exceeds the predetermined width threshold, the dust determination unit recalculates the average density by increasing the number of pixel columns used for the calculation of the average density. Is desirable. According to such an image processing apparatus, even if a dust image is included in a specific pixel column, the number of samples used for calculating the average density is increased, so that the influence of the dust image can be reduced. I can do it. Therefore, the width of the ruled line detected by the ruled line width detecting means may be accurate.

かかる画像処理装置において、前記最初の画素と前記最後の画素の略中間を前記罫線位置とすることが望ましい。前記罫線幅検出手段では、所定の濃度閾値を利用して罫線の幅を検出しているため、その両端は罫線の何れの位置に相当するかは明確でない。しかしながら、罫線の濃度は幅方向において中間を挟んで略対称に分布する。従って、検出された罫線の幅の略中間が実際の罫線の中間と略一致することが期待できる。   In such an image processing apparatus, it is preferable that the ruled line position is approximately in the middle of the first pixel and the last pixel. Since the ruled line width detecting means detects the width of the ruled line using a predetermined density threshold value, it is not clear which position of the ruled line corresponds to both ends thereof. However, the ruled line density is distributed approximately symmetrically across the middle in the width direction. Therefore, it can be expected that the approximate middle of the width of the detected ruled line substantially matches the middle of the actual ruled line.

かかる画像処理装置において、副走査方向の所定範囲で所定色かつ所定濃度となる画像データを、該画像データの主走査方向と副走査方向の何れか又は双方に延びる罫線と共に印刷装置に印刷させる印刷手段と、該印刷の結果の光学読取画像を光学読取装置から取得する印刷結果取得手段と、前記罫線検出手段が検出した前記画像データの罫線位置に基づいて光学読取画像の正立回転とトリミングとの何れか又は双方から成る画像補正を行う画像補正手段と、画像補正後の光学読取画像から副走査方向の濃度変化を計測し、該濃度変化を解消する補正値を生成して前記印刷装置に設定する補正値設定手段と、を備えることが望ましい。このような画像処理装置において、検出された罫線位置を光学読取画像の正立回転やトリミング等の画像補正に利用すると、その精度の向上に寄与する。   In such an image processing apparatus, printing that causes a printing apparatus to print image data having a predetermined color and a predetermined density in a predetermined range in the sub-scanning direction together with ruled lines extending in one or both of the main scanning direction and the sub-scanning direction of the image data. Means, print result acquisition means for acquiring an optically read image as a result of the printing from the optical reading device, and erect rotation and trimming of the optically read image based on the ruled line position of the image data detected by the ruled line detecting means Image correction means for performing image correction comprising either or both of the above, and a density change in the sub-scanning direction is measured from the optically read image after the image correction, and a correction value for eliminating the density change is generated in the printing apparatus. It is desirable to include correction value setting means for setting. In such an image processing apparatus, if the detected ruled line position is used for image correction such as erecting rotation or trimming of the optically read image, it contributes to improvement in accuracy.

以下、下記の順序に従って本発明の実施形態を説明する。
(1)印刷システムの構成:
(2)濃度ムラ補正値設定処理:
(3)罫線検出処理の変形例:
Hereinafter, embodiments of the present invention will be described in the following order.
(1) Configuration of printing system:
(2) Density unevenness correction value setting processing:
(3) Modified example of ruled line detection processing:

(1)印刷システムの構成:
図1は、本発明の一実施形態にかかる濃度補正印刷制御装置が適用される印刷システムをブロック図により示している。
同図において、コンピュータ10は、パーソナルコンピュータなどが該当する。コンピュータ10は、ハードウェアとしてCPU、ROM、RAMに加え、図示していないハードディスクなどの外部記憶装置、スキャナ30(光学読取装置)等を備え、入力機器としてキーボード、マウス等を備え、表示装置としてディスプレイ等を備えている。コンピュータ10は、ソフトウェアとハードウェアとが有機的に連携して所定の機能を実現する。本実施形態では、ソフトウェア構成として、図1に示すようなプリンタドライバ10c、アプリケーション10b、補正値設定プログラム10a、等を備えている。
(1) Configuration of printing system:
FIG. 1 is a block diagram showing a printing system to which a density correction printing control apparatus according to an embodiment of the present invention is applied.
In the figure, the computer 10 corresponds to a personal computer or the like. The computer 10 includes a CPU, ROM, RAM as hardware, an external storage device such as a hard disk (not shown), a scanner 30 (optical reader), and the like, a keyboard, a mouse, etc. as input devices, and a display device. A display is provided. The computer 10 realizes a predetermined function by organically linking software and hardware. In this embodiment, the printer configuration includes a printer driver 10c, an application 10b, a correction value setting program 10a, and the like as shown in FIG.

アプリケーション10bは、ドットマトリクス状の画像データをプリンタドライバ10cに出力する。この画像データは、RGBの各色成分を256階調で階調表現した階調データである(RGBデータ)。アプリケーション10bからRGBデータを受け取ったプリンタドライバ10cは、このRGBデータに対して解像度変換処理と色変換処理と階調変換処理とラスタライズ処理とを行う。本実施形態においては、解像度変換処理と色変換処理と階調変換処理とをハーフトーン(H/T)モジュール10c1が担当し、ラスタライズ処理をインタレースモジュール10c2が担当する。   The application 10b outputs dot matrix image data to the printer driver 10c. This image data is gradation data in which each RGB color component is expressed with 256 gradations (RGB data). The printer driver 10c that has received RGB data from the application 10b performs resolution conversion processing, color conversion processing, gradation conversion processing, and rasterization processing on the RGB data. In the present embodiment, the resolution conversion process, the color conversion process, and the gradation conversion process are handled by the halftone (H / T) module 10c1, and the rasterization process is performed by the interlace module 10c2.

H/Tモジュール10c1は、RGBデータを受け取ると、まず解像度変換処理を行う。解像度変換処理では、アプリケーションプログラムが扱っているカラー画像データの解像度をプリンタドライバ10cが扱うことができる解像度に変換する。次に、H/Tモジュール10c1は色変換処理を行う。色変換処理は、RGB階調値をCMYK(C:シアン,M:マゼンタ,Y:イエロー,K:ブラック)階調値に変換する処理であり、RGBで表現された画像データの各ドットデータをCMYKのドットデータ(CMYKデータ)に変換する。その後、H/Tモジュール10c1は、CMYKデータに対して階調変換処理を行う。階調変換処理は、各ドットのCMYK階調値を変換してインク滴のドットの分布で表現するためのハーフトーン処理であり、変換後の記録密度でインクを付着させるためのヘッド駆動データを生成する。   When receiving the RGB data, the H / T module 10c1 first performs resolution conversion processing. In the resolution conversion process, the resolution of the color image data handled by the application program is converted to a resolution that can be handled by the printer driver 10c. Next, the H / T module 10c1 performs color conversion processing. The color conversion process is a process of converting RGB gradation values into CMYK (C: cyan, M: magenta, Y: yellow, K: black) gradation values, and each dot data of image data expressed in RGB is converted. Conversion into CMYK dot data (CMYK data). Thereafter, the H / T module 10c1 performs gradation conversion processing on the CMYK data. The gradation conversion process is a halftone process for converting the CMYK gradation value of each dot and expressing it by the distribution of the dots of the ink droplets. The head drive data for attaching the ink at the converted recording density is obtained. Generate.

インタレースモジュール10c2は、ヘッド駆動データを受け取ると、ラスタライズ処理を行う。プリンタ20においてはインク吐出デバイスとして図示しない吐出ノズルアレイが搭載されており、当該ノズルアレイでは副走査方向に複数の吐出ノズルが並設されるため、副走査方向に数ドット分間離れたデータが同時に使用される。そこで、主走査方向に並ぶヘッド駆動データのうち同時に使用されるべきものがプリンタ20にて同時にバッファリングされるように順番に並べ替えるラスタライズを行う。ここで主走査方向とは印刷ヘッドが往復動する方向であり、これに対し、紙送り方向が副走査方向となる。インタレースモジュール10c2は、ラスタライズ処理の後、画像の解像度などの所定の情報を付加した印刷データを生成し、I/Fを介してプリンタ20に出力し、印刷を行わせる。   When receiving the head drive data, the interlace module 10c2 performs a rasterization process. In the printer 20, an ejection nozzle array (not shown) is mounted as an ink ejection device. In the nozzle array, a plurality of ejection nozzles are arranged in parallel in the sub-scanning direction. used. Therefore, rasterization is performed in which the head drive data arranged in the main scanning direction is rearranged in order so that data to be used simultaneously is buffered by the printer 20. Here, the main scanning direction is the direction in which the print head reciprocates, whereas the paper feed direction is the sub-scanning direction. After the rasterization process, the interlace module 10c2 generates print data to which predetermined information such as image resolution is added, and outputs the print data to the printer 20 via the I / F to perform printing.

プリンタ20は、少なくとも、CPUやROMやRAMを備えて主に制御を司る制御部21と、色インクを吐出する印刷ヘッドユニット25と、ヘッドユニットを印刷用紙の紙送り方向と直行する主走査方向に往復動させるキャリッジユニット26と、印刷用紙を紙送り方向である副走査方向に搬送する紙送りユニット27と、制御部21の制御に従って各ユニット25〜27を駆動するユニット制御回路24と、コンピュータ10のI/Fに接続されたインターフェース(I/F)29と、を備えている。   The printer 20 includes at least a CPU, a ROM, and a RAM, and mainly controls the control unit 21, a print head unit 25 that discharges color ink, and a main scanning direction in which the head unit is orthogonal to the paper feed direction of the printing paper. A carriage unit 26 that reciprocates the paper, a paper feed unit 27 that conveys printing paper in the sub-scanning direction, which is the paper feed direction, a unit control circuit 24 that drives the units 25 to 27 in accordance with the control of the control unit 21, and a computer And an interface (I / F) 29 connected to 10 I / Fs.

プリンタ20は、コンピュータ10から印刷データを受信すると、制御部21が各ユニット(印刷ヘッドユニット、キャリッジユニット、紙送りユニット)を制御して印刷データに基づく印刷を行わせる。なお、プリンタ20はこれらの他にも、プリンタ20内部の状況(紙位置、インク量、印刷ヘッド位置、等)を監視して検出結果を制御部に出力するセンサ群28、コンピュータ10のI/F15と通信可能に接続されたI/F29、不揮発性のメモリ23、等を備えている。   When the printer 20 receives print data from the computer 10, the control unit 21 controls each unit (print head unit, carriage unit, paper feed unit) to perform printing based on the print data. In addition to these, the printer 20 monitors the internal conditions of the printer 20 (paper position, ink amount, print head position, etc.) and outputs a detection result to the control unit 28, and the I / O of the computer 10 An I / F 29, a non-volatile memory 23, and the like that are communicably connected to the F15 are provided.

図2は印刷ヘッドのノズル配置を示す図である。印刷ヘッドユニット25は、複数のノズルから成る印刷ヘッド25aを備える。印刷ヘッドユニット25は、ユニット制御回路24から印刷データに対応する印加電圧データを入力されて、ピエゾ素子への印加電圧パターンを生成し、ピエゾ素子を駆動して各ノズルのインクチャンバーを圧縮・伸張し、ノズルからインク滴を吐出させる。この印刷ヘッドは各色インクに対応する複数のノズルを備えており、各色インク毎に整列している。各色インクに対応するノズル列は搬送方向に沿って、一定のノズルピッチで整列している。   FIG. 2 is a diagram showing the nozzle arrangement of the print head. The print head unit 25 includes a print head 25a composed of a plurality of nozzles. The print head unit 25 receives the applied voltage data corresponding to the print data from the unit control circuit 24, generates an applied voltage pattern to the piezo element, and drives the piezo element to compress and expand the ink chamber of each nozzle. Then, ink droplets are ejected from the nozzles. This print head is provided with a plurality of nozzles corresponding to each color ink, and is aligned for each color ink. Nozzle rows corresponding to each color ink are aligned at a constant nozzle pitch along the transport direction.

キャリッジユニット26は、モータにより印刷ヘッドユニット25を主走査方向に往復動させるものである。このキャリッジユニット26は、ユニット制御回路24の制御により、印刷ヘッドから吐出される色インクのドットが印刷用紙上における主走査方向の所定位置に付着されるように吐出タイミングと同期して往復動する。   The carriage unit 26 reciprocates the print head unit 25 in the main scanning direction by a motor. The carriage unit 26 reciprocates in synchronism with the ejection timing so that the dots of the color ink ejected from the print head adhere to a predetermined position in the main scanning direction on the printing paper under the control of the unit control circuit 24. .

紙送りユニット27は、紙を副走査方向に搬送するものである。この紙送りユニットは搬送ローラを備えており、印刷ヘッドユニットの往復動にタイミングを合わせて所定量の紙送りを行う。   The paper feed unit 27 conveys paper in the sub-scanning direction. The paper feeding unit includes a conveyance roller, and feeds a predetermined amount of paper in synchronization with the reciprocation of the print head unit.

以上説明した本実施形態のプリンタ20は、CMYK(シアン、マゼンタ、イエロー、ブラック)の各インクを印刷ヘッドから吐出して印刷媒体にインクのドットを形成して印刷するインクジェットプリンタとして記載してあるが、無論、印刷装置には、CやMやKの淡色、Yの濃色、レッド、バイオレット、無着色インク、等も使用する装置、CMYKのいずれかを使用しない装置、等も採用可能である。   The printer 20 of the present embodiment described above is described as an ink jet printer that prints by forming ink dots on a print medium by ejecting CMYK (cyan, magenta, yellow, and black) inks from a print head. However, of course, the printing device can use C, M or K light color, Y dark color, red, violet, uncolored ink, etc., or any device that does not use any of CMYK. is there.

ところで、プリンタドライバ10cは、主走査方向に濃淡となって発生する濃度ムラを補正する補正モジュール10c3を備えている。この補正モジュール10c3は、H/Tモジュール10c1から画像データを取得して取得し、メモリ13に記憶された補正値13aに従って取得した画像データに対して濃度ムラを補正するための処理を行う。ここで、補正モジュールが実現する濃度ムラの補正について説明する。   By the way, the printer driver 10c includes a correction module 10c3 that corrects density unevenness that occurs in the main scanning direction. The correction module 10c3 acquires and acquires image data from the H / T module 10c1, and performs processing for correcting density unevenness on the acquired image data according to the correction value 13a stored in the memory 13. Here, correction of density unevenness realized by the correction module will be described.

図2に示すように、印刷ヘッド25aの各ノズルは、色毎に副走査方向に整列している。この印刷ヘッドを主走査方向に走査しつつインク滴を紙面に飛ばすことで、各ノズルがラスタを形成する。しかしながら、各ノズルのインク吐出方向は完全に同一ではなく、インク吐出方向にばらつきが存在する。例えば、インク吐出方向が主走査方向の上流側に向いていたり、主走査方向の下流側に向いていたりする。従って、各ノズルから均等にインク吐出を行うと、インク吐出方向のばらつきのために印刷結果に濃度ムラが表れることになる。   As shown in FIG. 2, the nozzles of the print head 25a are aligned in the sub-scanning direction for each color. Each nozzle forms a raster by ejecting ink droplets onto the paper surface while scanning the print head in the main scanning direction. However, the ink discharge directions of the nozzles are not completely the same, and there are variations in the ink discharge directions. For example, the ink ejection direction may be directed upstream in the main scanning direction, or may be directed downstream in the main scanning direction. Therefore, if ink is ejected from each nozzle evenly, density unevenness appears in the printing result due to variations in the ink ejection direction.

そこで、プリンタ20で印刷する際、印刷データにおける各ラスタの印刷に使用されるノズルが一意的に決まることを利用して、測定用パターンを印刷させ、印刷結果の濃度ムラを測定し、濃度ムラを解消するような補正値を作成してプリンタに設定する。そして、この補正値に基づいて補正された印刷データで印刷すると、このような濃度ムラの発生を防ぐことが可能となる。このように補正値に基づいて画像データの補正を行う補正モジュール10c3が画像補正手段を構成する。   Therefore, when printing with the printer 20, using the fact that the nozzles used for printing each raster in the print data are uniquely determined, the measurement pattern is printed, the density unevenness of the printing result is measured, and the density unevenness is measured. A correction value that eliminates the problem is created and set in the printer. When printing is performed using print data corrected based on the correction value, it is possible to prevent such density unevenness from occurring. Thus, the correction module 10c3 that corrects the image data based on the correction value constitutes an image correction unit.

この補正値は、以下の濃度ムラ補正値設定処理で作成され、各プリンタに設定される。なお、補正値設定処理は、プリンタの出荷前に工場等で実行されて、プリンタ毎に作成された補正値が設定される。そして、補正値の設定されたプリンタを購入したユーザのもとでプリンタドライバなどのインストール時に、プリンタからコンピュータに読み込まれて保存される。この保存された補正値を利用して、補正モジュールが画像データの補正を行うことになる。   This correction value is created by the following density unevenness correction value setting process and set in each printer. The correction value setting process is executed at a factory or the like before shipment of the printer, and a correction value created for each printer is set. Then, when a printer driver or the like is installed by a user who has purchased a printer with a correction value set, it is read from the printer and stored in the computer. Using the stored correction value, the correction module corrects the image data.

(2)濃度ムラ補正値設定処理:
以下、濃度ムラを補正する補正値の設定について説明する。この補正値の設定は、プリンタ製造工場の検査工程において、プリンタ20にテストパターンを印刷させ、テストパターンをスキャナ30で読み取り、副走査方向におけるテストパターンの濃度変化を計測し、この濃度変化に基づいて補正値をプリンタ20のメモリ13に記憶することにより行われる。即ち、プリンタ20に記憶される補正値は、個々のプリンタ20における濃度ムラの特性を反映したものになる。
(2) Density unevenness correction value setting processing:
Hereinafter, setting of correction values for correcting density unevenness will be described. The correction value is set by causing the printer 20 to print a test pattern in the inspection process of the printer manufacturing factory, reading the test pattern with the scanner 30, and measuring the change in the density of the test pattern in the sub-scanning direction. The correction value is stored in the memory 13 of the printer 20. That is, the correction value stored in the printer 20 reflects the characteristic of density unevenness in each printer 20.

図3は、プリンタ20の製造後の検査工程で実行される補正値設定プログラムの処理を示すフローチャートである。
まず、検査者は、検査対象となるプリンタ20をコンピュータ10に接続して補正値設定プログラムを実行する。このコンピュータ10には、予め、スキャナ30も接続されており、プリンタ20のプリンタドライバ10cと、スキャナ30を制御するためのスキャナドライバと、スキャナ30が読み取ったテストパターンの画像データから補正値を算出してプリンタ20に補正値を設定する補正値設定プログラム10aがインストールされている。
FIG. 3 is a flowchart showing the process of the correction value setting program executed in the inspection process after manufacturing the printer 20.
First, the inspector connects the printer 20 to be inspected to the computer 10 and executes the correction value setting program. A scanner 30 is also connected to the computer 10 in advance, and a correction value is calculated from the printer driver 10c of the printer 20, the scanner driver for controlling the scanner 30, and the image data of the test pattern read by the scanner 30. Then, the correction value setting program 10a for setting the correction value in the printer 20 is installed.

処理が開始されるとステップS30で、プリンタ20にテストパターンの印刷を行わせる。このステップS30でプリンタ20にテストパターンの印刷を行わせるコンピュータ10が印刷手段を構成する。
図4は、テストパターンの説明図である。このテストパターンは、例えば720×720dpiの印刷解像度で印刷され、左から順にK,C,M,Yの色別に4つの補正用パターンが並べてある。各補正用パターンは、5種類の濃度(階調値)の帯状パターンと、帯状パターンを囲う上罫線と、下罫線と、左罫線と、右罫線とにより構成されている。
When the process is started, in step S30, the printer 20 is caused to print a test pattern. In step S30, the computer 10 that causes the printer 20 to print a test pattern constitutes a printing unit.
FIG. 4 is an explanatory diagram of a test pattern. This test pattern is printed at a print resolution of, for example, 720 × 720 dpi, and four correction patterns are arranged in order of K, C, M, and Y in order from the left. Each correction pattern is composed of five types of density (gradation value) band patterns, an upper ruled line surrounding the band pattern, a lower ruled line, a left ruled line, and a right ruled line.

帯状パターンは、それぞれ、副走査方向の所定範囲で一定の階調値となり、主走査方向に異なる階調値の帯状パターンが並ぶような画像データとして形成されている。図4においては、左の帯状パターンから順に濃い濃度のパターンになっている。なお、このテストパターンを印刷する際には、前述した補正モジュール10c3による補正値に基づいた濃度補正処理は行われない。   Each of the belt-like patterns is formed as image data that has a constant gradation value in a predetermined range in the sub-scanning direction and in which belt-like patterns having different gradation values are arranged in the main scanning direction. In FIG. 4, the darker density pattern is in order from the left belt-like pattern. Note that when the test pattern is printed, the density correction process based on the correction value by the correction module 10c3 described above is not performed.

次に、検査者は、プリンタ20でテストパターンが印刷された紙を、スキャナ30の読取位置にセットし、読み取りを行わせる。そして、スキャナドライバを介して、読み取られたテストパターンの画像データ(光学読取画像)をコンピュータ10が取得する(ステップS32)。   Next, the inspector sets the paper on which the test pattern is printed by the printer 20 to the reading position of the scanner 30 and causes the reading to be performed. Then, the computer 10 acquires image data (optical read image) of the read test pattern via the scanner driver (step S32).

図5は、補正用パターンの読み取り範囲の説明図である。補正用パターンを囲む一点鎖線の範囲が、スキャニングを行う範囲である。この範囲を特定するためのパラメータSX1、SY1、SW1及びSH1は、補正値設定プログラムによって予めスキャナドライバに設定されている。この範囲はテストパターンよりも広めに設定されており、この範囲をスキャナ30に読み取らせれば、テストパターンの印刷された原稿が多少ずれてスキャナ30にセットされても、補正用パターンの全体を読み取ることができる。この処理により、図中の読み取り範囲の画像が、矩形の画像データとして高解像度で生成されてコンピュータ10に取り込まれる。   FIG. 5 is an explanatory diagram of the reading range of the correction pattern. The range of the alternate long and short dash line surrounding the correction pattern is the range where scanning is performed. Parameters SX1, SY1, SW1, and SH1 for specifying this range are set in advance in the scanner driver by the correction value setting program. This range is set wider than the test pattern. If this range is read by the scanner 30, the entire correction pattern is read even if the document on which the test pattern is printed is set slightly on the scanner 30. be able to. By this processing, an image in the reading range in the figure is generated as high-resolution rectangular image data and is captured by the computer 10.

このスキャナドライバを介して光学読取画像を取得するコンピュータ10が、印刷結果取得手段を構成する。そして、以下のステップS36〜S48の処理を実行して、この読取画像から補正用パターンを検出して補正値の算出及び設定を行う。この補正値の算出と設定とを行う補正値設定プログラム10aを実行するコンピュータ10が補正値設定手段を構成する。   A computer 10 that acquires an optically read image via the scanner driver constitutes a print result acquisition unit. Then, the following steps S36 to S48 are executed to detect a correction pattern from the read image and calculate and set a correction value. The computer 10 that executes the correction value setting program 10a for calculating and setting the correction value constitutes a correction value setting means.

次に、補正値設定プログラム10aは、切り出された画像に図6の罫線検出処理を行って罫線位置を検出し、読取画像を正立回転させる画像処理(S38)を行う。ここで行われる罫線検出処理は、読取画像を正立回転させる処理のみならず、トリミング処理やパターン位置検出処理でも行われる。   Next, the correction value setting program 10a performs the ruled line detection process of FIG. 6 on the cut image to detect the ruled line position, and performs image processing (S38) for rotating the read image upright. The ruled line detection process performed here is performed not only in the process of rotating the read image upright but also in the trimming process and the pattern position detection process.

図6に示す罫線検出処理においては、まず、罫線に対して略直交する方向に1列に並ぶ画素の列において、所定位置の画素列間の濃度を平均した平均濃度から罫線検出を行う。この罫線検出処理の結果は、テストパターンの範囲を特定し、テストパターンに印刷された各ラスタが何れのノズルで印刷されたかを特定するために利用されるため、高い精度が要求される。   In the ruled line detection process shown in FIG. 6, first, ruled line detection is performed from an average density obtained by averaging the densities between pixel columns at predetermined positions in a column of pixels arranged in a line in a direction substantially orthogonal to the ruled line. The result of the ruled line detection process is used to identify the test pattern range and to identify which nozzle has printed each raster printed on the test pattern, and therefore requires high accuracy.

図8は、平均濃度の算出と、この平均濃度を利用した罫線検出の説明図である。無論、罫線検出は、主走査方向に並ぶ(後述のトリミング処理では副走査方向に並ぶ)何れか1列の画素列の濃度分布からでも可能である。しかしながら、読取画像には、ノイズに起因するゴミ画像が含まれていたり、原稿に付着する微細な埃やゴミ等の存在によって所定サイズ以下のゴミ画像が形成されたりする可能性がある。このような場合、図7の(a)に示すようなa1,a2,an−1,anのように、ゴミ画像を含まない画素列であれば正常な罫線検出が可能であるが、画素列a3や画素列an−2のようにゴミ画像が存在する画素列から罫線検出を行ってしまうと、罫線位置にずれが生じ、後述の回転処理やトリミング処理、パターン位置検出処理が正しく行えない。   FIG. 8 is an explanatory diagram of calculation of the average density and ruled line detection using the average density. Of course, the ruled line detection can be performed from the density distribution of any one of the pixel columns arranged in the main scanning direction (aligned in the sub-scanning direction in the trimming process described later). However, the scanned image may include a dust image due to noise, or a dust image having a predetermined size or less may be formed due to the presence of fine dust, dust, or the like attached to the document. In such a case, a normal ruled line can be detected as long as the pixel row does not include a dust image, such as a1, a2, an-1, and an as shown in FIG. If ruled line detection is performed from a pixel column in which a dust image exists such as a3 or pixel column an-2, the ruled line position is shifted, and rotation processing, trimming processing, and pattern position detection processing described later cannot be performed correctly.

そこで、これらゴミ画像が各画素列で発生する頻度がランダムであるのに対し、罫線は何れの画素列にも均等に含まれることに着目する。即ち、画素列間で濃度を平均化すると、ランダムに発生するゴミ画像は平均化されて濃度が低下するのに対し、罫線濃度は一定の濃度を保つことを利用する。   Therefore, attention is paid to the fact that the frequency of occurrence of these dust images in each pixel column is random, while the ruled lines are equally included in any pixel column. That is, when the density is averaged between the pixel columns, randomly generated dust images are averaged and the density is lowered, whereas the ruled line density is maintained at a constant density.

図7は、罫線検出処理に使用する画素の列を説明する図である。同図では、読み取り範囲の左上を原点として右方向をx方向、下方向をy方向としてある。同図に示すように、KX1〜KX2列には、それぞれn列の画素列が含まれる。KX3〜KX4列については図示を省略しているが、KX1〜KX2列と同様である。ステップS100ではこれらKX1〜KX2列とKX3〜KX4列の画素列を抽出する。そしてステップS102で、これらKX1〜KX2列の間、およびKX3〜KX4列の画素列の間で、罫線方向と略一致する方向に並ぶ画素間(y座標が同一となる画素間)で濃度をそれぞれ平均し、図8(b)のような平均濃度を算出する。   FIG. 7 is a diagram for explaining a column of pixels used for ruled line detection processing. In the figure, the upper left of the reading range is the origin, the right direction is the x direction, and the lower direction is the y direction. As shown in the drawing, each of the KX1 and KX2 columns includes n pixel columns. The KX3 to KX4 columns are not shown, but are the same as the KX1 to KX2 columns. In step S100, the pixel columns KX1 to KX2 and KX3 to KX4 are extracted. In step S102, the density is set between the pixels arranged in the direction substantially coincident with the ruled line direction (between pixels having the same y coordinate) between the KX1 to KX2 columns and the KX3 to KX4 column. The average is calculated as shown in FIG.

ここで、読取画像の位置(x,y)の画素の濃度(階調値)をD(x,y)とすると、KX1〜KX列の画素列間の平均濃度Daveは
となる。同様に、KX3〜KX4列の画素列間の平均濃度は
で表される。ここで、KX1〜KX2,KX3〜KX4は、縦罫線や帯状パターンと干渉しないように設定されている。
Here, if the density (gradation value) of the pixel at the position (x, y) of the read image is D (x, y), the average density Dave between the pixel columns of the KX1 to KX columns is
It becomes. Similarly, the average density between the pixel columns KX3 to KX4 is
It is represented by Here, KX1 to KX2 and KX3 to KX4 are set so as not to interfere with the vertical ruled lines and the belt-like pattern.

このように算出された平均濃度では、ゴミ画像の濃度が低下されている。しかしながら、完全にゴミ画像の濃度が0になるわけではない。そこで、ゴミ画像の罫線検出に対する影響をさらに低減するために濃度閾値を設定し、ステップS104でこの濃度閾値を超えた部位を罫線として検出することにする。即ち、濃度閾値内に収まればゴミ画像の濃度であるとして罫線ではないと判断する。この濃度閾値は、ゴミ画像の出現度合い等を考慮して、平均濃度に含まれる得るゴミ画像の濃度以上となるように設定される。   With the average density calculated in this way, the density of the dust image is lowered. However, the density of the dust image is not completely zero. Therefore, in order to further reduce the influence of the dust image on the ruled line detection, a density threshold is set, and in step S104, a part exceeding the density threshold is detected as a ruled line. That is, if it falls within the density threshold, it is determined that the density of the dust image is not a ruled line. This density threshold is set to be equal to or higher than the density of dust images that can be included in the average density in consideration of the appearance degree of dust images and the like.

この濃度閾値との比較では、補正値設定プログラムは、画素列の平均濃度を上から順にKHまで濃度閾値th1と比較していく。そして、濃度閾値を超えた最初の画素KH1から、濃度閾値を超えた最後の画素KH2までの間隔KW1を、罫線の幅と判断する。このように、濃度閾値を適切に設定することにより、より確実にゴミ画像の影響を排除できる。   In the comparison with the density threshold value, the correction value setting program compares the average density of the pixel columns with the density threshold value th1 from the top up to KH. Then, the interval KW1 from the first pixel KH1 exceeding the density threshold to the last pixel KH2 exceeding the density threshold is determined as the width of the ruled line. As described above, by appropriately setting the density threshold value, it is possible to more reliably eliminate the influence of the dust image.

ところで、ゴミ画像が少ない時や、大きなゴミがない場合は、平均濃度を取って濃度閾値を超えた部位を罫線とすることにより罫線検出に成功する。しかしながら、多くのゴミ画像が含まれた場合に、平均濃度を取ってもゴミ画像の濃度が低下しなかったり、罫線検出に使用される位置(KX1〜KX2,KX3〜KX4)に罫線に近接して大きなゴミ画像が形成されて罫線の幅にゴミ画像の幅も含まれたりする場合には、罫線の幅KW1が実際よりも大きくなったりすることが考えられる。   By the way, when there are few dust images or when there is no big dust, the ruled line detection is successful by taking the average density and setting the part exceeding the density threshold as the ruled line. However, when a large number of dust images are included, the density of the dust images does not decrease even when the average density is taken, or the positions used for ruled line detection (KX1 to KX2, KX3 to KX4) are close to the ruled lines. If a large dust image is formed and the width of the ruled line includes the width of the dust image, the ruled line width KW1 may be larger than the actual size.

そこで、図9のように予め、罫線幅の上限(幅閾値)KW0を設定しておき、ステップS106で罫線の幅KW1を判定し、幅閾値を超えると、濃度閾値を超えた部位にゴミ画像が存在すると判別する。より具体的には、検出された罫線幅KW1と幅閾値KW0とを比較し、罫線幅KW1が幅閾値KW0以下であれば罫線検出成功とし、罫線幅Kw1が幅閾値KW0を超えた場合は罫線検出失敗として補正値設定プログラムを終了する。   Accordingly, as shown in FIG. 9, an upper limit (width threshold value) KW0 of the ruled line width is set in advance, and the ruled line width KW1 is determined in step S106. Is determined to exist. More specifically, the detected ruled line width KW1 and the width threshold value KW0 are compared, and if the ruled line width KW1 is equal to or smaller than the width threshold value KW0, the ruled line detection is successful, and if the ruled line width Kw1 exceeds the width threshold value KW0, the ruled line The correction value setting program is terminated as a detection failure.

そして、ステップS108で、検出された罫線幅から罫線位置を決定する。本発明では濃度閾値を超えた部位を罫線幅としている。そのため、濃度閾値の取り方によっては、濃度閾値を超えた最初の位置および濃度閾値を超えた最後の位置は、実際の罫線の両端の位置とは異なってしまう。そこで、検出された罫線の幅の中間を罫線位置とする。これにより、どのような濃度閾値を採用しても、常に同じ位置を罫線位置として認識可能となる。無論、罫線位置の決定方法は、検出された罫線幅の中間に限られるものではなく、例えば、平均濃度に含まれる階調値の重心位置を罫線位置とすることも考えられる。   In step S108, the ruled line position is determined from the detected ruled line width. In the present invention, a part exceeding the density threshold is defined as a ruled line width. Therefore, depending on how to set the density threshold, the first position exceeding the density threshold and the last position exceeding the density threshold are different from the positions at both ends of the actual ruled line. Therefore, the middle of the width of the detected ruled line is set as the ruled line position. This makes it possible to always recognize the same position as the ruled line position regardless of what density threshold value is employed. Of course, the ruled line position determination method is not limited to the middle of the detected ruled line width, and for example, the barycentric position of the gradation value included in the average density may be considered as the ruled line position.

以上の罫線検出処理で検出された罫線位置に基づき、読取画像に含まれる罫線位置から補正用パターンの傾きθを検出し、読取画像に対してこの傾きθに応じた回転を行って読取画像を正立させる画像処理を行う。具体的には、次式により補正用パターンの傾きθを算出し、算出された傾きθに基づいて、画像データの回転処理を行う。
この回転処理は罫線検出処理で検出された罫線位置に基づいて行われるため、ゴミ画像の影響を排した正確な罫線位置を利用することにより、正確な回転処理が可能となる。
Based on the ruled line position detected in the above ruled line detection process, the inclination θ of the correction pattern is detected from the ruled line position included in the read image, and the read image is rotated by rotating the read image according to the inclination θ. Image processing for erecting is performed. Specifically, the inclination θ of the correction pattern is calculated by the following equation, and image data rotation processing is performed based on the calculated inclination θ.
Since this rotation process is performed based on the ruled line position detected by the ruled line detection process, it is possible to perform an accurate rotation process by using an accurate ruled line position without the influence of the dust image.

次に、補正値設定プログラムは、読取画像の中から不要な画素をトリミングする画像処理を行う。
図10は、トリミングの際の読取画像の説明図である。まず、補正値設定プログラムは、回転処理されて正立された読取画像の中から、KX1〜KX2列の画素列であって上からKH個の画素の画素データと、KX3〜KX4列の画素列であって上からKH個の画素の画素データと、を取り出す。同様に、補正値設定プログラムは、回転処理されて正立した読取画像の中から、KX1〜KX2列の画素列であって下からKH個の画素の画素データと、KX3〜KX4列の画素列であって下からKH個の画素の画素データと、を取り出す。そして、前述した罫線検出処理と同様に、各画素列の平均濃度を求めて、濃度閾値および幅閾値にて罫線位置を検出する。
Next, the correction value setting program performs image processing for trimming unnecessary pixels from the read image.
FIG. 10 is an explanatory diagram of a read image at the time of trimming. First, the correction value setting program includes pixel data of KH1 to KX2 columns, pixel data of KH pixels from the top, and pixel rows of KX3 to KX4 from the read image that has been rotated and erected. Then, pixel data of KH pixels are extracted from the top. Similarly, the correction value setting program includes pixel data of KH1 to KX2 columns from the bottom, and pixel data of KH pixels from the bottom, and pixel columns of KX3 to KX4 from the read image that has been rotated and erected. Then, pixel data of KH pixels are taken out from the bottom. Then, similarly to the ruled line detection process described above, the average density of each pixel column is obtained, and the ruled line position is detected using the density threshold value and the width threshold value.

検出された罫線位置に基づいて、上罫線においては検出された罫線位置から罫線幅の1/2だけ上側の位置において、下罫線においては検出された罫線位置から罫線幅の1/2だけ下側の位置において、それぞれ最も近い画素の境界をトリミング位置に決定する。そして、補正値設定プログラムは、上罫線のトリミング位置よりも上側の画素、および下罫線のトリミング位置よりも下側の画素をそれぞれ切り取り、トリミングを行なう。トリミング位置を決定するための罫線幅は、予め補正値設定プログラムに設定されているものとする。   Based on the detected ruled line position, the upper ruled line is lower than the detected ruled line position by 1/2 of the ruled line width, and the lower ruled line is lower than the detected ruled line position by 1/2 of the ruled line width. , The nearest pixel boundary is determined as the trimming position. Then, the correction value setting program cuts out the pixels above the trimming position of the upper ruled line and the pixels below the trimming position of the lower ruled line, and performs trimming. The ruled line width for determining the trimming position is set in advance in the correction value setting program.

このトリミング処理においても罫線位置に基づいて行われる。よって、罫線検出処理で正確な罫線位置が検出されることにより、印刷データのラスタ位置と読取画像のラスタ位置が正確に対応し、補正モジュールによる補正が正しく行えるようになる。   This trimming process is also performed based on the ruled line position. Therefore, by detecting the exact ruled line position in the ruled line detection process, the raster position of the print data and the raster position of the read image correspond to each other accurately, and correction by the correction module can be performed correctly.

次に、補正値設定プログラムは、Y方向の画素数が補正用パターンを構成するドット列の数と同数になるように、トリミングされた読取画像を解像度変換する。
図11は、解像度変換の説明図である。仮に、プリンタ20が補正用パターンを理想的に形成し、スキャナ30が補正用パターンを理想的に読み取れば、トリミング後の読取画像のY方向の画素数は、所定値になるはずである。しかし、実際には印刷時や読み取り時のズレの影響があって、読取画像のY方向の画素数が所定値にならないことがある。
Next, the correction value setting program converts the resolution of the trimmed read image so that the number of pixels in the Y direction is the same as the number of dot rows constituting the correction pattern.
FIG. 11 is an explanatory diagram of resolution conversion. If the printer 20 ideally forms a correction pattern and the scanner 30 ideally reads the correction pattern, the number of pixels in the Y direction of the read image after trimming should be a predetermined value. However, in actuality, the number of pixels in the Y direction of the read image may not be a predetermined value due to the influence of misalignment during printing or reading.

そこで補正値設定プログラムは、この読取画像に対して、[補正用パターンを構成するドット列の数]/[トリミング後の読取画像のY方向の画素数]の倍率で解像度変換(縮小処理)を行ない、解像度変換後の読取画像のY方向の画素数を所定値にする。   Therefore, the correction value setting program performs resolution conversion (reduction processing) on the read image at a magnification of [number of dot columns constituting the correction pattern] / [number of pixels in the Y direction of the read image after trimming]. The number of pixels in the Y direction of the read image after resolution conversion is set to a predetermined value.

次に、補正値設定プログラムは、各列領域における5種類の帯状パターンのそれぞれの濃度を測定する。以下、1番目の列領域における階調値で形成された左側の帯状パターンの濃度の測定について説明する。なお、他の列領域における測定も同様に行なわれる。また、他の帯状パターンの濃度の測定も同様に行なわれる。   Next, the correction value setting program measures the density of each of the five types of belt-like patterns in each row region. Hereinafter, the measurement of the density of the left band-shaped pattern formed with the gradation values in the first row region will be described. Measurements in other row regions are performed in the same manner. In addition, the measurement of the density of other band-like patterns is performed in the same manner.

図12(a)は、左罫線の検出の際の読取画像の説明図である。図12(b)は、左罫線の位置の検出の説明図である。図12(c)は、1番目の列領域の濃度30%の帯状パターンの濃度の測定範囲の説明図である。   FIG. 12A is an explanatory diagram of a read image when the left ruled line is detected. FIG. 12B is an explanatory diagram of detection of the position of the left ruled line. FIG. 12C is an explanatory diagram of the measurement range of the density of the band-like pattern having a density of 30% in the first row region.

補正値設定プログラムは、解像度変換された読取画像の中から、上からH1〜H2列の画素列であって、左からKX個の画素の画素データを取り出す。このとき取り出される画素の中に左罫線が含まれるように、パラメータKXが予め定められている。そして、補正値設定プログラムは、前述の罫線検出処理と同様の処理を行って罫線位置を求める。   The correction value setting program extracts pixel data of KX pixels from the left, which are H1 to H2 pixel rows, from the top, from the resolution-converted read image. The parameter KX is determined in advance so that the left ruled line is included in the pixels extracted at this time. Then, the correction value setting program obtains the ruled line position by performing the same process as the ruled line detection process described above.

補正用パターンの形状は既定であるため、この罫線位置(左罫線の位置)からX2だけ右側に、濃度30%の帯状パターンが幅W3に亘って存在している。そこで、補正値設定プログラムは、罫線位置を基準にして、目的の帯状パターン位置に合致する画素データをラスタに対応する領域毎に抽出し、この領域に含まれる画素データの階調値の平均値を測定する。このようにして、補正値設定プログラムは、帯状パターンの濃度をラスタ毎にそれぞれ測定して濃度分布を作成する。   Since the shape of the correction pattern is predetermined, a strip-shaped pattern having a density of 30% exists over the width W3 on the right side by X2 from this ruled line position (left ruled line position). Therefore, the correction value setting program extracts pixel data matching the target band pattern position for each area corresponding to the raster with respect to the ruled line position, and the average value of the gradation values of the pixel data included in this area Measure. In this way, the correction value setting program creates the density distribution by measuring the density of the belt-like pattern for each raster.

このパターン位置(パターンの印刷された位置)を検出する画像処理においても、罫線位置の正確な検出が重要である。罫線検出処理によって正確な罫線位置が検出されることにより、濃度分布と印刷データのラスタ位置とが正しく対応付けられ、補正値に基づく補正が実効あるものとなる。   In the image processing for detecting the pattern position (position where the pattern is printed), it is important to accurately detect the ruled line position. By detecting the exact ruled line position by the ruled line detection process, the density distribution and the raster position of the print data are correctly associated, and the correction based on the correction value is effective.

このようにして測定された画素データの濃度分布に基づいて、濃度分布のムラを補正する補正値を求め、プリンタ20のメモリ23に記憶させる。無論、プリンタ20に補正値を設定する前に、求めた補正値を適用してテストパターンの印刷を行い、補正値の実効性を確認してもよい。   Based on the density distribution of the pixel data measured in this way, a correction value for correcting unevenness of the density distribution is obtained and stored in the memory 23 of the printer 20. Of course, before setting a correction value in the printer 20, the obtained correction value may be applied to print a test pattern to confirm the effectiveness of the correction value.

以上、ステップS100〜S102の罫線検出処理を実行するコンピュータ10が平均濃度算出手段を構成し、ステップS104〜108の罫線検出処理を実行するコンピュータ10がゴミ判別手段を構成する。   As described above, the computer 10 that executes the ruled line detection process in steps S100 to S102 constitutes the average density calculation means, and the computer 10 that executes the ruled line detection process in steps S104 to S108 constitutes the dust determination means.

(3)罫線検出処理の変形例:
ところで、上述した罫線検出においては、平均濃度算出のための複数画素列の部位で、罫線に近接して大きなゴミ画像が存在すると、罫線検出に失敗する。このとき、平均濃度算出の対象とならなかった画素列に含まれる罫線では、近傍にゴミ画像が存在しないことがあり得る。そこで、平均濃度からの罫線検出に失敗したときは、その近傍の罫線を利用して平均濃度算出の再算出を行ってもよい。
(3) Modified example of ruled line detection processing:
By the way, in the ruled line detection described above, ruled line detection fails if there is a large dust image in the vicinity of the ruled line in a portion of a plurality of pixel columns for calculating the average density. At this time, there may be no dust image in the vicinity of the ruled line included in the pixel column that is not the target of the average density calculation. Therefore, when the ruled line detection from the average density fails, the average density calculation may be recalculated using the neighboring ruled line.

図13に罫線検出処理の変形例を説明する図を示した。同図には、KX1〜KX2列の上端付近を示してある。正立回転処理における罫線検出を例に取ると、KX1〜KX2列の画素列の平均濃度からの罫線検出に失敗したときは、この近傍の画素列となるK5〜K1(KX5<KX1)列の画素列及びKX2〜KX6(KX2<KX6)列の画素列から平均濃度を算出して、再度、罫線検出処理を実行する。無論、KX5〜KX1列,KX2〜KX6列は、縦罫線や帯状パターンと干渉しないように設定されている。   FIG. 13 illustrates a modified example of the ruled line detection process. In the drawing, the vicinity of the upper end of the KX1 to KX2 rows is shown. Taking ruled line detection in the erecting rotation process as an example, when ruled line detection from the average density of the pixel columns KX1 to KX2 fails, the pixels in the K5 to K1 (KX5 <KX1) columns that are neighboring pixel columns are detected. The average density is calculated from the pixel columns and the pixel columns KX2 to KX6 (KX2 <KX6), and the ruled line detection process is executed again. Of course, the KX5 to KX1 rows and the KX2 to KX6 rows are set so as not to interfere with the vertical ruled lines and the belt-like patterns.

また、近傍の画素列を利用するのみならず、K5〜K1列やK2〜〜K6列の画素列をKX1〜KX2列の画素列の部位にコピーして置き換えてもよい。即ち、近傍の罫線を罫線検出位置に延長して罫線を補完してもよい。この補完により、KX1〜KX2列で罫線近傍に大きなゴミ画像が含まれていたとしても、このゴミ画像は削除される。罫線の補完後、再度、KX1〜KX2列の画素列で罫線検出処理を行えば、罫線延長前のゴミ画像の影響を受けない。   Further, not only the neighboring pixel columns but also the pixel columns K5 to K1 and K2 to K6 may be copied and replaced with the pixel column parts KX1 to KX2. That is, the ruled line may be complemented by extending the neighboring ruled line to the ruled line detection position. By this complementation, even if a large dust image is included in the vicinity of the ruled line in columns KX1 to KX2, this dust image is deleted. If the ruled line detection process is performed again on the pixel columns KX1 to KX2 after the ruled line is complemented, there is no influence of the dust image before the ruled line extension.

また、平均濃度からの罫線検出に失敗したときの近傍の画素列を利用する他の態様として、平均濃度の算出に利用される画素の列の数を増加させて、再度平均濃度の再算出と罫線幅の検出、及びゴミの判別とを行う構成としてもよい。図13の例であれば、KX1〜KX2列の平均濃度からの罫線検出に失敗したときは、KX5〜KX6列の平均濃度から罫線検出を試みる。即ち、平均濃度の算出に利用する標本の母体数を増加させることにより、局所的に発生した大きなゴミ画像の濃度を低下させることが出来る。よって、この態様であっても、ゴミ画像に影響されにくい罫線位置の検出が可能となる。   Further, as another aspect of using a neighboring pixel column when the ruled line detection from the average density fails, the number of pixel columns used for calculating the average density is increased and the average density is recalculated again. It may be configured to detect the ruled line width and determine the dust. In the example of FIG. 13, when the ruled line detection from the average density of the KX1 to KX2 columns fails, the ruled line detection is tried from the average density of the KX5 to KX6 columns. That is, by increasing the number of sample bases used for calculating the average density, the density of a large dust image generated locally can be reduced. Therefore, even in this mode, it is possible to detect a ruled line position that is not easily affected by a dust image.

このように、罫線検出処理で罫線検出に失敗したときは、罫線検出に使用された画素列の近傍の画素列を利用して罫線の再検出を行うことにより、局所的に形成されたゴミ画像による罫線検出失敗を回避可能となる。   As described above, when ruled line detection fails in the ruled line detection process, a dust image formed locally by re-detecting the ruled line using a pixel column in the vicinity of the pixel column used for the ruled line detection. It becomes possible to avoid the ruled line detection failure due to.

なお、本発明は上述した実施形態や変形例に限られず、上述した実施形態および変形例の中で開示した各構成を相互に置換したり組み合わせを変更したりした構成、公知技術並びに上述した実施形態および変形例の中で開示した各構成を相互に置換したり組み合わせを変更したりした構成、等も含まれる。   Note that the present invention is not limited to the above-described embodiments and modifications, and the configurations disclosed in the above-described embodiments and modifications are mutually replaced, the combinations are changed, known techniques, and the above-described implementations. Configurations in which the configurations disclosed in the embodiments and modifications are mutually replaced or the combinations are changed are also included.

画像処理装置としてのコンピュータを含む印刷システムのブロック構成図である。1 is a block configuration diagram of a printing system including a computer as an image processing apparatus. 印刷ヘッドのノズルを示す図である。It is a figure which shows the nozzle of a print head. 補正値設定プログラムの処理を示すフローチャートである。It is a flowchart which shows the process of a correction value setting program. テストパターンの説明図である。It is explanatory drawing of a test pattern. 補正用パターンの読み取り範囲の説明図である。It is explanatory drawing of the reading range of the correction pattern. 罫線検出処理を示すフローチャートである。It is a flowchart which shows a ruled line detection process. 罫線検出処理に使用する画素の列を説明する図である。It is a figure explaining the row | line | column of the pixel used for a ruled line detection process. 平均濃度の算出と、この平均濃度を利用した罫線検出の説明図である。It is explanatory drawing of calculation of an average density | concentration, and ruled line detection using this average density | concentration. 罫線幅の閾値による罫線判定の説明図である。It is explanatory drawing of ruled line determination by the threshold value of ruled line width. トリミングの際の読取画像の説明図である。It is explanatory drawing of the read image at the time of trimming. 解像度変換の説明図である。It is explanatory drawing of resolution conversion. 左罫線の検出の際の読取画像の説明図である。It is explanatory drawing of the read image at the time of detection of a left ruled line. 罫線検出処理の変形例を説明する図である。It is a figure explaining the modification of a ruled line detection process.

符号の説明Explanation of symbols

10…コンピュータ、10a…補正値設定プログラム、10b…アプリケーション、10c…プリンタドライバ、10c1…ハーフトーン(H/T)モジュール、10c2…インタレースモジュール、10c3…補正モジュール、13…メモリ、20…プリンタ、21…制御部、23…メモリ、24…ユニット制御回路、25…印刷ヘッドユニット、25a…印刷ヘッド、26…キャリッジユニット、27…紙送りユニット、29…I/F、30…スキャナ DESCRIPTION OF SYMBOLS 10 ... Computer, 10a ... Correction value setting program, 10b ... Application, 10c ... Printer driver, 10c1 ... Halftone (H / T) module, 10c2 ... Interlace module, 10c3 ... Correction module, 13 ... Memory, 20 ... Printer, DESCRIPTION OF SYMBOLS 21 ... Control part, 23 ... Memory, 24 ... Unit control circuit, 25 ... Print head unit, 25a ... Print head, 26 ... Carriage unit, 27 ... Paper feed unit, 29 ... I / F, 30 ... Scanner

Claims (7)

所定幅の罫線が記載された画像データの罫線位置を検出する画像処理装置であって、
前記罫線と略直交する方向に1列に並ぶ画素の列を複数列抽出し、抽出された複数列の画素の列において罫線方向に並ぶ位置にある画素の間で平均濃度を算出する平均濃度算出手段と、
画素の列の一方の端から順に前記平均濃度と所定の濃度閾値とを比較し、該所定の濃度閾値を超えた最初の画素から最後の画素までの間隔を求める罫線幅検出手段と、
該間隔が所定の幅閾値内に収まれば、前記最初の画素から前記最後の画素までにゴミ画像が存在しないと判別して前記最初の画素から前記最後の画素までを罫線位置として検出する一方、前記間隔が所定の幅閾値を超えると、前記最初の画素から前記最後の画素までにゴミ画像が存在すると判別するゴミ判別手段と、
を備えることを特徴とする画像処理装置。
An image processing apparatus for detecting a ruled line position of image data in which a ruled line of a predetermined width is described,
A plurality of columns of pixels arranged in a line in a direction substantially orthogonal to the ruled line is extracted, and an average density calculation is performed to calculate an average density between pixels located in the ruled line direction in the extracted plurality of pixel columns. Means,
Ruled line width detecting means for comparing the average density with a predetermined density threshold in order from one end of a pixel column, and obtaining an interval from the first pixel to the last pixel exceeding the predetermined density threshold;
If the interval falls within a predetermined width threshold, it is determined that there is no dust image from the first pixel to the last pixel, and the first pixel to the last pixel are detected as ruled line positions, Dust determination means for determining that a dust image exists from the first pixel to the last pixel when the interval exceeds a predetermined width threshold;
An image processing apparatus comprising:
前記ゴミ判別手段が前記最初の画素から前記最後の画素までにゴミ画像が存在すると判別すると、
前記平均濃度の算出に使用された複数の画素の列を、該複数の画素の列の近傍に位置する画素の列で置き換えて前記平均濃度の再算出を行う請求項1の画像処理装置。
When the dust discrimination means determines that a dust image exists from the first pixel to the last pixel,
The image processing apparatus according to claim 1, wherein the average density is recalculated by replacing a plurality of pixel columns used in the calculation of the average density with a column of pixels located in the vicinity of the plurality of pixel columns.
前記間隔が前記所定の幅閾値を超えると、前記ゴミ判別手段が、前記平均濃度の算出に使用される画素の列の数を増加させて前記平均濃度を再算出する請求項1又は請求項2の画像処理装置。   3. The dust determination unit re-calculates the average density by increasing the number of pixel columns used for the calculation of the average density when the interval exceeds the predetermined width threshold. Image processing apparatus. 前記最初の画素と前記最後の画素の略中間を前記罫線位置とする請求項1〜請求項3の何れか一項に記載の画像処理装置。   4. The image processing apparatus according to claim 1, wherein the ruled line position is set approximately between the first pixel and the last pixel. 5. 副走査方向の所定範囲で所定色かつ所定濃度となる画像データを、該画像データの主走査方向と副走査方向の何れか又は双方に延びる罫線と共に印刷装置に印刷させる印刷手段と、
該印刷の結果の光学読取画像を光学読取装置から取得する印刷結果取得手段と、
前記罫線検出手段が検出した前記画像データの罫線位置に基づいて光学読取画像の正立回転とトリミングと前記画像データの印刷された位置検出との少なくとも1つから成る画像処理を行う画像処理手段と、
該画像処理手段での画像処理後の光学読取画像から副走査方向の濃度変化を計測し、該濃度変化を解消する補正値を生成して前記印刷装置に設定する補正値設定手段と、
を備える請求項1〜請求項4の何れか一項に記載の画像処理装置。
Printing means for printing image data having a predetermined color and a predetermined density in a predetermined range in the sub-scanning direction together with ruled lines extending in either or both of the main scanning direction and the sub-scanning direction of the image data;
Printing result acquisition means for acquiring an optically read image as a result of the printing from the optical reading device;
Image processing means for performing image processing comprising at least one of upright rotation and trimming of the optically read image and detection of the printed position of the image data based on the ruled line position of the image data detected by the ruled line detection means; ,
Correction value setting means for measuring a density change in the sub-scanning direction from the optically read image after image processing by the image processing means, generating a correction value for eliminating the density change, and setting the correction value in the printing apparatus;
An image processing apparatus according to any one of claims 1 to 4, further comprising:
所定幅の罫線が記載された画像データの罫線位置を検出する画像処理方法であって、
前記罫線と略直交する方向に1列に並ぶ画素の列を複数列抽出し、抽出された複数列の画素の列において罫線方向に並ぶ位置にある画素の間で平均濃度を算出する平均濃度算出工程と、
画素の列の一方の端から順に前記平均濃度と所定の濃度閾値とを比較し、該所定の濃度閾値を超えた最初の画素から最後の画素までの間隔を求める罫線幅検出工程と、
該間隔が所定の幅閾値内に収まれば、前記最初の画素から前記最後の画素までにゴミ画像が存在しないと判別して前記最初の画素から前記最後の画素までを罫線位置として検出する一方、前記間隔が所定の幅閾値を超えると、前記最初の画素から前記最後の画素までにゴミ画像が存在すると判別するゴミ判別工程と、
を備えることを特徴とする画像処理方法。
An image processing method for detecting a ruled line position of image data in which a ruled line of a predetermined width is described,
A plurality of columns of pixels arranged in a line in a direction substantially orthogonal to the ruled line is extracted, and an average density calculation is performed to calculate an average density between pixels located in the ruled line direction in the extracted plurality of pixels. Process,
A ruled line width detection step of comparing the average density with a predetermined density threshold in order from one end of a pixel row to obtain an interval from the first pixel to the last pixel that exceeds the predetermined density threshold;
If the interval falls within a predetermined width threshold, it is determined that no dust image exists from the first pixel to the last pixel, and the first pixel to the last pixel are detected as ruled line positions, A dust determination step of determining that a dust image exists from the first pixel to the last pixel when the interval exceeds a predetermined width threshold;
An image processing method comprising:
所定幅の罫線が記載された画像データの罫線位置を検出する画像処理プログラムであって、
前記罫線と略直交する方向に1列に並ぶ画素の列を複数列抽出し、抽出された複数列の画素の列において罫線方向に並ぶ位置にある画素の間で平均濃度を算出する平均濃度算出機能と、
画素の列の一方の端から順に前記平均濃度と所定の濃度閾値とを比較し、該所定の濃度閾値を超えた最初の画素から最後の画素までの間隔を求める罫線幅検出機能と、
該間隔が所定の幅閾値内に収まれば、前記最初の画素から前記最後の画素までにゴミ画像が存在しないと判別して前記最初の画素から前記最後の画素までを罫線位置として検出する一方、前記間隔が所定の幅閾値を超えると、前記最初の画素から前記最後の画素までにゴミ画像が存在すると判別するゴミ判別機能と、
をコンピュータに実現させることを特徴とする画像処理プログラム。
An image processing program for detecting a ruled line position of image data in which a ruled line of a predetermined width is described,
A plurality of columns of pixels arranged in a line in a direction substantially orthogonal to the ruled line is extracted, and an average density calculation is performed to calculate an average density between pixels located in the ruled line direction in the extracted plurality of pixel columns. Function and
A ruled line width detection function that compares the average density with a predetermined density threshold in order from one end of the pixel column, and obtains an interval from the first pixel to the last pixel that exceeds the predetermined density threshold;
If the interval falls within a predetermined width threshold, it is determined that there is no dust image from the first pixel to the last pixel, and the first pixel to the last pixel are detected as ruled line positions, A dust determination function for determining that a dust image exists from the first pixel to the last pixel when the interval exceeds a predetermined width threshold;
An image processing program for causing a computer to realize the above.
JP2007097588A 2007-04-03 2007-04-03 Unit, method and program for image processing Pending JP2008257394A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007097588A JP2008257394A (en) 2007-04-03 2007-04-03 Unit, method and program for image processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007097588A JP2008257394A (en) 2007-04-03 2007-04-03 Unit, method and program for image processing

Publications (1)

Publication Number Publication Date
JP2008257394A true JP2008257394A (en) 2008-10-23

Family

ID=39980923

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007097588A Pending JP2008257394A (en) 2007-04-03 2007-04-03 Unit, method and program for image processing

Country Status (1)

Country Link
JP (1) JP2008257394A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010283687A (en) * 2009-06-05 2010-12-16 Ricoh Co Ltd Program, information processing apparatus, gradation correction parameter generating method, and storage medium
JP2015029186A (en) * 2013-07-30 2015-02-12 富士ゼロックス株式会社 Image forming system and image reading device
EP3210789A1 (en) 2016-02-24 2017-08-30 Seiko Epson Corporation Printing apparatus and printing method
WO2023221808A1 (en) * 2022-05-19 2023-11-23 世大新材料(深圳)有限公司 Multi-purpose circuit board production line, application of multi-purpose production line and preparation method thereof

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010283687A (en) * 2009-06-05 2010-12-16 Ricoh Co Ltd Program, information processing apparatus, gradation correction parameter generating method, and storage medium
JP2015029186A (en) * 2013-07-30 2015-02-12 富士ゼロックス株式会社 Image forming system and image reading device
EP3210789A1 (en) 2016-02-24 2017-08-30 Seiko Epson Corporation Printing apparatus and printing method
US9962930B2 (en) 2016-02-24 2018-05-08 Seiko Epson Corporation Printing apparatus and printing method
WO2023221808A1 (en) * 2022-05-19 2023-11-23 世大新材料(深圳)有限公司 Multi-purpose circuit board production line, application of multi-purpose production line and preparation method thereof

Similar Documents

Publication Publication Date Title
US7515305B2 (en) Systems and methods for measuring uniformity in images
KR102032705B1 (en) Image processing apparatus and image processing method
US8472069B2 (en) Dot position measurement method and apparatus, and computer readable medium
JP5746596B2 (en) System and method for detecting ink jet deficiencies and deficiencies in an ink jet printer using image data of printed matter without prior information
US11192386B2 (en) Image processing apparatus, image processing method and storage medium
US9965842B2 (en) Image processing apparatus and image processing method
JP4770258B2 (en) Correction value setting method and correction value setting device
JP2012126110A (en) Device and method for detecting defective recording element, and image forming apparatus and method
JP2006289947A (en) Printing device, printing device control program and method of controlling printing device, and data formation device for printing, data formation program for printing and method of forming data for printing
JP2007144885A (en) Method for judgment of presence or absence of reading of density of foreign object and method for calculation of representative value of density of test pattern
JP2007230213A (en) Printer, printer controlling program, printer controlling method, printing data generating device, printing data generating program, and printing data generating method
JP2006130904A (en) Printing device, printing program, printing method, printing data generation device/program, printing data generation method and recording medium in which the same are recorded
JP2008257394A (en) Unit, method and program for image processing
KR100636236B1 (en) Method and apparatus for detecting missing nozzle
JP2008093852A (en) Printer, printer control program, recording medium storing the program, printer control method, image processor, image processing program, recording medium storing the program and image processing method
JP2006305957A (en) Method of judging presence or absence of reading of foreign substance density, and its judgment apparatus
JP2008018632A (en) Printer, printer controlling program, storage medium storing the program and printer controlling method, image processing apparatus, image processing program, storage medium storing the program and image processing method, and compensation region information forming apparatus, compensation region information forming program, storage medium storing the program, and compensation region information forming method
US8797595B2 (en) Image inspection apparatus, image recording apparatus, and image inspection method
JP2011098546A (en) Image recorder and control method of image recorder
JP2004237725A (en) Concentration correction method and recording device using the same
JP2006305963A (en) Image processing, correction value acquiring method, printer manufacturing method, and printing method
JP4735027B2 (en) Density measurement method, printing method, correction value calculation method, and printing apparatus manufacturing method
US9908324B1 (en) Printing with overlapping printheads
JP4655749B2 (en) Correction value acquisition method, printing method, and printing apparatus manufacturing method
JP5872325B2 (en) Inkjet printer, ejection failure detection device, ejection failure detection method, and program