-
-
Save Praveen76/7f174a9cb7b1185e624ab30d03c572d5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def translation(img,x,y): | |
transmat=np.float([1,0,x],[0,1,y]) | |
dimension=(img.shape[1],img.shape[0]) | |
return cv.warpAffine(img,transMat,dimension) | |
img=translation(img,100,-100) | |
cv.imshow('lady',img) | |
cv.waitkey(0) | |
cv.destroyAllWindows() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment