import cv2
import numpy as np
# Create blank card
bg = np.zeros((500,800,3), np.uint8)
bg[:,:,:] = 255,255,255
# Make a rectangle
x,y,w,h = 50,50,700,100
cv2.rectangle(bg, (x,y), (x+w,y+h), (234,234,234), cv2.FILLED)
# Put some text
org, font, scale, color, thick = (70,120), cv2.FONT_HERSHEY_SIMPLEX, 2, 0, 1
cv2.putText(bg, "Visitor's Pass", org, font, scale, color, thick)
# Put an image
lena = cv2.imread('/home/stephen/lenna.png')
x,y,w,h = 550,180,200,260
bg[y:y+h, x:x+w] = cv2.resize(lena, (w,h))
# Show image
cv2.imshow('img', bg)
cv2.waitKey()
cv2.destroyAllWindows()