【问题标题】:How can I convert a .YUV image to the other imge format like png and jpg in matlab?如何在 matlab 中将 .YUV 图像转换为其他图像格式,如 png 和 jpg?
【发布时间】:2016-02-03 16:20:31
【问题描述】:
  1. 如何在matlab中将YUV格式帧转成png、jpg等图片格式?
  2. png、jpg等图片格式在matlab中是如何存储的? (例如,YUV 格式是一个1*N 向量,其中包含连续帧的Y,U,V 信息:Y1,U1,V1,Y2,U2,V2,...)

【问题讨论】:

    标签: image matlab


    【解决方案1】:

    大约 1 个。

    MATLAB 中没有用于将 YUV 帧转换为普通图像的内置函数。但是有一些手工制作的资源是这样的: MathWorks website

    大约 2 个。

    在 MATLAB 中加载的图像以数组的形式呈现。 例如,我只是以两种不同的格式保存图像 - jpg 和 png。 并使用imread 加载它们:

    a1 = imread('Graph.jpg');
    a2 = imread('Graph.png');
    whos a1
    whos a2
      Name        Size                  Bytes  Class    Attributes
    
      a1        843x1114x3            2817306  uint8              
    
      Name        Size                  Bytes  Class    Attributes
    
      a2        843x1114x3            2817306  uint8   
    

    对于某些格式有一些有趣的机会:例如,您可以通过这种方式加载 PNG:[A,map,transparency] = imread('image.png')。你可以在help找到这一切。

    希望对你有帮助!

    【讨论】:

      猜你喜欢
      • 2016-04-06
      • 2011-05-16
      • 1970-01-01
      • 1970-01-01
      • 2023-03-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-01-08
      相关资源
      最近更新 更多