Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP4631384B2 - Printing state inspection method, character inspection method, and inspection apparatus using these methods - Google Patents
[go: Go Back, main page]

JP4631384B2 - Printing state inspection method, character inspection method, and inspection apparatus using these methods - Google Patents

Printing state inspection method, character inspection method, and inspection apparatus using these methods Download PDF

Info

Publication number
JP4631384B2
JP4631384B2 JP2004297699A JP2004297699A JP4631384B2 JP 4631384 B2 JP4631384 B2 JP 4631384B2 JP 2004297699 A JP2004297699 A JP 2004297699A JP 2004297699 A JP2004297699 A JP 2004297699A JP 4631384 B2 JP4631384 B2 JP 4631384B2
Authority
JP
Japan
Prior art keywords
character string
character
range
processing
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2004297699A
Other languages
Japanese (ja)
Other versions
JP2005145055A (en
Inventor
治 松竹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Omron Corp
Original Assignee
Omron 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 Omron Corp filed Critical Omron Corp
Priority to JP2004297699A priority Critical patent/JP4631384B2/en
Publication of JP2005145055A publication Critical patent/JP2005145055A/en
Application granted granted Critical
Publication of JP4631384B2 publication Critical patent/JP4631384B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Ink Jet (AREA)
  • Accessory Devices And Overall Control Thereof (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Description

この発明は、少なくとも1つの文字を含む文字列やマークなどの印刷体を撮像し、得られた画像をコンピュータで処理することにより、前記印刷体に印刷不良がないかどうかを判断する検査を実行する技術分野に属する。特にこの発明は、複数のノズルが一方向に沿って並ぶように配置された印刷ヘッドを用いて印刷された印刷体を検査対象として、各ノズルの印刷ラインに印刷不良が発生していないかどうかを検査する方法および装置に関する。 The present invention performs an inspection to determine whether or not the printed body has a printing defect by imaging a printed body such as a character string or a mark including at least one character and processing the obtained image with a computer. Belongs to the technical field. In particular, the present invention uses a print body printed using a print head in which a plurality of nozzles are arranged in one direction as a test target, and whether or not a print defect has occurred in the print line of each nozzle. The present invention relates to a method and an apparatus for inspecting the above.

加工食品などのパッケージに記される製造年月日、賞味期限、製品コードなどの文字列は、一般にインクジェットプリンタにより印刷される。この種の目的に使用される工業用のインクジェットプリンタは、所定数のノズルが縦一列に配置された印刷ヘッドを具備するもので、印刷対象の文字に応じてインクを噴き出させるノズルを選択しながら印刷動作を行うように設定されている(以下、1つのノズルによりドットが印刷される対象となる帯状領域のことを「印刷ライン」という。)。   Character strings such as date of manufacture, expiration date, and product code written on a package such as processed food are generally printed by an inkjet printer. An industrial ink jet printer used for this type of purpose has a print head in which a predetermined number of nozzles are arranged in a vertical row, and selects a nozzle that ejects ink according to the character to be printed. However, the printing operation is set to be performed (hereinafter, a band-like region where dots are printed by one nozzle is referred to as a “print line”).

上記のようにドット印刷された文字列を対象とする従来の検査では、一般に、パターンマッチングの手法を用いた検査を実行するようにしている(特許文献1参照。)。   In the conventional inspection for the character string printed with dots as described above, the inspection using a pattern matching method is generally performed (see Patent Document 1).

特開2003−187187号公報JP 2003-187187 A

インクジェットプリンタにより印刷を行う場合、いずれか1つのノズルに不良が発生すると、そのノズルに対応する印刷ラインに常にドットが打たれる不良(以下、これを「ドットの埋まり」という。)、または前記ノズルに対応する印刷ラインに全くドットが打たれない不良(以下、これを「ドットの抜け」という。)が生じることがある。   When printing is performed by an ink jet printer, if any one of the nozzles is defective, a dot is always printed on the print line corresponding to the nozzle (hereinafter referred to as “dot filling”) or the above. There may be a defect in which no dot is hit on the print line corresponding to the nozzle (hereinafter referred to as “missing dot”).

図17は、上記した印刷不良の例を示す。
図中の左側はドットの埋まりが発生した例を、右側はドットの抜けが発生した例を示すもので、それぞれ文字列の上端、中央、下端に不良が発生した例を示す。いずれの例も、細線枠で囲まれた部分が不良発生部位である。なお、ドットの埋まり、抜けとも、インクが噴出される際に生じるものであるので、文字間の空白部分に印刷不良が生じることはない。
FIG. 17 shows an example of the printing failure described above.
In the figure, the left side shows an example in which dot filling has occurred, and the right side shows an example in which dot dropout has occurred, and shows an example in which defects have occurred at the upper end, the center, and the lower end of the character string, respectively. In any example, the portion surrounded by the thin line frame is a defective portion. It should be noted that since dot embedding and omission occur when ink is ejected, printing defects do not occur in blank portions between characters.

ところで、前記特許文献1にも記載されているように、食品のパッケージなどでは、印刷面が完全に平坦ではないことから、印刷される文字列に歪みが生じることが多いが、その多くは読取可能なものである。このような事情に鑑み、現場では、パターンマッチングにおける判定基準値を甘く設定する傾向がある。しかしながら、判定基準値を甘くすると、前記図17に示したような1印刷ラインにわたって不良が生じた文字列に対しても、良判定がなされてしまう、という不具合が生じる。   By the way, as described in Patent Document 1, a food package or the like has a printed surface that is not completely flat, and thus a printed character string is often distorted. It is possible. In view of such circumstances, there is a tendency that the determination reference value in pattern matching is set sweetly in the field. However, if the judgment reference value is made loose, there is a problem that a good judgment is made even for a character string in which a defect occurs over one print line as shown in FIG.

この発明は、上記問題点に着目してなされたもので、1印刷ライン単位で発生する印刷不良に特化した検査を実施できるようにすることを目的とする。   The present invention has been made paying attention to the above-mentioned problems, and an object thereof is to make it possible to carry out an inspection specialized for printing defects occurring in units of one printing line.

この発明にかかる印刷状態検査方法は、縦方向または横方向に沿って並んだ複数のノズルを有する印刷ヘッドを印刷対象物に対して前記ノズルの並び方向に直交する方向に沿って相対的に移動させながら各ノズルのドットの印刷動作を制御することにより前記印刷対象物に形成された印刷体を撮像し、得られた画像を用いて、前記印刷対象物に対する各ノズルの移動の方向に沿うノズル毎の印刷ラインに印刷不良が発生していないかどうかを検査するものである。
この発明にかかる第1の印刷状態検査方法では、各ノズルの印刷ラインがそれぞれノズルの並び方向に直交していると仮定して、前記印刷体の画像の仮定の印刷ラインの方向においては、ドットの分布範囲の全体または一部を含む範囲を処理範囲に設定する一方、前記画像の仮定の印刷ラインに直交する方向においては複数のノズルに対応する仮定の印刷ラインを全て含む範囲を処理範囲に設定する第1のステップ;前記第1のステップで設定された処理範囲により特定される処理対象領域内の画像を仮定の印刷ラインの方向に沿って投影して、その投影結果に基づき仮定の印刷ラインに直交する方向におけるドットの分布範囲を特定し、処理対象領域内に、仮定の印刷ラインの方向に沿って並び、かつ仮定の印刷ラインに直交する方向における範囲が前記特定された範囲に対応する複数の領域を設定する第2のステップ;前記第2のステップで設定された各領域の画像をそれぞれ仮定の印刷ラインに沿って投影して、その投影結果に基づき仮定の印刷ラインに直交する方向におけるドットの分布範囲を領域毎に特定すると共に、これら分布範囲の長さの中の最大の長さを特定し、各領域の仮定の印刷ラインに直交する方向における範囲にそれぞれ当該領域につき特定されたドットの分布範囲が含まれ、かつ仮定の印刷ラインに直交する方向における各領域の長さが前記最大の長さに統一されるように、仮定の印刷ラインに直交する方向における各領域の位置および長さを補正する第3のステップ;前記第3のステップを実行した後の各領域間において、各領域内の仮定の印刷ラインの方向に沿う各ラインを、仮定の印刷ラインに直交する方向における相対位置が対応するもの毎に組み合わせ、各組み合わせ毎に、組み合わせられた各ラインにおけるドットを表す画素の数を累計する第4のステップ;前記各ラインの組み合わせ毎に求めた累計値の中から極大値を抽出し、抽出された極大値を所定のしきい値と比較し、前記極大値がしきい値より大きいという比較結果を得たとき、実際の印刷ラインの方向に沿ってドットの埋まりが生じていると判別する第5のステップ;の各ステップを実行するようにしている。
In the printing state inspection method according to the present invention, a print head having a plurality of nozzles arranged in the vertical direction or the horizontal direction is moved relative to a print object along a direction orthogonal to the nozzle arrangement direction. The printing body formed on the printing object is imaged by controlling the printing operation of the dots of the nozzles while the nozzle is moved along the direction of movement of each nozzle relative to the printing object using the obtained image. It is inspected whether or not a printing defect has occurred in each printing line.
In the first print state inspection method according to the present invention, assuming that the print lines of the respective nozzles are orthogonal to the nozzle arrangement direction , dots are assumed in the direction of the assumed print line of the image of the print body. A range including the whole or a part of the distribution range is set as a processing range, while a range including all the assumed print lines corresponding to a plurality of nozzles in the direction orthogonal to the assumed print line of the image is set as the processing range. A first step of setting; projecting an image in the processing target area specified by the processing range set in the first step along the direction of a hypothetical print line, and assuming printing based on the projection result identify distribution range of dots in the direction orthogonal to the line, the processing target area, aligned along the direction of the assumptions of the printing line and in the direction perpendicular to the hypothetical print line Contact That ranges second step of setting a plurality of regions corresponding to a range that is the identified; projecting along said second respective hypothetical print line image in each area set in step, the projection the distribution range of dots in a direction perpendicular to the hypothetical print line based on the results as well as specific to each region, to identify the maximum length in the length of these distribution range, perpendicular to the assumption of the printing lines in each area Assuming that the range in each direction includes the distribution range of dots specified for each region, and the length of each region in the direction perpendicular to the assumed print line is unified to the maximum length. third step of correcting the position and length of each region in the direction perpendicular to the print line; in between the regions after executing the third step, the print line assumptions within each region Of each line along the direction, the combination for each one relative position corresponding in a direction perpendicular to the hypothetical print line, for each combination, the fourth to accumulate the number of pixels representing the dots in each the combined lines of Step: extracting a maximum value from the cumulative value obtained for each combination of the respective lines, comparing the extracted maximum value with a predetermined threshold value, and comparing the result that the maximum value is larger than the threshold value. When it is obtained, the fifth step of determining that dot filling has occurred along the direction of the actual print line is executed.

上記において、前記印刷ヘッドの各ノズルは、一列に並べて配置されるのが望ましいが、印刷ラインが重なり合うことがなければ、ノズルの並びに若干のばらつきがあってもよい。これは以下の方法、装置でも同様である。
「印刷ラインの方向」とは、前記した印刷ラインの長さ方向のことであり、各ノズルの並び方向に直交する方向と考えることができる。また、「印刷ラインに直交する方向」は、各ノズルの並び方向に沿う方向に相当すると考えることができる。印刷対象が文字列である場合には、一般に、文字列を構成する各文字が印刷ラインに沿って並ぶように印刷される。ただし、文字列と印刷ラインとの関係は、これに限定されるものではなく、印刷ラインに直交する方向に沿って各文字が並ぶように印刷することもできる。
In the above, it is desirable that the nozzles of the print head be arranged in a line, but there may be some variation in the arrangement of the nozzles as long as the print lines do not overlap. This also applies to the following method and apparatus.
The “print line direction” refers to the length direction of the print line described above, and can be considered as a direction orthogonal to the arrangement direction of the nozzles. Further, it can be considered that the “direction perpendicular to the printing line” corresponds to a direction along the arrangement direction of the nozzles. When the object to be printed is a character string, printing is generally performed so that the characters constituting the character string are arranged along a print line. However, the relationship between the character string and the print line is not limited to this, and it is also possible to print such that each character is arranged along a direction orthogonal to the print line.

実際の印刷ラインには、ワークの形状による歪みが生じる可能性があるが、画像処理の上での印刷ラインは直線状であると仮定する。
以下では、各ノズルが縦並びに配置されるものとして、画像上の印刷ラインの方向を水平方向(x軸方向)、印刷ラインに直交する方向を垂直方向(y軸方向)として説明する。各ノズルが横並びに配置される場合には、印刷ラインの方向をy軸方向に、印刷ラインに直交する方向をx軸方向に、置き換えて考えればよい。
The actual print line may be distorted due to the shape of the workpiece, but it is assumed that the print line on the image processing is linear.
In the following description, it is assumed that the nozzles are arranged vertically, and the direction of the print line on the image is the horizontal direction (x-axis direction) and the direction orthogonal to the print line is the vertical direction (y-axis direction). When the nozzles are arranged side by side, the direction of the print line may be replaced with the y-axis direction, and the direction orthogonal to the print line may be replaced with the x-axis direction.

前記第1のステップでは、x,yの各軸ともに、あらかじめ定めた所定幅の処理範囲を設定することができる。x軸方向における処理範囲は、ドットの印刷範囲全体を含む長さに設定することができるが、これに限らず、印刷範囲の一部を含む長さに設定することもできる。
また、印刷体が文字列である場合には、この文字列に沿う方向に対応する処理範囲の長さを、1文字以上の任意数の文字を含む長さに設定することができる。また、このx軸方向における処理範囲の始端位置は、文字列の先頭に限らず、2番目以後の任意の文字の位置に設定することもできる。一方、文字列の並びに直交する方向(文字の高さ方向または幅方向に対応する。)における処理範囲は、複数のノズルに対応する全ての印刷ラインを含む範囲全体が確実に含まれるような大きさに設定する。
なお、印刷範囲とは、印刷体を構成するドットが分布する範囲と考えることができる。
In the first step, a processing range having a predetermined width can be set for each of the x and y axes. The processing range in the x-axis direction can be set to a length that includes the entire dot printing range, but is not limited thereto, and can be set to a length that includes a part of the printing range.
When the print is a character string, the length of the processing range corresponding to the direction along the character string can be set to a length including an arbitrary number of one or more characters. Further, the starting end position of the processing range in the x-axis direction is not limited to the beginning of the character string, and can be set to the position of any second or subsequent character. On the other hand, the processing range in the orthogonal direction of the character string (corresponding to the height direction or width direction of the character) is large so that the entire range including all the print lines corresponding to the plurality of nozzles is surely included. Set to
The printing range can be considered as a range in which dots constituting the printed body are distributed.

第2のステップでは、たとえば、処理対象領域内の画像データをx軸に沿って投影することにより、前記ドットの最も高い印刷位置および最も低い印刷位置を抽出し、これらの位置を上端および下端とする領域を設定する。 In the second step , for example, the highest print position and the lowest print position of the dots are extracted by projecting the image data in the processing target area along the x axis, and these positions are set as the upper end and the lower end. Set the area to be used.

この発明にかかる検査対象の印刷体では、その印刷がなされるワークの形状によっては、同じノズルに対応するドットが一列に印刷されない可能性がある。このため、前記処理対象領域では、y軸方向に沿うライン毎の印刷範囲にずれが生じる可能性がある。
第3のステップは、このような印刷範囲のずれに応じて各領域の位置や長さを調整するもので、各領域を、それぞれその領域内の印刷範囲のゆらぎに応じた高さ位置に位置合わせするとともに、各領域のy軸方向における長さを処理対象領域における最大の印刷幅に合わせて統一することができる。これにより、領域における各印刷ラインの相対位置関係を領域間で統一のとれたものにすることができる。
なお、各領域を位置合わせする場合には、たとえば領域の上端を印刷範囲の上端に合わせる処理、または領域の下端を印刷範囲の下端に合わせる処理を実行することができる。
In the print object to be inspected according to the present invention, there is a possibility that dots corresponding to the same nozzle may not be printed in a line depending on the shape of the work to be printed. For this reason, there is a possibility that a shift occurs in the print range for each line along the y-axis direction in the processing target area.
The third step is to adjust the position and length of each area in accordance with such a shift in the print range. Each area is positioned at a height position corresponding to the fluctuation of the print range in the area. At the same time, the length of each region in the y-axis direction can be unified according to the maximum print width in the processing target region. As a result, the relative positional relationship between the print lines in the region can be made uniform among the regions.
When aligning the areas, for example, a process of aligning the upper end of the area with the upper end of the print range or a process of aligning the lower end of the area with the lower end of the print range can be executed.

印刷ラインの方向がx方向である場合、第4のステップでは、第3のステップでの調整を経た各領域における水平ラインを、1ライン目を1組目、2ライン目を2組目・・・というように、領域における相対的な高さ位置が同じライン毎に組み合わせることができる。そして、各組み合わせ毎に、組み合わせられた各ライン上のドットを表す画素の数を求め、これらを累計することができる。 When the print line direction is the x direction, in the fourth step, the horizontal line in each region that has undergone the adjustment in the third step is the first set of the first line, the second set of the second line,. Thus, the relative height position in the region can be combined for each line. Then, for each combination, the number of pixels representing dots on each combined line can be obtained and accumulated .

所定の印刷ラインにおいてドット埋まりが生じている場合には、その不良発生位置に対応するラインにおけるドットの数が、通常よりも多くなると考えられる。よって、第5のステップにおいて、各ラインの組み合わせ毎の累計値の中の極大値をしきい値と比較することにより、ドット埋まりが生じているか否かを精度良く判別することができる。 When dot filling occurs in a predetermined printing line, it is considered that the number of dots in the line corresponding to the defect occurrence position is larger than usual. Therefore, in the fifth step , it is possible to accurately determine whether or not dot filling has occurred by comparing the maximum value in the cumulative value for each combination of lines with a threshold value.

この発明の第2の印刷状態検査方法では、第1の方法と同様の第1〜第4のステップを実行した後に、隣り合うノズルによる印刷ライン間の距離に対応する幅の処理対象範囲をその幅方向を仮定の印刷ラインに直交する方向に合わせて、当該方向に沿って順に動かしながら、第3のステップで各ラインの組み合わせ毎に求めた累計値のうち処理対象範囲に対応する複数の累計値を加算する処理を繰り返し実行し、毎回の加算処理により得た加算値の中の最小値を所定のしきい値と比較し、加算値の最小値がしきい値より小さいという比較結果を得たとき、実際の印刷ラインの方向に沿ってドットの抜けが生じていると判別する。 In the second printing state inspection method of the present invention, after executing the first same first to fourth steps and methods, the process target range of the width corresponding to the distance between the print lines due to adjacent nozzles A plurality of totals corresponding to the processing target range among the total values obtained for each combination of lines in the third step while adjusting the width direction in a direction orthogonal to the assumed print line and sequentially moving along the direction. The process of adding values is repeatedly executed, and the minimum value of the addition values obtained by each addition process is compared with a predetermined threshold value to obtain a comparison result that the minimum value of the addition value is smaller than the threshold value. In this case, it is determined that missing dots have occurred along the direction of the actual print line.

所定の印刷ラインにおいてドットの抜けが生じている場合には、その印刷ラインに対応する範囲内のドットの数はきわめて小さくなると考えられる。上記第2の方法によれば、印刷ライン間の距離に対応する幅の処理対象範囲毎に、その範囲に含まれる複数のラインにおけるドットを表す画素の度合いを加算して、各加算値の中の最小値を所定のしきい値と比較するので、ドットの抜けが生じているか否かを精度良く判別することができる。
るのが望ましい。
When missing dots occur in a predetermined print line, the number of dots in the range corresponding to the print line is considered to be extremely small. According to the second method, for each processing target range having a width corresponding to the distance between print lines, the degree of pixels representing dots in a plurality of lines included in the range is added, and Since the minimum value is compared with a predetermined threshold value, it is possible to accurately determine whether or not a dot is missing.
Is desirable.

なお、第1および第2の印刷状態検査方法においては、検査対象が文字列である場合には、文字列に直交する方向(y軸方向)における処理範囲の設定情報を、あらかじめ定めておいても良い。またx軸方向における処理範囲を設定した後、この範囲におけるy軸方向の画像をサーチして、ドットの印刷範囲を抽出し、その範囲の上端および下端に基づき、処理範囲を設定してもよい。 In the first and second printing state inspection methods , when the inspection target is a character string, processing range setting information in a direction orthogonal to the character string (y-axis direction) is determined in advance. Also good. Alternatively, after setting a processing range in the x-axis direction, an image in the y-axis direction in this range may be searched to extract a dot printing range, and the processing range may be set based on the upper and lower ends of the range. .

つぎに、この発明にかかる文字検査方法は、複数のノズルにより縦並びのドットを印刷する印刷ヘッドを用いて印刷された横書きの文字列を撮像し、得られた画像を用いて前記文字列に沿って印刷不良が発生していないかどうかを検査するものである。第1の方法では、検査対象の文字列の画像を文字列に直交する方向に沿って投影して、その投影結果に基づき、前記画像中の文字列を構成する各文字毎に、当該文字を表すドットが当該文字の幅方向において分布する範囲を抽出すると共に、前記検査対象の文字列の画像を文字列の方向に沿って投影して、その投影結果に基づき当該文字列全体を表すドットが文字列の高さ方向において分布する範囲を抽出し、各文字に対し、それぞれその文字につき抽出された幅方向におけるドットの分布範囲と、文字列全体につき抽出された文字列の高さ方向におけるドットの分布範囲により定まる処理領域を設定する第1のステップ;前記第1のステップで設定された文字毎の処理領域内の画像をそれぞれ文字列の方向に沿って投影して、その投影結果に基づき文字列の高さ方向におけるドットの分布範囲を文字毎に特定すると共に、これら分布範囲の長さの中の最大の長さを特定し、各文字の処理領域の文字列の高さ方向における範囲にそれぞれ当該文字につき特定されたドットの分布範囲が含まれ、かつ文字列の高さ方向における各処理領域の長さが前記最大の長さに統一されるように、文字列の高さ方向における各処理領域の位置および長さを補正する第2のステップ;第2のステップを実行した後の各処理領域間において、各処理領域内の幅方向に沿うラインを、文字列に直交する方向における相対位置が対応するもの毎に組み合わせ、各組み合わせ毎に、組み合わせられた各ラインにおけるドットを表す画素の数を累計する第3のステップ;前記第3のステップで各ラインの組み合わせ毎に求めた累計値の中から極大値を抽出し、抽出された極大値を所定のしきい値と比較し、前記極大値がしきい値より大きいという比較結果を得たとき、前記文字列の方向に沿ってドットの埋まりが生じていると判別する第4のステップ;の各ステップを実行するようにしている。 Next, in the character inspection method according to the present invention , a horizontally written character string is imaged using a print head that prints vertically arranged dots by a plurality of nozzles, and the obtained character image is used for the character string. Along with this, it is inspected whether a printing defect has occurred. In the first method, an image of a character string to be inspected is projected along a direction orthogonal to the character string, and for each character constituting the character string in the image based on the projection result, the character is Extracting the range in which the dots to be distributed are distributed in the width direction of the character, projecting the image of the character string to be inspected along the direction of the character string, and representing the entire character string based on the projection result Extract the range distributed in the height direction of the character string, and for each character, the distribution range of dots extracted in the width direction for each character, and the dots in the height direction of the character string extracted for the entire character string said first image in the processing region of each character set in step projected along the direction of the respective string, the projection result; step of first setting the determined processing area by the distribution range The distribution range of the dot strings in the height direction as well as specific for each character based, to identify the maximum length in the length of these distribution range, in the height direction of the character string of each character in the processing region The height direction of the character string so that the range includes the distribution range of dots specified for each character and the length of each processing area in the height direction of the character string is unified to the maximum length. direction between the processing region after performing the second step, the line along the width direction of the processing region, perpendicular to the string; second step of correcting the position and length of each processing region in the the combination for each one relative positions corresponding in, for each combination, a third step of accumulated number of pixels representing the dots in each the combined line; union of the third at step each line When the local maximum value is extracted from the cumulative value obtained every time, the extracted local maximum value is compared with a predetermined threshold value, and the comparison result that the local maximum value is larger than the threshold value is obtained, the character The fourth step of determining that dot filling has occurred along the row direction is executed.

上記において、「文字列の方向」とは、文字列を構成する各文字の並び方向であり、前記各ノズルの印刷方向に対応すると考えることができる。以下では文字列の方向を水平方向(x軸方向)、文字列に直交する方向を垂直方向(y軸方向)として説明する。この場合、x軸方向における文字の長さは「文字の幅」に、y軸方向における文字の長さは「文字の高さ」に、それぞれ相当する。 In the above, the “direction of the character string” is the arrangement direction of the characters constituting the character string, and can be considered to correspond to the printing direction of the nozzles. In the following description, the direction of the character string is described as the horizontal direction (x-axis direction), and the direction orthogonal to the character string is defined as the vertical direction (y-axis direction) . In this case, the length of the character in the x-axis direction corresponds to “character width”, and the length of the character in the y-axis direction corresponds to “character height” .

前記第1のステップでは、処理対象の画像をx軸、y軸の各方向に沿って投影することにより、文字列に含まれる各文字を切り出すことができる。なお、この明細書では、投影処理では、画像上の一水平ラインまたは一垂直ラインに沿う各画素の濃度値を加算する処理が行われるとして、投影結果を示す濃度の加算値を「投影値」と呼ぶ。処理対象の画像が2値画像の場合の投影処理は、一ライン上における黒画素または白画素の数を計数する処理により行うことができる。よって、その画素数の計数値を前記投影値であると考えることができる。一方、濃淡画像を処理する場合には、文字の画像が背景部分よりも高い階調を持つように設定された画像を処理するのが望ましい。   In the first step, each character included in the character string can be cut out by projecting the image to be processed along the x-axis and y-axis directions. In this specification, in the projection process, it is assumed that the density value of each pixel along one horizontal line or one vertical line on the image is added, and the addition value of the density indicating the projection result is “projection value”. Call it. The projection process when the image to be processed is a binary image can be performed by a process of counting the number of black pixels or white pixels on one line. Therefore, the count value of the number of pixels can be considered as the projection value. On the other hand, when processing a grayscale image, it is desirable to process an image in which a character image is set to have a higher gradation than the background portion.

上記第2のステップにおける処理領域の補正処理によれば、文字列中の文字のy軸方向における位置にばらつきがある場合には、処理領域の位置にも同様のばらつきが生じることになる。一方、文字列の歪みなどにより各文字の高さにばらつきが生じていても、その最大の高さに基づき各処理領域の高さが統一されるから、各処理領域における水平ラインの数を同一にすることができる。よって、処理領域内における水平ラインの相対位置に基づき、各水平ラインを処理領域間で対応づけることができる。 According to the correction processing of the processing area in the second step , if there is a variation in the position of the character in the character string in the y-axis direction, the same variation occurs in the position of the processing area. On the other hand, even if the height of each character varies due to distortion of the character string, etc., the height of each processing area is unified based on the maximum height, so the number of horizontal lines in each processing area is the same. Can be. Therefore, each horizontal line can be associated between the processing regions based on the relative position of the horizontal line within the processing region.

第3のステップでは、各文字に対応する領域間において、相対的に同じ高さ位置にある水平ラインを組み合わせて、各ラインにおけるドットを表す画素の数を累計することができる。
前記第2のステップで、各領域の長さを統一しているので、第3のステップでは、各領域のすべての水平ラインを対応づけて、上記の累計処理を行うことがができる。
In the third step, horizontal lines that are relatively at the same height position are combined between the areas corresponding to the respective characters, and the number of pixels representing the dots in each line can be accumulated .
In the second step, since the lengths of the respective regions are unified, in the third step, all the horizontal lines in the respective regions can be associated with each other and the above-described accumulation process can be performed.

第2および第3のステップの処理によれば、高さにばらつきのある文字に同じ高さの領域が設定されることになるから、補正後の領域間でのラインの対応づけは、実際の印刷のずれを正確に反映していない可能性がある。しかしながら、基本的には縦一列に並んだ所定数のノズルによって印刷が行われることから、文字間の高さのばらつきは僅かなものと考えられる。したがって、1つのドットが複数の画素で表されるならば、水平ラインの対応関係が若干ずれたとしても、領域間で対応づけられた水平ラインの組には、同じ印刷ラインにかかる水平ラインが多数含まれていると考えることができる。したがって、対応する水平ラインの組毎に投影値を累計することにより、各印刷ラインの状態を高い確度で反映したデータを得ることができる。 According to the processing in the second and third steps, the same height region is set for the characters having a variation in height. Therefore, the line correspondence between the corrected regions is the actual one. The print misalignment may not be accurately reflected. However, basically, printing is performed by a predetermined number of nozzles arranged in a vertical row, and therefore, the height variation between characters is considered to be slight. Therefore, if one dot is represented by a plurality of pixels, even if the horizontal line correspondence is slightly shifted, the horizontal line set associated with the region includes a horizontal line associated with the same print line. It can be considered that many are included. Accordingly, by accumulating the projection values for each set of corresponding horizontal lines, data reflecting the state of each print line with high accuracy can be obtained.

所定の高さ位置でドット埋まりが生じている場合、その不良発生位置に対応する各文字の水平ラインでは、ドットを表す画素数が通常より多くなっていると考えられる。上記の文字検査方法によれば、ドットを表す画素の数が多い水平ラインにかかる累計値が極大値として抽出されるから、この累計値に基づきドット埋まりが生じているか否かを精度良く判別することができる。 When dot filling occurs at a predetermined height position, it is considered that the number of pixels representing dots is larger than usual in the horizontal line of each character corresponding to the defect occurrence position. According to the above-described character inspection method, since a cumulative value for a horizontal line with a large number of pixels representing dots is extracted as a maximum value, it is accurately determined whether or not dot filling has occurred based on this cumulative value. be able to.

この発明の第2の文字検査方法では、第1の文字検査方法と同様の第1〜第3のステップを実行した後に、隣り合うノズルによる印刷ライン間の距離に対応する幅の処理対象範囲を、その幅方向を文字列の高さ方向に合わせて、当該方向に沿って順に動かしながら、第3のステップで各ラインの組み合わせ毎に求めた累計値のうち処理対象範囲に対応する複数の累計値を加算する処理を繰り返し実行し、毎回の加算処理により得た加算値の中の最小値を所定のしきい値と比較し、加算値の最小値がしきい値より小さいという比較結果を得たとき、文字列の方向に沿ってドットの抜けが生じていると判別する第4のステップを実行する。 In the second character inspection method of the present invention, after executing the first to third steps similar to the first character inspection method, the processing target range having a width corresponding to the distance between the print lines by the adjacent nozzles is obtained. , the combined width direction of the string in the height direction, while moving sequentially along the direction, a plurality of cumulative corresponding to the processing target range of the cumulative value obtained for each combination of each line in the third step The process of adding values is repeatedly executed, and the minimum value of the addition values obtained by each addition process is compared with a predetermined threshold value to obtain a comparison result that the minimum value of the addition value is smaller than the threshold value. A fourth step is executed to determine that missing dots have occurred along the direction of the character string.

上記第2の文字検査方法で用いる所定のしきい値は、ドットの抜けが生じた印刷ラインの画像データから抽出することができる。または、1水平ライン上に1〜2個程度のドットが存在する場合のドットを表す画素の数の累計値を計算で求め、得られた値をしきい値としてもよい。 The predetermined threshold value used in the second character inspection method can be extracted from the image data of the print line where the missing dot has occurred. Alternatively, a cumulative value of the number of pixels representing dots when about one to two dots exist on one horizontal line may be obtained by calculation, and the obtained value may be used as a threshold value.

なお、第2の印刷状態検査方法や第2の文字検査方法でドットの抜けを判別する場合にドットを表す画素の数の累計値を加算しているのは、印刷ライン間の空白部にかかる水平ラインでの投影値がゼロに近似する値になる可能性を考慮してのことである。たとえば、加算処理の対象範囲の大きさを隣り合う印刷ライン間の距離に応じた値に設定しておけば、前記空白部分のみにかかる累計値がしきい値と比較されることがなくなり、空白部分がドットの抜けとして誤判別されるのを防止することができる。また、前記の加算処理において、加算処理の範囲を1画素ずつずらすようにすれば、判別の精度をより高めることができる。 It should be noted that the cumulative value of the number of pixels representing dots is added to the blank portion between the print lines when the missing dot is determined by the second print state inspection method or the second character inspection method. This is in consideration of the possibility that the projection value on the horizontal line is close to zero. For example, if the size of the target range of the addition process is set to a value corresponding to the distance between adjacent print lines, the cumulative value for only the blank portion will not be compared with the threshold value, and It is possible to prevent a portion from being erroneously determined as a missing dot. In addition, in the addition process, if the range of the addition process is shifted pixel by pixel, the accuracy of determination can be further increased.

所定の印刷ラインにおいて、ドットの抜けが生じている場合には、その印刷ラインに対応する範囲の水平ラインにおけるドットを表す画素の数は通常よりも小さい値になると考えられる。この場合、これらの水平ライン毎の画素数の加算値が最小値となり、さらにこの最小値がしきい値より小さいという比較結果が得られるので、ドットの抜けがあることを精度良く判別することができる。 In certain printing line, if the missing dot has occurred, the number of pixels representing dots definitive horizontal line ranges corresponding to the print line is considered to be smaller than usual. In this case, the added value of the number of pixels for each horizontal line becomes the minimum value, and a comparison result is obtained that the minimum value is smaller than the threshold value. Therefore, it is possible to accurately determine that there is a missing dot. it can.

なお、この発明で文字列またはその他の印刷体を検査する場合には、ドットの埋まりの有無を判別する処理と、ドットの抜けの有無を判別する処理とを、ともに実行するのが望ましい。
また、これらの判別処理では、1水平ラインに最大数のドットが打たれた場合のそのラインの投影値に基づき、比較対象の数値(極大値または加算値の最小値)を正規化し、同様に正規化されたしきい値を比較するようにしてもよい。この場合、正規化後の極大値や加算値の最小値を表示するようにすれば、ユーザーは、ドットの埋まりや抜けの度合を感覚的に判断することができる。
When inspecting a character string or other printed material according to the present invention, it is desirable to execute both a process for determining the presence or absence of dot filling and a process for determining the presence or absence of missing dots.
Further, in these determination processes, the numerical value to be compared (maximum value or minimum value of the addition value) is normalized based on the projection value of the line when the maximum number of dots are hit on one horizontal line, and similarly You may make it compare the normalized threshold value. In this case, if the maximum value after normalization and the minimum value of the addition value are displayed, the user can sensuously determine the degree of dot filling and omission.

さらに第1および第2の文字検査方法に共通する好ましい態様では、第1〜第4のステップに加え、文字列の高さ方向における各処理領域の長さにつき前記第2のステップで特定された最大の長さを所定のしきい値と比較し、最大の長さがしきい値より小さいという比較結果を得たときに、文字列の端縁でドットの抜けが生じていると判別する第5のステップを実行する。 Further, in a preferred aspect common to the first and second character inspection methods, in addition to the first to fourth steps, the length of each processing region in the height direction of the character string is specified in the second step . When the maximum length is compared with a predetermined threshold value and the comparison result that the maximum length is smaller than the threshold value is obtained, it is determined that a dot dropout has occurred at the edge of the character string. Step 5 is executed.

文字列の上端のドットまたは下端のドットが抜けた場合には、第1のステップの文字の切り出し処理では、文字の正確な高さを抽出できなくなる。上記第5のステップにかかる所定のしきい値は、ドットの印刷ラインが1つ欠けた場合の文字の高さに基づき設定することができる。第2のステップで補正された後の領域の高さは、各文字の高さの最大値に基づくものであるから、この高さ上記のしきい値とを比較することにより、上端または下端にドットの抜けが生じていないかどうかを精度良く判別することができる。特定の文字の長さで判断するのではなく、文字の長さの最大値に基づいて判断するのは、たとえば、“.”(ピリオド)のように文字長さが短い記号等によって誤判断が生じるのを防止するためである。 When the upper end of the dots or the lower end of the dot string is missing is a character of the cut-out process of the first step, it can not be accurately extracted height of characters. The predetermined threshold value for the fifth step can be set based on the character height when one dot print line is missing. Since the height of the area after the correction in the second step is based on the maximum value of the height of each character, the upper end or the lower end can be determined by comparing this height with the above threshold value. It is possible to accurately determine whether or not there is any missing dot. Judgment based on the maximum value of character length, rather than judgment based on the length of a specific character, may be caused by a misjudgment due to a symbol having a short character length such as “.” (Period). This is to prevent the occurrence.

つぎに、この発明にかかる印刷状態検査装置は、縦方向または横方向に沿って並んだ複数のノズルを有する印刷ヘッドを印刷対象物に対して前記ノズルの並び方向に直交する方向に沿って相対的に移動させながら各ノズルのドットの印刷動作を制御することにより前記印刷対象物に形成された印刷体を撮像して得られた画像を用いて、前記印刷対象物に対する各ノズルの移動の方向に沿うノズル毎の印刷ラインに印刷不良が発生していないかどうかを検査する装置である。この発明にかかる第1の印刷状態検査装置は、前記印刷体の画像を検査対象画像として入力する画像入力手段と、各ノズルの印刷ラインがそれぞれノズルの並び方向に直交していると仮定して、前記画像入力手段により入力された検査対象画像の仮定の印刷ラインの方向においては、前記ドットの分布範囲の全体または一部を含む範囲を処理範囲に設定する一方、前記検査対象画像仮定の印刷ラインに直交する方向においては前記複数のノズルに対応する仮定の印刷ラインを全て含む範囲を処理範囲に設定する処理範囲設定手段と、各方向の処理範囲により特定される領域を処理対象領域として設定した後、この処理対象領域内の画像を仮定の印刷ラインの方向に沿って投影して、その投影結果に基づき仮定の印刷ラインに直交する方向におけるドットの分布範囲を特定し、前記処理対象領域内に、仮定の印刷ラインの方向に沿って並び、かつ仮定の印刷ラインに直交する方向における範囲が前記特定された範囲に対応する複数の領域を設定する領域設定手段と、前記領域設定手段により設定された各領域の画像をそれぞれ仮定の印刷ラインに沿って投影して、その投影結果に基づき仮定の印刷ラインに直交する方向におけるドットの分布範囲を領域毎に特定すると共に、これら分布範囲の長さの中の最大の長さを特定し、各領域の仮定の印刷ラインに直交する方向における範囲にそれぞれ当該領域につき特定されたドットの分布範囲が含まれ、かつ仮定の印刷ラインに直交する方向における各領域の長さが前記最大の長さに統一されるように、仮定の印刷ラインに直交する方向における各領域の位置および長さを補正する領域調整手段と、前記領域調整手段による補正後の各領域間において、各領域内の仮定の印刷ラインの方向に沿う各ラインを、仮定の印刷ラインに直交する方向における相対位置が対応するもの毎に組み合わせ、各組み合わせ毎に、組み合わせられた各ラインにおけるドットを表す画素の数を累計する累計処理手段と、累計処理手段が各ラインの組み合わせ毎に求めた累計値の中から極大値を抽出する極大値抽出手段と、極大値抽出手段が抽出した 極大値を所定のしきい値と比較し、極大値がしきい値より大きいという比較結果を得たとき、実際の印刷ラインの方向に沿ってドットの埋まりが生じていると判別する判別手段と、前記判別手段による判別結果を出力する出力手段とを具備する。
この発明にかかる第2の印刷状態検査装置は、上記の極大値抽出手段に代えて、隣り合うノズルによる印刷ライン間の距離に対応する幅の処理対象範囲を、幅方向を仮定の印刷ラインに直交する方向に合わせて、当該方向に沿って順に動かしながら、累計処理手段が各ラインの組み合わせ毎に求めた累計値のうち処理対象範囲に対応する複数の累計値を加算する処理を繰り返し実行し、毎回の加算処理により得た加算値の中の最小値を特定する最小値特定手段を具備する。また判別手段は、最小値特定手段が特定した最小値を所定のしきい値と比較し、前記最小値がしきい値より小さいという比較結果を得たときには、実際の印刷ラインの方向に沿ってドットの抜けが生じていると判別する。
Next, the printing state inspection apparatus according to the present invention is configured to make a print head having a plurality of nozzles arranged in the vertical direction or the horizontal direction relatively to a print object in a direction orthogonal to the nozzle arrangement direction. Direction of movement of each nozzle relative to the printing object using an image obtained by imaging a printing body formed on the printing object by controlling the printing operation of dots of each nozzle while moving Is an apparatus for inspecting whether or not a printing defect has occurred in a printing line for each nozzle along the line. The first printing state inspection apparatus according to the present invention assumes that the image input means for inputting the image of the printed body as an inspection target image and that the print lines of the nozzles are orthogonal to the nozzle arrangement direction. In the direction of the assumed print line of the inspection target image input by the image input means, a range including the whole or part of the dot distribution range is set as a processing range, while the assumption of the inspection target image is set . In a direction orthogonal to the print line, a processing range setting unit that sets a range including all assumed print lines corresponding to the plurality of nozzles as a processing range, and an area specified by the processing range in each direction is set as a processing target area after setting, by projecting along an image of this processing target area in the direction of the assumptions of the printing line, in a direction perpendicular to the hypothetical print line based on the projected result Kicking Identify distribution range of dots, in the processing target area, aligned along the direction of the assumptions of the printing line, and a plurality of regions range in the direction perpendicular to correspond to a range that is the specific assumptions print line an area setting means for setting, said projecting along an image of each area set in each hypothetical print line by the area setting means, the distribution of dots in the direction perpendicular to the hypothetical print line based on the projected result range as well as specific to each region, these distributions to identify the length maximum length in the range, distribution of dots each identified per the area in a range in a direction perpendicular to the assumption of print lines in each area range contains, and as the length of each region in the direction perpendicular to the assumption of the printing lines are unified to the length of the maximum, the direction perpendicular to the hypothetical print line Definitive and region adjusting means for correcting the position and length of each region, in between the regions corrected by the region adjusting means, each line along the direction of the assumptions of the printing lines in each area, the assumption of a printing line Combining for each corresponding relative position in the orthogonal direction, and for each combination, the total processing means for accumulating the number of pixels representing the dots in each combined line, and the total processing means for each line combination The maximum value extraction means for extracting the maximum value from the cumulative value and the maximum value extracted by the maximum value extraction means were compared with a predetermined threshold value, and a comparison result that the maximum value was larger than the threshold value was obtained. A determination unit that determines that dot filling has occurred along the direction of the actual print line, and an output unit that outputs a determination result by the determination unit.
In the second printing state inspection device according to the present invention, instead of the above-mentioned maximum value extracting means, the processing target range having a width corresponding to the distance between the printing lines by the adjacent nozzles is changed to the assumed printing line in the width direction. A process of adding a plurality of cumulative values corresponding to the processing target range among the cumulative values obtained for each combination of lines by the cumulative processing means while repeatedly moving along the direction according to the orthogonal direction is repeatedly executed. And a minimum value specifying means for specifying the minimum value among the added values obtained by the addition processing each time. Further, the determining means compares the minimum value specified by the minimum value specifying means with a predetermined threshold value, and when the comparison result that the minimum value is smaller than the threshold value is obtained, it follows the direction of the actual print line. It is determined that missing dots have occurred.

上記において、画像入力手段は、前記印刷体の画像データを取り込む入力インターフェースやA/D変換回路などを含むものとすることができる。第1の検査装置によれば、第1の印刷状態検査方法に基づき、印刷ラインの方向に沿うドットの埋まりを精度良く検査することができ、第2の検査装置によれば、第2の印刷状態検査方法に基づき、印刷ラインの方向に沿うドットの抜けを精度良く検査することができるIn the above, the image input means may include an input interface for taking in image data of the printed material, an A / D conversion circuit, and the like. According to the first inspection apparatus, it is possible to accurately inspect the dot filling along the direction of the printing line based on the first printing state inspection method. According to the second inspection apparatus, the second printing can be performed. Based on the state inspection method, it is possible to accurately inspect for missing dots along the direction of the printing line .

なお、上記の印刷状態検査装置には、処理対象の画像を2値化する2値化処理手段を設けることができる。この2値化処理手段は、専用の回路とすることもできるが、2値化しきい値や2値化処理の手順が設定されたコンピュータにより構成することもできる。   Note that the above-described print state inspection apparatus can be provided with a binarization processing unit that binarizes an image to be processed. This binarization processing means can be a dedicated circuit, but can also be constituted by a computer in which a binarization threshold and a binarization processing procedure are set.

好ましい態様にかかる印刷状態検査装置は、仮定の印刷ラインの方向における処理範囲の設定情報を入力するための入力手段を具備し、前記処理範囲設定手段が、前記入力手段から入力された設定情報を用いて、仮定の印刷ラインの方向における処理範囲を設定するように構成される。 The printing state inspection apparatus according to a preferred aspect includes input means for inputting processing range setting information in the assumed print line direction, and the processing range setting means receives the setting information input from the input means. And configured to set a processing range in the direction of the assumed print line .

つぎに、この発明にかかる文字検査装置は、複数のノズルにより縦並びのドットを印刷する印刷ヘッドを用いて印刷された横書きの文字列を撮像して得られた画像を用いて、前記文字列に沿って印刷不良が発生していないかどうかを検査するもので、第1の文字検査装置は、前記文字列の画像を検査対象画像として入力する画像入力手段;前記画像入力手段により入力された検査対象画像を文字列に直交する方向に沿って投影して、その投影結果に基づき検査対象画像中の文字列を構成する文字毎に、当該文字を表すドットが当該文字の幅方向において分布する範囲を抽出すると共に、前記検査対象画像を文字列の方向に沿って投影して、その投影結果に基づき当該文字列全体を表すドットが文字列の高さ方向において分布する範囲を抽出し、各文字に対し、それぞれその文字につき抽出された幅方向におけるドットの分布範囲と、文字列全体につき抽出された文字列の高さ方向におけるドットの分布範囲とにより定まる処理領域を設定する領域設定手段;前記領域設定手段により設定された文字毎の処理領域内の画像をそれぞれ文字列の方向に沿って投影して、その投影結果に基づき文字列の高さ方向におけるドットの分布範囲を文字毎に特定すると共に、これら分布範囲の長さの中の最大の長さを特定し、各文字の処理領域の前記文字列の高さ方向における範囲にそれぞれ当該文字につき特定されたドットの分布範囲が含まれ、かつ文字列の高さ方向における各処理領域の長さが前記最大の長さに統一されるように、前記文字列の高さ方向における各処理領域の位置および長さを補正する領域調整手段;領域調整手段による補正後の処理領域間において、各処理領域内の幅方向に沿う各ラインを、文字列に直交する方向における相対位置が対応するもの毎に組み合わせ、各組み合わせ毎に、組み合わせられた各ラインにおけるドットを表す画素の数を累計する累計処理手段;累計処理手段が各ラインの組み合わせ毎に求めた累計値の中から極大値を抽出する極大値抽出手段;極大値抽出手段が抽出した極大値を所定のしきい値と比較し、前記極大値がしきい値より大きいという比較結果を得たときには、文字列の方向に沿ってドットの埋まりが生じていると判別しする判別手段;および前記判別手段による判別結果を出力する出力手段を具備する。
この発明にかかる第2の文字検査装置は、上記の極大値検出手段に代えて、隣り合うノズルによる印刷ライン間の距離に対応する幅の処理対象範囲を、その幅方向を文字列の高さ方向に合わせて、当該方向に沿って順に動かしながら、累計処理手段が各ラインの組み合わせ毎に求めた累計値のうち処理対象範囲に対応する複数の累計値を加算する処理を繰り返し実行し、毎回の加算処理により得た加算値の中の最小値を特定する。また判別手段は、前記最小値がしきい値より小さいという比較結果を得たとき、前記文字列の方向に沿ってドットの抜けが生じていると判別する。
Next, the character inspection apparatus according to the present invention uses the image obtained by capturing an image of a horizontally written character string printed using a print head that prints vertically arranged dots by a plurality of nozzles. The first character inspection apparatus is an image input means for inputting an image of the character string as an inspection object image; input by the image input means. The inspection target image is projected along a direction orthogonal to the character string, and dots representing the character are distributed in the width direction of the character for each character constituting the character string in the inspection target image based on the projection result. A range is extracted, and the inspection target image is projected along the direction of the character string, and a range in which dots representing the entire character string are distributed in the height direction of the character string is extracted based on the projection result. Area setting means for setting a processing area determined for each character by the dot distribution range in the width direction extracted for each character and the dot distribution range in the height direction of the character string extracted for the entire character string The image in the processing area for each character set by the area setting means is projected along the direction of the character string, and the distribution range of dots in the height direction of the character string is projected for each character based on the projection result. In addition to specifying, the maximum length among the lengths of these distribution ranges is specified, and the distribution range of the dots specified for each character is included in the range in the height direction of the character string in the processing area of each character. And the position and length of each processing region in the height direction of the character string so that the length of each processing region in the height direction of the character string is unified to the maximum length. Correction region adjusting means; between region adjusting means processing area after correction by combining the respective lines along the width direction of the processing region, for each that relative positions corresponding in the direction perpendicular to the string, each combination Cumulative processing means for accumulating the number of pixels representing dots in each combined line for each time; Maximum value extracting means for extracting the maximum value from the cumulative values obtained by the cumulative processing means for each combination of lines; When the local maximum value extracted by the value extracting means is compared with a predetermined threshold value and a comparison result is obtained that the local maximum value is larger than the threshold value, dot filling is occurring along the direction of the character string. Discriminating means for discriminating; and output means for outputting a discrimination result by the discriminating means.
In the second character inspection device according to the present invention, instead of the above-described maximum value detecting means, a processing target range having a width corresponding to the distance between print lines by adjacent nozzles is set, and the width direction is set to the height of the character string . Repeatedly execute a process of adding a plurality of cumulative values corresponding to the processing target range among the cumulative values obtained by the total processing means for each combination of lines while sequentially moving along the direction according to the direction. The minimum value among the addition values obtained by the addition process is specified. The determining means determines that a missing dot has occurred along the direction of the character string when the comparison result that the minimum value is smaller than the threshold value is obtained.

第1の文字検査装置によれば、縦並びのドットにより形成される横書き文字列の検査において、文字列の方向に沿うドットの抜けを精度良く判別することが可能になる。また、第2の文字検査装置によれば、上記と同様の構成の横書き文字列の検査において、文字列の方向に沿うドットの埋まりを精度良く判別することが可能になる。According to the first character inspection device, it is possible to accurately determine the missing dot along the direction of the character string in the inspection of the horizontally written character string formed by the vertically aligned dots. Further, according to the second character inspection device, it is possible to accurately determine the filling of dots along the direction of the character string in the inspection of the horizontally written character string having the same configuration as described above.

なお、この文字検査装置において、出力手段が判別結果を表示する場合には、前記した投影値の極大値、最小値、領域の高さなどのパラメータを比較対象のしきい値に対応づけたデータを出力してもよい。   In this character inspection apparatus, when the output means displays the determination result, the data in which the parameters such as the maximum value, the minimum value, and the height of the region are compared with the threshold value to be compared. May be output.

また、上記の文字検査装置には、処理対象の画像を2値化する2値化処理手段を設けることができる。この場合、画像に対する投影処理は、1ライン上における黒画素数または白画素数を数える処理として行うことができる。
なお、この2値化処理手段も、前記印刷状態検査装置におけるのと同様に、専用の回路とすることもできるが、2値化しきい値や2値化処理の手順が設定されたコンピュータにより構成することもできる。
Further, the character inspection apparatus can be provided with binarization processing means for binarizing the image to be processed. In this case, the projection processing for the image can be performed as processing for counting the number of black pixels or the number of white pixels on one line.
The binarization processing means can also be a dedicated circuit as in the printing state inspection apparatus, but is constituted by a computer in which a binarization threshold value and a binarization processing procedure are set. You can also

上記の文字検査装置の好ましい態様では、判別手段は、前記文字列の高さ方向における各処理領域の長さにつき領域設定手段により特定された最大の長さを所定のしきい値と比較する処理を実行し、最大の長さがしきい値よりも小さいという比較結果を得たとき、文字列の端縁でドットの欠落が生じていると判別する。 In a preferred aspect of the character inspection apparatus, the determination unit compares the maximum length specified by the region setting unit with a predetermined threshold for the length of each processing region in the height direction of the character string. When the comparison result that the maximum length is smaller than the threshold value is obtained, it is determined that a dot is missing at the edge of the character string.

上記の印刷状態検査装置および文字検査装置は、検査対象を撮像するための撮像手段(カメラ)や、検査結果を表示するための表示手段(モニタ)に接続することができる。そして、ワーク検出用のセンサなどからトリガ信号を受ける都度、撮像手段を作動させ、生成された画像データを取り込んで前記した各検査方法を実行することにより、各ワークについて、ドット埋まりやドット欠けのような1印刷ラインにわたる不良が発生していないかどうかを判別することができる。また、不良品を取り除く処理を行う装置またはその制御装置に出力手段からの出力を与えるようにすれば、印刷不良ありと判別されたワークを速やかに取り除くことができる。また、ドットの埋まりや抜けのようなインクジェットプリンタの不備による不良は、連続発生する可能性が高いが、インクジェットプリンタ側に出力手段からの出力を与えるようにすれば、不良検出に応じて印刷動作を停止させることができる。   The printing state inspection apparatus and the character inspection apparatus can be connected to an imaging unit (camera) for imaging an inspection target and a display unit (monitor) for displaying an inspection result. Each time a trigger signal is received from a workpiece detection sensor or the like, the imaging means is activated, the generated image data is taken in, and the above-described inspection methods are executed, so that dot filling or dot missing is performed for each workpiece. It is possible to determine whether or not such a defect over one print line has occurred. In addition, if the output from the output means is given to a device that performs processing for removing defective products or its control device, it is possible to quickly remove a work that has been determined to have a printing failure. In addition, defects due to deficiencies in the inkjet printer, such as dot filling and missing, are likely to occur continuously, but if the output from the output means is given to the inkjet printer side, a printing operation is performed according to the defect detection. Can be stopped.

なお、上記の撮像手段や表示手段などの周辺機器は、検査装置に一体化することもできる。また、上記文字検査装置には、別途、従来のパターンマッチングによる文字検査を実行するための手段を設定することができる。この場合、前記ドット埋まりやドットの抜けに関する検査の結果とパターンマッチングによる検査の結果とを統合して良否判定を行い、その判定結果を出力するように構成することができる。   Note that peripheral devices such as the above-described imaging means and display means can be integrated into the inspection apparatus. In the character inspection device, means for performing character inspection by conventional pattern matching can be set separately. In this case, it is possible to make a pass / fail judgment by integrating the result of the inspection related to dot filling or dot missing and the result of the inspection by pattern matching, and to output the determination result.

この発明によれば、ドットの埋まりやドットの抜けのような1印刷ラインに沿って発生する印刷不良に特化した検査を精度良く行うことができるので、ドット印刷による文字列を従来にない視点から検査することができる。よって、従来のパターンマッチング法による検査では見落とされる可能性のあった印刷不良を精度良く検出することができる。   According to the present invention, since it is possible to accurately perform inspection specialized for printing defects that occur along one printing line, such as dot filling or dot missing, a character string by dot printing is an unprecedented viewpoint. Can be inspected from. Therefore, it is possible to accurately detect printing defects that may be overlooked in the inspection by the conventional pattern matching method.

図1は、この発明が適用された文字検査装置1(以下、単に「検査装置1」という。)の設置例を示す。
この検査装置1は、工場において、所定のワーク10にドット印刷された文字列Aを検査対象として、この文字列Aの所定の印刷ラインにドットの埋まりやドットの抜けが生じていないかどうかを検査するためのものである。ワーク10の搬送ライン7の近傍には、前記文字列を撮像するためのCCDカメラ3(以下、単に「カメラ3」という。)や、ワーク検出用のセンサ4(たとえば光電スイッチ)が設けられる。検査装置1は、これらカメラ3やセンサ4のほか、モニタ5、コンソール6などの周辺機器に接続された状態で、所定位置に設置される。なお、カメラ3よりも上流には、前記文字列を印刷するためのインクジェットプリンタ2が、ワーク検出用センサ9に接続された状態で設置される。また、図中の2aは、このインクジェットプリンタ2の印刷ヘッドである。
FIG. 1 shows an installation example of a character inspection apparatus 1 (hereinafter simply referred to as “inspection apparatus 1”) to which the present invention is applied.
The inspection apparatus 1 uses a character string A dot-printed on a predetermined workpiece 10 at a factory as an inspection target, and checks whether a predetermined print line of the character string A is filled with dots or missing dots. It is for inspection. A CCD camera 3 (hereinafter simply referred to as “camera 3”) for imaging the character string and a sensor 4 for detecting a workpiece (for example, a photoelectric switch) are provided in the vicinity of the conveyance line 7 of the workpiece 10. The inspection apparatus 1 is installed at a predetermined position while being connected to peripheral devices such as a monitor 5 and a console 6 in addition to the camera 3 and the sensor 4. An ink jet printer 2 for printing the character string is installed upstream of the camera 3 in a state of being connected to the workpiece detection sensor 9. Reference numeral 2a in the figure denotes a print head of the ink jet printer 2.

カメラ3よりも下流には、検査装置1により不良と判断されたワーク10を排出するための不良品排出装置11(排出用のコンベアや不良ワークの回収ボックスなどを具備する。)が配備される。検査装置1は、この不良品排出装置11の動作を制御するプログラマブル・ロジック・コントローラ(PLC)12に接続されており、検査対象の文字列Aについて、良または不良を示す判定信号を出力する。PLC12は、「不良」を示す判定信号を入力すると、不良品排出装置11を作動させて、対象となるワーク10を搬送ライン7外に排出させる。   Downstream of the camera 3, a defective product discharge device 11 (including a discharge conveyor, a defective work collection box, etc.) for discharging the workpiece 10 determined to be defective by the inspection device 1 is provided. . The inspection device 1 is connected to a programmable logic controller (PLC) 12 that controls the operation of the defective product discharge device 11, and outputs a determination signal indicating good or bad for the character string A to be inspected. When the determination signal indicating “defective” is input, the PLC 12 operates the defective product discharge device 11 to discharge the target workpiece 10 out of the conveyance line 7.

図2は、前記検査装置1の電気構成を示す。この検査装置1は、CPU13を制御主体とするもので、ROM14、RAM15のほか、処理対象の濃淡画像データおよび2値画像データを格納するための画像メモリ16を具備する。なお、ROM14には、後記する検査手順を実行するためのプログラムや2値化処理用のプログラムなどが格納される。   FIG. 2 shows an electrical configuration of the inspection apparatus 1. The inspection apparatus 1 is mainly controlled by a CPU 13 and includes an image memory 16 for storing grayscale image data and binary image data to be processed in addition to a ROM 14 and a RAM 15. The ROM 14 stores a program for executing an inspection procedure described later, a program for binarization processing, and the like.

検査装置1には、上記のほかに、A/D変換部17、D/A変換部18、入力部19、出力部20などが設けられる。A/D変換部17は、前記カメラ3からの画像信号を取り込んでこれをディジタル変換する。D/A変換部18は、ディジタル変換された濃淡画像をアナログの表示用信号に変換してモニタ5に出力する。また入力部19には、前記コンソール6やワーク検知用センサ4に対するインターフェース回路が、出力部20には、前記PLC12に対するインターフェース回路が、それぞれ含められる。   In addition to the above, the inspection apparatus 1 is provided with an A / D conversion unit 17, a D / A conversion unit 18, an input unit 19, an output unit 20, and the like. The A / D converter 17 takes in the image signal from the camera 3 and digitally converts it. The D / A converter 18 converts the digitally converted grayscale image into an analog display signal and outputs it to the monitor 5. The input unit 19 includes an interface circuit for the console 6 and the workpiece detection sensor 4, and the output unit 20 includes an interface circuit for the PLC 12.

図3は、前記検査対象の文字列の画像100の例を示す。この文字列は、ワーク10の表面状態の影響により各文字が横一列に整列せずに、位置がばらついた状態で印刷されている。なお、以下の処理の具体例は、すべてこの画像100を処理対象とする。   FIG. 3 shows an example of the character string image 100 to be inspected. This character string is printed in a state in which the characters are not aligned in a horizontal line due to the influence of the surface state of the workpiece 10 and the positions thereof vary. In the following specific examples of processing, this image 100 is the processing target.

図4は、1つの文字列にかかる検査の手順を示す。以下では、この図4に示した各ステップ(以下、「STEP」の略の「ST」を使用する場合もある。)について、必要に応じて他の図面を参照しながら、詳細な処理内容を順に説明する。   FIG. 4 shows an inspection procedure for one character string. Hereinafter, with respect to each step shown in FIG. 4 (hereinafter, “ST”, which is an abbreviation of “STEP” may be used), detailed processing contents will be described with reference to other drawings as necessary. This will be explained in order.

(1)画像入力・2値化(ステップ1)
図4の手順は、前記センサ4からのワーク検知信号の入力に応じて開始される。ステップ1では、前記カメラ3を作動させてワーク10を撮像し、入力された画像データを2値化処理する。以後の処理は、この2値画像に対して行われる。
(1) Image input and binarization (Step 1)
The procedure of FIG. 4 is started in response to the input of a workpiece detection signal from the sensor 4. In step 1, the camera 3 is operated to image the workpiece 10, and the input image data is binarized. Subsequent processing is performed on the binary image.

(2)文字の切り出し(ステップ2)
このステップでは、図5(1)に示すように、前記2値画像上に所定の処理対象領域を設定する。この設定はあらかじめ定められた設定データに基づくもので、画像上の文字列全体を十分に含む大きさの処理対象領域101が設定される。つぎに、x軸,y軸のそれぞれについて、前記処理対象領域101内の画像データをその軸方向に沿って投影することにより、文字列に含まれる各文字を切り出す。なお、この投影処理は、1ライン上の黒画素数を計数する処理として行われる。また、x軸、y軸については、図5の左上のように、印刷ラインに沿う方向をx軸、これに直交する方向をy軸として設定されているものとする。これは、以下の例でも同様である。
(2) Cutting out characters (Step 2)
In this step, as shown in FIG. 5A, a predetermined processing target area is set on the binary image. This setting is based on predetermined setting data, and the processing target area 101 having a size sufficiently including the entire character string on the image is set. Next, for each of the x-axis and the y-axis, each character included in the character string is cut out by projecting the image data in the processing target area 101 along the axial direction. This projection process is performed as a process of counting the number of black pixels on one line. As for the x axis and the y axis, as shown in the upper left of FIG. 5, the direction along the print line is set as the x axis, and the direction orthogonal thereto is set as the y axis. The same applies to the following examples.

さらに、ステップ2では、前記切り出し処理に基づき、文字毎に個別の処理領域Rn(n=0,1,2,・・・CN−1;以下、これらの領域を「文字領域」という。)を仮設定する。なお、CNは切り出した文字の個数に相当する。図5(2)は、この領域設定結果を示す。x軸方向においては、前記処理対象領域101内の画像データをy軸方向に沿って投影した結果、文字毎にその文字幅に応じた範囲を切り出すことができる。これに対し、y軸方向においては、最も高い位置に印刷された文字の上端位置Yから最も低い位置に印刷された文字の下端位置Yまでの範囲が抽出されるので、いずれの文字領域Rnも、上端の座標はYに、下端の座標はYに、それぞれ揃えられる。なお、各文字領域Rnの設定範囲は、左上の頂点の座標(X(n),Y)と右下の頂点の座標(X(n),Y)とにより表される。 Further, in step 2, based on the cut-out process, an individual processing area Rn (n = 0, 1, 2,... CN-1; hereinafter, these areas are referred to as “character areas”) for each character. Set temporarily. Note that CN corresponds to the number of extracted characters. FIG. 5 (2) shows the result of this area setting. In the x-axis direction, as a result of projecting the image data in the processing target area 101 along the y-axis direction, a range corresponding to the character width can be cut out for each character. In contrast, in the y-axis direction, since the range of up to the highest position of the upper end of the printed characters at the position Y S lower end position of the printed characters at the lowest position from the Y E is extracted, any character area Rn also coordinates of the upper end in the Y S, the coordinates of the lower end in the Y E, are aligned respectively. The setting range of each character area Rn is represented by the coordinates of the upper left vertex (X S (n), Y S ) and the coordinates of the lower right vertex (X E (n), Y E ).

(3)黒画素を含む垂直ラインの総数Pmaxの抽出(ステップ3)
図6は、このステップ6における処理の概要を示す。このステップ3では、前記文字領域Rn毎にその領域内に含まれる垂直ラインLn(y軸に沿うラインであり、長さは文字領域Rnの高さに等しい。)に順に着目しつつ、黒画素を含むラインを抽出する。黒画素が1つでも含まれるラインは抽出対象となる。さらに、このステップ3では、文字領域Rn毎に抽出された垂直ラインの総和を求め、これをPmaxとして設定する。なお、このPmaxは、後記するステップ9の正規化処理で使用されることになる。
(3) Extraction of the total number P max of vertical lines including black pixels (step 3)
FIG. 6 shows an outline of the processing in step 6. In this step 3, for each of the character regions Rn, a black pixel is focused while sequentially paying attention to a vertical line Ln (a line along the y-axis and the length is equal to the height of the character region Rn) included in the region. Extract lines containing. A line including even one black pixel is an extraction target. Further, in step 3, the sum total of the vertical lines extracted for each character region Rn is obtained and set as Pmax . This P max is used in the normalization process in step 9 described later.

図7は、ステップ3の詳細な手順を示す。
まず、最初のST301では、前記Pmaxおよび着目対象の文字領域を示すカウンタnを、それぞれ0にセットする。つぎに、ST302では、前記文字領域Rnの1ライン目のx座標にあたるX(n)を着目対象に設定し、ST303において、この座標X(n)に対応する垂直ライン上の黒画素数を計数する。ここで、この計数値が0より大きい場合は、ST304からST305に進み、前記Pmaxを、現在値に1を加算した値に更新する。
FIG. 7 shows a detailed procedure of Step 3.
First, in the first ST301, the P max and the counter n indicating the target character area are set to 0, respectively. Next, in ST302, X S (n) corresponding to the x coordinate of the first line of the character region Rn is set as a target of interest, and in ST303, the number of black pixels on the vertical line corresponding to the coordinate X S (n). Count. Here, when this count value is larger than 0, it progresses to ST305 from ST304, The said Pmax is updated to the value which added 1 to the present value.

以下、xの値が領域の右端のX(n)になるまでxの値を更新しつつ、各垂直ラインにおける黒画素数を計数し、その計数値が0より大きい場合には、前記Pmaxをインクリメントする。領域内のすべての垂直ラインにかかる処理が終了すると、ST307からST308に進み、nの値を更新する。以下、ST309において、更新後のnが最終の文字領域を示すCN−1以上であると判断されるまでST302に戻って、上記ST302〜307の手順を実行することにより、各文字領域Rnに含まれる垂直ラインの中から黒画素を含むラインのみを抽出し、そのラインの総数Pmaxを算出する。 Thereafter, the number of black pixels in each vertical line is counted while updating the value of x until the value of x reaches X E (n) at the right end of the region. Increment max . When the processes for all the vertical lines in the area are completed, the process proceeds from ST307 to ST308, and the value of n is updated. Thereafter, in ST309, the process returns to ST302 until it is determined that the updated n is greater than or equal to CN-1 indicating the final character area, and is included in each character area Rn by executing the procedures of ST302 to 307. Only lines including black pixels are extracted from the vertical lines to be calculated, and the total number P max of the lines is calculated.

(4)文字領域の補正(ステップ4)
図8は、このステップ4における処理の概要を示す。このステップ4では、前記ステップ2で仮設定された文字領域Rnの上端位置を、それぞれ対応する文字に合わせるとともに、各文字領域Rnの高さ(y軸方向の領域の長さをいう。)が各文字の高さの中の最大値Ysizeになるように、各文字領域Rnの設定位置や高さを補正している。なお、補正後の文字領域の設定位置や大きさは、左上の頂点の座標(X(n),YT(n))、Ysize、および右下の頂点のx座標X(n)により表される。
(4) Correction of character area (step 4)
FIG. 8 shows an outline of the processing in step 4. In step 4, the upper end position of the character area Rn temporarily set in step 2 is set to the corresponding character, and the height of each character area Rn (referred to as the length of the area in the y-axis direction). The set position and height of each character region Rn are corrected so as to be the maximum value Ysize in the height of each character. The set position and size of the corrected character area are represented by the coordinates of the upper left vertex (X S (n), YT (n)), Ysize, and the x coordinate X E (n) of the lower right vertex. Is done.

図9,10は、ステップ4の詳細な手順を示す。図9は、主として、前記Ysizeや領域毎の余白を抽出する処理であり、図10は、これらの設定値に基づき、各文字領域Rnの上端位置を示す座標YT(n)を設定する処理を示す。   9 and 10 show the detailed procedure of Step 4. FIG. FIG. 9 mainly shows processing for extracting the Ysize and the margin for each region, and FIG. 10 shows processing for setting the coordinates YT (n) indicating the upper end position of each character region Rn based on these setting values. Show.

まず、ST401において、着目対象の文字領域を示すカウンタnを初期値の0に設定し、以下、ST402〜407において、nの値を更新しつつ、文字領域Rn毎に、座標y(Y≦y≦Y)の位置にある水平ライン上の黒画素を計数する処理を実行する(すなわち、x軸方向に沿って領域内の画像データを投影することになる。)。この計数値は、前記カウンタn、および処理対象の水平ラインの位置を示す座標yに基づく2次元配列データS(n,y)として、RAM15内に保存される。 First, in ST401, a counter n indicating a target character area is set to an initial value of 0. Thereafter, in ST402 to 407, while updating the value of n, coordinates y (Y S ≦ for each character area Rn). A process of counting black pixels on the horizontal line at the position of y ≦ Y E ) is executed (that is, image data in the region is projected along the x-axis direction). This count value is stored in the RAM 15 as the two-dimensional array data S (n, y) based on the counter n and the coordinate y indicating the position of the horizontal line to be processed.

つぎに、ST408では、nの値をゼロリセットするとともに、前記Ysizeに初期値0をセットする。この後は、nの値を更新しつつ、文字領域Rn毎にST409〜422の処理を実行することになる。   Next, in ST408, the value of n is reset to zero and the initial value 0 is set in Ysize. Thereafter, the processing of ST409 to 422 is executed for each character region Rn while updating the value of n.

以下、文字領域Rn毎の処理の詳細について説明する。
まず、ST409〜411では、着目対象の文字領域Rnを上端から下方に向けてサーチして、前記黒画素数S(n,y)が0より大きくなる最初の水平ラインのy座標を抽出する。このy座標が抽出されると、つぎのST412では、抽出された座標の値yと現在の文字領域Rnの上端を示す座標Yとの差を求め、これを文字領域Rnにおける上余白YZT(n)としてセットする。
Details of the processing for each character area Rn will be described below.
First, in ST409 to 411, the target character area Rn is searched downward from the upper end, and the y coordinate of the first horizontal line in which the number of black pixels S (n, y) is greater than 0 is extracted. When the y coordinate is extracted, in the next ST412, the difference between the extracted coordinate value y and the coordinate Y S indicating the upper end of the current character region Rn is obtained, and this is obtained as the upper margin YZT ( Set as n).

つぎに、ST413〜415では、前記文字領域Rnを下端から上方に向けてサーチして、黒画素数S(n,y)が0より大きくなる最初の水平ラインのy座標を抽出する。このy座標が抽出されると、つぎのST416では、前記文字領域Rnの下端を示す座標Yと前記抽出された座標yとの差を求め、これを、文字領域Rnにおける下余白YZB(n)としてセットする。 Next, in ST413 to 415, the character region Rn is searched upward from the lower end, and the y coordinate of the first horizontal line in which the number of black pixels S (n, y) is greater than 0 is extracted. When the y-coordinate is extracted, in the next ST 416, obtains the difference between the coordinate y, which is the extracted coordinate Y E showing the lower end of the character area Rn, which, bottom margin in the character area Rn YZB (n ).

つぎのST417では、上記の処理により設定された上余白YZT(n)と下余白YZB(n)とを加算し、これを余白加算値tmpとする。なお、この余白加算値tmpは各文字領域Rn間で共有される変数であり、ST417が実行される都度、値が書き換えられる。   In the next ST417, the upper margin YZT (n) and the lower margin YZB (n) set by the above processing are added, and this is set as a margin addition value tmp. The margin addition value tmp is a variable shared between the character areas Rn, and the value is rewritten every time ST417 is executed.

続くST418では、現在の文字領域Rnの長さ(Y−Y+1)から前記余白加算値tmpを差し引くことによって、文字の高さH(n)を求める。ST419では、前記文字の高さH(n)を前記Ysizeと比較する。ここでH(n)がYsizeより大きい場合には、ST420において、このH(n)の値によりYsizeを書き換える。 In ST418, the character height H (n) is obtained by subtracting the margin addition value tmp from the current length (Y E −Y S +1) of the character region Rn. In ST419, the height H (n) of the character is compared with the Ysize. If H (n) is larger than Ysize, Ysize is rewritten with the value of H (n) in ST420.

最後の文字領域RCN−1に対する処理が完了してST409〜422のループが終了したとき、各文字の高さのうちの最大の値がYsizeとして設定されていることになる。なお、このYsize、および文字領域Rn毎の上余白YZT(n)、下余白YZB(n)、文字の高さH(n)は、つぎの処理のためにRAM15内に保存される。 When the processing for the last character region R CN-1 is completed and the loop of ST409 to 422 is completed, the maximum value of the height of each character is set as Ysize. The Ysize, the upper margin YZT (n), the lower margin YZB (n), and the character height H (n) for each character area Rn are stored in the RAM 15 for the next processing.

つぎに、図10のST423では、再びnの値をリセットし、文字領域Rn毎に、以下の手順により補正後の文字領域Rnの上端位置を示すy座標の値:YT(n)を決定する。
まず、ST424では、着目中の文字領域Rnの上余白YZT(n)をチェックする。ここでYZT(n)=0、すなわち上余白がない状態であれば、ST426に進む。このST426では、前記YT(n)に現在の上端位置の座標Yをセットする。
Next, in ST423 of FIG. 10, the value of n is reset again, and the y-coordinate value YT (n) indicating the upper end position of the corrected character area Rn is determined for each character area Rn by the following procedure. .
First, in ST424, the upper margin YZT (n) of the character area Rn under consideration is checked. If YZT (n) = 0, that is, if there is no upper margin, the process proceeds to ST426. This ST426, sets the coordinate Y S of the current upper end position in the YT (n).

YZT(n)>0の場合には、ST424からST425に進み、下余白YZB(n)をチェックする。ここでYZB(n)=0、すなわち下余白がない状態であれば、ST427に進む。このST427では、前記Ysizeと処理対象の文字の高さH(n)との差を現在の文字領域Rnの上端位置Ysに加え、その値をYT(n)としてセットする。   If YZT (n)> 0, the process proceeds from ST424 to ST425, and the bottom margin YZB (n) is checked. If YZB (n) = 0, that is, if there is no bottom margin, the process proceeds to ST427. In ST427, the difference between the Ysize and the height H (n) of the character to be processed is added to the upper end position Ys of the current character area Rn, and the value is set as YT (n).

一方、YZB(n)>0、すなわち、文字領域Rnの上下ともに余白がある場合には、ST425からST428に進む。ST428では、Ys,Ysize,H(n),YZT(n),YZB(n)の各値を下記の(A)式にあてはめることにより、YT(n)を算出する。   On the other hand, if YZB (n)> 0, that is, if there are margins in the upper and lower portions of the character region Rn, the process proceeds from ST425 to ST428. In ST428, YT (n) is calculated by applying each value of Ys, Ysize, H (n), YZT (n), and YZB (n) to the following equation (A).

Figure 0004631384
Figure 0004631384

上記の手順により、文字領域Rnの上端位置の座標は、文字の高さや余白の状態に応じて調整された値YT(n)に更新されることになる。なお、いずれの文字領域Rnについても、その高さはYsizeに統一されるから、前記ST426が実行された文字領域Rnでは、文字の下方に(Ysize−H(n))の大きさの余白が設定されることになる。また、ST427を実行された文字領域Rnでは、文字の上方に(Ysize−H(n))の大きさの余白が設定されることになる。さらに、ST428が実行された文字領域Rnでは、文字の上下ともに余白が設定されるが、これら余白の合計値が(Ysize−H(n))に等しくなる。また、H(n)=Ysizeとなる文字領域Rnでは、上下の余白はいずれも0となる。   With the above procedure, the coordinates of the upper end position of the character region Rn are updated to the value YT (n) adjusted according to the height of the character and the state of the margin. Since the height of any character region Rn is unified to Ysize, a space of (Ysize−H (n)) is provided below the character in the character region Rn in which ST426 is executed. Will be set. In the character region Rn for which ST427 has been executed, a margin with a size of (Ysize−H (n)) is set above the character. Furthermore, in the character region Rn in which ST428 is executed, margins are set both above and below the character, and the total value of these margins is equal to (Ysize−H (n)). In the character area Rn where H (n) = Ysize, the upper and lower margins are all zero.

(5)対応する水平ライン上の黒画素数P(y)の累計処理(ステップ5)
このステップ5の処理は、前記補正後の文字領域Rnに対して実行されるもので、図11に、その処理の概要を示している。このステップ5では、文字領域Rn間で対応関係にある水平ラインHny(領域の上端からの距離が同一の位置にある水平ライン;yの範囲は0≦y≦Ysize−1となる。)に順に着目し、これらライン毎の投影処理によりライン上の黒画素数S0y,S1y,・・・S(CN−1)yを求める。さらに、これらライン毎の黒画素数を累計し、その累計値をP(y)としてRAM15内に格納する。
(5) Cumulative processing of the number of black pixels P (y) on the corresponding horizontal line (step 5)
The process of step 5 is executed for the corrected character area Rn, and FIG. 11 shows an outline of the process. In this step 5, the horizontal line H ny (the horizontal line at the same distance from the upper end of the area; the range of y is 0 ≦ y ≦ Ysize−1) corresponding to the character area Rn. Paying attention in order, the number of black pixels S 0y , S 1y ,... S (CN−1) y on the line is obtained by the projection processing for each line. Further, the number of black pixels for each line is accumulated, and the accumulated value is stored in the RAM 15 as P (y).

(6)極大値PTmax,PMmax,PBmaxの抽出(ステップ6)
前記ステップ5で求められた累計値P(y)は、図12に示すように、y軸に沿うヒストグラムとして表すことができる。ステップ6では、このようなP(y)の配列を走査することにより、3個の極大値PTmax,PMmax,PBmaxを抽出する。極大値PTmaxは、前記ヒストグラムを上方から走査した場合に1番目に抽出される極大値である。反対に、極大値PBmaxは、前記ヒストグラムを下方から走査した場合に1番目に抽出される極大値である。また、極大値PMmaxは、極大値PTmaxとPBmaxとの間に存在する極大値となる。なお、図12のヒストグラムにおいて、累計値P(y)の値がゼロに近いものは、印刷ライン間の空白部分を反映していると考えることができる。
(6) Extraction of local maximum values PT max , PM max , PB max (step 6)
The cumulative value P (y) obtained in step 5 can be represented as a histogram along the y-axis, as shown in FIG. In Step 6, three local maximum values PT max , PM max , and PB max are extracted by scanning such an array of P (y). The maximum value PT max is a maximum value extracted first when the histogram is scanned from above. On the other hand, the maximum value PB max is the maximum value extracted first when the histogram is scanned from below. Further, the maximum value PM max is a maximum value existing between the maximum values PT max and PB max . In the histogram of FIG. 12, the cumulative value P (y) value close to zero can be considered to reflect a blank portion between print lines.

図13,14は、前記極大値PTmax,PMmax,PBmaxの抽出処理にかかる詳細な手順を示す。この手順では、まず最初に、極大値PTmaxを見つけるために、yの値を0とする(ST601)。そして、ST602〜604において、yの値を1ずつ増やしながら、P(y)とP(y+1)とを比較する。ここでP(y)>P(y+1)となったとき、その時点の着目位置yにおける値P(y)は、1つ下の位置における値P(y+1)より大きくなると同時に、1つ上の位置における値P(y−1)に対しても大きくなる。y−1は、このループを前回実行したときのyに相当し、また、このとき現在のyはy+1であり、両者の比較によりST602が「NO」となっているからである(後記するST612〜614でも、これと同様の考えにより極大値PBmaxを抽出する。)。よって、ST602が「YES」となった時点でループを抜けてST605に進み、現在のP(y)の値を極大値PTmaxとして設定する。 FIGS. 13 and 14 show detailed procedures for extracting the local maximum values PT max , PM max , and PB max . In this procedure, first, the value of y is set to 0 in order to find the maximum value PT max (ST601). In ST602 to 604, P (y) and P (y + 1) are compared while increasing the value of y by one. Here, when P (y)> P (y + 1), the value P (y) at the current position of interest y becomes larger than the value P (y + 1) at the next lower position, and at the same time one higher. It also increases with respect to the value P (y−1) at the position. This is because y-1 corresponds to y when this loop is executed last time, and at this time, the current y is y + 1, and ST602 is “NO” by comparing both (ST612 described later). Also at ˜614, the maximum value PB max is extracted based on the same idea. Therefore, when ST602 becomes “YES”, the process exits the loop and proceeds to ST605, where the current value of P (y) is set as the maximum value PT max .

極大値PTmaxが設定されると、つぎのST606〜608では、この極大値PTmaxが得られた位置より下方を走査しつつ、P(y)とP(y+1)との比較を続ける。ここでP(y+1)>P(y)となると、ST609に進み、その時点のP(y+1)を極大値PMmaxとして設定する。ただし、この時点の極大値PMmaxは仮のものである。つぎのST610では、後で極大値PMmaxを確定する処理のために、極大値PMmaxより1つ下方の位置(y+2)を変数ysに保存する。 When the maximum value PT max is set, in the next ST606 to 608, the comparison between P (y) and P (y + 1) is continued while scanning below the position where the maximum value PT max is obtained. If P (y + 1)> P (y), the process proceeds to ST609, and P (y + 1) at that time is set as the maximum value PM max . However, the maximum value PM max at this time is provisional. In the next ST610, a position (y + 2) one level lower than the maximum value PM max is stored in the variable ys for the process of determining the maximum value PM max later.

つぎに、ST611では、yの値を最大の(Ysize−1)に設定する。続くST612〜614では、yの値を1つずつ小さくしながら、P(y)とP(y−1)とを比較する。このループにおいて、P(y)>P(y−1)と判断されると、ST612からST615に進み、その時点でのP(y)の値を極大値PBmaxとして設定する。 Next, in ST611, the value of y is set to the maximum (Ysize-1). In the subsequent ST612 to 614, P (y) and P (y-1) are compared while decreasing the value of y one by one. In this loop, if it is determined that P (y)> P (y -1), the process proceeds from ST612 to ST 615, set the value of P (y) at that time as the local maximum value PB max.

極大値PBmaxが設定されると、つぎのST616〜618では、この極大値PBmaxより上方において、引き続きP(y)とP(y−1)とを比較する。ここでP(y−1)>P(y)となると、ループを抜けてST619に進み、その時点での(y−1)の値を変数yeにセットする。以下、ST620〜624では、yの値を前記ysからyeまでの範囲で動かしながら、この範囲におけるP(y)の最大値を抽出し、その値を極大値PMmaxとする。 When the maximum value PB max is set, in the next ST616 to 618, P (y) and P (y−1) are continuously compared above the maximum value PB max . If P (y-1)> P (y), the process exits the loop and proceeds to ST619, where the value of (y-1) at that time is set in the variable ye. Hereinafter, the ST620~624, while moving the value of y in the range up ye from said ys, extracts the maximum value of P (y) in this range, the value a maximum value PM max.

なお、ST602〜604、ST606〜608、ST612〜614、ST616〜618の各ループにおいて、着目可能な範囲内に極大値が見つからなかった場合には、図示しないエラー処理に進む。   In the loops of ST602 to 604, ST606 to 608, ST612 to 614, and ST616 to 618, if a local maximum value is not found within a focusable range, the process proceeds to error processing (not shown).

(7)P(y)の加算処理(ステップ7)
ステップ7でも、前記累計値P(y)を処理対象とする。このステップ7の処理は、前記ヒストグラムのy軸において所定幅wの範囲に含まれる各累計値P(y)を加算する処理に相当する。この加算処理は、yの値を0から順に1つずつ動かしながら実行されるもので、各yの値について求められた加算値は、配列AP(y)に格納される。
(7) P (y) addition process (step 7)
Also in step 7, the cumulative value P (y) is set as a processing target. The process of step 7 corresponds to a process of adding the cumulative values P (y) included in the range of the predetermined width w on the y axis of the histogram. This addition processing is executed while moving the y values one by one in order from 0, and the addition value obtained for each y value is stored in the array AP (y).

(8)最小値APminの抽出(ステップ8)
図15は、前記ステップ7で求められた加算値AP(y)を、前記図12と同様のy軸に沿うヒストグラムとして示したものである(ただし、x軸方向におけるスケールは縮小している。)。ステップ8では、この加算値AP(y)を順に比較し、最小値APminを求める。
(8) Extraction of minimum value AP min (step 8)
FIG. 15 shows the added value AP (y) obtained in step 7 as a histogram along the y-axis similar to FIG. 12 (however, the scale in the x-axis direction is reduced). ). In step 8, the addition value AP (y) is compared in order to determine the minimum value AP min .

