virtual Vec2 remove_disto(const Vec2 & p) const { const double epsilon = 1e-8; //criteria to stop the iteration Vec2 p_u = p; while((add_disto(p_u)-p).lpNorm<1>() > epsilon)//manhattan distance between the two points { p_u = p - distoFunction(_params, p_u); } return p_u; }
/// Return the distorted pixel (with added distortion) virtual Vec2 get_d_pixel(const Vec2& p) const { return cam2ima( add_disto(ima2cam(p)) ); }