Fig. Source, Operand and Destination values of Scaled Divide
a가 float 혹은 double인 경우 MAX를 1로 설정하여 일반적인 나누기 연산을 실행합니다.
Source Value
Operand Value
Destination Value
Fig. Floating Source, Operand and Destination values of Scaled Divide
나누는 값이 0이고 a가 float/double이 아닌 경우 a가 양수이면 최대 값, a가 음수이면 최소 값, a가 0이면 0을 반환합니다.
Source Value
Operand Value
Destination Value
Fig. Source, Zero Operand and Destination values of Scaled Divide
3 예제 코드
Scalar 연산
// 객체 생성
COperationScaledDivide operationScaledDivide;
// 입력 이미지
CFLImage fliSourceImage;
// 출력 이미지
CFLImage fliDestinationImage;
// Scalar 값
CMultiVar<double> mulVarScalar;
// 입력 이미지 설정
operationScaledDivide.SetSourceImage(fliSourceImage);
// 출력 이미지 설정
operationScaledDivide.SetDestinationImage(fliDestinationImage);
// 연산 방식 설정
operationScaledDivide.SetOperationSource(EOperationSource_Scalar);
// Scalar 값 설정
operationScaledDivide.SetScalarValue(mulVarScalar);
// 알고리즘 동작
operationScaledDivide.Execute();
// 객체 생성
COperationScaledDivide operationScaledDivide = new COperationScaledDivide();
// 입력 이미지
CFLImage fliSourceImage = new CFLImage();
// 출력 이미지
CFLImage fliDestinationImage = new CFLImage();
// Scalar 값
CMultiVar<double> mulVarScalar = new CMultiVar<double>();
// 입력 이미지 설정
operationScaledDivide.SetSourceImage(ref fliSourceImage);
// 출력 이미지 설정
operationScaledDivide.SetDestinationImage(ref fliDestinationImage);
// 연산 방식 설정
operationScaledDivide.SetOperationSource(EOperationSource.Scalar);
// Scalar 값 설정
operationScaledDivide.SetScalarValue(mulVarScalar);
// 알고리즘 동작
operationScaledDivide.Execute();
# 객체 생성
operationScaledDivide = COperationScaledDivide()
# 입력 이미지
fliSourceImage = CFLImage()
# 출력 이미지
fliDestinationImage = CFLImage()
# Scalar 값
mulVarScalar = CMultiVar[Double]()
# 입력 이미지 설정
operationScaledDivide.SetSourceImage(fliSourceImage)
# 출력 이미지 설정
operationScaledDivide.SetDestinationImage(fliDestinationImage)
# 연산 방식 설정
operationScaledDivide.SetOperationSource(EOperationSource.Scalar)
# Scalar 값 설정
operationScaledDivide.SetScalarValue(mulVarScalar)
# 알고리즘 동작
operationScaledDivide.Execute()
Image 연산
// 객체 생성
COperationScaledDivide operationScaledDivide;
// 입력 이미지
CFLImage fliSourceImage;
// Operand 이미지
CFLImage fliOperandImage;
// 출력 이미지
CFLImage fliDestinationImage;
// 입력 이미지 설정
operationScaledDivide.SetSourceImage(fliSourceImage);
// Operand 이미지 설정
operationScaledDivide.SetOperandImage(fliOperandImage);
// 출력 이미지 설정
operationScaledDivide.SetDestinationImage(fliDestinationImage);
// 연산 방식 설정
operationScaledDivide.SetOperationSource(EOperationSource_Image);
// 알고리즘 동작
operationScaledDivide.Execute();
// 객체 생성
COperationScaledDivide operationScaledDivide = new COperationScaledDivide();
// 입력 이미지
CFLImage fliSourceImage = new CFLImage();
// Operand 이미지
CFLImage fliOperandImage = new CFLImage();
// 출력 이미지
CFLImage fliDestinationImage = new CFLImage();
// 입력 이미지 설정
operationScaledDivide.SetSourceImage(ref fliSourceImage);
// Operand 이미지 설정
operationScaledDivide.SetOperandImage(ref fliOperandImage);
// 출력 이미지 설정
operationScaledDivide.SetDestinationImage(ref fliDestinationImage);
// 연산 방식 설정
operationScaledDivide.SetOperationSource(EOperationSource.Image);
// 알고리즘 동작
operationScaledDivide.Execute();
# 객체 생성
operationScaledDivide = COperationScaledDivide()
# 입력 이미지
fliSourceImage = CFLImage()
# Operand 이미지
fliOperandImage = CFLImage()
# 출력 이미지
fliDestinationImage = CFLImage()
# 입력 이미지 설정
operationScaledDivide.SetSourceImage(fliSourceImage)
# Operand 이미지 설정
operationScaledDivide.SetOperandImage(fliOperandImage)
# 출력 이미지 설정
operationScaledDivide.SetDestinationImage(fliDestinationImage)
# 연산 방식 설정
operationScaledDivide.SetOperationSource(EOperationSource.Image)
# 알고리즘 동작
operationScaledDivide.Execute()