  
          return interp_t_values[bin_idx].reshape(oldshape)
  
      def color_hist_match(self, src_im, tar_im, mask):
          matched_R = self.hist_match(src_im[:,:,0], tar_im[:,:,0], mask)
          matched_G = self.hist_match(src_im[:,:,1], tar_im[:,:,1], mask)
          matched_B = self.hist_match(src_im[:,:,2], tar_im[:,:,2], mask)
          matched = numpy.stack((matched_R, matched_G, matched_B), axis=2).astype(src_im.dtype)
          return matched
  
      def get_new_face(self, image, mat, size):
          face = cv2.warpAffine( image, mat, (size,size) )
 
</s> remove         face = cv2.warpAffine( image, mat, (size,size) )
        face = numpy.expand_dims( face, 0 )
        face_clipped = numpy.clip(face[0], 0, 255).astype( image.dtype )
 </s> add         face = cv2.warpAffine(image, mat, (size, size))
        face = numpy.expand_dims(face, 0)
        face_clipped = numpy.clip(face[0], 0, 255).astype(image.dtype)
 </s> remove         face_mask = numpy.zeros(image.shape,dtype=float)
 </s> add         face_mask = numpy.zeros(image.shape, dtype=float)
 </s> remove         image_mask = self.get_image_mask( image, new_face, face_detected.landmarks_as_xy(), mat, image_size )
 </s> add         image_mask = self.get_image_mask(image,
                                         new_face,
                                         face_detected.landmarks_as_xy,
                                         mat,
                                         image_size)
 </s> remove             face_src = numpy.ones(new_face.shape,dtype=float)
            cv2.warpAffine( face_src, mat, image_size, face_mask, cv2.WARP_INVERSE_MAP | cv2.INTER_CUBIC, cv2.BORDER_TRANSPARENT )

        hull_mask = numpy.zeros(image.shape,dtype=float)
 </s> add             face_src = numpy.ones(new_face.shape, dtype=float)
            cv2.warpAffine(face_src,
                           mat,
                           image_size,
                           face_mask,
                           cv2.WARP_INVERSE_MAP | cv2.INTER_CUBIC, cv2.BORDER_TRANSPARENT)

        hull_mask = numpy.zeros(image.shape, dtype=float)
 </s> remove         new_face = self.get_new_face(image,mat,size)
 </s> add         new_face = self.get_new_face(image, mat, size)

        matched_R = self.hist_match(src_im[:, :, 0], tar_im[:, :, 0], mask)
        matched_G = self.hist_match(src_im[:, :, 1], tar_im[:, :, 1], mask)
        matched_B = self.hist_match(src_im[:, :, 2], tar_im[:, :, 2], mask)

  
          return interp_t_values[bin_idx].reshape(oldshape)
  
      def color_hist_match(self, src_im, tar_im, mask):
        matched_R = self.hist_match(src_im[:, :, 0], tar_im[:, :, 0], mask)
        matched_G = self.hist_match(src_im[:, :, 1], tar_im[:, :, 1], mask)
        matched_B = self.hist_match(src_im[:, :, 2], tar_im[:, :, 2], mask)
        matched_R = self.hist_match(src_im[:, :, 0], tar_im[:, :, 0], mask)
        matched_G = self.hist_match(src_im[:, :, 1], tar_im[:, :, 1], mask)
        matched_B = self.hist_match(src_im[:, :, 2], tar_im[:, :, 2], mask)
        matched_R = self.hist_match(src_im[:, :, 0], tar_im[:, :, 0], mask)
        matched_G = self.hist_match(src_im[:, :, 1], tar_im[:, :, 1], mask)
        matched_B = self.hist_match(src_im[:, :, 2], tar_im[:, :, 2], mask)
          matched = numpy.stack((matched_R, matched_G, matched_B), axis=2).astype(src_im.dtype)
          return matched
  
      def get_new_face(self, image, mat, size):
          face = cv2.warpAffine( image, mat, (size,size) )
keep keep keep keep replace replace 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