Square Root

1 개요

이미지에 제곱근 연산을 수행하는 알고리즘입니다.
Operand가 없는 단항 연산입니다.

2 알고리즘 상세 설명

IDst(x,y)=ISrc(x,y)\large I_{Dst}(x,y) = \sqrt{I_{Src}(x,y)}

원본 픽셀값이 음수인 경우, Signed 정수형 포맷에서 해당 포맷의 표현 가능한 최댓값으로 처리되며, 실수형 포맷 이미지에서는 nan이 출력됩니다.

Source Value Destination Value
Source Image Destination Image
Fig. Source and Destination Values of Square Root

3 예제 코드

COperationSquareRoot OperationSquareRoot;

CFLImage fliSourceImage;
CFLImage fliDestinationImage;

OperationSquareRoot.SetSourceImage(fliSourceImage);
OperationSquareRoot.SetDestinationImage(fliDestinationImage);

OperationSquareRoot.Execute();
COperationSqaureRoot operationSqaureRoot = new COperationSqaureRoot();

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

operationSqaureRoot.SetSourceImage(ref fliSourceImage);
operationSqaureRoot.SetDestinationImage(ref fliDestinationImage);

operationSqaureRoot.Execute();