How to adjust resolution in Hough transform?
Afficher commentaires plus anciens
I'm trying to interpret potential linear trends in a map op volcanic centers using the Hough transform. Attached is the image used with hough lines on it. As you can see, the lines are only very short. How do I change the sensitivity so that more points are considered in the transform?
Code used:
RGB = imread('NVP_WP_ONLY.tif');
I = rgb2gray(RGB);
BW = edge(I,'canny');
[H,T,R] = hough(BW);
subplot(2,1,1);
imshow(RGB);
title('Newer Volcanic Province Eruption Points');
subplot(2,1,2);
imshow(imadjust(mat2gray(H)), 'XData',T,'YData',R,'InitialMagnification','fit');
title('Hough transform eruption points all Default settings');
xlabel('\theta'),ylabel('\rho');
axis on, axis normal, hold on;
colormap(hot)
P = houghpeaks(H,100);
imshow(H,[], 'XData',T,'YData',R,'InitialMagnification','fit');
xlabel('\theta'),ylabel('\rho');
axis on, axis normal, hold on;
plot(T(P(:,2)),R(P(:,1)),'s','color','white');
lines = houghlines(BW,T,R,P);
figure, imshow(RGB), hold on; %expect a figure size warning
max_len = 0;
for k = 1:length(lines) xy = [lines(k).point1; lines(k).point2];
plot(xy(:,1),xy(:,2),'LineWidth',2,'Color','green');
end
4 commentaires
Walter Roberson
le 15 Sep 2015
We might need NVP_WP_ONLY.tif as well.
Korien Oostingh
le 16 Sep 2015
Walter Roberson
le 16 Sep 2015
It did not seem to get attached. Remember to click on "Attach File" after you select the file.
Korien Oostingh
le 16 Sep 2015
Réponses (1)
Walter Roberson
le 19 Sep 2015
0 votes
Perhaps in your hough() call you need to adjust your RhoResolution or ThetaResolution?
1 commentaire
Korien Oostingh
le 13 Oct 2015
Catégories
En savoir plus sur Error Detection and Correction dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!