![]() |
|
Public Member Functions | |
virtual const AreaGeometry & | getGeometry () const |
Main operation: computes differentials and produces approximation of motion. | |
![]() | |
void | exec () const |
Main operation: computes differentials and produces approximation of motion. | |
![]() | |
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 |
Returns the class name of this command, like "CmdVerbose". | |
const std::string & | getDescription () const final |
virtual const drain::ReferenceMap & | getParameters () const final |
![]() | |
Command (const Command &cmd) | |
virtual void | setParameters (const std::string &args) final |
template<class T > | |
void | setParameters (const T &args) |
template<class T > | |
void | setParameter (const std::string &key, const T &value) |
Set a value to a single parameter. | |
bool | hasParameters () const |
virtual void | run (const std::string ¶ms="") final |
Description of result, comparable to a return type of a function. ? | |
virtual void | update () |
Optional method for preparing command to execution. | |
Command & | addSection (int i) |
const std::string & | getLastParameters () const |
virtual void | help (std::ostream &ostr=std::cout, bool DETAILED=false) const |
virtual void | getRelatedCommands (std::ostream &ostr=std::cout) const |
![]() | |
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. | |
Protected Member Functions | |
virtual void | getSrcData (ImageTray< const Channel > &src) const |
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. | |
void | getMotion (size_t width, size_t height, ImageTray< Channel > &channels) const |
The result is stored in this channel pack. | |
![]() | |
void | debugChannels (const ImageTray< const Channel > &channels, int i=-1, int j=-1) const |
![]() | |
virtual drain::ReferenceMap & | getParameters () final |
![]() | |
Command & | linkRelatedCommands () |
Protected Attributes | |
AreaGeometry | areaGeometry |
drain::Time | t1 |
For storing 1 st input timestamp. | |
drain::Time | t2 |
For storing 2nd input timestamp. | |
![]() | |
std::string | lastParameters |
![]() | |
Context * | contextPtr |
Additional Inherited Members | |
![]() | |
typedef FastOpticalFlow2Op | bean_t |
![]() | |
typedef int | cmd_section_type |
![]() | |
template<class T > | |
static Cloner< Context, T > & | getCloner () |
![]() | |
FastOpticalFlow2Op | bean |
![]() | |
cmd_section_type | section = 1 |
std::set< std::string > | relatedCommands |
Add related command(s), to appear in help after "See-also:" phrase. | |
![]() | |
static const SprinterLayout | cmdArgLayout = {",", "?", "=", ""} |
|
protectedvirtual |
Retrieves the difference image needed as a temporary storage. Maybe viewed for debugging.
The result is stored in this channel pack.
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 from CmdOpticalFlowBase.
|
inlinevirtual |
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.
Implements CmdOpticalFlowBase.
|
protectedvirtual |
The result is stored in this channel pack.
Derive the timestep needed further below for [m/s] scaling of the vectors (algorithm produces raw results in pixel scale).
Copy metadata from dataset1 (src1 ~ src2)
Create array for "horizontal" motion (uField component)
Create array for "vertical" motion (vField component)
Implements CmdOpticalFlowBase.
Retrieves the intensity images used as a basis of motion analysis.
IMPORTANT: DataSet<CartesianDst> below will read properties.
Implements CmdOpticalFlowBase.