original_docstring: Estimates the amount of focus of an image file.
      Returns a real number: lower values indicate better focus.
      
docstring: Estimates the amount of focus of an image file.
  Returns a real number: lower values indicate better focus.
docstring_tokens: Estimates the amount of focus of an image file . Returns a real number : lower values indicate better focus .
code: def estimate(file, s=5):
      """Estimates the amount of focus of an image file.
      Returns a real number: lower values indicate better focus.
      """
      im = Image.open(file).convert("L")
      w,h = im.size
      box = (w/2 - 50, h/2 - 50, w/2 + 50, h/2 + 50)
      im = im.crop(box)
      imf = im.filter(ImageFilter.MedianFilter(s))
      d = ImageChops.subtract(im, imf, 1, 100)
      return ImageStat.Stat(d).stddev[0]
code_tokens: def estimate ( file , s = 5 ) : im = Image . open ( file ) . convert ( "L" ) w , h = im . size box = ( w / 2 - 50 , h / 2 - 50 , w / 2 + 50 , h / 2 + 50 ) im = im . crop ( box ) imf = im . filter ( ImageFilter . MedianFilter ( s ) ) d = ImageChops . subtract ( im , imf , 1 , 100 ) return ImageStat . Stat ( d ) . stddev [ 0 ]
short_docstring: Estimates the amount of focus of an image file.
short_docstring_tokens: Estimates the amount of focus of an image file .
comment: """Estimates the amount of focus of an image file.
      Returns a real number: lower values indicate better focus.
      """