This week was a little busier school-wise. We met in class on Tuesday and I went to the How To Pay For Grad School meeting not long after. So we didn't do much Tuesday, although I confirmed that the findChessboardCorners cv method was working. Then Wednesday, Grady wasn't able to meet and Tyler was only able to meet for a while. I was working on implementing a little better MVC structure, but after talking with Tyler, he suggested hooking up the InputView and the TakePicView to the same contrller (a CalibrationController)--they are each related to calibration. This was a better way to do it and I went ahead and changed the structure.
Then Wednesday night I worked at home for a while, continuing work on calibration. I ran into a memory exception when calling calibrateCamera and finally went to bed. I continued debugging Thursday and finally found the issue was not filling the objectPoints vector with necessary data. What happened was the opencv examples use a switch-case statement that looked similar to:
switch(pattern):
case CHESSBOARD:
case CIRCULAR:
{code}
break;
etc.
However, a case statement with no break means it goes to the next statement, which is where they fill the objectPoints vector. This is done in one of the examples online I've looked at but not in a switch statement; I essentially ignored a very important step and misinterpreted the empty case statement.
Anyways, I corrected the error and tested calibration. I was able to perform an intrinsic calibration; I saved the data to an XML file and opened it up: there was the data! I will have to do more to make sure it makes sense and looks correct. I plan to continue working on any remaining intrinsic calibration as well as get into more of the extrinsic process as well.
One question I have is how much error is acceptable in the calibrate method (it returns a double value of the calculated reprojection error (sum of squares between observed imagePoints and projected objectPoints). A rough intrinsic calibration of 10 boards produced an error of 1.02, but what is acceptable?
Anyways, hopefully we can have a productive week next week. Grady is going to talk to Tosh tomorrow and plans on giving Wayne a call. Otherwise, we may end up going with a USB board instead.
Until next week :)
UPDATE
Thursday night I was able to complete the core functionality of both intrinsic and extrinsic calibration, including saving to file. One thing we will figure out (it is pretty simple, just our choice) is whether to store the 3x1 Rodrigues rotation matrix and then convert it to the 3x3 when loading or just convert to 3x3 and store it that way. It doesn't really matter, just something to figure out.
No comments:
Post a Comment