KR102380560B1 - Corneal Ulcer Region Detection Apparatus Using Image Processing and Method Thereof - Google Patents

Corneal Ulcer Region Detection Apparatus Using Image Processing and Method Thereof Download PDF

Info

Publication number
KR102380560B1
KR102380560B1 KR1020200100471A KR20200100471A KR102380560B1 KR 102380560 B1 KR102380560 B1 KR 102380560B1 KR 1020200100471 A KR1020200100471 A KR 1020200100471A KR 20200100471 A KR20200100471 A KR 20200100471A KR 102380560 B1 KR102380560 B1 KR 102380560B1
Authority
KR
South Korea
Prior art keywords
ulcer
region
pixel
interest
area
Prior art date
Application number
KR1020200100471A
Other languages
Korean (ko)
Other versions
KR20220020033A (en
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 KR1020200100471A priority Critical patent/KR102380560B1/en
Priority to PCT/KR2020/011726 priority patent/WO2022034955A1/en
Publication of KR20220020033A publication Critical patent/KR20220020033A/en
Application granted granted Critical
Publication of KR102380560B1 publication Critical patent/KR102380560B1/en

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B3/00Apparatus for testing the eyes; Instruments for examining the eyes
    • A61B3/0016Operational features thereof
    • A61B3/0025Operational features thereof characterised by electronic signal processing, e.g. eye models
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B3/00Apparatus for testing the eyes; Instruments for examining the eyes
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B3/00Apparatus for testing the eyes; Instruments for examining the eyes
    • A61B3/10Objective types, i.e. instruments for examining the eyes independent of the patients' perceptions or reactions
    • A61B3/14Arrangements specially adapted for eye photography
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0012Biomedical image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H30/00ICT specially adapted for the handling or processing of medical images
    • G16H30/40ICT specially adapted for the handling or processing of medical images for processing medical images, e.g. editing
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H50/00ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics
    • G16H50/20ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics for computer-aided diagnosis, e.g. based on medical expert systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30004Biomedical image processing
    • G06T2207/30041Eye; Retina; Ophthalmic
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30004Biomedical image processing
    • G06T2207/30096Tumor; Lesion

Abstract

본 발명은 영상 처리를 기반으로 하는 각막궤양 검출 장치 및 그 방법에 대한 것이다. 본 발명에 따르면, 검사 대상자의 각막을 촬영한 안구영상을 입력받는 영상입력부, 상기 입력된 안구영상으로부터 관심영역을 추출하고, 추출된 관심영역에 포함되는 각 픽셀의 RGB값을 이용하여 배경에 해당하는 영역과 궤양에 해당하는 영역 사이의 경계가 구분되도록 영상의 전처리 과정을 수행하는 전처리부, 관심영역 내의 픽셀 값 분포에 따라 임계값을 도출하고, 도출된 임계값을 이용하여 기준 픽셀을 중심으로 궤양에 해당하는 영역을 확장하는 플러드 필(Flood-fill) 알고리즘을 적용하여 궤양영역을 검출하는 궤양영역 검출부, 그리고 검출된 상기 궤양영역에 대한 윤곽선을 생성하고, 생성된 윤곽선을 안구영상의 원본에 표시하여 출력하는 출력부를 포함한다.
이와 같이 본 발명에 따르면, 랜덤 기준점 선정 알고리즘에 의해 선정된 기준점을 중심으로 Otsu 방법을 통해 도출된 임계값을 이용하여 영역을 확장함으로써 궤양 영역을 검출하는데 있어서 객관적이고 정확도를 높일 수 있다. 또한, 본 발명에 따르면, 사용자의 개입을 최소화하여 객관적인 결과를 도출할 수 있고, 진료목적에 있어 향상된 신뢰도로 진료결과를 의료진과 환자에게 제공할 수 있다.
The present invention relates to a corneal ulcer detection apparatus and method based on image processing. According to the present invention, an image input unit that receives an eye image obtained by photographing the cornea of a subject to be examined, extracts a region of interest from the input eye image, and corresponds to the background using RGB values of each pixel included in the extracted region of interest A preprocessor that performs image pre-processing so that the boundary between the region of interest and the region corresponding to the ulcer is distinguished, derives a threshold value according to the distribution of pixel values in the region of interest An ulcer area detector that detects an ulcer area by applying a flood-fill algorithm that expands the area corresponding to the ulcer, and an outline for the detected ulcer area are generated, and the generated outline is applied to the original eye image. It includes an output unit for displaying and outputting.
As described above, according to the present invention, it is possible to increase the objective and accuracy in detecting the ulcer area by expanding the area using the threshold value derived through the Otsu method around the reference point selected by the random reference point selection algorithm. In addition, according to the present invention, objective results can be derived by minimizing user intervention, and medical treatment results can be provided to medical staff and patients with improved reliability for the purpose of treatment.

Description

영상 처리를 기반으로 하는 각막궤양 검출 장치 및 그 방법{Corneal Ulcer Region Detection Apparatus Using Image Processing and Method Thereof}Corneal Ulcer Region Detection Apparatus Using Image Processing and Method Thereof

본 발명은 영상 처리를 기반으로 하는 각막궤양 검출 장치 및 그 방법에 관한 것으로서, 더욱 상세하게는 각막을 촬영한 원본 영상으로부터 관심영역을 분할하고, 관심영역에 포함된 궤양을 픽셀 단위로 검출하는 각막궤양 검출 장치 및 그 방법에 관한 것이다. The present invention relates to an apparatus and method for detecting corneal ulcers based on image processing, and more particularly, to a cornea for segmenting a region of interest from an original image captured by the cornea, and detecting the ulcer included in the region of interest in units of pixels It relates to a device for detecting an ulcer and a method therefor.

의료분야에서 영상분할은 질병을 조기에 진단하고 분석하기 위한 중요과정으로 인식되고 있으며 주로 CT(Computer Tomography)영상, MRI(Magnetic Resonance Imaging) 및 특수 촬영장비를 이용한 촬영영상 등을 이용한 영상분할로 육안으로 확인할 수 없는 부위의 질병 검출 또는 특정 질병의 진료를 위한 부피측정 및 진단에 이용되고 있다. Image segmentation is recognized as an important process for early diagnosis and analysis of diseases in the medical field. It is used for volume measurement and diagnosis for the detection of diseases in areas that cannot be identified with the .

그 중에서 안과분야의 질병은 일간의 감각기관과 직결되기 때문에 섣부른 진단과 치료를 진행하기 전에 영상을 통한 초기 진단이 필수적이다. Among them, since diseases in the field of ophthalmology are directly related to daily sensory organs, early diagnosis through imaging is essential before proceeding with hasty diagnosis and treatment.

다양한 안과질병 중 각막궤양은 각막표피에 발생하는 질병으로써 감염 경로에 따라 세균성, 진균성으로 나눌 수 있으며 환자가 직접 발병부위를 관찰할 수 없기 때문에 근접촬영 장비로 촬영된 영상을 토대로 세균성, 진균성 구분 및 추후 치료과정 등의 진단이 이루어진다. 이때, 의료진은 육안으로 궤양의 크기 등을 진단하게 되는데 문제점은 주관적인 판단에 의해 궤양이 측정되기 때문에 환자에게 궤양영역을 정확히 측정한 객관적인 자료를 제시할 수 없다는 문제가 있었다. Among various ophthalmic diseases, corneal ulcers are diseases that occur in the corneal epidermis and can be divided into bacterial and fungal types depending on the route of infection. Diagnosis of classification and subsequent treatment process is made. At this time, the medical staff diagnoses the size of the ulcer with the naked eye, and the problem is that since the ulcer is measured by subjective judgment, there is a problem that objective data accurately measuring the ulcer area cannot be presented to the patient.

본 발명의 배경이 되는 기술은 대한민국 공개특허공보 제10-2020-0049195호(2020.05.08. 공개)에 개시되어 있다.The technology underlying the present invention is disclosed in Korean Patent Application Laid-Open No. 10-2020-0049195 (published on May 8, 2020).

이와 같이 본 발명에 따르면, 각막을 촬영한 원본 영상으로부터 관심영역을 분할하고, 관심영역에 포함된 궤양을 픽셀 단위로 검출하는 각막궤양 검출 장치 및 그 방법을 제공하기 위한 것이다. As described above, according to the present invention, it is to provide a corneal ulcer detection apparatus and method for segmenting a region of interest from an original image of the cornea and detecting the ulcer included in the region of interest in units of pixels.

이러한 기술적 과제를 이루기 위한 본 발명의 실시예에 따르면 영상 처리를 기반으로 하는 각막궤양 검출 장치에 있어서, 검사 대상자의 각막을 촬영한 안구영상을 입력받는 영상입력부, 상기 입력된 안구영상으로부터 관심영역을 추출하고, 추출된 관심영역에 포함되는 각 픽셀의 RGB값을 이용하여 배경에 해당하는 영역과 궤양에 해당하는 영역 사이의 경계가 구분되도록 영상의 전처리 과정을 수행하는 전처리부, 관심영역 내의 픽셀 값 분포에 따라 임계값을 도출하고, 도출된 임계값을 이용하여 기준 픽셀을 중심으로 궤양에 해당하는 영역을 확장하는 플러드 필(Flood-fill) 알고리즘을 적용하여 궤양영역을 검출하는 궤양영역 검출부, 그리고 검출된 상기 궤양영역에 대한 윤곽선을 생성하고, 생성된 윤곽선을 안구영상의 원본에 표시하여 출력하는 출력부를 포함한다. According to an embodiment of the present invention for achieving this technical problem, in the apparatus for detecting corneal ulcers based on image processing, an image input unit for receiving an ocular image obtained by photographing the cornea of a subject to be examined, a region of interest from the input ocular image A preprocessor that performs image preprocessing so that the boundary between the region corresponding to the background and the region corresponding to the ulcer is distinguished by using the RGB values of each pixel included in the extracted region of interest; and pixel values in the region of interest An ulcer area detector that derives a threshold value according to the distribution and detects the ulcer area by applying a flood-fill algorithm that expands the area corresponding to the ulcer around the reference pixel using the derived threshold value; and and an output unit for generating a contour line for the detected ulcer region and displaying the generated contour line on the original eye image.

상기 전처리부는, 상기 관심영역에 해당하는 각각의 픽셀을 회색조(Gray scale) 형태로 변환한 다음, 상기 회색조 형태로 변환된 관심영역에 히스토그램 평활화를 수행할 수 있다. The preprocessor may convert each pixel corresponding to the region of interest to a gray scale form, and then perform histogram smoothing on the region of interest converted to the gray scale form.

상기 전처리부는, 하기의 수학식을 이용하여 회색조 형태로 변환할 수 있다. The preprocessor may convert the grayscale form using the following equation.

Figure 112020084287285-pat00001
Figure 112020084287285-pat00001

상기 전처리부는, 상기 히스토그램 평활화가 적용된 관심영역에 임의의 크기를 가지는 필터를 적용하여 필터내의 픽셀 값들을 오름차순 또는 내림차순으로 정렬한 다음, 복수의 픽셀 값들의 중간 픽셀값을 이용하여 관심영역내의 노이즈를 제거하고, 감마 보정 처리하여 궤양에 해당하는 영역의 경계를 단순화할 수 있다. The preprocessor applies a filter having an arbitrary size to the region of interest to which the histogram smoothing has been applied, arranges pixel values in the filter in ascending or descending order, and then uses an intermediate pixel value of a plurality of pixel values to reduce noise in the region of interest. The boundary of the area corresponding to the ulcer can be simplified by removing and gamma-correcting treatment.

상기 궤양영역 검출부는, Otsu 알고리즘을 이용하여 상기 관심영역 내의 픽셀 값 분포에 따라 임계값을 설정한 다음, 상기 관심영역에 포함된 각 픽셀의 좌표정보를 이용하여 기준점을 획득하고, 상기 획득한 기준점에 대응하는 기준 픽셀과 인접한 픽셀간의 픽셀 차이값과 상기 임계값을 비교하여 궤양에 해당하는 영역을 확장할 수 있다. The ulcer region detection unit sets a threshold value according to the distribution of pixel values in the region of interest using the Otsu algorithm, and then acquires a reference point using coordinate information of each pixel included in the region of interest, and the obtained reference point A region corresponding to the ulcer may be expanded by comparing a pixel difference value between a reference pixel corresponding to , and an adjacent pixel and the threshold value.

상기 궤양영역 검출부는, Otsu 알고리즘에 따라 상기 관심영역에 포함된 픽셀을 궤양에 해당하는 영역과 배경에 해당하는 영역으로 군집화하고, 상기 궤양에 해당하는 영역의 분산값과 배경에 해당하는 영역의 분산값의 차이가 최대가 되는 픽셀값을 상기 임계값으로 설정할 수 있다. The ulcer region detection unit clusters pixels included in the region of interest into a region corresponding to an ulcer and a region corresponding to a background according to the Otsu algorithm, and the dispersion value of the region corresponding to the ulcer and the dispersion of the region corresponding to the background A pixel value having a maximum difference in values may be set as the threshold value.

상기 분산값은, 하기의 수학식으로 이용하여 산출될 수 있다. The variance value may be calculated using the following equation.

Figure 112020084287285-pat00002
Figure 112020084287285-pat00002

여기서,

Figure 112020084287285-pat00003
는 임의의 픽셀이 궤양에 해당하는 영역에 속할 확률이고,
Figure 112020084287285-pat00004
은 임의의 픽셀이 배경에 해당하는 영역에 속할 확률이고,
Figure 112020084287285-pat00005
은 궤양에 해당하는 영역내 픽셀값의 평균을 나타내고,
Figure 112020084287285-pat00006
은 배경에 해당하는 영역내 픽셀값의 평균을 나타내며,
Figure 112020084287285-pat00007
은 전체 영상의 픽셀값의 평균을 나타낸다. here,
Figure 112020084287285-pat00003
is the probability that any pixel belongs to the area corresponding to the ulcer,
Figure 112020084287285-pat00004
is the probability that a random pixel belongs to the region corresponding to the background,
Figure 112020084287285-pat00005
represents the average of pixel values in the area corresponding to the ulcer,
Figure 112020084287285-pat00006
represents the average of pixel values in the area corresponding to the background,
Figure 112020084287285-pat00007
represents the average of pixel values of the entire image.

상기 궤양영역 검출부는, 상기 관심영역에 포함된 각 픽셀의 좌표 정보를 저장하는 배열을 생성한 다음, 히스토그램을 수행하여 빈도수가 가장 큰 픽셀 값에 해당하는 복수의 픽셀들 중에서 하나의 픽셀을 랜덤으로 선택하여 기준픽셀로 설정할 수 있다. The ulcer region detection unit generates an array storing coordinate information of each pixel included in the region of interest, and then performs a histogram to randomly select one pixel from among a plurality of pixels corresponding to the pixel value with the highest frequency. It can be selected and set as the reference pixel.

상기 출력부는, 상기 검출된 궤양 영역 내에 미 검출 영역이 포함되어 있는지 여부를 판단하고, 판단결과 미 검출 영역이 포함되어 있으면 상기 관심영역과 동일한 크기를 가지며 배경색이 반전된 반전 영상을 생성하고, 상기 반전 영상의 각 모서리에 해당하는 점에서 임계값이 0인 플러드 필(Flood-fill) 알고리즘을 적용하여 미 검출 영역에 해당하는 홀을 채울 수 있다. The output unit determines whether an undetected region is included in the detected ulcer region, and if the determination result includes an undetected region, generates an inverted image having the same size as the region of interest and inverted background color, A hole corresponding to an undetected area may be filled by applying a flood-fill algorithm having a threshold value of 0 at a point corresponding to each corner of the inverted image.

상기 출력부는, 상기 궤양 영역에 모폴로지 연산에 해당하는 침식 연산과 팽창 연산을 번갈아 수행하여 상기 궤양영역의 경계부분에 포함된 노이즈를 제거하고 경계부분을 스무딩 처리하며, 캐니 엣지 디텍션(Canny Edge Detection) 알고리즘을 이용하여 궤양영역의 윤곽선을 생성할 수 있다. The output unit alternately performs an erosion operation and a dilation operation corresponding to a morphological operation on the ulcer region to remove noise included in the boundary portion of the ulcer region and smooth the boundary portion, and Canny Edge Detection An algorithm can be used to generate the contour of the ulcer area.

또한, 본 발명의 다른 실시예에 따르면 영상 처리를 기반으로 하는 각막궤양 검출 장치를 이용한 각막 궤양 검출 방법에 있어서, 검사 대상자의 각막을 촬영한 안구영상을 입력받는 단계, 상기 입력된 안구영상으로부터 관심영역을 추출하고, 추출된 관심영역에 포함되는 각 픽셀의 RGB값을 이용하여 배경에 해당하는 영역과 궤양에 해당하는 영역 사이의 경계가 구분되도록 영상의 전처리 과정을 수행하는 단계, 관심영역 내의 픽셀 값 분포에 따라 임계값을 도출하고, 도출된 임계값을 이용하여 기준 픽셀을 중심으로 궤양에 해당하는 영역을 확장하는 플러드 필(Flood-fill) 알고리즘을 적용하여 궤양영역을 검출하는 단계, 그리고 검출된 상기 궤양영역에 대한 윤곽선을 생성하고, 생성된 윤곽선을 안구영상의 원본에 표시하여 궤양영역을 출력하는 단계를 포함한다. In addition, according to another embodiment of the present invention, in the method for detecting a corneal ulcer using an image processing-based corneal ulcer detection device, the step of receiving an eye image obtained by photographing the cornea of a subject to be examined, the interest from the input eye image extracting a region and performing image preprocessing so that the boundary between the region corresponding to the background and the region corresponding to the ulcer is distinguished using the RGB values of each pixel included in the extracted region of interest; pixels in the region of interest Detecting the ulcer area by deriving a threshold value according to the value distribution, and applying a flood-fill algorithm that expands the area corresponding to the ulcer around the reference pixel using the derived threshold value; and detection and generating an outline for the ulcerated region, and outputting the ulcer region by displaying the generated outline on the original of the eye image.

이와 같이 본 발명에 따르면, 랜덤 기준점 선정 알고리즘에 의해 선정된 기준점을 중심으로 Otsu 방법을 통해 도출된 임계값을 이용하여 영역을 확장함으로써 궤양 영역을 검출하는데 있어서 객관적이고 정확도를 높일 수 있다. 또한, 본 발명에 따르면, 사용자의 개입을 최소화하여 객관적인 결과를 도출할 수 있고, 진료목적에 있어 향상된 신뢰도로 진료결과를 의료진과 환자에게 제공할 수 있다.As described above, according to the present invention, it is possible to increase the objective and accuracy in detecting the ulcer area by expanding the area using the threshold value derived through the Otsu method around the reference point selected by the random reference point selection algorithm. In addition, according to the present invention, objective results can be derived by minimizing user intervention, and medical treatment results can be provided to medical staff and patients with improved reliability for the purpose of treatment.

도 1은 본 발명의 실시예에 따른 각막궤양 검출 장치를 설명하기 위한 구성도이다.
도 2는 본 발명의 실시예에 따른 각막궤양 검출 장치를 이용하여 각막궤양 검출 방법을 나타내는 순서도이다.
도 3은 도 2에 도시된 S230단계를 설명하기 위한 순서도이다.
도4는 도 3에 도시된 S231단계에서 관심영역을 회색조로 변환한 상태를 나타내는 도면이다.
도 5는 도 3에 도시된 S232단계에서 관심영역에 히스토그램 평활화를 적용한 상태를 나타내는 도면이다.
도 6은 도 3에 도시된 S233단계에서 중간 픽셀값을 설정하는 방법을 나타내는 도면이다.
도 7은 도 3에 도시된 S233단계에서 설정된 중간값을 이용하여 관심영역에 포함된 노이즈를 제거한 상태를 나타내는 도면이다.
도 8은 도 3에 도시된 S234단계에서 관심영역에 감마보정을 적용한 상태를 나타내는 도면이다.
도 9는 도 2에 도시된 S240단계를 설명하기 위한 순서도이다.
도 10은 도 9에 도시된 S242단계에서 픽셀의 위치정보를 저장하는 배열의 구조를 설명하기 위한 도면이다.
도 11a 및 11b는 도 9에 도시된 S243단계에서 플러드 필 알고리즘에 따라 영역을 확장하는 방법을 설명하기 위한 도면이다.
도 12는 도 2에 도시된 S250를 설명하기 위한 순서도이다.
도 13은 도 12에 도시된 S251단계에서 미검출 영역을 채워 보정된 영상을 출력한 상태를 나타내는 도면이다.
도 14는 도 12에 도시된 S252단계에서 모폴로지 연산을 수행한 상태를 나타내는 도면이다.
도 15는 도 12에 도시된 S253단계에서 검출된 윤관선을 원본영상에 표시한 결과를 나타내는 도면이다.
1 is a configuration diagram for explaining a corneal ulcer detection apparatus according to an embodiment of the present invention.
2 is a flowchart illustrating a corneal ulcer detection method using the corneal ulcer detection apparatus according to an embodiment of the present invention.
FIG. 3 is a flowchart for explaining step S230 shown in FIG. 2 .
FIG. 4 is a diagram illustrating a state in which a region of interest is converted to grayscale in step S231 shown in FIG. 3 .
FIG. 5 is a diagram illustrating a state in which histogram smoothing is applied to a region of interest in step S232 shown in FIG. 3 .
FIG. 6 is a diagram illustrating a method of setting an intermediate pixel value in step S233 shown in FIG. 3 .
FIG. 7 is a diagram illustrating a state in which noise included in a region of interest is removed using an intermediate value set in step S233 shown in FIG. 3 .
FIG. 8 is a diagram illustrating a state in which gamma correction is applied to a region of interest in step S234 shown in FIG. 3 .
9 is a flowchart for explaining step S240 shown in FIG.
FIG. 10 is a diagram for explaining the structure of an array for storing position information of pixels in step S242 shown in FIG. 9 .
11A and 11B are diagrams for explaining a method of expanding an area according to a flood fill algorithm in step S243 shown in FIG. 9 .
12 is a flowchart for explaining S250 illustrated in FIG. 2 .
13 is a diagram illustrating a state in which a corrected image is output by filling an undetected area in step S251 shown in FIG. 12 .
14 is a diagram illustrating a state in which a morphology operation is performed in step S252 shown in FIG. 12 .
15 is a view showing the result of displaying the contour line detected in step S253 shown in FIG. 12 on the original image.

이하 첨부된 도면을 참조하여 본 발명에 따른 바람직한 실시예를 상세히 설명하기로 한다. 이 과정에서 도면에 도시된 선들의 두께나 구성요소의 크기 등은 설명의 명료성과 편의상 과장되게 도시되어 있을 수 있다. Hereinafter, preferred embodiments according to the present invention will be described in detail with reference to the accompanying drawings. In this process, the thickness of the lines or the size of the components shown in the drawings may be exaggerated for clarity and convenience of explanation.

또한 후술되는 용어들은 본 발명에서의 기능을 고려하여 정의된 용어들로서, 이는 사용자, 운용자의 의도 또는 관례에 따라 달라질 수 있다. 그러므로 이러한 용어들에 대한 정의는 본 명세서 전반에 걸친 내용을 토대로 내려져야 할 것이다.In addition, the terms to be described later are terms defined in consideration of functions in the present invention, which may vary according to intentions or customs of users and operators. Therefore, definitions of these terms should be made based on the content throughout this specification.

이하에서는 도 1을 이용하여 본 발명의 실시예에 따른 각막궤양 검출 장치 에 대하여 더욱 상세하게 설명한다. Hereinafter, a corneal ulcer detection apparatus according to an embodiment of the present invention will be described in more detail with reference to FIG. 1 .

도 1은 본 발명의 실시예에 따른 각막궤양 검출 장치를 설명하기 위한 구성도이다. 1 is a configuration diagram for explaining a corneal ulcer detection apparatus according to an embodiment of the present invention.

도 1에 도시된 바와 같이, 본 발명의 실시예에 따른 각막궤양 검출 장치(100)는 영상입력부(110), 전처리부(120), 궤양영역 검출부(130) 및 출력부(140)를 포함한다. As shown in FIG. 1 , the corneal ulcer detection apparatus 100 according to an embodiment of the present invention includes an image input unit 110 , a preprocessor 120 , an ulcer region detection unit 130 , and an output unit 140 . .

먼저, 영상입력부(110)는 검사 대상자의 각막을 촬영한 안구영상을 입력받는다. First, the image input unit 110 receives an ocular image obtained by photographing the cornea of a test subject.

그 다음, 전처리부(120)는 입력받은 안구영상으로부터 궤양영역을 분할하기 위하여 안구영상의 표면을 단순화한다. 부연하자면, 전처리부(120)는 사용자에 의해 지정된 관심영역을 추출한다. 그리고 전처리부(120)는 추출된 관심영역에 포함된 각 픽셀의 RGB값을 이용하여 배경에 해당하는 영역과 궤양에 해당하는 영역으로 구분되도록 회색조 변환, 히스토그램 평활화, 중간값 필터 및 감마보정 순으로 전처리 과정을 수행한다. Next, the preprocessor 120 simplifies the surface of the eyeball image in order to segment the ulcer region from the received eyeball image. In other words, the preprocessor 120 extracts the ROI designated by the user. Then, the preprocessor 120 uses the RGB values of each pixel included in the extracted region of interest to be divided into a region corresponding to the background and an region corresponding to an ulcer in the order of grayscale conversion, histogram smoothing, median value filter, and gamma correction. Perform pre-processing.

그 다음, 궤양영역 검출부(130)는 전처리 과정이 수행된 관심영역 내에 플러드 필(Flood-fill) 알고리즘을 적용하여 궤양영역을 검출한다. 이를 다시 설명하면, 궤양영역 검출부(130)는 궤양에 해당하는 영역 내에 무작위로 선택된 어느 하나의 픽셀을 기준 픽셀로 설정하고, 기준 픽셀과 인접한 픽셀간의 차이값이 기 설정된 임계값 이내이면 궤양에 해당하는 영역으로 확장한다. 이때 임계값은 Otsu 알고리즘에 의해 산출된다. 궤양영역 검출부(130)는 궤양 영역이 최대로 확장될 때까지 플러드 필(Flood-fill) 알고리즘을 반복적으로 수행하여 궤양영역을 검출한다. Then, the ulcer region detection unit 130 detects the ulcer region by applying a flood-fill algorithm to the region of interest on which the pre-processing has been performed. In other words, the ulcer area detection unit 130 sets any one randomly selected pixel within the area corresponding to the ulcer as the reference pixel, and corresponds to the ulcer if the difference between the reference pixel and the adjacent pixel is within a preset threshold. expand to the area At this time, the threshold value is calculated by the Otsu algorithm. The ulcer area detection unit 130 detects the ulcer area by repeatedly performing a flood-fill algorithm until the ulcer area is maximally expanded.

마지막으로 출력부(140)는 검출된 궤양영역에 대하여 윤곽선을 생성하고, 생성된 윤곽선을 안구영상의 원본에 표시하여 출력한다. 즉, 출력부(140)는 검출된 궤양영역의 내부에 미검출 영역이 포함되어 있는지의 여부를 판단하고, 미검출 영역이 포함되어 있을 경우에는 미검출 영역을 채우는 과정을 수행한다. 그리고, 궤양영역 검출부(130)는 궤양영역의 경계부분을 스무딩 처리하여 윤곽선을 생성하고, 생성된 윤곽선을 안구영상의 원본에 표시하여 출력한다. Finally, the output unit 140 generates a contour line for the detected ulcer region, and displays the generated contour line on the original eye image and outputs it. That is, the output unit 140 determines whether an undetected area is included in the detected ulcer area, and when the undetected area is included, the process of filling the undetected area is performed. Then, the ulcer area detection unit 130 smoothes the boundary portion of the ulcer area to generate a contour line, and displays the generated contour line on the original image of the eyeball and outputs it.

이하에서는 도 2 내지 도 15 를 이용하여 각막궤양 검출 장치(100)를 이용하여 각막계양을 검출하는 방법에 대해 더욱 상세하게 설명한다. Hereinafter, a method for detecting a corneal ulcer using the corneal ulcer detection apparatus 100 will be described in more detail with reference to FIGS. 2 to 15 .

도 2는 본 발명의 실시예에 따른 각막궤양 검출 장치를 이용하여 각막궤양 검출 방법을 나타내는 순서도이다. 2 is a flowchart illustrating a corneal ulcer detection method using the corneal ulcer detection apparatus according to an embodiment of the present invention.

도 2에 도시된 바와 같이, 본 발명의 실시예에 따른 각막궤양 검출 장치(100)는 검사 대상자의 각막을 촬영한 안구영상을 입력받는다(S210).As shown in FIG. 2 , the apparatus 100 for detecting corneal ulcers according to an embodiment of the present invention receives an eye image obtained by photographing the cornea of a test subject ( S210 ).

부연하자면, 각막궤양은 각막표피에 발생하는 질병으로써 환자가 직접 발병부위를 관찰할 수 없기 때문에 근접 촬영 장비로 촬영된 영상을 토대로 진단이 이루어진다. 따라서, 영상입력부(110)는 근접 촬영 장비를 통해 촬영된 안구영상을 입력받는다. In other words, corneal ulcer is a disease that occurs in the epidermis of the cornea, and since the patient cannot directly observe the site of the disease, the diagnosis is made based on images taken with close-up equipment. Accordingly, the image input unit 110 receives the eyeball image photographed through the close-up photographing device.

그 다음, 전처리부(120)는 사용자에 의해 설정된 영역을 관심영역으로 추출한다(S220). Next, the preprocessor 120 extracts the region set by the user as the region of interest ( S220 ).

본 발명의 실시예에 따른 각막궤양 검출 방법은 사용자의 개입을 최소화한 상태에서 영상분할을 수행하여 각막궤양을 검출하는 것으로서, 사용자는 안구영상의 일부 영역을 관심영역으로 지정하거나, 임계값을 설정한다. 그러면, 전처리부(120)는 사용자에 의해 지정된 영역 또는 설정된 임계값을 통해 관심영역을 추출한다. The corneal ulcer detection method according to an embodiment of the present invention detects a corneal ulcer by performing image segmentation in a state where the user's intervention is minimized. do. Then, the preprocessor 120 extracts the ROI through a region designated by the user or a set threshold value.

S220단계에서 관심영역에 대한 추출이 완료되면, 전처리부(120)는 관심영역에 전처리 과정을 수행한다(S230). When the extraction of the region of interest is completed in step S220, the preprocessor 120 performs a preprocessing process on the region of interest (S230).

이하에서는 도 3 내지 도 8을 이용하여 S230단계에 대해 더욱 상세하게 설명한다. Hereinafter, step S230 will be described in more detail with reference to FIGS. 3 to 8 .

도 3은 도 2에 도시된 S230단계를 설명하기 위한 순서도이고, 도4는 도 3에 도시된 S231단계에서 관심영역을 회색조로 변환한 상태를 나타내는 도면이고, 도 5는 도 3에 도시된 S232단계에서 관심영역에 히스토그램 평활화를 적용한 상태를 나타내는 도면이고, 도 6은 도 3에 도시된 S233단계에서 중간 픽셀값을 설정하는 방법을 나타내는 도면이고, 도 7은 도 3에 도시된 S233단계에서 설정된 중간값을 이용하여 관심영역에 포함된 노이즈를 제거한 상태를 나타내는 도면이고, 도 8은 도 3에 도시된 S234단계에서 관심영역에 감마보정을 적용한 상태를 나타내는 도면이다. 3 is a flowchart for explaining step S230 shown in FIG. 2 , FIG. 4 is a view showing a state in which the region of interest is converted to grayscale in step S231 shown in FIG. 3 , and FIG. 5 is S232 shown in FIG. It is a diagram showing a state in which the histogram smoothing is applied to the region of interest in step S233, FIG. 6 is a diagram showing a method of setting an intermediate pixel value in step S233 shown in FIG. It is a diagram illustrating a state in which noise included in the region of interest is removed using an intermediate value, and FIG. 8 is a diagram illustrating a state in which gamma correction is applied to the region of interest in step S234 shown in FIG. 3 .

먼저, 도 3에 도시된 바와 같이, 본 발명의 실시예에 따른 전처리부(120)는 관심영역을 회색조(Gray scale) 형태로 변환한다(S231).First, as shown in FIG. 3 , the preprocessor 120 according to the embodiment of the present invention converts the region of interest into a gray scale form ( S231 ).

부연하자면, 전처리부(120)는 관심영역을 하기의 수학식 1을 이용하여 회색조로 변환한다. In other words, the preprocessor 120 converts the region of interest into grayscale using Equation 1 below.

Figure 112020084287285-pat00008
Figure 112020084287285-pat00008

즉, 전처리부(120)는 관심영역 내에 포함된 픽셀의 R, G, B값에 특정 상수를 곱하여 픽셀의 값을 0부터 255사이의 값으로 매핑되도록 한다. 그러면, 도 4에 도시된 바와 같이, 칼라 값을 가지고 있던 관심영역은 원본 영상과 동일한 휘도를 갖으며, 색상의 음영을 유지한 상태에서 회색조로 변환된다. That is, the preprocessor 120 multiplies the R, G, and B values of the pixels included in the region of interest by a specific constant to map the pixel values to values between 0 and 255. Then, as shown in FIG. 4 , the region of interest having the color value has the same luminance as the original image, and is converted to grayscale while maintaining the shading of the color.

그 다음, 전처리부(120)는 회색조로 변환된 관심영역에 히스토그램 평활화 과정을 수행한다(S232).Next, the preprocessor 120 performs a histogram smoothing process on the grayscale-converted region of interest (S232).

부연하자면, 회색조로 변화된 관심영역에 포함된 픽셀의 값은 명암값을 나타낸다. 이때, 명암값의 분포가 한쪽으로 치우쳐있거나 분포가 균일하지 못하면 궤양영역에 대한 경계를 명확하게 구분할 수 없다. 따라서, 전처리부(120)는 히스토그램 평활화를 적용하여 궤양에 해당하는 영역과 배경에 해당하는 영역의 구분을 명확하게 한다. In other words, the value of the pixel included in the region of interest changed to grayscale represents the contrast value. At this time, if the distribution of light and dark values is skewed to one side or the distribution is not uniform, the boundary for the ulcer area cannot be clearly distinguished. Accordingly, the preprocessor 120 applies histogram smoothing to clearly distinguish the region corresponding to the ulcer and the region corresponding to the background.

이를 다시 설명하면, 전처리부(120)는 관심영역의 픽셀값을 이용하여 히스토그램을 생성한다. 그리고, 전처리부(120)는 획득한 히스토그램을 토대로 누적값 즉, 빈도 수를 획득하고, 획득한 빈도수를 이용하여 관심영역을 정규화한다. In other words, the preprocessor 120 generates a histogram using pixel values of the ROI. Then, the preprocessor 120 obtains an accumulated value, that is, the frequency count based on the acquired histogram, and normalizes the ROI using the obtained frequency count.

이때, 전처리부(120)는 하기의 수학식 2를 이용하여 관심영역을 정규화할 수 있는 사상함수(

Figure 112020084287285-pat00009
)를 산출한다. At this time, the preprocessor 120 uses a mapping function (
Figure 112020084287285-pat00009
) is calculated.

Figure 112020084287285-pat00010
Figure 112020084287285-pat00010

여기서,

Figure 112020084287285-pat00011
는 히스토그램의 누적값이고,
Figure 112020084287285-pat00012
는 누적 히스토그램의 최소값이고, M 및 N은 관심영역의 크기값을 나타낸다. 또한, L은 정규화된 누적 히스토그램 범위의 크기값을 의미하므로 회색조 영상에서는 256의 값을 가진다. here,
Figure 112020084287285-pat00011
is the cumulative value of the histogram,
Figure 112020084287285-pat00012
is the minimum value of the cumulative histogram, and M and N represent the size values of the ROI. In addition, since L means the size value of the normalized cumulative histogram range, it has a value of 256 in the grayscale image.

그 다음, 전처리부(120)는 산출된 사상함수를 이용하여 관심영역에 매핑한다. Next, the preprocessor 120 maps the ROI to the ROI using the calculated mapping function.

예를 들어 설명하면, 관심영역의 크기가 8

Figure 112020084287285-pat00013
8이고, 히스토그램의 누적값이 34이고, 누적 히스토그램의 최소값이 1이라고 가정한다. 그러면, 전처리부(120)는 수학식 2에 의해 133.5의 사상함수를 획득할 수 있다. 그 다음, 전처리부(120)는 획득한 사상함수를 이용하여 픽셀값이 48인 모든 픽셀에 133.5라는 값으로 맵핑한다. 그러면, 도 5에 도시된 바와 같이, 전처리부(120)는 명암 대비가 높은 영상을 획득할 수 있다. For example, if the size of the region of interest is 8
Figure 112020084287285-pat00013
It is assumed that 8, the cumulative value of the histogram is 34, and the minimum value of the cumulative histogram is 1. Then, the preprocessor 120 may obtain a mapping function of 133.5 by Equation (2). Next, the preprocessor 120 maps all pixels having a pixel value of 48 to a value of 133.5 by using the obtained mapping function. Then, as shown in FIG. 5 , the preprocessor 120 may acquire an image with high contrast.

S232단계가 완료되면, 전처리부(120)는 관심영역에 포함된 노이즈를 중간 픽셀값을 이용하여 제거한다(S233).When step S232 is completed, the preprocessor 120 removes the noise included in the region of interest by using the intermediate pixel value (S233).

히스토그램 평활화가 수행된 관심영역은 명암대비에 따라 궤양에 해당하는 영역과 배경에 해당하는 영역으로 구분될 수 있다. 다만, 궤양에 해당하는 영역의 경계에는 노이즈가 포함되어 있으므로 전처리부(120)는 관심영역에 중간값 필터를 적용하여 노이즈를 제거한다. 자세히는, 전처리부(120)는 임의의 크기를 가지는 필터를 관심영역에 적용하여 필터내의 픽셀값들을 오름차순 또는 내림차순으로 정렬한다. 그리고, 전처리부(120)는 정렬된 픽셀값들 중에서 중간에 위치하는 픽셀값을 이용하여 관심영역내의 노이즈를 제거한다. The region of interest on which the histogram smoothing has been performed may be divided into a region corresponding to an ulcer and a region corresponding to a background according to contrast. However, since noise is included in the boundary of the region corresponding to the ulcer, the preprocessor 120 removes the noise by applying a median filter to the region of interest. In detail, the preprocessor 120 applies a filter having an arbitrary size to the region of interest and sorts pixel values in the filter in ascending or descending order. Then, the preprocessor 120 removes noise in the ROI by using a pixel value located in the middle among the aligned pixel values.

예를 들어, 도 6에 도시된 바와 같이, 4×4의 크기를 갖는 관심영역 내에 3×3의 크기를 가지는 필터를 적용한다고 가정한다. 그러면, 전처리부(120)는 필터내에 포함된 픽셀값 즉, "4", "4", "5", "4", "3", "6", "3", "1", "2"를 오름차순 또는 내림차순으로 정렬하여 중간에 위치하는 픽셀값 "4"를 획득할 수 있다. 그러면, 전처리부(120)는 획득한 중간 픽셀값을 필터로 추출된 영역에 맵핑한다. For example, as shown in FIG. 6 , it is assumed that a filter having a size of 3×3 is applied to a region of interest having a size of 4×4. Then, the preprocessor 120 performs the pixel values included in the filter, that is, “4”, “4”, “5”, “4”, “3”, “6”, “3”, “1”, “2”. " can be arranged in ascending or descending order to obtain a pixel value "4" located in the middle. Then, the preprocessor 120 maps the obtained intermediate pixel value to the region extracted by the filter.

도 7에 도시된 바와 같이, 전처리부(120)는 중간 픽셀값을 적용하는 과정을 반복하여 궤양영역의 윤관선 부분에 노이즈가 제거된 영상을 획득한다. As shown in FIG. 7 , the preprocessor 120 repeats the process of applying the intermediate pixel value to obtain an image from which noise has been removed from the contour line of the ulcer region.

그 다음, 전처리부(120)는 궤양에 해당하는 영역에 감마 보정 처리를 수행하여 경계를 단순화한다(S234).Next, the preprocessor 120 simplifies the boundary by performing a gamma correction process on the area corresponding to the ulcer ( S234 ).

부연하자면, 전처리부(120)는 관심영역에 포함된 배경에 해당하는 영역과 궤양에 해당하는 영역의 차이가 더욱 뚜렷하게 나타낼 수 있도록 감마보정 필터를 이용하여 보정작업을 수행한다. In other words, the preprocessor 120 performs a correction operation using a gamma correction filter so that the difference between the region corresponding to the background and the region corresponding to the ulcer included in the region of interest can be more clearly indicated.

전처리부(120)는 하기의 수학식 3에 의해 감마값을 산출하고, 산출된 감마값을 이용하여 선형을 비선형적으로 변형한다. The preprocessor 120 calculates a gamma value according to Equation 3 below, and non-linearly transforms the line by using the calculated gamma value.

Figure 112020084287285-pat00014
Figure 112020084287285-pat00014

여기서,

Figure 112020084287285-pat00015
는 관심영역에서 (i,j)에 위치한 픽셀의 보정된 밝기값을 나타내고,
Figure 112020084287285-pat00016
는 픽셀값을 나타낸다. here,
Figure 112020084287285-pat00015
represents the corrected brightness value of the pixel located at (i, j) in the region of interest,
Figure 112020084287285-pat00016
represents a pixel value.

따라서, 도 8에 도시된 바와 같이, 전처리부(120)는 산출된 감마값을 이용하여 관심영역의 밝은 부분 즉, 궤양에 해당하는 부분을 단순화되게 출력한다. Accordingly, as shown in FIG. 8 , the preprocessor 120 simply outputs the bright part of the ROI, that is, the part corresponding to the ulcer, using the calculated gamma value.

S230단계에 따라 전처리 과정이 완료되면, 궤양영역 검출부는 플러드 필(Flood-fill) 알고리즘을 적용하여 궤양영역을 검출한다(S240). When the pre-processing process is completed according to step S230, the ulcer area detection unit detects the ulcer area by applying a flood-fill algorithm (S240).

이하에서는 도 9 내지 도 11b를 이용하여 S240단계에 대해 더욱 상세하게 설명한다. Hereinafter, step S240 will be described in more detail with reference to FIGS. 9 to 11B .

도 9는 도 2에 도시된 S240단계를 설명하기 위한 순서도이고, 도 10은 도 9에 도시된 S242단계에서 픽셀의 위치정보를 저장하는 배열의 구조를 설명하기 위한 도면이고, 도 11a 및 11b는 도 9에 도시된 S243단계에서 플러드 필 알고리즘에 따라 영역을 확장하는 방법을 설명하기 위한 도면이다. 9 is a flowchart for explaining step S240 shown in FIG. 2 , FIG. 10 is a diagram for explaining the structure of an arrangement for storing pixel position information in step S242 shown in FIG. 9 , FIGS. 11A and 11B are It is a diagram for explaining a method of expanding an area according to the flood fill algorithm in step S243 shown in FIG. 9 .

도 9에 도시된 바와 같이, 본 발명의 실시예에 따른 궤양영역 검출부(130)는 Otsu 알고리즘을 이용하여 관심영역 내의 픽셀값 분포에 따라 임계값을 설정한다(S241).As shown in FIG. 9 , the ulcer region detection unit 130 according to an embodiment of the present invention sets a threshold value according to the distribution of pixel values in the region of interest using the Otsu algorithm ( S241 ).

Otsu 알고리즘은 영상내의 픽셀 값 분포에 따라 적절한 임계값을 도출할 수 있는 알고리즘이다. 따라서, 궤양영역 검출부(130)는 Otsu 알고리즘에 따라 관심영역에 포함된 픽셀을 2개의 영역으로 군집화하고, 군집화된 각각의 영역의 분산값을 이용하여 임계값을 설정한다. 자세히는, 궤양영역 검출부(130)는 히스토그램을 기반으로 특정 픽셀값을 임계값으로 하여 궤양에 해당하는 영역과 배경에 해당하는 영역으로 분류한다. 즉, 임계값은 궤양에 해당하는 영역과 배경에 해당하는 영역으로 나누는 기준 값을 나타내며, 궤양에 해당하는 영역의 분산값과 배경에 해당하는 영역의 분산값의 차이가 최대가 될 때의 기준값이 최적의 임계값이 된다. The Otsu algorithm is an algorithm that can derive an appropriate threshold according to the distribution of pixel values in an image. Accordingly, the ulcer region detection unit 130 clusters pixels included in the region of interest into two regions according to the Otsu algorithm, and sets a threshold value using a variance value of each clustered region. In detail, the ulcer area detection unit 130 classifies the area corresponding to the ulcer and the area corresponding to the background by using a specific pixel value as a threshold based on the histogram. That is, the threshold value represents a reference value for dividing the area corresponding to the ulcer and the area corresponding to the background. is the optimal threshold.

이때, 분산값은 하기의 수학식 4를 이용하여 산출된다. In this case, the variance value is calculated using Equation 4 below.

Figure 112020084287285-pat00017
Figure 112020084287285-pat00017

여기서,

Figure 112020084287285-pat00018
는 임의의 픽셀이 궤양에 해당하는 영역에 속할 확률이고,
Figure 112020084287285-pat00019
은 임의의 픽셀이 배경에 해당하는 영역에 속할 확률이고,
Figure 112020084287285-pat00020
은 궤양에 해당하는 영역내 픽셀값의 평균을 나타내고,
Figure 112020084287285-pat00021
은 배경에 해당하는 영역내 픽셀값의 평균을 나타내며,
Figure 112020084287285-pat00022
은 전체 영상의 픽셀값의 평균을 나타낸다. here,
Figure 112020084287285-pat00018
is the probability that any pixel belongs to the area corresponding to the ulcer,
Figure 112020084287285-pat00019
is the probability that a random pixel belongs to the region corresponding to the background,
Figure 112020084287285-pat00020
represents the average of pixel values in the area corresponding to the ulcer,
Figure 112020084287285-pat00021
represents the average of pixel values in the area corresponding to the background,
Figure 112020084287285-pat00022
represents the average of pixel values of the entire image.

수학식 4에 의하면, 분산값은

Figure 112020084287285-pat00023
으로 풀이된다. 즉, 궤양영역 검출부(130)는 궤양에 해당하는 영역의 픽셀 평균값과 배경에 해당하는 영역의 픽셀 평균값의 차이가 최대가 되어 분산 값이 최대가 될 때의 기준 값을 최적의 임계값으로 설정한다. According to Equation 4, the variance value is
Figure 112020084287285-pat00023
is interpreted as That is, the ulcer region detection unit 130 sets the reference value when the difference between the average pixel value of the region corresponding to the ulcer and the pixel average value of the region corresponding to the background becomes the maximum and the dispersion value becomes the maximum as the optimal threshold value. .

S241단계에서 임계값 설정이 완료되면, 궤양영역 검출부(130)는 플러드 필(Flood-fill) 알고리즘을 이용하여 궤양에 해당하는 영역을 확장하기 위하여 기준 픽셀을 설정한다(S242).When the threshold value setting is completed in step S241, the ulcer area detection unit 130 sets a reference pixel to expand the area corresponding to the ulcer using a flood-fill algorithm (S242).

부연하자면, 플러드 필(Flood-fill) 알고리즘이란 2차원 이상의 배열에서 지정된 기준값을 중심으로 영역을 넓혀 나가는 영역확장 방식의 알고리즘으로써, 기준점이 되는 픽셀과 인접한 픽셀간의 값의 차이가 지정된 임계값 이하일 때 영역을 확장하고, 확장된 픽셀을 다시 기준점이 되는 픽셀로 설정하여 더 이상 영역이 확장되지 않을 때까지 반복하는 알고리즘이다. 그러므로, 플러드 필(Flood-fill) 알고리즘을 수행하기 위해서는 시작이 되는 기준 픽셀을 설정해주어야 한다. In other words, the flood-fill algorithm is an area expansion algorithm that widens the area around a specified reference value in a two-dimensional or more array. It is an algorithm that expands an area, sets the expanded pixel as a pixel again as a reference point, and repeats until the area is no longer expanded. Therefore, in order to perform a flood-fill algorithm, it is necessary to set a starting reference pixel.

기준 픽셀을 설정하는 방법을 살펴보면, 먼저 궤양영역 검출부(130)는 관심영역에 히스토그램(H)을 구한다. Looking at the method of setting the reference pixel, first, the ulcer region detector 130 obtains a histogram H in the region of interest.

도 10에 도시된 바와 같이, 궤양영역 검출부(130)는 관심영역에 포함된 각 픽셀의 좌표 정보를 저장하는 배열을 생성한다. 이때, 각 배열에 저장되는 픽셀의 개수(

Figure 112020084287285-pat00024
)가 각 픽셀값의 확률(
Figure 112020084287285-pat00025
)이 된다. 관심영역에서는 명도가 낮은 배경에 해당하는 영역과 명도가 높은 조명영역을 제외하면 궤양에 해당하는 영역에 속한 픽셀의 값이 가장 높은 확률을 가지게 된다. 따라서, 궤양영역 검출부(130)는 배경에 해당하는 영역
Figure 112020084287285-pat00026
과 조명영역
Figure 112020084287285-pat00027
을 제거하여 수학식 5와 같이 새로운 히스토그램(H')을 획득한다. As shown in FIG. 10 , the ulcer region detector 130 creates an array storing coordinate information of each pixel included in the region of interest. At this time, the number of pixels stored in each array (
Figure 112020084287285-pat00024
) is the probability of each pixel value (
Figure 112020084287285-pat00025
) becomes In the region of interest, the value of the pixel belonging to the region corresponding to the ulcer has the highest probability, except for the region corresponding to the background with low brightness and the illuminated region with high brightness. Accordingly, the ulcer region detection unit 130 is a region corresponding to the background.
Figure 112020084287285-pat00026
and lighting area
Figure 112020084287285-pat00027
to obtain a new histogram (H') as in Equation (5).

Figure 112020084287285-pat00028
Figure 112020084287285-pat00028

그 다음, 궤양영역 검출부(130)는 획득한 새로운 히스토그램(H')을 기반으로 빈도수가 가장 큰 픽셀 값을 수학식 6을 이용하여 획득한다. Then, the ulcer area detector 130 obtains the pixel value with the highest frequency based on the acquired new histogram H' by using Equation (6).

Figure 112020084287285-pat00029
Figure 112020084287285-pat00029

궤양영역 검출부(130)는 획득한 픽셀값에 해당하는 복수의 픽셀들 중에서 하나의 픽셀을 랜덤으로 선택한다. The ulcer region detector 130 randomly selects one pixel from among a plurality of pixels corresponding to the acquired pixel value.

S242단계가 완료되면, 궤양영역 검출부(130)는 선택된 기준 픽셀과 인접한 픽셀간의 픽셀 차이값과 S241단계에서 획득한 임계값을 비교하여 궤양에 해당하는 영역을 확장한다(S243).When step S242 is completed, the ulcer area detector 130 expands the area corresponding to the ulcer by comparing the pixel difference value between the selected reference pixel and the adjacent pixel with the threshold value obtained in step S241 ( S243 ).

궤양영역 검출부(130)는 선택된 기준 픽셀을 중심으로 상하좌우의 4방향 또는 8방향으로 플러드 필(Flood-fill)을 진행한다. The ulcer region detection unit 130 performs flood-fill in four or eight directions, up, down, left, and right around the selected reference pixel.

예를 들어 설명하면, 도 11a에 도시된 바와 같이, 4방향으로 플러드 필(Flood-fill) 영역을 확장하고 임계값이 3이라고 가정한다. 그러면, 궤양영역 검출부(130)는 픽셀값이 "1"로 나타내는 기준 픽셀을 중심으로 이웃하는 주변의 픽셀, 즉 픽셀값이 각각 "6", "2", "3","5"를 가진 인접한 픽셀과의 차이값을 산출하고, 기준 픽셀과의 픽셀 차이값이 3보다 작은 픽셀 방향으로 영역을 확장한다. 여기서 확장되는 픽셀은 도 11a에서 픽셀값 "2"와 "3"을 가진 픽셀에 해당된다. For example, as shown in FIG. 11A , it is assumed that a flood-fill region is expanded in four directions and the threshold value is 3. As shown in FIG. Then, the ulcer region detection unit 130 detects neighboring pixels with a pixel value of “1” as the center, that is, pixels having “6”, “2”, “3”, and “5”, respectively. A difference value with respect to an adjacent pixel is calculated, and a region is extended in a direction of a pixel having a pixel difference value less than 3 from the reference pixel. Here, the extended pixels correspond to pixels having pixel values “2” and “3” in FIG. 11A .

또한, 도 11b에 도시된 바와 같이, 8방향으로 플러드 필(Flood-fill) 영역을 확장하고 임계값이 3이라고 가정한다. 그러면, 궤양영역 검출부(130)는 픽셀값이 "1"로 나타내는 기준 픽셀을 중심으로 모든 방향에서 이웃하는 픽셀과의 차이값을 산출하고, 차이값이 3보다 작은 픽셀 방향으로 영역을 확장한다. 여기서 확장되는 픽셀은 도 11b에서 픽셀값 "3", "2" 및 "1"을 가진 픽셀에 해당된다. In addition, as shown in FIG. 11B , it is assumed that the flood-fill area is expanded in 8 directions and the threshold value is 3. Then, the ulcer region detection unit 130 calculates a difference value from a neighboring pixel in all directions around a reference pixel having a pixel value of “1”, and expands the region in the direction of a pixel having a difference value less than 3. Here, the expanded pixel corresponds to pixels having pixel values “3”, “2” and “1” in FIG. 11B .

궤양영역 검출부(130)는 더 이상 영역이 확장되지 않을 때까지 플러드 필(Flood-fill)을 반복적으로 수행하고, 확장이 완료된 상태에서의 궤양영역을 검출한다. The ulcer area detection unit 130 repeatedly performs flood-fill until the area is no longer expanded, and detects the ulcer area in a state where the expansion is completed.

S240단계가 완료되면, 출력부(140)는 검출된 궤양영역에 대한 윤곽선을 생성하고, 생성된 윤곽선을 안구영상의 원본에 표시하여 출력한다(S250).When step S240 is completed, the output unit 140 generates a contour line for the detected ulcer region, and displays the generated contour line on the original eye image (S250).

이하에서는 도 12 내지 15를 이용하여 S250단계에 대하여 더욱 구체적으로 설명한다. Hereinafter, step S250 will be described in more detail with reference to FIGS. 12 to 15 .

도 12는 도 2에 도시된 S250를 설명하기 위한 순서도이고, 도 13은 도 12에 도시된 S251단계에서 미검출 영역을 채워 보정된 영상을 출력한 상태를 나타내는 도면이고, 도 14는 도 12에 도시된 S252단계에서 모폴로지 연산을 수행한 상태를 나타내는 도면이고, 도 15는 도 12에 도시된 S253단계에서 검출된 윤관선을 원본영상에 표시한 결과를 나타내는 도면이다. 12 is a flowchart for explaining S250 shown in FIG. 2 , FIG. 13 is a view showing a state in which the corrected image is output by filling the undetected area in step S251 shown in FIG. 12 , and FIG. 14 is shown in FIG. It is a view showing a state in which the morphology operation is performed in step S252 shown, and FIG. 15 is a view showing the result of displaying the contour line detected in step S253 shown in FIG. 12 on the original image.

도 12에 도시된 바와 같이, 먼저 출력부(130)는 검출된 궤양 영역 내에 미 검출 영역이 포함되어 있는지 여부를 판단하고, 판단결과 미검출 영역이 포함되어 있으면 미 검출 영역에 해당하는 홀을 채운다(S251).As shown in FIG. 12 , the output unit 130 first determines whether an undetected area is included in the detected ulcer area, and if the undetected area is included as a result of the determination, the hole corresponding to the undetected area is filled. (S251).

부연하자면, 영상에 따라 궤양 중심부의 명암값이 다른 부분에 비해 마치 구멍이 뚫린 것처럼 검출되지 않는 현상이 발생될 수 있다. 따라서, 출력부(130)는 검출된 궤양 영역 내에 미 검출 영역이 포함되어 있는지의 여부를 판단한다. In other words, depending on the image, the contrast value of the center of the ulcer may not be detected as if there was a hole compared to other parts. Accordingly, the output unit 130 determines whether an undetected area is included in the detected ulcer area.

미 검출 영역이 포함된 것으로 판단되면, 출력부(130)는 관심영역과 동일한 크기를 가지며 배경색이 반전된 반전 영상을 생성한다. 그리고, 출력부(130)는 반전 영상의 각 모서리에 해당하는 점에서 임계값이 0인 플러드 필(Flood-fill) 알고리즘을 적용하여 영역을 확장한다. 출력부(130)는 더 이상 영역이 확장되지 않을 때까지 플러드 필(Flood-fill)을 반복 수행하여 궤양 영역 내부에 남아있던 홀을 채운다. 그러면, 도 13에 도시된 바와 같이, 출력부(130)는 궤양영역 내부에 남아있던 구멍이 메워져 보다 정확한 결과영상을 도출할 수 있다. When it is determined that the undetected region is included, the output unit 130 generates an inverted image having the same size as the ROI and inverted background color. In addition, the output unit 130 expands the area by applying a flood-fill algorithm having a threshold value of 0 at points corresponding to corners of the inverted image. The output unit 130 fills the hole remaining inside the ulcer area by repeatedly performing flood-fill until the area is no longer expanded. Then, as shown in FIG. 13 , the output unit 130 fills in the hole remaining inside the ulcer area, so that a more accurate result image can be derived.

그 다음, 출력부(130)는 궤양 영역의 경계부분에 포함된 노이즈를 제거하고 스무딩 처리를 수행한다(S252).Next, the output unit 130 removes noise included in the boundary portion of the ulcer region and performs a smoothing process (S252).

출력부(130)는 궤양 영역의 범위를 축소시키는 침식연산과 궤양 영역의 범위를 확대시키는 팽창 연산을 각각 변갈아 수행하는 모폴로지 연산을 수행하여 궤양 영역의 크기 변화 없이 경계 부분의 잡음을 제거한다. The output unit 130 performs a morphological operation of alternately performing an erosion operation for reducing the range of the ulcer area and a dilation operation for expanding the range of the ulcer area, thereby removing noise at the boundary without changing the size of the ulcer area.

자세히는, 출력부(130)는 먼저 침식 연산을 수행한 후 팽창 연산을 수행하여 배경에 해당하는 영역과 궤양 영역 사이의 노이즈를 없앤다. 그 다음, 출력부(130)는 팽창연산을 수행한 후 침식연산을 수행하여 궤양 역영 내부에 있는 작은 틈을 메운다. 도 14에 도시된 바와 같이, 출력부(130)는 연산의 반복적 수행을 통해 궤양영역의 경계부분에 스무딩 효과를 주고 내부의 미세한 틈을 메움으로써 궤양 영역의 경계검출에 적합한 결과를 도출한다. In detail, the output unit 130 removes noise between the area corresponding to the background and the ulcer area by first performing an erosion operation and then an expansion operation. Then, the output unit 130 fills a small gap in the ulcer area by performing an erosion operation after performing an expansion operation. As shown in FIG. 14 , the output unit 130 provides a smoothing effect to the boundary portion of the ulcer region through repeated execution of the operation and fills in minute gaps therein, thereby deriving a result suitable for detecting the boundary of the ulcer region.

마지막으로, 출력부(130)는 모폴로지 연산이 완료된 궤양 영역으로부터 윤곽선을 검출하고, 검출된 윤관선을 안구영상의 원본에 표시하여 출력한다(S253).Finally, the output unit 130 detects a contour line from the ulcer region on which the morphological calculation has been completed, and displays the detected canal line on the original eye image (S253).

도 15에 도시된 바와 같이, 출력부(130)는 캐니 엣지 디텍션(Canny Edge Detection) 알고리즘을 이용하여 궤양영역의 윤곽선을 검출한다. 그리고, 출력부(130)는 검출된 윤곽선을 안구영상의 원본에 표시하여 출력한다. As shown in FIG. 15 , the output unit 130 detects the contour of the ulcer area using a Canny Edge Detection algorithm. Then, the output unit 130 displays the detected outline on the original of the eyeball image and outputs it.

이와 같이 본 발명에 따르면, 랜덤 기준점 선정 알고리즘에 의해 선정된 기준점을 중심으로 Otsu 방법을 통해 도출된 임계값을 이용하여 영역을 확장함으로써 궤양 영역을 검출하는데 있어서 객관적이고 정확도를 높일 수 있다. 또한, 본 발명에 따르면, 사용자의 개입을 최소화하여 객관적인 결과를 도출할 수 있고, 진료목적에 있어 향상된 신뢰도로 진료결과를 의료진과 환자에게 제공할 수 있다. As described above, according to the present invention, it is possible to increase the objective and accuracy in detecting the ulcer area by expanding the area using the threshold value derived through the Otsu method around the reference point selected by the random reference point selection algorithm. In addition, according to the present invention, objective results can be derived by minimizing user intervention, and medical treatment results can be provided to medical staff and patients with improved reliability for the purpose of treatment.

본 발명은 도면에 도시된 실시예를 참고로 하여 설명되었으나 이는 예시적인 것에 불과하며, 당해 기술이 속하는 분야에서 통상의 지식을 가진 자라면 이로부터 다양한 변형 및 균등한 타 실시예가 가능하다는 점을 이해할 것이다. 따라서 본 발명의 진정한 기술적 보호범위는 아래의 특허청구범위의 기술적 사상에 의하여 정해져야 할 것이다.Although the present invention has been described with reference to the embodiment shown in the drawings, this is merely exemplary, and it will be understood by those skilled in the art that various modifications and equivalent other embodiments are possible therefrom. will be. Therefore, the true technical protection scope of the present invention should be determined by the technical spirit of the following claims.

100 : 각막궤양 검출 장치
110 : 영상입력부
120 : 전처리부
130 : 궤양영역 검출부
140 : 출력부
100: corneal ulcer detection device
110: video input unit
120: preprocessor
130: ulcer area detection unit
140: output unit

Claims (20)

영상 처리를 기반으로 하는 각막궤양 검출 장치에 있어서,
검사 대상자의 각막을 촬영한 안구영상을 입력받는 영상입력부,
상기 입력된 안구영상으로부터 관심영역을 추출하고, 추출된 관심영역에 포함되는 각 픽셀의 RGB값을 이용하여 배경에 해당하는 영역과 궤양에 해당하는 영역 사이의 경계가 구분되도록 영상의 전처리 과정을 수행하는 전처리부,
관심영역 내의 픽셀 값 분포에 따라 임계값을 도출하고, 도출된 임계값을 이용하여 기준 픽셀을 중심으로 궤양에 해당하는 영역을 확장하는 플러드 필(Flood-fill) 알고리즘을 적용하여 궤양영역을 검출하는 궤양영역 검출부, 그리고
검출된 상기 궤양영역에 대한 윤곽선을 생성하고, 생성된 윤곽선을 안구영상의 원본에 표시하여 출력하는 출력부를 포함하는 각막궤양 검출 장치.
In the corneal ulcer detection device based on image processing,
An image input unit for receiving an ocular image obtained by photographing the cornea of a subject to be examined;
A region of interest is extracted from the inputted eye image, and the image preprocessing process is performed so that the boundary between the region corresponding to the background and the region corresponding to the ulcer is distinguished using the RGB values of each pixel included in the extracted region of interest. preprocessing unit,
A threshold value is derived according to the distribution of pixel values in the region of interest, and a flood-fill algorithm is applied to expand the region corresponding to the ulcer around the reference pixel using the derived threshold to detect the ulcer region. an ulcer area detection unit, and
and an output unit for generating an outline for the detected ulcer region, and displaying the generated outline on an original eye image.
제1항에 있어서,
상기 전처리부는,
상기 관심영역에 해당하는 각각의 픽셀을 회색조(Gray scale) 형태로 변환한 다음, 상기 회색조 형태로 변환된 관심영역에 히스토그램 평활화를 수행하는 각막궤양 검출 장치.
According to claim 1,
The preprocessor is
A corneal ulcer detection apparatus for converting each pixel corresponding to the region of interest into a gray scale form, and then performing histogram smoothing on the region of interest converted to the gray scale form.
제2항에 있어서,
상기 전처리부는,
하기의 수학식을 이용하여 회색조 형태로 변환하는 각막궤양 검출 장치:
Figure 112020084287285-pat00030
3. The method of claim 2,
The preprocessor is
A corneal ulcer detection device that converts to a grayscale form using the following equation:
Figure 112020084287285-pat00030
제2항에 있어서,
상기 전처리부는,
상기 히스토그램 평활화가 적용된 관심영역에 임의의 크기를 가지는 필터를 적용하여 필터내의 픽셀 값들을 오름차순 또는 내림차순으로 정렬한 다음, 복수의 픽셀 값들의 중간 픽셀값을 이용하여 관심영역내의 노이즈를 제거하고, 감마 보정 처리하여 궤양에 해당하는 영역의 경계를 단순화하는 각막궤양 검출 장치.
3. The method of claim 2,
The preprocessor is
After applying a filter having an arbitrary size to the region of interest to which the histogram smoothing has been applied, the pixel values in the filter are arranged in ascending or descending order, and then noise in the region of interest is removed using an intermediate pixel value of a plurality of pixel values, and gamma A corneal ulcer detection device that simplifies the boundary of the area corresponding to the ulcer by correcting it.
제1항에 있어서,
상기 궤양영역 검출부는,
Otsu 알고리즘을 이용하여 상기 관심영역 내의 픽셀 값 분포에 따라 임계값을 설정한 다음, 상기 관심영역에 포함된 각 픽셀의 좌표정보를 이용하여 기준점을 획득하고, 상기 획득한 기준점에 대응하는 기준 픽셀과 인접한 픽셀간의 픽셀 차이값과 상기 임계값을 비교하여 궤양에 해당하는 영역을 확장하는 각막궤양 검출 장치.
According to claim 1,
The ulcer area detection unit,
After setting a threshold according to the distribution of pixel values in the region of interest using the Otsu algorithm, a reference point is obtained using coordinate information of each pixel included in the region of interest, and a reference pixel corresponding to the obtained reference point is A corneal ulcer detection apparatus for expanding an area corresponding to an ulcer by comparing the pixel difference value between adjacent pixels with the threshold value.
제5항에 있어서,
상기 궤양영역 검출부는,
Otsu 알고리즘에 따라 상기 관심영역에 포함된 픽셀을 궤양에 해당하는 영역과 배경에 해당하는 영역으로 군집화하고, 상기 궤양에 해당하는 영역의 분산값과 배경에 해당하는 영역의 분산값의 차이가 최대가 되는 픽셀값을 상기 임계값으로 설정하는 각막궤양 검출 장치.
6. The method of claim 5,
The ulcer area detection unit,
According to the Otsu algorithm, pixels included in the region of interest are clustered into an area corresponding to an ulcer and an area corresponding to the background, and the difference between the variance value of the area corresponding to the ulcer and the variance value of the area corresponding to the background is maximum. A corneal ulcer detection device for setting the pixel value to be the threshold value.
제6항에 있어서,
상기 분산값은,
하기의 수학식으로 이용하여 산출되는 각막궤양 검출 장치:
Figure 112020084287285-pat00031

여기서,
Figure 112020084287285-pat00032
는 임의의 픽셀이 궤양에 해당하는 영역에 속할 확률이고,
Figure 112020084287285-pat00033
은 임의의 픽셀이 배경에 해당하는 영역에 속할 확률이고,
Figure 112020084287285-pat00034
은 궤양에 해당하는 영역내 픽셀값의 평균을 나타내고,
Figure 112020084287285-pat00035
은 배경에 해당하는 영역내 픽셀값의 평균을 나타내며,
Figure 112020084287285-pat00036
은 전체 영상의 픽셀값의 평균을 나타낸다.
7. The method of claim 6,
The variance value is
Corneal ulcer detection device calculated using the following equation:
Figure 112020084287285-pat00031

here,
Figure 112020084287285-pat00032
is the probability that any pixel belongs to the area corresponding to the ulcer,
Figure 112020084287285-pat00033
is the probability that a random pixel belongs to the region corresponding to the background,
Figure 112020084287285-pat00034
represents the average of pixel values in the area corresponding to the ulcer,
Figure 112020084287285-pat00035
represents the average of pixel values in the area corresponding to the background,
Figure 112020084287285-pat00036
represents the average of pixel values of the entire image.
제5항에 있어서,
상기 궤양영역 검출부는,
상기 관심영역에 포함된 각 픽셀의 좌표 정보를 저장하는 배열을 생성한 다음, 히스토그램을 수행하여 빈도수가 가장 큰 픽셀 값에 해당하는 복수의 픽셀들 중에서 하나의 픽셀을 랜덤으로 선택하여 기준픽셀로 설정하는 각막궤양 검출 장치.
6. The method of claim 5,
The ulcer area detection unit,
An array for storing the coordinate information of each pixel included in the region of interest is created, and then a histogram is performed to randomly select one pixel from among a plurality of pixels corresponding to the pixel value with the highest frequency and set it as a reference pixel Corneal ulcer detection device.
제1항에 있어서,
상기 출력부는,
상기 검출된 궤양 영역 내에 미 검출 영역이 포함되어 있는지 여부를 판단하고, 판단결과 미 검출 영역이 포함되어 있으면 상기 관심영역과 동일한 크기를 가지며 배경색이 반전된 반전 영상을 생성하고,
상기 반전 영상의 각 모서리에 해당하는 점에서 임계값이 0인 플러드 필(Flood-fill) 알고리즘을 적용하여 미 검출 영역에 해당하는 홀을 채우는 각막궤양 검출 장치.
According to claim 1,
the output unit,
It is determined whether an undetected region is included in the detected ulcer region, and if the determination result includes an undetected region, an inverted image having the same size as the region of interest and inverted background color is generated,
A corneal ulcer detection device that fills a hole corresponding to an undetected area by applying a flood-fill algorithm with a threshold value of 0 at a point corresponding to each corner of the inversion image.
제9항에 있어서,
상기 출력부는,
상기 궤양 영역에 모폴로지 연산에 해당하는 침식 연산과 팽창 연산을 번갈아 수행하여 상기 궤양영역의 경계부분에 포함된 노이즈를 제거하고 경계부분을 스무딩 처리하며, 캐니 엣지 디텍션(Canny Edge Detection) 알고리즘을 이용하여 궤양영역의 윤곽선을 생성하는 각막궤양 검출 장치.
10. The method of claim 9,
the output unit,
By alternately performing an erosion operation and a dilation operation corresponding to the morphological operation on the ulcer region, noise included in the boundary portion of the ulcer region is removed and the boundary portion is smoothed, and the Canny Edge Detection algorithm is used to A corneal ulcer detection device that creates the outline of the ulcer area.
영상 처리를 기반으로 하는 각막궤양 검출 장치를 이용한 각막 궤양 검출 방법에 있어서,
검사 대상자의 각막을 촬영한 안구영상을 입력받는 단계,
상기 입력된 안구영상으로부터 관심영역을 추출하고, 추출된 관심영역에 포함되는 각 픽셀의 RGB값을 이용하여 배경에 해당하는 영역과 궤양에 해당하는 영역 사이의 경계가 구분되도록 영상의 전처리 과정을 수행하는 단계,
관심영역 내의 픽셀 값 분포에 따라 임계값을 도출하고, 도출된 임계값을 이용하여 기준 픽셀을 중심으로 궤양에 해당하는 영역을 확장하는 플러드 필(Flood-fill) 알고리즘을 적용하여 궤양영역을 검출하는 단계, 그리고
검출된 상기 궤양영역에 대한 윤곽선을 생성하고, 생성된 윤곽선을 안구영상의 원본에 표시하여 궤양영역을 출력하는 단계를 포함하는 각막궤양 검출 방법.
In the corneal ulcer detection method using a corneal ulcer detection device based on image processing,
receiving an ocular image obtained by photographing the cornea of a test subject;
A region of interest is extracted from the inputted eye image, and the image preprocessing process is performed so that the boundary between the region corresponding to the background and the region corresponding to the ulcer is distinguished using the RGB values of each pixel included in the extracted region of interest. step to do,
A threshold value is derived according to the distribution of pixel values in the region of interest, and a flood-fill algorithm is applied to expand the region corresponding to the ulcer around the reference pixel using the derived threshold to detect the ulcer region. step, and
and generating an outline for the detected ulcer area, and outputting the ulcer area by displaying the generated outline on an original eye image.
제11항에 있어서,
상기 전처리 과정을 수행하는 단계는,
상기 관심영역에 해당하는 각각의 픽셀을 회색조(Gray scale) 형태로 변환하는 단계, 그리고
상기 회색조 형태로 변환된 관심영역에 히스토그램 평활화를 수행하는 단계를 포함하는 각막궤양 검출 방법.
12. The method of claim 11,
The step of performing the pre-processing is,
converting each pixel corresponding to the region of interest into a gray scale form; and
and performing histogram smoothing on the region of interest converted to the grayscale form.
제12항에 있어서,
상기 회색조 형태로 변환하는 단계는,
하기의 수학식을 이용하여 각각의 픽셀값을 산출하는 각막궤양 검출 방법:
Figure 112021135590190-pat00037
13. The method of claim 12,
The step of converting to the grayscale form is,
A corneal ulcer detection method that calculates each pixel value using the following equation:
Figure 112021135590190-pat00037
제12항에 있어서,
상기 전처리 과정을 수행하는 단계는,
상기 히스토그램 평활화가 수행된 관심영역에 임의의 크기를 가지는 필터를 적용하여 필터내의 픽셀 값들을 오름차순 또는 내림차순으로 정렬한 다음, 복수의 픽셀 값들의 중간 픽셀값을 이용하여 관심영역내의 노이즈를 제거하는 단계, 그리고
상기 노이즈가 제거된 관심영역을 감마 보정 처리하여 상기 궤양에 해당하는 영역의 경계를 단순화하는 단계를 포함하는 각막궤양 검출 방법.
13. The method of claim 12,
The step of performing the pre-processing is,
applying a filter having an arbitrary size to the region of interest on which the histogram smoothing has been performed, arranging the pixel values in the filter in ascending or descending order, and then removing noise in the region of interest using an intermediate pixel value of a plurality of pixel values , And
and gamma-correcting the region of interest from which the noise has been removed to simplify the boundary of the region corresponding to the ulcer.
제11항에 있어서,
상기 궤양영역을 검출하는 단계는,
Otsu 알고리즘을 이용하여 상기 관심영역 내의 픽셀 값 분포에 따라 임계값을 설정하는 단계,
상기 관심영역에 포함된 각 픽셀의 좌표정보를 이용하여 기준점을 획득하는 단계, 그리고
상기 획득한 기준점에 대응하는 기준픽셀과 인접한 픽셀간의 픽셀 차이값과 상기 임계값을 비교하여 궤양에 해당하는 영역을 확장하는 단계를 포함하는 각막궤양 검출 방법.
12. The method of claim 11,
The step of detecting the ulcer area comprises:
setting a threshold according to the distribution of pixel values in the region of interest using the Otsu algorithm;
obtaining a reference point using coordinate information of each pixel included in the region of interest; and
and comparing a pixel difference value between a reference pixel corresponding to the obtained reference point and an adjacent pixel with the threshold value to expand an area corresponding to the ulcer.
제14항에 있어서,
상기 궤양영역을 검출하는 단계는,
Otsu 알고리즘에 따라 상기 관심영역에 포함된 픽셀을 궤양에 해당하는 영역과 배경에 해당하는 영역으로 군집화하고, 상기 궤양에 해당하는 영역의 분산값과 배경에 해당하는 영역의 분산값의 차이가 최대가 되는 픽셀값을 상기 임계값으로 설정하는 각막궤양 검출 방법.
15. The method of claim 14,
The step of detecting the ulcer area comprises:
According to the Otsu algorithm, pixels included in the region of interest are clustered into an area corresponding to an ulcer and an area corresponding to the background, and the difference between the variance value of the area corresponding to the ulcer and the variance value of the area corresponding to the background is maximum. A corneal ulcer detection method for setting the pixel value to be the threshold value.
제16항에 있어서,
상기 분산값은,
하기의 수학식으로 이용하여 산출되는 각막궤양 검출 방법:
Figure 112021135590190-pat00038

여기서,
Figure 112021135590190-pat00039
는 임의의 픽셀이 궤양에 해당하는 영역에 속할 확률이고,
Figure 112021135590190-pat00040
은 임의의 픽셀이 배경에 해당하는 영역에 속할 확률이고,
Figure 112021135590190-pat00041
은 궤양에 해당하는 영역내 픽셀값의 평균을 나타내고,
Figure 112021135590190-pat00042
은 배경에 해당하는 영역내 픽셀값의 평균을 나타내며,
Figure 112021135590190-pat00043
은 전체 영상의 픽셀값의 평균을 나타낸다.
17. The method of claim 16,
The variance value is
Corneal ulcer detection method calculated using the following formula:
Figure 112021135590190-pat00038

here,
Figure 112021135590190-pat00039
is the probability that any pixel belongs to the area corresponding to the ulcer,
Figure 112021135590190-pat00040
is the probability that a random pixel belongs to the region corresponding to the background,
Figure 112021135590190-pat00041
represents the average of pixel values in the area corresponding to the ulcer,
Figure 112021135590190-pat00042
represents the average of pixel values in the area corresponding to the background,
Figure 112021135590190-pat00043
represents the average of pixel values of the entire image.
제15항에 있어서,
상기 기준점을 획득하는 단계는,
상기 관심영역에 포함된 각 픽셀의 위치 정보를 저장하는 배열을 생성한 다음, 히스토그램을 수행하여 빈도수가 가장 큰 픽셀 값에 해당하는 복수의 픽셀들 중에서 하나의 픽셀을 랜덤으로 선택하여 기준 픽셀로 설정하는 각막궤양 검출 방법.
16. The method of claim 15,
The step of obtaining the reference point is
An array for storing the position information of each pixel included in the region of interest is created, and then a histogram is performed to randomly select one pixel from among a plurality of pixels corresponding to the pixel value with the highest frequency and set it as a reference pixel A method for detecting corneal ulcers.
제11항에 있어서,
상기 궤양영역을 출력하는 단계는,
상기 검출된 궤양 영역 내에 미 검출 영역이 포함되어 있는지의 여부를 판단하고, 판단결과 미 검출 영역이 포함되어 있으면 상기 관심영역과 동일한 크기를 가지며 배경색이 반전된 반전 영상을 생성하는 단계, 그리고
상기 반전 영상의 각 모서리점에서 임계값이 0인 플러드 필(Flood-fill) 알고리즘을 적용하여 미 검출 영역에 해당하는 홀을 채우는 단계를 포함하는 각막궤양 검출 방법.
12. The method of claim 11,
The step of outputting the ulcer region comprises:
determining whether an undetected area is included in the detected ulcer area, and if the determination result includes an undetected area, generating an inverted image having the same size as the area of interest and inverted background color; and
and filling a hole corresponding to an undetected area by applying a flood-fill algorithm having a threshold value of 0 at each corner point of the inversion image.
제18항에 있어서,
상기 궤양영역을 출력하는 단계는,
상기 궤양 영역에 모폴로지 연산에 해당하는 침식연산과 팽창 연산을 번갈아 수행하여 궤양영역의 경계부분에 포함된 노이즈를 제거하고 경계부분을 스무딩 처리하며, 캐니 엣지 디텍션(Canny Edge Detection) 알고리즘을 이용하여 궤양영역의 윤곽선을 생성하는 단계를 더 포함하는 각막궤양 검출 방법.
19. The method of claim 18,
The step of outputting the ulcer region comprises:
The erosion operation and dilation operation corresponding to the morphological operation are alternately performed on the ulcer region to remove noise included in the boundary part of the ulcer region and smooth the boundary part, and the ulcer using Canny Edge Detection algorithm Corneal ulcer detection method further comprising the step of generating an outline of the region.
KR1020200100471A 2020-08-11 2020-08-11 Corneal Ulcer Region Detection Apparatus Using Image Processing and Method Thereof KR102380560B1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
KR1020200100471A KR102380560B1 (en) 2020-08-11 2020-08-11 Corneal Ulcer Region Detection Apparatus Using Image Processing and Method Thereof
PCT/KR2020/011726 WO2022034955A1 (en) 2020-08-11 2020-09-01 Apparatus for detecting corneal ulcer on basis of image processing, and method therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020200100471A KR102380560B1 (en) 2020-08-11 2020-08-11 Corneal Ulcer Region Detection Apparatus Using Image Processing and Method Thereof

Publications (2)

Publication Number Publication Date
KR20220020033A KR20220020033A (en) 2022-02-18
KR102380560B1 true KR102380560B1 (en) 2022-03-31

Family

ID=80247011

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020200100471A KR102380560B1 (en) 2020-08-11 2020-08-11 Corneal Ulcer Region Detection Apparatus Using Image Processing and Method Thereof

Country Status (2)

Country Link
KR (1) KR102380560B1 (en)
WO (1) WO2022034955A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102587679B1 (en) * 2023-04-07 2023-10-12 주식회사 동진전기통신 Solar panel abnormality detection device and method thereof

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9492322B2 (en) * 2009-11-16 2016-11-15 Alcon Lensx, Inc. Imaging surgical target tissue by nonlinear scanning
JP6363275B2 (en) * 2017-07-13 2018-07-25 株式会社トプコン Ophthalmic equipment
JP7043759B2 (en) * 2017-09-01 2022-03-30 株式会社ニデック Ophthalmic equipment and cataract evaluation program
JP7148114B2 (en) * 2018-06-12 2022-10-05 株式会社トーメーコーポレーション ophthalmic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
전자공학회논문지, 2019년, 56권, 9호, 페이지 53-66*

Also Published As

Publication number Publication date
KR20220020033A (en) 2022-02-18
WO2022034955A1 (en) 2022-02-17

Similar Documents

Publication Publication Date Title
Figueiredo et al. Automated lesion detectors in retinal fundus images
EP2188779B1 (en) Extraction method of tongue region using graph-based approach and geometric properties
Khalil et al. Detection of glaucoma using cup to disc ratio from spectral domain optical coherence tomography images
JP3143819B2 (en) Eyelid opening detector
JP2023021440A (en) Detection of pathologies in ocular images
US11810293B2 (en) Information processing device, information processing method, and computer program
JP2012016453A (en) Image processing apparatus, image processing method, and image processing program
CN112164043A (en) Method and system for splicing multiple fundus images
KR20160118037A (en) Apparatus and method for detecting lesion from medical image automatically
Hatanaka et al. Improvement of automatic hemorrhage detection methods using brightness correction on fundus images
Shabbir et al. Automatic cotton wool spots extraction in retinal images using texture segmentation and Gabor wavelet
Naz et al. Glaucoma detection in color fundus images using cup to disc ratio
Khan et al. An efficient technique for retinal vessel segmentation and denoising using modified ISODATA and CLAHE
Uribe-Valencia et al. Automated Optic Disc region location from fundus images: Using local multi-level thresholding, best channel selection, and an Intensity Profile Model
KR102380560B1 (en) Corneal Ulcer Region Detection Apparatus Using Image Processing and Method Thereof
Kumar et al. Automatic optic disc segmentation using maximum intensity variation
CN109447948B (en) Optic disk segmentation method based on focus color retina fundus image
KR20210050790A (en) Apparatus and methods for classifying neurodegenerative diseases image of amyloid-positive based on deep-learning
JP7019104B2 (en) Threshold learning method
KR102282334B1 (en) Method for optic disc classification
Lodin et al. Retracted: Design of an iris-based medical diagnosis system
Martins et al. Evaluation of retinal vessel segmentation methods for microaneurysms detection
Chandrappa et al. Segmentation of retinal nerve fiber layer in optical coherence tomography (OCT) images using statistical region merging technique for glaucoma screening
JP7334922B1 (en) Image processing device, image processing method and program
Krishna et al. Retinal vessel segmentation techniques

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right