Quantcast

removing the background from a scanned text

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

removing the background from a scanned text

Lists-122
Hello all,
My knowledge of Gimp and image editing borderlines /dev/null so bare with me
please!

Is there a way to make the background transparent so that only the hand
written text remain after I have scanned a document... or do I need a tablet?

The document is scanned via xsane so I can have it in multiple formats, TIFF,
JPEG, ...

Any help would be apreciated, thanks :)
 -Ed
_______________________________________________
Gimp-user mailing list
[hidden email]
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: removing the background from a scanned text

Claus Cyrny
Hi Ed,

Ed wrote:

> Hello all,
> My knowledge of Gimp and image editing borderlines /dev/null so bare with me
> please!
>
> Is there a way to make the background transparent so that only the hand
> written text remain after I have scanned a document... or do I need a tablet?
>
> The document is scanned via xsane so I can have it in multiple formats, TIFF,
> JPEG, ...
>
> Any help would be apreciated, thanks :)
>  
you could achieve this by selecting the entire scan, copying it into the
clip-
board, and then using this copy as a layer mask. I am presuming that the
text as such is grayscale; otherwise you could first duplicate the layer
(the scan is most likely on the background layer) & then convert it to
a grayscale via 'Layer > Colors > Desaturate'.

The following steps would be (there are actually several ways to achieve
this, but I'm trying to make it as simple as possible):

1. 'Duplicate layer' (the layer with the scan; the text should be in
grayscale
by now; otherwise see above).

2.  Invert  the  colors of the duplicated layer via 'Layer >  Colors >
Invert'.
(This is, btw, an easy way to invert colors in general.)

3. Copy the inverted channel into the clipboard via 'CTRL + A', 'CTRL + C'.

4. Go to the layer with the scan, and apply 'Layer > Mask > Add Layer
Mask...'.

5. Copy the contents of the clipboard into the mask by simply applying
'CTRL + V',
'CTRL + H'.

6. The last step would be 'Layer > Colors Apply Layer Mask...'. This
will remove the
background from the scan, leaving only the text. In case that the
remaining text
is somewhat 'edgy', applying 'Filters > Blur > Blur' after step 1. can
probably help.

HTH,

Claus

--
Home Page: http://home.arcor.de/ccyrny/ (Photographs)
Blog: http://grafomatic.twoday.net (in German)
"Djangology" http://home.arcor.de/ccyrny/djangology/ (my Django Reinhardt site; in German)


_______________________________________________
Gimp-user mailing list
[hidden email]
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: removing the background from a scanned text

Claus Cyrny
In reply to this post by Lists-122
P.S.:

To keep the transparency, you should finally
save the text either as TIFF, PNG, or XCF.
JPEG doesn't support transparency.

Claus

_______________________________________________
Gimp-user mailing list
[hidden email]
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: removing the background from a scanned text

Lists-122
In reply to this post by Claus Cyrny
On Thursday 08 March 2007 12:39, Claus Cyrny wrote:
> 6. The last step would be 'Layer > Colors Apply Layer Mask...'. This
> will remove the
> background from the scan, leaving only the text

Hello Claus,
Many thanks for your help... I got as far as point '6' but I can't seem to
find any variant of 'Layer > Colors Apply Layer Mask...'

The layers I have now are:
 Floating selection (pasted layer) - hi lighted!
 Background copy
 Background

I can see the image is shown without a background but I just can't finalize
the process... your thoughts?

Thanks,
 -Ed
_______________________________________________
Gimp-user mailing list
[hidden email]
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: removing the background from a scanned text

Chris Mohler
On 3/8/07, Ed <[hidden email]> wrote:
> On Thursday 08 March 2007 12:39, Claus Cyrny wrote:
> > 6. The last step would be 'Layer > Colors Apply Layer Mask...'. This
> > will remove the
> > background from the scan, leaving only the text
>
> Hello Claus,
> Many thanks for your help... I got as far as point '6' but I can't seem to
> find any variant of 'Layer > Colors Apply Layer Mask...'

"Layers Menu" > Apply Layer Mask ( I think).  Check for a little
triangle on the layers dialog - that will give you access to the
Layers menu.

I would tackle your image this way (As Claus pointed out, there's
usually more than one way):

1. Layers Menu -> Add Alpha Channel
2. Select -> By Color -> click on the background
3. CTRL-K or Edit -> Clear

Check the tool options for select by color (step #2) - they have sane
defaults, but you might have to adjust the threshold or feather.

HTH,
Chris
_______________________________________________
Gimp-user mailing list
[hidden email]
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Loading...