Pattern Removal Auto#
기능 사용법#
Pattern Removal Auto를 사용하는 이유#
일부 카메라에서 출력되는 이미지에는 겹쳐진 체커 패턴과 유사한 아티팩트가 나타날 수 있습니다. 이는 특정 센서 디자인 때문입니다. 센서 어레이의 모든 2 x 2 픽셀은 빛이 센서 표면에 수직으로 입사할 때만 빛에 동일하게 반응합니다. 빛이 비스듬한 각도로 도달하면 약간 다르게 반응하며, 이는 이미지에 체커 패턴을 유발합니다.
원본 픽셀 값에 적절한 보정 계수가 적용되도록 하여 체커 패턴을 억제할 수 있습니다. 보정 계수는 각 이미지 획득 시 자동으로 적용됩니다.
Pattern Removal Auto를 사용하면 각 이미지 획득에 적합한 보정 계수 값이 적용되도록 할 수 있습니다. 이 값은 Pattern Removal Auto를 사용할 때 존재했던 특정 이미징 조건에서만 유효합니다.
특징#
Pattern Removal Auto auto function은 다른 auto function과 몇 가지 점에서 다릅니다.
- Auto Function ROI를 지정할 필요가 없습니다.
- 타겟 값을 지정할 필요가 없습니다. 대신, auto function이 체커 패턴을 최대한 제거할 수 있는 보정 계수 값을 생성합니다.
- Operating Mode만
Once사용할 수 있습니다.
Pattern Removal Auto 활성화 및 사용#
Pattern Removal Auto auto function을 사용하려면 다음을 수행하십시오.
- Image ROI를 최대 크기로 설정합니다.
- 가능한 경우 균일한 조명을 구성합니다.
- 보정 값 생성에 방해가 될 수 있는 모든 카메라 feature(예: Gain Auto, Exposure Auto 또는 Sequencer)를 비활성화합니다.
- 원하는 대로 카메라 설정(예: Exposure Time, Black Level, Digital Shift)을 조정합니다. 최상의 결과를 얻으려면 이미지 전체에서 회색조 값이 균일해야 합니다.
- 다음 값 중 하나로
PatternRemovalAuto매개변수:Once. - 이미지 3장을 획득합니다. 획득 과정 사이에 타겟 씬이 변경되지 않도록 하십시오.
카메라는 현재 이미징 조건에 최적의 보정 값을 생성하고 적용합니다. 이는 즉시 발생하며 카메라의 프레임 속도에 영향을 미치지 않습니다. 세 번째 획득 후,PatternRemovalAutoparameter는 자동으로 다음과 같이 설정됩니다.Off. - 필요한 경우 Image ROI의 원래 크기를 복원합니다.
생성된 보정 값은 다음 이벤트 중 하나가 발생할 때까지 적용됩니다.
PatternRemovalAuto로 설정된 경우,Once.- 카메라 전원이 차단되었습니다. (보정 값이 손실되는 것을 방지하려면 보정 값을 save하십시오.)
- 보정 값이 다른 user set이 로드되었습니다.
Pattern Removal Auto 프로세스 반복#
관련 이미징 조건 중 하나가 변경되면 Pattern Removal Auto 프로세스를 반복해야 합니다. 이를 통해 변경된 조건에서도 체커 패턴이 안정적으로 제거되며 픽셀 값이 불필요하게 변경되지 않도록 할 수 있습니다.
관련 이미징 조건에는 다음이 포함됩니다.
- 광학계: 렌즈, 조리개 또는 초점 변경.
- 조명: 조명 유형, 광원 배치 또는 밝기 변경.
- 기능 설정: 체커 패턴은 여러 카메라 기능의 설정, 특히 Exposure Time, Binning, Image ROI, Black Level, 그리고 Digital Shift의 영향을 받을 수 있습니다.
보정값 저장#
Pattern Removal Auto 자동 기능에 의해 생성된 보정 값은 카메라 전원이 차단되면 손실됩니다.
하지만 보정 값을 User Set에 저장할 수 있습니다. 보정 값을 다시 사용하고 싶을 때마다 이 User Set을 불러올 수 있습니다.
보정 값을 불러올 때는 이미징 조건이 보정 값이 생성되었을 때와 동일한지 확인하십시오.
샘플 코드#
// Set the operating mode of the Pattern Removal Auto auto function to Once
camera.PatternRemovalAuto.SetValue(PatternRemovalAuto_Once);
// Acquire three images
// ...
// (Implement your own image grabbing routine here.
// For example, the InstantCamera class provides the StartGrabbing() method.)
// ...
// Save the correction values in User Set 1
camera.UserSetSelector.SetValue(UserSetSelector_UserSet1);
camera.UserSetSave.Execute();
INodeMap& nodemap = camera.GetNodeMap();
// Set the operating mode of the Pattern Removal Auto auto function to Once
CEnumParameter(nodemap, "PatternRemovalAuto").SetValue("Once");
// Acquire three images
// ...
// (Implement your own image grabbing routine here.
// For example, the InstantCamera class provides the StartGrabbing() method.)
// ...
// Save the correction values in User Set 1
CEnumParameter(nodemap, "UserSetSelector").SetValue("UserSet1");
CCommandParameter(nodemap, "UserSetSave").Execute();
// Set the operating mode of the Pattern Removal Auto auto function to Once
camera.Parameters[PLCamera.PatternRemovalAuto].SetValue(PLCamera.PatternRemovalAuto.Once);
// Acquire three images
// ...
// (Implement your own image grabbing routine here.
// For example, the InstantCamera class provides the StartGrabbing() method.)
// ...
// Save the correction values in User Set 1
camera.Parameters[PLCamera.UserSetSelector].SetValue(PLCamera.UserSetSelector.UserSet1);
camera.Parameters[PLCamera.UserSetSave].Execute();
/* 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 */
/* Set the operating mode of the Pattern Removal Auto auto function to Once */
errRes = PylonDeviceFeatureFromString(hdev, "PatternRemovalAuto", "Once");
CHECK(errRes);
/* Acquire three images */
/* ... */
/* (Implement your own image grabbing routine here. */
/* For example, the InstantCamera class provides the StartGrabbing() method.) */
/* ... */
/* Save the correction values in User Set 1 */
errRes = PylonDeviceFeatureFromString(hdev, "UserSetSelector", "UserSet1");
CHECK(errRes);
errRes = PylonDeviceExecuteCommandFeature(hdev, "UserSetSave");
CHECK(errRes);
# Set the operating mode of the Pattern Removal Auto auto function to Once
camera.PatternRemovalAuto.Value = "Once"
# Acquire three images
# ...
# (Implement your own image grabbing routine here.
# For example, the InstantCamera class provides the StartGrabbing() method.)
# ...
# Save the correction values in User Set 1
camera.UserSetSelector.Value = "UserSet1"
camera.UserSetSave.Execute()
또한 pylon Viewer를 사용하여 파라미터를 손쉽게 설정할 수 있습니다.