code: def to_binary(self, threshold=0.0):
          
          data = BINARY_IM_MAX_VAL * (self._data > threshold)
          return BinaryImage(data.astype(np.uint8), self._frame)
docs: Creates a BinaryImage from the depth image. Points where the depth
          is greater than threshold are converted to ones, and all other points
          are zeros.
  
          Parameters
          ----------
          threshold : float
              The depth threshold.
  
          Returns
          -------
          :obj:`BinaryImage`
              A BinaryImage where all 1 points had a depth greater than threshold
              in the DepthImage.