(image, x, y)
| 15 | from urllib.request import urlopen |
| 16 | |
| 17 | def translate(image, x, y): |
| 18 | # define the translation matrix and perform the translation |
| 19 | M = np.float32([[1, 0, x], [0, 1, y]]) |
| 20 | shifted = cv2.warpAffine(image, M, (image.shape[1], image.shape[0])) |
| 21 | |
| 22 | # return the translated image |
| 23 | return shifted |
| 24 | |
| 25 | def rotate(image, angle, center=None, scale=1.0): |
| 26 | # grab the dimensions of the image |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…