Methods To Sense The 3D Surface/Structure Of A Book

DIY Book Scanner Skunk Works. Share your crazy ideas and novel approaches. Home of the "3D structure of a book" thread.

Moderator: peterZ

Post Reply
User avatar
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: Methods To Sense The 3D Surface/Structure Of A Book

Post by daniel_reetz »

Hey piramido, that's a pretty good idea. Actually, a similar idea was described before in this thread just a few days ago (http://diybookscanner.org/forum/viewtop ... t=10#p7701). Thank you for sharing your idea.

Welcome to the forums, and don't worry too much about your English, we have a lot of non-native speakers here and we rarely notice mistakes.
dtic
Posts: 464
Joined: 06 Mar 2010, 18:03

Re: Methods To Sense The 3D Surface/Structure Of A Book

Post by dtic »

An idea for tweaking the "photo of book from the side" strategy: position a mirror aligned so that a photo from above the book also captures a sideshot of the book in the mirror. That requires somewhat better image quality from the camera, since a larger area needs to be captured with sufficient resolution. But only one camera would be needed.
User avatar
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: Methods To Sense The 3D Surface/Structure Of A Book

Post by daniel_reetz »

Mirrors are almost totally unexploited for book scanning, but as I mentioned here, the main problem is that you really need first-surface mirrors, which are fragile. Mylar mirrors are another possibility - we can DIY them and they are inherently first-surface, but fidelity suffers.

I'm happy to be proven wrong on that - maybe for edge detection or what-have-you the slight double image doesn't matter?
spamsickle
Posts: 596
Joined: 06 Jun 2009, 23:57

Re: Methods To Sense The 3D Surface/Structure Of A Book

Post by spamsickle »

dtic wrote:An idea for tweaking the "photo of book from the side" strategy: position a mirror aligned so that a photo from above the book also captures a sideshot of the book in the mirror. That requires somewhat better image quality from the camera, since a larger area needs to be captured with sufficient resolution. But only one camera would be needed.
You know, when Dan and I were trying out ideas this past weekend, I had already abandoned the "from the side" strategy because I'd realized that the cross-section would sometimes vary from the top of the book to the bottom, so having an image of one side would not be sufficient. Since taking a picture from both sides would require three cameras, and I got excited about his "dual laser" proposal once I saw it on the bench and understood how it was supposed to work, I didn't even want to try my suggestion out while I was there.

When I got home, I realized that the dual laser proposal would (I think) raise the same objection -- if the pages were being held open by hand, it would usually be the case that a single "depth" measurement would not be sufficient from the top of the page to the bottom. I think the lasers, as we positioned them and as I understand them, would likely be providing a single depth for a line running from top to bottom across the page.

Your idea for mirrors is intriguing, because it may help overcome that problem. A mirror at the top of the book, and a mirror at the bottom, would conceivably give the contour of the page in both places, perhaps enabling us to draw a line from the top of the page to the bottom and easily calculate a different height at each point along that line. I don't think a little "ghost" image should be much of a problem here, since all we're extracting is a single contour line in each mirror.

Plus, I can't see any reason in theory why both mirrors and lasers couldn't be used, gathering lots of information about the contours of the book and still requiring only a single overhead camera. As long as the mirrors aren't reflecting lasers into your eyes, anyway...
User avatar
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: Methods To Sense The 3D Surface/Structure Of A Book

Post by daniel_reetz »

I am not sure if I quite understand -- let me try to explain my current mental model. I'm sorry I still haven't posted the images we captured yet - I actually took today off just to catch up with things, but between errands and getting my life in order, I still haven't gotten to posting and explaining about our stuff. It Will Happen This Weekend.

So here's what I think. If we imagine a constrained page model where the long length of the page is "rigid" -- or constrained to line segments -- then the curves can be different on either side. Check out this quick illustration - the one side has a different curve than the other.
not_flattened.jpg
not_flattened.jpg (79.26 KiB) Viewed 7525 times

"All" we need to do, then, is return it to this:
flattened.jpg
flattened.jpg (85.35 KiB) Viewed 7525 times
teaser image
bookdistortion.jpg
bookdistortion.jpg (113.28 KiB) Viewed 7525 times
Also, got my lasers from DX today, they are red and look good.
spamsickle
Posts: 596
Joined: 06 Jun 2009, 23:57

Re: Methods To Sense The 3D Surface/Structure Of A Book

Post by spamsickle »

Dan, it may be my failure to understand fully how you're expecting to get height information from the lasers.

Your first picture ("not_flattened.jpg") illustrates what I see as the problem. The page rises on the "near" side, and is more nearly flat on the "far" side.

We adjusted the lasers with no book in place so that they were co-linear on the workbench. The lasers were shining from opposite sides of the camera, oriented at 45-degree angles.

The picture with the lasers shows a pair of beams distorted by the surface of the book. It looks like a couple of parabolas. My understanding was that we were going to extract height information from the distance between the two lines. It seems to me that this will only give a single height for each of the lines in your first picture, and will not enable us to infer the 3D slope of those lines. Thus, this would not enable us to reconstruct the curves of the page edges in 3D. In effect, I think using the distance between the lines would lead us to assume that each of those lines is parallel to the image plane, rather than that it rises with respect to it.

I think we may be able to overcome this by extracting height information using two pictures: an initial "calibration" shot, in which the laser lines appear as a single line, and each page view, in which the lasers are interrupted by the page before they reach the bench. In that case, we may be able to get an independent height for each laser line. The height in this case would be proportional to the distance between the distorted line and the calibration line. The Z height of the left line, and the Z height of the right line, when combined with the X/Y positions of the lines on the page, may enable us to draw each of your 3D lines with the proper 3D slope.

If that's been your idea all along, I apologize for my misunderstanding.
User avatar
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: Methods To Sense The 3D Surface/Structure Of A Book

Post by daniel_reetz »

I think we're on the same page. I was really looking forward to having a post here with video, but my internet connection is GARBAGE and I can't seem to upload ANYTHING over port80. So now I'm FTPing files up and kinda-sorta getting results, except I've spent the last FOUR HOURS trying to upload 300Mb of files.

Gawd, I hate California. Gonna see if I can get onto another neighbor's connection.
User avatar
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: Methods To Sense The 3D Surface/Structure Of A Book

Post by daniel_reetz »

User avatar
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: Methods To Sense The 3D Surface/Structure Of A Book

Post by rob »

Wowzers! That's an awesome explanation!

What if there were more laser lines? Or would it not be worth it?
The Singularity is Near. ~ http://halfbakedmaker.org ~ Follow me as I build the world's first all-mechanical steam-powered computer.
Anonymous1

Re: Methods To Sense The 3D Surface/Structure Of A Book

Post by Anonymous1 »

@Daniel, that's a pretty sweet. I am subliminally processing how you could generate a 3D model out of this...
Post Reply