KR101929669B1 - The method and apparatus for analyzing an image using an entropy - Google Patents

The method and apparatus for analyzing an image using an entropy Download PDF

Info

Publication number
KR101929669B1
KR101929669B1 KR1020170082390A KR20170082390A KR101929669B1 KR 101929669 B1 KR101929669 B1 KR 101929669B1 KR 1020170082390 A KR1020170082390 A KR 1020170082390A KR 20170082390 A KR20170082390 A KR 20170082390A KR 101929669 B1 KR101929669 B1 KR 101929669B1
Authority
KR
South Korea
Prior art keywords
image
entropy
binarization
class
product
Prior art date
Application number
KR1020170082390A
Other languages
Korean (ko)
Inventor
김상훈
탄 낫 뜨루옹 마이
Original Assignee
한경대학교 산학협력단
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 한경대학교 산학협력단 filed Critical 한경대학교 산학협력단
Priority to KR1020170082390A priority Critical patent/KR101929669B1/en
Application granted granted Critical
Publication of KR101929669B1 publication Critical patent/KR101929669B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06K9/46
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/194Segmentation; Edge detection involving foreground-background segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/40Analysis of texture
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features

Abstract

According to an embodiment of the present invention, a method for analyzing an image by using entropy comprises the following steps of: obtaining an image with respect to a product; performing Otsu binarization modified to maximize entropy with respect to the obtained image; distinguishing a background and a foreground from the binarized image; and determining whether a defect exists on the image based on the distinguished foreground. The Otsu binarization modified to maximize entropy is to binarize an image so as to maximize image entropy and a between-class variance of a threshold image at the same time.

Description

엔트로피를 이용하여 이미지를 분석하는 방법 및 장치{THE METHOD AND APPARATUS FOR ANALYZING AN IMAGE USING AN ENTROPY}METHOD AND APPARATUS FOR ANALYZING AN IMAGE USING AN ENTROPY FIELD OF THE INVENTION [0001]

본 발명은 엔트로피를 이용하여 이미지를 분석하는 방법 및 장치에 관한 것으로, 더욱 상세하게는 오츠(Otsu) 방법에 엔트로피 가중치를 적용함으로써 이미지 엔트로피와 임계화된 이미지의 클래스 간 분산을 동시에 최대화하여, 제품에 대한 이미지에서 가능한 한 많은 결함 영역을 표시하기 위한 이미지 분석 방법 및 장치에 관한 것이다. The present invention relates to a method and apparatus for analyzing an image using entropy, and more particularly, to applying an entropy weight to an Otsu method to simultaneously maximize the variance between an image entropy and a class of a thresholded image, And more particularly to an image analysis method and apparatus for displaying as many defective areas as possible in an image.

첨단 기술의 유용성과 산업 생산력의 급속한 성장의 결과 매일 엄청난 양의 제품들이 생산되고 있다. 이러한 대규모 생산은 단기간에 검사를 마쳐야 하는 막대한 양의 제품들로 인해 수동 결함 검출을 불가능하게 만들고 있다. 이에 따라, 최근 장비를 기반으로 한 결함 검출 시스템에 대한 연구가 주목 받고 있다. 결함 검출을 위한 두 가지 기본적인 검사 방법에는 파괴검사(Destructive Test)와 비파괴검사(NonDestructive Test)가 있다. 파괴검사에서는 재료 또는 제품의 강도, 견고성 및 내구성과 같은 물리적 특성을 검사하기 위해 제품을 해체해야 한다. 또한, 파괴검사는 설계상 약점을 판단하거나 다른 방법으로 검출할 수 없는 숨겨진 결함을 드러내는데 사용될 수 있다. 이러한 파괴검사와 달리, 비파괴검사(이하, NDT)는 제품 등의 본래 특성을 변경하거나 손상을 주지 않으면서 물건의 속성을 검사하거나 결함을 검출하는데 사용되는 기술이다. 검사 후 제품이 정상적으로 작동할 수 있으므로, NDT는 결함 검출에 시간과 비용을 절약할 수 있는 좋은 방법이다. 일반적인 NDT 방법은 초음파 비파괴검사, 열화상 비파괴검사, 육안 비파괴검사, 액체침투 비파괴검사, 자분 비파괴검사(Magnetic Particle testing)가 있다.As a result of the availability of advanced technology and the rapid growth of industrial productivity, a tremendous amount of products are produced daily. This large-scale production makes manual fault detection impossible because of the huge amount of products that need to be inspected in a short period of time. Therefore, recent research on defect detection system based on equipment has been attracting attention. Two basic inspection methods for defect detection are Destructive Test and NonDestructive Test. In destructive testing, the product must be dismantled to check the physical properties such as strength, durability, and strength of the material or product. In addition, a destructive inspection can be used to reveal hidden defects that can not be determined by design or otherwise detected by design. Unlike this destructive test, NDT is a technique used to examine the properties of a product or to detect defects without altering or damaging the original properties of the product or the like. NDT is a good way to save time and money on defect detection, since the product can function normally after inspection. Typical NDT methods include ultrasonic nondestructive testing, thermal imaging NDT, visual NDT, liquid penetration NDT, and magnetic particle testing.

일반적인 NDT 방법 중, 육안 비파괴검사는 고속 프로세스이며 복잡한 장비를 필요로 하지 않기 때문에 가장 선호된다. 이 방법은 카메라, 스캐너 및 센서를 이용하여 재료 또는 제품의 시각화 데이터를 생성하고, 컴퓨터 비전 알고리즘 또는 이미지 프로세스 기술을 사용하여 시각화 데이터로부터 결함을 검출해내는 과정을 수행한다. 이러한 종래의 육안 비파괴검사는 그동안 제품 결함 검출을 위하여 비교적 성공적으로 적용되어 왔다. 직물, 종이, 호일 또는 강철과 같은 여러 종류의 제품을 검사하기 위해 서로 다른 알고리즘이 적용될 수 있지만, 이러한 알고리즘의 대부분은 다소 복잡하기 때문에, 제품 결함 검사 프로세스를 완료하는데에는 많은 시간이 필요하다. 따라서, 사용자에 의한 수동 조작이 없이 다양한 제품에 대해 만족스러운 결과를 산출해낼 수 있는 신속하고 자동적인 알고리즘이 절실히 필요한데, 이러한 방법의 개발을 위한 유망한 접근법 중 하나가 자동 임계화(Automatic Thresholding)이다.Of the general NDT methods, the naked eye nondestructive inspection is the fastest process and is preferred because it does not require complex equipment. The method generates visualization data of a material or a product using a camera, a scanner, and a sensor, and performs a process of detecting a defect from visualization data using a computer vision algorithm or an image processing technique. Such conventional visual nondestructive inspection has been relatively successfully applied for product defect detection. Different algorithms can be applied to inspect different types of products, such as textiles, paper, foil or steel, but since the majority of these algorithms are rather complicated, it takes a lot of time to complete the product defect inspection process. Therefore, a fast and automatic algorithm is needed which can produce satisfactory results for various products without manual manipulation by the user. One of the promising approaches for developing such a method is Automatic Thresholding.

자동 임계화는 자동화된 육안 품질 검사 시스템뿐만 아니라 분할 감지, 모서리 감지 및 동작분석과 같은 컴퓨터 비전의 여러 영역에서도 널리 사용되고 있다. 이러한 이미지 분석 기술에서는 이미지를 배경 및 관심대상의 집합으로 나누기 위해 최적의 임계값을 엄밀히 선택하는 과정을 필요로 한다. 즉, gray scale 이미지를 k-ary 이미지로 변환하여 객체를 배경과 분리한다. 자동 임계화는 비교적 간단하고 효과적인 방법이므로, 이미지 처리에 있어서 여러 가지 응용 형태로 발전되어 왔다. 즉, 상당수의 자동 임계화 관련 기술이 개발되어 왔다. 그러나, 이러한 종래의 자동 임계화 기술은 제품의 표면 이미지 특성(예컨대, 픽셀 값의 균일성 등)에 따라 결함 검출에 있어서 가변적인 효율(예컨대, 효율이 점차 낮아짐)을 보였고, 안정적이지 못하였다. Automatic thresholding is widely used not only in automated visual quality inspection systems, but also in many areas of computer vision, such as segmentation detection, edge detection, and motion analysis. These image analysis techniques require the process of rigorously selecting the optimal thresholds to divide the image into sets of backgrounds and objects of interest. That is, a gray scale image is converted into a k-ary image to separate the object from the background. Since automatic thresholding is a relatively simple and effective method, various application forms have been developed in image processing. That is, a large number of automatic thresholding related technologies have been developed. However, such conventional automatic thresholding techniques have exhibited variable efficiency (e.g., the efficiency is gradually decreased) in defect detection depending on the surface image characteristics (e.g., uniformity of pixel values) of the product, and are not stable.

