Detailed Description
The Cropping capability (XN_CAPABILITY_CROPPING) allows a Map Generator to output a selected area of the frame instead of the entire frame. When cropping is turned on, the data buffer looks just like resolution is smaller, meaning data is packed. For example if the MapGenerator is working in VGA resolution (640x480) and the application chose a cropping of 300x200, then after first 300 pixels the next pixel row begins. Pixels outside the cropping area are not returned in the buffer (and not just being blacked out). This is very useful for performance boost.
Function Documentation
Gets current cropping configuration.
- Parameters:
-
hInstance | [in] A handle to the instance. |
pCropping | [out] Current cropping configuration. |
- Returns:
- XN_STATUS_INVALID_OPERATION if this production node does not support the Cropping capability.
Registers a callback function to cropping changes.
- Parameters:
-
hInstance | [in] A handle to the instance. |
handler | [in] A pointer to a function that will be called when cropping changes. |
pCookie | [in] A user cookie that will be passed to the callback function. |
phCallback | [out] Optional. Will be filled with a handle to be passed to xnUnregisterFromCroppingChange(). |
Sets the cropping.
- Parameters:
-
hInstance | [in] A handle to the instance. |
pCropping | [in] The cropping configuration to be set. |
- Returns:
- XN_STATUS_INVALID_OPERATION if this production node does not support the Cropping capability.