Improving picture quality

From Gramps
Jump to: navigation, search

While researching your family tree, you will come along old sources that need careful handling. Pictures from these taken in an archive are often not optimal, and need cleaning up to make the text readable. Some pictures are snapshots of microfilm screenreaders.

Here we show how you can work on your picture to make the text come out better, improving readability. All with open source software, of course!

The sample picture 1

Unclean picture example1.jpeg

The sample picture is a raw jpeg picture of 1.5Mb taken from a microfilm screenreader. The screenreader light is centered in the middle, getting darker at the edges as is common with these readers. The relevant section wanted has been placed in the centre of the screen, and a picture has been taken with a digital camera.

Viewing

A good application to view these files is Gwenview (KDE) or GQviewer (Gnome).

Cleaning 1: Obtaining a nicer picture with GIMP

Step 1

To edit it, The Gimp (GNU Image Manipulation Program) comes to the rescue.

  1. Open the file.
  2. Select the relevant portion with the rectangular select tool. Copy and paste into a new canvas: type respectively, CTRL+C, CTRL+N + click OK, CTRL+V.
  3. Save the file in the GIMP xcf format.

Step 2

In Gimp, the Filters menu has the correctly named 'Enhance' submenu.

  1. Choose 2x2 Contrast Enhance.
  2. Select the Destripe option, and set the value to 50.
  3. Now, in the Tools menu, go to the Colour Tools submenu, and choose Curves. You can now play with the curve level to get a better contrast on the picture.
    Adjust colour curve example1.png
    We see here that the picture lacks in white and in black, but has a second peak of darkgrey pixels. We enhance the white to make the contrast larger, and we downgrade the importance of the darkgrey peak. We also cut out completely the black.
  4. As a last edit, select the centre highlighted region of the picture with the elliptic selection tool, and select in Tools menu--> Colour Tools the Brightness-contrast option, and reduce the brightness.

Now, save the result as png with maximum compression level. The result:

Unclean picture example1 step2.png

Cleaning 2: Aiming for readability: Black and white with Digikam and Gimp

Step 1: Crop and auto-correction

Step 1

Open the jpeg file with Digikam. Via the crop tool you cut out the relevant section of the picture. Next you go in the Fix->Colors menu, and select Auto-correction.

Choose as type: Equalise.


Step 2: Brightness contrast improvement with GIMP

Step 2

Digikam only allows brightness correction on the entire picture, so right-click on the picture of step 1, and open it with GIMP. In Gimp, we will make a rectangular selection of the different regions: left, center, right and bottom, and we adjust brightness/contrast separately via Tools menu--> Colour Tools then Brightness-contrast.


Note the vertical lines we introduced by this between the regions with changed brightness.

Step 3: Border detection

Now, with GIMP we invoke select Filters, suboption Borders, and choose as method Difference of Gaussians. As radius 1 we choose 100, and as radius 2 we choose 0. The checkboxes with Normalize and Inverse are checked. This will make the letters stand out more.

The result:

Unclean picture example1 digikam3 gimp.jpg

Some information about the source

The picture was taken with a digital camera from a microfilm on a screenreader. The microfilm had ref. #0293844 and contains the Parochial Register of a village called Onze-Liev-Vrouw-Waver, which is situated near the town of Mechelen, Prov. of Antwerp, Belgium.The register covers the birth acts from the periode 1657 - 1683.

line 1 Manuele Baptizatorum ab anno 1657
line 2 usquad annum 1683

This particular act was dated the 2nd of July 1657 (folio #46)

What does it say?

The reason of editing the picture is to have a nice picture going with the source. However, in some cases, cleaning up is paramount to be able to read the source. Here this is not really the case, but reading might nevertheless be enhanced by the sharper contrast.

Once you decipher how this priest writes B and P and s, reading becomes possible. The text of this source says:

line 1 fac secunda Junij Baptiza-
line 2 tus est petrus Leyns
line 3 filius legitimus Guillielmus
line 4 Leyns et Elisabetha op de
line 5 Beke. Susceptores fuerent
line 6 petrus Arts et Catharina
line 7 van de Voorde

which translates to:

I baptized on June the second Petrus Leyns legitimate son of Guillielmus Leyns and Elisabetha Op de Beke. Godparents were petrus Arts and Catharina Van de Voorde.

Some comments on the name

Starting from the early 1600 the name changed with the different interpretations of the priests. The name was recorded orally. Lens, Lensen, Lenssen(s), Lenz(e), Lentz, Lensch, Linsing(h), Lince(ns), Len(t)zen and Leyns(e) all refer to the same name. Earliest recording dates back to 1326. It is a patronymic name: origin : Laurentius.

Tutorials on the internet

If you have found a nice tutorial on the net, add it here.

The following are for cleaning with the aim of getting a better result, not to make it more readable.

Other:

  • Script Tutorials offers guidance in the deciphering of manuscripts and other old documents that were printed in old typefaces or written in old handwriting styles.