Shading Correction#
Shading Correctionは、カメラに保存され適切な補正データを含むファイルをベースにしています。画像取得時にこれらが元のピクセル値に適用されるため、画像が向上します。
Shading Correction機能は、racer 2カメラでのみ使用できます。
機能を使用する#
仕組み#
DSNU および PRNU Correction#
Shading Correctionにより、暗時出力不均一性(DSNU)および光応答不均一性(PRNU)に起因する画像アーティファクトが最小限に抑えられます。カメラでは、次の2種類のShading Correctionを利用できます。
-
DSNU Correction: カメラが完全な暗闇の中でラインをキャプチャする場合、そのライン内のすべてのピクセル値はほぼゼロであり、等しくなるはずです。実際には、センサー内のピクセル性能のわずかなバラつきにより、カメラが暗闇の中でラインをキャプチャする際に、カメラから出力されるピクセル値に多少の変動が生じます。DSNU Correctionはこの種の変動を補正します。取得されたライン内の各ピクセル値に個別のグレイ値(オフセット)を加算することで機能します。
-
PRNU Correction: カメラが明るく均一に照明された表面を向いた状態でラインをキャプチャする場合、そのライン内のすべてのピクセル値は最大グレイ値に近く、等しくなるはずです。実際には、センサー内のピクセル性能のわずかなバラつきや、光学系および照明の変動により、カメラから出力されるピクセル値に変動が生じます。PRNU Correctionはこの種の変動を補正します。取得されたライン内の各ピクセル値に個別の乗数(ゲイン)を適用することで機能します。
Shading Correctionはピクセル単位のキャリブレーション方法であり、つまり各ピクセルに対して補正値が計算されます。
情報
カメラを設定して、DSNU Correctionのみ、PRNU Correctionのみ、または両方のShading Correctionを実行させることができます。両方のShading Correctionを実行する場合、カメラは最初にDSNU Correctionを実行し、次にPRNU Correctionを実行します。
Shading Correction セット#
DSNU CorrectionおよびPRNU Correctionで使用される補正値は、Shading Correction Setと呼ばれるファイルに保存されます。次の2種類があります。
-
Factory Correction Set: カメラの製造プロセス中にカメラに保存された補正値が含まれています。Factory Correction Setは、暗時出力不均一性(DSNU)に起因する画像アーティファクトのみを軽減できます。
-
User Correction Set: ユーザーが作成しカメラに保存する必要がある補正値が含まれています。カメラモデルに応じて、最大32個のUser Correction Setを作成できます。
Shading Correction ファイルのダウンロード#
情報
- Shading Correctionファイルをダウンロードすることは、補正データのバックアップに役立ちます。
- ファームウェアアップデートを実行する前に、補正ファイルをバックアップすることを強くお勧めします。
- ダウンロードしたShading Correctionファイルを編集しないでください。
pylon Viewerを使用してShading Correctionファイルをダウンロードするには:
- pylon Viewerで、Shading Correctionデータファイルをダウンロードするカメラを開きます。
- pylon Viewerの[カメラ]メニューで、[ファイルアクセス]をクリックします。
- Camera Fileドロップダウンボックスで、ダウンロードするファイルに応じてPRNU CorrectionまたはDSNU Correctionを選択します。
適切なエントリがない場合、お使いのカメラではShading Correctionファイルのダウンロードはサポートされていません。 - [ダウンロード]をクリックし、ファイルを保存するディレクトリーに移動して、任意のファイル名を入力します。
- [Save]をクリックします。
- Camera File Accessダイアログを閉じます。
Shading Correction ファイルのアップロード#
情報
- ユーザーのShading Correctionファイルをカメラにアップロードする場合は、選択した補正セットが、補正データを読み込むカメラ上で作成されたものであることを確認してください。
- 編集したユーザーShading Correctionファイルはアップロードしないことを強くお勧めします。
pylon Viewerを使用してユーザーShading Correctionファイルをアップロードするには:
- pylon Viewerで、Shading Correctionデータファイルをアップロードするカメラを開きます。
- pylon Viewerの[カメラ]メニューで、[ファイルアクセス]をクリックします。
- Camera Fileドロップダウンボックスで、PRNU CorrectionまたはDSNU Correctionを選択します。
PRNU CorrectionまたはDSNU Correctionのエントリがない場合、お使いのカメラでは補正ファイルのアップロードがサポートされていません。 - [Upload]をクリックして、アップロードするファイルに移動します。
- [開く]をクリックします。
- Camera File Accessダイアログを閉じます。
アップロード後にShading Correctionファイルを適用するには、次のことを確認してください。 BslShadingCorrectionMode パラメータが次のように設定されていること: 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、ゲイン、カメラ温度を調整してください。暗電流画像と明視野画像は、実際のアプリケーション環境で取得することをお勧めします。
- racer 2 L cameras: Dual (または Quad) Line センサー取得モードでは、Single (または Dual) Line モードで作成された Shading Correction セットのステータスは空として表示されます (
BslShadingCorrectionSetStatus= Empty)。ただし、このセットにはすでに補正データが存在します。
Dual または Quad Line モードで新しい Shading Correction セットを作成する場合は、行数がより少ないモードで作成した補正セットのインデックス番号を確認してください。インデックス番号がすでに使用されている場合は、新しいセット用に別の番号を選択してください。そうしないと、補正データが上書きされ、新しい補正値に置き換えられます。
DSNU Correction Set#
DSNU correction の Shading Correction セットを作成するには:
- レンズにプラスチックキャップを装着するなどして、カメラのセンサーに光が当たらないようにします。
- パラメーターを
BslShadingCorrectionSelectorパラメータをDSNU. - パラメーターを
BslShadingCorrectionModeパラメータをUser. - パラメーターを
BslShadingCorrectionSetIndex作成するセットの希望するインデックス番号(例:1)にパラメータを設定します。 - パラメーターを
BslShadingCorrectionROISelector希望する Shading Correction ROI(例:ROI 1)にパラメータを設定します。 - 必要に応じて、次のパラメータを使用して Shading Correction ROI の位置とサイズを設定します。
BslShadingCorrectionROIOffsetX:センサーの左端からの Shading Correction ROI の水平オフセット(ピクセル単位)。BslShadingCorrectionROIWidth:Shading Correction ROI の幅(ピクセル単位)。
- image acquisition を開始するには、pylon Viewer のツールバーにある Continuous Shot ボタンをクリックします。
-
実行します:
BslShadingCorrectionSetCreate新しい Shading Correction セットを作成するコマンド。
合計 256 枚のダーク画像が取得され、評価されます。生成された DSNU 補正データは、定義された Shading Correction セットに収集され、カメラのフラッシュ Memory に保存されます。たとえばインデックス番号 1 の Shading Correction セットにすでに補正データが含まれている場合、これらは上書きされ、新しい補正値に置き換えられます。情報
DSNU 補正データの作成時に PRNU 補正セットが有効になっている場合、計算では PRNU 補正値が無視されます。
作成された Shading Correction セットは自動的に有効になります。
-
Shading Correction セット作成の結果を確認するには、次の値を取得します:
BslShadingCorrectionSetCreateResultパラメータ。
PRNU Correction Set#
PRNU correction の Shading Correction セットを作成するには:
- カメラの視野全体に白い紙を置くなどして、センサーを 70 % の飽和度まで均一に照明します。
- パラメーターを
BslShadingCorrectionSelectorパラメータをPRNU. - パラメーターを
BslShadingCorrectionModeパラメータをUser. - パラメーターを
BslShadingCorrectionSetIndex作成するセットの希望するインデックス番号(例:2)にパラメータを設定します。 - パラメーターを
BslShadingCorrectionROISelector希望する Shading Correction ROI(例:ROI 1)にパラメータを設定します。 - 必要に応じて、次のパラメータを使用して Shading Correction ROI の位置とサイズを設定します。
BslShadingCorrectionROIOffsetX:センサーの左端からの Shading Correction ROI の水平オフセット(ピクセル単位)。BslShadingCorrectionROIWidth:Shading Correction ROI の幅(ピクセル単位)。
- image acquisition を開始するには、pylon Viewer のツールバーにある Continuous Shot ボタンをクリックします。
-
実行します:
BslShadingCorrectionSetCreate新しい Shading Correction セットを作成するコマンド。
合計 256 枚の明画像が取得され、評価されます。生成された PRNU 補正データは、選択した Shading Correction セットに収集され、カメラのフラッシュ Memory に保存されます。たとえばインデックス番号 2 の Shading Correction セットにすでに補正データが含まれている場合、これらは上書きされ、新しい補正値に置き換えられます。情報
PRNU correctionデータの作成時にDSNU correctionセットが有効になっている場合、DSNU correction値が計算に考慮されます。
作成された Shading Correction セットは自動的に有効になります。
-
Shading Correction セット作成の結果を確認するには、次の値を取得します:
BslShadingCorrectionSetCreateResultパラメータ。 - 必要に応じて、PRNU correctionの目標グレイ値を調整し、ステップ7を繰り返します。カラーカメラを使用している場合は、カラーチャンネルごとにPRNU correctionの目標グレイ値を個別に調整し、ステップ7を繰り返します。
PRNU Correctionのターゲットグレイ値の調整#
PRNU correctionセットの作成中、カメラは明視野画像内の最大輝度値を検知します。ただし、達成したいセンサー輝度の相対的な目標グレイ値を調整したい場合もあります。考えられる理由は次のとおりです。
- 補正値が許容範囲外であるため、Shading Correctionセットを作成できません。
- 画像上の明るいスポット(光の反射などによるもの)により、correctionセットの作成時にカメラによって検知される最大輝度値が高くなります。補正データを改善するために、補正データの計算に関連するこの値を減らすことをお勧めします。
PRNU correctionの目標グレイ値を調整するには:
- パラメーターを
BslShadingCorrectionTargetSelectorパラメーターを次のいずれかの値に設定します。All(モノクロカメラのみ):目標グレイ値はすべてのセンサーラインに適用されます。Red,Green,Blue(カラーカメラのみ):目標グレイ値はそれぞれのカラーチャンネルに適用されます。
- パラメーターを
BslShadingCorrectionTargetValueパラメータを希望の相対目標グレイ値に設定します。 - カラーカメラを使用している場合は、ステップ1と2を繰り返して、希望する目標グレイ値を他のカラーチャンネルに適用します。
情報
- イメージ
BslShadingCorrectionTargetValueパラメータは、次の状況でのみ使用できます: PRNU 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セットを有効にするには:
- パラメーターを
BslShadingCorrectionModeパラメータをUser、ユーザー定義のcorrectionセットを有効にする場合、またはFactory、工場出荷時のcorrectionセットを有効にする場合。 -
パラメーターを
BslShadingCorrectionSetIndexパラメータを使用するセットのインデックス番号(インデックス番号2など)に設定します。Shading Correctionセットが自動的に有効になります。
-
このプロセスが成功したかどうかを確認するには、次の値を取得します:
BslShadingCorrectionSetStatusパラメータ。値がOk、Shading Correction セットが正常に有効化されました。カメラは現在、選択された Shading Correction セット内の補正値に基づいて Shading Correction を実行しています。
情報
Shading Correction セットの変更は、画像取り込み中にも行うことができます。ただし、その処理中にわずかな画像アーティファクトが発生する場合があります。
Shading Correctionの無効化#
Shading Correction を無効にするには、次のように設定します: BslShadingCorrectionMode パラメータを Off.
特性#
次の表は、racer 2 カメラで使用可能な Shading Correction セットの数を示しています。
| カメラモデル | 1 回の取り込みあたりに露光される最大ライン数 | 利用可能な 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を使用して、パラメーターを簡単に設定することもできます。