(9)正規化処理(ステップ9)
ステップ9では、ここまでの処理により求められた極大値PTmax,PMmax,PBmax,加算値の最小値APminの各値を、前記ST3で求めたPmaxを用いて正規化する。なお、極大値PTmax,PMmax,PBmaxの正規化では、現在の値を前記Pmaxで除算する。また加算値の最小値APminの正規化では、現在の値を(Pmax×w)により除算する。wは、前記加算値AP(y)の算出の範囲を示すのに使用されたものである。
(9) Normalization processing (step 9)
In step 9, the local maximum values PT max , PM max , PB max , and the minimum value AP min obtained by the above processing are normalized using P max obtained in ST3. In normalization of the maximum values PT max , PM max , and PB max , the current value is divided by the P max . Further, in normalization of the minimum value AP min of the addition value, the current value is divided by (P max × w). w is used to indicate the range of calculation of the added value AP (y).

前記Pmaxは、各文字領域Rnにおいてドットに対応する黒画素が少なくとも1つ出現した垂直ラインの総数である。したがって、上記正規化後の各値は、1水平ライン上に出現し得る黒画素の最大値に対して、実際の黒画素がどの程度の割合で現れているかを示すと考えることができるから、ドットの印刷の程度をわかりやすく示すことができる。 The P max is the total number of vertical lines in which at least one black pixel corresponding to a dot appears in each character region Rn. Therefore, each value after the normalization can be considered to indicate how much the actual black pixels appear with respect to the maximum value of the black pixels that can appear on one horizontal line. The degree of dot printing can be shown in an easy-to-understand manner.

