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 (numpy.ndarray) – N x 2 array which defines all points at the edge of a polygon.

Returns:

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