Format Converter
1 개요
이미지의 포맷을 바꿔주는 기능입니다.
2 상세 설명
원본이미지를 원하는 포맷으로 변환할 수 있습니다.
변환할 수 있는 요소는 다음과 같습니다.
- Channel : 이미지의 채널 수 (1 ~ 10 채널)
- Depth : 이미지의 Bit 크기 (지원 Detph 1, 4, 8 ~ 16, 32, 64bit)
- Type : Signed/Unsigned 정수형, 실수형 타입
- Separated Type : 메모리 저장 방식
- Align Byte : 바이트 정렬
- Scaling : Depth 또는 Type이 바뀔 때, 원본 이미지의 픽셀 값을 변환하려는 포맷에 맞게 스케일링
- Scaling Gamma Correction : 실수형 정수형 변환 시 감마 보정
변환하려는 채널이 3,4 채널인 경우 Color Sequence도 변환이 가능합니다.
나머지 채널로 변환할 때는 원본이미지에서 평균값을 구한 뒤, 채널 수만큼 확장하여 처리합니다.
Color Sequence에 대한 설명은 Color를 참고해 주세요.
3채널 Unsigned 8bit 포맷 원본 이미지를 1채널 Unsigned 8bit 포맷으로 변환하는 경우
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();