Functions
jsk_recognition_utils.put_text Namespace Reference

Functions

def put_text_to_image (img, text, pos, font_path, font_size, color, background_color=None, offset_x=0, offset_y=0, loc='top')
 

Function Documentation

◆ put_text_to_image()

def jsk_recognition_utils.put_text.put_text_to_image (   img,
  text,
  pos,
  font_path,
  font_size,
  color,
  background_color = None,
  offset_x = 0,
  offset_y = 0,
  loc = 'top' 
)
Put text to image using pillow.

You can put text to an image including non-ASCII characters.

Parameters
==========
img : numpy.ndarray
    cv2 image. bgr order.
text : str
    text information.
pos : tuple(float)
    xy position of text.
font_path : str
    path to font.
font_size : int
    font size
color : tuple(int)
    text color
background_color : tuple(int) or None
    background color in text area. If this value is None, do nothing.
offset_x : float
    x position offset.
offset_y : float
    y position offset.
loc : str
    location.

Definition at line 9 of file put_text.py.



jsk_recognition_utils
Author(s):
autogenerated on Tue Jan 7 2025 04:04:52