Skip to content

Instantly share code, notes, and snippets.

View Vivaldo-Roque's full-sized avatar

Vivaldo Roque (Wython) Vivaldo-Roque

View GitHub Profile
@Vivaldo-Roque
Vivaldo-Roque / center_text_on_image.py
Created February 27, 2019 00:51 — forked from xcsrz/center_text_on_image.py
Center text on an image with Python and OpenCV. Had to come up with it myself as no one was spelling this out anywhere (or google couldn't find it)
#!/usr/bin/env python
import numpy as np
import cv2
from time import sleep
# create blank image - y, x
img = np.zeros((600, 1000, 3), np.uint8)
# setup text