function depth = mask_depth(depth, threshold)

depth = double(depth);
depth(depth > threshold) = threshold;
%zeros_index = (depth == 0);
%depth(zeros_index) = 400; %threshold;
depth = depth/threshold;

