Message Boards Message Boards

GROUPS:

Increase font size in annotation of image using "HighlightImage"?

Posted 10 months ago
1305 Views
|
2 Replies
|
2 Total Likes
|

I have been using the "HighlightImage" function in Mathematica v12.1. How do I increase the font size of the annotation in the output image? For example, I would like to increase the font size of the words "elephant", "zebra" in the attached output image of the function "HighlightImage".

Attachment

Attachments:
POSTED BY: v m
Answer
2 Replies
Posted 10 months ago

Hi vm,

Please edit your post and add the code you used to generate the image. The moderators will likely delete your post if it does not include the code you have tried.

Here is one way

elements = 
 ImageContents[image][All, <|
   Style[Capitalize@#Concept["Name"], 18, FontFamily -> "Lucida Handwriting"] -> #BoundingBox|> &] // 
  Normal

HighlightImage[image, elements]

enter image description here

Posted 10 months ago

Thanks a bunch! your solution worked perfectly. Thank you!

POSTED BY: v m
Answer
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract