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.
Thursday, February 28, 2013
Thursday, February 21, 2013
Week of 2/18
Implementation has begun!
The last week has been very productive on the software side of things. Over the weekend, Tyler was able to develop the main GUI design that we will be using. This includes a tabbed window where each tab is its own class as a QWidget. This was a great step in further development. On my side of things, I spent a good chunk of the week working on intrinsic calibration. I found some resources for doing this in the C++ version of opencv, including one from docs.opencv.org, that I used (while also having the opencv book open). I also followed the format we found last week for getting video from opencv to show up in the GUI. This is done by getting an image from the camera as a matrix, converting the matrix to a QImage, and setting the pixmap of a QLabel to the QImage. So we have video!
I feel we are getting close to being able to test intrinsic calibration. I have gotten it to successfully call the findChessboardCorners method; this was difficult as I was closing the video capture thread for testing, which deallocated memory, essentially making the matrix a null pointer. But I finally found the error and corrected it. So at this point, hopefully we can test the intrinsic calibration next week.
We also have spent some time both cleaning up the GUI code and further implementing our MVC architecture, which will continue to be developed as we go.
On the hardware end, Grady has been having trouble debugging the serial port as it doesn't give an error but doesn't do anything. He sent/will send an email to the board developer to try and set up a phonecall; if it is unsuccessful, we may just purchase a USB version of the board.
Next week should allow continued implementation of the intrinsic calibration and possibly allow for some extrinsic calibration coding as well. I may start coding some of the math processes soon. Also, unit testing would be good, so that may be something we discuss next week.
Overall a good week. Glad to see things rolling!
The last week has been very productive on the software side of things. Over the weekend, Tyler was able to develop the main GUI design that we will be using. This includes a tabbed window where each tab is its own class as a QWidget. This was a great step in further development. On my side of things, I spent a good chunk of the week working on intrinsic calibration. I found some resources for doing this in the C++ version of opencv, including one from docs.opencv.org, that I used (while also having the opencv book open). I also followed the format we found last week for getting video from opencv to show up in the GUI. This is done by getting an image from the camera as a matrix, converting the matrix to a QImage, and setting the pixmap of a QLabel to the QImage. So we have video!
I feel we are getting close to being able to test intrinsic calibration. I have gotten it to successfully call the findChessboardCorners method; this was difficult as I was closing the video capture thread for testing, which deallocated memory, essentially making the matrix a null pointer. But I finally found the error and corrected it. So at this point, hopefully we can test the intrinsic calibration next week.
We also have spent some time both cleaning up the GUI code and further implementing our MVC architecture, which will continue to be developed as we go.
On the hardware end, Grady has been having trouble debugging the serial port as it doesn't give an error but doesn't do anything. He sent/will send an email to the board developer to try and set up a phonecall; if it is unsuccessful, we may just purchase a USB version of the board.
Next week should allow continued implementation of the intrinsic calibration and possibly allow for some extrinsic calibration coding as well. I may start coding some of the math processes soon. Also, unit testing would be good, so that may be something we discuss next week.
Overall a good week. Glad to see things rolling!
Thursday, February 14, 2013
Week of 2/11
Not a whole lot of progress this week. Kinda getting our feet wet with implementation. We decided to go ahead and use Qt for our GUI design. I installed Qt and the Qt add-in for VS on one of our project machines. We then rebuilt the solution as a Qt application. However, we wanted to keep an MVC architecture, and with the tabbed window of our GUI (using QtTabWidget), we wanted to separate the tabs into classes. Tyler looked into it and found a way to do it, but it requires hand-coding rather than using a GUI designer. We decided that this would be the approach we would take.
I have been working on some early implementation of the calibration methods, slowed by not being very fluent in C++. I ran into circular dependency, but did find a workaround using forward class declaration. We found code for doing the camera calibration using C++ online rather than in the C implementation of OpenCV but wanted to confirm using it with Dr. Wolff. Either way we would basically be copying the fundamentals, but the whole process is provided by the LearningOpenCV book. The C++ will be much cleaner, especially as we don't have to allocate space for pointers but can rather add to vectors. [Unfortunately the updated LearningOpenCV book won't be available until June].
Grady has been working on the motor process. He had some hangups with getting it spinning again but went to some old code and resolved the issue. He also has run into a COM1 error for the parallel port, but since it doesn't cause any errors, it may be difficult to troubleshoot.
Tyler is planning on doing the main GUI design in Qt this weekend. Hopefully next week we can continue the intrinsic calibration process and hookup the views so we can more easily determine what we can code (it is more difficult when you don't have all the classes yet).
Also, Tyler installed Windows and VS 2010 on the third machine. This will make it easier as a whole so we all can be developing on similar stations (rather than Ubuntu or having to bring in a laptop).
We were planning on meeting with Dr. Wolff today, but by the time we finally got to his office (4:30), he was already gone. It's early in the semester and there wasn't a ton of stuff to really talk about (well, sometimes it comes about anyways and the meeting still lasts a while :)
Anyways, we will definitely plan on meeting with Dr. Wolff next Thursday and on a more regular schedule from then on.
Cheers. Happy President's Day.
I have been working on some early implementation of the calibration methods, slowed by not being very fluent in C++. I ran into circular dependency, but did find a workaround using forward class declaration. We found code for doing the camera calibration using C++ online rather than in the C implementation of OpenCV but wanted to confirm using it with Dr. Wolff. Either way we would basically be copying the fundamentals, but the whole process is provided by the LearningOpenCV book. The C++ will be much cleaner, especially as we don't have to allocate space for pointers but can rather add to vectors. [Unfortunately the updated LearningOpenCV book won't be available until June].
Grady has been working on the motor process. He had some hangups with getting it spinning again but went to some old code and resolved the issue. He also has run into a COM1 error for the parallel port, but since it doesn't cause any errors, it may be difficult to troubleshoot.
Tyler is planning on doing the main GUI design in Qt this weekend. Hopefully next week we can continue the intrinsic calibration process and hookup the views so we can more easily determine what we can code (it is more difficult when you don't have all the classes yet).
Also, Tyler installed Windows and VS 2010 on the third machine. This will make it easier as a whole so we all can be developing on similar stations (rather than Ubuntu or having to bring in a laptop).
We were planning on meeting with Dr. Wolff today, but by the time we finally got to his office (4:30), he was already gone. It's early in the semester and there wasn't a ton of stuff to really talk about (well, sometimes it comes about anyways and the meeting still lasts a while :)
Anyways, we will definitely plan on meeting with Dr. Wolff next Thursday and on a more regular schedule from then on.
Cheers. Happy President's Day.
Thursday, February 7, 2013
Week of 2/4
Well, the final semester of the undergrad career has started. Fall and its project planning is past. We weren't too productive in J-Term; Grady did do some hardware research and coding and Tyler did some reading up on C++. On Monday, Tyler designed a rough GUI layout with tabs and I did some stubbing of the non-view classes (e.g. Models and Controllers).
Tyler and I met on Tuesday to go over what we did and made a few additions. We also made a new Github repo for our actual production of the project.
We met today to determine our semester meeting times and were successful in finding times that would work, allowing us to meet about 3 times during the week. So hopefully this will work out nicely.
Hopefully we can make some good progress and begin implementation; and hopefully we can pick up some of the slack for not doing much in J-Term.
Tyler and I met on Tuesday to go over what we did and made a few additions. We also made a new Github repo for our actual production of the project.
We met today to determine our semester meeting times and were successful in finding times that would work, allowing us to meet about 3 times during the week. So hopefully this will work out nicely.
Hopefully we can make some good progress and begin implementation; and hopefully we can pick up some of the slack for not doing much in J-Term.
Subscribe to:
Posts (Atom)