1. A method for securing an environment, comprising: obtaining a two-dimensional (2D) representation of a three-dimensional (3D) environment, wherein the 2D representation comprises a 2D frame of pixels encoding depth values of the 3D environment; detecting, probabilistically, a pixel in the 2D frame that is affected by persistent depth dropout, wherein the pixel is affected by persistent depth dropout when the pixel is associated with unreliable depth values, wherein depth values associated with the pixel are unreliable when a confidence threshold for depth values associated with the pixel is exceeded over a period of time; and assigning the pixel affected by the persistent depth dropout to a background of the 2D representation; identifying a plurality of foreground pixels in the 2D representation; defining a foreground object based on the plurality foreground pixels; assigning pixels of the 2D representation that are not associated with the foreground object and that are not already associated with the background to the background; eliminating the background from the 2D representation to obtain an updated 2D representation; and sending the updated 2D representation to a remote processing service.