Channel Combination

1 개요

여러 이미지의 채널을 추출하여 하나의 이미지로 표현하는 알고리즘입니다.

2 알고리즘 상세 설명

각 원본이미지에서 설정한 채널을 추출하여, 이를 하나의 대상 이미지의 각 채널에 배치합니다. 설정한 이미지의 수만큼 대상 이미지의 채널이 생성됩니다.

예시

3개의 4채널 원본 이미지에서 첫 번째는 0, 두 번째는 2, 세 번째는 2채널을 선택하면 대상이미지의 결과는 다음와 같습니다.


아래는 1채널 이미지 3장의 0번 채널을 3채널 이미지로 생성하는 예시입니다.

Source 1 Source 2
Source1 Source2
Source 3 Result
Source3 Result
Source 1 Source 2 Source 3 Result
Source1 Source2 Source3 Result
Fig. Channel Combination 동작 예시

3 예제

CChannelCombination channelCombination;

CFLImage fliSourceImage0;
CFLImage fliSourceImage1;
CFLImage fliSourceImage2;

CFLImage fliDestinationImage;
channelCombination.SetDestinationImage(fliDestinationImage);

CFLArray<CFLImage*> flaImages;
flaImages.PushBack(&fliSourceImage0);
flaImages.PushBack(&fliSourceImage1);
flaImages.PushBack(&fliSourceImage2);

CFLArray<int64_t> flaChannels ;
flaChannels.PushBack((int64_t)EChannelSelection_Channel_0);
flaChannels.PushBack((int64_t)EChannelSelection_Channel_0);
flaChannels.PushBack((int64_t)EChannelSelection_Channel_0);

channelCombination.SetSourceImage(flaImages);
channelCombination.SetCombinationChannel(flaChannels);
channelCombination.Execute();
CChannelCombination channelCombination = new CChannelCombination();

CFLImage fliSourceImage0 = new CFLImage();
CFLImage fliSourceImage1 = new CFLImage();
CFLImage fliSourceImage2 = new CFLImage();

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

List<CFLImage> flaImages = new List<CFLImage>();
flaImages.Add(fliSourceImage0);
flaImages.Add(fliSourceImage1);
flaImages.Add(fliSourceImage2);

List<long> flaChannels = new List<long>();
flaChannels.Add((long)EChannelSelection.Channel_0);
flaChannels.Add((long)EChannelSelection.Channel_0);
flaChannels.Add((long)EChannelSelection.Channel_0);

channelCombination.SetSourceImage(ref flaImages);
channelCombination.SetCombinationChannel(flaChannels);
channelCombination.Execute();