JP2016099771A - Image processor and pattern matching method - Google Patents

Image processor and pattern matching method Download PDF

Info

Publication number
JP2016099771A
JP2016099771A JP2014235580A JP2014235580A JP2016099771A JP 2016099771 A JP2016099771 A JP 2016099771A JP 2014235580 A JP2014235580 A JP 2014235580A JP 2014235580 A JP2014235580 A JP 2014235580A JP 2016099771 A JP2016099771 A JP 2016099771A
Authority
JP
Japan
Prior art keywords
area
divided
image
search
template image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2014235580A
Other languages
Japanese (ja)
Inventor
悟史 多田
Satoshi Tada
悟史 多田
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 JP2014235580A priority Critical patent/JP2016099771A/en
Publication of JP2016099771A publication Critical patent/JP2016099771A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To enable reduction of a processing load for searching for a template image in pattern matching.SOLUTION: An image processor for imaging an object having a detection pattern during movement of the object to acquire movement information of the object includes search parts (903 to 907) and a movement information acquisition part (908). The search part searches for a template image including the detection pattern to be extracted from image data of the object picked up in advance in image data of the object picked up later, specifies a division area smaller than a search area by detecting brightness of the search area in the image data of the object picked up later, and searches for a template image in the division area. The movement information acquisition part acquires the movement information of the object on the basis of a positional relation between the searched template image and a template image extracted from the image data of the object picked up in advance.SELECTED DRAWING: Figure 8

Description

本発明は、画像処理装置およびパターンマッチング方法に関し、詳しくは、記録媒体などの物体における検知パターンの移動をパターンマッチングによって検出することにより物体の移動量などを求める技術に関するものである。   The present invention relates to an image processing apparatus and a pattern matching method, and more particularly to a technique for obtaining a movement amount of an object by detecting movement of a detection pattern in an object such as a recording medium by pattern matching.

特許文献1には、記録紙などの記録媒体あるいはこれを搬送する搬送ベルトにおける検知パターンを、イメージセンサ等の撮像素子を用いて異なるタイミングで撮像し、その結果に基づいて記録媒体あるいは搬送ベルトの移動量を算出することが記載されている。具体的には、あるタイミングで撮像した画像データの中から検知パターンを含むテンプレート画像を抽出する。そして、そのテンプレート画像が、次のタイミングの撮像画像のどこに存在するかをパターンマッチング技術によってサーチし、2つのタイミングの間のテンプレート画像の移動距離を求めるものである。   In Patent Document 1, a detection pattern on a recording medium such as recording paper or a conveyance belt that conveys the recording pattern is imaged at different timings using an image sensor such as an image sensor, and the recording medium or the conveyance belt is detected based on the result. It describes that the amount of movement is calculated. Specifically, a template image including a detection pattern is extracted from image data captured at a certain timing. Then, the position where the template image exists in the captured image at the next timing is searched by the pattern matching technique, and the movement distance of the template image between the two timings is obtained.

特開2011−93680号公報JP 2011-93680 A 特開平10−63842号公報JP-A-10-63842

しかし、特許文献1に示される例では、撮像画像においてテンプレート画像との相関が高い画像をサーチする際に、サーチ領域においてテンプレート画像との相関を求める領域を画素単位で移動させ、その移動ごとに相関を求めることから、そのための処理負荷が大きくなるという問題がある。   However, in the example shown in Patent Document 1, when searching for an image having a high correlation with the template image in the captured image, the area for obtaining the correlation with the template image is moved in the search area in units of pixels, and for each movement. Since the correlation is obtained, there is a problem that a processing load for that is increased.

これに対して、特許文献2には、撮像した画像におけるテンプレート画像(対象画像)の重心位置を求め、その重心位置に基づいてサーチ範囲を限定しサーチのための負荷を低減する技術が記載されている。しかしながら、特許文献2では、テンプレート画像(対象画像)が移動しないことを前提とするものであり、それによって逆にサーチ領域を限定することを可能にしている。すなわち、特許文献1のように、テンプレート画像が移動する場合には、移動前の重心位置によって、移動後のテンプレート画像のサーチ範囲を限定することができないことは明らかである。また、重心位置を求める処理は、そのための回路や処理時間が比較的多大なものとなるという問題もある。   On the other hand, Patent Document 2 describes a technique for obtaining a centroid position of a template image (target image) in a captured image, limiting a search range based on the centroid position, and reducing a search load. ing. However, Patent Document 2 is based on the premise that the template image (target image) does not move, thereby allowing the search area to be limited. That is, as in Patent Document 1, when the template image moves, it is clear that the search range of the template image after the movement cannot be limited by the position of the center of gravity before the movement. In addition, the processing for obtaining the position of the center of gravity has a problem that a circuit and processing time for the processing are relatively long.

本発明は、テンプレート画像をサーチするための処理負荷を低減することを可能とする画像処理装置およびパターンマッチング方法を提供することを目的とする。   An object of the present invention is to provide an image processing apparatus and a pattern matching method that can reduce the processing load for searching for a template image.

そのために本発明では、検知パターンを有した物体を当該物体の移動の間に撮像して前記物体の移動情報を求める画像処理装置であって、先に撮像した物体の画像データから抽出される、検知パターンを含むテンプレート画像を、後に撮像した物体の画像データにおいてサーチする手段であって、後に撮像した物体の画像データにおけるサーチエリアの明度を検出することによって当該サーチエリアより小さな分割エリアを特定し、前記分割エリアにおいて前記テンプレート画像をサーチするサーチ手段と、前記サーチしたテンプレート画像と、前記先に撮像した物体の画像データから抽出されるテンプレート画像と、の位置関係に基づいて、前記物体に移動情報を求める移動情報取得手段と、を具えたことを特徴とする。   Therefore, in the present invention, an image processing apparatus that obtains movement information of an object by imaging an object having a detection pattern during the movement of the object, and is extracted from the image data of the object that has been previously captured. A means for searching a template image including a detection pattern in image data of an object picked up later, and by identifying the brightness of the search area in the image data of an object picked up later, a divided area smaller than the search area is specified. , Moving to the object based on a positional relationship between search means for searching the template image in the divided area, the searched template image, and a template image extracted from the image data of the previously captured object. It is characterized by comprising movement information acquisition means for obtaining information.

以上の構成によれば、パターンマッチングにおいて、テンプレート画像をサーチするための処理負荷を低減することが可能となる。   According to the above configuration, it is possible to reduce a processing load for searching for a template image in pattern matching.

本発明の一実施形態に係る記録装置の概略構成を示す外観斜視図である。1 is an external perspective view showing a schematic configuration of a recording apparatus according to an embodiment of the present invention. (a)および(b)は、図1に示した記録部の詳細な構成を示す図である。(A) And (b) is a figure which shows the detailed structure of the recording part shown in FIG. (a)および(b)は、図2に示したセンサユニットの詳細構成を示す図である。(A) And (b) is a figure which shows the detailed structure of the sensor unit shown in FIG. (a)および(b)は、イメージセンサで撮像された画像データに基づいて記録媒体(シート)の移動量を検出するための、本発明の一実施形態に係る基本的な処理を説明する図である。(A) And (b) is a figure explaining the basic process which concerns on one Embodiment of this invention for detecting the moving amount | distance of a recording medium (sheet | seat) based on the image data imaged with the image sensor. It is. (a)および(b)は、従来のパターンマッチングを説明する図である。(A) And (b) is a figure explaining the conventional pattern matching. 従来のテンプレート画像のサーチ方法を説明する図である。It is a figure explaining the search method of the conventional template image. 本発明の一実施形態に係るパターンマッチング処理を説明する図である。It is a figure explaining the pattern matching process which concerns on one Embodiment of this invention. 本発明の一実施形態に係る分割エリア間で明度を比較する処理のための構成を示すブロック図である。It is a block diagram which shows the structure for the process which compares the brightness between the divided areas which concern on one Embodiment of this invention. 本発明の一実施形態に係る、移動量算出部で求める画素位置に対する相関値の関係の例を示すグラフである。It is a graph which shows the example of the relationship of the correlation value with respect to the pixel position calculated | required in the movement amount calculation part based on one Embodiment of this invention. 本発明の一実施形態に係る、複数の分割エリアにまたがってサーチエリアを設定する処理を説明する図である。It is a figure explaining the process which sets a search area over several division areas based on one Embodiment of this invention. 以上説明した本発明の一実施形態に係る移動量を算出するまでの処理を示すフローチャートである。It is a flowchart which shows the process until it calculates the movement amount which concerns on one Embodiment of this invention demonstrated above.

以下、図面を参照して本発明の実施形態を詳細に説明する。
図1は、本発明の一実施形態に係る記録装置の概略構成を示す外観斜視図である。本実施形態の記録装置は、概略、記録部1、シート供給部2、シート巻取部3、制御部6を備えたものである。シート供給部2は、ロール状に巻かれたロールシート4を保持するとともに、記録媒体としての連続シート8をロールから引き出しながら記録部1に供給する。記録部1は、図2にて後述するように連続シート8に対して画像を記録する。記録されたシート8は、シート巻取部3にてロールシート5として巻き取られる。制御部6は、コントローラ、メモリ、各種1/Oインターフェースを有し、記録装置全体の制御を司る。制御部6は、図11にて後述される本発明の実施形態に係る処理を実行するものであり、記録装置自体に内蔵されていてもよいし、記録装置に接続される外部のホストコンピュータであってもよい。本明細書では、このように図11にて後述される本発明の実施形態に係る処理を実行する装置を、記録装置やホストコンピュータなどの装置を含んで「画像処理装置」という。また、本明細書では、シート搬送経路の任意の位置において、シート供給部2に近い側を「上流側」、遠い側を「下流側」という。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
FIG. 1 is an external perspective view showing a schematic configuration of a recording apparatus according to an embodiment of the present invention. The recording apparatus according to the present embodiment generally includes a recording unit 1, a sheet supply unit 2, a sheet winding unit 3, and a control unit 6. The sheet supply unit 2 holds the roll sheet 4 wound in a roll shape and supplies the continuous sheet 8 as a recording medium to the recording unit 1 while pulling it out from the roll. The recording unit 1 records an image on the continuous sheet 8 as will be described later with reference to FIG. The recorded sheet 8 is wound up as a roll sheet 5 by the sheet winding unit 3. The control unit 6 includes a controller, a memory, and various 1 / O interfaces, and controls the entire recording apparatus. The control unit 6 executes processing according to the embodiment of the present invention, which will be described later with reference to FIG. 11, and may be built in the recording apparatus itself or may be an external host computer connected to the recording apparatus. There may be. In this specification, an apparatus for executing processing according to the embodiment of the present invention described later with reference to FIG. 11 is referred to as an “image processing apparatus” including apparatuses such as a recording apparatus and a host computer. Further, in this specification, at an arbitrary position in the sheet conveyance path, the side closer to the sheet supply unit 2 is referred to as “upstream side” and the far side is referred to as “downstream side”.

図2(a)および(b)は、図1に示した記録部1の詳細な構成を示す図であり、図2(a)は記録部の上面図、図2(b)は記録部の側面図をそれぞれ示している。   2A and 2B are diagrams showing a detailed configuration of the recording unit 1 shown in FIG. 1, FIG. 2A is a top view of the recording unit, and FIG. 2B is a diagram of the recording unit. Each side view is shown.

これら図において、シート供給部2から記録部1に供給されたシート8は、記録部1において矢印A方向に搬送される。記録部1におけるシート搬送機構として、搬送ローラ11と従動回転するピンチローラ12からなるメイン搬送ローラ対が搬送の精度を司る。各インク色の記録ヘッド17〜20の下流側には、搬送ローラ13と従動回転するピンチローラ14からなるサブ搬送ローラ対が4組設けられている。記録ヘッド17〜20は、ブラック、シアン、マゼンタ、イエローのインクをそれぞれ吐出するインクジェット方式の記録ヘッドである。これらの記録ヘッドはそれぞれ、使用が想定されるシート8の最大記録幅をカバーする範囲に、インクを吐出するノズルを配列したノズル列を備えた、ライン型記録ヘッドである。なお、インクを吐出する方式は、発熱素子を用いた方式、ピエゾ素子を用いた方式、静電素子を用いた方式、MEMS素子を用いた方式等を用いることができる。インク色の数および記録ヘッドの数は4つには限定はされず、さらに多い数あるいは少ない数であってもよい。各記録ヘッドにはインクチューブが接続され、図示しないインクタンクから対応する色のインクが供給される。なお、このチューブを介した供給の代わりに、記録ヘッドが対応する色のインクを貯蔵するインクタンクと一体のユニットとされた形態であってもよい。各記録ヘッドは、ヘッドホルダ10によって一体に保持されている。   In these drawings, the sheet 8 supplied from the sheet supply unit 2 to the recording unit 1 is conveyed in the arrow A direction in the recording unit 1. As a sheet conveyance mechanism in the recording unit 1, a pair of main conveyance rollers including a conveyance roller 11 and a pinch roller 12 that rotates following the conveyance roller 11 controls conveyance accuracy. On the downstream side of the recording heads 17 to 20 for each ink color, four pairs of sub-conveying roller pairs including a conveying roller 13 and a pinch roller 14 that is driven to rotate are provided. The recording heads 17 to 20 are ink jet recording heads that discharge black, cyan, magenta, and yellow ink, respectively. Each of these recording heads is a line type recording head provided with a nozzle row in which nozzles for ejecting ink are arranged in a range covering the maximum recording width of the sheet 8 assumed to be used. As a method for ejecting ink, a method using a heating element, a method using a piezo element, a method using an electrostatic element, a method using a MEMS element, or the like can be used. The number of ink colors and the number of recording heads are not limited to four, and may be larger or smaller. Each recording head is connected to an ink tube, and ink of a corresponding color is supplied from an ink tank (not shown). Instead of the supply via the tube, the recording head may be a unit integrated with an ink tank for storing the corresponding color ink. Each recording head is integrally held by a head holder 10.

