フィルターのクリア

Is Correct My Solutions

1 回表示 (過去 30 日間)
Nour George
Nour George 2020 年 6 月 29 日
編集済み: Nour George 2020 年 6 月 29 日
I have this question :
1-Read an image.
2-Show that image.
3-Write the image to the disk by new name.
4-Show additional info about image.
5-How to get the size of that image.
6-What is the intensity value of the pixel located at position(4,7)?
*I solved the previous six questions, but Is the Solution is correct ?
figure
image_mat = rgb2gray(imread('Picture3.jpg')); % image_mat is simply a matrix
disp(image_mat(4, 7))
imshow(image_mat)

回答 (1 件)

Image Analyst
Image Analyst 2020 年 6 月 29 日
No. Your solution here does not do what steps 1-6 ask. For example, it did not say to convert to gray scale in any of the 6 items. For step 3 I don't see any call to imwrite(). Also, step 4 does not explain what "additional info" is but you might call dir() or imfinfo() and see what those return. For step 5, I don't see where you called the size() or dir() function, depending on what they mean by "size", which can mean dimension lengths, or bytes on disk. Step 6 is pretty vague, like what does "what" mean? Does it want you to get the intensity and store it in a variable, or just display it with disp() or fprintf(), or what does it want if the image is color - convert to grayscale or give each color channel's intensities separately?
  3 件のコメント
Image Analyst
Image Analyst 2020 年 6 月 29 日
The "show" part of step 4 is missing. You can either leave off the semicolon or use fprintf()
fprintf('The file size is %d', information);
For step 5, you might want to do this
[rows, columns, numberOfColorChannels] = size(image_mat)
Nour George
Nour George 2020 年 6 月 29 日
編集済み: Nour George 2020 年 6 月 29 日
thanks , and what about Question 6 ?
and The picture is colored, should I use rgb2gray()?

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

カテゴリ

Help Center および File ExchangeImages についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by