corner_background

laserbeamsize.background.corner_background(image, corner_fraction=0.035)[source]

Return the mean and stdev of background in corners of image.

The mean and standard deviation are estimated using the pixels from the rectangles in the four corners. The default size of these rectangles is 0.035 or 3.5% of the full image size.

ISO 11146-3 recommends values from 2-5% for corner_fraction.

Parameters:
  • image – the image to work with

  • corner_fraction – the fractional size of corner rectangles

Returns:

corner_mean – average pixel value in corners