how to convert a image to matrix?

 Accepted Answer

M = imread('MyImage.png')
M is a matrix ...

3 Comments

i tried this but i want to know its dimension
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.
nice solution!

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.

Asked:

on 24 Feb 2014

Commented:

on 1 May 2020

Community Treasure Hunt

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

Start Hunting!