rotate_image

laserbeamsize.image_tools.rotate_image(original, x0, y0, phi)[source]

Create image rotated about specified centerpoint.

The image is rotated about a centerpoint (x0, y0) and then cropped to the original size such that the centerpoint remains in the same location.

Parameters:
  • image – the image to work with

  • x – column

  • y – row

  • phi – angle [radians]

Returns:

image – rotated 2D array with same dimensions as original