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

飽和度#

利用 Saturation camera feature,您只需一個步驟即可調整影像中所有顏色的外觀。

使用此功能#

調整 Saturation#

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

若要調整飽和度,請輸入 BslSaturation parameter。依預設,此 parameter 會設為 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 輕鬆設定參數。