摆脱 matlab EPS 导出中的插值/混叠?
我有一个使用 imagesc
创建的 2D 颜色图,并希望使用以下命令将其导出为 .eps
文件 打印-depsc
。
问题在于“原始”图像数据来自相当小的矩阵(131 x 131)。当我在 matlab 图形窗口中查看图像时,如果放大一点,我可以看到所有单独的像素。
然而,当我导出到 eps 时,似乎发生了一些插值或抗锯齿,因为相邻像素彼此模糊/混合。如果我导出高分辨率 tiff,则不会出现问题,但该格式不是一个选项(按照发布商的要求)。
如何在不应用插值或抗锯齿的情况下获得保留图像像素结构的 eps?
I have a 2D color-map plot created with imagesc
and want to export it as a .eps
file usingprint -depsc
.
The problem is that the "original" image data is from a rather small matrix (131 x 131). When I view the image in the matlab figure window, I can see all the individual pixels if I zoom a bit closer.
When I export to eps, however, there seems to be some interpolation or anti-aliasing going on, in that neighboring pixels get blurred/blended into each other. I don't get the problem if I export a high-resolution tiff, but that format is not an option (as demanded by a publisher).
How can I obtain an eps that preserves the pixely structure of my image without applying interpolation or anti-aliasing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
模糊实际上取决于查看器应用程序或打印机使用的渲染软件。为了始终获得良好的结果,请将图像中的每个像素设为 8x8 的相同颜色的像素块。模糊仅影响每个块边缘的像素。 8x8 块是最好的,因为它们使用 DCT 压缩(有时在 eps 文件中使用)进行压缩,不会产生令人讨厌的伪影。
The blurring actually depends on the rendering software your viewer application or printer uses. To get good results all the time, make each pixel in your image an 8x8 block of pixels of the same color. The blurring then only affects the pixels at the edge of each block. 8x8 blocks are best as they compress without nasty artifacts using DCT compression (sometimes used in eps files).
老问题,但在 Google 中排名很高,所以这是我的答案:
使用文本编辑器打开 .eps 文件,搜索“Interpolate”并将以下“true”更改为“false”。对所有 Interpolate 语句重复该步骤。
它还可能取决于您使用的查看器,但可能只是因为某些查看器忽略了“Interpolate”...
在 Matlab 中使用plot2svg 并从 Inkscape 导出到 eps 时遇到了同样的问题。
Old question, but highly ranked in Google, so here is my answer:
Open the .eps-file with a text editor, search for "Interpolate" and change the following "true" to "false". Repeat that step for all Interpolate-statements.
It might also depend on the viewer you're using, but probably just because some viewers ignore the "Interpolate"s...
Had the same problem using plot2svg in Matlab and exporting from Inkscape to eps.