Hysteresis Threshold

1 개요

전역 이중 임계값과 지역 연결성을 통해 이미지를 이진화하는 알고리즘입니다.

2 알고리즘 상세 설명

High Threshold 를 통과한 강한 강도의 픽셀은 항상 유지하며, 강한 강도의 픽셀과 연결된 중간 강도의 픽셀도 함께 유지합니다. 연결성은 인근 8 픽셀에 있을 시 연결되었다고 판단하며, 연결된 길이가 Max Length 이하인 픽셀들만 함께 유지됩니다.

Output Mode 설정을 통하여 이진화, 회색조, 원본 색상 중 원하는 방식의 출력을 얻을 수 있습니다.

Source Image Destination Image
Source Image Destination Image
Fig. Source and Destination images of Hysteresis Threshold

3 파라미터 설정 및 사용 방법

동작을 위한 최소한의 기본 설정 파라미터는 아래와 같습니다.

4 예제 코드

CHysteresisThreshold ht;

CFLImage fliSourceImage;
CFLImage fliDestinationImage;

ht.SetSourceImage(fliSourceImage);
ht.SetDestinationImage(fliDestinationImage);
ht.SetMaxLength(100);
ht.SetOutputMode(CHysteresisThreshold::EOutputMode_Binary);
ht.SetLogicalConditionOfChannels(ELogicalConditionOfChannels_And);
ht.SetLowThreshold(140);
ht.SetHighThreshold(190);

ht.Execute();
CHysteresisThreshold ht = new CHysteresisThreshold();

CFLImage fliSourceImage = new CFLImage();
CFLImage fliDestinationImage = new CFLImage();

ht.SetSourceImage(ref fliSourceImage);
ht.SetDestinationImage(ref fliDestinationImage);
ht.SetMaxLength(100);
ht.SetOutputMode(CHysteresisThreshold.EOutputMode.Binary);
ht.SetLogicalConditionOfChannels(ELogicalConditionOfChannels.And);
ht.SetLowThreshold(140);
ht.SetHighThreshold(190);

ht.Execute();

5 기타 사항

Supported Feature

Supported Format