import numpy as np
import cv2
import matplotlib.pyplot as plt
import matplotlib
img = cv2.imread('flood.jpg',0)
plt.imshow(img, cmap = 'gray', interpolation = 'bicubic')
plt.xticks([]), plt.yticks([])
plt.show()
Above is my code and when I run this program Ii get
"/home/badal/Python-3.7.1/image_process/im2.py:9: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
plt.show()
After using tkagg I get
"Traceback (most recent call last):
File "/home/badal/Python-3.7.1/image_process/im2.py", line 5, in import tkinter as tk File "/usr/local/lib/python3.7/tkinter/init.py", line 36, in import _tkinter # If this fails your Python may not be configured for Tk ModuleNotFoundError: No module named '_tkinter'"
import numpy as np
import cv2
import matplotlib.pyplot as plt
import matplotlib
import tkinter as tk
matplotlib.use('tkagg')
img = cv2.imread('flood.jpg',0)
plt.imshow(img, cmap = 'gray', interpolation = 'bicubic')
plt.xticks([]), plt.yticks([])
plt.show()
I have already installed tkinter, so I don't know what to do.

image = cv2.imread('image.png'). To display it, you can docv2.imshow('image', image)withcv2.waitKey()- nathancy