コンテンツにスキップ

Pattern Removal Auto#

Pattern Removal Autoカメラ機能は、モノクロ画像のチェッカーパターンの形成を抑制します。

機能を使用する#

Pattern Removal Autoを使用する理由#

一部のカメラで出力される画像には、重なったチェッカーパターンに似たアーチファクトが表示される場合があります。これは、特定のセンサー設計によるものです。センサーアレイ内の2 x 2画素は、入射がセンサーの表面に対して垂直である場合にのみ、光に対して同じように反応します。傾斜角で光が届くと、若干異なる反応を示します。これにより、画像のチェッカーパターンが生成されます。

元のピクセル値に適切な補正係数が適用されていることを確認することで、チェッカーパターンを抑制できます。補正係数は、画像取得ごとに自動的に適用されます。

Pattern Removal Autoを使用すると、補正係数の値が画像取得ごとに適切であることを確認できます。この値は、Pattern Removal Autoを使用したときに存在していた特定の撮像条件でのみ有効です。

特性#

Pattern Removal Autoオートファンクションは、他のオートファンクションとは異なる点があります。

  • オートファンクションROIを指定する必要はありません。
  • 目標値を指定する必要はありません。その代わりに、オートファンクションが、チェッカーパターンを可能な限り削除する補正係数値を生成します。
  • Only the Once operating mode is available.

Enabling and Using Pattern Removal Auto#

Pattern Removal Autoオートファンクションを使用するには、次の手順に従います。

  1. 画像ROIを最大サイズに設定します。
  2. 可能であれば、均一な照明を確立します。
  3. 補正値の生成を妨げる可能性のあるすべてのカメラ機能(Gain AutoExposure AutoSequencerなど)を無効にします。
  4. Adjust the camera settings (e.g., Exposure Time, Black Level, and Digital Shift) as desired. For best results, the gray values should be homogeneous across the image.
  5. Set the PatternRemovalAuto parameter to Once.
  6. Acquire three images. Make sure that the target scene doesn't change between acquisitions.
    The camera generates and applies optimum correction values for the current imaging conditions. This occurs instantaneously and has no effect on the camera's frame rate. After the third acquisition, the PatternRemovalAuto parameter is automatically set to Off.
  7. 必要に応じて、画像ROIを元のサイズに戻します。

生成された補正値は、次のいずれかのイベントが発生するまで適用されます。

  • PatternRemovalAuto is set to Once.
  • カメラの電源が切断される。(補正値が失われないようにするには、補正値を保存のこと。)
  • 異なる補正値を持つユーザーセットがロードされる。

Repeating the Pattern Removal Auto Process#

関連する撮像条件のいずれかが変更された場合は、Pattern Removal Autoプロセスを繰り返す必要があります。これにより、変更された条件でもチェッカーパターンが確実に削除され、ピクセル値が不必要に変更されることがなくなります。

関連する撮像条件には、次のものがあります。

  • 光学系:レンズ、絞り、焦点の変更。
  • 照明:照明の種類、光源の配置、明るさの変更。
  • 機能設定:チェッカーパターンは、いくつかのカメラ機能、特に、Exposure TimeBinning画像ROIBlack LevelDigital Shiftの影響を受けることがあります。

Saving the Correction Values#

カメラが電源から切断されると、Pattern Removal Autoオートファンクションによって生成された補正値は失われます

ただし、修正値はユーザーセットに保存できます。このユーザーセットは、修正値を再度使用するときにいつでもロードできます。

補正値をロードするときは、撮像条件が、補正値が生成されたときと同じであることを確認してください。

サンプルコード#

// 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を使用して、パラメーターを簡単に設定することもできます。