Reputation: 113
Hi I am using open cv 2 library with python ver 2.7.6
I have written the code which basically takes a image as input
but the output shows only 1 window ... not n windows.
Can any one please tell how i can display all the split images in multiple windows simultaneously.
The code is as follows
import numpy as np
import cv2
def dr(img,direction,n):
roi=[0] * 69
r,cv,c = img.shape
print h,w,c
return(roi)
if __name__ == "__main__":
img = cv2.imread('image.jpg')
img_roi=dr(img,0,65)
cv2.waitKey(025)
cv2.destroyAllWindows()
Upvotes: 3
Views: 9038
Reputation: 113
I needed to change the window name for each different window. So I replaced
cv2.imshow('title',roi[i])
with
cv2.imshow('image %d' % (i,), roi[i])
Upvotes: 4