Spaces:
No application file
No application file
Upload 6 files
Browse files- IMG_20150605_121533.jpg +0 -0
- app.py +18 -0
- dockerfile +0 -0
- requirements.txt +1 -0
IMG_20150605_121533.jpg
ADDED
app.py
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import cv2
|
2 |
+
img= cv2.imread('IMG_20150605_121533.jpg')
|
3 |
+
|
4 |
+
grey= cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
|
5 |
+
|
6 |
+
blurr= cv2.medianBlur(grey,7)
|
7 |
+
|
8 |
+
edges= cv2.adaptiveThreshold(blurr,255,cv2.ADAPTIVE_THRESH_MEAN_C,cv2.THRESH_BINARY,5,5)
|
9 |
+
|
10 |
+
colour= cv2.bilateralFilter(img,7,250,250)
|
11 |
+
|
12 |
+
cartoon= cv2.bitwise_and(colour,colour,mask=edges)
|
13 |
+
|
14 |
+
#cv2.imshow("output1",img)
|
15 |
+
#cv2.imshow("output2",grey)
|
16 |
+
#cv2.imshow("output3",blurr)
|
17 |
+
#cv2.imshow("output4",edges)
|
18 |
+
cv2.imshow("output5",cartoon)
|
dockerfile
ADDED
File without changes
|
requirements.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
opencv
|