خرید بک لینک

Vote count: 0

I want to upload this file using tkinter method and read it using cv2.imread and display .But i have a problem,this is the code i am using:

wid=Tk()
def myown():
file = tkFileDialog.askopenfile(parent=wid,mode='rb',title='Choose a file')
if file != None:
   data = file.read()
   b=cv2.imread(data)
   cv2.imshow('img',b)
   cv2.waitKey(0)

   file.close()

after this,

  wid3=Button(None,text="upload it",command=myown)
  wid.mainloop

but i am getting an opencv error,the image is not being displayed by the imshow,it says size.width>0 && size.height>0

asked 3 mins ago

برچسب: نویسنده: استخدام کار تاريخ: جمعه 27 فروردين 1395 ساعت: 17:37

صفحه بندی