콘텐츠로 바로 가기
STAGING SERVER
DEVELOPMENT SERVER

Shading Correction#

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

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

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

기능 사용#

작동 방식#

DSNU 및 PRNU Correction#

Shading correction은 DSNU(Dark Signal Non-Uniformities) 및 PRNU(Photo Response Non-Uniformities)로 인해 발생하는 이미지 아티팩트를 최소화합니다. 카메라에서는 다음과 같은 두 가지 유형의 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라는 파일에 저장됩니다. 다음과 같은 두 가지 유형이 있습니다.

  • Factory correction set: 카메라 생산 과정에서 카메라에 저장된 보정 값을 포함합니다. Factory correction set은 dark signal non-uniformities(DSNU)로 인해 발생하는 이미지 아티팩트만 줄일 수 있습니다.

  • User correction set: 사용자가 직접 생성하여 카메라에 저장해야 하는 보정 값을 포함합니다. 카메라 모델에 따라 최대 32개의 user correction set을 생성할 수 있습니다.

    user shading correction 파일을 다운로드하거나 업로드할 수 있습니다.

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 파일 업로드#

정보

  • user shading correction 파일을 카메라에 업로드하는 경우, 선택한 correction set이 보정 데이터를 로드할 카메라에서 생성되었는지 확인하십시오.
  • Basler는 편집된 user shading correction 파일을 업로드하지 않을 것을 강력히 권장합니다.

pylon Viewer를 사용하여 user 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 파라미터가 다음으로 설정된 경우에만 Light Control 기능과 함께 사용할 수 있음을 명시했습니다. User 그리고 다음을 설정합니다. BslShadingCorrectionSetIndex 파라미터가 해당 인덱스 번호로 설정되어 있습니다.

Shading Correction Mode#

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

Shading Correction 모드를 설정하려면, BslShadingCorrectionMode 파라미터를 설정하십시오:

  • Factory (기본값): Shading Correction은 에 저장된 값을 기반으로 합니다. factory 보정 세트.
  • User: Shading Correction은 다음 위치에 저장된 값을 기반으로 합니다. user 보정 세트.
  • Off: 카메라는 다음을 수행하지 않습니다. 않습니다 Shading Correction을 수행합니다.

Shading Correction Set 생성#

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

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

정보

  • 최상의 결과를 얻으려면 일반 작동 시와 마찬가지로 광학 장치, 라인 레이트, Exposure Time, 게인 및 카메라 온도를 조정하십시오. Basler는 실제 애플리케이션 환경에서 암시야 및 명시야 이미지를 획득할 것을 권장합니다.
  • racer 2 L 카메라: Dual(또는 Quad) Line 센서 수집 모드, Single(또는 Dual) Line 모드에서 생성된 Shading Correction 세트의 상태는 비어 있는 것으로 표시되지만(BslShadingCorrectionSetStatus = 비어 있음), 이 세트에 이미 보정 데이터가 존재합니다.
    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 correction 데이터를 생성하는 동안 PRNU correction 세트가 활성화되어 있으면, PRNU correction 값은 계산에서 무시됩니다.

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

  9. Shading Correction 세트 생성 결과를 확인하려면 다음의 값을 가져오십시오. BslShadingCorrectionSetCreateResult 파라미터에 HTML 로그 파일(*.html)의 경로와 이름을 지정할 수 있습니다.

PRNU Correction Set#

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

  1. 카메라의 전체 시야각에 흰색 종이를 놓는 등의 방식으로 센서를 70% 포화도까지 균일하게 조명합니다.
  2. 파라미터를 원하는 BslShadingCorrectionSelector 파라메터 PRNU.
  3. 파라미터를 원하는 BslShadingCorrectionMode 파라메터 User.
  4. 파라미터를 원하는 BslShadingCorrectionSetIndex 파라미터를 생성할 세트의 원하는 인덱스 번호(예: 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장의 명시야(bright) 이미지를 획득하여 평가합니다. 결과 생성된 PRNU correction 데이터는 선택한 Shading Correction 세트에 수집되어 카메라의 플래시 메모리에 저장됩니다. 예를 들어 인덱스 번호 2번인 Shading Correction 세트에 이미 correction 데이터가 있는 경우, 기존 데이터는 덮어쓰여지고 새로운 correction 값으로 대체됩니다.

    정보

    PRNU correction 데이터를 생성하는 동안 DSNU correction 세트가 활성화되어 있으면, DSNU correction 값은 계산에 반영됩니다.

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

  9. Shading Correction 세트 생성 결과를 확인하려면 다음의 값을 가져오십시오. BslShadingCorrectionSetCreateResult 파라미터에 HTML 로그 파일(*.html)의 경로와 이름을 지정할 수 있습니다.

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

PRNU Correction을 위한 목표 회색조 값 조정#

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

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

PRNU correction의 목표 회조 값을 조정하려면:

  1. 파라미터를 원하는 BslShadingCorrectionTargetSelector 파라미터를 설정하십시오:
    • All (모노 카메라 전용): 목표 회조 값은 모든 센서 라인에 적용됩니다.
    • Red, Green, Blue (컬러 카메라 전용): 목표 회조 값은 각 컬러 채널에 적용됩니다.
  2. 파라미터를 원하는 BslShadingCorrectionTargetValue 파라미터를 원하는 상대 목표 회조 값으로 설정합니다.
  3. 컬러 카메리를 사용하는 경우 1단계와 2단계를 반복하여 다른 컬러 채널에도 원하는 목표 회조 값을 적용하십시오.

정보

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

기타 파라미터:

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

Shading Correction Set 활성화#

Shading Correction 세트를 활성화하려면:

  1. 파라미터를 원하는 BslShadingCorrectionMode 파라메터 User, 사용자 정의 correction 세트를 활성화하려면 또는 다음을 위해 Factory, 팩토리 Shading Correction 세트를 활성화하려면 다음과 같이 설정합니다.
  2. 파라미터를 원하는 BslShadingCorrectionSetIndex 파라미터를 사용할 세트의 인덱스 번호(예: 인덱스 번호 2)로 설정합니다.

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

  3. 이 프로세스가 성공적으로 완료되었는지 확인하려면 다음의 값을 가져옵니다. BslShadingCorrectionSetStatus 매개변수. 값이 Ok인 경우, Shading 세트가 성공적으로 활성화된 것입니다. 이제 카메라는 선택된 Shading Correction 세트의 보정 값을 기반으로 Shading Correction을 수행합니다.

정보

이미지 취득 중에도 Shading Correction 세트를 변경할 수 있습니다. 단, 이 과정에서 미세한 이미지 아티팩트가 발생할 수 있습니다.

Shading Correction 비활성화#

Shading Correction을 비활성화하려면 다음을 설정합니다. BslShadingCorrectionMode 파라메터 Off.

세부 정보#

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

Camera Model 취득당 최대 노출 라인 수 사용 가능한 Shading Correction 세트 수
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를 사용하여 파라미터를 손쉽게 설정할 수도 있습니다.