1. A computer implemented method for three dimensional (3D) image processing, the method comprising: receiving an image and a plurality of confidence measures, the image including a plurality of values, wherein each of the values in the image is indicative of a depth of a respective one of a plurality of pixels in a scene, and wherein each of the values is associated with a respective one of the confidence measures; determining a plurality of non-overlapping similarity regions based on the confidence measures; determining whether each of the similarity regions has a threshold number of values with corresponding confidence measures that are greater than a confidence threshold; refining a similarity region of the image in response to determining that the similarity region has the threshold number of the values with corresponding confidence measures that are greater than the confidence threshold; and not refining the similarity region of the image in response to determining that the similarity region does not have the threshold number of the values with corresponding confidence measures that are greater than the confidence threshold.