From: <bru...@us...> - 2009-02-23 23:23:21
|
Revision: 953 http://panotools.svn.sourceforge.net/panotools/?rev=953&view=rev Author: brunopostle Date: 2009-02-23 22:18:56 +0000 (Mon, 23 Feb 2009) Log Message: ----------- Apply MAX_FISHEYE_FOV only if both hfov and vfov match Modified Paths: -------------- trunk/libpano/adjust.c trunk/libpano/remap.c Modified: trunk/libpano/adjust.c =================================================================== --- trunk/libpano/adjust.c 2009-02-23 22:11:03 UTC (rev 952) +++ trunk/libpano/adjust.c 2009-02-23 22:18:56 UTC (rev 953) @@ -2727,6 +2727,8 @@ static int CheckMakeParams( aPrefs *aP) { + double im_vfov; + im_vfov = aP->im.hfov / aP->im.width * aP->im.height; if( (aP->pano.format == _rectilinear) && (aP->pano.hfov >= 180.0) ) { @@ -2740,7 +2742,7 @@ } if( (aP->mode & 7) == _insert ){ if( (aP->im.format == _fisheye_circ || aP->im.format == _fisheye_ff) && - (aP->im.hfov > MAX_FISHEYE_FOV) ){ + (aP->im.hfov > MAX_FISHEYE_FOV && im_vfov > MAX_FISHEYE_FOV) ){ PrintError("Fisheye lens processing limited to fov <= %lg", MAX_FISHEYE_FOV); return -1; } Modified: trunk/libpano/remap.c =================================================================== --- trunk/libpano/remap.c 2009-02-23 22:11:03 UTC (rev 952) +++ trunk/libpano/remap.c 2009-02-23 22:18:56 UTC (rev 953) @@ -184,7 +184,7 @@ } break; case _spherical_cp: - if( r_prefs->hfov > MAX_FISHEYE_FOV ){ + if( r_prefs->hfov > MAX_FISHEYE_FOV && r_prefs->vfov > MAX_FISHEYE_FOV ){ TrPtr->success = 0; PrintError("Fisheye lens processing limited to fov <= %lg", MAX_FISHEYE_FOV); return; @@ -233,7 +233,7 @@ } break; case _spherical_tp: - if( r_prefs->hfov > MAX_FISHEYE_FOV ){ + if( r_prefs->hfov > MAX_FISHEYE_FOV && r_prefs->vfov > MAX_FISHEYE_FOV ){ TrPtr->success = 0; PrintError("Fisheye lens processing limited to fov <= %lg", MAX_FISHEYE_FOV); return; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |