Contour (ripplemapper.contour)#

Contour contains functions which are used to generate and manipulate contours from the image data.

ripplemapper.contour Module#

Ripplemapper contours module.

Functions#

find_contours(edges_cleaned[, level])

Find contours in the edge image and approximate them to simplify.

compute_recursive_midpoints(poly_a, poly_b, ...)

Compute midpoints between two contours recursively, addressing the shape mismatch.

extend_contour(contour, shape)

Extend the contour to the edges of the image region defined by shape.

combine_contours(contour1, contour2)

Combine two contours into one.

smooth_contour(contour[, window])

Smooth a contour by convolving with a small window.

distance_map(binary_map)

Compute the distance map of a binary image.

neighbors(node, grid_shape)

Generate neighbors for a given node.

a_star(start, goal, grid)

A simple A* algorithm for pathfinding.

get_next_node(node, dx, dy)

Get the next node coordinates by moving in the given direction.

find_boundaries(gray_image)

Find the upper and lower boundaries of the edge region.

find_bump_limits(large_changes[, current, ...])

Recursive function to find the limits of "small" bumps in the data.

smooth_bumps(contour[, max_size, std_factor])

Function to smooth out bumps in the contour data.

average_boundaries(self[, contour_a, ...])

Average the two contours to get a more accurate representation of the interface.