Current libpano12.so for linux

Bruno Postle bruno at postle.net
Sun May 4 18:58:00 BST 2003


On Sun 04-May-2003 at 02:15:46PM +0100, Bruno Postle wrote:
> 
> I not sure what the differences are between the windows and linux
> sources for the library

Ok, the linux and win32 library sources are *identical*, the only
difference is the Makefile.  I can't imagine why they were
distributed separately.

> There are some patched versions floating around too, it would be
> good to get all this stuff into one cvs tree.

I had a nose around and the windows version of the pano12 library
sources that Max Lyons maintains seems to be the most up-to-date
with various bug-fixes and new features:

    http://www.tawbaware.com/maxlyons/pano12ml.htm

The current version 2.6.ML08 will compile an (apparently working)
libpano12.so file if you drop the attached files into the "Sources"
folder first.

You may also want to apply this patch:


diff filter.h.old filter.h
88c88
< #define MAX_FISHEYE_FOV               160.0
---
> #define MAX_FISHEYE_FOV               720.0


-- 
Bruno

-------------- next part --------------
Readme Sources

This file discribes how to build the library libpano12.so
for the Linux operating system. This library is required
for running 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.


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 'pano12', 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.unx libpano12.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
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 soure code.

Helmut Dersch
der at fh-furtwangen.de
-------------- next part --------------
# Makefile for libpano12.so

sources = panorama.h filter.h fftn.h f2c.h pteditor.h  \
          ptutils.h sys_win.h version.h \
          filter.c parser.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 pano12.rc pano12.def sys_ansi.c ppm.c

objects = filter.o parser.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 pano12rc.o

ansobj =  sys_ansi.o ppm.o

CC = gcc



CFLAGS = -O -I /usr/lib/java/include/ -I /usr/lib/java/include/genunix -D__Ansi__=1


libpano12.so  : $(objects) $(ansobj)
	$(CC) -lm -ljpeg -ltiff -lpng -shared -o libpano12.so $(objects) $(ansobj)	

	
panosrc.tar.gz	: $(sources) Makefile
	tar cf panosrc.tar $(sources) Makefile
	gzip panosrc.tar

install : libpano12.so
	mv libpano12.so /usr/lib/
-------------- next part --------------
/* Panorama_Tools	-	Generate, Edit and Convert Panoramic Images
   Copyright (C) 1998,1999 - Helmut Dersch  der at fh-furtwangen.de
   
   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.  */

/*------------------------------------------------------------*/


#include <stdio.h>
#include <stdarg.h>
#include "filter.h"
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>


#ifndef SYS_ANSI_H
#define SYS_ANSI_H


#define		SetLbl( kRes, string)	
#define 	CheckButton( rNum, isChecked )	
#define		SetText( rNum, string, var )
#define		GetText( rNum, string, varaddr )

#define		GenDialog( VarType, DlgRes, Title,  SetControl,SText,			\
			GText, DlgAction, WinFunc)										\
																			\
			return( FALSE );

#define		kSetRemapPrefs_dlg					"REMAP"	
#define		kSetRemapPrefs_InRect				350
#define		kSetRemapPrefs_InPano				351
#define		kSetRemapPrefs_InErect				352
#define		kSetRemapPrefs_InSphereCenter		354
#define		kSetRemapPrefs_InSphereTop			353
#define		kSetRemapPrefs_OutRect				356
#define		kSetRemapPrefs_OutPano				359
#define		kSetRemapPrefs_OutErect				358
#define		kSetRemapPrefs_OutSphereCenter		361
#define		kSetRemapPrefs_OutSphereTop			360
#define		kSetRemapPrefs_Hfov					362
#define		kSetRemapPrefs_Vfov					363
#define		kSetRemapPrefs_InMirror				355
#define		kSetRemapPrefs_OutMirror			357
#define     kSetRemapPrefs_SetPrefs				100

//-------------------------- Dialogs for perspective  -------------------------------------------

#define		kSetPerspectivePrefs_dlg			"PERSPECT"		
#define		kSetPerspectivePrefs_InRect			301		
#define		kSetPerspectivePrefs_InSphere		302
#define		kSetPerspectivePrefs_Degree			321
#define		kSetPerspectivePrefs_Points			320
#define		kSetPerspectivePrefs_Keep			325
#define		kSetPerspectivePrefs_X				305
#define		kSetPerspectivePrefs_Y				306
#define		kSetPerspectivePrefs_Gamma			307
#define		kSetPerspectivePrefs_Hfov			309
#define		kSetPerspectivePrefs_Width			311
#define     kSetPerspectivePrefs_Height			310
#define		kSetPerspectivePrefs_SetPrefs		100


// ------------------------- Dialogs for correct ------------------------------------------------

#define		kSetCorrectPrefs_dlg				"SETCPREFDLG"
#define		kSetCorrectPrefs_Save				6
#define		kSetCorrectPrefs_Load				5
#define		kSetCorrectPrefs_Radial				10
#define		kSetCorrectPrefs_RadialOption		40
#define		kSetCorrectPrefs_Horizontal			12
#define		kSetCorrectPrefs_HorizontalOption	42
#define		kSetCorrectPrefs_Vertical			11
#define		kSetCorrectPrefs_VerticalOption		41
#define		kSetCorrectPrefs_Shear				13
#define		kSetCorrectPrefs_ShearOption		43
#define		kSetCorrectPrefs_Scale				14
#define		kSetCorrectPrefs_ScaleOption		44
#define		kSetCorrectPrefs_Lum				26
#define		kSetCorrectPrefs_LumOpt				46
#define		kSetCorrectPrefs_SetPrefs			100
#define		kSetCorrectPrefs_CutFrame			27
#define		kSetCorrectPrefs_CutOpt         	47
#define		kSetCorrectPrefs_Fourier			28
#define		kSetCorrectPrefs_FourierOpt         48


