                             (self.stored_size, self.stored_size),
                             interpolation=cv2.INTER_AREA) * 255.0).astype("uint8")
          self._mask = compress(mask)
  
      def set_blur_kernel_and_threshold(self, blur_kernel=0, threshold=0):
          """ Set the internal blur kernel and threshold amount for returned masks
  
          Parameters
          ----------
          blur_kernel: int, optional
 
</s> remove     def get_erosion_kernel(self, mask):
        """ Get the erosion kernel """
 </s> add     def _get_erosion_kernel(self, mask):
        """ Get the erosion kernel.

        Parameters
        ----------
        mask: :class:`numpy.ndarray`
            The mask to be eroded or dilated

        Returns
        -------
        :class:`numpy.ndarray`
            The erosion kernel to be used for erosion/dilation
        """ </s> remove         if self._threshold != 0.0 or self._blur_kernel != 0:
 </s> add         if self._threshold != 0.0 or self._blur["kernel"] != 0: </s> remove         if blur_kernel == 0 or blur_kernel % 2 == 1:
            self._blur_kernel = blur_kernel
        else:
            self._blur_kernel = blur_kernel + 1
 </s> add         if blur_type is not None:
            blur_kernel += 0 if blur_kernel == 0 or blur_kernel % 2 == 1 else 1
            self._blur["kernel"] = blur_kernel
            self._blur["type"] = blur_type
            self._blur["passes"] = blur_passes
    def set_blur_and_threshold(self,
                               blur_kernel=0, blur_type="gaussian", blur_passes=1, threshold=0):
                             (self.stored_size, self.stored_size),
                             interpolation=cv2.INTER_AREA) * 255.0).astype("uint8")
          self._mask = compress(mask)
  
    def set_blur_and_threshold(self,
                               blur_kernel=0, blur_type="gaussian", blur_passes=1, threshold=0):
          """ Set the internal blur kernel and threshold amount for returned masks
  
          Parameters
          ----------
          blur_kernel: int, optional
keep keep keep keep replace keep keep keep keep keep
 Smart Masks to Convert (#957)

- scripts.convert - Use Smart Masks for Convert
    * Make on-the-fly conversion an explicit option

- Move BlurMask to lib.faces_detect

- tools.preview - Fix for smart masks
    * Subclass from tk.Tk
    * Options to lib.gui.control_helper
    *variable cleanup

- lib.logger - Demote more tensorflow deprecation messages

- Documentation:
    * lib.faces_detect.BlurMask
    * plugins.convert.mask
    * lib.convert
    * scripts.convert
    * scripts.fsmedia
    * tools.preview 
lib/faces_detect.py