refine add_white_filter and add_black_filter