Fix Keystoning via hardware adjustments

Built a scanner? Started to build a scanner? Record your progress here. Doesn't need to be a whole scanner - triggers and other parts are fine. Commercial scanners are fine too.

Moderator: peterZ

jay

Fix Keystoning via hardware adjustments

Post by jay »

Hello everyone. I built a new standard build scanner and was having issues with keystoning on my images.
I found that by adjusting the vertical placement of my cameras I was able to most stop keystoning from my images.


For the standard build : the scanner craddle (11x15 inches) requires a camera 17 inches vertically from the "base" of the scanner (will be described later) to shoot a non keystoned image. I will use this as a reference point to add or subtract camera height based on the thickness and length of the book.




I use Daniels build photos to visually show how I fixed the problem.
01 shoot to middle.jpg
01 shoot to middle.jpg (103.02 KiB) Viewed 11408 times
Shot 01 shows how I want my camera to shoot a flat image without skew. This requires the shot angle to match the angle of the cradle. To do so I start by shooting to the middle of the 11x 15 cradle (blue line). This middle point would be 5.5 x 7.5 which is the red intersection. {This would work great if I was capturing an 11 inch long book. I will correct this and other things as I go along. For now bare with me.}
02 four boxes.jpg
02 four boxes.jpg (76.54 KiB) Viewed 11408 times
In shot 02 I imagined the each cradle board as a hypotenuse of a triangle (green triangles). The hypotenuse was 11 inches but I had to extend the line so that I could measure from the top of the scanner base (what I refer to as the "base"). By doing so my hypotenuses went from 11 to 12 inches. Notice that the green triangles overlap due to this fact. The vertical portion of the green triangle measured 8.5 inches. From this I added two more identical triangles (red triangles) on top of the two green ones.
03 measure hypotenuse.jpg
03 measure hypotenuse.jpg (68.47 KiB) Viewed 11408 times
Shot 03 Now I have a really big square with sides that equal 17 inches and a hypotenuse that equals 24 inches. Therefore to capture a shot in the middle of the board that does not have skew I must place my camera at 17 inches vertical. The above was for the 11 inch craddle with no book(no thickness).
04 measure hypotenuse - Copy.jpg
04 measure hypotenuse - Copy.jpg (69.21 KiB) Viewed 11408 times
smaller book explanation.jpg
smaller book explanation.jpg (29.77 KiB) Viewed 11163 times


If I want to shoot a 5.5 long x 1/2 thick book I will have to do some math to adjust the camera's vertical placement from standard of 11 long by 0 thick cradle with 17 inch vertical camera.

BOOK DIMENSIONS
Step 01...A 5.5 inch book is 1/2 of an 11 inch book. My 5.5 inch book also has 1/2 (.5) inch thickness.
Step 02...My new middle point of the 5.5 long book is 2.75 inches instead of 5.5 for the 11 inch cradle.
Step 03...My new thicknes is .5 inches instead of 0

explanation overlapped .jpg
explanation overlapped .jpg (19.28 KiB) Viewed 11163 times
ADJUST FROM STANDARD

Step 01a... Find the mid point(2.75 inches) of my new book (5.5 inches)
Step 01b... If the mid point is less than 5.5 I will have to lower my camera vertically

Step 02.... I have reduced the midpoint by 2.75 inches (5.5-2.75= 2.75) I divide that by 1/2 inches (.5) (1/2 inch length or thickness = 3/4 vertical) which gives a factor of 5.5

Step 03.... Now I multiply my factor of 5.5 by the vertical adjustment of 3/4 inch (per 1/2 length or height) which totals 4.125 inches

Step 04....I take my 17 inch standard vertical and subtract my 4.125 inch adjustment which is 12.875 inches vertical

Step 05....I adjust for 1/2 inch thickness of my book from the standard (0 inches) so now I add 3/4 inch to my total from step 04 which would be 13.625 vertical.
finished.jpg
finished.jpg (18.5 KiB) Viewed 11160 times
Solution I should place my camera at 13.6 inches to get a shot with very little skew.

LENGTH..THICKNESS..CAMERA
10.........0............15.5
10.........1/2.........16.25
10.5.......1/2.........17.0
11.........0............17.0
11.........1/2.........17.75
5.5........1/2.........13.625

A golden rule of thumb: for every 1/2 inch in height (or width) raise your camera 3/4 inch vertically
.............................for every 1/2 inch in height (or width) subtracted lower your camera 3/4 inch vertically

Hope this helps. - J
Last edited by jay on 10 May 2011, 14:20, edited 6 times in total.
jay

Re: Fix Keystoning via hardware adjustments

Post by jay »

