loupe.hexagon#
- loupe.hexagon(shape, radius, rotate=False)[source]#
Compute a hexagon mask.
- Parameters:
shape (array_like) – Size of output in pixels (nrows, ncols)
radius (int) – Radius of outscribing circle (which also equals the side length) in pixels.
rotate (bool) – Rotate mask so that flat sides are aligned with the Y direction instead of the default orientation which is aligned with the X direction.
- Returns:
out
- Return type:
ndarray