Image Insertion
1 개요
소스 이미지에 피연산 ROI영역을 삽입하는 알고리즘입니다.
삽입 방향을 지정할 수 있으며 두 영역의 크기가 일치하지 않는 경우엔 Blank Color로 설정된 값이 채워집니다.
2 알고리즘 상세 설명
Result Image Expand | Source Image | Operand Image | Destination Image |
---|---|---|---|
Disable (default) | ![]() |
![]() |
![]() |
Enable | ![]() |
![]() |
![]() |
Fig. Image Insertion(Insertion Position - Left)
Figure 는 삽입 위치를 Left로 설정한 후 동작한 결과입니다.
소스 이미지에 피연산 영역이 삽입 방향에 추가된 결과입니다. Expand 옵션을 활성화 시 두 이미지 영역의 크기가 모두 보존됩니다.
3 파라미터 설정 및 사용 방법
SetInsertionPosition(EInsertionPosition eInsertionPosition = EInsertionPosition_Left)
eInsertionPosition
: 설정된 방향으로 피연산 영역을 소스 이미지에 삽입한다.
EnableResultImageExpand(bool bResultImageExpand = false)
bResultImageExpand
:true
인 경우 동작 결과 이미지를 두 이미지 영역의 합 크기로 결정된다.
4 예제 코드
CFLImage fliSourceImage;
CFLImage fliOperandImage;
CFLImage DestinationImage;
fliSourceImage.Load(L"ExampleImages/Affine/Generator.flif");
fliOperandImage.Load(L"ExampleImages/Affine/Sunset.flif");
CFLRect<double> flrOperandROI(0, 0, fliOperandImage.GetWidth() / 10, fliOperandImage.GetHeight());
CImageInsertion imageInsertion;
imageInsertion.SetSourceImage(fliSourceImage);
imageInsertion.SetOperandImage(fliOperandImage);
imageInsertion.SetDestinationImage(DestinationImage);
imageInsertion.SetOperandROI(flrOperandROI);
imageInsertion.Execute();