add the option to skip pixels at the margin of the depth image