(10)判定処理(ステップ10)
このステップ10では、前記極大値PTmax,PMmax,PBmax、および加算値の最小値APminについての正規化後の値をそれぞれ所定のしきい値と比較する。各極大値に対応するしきい値は、ドット埋まりが生じた印刷ラインにかかる黒画素数を反映させたもので、いずれかの極大値がしきい値よりも大きくなると、その極大値に対応する位置でドット埋まりが生じているものと判断される。
(10) Determination process (step 10)
In this step 10, the normalized values for the local maximum values PT max , PM max , PB max and the minimum value AP min of the addition values are respectively compared with predetermined threshold values. The threshold value corresponding to each local maximum value reflects the number of black pixels applied to the print line in which dot filling has occurred. If any local maximum value is larger than the threshold value, it corresponds to the local maximum value. It is determined that dot filling is occurring at the position.

加算値の最小値APminに対応するしきい値は、1〜2個程度のドットが打たれた1印刷ラインにかかる水平ラインの黒画素数を反映させたものとなる。正規化後のAPminの値がこのしきい値を下回った場合、APminに対応する位置でドット抜けが生じている、と判断されることになる。 The threshold value corresponding to the minimum value AP min of the addition value reflects the number of black pixels of the horizontal line applied to one print line on which about 1 to 2 dots are applied. If the value of AP min after normalization falls below this threshold value, it is determined that dot missing has occurred at a position corresponding to AP min .

