help for Image Edge Detection using Sobel

11 ビュー (過去 30 日間)
rawan alamri
rawan alamri 2022 年 3 月 27 日
コメント済み: rawan alamri 2022 年 3 月 29 日

I wrote the code listed on this page but there was an error and I did not know the correct solution for it .
what the problem?
https://www.geeksforgeeks.org/matlab-image-edge-detection-using-sobel-operator-from-scratch/

  1 件のコメント
rawan alamri
rawan alamri 2022 年 3 月 27 日
This is what appears when the code is applied
Error using imread>get_full_filename
File "[name of input image file].[file format]" does not exist.
Error in imread (line 371)
fullname = get_full_filename(filename);

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

採用された回答

Image Analyst
Image Analyst 2022 年 3 月 27 日
Try this:
grayImage = imread('coins.png');
subplot(1, 2, 1);
imshow(grayImage, [])
%impixelinfo
title('Original Image')
edgeImage = imgradient(grayImage, 'sobel');
subplot(1, 2, 2);
imshow(edgeImage, [])
%impixelinfo
title('Sobel Image')

その他の回答 (1 件)

DGM
DGM 2022 年 3 月 27 日
編集済み: DGM 2022 年 3 月 27 日
You actually have to supply a filename to imread(). That's just a placeholder in the code.
% for example
A = imread('peppers.png');
  1 件のコメント
rawan alamri
rawan alamri 2022 年 3 月 29 日
thank you so much.

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

カテゴリ

Help Center および File ExchangeImport, Export, and Conversion についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by