More Punishment

Merry Christmas!!!

Google Earth now has entries for GigaPan. This is an amazing way to experience some places within Google Earth, but you’ll need v4.2 or later to see it.

In short, by placing a panoramic at the correct coordinates and specifying field of view, elevation, tilt, etc. it becomes possible to fly in to the image and look around it in detail. I decided to upload my night (hdr) panorama of Zurich but it wouldn’t let me — it wasn’t big enough! The image has to be at least 50 mega-pixels to be accepted. My original met this requirement but, as you may recall, I’d had to cut the image in 1/2 both horizontally and vertically in order to load it in to the HDR processing program. I could, of course, simply scale the image up but that would be cheating. So, I went back to the originals to try some new techniques.

There are two paths to follow… (1) Merge the images into an HDR with Photoshop and then do the tone-mapping with EasyHDR. Since I’d be loading just one 32-bit TIFF image, hopefully it would stay within EasyHDRs memory limitations. (2) Do HDR processing on each stack of images first and stitch those together into a panorama. This requires that the same transformation be applied to each stack in exactly the same manner or else there will be seams in the final image.

1) Merge into HDR with Photoshop

By restoring all the saved, aligned images I had made during my previous attempt, I had a good starting point. I recreated the three panoramas using PTGui and then loaded them all into Photoshop using “File::Automate::Merge to HDR”. The tone-mapping in Photoshop CS2 is poor compared to other alternatives, so at this point I saved it as a 32-bit TIFF.

Unfortunately, in the end I was unable to load even an image with 1/2 resolution in to EasyHDR. Windows programs that don’t do some sort of tiling of data (like Photoshop does) are generally limited to 2GB of memory. On to the next method…

2) Generate Multiple HDR Images and Stitch Them

The latest version of EasyHDR has some nice new features over what I used just 8 months ago. The trick here seemed to be to avoid anything that was dependent on the local image. To this end, I turned off the local mapping “mask” (which I don’t like anyway because it produces halos) and leave the general tone-mapping parameters at 1.0. I also never adjusted the black/white clip points, leaving them at the far ends of the spectrum. This would hopefully result in identical mapping for all image stacks and by saving in 16-bit mode there would be sufficient detail for me to adjust the total range in post-processing.

Before stitching, apply any filters that apply to a given image stack — noise-reduction, for example. Also, it’s likely that a lot of third-party software will not be able to handle gigapixel size images. You’ll have to run that processing on each part before stitching.

Other Things

Along with these changes, I switched the panorama generation to be “cylindrical” instead of “rectilinear” as Earth will do all the perspective alterations necessary. If you’re not familiar with the terms, the latter is the standard image that non-fisheye lenses will give you. It’s what the eye would see looking through a frame held in front of you. A cylindrical mapping, on the other hand, is what you would see if looked through a vertical slit held at arms length and then rotated your whole body, combining the all that is seen into a single image.

Here’s the final image… Click on it to browse it at full detail!  It should appear in Google Earth sometime in the future.  Look for it at 47.37593N, 8.54651E.

Zurich Night Panorama

Color

It’s taking me a while to go through all the photos I took while I was in California at the start of the year. Rather than wait until I’m completely finished, I’ve posted some of them in my gallery and will add to it later. I’ve also increased the sizes of all the images there. Share and Enjoy!

For the most part, it isn’t the eye that “sees” color. It’s the brain. Perhaps that it is why fantastic color is so pleasing. And when it comes to fantastic color, there is just no competing with Mother Nature.

Paros Sunset

Of course, as soon as you put a frame around it, the image loses something. I remember this moment quite well — I was sitting on an island beach with my new wife when I triggered the shutter. It was probably the most beautiful sunset of our two weeks in Greece, including those we saw in Santorini which is known for fabulous sunsets. I believe this image to be beautiful, but I’m also somewhat biased as I see it as I did then… without borders and my new love at my side.

