Skip to content

Instantly share code, notes, and snippets.

@PeaceAndHiLight
Created January 7, 2016 15:03
Show Gist options
  • Save PeaceAndHiLight/e155b84dc1014cd5aa74 to your computer and use it in GitHub Desktop.
Save PeaceAndHiLight/e155b84dc1014cd5aa74 to your computer and use it in GitHub Desktop.
Flip Image
#coding: utf-8
import cv2
img = cv2.imread('beatles_forsale.jpg', cv2.IMREAD_COLOR)
xAxis = cv2.flip(img, 0)
yAxis = cv2.flip(img, 1)
xyAxis = cv2.flip(img, -1)
cv2.imwrite('xAxis.jpg', xAxis)
cv2.imwrite('yAxis.jpg', yAxis)
cv2.imwrite('xyAxis.jpg', xyAxis)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment