sksurgeryfredmatplotlib.algorithms.fit_contour module

Fit a contour to an image

sksurgeryfredmatplotlib.algorithms.fit_contour.find_outer_contour(image, alpha=0.015, beta=10.0)[source]

Fits an active contour to the outer most edge in the image :params image: the image to fit to :params alpha: Snake length shape parameter. Higher values makes

snake contract faster (default 0.015)

Params beta

Snake smoothness shape parameter. Higher values makes snake smoother (default 10.0)

Returns

the resulting contour and the initialising contour

sksurgeryfredmatplotlib.algorithms.fit_contour.to_gray(image)[source]

converts and image to grayscale if not already done :params image: The image to convert, can be gray or rgb :returns: a grayscale version