How to adjust resolution in Hough transform?

4 views (last 30 days)
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 Comments
Walter Roberson
Walter Roberson on 16 Sep 2015
It did not seem to get attached. Remember to click on "Attach File" after you select the file.

Sign in to comment.

Answers (1)

Walter Roberson
Walter Roberson on 19 Sep 2015
Perhaps in your hough() call you need to adjust your RhoResolution or ThetaResolution?
  1 Comment
Korien Oostingh
Korien Oostingh on 13 Oct 2015
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

Sign in to comment.

Categories

Find more on MATLAB Mobile in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!