aboutsummaryrefslogtreecommitdiff
path: root/python/python3-opencv/ocv-test.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/python3-opencv/ocv-test.py')
-rwxr-xr-xpython/python3-opencv/ocv-test.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/python/python3-opencv/ocv-test.py b/python/python3-opencv/ocv-test.py
new file mode 100755
index 0000000000..39748c9d1f
--- /dev/null
+++ b/python/python3-opencv/ocv-test.py
@@ -0,0 +1,13 @@
+#!/usr/bin/python3
+
+import cv2
+
+#read image
+img = cv2.imread('/usr/share/wallpapers/Next/contents/images/360x720.png')
+
+#show image
+cv2.imshow('Example - Show image in window',img)
+
+cv2.waitKey(0) # waits until a key is pressed
+cv2.destroyAllWindows() # destroys the window showing image
+