Light Source Preset (dart E)#
이미지 취득에 사용되는 빛은 고유한 색온도에 따라 이미지에 색 편차를 유발할 수 있습니다. 관련 Light Source Preset을 선택하여 이러한 색 편차를 보정할 수 있습니다.
기능 사용법#
Light Source Preset 선택하기#
Light Source Preset을 선택하려면 다음을 설정하십시오. LightSourcePreset 파라미터.
사용 가능한 프리셋은 다음에 따라 달라집니다. BalanceWhiteAuto 파라미터 설정.
- 만약
BalanceWhiteAuto로 설정된 경우Continuous,LightSourcePreset로 설정된 경우Auto, 그리고 Light Source Preset이 자동으로 결정됩니다. -
만약
BalanceWhiteAuto로 설정된 경우Off, 다음 프리셋을 사용할 수 있습니다:CoolWhiteFluorescent4250K: 약 4 250 K의 색온도를 가진 형광등 조명으로 인해 발생하는 색 편차를 카메라가 보정합니다.Daylight5000K: 약 5 000 K의 색온도를 가진 주광 조명으로 인해 발생하는 색 편차를 카메라가 보정합니다.Daylight6500K: 약 6 500 K의 색온도를 가진 주광 조명으로 인해 발생하는 색 편차를 카메라가 보정합니다.Daylight7500K: 약 7 500 K의 색온도를 가진 주광 조명으로 인해 발생하는 색 편차를 카메라가 보정합니다.Horizon2500K: 약 2 500 K의 색온도를 가진 수평광 조명으로 인해 발생하는 색 편차를 카메라가 보정합니다.Manual: 색온도를 수동으로.Tungsten2800K: 약 2 500 ~ 3 000 K의 색온도를 가진 텅스텐 조명으로 인해 발생하는 색 편차를 카메라가 보정합니다.
색온도 가져오기 또는 설정하기#
이 BslLightSourceColorTemperature 파라미터는 현재 선택된 Light Source Preset의 색온도를 나타냅니다.
또한 Light Source Preset이 다음으로 설정된 경우 Manual, 이 파라미터를 통해 색온도를 수동으로 설정할 수 있습니다.
외부 링크#
샘플 코드#
// 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
You can also use the pylon Viewer to easily set the parameters.