Complex Divide

1 개요

이미지 혹은 스칼라 값을 사용하여 복소수 나눗셈을 행하는 알고리즘입니다.

2 알고리즘 상세 설명

Source Value Operand Value Destination Value
Source Image Operation Image Destination Image
복소수의 나눗셈은 다음 식으로 계산됩니다.

(a+bi)÷(c+di)=(ac+bd)+(ad+bc)ic2+d2(a + bi) \div (c + di) = \frac{(ac + bd) + (-ad + bc)i}{c^2 + d^2}

연산은 1, 2채널 이미지에 한해 가능합니다. 2채널 이미지에 대해, 각 픽셀의 값은 첫 번째 채널의 값은 실수부, 두 번째 채널의 값은 허수부로 해석하여 진행됩니다. 만일 이미지가 1채널 이미지라면, 허수부를 0으로 해석합니다. 입력된 Scalar의 차원이 1인 경우 입력 값을 실수로, 허수를 0으로 연산을 진행합니다.

3 예제

COperationComplexDivide operationComplexDivide;

CFLImage fliSourceImage;
fliSourceImage.Load(L"2ChU8.flif");
operationComplexDivide.SetSourceImage(fliSourceImage);

CFLImage fliDestinationImage;
operationComplexDivide.SetDestinationImage(fliDestinationImage);

CMultiVar<double> mvScalar(1.000000,-1.000000);
operationComplexDivide.SetScalarValue(mvScalar);

operationComplexDivide.Execute();
COperationComplexDivide operationComplexDivide = new COperationComplexDivide();

CFLImage fliSourceImage = new CFLImage();
fliSourceImage.Load("2ChU8.flif");
operationComplexDivide.SetSourceImage(ref fliSourceImage);

CFLImage fliDestinationImage = new CFLImage();
operationComplexDivide.SetDestinationImage(ref fliDestinationImage);

CMultiVar<double> mvScalar = new CMultiVar<double>(1.000000,-1.000000);
operationComplexDivide.SetScalarValue(mvScalar);

operationComplexDivide.Execute();