Skip to content

Commit fd68106

Browse files
committed
added hello world app
0 parents  commit fd68106

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

HelloOpenCV.py

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import cv2
2+
import sys
3+
4+
if len(sys.argv) != 2:
5+
sys.exit("Expecting a single image file argument")
6+
filename = sys.argv[1]
7+
8+
image = cv2.imread(filename)
9+
print image.shape
10+
image_small = cv2.resize(image, (800, 600))
11+
textColor = (0, 0, 255) # red
12+
cv2.putText(image_small, "Hello World!!!", (200, 200),
13+
cv2.FONT_HERSHEY_PLAIN, 3.0, textColor,
14+
thickness=4, lineType=cv2.CV_AA)
15+
cv2.imshow('Hello World GUI', image_small)
16+
cv2.waitKey()
17+
cv2.destroyAllWindows()

0 commit comments

Comments
 (0)