[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

JP7557962B2 - Image processing device and control method thereof - Google Patents

Image processing device and control method thereof Download PDF

Info

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
Application number
JP2020088320A
Other languages
Japanese (ja)
Other versions
JP2021182726A5 (en
JP2021182726A (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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2020088320A priority Critical patent/JP7557962B2/en
Publication of JP2021182726A publication Critical patent/JP2021182726A/en
Publication of JP2021182726A5 publication Critical patent/JP2021182726A5/ja
Application granted granted Critical
Publication of JP7557962B2 publication Critical patent/JP7557962B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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. Patent Document 1 discloses a method of detecting the edges at both ends of each line that makes up the image to be inspected and calculating the inclination of the print by referencing these edges for multiple lines.

特開2009-111472号公報JP 2009-111472 A

ところで、検査システムでは、印刷物をスキャンするセンサとして、コンタクトイメージセンサ(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 Patent Document 1, if each line constituting an image is shorter than the width of the document, the edges at both ends that are assumed to be the subject of observation cannot be observed, and the position and inclination cannot be calculated. As a result, the patterns of the inspection reference image and the inspection target image cannot be accurately aligned, and the presence or absence of defects cannot be properly inspected.

本発明は、このような問題に鑑みてなされたものであり、印刷物における欠陥をより好適に検出可能とする技術を提供することを目的としている。 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.

画像処理装置を含む印刷システムの全体構成を示す図である。1 is a diagram showing an overall configuration of a printing system including an image processing apparatus. 画像処理装置の構成を示すブロック図である。FIG. 1 is a block diagram showing a configuration of an image processing device. 画像処理装置の処理を説明するフローチャートである。11 is a flowchart illustrating a process of the image processing device. 検査基準画像の例を示す図である。FIG. 13 is a diagram showing an example of an inspection reference image. 検査対象画像における印刷媒体のはみ出しの例を示す図である。11A and 11B are diagrams illustrating examples of protrusion of an inspection target image from a print medium. 観測可能な頂点数の算出方法を説明する図である。FIG. 11 is a diagram for explaining a method for calculating the number of observable vertices. 印刷媒体頂点の推定処理を説明する図である。11A and 11B are diagrams illustrating a process of estimating a vertex of a print medium. 観測可能な頂点数が0であった場合の処理を説明する図である。13 is a diagram illustrating a process when the number of observable vertices is 0. FIG. 位置合わせ処理を説明する図である。FIG. 11 is a diagram illustrating a position alignment process. 係数Rを決定する方法を説明する図である。FIG. 13 is a diagram illustrating a method for determining a coefficient R.

以下、添付図面を参照して実施形態を詳しく説明する。なお、以下の実施形態は特許請求の範囲に係る発明を限定するものではない。実施形態には複数の特徴が記載されているが、これらの複数の特徴の全てが発明に必須のものとは限らず、また、複数の特徴は任意に組み合わせられてもよい。さらに、添付図面においては、同一若しくは同様の構成に同一の参照番号を付し、重複した説明は省略する。 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 image processing device 100 according to a first embodiment. The printing system includes the image processing device 100, a printing server 180, and a printing device 190. The printing server 180 generates a print job for an original to be printed, and submits the print job to the printing device 190.

印刷装置190は、印刷用サーバ180から投入された印刷ジョブに基づき、印刷媒体上に画像を形成する。印刷装置190は給紙部191を有しており、ユーザはあらかじめ印刷用紙を給紙部に供給しておく。印刷装置190は印刷ジョブが投入されると、給紙部191に供給された印刷媒体を搬送路192に沿って搬送しながら、その表面(片面または両面)に画像を形成し、画像処理装置100へと送出する。 The printing device 190 forms an image on a print medium based on a print job submitted from the printing server 180. The printing device 190 has a paper feed unit 191, and the user supplies print paper to the paper feed unit in advance. When a print job is submitted, the printing device 190 transports the print medium supplied to the paper feed unit 191 along a transport path 192, forms an image on the surface (one side or both sides), and sends it to the image processing device 100.

画像処理装置100は、印刷装置190から搬送路192を通じて搬送される印刷媒体に対し、欠陥の有無を調べる検査処理を行う。画像処理装置100は、内部にCPU101、RAM102、ROM103、画像読取装置105を備える。また、印刷装置インターフェース(I/F)106、汎用インターフェース(I/F)107、ユーザインターフェース(UI)パネル108、メインバス109を備える。 The image processing device 100 performs an inspection process to check for defects on the print medium transported from the printing device 190 through the transport path 192. The image processing device 100 includes a CPU 101, a RAM 102, a ROM 103, and an image reading device 105. It also includes a printing device interface (I/F) 106, a general-purpose interface (I/F) 107, a user interface (UI) panel 108, and a main bus 109.

さらに、印刷装置190の搬送路192と接続された印刷媒体の搬送路110と、検査合格と判定された印刷媒体を出力する出力トレー111と、検査不合格と判定された印刷媒体を出力する出力トレー112を備える。なお、出力トレー111あるいは出力トレー112への印刷媒体の搬送先の振り分けは、CPU101が検査結果に応じて行う。 Furthermore, the printer 190 is provided with a print medium transport path 110 connected to the transport path 192 of the printing device 190, an output tray 111 for outputting print media that have been determined to have passed the inspection, and an output tray 112 for outputting print media that have been determined to have failed the inspection. The CPU 101 selects whether the print media is to be transported to the output tray 111 or the output tray 112 depending on the inspection results.

CPU101は、画像処理装置100内の各部を統括的に制御するプロセッサである。後述する各処理はCPU101によって実行され、画像処理装置100内の各モジュールを適時制御することによって実現される。RAM102は、CPU101によって実行されるアプリケーションや、画像処理に用いられるデータ等を一時的に保持する。ROM103は、CPU101によって実行されるプログラム群を格納する。 The CPU 101 is a processor that provides overall control of each unit within the image processing device 100. Each process described below is executed by the CPU 101, and is realized by controlling each module within the image processing device 100 in a timely manner. The RAM 102 temporarily stores applications executed by the CPU 101, data used in image processing, etc. The ROM 103 stores a group of programs executed by the CPU 101.

画像読取装置105は、印刷装置から送られてきた印刷媒体の片面または両面を、搬送路110上で読み取り、画像データとして取得する。なお、搬送路110は、画像読取装置105が印刷媒体の画像を読み取る際の背景となるため、画像上で印刷媒体との区別が容易な色(例えば黒)で構成される。印刷装置I/F106は、印刷装置190と接続されており、印刷装置190と画像処理装置100を適切に同期させ、互いの稼働状況を通知する。UIパネル108は、例えば液晶ディスプレイ等の表示装置によって実現され、画像処理装置100のユーザインターフェースとして機能し、現在の状況や設定をユーザに伝える。また、タッチパネルやボタン等の入力装置を備えることによって、ユーザからの指示を受け付ける。メインバス109は、画像処理装置100の各モジュールを接続する伝送路である。 The image reading device 105 reads one or both sides of the print medium sent from the printing device on the conveying path 110 and obtains it as image data. The conveying path 110 is configured in a color (e.g., black) that is easily distinguishable from the print medium in the image, since it is the background when the image reading device 105 reads the image of the print medium. The printing device I/F 106 is connected to the printing device 190, appropriately synchronizes the printing device 190 and the image processing device 100, and notifies each other of their operating status. The UI panel 108 is realized by a display device such as a liquid crystal display, and functions as a user interface for the image processing device 100, notifying the user of the current status and settings. In addition, by providing an input device such as a touch panel or buttons, instructions from the user are accepted. The main bus 109 is a transmission path that connects each module of the image processing device 100.

画像処理装置100は、印刷装置190から出力された印刷媒体を搬送路110が搬送する過程で、画像読取装置105が取得する画像データに基づき、欠陥の有無を調べる検査処理を行う。検査処理の結果、検査合格と判定されれば、印刷媒体は出力トレー111へと搬送される。検査処理の結果、検査不合格と判定されれば、印刷媒体は出力トレー112へと搬送される。これにより、出力トレー111上には、欠陥が存在しない印刷媒体のみが存在することとなる。 As the print medium output from the printing device 190 is transported along the transport path 110, the image processing device 100 performs an inspection process to check for defects based on image data acquired by the image reading device 105. If the inspection process results in the print medium passing the inspection, the print medium is transported to the output tray 111. If the inspection process results in the print medium failing the inspection, the print medium is transported to the output tray 112. This ensures that only print media without defects is present on the output tray 111.

図2は、画像処理装置100の構成を示すブロック図である。長方形の枠は各処理を行う機能モジュールを、矢印は処理の流れを示している。ただし、図2の構成は一例であり図示されるものに限定されない。 Figure 2 is a block diagram showing the configuration of the image processing device 100. The rectangular frames represent functional modules that perform each process, and the arrows represent the flow of the process. However, the configuration in Figure 2 is one example and is not limited to the one shown.

画像取得部201は、画像読取装置105によって搬送路110上の印刷媒体を画像データとして取得する。ここでは、画像取得部201は少なくとも二回、異なる時点で印刷媒体を読み取り、画像データを取得する。また以下の説明では、画像取得部201が第一の時点で取得した画像を検査基準画像301、第二の時点以降に取得した画像を検査対象画像302と呼ぶ。ただし、検査の基準となる画像(欠陥のない画像)を検査基準画像301とすればよく、検査基準画像301および検査対象画像302の取得方法は上記の順番に限定されない。 The image acquisition unit 201 acquires the print medium on the transport path 110 as image data using the image reading device 105. Here, the image acquisition unit 201 reads the print medium at least twice at different points in time to acquire image data. In the following description, the image acquired by the image acquisition unit 201 at the first point in time is called the inspection reference image 301, and the image acquired at the second point in time or later is called the inspection target image 302. However, it is sufficient to use the inspection reference image 301 as the image that serves as the reference for inspection (an image without defects), and the method of acquiring the inspection reference image 301 and the inspection target image 302 is not limited to the above order.

はみ出し検出部202は、画像取得部201が取得した検査対象画像302中に印刷媒体全体が含まれているか否かを検出する。はみ出し検出部202は、画像データ中に印刷媒体の一部でも含まれない場合には、はみ出しが検出されたと判定する。媒体端部推定部203は、はみ出し検出部202の検出結果に基づき、印刷媒体の端部位置を検出する。 The overhang detection unit 202 detects whether the entire print medium is included in the inspection target image 302 acquired by the image acquisition unit 201. If even a part of the print medium is not included in the image data, the overhang detection unit 202 determines that overhang has been detected. The medium edge estimation unit 203 detects the edge positions of the print medium based on the detection results of the overhang detection unit 202.

位置合わせ部204は、検査基準画像301と検査対象画像302から、それぞれ観測される絵柄領域305の輝度に基づき、端部推定部203による推定結果を参照して、絵柄領域305の画像間の変位量を算出する。変位量には、平行移動、回転、拡大縮小によるものが含まれる。 The alignment unit 204 calculates the amount of displacement between the images of the pattern area 305 by referring to the estimation result by the edge estimation unit 203 based on the luminance of the pattern area 305 observed in the inspection reference image 301 and the inspection target image 302. The amount of displacement includes that due to translation, rotation, and enlargement/reduction.

検査部205は、位置合わせ処理部204によって位置合わせされた状態で、検査基準画像301と検査対象画像302との差分を算出し、検査を行う。検査部205は、検査基準画像301と検査対象画像302との差分が大きい部位について欠陥と判定する。 The inspection unit 205 calculates the difference between the inspection reference image 301 and the inspection target image 302 after alignment by the alignment processing unit 204, and performs the inspection. The inspection unit 205 determines that a portion where the difference between the inspection reference image 301 and the inspection target image 302 is large is defective.

<装置の動作>
図3は、画像処理装置100の処理を説明するフローチャートである。図3(a)は装置全体の処理の流れを示すフローチャートである。図3(b)は媒体端部推定処理(S1040)の詳細を示すフローチャートである。図3(c)は位置合わせ処理(S1050)の詳細を示すフローチャートである。
<Device Operation>
3A and 3B are flow charts for explaining the processing of the image processing device 100. Fig. 3A is a flow chart showing the flow of processing of the entire device. Fig. 3B is a flow chart showing details of the medium edge estimation processing (S1040). Fig. 3C is a flow chart showing details of the registration processing (S1050).

S1010では、画像処理部201は、画像読取装置105を制御して搬送路110上の印刷媒体を読み取り画像データとして取得する。S1010において読み取られた画像データは検査基準画像301としてRAM103に保持され、以後の処理で用いられる。 In S1010, the image processing unit 201 controls the image reading device 105 to read the print medium on the transport path 110 and obtain image data. The image data read in S1010 is stored in the RAM 103 as the inspection reference image 301 and is used in subsequent processing.

図4は、検査基準画像301の例を示す図である。検査基準画像301は背景領域303(黒で示した領域)と印刷媒体領域304(黒以外の領域)から構成される。印刷媒体領域304には、所与の画像が画像形成された領域である絵柄領域305が含まれる。頂点308a~308dは印刷媒体の頂点である。背景領域303は、スキャン時に印刷媒体304の背景となっている搬送路110が映り込んだ領域である。 Figure 4 is a diagram showing an example of an inspection reference image 301. The inspection reference image 301 is composed of a background area 303 (area shown in black) and a print medium area 304 (area other than black). The print medium area 304 includes a picture area 305, which is an area in which a given image is formed. Vertices 308a to 308d are vertices of the print medium. The background area 303 is an area in which the transport path 110, which forms the background of the print medium 304 when scanned, is reflected.

S1020では、画像処理部201は、画像読取装置105を制御して搬送路110上の印刷媒体を読み取り画像データとして取得する。S1020において読み取られた画像データは検査対象画像302としてRAM103に保持され、以後の処理で用いられる。検査対象画像302は、検査基準画像301と同様に、背景領域303と印刷媒体領域304から構成される。 In S1020, the image processing unit 201 controls the image reading device 105 to read the print medium on the transport path 110 and obtain image data. The image data read in S1020 is stored in the RAM 103 as the inspection target image 302, and is used in subsequent processing. The inspection target image 302 is composed of a background area 303 and a print medium area 304, similar to the inspection reference image 301.

S1030では、はみ出し検出部202は、検査基準画像301および検査対象画像302それぞれに対して、画像中に印刷媒体の領域全体が含まれているか否かの検出を行う。すなわち、画像において印刷媒体のはみ出しがあるか否かを判定する。このはみ出し検出処理については、以下のように行う。はみ出し検出部202は、まず画像を二値化した後に、白と黒の境界となる画素を追跡する。はみ出し検出部202は、この画素追跡の過程で、画像の上下左右の端のいずれかに接触した場合には、画像において印刷媒体のはみ出しがあったと判定する。はみ出し検出部202は、画素追跡の結果、画像の上下左右の端のいずれにも接触せず、追跡を終えた場合には、はみ出しがなかったと判定する。 In S1030, the overflow detection unit 202 detects whether the entire area of the print medium is included in each of the inspection reference image 301 and the inspection target image 302. In other words, it determines whether there is overflow of the print medium in the image. This overflow detection process is performed as follows. The overflow detection unit 202 first binarizes the image and then tracks the pixels that are the boundary between white and black. If the overflow detection unit 202 comes into contact with any of the top, bottom, left, or right edges of the image during this pixel tracking process, it determines that there is overflow of the print medium in the image. If the overflow detection unit 202 finishes tracking without coming into contact with any of the top, bottom, left, or right edges of the image as a result of pixel tracking, it determines that there is no overflow.

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 vertices 308a to 308d that make up the print medium area 304 from the inspection target image 302. This detection process is performed as follows. The medium edge estimation unit 203 first binarizes the inspection target image 302, then tracks the pixels that form the boundaries between black and white, and linearly approximates each side. This estimates four straight lines that form the outline of the print medium area 304. Next, the medium edge determination unit 202 calculates the intersections of the four straight lines. The four intersections calculated at this time are called vertices 308a to 308d.

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 rectangular areas 313 within a few pixels from both the left and right ends of the inspection target image 302 with the background color, generating an image 314 (Figure 6 (b)).

次に媒体端部検出部203は、画像303を二値化し、白と黒の境界となる画素を追跡する。媒体端部検出部203は、この軌跡から仮頂点310を検出する。画像314は両端を背景色で塗りつぶした画像であるため、追跡処理は必ず成功し、少なくとも4つの仮頂点が検出されることになる。そして、5点以上の頂点が検出された場合には、なす角が略直角であるものを4つ選択して有効な仮頂点とする。 Next, the medium end detection unit 203 binarizes the image 303 and tracks the pixels that form the boundary between black and white. The medium end detection unit 203 detects the tentative vertices 310 from this trajectory. Since image 314 is an image in which both ends are filled with the background color, the tracking process is always successful and at least four tentative vertices are detected. Then, if five or more vertices are detected, four that form approximately right angles are selected as valid tentative vertices.

図6(b)の例では5つの仮頂点310a~310eが検出されているが、仮頂点310cについては、なす角が略直角ではないため、媒体端部検出203はこれを除外して、残る4つを有効な仮頂点とする。 In the example of FIG. 6(b), five tentative vertices 310a to 310e are detected, but because the angle formed by tentative vertex 310c is not a substantially right angle, media end detection 203 excludes it and determines the remaining four as valid tentative vertices.

次に媒体端部検出部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 rectangular area 313 as clearly observable vertices. In the example of FIG. 6(b), of the four tentative vertices excluding tentative vertex 310c, only tentative vertex 310b is not in contact with the rectangular area 313. Therefore, the number of observable vertices is calculated to be "1".

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 straight lines 311a and 311b that form the upper and lower sides of the print medium area 304 from the inspection target image 302.

媒体端部推定部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 line 311a or 311b. Then, it estimates the coordinates on either line 311a or 311b that are the paper width W away from the already detected vertex 308 as the next vertex 308. Note that the paper width W is assumed to be known by notification from the printing device 190 or user input via the UI panel 108. The medium edge estimation unit 203 performs this process for all vertices 308 detected in S1540.

媒体端部推定部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 straight lines 312a, 312b that pass through the vertices 308 estimated in the process up to this point in S1550 and are perpendicular to the straight lines 311a, 311b. The medium end estimation unit 203 estimates the intersection of the straight lines 311a, 311b and the straight lines 312a, 312b that has not been detected or estimated so far as the next vertex 308.

図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 vertex 308b exists on line 311a. Based on this information, the medium end estimation unit 203 estimates the coordinate on line 311a that is the paper width W away from vertex 308b of the print medium as vertex 308a of the print medium. At this stage, since the sum of the estimated vertex 308 and the vertex 308 detected in S1540 is less than "4", the medium end estimation unit 203 estimates lines 312a and 312b. The medium end estimation unit 203 determines the intersections of lines 312a and 312b with line 311b as vertices 308d and 308c of the print medium, respectively.

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 straight lines 311a and 311b that form the upper and lower sides of the print medium area 304 from the inspection target image 302.

次に媒体端部推定部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 first vertex 308a on the straight line 311a from the length L of the image reading unit 105 and the paper width W. The length L of the image reading unit 105 is known and is stored in, for example, the ROM 103. More specifically, the coordinates on the straight line 311a that are a distance (W-L)/2 away from the left end of the inspection target image 302 are estimated as the vertex 308a. Similarly, for the vertex 308b, the coordinates on the straight line 311a that are a distance (W-L)/2 away from the right end of the inspection target image 302 are set. The medium edge estimation unit 203 estimates straight lines 312a and 312b that pass through the vertices 308a and 308b and are perpendicular to the straight line 311a, and sets the intersections of the straight lines 311b and 312a and 312b as the vertices 308d and 308c, respectively.

S1050では、位置合わせ部204は、絵柄領域305に基づき、検査基準画像301と検査対象画像302の位置合わせを行う。通常、媒体と媒体上に印刷された絵柄との位置関係は、印刷装置の媒体搬送ずれや印刷位置ずれに由来して印刷ごとにわずかに変動する。本ステップでは、まず媒体の四隅で位置合わせをしたのち、位置合わせ基準点に基づいて絵柄による位置合わせを行う。図3(c)のフローチャートを参照して、位置合わせ処理の詳細について説明する。また、図9は、位置合わせ処理(S1050)の概要を例示的に説明する図である。 In S1050, the alignment unit 204 aligns the inspection reference image 301 and the inspection target image 302 based on the image area 305. Usually, the positional relationship between the medium and the image printed on the medium varies slightly for each print due to misalignment of the medium transport or printing position of the printing device. In this step, alignment is first performed at the four corners of the medium, and then alignment is performed using the image based on the alignment reference points. Details of the alignment process will be described with reference to the flowchart in FIG. 3(c). FIG. 9 is an exemplary diagram for explaining an overview of the alignment process (S1050).

図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 inspection reference image 301 and an inspection target image 302. In particular, the pattern area 305, alignment reference points 307a to 307c, and vertices 308a to 308d in each image are shown.

位置合わせ基準点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 picture area 305 in both the inspection reference image 301 and the inspection target image 302. Here, three alignment reference points 307 are set. For example, the alignment reference point 307a in the inspection reference image 301 and the alignment reference point 307a in the inspection target image 302 have different coordinates in each image, but represent the same part of the picture. The same is true for the alignment reference points 307b and 307c.

ここでは、位置合わせ基準点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 alignment reference points 307a to 307c are determined in advance for the image to be printed by the printing device. The alignment reference points 307a to 307c may be set manually by the user while looking at the image, or may be set automatically using image features such as SIFT and SURF. At this time, the alignment unit 204 sets templates 313a to 313c consisting of partial images of a specified size centered on each of the alignment reference points 307a to 307c for the alignment reference points 307a to 307c in the inspection reference image 301. Here, a region of "32 x 32 pixels" is set for the size of the templates 313a to 313c. (b-1) in Figure 9 shows the relationship between the templates 313a to 313c and other components.

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 alignment unit 204 aligns the print medium area 304 with the inspection reference image 301 and the inspection target image 302. The alignment processing unit 204 obtains the displacement amount X of the print medium area 304 from the inspection reference image 301 to the inspection target image 302 from the vertices 308a to 308d of the inspection reference image 301 and the inspection target image 302 detected in S1030. The displacement amount X is expressed, for example, as in formula (1). Note that here, the coordinates of the vertex 308a in the inspection reference image 301 are expressed as (x1a, y1a), and the coordinates in the inspection target image 302 are expressed as (x2a, y2a). Similarly, the coordinates of the vertex 308b in the inspection reference image 301 are expressed as (x1b, y1b), and the coordinates in the inspection target image 302 are expressed as (x2b, y2b).

Figure 0007557962000001
Figure 0007557962000001

数式(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 inspection reference image 301 with the coordinates of the inspection target image 302, with respect to the vertex 308. The transformation matrix X represents a displacement amount resulting from a combination of translation, rotation, enlargement/reduction, and shear. The alignment unit 204 calculates the transformation matrix X by multiplying the inverse matrix of matrix A in formula (1) from the right of matrix B. Note that matrices A and B in formula (1) are not square matrices, so the alignment unit 204 finds the Moore-Penrose pseudo-inverse matrix for matrix A to calculate the transformation matrix X.

S1820では、位置合わせ部204は、検査対象画像302に対して、探索範囲を設定する。図9の(b-2)は検査対象画像302と探索範囲314の関係を示している。探索範囲314は、この後のS1830において行うテンプレートマッチングで用いられる。 In S1820, the alignment unit 204 sets a search range for the inspection target image 302. (b-2) in FIG. 9 shows the relationship between the inspection target image 302 and the search range 314. The search range 314 is used in the template matching performed later in S1830.

位置合わせ部204は、検査対象画像302中に対応するテンプレート313a~313cを包含する探索範囲314a~314cを設定する必要がある。そのため、位置合わせ部204は、探索範囲314a~314cの領域に関して、例えば「64×64画素」などのように、テンプレート313a~313cの大きさよりも十分大きい領域を設定する。 The alignment unit 204 needs to set search ranges 314a to 314c that include the corresponding templates 313a to 313c in the inspection target image 302. Therefore, the alignment unit 204 sets the search ranges 314a to 314c to an area that is sufficiently larger than the size of the templates 313a to 313c, such as "64 x 64 pixels."

また、位置合わせ部204は、数式(2)によって探索範囲314a~314cの位置を算出する。なお、ここでは、検査基準画像301における位置合わせ基準点307aの座標を(u1a,v1a)、位置合わせ基準点307bの座標を(u1b,v1b)、位置合わせ基準点307cの座標を(u1c,v1c)としている。 The alignment unit 204 also calculates the positions of the search ranges 314a to 314c using formula (2). Note that here, the coordinates of the alignment reference point 307a in the inspection reference image 301 are (u1a, v1a), the coordinates of the alignment reference point 307b are (u1b, v1b), and the coordinates of the alignment reference point 307c are (u1c, v1c).

Figure 0007557962000002
Figure 0007557962000002

位置合わせ部204は、数式(2)の行列P’に関して、探索領域314aの中心座標に(u2a0,v2a0)を設定する。同様に、探索領域314bの中心座標に(u2b0,v2b0)、探索領域314cの中心座標に(u2c0,v2c0)を設定する。また、Xは数式(1)で算出される変換行列である。すなわち、行列P’は、変換行列Xにより行列Pを座標変換したものである。 Regarding matrix P' in formula (2), the alignment unit 204 sets the center coordinates of search area 314a to (u2a0, v2a0). Similarly, it sets the center coordinates of search area 314b to (u2b0, v2b0) and the center coordinates of search area 314c to (u2c0, v2c0). Furthermore, X is the transformation matrix calculated by formula (1). In other words, matrix P' is obtained by performing coordinate transformation on matrix P using transformation matrix X.

S1830では、位置合わせ部204は、テンプレートマッチングを行い、検査対象画像302における位置合わせ基準点307a~307cを検出する。テンプレートマッチングは探索領域314中の各画素に対してテンプレート313の類似度を算出し、類似度が最も高い位置を求める方法であるが、公知の技術であるため、詳細な説明は省略する。 In S1830, the alignment unit 204 performs template matching to detect alignment reference points 307a to 307c in the inspection target image 302. Template matching is a method of calculating the similarity of the template 313 for each pixel in the search area 314 and determining the position with the highest similarity, but since this is a well-known technique, a detailed description will be omitted.

これにより、位置合わせ処理部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 alignment processing unit 204 obtains the coordinates of alignment reference points 307a to 307c for the inspection reference image 301 and the inspection target image 302, respectively. Here, the coordinates of alignment reference point 307a in the inspection reference image 301 are expressed as (x1a, y1a), and the coordinates in the inspection target image 302 are expressed as (x2a, y2a). Similarly, the coordinates of alignment reference point 307b in the inspection reference image 301 are expressed as (x1b, y1b), and the coordinates in the inspection target image 302 are expressed as (x2b, y2b). Similarly, the coordinates of alignment reference point 307c in the inspection reference image 301 are expressed as (x1c, y1c), and the coordinates in the inspection target image 302 are expressed as (x2c, y2c).

S1840では、位置合わせ部204は、数式(3)によって表される、検査基準画像301から検査対象画像302への絵柄領域305の変位量X’を求める。数式(3)におけるX’はアフィン変換の変換行列である。つまりX’は、位置合わせ基準点307を基準としたとき、検査基準画像301から検査対象画像302への平行移動、回転、拡大縮小、せん断を合成した変位量を表す。 In S1840, the alignment unit 204 obtains the displacement X' of the pattern area 305 from the inspection reference image 301 to the inspection target image 302, which is expressed by formula (3). X' in formula (3) is the transformation matrix of the affine transformation. In other words, X' represents the displacement amount resulting from a combination of translation, rotation, enlargement/reduction, and shear from the inspection reference image 301 to the inspection target image 302, when the alignment reference point 307 is used as a reference point.

Figure 0007557962000003
Figure 0007557962000003

次に位置合わせ部204は、検査基準画像301中の印刷媒体領域304を構成する各画素に対して、算出した変換行列X’を適用して、変換画像309を生成する。図9の(c)は、位置合わせ処理によって、検査基準画像301をX’で変換した変換画像309と、検査対象画像302が位置合わせされた様子を示している。すなわち、変換画像309と検査対象画像302の位置合わせ基準点307a~307cの位置が一致している状態である。 The alignment unit 204 then applies the calculated transformation matrix X' to each pixel constituting the print medium area 304 in the inspection reference image 301 to generate a transformed image 309. (c) of FIG. 9 shows how the transformed image 309, which is the result of transforming the inspection reference image 301 with X', is aligned with the inspection target image 302 through the alignment process. In other words, the positions of the alignment reference points 307a to 307c of the transformed image 309 and the inspection target image 302 match.

S1060では、検査部205は、S1050において位置合わせ処理を行った後の変換画像309と検査対象画像302に含まれる印刷媒体領域304の各画素について、両画像間の差分を算出する。検査部205は算出された差分のうち、しきい値よりも大きい画素を欠陥画素と判定する。 In S1060, the inspection unit 205 calculates the difference between the converted image 309 after the alignment process in S1050 and the inspection target image 302 for each pixel of the print medium area 304. The inspection unit 205 determines that any pixel in the calculated difference that is greater than a threshold value is a defective pixel.

S1060において欠陥画素が検出された場合には、検査部205は、検査不合格と判定する。このとき、CPU101は、当該印刷媒体を出力トレー112に出力する制御を行う。検査部205は、欠陥画素が検出されなかった場合には、検査合格と判定する。このとき、CPU101は、当該印刷媒体を出力トレー111に出力する制御を行う。 If a defective pixel is detected in S1060, the inspection unit 205 determines that the inspection has failed. At this time, the CPU 101 performs control to output the print medium to the output tray 112. If no defective pixel is detected, the inspection unit 205 determines that the inspection has passed. At this time, the CPU 101 performs control to output the print medium to the output tray 111.

S1070では、画像処理部201は、同じ画像が表面に形成された印刷媒体がさらに印刷出力されている場合には、S1020に戻り、処理を継続する。そうでない場合には処理を終了する。 In S1070, if more print media with the same image formed on the surface have been printed out, the image processing unit 201 returns to S1020 and continues processing. If not, the processing ends.

以上説明したとおり第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 image reading device 105 at the first time point is used as the inspection reference image 301. However, the inspection reference image 301 may be an image without defects, and the method of acquiring the inspection reference image 301 is not limited to this. For example, the present invention is also applicable to a case where the inspection reference image 301 acquired by another reading device is used. For example, the inspection reference image 301 may be read by a reading device (not shown) different from the image reading device 105, and the inspection reference image 301 may be stored in an auxiliary storage device (not shown). In this case, the image acquisition unit 201 in S1010 acquires the inspection reference image 301 from the auxiliary storage device 107 instead of the image reading device 105.

また上述の説明では、S1020において、画像読取装置105が第二の時点以降に取得した画像を検査対象画像302とする場合について説明した。しかし、検査対象画像302の取得方法はこれに限らない。例えば、別の読取装置で取得した検査対象画像302を用いる場合にも適用可能である。例えば、画像読取装置105とは異なる読取装置(不図示)で検査対象画像302を読み取り、補助記憶装置(不図示)に検査対象画像302を保存してもよい。この場合、S1020の画像取得部201は、画像読取装置105に替えて、補助記憶装置107から検査対象画像302を取得する。 In the above description, the image acquired by the image reading device 105 after the second time point is set as the inspection target image 302 in S1020. However, the method of acquiring the inspection target image 302 is not limited to this. For example, it is also applicable to the case where the inspection target image 302 acquired by another reading device is used. For example, the inspection target image 302 may be read by a reading device (not shown) different from the image reading device 105, and the inspection target image 302 may be stored in an auxiliary storage device (not shown). In this case, the image acquisition unit 201 in S1020 acquires the inspection target image 302 from the auxiliary storage device 107 instead of the image reading device 105.

更に上述の説明では、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 inspection reference image 301 is transformed by the transformation matrix X' to generate the transformed image 309. Alternatively, the inspection target image 302 may be transformed by the transformation matrix Y to generate the transformed image 311. Here, the transformation matrix Y is expressed by the formula (4). The matrices A and B in the formula (4) are the same as those in the formula (3). In this case, in S1070, the inspection processing unit 205 calculates the difference between the inspection reference image 301 and the transformed image 311.

Figure 0007557962000004
Figure 0007557962000004

また、S1030~S1040の処理に関して、検査対象画像302に替えて検査基準画像301に適用してもよい。 The processes in steps S1030 to S1040 may also be applied to the inspection reference image 301 instead of the inspection target image 302.

更に、画像取得部は、搬送路110上の印刷媒体を画像として読み取り、画像処理装置に入力できるものであれば、いかなるものでもよい。また、読み取る画像においても、RGBカラー画像、グレイスケール画像、白黒画像など、いかなる種類の画像でもよい。 Furthermore, the image acquisition unit may be any type that can read the print medium on the transport path 110 as an image and input it to the image processing device. Furthermore, the image to be read may be any type of image, such as an RGB color image, a grayscale image, or a black and white image.

(第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 image processing device 100 according to the second embodiment is the same as that of the first embodiment (FIGS. 1 and 2), and therefore a description thereof will be omitted. The operation of the image processing device 100 is also substantially the same as that of the first embodiment (FIG. 3) shown in FIG. 3. In the following, the alignment process (S1050) will be described with a focus on the parts (S1820) that are different from the first embodiment, and a description of the similar parts will be omitted.

S1820では、位置合わせ部204は、検査対象画像302に対して探索範囲を設定する。ただし、第1実施形態においては、探索範囲314a~314cの大きさを所与の大きさ(例えば「64×64画素」)としていたが、第2実施形態においては、探索範囲314a~314cの大きさを適応的に決定する。 In S1820, the alignment unit 204 sets a search range for the inspection target image 302. However, while in the first embodiment the size of the search ranges 314a to 314c was set to a given size (e.g., "64 x 64 pixels"), in the second embodiment the size of the search ranges 314a to 314c is adaptively determined.

具体的には、位置合わせ部204は、探索範囲314a~314cの大きさを、印刷装置190の印刷位置誤差および頂点308の推定方法に基づいて決定する。 Specifically, the alignment unit 204 determines the size of the search ranges 314a to 314c based on the printing position error of the printing device 190 and the method for estimating the vertices 308.

印刷装置190の印刷位置誤差とは、印刷装置190が印刷媒体に画像を印刷する画像形成位置の変動量の最大値を表す。印刷位置誤差の値をLeとし、Leは検査対象画像302の解像度における画素数である。 The printing position error of the printing device 190 represents the maximum amount of variation in the image formation position where the printing device 190 prints an image on a printing medium. The value of the printing position error is Le, where Le is the number of pixels at the resolution of the inspection target image 302.

頂点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 inspection target image 302 are detected, so the accuracy of the coordinates of the vertices 308 is high. On the other hand, in S1550, the positions of vertices that are not clearly observed in the inspection target image 302 are estimated, so the accuracy of the coordinates of the vertices 308 is relatively low. For this reason, the alignment unit 204 controls the size of the search range 314 according to the attributes of the four vertices.

位置合わせ部204は、数式(5)によって、探索範囲314の大きさSを定める。Tはテンプレート313の大きさを表す。Rは頂点308の推定方法に応じて定める係数である。 The alignment unit 204 determines the size S of the search range 314 using formula (5). T represents the size of the template 313. R is a coefficient determined according to the estimation method of the vertices 308.

Figure 0007557962000005
Figure 0007557962000005

図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 search range 314a. The alignment unit 204 determines the distances da to dd between the alignment reference point 307a corresponding to the target search range 314a and the four vertices 308. In Figure 10, the vertices 308 detected in S1540 are indicated by black circles, and the vertices 308 estimated in S1550 are indicated by white circles. That is, in the example of Figure 10, only the vertex 308b is detected in S1540, and the remaining three points are estimated in S1550.

位置合わせ部204は、数式(6)によって係数Rを定める。数式(6)におけるR1は、S1540で検出された頂点308における係数(ここでは「1.0」)である。また、R2はS1550で推定された頂点308における係数(ここでは「1.5」)である。 The alignment unit 204 determines the coefficient R according to formula (6). In formula (6), R1 is the coefficient (here, "1.0") at the vertex 308 detected in S1540. Also, R2 is the coefficient (here, "1.5") at the vertex 308 estimated in S1550.

Figure 0007557962000006
Figure 0007557962000006

すなわち、位置合わせ部204は数式(5)及び数式(6)に基づき、4つの頂点308それぞれと位置合わせ基準点307との距離に応じて、探索範囲314の大きさSを変更する。 In other words, the alignment unit 204 changes the size S of the search range 314 according to the distance between each of the four vertices 308 and the alignment reference point 307 based on formulas (5) and (6).

上述したように、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 search range 314 is reduced by multiplying the alignment reference point 307 close to it by a small R1. On the other hand, the vertex estimated in S1550 has a relatively low degree of certainty, so the search range 314 is increased by multiplying the alignment reference point 307 close to it by a large R1.

なお、S1820において、位置合わせ部204は、Sの算出に媒体断裁誤差Ceを加えてもよい。ここで、媒体断裁誤差Ceは、印刷媒体の製造工程において断裁時に生じるサイズばらつきの最大値である。このとき、数式(5)に替えて数式(7)を用いる。 In addition, in S1820, the alignment unit 204 may add the medium cutting error Ce to the calculation of S. Here, the medium cutting error Ce is the maximum value of the size variation that occurs when cutting in the manufacturing process of the print medium. In this case, formula (7) is used instead of formula (5).

Figure 0007557962000007
Figure 0007557962000007

以上説明したとおり第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 overhang detection unit 202, the medium edge estimation unit 203, the alignment unit 204, the inspection unit 205, etc. may be processed using a trained model that has been machine-learned instead. In that case, for example, a plurality of combinations of input data and output data to the processing unit are prepared as training data, knowledge is acquired from them by machine learning, and a trained model that outputs output data for the input data as a result based on the acquired knowledge is generated. The trained model can be configured, for example, as a neural network model. Then, the trained model operates in cooperation with a CPU or a GPU as a program for performing the same processing as the processing unit, thereby performing the processing of the processing unit. The trained model may be updated after a certain amount of processing as necessary.

本発明は、上述の実施形態の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)

印刷装置により所与の画像が表面に形成された第1の媒体を読み取ることにより得られる基準画像を取得する第1の取得手段と、
前記印刷装置により前記所与の画像が表面に形成された第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の媒体の4つの頂点の座標と、前記対象画像における前記第2の媒体の少なくとも4つの頂点の座標と、を決定する
ことを特徴とする請求項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:
前記第1の決定手段は、前記基準画像における前記第1の媒体の4つの頂点のうち前記基準画像に含まれる頂点の座標を前記基準画像からの検出により決定し、
前記第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.
前記第1の決定手段は、前記第1の判定手段により前記基準画像に前記第1の媒体の領域全体が含まれていないと判定され、かつ、前記基準画像に前記第1の媒体の4つの頂点が含まれていない場合に、前記第1の媒体の幅と前記基準画像を読み取った読取部の長さとに基づいて、前記第1の媒体の4つの頂点の座標を推定により決定し、
前記第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.
前記第1位置合わせ手段は、前記基準画像における4つの頂点と前記対象画像における4つの頂点とに基づいて前記基準画像の座標と前記対象画像の座標とを対応付ける変換行列を算出し、該変換行列に基づき前記基準画像および前記対象画像を座標変換し、
前記第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.
印刷装置により所与の画像が表面に形成された第1の媒体を読み取ることにより得られる基準画像を取得する第1の取得手段と、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;
前記印刷装置により前記所与の画像が表面に形成された第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:
印刷装置により所与の画像が表面に形成された第1の媒体を読み取ることにより得られる基準画像を取得する第1の取得手段と、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;
前記印刷装置により前記所与の画像が表面に形成された第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:
媒体上に形成された画像を検査する画像処理装置の制御方法であって、A method for controlling an image processing device that inspects an image formed on a medium, comprising the steps of:
印刷装置により所与の画像が表面に形成された第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:
媒体上に形成された画像を検査する画像処理装置の制御方法であって、A method for controlling an image processing device that inspects an image formed on a medium, comprising the steps of:
印刷装置により所与の画像が表面に形成された第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:
請求項9乃至11の何れか1項に記載の制御方法をコンピュータに実行させるためのプログラム。 A program for causing a computer to execute the control method according to any one of claims 9 to 11 .
JP2020088320A 2020-05-20 2020-05-20 Image processing device and control method thereof Active JP7557962B2 (en)

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)

* Cited by examiner, † Cited by third party
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

Patent Citations (2)

* Cited by examiner, † Cited by third party
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