Over the years I have made some changes and additions to Panotools. I have also incorporated changes that others have given me. The best place to look at the code and see all changes is on the PanoTools on SourceForge web site. This page is being kept for historical reasons only and does not reflect all changes made.
Updated version number to reflect completion of milestone, and get rid of extra digits.
Determined the reason for crash using PTStitcher.exe. The pano12.dll is called to open the script file with LoadScript() which pano12 allocates memory for that file and passes it back to PTStitcher. When PTStitcher is done with it it deletes it. The script is opened very early in the process and then 13000 calls to the dll later it crashes.
Function to allocate and deallocate memory have been updated several times since 2001. When I build with MSVS.Net I am using a newer version of the allocate function but an older version of the delete function is still called with PTStitcher. What happens is, the memory does not gets deleted correctly and the program blows up.
To prevent the crashing when using the helper applications like PTStitcher it is necessary to build pano12.dll with the same compiler, MinGW. This version of the dll is between 25% and 50% slower than the MSVS version.
To gain back the back the speed increase and prevent crashes it is necessary to rewrite PTStitcher, and make further modifications to pano12.dll. With all the building and testing I have done, I have enough information to recreate PTStitcher, but not enough time right now. Lesson learned: Wherever memory is allocated it should be deallocated in case one of the components get updated. This can not be fixed without rewriting PTStitcher.
Prevented minor memory leak possibilities.
Fixed bug with optimizer that would generate improper values for images that are cropped outside image border.
Fix "Bounds error" for the expanded depth of field. Projects now complete without error message.
Speed increase for AMD64 machines.
No longer using Microsoft's msvcr71.dll.
New Antialiasing Filters
Incorporates Thomas Rauscher's antialiasing filters. Antialiasing is very useful when reducing the size of the image to avoid aliasing.
The beginnings of 32bit Floating Point File support.
Incorporates Thomas Rauscher's additions of 32bit Floating Point File support. 32bit floating point TIFF files can be opened, saved, and processed using one of the antialiasing filters.
BMP file with rows recorded in reverse order.
Fixed bug that now allows to open BMP files that have their rows saved in reverse order.
PNG file fixed
Linked with newer image (TIFF, JPEG, & PNG) librarys. Fix problems of building projects using or creating PNG files. Minor bug fixes.
Cropping outside of image
Incorporated Joost Nieuwenhuijse's bug fix for when source images are cropped 'outside' the original image border. Cropping is done using the C parameter on i and o lines in stitching script files. This is often handy with almost full frame fisheye images that have some area just in the corners that needs to be cropped away. This fix allows PTGui version 4.0 or later to no longer create temporary files. This fix also removes a check and error message for negative control points
Minor bugs fixed
Fixed small memory leak.
Implemented JPEG optimization. Allows higher compression with JPEG files. Reducing file size by 35% and maintaining quality. Optimization turned on by default. It can be turned off using the stitching script file. Some very old applications may have trouble displaying these images.
Official version released.
Version 188.8.131.52 is the same as 184.108.40.206.a1 except for version number.
Updated to work with 16 bit images
16bit in PhotoShop is actually 15bit+1 (0 to 32768), 32769 discrete values.
All of PanoTools 16 bit mode is written for *full* 16 bit.
Images imported from Photoshop to Panotools are converted from 15+1 to 16 bit.
Images exported from Panotools back to Photoshop are converted from 16 to 15+1 bit.
Incorporates Fulvio Senore's fast code . Faster transformations by extrapolating values. Invoked by adding f0 to the m line in the stitching script . Check out my test, up to 300% faster.
Incorporates Rik Littlefield's changes to Fulvio's fast code to handle morphing points and maintaining low errors.
Incorporates Rik Littlefield's Extended Depth-of-field feature. Automatically determine, for every point in a picture, which of numerous overlapping images has best focus. Masks are generated to reveal the best focused parts of each image. Invoked by adding a z line to the stitching script.
Fixed bug that prevented the creation of very large PSD files.
PTEditor - Fixed bug that would not open any file.
Plug-in - Fixed the dialog names on Windows. Some dialogs had incorrect names.
Dialogs that prompt for file names ( Fourier, and Setting ) work properly with paths and names that have spaces or umlaut (äöü) characters. Edit file/path controls are now scrollable and edited changes are used.
Thanks to Thomas Niemann's investigation I have changed how often progress bars are updated. A 3750w X 5000h pix image. Running both radial luminance (vignetting) and radial distortion (Chromatic Aberration) correction went from 4:06 down to 1:32 minutes.
Incorporated Rik Littlefield's Optimizer improvement . This is based on Beta 3. Changes from beta 2: fixed a bug that would sometimes increase the Field of View (fov) value.
Incorporate Joost Nieuwenhuijse and Rik Littlefield's query feature.
Use this little Windows utility, panoinfo, to display current version and feature information of the pano12.dll.
Incorporated Kevin Kratzke's Radial Shift fix.
The Radial Shift, when colors channels have different values and one of the d values is > 1.0 would give incorrect results around the edge of the image.
Updated reading PSD file to read updated format.
Now usable as plugin with PhotoShop as well as with the various GUI front ends.
Fixed bug with odd size data structure for Photoshop files.
There is only one pad char at the end of all layer and channel data, if everything was an odd length.
There are a couple bugs in PanoTools with the creation of multilayer Photoshop files.
Because of the way PanoTools saves multilayer .psd file other programs can not open the files.
A multi-layered psd file regardless if it has a clip mask should both still have a shape mask, that isolates the image from the rest of the layer. The clip mask, if present should isolate the parts of the image from the rest of the image, using various degrees of transparency. This allows to modify the mask to hide and show various parts of the image and never reveal the background.
In file.c the function writePSDwithlayers is called for both With_Mask and Without_Mask with no difference. If With_Mask is used the Alpha channel that held the shape mask is replaced with the clip mask data. It would have been nice if a new channel was created instead, but this is not so and without PTStitcher.exe source code will not be so.
The seam options are ignored by PTStitcher.exe; middle (s0 'blend') and edge (s1 'paste') should determine if the seam on the clip mask is in either the center of the overlap or at the edge. Feathering is done only if the With_Mask is used. Feathering should be allowed at the edge too, but it is not so.
The file format to save Adobes 16bit multilayer PSD files is not known to me and the format is proprietary.
If 16bit input images are passed to PTStitcher to try to create a multilayer PSD file they are reduced to 8bit.
To create 16 bit multilayer file save result as multi file TIFF. Import
these files into Photoshop. Use Erik Krause PS Action
Import TIFF files with alpha channel to masked layers .
For both With_Mask and Without_Mask create a shape mask hiding the non image data.
To determine which option was used, With_Mask or Without_Mask I scan the Alpha channel to see if it contains semi transparent pixels. If the alpha channel is only Black or White then it can be used for both shape mask and clip mask. This test will fail if the feather was set to 0.
If Alpha channel has feathering create a new shape mask that is totally opaque.
For backward compatibility reasons I continue to create mask for Without_Mask
Create both of the shape mask and clip mask properly.
Changes added to file, file.c in functions, writePSDwithLayer and addLayer with new functions hasFeather and writeTransparentAlpha added.
The result of the changes is that
Updated Adjust.c so that the options yaw, pitch, and roll ( y, p, & r ) can be made equal to each other like v, a, b, & c can when optimizing.
i f2 r0 p5 y0 v183 a0 b-0.1
c0 mx400 my400
i f2 r=0 p=0 y182 v=0 a=0 b=0 c=0 mx400 my400
This allows to get a general value if you know the camera was level. But each image should be allowed to calculate separately for best results to compensate for little play or movement in pan head and tripod.
After A discussion on "What value for radial brightness falloff" and getting an enlargement back from the photo lab where I can see circular banning on the image (this was because I used the Correct filter to fix Luminance Falloff and then some massive levels adjustment.) has prompted me to look at the source code of panotools.
I modified the function correct in correct.c
if( TrPtr->src->width < TrPtr->src->height )
sizesqr = (TrPtr->src->width/2.0) * (TrPtr->src->width/2.0);
sizesqr = (TrPtr->src->height/2.0) * (TrPtr->src->height/2.0);
Page last modified July 16, 2006