Skip to content

robbeofficial/KinectCalib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

estimates camera matrix, lens distortion coefficients of IR and RGB camera
as well as extrinsic stereo calibration including rotation and translation 
between sensor and essential- plus fundamental matrix.

requires openCV 2.1

uses a planar b/w chessboard pattern as calibration object. you can simply
print one your and and glue it onto a paperboard to improve the results.
just be sure to adjust the following constants in the code:
patternSize, patternTileWidth, patternTileWidth

depth image acquistion is not used for the calibration! only raw IR and
RGB images are used. as the structured light pattern of the IR projector
may trouble the pattern detection it is highly recommended to simply
cover the projector (leftmost lens) of the kinect. in this case you have
to provide other IR light sources. sunlight is just perfect but also some
lamps (usually not energy saving lamps) emmit a decent amount of IR light. 
you have to experiment a little bit.

there are three calibration modes: IR, RGB and stereo. in IR and RGB the
image sensors are calibrated individually. before stereo, IR and RGB 
calibration need to be finished successfully.

for pattern detection and tracking, the 16 bit IR image needs to be 
quantized down to 8 bits. use the alpha slider to optimize the brightness
of the target image!

for a successful calibration you will need to capture A LOT of views. 
i achieved some decent results with 50 views (from lots of perspectives)
of the default opencv calibration pattern (8x6 corners) for each calibration mode.

key mapping:

		'i'				switch to IR mode (calibrate IR camera)

		'r'				switch to RGB mode (calibrate RGB camera)

  	'q'				switch to stereo mode (stereo calibration)
							requires IR and RGB camera to be calibrated well!
		
		't'				toggles calibration pattern tracking mode

		SPACE			captures a view and calibrates based on all already
							captured views
		
		's'				saves calibration data (calib.xml)

		'l'				loads calibration data (calib.xml)

		'c'				checks calibration

TODOs:		

  	- determine the projection matrix: DEPTH -> RGB

Notes:
        - the reprojection error calculation appears to be wrong using opencv 2.1

About

interactive calibration tool for kinect

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published