필터 지우기
필터 지우기

is it possible to define only the sigma value in the edge command?

조회 수: 3 (최근 30일)
Valeria Leto
Valeria Leto 2022년 3월 6일
답변: yanqi liu 2022년 3월 7일
Hi! I would like to set only the sigma value for the canny and LoG operator. Is it possible? or I must set also the threshoold? Thank you

채택된 답변

yanqi liu
yanqi liu 2022년 3월 7일
yes,sir,may be set [] and test,such as
>> im = imread('rice.png');
>> e = edge(im, 'canny', [], 0.1);
>> figure; imshow(e)
>>

추가 답변 (2개)

DGM
DGM 2022년 3월 6일
편집: DGM 2022년 3월 6일
Bear in mind that even if you were able to specify the arguments out of order, edge() will assume a default threshold value. That raises the question: do you want to let edge() automatically select the threshold, or do you want no thresholding to be performed?
If you want to simply let edge() select threshold automatically, call it with an empty vector as a placeholder:
BW = edge(I,method,[],sigma)
If on the other hand, you want no thresholding to be performed, then afaik, edge() can't do that through its supported syntaxes.
I don't know of any IPT tools that could conveniently do a canny filter set without the thresholding. Certainly, you could roll something custom with basic IPT tools like imfilter(). That said, there may be some implementations on the File Exchange.
For LoG, fspecial() can create a LoG filter of specified size and sigma. You would then apply it with imfilter().

Image Analyst
Image Analyst 2022년 3월 6일
Maybe you'd like to use imgradient().

Community Treasure Hunt

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

Start Hunting!

Translated by