Complex way to get pixel-wise png from matlab figure

Problem: matlab用plot得到的图片是矢量图,但用saveas存下来就很不清楚,原本pixel-wise的分割结果,边缘处会变模糊,影响pixel的label

  1. Matlab保存figure为矢量图,格式为emf

    print 1, -dmeta, output.emf %1表示figure1

    这种方法得到的图片是矢量图,最清楚

  2. 将emf转换为png格式
    1. 可以用画图软件打开emf,再另存为为png <– 图片数量少
    2. 通过代码转化,这份代码是C++ MFC实现的,又手写了批量读文件的代码

      <<Emf2PngPrint.rar>>

—————————-

最后终于实现啦

emf 代码转png
(效果同画图另存为)
Adobe illustrator 导出结果
(类似matlab saveas)
071917_1309_Complexwayt1.png


Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s