Showing posts with label histogram. Show all posts
Showing posts with label histogram. Show all posts

Sunday, February 22, 2009

Devious histograms

Jake Wartenberg is working on a wonderful chromolithograph of the Montana state capitol that's nearly done. He sent me a copy for review with a couple of challenges he was facing. And he was also generous enough to let me blog about it. So today we'll discuss more about histograms.

Changing the levels is just about the last step in restoration. It can be very useful to preview a levels adjustment in order to detect subtle problems that need to be addressed, but to do the actual fixes it's important to step back to a pre-levels version. It's a good practice to always save a version from immediately before the levels adjustment, and to keep that pre-levels version under a separate filename. Jake's got good habits and he's making more changes to his pre-levels version right now.

This is very good work and it's nearly complete. The bottom border needs cropping and an information tag that someone pasted into the lower margin needs to be clone stamped out. The data on that tag is useful--it ought to be transcribed for the image hosting page when the work gets uploaded--but it isn't part of the original work. Since histograms are dumb, that tag translates into bum data as far as the histogram is concerned. In turn, that has an effect on what the software wants to do with brightness and color adjustments throughout the image.

Another element to remember with older paper prints is that paper often acquires uneven brightness as it ages. Edges tend to dry out and darken more than the center of the paper. Notice how in this example it's the corners that are darkest of all, while some of the margin in the middle (top and bottom) is closer to white. So Jake's also going over his pre-levels image to create feathered adjustment layers that will even out the brightness and color balance.

While we were discussing this he asked me why that matters. How much difference does it make, really? Here's a demonstration from one of last year's restorations where the difference stands out.

Here's the unrestored version of a Robert Fulton submarine design from 1806.

And here's the final featured version. It took quite a bit of work to get to this point. The hardest part to fix was Fulton's description, because he had rubbed out the original description and written a second one in smaller lettering in its place. In order to get an even tone through that section I actually went in at 700% resolution, working with tool settings 2 and 3 pixels wide along the outside edges of each pen stroke. It took a lot of work, but the end result is a natural paper tone.

The original rubbed-out lettering is easier to see on a preview of the unrestored version.

But obviously, trying to work from this version isn't going to yield the best end results.

Histogram previews can be a wonderful way to glimpse the potential of an unrestored image. A histogram preview gives a hint of how far the restoration might go, and reveals challenges that might be difficult to detect otherwise. But whenever possible, do the other restoration work before a final histogram fix. The end result comes out better that way.

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.