joaofaro / KCFcpp

C++ Implementation of KCF Tracker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

seems wrong in complexDivision in ffttools.hpp

strgrb opened this issue · comments

to do a complex division, say
(a+bi)/(c+di) = (a+bi)(c-di)/(cc+dd)
= [(ac+bd)+(bc-ad)i]/(cc+dd)
so in the code

    pres.push_back((pa[0].mul(pb[0]) + pa[1].mul(pb[1])).mul(divisor));
    pres.push_back((pa[1].mul(pb[0]) + pa[0].mul(pb[1])).mul(divisor));

second '+' should be '-'

But why does the code still work?

i meet this problem too