Light Source Preset (dart E)#
特定の色温度に応じて、画像取得に使用される光が画像内でカラーシフトを引き起こす可能性があります。これらのカラーシフトは、関連する光源の初期値を選択して修正できます。
機能を使用する#
Light Source Presetの選択#
To select a light source preset, set the LightSourcePreset
parameter.
Which presets are available depends on the BalanceWhiteAuto
parameter setting.
- If the
BalanceWhiteAuto
parameter is set toContinuous
, theLightSourcePreset
parameter is set toAuto
, and the light source preset is determined automatically. -
If the
BalanceWhiteAuto
parameter is set toOff
, the following presets are available:CoolWhiteFluorescent4250K
: The camera corrects color shifts caused by fluorescent lighting that has a color temperature of about 4 250 K.Daylight5000K
: The camera corrects color shifts caused by daylight lighting that has a color temperature of about 5 000 K.Daylight6500K
: The camera corrects color shifts caused by daylight lighting that has a color temperature of about 6 500 K.Daylight7500K
: The camera corrects color shifts caused by daylight lighting that has a color temperature of about 7 500 K.Horizon2500K
: The camera corrects color shifts caused by horizon lighting that has a color temperature of about 2 500 K.手動
: The color temperature can be set manually.Tungsten2800K
: The camera corrects color shifts caused by tungsten lighting that has a color temperature of about 2 500 to 3 000 K.
色温度の取得または設定#
イメージ BslLightSourceColorTemperature
parameter indicates the color temperature of the currently selected light source preset.
Also, if the light source preset is set to 手動
, the parameter allows you to manually set the color temperature.
外部リンク#
サンプルコード#
// Set the light source preset to Daylight5000K
camera.LightSourcePreset.SetValue(LightSourcePreset_Daylight5000K);
// Get the color temperature of the currently selected light source preset
int64_t i = camera.BslLightSourceColorTemperature.GetValue();
// Set the light source preset to Manual
camera.LightSourcePreset.SetValue(LightSourcePreset_Manual);
// Manually set the color temperature
camera.BslLightSourceColorTemperature.SetValue(7334);
INodeMap& nodemap = camera.GetNodeMap();
// Set the light source preset to Daylight5000K
CEnumParameter(nodemap, "LightSourcePreset").SetValue("Daylight5000K");
// Get the color temperature of the currently selected light source preset
int64_t i = CIntegerParameter(nodemap, "BslLightSourceColorTemperature").GetValue();
// Set the light source preset to Manual
CEnumParameter(nodemap, "LightSourcePreset").SetValue("Manual");
// Manually set the color temperature
CIntegerParameter(nodemap, "BslLightSourceColorTemperature").SetValue(7334);
// Set the light source preset to Daylight5000K
camera.Parameters[PLCamera.LightSourcePreset].SetValue(PLCamera.LightSourcePreset.Daylight5000K);
// Get the color temperature of the currently selected light source preset
Int64 i = camera.Parameters[PLCamera.BslLightSourceColorTemperature].GetValue();
// Set the light source preset to Manual
camera.Parameters[PLCamera.LightSourcePreset].SetValue(PLCamera.LightSourcePreset.Manual);
// Manually set the color temperature
camera.Parameters[PLCamera.BslLightSourceColorTemperature].SetValue(7334);
/* 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 */
int64_t i = 0;
/* Set the light source preset to Daylight5000K */
errRes = PylonDeviceFeatureFromString(hdev, "LightSourcePreset", "Daylight5000K");
CHECK(errRes);
/* Get the color temperature of the currently selected light source preset */
errRes = PylonDeviceGetIntegerFeature(hdev, "BslLightSourceColorTemperature", &i);
CHECK(errRes);
/* Set the light source preset to Manual */
errRes = PylonDeviceFeatureFromString(hdev, "LightSourcePreset", "Manual");
CHECK(errRes);
/* Manually set the color temperature */
errRes = PylonDeviceSetIntegerFeature(hdev, "BslLightSourceColorTemperature", 7334);
CHECK(errRes);
# Set the light source preset to Daylight5000K
camera.LightSourcePreset.Value = "Daylight5000K"
# Get the color temperature of the currently selected light source preset
i = camera.BslLightSourceColorTemperature.Value
# Set the light source preset to Manual
camera.LightSourcePreset.Value = "Manual"
# Manually set the color temperature
camera.BslLightSourceColorTemperature.Value = 7334
pylonViewerアを使用して、パラメーターを簡単に設定することもできます。