なお、上記APminは、複数のドット印刷ラインのうち、上下端のライン以外の印刷ラインにおけるドット抜けを抽出するためのものである。ST10では、上下端のラインのドット抜けを判別するために、別途、補正後の文字領域Rnの高さYsizeを用いた判別処理を実行している。 The AP min is used to extract dot missing in a print line other than the upper and lower end lines among a plurality of dot print lines. In ST10, in order to discriminate dot missing in the upper and lower end lines, a discrimination process using the height Ysize of the corrected character region Rn is separately performed.

前記したように、Ysizeは文字列中の各文字の高さの最大値であるから、上端または下端のいずれかの印刷ラインにドット抜けが発生した場合には、このYsizeは本来の文字の高さよりも低くなると考えられる。
よって、この実施例では、印刷ラインが1つ欠落した場合の文字の高さに基づくしきい値を設定し、このしきい値とYsizeと比較する。ここでYsizeがしきい値より小さい場合には、上端または下端の印刷ラインにおいてドット抜けが発生していると判断されることになる。
As described above, since Ysize is the maximum value of the height of each character in the character string, if dot missing occurs on either the top or bottom print line, this Ysize is the height of the original character. It will be lower than this.
Therefore, in this embodiment, a threshold value is set based on the character height when one print line is missing, and this threshold value is compared with Ysize. If Ysize is smaller than the threshold value, it is determined that dot missing has occurred in the upper or lower print line.

