Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Analyzing image complexity

Are there any algorithms available for analyzing the complexity of an image? Basically I'm writing a Perl script that will use the system() function to launch MPlayer in the background to generate 10 to 20 screenshots for the input video file and I'd like it to be able to discard any simple images such as a shot of the sky, or a black background, and other simple images and keep just 3 of those images with the highest complexity or most number of colors. Is there a module or a separate program I can use to accomplish this? I'm guessing maybe Image::Magick can take care of this.

like image 919
somebody Avatar asked Mar 10 '10 20:03

somebody


People also ask

What is image complexity?

Abstract: The complexity of an image tells many aspects of the image content and is an important factor in the selection of source material for testing various image processing methods. We explore objective measures of complexity that are based on compression.

What is visual complexity?

Visual complexity is broadly defined as the level of detail or intricacy contained within an image (Snodgrass & Vanderwart, 1980).


3 Answers

See how small a JPEG-compressed copy is. JPEG works hard to remove redundancies in image information and "complex" images simply don't have as much redundancy to remove.

like image 75
Joe Koberg Avatar answered Sep 18 '22 23:09

Joe Koberg


Great paper here on the subject. It considers the more narrow problem of matching images in a military application, but surveys the research and contains plenty of different metrics of image complexity that have been considered by various authors. It's possible you might need only one or two of the methods in your particular task. Check it out.

like image 43
Grembo Avatar answered Sep 20 '22 23:09

Grembo


My first answer would be the JPEG method but somebody already suggested it, so my next answer would be to compute a histogram ($image->Histogram()). Just look at the number of different colors in the image. For photos (things like the sky), the more colors in an image, the more complex it is.

like image 31
Gabe Avatar answered Sep 17 '22 23:09

Gabe