콘텐츠로 건너뛰기
STAGING SERVER
DEVELOPMENT SERVER

Shading Correction#

Shading Correction camera feature를 사용하면 센서 픽셀의 광 민감도 차이로 인해 이미지에 발생하는 불균일성을 줄일 수 있습니다. 또한 조명 및 조명 광학계로 인해 발생하는 아티팩트도 최소화할 수 있습니다.

Shading correction은 카메라에 저장되어 적절한 보정 데이터를 포함하는 파일을 기반으로 합니다. 이미지 취득 중에 이 파일들이 원래 픽셀 값에 적용되어 향상된 이미지를 생성합니다.

Shading Correction 기능은 racer 2 카메라에서만 사용할 수 있습니다.

기능 사용법#

작동 원리#

DSNU 및 PRNU 보정#

Shading correction은 DSNU(Dark Signal Non-Uniformity) 및 PRNU(Photo Response Non-Uniformity)로 인해 발생하는 이미지 아티팩트를 최소화합니다. 카메라에서는 다음과 같은 두 가지 유형의 shading correction을 사용할 수 있습니다.

  • DSNU correction: 완전한 암상태에서 카메라가 라인을 캡처할 때 라인의 모든 픽셀 값은 0에 가까워야 하며 서로 동일해야 합니다. 실제로는 센서 픽셀 성능의 미세한 차이로 인해 암상태에서 라인을 캡처할 때 카메라에서 출력되는 픽셀 값에 약간의 편차가 발생합니다. DSNU correction은 이러한 유형의 편차를 보정합니다. 획득한 라인의 각 픽셀 값에 개별 회조 값(오프셋)을 더하는 방식으로 작동합니다.

  • PRNU correction: 밝고 균일하게 조명된 표면을 향한 상태에서 카메라가 라인을 캡처할 때 라인의 모든 픽셀 값은 최대 회조 값에 가까워야 하며 서로 동일해야 합니다. 실제로는 센서 픽셀 성능의 미세한 차이뿐만 아니라 광학계 및 조명의 변화로 인해 카메라에서 출력되는 픽셀 값에 편차가 발생합니다. PRNU correction은 이러한 유형의 편차를 보정합니다. 획득한 라인의 각 픽셀 값에 개별 승수(이득)를 적용하는 방식으로 작동합니다.

Shading correction은 픽셀 대 픽셀 보정 방법이며, 즉 각 단일 픽셀에 대한 보정 값이 계산됩니다.

정보

카메라가 DSNU correction만 수행하거나, PRNU correction만 수행하거나, 두 가지 shading correction 모두를 수행하도록 설정할 수 있습니다. 두 가지 shading correction을 모두 수행하는 경우 카메라가 먼저 DSNU correction을 수행한 다음 PRNU correction을 수행합니다.

Shading Correction Sets#

DSNU 및 PRNU correction에 사용되는 보정 값은 shading correction sets라고 하는 파일에 저장됩니다. 다음과 같은 두 가지 유형이 있습니다.

Shading Correction 파일 다운로드#

정보

  • Shading correction 파일을 다운로드하는 것은 보정 데이터를 백업하는 데 유용합니다.
  • Basler는 펌웨어 업데이트를 수행하기 전에 보정 파일을 백업할 것을 강력히 권장합니다.
  • 다운로드한 shading correction 파일을 편집하지 마십시오.

pylon Viewer를 사용하여 shading correction 파일을 다운로드하려면:

  1. pylon Viewer에서 shading correction 데이터 파일을 다운로드하려는 카메라를 엽니다.
  2. pylon Viewer의 Camera 메뉴에서 File Access를 클릭합니다.
  3. Camera File 드롭다운 상자에서 다운로드하려는 파일에 따라 PRNU Correction 또는 DSNU Correction을 선택합니다.
    적절한 항목이 없으면 카메라에서 Shading Correction 파일 다운로드가 지원되지 않는 것입니다.
  4. Download를 클릭하고 파일을 저장할 디렉터리로 이동한 후 원하는 파일 이름을 입력합니다.
  5. Save를 클릭합니다.
  6. Camera File Access 대화 상자를 닫습니다.

Shading Correction 파일 업로드#

