Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个尺寸为 128x128 的图像。我在上面应用了matlab的imread函数,A= imread(first.jpg); 但这给我返回了一个 3-D 数组 128x128x3 ,我如何将它转换为由 3 列 R、G、B (每种颜色一列)组成的 2-D 矩阵?
A = imread('first.jpg'); Npixels = size(A,1)*size(A,2); newA = reshape(A,[Npixels,3]);