センサユニット701は、後述するシートの移動量を検出する処理で、検知パターンが記録されたシートの面を撮像する。マーキングヘッド500はインクジェット式の記録ヘッドであり、これによって検知パターンを記録する。マーキングヘッド500およびセンサユニット701は、記録部1の上流で、かつシート幅の略中央に配置されている。この配置によって、余白のないいわゆる縁無し記録に対応でき、また、記録部における各色記録ヘッドのミストの影響を受け難くすることができる。さらに、シートの微小な蛇行や微小な斜行が生じても平均としての搬送量を検出することができる。   The sensor unit 701 captures the surface of the sheet on which the detection pattern is recorded in a process of detecting the amount of movement of the sheet, which will be described later. The marking head 500 is an ink jet recording head, and records a detection pattern by this. The marking head 500 and the sensor unit 701 are disposed upstream of the recording unit 1 and substantially at the center of the sheet width. With this arrangement, it is possible to cope with so-called marginless recording with no margin, and it is difficult to be affected by the mist of each color recording head in the recording unit. Further, even if a minute meandering or a minute skew of the sheet occurs, the average conveyance amount can be detected.

なお、本実施形態の記録装置は、記録媒体として長尺で連続したシートを用いた高速記録が可能なラインプリンタであり、例えば、プリントラボ等における大量の枚数のプリントを行う分野に適している。しかし、本発明の適用は、このような形態に限られないことはもちろんであり、枚葉の記録媒体を使用する形態の記録装置または記録ヘッドの走査によって記録を行うシリアルタイプの記録装置にも適用することができる。   Note that the recording apparatus of the present embodiment is a line printer capable of high-speed recording using a long and continuous sheet as a recording medium, and is suitable for the field of printing a large number of sheets in a print laboratory, for example. . However, the application of the present invention is not limited to such a form, and of course, also for a recording apparatus using a single sheet recording medium or a serial type recording apparatus that performs recording by scanning a recording head. Can be applied.

図3(a)および(b)は、図2に示したセンサユニット701の詳細構成を示す図であり、図3(a)はセンサユニットの上面図、図3(b)は側方から見た断面図である。これら図に示すように、センサユニット701は、概略、発光部、受光部、画像処理部からなり、これらがユニットとして一体化されている。光源703は、LEDなどの発光素子である。光源703から発する光は、導光体702によって導かれてシート8の面を斜め方向から照明する。シート8上の照明された領域の像は、レンズ706によってイメージセンサ705に結像する。透明な保護カバー704は、シート8の側からインクミストなどが進入してレンズ706に汚れが付着するのを防止する。イメージセンサ705によって、マーキングヘッド500により記録された検知パターンを含むシート(物体)の面の画像を取得する。そして、取得された画像の撮像信号は、A/D変換されて画像処理部707に送られる。画像処理部707は、シートの移動に伴って複数回の撮像を行って得られた複数の画像データを、後述するパターンマッチング処理を含む画像処理を行うことにより、シートの移動量(搬送量)を検出(移動情報取得)する。そして、このように求めたシートの移動量の情報を、制御部6にフィードバックする。   3 (a) and 3 (b) are diagrams showing a detailed configuration of the sensor unit 701 shown in FIG. 2. FIG. 3 (a) is a top view of the sensor unit, and FIG. 3 (b) is a side view. FIG. As shown in these drawings, the sensor unit 701 includes an outline, a light emitting unit, a light receiving unit, and an image processing unit, which are integrated as a unit. The light source 703 is a light emitting element such as an LED. Light emitted from the light source 703 is guided by the light guide 702 to illuminate the surface of the sheet 8 from an oblique direction. An image of the illuminated area on the sheet 8 is formed on the image sensor 705 by the lens 706. The transparent protective cover 704 prevents ink mist or the like from entering from the sheet 8 side and stains on the lens 706. An image of the surface of the sheet (object) including the detection pattern recorded by the marking head 500 is acquired by the image sensor 705. The acquired image pickup signal is A / D converted and sent to the image processing unit 707. The image processing unit 707 performs image processing including pattern matching processing, which will be described later, on a plurality of image data obtained by performing imaging a plurality of times as the sheet moves, thereby moving the sheet movement amount (conveyance amount). Is detected (movement information acquisition). Information on the amount of movement of the sheet thus obtained is fed back to the control unit 6.

図4(a)および(b)は、イメージセンサで撮像された画像データに基づいて記録媒体(シート)の移動量を検出するための、本発明の一実施形態に係る基本的な処理を説明する図である。記録媒体8は図4(a)に示す矢印Aの方向に搬送され、図4(a)は、その搬送によって記録媒体が移動する前の状態、図4(b)は、搬送によって記録媒体が移動して一定時間後の状態を、それぞれ示している。   4A and 4B illustrate a basic process according to an embodiment of the present invention for detecting the amount of movement of a recording medium (sheet) based on image data captured by an image sensor. It is a figure to do. The recording medium 8 is conveyed in the direction of arrow A shown in FIG. 4A, FIG. 4A shows a state before the recording medium moves by the conveyance, and FIG. 4B shows the recording medium by conveyance. Each of the states after a certain time after moving is shown.

図4(a)において、401、413、414、および415は、マーキングヘッド500のノズル411によって記録された検知パターンをそれぞれ示している。斜線で示されたエリア402は、イメージセンサ705によって撮像された撮像エリアである。この構成において、図4(a)に示す四角で囲まれたエリア400は、イメージセンサ705による撮像エリア402から抽出された、検知パターン(401)を含むテンプレート画像のエリアである。なお、マーキングヘッド500は、図4に示す例では、ノズル列が2列の形態であるが、2列以上でも、列以下でもよい。   In FIG. 4A, 401, 413, 414, and 415 respectively indicate detection patterns recorded by the nozzle 411 of the marking head 500. An area 402 indicated by diagonal lines is an imaging area captured by the image sensor 705. In this configuration, an area 400 surrounded by a square shown in FIG. 4A is an area of a template image including a detection pattern (401) extracted from the imaging area 402 by the image sensor 705. In the example shown in FIG. 4, the marking head 500 has two nozzle rows. However, the marking head 500 may be two or more rows or less.

