ethz-asl / image_undistort

A compact package for undistorting images directly from kalibr calibration files. Can also perform dense stereo estimation
249 stars 93 forks source link

Time-varying T_cn_cnm1 #49

Closed hitimo closed 5 years ago

hitimo commented 5 years ago

Hi @ZacharyTaylor, Do you see a good way to feed in time-varying T_cn_cnm1s, i.e. T_cn_cnm1 is different for every stereo image-pair. Thanks!

ZacharyTaylor commented 5 years ago

If you set the node to use the ros camera info topic it will regenerate the rectification when any of the values change. There are however two downsides to this. 1) while camerainfo msgs have a rotation field, they don't store translation so it has to be recovered via K.inverse() * P_.topRightCorner<3, 1>(); 2) the rectification used by the library builds a lookup table. The code to do this isn't particularly efficient so I doubt redoing the table once a frame would run in real time.

hitimo commented 5 years ago

Thanks @ZacharyTaylor for your feedback. I'll try to make the code for rectifying the stereo image more efficient and feed T_cn_cnm1 as tf or so.