MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn moreOpportunities for recent engineering grads.

Apply Today**New to MATLAB?**

Asked by fatemeh
on 25 May 2013

Hi, I did not find anything about using hough to detect parabola in image to using maximum value accumulator. Can anyone help me or guide me. I really need it. Regards,

Answer by Image Analyst
on 25 May 2013

Accepted answer

A paper on it: http://web.eecs.utk.edu/~qi/ece472-572/reference/htparabola-jafri.PDF

The FAQ on the paper: http://matlab.wikia.com/wiki/FAQ#Can_you_program_up_the_algorithm_in_this_article_for_me_and_explain_it_to_me.3F

fatemeh
on 29 May 2013

Thanks, I have this code: function [phi,p]=houghparabola(Imbinary,centrox,centroy,pmin,pmax) vector_p=linspace(-pmax,pmax); vector_phi=linspace(0,2*pi-(2*pi/100)); Accumulator = zeros([length(vector_phi),length(vector_p)]); [y,x] = find(Imbinary);

%Voting for i = 1:length(x) for j= 1:length(vector_phi) Y=y(i)-centroy; X=x(i)-centrox; angulo=vector_phi(j); numerador=(Y*cos(angulo)-X*sin(angulo))^2; denominador=4*(X*cos(angulo)+Y*sin(angulo)); if denominador~=0 p=numerador/denominador;

if abs(p)>pmin&abs(p)<pmax&p~=0 indice=find(vector_p>=p); indice=indice(1); Accumulator(j,indice) = Accumulator(j,indice)+1; end end end end

% Finding local maxima in Accumulator maximo=max(max(Accumulator)); [idx_phi,idx_p]=find(Accumulator==maximo); p=vector_p(idx_p); phi=vector_phi(idx_phi);

can you tell me about use of the P and Phi for detect parabola on image. regards.

## 0 Comments