BearExtrCam.h

Go to the documentation of this file.
00001 // ----------------------------------------------------------------------------
00002 //
00003 // $Id$
00004 //
00005 // Copyright 2008, 2009, 2010, 2011, 2012  Antonio Franchi and Paolo Stegagno
00006 //
00007 // This file is part of MIP.
00008 //
00009 // MIP is free software: you can redistribute it and/or modify
00010 // it under the terms of the GNU General Public License as published by
00011 // the Free Software Foundation, either version 3 of the License, or
00012 // (at your option) any later version.
00013 //
00014 // MIP is distributed in the hope that it will be useful,
00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017 // GNU General Public License for more details.
00018 //
00019 // You should have received a copy of the GNU General Public License
00020 // along with MIP. If not, see <http://www.gnu.org/licenses/>.
00021 //
00022 // Contact info: antonio.franchi@tuebingen.mpg.de stegagno@diag.uniroma1.it
00023 //
00024 // ----------------------------------------------------------------------------
00025 
00029 
00033 
00034 #ifndef __BEAR_EXTR_CAM_H_
00035 #define __BEAR_EXTR_CAM_H_
00036 
00037 #include "BearExtrCamStr.h"
00038 
00039 using namespace std;
00040 namespace MipAlgorithms{
00041  
00045  class BearExtrCamInput{
00046   public:
00047    cv::Mat*  currImage;
00048    int     areaCircleMin;
00049    int     areaCircleMax;
00050    Decimal   crThr;
00051    int     wROI;
00052    int     hROI;
00054    int      areaCircMinRect; 
00056    int      areaCircMaxRect;
00058    Decimal   actTime;
00059    
00060    // Methods
00062    BearExtrCamInput();
00063    
00069    BearExtrCamInput(cv::Mat *ci, const int &acm, const int &acM, const Decimal &ct, const int &wR, const int &hR, const int &acmRect, const int &acMRect, const Decimal &at);
00070    
00072    ~BearExtrCamInput();
00073    
00075    BearExtrCamInput(const BearExtrCamInput& rhs);
00076    
00078    BearExtrCamInput& operator=(const BearExtrCamInput& rhs);
00079  };
00080  
00084  class BearExtrCamOutput{
00085   public:
00087    vector<Position2DArma> imagePlanePoints;
00089    bool validOutput;
00090    
00092    BearExtrCamOutput();
00093    
00095    BearExtrCamOutput(vector<Position2DArma> &pp, const bool &vo);
00096    
00098    ~BearExtrCamOutput();
00099    
00101    BearExtrCamOutput(const BearExtrCamOutput& rhs);
00102    
00104    BearExtrCamOutput& operator=(const BearExtrCamOutput& rhs);
00105    
00107    void normalizePoints(vector<featureImage> &fi, BearExtrCamPar* par);
00108  };
00109 
00113  class BearExtrCam{
00114   private:
00115    BearExtrCamPar*       _pars;
00116    BearExtrCamVar*       _vars;
00117    bool                  _firstStep;
00118    vector<featureImage>  _featureList;
00119    TooN::Matrix<3> pm;
00120    
00121   public:
00123    BearExtrCam();
00124    
00126    BearExtrCam(const BearExtrCamPar &pars);
00127    
00129    ~BearExtrCam();
00130    
00133    void step(BearExtrCamInput &beci, BearExtrCamOutput &beco);
00134    
00137    void firstStep(BearExtrCamInput &beci);
00138    
00141    void normalStep(BearExtrCamInput &beci, BearExtrCamOutput &beco);
00142    
00145    BearExtrCamPar* getPar();
00146    
00149    void setAdjustedParameters(BearExtrCamInput &beci);
00150  };
00151 }
00152 #endif

Generated on Mon Feb 20 07:01:06 2017 for MIP by  doxygen 1.5.6