just for contribution and reference. This is my setup which I built last weekend while I browsed the net and found this site. It took me two afternoons and some styrofoam packaging leftovers (ikea ). Pro: easy to work with and very fast. Con: low stiffness, thats why there are some threads required to stabilize the camera 'mount'. Major problem atm: not enough light.
The next thing I work on, will be the lighting situation. I like the idea of flashing and overdriving LEDs (did that in a multitouch project with infrared LEDs @uni) but the control is difficult. They need to be fired when the shutter is opened and only as long as the shutter is open (or shorter).
result:
The idea behind this calibration picture is to use it for calculation of the camera distortion (difference between the ideal plane, all crosses have equal distances, and the captured 'bended' plane). But the pages have to be absolutely plane when captured by the camera.
Thought: It would be nice to be able to overlay such a grid over every single page captured (additional layer, infrared ? ignored color channel ?) similar to the patterns generated by barcode laser scanner ...
[oh, I have missed that this was already discussed here: http://www.diybookscanner.org/forum/vie ... ?f=3&t=113 ]
[edit:]
I forgot to mention that I controlled the cam (Canon A640) remotely via gphoto2 on Linux. It toke a picture every 7secs automatically. The only thing I had to do was page flipping and placing the acrylic on the book ... no batteries and no memory card was required
yet another quick and dirty approach
Moderator: peterZ
- daniel_reetz
- Posts: 2812
- 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: yet another quick and dirty approach
YES! I love your design and materials. So expedient!
I'm going to throw up a camera calibration tutorial soon. I see where you're going with the distortion correction, and we've also talked about it as a whole. But the truth is, for the barrel distortion part of things, it's rather easy to get good parameters out of the free software tool called "Hugin". I would love to see a few of us calibrate our cameras using Hugin and create a lens database for the community to use.
I'm going to throw up a camera calibration tutorial soon. I see where you're going with the distortion correction, and we've also talked about it as a whole. But the truth is, for the barrel distortion part of things, it's rather easy to get good parameters out of the free software tool called "Hugin". I would love to see a few of us calibrate our cameras using Hugin and create a lens database for the community to use.
- rob
- Posts: 773
- Joined: 03 Jun 2009, 13:50
- E-book readers owned: iRex iLiad, Kindle 2
- Number of books owned: 4000
- Country: United States
- Location: Maryland, United States
- Contact:
Re: yet another quick and dirty approach
After futzing around with page dewarping algorithms, I feel that it still is probably possible that I could come up with an algorithm for autodewarping... eventually. I'm wonder if it wouldn't just be easier to have FOUR cameras instead of two, and use stereoscopic imaging. Two cameras per page means that the three dimensional profile of each page can be captured, meaning that errors due to a non-flat page could be eliminated very easily. It still wouldn't solve lens distortion, which I think calibration images like this would be great for. I see that Decapod has some autocalibration stuff that looks very promising.
The Singularity is Near. ~ http://halfbakedmaker.org ~ Follow me as I build the world's first all-mechanical steam-powered computer.
Re: yet another quick and dirty approach
technically, that would be perfect ... but I even hesitate to think about two cameras (costs ... as I want lots of resolution) Some time ago, I attended a course in Photogrammetric Computer Vision, from what I learned, its possible to implement what you mentioned and there were other things I wanted to try, but atm I'm in need of more time to work this up again properly ... with two (or three) cameras, it should be even possible to reconstruct the scene ('the book') in 3D, to some degree. Probably outdated, but similar to this article: http://www.graphicon.ru/2004/Proceeding ... 5B1%5D.pdfrob wrote:I'm wonder if it wouldn't just be easier to have FOUR cameras instead of two, and use stereoscopic imaging. Two cameras per page means that the three dimensional profile of each page can be captured, meaning that errors due to a non-flat page could be eliminated very easily. It still wouldn't solve lens distortion, which I think calibration images like this would be great for.
I dont know this tool yet, but I'll try it. The database could be a bit tricky as the internal camera parameters change significantly with the zoom settings (geometry change).daniel_reetz wrote:... it's rather easy to get good parameters out of the free software tool called "Hugin". I would love to see a few of us calibrate our cameras using Hugin and create a lens database for the community to use.
For the start, it would be great to be able to remove all the distortions introduced by the camera and scene geometry (perspective) just based on a captured calibration sheet before the first page and maybe after the last page.
- daniel_reetz
- Posts: 2812
- 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: yet another quick and dirty approach
Actually, you would probably only need three cameras, because you could have one over the center and do a stereo pair for each side using it (Left+center, Right+Center).
If this middle camera were IR sensitive, you could have an invisible pattern on the page. But that's into the Google digitizer patent territory.
If this middle camera were IR sensitive, you could have an invisible pattern on the page. But that's into the Google digitizer patent territory.
- daniel_reetz
- Posts: 2812
- 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: yet another quick and dirty approach
Oh yeah!!! I forgot, from my favorite research field out there -- computational photography, there is a paper that describes a radial imager which captures both the scene and what looks like enough 3D info to do the dewarping...
http://www1.cs.columbia.edu/CAVE/projects/rad_im/
There must be similar or other smart ways to code the scene using additional optics. If we code the scene, or otherwise have prior knowledge, dewarping gets a lot easier.
http://www1.cs.columbia.edu/CAVE/projects/rad_im/
There must be similar or other smart ways to code the scene using additional optics. If we code the scene, or otherwise have prior knowledge, dewarping gets a lot easier.
Re: yet another quick and dirty approach
yep, that's my favorite approach, but it's slightly challenging (hardware ...)daniel_reetz wrote:If this middle camera were IR sensitive, you could have an invisible pattern on the page. But that's into the Google digitizer patent territory.
afaik, you're allowed to rebuild/construct/implement technologies covered by patents, as long as you don't use it commercially, gain profit from it - or am i wrong ?
-
- Posts: 596
- Joined: 06 Jun 2009, 23:57
Re: yet another quick and dirty approach
I can see how warping might be a problem if you're just photographing a book laying open on the table, or scanning a book that's open to 180 degrees, but with our designs isn't the portion of the page we want already flat enough for all intents and purposes?
And if not, would it be possible to use 2 cameras as they're set up now, and just zoom out sufficiently to photograph all of the "near" page? The reason I don't worry about keystoning now is because there's very little of it, and certainly after ScanTailor finishes processing, not enough for me to notice. If one had a robust algorithm for dewarping, though, it would be possible to raise the cameras a little so the "film plane" wasn't parallel to the primary page, and thereby get a better image of the secondary page. In that case, the keystoning would probably be noticeable even to a "good enough" guy like me, but with the software handling it on the back end, maybe not a problem.
Honestly, though, neither warping nor keystoning are serious problems to me at this point with the setup we're using.
And if not, would it be possible to use 2 cameras as they're set up now, and just zoom out sufficiently to photograph all of the "near" page? The reason I don't worry about keystoning now is because there's very little of it, and certainly after ScanTailor finishes processing, not enough for me to notice. If one had a robust algorithm for dewarping, though, it would be possible to raise the cameras a little so the "film plane" wasn't parallel to the primary page, and thereby get a better image of the secondary page. In that case, the keystoning would probably be noticeable even to a "good enough" guy like me, but with the software handling it on the back end, maybe not a problem.
Honestly, though, neither warping nor keystoning are serious problems to me at this point with the setup we're using.
Re: yet another quick and dirty approach
It should be worth knowing what exactly the pattent describes and to which territories it applies.
Actually, the infrared technology is used since long in many flatbed photo scanners to detect and remove dust and scratches. Even VueScan supports it.
Actually, the infrared technology is used since long in many flatbed photo scanners to detect and remove dust and scratches. Even VueScan supports it.