|
Utility for creating a Command that runs FastOpticalFlowOp operator. More...
#include <CommandOpticalFlow.h>
Public Member Functions | |
void | exec () const |
Main operation: computes differentials and produces approximation of motion. More... | |
Public Member Functions inherited from BeanCommand< FastOpticalFlow2Op > | |
BeanCommand (const std::string &name, const std::string &description) | |
BeanCommand (const BeanCommand &cmd) | |
BeanCommand (FastOpticalFlow2Op &b) | |
virtual const bean_t & | getBean () const |
virtual bean_t & | getBean () |
const std::string & | getName () const final |
const std::string & | getDescription () const final |
virtual const drain::ReferenceMap & | getParameters () const final |
Public Member Functions inherited from Command | |
Command (const Command &cmd) | |
virtual void | setParameters (const std::string &args) final |
template<class T > | |
void | setParameters (const SmartMap< T > &args) |
template<class T > | |
void | setParameter (const std::string &key, const T &value) |
Set a value to a single parameter. More... | |
Command & | addSection (drain::Flagger::ivalue_t i) |
virtual void | update () |
Optional method for preparing command to execution. More... | |
bool | hasParameters () const |
virtual const std::string & | getType () const |
Description of result, comparable to a return type of a function. ? | |
virtual void | run (const std::string ¶ms="") |
Convenience. Sets parameters and executes the command. More... | |
const std::string & | getLastParameters () const |
After executing this command run a routine, if defined. More... | |
Public Member Functions inherited from Contextual | |
Contextual () | |
Sets internal contextPtr to NULL. | |
Contextual (const Contextual &src) | |
Copies base context (even null) of the source. Notice that the actual instance may be of derived class. | |
Contextual (Context &ctx) | |
Copies internal contextPtr. | |
template<class C > | |
void | setContext () |
Sets internal contextPtr to the static source. | |
void | setExternalContext (Context &ctx) |
Sets internal contextPtr to outside target. | |
bool | contextIsSet () const |
True, if contextPtr has been set. | |
template<class T = Context> | |
T & | getContext () const |
If context has been set, returns it through a cast to base class Context. More... | |
Protected Member Functions | |
virtual const AreaGeometry & | getGeometry () const =0 |
Main operation: computes differentials and produces approximation of motion. More... | |
virtual void | getSrcData (ImageTray< const Channel > &channels) const =0 |
Retrieves the intensity images used as a basis of motion analysis. | |
virtual void | getDiff (size_t width, size_t height, double max, ImageTray< Channel > &channels) const |
Retrieves the difference image needed as a temporary storage. Maybe viewed for debugging. More... | |
virtual void | getMotion (size_t width, size_t height, ImageTray< Channel > &channels) const =0 |
The result is stored in this channel pack. | |
void | debugChannels (const ImageTray< const Channel > &channels, int i=-1, int j=-1) const |
Protected Member Functions inherited from BeanCommand< FastOpticalFlow2Op > | |
virtual drain::ReferenceMap & | getParameters () final |
Additional Inherited Members | |
Public Types inherited from BeanCommand< FastOpticalFlow2Op > | |
typedef FastOpticalFlow2Op | bean_t |
Static Public Member Functions inherited from Contextual | |
template<class T > | |
static Cloner< Context, T > & | getCloner () |
Public Attributes inherited from BeanCommand< FastOpticalFlow2Op > | |
FastOpticalFlow2Op | bean |
Public Attributes inherited from Command | |
int | section = 1 |
Static Public Attributes inherited from Command | |
static const SprinterLayout | cmdArgLayout = {",", "?", "=", ""} |
Protected Attributes inherited from Command | |
std::string | lastParameters |
Protected Attributes inherited from Contextual | |
Context * | contextPtr |
Utility for creating a Command that runs FastOpticalFlowOp operator.
Optical flow needs two input images, computes derivatives on them and produces an approximation of motion, ie. the flow.
This utility provides interfacing for those data.
|
virtual |
|
protectedvirtual |
Retrieves the difference image needed as a temporary storage. Maybe viewed for debugging.
It is recommended that the image is of type double, as computation of differentials (involving functors) and OpticalFlowWindow use doubles.
width | - width of the image |
height | - height of the image |
max | - expected physical max value (needed if small-integer data used; esp. for subtractions). |
channels | - provided resource |
Reimplemented in CartesianOpticalFlow.
|
protectedpure virtual |
Main operation: computes differentials and produces approximation of motion.
Desires geometry of the resulting motion field. Implementations may return the resolution of the original data. In derived classes, this could be parameters set by user.
Implemented in CartesianOpticalFlow.