i applyed hough transform in my image and this is the result of hough table, i must get the maxima of rho in two basic angles of theta , the one is around -65 : -60 and the other is round 30:35
How can i get them? I tried the below code about hough but the houghpeaks function returns all the maxima peaks in the hough table. I want to detect the two basic angles as you can see
[hough,theta,rho] = hough(negfillHoles,'Theta',-90:1:89,'RhoResolution',2);
lenHough=length(hough(:));
maxpeaks=lenHough; %10000;
peaks = houghpeaks(hough,maxpeaks,'threshold',20); %50
x=theta(peaks(:,2));
y=rho(peaks(:,1));
plot(x,y,'o','color','r');
I will really appreciate your help, it is a matter of life or death to find this answer for my home work