processing median image