Adding text to a color image
SS = imaddtext(S,str,x,y,font_sz,font_style,font_color [,angle [,box]])
Input image
String to add
Offset from lower left corner, x
Offset from lower left corner, y
Font size, 0-10. Type "help graphic_fonts" for details
Font style, 0-10. Type "help graphic_fonts" for details
Font color. Type "help color_list" for details
optional real scalar, clockwise angle of string in degrees; default is 0.
optional integer scalar; if box=1 and angle=0, a box is drawn around the string; otherwise, no box is drawn.
Output image
Add text provided by the user to a color image with specified location, font size, style and color.
I1 = imread(fullpath(getIPCVpath() + "/images/measure.jpg")); I2 = imaddtext(I1,'Testing',100,100,5,6,'blue'); imshow(I2); | ![]() | ![]() |