정보

  • 사용자 Shading Correction 파일을 카메라에 업로드하는 경우, 선택한 보정 세트가 보정 데이터를 로드할 바로 그 카메라에서 생성되었는지 확인하십시오.
  • Basler에서는 편집된 사용자 Shading Correction 파일을 업로드하지 않을 것을 강력히 권장합니다.

pylon Viewer를 사용하여 사용자 Shading Correction 파일을 업로드하려면:

  1. pylon Viewer에서 Shading Correction 데이터 파일을 업로드할 카메라를 엽니다.
  2. pylon Viewer의 Camera 메뉴에서 File Access를 클릭합니다.
  3. Camera File 드롭다운 상자에서 PRNU Correction 또는 DSNU Correction을 선택합니다.
    PRNU Correction 또는 DSNU Correction 항목이 없으면 카메라에서 보정 파일 업로드가 지원되지 않는 것입니다.
  4. Upload를 클릭하고 업로드하실 파일로 이동합니다.
  5. Open을 클릭합니다.
  6. Camera File Access 대화 상자를 닫습니다.

업로드 후 Shading Correction 파일을 적용하려면 다음을 확인하십시오. BslShadingCorrectionMode 로 설정된 경우 User 그리고 다음을 설정하십시오: BslShadingCorrectionSetIndex 파라미터가 해당 인덱스 번호로 설정되어 있습니다.

Shading Correction Mode#

Shading Correction 모드는 Shading Correction이 팩토리 또는 사용자 보정 세트에 저장된 값을 기반으로 할지 여부를 결정합니다.

Shading Correction 모드를 설정하려면 다음을 설정하십시오. BslShadingCorrectionMode 매개변수를 다음 값 중 하나로 설정합니다:

  • Factory (기본값): Shading Correction은 다음 항목에 저장된 값을 기반으로 합니다. 팩토리 보정 세트.
  • User: Shading Correction은 다음 항목에 저장된 값을 기반으로 합니다. 사용자 보정 세트.
  • Off: 카메라가 포함되지 Shading Correction을 수행합니다.

Shading Correction Set 생성#

사용자 정의 Shading Correction 세트 생성을 시작하기 전에 다음 항목이 필요합니다.

  • 렌즈를 완전히 덮을 수 있는 적절한 물체 (예: 렌즈 캡)
  • 균일한 배경이 있는 타겟 (예: 흰색 종이)

정보

  • 최상의 결과를 얻으려면 일반 작동 시와 마찬가지로 광학계, 라인 레이트, Exposure Time, 게인, 카메라 온도를 조정하십시오. Basler에서는 실제 애플리케이션 환경에서 암시야 및 명시야 이미지를 획득할 것을 권장합니다.
  • racer 2 L 카메라: 듀얼(또는 쿼드) 라인 센서 수집 모드에서 싱글(또는 듀얼) 라인 모드로 생성된 Shading Correction 세트의 상태는 비어 있음으로 표시됩니다(BslShadingCorrectionSetStatus = Empty)이지만, 해당 세트에는 이미 보정 데이터가 존재합니다.
    Dual 또는 Quad Line 모드에서 새로운 Shading Correction 세트를 생성하려면, 라인 수가 더 적은 모드에서 생성한 보정 세트의 인덱스 번호를 확인하십시오. 인덱스 번호가 이미 사용 중인 경우, 새 세트에 다른 번호를 선택하십시오. 그렇지 않으면 기존 보정 데이터가 새로운 보정 값으로 덮어쓰여지고 교체됩니다.

DSNU Correction Set#

DSNU correction용 Shading Correction 세트를 생성하려면:

  1. 렌즈에 플라스틱 캡을 씌우는 등의 방법으로 카메라 센서에 빛이 들어오지 않도록 차단하십시오.
  2. 다음 값 중 하나로 BslShadingCorrectionSelector 매개변수: DSNU.
  3. 다음 값 중 하나로 BslShadingCorrectionMode 매개변수: User.
  4. 다음 값 중 하나로 BslShadingCorrectionSetIndex 매개변수를 생성할 세트의 원하는 인덱스 번호(예: 1)로 설정합니다.
  5. 다음 값 중 하나로 BslShadingCorrectionROISelector 매개변수를 원하는 Shading Correction ROI(예: ROI 1)로 설정합니다.
  6. 필요한 경우 다음 매개변수를 사용하여 Shading Correction ROI의 위치와 크기를 설정하십시오.
    • BslShadingCorrectionROIOffsetX: 센서 왼쪽에서 Shading Correction ROI의 수평 오프셋(픽셀 단위)입니다.
    • BslShadingCorrectionROIWidth: Shading Correction ROI의 너비(픽셀 단위)입니다.
  7. 이미지 취득을 시작하려면 pylon Viewer의 툴바에서 Continuous Shot 버튼을 클릭하십시오.
  8. 다음을 실행합니다. BslShadingCorrectionSetCreate 명령을 실행하여 새로운 Shading Correction 세트를 생성합니다.
    총 256장의 다크 이미지가 취득되고 평가됩니다. 그 결과 생성된 DSNU 보정 데이터는 정의된 Shading Correction 세트에 수집되어 카메라의 플래시 메모리에 저장됩니다. 예를 들어 인덱스 번호 1의 Shading Correction 세트에 이미 보정 데이터가 포함되어 있는 경우, 이 데이터는 새로운 보정 값으로 덮어쓰여지고 교체됩니다.

    정보

    DSNU 보정 데이터를 생성하는 동안 PRNU correction 세트가 활성화된 경우, PRNU 보정 값은 계산에서 무시됩니다.

    생성된 Shading Correction 세트가 자동으로 활성화됩니다.

  9. Shading Correction 세트 생성 결과를 확인하려면 다음의 값을 가져오십시오. BslShadingCorrectionSetCreateResult 파라미터.

PRNU Correction Set#

PRNU correction용 Shading Correction 세트를 생성하려면:

  1. 예를 들어 카메라의 전체 시야에 흰색 종이를 배치하여 센서가 70% 포화되도록 균일하게 조명합니다.
  2. 다음 값 중 하나로 BslShadingCorrectionSelector 매개변수: PRNU.
  3. 다음 값 중 하나로 BslShadingCorrectionMode 매개변수: User.
  4. 다음 값 중 하나로 BslShadingCorrectionSetIndex 파라미터를 생성할 set의 원하는 인덱스 번호(예: 2)로 설정합니다.
  5. 다음 값 중 하나로 BslShadingCorrectionROISelector 매개변수를 원하는 Shading Correction ROI(예: ROI 1)로 설정합니다.
  6. 필요한 경우 다음 매개변수를 사용하여 Shading Correction ROI의 위치와 크기를 설정하십시오.
    • BslShadingCorrectionROIOffsetX: 센서 왼쪽에서 Shading Correction ROI의 수평 오프셋(픽셀 단위)입니다.
    • BslShadingCorrectionROIWidth: Shading Correction ROI의 너비(픽셀 단위)입니다.
  7. 이미지 취득을 시작하려면 pylon Viewer 툴바에서 Continuous Shot 버튼을 클릭합니다.
  8. 다음을 실행합니다. BslShadingCorrectionSetCreate 명령을 실행하여 새로운 Shading Correction 세트를 생성합니다.
    총 256장의 밝은 이미지가 취득되고 평가됩니다. 그 결과 생성된 PRNU 보정 데이터는 선택한 Shading Correction 세트에 수집되어 카메라의 플래시 메모리에 저장됩니다. 예를 들어 인덱스 번호 2의 Shading Correction 세트에 이미 보정 데이터가 포함되어 있는 경우, 이 데이터는 새로운 보정 값으로 덮어쓰여지고 교체됩니다.

    정보

    PRNU 보정 데이터를 생성하는 동안 DSNU correction 세트가 활성화된 경우, DSNU 보정 값은 계산에 반영됩니다.

    생성된 Shading Correction 세트가 자동으로 활성화됩니다.

  9. Shading Correction 세트 생성 결과를 확인하려면 다음의 값을 가져오십시오. BslShadingCorrectionSetCreateResult 파라미터.

  10. 필요한 경우 PRNU correction의 목표 그레이 값을 조정하고 7단계를 반복하십시오. 컬러 카메라를 사용하는 경우 각 컬러 채널의 PRNU correction 목표 그레이 값을 개별적으로 조정하고 7단계를 반복하십시오.

