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

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 ` 來輕鬆設定參數。