Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > More E-Book Readers > iRex > iRex Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 04-10-2008, 10:50 PM   #1
rio
Member
rio is on a distinguished road
 
Posts: 13
Karma: 56
Join Date: Mar 2008
Location: London
Device: iRex iLiad
Teasing :D

Hi *,

Check the attached pic

I started to play a bit with the note taking feature of the iliad, which led me to wonder if it was possible to generate a pdf from the scribbles and the image used.. alas the java scribble merging application only seems to work for PDF scribble. I guess it would be trivial to modify the java app, but I had a look at the xml scribbling format, and when I saw it was so straightforward I quickly wrote myself a MacOSX viewer for the notes, using the png image as a background.

But then... I suddenly remembered the Ink handwriting recognition engine.

This thing comes straight from the ill-fated Apple Newton PDA (such a loss!), but what is nice is that it is available and installed by default on OSX

Turns out it's not too difficult to feed Ink a set of custom datapoints, and after some tweaking it doesn't work too bad apparently, as can be seen on the screenshot...

So far, this is only highly experimental code, and it'll probably take a bit more time to have a really usable application.
Attached Thumbnails
Click image for larger version

Name:	ink+irex.png
Views:	8044
Size:	67.5 KB
ID:	12127  
rio is offline   Reply With Quote
Old 04-11-2008, 01:53 AM   #2
daudi
Addict
daudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-books
 
Posts: 281
Karma: 904
Join Date: Oct 2007
Location: Kent, UK
Device: iRex iLiad, Psion 5MX, nokia n800
Very cool! This looks very promising. I don't suppose this is something that could be legally shared for use on non-Macs. I mean that ex-Newton code/application, is it?
daudi is offline   Reply With Quote
Advert
Old 04-11-2008, 04:53 AM   #3
rio
Member
rio is on a distinguished road
 
Posts: 13
Karma: 56
Join Date: Mar 2008
Location: London
Device: iRex iLiad
Quote:
Originally Posted by daudi View Post
Very cool! This looks very promising. I don't suppose this is something that could be legally shared for use on non-Macs. I mean that ex-Newton code/application, is it?
No, it's a system library :-/
For windows, I don't know if the stuff they use on tabletpc is downloadable for free for non-tabletpc and if it's easy to hook something like that (probably is). For linux I don't know a good HWR lib but one may exist.

If HWR engine are available, the app could be ported easily via GNUstep.

Last edited by rio; 04-11-2008 at 05:03 AM.
rio is offline   Reply With Quote
Old 04-11-2008, 07:38 AM   #4
Redfox
aka Anne Lyle
Redfox ought to be getting tired of karma fortunes by now.Redfox ought to be getting tired of karma fortunes by now.Redfox ought to be getting tired of karma fortunes by now.Redfox ought to be getting tired of karma fortunes by now.Redfox ought to be getting tired of karma fortunes by now.Redfox ought to be getting tired of karma fortunes by now.Redfox ought to be getting tired of karma fortunes by now.Redfox ought to be getting tired of karma fortunes by now.Redfox ought to be getting tired of karma fortunes by now.Redfox ought to be getting tired of karma fortunes by now.Redfox ought to be getting tired of karma fortunes by now.
 
Redfox's Avatar
 
Posts: 85
Karma: 437516
Join Date: Feb 2008
Location: Cambridge, UK
Device: Sony PRS-600
That is way cool! When I got my iLiad and found out that HWR wasn't supported on the Mac I was very disappointed, but this could be the answer

If you need any beta testers, email me via the forum - I have some basic Unix knowledge, though I'm a relative newcomer to the Mac so I don't know diddly about OSX-specific scripting tools
Redfox is offline   Reply With Quote
Old 04-11-2008, 07:59 AM   #5
mrdini
Connoisseur
mrdini doesn't littermrdini doesn't litter
 
Posts: 97
Karma: 177
Join Date: Sep 2007
Device: Hanlin V2 & V6
Quote:
Originally Posted by rio View Post
Hi *,

Check the attached pic

I started to play a bit with the note taking feature of the iliad, which led me to wonder if it was possible to generate a pdf from the scribbles and the image used.. alas the java scribble merging application only seems to work for PDF scribble. I guess it would be trivial to modify the java app, but I had a look at the xml scribbling format, and when I saw it was so straightforward I quickly wrote myself a MacOSX viewer for the notes, using the png image as a background.

But then... I suddenly remembered the Ink handwriting recognition engine.

This thing comes straight from the ill-fated Apple Newton PDA (such a loss!), but what is nice is that it is available and installed by default on OSX

Turns out it's not too difficult to feed Ink a set of custom datapoints, and after some tweaking it doesn't work too bad apparently, as can be seen on the screenshot...

So far, this is only highly experimental code, and it'll probably take a bit more time to have a really usable application.
Quite neat! I'm interested in this as well, as my V2 also has a touchscreen (& generates notes in .png format)...

How do you hook into the library...? (I had a browse through the ADC notes, but as far as I can tell, it only works with tablets...?)
mrdini is offline   Reply With Quote
Advert
Old 04-11-2008, 08:30 AM   #6
rio
Member
rio is on a distinguished road
 
Posts: 13
Karma: 56
Join Date: Mar 2008
Location: London
Device: iRex iLiad
Quote:
Originally Posted by mrdini View Post
Quite neat! I'm interested in this as well, as my V2 also has a touchscreen (& generates notes in .png format)...

How do you hook into the library...? (I had a browse through the ADC notes, but as far as I can tell, it only works with tablets...?)
You can tell the framework that you will feed it points; so I simply "replay" the points from the .irx. The Ink engine will automatically send you the recognized text as carbon events, so you have to register for those and that's about it !

The only problem is that you are supposed to tell the engine when phrases are complete, and that seems to impact quite a bit the recognition. So far I just have a very crude way of segmenting the strokes in phrases, which kinda work but it shouldn't be difficult to come up with a vertical frequency method to classify the strokes, and that should be more robust.
rio is offline   Reply With Quote
Old 04-11-2008, 08:32 AM   #7
joblack
Wizard
joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.
 
Posts: 1,745
Karma: 4382514
Join Date: Jul 2006
Location: Somewhere on earth
Device: Onyx Boox Tab X
Sometimes even I couldn´t read my own handwriting - how should a software do it ?
joblack is offline   Reply With Quote
Old 04-11-2008, 08:32 AM   #8
rio
Member
rio is on a distinguished road
 
Posts: 13
Karma: 56
Join Date: Mar 2008
Location: London
Device: iRex iLiad
Quote:
Originally Posted by Redfox View Post
That is way cool! When I got my iLiad and found out that HWR wasn't supported on the Mac I was very disappointed, but this could be the answer

If you need any beta testers, email me via the forum - I have some basic Unix knowledge, though I'm a relative newcomer to the Mac so I don't know diddly about OSX-specific scripting tools
I'll be quite busy in the next couple of weeks but should have more time after that to work on a usable application..
rio is offline   Reply With Quote
Old 04-11-2008, 08:41 AM   #9
mrdini
Connoisseur
mrdini doesn't littermrdini doesn't litter
 
Posts: 97
Karma: 177
Join Date: Sep 2007
Device: Hanlin V2 & V6
Quote:
Originally Posted by rio View Post
You can tell the framework that you will feed it points; so I simply "replay" the points from the .irx. The Ink engine will automatically send you the recognized text as carbon events, so you have to register for those and that's about it !

The only problem is that you are supposed to tell the engine when phrases are complete, and that seems to impact quite a bit the recognition. So far I just have a very crude way of segmenting the strokes in phrases, which kinda work but it shouldn't be difficult to come up with a vertical frequency method to classify the strokes, and that should be more robust.
*Reads ADC* Ah, now I get it. Quite straightforward really!

Unfortunately, if I understand you, & the Ink Services docs correctly, this would only work with actual "vector"/points data i.e. a PNG image file wouldn't work as an input. Damn.

Hopefully, one day, I'll be able to hack the V2, & be able to obtain raw data from the touchpad...

Ah well, wish you all the luck with this!
mrdini is offline   Reply With Quote
Old 04-11-2008, 09:26 AM   #10
rio
Member
rio is on a distinguished road
 
Posts: 13
Karma: 56
Join Date: Mar 2008
Location: London
Device: iRex iLiad
Quote:
Originally Posted by mrdini View Post
*Reads ADC* Ah, now I get it. Quite straightforward really!

Unfortunately, if I understand you, & the Ink Services docs correctly, this would only work with actual "vector"/points data i.e. a PNG image file wouldn't work as an input. Damn.

Hopefully, one day, I'll be able to hack the V2, & be able to obtain raw data from the touchpad...

Ah well, wish you all the luck with this!
I'm not sure I understand your point about the V2 ? Here's what I do: I have a simple script on the iliad that creates me a new "notepad" -- a simple folder with a manifest indicating that we're using a specific background PNG image (the gray horizontal lines shown on my screenshot). When I open this newly generated notepad I can scribble on it, and the scribbles are saved in the newly created "notepad" folder/document as a .irx file.

This irx file is a simple xml-encoded file containing the raw data from the scribbles. What I do then is I get the file on the mac, parse it to extract the data points, and use those along with the background png image to re-render the note in a cocoa view (which then allows me to print it or generate a pdf of it).

