Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

test-canny.C File Reference


Detailed Description

[put description here]

Definition in file test-canny.C.

#include "BeoSub/CannyModel.H"
#include "BeoSub/hysteresis.H"
#include "Component/ModelManager.H"
#include "Devices/FrameGrabberFactory.H"
#include "GUI/XWindow.H"
#include "Image/ColorOps.H"
#include "Image/DrawOps.H"
#include "Image/FilterOps.H"
#include "Image/Image.H"
#include "Image/MathOps.H"
#include "Image/MorphOps.H"
#include "Image/Transforms.H"
#include "Raster/Raster.H"
#include "Util/MathFunctions.H"
#include "Util/Timer.H"
#include "Util/Types.H"
#include "Util/log.H"
#include "VFAT/segmentImageTrackMC.H"
#include "rutz/shared_ptr.h"
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>

Include dependency graph for test-canny.C:

Go to the source code of this file.

Defines

#define BOOSTBLURFACTOR   90.0
#define TOL   2.0e-4
#define ITMAX   200
#define ITMAXB   100
#define CGOLD   0.3819660
#define ZEPS   1.0e-10
#define SHFT(a, b, c, d)   (a)=(b);(b)=(c);(c)=(d);
#define SIGN(a, b)   ((b)>=0.0?fabs(a):-fabs(a))
#define GOLD   1.618034
#define GLIMIT   100.0
#define TINY   1.0e-20
#define FREE_ARG   char*

Functions

int canny (unsigned char *image, int rows, int cols, float sigma, float tlow, float thigh, unsigned char **edge, const char *fname)
void gaussian_smooth (unsigned char *image, int rows, int cols, float sigma, short int **smoothedim)
void make_gaussian_kernel (float sigma, float **kernel, int *windowsize)
void derrivative_x_y (short int *smoothedim, int rows, int cols, short int **delta_x, short int **delta_y)
void magnitude_x_y (short int *delta_x, short int *delta_y, int rows, int cols, short int **magnitude)
void radian_direction (short int *delta_x, short int *delta_y, int rows, int cols, float **dir_radians, int xdirtag, int ydirtag)
double angle_radians (double x, double y)
void grabImage (Image< PixRGB< byte > > *image)
bool runCanny (bool fromFile, bool useColor, const char *shapeArg)
bool powell (double p[], double **xi, int n, double ftol, int *iter, double *fret, rutz::shared_ptr< ShapeModel > &optimizee)
double brent (double ax, double bx, double cx, double(*f)(double, rutz::shared_ptr< ShapeModel > &), double tol, double *xmin, rutz::shared_ptr< ShapeModel > &shape)
void mnbrak (double *ax, double *bx, double *cx, double *fa, double *fb, double *fc, double(*func)(double, rutz::shared_ptr< ShapeModel > &), rutz::shared_ptr< ShapeModel > &shape)
double f1dim (double x, rutz::shared_ptr< ShapeModel > &shape)
void linmin (double p[], double xi[], int n, double *fret, rutz::shared_ptr< ShapeModel > &optimizee)
double * nrVector (long nl, long nh)
void free_nrVector (double *v, long nl, long nh)
int main (int argc, char *argv[])

Variables

Image< float > distMap
rutz::shared_ptr< XWindowxwin
rutz::shared_ptr< XWindowwin
const bool debugmode = true
bool fromFile = true
const char * infilename = NULL
const char * dirfilename = NULL
const char * shapeArg = NULL
const char * colorArg = NULL
char outfilename [128]
char composedfname [128]
unsigned char * edge
float sigma
float tlow
float thigh
int imgW
int imgH
int ww
int hh
Image< PixRGB< byte > > colorImg
Image< bytegrayImg
Image< PixRGB< byte > > display
Image< bytetemp
Image< PixRGB< byte > > Aux
Image< PixH2SV2< float > > H2SVimage
ModelManager manager ("Canny Tester")
nub::soft_ref< FrameIstreamgb (makeIEEE1394grabber(manager,"cannycam","cc"))
segmentImageTrackMC< float,
unsigned int, 4 > * 
segmenter
 all this should not be in global scope, but in main()!
std::vector< float > color (4, 0.0F)
 Mean color to track.
int ncom
double * pcom
double * xicom


Function Documentation

int main int  argc,
char *  argv[]
 

+/- tollerance value on mean for track

normalizer over color values (highest value possible)

how many standard deviations out to adapt, higher means less bias

highest value for color adaptation possible (hard boundry)

lowest value for color adaptation possible (hard boundry)

Definition at line 228 of file test-canny.C.

References ModelComponent::addSubComponent(), color, colorArg, dirfilename, fromFile, gb, Image< T >::getDims(), Image< T >::getHeight(), Image< T >::getWidth(), hh, imgH, imgW, infilename, luminance(), Raster::ReadRGB(), rutz::shared_ptr< T >::reset(), Image< T >::resize(), runCanny(), shapeArg, sigma, segmentImageTrackMC::SITreturnCandidateImage(), segmentImageTrackMC::SITsetBoxColor(), segmentImageTrackMC::SITsetCircleColor(), segmentImageTrackMC::SITsetFrame(), segmentImageTrackMC::SITsetTrackColor(), segmentImageTrackMC::SITsetUseSmoothing(), segmentImageTrackMC::SITtoggleCandidateBandPass(), segmentImageTrackMC::SITtoggleColorAdaptation(), segmentImageTrackMC::SITtrackImage(), ModelComponent::start(), ModelComponent::stop(), thigh, tlow, and ww.


Variable Documentation

std::vector<float> color(4, 0.0F)
 

Mean color to track.

Referenced by BeoSubTaskDecoder::BeoSubTaskDecoder(), PsychoDisplay::drawCloud(), PsychoDisplay::drawClouds(), drawMeters(), lobot::get_conf(), Nv2LabelReader::getNextLabeledImage(), SceneSettingsDialog::init(), main(), InferotemporalCortexI::run(), BeoSubTaskDecoder::setupDecoder(), ObjRec::showEdgesWorld(), ObjRec::showLinesWorld(), ObjRec::showSquaresWorld(), StimMaker::SM_drawSingleTarget(), and EyeTrackerEyeHeadController::start1().

segmentImageTrackMC<float,unsigned int,4>* segmenter
 

all this should not be in global scope, but in main()!

Definition at line 177 of file test-canny.C.

Referenced by BeoSubTaskDecoder::BeoSubTaskDecoder(), main(), BeoSubTaskDecoder::runDecoder(), and BeoSubTaskDecoder::setupDecoder().


Generated on Mon Nov 23 15:47:48 2009 for iLab Neuromorphic Vision Toolkit by  doxygen 1.4.4