title: Calculation of entropy of an Image using JAVA
body: <p>I'm working on an Image Encryption program as a part of my academic project in Java.The output of the project would be an encrypted image.Now I need to calculate the entropy of original image and encrypted image for analysis based on this formula
  <img src="https://i.stack.imgur.com/BtCTF.png" alt="Image Entropy Description" /></p>
  <p><img src="https://i.stack.imgur.com/kiEu2.png" alt="Sample Data" /></p>
  <p>How can I find find the entropy of an image according to this equation using Java</p>