Info
此问题已关闭。 请重新打开它进行编辑或回答。
need to extract road using dog filter but its not working properly..help me out
2 次查看(过去 30 天)
显示 更早的评论
fontSize = 10;
I = imread('a8.jpg');
grayImage = rgb2gray(I);
% numberOfColorBands should be = 1.
[rows columns numberOfColorBands] = size(grayImage);
% Display the original gray scale image.
subplot(2,2,1);
imshow(I);
title('Original Image', 'FontSize', fontSize);
subplot(2,2,2);
imshow(grayImage);
title('grayscale Image', 'FontSize', fontSize);
gaussian1 = fspecial('Gaussian', 21, 15);
gaussian2 = fspecial('Gaussian', 21, 20);
dog = gaussian1 - gaussian2;
dogFilterImage = conv2(double(grayImage), dog, 'same');
subplot(2,2,3);
imshow(dogFilterImage, []);
title('DOG Filtered Image', 'FontSize', fontSize);
bw =(dogFilterImage);
subplot(2,2,4);
imshow(bw);
0 个评论
回答(0 个)
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!