#define 	kSetLumOptions_dlg					"THREEPARAM"
#define 	kSetLumOptions_Red					185
#define 	kSetLumOptions_Green				186
#define 	kSetLumOptions_Blue					187
#define 	kSetLumOptions_RedText				180
#define 	kSetLumOptions_GreenText			181
#define 	kSetLumOptions_BlueText				182



#define 	kSetRadialOptions_dlg				"RADIALOPT"
#define 	kSetRadialOptions_Slit				150
#define     kSetRadialOptions_Red0				113
#define     kSetRadialOptions_Red1				112
#define     kSetRadialOptions_Red2				111
#define     kSetRadialOptions_Red3				110
#define     kSetRadialOptions_Green0			123
#define     kSetRadialOptions_Green1			122
#define     kSetRadialOptions_Green2			121
#define     kSetRadialOptions_Green3			120
#define     kSetRadialOptions_Blue0				133
#define     kSetRadialOptions_Blue1				132
#define     kSetRadialOptions_Blue2				131
#define     kSetRadialOptions_Blue3				130

#define 	kSetHorizontalOptions_dlg			"THREEPARAM"
#define    	kSetHorizontalOptions_Red			 185
#define    	kSetHorizontalOptions_Green			 186
#define    	kSetHorizontalOptions_Blue			 187

#define 	kSetShearOptions_dlg				"TWOPARAM"
#define 	kSetShearOptions_vname				 150
#define 	kSetShearOptions_vvar				 155
#define 	kSetShearOptions_hname				 151
#define 	kSetShearOptions_hvar				 156


//-------------------  Dialogs for Adjust --------------------------


#define		kSetAdjustPrefs_dlg					"ADJUSTPREFS"
#define		kSetAdjustPrefs_Insert				201
#define		kSetAdjustPrefs_Extract				200
#define		kSetAdjustPrefs_SetCtrlPts			205
#define		kSetAdjustPrefs_RunOptimizer		202
#define		kSetAdjustPrefs_Options  			206
#define     kSetAdjustPrefs_Script		    	207
#define     kSetAdjustPrefs_FindScript    		204
#define		kSetAdjustPrefs_SetOpt				203
#define		kSetAdjustPrefs_SetPrefs			100

#define		kSetCreateOptions_dlg				"ADJUSTOPT"	
#define		kSetCreateOptions_ImR				214
#define		kSetCreateOptions_ImP				215
#define		kSetCreateOptions_ImFf				216
#define		kSetCreateOptions_ImFc				217
#define		kSetCreateOptions_ImEq				219
#define		kSetCreateOptions_ImHfov			234
#define		kSetCreateOptions_ImW				228
#define		kSetCreateOptions_ImH				227
#define		kSetCreateOptions_Correct			100
#define		kSetCreateOptions_PRe				245
#define		kSetCreateOptions_PPa				246
#define		kSetCreateOptions_PSp				247
#define		kSetCreateOptions_PCu				248
#define		kSetCreateOptions_PHfov				240
#define		kSetCreateOptions_PWi				239
#define		kSetCreateOptions_PHe				238
#define		kSetCreateOptions_PSave				10
#define		kSetCreateOptions_TY				251
#define		kSetCreateOptions_TP				250
#define		kSetCreateOptions_TR				244
#define		kSetCreateOptions_SLoad				11
#define		kSetCreateOptions_SPaste			253
#define		kSetCreateOptions_SBlend			252
#define		kSetCreateOptions_SF				259
#define		kSetCreateOptions_SIm				254
#define		kSetCreateOptions_SBuf				255
#define		kSetCreateOptions_Sboth				256
#define		kSetCreateOptions_Snone				257
#define		kSetCreateOptions_Pan				101

#define kSetIntp_Gamma  305
#define kPoly 350	
#define kSp16 351	
#define kSp36 352	
#define kSinc 353	
#define kSetIntp "INTPOL"

#define		kSetFourierOptions_dlg				"FOURIEROPT"
#define		kSetFourierOptions_PSDname			305
#define		kSetFourierOptions_findPSD			10
#define		kSetFourierOptions_addBlur			320
#define		kSetFourierOptions_remBlur			321
#define		kSetFourierOptions_internal			322
#define		kSetFourierOptions_custom			323
#define		kSetFourierOptions_findNFF			11
#define		kSetFourierOptions_filterfactor		307
#define		kSetFourierOptions_fourier_frame	308
#define		kSetFourierOptions_scale			324

#define		kSetSizePrefs_dlg					"SIZE_SRC"
#define		kSetSizePrefs_Crop					213
#define		kSetSizePrefs_SFile  				214
#define		kSetSizePrefs_OpenF  				215
#define		kSetSizePrefs_BrFile 				217
#define		kSetSizePrefs_SetInt				219
#define		kSetSizePrefs_AppName				216
#define		kSetSizePrefs_FileName				212
#define		kSetSizePrefs_BrApp					218
#define		kSetSizePrefs_NoAlpha				220


#endif


More information about the ptX mailing list