Wednesday, February 04, 2009

How to cheat a crop


Part of the art of restoration is to generate data when it isn't there but you know it ought to be. A lot of historic images have damage at the edges. This one is a glass plate negative, which was a popular technology from the mid-nineteenth through early twentieth centuries. Glass colloidon plates were an improvement over daguerrotypes because getting a negative makes it possible to create high quality reproductions; daguerrotypes couldn't do that. The trouble was glass plates are very fragile. They tended to collect scratches and often the emulsion would simply peel away. That's what happened at the top of the photograph here.

It's tempting to just crop that damage out of frame; someone even tried that. Here's their result.

This gets rid of the damage, but it leaves the portrait with an odd composition. The subject's head wasn't intended to be so close to the top of the frame. That gives it an oppressive feel, and so much of the tree in the background is lost by the crop that the leaves no longer stretch continuously from right to left across the image. That loss enhances a compositional flaw in the original: a branch appears to be growing out of her head. The more context is present in terms of how much of that tree appears in the background, the less distracting that branch will appear. Ideally I'd like to grab the camera, take two paces to the left and reshoot. But I don't own a time machine and this photo is about a hundred years old.

The next best solution is to cheat. Yes, cheat. I cropped the image a little bit higher than the actual remaining data allowed, then patched in a small blank area at extreme upper right.

Cheating isn't something to try recklessly, of course. Here it was reasonably certain that the only missing data were a few leaves. There's no unique historical value to those leaves and it was already clear from the unrestored image that a higher crop had been the original artistic intent. I wasn't going to be so bold as to cheat data all the way to the very top of the original crop, but a small careful cheat improved the composition.

The key to cheating a crop is to do it only on small areas that are obvious to intuit and where no essential data is likely to have existed: blue skies, dirt, or in this case tree leaves.

Tuesday, February 03, 2009

Something's wrong with this redirect

WP:DRAMA redirects to Wikipedia:Administrators' noticeboard/Incidents.

Either we take administration seriously or we don't. Sure, ANI gets misused. But it's inappropriate to validate that disrespect with this sort of joke.

Sunday, February 01, 2009

Levels of challenge

It's always a pleasure to see people react with delight when they first encounter a restored image of their own culture. Yet it's rare to find a feature-worthy image of my own local area. Although San Diego is the oldest city in California, it was far from the gold rush. So the Library of Congress collection has far more historic images of San Francisco and not much quality material about the southern end of the state. Yet last night a high resolution photochrom turned up of our most famous local landmarks: the Hotel del Coronado. Ooh, this was exciting.

The bibliographic notes described this as a color slide. Well, that's right and it's wrong. The image itself is a photochrom c. 1900. Photochrom is a hybrid between black and white photography and chromolithography. Basically, before real color films were invented this was a type of colorization, nineteenth century style. Several decades later the damaged print was photographed for archival purposes on Kodak slide film. So although this is a color slide in one sense, in another sense it isn't.

When reviewing an archival image it's good to know what type of image it is, and also very important to assess the challenges to restoration. This one had two levels of challenge. One was more obvious than the other.

This is easy to spot in the original: the original panorama was photographed in two parts, then later the print got creased from careless folding. So up and down through the center of this image there are two white lines: one straight, one jagged. The image on the right doesn't quite match up with the one on the left either: a few pixels are missing. So it's necessary to go up and down patching in missing data. That's easy to do on the sky at top and the lawn at bottom, but to fill in the architectural details takes work. The more boundaries of any sort that a crease or a seam or a scratch crosses, the harder it will be to repair. This one crosses many boundaries in an important part of the image.

Basically what I do is first move the right portion into proper alignment, then take the healing brush and clone stamp to fill in data from surrounding material. A way to repair a damaged window on the print is to borrow data from a similar window; to fill in a missing portion of the eave, borrow from another part of the same eave. Then blend in so the stretch looks natural. By starting with the easiest parts and moving in to the complex areas, eventually the entire seam disappears.

It's not exactly easy, except in a relative sense. There's a tougher problem on this image that's less apparent at first glance.

Here's a demonstration of the problem. It's the sky. The trouble is easier to recognize after a preview selection and auto levels on the unrestored version. We don't do the restoration work on a levels preview, of course. It's just a good way to see whether something subtle would become a bigger problem than it seemed at first glance.

The natural first step in restoring the sky is to remove dirt and other marks. That's normal for any historic restoration. This is an unusual sky, though, and it has three additional problems.
  1. Extreme brightness differences from the center to the left and right edges.
  2. Uneven color: the left side has retained some cyan, but the right looks more magenta.
  3. Excessive contrast at the bright center.
It's normal for paper to dry out and darken at the edges. That makes sense if we remember that even though the digitization comes from a color slide, that slide must have been a photograph of an older print. If the original were shot and printed around 1900, then it would have waited four decades or more before technology developed to create the archival slide copy. So we have an explanation for the edge fade. The solution is relatively simple: patch and blend.

The bright area at center is harder to correct, though. And so is the uneven color loss and uneven contrast. Without getting too much into details, the solution involved a series of adjustment layers. The end result isn't quite natural blue sky, but then photochrom isn't a natural color process. It's colorization. So a slightly artificial appearance is expected.

The important thing about this restoration is to recognize that there can be multiple challenges: obvious problems sometimes distract from non-obvious ones. It could be discouraging to a novice restorationist to finish the seam at the center and then get mired in the tougher challenges of the sky. If you're starting out at this sort of thing, get to know a few people who already do it. It's better to start off on material that's really within your skill set or to get a helping hand with the tough parts, than to put days into an image for sentimental reasons and then push it aside because you've gotten stuck.

Saturday, January 31, 2009

Context

Is it just a damaged old stereogram of a construction site? If you know someone who lives in Tel Aviv, please show them this photograph and ask whether they can identify the location. Because if this is part of the White City then what you're looking at is a World Heritage Site being built.

According to the Library of Congress bibliographic notes, this image was published in 1936 but possibly taken during the 1920s. They have a few others also. If it's possible to get confirmation of an exact location on any of these (preferably with a photograph of the site as it appears today), then there may be enough historic value to justify a featured picture and a day for the restored version of one of these images on Wikipedia's main page. Without that information, though, these are just construction sites.

Context makes all the difference.

Friday, January 30, 2009

Banding together

About time we got back to that Benjamin Harrison portrait, isn't it? Here's the version selected by Awadewit and the IP editor. There's a lot to be said about it. First esthetics, then technicals.

Let's be frank: General Harrison here is a weak imitation of Jacques-Louis David's famous portrait of Napoleon crossing the Alps. It doesn't make sense why the Union flag is in tatters while the soldiers' uniforms are all spotless. Ben himself looks at no one in particular and raises his arm with about as much enthusiasm as he'd use to hail a waiter for a refill of coffee. It's technically a fine piece of work, but full of late Victorian conceits and the only hint of psychological depth is the horse who knows it's in a second rate piece of artwork and is ready to collapse of embarrassment.

Yeah, it's not to my taste. "But it's representative of the period," Awadewit countered. She has a point: it is that. Down to business then.

If you haven't already heard of a histogram, now's a wonderful time for an introduction. It's an almost magical little tool that's great to preview at the very beginning of a restoration and then use in earnest at the end of one.

Basically it takes all the pixels on an image and reports on their brightness, from 0 for absolute black to 255 for pure white. It produces a graph that shows the distribution of data, which is very useful. Even more useful: it lets you manipulate the information. There's a complicated Wikipedia article about it if you like equations, but actually it's quite simple and intuitive.

When images fade, what happens is they lose data on the extreme ends of the scale. The whitest white isn't pure white anymore and the darkest black becomes a shade of gray. But the overall distribution of data keeps a similar shape. So with a histogram you can move the zero point up to the lowest number where you've got actual data, then move the 255 point down to the highest number where you've got actual data. You can also shift the midpoint around if you feel like doing that.

It's a very good idea to preview a quick histogram fix at the beginning of a restoration. That's done through the 'levels' option, or 'auto levels' where the software does its best to guess what a histogram adjustment ought to be. This gives a glimpse of any subtle problems that might arise later.

First of all, remember that histograms are dumb. A histogram can't tell the difference between the tear at the upper left edge of this page and coloration that's actually supposed to be there. It doesn't understand scratches, dirt, or stains. As a restorationist you have to take care of those things yourself. And since dud data affects averages, you really need to un-preview the material to do the actual work of restoration. The ultimate results come out much cleaner that way.

Here, though, the issue is banding. You'll see several vertical lines that have nothing to do with artistic intent. Possibly that could be a result of the document having been rolled into a tube for storage.

Here's a closer look at one of those bands. It shoots upward from between the horse's ears.

Banding is not an easy problem to fix. If you aren't experienced or are easily discouraged, it's better to pass up an image with serious banding problems and look for something simpler. Otherwise the problems with this image are minor; I cleared out the rest in an hour and a half. First fix the dust, then the tear. Banding goes late in the game, because depending on what's being done the best solution is often to use the healing brush at a large pixel selection and break up those lines so they aren't visible anymore.

Key lesson here: always save a working copy immediately before changing the histogram. That's why most of my restoration filenames end in the number 2 or the letter B: the number 1 version is the pre-histogram save. If more changes turn out to be necessary, that's the source to go to for further work.


And that, at present, is where this restoration is. I had passed it to a friend who has good luck with lithography, but it fell to the bottom of his workpile so I took it back the other day. Worked on it quite a bit last night, but after histogram adjustment remaining banding issues appeared on the horse's body and the grassy field. It's going to take a bit more work yet to get General Harrison ready. Here's the not-quite-ready number 2 version. I'll save over that when final restoration is really complete.

A point worth remembering: at 114.6MB the number 1 restoration can't be uploaded to any Wikimedia Foundation website. If someone gets the urge to try their hand at an improvement they have to contact me. And if I get hit by a bus, so does this work.