libcamera v0.1.0+127-8e215127-dirty (2023-12-02T01:06:12+00:00)
Supporting cameras in Linux since 2019
|
The base class for all IPA modules. More...
Public Member Functions | |
const std::list< std::unique_ptr< Algorithm< Module > > > & | algorithms () const |
Retrieve the list of instantiated algorithms. More... | |
int | createAlgorithms (Context &context, const YamlObject &algorithms) |
Create algorithms from YAML configuration data. More... | |
Static Public Member Functions | |
static void | registerAlgorithm (AlgorithmFactoryBase< Module > *factory) |
Add an algorithm factory class to the list of available algorithms. More... | |
Additional Inherited Members | |
![]() | |
virtual std::string | logPrefix () const =0 |
Retrieve a string to be prefixed to the log message. More... | |
LogMessage | _log (const LogCategory *category, LogSeverity severity, const char *fileName=__builtin_FILE(), unsigned int line=__builtin_LINE()) const |
Create a temporary LogMessage object to log a message. More... | |
The base class for all IPA modules.
Context | The type of the shared IPA context |
FrameContext | The type of the frame context |
Config | The type of the IPA configuration data |
Params | The type of the ISP specific parameters |
Stats | The type of the IPA statistics and ISP results |
The Module class template defines a standard internal interface between IPA modules and libipa.
While IPA modules are platform-specific, many of their internal functions are conceptually similar, even if they take different types of platform-specifc parameters. For instance, IPA modules could share code that instantiates, initializes and run algorithms if it wasn't for the fact that the the format of ISP parameters or statistics passed to the related functions is device-dependent.
To enable a shared implementation of those common tasks in libipa, the Module class template defines a standard internal interface between IPA modules and libipa. The template parameters specify the types of module-dependent data. IPA modules shall create a specialization of the Module class template in their namespace, and use it to specialize other classes of libipa, such as the Algorithm class.
|
inline |
Retrieve the list of instantiated algorithms.
|
inline |
Create algorithms from YAML configuration data.
[in] | context | The IPA context |
[in] | algorithms | Algorithms configuration data as a parsed YamlObject |
This function iterates over the list of algorithms parsed from the YAML configuration file, and instantiates and initializes the corresponding algorithms. The configuration data is expected to be correct, any error causes the function to fail and return immediately.
|
inlinestatic |
Add an algorithm factory class to the list of available algorithms.
[in] | factory | Factory to use to construct the algorithm |
This function registers an algorithm factory. It is meant to be called by the AlgorithmFactory constructor only.