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