JakobEngel / dso

Direct Sparse Odometry
GNU General Public License v3.0
2.27k stars 906 forks source link

Some strange calculations of sum squared shifts in CoarseTracker.cpp for me #227

Open MaximSmolskiy opened 3 years ago

MaximSmolskiy commented 3 years ago

Hello!

According to DSO paper for Step 2: Keyframe Creation we need to calculate simply and straightforwardly 2 mean square optical flows f and f_t.

As I understand, they are calculated in CoarseTracker.cpp - here and these calculations are strange and discouraging for me - I can't understand why we need additional residual with negative (according to code comments) transformation ((R, -T) for f and (I, -T) for f_t) for every usual residual with positive transformation ((R, T) for f and (I, T) for f_t).

I can't understand why only 1 positive transformation isn't enough, why we need so special additional negative transformation with negative translation only and what it gives to us - why it is better.

Can anyone help me please? Thanks in advance!