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?
If you have a variable label labelrow the image matrix imgand position xand y, you can do
label
img
x
y
putText(img, label, Point(x, y), FONT_HERSHEY_PLAIN, 1.0, CV_RGB(0,255,0), 2.0);
Additional options for font attributes.
, , , , Axis putText. .
"" , !