PRNU Correction을 위한 Target Gray Value 조정#

PRNU correction 세트를 생성하는 동안 카메라는 밝은 필드 이미지에서 최대 밝기 값을 감지합니다. 그러나 달성하려는 센서 밝기의 상대적인 목표 그레이 값을 조정해야 할 수도 있습니다. 그 이유는 다음과 같습니다.

  • 보정 값이 허용 범위를 벗어났기 때문에 Shading Correction 세트를 생성할 수 없습니다.
  • 이미지의 밝은 점(예: 빛 반사로 인해 발생)으로 인해 보정 세트 생성 중에 카메라가 감지한 최대 밝기 값이 높아집니다. 보정 데이터를 개선하기 위해 보정 데이터 계산과 관련된 이 값을 줄이고자 할 수 있습니다.

PRNU correction의 목표 그레이 값을 조정하려면:

  1. 다음 값 중 하나로 BslShadingCorrectionTargetSelector 매개변수를 다음 값 중 하나로 설정합니다:
    • All (모노 카메라 전용): 목표 그레이 값이 모든 센서 라인에 적용됩니다.
    • Red, Green, Blue (컬러 카메라 전용): 목표 그레이 값이 해당 컬러 채널에 적용됩니다.
  2. 다음 값 중 하나로 BslShadingCorrectionTargetValue 파라미터를 원하는 상대적 목표 회조값으로 설정합니다.
  3. 컬러 카메라를 사용하는 경우, 1단계와 2단계를 반복하여 다른 컬러 채널에도 원하는 목표 회조값을 적용합니다.

정보

  • 이 BslShadingCorrectionTargetValue 파라미터는 다음과 같은 경우에만 사용할 수 있습니다. PRNU 보정 세트 생성.
  • 측정된 최대값보다 절대 목표 회조값이 낮은 픽셀만 보정됩니다.
  • Dual 또는 Quad Line Sensor Acquisition Mode로 작동하는 racer 2 L 카메라의 경우, 목표 회조값을 조정하면 예상치 못한 결과가 나타날 수 있습니다. 대신 Single Line 모드와 모노 Pixel Format을 사용하십시오.

추가 파라미터:

  • BslShadingCorrectionAbsoluteTargetValue: 센서 밝기의 절대 목표값입니다. 카메라의 센서 비트 깊이를 기준으로 계산된 실제 밝기값입니다.
  • BslShadingCorrectionMaximumMeasuredValue: 다음 과정에서 카메라가 감지한 최대 밝기값입니다. PRNU 보정 세트 생성.

Shading Correction Set 활성화#

음영 보정 세트를 활성화하려면:

  1. 다음 값 중 하나로 BslShadingCorrectionMode 매개변수: User, 사용자 정의 보정 세트를 활성화하려면, 또는 Factory, 공장 출고 시 보정 세트를 활성화하려면:
  2. 다음 값 중 하나로 BslShadingCorrectionSetIndex 파라미터를 사용할 세트의 인덱스 번호(예: 인덱스 번호 2)로 설정합니다.

    음영 보정 세트가 자동으로 활성화됩니다.

  3. 이 프로세스가 성공했는지 확인하려면 다음의 값을 가져옵니다. BslShadingCorrectionSetStatus 파라미터. 값이 Ok인 경우 음영 세트가 성공적으로 활성화된 것입니다. 이제 카메라는 선택된 음영 보정 세트의 보정값을 기반으로 음영 보정을 수행합니다.

정보

이미지 취득 중에도 음영 보정 세트를 변경할 수 있습니다. 단, 이 과정에서 약간의 이미지 아티팩트가 발생할 수 있습니다.

Shading Correction 비활성화#

음영 보정을 비활성화하려면 다음을 설정하십시오. BslShadingCorrectionMode 매개변수: Off.

세부 정보#

다음 표는 racer 2 카메라에서 사용할 수 있는 음영 세트의 수를 보여줍니다.

