Channel Sum
1 개요
원본 이미지 채널별 픽셀값의 총합을 계산하여 출력하는 알고리즘입니다.
2 알고리즘 상세 설명
sum(x)=n=1∑Nxn
- N : 채널 수
- xn : n번째 채널 값
N 채널 이미지에서 총합을 계산하여 1채널 이미지로 결과를 출력합니다. 총합의 결과가 해당 포맷의 표현 가능한 최댓값을 초과할 경우, 최종 결과가 최댓값으로 출력됩니다.
Source Value |
Destination Value |
 |
 |
Fig. Channel Sum 동작 예시
3 예제
CChannelSum channelSum;
CFLImage fliSourceImage;
CFLImage fliDestinationImage;
channelSum.SetSourceImage(fliSourceImage);
channelSum.SetDestinationImage(fliDestinationImage);
channelSum.Execute();
CChannelSum channelSum = new CChannelSum();
CFLImage fliSourceImage = new CFLImage();
CFLImage fliDestinationImage = new CFLImage();
channelSum.SetSourceImage(ref fliSourceImage);
channelSum.SetDestinationImage(ref fliDestinationImage);
channelSum.Execute();
channelSum = CChannelSum()
fliSourceImage = CFLImage()
fliDestinationImage = CFLImage()
channelSum.SetSourceImage(fliSourceImage)
channelSum.SetDestinationImage(fliDestinationImage)
channelSum.Execute()