Created
July 18, 2017 08:49
-
-
Save ochilab/4b310968347dc251c53fa83875e8f478 to your computer and use it in GitHub Desktop.
PILでイメージを読み込んでOpenCV形式に変換する
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
pil_image = Image.open('C:\\Users\\ochi\\temp\\lenna.jpg') | |
cv_image = cv2.cvtColor(np.array(pil_image) , cv2.COLOR_RGB2BGR) | |
cv2.imshow("cv_image",cv_image) | |
cv2.waitKey(0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment