PanoTools mailing list archive

Mailinglist:proj-imim
Sender:RDHoore (ProxyVista)
Date/Time:2000-Apr-28 23:52:00
Subject:CoolPix Script for PTStitcher using 4 images instead of 2

Thread:


proj-imim: CoolPix Script for PTStitcher using 4 images instead of 2 RDHoore (ProxyVista) 2000-Apr-28 23:52:00
> Does anybody know how to modify the CoolPix script for PTStitcher from two
> images, (one taken at 0 drgrees & the other taken at 180 degrees), to four
> images taken at 0, 90, 180 & 270 degrees ?

Yes... It's a long story, though. I discovered it through the school of hard
knocks.

The script posted on Helmut's site cannot be used with 4 pictures, because
the lens correction parameters are wrong. Your images will never overlap
properly. I had been breaking my head on this for weeks: why didn't these
damn pictures overlap properly?!#@

I finally found a clue encrypted in the following sentence by Helmut in his
document called "Creating Panoramas Using Panorama Tools" written in July
'98:

>> The images of the current example were first cropped to exactly cover
>> the image circle, then remapped to "ideal" fisheye mapping (via the
>> "Sigma" settings file, which works for this lens, a Spiratone adapter,
>> too), and then a center gradient filter of amplitude "20" was applied.

This had nothing to do with a Coolpix, but nevertheless the keyphrase here
is: REMAPPED TO IDEAL FISHEYE MAPPING. I'm not even sure if Helmut meant
what I think he meant, but in any case, it rang a bell. Hey, is our Nikon
fisheye lens not ideal?? No sir, it's not. You won't notice the problem with
only two images, because the overlap there is so very small (is that why
IPIX never used more than 2 images?), but using four images, the total
overlap per image is about 50 %. In PTStitcher you don't even see how
incredibly wrong the match is, you would have to do the conversions manually
in PhotoShop with the plugins instead in order to see it.

In any case, you really can't ignore the problem, as you will probably have
noticed. :)

So, enough introduction, what's the "ideal fisheye mapping" for the Coolpix
fisheye lens mounted on an IPIX rotator? Good question. We're talking here
about the "radial shift" or the a, b and c parameters. I found it out with
trial and error (using only the b parameter) using the Photoshop plugins
instead of PTStitcher. The b parameter should be negative, not positive. If
you want to hear that in human language: the center of the image looks
closer than it should. So we need to do a radial shift to move the center
area a little backwards.

So here is my script (you would never believe there is so much blood and
sweat in these few lines):

p w1200
m i2

o f2 v187.98 u15 y000 p0.55 r0.30 a0 b-0.075 c0 k0 -buf
o f2 v187.98 u15 y090 p0.55 r0.30 a0 b-0.075 c0 k2 +buf -buf
o f2 v187.98 u15 y180 p0.55 r0.30 a0 b-0.075 c0 k2 +buf -buf
o f2 v187.98 u15 y270 p0.55 r0.30 a0 b-0.075 c0 k2 +buf

Please note that the v parameter is true only if you crop your fisheye to
1160 x 1160 pixels (using the 1600 x 1200 camera resolution) as I do.
Cropping is a sensitive thing, it's got to be right if you want good
panoramas. I don't use the "brightest rectangle" automatic cropping feature,
because it often doesn't find the right place to crop (especially when there
is lens flare on the edges). I have spent some time finding the right
rectangular in Photoshop (enlarge really well), and use the Canvas Size to
slice off pieces. When I found a good rectangle, I recorded it as a
PhotoShop Action. Once that is done, one can just play the action on the
whole folder of fisheye images (make a backup first!!!). As you probably
know, the place of the circular image within the black area differs severely
from camera to camera, so it's no use if I tell you how I crop my images.

The required values for the p and r variables also depend on your specific
IPIX rotator (what to speak if you use another kind of panoramic tripod
head).

The p parameter controls the pitch: look down at your feet, and then look up
to the ceiling. If your head were the rotator, you would be changing the
pitch. An IPIX rotator either looks slightly up or slightly down because the
rotator isn't bent in a perfect angle, and is not very solid (cast iron
would have been a better fit).

The r parameter controls the roll. Rest your head on your left shoulder, and
then on your right one. You are changing the roll. Generally the IPIX
rotators roll to the right slightly because of the weight of the batteries
(and even more when you press the shutter).

These are very slight deviations, hardly noticeable with the eye, but they
do have a big impact, trust me. If you prefer spheres without seams and
without a hole in the zenith, you need to figure out the proper values.

So you need to take 4 pictures in a room that has a visible pattern both on
the floor (e.g. tiles) and ceiling (e.g. panel), and then spend some time
trying to adjust the p and r parameters. Once you've got good results, it
will work pretty well with your future panoramas as well.

Using 4 pictures should give much better panoramas than with 2 pictures.
However, PTStitcher has a few shortcomings (which I have reported to Helmut
some months ago, and he said he is aware of them and will probably try to do
something about them):

- it does not try to find the best places for the seams,
- it does not blend the colors properly (sometimes it even makes Picassos),
- it does not feature auto-correcting of p and r parameters.

Nevertheless, you will get nearly perfect results, especially for outside
views, where the tiny stitching errors at the seams are often invisible in
the scenario.

As far as taking 4 pictures with an IPIX rotator, if you are a practical
person, and you have something like a Dremel minidrill, you can take the
rotator apart (need 2 sizes of hex keys) and make two extra indents so that
the rotator will click at each 90 degrees. Beware, the new indents need to
be really *exactly* opposite each other, otherwise either one or both of the
new "clicks" will be useless. If you've used the rotator long enough then
the small metal balls will have made a track so that you don't need to
measure the distance from the center, but you need to somehow figure out the
exact 90 degree angle on the two existing indents, and even more important
(and difficult): the two new indents need to be exactly opposite each other!

If you're not a handy person, don't even consider starting, you will simply
ruin it. (I also believe it might void your warranty with IPIX...) But it is
possible, mine worked out very nicely.

Good luck.

Ronny D'Hoore
ProxyVista AB

Next thread:

Previous thread:

back to search page