JeVoisBase  1.22
JeVois Smart Embedded Machine Vision Toolkit Base Modules
Share this page:
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
EyeTracker Class Reference

Eye-tracker class used to detect gaze direction from close-up video of one's eye. More...

#include <jevoisbase/Components/EyeTracker/EyeTracker.H>

Inheritance diagram for EyeTracker:
Collaboration diagram for EyeTracker:

Public Member Functions

 EyeTracker (std::string const &instance)
 Constructor.
 
virtual ~EyeTracker ()
 Destructor.
 
void process (cv::Mat &eyeimg, double pupell[5], bool debugdraw=false)
 Process grayscale byte image from camera.
 
- 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 ()
 

Related Symbols

(Note that these are not member symbols.)

 JEVOIS_DECLARE_PARAMETER (edgethresh, unsigned char, "Pupil edge threshold", 20, ParamCateg)
 Parameter.
 
 JEVOIS_DECLARE_PARAMETER (numrays, int, "Number of rays", 18, jevois::Range< int >(4, 180), ParamCateg)
 Parameter.
 
 JEVOIS_DECLARE_PARAMETER (mincand, int, "Minimum number of feature candidates", 10, jevois::Range< int >(1, 50), ParamCateg)
 Parameter.
 
 JEVOIS_DECLARE_PARAMETER (corneal, int, "Corneal window size", 51, 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

Eye-tracker class used to detect gaze direction from close-up video of one's eye.

The original eye tracking software used here can be found at http://thirtysixthspan.com/openEyes/software.html

Definition at line 48 of file EyeTracker.H.

Constructor & Destructor Documentation

◆ EyeTracker()

EyeTracker::EyeTracker ( std::string const &  instance)

Constructor.

Definition at line 141 of file EyeTracker.C.

◆ ~EyeTracker()

EyeTracker::~EyeTracker ( )
virtual

Destructor.

Definition at line 147 of file EyeTracker.C.

Member Function Documentation

◆ process()

void EyeTracker::process ( cv::Mat &  eyeimg,
double  pupell[5],
bool  debugdraw = false 
)

Process grayscale byte image from camera.

Note: we will draw the detected ellipse and a few more things in the image.

pupell will be filled with the pupil ellipse params, in the order used by opencv to draw ellipses: a, b, cx, cy, theta.

Definition at line 154 of file EyeTracker.C.

References LFATAL.

Friends And Related Symbol Documentation

◆ JEVOIS_DECLARE_PARAMETER() [1/4]

JEVOIS_DECLARE_PARAMETER ( corneal  ,
int  ,
"Corneal window size"  ,
51  ,
ParamCateg   
)
related

Parameter.

◆ JEVOIS_DECLARE_PARAMETER() [2/4]

JEVOIS_DECLARE_PARAMETER ( edgethresh  ,
unsigned char  ,
"Pupil edge threshold"  ,
20  ,
ParamCateg   
)
related

Parameter.

◆ JEVOIS_DECLARE_PARAMETER() [3/4]

JEVOIS_DECLARE_PARAMETER ( mincand  ,
int  ,
"Minimum number of feature candidates"  ,
10  ,
jevois::Range< int >  1, 50,
ParamCateg   
)
related

Parameter.

◆ JEVOIS_DECLARE_PARAMETER() [4/4]

JEVOIS_DECLARE_PARAMETER ( numrays  ,
int  ,
"Number of rays"  ,
18  ,
jevois::Range< int >  4, 180,
ParamCateg   
)
related

Parameter.


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