box_mask#
- box_mask(shape, center, size, **kwargs)[source]#
Creates a box mask centered around the provided center point.
- Parameters:
- shapetuple of ints
Shape of the output array.
- centertuple of ints
Center point coordinates of the box.
- sizetuple of ints
Side length of the box along each axis.
- **kwargs
Forwarded to
soft_edge()(soft_edge_width,method,cutoff_sigma).
- Returns:
- NDArray
The created box mask.
- Raises:
- ValueError
If
shapeandcenterdo not have the same length. Ifcenterandheightdo not have the same length.