How to compare images and determine which has more content?

Viewed 769

Goal: I want to grab the best frame from an animated GIF and use it as a static preview image. I believe the best frame is one that shows the most content - not necessarily the first or last frame.

Take this GIF for example:

enter image description here

--

This is the first frame:

enter image description here

--

Here is the 28th frame:

enter image description here

It's clear that frame 28th represents the entire GIF well.

How could I programmatically determine if one frame has more pixel/content over another? Any thoughts, ideas, packages/modules, or articles that you can point me to would be greatly appreciated.

3 Answers
Related