cv2 put font on center 1

cv2 put font on center

# get coords based on boundary
textX = (img.shape[1] - textsize[0]) / 2
textY = (img.shape[0] + textsize[1]) / 2

Here is what the above code is Doing:
1. We get the size of the text we’re going to write.
2. We get the coords of the text based on the boundary.

Similar Posts