@kaiserb1/

CV2 example

Pygame

No description

fork
loading
Files
  • main.py
  • music-books.jpg
  • nohup.out
  • PI8.jpg
  • requirements.txt
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import cv2
import numpy as np

#img = cv2.imread('music-books.jpg', cv2.IMREAD_GRAYSCALE)
img = cv2.imread('PI8.jpg', cv2.IMREAD_GRAYSCALE)


rows, cols = img.shape
M = np.float32([[1,0,100],[0,1,50]])
dst = cv2.warpAffine(img,M,(cols,rows))

cv2.imshow('img',dst)
cv2.waitKey(0)
cv2.destroyAllWindows()