original_string: protected function grayscaleEntropy(\Imagick $image)
      {
          // The histogram consists of a list of 0-254 and the number of pixels that has that value
          $histogram = $image->getImageHistogram();
  
          return $this->getEntropy($histogram, $this->area($image));
      }
code: protected function grayscaleEntropy(\Imagick $image)
      {
          // The histogram consists of a list of 0-254 and the number of pixels that has that value
          $histogram = $image->getImageHistogram();
  
          return $this->getEntropy($histogram, $this->area($image));
      }
code_tokens: protected function grayscaleEntropy ( \ Imagick $ image ) { // The histogram consists of a list of 0-254 and the number of pixels that has that value $ histogram = $ image -> getImageHistogram ( ) ; return $ this -> getEntropy ( $ histogram , $ this -> area ( $ image ) ) ; }
docstring: Calculate the entropy for this image.
  
  A higher value of entropy means more noise / liveliness / color / business
  
  @param  \Imagick $image
  @return float
  
  @see http://brainacle.com/calculating-image-entropy-with-python-how-and-why.html
  @see http://www.mathworks.com/help/toolbox/images/ref/entropy.html
docstring_tokens: Calculate the entropy for this image .