콘텐츠로 바로 가기
STAGING SERVER
DEVELOPMENT SERVER

Light Source Preset (dart E)#

Light Source Preset 카메라 기능을 사용하면 특정 광원으로 인해 발생하는 색조 편차를 보정할 수 있습니다.

이미지 취득에 사용되는 조명은 특정 색온도에 따라 이미지에 색조 편차를 유발할 수 있습니다. 관련 Light Source Preset을 선택하여 이러한 색조 편차를 보정할 수 있습니다.

기능 사용#

Light Source Preset 선택#

Light Source Preset을 선택하려면 다음을 설정하십시오: LightSourcePreset 파라미터에 HTML 로그 파일(*.html)의 경로와 이름을 지정할 수 있습니다.

사용 가능한 프리셋은 다음과 관련이 있습니다. BalanceWhiteAuto 파라미터 설정.

  • 카메라 모델에서 BalanceWhiteAuto 파라미터가 다음으로 설정된 경우에만 Light Control 기능과 함께 사용할 수 있음을 명시했습니다. Continuous, LightSourcePreset 파라미터가 다음으로 설정된 경우에만 Light Control 기능과 함께 사용할 수 있음을 명시했습니다. Auto, and the light source preset is determined automatically.
  • 카메라 모델에서 BalanceWhiteAuto 파라미터가 다음으로 설정된 경우에만 Light Control 기능과 함께 사용할 수 있음을 명시했습니다. 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의 색온도를 가진 텅스텐 조명으로 인해 발생하는 색조 편차를 카메라가 보정합니다.

색온도 가져오기 또는 설정#

The BslLightSourceColorTemperature parameter indicates the color temperature of the currently selected light source preset.

또한, light source preset이 다음으로 설정된 경우: Manual, 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

pylon Viewer를 사용하여 매개변수를 간편하게 설정할 수도 있습니다.