In [21]:
%matplotlib inline
import cv2
import matplotlib.pyplot as plt
In [27]:
bgr = cv2.imread("image077.png")
rgb = cv2.cvtColor(bgr, cv2.COLOR_BGR2RGB)
plt.imshow(rgb)
Out[27]:
In [23]:
laplacian = cv2.Laplacian(bgr,cv2.CV_64F)
sobelx = cv2.Sobel(bgr,cv2.CV_64F,1,0,ksize=5)
sobely = cv2.Sobel(bgr,cv2.CV_64F,0,1,ksize=5)
In [24]:
plt.imshow(sobelx, cmap='gray')
Out[24]:
In [25]:
edges = cv2.Canny(bgr,100,200)
In [26]:
plt.imshow(edges, cmap='gray')
Out[26]:
In [ ]: