Tuesday, December 22, 2009

Holiday spirit for the Scrooge in us all

The holiday season is upon us so this post combines image editing comments with links to my favorite Christmas music.  Overall I've got a low tolerance for canned Christmas cheer so today's selections skew toward the offbeat and cynical.

First musical selection: "The Twelve Days After Christmas"

The image at top is a 1904 drawing in pastel and gouache by Everett Shinn, called "Fourteenth Street at Christmas Time".  This is what we'll be discussing today.  Usually the Library of Congress hosts unedited files of its scans.  I can tell someone has fiddled with this, though.  the histogram gives it away.

See those vertical lines across the graph?  That's a dead giveaway the image has been digitally edited.  The lines are evenly spaced, too, so I know what that person did was a straightforward levels adjustment.  This is now it appeared when I downloaded the image and cropped out the border.  It's a shame, really.  Because the histogram wasn't asjusted correctly.  See the gap at the right end of the graph where there's no data at all?  The white point is too far to the right, which gives the image a muddied appearance.

Normally the histogram would be the final edit anybody makes to an image.  It's a point of no return; subsequent editing can't recover the data that gets changed this way.  I played around with this one though, and didn't do anything else to the image.  You'll see how this brings a little more life into it.

And to go with that, here's "Mrs. Claus Wants Some Lovin'"

The difference between this and the earlier version is most noticeable at the shop window and in the snow at the lower right corner.  The downside is that we've lost more data in the meantime.  Here's the new histogram; each of the vertical bars represents a brightness level between 0 and 255 where the image contains no data.

It's sad to encounter a good image that has already been edited in ways that make it impossible to get optimal results from later edits.  This is a good demonstration of why it's best practice to maintain archival copies of digital images without any histogram alteration. Although I'm not against histogram adjustments, I do upload pre-histogram versions of edited files for recordkeeping purposes whenever possible.  That way, if anyone wants to do additional work they don't have to choose between quality loss or completely starting over.

To go with this we have the most somber of today's selections: Simon and Garfunkel's "The Seven O' Clock News/Silent Night"

Just to see what else could happen, I also worked on the histogram with a couple of other tools.  Curves and shadow/highlight allow for more sophisticated alteration than the levels tool.  There are many possible ways to apply them, and I actually don't know what the artist's original looked like or what his intention was.  So these are speculative changes.  Yet it can be a useful exercise to work with different tools and see what one can do with them.  First, the curves tool.
In spite of the somber tone of this scene, I do like the difference.  So here's Shirley Temple singing "I Want A Hippopotamus for Christmas" while we look over the histogram for this edit.

The jagged appearance is a giveaway that this has been edited after a histogram change.  I enhanced contrast toward the darker part of this image, which accounts for the change in its overall curvature.

One other thing we could try is the shadow/highlight tool.  It performs sophisticated enhancements on the brightest and darkest ends of the histogram.

If you're interested in studying the artist's technique this version might be useful, but it brings out distracting information.

The emotional impact of this image seems to be in the contrast between the bright shop window and the poor peddler.  A mass of shoppers cluster near the established stores while he struggles with his small cart of merchandise ankle deep in icy sludge.  If the store window isn't bright enough it doesn't set off his misery.  More than anything else, that hunch was what prompted me to look at the histogram in the first place.  And the straightforward levels adjustment of my first edit seems to confirm that opinion.  The curves and shadow/highlight tool edits were attempts to refine the idea.  I didn't want either the snow or the cart to look too cheerful, but I wanted to keep that bright window looming above his head.  Does it suggest a halo?  Maybe he endures this to support a family.

Of course these are speculations that I wouldn't articulate on Wikipedia.  Yet they're elements I do consider when working with an image.  There's also an argument to be made that fine art shouldn't be restored at all.  Yet this image was already edited before it was put online, and if my opinion is worth anything that edit wasn't done very carefully.

So since we're looking at histograms today, here's the histogram for the fourth version.  I happen to like The Bobs (they're an underrated a capella group), so linking "Christmas in L.A." along with this.

Overall I prefer the third edit for this one, but am not quite sure which way to go.  Seeking opinions and input.  Your voice is welcome.

Monday, December 14, 2009

Making light of troubles

While Garrondo and I were discussing the Photoshop curves tool last night he asked me to blog this restoration as an example.  It depicts a pair of Balinese dancers and dates from 1929.  The photograph also has a lot of other distracting elements, so let's fast forward to the completed restoration and then concentrate on a few points.  Here's wishing the actual editing went so quickly; it actually took a day and a half.

The most difficult part of this restoration was not the obvious marks and streaks.  It was the tall flower on the right dancer's headdress.  The dust specks weren't so hard to remove; the problem was what to do with all that streaky low contrast bands which intersected it.  Compare it to another flower at far left: the unrestored versions appear so different that side by side, they hardly look like they both come from the same photograph.

Regardless of what caused the streaking (I've got several guesses), the first question was whether to correct for it.  So work began by getting rid of the spots specks, while leaving the streaks unaltered.  Sat back for a view of that version and decided the streaks really needed to go; they served no visible function other than distraction from the primary subjects.

The next phase of editing didn't try to create a totally even background.  I didn't want to alter much adjacent to the dancers themselves.  One of the few areas where background absolutely had to be patched near a costume element, though, was that darn flower.  Used the clone stamp at a low hardness setting to get a natural effect.  Afterward several brightness adjustment masks reduced the starkness of the differences between portions of the image.  Also enhanced contrast at the rose, which ultimately meant re-cloning the background in that area.

The final result on that flower might be a smidgeon too contrasty.  Yet considering what there was to work with, it was a pleasure to see it come this far.

Another aspect of this restoration was really gratifying at the end, although it's subtle enough that it's scarcely the first thing to catch anyone's eye.  In the original photograph the face on the dancer at right is slightly overexposed.

To see the difference a curves adjustment makes, here's a view of her as she looked after all the edits except for the curves adjustment had been completed.  There's a blandness and flatness about her; it's hard to catch her expression.

Now have a look at how the curves tool brings out the midtones.  Her face is still youthful but less like putty; more personality shows.  And the intricate contours of her headdress and shoulder band become more noticeable.

Restoration can be tedious work.  An image such as this one has so many obvious flaws that one runs the risk, out of exhaustion, of shortchanging the final adjustments.  I wish I knew the name of the somber young dancer in this photograph.  Those eyes look like she saw a lot of life at an early age.

Sunday, December 13, 2009

Showing off one's curves

December has been a very busy month so far.  After publishing an editorial in the Wikipedia Signpost, several people approached me with an interest in undertaking digital restorations.  Some of them had never tried it before.  So this post is dedicated to one of those adventuresome and talented people.  Garrondo expressed an interest in science and in Spanish history.  So after his first effort, which went quite well, he asked for advice about choosing a second project.  The Jay I. Kislak collection of the Library of Congress rare book division was a good place to go: it includes a 1790 publication of early Spanish colonial archaeology by Antonio León y Gama.  The scanned book is 145 pages of text about Aztec science and art with one glorious fold-out illustration, reproduced above.  And thanks to excellent digitization practicesthe LoC the illustration is also available in a 37 MB TIFF version.

Garrondo liked the selection--who can blame him?  But it's a very ambitious project for a beginner.  The scan suffers from bleed-through text and the original has smudges with a distracting crease through the center.  It was also made on laid paper, which carries its own distinct pattern that makes restoration bothersome.

He came back today with an impressive first effort.

One has to view these things at full resolution to see how good his work is: Garrondo took care of the dirt and creases and bleed-through text while preserving the laid paper pattern.  The result is worthy of featured picture recognition and highly encyclopedic.  So bless him--he took my criticisms very well.

It looked like he had adjusted the histogram.  He provided a pre-histogram TIFF file for me to play with, which became a demonstration of the difference between Photoshop's auto levels feature and its curves tool.
At left is the auto levels version; at right is a manual curves adjustment.  Notice how the paper seems less dirty and the contrast is better on the snake's scales and the sun's face.  Both adjustments deal with the image's histogram, which assigns a brightness value of 0 to 255 to every pixel on an image.

Physical documents lose contrast as they age: nearly every newly produced image will have values across the entire 0 to 255 range, but older documents often have no data at the extreme ends of the histogram range.  In this instance the extreme points were 7 and 236, with minimal data toward both ends.

Auto levels chops the histogram toward the extreme points of its range--but may lose a little bit on both sides--and does a straightforward average of the remaining data.  So I suspected the auto levels had lost information on paper texture.  The simplest way to address that would be to redo levels manually, but there was more to be accomplished here.  Curves allows a nonlinear change in the histogram.  Or to express it without jargon, a curves adjustment lets the editor enhance contrast in the darker end of the range where those scales are and enhance contrast again in the midrange for the sun's face and the figures on the dial while reducing contrast at the bright end to make the paper appear cleaner.  For a closer look, here's the curves adjusted version on its own.

The result is brighter, clearer, more vivid.  Garrondo can get even better results if he puts more work into that irritating laid paper background to minimize smudge marks.  Notice how good the lower right corner looks: a similar quality on the other three corners will improve the final result.  This isn't just a matter of background detail.  Software isn't intelligent; Photoshop can't tell the difference between a historic archaeological report and a dirty smudge.  It's the human editor's task to prepare an image with informed choices so that the data is as good as possible.  Takes a lot of patience, but when it's done right the final edit feels like magic.  Like a window back in time.

Garrondo agreed to put more work into the smudge removal.  It will take a little practice for him to get used to the curves tool, but the result is worth the effort of learning.

Monday, November 30, 2009

Arbitration voting guide

People have been asking for recommendations on this year's Arbitration Committee candidates.  So here's a rundown of principles and useful links.

The Arbitration Committee's core function is to weigh evidence against policies in conduct disputes.  The Committee is also a final venue for community sanctions appeals and they do a few other things which privacy issues require keeping offsite, such as ensuring that checkusers and oversighters are trustworthy.

It's equally important to remember what the Arbitration Committee is not: its mandate does not include content disputes.  In 2003-2004 ArbCom was created in tandem with the Mediation Committee and the specific mandate of content resolution was designated to MedCom.  The Arbitration Committee does not write Wikipedia's policies or guidelines.  It is not a governance body.

Arbitrators have to solve Wikipedia's toughest disputes.  These include several long running conflicts which involve a dozen or more editors and have lasted for years: ethnic, nationalist, and religious disputes, as well as several others.  The level of interaction within those disputes sinks so low that in some of them serious offsite harassment occurs.

A good candidate for arbitrator should come to the position with formal dispute resolution experience, so they're aware firsthand of the problems that happen in dispute resolution.  There are six types of formal dispute resolution at Wikipedia:
Half of those processes have designated volunteers:
Other relevant processes include oversight and checkuser:
Script-generated measurements of a candidate's contributions can undervalue the people who are active in these areas.  Mediation, clerking, and checkuser all require careful attention so the people who do them spend a lot of time reading and evaluating.  This yields a high percentage of Wikipedia namespace edits and, often, a relatively low edit count.  So when checking out a candidate, look to see what they actually do.

An ideal arbitrator is someone who puts doing the right thing ahead of politics.  Good arbitrators make hard decisions.  When mud is being thrown they wash it off, even if they're pressured to apply adhesive.  Good arbitrators don't twist logic into knots to avoid offending someone who has political connections.  As a result, the best candidates for arbitrator usually have made a few people unhappy.

"Drama" is a word that gets tossed around too carelessly.  The important thing is to see whether a candidate who has been in a controversial area has been making it better or making it worse.  One useful approach is to survey a candidate's actions during several controversies where most of the circumstances are different but some of the same names appear.  If the candidate invokes opposite principles while consistently supporting the same people, that's a big red flag.

Another consideration is content experience.  Wikipedia is an encyclopedia and it's good to have arbitrators who understand that firsthand.  Yet it's possible to take the content emphasis too far.  Featured articles are the palaces of Wikipedia; arbitration occurs in its slums.  It certainly is worthwhile for arbitrators to have contributed featured content, but once a person has done it a couple of times, they get the point.  A person who has written twenty featured articles but not done much else could be a babe in the woods when they get to arbitration.  Or worse, they might try to expand the Committee's mandate into content where it doesn't belong.  Balance of power is a good thing.  Let's elect a Committee that keeps it that way.

Sunday, November 29, 2009

Parsing statistics

The BBC has published Wikipedia's rebuttal to statistics about a dropoff in editors.  If one uses different criteria and defines "editor" at a minimum of 5 edits a month instead of 1 edit, then the departure rate drops from 49,000 to 4,900 and the actual inflow/outflow of editors is at stasis.

Since those numbers differ by an order of magnitude, I'm curious to see a more in-depth approach.  What percentage of posts by 1-4 edit editors were reverted as vandalism?  And how does that compare against those who edit more frequently?

Possibilities to explore:
  • Good faith newcomers are getting driven off by aggressive reversion?
  • Breaching experiments are on the decline?

I have a hunch that reversion is somewhat more vigilant toward editors who haven't registered, or who have redlinked userspaces.  Also have a hunch that there is a large but limited pool of people who conduct breaching experiments without actually intending to contribute.  In the latter scenario, most of the people whose main intention is to test the edit function have already written "hi there", gotten reverted, and left.

It might be possible to measure those behaviors in relative terms.  One approach would involve tracking how many edits the average new account makes before the user talk and userpage get created, and by comparing the reversion rates of edits from accounts that are fully bluelinked, partially bluelinked (talk page but no user page), and fully redlinked.  Another approach would be to parse the rate of short-history editors whose posts include the words "hi", "hello", or "test".

Saturday, November 28, 2009

Open Progress

Expressing special thanks today to Gerard Meijssen and the Open Progress Foundation for outstanding work opening global access to digitized material from great cultural institutions in The Netherlands.  This week 35,000 images were uploaded to Wikimedia Commons, and due to the cooperative relations he has developed Wikimedian volunteers can obtain high resolution versions of selected highlights upon request, for restoration purposes.

Several months ago I expressed gratitude for these efforts by restoring an 1890s photochrom print of the Amsterdam Centraal railway station.  Today it's Wikipedia's picture of the day being highlighted on the site's main page.

Congratulations, Gerard.  This is for you.  Couldn't have happened to a nicer person.

Monday, November 23, 2009

Giving thanks

Most of the active Wikimedians are aware that the English language Wikipedia is largest in terms of total articles and the German Wikipedia is second, but it it comes as a surprise that the second largest featured program is not German but Turkish.

The English language Wikipedia currently has 2,111 featured pictures.  German has 747 featured pictures.  Yet the Turkish Wikipedia has 976 featured pictures.  That sets the Turkish language site in second place if one counts by Wikipedia editions.  To set this in perspective, the Turkish Wikipedia is nineteenth in overall size with 138,000 articles.  The German Wikipedia is on the verge of crossing the one million article milestone.

This means roughly 1% of the articles in the Turkish Wikipedia have featured pictures.  One featured picture can illustrate multiple articles.  That comes out as a far higher ratio than at any other Wikipedia of substantial size.

What's really interesting is how one medium sized Wikipedia developed a featured picture program that's 25% larger than the German program.  A core of perhaps half a dozen Turkish editors have been scouting other language projects' featured picture programs, translating the captions into Turkish, and adding the images to articles on their Wikipedia.  Featured picture content at the other projects is different enough from one site to another that the Turkish editors could amass three or four thousand featured pictures if they just keep doing what they're already doing.

Of course I hope they also knock on the doors of museums in their home country. Also very curious about whether this generates synergies with text edits and improvements at their Wikipedia.

Two things happen universally when people from other parts of the world see restored featured pictures about their own culture:
  1. They're delighted.
  2. They want to share information.
Now and then I do restorations about Turkish history and culture, in gratitude and to give their project an extra boost.  The most recent of these is the 1917 Ottoman heliograph crew at Huj pictured above.  Its featured candidacy is underway at the Turkish Wikipedia.  Last week the Turkish Wikipedia passed Wikimedia Commons as the project where I have the second most featured content credits.  Darned if I understand the discussion other than the succession of green light icons.

The Turkish editors have created a model that can be emulated.  And I'm very interested in trying a pilot project with another Wikipedia to see whether a caption translation and featured picture drive would provide a shot in the arm in terms of editor participation and article growth.

One place where I'm proposing a pilot program is the Irish language Wikipedia.  They already have a small featured picture program (two dozen images, a quarter of which I restored) and I know one of their administrators (hi there Alison) and have done a few restorations specific to her country and culture.  A few days ago President Kennedy came up in conversation and I asked whether she knew en:wiki has a featured picture of his brother.

There's Robert F. Kennedy at a CORE rally in 1963: the Attorney General of the United States speaking from the steps of the Justice Department in favor of racial equality.

Very cool.

Right now the Irish Wikipedia is the ninety-second largest Wikipedia with 9,274 total articles.  If their editor community is willing I'd like to help them emulate the Turkish featured picture program.

Although I can't speak a word of either language, if a picture is worth a thousand words we can hold a conversation.

Sunday, November 22, 2009

Letter perfect

Thumbnail previews and reduced size views don't always reveal how much work a restoration is going to require.  This World War I era poster is in very good condition.  At the web-optimized reduction for this blog post it hardly seems to need any restoration at all.  A closer look at the full size file, though, shows that this won't be a walk in the park.

It's a mostly good image with several tricky problems including a crease that runs vertically through the Statue of Liberty's hand and torch.  Today let's look at the ink smears.  It isn't unusual to encounter smeared lettering on historic posters.  Often the source of the problem is water damage.  In this instance it only affects the line that was printed in black ink.  Most of the caption is gray and doesn't have this problem, but the entire line of black lettering has ink smudges.

In case you're wondering, this poster translates to say, "Food will win the war - You came here seeking freedom, now you must help to preserve it - Wheat is needed for the allies - waste nothing."  It was printed in 1917.

Here's the most heavily damaged word at full resolution.  I actually perform the restoration at twice that resolution, but this is enough to convey what the work will be.  The basic idea is to trace the outline of each letter and substitute undamaged paper texture in place of the ink smears.  Two factors will make the difference between a mediocre repair and a good one:
  • Paper texture in historic images is not created equal.  Slight differences will occur in brightness, color balance, and roughness.  So the source area has to be chosen with an eye for those subtle distinctions or else the result will look patchy.
  • The letters have to look like they exist naturally within the cloned area.  This means the cloning has to mimic the aliasing that occurs in undamaged regions.

My first passes worked mostly with large areas and a tool setting of 12 to 15 pixels in diameter.  The source area for this cloning comes from an area that looks a bit rougher and more textured than most of the poster.  Our goal here is not to create something that's digitally perfect, but that fits seamlessly with the surrounding image.  The aim is to mimic good printing for 1917.

The narrowest parts between letters have to be done at a tool diameter of five or six pixels.  Unfortunately this is a situation where Photoshop has a big advantage over the current version of GIMP.  The Photoshop clone stamp tool has a sliding option that allows the user to select any percentage hardness.

Hardness affects how much a cloned area blends with surrounding data.  One hundred percent hardness looks like the cloned area was cut with scissors and pasted in.  Zero percent hardness is really soft and smudgy.  Smudgy is what we're trying to get away from, so we do want some hardness here.  But we don't want the text to seem like a ransom note or an old punk rock poster.  So what's needed is something in between.  A static setting is going to lose its subtlety as this work progresses from wide spaces to narrow gaps between letters.  I do most clone stamping at thirty-five percent hardness.  Getting down to half a dozen pixels, though, it helps to be able to drop that to twenty percent.

This is where GIMP users get caught between a rock and a hard place.  Hardness in GIMP is a simple on/off toggle.  If there's a plugin to make that more nuanced I'd love to know about it because the GIMP editors who work with me have real trouble with this sort of challenge.  They can get an acceptable result with the default program if they work hard enough, but it takes them several times as long as it takes me in Photoshop.  GIMP is open source, so if you happen to be a motivated programmer who likes to see this work spread free culture you could do something to help solve this problem.

I fixed the smudges on this row of text in about two hours.  If discussions with good GIMP editors are accurate, multiply that by a factor of three to five for them to get a result of comparable quality.

The full version of the completed restoration can be viewed here.  Below is a glimpse of it.

Saturday, November 21, 2009

Warm welcomes

More good news: another editor has gotten into image restoration and doing really good work.  The image above is a historic isothermal chart from 1823.  Jujutacular ran it as his first restoration about a week ago.  His first effort was impressive and it was a treat to see that he had gotten it from the New York Public Library website.  The pool of resources for source material is broadening.

The version Jujutacular ran as his first nomination is better than my early work.

That represents quite a lot of cleanup.  His effort really shows on the upper margin and far left.  I was on the fence about the nomination--didn't want to rain on his parade yet thought the restoration could go even farther.  Took a chance and offered to collaborate.  It turns out he's a really good sport, eager to learn, and a joy to work with.

He had a version saved without the histogram adjustment.  Smart fellow!  We traded off on additional dirt and smudge removal; both of us applied masks to correct the uneven brightness.  I added a perspective crop, patched in a margin at the lower right edge, and did the final tweaks with curves and color balance.  Sometimes it's magical when the final work feels like a time machine.  This was one of those occasions.

There's nothing quite like the moment of enjoying an editor's reaction for the first time when he realizes, "I did this."  So cheers to Jujutacular.  Looking forward to seeing his next project.

Per request, adding links to the full versions:

Friday, November 20, 2009

What is a stain?

The Tropenmuseum has provided a very special challenge.  This post is probably the first glimpse of it to become visible to the public.  Roughly speaking, it's something like the Bayeux Tapestry of Indonesia.  The museum had it professionally photographed in twenty-nine parts.  Then they discovered that none of the digital segments quite matched together: the lighting was slightly uneven from left to right and the thin tapestry fabric had shifted so that the fibers and images no longer matched neatly.  These problems affected every one of the twenty-nine segments; the museum staff thought the image couldn't be stitched.  We've had very enthusiastic responses from the museum staff now that I've pieced it into a single file.  It's a huge job: 992.4 MB.  Now it gets interesting.

There's a lot more to be said about the digital restoration on an image that's nearly a gigabyte than one blog post can encapsulate.  One part that's easy to recognize is the large brown stain that runs vertically along this segment.  Today's post takes a different approach to repair than the last post because this time the original design remains visible within the damaged area.

In terms of digital image data, this stain consists of three elements:
  • Brightness
  • Color
  • Contrast
If one thinks of a stain as too dark and deficient in blue and lacking contrast, then the way to eliminate the stain is to brighten, add blue, and restore contrast.  The concept is simple.  It's mainly a matter of creating enough masks to make the corrections in small increments.  Stains tend to be uneven so different portions require individual adjustments.  Here's an interim save as it looks on my monitor right now.

The proportions on this are reduced substantially from the original file, which was 13MB on this cropped area.  Yet it can be informative to see the work before the stain removal is complete.  No cloning has been done at all in this stain correction.

Wednesday, November 18, 2009

President of Suriname visits WMF partnered museum exhibit

Good news from The Netherlands.  President Ronald Venetiaan of Suriname has visited the Tropenmuseum exhibit about the cultural history of Suriname.  First Lady Lisbeth Venetiaan saw the exhibit last Saturday and was so impressed that she returned with her husband the next day.  The Suriname exhibit was developed in partnership with WMF Netherlands and the Open Progress Foundation.

Sunday, November 15, 2009

Difficult repairs

The image above is an interim save on one of my current projects: an early nineteenth century Japanese woodblock print of the ram from the Chinese zodiac.  The artist is Gogaku Yajima, who doesn't have a Wikipedia biography yet. It's an attractive print, but as you can see from the lower right corner this isn't in pristine condition.  Have already spent about seven or eight hours to bring the restoration this far.  What follows is a close-up of the upper border before starting work on the hardest part of this project.  Notice the odd mark that branches downward from the upper edge.

At a glance it looks like really sloppy click-and-drag clone stamping, but close up the problem isn't consistent with post-digital alteration.  My best guess is that the rice paper print developed a tear and that the mark represents an attempt at physical repair.  Someone might have added a reinforcement to the reverse side of the paper and used an adhesive.  Then, since the repair could have occurred generations ago, over time the adhesive had a chemical reaction with the paper which resulted in that branching stain.  It would be interesting to contact the library staff and see whether this guess is accurate.  But for today the challenge is how to make it disappear.

For starters, here's a closer look.  The border is a repeating pattern of cherry blossoms.  This takes careful study because reconstruction of the design involves inferring the shapes of three flowers and a bud.

Repairs to complex areas such as this are much more difficult than repairs to solid colors.  A photograph print that gets torn at a cloudless sky could be fixed in a minute.  Damage to near-random features such as a sandy beach or a grassy field are also fairly simple.  This is a different matter.

When I look at this type of image I estimate the difficulty in terms of five elements:
  • How many color borders or line demarcations does the damage cross?
  • Does enough information remain to infer the shapes of the missing areas?
  • Is the damaged pattern repetitive or unique?
  • Is there enough similar data elsewhere in the image to patch a repair?
  • How much importance will the viewer attach to the damaged region?
This bit of damage interacts with the woodcut design in complex ways.  If I want the repair to look seamless, and I do, it's going to take a few hours to get this right.  Here are a few close-ups from screen shots as the work progressed.  You'll see how, progressively, I fixed areas and inferred colors and shapes.

In the far right frame I actually altered one petal, which is something I don't like to do.  That particular area had sustained so much damage that I had difficulty understanding what the shape was intended to be.  If I'm a stickler I might go back and recreate that petal again, because after a day I had better ideas.  These are the kinds of decisions that make me bite my lip.  If the feature were a face instead of a flower I wouldn't have attempted to alter it.

After a bit more cleanup around the edges, here's how that area looks now.

Monday, November 09, 2009

We are all Berliners

Not that it was likely to kill me, but I happen to be one of the last people who crossed the Berlin Wall illegally.

Twenty years ago it was delightful to follow the news about Czechoslovakia opening its borders, and East Germans crossing that way and seeking asylum.  Then when it seemed that political pressure was closing the opportunity, one magical day the people from both sides of Germany stormed the Wall and the guards laid down their rifles.

But the Berlin Wall didn't absolutely disappear overnight.

That fall I was a taking a course on the history of German unification in the nineteenth century.  Took a seminar in Germany since 1945 the following spring.  An opportunity like this doesn't happen twice so I also enrolled in a conversation course to brush up my German and spent a month in the country after graduation.  Reached Berlin in June three days before the authorities dismantled Checkpoint Charlie.

By that time Germany was still two separate countries on paper, but they had already worked out most of the details for reunification.  Germans from either side of the internal border could legally cross anywhere, and European Union members had additional crossing points.  Not everyone was so lucky.

I was visiting the Brandenburg Gate, pictured above, and there was the wall in the way.  Most of it was still standing.  On the other side was Unter den Linden--the famous avenue with the city's best museums.  One of the new checkpoints was right there.  "Reisepass, bitte."  The official waved me away after one glance at my United States passport.

The city was changing so quickly that year that travel guides were obsolete as soon as they were published.  The only thing do to was follow the news and use one's wits.  Berlin was so filled with tourists that I nearly resorted to sleeping on the floor of a convent.  Fortunately my language skills were good enough to use the local Mitwohnzentrale.  Negotiated a short sublet on a comfortable apartment.

So there I was at the Brandenburg Gate, unable to get to the museums.  There was one other thing to see on the western side: a line of crosses.  The citizens of West Berlin had erected informal memorials to each person who had died trying to get across.  Most of the memorial crosses had names and birth dates.  A few only listed the date and time of death.  They were all in chronological order; the very last was dated February 1989.  "If only that person had waited a few more months," I thought.

Right then I decided I was going to break that law while it was still possible.

The question was how to do it.  The subways had resumed operation between the two halves of the city.  So the first plan was to blend into the crowd.  Wearing Nike running shoes, no one would mistake me for an easterner.  But a good accent had gotten me through the Inner German Border on the way to Berlin without absolutely having to undergo a passport check.  "Sind Sie Deutsch oder Ausländerin?"  Tough choice, but an East German border crossing stamp would make a good enough souvenir.  Had told the truth, but the border guard didn't bother to stamp the passport.  So a day later, standing at the Brandenburg Gate, it seemed possible that maybe the Hamburg accent I had learned from my grandmother would bring another opportunity to pass for a German.  In order to look more local I carried a newspaper under one arm.

It was easy to tell when the train got to the Eastern side: the track suddenly got about three times as noisy.  Disembarked to the platform, but then--an amazingly strange sight--every single person pulled out a passport to obtain permission to leave the station.


So this wouldn't be easy.  After several hours of playing musical subways and other subterfuges I gave up and went to Checkpoint Charlie.  The outer guard was smiling broadly and posing for tourists.  The guidebook said to expect about a ten hour wait, but the spot was nearly empty.  Walked up to the counter and paid five marks to The Man for a day's visa.  The System had won.

By then it was nearly sunset so Unter den Linden was out of the question.  The museums had already closed.  Wandered a few blocks past one of the first commercial billboards to appear in a Communist country, and walked over to a patch of Wall.

Back during the Cold War, when they were serious about it, I wouldn't have been able to approach within several meters of the Wall from the eastern side.  Not if I'd expected to survive.  But by June 1990 sharpshooters had quit their jobs and it was possible to walk right up.  If I couldn't cross that wall illegally I could at least help to destroy it.  That hour did more damage to my Swiss Army knife than to the wall, but it broke loose several handfuls of pebbles that made superb presents for friends back home.

Had to quit before twilight ended.

Normally I have a good sense of direction, but this was a strange city and nearly nightfall.  So although I thought I was retracing my steps to Checkpoint Charlie somehow I took a wrong turn.  Wound up staring down a dead end and wondering how I had gotten there.

Technically the Berlin Wall was two walls--an outer segment and an inner segment.  They used to rake several meters of sand in between every day in order to make it easier to track footprints and shoot people.  Above and to the left was a watch tower, but the paint was peeling and it hadn't been manned in months.  In a few places the walls had been broken with gaps in between.  One of the gaps was there.  The sand hadn't been raked in months and wildflowers were growing in it.  Wild rabbits were nibbling on the flowers.

A woman came in from the West Berlin side and walked her dog through that stretch.  Then a man on a bicycle came up from behind me and walked his bicycle across.  They were Germans.  It was legal for them to cross anywhere.


Looked left, looked right, and thought "What are they going to do, shoot me?"

So I escaped from East Berlin.
If you want to honor the memory of the people represented by that line of crosses you can restore the image at the start of this post, the photographer Toni Frissell has donated it to the public domain.  The uncompressed TIFF version is available for download here.

Sunday, November 08, 2009

Bringing down the house

Let's face it: really old disasters are fascinating.  Pictured above is the aftermath from the the Galveston Hurricane of 1900.  If any of those children are still alive the youngest would be about 117 years old now.  Galveston has long since been cleaned up and rebuilt.  We can call this sort of photograph educational because it probably is--sure makes me want to live somewhere else than Galveston...as a wiki witch I avoid places where houses fall.  But heck, this photo also serves the human desire for guilt-free rubbernecking.

Ready for more?  Another house, smaller disaster.  Published in April 1919.  (Yes there's a point to this; continue reading after the requisite gawk).

The Library of Congress had an unconfirmed record which called this a French biplane.  Two Military History Project members have identified this as a Curtiss JN-4 "Jenny", which was the best known United States biplane of World War I.  So thank you, Monstrelet and Eurocopter!  The Curtiss JN-4 "Jenny"...it'll be easier to remember that name now.

Friday, November 06, 2009

Palenque revisited

The bas relief at Palenque has deteriorated a lot since 1787 when Ricardo Almendáriz sketched it.  Thanks go to Infrogmation for spotting this 2008 photograph of the same panel.

And here's another look at the digitally restored version of the 1787 drawing.

Thursday, November 05, 2009


Awadewit is among the Wikipedians I most admire: a prolific contributor of high quality articles on scholarly topics, and a joy to work with.  She's completing her dissertation in eighteenth century children's literature this year, so as a gesture of thanks for her hard work I've done a little restoration for her today.  She surprised me last month by saying she's actually used my restorations as examples in the introductory undergraduate classes she teaches. Well here's something closer to her real world scholarship: a William Blake illustration for Mary Wollstonecraft's Original Stories from Real Life.

"Wow - they look so different from the Blake versions - so much softer" was her first reaction.  After a moment of poking through the bibliographic notes I confirmed a suspicion: this is indeed the Blake version, scanned from his original sketch for the frontispiece.

Here's wishing the digital file were higher resolution.  The Library of Congress has been digitizing its collection for fifteen years; some of the older digitization isn't quite at the technical excellence of their recent work.  Equipment and formats have changed, and their staff has gotten better at it.  So this might be a viable featured picture candidate at English Wikipedia but the higher Wikimedia Commons technical requirements would exclude it from serious candidacy.

Nonetheless, a medium resolution file is usually less work to restore--the smaller damage just doesn't show up at this resolution.  So I did a quick restoration for Awadewit to cheer her on through the final months of the dissertation.  First, let's have a peek at the version of this image which appeared in the printed edition.

This is basically a mirror image of the sketch.  Maybe the Library of Congress has been spoiling me: the file that was in use at the Wikipedia article was less than 50 kilobytes.  It's stained, faded, yellowed, and suffers from distortion, plus the crop is so tight that it would be difficult to correct the problems if the filesize were large enough to work with.

Really, it's best to restore files that are at least 10 megabytes in uncompressed format.  I don't call an image large unless it's more than 100 megabytes.  On a fairly frequent basis other Wikipedians ask me to restore material that is only a few dozen kilobytes.  I can't produce a featured picture from that; the magic has its limits.

Getting back to this project, though, one issue worth mentioning is how to deal with staining.  Stains can be a problem when they occur over important parts of an image.  In this instance a large brown stain occurs on the central figure's knee.  I've blown this up to about double the original resolution.

This stain consists of two parts: a small deep brown spot surrounded by a much larger faint discoloration.  First I got rid of the small spot.  The easiest way to do that is with a clone stamp at 35% hardness, but with a careful and steady hand it's possible to get a more natural effect with the healing brush.  The healing tool algorithm usually works poorly in the middle of narrow stripes, but if the sample point is the same distance from a line as the destination point the tool can give a pleasant blended effect.  It's quite tricky to do this and often takes several tries because if it isn't done just right the tool will create an ugly smear.

Unnatural healing brush smears are a hallmark of poor image editing; that's something to really avoid.  If you feel like trying this trick the way to get the feel for it is by backing up through the history when a smear occurs (and you will make smears--a lot of them--so don't feel bad).  Don't try to re-heal a smear; it'll only smear worse.  Just choose a new source point, try to line it up just so, and eventually the spot will vanish perfectly.

Of course there's still the larger stain.  Low intensity stains are basically localized color problems.  So I treat this like any other local color correction: choose the selection lasso, set feathering to 10 pixels (which is not very much, but appropriate for a small image), and create an adjustment layer to manually adjust the colors.  Think of "brown stain" as "deficient in blue" and nudge the RGB sliders until the colors appear consistent.  Don't try to be hasty and copy the same tweaks to the light, medium, and dark ranges: often the best results come from slightly different settings.

With additional work the final version comes out looking like this.
Three cheers for Awadewit and her Dissertation!   (Now Awadewit, go finish it). ;)

Wednesday, November 04, 2009

Spinal curvature

One problem with book scans occurs when the printing goes close to the spine and the page fails to lie flat on the scanner bed.  The subject here is a detail from the Mayan ruins at Palenque and the illustration carries particular historic importance: it was drawn by Ricardo Almendáriz in 1787 during the initial excavation of Palenque and his illustrations formed part of the first significant archaeological report in the Americas.

The lower left corner on this image makes it a bit more challenging than the other perspective crops of recent posts because the others could all be corrected with a single perspective crop.  This requires multiple perspective fixes.  After the first set of changes the lower left corner still curls upward and inward.  The effect is most apparent at the horizontal border line.  That distortion affects the entire far left column of the image.

We're lucky in one way: other than border, only the lower half of this drawing contains information at far left.  So the solution is to select the distorted segment from the seated figure at left and create a new image file solely for that partial figure, then perform a second perspective crop on that segment only. After that, copy and paste the segment to the original image as a new layer and align it so the correction becomes invisible.  It's easier said than done.

Here's how it appears after the correction.  The change is subtle but it alters the proportions of the figure's hip and spine.  Alignment and blending require judicious erasure, partial redrawing of border lines, and minor edits at high resolution.

Other than that the restoration was routine.  The drawing is in better shape than most comparable material of the same age, but it still took several patient hours of dirt and stain removal to complete the work.

One of the interesting things about the Almendáriz drawings is that he recorded features which have since been destroyed by exposure to the elements.  Comparison against the remaining undamaged bas reliefs shows that his work was unusually accurate for its era.  So this remains useful to modern scholars.