Subtract

1 개요

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

2 알고리즘 상세 설명

이미지를 스칼라 또는 다른 이미지와 각 Channel 마다 뺄셈 연산을 수행합니다.

Source Value Operand Value Destination Value
Source Image Operation Image Destination Image
Fig. Source, Operand and Destination values of Subtract

3 예제 코드

Scalar 연산

COperationSubtract operationSubtract;

CFLImage fliSourceImage;
CFLImage fliDestinationImage;
CMultiVar<double> mulVarScalar;

operationSubtract.SetSourceImage(fliSourceImage);
operationSubtract.SetDestinationImage(fliDestinationImage);
operationSubtract.SetOperationSource(EOperationSource_Scalar);
operationSubtract.SetScalarValue(mulVarScalar);

operationSubtract.Execute();
COperationSubtract operationSubtract = new COperationSubtract();

CFLImage fliSourceImage = new CFLImage();
CFLImage fliDestinationImage = new CFLImage();
CMultiVar<double> mulVarScalar = new CMultiVar<double>();

operationSubtract.SetSourceImage(ref fliSourceImage);
operationSubtract.SetDestinationImage(ref fliDestinationImage);
operationSubtract.SetOperationSource(EOperationSource.Scalar);
operationSubtract.SetScalarValue(mulVarScalar);

operationSubtract.Execute();

Image 연산

COperationSubtract operationSubtract;

CFLImage fliSourceImage;
CFLImage fliOperandImage;
CFLImage fliDestinationImage;

operationSubtract.SetSourceImage(fliSourceImage);
operationSubtract.SetOperandImage(fliOperandImage);
operationSubtract.SetDestinationImage(fliDestinationImage);
operationSubtract.SetOperationSource(EOperationSource_Image);

operationSubtract.Execute();
COperationSubtract operationSubtract = new COperationSubtract();

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

operationSubtract.SetSourceImage(ref fliSourceImage);
operationSubtract.SetOperandImage(ref fliOperandImage);
operationSubtract.SetDestinationImage(ref fliDestinationImage);
operationSubtract.SetOperationSource(EOperationSource.Image);

operationSubtract.Execute();