JeVoisBase  1.5
JeVois Smart Embedded Machine Vision Toolkit Base Modules
Share this page:
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. More...
 
virtual ~EyeTracker ()
 Destructor. More...
 
void process (cv::Mat &eyeimg, double pupell[5], bool debugdraw=false)
 Process grayscale byte image from camera. More...
 
- Public Member Functions inherited from jevois::Component
 Component (std::string const &instance)
 
virtual ~Component ()
 
std::shared_ptr< ComponentgetSubComponent (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 &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)
 
void unFreezeParam (std::string const &paramdescriptor)
 
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 &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)
 
void unFreezeParam (std::string const &paramdescriptor)
 
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="")
 
- Public Member Functions inherited from jevois::ParameterRegistry
virtual ~ParameterRegistry ()
 

Related Functions

(Note that these are not member functions.)

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

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 138 of file EyeTracker.C.

◆ ~EyeTracker()

EyeTracker::~EyeTracker ( )
virtual

Destructor.

Definition at line 144 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 151 of file EyeTracker.C.

References Calculate_Avg_Intensity_Hori(), Draw_Cross(), Reduce_Line_Noise(), and UINT8.

Friends And Related Function Documentation

◆ JEVOIS_DECLARE_PARAMETER() [1/4]

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

Parameter.

◆ JEVOIS_DECLARE_PARAMETER() [2/4]

JEVOIS_DECLARE_PARAMETER ( numrays  ,
int  ,
"Number of rays"  ,
18  ,
jevois::Range< int >  4, 180,
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 ( corneal  ,
int  ,
"Corneal window size"  ,
51  ,
ParamCateg   
)
related

Parameter.


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