how can i apply the sobel operator in horizontal direction?
15 ビュー (過去 30 日間)
古いコメントを表示
how can i apply the sobel operator in horizontal direction in matlab R2011a?
0 件のコメント
回答 (2 件)
Anand
2014 年 11 月 4 日
If you want the edge detected image, you can use the edge function as follows:
BW = edge(I,'sobel','vertical');
If you want just the filtered output image, you can use imfilter with a filter kernel generated by the fspecial function like so:
% generate horizontal edge emphasis kernel
h = fspecial('sobel');
% invert kernel to detect vertical edges
h = h';
J = imfilter(I,h);
0 件のコメント
Image Analyst
2014 年 11 月 4 日
What does that mean? The filter is applied in both directions - over the whole image. You can align the kernel in whatever orientation you want - not sure which orientation you call horizontal.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!