// Set the light source preset to Daylight5000Kcamera.LightSourcePreset.SetValue(LightSourcePreset_Daylight5000K);// Get the color temperature of the currently selected light source presetint64_ti=camera.BslLightSourceColorTemperature.GetValue();// Set the light source preset to Manualcamera.LightSourcePreset.SetValue(LightSourcePreset_Manual);// Manually set the color temperaturecamera.BslLightSourceColorTemperature.SetValue(7334);
INodeMap&nodemap=camera.GetNodeMap();// Set the light source preset to Daylight5000KCEnumParameter(nodemap,"LightSourcePreset").SetValue("Daylight5000K");// Get the color temperature of the currently selected light source presetint64_ti=CIntegerParameter(nodemap,"BslLightSourceColorTemperature").GetValue();// Set the light source preset to ManualCEnumParameter(nodemap,"LightSourcePreset").SetValue("Manual");// Manually set the color temperatureCIntegerParameter(nodemap,"BslLightSourceColorTemperature").SetValue(7334);
// Set the light source preset to Daylight5000Kcamera.Parameters[PLCamera.LightSourcePreset].SetValue(PLCamera.LightSourcePreset.Daylight5000K);// Get the color temperature of the currently selected light source presetInt64i=camera.Parameters[PLCamera.BslLightSourceColorTemperature].GetValue();// Set the light source preset to Manualcamera.Parameters[PLCamera.LightSourcePreset].SetValue(PLCamera.LightSourcePreset.Manual);// Manually set the color temperaturecamera.Parameters[PLCamera.BslLightSourceColorTemperature].SetValue(7334);
/* Macro to check for errors */#define CHECK(errc) if (GENAPI_E_OK != errc) printErrorAndExit(errc)GENAPIC_RESULTerrRes=GENAPI_E_OK;/* Return value of pylon methods */int64_ti=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 Daylight5000Kcamera.LightSourcePreset.Value="Daylight5000K"# Get the color temperature of the currently selected light source preseti=camera.BslLightSourceColorTemperature.Value# Set the light source preset to Manualcamera.LightSourcePreset.Value="Manual"# Manually set the color temperaturecamera.BslLightSourceColorTemperature.Value=7334
You can also use the pylon Viewer to easily set the parameters.