[OpenCV] Desktop Capture 화면 캡쳐
OpenCV 2026. 2. 11. 16:16 |반응형
Python MSS 라이브러리로 화면을 캡쳐하고 OpenCV로 표시해 보자.
(더 많은 예는 여기서 확인한다)
import numpy as np
import cv2
from mss import mss
with mss() as sct:
# Part of the screen to capture
monitor = {"top": 40, "left": 0, "width": 800, "height": 640}
while True:
img = np.array(sct.grab(monitor))
cv2.imshow("img", img)
if cv2.waitKey(1) & 0xFF == ord("q"):
cv2.destroyAllWindows()
break

※ 참고
반응형
'OpenCV' 카테고리의 다른 글
| OpenCV Contour Nozzle Dripping Detection (0) | 2025.04.29 |
|---|---|
| IP Camera ONVIF Protocol (0) | 2025.03.01 |
| C and Python OpenCV Image Data Share (Memory Mapped File) (0) | 2025.02.23 |
| C# and Python OpenCV Image Data Share (Memory Mapped File) (0) | 2025.02.16 |
| OpenCV with Qt for Python(PyQt) (0) | 2025.02.09 |
