Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to calculate correct font scale to fit to the image using putText

Hi,image description(/upfiles/15536799498185134.png)I want to increase the font size of the output I get using put text function,I tried randomly increasing and decreasing font scale variable but it didn't work. Anyone knows how to do this? Thank you! image description

    # show the label
cv2.putText(image, prediction, (20,30), cv2.FONT_HERSHEY_SIMPLEX, 2.0, (0,255,255), 3,8)
print("Prediction - {}".format(prediction))

# display the output image
plt.imshow( image)
plt.show()