cv.VideoCapture는 비디오 캡처를 위한 객체로, HTML5 <video>나 또는 비디오 파일에서 프레임을 가져오는 역할을 합니다. OpenCV의 비디오 스트림 또는 웹캠으로부터 이미지를 캡처할 때 사용됩니다.
const video = document.getElementById("camera_input");
const cap = new cv.VideoCapture(video);
const frame = new cv.Mat(video.height, video.width, cv.CV_8UC4); // RGBA 로 저장
const frameBGR = new cv.Mat(video.height, video.width, cv.CV_8UC3);
cap.read(frame); // 카메라로부터 프레임을 읽음
주요 메서드:
cv.blobFromImage() (0) | 2024.09.17 |
---|---|
new cv.CascadeClassifier() (0) | 2024.09.16 |
new cv.RectVector() (1) | 2024.09.16 |
new cv.Mat() (0) | 2024.09.16 |