From kde-devel Tue Mar 06 17:02:17 2012 From: todd rme Date: Tue, 06 Mar 2012 17:02:17 +0000 To: kde-devel Subject: Re: GSoC idea: improving scanning and OCR in KDE (skanlite/kooka) Message-Id: X-MARC-Message: https://marc.info/?l=kde-devel&m=133105341631598 2012/3/6 Jos=E9 Manuel Santamar=EDa Lema : > Hi, > > I'm considering to apply to GSoC this year, and if I do, I would like to > improve the status of scanning and optical character recognition in KDE; = being > more specific: > > > What I want to achieve > -------------------------------- > > A few years ago I had to study electronics stuff at my university followi= ng > class notes only available in paper. I was annoyed because I couldn't use > ctrl+F with a paper, so I investigated a bit about OCR stuff and I found = the > open djvu file format[1]. > > So I tried to produce a djvu document with KDE and my free operating syst= em; > it was (very difficult|impossible); if recall correctly I did something l= ike > this: I tried to figure out a workflow scanning a couple of pages as 2 jp= eg > files, then I tried to join them in a djvu multipage document using shell > commands, and suceeded. However I couldn't find out how to do the OCR par= t, > iirc I tried a couple of free ocr programs (I didn't tried ocropus; I don= 't > remember if either that program didn't exist at that moment or I just did= n't > know about it) but their output was just the text without the coordinates > where the texts are located, which would be needed to produce a proper te= xt > layer in the djvu document. > > So I gave up and rebooted on Windows and I used a propietary software to > produce the document; it worked quite well, I just fed the papers in my > scanning device and produced a multipage document; when done I just click= ed a > menu item labelled as something "process the document using OCR" and that= 's > it. I don't remember very well the name of the software I used, but I'd s= wear > it was "Document Express"[2]. > The result was excellent, and you can download the produced document here: > http://alioth.debian.org/~santa-guest/gsoc2012/apuntes_te.djvu > As you can see, the size of the document is reasonable (only 2.4M) and yo= u can > do ctrlf+F "zener" and read stuff about zener diodes. > > So... to sum up: it was/is easier to produce good djvu documents with > propietary software. I want a KDE'ish program to replace the expensive > "Document Express". > > > Some technical details > -------------------------------- > > Currently we have a couple of KDE programs to scan documents: skanlite and > kooka. skanlite is quite simple (doesn't do OCR stuff), uses the modern l= iksane > library, it's in extragear and works fine. kooka provided more functional= ity in > the KDE 3 old days than skanlite today (seems it was able to do some basi= c OCR > stuff), uses its obsolete libkscan library, it's in playground and I don'= t know > if it works or not because I don't have an scanning device right now, but= at > least it builds properly. > > So... looks like the tasks to do to achive my goal would be: > 1. If needed, extend libksane functionality in order to make it a good > replacement for the old libkscan. > 2. Port kooka to the modern libksane. > 3. Add ocropus support to kooka (I heard with ocropus you can get the > coordinates of the texts, but I don't know for sure yet) > 4. Code something in kooka to produce djvu documents. > > > [1]http://en.wikipedia.org/wiki/DjVu > [2]https://www.caminova.net/en/shop/item.aspx?itemid=3D3 > > I sent this suggestion to the kde-hardware mailing list, but it seems relevant here: Scanner kio slave. An easy scanner interface using file managers (like the current CD ripper kio slave). There would be a folder for each scanner. When the folder is opened it will pull in a preview from that scanner. There would then be folders for supported resolutions, with individual files for common paper sizes, the whole scanner area, auto-detected pictures (i.e. if you can multiple pictures at the same time) and, if available, text files for OCR. Dragging one of these to the filesystem will trigger a full scan with those settings. -Todd >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscrib= e <<