Calibration - maphew/SARndbox GitHub Wiki
Notes from calibration video, circa Oct 2015. Meant as a quick reference only, assumes you've already watched the video. The steps in the video differ from the README.
Calibrate Kinect
Measure what the Kinect reports it sees, and write out 3D extents to box layout file.
-
Mount camera, run
RawKinectViewer
and align so it covers sandbox area as best possible. -
lay piece of cardboard over box to create uniform flat surface
-
In viewer zoom (mouse wheel) and pan (Z) so sandbox fills window
-
Press
1
, keep holding key down and R-mouse >> Extract Planes, let go1
-
R-mouse >> Average Frames. Display will stop jittering.
-
Postion cursor at top left of flat area (precision not needed). Press and hold
1
, drag mouse to bottom right corner, let go1
. -
Deselect Average Frames, remove cardboard.
-
For
2
assign R-Mouse >> Measure 3D Positions. -
R-mouse >> Average Frames
-
For each corner zoom in tightly and capture position with
2
, don't get the wall. Results print to shell window. Order: Lower left, lower right, upper left, upper right -
From shell window copy the Camera-space plane equation line and the 4 lines of corner coordinates.
-
Edit or create
etc/SARndbox-1.6/BoxLayout.txt
and paste coordinates. First line needs reformatting (strip text and replace=
with,
). Last number in first line is "sea level" in cm from camera, lower it 10-15cm since the number reported is for the cardboard. Adjust later at will.
Old:
Camera-space plane equation: x * (0.00404072, 0.103449, 0.994627) = -85.1394
( -43.192, -29.0281, -89.6239)
( 45.7475, -27.3534, -91.3072)
( -44.696, 36.1103, -96.9365)
( 44.8658, 37.8738, -95.8607)
New:
(0.00404072, 0.103449, 0.994627), -85.1394
( -43.192, -29.0281, -89.6239)
( 45.7475, -27.3534, -91.3072)
( -44.696, 36.1103, -96.9365)
( 44.8658, 37.8738, -95.8607)
Align Topography
Measure what the projector displays relative to what Kinect sees. The tool saves the correction matrix automatically.
Run CalibrateProjector -s 1280 800
(replace numbers with native pixel resolution of your projector).
- Move Calibrate window into the projector display and maximize
- To key
=
assign R-mouse >> Capture, and-
to Capture Background - Align centre of alignment disc with the white cross-hair and press
=
. Projected circle must be green, but it doesn't have to be anywhere near the cross-hair. - The cross-hair will move, align disc and capture point again with
=
. Repeat 5 or 6 times, until in the middle of the box.- Dig a sizable hole in the sand, until the bottom is exposed. Clear all objects and press
-
to extract background plane.
- Dig a sizable hole in the sand, until the bottom is exposed. Clear all objects and press
- Continue aligning disk with white cross-hairs until red cross-hair appears (about 6 more times).
The red cross-hairs show how close the alignment results are. Move the disc all over the sandbox work area, seeing how close the alignment is. Within 3mm is acceptable, 0 is perfect (and unlikely ;-).