3

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()
RoY
  • 113
  • 1
  • 4
  • 14

1 Answers1

4

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])
Miki
  • 40,887
  • 13
  • 123
  • 202
RoY
  • 113
  • 1
  • 4
  • 14