alternative approach of "insertObjectAnnotation" function
Mostra commenti meno recenti
Hi:
I'm doing some stock analysis, I use Matlab to plot 4 different figures and connect them together. then I would like to add a customized description.
I found in order to add the text on an image I need to buy computer vision toolbox... so come here to ask if there is any alternative approach to add cusotmized text in the figure attached.
Thanks!
Yu

Risposta accettata
Più risposte (1)
Walter Roberson
il 9 Set 2025
0 voti
insertObjectAnnotation from the Computer Vision Toolbox is used to insert text into an array, retaining full resolution of the array. The resulting array is suitable for writing out at full resolution to file using imwrite() or similar. There is no need to display the image at any point when using this function.
You can also choose to display the image and use functions such as title() and text(). These work well if your final destination is the displayed image.
However, if your final destination is writing to an image file, then using functions such as title() and text() requires that you capture plotted information using getframe . getframe() works at whatever resolution the axes were displayed at, which is typically either larger or smaller than the original image resolution. getframe() is not suited at all for retaining the original image resolution.
If you need to retain the original image resolution, then the tools of the Computer Vision Toolbox are the only supported functions.
1 Commento
Yu Li
il 9 Set 2025
Categorie
Scopri di più su Subplots in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
