Recently there have been two problems with tkinter when writing small image software, import pictures found.
① When OpenCV read the image, the default channel is BGR format, and the format is now mainstream channel RGB format, tkinter is also true.
Before treatment:
dst=cv.cvtColor(resize_image,cv.COLOR_BGR2RGB)
After treatment:
Mainly due to reading problems in OpenCV imread, you can also use tkinter read picture.
②tkinter pictures is not the form of a matrix. So deal with it particularly troublesome, so in advance to deal with OpenCV, and then by function into tkinter format, and then displayed in the GUI.
new_image=Image.fromarray(dst)