如果启用了 Binning 功能,图像 ROI 设置是指经过像素合并的行和列,而不是传感器中的物理线路。
On boA5120-230cc and boA5120-230cm cameras, the OffsetY parameter is not available. The position of the image ROI is always centered in vertically.
On boA13440-17cm cameras, the position of the image ROI is always centered horizontally and vertically. If you change the width of the image ROI, the OffsetX parameter value adapts automatically so that the image ROI stays centered horizontally. If you change the height of the image ROI, the OffsetY parameter value adapts automatically so that the image ROI stays centered vertically. Both the OffsetX and OffsetY parameters are read-only.
信息
For line scan cameras:
For line scan cameras having more than one sensor line, the following applies: If you set the image ROI height to 1, the camera output on aquisition depends on the number of camera sensor lines:
Cameras with 2 sensor lines: The camera will output the color channels as follows: G in one line, R and B alternating in the other.
Cameras with 3 sensor lines: The camera will output all three channels (R, G, and B) on acquisition. For information about the number of sensor lines available in a camera model, see the General Specifications table in the corresponding camera topic.
On all racer 2 cameras, the OffsetY parameter is not available.
On racer 2 cameras with CXP interface, the Height parameter is automatically set to 1 and can't be changed. For these cameras, the single lines are transmitted to the frame grabber individually. The frame grabber then combines them into a frame.
On racer 2 S cameras with GigE 或 5GigE interface, you can add several lines to build a frame. Use the Height parameter to define the height of the image ROI, i.e., the height of the resulting frame that is transmitted to the host computer. Minimum number of lines per frame: 1 Depending on the host computer, a low frame height (i.e. < 10 lines) may increase the CPU load of the host computer significantly. 即: maximum number of lines per frame depends on the camera model:
For r2L2048-29gc, r2L2048-58gm, r2L2048-62g5c, r2L2048-172g5m, r2L4096-29gm, and r2L4096-84g5m cameras: 12000
For r2L4096-14gc and r2L4096-42g5c cameras: 10000
信息
For racer 2 S GigE cameras, you can use the Counter and Data Chunks features, in combination with the trigger settings, to specify which lines belong to a frame and which frames belong to the correct test object.
// Set the width to the maximum valueint64_tmaxWidth=camera.Width.GetMax();camera.Width.SetValue(maxWidth);// Set the height to 500camera.Height.SetValue(500);// Set the offset to 0,0camera.OffsetX.SetValue(0);camera.OffsetY.SetValue(0);
INodeMap&nodemap=camera.GetNodeMap();// Set the width to the maximum valueint64_tmaxWidth=CIntegerParameter(nodemap,"Width").GetMax();CIntegerParameter(nodemap,"Width").SetValue(maxWidth);// Set the height to 500CIntegerParameter(nodemap,"Height").SetValue(500);// Set the offset to 0,0CIntegerParameter(nodemap,"OffsetX").SetValue(0);CIntegerParameter(nodemap,"OffsetY").SetValue(0);
// Set the width to the maximum valueInt64maxWidth=camera.Parameters[PLCamera.Width].GetMaximum();camera.Parameters[PLCamera.Width].SetValue(maxWidth);// Set the height to 500camera.Parameters[PLCamera.Height].SetValue(500);// Set the offset to 0,0camera.Parameters[PLCamera.OffsetX].SetValue(0);camera.Parameters[PLCamera.OffsetY].SetValue(0);
/* Macro to check for errors */#define CHECK(errc) if (GENAPI_E_OK != errc) printErrorAndExit(errc)GENAPIC_RESULTerrRes=GENAPI_E_OK;/* Return value of pylon methods */int64_tmaxWidth=0;/* Set the width to the maximum value */errRes=PylonDeviceGetIntegerFeatureMax(hdev,"Width",&maxWidth);CHECK(errRes);errRes=PylonDeviceSetIntegerFeature(hdev,"Width",maxWidth);CHECK(errRes);/* Set the height to 500 */errRes=PylonDeviceSetIntegerFeature(hdev,"Height",500);CHECK(errRes);/* Set the offset to 0,0 */errRes=PylonDeviceSetIntegerFeature(hdev,"OffsetX",0);CHECK(errRes);errRes=PylonDeviceSetIntegerFeature(hdev,"OffsetY",0);CHECK(errRes);
# Set the width to the maximum valuemaxWidth=camera.Width.Maxcamera.Width.Value=maxWidth# Set the height to 500camera.Height.Value=500# Set the offset to 0,0camera.OffsetX.Value=0camera.OffsetY.Value=0
// Set the width to the maximum valueint64_tmaxWidth=camera.WidthMax.GetValue();camera.Width.SetValue(maxWidth);// Set the height to 500camera.Height.SetValue(500);// Set the offset to 0camera.OffsetX.SetValue(0);camera.OffsetY.SetValue(0);
INodeMap&nodemap=camera.GetNodeMap();// Set the width to the maximum valueint64_tmaxWidth=CIntegerParameter(nodemap,"WidthMax").GetValue();CIntegerParameter(nodemap,"Width").SetValue(maxWidth);// Set the height to 500CIntegerParameter(nodemap,"Height").SetValue(500);// Set the offset to 0CIntegerParameter(nodemap,"OffsetX").SetValue(0);CIntegerParameter(nodemap,"OffsetY").SetValue(0);
// Set the width to the maximum valueInt64maxWidth=camera.Parameters[PLCamera.WidthMax].GetValue();camera.Parameters[PLCamera.Width].SetValue(maxWidth);// Set the height to 500camera.Parameters[PLCamera.Height].SetValue(500);// Set the offset to 0camera.Parameters[PLCamera.OffsetX].SetValue(0);camera.Parameters[PLCamera.OffsetY].SetValue(0);
/* Macro to check for errors */#define CHECK(errc) if (GENAPI_E_OK != errc) printErrorAndExit(errc)GENAPIC_RESULTerrRes=GENAPI_E_OK;/* Return value of pylon methods */int64_tmaxWidth=0;/* Set the width to the maximum value */errRes=PylonDeviceGetIntegerFeature(hdev,"WidthMax",&maxWidth);CHECK(errRes);errRes=PylonDeviceSetIntegerFeature(hdev,"Width",maxWidth);CHECK(errRes);/* Set the height to 500 */errRes=PylonDeviceSetIntegerFeature(hdev,"Height",500);CHECK(errRes);/* Set the offset to 0 */errRes=PylonDeviceSetIntegerFeature(hdev,"OffsetX",0);CHECK(errRes);errRes=PylonDeviceSetIntegerFeature(hdev,"OffsetY",0);CHECK(errRes);
# Set the width to the maximum valuemaxWidth=camera.WidthMax.Valuecamera.Width.Value=maxWidth# Set the height to 500camera.Height.Value=500# Set the offset to 0camera.OffsetX.Value=0camera.OffsetY.Value=0