카메라 모델 취득당 노출되는 최대 라인 수 사용 가능한 음영 보정 세트 수
r2L2048-29gc 3 10
r2L2048-58gm 1 32
r2L2048-62g5c 3 10
r2L2048-62cc 3 10
r2L2048-172cm 1 32
r2L2048-172g5m 1 32
r2L4096-14gc 2 16
r2L4096-29gm 1 32
r2L4096-42cc 2 16
r2L4096-42g5c 2 16
r2L4096-84cm 1 32
r2L4096-84g5m 1 16
r2L8192-80cc 3 10
r2L8192-240cm 4 8
r2L16384-60cc 2 16
r2L16384-120cm 2 16
r2T16416-500cm 1 32

샘플 코드#

// Set the type of shading correction to DSNU
camera.BslShadingCorrectionSelector.SetValue(BslShadingCorrectionSelector_DSNU);
// Or for PRNU: Set the type of shading correction to PRNU
camera.BslShadingCorrectionSelector.SetValue(BslShadingCorrectionSelector_PRNU);

// Note: Valid for DSNU and PRNU:
// Set the shading correction mode to User
camera.BslShadingCorrectionMode.SetValue(BslShadingCorrectionMode_User);
// Set the desired index number of the set to be created
camera.BslShadingCorrectionSetIndex.SetValue(1);
// Set the shading correction ROI selector to ROI 1
camera.BslShadingCorrectionROISelector.SetValue(BslShadingCorrectionROISelector_ROI1);
// Set the offset X of the ROI to 0
camera.BslShadingCorrectionROIOffsetX.SetValue(0);
// Set the ROI width to 2048
camera.BslShadingCorrectionROIWidth.SetValue(2048);

// Note: Valid for PRNU only:
// Set the shading correction target selector to red
camera.BslShadingCorrectionTargetSelector.SetValue(BslShadingCorrectionTargetSelector_Red);
// Set the shading correction target value for red to 1000
camera.BslShadingCorrectionTargetValue.SetValue(1.0000);
// Set the shading correction target selector to green
camera.BslShadingCorrectionTargetSelector.SetValue(BslShadingCorrectionTargetSelector_Green);
// Set the shading correction target value for green to 1000
camera.BslShadingCorrectionTargetValue.SetValue(1.0000);
// Set the shading correction target selector to blue
camera.BslShadingCorrectionTargetSelector.SetValue(BslShadingCorrectionTargetSelector_Blue);
// Set the shading correction target value for blue to 1000
camera.BslShadingCorrectionTargetValue.SetValue(1.0000);

// Note: Valid for DSNU and PRNU:
// Create new shading correction data for the shading correction set selected
camera.BslShadingCorrectionSetCreate.Execute();
// Get the status of the shading correction set selected
BslShadingCorrectionSetStatus setStatus = camera.BslShadingCorrectionSetStatus.GetValue();
INodeMap& nodemap = camera.GetNodeMap();
// Set the type of shading correction to DSNU
CEnumParameter(nodemap, "BslShadingCorrectionSelector").SetValue("DSNU");
// Or for PRNU: Set the type of shading correction to PRNU
CEnumParameter(nodemap, "BslShadingCorrectionSelector").SetValue("PRNU");

// Note: Valid for DSNU and PRNU:
// Set the shading correction mode to User
CEnumParameter(nodemap, "BslShadingCorrectionMode").SetValue("User");
// Set the desired index number of the set to be created
CIntegerParameter(nodemap, "BslShadingCorrectionSetIndex").SetValue(1);
// Set the shading correction ROI selector to ROI 1
CEnumParameter(nodemap, "BslShadingCorrectionROISelector").SetValue("ROI1");
// Set the offset X of the ROI to 0
CIntegerParameter(nodemap, "BslShadingCorrectionROIOffsetX").SetValue(0);
// Set the ROI width to 2048
CIntegerParameter(nodemap, "BslShadingCorrectionROIWidth").SetValue(2048);

