![]() |
IDS peak AFL v1.8.0
|
Region of Interest (ROI) feature implementation for auto controllers. More...
#include <peak_afl/pipeline/modules/controllers/features/peak_afl_roi.hpp>
Public Member Functions | |
| Roi (std::shared_ptr< peak::afl::Controller > controller) | |
| Constructs a Roi feature with the specified controller. | |
| void | Set (const peak::common::Rectangle &value) override |
| Sets the region of interest rectangle. | |
| PEAK_COMMON_NO_DISCARD peak::common::Rectangle | Get () const override |
| Gets the current region of interest rectangle. | |
| void | Serialize (peak::common::serialization::IArchive &archive) const override |
| Serializes the current ROI to an archive. | |
| void | Deserialize (const peak::common::serialization::IArchive &archive) override |
| Deserializes the ROI from an archive. | |
Public Member Functions inherited from IFeature< peak::common::Rectangle > | |
| virtual | ~IFeature ()=default |
| Virtual destructor for proper cleanup of derived classes. | |
Region of Interest (ROI) feature implementation for auto controllers.
The Roi class provides a feature interface for managing the region of interest parameter of auto controllers. This feature defines the rectangular area within the image that the automatic algorithms should analyze for exposure, focus, white balance, and other automatic adjustments.
By setting an ROI, users can focus the automatic algorithms on specific parts of the image, such as:
This class inherits from IFeature<peak::common::Rectangle> and provides serialization support for configuration persistence.
|
inlineexplicit |
Constructs a Roi feature with the specified controller.
| [in] | controller | Shared pointer to the auto controller that will be used to manage the ROI parameter. The controller must support ROI operations. |
|
inlineoverridevirtual |
Deserializes the ROI from an archive.
Loads the region of interest rectangle from the provided archive and applies it to the controller. The ROI is expected to be stored as a sub-archive with the key "Roi" containing X, Y, Width, and Height values.
| [in] | archive | The archive to read the ROI from |
| May | throw serialization exceptions if the archive operation fails |
| May | throw controller exceptions if the deserialized ROI is invalid |
Implements ISerializable.
|
inlineoverridevirtual |
Gets the current region of interest rectangle.
Retrieves the currently configured rectangular area that the automatic algorithms are analyzing within the image.
| May | throw exceptions based on the underlying controller implementation if the controller is in an invalid state. |
Implements IFeature< peak::common::Rectangle >.
|
inlineoverridevirtual |
Serializes the current ROI to an archive.
Stores the current region of interest rectangle in the provided archive for configuration persistence. The ROI is stored as a sub-archive with the key "Roi" containing X, Y, Width, and Height values.
| [in,out] | archive | The archive to write the ROI to |
| May | throw serialization exceptions if the archive operation fails |
Implements ISerializable.
|
inlineoverridevirtual |
Sets the region of interest rectangle.
Sets the rectangular area within the image that the automatic algorithms should analyze. The ROI defines the focus area for automatic exposure, focus, white balance, and other adjustments.
| [in] | value | The rectangle defining the ROI. Must have non-negative x and y coordinates and must fit within the image boundaries. |
| peak::common::InvalidParameterException | if x or y coordinates are negative |
| May | throw additional exceptions based on the underlying controller implementation if the ROI is outside image boundaries or invalid. |
Implements IFeature< peak::common::Rectangle >.