A method and equipment for optical filtering