Hough ellipse in c,c#,c++, or implementation of matlab code on wiki
I am currently working on project where I need to find ellipses in image. Anyone knows code of ellipse extration in (c,c++, c#, ).It would be great help.
I wanted to translate Matlab code on wiki http://en.wikipedia.org/wiki/Hough_transform Sample MATLAB code for Xie and Ji's ellipse detection method
// edited version// // I have changed some contents here.
I tried this co开发者_JAVA百科de. I had some understanding problem with that code because there is no comment on code.
if someone has tried this code please help me to understand this piece of code
why orientation of ellipse is zero and if not why this piece of code and where orientation values are stored?
if(Alpha == 0)
//
end
%% what we want to do here.
for Count = 1:numel(X)
Para_X = ((X(Count)-Ellipse_X0(end))^2)/(Ellipse_Major(end)^2);
Para_Y = ((Y(Count)-Ellipse_Y0(end))^2)/(Ellipse_Minor(end)^2);
if (((Para_X + Para_Y)>=-2)&((Para_X + Para_Y)<=2))
Edges(X(Count),Y(Count))=0;
end
%% Thanx and regards,
Did you try the obvious - the matlab code available on the wikipedia page on the hough transform?
I've also been dealing with ellipse detection and I encountered Xie and Ji's source code on Wiki.
Based on my analysis, Xie and Ji's code only deals with 0 degree orientation... the code "evades" any detected ellipse with ALPHA!=0
And actually I'm still having a problem implementing their code, as the result is quite unsatisfying.
精彩评论