TLIB documentation
 

tlHough.h

Go to the documentation of this file.
00001 /////////////////////////////////////////////////////////////////////////////////
00002 //
00003 //  This file is part of the TLIB computer vision library.
00004 //  Copyright (C) 2003-2008 Sebastien Grange
00005 //  Copyright (C) 2003-2007 VRAI Group, EPFL
00006 //  All rights reserved.
00007 // 
00008 //  This library is free software; you can redistribute it and/or modify
00009 //  it under the terms of the GNU General Public License("GPL") version 2
00010 //  as published by the Free Software Foundation.
00011 // 
00012 //  <http://www.tuyphon.com/tlib>
00013 //
00014 /////////////////////////////////////////////////////////////////////////////////
00015 
00016 
00017 #ifndef __TLHOUGH_H__
00018 #define __TLHOUGH_H__
00019 
00020 
00021 #include <vector>
00022 using std::vector;
00023 
00024 #include "tlVision.h"
00025 
00026 
00027 
00028 // class declaration
00029 class tlHough
00030 {
00031 public:
00032   tlImage *srcImage;
00033   int     srcWidth;
00034   int     srcHeight;
00035   short   *accumulator;
00036   short   *sinTheta;
00037   short   *cosTheta;
00038   float   angularIncrement;
00039   int     hOffset;
00040   int     hWidth;
00041   int     hHeight;
00042   short   maxAcc;
00043 
00044   vector <tlLine*> lineList;
00045 
00046 private:
00047   int clear();
00048   int add (tlLine *line);
00049   struct lline *newLine (tlLine *line);
00050   int makeAccumulator ();
00051   int clearAccumulator ();
00052   int extractLines (int lineCount);
00053 
00054 public:
00055   // *structors
00056   tlHough (int sWidth, int sHeight, float angIncr = 0.0f);
00057   virtual ~tlHough();
00058 
00059   // define
00060   int   setParam            (int sWidth, int sHeight, float angIncr = 0.0f);
00061   int   setAngularIncrement (float angIncr);
00062   float getAngularIncrement () { return (float)(180.0f*angularIncrement/TL_PI); };
00063 
00064   // transforms
00065   int    extract     (tlImage *image, int lineCount = 1);
00066   
00067   // retrieve
00068   int    getLineCount ();
00069   tlLine *getLine     (int index);
00070   tlLine *getLinePtr  (int index);
00071   int    getLineCopy  (tlLine *line, int index);
00072 
00073   // image
00074   int getHoughImage (tlImage *image);
00075 };
00076 
00077 
00078 #endif


TLIB documentation - generated on 7 May 2008
Please address any questions to seb@tuyphon.com
(C) 2001-2008 - S. Grange
(C) 2001-2007 - VRAI Group, EPFL
All Rights Reserved.