Install GIMP - GNU Image Manipulation Program on Linux and Test it to Clean Handwritten Electronic Signature

Post Reply
User avatar
Eli
Senior Expert Member
Reactions: 185
Posts: 5454
Joined: 9 years ago
Location: Tanzania
Has thanked: 75 times
Been thanked: 88 times
Contact:

#1

GIMP is a cross-platform image editor available for GNU/Linux, macOS, Windows and other operating systems. It is an open source software -- this means you can change its source code and distribute without any restriction, see more >>>.

GIMP is very powerful and provides you with sophisticated tools to get your job done. It is frequently used by graphic designers, photographers, illustrators, or scientists for various graphic/image manipulation tasks.

Under this topic, we will learn how to install/upgrade GNU Image Manipulation Program version 2.8.22 in Ubuntu Linux versions 18.04, 16.04, 15.10, 14.04 and their derivatives, such as Linux Mint 17.x/13, Elementary OS Freya. We will also learn how to apply GIMP image editor to make scanned/imaged handwritten signatures/documents transparent.

GIMP Installation

1. Add GIMP PPA

Open Terminal from Unity Dash, App launcher, or by using shortcut keys Ctrl+Alt+T. Paste in the Terminal the command below and hit Enter:

  1. sudo add-apt-repository ppa:otto-kesselgulasch/gimp


Put your password and hit Enter again.

2. Install/Upgrade GIMP

After adding PPA, launch the Software Updater/Software Center (or Software Manager in Mint), choose "GIMP Image Editor" from the update list and then click “Install Now” to install/upgrade it.

The best option is to use command line, first update the repository list and then install GIMP:

  1. sudo apt-get update
  2. sudo apt-get install gimp


3. Uninstall

If you no longer need GIMP and would like to uninstall it, execute the commands below (you can as well use Software Center to remove it) -- purge GIMP PPA, and next downgrade the software:

  1. sudo apt-get install ppa-purge
  2. sudo ppa-purge ppa:otto-kesselgulasch/gimp


Cleaning Scanned/Imaged Electronic Signatures/Documents and Making Them Transparent

Electronic signatures are very useful, they are handy for signing any electronic document without printing them, signing them by hand and scanning them, especially, when you want to email them away. The ability to sign with electronic signatures serves a lot of resources, such as papers, scanning costs and time spent to process documents. Creating signatures with a transparent background to be used in a document is even a very professional approach, because signatures look clean. The further advantage of the transparent signature is that you can place them between or on top of text lines and the text will still show through.

Although we will use a scanned signature as an example, this technique can easily be applied to any graphics file that requires a transparent background. Consider any handwritten signature on a piece of paper, scanned or captured by phone camera (or any other camera) to turn and save it as an image. In most cases, this sort of signature will look dull or have weird background, see an example:

Image

Now let's find out how we can clean signatures and make them transparent, let's name our signature image above "Signature.png":

1. Open Terminal, move to the directory with a signature image, and type

  1. $gimp Signature.png


In this way, you will open Signature.png image with GIMP.

2. In GIMP, go to Image => Crop to Selection, and the click on an image to crop it.

3. Make transparency: Go to Layer => Transparency =>Add Alpha Channel, then click an image.

4. Hold Ctrl key and roll the mouse wheel to zoom (enlarge) the Signature.png image to the size you require.

5. Select the "Fuzzy Select Tool", click on each region of the Signature.png image that you want to remove the background and hit "Delete" key (hit Delete key each time you select a region). When you use a certain Select Tool, you can only work with it throughout the process of marking and discarding the image background.

6. Select the "Paintbrush Tool", choose "Overlay" from a drop-down menu (below Tool Options), then select the appropriate color (in our case blue), and start the overlay process. The overlay marks/bolds everything except the background.

7. When you finish the overlay process, hold the Ctrl key again, roll the mouse wheel to shrink the Signature image to the normal original size.

8. Go to File menu and save the image with .xcf extension. To save an image in your desired format, from the File menu, choose "Export As" and save the image with an extension of your choice. In our case, we have saved an image in png format. Note that, you should avoid saving your image in formats such as .jpg which cannot handle transparency.

Steps above are enough to clean the image background and make it transparent. However, you can further use an Eraser Tool and or Pencil Tool to smooth, sharpen or trim edges of your image for more profound output.

As an example with our input image Signature.png, following steps 1 - 8 above will result into the new transparent image below:
Donkey_Kong.png
Donkey_Kong.png (47.55 KiB) Viewed 985 times
Donkey_Kong.png
Donkey_Kong.png (47.55 KiB) Viewed 985 times

You can then use the transparent signature to sign in any document, including pdf documents using Xournal.


You can watch the YouTube video below to enhance your understanding.



See also A design and implementation of a super lightweight algorithm for "overlapped handwritten signature extraction from scanned documents" using OpenCV and scikit-image on python
0
TSSFL -- A Creative Journey Towards Infinite Possibilities!
Post Reply
  • Similar Topics
    Replies
    Views
    Last post

Return to “Linux and Unix Based Operating Systems”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 0 guests