Up: Component summary Component

TextDraw

Write text on a bitmap image with a small font.

This tool uses a CSV file to place several numbers or characters on an image with a small font. If you want to place a single/few strings at the same location on several figures, see the ImageMagick component test case 9 "text annotation".

Version 1.1
Bundle anima
Categories Image Processing
Authors Ville Rantanen (ville.rantanen@helsinki.fi)
Issue tracker View/Report issues
Requires Matlab
Source files component.xml execute.m
Usage Example with default values

Inputs

Name Type Mandatory Description
images ImageList Mandatory A directory with image files to write on.
text CSV Mandatory Table with coordinates and the text to write.
names ImageList Optional A directory with original image files (Used if the fileCol does not exactly match the file names).

Outputs

Name Type Description
out ImageList Images with the text.

Parameters

Name Type Default Description
fileCol string "File" Column name for separating files.
font string "calculator" Font to use. Either "calculator" or "phone".
format string "%s" Number format for values. Use only if values are numeric.
invert boolean false Invert the colors (black text on white background).
scale float 1 Scaling factor to increase font size.
scaleMethod string "nearest" Scaling interpolation method. Choose from: nearest, bilinear, bicubic.
textOnly boolean false Write only the text on black background in the result images. (image size is taken from the original)
valueCol string "" Column name for text values. If the column is not found, this string is used as the value instead.
xCol string "X" Column name for x coordinate.
xOffset float 0 Offset for x coordinate
yCol string "Y" Column name for y coordinate.
yOffset float 0 Offset for y coordinate

Test cases

Test case Parameters IN
images
IN
text
IN
names
OUT
out
case1 properties images text (missing) out

valueCol=Area,
textOnly=false,
xOffset=-10

case2_dot_at_coordinate properties images text (missing) out

valueCol=.,
textOnly=false,
xOffset=-1,
yOffset=-4

case3_font properties images text (missing) out

valueCol=RowId,
textOnly=false,
xOffset=-30,
font=phone


Generated 2019-02-08 07:42:07 by Anduril 2.0.0