import cv2
import numpy as np
img=cv2.imread("anas2.jpg",0)
cv2.imshow("originl",img)
cv2.waitKey(0)
heigth,width=img.shape
sobel_x=cv2.Sobel(img,cv2.CV_64F,0,1,ksize=5)
sobel_y=cv2.Sobel(img,cv2.CV_64F,0,1,ksize=5)
cv2.imshow("originl",img)
cv2.waitKey(0)
cv2.imshow("sobel x image",sobel_x)
cv2.waitKey(0)
cv2.imshow("sobel y iamge",sobel_y)
cv2.waitKey(0)
sobel_or=cv2.bitwise_and(sobel_x,sobel_y)
cv2.imshow("sobel or image",sobel_or)
cv2.waitKey(0)
laplacian=cv2.Laplacian(img,cv2.CV_64F)
cv2.imshow("laplacian image",laplacian)
cv2.waitKey(0)
canny=cv2.Canny(img,20,280)
cv2.imshow("canny",canny)
cv2.waitKey(0)
cv2.destroyAllWindows()