Page 1 of 1


Posted: Sat Feb 18, 2012 11:35 pm
by motion3d
I am working with the vector tracking sample and have few questions:

1) occasionally when i start the application there is a delay until the {if(vecprocessor->MarkerCount()>0)} loop starts. In other words, the loop {for(int i=0; iObjectCount(); i++)} always starts when the application starts but only after 10-20 seconds the vecprocessor->MarkerCount() is greater than 0. Any idea why there is a delay until the vector calculation starts?

2) is it possible to calculate the vector after capturing frame data. for example, to store in an Array the x,y (in pixles) data when capturing frames from the frame->Object(i); and only after, when frame is not captured to process the vector analysis on each element in the Array to calculate the vector x,y,z.

3) how do i convert the frame->TimeStamp() into meaningful time h:mm:ss


Re: VectorTracking

Posted: Tue Feb 21, 2012 5:22 pm
by beckdo
Hey Oren,

1) Perhaps the positioning of the vector clip is causing some difficulty solving? I'm not entirely sure why this is the case. You might want to start it from a different initial orientation or move it around a bit to get more info on this.

2) You are responsible for passing the object x,y positions from the Frame to the vector solver, so you can pass it live data from frames or you can pass it stored data from an array.

3) frame->TimeStamp() is reported in seconds.

Re: VectorTracking

Posted: Tue Feb 21, 2012 5:28 pm
by NaturalPoint - Mike
More specifically, frame->TimeStamp() reports seconds from the start of the program as a double precision floating point number for the moment the frame was processed.

Re: VectorTracking

Posted: Tue Feb 21, 2012 7:06 pm
by motion3d
Thanks mike and Doug,

1) i'll try getting during real time the frame object x,y and store it in array and only then process it via the vector procedure.

2)the reason why i asked about the frame->TimeStamp() is because i got negative values. Here is example of data that i captured. first number is the frameID and second is the timestamp i.e frameID(),timeStamp()


Re: VectorTracking

Posted: Wed Feb 22, 2012 5:17 pm
by beckdo

You're likely not getting negative values, you're just printing out the value incorrectly. Try something like this:

printf("FrameID: %d, TimeStamp: %.3fms",frame->FrameID(),frame->TimeStamp()*1000);

That'll print the FrameID as well as the time in milliseconds.

Re: VectorTracking

Posted: Fri Feb 24, 2012 8:42 pm
by motion3d
Hi Doug,

You were right with the timestamp issue. I still need to get used to C++ programming. Most time i am working with VB.NET

I also tried to store the frame object data x,y,area,width,height in an array and then after capturing 5 second of data to calculate the vector x,y,z for each frame from the stored array.

However, at the if(vecprocessor->MarkerCount()>0) line the markerCount is less then 1.
Is it possible to get an example how to calculate the vectors from data array that was captured from frame->object?