How to adjust resolution in Hough transform?

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

We might need NVP_WP_ONLY.tif as well.
Thanks for responding. Attached is the tif as .zip
It did not seem to get attached. Remember to click on "Attach File" after you select the file.
I'm very sorry. This should work.

Connectez-vous pour commenter.

Réponses (1)

Walter Roberson
Walter Roberson le 19 Sep 2015

0 votes

Perhaps in your hough() call you need to adjust your RhoResolution or ThetaResolution?

1 commentaire

Hi Walter,
thanks for your response. I've adjusted the rho and theta resolution, but I don't understand the implications of changing them. Attached is a zip folder with a bunch of figures I've created varying the rho and theta. The interpretation differs a lot. Could you please explain to me what Rho and Theta exactly do? I know their theoretical background (length and angle of line in polar coordinates), but I don't understand their implications for my data. Thanks

Connectez-vous pour commenter.

Catégories

Community Treasure Hunt

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

Start Hunting!

Translated by