Note: There is a few inches between where my camera is mounted and the edge of the cradle. This is OK since the bracket that holds the camera extends out and covers this distance. It is not exact but its pretty close to maintaining the exact shot angle required to capture a photo without skew.
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: Fix Keystoning via hardware adjustments

Post by daniel_reetz »

This is really beautifully done. Thanks, Jay!
Rhea27

Re: Fix Keystoning via hardware adjustments

Post by Rhea27 »

Hey Jay - thanks for sharing this info! I'm going to have to print it out and study it for a while, but it's exactly what I've been wondering about...how to angle my camera for different size books I'm scanning.
spamsickle
Posts: 596
Joined: 06 Jun 2009, 23:57

Re: Fix Keystoning via hardware adjustments

Post by spamsickle »

jay wrote: Shot 01 shows how I want my camera to shoot a flat image without skew. This requires the shot angle to match the angle of the cradle
For me, this says it all. I wouldn't have the patience to do a lot of mathematical calculations before shooting each book, but I'm essentially doing the same thing you're doing.

I use tripods instead of having a camera mount built into my scanner, but the principles are the same. There are three "rotations" to consider. The Mercury astronauts called them "roll, pitch, and yaw". If you're holding a camera, roll is raising the left or right side of the camera. I don't want any roll; it would make my image appear tilted. Yaw is rotating your head from left to right. I don't want any yaw either; it would give me "left to right" keystoning. Pitch is nodding your head. I want the pitch to be 45 degrees every time, to match the angle of my cradle.

I set the head of my tripod to have a 45-degree pitch, attach the camera, and then raise or lower it just as you say until the book I'm shooting is positioned in the viewfinder. The main thing is getting the 45-degree thing right. Your camera mounts should take care of enforcing the no-roll, no-yaw, 45-degree-pitch automatically, so all you have to adjust is the zoom factor and the height to get a full-frame rectilinear image.
jay

Re: Fix Keystoning via hardware adjustments

Post by jay »

I have added some more pictures to help explain the idea. I will go back through clarify some things.
dpc
Posts: 379
Joined: 01 Apr 2011, 18:05
Number of books owned: 0
Location: Issaquah, WA

Re: Fix Keystoning via hardware adjustments

Post by dpc »

Does this mean that the camera position should be adjusted over the course of a scanning a thick book?
jay

Re: Fix Keystoning via hardware adjustments

Post by jay »

dpc wrote:Does this mean that the camera position should be adjusted over the course of a scanning a thick book?
I was just looking over this a few minutes ago. My thoughts are that you shouldn't have to do so unless the book is really thick (more than 2 inches).
If you were building a fully automated scanner I could see a reason for it.

I will be make adjustments to the guide where I drop the need to adjust for book thickness as well. When I looked at a book sitting on the scanner it seems (within reason) there should be no reason to adjust for thickness since the shot angles are maintained. Overall if you get your camera heights within 1 1/2 inches the skew could be taken care of with book scan wizard software. I think I may have been a bit over zealous with the triangles :)
jay

Re: Fix Keystoning via hardware adjustments

Post by jay »

spamsickle wrote:
jay wrote: Shot 01 shows how I want my camera to shoot a flat image without skew. This requires the shot angle to match the angle of the cradle
For me, this says it all. I wouldn't have the patience to do a lot of mathematical calculations before shooting each book, but I'm essentially doing the same thing you're doing.

I use tripods instead of having a camera mount built into my scanner, but the principles are the same. There are three "rotations" to consider. The Mercury astronauts called them "roll, pitch, and yaw". If you're holding a camera, roll is raising the left or right side of the camera. I don't want any roll; it would make my image appear tilted. Yaw is rotating your head from left to right. I don't want any yaw either; it would give me "left to right" keystoning. Pitch is nodding your head. I want the pitch to be 45 degrees every time, to match the angle of my cradle.

I set the head of my tripod to have a 45-degree pitch, attach the camera, and then raise or lower it just as you say until the book I'm shooting is positioned in the viewfinder. The main thing is getting the 45-degree thing right. Your camera mounts should take care of enforcing the no-roll, no-yaw, 45-degree-pitch automatically, so all you have to adjust is the zoom factor and the height to get a full-frame rectilinear image.
Totally true with the roll, pitch, yaw. It would be harder to line up your shot if you have stand alone camera mounts. I have seen people use a grid to mark x and y axis on their cradles. I could see grids making it much easier.
User avatar
stevede
Posts: 16
Joined: 20 Feb 2011, 22:39
E-book readers owned: IBM x-41 tablet
Number of books owned: 200
Location: British Columbia, Canada

Re: Fix Keystoning via hardware adjustments

Post by stevede »

Edit:
This is a great subject; (My post didn't belong here and I apologize for wandering off the subject.) Great work, jay.
Last edited by stevede on 14 Jul 2011, 22:11, edited 1 time in total.
Post Reply