summaryrefslogtreecommitdiff
path: root/conv-images.jl
diff options
context:
space:
mode:
Diffstat (limited to 'conv-images.jl')
-rw-r--r--conv-images.jl11
1 files changed, 11 insertions, 0 deletions
diff --git a/conv-images.jl b/conv-images.jl
new file mode 100644
index 0000000..17ba27a
--- /dev/null
+++ b/conv-images.jl
@@ -0,0 +1,11 @@
+using Images, ImageFiltering, FileIO, ImageView
+
+img_gray = load("./cameraman.png") .|> Gray
+
+imshow(img_gray)
+
+kernel = [1 0 -1; 2 0 -2; 1 0 -1]
+
+conv_result = imfilter(img_gray, reflect(centered(kernel)))
+
+imshow(conv_result)