Velocity Field Estimation Using a Weighted Local Optimization