Format Converter

1 개요

이미지의 포맷을 바꿔주는 기능입니다.

2 상세 설명

원본이미지를 원하는 포맷으로 변환할 수 있습니다.
변환할 수 있는 요소는 다음과 같습니다.

변환하려는 채널이 3,4 채널인 경우 Color Sequence도 변환이 가능합니다.
나머지 채널로 변환할 때는 원본이미지에서 평균값을 구한 뒤, 채널 수만큼 확장하여 처리합니다.
Color Sequence에 대한 설명은 Color를 참고해 주세요.

3채널 Unsigned 8bit 포맷 원본 이미지를 1채널 Unsigned 8bit 포맷으로 변환하는 경우

Source Value Result Value
Source Result
Source Value Result Value
Fig. Format Converter 채널 변환 동작 예시

3 예제

CFormatConverter formatConverter;

CFLImage fliSourceImage;
formatConverter.SetSourceImage(fliSourceImage);

CFLImage fliDestinationImage;
formatConverter.SetDestinationImage(fliDestinationImage);

formatConverter.SetPixelFormat(EPixelFormat_C5_U8);
formatConverter.EnableScaling(false);
formatConverter.EnableSeparateChannelConverting(false);
formatConverter.EnableAlignByteConverting(false);
formatConverter.Execute();
CFormatConverter formatConverter = new CFormatConverter();

CFLImage fliSourceImage = new CFLImage();
formatConverter.SetSourceImage(ref fliSourceImage);

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

formatConverter.SetPixelFormat(EPixelFormat.C5_U8);
formatConverter.EnableScaling(false);
formatConverter.EnableSeparateChannelConverting(false);
formatConverter.EnableAlignByteConverting(false);
formatConverter.Execute();