“Open CV Read Webcam” Respostas de código

Open CV Read Webcam

import cv2

cap = cv2.VideoCapture(0)

# Check if the webcam is opened correctly
if not cap.isOpened():
    raise IOError("Cannot open webcam")

while True:
    ret, frame = cap.read()
    frame = cv2.resize(frame, None, fx=0.5, fy=0.5, interpolation=cv2.INTER_AREA)
    cv2.imshow('Input', frame)

    c = cv2.waitKey(1)
    if c == 27:
        break

cap.release()
cv2.destroyAllWindows()
Happy Herring

Open CV Read Webcam

import cv2

cap = cv2.videoCapture(0)

#check if the webcam ic opened correctly
if not cap.isopened():
	raise IOError("Cannot open webcam")
    
while true:
	ret, frame = cap.read()
    frame = cv2.resize(frame, None, fx=0.5, fy=0.5, interpolation=cv2.INTER_AREA)
    cv2.imshow('input',frame)
	
    c = cv2.waitKey(1)
	if c ==27:
    
cap.release()
cv2..destroyAllWindows()
Manikandan Kannan

Respostas semelhantes a “Open CV Read Webcam”

Perguntas semelhantes a “Open CV Read Webcam”

Mais respostas relacionadas para “Open CV Read Webcam” em Python

Procure respostas de código populares por idioma

Procurar outros idiomas de código