Popcount
1 개요
이미지 채널 값의 이진표현에 존재하는 '1' 비트의 수를 반환하는 알고리즘입니다.
2 알고리즘 상세 설명
Source 이미지 픽셀 각 채널 값의 Popcount 를 계산하여 출력합니다.
- : destination 의 번째 채널 값
- : Source 의 번째 채널 값
Source Value | Destination Value |
---|---|
![]() |
![]() |
Fig. Source and Destination values of Popcount. (Clamping)
9-15 bit 이미지의 경우 depth 를 벗어난 상위 비트는 연산에 참여하지 않습니다.
3 예제 코드
COperationPopcount popcnt;
CFLImage fliSourceImage;
CFLImage fliDestinationImage;
popcnt.SetSourceImage(fliSourceImage);
popcnt.SetDestinationImage(fliDestinationImage);
popcnt.Execute();
4 기타 사항
Supported Feature
- Image
- Source Image
- Destination Image
- ROI
- Source ROI
- Destination ROI
- Pivot
- Source Pivot
- Destination Pivot
- Overflow Method
- Clamping
- Wrapping
- Blank Color
- Figure Transform
- Batch Processing
Supported Format
- Source
- Channel
- 1-10
- Combined, Separated
- Value Type & Depth
- Signed: 8, 9-16, 32, 64
- Unsigned: 1, 4, 8, 9-16, 32, 64
- Floating: 32, 64
- Channel
- Destination
- Channel
- Source 와 일치하는 경우 지원
- Value Type & Depth
- Destination 이미지가 있는 경우, Source 와 달라도 지원
- Signed: 8, 9-16, 32, 64
- Unsigned: 1, 4, 8, 9-16, 32, 64
- Floating: 32, 64
- Destination 이미지를 생성하는 경우, Source 추종
- Destination 이미지가 있는 경우, Source 와 달라도 지원
- Channel
Overflow Method
Destination 타입에 의해 출력 범위가 제한되는 경우, 설정된 overflow method 에 의해 처리됩니다. 기본 값은 Clamping 입니다.