JeVoisBase
1.8
JeVois Smart Embedded Machine Vision Toolkit Base Modules
|
|
Simple demo of the visual saliency algorithm of Itti et al., IEEE PAMI, 1998. More...
Public Member Functions | |
DemoSaliency (std::string const &instance) | |
Constructor. More... | |
virtual | ~DemoSaliency () |
Virtual destructor for safe inheritance. More... | |
virtual void | process (jevois::InputFrame &&inframe, jevois::OutputFrame &&outframe) override |
Processing function. More... | |
![]() | |
StdModule (std::string const &instance) | |
virtual | ~StdModule () |
void | sendSerialImg1Dx (unsigned int camw, float x, float size=0.0F, std::string const &id="", std::string const &extra="") |
void | sendSerialStd1Dx (float x, float size=0.0F, std::string const &id="", std::string const &extra="") |
void | sendSerialImg1Dy (unsigned int camh, float y, float size=0.0F, std::string const &id="", std::string const &extra="") |
void | sendSerialStd1Dy (float y, float size=0.0F, std::string const &id="", std::string const &extra="") |
void | sendSerialImg2D (unsigned int camw, unsigned int camh, float x, float y, float w=0.0F, float h=0.0F, std::string const &id="", std::string const &extra="") |
void | sendSerialStd2D (float x, float y, float w=0.0F, float h=0.0F, std::string const &id="", std::string const &extra="") |
void | sendSerialContour2D (unsigned int camw, unsigned int camh, std::vector< cv::Point_< T > > points, std::string const &id="", std::string const &extra="") |
void | sendSerialStd3D (float x, float y, float z, float w=0.0F, float h=0.0F, float d=0.0F, float q1=0.0F, float q2=0.0F, float q3=0.0f, float q4=0.0F, std::string const &id="", std::string const &extra="") |
void | sendSerialStd3D (std::vector< cv::Point3f > points, std::string const &id="", std::string const &extra="") |
![]() | |
Module (std::string const &instance) | |
virtual | ~Module () |
virtual void | process (InputFrame &&inframe) |
virtual void | sendSerial (std::string const &str) |
virtual void | parseSerial (std::string const &str, std::shared_ptr< UserInterface > s) |
virtual void | supportedCommands (std::ostream &os) |
JEVOIS_DEFINE_ENUM_CLASS (SerStyle,(Terse)(Normal)(Detail)(Fine)) JEVOIS_DECLARE_PARAMETER(serstyle | |
JEVOIS_DECLARE_PARAMETER (serprec, unsigned int, "Number of decimal points in standardized serial messages as " "defined in http://jevois.org/doc/UserSerialStyle.html", 0U, ParamCateg) | |
![]() | |
Component (std::string const &instance) | |
virtual | ~Component () |
std::shared_ptr< Component > | getSubComponent (std::string const &instance) const |
std::shared_ptr< Comp > | addSubComponent (std::string const &instance, Args &&...args) |
void | removeSubComponent (std::shared_ptr< Comp > &component) |
void | removeSubComponent (std::string const &instance, bool warnIfNotFound=true) |
std::shared_ptr< Comp > | getSubComponent (std::string const &instance) const |
bool | isTopLevel () const |
bool | initialized () const |
std::string const & | className () const |
std::string const & | instanceName () const |
std::vector< std::string > | setParamVal (std::string const ¶mdescriptor, T const &val) |
void | setParamValUnique (std::string const ¶mdescriptor, T const &val) |
std::vector< std::pair< std::string, T > > | getParamVal (std::string const ¶mdescriptor) const |
T | getParamValUnique (std::string const ¶mdescriptor) const |
std::vector< std::string > | setParamString (std::string const ¶mdescriptor, std::string const &val) |
void | setParamStringUnique (std::string const ¶mdescriptor, std::string const &val) |
std::vector< std::pair< std::string, std::string > > | getParamString (std::string const ¶mdescriptor) const |
std::string | getParamStringUnique (std::string const ¶mdescriptor) const |
void | freezeParam (std::string const ¶mdescriptor) |
void | unFreezeParam (std::string const ¶mdescriptor) |
void | freezeAllParams () |
void | unFreezeAllParams () |
std::string | descriptor () const |
void | setParamsFromFile (std::string const &filename) |
std::istream & | setParamsFromStream (std::istream &is, std::string const &absfile) |
void | setPath (std::string const &path) |
std::string | absolutePath (std::string const &path="") |
std::shared_ptr< Comp > | addSubComponent (std::string const &instance, Args &&...args) |
void | removeSubComponent (std::shared_ptr< Comp > &component) |
void | removeSubComponent (std::string const &instance, bool warnIfNotFound=true) |
std::shared_ptr< Comp > | getSubComponent (std::string const &instance) const |
bool | isTopLevel () const |
bool | initialized () const |
std::string const & | className () const |
std::string const & | instanceName () const |
std::vector< std::string > | setParamVal (std::string const ¶mdescriptor, T const &val) |
void | setParamValUnique (std::string const ¶mdescriptor, T const &val) |
std::vector< std::pair< std::string, T > > | getParamVal (std::string const ¶mdescriptor) const |
T | getParamValUnique (std::string const ¶mdescriptor) const |
std::vector< std::string > | setParamString (std::string const ¶mdescriptor, std::string const &val) |
void | setParamStringUnique (std::string const ¶mdescriptor, std::string const &val) |
std::vector< std::pair< std::string, std::string > > | getParamString (std::string const ¶mdescriptor) const |
std::string | getParamStringUnique (std::string const ¶mdescriptor) const |
void | freezeParam (std::string const ¶mdescriptor) |
void | unFreezeParam (std::string const ¶mdescriptor) |
void | freezeAllParams () |
void | unFreezeAllParams () |
std::string | descriptor () const |
void | setParamsFromFile (std::string const &filename) |
std::istream & | setParamsFromStream (std::istream &is, std::string const &absfile) |
void | setPath (std::string const &path) |
std::string | absolutePath (std::string const &path="") |
![]() | |
virtual | ~ParameterRegistry () |
Protected Attributes | |
std::shared_ptr< Saliency > | itsSaliency |
std::shared_ptr< Kalman2D > | itsKF |
jevois::Timer | itsTimer |
Additional Inherited Members | |
![]() | |
virtual void | preInit () |
virtual void | postInit () |
virtual void | preUninit () |
virtual void | postUninit () |
virtual void | preInit () |
virtual void | postInit () |
virtual void | preUninit () |
virtual void | postUninit () |
![]() | |
void | addParameter (ParameterBase *const param) |
void | removeParameter (ParameterBase *const param) |
void | callbackInitCall () |
Simple demo of the visual saliency algorithm of Itti et al., IEEE PAMI, 1998.
Visual saliency algorithm as described at http://ilab.usc.edu/bu/
This algorithm finds the location in the camera's view that is the most attention-grabbing, conspicuous, or so-called salient. This location is marked on every video frame by the pink square. Salient locations detected on each frame are smoothed over time using a Kalman filter. The smoothed attention trajectory is shown with a green circle.
For an introduction to visual saliency computation, see http://ilab.usc.edu/bu/
This module can send standardized serial messages as described in Standardized serial messages formatting, where all coordinates and sizes are standardized using Helper functions to convert coordinates from camera resolution to standardized. One message is issued on every video frame at the temporally smoothed attended (most salient) location (green circle in the video display):
id
: always sm (shorthand for saliency map)x
, y
: standardized 2D coordinates of temporally-filtered most salient pointw
, h
: standardized size of the pink square box around each attended pointextra
: none (empty string)Definition at line 79 of file DemoSaliency.C.
|
inline |
|
inlinevirtual |
Virtual destructor for safe inheritance.
Definition at line 90 of file DemoSaliency.C.
|
inlineoverridevirtual |
Processing function.
Reimplemented from jevois::Module.
Definition at line 93 of file DemoSaliency.C.
References jevois::rawimage::drawCircle(), jevois::rawimage::drawFilledRect(), drawGist(), drawMap(), jevois::rawimage::drawRect(), jevois::RawImage::height, itsKF, itsSaliency, itsTimer, jevois::rawimage::paste(), jevois::RawImage::require(), jevois::StdModule::sendSerialImg2D(), jevois::Timer::start(), jevois::Timer::stop(), jevois::RawImage::width, and jevois::rawimage::writeText().
|
protected |
Definition at line 217 of file DemoSaliency.C.
Referenced by DemoSaliency(), and process().
|
protected |
Definition at line 216 of file DemoSaliency.C.
Referenced by DemoSaliency(), and process().
|
protected |
Definition at line 218 of file DemoSaliency.C.
Referenced by process().