findpipette.h

Go to the documentation of this file.
00001 //
00002 // Method to find and track pipette tip using the Haynes and Jain edge-change
00003 // detector and a recursive search algorithm. Note that this implementation
00004 // assumes that the pipette is approaching from the top of the screen.
00005 // 
00006 // In order for initial recognition to take place the pipette has to be moved
00007 // (ideally horizontally) so that the initial estimate of the tip can be
00008 // obtained.
00009 //
00010 // Bala Amavasai (bala@amavasai.org)
00011 // $Header: /cvs/mimas2/include/findpipette.h,v 1.1.1.1 2005/08/09 15:37:45 engmb Exp $
00012 //
00013 
00014 #ifndef FINDPIPETTE_H
00015 #define FINDPIPETTE_H
00016 
00017 #include <iostream>
00018 #include <cmath>
00019 #include <values.h>
00020 
00021 #include "image.h"
00022 #include "image_funcs.h"
00023 #include "cartesian.h"
00024 
00025 namespace mimas {
00026   
00027 class findPipette
00028 {
00029     private:
00030   int skipXboundaries; // left and right boundary to skip
00031   int skipYboundaries; // top and botton boundary to skip
00032   int ySearchRange;  // search from -ve in the y direction when not first frame
00033   int thresval;        // hj threshold value
00034   int linesDiffRange; // difference between longest and shortest line that is considered
00035   int holdPositionCondition; // hold previous position if outside this range
00036   bool firstrecog;    // recognition for the first time so that prevdepth can be set
00037   int scanliney;
00038 
00039   Cartesian<int> prevdepth, currdepth;
00040   void searchDown(int x, int y, int colour, image<int> &imagein, Cartesian<int> &d);
00041 
00042     protected:
00043 
00044     public:
00045   void find(image<int> &imageprev, image<int> &imagecurrent, int &x, int &y);
00046   void setSkipXboundaries(int tempval);
00047   void setSkipYboundaries(int tempval);
00048   int getSkipYboundaries(void);
00049   void setYSearchRange(int tempval);
00050   void setFirstRunFlag(bool tempval);
00051   void setHJThresholdVal(int tempval);
00052   void setLinesDiffRange(int tempval);
00053   void setHoldPositionCondition(int tempval);
00054 
00055   findPipette()
00056   {
00057       skipXboundaries=20;
00058       skipYboundaries=10;
00059       ySearchRange=20;
00060       thresval=5;
00061       linesDiffRange=20;
00062       holdPositionCondition=30;
00063       firstrecog=true;
00064       scanliney=skipYboundaries;
00065   }
00066 
00067   ~findPipette()
00068   {
00069   }
00070   
00071 };
00072 };
00073 
00074 #endif

[GNU/Linux] [Qt] [Mesa] [STL] [Lapack] [Boost] [Magick++] [Xalan-C and Xerces-C] [doxygen] [graphviz] [FFTW] [popt] [xine] [Gnuplot] [gnu-arch] [gcc] [gstreamer] [autoconf/automake/make] [freshmeat.net] [opensource.org] [sourceforge.net] [MMVL]
mimas 2.1 - Copyright Mon Oct 30 11:31:17 2006, Bala Amavasai, Stuart Meikle, Arul Selvan, Fabio Caparrelli, Jan Wedekind, Manuel Boissenin, ...