JP7557962B2 - Image processing device and control method thereof - Google Patents
Image processing device and control method thereof Download PDFInfo
- Publication number
- JP7557962B2 JP7557962B2 JP2020088320A JP2020088320A JP7557962B2 JP 7557962 B2 JP7557962 B2 JP 7557962B2 JP 2020088320 A JP2020088320 A JP 2020088320A JP 2020088320 A JP2020088320 A JP 2020088320A JP 7557962 B2 JP7557962 B2 JP 7557962B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- target image
- medium
- reference image
- vertices
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000012545 processing Methods 0.000 title claims description 63
- 238000000034 method Methods 0.000 title claims description 57
- 238000007689 inspection Methods 0.000 claims description 146
- 238000001514 detection method Methods 0.000 claims description 21
- 239000011159 matrix material Substances 0.000 claims description 21
- 230000009466 transformation Effects 0.000 claims description 17
- 238000006073 displacement reaction Methods 0.000 claims description 9
- 238000005520 cutting process Methods 0.000 claims description 6
- 238000004519 manufacturing process Methods 0.000 claims description 4
- 230000008569 process Effects 0.000 description 32
- 238000010586 diagram Methods 0.000 description 18
- 230000007547 defect Effects 0.000 description 17
- 230000032258 transport Effects 0.000 description 13
- 238000003860 storage Methods 0.000 description 5
- 230000002950 deficient Effects 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 239000000463 material Substances 0.000 description 3
- 230000009467 reduction Effects 0.000 description 3
- 238000013519 translation Methods 0.000 description 3
- PXFBZOLANLWPMH-UHFFFAOYSA-N 16-Epiaffinine Natural products C1C(C2=CC=CC=C2N2)=C2C(=O)CC2C(=CC)CN(C)C1C2CO PXFBZOLANLWPMH-UHFFFAOYSA-N 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 238000011179 visual inspection Methods 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 238000003708 edge detection Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000003062 neural network model Methods 0.000 description 1
- 238000012549 training Methods 0.000 description 1
- 230000001131 transforming effect Effects 0.000 description 1
Images
Landscapes
- Image Processing (AREA)
- Facsimile Scanning Arrangements (AREA)
- Image Analysis (AREA)
- Accessory Devices And Overall Control Thereof (AREA)
- Image Input (AREA)
Description
本発明は、画像処理による印刷物の品質検査に関するものである。 The present invention relates to quality inspection of printed matter using image processing.
印刷装置にて出力される印刷物において、インクやトナー等の色材が意図しない箇所に付着することによる汚れが発生する場合がある。あるいは、色材が付着し、画像を形成すべき箇所に十分な色材が付着せず、当該箇所が本来よりも色が薄くなってしまう色抜けが発生する場合がある。こうした、汚れや色抜けといった、いわゆる、印刷欠陥は、印刷物の品質を低下させるものである。そのため、印刷物の品質を保証するため、印刷物の欠陥の有無を検査することが求められる。 In printed matter output by a printing device, stains may occur due to color materials such as ink or toner adhering to unintended locations. Alternatively, color materials may adhere to locations where an image should be formed, resulting in insufficient color material adhering to those locations, causing color loss and making those locations lighter than they should be. These types of printing defects, such as stains and color loss, reduce the quality of printed matter. For this reason, it is necessary to inspect printed matter for defects in order to guarantee the quality of printed matter.
欠陥の有無を検査員が目視にて検査する目視検査は、多くの時間とコストを必要とするため、近年、目視に頼らずに、自動で検査を行う検査システムが提案されている。このような検査システムでは、欠陥の無い印刷物をスキャンした画像データを事前に検査基準画像として登録し、検査対象となる印刷物をスキャンした画像データ(検査対象画像)と検査基準画像との差分に基づき、欠陥の有無を算出する。 Visual inspection, in which an inspector visually checks for defects, requires a lot of time and costs money, so in recent years, inspection systems have been proposed that perform inspections automatically without relying on visual inspection. In such inspection systems, image data obtained by scanning a printout without defects is registered in advance as a reference image for inspection, and the presence or absence of defects is calculated based on the difference between the image data obtained by scanning the printout to be inspected (image to be inspected) and the reference image for inspection.
ただし、媒体と媒体上に印刷された絵柄との位置関係は、印刷装置の媒体搬送ずれや印刷位置ずれに由来して印刷ごとにわずかに変動するのが一般的である。そのため、上述した差分に基づく欠陥の有無の検査を適切に実施するためには、検査基準画像と検査対象画像の絵柄を正確に位置合わせしておく必要がある。位置合わせには、検査基準画像と検査対象画像とに共通して観測される部分画像同士の輝度をテンプレートマッチングによって比較し、両者の一致度(相関)が最大となる変位量を求める手法が広く用いられる。 However, the positional relationship between the medium and the image printed on the medium generally fluctuates slightly for each print due to misalignment of the medium transport and printing position of the printing device. Therefore, to properly inspect for defects based on the above-mentioned differences, it is necessary to accurately align the images in the inspection reference image and the inspection target image. A commonly used method for alignment is to use template matching to compare the brightness of partial images commonly observed in the inspection reference image and the inspection target image, and to determine the amount of displacement that maximizes the degree of match (correlation) between the two.
テンプレートマッチングを行うためには、一つの部分画像に対して、もう一方の画像に含まれる可能性がある領域である探索範囲を適切に設定する必要がある。そのため、あらかじめ検査対象画像中において印刷物の位置あるいは方向を検出し、これに基づいて位置合わせを行う方法がある。特許文献1には、検査対象画像を構成する各ラインの両端のエッジを検出し、複数ラインでこのエッジを参照することで、印刷物の傾きを算出する方法が開示されている。
To perform template matching, it is necessary to appropriately set a search range for one partial image, which is an area that may be included in the other image. For this reason, there is a method of detecting the position or orientation of the print in the image to be inspected in advance and performing alignment based on this.
ところで、検査システムでは、印刷物をスキャンするセンサとして、コンタクトイメージセンサ(CIS)などのラインセンサが用いられることが多い。そして、印刷物の一辺よりもラインセンサの幅が短いような場合、スキャンにより得られる画像から印刷物の一部の領域がはみ出すことになる。 Inspection systems often use line sensors, such as contact image sensors (CIS), to scan printed matter. If the width of the line sensor is shorter than one side of the printed matter, some areas of the printed matter will extend beyond the image obtained by scanning.
特許文献1に開示された技術においては、画像を構成する各ラインが原稿幅よりも短い場合には、前提とする両端のエッジが観測されず、位置や傾きを算出することができない。そのため、検査基準画像と検査対象画像の絵柄を正確に位置合わせすることが出来ず、適切に欠陥の有無を検査することができない。
In the technology disclosed in
本発明は、このような問題に鑑みてなされたものであり、印刷物における欠陥をより好適に検出可能とする技術を提供することを目的としている。 The present invention was made in consideration of these problems, and aims to provide a technology that enables defects in printed matter to be detected more effectively.
上述の問題点を解決するため、本発明に係る画像処理装置は以下の構成を備える。すなわち、画像処理装置は、
印刷装置により所与の画像が表面に形成された第1の媒体を読み取ることにより得られる基準画像を取得する第1の取得手段と、
前記印刷装置により前記所与の画像が表面に形成された第2の媒体を読み取ることにより得られる対象画像を取得する第2の取得手段と、
前記基準画像における前記第1の媒体の頂点の座標と、前記対象画像における前記第2の媒体の頂点の座標と、を決定する決定手段と、
前記決定手段により決定された前記基準画像および前記対象画像それぞれにおける頂点に基づいて、前記基準画像と前記対象画像とを位置合わせする第1位置合わせ手段と、
前記第1位置合わせ手段により位置合わせされた前記基準画像および前記対象画像におけるテンプレートマッチングの結果に基づいて、前記基準画像と前記対象画像とを位置合わせする第2位置合わせ手段と、
前記第2位置合わせ手段により位置合わせされた前記基準画像と前記対象画像とを比較することにより、前記対象画像を検査する検査手段と、
を有し、
前記決定手段は、前記基準画像および前記対象画像の少なくとも一方の画像において媒体の領域全体が含まれていない場合、少なくとも1つの頂点の座標を推定により決定し、
前記第2位置合わせ手段は、前記テンプレートマッチングを行う前記対象画像における探索範囲を、前記決定手段により決定された前記対象画像における頂点の属性に基づいて決定する。
または、画像処理装置は、印刷装置により所与の画像が表面に形成された第1の媒体を読み取ることにより得られる基準画像を取得する第1の取得手段と、
前記印刷装置により前記所与の画像が表面に形成された第2の媒体を読み取ることにより得られる対象画像を取得する第2の取得手段と、
前記基準画像における前記第1の媒体の頂点の座標と、前記対象画像における前記第2の媒体の頂点の座標と、を決定する決定手段と、
前記決定手段により決定された前記基準画像および前記対象画像それぞれにおける頂点に基づいて、前記基準画像と前記対象画像とを位置合わせする第1位置合わせ手段と、
前記第1位置合わせ手段により位置合わせされた前記基準画像および前記対象画像におけるテンプレートマッチングの結果に基づいて、前記基準画像と前記対象画像とを位置合わせする第2位置合わせ手段と、
前記第2位置合わせ手段により位置合わせされた前記基準画像と前記対象画像とを比較することにより、前記対象画像を検査する検査手段と、
を有し、
前記決定手段は、前記基準画像および前記対象画像の少なくとも一方の画像において媒体の領域全体が含まれていない場合、少なくとも1つの頂点の座標を推定により決定し、
前記第2位置合わせ手段は、前記テンプレートマッチングを行う前記対象画像における探索範囲を、前記印刷装置における画像形成位置の変動量の最大値に基づいて決定する。
あるいは、画像処理装置は、印刷装置により所与の画像が表面に形成された第1の媒体を読み取ることにより得られる基準画像を取得する第1の取得手段と、
前記印刷装置により前記所与の画像が表面に形成された第2の媒体を読み取ることにより得られる対象画像を取得する第2の取得手段と、
前記基準画像における前記第1の媒体の頂点の座標と、前記対象画像における前記第2の媒体の頂点の座標と、を決定する決定手段と、
前記決定手段により決定された前記基準画像および前記対象画像それぞれにおける頂点に基づいて、前記基準画像と前記対象画像とを位置合わせする第1位置合わせ手段と、
前記第1位置合わせ手段により位置合わせされた前記基準画像および前記対象画像におけるテンプレートマッチングの結果に基づいて、前記基準画像と前記対象画像とを位置合わせする第2位置合わせ手段と、
前記第2位置合わせ手段により位置合わせされた前記基準画像と前記対象画像とを比較することにより、前記対象画像を検査する検査手段と、
を有し、
前記決定手段は、前記基準画像および前記対象画像の少なくとも一方の画像において媒体の領域全体が含まれていない場合、少なくとも1つの頂点の座標を推定により決定し、
前記第2位置合わせ手段は、前記テンプレートマッチングを行う前記対象画像における探索範囲を、前記第2の媒体の製造工程において断裁時に生じるサイズばらつきの最大値に基づいて決定する。
In order to solve the above-mentioned problems, the image processing device according to the present invention has the following arrangement.
a first acquisition means for acquiring a reference image obtained by reading a first medium having a given image formed on a surface thereof by a printing device;
a second acquisition means for acquiring a target image obtained by reading a second medium having the given image formed on a surface thereof by the printing device;
a determining means for determining coordinates of vertices of the first medium in the reference image and coordinates of vertices of the second medium in the target image;
a first alignment means for aligning the reference image and the target image based on the vertices in the reference image and the target image determined by the determination means;
a second alignment means for aligning the reference image and the target image based on a result of template matching between the reference image and the target image aligned by the first alignment means;
an inspection means for inspecting the target image by comparing the reference image aligned by the second alignment means with the target image;
having
The determining means determines the coordinates of at least one vertex by estimation when at least one of the reference image and the target image does not include the entire area of the medium ;
The second alignment means determines a search range in the target image for performing the template matching based on the attributes of the vertices in the target image determined by the determination means .
Alternatively, the image processing device includes a first acquisition unit that acquires a reference image obtained by reading a first medium having a given image formed on a surface thereof by a printing device;
a second acquisition means for acquiring a target image obtained by reading a second medium having the given image formed on a surface thereof by the printing device;
a determining means for determining coordinates of vertices of the first medium in the reference image and coordinates of vertices of the second medium in the target image;
a first alignment means for aligning the reference image and the target image based on the vertices in the reference image and the target image determined by the determination means;
a second alignment means for aligning the reference image and the target image based on a result of template matching between the reference image and the target image aligned by the first alignment means;
an inspection means for inspecting the target image by comparing the reference image aligned by the second alignment means with the target image;
having
The determining means determines the coordinates of at least one vertex by estimation when at least one of the reference image and the target image does not include the entire area of the medium;
The second alignment means determines a search range in the target image for performing the template matching based on a maximum value of a variation amount of an image forming position in the printing device.
Alternatively, the image processing device includes a first acquisition unit that acquires a reference image obtained by reading a first medium having a given image formed on a surface thereof by a printing device;
a second acquisition means for acquiring a target image obtained by reading a second medium having the given image formed on a surface thereof by the printing device;
a determining means for determining coordinates of vertices of the first medium in the reference image and coordinates of vertices of the second medium in the target image;
a first alignment means for aligning the reference image and the target image based on the vertices in the reference image and the target image determined by the determination means;
a second alignment means for aligning the reference image and the target image based on a result of template matching between the reference image and the target image aligned by the first alignment means;
an inspection means for inspecting the target image by comparing the reference image aligned by the second alignment means with the target image;
having
The determining means determines the coordinates of at least one vertex by estimation when at least one of the reference image and the target image does not include the entire area of the medium;
The second alignment means determines a search range in the target image for performing the template matching based on a maximum value of size variation that occurs when cutting the second medium in a manufacturing process.
本発明によれば、印刷物における欠陥をより好適に検出可能とする技術を提供することができる。 The present invention provides a technology that enables more efficient detection of defects in printed matter.
以下、添付図面を参照して実施形態を詳しく説明する。なお、以下の実施形態は特許請求の範囲に係る発明を限定するものではない。実施形態には複数の特徴が記載されているが、これらの複数の特徴の全てが発明に必須のものとは限らず、また、複数の特徴は任意に組み合わせられてもよい。さらに、添付図面においては、同一若しくは同様の構成に同一の参照番号を付し、重複した説明は省略する。 The following embodiments are described in detail with reference to the attached drawings. Note that the following embodiments do not limit the invention according to the claims. Although the embodiments describe multiple features, not all of these multiple features are necessarily essential to the invention, and multiple features may be combined in any manner. Furthermore, in the attached drawings, the same reference numbers are used for the same or similar configurations, and duplicate explanations are omitted.
(第1実施形態)
本発明に係る画像処理装置の第1実施形態として、印刷物をスキャンして得られる検査対象画像に対して欠陥の有無の検査を行う画像処理装置を例に挙げて以下に説明する。特に、検査対象画像中で印刷物のはみ出しが生じているか否かを検出して位置合わせを行い検査する例について説明する。
First Embodiment
As a first embodiment of an image processing device according to the present invention, an image processing device that inspects an inspection target image obtained by scanning a printed matter for the presence or absence of defects will be described below. In particular, an example will be described in which the image processing device detects whether the printout is protruding from the inspection target image and performs position adjustment for inspection.
<装置構成>
図1は、第1実施形態に係る画像処理装置100を含む印刷システムの全体構成を示す図である。印刷システムは、画像処理装置100、印刷用サーバ180、印刷装置190を備える。印刷用サーバ180は、印刷する原稿の印刷ジョブを生成し、印刷装置190へ印刷ジョブを投入する。
<Device Configuration>
1 is a diagram showing the overall configuration of a printing system including an
印刷装置190は、印刷用サーバ180から投入された印刷ジョブに基づき、印刷媒体上に画像を形成する。印刷装置190は給紙部191を有しており、ユーザはあらかじめ印刷用紙を給紙部に供給しておく。印刷装置190は印刷ジョブが投入されると、給紙部191に供給された印刷媒体を搬送路192に沿って搬送しながら、その表面(片面または両面)に画像を形成し、画像処理装置100へと送出する。
The
画像処理装置100は、印刷装置190から搬送路192を通じて搬送される印刷媒体に対し、欠陥の有無を調べる検査処理を行う。画像処理装置100は、内部にCPU101、RAM102、ROM103、画像読取装置105を備える。また、印刷装置インターフェース(I/F)106、汎用インターフェース(I/F)107、ユーザインターフェース(UI)パネル108、メインバス109を備える。
The
さらに、印刷装置190の搬送路192と接続された印刷媒体の搬送路110と、検査合格と判定された印刷媒体を出力する出力トレー111と、検査不合格と判定された印刷媒体を出力する出力トレー112を備える。なお、出力トレー111あるいは出力トレー112への印刷媒体の搬送先の振り分けは、CPU101が検査結果に応じて行う。
Furthermore, the
CPU101は、画像処理装置100内の各部を統括的に制御するプロセッサである。後述する各処理はCPU101によって実行され、画像処理装置100内の各モジュールを適時制御することによって実現される。RAM102は、CPU101によって実行されるアプリケーションや、画像処理に用いられるデータ等を一時的に保持する。ROM103は、CPU101によって実行されるプログラム群を格納する。
The CPU 101 is a processor that provides overall control of each unit within the
画像読取装置105は、印刷装置から送られてきた印刷媒体の片面または両面を、搬送路110上で読み取り、画像データとして取得する。なお、搬送路110は、画像読取装置105が印刷媒体の画像を読み取る際の背景となるため、画像上で印刷媒体との区別が容易な色(例えば黒)で構成される。印刷装置I/F106は、印刷装置190と接続されており、印刷装置190と画像処理装置100を適切に同期させ、互いの稼働状況を通知する。UIパネル108は、例えば液晶ディスプレイ等の表示装置によって実現され、画像処理装置100のユーザインターフェースとして機能し、現在の状況や設定をユーザに伝える。また、タッチパネルやボタン等の入力装置を備えることによって、ユーザからの指示を受け付ける。メインバス109は、画像処理装置100の各モジュールを接続する伝送路である。
The
画像処理装置100は、印刷装置190から出力された印刷媒体を搬送路110が搬送する過程で、画像読取装置105が取得する画像データに基づき、欠陥の有無を調べる検査処理を行う。検査処理の結果、検査合格と判定されれば、印刷媒体は出力トレー111へと搬送される。検査処理の結果、検査不合格と判定されれば、印刷媒体は出力トレー112へと搬送される。これにより、出力トレー111上には、欠陥が存在しない印刷媒体のみが存在することとなる。
As the print medium output from the
図2は、画像処理装置100の構成を示すブロック図である。長方形の枠は各処理を行う機能モジュールを、矢印は処理の流れを示している。ただし、図2の構成は一例であり図示されるものに限定されない。
Figure 2 is a block diagram showing the configuration of the
画像取得部201は、画像読取装置105によって搬送路110上の印刷媒体を画像データとして取得する。ここでは、画像取得部201は少なくとも二回、異なる時点で印刷媒体を読み取り、画像データを取得する。また以下の説明では、画像取得部201が第一の時点で取得した画像を検査基準画像301、第二の時点以降に取得した画像を検査対象画像302と呼ぶ。ただし、検査の基準となる画像(欠陥のない画像)を検査基準画像301とすればよく、検査基準画像301および検査対象画像302の取得方法は上記の順番に限定されない。
The
はみ出し検出部202は、画像取得部201が取得した検査対象画像302中に印刷媒体全体が含まれているか否かを検出する。はみ出し検出部202は、画像データ中に印刷媒体の一部でも含まれない場合には、はみ出しが検出されたと判定する。媒体端部推定部203は、はみ出し検出部202の検出結果に基づき、印刷媒体の端部位置を検出する。
The
位置合わせ部204は、検査基準画像301と検査対象画像302から、それぞれ観測される絵柄領域305の輝度に基づき、端部推定部203による推定結果を参照して、絵柄領域305の画像間の変位量を算出する。変位量には、平行移動、回転、拡大縮小によるものが含まれる。
The
検査部205は、位置合わせ処理部204によって位置合わせされた状態で、検査基準画像301と検査対象画像302との差分を算出し、検査を行う。検査部205は、検査基準画像301と検査対象画像302との差分が大きい部位について欠陥と判定する。
The
<装置の動作>
図3は、画像処理装置100の処理を説明するフローチャートである。図3(a)は装置全体の処理の流れを示すフローチャートである。図3(b)は媒体端部推定処理(S1040)の詳細を示すフローチャートである。図3(c)は位置合わせ処理(S1050)の詳細を示すフローチャートである。
<Device Operation>
3A and 3B are flow charts for explaining the processing of the
S1010では、画像処理部201は、画像読取装置105を制御して搬送路110上の印刷媒体を読み取り画像データとして取得する。S1010において読み取られた画像データは検査基準画像301としてRAM103に保持され、以後の処理で用いられる。
In S1010, the
図4は、検査基準画像301の例を示す図である。検査基準画像301は背景領域303(黒で示した領域)と印刷媒体領域304(黒以外の領域)から構成される。印刷媒体領域304には、所与の画像が画像形成された領域である絵柄領域305が含まれる。頂点308a~308dは印刷媒体の頂点である。背景領域303は、スキャン時に印刷媒体304の背景となっている搬送路110が映り込んだ領域である。
Figure 4 is a diagram showing an example of an
S1020では、画像処理部201は、画像読取装置105を制御して搬送路110上の印刷媒体を読み取り画像データとして取得する。S1020において読み取られた画像データは検査対象画像302としてRAM103に保持され、以後の処理で用いられる。検査対象画像302は、検査基準画像301と同様に、背景領域303と印刷媒体領域304から構成される。
In S1020, the
S1030では、はみ出し検出部202は、検査基準画像301および検査対象画像302それぞれに対して、画像中に印刷媒体の領域全体が含まれているか否かの検出を行う。すなわち、画像において印刷媒体のはみ出しがあるか否かを判定する。このはみ出し検出処理については、以下のように行う。はみ出し検出部202は、まず画像を二値化した後に、白と黒の境界となる画素を追跡する。はみ出し検出部202は、この画素追跡の過程で、画像の上下左右の端のいずれかに接触した場合には、画像において印刷媒体のはみ出しがあったと判定する。はみ出し検出部202は、画素追跡の結果、画像の上下左右の端のいずれにも接触せず、追跡を終えた場合には、はみ出しがなかったと判定する。
In S1030, the
S1040では、媒体端部推定部203は、S1030におけるはみ出し検出結果に応じて、印刷媒体端部の位置を推定する。図3(b)のフローチャートを参照して、媒体端部推定処理の詳細について説明する。 In S1040, the medium edge estimation unit 203 estimates the position of the print medium edge based on the overflow detection result in S1030. The details of the medium edge estimation process are described with reference to the flowchart in FIG. 3(b).
S1510では、媒体端部推定部203は、S1030におけるはみ出し検出結果を参照し、はみ出しが検出された場合にはS1530に進む。はみ出しが検出されなかった場合には、S1520に進む。 In S1510, the medium edge estimation unit 203 refers to the overflow detection result in S1030, and if overflow is detected, proceeds to S1530. If overflow is not detected, proceeds to S1520.
S1520では、媒体端部推定部203は、検査対象画像302から印刷媒体領域304を構成する4つの頂点308a~308dを検出する。この検出処理は、次のように行われる。媒体端部推定部203は、まず検査対象画像302を二値化した後に、白と黒の境界となる画素を追跡し、各辺を直線近似する。これにより、印刷媒体領域304の輪郭をなす四本の直線が推定される。次に媒体端部判定部202は、四本の直線の交点を算出する。この時算出される4つの交点を頂点308a~308dとする。
In S1520, the medium edge estimation unit 203 detects the four
S1530では、媒体端部推定部203は、頂点308のうち、明に観測可能な頂点数を算出する。図5は、検査対象画像における印刷媒体のはみ出しの例を例示的に示す図である。図5(a)は、はみ出しにより、明に観測可能な頂点308が1つもない例である。図5(b)は、明に観測可能な頂点308が1点である例、図5(c)は2点、図5(d)は3点の場合の例を示している。 In S1530, the medium edge estimation unit 203 calculates the number of clearly observable vertices out of the vertices 308. Figure 5 is a diagram showing an example of print medium overhang in the inspection target image. Figure 5(a) shows an example where there are no clearly observable vertices 308 due to overhang. Figure 5(b) shows an example where there is one clearly observable vertex 308, Figure 5(c) shows two, and Figure 5(d) shows an example where there are three.
図6は、観測可能な頂点数の算出方法(S1530)を例示的に説明する図である。媒体端部検出部203は、まず検査対象画像302の左右両端からそれぞれ数画素以内の矩形領域313を背景色で塗りつぶし、画像314を生成する(図6(b))。
Figure 6 is a diagram illustrating an example of a method for calculating the number of observable vertices (S1530). The medium edge detection unit 203 first fills in
次に媒体端部検出部203は、画像303を二値化し、白と黒の境界となる画素を追跡する。媒体端部検出部203は、この軌跡から仮頂点310を検出する。画像314は両端を背景色で塗りつぶした画像であるため、追跡処理は必ず成功し、少なくとも4つの仮頂点が検出されることになる。そして、5点以上の頂点が検出された場合には、なす角が略直角であるものを4つ選択して有効な仮頂点とする。
Next, the medium end detection unit 203 binarizes the
図6(b)の例では5つの仮頂点310a~310eが検出されているが、仮頂点310cについては、なす角が略直角ではないため、媒体端部検出203はこれを除外して、残る4つを有効な仮頂点とする。
In the example of FIG. 6(b), five
次に媒体端部検出部203は、有効な仮頂点の座標を参照し、矩形領域313に接触していないものを明に観測可能な頂点としてカウントする。図6(b)の例においては、仮頂点310cを除く4つの仮頂点のうち、仮頂点310bのみが矩形領域313に接触していない。そのため、観測可能な頂点数は「1」であると算出する。
The medium end detection unit 203 then refers to the coordinates of the valid tentative vertices, and counts those that are not in contact with the
S1540では、媒体端部算出部203は、S1530において明に観測可能とされた仮頂点310について、S1520で説明した方法と同様の方法を用いて、対応する頂点308の座標を算出する。 In S1540, the medium end calculation unit 203 calculates the coordinates of the corresponding vertex 308 for the tentative vertex 310 that was clearly observable in S1530, using a method similar to that described in S1520.
S1550では、媒体端部算出部203は、S1540で算出された頂点308の座標に基づき、算出されない残りの頂点308の座標を推定する。以下では、図7を参照してS1550における頂点308の推定処理の詳細について説明する。 In S1550, the medium end calculation unit 203 estimates the coordinates of the remaining vertices 308 that have not been calculated, based on the coordinates of the vertices 308 calculated in S1540. Details of the estimation process of the vertices 308 in S1550 are described below with reference to FIG. 7.
図7は、印刷媒体頂点の推定処理(S1550)を例示的に説明する図である。まず、媒体端部推定部203は、検査対象画像302から、印刷媒体領域304の上辺および下辺を構成する直線311a、311bを推定する。
Figure 7 is a diagram illustrating an example of the print medium vertex estimation process (S1550). First, the medium edge estimation unit 203 estimates
媒体端部推定部203は、S1540において検出された頂点308の座標が、直線311a、311bのいずれの上に存在するかをチェックする。そして、直線311a、311bいずれかの当該直線上で、既に検出された頂点308から用紙幅Wだけ離れた座標を、次の頂点308として推定する。なお、用紙幅Wは、印刷装置190からの通知あるいはUIパネル108を介したユーザ入力などにより既知であるとする。媒体端部推定部203は、S1540において検出された頂点308のすべてについて、この処理を行う。
The medium edge estimation unit 203 checks whether the coordinates of the vertex 308 detected in S1540 are on either
媒体端部推定部203は、この段階で推定された頂点308の個数と、S1540で検出された頂点308の個数との和が「4」に満たない場合には、次の処理を行う。媒体端部推定部203は、S1550におけるこれまでの処理で推定された頂点308を通り、直線311a、311bに直交する直線312a、312bを推定する。媒体端部推定部203は、直線311a、311bと直線312a、312bの交点のうち、これまでに検出あるいは推定されていないものを、次の頂点308として推定する。
If the sum of the number of vertices 308 estimated at this stage and the number of vertices 308 detected in S1540 is less than "4", the medium end estimation unit 203 performs the following process. The medium end estimation unit 203 estimates
図7の例では、頂点308bの頂点が直線311a上に存在している。媒体端部推定部203は、この情報をもとに直線311a上で印刷媒体の頂点308bから用紙幅Wだけ離れた座標を印刷媒体の頂点308aとして推定する。この段階で、推定された頂点308と、S1540で検出された頂点308との和が「4」に満たないため、媒体端部推定部203は、直線312a、312bを推定する。媒体端部推定部203は、直線312aおよび312bと直線311bとの交点をそれぞれ、印刷媒体の頂点308d、308cとする。
In the example of Figure 7, the vertex of
S1530では、観測可能な頂点数が「0」であった場合には、媒体端部推定部203は以下の処理を行う。この処理の詳細について、以下、図8を参照して説明する。 In S1530, if the number of observable vertices is "0", the medium edge estimation unit 203 performs the following process. Details of this process are described below with reference to FIG. 8.
図8は、観測可能な頂点数が「0」であった場合の処理を例示的に説明する図である。媒体端部推定部203は、検査対象画像302から、印刷媒体領域304の上辺および下辺を構成する直線311a、311bを推定する。
Figure 8 is a diagram illustrating an example of processing when the number of observable vertices is "0". The medium edge estimation unit 203 estimates
次に媒体端部推定部203は、画像読取部105の長さLと用紙幅Wとから、直線311a上に最初の頂点308aを推定する。なお、画像読取部105の長さLは既知であり、例えばROM103に記憶されている。より具体的には、検査対象画像302の左端部から、直線311a上で距離(W-L)/2だけ離れた座標を頂点308aとして推定する。頂点308bについても同様に、検査対象画像302の右端部から、直線311a上で距離(W-L)/2だけ離れた座標を設定する。媒体端部推定部203は、頂点308a、308bを通り、直線311aに直交する直線312a、312bを推定し、直線311bと直線312a、312bの交点をそれぞれ頂点308d、308cとして設定する。
Next, the medium edge estimation unit 203 estimates the
S1050では、位置合わせ部204は、絵柄領域305に基づき、検査基準画像301と検査対象画像302の位置合わせを行う。通常、媒体と媒体上に印刷された絵柄との位置関係は、印刷装置の媒体搬送ずれや印刷位置ずれに由来して印刷ごとにわずかに変動する。本ステップでは、まず媒体の四隅で位置合わせをしたのち、位置合わせ基準点に基づいて絵柄による位置合わせを行う。図3(c)のフローチャートを参照して、位置合わせ処理の詳細について説明する。また、図9は、位置合わせ処理(S1050)の概要を例示的に説明する図である。
In S1050, the
図9の(a-1)、(b-1)は、それぞれ、検査基準画像301、検査対象画像302を例示的に示している。特に、それぞれの画像における、絵柄領域305、位置合わせ基準点307a~307c、頂点308a~308dを示している。
Figure 9 (a-1) and (b-1) respectively show an example of an
位置合わせ基準点307は、検査基準画像301および検査対象画像302それぞれにおいて、絵柄領域305中の同じ部位を示す点である。ここでは3点の位置合わせ基準点307を設定している。例えば、検査基準画像301の位置合わせ基準点307aと検査対象画像302に位置合わせ基準点307aは、それぞれの画像における座標は異なっているが、絵柄の同じ部位を表している。位置合わせ基準点307b、307cについても同様である。
The alignment reference points 307 are points that indicate the same part of the
ここでは、位置合わせ基準点307a~307cは、印刷装置が印刷する絵柄に対してあらかじめ定めておくことを想定する。なお、位置合わせ基準点307a~307cについては、ユーザが絵柄を見ながら手動で設定してもよいし、SIFT、SURFなどの画像特徴量を用いて自動で設定してもよい。このとき位置合わせ部204は、検査基準画像301中の位置合わせ基準点307a~307cに対して、各々の位置合わせ基準点307a~307cを中心とした規定の大きさの部分画像からなるテンプレート313a~313cを設定する。ここでは、テンプレート313a~313cの大きさに「32×32画素」の領域を設定する。図9の(b-1)はテンプレート313a~313cと他の構成要素との関係を示している。
Here, it is assumed that the
S1810では、位置合わせ部204は、検査基準画像301および検査対象画像302に対して、印刷媒体領域304の位置合わせを行う。位置合わせ処理部204は、S1030において検出された検査基準画像301と検査対象画像302の頂点308a~308dから、検査基準画像301から検査対象画像302への印刷媒体領域304の変位量Xを求める。変位量Xは、例えば、数式(1)のように表される。なお、ここでは、頂点308aの検査基準画像301における座標を(x1a,y1a)、検査対象画像302における座標を(x2a,y2a)と表記している。以下同様に、頂点308bの検査基準画像301における座標を(x1b,y1b)、検査対象画像302における座標を(x2b,y2b)と表記している。
In S1810, the
数式(1)におけるXはアフィン変換の変換行列であり、頂点308を基準とした、検査基準画像301の座標と検査対象画像302の座標とを対応付ける変換行列である。変換行列Xは、平行移動、回転、拡大縮小、せん断を合成した変位量を表している。位置合わせ部204は、数式(1)における行列Aの逆行列を行列Bの右から乗ずることによって、変換行列Xを算出する。なお、数式(1)の行列Aと行列Bは正方行列ではないので、位置合わせ部204は、行列Aに対するムーア・ペンローズの疑似逆行列を求め、変換行列Xを算出する。
X in formula (1) is a transformation matrix for affine transformation, which associates the coordinates of the
S1820では、位置合わせ部204は、検査対象画像302に対して、探索範囲を設定する。図9の(b-2)は検査対象画像302と探索範囲314の関係を示している。探索範囲314は、この後のS1830において行うテンプレートマッチングで用いられる。
In S1820, the
位置合わせ部204は、検査対象画像302中に対応するテンプレート313a~313cを包含する探索範囲314a~314cを設定する必要がある。そのため、位置合わせ部204は、探索範囲314a~314cの領域に関して、例えば「64×64画素」などのように、テンプレート313a~313cの大きさよりも十分大きい領域を設定する。
The
また、位置合わせ部204は、数式(2)によって探索範囲314a~314cの位置を算出する。なお、ここでは、検査基準画像301における位置合わせ基準点307aの座標を(u1a,v1a)、位置合わせ基準点307bの座標を(u1b,v1b)、位置合わせ基準点307cの座標を(u1c,v1c)としている。
The
位置合わせ部204は、数式(2)の行列P’に関して、探索領域314aの中心座標に(u2a0,v2a0)を設定する。同様に、探索領域314bの中心座標に(u2b0,v2b0)、探索領域314cの中心座標に(u2c0,v2c0)を設定する。また、Xは数式(1)で算出される変換行列である。すなわち、行列P’は、変換行列Xにより行列Pを座標変換したものである。
Regarding matrix P' in formula (2), the
S1830では、位置合わせ部204は、テンプレートマッチングを行い、検査対象画像302における位置合わせ基準点307a~307cを検出する。テンプレートマッチングは探索領域314中の各画素に対してテンプレート313の類似度を算出し、類似度が最も高い位置を求める方法であるが、公知の技術であるため、詳細な説明は省略する。
In S1830, the
これにより、位置合わせ処理部204は、検査基準画像301、検査対象画像302のそれぞれについて、位置合わせ基準点307a~307cの座標を得る。ここで、位置合わせ基準点307aの検査基準画像301における座標を(x1a,y1a)、検査対象画像302における座標を(x2a,y2a)と表記する。以下同様に、位置合わせ基準点307bの検査基準画像301における座標を(x1b,y1b)、検査対象画像302における座標を(x2b,y2b)とする。同様に位置合わせ基準点307cの検査基準画像301における座標を(x1c,y1c)、検査対象画像302における座標を(x2c,y2c)とする。
As a result, the
S1840では、位置合わせ部204は、数式(3)によって表される、検査基準画像301から検査対象画像302への絵柄領域305の変位量X’を求める。数式(3)におけるX’はアフィン変換の変換行列である。つまりX’は、位置合わせ基準点307を基準としたとき、検査基準画像301から検査対象画像302への平行移動、回転、拡大縮小、せん断を合成した変位量を表す。
In S1840, the
次に位置合わせ部204は、検査基準画像301中の印刷媒体領域304を構成する各画素に対して、算出した変換行列X’を適用して、変換画像309を生成する。図9の(c)は、位置合わせ処理によって、検査基準画像301をX’で変換した変換画像309と、検査対象画像302が位置合わせされた様子を示している。すなわち、変換画像309と検査対象画像302の位置合わせ基準点307a~307cの位置が一致している状態である。
The
S1060では、検査部205は、S1050において位置合わせ処理を行った後の変換画像309と検査対象画像302に含まれる印刷媒体領域304の各画素について、両画像間の差分を算出する。検査部205は算出された差分のうち、しきい値よりも大きい画素を欠陥画素と判定する。
In S1060, the
S1060において欠陥画素が検出された場合には、検査部205は、検査不合格と判定する。このとき、CPU101は、当該印刷媒体を出力トレー112に出力する制御を行う。検査部205は、欠陥画素が検出されなかった場合には、検査合格と判定する。このとき、CPU101は、当該印刷媒体を出力トレー111に出力する制御を行う。
If a defective pixel is detected in S1060, the
S1070では、画像処理部201は、同じ画像が表面に形成された印刷媒体がさらに印刷出力されている場合には、S1020に戻り、処理を継続する。そうでない場合には処理を終了する。
In S1070, if more print media with the same image formed on the surface have been printed out, the
以上説明したとおり第1実施形態によれば、検査対象画像中で印刷物のはみ出しが生じている場合においても、好適に検査基準画像と検査対象画像との位置合わせを行うことが可能となる。具体的には、印刷物にはみ出しが生じていた場合には、直接観測される印刷物の頂点に基づいて残りの頂点を推定し、位置合わせを行う。これにより、好適に検査対象画像における欠陥の有無を検査することが可能となる。すなわち、印刷物の一辺(用紙幅W)よりも画像の幅(長さL)が短く、検査対象画像中で印刷物の一部がはみ出すような場合においても、好適に欠陥の検査が可能となる。 As described above, according to the first embodiment, even if the print extends beyond the edge of the image to be inspected, it is possible to preferably align the inspection reference image with the image to be inspected. Specifically, if the print extends beyond the edge of the image to be inspected, the remaining vertices are estimated based on the vertices of the print that are directly observed, and then alignment is performed. This makes it possible to preferably inspect the image to be inspected for defects. In other words, even if the image width (length L) is shorter than one side of the print (paper width W) and part of the print extends beyond the edge of the image to be inspected, it is possible to preferably inspect for defects.
(変形例)
上述の説明では、S1010において、画像読取装置105が第一の時点で取得した画像を検査基準画像301とする場合について説明した。しかし、検査基準画像301は欠陥の無い画像であればよく、検査基準画像301の取得方法はこれに限らない。例えば、別の読取装置で取得した検査基準画像301を用いる場合にも適用可能である。例えば、画像読取装置105とは異なる読取装置(不図示)で検査基準画像301を読み取り、補助記憶装置(不図示)に検査基準画像301を保存してもよい。この場合、S1010の画像取得部201は、画像読取装置105に替えて、補助記憶装置107から検査基準画像301を取得する。
(Modification)
In the above description, in S1010, the image acquired by the
また上述の説明では、S1020において、画像読取装置105が第二の時点以降に取得した画像を検査対象画像302とする場合について説明した。しかし、検査対象画像302の取得方法はこれに限らない。例えば、別の読取装置で取得した検査対象画像302を用いる場合にも適用可能である。例えば、画像読取装置105とは異なる読取装置(不図示)で検査対象画像302を読み取り、補助記憶装置(不図示)に検査対象画像302を保存してもよい。この場合、S1020の画像取得部201は、画像読取装置105に替えて、補助記憶装置107から検査対象画像302を取得する。
In the above description, the image acquired by the
更に上述の説明では、S1040において、媒体端部推定部203は、印刷媒体の頂点を検出あるいは推定する場合について説明したが、これに限らない。媒体端部推定部203は、印刷媒体の辺を推定するようにしてもよい。 Furthermore, in the above description, in S1040, the medium edge estimation unit 203 detects or estimates the vertices of the print medium, but this is not limited to the above. The medium edge estimation unit 203 may also estimate the sides of the print medium.
更にまた上述の説明では、S1840において、検査基準画像301を変換行列X’で変換し変換画像309を生成する場合について説明した。これに替えて、検査対象画像302を変換行列Yで変換し変換画像311生成するようにしてもよい。ここで、変換行列Yは数式(4)で表現される。数式(4)における行列A、Bは数式(3)と同じである。この場合、S1070において、検査処理部205は、検査基準画像301と変換画像311との差分を算出する。
Furthermore, in the above description, in S1840, the
また、S1030~S1040の処理に関して、検査対象画像302に替えて検査基準画像301に適用してもよい。
The processes in steps S1030 to S1040 may also be applied to the
更に、画像取得部は、搬送路110上の印刷媒体を画像として読み取り、画像処理装置に入力できるものであれば、いかなるものでもよい。また、読み取る画像においても、RGBカラー画像、グレイスケール画像、白黒画像など、いかなる種類の画像でもよい。
Furthermore, the image acquisition unit may be any type that can read the print medium on the
(第2実施形態)
第2実施形態では、位置合わせ処理(S1050)においては、頂点の推定方法、印刷装置の特性に応じて、探索範囲を適応的に設定する形態について説明する。なお、第2実施形態に係る画像処理装置100の構成は、第1実施形態(図1、図2)と同様であるため説明は省略する。また、画像処理装置100の動作についても、図3に示した第1実施形態(図3)とほぼ同様である。以下では、位置合わせ処理(S1050)に関して第1実施形態と異なる部分(S1820)に着目して説明し、同様の部分については説明を省略する。
Second Embodiment
In the second embodiment, a mode in which the search range is adaptively set in the alignment process (S1050) according to the vertex estimation method and the characteristics of the printing device will be described. Note that the configuration of the
S1820では、位置合わせ部204は、検査対象画像302に対して探索範囲を設定する。ただし、第1実施形態においては、探索範囲314a~314cの大きさを所与の大きさ(例えば「64×64画素」)としていたが、第2実施形態においては、探索範囲314a~314cの大きさを適応的に決定する。
In S1820, the
具体的には、位置合わせ部204は、探索範囲314a~314cの大きさを、印刷装置190の印刷位置誤差および頂点308の推定方法に基づいて決定する。
Specifically, the
印刷装置190の印刷位置誤差とは、印刷装置190が印刷媒体に画像を印刷する画像形成位置の変動量の最大値を表す。印刷位置誤差の値をLeとし、Leは検査対象画像302の解像度における画素数である。
The printing position error of the
頂点308の推定方法とは、媒体端部推定処理(S1040)において決定された4つの頂点の属性(検出された頂点であるか推定された頂点であるか)を示すパラメータである。S1540では、検査対象画像302中に直接観測されている頂点を検出しているため、頂点308の座標の確度が高い。一方S1550では、検査対象画像302に明には観測されていない頂点の位置を推定しているため、相対的に頂点308の座標の確度が低い。このため、位置合わせ部204は、4つの頂点の属性に応じて、探索範囲314の大きさを制御する。
The estimation method of the vertices 308 is a parameter indicating the attributes of the four vertices (whether they are detected vertices or estimated vertices) determined in the medium edge estimation process (S1040). In S1540, the vertices that are directly observed in the
位置合わせ部204は、数式(5)によって、探索範囲314の大きさSを定める。Tはテンプレート313の大きさを表す。Rは頂点308の推定方法に応じて定める係数である。
The
図10は、探索範囲314aに対する係数Rを決定する方法を例示的に説明する図である。位置合わせ部204は、対象とする探索範囲314aに対応する位置合わせ基準点307aと、4つの頂点308との距離da~ddを求める。図10において、S1540で検出された頂点308を黒丸、S1550で推定された頂点308を白丸で示している。すなわち、図10の例においては、頂点308bのみがS1540で検出され、残りの3点はS1550で推定されている。
Figure 10 is a diagram illustrating an example of a method for determining the coefficient R for the
位置合わせ部204は、数式(6)によって係数Rを定める。数式(6)におけるR1は、S1540で検出された頂点308における係数(ここでは「1.0」)である。また、R2はS1550で推定された頂点308における係数(ここでは「1.5」)である。
The
すなわち、位置合わせ部204は数式(5)及び数式(6)に基づき、4つの頂点308それぞれと位置合わせ基準点307との距離に応じて、探索範囲314の大きさSを変更する。
In other words, the
上述したように、S1540で明に検出された頂点は確度が高いため、これに近い位置合わせ基準点307に小さいR1を乗ずることで探索範囲314の大きさが抑制される。一方、S1550で推定された頂点は相対的に確度が低いため、これに近い位置合わせ基準点307に大きいR1を乗ずることで探索範囲314が大きくなる。
As described above, the vertex clearly detected in S1540 has a high degree of certainty, so the size of the
なお、S1820において、位置合わせ部204は、Sの算出に媒体断裁誤差Ceを加えてもよい。ここで、媒体断裁誤差Ceは、印刷媒体の製造工程において断裁時に生じるサイズばらつきの最大値である。このとき、数式(5)に替えて数式(7)を用いる。
In addition, in S1820, the
以上説明したとおり第2実施形態によれば、検査対象画像中で印刷物のはみ出しが生じている場合においても、好適に検査基準画像と検査対象画像との位置合わせを行うことが可能となる。特に、位置合わせ処理における探索範囲をより適切に設定することが可能となる。 As described above, according to the second embodiment, it is possible to appropriately align the inspection reference image and the inspection target image even when the printout extends beyond the edge of the inspection target image. In particular, it is possible to more appropriately set the search range in the alignment process.
(その他の実施例)
なお、上述した各処理部のうち、はみ出し検出部202、媒体端部推定部203、位置合わせ部204、検査部205等については、その代わりとして、機械学習された学習済みモデルを代わりに用いて処理しても良い。その場合には、例えば、その処理部への入力データと出力データとの組合せを学習データとして複数個準備し、それらから機械学習によって知識を獲得し、獲得した知識に基づいて入力データに対する出力データを結果として出力する学習済みモデルを生成する。学習済みモデルは、例えばニューラルネットワークモデルで構成可能である。そして、その学習済みモデルは、前記処理部と同等の処理をするためのプログラムとして、CPUあるいはGPUなどと協働で動作することにより、前記処理部の処理を行う。なお、上記学習済みモデルは、必要に応じて一定の処理後に更新しても良い。
Other Examples
Among the above-mentioned processing units, the
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。 The present invention can also be realized by supplying a program that realizes one or more of the functions of the above-mentioned embodiments to a system or device via a network or storage medium, and having one or more processors in the computer of the system or device read and execute the program. It can also be realized by a circuit (e.g., an ASIC) that realizes one or more of the functions.
発明は上記実施形態に制限されるものではなく、発明の精神及び範囲から離脱することなく、様々な変更及び変形が可能である。従って、発明の範囲を公にするために請求項を添付する。 The invention is not limited to the above-described embodiment, and various modifications and variations are possible without departing from the spirit and scope of the invention. Therefore, the following claims are appended to disclose the scope of the invention.
100 画像処理装置; 201 画像取得部; 202 はみ出し検出部; 203 媒体端部推定部; 204 位置合わせ部; 205 検査部 100 Image processing device; 201 Image acquisition unit; 202 Overhang detection unit; 203 Medium edge estimation unit; 204 Alignment unit; 205 Inspection unit
Claims (12)
前記印刷装置により前記所与の画像が表面に形成された第2の媒体を読み取ることにより得られる対象画像を取得する第2の取得手段と、
前記基準画像における前記第1の媒体の頂点の座標と、前記対象画像における前記第2の媒体の頂点の座標と、を決定する決定手段と、
前記決定手段により決定された前記基準画像および前記対象画像それぞれにおける頂点に基づいて、前記基準画像と前記対象画像とを位置合わせする第1位置合わせ手段と、
前記第1位置合わせ手段により位置合わせされた前記基準画像および前記対象画像におけるテンプレートマッチングの結果に基づいて、前記基準画像と前記対象画像とを位置合わせする第2位置合わせ手段と、
前記第2位置合わせ手段により位置合わせされた前記基準画像と前記対象画像とを比較することにより、前記対象画像を検査する検査手段と、
を有し、
前記決定手段は、前記基準画像および前記対象画像の少なくとも一方の画像において媒体の領域全体が含まれていない場合、少なくとも1つの頂点の座標を推定により決定し、
前記第2位置合わせ手段は、前記テンプレートマッチングを行う前記対象画像における探索範囲を、前記決定手段により決定された前記対象画像における頂点の属性に基づいて決定する
ことを特徴とする画像処理装置。 a first acquisition means for acquiring a reference image obtained by reading a first medium having a given image formed on a surface thereof by a printing device;
a second acquisition means for acquiring a target image obtained by reading a second medium having the given image formed on a surface thereof by the printing device;
a determining means for determining coordinates of vertices of the first medium in the reference image and coordinates of vertices of the second medium in the target image;
a first alignment means for aligning the reference image and the target image based on the vertices in the reference image and the target image determined by the determination means;
a second alignment means for aligning the reference image and the target image based on a result of template matching between the reference image and the target image aligned by the first alignment means;
an inspection means for inspecting the target image by comparing the reference image aligned by the second alignment means with the target image;
having
The determining means determines the coordinates of at least one vertex by estimation when at least one of the reference image and the target image does not include the entire area of the medium ;
The second alignment means determines a search range in the target image for performing the template matching based on the attributes of the vertices in the target image determined by the determination means.
13. An image processing device comprising:
ことを特徴とする請求項1に記載の画像処理装置。 The determining means determines coordinates of four vertices of the first medium in the reference image and coordinates of at least four vertices of the second medium in the target image.
2. The image processing device according to claim 1,
前記基準画像に前記第1の媒体の領域全体が含まれているか否かを判定する第1の判定手段と、
前記第1の判定手段により前記基準画像に前記第1の媒体の領域全体が含まれていないと判定された場合に、前記基準画像に含まれていない前記第1の媒体の領域に位置する少なくとも1つの頂点の座標を推定により決定する第1の決定手段と、
前記対象画像に前記第2の媒体の領域全体が含まれているか否かを判定する第2の判定手段と、
前記第2の判定手段により前記対象画像に前記第2の媒体の領域全体が含まれていないと判定された場合に、前記対象画像に含まれていない前記第2の媒体の領域に位置する少なくとも1つの頂点の座標を推定により決定する第2の決定手段と、
を有することを特徴とする請求項2に記載の画像処理装置。 The determining means is
a first determination means for determining whether the reference image includes an entire area of the first medium;
a first determination means for determining, by estimation, coordinates of at least one vertex located in the area of the first medium that is not included in the reference image when the first determination means determines that the reference image does not include the entire area of the first medium;
a second determination means for determining whether the target image includes the entire area of the second medium;
a second determination means for determining, by estimation, coordinates of at least one vertex located in the area of the second medium that is not included in the target image when the second determination means determines that the entire area of the second medium is not included in the target image;
3. The image processing apparatus according to claim 2, further comprising:
前記第2の決定手段は、前記対象画像における前記第2の媒体の4つの頂点のうち前記対象画像に含まれる頂点の座標を前記対象画像からの検出により決定する
ことを特徴とする請求項3に記載の画像処理装置。 the first determination means determines coordinates of vertices included in the reference image among four vertices of the first medium in the reference image by detection from the reference image;
4. The image processing apparatus according to claim 3, wherein the second determination means determines coordinates of vertices included in the target image, among four vertices of the second medium in the target image, by detection from the target image.
前記第2の決定手段は、前記第2の判定手段により前記対象画像に前記第2の媒体の領域全体が含まれていないと判定され、かつ、前記対象画像に前記第2の媒体の4つの頂点が含まれていない場合に、前記第2の媒体の幅と前記対象画像を読み取った読取部の長さとに基づいて、前記第2の媒体の4つの頂点の座標を推定により決定する
ことを特徴とする請求項3に記載の画像処理装置。 the first determination means, when it is determined by the first judging means that the reference image does not include the entire area of the first medium and the reference image does not include the four vertices of the first medium, determines by estimation the coordinates of the four vertices of the first medium based on the width of the first medium and the length of a reading unit that reads the reference image;
The image processing device described in claim 3, characterized in that when the second judgment means determines that the target image does not include the entire area of the second medium and the target image does not include the four vertices of the second medium, the second determination means estimates the coordinates of the four vertices of the second medium based on the width of the second medium and the length of the reading unit that read the target image.
前記第2位置合わせ手段は、座標変換した前記基準画像に含まれる部分画像と前記対象画像に含まれる部分画像とのテンプレートマッチングを行い、該テンプレートマッチングの結果に基づいて前記位置合わせのための変位量を算出する
ことを特徴とする請求項2乃至5の何れか1項に記載の画像処理装置。 the first alignment means calculates a transformation matrix that associates coordinates of the reference image with coordinates of the target image based on four vertices in the reference image and four vertices in the target image, and performs coordinate transformation of the reference image and the target image based on the transformation matrix;
The image processing device according to any one of claims 2 to 5, characterized in that the second alignment means performs template matching between a partial image included in the coordinate-transformed reference image and a partial image included in the target image, and calculates a displacement amount for the alignment based on a result of the template matching.
前記印刷装置により前記所与の画像が表面に形成された第2の媒体を読み取ることにより得られる対象画像を取得する第2の取得手段と、a second acquisition means for acquiring a target image obtained by reading a second medium having the given image formed on a surface thereof by the printing device;
前記基準画像における前記第1の媒体の頂点の座標と、前記対象画像における前記第2の媒体の頂点の座標と、を決定する決定手段と、a determining means for determining coordinates of vertices of the first medium in the reference image and coordinates of vertices of the second medium in the target image;
前記決定手段により決定された前記基準画像および前記対象画像それぞれにおける頂点に基づいて、前記基準画像と前記対象画像とを位置合わせする第1位置合わせ手段と、a first alignment means for aligning the reference image and the target image based on the vertices in the reference image and the target image determined by the determination means;
前記第1位置合わせ手段により位置合わせされた前記基準画像および前記対象画像におけるテンプレートマッチングの結果に基づいて、前記基準画像と前記対象画像とを位置合わせする第2位置合わせ手段と、a second alignment means for aligning the reference image and the target image based on a result of template matching between the reference image and the target image aligned by the first alignment means;
前記第2位置合わせ手段により位置合わせされた前記基準画像と前記対象画像とを比較することにより、前記対象画像を検査する検査手段と、an inspection means for inspecting the target image by comparing the reference image aligned by the second alignment means with the target image;
を有し、having
前記決定手段は、前記基準画像および前記対象画像の少なくとも一方の画像において媒体の領域全体が含まれていない場合、少なくとも1つの頂点の座標を推定により決定し、The determining means determines the coordinates of at least one vertex by estimation when at least one of the reference image and the target image does not include the entire area of the medium;
前記第2位置合わせ手段は、前記テンプレートマッチングを行う前記対象画像における探索範囲を、前記印刷装置における画像形成位置の変動量の最大値に基づいて決定するThe second position matching means determines a search range in the target image for performing the template matching based on a maximum value of a fluctuation amount of an image forming position in the printing device.
ことを特徴とする画像処理装置。13. An image processing device comprising:
前記印刷装置により前記所与の画像が表面に形成された第2の媒体を読み取ることにより得られる対象画像を取得する第2の取得手段と、a second acquisition means for acquiring a target image obtained by reading a second medium having the given image formed on a surface thereof by the printing device;
前記基準画像における前記第1の媒体の頂点の座標と、前記対象画像における前記第2の媒体の頂点の座標と、を決定する決定手段と、a determining means for determining coordinates of vertices of the first medium in the reference image and coordinates of vertices of the second medium in the target image;
前記決定手段により決定された前記基準画像および前記対象画像それぞれにおける頂点に基づいて、前記基準画像と前記対象画像とを位置合わせする第1位置合わせ手段と、a first alignment means for aligning the reference image and the target image based on the vertices in the reference image and the target image determined by the determination means;
前記第1位置合わせ手段により位置合わせされた前記基準画像および前記対象画像におけるテンプレートマッチングの結果に基づいて、前記基準画像と前記対象画像とを位置合わせする第2位置合わせ手段と、a second alignment means for aligning the reference image and the target image based on a result of template matching between the reference image and the target image aligned by the first alignment means;
前記第2位置合わせ手段により位置合わせされた前記基準画像と前記対象画像とを比較することにより、前記対象画像を検査する検査手段と、an inspection means for inspecting the target image by comparing the reference image aligned by the second alignment means with the target image;
を有し、having
前記決定手段は、前記基準画像および前記対象画像の少なくとも一方の画像において媒体の領域全体が含まれていない場合、少なくとも1つの頂点の座標を推定により決定し、The determining means determines the coordinates of at least one vertex by estimation when at least one of the reference image and the target image does not include the entire area of the medium;
前記第2位置合わせ手段は、前記テンプレートマッチングを行う前記対象画像における探索範囲を、前記第2の媒体の製造工程において断裁時に生じるサイズばらつきの最大値に基づいて決定するThe second alignment means determines a search range in the target image for performing the template matching based on a maximum value of size variation that occurs when cutting the second medium in a manufacturing process.
ことを特徴とする画像処理装置。13. An image processing device comprising:
印刷装置により所与の画像が表面に形成された第1の媒体を読み取ることにより得られる基準画像を取得する第1の取得工程と、
前記印刷装置により前記所与の画像が表面に形成された第2の媒体を読み取ることにより得られる対象画像を取得する第2の取得工程と、
前記基準画像における前記第1の媒体の頂点の座標と、前記対象画像における前記第2の媒体の頂点の座標と、を決定する決定工程と、
前記決定工程により決定された前記基準画像および前記対象画像それぞれにおける頂点に基づいて、前記基準画像と前記対象画像とを位置合わせする第1位置合わせ工程と、
前記第1位置合わせ工程において位置合わせされた前記基準画像および前記対象画像におけるテンプレートマッチングの結果に基づいて、前記基準画像と前記対象画像とを位置合わせする第2位置合わせ工程と、
前記第2位置合わせ工程において位置合わせされた前記基準画像と前記対象画像とを比較することにより、前記対象画像を検査する検査工程と、
を含み、
前記決定工程では、前記基準画像および前記対象画像の少なくとも一方の画像において媒体の領域全体が含まれていない場合、少なくとも1つの頂点の座標を推定により決定し、
前記第2位置合わせ工程では、前記テンプレートマッチングを行う前記対象画像における探索範囲を、前記決定工程において決定された前記対象画像における頂点の属性に基づいて決定する
ことを特徴とする制御方法。 A method for controlling an image processing device that inspects an image formed on a medium, comprising the steps of:
A first acquisition step of acquiring a reference image obtained by reading a first medium having a given image formed on a surface thereof by a printing device;
a second acquisition step of acquiring a target image obtained by reading a second medium having the given image formed on a surface thereof by the printing device;
determining coordinates of vertices of the first medium in the reference image and coordinates of vertices of the second medium in the target image;
a first alignment step of aligning the reference image and the target image based on the vertices in the reference image and the target image determined in the determination step;
a second alignment step of aligning the reference image and the target image based on a result of template matching between the reference image and the target image aligned in the first alignment step;
an inspection step of inspecting the target image by comparing the reference image and the target image aligned in the second alignment step ;
Including,
In the determining step, when at least one of the reference image and the target image does not include the entire area of the medium, the coordinates of at least one vertex are determined by estimation ;
In the second alignment step, a search range in the target image for performing the template matching is determined based on the attributes of the vertices in the target image determined in the determination step.
A control method comprising:
印刷装置により所与の画像が表面に形成された第1の媒体を読み取ることにより得られる基準画像を取得する第1の取得工程と、A first acquisition step of acquiring a reference image obtained by reading a first medium having a given image formed on a surface thereof by a printing device;
前記印刷装置により前記所与の画像が表面に形成された第2の媒体を読み取ることにより得られる対象画像を取得する第2の取得工程と、a second acquisition step of acquiring a target image obtained by reading a second medium having the given image formed on a surface thereof by the printing device;
前記基準画像における前記第1の媒体の頂点の座標と、前記対象画像における前記第2の媒体の頂点の座標と、を決定する決定工程と、determining coordinates of vertices of the first medium in the reference image and coordinates of vertices of the second medium in the target image;
前記決定工程により決定された前記基準画像および前記対象画像それぞれにおける頂点に基づいて、前記基準画像と前記対象画像とを位置合わせする第1位置合わせ工程と、a first alignment step of aligning the reference image and the target image based on the vertices in the reference image and the target image determined in the determination step;
前記第1位置合わせ工程において位置合わせされた前記基準画像および前記対象画像におけるテンプレートマッチングの結果に基づいて、前記基準画像と前記対象画像とを位置合わせする第2位置合わせ工程と、a second alignment step of aligning the reference image and the target image based on a result of template matching between the reference image and the target image aligned in the first alignment step;
前記第2位置合わせ工程において位置合わせされた前記基準画像と前記対象画像とを比較することにより、前記対象画像を検査する検査工程と、an inspection step of inspecting the target image by comparing the reference image and the target image aligned in the second alignment step;
を含み、Including,
前記決定工程では、前記基準画像および前記対象画像の少なくとも一方の画像において媒体の領域全体が含まれていない場合、少なくとも1つの頂点の座標を推定により決定し、In the determining step, when the entire area of the medium is not included in at least one of the reference image and the target image, the coordinates of at least one vertex are determined by estimation;
前記第2位置合わせ工程では、前記テンプレートマッチングを行う前記対象画像における探索範囲を、前記印刷装置における画像形成位置の変動量の最大値に基づいて決定するIn the second alignment step, a search range in the target image for performing the template matching is determined based on a maximum value of a variation amount of an image forming position in the printing device.
ことを特徴とする制御方法。A control method comprising:
印刷装置により所与の画像が表面に形成された第1の媒体を読み取ることにより得られる基準画像を取得する第1の取得工程と、A first acquisition step of acquiring a reference image obtained by reading a first medium having a given image formed on a surface thereof by a printing device;
前記印刷装置により前記所与の画像が表面に形成された第2の媒体を読み取ることにより得られる対象画像を取得する第2の取得工程と、a second acquisition step of acquiring a target image obtained by reading a second medium having the given image formed on a surface thereof by the printing device;
前記基準画像における前記第1の媒体の頂点の座標と、前記対象画像における前記第2の媒体の頂点の座標と、を決定する決定工程と、determining coordinates of vertices of the first medium in the reference image and coordinates of vertices of the second medium in the target image;
前記決定工程により決定された前記基準画像および前記対象画像それぞれにおける頂点に基づいて、前記基準画像と前記対象画像とを位置合わせする第1位置合わせ工程と、a first alignment step of aligning the reference image and the target image based on the vertices in the reference image and the target image determined in the determination step;
前記第1位置合わせ工程において位置合わせされた前記基準画像および前記対象画像におけるテンプレートマッチングの結果に基づいて、前記基準画像と前記対象画像とを位置合わせする第2位置合わせ工程と、a second alignment step of aligning the reference image and the target image based on a result of template matching between the reference image and the target image aligned in the first alignment step;
前記第2位置合わせ工程において位置合わせされた前記基準画像と前記対象画像とを比較することにより、前記対象画像を検査する検査工程と、an inspection step of inspecting the target image by comparing the reference image and the target image aligned in the second alignment step;
を含み、Including,
前記決定工程では、前記基準画像および前記対象画像の少なくとも一方の画像において媒体の領域全体が含まれていない場合、少なくとも1つの頂点の座標を推定により決定し、In the determining step, when the entire area of the medium is not included in at least one of the reference image and the target image, the coordinates of at least one vertex are determined by estimation;
前記第2位置合わせ工程では、前記テンプレートマッチングを行う前記対象画像における探索範囲を、前記第2の媒体の製造工程において断裁時に生じるサイズばらつきの最大値に基づいて決定するIn the second alignment step, a search range in the target image for performing the template matching is determined based on a maximum value of size variation that occurs when cutting in a manufacturing process of the second medium.
ことを特徴とする制御方法。A control method comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020088320A JP7557962B2 (en) | 2020-05-20 | 2020-05-20 | Image processing device and control method thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020088320A JP7557962B2 (en) | 2020-05-20 | 2020-05-20 | Image processing device and control method thereof |
Publications (3)
Publication Number | Publication Date |
---|---|
JP2021182726A JP2021182726A (en) | 2021-11-25 |
JP2021182726A5 JP2021182726A5 (en) | 2023-05-09 |
JP7557962B2 true JP7557962B2 (en) | 2024-09-30 |
Family
ID=78606829
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2020088320A Active JP7557962B2 (en) | 2020-05-20 | 2020-05-20 | Image processing device and control method thereof |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7557962B2 (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010273324A (en) | 2009-04-23 | 2010-12-02 | Sharp Corp | Control apparatus, image reading apparatus, image forming apparatus, control method of image reading apparatus, program, and recording medium |
WO2015114833A1 (en) | 2014-02-03 | 2015-08-06 | 株式会社プロスパークリエイティブ | Image inspecting device and image inspecting program |
-
2020
- 2020-05-20 JP JP2020088320A patent/JP7557962B2/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010273324A (en) | 2009-04-23 | 2010-12-02 | Sharp Corp | Control apparatus, image reading apparatus, image forming apparatus, control method of image reading apparatus, program, and recording medium |
WO2015114833A1 (en) | 2014-02-03 | 2015-08-06 | 株式会社プロスパークリエイティブ | Image inspecting device and image inspecting program |
Also Published As
Publication number | Publication date |
---|---|
JP2021182726A (en) | 2021-11-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4055385B2 (en) | Image inspection device | |
US12020423B2 (en) | Inspecting for a defect on a print medium with an image aligned based on an object in the image and based on vertices of the inspection target medium and the reference medium | |
JP6716979B2 (en) | Printed matter inspection device, printed matter inspection method and program | |
JP2022094791A (en) | Image processing device, image processing method, and program | |
EP4236286B1 (en) | Printed-matter inspection system, program, and printed-matter inspection method | |
JP2020145598A (en) | Image inspection apparatus, image inspection method, and image inspection program | |
JP2013111946A (en) | Article inspecting device, article inspecting method, and program | |
JP4449522B2 (en) | Image inspection device with tilt detection function | |
JP7557962B2 (en) | Image processing device and control method thereof | |
US20240029238A1 (en) | Inspection apparatus, method of controlling the same, inspection system, and storage medium | |
US20230401695A1 (en) | Inspection apparatus, method of controlling the same, and storage medium | |
US20230386020A1 (en) | Image processing apparatus, method of controlling the same, and storage medium | |
JP7487260B2 (en) | Image processing device, image processing method, and program | |
JP2022094794A (en) | Image processing device, image processing method, program | |
US20230398776A1 (en) | Inspection apparatus, inspection method, and storage medium | |
US11838454B2 (en) | Inspection apparatus, control method thereof, and storage medium | |
KR102733948B1 (en) | Image processing apparatus, image processing method, and computer program | |
US20240037891A1 (en) | Image processing apparatus, image processing method, and storage medium | |
JP7159878B2 (en) | Image processing device, image processing method and image processing program | |
JP2024051445A (en) | Inspection system of printing medium, control method, and control program | |
JP2024014720A (en) | Inspection device, control method thereof, inspection system, and program | |
JP2024007210A (en) | Inspection apparatus, inspection method, and program | |
JP2023183106A (en) | Image processing device, image processing method, and program | |
JP2023156962A (en) | Inspection device, method for controlling the same, and program | |
JP2022132991A (en) | Image processing device, control method thereof, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20210103 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20210113 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20230424 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20230424 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20240227 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20240322 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20240516 |
|
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: 20240819 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20240917 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7557962 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |