Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import cv2
- import numpy as np
- img = cv2.imread("2.PNG",0)
- rows, cols = img.shape
- shearTst = np.zeros((rows,cols*2,0 ),np.uint64)
- if img is None:
- print('No image loaded')
- exit()
- Bx = 0.5
- By = 0.0
- x = 0
- y = 0
- r1 = 0
- c1 = 0
- #array set 3x3
- arrayset = np.array(
- [[1,Bx,0],
- [By,1,0],
- [0,0,1]])
- print(arrayset)
- for r in range (0,img.shape[0]):
- for c in range (0, img.shape[1]):
- r1 = r + c * By - x;
- c1 = r * Bx + c - y
- shearTst[r,c]
- shearTst
- print(r)
- print(c)
- print(r1)
- print(c1)
- print(img)
- print(shearTst)
- cv2.imshow('shearTst',shearTst)
- cv2.imshow('norm',img)
- cv2.waitKey(0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement