ACT-CV - Machine Vision for Cognitive Modeling
Public Member Functions | Private Member Functions | Private Attributes | List of all members
AttendedLocObs Class Reference

show the current attended location of ACT-Rs vision module More...

#include <FrameObserver.h>

Inheritance diagram for AttendedLocObs:
Inheritance graph
Collaboration diagram for AttendedLocObs:
Collaboration graph

Public Member Functions

 AttendedLocObs ()
 
 ~AttendedLocObs ()
 
void FrameNotify (IplImage *img, int frameNr)
 
void UpdateAttendedLoc (int x, int y)
 notification about the current location More...
 
void UpdateMousePos (int x, int y)
 
const char * GetName () const
 the name of the observer More...
 
- Public Member Functions inherited from FrameObs
virtual void RegionInfoNotify (const std::vector< RegionInfo > &regions)
 
- Public Member Functions inherited from ReferenceCount
 ReferenceCount ()
 
virtual ~ReferenceCount ()
 
void IncRefCount ()
 
void DecRefCount ()
 

Private Member Functions

void PrintCross (IplImage *img)
 mark the current focus by a cross More...
 
- Private Member Functions inherited from ImageCopy
 ImageCopy (int divi=1)
 
 ~ImageCopy ()
 
IplImage * GetCurCopy ()
 
IplImage * GetCopy (IplImage *img, int frameNr)
 

Private Attributes

GCPointer< FrameObswin
 the window More...
 
CvPoint focus
 the current attended location More...
 
CvPoint mouse
 the current mouse location More...
 
mhthreads::Mutex mutex
 mutex for this class More...
 

Detailed Description

show the current attended location of ACT-Rs vision module

Warning
HighGUI is not thread safe.

Instances of this class are manipulated by the video thread and the ACT-R thread. Be careful!

Definition at line 575 of file FrameObserver.h.

Constructor & Destructor Documentation

AttendedLocObs::AttendedLocObs ( )

Definition at line 620 of file FrameObserver.h.

References GetName(), and win.

AttendedLocObs::~AttendedLocObs ( )

Definition at line 625 of file FrameObserver.h.

References win.

Member Function Documentation

void AttendedLocObs::FrameNotify ( IplImage *  img,
int  frameNr 
)
virtual

called by the video thread

Implements FrameObs.

Definition at line 629 of file FrameObserver.h.

References mhthreads::Mutex::Enter(), FrameObs::FrameNotify(), ImageCopy::GetCopy(), mhthreads::Mutex::Leave(), MHDBGMSG, mutex, PrintCross(), and win.

const char* AttendedLocObs::GetName ( ) const
virtual

the name of the observer

This is used to avoid that two instances of the same observer class are added to the observer list.

See Also
FrameLoop

Implements FrameObs.

Definition at line 661 of file FrameObserver.h.

Referenced by AttendedLocObs().

void AttendedLocObs::PrintCross ( IplImage *  img)
private

mark the current focus by a cross

Definition at line 588 of file FrameObserver.h.

References ATTLOC_CROSS_LWIDTH, focus, and mouse.

Referenced by FrameNotify().

void AttendedLocObs::UpdateAttendedLoc ( int  x,
int  y 
)

notification about the current location

called by the ACT-R thread (the "client")

Definition at line 645 of file FrameObserver.h.

References mhthreads::Mutex::Enter(), focus, mhthreads::Mutex::Leave(), MHDBGMSG, and mutex.

void AttendedLocObs::UpdateMousePos ( int  x,
int  y 
)

Member Data Documentation

CvPoint AttendedLocObs::focus
private

the current attended location

Definition at line 579 of file FrameObserver.h.

Referenced by PrintCross(), and UpdateAttendedLoc().

CvPoint AttendedLocObs::mouse
private

the current mouse location

Definition at line 581 of file FrameObserver.h.

Referenced by PrintCross(), and UpdateMousePos().

mhthreads::Mutex AttendedLocObs::mutex
private

mutex for this class

Definition at line 583 of file FrameObserver.h.

Referenced by FrameNotify(), UpdateAttendedLoc(), and UpdateMousePos().

GCPointer<FrameObs> AttendedLocObs::win
private

the window

Definition at line 577 of file FrameObserver.h.

Referenced by AttendedLocObs(), FrameNotify(), and ~AttendedLocObs().


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


ACT-CV - Machine Vision for Cognitive Modeling
© 2015 Marc Halbruegge (actcvlibrary@googlemail.com)