(11)判定結果出力(ステップ11)
前記ステップ10において、いずれかの位置において、ドット埋まり、またはドット抜けが生じていると判断された場合、ステップ11では、前記PLC12に対し、「不良あり」を示す判定信号を出力する。このほか、このステップ11では、図16のような判定結果表示画面をモニタ5に表示させるようにしている。
(11) Determination result output (step 11)
If it is determined in step 10 that dot filling or dot missing has occurred at any position, in step 11, a determination signal indicating “defective” is output to the PLC 12. In addition to this, in step 11, a determination result display screen as shown in FIG.

図16において、上埋まり判定上限値、中埋まり判定上限値、下埋まり判定上限値は、それぞれ前記極大値PTmax,PMmax,PBmaxに対応するものである。また中抜け判定下限値は前記加算値AP(y)の最小値APminに対応し、最下段の上下抜け判定下限値は、前記Ysizeに対応する。 In FIG. 16, an upper filling determination upper limit value, a middle filling determination upper limit value, and a lower filling determination upper limit value correspond to the maximum values PT max , PM max , and PB max , respectively. Further, the lower omission determination lower limit value corresponds to the minimum value AP min of the addition value AP (y), and the lowermost upper / lower omission determination lower limit value corresponds to the Ysize.

図示例では、これら5種類のパラメータについて、それぞれ上記した手順により求めた計測値と判別処理に使用したしきい値とを対応づけて表示している。なお、PTmax,PMmax,PBmax,APminにかかる各数値は、前記正規化後の数値を百分率の単位で表したもので、Ysizeにかかる数値は画素数である。 In the illustrated example, for these five types of parameters, the measured values obtained by the above-described procedure and the threshold values used for the discrimination processing are displayed in association with each other. Each numerical value relating to PT max , PM max , PB max , AP min represents the normalized numerical value in percentage units, and the numerical value relating to Ysize is the number of pixels.

