Ask HN: How can I determine the quality of an image file
I'm building a software to extract text in image.
But some uploaded images are blur, and hard to process.
So, I need to build a function to determine if an image is low or high quality.
How can I do it?
PS: Sorry for my bad english.
7 comments
[ 2.0 ms ] story [ 29.0 ms ] threadI struggle when determine the threshold, some blur image have higher score than high quality image, but other blur image has lower score than high quality image.
So I wonder where i'm wrong or have some better approaches to resolve this.
Those are just heuristics, you'd have to try it to see how well they work.
Alternatively (though roughly equivalent) you could try some kind of edge detection (and then summing the output) - especially if you're talking about blurred text, I'd expect there to be fewer hard edges in a blurry image
that'd have resolution and bit ratio which I forget how to figure out honestly, not hard to learn in minutes though