crop_image_to_rect
- laserbeamsize.image_tools.crop_image_to_rect(image, xc, yc, xmin, xmax, ymin, ymax)[source]
Return image cropped to specified rectangle.
- Parameters:
image – image of beam
xc – horizontal center of beam
yc – vertical center of beam
xmin – left edge (pixels)
xmax – right edge (pixels)
ymin – top edge (pixels)
ymax – bottom edge (pixels)
- Returns:
cropped_image – cropped image new_xc, new_yc: new beam center (pixels)