以上、説明した処理によれば、文字列中の各文字に対する文字領域Rnを、y軸上のその文字の位置に合わせて調整するとともに、各文字領域Rnの高さを最大の文字の高さYsizeに合わせるので、各領域Rn間の水平ラインHnyの対応づけを支障なく行うことができ、Ysize個の累計値P(y)を得ることができる。 As described above, according to the processing described above, the character region Rn for each character in the character string is adjusted according to the position of the character on the y-axis, and the height of each character region Rn is the maximum character height. since fit ysize, the correspondence between the horizontal line H ny between the region Rn can be performed without any problem, it is possible to obtain a ysize number of accumulated value P (y).

勿論、文字間の高さにばらつきがあり、高さが小さい文字には余白が設定されるため、文字領域Rn間で組み合わせられる水平ラインは、実際の対応関係を忠実に示しているとは言えない。しかしながら、画像上の1つのドットは数画素分の大きさを持つので、印刷ラインについては、同じ印刷ラインにかかる水平ラインを多数含む組み合わせが設定され、また印刷ライン間の空白部分についても、同じ空白部分にかかる水平ラインを多数含む組み合わせが設定されると考えることができる。したがって、前記累計値P(y)によれば、各印刷ラインの印刷状態について、十分に信頼度の高いデータを得ることができ、そのうちの極大値や最小値に基づき、ドットの埋まりやドットの抜けの有無を精度良く判別することができる。   Of course, there are variations in the height between characters, and margins are set for characters with a small height. Therefore, it can be said that the horizontal lines combined between the character regions Rn faithfully show the actual correspondence. Absent. However, since one dot on the image has a size of several pixels, a combination including a large number of horizontal lines on the same print line is set for the print line, and a blank portion between the print lines is also the same. It can be considered that a combination including a large number of horizontal lines covering the blank portion is set. Therefore, according to the cumulative value P (y), sufficiently reliable data can be obtained for the printing state of each printing line. Based on the maximum value and the minimum value, dot filling and dot The presence or absence of omission can be determined with high accuracy.

また、ドットの抜けについては、所定幅wの範囲に対応する累計値P(y)を加算した値の最小値APminを用いた判別処理を行うので、印刷ライン間の空白部がドットの抜けとして誤抽出するのを防止することができる。加えて、この実施例では、各文字領域の補正のために抽出されたYsizeを用いた判別処理を行うので、上下端のドットの抜けを精度良く判別することができる。 Further, regarding the missing dots, the discrimination process is performed using the minimum value AP min obtained by adding the cumulative value P (y) corresponding to the range of the predetermined width w. Can be prevented from being erroneously extracted. In addition, in this embodiment, since the discrimination process using Ysize extracted for correcting each character area is performed, it is possible to accurately discriminate the missing dots at the upper and lower ends.

なお、前記幅wについては、あらかじめ、印刷不良のないモデルの文字列を撮像して得た画像を用いて求めることができる。この場合、各文字について、前記図4のステップ1〜4と同様の処理を実行してYsizeの値を求め、このYsizeを印刷ラインの数で割った値に基づきwを設定することができる。また、この場合には、一度、設定された値に基づいて図4の検査手順を実行し、前記最小値APminの値によって、wの値を調整するのが望ましい。たとえば、印刷ライン間の空白部が小さい場合には、最小値APminの値が大きくなると考えられるが、この場合には、wの値を小さくなる方向に調整することで対応することができる。また、印刷ライン間の空白部が大きい場合には、最小値APminの値が小さくなると考えられるが、この場合には、wの値を大きくなる方向に調整することで対応することができる。 The width w can be obtained in advance using an image obtained by capturing an image of a character string of a model having no printing defect. In this case, for each character, the same process as in steps 1 to 4 in FIG. 4 is executed to obtain the value of Ysize, and w can be set based on the value obtained by dividing this Ysize by the number of print lines. In this case, it is desirable that the inspection procedure of FIG. 4 is executed once based on the set value, and the value of w is adjusted by the value of the minimum value AP min . For example, when the blank portion between the print lines is small, the value of the minimum value AP min is considered to be large. In this case, it can be dealt with by adjusting the value of w so as to decrease. In addition, when the blank portion between the print lines is large, the value of the minimum value AP min is considered to be small, but in this case, it can be dealt with by adjusting the value of w in the direction of increasing.

また、図16のように、1水平ラインにおける最大の黒画素数に対する割合により、ドット埋まりやドット抜けの状態を示す場合には、印刷状態と数値との関係を容易に把握することができる。したがって、ST10の判定処理のためのしきい値をユーザー側に数値入力させることも可能である。   Further, as shown in FIG. 16, when the dot filling state or the missing dot state is indicated by the ratio to the maximum number of black pixels in one horizontal line, the relationship between the printing state and the numerical value can be easily grasped. Therefore, it is possible to cause the user to input a numerical value for the threshold value for the determination process of ST10.

なお、この実施例の検査装置1では2値画像を処理するようにしたが、これに限らず、ディジタル変換後の濃淡画像を処理してもよい。この場合、前記ST2、ST303、ST403などでの黒画素数を計数する処理は、ライン上の各画素の濃度値を加算する処理に置き換えられることになる。また、ST3では、文字の画像に対応する濃度を有する画素を含む垂直ラインを抽出することになる。
また、濃淡画像についても、前記濃度値の加算に代えて、文字の画像に対応する濃度値を有する画素の数を計数する方法をとれば、2値画像における投影値と同様のデータを得ることができる。
In the inspection apparatus 1 of this embodiment, a binary image is processed. However, the present invention is not limited to this, and a grayscale image after digital conversion may be processed. In this case, the process of counting the number of black pixels in ST2, ST303, ST403, etc. is replaced with the process of adding the density value of each pixel on the line. In ST3, a vertical line including pixels having a density corresponding to the character image is extracted.
For grayscale images, if the method of counting the number of pixels having density values corresponding to the character image is used instead of the density value addition, data similar to the projection value in the binary image can be obtained. Can do.

また、この実施例の検査装置1では、別途、従来のパターンマッチングによる文字検査も行うことができる。このように複数とおりの方法による検査を行えば、各種の要因による印刷不良を検出することができ、検査の精度を大幅に向上することができる。   In addition, in the inspection apparatus 1 of this embodiment, it is possible to separately perform character inspection by conventional pattern matching. If inspection is performed by a plurality of methods as described above, printing defects due to various factors can be detected, and the accuracy of inspection can be greatly improved.

ところで、上記の実施例では、文字列中の個々の文字が歪む場合までは説明していないが、印刷面の傾きによっては、一文字分の幅範囲においても、印刷ラインに歪みが生じる場合がある。このような場合には、前記文字列の並びに沿う領域を、一文字の幅よりも小さい単位に細分化して、同様の処理を行えばよい。またこの場合には、各領域の幅を処理対象の文字の歪み度合に合わせて設定するようにするのが望ましい。
また、上記の実施例では、文字列を検査対象としたが、マークなどの文字以外の印刷体を検査対象とする場合にも、同様の手法による検査を実施することができる。
By the way, in the above-described embodiment, the description has not been made until individual characters in the character string are distorted. However, depending on the inclination of the print surface, the print line may be distorted even in the width range of one character. . In such a case, the region along the character string may be subdivided into units smaller than the width of one character, and the same processing may be performed. In this case, it is desirable to set the width of each region in accordance with the degree of distortion of the character to be processed.
In the above-described embodiment, the character string is the inspection target. However, when a print body other than a character such as a mark is the inspection target, the inspection can be performed by the same method.

この発明にかかる文字検査装置の適用例を示す図である。It is a figure which shows the example of application of the character inspection apparatus concerning this invention. 文字検査装置の電気構成を示す図である。It is a figure which shows the electric constitution of a character inspection apparatus. 検査対象の文字列の画像の例を示す図である。It is a figure which shows the example of the image of the character string of a test object. 一連の検査手順を示すフローチャートである。It is a flowchart which shows a series of test | inspection procedures. 文字の切り出し処理と文字領域を仮設定する処理との概要を示す図である。It is a figure which shows the outline | summary of the cut-out process of a character, and the process which temporarily sets a character area. 黒画素を含む垂直ラインの総数を抽出する処理の概要を示す図である。It is a figure which shows the outline | summary of the process which extracts the total number of the vertical line containing a black pixel. 図6の処理の詳細な手順を示すフローチャートである。It is a flowchart which shows the detailed procedure of the process of FIG. 文字領域の補正処理の概要を示す図である。It is a figure which shows the outline | summary of the correction process of a character area. 図8の処理の詳細な手順を示すフローチャートである。It is a flowchart which shows the detailed procedure of the process of FIG. 図9の続きのフローチャートである。10 is a flowchart continued from FIG. 9. 対応する水平ライン上の黒画素数を累計する処理の概要を示す図である。It is a figure which shows the outline | summary of the process which accumulates the number of black pixels on a corresponding horizontal line. 黒画素数の累計結果を極大値とともに示すヒストグラムである。It is a histogram which shows the cumulative result of the number of black pixels together with the maximum value. 極大値の抽出にかかる手順を示すフローチャートである。It is a flowchart which shows the procedure concerning extraction of local maximum. 図13の続きのフローチャートである。14 is a flowchart continued from FIG. 13. 累計値の加算値をその最小値とともに示すヒストグラムである。It is a histogram which shows the addition value of a cumulative value with the minimum value. 判定結果の表示画面を示す図である。It is a figure which shows the display screen of a determination result. ドットの埋まり、ドットの抜けの不良の例を示す図である。It is a figure which shows the example of the filling of a dot and the defect of a missing dot.

A 文字列
Rn 文字領域
1 文字検査装置
2 インクジェットプリンタ
3 カメラ
13 CPU
14 ROM
15 RAM
16 画像メモリ
20 出力部
A Character string Rn Character area 1 Character inspection device 2 Inkjet printer 3 Camera 13 CPU
14 ROM
15 RAM
16 Image memory 20 Output section

Claims (11)

縦方向または横方向に沿って並んだ複数のノズルを有する印刷ヘッドを印刷対象物に対して前記ノズルの並び方向に直交する方向に沿って相対的に移動させながら各ノズルのドットの印刷動作を制御することにより前記印刷対象物に形成された印刷体を撮像し、得られた画像を用いて、前記印刷対象物に対する各ノズルの移動の方向に沿うノズル毎の印刷ラインに印刷不良が発生していないかどうかを検査する方法であって、
各ノズルの印刷ラインがそれぞれノズルの並び方向に直交していると仮定して、前記印刷体の画像の仮定の印刷ラインの方向においては、ドットの分布範囲の全体または一部を含む範囲を処理範囲に設定する一方、前記画像の仮定の印刷ラインに直交する方向においては前記複数のノズルに対応する仮定の印刷ラインを全て含む範囲を処理範囲に設定する第1のステップと、
前記第1のステップで設定された処理範囲により特定される処理対象領域内の画像を仮定の印刷ラインの方向に沿って投影して、その投影結果に基づき仮定の印刷ラインに直交する方向におけるドットの分布範囲を特定し、前記処理対象領域内に、仮定の印刷ラインの方向に沿って並び、かつ仮定の印刷ラインに直交する方向における範囲が前記特定された範囲に対応する複数の領域を設定する第2のステップと、
前記第2のステップで設定された各領域の画像をそれぞれ仮定の印刷ラインに沿って投影して、その投影結果に基づき仮定の印刷ラインに直交する方向におけるドットの分布範囲を領域毎に特定すると共に、これら分布範囲の長さの中の最大の長さを特定し、各領域の仮定の印刷ラインに直交する方向における範囲にそれぞれ当該領域につき特定されたドットの分布範囲が含まれ、かつ仮定の印刷ラインに直交する方向における各領域の長さが前記最大の長さに統一されるように、仮定の印刷ラインに直交する方向における各領域の位置および長さを補正する第3のステップと、
前記第3のステップを実行した後の各領域間において、各領域内の仮定の印刷ラインの方向に沿う各ラインを、仮定の印刷ラインに直交する方向における相対位置が対応するもの毎に組み合わせ、各組み合わせ毎に、組み合わせられた各ラインにおけるドットを表す画素の数を累計する第4のステップと、
前記各ラインの組み合わせ毎に求めた累計値の中から極大値を抽出し、抽出された極大値を所定のしきい値と比較し、前記極大値がしきい値より大きいという比較結果を得たとき、実際の印刷ラインの方向に沿ってドットの埋まりが生じていると判別する第5のステップとを、
実行することを特徴とする印刷状態検査方法。
A printing head having a plurality of nozzles arranged in the vertical direction or the horizontal direction is moved relative to a print object in a direction orthogonal to the nozzle arrangement direction, and the dot printing operation of each nozzle is performed. The printing body formed on the printing object is imaged by controlling, and using the obtained image, a printing defect occurs in the printing line for each nozzle along the direction of movement of each nozzle with respect to the printing object. A method for checking whether or not
Assuming that the print line of each nozzle is orthogonal to the direction in which the nozzles are arranged, in the assumed print line direction of the image of the print body, a range including all or part of the dot distribution range is processed. A first step of setting a range including all hypothetical print lines corresponding to the plurality of nozzles as a processing range in a direction orthogonal to the hypothetical print lines of the image,
Dots in the direction orthogonal to the assumed print line are projected based on the projection result by projecting the image in the processing target area specified by the processing range set in the first step along the direction of the assumed print line. The distribution range is specified, and a plurality of regions in the processing target region are arranged along the direction of the assumed print line and the range in the direction orthogonal to the assumed print line corresponds to the specified range. A second step of:
By projecting the image of each region set by the second step along each hypothetical print line, specifying the distribution range of dots in a direction perpendicular to the hypothetical print line based on the projected result for each area In addition , the maximum length among the lengths of these distribution ranges is specified, and the range in the direction orthogonal to the assumed print line of each region includes the distribution range of dots specified for each region, and A third step of correcting the position and length of each region in the direction orthogonal to the assumed print line so that the length of each region in the direction orthogonal to the print line is unified to the maximum length ; ,
Between each region after performing the third step, each line along the direction of the assumed print line in each region is combined for each corresponding relative position in the direction orthogonal to the assumed print line, For each combination, a fourth step of accumulating the number of pixels representing the dots in each combined line;
The maximum value is extracted from the cumulative value obtained for each combination of the lines, the extracted maximum value is compared with a predetermined threshold value, and a comparison result that the maximum value is larger than the threshold value is obtained. A fifth step of determining that dot filling has occurred along the direction of the actual print line,
A printing state inspection method characterized by being executed.
縦方向または横方向に沿って並んだ複数のノズルを有する印刷ヘッドを印刷対象物に対して前記ノズルの並び方向に直交する方向に沿って相対的に移動させながら各ノズルのドットの印刷動作を制御することにより前記印刷対象物に形成された印刷体を撮像し、得られた画像を用いて、前記印刷対象物に対する各ノズルの移動の方向に沿うノズル毎の印刷ラインに印刷不良が発生していないかどうかを検査する方法であって、
各ノズルの印刷ラインがそれぞれノズルの並び方向に直交していると仮定して、前記印刷体の画像の仮定の印刷ラインの方向においては、ドットの分布範囲の全体または一部を含む範囲を処理範囲に設定する一方、前記画像の仮定の印刷ラインに直交する方向においては前記複数のノズルに対応する仮定の印刷ラインを全て含む範囲を処理範囲に設定する第1のステップと、
前記第1のステップで設定された処理範囲により特定される処理対象領域内の画像を仮定の印刷ラインの方向に沿って投影して、その投影結果に基づき仮定の印刷ラインに直交する方向におけるドットの分布範囲を特定し、前記処理対象領域内に、仮定の印刷ラインの方向に沿って並び、かつ仮定の印刷ラインに直交する方向における範囲が前記特定された範囲に対応する複数の領域を設定する第2のステップと、
前記第2のステップで設定された各領域の画像をそれぞれ仮定の印刷ラインに沿って投影して、その投影結果に基づき仮定の印刷ラインに直交する方向におけるドットの分布範囲を領域毎に特定すると共に、これら分布範囲の長さの中の最大の長さを特定し、各領域の仮定の印刷ラインに直交する方向における範囲にそれぞれ当該領域につき特定されたドットの分布範囲が含まれ、かつ仮定の印刷ラインに直交する方向における各領域の長さが前記最大の長さに統一されるように、仮定の印刷ラインに直交する方向における各領域の位置および長さを補正する第3のステップと、
前記第3のステップを実行した後の各領域間において、各領域内の仮定の印刷ラインの方向に沿う各ラインを、仮定の印刷ラインに直交する方向における相対位置が対応するもの毎に組み合わせ、各組み合わせ毎に、組み合わせられた各ラインにおけるドットを表す画素の数を累計する第4のステップと、
隣り合うノズルによる印刷ライン間の距離に対応する幅の処理対象範囲を、その幅方向を仮定の印刷ラインに直交する方向に合わせて、当該方向に沿って順に動かしながら、第3のステップで各ラインの組み合わせ毎に求めた累計値のうち処理対象範囲に対応する複数の累計値を加算する処理を繰り返し実行し、毎回の加算処理により得た加算値の中の最小値を所定のしきい値と比較し、加算値の最小値がしきい値より小さいという比較結果を得たとき、実際の印刷ラインの方向に沿ってドットの抜けが生じていると判別する第5のステップとを、実行することを特徴とする印刷状態検査方法。
A printing head having a plurality of nozzles arranged in the vertical direction or the horizontal direction is moved relative to a print object in a direction orthogonal to the nozzle arrangement direction, and the dot printing operation of each nozzle is performed. The printing body formed on the printing object is imaged by controlling, and using the obtained image, a printing defect occurs in the printing line for each nozzle along the direction of movement of each nozzle with respect to the printing object. A method for checking whether or not
Assuming that the print line of each nozzle is orthogonal to the direction in which the nozzles are arranged, in the assumed print line direction of the image of the print body, a range including all or part of the dot distribution range is processed. A first step of setting a range including all hypothetical print lines corresponding to the plurality of nozzles as a processing range in a direction orthogonal to the hypothetical print lines of the image,
Dots in the direction orthogonal to the assumed print line are projected based on the projection result by projecting the image in the processing target area specified by the processing range set in the first step along the direction of the assumed print line. The distribution range is specified, and a plurality of regions in the processing target region are arranged along the direction of the assumed print line and the range in the direction orthogonal to the assumed print line corresponds to the specified range. A second step of:
By projecting the image of each region set by the second step along each hypothetical print line, specifying the distribution range of dots in a direction perpendicular to the hypothetical print line based on the projected result for each area In addition , the maximum length among the lengths of these distribution ranges is specified, and the range in the direction orthogonal to the assumed print line of each region includes the distribution range of dots specified for each region, and A third step of correcting the position and length of each region in the direction orthogonal to the assumed print line so that the length of each region in the direction orthogonal to the print line is unified to the maximum length ; ,
Between each region after performing the third step, each line along the direction of the assumed print line in each region is combined for each corresponding relative position in the direction orthogonal to the assumed print line, For each combination, a fourth step of accumulating the number of pixels representing the dots in each combined line;
The process target range of a width corresponding to the distance between by the adjacent nozzles print line, in accordance with the direction perpendicular to the width direction on the assumption of the print line, while moving sequentially along the direction, the third step The process of adding a plurality of cumulative values corresponding to the processing target range among the cumulative values obtained for each combination of lines is repeatedly executed, and the minimum value among the added values obtained by each addition process is set to a predetermined threshold value. When the comparison result that the minimum value of the addition value is smaller than the threshold value is obtained, a fifth step of determining that a missing dot has occurred along the actual print line direction is executed. And a printing state inspection method.
複数のノズルにより縦並びのドットを印刷する印刷ヘッドを用いて印刷された横書きの文字列を撮像し、得られた画像を用いて前記文字列に沿って印刷不良が発生していないかどうかを検査する方法であって、
検査対象の文字列の画像を文字列に直交する方向に沿って投影して、その投影結果に基づき前記画像中の文字列を構成する文字毎に、当該文字を表すドットが当該文字の幅方向において分布する範囲を抽出すると共に、前記検査対象の文字列の画像を文字列の方向に沿って投影して、その投影結果に基づき当該文字列全体を表すドットが文字列の高さ方向において分布する範囲を抽出し、各文字に対し、それぞれその文字につき抽出された幅方向におけるドットの分布範囲と、文字列全体につき抽出された文字列の高さ方向におけるドットの分布範囲とにより定まる処理領域を設定する第1のステップと、
前記第1のステップで設定された文字毎の処理領域内の画像をそれぞれ文字列の方向に沿って投影して、その投影結果に基づき文字列の高さ方向におけるドットの分布範囲を文字毎に特定すると共に、これら分布範囲の長さの中の最大の長さを特定し、各文字の処理領域の文字列の高さ方向における範囲にそれぞれ当該文字につき特定されたドットの分布範囲が含まれ、かつ文字列の高さ方向における各処理領域の長さが前記最大の長さに統一されるように、文字列の高さ方向における各処理領域の位置および長さを補正する第2のステップと、
前記第2のステップを実行した後の各処理領域間において、各処理領域内の幅方向に沿う各ラインを、文字列の高さ方向における相対位置が対応するもの毎に組み合わせ、各組み合わせ毎に、組み合わせられた各ラインにおけるドットを表す画素の数を累計する第3のステップと、
前記第3のステップで各ラインの組み合わせ毎に求めた累計値の中から極大値を抽出し、抽出された極大値を所定のしきい値と比較し、前記極大値がしきい値より大きいという比較結果を得たとき、前記文字列の方向に沿ってドットの埋まりが生じていると判別する第4のステップとを、
実行することを特徴とする文字検査方法。
Image a horizontally written character string printed using a print head that prints vertically arranged dots by a plurality of nozzles, and use the obtained image to determine whether a print defect has occurred along the character string. A method of inspecting,
An image of the character string to be inspected is projected along a direction orthogonal to the character string, and for each character constituting the character string in the image based on the projection result, a dot representing the character is the width direction of the character And extracting an image of the character string to be inspected along the direction of the character string, and distributing the dots representing the entire character string in the height direction of the character string based on the projection result A processing area that is determined by the distribution range of dots in the width direction extracted for each character and the distribution range of dots in the height direction of the character string extracted for the entire character string. A first step of setting
The image in the processing area for each character set in the first step is projected along the direction of the character string, and the distribution range of dots in the height direction of the character string is calculated for each character based on the projection result. In addition to specifying the maximum length among the lengths of these distribution ranges, the range in the height direction of the character string in the processing area of each character includes the distribution range of dots specified for each character. And a second step of correcting the position and length of each processing region in the height direction of the character string so that the length of each processing region in the height direction of the character string is unified to the maximum length. When,
Between each processing area after executing the second step, each line along the width direction in each processing area is combined for each corresponding relative position in the height direction of the character string , and for each combination A third step of accumulating the number of pixels representing dots in each combined line;
The maximum value is extracted from the cumulative value obtained for each combination of lines in the third step, the extracted maximum value is compared with a predetermined threshold value, and the maximum value is greater than the threshold value. When a comparison result is obtained, a fourth step of determining that dot embedding has occurred along the direction of the character string,
A character inspection method characterized by being executed.
複数のノズルにより縦並びのドットを印刷する印刷ヘッドを用いて印刷された横書きの文字列を撮像し、得られた画像を用いて前記文字列に沿って印刷不良が発生していないかどうかを検査する方法であって、
検査対象の文字列の画像を文字列に直交する方向に沿って投影して、その投影結果に基づき前記画像中の文字列を構成する文字毎に、当該文字を表すドットが当該文字の幅方向において分布する範囲を抽出すると共に、前記検査対象の文字列の画像を文字列の方向に沿って投影して、その投影結果に基づき当該文字列全体を表すドットが文字列の高さ方向において分布する範囲を抽出し、各文字に対し、それぞれその文字につき抽出された幅方向におけるドットの分布範囲と、文字列全体につき抽出された文字列の高さ方向におけるドットの分布範囲とにより定まる処理領域を設定する第1のステップと、
前記第1のステップで設定された文字毎の処理領域内の画像をそれぞれ文字列の方向に沿って投影して、その投影結果に基づき文字列の高さ方向におけるドットの分布範囲を文字毎に特定すると共に、これら分布範囲の長さの中の最大の長さを特定し、各文字の処理領域の文字列の高さ方向における範囲にそれぞれ当該文字につき特定されたドットの分布範囲が含まれ、かつ文字列の高さ方向における各処理領域の長さが前記最大の長さに統一されるように、文字列の高さ方向における各処理領域の位置および長さを補正する第2のステップと、
前記第2のステップを実行した後の各処理領域間において、各処理領域内の幅方向に沿う各ラインを、文字列の高さ方向における相対位置が対応するもの毎に組み合わせ、各組み合わせ毎に、組み合わせられた各ラインにおけるドットを表す画素の数を累計する第3のステップと、
隣り合うノズルによる印刷ライン間の距離に対応する幅の処理対象範囲を、その幅方向を文字列の高さ方向に合わせて、当該方向に沿って順に動かしながら、第3のステップで各ラインの組み合わせ毎に求めた累計値のうち処理対象範囲に対応する複数の累計値を加算する処理を繰り返し実行し、毎回の加算処理により得た加算値の中の最小値を所定のしきい値と比較し、加算値の最小値がしきい値より小さいという比較結果を得たとき、前記文字列の方向に沿ってドットの抜けが生じていると判別する第4のステップとを、
実行することを特徴とする文字検査方法。
Image a horizontally written character string printed using a print head that prints vertically arranged dots by a plurality of nozzles, and use the obtained image to determine whether a print defect has occurred along the character string. A method of inspecting,
An image of the character string to be inspected is projected along a direction orthogonal to the character string, and for each character constituting the character string in the image based on the projection result, a dot representing the character is the width direction of the character And extracting an image of the character string to be inspected along the direction of the character string, and distributing the dots representing the entire character string in the height direction of the character string based on the projection result A processing area that is determined by the distribution range of dots in the width direction extracted for each character and the distribution range of dots in the height direction of the character string extracted for the entire character string. A first step of setting
The image in the processing area for each character set in the first step is projected along the direction of the character string, and the distribution range of dots in the height direction of the character string is calculated for each character based on the projection result. In addition to specifying the maximum length among the lengths of these distribution ranges, the range in the height direction of the character string in the processing area of each character includes the distribution range of dots specified for each character. And a second step of correcting the position and length of each processing region in the height direction of the character string so that the length of each processing region in the height direction of the character string is unified to the maximum length. When,
Between each processing area after executing the second step, each line along the width direction in each processing area is combined for each corresponding relative position in the height direction of the character string , and for each combination A third step of accumulating the number of pixels representing dots in each combined line;
The processing range of the width corresponding to the distance between the print lines by the adjacent nozzles is adjusted in the third step while moving the width direction to the height direction of the character string and sequentially moving along the direction. The process of adding multiple cumulative values corresponding to the processing target range among the cumulative values obtained for each combination is repeatedly executed, and the minimum value among the added values obtained by the addition processing is compared with a predetermined threshold value. A fourth step of determining that a missing dot has occurred along the direction of the character string when the comparison result that the minimum value of the addition value is smaller than the threshold value is obtained;
A character inspection method characterized by being executed.
請求項3または4に記載された文字検査方法において、
前記文字列の高さ方向における各処理領域の長さにつき前記第2のステップで特定された最大の長さを所定のしきい値と比較し、前記最大の長さがしきい値より小さいという比較結果を得たときに、前記文字列の端縁でドットの抜けが生じていると判別する第5のステップを実行することを特徴とする文字検査方法。
The character inspection method according to claim 3 or 4,
The maximum length specified in the second step per the length of each processing region in the height direction of the character string is compared with a predetermined threshold value, that the maximum length is less than the threshold value A character inspection method, comprising: performing a fifth step of determining that a missing dot has occurred at an edge of the character string when a comparison result is obtained.
縦方向または横方向に沿って並んだ複数のノズルを有する印刷ヘッドを印刷対象物に対して前記ノズルの並び方向に直交する方向に沿って相対的に移動させながら各ノズルのドットの印刷動作を制御することにより前記印刷対象物に形成された印刷体を撮像して得られた画像を用いて、前記印刷対象物に対する各ノズルの移動の方向に沿うノズル毎の印刷ラインに印刷不良が発生していないかどうかを検査する装置であって、
前記印刷体の画像を検査対象画像として入力する画像入力手段と、
各ノズルの印刷ラインがそれぞれノズルの並び方向に直交していると仮定して、前記画像入力手段により入力された検査対象画像の仮定の印刷ラインの方向においては、前記ドットの分布範囲の全体または一部を含む範囲を処理範囲に設定する一方、前記検査対象画像仮定の印刷ラインに直交する方向においては前記複数のノズルに対応する仮定の印刷ラインを全て含む範囲を処理範囲に設定する処理範囲設定手段と、
各方向の処理範囲により特定される領域を処理対象領域として設定した後、この処理対象領域内の画像を仮定の印刷ラインの方向に沿って投影して、その投影結果に基づき仮定の印刷ラインに直交する方向におけるドットの分布範囲を特定し、前記処理対象領域内に、仮定の印刷ラインの方向に沿って並び、かつ仮定の印刷ラインに直交する方向における範囲が前記特定された範囲に対応する複数の領域を設定する領域設定手段と、
前記領域設定手段により設定された各領域の画像をそれぞれ仮定の印刷ラインに沿って投影して、その投影結果に基づき仮定の印刷ラインに直交する方向におけるドットの分布範囲を領域毎に特定すると共に、これら分布範囲の長さの中の最大の長さを特定し、各領域の仮定の印刷ラインに直交する方向における範囲にそれぞれ当該領域につき特定されたドットの分布範囲が含まれ、かつ仮定の印刷ラインに直交する方向における各領域の長さが前記最大の長さに統一されるように、仮定の印刷ラインに直交する方向における各領域の位置および長さを補正する領域調整手段と、
前記領域調整手段による補正後の各領域間において、各領域内の仮定の印刷ラインの方向に沿う各ラインを、仮定の印刷ラインに直交する方向における相対位置が対応するもの毎に組み合わせ、各組み合わせ毎に、組み合わせられた各ラインにおけるドットを表す画素の数を累計する累計処理手段と、
前記累計処理手段が各ラインの組み合わせ毎に求めた累計値の中から極大値を抽出する極大値抽出手段と、
前記極大値抽出手段が抽出した極大値を所定のしきい値と比較し、前記極大値がしきい値より大きいという比較結果を得たとき、実際の印刷ラインの方向に沿ってドットの埋まりが生じていると判別する判別手段と、
前記判別手段による判別結果を出力する出力手段とを具備して成る印刷状態検査装置。
A printing head having a plurality of nozzles arranged in the vertical direction or the horizontal direction is moved relative to a print object in a direction orthogonal to the nozzle arrangement direction, and the dot printing operation of each nozzle is performed. Using an image obtained by imaging a printed body formed on the print object by controlling, a print defect occurs in a print line for each nozzle along the direction of movement of each nozzle relative to the print object. A device for checking whether or not
Image input means for inputting an image of the printed body as an inspection target image ;
Assuming that the print line of each nozzle is orthogonal to the direction in which the nozzles are arranged, in the assumed print line direction of the inspection target image input by the image input means, the entire distribution range of the dots or A process of setting a range including all of the assumed print lines corresponding to the plurality of nozzles in the direction orthogonal to the assumed print line of the inspection target image while setting a range including a part as the process range. Range setting means;
After the area specified by the processing range in each direction is set as the processing target area , the image in the processing target area is projected along the direction of the assumed print line, and based on the projection result, the assumed print line is formed. A distribution range of dots in an orthogonal direction is specified, and the range in the direction orthogonal to the assumed print line corresponds to the specified range in the processing target area along the direction of the assumed print line. Area setting means for setting a plurality of areas;
By projecting the image of each area set by said area setting means along each assumption printing line, the distribution range of dots in a direction perpendicular to the hypothetical print line based on the projection result with identifying for each region these distributions to identify the length maximum length in the range, includes the distribution range of dots each identified per the area in a range in a direction perpendicular to the assumption of a printing line in each region, and assumptions as the length of each region is unified to the length of the maximum in the direction perpendicular to the print line, a region adjusting means for correcting the position and length of each region in the direction perpendicular to the assumption of a printing line,
In each area after correction by the area adjusting means, each line along the direction of the assumed print line in each area is combined for each corresponding relative position in the direction orthogonal to the assumed print line. A cumulative processing means for accumulating the number of pixels representing the dots in each combined line for each;
A maximum value extracting means for extracting a maximum value from the total value obtained for each combination of lines by the total processing means;
When the local maximum value extracted by the local maximum value extracting means is compared with a predetermined threshold value, and the comparison result that the local maximum value is larger than the threshold value is obtained, dot filling is performed along the direction of the actual print line. A discriminating means for discriminating that it has occurred;
A printing state inspection apparatus comprising: output means for outputting a discrimination result by the discrimination means.
縦方向または横方向に沿って並んだ複数のノズルを有する印刷ヘッドを印刷対象物に対して前記ノズルの並び方向に直交する方向に沿って相対的に移動させながら各ノズルのドットの印刷動作を制御することにより前記印刷対象物に形成された印刷体を撮像して得られた画像を用いて、前記印刷対象物に対する各ノズルの移動の方向に沿うノズル毎の印刷ラインに印刷不良が発生していないかどうかを検査する装置であって、
前記印刷体の画像を検査対象画像として入力する画像入力手段と、
各ノズルの印刷ラインがそれぞれノズルの並び方向に直交していると仮定して、前記画像入力手段により入力された検査対象画像の仮定の印刷ラインの方向においては、前記ドットの分布範囲の全体または一部を含む範囲を処理範囲に設定する一方、前記検査対象画像仮定の印刷ラインに直交する方向においては前記複数のノズルに対応する仮定の印刷ラインを全て含む範囲を処理範囲に設定する処理範囲設定手段と、
各方向の処理範囲により特定される領域を処理対象領域として設定した後、この処理対象領域内の画像を仮定の印刷ラインの方向に沿って投影して、その投影結果に基づき仮定の印刷ラインに直交する方向におけるドットの分布範囲を特定し、前記処理対象領域内に、仮定の印刷ラインの方向に沿って並び、かつ仮定の印刷ラインに直交する方向における範囲が前記特定された範囲に対応する複数の領域を設定する領域設定手段と、
前記領域設定手段により設定された各領域の画像をそれぞれ仮定の印刷ラインに沿って投影して、その投影結果に基づき仮定の印刷ラインに直交する方向におけるドットの分布範囲を領域毎に特定すると共に、これらの分布範囲の長さの中の最大の長さを特定し、各領域の仮定の印刷ラインに直交する方向における範囲にそれぞれ当該領域につき特定されたドットの分布範囲が含まれ、かつ印刷ラインに直交する方向における各領域の長さが前記最大の長さに統一されるように、仮定の印刷ラインに直交する方向における各領域の位置および長さを補正する領域調整手段と、
前記領域調整手段による補正後の各領域間において、各領域内の仮定の印刷ラインの方向に沿う各ラインを、仮定の印刷ラインに直交する方向における相対位置が対応するもの毎に組み合わせ、各組み合わせ毎に、組み合わせられた各ラインにおけるドットを表す画素の数を累計する累計処理手段と、
隣り合うノズルによる印刷ライン間の距離に対応する幅の処理対象範囲を、その幅方向を仮定の印刷ラインに直交する方向に合わせて、当該方向に沿って順に動かしながら、累計処理手段が各ラインの組み合わせ毎に求めた累計値のうち処理対象範囲に対応する複数の累計値を加算する処理を繰り返し実行し、毎回の加算処理により得た加算値の中の最小値を特定する最小値特定手段と、
前記最小値特定手段が特定した最小値を所定のしきい値と比較し、前記最小値がしきい値より小さいという比較結果を得たとき、実際の印刷ラインの方向に沿ってドットの抜けが生じていると判別する判別手段と、
前記判別手段による判別結果を出力する出力手段とを具備して成る印刷状態検査装置。
A printing head having a plurality of nozzles arranged in the vertical direction or the horizontal direction is moved relative to a print object in a direction orthogonal to the nozzle arrangement direction, and the dot printing operation of each nozzle is performed. Using an image obtained by imaging a printed body formed on the print object by controlling, a print defect occurs in a print line for each nozzle along the direction of movement of each nozzle relative to the print object. A device for checking whether or not
Image input means for inputting an image of the printed body as an inspection target image ;
Assuming that the print line of each nozzle is orthogonal to the direction in which the nozzles are arranged, in the assumed print line direction of the inspection target image input by the image input means, the entire distribution range of the dots or A process of setting a range including all of the assumed print lines corresponding to the plurality of nozzles in the direction orthogonal to the assumed print line of the inspection target image while setting a range including a part as the process range. Range setting means;
After the area specified by the processing range in each direction is set as the processing target area , the image in the processing target area is projected along the direction of the assumed print line, and based on the projection result, the assumed print line is formed. A distribution range of dots in an orthogonal direction is specified, and the range in the direction orthogonal to the assumed print line corresponds to the specified range in the processing target area along the direction of the assumed print line. Area setting means for setting a plurality of areas;
By projecting the image of each area set by said area setting means along each assumption printing line, the distribution range of dots in a direction perpendicular to the hypothetical print line based on the projection result with identifying for each region The maximum length among the lengths of these distribution ranges is specified, and the range in the direction orthogonal to the assumed print line of each region includes the distribution range of dots specified for each region, and printing A region adjusting means for correcting the position and length of each region in the direction orthogonal to the assumed print line so that the length of each region in the direction orthogonal to the line is unified to the maximum length;
In each area after correction by the area adjusting means, each line along the direction of the assumed print line in each area is combined for each corresponding relative position in the direction orthogonal to the assumed print line. A cumulative processing means for accumulating the number of pixels representing the dots in each combined line for each;
The total processing means moves each line along the processing target range having a width corresponding to the distance between the printing lines by the adjacent nozzles, with the width direction aligned with the direction orthogonal to the assumed printing line, and sequentially moving along the direction. Minimum value specifying means for repeatedly executing a process of adding a plurality of cumulative values corresponding to the processing target range among the cumulative values obtained for each combination of the values, and specifying a minimum value among the added values obtained by each addition process When,
When the minimum value specified by the minimum value specifying means is compared with a predetermined threshold value and a comparison result that the minimum value is smaller than the threshold value is obtained, missing dots are detected along the actual print line direction. A discriminating means for discriminating that it has occurred;
A printing state inspection apparatus comprising: output means for outputting a discrimination result by the discrimination means.
請求項6または7に記載された印刷状態検査装置において、
仮定の印刷ラインの方向における処理範囲の設定情報を入力するための入力手段を備え、
前記処理範囲設定手段は、前記入力手段から入力された設定情報を用いて、仮定の印刷ラインの方向における処理範囲を設定する印刷状態検査装置。
In the printing state inspection device according to claim 6 or 7,
An input means for inputting processing range setting information in the direction of the assumed print line;
The processing range setting unit is a printing state inspection apparatus that sets a processing range in the direction of a hypothetical print line using setting information input from the input unit.
複数のノズルにより縦並びのドットを印刷する印刷ヘッドを用いて印刷された横書きの文字列を撮像して得られた画像を用いて、前記文字列に沿って印刷不良が発生していないかどうかを検査する装置であって、
前記文字列の画像を検査対象画像として入力する画像入力手段と、
前記画像入力手段により入力された検査対象画像を文字列に直交する方向に沿って投影して、その投影結果に基づき検査対象画像中の文字列を構成する文字毎に、当該文字を表すドットが当該文字の幅方向において分布する範囲を抽出すると共に、前記検査対象画像を文字列の方向に沿って投影して、その投影結果に基づき当該文字列全体を表すドットが文字列の高さ方向において分布する範囲を抽出し、各文字に対し、それぞれその文字につき抽出された幅方向におけるドットの分布範囲と、文字列全体につき抽出された文字列の高さ方向におけるドットの分布範囲とにより定まる処理領域を設定する領域設定手段と、
前記領域設定手段により設定された文字毎の処理領域内の画像をそれぞれ文字列の方向に沿って投影して、その投影結果に基づき文字列の高さ方向におけるドットの分布範囲を文字毎に特定すると共に、これら分布範囲の長さの中の最大の長さを特定し、各文字の処理領域の文字列の高さ方向における範囲にそれぞれ当該文字につき特定されたドットの分布範囲が含まれ、かつ文字列の高さ方向における各処理領域の長さが前記最大の長さに統一されるように、文字列の高さ方向における各処理領域の位置および長さを補正する領域調整手段と、
前記領域調整手段による補正後の処理領域間において、各処理領域内の幅方向に沿う各ラインを、前記文字列の高さ方向における相対位置が対応するもの毎に組み合わせ、各組み合わせ毎に、組み合わせられた各ラインにおけるドットを表す画素の数を累計する累計処理手段と、
前記累計処理手段が各ラインの組み合わせ毎に求めた累計値の中から極大値を抽出する極大値抽出手段と、
前記極大値抽出手段が抽出した極大値を所定のしきい値と比較し、前記極大値がしきい値より大きいという比較結果を得たとき、前記文字列の方向に沿ってドットの埋まりが生じていると判別する判別手段と、
前記判別手段による判別結果を出力する出力手段とを具備して成る文字検査装置。
Whether or not a print defect has occurred along the character string using an image obtained by imaging a horizontally written character string printed using a print head that prints vertically arranged dots by a plurality of nozzles A device for inspecting
Image input means for inputting an image of the character string as an image to be inspected;
The inspection target image input by the image input means is projected along a direction orthogonal to the character string, and for each character constituting the character string in the inspection target image based on the projection result, a dot representing the character is displayed. A range distributed in the width direction of the character is extracted, the inspection target image is projected along the direction of the character string, and a dot representing the entire character string is projected in the height direction of the character string based on the projection result Processing to extract the distribution range, and for each character, the dot distribution range in the width direction extracted for each character and the dot distribution range in the height direction of the character string extracted for the entire character string Area setting means for setting an area ;
The image in the processing area for each character set by the area setting means is projected along the direction of the character string, and the distribution range of dots in the height direction of the character string is specified for each character based on the projection result. In addition, the maximum length among the lengths of these distribution ranges is specified, and the distribution range of the dots specified for each character is included in the range in the height direction of the character string in the processing region of each character , And the area adjustment means which corrects the position and length of each processing area in the height direction of the character string so that the length of each processing area in the height direction of the character string is unified to the maximum length ,
Between the processing areas after correction by the area adjusting means, the lines along the width direction in each processing area are combined for each corresponding relative position in the height direction of the character string, and combined for each combination. A cumulative processing means for accumulating the number of pixels representing dots in each line obtained ;
A maximum value extracting means for extracting a maximum value from the total value obtained for each combination of lines by the total processing means;
When the maximum value extracted by the maximum value extracting means is compared with a predetermined threshold value and a comparison result that the maximum value is larger than the threshold value is obtained, dot filling occurs along the direction of the character string. A discriminating means for discriminating that
A character inspection apparatus comprising output means for outputting a discrimination result by the discrimination means.
複数のノズルにより縦並びのドットを印刷する印刷ヘッドを用いて印刷された横書きの文字列を撮像して得られた画像を用いて、前記文字列に沿って印刷不良が発生していないかどうかを検査する装置であって、
前記文字列の画像を検査対象画像として入力する画像入力手段と、
前記画像入力手段により入力された検査対象画像を文字列に直交する方向に沿って投影して、その投影結果に基づき検査対象画像中の文字列を構成する文字毎に、当該文字を表すドットが当該文字の幅方向において分布する範囲を抽出すると共に、前記検査対象画像を文字列の方向に沿って投影して、その投影結果に基づき当該文字列全体を表すドットが文字列の高さ方向において分布する範囲を抽出し、各文字に対し、それぞれその文字につき抽出された幅方向におけるドットの分布範囲と、文字列全体につき抽出された文字列の高さ方向におけるドットの分布範囲とにより定まる処理領域を設定する領域設定手段と、
前記領域設定手段により設定された文字毎の処理領域内の画像をそれぞれ文字列の方向に沿って投影して、その投影結果に基づき文字列の高さ方向におけるドットの分布範囲を文字毎に特定すると共に、これら分布範囲の長さの中の最大の長さを特定し、各文字の処理領域の文字列の高さ方向における範囲にそれぞれ当該文字につき特定されたドットの分布範囲が含まれ、かつ文字列の高さ方向における各処理領域の長さが前記最大の長さに統一されるように、文字列の高さ方向における各処理領域の位置および長さを補正する領域調整手段と、
前記領域調整手段による補正後の処理領域間において、各処理領域内の幅方向に沿う各ラインを、前記文字列の高さ方向における相対位置が対応するもの毎に組み合わせ、各組み合わせ毎に、組み合わせられた各ラインにおけるドットを表す画素の数を累計する累計処理手段と、
隣り合うノズルによる印刷ライン間の距離に対応する幅の処理対象範囲を、その幅方向を文字列の高さ方向に合わせて、当該方向に沿って順に動かしながら、累計処理手段が各ラインの組み合わせ毎に求めた累計値のうち処理対象範囲に対応する複数の累計値を加算する処理を繰り返し実行し、毎回の加算処理により得た加算値の中の最小値を特定する最小値特定手段と、
前記最小値特定手段が特定した最小値をそれぞれ所定のしきい値と比較し、前記最小値がしきい値より小さいという比較結果を得たとき、前記文字列の方向に沿ってドットの抜けが生じていると判別する判別手段と、
前記判別手段による判別結果を出力する出力手段とを具備して成る文字検査装置。
Whether or not a print defect has occurred along the character string using an image obtained by imaging a horizontally written character string printed using a print head that prints vertically arranged dots by a plurality of nozzles A device for inspecting
Image input means for inputting an image of the character string as an image to be inspected;
The inspection target image input by the image input means is projected along a direction orthogonal to the character string, and for each character constituting the character string in the inspection target image based on the projection result, a dot representing the character is displayed. A range distributed in the width direction of the character is extracted, the inspection target image is projected along the direction of the character string, and a dot representing the entire character string is projected in the height direction of the character string based on the projection result Processing to extract the distribution range, and for each character, the dot distribution range in the width direction extracted for each character and the dot distribution range in the height direction of the character string extracted for the entire character string Area setting means for setting an area ;
The image in the processing area for each character set by the area setting means is projected along the direction of the character string, and the distribution range of dots in the height direction of the character string is specified for each character based on the projection result. In addition, the maximum length among the lengths of these distribution ranges is specified, and the distribution range of the dots specified for each character is included in the range in the height direction of the character string in the processing region of each character , And the area adjustment means which corrects the position and length of each processing area in the height direction of the character string so that the length of each processing area in the height direction of the character string is unified to the maximum length ,
Between the processing areas after correction by the area adjusting means, the lines along the width direction in each processing area are combined for each corresponding relative position in the height direction of the character string, and combined for each combination. A cumulative processing means for accumulating the number of pixels representing dots in each line obtained ;
The process target range of a width corresponding to the distance between by the adjacent nozzles print lines, the combined width direction of the string in the height direction, while moving sequentially along the direction, the cumulative processing means of each line combination A minimum value specifying means for repeatedly executing a process of adding a plurality of cumulative values corresponding to the processing target range among the cumulative values obtained every time, and specifying a minimum value among the added values obtained by the addition process each time;
When the minimum value specified by the minimum value specifying means is compared with a predetermined threshold value and a comparison result is obtained that the minimum value is smaller than the threshold value, missing dots are missing along the direction of the character string. A discriminating means for discriminating that it has occurred;
A character inspection apparatus comprising output means for outputting a discrimination result by the discrimination means.
請求項9または10に記載された文字検査装置において、
前記判別手段は、前記文字列の高さ方向における各処理領域の長さにつき前記領域設定手段により特定された最大の長さを所定のしきい値と比較し、前記最大の長さがしきい値より小さいという比較結果を得たときに、前記文字列の端縁でドットの抜けが生じていると判別する文字検査装置。
In the character inspection device according to claim 9 or 10,
The discriminating means compares the maximum length specified by the area setting means with respect to the length of each processing area in the height direction of the character string with a predetermined threshold, and the maximum length is a threshold. A character inspection apparatus that determines that a missing dot has occurred at an edge of the character string when a comparison result indicating that the value is smaller than the value is obtained.
JP2004297699A 2003-10-20 2004-10-12 Printing state inspection method, character inspection method, and inspection apparatus using these methods Expired - Fee Related JP4631384B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004297699A JP4631384B2 (en) 2003-10-20 2004-10-12 Printing state inspection method, character inspection method, and inspection apparatus using these methods

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2003359072 2003-10-20
JP2004297699A JP4631384B2 (en) 2003-10-20 2004-10-12 Printing state inspection method, character inspection method, and inspection apparatus using these methods

Publications (2)

Publication Number Publication Date
JP2005145055A JP2005145055A (en) 2005-06-09
JP4631384B2 true JP4631384B2 (en) 2011-02-16

Family

ID=34702996

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004297699A Expired - Fee Related JP4631384B2 (en) 2003-10-20 2004-10-12 Printing state inspection method, character inspection method, and inspection apparatus using these methods

Country Status (1)

Country Link
JP (1) JP4631384B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4988276B2 (en) * 2006-09-05 2012-08-01 理想科学工業株式会社 Recording failure detection method and program
JP5728955B2 (en) * 2011-01-14 2015-06-03 沖電気工業株式会社 Serial dot printer
JP5586656B2 (en) * 2012-05-16 2014-09-10 インフォプリント・ソリューションズ・カンパニー・エルエルシイ Print processing system, image processing apparatus, print verification apparatus, and program
JP2017071077A (en) * 2015-10-05 2017-04-13 株式会社日立産機システム Ink jet recording system, ink jet recording device used in the same, printing inspection device, and method for adjusting printing character height
CN107704854A (en) * 2017-09-21 2018-02-16 苏州轩明视测控科技有限公司 A kind of detection method of the print character defect based on optical flow field

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS55119782A (en) * 1979-03-09 1980-09-13 Daihen Corp Pattern automatic inspection method
JP2937710B2 (en) * 1993-09-22 1999-08-23 日本電気株式会社 Print inspection device for inkjet printer
JPH0995028A (en) * 1995-10-02 1997-04-08 C G A Kk Printing inspection device
JP2001092965A (en) * 1999-09-20 2001-04-06 Hitachi Eng Co Ltd Character collating device and character collating method

Also Published As

Publication number Publication date
JP2005145055A (en) 2005-06-09

Similar Documents

Publication Publication Date Title
JP3516144B1 (en) Optical information code reading method and optical information code reader
EP1330111B1 (en) Automatic image quality evaluation and correction technique
US7239738B2 (en) Image defect inspecting apparatus and image defect inspecting method
CN105320951B (en) Optical character recognition device and optical character recognition method
JP4243454B2 (en) Brightness correction method, selective defect detection method, and recording medium on which these are recorded
TWI669519B (en) Board defect filtering method and device thereof and computer-readabel recording medium
US6333997B1 (en) Image recognizing apparatus
JP6751521B2 (en) Data acquisition device, printing device, authenticity judgment device and program
JP4631384B2 (en) Printing state inspection method, character inspection method, and inspection apparatus using these methods
JP2010133744A (en) Defect detection method, and visual inspection device using the same
JP4507523B2 (en) Printed matter inspection apparatus and printed matter inspection program
US20050186002A1 (en) Printing condition inspection method, a character string inspection method and an inspection apparatus using the methods
JP5558081B2 (en) Image formation state inspection method, image formation state inspection device, and image formation state inspection program
CN117341364B (en) Method, equipment and storage medium for detecting nozzle needle breakage in printing process
JP5329510B2 (en) Reading device, voting ticket refund device, voting ticket issuing device, and reading method
KR100636236B1 (en) Missing nozzle detection method and apparatus
US20240176970A1 (en) Information reader
JP7786050B2 (en) Inspection device, inspection method, glass plate manufacturing method, and inspection program
JP2008257394A (en) Image processing apparatus, image processing method, and image processing program
JP2019060836A (en) Float detector and float detection method of print, inspection device, and inspection method
CN109249711A (en) The method for detecting the failure print nozzles at printed edge
JP7300155B2 (en) Teaching device in solid preparation appearance inspection, and teaching method in solid preparation appearance inspection
JP6296585B1 (en) Print lift detection apparatus, lift detection method, inspection apparatus, and inspection method
JP2005227142A (en) Image inspection apparatus with skew detection function
US20250303768A1 (en) Printing system and printing device correction value acquisition method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20061121

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090226

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090609

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090807

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100216

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100416

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20101019

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20101101

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 4631384

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20131126

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees