#include "Channels/ChannelBase.H"
#include "Channels/ChannelOpts.H"
#include "Component/GlobalOpts.H"
#include "Component/ModelManager.H"
#include "Devices/DeviceOpts.H"
#include "Devices/FrameGrabberConfigurator.H"
#include "Devices/VCC4.H"
#include "GUI/XWinManaged.H"
#include "Image/DrawOps.H"
#include "Image/Image.H"
#include "Image/ShapeOps.H"
#include "Image/fancynorm.H"
#include "Media/MediaSimEvents.H"
#include "Neuro/NeuroOpts.H"
#include "Neuro/NeuroSimEvents.H"
#include "Neuro/SaccadeControllers.H"
#include "Neuro/ShapeEstimator.H"
#include "Neuro/SimulationViewerStd.H"
#include "Neuro/SpatialMetrics.H"
#include "Neuro/StdBrain.H"
#include "Neuro/VisualCortex.H"
#include "Simulation/SimEventQueueConfigurator.H"
#include "Transport/FrameIstream.H"
#include "Util/log.H"
#include <algorithm>
#include <cmath>
#include <iostream>
#include <stdio.h>
Go to the source code of this file.
Defines | |
#define | CAM_WINDOW_NAME "Saliency Calculated" |
#define | CAM_PREV_NAME "Captured Image" |
#define | ANG_FACTOR (180.0/Pi) |
#define | MAXPAN ((float)100.0) |
#define | MINPAN ((float)-100.0) |
#define | MAXTILT ((float)30.0) |
#define | MINTILT ((float)-30.0) |
#define | TOO_MUCH_TIME SimTime::SECS(0.7) |
Functions | |
float | sqr (float x) |
float | randang () |
int | main (const int argc, const char **argv) |
Use a pan-tilt camera for executing saccades
Definition in file app-cam-saccades.C.
int main | ( | const int | argc, | |
const char ** | argv | |||
) |
This program takes input from a camera, calculates the most salient spot(s) and moves the camera there according to the following rules:
1) take image from camera 2) calculate next most salient spot 3) If (spot is already in list) goto 2 4) store spot in list 5) move to the spot 6) goto 1
The list is finite (small) sized and "forgets" the oldest entries. When the search for the next most salient spot in a given image takes too much time, the camera is moved by a random amount.
Definition at line 112 of file app-cam-saccades.C.
References ModelComponent::addSubComponent(), drawDisk(), XWindow::drawImage(), nub::soft_ref< T >::get(), Dims::h(), Point2D< T >::i, Point2D< T >::isValid(), LOG_FLAGS, LOG_FULLTRACE, max(), MC_RECURSE, min(), OPT_ShapeEstimatorMode, ModelManager::parseCommandLine(), XWinManaged::pressedCloseButton(), rescale(), nub::soft_ref< T >::reset(), ModelManager::setOptionValString(), ModelComponent::start(), ModelComponent::stop(), and Dims::w().