Spaces:
Running
Running
Gerold Meisinger commited on
Commit ·
f77a55c
1
Parent(s): 88f1d1e
blub
Browse files
README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
emoji: 🐠
|
| 4 |
colorFrom: indigo
|
| 5 |
colorTo: yellow
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Edge Drawing Parameter Free
|
| 3 |
emoji: 🐠
|
| 4 |
colorFrom: indigo
|
| 5 |
colorTo: yellow
|
demo.py
DELETED
|
@@ -1,18 +0,0 @@
|
|
| 1 |
-
import gradio as gr
|
| 2 |
-
import cv2
|
| 3 |
-
|
| 4 |
-
ed = cv2.ximgproc.createEdgeDrawing()
|
| 5 |
-
params = cv2.ximgproc.EdgeDrawing.Params()
|
| 6 |
-
params.PFmode = True
|
| 7 |
-
ed.setParams(params)
|
| 8 |
-
|
| 9 |
-
def edpf(image_rgb):
|
| 10 |
-
img_gray = cv2.cvtColor(image_rgb, cv2.COLOR_BGR2GRAY)
|
| 11 |
-
edges = ed.detectEdges(img_gray)
|
| 12 |
-
edge_map = ed.getEdgeImage(edges)
|
| 13 |
-
return edge_map
|
| 14 |
-
|
| 15 |
-
demo = gr.Interface(edpf, gr.Image(shape=(512, 512)), "image")
|
| 16 |
-
|
| 17 |
-
if __name__ == "__main__":
|
| 18 |
-
demo.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|