I am using Kikko’s ofxCameraProjectorCalibration()
in an attempt to generate the camera.yml file.
I have printed the 11x8 chessboard in an A4 paper which covers most of the paper area but there is still a white stripe all around it as suggested in openCV documentation.I attached the A4 paper on a piece of table which is of brown colour (wood colour), but this is what I had laying around.
On to the 1st test and when I place the chessboard on some orientations in front of the camera, I get the error “board cannot be found”. It turns out the message comes directly from openCV library when calling findChessBoardCorners() ( found in ofxOpenCV/libs/openCV/include/opencv2/calib3d/calib3d.hpp ).
I am not sure what might be wrong with my setup. A light bulb was illuminating the test bench adequately. Have you had any experience with the chessboard calibration??
Thank you for your help!
EDIT: I attach a print screen while attempting (and failing) to do the calibration. you can find it here: http://postimg.org/image/w0k0ymgo3/
Also I should note that I have been able to run Kyle McDonalds example-calibration.
Hi, it doesn’t matter if the board is attached to something else yet you need to have a decent illumination over the board, enough to have a good contrast of the chessboard.
There is an example in ofxCv to deal with calibration/chessboards, that might help you to debug your light conditions.
It is very important that all the corners of the chessboard are seen by your camera.
do you suggest a desk lamp is not adequate for the tests?
What sort of illumination do you propose (based on what you seen in the image?) more luminous? less? should I disable the automatic setting of white balance and focus perhaps?
thank you for your help!
probably a desk lamp is not the best as it will create some sort of spotlight rather than a more homogeneous one.
There needs to be a clear contrast between the chessboard’s squares, where the withe ones tend to be white rather than a mid gray (this would mean you need more light) an black ones must tend to be black.
The thing is that algorithm performs a threshold set at a midgray in order to create a black or white image, if the illumination is not equal all over the board, ie. lighting it with a desk lamp or it is too much or to little, the thershold will not create a suitable black and white image.
The board must be on focus.
Any regular room lighting should be enough for this to work.
Which camera are you using?
the ps3eye camera.
Hmm, I have tried with different lights and even with sunlight flooding the room.
The calibrator has randomly managed to identify 2 times (at random times and once with desk light, the other with sunlight) on 2 different runs the board… but I don’t know what did I do ‘right’ nor I managed to repeat the experiment.
Are you able to detect the chessboard using the calibration or ar example that comes with ofxCv?
Hi Thanassis, Roy,
My bad, the chessboard used was not ofxCv default one but the one from Alvaro’s original implementation.
I just published on github the calibration-example data folder, including the pdf of the correct calibration board.
Sorry for the time lost!!
no problem at all! I did get to run to the camera calibration fine. I had to reduce the numBoardsFinalCamera below the numBoardsBeforeCleaning in order to manage to save the yml (otherwise the cleaning would commence and reset the boards number before we 'd get to the necessary numOfBoards to save the yml).
I am stuck at the next stage however - projector static calibration. Once the camera calibration was completed a small white window showed up next to the camera window but nothing changed… If it is anything like Alvaro’s video, I wonder why I didn’t get to see any white dots. Well for one I don’t have a projector handy and I had not connected the 2nd video output on my pc, but I still expected to ‘see’ something relevant. I’ll keep on searching on this
one last question.
squareSize paramet found in line 127 in https://github.com/kikko/ofxCvCameraProjectorCalibration/blob/master/src/ofxCvCameraProjectorCalibration.cpp is probably the size of the square? in cm? it is exactly clear from openCV documentation …
Thank you once again for the help!
Hello guys, I know its been I while since this project was released, but I am interested in using it as part of my graduation project and I was wonders if it would compile in a recently download xcode version (6.3.2 )
I was able so far to make the example-calibration.xcodeproj to compile, but I couldn’t figure out how to use it. So I downloaded the example-feature-tracker.xcodeproj, added ofxCvFeaturesTracker addon, and it is giving me a error at the testApp.cpp file. DRAW() throws me to No member named ‘draw’ in ‘ofxCv::FeaturesTrackerThreaded’
ofDrawBitmapString(getRTMatInfos(rotObjToCam, transObjToCam), 20, 500);
Is any chance any one can point me the way so I can move forward?