Page 1 of 1

TT_LoadCalibration won't work

Posted: Mon Apr 23, 2012 8:11 am
by ngauthier
Hello,

I am having issues with a program while using the TT API.

At first, I thought the camera calibration info could be saved from the TT software and loaded back into my application using TT_LoadProject( ... ).

I then realised it was not (even thought the call returns me no error code (i get == to NPRESULT_SUCCESS ).

I then tried to replace or add (attempted both) the TT_LoadCalibration( ... ) call. I then export the calibration from the TT software too, after wanding and all the jazz, and try to load it from my app. Load Calibration always returns me an error (and I checked in debug to make sure the path and filename were fine).

Trackables and camera seem to be loaded correctly, but just can't get that calibration... Any clue why the following won't work? (don't mind the C#, its just an easy C++CLI wrapper and I get the same results from your sample in C++)
Console.WriteLine("Initializing NaturalPoint Devices");
Console.WriteLine();
TrackingTools.Initialize();

Console.WriteLine("Loading Project");
Console.WriteLine();
CheckResult(TrackingTools.LoadProject("project_v2_4.ttp"));

Console.WriteLine("Loading Trackables");
Console.WriteLine();
CheckResult(TrackingTools.LoadTrackables("trackables_v2_4.tra"));

Console.WriteLine("Loading Calibration");
Console.WriteLine();
CheckResult(TrackingTools.LoadCalibration("calib.cal"));

Console.WriteLine(String.Format("Cameras: ({0} detected)", TrackingTools.CameraCount()));
for (int i = 0; i < TrackingTools.CameraCount(); i++)
{
Console.WriteLine(String.Format("Camera {0}: {1}", i, TrackingTools.CameraName(i)));
}
Console.WriteLine();

Console.WriteLine(String.Format("Trackables: ({0} detected)", TrackingTools.TrackableCount()));
for (int i = 0; i < TrackingTools.TrackableCount(); i++)
{
Console.WriteLine(String.Format("Trackable {0}: {1}", i, TrackingTools.TrackableName(i)));
}
Console.WriteLine();
Btw, the calibration, and trackable tracking works just fine in the TT software... so I guess hardware problems are discarded)

Thanks!

Nic.

Re: TT_LoadCalibration won't work

Posted: Wed Apr 25, 2012 11:21 am
by beckdo
This should work. I'll take a look at this issue.