ACT-CV - Machine Vision for Cognitive Modeling
Classes | Macros | Enumerations | Functions
ACT-CV.i File Reference

the public interface of the "Computer Vision for ACT-R" package More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Line
 used for data exchange More...
 
struct  ObjectPosition
 holds the result data More...
 

Macros

#define __ACT_CV_I
 

Enumerations

enum  video_source {
  s_none, s_robot, s_cam, s_file,
  s_singleImage, s_test, s_web
}
 sources of video streams More...
 
enum  cv_algorithm {
  a_none, a_oflow, a_lines, a_match,
  a_text, a_color
}
 computer vision algorithms More...
 

Functions

void SelectSource (video_source vs)
 select a source and initialize it More...
 
void SelectFileBasedSource (const char *filenameOrURL, video_source vs)
 select a source and initialize it More...
 
void ReleaseSource ()
 release a previous selected source More...
 
void ActCvInit ()
 start the video processing thread More...
 
void ActCvDeInit ()
 stop the video processing thread More...
 
void WaitForNextFrame ()
 wait a short time for a frame More...
 
void AddRecognition (cv_algorithm a)
 add an algorithm to the list of currently used algorithms More...
 
void RemoveRecognition (cv_algorithm a)
 remove an algorithm from the list of currently used algorithms More...
 
void SetMatchDefFile (const char *s)
 set the definition file for the matcher More...
 
void UpdateAttendedLoc (int x, int y)
 tell the vision package where ACT-R is currently looking More...
 
void MoveMouseTo (int x, int y)
 
void MouseClick (int button)
 
void PressKey (int key)
 
int FindFirstLine ()
 start the line data exchange More...
 
int FindNextLine (int handle, struct Line *line)
 harvest the line data More...
 
void LineFindFinish (int handle)
 release internal structures More...
 
int FindFirstMatch ()
 start the image matching result exchange More...
 
int FindNextMatch (int handle, struct ObjectPosition *pos)
 harvest the match data More...
 
void MatchFindFinish (int handle)
 release internal structures More...
 
int FindFirstText ()
 get textual elements More...
 
int FindNextText (int handle, struct ObjectPosition *pos)
 harvest the text data More...
 
void TextFindFinish (int handle)
 release internal structures More...
 

Detailed Description

the public interface of the "Computer Vision for ACT-R" package

Definition in file ACT-CV.i.

Macro Definition Documentation

#define __ACT_CV_I

Definition at line 23 of file ACT-CV.i.

Enumeration Type Documentation

computer vision algorithms

Enumerator
a_none 
a_oflow 
a_lines 
a_match 
a_text 
a_color 

Definition at line 32 of file ACT-CV.i.

sources of video streams

Enumerator
s_none 
s_robot 
s_cam 
s_file 
s_singleImage 
s_test 
s_web 

Definition at line 30 of file ACT-CV.i.

Function Documentation

void ActCvDeInit ( )

stop the video processing thread

Definition at line 331 of file server-main.cpp.

References bgThread, exitFlag, and threadMutex.

Referenced by TestLines(), TestMatch(), and TestText().

void ActCvInit ( )

start the video processing thread

Todo:
error handling when there's already a thread running

Definition at line 307 of file server-main.cpp.

References BGFunc(), bgThread, exitFlag, MHDBGMSG, and threadMutex.

Referenced by TestLines(), TestMatch(), and TestText().

void AddRecognition ( cv_algorithm  a)

add an algorithm to the list of currently used algorithms

Definition at line 375 of file server-main.cpp.

References AddRecognitionInternal(), jobs, MHDBGMSG, and mhthreads::Condition::Wait().

Referenced by TestLines(), TestMatch(), and TestText().

int FindFirstLine ( )

start the line data exchange

Returns
handle for subsequent calls to FindNextLine and LineFindFinish. 0 on error.

If FindFirstLine returns a handle, you must call LineFindFinish to release internal memory structures.

Warning
not threadsafe

Definition at line 434 of file server-main.cpp.

