include/OkanOrto.h

00001 #ifndef _OKAN_ORTO_H_
00002 #define _OKAN_ORTO_H_
00003 
00004 #include "OkanMisc.h"
00005 #include <cmath>
00006 #include <vector>
00007 
00008 #define OKAN_PI 3.14159265
00009 
00015 class OkanImageParam
00016 {
00017         public:
00021                 double f;
00025                 double pixelSize;
00029                 int principalPointX;
00033                 int principalPointY;
00037                 double omega;
00041                 double phi;
00045                 double kappa;
00049                 double camX;
00053                 double camY;
00057                 double camZ;
00058 
00062                 OkanImageParam(){}
00076                 OkanImageParam( double f , double pixelSize , int principalPointX , int principalPointY , double omega , double phi , double kappa , double camX , double camY , double camZ )
00077                 {
00078                         this->f = f / 1000;
00079                         this->pixelSize = pixelSize / 1000000;
00080                         this->principalPointX = principalPointX;
00081                         this->principalPointY = principalPointY;
00082                         this->omega = omega * OKAN_PI / 180;
00083                         this->phi = phi * OKAN_PI / 180;
00084                         this->kappa = kappa * OKAN_PI / 180;
00085                         this->camX = camX;
00086                         this->camY = camY;
00087                         this->camZ = camZ;
00088                 }
00093                 OkanImageParam( const OkanImageParam & rhs )
00094                 {
00095                         *this = rhs;
00096                 }
00097 
00102                 OkanImageParam & operator=( const OkanImageParam & rhs )
00103                 {
00104                         this->f = rhs.f;
00105                         this->pixelSize = rhs.pixelSize;
00106                         this->principalPointX = rhs.principalPointX;
00107                         this->principalPointY = rhs.principalPointY;
00108                         this->omega = rhs.omega;
00109                         this->phi = rhs.phi;
00110                         this->kappa = rhs.kappa;
00111                         this->camX = rhs.camX;
00112                         this->camY = rhs.camY;
00113                         this->camZ = rhs.camZ;
00114                         return *this;
00115                 }
00116 };
00117 
00123 class OkanOrto
00124 {
00125         public:
00129                 vector<IplImage*> image;
00133                 vector<uchar**> inputMask;
00137                 vector<OkanImageParam> imageParam;
00141                 vector<double**> ortoX;
00145                 vector<double**> ortoY;
00149                 double min[2];
00153                 double max[2];
00154 
00158                 void coreGiveOrtoImage( IplImage* & newImage, uchar** & outputMask , double line[6] , int newWidth , int newHeight , bool stereo );
00159 
00160         public:
00164                 OkanOrto();
00168                 ~OkanOrto();
00169 
00173                 void clear();
00174 
00181                 void setImage( IplImage* im , uchar **new_inputMask, const OkanImageParam & new_imageParam , double new_avgHeight , double **dem = NULL );
00182 
00190                 void giveOrtoImage( IplImage* & newImage, uchar** & outputMask , double line[6] , bool stereo = false );
00199                 void giveOrtoImageByPixelSize( IplImage* & newImage , uchar** & outputMask , double line[6] , double pixelSizeX , double pixelSizeY , bool stereo = false );
00200 
00209                 void giveOrtoImageByResolution( IplImage* & newImage , uchar** & outputMask , double line[6] , int resX , int resY , bool stereo = false );
00210 };
00211 
00212 #endif // OkanOrto.h

Generated on Sun Jun 15 22:35:25 2008 by  doxygen 1.5.3