Page 1 of 1

Getting the number of markers in a vector

Posted: Sat Dec 28, 2013 9:54 am
by itzikgili
I'm woking with the vector tracking sample project.

after the loop that iterates over the object found in the frame:

Code: Select all

 for(int i=0; i<frame->ObjectCount(); i++)
            {
                cObject *obj = frame->Object(i);
                float x = obj->X();
                float y = obj->Y();
                Core::Undistort2DPoint(lensDistortion,x,y);
                vec->PushMarkerData(x, y, obj->Area(), obj->Width(), obj->Height());
            }
when trying to get the number of markers pushed to the vector, I get 0! always.
int r= vec->MarkerCount();

r=0 always!

how come? Is there any filtering of bigger/smaller objects?
Note that if I use frame->ObjectCount() I get the number.

Re: Getting the number of markers in a vector

Posted: Tue Dec 31, 2013 10:50 am
by NaturalPoint-Dustin
Hello,

I will ask one of our software engineers to submit a response for you. You should have a reply shortly.

Regards,

Re: Getting the number of markers in a vector

Posted: Wed Jan 01, 2014 11:52 pm
by beckdo
There are some filtering rules that are being applied but they are fairly loose. What's critical is that you have passed the appropriate settings structure selecting what clip you are tracking (vector clip or the track clip pro). The fact that it's returning zero means that it's not finding a solution. What are you tracking exactly, is it located at an appropriate distance, is there significant background noise? Maybe take a screenshot showing what the cameras sees and attach it so we can see.