Oxford-PTAM / PTAM-GPL

PTAM (Parallel Tracking and Mapping) re-released under GPLv3.
GNU General Public License v3.0
790 stars 360 forks source link

What is the theory for SmallBlurryImage::IteratePosRelToTarget() method ? #16

Open cggos opened 6 years ago

cggos commented 6 years ago

I'm learning the PTAM code, but I cannot find the theory respond to the SmallBlurryImage::IteratePosRelToTarget() method linking https://github.com/Oxford-PTAM/PTAM-GPL/blob/master/Src/SmallBlurryImage.cc#L98-L205 I would appreciate it if you can tell me the theory or its thesis name. I am looking forward to your reply, thank you.

GeorgKlein commented 6 years ago

This is described by section 6 of the ECCV 2008 paper "Improving the agility of keyframe-based SLAM". In short, we run ESM (similar to Lucas-Kanade) to align two images to each other over SE(2).

cggos commented 6 years ago

@GeorgKlein
I can not understand the code segment below in SmallBlurryImage::IteratePosRelToTarget() method.

1) SE2<> se2XForm = se2WfromC * se2CtoC * se2WfromC.inverse();
what does se2WfromC and se2CtoC mean and why make se2XForm in that form ?

2) v4Jac[2] = -(ir.y - irCenter.y) * v2SumGrad[0] + (ir.x - irCenter.x) * v2SumGrad[1];
what does v4Jac[2] mean and why compute it like this ?

3) dMeanOffset -= v4Update[3];
why use v4Update[3] to make dMeanOffset and compute the dFinalScore ?

GeorgKlein commented 6 years ago
  1. WfromC maps a image-center-based coordinate frame to an image-corner-based coordinate frame, as required by the warp function.
  2. This looks like the partial differential of image intensity w.r.t. rotation about the image center, computed by multiplying the differential of image motion w.r.t. rotation by the differential of image intensity w.r.t. image motion.
  3. The optimization runs over three parameters: (0&1): translation (2): rotation (3): intensity shift between images.

On Tue, Feb 6, 2018 at 12:55 AM, Gordon Scott notifications@github.com wrote:

@GeorgKlein https://github.com/georgklein I can not understand the code segment below in SmallBlurryImage:: IteratePosRelToTarget() method.

1.

SE2<> se2XForm = se2WfromC se2CtoC se2WfromC.inverse(); what does se2WfromC and se2CtoC mean and why make se2XForm in that form ? 2.

v4Jac[2] = -(ir.y - irCenter.y) v2SumGrad[0] + (ir.x - irCenter.x) v2SumGrad[1]; what does v4Jac[2] mean and why compute it like this ? 3.

dMeanOffset -= v4Update[3]; why use v4Update[3] to make dMeanOffset and compute the dFinalScore ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Oxford-PTAM/PTAM-GPL/issues/16#issuecomment-363353746, or mute the thread https://github.com/notifications/unsubscribe-auth/AFftUXSIGsjvSBxyqEN8CxR8rXJPgwAHks5tSBOZgaJpZM4Rq9qi .