from cvpro import stackImages
import cv2

cap = cv2.VideoCapture(0)
while True:
    success, img = cap.read()
    imgGray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)

    imgList = [img, img, imgGray, img, imgGray]
    imgStacked = stackImages(imgList, 2, 0.5)

    cv2.imshow("stackedImg", imgStacked)
    cv2.waitKey(1)

from cvpro import stackImages
import cv2

cap = cv2.VideoCapture(0)
while True:
    success, img = cap.read()
    imgGray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)

    imgList = [img, img, imgGray, img, imgGray]
    imgStacked = stackImages(imgList, 2, 0.5)

    cv2.imshow("stackedImg", imgStacked)
    cv2.waitKey(1)
