Logical Not

1 개요

이미지를 스칼라 또는 다른 이미지와 Logical Not 연산을 수행하는 알고리즘입니다.

2 알고리즘 상세 설명

이미지에 각 Channel 마다 Logical Not 연산을 수행합니다. 입력은 0이 False이고 나머지 값이 True이고 출력은 0이 False이고 최대 값이 True가 됩니다.

LogicalNot(n)={0,n0MAX,n=0LogicalNot(n) = \begin{cases} 0, & n\neq0\\ MAX, & n=0 \end{cases}

Source Value Destination Value
Source Image Destination Image
Fig. Source and Destination values of Logical Not

이미지가 Floating Point인 경우 1이 출력의 True가 됩니다.

LogicalNot(n)={0,n01,n=0LogicalNot(n) = \begin{cases} 0, & n\neq0\\ 1, & n=0 \end{cases}

Source Value Destination Value
Source Image Destination Image
Fig. Floating Point Source and Destination values of Logical Not

Source Value Destination Value
Source Image Destination Image
Fig. Image Results

3 예제 코드

COperationLogicalNot operationLogicalNot;

CFLImage fliSourceImage;
CFLImage fliDestinationImage;

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

operationLogicalNot.Execute();
COperationLogicalNot operationLogicalNot = new COperationLogicalNot();

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

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

operationLogicalNot.Execute();