I want to make image quality check. Maybe calculate some index of that quality.
For example, lets say, user A uploads something like http://www.hyperconectados.com/wp-content/uploads/2014/03/Selfie.jpg
and user B uploads something like http://www.privatewifi.com/wp-content/uploads/2014/02/selfie.jpg
It’s obvious, that B photo is professional and in good quality. There’s another thing, that it’s not good to use image size and weight(?) because B image could be resized, photoshoped or something else (lost some image data).
Is there a way to detect that difference? 🙂 Any ideas?
2
Answers
Imagemagick to read the quality
For more info on identify
Got the info from this question
I am still thinking of further indicators, but for the moment…
IPTC Profile and/or Copyright
I would say that most professional photographers wouldn’t let an image out the door without an IPTC profile and Copyright notice.
You can find that with ImageMagick like this:
and your second image comes up with
You can actually read the profile like this:
or
Resolution (dpi)
Another discriminant would probably be the resolution. Most mobile phones, and amateurs, and web-based images have a resolution of 72dpi or 96dpi. Most professional photographers would tend to favour 300dpi for high quality printing, so I would probably threshold at around 150dpi. You can get the resolution like this:
or faster and more succinctly
I note your first image has 72dpi and the second one has 300dpi.
Scope for enhancement
Another idea, which I am thinking about is what happens if you try to enhance the image digitally, and then see the differences between the enhanced image and the original and try to deduce something from that. Presumably, a professionally edited image will not be as susceptible to enhancement on the basis it should already be “good”. So, let’s say we choose ImageMagick’s
-enhance
option, and enhance your two images and then look at the differences between the original and the enhanced images. I am going to switch to losslessPNG
format to avoidJPEG
quantisation effects.Now do same procedure for second, professional image:
I am still thinking about this…