Supporting documentation

Post Reply
Posts: 4
Joined: Tue Jun 13, 2017 3:41 am

Supporting documentation

Post by tuskcode » Mon Jul 03, 2017 5:04 am


Is there any supporting documentation, other than the 8 text files that come with the Camera SDK?
I am finding it rather difficult to understand elements of the vector processing api. I am trying to use the Track Clip Pro with the Slim 3U camera.

I am sure that the bogus results I am obtaining in the VectorTracking application are a result of not configuring the vector processing objects properly.

Is anyone able to provide some assistance?

NaturalPoint Employee
NaturalPoint Employee
Posts: 520
Joined: Tue Jan 02, 2007 2:02 pm

Re: Supporting documentation

Post by beckdo » Thu Jul 06, 2017 9:05 pm

Hi tuskcode,

You are correct that there is limited supporting documentation for the vector tracking functionality in the Camera SDK. We've tried to demonstrate it's functionality with the Vector Tracking sample application but I would be happy to walk you through it here as well as answer questions.

OK, so the vector tracking features in the Camera SDK are split into two modules:

1. cModuleVector. This is the core vector tracking solver. It does not do any post processing on the result. This is just the very core functionality of solving the vector clip without anything else.
2. cModuleVectorProcessing. This is performs all of the post processing on the raw vector results that come out of cModuleVector.


You need to give this module two things, the settings, and 2D marker data coming from the camera. The output is simply the three 3D marker locations of the vector clip.

The settings are broken down into these three things:

1. Marker Arrangement: Vector Clip, or Track Clip Pro.
2. Distances between clip markers:

Standard Vector Clip:
Distance12 = 116.052;
Distance13 = 116.052;
Distance23 = 69.621;

Track Clip Pro:
Distance12 = 49.961;
Distance13 = 112.014;
Distance23 = 94.539;

3. Camera Intrinsic Parameters:

Slim 3U:
ImagerWidth = 3.84;
ImagerHeight = 2.88;
ImagerFocalLength = 4.44;
PrincipalX = 320;
PrincipalY = 240;
PixelWidth = 640;
PixelHeight = 480;

When you instantiate your cModuleVector, fetch it's settings before populating the settings above so that the rest of the values are meaningful.

The Vector Tracking Sample populates the above as follows:

Code: Select all

    cModuleVector *vec = cModuleVector::Create();

    Core::DistortionModel lensDistortion;

    //== Plug distortion into vector module ==--

    cVectorSettings vectorSettings;
    vectorSettings = *vec->Settings();

    vectorSettings.Arrangement = cVectorSettings::VectorClip;
    vectorSettings.Enabled     = true;

    //== Plug in focal length in (mm) by converting it from pixels -> mm

    vectorSettings.ImagerFocalLength =  (lensDistortion.HorizontalFocalLength/((float)camera->PhysicalPixelWidth()))*camera->ImagerWidth();

    vectorSettings.ImagerHeight = camera->ImagerHeight();
    vectorSettings.ImagerWidth  = camera->ImagerWidth();

    vectorSettings.PrincipalX   = camera->PhysicalPixelWidth()/2;
    vectorSettings.PrincipalY   = camera->PhysicalPixelHeight()/2;

    vectorSettings.PixelWidth   = camera->PhysicalPixelWidth();
    vectorSettings.PixelHeight  = camera->PhysicalPixelHeight();


Posts: 4
Joined: Tue Jun 13, 2017 3:41 am

Re: Supporting documentation

Post by tuskcode » Fri Jul 07, 2017 7:37 pm

hey beckdo,

Thanks for getting back to me, very much appreciated.

I've been working through the vector tracking sample. In exploring the SDK, it became apparent I for my use case I had to configure the Arrangement=TrackClipPro and the video type to PrecisionMode via the CameraLibrary::Camera::SetVideoType method.

I worked through two scenarios and got interesting result..

Scenario 1 - with the rotations of the trackclippro fixed, I moved the trackclippro horizontally across the camera FOV. I saw coupling in the yaw rotation calculated by the cModuleVectorProcessing object. Can you explain what frame of reference the rotation values are relative to, is it the orthogonal vector to the camera sensor plane?

Scenario 2 - with position, pitch and roll fixed, I yaw the trackclippro with respect to the camera. I see coupling between the real world yaw, and the yaw and pitch values calculated by the cModuleVectorProcessing. Is this because of incorrect configuration of the pivotoffset values and/or centre values? Can you provide some information on what these values are and if they need to be configured.

Look forward to your responses :)

Post Reply