Quantcast
Channel: How do I display multiple webcam feeds side by side using OpenCV Beta 3.0.0 and Python? - Stack Overflow
Viewing all articles
Browse latest Browse all 2

How do I display multiple webcam feeds side by side using OpenCV Beta 3.0.0 and Python?

$
0
0

I am working on a project that requires that I display 3 (and possibly more) webcam feeds side by side. To tackle this project, I am using OpenCV Beta 3.0.0 and Python 2.7.5 because I am slightly familiar with the language. Also, how do I display the video in color?

Here is my current code:

import cv2import numpy as npcapture = cv2.VideoCapture(0)capture1 = cv2.VideoCapture(1)while True:    ret, frame = capture.read()    gray = cv2.cvtColor(frame,cv2.COLOR_BGR2GRAY)    cv2.imshow("frame",gray)    if cv2.waitKey(1) & 0xFF == ord('q'):        breakcapture.release()cv2.destroyAllWindows()

Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>