开发者

Represent a image as a matrix matlab

开发者 https://www.devze.com 2023-02-11 03:04 出处:网络
How can I represent an image 开发者_运维技巧as a matrix in Matlab?As soon as you\'ve loaded the image into Matlab, it is represented as a matrix. For example

How can I represent an image 开发者_运维技巧as a matrix in Matlab?


As soon as you've loaded the image into Matlab, it is represented as a matrix. For example

>> A = imread('peppers.png');
>> size(A)
ans =
   384   512     3

A is a 384-by-512-by-3 array, representing an RGB image, where e.g. A(:,:,1) is the red channel


Have a look at this question.

Basically, start with the imread function, and take it from there.


imread can read your image file as a matrix.

0

精彩评论

暂无评论...
验证码 换一张
取 消