![]() |
IDS peak AFL v2.0.0
|
Weighted regions of interest feature implementation for auto controllers. More...
#include <peak_afl/pipeline/modules/controllers/features/peak_afl_weighted_rois.hpp>
Public Member Functions | |
| WeightedRois (std::shared_ptr< peak::afl::Controller > controller) | |
| Constructs a WeightedRois feature with the specified controller. | |
| void | Set (const WeightedROI &value) |
| Sets a single weighted region of interest. | |
| void | Set (const std::vector< WeightedROI > &value) override |
| Sets multiple weighted regions of interest. | |
| void | SetPreset (RoiPreset preset) |
| Sets a predefined region of interest (ROI) | |
| std::vector< WeightedROI > | Get () const override |
| Gets the current weighted regions of interest. | |
| void | Serialize (peak::common::serialization::IArchive &archive) const override |
| Serializes the current weighted ROIs to an archive. | |
| void | Deserialize (const peak::common::serialization::IArchive &archive) override |
| Deserializes weighted ROIs from an archive. | |
| Public Member Functions inherited from IFeature< std::vector< WeightedROI > > | |
| virtual | ~IFeature ()=default |
| Virtual destructor for proper cleanup of derived classes. | |
Weighted regions of interest feature implementation for auto controllers.
The WeightedRois class provides a feature interface for managing multiple weighted regions of interest for auto controllers. This feature allows defining multiple rectangular areas within the image, each with different importance weights that influence automatic algorithms.
Weighted ROIs are useful for:
Each weighted ROI consists of a rectangular region and a weight (Weak, Medium, Strong) that determines how much influence that region has on the automatic calculations.
This class inherits from IFeature<std::vector<WeightedROI>> and provides serialization support for configuration persistence.
|
inlineexplicit |
Constructs a WeightedRois feature with the specified controller.
| [in] | controller | Shared pointer to the auto controller that will be used to manage the weighted ROIs parameter. The controller must support weighted ROI operations. |
|
inlineoverridevirtual |
Deserializes weighted ROIs from an archive.
Loads weighted ROIs from the provided archive and applies them to the controller. Each ROI is expected to be stored as a sub-archive containing X, Y, Width, Height, and Weight values.
| [in] | archive | The archive to read the weighted ROIs from |
| May | throw serialization exceptions if the archive operation fails |
| May | throw controller exceptions if any deserialized ROI is invalid |
Implements ISerializable.
|
inlineoverridevirtual |
Gets the current weighted regions of interest.
Retrieves all currently configured weighted ROIs from the controller.
| May | throw exceptions based on the underlying controller implementation if the controller is in an invalid state. |
Implements IFeature< std::vector< WeightedROI > >.
|
inlineoverridevirtual |
Serializes the current weighted ROIs to an archive.
Stores all current weighted ROIs in the provided archive for configuration persistence. Each ROI is stored as a sub-archive containing X, Y, Width, Height, and Weight values.
| [in,out] | archive | The archive to write the weighted ROIs to |
| May | throw serialization exceptions if the archive operation fails |
Implements ISerializable.
|
inlineoverridevirtual |
Sets multiple weighted regions of interest.
Sets a collection of weighted ROIs for the controller. Each ROI in the vector will influence the automatic algorithms according to its weight.
| [in] | value | Vector of weighted ROIs to set. Each element contains a rectangular region and its importance weight. |
| May | throw exceptions based on the underlying controller implementation if any ROI is invalid, if too many ROIs are provided, or if the controller is in an invalid state. |
Implements IFeature< std::vector< WeightedROI > >.
|
inline |
Sets a single weighted region of interest.
Sets a single weighted ROI for the controller. This is a convenience method for setting just one weighted region.
| [in] | value | The weighted ROI to set, containing both the rectangular region and its importance weight. |
| May | throw exceptions based on the underlying controller implementation if the ROI is invalid or if the controller is in an invalid state. |
|
inline |
Sets a predefined region of interest (ROI)
| [in] | preset | The preset to set. |
| May | throw exceptions based on the underlying controller implementation if the controller is in an invalid state. |