フィルターのクリア

Convert an image to a matrix and convert to gry scale?

2 ビュー (過去 30 日間)
Manuel
Manuel 2012 年 3 月 2 日
Hello to everyone.
I'm new of Matlab. Currently I'm working with version 2011.
My question is rather simple: I've a function taking as parameter "imagen"(which is name+extension of a RGB (colored) image).
I load the image: img1 = imread(imagen,jpeg)
Now I want do the following:
1) Convert the image to a matrix
2) Show the image
3) Convert the original image to gray scale
4) Show the new image
I looked at reference but I'm a bit confused.
Any suggestion is really appreciated. I just suppose it something like "plot"..but that's all what I understood.
Thank you in advance

採用された回答

UJJWAL
UJJWAL 2012 年 3 月 2 日
hi,
It is so simple. Probably you should refer to the technical support documentations online.
Btw the simple answers are as follows :-
a) As you imread into img1, the image is converted into a matrix and stored into img1.
b) to show the image use imshow(img1);
c) convert to grayscale by img2 = rgb2gray(img1);
d) again show the image by imshow(img2);
Hope this helps
happy to help
Ujjwal
  1 件のコメント
Manuel
Manuel 2012 年 3 月 2 日
I will try it later but it's very clear. Thank you!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeConvert Image Type についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by