We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
# coding=utf-8 import cv2 import numpy as np in_image = cv2.imread('./image/image6.jpg') h, w, ch = in_image.shape forward_rotate = np.zeros((w, h, ch)) image_flip = np.fliplr(in_image) for c in range(ch): for row in range(h): forward_rotate[:, row, c] = image_flip[row, :, c] reverse_rotate = np.zeros((w, h, ch)) output = np.zeros((w, h, ch)) for c in range(ch): for row in range(h): output[:, h - 1 - row, c] = in_image[row, :, c] cv2.imshow('in_image', in_image) cv2.imshow('flip_image', image_flip) cv2.imshow('forward_rotate', forward_rotate) cv2.imshow('reverse_rotate', reverse_rotate) # x86 cv2.waitKey(0) x64 cv2.waitKey(0) & 0xFF key = cv2.waitKey(0) & 0xFF if key == ord('q'): cv2.destroyAllWindows()
The text was updated successfully, but these errors were encountered:
feat(rotateImage): 新增旋转图像(#6)
9f6bf86
zibuyu1995
No branches or pull requests
The text was updated successfully, but these errors were encountered: