跳转到内容

Camera Operation Mode#

相机的 Camera Operation Mode 功能可让您针对特定的工作条件配置相机。

通过选择相机工作模式,可以自动配置部分相机设置,以在特定的工作环境中产生最佳效果。

该功能的使用#

指定相机工作模式#

To specify the acquisition mode, set the CameraOperationMode parameter to one of the following values:

  • Standard: Enables the Standard camera operation mode.
  • LongExposure: Enables the Long Exposure camera operation mode.

可用相机工作模式#

标准#

这是默认的相机工作模式。在大多数工作条件下,即参数未设置为极限值时,均适合采用此模式。

长时间曝光#

当您使用较长的曝光时间并想要优化图像质量时,长曝光模式很有用。

为了最大限度地发挥此功能的效果,请提供散热措施、延长曝光时间并尽可能降低帧速率。如果您的应用允许,请以单拍模式操作相机并仅采集所需的图像。

长曝光模式会增加曝光开始延迟

When you set the CameraOperationMode parameter to LongExposure, the frame rate decreases. Check the ResultingFrameRate parameter if you want to see the effect it is having.

信息

更改相机操作模式后,请等待至少十分钟,以使相机温度稳定下来。这样可以确保一致的图像质量。

示例代码#

// Enable the Standard camera operation mode
camera.CameraOperationMode.SetValue(CameraOperationMode_Standard);
// Enable the Long Exposure camera operation mode
camera.CameraOperationMode.SetValue(CameraOperationMode_LongExposure);
INodeMap& nodemap = camera.GetNodeMap();
// Enable the Standard camera operation mode
CEnumParameter(nodemap, "CameraOperationMode").SetValue("Standard");
// Enable the Long Exposure camera operation mode
CEnumParameter(nodemap, "CameraOperationMode").SetValue("LongExposure");
// Enable the Standard camera operation mode
camera.Parameters[PLCamera.CameraOperationMode].SetValue(PLCamera.CameraOperationMode.Standard);
// Enable the Long Exposure camera operation mode
camera.Parameters[PLCamera.CameraOperationMode].SetValue(PLCamera.CameraOperationMode.LongExposure);
/* 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 Standard camera operation mode */
errRes = PylonDeviceFeatureFromString(hdev, "CameraOperationMode", "Standard");
CHECK(errRes);
/* Enable the Long Exposure camera operation mode */
errRes = PylonDeviceFeatureFromString(hdev, "CameraOperationMode", "LongExposure");
CHECK(errRes);
# Enable the Standard camera operation mode
camera.CameraOperationMode.Value = "Standard"
# Enable the Long Exposure camera operation mode
camera.CameraOperationMode.Value = "LongExposure"

您也可以使用 pylon Viewer 轻松设置参数。