andrewssobral / bgslibrary

A C++ Background Subtraction Library with wrappers for Python, MATLAB, Java and GUI on QT

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

why using abs(dist*dist) for the one channel image in PBAS.cpp

batman47steam opened this issue · comments

dist = abs((((double)B_Col_Pts.at(0).at(index)[i] -

In PBAS.cpp for the three channel image, we compute dist like sqrt(a^2+b^2+c^2),but for the one channel image shouldn't we just compute distance like abs(a) dist = abs(((double)B_Col_Pts.at(0).at(index)[i] - ((double)*currentFeaturesC_Pt.at(0))) not dist = abs((((double)B_Col_Pts.at(0).at(index)[i] - ((double)*currentFeaturesC_Pt.at(0)))*((double)B_Col_Pts.at(0).at(index)[i] - ((double)*currentFeaturesC_Pt.at(0)))) which means abs(a*a), a is short for the ((double)B_Col_Pts.at(0).at(index)[i] - ((double)*currentFeaturesC_Pt.at(0)) distance

Hi @batman47steam,
Thank you for bringing this issue to our attention.