1. 대한민국 등록특허공보 제10-1224164호(2013.01.14)1. Korean Registered Patent No. 10-1224164 (Jan. 13, 2014) 2. 대한민국 등록특허공보 제10-1612054호(2016.04.06)2. Korean Patent Registration No. 10-1612054 (Apr. 26, 2016)

본 발명은 전술한 문제점에 대한 일 대응으로서 안출된 것으로, 기존의 오츠(Otsu) 이진화를 개선한 새로운 육안 검사 알고리즘을 제안하고자 한다.The present invention has been devised as a countermeasure to the above-mentioned problem, and a new visual inspection algorithm which has improved the existing Otsu binarization is proposed.

결함 검출은 산업 품질 관리에 있어서 가장 중요한 작업 중 하나며, 까다로운 문제이다. 여러 육안검사 기술들 중, 자동 임계화(Automatic Thresholding)는 시스템으로의 구현 및 각종 파라미터 등의 계산이 비교적 단순하기 때문에 결함 검출에 일반적으로 사용되는 방법인데, 이러한 종래의 자동 임계화 기본 원리에 엔트로피 가중치법(Entropy Weighting Scheme)을 적용함으로써 Otsu's method를 획기적으로 개선한 자동 임계화 기술을 제안하고자 한다. Defect detection is one of the most important tasks in industrial quality control and is a difficult problem. Of the various visual inspection techniques, Automatic Thresholding is a method generally used for defect detection because the implementation into the system and the calculation of various parameters are relatively simple. In this conventional automatic thresholding principle, entropy We propose an automatic thresholding technique that dramatically improves Otsu's method by applying the Entropy Weighting Scheme.

본 발명의 일 실시예로써, 엔트로피를 이용하여 이미지를 분석하는 방법 및 장치가 제공될 수 있다. As an embodiment of the present invention, a method and apparatus for analyzing an image using entropy can be provided.

본 발명의 일 실시예에 따른 엔트로피를 이용하여 이미지를 분석하는 방법은, 제품에 대한 이미지를 획득하는 단계, 획득된 이미지에 대하여 엔트로피가 최대화되도록 수정된 오츠(Otsu) 이진화를 수행하는 단계, 이진화된 이미지에서 배경과 전경을 구분하는 단계 및 구분된 전경에 기초하여 이미지 상에서의 결함 유무를 판단하는 단계를 포함하고, 엔트로피가 최대화되도록 수정된 오츠 이진화는 이미지 엔트로피와 임계화된 이미지의 클래스 간 분산이 동시에 최대화되도록 이미지를 이진화하는 것일 수 있다. A method for analyzing an image using entropy according to an embodiment of the present invention includes the steps of obtaining an image for a product, performing Otsu binarization so that entropy is maximized for the obtained image, Determining the presence or absence of a defect on the image based on the divided foreground and separating the background from the foreground in the extracted image and correcting the entropy to maximize the Ots binarization, May be to binarize the images so that they are maximized at the same time.

또한, 수정된 오츠 이진화는 이미지에 대한 클래스 간 분산이 최대가 되도록 하는 임계값의 추정 과정에서 아래의 수학식에 의하여 이미지 엔트로피가 가중되어 추정되는 이진화이고, The modified Ots binarization is binarization in which image entropy is estimated by weighting by the following equation in the process of estimating the threshold value for maximizing the variance between classes for the image,

Figure 112017062400622-pat00001
Figure 112017062400622-pat00001

k*는 임계값,

Figure 112017062400622-pat00002
는 이미지의 엔트로피 함수, L은 그레이 레벨(gray level),
Figure 112017062400622-pat00003
는 제 1 클래스 발생 확률,
Figure 112017062400622-pat00004
는 제 1 클래스의 평균 그레이 값,
Figure 112017062400622-pat00005
는 제 2 클래스 발생 확률,
Figure 112017062400622-pat00006
는 제 2 클래스의 평균 그레의 값일 수 있다. k * is the threshold,
Figure 112017062400622-pat00002
Is the entropy function of the image, L is the gray level,
Figure 112017062400622-pat00003
Is the first class occurrence probability,
Figure 112017062400622-pat00004
Is the average gray value of the first class,
Figure 112017062400622-pat00005
The second class occurrence probability,
Figure 112017062400622-pat00006
May be the value of the average gray of the second class.

본 발명의 일 실시예에 따른 제품에 대한 이미지는 제품의 표면 이미지이고, 사용자로부터 별도의 매개변수를 입력받음 없이 수정된 오츠 이진화를 통하여 제품의 표면 이미지에서 결함 영역을 검출할 수 있다. The image of the product according to an exemplary embodiment of the present invention is a surface image of the product, and it is possible to detect a defective area in the surface image of the product through modified Ots binarization without receiving a separate parameter from the user.

본 발명의 일 실시예에 따른 엔트로피를 이용하여 이미지를 분석하는 장치는, 제품에 대한 이미지를 획득하는 이미지 획득부, 획득된 이미지에 대하여 엔트로피가 최대화되도록 수정된 오츠(Otsu) 이진화를 수행하는 이미지 변환부 및 이진화된 이미지에서 배경과 전경을 구분하고, 구분된 전경에 기초하여 이미지 상에서의 결함 유무를 판단하는 이미지 분석부를 포함하고, 엔트로피가 최대화되도록 수정된 오츠 이진화는 이미지 엔트로피와 임계화된 이미지의 클래스 간 분산이 동시에 최대화되도록 이미지를 이진화하는 것일 수 있다. An apparatus for analyzing an image using entropy according to an embodiment of the present invention includes an image obtaining unit for obtaining an image for a product, an image for performing Otsu binarization so that entropy is maximized for the obtained image, And an image analysis unit for discriminating the background and the foreground from the binarized image and determining the presence or absence of a defect on the image based on the divided foreground. The Otsu binarization modified to maximize the entropy includes an image entropy and a thresholded image May be to binarize the images so that the inter-class variance of the images is maximized at the same time.

수정된 오츠 이진화는 이미지에 대한 클래스 간 분산이 최대가 되도록 하는 임계값의 추정 과정에서 이미지 엔트로피가 가중되어 추정되는 이진화일 수 있다. The modified Ots binarization may be a binarization in which the image entropy is estimated to be weighted in the process of estimating the threshold to maximize the inter-class variance for the image.

또한, 제품에 대한 이미지는 제품의 표면 이미지이고, 사용자로부터 별도의 매개변수를 입력받음 없이 수정된 오츠 이진화를 통하여 제품의 표면 이미지에서 결함 영역을 검출할 수 있다. Also, the image for the product is the surface image of the product, and the defect area can be detected from the surface image of the product through the modified Ots binarization without receiving any additional parameters from the user.

한편, 본 발명의 일 실시예로써, 전술한 방법을 컴퓨터에서 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체가 제공될 수 있다.Meanwhile, as an embodiment of the present invention, a computer-readable recording medium on which a program for causing the computer to execute the above-described method may be provided.

