JP2015103226A - Data calculation method, data calculation apparatus, and defect inspection apparatus - Google Patents

Data calculation method, data calculation apparatus, and defect inspection apparatus Download PDF

Info

Publication number
JP2015103226A
JP2015103226A JP2013246008A JP2013246008A JP2015103226A JP 2015103226 A JP2015103226 A JP 2015103226A JP 2013246008 A JP2013246008 A JP 2013246008A JP 2013246008 A JP2013246008 A JP 2013246008A JP 2015103226 A JP2015103226 A JP 2015103226A
Authority
JP
Japan
Prior art keywords
run
data
address
run data
logical
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
JP2013246008A
Other languages
Japanese (ja)
Inventor
拓矢 安田
Takuya Yasuda
拓矢 安田
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.)
Screen Holdings Co Ltd
Original Assignee
Screen Holdings Co Ltd
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 Screen Holdings Co Ltd filed Critical Screen Holdings Co Ltd
Priority to JP2013246008A priority Critical patent/JP2015103226A/en
Priority to KR1020140164365A priority patent/KR101630078B1/en
Priority to CN201410680275.4A priority patent/CN104677919B/en
Priority to TW103141111A priority patent/TWI532015B/en
Publication of JP2015103226A publication Critical patent/JP2015103226A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)

Abstract

PROBLEM TO BE SOLVED: To perform logical operations of plural run data groups in a short time.SOLUTION: A data calculation method comprises: a run expansion step which expands and stores a plurality of run data sets in the address space of run expansion memory by executing a run expansion operation for each run data set, the run expansion operation adding a predetermined value to the value stored at the address of the run data expansion memory corresponding to the starting coordinates of the run data set, and at the same time subtracting a predetermined value from the value stored at the address of the run data expansion memory corresponding to the ending coordinates of the run data set; an overlapping information acquisition step which acquires overlapping information indicating the overlapping state of a plurality of run data sets by executing a scan operation for each address of the address space, the scan operation writing the total sum of stored values to the 0-th address or the m-th address of the address space at the completion of the run expansion step to the m-th address of the address space; and a logical operation step which performs logical operations for a plurality of run data groups on the basis of the overlapping information.

Description

この発明は、複数のランデータ群の論理演算を行うデータ演算技術ならびに当該データ演算技術を適用した欠陥検査装置に関するものである。   The present invention relates to a data operation technique for performing a logical operation on a plurality of run data groups and a defect inspection apparatus to which the data operation technique is applied.

半導体基板やプリント基板等の製造技術分野では、製品に含まれる欠陥を検出しこれを分析・評価するために、評価対象物を顕微鏡等により撮像し、得られた画像から欠陥部を含む画像を抽出している。そして、抽出した画像に対してマスク画像によるマスク処理を実行することで欠陥画像を正確に求めている。このマスク処理を行うために、例えば特許文献1に記載の論理演算が上記画像のランデータに対して実行される。   In the field of manufacturing technology such as semiconductor substrates and printed circuit boards, in order to detect defects contained in products and to analyze and evaluate them, images of evaluation objects are picked up with a microscope or the like, and images including defect portions are obtained from the obtained images. Extracting. Then, the defect image is accurately obtained by executing a mask process using the mask image on the extracted image. In order to perform this masking process, for example, a logical operation described in Patent Document 1 is executed on the run data of the image.

特開平7-203178号公報JP-A-7-203178

特許文献1に記載の発明は、演算処理対象となる2つの画像のランデータ群をビットマップデータに変換することなく、2つの画像の論理積、論理和および排他的論理和を求めている。より具体的には、演算処理対象となる2つのランデータ群を一方端のランから順に接続判定し、重なっている部分に応じて論理積、論理和および排他的論理和の判定を行っている。したがって、ランデータ群を構成するランデータの本数が多くなるにしたがって接続判定が複雑となり、論理演算に要する時間が増大するという問題がある。また、3つ以上のランデータ群について論理演算する場合には、接続判定の複雑さはさらに飛躍的に上昇し、論理演算に要する時間も飛躍的に増大してしまう。   In the invention described in Patent Document 1, the logical product, logical sum, and exclusive logical sum of two images are obtained without converting the run data groups of the two images to be processed into bitmap data. More specifically, two run data groups to be processed are determined to be connected in order from one end of the run, and logical product, logical sum, and exclusive logical sum are determined according to overlapping portions. . Therefore, connection determination becomes more complex as the number of run data constituting the run data group increases, and there is a problem that the time required for logical operation increases. In addition, when performing a logical operation on three or more run data groups, the complexity of connection determination further increases dramatically, and the time required for the logical operation also increases dramatically.

この発明は上記課題に鑑みなされたものであり、複数のランデータ群の論理演算を短時間で行うことができるデータ演算技術および当該データ演算技術を用いて欠陥検査を効率的に行う技術を提供することを目的とする。   The present invention has been made in view of the above problems, and provides a data operation technique capable of performing a logical operation of a plurality of run data groups in a short time and a technique for efficiently performing defect inspection using the data operation technique. The purpose is to do.

この発明の第1態様は、二値画像データをランレングス化して得られる少なくとも1つ以上のランデータをランデータ群とし、互いに異なる複数のランデータ群の論理演算を行うデータ演算方法であって、ランデータの始端座標に対応するラン展開メモリのアドレスに記憶されている値に既定値を加算する一方で当該ランデータの終端座標に対応するラン展開メモリのアドレスに記憶されている値から既定値を減算するデータ展開操作をランデータ毎に実行することで、複数のランデータをラン展開メモリのアドレス空間に展開して記憶させるラン展開工程と、アドレス空間のm番目のアドレスに対してラン展開工程を完了した時点でアドレス空間の0番目ないしm番目のアドレスにそれぞれ記憶された値の総和を書き込む、スキャン操作をアドレス空間の各アドレスについて実行して複数のランデータの重なり状態を示す重なり情報を取得する重なり情報取得工程と、重なり情報に基づいて複数のランデータ群の論理積、論理和および排他的論理和のうちの少なくとも1つを求める論理演算工程とを備えることを特徴としている。   According to a first aspect of the present invention, there is provided a data operation method in which at least one or more run data obtained by run-lengthing binary image data is used as a run data group, and a logical operation is performed on a plurality of different run data groups. The default value is added to the value stored in the address of the run development memory corresponding to the start coordinate of the run data, while the default value is added to the value stored in the address of the run development memory corresponding to the end coordinate of the run data. A data expansion operation for subtracting a value is executed for each run data, so that a plurality of run data are expanded and stored in the address space of the run expansion memory, and the m th address in the address space is run. When the expansion process is completed, a scan operation is performed to write the sum of the values stored in the 0th to mth addresses of the address space. An overlap information acquisition step for executing execution for each address in the dress space and acquiring overlap information indicating an overlap state of a plurality of run data, and logical product, logical sum and exclusive OR of a plurality of run data groups based on the overlap information And a logical operation step for obtaining at least one of them.

また、この発明の第2態様は、二値画像データをランレングス化して得られる少なくとも1つ以上のランデータをランデータ群とし、互いに異なる複数のランデータ群の論理演算を行うデータ演算装置であって、ランデータの始端座標および終端座標に関連する値を記憶するラン展開メモリと、ランデータの始端座標に対応するラン展開メモリのアドレスに記憶されている値に既定値を加算する一方で当該ランデータの終端座標に対応するラン展開メモリのアドレスに記憶されている値から既定値を減算するデータ展開操作をランデータ毎に実行して複数のランデータをラン展開メモリのアドレス空間に展開するラン展開処理部と、複数のランデータが展開されたラン展開メモリにおけるアドレス空間のm番目のアドレスに対してアドレス空間の0番目ないしm番目のアドレスにそれぞれ記憶された値の総和を書き込む、スキャン操作をアドレス空間の各アドレスについて実行して複数のランデータの重なり状態を示す重なり情報を取得する重なり情報取得部と、重なり情報に基づいて複数のランデータ群の論理積、論理和および排他的論理和のうちの少なくとも1つを求める論理演算部とを備えることを特徴としている。   According to a second aspect of the present invention, there is provided a data operation device that performs at least one run data obtained by converting the binary image data into run lengths as a run data group and performs a logical operation on a plurality of different run data groups. While the run expansion memory that stores values related to the start and end coordinates of the run data and the value stored at the address of the run expansion memory corresponding to the start end coordinates of the run data, the default value is added. A data expansion operation for subtracting a predetermined value from the value stored in the address of the run expansion memory corresponding to the end coordinate of the run data is performed for each run data, and a plurality of run data is expanded in the address space of the run expansion memory. A run expansion processing unit for executing and an address empty for the mth address of the address space in the run expansion memory in which a plurality of run data are expanded An overlap information acquisition unit that writes the sum of the values stored in each of the 0th to mth addresses, and executes a scan operation for each address in the address space to acquire overlap information indicating an overlap state of a plurality of run data; And a logical operation unit for obtaining at least one of a logical product, a logical sum, and an exclusive logical sum of a plurality of run data groups based on the overlap information.

このように構成された発明(データ演算方法およびデータ演算装置)では、ランデータ群をビットマップデータに変換することなく、ランデータ群の論理演算が実行される。しかも、ランデータ毎のデータ展開操作およびアドレス毎のスキャン操作により複数のランデータの重なり状態を示す重なり情報を取得した上で、当該重なり情報に基づいてランデータ群の論理積、論理和および排他的論理和のうちの少なくとも1つを求めている。このため、ランデータの個数やランデータ群の個数が少ない場合はもちろんのこと、これらの個数が増大しても、簡素なデータ処理によって論理演算を実行することができる。   In the invention (data operation method and data operation device) configured as described above, the logical operation of the run data group is executed without converting the run data group into bitmap data. In addition, after obtaining overlap information indicating the overlap state of a plurality of run data by the data expansion operation for each run data and the scan operation for each address, the logical product, logical sum and exclusive of the run data groups are obtained based on the overlap information. Seeking at least one of the logical ORs. For this reason, not only when the number of run data or the number of run data groups is small, but even when the number of run data increases, logical operations can be executed by simple data processing.

また、この発明の第3態様は、欠陥検査装置であって、検査対象画像を取得する画像取得部と、検査対象画像を検査して欠陥部位が含まれる抽出画像を抽出する画像抽出部と、抽出画像を行毎にランレングス化して得られる少なくとも1つ以上のランデータを有する抽出ランデータ群と、マスク画像を行毎にランレングス化して得られる少なくとも1つ以上のランデータを有するマスクランデータ群との論理演算を行うことで、抽出画像のうち欠陥部位以外の部位をマスク画像によりマスク処理して欠陥画像データを得るデータ演算部とを備える欠陥検査装置であって、データ演算部が、ランデータの始端座標および終端座標に関連する値を記憶するラン展開メモリと、ランデータの始端座標に対応するラン展開メモリのアドレスに記憶されている値に既定値を加算する一方で当該ランデータの終端座標に対応するラン展開メモリのアドレスに記憶されている値から既定値を減算するデータ展開操作をランデータ毎に実行して複数のランデータをラン展開メモリのアドレス空間に展開するラン展開処理部と、複数のランデータが展開されたラン展開メモリにおけるアドレス空間のm番目のアドレスに対してアドレス空間の0番目ないしm番目のアドレスにそれぞれ記憶された値の総和を書き込む、スキャン操作をアドレス空間の各アドレスについて実行して複数のランデータの重なり状態を示す重なり情報を取得する重なり情報取得部と、重なり情報に基づいて抽出ランデータ群およびマスクランデータ群の論理積を演算して欠陥部位以外の部位を除去する論理演算処理部とを有することを特徴としている。   Further, a third aspect of the present invention is a defect inspection apparatus, an image acquisition unit that acquires an inspection target image, an image extraction unit that inspects the inspection target image and extracts an extracted image including a defective part, An extracted run data group having at least one or more run data obtained by run-lengthing an extracted image for each row, and a mask run having at least one or more run data obtained by running a mask image for each row. A defect inspection apparatus including a data operation unit that obtains defect image data by masking a portion other than the defect portion of the extracted image with a mask image by performing a logical operation with the data group, wherein the data operation unit , Stored in the run expansion memory for storing values related to the start and end coordinates of the run data and the address of the run expansion memory corresponding to the start end coordinates of the run data. A data expansion operation is performed for each run data to add the default value to the existing value and subtract the default value from the value stored in the address of the run expansion memory corresponding to the end coordinate of the run data. A run development processing unit that develops data in the address space of the run development memory, and the mth address in the address space in the run development memory in which a plurality of run data is developed, is changed to the 0th to mth addresses in the address space. An overlap information acquisition unit that writes a sum of stored values, executes a scan operation for each address in the address space, and acquires overlap information indicating an overlap state of a plurality of run data, and extracted run data based on the overlap information A logical operation processing unit that calculates the logical product of the group and mask run data group and removes parts other than the defective part It is characterized in that.

このように構成された発明(欠陥検査装置)では、上記したデータ演算技術によって抽出ランデータ群とマスクランデータ群の論理積が演算されて欠陥部位以外の部位が抽出画像から除去され、良好な欠陥画像データが得られる。   In the invention configured as described above (defect inspection apparatus), a logical product of the extracted run data group and the mask run data group is calculated by the above-described data calculation technique, and parts other than the defective part are removed from the extracted image. Defect image data is obtained.

この発明によれば、ランデータの個数やランデータ群の個数にかかわりなく、ラン展開処理と重なり情報取得処理を実行することで全ランデータの重なり状態を示す重なり情報が得られ、当該重なり情報に基づいて全ランデータ群の論理積、論理和および排他的論理和のうちの少なくとも1つを求めることが可能となっている。したがって、ランデータ群の論理演算を短時間で行うことができる。   According to this invention, regardless of the number of run data or the number of run data groups, overlap information indicating the overlap state of all run data is obtained by executing the run development process and the overlap information acquisition process, and the overlap information is obtained. It is possible to obtain at least one of a logical product, a logical sum, and an exclusive logical sum of all the run data groups based on the above. Therefore, the logical operation of the run data group can be performed in a short time.

また、上記したデータ演算技術を用いることで欠陥部位以外の部位が抽出画像から除去され、良好な欠陥画像データが短時間で得られる。したがって、欠陥検査に要する時間を短縮することができる。   Further, by using the above-described data calculation technique, parts other than the defective part are removed from the extracted image, and good defect image data can be obtained in a short time. Therefore, the time required for defect inspection can be shortened.

本発明にかかるデータ演算装置の一実施形態を装備する欠陥検査装置の概略構成を示す図である。It is a figure which shows schematic structure of the defect inspection apparatus equipped with one Embodiment of the data arithmetic unit concerning this invention. 画像処理部の概略構成を示すブロック図である。It is a block diagram which shows schematic structure of an image process part. 本発明にかかるデータ演算装置の一実施形態に相当するデータ処理部の概略構成を示すブロック図である。It is a block diagram which shows schematic structure of the data processing part corresponded to one Embodiment of the data arithmetic unit concerning this invention. データ処理部によるデータ演算動作の一例を模式的に示す説明図である。It is explanatory drawing which shows typically an example of the data calculation operation | movement by a data processing part. 各プロセッサコアで実行されるデータ展開操作の内容を示す図である。It is a figure which shows the content of the data expansion | deployment operation performed with each processor core. 重なり情報取得処理の内容を示す図である。It is a figure which shows the content of the overlap information acquisition process. プレフィクススキャンの動作概要を示す図である。It is a figure which shows the operation | movement outline | summary of a prefix scan. 論理積判定処理の内容を示す図である。It is a figure which shows the content of the logical product determination process. データ処理部によるデータ演算動作の他の例を模式的に示す説明図である。It is explanatory drawing which shows typically the other example of the data calculation operation | movement by a data processing part. 論理和判定処理の内容を示す図である。It is a figure which shows the content of the OR determination process. データ処理部によるデータ演算動作の別の例を模式的に示す説明図である。It is explanatory drawing which shows typically another example of the data calculation operation | movement by a data processing part. 排他的論理和判定処理の内容を示す図である。It is a figure which shows the content of exclusive OR determination processing.

図1は本発明にかかるデータ演算装置の一実施形態を装備する欠陥検査装置の概略構成を示す図である。この欠陥検査装置1は、検査対象である半導体基板(以下「基板」という。)Sの外観に現れたピンホールや異物等の欠陥検査を行う。欠陥検査装置1は、基板S上の検査対象領域を撮像する撮像装置2と、撮像装置2からの画像データに基づいて欠陥検査を行う制御装置3を有する。   FIG. 1 is a diagram showing a schematic configuration of a defect inspection apparatus equipped with an embodiment of a data operation apparatus according to the present invention. The defect inspection apparatus 1 inspects for defects such as pinholes and foreign matters appearing on the appearance of a semiconductor substrate (hereinafter referred to as “substrate”) S to be inspected. The defect inspection apparatus 1 includes an imaging device 2 that images an inspection target region on the substrate S and a control device 3 that performs defect inspection based on image data from the imaging device 2.

上記欠陥検査装置1を装備する検査システムでは、欠陥検査装置1とは別に基板Sの製造ラインに設けられた基板検出装置Mにおいて基板Sに欠陥が発見されると、その欠陥の位置座標がこの欠陥検査装置1に与えられる。製造ラインに組み込まれた基板検出装置Mは、予め定められた処理アルゴリズムによって基板S全体を検査し、基板表面に欠陥としての要件を満たす領域があればその位置座標を取得して出力する。したがって、該基板検出装置Mが有する撮像部は比較的低解像度であり、処理アルゴリズムも固定的である。   In the inspection system equipped with the defect inspection apparatus 1, when a defect is found on the substrate S in the substrate detection apparatus M provided on the production line of the substrate S separately from the defect inspection apparatus 1, the position coordinates of the defect are The defect inspection apparatus 1 is given. The substrate detection apparatus M incorporated in the production line inspects the entire substrate S by a predetermined processing algorithm, and acquires and outputs the position coordinates if there is a region on the substrate surface that satisfies the requirement as a defect. Therefore, the imaging unit included in the substrate detection apparatus M has a relatively low resolution, and the processing algorithm is fixed.

一方、この欠陥検査装置1は、図示しないインターフェースを介して基板検出装置Mと接続されており、基板検出装置Mから欠陥として位置座標が報告された領域をより高い解像度を有する撮像装置2によって撮像するとともに、その画像を制御装置3が精査して欠陥の有無やその種類などをより詳しく判定するとともに、欠陥部分の画像を表示部に表示する。   On the other hand, the defect inspection apparatus 1 is connected to the substrate detection apparatus M through an interface (not shown), and an image pickup apparatus 2 having higher resolution captures an area in which position coordinates are reported as a defect from the substrate detection apparatus M. At the same time, the control device 3 examines the image to determine in detail the presence or absence of the defect and the type thereof, and displays the image of the defective portion on the display unit.

撮像装置2は、基板S上の検査対象領域を撮像することにより画像データを取得する撮像部21、基板Sを保持するステージ22、および、撮像部21に対してステージ22を相対的に移動させるステージ駆動部23を有している。また、撮像部21は、照明光を出射する照明部211、基板Sに照明光を導くとともに基板Sからの光が入射する光学系212、および、光学系212により結像された基板Sの像を電気信号に変換する撮像デバイス213を有している。ステージ駆動部23はボールねじ、ガイドレールおよびモータにより構成され、制御装置3に設けられた装置制御部4がステージ駆動部23および撮像部21を制御することにより、基板S上の検査対象領域が撮像される。   The imaging device 2 moves the stage 22 relative to the imaging unit 21 that acquires image data by imaging the inspection target region on the substrate S, the stage 22 that holds the substrate S, and the imaging unit 21. A stage driving unit 23 is provided. In addition, the imaging unit 21 includes an illumination unit 211 that emits illumination light, an optical system 212 that guides illumination light to the substrate S and receives light from the substrate S, and an image of the substrate S formed by the optical system 212. An imaging device 213 for converting the signal into an electrical signal. The stage drive unit 23 includes a ball screw, a guide rail, and a motor. The device control unit 4 provided in the control device 3 controls the stage drive unit 23 and the imaging unit 21, so that the inspection target region on the substrate S is changed. Imaged.

制御装置3は装置制御部4を有しており、この装置制御部4が予め読み込まれた制御プログラムを実行することにより、図1に示す制御装置各部を以下のように動作させる。制御装置3は、上記の装置制御部4のほか、画像取得部5および画像処理部6を備えている。画像取得部5は、撮像部21から出力される電気信号をデータ化して、撮像画像に対応する画像データを取得する。画像処理部6は、画像取得部5が取得した画像データに対して適宜の画像処理を施して、画像に含まれる欠陥の検出や欠陥部分の画像(以下「欠陥画像」という)を作成する。なお、当該画像処理部6は本発明にかかるデータ演算装置の一実施形態であるデータ処理部を含んでおり、撮像装置2により撮像された画像(検査対象画像)から抽出した画像に対してマスク処理を施して欠陥部分の情報を導出可能となっている。画像処理部6、特にデータ処理部の構成および動作については、後で詳述する。   The control device 3 has a device control unit 4, and when the device control unit 4 executes a control program read in advance, each unit of the control device shown in FIG. 1 is operated as follows. The control device 3 includes an image acquisition unit 5 and an image processing unit 6 in addition to the device control unit 4 described above. The image acquisition unit 5 converts the electrical signal output from the imaging unit 21 into data, and acquires image data corresponding to the captured image. The image processing unit 6 performs appropriate image processing on the image data acquired by the image acquisition unit 5 to detect a defect included in the image and create an image of a defective portion (hereinafter referred to as “defect image”). The image processing unit 6 includes a data processing unit that is an embodiment of the data arithmetic device according to the present invention, and masks images extracted from images (inspection target images) captured by the imaging device 2. By processing, it is possible to derive information on the defective portion. The configuration and operation of the image processing unit 6, especially the data processing unit will be described in detail later.

さらに、制御装置3は、各種データを記憶するための記憶部7、ユーザからの操作入力を受け付けるキーボードおよびマウスなどの入力受付部8および操作手順や処理結果等のユーザ向け視覚情報を表示する表示部9などを備えている。また、図示を省略しているが、光ディスク、磁気ディスク、光磁気ディスク等のコンピュータ読み取り可能な記録媒体から情報の読み取りを行う読取装置を有し、欠陥検査装置1の他の構成との間で信号を送受信する通信部が、適宜、インターフェイス(I/F)を介する等して接続される。   Further, the control device 3 displays a storage unit 7 for storing various data, an input receiving unit 8 such as a keyboard and a mouse for receiving an operation input from the user, and a visual information for the user such as an operation procedure and a processing result. Part 9 and the like. Although not shown in the figure, the apparatus has a reader for reading information from a computer-readable recording medium such as an optical disk, a magnetic disk, a magneto-optical disk, etc. A communication unit that transmits and receives signals is appropriately connected through an interface (I / F).