一方、図4(b)において、405は、検知パターン401が次の撮像時までに移動した後の検知パターンを示している。また、斜線で示されたエリア407は、図4(a)と同じく、イメージセンサ705によって撮像された撮像エリアである。さらに、四角で囲まれたエリア408は、撮像エリア407において、先の撮影で抽出されたテンプレート画像のエリア400を検出するためのサーチエリアである。サーチエリア408は、テンプレート画像のエリアよりも広く、サーチエリアのどの画素位置にテンプレート画像と同じ画像が存在しているかをパターマッチングによって検出するための領域である。パターンマッチングを行う際には、例えば、以下のNCC法による演算式を用いて相間値を算出し、最も相関高い画素位置をサーチする。   On the other hand, in FIG. 4B, reference numeral 405 denotes a detection pattern after the detection pattern 401 has moved until the next imaging. Also, an area 407 indicated by hatching is an imaging area imaged by the image sensor 705, as in FIG. Further, an area 408 surrounded by a square is a search area for detecting the area 400 of the template image extracted by the previous shooting in the imaging area 407. The search area 408 is an area that is wider than the area of the template image and for detecting by pixel matching which pixel position in the search area the same image as the template image exists. When performing pattern matching, for example, an interphase value is calculated using an arithmetic expression according to the following NCC method, and a pixel position with the highest correlation is searched.

サーチした結果から、記録媒体の移動量を算出する。例えば、本来搬送ずれなどが起こらなければ、図4(b)に示す検知パターン409の位置に検知パターンが存在しているはずが、検知パターン405の位置に検知パターン(401)が存在していることを検出できたとする。この場合、記録媒体の移動量は、図4(a)に示す検知パターン401(テンプレート画像400)と図4(b)に示す検知パターン405(テンプレート画像400と同じ大きさの領域410)と、の位置関係に基づいて算出する。なお、テンプレート画像に関する移動前後の位置関係から求めるものは、移動量に限られないことはもちろんであり、例えば、その移動量の移動に要した時間を用いて移動速度を求めることもできる。本明細書では、上記位置関係に基づいて求める移動量、移動速度などを移動情報という。   The amount of movement of the recording medium is calculated from the search result. For example, if no conveyance deviation originally occurs, the detection pattern should exist at the position of the detection pattern 409 shown in FIG. 4B, but the detection pattern (401) exists at the position of the detection pattern 405. Is detected. In this case, the movement amount of the recording medium includes a detection pattern 401 (template image 400) shown in FIG. 4A and a detection pattern 405 (area 410 having the same size as the template image 400) shown in FIG. It is calculated based on the positional relationship. It should be noted that what is obtained from the positional relationship before and after movement of the template image is not limited to the movement amount, and for example, the movement speed can be obtained using the time required for movement of the movement amount. In this specification, the movement amount, movement speed, and the like obtained based on the positional relationship are referred to as movement information.

また、406は、次の移動量算出のための(新たに記録された)テンプレート画像を示し、この画像について同じ処理を繰り返すことによって、リアルタイムに記録媒体の移動量を算出することができる。   Reference numeral 406 denotes a template image (newly recorded) for calculating the next movement amount. By repeating the same processing for this image, the movement amount of the recording medium can be calculated in real time.

ここで、本発明の一実施形態に係るパターンマッチングを説明する前に、比較例として、特許文献1などに記載されている従来のパターンマッチングについて説明する。このパターンマッチングは、検知パターンを含むテンプレート画像と最も相関が大きい領域を、サーチ領域内からサーチすることにより、サーチ領域のどの位置にテンプレート画像が存在しているかを検出し、その結果から移動量を算出する。図5(a)および(b)は、従来のパターンマッチングを説明する図である。これら図において、100は、記録媒体をイメージセンサ等で撮像した撮像エリア、101は検知パターン102を含むテンプレート画像を示す。図5(a)に示すように、イメージセンサで撮像して得られる撮像エリア100の中から、テンプレート画像101を取得し保持する。一定時間後、図5の(b)に示すように、イメージセンサによって撮像エリア100の画像データを取得する。イメージセンサは固定され、記録媒体が移動することによって、検知パターン102を含むテンプレート画像は、そのときの搬送状態に応じて画像105や画像104などの位置に移動する。これに対して、図5(b)に示す撮像エリア100のどこにテンプレート画像が移動したかをサーチすることにより、移動量を算出する。すなわち、搬送誤差が生じなければ、画像104の位置にテンプレート画像が存在するが、搬送誤差が生じた場合、テンプレート画像は画像105の位置に移動し、この位置と図5(a)に示すテンプレート画像101との位置関係に基づいて移動量が算出されることになる。   Here, before describing pattern matching according to an embodiment of the present invention, a conventional pattern matching described in Patent Document 1 will be described as a comparative example. In this pattern matching, an area having the greatest correlation with the template image including the detection pattern is searched from within the search area to detect where the template image exists in the search area, and the amount of movement is determined from the result. Is calculated. 5A and 5B are diagrams for explaining conventional pattern matching. In these drawings, reference numeral 100 denotes an imaging area in which a recording medium is imaged by an image sensor or the like, and 101 denotes a template image including a detection pattern 102. As shown in FIG. 5A, a template image 101 is acquired and held from an imaging area 100 obtained by imaging with an image sensor. After a certain time, as shown in FIG. 5B, the image data of the imaging area 100 is acquired by the image sensor. When the image sensor is fixed and the recording medium moves, the template image including the detection pattern 102 moves to a position such as the image 105 or the image 104 according to the transport state at that time. In contrast, the amount of movement is calculated by searching where the template image has moved in the imaging area 100 shown in FIG. That is, if no transport error occurs, the template image exists at the position of the image 104. If a transport error occurs, the template image moves to the position of the image 105, and this position and the template shown in FIG. The movement amount is calculated based on the positional relationship with the image 101.

テンプレート画像が画像エリアのどこにあるかをサーチする方法は以下の通りである。図5(b)に示すように、先ず、テンプレート画像を含む所定サイズのサーチエリア103を設定する。この際、サーチエリア103は、テンプレート画像がこのエリア内に必ず存在することが必要であるから、搬送誤差などを考慮し、テンプレート画像よりも広いエリアに設定する。その後、このサーチエリアの中で、テンプレート画像がどの位置に存在するかを、画像処理(相互相関処理)によってサーチする。   The method for searching where the template image is in the image area is as follows. As shown in FIG. 5B, first, a search area 103 having a predetermined size including a template image is set. At this time, the search area 103 is required to have a template image in this area, and therefore, the search area 103 is set to an area wider than the template image in consideration of a transport error or the like. Thereafter, the position where the template image exists in this search area is searched by image processing (cross-correlation processing).

