corner_mask

laserbeamsize.masks.corner_mask(image, corner_fraction=0.035)[source]

Create boolean mask for image with corners marked as True.

Each of the four corners is a fixed percentage of the entire image.

ISO 11146-3 recommends values from 2-5% for corner_fraction the default is 0.035=3.5% of the iamge.

Parameters:
  • image – the image to work with

  • corner_fraction – the fractional size of corner rectangles

Returns:

masked_image – 2D array with True values in four corners