
#include "Image/OpenCVUtil.H"#include "Beowulf/Beowulf.H"#include "Component/ModelManager.H"#include "Raster/Raster.H"#include "GUI/XWinManaged.H"#include "Image/Image.H"#include "Image/Pixels.H"#include "Util/Timer.H"#include "Beobot/beobot-GSnav-def.H"#include "Beobot/BeobotBrainMT.H"#include <signal.h>#include "Image/ShapeOps.H"#include "Image/CutPaste.H"#include "Image/MathOps.H"#include "Image/DrawOps.H"
Go to the source code of this file.
Defines | |
| #define | WINSIZE 7 |
| #define | templThresh 2000.0F |
Functions | |
| void | getTrackCommand (TCPmessage &rmsg, int32 rframe, int32 rnode, int32 raction, ImageSet< float > &cmap, bool &resetCurrLandmark, std::vector< Point2D< int > > &clmpt, bool &resetNextLandmark, std::vector< Point2D< int > > &nlmpt) |
| get the request sent by Visual Cortex | |
| void | processTrackCommand (ImageSet< float > cmap, std::vector< ImageSet< float > > &clmbias, std::vector< Point2D< int > > &clmbiasOffset, std::vector< ImageSet< float > > &nlmbias, std::vector< Point2D< int > > &nlmbiasOffset, bool resetCurrLandmark, std::vector< Point2D< int > > &clmpt, std::vector< Point2D< int > > &prevClmptsc, bool resetNextLandmark, std::vector< Point2D< int > > &nlmpt, std::vector< Point2D< int > > &prevNlmptsc, rutz::shared_ptr< XWinManaged > dispWin) |
| process the request of the Visual Cortex | |
| void | setupTrackingResultPacket (TCPmessage &smsg, int rframe, std::vector< Point2D< int > > clmpt, std::vector< Point2D< int > > nlmpt) |
| setup the tracking result packet to be sent to Visual Cortex | |
| ImageSet< float > | setNewBias (Point2D< int > inTrackLoc, Point2D< int > &biasOffset, ImageSet< float > cmap, rutz::shared_ptr< XWinManaged > dispWin) |
| resets the bias template to the region around the point passed | |
| Point2D< int > | trackPoint (ImageSet< float > cmap, ImageSet< float > &bias, Point2D< int > biasOffset, Point2D< int > trackLoc, rutz::shared_ptr< XWinManaged > dispWin) |
| track the object at the point | |
| void | updateTemplate (Point2D< int > upLeft, ImageSet< float > cmap, ImageSet< float > &bias, rutz::shared_ptr< XWinManaged > dispWin) |
| update the template used for tracking | |
| Image< float > | getBiasedSMap (ImageSet< float > cmap, ImageSet< float > bias, rutz::shared_ptr< XWinManaged > dispWin) |
| get the biased saliency map for tracking | |
| void | terminate (int s) |
| Signal handler (e.g., for control-C). | |
| int | main (const int argc, const char **argv) |
Variables | |
| static bool | goforever = true |
| Will turn false on interrupt signal. | |
Robot navigation using saliency and gist. Run beobot-GSnav-master at CPU_A to run Gist-Saliency model Run beobot-GSnav at CPU_B to run SIFT
Definition in file beobot-GSnav-dorsal.C.
| Image< float > getBiasedSMap | ( | ImageSet< float > | cmap, | |
| ImageSet< float > | bias, | |||
| rutz::shared_ptr< XWinManaged > | dispWin | |||
| ) |
get the biased saliency map for tracking
Definition at line 620 of file beobot-GSnav-dorsal.C.
References img2ipl(), and ZEROS.
Referenced by trackPoint().
| void getTrackCommand | ( | TCPmessage & | rmsg, | |
| int32 | rframe, | |||
| int32 | rnode, | |||
| int32 | raction, | |||
| ImageSet< float > & | cmap, | |||
| bool & | resetCurrLandmark, | |||
| std::vector< Point2D< int > > & | clmpt, | |||
| bool & | resetNextLandmark, | |||
| std::vector< Point2D< int > > & | nlmpt | |||
| ) |
get the request sent by Visual Cortex
Definition at line 310 of file beobot-GSnav-dorsal.C.
References TCPmessage::getElementFloatImaSet(), TCPmessage::getElementInt32(), and TCPmessage::reset().
| void processTrackCommand | ( | ImageSet< float > | cmap, | |
| std::vector< ImageSet< float > > & | clmbias, | |||
| std::vector< Point2D< int > > & | clmbiasOffset, | |||
| std::vector< ImageSet< float > > & | nlmbias, | |||
| std::vector< Point2D< int > > & | nlmbiasOffset, | |||
| bool | resetCurrLandmark, | |||
| std::vector< Point2D< int > > & | clmpt, | |||
| std::vector< Point2D< int > > & | prevClmptsc, | |||
| bool | resetNextLandmark, | |||
| std::vector< Point2D< int > > & | nlmpt, | |||
| std::vector< Point2D< int > > & | prevNlmptsc, | |||
| rutz::shared_ptr< XWinManaged > | dispWin | |||
| ) |
process the request of the Visual Cortex
Definition at line 353 of file beobot-GSnav-dorsal.C.
References setNewBias(), and trackPoint().
| ImageSet< float > setNewBias | ( | Point2D< int > | inTrackLoc, | |
| Point2D< int > & | biasOffset, | |||
| ImageSet< float > | cmap, | |||
| rutz::shared_ptr< XWinManaged > | dispWin | |||
| ) |
resets the bias template to the region around the point passed
Definition at line 458 of file beobot-GSnav-dorsal.C.
References Point2D< T >::i.
Referenced by processTrackCommand().
| void setupTrackingResultPacket | ( | TCPmessage & | smsg, | |
| int | rframe, | |||
| std::vector< Point2D< int > > | clmpt, | |||
| std::vector< Point2D< int > > | nlmpt | |||
| ) |
setup the tracking result packet to be sent to Visual Cortex
Definition at line 435 of file beobot-GSnav-dorsal.C.
References TCPmessage::addInt32(), and TCPmessage::reset().
| void terminate | ( | int | s | ) |
Signal handler (e.g., for control-C).
Definition at line 146 of file beobot-GSnav-dorsal.C.
References goforever.
| Point2D< int > trackPoint | ( | ImageSet< float > | cmap, | |
| ImageSet< float > & | bias, | |||
| Point2D< int > | biasOffset, | |||
| Point2D< int > | trackLoc, | |||
| rutz::shared_ptr< XWinManaged > | dispWin | |||
| ) |
track the object at the point
Definition at line 515 of file beobot-GSnav-dorsal.C.
References Image< T >::beginw(), Point2D< T >::distance(), Image< T >::endw(), findMin(), getBiasedSMap(), Image< T >::getWidth(), Point2D< T >::i, sqrt(), and updateTemplate().
Referenced by processTrackCommand().
| void updateTemplate | ( | Point2D< int > | upLeft, | |
| ImageSet< float > | cmap, | |||
| ImageSet< float > & | bias, | |||
| rutz::shared_ptr< XWinManaged > | dispWin | |||
| ) |
update the template used for tracking
Definition at line 592 of file beobot-GSnav-dorsal.C.
References distance().
Referenced by trackPoint().
bool goforever = true [static] |
Will turn false on interrupt signal.
Definition at line 97 of file beobot-GSnav-dorsal.C.
Referenced by terminate().
1.6.3