also add sum_bilateral and sum_percentile.