BeobotVisualCortex Class Reference

Visual Cortex of a Beobot. More...

#include <Beobot/BeobotVisualCortex.H>

Collaboration diagram for BeobotVisualCortex:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 BeobotVisualCortex ()
 constructor
void init (const int imgw, const int imgh, const int lev_min, const int lev_max, const int delta_min, const int delta_max, const int smlev, const int nborient, const MaxNormType normtype, const int jlev, const int jdepth, const int nbneig, nub::soft_ref< Beowulf > beow)
 initialization
void newVisualInput (Image< PixRGB< byte > > &scene)
 present a new visual input from an existing image
Image< PixRGB< byte > > * getScenePtr ()
 get pointer to scene image, so that we can directly grab it
void process (const int frame)
 call this to execute all the low-level processing on current scene
void processStart (const int frame)
 start parallel processing by sending off current frame
void processEnd (const int frame)
 end parallel process by receiving results
void singleCPUprocess (const int frame)
 not normally used; use process() instead
void masterProcess (const int frame)
 not normally used; use process() instead
void slaveProcess ()
 Call this in an infinite loop on slaves to process & return incoming maps.
void masterCollect ()
 not normally used; use process() instead
void getWinner (Point2D< int > &win) const
 get most salient location:
void initSprings (bool initPosMasses)
 initialize clustering with "spring method"
void iterateSprings (const float dt)
 iterate clustering with "spring method"
void getClusteredImage (Image< PixRGB< byte > > &clusteredImage, Point2D< int > &supposedTrackCentroid, const Point2D< int > &previousTrackCentroid)
 returns the clustered image and the position of the track centroid
void getInputSize (Point2D< int > &size)
 get size of input image
void getPositions (Image< PixRGB< byte > > &img, const int zoom)
 get mass positions

Detailed Description

Visual Cortex of a Beobot.

this is no longer derived from VisualCortex it can be used with one CPU or SMP systems

Definition at line 55 of file BeobotVisualCortex.H.


Constructor & Destructor Documentation

BeobotVisualCortex::BeobotVisualCortex (  ) 

constructor

Definition at line 57 of file BeobotVisualCortex.C.


Member Function Documentation

void BeobotVisualCortex::getClusteredImage ( Image< PixRGB< byte > > &  clusteredImage,
Point2D< int > &  supposedTrackCentroid,
const Point2D< int > &  previousTrackCentroid 
)

returns the clustered image and the position of the track centroid

Definition at line 435 of file BeobotVisualCortex.C.

References ImageSpring< T >::getClusteredImage().

Referenced by Beobot::intermediateLevel().

void BeobotVisualCortex::getInputSize ( Point2D< int > &  size  )  [inline]

get size of input image

Definition at line 165 of file BeobotVisualCortex.H.

References ASSERT, Image< T >::getHeight(), Image< T >::getWidth(), Point2D< T >::i, and Image< T >::initialized().

Referenced by Beobot::intermediateLevel().

void BeobotVisualCortex::getPositions ( Image< PixRGB< byte > > &  img,
const int  zoom 
)

get mass positions

Definition at line 446 of file BeobotVisualCortex.C.

References ImageSpring< T >::getPositions().

Image< PixRGB< byte > > * BeobotVisualCortex::getScenePtr (  ) 

get pointer to scene image, so that we can directly grab it

Definition at line 98 of file BeobotVisualCortex.C.

Referenced by Beobot::getRetinaPtr().

void BeobotVisualCortex::getWinner ( Point2D< int > &  win  )  const

get most salient location:

Definition at line 422 of file BeobotVisualCortex.C.

References Point2D< T >::i.

Referenced by Beobot::getWinner().

void BeobotVisualCortex::init ( const int  imgw,
const int  imgh,
const int  lev_min,
const int  lev_max,
const int  delta_min,
const int  delta_max,
const int  smlev,
const int  nborient,
const MaxNormType  normtype,
const int  jlev,
const int  jdepth,
const int  nbneig,
nub::soft_ref< Beowulf beow 
)

initialization

use beow=NULL for single-CPU processing

Definition at line 61 of file BeobotVisualCortex.C.

References JetSpec::addIndexRange(), Image< T >::beginw(), BY, Image< T >::endw(), ImageSpring< T >::init(), INTENS, rutz::make_shared(), ORI, JetSpec::print(), RAW, Image< T >::resize(), and RG.

Referenced by Beobot::Beobot().

void BeobotVisualCortex::initSprings ( bool  initPosMasses  ) 

initialize clustering with "spring method"

Definition at line 426 of file BeobotVisualCortex.C.

References ImageSpring< T >::initClustering().

Referenced by Beobot::intermediateLevel().

void BeobotVisualCortex::iterateSprings ( const float  dt  ) 

iterate clustering with "spring method"

Definition at line 431 of file BeobotVisualCortex.C.

References ImageSpring< T >::computePos().

Referenced by Beobot::intermediateLevel().

void BeobotVisualCortex::masterCollect (  ) 

not normally used; use process() instead

Definition at line 330 of file BeobotVisualCortex.C.

References Image< T >::beginw(), BY, COLOR, FLICKER, TCPmessage::getElementFloatIma(), Image< T >::getHeight(), Image< T >::getWidth(), INTENS, ORI, RAW, and RG.

Referenced by process(), and processEnd().

void BeobotVisualCortex::masterProcess ( const int  frame  ) 

not normally used; use process() instead

Definition at line 225 of file BeobotVisualCortex.C.

References TCPmessage::addImage(), ASSERT, getRGBY(), lum, TCPmessage::reset(), and TCPmessage::setAction().

Referenced by process(), and processStart().

void BeobotVisualCortex::newVisualInput ( Image< PixRGB< byte > > &  scene  ) 

present a new visual input from an existing image

Definition at line 94 of file BeobotVisualCortex.C.

References Image< T >::getHeight(), and Image< T >::getWidth().

Referenced by Beobot::newVisualInput().

void BeobotVisualCortex::process ( const int  frame  ) 

call this to execute all the low-level processing on current scene

This method will automatically parallelize the processing if a non-NULL beowulf was passed at initialization. However, it will call processStart() and processEnd() in sequence, waiting for the results to be ready before returning. It may be a better idea to separately call processStart(), do something, then processEnd(). For single-CPU operation, process() is the only option.

Definition at line 102 of file BeobotVisualCortex.C.

References Image< T >::clear(), findMax(), nub::soft_ref< T >::get(), Point2D< T >::i, masterCollect(), masterProcess(), maxNormalize(), and singleCPUprocess().

Referenced by Beobot::lowLevel().

void BeobotVisualCortex::processEnd ( const int  frame  ) 

end parallel process by receiving results

Definition at line 137 of file BeobotVisualCortex.C.

References Image< T >::clear(), findMax(), Timer::get(), Point2D< T >::i, masterCollect(), and maxNormalize().

Referenced by Beobot::lowLevelEnd().

void BeobotVisualCortex::processStart ( const int  frame  ) 

start parallel processing by sending off current frame

Definition at line 129 of file BeobotVisualCortex.C.

References masterProcess().

Referenced by Beobot::lowLevelStart().

void BeobotVisualCortex::singleCPUprocess ( const int  frame  ) 
void BeobotVisualCortex::slaveProcess (  ) 

Call this in an infinite loop on slaves to process & return incoming maps.

Definition at line 253 of file BeobotVisualCortex.C.

References Gaussian5, TCPmessage::getElementByteIma(), Image< T >::initialized(), and Oriented5.


The documentation for this class was generated from the following files:
Generated on Sun May 8 08:43:07 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3