mcp-connect

MCP_Connect

class skimage.graph.MCP_Connect

Bases: skimage.graph._mcp.MCP

Connect source points using the distance-weighted minimum cost function.

A front is grown from each seed point simultaneously, while the origin of the front is tracked as well. When two fronts meet, create_connection() is called. This method must be overloaded to deal with the found edges in a way that is appropriate for the application.

__init__()

x.__init__(...) initializes x; see help(type(x)) for signature

create_connection()

create_connection id1, id2, pos1, pos2, cost1, cost2)

Overload this method to keep track of the connections that are found during MCP processing. Note that a connection with the same ids can be found multiple times (but with different positions and costs).

At the time that this method is called, both points are “frozen” and will not be visited again by the MCP algorithm.

Parameters:

id1 : int

The seed point id where the first neighbor originated from.

id2 : int

The seed point id where the second neighbor originated from.

pos1 : tuple

The index of of the first neighbour in the connection.

pos2 : tuple

The index of of the second neighbour in the connection.

cost1 : float

The cumulative cost at pos1.

cost2 : float

The cumulative costs at pos2.

doc_scikit_image
2017-01-12 17:21:58
Comments
Leave a Comment

Please login to continue.