소스 뷰어
import cv2
from matplotlib import pyplot as plt
# 현재 소스 파일의 폴더 경로
from pathlib import Path
import os
dir = Path(os.getcwd()).resolve()
# 영상 파일 읽기
image = cv2.imread( dir.joinpath( "./img/read_color.jpg" ) )
# BGR 영상을 RGB 영사으로 변환후 출력
plt.imshow( cv2.cvtColor(image, cv2.COLOR_BGR2RGB) )
plt.show()
# BGR 영상을 RGB 영사으로 변환후 출력
plt.imshow( image[ :, :, ::-1 ] )
plt.show()
# BGR 영상으로 matplotlib 패키지로 출력
plt.imshow( image )
plt.show()