[b20d48]: / read_write.py

Download this file

16 lines (14 with data), 582 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
#%% #this line is for VSCode editor only
import cv2
#from skimage.measure import compare_ssim
import argparse
import imutils
import numpy as np
import matplotlib.pyplot as plt
#change the path as per you configuration
img = cv2.imread(r'C:\\Users\Arnab Sinha\Documents\\GitHub\\Kidney-Stone-Detection-IP\\images\\image1.jpg',1)
sobely = cv2.Sobel(img, cv2.CV_64F, 0, 1, ksize=5)
#sobelx = cv2.Sobel(img, cv2.CV_64F, 1, 0, ksize=5)
#laplacian = cv2.Laplacian(img,cv2.CV_64F)
plt.subplot(111), plt.imshow(sobely, cmap='gray')
plt.title('Sobel X'), plt.xticks([]), plt.yticks([])