跳至內容
測試伺服器
開發伺服器

飽和度#

Saturation camera feature 可讓您在單一步驟中調整影像中所有顏色的外觀。

使用此功能#

調整 Saturation#

調整飽和度會變更顏色的鮮豔度(強度)。例如,較高的飽和度可使顏色更容易區分。

若要調整飽和度,請為 BslSaturation 參數輸入數值。依預設,此參數會設為 1 (正常飽和度)。

較低的參數值會產生更接近灰階的柔和色彩。較高的參數值則會產生更鮮豔生動的色彩。

範例程式碼#

// 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

您也可以使用 pylon Viewer 輕鬆設定參數。