Text removal...

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
dognose
Posts: 265
Joined: 2005-03-08T22:16:37-07:00

Text removal...

Post by dognose »

I'm looking for a way to automatically remove text from an image.

I've seen a javascript project that can do it ( http://projectnaptha.com/ )

It uses OCR and then an inpaint method.

I'm curious is there is another way, specifically, server side.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Text removal...

Post by fmw42 »

inpainting has been requested as a future enhancement to IM. User snibgo has developed a method for doing it with IM Magick Filter. See his hole filling section at his web site at http://im.snibgo.com/ and also viewtopic.php?f=1&t=28640#p127233.

Also see the use of morphology for small text at viewtopic.php?p=41498#p41498
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Text removal...

Post by snibgo »

Yes, once text is deleted (by which I mean "the pixels are made transparent"), it can be inpainted. I show a number of techniques.

But first, the pixels forming the text must be identified. The Naptha page says, "The primary feature of Project Naptha is actually the text detection, rather than optical character recognition", and cites a Microsoft paper. When the object is to remove text, this is the important step. It has occurred to me that implementing the described detection method might be easy to implement in IM.
snibgo's IM pages: im.snibgo.com
Post Reply