JeVoisBase  1.22
JeVois Smart Embedded Machine Vision Toolkit Base Modules
Share this page:
Loading...
Searching...
No Matches
SalientRegions Class Reference

Extract the most salient regions and send them out over USB. More...

Inheritance diagram for SalientRegions:
Collaboration diagram for SalientRegions:

Public Member Functions

 SalientRegions (std::string const &instance)
 Constructor.
 
virtual ~SalientRegions ()
 Virtual destructor for safe inheritance.
 
virtual void process (jevois::InputFrame &&inframe, jevois::OutputFrame &&outframe) override
 Processing function.
 
- Public Member Functions inherited from jevois::Module
 Module (std::string const &instance)
 
virtual ~Module ()
 
virtual void process (InputFrame &&inframe)
 
virtual void process (InputFrame &&inframe, GUIhelper &helper)
 
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)
 
- Public Member Functions inherited from jevois::Component
 Component (std::string const &instance)
 
virtual ~Component ()
 
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 &paramdescriptor, T const &val)
 
void setParamValUnique (std::string const &paramdescriptor, T const &val)
 
std::vector< std::pair< std::string, T > > getParamVal (std::string const &paramdescriptor) const
 
getParamValUnique (std::string const &paramdescriptor) const
 
std::vector< std::string > setParamString (std::string const &paramdescriptor, std::string const &val)
 
void setParamStringUnique (std::string const &paramdescriptor, std::string const &val)
 
std::vector< std::pair< std::string, std::string > > getParamString (std::string const &paramdescriptor) const
 
std::string getParamStringUnique (std::string const &paramdescriptor) const
 
void freezeParam (std::string const &paramdescriptor, bool doit)
 
void freezeAllParams (bool doit)
 
std::string descriptor () const
 
void setParamsFromFile (std::string const &filename)
 
std::istream & setParamsFromStream (std::istream &is, std::string const &absfile)
 
virtual void paramInfo (std::shared_ptr< UserInterface > s, std::map< std::string, std::string > &categs, bool skipFrozen, std::string const &cname="", std::string const &pfx="")
 
void foreachParam (std::function< void(std::string const &compname, ParameterBase *p)> func, std::string const &cname="")
 
std::shared_ptr< DynamicParameter< T > > addDynamicParameter (std::string const &name, std::string const &description, T const &defaultValue, ParameterCategory const &category)
 
std::shared_ptr< DynamicParameter< T > > addDynamicParameter (std::string const &name, std::string const &description, T const &defaultValue, ValidValuesSpec< T > const &validValuesSpec, ParameterCategory const &category)
 
void setDynamicParameterCallback (std::string const &name, std::function< void(T const &)> cb, bool callnow=true)
 
void removeDynamicParameter (std::string const &name, bool throw_if_not_found=true)
 
void setPath (std::string const &path)
 
std::filesystem::path absolutePath (std::filesystem::path 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 &paramdescriptor, T const &val)
 
void setParamValUnique (std::string const &paramdescriptor, T const &val)
 
std::vector< std::pair< std::string, T > > getParamVal (std::string const &paramdescriptor) const
 
getParamValUnique (std::string const &paramdescriptor) const
 
std::vector< std::string > setParamString (std::string const &paramdescriptor, std::string const &val)
 
void setParamStringUnique (std::string const &paramdescriptor, std::string const &val)
 
std::vector< std::pair< std::string, std::string > > getParamString (std::string const &paramdescriptor) const
 
std::string getParamStringUnique (std::string const &paramdescriptor) const
 
void freezeParam (std::string const &paramdescriptor, bool doit)
 
void freezeAllParams (bool doit)
 
std::string descriptor () const
 
void setParamsFromFile (std::string const &filename)
 
std::istream & setParamsFromStream (std::istream &is, std::string const &absfile)
 
virtual void paramInfo (std::shared_ptr< UserInterface > s, std::map< std::string, std::string > &categs, bool skipFrozen, std::string const &cname="", std::string const &pfx="")
 
void foreachParam (std::function< void(std::string const &compname, ParameterBase *p)> func, std::string const &cname="")
 
std::shared_ptr< DynamicParameter< T > > addDynamicParameter (std::string const &name, std::string const &description, T const &defaultValue, ParameterCategory const &category)
 
std::shared_ptr< DynamicParameter< T > > addDynamicParameter (std::string const &name, std::string const &description, T const &defaultValue, ValidValuesSpec< T > const &validValuesSpec, ParameterCategory const &category)
 
void setDynamicParameterCallback (std::string const &name, std::function< void(T const &)> cb, bool callnow=true)
 
void removeDynamicParameter (std::string const &name, bool throw_if_not_found=true)
 
void setPath (std::string const &path)
 
std::filesystem::path absolutePath (std::filesystem::path const &path="")
 
- Public Member Functions inherited from jevois::ParameterRegistry
virtual ~ParameterRegistry ()
 

Protected Attributes

std::shared_ptr< SaliencyitsSaliency
 

Related Symbols

(Note that these are not member symbols.)

 JEVOIS_DECLARE_PARAMETER (inhsigma, float, "Sigma (pixels) used for inhibition of return", 32.0F, ParamCateg)
 Parameter.
 

Additional Inherited Members

- Protected Member Functions inherited from jevois::Component
virtual void preInit ()
 
virtual void postInit ()
 
virtual void preUninit ()
 
virtual void postUninit ()
 
virtual void preInit ()
 
virtual void postInit ()
 
virtual void preUninit ()
 
virtual void postUninit ()
 
- Protected Member Functions inherited from jevois::ParameterRegistry
void addParameter (ParameterBase *const param)
 
void removeParameter (ParameterBase *const param)
 
void callbackInitCall ()
 

Detailed Description

Extract the most salient regions and send them out over USB.

This module extracts cropped images around the N most salient (i.e., conspicuous, or attention-grabbing) locations in the JeVois camera's field of view. These regions are then streamed over USB, one of top of another. This module thus produces an output mainly intended for machine use: a host computer might grab the regions detected by JeVois, and run, for example, some object recognition algorithm on each region.

See DemoSaliency for more information about visual attention and saliency.

The number of regions extracted (N) is decided by the height of the desired USB output image, while the (square) region size (width and height) is determined by the output image width. Note that region width and height must be a multiple of 4. ALso note that Mac computers may not be able to grab and display video of width that is not a multiple of 16.

The most salient region is on top, the second most salient region is below the first one, etc.

Example use

With video mapping

YUYV 64 192 25.0 YUYV 320 240 25.0 JeVois SalientRegions

in JEVOIS:/config/videomappings.cfg, this module will extract three 64x64 salient regions, and will send them over USB one on top of the other (since USB video width is 64, which determines region size, and USB video height is 3x64 = 192, which determines the number of regions).

Author
Laurent Itti
Videomapping:
YUYV 64 192 25.0 YUYV 320 240 25.0 JeVois SalientRegions
Videomapping:
YUYV 100 400 10.0 YUYV 640 480 10.0 JeVois SalientRegions
Email:
itti@usc.edu
Address:
University of Southern California, HNB-07A, 3641 Watt Way, Los Angeles, CA 90089-2520, USA
Main URL:
http://jevois.org
Support URL:
http://jevois.org/doc
Other URL:
http://iLab.usc.edu
License:
GPL v3
Distribution:
Unrestricted
Restrictions:
None

Definition at line 83 of file SalientRegions.C.

Constructor & Destructor Documentation

◆ SalientRegions()

SalientRegions::SalientRegions ( std::string const &  instance)
inline

Constructor.

Definition at line 88 of file SalientRegions.C.

References itsSaliency.

◆ ~SalientRegions()

virtual SalientRegions::~SalientRegions ( )
inlinevirtual

Virtual destructor for safe inheritance.

Definition at line 92 of file SalientRegions.C.

Member Function Documentation

◆ process()

virtual void SalientRegions::process ( jevois::InputFrame &&  inframe,
jevois::OutputFrame &&  outframe 
)
inlineoverridevirtual

Processing function.

Reimplemented from jevois::Module.

Definition at line 95 of file SalientRegions.C.

References h, jevois::RawImage::height, itsSaliency, jevois::RawImage::require(), jevois::rawimage::roipaste(), and jevois::RawImage::width.

Friends And Related Symbol Documentation

◆ JEVOIS_DECLARE_PARAMETER()

JEVOIS_DECLARE_PARAMETER ( inhsigma  ,
float  ,
"Sigma (pixels) used for inhibition of return"  ,
32.  0F,
ParamCateg   
)
related

Parameter.

Member Data Documentation

◆ itsSaliency

std::shared_ptr<Saliency> SalientRegions::itsSaliency
protected

Definition at line 141 of file SalientRegions.C.

Referenced by process(), and SalientRegions().


The documentation for this class was generated from the following file: