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');

카테고리

Help CenterFile Exchange에서 Import, Export, and Conversion에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by