NOTE: this version of pano2.dll has been posted in August 2004. You can find newer versions here.
Here you can download a faster version of Pano12.dll (Windows only). This version uses the Sourceforge source code, so it should include all the changes added by many developers. I have compiled the dll with the Microsoft compiler: as a result it is much bigger but it seems to be slightly faster too.
The default behavior of the dll has not changed, so it will still be slow unless you activate its new feature. With this version you activate the new feature modifying the stitching script. With PTGui you can modify the script checking the "Show script" checkbox just below the "Create Panorama!" button, with other programs it should not be very different.
The script contains a line starting with the "m" letter, it can look like this, but the numbers may be different:
m g1 i0
you must add " f0" at the end of the line, so that it looks like:
m g1 i0 f0
The "f0" command will enable the speedup: thanks to Rik Littlefield who has modified the source code to work well with projects that use morphing too.
This version of the dll is faster (when activated by the script file) but it introduces small distortions in the stitched image. The distortion is usually not noticeable because I have decided to limit the speed gain in order to keep distortion slow. You can expect a maximum error of about 0.25 pixels, usually lower.
You can test the error with your own projects: you must create a file named "pano12_opt.txt" in the SAME folder of your project (where you have the images to be stitched and the project file). The file must contain the following line:
EVALUATE_ERROR
followed by at least one empty line. The text must be all uppercase. The dll will run slowly since it will compute each pixel in both ways and it will compute the maximum errors in the x and y direction. The computed errors will be written to a file named "Errors.txt" in the project's folder. The dll will append text at the end of the file, so you should delete it before doing a stitching test. The "Errors.txt" file will look like this:
0.006756 0
0.014142
0.011968 41
0.029291
0.015840 82
0.045176
0.019267 123
0.062034
0.023654 164
0.081665
0.029452 205
0.101619
0.037152 246
0.127562
0.047476 287
0.159430
PTStitcher calls pano12.dll many times for each source image, each time pano12.dll will compute a small portion of the image. For each call to pano12.dll the txt file will contain two lines: the first contains the maximum x error for that portion of the image and the number of the starting row, the second line will contain the maximum y error.
The errors are a measure of the distortion of the stitched image if stitching at a 100% zoom ratio, without reducing the size of the output image. If stitching at less than 100% the resulting error will be reduced in a proportional way.
Note that the "EVALUATE_ERROR" command works only if you have enabled the speedup.
The recommended way to activate the speedup is modifying the script, as explained above.
In some situations, like when using a plugin, it is not possible to modify the script. You can also activate the speedup using the "pano12_opt.txt" file: just add the following line:
FAST_TRANSFORM
When using a plugin you may wonder in which folder you need to create the option file. You will need to experiment with your program but probably the folder will be the folder of the program or the folder of the image being edited.
Fulvio Senore
fsenore@ica-net.it