From c399c299cc9378a0a0f37d61f2bc34389542dbb5 Mon Sep 17 00:00:00 2001 From: Marziyeh Mohammadi <marziyeh.mohammadi@fau.de> Date: Sun, 1 Jan 2023 18:21:19 +0100 Subject: [PATCH] Implement edge detector. --- ex1/code/Skeleton/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ex1/code/Skeleton/main.py b/ex1/code/Skeleton/main.py index e05872d..db9e665 100644 --- a/ex1/code/Skeleton/main.py +++ b/ex1/code/Skeleton/main.py @@ -108,7 +108,9 @@ def harrisEdges(input, response, edge_threshold=-0.01): ## ## Don't generate edges at the image border. result = input.copy() - + edges_idx = np.argwhere(response < edge_threshold) + for each_pixel in edges_idx: + result[each_pixel[0], each_pixel[1]] = (0,0, 255) return result -- GitLab