- assigned_to: nobody --> philip_lamb
I´m going nuts here. I will try to explain the
situation....
I have 2 cameras, 1 with a fish-eye distortion model
and one with hardly any distortion.
I have calibrated both cameras. When I run the
simpleLite example everything goes ok.
What I do is I get the values from the ARToolKit
matrix and write them down for both cameras.
---------------------------------
Now I am going to run the twoView example with both
cameras and each with his own camera calibration
file. My first camera is the distorted one, and the
second one is the other one. Also in that order I put
the calib_params files. So, they should their
appropriate files.
I´m going to obtain the matrix from the first camera
and I am going to draw with that camera in the screen
of the second camera. Then the cube appears as it
should when only using the first camera with
simpleLite.
----------------------------------
Everything seems ok, at least the cube appears as it
should. But now I am going to get the values in the
ARToolKit matrix and they have changed.... They are
not the same as in simpleLite...
That made me think something goes wrong with loading
the calibration files. So, I ran the simpleLite
example with the first camera but with the
calibration file of the second camera and what do I
get? I get the same values as in twoView!
But however when I obtain the values from the matrix
from the second camera in twoView they are the same
as I got them in simpleLite.
Now, the thought came to me that the calibration
files in some way are assigned wrongly.
That for the first camera it is using the calibration
for the second file. This can be the explanation for
the wrong values. But when I´m going to draw it is
using the calibration from the first camera, so that
wrong values are compensated for and finally the cube
appears ok. But if the calibration files have changed
also the values for the second matrix should have
changed, but they have not....
I don´t understand it anymore.....
------------------------------------------------
So, assuming that the order of the files has changed,
I assign the calibration file of the second camera to
the first camera, and I assign the calibration file
of the first camera to the second.
cam1 -> calibration file of second camera
cam2 -> calibration file of first camera
That gives me good values for the ARToolkit matrix of
the first camera....Strange,not?
--------------------------------------------------
Now when I draw the cube in the window of the first
camera it appears ok, in the second window it does
not....
So now when I draw the image of the second camera in
the window of the first camera I finally get what I
want. But I use this call. So I use the image from
the second camera,but the camera parameters and
context settings from the first camera(actually they
are from the second camera, because I changed the
order of the calibration files).
arglDispImage(
ARUint8 image_second_cam,
ARParam *cparam_first_cam,
1,
ARGL_CONTEXT_SETTINGS_REF
contextSettings_first_Cam);
-----------------------------------------------------
To conclude: what I think is that:
1.The order of the calibration files assigned to
cameras is not as it should be, but has changed.
2.The order of calibration parameters and context
settings is equal to the order in which you put the
calibration files.
-----------------------------------------------------
I don´t understand this and I´m completely lost.
Finally I got it to do what I want but I
don´t have an explanation for it. Anybody has some
ideas? An explanation?
I don´t want to think immediately in bugs, but could
this be one?
If you want I can provide you the calibration files I
have, matrix data and images.
joele.d@planet.nl