Conic Fitting

function ConicFitting(Points)
[TotalPoints Dim] = size(Points);
UMatrix = zeros(TotalPoints,6);
UMatrix = [power(Points(:,1),2),power(Points(:,2),2),…
Points(:,1).*Points(:,2),Points(:,1),Points(:,2),ones(TotalPoints,1)];
[EigenVectors,EigenValues] = eig(UMatrix’*UMatrix);
[MinEigenValue,MinIndex] = min(diag(EigenValues));
Soln = EigenVectors(:,MinIndex)
end

Something that I wanted to write for some time now, managed to find some free time and coded it.. It finds the conic that best fits a given set of points. I’ve used Eigenvalues to solve the system of homogeneous equations, actually minimise to be exact.. So, I was bored and did some coding 😀

So my day was pretty good, thought I would write about Proof movie, not that great a movie, but kind of interesting. Its a beautiful mind flavoured icecream with a topping of Memento’s style of screenplay. Long time since I’ve had a icecream.. actually really long since I’ve even gone out. hmmm.. so I slept a lot today and have plans of going to the coffee shop right now, having some food and then sleeping again !!

Gud night, sweet dreams.. my yahoo status and something I’ve always believed in.. The biggest risk in life is not taking one

Advertisements

4 Responses

  1. [-( bore kodithe CODE chesava :(( :-ss
    chaa inka repati nundi neetho tiruguthunte janalu nannu kuda nee types anukuntaru [-( …naa paruvu tisthunnav #:-s

  2. Hehe.. anukunnaa nuvvu ee reaction istaav aniii.. edo MS/R vision vacchindii kadaa.. aaa uppuu leyy 😀

    And hey forgot to mention.. 30 views today !! Looks like lots of ppl are reading my blog.. nee laaga chala mandi without work.. hehee

  3. naa moham…nene oka 10-15 times open chesa nee blog ni 😛 😀

  4. 10-15 times aaaa? :O anta pani lekundaa unnavaa nuvvu? 😀 .. padukooo anta pani lekuntee.. hehee

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: