00001 // *** BEGIN_XVISION2_COPYRIGHT_NOTICE ***
00002 // *** END_XVISION2_COPYRIGHT_NOTICE ***
00003
00004 # ifndef _XVOMNIWARPER_H_
00005 # define _XVOMNIWARPER_H_
00006
00007 struct XVOmniWarper {
00008 static int defCenterX ;
00009 static int defCenterY ;
00010 static int defHorizon ;
00011
00012 int centerX ; // x co-ordinate of mirror center on image
00013 int centerY ; // y co-ordinate of mirror center on image
00014 int horizon ; // distance on image from center to horizon
00015
00016 XVOmniWarper() : centerX(defCenterX), centerY(defCenterY),
00017 horizon(defHorizon) {}
00018
00019 /*
00020 This omni2plane function unwarps an image obtained by omni-camera to a plane
00021 image by geometric transformation. Some of the code is due to Sang-Chul Lee.
00022 */
00023
00024 /* Parameters --
00025 source: input image ;
00026 nwidth, nheight: dimensions of desired output image width ;
00027 xd, yd: coordinates of a point on the input image as direction ;
00028 k: re-sampling factor ;
00029 Returns -- output image ;
00030 */
00031
00032 template<class XVImage>
00033 XVImage omni2plane( const XVImage& source, int nwidth, int nheight,
00034 int xd, int yd, double k = 1.0 ) const ;
00035
00036 /* Parameters --
00037 source: input image ;
00038 nwidth, nheight: dimensions of desired output image width ;
00039 theta, phai: direction ;
00040 k: re-sampling factor ;
00041 Returns -- output image ;
00042 */
00043
00044 template<class XVImage>
00045 XVImage omni2plane( const XVImage& source, int nwidth, int nheight,
00046 double theta, double phai, double k = 1.0 ) const ;
00047
00048 };
00049
00050 # endif //_XVOMNIWARPER_H_
1.2.0 written by Dimitri van Heesch,
© 1997-2000