Difference between revisions of "Improving picture quality"

From Gramps
Jump to: navigation, search
(second cleaning method)
(What does it say?)
Line 71: Line 71:
which translates to:
which translates to:
''I baptized on June the second Petrus Leynse legitimate son of Guillielmus Leynse and Elisabetha Op de Beke. Witnesses were petrus Artse and Catharina Van de Voorde.''
''I baptized on June the second Petrus Leynse legitimate son of Guillielmus Leynse and Elisabetha Op de Beke. Godparents were petrus Artse and Catharina Van de Voorde.''
== Tutorials on the internet ==
== Tutorials on the internet ==

Revision as of 03:05, 5 April 2007

While researching your family tree, you will come along old sources that need carefull handling. Pictures from these taking 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, off 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.


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

Cleaning 1: obtaining a nicer picture with GIMP

Step 1

To edit it, The Gimp 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

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 Leynse
line 3 filius legitimus Guillielmus
line 4 Leynse et Elisabetha op de
line 5 Beke. Susceptores fuerent
line 6 petrus Artse et Catharina
line 7 van de Voorde

which translates to:

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

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.