grid-points-in-poly

grid_points_in_poly

skimage.measure.grid_points_in_poly()

Test whether points on a specified grid are inside a polygon.

For each (r, c) coordinate on a grid, i.e. (0, 0), (0, 1) etc., test whether that point lies inside a polygon.

Parameters:

shape : tuple (M, N)

Shape of the grid.

verts : (V, 2) array

Specify the V vertices of the polygon, sorted either clockwise or anti-clockwise. The first point may (but does not need to be) duplicated.

Returns:

mask : (M, N) ndarray of bool

True where the grid falls inside the polygon.

See also

points_in_poly

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

Please login to continue.