図2は画像処理部の概略構成を示すブロック図である。画像処理部6は、フィルタリング部61、差分抽出部62、二値化処理部63およびデータ処理部64を有している。フィルタリング部61には、画像取得部5から撮像画像が送られてくるとともに、記憶部7から参照画像が送られてくる。これら両画像のうち撮像画像は、撮像装置2によって撮像された基板Sの画像であり、欠陥検出検査の対象となる検査対象画像に相当する。また、参照画像は欠陥のない理想的な基板に対応する画像であり、この実施形態では、次に説明するように、検査対象画像と参照画像との比較によって検査対象画像から欠陥検出が行われる。これらの欠陥画像および参照画像は記憶部7に記憶され、必要に応じて参照されるが、外部の記憶媒体に記憶された画像データを必要に応じて読み込む形態であってもよい。   FIG. 2 is a block diagram illustrating a schematic configuration of the image processing unit. The image processing unit 6 includes a filtering unit 61, a difference extraction unit 62, a binarization processing unit 63 and a data processing unit 64. A captured image is sent from the image acquisition unit 5 to the filtering unit 61, and a reference image is sent from the storage unit 7. Of these two images, the picked-up image is an image of the substrate S picked up by the image pickup device 2 and corresponds to an inspection target image to be subjected to defect detection inspection. Further, the reference image is an image corresponding to an ideal substrate having no defect, and in this embodiment, as will be described below, defect detection is performed from the inspection target image by comparing the inspection target image with the reference image. . These defect images and reference images are stored in the storage unit 7 and referred to as necessary. However, image data stored in an external storage medium may be read as necessary.

フィルタリング部61は、検査対象画像および参照画像のそれぞれについて、画像ノイズおよび欠陥と関係のない軽微な画像の差異を除去するためのフィルタリング処理を行い、各画像を差分抽出部62に送る。この差分抽出部62は、フィルタリング処理後の検査対象画像および参照画像の差分を求めることで画像内容が互いに異なる領域を抽出し、当該差分画像を二値化処理部63に送る。そして、二値化処理部63は適宜の閾値によって差分画像を二値化して抽出画像データを生成し、データ処理部64に送る。このデータ処理部64は抽出画像データをランレングス化して複数のランデータからなるランデータ群を生成するとともに、記憶部7から与えられるマスク画像データをランレングス化して複数のランデータからなるランデータ群を生成する。なお、本明細書では、抽出画像データをランレングス化して生成されるランデータを「抽出ランデータ」と称し、マスク画像データをランレングス化して生成されるランデータを「マスクランデータ」と称し、さらに後述するように抽出ランデータ群とマスクランデータ群の論理積により得られるランデータを「欠陥ランデータ」と称する。   The filtering unit 61 performs a filtering process for removing minor image differences unrelated to image noise and defects for each of the inspection target image and the reference image, and sends each image to the difference extraction unit 62. The difference extraction unit 62 extracts areas having different image contents by obtaining a difference between the inspection target image and the reference image after the filtering process, and sends the difference image to the binarization processing unit 63. Then, the binarization processing unit 63 binarizes the difference image with an appropriate threshold value, generates extracted image data, and sends it to the data processing unit 64. The data processing unit 64 converts the extracted image data into run lengths to generate a run data group including a plurality of run data, and converts the mask image data provided from the storage unit 7 into run lengths to generate run data including a plurality of run data. Create a group. In this specification, run data generated by run length extraction image data is referred to as “extraction run data”, and run data generated by run length mask image data is referred to as “mask run data”. As will be described later, the run data obtained by the logical product of the extracted run data group and the mask run data group is referred to as “defective run data”.

図3は、本発明にかかるデータ演算装置の一実施形態に相当するデータ処理部の概略構成を示すブロック図である。このデータ処理部64はGPU(Graphics Processing Unit)で構成されており、複数のプロセッサコア641を有している。各プロセッサコア641はラン展開処理部642、重なり情報取得処理部643および論理判定処理部644として機能し、ランデータ毎のラン展開メモリへのラン展開操作、当該ラン展開メモリのアドレス毎のスキャン操作および判定操作をそれぞれ一のスレッドとして実行する。本実施形態では、ランデータ毎のラン展開操作が本発明の「展開スレッド」の一例に相当し、アドレス毎の判定操作が本発明の「判定スレッド」の一例に相当している。なお、ラン展開操作、スキャン操作および判定操作については後で詳述する。   FIG. 3 is a block diagram showing a schematic configuration of a data processing unit corresponding to one embodiment of the data arithmetic device according to the present invention. The data processing unit 64 is configured by a GPU (Graphics Processing Unit) and has a plurality of processor cores 641. Each processor core 641 functions as a run development processing unit 642, an overlap information acquisition processing unit 643, and a logic determination processing unit 644, and performs a run development operation on the run development memory for each run data and a scan operation for each address of the run development memory. Each of the determination operations is executed as one thread. In the present embodiment, the run development operation for each run data corresponds to an example of the “development thread” of the present invention, and the determination operation for each address corresponds to an example of the “determination thread” of the present invention. The run development operation, scan operation, and determination operation will be described in detail later.

データ処理部64は、上記した抽出ランデータ、マスクランデータおよび欠陥ランデータを一時的に記憶する記憶部645を有している。この記憶部645はラン展開操作により展開された値を記憶するアドレス空間を有しており、当該アドレス空間で規定されるメモリ空間が本発明の「ラン展開メモリ」として機能する。また、記憶部645には、ラン展開メモリの各アドレスについてスキャン操作を行うことで得られる値を記憶する始端位置メモリおよび終端位置メモリも設けられている。これらラン展開メモリ、始端位置メモリおよび終端位置メモリに関しても後で詳述する。   The data processing unit 64 includes a storage unit 645 that temporarily stores the extracted run data, the mask run data, and the defect run data. The storage unit 645 has an address space for storing values developed by the run development operation, and the memory space defined by the address space functions as the “run development memory” of the present invention. The storage unit 645 is also provided with a start position memory and an end position memory that store values obtained by performing a scan operation for each address of the run development memory. These run development memory, start position memory and end position memory will also be described in detail later.

データ処理部64は、さらにラン生成部647、並列処理制御部648、データ初期設定部649を有している。ラン生成部647は、抽出画像データをランレングス化処理して抽出ランデータ群を生成し、またマスク画像データをランレングス化処理してマスクランデータ群を生成し、それらを記憶部645に記憶させる。また、並列処理制御部648は、各プロセッサコア641で実行されるスレッドを排他制御しながら並列して実行させる。さらにデータ初期設定部649は適宜ラン展開メモリ、始端位置メモリや終端位置メモリのメモリ内容をゼロクリアする。なお、本実施形態では、マスク画像データからマスクランデータ群を生成しているが、予めマスクランデータ群を記憶部7に記憶させておき、記憶部7からのマスクランデータ群を用いてマスク処理を行うように構成してもよい。   The data processing unit 64 further includes a run generation unit 647, a parallel processing control unit 648, and a data initial setting unit 649. The run generation unit 647 performs run length processing on the extracted image data to generate an extracted run data group, and performs run length processing on the mask image data to generate a mask run data group, and stores them in the storage unit 645. Let In addition, the parallel processing control unit 648 causes the threads executed in each processor core 641 to be executed in parallel while performing exclusive control. Further, the data initial setting unit 649 appropriately clears the memory contents of the run development memory, the start position memory, and the end position memory to zero. In this embodiment, the mask run data group is generated from the mask image data. However, the mask run data group is stored in the storage unit 7 in advance, and the mask run data group from the storage unit 7 is used for masking. You may comprise so that a process may be performed.

次に、上記のように構成されたデータ処理部64によるデータ演算動作について図4ないし図8を参照しつつ説明する。図4はデータ処理部によるデータ演算動作の一例を模式的に示す説明図である。ここでは、データ演算動作の理解を助けるために、二値化処理部63により作成された抽出画像データとして図4中の符号Deで示す1×6画素の二値画像データがデータ処理部64に与えられるとともにマスク画像データとして図4中の符号Dmで示す1×6画素の二値画像データがデータ処理部64に与えられた場合を例示して説明する。   Next, a data calculation operation by the data processing unit 64 configured as described above will be described with reference to FIGS. FIG. 4 is an explanatory diagram schematically showing an example of a data calculation operation by the data processing unit. Here, in order to help understanding of the data calculation operation, 1 × 6 pixel binary image data indicated by reference character De in FIG. 4 is input to the data processing unit 64 as the extracted image data created by the binarization processing unit 63. An example will be described in which binary image data of 1 × 6 pixels indicated by reference numeral Dm in FIG. 4 is given to the data processing unit 64 as mask image data.

データ処理部64に入力された抽出画像データに対し、ランレングス化処理がラン生成部647で実行されて抽出ランデータが生成され、記憶部645に記憶される。ランレングス化処理については従来周知技術が数多く提案されており、本実施形態においても一般的なランレングス化処理をそのまま用いており、抽出画像データDeに対してランレングス化処理を施すことで1つの抽出ランデータre[0]が得られる。なお、同図中の符号「X0」は画像データにおける当該ランの始端画素位置を示す列インデクス(始端座標)を示し、符号「X1」は画像データにおける当該ランの終端画素位置を示す列インデクス(終端座標)を示し、符号「Y」は画像データにおける当該ランの行インデクスを示している。   A run length process is performed on the extracted image data input to the data processing unit 64 by the run generation unit 647 to generate extracted run data, which is stored in the storage unit 645. Many known techniques have been proposed for the run-length processing, and the general run-length processing is used as it is in this embodiment as well, and the run-length processing is performed by applying the run-length processing to the extracted image data De. Two pieces of extracted run data re [0] are obtained. In the figure, reference numeral “X0” indicates a column index (starting end coordinate) indicating the start pixel position of the run in the image data, and reference numeral “X1” indicates a column index (end index position indicating the end pixel position of the run in the image data). “Y” indicates the row index of the run in the image data.

また、データ処理部64では、抽出画像データ以外に、マスク画像データに対してもランレングス化処理が実行されてマスクランデータが生成され、記憶部645に記憶される。マスク画像データDmに対するランレングス化処理によって2つのマスクランデータrm[0]、rm[1]が得られる。   In addition to the extracted image data, the data processing unit 64 performs a run length process on the mask image data to generate mask run data, which is stored in the storage unit 645. Two mask run data rm [0] and rm [1] are obtained by the run length process for the mask image data Dm.

こうして抽出ランデータre[0]からなる抽出ランデータ群と、マスクランデータrm[0]、rm[1]からなるマスクランデータ群とが生成される。そして、「ラン展開処理」、「重なり情報取得処理」および「論理積判定処理」が実行され、これによって抽出ランデータ群とマスクランデータ群との論理積が演算される。   Thus, an extracted run data group composed of the extracted run data re [0] and a mask run data group composed of the mask run data rm [0], rm [1] are generated. Then, “run development processing”, “overlap information acquisition processing”, and “logical product determination processing” are executed, and the logical product of the extracted run data group and the mask run data group is calculated.

ラン展開処理は、ラン展開メモリのアドレスに記憶されている値をゼロにクリアした後で、ランデータ毎にデータ展開操作して両ランデータ群に含まれるランデータのすべてをラン展開メモリs1のアドレス空間に展開して記憶させるものであり、本発明の「ラン展開工程」の一例に相当する。ここで、データ展開操作をシリアルで行うことも可能であるが、この場合、ラン展開処理に多大な時間を費やしてしまう。   In the run development process, after the value stored in the address of the run development memory is cleared to zero, the data development operation is performed for each run data, and all the run data included in both run data groups are stored in the run development memory s1. This is developed and stored in the address space, and corresponds to an example of the “run development process” of the present invention. Here, it is possible to perform the data development operation serially, but in this case, a great amount of time is spent on the run development processing.

