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

cv_houghLines2_Filter.h

Go to the documentation of this file.
00001 /* ---------------------------------------------------------------------------
00002     Phission :
00003         Realtime Vision Processing System
00004 
00005     Copyright (C) 2003-2006 Philip D.S. Thoren (pthoren@cs.uml.edu)
00006     University of Massachusetts at Lowell,
00007     Laboratory for Artificial Intelligence and Robotics
00008 
00009     This file is part of Phission.
00010 
00011     Phission is free software; you can redistribute it and/or modify
00012     it under the terms of the GNU Lesser General Public License as published by
00013     the Free Software Foundation; either version 2 of the License, or
00014     (at your option) any later version.
00015 
00016     Phission is distributed in the hope that it will be useful,
00017     but WITHOUT ANY WARRANTY; without even the implied warranty of
00018     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019     GNU Lesser General Public License for more details.
00020 
00021     You should have received a copy of the GNU Lesser General Public License
00022     along with Phission; if not, write to the Free Software
00023     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00024 
00025  ---------------------------------------------------------------------------*/
00026 #ifndef _CV_HOUGHLINES2_FILTER_H
00027 #define _CV_HOUGHLINES2_FILTER_H
00028 
00034 #include <phHoughData.h>
00035 #include <phFilter.h>
00036 
00042 /* ------------------------------------------------------------------------ */
00043 typedef enum phHoughMethod_e
00044 {
00045     phHoughStandard = 1,
00046     phHoughProbalistic,
00047     phHoughMultiScale
00048 } phHoughMethod;
00049 
00050 /* ------------------------------------------------------------------------ */
00058 PHAPI(class) cv_houghLines2_Filter : public phFilter
00059 {
00060 private:
00061     phHoughMethod   m_method;
00063     phHoughData    *m_hough_data;
00065     int             m_draw_lines;
00068     phLine         *m_lines;
00070     uint32_t        m_lines_size;
00072     uint32_t        m_line_count;
00073     
00074     /* Used to make sure we resize the data if it changes from one iteration to
00075      * the next */
00076     uint32_t        m_lastDepth;
00077     uint32_t        m_lastWidth;
00078     uint32_t        m_lastHeight;
00079     
00080     /* These are cast to (IplImage *) in the source code */
00081     void           *m_cv_input;
00082     void           *m_cv_gray;
00083     void           *m_cv_temp;
00084     void           *m_storage;
00085 
00086     /* The parameters to the cvHoughLines2 method */
00087     double          m_dRho;
00088     double          m_dTheta;
00089     int             m_threshold;
00090     double          m_param1;
00091     double          m_param2;
00092 
00093 protected:
00098     int filter();
00099 
00100 public:
00115     cv_houghLines2_Filter(  phHoughMethod method    = phHoughProbalistic,
00116                             int           draw_lines= 0,
00117                             double        dRho      = 1, 
00118                             double        dTheta = 0.0174532925, /* PI / 180 */
00119                             int           threshold = 80,
00120                             double        param1    = 30,
00121                             double        param2    = 10 );
00122     ~cv_houghLines2_Filter();
00123     
00143     int set( phHoughMethod  method,
00144              int            draw_lines,
00145              double         dRho, 
00146              double         dTheta,
00147              int            threshold,
00148              double         param1,
00149              double         param2  );
00158     int setMethod   ( phHoughMethod method    );
00159     int setDrawLines( int           draw_lines);
00160     int setRho      ( double        dRho      );
00161     int setTheta    ( double        dTheta    );
00162     int setThreshold( int           threshold );
00163     int setParam1   ( double        param1    );
00164     int setParam2   ( double        param2    );
00165 
00166     int get( phHoughMethod  *method,
00167              int            *draw_lines,
00168              double         *dRho, 
00169              double         *dTheta,
00170              int            *threshold,
00171              double         *param1,
00172              double         *param2  );
00173     
00180     phHoughMethod   getMethod   ();
00181     int             getDrawLines();
00182     double          getRho      ();
00183     double          getTheta    ();
00184     int             getThreshold();
00185     double          getParam1   ();
00186     double          getParam2   ();
00187 
00196     phFilter *cloneFilter();
00197 
00198 
00199     phHoughData *getLiveHoughData();
00200     phHoughData *getOutput();
00201 
00202 };
00203  /* ImageProcessing */
00205 
00206 #endif /* _CV_HOUGHLINES2_FILTER_H */
00207 




Copyright (C) 2002 - 2007 Philip D.S. Thoren ( pthoren@users.sourceforge.net )
University Of Massachusetts at Lowell
Robotics Lab
SourceForge.net Logo

Generated on Sat Jun 16 02:44:08 2007 for phission by  doxygen 1.4.4