図6は、従来のテンプレート画像のサーチ方法を説明する図である。図6において、110は、図5(b)に示したサーチエリア103に対応する。先ず、サーチエリア110の中で、領域106のように、左上の画素位置からテンプレート画像の画素サイズと同じサイズの領域を切り出す。そして、最初の撮像にて保持したテンプレート画像101のデータとの相間値を相互相関処理によって取得し、その結果を保持する。次に、領域107のように、サーチエリア110において1画素分ずらした切り出し位置で、同様にテンプレート画像の画素サイズと同じサイズの領域を切り出す。そして、テンプレート画像との相関値を取得し保持する。同様の作業を、それぞれ1画素分ずつずらした、領域108、109のように切り出しを繰り返し、サーチ範囲のすべての画素位置における相間値を取得する。そして、取得した相関値の中で、テンプレート画像101との相関が最も高い領域の切り出し画素位置が、2度目に撮像した画像エリアの中で、テンプレート画像が存在する画素位置となり、テンプレート画像のサーチが完了する。   FIG. 6 is a diagram for explaining a conventional template image search method. In FIG. 6, reference numeral 110 corresponds to the search area 103 shown in FIG. First, in the search area 110, an area having the same size as the pixel size of the template image is cut out from the upper left pixel position as in the area 106. Then, a correlation value with the data of the template image 101 held in the first imaging is acquired by cross-correlation processing, and the result is held. Next, an area having the same size as the pixel size of the template image is similarly extracted at the extraction position shifted by one pixel in the search area 110 as in the area 107. Then, a correlation value with the template image is acquired and held. The same operation is repeated for regions 108 and 109, each shifted by one pixel, and interphase values at all pixel positions in the search range are acquired. Then, the extracted pixel position of the region having the highest correlation with the template image 101 among the acquired correlation values becomes the pixel position where the template image exists in the image area captured for the second time, and the template image search is performed. Is completed.

しかしながら、相間値を取得するための相互相関処理は、例えばNCC(Normalized Cross−Correlation)法と呼ばれる方式で行うことができるがこの方式の処理は、演算の処理負荷が大きい。加えて、テンプレート画像をサーチするために、上記演算処理をサーチエリアのすべての画素位置にて実施する必要がある。このため、求められるサーチ時間の間でサーチ領域全体からテンプレート画像をサーチするためには、例えば、上記演算式を実施するための演算回路を複数実装して並列処理する必要があり、コストが増大する。また、仮にCPUで演算処理した場合には、求められるサーチ時間の間にテンプレート画像を検出できないという自体も生じ得る。   However, the cross-correlation process for obtaining the interphase value can be performed, for example, by a method called an NCC (Normalized Cross-Correlation) method, but the processing of this method has a heavy processing load. In addition, in order to search for a template image, it is necessary to perform the above arithmetic processing at all pixel positions in the search area. For this reason, in order to search a template image from the entire search area within the required search time, for example, it is necessary to implement a plurality of arithmetic circuits for executing the above arithmetic expressions and perform parallel processing, which increases the cost. To do. In addition, if the CPU performs arithmetic processing, the template image itself may not be detected during the required search time.

これに対し、本発明の一実施形態によるパターンマッチングによれば、サーチのための処理負荷を低減することが可能となる。   On the other hand, according to the pattern matching according to the embodiment of the present invention, it is possible to reduce the processing load for the search.

図7は、本発明の一実施形態に係るパターンマッチング処理を説明する図である。図7において、記録媒体は、矢印Aの方向に搬送される。この際、イメージセンサ自体は固定されており、移動する記録媒体を連続的に撮像する。801、802、803は、それぞれ検知パターン405(図4(b)参照)を含んだテンプレート画像を示している。テンプレート画像は、搬送ずれなどがない場合は、画像801の位置に存在する。これに対し、搬送ずれなどが生じている場合には、画像802や画像803など、画像801の位置とは異なる位置に移動する。この搬送状態に対し、サーチエリア800の中からテンプレート画像(801、802、803)をサーチする場合、従来は、前述したように、図7に示す領域809の位置から画素ごとに順次相関処理を行い、これをサーチエリア408の全体について行うが、相関処理の負荷が大きくなる。   FIG. 7 is a diagram for explaining pattern matching processing according to an embodiment of the present invention. In FIG. 7, the recording medium is conveyed in the direction of arrow A. At this time, the image sensor itself is fixed, and the moving recording medium is continuously imaged. Reference numerals 801, 802, and 803 denote template images each including a detection pattern 405 (see FIG. 4B). The template image exists at the position of the image 801 when there is no conveyance deviation or the like. On the other hand, when a conveyance deviation occurs, the image 802 moves to a position different from the position of the image 801, such as the image 803. When searching for a template image (801, 802, 803) from the search area 800 for this transport state, conventionally, as described above, correlation processing is sequentially performed for each pixel from the position of the area 809 shown in FIG. This is performed for the entire search area 408, but the load of correlation processing increases.

これに対し、本実施形態は、サーチエリア408(図4(b)参照)を、エリア804、805、806、および807の4つの領域に分割する。そして、4つの分割エリアの画像データの濃度を比較する。この場合、検知パターンを記録する記録ヘッド500およびセンサユニット701は、図2にて前述したように、画像データを記録する記録ヘッドよりも上流側に位置するため、イメージセンサで撮像したときは、記録媒体には検知パターン以外記録されていない。従って、検知パターンが存在しないエリアは記録媒体の地の色である例えば紙白のエリアになる。このため、本例の場合は、検知パターンが存在するエリアと存在しないエリアでは、イメージセンサで撮像した画像に濃度差が存在することになる。具体的には、検知パターンが存在するエリアには検知パターンの記録濃度によって、イメージセンサで検出する明度が、他の画素よりも低い(暗い;濃度が高い)画像データの画素が存在する。このことから、4つの分割エリアにおいて、所定の閾値以下の明度値をもつ画素の数を比較し、明度が所定閾値以下の画素の数が多いエリアに、検知パターンを含むテンプレート画像が存在することを推定する。そして、この分割エリアを特定してサーチリアとする。   On the other hand, in the present embodiment, the search area 408 (see FIG. 4B) is divided into four areas of areas 804, 805, 806, and 807. Then, the densities of the image data in the four divided areas are compared. In this case, the recording head 500 and the sensor unit 701 that record the detection pattern are located upstream of the recording head that records image data, as described above with reference to FIG. No recording pattern other than the detection pattern is recorded on the recording medium. Accordingly, the area where the detection pattern does not exist is, for example, a paper white area which is the background color of the recording medium. For this reason, in the case of this example, there is a density difference in the image captured by the image sensor between the area where the detection pattern exists and the area where the detection pattern does not exist. Specifically, in the area where the detection pattern exists, there is a pixel of image data whose brightness detected by the image sensor is lower (darker; higher density) than the other pixels depending on the recording density of the detection pattern. For this reason, in the four divided areas, the number of pixels having a lightness value equal to or smaller than a predetermined threshold is compared, and a template image including a detection pattern exists in an area where the number of pixels whose lightness is equal to or smaller than the predetermined threshold is large. Is estimated. Then, this divided area is specified as a search rear.

図8は、本実施形態に係る分割エリア間で明度を比較する処理のための構成を示すブロック図である。図8は、具体的には、サーチエリアの限定、相間値の算出、および移動量を算出する処理を実行する回路901とその周辺の構成を示している。これらの回路などは、図1にて上述した制御部6において構成されるものである。   FIG. 8 is a block diagram showing a configuration for processing for comparing brightness between divided areas according to the present embodiment. Specifically, FIG. 8 shows a circuit 901 that executes processing for limiting a search area, calculating an interphase value, and calculating a movement amount, and the surrounding configuration. These circuits and the like are configured in the control unit 6 described above with reference to FIG.

先ず、外部メモリ902に保持されている、先に撮像して得られた撮像エリアの画像データ中からテンプレート画像を抽出し、外部メモリ902に格納する。この保持されたテンプレート画像は、後に撮像された画像との相関処理に用いられる。そして、次の撮像によってイメージセンサ705から出力された各画素の画像データは、回路901の画像レベル比較部903において明度に関する所定の閾値と比較される。ここで、閾値以下のデータが存在する場合は、画素カウンタ904において計数値を1インクリメントする。ここで、上記比較される、次の撮像によって得られた画像データは、画素ごとに、上記比較に供されるとともに外部メモリ902に格納される。   First, a template image is extracted from the image data of the imaging area obtained by imaging first and held in the external memory 902 and stored in the external memory 902. The held template image is used for correlation processing with an image captured later. Then, the image data of each pixel output from the image sensor 705 by the next imaging is compared with a predetermined threshold value relating to brightness in the image level comparison unit 903 of the circuit 901. If there is data below the threshold, the pixel counter 904 increments the count value by 1. Here, the image data obtained by the next imaging to be compared is provided for the comparison and stored in the external memory 902 for each pixel.

なお、この画像データの比較は、比較的単純な比較回路によって実現できることから回路規模が大にならず、また、処理に時間もかからない。このため、イメージセンサからデータが出力される画素単位の処理の間に比較処理を完了することができる。すなわち、この比較処理がテンプレート画像をサーチするまでの処理パフォーマンスに影響を与えることはない。また、所定の閾値の値は、記録媒体の種類や検知パターンの記録ヘッドの色などによって可変とすることもできる。   Since the comparison of the image data can be realized by a comparatively simple comparison circuit, the circuit scale does not increase and the processing does not take time. For this reason, the comparison process can be completed during the process in units of pixels in which data is output from the image sensor. That is, this comparison processing does not affect the processing performance until the template image is searched. Also, the predetermined threshold value can be made variable according to the type of the recording medium, the color of the recording head of the detection pattern, and the like.

以上の比較および計数を、図7にて上述した4つの分割エリアごとに、それぞれのエリアの総ての画素に対して行い、その結果を4つの分割エリアごとに外部メモリ902で保持する。   The above comparison and counting are performed for all the pixels in each of the four divided areas described above with reference to FIG. 7, and the result is held in the external memory 902 for each of the four divided areas.

次に、サーチエリア設定部905は、外部メモリ902に保持されている4つの分割エリアごとの計数値に基づいて、テンプレート画像をサーチする1つの分割エリアを設定する。これにより、サーチするエリアを、本例の場合、略1/4の広さにでき、サーチの負荷を低減することができる。なお、本実施形態では、サーチエリアを4つのエリアに分割しているが、分割するエリアの数は4つに限定されず、また、種々の条件に応じて変更可能としてもよい。   Next, the search area setting unit 905 sets one divided area for searching the template image based on the count value for each of the four divided areas held in the external memory 902. Thereby, in the case of this example, the area to be searched can be made approximately ¼ area, and the search load can be reduced. In the present embodiment, the search area is divided into four areas. However, the number of areas to be divided is not limited to four, and may be changed according to various conditions.

図7に示す例において、テンプレート画像が画像802の位置に移動していた場合は、分割エリア804が、閾値以下の画素の数が他のエリアよりも多くなり、サーチエリアを図7の網掛けで示されるエリア811に設定する。あるいは、画像803の位置にテンプレート画像が存在する場合は、分割エリア806が、閾値以下の画素の数が他のエリアよりも多くなり、サーチエリアを図7のハッチングで示すエリア812に設定する。なお、テンプレート画像は、検知パターンとその周囲の所定数の画素で形成されることから、テンプレート画像801の場合のように、検知パターン自身が分割エリアの境界に存在する場合もある。この場合を想定し、もともとの分割エリア804をそのままサーチエリアに設定するのではなく、図7に示す領域813、814のように、上述した検知パターンの周囲の所定数の画素数分広くサーチエリアを設定する。   In the example shown in FIG. 7, when the template image has moved to the position of the image 802, the divided area 804 has a larger number of pixels below the threshold than the other areas, and the search area is shaded in FIG. Is set in an area 811 indicated by. Alternatively, when the template image exists at the position of the image 803, the number of pixels equal to or smaller than the threshold value in the divided area 806 is larger than the other areas, and the search area is set to an area 812 indicated by hatching in FIG. Since the template image is formed by the detection pattern and a predetermined number of pixels around the detection pattern, the detection pattern itself may exist at the boundary of the divided area as in the case of the template image 801. Assuming this case, the original divided area 804 is not set as the search area as it is, but the search area is widened by a predetermined number of pixels around the detection pattern described above, such as areas 813 and 814 shown in FIG. Set.

以上のようにサーチエリアを決定すると、相間値算出部906は、サーチエリア設定部905によって設定されたサーチエリアの画像データを外部メモリ902から読み出す。そして、読み出した画像データと、先の撮像で取得、保持していたテンプレート画像との相関値を、前述したNCC法等の演算式によって算出し、相間値保持部907に保持する。なお、相関値の算出方式は、NCC法に限定はされず、他の算出方法を用いてもよい。この相関値の求め方自体は、図6にて上述した従来の方法と同じである。すなわち、サーチエリアにおいて、左上の画素位置からテンプレート画像のサイズ(形)と同じサイズ(形)の領域を切り出し、この領域の画像とテンプレート画像との相間値を相互相関処理によって取得する。そして、切り出す領域の位置を1画素分ずらして、以下同様の処理を繰り返す。   When the search area is determined as described above, the interphase value calculation unit 906 reads the image data of the search area set by the search area setting unit 905 from the external memory 902. Then, a correlation value between the read image data and the template image acquired and held in the previous imaging is calculated by an arithmetic expression such as the NCC method described above and held in the interphase value holding unit 907. The correlation value calculation method is not limited to the NCC method, and other calculation methods may be used. The method for obtaining the correlation value itself is the same as the conventional method described above with reference to FIG. That is, in the search area, a region having the same size (shape) as the size (shape) of the template image is cut out from the upper left pixel position, and the correlation value between the image in this region and the template image is acquired by cross-correlation processing. Then, the position of the region to be cut out is shifted by one pixel, and thereafter the same processing is repeated.

次に、移動量算出部908は、相間値保持部907に保持された相関値の中で最も相関値が高い画素位置を定め、その画素位置とテンプレート画像の画素位置との関係に基づいて、移動量を算出する。   Next, the movement amount calculation unit 908 determines the pixel position having the highest correlation value among the correlation values held in the interphase value holding unit 907, and based on the relationship between the pixel position and the pixel position of the template image, The amount of movement is calculated.

図9は、本発明の一実施形態に係る、移動量算出部908で求める画素位置に対する相関値の関係の例を示すグラフである。図9に示すように、移動量算出部908は、相間値算出部で算出された画素位置ごとの相間値について、カーブフィッティングによる近似曲線を求める。そして、この近似曲線のデータの中で最も相関値が高い画素位置911を求め、これを最終的に求める画素位置とする。これにより、イメージセンサ705が持つ解像度以下の画素単位(サブピクセルレベル)で移動量を算出することができる。   FIG. 9 is a graph illustrating an example of the relationship of the correlation value with respect to the pixel position obtained by the movement amount calculation unit 908 according to an embodiment of the present invention. As illustrated in FIG. 9, the movement amount calculation unit 908 obtains an approximate curve by curve fitting for the interphase value for each pixel position calculated by the interphase value calculation unit. Then, the pixel position 911 having the highest correlation value in the data of the approximate curve is obtained, and this is finally set as the pixel position to be obtained. Thereby, the movement amount can be calculated in pixel units (sub-pixel level) equal to or lower than the resolution of the image sensor 705.

ところで、上述した、分割エリアごとの閾値以下の画素データの個数を計測する処理で、閾値以下の画素数が複数の分割エリアで同数になる場合がある。本実施形態は、このように閾値以下の画素数が同数の分割エリアが複数存在場合は、それらの複数の分割エリアにまたがってサーチエリアを設定する。   By the way, in the above-described process of measuring the number of pixel data below the threshold for each divided area, the number of pixels below the threshold may be the same in a plurality of divided areas. In this embodiment, when there are a plurality of divided areas having the same number of pixels equal to or smaller than the threshold value, the search area is set across the divided areas.

図10は、本発明の一実施形態に係る、複数の分割エリアにまたがってサーチエリアを設定する処理を説明する図であり、検知パターン405を含むテンプレート画像が画像1002の位置に移動した例を示している。この例は、検知パターン405(図において4つの円で示されるパターン、実際は白でない色の所定の濃度を有している)が分割エリア1006と分割エリア1007それぞれに占める面積(画素数)が同じ例である。この場合、分割エリア1006と分割エリア1007それぞれで計数される閾値以下の画素の数は同数となる。この場合には、画像エリア1006と1007にまたがるようなサーチエリア1008を設定する。なお、このように境界部分にテンプレート画像が存在する場合は、設定するサーチエリア1008を不必要に広くする必要がなく、図7にて上述したサーチエリア811、812と同じ画素数サイズでよい。これにより、サーチエリアを不必要に広くすることなく、処理に時間が増えることを抑制することができる。   FIG. 10 is a diagram illustrating processing for setting a search area across a plurality of divided areas according to an embodiment of the present invention, and an example in which a template image including a detection pattern 405 has moved to the position of an image 1002. Show. In this example, the detection pattern 405 (a pattern indicated by four circles in the figure, which actually has a predetermined density of a color that is not white) occupies the same area (number of pixels) in each of the divided area 1006 and the divided area 1007. It is an example. In this case, the number of pixels below the threshold counted in each of the divided area 1006 and the divided area 1007 is the same. In this case, a search area 1008 extending over the image areas 1006 and 1007 is set. When the template image exists at the boundary portion as described above, the search area 1008 to be set does not need to be unnecessarily widened, and may have the same number of pixels as the search areas 811 and 812 described above with reference to FIG. Thereby, it is possible to suppress an increase in processing time without unnecessarily widening the search area.

図11は、以上説明した本発明の一実施形態に係る移動量を算出するまでの処理を示すフローチャートであり、主に、図8にて上述した構成によって実行される処理である。図11において、先ず、ステップ1100で、イメージセンサから入力された各画素の明度を所定の閾値と比較する。比較した結果、閾値以下の場合は、ステップ1102で、閾値以下の画素の数をカウントアップする。このカウントアップ処理は、分割エリアごとに行う。次に、ステップ1103で、サーチエリア内の総ての画素の比較が行われたかを判断し、終了していなければステップ1100に戻り、同様の処理を繰り返す。次に、ステップ1104において、各分割エリアにおける閾値以下の画素の数を比較し、ステップ1105にて比較結果を基に、サーチエリアを設定する。そして、ステップ1106で、設定したサーチエリアにおいて、図9にて上述した処理によって、最もテンプレート画像と相間の高い画素位置を相互相関処理にて算出する。そして、ステップ1107で、サブピクセルレベルでの移動量を算出する
以上説明したように、本発明の実施形態によれば、テンプレート画像をサーチするための処理負荷を低減することが可能となる。
FIG. 11 is a flowchart showing processing until the movement amount according to the embodiment of the present invention described above is calculated, and is mainly processing executed by the configuration described above with reference to FIG. In FIG. 11, first, in step 1100, the brightness of each pixel input from the image sensor is compared with a predetermined threshold value. As a result of the comparison, if it is equal to or smaller than the threshold value, in step 1102, the number of pixels equal to or smaller than the threshold value is counted up. This count-up process is performed for each divided area. Next, in step 1103, it is determined whether all the pixels in the search area have been compared. If not completed, the process returns to step 1100 to repeat the same processing. Next, in step 1104, the number of pixels equal to or smaller than the threshold value in each divided area is compared, and in step 1105, a search area is set based on the comparison result. In step 1106, in the set search area, the highest pixel position between the template image and the phase is calculated by the cross-correlation process by the process described above with reference to FIG. Then, in step 1107, the movement amount at the sub-pixel level is calculated. As described above, according to the embodiment of the present invention, it is possible to reduce the processing load for searching the template image.

705 イメージセンサ
902 外部メモリ
903 画像レベル比較部
904 画素数カウンタ
905 サーチエリア設定部
906 相関値算出部
907 相関値保持部
908 移動量算出部
705 Image sensor 902 External memory 903 Image level comparison unit 904 Pixel number counter 905 Search area setting unit 906 Correlation value calculation unit 907 Correlation value holding unit 908 Movement amount calculation unit

Claims (10)

