KR101521725B1 - Labeling method, labeling apparatus and defect inspection apparatus - Google Patents
Labeling method, labeling apparatus and defect inspection apparatus Download PDFInfo
- Publication number
- KR101521725B1 KR101521725B1 KR1020130161353A KR20130161353A KR101521725B1 KR 101521725 B1 KR101521725 B1 KR 101521725B1 KR 1020130161353 A KR1020130161353 A KR 1020130161353A KR 20130161353 A KR20130161353 A KR 20130161353A KR 101521725 B1 KR101521725 B1 KR 101521725B1
- Authority
- KR
- South Korea
- Prior art keywords
- run
- label
- update
- search
- thread
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
- G06T1/20—Processor architectures; Processor configuration, e.g. pipelining
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/40—Analysis of texture
- G06T7/41—Analysis of texture based on statistical description of texture
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Probability & Statistics with Applications (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
Abstract
(과제) 라벨링 처리의 고속화를 도모한다.
(해결 수단) 각 런에 대해 서로 상이한 라벨을 설정하는 초기 라벨 설정 공정과, 런마다, 상기 런을 처리 대상 런으로 함과 더불어 상기 처리 대상 런에 접속하는 제1 연결 런이 존재하는지 아닌지를 판정하고, 제1 연결 런이 존재할 때에는, 처리 대상 런 및 제1 연결 런 중 한쪽의 라벨을 다른쪽의 라벨로 갱신하는 개별 갱신 처리를 행하는 갱신 공정과, 갱신 공정 후에, 복수의 라벨에 의거하여 복수의 런 중 서로 접속하는 런을 탐색하여 동일한 라벨을 부여하는 탐색 공정을 구비하고, 갱신 공정에서는, 복수의 런을 복수 세트로 분할함과 더불어 각 세트에서 실행되는 개별 갱신 처리를 갱신 스레드로 하고, 배타 제어 아래 복수의 갱신 스레드 중 하나의 갱신 스레드에 의한 라벨의 재기록을 허가함과 더불어 하나의 갱신 스레드에 의해 재기록되는 라벨의 다른 갱신 스레드에 의한 재기록을 금지하면서 복수의 갱신 스레드를 병렬하여 실행한다.(Problem) The labeling process is speeded up.
The present invention relates to an initial label setting process for setting labels that are different from each other for each run, and a process of determining whether or not there is a first connection run to connect to the process target run, An update step of performing an individual update process of updating the label of one of the run subject to be processed and the label of the first connection run to the other label when there is a first connected run; And a search step of searching for runs connected to each other among the runs of the plurality of sets, and assigning the same labels. In the update step, a plurality of runs are divided into a plurality of sets, A label rewritten by one update thread in addition to allowing rewriting of the label by the update thread of one of the plurality of update threads under exclusive control While prohibiting rewriting by another update thread executes in parallel a plurality of update thread.
Description
이 발명은, 이치 화상 데이터를 런 렝스화하여 작성된 복수의 런에 대해 라벨을 부여하는 라벨링 기술 및 상기 라벨링 기술을 적용한 결함 검사 장치에 관한 것이다.The present invention relates to a labeling technique for assigning labels to a plurality of runs created by rendering normal image data run length, and a defect inspection apparatus using the labeling technique.
반도체 기판이나 프린트 기판 등의 제조 기술 분야에서는, 제품에 포함되는 결함을 검출하고, 이것을 분석·평가하기 위해서, 평가 대상물을 현미경 등을 통해 촬상하고, 얻어진 화상으로부터 결함부를 포함하는 화상, 소위 결함 화상을 추출하고 있다. 그리고, 상기 결함 화상의 이치 화상 데이터에 의거하여 결함부의 개수, 면적이나 중심 등을 계측하고 있다. 이 때, 상기 계측을 자동적으로 행하기 위해서, 라벨링(연결 영역 추출) 처리가 널리 이용되고 있다. 예를 들면, 일본국 특허 공개 2008-186123호 공보에서는, 이치 화상 데이터를 행마다 런 렝스화하여 생성되는 런에 대해 2패스의 라벨 부여 처리를 실행하여 라벨링 처리의 고속화가 도모되고 있다.BACKGROUND ART [0002] In the field of manufacturing technologies for semiconductor substrates and printed boards, in order to detect defects included in products and to analyze and evaluate them, an evaluation object is picked up through a microscope or the like, and an image including defects, . Then, based on the binary image data of the defect image, the number, area, and center of the defect portion are measured. At this time, in order to perform the measurement automatically, labeling (connection area extraction) processing is widely used. For example, in Japanese Patent Application Laid-Open No. 2008-186123, a two-pass labeling process is applied to a run generated by making the normal image data run lengthwise for each row, thereby speeding up the labeling process.
그러나, 상기한 일본국 특허 공개 2008-186123호 공보에 기재된 발명(이하 「종래 발명」이라 함)에서는, 상위의 런 데이터로부터 순서대로 조사하는 것을 전제로 하고 있으며, 이것이 한층 더 고속화를 저해하는 요인 중 하나가 되었다. 또, 상기 종래 발명에서는, 상이한 라벨이 부여된 런 데이터끼리가 같은 연결 성분에 속하는지 아닌지를 기록하는 라벨 테이블, 및 라벨마다 상기 라벨에 대응하는 런 데이터의 수를 관련지은 런 수 테이블을 별도로 설치할 필요가 있다. 그 때문에, 런의 수의 증대나 연결 상태의 복잡화에 따라 상기 라벨 테이블 및 런 수 테이블의 요소 수가 증대해 버려, 이것이 라벨링 처리의 고속화를 저해하는 또 다른 요인으로도 되었다.However, the invention disclosed in Japanese Patent Laid-Open Publication No. 2008-186123 (hereinafter referred to as "the conventional invention") is based on the assumption that the run data is sequentially inspected from the upper run data, . Further, in the above-mentioned conventional invention, a label table for recording whether or not the run data assigned different labels belong to the same connected component, and a run count table for associating the number of run data corresponding to the label separately There is a need. As a result, the number of elements of the label table and the run number table increases due to an increase in the number of runs and a complicated connection state. This is another factor that hinders the speeding up of labeling processing.
이 발명은 상기 과제를 감안하여 이루어진 것이며, 이치 화상 데이터의 라벨링 처리의 고속화를 도모할 수 있는 기술 및 상기 기술을 이용하여 결함 검사를 효율적으로 행하는 기술을 제공하는 것을 목적으로 한다.SUMMARY OF THE INVENTION The present invention has been made in view of the above problems, and it is an object of the present invention to provide a technique capable of speeding up the labeling process of binary image data and a technique for effectively performing defect inspection using the above technique.
본 발명에 따른 라벨링 방법은, 이치 화상 데이터를 런 렝스화하여 작성된 복수의 런에 대해 라벨링 처리를 행하는 라벨링 방법으로서, 각 런에 대해 서로 상이한 라벨을 설정하는 초기 라벨 설정 공정과, 런마다, 상기 런을 처리 대상 런으로 함과 더불어 상기 처리 대상 런에 접속하는 제1 연결 런이 존재하는지 아닌지를 판정하고, 제1 연결 런이 존재할 때에는, 처리 대상 런 및 제1 연결 런 중 한쪽의 라벨을 다른쪽의 라벨로 갱신하는 개별 갱신 처리를 행하는 갱신 공정과, 갱신 공정 후에, 복수의 라벨에 의거하여 복수의 런 중 서로 접속하는 런을 탐색하여 동일한 라벨을 부여하는 탐색 공정을 구비하고, 갱신 공정에서는, 복수의 런을 복수 세트로 분할함과 더불어 각 세트에서 실행되는 개별 갱신 처리를 갱신 스레드로 하고, 배타 제어 아래 복수의 갱신 스레드 중 하나의 갱신 스레드에 의한 라벨의 재기록을 허가함과 더불어 하나의 갱신 스레드에 의해 재기록되는 라벨의 다른 갱신 스레드에 의한 재기록을 금지하면서 복수의 갱신 스레드를 병렬하여 실행하는 것을 특징으로 하고 있다.A labeling method according to the present invention is a labeling method for labeling a plurality of runs created by rendering run-length binary image data, the labeling method comprising: an initial label setting step of setting labels different from each other for each run; Determines whether or not there is a first connected run to be connected to the target run, and if there is a first connected run, sets one of the target run and the first connected run to be different And a search step of searching for a run connected to each other among a plurality of runs based on the plurality of labels and assigning the same label after the update step; and in the update step, , A plurality of runs are divided into a plurality of sets, an individual update process executed in each set is made an update thread, and a plurality of The rewriting of the label by the update thread of one of the update threads is permitted and the plurality of update threads are executed in parallel while prohibiting the rewriting by the other update thread of the label rewritten by one update thread .
또, 본 발명에 따른 라벨링 장치는, 이치 화상 데이터를 런 렝스화하여 작성된 복수의 런에 대해 라벨링 처리를 실시하는 라벨링 장치로서, 각 런의 라벨을 기억하는 기억부와, 연산 처리를 행하는 프로세서 코어를 복수개 갖는 프로세서부와, 복수의 라벨에 서로 상이한 값을 초기 설정한 후에, 런마다, 상기 런을 처리 대상 런으로 함과 더불어 상기 처리 대상 런에 접속하는 제1 연결 런이 존재하는지 아닌지를 판정하고, 제1 연결 런이 존재할 때에는, 처리 대상 런 및 제1 연결 런 중 한쪽의 라벨을 다른쪽의 라벨로 갱신하는 개별 갱신 처리를 행하고, 복수의 라벨에 의거하여 복수의 런 중 서로 접속하는 런을 탐색하여 동일한 라벨을 부여하는 제어부를 더 구비하고, 복수의 런은 프로세서 코어의 개수에 따라 복수 세트로 분할되고, 각 프로세서 코어는 분할된 하나 또는 복수의 런에 대해 개별 갱신 처리를 갱신 스레드로서 실행하고, 제어부는, 배타 제어 아래 복수의 갱신 스레드 중 하나의 갱신 스레드에 의한 라벨의 재기록을 허가함과 더불어 하나의 갱신 스레드에 의해 재기록되는 라벨의 다른 갱신 스레드에 의한 재기록을 금지하면서 복수의 갱신 스레드를 병렬하여 실행시킴으로써 런마다의 개별 갱신 처리를 행하는 것을 특징으로 하고 있다.A labeling apparatus according to the present invention is a labeling apparatus for performing labeling processing on a plurality of runs created by rendering normal image data run length, the labeling apparatus comprising: a storage unit for storing labels of each run; A processor unit having a plurality of labels; and a processor unit for initially setting a different value to each of a plurality of labels, and for each run, determines whether or not there is a first connection run to connect to the processing object run, , And when there is a first connection run, performs a renewal process of updating one of the labels of the object run and the first connection run to the other label, Wherein the plurality of runs are divided into a plurality of sets according to the number of processor cores, and each of the processor cores The control unit executes an individual update process as an update thread for one or a plurality of divided runs, and the control unit permits rewriting of the label by the update thread of one of the plurality of update threads under the exclusive control, The individual update processing for each run is performed by executing a plurality of update threads in parallel while prohibiting rewriting by another update thread of the label to be rewritten.
또한, 본 발명에 따른 결함 검사 장치는, 검사 대상 화상을 취득하는 화상 취득부와, 검사 대상 화상을 검사하여 결함 부위가 포함되는 결함 화상을 추출하는 화상 추출부와, 결함 화상을 이치화 처리하여 이치 화상 데이터를 생성하는 이치화 처리부와, 이치 화상 데이터를 런 렝스화하여 복수의 런을 생성하는 런 생성부와, 상기 라벨링 장치와 동일 구성을 갖고, 복수의 런 중 서로 접속하는 런에 대해 동일한 라벨을 부여하는 라벨링 수단을 구비하는 것을 특징으로 하고 있다.According to another aspect of the present invention, there is provided a defect inspection apparatus comprising: an image obtaining unit that obtains an image to be inspected; an image extracting unit that extracts a defect image including a defective area by inspecting an image to be inspected; A run generating section for generating a plurality of runs by normalizing the binary image data to generate run data; and a runner section having the same configuration as the above-described labeling machine, And labeling means for giving the labeling means.
이와 같이 구성된 발명에서는, 런마다 서로 상이한 값을 갖는 라벨이 초기 설정된다. 그리고, 런마다, 개별 갱신 처리가 실행되고, 처리 대상 런에 접속하는 연결 런이 존재하는지 아닌지에 따라 라벨의 갱신이 실행된다. 그 후에, 복수의 라벨에 의거하여 복수의 런 중 서로 접속하는 런이 탐색되고, 그에 대해 동일한 라벨이 부여된다. 이와 같이 갱신 공정과 탐색 공정의 2패스 방식으로 라벨링 처리를 행하는 점에서 종래 발명과 공통되나, 본 발명에서는, 런의 개수와 동수의 라벨에 의해 이치 화상 데이터의 라벨링 처리가 행해지고 있으며, 종래 발명에서 이용하고 있던 라벨 테이블 및 런 수 테이블이 불필요해, 라벨링 처리의 고속화가 가능해지고 있다.In the invention thus constituted, labels having different values from each other are initially set. Then, the individual update process is executed for each run, and the label update is executed depending on whether or not there is a connection run to be connected to the run subject to be processed. Thereafter, the runs connected to each other among the plurality of runs are searched based on the plurality of labels, and the same label is given thereto. In the present invention, the labeling process of the binary image data is performed by the label of the same number as the number of runs, and in the conventional invention, The label table and the run number table which are used are unnecessary, and the labeling process can be speeded up.
게다가, 본 발명의 갱신 공정에서는, 복수의 런을 복수 세트로 분할함과 더불어 각 세트에서 실행되는 개별 갱신 처리를 갱신 스레드로 하고, 그들 갱신 스레드를 병렬하여 실행한다. 즉, 런마다의 개별 갱신 처리는 병렬 실행된다. 따라서, 라벨 갱신에 대해서는 갱신 스레드 사이에서 배타 제어되지만, 상위의 런부터 순차적으로 라벨을 부여하는 종래 발명에 비해, 라벨링 처리에 필요로 하는 토탈 시간을 큰 폭으로 단축할 수 있다.In addition, in the updating step of the present invention, a plurality of runs are divided into a plurality of sets, and individual update processing executed in each set is made an update thread, and these update threads are executed in parallel. That is, the individual update processing for each run is executed in parallel. Therefore, although the label update is exclusively controlled between update threads, the total time required for the labeling process can be significantly shortened as compared with the conventional invention in which labels are sequentially given from the upper run.
여기서, 갱신 공정에서는, 하나의 갱신 스레드에 의해 재기록되는 라벨의 다른 갱신 스레드에 의한 재기록을 금지하고 있는데, 상기 라벨 이외의 라벨, 즉 경합하지 않는 라벨에 대해서는 다른 갱신 스레드에 의한 재기록을 허가해도 된다. 이에 따라, 처리 효율을 높여 라벨링 처리에 필요로 하는 시간을 더욱 단축할 수 있다.Here, in the update step, the rewriting of the label rewritten by one update thread is inhibited by another update thread, but rewriting by another update thread may be allowed for a label other than the above-mentioned label, that is, . As a result, the processing efficiency can be increased and the time required for the labeling processing can be further shortened.
또, 개별 갱신 처리에 있어서, 제1 연결 런의 라벨을 갱신했을 때, 제1 연결 런에 접속하는 처리 대상 런 이외의 제2 연결 런이 존재하는지 아닌지를 판정하고, 제2 연결 런이 존재할 때에는, 제1 연결 런 및 제2 연결 런 중 한쪽의 라벨을 다른쪽의 라벨로 갱신하도록 구성해도 된다. 이와 같이 제1 연결 런 뿐만 아니라, 상기 제1 연결 런을 통해 처리 대상 런에 접속하는 제2 연결 런에 대해서도, 라벨 갱신해 둠으로써, 처리 대상 런에 대한 개별 갱신 처리보다도 나중에 실행되는 제2 연결 런에 대한 개별 갱신 처리에 필요로 하는 시간을 단축할 수 있다. 그 결과, 토탈 처리 시간을 단축할 수 있다.When the label of the first connection run is updated in the individual updating process, it is determined whether or not there is a second connection run other than the process target run connected to the first connection run. If there is a second connection run , And one of the first connection run and the second connection run may be updated to the other label. In this manner, not only the first connection run but also the second connection run to be connected to the processing object run through the first connection run are updated by labeling, so that the second connection executed later than the individual update processing for the processing object run The time required for the individual update processing for the run can be shortened. As a result, the total processing time can be shortened.
또, 제1 연결 런의 라벨을 갱신하기 전의 갱신 전 라벨과 동일 라벨을 갖는 런을 제2 연결 런으로 해도 되고, 갱신 전 라벨을 이용함으로써 제2 연결 런을 용이하게, 또한 확실하게 찾아낼 수 있어 적절하다.A run having the same label as the label before the update before the label of the first connection run may be used as the second connection run and the second connection run can be easily and reliably found by using the label before the update It is appropriate.
또, 이치 화상 데이터를 행마다 런 렝스화해도 되고, 이 경우, 처리 대상 런의 하행에 접속하는 런을 제1 연결 런으로서 판정할 수 있다.Alternatively, the binary image data may be run length-wise for each row. In this case, a run connected to the downward run of the run to be processed can be determined as the first connected run.
또, 2패스 중 탐색 공정(복수의 런 중 서로 접속하는 런을 탐색하여 동일한 라벨을 부여하는 공정)에서 런마다 개별 탐색 처리를 실행해도 된다. 이 「개별 탐색 처리」란, 하나의 런을 처리 대상 런으로 함과 더불어 상기 처리 대상 런에 접속하는 연결 런을 복수의 라벨에 의거하여 찾아내어 처리 대상 런 및 연결 런의 라벨을 동일하게 재기록하는 처리를 의미하고 있다. 이와 같이 런마다의 개별 탐색 처리에 의해서 탐색 공정을 합리적으로 행할 수 있다. 게다가, 상기한 런마다의 개별 갱신 처리와 동일하게, 복수의 런을 복수 세트로 분할함과 더불어 각 세트에서 실행되는 개별 탐색 처리를 탐색 스레드로 하고, 배타 제어 아래 복수의 탐색 스레드 중 하나의 탐색 스레드에 의한 라벨의 재기록을 허가함과 더불어 하나의 탐색 스레드에 의해 재기록되는 라벨의 다른 탐색 스레드에 의한 재기록을 금지하면서 복수의 탐색 스레드를 병렬하여 실행해도 된다. 이에 의해서, 탐색 공정에 있어서도 처리 속도를 높여 라벨링 처리의 고속화를 보다 한층 진행할 수 있다.The individual search process may be performed for each run in the search process among the two passes (a process of searching for runs connected to each other among a plurality of runs and assigning the same label). This " individual search process " refers to a process in which one run is a target to be processed, a connection run to be connected to the target run is searched based on a plurality of labels, and the labels of the target run and connection run are rewritten Processing. As described above, the individual search process for each run makes it possible to perform the search process rationally. Further, in the same manner as the individual update processing for each run described above, a plurality of runs are divided into a plurality of sets, individual search processing executed in each set is made a search thread, and one search search The plurality of search threads may be executed in parallel while the rewriting of the label by the thread is permitted and the rewriting by the other search thread of the label rewritten by one search thread is prohibited. As a result, the speed of the labeling process can be further improved by increasing the processing speed in the searching step.
이 발명에 의하면, 라벨링 처리를 실행하기 위한 처리의 일부를 병렬로 실행할 수 있어, 이치 화상 데이터의 라벨링 처리에 필요로 하는 토탈 시간을 단축할 수 있다.According to the present invention, a part of the process for executing the labeling process can be executed in parallel, and the total time required for the labeling process of the normal image data can be shortened.
도 1은 이 발명에 따른 라벨링 장치의 일 실시형태를 장비하는 결함 검사 장치를 이용하는 검사 시스템의 개략 구성을 나타내는 도면이다.
도 2는 화상 처리부의 개략 구성을 나타내는 블럭도이다.
도 3은 본 발명에 따른 라벨링 장치의 일 실시형태에 상당하는 라벨링부의 개략 구성을 나타내는 블럭도이다.
도 4는 라벨링부에 의한 라벨링 동작을 나타내는 플로차트이다.
도 5는 라벨링부에 부여되는 이치 화상 데이터의 일례를 나타내는 도면이다.
도 6은 도 5의 이치 화상 데이터에 대해 런 렝스화 처리를 실행하여 얻어지는 런의 런 데이터 및 런끼리의 연결 관계를 나타내는 런 접속 데이터의 초기치를 나타내는 도면이다.
도 7은 각 프로세서 코어에서 실행되는 개별 갱신 처리를 나타내는 플로차트이다.
도 8은 각 프로세서 코어에서 실행되는 개별 갱신 처리의 일례를 나타내는 모식도이다.
도 9는 각 프로세서 코어에서 실행되는 개별 탐색 처리를 나타내는 플로차트이다.
도 10은 각 프로세서 코어에서 실행되는 개별 탐색 처리의 일례를 나타내는 모식도이다.BRIEF DESCRIPTION OF DRAWINGS FIG. 1 is a view showing a schematic configuration of an inspection system using a defect inspection apparatus equipped with an embodiment of a labeling apparatus according to the present invention; FIG.
2 is a block diagram showing a schematic configuration of an image processing unit.
3 is a block diagram showing a schematic structure of a labeling section according to an embodiment of the labeling apparatus according to the present invention.
4 is a flowchart showing a labeling operation by the labeling unit.
5 is a diagram showing an example of the normal image data given to the labeling section.
FIG. 6 is a diagram showing initial values of run data of a run obtained by executing run length processing on the ordinary image data of FIG. 5 and run connection data indicating a connection relationship among the runs.
7 is a flowchart showing individual update processing executed in each processor core.
8 is a schematic diagram showing an example of individual update processing executed in each processor core.
9 is a flowchart showing individual search processing executed in each processor core.
10 is a schematic diagram showing an example of individual search processing executed in each processor core.
도 1은 이 발명에 따른 라벨링 장치의 일 실시형태를 장비하는 결함 검사 장치를 이용하는 검사 시스템의 개략 구성을 나타내는 도면이다. 이 검사 시스템(1)은, 검사 대상인 반도체 기판(이하 「기판」이라 함)(S)의 외관에 나타난 핀홀이나 이물 등의 결함 검사를 행하는 검사 시스템이다. 검사 시스템(1)은, 기판(S) 상의 검사 대상 영역을 촬상하는 촬상 장치(2)와, 촬상 장치(2)로부터의 화상 데이터에 의거하여 결함 검사를 행하는 제어 장치(3)를 갖는다.BRIEF DESCRIPTION OF DRAWINGS FIG. 1 is a view showing a schematic configuration of an inspection system using a defect inspection apparatus equipped with an embodiment of a labeling apparatus according to the present invention; FIG. This
본 시스템과는 별도로 기판(S)의 제조 라인에 설치된 기판 검출 장치(M)에 있어서 기판(S)에 결함이 발견되면, 그 결함의 위치 좌표가 이 검사 시스템(1)에 부여된다. 제조 라인에 넣어진 기판 검출 장치(M)는, 미리 정해진 처리 알고리즘에 의해서 기판(S) 전체를 검사하고, 기판 표면에 결함으로서의 요건을 만족시키는 영역이 있으면 그 위치 좌표를 취득하여 출력한다. 따라서, 상기 기판 검출 장치(M)가 갖는 촬상부는 비교적 저해상도이며, 처리 알고리즘도 고정적이다.If 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 present system, the position coordinates of the defect are given to the
한편, 이 검사 시스템(1)은, 도시하지 않는 인터페이스를 통해 기판 검출 장치(M)와 접속되어 있으며, 기판 검출 장치(M)로부터 결함으로서 위치 좌표가 보고된 영역을 보다 높은 해상도를 갖는 촬상 장치(2)에 의해서 촬상함과 더불어, 그 화상을 제어 장치(3)가 정밀 조사하여 결함의 유무나 그 종류 등을 보다 자세하게 판정함과 더불어, 결함 부분의 화상을 표시부에 표시한다.On the other hand, the
촬상 장치(2)는, 기판(S) 상의 검사 대상 영역을 촬상함으로써 화상 데이터를 취득하는 촬상부(21), 기판(S)을 유지하는 스테이지(22), 및, 촬상부(21)에 대해 스테이지(22)를 상대적으로 이동시키는 스테이지 구동부(23)를 갖고 있다. 또, 촬상부(21)는, 조명광을 출사하는 조명부(211), 기판(S)에 조명광을 유도함과 더불어 기판(S)으로부터의 광이 입사하는 광학계(212), 및, 광학계(212)에 의해 결상된 기판(S)의 상(像)을 전기 신호로 변환하는 촬상 디바이스(213)를 갖고 있다. 스테이지 구동부(23)는 볼 나사, 가이드 레일 및 모터에 의해 구성되며, 제어 장치(3)에 설치된 장치 제어부(4)가 스테이지 구동부(23) 및 촬상부(21)를 제어함으로써, 기판(S) 상의 검사 대상 영역이 촬상된다.The
제어 장치(3)는 장치 제어부(4)를 갖고 있으며, 이 장치 제어부(4)가 미리 읽어들여진 제어 프로그램을 실행함으로써, 도 1에 나타낸 제어 장치 각 부를 이하와 같이 동작시킨다. 제어 장치(3)는, 상기 장치 제어부(4) 외에, 화상 취득부(5) 및 화상 처리부(6)를 구비하고 있다. 화상 취득부(5)는, 촬상부(21)로부터 출력되는 전기 신호를 데이터화하여, 촬상 화상에 대응하는 화상 데이터를 취득한다. 화상 처리부(6)는, 화상 취득부(5)가 취득한 화상 데이터에 대해 적절한 화상 처리를 실시하여, 화상에 포함되는 결함의 검출이나 결함 부분의 화상(이하 「결함 화상」이라 함)을 작성한다. 또한, 상기 화상 처리부(6)는 본 발명에 따른 라벨링 장치의 일 실시형태인 라벨링부를 포함하고 있으며, 결함 화상에 대한 라벨링 처리를 고속으로 실행 가능하도록 되어 있다. 화상 처리부(6), 특히 라벨링부의 구성 및 동작에 대해서는 뒤에서 상술한다.The
또한, 제어 장치(3)는, 각종 데이터를 기억하기 위한 기억부(7), 사용자로부터의 조작 입력을 접수하는 키보드 및 마우스 등의 입력 접수부(8) 및 조작 순서나 처리 결과 등의 사용자를 위한 시각 정보를 표시하는 표시부(9) 등을 구비하고 있다. 또, 도시를 생략하고 있지만, 광디스크, 자기 디스크, 광자기 디스크 등의 컴퓨터 판독 가능한 기록 매체로부터 정보의 판독을 행하는 판독 장치를 갖고, 검사 시스템(1)의 다른 구성과의 사이에서 신호를 송수신하는 통신부가, 적절하게 인터페이스(1/F)를 통하는 등 하여 접속된다.The
도 2는 화상 처리부의 개략 구성을 나타내는 블럭도이다. 화상 처리부(6)는, 필터링부(61), 차분 추출부(62), 이치화 처리부(63), 라벨링부(64) 및 고립 제거 처리부(65)를 갖고 있다. 필터링부(61)에는, 화상 취득부(5)로부터 촬상 화상이 보내어져 옴과 더불어, 기억부(7)로부터 참조 화상이 보내어져 온다. 이들 두 화상 중 촬상 화상은, 촬상 장치(2)에 의해서 촬상된 기판(S)의 화상이며, 결함 검출 검사의 대상이 되는 검사 대상 화상에 상당한다. 또, 참조 화상은 결함이 없는 이상적인 기판에 대응하는 화상이며, 이 실시형태에서는, 다음에 설명하는 바와 같이, 검사 대상 화상과 참조 화상의 비교에 의해 검사 대상 화상으로부터 결함 검출이 행해진다. 이들 결함 화상 및 참조 화상은 기억부(7)에 기억되고, 필요에 따라서 참조되는데, 외부의 기억 매체에 기억된 화상 데이터를 필요에 따라서 읽어들이는 형태여도 된다.2 is a block diagram showing a schematic configuration of an image processing unit. The
필터링부(61)는, 검사 대상 화상 및 참조 화상의 각각에 대해서, 화상 노이즈 및 결함과 관계가 없는 경미한 화상의 차이를 제거하기 위한 필터링 처리를 행하고, 각 화상을 차분 추출부(62)로 보낸다. 이 차분 추출부(62)는, 본 발명의 「화상 추출부」의 일례에 상당하는 것이며, 필터링 처리 후의 검사 대상 화상 및 참조 화상의 차분을 구함으로써 화상 내용이 서로 상이한 영역을 추출하고, 상기 차분 화상을 이치화 처리부(63)로 보낸다. 그리고, 이치화 처리부(63)는 적당한 역치에 의해서 차분 화상을 이치화하여 이치 화상 데이터(BFI)를 생성하고, 라벨링부(64)로 보낸다. 이 라벨링부(64)는 이치 화상 데이터(BFI)를 런 렝스화하여 복수의 런을 생성하고, 상기 복수의 런에 대해 라벨을 부여한다. 또한, 고립 제거 처리부(65)가 라벨링된 이치 화상으로부터 잔류하는 고립점을 제거한다. 이에 의해, 구하는 결함 위치 화상이 작성되고, 화상 처리부(6)가 출력된다.The
도 3은, 본 발명에 따른 라벨링 장치의 일 실시형태에 상당하는 라벨링부의 개략 구성을 나타내는 블럭도이다. 이 라벨링부(64)는 복수의 프로세서 코어(641)를 갖는 GPU(Graphic Processing Unit)(642)를 구비하고 있다. 이 GPU(642)에서는, 각 프로세서 코어(641)가 개별 갱신 처리부(643) 및 개별 탐색 처리부(644)로서 기능하고, 런마다의 개별 갱신 처리 및 개별 탐색 처리를 각각 하나의 스레드로서 실행한다. 본 실시형태에서는, 런마다의 개별 갱신 처리가 본 발명의 「갱신 스레드」의 일례에 상당하고, 런마다의 개별 탐색 처리가 본 발명의 「탐색 스레드」의 일례에 상당하고 있다. 또한, 개별 갱신 처리 및 개별 탐색 처리에 대해서는, 뒤에서 상술한다.3 is a block diagram showing a schematic structure of a labeling section corresponding to an embodiment of the labeling apparatus according to the present invention. The
또, 라벨링부(64)는 이치 화상 데이터(BFI), 런 r[m]을 특정하기 위한 데이터(이하 「런 데이터」라고 함), 런 접속 데이터 id[m]를 기억하는 라벨링용 기억부(645)를 갖고 있다. 이들 데이터에 대해서도, 뒤에서 구체적인 예를 나타내면서 상술한다.The
또한, 라벨링부(64)는, CPU(Central Processing Unit)나 메모리 등으로 구성된 연산 처리부(646)가 설치되어 있다. 연산 처리부(646)에서는, CPU가 소정의 프로그램에 따라서 연산 처리함으로써, 이치 화상 데이터(BFI)를 런 렝스화하여 런 r[m]을 생성하는 런 생성부(647), GPU(642) 내의 각 프로세서 코어(641)에서 실행되는 스레드를 배타 제어하면서 병렬하여 실행시키는 병렬 처리 제어부(648), 및 런 r[m] 및 런 접속 데이터 id[m]에 포함되는 라벨 번호를 초기화하는 데이터 초기 설정부(649)를 구비하고 있다. 이와 같이 연산 처리부(646)가 본 발명의 「제어부」로서 기능한다.The
다음에, 상기와 같이 구성된 라벨링부(64)에 의한 라벨링 동작에 대해서 도 4 내지 도 10을 참조하면서 설명한다. 도 4는 라벨링부에 의한 라벨링 동작을 나타내는 플로차트이다. 이치화 처리부(63)에 의해 작성된 이치 화상 데이터(BFI)가 라벨링부(64)에 부여되면, 라벨링부(64)의 연산 처리부(646)는 라벨링부(64)의 각 부를 제어하여 라벨링 처리를 실행한다. 우선, 상기 이치 화상 데이터(BFI)가 일시적으로 라벨링용 기억부(645)에 등록된다. 또, 이치 화상 데이터(BFI)에 대해, 런 렝스화 처리가 런 생성부(647)에서 실행되어 복수의 런 r[m]이 생성되고(단계 S1), 라벨링용 기억부(645)에 기억된다. 또한, 런 렝스화 처리에 대해서는 종래 주지 기술이 많이 제안되고 있으며, 본 실시형태에 있어서도 일반적인 런 렝스화 처리를 그대로 이용하고 있다. 따라서, 런 렝스화 처리의 설명은 생략한다.Next, the labeling operation by the
도 5는 라벨링부에 부여되는 이치 화상 데이터의 일례를 나타내는 도면이다. 또, 도 6은 도 5의 이치 화상 데이터에 대해 런 렝스화 처리를 실행하여 얻어지는 런의 런 데이터 및 런끼리의 연결 관계를 나타내는 런 접속 데이터의 초기치를 나타내는 도면이다. 도 5 및 도 6(a) 중의 종방향 및 횡방향의 수치(0, 1, 2, …)는, 매트릭스 배열된 화소의 행방향 및 열방향의 좌표 위치, 행 인덱스 및 열 인덱스를 나타내고 있다. 또, 도 5에서, 해칭이 실시된 화소는, 「1」의 화소 데이터를 갖는 화소인 것을 나타내는 한편, 해칭이 실시되지 않은 화소는, 「0」의 화소 데이터를 갖는 화소인 것을 나타내고 있다. 이러한 화소 데이터를 갖는 이치 화상 데이터(BFI)에 대해 행마다의 런 렝스화 처리를 추가하면, 도 6(a)에 나타낸 런이 얻어진다. 구체적으로는, 0행째 및 4행째에 있어서는, 「1」의 화소는 존재하지 않기 때문에, 런은 작성되지 않고, 1행째 내지 3행째에 있어서는, 각각 2개, 2개 및 1개의 런이 작성된다. 이 명세서에서는, 런 렝스화 처리에 의해서 작성된 각 런의 런 번호를 「m」으로 표시하고, 런의 작성 순으로 0, 1, 2, …의 값을 취하고 있으며, 런 번호 m의 런을 r[m]으로 표시한다.5 is a diagram showing an example of the normal image data given to the labeling section. 6 is a diagram showing initial values of run data obtained by executing the run length process on the normal image data of FIG. 5 and run connection data indicating the connection relationship between the runs. The numerical values (0, 1, 2, ...) in the vertical and horizontal directions in FIGS. 5 and 6A indicate the coordinate positions in the row direction and the column direction of the pixels arranged in a matrix, the row index and the column index. In Fig. 5, the hatched pixel indicates that the pixel has pixel data of " 1 " while the pixel on which hatching is not performed indicates that the pixel has pixel data of " 0. " By adding run length processing for each row to the binary image data BFI having such pixel data, the run shown in Fig. 6 (a) is obtained. Specifically, since there is no pixel of "1" in the 0th row and the 4th row, no run is created, and 2 runs, 2 runs and 1 run are created in the 1st to 3rd rows . In this specification, the run number of each run created by the run-length process is denoted by "m", and 0, 1, 2, ... , And the run of the run number m is denoted by r [m].
또, 도 5의 이치 화상 데이터(BFI)를 런 렝스화 처리하여 작성되는 런 r[0]~r[4]의 런 데이터를 런 번호순으로 라벨링용 기억부(645)의 런 데이터 기억 영역에 저장한 상태가 도 6(b)에 도시되어 있다. 동 도면 (b) 중에서, 「라벨 번호」는 상기 런에 부여된 라벨을 나타내며, 「시단 화소 위치」는 이치 화상 데이터(BFI)에 있어서의 상기 런의 시단 화소 위치를 나타내는 열 인덱스를 나타내고, 「종단 화소 위치」는 이치 화상 데이터(BFI)에 있어서의 상기 런의 종단 화소 위치를 나타내는 열 인덱스를 나타내며, 「행 인덱스」는 이치 화상 데이터(BFI)에 있어서의 상기 런의 행 인덱스를 나타내고 있다. 이들 중 「라벨 번호」는, 상기 런과 상기 런 이외의 런의 연결 관계를 나타내는 값이며, 뒤에서 설명하는 갱신 처리(단계 S3) 및 탐색 처리(단계 S4)를 실행함으로써 도 5 에 나타내는 이치 화상 데이터(BFI)에 있어서 서로 연결하고 있는 런끼리에 대해 같은 값이 부여된다. 또한, 본 실시형태에서는, 탐색 처리(단계 S4)를 효율적으로 실행하기 위해서, 런끼리의 연결 관계를 나타내는 런 접속표를 갖고 있다. 이 런 접속표에서는, 런 r[m] 의 접속 상태를 나타내는 데이터로서 런 접속 데이터 id[m]가 설치되고, 라벨 번호에 의해 런 r[m]과 그 외의 런의 접속 상태를 나타내고 있으며, 예를 들면 도 6(c)에 나타낸 바와 같은 표 형식으로 라벨링용 기억부(645)의 런 접속 데이터 기억 영역에 저장된다.The run data of runs r [0] to r [4] generated by run length processing of the binary image data BFI in Fig. 5 is stored in the run data storage area of the
도 4로 돌아와서 라벨링 처리의 설명을 계속한다. 본 실시형태에서는, 이치 화상 데이터(BFI)로부터 런을 작성했을 때에, 런마다, 상기 런과 상기 런 이외의 런의 연결 관계를 나타내는 라벨로서 서로 상이한 라벨 번호를 설정한다(단계 S2). 본 실시형태에서는, 런 r[m]의 라벨 번호 및 런 접속 데이터 id[m]의 라벨 번호를 런 번호 m과 일치시키고 있다. 즉, 런 r[0], r[1], …의 라벨 번호를 각각 「0」, 「1」, …로 초기 설정함과 더불어, 런 접속 데이터 id[0], id[1], …의 라벨 번호에 대해서도 각각 「0」, 「1」, …로 초기 설정한다.Returning to Fig. 4, the description of the labeling process is continued. In the present embodiment, when a run is created from the binary image data BFI, a different label number is set as a label indicating a connection relationship between the run and the run other than the run (step S2). In the present embodiment, the label number of run r [m] and the label number of run connection data id [m] are matched with run number m. That is, the run r [0], r [1], ... Quot; 0 ", " 1 ", " In addition to the initial setting of the run connection data id [0], id [1], ... Quot; 0 ", " 1 ", " .
다음 단계 S3에서는 갱신 처리(단계 S3)가 실행된다. 이 갱신 처리에서는, 런마다 개별 갱신 처리가 실행된다. 이 「개별 갱신 처리」란, 하나의 런을 처리 대상 런으로 함과 더불어 상기 처리 대상 런의 하행에서 세로 및 비스듬하게 접속하는 연결 런이 존재하는지 아닌지를 판정하고, 연결 런이 존재할 때에는, 처리 대상 런 및 연결 런 중 런 접속 데이터의 라벨 번호가 큰 쪽을 작은 라벨 번호로 갱신하는 처리이며, 본 실시형태에서는 복수개(예를 들면 n개)의 런의 각각에 대해서 개별 갱신 처리를 실행한다. 여기서, 이들 n개의 개별 갱신 처리를 시리얼, 예를 들면 런 번호순으로 행하는 것도 가능하지만, 이 경우, 갱신 처리에 다대한 시간을 소비해 버린다.In the next step S3, an update process (step S3) is executed. In this update processing, individual update processing is executed for each run. This " individual update process " refers to one run as a process target, and determines whether or not there is a connection run that connects vertically and obliquely in the downward direction of the run subject to be processed. If there is a connection run, In the present embodiment, the update process is performed for each of a plurality of (for example, n) runs. Here, although it is possible to perform these n individual update processes in serial, for example, run number order, in this case, a lot of time is spent in the update process.
그래서, 본 실시형태에서는, 런마다의 개별 갱신 처리를 하나의 스레드로 하고, GPU(642) 내의 각 프로세서 코어(641)에 의해 스레드가 병렬적으로 실행된다. 즉, 도 3에 나타낸 바와 같이, 제0 프로세서 코어(641)에서는 런 r[0]을 처리 대상 런으로서 개별 갱신 처리가 실행되고, 이에 병행하여 제1 프로세서 코어(641)에서는 런 r[1]을 처리 대상 런으로서 개별 갱신 처리가 실행된다. 또, 그 외의 런 r[2], r[3], …, r[n]에 대해서도, 상기 개별 갱신 처리와 병행하여 실행된다. 단, 각 개별 갱신 처리에서는, 후술하는 바와 같이 런 접속 데이터 중의 라벨 번호의 갱신 작업이 수반하기 때문에, 본 실시형태에서는 병렬 처리 제어부(648)가 프로세서 코어(641) 사이에서의 배타 제어를 행한다.Thus, in the present embodiment, the individual update processing for each run is made as one thread, and the threads are executed in parallel by each
도 7은 각 프로세서 코어에서 실행되는 개별 갱신 처리를 나타내는 플로차트이다. 또, 도 8은 각 프로세서 코어에서 실행되는 개별 갱신 처리의 일례를 나타내는 모식도이다. 여기에서는, 우선 도 7을 참조하면서 런 번호 p(p=O, 1, 2, … 또는 n)의 런 r[p]에 대한 개별 갱신 처리의 기본 동작을 설명하고, 그 다음에 도 8의 구체적인 예를 참조하면서 라벨 번호의 갱신예에 대해서 설명한다.7 is a flowchart showing individual update processing executed in each processor core. 8 is a schematic diagram showing an example of individual update processing executed in each processor core. Here, the basic operation of the individual update process for the run r [p] of the run number p (p = 0, 1, 2, ..., or n) will first be described with reference to FIG. 7, An example of updating the label number will be described with reference to examples.
런 r[p]의 개별 갱신 처리는 제p 프로세서 코어(641)에 의해 이하와 같은 순서로 실행된다. 단계 S11에서는, 런 r[p]를 처리 대상 런으로 하고, 이 처리 대상 런 r[p] 의 하행에 접속되는 런을 제1 연결 런으로서 추출한다. 그리고, 제1 연결 런이 추출되지 않았던 경우(단계 S12에서 「NO」인 경우)에는, 상기 스레드에서의 개별 갱신 처리를 종료한다.The individual update processing of the run [p] is executed by the p-
한편, 제1 연결 런이 추출된 경우(단계 S12에서 「YES」인 경우)에는, 이하의 단계 S13~S21을 실행하여 라벨 번호의 갱신을 행한다. 또한, 여기에서는, 런 r[p]의 하행에 위치하는 런 r[q]가 제1 연결 런으로서 추출된 것으로 설명을 계속한다.On the other hand, if the first connection run is extracted ("YES" in step S12), the following steps S13 to S21 are executed to update the label number. Here, it is assumed that the run r [q] located on the downward run of the run r [p] is extracted as the first connected run.
다음의 단계 S13에서는, 런 r〔p], r[q]에 각각 대응하는 런 접속 데이터 id[p], id[q]를 라벨링용 기억부(645)로부터 독출한다. 여기서, 런 접속 데이터 id[p], id[q]가 같은 값, 즉 동일한 라벨 번호가 설정되어 있으며, 이미 연결 관계가 설정되어 있는 경우(단계 S14에서 「YES」인 경우)에는, 상기 개별 갱신 처리를 종료한다.In the next step S13, the run connection data id [p] and id [q] corresponding to the runs r [p] and r [q] are read from the
한편, 단계 S14에서 「NO」라고 판정되는, 런 접속 데이터 id[p], id[q]가 상이한(서로 상이한 라벨 번호가 설정되어 있는) 경우에는, 런 접속 데이터의 갱신이 행해진다. 이와 같이 런 접속 데이터 id[p], id[q]가 서로 상이한 것은, 런[p]와 런[q] 사이에 연결 관계가 성립하고 있지 않음을 의미하고 있다. 그러나, 실제로는 접속 관계가 성립하고 있기 때문에, 런 접속 데이터 id[p], id[q]의 대소 관계에 따라 한쪽의 라벨 번호를 다른쪽의 라벨 번호로 갱신한다(단계 S15~S19).On the other hand, when the run connection data id [p] and id [q] which are determined as " NO " in step S14 are different (different label numbers are set), the run connection data is updated. The fact that the run connection data id [p] and id [q] are different from each other in this manner means that a connection relationship is not established between run [p] and run [q]. However, since the connection relationship is actually established, one label number is updated to the other label number in accordance with the magnitude relationship between the run connection data id [p] and id [q] (steps S15 to S19).
단계 S15에서 런 접속 데이터 id[p], id[q]를 대비하여, 그 대비 결과로부터 런 접속 데이터 id[p]가 런 접속 데이터 id[q]보다도 큰 라벨 번호인 것이 판명된 경우에는, 런 접속 데이터 id[p]를 런 접속 데이터 id[q]로 재기록하고, 런 접속 데이터 id[p]를 보다 작은 라벨 번호로 갱신한다(단계 S16). 또, 이와 같이 변경되는 측의 런 r[p]의 라벨 번호를 값 (old_dum)으로서 등록하고, 변경되기 전의 런 접속 데이터 id[p]를 값 (old_id)으로 해서 등록함과 더불어, 변경된 후의 런 접속 데이터 id[p]를 값 (new_id)으로서 등록한다(단계 S17).In the case where the run connection data id [p] is found to be a label number larger than the run connection data id [q] from the comparison result in the step S15 in comparison with the run connection data id [p] and id [q] Rewrites the connection data id [p] to the run connection data id [q], and updates the run connection data id [p] to a smaller label number (step S16). It is also possible to register the label number of the run r [p] on the side to be changed as the value old_dum, register the run connection data id [p] before the change as the value old_id, And registers the connection data id [p] as a value (new_id) (step S17).
반대로, 런 접속 데이터 id[q]가 런 접속 데이터 id[p]보다도 큰 라벨 번호인 것이 판명된 경우에는, 런 접속 데이터 id[q]를 런 접속 데이터 id[p]로 재기록하고, 런 접속 데이터 id[q]를 보다 작은 라벨 번호로 갱신한다(단계 S18). 또, 이와 같이 변경되는 측의 런 r[q]의 라벨 번호를 값 (old_dum)으로서 등록하고, 변경되기 전의 런 접속 데이터 id[q]를 값 (old_id)로서 등록함과 더불어, 변경된 후의 런 접속 데이터 id[q]를 값 (new_id)로서 등록한다(단계 S19).Conversely, when it is found that the run connection data id [q] is a label number larger than the run connection data id [p], the run connection data id [q] is rewritten with the run connection data id [p] id [q] to a smaller label number (step S18). The label number of the run r [q] on the side to be changed in this way is registered as the value old_dum, the run connection data id [q] before the change is registered as the value old_id, The data id [q] is registered as a value (new_id) (step S19).
그리고, 값 (old_dum)과 값 (old_id)가 일치하는 경우(단계 S20에서 「YES」인 경우)에는, 상기 개별 갱신 처리를 종료한다. 한편, 양자가 일치하지 않는 경우(단계 S1O에서 「NO」인 경우)에는, 라벨 번호를 갱신한 측의 런(이하 「갱신 런」이라 함)이 처리 대상 런 및 상기 제1 연결 런 이외의 런(이하 「제2 연결 런」이라 함)과 연결되어 있다. 여기서, 이러한 제2 연결 런이 존재하는 경우에는, 단계 S21을 실행한 다음에 단계 S13으로 되돌아온다. 즉, 단계 S21에서는 런 번호 p를 값 (old_id)로 재기록함과 더불어 런 번호 q를 값 (new_id)로 재기록한다. 이에 의해서, 갱신 런이 새로운 런 r[p]로서, 또 제2 연결 런이 새로운 런 r[q]로서 설정되고, 단계 S13으로 되돌아와, 갱신 런과 제2 연결 런 사이에서 라벨 번호의 차이를 체크하고(단계 S14), 라벨 번호가 상이한 경우에는 큰 쪽의 라벨 번호를 작은 쪽의 라벨 번호로 갱신한다(단계 S15~S19).If the value (old_dum) matches the value (old_id) ("YES" in step S20), the individual update processing ends. On the other hand, when both are not coincident (" NO " in step S1O), the run on the side where the label number is updated (hereinafter referred to as the update run) (Hereinafter referred to as " second connection run "). Here, if such a second connected run exists, the process returns to step S13 after executing step S21. That is, in step S21, the run number p is rewritten to the value (old_id), and the run number q is rewritten to the value (new_id). Thereby, the renewed run is set as a new run r [p] and the second connected run is set as a new run r [q], and the process returns to step S13 and the difference of the label numbers (Step S14). When the label numbers are different, the larger label number is updated to the smaller label number (steps S15 to S19).
이와 같이 개별 갱신 처리에서는, 처리 대상 런과 직접적으로 접속하는 직접 연결 런뿐만 아니라, 상기 직접 연결 런을 통해 처리 대상 런과 간접적으로 접속하는 간접 연결 런에 대해서도 라벨 번호를 갱신하고 있다.As described above, in the individual update processing, the label number is updated not only for the direct connection run directly connected to the run target, but also for the indirect run connected indirectly to the run target run through the direct connected run.
다음에, 도 6(a) 및 (b)에 나타내는 런 r[0]~r[4]에 대해 갱신 처리를 실행한 경우의 일례(도 8)를 참조하면서 갱신 처리(단계 S3)의 내용을 더욱 자세하게 설명한다. 또한, 도 8 중의 종축은 시간 경과를 나타내고 있으며, 개시 시점에서는 런 접속 데이터 id[0]~id[4]는 각각 초기치, O~4로 설정되어 있다. 런 접속 데이터 id[o]~id[4] 중 검게 표시한 것은 갱신 변경 후의 라벨 번호를 나타내고 있다. 또, 「제0 스레드」~「제4 스레드」의 하방에 나열되어 있는 항목(「연결 런:존재」,「재기록 금지」등)은 각 프로세서 코어(641)에서 실행되는 처리 내용을 나타내고 있다.Next, the content of the update process (step S3) is described with reference to an example (Fig. 8) in the case where the update process is executed for the runs r [0] to r [4] shown in Figs. 6A and 6B I will explain in more detail. 8 shows the elapsed time. At the start time, the run connection data id [0] to id [4] is set to an initial value of 0 to 4, respectively. The run connection data id [o] to id [4] denoted by black indicates the label number after the update change. The items listed below the "0th thread" to the "fourth thread" ("connected run: existence", "prohibition of rewriting", etc.) indicate processing contents executed in each
n개의 프로세서 코어(641) 중 5개의 프로세서 코어(641)에서는, 각각 런 r [0]~r[4]의 개별 갱신 처리가 병렬적으로 실행된다. 이들 중 런 r[3], r[4]의 개별 갱신 처리는 각각 제3 스레드 및 제4 스레드로서 실행되지만, 둘 다 하행이 없고, 제1 연결 런이 존재하지 않기 때문에, 조기에 스레드(단계S3-3, S3-4)를 종료하고, 개별 갱신 처리를 완료한다. 한편, 런 r[0]~r[2]의 개별 갱신 처리에서는 연결 런이 존재하는 것이 확인되고, 그들에 대응하는 런 접속 데이터의 독출, 대비, 재기록 등이 행해진다. 여기서, 예를 들면 제2 스레드(런 r[2]의 개별 갱신 처리)에서는, 처리 대상 런인 런 r[2]와, 그에 접속하는 연결 런 r[4]의 런 접속 데이터 id[2], id[4]의 값, 즉 라벨 번호가 독출된다. 여기에서는,In the five
id[2]=2,id [2] = 2,
id[4]=4,id [4] = 4,
로 되어 있다. 이들을 대비한 결과, 런 접속 데이터 id[4]가 런 접속 데이터 id[2]보다도 큰 값이기 때문에, 런 접속 데이터 id[4]의 라벨 번호를 런 접속 데이터 id[2]의 라벨 번호로 재기록할 필요가 있다. 이렇게 하여 제2 스레드에서의 재기록 준비가 가장 먼저 갖춰지면, 병렬 처리 제어부(648)에 의해 제O 스레드 및 제1 스레드의 개별 갱신 처리에 있어서의 데이터 재기록이 일시적으로 금지된 상태로, 런 접속 데이터 id[4]의 재기록이 실행되고, 런 접속 데이터 id[4]의 라벨 번호는 「4」에서 「2」로 갱신된다. 또, 갱신된 런 r[4]의 라벨 번호인 값 (old_dum)과, 변경 전의 런 접속 데이터 id[4]인 값 (old_id)는 둘 다 「4」이며, 같은 값이라는 점에서 제2 스레드(단계 S3-2)를 종료한다.. As a result of comparison between them, since the run connection data id [4] is larger than the run connection data id [2], the label number of the run connection data id [4] is rewritten to the label number of the run connection data id [2] There is a need. When the preparation for rewriting in the second thread is first provided, the parallel processing control unit 648 temporarily stores the run-in data in the state in which the data rewriting in the individual update processing of the O-th thread and the first thread is temporarily inhibited by the parallel processing control unit 648. [ id [4] is rewritten, and the label number of the run connection data id [4] is updated from "4" to "2". The value (old_dum) which is the label number of the updated run r [4] and the value (old_id) which is the run connection data id [4] before the change are both equal to "4" Step S3-2) ends.
다음에, 동 도면에 나타낸 바와 같이, 제1 스레드에 있어서 재기록 준비가 갖춰지면, 병렬 처리 제어부(648)에 의해 제O 스레드의 개별 갱신 처리에 있어서의 데이터 재기록이 일시적으로 금지된 상태로, 런 접속 데이터 id[2], id[3]의 재기록이 실행된다. 보다 구체적으로는, 제1 스레드(런 r[1]의 개별 갱신 처리)에서는, 처리 대상 런인 런 r[1]과 하행에서 런 r[2], r[3]이 접속하고 있으며, 이들이 제1 연결 런이라고 인정된다. 그리고, 처리 대상 런 r[1]의 런 접속 데이터 id[1]과, 연결 런 r[2], r[3]의 런 접속 데이터 id[2], id[3]을 독출한다. 그들은,Next, as shown in the figure, if the first thread is ready to be rewritten, the parallel processing control unit 648 judges whether or not the rewriting of data in the individual update processing of the first thread is temporarily prohibited by the parallel processing control unit 648 Rewriting of the connection data id [2], id [3] is executed. More specifically, in the first thread (individual update processing of run [1]), run-in run r [1] and run r [2] and r [3] are connected in descending order, It is recognized as a connection run. Then, the run connection data id [1] of the object run r [1] and the run connection data id [2] and id [3] of the connect runs r [2] and r [3] are read out. they,
id[1]=1,id [1] = 1,
id[2]=2,id [2] = 2,
id[3]=3,id [3] = 3,
으로 되어 있다. 이들을 대비한 결과, 런 접속 데이터 id[2], id[3]은 모두 런 접속 데이터 id[1]보다도 큰 값이므로, 런 접속 데이터 id[2], id[3]의 라벨 번호를 함께 런 접속 데이터 id[1]의 라벨 번호로 재기록한다. 또, 갱신된 런 r[2]에 대해서는, 그 라벨 번호인 값 (old_dum)과, 변경 전의 런 접속 데이터 id[2]인 값 (old_id)는 둘 다 「2」이다. 또, 갱신된 런 r[3]에 대해서는, 그 라벨 번호인 값 (old_dum)과, 변경 전의 런 접속 데이터 id[3]인 값 (old_id)는 둘 다 「3」이다. 이와 같이, 런 r[2], r[3] 어느 것에 대해서나, 값 (old_dum)과 값 (old_id)는 같은 값이라는 점에서 제1 스레드(단계 S3-1)를 종료한다.Respectively. Since the run connection data id [2] and id [3] are both larger than the run connection data id [1] as a result of comparison between them, the run connection data id [2] Rewrites to the label number of data id [1]. For the updated run r [2], the value (old_dum) as the label number and the value (old_id) as the run connection data id [2] before the change are both "2". For the updated run r [3], the value (old_dum) which is the label number and the value (old_id) which is the run connection data id [3] before the change are both "3". Thus, the first thread (step S3-1) is terminated because the value (old_dum) and the value (old_id) have the same value for both the runs r [2] and r [3].
최후에 남은 제0 스레드(런 r[0]의 개별 갱신 처리)에서는, 처리 대상 런인 런 r[0]과 하행에서 런 r[2]가 접속하고 있으며, 이것을 연결 런으로서 상기 제1 스레드 및 제2 스레드와 동일하게 하여 런 접속 데이터 id[2]의 라벨 번호를 런 접속 데이터 id[0]의 라벨 번호로 재기록한다. 단, 갱신된 런 접속 데이터 id [2]는 이미 1회 재기록되어 초기치(런 r[2]의 초기 라벨 번호=2)로부터 「1」로 되어 있으며, 상기 런 r[2]의 라벨 번호인 값 (old_dum)과, 변경 전의 런 접속 데이터 id[2]인 값 (old_id)는 각각 「2」, 「1」이며, 상이하다. 그래서, 도 7의 단계 S21에서 실행하고 있는 바와 같이, 런 접속 데이터 id[0], id[1]의 독출, 대비, 재기록을 행하고, 도 8의 아래 부분에 나타낸 바와 같이, 런 접속 데이터 id[1]의 라벨 번호를 런 접속 데이터 id[0]의 라벨 번호로 재기록한다. 이렇게 하여, 갱신된 런 r[1]의 라벨 번호인 값 (old_dum)과, 변경 전의 런 접속 데이터 id[1]인 값 (old_id)는 둘 다 「1」이며, 같은 값이라는 점에서 제0 스레드(단계 S3-0)를 종료한다. 이와 같이, 런 r[1]은 처리 대상 런 r[0]과 직접적으로 접속되어 있지 않지만, 런 r[2]를 통해 간접적으로 접속되어 있으며, 그것에 대해서도 런 접속 데이터의 갱신이 행해진다., The run-in run r [0] and the run r [2] are connected in the last run of the 0th thread (the individual update processing of the run [0] And rewrites the label number of the run connection data id [2] to the label number of the run connection data id [0] in the same manner as the second thread. The updated run connection data id [2] has already been rewritten once and becomes "1" from the initial value (initial label number of the run r [2] = 2), and the value which is the label number of the run r [ (old_dum) and the value (old_id) of the run connection data id [2] before the change are "2" and "1", respectively. As a result, the run connection data id [0] and id [1] are read, compared, and rewritten as executed in step S21 of FIG. 7, 1] to the label number of the run connection data id [0]. Thus, the value (old_dum) which is the label number of the updated run r [1] and the value (old_id) which is the run connection data id [1] before the change are both equal to "1" (Step S3-0). Thus, the run r [1] is indirectly connected through the run r [2] although it is not directly connected to the run r [0] to be processed, and the run connection data is also updated there.
이렇게 하여 모든 스레드가 종료되면, 갱신 처리(단계 S3)가 완료되고, 도 6(a) 및 (b)에 나타낸 런 r[0]~r[4]에 대해 갱신 처리를 실행함으로써 런 접속 데이터 id[0]~id[4]가 (0, 1, 2, 3, 4)에서 (0, 0, 0, 1, 2)로 갱신된다. 또한, 상기 설명으로부터 알 수 있듯이, 1스레드 1런으로 병행 처리하고 있으므로, 어느 런이 먼저 처리되는지에 따라 갱신 처리 후의 런 접속 데이터 id[0] ~id[4]의 라벨 번호는 상이한 값을 취할 수 있다.When all the threads are thus terminated, the update processing (step S3) is completed and the update processing is executed for the runs r [0] to r [4] shown in Figs. 6A and 6B, [0] to id [4] are updated from (0, 1, 2, 3, 4) to (0, 0, 0, 1, 2). Also, as can be seen from the above description, since the processes are performed concurrently by one thread and one run, the label numbers of the run connection data id [0] to id [4] after the update processing take different values depending on which run is processed first .
다음에, 도 4로 돌아와서 라벨링 처리의 설명을 계속한다. 상기 갱신 처리(단계 S3)가 완료되면, 탐색 처리(단계 S4)를 실행한다. 이 탐색 처리도 갱신 처리와 동일하게, 런마다의 개별 탐색 처리를 하나의 스레드로 하고, 병렬 처리 제어부(648)에 의해 재기록 타이밍을 제어하면서 GPU(642) 내의 각 프로세서 코어(641)에 의해 스레드를 병렬적으로 실행한다. 즉, 도 3에 나타낸 바와 같이, 제0 프로세서 코어(641)에서는 런 r[0]을 처리 대상 런으로서 개별 탐색 처리가 실행되고, 이에 병행하여 제1 프로세서 코어(641)에서는 런 r[1]을 처리 대상 런으로서 개별 탐색 처리가 실행된다. 또, 그 외의 런 r[2], r[3], …, r[n]에 대해서도, 상기 개별 탐색 처리와 병행하여 실행된다. 또한, 「개별 탐색 처리」란, 하나의 런을 처리 대상 런으로 함과 더불어 상기 처리 대상 런에 접속하는 연결 런을 데이터 접속표(런 접속 데이터 id[0], id[1], …,id[n])에 의거하여 찾아내어 처리 대상 런 및 연결 런의 라벨 번호를 동일하게 재기록하는 것이다. 이하, 도 9 및 도 l0을 참조하면서 개별 탐색 처리에 대해서 상세히 기술한다.Next, returning to Fig. 4, the description of the labeling process is continued. When the update process (step S3) is completed, the search process (step S4) is executed. This search process is also performed by each
도 9는 각 프로세서 코어에서 실행되는 개별 탐색 처리를 나타내는 플로차트이다. 또, 도 10은 각 프로세서 코어에서 실행되는 개별 탐색 처리의 일례를 나타내는 모식도이다. 여기에서도, 개별 갱신 처리의 경우와 동일하게, 우선 도 9를 참조하면서 런 r[p]에 대한 개별 탐색 처리의 기본 동작을 설명하고, 그 다음에 도 10의 구체적인 예를 참조하면서 라벨 번호의 재기록의 예에 대해서 설명한다.9 is a flowchart showing individual search processing executed in each processor core. 10 is a schematic diagram showing an example of individual search processing executed in each processor core. Here, as in the case of the individual update process, the basic operation of the individual search process for the run r [p] is first described with reference to Fig. 9, and then the rewriting of the label number Will be described.
런 r[p]의 개별 탐색 처리는 제p 프로세서 코어(641)에 의해 이하의 순서대로 실행된다. 단계 S31에서는, 런 r[p]를 처리 대상 런으로 하고, 이 처리 대상 런 r[p]에 대응하는 런 접속 데이터 id[p]를 런 접속표로부터 독출하여, 취득한다. 그리고, 그 런 접속 데이터 id[p]가 처리 대상 런 r[p]의 라벨 번호의 초기치와 동일한지 아닌지를 판정한다(단계 S32). 여기서, 동일하다고 판정한 경우에는, 그대로 개별 탐색 처리를 완료한다. 한편, 상이하다고 판정한 경우(단계 S32에서 「NO」인 경우)에는, 단계 S33~S38을 실행하여 라벨 번호의 재기록을 행한다.The individual search processing of the run [p] is executed by the p-
단계 S33에서 런 접속 데이터 id[p]를 값 (new_dum)으로서 등록한 후, 런 접속 데이터 id[new_dum]을 런 접속표로부터 독출한다(단계 S34). 그리고, 런 접속 데이터 id[new_dum]과 값 (new_dum)이 동일한지 아닌지를 판정하고(단계 S35), 그들이 동일하지 않다고 판정하는 동안, 값 (new_dum)을 런 접속 데이터 id[new_dum]으로 재기록하고(단계 S36), 단계 S34로 돌아와서 새로운 런 접속 데이터 id[new_dum]의 독출을 반복한다.After registering the run connection data id [p] as a value (new_dum) in step S33, the run connection data id [new_dum] is read from the run connection table (step S34). Then, it is judged whether or not the run connection data id [new_dum] and the value (new_dum) are the same (step S35) and rewrites the value new_dum to the run connection data id [new_dum] Step S36) and returns to step S34 to repeat the reading of the new run connection data id [new_dum].
그리고, 런 접속 데이터 id[new_dum]과, 값 (new_dum)이 일치한 시점(단계 S35에서 「YES」라고 판정된 시점)에서, 런 번호 p의 런 r[p] 의 라벨 번호를 값 (new_dum)으로 재기록한다(단계 S37). 또, 런 접속 데이터 id[p]에 대해서도, 동일하게 값 (new_dum)으로 재기록하고(단계 S38), 상기 개별 탐색 처리를 종료한다. 또한, 이 재기록은 개별 갱신 처리의 경우와 동일하게 병렬 처리 제어부(648)에 의해 재기록 타이밍이 제어된 상태로 실행된다.Then, the label number of the run r [p] of the run number p is set to the value (new_dum) at the point of time when the run connection data id [new_dum] and the value (new_dum) (Step S37). Also, the run connection data id [p] is rewritten to the same value (new_dum) (step S38), and the individual search process is terminated. This rewriting is executed in a state in which the rewriting timing is controlled by the parallel processing control unit 648 in the same manner as in the case of the individual update processing.
다음에, 도 8에 나타낸 바와 같이 갱신 처리에 의해서 런 접속표가 초기 상태로부터 갱신되는데 이어서 탐색 처리를 실행한 경우의 일례(도 10)를 참조하면서 탐색 처리(단계 S4)의 내용을 더욱 자세하게 설명한다. 또한, 여기에서는, 런 r[4]를 처리 대상 런으로 하는 개별 탐색 처리에 대해서 도 10을 참조하면서 설명한다. 도 10 중의 종축은 시간 경과를 표시하고 있으며, 런 r[0]~r[4]의 라벨 번호의 초기치는 각각 0~4로 설정되어 있다. 라벨 번호 중 검게 표시한 것은 탐색 대상으로 되어 있는 라벨 번호를 나타내고 있다. 또, 「제4 스레드」의 하방에 나열되어 있는 항목(「id[4]의 취득→id[4]=2」등)은 제4 프로세서 코어(641)에서 실행되는 처리 내용을 나타내고 있다.Next, the contents of the search process (step S4) will be described in more detail with reference to an example (FIG. 10) in the case where the run connection table is updated from the initial state by the update process as shown in FIG. 8 and then the search process is executed do. Here, individual search processing of the run r [4] as the target run will be described with reference to Fig. The vertical axis in FIG. 10 indicates elapse of time, and the initial values of the label numbers of the runs r [0] to r [4] are set to 0 to 4, respectively. The label number in black indicates the label number to be searched. The items listed under "fourth thread" (acquisition of id [4] → id [4] = 2, etc.) indicate processing contents executed in
제4 프로세서 코어(641)에서는, 런 r[4]를 처리 대상 런으로 하고, 이 처리 대상 런 r[4]에 대응하는 런 접속 데이터 id[4]를 런 접속표로부터 독출하고, 이 값(=2)을 런 r[4]의 라벨 번호의 초기치(=4)와 대비한 바, 양자가 불일치인 것을 확인한다. 그러면, 독출 대상을, 런 접속 데이터 id[4]가 나타내는 라벨 번호 (new_dum)의 런 접속 데이터 id[new_dum], 즉 런 접속 데이터 id[2]로 이동하여, 런 접속표로부터 런 접속 데이터 id[2]를 독출하고, 이 값(=0)을 런 r[2]의 라벨 번호의 초기치(=2)와 대비한다. 그리고, 양자가 불일치인 것을 확인하면, 다시 독출 대상을, 런 접속 데이터 id[2]가 나타내는 라벨 번호 (new_dum)의 런 접속 데이터 id[new_dum], 즉 런 접속 데이터 id[0]으로 이동하여, 런 접속표로부터 런 접속 데이터 id[0]을 독출하고, 이 값(=0)을 런 r[0]의 라벨 번호의 초기치(=0)와 대비한다. 그러면, 양자가 일치함을 확인하고, 처리 대상 런 r[4]의 라벨 번호를 그 값으로 재기록하고, 이 스레드를 종료한다. 또한, 그 외의 스레드에 대해서도 동일한 개별 탐색 처리가 실행되고, 그 결과, 서로 접속하는 런이 탐색되어 동일한 라벨이 부여된다. 예를 들면 도 5에 나타낸 이치 화상 데이터에 대해 런 렝스화 처리하여 얻어진 런 r[0]~r[4](도 6 참조)에 대해서는 동일한 라벨(=0)이 부여된다.The
이상과 같이, 본 실시형태에서는, 런 r[m]마다 서로 상이한 값을 갖는 라벨 번호가 초기 설정된 후, 갱신 처리(단계 S3) 및 탐색 처리(단계 S4)의 2패스 공정을 실행하고 있다. 이들 중 갱신 처리(단계 S3)에서는, 런 r[m]마다, 개별 갱신 처리(단계 S3-0, S3-1, …)를 실행하여 처리 대상 런에 접속하는 연결 런이 존재하는지 아닌지에 따라 라벨 번호를 갱신하고 있다. 또, 탐색 처리(단계 S4)에서는, 런 r[m]마다, 개별 탐색 처리(단계 S4-0, S4-1, …)를 실행하여 처리 대상 런에 접속하는 연결 런을 갱신 후의 라벨 번호에 의거하여 찾아내어 처리 대상 런 및 연결 런의 라벨을 동일하게 재기록하고 있다. 이와 같이, 런의 개수 m과 동수개의 라벨 번호에 의해서 이치 화상 데이터(BFI)의 라벨링 처리를 행할 수 있어, 라벨링 처리를 고속화할 수 있다.As described above, in the present embodiment, the two-pass process of the update process (step S3) and the search process (step S4) is performed after the label numbers having different values are initially set for each run r [m]. In the renewal process (step S3), the individual update process (steps S3-0, S3-1, ...) is executed for each run r [m] The number is renewed. In the search process (step S4), the individual search process (steps S4-0, S4-1, ...) is executed for each run r [m] And the labels of the object run and the connection run are rewritten in the same manner. As described above, labeling processing of the binary image data (BFI) can be performed by the number of labels equal to the number of runs m, and labeling processing can be speeded up.
또, 갱신 처리(단계 S3) 및 탐색 처리(단계 S4) 어느 것이나, 1런 1스레드로 런마다의 개별 갱신 처리 및 개별 탐색 처리를 병렬적으로 실행하고 있기 때문에, 라벨링 처리에 필요로 하는 토탈 시간을 큰 폭으로 단축할 수 있다.In addition, since the update processing (step S3) and the search processing (step S4) are performed in parallel on the individual update processing and the individual search processing for each run with one run of one thread, the total time required for the labeling processing Can be greatly shortened.
또한, 개별 갱신 처리(단계 S3-0, S3-1, …)에 있어서는, 처리 대상 런에 직접 접속하는 제1 연결 런의 라벨 번호를 갱신했을 때에는, 그 제1 연결 런뿐만 아니라, 제1 연결 런에 접속하는 처리 대상 런 이외의 제2 연결 런이 존재하는 경우에는, 제2 연결 런에 대해서도 라벨 갱신하도록 구성하고 있다. 그 때문에, 처리 대상 런에 대한 개별 갱신 처리보다도 나중에 실행되는 제2 연결 런에 대한 개별 갱신 처리에 필요로 하는 시간을 단축할 수 있다. 그 결과, 토탈 처리 시간을 단축할 수 있다.Further, in the individual update processing (steps S3-0, S3-1, ...), when the label number of the first connection run to be directly connected to the processing target run is updated, not only the first connection run, When there is a second connected run other than the target run connected to the run, the second connected run is also updated with the label. Therefore, it is possible to shorten the time required for the individual update process for the second connection run to be executed later than the individual update process for the process target run. As a result, the total processing time can be shortened.
또한, 본 발명은 상기한 실시형태로 한정되는 것이 아니라, 그 취지를 일탈하지 않는 한, 상술한 것 이외에 다양한 변경을 행하는 것이 가능하다. 예를 들면, 상기 실시형태에서는, 1런 1스레드에 의해 개별 갱신 처리를 병렬적으로 실행하고 있지만, 복수의 런 r[m]의 분할 양태는 이에 한정되는 것은 아니다. 즉, 프로세서 코어(641)의 개수에 따라 복수의 런 r[m]의 분할 양태를 적절히 변경해도 되고, 복수의 런 r[m]을 프로세서 코어(641)의 개수에 따라 복수 세트로 분할하고, 각 프로세서 코어가 분할된 하나 또는 복수의 런에 대해서 개별 갱신 처리를 갱신 스레드로서 실행하도록 구성해도 된다. 이러한 점에 대해서는 개별 탐색 처리에서도 완전히 동일하다.The present invention is not limited to the above-described embodiments, 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, the individual update processing is executed in parallel by one run-1 thread, but the division mode of the plurality of runs r [m] is not limited to this. That is, the division mode of the plurality of runs r [m] may be appropriately changed according to the number of the
또, 상기 실시형태에서는, 개별 갱신 처리 및 개별 갱신 처리를 실행하기 위해서 복수의 프로세서 코어(641)를 갖는 GPU(642)를 이용하고 있지만, GPU 대신에 복수의 CPU를 설치하여, 각 CPU에서 하나의 스레드를 실행하도록 구성해도 된다. 또, GPU(642) 내에 연산 처리부(646)나 라벨링용 기억부(645)를 설치해도 된다.In the above embodiment, the GPU 642 having a plurality of
또, 상기 실시형태에서는, 제0~ 제n 프로세서 코어(641)의 상위에 위치하는 병렬 처리 제어부(648)가 라벨링용 기억부(645)의 액세스 관리를 행하고, 갱신 처리 및 탐색 처리 어느 것에 있어서도, 하나의 스레드에 의한 데이터 재기록에 따라 다른 스레드에 의한 데이터 재기록을 일시적으로 금지하고 있다. 즉, 하나의 스레드로 예를 들면 런 접속 데이터 id[m](단, 0≤m≤n)의 재기록을 행하는 경우, 다른 스레드가 런 접속 데이터 id[m]을 재기록하는 것을 일시적으로 금지하여 라벨 갱신의 경합을 회피할 뿐만 아니라, 그 이외의 런 접속 데이터의 재기록도 일시적으로 금지하고 있다. 이러한 액세스 관리는 반드시 최적이라고는 할 수 없고, 개선의 여지가 있다. 예를 들면 처리 속도의 새로운 향상을 도모하기 위해서는, 병렬 처리 제어부(648)에 의한 라벨링용 기억부(645)의 액세스 관리를 이하와 같이 실행하는 것이 바람직하다. 즉, 하나의 스레드로 런 접속 데이터 id[m]의 재기록을 행할 때에는, 다른 스레드가 런 접속 데이터 id[m]을 재기록하는 것을 일시적으로 금지하여 라벨 갱신의 경합을 회피하는 한편, 런 접속 데이터 id[m] 이외의 런 접속 데이터로의 액세스를 자유화하여 데이터 재기록을 허가하는 것이 바람직하다.In the above embodiment, the parallel processing control unit 648 located at the upper position of the 0th to
또, 상기 실시형태에서는, 이치 화상 데이터(BFI)를 행마다 런 렝스화하여 런 r[m]을 얻음과 더불어, 처리 대상 런의 하행에서, 또한 세로 및 비스듬한 방향으로 접속하는 런을 연결 런으로서 판정하고 있는데, 런 렝스화의 양태도 연결 런의 판정 양태도 이에 한정되는 것이 아니라, 예를 들면 열마다 런 렝스화하고, 상기 런 렝스화 처리에 의해 작성된 런에 대해 본 발명에 따른 라벨링 방법을 적용할 수 있다. 또, 상기 실시형태에서는, 상기한 바와 같이 하행의 런에 대한 8근방 탐색에 의해 연결 런을 결정하고 있는데, 그 외의 탐색 방법, 예를 들면 4근방 탐색에 의해 연결 런을 결정해도 된다. 또, 상기 실시형태의 런 렝스화 처리에서는 화상 전체에서 한 번에 런을 생성하고 있지만, 화상을 적당한 사이즈 영역으로 분단하고, 각 분단 범위에서 런을 생성해도 된다. 단, 이 경우에는, 분단 영역끼리의 경계에서 런의 접속 판정 처리를 행할 필요가 있다.In the above embodiment, a run r [m] is obtained by making the normal image data BFI run length-by-row to obtain a run r [m], and a run connected in the downward direction and in the oblique direction However, the embodiment of the run length and the determination of the connection run are not limited to this. For example, the run length may be run lengthwise and the labeling method according to the present invention may be applied to the run created by the run length processing Can be applied. In the above-described embodiment, the connection run is determined by the 8-sided search for the downward run as described above, but the connection run may be determined by another search method, for example, 4-sided search. In the run-length process of the above embodiment, the run is generated at once in the entire image. However, the image may be divided into an appropriate size region and a run may be generated in each divided range. In this case, however, it is necessary to perform run connection determination processing at the boundary between the divided regions.
또, 상기 실시형태에서는, 일련 번호의 라벨 번호(0, 1, 2, …)가 본 발명의 「라벨」로서 이용되고 있는데, 이것과 상이한 번호나 번호 이외의 값을 본 발명의 「라벨」로서 이용해도 된다. 또, 보다 작은 번호로 재기록하여 라벨 갱신하고 있는데, 라벨 갱신의 양태도 이에 한정되는 것은 아니다.In the above embodiment, the label number (0, 1, 2, ...) of the serial number is used as the "label" of the present invention. Values other than numbers and numbers different from this are used as "labels" May be used. In addition, the label is renewed by rewriting to a smaller number, but the aspect of the label update is not limited to this.
또한, 상기 실시형태에서는, 장치 내부에서 이치 화상 데이터(BFI)를 런 렝스화한 후, 상기 런 렝스화 처리에 의해 작성된 런에 대해 라벨링 처리를 실시하고 있는데, 본 발명에 적용 대상은 이에 한정되는 것이 아니며, 예를 들면 외부 장치에 의해 작성된 런을 라벨링하는 장치나 방법에 대해 본 발명을 적용해도 된다.Further, in the above-described embodiment, the run image data (BFI) is run-lengthized in the apparatus, and then the run process is performed on the run generated by the run-length process. But the present invention may be applied to an apparatus or method for labeling a run created by an external apparatus, for example.
이 발명은, 이치 화상 데이터를 런 렝스화하여 작성된 복수의 런에 대해 라벨을 부여하는 라벨링 기술에 대해 적절하게 적용할 수 있다.The present invention can be appropriately applied to a labeling technique for assigning labels to a plurality of runs created by rendering normal image data run length.
1:검사 시스템
5:화상 취득부
6:화상 처리부
21:촬상부
62:차분 추출부(화상 추출부)
63:이치화 처리부
64:라벨링부
641:프로세서 코어
642:GPU
643:개별 갱신 처리부
644:개별 탐색 처리부
645:라벨링용 기억부
646:연산 처리부(제어부)
647:런 생성부
648:병렬 처리 제어부
649:데이터 초기 설정부1: Inspection system
5:
6:
21:
62: Difference extracting unit (image extracting unit)
63: Binary processing unit
64: labeling section
641: processor core
642: GPU
643: Individual update processing unit
644: Individual search processor
645: labeling storage unit
646: Operation processing unit (control unit)
647:
648: Parallel processing controller
649: Data initial setting section
Claims (11)
각 런에 대해 서로 상이한 라벨을 설정하는 초기 라벨 설정 공정과,
상기 런마다, 상기 런을 처리 대상 런으로 함과 더불어 상기 처리 대상 런에 접속하는 제1 연결 런이 존재하는지 아닌지를 판정하고, 상기 제1 연결 런이 존재할 때에는, 상기 처리 대상 런 및 상기 제1 연결 런 중 한쪽의 라벨을 다른쪽의 라벨로 갱신하는 개별 갱신 처리를 행하는 갱신 공정과,
상기 갱신 공정 후에, 상기 복수의 라벨에 의거하여 상기 복수의 런 중 서로 접속하는 런을 탐색하여 동일한 라벨을 부여하는 탐색 공정을 구비하고,
상기 갱신 공정에서는, 상기 복수의 런을 복수 세트로 분할함과 더불어 각 세트에서 실행되는 개별 갱신 처리를 갱신 스레드로 하고, 배타 제어 아래 상기 복수의 갱신 스레드 중 하나의 갱신 스레드에 의한 라벨의 재기록을 허가함과 더불어 상기 하나의 갱신 스레드에 의해 재기록되는 라벨의 다른 갱신 스레드에 의한 재기록을 금지하면서 상기 복수의 갱신 스레드를 병렬하여 실행하는 것을 특징으로 하는 라벨링 방법.A labeling method for carrying out a labeling process on a plurality of runs created by rendering normal image data as run lengths,
An initial label setting step of setting a different label for each run,
The method comprising the steps of: determining whether or not there is a first connection run to connect to the processing object run, and if the first connection run exists, An update step of performing an individual update process of updating one of the labels on the connection run to the other label,
And a search step of searching for runs connected to each other among the plurality of runs based on the plurality of labels and assigning the same labels after the updating step,
Wherein the updating step divides the plurality of runs into a plurality of sets and sets the individual update processing executed in each set as an update thread and rewrites the label by one of the plurality of update threads under exclusive control Wherein the plurality of update threads are executed in parallel while prohibiting rewriting by another update thread of the label rewritten by the one update thread.
상기 갱신 공정에서는, 상기 하나의 갱신 스레드에 의해 재기록되는 라벨 이외의 라벨의 상기 다른 갱신 스레드에 의한 재기록을 허가하는, 라벨링 방법.The method according to claim 1,
Wherein the updating step permits rewriting of the label other than the label rewritten by the one update thread by the another update thread.
상기 개별 갱신 처리에서는, 상기 처리 대상 런 및 상기 제1 연결 런 중 라벨을 갱신한 쪽의 런을 갱신 런으로 하고, 상기 갱신 런에 대해 상기 처리 대상 런 및 상기 제1 연결 런 이외의 제2 연결 런이 접속되는지 아닌지를 판정하고, 상기 제2 연결 런이 존재할 때에는, 또한 상기 갱신 런 및 상기 제2 연결 런 중 한쪽의 라벨을 다른쪽의 라벨로 갱신하는, 라벨링 방법.The method according to claim 1 or 2,
Wherein in the individual update processing, the run of the target run and the one of the first connected run that has updated the label are set as the update run, and the target run and the second connection And when the second connection run exists, the label of one of the update run and the second connection run is updated to the other label.
상기 복수의 런은 상기 이치 화상 데이터를 행마다 런 렝스화하여 얻어지는 것이며,
상기 개별 갱신 처리에서는, 상기 처리 대상 런의 하행에 접속하는 런을 상기 제1 연결 런으로서 판정하는, 라벨링 방법.The method according to claim 1 or 2,
Wherein the plurality of runs are obtained by making the normal image data run lengthwise for each row,
And in the individual update processing, the run connected to the downward run of the run to be processed is determined as the first connected run.
상기 탐색 공정에서는, 상기 런마다, 상기 런을 처리 대상 런으로 함과 더불어 상기 처리 대상 런에 접속하는 연결 런을 상기 복수의 라벨에 의거하여 찾아내어 상기 처리 대상 런 및 상기 연결 런의 라벨을 동일하게 재기록하는 개별 탐색 처리를 실행하는, 라벨링 방법.The method according to claim 1 or 2,
In the searching step, the run is determined as a to-be-processed run, and a connection run to be connected to the to-be-processed run is searched based on the plurality of labels and the labels of the to-be- And performs an individual search process to rewrite the search result.
상기 탐색 공정에서는, 상기 복수의 런을 복수 세트로 분할함과 더불어 각 세트에서 실행되는 개별 탐색 처리를 탐색 스레드로 하고, 배타 제어 아래 상기 복수의 탐색 스레드 중 하나의 탐색 스레드에 의한 라벨의 재기록을 허가함과 더불어 상기 하나의 탐색 스레드에 의해 재기록되는 라벨의 다른 탐색 스레드에 의한 재기록을 금지하면서 상기 복수의 탐색 스레드를 병렬하여 실행하는, 라벨링 방법.The method of claim 5,
Wherein the searching step divides the plurality of runs into a plurality of sets and makes the individual search processing executed in each set a search thread, and rewriting the label by the search thread of one of the plurality of search threads under exclusive control Wherein the plurality of search threads are run in parallel while prohibiting rewriting by another search thread of the label rewritten by the one search thread.
상기 탐색 공정에서는, 상기 하나의 탐색 스레드에 의해 재기록되는 라벨 이외의 라벨의 상기 다른 탐색 스레드에 의한 재기록을 허가하는, 라벨링 방법.The method of claim 6,
Wherein the search step permits rewriting by the other search thread of a label other than the label rewritten by the one search thread.
각 런의 라벨을 기억하는 기억부와,
연산 처리를 행하는 프로세서 코어를 복수개 갖는 프로세서부와,
상기 복수의 라벨에 서로 상이한 값을 초기 설정한 후에, 상기 런마다, 상기 런을 처리 대상 런으로 함과 더불어 상기 처리 대상 런에 접속하는 제1 연결 런이 존재하는지 아닌지를 판정하고, 상기 제1 연결 런이 존재할 때에는, 상기 처리 대상 런 및 상기 제1 연결 런 중 한쪽의 라벨을 다른쪽의 라벨로 갱신하는 개별 갱신 처리를 행하고, 또한 상기 복수의 라벨에 의거하여 상기 복수의 런 중 서로 접속하는 런을 탐색하여 동일한 라벨을 부여하는 제어부를 구비하고,
상기 복수의 런은 상기 프로세서 코어의 개수에 따라 복수 세트로 분할되고,
각 프로세서 코어는 분할된 하나 또는 복수의 런에 대해서 상기 개별 갱신 처리를, 상기 복수 세트 각각에서 갱신 스레드로서 실행하고,
상기 제어부는, 배타 제어 아래 상기 복수의 갱신 스레드 중 하나의 갱신 스레드에 의한 라벨의 재기록을 허가함과 더불어 상기 하나의 갱신 스레드에 의해 재기록되는 라벨의 다른 갱신 스레드에 의한 재기록을 금지하면서 상기 복수의 갱신 스레드를 병렬하여 실행시키킴으로써 상기 런마다의 개별 갱신 처리를 행하는 것을 특징으로 하는 라벨링 장치.A labeling apparatus for carrying out a labeling process for a plurality of runs created by rendering normal image data as run lengths,
A storage unit for storing a label of each run;
A processor unit having a plurality of processor cores for performing arithmetic processing;
Wherein the control unit judges whether or not there is a first connection run to be connected to the object to be processed together with the run as the object to be processed for each run after initially setting different values to the plurality of labels, When there is a connection run, performs an individual update process of updating one of the run of the object to be processed and the first connection run to the other label, and connects the other run among the plurality of runs based on the plurality of labels And a control section for searching for the run and giving the same label,
Wherein the plurality of runs are divided into a plurality of sets according to the number of the processor cores,
Each processor core executing the individual update processing for one or more divided runs as an update thread in each of the plurality of sets,
Wherein the control unit permits rewriting of the label by one of the plurality of update threads under exclusive control and prohibits rewriting of the label by another update thread of the label rewritten by the one update thread, And performs update processing for each run by executing the update threads in parallel.
상기 제어부는, 상기 런마다, 상기 런을 처리 대상 런으로 함과 더불어 상기 처리 대상 런에 접속하는 연결 런을 상기 복수의 라벨에 의거하여 찾아내어 상기 처리 대상 런 및 상기 연결 런의 라벨을 동일하게 재기록하는 개별 탐색 처리를 실행하는 라벨링 장치.The method of claim 8,
The control unit searches for a connection run that connects the run to be processed with the run as a to-be-processed run based on the plurality of labels for each run and identifies the labels of the to-be- And performs a rewriting individual search process.
각 프로세서 코어는 분할된 하나 또는 복수의 런에 대해서 상기 개별 탐색 처리를, 상기 복수 세트 각각에서 탐색 스레드로서 실행하고,
상기 제어부는, 배타 제어 아래 상기 복수의 탐색 스레드 중 하나의 탐색 스레드에 의한 라벨의 재기록을 허가함과 더불어 상기 하나의 탐색 스레드에 의해 재기록되는 라벨의 다른 탐색 스레드에 의한 재기록을 금지하면서 상기 복수의 탐색 스레드를 병렬하여 실행시킴으로써 상기 런마다의 개별 탐색 처리를 행하는, 라벨링 장치.The method of claim 9,
Each processor core executing the individual search process for one or more divided runs as a search thread in each of the plurality of sets,
Wherein the control unit permits rewriting of the label by the search thread of one of the plurality of search threads under exclusive control and prohibits rewriting by the other search thread of the label rewritten by the one search thread, And performs individual search processing for each run by executing search threads in parallel.
상기 검사 대상 화상을 검사하여 결함 부위가 포함되는 결함 화상을 추출하는 화상 추출부와,
상기 결함 화상을 이치화 처리하여 이치 화상 데이터를 생성하는 이치화 처리부와,
상기 이치 화상 데이터를 런 렝스화하여 복수의 런을 생성하는 런 생성부와,
청구항 8 내지 청구항 10 중 어느 한 항에 기재된 라벨링 장치와 동일 구성을 갖고, 상기 복수의 런 중 서로 접속하는 런에 대해 동일한 라벨을 부여하는 라벨링 수단을 구비하는 것을 특징으로 하는 결함 검사 장치.An image acquisition unit for acquiring an image to be inspected;
An image extracting unit for inspecting the inspection object image to extract a defective image including a defective portion;
A binarization processor for binarizing the defect image to generate binary image data,
A run generation section for generating a plurality of runs by rendering the above-mentioned normal image data run length,
A defect inspection apparatus having the same structure as the labeling apparatus according to any one of claims 8 to 10, further comprising labeling means for giving identical labels to runs connected to each other among the plurality of runs.
Applications Claiming Priority (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JPJP-P-2013-059728 | 2013-03-22 | ||
JP2013059728 | 2013-03-22 | ||
JPJP-P-2013-217278 | 2013-10-18 | ||
JP2013217278A JP6152034B2 (en) | 2013-03-22 | 2013-10-18 | Labeling method, labeling device and defect inspection device |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20140115931A KR20140115931A (en) | 2014-10-01 |
KR101521725B1 true KR101521725B1 (en) | 2015-05-19 |
Family
ID=51903498
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020130161353A KR101521725B1 (en) | 2013-03-22 | 2013-12-23 | Labeling method, labeling apparatus and defect inspection apparatus |
Country Status (3)
Country | Link |
---|---|
JP (1) | JP6152034B2 (en) |
KR (1) | KR101521725B1 (en) |
TW (1) | TWI512687B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113254924A (en) * | 2020-02-13 | 2021-08-13 | 斑马智行网络(香港)有限公司 | Data processing method, resource access method, device and equipment |
CN116028141B (en) * | 2023-03-30 | 2023-07-04 | 菲特(天津)检测技术有限公司 | Tag data processing method and system and electronic equipment |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002230540A (en) * | 2001-02-02 | 2002-08-16 | Fuji Xerox Co Ltd | Image processing method |
JP2008186123A (en) * | 2007-01-29 | 2008-08-14 | Seiko Epson Corp | Method, program, and device for processing image data |
JP2009211331A (en) * | 2008-03-03 | 2009-09-17 | Sony Corp | Image processing method |
JP2012164108A (en) * | 2011-02-07 | 2012-08-30 | Canon Inc | Labeling processing device and labeling processing method |
Family Cites Families (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH05165955A (en) * | 1991-12-13 | 1993-07-02 | Sony Corp | Image processing method |
JP3583684B2 (en) * | 2000-01-12 | 2004-11-04 | シャープ株式会社 | Image defect detection apparatus and image defect detection method |
US7310722B2 (en) * | 2003-12-18 | 2007-12-18 | Nvidia Corporation | Across-thread out of order instruction dispatch in a multithreaded graphics processor |
JP4237046B2 (en) * | 2003-12-24 | 2009-03-11 | 株式会社リコー | Image processing device |
JP2008186124A (en) * | 2007-01-29 | 2008-08-14 | Seiko Epson Corp | Method, program, and device for processing image data |
US7876328B2 (en) * | 2007-02-08 | 2011-01-25 | Via Technologies, Inc. | Managing multiple contexts in a decentralized graphics processing unit |
JP2009145285A (en) * | 2007-12-18 | 2009-07-02 | Dainippon Screen Mfg Co Ltd | Defect detecting method and defect detecting apparatus |
JP5159373B2 (en) * | 2008-03-06 | 2013-03-06 | オリンパス株式会社 | Board inspection method |
JP2009262161A (en) * | 2008-04-22 | 2009-11-12 | Olympus Corp | Correcting apparatus, correcting method, control device, and program |
US8082426B2 (en) * | 2008-11-06 | 2011-12-20 | Via Technologies, Inc. | Support of a plurality of graphic processing units |
JP5537282B2 (en) * | 2009-09-28 | 2014-07-02 | 株式会社日立ハイテクノロジーズ | Defect inspection apparatus and defect inspection method |
CN102169093B (en) * | 2010-12-20 | 2012-10-10 | 湖南大学 | Multi-station machine vision imaging detection method and system based on graphics processor |
-
2013
- 2013-10-18 JP JP2013217278A patent/JP6152034B2/en active Active
- 2013-12-23 KR KR1020130161353A patent/KR101521725B1/en active IP Right Grant
-
2014
- 2014-01-14 TW TW103101220A patent/TWI512687B/en active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002230540A (en) * | 2001-02-02 | 2002-08-16 | Fuji Xerox Co Ltd | Image processing method |
JP2008186123A (en) * | 2007-01-29 | 2008-08-14 | Seiko Epson Corp | Method, program, and device for processing image data |
JP2009211331A (en) * | 2008-03-03 | 2009-09-17 | Sony Corp | Image processing method |
JP2012164108A (en) * | 2011-02-07 | 2012-08-30 | Canon Inc | Labeling processing device and labeling processing method |
Also Published As
Publication number | Publication date |
---|---|
KR20140115931A (en) | 2014-10-01 |
JP2014209310A (en) | 2014-11-06 |
JP6152034B2 (en) | 2017-06-21 |
TWI512687B (en) | 2015-12-11 |
TW201437968A (en) | 2014-10-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2011163766A (en) | Image processing method and image processing system | |
US8965132B2 (en) | Edge tracing with hysteresis thresholding | |
CN104103069B (en) | Image processing apparatus, image processing method and recording medium | |
JP4484844B2 (en) | Image binarization processing method, image processing apparatus, and computer program | |
KR101941585B1 (en) | Embedded system for examination based on artificial intelligence thereof | |
WO2021189259A1 (en) | Oled screen point defect determination method and apparatus, storage medium and electronic device | |
US7415362B2 (en) | Image defect inspection apparatus | |
KR101521725B1 (en) | Labeling method, labeling apparatus and defect inspection apparatus | |
CN102931116B (en) | Synchronous defect detecting method for memorizer | |
CN102401636B (en) | Image measuring apparatus and image measuring method | |
JP2007078572A (en) | Flaw inspection device of image, and flaw inspection method of image | |
JP2015004641A (en) | Wafer appearance inspection device | |
KR101630078B1 (en) | Data calculation method, data calculation apparatus, and defect inspection apparatus | |
JP2013145171A (en) | Appearance inspection device | |
JP2002318263A (en) | Method of inspecting trace of probing needle | |
JPH0754549B2 (en) | How to create a standard pattern for pattern matching | |
JP3722757B2 (en) | Defect imaging device | |
JP2015021876A (en) | Inspection device, inspection method, program and recording medium | |
JP2003203218A (en) | Visual inspection device and method | |
JP6074210B2 (en) | Image processing apparatus, appearance inspection apparatus, image processing method, and appearance inspection method | |
CN104063270B (en) | Labeling method, tag device and flaw detection apparatus | |
JP7438470B2 (en) | Person detection device, person detection method, and person detection program | |
JP3621222B2 (en) | Pattern arrangement recognition method for semiconductor substrate | |
JPH06161378A (en) | Inspecting device for liquid crystal display device | |
JP2017040598A (en) | Inspection method, inspection device, image processor, program and record medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
E902 | Notification of reason for refusal | ||
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant | ||
FPAY | Annual fee payment |
Payment date: 20180418 Year of fee payment: 4 |