  
  
          if self.erosion_kernel is not None:
              if self.erosion_kernel_size > 0:
                  image_mask = cv2.erode(image_mask,self.erosion_kernel,iterations = 1)
              elif self.erosion_kernel_size < 0:
                  dilation_kernel = abs(self.erosion_kernel)
                  image_mask = cv2.dilate(image_mask,dilation_kernel,iterations = 1)
  
          if self.blur_size!=0:
 
</s> remove                 image_mask = cv2.dilate(image_mask,dilation_kernel,iterations = 1)
 </s> add                 image_mask = cv2.dilate(image_mask, dilation_kernel, iterations=1)
 </s> remove         if self.blur_size!=0:
            image_mask = cv2.blur(image_mask,(self.blur_size,self.blur_size))
 </s> add         if self.blur_size != 0:
            image_mask = cv2.blur(image_mask, (self.blur_size, self.blur_size))
 </s> remove                 self.erosion_kernel = cv2.getStructuringElement(cv2.MORPH_ELLIPSE,(erosion_kernel_size,erosion_kernel_size))
 </s> add                 self.erosion_kernel = cv2.getStructuringElement(cv2.MORPH_ELLIPSE,
                                                                (erosion_kernel_size,
                                                                 erosion_kernel_size))
 </s> remove                 self.erosion_kernel = cv2.getStructuringElement(cv2.MORPH_ELLIPSE,(abs(erosion_kernel_size),abs(erosion_kernel_size)))
 </s> add                 self.erosion_kernel = cv2.getStructuringElement(cv2.MORPH_ELLIPSE,
                                                                (abs(erosion_kernel_size),
                                                                 abs(erosion_kernel_size)))
 </s> remove             unitMask = numpy.clip( image_mask * 365, 0, 255 ).astype(numpy.uint8)
            print(unitMask.shape)
            print(new_image.shape)
            print(base_image.shape)
            maxregion = numpy.argwhere(unitMask==255)
 </s> add             unitMask = numpy.clip(image_mask * 365, 0, 255).astype(numpy.uint8)
            logger.info(unitMask.shape)
            logger.info(new_image.shape)
            logger.info(base_image.shape)
            maxregion = numpy.argwhere(unitMask == 255)

                image_mask = cv2.erode(image_mask, self.erosion_kernel, iterations=1)

  
  
          if self.erosion_kernel is not None:
              if self.erosion_kernel_size > 0:
                image_mask = cv2.erode(image_mask, self.erosion_kernel, iterations=1)
              elif self.erosion_kernel_size < 0:
                  dilation_kernel = abs(self.erosion_kernel)
                  image_mask = cv2.dilate(image_mask,dilation_kernel,iterations = 1)
  
          if self.blur_size!=0:
keep keep keep keep replace keep keep keep keep keep
 Logging (#541)

* Convert prints to logger. Further logging improvements. Tidy  up

* Fix system verbosity. Allow SystemExit

* Fix reload extract bug

* Child Traceback handling

* Safer shutdown procedure

* Add shutdown event to queue manager

* landmarks_as_xy > property. GUI notes + linting. Aligner bugfix

* fix FaceFilter. Enable nFilter when no Filter is supplied

* Fix blurry face filter

* Continue on IO error. Better error handling

* Explicitly print stack trace tocrash log

* Windows Multiprocessing bugfix

* Add git info and conda version to crash log

* Windows/Anaconda mp bugfix

* Logging fixes for training 
plugins/convert/Convert_Masked.py