資源簡介
matlab環境下改進sobel算子,在原有兩個模板的基礎上又增加了兩個方向模板
代碼片段和文件信息
>>?f=imread(‘C:\Users\Administrator\Desktop\syd.bmp‘);
>>?f=rgb2gray(f);
>>?f=im2double(f);
>>?figureimshow(f)title(‘原始圖像‘);
>>?[SFST?Threshold]?=edge(f‘sobel‘‘horizontal‘);
>>?figureimshow(SFST)title(‘?水平圖像邊緣檢測‘);
>>?[VSFAT?Threshold]=edge(f‘sobel‘‘vertical‘);
>>?figureimshow(VSFAT)title(‘垂直圖像邊緣檢測‘)
評論
共有 條評論