How to get Q.yml from StereoCamera.stereoCalibration

asked 2013-05-31 02:50:01 -0500

lazd gravatar image

updated 2013-05-31 02:52:14 -0500

Hi all, I recently got my stereo camera setup working and have ran StereoCamera.stereoCalibration with 20 chessboards:

import SimpleCV

stereoCam = SimpleCV.StereoCamera()
calib = stereoCam.stereoCalibration(1, 2, nboards=20, chessboard=(8, 6), gridsize=0.025, WinSize=(176, 144)) 
stereoCam.saveCalibration(calib, 'Q.yml')

This resulted in a handful of files:

Q.ymlCM1.txt
Q.ymlCM2.txt
Q.ymlD1.txt
Q.ymlD2.txt
Q.ymlE.txt
Q.ymlF.txt
Q.ymlR.txt
Q.ymlT.txt

The next step, of course, is to generate a 3D image from the stereo cameras using StereoCamera.get3dImage, which requires the reprojection matrix Q.

The examples in SimpleCV's documentation use cv.Load("Q.yml") to read in this matrix, but that, of course, doesn't work for me as I have a handful of files that start with Q.yml, but no actual Q.yml file.

@jayrambhia's pull request seems to indicate Q.yml is a YAML file containing a 4x4 matrix, so I examined all of the .txt files resulting from stereo calibration and found no 4x4 matrices. I combed the documentation and source code looking for further mention of Q.yml, but I found nothing but examples that assume the file already exists.

So the question is: How can I generate the elusive Q.yml?

edit retag flag offensive close merge delete