OpenCV-Python 준비
OpenCV 는 실시간으로 이미지/영상 처리에 사용하는 오픈 소스 라이브러리로 Python 을 통해 사용 가능하다.
Python 에서 OpenCV 를 설치하기 위해 pip 를 사용하여 설치할 수 있다.

Python 에서 이미지 파일 읽기 테스트
아래 코드는 D: /test.png 파일을 읽어 창에 보여주는 코드이다.
import cv2
imagePath = R"D:/test.png"
def imagemain(imgPath):
print("OpenCV Test Source")
img = cv2.imread(imgPath, 1)
# Image Show
cv2.imshow("Test Image", img)
cv2.waitKey(0)
# Img Windows Destory
cv2.destroyAllWindows()
if __name__ == '__main__':
imagemain(imagePath)'IT > 영상처리' 카테고리의 다른 글
| [OpenCV] Video 읽어 보여주기 (0) | 2022.05.17 |
|---|---|
| [OpenCV] 이미지 읽기와 쓰기 (2) | 2022.05.17 |
| [Facebook] Spark AR (0) | 2022.05.17 |
| [OpenCV] 소개 (1) | 2022.05.17 |
| [Realsense] Depth Filter (2) | 2022.05.17 |