そこで、本実施形態では、ランデータ毎のデータ展開操作を一の「展開スレッド」とし、各プロセッサコア641により展開スレッドが並列的に実行される。つまり、図3および図5に示すように、第0プロセッサコア641ではランデータre[0]を処理対象ランデータとしてデータ展開操作が実行され、これに並行して第1プロセッサコア641ではランデータrm[0]を処理対象ランとして、また第2プロセッサコア641ではランデータrm[1]を処理対象ランとしてデータ展開操作が実行される。ただし、各データ展開操作では、次に説明するようにラン展開メモリs1の書換作業が伴うため、本実施形態では並列処理制御部648がプロセッサコア641間での排他制御を行う。   Therefore, in this embodiment, the data expansion operation for each run data is defined as one “expanded thread”, and the expanded threads are executed in parallel by the processor cores 641. That is, as shown in FIGS. 3 and 5, the 0th processor core 641 executes the data expansion operation using the run data re [0] as the processing target run data, and the first processor core 641 concurrently executes the run data. The data expansion operation is executed with rm [0] as the processing target run and the second processor core 641 with the run data rm [1] as the processing target run. However, since each data expansion operation involves rewriting the run expansion memory s1 as described below, the parallel processing control unit 648 performs exclusive control between the processor cores 641 in this embodiment.

図5は各プロセッサコアで実行されるデータ展開操作の内容を示す図である。データ展開操作は、ランデータの始端座標に対応するラン展開メモリs1のアドレスに記憶されている値に既定値(本実施形態では「1」)を加算する一方で当該ランデータの終端座標に対応するラン展開メモリs1のアドレスに記憶されている値から既定値を減算する操作である。例えば第0スレッドはランデータre[0]の始端座標X0に対応するラン展開メモリs1のアドレス(図4中のアドレス[2])に記憶されている値s1[2]に1を加算する。つまり、ラン展開メモリs1のアドレス[2]に対して他のスレッドによる書換が行われる間待機する一方、書換禁止が解除されていることを条件に次式の加算処理
s1[2]=s1[2]+1
を実行する。それに続いて、ランデータre[0]の終端座標X1に対応するラン展開メモリs1のアドレス(図4中のアドレス[6])に記憶されている値s1[6]から1を減算する。つまり、ラン展開メモリs1のアドレス[6]に対して他のスレッドによる書換が行われる間待機する一方、書換禁止が解除されていることを条件に次式の減算処理
s1[6]=s1[6]−1
を実行する。
FIG. 5 is a diagram showing the contents of the data expansion operation executed in each processor core. The data expansion operation adds a predetermined value (“1” in the present embodiment) to the value stored in the address of the run expansion memory s1 corresponding to the start end coordinate of the run data, while corresponding to the end coordinate of the run data. The predetermined value is subtracted from the value stored in the address of the run development memory s1. For example, the 0th thread adds 1 to the value s1 [2] stored in the address (the address [2] in FIG. 4) of the run development memory s1 corresponding to the start end coordinate X0 of the run data re [0]. In other words, while waiting for the rewriting by another thread to the address [2] of the run development memory s1, the addition processing of the following equation is performed on the condition that the prohibition of rewriting is released: s1 [2] = s1 [ 2] +1
Execute. Subsequently, 1 is subtracted from the value s1 [6] stored in the address (address [6] in FIG. 4) of the run development memory s1 corresponding to the end coordinate X1 of the run data re [0]. In other words, while waiting for the rewriting by another thread to the address [6] of the run development memory s1, the subtraction processing s1 [6] = s1 [ 6] -1
Execute.

このようなデータ展開操作をランデータ毎に行うことで、抽出ランデータ群のランデータおよびマスクランデータ群のランデータが全てラン展開メモリs1のアドレス空間[0]〜[6]に展開され記憶される。そして、こうして展開されたデータに対してプレフィクススキャン(prefixscan;「プリフィクススキャン」ともいう)を実行することで全ランデータの重なり状態を示す重なり情報を取得する(重なり情報取得処理)。   By performing such a data expansion operation for each run data, all the run data of the extracted run data group and the run data of the mask run data group are expanded and stored in the address spaces [0] to [6] of the run expansion memory s1. Is done. Then, by performing a prefix scan (also referred to as “prefix scan”) on the data thus expanded, overlap information indicating an overlap state of all run data is acquired (overlap information acquisition processing).

図6は重なり情報取得処理の内容を示す図であり、図7はプレフィクススキャンの動作概要を示す図である。ここで、「プレフィクススキャン」とは一次元配列の第m番目に元の配列の0番目からm番目までの総和を入れる処理を意味している。そして、本実施形態では、アドレス毎のプレフィクススキャン操作をシリアルに行うのではなく、並列的に行っている。つまり、ラン展開メモリs1以外に別の2つのラン展開メモリs2、s3が記憶部645に設けられ、図6および図7に示すように、アドレス毎のプレフィクススキャン操作を一の「スキャンスレッド」とし、各プロセッサコア641によりスキャンスレッドが並列的に実行される。   FIG. 6 is a diagram showing the contents of the overlap information acquisition process, and FIG. 7 is a diagram showing an outline of the prefix scan operation. Here, the “prefix scan” means a process of adding the sum from the 0th to the mth of the original array to the mth of the one-dimensional array. In this embodiment, the prefix scan operation for each address is performed in parallel rather than serially. That is, in addition to the run development memory s1, two other run development memories s2 and s3 are provided in the storage unit 645, and as shown in FIGS. 6 and 7, the prefix scan operation for each address is performed as one “scan thread”. And a scan thread is executed in parallel by each processor core 641.

図4に示す具体例では、ラン展開メモリs1のアドレス空間[0]〜[6]の一次元配列{1、−1、1、1、0、−1、−1}は、アドレス毎のプレフィクススキャン操作によって配列{1、0、1、2、2、1、0}となり、各アドレスに記憶されている値、つまり画素毎の重なり状態を示す重なり情報に基づいて論理演算することが可能となる。本実施形態では、マスク処理を行うために2つのランデータ群の論理積を実行する必要があり、値「2」に着目して論理判定処理部644が論理演算判定として論理積判定処理を行う。ただし、値「2」は当該アドレス[m]に対応する画素でランデータ群が重なっていることを示しているに過ぎず、始端座標であることを確認するためにはアドレス[m−1]に記憶されている値s1[m−1]が「2」よりも小さい(1以下)であることを確認する必要がある。また、終端座標であることを確認するためにはアドレス[m+1]に記憶されている値s1[m+1]が「2」よりも小さい(1以下)であることを確認する必要がある。なお、ランデータ群の数が3以上の場合であっても基本的に同じであり、ランデータ群の数N(2以上の自然数)に着目し、次に説明する論理積判定処理を行うことができる。   In the specific example shown in FIG. 4, the one-dimensional array {1, -1, 1, 1, 0, -1, -1} of the address space [0] to [6] of the run development memory s1 An array {1, 0, 1, 2, 2, 1, 0} is obtained by a fix scan operation, and a logical operation can be performed based on a value stored in each address, that is, overlap information indicating an overlap state for each pixel. It becomes. In the present embodiment, it is necessary to perform logical product of two run data groups in order to perform mask processing, and the logical determination processing unit 644 performs logical product determination processing as logical operation determination by paying attention to the value “2”. . However, the value “2” merely indicates that the run data groups overlap at the pixel corresponding to the address [m], and the address [m−1] is used to confirm that the start data is the start coordinate. It is necessary to confirm that the value s1 [m−1] stored in is smaller than “2” (1 or less). In order to confirm that the coordinates are the end coordinates, it is necessary to confirm that the value s1 [m + 1] stored in the address [m + 1] is smaller than “2” (1 or less). Note that even if the number of run data groups is 3 or more, it is basically the same. Focusing on the number N of run data groups (a natural number of 2 or more), the logical product determination process described below is performed. Can do.

図8は論理積判定処理の内容を示す図である。この論理積判定処理は、重なり情報取得処理を実行した後のラン展開メモリs1の各アドレスに記憶される値に基づいて各アドレスに対応する画素が論理積処理により得られるランデータの始端座標あるいは終端座標であるか否かを判定するものである。本実施形態では、論理積判定処理に先立って始端位置メモリssおよび終端位置メモリseの各アドレスに記憶されている値をゼロにクリアする。そして、論理積判定処理においても、重なり情報取得処理と同様に一画素一スレッドで判定操作を行っている。つまり、アドレス空間のm番目のアドレスが論理演算後のランの始端座標あるいは終端座標に対応するか否かを判定する判定操作を図8に示すように一の「判定スレッド」とし、各プロセッサコア641により判定スレッドが並列的に実行される。   FIG. 8 is a diagram showing the contents of the logical product determination process. This logical product determination process is performed by using the start coordinates of the run data obtained by performing the logical product process on pixels corresponding to each address based on the values stored in the respective addresses of the run development memory s1 after the overlap information acquisition process is executed. It is determined whether or not it is a terminal coordinate. In the present embodiment, prior to the logical product determination process, the values stored in the addresses of the start position memory ss and the end position memory se are cleared to zero. In the logical product determination process, the determination operation is performed with one pixel and one thread as in the overlap information acquisition process. That is, the determination operation for determining whether or not the mth address in the address space corresponds to the start end coordinate or end end coordinate of the run after the logical operation is defined as one “determination thread” as shown in FIG. In 641, the determination thread is executed in parallel.

各判定スレッドは大きく分けて始端座標の判定と終端座標の判定とを順番に実行する。始端座標の判定は、アドレス空間のm番目のアドレスに記憶された値(=s1[m])と(m−1)番目のアドレスに記憶された値(=s1[m−1])とに基づいてm番目のアドレスが論理積処理後のランの始端座標に対応するか否かにより行われる。より具体的には、以下の2つの条件(AND1)、(AND2)
(AND1)…値s1[m]がランデータ群の数Nと一致する、
(AND2)…値s1[m−1]が(N−1)以下である、
をともに満足するときに、始端位置メモリssのアドレス[m]に記憶される値を「1」にセットする。したがって、図4に示す具体例では、ランデータ数N=2であり、m=3においてのみ上記条件(AND1)、(AND2)が満足されるために、値ss[3]のみが「1」となり、それ以外の値ss[0]〜ss[2]、ss[4]、ss[5]は「0」のまま維持される。
Each determination thread is roughly divided into determination of the start end coordinate and determination of the end coordinate. The determination of the start end coordinate is made based on the value (= s1 [m]) stored at the mth address in the address space and the value (= s1 [m-1]) stored at the (m−1) th address. Based on whether or not the mth address corresponds to the starting end coordinate of the run after the AND operation. More specifically, the following two conditions (AND1) and (AND2)
(AND1) value s1 [m] matches the number N of run data groups,
(AND2) ... value s1 [m-1] is (N-1) or less,
When both are satisfied, the value stored in the address [m] of the start position memory ss is set to “1”. Therefore, in the specific example shown in FIG. 4, since the number of run data N = 2 and the above conditions (AND1) and (AND2) are satisfied only when m = 3, only the value ss [3] is “1”. The other values ss [0] to ss [2], ss [4], and ss [5] are maintained at “0”.

また、終端座標の判定は、アドレス空間のm番目のアドレスに記憶された値(=s1[m])と(m+1)番目のアドレスに記憶された値(=s1[m+1])とに基づいてm番目のアドレスが論理積処理後のランの終端座標に対応するか否かにより行われる。より具体的には、上記した条件(AND1)とともに、条件(AND3)、つまり、
(AND3)…値s1[m+1]が(N−1)以下である、
を満足するときに、終端位置メモリseのアドレス[m]に記憶される値を「1」にセットする。したがって、図4に示す具体例では、ランデータ数N=2であり、m=4においてのみ上記条件(AND1)、(AND3)が満足されるために、値se[4]のみが「1」となり、それ以外の値se[0]〜se[3]、se[5]は「0」のまま維持される。
The determination of the end coordinates is based on the value (= s1 [m]) stored at the mth address in the address space and the value (= s1 [m + 1]) stored at the (m + 1) th address. This is performed depending on whether or not the mth address corresponds to the end coordinates of the run after the logical product processing. More specifically, together with the above condition (AND1), the condition (AND3), that is,
(AND3) ... value s1 [m + 1] is (N-1) or less,
Is satisfied, the value stored in the address [m] of the end position memory se is set to “1”. Therefore, in the specific example shown in FIG. 4, since the number of run data N = 2 and the above conditions (AND1) and (AND3) are satisfied only when m = 4, only the value se [4] is “1”. The other values se [0] to se [3] and se [5] are maintained as “0”.

こうして抽出ランデータ群とマスクランデータ群との論理積後におけるランの始端座標および終端座標が求まる。それに続いて、始端位置メモリssおよび終端位置メモリseの記憶情報に基づいて欠陥ランデータrd[m]を取得する。例えば図4に示す具体例では、値ss[3]が「1」であり、値se[4]が「1」であり、それ以外の値は「0」であることから欠陥ランデータrd[m]は、ランデータrd[0](始端座標X0=3、終端座標X1=5、行インデクスY=0)となる。そして、当該欠陥ランデータrd[m]に基づいて欠陥画像データを作成し、出力する(欠陥画像データの作成処理:論理和画像データの作成処理)。   Thus, the start end coordinates and end coordinates of the run after the logical product of the extracted run data group and the mask run data group are obtained. Subsequently, defect run data rd [m] is acquired based on the storage information in the start position memory ss and the end position memory se. For example, in the specific example shown in FIG. 4, the value ss [3] is “1”, the value se [4] is “1”, and the other values are “0”. m] is run data rd [0] (start coordinate X0 = 3, end coordinate X1 = 5, row index Y = 0). Then, defect image data is created and output based on the defect run data rd [m] (defect image data creation processing: logical sum image data creation processing).

以上のように、本実施形態によれば、抽出ランデータ群およびマスクランデータ群をビットマップデータに変換することなく、2つのランデータ群の論理積を求めており、論理演算を短時間で行うことができる。ビットマップデータへの変換を不要とする点では、特許文献1に記載の発明と共通するが、次の点で大きく相違している。つまり、本実施形態では、ランデータ毎のデータ展開操作およびアドレス毎のスキャン操作により全ランデータの重なり状態を示す重なり情報を取得し、さらに当該重なり情報に基づいて抽出ランデータ群およびマスクランデータ群の論理積を求めている。したがって、特許文献1に記載の発明における論理演算方法、つまり一方端のランから順に接続判定し、重なっている部分に応じて論理演算を行う方法に比べて高速な演算処理が可能となり、演算時間を短縮することができる。特に、ランデータの個数が増大すると、本実施形態の優位性はさらに高まる。   As described above, according to this embodiment, the logical product of two run data groups is obtained without converting the extracted run data group and the mask run data group into bitmap data, and the logical operation can be performed in a short time. It can be carried out. Although it is the same as the invention described in Patent Document 1 in that conversion to bitmap data is not required, it is greatly different in the following points. That is, in this embodiment, overlap information indicating the overlap state of all run data is acquired by a data expansion operation for each run data and a scan operation for each address, and the extracted run data group and the mask run data are further based on the overlap information. Find the logical product of groups. Therefore, compared to the logical operation method in the invention described in Patent Document 1, that is, the connection determination is performed in order from one end of the run, and the logical operation is performed according to the overlapping portion, high-speed arithmetic processing can be performed, and the calculation time is reduced. Can be shortened. In particular, when the number of run data increases, the advantage of this embodiment further increases.

また上記実施形態では、ラン展開処理を実行するにあたって、ランデータ毎のラン展開操作を展開スレッドとし、1ランデータ1展開スレッドでラン展開操作を並列的に実行しているため、ラン展開処理に要する時間を短縮している。なお、本実施形態では展開スレッドの個数とランデータの個数とを一致させているが、複数のランデータの分割態様はこれに限定されるものではない。つまり、プロセッサコア641の個数に応じて複数のランデータの分割態様を適宜変更してもよく、複数のランデータをプロセッサコア641の個数に応じて複数組に分割し、各プロセッサコアが分割された一または複数のランデータについてラン展開操作を展開スレッドとして実行するように構成してもよい。この点については、重なり情報取得処理および論理積判定処理においても同様である。   In the above embodiment, when executing the run development process, the run development operation for each run data is set as the development thread, and the run development operation is executed in parallel by one run data one development thread. The time required is shortened. In this embodiment, the number of development threads and the number of run data are made to coincide with each other, but the division mode of a plurality of run data is not limited to this. In other words, the division mode of the plurality of run data may be appropriately changed according to the number of the processor cores 641. The plurality of run data is divided into a plurality of sets according to the number of the processor cores 641, and each processor core is divided. Alternatively, the run expansion operation may be executed as an expansion thread for one or a plurality of run data. The same applies to the overlap information acquisition process and the logical product determination process.

また上記実施形態では、ラン展開処理のみならず、重なり情報取得処理および論理積判定処理においても複数のプロセッサコア641による並列処理を行っており、処理時間の短縮に大きく寄与している。すなわち、重なり情報取得処理で行われるプレフィクススキャンでは、アドレス毎のプレフィクススキャン操作を一の「スキャンスレッド」とし、各プロセッサコア641によりスキャンスレッドを並列的に行っている。また、論理積判定処理では、一画素一判定スレッドで判定操作を行っている。つまり、アドレス空間のm番目のアドレスが論理演算後のランの始端座標あるいは終端座標に対応するか否かを判定する判定操作を一の「判定スレッド」とし、各プロセッサコア641により判定スレッドを並列的に行っている。したがって、重なり情報取得処理や論理積判定処理に要する時間を短縮することができる。   In the above embodiment, parallel processing by a plurality of processor cores 641 is performed not only in the run development process but also in the overlap information acquisition process and the logical product determination process, which greatly contributes to shortening of the processing time. That is, in the prefix scan performed in the overlap information acquisition process, the prefix scan operation for each address is set as one “scan thread”, and the scan threads are performed in parallel by the processor cores 641. In the logical product determination process, the determination operation is performed by one pixel and one determination thread. In other words, the determination operation for determining whether the mth address in the address space corresponds to the start end coordinate or the end coordinate of the run after the logical operation is defined as one “determination thread”, and the determination threads are parallelized by each processor core 641. Is going. Therefore, the time required for the overlap information acquisition process and the logical product determination process can be shortened.

さらに、上記実施形態では、第0〜第nプロセッサコア641の上位に位置する並列処理制御部648がラン展開メモリs1のアクセス管理を行い、異なる複数のプロセッサコア641がラン展開メモリs1の同一アドレスに対してデータ書換を行うのを防止している。つまり、一の展開スレッドでラン展開メモリs1のアドレス[m]に記憶されている値s1[m]の書換を行う時には、他の展開スレッドが値s1[m]を書き換えるのを一時的に禁止している。一方、アドレス[m]以外のラン展開メモリs1を自由化してデータ書換を許可している。したがって、ラン展開処理の競合を回避しつつラン展開処理を高速に行うことが可能となっている。   Furthermore, in the above embodiment, the parallel processing control unit 648 located above the 0th to nth processor cores 641 performs access management of the run development memory s1, and different processor cores 641 have the same address of the run development memory s1. Data rewriting is prevented. That is, when the value s1 [m] stored in the address [m] of the run expansion memory s1 is rewritten by one expansion thread, the other expansion threads are temporarily prohibited from rewriting the value s1 [m]. doing. On the other hand, the run expansion memory s1 other than the address [m] is liberated to permit data rewriting. Therefore, the run development process can be performed at high speed while avoiding the competition of the run development process.

ところで、上記実施形態ではマスク処理を行うために、重なり情報に基づく論理判定処理として論理積判定を行っているが、その他の処理、例えば検査結果の統合を行うために論理和判定処理を行うことができる。また、上記論理判定処理として排他的論和判定処理を行うことも可能であり、論理積判定処理の場合と同様の作用効果が得られる。以下、論理和判定処理および排他的論和判定処理について図面を参照しつつ説明する。   By the way, in the above embodiment, in order to perform mask processing, logical product determination is performed as logical determination processing based on overlap information. However, other processing, for example, logical sum determination processing is performed to integrate inspection results. Can do. In addition, exclusive logical sum determination processing can be performed as the logical determination processing, and the same operation and effect as in the logical product determination processing can be obtained. Hereinafter, the logical sum determination process and the exclusive logical sum determination process will be described with reference to the drawings.

図9はデータ処理部によるデータ演算動作の他の例を模式的に示す説明図である。ここでは、データ演算動作の理解を助けるために、二値化処理部63により作成された第1画像データとして図9中の符号D1で示す1×6画素の第1画像データがデータ処理部64に与えられるとともに第2画像データとして図9中の符号D2で示す1×6画素の第2画像データがデータ処理部64に与えられた場合を例示して説明する。なお、冗長な説明を回避するため、第1画像データD1は図4の抽出画像データDeと同一であり、第2画像データD2は図4のマスク画像データDmと同一である場合を例示している。したがって、重なり情報が得られるまでの処理は上記実施形態(図4)と同一である。これらの点については、後で説明する排他的論和判定処理の説明においても同一である。   FIG. 9 is an explanatory diagram schematically showing another example of the data calculation operation by the data processing unit. Here, in order to help the understanding of the data operation, the first image data of 1 × 6 pixels indicated by the symbol D1 in FIG. 9 is used as the first image data created by the binarization processing unit 63. A case where 1 × 6 pixel second image data indicated by reference numeral D2 in FIG. 9 is given to the data processing unit 64 as the second image data will be described as an example. In order to avoid redundant description, the first image data D1 is the same as the extracted image data De in FIG. 4, and the second image data D2 is the same as the mask image data Dm in FIG. Yes. Therefore, the process until the overlap information is obtained is the same as that in the above embodiment (FIG. 4). These points are the same in the explanation of the exclusive OR determination process described later.

図10は論理和判定処理の内容を示す図である。この論理和判定処理は、重なり情報取得処理を実行した後のラン展開メモリs1の各アドレスに記憶される値に基づいて各アドレスに対応する画素が論理和処理により得られるランデータの始端座標あるいは終端座標であるか否かを判定するものである。本実施形態では、論理和判定処理においても、重なり情報取得処理と同様に一画素一スレッドで判定操作を行っている。つまり、アドレス空間のm番目のアドレスが論理和処理後のランの始端座標あるいは終端座標に対応するか否かを判定する判定操作を図10に示すように一の「判定スレッド」とし、各プロセッサコア641により判定スレッドが並列的に実行される。   FIG. 10 shows the contents of the logical sum determination process. In this logical sum determination process, the start coordinate of the run data obtained by performing the logical sum process on the pixel corresponding to each address based on the value stored in each address of the run development memory s1 after the overlap information acquisition process is executed. It is determined whether or not it is a terminal coordinate. In this embodiment, also in the logical sum determination process, the determination operation is performed with one pixel and one thread as in the overlap information acquisition process. That is, the determination operation for determining whether or not the mth address in the address space corresponds to the start end coordinate or end end coordinate of the run after the OR operation is defined as one “determination thread” as shown in FIG. The determination thread is executed in parallel by the core 641.

