star_graph¶
-
menpo.shape.
star_graph
(shape, root_vertex, graph_cls=<class 'menpo.shape.graph.PointTree'>)[source]¶ Returns a star graph given the landmarks configuration of a shape instance.
- Parameters
shape (
PointCloud
or subclass) – The shape instance that defines the landmarks configuration based on which the graph will be created.root_vertex (int) – The root of the star tree.
graph_cls (Graph or PointGraph subclass) –
The output graph type. Possible options are
{:map:`UndirectedGraph`, :map:`DirectedGraph`, :map:`Tree`, :map:`PointUndirectedGraph`, :map:`PointDirectedGraph`, :map:`PointTree`}
- Returns
graph (Graph or PointGraph subclass) – The generated graph.
- Raises
ValueError – graph_cls must be UndirectedGraph, DirectedGraph, Tree, PointUndirectedGraph, PointDirectedGraph or PointTree.