The recognition phase simply consist in feeding the same data points that to the Ink HWR engine, and I get back the recognized text. An additional thing to do is to segment the points in phrases, and so far my method is really crude and I want to implement a better segmenting tool.

So to sum it up, I don't see anything here that wouldn't work on the V2
(particularly considering I'm using the same OS version!)

edit: hum, maybe I just completely misunderstood you and the V2 is some kind of other tablet-like hardware, not an Iliad V2, that would exports notes in PNG... then yes if that's the case, it won't be easy. Although you can try to vectorise the PNG (should work quite well) and use the vectorised points to feed the Ink engine. But that's certainly a lot more work!

Last edited by rio; 04-11-2008 at 09:29 AM.
rio is offline   Reply With Quote
Old 04-11-2008, 09:30 AM   #11
mrdini
Connoisseur
mrdini doesn't littermrdini doesn't litter
 
Posts: 97
Karma: 177
Join Date: Sep 2007
Device: Hanlin V2 & V6
Quote:
Originally Posted by rio View Post
So to sum it up, I don't see anything here that wouldn't work on the V2
(particularly considering I'm using the same OS version!)
Hanlin V2! :P Not iRex iLiad V2!

As far as I can tell, the notes are simply stored as .png files. No associated metadata/raw data.
mrdini is offline   Reply With Quote
Old 04-11-2008, 10:14 AM   #12
rio
Member
rio is on a distinguished road
 
Posts: 13
Karma: 56
Join Date: Mar 2008
Location: London
Device: iRex iLiad
Quote:
Originally Posted by mrdini View Post
Hanlin V2! :P Not iRex iLiad V2!
Yup

Quote:
Originally Posted by mrdini View Post
As far as I can tell, the notes are simply stored as .png files. No associated metadata/raw data.
:-/ that makes things much harder indeed. One way would be to first vectorise the PNG (there's nice libs for that, iirc autotrace), then segment the points, then feed that back to a HWR engine.
rio is offline   Reply With Quote
Old 04-11-2008, 10:49 AM   #13
Redfox
aka Anne Lyle
Redfox ought to be getting tired of karma fortunes by now.Redfox ought to be getting tired of karma fortunes by now.Redfox ought to be getting tired of karma fortunes by now.Redfox ought to be getting tired of karma fortunes by now.Redfox ought to be getting tired of karma fortunes by now.Redfox ought to be getting tired of karma fortunes by now.Redfox ought to be getting tired of karma fortunes by now.Redfox ought to be getting tired of karma fortunes by now.Redfox ought to be getting tired of karma fortunes by now.Redfox ought to be getting tired of karma fortunes by now.Redfox ought to be getting tired of karma fortunes by now.
 
Redfox's Avatar
 
Posts: 85
Karma: 437516
Join Date: Feb 2008
Location: Cambridge, UK
Device: Sony PRS-600
Quote:
Originally Posted by rio View Post
I'll be quite busy in the next couple of weeks but should have more time after that to work on a usable application..
No worries - it's not something I need to do urgently, just a nice possibility for the future
Redfox is offline   Reply With Quote
Old 04-11-2008, 10:51 AM   #14
Pode
Member
Pode began at the beginning.
 
Pode's Avatar
 
Posts: 22
Karma: 10
Join Date: Mar 2007
Location: France
Device: Sony Reader
About the Windows side of things : there's also the (MS) Ink from the TabletPC architecture available on MS systems, as said earlier. Users of Vista should have the component installed by default. Windows XP (-non TPC version) can download the SDK/extension from the MS site : http://www.microsoft.com/downloads/d...displaylang=en
Pode is offline   Reply With Quote
Old 04-11-2008, 11:22 AM   #15
rio
Member
rio is on a distinguished road
 
Posts: 13
Karma: 56
Join Date: Mar 2008
Location: London
Device: iRex iLiad
Quote:
Originally Posted by Pode View Post
About the Windows side of things : there's also the (MS) Ink from the TabletPC architecture available on MS systems, as said earlier. Users of Vista should have the component installed by default. Windows XP (-non TPC version) can download the SDK/extension from the MS site : http://www.microsoft.com/downloads/d...displaylang=en
Sounds to be what we need yes (I'd have been surprised if it wasn't accessible). Had a very quick look at the classes and there's a stroke one, and you can save ink data. So it should be doable.
rio is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
iLiad Teasing 2: extract snippets/tag PDFs daudi iRex Developer's Corner 15 05-26-2008 01:39 PM


All times are GMT -4. The time now is 12:03 PM.


MobileRead.com is a privately owned, operated and funded community.