본 발명의 일 실시예에 따른 엔트로피를 이용하여 이미지를 분석하는 방법 및 장치에서는 엔트로피 이론을 사용하여 사용자로부터 별개의 매개변수를 입력받지 않고도 제품의 표면에 대한 결함 유무를 검출할 수 있다. 즉, 사용자는 임계값 결정을 위한 매개변수 등을 수동으로 조정할 필요가 없다. In the method and apparatus for analyzing an image using entropy according to an embodiment of the present invention, entropy theory can be used to detect the presence or absence of a defect on a surface of a product without receiving a separate parameter from a user. That is, the user does not need to manually adjust the parameters and the like for threshold determination.

또한, 본 발명의 일 실시예에 따른 엔트로피를 이용하여 이미지를 분석하는 방법은 제품에 대한 이미지가 획득된 이후에는 완전히 자동으로 수행될 수 있고, 제품의 표면적에 비해 극히 작은 결함 영역도 검출해낼 수 있다. In addition, the method of analyzing an image using entropy according to an embodiment of the present invention can be performed completely automatically after an image of a product is obtained, and it is possible to detect a defective area that is extremely small as compared with the surface area of the product have.

또한, 본 발명의 일 실시예에 따른 엔트로피를 이용하여 이미지를 분석하는 방법은 임계값 등의 계산이 단순하기 때문에 이미지에 대한 분석 과정이 실시간으로 처리될 수 있고, 비교적 제한적인 계산 자원을 갖는 임베디드 시스템 등에서도 효율적으로 활용될 수 있다. In addition, the method of analyzing an image using entropy according to an embodiment of the present invention is advantageous in that since the calculation of threshold values and the like is simple, an analysis process for an image can be processed in real time, System and the like.

도 1은 결함 검출에 관한 종래의 Otsu's method 대비 valley-emphasis method의 효율을 나타낸다.
도 2는 도 1의 이미지의 히스토그램 및 선택된 임계값을 나타낸다.
도 3은 종래의 Otsu's method 등을 적용한 결과를 나타낸다.
도 4는 웨이퍼 표면의 이미지 예 및 그러한 이미지의 히스토그램을 나타낸다.
도 5는 본 발명의 일 실시예에 따른 엔트로피를 이용하여 이미지를 분석하는 방법의 순서도를 나타낸다.
도 6은 본 발명의 일 실시예에 따른 엔트로피를 이용하여 이미지를 분석하는 장치의 블록도이다.
도 7은 제품 표면 이미지에서의 결함 검출에 있어서 본 발명의 일 실시예에 따른 방법의 효과(성능)을 나타낸다.
도 8은 본 발명의 일 실시예에 따른 방법 및 종래의 방법을 이용하여 결함을 검출한 결과를 나타낸다.
도 9는 도 8의 (a)에서 흰색 직사각형으로 표시된 영역의 확대된 부분을 나타낸다.
Figure 1 shows the efficiency of the valley-emphasis method versus the conventional Otsu's method for defect detection.
Figure 2 shows the histogram and the selected threshold of the image of Figure 1;
3 shows the results of applying the conventional Otsu's method and the like.
Figure 4 shows an example image of a wafer surface and a histogram of such an image.
FIG. 5 shows a flowchart of a method of analyzing an image using entropy according to an embodiment of the present invention.
6 is a block diagram of an apparatus for analyzing an image using entropy according to an embodiment of the present invention.
Figure 7 shows the effect (performance) of the method according to an embodiment of the present invention in defect detection in the product surface image.
Figure 8 shows the results of detecting defects using the method and the conventional method according to an embodiment of the present invention.
Fig. 9 shows an enlarged portion of a region indicated by a white rectangle in Fig. 8 (a).

아래에서는 첨부한 도면을 참조하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 본 발명의 실시예를 상세히 설명한다. 그러나 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시예에 한정되지 않는다. 그리고 도면에서 본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다. Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings, which will be readily apparent to those skilled in the art. The present invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. In order to clearly illustrate the present invention, parts not related to the description are omitted, and similar parts are denoted by like reference characters throughout the specification.

본 명세서에서 사용되는 용어에 대해 간략히 설명하고, 본 발명에 대해 구체적으로 설명하기로 한다. The terms used in this specification will be briefly described and the present invention will be described in detail.

본 발명에서 사용되는 용어는 본 발명에서의 기능을 고려하면서 가능한 현재 널리 사용되는 일반적인 용어들을 선택하였으나, 이는 당 분야에 종사하는 기술자의 의도 또는 판례, 새로운 기술의 출현 등에 따라 달라질 수 있다. 또한, 특정한 경우는 출원인이 임의로 선정한 용어도 있으며, 이 경우 해당되는 발명의 설명 부분에서 상세히 그 의미를 기재할 것이다. 따라서 본 발명에서 사용되는 용어는 단순한 용어의 명칭이 아닌, 그 용어가 가지는 의미와 본 발명의 전반에 걸친 내용을 토대로 정의되어야 한다. While the present invention has been described in connection with what is presently considered to be the most practical and preferred embodiment, it is to be understood that the invention is not limited to the disclosed embodiments. Also, in certain cases, there may be a term selected arbitrarily by the applicant, in which case the meaning thereof will be described in detail in the description of the corresponding invention. Therefore, the term used in the present invention should be defined based on the meaning of the term, not on the name of a simple term, but on the entire contents of the present invention.

명세서 전체에서 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있음을 의미한다. 또한, 명세서에 기재된 "...부", "모듈" 등의 용어는 적어도 하나의 기능이나 동작을 처리하는 단위를 의미하며, 이는 하드웨어 또는 소프트웨어로 구현되거나 하드웨어와 소프트웨어의 결합으로 구현될 수 있다. 또한, 명세서 전체에서 어떤 부분이 다른 부분과 "연결"되어 있다고 할 때, 이는 "직접적으로 연결"되어 있는 경우뿐 아니라, "그 중간에 다른 소자를 사이에 두고" 연결되어 있는 경우도 포함한다. When an element is referred to as "including" an element throughout the specification, it is to be understood that the element may include other elements as well, without departing from the spirit or scope of the present invention. Also, the terms "part," " module, "and the like described in the specification mean units for processing at least one function or operation, which may be implemented in hardware or software or a combination of hardware and software . In addition, when a part is referred to as being "connected" to another part throughout the specification, it includes not only "directly connected" but also "connected with other part in between".

최첨단 자동 임계화 기술인 오츠 방법(Otsu's method)는 여러 자동 결함 검출 방식들의 기초가 되는 방법이다. 이 방법은 전경(foreground)과 배경(background)의 클래스 간 차이를 최대화하는 최적의 임계값을 결정하는 방법에 관한 것이다. 자동 클러스터링 기반 이미지 임계화 방법인 Otsu's method는 다음과 같이 이해될 수 있다. Otsu's method, a state-of-the-art automatic thresholding technique, is the basis of many automatic defect detection schemes. This method relates to determining an optimal threshold that maximizes the difference between foreground and background classes. Otsu's method, an automatic clustering-based image thresholding method, can be understood as follows.

I = f (x, y) 를 디지털 이미지라고 하면, 이때, f 는 강도(intensity) 함수이다. [0, L - 1] 구간에서의 (x, y) 영역에서 f (x, y) 는 그레이 값(gray value)을 가지게 되고, 이때, L 은 그레이 레벨(gray level)의 수를 나타낸다. 또한, 그레이 값 i 의 픽셀 수를 ni 라고 하고, I 에서의 총 픽셀 수를 N 이라고 하면 이때, 히스토그램은 다음과 같은 수학식 1의 확률 분포로 간주할 수 있다. Let I = f (x, y) be a digital image, where f is an intensity function. F (x, y) has a gray value in the (x, y) region in the [0, L-1] region. Here, L represents the number of gray levels. In addition, assuming that the number of pixels of the gray values i and n i, as N the total number of pixels in I In this case, the histogram can be considered in the following distribution of Equation (1), such as.

[수학식 1][Equation 1]

Figure 112017062400622-pat00007
Figure 112017062400622-pat00007

이때, 평균 그레이 값 I 는 다음과 같은 수학식 2에 의하여 표현될 수 있다. At this time, the average gray value I can be expressed by the following equation (2).

[수학식 2]&Quot; (2) "

Figure 112017062400622-pat00008
Figure 112017062400622-pat00008

임계화의 결과로, I의 픽셀들은 C1 = {(x, y) | 0 ≤ f (x, y) ≤ k} 과 C2 = {(x, y) | k + 1 ≤ f (x, y) ≤ L - 1} 의 두 클래스로 나뉘며, 이때 k 는 선택된 임계값을 나타낸다. 일반적으로, C1 은 전경이고 C2 는 배경이 될 수 있다. 클래스 발생확률 및 각 클래스의 평균 그레이 값은 각각 다음과 같이 수학식 3 및 수학식 4를 이용하여 추정(계산)될 수 있다. As a result of the thresholding, the pixels of I are given by C 1 = {(x, y) | 0 ≤ f (x, y) ≤ k} and C 2 = {(x, y) | k + 1 ≤ f (x, y) ≤ L - 1}, where k represents the selected threshold. In general, C 1 may be foreground and C 2 may be background. The class occurrence probability and the average gray value of each class can be estimated (computed) using Equation (3) and Equation (4) as follows.

[수학식 3]&Quot; (3) "

Figure 112017062400622-pat00009
Figure 112017062400622-pat00009

[수학식 4]&Quot; (4) "

Figure 112017062400622-pat00010
Figure 112017062400622-pat00010

Otsu's method에서, 결과 임계값의 성능은 전경과 배경 사이의 차이를 고려하여 측정될 수 있다. 이 기준을 사용하면, 최적 임계값 k* 은 클래스 분산값 사이에서 최대가 되어야 한다 (하기 수학식 5 참조).In Otsu's method, the performance of the resulting threshold can be measured taking into account the difference between foreground and background. Using this criterion, the optimal threshold value k * Must be the maximum between the class variance values (see Equation 5 below).

[수학식 5]&Quot; (5) "

Figure 112017062400622-pat00011
Figure 112017062400622-pat00011

또한, 최적 임계값을 계산하는 또다른 등가 공식은 다음의 수학식 6과 같이 표현될 수 있다. 수학식 6은 수학식 5보다 간단하게 표현될 수 있다.In addition, another equivalent equation for calculating the optimal threshold value can be expressed as Equation (6) below. Equation (6) can be expressed more simply than Equation (5).

[수학식 6] &Quot; (6) "

Figure 112017062400622-pat00012
Figure 112017062400622-pat00012

Otsu's method는 이미지의 객체가 크고 배경과 충분히 다를 때 적절한 결과를 제공할 수 있다. 더 구체적으로, Otsu's method는 히스토그램이 이봉분포 또는 다봉분포를 가지는 이미지에서 효과적일 수 있다. 그러나 육안 검사 시스템으로부터 얻을 수 있는 이미지의 히스토그램은 이미지의 크기와 비교하여 결함 영역이 작기 때문에 단봉분포인 것처럼 보이게 된다. 이러한 이미지의 특징은 Otsu's method를 통해 최적 임계값을 결정하는 것을 방해하며, 이에 따라 Otsu's method는 이러한 이미지의 결함 검출에 적절하지 않다. Otsu's method can provide appropriate results when the objects in the image are large and sufficiently different from the background. More specifically, Otsu's method may be effective in images where the histogram has a bimodal distribution or a multimodal distribution. However, since the histogram of the image obtained from the visual inspection system is smaller than the size of the image, the defect region appears to be a single-pole distribution. This feature of the image prevents Otsu's method from determining the optimal threshold value, and thus Otsu's method is not suitable for detecting defects in such images.

전술한 바와 같이 Otsu's method를 이용한 결함 검출과 관련하여 여러가지 개선책들이 제안되어 왔다. 기본적인 아이디어는 출력 임계값을 조정하기 위해 목적함수(objective function)인 수학식 6에 가중치 W 를 부가하는 것이다. (수학식 7 참조)As described above, various improvements have been proposed in connection with defect detection using Otsu's method. The basic idea is to add a weight W to Equation 6, an objective function, to adjust the output threshold. (See Equation 7)

[수학식 7]&Quot; (7) "

Figure 112017062400622-pat00013
Figure 112017062400622-pat00013

Otsu's method에 대한 가장 초기의 가중치법은 Valley-emphasis method이다. (수학식 8 참조)The earliest weighting method for Otsu's method is the Valley-emphasis method. (See Equation 8)

[수학식 8]&Quot; (8) "

Figure 112017062400622-pat00014
Figure 112017062400622-pat00014

여기서 가중치 W 는 1 - pk 이다. Valley-emphasis method의 핵심은 발생확률 (1 - pk)를 보완하는 것이다. pk 값이 더 작을수록(즉, gray value k 의 출현 확률이 낮을수록) 가중치는 더 커진다. 이러한 가중치는 출력 임계값이 항상 히스토그램의 valley 혹은 하단 경계에 있도록 하므로, "valley-emphasis" 라는 명칭이 붙게 되었다. 도 1은 결함 검출에 관한 Otsu's method 대비 valley-emphasis method의 효율을 나타낸다. 선택된 임계값은 도 2에서와 같이 수직으로 된 빨간색 선으로 표시될 수 있다. Here, the weight W is 1 - p k . The core of the Valley-emphasis method is to complement the probability of occurrence (1 - p k ). The smaller the value of p k (ie, the lower the probability of appearance of gray value k), the greater the weight. These weights are named "valley-emphasis" because the output threshold is always at the valley or bottom boundary of the histogram. Figure 1 shows the efficiency of the valley-emphasis method versus Otsu's method for defect detection. The selected threshold value may be indicated by a vertical red line as in FIG.

Valley-emphasis method에 이어, 발생확률에도 사용되는 Otsu's method에 대한 가중치법이 제안되었다. 또한, Fisher's Linear Discriminant Analysis (LDA) 기반을 둔 가중치법도 있다. 도 3은 전술한 방법들을 구현한 결과의 임계값을 나타낸다. Following the Valley-emphasis method, a weighting method for Otsu's method, which is also used for the probability of occurrence, has been proposed. There is also a weighted method based on Fisher's Linear Discriminant Analysis (LDA). Figure 3 shows the threshold of the result of implementing the methods described above.

도 3에서와 같이, 전술한 방법들이 결함 검출의 정확성을 상당히 향상시킨다고 하더라도, 이러한 방법들의 수행은 안정적이지 않다. 더욱이, 일부 방법에서는 사용자가 수용 가능한 결과를 얻기 위해서 적절한 매개변수를 선택해야만 한다. As in FIG. 3, although the methods described above significantly improve the accuracy of defect detection, the performance of these methods is not stable. Moreover, some methods require the user to select appropriate parameters in order to obtain acceptable results.

정리하면, Otsu's method는 이봉분포(bimodal distribution) 또는 다봉분포(multimodal distribution)의 히스토그램을 임계화하는데 효과적이다. 오츠 방법은 히스토그램이 단봉분포(unimodal distribution)이거나 단봉분포에 가까운 경우 적용되지 못한다. 따라서, 이러한 종래의 오츠 방법은 일반적인 실제 이미지를 임계화하는데 만족스러운 결과를 제공할 수 있지만 입력 이미지의 특성(ex. 히스토그램이 단봉 분포 등)으로 인해 육안 검사 시스템에서는 적용되지 못한다. 실제 이미지의 히스토그램은 보통 이미지 크기에 비해 객체의 크기가 크기 때문에 일반적으로 다봉분포를 가지게 되는데, 이러한 특성을 이용하면 Otsu's method로 최적의 임계값을 보다 쉽게 결정할 수 있다. 그러나, 육안 검사 시스템으로부터 얻은 이미지의 히스토그램은 결함 영역의 크기 및 휘도의 균일성 때문에 보통 단봉 분포를 가지게 되고, 이는 Otsu's method를 이용하여 원하는 임계값을 식별하는 것을 방해한다. 결함 검출에 있어서 Otsu's method의 단점을 극복하기 위해 여러가지 개선책이 제안되어 왔지만, 이러한 개선책들은 몇 가지 경우들에 있어서, 특히, 미세한 크기의 결함을 검출하는 경우에 큰 실익을 거두지는 못하였다. 또한, 일부 방법은 사용자의 판단에 의하여 수동으로 할당해야 하는 매개 변수를 필요로 한다. 이러한 이유로 종래의 방법들은 다른 검사 시스템에 적용될 때 결함 검출의 신뢰성을 확실히 담보할 수 없다는 단점이 있다. In summary, Otsu's method is effective in thresholding the histogram of a bimodal distribution or a multimodal distribution. The Otsu method is not applicable when the histogram is a unimodal distribution or close to a singleton distribution. Thus, this conventional OTS method can provide satisfactory results for thresholding a general real image, but is not applicable to a visual inspection system due to the characteristics of the input image (ex. Histogram is a monoblock distribution, etc.). Since the histogram of the actual image is usually larger than the image size, it has a multivariate distribution. By using this characteristic, the optimal threshold value can be easily determined by Otsu's method. However, the histogram of the image obtained from the visual inspection system usually has a singular distribution due to the uniformity of the size of the defective area and the luminance, which hinders the identification of the desired threshold value using Otsu's method. Various remedies have been proposed to overcome the disadvantages of Otsu's method in defect detection, but these remedies have not yielded significant benefits in some cases, especially when detecting small size defects. In addition, some methods require parameters that must be manually assigned at the user's discretion. For this reason, the conventional methods are disadvantageous in that they can not reliably guarantee the reliability of defect detection when applied to other inspection systems.

본 발명의 일 실시예에 따른 엔트로피를 이용하여 이미지를 분석하는 방법 및 장치에서는 엔트로피 이론을 사용하고, 사용자 입력의 매개 변수를 별도로 필요로 하지 않는다는 점에서 이점이 있다. 또한, 이미지 분석 과정은 완전한 자동이며, 제품의 표면적에 비해 극히 작은 결함의 영역을 빠르고 정확하게 검출할 수도 있다.The method and apparatus for analyzing an image using entropy according to an embodiment of the present invention is advantageous in that entropy theory is used and parameter of user input is not separately required. In addition, the image analysis process is fully automatic, and can detect areas of defects that are extremely small compared to the surface area of the product, quickly and accurately.

이하 첨부된 도면을 참고하여 본 발명을 상세히 설명하기로 한다.DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, the present invention will be described in detail with reference to the accompanying drawings.

이미지 엔트로피는 이미지의 특성을 나타내는데 사용할 수 있는 임의성의 통계적 척도이다. 낮은 엔트로피 이미지는 정보가 거의 없고 일반적으로 비슷한 gray value를 가진 일련의 픽셀들을 포함한다. 모든 픽셀이 같은 gray value를 가진 이미지의 엔트로피는 0이 된다. 기존의 엔트로피 기반 가중치법에 있어서, Gray value k 가 주어지면, 이미지의 후험적(posteriori) 엔트로피는 다음과 같이 정의될 수 있다:Image entropy is a statistical measure of the randomness that can be used to characterize an image. Low entropy images contain a series of pixels with little or no information and typically with similar gray values. The entropy of an image where all pixels have the same gray value is zero. In the conventional entropy-based weighting method, given the gray value k, the posteriori entropy of the image can be defined as:

[수학식 9]&Quot; (9) "

Figure 112017062400622-pat00015
Figure 112017062400622-pat00015

[수학식 10] &Quot; (10) "

Figure 112017062400622-pat00016
Figure 112017062400622-pat00016

만약

Figure 112017062400622-pat00017
을 최대로 한다면, 다음과 같은 자명한 결과를 획득할 수 있다. (수학식 11 참조)if
Figure 112017062400622-pat00017
, The following obvious results can be obtained. (See Equation 11)

[수학식 11]&Quot; (11) "

Figure 112017062400622-pat00018
Figure 112017062400622-pat00018

이러한 문제는 수학식 11을 목적함수로 변환함으로써 해결할 수 있다.This problem can be solved by transforming Equation (11) into an objective function.

[수학식 12]&Quot; (12) "

Figure 112017062400622-pat00019
Figure 112017062400622-pat00019

[수학식 13] &Quot; (13) "

Figure 112017062400622-pat00020
Figure 112017062400622-pat00020

최대값이 Ψ(k) 인 gray value k 는 이미지 상 객체와 배경 사이의 구별을 극대화하기 때문에 임계값으로 사용될 수 있다. 그러나, 객체와 배경의 분포과 균일하다면, 수학식 12는 다음과 같이 표현될 수 있다.A gray value k with a maximum value of Ψ (k) can be used as a threshold value because it maximizes the distinction between the object on the image and the background. However, if it is uniform with the distribution of the object and the background, Equation (12) can be expressed as follows.

[수학식 14]&Quot; (14) "

Figure 112017062400622-pat00021
Figure 112017062400622-pat00021

그리고, k = 1/2(L - 1) 일 때, 최대값에 도달할 수 있다. 이러한 특성은 제품의 표면 결함 검출에 적용될 때 단점으로 작용할 수 있다. 도 4에 도시된 바와 같이, 제품 표면 이미지의 분포가 일반적으로 균일하기 때문에 이러한 특성은 결함 검출 알고리즘의 적응성을 감소시킨다는 문제점이 존재한다. 이러한 문제점을 극복하기 위해서 본 발명에서는 Otsu's method에 엔트로피 목적함수 Ψ(k) 를 결합하였다. 즉, 수학식 7에서 가중치 W 를 목적함수 Ψ(k) 로 대체하여 새로운 목적함수를 생성하였다. And, when k = 1/2 (L - 1), the maximum value can be reached. This property can be a disadvantage when applied to the surface defect detection of a product. As shown in Fig. 4, there is a problem that this characteristic reduces the adaptability of the defect detection algorithm because the distribution of the product surface image is generally uniform. In order to overcome this problem, the present invention combines the entropy objective function ψ (k) with Otsu's method. That is, in Equation (7), a new objective function is generated by replacing the weight W with the objective function? (K).

[수학식 15]&Quot; (15) "

Figure 112017062400622-pat00022
Figure 112017062400622-pat00022

이러한 수학식 15를 이용하여, 임계값의 선택을 위한 최적의 값으로 k를 획득할 수 있다. Otsu's method에 대한 본 발명에 적용된 가중치법의 기본 개념은 이미지 엔트로피와 임계화된 이미지의 클래스 간 분산을 동시에 최대화하는 것이다. 이는 육안 검사에서 가능한 한 많은 결함 영역을 표시하기 위함이다. 결함 영역은 제품의 표면적에 비해 극히 작고 무작위로 보이기 때문에, 이미지 엔트로피를 최대화하는 임계값은 또한 결함 영역에서 노출된 픽셀의 수를 최대화할 수 있다. Using Equation (15), k can be obtained as an optimum value for selection of a threshold value. The basic concept of the weighting method applied to the present invention for Otsu's method is to simultaneously maximize the image entropy and the variance between the classes of the thresholded image. This is to show as many defective areas as possible in the visual inspection. Since the defective area is extremely small and random compared to the surface area of the product, the threshold for maximizing the image entropy can also maximize the number of pixels exposed in the defective area.

본 발명의 일 실시예에 따른 엔트로피를 이용하여 이미지를 분석하는 방법은, 제품에 대한 이미지를 획득하는 단계(S100), 획득된 이미지에 대하여 엔트로피가 최대화되도록 수정된 오츠(Otsu) 이진화를 수행하는 단계(S200), 이진화된 이미지에서 배경과 전경을 구분하는 단계(S300) 및 구분된 전경에 기초하여 이미지 상에서의 결함 유무를 판단하는 단계(S400)를 포함하고, 엔트로피가 최대화되도록 수정된 오츠 이진화는 이미지 엔트로피와 임계화된 이미지의 클래스 간 분산이 동시에 최대화되도록 이미지를 이진화하는 것일 수 있다. A method of analyzing an image using entropy according to an exemplary embodiment of the present invention includes the steps of acquiring an image of a product (S100), performing Otsu binarization so that entropy is maximized for the acquired image A step S300 of discriminating a background and a foreground in the binarized image and a step S400 of determining whether or not there is a defect on the image based on the divided foreground, May be to binarize the image so that the variance between the image entropy and the class of the thresholded image is maximized simultaneously.

또한, 수정된 오츠 이진화는 이미지에 대한 클래스 간 분산이 최대가 되도록 하는 임계값의 추정 과정에서 아래의 수학식에 의하여 이미지 엔트로피가 가중되어 추정되는 이진화이고, The modified Ots binarization is binarization in which image entropy is estimated by weighting by the following equation in the process of estimating the threshold value for maximizing the variance between classes for the image,

Figure 112017062400622-pat00023
Figure 112017062400622-pat00023

k*는 임계값,

Figure 112017062400622-pat00024
는 이미지의 엔트로피 함수, L은 그레이 레벨(gray level),
Figure 112017062400622-pat00025
는 제 1 클래스 발생 확률,
Figure 112017062400622-pat00026
는 제 1 클래스의 평균 그레이 값,
Figure 112017062400622-pat00027
는 제 2 클래스 발생 확률,
Figure 112017062400622-pat00028
는 제 2 클래스의 평균 그레의 값일 수 있다. k * is the threshold,
Figure 112017062400622-pat00024
Is the entropy function of the image, L is the gray level,
Figure 112017062400622-pat00025
Is the first class occurrence probability,
Figure 112017062400622-pat00026
Is the average gray value of the first class,
Figure 112017062400622-pat00027
The second class occurrence probability,
Figure 112017062400622-pat00028
May be the value of the average gray of the second class.

본 발명의 일 실시예에 따른 제품에 대한 이미지는 제품의 표면 이미지이고, 사용자로부터 별도의 매개변수를 입력받음 없이 수정된 오츠 이진화를 통하여 제품의 표면 이미지에서 결함 영역을 검출할 수 있다. The image of the product according to an exemplary embodiment of the present invention is a surface image of the product, and it is possible to detect a defective area in the surface image of the product through modified Ots binarization without receiving a separate parameter from the user.

본 발명의 일 실시예에 따른 엔트로피를 이용하여 이미지를 분석하는 장치(1000)는, 제품에 대한 이미지를 획득하는 이미지 획득부(100), 획득된 이미지에 대하여 엔트로피가 최대화되도록 수정된 오츠(Otsu) 이진화를 수행하는 이미지 변환부(200) 및 이진화된 이미지에서 배경과 전경을 구분하고, 구분된 전경에 기초하여 이미지 상에서의 결함 유무를 판단하는 이미지 분석부(300)를 포함하고, 엔트로피가 최대화되도록 수정된 오츠 이진화는 이미지 엔트로피와 임계화된 이미지의 클래스 간 분산이 동시에 최대화되도록 이미지를 이진화하는 것일 수 있다. 본 발명의 일 실시예에 따른 이미지 획득부(100)에는 카메라부(110) 및 조명부(120)가 포함될 수 있다. An apparatus 1000 for analyzing an image using entropy according to an exemplary embodiment of the present invention includes an image obtaining unit 100 for obtaining an image of a product, an Otsu And an image analyzer 300 for separating the background and the foreground from the binarized image and determining the presence or absence of a defect on the image based on the divided foreground, The modified Otsu binarization may be to binarize the image so that the variance between the image entropy and the class of the thresholded image is maximized at the same time. The image obtaining unit 100 may include a camera unit 110 and an illumination unit 120 according to an exemplary embodiment of the present invention.

수정된 오츠 이진화는 이미지에 대한 클래스 간 분산이 최대가 되도록 하는 임계값의 추정 과정에서 이미지 엔트로피가 가중되어 추정되는 이진화일 수 있다. The modified Ots binarization may be a binarization in which the image entropy is estimated to be weighted in the process of estimating the threshold to maximize the inter-class variance for the image.

또한, 제품에 대한 이미지는 제품의 표면 이미지이고, 사용자로부터 별도의 매개변수를 입력받음 없이 수정된 오츠 이진화를 통하여 제품의 표면 이미지에서 결함 영역을 검출할 수 있다. Also, the image for the product is the surface image of the product, and the defect area can be detected from the surface image of the product through the modified Ots binarization without receiving any additional parameters from the user.

제품 표면 이미지에서의 결함 검출에 있어서 본 발명의 일 실시예에 따른 방법의 효과(성능)에 대해서는 도 7과 같이 확인되었다. 도 1 및 도 3과 비교하여 본 발명의 일 실시예에 따른 방법이 우수한 성능을 나타냄이 확인되었다. 또한, 본 발명의 일 실시예에 따른 방법은 다양한 유형의 제품 표면 패턴에 적용될 때에도 안정적이고 확실한 성능이 나타남이 확인되었다. The effect (performance) of the method according to an embodiment of the present invention in defect detection in the product surface image was confirmed as in FIG. It has been confirmed that the method according to one embodiment of the present invention exhibits excellent performance as compared with FIG. 1 and FIG. It has also been found that the method according to one embodiment of the present invention exhibits stable and reliable performance when applied to various types of product surface patterns.

또한, 단일 이미지에 대하여 Otsu's method 및 4가지 가중치법을 도 8에서와 같이 성능 비교하였다. 매개변수를 지정해야 하는 방법에 대하여는, 권장 매개변수를 사용하였다.Also, we compared Otsu's method and 4 weighting methods for a single image as shown in Fig. For how to specify the parameters, the recommended parameters are used.

도 8의 (a)는 여러 방법을 비교하기 위해 몇 가지 결함 영역이 있는 샘플 테스트 이미지를 나타낸 것이고, 도 8의 (b) 내지 (g)는 전술한 여섯 가지 방법으로부터 획득된 임계화 결과를 나타낸다. 본 발명의 일 실시예에 따른 방법의 출력 임계값은 명확히 보이는 영역을 제외한 다른 결함 영역을 보여주지만 다른 방법들의 경우 검출에 실패하거나 명확한 영역만을 검출한다는 것을 확인할 수 있다. Figure 8 (a) shows a sample test image with several defective areas to compare several methods, and Figures 8 (b) to (g) show the thresholding results obtained from the six methods described above . It can be seen that the output threshold of the method according to an embodiment of the present invention shows another defective area except for a clearly visible area, but in other methods it fails to detect or only detects a clear area.

도 9는 도 8의 (a)에서 흰색 직사각형으로 표시된 영역의 확대된 부분을 나타낸다. Otsu's method와 Gaussian-weight valley-emphasis method는 샘플 테스트 이미지의 결함 영역을 검출하지 못하므로 도 9에서는 생략하였다. Fig. 9 shows an enlarged portion of a region indicated by a white rectangle in Fig. 8 (a). The Otsu's method and the Gaussian-weight valley-emphasis method can not detect the defective area of the sample test image and are omitted in FIG.

또한, 추가적인 평가를 위해 해상도가 3000 x 1500 픽셀이고 gray level이 L = 256 인 10개의 동일한 크기의 웨이퍼 이미지를 사용하였다. 각각의 이미지는 이미지 크기와 비교하여 매우 작은 크기의 결함 영역이 여러 개 존재한 상태였다. 그 결과는 표 1과 표 2에 나타나 있다. 표 1과 표 2에서 나타난 바와 같이, 본 발명의 일 실시예에 따른 방법으로 검출된 결함 영역은 다른 방법들에 의해 검출된 영역보다 많다. 또한, 본 발명의 일 실시예에 따른 방법의 출력 임계값은 가장 낮은 편차를 가지는 반면, 다른 방법들에 의한 출력 임계값은 상당한 편차를 가지는 것을 확인할 수 있다. In addition, for the further evaluation, ten identical-sized wafer images with a resolution of 3000 x 1500 pixels and a gray level of L = 256 were used. Each image had a very small defective area compared to the image size. The results are shown in Tables 1 and 2. As shown in Tables 1 and 2, the defective area detected by the method according to an embodiment of the present invention is larger than the area detected by other methods. It can also be seen that the output threshold value of the method according to an embodiment of the present invention has the lowest deviation while the output threshold value according to other methods has a significant deviation.

[표 1][Table 1]

Figure 112017062400622-pat00029
Figure 112017062400622-pat00029

[표 2][Table 2]

Figure 112017062400622-pat00030
Figure 112017062400622-pat00030

본 발명의 일 실시예에 따른 장치와 관련하여서는 전술한 방법에 대한 내용이 적용될 수 있다. 따라서, 장치와 관련하여, 전술한 방법에 대한 내용과 동일한 내용에 대하여는 설명을 생략하였다.The contents of the above-described method can be applied in connection with the apparatus according to an embodiment of the present invention. Therefore, the description of the same contents as those of the above-described method with respect to the apparatus is omitted.

한편, 전술한 방법은 컴퓨터에서 실행될 수 있는 프로그램으로 작성 가능하고, 컴퓨터 판독 가능 매체를 이용하여 상기 프로그램을 동작시키는 범용 디지털 컴퓨터에서 구현될 수 있다. 또한, 상술한 방법에서 사용된 데이터의 구조는 컴퓨터 판독 가능 매체에 여러 수단을 통하여 기록될 수 있다. 본 발명의 다양한 방법들을 수행하기 위한 실행 가능한 컴퓨터 프로그램이나 코드를 기록하는 기록 매체는, 반송파(carrier waves)나 신호들과 같이 일시적인 대상들은 포함하는 것으로 이해되지는 않아야 한다. 상기 컴퓨터 판독 가능 매체는 마그네틱 저장매체(예를 들면, 롬, 플로피 디스크, 하드 디스크 등), 광학적 판독 매체(예를 들면, 시디롬, DVD 등)와 같은 저장 매체를 포함할 수 있다.On the other hand, the above-described method can be implemented in a general-purpose digital computer that can be created as a program that can be executed in a computer and operates the program using a computer-readable medium. Further, the structure of the data used in the above-described method can be recorded on a computer-readable medium through various means. Recording media that record executable computer programs or code for carrying out the various methods of the present invention should not be understood to include transient objects such as carrier waves or signals. The computer-readable medium may comprise a storage medium such as a magnetic storage medium (e.g., ROM, floppy disk, hard disk, etc.), optical readable medium (e.g., CD ROM, DVD, etc.).

전술한 본 발명의 설명은 예시를 위한 것이며, 본 발명이 속하는 기술분야의 통상의 지식을 가진 자는 본 발명의 기술적 사상이나 필수적인 특징을 변경하지 않고서 다른 구체적인 형태로 쉽게 변형이 가능하다는 것을 이해할 수 있을 것이다. 그러므로 이상에서 기술한 실시예들은 모든 면에서 예시적인 것이며 한정적이 아닌 것으로 이해해야만 한다. 예를 들어, 단일형으로 설명되어 있는 각 구성 요소는 분산되어 실시될 수도 있으며, 마찬가지로 분산된 것으로 설명되어 있는 구성 요소들도 결합된 형태로 실시될 수 있다.It will be understood by those skilled in the art that the foregoing description of the present invention is for illustrative purposes only and that those of ordinary skill in the art can readily understand that various changes and modifications may be made without departing from the spirit or essential characteristics of the present invention. will be. It is therefore to be understood that the above-described embodiments are illustrative in all aspects and not restrictive. For example, each component described as a single entity may be distributed and implemented, and components described as being distributed may also be implemented in a combined form.

본 발명의 범위는 상기 상세한 설명보다는 후술하는 특허청구범위에 의하여 나타내어지며, 특허청구범위의 의미 및 범위 그리고 그 균등 개념으로부터 도출되는 모든 변경 또는 변형된 형태가 본 발명의 범위에 포함되는 것으로 해석되어야 한다.The scope of the present invention is defined by the appended claims rather than the detailed description and all changes or modifications derived from the meaning and scope of the claims and their equivalents are to be construed as being included within the scope of the present invention do.

100: 이미지 획득부 110: 카메라부
120: 조명부
200: 이미지 변환부 300: 이미지 분석부
1000: 엔트로피 이용 이미지 분석 장치
100: image obtaining unit 110: camera unit
120:
200: image conversion unit 300: image analysis unit
1000: Image analysis using entropy

Claims (7)

엔트로피를 이용하여 이미지를 분석하는 방법으로서,
제품에 대한 이미지를 획득하는 단계;
상기 획득된 이미지에 대하여 엔트로피가 최대화되도록 수정된 오츠(Otsu) 이진화를 수행하는 단계;
이진화된 상기 이미지에서 배경과 전경을 구분하는 단계; 및
상기 구분된 전경에 기초하여 상기 이미지 상에서의 결함 유무를 판단하는 단계를 포함하고,
상기 엔트로피가 최대화되도록 수정된 오츠 이진화는 이미지 엔트로피와 임계화의 결과로 분류된 이미지의 클래스 간 분산(between-class variance)이 동시에 최대화되도록 상기 이미지를 이진화하는 것이고,
상기 이미지의 클래스는 상기 수정된 오츠 이진화 과정에서 추정된 임계값을 기준으로 분류된 픽셀들의 그룹을 나타내는 것인 엔트로피를 이용하여 이미지를 분석하는 방법.
A method for analyzing an image using entropy,
Obtaining an image for the product;
Performing modified Otsu binarization to maximize entropy for the obtained image;
Separating the background and the foreground in the binarized image; And
Determining whether or not there is a defect on the image based on the divided foreground,
The modified Ots binarization to maximize the entropy is to binarize the image so that the image entropy and the between-class variance of the images classified as a result of the thresholding are maximized simultaneously,
Wherein the class of the image represents a group of pixels classified on the basis of an estimated threshold value in the modified Ots binarization process.
제 1 항에 있어서,
상기 수정된 오츠 이진화는 상기 이미지에 대한 클래스 간 분산이 최대가 되도록 하는 임계값의 추정 과정에서 아래의 수학식에 의하여 상기 이미지 엔트로피가 가중되어 추정되는 이진화이고,
Figure 112017062400622-pat00031

k*는 임계값,
Figure 112017062400622-pat00032
는 상기 이미지의 엔트로피 함수, L은 그레이 레벨(gray level),
Figure 112017062400622-pat00033
는 제 1 클래스 발생 확률,
Figure 112017062400622-pat00034
는 제 1 클래스의 평균 그레이 값,
Figure 112017062400622-pat00035
는 제 2 클래스 발생 확률,
Figure 112017062400622-pat00036
는 제 2 클래스의 평균 그레의 값인 엔트로피를 이용하여 이미지를 분석하는 방법.
The method according to claim 1,
Wherein the modified Ots binarization is a binarization in which the image entropy is weighted and estimated by the following equation in a process of estimating a threshold value such that a variance between classes for the image is maximized,
Figure 112017062400622-pat00031

k * is the threshold,
Figure 112017062400622-pat00032
Is an entropy function of the image, L is a gray level,
Figure 112017062400622-pat00033
Is the first class occurrence probability,
Figure 112017062400622-pat00034
Is the average gray value of the first class,
Figure 112017062400622-pat00035
The second class occurrence probability,
Figure 112017062400622-pat00036
Is a method of analyzing an image using entropy, which is a value of the mean gray of the second class.
제 1 항에 있어서,
상기 제품에 대한 이미지는 상기 제품의 표면 이미지이고,
사용자로부터 별도의 매개변수를 입력받음 없이 상기 수정된 오츠 이진화를 통하여 상기 제품의 표면 이미지에서 결함 영역을 검출할 수 있는 것인 엔트로피를 이용하여 이미지를 분석하는 방법.
The method according to claim 1,
Wherein the image for the product is a surface image of the product,
Wherein the defect region can be detected in the surface image of the product through the modified Ots binarization without receiving a separate parameter from the user.
엔트로피를 이용하여 이미지를 분석하는 장치로서,
제품에 대한 이미지를 획득하는 이미지 획득부;
상기 획득된 이미지에 대하여 엔트로피가 최대화되도록 수정된 오츠(Otsu) 이진화를 수행하는 이미지 변환부; 및
이진화된 상기 이미지에서 배경과 전경을 구분하고, 상기 구분된 전경에 기초하여 상기 이미지 상에서의 결함 유무를 판단하는 이미지 분석부를 포함하고,
상기 엔트로피가 최대화되도록 수정된 오츠 이진화는 이미지 엔트로피와 임계화의 결과로 분류된 이미지의 클래스 간 분산(between-class variance)이 동시에 최대화되도록 상기 이미지를 이진화하는 것이고,
상기 이미지의 클래스는 상기 수정된 오츠 이진화 과정에서 추정된 임계값을 기준으로 분류된 픽셀들의 그룹을 나타내는 것인 엔트로피를 이용하여 이미지를 분석하는 장치.
An apparatus for analyzing an image using entropy,
An image obtaining unit for obtaining an image of a product;
An image transforming unit for performing Otsu binarization so as to maximize entropy with respect to the obtained image; And
And an image analyzer for separating the background and the foreground from the binarized image and determining the presence or absence of a defect on the image based on the divided foreground,
The modified Ots binarization to maximize the entropy is to binarize the image so that the image entropy and the between-class variance of the images classified as a result of the thresholding are maximized simultaneously,
Wherein the class of the image represents a group of pixels classified on the basis of an estimated threshold value in the modified Ots2 binarization process.
제 4 항에 있어서,
상기 수정된 오츠 이진화는 상기 이미지에 대한 클래스 간 분산이 최대가 되도록 하는 임계값의 추정 과정에서 아래의 수학식에 의하여 상기 이미지 엔트로피가 가중되어 추정되는 이진화이고,
Figure 112017062400622-pat00037

k*는 임계값,
Figure 112017062400622-pat00038
는 상기 이미지의 엔트로피 함수, L은 그레이 레벨(gray level),
Figure 112017062400622-pat00039
는 제 1 클래스 발생 확률,
Figure 112017062400622-pat00040
는 제 1 클래스의 평균 그레이 값,
Figure 112017062400622-pat00041
는 제 2 클래스 발생 확률,
Figure 112017062400622-pat00042
는 제 2 클래스의 평균 그레의 값인 엔트로피를 이용하여 이미지를 분석하는 장치.
5. The method of claim 4,
Wherein the modified Ots binarization is a binarization in which the image entropy is weighted and estimated by the following equation in a process of estimating a threshold value such that a variance between classes for the image is maximized,
Figure 112017062400622-pat00037

k * is the threshold,
Figure 112017062400622-pat00038
Is an entropy function of the image, L is a gray level,
Figure 112017062400622-pat00039
Is the first class occurrence probability,
Figure 112017062400622-pat00040
Is the average gray value of the first class,
Figure 112017062400622-pat00041
The second class occurrence probability,
Figure 112017062400622-pat00042
Is an entropy that is a value of the mean gray of the second class.
제 4 항에 있어서,
상기 제품에 대한 이미지는 상기 제품의 표면 이미지이고,
사용자로부터 별도의 매개변수를 입력받음 없이 상기 수정된 오츠 이진화를 통하여 상기 제품의 표면 이미지에서 결함 영역을 검출할 수 있는 것인 엔트로피를 이용하여 이미지를 분석하는 장치.
5. The method of claim 4,
Wherein the image for the product is a surface image of the product,
Wherein the defect region can be detected in the surface image of the product through the modified Ots binarization without receiving a separate parameter from the user.
제 1 항 내지 제 3 항 중 어느 한 항의 방법을 구현하기 위한 프로그램이 기록된 컴퓨터로 판독 가능한 기록 매체.A computer-readable recording medium on which a program for implementing the method of any one of claims 1 to 3 is recorded.
KR1020170082390A 2017-06-29 2017-06-29 The method and apparatus for analyzing an image using an entropy KR101929669B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020170082390A KR101929669B1 (en) 2017-06-29 2017-06-29 The method and apparatus for analyzing an image using an entropy

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020170082390A KR101929669B1 (en) 2017-06-29 2017-06-29 The method and apparatus for analyzing an image using an entropy

Publications (1)

Publication Number Publication Date
KR101929669B1 true KR101929669B1 (en) 2018-12-17

Family

ID=65007396

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020170082390A KR101929669B1 (en) 2017-06-29 2017-06-29 The method and apparatus for analyzing an image using an entropy

Country Status (1)

Country Link
KR (1) KR101929669B1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110009638A (en) * 2019-04-12 2019-07-12 重庆交通大学 Bridge cable picture appearance defect inspection method based on partial statistics characteristic
CN111257875A (en) * 2020-01-19 2020-06-09 浙江海洋大学 Sea surface oil spill monitoring method and device based on SAR
CN116523913A (en) * 2023-07-03 2023-08-01 惠州市金思维科技有限公司 Intelligent detection method for quality of screw rod

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
논문1
논문2
논문3

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110009638A (en) * 2019-04-12 2019-07-12 重庆交通大学 Bridge cable picture appearance defect inspection method based on partial statistics characteristic
CN110009638B (en) * 2019-04-12 2023-01-03 重庆交通大学 Bridge inhaul cable image appearance defect detection method based on local statistical characteristics
CN111257875A (en) * 2020-01-19 2020-06-09 浙江海洋大学 Sea surface oil spill monitoring method and device based on SAR
CN111257875B (en) * 2020-01-19 2023-04-07 浙江海洋大学 Sea surface oil spill monitoring method and device based on SAR
CN116523913A (en) * 2023-07-03 2023-08-01 惠州市金思维科技有限公司 Intelligent detection method for quality of screw rod
CN116523913B (en) * 2023-07-03 2023-11-03 惠州市金思维科技有限公司 Intelligent detection method for quality of screw rod

Similar Documents

Publication Publication Date Title
Malarvel et al. An improved version of Otsu's method for segmentation of weld defects on X-radiography images
Yuan et al. An improved Otsu method using the weighted object variance for defect detection
US8139117B2 (en) Image quality analysis with test pattern
CN110148130B (en) Method and device for detecting part defects
CN114419025A (en) Fiberboard quality evaluation method based on image processing
CN115082683A (en) Injection molding defect detection method based on image processing
JP2013167596A (en) Defect inspection device, defect inspection method, and program
CN108765402B (en) Non-woven fabric defect detection and classification method
KR20130118275A (en) Optimization of unknown defect rejection for automatic defect classification
KR20130118276A (en) Integration of automatic and manual defect classification
KR101929669B1 (en) The method and apparatus for analyzing an image using an entropy
JP2013134666A (en) Binary image generation device, classification device, binary image generation method, and classification method
CN109462999B (en) Visual inspection method based on learning through data balance and visual inspection device using same
CN109283182A (en) A kind of detection method of battery welding point defect, apparatus and system
CN106780464A (en) A kind of fabric defect detection method based on improvement Threshold segmentation
CN113706490B (en) Wafer defect detection method
JP4250931B2 (en) Appearance inspection apparatus and appearance inspection method
Kelly et al. Quantification of neuronal density across cortical depth using automated 3D analysis of confocal image stacks
CN112308854A (en) Automatic detection method and system for chip surface flaws and electronic equipment
JP2010249547A (en) Visual examination device and visual examination method
CN116228764A (en) Neonate disease screening blood sheet acquisition quality detection method and system
CN116664565A (en) Hidden crack detection method and system for photovoltaic solar cell
Chalfoun et al. Segmenting time‐lapse phase contrast images of adjacent NIH 3T3 cells
Hu et al. Automatic detection of sound knots and loose knots on sugi using gray level co-occurrence matrix parameters
Mir et al. Machine learning-based evaluation of the damage caused by cracks on concrete structures

Legal Events

Date Code Title Description
GRNT Written decision to grant