フィルターのクリア

how can i detect edges

2 ビュー (過去 30 日間)
Naomi Penelope
Naomi Penelope 2021 年 7 月 8 日
編集済み: DGM 2021 年 7 月 8 日
i am trying to find the edges on my image using this code
I = imread('image.tif');
imshow(I)
BW1 = edge(I, 'Canny');
BW2 = edge(I, 'Prewitt');
imshowpair(BW1, BW2, 'montage')
but i get the following error
Execution of script edge as a function is not supported:
/Users/betty/Documents/MATLAB/edge.m
Error in edge (line 3)
BW1 = edge(I, 'Canny');
please help

回答 (1 件)

DGM
DGM 2021 年 7 月 8 日
編集済み: DGM 2021 年 7 月 8 日
You have some script labeled 'edge.m' that's overloading the function you're trying to use. Use unique names for files and variables so that doesn't happen.
which edge -all
Will list all instances of edge.m on the path. Rename the one that's causing the conflict (the one in the error message), or remove it from the path.

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by