  
      @staticmethod
      def estimate_blur(image_file):
          """
          Estimate the amount of blur an image has
          with the variance of the Laplacian.
          Normalize by pixel number to offset the effect
          of image size on pixel gradients & variance
          """
          image = cv2.imread(image_file)
          if image.ndim == 3:
              image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
          blur_map = cv2.Laplacian(image, cv2.CV_32F)
 
</s> remove         image = cv2.imread(image_file)
 </s> add         image = cv2_read_img(image_file, raise_error=True) </s> remove         image = cv2.imread(self.images["a"][0])  # pylint: disable=no-member
 </s> add         image = cv2_read_img(self.images["a"][0], raise_error=True) </s> remove         image = cv2.imread(filename)
 </s> add         image = cv2_read_img(filename, raise_error=True) </s> remove         preds = np.array([self.vgg_face.predict(cv2.imread(img))
 </s> add         preds = np.array([self.vgg_face.predict(cv2_read_img(img, raise_error=True)) </s> remove         try:
            image = cv2.imread(filename)  # pylint: disable=no-member
        except TypeError:
            raise Exception("Error while reading image", filename)

 </s> add         image = cv2_read_img(filename, raise_error=True)
        Estimate the amount of blur an image has with the variance of the Laplacian.
        Normalize by pixel number to offset the effect of image size on pixel gradients & variance
  
      @staticmethod
      def estimate_blur(image_file):
          """
        Estimate the amount of blur an image has with the variance of the Laplacian.
        Normalize by pixel number to offset the effect of image size on pixel gradients & variance
        Estimate the amount of blur an image has with the variance of the Laplacian.
        Normalize by pixel number to offset the effect of image size on pixel gradients & variance
        Estimate the amount of blur an image has with the variance of the Laplacian.
        Normalize by pixel number to offset the effect of image size on pixel gradients & variance
        Estimate the amount of blur an image has with the variance of the Laplacian.
        Normalize by pixel number to offset the effect of image size on pixel gradients & variance
          """
          image = cv2.imread(image_file)
          if image.ndim == 3:
              image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
          blur_map = cv2.Laplacian(image, cv2.CV_32F)
keep keep keep keep replace replace replace replace keep keep keep keep keep
 Centralize cv2 image reading and handle bad filenames 
tools/sort.py