Accessing PCL tracking output

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Accessing PCL tracking output

jmanring
Hi all,

Is there a way to access the cluster that the PCL tracker identifies as the closest match to the reference cloud? In the openni_tracking.cpp example, I see that tracker->getResult() returns a transformation of the reference cloud, which basically describes how the tracker thinks that the object of interest has moved relative to the reference cloud. Thus, transforming the reference cloud by this result would approximate the "found cluster" that the tracker thinks most closely matches the reference cloud. I would rather access the actual cluster that is found to be a match to the reference cloud. Is there a way to do this? Thanks for any pointers,

jmanring
Reply | Threaded
Open this post in threaded view
|

Re: Accessing PCL tracking output

jmanring
This post was updated on .
Actually, does the getParticles() function (documentation here) do what I want? It says that it returns a pointer to "a pointcloud of the particles." What are the particles? Thanks,

jmanring
Reply | Threaded
Open this post in threaded view
|

Re: Accessing PCL tracking output

Sergey
Administrator
jmanring,

Regarding your first question I think it is not possible, though I may be wrong.

Regarding the second one, a particle basically represents a single hypothesis about where the tracked object is located (i.e. simply a 6DOF pose). Particle cloud is therefore just a list of hypothesized poses.

Cheers,
Sergey
Reply | Threaded
Open this post in threaded view
|

Re: Accessing PCL tracking output

jmanring
Hi Sergey,
Thanks for the reply.

taketwo wrote
Regarding your first question I think it is not possible, though I may be wrong.
That is unfortunate. It seems like it would be useful to access the matching cluster for doing things like updating the reference cloud (by replacing the old reference cloud with the latest matching cluster that represents the object of interest). In the absence of that, is there a way to access the code of the actual tracking algorithm? i.e., how does the tracker accomplish the tracking? Perhaps I can modify it for my needs. I can't seem to find the source code for the actual tracking algorithm however.

taketwo wrote
Regarding the second one, a particle basically represents a single hypothesis about where the tracked object is located (i.e. simply a 6DOF pose). Particle cloud is therefore just a list of hypothesized poses.

Cheers,
Sergey
Thanks for that clarification. I notice that the drawParticles() function in openni_tracking.cpp accesses points in the particles and builds a point cloud out of them (which is then colored blue and displayed). Am I correct in guessing that these points are the points of the reference cloud transformed by the 6DOF pose hypothesis?

Thanks again for the reply.

jmanring

Reply | Threaded
Open this post in threaded view
|

Re: Accessing PCL tracking output

Sergey
Administrator
jmanring,

The tracking module is written exclusively with templated code, therefore all the implementations are located in *.hpp files, which reside in pcl/tracking/include/pcl/tracking/impl/ folder. The core algorithm is in particle_filter.hpp file.

Just in case you did not see, there is an article with a presentation, which might be useful: Tracking 3D objects with Point Cloud Library.

jmanring wrote
Am I correct in guessing that these points are the points of the reference cloud transformed by the 6DOF pose hypothesis?
Guess you are right.

jmanring wrote
It seems like it would be useful to access the matching cluster for doing things like updating the reference cloud.
In fact, I do not think that there exists an explicit matching cluster. The tracker calculates "coherence" of the reference cloud and the portion of the input cloud at the hypothesised location. All the points contribute to the aggregate coherence value, but there is no explicit division into "matched" and "not matched" groups. The outcome of hypothesis evaluation is just a coherence value (that is later used as a weight for the particle), not a matching cluster.

By the way, just to make it clear, I have no relation with the author of the module and have never really used it. So what I write is based solely on the examination of the source code, i.e. there is no guarantee I am telling you truth :)

Regards,
Sergey
Reply | Threaded
Open this post in threaded view
|

Re: Accessing PCL tracking output

hausmankarol@gmail.com
Hi guys,

I have been working a bit with the tracking library, so maybe I can help you a bit.

getResult() function gives you the particle that represents the transform between your reference point cloud at the beginning and the best guess where it is right now. So for the visualization purposes you first have to getReferenceCloud() , then getResult() and just transform the cloud using pcl::transformPointCloud for example.

If you wanna see how good your guess is, so how likely it is that the result is correct, you should go like :
getResult().weight and check this value.

I hope it helps.

Cheers,
Karol

On Tue, Jul 10, 2012 at 6:46 PM, taketwo <[hidden email]> wrote:
jmanring,

The tracking module is written exclusively with templated code, therefore
all the implementations are located in *.hpp files, which reside in
pcl/tracking/include/pcl/tracking/impl/ folder. The core algorithm is in
particle_filter.hpp file.

Just in case you did not see, there is an article with a presentation, which
might be useful:
http://pointclouds.org/news/tracking-3d-objects-with-point-cloud-library.html
Tracking 3D objects with Point Cloud Library .


jmanring wrote
>
> Am I correct in guessing that these points are the points of the reference
> cloud transformed by the 6DOF pose hypothesis?
>

Guess you are right.


jmanring wrote
>
> It seems like it would be useful to access the matching cluster for doing
> things like updating the reference cloud.
>

In fact, I do not think that there exists an /explicit/ matching cluster.
The tracker calculates "coherence" of the reference cloud and the portion of
the input cloud at the hypothesised location. All the points contribute to
the aggregate coherence value, but there is no explicit division into
"matched" and "not matched" groups. The outcome of hypothesis evaluation is
just a coherence value (that is later used as a weight for the particle),
not a matching cluster.

By the way, just to make it clear, I have no relation with the author of the
module and have never really used it. So what I write is based solely on the
examination of the source code, i.e. there is no guarantee I am telling you
truth :)

Regards,
Sergey


--
View this message in context: http://www.pcl-users.org/Accessing-PCL-tracking-output-tp4020103p4020121.html
Sent from the Point Cloud Library (PCL) Users mailing list archive at Nabble.com.
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users


_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users