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

Gamma#

Gamma 相機功能可讓您最佳化所擷取影像的亮度,以便在監視器上顯示。

使用功能#

運作原理#

相機會根據下列公式,將 Gamma 修正值 ($\gamma$) 套用到每個像素的亮度值(以彩色相機的紅色像素值 (R) 為例):

Gamma 修正公式(紅色像素)

最大像素值 ($R_{max}$) 例如在 8 位元 Pixel Format 中等於 255,或在 10 位元 pixel format 中等於 1 023。

啟用 Gamma 校正#

若要啟用 Gamma 修正:

  1. 將相機中的 GammaEnable 參數設為 true (若適用)。
  2. 為獲得最佳效果,請將 BlackLevel 參數設為 0。
  3. 將相機中的 Gamma 參數設為所需的值。此參數的數值範圍為 0 到 $\approx 4$。
    • Gamma = 1:整體亮度保持不變。
    • Gamma < 1: The overall brightness increases.
    • Gamma > 1:整體亮度會降低。

在所有情況下,黑色像素(亮度 = 0)和白色像素(亮度 = 最大值)都不會進行調整。

資訊

  • 如果您啟用 Gamma 修正且 Pixel Format 設為 12 位元 pixel format,將會遺失部分影像資訊。像素資料輸出仍會是 12 位元,但像素值會在 Gamma 修正過程中進行插補。
  • 在 boA13440-17cm 相機上,只有當 Pixel Format 設為 8 位元 pixel format 時,才能啟用 Gamma 修正。

其他參數#

根據您的相機型號,可使用下列其他參數:

  • GammaEnable:啟用或停用 Gamma 修正。
  • GammaSelector:允許您選取下列其中一種 Gamma 修正模式:
    • User:可依需求設定 Gamma 修正值。(預設值。)
    • sRGB:相機會自動設定大約 0.4 的 Gamma 修正值。此數值已針對在 sRGB 監視器上顯示影像進行最佳化。
  • BslColorSpaceMode 或 BslColorSpace:允許您選取下列其中一種 Gamma 修正模式:
    • RGB:不套用其他 Gamma 修正值。
    • sRGB:影像亮度已針對在 sRGB 監視器上顯示進行最佳化。會套用大約 0.4 的 Gamma 修正值。如需詳細資訊,請參閱 詳細資料 章節中的註腳。

詳細資料#

顯示所有相機型號

相機型號 其他參數
a2A640-240gmSWIR 無
a2A640-240umSWIR 無
a2A1280-80gmSWIR 無
a2A1280-125umSWIR 無
a2A1920-51gcBAS BslColorSpacec
a2A1920-51gcIP67 BslColorSpacec
a2A1920-51gcPRO BslColorSpacec
a2A1920-51gmBAS 無
a2A1920-51gmIP67 無
a2A1920-51gmPRO 無
a2A1920-160ucBAS BslColorSpacec
a2A1920-160ucPRO BslColorSpacec
a2A1920-160umBAS 無
a2A1920-160umPRO 無
a2A1920-165g5cBAS BslColorSpacec
a2A1920-165g5mBAS 無
a2A1920-168mgc BslColorSpacec
a2A1920-168mgm 無
a2A2048-35gmSWIR 無
a2A2048-37gcBAS BslColorSpacec
a2A2048-37gcPRO BslColorSpacec
a2A2048-37gmBAS 無
a2A2048-37gmPRO 無
a2A2048-110umSWIR 無
a2A2048-114g5cBAS BslColorSpacec
a2A2048-114g5mBAS 無
a2A2048-114mgc BslColorSpacec
a2A2048-114mgm 無
a2A2048-114ucBAS BslColorSpacec
a2A2048-114ucPRO BslColorSpacec
a2A2048-114umBAS 無
a2A2048-114umPRO 無
a2A2048-173cmSWIR 無
a2A2440-98g5cBAS BslColorSpacec
a2A2440-98g5mBAS 無
a2A2448-23gcBAS BslColorSpacec
a2A2448-23gcIP67 BslColorSpacec
a2A2448-23gcPRO BslColorSpacec
a2A2448-23gmBAS 無
a2A2448-23gmIP67 無
a2A2448-23gmPRO 無
a2A2448-75ucBAS BslColorSpacec
a2A2448-75ucPRO BslColorSpacec
a2A2448-75umBAS 無
a2A2448-75umPRO 無
a2A2448-90mgc BslColorSpacec
a2A2448-90mgm 無
a2A2448-105g5cBAS BslColorSpacec
a2A2448-105g5mBAS 無
a2A2448-120cc BslColorSpacec
a2A2448-120cm 無
a2A2448-210cc BslColorSpacec
a2A2448-210cm 無
a2A2464-23gcBAS BslColorSpacec
a2A2464-23gcPRO BslColorSpacec
a2A2464-23gmBAS 無
a2A2464-23gmPRO 無
a2A2464-77ucBAS BslColorSpacec
a2A2464-77ucPRO BslColorSpacec
a2A2464-77umBAS 無
a2A2464-77umPRO 無
a2A2464-115g5cBAS BslColorSpacec
a2A2464-115g5mBAS 無
a2A2560-20gmSWIR 無
a2A2560-70umSWIR 無
a2A2560-131cmSWIR 無
a2A2590-22gcBAS BslColorSpacec
a2A2590-22gcPRO BslColorSpacec
a2A2590-22gmBAS 無
a2A2590-22gmPRO 無
a2A2590-60ucBAS BslColorSpacec
a2A2590-60ucPRO BslColorSpacec
a2A2590-60umBAS 無
a2A2590-60umPRO 無
a2A2600-20gcBAS BslColorSpacec
a2A2600-20gcPRO BslColorSpacec
a2A2600-20gmBAS 無
a2A2600-20gmPRO 無
a2A2600-64ucBAS BslColorSpacec
a2A2600-64ucPRO BslColorSpacec
a2A2600-64umBAS 無
a2A2600-64umPRO 無
a2A2840-14gcBAS BslColorSpacec
a2A2840-14gcIP67 BslColorSpacec
a2A2840-14gcPRO BslColorSpacec
a2A2840-14gmBAS 無
a2A2840-14gmIP67 無
a2A2840-14gmPRO 無
a2A2840-14gmUV 無
a2A2840-48ucBAS BslColorSpacec
a2A2840-48ucPRO BslColorSpacec
a2A2840-48umBAS 無
a2A2840-48umPRO 無
a2A2840-48umUV 無
a2A2840-57mgc BslColorSpacec
a2A2840-57mgm 無
a2A2840-67g5cBAS BslColorSpacec
a2A2840-67g5mBAS 無
a2A2840-67g5mUV 無
a2A2840-86cc BslColorSpacec
a2A2840-86cm 無
a2A3536-9gcBAS BslColorSpacec
a2A3536-9gcPRO BslColorSpacec
a2A3536-9gmBAS 無
a2A3536-9gmPRO 無
a2A3536-31ucBAS BslColorSpacec
a2A3536-31ucPRO BslColorSpacec
a2A3536-31umBAS 無
a2A3536-31umPRO 無
a2A3536-37mgc BslColorSpacec
a2A3536-37mgm 無
a2A3536-42g5cBAS BslColorSpacec
a2A3536-42g5mBAS 無
a2A3840-13gcBAS BslColorSpacec
a2A3840-13gcPRO BslColorSpacec
a2A3840-13gmBAS 無
a2A3840-13gmPRO 無
a2A3840-45ucBAS BslColorSpacec
a2A3840-45ucPRO BslColorSpacec
a2A3840-45umBAS 無
a2A3840-45umPRO 無
a2A4096-9gcBAS BslColorSpacec
a2A4096-9gcIP67 BslColorSpacec
a2A4096-9gcPRO BslColorSpacec
a2A4096-9gmBAS 無
a2A4096-9gmIP67 無
a2A4096-9gmPRO 無
a2A4096-30ucBAS BslColorSpacec
a2A4096-30ucPRO BslColorSpacec
a2A4096-30umBAS 無
a2A4096-30umPRO 無
a2A4096-38mgc BslColorSpacec
a2A4096-38mgm 無
a2A4096-44g5cBAS BslColorSpacec
a2A4096-44g5mBAS 無
a2A4096-67cc BslColorSpacec
a2A4096-67cm 無
a2A4200-12gcBAS BslColorSpacec
a2A4200-12gcPRO BslColorSpacec
a2A4200-12gmBAS 無
a2A4200-12gmPRO 無
a2A4200-40ucBAS BslColorSpacec
a2A4200-40ucPRO BslColorSpacec
a2A4200-40umBAS 無
a2A4200-40umPRO 無
a2A4504-5gcBAS BslColorSpacec
a2A4504-5gcIP67 BslColorSpacec
a2A4504-5gcPRO BslColorSpacec
a2A4504-5gmBAS 無
a2A4504-5gmIP67 無
a2A4504-5gmPRO 無
a2A4504-18ucBAS BslColorSpacec
a2A4504-18ucPRO BslColorSpacec
a2A4504-18umBAS 無
a2A4504-18umPRO 無
a2A4504-23mgc BslColorSpacec
a2A4504-23mgm 無
a2A4504-27g5cBAS BslColorSpacec
a2A4504-27g5mBAS 無
a2A4504-42cc BslColorSpacec
a2A4504-42cm 無
a2A4508-6gcBAS BslColorSpacec
a2A4508-6gcPRO BslColorSpacec
a2A4508-6gmBAS 無
a2A4508-6gmPRO 無
a2A4508-20ucBAS BslColorSpacec
a2A4508-20ucPRO BslColorSpacec
a2A4508-20umBAS 無
a2A4508-20umPRO 無
a2A5060-4gcBAS BslColorSpacec
a2A5060-4gmBAS 無
a2A5060-15ucBAS BslColorSpacec
a2A5060-15umBAS 無
a2A5060-21g5cBAS BslColorSpacec
a2A5060-21g5mBAS 無
a2A5060-35cc BslColorSpacec
a2A5060-35cm 無
a2A5320-7gcBAS BslColorSpacec
a2A5320-7gcIP67 BslColorSpacec
a2A5320-7gcPRO BslColorSpacec
a2A5320-7gmBAS 無
a2A5320-7gmPRO 無
a2A5320-7gmip67 無
a2A5320-23ucBAS BslColorSpacec
a2A5320-23ucPRO BslColorSpacec
a2A5320-23umBAS 無
a2A5320-23umPRO 無
a2A5320-29mgc BslColorSpacec
a2A5320-29mgm 無
a2A5320-34g5cBAS BslColorSpacec
a2A5320-34g5mBAS 無
a2A5320-52cc BslColorSpacec
a2A5320-52cm 無
a2A5328-4gcBAS BslColorSpacec
a2A5328-4gcIP67 BslColorSpacec
a2A5328-4gcPRO BslColorSpacec
a2A5328-4gmBAS 無
a2A5328-4gmIP67 無
a2A5328-4gmPRO 無
a2A5328-15ucBAS BslColorSpacec
a2A5328-15ucPRO BslColorSpacec
a2A5328-15umBAS 無
a2A5328-15umPRO 無
a2A5328-19mgc BslColorSpacec
a2A5328-19mgm 無
a2A5328-22g5cBAS BslColorSpacec
a2A5328-22g5mBAS 無
a2A5328-35cc BslColorSpacec
a2A5328-35cm 無
acA640-121gm GammaEnable
GammaSelector
acA640-300gc GammaEnable
GammaSelector
acA640-300gm GammaEnable
GammaSelector
acA640-750uc Nonea
acA640-750um Nonea
acA720-290gc GammaEnable
GammaSelector
acA720-290gm GammaEnable
GammaSelector
acA720-520uc Nonea
acA720-520um Nonea
acA800-200gc GammaEnable
GammaSelector
acA800-200gm GammaEnable
GammaSelector
acA800-510uc Nonea
acA800-510um Nonea
acA1280-60gc GammaEnable
GammaSelector
acA1280-60gm GammaEnable
GammaSelector
acA1300-60gc GammaEnable
GammaSelector
acA1300-60gm GammaEnable
GammaSelector
acA1300-60gmNIR GammaEnable
GammaSelector
acA1300-75gc GammaEnable
GammaSelector
acA1300-75gm GammaEnable
GammaSelector
acA1300-200uc Nonea
acA1300-200um Nonea
acA1440-73gc GammaEnable
GammaSelector
acA1440-73gm GammaEnable
GammaSelector
acA1440-220uc Nonea
acA1440-220um Nonea
acA1600-60gc GammaEnable
GammaSelector
acA1600-60gm GammaEnable
GammaSelector
acA1920-25gc GammaEnable
GammaSelector
acA1920-25gm GammaEnable
GammaSelector
acA1920-25uc Nonea
acA1920-25um Nonea
acA1920-40gc GammaEnable
GammaSelector
acA1920-40gm GammaEnable
GammaSelector
acA1920-40uc Nonea
acA1920-40ucMED Nonea
acA1920-40um Nonea
acA1920-40umMED Nonea
acA1920-48gc GammaEnable
GammaSelector
acA1920-48gm GammaEnable
GammaSelector
acA1920-50gc GammaEnable
GammaSelector
acA1920-50gm GammaEnable
GammaSelector
acA1920-150uc Nonea
acA1920-150um Nonea
acA1920-155uc Nonea
acA1920-155ucMED Nonea
acA1920-155um Nonea
acA1920-155umMED Nonea
acA2000-50gc GammaEnable
GammaSelector
acA2000-50gm GammaEnable
GammaSelector
acA2000-165uc Nonea
acA2000-165um Nonea
acA2040-25gc GammaEnable
GammaSelector
acA2040-25gm GammaEnable
GammaSelector
acA2040-25gmNIR GammaEnable
GammaSelector
acA2040-35gc GammaEnable
GammaSelector
acA2040-35gm GammaEnable
GammaSelector
acA2040-55uc Nonea
acA2040-55um Nonea
acA2040-90uc Nonea
acA2040-90um Nonea
acA2040-90umNIR Nonea
acA2040-120uc Nonea
acA2040-120um Nonea
acA2440-20gc GammaEnable
GammaSelector
acA2440-20gm GammaEnable
GammaSelector
acA2440-35uc Nonea
acA2440-35ucMED Nonea
acA2440-35um Nonea
acA2440-35umMED Nonea
acA2440-75uc Nonea
acA2440-75ucMED Nonea
acA2440-75um Nonea
acA2440-75umMED Nonea
acA2500-14gc GammaEnable
GammaSelector
acA2500-14gm GammaEnable
GammaSelector
acA2500-14uc Nonea
acA2500-14um Nonea
acA2500-20gc GammaEnable
GammaSelector
acA2500-20gcMED GammaEnable
GammaSelector
acA2500-20gm GammaEnable
GammaSelector
acA2500-20gmMED GammaEnable
GammaSelector
acA2500-60uc Nonea
acA2500-60um Nonea
acA3088-16gc GammaEnable
GammaSelector
acA3088-16gm GammaEnable
GammaSelector
acA3088-57uc Nonea
acA3088-57ucMED Nonea
acA3088-57um Nonea
acA3088-57umMED Nonea
acA3800-10gc GammaEnable
GammaSelector
acA3800-10gm GammaEnable
GammaSelector
acA3800-14uc Nonea
acA3800-14um Nonea
acA4024-8gc GammaEnable
GammaSelector
acA4024-8gm GammaEnable
GammaSelector
acA4024-29uc Nonea
acA4024-29um Nonea
acA4096-11gc GammaEnable
GammaSelector
acA4096-11gm GammaEnable
GammaSelector
acA4096-30uc Nonea
acA4096-30ucMED Nonea
acA4096-30um Nonea
acA4096-30umMED Nonea
acA4096-40uc Nonea
acA4096-40ucMED Nonea
acA4096-40um Nonea
acA4096-40umMED Nonea
acA4112-8gc GammaEnable
GammaSelector
acA4112-8gm GammaEnable
GammaSelector
acA4112-20uc Nonea
acA4112-20ucMED Nonea
acA4112-20um Nonea
acA4112-20umMED Nonea
acA4112-30uc Nonea
acA4112-30ucMED Nonea
acA4112-30um Nonea
acA4112-30umMED Nonea
acA5472-5gc GammaEnable
GammaSelector
acA5472-5gm GammaEnable
GammaSelector
acA5472-17uc Nonea
acA5472-17ucMED Nonea
acA5472-17um Nonea
acA5472-17umMED Nonea
boA1936-400cc BslColorSpacec
boA1936-400cm 無
boA2448-250cc BslColorSpacec
boA2448-250cm 無
boA2832-190cc BslColorSpacec
boA2832-190cm 無
boA4096-93cc BslColorSpacec
boA4096-93cm 無
boA4096-180cc BslColorSpacec
boA4096-180cm 無
boA4112-68cc BslColorSpacec
boA4112-68cm 無
boA4500-45cc BslColorSpacec
boA4500-45cm 無
boA4504-100cc BslColorSpacec
boA4504-100cm 無
boA5056-95cm 無
boA5120-150cc 不支援 Gamma 功能
boA5120-150cm 不支援 Gamma 功能
boA5120-230cc 不支援 Gamma 功能
boA5120-230cm 不支援 Gamma 功能
boA5320-150cc BslColorSpacec
boA5320-150cm 無
boA5328-100cc BslColorSpacec
boA5328-100cm 無
boA6500-36cc BslColorSpacec
boA6500-36cm 無
boA8100-16cc BslColorSpacec
boA8100-16cm 無
boA9344-30cc 不支援 Gamma 功能
boA9344-30cm 不支援 Gamma 功能
boA9344-70cc 不支援 Gamma 功能
boA9344-70cm 不支援 Gamma 功能
boA13440-17cm 無
daA720-520uc BslColorSpacea
daA720-520um 無
daA1280-54uc BslColorSpaceModeb
daA1280-54um 無
daA1440-220uc BslColorSpacea
daA1440-220um 無
daA1600-60uc BslColorSpaceModeb
daA1600-60um 無
daA1920-15um 無
daA1920-30uc BslColorSpaceModeb
daA1920-30um 無
daA1920-160uc BslColorSpacea
daA1920-160um 無
daA2448-70uc BslColorSpacea
daA2448-70um 無
daA2500-14uc BslColorSpaceModeb
daA2500-14um 無
daA3840-45uc BslColorSpacea
daA3840-45um 無
dmA720-290gc BslColorSpacec
dmA720-290gm 無
dmA1440-73gc BslColorSpacec
dmA1440-73gm 無
dmA1920-51gc BslColorSpacec
dmA1920-51gm 無
dmA2048-37gc BslColorSpacec
dmA2048-37gm 無
dmA2448-23gc BslColorSpacec
dmA2448-23gm 無
dmA2840-14gc BslColorSpacec
dmA2840-14gm 無
dmA3536-9gc BslColorSpacec
dmA3536-9gm 無
dmA4096-9gc BslColorSpacec
dmA4096-9gm 無
puA1280-54uc BslColorSpaceModeb
puA1280-54um 無
puA1600-60uc BslColorSpaceModeb
puA1600-60um 無
puA1920-30uc BslColorSpaceModeb
puA1920-30um 無
puA2500-14uc BslColorSpaceModeb
puA2500-14um 無
r2L2048-29gc BslColorSpacec
r2L2048-58gm 無
r2L2048-62cc BslColorSpacec
r2L2048-62g5c BslColorSpacec
r2L2048-172cm 無
r2L2048-172g5m 無
r2L4096-14gc BslColorSpacec
r2L4096-29gm 無
r2L4096-42cc BslColorSpacec
r2L4096-42g5c BslColorSpacec
r2L4096-84cm 無
r2L4096-84g5m 無
r2L8192-80cc BslColorSpacec
r2L8192-240cm 無
r2L16384-60cc BslColorSpacec
r2L16384-120cm 無
r2T16416-500cm 無

  1. 如果您選擇 光源預設,將會套用約 0.4 的額外 Gamma 校正值(sRGB Gamma 校正)。此數值會單獨套用,且不包含在 Gamma 參數值。 範例: 您將 Light Source Preset 設為 Tungsten,並將 Gamma 參數值設為 1.2。首先,系統會對像素值套用約 0.4 的自動校正值。之後,再將 1.2 的 Gamma 校正值套用到產生的像素值上。

  2. 只有當 Pixel Format 設為 YCbCr422 或 RGB8 時才可用。

  3. 如果色彩空間設為 sRGB,將會套用約 0.4 的 Gamma 校正值。此數值會單獨套用,且不包含在 Gamma 參數值。 範例: 您將色彩空間設為 sRGB,並將 Gamma 參數設為 1.2。首先,系統會對像素值套用約 0.4 的自動校正值。之後,再將 1.2 的 Gamma 校正值套用到產生的像素值上。
    如果您已選擇 Light Source Preset,將色彩空間設為 sRGB 也將會影響 Balance White, Color Adjustment以及 Color Transformation 功能。

  4. 如果色彩空間設為 sRGB將會套用約 0.4 的 Gamma 校正值、 Gamma 參數將變為唯讀,且 Gamma 參數值將遭到忽略。

