how to load a downloaded image doesn't present in my computer into MATLAB, I mean how to down load from other sources, and how to convert into grayscale.

1 回表示 (過去 30 日間)
Ahmed
Ahmed 2024 年 10 月 8 日
編集済み: Sameer 2024 年 10 月 8 日
how to load a downloaded image doesn't present in my computer into MATLAB, I mean how to down load from other sources, and how to convert into grayscale.

回答 (1 件)

Sameer
Sameer 2024 年 10 月 8 日
編集済み: Sameer 2024 年 10 月 8 日
Hi Ahmed
To load an image from an online source into MATLAB and convert it to grayscale, you can follow these steps:
1. Read the Image from an Online Source:
url = 'https://example.com/path/to/image.jpg';
% Read the image from the URL
img = webread(url);
% Display the image
imshow(img);
title('Original Image');
2. Convert the Image to Grayscale:
grayImg = rgb2gray(img);
figure;
imshow(grayImg);
title('Grayscale Image');
Please refer to the below MathWorks documentation links:
Hope this helps!

カテゴリ

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