跳转到内容

饱和度#

The Saturation camera feature allows you to adjust the appearance of all colors in your images in a single step.

该功能的使用#

调整饱和度#

调整饱和度会改变色彩的鲜艳程度(强度)。例如,较高的饱和度会使颜色更容易区分。

To adjust the saturation, enter a value for the BslSaturation parameter. By default, the parameter is set to 1 (normal saturation).

较低的参数值会导致更接近灰色的更为柔和的颜色。较高的参数值会产生更鲜艳的色彩。

示例代码#

// Set the Saturation parameter to 1.4
camera.BslSaturation.SetValue(1.4);
INodeMap& nodemap = camera.GetNodeMap();
// Set the Saturation parameter to 1.4
CFloatParameter(nodemap, "BslSaturation").SetValue(1.4);
// Set the Saturation parameter to 1.4
camera.Parameters[PLCamera.BslSaturation].SetValue(1.4);
/* 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 */
/* Set the Saturation parameter to 1.4 */
errRes = PylonDeviceSetFloatFeature(hdev, "BslSaturation", 1.4);
CHECK(errRes);
# Set the Saturation parameter to 1.4
camera.BslSaturation.Value = 1.4

You can also use the pylon Viewer to easily set the parameters.