Rotate

Rotates image without changing the dimensions of the image.

NOTE: The rotate_img function will be depricated in the near future, please use the rotate function as an equivalent replacement. The rotate_img function will continue to be functional and is now a wrapper for the rotate function (with crop set to True) .

rotate_img(img, rotation_deg, device,debug=None)

returns device, image after rotation

Input image

Screenshot

from plantcv import plantcv as pcv

# Rotate image
device, rotate_img = pcv.rotate_img(img, 10, device, debug='print')

Image after rotating 10 degrees

Screenshot

from plantcv import plantcv as pcv

# Rotate image
device, rotate_img = pcv.rotate_img(img, -10, device, debug='print')

Image after rotating -10 degrees

Screenshot