finished inference for bundle adjustement