Flips and image in either the horizontal or vertical direction
flip(img, direction, device, debug=None)
returns device, flipped_image
- img - image object (numpy array)
- direction - the direction you want the image flipped either 'horizontal' or 'vertical'
- device - Counter for image processing steps
- debug - None, "print", or "plot". Print = save to file, Plot = print to screen. Default = None
- Used to flip images when necessary
- Example use:
- flip image horizontally or vertically, rotate function is also available to adjust image positioning.
import plantcv as pcv # Flip Image Horizontal device, flipped= pcv.flip(img, 'horizontal', device, debug="print")
import plantcv as pcv # Flip Image Vertical device, flipped= pcv.flip(img, 'vertical', device, debug="print")