how to convert a image to matrix?

7 views (last 30 days)
azar
azar on 24 Feb 2014
Commented: Simon Song on 1 May 2020
how to convert a image to matrix?

Accepted Answer

Jos (10584)
Jos (10584) on 24 Feb 2014
M = imread('MyImage.png')
M is a matrix ...
  3 Comments
Laurent
Laurent on 24 Feb 2014
size(M)
will give you the length of each dimension.
ndims(M)
gives you the number of dimensions of your image, which will probably be 2.

Sign in to comment.

More Answers (0)

Categories

Find more on Convert Image Type in Help Center and File Exchange

Tags

No tags entered yet.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!