Realizing a book scanner with CHDK and a Canon Powershot A460 or A560 - Hello, I'm a NEWBIE - HELP!! (Newbies assistance, User Guides and thank you notes) - CHDK Forum  

Realizing a book scanner with CHDK and a Canon Powershot A460 or A560

  • 13 Replies
  • 13917 Views
Advertisements
Hello,

I want to build a book scanner. I tryed that with a Logitech web cam but the image results were too bad. So I guess about using digital cameras. But I found out that it's not very easy to control a digital camera remotely. After searching for a while I found CHDK which looks pretty helpful for me. But before I buy a Canon camera I have a few questions and I hope you can help me.

My goal is, to digitalize a book without triggering the camera manually for every site. So the computer should recognize the turning page process. But for that I need a stream of pictures so the idea is, to take three pictures per second continuously and transfer them in realtime to my PC. I've read something about the script language for CHDK, is it possible to write a script which takes two or three photos per second? And if so is it possible to get direct access to the pictures so that I can load them into an other program and continue processing?

If that is not possible I would take the photos one per book site manually by pressing a shortcut on the PC keyboard. For that I need a remote trigger for the camera. I found the page  which describes the construction of an remote trigger via USB cable (http://chdk.wikia.com/wiki/USB_Remote_Cable). The problem is that on the one hand I'am not familiar with cutting USB cables and on the other hand the USB port of the camera is filled with that trigger cable. So I could take a picture but can't receive it in realtime but realtime is very important for me.

I found two cameras, the A460 and the A560 both should work fine with CHDK, is there anything else which I should consider? The camera shouldn't be more expensive than 100 dollar (second hand).

I use Windows XP.

Thank you in advance and best regards

*

Offline Lebeau

  • ***
  • 187
CHDK book Scanner ?
and
DIY High-Speed Book Scanner from Trash and Cheap Cameras


With a little script that execute sequential shoots, spaced about the time it takes to flip a page.

I've read something about this project but that's not what I need. My focus lies on a book scanner usable for blind people. That means, that it's not enough to automaticaly take a picture when the user probably turns the page. The plan is that my program gets a stream of pictures, at least 1 per second (three would be better). The program does nothing until it detects some movement. After that it waits for silence again, takes the actual picture, corrects the image orientation and cuts out the irrelevant parts (borders). The next step is to find the page number, cut it out and gives it to an OCR program (for example Tesseract). The OCR recognizes the page number and than it can be spoken out by a screen reader. This has the advantage, that the blind user can skip through a book and easily can find a certain page. But for that I need the picture stream. So I imagine that the camera is triggered by a script and takes the pictures and my program can use these pictures nearly at the same time. So I would connect the camera to my PC via USB, start the script on the cam and then pick up the newly arriving pictures from the mass storage of the cam (which is also shown in the windows explorer). Would this work?

Wouldn't it be far far easier to just dog-ear Page #1 and have them count the pages? (Or for skipping purposes, dog-ear every 10th page.) They could probably do it much faster that way and with more assurance than depending on some hit 'n miss OCR. Or braille emboss the page numbers?

I am reminded of the story during the space-race between the USA and Russia, when the USA showed the Russians their way-cool pressurized ink pen for writing in zero gravity. The Russians said, "Oh, we solved that problem." Showing the USA team a pencil.

K.I.S.S.

(For those that don't know, that stands for "Keep It Simple, Stupid".)

If you need to trigger it when a page is manually turned, you could always just use a USB remote switch and have them hit that when they flipped a page. If they can turn a page I presume one or both hands are functional enough to press a little switch. Or use the motion-detection capability of CHDK, with a time-delay after detecting motion. The only problem with that is the motion-detection script's parameters would have to be adjusted for light-levels for every situation and new book that was put under it, as well as telling the person to keep the book perfectly still between page-turns.



« Last Edit: 01 / May / 2011, 16:30:19 by NewbieToobie »


*

Offline reyalp

  • ******
  • 14080
The plan is that my program gets a stream of pictures, at least 1 per second (three would be better).
Most CHDK cameras will not be able to accomplish this in photo mode. Few do much better than 1 fps (there are some exceptions, e.g. CMOS cameras, and cameras that have a reduced resolution "high iso" mode). Video would be another option on HD capable cameras, although that would greatly complicate the receiving end.
Quote
The program does nothing until it detects some movement. After that it waits for silence again, takes the actual picture, corrects the image orientation and cuts out the irrelevant parts (borders). The next step is to find the page number, cut it out and gives it to an OCR program (for example Tesseract). The OCR recognizes the page number and than it can be spoken out by a screen reader. This has the advantage, that the blind user can skip through a book and easily can find a certain page. But for that I need the picture stream.
A very interesting project. It sounds like there is a very large amount that needs to be done outside of the image acquisition part.
Quote
So I imagine that the camera is triggered by a script and takes the pictures and my program can use these pictures nearly at the same time. So I would connect the camera to my PC via USB, start the script on the cam and then pick up the newly arriving pictures from the mass storage of the cam (which is also shown in the windows explorer). Would this work?
You can shoot while connected over USB using the CHDK PTP interface. This is still under development and not well documented. See http://chdk.wikia.com/wiki/PTP_Extension Some cameras (mostly older ones) allow USB control using Canons SDK.

No modern Canon P&S  act as USB mass storage. They use PTP, which is a much more limited protocol, and cannot be accessed with regular file system functions.

An alternative would be to use eye-fi http://www.eye.fi/ to retrieve the pictures.
Don't forget what the H stands for.

No modern Canon P&S  act as USB mass storage. They use PTP, which is a much more limited protocol, and cannot be accessed with regular file system functions.

An alternative would be to use eye-fi http://www.eye.fi/ to retrieve the pictures.

For an extremely good tethered shooting software for older Canon cameras, see Cam4You Remote
This has automated off-loading of photos and all the bells and whistles you'd need if you are going to shoot tethered anyway. It's the best tethered-shooting software that's ever been made. Best of all, the author now made it freeware. It's only a matter of finding older cameras supported by that software. Making the costs of your project minimal if you hunt on ebay for a good deal.

Wouldn't it be far far easier to just dog-ear Page #1 and have them count the pages? (Or for skipping purposes, dog-ear every 10th page.) They could probably do it much faster that way and with more assurance than depending on some hit 'n miss OCR. Or braille emboss the page numbers?
Yes I know what you mean but for example you search for page 213 it would be very annoying to count all the pages. I want to try something new, if the recognition of the page number doesn't work the user can choose the manual counting as a fallback method.

Most CHDK cameras will not be able to accomplish this in photo mode. Few do much better than 1 fps (there are some exceptions, e.g. CMOS cameras, and cameras that have a reduced resolution "high iso" mode).
Ok understood. The camera should be payable like I wrote something like an A460 or maybe A480 so I forget the three images per second. That's not the problem. At the moment I use a web cam for all things, that means analysing the video stream for movement and then pick up a picture. I only would change the picture fetching process so the web cam furthermore watches the stream for movement and then gives the capture one frame command to the Canon cam.

If I interpret the rest of your posts right, I see two possible solutions:
1. I connect the digital camera via USB to my PC and use the PTP protocol to trigger the take photo script on the cam and after that receive the taken picture and save it on a folder on the HDD from where I can load it into my program.
2. I construct the USB remote cable (see wiki article) and use that to take the picture. To get the taken picture I would use the eye-fi card.

I prefer method 1 cause if it works it's much easyer to build and cheeper. Could you help me a bit further with this PTP protocol? Very helpful would be a simple list of steps, starting with a new bought Canon cam.

For an extremely good tethered shooting software for older Canon cameras, see Cam4You Remote
This has automated off-loading of photos and all the bells and whistles you'd need if you are going to shoot tethered anyway. It's the best tethered-shooting software that's ever been made. Best of all, the author now made it freeware. It's only a matter of finding older cameras supported by that software. Making the costs of your project minimal if you hunt on ebay for a good deal.
This sounds good but the supported camera models are a bit too old for my purpose. The taken pictures should be better then these from the Logitech C910 web cam which I use at the moment.

@solkron,

Blind equipment and software are expensive because they are specialised applications and custom built.

You are trying to re-invent the wheel. Talking about building a project and actually possessing the hands on experience to make a project work effectively and efficiently are two different issues. The book scanner posted by Lebeau is a good practical project that has been professionally replicated by public libraries. According to one article I read, one public library stated that the DIY scanner was comparable to their commercial scanner costing thousands of dollars more.

The original book scanner designer probably spent hundreds of hours in research and development and ironed out the bugs. If you want to be successful in your endeavour, you will have to build the book scanner as designed and published. Once you have built a prototype working book scanner and used it for a while, you will have worked out the application limitations; then you will have a good idea what is practical and applicable to your application. Then you can custom design a book scanner applicable for your application.


*

Offline reyalp

  • ******
  • 14080
If I interpret the rest of your posts right, I see two possible solutions:
1. I connect the digital camera via USB to my PC and use the PTP protocol to trigger the take photo script on the cam and after that receive the taken picture and save it on a folder on the HDD from where I can load it into my program.
2. I construct the USB remote cable (see wiki article) and use that to take the picture. To get the taken picture I would use the eye-fi card.

I prefer method 1 cause if it works it's much easyer to build and cheeper. Could you help me a bit further with this PTP protocol? Very helpful would be a simple list of steps, starting with a new bought Canon cam.
There isn't really such a thing at the moment. You'll have to read the development thread http://chdk.setepontos.com/index.php/topic,4338.0.html and information on the wiki.

Reading the ptp threads on the german forum http://forum.chdk-treff.de/viewforum.php?f=7 (with google translate if needed) may also be useful.
Don't forget what the H stands for.

For an extremely good tethered shooting software for older Canon cameras, see Cam4You Remote
This has automated off-loading of photos and all the bells and whistles you'd need if you are going to shoot tethered anyway. It's the best tethered-shooting software that's ever been made. Best of all, the author now made it freeware. It's only a matter of finding older cameras supported by that software. Making the costs of your project minimal if you hunt on ebay for a good deal.
This sounds good but the supported camera models are a bit too old for my purpose. The taken pictures should be better then these from the Logitech C910 web cam which I use at the moment.
I've used a 5megapixel camera to easily archive a book in the past. Comparing those older cameras to a webcam does them a disservice. Any of those cameras listed on the Cam4You Remote site would be more than what you need. It sounds more and more like you don't want real solutions, you just want to invent problems.


 

Related Topics