Showing posts with label perspective correction. Show all posts
Showing posts with label perspective correction. Show all posts

Friday, October 30, 2009

A matter of perspective


Today's challenge began when GeraldK asked for help getting a featured picture about the Winter Olympics.  He's active with the Olympic Games project and is hoping to have something run on Wikipedia's main page in time for the 2010 Olympic Games.  The Bundesarchiv material he suggested was far too small for consideration: ranging from 21 KB to 51 KB.  Normally 10 MB would be the minimum for my work.

So Staxringold found a 32 MB poster from the Works Progress Administration about the bobsled run at Lake Placid, New York.  Lake Placid hosted the Winter Olympics in 1932 and 1938; its bobsled run was converted to public use after the 1932 Olympics.

So we've got a technically adequate file that fits the topic.  It comes with a problem: the dimensions aren't rectangular like they ought to be.  This is how it looks after 0.7 degree counterclockwise rotation.

This demonstration crop leaves a little background to help illustrate the problem.  If you look carefully enough, the caption itself is slanted in conjunction with the distortion.  There's an elegant solution to this in the form of a software option which mainly serves the different purpose of perspective control.

 When perspective distortion is a problem it usually appears in architectural photography.  Back in the days of film photography people corrected for it with a view camera or a perspective control lens.  In the digital era this usually gets corrected with software.  The same software controls can help the Lake Placid poster too.

In Photoshop this is called perspective cropping.  Perspective cropping allows the editor to drag corners into non-rectangular shapes.  Then the software performs calculations to generate a rectangular result.  To access the perspective crop, select the regular cropping tool and drag a crop selection.  A toolbar option will appear above with a check box for "perspective".  Check that box and the perspective adjustment becomes possible.  In our situation that means aligning cropping tool with the corners of the poster.  Just place one corner of crop selection directly onto each corner of poster, then crop. GIMP software users can get a similar effect from the Perspective Tool.  Below is the result after additional edits.

Much more satisfactory and probably fairly close to how the poster looked when it was new.  If the distortion had been more severe we might have supplemented the perspective crop by separately rotating the poster caption.  But this was a fairly mild instance and the perspective crop did the job.

What causes this distortion, you may wonder?  Many of the items from the Library of Congress poster collection were photographed for preservation purposes during the film era.  These posters were already old and fragile at the time of the photography and they may not have laid perfectly flat.  A slight rise or buckling resulted in the distortion.  So if the digital file was made from the slide film rather than from the original, the same problems get translated into digital format.
----
Photo credits:
http://commons.wikimedia.org/wiki/File:Cathedral_Notre-Dame_de_Reims,_France.jpg
http://commons.wikimedia.org/wiki/File:Cathedral_Notre-Dame_de_Reims,_France-PerCorr.jpg

Friday, September 04, 2009

Which way is up?

It only takes a moment to sense something off kilter with this shot.  Notice how all the buildings slant to the right?  This image needs counterclockwise rotation.  Many rotations are easy; this one isn't.  The photograph has mild perspective distortion.  No matter how one rotates it doesn't feel correct because the verticals on these buildings aren't quite parallel.  Also the sidewalk slopes upward from left to right.  Decreasing the slant on the structures means increasing the slant on the sidewalk.  So unless an editor is very careful about which cues to follow, something is going to come out wrong.

It helps to know that this is the Brooklyn Daily Eagle storefront, photographed in 1916.  Most of Brooklyn development occurred between the American Civil War and World War I.  This was relatively new construction when it was photographed so we can discount the possibility that significant shifting or settling would have altered the buildings themselves.  Let's look for trustworthy points of reference within the image.

The man descending the stoop uses canes, so he might not stand upright.  But what we can depend on is that the steps would be level.  Looking closely at the base of this stoop confirms my suspicions about the sidewalk: notice how the base at the left edge of the stoop is nearly twice as long on its left side as on the right side. This was compensation for sloping terrain.

Here's how that stoop appears after rotation and spot removal.  These weren't the only lines of reference when I rotated; I also went by the building verticals and roughly split the difference in terms of angle distortion.

Here's a glance of the whole image after rotation, cropping, and several lengthy rounds of dirt and scratch removal.

It's better than things started, but the distortion still leaves an uncomfortable sense that the lamppost is going to keel over onto something and the French restaurant at right looks as if it is leaning into the Eagle offices.  This keystone effect is subtle, but it's there.  The solution is to perform a mild perspective crop.

Here's the end result.  Added a touch of curves adjustment to bring out contrast in the midtones, plus localized brightness and contrast corrections.  The automobile at far right no longer fades toward the edge of the frame.  Let's hope those ancient cars had good brakes because the driver didn't angle the wheels toward the curb.  Otherwise, nothing looks askew.