範例程式碼#

ace 2、boost 和 dart R 相機#
// Set the Gamma value to 1.2
camera.Gamma.SetValue(1.2);
// Set the color space to sRGB
camera.BslColorSpace.SetValue(BslColorSpace_sRGB);
INodeMap& nodemap = camera.GetNodeMap();
// Set the Gamma value to 1.2
CFloatParameter(nodemap, "Gamma").SetValue(1.2);
// Set the color space to sRGB
CEnumParameter(nodemap, "BslColorSpace").SetValue("sRGB");
// Set the Gamma value to 1.2
camera.Parameters[PLCamera.Gamma].SetValue(1.2);
// Set the color space to sRGB
camera.Parameters[PLCamera.BslColorSpace].SetValue(PLCamera.BslColorSpace.sRGB);
/* 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 Gamma value to 1.2 */
errRes = PylonDeviceSetFloatFeature(hdev, "Gamma", 1.2);
CHECK(errRes);
/* Set the color space to sRGB */
errRes = PylonDeviceFeatureFromString(hdev, "BslColorSpace", "sRGB");
CHECK(errRes);
# Set the Gamma value to 1.2
camera.Gamma.Value = 1.2
# Set the color space to sRGB
camera.BslColorSpace.Value = "sRGB"
ace Classic/U/L GigE 相機#
// Enable the Gamma feature
camera.GammaEnable.SetValue(true);
// Set the gamma type to User
camera.GammaSelector.SetValue(GammaSelector_User);
// Set the Gamma value to 1.2
camera.Gamma.SetValue(1.2);
INodeMap& nodemap = camera.GetNodeMap();
// Enable the Gamma feature
CBooleanParameter(nodemap, "GammaEnable").SetValue(true);
// Set the gamma type to User
CEnumParameter(nodemap, "GammaSelector").SetValue("User");
// Set the Gamma value to 1.2
CFloatParameter(nodemap, "Gamma").SetValue(1.2);
// Enable the Gamma feature
camera.Parameters[PLCamera.GammaEnable].SetValue(true);
// Set the gamma type to User
camera.Parameters[PLCamera.GammaSelector].SetValue(PLCamera.GammaSelector.User);
// Set the Gamma value to 1.2
camera.Parameters[PLCamera.Gamma].SetValue(1.2);
/* 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 */
/* Enable the Gamma feature */
errRes = PylonDeviceSetBooleanFeature(hdev, "GammaEnable", 1);
CHECK(errRes);
/* Set the gamma type to User */
errRes = PylonDeviceFeatureFromString(hdev, "GammaSelector", "User");
CHECK(errRes);
/* Set the Gamma value to 1.2 */
errRes = PylonDeviceSetFloatFeature(hdev, "Gamma", 1.2);
CHECK(errRes);
# Enable the Gamma feature
camera.GammaEnable.Value = True
# Set the gamma type to User
camera.GammaSelector.Value = "User"
# Set the Gamma value to 1.2
camera.Gamma.Value = 1.2
其他相機#
// Set the Gamma value to 1.2
camera.Gamma.SetValue(1.2);
INodeMap& nodemap = camera.GetNodeMap();
// Set the Gamma value to 1.2
CFloatParameter(nodemap, "Gamma").SetValue(1.2);
// Set the Gamma value to 1.2
camera.Parameters[PLCamera.Gamma].SetValue(1.2);
/* 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 Gamma value to 1.2 */
errRes = PylonDeviceSetFloatFeature(hdev, "Gamma", 1.2);
CHECK(errRes);
# Set the Gamma value to 1.2
camera.Gamma.Value = 1.2

您也可以 use the pylon Viewer 來輕鬆設定參數。