将图像表示为矩阵matlab

use*_*774 7 matlab

如何在Matlab中将图像表示为矩阵?

Jon*_*nas 13

只要将图像加载到Matlab中,就会将其表示为矩阵.例如

>> A = imread('peppers.png');
>> size(A)
ans =
   384   512     3
Run Code Online (Sandbox Code Playgroud)

A是384×512×3阵列,表示RGB图像,其中例如 A(:,:,1)是红色通道