1. A method for denoising an image, wherein the image is a time-of-flight (ToF) range image of pixels, comprising steps of: determining locations of edges, and a confidence value of each pixel; determining, based on the locations of the edges, geodesic distances of neighboring pixels; determining, based on the confidence values, reliabilities of the neighboring pixels; and reducing scene dependent noise using a filter, wherein the ToF range image is acquired by a ToF range camera, and the steps are performed in a processor.