From: <dm...@us...> - 2008-08-11 10:24:55
|
Revision: 866 http://panotools.svn.sourceforge.net/panotools/?rev=866&view=rev Author: dmg Date: 2008-08-11 10:25:03 +0000 (Mon, 11 Aug 2008) Log Message: ----------- 2008-08-11 dmg <dm...@uv...> * bootstrap (have_libtool): Added support for 2.2.* version of libtool. Patch submitted by Neil Shephard. Modified Paths: -------------- trunk/libpano/ChangeLog trunk/libpano/bootstrap Modified: trunk/libpano/ChangeLog =================================================================== --- trunk/libpano/ChangeLog 2008-08-11 09:17:24 UTC (rev 865) +++ trunk/libpano/ChangeLog 2008-08-11 10:25:03 UTC (rev 866) @@ -1,3 +1,8 @@ +2008-08-11 dmg <dm...@uv...> + + * bootstrap (have_libtool): Added support for 2.2.* version of + libtool. Patch submitted by Neil Shephard. + 2008-01-26 Jim Watters <jwa...@ph...> * Fix some warning messages Modified: trunk/libpano/bootstrap =================================================================== --- trunk/libpano/bootstrap 2008-08-11 09:17:24 UTC (rev 865) +++ trunk/libpano/bootstrap 2008-08-11 10:25:03 UTC (rev 866) @@ -23,7 +23,7 @@ libtool_version=`$LIBTOOLIZE --version | sed 's/.*) \([0-9.][0-9.]*\).*/\1/'` # echo libtool version: $libtool_version case $libtool_version in - 1.4*|1.5*) + 1.4*|1.5*|2.2) have_libtool=true ;; esac This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dm...@us...> - 2008-12-29 12:07:32
|
Revision: 912 http://panotools.svn.sourceforge.net/panotools/?rev=912&view=rev Author: dmg Date: 2008-12-29 12:07:28 +0000 (Mon, 29 Dec 2008) Log Message: ----------- 2008-12-29 dmg <dm...@uv...> * panorama.h, math.c, adjust.c, queryfeature.c, filter.h, parser.c: Added panini projection. the credit goes to Thomas Sharpless who rediscovered it, and to Bruno Postle, who did the original math. Modified Paths: -------------- trunk/libpano/ChangeLog trunk/libpano/adjust.c trunk/libpano/filter.h trunk/libpano/math.c trunk/libpano/panorama.h trunk/libpano/parser.c trunk/libpano/queryfeature.c Modified: trunk/libpano/ChangeLog =================================================================== --- trunk/libpano/ChangeLog 2008-11-18 23:46:59 UTC (rev 911) +++ trunk/libpano/ChangeLog 2008-12-29 12:07:28 UTC (rev 912) @@ -1,3 +1,11 @@ +2008-12-29 dmg <dm...@uv...> + + * panorama.h, math.c, adjust.c, queryfeature.c, filter.h, + parser.c: Added panini projection. the credit goes to Thomas + Sharpless who rediscovered it, and to Bruno Postle, who did the + original math. + + 2008-08-11 dmg <dm...@uv...> * bootstrap (have_libtool): Added support for 2.2.* version of Modified: trunk/libpano/adjust.c =================================================================== --- trunk/libpano/adjust.c 2008-11-18 23:46:59 UTC (rev 911) +++ trunk/libpano/adjust.c 2008-12-29 12:07:28 UTC (rev 912) @@ -688,6 +688,11 @@ // horizontal pixels per degree mp->distance = ((double) pn->width) / b; break; + case _panini: + tpara = 1; + panini_erect(b/2.0, 0.0, &tx, &ty, & tpara); + mp->distance = pn->width/(2.0*tx); + break; case _lambertazimuthal: tpara = 1; lambertazimuthal_erect(b/2.0, 0.0, &tx, &ty, & tpara); @@ -796,6 +801,10 @@ { SetDesc(stack[i], erect_millercylindrical, &(mp->distance) ); i++; // Convert miller to sphere } + else if(pn->format == _panini) + { + SetDesc(stack[i], erect_panini, &(mp->distance) ); i++; // Convert panini to sphere + } else if(pn->format == _lambert) { SetDesc(stack[i], erect_lambert, &(mp->distance) ); i++; // Convert lambert to sphere @@ -968,6 +977,11 @@ lambertazimuthal_erect(b/2.0, 0.0, &tx, &ty, & tpara); mp->distance = pn->width/(2.0*tx); break; + case _panini: + tpara = 1; + panini_erect(b/2.0, 0.0, &tx, &ty, & tpara); + mp->distance = pn->width/(2.0*tx); + break; case _stereographic: tpara = 1; stereographic_erect(b/2.0, 0.0, &tx, &ty, & tpara); @@ -1139,6 +1153,10 @@ { SetDesc(stack[i], millercylindrical_erect, &(mp->distance) ); i++; // Convert sphere to sphere } + else if(pn->format == _panini) + { + SetDesc(stack[i], panini_erect, &(mp->distance) ); i++; // Convert panini to sphere + } else if(pn->format == _lambert) { SetDesc(stack[i], lambert_erect, &(mp->distance) ); i++; // Convert sphere to lambert Modified: trunk/libpano/filter.h =================================================================== --- trunk/libpano/filter.h 2008-11-18 23:46:59 UTC (rev 911) +++ trunk/libpano/filter.h 2008-12-29 12:07:28 UTC (rev 912) @@ -849,6 +849,8 @@ int albersequalareaconic_distance ( double *x_src, void* params ); int millercylindrical_erect ( double x_dest,double y_dest, double* x_src, double* y_src, void* params ); int erect_millercylindrical ( double x_dest,double y_dest, double* x_src, double* y_src, void* params ); +int panini_erect ( double x_dest,double y_dest, double* x_src, double* y_src, void* params ); +int erect_panini ( double x_dest,double y_dest, double* x_src, double* y_src, void* params ); int mirror_sphere_cp ( double x_dest,double y_dest, double* x_src, double* y_src, void* params ); Modified: trunk/libpano/math.c =================================================================== --- trunk/libpano/math.c 2008-11-18 23:46:59 UTC (rev 911) +++ trunk/libpano/math.c 2008-12-29 12:07:28 UTC (rev 912) @@ -710,6 +710,50 @@ } +/** convert from erect to panini */ +int panini_erect( double x_dest,double y_dest, double* x_src, double* y_src, void* params) +{ + // params: distanceparam + // this is the inverse + + double phi, lambdaHalf; + + phi = y_dest/distanceparam; + lambdaHalf = x_dest/ (distanceparam*2); + + *x_src = distanceparam * 2 * tan (lambdaHalf); + double temp = cos(lambdaHalf); + *y_src = distanceparam * phi / (temp * temp); + + return 1; +} + + +/** convert from panini to erect */ +int erect_panini( double x_dest,double y_dest, double* x_src, double* y_src, void* params) +{ + double y; + double x; + double lambdaHalf; + double temp; + + double phi; + y = y_dest/distanceparam; + x = x_dest/distanceparam; + + temp = cos(x/2); + phi = y * temp * temp; + + *x_src = 2 * atan2(x,2) * distanceparam; + *y_src = phi * distanceparam; + + return 1; +} + + + + + /** convert from erect to lambert */ int lambert_erect( double x_dest,double y_dest, double* x_src, double* y_src, void* params) { Modified: trunk/libpano/panorama.h =================================================================== --- trunk/libpano/panorama.h 2008-11-18 23:46:59 UTC (rev 911) +++ trunk/libpano/panorama.h 2008-12-29 12:07:28 UTC (rev 912) @@ -257,6 +257,7 @@ _lambertazimuthal = 16, _albersequalareaconic = 17, _millercylindrical = 18, + _panini = 19, }; enum @@ -273,9 +274,10 @@ PANO_FORMAT_LAMBERT_AZIMUTHAL = 9, PANO_FORMAT_ALBERS_EQUAL_AREA_CONIC = 10, PANO_FORMAT_MILLER_CYLINDRICAL = 11, + PANO_FORMAT_PANINI = 12, }; -#define PANO_FORMAT_COUNT 12 +#define PANO_FORMAT_COUNT 13 // A large rectangle Modified: trunk/libpano/parser.c =================================================================== --- trunk/libpano/parser.c 2008-11-18 23:46:59 UTC (rev 911) +++ trunk/libpano/parser.c 2008-12-29 12:07:28 UTC (rev 912) @@ -492,6 +492,9 @@ case PANO_FORMAT_MILLER_CYLINDRICAL: gl->pano.format = _millercylindrical; break; + case PANO_FORMAT_PANINI: + gl->pano.format = _panini; + break; default: PrintError( "Unknown panorama projection: %d", gl->pano.format ); return -1; @@ -987,6 +990,9 @@ case 11: p->pano.format = _millercylindrical; break; + case 12: + p->pano.format = _panini; + break; default: PrintError( "Unknown panorama projection: %d", p->pano.format ); return -1; Modified: trunk/libpano/queryfeature.c =================================================================== --- trunk/libpano/queryfeature.c 2008-11-18 23:46:59 UTC (rev 911) +++ trunk/libpano/queryfeature.c 2008-12-29 12:07:28 UTC (rev 912) @@ -69,6 +69,7 @@ {"PanoType9","Lambert Azimuthal Equal Area"}, {"PanoType10","Albers Conical Equal Area"}, {"PanoType11","Miller Cylindrical"}, + {"PanoType12","Panini"}, // Filter Types // fix: Fixed Windowsize // aa: Antialiasing filter with adaptive filter size @@ -363,6 +364,7 @@ break; case PANO_FORMAT_EQUIRECTANGULAR: case PANO_FORMAT_MILLER_CYLINDRICAL: + case PANO_FORMAT_PANINI: break; case PANO_FORMAT_FISHEYE_FF: features->maxVFOV = 360; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bru...@us...> - 2009-09-03 17:26:13
|
Revision: 1041 http://panotools.svn.sourceforge.net/panotools/?rev=1041&view=rev Author: brunopostle Date: 2009-09-03 17:26:05 +0000 (Thu, 03 Sep 2009) Log Message: ----------- Bump version and soname Modified Paths: -------------- trunk/libpano/Makefile.am trunk/libpano/configure.ac trunk/libpano/version.h Modified: trunk/libpano/Makefile.am =================================================================== --- trunk/libpano/Makefile.am 2009-09-03 17:13:32 UTC (rev 1040) +++ trunk/libpano/Makefile.am 2009-09-03 17:26:05 UTC (rev 1041) @@ -64,7 +64,7 @@ if HAVE_LINUX LIN_SRC = sys_ansi.c ppm.c LIN_DEFS = -D__Ansi__=1 -LIN_LDFS = -version-info 1:0:0 +LIN_LDFS = -version-info 2:0:0 install-exec-hook: @true @@ -74,7 +74,7 @@ if HAVE_DARWIN DAR_SRC = sys_ansi.c ppm.c DAR_DEFS = -D__Ansi__=1 -DAR_LDFS = -version-info 1:0:0 +DAR_LDFS = -version-info 2:0:0 install-exec-hook: @true Modified: trunk/libpano/configure.ac =================================================================== --- trunk/libpano/configure.ac 2009-09-03 17:13:32 UTC (rev 1040) +++ trunk/libpano/configure.ac 2009-09-03 17:26:05 UTC (rev 1041) @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.5) -AC_INIT([pano13], [2.9.14], BUG-REPORT-ADDRESS) +AC_INIT([pano13], [2.9.15], BUG-REPORT-ADDRESS) AC_CONFIG_SRCDIR([PTDialogs.c]) AC_CONFIG_AUX_DIR(config) AC_CONFIG_HEADER([config.h]) Modified: trunk/libpano/version.h =================================================================== --- trunk/libpano/version.h 2009-09-03 17:13:32 UTC (rev 1040) +++ trunk/libpano/version.h 2009-09-03 17:26:05 UTC (rev 1041) @@ -24,13 +24,13 @@ #define VERS2 0x00 //version of preferences file, used to verify data -#define PREF_VERSION "2.9.14 " +#define PREF_VERSION "2.9.15 " // String style of global version -#define VERSION "2.9.14 " +#define VERSION "2.9.15 " // Numeric style of global version, same as VERSION with more precision -#define PTVERSION_FILEVERSIONNUMBER 2,9,14,0 +#define PTVERSION_FILEVERSIONNUMBER 2,9,15,0 #define PTVERSION_NAME_LONG "LongVersion" #define LONGVERSION VERSION ", Copyright (c) 1998-2006, H. Dersch, de...@fh..." This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dm...@us...> - 2009-09-19 02:47:07
|
Revision: 1066 http://panotools.svn.sourceforge.net/panotools/?rev=1066&view=rev Author: dmg Date: 2009-09-19 02:47:01 +0000 (Sat, 19 Sep 2009) Log Message: ----------- 2009-09-18 <dmg@phosphorus> * CMakeLists.txt: Moved wx-widgets into Windows-only part Modified Paths: -------------- trunk/libpano/CMakeLists.txt trunk/libpano/ChangeLog Modified: trunk/libpano/CMakeLists.txt =================================================================== --- trunk/libpano/CMakeLists.txt 2009-09-19 02:41:59 UTC (rev 1065) +++ trunk/libpano/CMakeLists.txt 2009-09-19 02:47:01 UTC (rev 1066) @@ -51,9 +51,9 @@ IF (WIN32) SET(wxWidgets_ROOT_DIR ${SOURCE_BASE_DIR}/wxWidgets-2.8.10) ADD_DEFINITIONS(-D__Win__) + FIND_PACKAGE(wxWidgets REQUIRED) ENDIF(WIN32) -FIND_PACKAGE(wxWidgets REQUIRED) ## ## Graphics libraries Modified: trunk/libpano/ChangeLog =================================================================== --- trunk/libpano/ChangeLog 2009-09-19 02:41:59 UTC (rev 1065) +++ trunk/libpano/ChangeLog 2009-09-19 02:47:01 UTC (rev 1066) @@ -1,3 +1,7 @@ +2009-09-18 <dmg@phosphorus> + + * CMakeLists.txt: Moved wx-widgets into Windows-only part + 2009-09-18 <dm...@uv...> * doc/developmentPolicy.txt: Added file with a draft of a policy This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dm...@us...> - 2009-12-27 17:50:52
|
Revision: 1199 http://panotools.svn.sourceforge.net/panotools/?rev=1199&view=rev Author: dmg Date: 2009-12-27 17:50:45 +0000 (Sun, 27 Dec 2009) Log Message: ----------- Added name of projection, which I forgot to do yesterday. Added assertion that verifies I donot forget in the future Modified Paths: -------------- trunk/libpano/ChangeLog trunk/libpano/math.c trunk/libpano/queryfeature.c trunk/libpano/tools/panoinfo_unix.c Modified: trunk/libpano/ChangeLog =================================================================== --- trunk/libpano/ChangeLog 2009-12-27 10:06:13 UTC (rev 1198) +++ trunk/libpano/ChangeLog 2009-12-27 17:50:45 UTC (rev 1199) @@ -1,3 +1,11 @@ +2009-12-27 dmg <dm...@uv...> + + * queryfeature.c: Yesterday I forgot to add the name of the + projection. This patch fixes that. Fixes bug 2921848. Removed + sizes from + + + 2009-12-26 dmg <dm...@uv...> * queryfeature.c, parser.c, panorama.h, filter.h, math.c, Modified: trunk/libpano/math.c =================================================================== --- trunk/libpano/math.c 2009-12-27 10:06:13 UTC (rev 1198) +++ trunk/libpano/math.c 2009-12-27 17:50:45 UTC (rev 1199) @@ -1005,8 +1005,20 @@ x = d * tan (lambda / d); + // now compute y + /* y = (d * tan(phi)) / ( d - 1 + cos(lambda)); + */ + + if (phi != 0) { + y = tan(phi) * x/ sin(lambda); + } else { + y = tan(phi) ; + } + + + // Now rescale *y_src = distance * y; *x_src = distance * x; @@ -1069,11 +1081,21 @@ x = x_dest/distance; lambda = d * atan2(x,d); + + if (x != 0) { + phi = atan2(y * sin(lambda) * x/fabs(x), fabs(x)); + } else { + phi = atan(y); + } + /* phi = atan2(y * (d -1 + cos(lambda)), d); + */ + *lambda_src = lambda * distance; *phi_src = phi * distance; + /* if (fabs (y_dest - 0.5) < 0.01) fprintf(stderr, "Coordinates (%f,%f) (%f,%f) d %f \n", x_dest, y_dest, *lambda_src, *phi_src, d); @@ -1099,7 +1121,7 @@ temp = cos(lambdaHalf); y = tan(phi) / (temp * temp); - + // At this point we have mapped to central cylindrical, now to equirectangular *y_src = distanceparam * y; Modified: trunk/libpano/queryfeature.c =================================================================== --- trunk/libpano/queryfeature.c 2009-12-27 10:06:13 UTC (rev 1198) +++ trunk/libpano/queryfeature.c 2009-12-27 17:50:45 UTC (rev 1199) @@ -322,7 +322,7 @@ ////////////////////////////////////////////////////////////////////// -char *panoFormatNames[PANO_FORMAT_COUNT] = { +char *panoFormatNames[] = { "Rectilinear", "Cylindrical", "Equirectangular", @@ -340,11 +340,12 @@ "Orthographic", "Equisolid", "Equirectangular Panini", - "Biplane", - "Triplane", + "Biplane", + "Triplane", + "Panini General", }; -static int panoFormatID[PANO_FORMAT_COUNT] = { +static int panoFormatID[] = { _rectilinear, _panorama, _equirectangular, @@ -372,6 +373,7 @@ { // REturn the number of Projection formats available in the library assert(sizeof(panoFormatNames) == PANO_FORMAT_COUNT * sizeof(char*)); + assert(sizeof(panoFormatNames) == PANO_FORMAT_COUNT * sizeof(int)); return PANO_FORMAT_COUNT; } Modified: trunk/libpano/tools/panoinfo_unix.c =================================================================== --- trunk/libpano/tools/panoinfo_unix.c 2009-12-27 10:06:13 UTC (rev 1198) +++ trunk/libpano/tools/panoinfo_unix.c 2009-12-27 17:50:45 UTC (rev 1199) @@ -99,8 +99,8 @@ free(value); } printf(str2); - - for (i=0; i< PANO_FORMAT_COUNT; i++) { + printf("Number of projections %d\n", panoProjectionFormatCount()); + for (i=0; i< panoProjectionFormatCount(); i++) { int j; pano_projection_features features; if (!panoProjectionFeaturesQuery(i, &features) ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dm...@us...> - 2008-12-29 22:22:17
|
Revision: 913 http://panotools.svn.sourceforge.net/panotools/?rev=913&view=rev Author: dmg Date: 2008-12-29 21:37:58 +0000 (Mon, 29 Dec 2008) Log Message: ----------- 2008-12-29 dmg <dmg@phosphorus> * queryfeature.c (panoProjectionFeaturesQuery): Added querying features for panini; this will allow Hugin to use it Modified Paths: -------------- trunk/libpano/ChangeLog trunk/libpano/queryfeature.c Modified: trunk/libpano/ChangeLog =================================================================== --- trunk/libpano/ChangeLog 2008-12-29 12:07:28 UTC (rev 912) +++ trunk/libpano/ChangeLog 2008-12-29 21:37:58 UTC (rev 913) @@ -1,3 +1,8 @@ +2008-12-29 dmg <dmg@phosphorus> + + * queryfeature.c (panoProjectionFeaturesQuery): Added querying + features for panini; this will allow Hugin to use it. + 2008-12-29 dmg <dm...@uv...> * panorama.h, math.c, adjust.c, queryfeature.c, filter.h, Modified: trunk/libpano/queryfeature.c =================================================================== --- trunk/libpano/queryfeature.c 2008-12-29 12:07:28 UTC (rev 912) +++ trunk/libpano/queryfeature.c 2008-12-29 21:37:58 UTC (rev 913) @@ -307,6 +307,7 @@ "Lambert Equal Area Azimuthal", "Albers Equal Area Conic", "Miller Cylindrical", + "Panini", }; static int panoFormatID[PANO_FORMAT_COUNT] = { @@ -321,7 +322,8 @@ _lambert, _lambertazimuthal, _albersequalareaconic, - _millercylindrical + _millercylindrical, + _panini }; int panoProjectionFormatCount(void) @@ -364,8 +366,11 @@ break; case PANO_FORMAT_EQUIRECTANGULAR: case PANO_FORMAT_MILLER_CYLINDRICAL: + break; case PANO_FORMAT_PANINI: - break; + features->maxVFOV = 179; + features->maxHFOV = 230; + break; case PANO_FORMAT_FISHEYE_FF: features->maxVFOV = 360; features->maxHFOV = 360; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dm...@us...> - 2008-12-29 23:05:35
|
Revision: 914 http://panotools.svn.sourceforge.net/panotools/?rev=914&view=rev Author: dmg Date: 2008-12-29 23:05:31 +0000 (Mon, 29 Dec 2008) Log Message: ----------- 2008-12-29 dmg <dmg@phosphorus> * panorama.h, math.c, adjust.c, queryfeature.c, filter.h: Finally added the architectural. Modified Paths: -------------- trunk/libpano/ChangeLog trunk/libpano/adjust.c trunk/libpano/filter.h trunk/libpano/math.c trunk/libpano/panorama.h trunk/libpano/parser.c trunk/libpano/queryfeature.c Modified: trunk/libpano/ChangeLog =================================================================== --- trunk/libpano/ChangeLog 2008-12-29 21:37:58 UTC (rev 913) +++ trunk/libpano/ChangeLog 2008-12-29 23:05:31 UTC (rev 914) @@ -1,5 +1,8 @@ 2008-12-29 dmg <dmg@phosphorus> + * panorama.h, math.c, adjust.c, queryfeature.c, filter.h: Finally + added the architectural. + * queryfeature.c (panoProjectionFeaturesQuery): Added querying features for panini; this will allow Hugin to use it. Modified: trunk/libpano/adjust.c =================================================================== --- trunk/libpano/adjust.c 2008-12-29 21:37:58 UTC (rev 913) +++ trunk/libpano/adjust.c 2008-12-29 23:05:31 UTC (rev 914) @@ -693,6 +693,11 @@ panini_erect(b/2.0, 0.0, &tx, &ty, & tpara); mp->distance = pn->width/(2.0*tx); break; + case _architectural: + tpara = 1; + arch_erect(b/2.0, 0.0, &tx, &ty, & tpara); + mp->distance = pn->width/(2.0*tx); + break; case _lambertazimuthal: tpara = 1; lambertazimuthal_erect(b/2.0, 0.0, &tx, &ty, & tpara); @@ -805,6 +810,10 @@ { SetDesc(stack[i], erect_panini, &(mp->distance) ); i++; // Convert panini to sphere } + else if(pn->format == _architectural) + { + SetDesc(stack[i], erect_arch, &(mp->distance) ); i++; // Convert arch to sphere + } else if(pn->format == _lambert) { SetDesc(stack[i], erect_lambert, &(mp->distance) ); i++; // Convert lambert to sphere @@ -982,6 +991,11 @@ panini_erect(b/2.0, 0.0, &tx, &ty, & tpara); mp->distance = pn->width/(2.0*tx); break; + case _architectural: + tpara = 1; + arch_erect(b/2.0, 0.0, &tx, &ty, & tpara); + mp->distance = pn->width/(2.0*tx); + break; case _stereographic: tpara = 1; stereographic_erect(b/2.0, 0.0, &tx, &ty, & tpara); @@ -1157,6 +1171,10 @@ { SetDesc(stack[i], panini_erect, &(mp->distance) ); i++; // Convert panini to sphere } + else if(pn->format == _architectural) + { + SetDesc(stack[i], arch_erect, &(mp->distance) ); i++; // Convert arch to sphere + } else if(pn->format == _lambert) { SetDesc(stack[i], lambert_erect, &(mp->distance) ); i++; // Convert sphere to lambert Modified: trunk/libpano/filter.h =================================================================== --- trunk/libpano/filter.h 2008-12-29 21:37:58 UTC (rev 913) +++ trunk/libpano/filter.h 2008-12-29 23:05:31 UTC (rev 914) @@ -852,7 +852,10 @@ int panini_erect ( double x_dest,double y_dest, double* x_src, double* y_src, void* params ); int erect_panini ( double x_dest,double y_dest, double* x_src, double* y_src, void* params ); +int arch_erect ( double x_dest,double y_dest, double* x_src, double* y_src, void* params ); +int erect_arch ( double x_dest,double y_dest, double* x_src, double* y_src, void* params ); + int mirror_sphere_cp ( double x_dest,double y_dest, double* x_src, double* y_src, void* params ); int mirror_pano ( double x_dest,double y_dest, double* x_src, double* y_src, void* params ); int sphere_cp_mirror ( double x_dest,double y_dest, double* x_src, double* y_src, void* params ); Modified: trunk/libpano/math.c =================================================================== --- trunk/libpano/math.c 2008-12-29 21:37:58 UTC (rev 913) +++ trunk/libpano/math.c 2008-12-29 23:05:31 UTC (rev 914) @@ -695,7 +695,40 @@ return 1; } +/** convert from erect to miller */ +int arch_erect( double x_dest,double y_dest, double* x_src, double* y_src, void* params) +{ + // params: distanceparam + double phi; + phi = y_dest/distanceparam; + if (phi < 0) { + millercylindrical_erect(x_dest, y_dest, x_src, y_src, params); + } else { + lambert_erect(x_dest, y_dest, x_src, y_src, params); + } + + return 1; +} + +/** convert from erect to miller */ +int erect_arch( double x_dest,double y_dest, double* x_src, double* y_src, void* params) +{ + // params: distanceparam + double y; + + y = y_dest/distanceparam; + if (y < 0) { + erect_millercylindrical(x_dest, y_dest, x_src, y_src, params); + } else { + erect_lambert(x_dest, y_dest, x_src, y_src, params); + } + + return 1; +} + + + /** convert from mercator to erect */ int erect_millercylindrical( double x_dest,double y_dest, double* x_src, double* y_src, void* params) { Modified: trunk/libpano/panorama.h =================================================================== --- trunk/libpano/panorama.h 2008-12-29 21:37:58 UTC (rev 913) +++ trunk/libpano/panorama.h 2008-12-29 23:05:31 UTC (rev 914) @@ -258,6 +258,7 @@ _albersequalareaconic = 17, _millercylindrical = 18, _panini = 19, + _architectural = 20, }; enum @@ -275,9 +276,10 @@ PANO_FORMAT_ALBERS_EQUAL_AREA_CONIC = 10, PANO_FORMAT_MILLER_CYLINDRICAL = 11, PANO_FORMAT_PANINI = 12, + PANO_FORMAT_ARCHITECTURAL = 13, }; -#define PANO_FORMAT_COUNT 13 +#define PANO_FORMAT_COUNT 14 // A large rectangle Modified: trunk/libpano/parser.c =================================================================== --- trunk/libpano/parser.c 2008-12-29 21:37:58 UTC (rev 913) +++ trunk/libpano/parser.c 2008-12-29 23:05:31 UTC (rev 914) @@ -495,6 +495,9 @@ case PANO_FORMAT_PANINI: gl->pano.format = _panini; break; + case PANO_FORMAT_ARCHITECTURAL: + gl->pano.format = _architectural; + break; default: PrintError( "Unknown panorama projection: %d", gl->pano.format ); return -1; @@ -993,6 +996,9 @@ case 12: p->pano.format = _panini; break; + case 13: + p->pano.format = _architectural; + break; default: PrintError( "Unknown panorama projection: %d", p->pano.format ); return -1; Modified: trunk/libpano/queryfeature.c =================================================================== --- trunk/libpano/queryfeature.c 2008-12-29 21:37:58 UTC (rev 913) +++ trunk/libpano/queryfeature.c 2008-12-29 23:05:31 UTC (rev 914) @@ -70,6 +70,7 @@ {"PanoType10","Albers Conical Equal Area"}, {"PanoType11","Miller Cylindrical"}, {"PanoType12","Panini"}, + {"PanoType13","Architectural"}, // Filter Types // fix: Fixed Windowsize // aa: Antialiasing filter with adaptive filter size @@ -308,6 +309,7 @@ "Albers Equal Area Conic", "Miller Cylindrical", "Panini", + "Architectural", }; static int panoFormatID[PANO_FORMAT_COUNT] = { @@ -323,7 +325,8 @@ _lambertazimuthal, _albersequalareaconic, _millercylindrical, - _panini + _panini, + _architectural, }; int panoProjectionFormatCount(void) @@ -366,6 +369,7 @@ break; case PANO_FORMAT_EQUIRECTANGULAR: case PANO_FORMAT_MILLER_CYLINDRICAL: + case PANO_FORMAT_ARCHITECTURAL: break; case PANO_FORMAT_PANINI: features->maxVFOV = 179; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jim...@us...> - 2008-12-31 05:25:47
|
Revision: 917 http://panotools.svn.sourceforge.net/panotools/?rev=917&view=rev Author: jim0watters Date: 2008-12-31 05:25:43 +0000 (Wed, 31 Dec 2008) Log Message: ----------- Initialize TrformStr structure before use Modified Paths: -------------- trunk/libpano/PTcommon.c trunk/libpano/correct.c trunk/libpano/filter.c trunk/libpano/morpher.c trunk/libpano/pt_stdint.h trunk/libpano/pteditor.c trunk/libpano/ptpicker.c Modified: trunk/libpano/PTcommon.c =================================================================== --- trunk/libpano/PTcommon.c 2008-12-31 01:06:08 UTC (rev 916) +++ trunk/libpano/PTcommon.c 2008-12-31 05:25:43 UTC (rev 917) @@ -670,6 +670,7 @@ SetImageDefaults(&resultPanorama); //transform structure holds input and output images, and some miscellaneous other information + memset(&transform, 0, sizeof(TrformStr)); transform.src = &image1; // Input image transform.dest = &resultPanorama; // Output image transform.mode = 8; // How to run transformation @@ -1018,7 +1019,7 @@ printf("Prefs FastT %d:/n, prefs->fastStep); */ - MakePano(&transform, prefs); + MyMakePano(&transform, prefs, loopCounter); if (transform.success == 0) { // Error PrintError("Error converting image"); Modified: trunk/libpano/correct.c =================================================================== --- trunk/libpano/correct.c 2008-12-31 01:06:08 UTC (rev 916) +++ trunk/libpano/correct.c 2008-12-31 05:25:43 UTC (rev 917) @@ -665,6 +665,8 @@ PrintError("Could not allocate %ld bytes", dest->dataSize ); return -1; } + + memset(&TrCrop, 0, sizeof(TrformStr)); TrCrop.src = src; TrCrop.dest = dest; TrCrop.success = 0; Modified: trunk/libpano/filter.c =================================================================== --- trunk/libpano/filter.c 2008-12-31 01:06:08 UTC (rev 916) +++ trunk/libpano/filter.c 2008-12-31 05:25:43 UTC (rev 917) @@ -861,6 +861,12 @@ im->selection.bottom = 0; im->selection.left = 0; im->selection.right = 0; + im->cropInformation.cropped_height = 0; + im->cropInformation.cropped_width = 0; + im->cropInformation.full_height = 0; + im->cropInformation.full_width = 0; + im->cropInformation.x_offset = 0; + im->cropInformation.y_offset = 0; panoSetMetadataDefaults(&im->metadata); } Modified: trunk/libpano/morpher.c =================================================================== --- trunk/libpano/morpher.c 2008-12-31 01:06:08 UTC (rev 916) +++ trunk/libpano/morpher.c 2008-12-31 05:25:43 UTC (rev 917) @@ -210,7 +210,7 @@ return -1; } - + memset(&Tr, 0, sizeof(TrformStr)); Tr.mode = _show_progress; Tr.interpolator = _spline36; Tr.gamma = 1.0; Modified: trunk/libpano/pt_stdint.h =================================================================== --- trunk/libpano/pt_stdint.h 2008-12-31 01:06:08 UTC (rev 916) +++ trunk/libpano/pt_stdint.h 2008-12-31 05:25:43 UTC (rev 917) @@ -16,8 +16,18 @@ # define vsnprintf _vsnprintf # define snprintf _snprintf + +#ifdef _CPLUSPLUS +/* define if your compiler understands inline commands */ +#define INLINE _inline +#else +#define INLINE +#endif + + # else # include <stdint.h> +#define INLINE inline # endif #endif Modified: trunk/libpano/pteditor.c =================================================================== --- trunk/libpano/pteditor.c 2008-12-31 01:06:08 UTC (rev 916) +++ trunk/libpano/pteditor.c 2008-12-31 05:25:43 UTC (rev 917) @@ -163,7 +163,8 @@ if( readPrefs( (char*) &spref, _sizep ) != 0 ) SetSizeDefaults ( &spref ); - + + memset(&Tr, 0, sizeof(TrformStr)); Tr.src = pano; Tr.dest = &dest; @@ -255,6 +256,7 @@ if( readPrefs( (char*) &spref, _sizep ) != 0 ) SetSizeDefaults ( &spref ); + memset(&Tr, 0, sizeof(TrformStr)); Tr.src = &src; Tr.dest = &dest; Modified: trunk/libpano/ptpicker.c =================================================================== --- trunk/libpano/ptpicker.c 2008-12-31 01:06:08 UTC (rev 916) +++ trunk/libpano/ptpicker.c 2008-12-31 05:25:43 UTC (rev 917) @@ -1155,6 +1155,7 @@ w_seek = h_seek = (int)(sqrt((double) (*env)->GetArrayLength(env, jseek))+0.5); pc_Tr = (TrformStr *) malloc(sizeof(TrformStr)); + memset(pc_Tr, 0, sizeof(TrformStr)); pc_reg = ® pc_adj = (aPrefs*) malloc(sizeof(aPrefs)); SetAdjustDefaults(pc_adj); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jim...@us...> - 2008-12-31 05:59:30
|
Revision: 918 http://panotools.svn.sourceforge.net/panotools/?rev=918&view=rev Author: jim0watters Date: 2008-12-31 05:59:23 +0000 (Wed, 31 Dec 2008) Log Message: ----------- adjust.c, filter.h, math.c, panorama.h, parser.c & queryfeateature.c added mirror, equisolid, orthographic, and stereographic as input image formats added equisolid, orthographic, stereographic as output panorama formats add some more defines to panorama.h to help image and pano formats Modified Paths: -------------- trunk/libpano/ChangeLog trunk/libpano/adjust.c trunk/libpano/doc/Optimize.txt trunk/libpano/doc/stitch.txt trunk/libpano/filter.h trunk/libpano/math.c trunk/libpano/panorama.h trunk/libpano/parser.c trunk/libpano/queryfeature.c Property Changed: ---------------- trunk/libpano/ Property changes on: trunk/libpano ___________________________________________________________________ Modified: svn:ignore - COPYING INSTALL aclocal.m4 autom4te.cache config config.log config.status configure libtool Makefile Makefile.in .obj *.o *.lo *.la .deps .libs config.h config.h.in stamp-h* Debug Release *.ncb *.suo + COPYING INSTALL aclocal.m4 autom4te.cache config config.log config.status configure libtool Makefile Makefile.in .obj *.o *.lo *.la .deps .libs config.h config.h.in stamp-h* Debug Release *.ncb *.suo Debug LIB CMD Release LIB CMD Debug DLL CMD *.orig Modified: trunk/libpano/ChangeLog =================================================================== --- trunk/libpano/ChangeLog 2008-12-31 05:25:43 UTC (rev 917) +++ trunk/libpano/ChangeLog 2008-12-31 05:59:23 UTC (rev 918) @@ -1,3 +1,10 @@ +2008-01-26 Jim Watters <jwa...@ph...> + + * adjust.c, filter.h, math.c, panorama.h, parser.c & queryfeateature.c + added mirror, equisolid, orthographic, and stereographic as input image formats + added equisolid, orthographic, stereographic as output panorama formats + + 2008-12-29 dmg <dmg@phosphorus> * panorama.h, math.c, adjust.c, queryfeature.c, filter.h: Finally Modified: trunk/libpano/adjust.c =================================================================== --- trunk/libpano/adjust.c 2008-12-31 05:25:43 UTC (rev 917) +++ trunk/libpano/adjust.c 2008-12-31 05:59:23 UTC (rev 918) @@ -565,9 +565,9 @@ void SetMakeParams( struct fDesc *stack, struct MakeParams *mp, Image *im , Image *pn, int color ) { - int i; - double a,b; // field of view in rad - double tx,ty, tpara; // temporary variables + int i; + double a,b; // field of view in rad + double tx,ty, tpara; // temporary variables /* Joost Nieuwenhuijse, 3 feb 2005: Fix for cropping bug If a script containing the 'C' crop parameter was stitched by PTStitcher, it would fail if the cropping area is partially outside the source image. @@ -583,45 +583,45 @@ and vertical offset are added to compensate for the shift of the center of the crop area relative to the center of the image. */ - int image_selection_width=im->width; - int image_selection_height=im->height; - mp->im = im; - mp->pn = pn; - if(im->cP.horizontal) - { - mp->horizontal=im->cP.horizontal_params[color]; - } - else - { - mp->horizontal=0; - } - if(im->cP.vertical) - { - mp->vertical=im->cP.vertical_params[color]; - } - else - { - mp->vertical=0; - } - if( (im->selection.left != 0) || (im->selection.top != 0) || (im->selection.bottom != 0) || (im->selection.right != 0) ) - { - if(im->cP.cutFrame) - { - image_selection_width = im->selection.right - im->selection.left; - image_selection_height = im->selection.bottom - im->selection.top; - mp->horizontal += (im->selection.right + im->selection.left - im->width)/2.0; - mp->vertical += (im->selection.bottom + im->selection.top - im->height)/2.0; - } - } + int image_selection_width=im->width; + int image_selection_height=im->height; + mp->im = im; + mp->pn = pn; + if(im->cP.horizontal) + { + mp->horizontal=im->cP.horizontal_params[color]; + } + else + { + mp->horizontal=0; + } + if(im->cP.vertical) + { + mp->vertical=im->cP.vertical_params[color]; + } + else + { + mp->vertical=0; + } + if( (im->selection.left != 0) || (im->selection.top != 0) || (im->selection.bottom != 0) || (im->selection.right != 0) ) + { + if(im->cP.cutFrame) + { + image_selection_width = im->selection.right - im->selection.left; + image_selection_height = im->selection.bottom - im->selection.top; + mp->horizontal += (im->selection.right + im->selection.left - im->width)/2.0; + mp->vertical += (im->selection.bottom + im->selection.top - im->height)/2.0; + } + } - a = DEG_TO_RAD( im->hfov ); // field of view in rad - b = DEG_TO_RAD( pn->hfov ); + a = DEG_TO_RAD( im->hfov ); // field of view in rad + b = DEG_TO_RAD( pn->hfov ); - SetMatrix( - DEG_TO_RAD( im->pitch ), - 0.0, - - DEG_TO_RAD( im->roll ), - mp->mt, - 0 ); + SetMatrix( - DEG_TO_RAD( im->pitch ), + 0.0, + - DEG_TO_RAD( im->roll ), + mp->mt, + 0 ); #if 0 switch (pn->format) @@ -671,554 +671,601 @@ * Added more output projection types. Broke mp->distance and mp->scale factor calculation * into separate parts, making it easier to add new projection types */ - // calculate distance - switch (pn->format) - { - case _rectilinear: - mp->distance = (double) pn->width / (2.0 * tan(b/2.0)); - break; - case _equirectangular: - case _fisheye_ff: - case _fisheye_circ: - case _panorama: - case _lambert: - case _mercator: - case _millercylindrical: - case _sinusoidal: - // horizontal pixels per degree - mp->distance = ((double) pn->width) / b; - break; - case _panini: - tpara = 1; - panini_erect(b/2.0, 0.0, &tx, &ty, & tpara); - mp->distance = pn->width/(2.0*tx); - break; - case _architectural: - tpara = 1; - arch_erect(b/2.0, 0.0, &tx, &ty, & tpara); - mp->distance = pn->width/(2.0*tx); - break; - case _lambertazimuthal: - tpara = 1; - lambertazimuthal_erect(b/2.0, 0.0, &tx, &ty, & tpara); - mp->distance = pn->width/(2.0*tx); - break; - case _stereographic: - tpara = 1; - stereographic_erect(b/2.0, 0.0, &tx, &ty, & tpara); - mp->distance = pn->width/(2.0*tx); - break; - case _trans_mercator: - tpara = 1; - transmercator_erect(b/2.0, 0.0, &tx, &ty, &tpara); - mp->distance = pn->width/(2.0*tx); - break; - case _albersequalareaconic: - mp->distance = 1.0; - //albersequalareaconic_erect(1.924913116, -PI/2.0, &tx, &ty, mp); //b/2.0 - albersequalareaconic_distance(&tx, mp); - mp->distance = pn->width/(2.0*tx); - break; - default: - // unknown - PrintError ("SetMakeParams: Unsupported panorama projection"); - // no way to report an error back to the caller... - mp->distance = 1; - } + // calculate distance + switch (pn->format) + { + case _rectilinear: + mp->distance = (double) pn->width / (2.0 * tan(b/2.0)); + break; + case _equirectangular: + case _fisheye_ff: + case _fisheye_circ: + case _panorama: + case _lambert: + case _mercator: + case _millercylindrical: + case _sinusoidal: + case _mirror: + // horizontal pixels per degree + mp->distance = ((double) pn->width) / b; + break; + case _panini: + tpara = 1; + panini_erect(b/2.0, 0.0, &tx, &ty, & tpara); + mp->distance = pn->width/(2.0*tx); + break; + case _architectural: + tpara = 1; + arch_erect(b/2.0, 0.0, &tx, &ty, & tpara); + mp->distance = pn->width/(2.0*tx); + break; + case _lambertazimuthal: + tpara = 1; + lambertazimuthal_erect(b/2.0, 0.0, &tx, &ty, & tpara); + mp->distance = pn->width/(2.0*tx); + break; + case _stereographic: + tpara = 1; + stereographic_erect(b/2.0, 0.0, &tx, &ty, & tpara); + mp->distance = pn->width/(2.0*tx); + break; + case _trans_mercator: + tpara = 1; + transmercator_erect(b/2.0, 0.0, &tx, &ty, &tpara); + mp->distance = pn->width/(2.0*tx); + break; + case _albersequalareaconic: + mp->distance = 1.0; + //albersequalareaconic_erect(1.924913116, -PI/2.0, &tx, &ty, mp); //b/2.0 + albersequalareaconic_distance(&tx, mp); + mp->distance = pn->width/(2.0*tx); + break; + case _equisolid: + mp->distance = (double) pn->width / (4.0 * sin(b/4.0)); + break; + case _orthographic: + mp->distance = (double) pn->width / (2.0 * sin(b/2.0)); + break; + default: + // unknown + PrintError ("SetMakeParams: Unsupported panorama projection"); + // no way to report an error back to the caller... + mp->distance = 1; + break; + } - // calculate final scaling factor, that reverses the mp->distance - // scaling and applies the required output scaling factor - switch (im->format) - { - case _rectilinear: - // calculate distance for this projection - mp->scale[0] = (double) image_selection_width / (2.0 * tan(a/2.0)) / mp->distance; - break; - case _equirectangular: - case _panorama: - case _fisheye_ff: - case _fisheye_circ: - case _mercator: - case _sinusoidal: - mp->scale[0] = ((double) image_selection_width) / a / mp->distance; - break; - default: - PrintError ("SetMakeParams: Unsupported input image projection"); - // no way to report an error back to the caller... - mp->scale[0] = 1; - } - mp->scale[1] = mp->scale[0]; + // calculate final scaling factor, that reverses the mp->distance + // scaling and applies the required output scaling factor + switch (im->format) + { + case _rectilinear: + // calculate distance for this projection + mp->scale[0] = (double) image_selection_width / (2.0 * tan(a/2.0)) / mp->distance; + break; + case _equirectangular: + case _panorama: + case _fisheye_ff: + case _fisheye_circ: + case _mercator: + case _sinusoidal: + mp->scale[0] = ((double) image_selection_width) / a / mp->distance; + break; + case _equisolid: + case _mirror: + mp->scale[0] = (double) image_selection_width / (4.0 * sin(a/4.0)) / mp->distance; + break; + case _orthographic: + mp->scale[0] = (double) image_selection_width / (2.0 * sin(a/2.0)) / mp->distance; + break; + case _stereographic: + mp->scale[0] = (double) image_selection_width / (4.0 * tan(a/4.0)) / mp->distance; + break; + default: + PrintError ("SetMakeParams: Unsupported input image projection"); + // no way to report an error back to the caller... + mp->scale[0] = 1; + break; + } + mp->scale[1] = mp->scale[0]; -// printf("new params: mp->distance: %lf, mp->scale: %lf\n\n", mp->distance, mp->scale[0]); +// printf("new params: mp->distance: %lf, mp->scale: %lf\n\n", mp->distance, mp->scale[0]); - mp->shear[0] = im->cP.shear_x / image_selection_height; - mp->shear[1] = im->cP.shear_y / image_selection_width; - mp->rot[0] = mp->distance * PI; // 180 in screenpoints - mp->rot[1] = -im->yaw * mp->distance * PI / 180.0; // rotation angle in screenpoints + mp->shear[0] = im->cP.shear_x / image_selection_height; + mp->shear[1] = im->cP.shear_y / image_selection_width; + mp->rot[0] = mp->distance * PI; // 180 in screenpoints + mp->rot[1] = -im->yaw * mp->distance * PI / 180.0; // rotation angle in screenpoints + /* + printf("Image format %d\n", im->format); + printf("shear[0] %f\n", mp->shear[0]); + printf("shear[1] %f\n", mp->shear[1]); + printf("rot[0] %f\n", mp->rot[0]); + printf("rot[1] %f\n", mp->rot[1]); + printf("scale[0] %f\n", mp->rot[0]); + */ - /* - printf("Image format %d\n", im->format); - printf("shear[0] %f\n", mp->shear[0]); - printf("shear[1] %f\n", mp->shear[1]); - printf("rot[0] %f\n", mp->rot[0]); - printf("rot[1] %f\n", mp->rot[1]); - printf("scale[0] %f\n", mp->rot[0]); - */ + mp->perspect[0] = (void*)(mp->mt); + mp->perspect[1] = (void*)&(mp->distance); + + for(i=0; i<4; i++) + mp->rad[i] = im->cP.radial_params[color][i]; + mp->rad[5] = im->cP.radial_params[color][4]; + if( (im->cP.correction_mode & 3) == correction_mode_radial ) + mp->rad[4] = ( (double)( image_selection_width < image_selection_height ? image_selection_width : image_selection_height) ) / 2.0; + else + mp->rad[4] = ((double) image_selection_height) / 2.0; - mp->perspect[0] = (void*)(mp->mt); - mp->perspect[1] = (void*)&(mp->distance); - - for(i=0; i<4; i++) - mp->rad[i] = im->cP.radial_params[color][i]; - mp->rad[5] = im->cP.radial_params[color][4]; - - if( (im->cP.correction_mode & 3) == correction_mode_radial ) - mp->rad[4] = ( (double)( image_selection_width < image_selection_height ? image_selection_width : image_selection_height) ) / 2.0; - else - mp->rad[4] = ((double) image_selection_height) / 2.0; - - // Joost: removed, see above -// mp->horizontal = im->cP.horizontal_params[color]; -// mp->vertical = im->cP.vertical_params[color]; +// mp->horizontal = im->cP.horizontal_params[color]; +// mp->vertical = im->cP.vertical_params[color]; - i = 0; + i = 0; - if(pn->format == _rectilinear) // rectilinear panorama - { - SetDesc(stack[i], erect_rect, &(mp->distance) ); i++; // Convert rectilinear to equirect - } - else if(pn->format == _panorama) - { - SetDesc(stack[i], erect_pano, &(mp->distance) ); i++; // Convert panoramic to equirect - } - else if(pn->format == _fisheye_circ || pn->format == _fisheye_ff) - { - SetDesc(stack[i], erect_sphere_tp, &(mp->distance) ); i++; // Convert panoramic to sphere - } - else if(pn->format == _mercator) - { - SetDesc(stack[i], erect_mercator, &(mp->distance) ); i++; // Convert mercator to sphere + if(pn->format == _rectilinear) // rectilinear panorama + { + SetDesc(stack[i], erect_rect, &(mp->distance) ); i++; // Convert rectilinear to equirect } - else if(pn->format == _millercylindrical) - { - SetDesc(stack[i], erect_millercylindrical, &(mp->distance) ); i++; // Convert miller to sphere + else if(pn->format == _panorama) + { + SetDesc(stack[i], erect_pano, &(mp->distance) ); i++; // Convert panoramic to equirect } - else if(pn->format == _panini) - { - SetDesc(stack[i], erect_panini, &(mp->distance) ); i++; // Convert panini to sphere + else if(pn->format == _fisheye_circ || pn->format == _fisheye_ff) + { + SetDesc(stack[i], erect_sphere_tp, &(mp->distance) ); i++; // Convert fisheye to equirect } - else if(pn->format == _architectural) - { - SetDesc(stack[i], erect_arch, &(mp->distance) ); i++; // Convert arch to sphere + else if(pn->format == _equisolid) + { + SetDesc(stack[i], sphere_tp_equisolid, &(mp->distance) ); i++; // Convert fisheye equisolid to spherical + SetDesc(stack[i], erect_sphere_tp, &(mp->distance) ); i++; // Convert spherical to equirect } - else if(pn->format == _lambert) - { - SetDesc(stack[i], erect_lambert, &(mp->distance) ); i++; // Convert lambert to sphere + else if(pn->format == _mirror) + { + SetDesc(stack[i], sphere_cp_mirror, &(mp->distance) ); i++; // Convert mirror to spherical + SetDesc(stack[i], erect_sphere_cp, &(mp->distance) ); i++; // Convert spherical to equirect } - else if(pn->format == _lambertazimuthal) - { - SetDesc(stack[i], erect_lambertazimuthal, &(mp->distance) ); i++; // Convert lambert to sphere + else if(pn->format == _orthographic) + { + SetDesc(stack[i], sphere_tp_orthographic, &(mp->distance) ); i++; // Convert fisheye orthographic to spherical + SetDesc(stack[i], erect_sphere_tp, &(mp->distance) ); i++; // Convert spherical to equirect } - else if(pn->format == _trans_mercator) - { - SetDesc(stack[i], erect_transmercator, &(mp->distance) ); i++; // Convert transverse mercator to sphere + else if(pn->format == _mercator) + { + SetDesc(stack[i], erect_mercator, &(mp->distance) ); i++; // Convert mercator to equirect } - else if(pn->format == _stereographic) - { - SetDesc(stack[i], erect_stereographic, &(mp->distance) ); i++; // Convert stereographic to sphere + else if(pn->format == _millercylindrical) + { + SetDesc(stack[i], erect_millercylindrical, &(mp->distance) ); i++; // Convert miller to equirect } - else if(pn->format == _sinusoidal) - { - SetDesc(stack[i], erect_sinusoidal, &(mp->distance) ); i++; // Convert sinusoidal to sphere - } - else if(pn->format == _albersequalareaconic) - { - SetDesc(stack[i], erect_albersequalareaconic, mp ); i++; // Convert albersequalareaconic to sphere - } - else if(pn->format == _equirectangular) - { - // no conversion needed + else if(pn->format == _panini) + { + SetDesc(stack[i], erect_panini, &(mp->distance) ); i++; // Convert panini to sphere + } + else if(pn->format == _architectural) + { + SetDesc(stack[i], erect_arch, &(mp->distance) ); i++; // Convert arch to sphere + } + else if(pn->format == _lambert) + { + SetDesc(stack[i], erect_lambert, &(mp->distance) ); i++; // Convert lambert to equirect + } + else if(pn->format == _lambertazimuthal) + { + SetDesc(stack[i], erect_lambertazimuthal, &(mp->distance) ); i++; // Convert lambert to equirect + } + else if(pn->format == _trans_mercator) + { + SetDesc(stack[i], erect_transmercator, &(mp->distance) ); i++; // Convert transverse mercator to equirect + } + else if(pn->format == _stereographic) + { + SetDesc(stack[i], erect_stereographic, &(mp->distance) ); i++; // Convert stereographic to equirect + } + else if(pn->format == _sinusoidal) + { + SetDesc(stack[i], erect_sinusoidal, &(mp->distance) ); i++; // Convert sinusoidal to equirect + } + else if(pn->format == _albersequalareaconic) + { + SetDesc(stack[i], erect_albersequalareaconic, mp ); i++; // Convert albersequalareaconic to equirect + } + else if(pn->format == _equirectangular) + { + // no conversion needed } else { - PrintError("Projection type %d not supported, using equirectangular", pn->format); - } + PrintError("Projection type %d not supported, using equirectangular", pn->format); + } + SetDesc( stack[i], rotate_erect, mp->rot ); i++; // Rotate equirect. image horizontally + SetDesc( stack[i], sphere_tp_erect, &(mp->distance) ); i++; // Convert spherical image to equirect. + SetDesc( stack[i], persp_sphere, mp->perspect ); i++; // Perspective Control spherical Image - SetDesc( stack[i], rotate_erect, mp->rot ); i++; // Rotate equirect. image horizontally - SetDesc( stack[i], sphere_tp_erect, &(mp->distance) ); i++; // Convert spherical image to equirect. - SetDesc( stack[i], persp_sphere, mp->perspect ); i++; // Perspective Control spherical Image + if(im->format == _rectilinear) // rectilinear image + { + SetDesc(stack[i], rect_sphere_tp, &(mp->distance) ); i++; // Convert rectilinear to spherical + } + else if(im->format == _panorama) // pamoramic image + { + SetDesc(stack[i], pano_sphere_tp, &(mp->distance) ); i++; // Convert panoramic to spherical + } + else if(im->format == _equirectangular) // equirectangular image + { + SetDesc(stack[i], erect_sphere_tp, &(mp->distance) ); i++; // Convert equirectangular to spherical + } - if(im->format == _rectilinear) // rectilinear image - { - SetDesc(stack[i], rect_sphere_tp, &(mp->distance) ); i++; // Convert rectilinear to spherical - } - else if (im->format == _panorama) // pamoramic image - { - SetDesc(stack[i], pano_sphere_tp, &(mp->distance) ); i++; // Convert panoramic to spherical - } - else if (im->format == _equirectangular) // PSphere image - { - SetDesc(stack[i], erect_sphere_tp, &(mp->distance) ); i++; // Convert PSphere to spherical - } + SetDesc( stack[i], resize, mp->scale ); i++; // Scale image - SetDesc( stack[i], resize, mp->scale ); i++; // Scale image + if( im->cP.radial ) + { + switch( im->cP.correction_mode & 3 ) + { + case correction_mode_radial: SetDesc(stack[i],radial,mp->rad); i++; break; + case correction_mode_vertical: SetDesc(stack[i],vertical,mp->rad); i++; break; + case correction_mode_deregister:SetDesc(stack[i],deregister,mp->rad); i++; break; + } + } + if (mp->vertical != 0.0) + { + SetDesc(stack[i], vert, &(mp->vertical)); i++; + } + if (mp->horizontal != 0.0) + { + SetDesc(stack[i], horiz, &(mp->horizontal)); i++; + } + if( im->cP.shear ) + { + SetDesc( stack[i], shear, mp->shear ); i++; + } - if( im->cP.radial ) - { - switch( im->cP.correction_mode & 3 ) - { - case correction_mode_radial: SetDesc(stack[i],radial,mp->rad); i++; break; - case correction_mode_vertical: SetDesc(stack[i],vertical,mp->rad); i++; break; - case correction_mode_deregister:SetDesc(stack[i],deregister,mp->rad); i++; break; - } - } -// if ( im->cP.vertical) - if (mp->vertical != 0.0) - { - SetDesc(stack[i],vert, &(mp->vertical)); i++; - } -// if ( im->cP.horizontal ) - if (mp->horizontal != 0.0) - { - SetDesc(stack[i],horiz, &(mp->horizontal)); i++; - } - if( im->cP.shear ) - { - SetDesc( stack[i],shear, mp->shear ); i++; - } + stack[i].func = (trfn)NULL; - stack[i].func = (trfn)NULL; - // print stack for debugging #if 0 - printf( "Rotate params: %lg %lg\n" , mp->rot[0], mp->rot[1]); - printf( "Distance : %lg\n" , mp->distance); - printf( "Perspect params: %lg %lg %lg\n",a, beta , gammar ); - if(aP->format == _rectilinear) // rectilinear image - { - printf( "Rectilinear\n" ); - } - else if (aP->format == _panorama) // pamoramic image - { - printf( "Panorama\n" ); - } - else - printf( "Fisheye\n" ); - - printf( "Scaling : %lg\n" , mp->scale[0]); + printf( "Rotate params: %lg %lg\n" , mp->rot[0], mp->rot[1]); + printf( "Distance : %lg\n" , mp->distance); + printf( "Perspect params: %lg %lg %lg\n",a, beta , gammar ); + if(aP->format == _rectilinear) // rectilinear image + { + printf( "Rectilinear\n" ); + } + else if (aP->format == _panorama) // pamoramic image + { + printf( "Panorama\n" ); + } + else + { + printf( "Fisheye\n" ); + } - if( aP->correct ) - { - printf( "Correct:\n" ); - if( aP->c_prefs.shear ) - { - printf( "Shear: %lg\n", mp->shear ); - } - if ( aP->c_prefs.horizontal ) - { - printf( "horiz:%lg\n", mp->horizontal ); - } - if ( aP->c_prefs.vertical) - { - printf( "vert:%lg\n", mp->vertical ); - } - if( aP->c_prefs.radial ) - { - printf( "Polynomial:\n" ); - if( aP->c_prefs.isScanningSlit ) - { - printf( "Scanning Slit:\n" ); - } - else - { - printf( "Radial:\n" ); - printf( "Params: %lg %lg %lg %lg %lg\n", mp->rad[0],mp->rad[1],mp->rad[2],mp->rad[3],mp->rad[4] ); - } - } - } + printf( "Scaling : %lg\n" , mp->scale[0]); + if( aP->correct ) + { + printf( "Correct:\n" ); + if( aP->c_prefs.shear ) + { + printf( "Shear: %lg\n", mp->shear ); + } + if ( aP->c_prefs.horizontal ) + { + printf( "horiz:%lg\n", mp->horizontal ); + } + if ( aP->c_prefs.vertical) + { + printf( "vert:%lg\n", mp->vertical ); + } + if( aP->c_prefs.radial ) + { + printf( "Polynomial:\n" ); + if( aP->c_prefs.isScanningSlit ) + { + printf( "Scanning Slit:\n" ); + } + else + { + printf( "Radial:\n" ); + printf( "Params: %lg %lg %lg %lg %lg\n", mp->rad[0],mp->rad[1],mp->rad[2],mp->rad[3],mp->rad[4] ); + } + } + } + #endif } // Set inverse Makeparameters depending on adjustprefs, color and source image -void SetInvMakeParams( struct fDesc *stack, struct MakeParams *mp, Image *im , Image *pn, int color ) +void SetInvMakeParams( struct fDesc *stack, struct MakeParams *mp, Image *im , Image *pn, int color ) { - int i; - double a,b; // field of view in rad - double tx,ty,tpara; + int i; + double a,b; // field of view in rad + double tx,ty,tpara; - a = DEG_TO_RAD( im->hfov ); // field of view in rad - b = DEG_TO_RAD( pn->hfov ); + a = DEG_TO_RAD( im->hfov ); // field of view in rad + b = DEG_TO_RAD( pn->hfov ); - mp->im = im; - mp->pn = pn; - SetMatrix( DEG_TO_RAD( im->pitch ), - 0.0, - DEG_TO_RAD( im->roll ), - mp->mt, - 1 ); + mp->im = im; + mp->pn = pn; + SetMatrix( DEG_TO_RAD( im->pitch ), + 0.0, + DEG_TO_RAD( im->roll ), + mp->mt, + 1 ); - // dangelo: added mercator, sinusoidal and stereographic projection - switch (pn->format) - { - case _rectilinear: - mp->distance = (double) pn->width / (2.0 * tan(b/2.0)); - break; - case _equirectangular: - case _fisheye_ff: - case _fisheye_circ: - case _panorama: - case _lambert: - case _mercator: - case _millercylindrical: - case _sinusoidal: - // horizontal pixels per degree - mp->distance = ((double) pn->width) / b; - break; - case _lambertazimuthal: - tpara = 1; - lambertazimuthal_erect(b/2.0, 0.0, &tx, &ty, & tpara); - mp->distance = pn->width/(2.0*tx); - break; - case _panini: - tpara = 1; - panini_erect(b/2.0, 0.0, &tx, &ty, & tpara); - mp->distance = pn->width/(2.0*tx); - break; - case _architectural: - tpara = 1; - arch_erect(b/2.0, 0.0, &tx, &ty, & tpara); - mp->distance = pn->width/(2.0*tx); - break; - case _stereographic: - tpara = 1; - stereographic_erect(b/2.0, 0.0, &tx, &ty, & tpara); - mp->distance = pn->width/(2.0*tx); - break; - case _trans_mercator: - tpara = 1; - transmercator_erect(b/2.0, 0.0, &tx, &ty, & tpara); - mp->distance = pn->width/(2.0*tx); - break; - case _albersequalareaconic: - mp->distance = 1.0; - //albersequalareaconic_erect(1.924913116, -PI/2.0, &tx, &ty, mp); //b/2.0 - albersequalareaconic_distance(&tx, mp); - mp->distance = pn->width/(2.0*tx); - break; - default: - // unknown - PrintError ("SetInvMakeParams: Unsupported panorama projection"); - // no way to report an error back to the caller... - mp->distance = 1; - } + // dangelo: added mercator, sinusoidal and stereographic projection + switch (pn->format) + { + case _rectilinear: + mp->distance = (double) pn->width / (2.0 * tan(b/2.0)); + break; + case _equirectangular: + case _fisheye_ff: + case _fisheye_circ: + case _panorama: + case _lambert: + case _mercator: + case _millercylindrical: + case _sinusoidal: + case _mirror: + // horizontal pixels per rads + mp->distance = ((double) pn->width) / b; + break; + case _lambertazimuthal: + tpara = 1; + lambertazimuthal_erect(b/2.0, 0.0, &tx, &ty, & tpara); + mp->distance = pn->width/(2.0*tx); + break; + case _panini: + tpara = 1; + panini_erect(b/2.0, 0.0, &tx, &ty, & tpara); + mp->distance = pn->width/(2.0*tx); + break; + case _architectural: + tpara = 1; + arch_erect(b/2.0, 0.0, &tx, &ty, & tpara); + mp->distance = pn->width/(2.0*tx); + break; + case _stereographic: + tpara = 1; + stereographic_erect(b/2.0, 0.0, &tx, &ty, & tpara); + mp->distance = pn->width/(2.0*tx); + break; + case _trans_mercator: + tpara = 1; + transmercator_erect(b/2.0, 0.0, &tx, &ty, & tpara); + mp->distance = pn->width/(2.0*tx); + break; + case _albersequalareaconic: + mp->distance = 1.0; + //albersequalareaconic_erect(1.924913116, -PI/2.0, &tx, &ty, mp); //b/2.0 + albersequalareaconic_distance(&tx, mp); + mp->distance = pn->width/(2.0*tx); + break; + case _equisolid: + mp->distance = (double) pn->width / (4.0 * sin(b/4.0)); + break; + case _orthographic: + mp->distance = (double) pn->width / (2.0 * sin(b/2.0)); + break; + default: + // unknown + PrintError ("SetInvMakeParams: Unsupported panorama projection"); + // no way to report an error back to the caller... + mp->distance = 1; + break; + } - // calculate final scaling factor, that reverses the mp->distance - // scaling and applies the required output scaling factor - switch (im->format) - { - case _rectilinear: - // calculate distance for this projection - mp->scale[0] = (double) im->width / (2.0 * tan(a/2.0)) / mp->distance; - break; - case _equirectangular: - case _panorama: - case _fisheye_ff: - case _fisheye_circ: - case _mercator: - case _sinusoidal: - mp->scale[0] = ((double) im->width) / a / mp->distance; - break; - default: - PrintError ("SetInvMakeParams: Unsupported input image projection"); - // no way to report an error back to the caller... - mp->scale[0] = 1; - } - mp->scale[1] = mp->scale[0]; + // calculate final scaling factor, that reverses the mp->distance + // scaling and applies the required output scaling factor + switch (im->format) + { + case _rectilinear: + // calculate distance for this projection + mp->scale[0] = (double) im->width / (2.0 * tan(a/2.0)) / mp->distance; + break; + case _equirectangular: + case _panorama: + case _fisheye_ff: + case _fisheye_circ: + case _mercator: + case _sinusoidal: + mp->scale[0] = ((double) im->width) / a / mp->distance; + break; + case _equisolid: + case _mirror: + mp->scale[0] = (double) im->width / (4.0 * sin(a/4.0)) / mp->distance; + break; + case _orthographic: + mp->scale[0] = (double) im->width / (2.0 * sin(a/2.0)) / mp->distance; + break; + case _stereographic: + mp->scale[0] = (double) im->width / (4.0 * tan(a/4.0)) / mp->distance; + break; + default: + PrintError ("SetInvMakeParams: Unsupported input image projection"); + // no way to report an error back to the caller... + mp->scale[0] = 1; + break; + } + mp->scale[1] = mp->scale[0]; - /* - if(pn->format == _rectilinear) // rectilinear panorama - { - mp->distance = (double) pn->width / (2.0 * tan(b/2.0)); - if(im->format == _rectilinear) // rectilinear image - { - mp->scale[0] = ((double)pn->hfov / im->hfov) * - (a /(2.0 * tan(a/2.0))) * ((double)im->width/(double) pn->width) - * 2.0 * tan(b/2.0) / b; + mp->shear[0] = -im->cP.shear_x / im->height; + mp->shear[1] = -im->cP.shear_y / im->width; + + mp->scale[0] = 1.0 / mp->scale[0]; + mp->scale[1] = mp->scale[0]; + mp->horizontal = -im->cP.horizontal_params[color]; + mp->vertical = -im->cP.vertical_params[color]; + for(i=0; i<4; i++) + mp->rad[i] = im->cP.radial_params[color][i]; + mp->rad[5] = im->cP.radial_params[color][4]; + + switch( im->cP.correction_mode & 3 ) + { + case correction_mode_radial: mp->rad[4] = ((double)(im->width < im->height ? im->width : im->height) ) / 2.0;break; + case correction_mode_vertical: + case correction_mode_deregister: mp->rad[4] = ((double) im->height) / 2.0;break; + } - } - else // pamoramic or fisheye image - { - mp->scale[0] = ((double)pn->hfov / im->hfov) * ((double)im->width/ (double) pn->width) - * 2.0 * tan(b/2.0) / b; - } - } - else // equirectangular or panoramic - { - mp->distance = ((double) pn->width) / b; - if(im->format == _rectilinear) // rectilinear image - { - mp->scale[0] = ((double)pn->hfov / im->hfov) * (a /(2.0 * tan(a/2.0))) * ((double)im->width)/ ((double) pn->width); + mp->rot[0] = mp->distance * PI; // 180 in screenpoints + mp->rot[1] = im->yaw * mp->distance * PI / 180.0; // rotation angle in screenpoints - } - else // pamoramic or fisheye image - { - mp->scale[0] = ((double)pn->hfov / im->hfov) * ((double)im->width)/ ((double) pn->width); - } - } - */ + mp->perspect[0] = (void*)(mp->mt); + mp->perspect[1] = (void*)&(mp->distance); - mp->shear[0] = -im->cP.shear_x / im->height; - mp->shear[1] = -im->cP.shear_y / im->width; - - mp->scale[0] = 1.0 / mp->scale[0]; - mp->scale[1] = mp->scale[0]; - mp->horizontal = -im->cP.horizontal_params[color]; - mp->vertical = -im->cP.vertical_params[color]; - for(i=0; i<4; i++) - mp->rad[i] = im->cP.radial_params[color][i]; - mp->rad[5] = im->cP.radial_params[color][4]; - - switch( im->cP.correction_mode & 3 ) - { - case correction_mode_radial: mp->rad[4] = ((double)(im->width < im->height ? im->width : im->height) ) / 2.0;break; - case correction_mode_vertical: - case correction_mode_deregister: mp->rad[4] = ((double) im->height) / 2.0;break; - } - mp->rot[0] = mp->distance * PI; // 180 in screenpoints - mp->rot[1] = im->yaw * mp->distance * PI / 180.0; // rotation angle in screenpoints + i = 0; // Stack counter + + // Perform radial correction + if( im->cP.shear ) + { + SetDesc( stack[i],shear, mp->shear ); i++; + } + + if ( im->cP.horizontal ) + { + SetDesc(stack[i],horiz, &(mp->horizontal)); i++; + } + if ( im->cP.vertical) + { + SetDesc(stack[i],vert, &(mp->vertical)); i++; + } + if( im->cP.radial ) + { + switch( im->cP.correction_mode & 3) + { + case correction_mode_radial: SetDesc(stack[i],inv_radial,mp->rad); i++; break; + case correction_mode_vertical: SetDesc(stack[i],inv_vertical,mp->rad); i++; break; + case correction_mode_deregister: break; + } + } + + SetDesc( stack[i], resize, mp->scale ); i++; // Scale image + + if(im->format == _rectilinear) // rectilinear image + { + SetDesc(stack[i], sphere_tp_rect, &(mp->distance) ); i++; // Convert rectilinear to spherical + } + else if (im->format == _panorama) // pamoramic image + { + SetDesc(stack[i], sphere_tp_pano, &(mp->distance) ); i++; // Convert panoramic to spherical + } + else if (im->format == _equirectangular) // equirectangular image + { + SetDesc(stack[i], sphere_tp_erect, &(mp->distance) ); i++; // Convert equirectangular to spherical + } + else if (im->format == _mirror) // Mirror image + { +//todo SetDesc(stack[i], sphere_tp_mirror, &(mp->distance) ); i++; // Convert mirror to spherical + } + else if (im->format == _equisolid) // Fisheye equisolid image + { + SetDesc(stack[i], sphere_tp_equisolid, &(mp->distance) ); i++; // Convert equisolid to spherical + } + else if (im->format == _orthographic) // Fisheye orthographic image + { + SetDesc(stack[i], sphere_tp_orthographic, &(mp->distance) ); i++; // Convert orthographic to spherical + } + else if (im->format == _stereographic) // Fisheye orthographic image + { + //SetDesc(stack[i], sphere_tp_stereographic, &(mp->distance) ); i++; // Convert stereographic to spherical + } - mp->perspect[0] = (void*)(mp->mt); - mp->perspect[1] = (void*)&(mp->distance); + SetDesc( stack[i], persp_sphere, mp->perspect ); i++; // Perspective Control spherical Image + SetDesc( stack[i], erect_sphere_tp, &(mp->distance) ); i++; // Convert spherical image to equirect. + SetDesc( stack[i], rotate_erect, mp->rot ); i++; // Rotate equirect. image horizontally - - - i = 0; // Stack counter - - // Perform radial correction - if( im->cP.shear ) - { - SetDesc( stack[i],shear, mp->shear ); i++; - } - - if ( im->cP.horizontal ) - { - SetDesc(stack[i],horiz, &(mp->horizontal)); i++; - } - if ( im->cP.vertical) - { - SetDesc(stack[i],vert, &(mp->vertical)); i++; - } - if( im->cP.radial ) - { - switch( im->cP.correction_mode & 3) - { - case correction_mode_radial: SetDesc(stack[i],inv_radial,mp->rad); i++; break; - case correction_mode_vertical: SetDesc(stack[i],inv_vertical,mp->rad); i++; break; - case correction_mode_deregister: break; - } - } - - SetDesc( stack[i], resize, mp->scale ); i++; // Scale image - - if(im->format == _rectilinear) // rectilinear image - { - SetDesc(stack[i], sphere_tp_rect, &(mp->distance) ); i++; // - } - else if (im->format == _panorama) // pamoramic image - { - SetDesc(stack[i], sphere_tp_pano, &(mp->distance) ); i++; // Convert panoramic to spherical - } - else if (im->format == _equirectangular) // PSphere image - { - SetDesc(stack[i], sphere_tp_erect, &(mp->distance) ); i++; // Convert Psphere to spherical - } - - - SetDesc( stack[i], persp_sphere, mp->perspect ); i++; // Perspective Control spherical Image - SetDesc( stack[i], erect_sphere_tp, &(mp->distance) ); i++; // Convert spherical image to equirect. - SetDesc( stack[i], rotate_erect, mp->rot ); i++; // Rotate equirect. image horizontally - - if(pn->format == _rectilinear) // rectilinear panorama - { - SetDesc(stack[i], rect_erect, &(mp->distance) ); i++; // Convert rectilinear to spherical - } - else if(pn->format == _panorama) - { - SetDesc(stack[i], pano_erect, &(mp->distance) ); i++; // Convert rectilinear to spherical - } - else if(pn->format == _fisheye_circ || pn->format == _fisheye_ff ) - { - SetDesc(stack[i], sphere_tp_erect, &(mp->distance) ); i++; // Convert rectilinear to spherical - } - else if(pn->format == _mercator) - { - SetDesc(stack[i], mercator_erect, &(mp->distance) ); i++; // Convert sphere to sphere - } - else if(pn->format == _millercylindrical) - { - SetDesc(stack[i], millercylindrical_erect, &(mp->distance) ); i++; // Convert sphere to sphere - } - else if(pn->format == _panini) - { - SetDesc(stack[i], panini_erect, &(mp->distance) ); i++; // Convert panini to sphere - } - else if(pn->format == _architectural) - { - SetDesc(stack[i], arch_erect, &(mp->distance) ); i++; // Convert arch to sphere - } - else if(pn->format == _lambert) - { - SetDesc(stack[i], lambert_erect, &(mp->distance) ); i++; // Convert sphere to lambert - } - else if(pn->format == _lambertazimuthal) - { - SetDesc(stack[i], lambertazimuthal_erect, &(mp->distance) ); i++; // Convert sphere to lambert azimuthal - } - else if(pn->format == _trans_mercator) - { - SetDesc(stack[i], transmercator_erect, &(mp->distance) ); i++; // Convert sphere to transverse mercator - } - else if(pn->format == _stereographic) - { - SetDesc(stack[i], stereographic_erect, &(mp->distance) ); i++; // Convert sphere to stereographic - } - else if(pn->format == _sinusoidal) - { - SetDesc(stack[i], sinusoidal_erect, &(mp->distance) ); i++; // Convert sphere to sinusoidal - } - else if(pn->format == _albersequalareaconic) - { - SetDesc(stack[i], albersequalareaconic_erect, mp ); i++; // Convert sphere to albersequalareaconic - } - else if(pn->format == _equirectangular) - { - // no conversion needed - } else { - PrintError("Projection type %d not supported, using equirectangular", pn->format); - } - - stack[i].func = (trfn)NULL; + if(pn->format == _rectilinear) // rectilinear panorama + { + SetDesc(stack[i], rect_erect, &(mp->distance) ); i++; // Convert equirectangular to rectilinear + } + else if(pn->format == _panorama) + { + SetDesc(stack[i], pano_erect, &(mp->distance) ); i++; // Convert equirectangular to Cylindrical panorama + } + else if(pn->format == _fisheye_circ || pn->format == _fisheye_ff ) + { + SetDesc(stack[i], sphere_tp_erect, &(mp->distance) ); i++; // Convert equirectangular to spherical + } + else if(pn->format == _mercator) + { + SetDesc(stack[i], mercator_erect, &(mp->distance) ); i++; // Convert equirectangular to mercator + } + else if(pn->format == _millercylindrical) + { + SetDesc(stack[i], millercylindrical_erect, &(mp->distance) ); i++; // Convert equirectangular to miller cylindrical + } + else if(pn->format == _panini) + { + SetDesc(stack[i], panini_erect, &(mp->distance) ); i++; // Convert panini to sphere + } + else if(pn->format == _architectural) + { + SetDesc(stack[i], arch_erect, &(mp->distance) ); i++; // Convert arch to sphere + } + else if(pn->format == _lambert) + { + SetDesc(stack[i], lambert_erect, &(mp->distance) ); i++; // Convert equirectangular to lambert + } + else if(pn->format == _lambertazimuthal) + { + SetDesc(stack[i], lambertazimuthal_erect, &(mp->distance) ); i++; // Convert equirectangular to lambert azimuthal + } + else if(pn->format == _trans_mercator) + { + SetDesc(stack[i], transmercator_erect, &(mp->distance) ); i++; // Convert equirectangular to transverse mercator + } + else if(pn->format == _mirror) + { + SetDesc(stack[i], mirror_erect, &(mp->distance) ); i++; // Convert equirectangular to mirror + } + else if(pn->format == _stereographic) + { + SetDesc(stack[i], stereographic_erect, &(mp->distance) ); i++; // Convert equirectangular to stereographic + } + else if(pn->format == _sinusoidal) + { + SetDesc(stack[i], sinusoidal_erect, &(mp->distance) ); i++; // Convert equirectangular to sinusoidal + } + else if(pn->format == _albersequalareaconic) + { + SetDesc(stack[i], albersequalareaconic_erect, mp ); i++; // Convert equirectangular to albersequalareaconic + } + else if(pn->format == _equisolid ) + { + SetDesc(stack[i], sphere_tp_erect, &(mp->distance) ); i++; // Convert equirectangular to spherical + SetDesc(stack[i], equisolid_sphere_tp, &(mp->distance) ); i++; // Convert spherical to equisolid + } + else if(pn->format == _orthographic ) + { + SetDesc(stack[i], sphere_tp_erect, &(mp->distance) ); i++; // Convert equirectangular to spherical + SetDesc(stack[i], orthographic_sphere_tp, &(mp->distance) ); i++; // Convert spherical to orthographic + } + else if(pn->format == _equirectangular) + { + // no conversion needed + } + else + { + PrintError("Projection type %d not supported, using equirectangular", pn->format); + } + + stack[i].func = (trfn)NULL; } -void SetInvMakeParamsCorrect( struct fDesc *stack, struct MakeParams *mp, Image *im , Image *pn, int color ) +void SetInvMakeParamsCorrect( struct fDesc *stack, struct MakeParams *mp, Image *im , Image *pn, int color ) { /* Thomas Rauscher, Sep 2005: Transfered the changes of Joost Nieuwenhuijse for MakeParams to the inverse function. This has broken the optimizer, now there are two functions. */ - Image imSel; /* create a tempory copy of the image to manipulate */ - memcpy( &imSel, im, sizeof(Image)); + Image imSel; /* create a tempory copy of the image to manipulate */ + memcpy( &imSel, im, sizeof(Image)); - if(im->cP.horizontal) + if(im->cP.horizontal) { mp->horizontal = im->cP.horizontal_params[color]; } @@ -2569,7 +2616,7 @@ "Image height must be positive", "Field of View must be positive", "Field of View must be smaller than 180 degrees in rectilinear Images", - "Unsupported Image Format (must be 0,1,2,3 or 4)", + "Unsupported Image Format (must be 0,1,2,3,4,7,8,10,14 or 19)", "Panorama Width must be positive", "Panorama Height must be positive", "Field of View must be smaller than 180 degrees in rectilinear Panos", @@ -2590,9 +2637,12 @@ if( g->im[i].height <= 0 ) err = 4; if( g->im[i].hfov <= 0.0 ) err = 5; if( g->im[i].format == _rectilinear && g->im[i].hfov >= 180.0 ) err = 6; - if( g->im[i].format != _rectilinear && g->im[i].format != _panorama && - g->im[i].format != _fisheye_circ && g->im[i].format != _fisheye_ff && g->im[i].format != _equirectangular) - err = 7; + if( g->im[i].format != _rectilinear && g->im[i].format != _panorama && + g->im[i].format != _fisheye_circ && g->im[i].format != _fisheye_ff && + g->im[i].format != _equirectangular && g->im[i].format != _orthographic && + g->im[i].format != _mirror && g->im[i].format != _stereographic && + g->im[i].format != _equisolid) + err = 7; } // Check Panorama specs @@ -2603,13 +2653,12 @@ if( g->pano.format == _rectilinear && g->pano.hfov >= 180.0 ) err = 10; - if( g->pano.format != _rectilinear && g->pano.format != _panorama && - g->pano.format != _equirectangular && g->pano.format != _fisheye_ff && - g->pano.format != _stereographic && g->pano.format != _mercator && - g->pano.format != _trans_mercator && g->pano.format != _sinusoidal && - g->pano.format != _lambert && g->pano.format != _lambertazimuthal && - g->pano.format != _albersequalareaconic - ) + if( g->pano.format != _rectilinear && g->pano.format != _panorama && + g->pano.format != _equirectangular && g->pano.format != _fisheye_ff && + g->pano.format != _stereographic && g->pano.format != _mercator && + g->pano.format != _trans_mercator && g->pano.format != _sinusoidal && + g->pano.format != _lambert && g->pano.format != _lambertazimuthal && + g->pano.format != _albersequalareaconic) err=11; // Check Control Points Modified: trunk/libpano/doc/Optimize.txt =================================================================== --- trunk/libpano/doc/Optimize.txt 2008-12-31 05:25:43 UTC (rev 917) +++ trunk/libpano/doc/Optimize.txt 2008-12-31 05:59:23 UTC (rev 918) @@ -20,17 +20,22 @@ # w1000 width in pixels # h600 height in pixels (default: width/2) # f0 projection format, -# 0 - rectilinear (for printing and viewing) +# 0 - Rectilinear (for printing and viewing) # 1 - Cylindrical (for Printing and QTVR) # 2 - Equirectangular ( for Spherical panos), default -# 3 - full-frame fisheye -# 4 - stereographic -# 5 - mercator -# 6 - transverse mercator -# 7 - sinusoidal +# 3 - Fisheye Equidistance full-frame +# 4 - Fisheye Stereographic full-frame +# 5 - Mercator +# 6 - Transverse Mercator +# 7 - Sinusoidal # 8 - Lambert Equal Area Cylindrical # 9 - Lambert Azimuthal # 10 - Albers Equal Area Conical +# 11 - Miller Cylindrical +# 12 - Panini (for wide angle printing and viewing) +# 13 - Architectural (combines Miller Cylindrical and Lambert Azimuthal) +# 14 - Fisheye Orthographic full-frame +# 15 - Fisheye Equisolid full-frame # # P"p1 p2 ..." Optional parameters for some projections # @@ -101,13 +106,16 @@ # set here and the optimizer will automaticaly add them to the o lines # ---------------- # f0 projection format, -# 0 - rectilinear (normal lenses) -# 1 - Panoramic (Scanning cameras like Noblex) -# 2 - Circular fisheye -# 3 - full-frame fisheye -# 4 - PSphere (equirectangular) -# 8 - Orthographic. This is only allowed in PTStereo and -# for the first image. This indicates a map or ground plan. +# 0 - Rectilinear (normal lenses) +# 1 - Panoramic (Scanning cameras like Noblex) +# 2 - Fisheye Equidistance Circular +# 3 - Fisheye Equidistance full-frame +# 4 - Equirectangular (Spherical panos) +# 7 - Mirror +# 8 - Fisheye Orthographic (This is only allowed in PTStereo and +# for the first image. This indicates a map or ground plan) +# 10 - Fisheye Stereographic +# 19 - Fisheye Equisolid # w600 width in pixels # h1000 height in pixels # v82 horizontal field of view of image (required, but ignored for f8) Modified: trunk/libpano/doc/stitch.txt =================================================================== --- trunk/libpano/doc/stitch.txt 2008-12-31 05:25:43 UTC (rev 917) +++ trunk/libpano/doc/stitch.txt 2008-12-31 05:59:23 UTC (rev 918) @@ -19,17 +19,23 @@ # w1000 width in pixels # h600 height in pixels (default: width/2) # f0 projection format, -# 0 - rectilinear (for printing and viewing) +# 0 - Rectilinear (for printing and viewing) # 1 - Cylindrical (for Printing and QTVR) # 2 - Equirectangular ( for Spherical panos), default -# 3 - full-frame fisheye -# 4 - stereographic -# 5 - mercator -# 6 - transverse mercator -# 7 - sinusoidal +# 3 - Fisheye Equidistance full-frame +# 4 - Fisheye Stereographic full-frame +# 5 - Mercator +# 6 - Transverse Mercator +# 7 - Sinusoidal # 8 - Lambert Equal Area Cylindrical # 9 - Lambert Azimuthal # 10 - Albers Equal Area Conical +# 11 - Miller Cylindrical +# 12 - Panini (for wide angle printing and viewing) +# 13 - Architectural (combines Miller Cylindrical and Lambert Azimuthal) +# 14 - Fisheye Orthographic full-frame +# 15 - Fisheye Equisolid full-frame + # # P"p1 p2 ..." Optional parameters for some projections # @@ -94,11 +100,16 @@ # The 'o' lines describe input images. One line per image is required # The width and height of the image is obtained from image # f0 projection format, -# 0 - rectilinear (normal lenses) +# 0 - Rectilinear (normal lenses) # 1 - Panoramic (Scanning cameras like Noblex) -# 2 - Circular fisheye -# 3 - full-frame fisheye -# 4 - PSphere, equirectangular +# 2 - Fisheye Equidistance Circular +# 3 - Fisheye Equidistance full-frame +# 4 - Equirectangular (Spherical panos) +# 7 - Mirror +# 8 - Fisheye Orthographic (This is only allowed in PTStereo and +# for the first image. This indicates a map or ground plan) +# 10 - Fisheye Stereographic +# 19 - Fisheye Equisolid # v82 horizontal field of view of image (required) # y0 yaw angle (required) # p43 pitch angle (required) Modified: trunk/libpano/filter.h =================================================================== --- trunk/libpano/filter.h 2008-12-31 05:25:43 UTC (rev 917) +++ trunk/libpano/filter.h 2008-12-31 05:59:23 UTC (rev 918) @@ -859,9 +859,15 @@ int mirror_sphere_cp ( double x_dest,double y_dest, double* x_src, double* y_src, void* params ); int mirror_pano ( double x_dest,double y_dest, double* x_src, double* y_src, void* params ); int sphere_cp_mirror ( double x_dest,double y_dest, double* x_src, double* y_src, void* params ); + int sphere_tp_pano ( double x_dest,double y_dest, double* x_src, double* y_src, void* params ); - int pano_sphere_tp ( double x_dest,double y_dest, double* x_src, double* y_src, void* params ); +//int sphere_tp_mirror( double x_dest,double y_dest, double* x_src, double* y_src, void* params); +//int mirror_sphere_tp( double x_dest,double y_dest, double* x_src, double* y_src, void* params); +int sphere_tp_equisolid( double x_dest,double y_dest, double* x_src, double* y_src, void* params); +int equisolid_sphere_tp( double x_dest,double y_dest, double* x_src, double* y_src, void* params); +int sphere_tp_orthographic( double x_dest,double y_dest, double* x_src, double* y_src, void* params); +int orthographic_sphere_tp( double x_dest,double y_dest, double* x_src, double* y_src, void* params); int rotate_erect ( double x_dest, double y_dest, double* x_src, double* y_src, void* params ); int inv_radial ( double x_dest, double y_dest, double* x_src, double* y_src, void* params ); Modified: trunk/libpano/math.c =================================================================== --- trunk/libpano/math.c 2008-12-31 05:25:43 UTC (rev 917) +++ trunk/libpano/math.c 2008-12-31 05:59:23 UTC (rev 918) @@ -658,7 +658,6 @@ *x_src = distanceparam * atan2( x * sin(c), (ro * cos(c))); return 1; - } @@ -749,13 +748,13 @@ // params: distanceparam // this is the inverse - double phi, lambdaHalf; + double phi, lambdaHalf, temp; phi = y_dest/distanceparam; lambdaHalf = x_dest/ (distanceparam*2); *x_src = distanceparam * 2 * tan (lambdaHalf); - double temp = cos(lambdaHalf); + temp = cos(lambdaHalf); *y_src = distanceparam * phi / (temp * temp); return 1; @@ -767,7 +766,6 @@ { double y; double x; - double lambdaHalf; double temp; double phi; @@ -1233,6 +1231,7 @@ return 1; } + int sphere_tp_erect( double x_dest,double y_dest, double* x_src, double* y_src, void* params) { // params: double distanceparam @@ -1279,6 +1278,7 @@ return 1; } + int erect_sphere_cp( double x_dest,double y_dest, double* x_src, double* y_src, void* params) { // params: double distanceparam, double b @@ -1300,6 +1300,7 @@ return 1; } + int rect_sphere_tp( double x_dest,double y_dest, double* x_src, double* y_src, void* params) { // params: double distanceparam @@ -1332,6 +1333,7 @@ return 1; } + int sphere_tp_rect( double x_dest,double y_dest, double* x_src, double* y_src, void* params) { // params: double distanceparam @@ -1356,6 +1358,7 @@ return 1; } + int sphere_tp_pano( double x_dest,double y_dest, double* x_src, double* y_src, void* params) { // params: double distanceparam @@ -1394,6 +1397,7 @@ return 1; } + int pano_sphere_tp( double x_dest,double y_dest, double* x_src, double* y_src, void* params) { // params: double distanceparam @@ -1448,6 +1452,7 @@ return 1; } + int erect_rect( double x_dest,double y_dest, double* x_src, double* y_src, void* params) { // params: double distanceparam @@ -1515,6 +1520,7 @@ return 1; } + int mirror_sphere_cp( double x_dest,double y_dest, double* x_src, double* y_src, void* params) { // params: double distanceparam, double b @@ -1531,6 +1537,7 @@ return 1; } + int mirror_erect( double x_dest,double y_dest, double* x_src, double* y_src, void* params) { // params: double distanceparam, double b, double b2 @@ -1547,6 +1554,7 @@ return 1; } + int mirror_pano( double x_dest,double y_dest, double* x_src, double* y_src, void* params) { // params: double distanceparam, double b @@ -1564,6 +1572,7 @@ return 1; } + int sphere_cp_mirror( double x_dest,double y_dest, double* x_src, double* y_src, void* params) { // params: double distanceparam, double b @@ -1580,7 +1589,84 @@ return 1; } +/* +int sphere_tp_mirror( double x_dest,double y_dest, double* x_src, double* y_src, void* params); +{ + return 1; +} +int mirror_sphere_tp( double x_dest,double y_dest, double* x_src, double* y_src, void* params); +{ + return 1; +} +*/ + +int sphere_tp_equisolid( double x_dest,double y_dest, double* x_src, double* y_src, void* params) +{ + // params: double distance + + register double phi, theta, rho; + + rho = sqrt( x_dest*x_dest + y_dest*y_dest ); + + theta = 2.0 * asin( rho/(2.0*((double*)params)[0]) ); + phi = atan2( y_dest , x_dest ); + + *x_src = ((double*)params)[0] * theta * cos( phi ); + *y_src = ((double*)params)[0] * theta * sin( phi ); + return 1; +} + + +int equisolid_sphere_tp( double x_dest,double y_dest, double* x_src, double* y_src, void* params) +{ + // params: double distance + + register double rho, phi, theta; + + theta = sqrt( x_dest * x_dest + y_dest * y_dest ) / ((double*)params)[0]; + phi = atan2( y_dest , x_dest ); + + rho = 2.0 * ((double*)params)[0] * sin( theta / 2.0 ); + + *x_src = rho * cos( phi ); + *y_src = rho * sin( phi ); + return 1; +} + +int sphere_tp_orthographic( double x_dest,double y_dest, double* x_src, double* y_src, void* params) +{ + // params: double distance + + register double phi, theta, rho; + + rho = sqrt( x_dest*x_dest + y_dest*y_dest ); + + theta = 1.0 * asin( rho/(1.0*((double*)params)[0]) ); + phi = atan2( y_dest , x_dest ); + + *x_src = ((double*)params)[0] * theta * cos( phi ); + *y_src = ((double*)params)[0] * theta * sin( phi ); + return 1; +} + + +int orthographic_sphere_tp( double x_dest,double y_dest, double* x_src, double* y_src, void* params) +{ + // params: double distance + + register double rho, phi, theta; + + theta = sqrt( x_dest * x_dest + y_dest * y_dest ) / ((double*)params)[0]; + phi = atan2( y_dest , x_dest ); + + rho = 1.0 * ((double*)params)[0] * sin( theta / 1.0 ); + + *x_src = rho * cos( phi ); + *y_src = rho * sin( phi ); + return 1; +} + int shift_scale_rotate( double x_dest,double y_dest, double* x_src, double* y_src, void* params){ // params: double shift_x, shift_y, scale, cos_phi, sin_phi @@ -1596,14 +1682,6 @@ - - - - - - - - // Correct radial luminance change using parabel unsigned char radlum( unsigned char srcPixel, int xc, int yc, void *params ) Modified: trunk/libpano/panorama.h =================================================================== --- trunk/libpano/panorama.h 2008-12-31 05:25:43 UTC (rev 917) +++ trunk/libpano/panorama.h 2008-12-31 05:59:23 UTC (rev 918) @@ -232,23 +232,24 @@ _fremoveBlurr, _nf_internal, _nf_custom, - _fresize + _fresize, + _flogtransform }; enum { // Enumerates for Image.format - _rectilinear = 0, - _panorama = 1, - _fisheye_circ = 2, - _fisheye_ff = 3, + _rectilinear = 0, // (Standand) FOV (rectilinear) = 2 * arctan (frame size/(focal length * 2)) + _panorama = 1, // Cylindrical + _fisheye_circ = 2, // fisheye-equidistance Circular + _fisheye_ff = 3, // fisheye-equidistance Full Frame _equirectangular = 4, - _spherical_cp = 5, - _spherical_tp = 6, - _mirror = 7, - _orthographic = 8, + _spherical_cp = 5, ... [truncated message content] |
From: <dm...@us...> - 2009-01-03 07:23:03
|
Revision: 921 http://panotools.svn.sourceforge.net/panotools/?rev=921&view=rev Author: dmg Date: 2009-01-03 07:22:57 +0000 (Sat, 03 Jan 2009) Log Message: ----------- 2009-01-02 dmg <dmg@phosphorus> * * adjust.c, filter.h, math.c, panorama.h, parser.c & queryfeateature.c: Fixed the panini (or should we call it pannini) and renamed previous projection as equirectangular panini. It might have to change its name Modified Paths: -------------- trunk/libpano/ChangeLog trunk/libpano/adjust.c trunk/libpano/filter.h trunk/libpano/math.c trunk/libpano/panorama.h trunk/libpano/parser.c trunk/libpano/queryfeature.c Modified: trunk/libpano/ChangeLog =================================================================== --- trunk/libpano/ChangeLog 2008-12-31 22:47:41 UTC (rev 920) +++ trunk/libpano/ChangeLog 2009-01-03 07:22:57 UTC (rev 921) @@ -1,3 +1,13 @@ +2009-01-02 dmg <dmg@phosphorus> + + * * adjust.c, filter.h, math.c, panorama.h, parser.c & + queryfeateature.c: + + Fixed the panini (or should we call it pannini) and renamed + previous projection as equirectangular panini. It might have to + change its name + + 2008-01-26 Jim Watters <jwa...@ph...> * adjust.c, filter.h, math.c, panorama.h, parser.c & queryfeateature.c Modified: trunk/libpano/adjust.c =================================================================== --- trunk/libpano/adjust.c 2008-12-31 22:47:41 UTC (rev 920) +++ trunk/libpano/adjust.c 2009-01-03 07:22:57 UTC (rev 921) @@ -694,6 +694,11 @@ panini_erect(b/2.0, 0.0, &tx, &ty, & tpara); mp->distance = pn->width/(2.0*tx); break; + case _equipanini: + tpara = 1; + equipanini_erect(b/2.0, 0.0, &tx, &ty, & tpara); + mp->distance = pn->width/(2.0*tx); + break; case _architectural: tpara = 1; arch_erect(b/2.0, 0.0, &tx, &ty, & tpara); @@ -841,6 +846,10 @@ { SetDesc(stack[i], erect_panini, &(mp->distance) ); i++; // Convert panini to sphere } + else if(pn->format == _equipanini) + { + SetDesc(stack[i], erect_equipanini, &(mp->distance) ); i++; // Convert equipanini to sphere + } else if(pn->format == _architectural) { SetDesc(stack[i], erect_arch, &(mp->distance) ); i++; // Convert arch to sphere @@ -1022,6 +1031,11 @@ panini_erect(b/2.0, 0.0, &tx, &ty, & tpara); mp->distance = pn->width/(2.0*tx); break; + case _equipanini: + tpara = 1; + equipanini_erect(b/2.0, 0.0, &tx, &ty, & tpara); + mp->distance = pn->width/(2.0*tx); + break; case _architectural: tpara = 1; arch_erect(b/2.0, 0.0, &tx, &ty, & tpara); @@ -1202,6 +1216,10 @@ { SetDesc(stack[i], panini_erect, &(mp->distance) ); i++; // Convert panini to sphere } + else if(pn->format == _equipanini) + { + SetDesc(stack[i], equipanini_erect, &(mp->distance) ); i++; // Convert panini to sphere + } else if(pn->format == _architectural) { SetDesc(stack[i], arch_erect, &(mp->distance) ); i++; // Convert arch to sphere Modified: trunk/libpano/filter.h =================================================================== --- trunk/libpano/filter.h 2008-12-31 22:47:41 UTC (rev 920) +++ trunk/libpano/filter.h 2009-01-03 07:22:57 UTC (rev 921) @@ -851,6 +851,8 @@ int erect_millercylindrical ( double x_dest,double y_dest, double* x_src, double* y_src, void* params ); int panini_erect ( double x_dest,double y_dest, double* x_src, double* y_src, void* params ); int erect_panini ( double x_dest,double y_dest, double* x_src, double* y_src, void* params ); +int equipanini_erect ( double x_dest,double y_dest, double* x_src, double* y_src, void* params ); +int erect_equipanini ( double x_dest,double y_dest, double* x_src, double* y_src, void* params ); int arch_erect ( double x_dest,double y_dest, double* x_src, double* y_src, void* params ); int erect_arch ( double x_dest,double y_dest, double* x_src, double* y_src, void* params ); Modified: trunk/libpano/math.c =================================================================== --- trunk/libpano/math.c 2008-12-31 22:47:41 UTC (rev 920) +++ trunk/libpano/math.c 2009-01-03 07:22:57 UTC (rev 921) @@ -748,14 +748,23 @@ // params: distanceparam // this is the inverse - double phi, lambdaHalf, temp; + double phi, lambdaHalf, temp,y,x; phi = y_dest/distanceparam; lambdaHalf = x_dest/ (distanceparam*2); + x = 2 * tan (lambdaHalf); - *x_src = distanceparam * 2 * tan (lambdaHalf); + // Conver from central cylindrical + phi = tan(phi); + + *x_src = distanceparam * x; temp = cos(lambdaHalf); - *y_src = distanceparam * phi / (temp * temp); + + y = tan(phi) / (temp * temp); + + // At this point we have mapped to central cylindrical, now to equirectangular + + *y_src = distanceparam * y; return 1; } @@ -768,14 +777,72 @@ double x; double temp; + double lambda; + double phi; y = y_dest/distanceparam; x = x_dest/distanceparam; + lambda = atan(x/2); + + // then project from opposite edge of the cylinder + temp = cos(lambda); + phi = y * temp * temp; - temp = cos(x/2); + // First convert to central cylindrical + phi = atan( phi); + + *x_src = 2 * lambda * distanceparam; + *y_src = phi * distanceparam; + + return 1; +} + + + +/** convert from erect to equi panini */ +int equipanini_erect( double x_dest,double y_dest, double* x_src, double* y_src, void* params) +{ + // params: distanceparam + // this is the inverse + + double phi, lambdaHalf, temp,y,x; + + phi = y_dest/distanceparam; + lambdaHalf = x_dest/ (distanceparam*2); + x = 2 * tan (lambdaHalf); + + *x_src = distanceparam * x; + temp = cos(lambdaHalf); + + y = tan(phi) / (temp * temp); + + // At this point we have mapped to central cylindrical, now to equirectangular + + *y_src = distanceparam * y; + + return 1; +} + + +/** convert from equi panini to erect */ +int erect_equipanini( double x_dest,double y_dest, double* x_src, double* y_src, void* params) +{ + double y; + double x; + double temp; + + double lambda; + + double phi; + y = y_dest/distanceparam; + x = x_dest/distanceparam; + lambda = atan(x/2); + + // then project from opposite edge of the cylinder + temp = cos(lambda); phi = y * temp * temp; - *x_src = 2 * atan2(x,2) * distanceparam; + *x_src = 2 * lambda * distanceparam; *y_src = phi * distanceparam; return 1; Modified: trunk/libpano/panorama.h =================================================================== --- trunk/libpano/panorama.h 2008-12-31 22:47:41 UTC (rev 920) +++ trunk/libpano/panorama.h 2009-01-03 07:22:57 UTC (rev 921) @@ -261,6 +261,7 @@ _panini = 19, _architectural = 20, _equisolid = 21, // fisheye-equisolid FOV (equisolid fisheye) = 4 * arcsin (frame size/(focal length * 4)) + _equipanini = 22, }; enum @@ -281,9 +282,10 @@ PANO_FORMAT_ARCHITECTURAL = 13, PANO_FORMAT_ORTHOGRAPHIC = 14, PANO_FORMAT_EQUISOLID = 15, + PANO_FORMAT_EQUI_PANINI = 16, }; -#define PANO_FORMAT_COUNT 16 +#define PANO_FORMAT_COUNT 17 enum { // Enumerates external number of image f<index> Modified: trunk/libpano/parser.c =================================================================== --- trunk/libpano/parser.c 2008-12-31 22:47:41 UTC (rev 920) +++ trunk/libpano/parser.c 2009-01-03 07:22:57 UTC (rev 921) @@ -498,6 +498,9 @@ case PANO_FORMAT_PANINI: gl->pano.format = _panini; break; + case PANO_FORMAT_EQUI_PANINI: + gl->pano.format = _equipanini; + break; case PANO_FORMAT_ARCHITECTURAL: gl->pano.format = _architectural; break; @@ -661,6 +664,7 @@ case _albersequalareaconic: format = PANO_FORMAT_ALBERS_EQUAL_AREA_CONIC; break; case _millercylindrical: format = PANO_FORMAT_MILLER_CYLINDRICAL; break; case _panini: format = PANO_FORMAT_PANINI; break; + case _equipanini: format = PANO_FORMAT_EQUI_PANINI; break; case _architectural: format = PANO_FORMAT_ARCHITECTURAL; break; case _orthographic: format = PANO_FORMAT_ORTHOGRAPHIC; break; case _equisolid: format = PANO_FORMAT_EQUISOLID; break; @@ -1015,6 +1019,9 @@ case PANO_FORMAT_PANINI: p->pano.format = _panini; break; + case PANO_FORMAT_EQUI_PANINI: + p->pano.format = _equipanini; + break; case PANO_FORMAT_ARCHITECTURAL: p->pano.format = _architectural; break; Modified: trunk/libpano/queryfeature.c =================================================================== --- trunk/libpano/queryfeature.c 2008-12-31 22:47:41 UTC (rev 920) +++ trunk/libpano/queryfeature.c 2009-01-03 07:22:57 UTC (rev 921) @@ -93,7 +93,10 @@ {"PanoType13","Architectural"}, {"PanoType14","Orthographic"}, {"PanoType15","Equisolid"}, + {"PanoType16","Equirectangular Panini"}, + // Filter Types + // fix: Fixed Windowsize // aa: Antialiasing filter with adaptive filter size // Filter Names @@ -334,6 +337,7 @@ "Architectural", "Orthographic", "Equisolid", + "Equirectangular Panini", }; static int panoFormatID[PANO_FORMAT_COUNT] = { @@ -353,8 +357,10 @@ _architectural, _orthographic, _equisolid, + _equipanini, }; + int panoProjectionFormatCount(void) { // REturn the number of Projection formats available in the library @@ -401,6 +407,10 @@ features->maxVFOV = 179; features->maxHFOV = 230; break; + case PANO_FORMAT_EQUI_PANINI: + features->maxVFOV = 179; + features->maxHFOV = 230; + break; case PANO_FORMAT_FISHEYE_FF: case PANO_FORMAT_ORTHOGRAPHIC: case PANO_FORMAT_EQUISOLID: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bru...@us...> - 2009-01-17 22:46:40
|
Revision: 924 http://panotools.svn.sourceforge.net/panotools/?rev=924&view=rev Author: brunopostle Date: 2009-01-17 22:35:41 +0000 (Sat, 17 Jan 2009) Log Message: ----------- fix reverse calculation for pannini (Thomas Modes) Modified Paths: -------------- trunk/libpano/ChangeLog trunk/libpano/math.c Modified: trunk/libpano/ChangeLog =================================================================== --- trunk/libpano/ChangeLog 2009-01-08 23:47:30 UTC (rev 923) +++ trunk/libpano/ChangeLog 2009-01-17 22:35:41 UTC (rev 924) @@ -1,3 +1,7 @@ +2009-01-17 Thomas Modes + + * match.c: fix reverse calculation for pannini + 2009-01-02 dmg <dmg@phosphorus> * * adjust.c, filter.h, math.c, panorama.h, parser.c & Modified: trunk/libpano/math.c =================================================================== --- trunk/libpano/math.c 2009-01-08 23:47:30 UTC (rev 923) +++ trunk/libpano/math.c 2009-01-17 22:35:41 UTC (rev 924) @@ -792,7 +792,7 @@ phi = atan( phi); *x_src = 2 * lambda * distanceparam; - *y_src = phi * distanceparam; + *y_src = atan(phi) * distanceparam; return 1; } @@ -843,7 +843,7 @@ phi = y * temp * temp; *x_src = 2 * lambda * distanceparam; - *y_src = phi * distanceparam; + *y_src = atan(phi) * distanceparam; return 1; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bru...@us...> - 2009-02-01 17:59:36
|
Revision: 927 http://panotools.svn.sourceforge.net/panotools/?rev=927&view=rev Author: brunopostle Date: 2009-02-01 17:59:30 +0000 (Sun, 01 Feb 2009) Log Message: ----------- Remove GPL incompatible files (bug #1861841), this removes mac classic support and hopefully doesn't break anything in OS X. Modified Paths: -------------- trunk/libpano/Makefile.am Removed Paths: ------------- trunk/libpano/PixMap.c trunk/libpano/PixMap.h trunk/libpano/README.mac trunk/libpano/makefile.mac trunk/libpano/pict.c Modified: trunk/libpano/Makefile.am =================================================================== --- trunk/libpano/Makefile.am 2009-02-01 17:37:06 UTC (rev 926) +++ trunk/libpano/Makefile.am 2009-02-01 17:59:30 UTC (rev 927) @@ -53,8 +53,8 @@ endif if HAVE_MAC -MAC_SRC = PixMap.c pict.c shell_mac.c sys_mac.c ppm.c -MAC_HDR = PixMap.h +MAC_SRC = shell_mac.c sys_mac.c ppm.c +MAC_HDR = install-exec-hook: @true @@ -102,11 +102,11 @@ rm -rf `find $(distdir) -name CVS` rm -rf `find $(distdir) -name .cvsignore` -EXTRA_DIST = gpl.txt README.linux README.windows README.mac \ - makefile.linux makefile.mac makefile.win32 \ +EXTRA_DIST = gpl.txt README.linux README.windows \ + makefile.linux makefile.win32 \ bootstrap filter.r libpano13.def pano13.rc \ - seamer_.c sys_X11.c sys_win.c bmp.c PixMap.c pict.c shell_mac.c \ - sys_mac.c ppm.c PixMap.h sys_ansi.c ppm.c ZComb.h adjust.h \ + seamer_.c sys_X11.c sys_win.c bmp.c shell_mac.c \ + sys_mac.c ppm.c sys_ansi.c ppm.c ZComb.h adjust.h \ pano13vc.def libpano.vcproj PanoTools.pbproj.tgz MAINTAINERCLEANFILES = \ Deleted: trunk/libpano/PixMap.c =================================================================== --- trunk/libpano/PixMap.c 2009-02-01 17:37:06 UTC (rev 926) +++ trunk/libpano/PixMap.c 2009-02-01 17:59:30 UTC (rev 927) @@ -1,1137 +0,0 @@ -/* File PixMap.c - PixMap manipulation routines, implementation. - Copyright (c) 1996, 1997 by John Montbriand. All Rights Reserved. - Permission hereby granted for public use. - Distribute freely in areas where the laws of copyright apply. - USE AT YOUR OWN RISK. - DO NOT DISTRIBUTE MODIFIED COPIES. - Comments/questions/postcards* to the author at the address: - John Montbriand - P.O. Box. 1133 - Saskatoon Saskatchewan Canada - S7K 3N2 - or by email at: - tin...@sk... - *if you mail a postcard, then I will provide you with technical support - regarding questions you may have about this file. - -*/ - - -#include "PixMap.h" -#include <Memory.h> -//#include <OSUtils.h> //commented by Kekus Digital -//#include <ToolUtils.h> //commented by Kekus Digital -//#include <FixMath.h> //commented by Kekus Digital -#include <Math.h> -//#include <Gestalt.h> //commented by Kekus Digital -//#include <ImageCompression.h> //commented by Kekus Digital -//#include <PictUtils.h> //commented by Kekus Digital -#include <QuickTime/ImageCompression.h> //added by Kekus Digital -#include <String.h> - - -PixMapHandle MakePixMap(short width, short height, CTabHandle clut) { - long row_bytes, depth; - Ptr raster_data; - long bytecount; - CTabHandle colours; - PixMapHandle newpix; - PixMapPtr pixptr; - - /* calculate required depth */ - if (clut == NULL) - depth = 8; - else if ((*clut)->ctSize < 2) - depth = 1; - else if ((*clut)->ctSize < 4) - depth = 2; - else if ((*clut)->ctSize < 16) - depth = 4; - else depth = 8; - - /* set up initial values for locals */ - row_bytes = ((depth * ((long) width) + 31) >> 5) << 2; - bytecount = row_bytes * ((long) height); - colours = NULL; - raster_data = NULL; - newpix = NULL; - - /* check for valid rowbytes */ - if (row_bytes > 0x00003FFF) goto bail; - - /* allocate the raster data */ - raster_data = NewPtrClear(bytecount); - if (raster_data == NULL) goto bail; - - /* copy the colour table */ - if (clut == NULL) { - colours = GetCTable(8); - if (colours == NULL) goto bail; - } else { - colours = clut; - if (HandToHand((Handle*) &colours) != noErr) { - colours = NULL; - goto bail; - } - } - /* create the pixmap handle */ - newpix = (PixMapHandle) NewHandleClear(sizeof(PixMap)); - if (newpix == NULL) goto bail; - - /* set up the pixmap fields */ - pixptr = *newpix; - pixptr->baseAddr = raster_data; - pixptr->rowBytes = (row_bytes | 0x8000); - pixptr->bounds.right = width; - pixptr->bounds.bottom = height; - pixptr->hRes = 0x00480000; /* resolution = 72 dots per inch */ - pixptr->vRes = 0x00480000; - pixptr->pixelSize = depth; - pixptr->cmpCount = 1; - pixptr->cmpSize = depth; - pixptr->pmTable = colours; - - /* done */ - return newpix; - -bail: - if (raster_data != NULL) DisposePtr(raster_data); - if (newpix != NULL) DisposeHandle((Handle) newpix); - if (colours != NULL) DisposeHandle((Handle) colours); - return NULL; -} - -PixMapHandle Make16BitPixMap(short width, short height) { - long row_bytes; - Ptr raster_data; - long bytecount, response; - CTabHandle colours; - PixMapHandle newpix; - PixMapPtr pixptr; - unsigned char *rowptr; - unsigned short *pixelptr; - short y, x; - - /* is it possible? */ - if (Gestalt(gestaltQuickdrawVersion, &response) != noErr) response = 0; - if (response < gestalt32BitQD) return NULL; - - /* set up initial values for locals */ - row_bytes = ((16 * ((long) width) + 31) >> 5) << 2; - bytecount = row_bytes * ((long) height); - colours = NULL; - raster_data = NULL; - newpix = NULL; - - /* check for valid rowbytes */ - if (row_bytes > 0x00003FFF) goto bail; - - /* allocate the raster data */ - raster_data = NewPtr(bytecount); - if (raster_data == NULL) goto bail; - rowptr = (unsigned char *) raster_data; - for (y=0; y< height; y++, rowptr += row_bytes) - for (pixelptr = (unsigned short *) rowptr, x=0; x<width; x++) - *pixelptr++ = 0x7FFF; - - /* dummy colour table */ - colours = (CTabHandle) NewHandleClear(8); - if (colours == NULL) goto bail; - (*colours)->ctSeed = 15; - (*colours)->ctSize = -1; - - /* create the pixmap handle */ - newpix = (PixMapHandle) NewHandleClear(sizeof(PixMap)); - if (newpix == NULL) goto bail; - - /* set up the pixmap fields */ - pixptr = *newpix; - pixptr->baseAddr = raster_data; - pixptr->rowBytes = (row_bytes | 0x8000); - pixptr->bounds.right = width; - pixptr->bounds.bottom = height; - pixptr->hRes = 0x00480000; /* resolution = 72 dots per inch */ - pixptr->vRes = 0x00480000; - pixptr->pixelSize = 16; - pixptr->pixelType = RGBDirect; - pixptr->cmpCount = 3; - pixptr->cmpSize = 5; - pixptr->pmTable = colours; - - /* done */ - return newpix; - -bail: - if (raster_data != NULL) DisposePtr(raster_data); - if (newpix != NULL) DisposeHandle((Handle) newpix); - if (colours != NULL) DisposeHandle((Handle) colours); - return NULL; -} - - -PixMapHandle Make32BitPixMap(short width, short height) { - long row_bytes; - Ptr raster_data; - long bytecount, response; - CTabHandle colours; - PixMapHandle newpix; - PixMapPtr pixptr; - unsigned char *rowptr; - unsigned long *pixelptr; - short y, x; - - /* is it possible? */ - if (Gestalt(gestaltQuickdrawVersion, &response) != noErr) response = 0; - if (response < gestalt32BitQD) return NULL; - - /* set up initial values for locals */ - row_bytes = ((32 * ((long) width) + 31) >> 5) << 2; - bytecount = row_bytes * ((long) height); - colours = NULL; - raster_data = NULL; - newpix = NULL; - - /* check for valid rowbytes */ - if (row_bytes > 0x00003FFF) goto bail; - - /* allocate the raster data */ - raster_data = NewPtr(bytecount); - if (raster_data == NULL) goto bail; - rowptr = (unsigned char *) raster_data; - for (y=0; y< height; y++, rowptr += row_bytes) - for (pixelptr = (unsigned long *) rowptr, x=0; x<width; x++) - *pixelptr++ = 0x00FFFFFF; - - /* dummy colour table */ - colours = (CTabHandle) NewHandleClear(8); - if (colours == NULL) goto bail; - (*colours)->ctSeed = 24; - (*colours)->ctSize = -1; - - /* create the pixmap handle */ - newpix = (PixMapHandle) NewHandleClear(sizeof(PixMap)); - if (newpix == NULL) goto bail; - - /* set up the pixmap fields */ - pixptr = *newpix; - pixptr->baseAddr = raster_data; - pixptr->rowBytes = (row_bytes | 0x8000); - pixptr->bounds.right = width; - pixptr->bounds.bottom = height; - pixptr->hRes = 0x00480000; /* resolution = 72 dots per inch */ - pixptr->vRes = 0x00480000; - pixptr->pixelSize = 32; - pixptr->pixelType = RGBDirect; - pixptr->cmpCount = 3; - pixptr->cmpSize = 8; - pixptr->pmTable = colours; - - /* done */ - return newpix; - -bail: - if (raster_data != NULL) DisposePtr(raster_data); - if (newpix != NULL) DisposeHandle((Handle) newpix); - if (colours != NULL) DisposeHandle((Handle) colours); - return NULL; -} - - -PixMapHandle MakeScreenLikePixMap(Rect *globalRect) { - long maxArea, area; - PixMapHandle device_pix; - GDHandle device; - short width, height; - Rect sect, device_box; - /* search for maximum intersecting device */ - device_pix = NULL; - maxArea = 0; - for (device = GetDeviceList(); device; device = GetNextDevice(device)) { - device_box = (*device)->gdRect; - if (TestDeviceAttribute(device, screenDevice) - && TestDeviceAttribute(device, screenActive) - && SectRect(globalRect, &device_box, §)) { - area = (sect.right - sect.left) * (sect.bottom - sect.top); - if (area > maxArea) { - device_pix = (*device)->gdPMap; - maxArea = area; - } - } - } - /* create a pixmap */ - if (device_pix != NULL) { - width = globalRect->right - globalRect->left; - height = globalRect->bottom - globalRect->top; - if ((*device_pix)->pixelSize <= 8) - return MakePixMap(width, height, (*device_pix)->pmTable); - else if ((*device_pix)->pixelSize == 16) - return Make16BitPixMap(width, height); - else if ((*device_pix)->pixelSize == 32) - return Make32BitPixMap(width, height); - } - return NULL; -} - - -void KillPixMap(PixMapHandle pix) { - DisposePtr((*pix)->baseAddr); - DisposeHandle((Handle) (*pix)->pmTable); - DisposeHandle((Handle) pix); -} - -long PixMapSize(PixMapHandle pix) { - if (pix == NULL) return 0; - return GetPtrSize((*pix)->baseAddr) - + GetHandleSize((Handle) (*pix)->pmTable) - + GetHandleSize((Handle) pix); -} - -void SetPixMapPixel(PixMapHandle pix, short h, short v, long value) { - long row_bytes; - unsigned char *dst; - row_bytes = (*pix)->rowBytes & 0x00003FFF; - dst = (unsigned char *) (*pix)->baseAddr; - switch ((*pix)->pixelSize) { - case 1: - dst += ((long) v) * row_bytes; - if (value != 0) BitSet(dst, h); else BitClr(dst, h); - break; - case 2: - dst += ((long) v) * row_bytes + ((long) (h>>2)); - switch (h&3) { - case 0: - *dst = ((*dst) & 0x3F) | (value<<6); - break; - case 1: - *dst = ((*dst) & 0xCF) | ((value&0x03)<<4); - break; - case 2: - *dst = ((*dst) & 0xF3) | ((value&0x03)<<2); - break; - case 3: - *dst = ((*dst) & 0xFC) | (value&0x03); - break; - } - break; - case 4: - dst += ((long) v) * row_bytes + ((long) (h>>1)); - if ((h&1) == 0) { - *dst = ((*dst) & 0x0F) | (value<<4); - } else { - *dst = ((*dst) & 0xF0) | (value & 0x0F); - } - break; - case 8: - dst += ((long) v) * row_bytes + ((long) h); - *dst = (unsigned char) value; - break; - case 16: - dst += ((long) v) * row_bytes + (((long) h) * 2); - * ((short*) dst) = (short) value; - break; - case 32: - dst += ((long) v) * row_bytes + (((long) h) * 4); - * ((long*) dst) = value; - break; - } -} - - -long GetPixMapPixel(PixMapHandle pix, short h, short v) { - long row_bytes, the_value; - unsigned char *src; - row_bytes = ((*pix)->rowBytes & 0x00003FFF); - src = (unsigned char *) (*pix)->baseAddr; - switch ((*pix)->pixelSize) { - case 1: - src += ((long) v) * row_bytes; - if (BitTst(src, h)) the_value = 1; else the_value = 0; - break; - case 2: - src += ((long) v) * row_bytes + (((long) h) >> 2); - switch (h&3) { - case 0: - the_value = (long) (((*src) >> 6) & 0x03); - break; - case 1: - the_value = (long) (((*src) >> 4) & 0x03); - break; - case 2: - the_value = (long) (((*src) >> 2) & 0x03); - break; - case 3: - the_value = (long) ((*src) & 0x03); - break; - } - break; - case 4: - src += ((long) v) * row_bytes + (((long) h) >> 1); - if ((h&1) == 0) { - the_value = (long) (((*src) >> 4) & 0x0F); - } else { - the_value = (long) ((*src) & 0x0F); - } - break; - case 8: - src += ((long) v) * row_bytes + ((long) h); - the_value = (long) ((*src) & 0x000000FF); - break; - case 16: - src += ((long) v) * row_bytes + (((long) h) << 1); - the_value = (long) ((* ((short*) src)) & 0x0000FFFF); - break; - case 32: - src += ((long) v) * row_bytes + (((long) h) << 2); - the_value = * ((long*) src); - break; - } - return the_value; -} - - -#if defined(powerc) || defined(__powerc) - -static short pixround(float x) { - float low, high; - low = floor(x); - high = ceil(x); - if (fabs(low - x) < fabs(high - x)) - return (short) low; - else return (short) high; -} - -PixMapHandle RotatePixMap(PixMapHandle pix, short cx, short cy, float angle) { - unsigned long srcrow, dstrow; - long x, y, width, height; - unsigned char *srcbase, *dstbase, *d; - float rad, crad, srad, zx, zy; - short hpos, vpos; - PixMapHandle new_pix; - if ((*pix)->pixelSize <= 8) - new_pix = MakePixMap((*pix)->bounds.right, (*pix)->bounds.bottom, (*pix)->pmTable); - else if ((*pix)->pixelSize == 16) - new_pix = Make16BitPixMap((*pix)->bounds.right, (*pix)->bounds.bottom); - else if ((*pix)->pixelSize == 32) - new_pix = Make32BitPixMap((*pix)->bounds.right, (*pix)->bounds.bottom); - else return NULL; - if (new_pix != NULL) { - rad = 0.017453 * angle; - crad = cos(rad); - srad = sin(rad); - srcrow = ((*pix)->rowBytes & 0x3FFF); - dstrow = ((*new_pix)->rowBytes & 0x3FFF); - srcbase = (unsigned char*) (*pix)->baseAddr; - dstbase = (unsigned char*) (*new_pix)->baseAddr; - height = (*pix)->bounds.bottom; - width = (*pix)->bounds.right; - switch ((*pix)->pixelSize) { - case 1: - case 2: - case 4: - for (y = 0; y < height; y++) - for (x = 0; x < width; x++) { - zx = (float) (x - cx); - zy = (float) (y - cy); - vpos = pixround((zy*crad) - (zx*srad) + ((float) cy)); - if (vpos >= 0 && vpos < height) { - hpos = pixround((zx*crad) + (zy*srad) + ((float) cx)); - if (hpos >= 0 && hpos < width) - SetPixMapPixel(new_pix, x, y, GetPixMapPixel(pix, hpos, vpos)); - } - } - break; - case 8: - for (y = 0; y < height; y++, dstbase += dstrow) - for (d = dstbase, x = 0; x < width; x++, d++) { - zx = (float) (x - cx); - zy = (float) (y - cy); - vpos = pixround((zy*crad) - (zx*srad) + ((float) cy)); - if (vpos >= 0 && vpos < height) { - hpos = pixround((zx*crad) + (zy*srad) + ((float) cx)); - if (hpos >= 0 && hpos < width) - *d = *(srcbase + vpos * srcrow + hpos); - } - } - break; - case 16: - for (y = 0; y < height; y++, dstbase += dstrow) - for (d = dstbase, x = 0; x < width; x++, d += 2) { - zx = (float) (x - cx); - zy = (float) (y - cy); - vpos = pixround((zy * crad) - (zx * srad) + ((float) cy)); - if (vpos >= 0 && vpos < height) { - hpos = pixround((zx * crad) + (zy * srad) + ((float) cx)); - if (hpos >= 0 && hpos < width) - * ((short*) d) = * ((short*) (srcbase + vpos * srcrow + (hpos<<1))); - } - } - break; - case 32: - for (y = 0; y < height; y++, dstbase += dstrow) - for (d = dstbase, x = 0; x < width; x++, d += 4) { - zx = (float) (x - cx); - zy = (float) (y - cy); - vpos = pixround((zy * crad) - (zx * srad) + ((float) cy)); - if (vpos >= 0 && vpos < height) { - hpos = pixround((zx * crad) + (zy * srad) + ((float) cx)); - if (hpos >= 0 && hpos < width) - * ((long*) d) = * ((long*) (srcbase + vpos * srcrow + (hpos<<2))); - } - } - break; - } - } - return new_pix; -} - -#else - -PixMapHandle RotatePixMap(PixMapHandle pix, short cx, short cy, float angle) { - unsigned long srcrow, dstrow; - long x, y, i, width, height; - unsigned char *srcbase, *dstbase, *d, *s; - Fixed rad, crad, srad, zx, zy, cxx, cyy; - short hpos, vpos; - PixMapHandle new_pix; - if ((*pix)->pixelSize <= 8) - new_pix = MakePixMap((*pix)->bounds.right, (*pix)->bounds.bottom, (*pix)->pmTable); - else if ((*pix)->pixelSize == 16) - new_pix = Make16BitPixMap((*pix)->bounds.right, (*pix)->bounds.bottom); - else if ((*pix)->pixelSize == 32) - new_pix = Make32BitPixMap((*pix)->bounds.right, (*pix)->bounds.bottom); - else return NULL; - if (new_pix != NULL) { - rad = FixMul(0x00000478, X2Fix(angle)); - crad = FracCos(rad); - srad = FracSin(rad); - srcrow = ((*pix)->rowBytes & 0x3FFF); - dstrow = ((*new_pix)->rowBytes & 0x3FFF); - srcbase = (unsigned char*) (*pix)->baseAddr; - dstbase = (unsigned char*) (*new_pix)->baseAddr; - height = (*pix)->bounds.bottom; - width = (*pix)->bounds.right; - cxx = FixRatio(cx, 1); - cyy = FixRatio(cy, 1); - switch ((*pix)->pixelSize) { - case 1: - case 2: - case 4: - for (y = 0; y < height; y++) - for (x = 0; x < width; x++) { - zx = FixRatio(x, 1) - cxx; - zy = FixRatio(y, 1) - cyy; - vpos = FixRound(FracMul(zy, crad) - FracMul(zx, srad) + cyy); - if (vpos >= 0 && vpos < height) { - hpos = FixRound(FracMul(zx, crad) + FracMul(zy, srad) + cxx); - if (hpos >= 0 && hpos < width) - SetPixMapPixel(new_pix, x, y, GetPixMapPixel(pix, hpos, vpos)); - } - } - break; - case 8: - for (y = 0; y < height; y++, dstbase += dstrow) - for (d = dstbase, x = 0; x < width; x++, d++) { - zx = FixRatio(x, 1) - cxx; - zy = FixRatio(y, 1) - cyy; - vpos = FixRound(FracMul(zy, crad) - FracMul(zx, srad) + cyy); - if (vpos >= 0 && vpos < height) { - hpos = FixRound(FracMul(zx, crad) + FracMul(zy, srad) + cxx); - if (hpos >= 0 && hpos < width) - *d = *(srcbase + vpos * srcrow + hpos); - } - } - break; - case 16: - for (y = 0; y < height; y++, dstbase += dstrow) - for (d = dstbase, x = 0; x < width; x++, d += 2) { - zx = FixRatio(x, 1) - cxx; - zy = FixRatio(y, 1) - cyy; - vpos = FixRound(FracMul(zy, crad) - FracMul(zx, srad) + cyy); - if (vpos >= 0 && vpos < height) { - hpos = FixRound(FracMul(zx, crad) + FracMul(zy, srad) + cxx); - if (hpos >= 0 && hpos < width) - * ((short*) d) = * ((short*) (srcbase + vpos * srcrow + (hpos<<1))); - } - } - break; - case 32: - for (y = 0; y < height; y++, dstbase += dstrow) - for (d = dstbase, x = 0; x < width; x++, d += 4) { - zx = FixRatio(x, 1) - cxx; - zy = FixRatio(y, 1) - cyy; - vpos = FixRound(FracMul(zy, crad) - FracMul(zx, srad) + cyy); - if (vpos >= 0 && vpos < height) { - hpos = FixRound(FracMul(zx, crad) + FracMul(zy, srad) + cxx); - if (hpos >= 0 && hpos < width) - * ((long*) d) = * ((long*) (srcbase + vpos * srcrow + (hpos<<2))); - } - } - break; - } - } - return new_pix; -} - -#endif - - -PixMapHandle RotatePixRight(PixMapHandle pix) { - unsigned long srcrow, dstrow, x, y, dstcol, width, height; - unsigned char *srcbase, *dstbase, *s, *d; - PixMapHandle new_pix; - - /* establish the next pixmap */ - if ((*pix)->pixelSize <= 8) - new_pix = MakePixMap((*pix)->bounds.bottom, (*pix)->bounds.right, (*pix)->pmTable); - else if ((*pix)->pixelSize == 16) - new_pix = Make16BitPixMap((*pix)->bounds.bottom, (*pix)->bounds.right); - else if ((*pix)->pixelSize == 32) - new_pix = Make32BitPixMap((*pix)->bounds.bottom, (*pix)->bounds.right); - else return NULL; - - if (new_pix == NULL) return NULL; - - /* set up locals */ - srcrow = ((*pix)->rowBytes & 0x3FFF); - dstrow = ((*new_pix)->rowBytes & 0x3FFF); - srcbase = (unsigned char*) (*pix)->baseAddr; - dstbase = (unsigned char*) (*new_pix)->baseAddr; - dstcol = height = (*pix)->bounds.bottom; - width = (*pix)->bounds.right; - - /* rotate the image */ - switch ((*pix)->pixelSize) { - case 1: - case 2: - case 4: - for (y = 0; y < height; y++) - for (x=0; x < width; x++) - SetPixMapPixel(new_pix, height - y - 1, x, GetPixMapPixel(pix, x, y)); - break; - case 8: - for (y = 0; y < height; y++, srcbase += srcrow) - for (s = srcbase, d = dstbase + (--dstcol), x=0; x < width; x++, d += dstrow) - *d = *s++; - break; - case 16: - for (y = 0; y < height; y++, srcbase += srcrow) - for (s = srcbase, d = dstbase + ((--dstcol) << 1), x=0; x < width; x++, s += 2, d += dstrow) - * ((short*) d) = * ((short*) s); - break; - case 32: - for (y = 0; y < height; y++, srcbase += srcrow) - for (s = srcbase, d = dstbase + ((--dstcol) << 2), x=0; x < width; x++, s += 4, d += dstrow) - * ((long*) d) = * ((long*) s); - break; - } - - /* done */ - return new_pix; -} - - -PixMapHandle RotatePixLeft(PixMapHandle pix) { - unsigned long srcrow, dstrow, x, y, dstcol, width, height; - unsigned char *srcbase, *dstbase, *s, *d, *dststart; - PixMapHandle new_pix; - - /* get the next pixmap */ - if ((*pix)->pixelSize <= 8) - new_pix = MakePixMap((*pix)->bounds.bottom, (*pix)->bounds.right, (*pix)->pmTable); - else if ((*pix)->pixelSize == 16) - new_pix = Make16BitPixMap((*pix)->bounds.bottom, (*pix)->bounds.right); - else if ((*pix)->pixelSize == 32) - new_pix = Make32BitPixMap((*pix)->bounds.bottom, (*pix)->bounds.right); - else return NULL; - if (new_pix == NULL) return NULL; - - /* set up the locals */ - srcrow = ((*pix)->rowBytes & 0x3FFF); - dstrow = ((*new_pix)->rowBytes & 0x3FFF); - srcbase = (unsigned char*) (*pix)->baseAddr; - dstbase = (unsigned char*) (*new_pix)->baseAddr; - height = (*pix)->bounds.bottom; - width = (*pix)->bounds.right; - dststart = dstbase + ((width-1) * dstrow); - dstcol = 0; - - /* rotate the image */ - switch ((*pix)->pixelSize) { - case 1: - case 2: - case 4: - for (y = 0; y < height; y++) - for (x=0; x < width; x++) - SetPixMapPixel(new_pix, y, width - x - 1, GetPixMapPixel(pix, x, y)); - break; - case 8: - for (y = 0; y < height; y++, srcbase += srcrow) - for (s = srcbase, d = dststart + (dstcol++), x = 0; x < width; x++, d -= dstrow) - *d = *s++; - break; - case 16: - for (y = 0; y < height; y++, srcbase += srcrow) - for (s = srcbase, d = dststart + ((dstcol++) << 1), x = 0; x < width; x++, s += 2, d -= dstrow) - * ((short*) d) = * ((short*) s); - break; - case 32: - for (y = 0; y < height; y++, srcbase += srcrow) - for (s = srcbase, d = dststart + ((dstcol++) << 2), x = 0; x < width; x++, s += 4, d -= dstrow) - * ((long*) d) = * ((long*) s); - break; - } - return new_pix; -} - -PixMapHandle FlipPixVertical(PixMapHandle pix) { - unsigned long srcrow, dstrow, y, width, height; - unsigned char *srcbase, *dstbase; - PixMapHandle new_pix; - - /* get the next pixmap */ - if ((*pix)->pixelSize <= 8) - new_pix = MakePixMap((*pix)->bounds.right, (*pix)->bounds.bottom, (*pix)->pmTable); - else if ((*pix)->pixelSize == 16) - new_pix = Make16BitPixMap((*pix)->bounds.right, (*pix)->bounds.bottom); - else if ((*pix)->pixelSize == 32) - new_pix = Make32BitPixMap((*pix)->bounds.right, (*pix)->bounds.bottom); - else return NULL; - if (new_pix == NULL) return NULL; - - /* set up the locals */ - srcrow = ((*pix)->rowBytes & 0x3FFF); - dstrow = ((*new_pix)->rowBytes & 0x3FFF); - srcbase = (unsigned char*) (*pix)->baseAddr; - dstbase = (unsigned char*) (*new_pix)->baseAddr; - height = (*pix)->bounds.bottom; - width = (*pix)->bounds.right; - dstbase += (height * dstrow); - - /* flip the image */ - for (y=0; y < height; y++) { - dstbase -= dstrow; - BlockMoveData(srcbase, dstbase, dstrow); - srcbase += srcrow; - } - return new_pix; -} - -PixMapHandle FlipPixHorizontal(PixMapHandle pix) { - unsigned long srcrow, dstrow, x, y, width, height; - unsigned char *srcbase, *dstbase, *s, *d; - PixMapHandle new_pix; - - /* get the next pixmap */ - if ((*pix)->pixelSize <= 8) - new_pix = MakePixMap((*pix)->bounds.right, (*pix)->bounds.bottom, (*pix)->pmTable); - else if ((*pix)->pixelSize == 16) - new_pix = Make16BitPixMap((*pix)->bounds.right, (*pix)->bounds.bottom); - else if ((*pix)->pixelSize == 32) - new_pix = Make32BitPixMap((*pix)->bounds.right, (*pix)->bounds.bottom); - else return NULL; - if (new_pix == NULL) return NULL; - - /* set up the locals */ - srcrow = ((*pix)->rowBytes & 0x3FFF); - dstrow = ((*new_pix)->rowBytes & 0x3FFF); - srcbase = (unsigned char*) (*pix)->baseAddr; - dstbase = (unsigned char*) (*new_pix)->baseAddr; - height = (*pix)->bounds.bottom; - width = (*pix)->bounds.right; - - /* flip the image */ - switch ((*pix)->pixelSize) { - case 1: - case 2: - case 4: - for (y = 0; y < height; y++) - for (x=0; x < width; x++) - SetPixMapPixel(new_pix, width - x - 1, y, GetPixMapPixel(pix, x, y)); - break; - case 8: - for (y = 0; y < height; y++, srcbase += srcrow, dstbase += dstrow) - for(s = srcbase + width, d = dstbase, x = 0; x < width; x++) - *d++ = *--s; - break; - case 16: - for (y = 0; y < height; y++, srcbase += srcrow, dstbase += dstrow) - for(s = srcbase + (width << 1) - 2, d = dstbase, x = 0; x < width; x++, d += 2, s -= 2) - * ((short*) d) = * ((short*) s); - break; - case 32: - for (y = 0; y < height; y++, srcbase += srcrow, dstbase += dstrow) - for(s = srcbase + (width << 2) - 4, d = dstbase, x = 0; x < width; x++, d += 4, s -= 4) - * ((long*) d) = * ((long*) s); - break; - } - return new_pix; -} - - -PixMapHandle DuplicatePixMap(PixMapHandle pix) { - unsigned long srcrow, dstrow, y, width, height; - unsigned char *srcbase, *dstbase; - PixMapHandle new_pix; - - /* get the next pixmap */ - if ((*pix)->pixelSize <= 8) - new_pix = MakePixMap((*pix)->bounds.right, (*pix)->bounds.bottom, (*pix)->pmTable); - else if ((*pix)->pixelSize == 16) - new_pix = Make16BitPixMap((*pix)->bounds.right, (*pix)->bounds.bottom); - else if ((*pix)->pixelSize == 32) - new_pix = Make32BitPixMap((*pix)->bounds.right, (*pix)->bounds.bottom); - else return NULL; - if (new_pix == NULL) return NULL; - - /* set up the locals */ - srcrow = ((*pix)->rowBytes & 0x3FFF); - dstrow = ((*new_pix)->rowBytes & 0x3FFF); - srcbase = (unsigned char*) (*pix)->baseAddr; - dstbase = (unsigned char*) (*new_pix)->baseAddr; - height = (*pix)->bounds.bottom; - width = (*pix)->bounds.right; - - /* copy the image */ - for (y=0; y < height; y++) { - BlockMoveData(srcbase, dstbase, dstrow); - srcbase += srcrow; - dstbase += dstrow; - } - return new_pix; -} - - -PixMapHandle PICTToPixMap(PicHandle pic, CTabHandle clut) { - Rect bounds; - PixMapHandle pix; - PixMapPort *pxmp; - bounds = (*pic)->picFrame; - OffsetRect(&bounds, -bounds.left, -bounds.top); - pix = MakePixMap(bounds.right, bounds.bottom, clut); - if (pix != NULL) - WithPixMap(pix, pxmp) { - DrawPicture(pic, &bounds); - } - return pix; -} - -PixMapHandle PICTTo16BitPixMap(PicHandle pic) { - Rect bounds; - PixMapHandle pix; - PixMapPort *pxmp; - bounds = (*pic)->picFrame; - OffsetRect(&bounds, -bounds.left, -bounds.top); - pix = Make16BitPixMap(bounds.right, bounds.bottom); - if (pix != NULL) - WithPixMap(pix, pxmp) { - DrawPicture(pic, &bounds); - } - return pix; -} - - -PixMapHandle PICTTo32BitPixMap(PicHandle pic) { - Rect bounds; - PixMapHandle pix; - PixMapPort *pxmp; - bounds = (*pic)->picFrame; - OffsetRect(&bounds, -bounds.left, -bounds.top); - pix = Make32BitPixMap(bounds.right, bounds.bottom); - if (pix != NULL) - WithPixMap(pix, pxmp) { - DrawPicture(pic, &bounds); - } - return pix; -} - - -PicHandle PixMapToPICT(PixMapHandle pix) { - PicHandle pic; - GrafPtr saved; - //CGrafPort port;//commented by Kekus Digital - CGrafPtr port;//added by Kekus Digital - Rect bounds; - bounds = (*pix)->bounds; - GetPort(&saved); - //OpenCPort(&port);//commented by Kekus Digital - port = CreateNewPort();//added by Kekus Digital - pic = OpenPicture(&bounds); - ClipRect(&bounds); - PlotPixMap(pix, 0, 0, srcCopy); - ClosePicture(); - SetPort(saved); - //ClosePort((GrafPtr) &port);//commented by Kekus Digital - DisposePort(port);//added by Kekus Digital - if (GetHandleSize((Handle) pic) == sizeof(Picture)) { - KillPicture(pic); - pic = NULL; - } - return pic; -} - - -PicHandle PixMapToCompressedPICT(PixMapHandle pix) { - GrafPtr saved; - //CGrafPort port;//commented by Kekus Digital - CGrafPtr port;//added by Kekus Digital - PicHandle pic; - Rect bounds; - OSErr err; - long buffersize, response; - Ptr compBuffer; - ImageDescriptionHandle iDesc; - Boolean port_open; - - /* can it be done? */ - if (Gestalt(gestaltCompressionMgr, &response) != noErr) return NULL; - - /* initial state */ - compBuffer = NULL; - iDesc = NULL; - pic = NULL; - port_open = false; - - /* draw the picture, make sure we have a port */ - GetPort(&saved); - //OpenCPort(&port);//commented by Kekus Digital - port = CreateNewPort();//added by Kekus Digital - ClipRect(&bounds); - port_open = true; - - /* calculate sizes */ - bounds = (*pix)->bounds; - err = GetMaxCompressionSize(pix, &bounds, 0, codecHighQuality, 'jpeg', anyCodec, &buffersize); - if (err != noErr) goto bail; - - /* allocate storage */ - compBuffer = NewPtr(buffersize); - if ((err = MemError()) != noErr) goto bail; - iDesc = (ImageDescriptionHandle) NewHandleClear(sizeof(ImageDescription)); - if ((err = MemError()) != noErr) goto bail; - - /* compress the image */ - err = CompressImage(pix, &bounds, codecHighQuality, 'jpeg', iDesc, compBuffer); - if (err != noErr) goto bail; - - /* put the compressed image in a picture */ - pic = OpenPicture(&bounds); - ClipRect(&bounds); - err = DecompressImage(compBuffer, iDesc, pix, &bounds, &bounds, srcCopy, NULL); - ClosePicture(); - - /* verify that the picture is ok */ - if (err != noErr || GetHandleSize((Handle) pic) == sizeof(Picture)) goto bail; - - /* clean up and go */ - SetPort(saved); - //ClosePort((GrafPtr) &port);//commented by Kekus Digital - DisposePort(port);//added by Kekus Digital - DisposePtr(compBuffer); - DisposeHandle((Handle) iDesc); - return pic; - -bail: - if (port_open) { - SetPort(saved); - //ClosePort((GrafPtr) &port);//commented by Kekus Digital - DisposePort(port);//added by Kekus Digital - } - if (pic != NULL) KillPicture(pic); - if (compBuffer != NULL) DisposePtr(compBuffer); - if (iDesc != NULL) DisposeHandle((Handle) iDesc); - return NULL; -} - - -PixMapPort* NewPxMP(PixMapHandle pix) { - GDHandle the_device; - ITabHandle inverse_table; - PixMapPort* pxmp; - Boolean device_active; - Rect r; - RgnHandle the_VisRgn = nil; - - /* set up initial variable states */ - the_device = NULL; - inverse_table = NULL; - pxmp = NULL; - device_active = false; - - /* allocate the pxmp */ - pxmp = (PixMapPort*) NewPtr(sizeof(PixMapPort)); - if (pxmp == NULL) goto bail; - - /* create the graphics device */ - inverse_table = (ITabHandle) NewHandleClear(2); - if (inverse_table == NULL) goto bail; - if ((*pix)->pixelSize <= 8) { /* set it up only for indexed devices */ - MakeITable((*pix)->pmTable, inverse_table, 4); - if (QDError() != noErr) goto bail; - } - - /* create the graphics device */ - the_device = (GDHandle) NewHandleClear(sizeof(GDevice)); - if (the_device == NULL) goto bail; - if ((*pix)->pixelSize <= 8) - (*the_device)->gdType = clutType; - else (*the_device)->gdType = directType; - (*the_device)->gdITable = inverse_table; - (*the_device)->gdResPref = 4; - (*the_device)->gdPMap = pix; - (*the_device)->gdRect = (*pix)->bounds; - (*the_device)->gdMode = -1; - SetDeviceAttribute(the_device, gdDevType, true); - SetDeviceAttribute(the_device, noDriver, true); - - /* save the current grafport and device */ - GetPort(&pxmp->saved_port); - pxmp->saved_device = GetGDevice(); - - /* set the current device to the new one*/ - SetGDevice((pxmp->pdevice = the_device)); - device_active = true; - - /* Open the new grafport*/ - //OpenCPort(&pxmp->pport);//commented by Kekus Digital - pxmp->pport = CreateNewPort();//added by Kekus Digital - //SetPort((GrafPtr) &pxmp->pport); //commented by Kekus Digital - SetPort((GrafPtr) pxmp->pport); //added by Kekus Digital - r = (*pix)->bounds; - PortSize(r.right, r.bottom); - ClipRect(&r); - //RectRgn(pxmp->pport.visRgn, &r);//commented by Kekus Digital - - GetPortVisibleRegion(pxmp->pport,the_VisRgn );//added by Kekus Digital - RectRgn(the_VisRgn, &r);//added by Kekus Digital - - /* done */ - return pxmp; - -bail: - if (device_active) SetGDevice(pxmp->saved_device); - if (inverse_table != NULL) DisposeHandle((Handle) inverse_table); - if (the_device != NULL) DisposeHandle((Handle) the_device); - if (pxmp != NULL) DisposePtr((Ptr) pxmp); - return NULL; -} - -void DisposePxMP(PixMapPort* px) { - if (px->pdevice == GetGDevice()) { - SetGDevice(px->saved_device); - SetPort(px->saved_port); - } - //CloseCPort(&px->pport);//commented by Kekus Digital - DisposePort(px->pport);//added by Kekus Digital - DisposeHandle((Handle) ((*px->pdevice)->gdITable)); - DisposeHandle((Handle) (px->pdevice)); - DisposePtr((Ptr) px); -} - -void PlotPixMap(PixMapHandle pix, short h, short v, short mode) { - GrafPtr port; - Rect src, dst; - char hstate; - GetPort(&port); - hstate = HGetState((Handle) pix); - HLock((Handle) pix); - src = dst = (*pix)->bounds; - OffsetRect(&dst, h, v); - //CopyBits((BitMap *) (*pix), &port->portBits, &src, &dst, mode, NULL);//commented by Kekus Digital - CopyBits((BitMap *) (*pix), GetPortBitMapForCopyBits(port), &src, &dst, mode, NULL);//added by Kekus Digital - HSetState((Handle) pix, hstate); -} - -void PixMapCopy(PixMapHandle pix, Rect *src, Rect *dst, short mode) { - GrafPtr port; - char hstate; - GetPort(&port); - hstate = HGetState((Handle) pix); - HLock((Handle) pix); - //CopyBits((BitMap *) (*pix), &port->portBits, src, dst, mode, NULL);//commented by Kekus Digital - CopyBits((BitMap *) (*pix), GetPortBitMapForCopyBits(port), src, dst, mode, NULL);//added by Kekus Digital - HSetState((Handle) pix, hstate); -} - -PixPatHandle PixMap2PixPat(PixMapHandle pix, Pattern *the_pattern) { - PixPat ppat; - PixMap pmap; - PixPatHandle the_pixpat; - long bytecount; - char ctstate; - short width, height; - OSErr err; - - /* recoverable state */ - the_pixpat = NULL; - - /* check parameters */ - if ((*pix)->pixelSize > 8) goto bail; - width = (*pix)->bounds.right; - if (width != 8 && width != 16 && width != 32 && width != 64 && width != 128) - goto bail; - height = (*pix)->bounds.bottom; - if (height != 8 && height != 16 && height != 32 && height != 64 && height != 128) - goto bail; - - /* set variables to correct initial settings */ - bytecount = ((long) ((*pix)->rowBytes & 0x3FFF)) * ((long) (*pix)->bounds.bottom); - ppat.patType = 1; - ppat.patMap = (PixMapHandle) sizeof(PixPat); - ppat.patData = (Handle) (sizeof(PixPat) + sizeof(PixMap)); - ppat.patXData = NULL; - ppat.patXValid = -1; - ppat.patXMap = NULL; - ppat.pat1Data = *the_pattern; - pmap = **pix; - pmap.baseAddr = NULL; - pmap.pmTable = (CTabHandle) (sizeof(PixPat) + sizeof(PixMap) + bytecount); - - /* add the PixPat header */ - err = PtrToHand(&ppat, (Handle*) &the_pixpat, sizeof(ppat)); - if (err != noErr) goto bail; - - /* ... then the PixMap */ - err = PtrAndHand(&pmap, (Handle) the_pixpat, sizeof(PixMap)); - if (err != noErr) goto bail; - - /* ... then the raster data */ - err = PtrAndHand((*pix)->baseAddr, (Handle) the_pixpat, bytecount); - if (err != noErr) goto bail; - - /* ... and finally the colour table */ - ctstate = HGetState((Handle) (*pix)->pmTable); - HLock((Handle) (*pix)->pmTable); - err = PtrAndHand(*((*pix)->pmTable), (Handle) the_pixpat, GetHandleSize((Handle) (*pix)->pmTable)); - HSetState((Handle) (*pix)->pmTable, ctstate); - if (err != noErr) goto bail; - - /* done */ - return the_pixpat; - -bail: - if (the_pixpat != NULL) DisposeHandle((Handle) the_pixpat); - return NULL; -} - - -CTabHandle CalcPixMapColours(PixMapHandle pix) { - CTabHandle clut; - OSErr err; - clut = NULL; - if ((*pix)->pixelSize <= 8) { - clut = (*pix)->pmTable; - if (HandToHand((Handle *) &clut) != noErr) clut = NULL; - } else { - PictInfo pictinfo; - memset(&pictinfo, 0, sizeof(pictinfo)); - err = GetPixMapInfo(pix, &pictinfo, - returnColorTable+suppressBlackAndWhite, - 254, medianMethod, 0); - if (err == noErr) clut = pictinfo.theColorTable; - } - return clut; -} - - - Deleted: trunk/libpano/PixMap.h =================================================================== --- trunk/libpano/PixMap.h 2009-02-01 17:37:06 UTC (rev 926) +++ trunk/libpano/PixMap.h 2009-02-01 17:59:30 UTC (rev 927) @@ -1,245 +0,0 @@ -/* File PixMap.h Copyright (C) 1997 by John R. Montbriand. All Rights Reserved. */ - -#ifndef __PIXMAP__ -#define __PIXMAP__ - -/* File PixMap.h - PixMap manipulation routines, definitions. - Copyright (c) 1996, 1997 by John Montbriand. All Rights Reserved. - Permission hereby granted for public use. - Distribute freely in areas where the laws of copyright apply. - USE AT YOUR OWN RISK. - DO NOT DISTRIBUTE MODIFIED COPIES. - Comments/questions/postcards* to the author at the address: - John Montbriand - P.O. Box. 1133 - Saskatoon Saskatchewan Canada - S7K 3N2 - or by email at: - tin...@sk... - *if you mail a postcard, then I will provide you with technical support - regarding questions you may have about this file. - -*/ - -//#include <Types.h> // commented by Kekus Digital -//#include <QuickDraw.h> // commented by Kekus Digital -#include <Carbon/Carbon.h> // added by Kekus Digital - -#ifdef __cplusplus -extern "C" { -#endif - - -/* version number for this interface (version 1) */ - -#define kPixMapVersion 1 - - -/* MakePixMap creates a new pixmap handle with the requested - dimensions. If there is not enough memory to allocate the pixmap, - MakePixMap will return NULL. if clut is NULL, then the default - 256 colour table (clut = 8) is used. if clut is not NULL, then a - copy of it is used in the pixmap. The number of colours in the clut - determines the pixel depth of the created pixmap as follows: - 2 colours -> 1 pit per pixel, - 3 to 4 colours -> 2 bits per pixel, - 5 to 16 colours -> 4 bits per pixel, - 17 to 256 colours -> 8 bits per pixel. */ - -PixMapHandle MakePixMap(short width, short height, CTabHandle clut); - - -/* Make16BitPixMap creates a new pixmap handle with the requested - dimensions. If there is not enough memory to allocate the pixmap, - Make16BitPixMap will return NULL. The created pixmap utilizes 16 bit - colour and allocates 16 bits per each pixel. Make32BitPixMap is - identical however it allocates 32 bits per pixel. */ - -PixMapHandle Make16BitPixMap(short width, short height); -PixMapHandle Make32BitPixMap(short width, short height); - - -/* MakeScreenLikePixMap creates a pixmap mirroring the attributes of the - pixmap used to draw largest area of *globalRect on the screen */ -PixMapHandle MakeScreenLikePixMap(Rect *globalRect); - - -/* KillPixMap disposes of a pixmap allocated by one of the - routines herein. */ -void KillPixMap(PixMapHandle pix); - - -/* PixMapSize returns the number of bytes occupied by the pixmap. */ -long PixMapSize(PixMapHandle pix); - - -/* SetPixMapPixel and GetPixMapPixel are for getting or setting - individual pixel values. */ - -void SetPixMapPixel(PixMapHandle pix, short h, short v, long value); -long GetPixMapPixel(PixMapHandle pix, short h, short v); - - -/* RotatePixRight creates a new pixmap containing the image - stored in the parameter pixmap rotated 90 degrees to the right. - The resulting pixmap is appropriately sized: i.e. if the source - pixmap is 100 pixels wide and 200 pixels tall, then the result - pixmap pointer will be 200 pixels wide and 100 pixels tall. */ - -PixMapHandle RotatePixRight(PixMapHandle pix); - - -/* RotatePixLeft creates a new pixmap containing the image stored in - the parameter bitmap pointer rotated 90 degrees to the left. The - resulting pixmap is appropriately sized: i.e. if the source pixmap - is 100 pixels wide and 200 pixels tall, then the result pixmap - pointer will be 200 pixels wide and 100 pixels tall. */ - -PixMapHandle RotatePixLeft(PixMapHandle pix); - - -/* FlipPixVertical creates a new pixmap containing the image stored - in the parameter pixmap flipped upside down. The resulting - pixmap will be the same size as the original image. */ - -PixMapHandle FlipPixVertical(PixMapHandle pix); - - -/* FlipPixHorizontal creates a new pixmap containing the image stored - in the parameter pixmap flipped horizontally. The resulting pixmap - will be the same size as the original image. */ - -PixMapHandle FlipPixHorizontal(PixMapHandle pix); - - -/* RotatePixMap creates a new pixmap containing the image from - the parameter pixmap rotated angle degrees about the center (cx, cy). - The resultant pixmap will have the same dimensions as the parameter - pixmap regardless of the angle specified. */ - -PixMapHandle RotatePixMap(PixMapHandle pix, short cx, short cy, float angle); - - -/* DuplicatePixMap creates a copy of the pixmap parameter. */ - -PixMapHandle DuplicatePixMap(PixMapHandle pix); - - -/* PICTToBitMap creates a new pixmap the using the size information - provided in the QuickDraw picture pointer parameter and draws - the picture in the pixmap before returning the pixmap. */ - -PixMapHandle PICTToPixMap(PicHandle pic, CTabHandle clut); -PixMapHandle PICTTo16BitPixMap(PicHandle pic); -PixMapHandle PICTTo32BitPixMap(PicHandle pic); - - -/* PixMapToPICT returns a QuickDraw picture that will draw the - image stored in the pixmap. PixMapToPICT is the inverse - of PICTToPixMap. */ - -PicHandle PixMapToPICT(PixMapHandle pix); - - -/* PixMapToCompressedPICT returns a QuickDraw picture that will draw the - image stored in the pixmap. PixMapToCompressedPICT is the inverse - of PICTToPixMap. */ - -PicHandle PixMapToCompressedPICT(PixMapHandle pix); - - - -/* ROUTINES FOR DRAWING TO... */ - -/* PixMapPort data structure managed by the routines NewBMP and - DisposeBMP. You should never have to access the fields of this - record directly as it's all taken care of by NewBMP and DisposeBMP. */ - -typedef struct { - //CGrafPort pport; /* the grafport record for drawing into the pixmap */ // commented by Kekus Digital - CGrafPtr pport; /* the grafport record for drawing into the pixmap */ // added by Kekus Digital - GDHandle pdevice; /* gdevice for drawing into the pixmap */ - GDHandle saved_device; /* saved gdevice */ - GrafPtr saved_port; /* saved grafport for later restoration */ - PixMapHandle pix; /* the pixmap */ -} PixMapPort; - - -/* NewBMP is called by the WithBitMap macro and you should never have to - call it directly yourself. What it does is it locks the pixmap, saves the - original grafport, and creates a new grafport suitable for drawing into - the pixmap. NewBMP should be followed by a call to DisposeBMP which - will restore the original grafport, unlock the pixmap, and dispose of the - new grafport. */ - -PixMapPort* NewPxMP(PixMapHandle pix); - - - -/* DisposePxMP unlocks the pixmap pointer passed to NewPxMP, deallocates - the grafport allocated for it, and restores the original grafport. - the macro WithBitMap calls this routine automatically and you will - not normally have to call it directly. */ - -void DisposePxMP(PixMapPort* px); - - - -/* WithPixMap is a macro facility that sets up the drawing environment - such that any drawing commands in the statement following the - macro instantiation will draw into the pixmap handle provided as - the first parameter. The parameters are declared as follows: - PixMapHandle pix; - PixMapPort* pxmp; */ - -#define WithPixMap(pix, pxmp) \ - for (pxmp = NewPxMP(pix); \ - pxmp != NULL; \ - DisposePxMP(pxmp), pxmp = NULL) - - - - -/* ROUTINES FOR DRAWING FROM... */ - -/* PlotPixMap provides a simple interface for drawing a pixmap in - the current grafport. The pixmap is drawn with the top left corner - aligned with the point (h,v) using the indicated transfer mode. */ - -void PlotPixMap(PixMapHandle pix, short h, short v, short mode); - - -/* PixMapCopy copies bits from the pixmap to the current port - from the src rectangle to the destination using the indicated - copy mode. */ - -void PixMapCopy(PixMapHandle pix, Rect *src, Rect *dst, short mode); - - -/* PixMap2PixPat converts a pixmap to a pixel pattern resource. The - pixmap's dimensions should be some power of two - (i.e. 8, 16, 32, 64, or 128). */ - -PixPatHandle PixMap2PixPat(PixMapHandle pix, Pattern *the_pattern); - - -/* CalcPixMapColours calculates a colour table for the colours - used in the pixmap. For indexed images, CalcPixMapColours returns - a copy of the pixmap's colour table, otherwise, for direct - images, it calls GetPixMapInfo. */ - -CTabHandle CalcPixMapColours(PixMapHandle pix); - - -#ifdef __cplusplus -}; -#endif - -#endif - -/* end of File PixMap.h */ - - - - Deleted: trunk/libpano/README.mac =================================================================== --- trunk/libpano/README.mac 2009-02-01 17:37:06 UTC (rev 926) +++ trunk/libpano/README.mac 2009-02-01 17:59:30 UTC (rev 927) @@ -1,81 +0,0 @@ -Readme Sources - -This file describes how to build the library pano13.lib -for the Macintosh operating system. This library is required -for running the Panorama Tools plug-in and any of the -Panorama Tools applications (PTStitcher, etc). - -Legal Issues: - -This software is distributed under GNU-license, see the -file COPYING for details. Some parts of the software -are derived from other sources, which are distributed under -different copyrights. These are: -(1) The JPEG-library distributed by the Independent JPEG group. -This package contains a precompiled binary of the JPEG -library and the header files required for compilation -in the folder Sources/libs/. The legal terms for using the -JPEG library can be found in the file /copyright/README_JPEG. -(2) The PNG-library written by G.E.Schalnat et al. -This package contains a precompiled binary of the PNG -library and the header files required for compilation -in the folder Sources/libs/. The legal terms for using the -PNG library can be found in the file Sources/libs/png.h -(3) The TIFF-library by Sam Leffler/ Silicon Graphics Inc. -This package contains a precompiled binary of the TIFF -library and the header files required for compilation -in the folder Sources/libs/. The legal terms for using the -TIFF library can be found in the file /copyright/README_TIFF. -(4) The ZLIB-library by Jean-loup Gailly and Mark Adler. -This package contains a precompiled binary of the ZLIB -library and the header files required for compilation -in the folder Sources/libs/. The legal terms for using the -ZLIB library can be found in the file zlib.h. -(5) The public domain Levenberg-Marquardt solver -of the Argonne National Laboratories MINPACK mathematical library, -C translation by Steve Moshier (file lmdif.c). -(6) Fast fourier transformation, code by: -RC Singleton, Stanford Research Institute, Sept. 1968 -Copyright MJ Olesen, Queen's University at Kingston, 1995-97. -See the file fftn.c for details. -(7) PixMap-manipulation routines by John Montbriand. See -the file PixMap.h for the copyright notice. - - -Requirements: - -A working MPW installation (Macintosh Programmers Workshop) -is required to build the library. MPW is free and can be -downloaded from www.apple.com. - -The Java Development MRJ is required. It is also free -and can be downloaded from www.apple.com. -During the build of pano13.lib the java include -files have to be accessed by the MRC-compiler. - - -Building the Library: - -The source files of this distribution have to be unpacked. -Open the Makefile (folder 'src') using MPW, and edit path settings -for your system (eg the path to your MRJ-installation). -In the directory 'src' issue the command 'Build pano13.lib'. -There will be a couple of warning -messages which are non-fatal and can be ignored. - -Limits and Modifications: - -This distribution of the sources limits processing -of fisheye images to fields of view smaller than -160 degrees. This limit is controlled by the constant -MAX_FISHEYE_FOV in the file filter.h. There -is some controversy regarding the legality of processing -hemispherical images (ie images having 180 degree field -of view) in connection with virtual reality panoramas. -If your application of fisheye lenses is not prohibited -by patents, you can build and use your own unlimited version -of the library by changing the source code. - -Helmut Dersch -d...@fh... - Deleted: trunk/libpano/makefile.mac =================================================================== --- trunk/libpano/makefile.mac 2009-02-01 17:37:06 UTC (rev 926) +++ trunk/libpano/makefile.mac 2009-02-01 17:59:30 UTC (rev 927) @@ -1,100 +0,0 @@ -# Panorama_Tools - Generate, Edit and Convert Panoramic Images -# Copyright (C) 1998,1999 - Helmut Dersch de...@fh... -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -# -# - -############################################################################# - -# All functional code and resources are located in pano13.lib -# The code in the filters only translates the 68k-code-resource call -# from GraphicConverter into a call to the ppc-entry function -# "filter_main" with an appropriate selector value. - -############################################################################# - -# -------------- Definitions ------------------------- - -Lib_Exports = pano13.x - -PPCInc = panorama.h filter.h fftn.h f2c.h PixMap.h pteditor.h \xB6 - ptutils.h sys_mac.h version.h - -PPCSrc = filter.c parser.c queryfeature.c sys_mac.c correct.c perspect.c \xB6 - adjust.c remap.c lmdif.c file.c \xB6 - math.c pan.c PTDialogs.c fftn.c fourier.c resample.c \xB6 - shell_mac.c optimize.c morpher.c Triangulate.c png.c \xB6 - seamer.c ptpicker.c pteditor.c seamer_.c \xB6 - tiff.c pict.c jpeg.c PixMap.c - -OtherSrc = filter.r Gimpmain.c bmp.c pano13.x libpano13.def ppm.c resource.h \xB6 - sys_X11.c sys_X11.h sys_win.c sys_win.h sys_ansi.h sys_ansi.c \xB6 - - - -PPCObjs = filter.x.o parser.x.o queryfeature.x.o sys_mac.x.o correct.x.o perspect.x.o \xB6 - adjust.x.o remap.x.o lmdif.x.o file.x.o \xB6 - math.x.o pan.x.o PTDialogs.x.o fftn.x.o fourier.x.o resample.x.o \xB6 - shell_mac.x.o optimize.x.o morpher.x.o Triangulate.x.o png.x.o \xB6 - seamer.x.o ptpicker.x.o pteditor.x.o tiff.x.o pict.x.o jpeg.x.o PixMap.x.o - -FORMAT_LIBS = ::jpeg-6:libjpeg.a \xB6 - ::tiff-v3.4:libtiff:libtiff.o \xB6 - ::libpng-0.89c:libpng.a \xB6 - "{SharedLibraries}"QuickTimeLib - - - -PPC_Libraries = "{SharedLibraries}"InterfaceLib \xB6 - "{SharedLibraries}"StdCLib \xB6 - "{PPCLibraries}"StdCRuntime.o \xB6 - "{PPCLibraries}"PPCCRuntime.o \xB6 - "{SharedLibraries}"MathLib \xB6 - "{SharedLibraries}"ColorSyncLib \xB6 - "{PPCLibraries}"MrCPlusLib.o \xB6 - "{SharedLibraries}"JNILib \xB6 - {FORMAT_LIBS} - - -############################################################################## - -# -------------- Build Rules ------------------------- - -.x.o \xC4 .c - MrC -d Macintosh -align mac68k -i ::jpeg-6 -i ::tiff-v3.4:libtiff -i ::libpng-0.89c -i :: -i ::libpng-0.89c:zlib-1.0.4 {default}.c -o {default}.x.o - -# MrC -d Macintosh {default}.c -o {default}.x.o - - -# This shared library contains all functional code and resources - -pano13.lib \xC4\xC4 {PPCObjs} filter.r Makefile {Lib_Exports} {PPC_Libraries} - PPCLink -xm s -init __my_initialize -term __my_terminate \xB6 - -export `ConvertExportList {Lib_Exports}` \xB6 - {PPCObjs} {PPC_Libraries} -o {targ} # Create library - MergeFragment -n pano13.lib -c -t pwpc -x {targ} # use MergeFragment to create a library cfrg - Rez -d SystemSevenOrLater=1 -a filter.r -o {Targ} # Stuff all resources into library - setfile -c '????' -t 'shlb' {Targ} - - -Backup \xC4 - Duplicate -y Makefile {PPCInc} {PPCSrc} {OtherSrc} :Backup: - - -clean \xC4 - Delete {PPCObjs} pano13.lib - - Deleted: trunk/libpano/pict.c =================================================================== --- trunk/libpano/pict.c 2009-02-01 17:37:06 UTC (rev 926) +++ trunk/libpano/pict.c 2009-02-01 17:59:30 UTC (rev 927) @@ -1,490 +0,0 @@ -/*#include <Gestalt.h> //commented by Kekus Digital -#include "filter.h" - -#include <FixMath.h> -#include <ImageCompression.h> -#include <Movies.h> -#include <QuickTimeComponents.h> -#include <StandardFile.h> -#include <PictUtils.h> -#include <Memory.h> -#include <OSUtils.h> -#include <ToolUtils.h> -#include <Math.h> -#include <Gestalt.h> -#include <ImageCompression.h>*/ // till here -#include "PixMap.h" -#include <carbon/carbon.h> //added by Kekus Digital -#include <QuickTime/QuickTimeComponents.h> -#include <QuickTime/ImageCompression.h> // till here - -#include <String.h> -#include "filter.h" -#include <stdio.h> - -#include "jpeglib.h" - - -static void FSpWritePicture (const FSSpec *spec, PicHandle pictData); -static PicHandle FSpReadPicture (const FSSpec *spec) ; -static PicHandle ImageToPICT (Image *im) ; -static int PICTtoImage ( Image *im, PicHandle pic ); -static int qtimporter( Image *im, fullPath *sfile ); - -int writePICT ( Image *im, fullPath *sfile ); -int readPICT ( Image *im, fullPath *sfile ); -int readJPEG( Image *im, fullPath *sfile ); -int readTIFF( Image *im, fullPath *sfile ); - - - -int writePICT( Image *im, fullPath *sfile ) -{ - PicHandle pic = NULL; - - TwoToOneByte( im ); // Pict doesn't support 16bit channels - - pic = ImageToPICT( im ); - if( pic == NULL ) - { - PrintError("Could not create Picture"); - return -1; - } - FSpWritePicture ( sfile, pic); - KillPicture(pic); - - return 0; -} - -int readPICT ( Image *im, fullPath *sfile ) -{ - PicHandle pic = NULL; - int result = 0; - - pic = FSpReadPicture (sfile); - if( pic == NULL ) - { - PrintError("Could not read Picture"); - return -1; - } - - if( PICTtoImage ( im, pic ) != 0) - { - PrintError("Could not convert Picture"); - result = -1; - } - - KillPicture(pic); - return result; -} - - - -static void FSpWritePicture (const FSSpec *spec, PicHandle pictData) -{ - short fRefNum; - long zeroData = 0L, zeroDataLen, pictLength; - int i; - -// FSpCreate(spec, 'GKON', 'PICT', smSystemScript); - FSpOpenDF(spec, fsWrPerm, &fRefNum); - - zeroDataLen = sizeof(long); - for (i = 0; i < 512 / zeroDataLen; i++) - FSWrite(fRefNum, &zeroDataLen, &zeroData); - - pictLength = GetHandleSize((Handle)pictData); - HLock((Handle)pictData); - FSWrite(fRefNum, &pictLength, *pictData); - HUnlock((Handle)pictData); - - FSClose(fRefNum); -} - - - -static PicHandle FSpReadPicture (const FSSpec *spec) -{ - PicHandle pictData; - short fRefNum; - long fileSize, pictLength; - - FSpOpenDF(spec, fsRdPerm, &fRefNum); - GetEOF(fRefNum, &fileSize); - SetFPos(fRefNum, fsFromStart, 512); - - pictLength = fileSize - 512; - pictData = (PicHandle)NewHandle(pictLength); - if( pictData != nil ) - { - HLock((Handle)pictData); - FSRead(fRefNum, &pictLength, *pictData); - HUnlock((Handle)pictData); - } - FSClose(fRefNum); - - return(pictData); -} - -static PicHandle ImageToPICT(Image *im) -{ - GrafPtr saved; - //CGrafPort port;//commented by Kekus Digital - CGrafPtr port;//added by Kekus Digital - Rect bounds; - PixMapHandle pix = NULL; - PicHandle pic = NULL; - - long row_bytes; - Ptr raster_data; - long bytecount, response; - CTabHandle colours; - PixMapPtr pixptr; - unsigned char *rowptr; - unsigned long *pixelptr; - short y, x; - - /* is it possible? */ - if (Gestalt(gestaltQuickdrawVersion, &response) != noErr) response = 0; - if (response < gestalt32BitQD) return NULL; - - /* set up initial values for locals */ - row_bytes = ((32 * ((long) im->width) + 31) >> 5) << 2; - if( row_bytes != im->bytesPerLine ) - { - PrintError("Alignment problem: Rowbytes != bytesPerLine"); - return NULL; - } - bytecount = row_bytes * ((long) im->height); - colours = NULL; - raster_data = NULL; - - /* check for valid rowbytes */ - if (row_bytes > 0x00003FFF) goto bail; - - /* allocate the raster data */ - raster_data = (Ptr)*(im->data); - rowptr = (unsigned char *) raster_data; - for (y=0; y< im->height; y++, rowptr += row_bytes) - for (pixelptr = (unsigned long *) rowptr, x=0; x<im->width; x++) - *pixelptr++ &= 0x00FFFFFF; - - /* dummy colour table */ - colours = (CTabHandle) NewHandleClear(8); - if (colours == NULL) goto bail; - (*colours)->ctSeed = 24; - (*colours)->ctSize = -1; - - /* create the pixmap handle */ - pix = (PixMapHandle) NewHandleClear(sizeof(PixMap)); - if (pix == NULL) goto bail; - - /* set up the pixmap fields */ - HLock((Handle) pix); - pixptr = *pix; - pixptr->baseAddr = raster_data; - pixptr->rowBytes = (row_bytes | 0x8000); - pixptr->bounds.right = im->width; - pixptr->bounds.bottom = im->height; - pixptr->hRes = 0x00480000; /* resolution = 72 dots per inch */ - pixptr->vRes = 0x00480000; - pixptr->pixelSize = 32; - pixptr->pixelType = RGBDirect; - pixptr->cmpCount = 3; - pixptr->cmpSize = 8; - pixptr->pmTable = colours; - - bounds = (*pix)->bounds; - GetPort(&saved); - //OpenCPort(&port);//commented by Kekus Digital - port = CreateNewPort();//added by Kekus Digital - pic = OpenPicture(&bounds); - ClipRect(&bounds); - PlotPixMap(pix, 0, 0, srcCopy); - ClosePicture(); - SetPort(saved); - //ClosePort((GrafPtr) &port);//commented by Kekus Digital - DisposePort(port);//added by Kekus Digital - if (GetHandleSize((Handle) pic) == sizeof(Picture)) { - KillPicture(pic); - pic = NULL; - } -bail: - if (pix != NULL) DisposeHandle((Handle) pix); - if (colours != NULL) DisposeHandle((Handle) colours); - return pic; -} - - -static int PICTtoImage( Image *im, PicHandle pic ) -{ - Rect bounds; - PixMapHandle pix = NULL; - PixMapPort *pxmp; - PictInfo pInfo; - - long row_bytes; - Ptr raster_data; - Handle hdl_raster_data = NULL; - long bytecount, response; - CTabHandle colours; - PixMapPtr pixptr; - unsigned char *rowptr; - unsigned long *pixelptr; - short y, x; - - - if( GetPictInfo( pic, &pInfo, recordComments, (short) 0,systemMethod,(short) 0 ) != noErr ) - { - PrintError("Could not get Pict-info"); - return -1; - } - - bounds = pInfo.sourceRect; //(*pic)->picFrame; - OffsetRect(&bounds, -bounds.left, -bounds.top); - - /* is it possible? */ - if (Gestalt(gestaltQuickdrawVersion, &response) != noErr) response = 0; - if (response < gestalt32BitQD) return -1; - - /* set up initial values for locals */ - row_bytes = ((32 * ((long) bounds.right) + 31) >> 5) << 2; - bytecount = row_bytes * ((long) bounds.bottom); - colours = NULL; - raster_data = NULL; - - /* check for valid rowbytes */ - if (row_bytes > 0x00003FFF) return -1; - - /* allocate the raster data */ - hdl_raster_data=NewHandle(bytecount); - if (hdl_raster_data == NULL) - { - PrintError("Not enough memory to load picture"); - return -1; - } - HLock(hdl_raster_data); - - raster_data = *hdl_raster_data; - rowptr = (unsigned char *) raster_data; - for (y=0; y< bounds.bottom; y++, rowptr += row_bytes) - for (pixelptr = (unsigned long *) rowptr, x=0; x<bounds.right; x++) - *pixelptr++ = 0x00FFFFFF; - - /* dummy colour table */ - colours = (CTabHandle) NewHandleClear(8); - if( colours == NULL) return -1; - - (*colours)->ctSeed = 24; - (*colours)->ctSize = -1; - - /* create the pixmap handle */ - pix = (PixMapHandle) NewHandleClear(sizeof(PixMap)); - if (pix == NULL) return -1; - - /* set up the pixmap fields */ - HLock((Handle)pix); - pixptr = *pix; - pixptr->baseAddr = raster_data; - pixptr->rowBytes = (row_bytes | 0x8000); - pixptr->bounds.right = bounds.right; - pixptr->bounds.bottom = bounds.bottom; - pixptr->hRes = pI... [truncated message content] |
From: <bru...@us...> - 2009-02-01 21:18:34
|
Revision: 928 http://panotools.svn.sourceforge.net/panotools/?rev=928&view=rev Author: brunopostle Date: 2009-02-01 21:18:32 +0000 (Sun, 01 Feb 2009) Log Message: ----------- Don't ship .svn dirs in tarball bug #1861174 (Cyril Brulebois) Modified Paths: -------------- trunk/libpano/configure.ac trunk/libpano/tests/simpleStitch/Makefile.am trunk/libpano/tests/simpleTiff16/Makefile.am Added Paths: ----------- trunk/libpano/tests/simpleStitch/reference/Makefile.am trunk/libpano/tests/simpleTiff16/reference/Makefile.am Modified: trunk/libpano/configure.ac =================================================================== --- trunk/libpano/configure.ac 2009-02-01 17:59:30 UTC (rev 927) +++ trunk/libpano/configure.ac 2009-02-01 21:18:32 UTC (rev 928) @@ -142,7 +142,7 @@ AC_FUNC_VPRINTF AC_CHECK_FUNCS([floor memset pow setlocale sqrt strrchr]) -AC_CONFIG_FILES([Makefile build/Makefile build/win32/Makefile doc/Makefile m4/Makefile tools/Makefile tests/Makefile tests/simpleStitch/Makefile tests/simpleTiff16/Makefile]) +AC_CONFIG_FILES([Makefile build/Makefile build/win32/Makefile doc/Makefile m4/Makefile tools/Makefile tests/Makefile tests/simpleStitch/Makefile tests/simpleTiff16/Makefile tests/simpleStitch/reference/Makefile tests/simpleTiff16/reference/Makefile ]) AC_SUBST(ac_aux_dir) Modified: trunk/libpano/tests/simpleStitch/Makefile.am =================================================================== --- trunk/libpano/tests/simpleStitch/Makefile.am 2009-02-01 17:59:30 UTC (rev 927) +++ trunk/libpano/tests/simpleStitch/Makefile.am 2009-02-01 21:18:32 UTC (rev 928) @@ -1,9 +1,11 @@ -EXTRA_DIST = reference 051221_6054_750.jpg 051221_6055_750.jpg \ +EXTRA_DIST = 051221_6054_750.jpg 051221_6055_750.jpg \ ChangeLog README.txt simple.pto simple.txt MAINTAINERCLEANFILES = \ Makefile.in +SUBDIRS = reference + all: check: test Added: trunk/libpano/tests/simpleStitch/reference/Makefile.am =================================================================== --- trunk/libpano/tests/simpleStitch/reference/Makefile.am (rev 0) +++ trunk/libpano/tests/simpleStitch/reference/Makefile.am 2009-02-01 21:18:32 UTC (rev 928) @@ -0,0 +1,12 @@ +EXTRA_DIST = jpeg.jpg psd_mask.psd psd_no_mask.psd psd.psd tiff_deflate.tif \ + tiff_lzw.tif tiff_m0000.tif tiff_m0001.tif tiff_mask0000.tif tiff_mask0001.tif \ + tiff_m_cropped0000.tif tiff_m_cropped0001.tif tiff_none.tif + +MAINTAINERCLEANFILES = \ + Makefile.in + +all: +check: test +test: +verify: +clean: Modified: trunk/libpano/tests/simpleTiff16/Makefile.am =================================================================== --- trunk/libpano/tests/simpleTiff16/Makefile.am 2009-02-01 17:59:30 UTC (rev 927) +++ trunk/libpano/tests/simpleTiff16/Makefile.am 2009-02-01 21:18:32 UTC (rev 928) @@ -1,6 +1,8 @@ -EXTRA_DIST = reference 060520_3398.TIF \ +EXTRA_DIST = 060520_3398.TIF \ ChangeLog simple.txt +SUBDIRS = reference + MAINTAINERCLEANFILES = \ Makefile.in Added: trunk/libpano/tests/simpleTiff16/reference/Makefile.am =================================================================== --- trunk/libpano/tests/simpleTiff16/reference/Makefile.am (rev 0) +++ trunk/libpano/tests/simpleTiff16/reference/Makefile.am 2009-02-01 21:18:32 UTC (rev 928) @@ -0,0 +1,12 @@ +EXTRA_DIST = jpeg.jpg psd_mask.psd psd_no_mask.psd psd.psd tiff_deflate.tif \ + tiff_lzw.tif tiff_m0000.tif tiff_mask0000.tif tiff_m_cropped0000.tif \ + tiff_none.tif + +MAINTAINERCLEANFILES = \ + Makefile.in + +all: +check: test +test: +verify: +clean: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bru...@us...> - 2009-02-01 22:48:09
|
Revision: 929 http://panotools.svn.sourceforge.net/panotools/?rev=929&view=rev Author: brunopostle Date: 2009-02-01 22:48:03 +0000 (Sun, 01 Feb 2009) Log Message: ----------- add missing manpages bug #1877534 (Cyril Brulebois) Modified Paths: -------------- trunk/libpano/Makefile.am trunk/libpano/configure.ac Added Paths: ----------- trunk/libpano/man/ trunk/libpano/man/Makefile.am trunk/libpano/man/PTblender.1 trunk/libpano/man/PTblender.pod trunk/libpano/man/PTcrop.1 trunk/libpano/man/PTcrop.pod trunk/libpano/man/PTinfo.1 trunk/libpano/man/PTinfo.pod trunk/libpano/man/PTmasker.1 trunk/libpano/man/PTmasker.pod trunk/libpano/man/PTmender.1 trunk/libpano/man/PTmender.pod trunk/libpano/man/PToptimizer.1 trunk/libpano/man/PToptimizer.pod trunk/libpano/man/PTroller.1 trunk/libpano/man/PTroller.pod trunk/libpano/man/PTtiff2psd.1 trunk/libpano/man/PTtiff2psd.pod trunk/libpano/man/PTtiffdump.1 trunk/libpano/man/PTtiffdump.pod trunk/libpano/man/PTuncrop.1 trunk/libpano/man/PTuncrop.pod trunk/libpano/man/panoinfo.1 trunk/libpano/man/panoinfo.pod Modified: trunk/libpano/Makefile.am =================================================================== --- trunk/libpano/Makefile.am 2009-02-01 21:18:32 UTC (rev 928) +++ trunk/libpano/Makefile.am 2009-02-01 22:48:03 UTC (rev 929) @@ -94,7 +94,7 @@ noinst_HEADERS = $(INTERNAL_HDR) $(SYS_HDR) $(MAC_HDR) -SUBDIRS=m4 . tools doc build tests +SUBDIRS=m4 . tools doc build tests man distdir=lib$(PACKAGE)-$(VERSION) Modified: trunk/libpano/configure.ac =================================================================== --- trunk/libpano/configure.ac 2009-02-01 21:18:32 UTC (rev 928) +++ trunk/libpano/configure.ac 2009-02-01 22:48:03 UTC (rev 929) @@ -142,7 +142,7 @@ AC_FUNC_VPRINTF AC_CHECK_FUNCS([floor memset pow setlocale sqrt strrchr]) -AC_CONFIG_FILES([Makefile build/Makefile build/win32/Makefile doc/Makefile m4/Makefile tools/Makefile tests/Makefile tests/simpleStitch/Makefile tests/simpleTiff16/Makefile tests/simpleStitch/reference/Makefile tests/simpleTiff16/reference/Makefile ]) +AC_CONFIG_FILES([Makefile build/Makefile build/win32/Makefile doc/Makefile m4/Makefile tools/Makefile tests/Makefile tests/simpleStitch/Makefile tests/simpleTiff16/Makefile tests/simpleStitch/reference/Makefile tests/simpleTiff16/reference/Makefile man/Makefile]) AC_SUBST(ac_aux_dir) Added: trunk/libpano/man/Makefile.am =================================================================== --- trunk/libpano/man/Makefile.am (rev 0) +++ trunk/libpano/man/Makefile.am 2009-02-01 22:48:03 UTC (rev 929) @@ -0,0 +1,14 @@ +man_MANS = panoinfo.1 PTblender.1 PTcrop.1 PTinfo.1 PTmasker.1 PTmender.1 PToptimizer.1 PTroller.1 PTtiff2psd.1 PTtiffdump.1 PTuncrop.1 + +PACKAGE = 'LIBPANO13 TOOLS' + +EXTRA_DIST = panoinfo.pod PTblender.pod PTcrop.pod PTinfo.pod PTmasker.pod \ + PTmender.pod PToptimizer.pod PTroller.pod PTtiff2psd.pod PTtiffdump.pod \ + PTuncrop.pod $(man_MANS) + +%.1: %.pod + pod2man --center $(PACKAGE) --release $(PACKAGE_VERSION) $< $@ + +install-data-local: install-man + for f in $(man_MANS); do chmod a+r $(DESTDIR)$(mandir)/*/$$f; done + Added: trunk/libpano/man/PTblender.1 =================================================================== --- trunk/libpano/man/PTblender.1 (rev 0) +++ trunk/libpano/man/PTblender.1 2009-02-01 22:48:03 UTC (rev 929) @@ -0,0 +1,184 @@ +.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14 +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sh \" Subsection heading +.br +.if t .Sp +.ne 5 +.PP +\fB\\$1\fR +.PP +.. +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. | will give a +.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to +.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' +.\" expand to `' in nroff, nothing in troff, for use with C<>. +.tr \(*W-|\(bv\*(Tr +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.if \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.\" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.hy 0 +.if n .na +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "PTBLENDER 1" +.TH PTBLENDER 1 "2008-01-22" "2.9.12" "LIBPANO13 TOOLS" +.SH "NAME" +PTblender \- Colour and brightness correction of panoramas +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +\&\fBPTblender\fR [options] \fItiff_file(s)\fR +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +\&\fBPTblender\fR is a command-line tool that only implements the colour +and brightness correction functionality of \fBPTmender\fR. +.SH "OPTIONS" +.IX Header "OPTIONS" +.IP "\fB\-p\fR \fIprefix\fR" 4 +.IX Item "-p prefix" +Prefix for output filename. Defaults to \fIblended%4d\fR. +.IP "\fB\-k\fR \fIindex\fR" 4 +.IX Item "-k index" +Index of the image to use as a reference (0\-based, defaults to 0). +.IP "\fB\-t\fR \fI[0,1,2]\fR" 4 +.IX Item "-t [0,1,2]" +Type of colour correction: 0 full (default), 1 brightness only, 2 +colour only. +.IP "\fB\-c\fR" 4 +.IX Item "-c" +Output curves smooth (output one per each corrected file). +.IP "\fB\-m\fR" 4 +.IX Item "-m" +Output curves arbitrary map (output one per each corrected file). +.IP "\fB\-f\fR" 4 +.IX Item "-f" +Force processing (ignore warnings). +.IP "\fB\-x\fR" 4 +.IX Item "-x" +Delete source files (use with care). +.IP "\fB\-q\fR" 4 +.IX Item "-q" +Quiet run. +.IP "\fB\-h\fR" 4 +.IX Item "-h" +Output help summary. +.SH "SEE ALSO" +.IX Header "SEE ALSO" +<http://wiki.panotools.org/PTblender>, \fIPTmender\fR\|(1) +.SH "AUTHORS" +.IX Header "AUTHORS" +Panorama Tools was originally created by Professor Helmut Dersch, it's +now maintained by Bruno Postle <br...@po...>. +.PP +PTblender was written by Daniel M German <dmg...@uv...>. +.PP +This manpage was written by Cyril Brulebois +<cyril.brulebois@enst\-bretagne.fr> and is licensed under the same +terms as the libpano13 package itself. Added: trunk/libpano/man/PTblender.pod =================================================================== --- trunk/libpano/man/PTblender.pod (rev 0) +++ trunk/libpano/man/PTblender.pod 2009-02-01 22:48:03 UTC (rev 929) @@ -0,0 +1,75 @@ +=head1 NAME + +PTblender - Colour and brightness correction of panoramas + + +=head1 SYNOPSIS + +B<PTblender> [options] I<tiff_file(s)> + + +=head1 DESCRIPTION + +B<PTblender> is a command-line tool that only implements the colour +and brightness correction functionality of B<PTmender>. + + +=head1 OPTIONS + +=over + +=item B<-p> I<prefix> + +Prefix for output filename. Defaults to I<blended%4d>. + +=item B<-k> I<index> + +Index of the image to use as a reference (0-based, defaults to 0). + +=item B<-t> I<[0,1,2]> + +Type of colour correction: 0 full (default), 1 brightness only, 2 +colour only. + +=item B<-c> + +Output curves smooth (output one per each corrected file). + +=item B<-m> + +Output curves arbitrary map (output one per each corrected file). + +=item B<-f> + +Force processing (ignore warnings). + +=item B<-x> + +Delete source files (use with care). + +=item B<-q> + +Quiet run. + +=item B<-h> + +Output help summary. + +=back + + +=head1 SEE ALSO + +L<http://wiki.panotools.org/PTblender>, L<PTmender(1)> + + +=head1 AUTHORS + +Panorama Tools was originally created by Professor Helmut Dersch, it's +now maintained by Bruno Postle <br...@po...>. + +PTblender was written by Daniel M German <dmg...@uv...>. + +This manpage was written by Cyril Brulebois +<cyr...@en...> and is licensed under the same +terms as the libpano13 package itself. Added: trunk/libpano/man/PTcrop.1 =================================================================== --- trunk/libpano/man/PTcrop.1 (rev 0) +++ trunk/libpano/man/PTcrop.1 2009-02-01 22:48:03 UTC (rev 929) @@ -0,0 +1,172 @@ +.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14 +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sh \" Subsection heading +.br +.if t .Sp +.ne 5 +.PP +\fB\\$1\fR +.PP +.. +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. | will give a +.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to +.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' +.\" expand to `' in nroff, nothing in troff, for use with C<>. +.tr \(*W-|\(bv\*(Tr +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.if \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.\" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.hy 0 +.if n .na +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "PTCROP 1" +.TH PTCROP 1 "2008-01-22" "2.9.12" "LIBPANO13 TOOLS" +.SH "NAME" +PTcrop \- Crop TIFF images +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +\&\fBPTcrop\fR [options] \fItiff_file(s)\fR +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +\&\fBPTcrop\fR is a command-line tool that crops a \s-1TIFF\s0 image to its +bounding rectangle, preserving its original dimensions. +.SH "OPTIONS" +.IX Header "OPTIONS" +.IP "\fB\-p\fR \fIprefix\fR" 4 +.IX Item "-p prefix" +Prefix for output files (defaults to \fIcropped%4d\fR). +.IP "\fB\-f\fR" 4 +.IX Item "-f" +Force processing: Overwrite output files if they exists (use with +care). +.IP "\fB\-x\fR" 4 +.IX Item "-x" +Delete source files (use with care). +.IP "\fB\-q\fR" 4 +.IX Item "-q" +Quiet run +.IP "\fB\-h\fR" 4 +.IX Item "-h" +Output help summary. +.SH "SEE ALSO" +.IX Header "SEE ALSO" +\&\fIPTuncrop\fR\|(1) +.SH "AUTHORS" +.IX Header "AUTHORS" +Panorama Tools was originally created by Professor Helmut Dersch, it's +now maintained by Bruno Postle <br...@po...>. +.PP +PTcrop was written by Daniel M German <dmg...@uv...>. +.PP +This manpage was written by Cyril Brulebois +<cyril.brulebois@enst\-bretagne.fr> and is licensed under the same +terms as the libpano13 package itself. Added: trunk/libpano/man/PTcrop.pod =================================================================== --- trunk/libpano/man/PTcrop.pod (rev 0) +++ trunk/libpano/man/PTcrop.pod 2009-02-01 22:48:03 UTC (rev 929) @@ -0,0 +1,59 @@ +=head1 NAME + +PTcrop - Crop TIFF images + + +=head1 SYNOPSIS + +B<PTcrop> [options] I<tiff_file(s)> + + +=head1 DESCRIPTION + +B<PTcrop> is a command-line tool that crops a TIFF image to its +bounding rectangle, preserving its original dimensions. + + +=head1 OPTIONS + +=over + +=item B<-p> I<prefix> + +Prefix for output files (defaults to I<cropped%4d>). + +=item B<-f> + +Force processing: Overwrite output files if they exists (use with +care). + +=item B<-x> + +Delete source files (use with care). + +=item B<-q> + +Quiet run + +=item B<-h> + +Output help summary. + +=back + + +=head1 SEE ALSO + +L<PTuncrop(1)> + + +=head1 AUTHORS + +Panorama Tools was originally created by Professor Helmut Dersch, it's +now maintained by Bruno Postle <br...@po...>. + +PTcrop was written by Daniel M German <dmg...@uv...>. + +This manpage was written by Cyril Brulebois +<cyr...@en...> and is licensed under the same +terms as the libpano13 package itself. Added: trunk/libpano/man/PTinfo.1 =================================================================== --- trunk/libpano/man/PTinfo.1 (rev 0) +++ trunk/libpano/man/PTinfo.1 2009-02-01 22:48:03 UTC (rev 929) @@ -0,0 +1,155 @@ +.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14 +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sh \" Subsection heading +.br +.if t .Sp +.ne 5 +.PP +\fB\\$1\fR +.PP +.. +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. | will give a +.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to +.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' +.\" expand to `' in nroff, nothing in troff, for use with C<>. +.tr \(*W-|\(bv\*(Tr +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.if \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.\" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.hy 0 +.if n .na +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "PTINFO 1" +.TH PTINFO 1 "2008-01-22" "2.9.12" "LIBPANO13 TOOLS" +.SH "NAME" +PTinfo \- Display information about a panotools\-generated image +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +\&\fBPTinfo\fR [options] \fItiff_file(s)\fR +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +\&\fBPTinfo\fR displays information about an image created with panotools. +.SH "OPTIONS" +.IX Header "OPTIONS" +.IP "\fB\-h\fR" 4 +.IX Item "-h" +Output help summary. +.SH "AUTHORS" +.IX Header "AUTHORS" +Panorama Tools was originally created by Professor Helmut Dersch, it's +now maintained by Bruno Postle <br...@po...>. +.PP +PTinfo was written by Daniel M German <dmg...@uv...>. +.PP +This manpage was written by Cyril Brulebois +<cyril.brulebois@enst\-bretagne.fr> and is licensed under the same +terms as the libpano13 package itself. Added: trunk/libpano/man/PTinfo.pod =================================================================== --- trunk/libpano/man/PTinfo.pod (rev 0) +++ trunk/libpano/man/PTinfo.pod 2009-02-01 22:48:03 UTC (rev 929) @@ -0,0 +1,36 @@ +=head1 NAME + +PTinfo - Display information about a panotools-generated image + + +=head1 SYNOPSIS + +B<PTinfo> [options] I<tiff_file(s)> + + +=head1 DESCRIPTION + +B<PTinfo> displays information about an image created with panotools. + + +=head1 OPTIONS + +=over + +=item B<-h> + +Output help summary. + +=back + + +=head1 AUTHORS + +Panorama Tools was originally created by Professor Helmut Dersch, it's +now maintained by Bruno Postle <br...@po...>. + +PTinfo was written by Daniel M German <dmg...@uv...>. + +This manpage was written by Cyril Brulebois +<cyr...@en...> and is licensed under the same +terms as the libpano13 package itself. Added: trunk/libpano/man/PTmasker.1 =================================================================== --- trunk/libpano/man/PTmasker.1 (rev 0) +++ trunk/libpano/man/PTmasker.1 2009-02-01 22:48:03 UTC (rev 929) @@ -0,0 +1,210 @@ +.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14 +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sh \" Subsection heading +.br +.if t .Sp +.ne 5 +.PP +\fB\\$1\fR +.PP +.. +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. | will give a +.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to +.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' +.\" expand to `' in nroff, nothing in troff, for use with C<>. +.tr \(*W-|\(bv\*(Tr +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.if \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.\" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.hy 0 +.if n .na +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "PTMASKER 1" +.TH PTMASKER 1 "2008-01-22" "2.9.12" "LIBPANO13 TOOLS" +.SH "NAME" +PTmasker \- Compute stitching masks +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +\&\fBPTmasker\fR [options] \fItiff_file(s)\fR +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +\&\fBPTmasker\fR computes stitching masks. It implements the ability to +increase depth-of-field by stacking images. +.SH "OPTIONS" +.IX Header "OPTIONS" +.IP "\fB\-p\fR \fIprefix\fR" 4 +.IX Item "-p prefix" +Prefix for output files (defaults to \fImasked%4d\fR). +.IP "\fB\-e\fR \fIfeather\fR" 4 +.IX Item "-e feather" +Size of the feather (defaults to zero). +.IP "\fB\-f\fR" 4 +.IX Item "-f" +Force processing (do not stop on warnings). +.IP "\fB\-x\fR" 4 +.IX Item "-x" +Delete source files (use with care). +.IP "\fB\-q\fR" 4 +.IX Item "-q" +Quiet run. +.IP "\fB\-h\fR" 4 +.IX Item "-h" +Output help summary. +.IP "\fB\-z\fR" 4 +.IX Item "-z" +Enable Extended depth of field. +.IP "\fB\-m\fR" 4 +.IX Item "-m" +Focus estimation mask type. +.RS 4 +.IP "0 hard-edged masks, mutually exclusive" 4 +.IX Item "0 hard-edged masks, mutually exclusive" +.PD 0 +.IP "1 hard-edged masks, stack of nested masks" 4 +.IX Item "1 hard-edged masks, stack of nested masks" +.IP "2 blended masks, stack of nested masks" 4 +.IX Item "2 blended masks, stack of nested masks" +.RE +.RS 4 +.PD +.Sp +2 is default and strongly recommended: This option includes a +smoothing computation that seems to help a lot. +.RE +.IP "\fB\-w\fR \fIinteger\fR" 4 +.IX Item "-w integer" +Focus estimation window size. Only available if \-z. +.Sp +Recommended value is 0.51001114526f image width, e.g. 4 pixels for an +800\-pixel image. +.Sp +Computation cost for focus estimation increases proportional to N^2. +Defaults to w4. +.IP "\fB\-s\fR \fIinteger\fR" 4 +.IX Item "-s integer" +Smoothing window size. Only available if \-z. +.Sp +Recommended value is 0.50f image width, e.g. 4 pixels for an 800\-pixel +image. +.Sp +Computation cost for focus estimation increases proportional to N^2. +Defaults to w4. +.SH "AUTHORS" +.IX Header "AUTHORS" +Panorama Tools was originally created by Professor Helmut Dersch, it's +now maintained by Bruno Postle <br...@po...>. +.Sp +PTmasker was written by Daniel M German <dmg...@uv...>. +.Sp +This manpage was written by Cyril Brulebois +<cyril.brulebois@enst\-bretagne.fr> and is licensed under the same +terms as the libpano13 package itself. Added: trunk/libpano/man/PTmasker.pod =================================================================== --- trunk/libpano/man/PTmasker.pod (rev 0) +++ trunk/libpano/man/PTmasker.pod 2009-02-01 22:48:03 UTC (rev 929) @@ -0,0 +1,97 @@ +=head1 NAME + +PTmasker - Compute stitching masks + + +=head1 SYNOPSIS + +B<PTmasker> [options] I<tiff_file(s)> + + +=head1 DESCRIPTION + +B<PTmasker> computes stitching masks. It implements the ability to +increase depth-of-field by stacking images. + + +=head1 OPTIONS + +=over + +=item B<-p> I<prefix> + +Prefix for output files (defaults to I<masked%4d>). + +=item B<-e> I<feather> + +Size of the feather (defaults to zero). + +=item B<-f> + +Force processing (do not stop on warnings). + +=item B<-x> + +Delete source files (use with care). + +=item B<-q> + +Quiet run. + +=item B<-h> + +Output help summary. + +=item B<-z> + +Enable Extended depth of field. + +=item B<-m> + +Focus estimation mask type. + +=over + +=item 0 hard-edged masks, mutually exclusive + +=item 1 hard-edged masks, stack of nested masks + +=item 2 blended masks, stack of nested masks + +=back + +2 is default and strongly recommended: This option includes a +smoothing computation that seems to help a lot. + +=item B<-w> I<integer> + +Focus estimation window size. Only available if -z. + + +Recommended value is 0.51001114526f image width, e.g. 4 pixels for an +800-pixel image. + +Computation cost for focus estimation increases proportional to N^2. +Defaults to w4. + +=item B<-s> I<integer> + +Smoothing window size. Only available if -z. + +Recommended value is 0.50f image width, e.g. 4 pixels for an 800-pixel +image. + +Computation cost for focus estimation increases proportional to N^2. +Defaults to w4. + + +=head1 AUTHORS + +Panorama Tools was originally created by Professor Helmut Dersch, it's +now maintained by Bruno Postle <br...@po...>. + +PTmasker was written by Daniel M German <dmg...@uv...>. + +This manpage was written by Cyril Brulebois +<cyr...@en...> and is licensed under the same +terms as the libpano13 package itself. Added: trunk/libpano/man/PTmender.1 =================================================================== --- trunk/libpano/man/PTmender.1 (rev 0) +++ trunk/libpano/man/PTmender.1 2009-02-01 22:48:03 UTC (rev 929) @@ -0,0 +1,195 @@ +.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14 +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sh \" Subsection heading +.br +.if t .Sp +.ne 5 +.PP +\fB\\$1\fR +.PP +.. +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. | will give a +.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to +.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' +.\" expand to `' in nroff, nothing in troff, for use with C<>. +.tr \(*W-|\(bv\*(Tr +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.if \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.\" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.hy 0 +.if n .na +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "PTMENDER 1" +.TH PTMENDER 1 "2008-01-22" "2.9.12" "LIBPANO13 TOOLS" +.SH "NAME" +PTmender \- Replacement for PTStitcher +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +\&\fBPTmender\fR [options] \fIscript_filename\fR \fIimages\fR +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +\&\fBPTmender\fR is a replacement for Professor Helmut Dersch's PTStitcher. +Most useful features of PTStitcher have already been implemented, +particularly: +.IP "\(bu" 4 +Compatibility with existing command line and script usage +.IP "\(bu" 4 +Colour and brightness correction +.IP "\(bu" 4 +Multiple \s-1TIFF\s0 output +.IP "\(bu" 4 +\&\s-1PSD\s0 output with layer masks +.IP "\(bu" 4 +Flattened \s-1TIFF\s0, \s-1JPEG\s0 and \s-1PNG\s0 output +.PP +There is also new useful features not available in PTStitcher: +.IP "\(bu" 4 +Cropped \s-1TIFF\s0 output +.IP "\(bu" 4 +\&\s-1LZW\s0 compression of \s-1TIFF\s0 output +.PP +Features that haven't been implemented: +.IP "\(bu" 4 +Support for \s-1VRML\s0, \s-1PICT\s0, \s-1QTVR\s0, \s-1IVR\s0 +.IP "\(bu" 4 +Support for other-than-rectilinear lenses such as fisheyes +.IP "\(bu" 4 +Probably lots of other stuff +.SH "OPTIONS" +.IX Header "OPTIONS" +.IP "\fB\-o\fR \fIprefix\fR" 4 +.IX Item "-o prefix" +Prefix for output filename, defaults to \fIpano\fR. +.IP "\fB\-q\fR" 4 +.IX Item "-q" +Quiet run +.IP "\fB\-h\fR" 4 +.IX Item "-h" +Output help summary. +.IP "\fB\-s\fR" 4 +.IX Item "-s" +Sort the filenames provided on the command line in lexicographical +order (and only on the command line) +.PP +If no images are specified on the command line, then the \f(CW\*(C`i\*(C'\fR lines +are used. If \f(CW\*(C`i\*(C'\fR lines do not contain a valid filename then the \f(CW\*(C`o\*(C'\fR +lines are used. +.SH "AUTHORS" +.IX Header "AUTHORS" +Panorama Tools was originally created by Professor Helmut Dersch, it's +now maintained by Bruno Postle <br...@po...>. +.PP +PTmender was written by Daniel M German <dmg...@uv...>. +.PP +This manpage was written by Cyril Brulebois +<cyril.brulebois@enst\-bretagne.fr> and is licensed under the same +terms as the libpano13 package itself. Added: trunk/libpano/man/PTmender.pod =================================================================== --- trunk/libpano/man/PTmender.pod (rev 0) +++ trunk/libpano/man/PTmender.pod 2009-02-01 22:48:03 UTC (rev 929) @@ -0,0 +1,113 @@ +=head1 NAME + +PTmender - Replacement for PTStitcher + + +=head1 SYNOPSIS + +B<PTmender> [options] I<script_filename> I<images> + + +=head1 DESCRIPTION + +B<PTmender> is a replacement for Professor Helmut Dersch's PTStitcher. +Most useful features of PTStitcher have already been implemented, +particularly: + +=over + +=item * + +Compatibility with existing command line and script usage + +=item * + +Colour and brightness correction + +=item * + +Multiple TIFF output + +=item * + +PSD output with layer masks + +=item * + +Flattened TIFF, JPEG and PNG output + +=back + + +There is also new useful features not available in PTStitcher: + +=over + +=item * + +Cropped TIFF output + +=item * + +LZW compression of TIFF output + +=back + + +Features that haven't been implemented: + +=over + +=item * + +Support for VRML, PICT, QTVR, IVR + +=item * + +Support for other-than-rectilinear lenses such as fisheyes + +=item * + +Probably lots of other stuff + +=back + + +=head1 OPTIONS + +=over + +=item B<-o> I<prefix> + +Prefix for output filename, defaults to I<pano>. + +=item B<-q> + +Quiet run + +=item B<-h> + +Output help summary. + +=item B<-s> + +Sort the filenames provided on the command line in lexicographical +order (and only on the command line) + +=back + +If no images are specified on the command line, then the C<i> lines +are used. If C<i> lines do not contain a valid filename then the C<o> +lines are used. + + +=head1 AUTHORS + +Panorama Tools was originally created by Professor Helmut Dersch, it's +now maintained by Bruno Postle <br...@po...>. + +PTmender was written by Daniel M German <dmg...@uv...>. + +This manpage was written by Cyril Brulebois +<cyr...@en...> and is licensed under the same +terms as the libpano13 package itself. Added: trunk/libpano/man/PToptimizer.1 =================================================================== --- trunk/libpano/man/PToptimizer.1 (rev 0) +++ trunk/libpano/man/PToptimizer.1 2009-02-01 22:48:03 UTC (rev 929) @@ -0,0 +1,152 @@ +.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14 +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sh \" Subsection heading +.br +.if t .Sp +.ne 5 +.PP +\fB\\$1\fR +.PP +.. +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. | will give a +.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to +.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' +.\" expand to `' in nroff, nothing in troff, for use with C<>. +.tr \(*W-|\(bv\*(Tr +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.if \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.\" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.hy 0 +.if n .na +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "PTOPTIMIZER 1" +.TH PTOPTIMIZER 1 "2008-01-22" "2.9.12" "LIBPANO13 TOOLS" +.SH "NAME" +PToptimizer \- Wrapper around control point optimization routines +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +\&\fBPToptimizer\fR \fIscript_file\fR +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +\&\fBPToptimizer\fR is a simple wrapper around control point optimization +routines available in libpano13. +.SH "SEE ALSO" +.IX Header "SEE ALSO" +<http://www.panotools.info/mediawiki/index.php?title=PTOptimizer> +.SH "AUTHORS" +.IX Header "AUTHORS" +Panorama Tools was originally created by Professor Helmut Dersch, it's +now maintained by Bruno Postle <br...@po...>. +.PP +This manpage was written by Cyril Brulebois +<cyril.brulebois@enst\-bretagne.fr> and is licensed under the same +terms as the libpano13 package itself. Added: trunk/libpano/man/PToptimizer.pod =================================================================== --- trunk/libpano/man/PToptimizer.pod (rev 0) +++ trunk/libpano/man/PToptimizer.pod 2009-02-01 22:48:03 UTC (rev 929) @@ -0,0 +1,29 @@ +=head1 NAME + +PToptimizer - Wrapper around control point optimization routines + + +=head1 SYNOPSIS + +B<PToptimizer> I<script_file> + + +=head1 DESCRIPTION + +B<PToptimizer> is a simple wrapper around control point optimization +routines available in libpano13. + + +=head1 SEE ALSO + +L<http://www.panotools.info/mediawiki/index.php?title=PTOptimizer> + + +=head1 AUTHORS + +Panorama Tools was originally created by Professor Helmut Dersch, it's +now maintained by Bruno Postle <br...@po...>. + +This manpage was written by Cyril Brulebois +<cyr...@en...> and is licensed under the same +terms as the libpano13 package itself. Added: trunk/libpano/man/PTroller.1 =================================================================== --- trunk/libpano/man/PTroller.1 (rev 0) +++ trunk/libpano/man/PTroller.1 2009-02-01 22:48:03 UTC (rev 929) @@ -0,0 +1,167 @@ +.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14 +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sh \" Subsection heading +.br +.if t .Sp +.ne 5 +.PP +\fB\\$1\fR +.PP +.. +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. | will give a +.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to +.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' +.\" expand to `' in nroff, nothing in troff, for use with C<>. +.tr \(*W-|\(bv\*(Tr +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.if \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.\" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.hy 0 +.if n .na +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "PTROLLER 1" +.TH PTROLLER 1 "2008-01-22" "2.9.12" "LIBPANO13 TOOLS" +.SH "NAME" +PTroller \- Merge several images into a single one +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +\&\fBPTroller\fR [options] \fItiff_file(s)\fR +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +\&\fBPTroller\fR takes a set of images and merges them into a single one. +.SH "OPTIONS" +.IX Header "OPTIONS" +.IP "\fB\-o\fR \fIfilename\fR" 4 +.IX Item "-o filename" +Output filename (defaults to \fImerged.tif\fR). +.IP "\fB\-f\fR" 4 +.IX Item "-f" +Force processing (do not stop on warnings). +.IP "\fB\-x\fR" 4 +.IX Item "-x" +Delete source files (use with care). +.IP "\fB\-q\fR" 4 +.IX Item "-q" +Quiet run +.IP "\fB\-h\fR" 4 +.IX Item "-h" +Show this message +.SH "AUTHORS" +.IX Header "AUTHORS" +Panorama Tools was originally created by Professor Helmut Dersch, it's +now maintained by Bruno Postle <br...@po...>. +.PP +PTroller was written by Daniel M German <dmg...@uv...>. +.PP +This manpage was written by Cyril Brulebois +<cyril.brulebois@enst\-bretagne.fr> and is licensed under the same +terms as the libpano13 package itself. Added: trunk/libpano/man/PTroller.pod =================================================================== --- trunk/libpano/man/PTroller.pod (rev 0) +++ trunk/libpano/man/PTroller.pod 2009-02-01 22:48:03 UTC (rev 929) @@ -0,0 +1,52 @@ +=head1 NAME + +PTroller - Merge several images into a single one + + +=head1 SYNOPSIS + +B<PTroller> [options] I<tiff_file(s)> + + +=head1 DESCRIPTION + +B<PTroller> takes a set of images and merges them into a single one. + + +=head1 OPTIONS + +=over + +=item B<-o> I<filename> + +Output filename (defaults to I<merged.tif>). + +=item B<-f> + +Force processing (do not stop on warnings). + +=item B<-x> + +Delete source files (use with care). + +=item B<-q> + +Quiet run + +=item B<-h> + +Show this message + +=back + + +=head1 AUTHORS + +Panorama Tools was originally created by Professor Helmut Dersch, it's +now maintained by Bruno Postle <br...@po...>. + +PTroller was written by Daniel M German <dmg...@uv...>. + +This manpage was written by Cyril Brulebois +<cyr...@en...> and is licensed under the same +terms as the libpano13 package itself. Added: trunk/libpano/man/PTtiff2psd.1 =================================================================== --- trunk/libpano/man/PTtiff2psd.1 (rev 0) +++ trunk/libpano/man/PTtiff2psd.1 2009-02-01 22:48:03 UTC (rev 929) @@ -0,0 +1,218 @@ +.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14 +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sh \" Subsection heading +.br +.if t .Sp +.ne 5 +.PP +\fB\\$1\fR +.PP +.. +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. | will give a +.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to +.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' +.\" expand to `' in nroff, nothing in troff, for use with C<>. +.tr \(*W-|\(bv\*(Tr +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.if \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.\" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.hy 0 +.if n .na +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "PTTIFF2PSD 1" +.TH PTTIFF2PSD 1 "2008-01-22" "2.9.12" "LIBPANO13 TOOLS" +.SH "NAME" +PTtiff2psd \- Convert a set of TIFF files into a Photoshop PSD file +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +\&\fBPTtiff2psd\fR [options] \fItiff_file(s)\fR +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +\&\fBPTtiff2psd\fR is a command-line tool that crops a \s-1TIFF\s0 image to its +bounding rectangle, preserving its original dimensions. +.SH "OPTIONS" +.IX Header "OPTIONS" +.IP "\fB\-o\fR \fIfilename\fR" 4 +.IX Item "-o filename" +Output filename (defaults to \fImerged.psd\fR). +.IP "\fB\-b\fR \fIblendingmode\fR" 4 +.IX Item "-b blendingmode" +Specify blending mode for layers (use \fB\-h\fR to display them). +.IP "\fB\-s\fR" 4 +.IX Item "-s" +Stack them. +.IP "\fB\-r\fR" 4 +.IX Item "-r" +Reverse layers. +.IP "\fB\-f\fR" 4 +.IX Item "-f" +Force processing (do no stop on warning). +.IP "\fB\-q\fR" 4 +.IX Item "-q" +Quiet run +.IP "\fB\-h\fR" 4 +.IX Item "-h" +Output help summary. +.PP +Valid blending modes: +.IP "\fB0\fR" 4 +.IX Item "0" +Normal +.IP "\fB1\fR" 4 +.IX Item "1" +Color +.IP "\fB2\fR" 4 +.IX Item "2" +Darken +.IP "\fB3\fR" 4 +.IX Item "3" +Difference +.IP "\fB4\fR" 4 +.IX Item "4" +Dissolve +.IP "\fB5\fR" 4 +.IX Item "5" +Hard +.IP "\fB6\fR" 4 +.IX Item "6" +Hue +.IP "\fB7\fR" 4 +.IX Item "7" +Lighten +.IP "\fB8\fR" 4 +.IX Item "8" +Luminosity +.IP "\fB9\fR" 4 +.IX Item "9" +Multiply +.IP "\fB10\fR" 4 +.IX Item "10" +Overlay +.IP "\fB11\fR" 4 +.IX Item "11" +Sof +.IP "\fB12\fR" 4 +.IX Item "12" +Saturation +.IP "\fB13\fR" 4 +.IX Item "13" +Screen +.SH "AUTHORS" +.IX Header "AUTHORS" +Panorama Tools was originally created by Professor Helmut Dersch, it's +now maintained by Bruno Postle <br...@po...>. +.PP +PTtiff2psd was written by Daniel M German <dmg...@uv...>. +.PP +This manpage was written by Cyril Brulebois +<cyril.brulebois@enst\-bretagne.fr> and is licensed under the same +terms as the libpano13 package itself. Added: trunk/libpano/man/PTtiff2psd.pod =================================================================== --- trunk/libpano/man/PTtiff2psd.pod (rev 0) +++ trunk/libpano/man/PTtiff2psd.pod 2009-02-01 22:48:03 UTC (rev 929) @@ -0,0 +1,124 @@ +=head1 NAME + +PTtiff2psd - Convert a set of TIFF files into a Photoshop PSD file + + +=head1 SYNOPSIS + +B<PTtiff2psd> [options] I<tiff_file(s)> + + +=head1 DESCRIPTION + +B<PTtiff2psd> is a command-line tool that crops a TIFF image to its +bounding rectangle, preserving its original dimensions. + + +=head1 OPTIONS + +=over + +=item B<-o> I<filename> + +Output filename (defaults to I<merged.psd>). + +=item B<-b> I<blendingmode> + +Specify blending mode for layers (use B<-h> to display them). + +=item B<-s> + +Stack them. + +=item B<-r> + +Reverse layers. + +=item B<-f> + +Force processing (do no stop on warning). + +=item B<-q> + +Quiet run + +=item B<-h> + +Output help summary. + +=back + + +Valid blending modes: + +=over + +=item B<0> + +Normal + +=item B<1> + +Color + +=item B<2> + +Darken + +=item B<3> + +Difference + +=item B<4> + +Dissolve + +=item B<5> + +Hard + +=item B<6> + +Hue + +=item B<7> + +Lighten + +=item B<8> + +Luminosity + +=item B<9> + +Multiply + +=item B<10> + +Overlay + +=item B<11> + +Sof + +=item B<12> + +Saturation + +=item B<13> + +Screen + +=back + + +=head1 AUTHORS + +Panorama Tools was originally created by Professor Helmut Dersch, it's +now maintained by Bruno Postle <br...@po...>. + +PTtiff2psd was written by Daniel M German <dmg...@uv...>. + +This manpage was written by Cyril Brulebois +<cyr...@en...> and is licensed under the same +terms as the libpano13 package itself. Added: trunk/libpano/man/PTtiffdump.1 =================================================================== --- trunk/libpano/man/PTtiffdump.1 (rev 0) +++ trunk/libpano/man/PTtiffdump.1 2009-02-01 22:48:03 UTC (rev 929) @@ -0,0 +1,162 @@ +.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14 +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sh \" Subsection heading +.br +.if t .Sp +.ne 5 +.PP +\fB\\$1\fR +.PP +.. +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. | will give a +.\" real vertical bar. \*(C+ will give a nicer ... [truncated message content] |
From: <bru...@us...> - 2009-02-01 23:15:36
|
Revision: 930 http://panotools.svn.sourceforge.net/panotools/?rev=930&view=rev Author: brunopostle Date: 2009-02-01 23:15:33 +0000 (Sun, 01 Feb 2009) Log Message: ----------- Fix vague licensing, bug #1877526 (Cyril Brulebois) Modified Paths: -------------- trunk/libpano/f2c.h trunk/libpano/jpegicc.c trunk/libpano/jpegicc.h trunk/libpano/rgbe.c trunk/libpano/rgbe.h Modified: trunk/libpano/f2c.h =================================================================== --- trunk/libpano/f2c.h 2009-02-01 22:48:03 UTC (rev 929) +++ trunk/libpano/f2c.h 2009-02-01 23:15:33 UTC (rev 930) @@ -1,5 +1,25 @@ /* f2c.h -- Standard Fortran to C header file */ +/* Copyright: (c) 1990-1995 AT&T Bell Laboratories and Bellcore +Permission to use, copy, modify, and distribute this software +and its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the names of AT&T Bell Laboratories or +Bellcore or any of their entities not be used in advertising or +publicity pertaining to distribution of the software without +specific, written prior permission. + +AT&T and Bellcore disclaim all warranties with regard to this +software, including all implied warranties of merchantability +and fitness. In no event shall AT&T or Bellcore be liable for +any special, indirect or consequential damages or any damages +whatsoever resulting from loss of use, data or profits, whether +in an action of contract, negligence or other tortious action, +arising out of or in connection with the use or performance of +this software. */ + /** barf [ba:rf] 2. "He suggested using FORTRAN, and everybody barfed." - From The Shogakukan DICTIONARY OF NEW ENGLISH (Second edition) */ Modified: trunk/libpano/jpegicc.c =================================================================== --- trunk/libpano/jpegicc.c 2009-02-01 22:48:03 UTC (rev 929) +++ trunk/libpano/jpegicc.c 2009-02-01 23:15:33 UTC (rev 930) @@ -5,9 +5,7 @@ * Marti for permission to change its license from MIT to GPL (Aug 4, * 2006). Daniel German * - * Copyright Tom Lane and Marti Maria - * - * Dec 2006 + * Copyright (C) 1998-2006 Tom Lane and Marti Maria * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public Modified: trunk/libpano/jpegicc.h =================================================================== --- trunk/libpano/jpegicc.h 2009-02-01 22:48:03 UTC (rev 929) +++ trunk/libpano/jpegicc.h 2009-02-01 23:15:33 UTC (rev 930) @@ -5,9 +5,7 @@ * Marti for permission to change its license from MIT to GPL (Aug 4, * 2006). Daniel German * - * Copyright Tom Lane and Marti Maria - * - * Dec 2006 + * Copyright (C) 1998-2006 Tom Lane and Marti Maria * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public Modified: trunk/libpano/rgbe.c =================================================================== --- trunk/libpano/rgbe.c 2009-02-01 22:48:03 UTC (rev 929) +++ trunk/libpano/rgbe.c 2009-02-01 23:15:33 UTC (rev 930) @@ -2,6 +2,10 @@ * WHILE THE AUTHORS HAVE TRIED TO ENSURE THE PROGRAM WORKS CORRECTLY, * IT IS STRICTLY USE AT YOUR OWN RISK. */ +/* Copyright (c) 1995 Bruce Walter <bj...@gr...> + The license of these files has been clarified by Bruce Walter during + a private email conversation. These files are public domain. */ + #include "rgbe.h" #include <math.h> #include <stdlib.h> Modified: trunk/libpano/rgbe.h =================================================================== --- trunk/libpano/rgbe.h 2009-02-01 22:48:03 UTC (rev 929) +++ trunk/libpano/rgbe.h 2009-02-01 23:15:33 UTC (rev 930) @@ -4,6 +4,10 @@ * WHILE THE AUTHORS HAVE TRIED TO ENSURE THE PROGRAM WORKS CORRECTLY, * IT IS STRICTLY USE AT YOUR OWN RISK. */ +/* Copyright (c) 1995 Bruce Walter <bj...@gr...> + The license of these files has been clarified by Bruce Walter during + a private email conversation. These files are public domain. */ + /* utility for reading and writing Ward's rgbe image format. See rgbe.txt file for more details. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bru...@us...> - 2009-02-01 23:25:01
|
Revision: 931 http://panotools.svn.sourceforge.net/panotools/?rev=931&view=rev Author: brunopostle Date: 2009-02-01 23:24:58 +0000 (Sun, 01 Feb 2009) Log Message: ----------- autotools cross-compile support, bug #2491104 (Diego E. Petteno) Modified Paths: -------------- trunk/libpano/configure.ac trunk/libpano/m4/ax_check_java.m4 Modified: trunk/libpano/configure.ac =================================================================== --- trunk/libpano/configure.ac 2009-02-01 23:15:33 UTC (rev 930) +++ trunk/libpano/configure.ac 2009-02-01 23:24:58 UTC (rev 931) @@ -6,7 +6,7 @@ AC_CONFIG_SRCDIR([PTDialogs.c]) AC_CONFIG_AUX_DIR(config) AC_CONFIG_HEADER([config.h]) -AC_CANONICAL_TARGET +AC_CANONICAL_HOST AM_INIT_AUTOMAKE([no-define dist-bzip2 dist-zip]) AC_DISABLE_STATIC @@ -21,11 +21,11 @@ dnl dnl Check the operating system dnl -case "${target_os}" in +case "${host_os}" in "") PANO_WIN32_RESOURCE= HSYS=unknown - HCPU="${target_cpu}" + HCPU="${host_cpu}" ;; linux*) PANO_WIN32_RESOURCE= @@ -33,7 +33,7 @@ dnl dnl Check the cpu to allow lib/lib64 decisions dnl - case "${target_cpu}" in + case "${host_cpu}" in "") HCPU=unknown ;; @@ -41,19 +41,19 @@ HCPU=amd64 ;; *) - HCPU="${target_cpu}" + HCPU="${host_cpu}" ;; esac ;; *darwin*) PANO_WIN32_RESOURCE= HSYS=darwin - HCPU="${target_cpu}" + HCPU="${host_cpu}" ;; *mingw32*) PANO_WIN32_RESOURCE=pano13.lo HSYS=mingw32 - HCPU="${target_cpu}" + HCPU="${host_cpu}" ;; *cygwin*) PANO_WIN32_RESOURCE=pano13.lo @@ -62,12 +62,12 @@ CXXFLAGS="-mno-cygwin $CXXFLAGS" LDFLAGS="-mno-cygwin $LDFLAGS" HSYS=cygwin - HCPU="${target_cpu}" + HCPU="${host_cpu}" ;; *) PANO_WIN32_RESOURCE= - HSYS="${target_os}" - HCPU="${target_cpu}" + HSYS="${host_os}" + HCPU="${host_cpu}" ;; esac @@ -153,7 +153,6 @@ echo "matches your expectations." echo "" echo "Host system type : $host" -echo "Target os : $target_os" echo "" echo " Option Value" echo "-------------------------------------------------------------------------" Modified: trunk/libpano/m4/ax_check_java.m4 =================================================================== --- trunk/libpano/m4/ax_check_java.m4 2009-02-01 23:15:33 UTC (rev 930) +++ trunk/libpano/m4/ax_check_java.m4 2009-02-01 23:24:58 UTC (rev 931) @@ -75,7 +75,7 @@ failed=0; passed=0; JAVA_OLD_CPPFLAGS=$CPPFLAGS - case "${target_os}" in + case "${host_os}" in linux*) java_extra_inc=linux ;; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bru...@us...> - 2009-02-02 20:39:40
|
Revision: 933 http://panotools.svn.sourceforge.net/panotools/?rev=933&view=rev Author: brunopostle Date: 2009-02-02 20:39:35 +0000 (Mon, 02 Feb 2009) Log Message: ----------- housekeeping Modified Paths: -------------- trunk/libpano/ChangeLog trunk/libpano/tools/.cvsignore Added Paths: ----------- trunk/libpano/man/.cvsignore trunk/libpano/tests/simpleStitch/reference/.cvsignore trunk/libpano/tests/simpleTiff16/.cvsignore trunk/libpano/tests/simpleTiff16/reference/.cvsignore Modified: trunk/libpano/ChangeLog =================================================================== --- trunk/libpano/ChangeLog 2009-02-01 23:34:31 UTC (rev 932) +++ trunk/libpano/ChangeLog 2009-02-02 20:39:35 UTC (rev 933) @@ -1,40 +1,118 @@ -2009-01-17 Thomas Modes +2009-02-01 23:34 brunopostle - * match.c: fix reverse calculation for pannini + * tools/PTmasker.c: fix for invalid format specification, bug + #2163676 (Stanislav Brabec) -2009-01-02 dmg <dmg@phosphorus> +2009-02-01 23:24 brunopostle - * * adjust.c, filter.h, math.c, panorama.h, parser.c & - queryfeateature.c: + * configure.ac, m4/ax_check_java.m4: autotools cross-compile + support, bug #2491104 (Diego E. Petteno) - Fixed the panini (or should we call it pannini) and renamed - previous projection as equirectangular panini. It might have to - change its name - +2009-02-01 23:15 brunopostle -2008-01-26 Jim Watters <jwa...@ph...> + * f2c.h, jpegicc.c, jpegicc.h, rgbe.c, rgbe.h: Fix vague licensing, + bug #1877526 (Cyril Brulebois) - * adjust.c, filter.h, math.c, panorama.h, parser.c & queryfeateature.c - added mirror, equisolid, orthographic, and stereographic as input image formats - added equisolid, orthographic, stereographic as output panorama formats +2009-02-01 22:48 brunopostle + * Makefile.am, configure.ac, man, man/Makefile.am, man/PTblender.1, + man/PTblender.pod, man/PTcrop.1, man/PTcrop.pod, man/PTinfo.1, + man/PTinfo.pod, man/PTmasker.1, man/PTmasker.pod, man/PTmender.1, + man/PTmender.pod, man/PToptimizer.1, man/PToptimizer.pod, + man/PTroller.1, man/PTroller.pod, man/PTtiff2psd.1, + man/PTtiff2psd.pod, man/PTtiffdump.1, man/PTtiffdump.pod, + man/PTuncrop.1, man/PTuncrop.pod, man/panoinfo.1, + man/panoinfo.pod: add missing manpages bug #1877534 (Cyril + Brulebois) -2008-12-29 dmg <dmg@phosphorus> +2009-02-01 21:18 brunopostle - * panorama.h, math.c, adjust.c, queryfeature.c, filter.h: Finally - added the architectural. + * configure.ac, tests/simpleStitch/Makefile.am, + tests/simpleStitch/reference/Makefile.am, + tests/simpleTiff16/Makefile.am, + tests/simpleTiff16/reference/Makefile.am: Don't ship .svn dirs in + tarball bug #1861174 (Cyril Brulebois) - * queryfeature.c (panoProjectionFeaturesQuery): Added querying - features for panini; this will allow Hugin to use it. +2009-02-01 17:59 brunopostle -2008-12-29 dmg <dm...@uv...> + * Makefile.am, PixMap.c, PixMap.h, README.mac, makefile.mac, + pict.c: Remove GPL incompatible files (bug #1861841), this + removes mac classic support + and hopefully doesn't break anything in OS X. - * panorama.h, math.c, adjust.c, queryfeature.c, filter.h, - parser.c: Added panini projection. the credit goes to Thomas - Sharpless who rediscovered it, and to Bruno Postle, who did the - original math. +2009-02-01 17:37 brunopostle + * bootstrap: support libtool-2.0 bug #2011492 +2009-01-17 22:35 brunopostle + + * ChangeLog, math.c: fix reverse calculation for pannini (Thomas + Modes) + +2009-01-08 23:47 brunopostle + + * queryfeature.c: maximum field of view for pannini should be + equivalent to related projections + +2009-01-03 07:22 dmg + + * ChangeLog, adjust.c, filter.h, math.c, panorama.h, parser.c, + queryfeature.c: 2009-01-02 dmg <dmg@phosphorus> + + * * adjust.c, filter.h, math.c, panorama.h, parser.c & + queryfeateature.c: + + Fixed the panini (or should we call it pannini) and renamed + previous projection as equirectangular panini. It might have to + change its name + +2008-12-31 16:12 jim0watters + + * queryfeature.c: Add missing projections for + panoProjectionFeaturesQuery c/o Yuv + +2008-12-31 05:59 jim0watters + + * ., ChangeLog, adjust.c, doc/Optimize.txt, doc/stitch.txt, + filter.h, math.c, panorama.h, parser.c, queryfeature.c: adjust.c, + filter.h, math.c, panorama.h, parser.c & queryfeateature.c + added mirror, equisolid, orthographic, and stereographic as input + image formats + added equisolid, orthographic, stereographic as output panorama + formats + add some more defines to panorama.h to help image and pano + formats + +2008-12-31 05:25 jim0watters + + * PTcommon.c, correct.c, filter.c, morpher.c, pt_stdint.h, + pteditor.c, ptpicker.c: Initialize TrformStr structure before use + +2008-12-29 23:05 dmg + + * ChangeLog, adjust.c, filter.h, math.c, panorama.h, parser.c, + queryfeature.c: 2008-12-29 dmg <dmg@phosphorus> + + * panorama.h, math.c, adjust.c, queryfeature.c, filter.h: Finally + added the architectural. + +2008-12-29 21:37 dmg + + * ChangeLog, queryfeature.c: 2008-12-29 dmg <dmg@phosphorus> + + * queryfeature.c (panoProjectionFeaturesQuery): Added querying + features for panini; this will allow Hugin to use it + +2008-12-29 12:07 dmg + + * ChangeLog, adjust.c, filter.h, math.c, panorama.h, parser.c, + queryfeature.c: 2008-12-29 dmg <dm...@uv...> + + * panorama.h, math.c, adjust.c, queryfeature.c, filter.h, + parser.c: Added panini projection. the credit goes to Thomas + Sharpless who rediscovered it, and to Bruno Postle, who did the + original math. + 2008-08-11 dmg <dm...@uv...> * bootstrap (have_libtool): Added support for 2.2.* version of Added: trunk/libpano/man/.cvsignore =================================================================== --- trunk/libpano/man/.cvsignore (rev 0) +++ trunk/libpano/man/.cvsignore 2009-02-02 20:39:35 UTC (rev 933) @@ -0,0 +1,2 @@ +Makefile.in +Makefile Added: trunk/libpano/tests/simpleStitch/reference/.cvsignore =================================================================== --- trunk/libpano/tests/simpleStitch/reference/.cvsignore (rev 0) +++ trunk/libpano/tests/simpleStitch/reference/.cvsignore 2009-02-02 20:39:35 UTC (rev 933) @@ -0,0 +1,2 @@ +Makefile.in +Makefile Added: trunk/libpano/tests/simpleTiff16/.cvsignore =================================================================== --- trunk/libpano/tests/simpleTiff16/.cvsignore (rev 0) +++ trunk/libpano/tests/simpleTiff16/.cvsignore 2009-02-02 20:39:35 UTC (rev 933) @@ -0,0 +1,2 @@ +Makefile.in +Makefile Added: trunk/libpano/tests/simpleTiff16/reference/.cvsignore =================================================================== --- trunk/libpano/tests/simpleTiff16/reference/.cvsignore (rev 0) +++ trunk/libpano/tests/simpleTiff16/reference/.cvsignore 2009-02-02 20:39:35 UTC (rev 933) @@ -0,0 +1,2 @@ +Makefile.in +Makefile Modified: trunk/libpano/tools/.cvsignore =================================================================== --- trunk/libpano/tools/.cvsignore 2009-02-01 23:34:31 UTC (rev 932) +++ trunk/libpano/tools/.cvsignore 2009-02-02 20:39:35 UTC (rev 933) @@ -10,3 +10,10 @@ PTtiff2psd panoinfo PTuncrop +PTroller +PToptimizer +PTmasker +PTcrop +PTtiffdump +PTAInterpolate +PTinfo This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <da...@us...> - 2009-02-02 21:29:31
|
Revision: 934 http://panotools.svn.sourceforge.net/panotools/?rev=934&view=rev Author: dangelo Date: 2009-02-02 21:29:28 +0000 (Mon, 02 Feb 2009) Log Message: ----------- equirect -> rectilinear transform: reject points behind the camera applied patch with biplane and triplane projections. Modified Paths: -------------- trunk/libpano/ChangeLog trunk/libpano/math.c Modified: trunk/libpano/ChangeLog =================================================================== --- trunk/libpano/ChangeLog 2009-02-02 20:39:35 UTC (rev 933) +++ trunk/libpano/ChangeLog 2009-02-02 21:29:28 UTC (rev 934) @@ -1,3 +1,10 @@ +2009-02-02 22:24 dangelo + + * math.c: rect_erect: equirect -> rectilinear projection: reject + points behind the camera (fixes some problems with hugins fast + preview). Applied dualplane and triplane projection patch (by unknown + author). + 2009-02-01 23:34 brunopostle * tools/PTmasker.c: fix for invalid format specification, bug Modified: trunk/libpano/math.c =================================================================== --- trunk/libpano/math.c 2009-02-02 20:39:35 UTC (rev 933) +++ trunk/libpano/math.c 2009-02-02 21:29:28 UTC (rev 934) @@ -575,7 +575,19 @@ *x_src = distanceparam * tan(phi); *y_src = distanceparam / (tan( theta ) * cos(phi)); #endif - return 1; + // normalize phi to be in the -PI, PI range + while(phi <= -PI) + phi += 2*PI; + while(phi > PI) + phi -= 2*PI; + + // check if the point is "in front" of the camera + if (phi < -PI/2.0 || phi > PI/2.0) { + // behind, transform considered invalid + return 0; + } else + return 1; + } // This is the cylindrical projection int pano_erect( double x_dest,double y_dest, double* x_src, double* y_src, void* params) @@ -1545,7 +1557,150 @@ return 1; } +/** convert from erect to biplane */ +int biplane_erect ( double x_dest,double y_dest, double* x_src, double* y_src, void* params ) +{ + double x,offset; + if (fabs(x_dest / mp->distance) > mp->pn->precomputedValue[0]+DEG_TO_RAD(89)) + { + *x_src = 0; + *y_src = 0; + return 0; + } + if(x_dest<0) + { + x = x_dest + mp->pn->precomputedValue[0] * mp->distance; + offset = -mp->pn->precomputedValue[1]; + } + else + { + x = x_dest - mp->pn->precomputedValue[0] * mp->distance; + offset = mp->pn->precomputedValue[1]; + } + rect_erect(x,y_dest,x_src,y_src,&mp->distance); + *x_src += offset; + return 1; +} +/** convert from biplane to erect */ +int erect_biplane ( double x_dest,double y_dest, double* x_src, double* y_src, void* params ) +{ + double x, offset; + if(fabs(x_dest)>mp->pn->precomputedValue[1]+mp->distance*57) // 57 = tan(89) + { + *x_src = 0; + *y_src = 0; + return 0; + } + if(x_dest<0) + { + x=x_dest + mp->pn->precomputedValue[1]; + offset = - mp->pn->precomputedValue[0]; + } + else + { + x=x_dest - mp->pn->precomputedValue[1]; + offset = mp->pn->precomputedValue[0]; + } + erect_rect(x,y_dest,x_src,y_src,&mp->distance); + *x_src += offset * mp->distance; + return 1; +} + + +int biplane_distance ( double width, double b, void* params ) +{ + if(mp->pn->formatParamCount==0) + { + mp->pn->formatParamCount = 1; + mp->pn->formatParam[0] = 45; + }; + mp->pn->formatParam[0]= max( min(mp->pn->formatParam[0], 179), 1); + + mp->pn->precomputedCount = 2; + mp->pn->precomputedValue[0] = DEG_TO_RAD(mp->pn->formatParam[0]) / 2; // angle in rad + mp->distance = (double) width / (2.0 * (tan(mp->pn->precomputedValue[0])+tan(b/2.0 - mp->pn->precomputedValue[0]))); + mp->pn->precomputedValue[1]=mp->distance*tan(mp->pn->precomputedValue[0]); // offset + return 1; +} + +int triplane_erect ( double x_dest,double y_dest, double* x_src, double* y_src, void* params ) +{ + double x,offset; + if(fabs(x_dest / mp->distance)> mp->pn->precomputedValue[0] + DEG_TO_RAD(89)) + { + *x_src = 0; + *y_src = 0; + return 0; + }; + if(x_dest < -mp->pn->precomputedValue[0] / 2) + { + x=x_dest -mp->pn->precomputedValue[0] * mp->distance; + offset = mp->pn->precomputedValue[1]; + } + else if (x_dest < mp->pn->precomputedValue[0] / 2) + { + x=x_dest; + offset=0; + } + else + { + x=x_dest + mp->pn->precomputedValue[0] * mp->distance; + offset = - mp->pn->precomputedValue[1]; + } + rect_erect(x,y_dest,x_src,y_src,&mp->distance); + *x_src += offset; + return 1; +} + +int erect_triplane ( double x_dest,double y_dest, double* x_src, double* y_src, void* params ) +{ + double x, offset; + if(fabs(x_dest) > 2* mp->pn->precomputedValue[1] + 57 * mp->distance ) + { + *x_src = 0; + *y_src = 0; + return 0; + }; + if(x_dest < -mp->pn->precomputedValue[1]) + { + x=x_dest + 2 * mp->pn->precomputedValue[1]; + offset = - mp->pn->precomputedValue[0]; + } + else if (x_dest < mp->pn->precomputedValue[1]) + { + x=x_dest; + offset=0; + } + else + { + x=x_dest - 2 * mp->pn->precomputedValue[1]; + offset = + mp->pn->precomputedValue[0]; + } + erect_rect(x,y_dest,x_src ,y_src,&mp->distance); + *x_src += offset * mp->distance; + return 1; +} + +int triplane_distance ( double width, double b, void* params ) +{ + if(mp->pn->formatParamCount==0) + { + mp->pn->formatParamCount = 1; + mp->pn->formatParam[0] = 45; + }; + mp->pn->formatParam[0] = max( min(mp->pn->formatParam[0], 120), 1); + + mp->pn->precomputedCount = 2; + mp->pn->precomputedValue[0] = DEG_TO_RAD(mp->pn->formatParam[0]); // angle in rad + mp->distance = (double) width / (4.0 * tan(mp->pn->precomputedValue[0]/2.0) + 2 * tan(b/2.0 - mp->pn->precomputedValue[0])); + mp->pn->precomputedValue[1]=mp->distance*tan(mp->pn->precomputedValue[0]/2.0); // offset + return 1; +} + + + + int erect_sphere_tp( double x_dest,double y_dest, double* x_src, double* y_src, void* params) { // params: double distanceparam This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <da...@us...> - 2009-02-02 22:31:07
|
Revision: 936 http://panotools.svn.sourceforge.net/panotools/?rev=936&view=rev Author: dangelo Date: 2009-02-02 21:55:32 +0000 (Mon, 02 Feb 2009) Log Message: ----------- forgot to add some more files touched by the bi/triplane projection Modified Paths: -------------- trunk/libpano/adjust.c trunk/libpano/filter.h trunk/libpano/panorama.h trunk/libpano/parser.c trunk/libpano/queryfeature.c Modified: trunk/libpano/adjust.c =================================================================== --- trunk/libpano/adjust.c 2009-02-02 21:51:29 UTC (rev 935) +++ trunk/libpano/adjust.c 2009-02-02 21:55:32 UTC (rev 936) @@ -730,7 +730,13 @@ break; case _orthographic: mp->distance = (double) pn->width / (2.0 * sin(b/2.0)); - break; + break; + case _biplane: + biplane_distance(pn->width,b,mp); + break; + case _triplane: + triplane_distance(pn->width,b,mp); + break; default: // unknown PrintError ("SetMakeParams: Unsupported panorama projection"); @@ -878,6 +884,14 @@ { SetDesc(stack[i], erect_albersequalareaconic, mp ); i++; // Convert albersequalareaconic to equirect } + else if(pn->format == _biplane) + { + SetDesc(stack[i], erect_biplane, mp ); i++; // Convert biplane to equirect + } + else if(pn->format == _triplane) + { + SetDesc(stack[i], erect_triplane, mp ); i++; // Convert triplane to equirect + } else if(pn->format == _equirectangular) { // no conversion needed @@ -1063,7 +1077,12 @@ case _orthographic: mp->distance = (double) pn->width / (2.0 * sin(b/2.0)); break; - default: + case _biplane: + biplane_distance(pn->width,b,mp); + break; + case _triplane: + triplane_distance(pn->width,b,mp); + break; default: // unknown PrintError ("SetInvMakeParams: Unsupported panorama projection"); // no way to report an error back to the caller... @@ -1262,8 +1281,15 @@ SetDesc(stack[i], sphere_tp_erect, &(mp->distance) ); i++; // Convert equirectangular to spherical SetDesc(stack[i], orthographic_sphere_tp, &(mp->distance) ); i++; // Convert spherical to orthographic } - else if(pn->format == _equirectangular) + else if(pn->format == _biplane) { + SetDesc(stack[i], biplane_erect, mp ); i++; // Convert equirectangular to biplane + } + else if(pn->format == _triplane) + { + SetDesc(stack[i], triplane_erect, mp ); i++; // Convert equirectangular to biplane + } else if(pn->format == _equirectangular) + { // no conversion needed } else Modified: trunk/libpano/filter.h =================================================================== --- trunk/libpano/filter.h 2009-02-02 21:51:29 UTC (rev 935) +++ trunk/libpano/filter.h 2009-02-02 21:55:32 UTC (rev 936) @@ -857,6 +857,12 @@ int arch_erect ( double x_dest,double y_dest, double* x_src, double* y_src, void* params ); int erect_arch ( double x_dest,double y_dest, double* x_src, double* y_src, void* params ); +int biplane_erect ( double x_dest,double y_dest, double* x_src, double* y_src, void* params ); +int erect_biplane ( double x_dest,double y_dest, double* x_src, double* y_src, void* params ); +int biplane_distance ( double width, double b, void* params ); +int triplane_erect ( double x_dest,double y_dest, double* x_src, double* y_src, void* params ); +int erect_triplane ( double x_dest,double y_dest, double* x_src, double* y_src, void* params ); +int triplane_distance ( double width, double b, void* params ); int mirror_sphere_cp ( double x_dest,double y_dest, double* x_src, double* y_src, void* params ); int mirror_pano ( double x_dest,double y_dest, double* x_src, double* y_src, void* params ); Modified: trunk/libpano/panorama.h =================================================================== --- trunk/libpano/panorama.h 2009-02-02 21:51:29 UTC (rev 935) +++ trunk/libpano/panorama.h 2009-02-02 21:55:32 UTC (rev 936) @@ -262,6 +262,8 @@ _architectural = 20, _equisolid = 21, // fisheye-equisolid FOV (equisolid fisheye) = 4 * arcsin (frame size/(focal length * 4)) _equipanini = 22, + _biplane = 23, + _triplane = 24, }; enum @@ -283,9 +285,11 @@ PANO_FORMAT_ORTHOGRAPHIC = 14, PANO_FORMAT_EQUISOLID = 15, PANO_FORMAT_EQUI_PANINI = 16, + PANO_FORMAT_BIPLANE = 17, + PANO_FORMAT_TRIPLANE = 18, }; -#define PANO_FORMAT_COUNT 17 +#define PANO_FORMAT_COUNT 19 enum { // Enumerates external number of image f<index> Modified: trunk/libpano/parser.c =================================================================== --- trunk/libpano/parser.c 2009-02-02 21:51:29 UTC (rev 935) +++ trunk/libpano/parser.c 2009-02-02 21:55:32 UTC (rev 936) @@ -504,6 +504,12 @@ case PANO_FORMAT_ARCHITECTURAL: gl->pano.format = _architectural; break; + case PANO_FORMAT_BIPLANE: + gl->pano.format = _biplane; + break; + case PANO_FORMAT_TRIPLANE: + gl->pano.format = _triplane; + break; default: PrintError( "Unknown panorama projection: %d", gl->pano.format ); return -1; @@ -668,6 +674,8 @@ case _architectural: format = PANO_FORMAT_ARCHITECTURAL; break; case _orthographic: format = PANO_FORMAT_ORTHOGRAPHIC; break; case _equisolid: format = PANO_FORMAT_EQUISOLID; break; + case _biplane: format = PANO_FORMAT_BIPLANE; break; + case _triplane: format = PANO_FORMAT_TRIPLANE; break; default: format = -1; break; } @@ -1031,6 +1039,12 @@ case PANO_FORMAT_EQUISOLID: p->pano.format = _equisolid; break; + case PANO_FORMAT_BIPLANE: + p->pano.format = _biplane; + break; + case PANO_FORMAT_TRIPLANE: + p->pano.format = _triplane; + break; default: PrintError( "Unknown panorama projection: %d", p->pano.format ); return -1; Modified: trunk/libpano/queryfeature.c =================================================================== --- trunk/libpano/queryfeature.c 2009-02-02 21:51:29 UTC (rev 935) +++ trunk/libpano/queryfeature.c 2009-02-02 21:55:32 UTC (rev 936) @@ -94,6 +94,8 @@ {"PanoType14","Orthographic"}, {"PanoType15","Equisolid"}, {"PanoType16","Equirectangular Panini"}, + {"PanoType17","Biplane"}, + {"PanoType18","Triplane"}, // Filter Types @@ -338,6 +340,8 @@ "Orthographic", "Equisolid", "Equirectangular Panini", + "Biplane", + "Triplane", }; static int panoFormatID[PANO_FORMAT_COUNT] = { @@ -358,6 +362,8 @@ _orthographic, _equisolid, _equipanini, + _biplane, + _triplane, }; @@ -441,6 +447,22 @@ features->parm[i].maxValue = +90; } break; + case PANO_FORMAT_BIPLANE: + features->maxVFOV = 179; + features->maxHFOV = 359; + features->numberOfParameters = 1; + features->parm[0].name = "alpha"; + features->parm[0].minValue=1; + features->parm[0].maxValue=179; + break; + case PANO_FORMAT_TRIPLANE: + features->maxVFOV = 179; + features->maxHFOV = 359; + features->numberOfParameters = 1; + features->parm[0].name = "alpha"; + features->parm[0].minValue=1; + features->parm[0].maxValue=120; + break; default: assert(0); // A projection is missing! return 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bru...@us...> - 2009-02-04 23:49:08
|
Revision: 939 http://panotools.svn.sourceforge.net/panotools/?rev=939&view=rev Author: brunopostle Date: 2009-02-04 23:49:05 +0000 (Wed, 04 Feb 2009) Log Message: ----------- Fix of invalid write() calls, which don't appear to be used anyway. patch #2163669 (Stanislav Brabec) Modified Paths: -------------- trunk/libpano/filter.c trunk/libpano/filter.h Modified: trunk/libpano/filter.c =================================================================== --- trunk/libpano/filter.c 2009-02-04 23:02:13 UTC (rev 938) +++ trunk/libpano/filter.c 2009-02-04 23:49:05 UTC (rev 939) @@ -1285,22 +1285,22 @@ } /* ENDIAN aware file i/o funtions. Used for reading and writing photoshop files */ -Boolean panoWriteUCHAR(file_spec fnum, UCHAR theChar ) +Boolean panoWriteUCHAR(nfile_spec fnum, UCHAR theChar ) { - return write( fnum, 1, &theChar ) == 1; + return write( fnum, &theChar, 1 ) == 1; } -Boolean panoWriteSHORT(file_spec fnum, USHORT theShort ) +Boolean panoWriteSHORT(nfile_spec fnum, USHORT theShort ) { char data[2], *d; d = data; assert(sizeof(USHORT) == 2); SHORTNUMBER( theShort, d ); - return write( fnum, 2, data ) == 2; + return write( fnum, data, 2 ) == 2; } -Boolean panoWriteINT32(file_spec fnum, ULONG theLong ) +Boolean panoWriteINT32(nfile_spec fnum, ULONG theLong ) { size_t count = 4; char data[4], *d; @@ -1310,19 +1310,19 @@ LONGNUMBER( theLong, d ); - return write( fnum, 4, data ) == 4; + return write( fnum, data, 4 ) == 4; } -Boolean panoReadUCHAR(file_spec fnum, UCHAR *pChar ) +Boolean panoReadUCHAR(nfile_spec fnum, UCHAR *pChar ) { - return read( fnum, 1, pChar )== 1; + return read( fnum, pChar, 1 )== 1; } -Boolean panoReadSHORT(file_spec fnum, USHORT *pShort ) +Boolean panoReadSHORT(nfile_spec fnum, USHORT *pShort ) { char data[2]; char *d; - if (read( fnum, 2, data ) != 2) { + if (read( fnum, data, 2 ) != 2) { return FALSE; } @@ -1333,10 +1333,10 @@ return TRUE; } -Boolean panoReadINT32(file_spec fnum, ULONG *pLong ) +Boolean panoReadINT32(nfile_spec fnum, ULONG *pLong ) { char data[4], *d; - if (read( fnum, 4, data )!= 4) { + if (read( fnum, data, 4 )!= 4) { return FALSE; } d = data; Modified: trunk/libpano/filter.h =================================================================== --- trunk/libpano/filter.h 2009-02-04 23:02:13 UTC (rev 938) +++ trunk/libpano/filter.h 2009-02-04 23:49:05 UTC (rev 939) @@ -968,6 +968,7 @@ #include "sys_mac.h" #define file_spec short + #define nfile_spec short #define myopen( path, perm, fspec ) ( FSpOpenDF( path, perm, &fspec ) != noErr ) #define mywrite( fspec, count, data ) FSWrite (fspec, &count, data) #define myread( fspec, count, data ) FSRead (fspec, &count, data) @@ -983,6 +984,7 @@ #else // __Mac__, use ANSI-filefunctions #define file_spec FILE* + #define nfile_spec int #define myopen( path, perm, fspec ) ( (fspec = fopen( (path)->name, perm )) == NULL) #define mywrite( fspec, count, data ) count = fwrite( data, 1, count, fspec) #define myread( fspec, count, data ) count = fread( data, 1, count, fspec ) @@ -1009,12 +1011,12 @@ #endif /* ENDIAN aware file i/o funtions. Used for reading and writing photoshop files */ -Boolean panoWriteUCHAR(file_spec fnum, UCHAR theChar ); -Boolean panoWriteSHORT(file_spec fnum, USHORT theShort ); -Boolean panoWriteINT32(file_spec fnum, ULONG theLong ); -Boolean panoReadUCHAR (file_spec fnum, UCHAR *pChar ); -Boolean panoReadSHORT (file_spec fnum, USHORT *pShort ); -Boolean panoReadINT32 (file_spec fnum, ULONG *pLong ); +Boolean panoWriteUCHAR(nfile_spec fnum, UCHAR theChar ); +Boolean panoWriteSHORT(nfile_spec fnum, USHORT theShort ); +Boolean panoWriteINT32(nfile_spec fnum, ULONG theLong ); +Boolean panoReadUCHAR (nfile_spec fnum, UCHAR *pChar ); +Boolean panoReadSHORT (nfile_spec fnum, USHORT *pShort ); +Boolean panoReadINT32 (nfile_spec fnum, ULONG *pLong ); #define PANO_DEFAULT_PIXELS_PER_RESOLUTION 150.0 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bru...@us...> - 2009-02-05 00:06:34
|
Revision: 940 http://panotools.svn.sourceforge.net/panotools/?rev=940&view=rev Author: brunopostle Date: 2009-02-05 00:06:31 +0000 (Thu, 05 Feb 2009) Log Message: ----------- patch fixes implicit declaration warnings, which may lead to crashes. patch #2163691 (Stanislav Brabec) Modified Paths: -------------- trunk/libpano/ColourBrightness.c trunk/libpano/filter.c trunk/libpano/pttiff.h Modified: trunk/libpano/ColourBrightness.c =================================================================== --- trunk/libpano/ColourBrightness.c 2009-02-04 23:49:05 UTC (rev 939) +++ trunk/libpano/ColourBrightness.c 2009-02-05 00:06:31 UTC (rev 940) @@ -34,6 +34,7 @@ #include "tiffio.h" #include <assert.h> +#include <math.h> #include "pttiff.h" Modified: trunk/libpano/filter.c =================================================================== --- trunk/libpano/filter.c 2009-02-04 23:49:05 UTC (rev 939) +++ trunk/libpano/filter.c 2009-02-05 00:06:31 UTC (rev 940) @@ -29,6 +29,7 @@ #include <stdarg.h> #include <stdlib.h> #include <string.h> +#include <unistd.h> #include <math.h> #include <tiff.h> #include <assert.h> Modified: trunk/libpano/pttiff.h =================================================================== --- trunk/libpano/pttiff.h 2009-02-04 23:49:05 UTC (rev 939) +++ trunk/libpano/pttiff.h 2009-02-05 00:06:31 UTC (rev 940) @@ -85,6 +85,7 @@ void panoTiffSetErrorHandler(void); int panoTiffVerifyAreCompatible(fullPath * tiffFiles, int numberImages, int optionalCheck); +int panoTiffDisplayInfo(char *fileName); void panoImageDispose(Image *im) ; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bru...@us...> - 2009-02-05 00:22:14
|
Revision: 941 http://panotools.svn.sourceforge.net/panotools/?rev=941&view=rev Author: brunopostle Date: 2009-02-05 00:22:11 +0000 (Thu, 05 Feb 2009) Log Message: ----------- Remove unmaintained makefile.linux Modified Paths: -------------- trunk/libpano/Makefile.am trunk/libpano/README.linux Removed Paths: ------------- trunk/libpano/makefile.linux Modified: trunk/libpano/Makefile.am =================================================================== --- trunk/libpano/Makefile.am 2009-02-05 00:06:31 UTC (rev 940) +++ trunk/libpano/Makefile.am 2009-02-05 00:22:11 UTC (rev 941) @@ -103,7 +103,7 @@ rm -rf `find $(distdir) -name .cvsignore` EXTRA_DIST = gpl.txt README.linux README.windows \ - makefile.linux makefile.win32 \ + makefile.win32 \ bootstrap filter.r libpano13.def pano13.rc \ seamer_.c sys_X11.c sys_win.c bmp.c shell_mac.c \ sys_mac.c ppm.c sys_ansi.c ppm.c ZComb.h adjust.h \ Modified: trunk/libpano/README.linux =================================================================== --- trunk/libpano/README.linux 2009-02-05 00:06:31 UTC (rev 940) +++ trunk/libpano/README.linux 2009-02-05 00:22:11 UTC (rev 941) @@ -58,32 +58,6 @@ ./bootstrap - -DEPRECATED BUILD INSTRUCTIONS - -Building the Library: - -The Java Development Kit is required. -It can be downloaded from www.javasoft.com, -or may be contained on your Linux CD. - -Create a directory 'pano13', move the -file 'panosrc.tar.gz' into this directory, -and unpack the file using the commands - - gzip -d panosrc.tar.gz - -and - - tar xf panosrc.tar - -Then build the library using the command - - make -f makefile.linux libpano13.so - - -Limits and Modifications: - This distribution of the sources limits processing of fisheye images to fields of view smaller than 160 degrees. This limit is controlled by the constant Deleted: trunk/libpano/makefile.linux =================================================================== --- trunk/libpano/makefile.linux 2009-02-05 00:06:31 UTC (rev 940) +++ trunk/libpano/makefile.linux 2009-02-05 00:22:11 UTC (rev 941) @@ -1,39 +0,0 @@ -# Makefile for libpano13.so - -sources = panorama.h filter.h fftn.h f2c.h pteditor.h \ - ptutils.h sys_win.h version.h \ - filter.c parser.c queryfeature.c sys_win.c correct.c perspect.c \ - adjust.c remap.c lmdif.c file.c \ - math.c pan.c PTDialogs.c fftn.c fourier.c resample.c \ - optimize.c morpher.c Triangulate.c \ - seamer.c ptpicker.c pteditor.c seamer_.c \ - tiff.c bmp.c jpeg.c png.c multilayer.c \ - Makefile pano13.rc libpano13.def sys_ansi.c ppm.c - -objects = filter.o parser.o queryfeature.o correct.o perspect.o \ - adjust.o remap.o lmdif.o file.o math.o pan.o \ - PTDialogs.o fftn.o fourier.o resample.o optimize.o \ - morpher.o Triangulate.o seamer.o ptpicker.o pteditor.o \ - tiff.o jpeg.o png.o multilayer.o - -winobj = sys_win.o bmp.o pano13rc.o - -ansobj = sys_ansi.o ppm.o - -CC = gcc - - - -CFLAGS = -O -I /usr/lib/java/include/ -I /usr/lib/java/include/genunix -I /usr/lib/java/include/linux -I /usr/lib/java/include/linux -D__Ansi__=1 - - -libpano13.so : $(objects) $(ansobj) - $(CC) -lm -ljpeg -ltiff -lpng -shared -o libpano13.so $(objects) $(ansobj) - - -panosrc.tar.gz : $(sources) Makefile - tar cf panosrc.tar $(sources) Makefile - gzip panosrc.tar - -install : libpano13.so - mv libpano13.so /usr/lib/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bru...@us...> - 2009-02-05 00:38:45
|
Revision: 943 http://panotools.svn.sourceforge.net/panotools/?rev=943&view=rev Author: brunopostle Date: 2009-02-05 00:38:41 +0000 (Thu, 05 Feb 2009) Log Message: ----------- bump version to 2.9.14, sources conflicted as to whether previous version was 2.9.12 or 2.9.13 Modified Paths: -------------- trunk/libpano/configure.ac trunk/libpano/version.h Modified: trunk/libpano/configure.ac =================================================================== --- trunk/libpano/configure.ac 2009-02-05 00:30:18 UTC (rev 942) +++ trunk/libpano/configure.ac 2009-02-05 00:38:41 UTC (rev 943) @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.5) -AC_INIT([pano13], [2.9.12], BUG-REPORT-ADDRESS) +AC_INIT([pano13], [2.9.14], BUG-REPORT-ADDRESS) AC_CONFIG_SRCDIR([PTDialogs.c]) AC_CONFIG_AUX_DIR(config) AC_CONFIG_HEADER([config.h]) Modified: trunk/libpano/version.h =================================================================== --- trunk/libpano/version.h 2009-02-05 00:30:18 UTC (rev 942) +++ trunk/libpano/version.h 2009-02-05 00:38:41 UTC (rev 943) @@ -24,13 +24,13 @@ #define VERS2 0x00 //version of preferences file, used to verify data -#define PREF_VERSION "2.9.13 " +#define PREF_VERSION "2.9.14 " // String style of global version -#define VERSION "2.9.13 " +#define VERSION "2.9.14 " // Numeric style of global version, same as VERSION with more precision -#define PTVERSION_FILEVERSIONNUMBER 2,9,13,0 +#define PTVERSION_FILEVERSIONNUMBER 2,9,14,0 #define PTVERSION_NAME_LONG "LongVersion" #define LONGVERSION VERSION ", Copyright (c) 1998-2006, H. Dersch, de...@fh..." This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bru...@us...> - 2009-02-23 23:22:37
|
Revision: 952 http://panotools.svn.sourceforge.net/panotools/?rev=952&view=rev Author: brunopostle Date: 2009-02-23 22:11:03 +0000 (Mon, 23 Feb 2009) Log Message: ----------- reset MAX_FISHEYE_FOV to 179 degrees (was 720) Modified Paths: -------------- trunk/libpano/README.linux trunk/libpano/README.windows trunk/libpano/filter.h Modified: trunk/libpano/README.linux =================================================================== --- trunk/libpano/README.linux 2009-02-17 23:48:47 UTC (rev 951) +++ trunk/libpano/README.linux 2009-02-23 22:11:03 UTC (rev 952) @@ -60,7 +60,7 @@ This distribution of the sources limits processing of fisheye images to fields of view smaller than -160 degrees. This limit is controlled by the constant +179 degrees. This limit is controlled by the constant MAX_FISHEYE_FOV in the file filter.h. There is some controversy regarding the legality of processing hemispherical images (ie images having 180 degree field @@ -69,5 +69,3 @@ by patents, you can build and use your own unlimited version of the library by changing the soure code. -Helmut Dersch -d...@fh... Modified: trunk/libpano/README.windows =================================================================== --- trunk/libpano/README.windows 2009-02-17 23:48:47 UTC (rev 951) +++ trunk/libpano/README.windows 2009-02-23 22:11:03 UTC (rev 952) @@ -78,7 +78,7 @@ This distribution of the sources limits processing of fisheye images to fields of view smaller than -160 degrees. This limit is controlled by the constant +179 degrees. This limit is controlled by the constant MAX_FISHEYE_FOV in the file filter.h. There is some controversy regarding the legality of processing hemispherical images (ie images having 180 degree field @@ -87,5 +87,3 @@ by patents, you can build and use your own unlimited version of the library by changing the soure code. -Helmut Dersch -d...@fh... Modified: trunk/libpano/filter.h =================================================================== --- trunk/libpano/filter.h 2009-02-17 23:48:47 UTC (rev 951) +++ trunk/libpano/filter.h 2009-02-23 22:11:03 UTC (rev 952) @@ -97,7 +97,7 @@ else c=(float)(x); -#define MAX_FISHEYE_FOV 720.0 +#define MAX_FISHEYE_FOV 179.0 extern int JavaUI; // Flag to indicate use of java dialogs void JPrintError( char* text ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
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. |