If color stimulates the brain directly, what about something that stimulates in indirectly? Imagination, for example. It’s this that creates vivid dreams and makes appealing things like naughty on-line chat rooms. Imagination is often better than reality, and why not? There’s no limits to our imagination. As long as one doesn’t live there, it’s a great place for frequent visits.

The Point Reyes

Look at this image closely. How do you know that the walls are white, the stains are brown, the grass is green, and the little stripe at the top of the hull is blue? Your imagination fills in all the details. Unlike the color image above where you take it in all at once, this one draws the eye all around. Every place you look, you see more that what is there. There is color, but it’s like an overlay; it’s not there and yet you see it anyway.

Go on… Click on the image to see a larger version. Take a look around.

Now I’ll admit, I cheated. The image of the boat isn’t truly colorless. It’s 90% desaturated so you can’t actually see the color, but there is enough present to hint to the mind what it should be. Perhaps a child wouldn’t need it, but I find the imaginations of us adults sometimes need just a little push to get going. Could it be that we don’t use it enough?

Too Many Hobbies

Sometimes I think I should retire. It’s not that I don’t like my job because I do! It’s fantastic, really! I get to turn dials on the production systems of a computer network that has no equal anywhere on Earth… and that’s pretty cool.

No, I need to retire because I have too many hobbies and not enough time for any of them. As you might guess, Photography is one of them and, as you might also guess, it has slipped a bit in recent months. What with starting a new job, moving from Canada to Switzerland, and adding a new little girl to the family, I just don’t seem to have any time for photo work, video editing, programming, writing, or Christmas shopping. Sorry to throw that last one in there so early, but when you have to ship across the Atlantic Ocean, you have to start early.

I thought I’d write this article to briefly touch on some of the other things I like to do. Perhaps some other photo buff has a similar interest

Programming: I’ve written so much code over the last 25 years that I just can’t keep track of it all. Most of it just things I do for myself, touch I have contibuted some things to the open-source projects like Debian.

Travel: I moved to Zurich, Switzerland to take this job. I could have gone to any one of a number of locations around the world, but this seemed like a great chance to do some travelling. Switzerland is located pretty much in the center of everything. So far most of the destinations have been within the country but we have made a few trips to France and Italy. One day I’ll get around to processing the photos from those trips and posting them in my gallery.

Family: I’ve got a beautiful wife, a 3-year old son, and an 8-month old daughter (as of November, 2007). This is really the “hobby” that makes it so difficult to find time for all the others. People who don’t have kids really don’t understand just how much time they take and how much freedom you give up. Your life doesn’t change. Your old life ends and a new one begins. The change is that dramatic. I don’t regret it in the slighest — my kids are the most wonderful parts of my life — but the cost is significant.

Reading: Robert Jordan, Stephen King, Orson Scott Card.

Business: I’ve started or helped start three companies. One failed before it really got started, one ran for a few years, and the last did quite well (though I left to take my current job). I write a bit about it, too.

Home Renovations: I’m an engineer and though I could never get my mechano set to to take on the plans I had in my head, I’ve found that I have a pretty good knack for making things fit together when I’m the one cutting all the pieces. So far I’ve built a new kitchen (including moving 3 walls), inserted a mud-room in our garage, and added a deck on the back of the house. Each of these projects has taken several months from start to finish and I always lose 5-15 lbs over their duration.

Video Editing: Raw video is the most boring thing to watch in the world. Every time I’m doing some photography and I see a tourist with a video camera pointed at whatever-is-there, I cringe. When I see that person hold the shot for 10 seconds and/or slowly pan over the scene, I know that it’s likely some poor souls are going to be tortured with, “Want to see some shots from my vacation?”

Every year I take the collected footage from my video camera and make a DVD to send to family as a Christmas present. I set it to music, change between scenes fairly rapidly, and condense 12 months of video down to about 15 minutes. That’s a pretty good ratio.

I also enjoy time-lapse video in conjunction with my previous hobby of home renovations. Check this out… Four months of work in four minutes.



A Sucker for Punishment

I’ve finally updated my gallery to include photos from Ireland and Switzerland. Here is one that wouldn’t fit:

