princeton-vl / RAFT-Stereo

MIT License
721 stars 139 forks source link

x-difference of principal points. #31

Open truman1211 opened 2 years ago

truman1211 commented 2 years ago

"(cx1-cx0) is the x-difference of principal points.", I just can't understand why x should plus this item

lahavlipson commented 2 years ago

We have three known equations:

inverse projection from (2D->3D): ((u0 - cx0)/fx) * z = X0

camera translation (3D->3D): X1 = X0 + baseline

projection from (3D->2D) u1 = fx*(X1/z) + cx1

Given these equations, we can rearrange and solve for z: z = (fx*baseline) / |disp + (cx1 - cx0)| where disp=u0-u1

Usually cx1 and cx0 are the same, so this term is often omitted.