Newbie question: removing artifacts from mobile phone picture

4 views
Skip to first unread message

Jon

unread,
Jun 27, 2009, 1:46:35 PM6/27/09
to ocropus
Hello,

I'm rather new to Ocropus. I've managed to compile and install using
Ubuntu 8.04.
I'm now starting to look into ocroscript to find out how I can use it.

I've done a lot of work with tesseract and I'm able to use tesseract
to great extent.

However, I'm looking to do some document analysis now, and I know
Ocropus is the way.

I'm doing some manipulation on a document photographed with a mobile
phone, and I'm trying to get rid of everything irrelevant (fingers,
background, etc.)

Unfortunately, documentation of document analysis is scarce in
Ocropus, so I thought to ask if anyone has a pointer of implementing a
fairly simple way to crop out everything unnecessary out of a mobile
phone picture.

This is a fairly simple task that I haven't found anything useful in
the wiki for. I'd love to take my case and write a good tutorial on it
(the wiki/code project/etc.)

Cheers,

Jon

svaram

unread,
Jun 28, 2009, 4:33:38 AM6/28/09
to ocropus
well , as I understand it :

the purpose of OCR is to recognize characters only .
And we cannot expect an OCR engine to do image editing .

Any image editing has to be done using an editor and
modified image has to be fed to OCR for recognition .

However one may make it as a plug-in to a image editor
so that both image editing and character recognition
could be done using a single program

for eg. recent version of irfanview (www.irfanview.com)
has a simple OCR plug-in basically for English . And few
other language packs can be downloaded . However I find
that this KADMOS method is not perfect as the Tesseract
( http://rerecognition-download.ch/irfan/kadmos44/KADMOS.htm )

______
Thanks

Jon

unread,
Jun 28, 2009, 5:48:00 AM6/28/09
to ocropus
I don't believe this is accurate.
Document analysis is a major part of Ocropus, and I've read about
different segmentation algorithms available.

I think and hope you are mistaken.

Jon

tmbdev

unread,
Jun 28, 2009, 3:00:04 PM6/28/09
to ocropus
Processing phone images and getting rid of irrelvant portions of an
image reliably is anything but simple. If it were, you'd see people
using handheld cameras for document capture much more widely. The
idea isn't new (I was capturing documents with cameras as far back as
the 1980's); what's hard is the technology needed to make it work
efficiently and under many situations.

While OCRopus contains a lot of segmentation and image processing
code, it does not try to address camera-capture of documents
directly. We're working on that as part of the Decapod project
(decapod-project.org). Decapod will work with OCRopus.

You can also see some demos of work we have done on camera-based
document capture here:

http://www.iupr.com/on-line-demonstrators-1

Tom

Jon

unread,
Jun 28, 2009, 6:50:47 PM6/28/09
to ocropus
Hey Tom,

Thanks for the answer.

I've looked at the links and will do some more research in these
directions.

However I still have some hope of working with Ocropus because, and I
failed to mention this in my original post, the photos of text using
my mobile phone are very close in quality to a scanned photo (angles,
black-and-white text, lighting).
As a matter of fact, if I'm very careful with the zoom and positioning
of my phone, I don't even need document analysis to be done, because
the output is so clean that tesseract just eats it up.

So, I won't bother you with this anymore, I'm just still looking for a
good introduction to using ocropus and it's scripting language. I
tried "/usr/local/bin/ocropus -h" and found a lot of commands (even
got to "segrast") but can't seem to get into scripting mode...
The documentation I found is pretty advanced, I'm still missing the
first piece of getting it to work after the successful installation :)

Once I find out, I'll be happy to write a "for dummies" article if I
can have access to the wiki or something...

Thanks again,

Jon

P.S. The "how to install" article in the wiki doesn't instruct to
install scons under ubuntu, thought to let you know (I couldn't find
how to edit it myself)

Thomas Breuel

unread,
Jun 28, 2009, 7:22:10 PM6/28/09
to ocr...@googlegroups.com
> However I still have some hope of working with Ocropus because, and I
> failed to mention this in my original post, the photos of text using
> my mobile phone are very close in quality to a scanned photo (angles,
> black-and-white text, lighting).

Even well-photographed document generally have some distortions that
don't occur in scanned documents, so it may or may not work.

> So, I won't bother you with this anymore, I'm just still looking for a
> good introduction to using ocropus and it's scripting language.

There are two scripting languages right now: ocroscript and ocroswig,
both available here:

http://mercurial.iupr.org/

You don't need scripting to do recognition, though. It may help with
image pre-processing.

> Once I find out, I'll be happy to write a "for dummies" article if I
> can have access to the wiki or something...

Thanks; just create a page on the Google Groups pages.

Tom

Reply all
Reply to author
Forward
0 new messages