Skip to content

Commit 8543f13

Browse files
assignment day 3
1 parent 9265393 commit 8543f13

File tree

5 files changed

+18
-0
lines changed

5 files changed

+18
-0
lines changed

DINO.png

28.2 KB
Loading

hand.jpeg

1.96 KB
Loading

hand_contour.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import cv2
2+
img=cv2.imread('hand.jpeg')
3+
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
4+
edge = cv2.Canny(gray, 50, 140)
5+
contours, hierarchy = cv2.findContours(edge, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_NONE)
6+
print('Numbers of contours are : ', len(contours))
7+
cv2.drawContours(img, contours, -1, (0, 0, 255), 3)
8+
cv2.imshow("final",img)
9+
cv2.waitKey(0)
10+
cv2.destroyAllWindows()

live_sketcher.py

Whitespace-only changes.

outline_of_dinosaur.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import cv2
2+
img=cv2.imread("DINO.png")
3+
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
4+
gaussian = cv2.GaussianBlur(img.copy(), (7,7), 0)
5+
edge = cv2.Canny(gaussian, 90, 130)
6+
cv2.imshow("FINAL",edge)
7+
cv2.waitKey(0)
8+
cv2.destroyAllWindows()

0 commit comments

Comments
 (0)