Adding a Plane Model to a viewer

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

Adding a Plane Model to a viewer

mar
Hello there,
so I am still trying to build a 3d representation for buildings. I am now at the point where i figured how to seperate single clusters hopefully representing planes from the shape of the roof.
So I have extracted one cluster into a seperate point cloud, and I am trying to fit a Plane by calculating model coefficients.
The algorithm works, but if I try to add the modell to my viewer I cannot see a thing.

Here is my code: region_growing_segmentation.cpp
And here is the initial point cloud.region_growing_tutorial.pcd

Thanks a lot in advance
Reply | Threaded
Open this post in threaded view
|

Re: Adding a Plane Model to a viewer

Radu B. Rusu
Administrator
As with anything, it would be good to reduce your current snippet to something minimal that just stresses and tests the
operation that doesn't work at the moment (e.g, plane visualization). Can your code display and render a plane that is
manually set?

Cheers,
Radu.
--
http://openperception.org

On 01/21/2013 12:17 AM, mar wrote:

> Hello there,
> so I am still trying to build a 3d representation for buildings. I am now at
> the point where i figured how to seperate single clusters hopefully
> representing planes from the shape of the roof.
> So I have extracted one cluster into a seperate point cloud, and I am trying
> to fit a Plane by calculating model coefficients.
> The algorithm works, but if I try to add the modell to my viewer I cannot
> see a thing.
>
> Here is my code:  region_growing_segmentation.cpp
> <http://www.pcl-users.org/file/n4025557/region_growing_segmentation.cpp>
> And here is the initial point cloud. region_growing_tutorial.pcd
> <http://www.pcl-users.org/file/n4025557/region_growing_tutorial.pcd>
>
> Thanks a lot in advance
>
>
>
> --
> View this message in context: http://www.pcl-users.org/Adding-a-Plane-Model-to-a-viewer-tp4025557.html
> Sent from the Point Cloud Library (PCL) Users mailing list 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
mar
Reply | Threaded
Open this post in threaded view
|

Re: Adding a Plane Model to a viewer

mar
Hey, thanks for the answer.
Yes, if I set the coefficients manually (for instance 0,1,0,0) I can see a white and small plane (with a size of 1 I think?) at the coordinate origin. So at this point I figure that 1 is the standard size for planes, which is probably just not visible in my initial point cloud (which has values around 2000). Any idea on how to change this standard size?

I have however, managed to build a convex hull with the help of the tutorial which looks fine to me.


So as I am quite sure now that the ransac model is fine, I want to continue with infinite planes to calculate the intersection lines of the roof etc. Is there a way to change the standard size of the planes in the viewer?

Thanks a lot!
Reply | Threaded
Open this post in threaded view
|

Re: Adding a Plane Model to a viewer

Radu B. Rusu
Administrator
I believe we use a simple vtkPlaneSource object, so you could try parameterizing that, or go directly to VTK code.

Cheers,
Radu.
--
http://openperception.org

On 01/21/2013 10:44 AM, mar wrote:

> Hey, thanks for the answer.
> Yes, if I set the coefficients manually (for instance 0,1,0,0) I can see a
> white and small plane (with a size of 1 I think?) at the coordinate origin.
> So at this point I figure that 1 is the standard size for planes, which is
> probably just not visible in my initial point cloud (which has values around
> 2000). Any idea on how to change this standard size?
>
> I have however, managed to build a convex hull with the help of the tutorial
> which looks fine to me.
> <http://www.pcl-users.org/file/n4025579/convex_hull.png>
>
> So as I am quite sure now that the ransac model is fine, I want to continue
> with infinite planes to calculate the intersection lines of the roof etc. Is
> there a way to change the standard size of the planes in the viewer?
>
> Thanks a lot!
>
>
>
> --
> View this message in context: http://www.pcl-users.org/Adding-a-Plane-Model-to-a-viewer-tp4025557p4025579.html
> Sent from the Point Cloud Library (PCL) Users mailing list 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
mar
Reply | Threaded
Open this post in threaded view
|

Re: Adding a Plane Model to a viewer

mar
I tried, but I honestly have no idea how to get the plane object. I tried to look up the addplane function in the pcl_visualizer header, but it's empty, and I don't know where else it could be defined. Also I have no idea how to go directly to VTK code.

Sorry for my ignorance, and thanks for your help!