728x90
import cv2
import numpy as np
import matplotlib.pyplot as plt
img_basic = cv2.imread('Lenna.png', cv2.IMREAD_COLOR)
cv2.imshow('Image Basic', img_basic)
cv2.waitKey()
cv2.imwrite('result1.png', img_basic)
img_gray = cv2.cvtColor(img_basic, cv2.COLOR_BGR2GRAY)
cv2.imshow('Image Gray', img_gray)
cv2.waitKey()
cv2.imwrite('result2.png', img_gray)
cv2.destroyAllWindows()
728x90
'OpenCV' 카테고리의 다른 글
[OpenCV] Python - Flip Image (1) | 2023.08.23 |
---|---|
[OpenCV] Python - ImageRead (0) | 2023.08.23 |
[OpenCV] Python Camera Read (0) | 2023.08.23 |