image_output_1.png
import cv2

import matplotlib.pyplot as plt

plat1 = cv2.imread('/kaggle/input/plat-nomer/4.jpg', 50)
edges = cv2.Canny(plat1, 100, 200)
(plt.subplot(121), plt.imshow(plat1, cmap='gray'))
(plt.title('Gambar Asli'), plt.xticks([]), plt.yticks([]))
(plt.subplot(122), plt.imshow(edges, cmap='gray'))
(plt.title('Gambar Edge'), plt.xticks([]), plt.yticks([]))

plat2 = cv2.imread('/kaggle/input/plat-nomer/3.png', 50)
edges = cv2.Canny(plat2, 100, 200)
(plt.subplot(121), plt.imshow(plat2, cmap='gray'))
(plt.title('Gambar Asli'), plt.xticks([]), plt.yticks([]))
(plt.subplot(122), plt.imshow(edges, cmap='gray'))
(plt.title('Gambar Edge'), plt.xticks([]), plt.yticks([]))

plat1 = cv2.imread('/kaggle/input/plat-nomer/4.jpg')
edges = cv2.Canny(plat1, 50, 255, L2gradient=False)

plat2 = cv2.imread('/kaggle/input/plat-nomer/3.png')
edges = cv2.Canny(plat2, 50, 255, L2gradient=False)
plt.imshow(edges, cmap='gray')
plt.show()