References lineObs, lineResult, and MHDBGMSG.

Referenced by TestLines().

int FindFirstMatch ( )

start the image matching result exchange

Returns
handle for subsequent calls to FindNextMatch and MatchFindFinish. 0 on error.

If FindFirstMatch returns a handle, you must call MatchFindFinish to release internal memory structures.

Warning
not threadsafe

Definition at line 463 of file server-main.cpp.

References matchObs, matchResult, and MHDBGMSG.

Referenced by TestMatch().

int FindFirstText ( )

get textual elements

Definition at line 490 of file server-main.cpp.

References MHDBGMSG, textObs, and textResult.

Referenced by TestText().

int FindNextLine ( int  handle,
struct Line line 
)

harvest the line data

Definition at line 448 of file server-main.cpp.

References lineResult, and MHDBGMSG.

Referenced by TestLines().

int FindNextMatch ( int  handle,
struct ObjectPosition pos 
)

harvest the match data

Definition at line 474 of file server-main.cpp.

References matchResult, and MHDBGMSG.

Referenced by TestMatch().

int FindNextText ( int  handle,
struct ObjectPosition pos 
)

harvest the text data

Definition at line 501 of file server-main.cpp.

References MHDBGMSG, and textResult.

Referenced by TestText().

void LineFindFinish ( int  handle)

release internal structures

Definition at line 454 of file server-main.cpp.

References lineResult, and MHDBGMSG.

Referenced by TestLines().

void MatchFindFinish ( int  handle)

release internal structures

Definition at line 480 of file server-main.cpp.

References matchResult, and MHDBGMSG.

Referenced by TestMatch().

void MouseClick ( int  button)

Definition at line 419 of file server-main.cpp.

References QtFrameSource::DoClick(), and qt.

Referenced by TestText().

void MoveMouseTo ( int  x,
int  y 
)

Definition at line 410 of file server-main.cpp.

References attLocObs, qt, and QtFrameSource::SetMousePos().

Referenced by TestText().

void PressKey ( int  key)

Definition at line 426 of file server-main.cpp.

References QtFrameSource::DoPressKey(), and qt.

void ReleaseSource ( )

release a previous selected source

Definition at line 263 of file server-main.cpp.

References jobs, MHDBGMSG, ReleaseSourceInternal(), and mhthreads::Condition::Wait().

Referenced by TestLines(), TestMatch(), and TestText().

void RemoveRecognition ( cv_algorithm  a)

remove an algorithm from the list of currently used algorithms

Todo:
implement me

Definition at line 396 of file server-main.cpp.

void SelectFileBasedSource ( const char *  filenameOrURL,
video_source  vs 
)

select a source and initialize it

Definition at line 226 of file server-main.cpp.

References frameSourceFileName, jobs, MHDBGMSG, SelectSourceInternal(), and mhthreads::Condition::Wait().

Referenced by TestLines(), and TestText().

void SelectSource ( video_source  vs)

select a source and initialize it

Definition at line 212 of file server-main.cpp.

References jobs, MHDBGMSG, SelectSourceInternal(), and mhthreads::Condition::Wait().

Referenced by TestLines(), and TestMatch().

void SetMatchDefFile ( const char *  s)

set the definition file for the matcher

Definition at line 389 of file server-main.cpp.

References matchDefFileName.

Referenced by TestMatch().

void TextFindFinish ( int  handle)

release internal structures

Definition at line 507 of file server-main.cpp.

References MHDBGMSG, and textResult.

Referenced by TestText().

void UpdateAttendedLoc ( int  x,
int  y 
)

tell the vision package where ACT-R is currently looking

Definition at line 400 of file server-main.cpp.

References attLocObs, and MHDBGMSG.

Referenced by TestMatch(), and TestText().

void WaitForNextFrame ( )

wait a short time for a frame

Definition at line 320 of file server-main.cpp.

References frameLoop, and MHDBGMSG.

Referenced by TestLines(), TestMatch(), and TestText().



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