A computer-implemented method of processing image data, the method comprising: receiving an image from an image sensor (102; 502); defining a contiguous area (202; 602) of ambiguous data in the image; wherein the ambiguous data relates to objects outside of a particular range of distances or to objects that absorb light of a wavelength that is utilized for depth imaging; determining a border (204; 604) surrounding the contiguous area; classifying the contiguous area as dark or far based on a characteristic of one or more pixels (306; 706) of the border; characterized by: for the classified contiguous area, processing one or more pixels of the contiguous area differently if the contiguous area is classified as far than if the contiguous area is classified as dark, wherein processing the one or more pixels of the contiguous area differently comprises performing a modification to a depth map (200; 400; 600) if the contiguous area is classified as far and not performing the modification to the depth map if the contiguous area is classified as dark; and for each pixel of the border, determining whether the pixel is within a threshold distance of a maximum depth value; wherein classifying the contiguous area as far comprises determining that a ratio of a number of pixels of the border within the threshold distance of the maximum depth value to a total number of pixels of the border exceeds a threshold ratio. receiving an image from an image sensor (102; 502); defining a contiguous area (202; 602) of ambiguous data in the image; wherein the ambiguous data relates to objects outside of a particular range of distances or to objects that absorb light of a wavelength that is utilized for depth imaging; determining a border (204; 604) surrounding the contiguous area; classifying the contiguous area as dark or far based on a characteristic of one or more pixels (306; 706) of the border; characterized by: for the classified contiguous area, processing one or more pixels of the contiguous area differently if the contiguous area is classified as far than if the contiguous area is classified as dark, wherein processing the one or more pixels of the contiguous area differently comprises performing a modification to a depth map (200; 400; 600) if the contiguous area is classified as far and not performing the modification to the depth map if the contiguous area is classified as dark; and for each pixel of the border, determining whether the pixel is within a threshold distance of a maximum depth value; wherein classifying the contiguous area as far comprises determining that a ratio of a number of pixels of the border within the threshold distance of the maximum depth value to a total number of pixels of the border exceeds a threshold ratio. for the classified contiguous area, processing one or more pixels of the contiguous area differently if the contiguous area is classified as far than if the contiguous area is classified as dark, wherein processing the one or more pixels of the contiguous area differently comprises performing a modification to a depth map (200; 400; 600) if the contiguous area is classified as far and not performing the modification to the depth map if the contiguous area is classified as dark; and for each pixel of the border, determining whether the pixel is within a threshold distance of a maximum depth value; wherein classifying the contiguous area as far comprises determining that a ratio of a number of pixels of the border within the threshold distance of the maximum depth value to a total number of pixels of the border exceeds a threshold ratio.