How to do Edge collapse on Polyhedron_3 using user defined cost function

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

How to do Edge collapse on Polyhedron_3 using user defined cost function

Hussein
I'm coding mesh simplification using edge collapse method with two different cost functions

1. The edge length and the local curvature cost formula by Stan Melax
2. Quadratic error metric QEM by Garland & Heckbert

I finished coding the the above cost functions and associated the  edge cost value  between vertex Pi all in its connected vertices  Qj  

Next,  I pick the edge with minimum edge cost, I want to collapse  it using any CGAL method that operate on  3D Polyhedron mesh.


I consulted the CGAL Manual I see these options :

1. CGAL::Euler::edge_collapse which needs  the mesh to be converted to a boost graph ( not clear how to do that )

2.  Use Surface mesh simplification package ( but how to provide to with my own cost function)

Please advise on how to proceed with edge collapse operations ?


Best Regards to CGAL-ers

Hussein


This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email.
Reply | Threaded
Open this post in threaded view
|

Re: How to do Edge collapse on Polyhedron_3 using user defined cost function

Sebastien Loriot (GeometryFactory)
On 05/13/2015 01:14 AM, Hussein Almashouq wrote:

> I'm coding mesh simplification using edge collapse method with two
> different cost functions
>
> 1. The edge length and the local curvature cost formula by Stan Melax
> 2. Quadratic error metric QEM by Garland & Heckbert
>
> I finished coding the the above cost functions and associated the  edge
> cost value  between vertex Pi all in its connected vertices  Qj
>
> Next,  I pick the edge with minimum edge cost, I want to collapse  it
> using any CGAL method that operate on  3D Polyhedron mesh.
>
>
> I consulted the CGAL Manual I see these options :
>
> 1. CGAL::Euler::edge_collapse which needs  the mesh to be converted to a
> boost graph ( not clear how to do that )
>
This function is the low-level function that is only performing the
collapse of an edge provided by the user. That function is used
by the package Surface mesh simplification. Note that you don't have
to convert the Polyhedron to a boost graph, it's already a model of the
concept HalfedgeListGraph.

> 2.  Use Surface mesh simplification package ( but how to provide to with
> my own cost function)

You indeed should use this package that will provide the scheduling of
removal of all edges satisfying your criteria.
Have a look at [1] for an example of the syntax.
See [2] for the complete documentation with the named parameters.

Sebastien.

[1]
http://doc.cgal.org/latest/Surface_mesh_simplification/index.html#Surface_mesh_simplificationSampleCall

[2]
http://doc.cgal.org/latest/Surface_mesh_simplification/group__PkgSurfaceMeshSimplification.html#gaa2ee2366bf682576542bab5a7e47d597


>
> Please advise on how to proceed with edge collapse operations ?
>
>
> Best Regards to CGAL-ers
>
> Hussein
>
> ------------------------------------------------------------------------
> This message and its contents, including attachments are intended solely
> for the original recipient. If you are not the intended recipient or
> have received this message in error, please notify me immediately and
> delete this message from your computer system. Any unauthorized use or
> distribution is prohibited. Please consider the environment before
> printing this email.


--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Is there any method to generate an oriented bounding box

sean
In reply to this post by Hussein
Hi!
    I  noticed there is a function in the CGAL to generate an axis aligned bounding box for the point cloud, but i want a more precise methed, for example, an oriented bounding box.
    I have looked fot it in the manuals and no clues were founded.
   Thank you for  your help!

sean
Reply | Threaded
Open this post in threaded view
|

Re: Is there any method to generate an oriented bounding box

Sebastien Loriot (GeometryFactory)
On 05/17/2015 10:49 AM, [hidden email] wrote:
> Hi!
>      I  noticed there is a function in the CGAL to generate an axis
> aligned bounding box for the point cloud, but i want a more precise
> methed, for example, an oriented bounding box.
>      I have looked fot it in the manuals and no clues were founded.
>     Thank you for  your help!
>
> sean
We don't have that yet in CGAL.

Sebastien.

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Is there any method to generate an oriented bounding box

Renato
Maybe the function CGAL::min_rectangle_2 (package bounding volumes) helps to calculate an approximation to the oriented bounding box.

On Tue, May 19, 2015 at 3:20 AM, Sebastien Loriot (GeometryFactory) <[hidden email]> wrote:
On 05/17/2015 10:49 AM, [hidden email] wrote:
Hi!
     I  noticed there is a function in the CGAL to generate an axis
aligned bounding box for the point cloud, but i want a more precise
methed, for example, an oriented bounding box.
     I have looked fot it in the manuals and no clues were founded.
    Thank you for  your help!

sean
We don't have that yet in CGAL.

Sebastien.

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss





--
Renato Silveira
     Ph.D. in Computer Science
     Informatics Institute - UFRGS

     Porto Alegre - RS - Brazil

Reply | Threaded
Open this post in threaded view
|

Re: Is there any method to generate an oriented bounding box

sean
Thank you for your help!

Best Regards
Sean 
Date: 2015-05-19 14:47
Subject: Re: [cgal-discuss] Is there any method to generate an oriented bounding box
Maybe the function CGAL::min_rectangle_2 (package bounding volumes) helps to calculate an approximation to the oriented bounding box.

On Tue, May 19, 2015 at 3:20 AM, Sebastien Loriot (GeometryFactory) <[hidden email]> wrote:
On 05/17/2015 10:49 AM, [hidden email] wrote:
Hi!
     I  noticed there is a function in the CGAL to generate an axis
aligned bounding box for the point cloud, but i want a more precise
methed, for example, an oriented bounding box.
     I have looked fot it in the manuals and no clues were founded.
    Thank you for  your help!

sean
We don't have that yet in CGAL.

Sebastien.

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss





--
Renato Silveira
     Ph.D. in Computer Science
     Informatics Institute - UFRGS

     Porto Alegre - RS - Brazil

Reply | Threaded
Open this post in threaded view
|

Re: How to do Edge collapse on Polyhedron_3 using user defined cost function

Shrabani Ghosh
In reply to this post by Sebastien Loriot (GeometryFactory)
Hi Sebastien,
In that case,  can I put cost value manually? Is there any feature that
exist?

Regards
Shrabani Ghosh



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss