points_in_poly

sunkit_image.utils.utils.points_in_poly(poly)[source]

Return polygon as grid of points inside polygon. Only works for polygons defined with points which are all integers.

Parameters:

poly (list or numpy.ndarray) – N x 2 list which defines all points at the edge of a polygon.

Returns:

list – N x 2 array, all points within the polygon.