Create ellipse mask

tomni.make_mask.make_mask_ellipse(image_size, x1, y1, rx, ry)[source]

Create an image with an ellipse of True surrounded by False.

Parameters
  • image_size (tuple) – The size of the image (width, height).

  • x1 (int) – The x-coordinate of the center of the ellipse.

  • y1 (int) – The y-coordinate of the center of the ellipse.

  • rx (int) – The length of the radius on the x-axis of the ellipse.

  • ry (int) – The length of the radius on the y-axis of the ellipse.

Returns

An image with an ellipse represented as True values surrounded by False values.

Return type

np.ndarray

Note

  • The function uses either ‘make_small_mask_ellipse’ or ‘make_big_mask_ellipse’ based on the size of the ellipse.

  • For rotated ellipses, additional support for ‘alpha’ can be added in future updates.