MATLAB Answers

fatemeh

Hough parabola and represent it on image

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,

  0 Comments

1 Answer

Answer by Image Analyst
on 25 May 2013
 Accepted answer

  3 Comments

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.

Image Analyst
on 29 May 2013

Sorry no (see my answer above). I don't have time for that.

fatemeh
on 29 May 2013

Thanks a lot of for Previous guidance.


Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply today