IDS peak AFL v2.0.1
Loading...
Searching...
No Matches

Analysis area configuration for automatic control operations. More...

Functions

PEAK_AFL_API_STATUS peak_afl_AutoController_ROI_IsSupported (peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
 Check if region of interest (ROI) feature is supported for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_ROI_Set (peak_afl_controller_handle controller, peak_afl_rectangle roi)
 Set the region of interest for automatic feature processing.
PEAK_AFL_API_STATUS peak_afl_AutoController_ROI_Get (peak_afl_controller_handle controller, peak_afl_rectangle *roi)
 Get the current region of interest for a controller.

Detailed Description

Analysis area configuration for automatic control operations.

If a smaller part of the image should be processed, a region of interest (ROI) can be set. The ROI allows focusing the auto feature analysis on specific areas while ignoring irrelevant parts of the image.

Note
If a ROI does not fit into the processed image dimensions, the processing callback is called with corresponding error status.


Note
The ROI for automatic control is set to the full size of the processed image by default.


Note
To reset a ROI to full image, all values must be set to 0, which will automatically use the complete image area.

Function Documentation

◆ peak_afl_AutoController_ROI_Get()

PEAK_AFL_API_STATUS peak_afl_AutoController_ROI_Get ( peak_afl_controller_handle controller,
peak_afl_rectangle * roi )

Get the current region of interest for a controller.

Retrieves the current region of interest (ROI) configuration for the specified controller. The ROI defines the rectangular area of the image where the controller performs its analysis. If no ROI has been set, the returned rectangle will have all values set to 0, indicating that the controller processes the entire image.

Parameters
[in]controllerController handle to query for ROI configuration
[out]roiPointer to receive the current region of interest rectangle. If no ROI is set, all rectangle values (x, y, width, height) will be 0. Coordinates are relative to the image dimensions.
Returns
PEAK_AFL_STATUS_SUCCESS ROI retrieved successfully
PEAK_AFL_STATUS_NOT_INITIALIZED The library is not initialized
PEAK_AFL_STATUS_INVALID_PARAMETER Invalid controller handle or NULL roi pointer
PEAK_AFL_STATUS_NOT_SUPPORTED ROI feature is not supported by this controller
PEAK_AFL_STATUS_ERROR An unexpected internal error occurred
Note
Check support with peak_afl_AutoController_ROI_IsSupported() before calling
All zero values indicate no ROI is set (entire image is processed)
ROI coordinates are relative to the processed image dimensions
The returned ROI reflects the current active configuration
See also
peak_afl_AutoController_ROI_IsSupported()
peak_afl_AutoController_ROI_Set()
peak_afl_rectangle
Since
1.0

◆ peak_afl_AutoController_ROI_IsSupported()

PEAK_AFL_API_STATUS peak_afl_AutoController_ROI_IsSupported ( peak_afl_controller_handle controller,
peak_afl_BOOL8 * supported )

Check if region of interest (ROI) feature is supported for a controller.

Determines whether the specified controller supports the region of interest feature. ROI allows controllers to focus their analysis on specific rectangular areas of the image rather than processing the entire image. This can improve performance and accuracy by excluding irrelevant areas from automatic feature processing. Not all controller types support ROI functionality, and support may vary based on the specific implementation.

Parameters
[in]controllerController handle to check for ROI support
[out]supportedPointer to receive support status:
  • PEAK_AFL_TRUE: ROI feature is supported
  • PEAK_AFL_FALSE: ROI feature is not supported
Returns
PEAK_AFL_STATUS_SUCCESS Operation completed successfully
PEAK_AFL_STATUS_NOT_INITIALIZED The library is not initialized
PEAK_AFL_STATUS_INVALID_PARAMETER Invalid controller handle or NULL supported pointer
PEAK_AFL_STATUS_ERROR An unexpected internal error occurred
Note
Check this function before attempting to use ROI functionality
Support may vary between different controller types
ROI can significantly improve processing performance for specific use cases
See also
peak_afl_AutoController_ROI_Set()
peak_afl_AutoController_ROI_Get()
peak_afl_AutoController_ROI_Preset_Set()
Since
1.0

◆ peak_afl_AutoController_ROI_Set()

PEAK_AFL_API_STATUS peak_afl_AutoController_ROI_Set ( peak_afl_controller_handle controller,
peak_afl_rectangle roi )

Set the region of interest for automatic feature processing.

Configures a rectangular region of interest (ROI) that limits the area of the image where the controller performs its analysis. This allows focusing automatic features on specific parts of the image, which can improve performance and accuracy by excluding irrelevant areas from processing. If no ROI is set, the controller evaluates the complete image.

Parameters
[in]controllerController handle for which to set the ROI
[in]roiRectangle defining the region of interest with coordinates relative to the image. To reset/disable ROI, set all values to 0. The rectangle should be within the image boundaries.
Returns
PEAK_AFL_STATUS_SUCCESS ROI configured successfully
PEAK_AFL_STATUS_NOT_INITIALIZED The library is not initialized
PEAK_AFL_STATUS_INVALID_PARAMETER Invalid controller handle or ROI coordinates
PEAK_AFL_STATUS_NOT_SUPPORTED ROI feature is not supported by this controller
PEAK_AFL_STATUS_ERROR An unexpected internal error occurred
Note
Check support with peak_afl_AutoController_ROI_IsSupported() before using
ROI coordinates are relative to the processed image dimensions
Setting all ROI values to 0 disables ROI and processes the entire image
ROI changes take effect for subsequent image processing operations
Each controller can have its own independent ROI setting
ROI must be within valid image boundaries to avoid processing errors
See also
peak_afl_AutoController_ROI_IsSupported()
peak_afl_AutoController_ROI_Get()
peak_afl_AutoController_ROI_Preset_Set()
peak_afl_rectangle
Since
1.0