Reduce Dimension Count 2D to 1D
1 개요
원본 이미지 차원을 축소하는 알고리즘입니다. 축소된 차원의 0이 아닌 값의 개수를 결과로 출력합니다.
2 알고리즘 상세 설명
- : 결과 이미지의 (x,y)위치 픽셀값
- : 원본 이미지의 (x,y)위치 픽셀값
이미지의 x 또는 y 차원을 0이 아닌 값의 개수를 기반으로 축소시킵니다.
Source Image | Reduce X Dimension Destination Image | Reduce Y Dimension Destination Image |
---|---|---|
![]() |
![]() |
![]() |
Fig. Reduce Dimension Count 2D to 1D 동작 예시
3 파라미터 설정 및 사용 방법
멤버함수 | 파라미터 | 설 명 | ||
---|---|---|---|---|
SetReductionDimension | CReduceDimensionCount2Dto1D::EReductionDimension | eReductionDimension | IN | 축소 차원을 설정합니다. |
SetOverflowMethod | EOverflowMethod | eOverflowMethod | IN | 오버플로우 처리 방식을 설정합니다. |
4 예제
CFLImage fliSourceImage;
CFLImage fliDestinationImage;
CReduceDimensionCount2Dto1D reduceDimensionCount2Dto1D;
reduceDimensionCount2Dto1D.SetSourceImage(fliSourceImage);
reduceDimensionCount2Dto1D.SetDestinationImage(fliDestinationImage);
reduceDimensionCount2Dto1D.SetOverflowMethod(EOverflowMethod_Clamping);
// x 차원 축소
reduceDimensionCount2Dto1D.SetReduceDimension(CReduceDimensionCount2Dto1D::EReduceDimension_X);
reduceDimensionCount2Dto1D.Execute();
// y 차원 축소
reduceDimensionCount2Dto1D.SetReduceDimension(CReduceDimensionCount2Dto1D::EReduceDimension_Y);
reduceDimensionCount2Dto1D.Execute();