Pages: [1]   Go Down
Author Topic: Opening a book  (Read 1328 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Arduino'll never stop
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

Which solution can someone suggest to detect that a book is open or closed ?
For a specific page ? and better to detect the page opened ?

just a switch, weight measurement ????

I'm a bit new about arduino and sensor...

Sebastien
« Last Edit: October 21, 2011, 04:38:02 am by Dudley Smith » Logged

Finland
Offline Offline
Sr. Member
****
Karma: 1
Posts: 270
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How do you plan to open the book/turn a page? Manually or using some kind of actuator? Does the book lay on a flat surface?

The most obvious solution I can think of is to use computer vision/ocr to read the page number.  See http://sourceforge.net/projects/opencvlibrary/. But for that you need a generic computer (may be a small one like the SheevaPlug). That's too heavy task for the Arduino.

Or can you print anything on the pages, like barcode tags? If you can, you could use a PS2 barcode scanner with the Arduino.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Arduino'll never stop
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

yeah, people will turn pages of a book on a table.

First, I wanna test opening with simple sensor(switch, whatever....) and arduino. It looks simple and the good idea...
In a second time, maybe openCv work.

anyway, I will have a PC running, arduino will just send sensor or light some light stuff.
Logged

Finland
Offline Offline
Sr. Member
****
Karma: 1
Posts: 270
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Can you tell us a bit more about the purpose of your project? What are you trying to accomplish?  Why do you need to know when people turn pages?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Arduino'll never stop
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

The final project is to present books on a table,
people open it and text (of the page...) displays on a screen, words splitting into letters, letters into sparks, maybe also playing sounds and lighting desk lamp.

Anyway I will have a PC running doing the main stuff , i will use arduino for detection if necessary...
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 129
Posts: 8594
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Detecting open yes, which page no, not without some really clever vision software I think.

Technically it would be possible to weight both halves of the book, but I think there would be too many variables to make that viable and you'd have to do some seriously good ADC circuit design.

As pekkaa says, tell us more.
 

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 129
Posts: 8594
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Crossed there.

So you already have some vision stuff happening and a PC. Maybe some OCR on the page image. Bit out of my area though.

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Finland
Offline Offline
Sr. Member
****
Karma: 1
Posts: 270
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I believe that computer vision/ocr is the easiest way to do it.  The only extra hardware you would need is a webcam. Finding/recognizing the page numbers isn't the most complex task you can do with the tools like OpenCV. If the book is always on the same place, it will be even easier.  You can easily crop the picture (taken by the webcam) so that it will contain only the page number, and use any OCR software to recognize it.  The only problem is  that the person who reads the book may block the camera.

With the Arduino + some sensors you can probably detect a page turn, but it would be hard the tell which page is opened. I don't think measuring the weight would work.  How the weight distributes between the halves depends on many factors, for example, the stiffness of the book's spine and it will change over time.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 634
Posts: 34535
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The only extra hardware you would need is a webcam. Finding/recognizing the page numbers isn't the most complex task you can do with the tools like OpenCV.
The problem with that is that for proper OCR you need a resolution of 600 dpi and you are unlikely to get that with a web cam.

Are you in control of the book? Something like a bar code to act as a page number might be a better option.
Logged

Finland
Offline Offline
Sr. Member
****
Karma: 1
Posts: 270
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The problem with that is that for proper OCR you need a resolution of 600 dpi and you are unlikely to get that with a web cam.

I don't think that that high resolution is necessary, but it certainly helps to have a good quality webcam, possibly with a zoom (or long enough fixed focal length) so that you don't need to bring the camera too close to the book. Ocr and pattern recognition algorithms in general are quite efficient. It is even possible to recognize faces from a few hundred pixels. Recognizing page numbers is almost a trivial task. There are only ten digits the recognize.

I took this picture using my cell phone. Open source tesseract software was able to recognize the page number without any tweaking of the picture (no cropping or any other post processing) or training of the ocr software.


* page183.jpg (144.49 KB, 1280x960 - viewed 28 times.)
« Last Edit: October 21, 2011, 11:34:59 pm by pekkaa » Logged

Global Moderator
Netherlands
Online Online
Shannon Member
*****
Karma: 221
Posts: 13851
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

300 dpi is enough for OCR of printed text that is not too "distorted" (vague isn't it)

at 600 dpi one can discriminate between fonts a bit easier.
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Finland
Offline Offline
Sr. Member
****
Karma: 1
Posts: 270
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What kind of resolution is needed depends on the ocr software you use. And of course on what kind of text (font face/size etc) you are trying to recognize. With some image prosessing and training of the ocr software it is possible to do ocr with much lower resolutons.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 634
Posts: 34535
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a 300 dpi scanning of some text I wrote a long time ago and it was published in a magazine.

I have some OCR software provided by Epson when I got a scanner / printer from them. No doubt it is not the best in the world but a lot better than stuff I have had in the past. It has a great deal of difficulty recognising the text and it is full of errors of a 330 dpi scan. If I scan at 600 dpi I get 100% error free recognition.

This is just my experience but I am sure it is not atypical.
 
Logged

Vejen, Denmark
Offline Offline
Edison Member
*
Karma: 9
Posts: 1178
RAWR! ^,..,^
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a 300 dpi scanning of some text I wrote a long time ago and it was published in a magazine.

I have some OCR software provided by Epson when I got a scanner / printer from them. No doubt it is not the best in the world but a lot better than stuff I have had in the past. It has a great deal of difficulty recognising the text and it is full of errors of a 330 dpi scan. If I scan at 600 dpi I get 100% error free recognition.

This is just my experience but I am sure it is not atypical.
 
oh, I tried some from epson too! It was AWESOME, nothing less.

Took a page with some graphics and text on, and it scanned everything into a word document, with the graphics as vectors, so I could modify them as I wanted too.
Logged

captain-slow.dk | non contagious!

Finland
Offline Offline
Sr. Member
****
Karma: 1
Posts: 270
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This is a copy of the picture I posted earlier, but the resolution is now reduced down to about 150 dpi (640px/9cm). Tesseract can still recognize the page number correctly  without any image post processing, training etc. with the default options. There were some errors in other parts of the text (partly because the language settings didn't support dotted characters like "ä"). Most commercial ocr software probably give better results.

If you train the software for a specific font it's performance would be better. And if normal ocr still doesn't provide good enough results, one can build a specialized solution using more powerful pattern/shape recognition tools like those of OpenCV.

I think that the ocr part wouldn't be hard to tackle at all. Perhaps the most difficult part would be to make sure the the reader won't come between the camera and the page number.


* page183_1.jpg (37.59 KB, 640x480 - viewed 23 times.)
« Last Edit: October 23, 2011, 11:02:02 am by pekkaa » Logged

Pages: [1]   Go Up
Jump to: