Insert vector image ( or vector graphic ) in Simulink

8 次查看(过去 30 天)
Does someone know if it is possible to insert a vector image (.pdf or .svg) in Simulink.
I have tried with .svg but simulink converts it to a very pixelated image.
Regards,
Enrique
  2 个评论
Daniel
Daniel 2023-4-28
How are you trying to insert it? Are you just trying to paste it into Simulink for documentation purposes?
Based on my very, very perfunctory experience, it looks like Simulink converts svg's to pixellated images during the import, so the pixellation of the svg would probably (I'm guessing) depend on the pixel dimensions in the source rendering. I think you'll find the same behavior in other programs.
Enrique
Enrique 2023-4-28
I do it by means of Create Annotation > Insert Image.
Maybe is a feature that is not enabled..., is quite interesting that Simulink allows to insert LaTeX equations (Create Annotation > Equation) which at the end are also vector graphics... But do not allow to insert a .pdf or .svg image without loosing resolution directly.

请先登录,再进行评论。

回答(1 个)

Piyush Dubey
Piyush Dubey 2023-5-2
Hi,
Reproduction of the issue in the latest released version (R2022b) does not cause any pixelation of the images, there is a possibility that the source image dimension itself causes a lower resolution of the image.
Images can be directly copy pasted as well instead of creating an annotation. If the problem persists, the images can be converted to a .png or .jpeg format (is a very trivial workaround).
Function imread() can also be used to import images to the workspace. Then loaded to the Simulink canvas.
Documentation for them both is attached below:
Hope this helps!

类别

Help CenterFile Exchange 中查找有关 Computer Vision with Simulink 的更多信息

产品


版本

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by