1. A method for filtering an image using a guided image filter, wherein a filtering output is computed using a guidance image, wherein confidence values associated to a filter input are taken into account for calculating the filtering output.