spatial filtering on image

1 回表示 (過去 30 日間)
Ali
Ali 2014 年 10 月 20 日
回答済み: Mann Baidi 2023 年 12 月 6 日
load the image and apply prewitt filter and sobel filter

回答 (1 件)

Mann Baidi
Mann Baidi 2023 年 12 月 6 日
Hi Ali,
I understand you would like to apply Sobel” and "Prewitt” filter on an image. I would suggest you use the “edge” function in MATLAB. For using the function, you will require the Image Processing Toolbox.
I = imread('coins.png');
BW1 = edge(I,"sobel");
BW2 = edge(I,'prewitt');
tiledlayout(1,2)
nexttile
imshow(BW1)
title('Sobel Filter')
nexttile
imshow(BW2)
title('Prewitt Filter')
You can refer to the edge function documentation using the following link.
Hope this will help in resolving the issue!

カテゴリ

Help Center および File ExchangeImage Filtering and Enhancement についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by