// Note: Valid for PRNU only:
// Set the shading correction target selector to red
CEnumParameter(nodemap, "BslShadingCorrectionTargetSelector").SetValue("Red");
// Set the shading correction target value for red to 1000
CFloatParameter(nodemap, "BslShadingCorrectionTargetValue").SetValue(1.0000);
// Set the shading correction target selector to green
CEnumParameter(nodemap, "BslShadingCorrectionTargetSelector").SetValue("Green");
// Set the shading correction target value for green to 1000
CFloatParameter(nodemap, "BslShadingCorrectionTargetValue").SetValue(1.0000);
// Set the shading correction target selector to blue
CEnumParameter(nodemap, "BslShadingCorrectionTargetSelector").SetValue("Blue");
// Set the shading correction target value for blue to 1000
CFloatParameter(nodemap, "BslShadingCorrectionTargetValue").SetValue(1.0000);

// Note: Valid for DSNU and PRNU:
// Create new shading correction data for the shading correction set selected
CCommandParameter(nodemap, "BslShadingCorrectionSetCreate").Execute();
// Get the status of the shading correction set selected
String_t setStatus = CEnumParameter(nodemap, "BslShadingCorrectionSetStatus").GetValue();
// Set the type of shading correction to DSNU
camera.Parameters[PLCamera.BslShadingCorrectionSelector].SetValue(PLCamera.BslShadingCorrectionSelector.DSNU);
// Or for PRNU: Set the type of shading correction to PRNU
camera.Parameters[PLCamera.BslShadingCorrectionSelector].SetValue(PLCamera.BslShadingCorrectionSelector.PRNU);

// Note: Valid for DSNU and PRNU:
// Set the shading correction mode to User
camera.Parameters[PLCamera.BslShadingCorrectionMode].SetValue(PLCamera.BslShadingCorrectionMode.User);
// Set the desired index number of the set to be created
camera.Parameters[PLCamera.BslShadingCorrectionSetIndex].SetValue(1);
// Set the shading correction ROI selector to ROI 1
camera.Parameters[PLCamera.BslShadingCorrectionROISelector].SetValue(PLCamera.BslShadingCorrectionROISelector.ROI1);
// Set the offset X of the ROI to 0
camera.Parameters[PLCamera.BslShadingCorrectionROIOffsetX].SetValue(0);
// Set the ROI width to 2048
camera.Parameters[PLCamera.BslShadingCorrectionROIWidth].SetValue(2048);

// Note: Valid for PRNU only:
// Set the shading correction target selector to red
camera.Parameters[PLCamera.BslShadingCorrectionTargetSelector].SetValue(PLCamera.BslShadingCorrectionTargetSelector.Red);
// Set the shading correction target value for red to 1000
camera.Parameters[PLCamera.BslShadingCorrectionTargetValue].SetValue(1.0000);
// Set the shading correction target selector to green
camera.Parameters[PLCamera.BslShadingCorrectionTargetSelector].SetValue(PLCamera.BslShadingCorrectionTargetSelector.Green);
// Set the shading correction target value for green to 1000
camera.Parameters[PLCamera.BslShadingCorrectionTargetValue].SetValue(1.0000);
// Set the shading correction target selector to blue
camera.Parameters[PLCamera.BslShadingCorrectionTargetSelector].SetValue(PLCamera.BslShadingCorrectionTargetSelector.Blue);
// Set the shading correction target value for blue to 1000
camera.Parameters[PLCamera.BslShadingCorrectionTargetValue].SetValue(1.0000);

// Note: Valid for DSNU and PRNU:
// Create new shading correction data for the shading correction set selected
camera.Parameters[PLCamera.BslShadingCorrectionSetCreate].Execute();
// Get the status of the shading correction set selected
string setStatus = camera.Parameters[PLCamera.BslShadingCorrectionSetStatus].GetValue();
/* 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 */
size_t len = 0;
char setStatus_str[64] = {0};
/* Set the type of shading correction to DSNU */
errRes = PylonDeviceFeatureFromString(hdev, "BslShadingCorrectionSelector", "DSNU");
CHECK(errRes);
/* Or for PRNU: Set the type of shading correction to PRNU */
errRes = PylonDeviceFeatureFromString(hdev, "BslShadingCorrectionSelector", "PRNU");
CHECK(errRes);