検知パターンを有した物体を当該物体の移動の間に撮像して前記物体の移動情報を求める画像処理装置であって、
先に撮像した物体の画像データから抽出される、検知パターンを含むテンプレート画像を、後に撮像した物体の画像データにおいてサーチする手段であって、後に撮像した物体の画像データにおけるサーチエリアの明度を検出することによって当該サーチエリアより小さな分割エリアを特定し、前記分割エリアにおいて前記テンプレート画像をサーチするサーチ手段と、
前記サーチしたテンプレート画像と、前記先に撮像した物体の画像データから抽出されるテンプレート画像と、の位置関係に基づいて、前記物体に移動情報を求める移動情報取得手段と、
を具えたことを特徴とする画像処理装置。
An image processing apparatus that obtains movement information of an object by imaging an object having a detection pattern during the movement of the object,
A means for searching a template image including a detection pattern extracted from the image data of the previously captured object in the image data of the subsequently captured object, and detecting the brightness of the search area in the image data of the subsequently captured object A search means for specifying a divided area smaller than the search area and searching for the template image in the divided area;
Movement information acquisition means for obtaining movement information for the object based on a positional relationship between the searched template image and a template image extracted from the image data of the previously captured object;
An image processing apparatus comprising:
前記サーチ手段は、前記サーチエリアにおいて予め複数の分割エリアに分割し、前記複数の分割エリアごとに明度を検出し、最も明度が低い分割エリアを前記サーチエリアより小さな分割エリアとして特定することを特徴とする請求項1に記載の画像処理装置。   The search means is divided into a plurality of divided areas in advance in the search area, detects the brightness for each of the plurality of divided areas, and specifies the divided area having the lowest brightness as a divided area smaller than the search area. The image processing apparatus according to claim 1. 前記サーチ手段は、前記複数の分割エリアごとに検出される明度が同じ分割エリアが複数存在する場合、当該複数の分割エリアにまたがるエリアを前記サーチエリアより小さな分割エリアとして特定することを特徴とする請求項2に記載の画像処理装置。   The search means, when there are a plurality of divided areas having the same brightness detected for each of the plurality of divided areas, specifies an area extending over the plurality of divided areas as a divided area smaller than the search area. The image processing apparatus according to claim 2. 前記サーチ手段は、前記サーチエリアの画像データの明度を画素ごとに所定の閾値と比較し、前記複数の分割エリアごとに、前記所定の閾値以下となる画素の数を計数する手段を有し、前記計数した数が最も多い分割エリアを前記サーチエリアより小さな分割エリアとして特定することを特徴とする請求項2または3に記載の画像処理装置。   The search means includes means for comparing the brightness of the image data in the search area with a predetermined threshold value for each pixel, and counting the number of pixels that are equal to or less than the predetermined threshold value for each of the plurality of divided areas. The image processing apparatus according to claim 2, wherein the divided area having the largest counted number is specified as a divided area smaller than the search area. 前記複数の分割エリアの数は変更可能であることを特徴とする請求項2ないし4のいずれか1項に記載の画像処理装置。   The image processing apparatus according to claim 2, wherein the number of the plurality of divided areas is changeable. 画像データにおいて所定のテンプレート画像をサーチするパターンマッチング方法であって、
サーチエリアの明度を検出することによって当該サーチエリアより小さな分割エリアを特定し、前記分割エリアにおいて前記テンプレート画像をサーチすることを特徴とするパターンマッチング方法。
A pattern matching method for searching a predetermined template image in image data,
A pattern matching method, wherein a division area smaller than the search area is specified by detecting brightness of the search area, and the template image is searched in the division area.
前記サーチエリアにおいて予め複数の分割エリアに分割し、前記複数の分割エリアごとに明度を検出し、最も明度が低い分割エリアを前記サーチエリアより小さな分割エリアとして特定することを特徴とする請求項6に記載のパターンマッチング方法。   7. The search area is divided into a plurality of divided areas in advance, brightness is detected for each of the plurality of divided areas, and a divided area having the lowest brightness is specified as a divided area smaller than the search area. The pattern matching method described in 1. 前記複数の分割エリアごとに検出される明度が同じ分割エリアが複数存在する場合、当該複数の分割エリアにまたがるエリアを前記サーチエリアより小さな分割エリアとして特定することを特徴とする請求項7に記載のパターンマッチング方法。   8. When there are a plurality of divided areas having the same brightness detected for each of the plurality of divided areas, an area extending over the plurality of divided areas is specified as a divided area smaller than the search area. Pattern matching method. 前記サーチエリアの画像データの明度を画素ごとに所定の閾値と比較し、前記複数の分割エリアごとに、前記所定の閾値以下となる画素の数を計数し、前記計数した数が最も多い分割エリアを前記サーチエリアより小さな分割エリアとして特定することを特徴とする請求項7または8に記載のパターンマッチング方法。   The brightness of the image data in the search area is compared with a predetermined threshold value for each pixel, the number of pixels that are equal to or less than the predetermined threshold value is counted for each of the plurality of divided areas, and the divided area having the largest counted number The pattern matching method according to claim 7, wherein: is specified as a divided area smaller than the search area. 前記複数の分割エリアの数は変更可能であることを特徴とする請求項7ないし9のいずれか1項に記載のパターンマッチング方法。   The pattern matching method according to claim 7, wherein the number of the plurality of divided areas is changeable.
JP2014235580A 2014-11-20 2014-11-20 Image processor and pattern matching method Pending JP2016099771A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014235580A JP2016099771A (en) 2014-11-20 2014-11-20 Image processor and pattern matching method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014235580A JP2016099771A (en) 2014-11-20 2014-11-20 Image processor and pattern matching method

Publications (1)

Publication Number Publication Date
JP2016099771A true JP2016099771A (en) 2016-05-30

Family

ID=56077900

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014235580A Pending JP2016099771A (en) 2014-11-20 2014-11-20 Image processor and pattern matching method

Country Status (1)

Country Link
JP (1) JP2016099771A (en)

Similar Documents

Publication Publication Date Title
EP3305532B1 (en) Image inspection device, image inspection method, program, and ink jet printing system
US8562099B2 (en) Ink jet recording apparatus and method for detecting faulty discharge in ink jet recording apparatus
US8842330B1 (en) Method to determine an alignment errors in image data and performing in-track alignment errors correction using test pattern
US9333773B2 (en) Printing apparatus and control method therefor
US8842331B1 (en) Multi-print head printer for detecting alignment errors and aligning image data reducing swath boundaries
JP5586919B2 (en) Movement detection apparatus and recording apparatus
JP2011093241A (en) Movement detector and recorder
JP7467894B2 (en) Printing device and printing method
JP5495716B2 (en) Movement detection apparatus and recording apparatus
US8593650B2 (en) Printer and method for detecting movement of object
JP5441618B2 (en) Movement detection apparatus, movement detection method, and recording apparatus
JP2012220405A (en) Conveyance amount measuring apparatus and recording device
JP6895857B2 (en) Inkjet printing equipment and shading correction method
JP2016099771A (en) Image processor and pattern matching method
JP2016085069A (en) Sheet position detecting device
CN112848678B (en) Printing apparatus and printing method
JP2015003479A (en) Recording apparatus, and method for controlling the same
JP6768451B2 (en) Equipment, methods and programs
JP6159206B2 (en) Recording apparatus and detection method
US20180015744A1 (en) Conveyance detection apparatus, conveying apparatus, and recording apparatus
JP6212332B2 (en) Recording apparatus and detection method
JP2014189385A (en) Sheet conveyance device, printer, sheet conveyance method and program
US20220172011A1 (en) Printing apparatus and printing method
CN114571873A (en) Printing apparatus and printing method
JP2018089805A (en) Recording device and recording method