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
