Demosaicing Mode#
이는 이미지 품질을 최적화하는 데 도움이 될 수 있습니다.
정보
이 기능은 Basler ace 2, boost R, 그리고 dart R 카메라에서 사용할 수 있습니다.
Basler ace U/L 카메라도 제공합니다 DemosaicingMode parameter 하지만 이는 다음을 활성화하는 역할만 합니다 PGI 세트.
기능 사용법#
Demosaicing Mode를 사용하는 이유#
Debayering이라고도 하는 Demosaicing은 이미지 센서의 컬러 출력에서 RGB 정보를 생성하기 위해 수행됩니다.
Basler 컬러 카메라는 Pixel Format이 Bayer 형식으로 설정된 경우에도 항상 demosaicing을 수행합니다. 이는 카메라의 내부 이미지 처리 때문입니다.
카메라는 demosaicing을 위한 다양한 방식을 제공합니다. 기본적으로 방식은 설정된 Pixel Format을 기반으로 자동으로 결정됩니다.
자동으로 선택된 방식의 결과가 애플리케이션에 만족스럽지 않은 경우 demosaicing mode를 수동으로 조정하면 도움이 될 수 있습니다.
예를 들어, 카메라는 Bayer pixel format에 대해 Nearest Neighbor 방식을 자동으로 선택합니다. 이는 이전 펌웨어 버전과의 호환성을 보장하기 위함입니다. 그러나 Unilinear 방식이 종종 더 나은 결과를 달성합니다.
Demosaicing Methods#
다음과 같은 demosaicing 방식을 사용할 수 있습니다.
| Demosaicing Method | 설명 | 비 Bayer Pixel Format에 적합 | Bayer Pixel Format에 적합 |
|---|---|---|---|
| Average Green | 가장 가까운 픽셀 중 하나의 정보 또는 주변 녹색 픽셀의 Arithmetic 평균을 사용합니다. Basler PGI를 사용할 수 없는 경우 비 Bayer pixel format의 기본 방식입니다. | ||
| Basler PGI | 사용 가능한 경우, 고급 demosaicing을 위해 Basler PGI 알고리즘을 사용합니다. | ||
| Nearest Neighbor | 가장 가까운 픽셀 중 하나의 정보를 사용합니다. 이는 Bayer pixel format의 기본 방식이며 이전 펌웨어 버전과의 최적의 호환성을 제공합니다. | ||
| Unilinear | 가장 가까운 픽셀 중 하나의 정보 또는 주변 픽셀의 Arithmetic 평균을 사용합니다. Nearest Neighbor demosaicing에 비해 모서리에서 컬러 아티팩트가 적게 발생합니다. |
Demosaicing Modes#
다음과 같은 demosaicing mode를 사용할 수 있습니다.
- Auto: 설정된 Pixel Format을 기반으로 demosaicing 방식이 자동으로 결정됩니다.
- Manual: Demosaicing 방식을 수동으로 설정할 수 있습니다.
Demosaicing 구성#
demosaicing 방식을 변경하려면:
- 다음 값 중 하나로
BslDemosaicingMode매개변수:Manual. - 다음 값 중 하나로
BslDemosaicingMethodparameter를 원하는 demosaicing 방식(예:Unilinear.
샘플 코드#
/* Macro to check for errors */
#define CHECK(errc) if (GENAPI_E_OK != errc) printErrorAndExit(errc)
GENAPIC_RESULT errRes = GENAPI_E_OK; /* Return value of pylon methods */
/* Enable manual adjustment of the demosaicing method */
errRes = PylonDeviceFeatureFromString(hdev, "BslDemosaicingMode", "Manual");
CHECK(errRes);
/* Set the demosaicing method to Unilinear */
errRes = PylonDeviceFeatureFromString(hdev, "BslDemosaicingMethod", "Unilinear");
CHECK(errRes);
또한 pylon Viewer를 사용하여 파라미터를 손쉽게 설정할 수 있습니다.