Insert Two Strings into Image at Different Locations
This example shows you how to insert two strings of different colors into an image at different location within the image.
Open the Simulink® model.
modelname = 'ex_blkInsertTextLocation.slx'; open_system(modelname)
This model reads an input image using an Image From File block with the File name parameter set to
The model inserts two strings into the input image at different locations by using the Insert Text block with these parameters:
Color value source —
Location source —
Specify via dialog
Location [x y] —
[300 250;100 1400]
Image signal —
One multidimensional signal
Font face —
Font size (points) —
Run the model. The model uses a Video Viewer block to display the output image with an inserted pair of bold text strings in different colors and at different locations.