python - How to show multiple windows simultaneously in simpleCV after cropping image in four segments -


i have write down code getting images video "vd.mpg" , cropping images in 1/4 , while calling show() method @ end showing 1 window live streaming of cropped video want make changes in given code can able visualize 1/4 part of cropped video simultaneously

from simplecv import * simplecv import virtualcamera #from pylab import * #from pylab import plot, show #from time import * vir = virtualcamera("vd.mpg", "video") while true:     previous = vir.getimage()     cropped_1 = previous.crop(0,0,320,240)     cropped_2 = previous.crop(320,0,320,240)     cropped_3 = previous.crop(0,240,320,240)     cropped_4 = previous.crop(320,240,320,240)      cropped_1.show()     cropped_2.show()     cropped_3.show()     cropped_4.show() 

please me changes should make in given code. in advance.

from simplecv import * crops = ((0,0,320,240),(320,0,320,240),(0,240,320,240),(320,240,320,240)) cam=virtualcamera('vd.mpg','video') while true:     imgs=[]     img=cam.getimage()     crop in crops:         imgs.append(img.crop(crop[0],crop[1],crop[2],crop[3]))     row1=imgs[0].sidebyside(imgs[1])     row2=imgs[2].sidebyside(imgs[3])     outputimg=row1.sidebyside(row2, 'top')     outputimg.show() 

Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -