help for Image Edge Detection using Sobel

5 Ansichten (letzte 30 Tage)
rawan alamri
rawan alamri am 27 Mär. 2022
Kommentiert: rawan alamri am 29 Mär. 2022

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 Kommentar
rawan alamri
rawan alamri am 27 Mär. 2022
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);

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Image Analyst
Image Analyst am 27 Mär. 2022
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')

Weitere Antworten (1)

DGM
DGM am 27 Mär. 2022
Bearbeitet: DGM am 27 Mär. 2022
You actually have to supply a filename to imread(). That's just a placeholder in the code.
% for example
A = imread('peppers.png');

Community Treasure Hunt

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

Start Hunting!

Translated by