Zurich at Night

It’s a panoramic HDR image taken at night, which doesn’t sound so difficult. I certainly didn’t think it would be very difficult while I was taking the 33 shots that went in to it. The problem is that you can’t create the HDRs individually and then stitch them together because each combined section will be anywhere from subtlely to hugely different than the others. In the end, I had to…

  1. load each set of 3 images as layers in photoshop
  2. align them
  3. crop the image to the minimum area covered by all layers
  4. save the layered file
  5. save the brightest layer as “a.tif”
  6. repeat steps 1-5 for all image groups, output to b.tif, c.tif, … k.tif
  7. load images a.tif … k.tif into PTGui
  8. create points, optimize, adjust, and generate a panorama: x.tif
  9. save PTGui project
  10. open all the PSD files from step #4, this time saving the middle layers as images a.tif … k.tif
  11. load PTGui project
  12. touch nothing — generate again, saving as y.tif
  13. repeat steps 10 to 12, saving the darkest layers and generating the panorama z.tif
  14. load x.tif, y.tif, and z.tif in to whatever HDR program you use
  15. watch it crash from lack of memory
  16. load x.tif, y.tif, and z.tif in to Photoshop and shink them
  17. load x.tif, y.tif, and z.tif in to whatever HDR program you use and go (remember that they’re already aligned)

See… Easy! Of course, the pano was too large for EasyHDR to handle and Photoshop (CS2, anyway) does a terrible job in comparison. I had to scale x, y, and z by 50% in each direction before it could load and process it.

Of course, all this was done for the same reason you climb a mountain: Because it’s there. The image is blurry if you look close-up in the original (not posted here) because it was so windy the night I took the photos that I could not keep the camera perfectly still for the long exposures. C’est la vie!

Is Photoshop Wrong?

I think there is a bug in Photoshop CS2…

Photographing architecture is difficult unless you have a shift/tilt lens because a photographer usually has to point the camera upward at an angle to capture the entire building. Unfortunately, this causes the normally parallel vertical lines to tilt inward toward the center of the photo.

Photoshop offers a “distort” filter called “Lens Correction…” from which you can supposedly fix this. Unfortunately, it doesn’t work correctly and here’s why:

90degree Original 45degree Original

The two photos above are of the same coaster and CD. The one on the left is taken from directly above while the one on the right is taken at a 45° angle. It’s easy to see how the angle causes compression of the vertical and makes the lines that make up the sides of the coaster converge. After applying a correction to the latter you would expect it to look more like the original, but it does not — as the following photo illustrates.

90degree Original 45degree Corrected

Photoshop is doing a correct forward transform (as though tilting a piece of paper away from you) but since it’s supposed to be a corrective action, it should be doing a reverse transform (taking a tilted piece of paper and making it straight). Working around this problem is not trivial but the only practical difference is the vertical scale. In short, Photoshop reduces the vertical size by a factor x when it should increase it by that factor. Thus, if you know what x is then you can increase the vertical size by x-squared so that after the incorrect correction it will be larger by x rather than smaller by x.

To do a correct correction, first do the correction as you would normally, recording the values used because you’ll need them again later. Once the change has been applied, use the following equation to calculate ynew (the last form is easiest).

eqn2863.png

ynew is the new canvas height, yold is the old/original canvas height, and ycorrected is the height of the image after the correction was applied (you’ll have to measure this by hand). Undo the correction, go in to Image::ImageSize, uncheck “constrain proportions”, and set the height to be ynew, scaling the image using the best algorithm (”bicubic”). Once that is done, run the lens correction again with the same parameters you recorded above and you’ll end up with a properly corrected image, as shown here:

90degree Original 45degree Correctly Corrected

The unfortunate part of this technique is that it does two imprecise scaling operations instead of just one, but in general this is not a problem. The better way is to not use the lens correction filter at all but rather just perform a “free” transform that gives the same result, but even that may involve multiple operations if you have to alter rotation or barrel/pincushion correction.

I’m curious to know if this same problem also exists in CS3.