Light Source Preset (dart E)#
이미지 취득에 사용되는 조명은 특정 색온도에 따라 이미지에 색조 편향을 유발할 수 있습니다. 관련 Light Source Preset을 선택하여 이러한 색조 편향을 보정할 수 있습니다.
Using the Feature#
Light Source Preset 선택#
Light Source Preset을 선택하려면 다음을 설정하십시오. LightSourcePreset parameter를 사용하십시오.
사용 가능한 프리셋은 다음 항목에 따라 다릅니다. 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: 색온도를 설정할 수 있습니다. manually.Tungsten2800K: 색온도가 약 2 500 ~ 3 000 K인 텅스텐 조명으로 인해 발생하는 색조 편향을 카메라가 보정합니다.
色温度 가져오기 또는 설정#
The BslLightSourceColorTemperature 파라미터는 현재 선택된 Light Source Preset의 색온도를 나타냅니다.
또한, Light Source Preset이 다음으로 설정된 경우: Manual, 이 매개변수를 사용하면 색온도를 수동으로 설정할 수 있습니다.
외부 링크#
Sample Code#
// 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
pylon Viewer를 사용하여 파라미터를 손쉽게 설정할 수도 있습니다.