title: How to detect if an image is pixelated
body: <p>There is a question like this asked on SO earlier: <a href="https://stackoverflow.com/questions/12942365/detecting-a-pixelated-image-in-python">Detecting a pixelated image in python</a> and also on <a href="http://www.quora.com/How-do-I-detect-if-an-image-is-pixelated" rel="nofollow noreferrer">quora</a></p>
  
  <p>I'm trying to find out whether an image uploaded by a user can be detected as 'pixelated'. By pixelated I mean images <a href="http://www.caughtinthefire.com/wp-content/uploads/2009/03/fireworks-pixelate-02.gif?" rel="nofollow noreferrer">like these</a>: In my case I don't have access to the original (non-pixelated) version. </p>
  
  <p><strong>My approach</strong>: </p>
  
  <p>Not sure how effective this approach would be but if I could get RGB of each pixel in the image and then compare it to its neighbors to see if they are similar then I could detect that the image is pixelated? I can get the RGB of pixels but don't know how to go about comparing them to their neighbors. </p>
  
  <p>Are there algorithms for doing something like this available already? Are there some other approaches I could take? I'm not bound to any specific language. </p>