We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da26fe9 commit d278c22Copy full SHA for d278c22
Edge Detection/Edge_Detection.py
@@ -0,0 +1,21 @@
1
+'''
2
+ For using this Script you need to install OpenCV in your machine
3
+ '''
4
+#Importing openCV library
5
+import cv2 as cv
6
+
7
+#Taking path of input from the user
8
+path=input("Enter the path of uploaded image")
9
+img=cv.imread(path)
10
+img=cv.resize(img,(640,640)) #resizing the image
11
12
+#Printing the original image
13
+cv.imshow('Original',img)
14
+#Reducing the noise from the image
15
+gray=cv.cvtColor(img,cv.COLOR_RGB2GRAY)
16
17
+#Using Canny algorithm to detect the edges of the image
18
+final=cv.Canny(gray,100,200)
19
+print('Number of edges'+ '=' +str(len(final))) #printing Number of edges
20
+cv.imshow('Final',final)
21
+cv.waitKey(0)
0 commit comments