gpt4 book ai didi

matlab - 使用 opengl 硬件渲染器导出带有颜色条的 MATLAB 冲浪图会导致损坏的 png 文件

转载 作者:太空宇宙 更新时间:2023-11-03 19:17:45 25 4
gpt4 key购买 nike

当我将带有颜色条的 2D 曲面图从 MATLAB 导出到 png 文件时,会导致损坏我使用 opengl 硬件渲染器时的图像,如下所示:

corrupted surface plot png export from MATLAB

其他一切正常。但是在我创建了一个带有颜色条的图形之后,所有我导出到 png 文件的其他曲面图已损坏,即使它们不包含任何颜色条。

MATLAB 中的

opengl info 提供以下输出:

    Version         = 3.0 Mesa 10.1.0
Vendor = Intel Open Source Technology Center
Renderer = Mesa DRI Intel(R) Haswell Desktop
MaxTextureSize = 8192
Visual = 0x20 (TrueColor, depth 24, RGB mask 0xff0000 0xff00 0x00ff)
Software = false
# of Extensions = 190

Driver Bug Workarounds:
OpenGLBitmapZbufferBug = 0
OpenGLWobbleTesselatorBug = 0
OpenGLLineSmoothingBug = 0
OpenGLClippedImageBug = 0
OpenGLEraseModeBug = 0

我尝试了所有这些 OpenGL 解决方法,但没有任何帮助。

有人知道如何解决这个问题吗?

我的系统:

  • 内核:3.13.0-24-通用 64 位
  • 处理器:Intel Haswell i7 4770K
  • 显卡:Intel HD 4000
  • MATLAB 版本:R2013b

在我同事的电脑上,完全一样,但有不同的操作系统 (debian wheezy),这个问题没有出现。在他的计算机上 opengl info 给出:

    Version         = 2.1 Mesa 8.0.5
Vendor = VMware, Inc.
Renderer = Gallium 0.4 on llvmpipe (LLVM 0x209)
MaxTextureSize = 4096
Visual = 0xfc (TrueColor, depth 24, RGB mask 0xff0000 0xff00 0x00ff)
Software = false
# of Extensions = 143

Driver Bug Workarounds:
OpenGLBitmapZbufferBug = 0
OpenGLWobbleTesselatorBug = 0
OpenGLLineSmoothingBug = 0
OpenGLClippedImageBug = 0
OpenGLEraseModeBug = 0

在他的例子中它能起作用是因为 Gallium/llvmpipe 实际上是一个软件渲染器?

colorbar 有什么问题?

最佳答案

不幸的是,MATLAB 在标准化方面并不出色,色图的问题是当保存或不使用 MATLAB 以外的其他东西时,编码图像不会保存或生成以便于其他应用程序使用,因为MATLAB 仅针对 MATLAB 应用程序优化映射,如果我确实找到了可以帮助您的示例,我会编辑我的答案,但我希望这对您的问题有所帮助。

否则它的 matlabs 错误并且不能正确保存图像。

关于matlab - 使用 opengl 硬件渲染器导出带有颜色条的 MATLAB 冲浪图会导致损坏的 png 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23541073/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com