Adding text labels to opencv image

I have an image in opencv and I want to add labels to the axis. Actually, I want a similar implementation to be executed as xlabel and ylabel matlab functions. How to do this, add labels both in the x axis and in the image axis?

+4
source share
2 answers

If you have a variable label labelrow the image matrix imgand position xand y, you can do

putText(img, label, Point(x, y), FONT_HERSHEY_PLAIN, 1.0, CV_RGB(0,255,0), 2.0);

Additional options for font attributes.

+7
source

, , , , Axis putText. .

"" , !

+1

All Articles