/* Note: Valid for DSNU and PRNU: */
/* Set the shading correction mode to User */
errRes = PylonDeviceFeatureFromString(hdev, "BslShadingCorrectionMode", "User");
CHECK(errRes);
/* Set the desired index number of the set to be created */
errRes = PylonDeviceSetIntegerFeature(hdev, "BslShadingCorrectionSetIndex", 1);
CHECK(errRes);
/* Set the shading correction ROI selector to ROI 1 */
errRes = PylonDeviceFeatureFromString(hdev, "BslShadingCorrectionROISelector", "ROI1");
CHECK(errRes);
/* Set the offset X of the ROI to 0 */
errRes = PylonDeviceSetIntegerFeature(hdev, "BslShadingCorrectionROIOffsetX", 0);
CHECK(errRes);
/* Set the ROI width to 2048 */
errRes = PylonDeviceSetIntegerFeature(hdev, "BslShadingCorrectionROIWidth", 2048);
CHECK(errRes);

/* Note: Valid for PRNU only: */
/* Set the shading correction target selector to red */
errRes = PylonDeviceFeatureFromString(hdev, "BslShadingCorrectionTargetSelector", "Red");
CHECK(errRes);
/* Set the shading correction target value for red to 1000 */
errRes = PylonDeviceSetFloatFeature(hdev, "BslShadingCorrectionTargetValue", 1.0000);
CHECK(errRes);
/* Set the shading correction target selector to green */
errRes = PylonDeviceFeatureFromString(hdev, "BslShadingCorrectionTargetSelector", "Green");
CHECK(errRes);
/* Set the shading correction target value for green to 1000 */
errRes = PylonDeviceSetFloatFeature(hdev, "BslShadingCorrectionTargetValue", 1.0000);
CHECK(errRes);
/* Set the shading correction target selector to blue */
errRes = PylonDeviceFeatureFromString(hdev, "BslShadingCorrectionTargetSelector", "Blue");
CHECK(errRes);
/* Set the shading correction target value for blue to 1000 */
errRes = PylonDeviceSetFloatFeature(hdev, "BslShadingCorrectionTargetValue", 1.0000);
CHECK(errRes);

/* Note: Valid for DSNU and PRNU: */
/* Create new shading correction data for the shading correction set selected */
errRes = PylonDeviceExecuteCommandFeature(hdev, "BslShadingCorrectionSetCreate");
CHECK(errRes);
/* Get the status of the shading correction set selected */
len = sizeof(setStatus_str);
errRes = PylonDeviceFeatureToString(hdev, "BslShadingCorrectionSetStatus", setStatus_str, &len);
CHECK(errRes);
# Set the type of shading correction to DSNU
camera.BslShadingCorrectionSelector.Value = "DSNU"
# Or for PRNU: Set the type of shading correction to PRNU
camera.BslShadingCorrectionSelector.Value = "PRNU"

# Note: Valid for DSNU and PRNU:
# Set the shading correction mode to User
camera.BslShadingCorrectionMode.Value = "User"
# Set the desired index number of the set to be created
camera.BslShadingCorrectionSetIndex.Value = 1
# Set the shading correction ROI selector to ROI 1
camera.BslShadingCorrectionROISelector.Value = "ROI1"
# Set the offset X of the ROI to 0
camera.BslShadingCorrectionROIOffsetX.Value = 0
# Set the ROI width to 2048
camera.BslShadingCorrectionROIWidth.Value = 2048

# Note: Valid for PRNU only:
# Set the shading correction target selector to red
camera.BslShadingCorrectionTargetSelector.Value = "Red"
# Set the shading correction target value for red to 1000
camera.BslShadingCorrectionTargetValue.Value = 1.0000
# Set the shading correction target selector to green
camera.BslShadingCorrectionTargetSelector.Value = "Green"
# Set the shading correction target value for green to 1000
camera.BslShadingCorrectionTargetValue.Value = 1.0000
# Set the shading correction target selector to blue
camera.BslShadingCorrectionTargetSelector.Value = "Blue"
# Set the shading correction target value for blue to 1000
camera.BslShadingCorrectionTargetValue.Value = 1.0000

# Note: Valid for DSNU and PRNU:
# Create new shading correction data for the shading correction set selected
camera.BslShadingCorrectionSetCreate.Execute()
# Get the status of the shading correction set selected
setStatus = camera.BslShadingCorrectionSetStatus.Value

또한 pylon Viewer를 사용하여 파라미터를 손쉽게 설정할 수 있습니다.