各判定スレッドは大きく分けて始端座標の判定と終端座標の判定とを順番に実行する。始端座標の判定は、アドレス空間のm番目のアドレスに記憶された値(=s1[m])と(m−1)番目のアドレスに記憶された値(=s1[m−1])とに基づいてm番目のアドレスが論理演算後のランの始端座標に対応するか否かを判定するものである。より具体的には、以下の2つの条件(OR1)、(OR2)
(OR1)…値s1[m]が1以上である、
(OR2)…値s1[m−1]が「0」である、
をともに満足するときに、始端位置メモリssのアドレス[m]に記憶される値ss[m]を「1」にセットする。したがって、図9に示す具体例では、m=0、2において上記条件(OR1)、(OR2)が満足されるために、値ss[0]、ss[2]が「1」となり、それ以外の値ss[1]、ss[3]〜ss[5]は「0」のまま維持される。
Each determination thread is roughly divided into determination of the start end coordinate and determination of the end coordinate. The determination of the start end coordinate is made based on the value (= s1 [m]) stored at the mth address in the address space and the value (= s1 [m-1]) stored at the (m−1) th address. Based on this, it is determined whether or not the mth address corresponds to the start end coordinate of the run after the logical operation. More specifically, the following two conditions (OR1) and (OR2)
(OR1) ... value s1 [m] is 1 or more,
(OR2) value s1 [m−1] is “0”,
When both are satisfied, the value ss [m] stored in the address [m] of the start position memory ss is set to “1”. Therefore, in the specific example shown in FIG. 9, since the above conditions (OR1) and (OR2) are satisfied at m = 0 and 2, the values ss [0] and ss [2] are “1”, and otherwise The values ss [1] and ss [3] to ss [5] are maintained at “0”.

また、終端座標の判定は、アドレス空間のm番目のアドレスに記憶された値(=s1[m])と(m+1)番目のアドレスに記憶された値(=s1[m+1])とに基づいてm番目のアドレスが論理和処理後のランの終端座標に対応するか否かを判定するものである。より具体的には、上記した条件(OR1)とともに、条件(OR3)、つまり、
(OR3)…値s1[m+1]が「0」である、
を満足するときに、終端位置メモリseのアドレス[m]に記憶される値se[m]を「1」にセットする。したがって、図9に示す具体例では、m=0、5においてのみ上記条件(OR1)、(OR3)が満足されるために、値se[0]、se[5]が「1」となり、それ以外の値se[1]〜se[4]は「0」のまま維持される。
The determination of the end coordinates is based on the value (= s1 [m]) stored at the mth address in the address space and the value (= s1 [m + 1]) stored at the (m + 1) th address. It is determined whether or not the mth address corresponds to the end coordinates of the run after the logical sum process. More specifically, together with the above condition (OR1), the condition (OR3), that is,
(OR3) value s1 [m + 1] is “0”,
Is satisfied, the value se [m] stored in the address [m] of the end position memory se is set to “1”. Therefore, in the specific example shown in FIG. 9, since the above conditions (OR1) and (OR3) are satisfied only when m = 0, 5, the values se [0] and se [5] are “1”. The values se [1] to se [4] other than are maintained as “0”.

こうして第1ランデータ群と第2ランデータ群との論理和処理後におけるランの始端座標および終端座標が求まる。それに続いて、始端位置メモリssおよび終端位置メモリseの記憶情報に基づいて論理和処理のランデータrd[m]を取得する。例えば図9に示す具体例では、値ss[0]、ss[2]が「1」であり、値se[0]、se[5]が「1」であり、それ以外の値は「0」であることから論理和処理後のランデータrd[m]は、ランデータrd[0](始端座標X0=3、終端座標X1=1、行インデクスY=0)と、ランデータrd[1](始端座標X0=2、終端座標X1=6、行インデクスY=0)となる。そして、当該ランデータrd[m]に基づいて論理和画像データを作成し、出力する(論理和画像データの作成処理)。   In this way, the start end coordinates and end coordinates of the run after the logical sum processing of the first run data group and the second run data group are obtained. Subsequently, run data rd [m] of the logical sum process is acquired based on the stored information in the start position memory ss and the end position memory se. For example, in the specific example shown in FIG. 9, the values ss [0] and ss [2] are “1”, the values se [0] and se [5] are “1”, and other values are “0”. Therefore, the run data rd [m] after the logical sum process has run data rd [0] (start coordinate X0 = 3, end coordinate X1 = 1, row index Y = 0) and run data rd [1]. ] (Start end coordinate X0 = 2, end coordinate X1 = 6, row index Y = 0). Then, logical image data is created based on the run data rd [m] and output (logical image data creation process).

図11はデータ処理部によるデータ演算動作の別の例を模式的に示す説明図である。また、図12は排他的論理和判定処理の内容を示す図である。この排他的論理和判定処理は、重なり情報取得処理を実行した後のラン展開メモリs1の各アドレスに記憶される値に基づいて各アドレスに対応する画素が排他的論理和処理により得られるランデータの始端座標あるいは終端座標であるか否かを判定するものである。本実施形態では、排他的論理和判定処理においても、重なり情報取得処理と同様に一画素一スレッドで判定操作を行っている。つまり、アドレス空間のm番目のアドレスが排他的論理和処理後のランの始端座標あるいは終端座標に対応するか否かを判定する判定操作を図12に示すように一の「判定スレッド」とし、各プロセッサコア641により判定スレッドが並列的に実行される。   FIG. 11 is an explanatory diagram schematically showing another example of the data calculation operation by the data processing unit. FIG. 12 is a diagram showing the contents of exclusive OR determination processing. In this exclusive OR determination process, run data in which pixels corresponding to each address are obtained by the exclusive OR process based on values stored in each address of the run development memory s1 after the overlap information acquisition process is executed. It is determined whether it is the start end coordinate or the end coordinate. In the present embodiment, also in the exclusive OR determination process, the determination operation is performed with one pixel and one thread as in the overlap information acquisition process. That is, the determination operation for determining whether or not the mth address in the address space corresponds to the start end coordinate or end end coordinate of the run after exclusive OR processing is set as one “determination thread” as shown in FIG. Each processor core 641 executes determination threads in parallel.

各判定スレッドは大きく分けて始端座標の判定と終端座標の判定とを順番に実行する。始端座標の判定は、アドレス空間のm番目のアドレスに記憶された値(=s1[m])と(m−1)番目のアドレスに記憶された値(=s1[m−1])とに基づいてm番目のアドレスが論理演算後のランの始端座標に対応するか否かを判定するものである。より具体的には、以下の2つの条件(XOR1)、(XOR2)
(XOR1)…値s1[m]が奇数である、
(XOR2)…値s1[m−1]が偶数である、
をともに満足するときに、始端位置メモリssのアドレス[m]に記憶される値ss[m]を「1」にセットする。したがって、図11に示す具体例では、m=0、2、5において上記条件(XOR1)、(XOR2)が満足されるために、値ss[0]、ss[2]、ss[5]が「1」となり、それ以外の値ss[1]、ss[3]、ss[4]は「0」のまま維持される。
Each determination thread is roughly divided into determination of the start end coordinate and determination of the end coordinate. The determination of the start end coordinate is made based on the value (= s1 [m]) stored at the mth address in the address space and the value (= s1 [m-1]) stored at the (m−1) th address. Based on this, it is determined whether or not the mth address corresponds to the start end coordinate of the run after the logical operation. More specifically, the following two conditions (XOR1) and (XOR2)
(XOR1) value s1 [m] is an odd number,
(XOR2) ... value s1 [m-1] is an even number,
When both are satisfied, the value ss [m] stored in the address [m] of the start position memory ss is set to “1”. Therefore, in the specific example shown in FIG. 11, since the above conditions (XOR1) and (XOR2) are satisfied at m = 0, 2, and 5, the values ss [0], ss [2], and ss [5] “1”, and the other values ss [1], ss [3], and ss [4] are maintained at “0”.

また、終端座標の判定は、アドレス空間のm番目のアドレスに記憶された値(=s1[m])と(m+1)番目のアドレスに記憶された値(=s1[m+1])とに基づいてm番目のアドレスが排他的論理和処理後のランの終端座標に対応するか否かを判定するものである。より具体的には、上記した条件(XOR1)とともに、条件(XOR3)、つまり、
(XOR3)…値s1[m+1]が偶数である、
を満足するときに、終端位置メモリseのアドレス[m]に記憶される値se[m]を「1」にセットする。したがって、図11に示す具体例では、m=0、2、5において上記条件(XOR1)、(XOR3)が満足されるために、値se[0]、se[2]、se[5]が「1」となり、それ以外の値se[1]、se[3]、se[4]は「0」のまま維持される。
The determination of the end coordinates is based on the value (= s1 [m]) stored at the mth address in the address space and the value (= s1 [m + 1]) stored at the (m + 1) th address. It is determined whether or not the mth address corresponds to the end coordinates of the run after the exclusive OR process. More specifically, together with the condition (XOR1) described above, the condition (XOR3), that is,
(XOR3) ... value s1 [m + 1] is an even number,
Is satisfied, the value se [m] stored in the address [m] of the end position memory se is set to “1”. Therefore, in the specific example shown in FIG. 11, since the above conditions (XOR1) and (XOR3) are satisfied at m = 0, 2, and 5, the values se [0], se [2], and se [5] “1”, and the other values se [1], se [3], and se [4] are maintained at “0”.

こうして第1ランデータ群と第2ランデータ群との排他的論理和処理後におけるランの始端座標および終端座標が求まる。それに続いて、始端位置メモリssおよび終端位置メモリseの記憶情報に基づいて排他的論理和処理後のランデータrd[m]を取得する。例えば図11に示す具体例では、値ss[0]、ss[2]、ss[5]が「1」であり、値se[0]、se[2]、se[5]が「1」であり、それ以外の値は「0」であることから排他的論理和処理後のランデータrd[m]は、ランデータrd[0](始端座標X0=0、終端座標X1=1、行インデクスY=0)と、ランデータrd[1](始端座標X0=2、終端座標X1=3、行インデクスY=0)と、ランデータrd[2](始端座標X0=5、終端座標X1=6、行インデクスY=0)となる。そして、当該ランデータrd[m]に基づいて排他的論理和画像データを作成し、出力する(排他的論理和画像データの作成処理)。   In this way, the start end coordinates and end coordinates of the run after the exclusive OR process of the first run data group and the second run data group are obtained. Subsequently, the run data rd [m] after the exclusive OR process is acquired based on the storage information of the start position memory ss and the end position memory se. For example, in the specific example shown in FIG. 11, the values ss [0], ss [2], and ss [5] are “1”, and the values se [0], se [2], and se [5] are “1”. Since the other values are “0”, the run data rd [m] after the exclusive OR process is run data rd [0] (start coordinate X0 = 0, end coordinate X1 = 1, row Index Y = 0), run data rd [1] (start end coordinate X0 = 2, end coordinate X1 = 3, row index Y = 0), run data rd [2] (start end coordinate X0 = 5, end coordinate X1) = 6, row index Y = 0). Then, exclusive OR image data is created and output based on the run data rd [m] (exclusive OR image data creation processing).

なお、本発明は上記した実施形態に限定されるものではなく、その趣旨を逸脱しない限りにおいて上述したもの以外に種々の変更を行うことが可能である。例えば、上記実施形態では、ラン展開処理、重なり情報取得処理および論理判定処理(論理積判定、論理和判定、排他的論理和判定)を実行するために複数のプロセッサコア641を有するGPUを用いているが、GPUの代わりに複数のCPUを設け、各CPUで一のスレッドを実行するように構成してもよい。   The present invention is not limited to the above-described embodiment, and various modifications other than those described above can be made without departing from the spirit of the present invention. For example, in the above-described embodiment, a GPU having a plurality of processor cores 641 is used to execute the run development process, overlap information acquisition process, and logical determination process (logical product determination, logical sum determination, exclusive logical OR determination). However, a plurality of CPUs may be provided in place of the GPU, and each CPU may be configured to execute one thread.

また、上記実施形態では、マスク画像データDm(図4)や第2画像データD2(図9、図11)をデータ処理部65でランレングス化してランデータ群を得ているが、これらの画像データDm、D2に対応するランデータ群を予め記憶部7に記憶しておき、当該ランデータ群を記憶部7からデータ処理部65に与えるように構成してもよい。   In the above embodiment, the mask image data Dm (FIG. 4) and the second image data D2 (FIGS. 9 and 11) are run-lengthed by the data processing unit 65 to obtain a run data group. The run data group corresponding to the data Dm and D2 may be stored in the storage unit 7 in advance, and the run data group may be provided from the storage unit 7 to the data processing unit 65.

また、上記実施形態では、2つのランデータ群に対して論理演算を施しているが、3つ以上のランデータ群に対しても本発明にかかるデータ演算方法を適用することができる。このように3つ以上のランデータ群に対して論理演算する場合、本発明の優位性がさらに増す。すなわち、特許文献1に記載の発明ではランデータ群が3つ以上となると、接続判定の複雑さが飛躍的に上昇し、ランデータ群の増大に伴う処理時間の増加は不可避である。これに対し、本発明では、ランデータ群の増大により展開すべきランデータの個数が増えてラン展開処理に要する時間は2つのランデータ群の場合よりも長くなる可能性はある。しかしながら、重なり情報取得処理および論理判定処理(論理積判定、論理和判定、排他的論理和判定)に要する時間はランデータ群の個数に影響されない。したがって、ランデータの個数増大にもかかわらず、データ演算処理を短時間で行うことができる。   In the above embodiment, the logical operation is performed on the two run data groups. However, the data operation method according to the present invention can be applied to three or more run data groups. Thus, when performing a logical operation on three or more run data groups, the advantage of the present invention is further increased. That is, in the invention described in Patent Document 1, when there are three or more run data groups, the complexity of connection determination increases dramatically, and an increase in processing time due to the increase in run data groups is inevitable. On the other hand, in the present invention, the number of run data to be expanded increases due to an increase in the run data group, and the time required for the run expansion process may be longer than in the case of two run data groups. However, the time required for overlap information acquisition processing and logical determination processing (logical product determination, logical sum determination, exclusive logical sum determination) is not affected by the number of run data groups. Therefore, the data calculation process can be performed in a short time despite the increase in the number of run data.

さらに、上記実施形態では、複数のランデータ群を論理演算するデータ演算技術を欠陥検査装置に適用しているが、本発明にかかるデータ演算方法および装置に適用対象はこれに限定されるものではなく、上記データ演算技術を利用する装置全般に適用することができる。   Furthermore, in the above-described embodiment, the data calculation technique for logically calculating a plurality of run data groups is applied to the defect inspection apparatus, but the application target is not limited to this for the data calculation method and apparatus according to the present invention. However, the present invention can be applied to all devices using the above data calculation technique.

この発明は、複数のランデータ群の論理演算を行うデータ演算技術に対して好適に適用することができる。   The present invention can be suitably applied to a data operation technique for performing a logical operation on a plurality of run data groups.

1…検査システム
5…画像取得部
6…画像処理部
21…撮像部
62…差分抽出部(画像抽出部)
63…二値化処理部
64…データ処理部(データ演算装置)
641…プロセッサコア
642…ラン展開処理部
643…重なり情報取得処理部
644…論理判定処理部
645…記憶部
647…ラン生成部
648…並列処理制御部
649…データ初期設定部
DESCRIPTION OF SYMBOLS 1 ... Inspection system 5 ... Image acquisition part 6 ... Image processing part 21 ... Imaging part 62 ... Difference extraction part (image extraction part)
63 ... Binarization processing unit 64 ... Data processing unit (data arithmetic unit)
641 ... Processor core 642 ... Run development processing unit 643 ... Overlapping information acquisition processing unit 644 ... Logic determination processing unit 645 ... Storage unit 647 ... Run generation unit 648 ... Parallel processing control unit 649 ... Data initial setting unit

Claims (13)

二値画像データをランレングス化して得られる少なくとも1つ以上のランデータをランデータ群とし、互いに異なる複数のランデータ群の論理演算を行うデータ演算方法であって、
ランデータの始端座標に対応するラン展開メモリのアドレスに記憶されている値に既定値を加算する一方で当該ランデータの終端座標に対応する前記ラン展開メモリのアドレスに記憶されている値から前記既定値を減算するデータ展開操作を前記ランデータ毎に実行することで、前記複数のランデータを前記ラン展開メモリのアドレス空間に展開して記憶させるラン展開工程と、
前記アドレス空間のm番目のアドレスに対して前記ラン展開工程を完了した時点で前記アドレス空間の0番目ないし前記m番目のアドレスにそれぞれ記憶された値の総和を書き込む、スキャン操作を前記アドレス空間の各アドレスについて実行して前記複数のランデータの重なり状態を示す重なり情報を取得する重なり情報取得工程と、
前記重なり情報に基づいて前記複数のランデータ群の論理積、論理和および排他的論理和のうちの少なくとも1つを求める論理演算工程と
を備えることを特徴とするデータ演算方法。
A data operation method for performing a logical operation on a plurality of different run data groups, using at least one or more run data obtained by converting the binary image data into run lengths,
The predetermined value is added to the value stored in the address of the run development memory corresponding to the start coordinate of the run data, while the value stored in the address of the run development memory corresponding to the end coordinate of the run data is A run development step of developing and storing the plurality of run data in the address space of the run development memory by executing a data development operation for subtracting a predetermined value for each run data;
When the run expansion process is completed for the mth address in the address space, the total of the values stored in the 0th to mth addresses of the address space is written, and a scan operation is performed in the address space. An overlap information acquisition step that executes overlap information indicating the overlap state of the plurality of run data executed for each address;
And a logical operation step of obtaining at least one of a logical product, a logical sum, and an exclusive logical sum of the plurality of run data groups based on the overlap information.
請求項1に記載のデータ演算方法であって、
前記複数のランデータを複数組に分割するとともに各組に対して実行されるデータ展開操作を展開スレッドとし、
排他制御のもと前記複数の展開スレッドのうちの一の展開スレッドによる前記既定値の加減算を許可するとともに前記一の展開スレッドによる加減算の対象となるアドレスに対する他の展開スレッドによるアクセスを禁止しながら前記複数の展開スレッドを並列して実行するデータ演算方法。
The data calculation method according to claim 1,
Dividing the plurality of run data into a plurality of sets and performing a data expansion operation to be performed on each set as an expansion thread,
While adding and subtracting the default value by one expansion thread of the plurality of expansion threads under exclusive control and prohibiting access by other expansion threads to the address subject to addition and subtraction by the one expansion thread A data operation method for executing the plurality of development threads in parallel.
請求項2に記載のデータ演算方法であって、
前記展開スレッドの個数が前記ランデータの個数と一致するデータ演算方法。
A data calculation method according to claim 2,
A data operation method in which the number of expansion threads matches the number of run data.
請求項2または3に記載のデータ演算方法であって、
前記ラン展開工程では、前記一の展開スレッドによる加減算の対象となるアドレス以外のアドレスに対し、他の展開スレッドによるアクセスを許可するデータ演算方法。
The data calculation method according to claim 2 or 3, wherein
In the run development step, a data operation method for permitting access by an other development thread to an address other than an address subject to addition / subtraction by the one development thread.
請求項1ないし4のいずれか一項に記載のデータ演算方法であって、
前記アドレス空間のm番目のアドレスに記憶された値と(m−1)番目のアドレスに記憶された値とに基づいて前記m番目のアドレスが論理演算後のランの始端座標に対応するか否かを判定し、m番目のアドレスに記憶された値と(m+1)番目のアドレスに記憶された値とに基づいて前記m番目のアドレスが論理演算後のランの終端座標に対応するか否かを判定する操作を判定操作とし、
前記論理演算工程は、前記アドレス空間の各アドレスについて前記判定操作を実行する工程であるデータ演算方法。
A data calculation method according to any one of claims 1 to 4, wherein
Whether or not the mth address corresponds to the start coordinate of the run after the logical operation based on the value stored at the mth address of the address space and the value stored at the (m-1) th address Whether the mth address corresponds to the end coordinates of the run after the logical operation based on the value stored at the mth address and the value stored at the (m + 1) th address The operation for determining
The data operation method, wherein the logical operation step is a step of executing the determination operation for each address in the address space.
請求項5に記載のデータ演算方法であって、
前記アドレス空間を構成する複数のアドレスを複数組に分割するとともに各組に対する判定操作を判定スレッドとし、前記複数の判定スレッドを並列して実行するデータ演算方法。
A data calculation method according to claim 5,
A data operation method that divides a plurality of addresses constituting the address space into a plurality of sets, uses a determination operation for each set as a determination thread, and executes the plurality of determination threads in parallel.
請求項6に記載のデータ演算方法であって、
前記論理演算工程では、前記判定スレッドの個数が前記アドレス空間の前記アドレスの個数と一致し、各アドレスに対して前記判定スレッドが実行されるデータ演算方法。
A data calculation method according to claim 6,
In the logical operation step, the number of the determination threads matches the number of the addresses in the address space, and the determination thread is executed for each address.
請求項5ないし7のいずれか一項に記載のデータ演算方法であって、
前記既定値は1であるデータ演算方法。
A data calculation method according to any one of claims 5 to 7, comprising:
A data calculation method in which the predetermined value is 1.
請求項8に記載のデータ演算方法であって、
前記ランデータ群の個数をNとしたとき、
前記論理演算工程では、
前記アドレス空間のm番目のアドレスに記憶された値がNであり(m−1)番目のアドレスに記憶された値が(N−1)以下であるときに前記m番目のアドレスが論理演算後のランの始端座標に対応すると判定し、前記アドレス空間のm番目のアドレスに記憶された値がNであり、(m+1)番目のアドレスに記憶された値が(N−1)以下であるときに前記m番目のアドレスが論理演算後のランの終端座標に対応すると判定する操作を前記判定操作とし、
前記判定操作を前記アドレス空間の各アドレスについて実行して前記複数のランデータの論理積を求めるデータ演算方法。
The data calculation method according to claim 8, wherein
When the number of the run data groups is N,
In the logical operation step,
When the value stored in the mth address of the address space is N and the value stored in the (m−1) th address is equal to or less than (N−1), the mth address is after the logical operation. The value stored in the mth address of the address space is N, and the value stored in the (m + 1) th address is less than (N-1). An operation for determining that the m-th address corresponds to the end coordinates of the run after the logical operation is the determination operation.
A data operation method for obtaining a logical product of the plurality of run data by executing the determination operation for each address in the address space.
請求項8または9に記載のデータ演算方法であって、
前記論理演算工程では、
前記アドレス空間のm番目のアドレスに記憶された値が1以上であり(m−1)番目のアドレスに記憶された値が0であるときに前記m番目のアドレスが論理演算後のランの始端座標に対応すると判定し、前記アドレス空間のm番目のアドレスに記憶された値が1以上であり(m+1)番目のアドレスに記憶された値が0であるときに前記m番目のアドレスが論理演算後のランの終端座標に対応すると判定する操作を前記判定操作とし、
前記判定操作を前記アドレス空間の各アドレスについて実行して前記複数のランデータの論理和を求めるデータ演算方法。
The data calculation method according to claim 8 or 9, wherein
In the logical operation step,
When the value stored in the mth address of the address space is 1 or more and the value stored in the (m−1) th address is 0, the mth address is the start of a run after a logical operation. When the value stored in the mth address of the address space is 1 or more and the value stored in the (m + 1) th address is 0, the mth address is logically calculated. The operation to determine that it corresponds to the end coordinates of the later run is the determination operation,
A data operation method for obtaining a logical sum of the plurality of run data by executing the determination operation for each address in the address space.
請求項8ないし10のいずれか一項に記載のデータ演算方法であって、
前記論理演算工程では、
前記アドレス空間のm番目のアドレスに記憶された値が奇数であり(m−1)番目のアドレスに記憶された値が偶数であるときに前記m番目のアドレスが論理演算後のランの始端座標に対応すると判定し、前記アドレス空間のm番目のアドレスに記憶された値が奇数であり(m+1)番目のアドレスに記憶された値が偶数であるときに前記m番目のアドレスが論理演算後のランの終端座標に対応すると判定する操作を前記判定操作とし、
前記判定操作を前記アドレス空間の各アドレスについて実行して前記複数のランデータの排他的論理和を求めるデータ演算方法。
A data calculation method according to any one of claims 8 to 10, wherein
In the logical operation step,
When the value stored in the mth address in the address space is an odd number and the value stored in the (m−1) th address is an even number, the mth address is the starting coordinate of the run after the logical operation. When the value stored in the mth address in the address space is an odd number and the value stored in the (m + 1) th address is an even number, the mth address The operation that is determined to correspond to the end coordinates of the run is the determination operation,
A data operation method for obtaining an exclusive OR of the plurality of run data by executing the determination operation for each address in the address space.
二値画像データをランレングス化して得られる少なくとも1つ以上のランデータをランデータ群とし、互いに異なる複数のランデータ群の論理演算を行うデータ演算装置であって、
前記ランデータの始端座標および終端座標に関連する値を記憶するラン展開メモリと、
ランデータの始端座標に対応するラン展開メモリのアドレスに記憶されている値に既定値を加算する一方で当該ランデータの終端座標に対応する前記ラン展開メモリのアドレスに記憶されている値から前記既定値を減算するデータ展開操作を前記ランデータ毎に実行して前記複数のランデータを前記ラン展開メモリのアドレス空間に展開するラン展開処理部と、
前記複数のランデータが展開された前記ラン展開メモリにおける前記アドレス空間のm番目のアドレスに対して前記アドレス空間の0番目ないし前記m番目のアドレスにそれぞれ記憶された値の総和を書き込む、スキャン操作を前記アドレス空間の各アドレスについて実行して前記複数のランデータの重なり状態を示す重なり情報を取得する重なり情報取得部と、
前記重なり情報に基づいて前記複数のランデータ群の論理積、論理和および排他的論理和のうちの少なくとも1つを求める論理演算部と
を備えることを特徴とするデータ演算装置。
A data operation device that performs at least one or more run data obtained by converting the binary image data into a run data group and performs a logical operation on a plurality of different run data groups,
A run expansion memory for storing values related to the start and end coordinates of the run data;
The predetermined value is added to the value stored in the address of the run development memory corresponding to the start coordinate of the run data, while the value stored in the address of the run development memory corresponding to the end coordinate of the run data is A run development processing unit that executes a data development operation for subtracting a predetermined value for each run data to develop the plurality of run data into an address space of the run development memory;
A scan operation for writing a sum of values stored in the 0th to m-th addresses of the address space to the m-th address of the address space in the run expansion memory in which the plurality of run data are expanded For each address in the address space to obtain overlap information indicating an overlap state of the plurality of run data; and
And a logical operation unit that obtains at least one of a logical product, a logical sum, and an exclusive logical sum of the plurality of run data groups based on the overlap information.
検査対象画像を取得する画像取得部と、
前記検査対象画像を検査して欠陥部位が含まれる抽出画像を抽出する画像抽出部と、
前記抽出画像を行毎にランレングス化して得られる少なくとも1つ以上のランデータを有する抽出ランデータ群と、マスク画像を行毎にランレングス化して得られる少なくとも1つ以上のランデータを有するマスクランデータ群との論理演算を行うことで、前記抽出画像のうち前記欠陥部位以外の部位を前記マスク画像によりマスク処理して欠陥画像データを得るデータ演算部とを備え、
前記データ演算部は、
前記ランデータの始端座標および終端座標に関連する値を記憶するラン展開メモリと、
ランデータの始端座標に対応するラン展開メモリのアドレスに記憶されている値に既定値を加算する一方で当該ランデータの終端座標に対応する前記ラン展開メモリのアドレスに記憶されている値から前記既定値を減算するデータ展開操作を前記ランデータ毎に実行して前記複数のランデータを前記ラン展開メモリのアドレス空間に展開するラン展開処理部と、
前記複数のランデータが展開された前記ラン展開メモリにおける前記アドレス空間のm番目のアドレスに対して前記アドレス空間の0番目ないし前記m番目のアドレスにそれぞれ記憶された値の総和を書き込む、スキャン操作を前記アドレス空間の各アドレスについて実行して前記複数のランデータの重なり状態を示す重なり情報を取得する重なり情報取得部と、
前記重なり情報に基づいて前記抽出ランデータ群および前記マスクランデータ群の論理積を演算して前記欠陥部位以外の部位を除去する論理演算処理部と
を有することを特徴とする欠陥検査装置。
An image acquisition unit for acquiring an image to be inspected;
An image extraction unit that inspects the inspection target image and extracts an extracted image including a defective portion;
An extracted run data group having at least one or more run data obtained by run-lengthing the extracted image for each row, and a mask having at least one or more run data obtained by running the mask image for each row. By performing a logical operation with the run data group, a data operation unit that obtains defect image data by masking a portion other than the defective portion of the extracted image with the mask image,
The data calculation unit is
A run expansion memory for storing values related to the start and end coordinates of the run data;
The predetermined value is added to the value stored in the address of the run development memory corresponding to the start coordinate of the run data, while the value stored in the address of the run development memory corresponding to the end coordinate of the run data is A run development processing unit that executes a data development operation for subtracting a predetermined value for each run data to develop the plurality of run data into an address space of the run development memory;
A scan operation for writing a sum of values stored in the 0th to m-th addresses of the address space to the m-th address of the address space in the run expansion memory in which the plurality of run data are expanded For each address in the address space to obtain overlap information indicating an overlap state of the plurality of run data; and
A defect inspection apparatus comprising: a logical operation processing unit that calculates a logical product of the extracted run data group and the mask run data group based on the overlap information and removes parts other than the defective part.
JP2013246008A 2013-11-28 2013-11-28 Data calculation method, data calculation apparatus, and defect inspection apparatus Pending JP2015103226A (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2013246008A JP2015103226A (en) 2013-11-28 2013-11-28 Data calculation method, data calculation apparatus, and defect inspection apparatus
KR1020140164365A KR101630078B1 (en) 2013-11-28 2014-11-24 Data calculation method, data calculation apparatus, and defect inspection apparatus
CN201410680275.4A CN104677919B (en) 2013-11-28 2014-11-24 Data operating method, data operation device and flaw detection apparatus
TW103141111A TWI532015B (en) 2013-11-28 2014-11-27 Data computing method, data computing device and defect detecting device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013246008A JP2015103226A (en) 2013-11-28 2013-11-28 Data calculation method, data calculation apparatus, and defect inspection apparatus

Publications (1)

Publication Number Publication Date
JP2015103226A true JP2015103226A (en) 2015-06-04

Family

ID=53313267

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013246008A Pending JP2015103226A (en) 2013-11-28 2013-11-28 Data calculation method, data calculation apparatus, and defect inspection apparatus

Country Status (4)

Country Link
JP (1) JP2015103226A (en)
KR (1) KR101630078B1 (en)
CN (1) CN104677919B (en)
TW (1) TWI532015B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105608713B (en) * 2016-01-04 2018-11-16 湖南大学 A kind of bi-level image coding based on quaternary tree and efficient logical operation method
CN111611178B (en) * 2019-02-26 2023-05-26 慧荣科技股份有限公司 Data storage device and non-volatile memory control method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5981961A (en) * 1982-11-02 1984-05-11 Hitachi Ltd Picture processing system
JPH06251164A (en) * 1993-02-24 1994-09-09 Toshiba Corp Character pattern generating device
JP2004012177A (en) * 2002-06-04 2004-01-15 Dainippon Screen Mfg Co Ltd Defect detector, defect detecting method, outline extracting method, outline smoothing method, region combining method, and program
WO2009090726A1 (en) * 2008-01-15 2009-07-23 Mitsubishi Electric Corporation Graphic drawing device and graphic drawing method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07203178A (en) * 1993-12-28 1995-08-04 Meidensha Corp Image data processing method
JPH09231356A (en) * 1996-02-21 1997-09-05 Canon Inc Method and device for processing picture
JP3952358B2 (en) * 2001-09-25 2007-08-01 大日本スクリーン製造株式会社 Data conversion apparatus and method, and program using the method
JP2005227054A (en) * 2004-02-12 2005-08-25 Jfe Steel Kk Method and device for automatically designing flaw type determination logic and surface defect meter
JP5015721B2 (en) * 2007-03-30 2012-08-29 大日本スクリーン製造株式会社 Defect inspection apparatus, defect inspection program, graphic drawing apparatus, and graphic drawing system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5981961A (en) * 1982-11-02 1984-05-11 Hitachi Ltd Picture processing system
JPH06251164A (en) * 1993-02-24 1994-09-09 Toshiba Corp Character pattern generating device
JP2004012177A (en) * 2002-06-04 2004-01-15 Dainippon Screen Mfg Co Ltd Defect detector, defect detecting method, outline extracting method, outline smoothing method, region combining method, and program
WO2009090726A1 (en) * 2008-01-15 2009-07-23 Mitsubishi Electric Corporation Graphic drawing device and graphic drawing method

Also Published As

Publication number Publication date
CN104677919B (en) 2017-10-10
TW201520979A (en) 2015-06-01
KR20150062131A (en) 2015-06-05
TWI532015B (en) 2016-05-01
KR101630078B1 (en) 2016-06-13
CN104677919A (en) 2015-06-03

Similar Documents

Publication Publication Date Title
US8965132B2 (en) Edge tracing with hysteresis thresholding
JP2013257304A5 (en)
KR102559021B1 (en) Apparatus and method for generating a defect image
JP2006067585A (en) Method and apparatus for specifying position of caption in digital image and extracting thereof
JP2009223414A (en) Matching degree computing device and method, program
CN103428511A (en) Pattern processing device, pattern processing method
KR101630078B1 (en) Data calculation method, data calculation apparatus, and defect inspection apparatus
KR20160097651A (en) Apparatus and Method for Testing Pattern of Sample using Validity Image Processing Technique, and computer-readable recording medium with program therefor
JP6460660B2 (en) Data operation device, data operation method, and defect inspection device
JP7139369B2 (en) Detection result analysis device, detection result analysis method and detection result analysis program
KR101626538B1 (en) System, method, and medium for image object and contour feature extraction
TWI512687B (en) Labeling method, labeling apparatus and defect inspecting apparatus
JP6173088B2 (en) Inspection device, inspection method, program, and recording medium
KR101392978B1 (en) Object labeling method and apparatus using hybrid parallel processing
CN112541507A (en) Multi-scale convolutional neural network feature extraction method, system, medium and application
JP2001099625A (en) Device and method for pattern inspection
JP2009150656A (en) Method and device for pattern inspection
JP6074210B2 (en) Image processing apparatus, appearance inspection apparatus, image processing method, and appearance inspection method
Kowalczyk et al. A Connected Component Labelling algorithm for a multi-pixel per clock cycle video stream
US11328383B2 (en) Image provision apparatus, image provision method, and computer readable medium
JPS62212506A (en) Method for detecting flaw
JP2022182702A (en) Evaluation program, evaluation method, and information processor
JP4467591B2 (en) Sample inspection apparatus and sample inspection method
JP2005251132A (en) Shadow detector, shadow detection method, shadow detection program, image processor using shadow detector, image processing method using shadow detection method and image processing program using shadow detection program
KR20230112520A (en) System and method for detectiong defects

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160608

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170424

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170502

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20170725

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20170829