필터 지우기
필터 지우기

Image and data matrices

조회 수: 1 (최근 30일)
med-sweng
med-sweng 2014년 1월 1일
댓글: Wayne King 2014년 1월 1일
When I read some image in `MATLAB`, do we say that this image is also a data matrix? Or, they are two different things? If they are different, how can we convert an image to a data matrix in MATLAB?
As far as I know, an image is a matrix of pixels, isn't it?
Thanks.

답변 (2개)

Wayne King
Wayne King 2014년 1월 1일
편집: Wayne King 2014년 1월 1일
Yes, to MATLAB an image is just a matrix of values. Whether a matrix actually represents an image of course depends on the arrangement of values in the image.
For example:
X = randn(256,256);
imagesc(X); colormap gray;
is an image, but we don't recognize it as something as meaningful as opposed to (another very simple example)
X = eye(256);
Y = flipud(X);
Z = X+Y; Z(128,128) = 1;
imagesc(Z); colormap gray;
But to MATLAB, both are the same.
Now certainly, there are some data matrices which have dimension and datatype combinations that are usually found just with images. For example, if you see a MxNx3 matrix with elements that are of the datatype unit8, that is almost always an image.
  댓글 수: 2
med-sweng
med-sweng 2014년 1월 1일
Thanks for your reply. So, "data matrix = matrix"?
Wayne King
Wayne King 2014년 1월 1일
yes

댓글을 달려면 로그인하십시오.


Walter Roberson
Walter Roberson 2014년 1월 1일
Yes, an image is a matrix of pixels. Any data matrix of with appropriate dimensions can be represented as an image.

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by