LATEST - If you had difficulty registering recently please try again now we have found and fixed the problem.

CHDK goodies

Everything camera related. Includes triggers, batteries, power supplies, flatbeds and sheet-feeding scanners, too.
Post Reply
spamsickle
Posts: 596
Joined: 06 Jun 2009, 23:57

CHDK goodies

Post by spamsickle »

I think I have that motion detecting shutter control script in the sweet spot, but I'll need to wait until the sun goes down to see how it works in an actual scan. In the meantime, I found out a bit more about what you can do with CHDK, and I thought I'd share this tip which may be helpful.

One problem I've had with my DIY book scanner has been that the right hand doesn't know what the left hand is doing. I try to line up the book for the camera on the right, and try to match the size and alignment with the camera on the left, but there always seem to be differences which detract from the final product. Anything which helps me match the right and left views should improve the ultimate quality, or maybe just take less time to achieve the same quality.

Here's a possible aid. CHDK allows me to create my own grid, and this is what I've come up with:
DIYgrid.jpg
(202.56 KiB) Downloaded 251 times
Now, when I'm lining up the book and the camera, I have more than just the edge of the viewfinder to use as a guide. In addition, I can be more accurate with the zoom and distance, and really match the size of the left image and the right image. That "Z:52/x2.7" bar is the zoom information for my camera (the DIGIC III series offers zoom from 0 to 127, and the precise level of zoom can also be controlled thru CHDK). If I put each camera the same distance from the platen, and set the zoom the same (52 in this case), I should get matching page sizes. The grid helps me line up the book, and get lots of nice rectilinear edges. Sure, I'll have to be careful to keep the book from moving as I scan (which I have some ideas about also), but as long as the sizes are the same and they're more or less straight, post-processing software should have an easier time making the pages match.

Here's the code for the custom grid itself:

Code: Select all

@title DIY Bookscanner Grid
@line 	0,	10,	359,	10,	0x55
@line 	0,	20,	359,	20,	0x66
@line 	0,	30,	359,	30,	0x77
@line 	0,	40,	359,	40,	0x88
@line 	0,	50,	359,	50,	0xAA
@line 	0,	60,	359,	60,	0xFF
@line  10,   0,  10, 239, 0x55
@line 350,   0, 350, 239, 0x55
@line  20,   0,  20, 239, 0x66
@line 340,   0, 340, 239, 0x66
@line  30,   0,  30, 239, 0x77
@line 330,   0, 330, 239, 0x77
@line  40,   0,  40, 239, 0x88
@line 320,   0, 320, 239, 0x88
@line  50,   0,  50, 239, 0xAA
@line 310,   0, 310, 239, 0xAA
@line  60,   0,  60, 239, 0xFF
@line 300,   0, 300, 239, 0xFF
I saved this file as "diybscan.grd" in the CHDK\GRIDS directory on my memory card. Then, from the CHDK Main Menu, I select OSD parameters -> Grid, then "Load grid from file...". While I'm on the Grid lines display, I check the Show grid lines radio button as well. Backing out to the OSD display, I check "Show OSD".

If you want the zoom information as well, click through OSD parameters -> "Show Miscellaneous Values" to set the zoom. I position the zoom banner where it won't interfere with my grid using the OSD parameters -> OSD layout editor, but that's not strictly necessary.

Almost dark here in L.A.; keeping my fingers crossed for the motion detector script. If it works, I'll make that another CHDK goodie...
spamsickle
Posts: 596
Joined: 06 Jun 2009, 23:57

Re: CHDK goodies

Post by spamsickle »

The motion control script never worked acceptably for me, though I managed to scan one book using it. During that scan I had the same idea that a few others on this board have already had, and just put the cameras on autoshoot with a specified interval. My experience with the motion control script made me realize that, for me at least, sound helps me keep the right rhythm while scanning, so this script has an option for it.

Code: Select all

rem Timer shutter control for DIY Bookscanners
rem tested on Canon Powershot S5 IS	

@title DIY Timer Shutter V1

@param s Seconds
@default s 6
@param a Sounds (0=No 1=Yes)
@default a 1

if s<2 then s=2
t=s-1

:wait_interval
i=t
do 
	if a<>0 then playsound 4
	sleep 1000
	i=i-1
until i<1
if a<>0 then playsound 0
click "shoot_full" 
do 
	get_prop 206 p 
until p<>1 
sleep 1000
goto "wait_interval"

rem Get_prop 206 tests when DIGIC III camera is ready to shoot again 
rem Use get_prop 205 instead for DIGIC II cameras 
rem Don't activate AE lock, this loop is endless if AE lock is activated

end
I just start both scripts at the same time, and they stay synchronized pretty well. If they ever get unsynchronized, I could just stop them and restart them to sync them up again.

This works well for me, and I actually get better throughput letting the cameras fire themselves than I did with my hardware switch. After I decided to sell the switch, I realized that the hardware solution would still come in handy for old or fragile books, where I might take care turning some pages while turning other pages more quickly. I may just go with a "long" interval in such cases, or bite the bullet and make another switch.
User avatar
daniel_reetz
Posts: 2804
Joined: 03 Jun 2009, 13:56
E-book readers owned: Used to have a PRS-500
Number of books owned: 600
Country: United States
Contact:

Re: CHDK goodies

Post by daniel_reetz »

Post Reply