Refactor ImageMaskingUtils to use Core Image Filters