0

Given a set of images on a webpage, what's a good way to pick a compelling image that is also representative of the webpage? The use case is displaying an image along with a description of a URL to a page, after a user includes it in a status update.

I've found some techniques to find the most interesting part of a single image. Example: http://berk.es/smartcropper/

So maybe I can use this notion of entropy to compare images in a set?

I am programming in ruby, so a pure ruby solution is preferable, but am open to others.

7
  • 2
    How do you define whether one image is more or less interesting than another one? – Arseni Mourzenko May 10 '14 at 20:35
  • Microsoft AutoCollage has a "interesting image picker" built-in. Unfortunately I don't know how it works. – Thomas Weller May 10 '14 at 20:46
  • @MainMa the purpose of the selection is described in my question. i'm using the human english definition of "interesting", which is subjective. i suppose an implied part of my question is "which selection criteria have been proposed and implemented for guessing which image of a set will be most interesting to a large portion of typical humans" – John Bachir May 10 '14 at 21:31
  • What have you studied and your level of familiarity of composition in art? I'd suggest reading a bit from Drawing Scenery and consider at a very basic level of "what makes something interesting" before trying to determine a computer program to do this. Glance also at Why do yellow and red look good together in this photo? from Graphic Design and reconsider the question you are asking. – user40980 May 10 '14 at 21:59
  • 1
    Your use case is far from "picking the most interesting image". That title question has a lot of ongoing research in image processing, computer vision, machine learning and psychovisual studies. Your true use case is "picking an image from a webpage that is most representative of that page content". – rwong May 10 '14 at 22:49
2

This is just a quick hash of ideas. I don't have any implementations to share.

Best advice: use side-channel information:

  • Relative position (layout) of the image on the page.
  • Look at the scripts attached to that image. Is that clickable (onclick)?
  • Does it have a title?
  • Does it have a title that shares important words with the title of the page?

Not-so-best advice: use image information.

Not-so-best because these are known difficult open-ended problems, so a non-scientist will find it painful to implement or even use.

  • Images with beautiful histogram (e.g. suns, beaches, blue sky)
  • ... any of the research publications mentioned by others in the comments.

COTS (on-the-shelf) solutions:

Advice for the true hackers.

https://harthur.github.io/brain/

This is a submission (as seen on Hacker News) that trains a simple neural network (3 input nodes, 3 nodes in a middle layer) based on whether the user prefers black text or white text against a RGB background.

A similar do-it-yourself approach can be applied to an image histogram picker. However, we wouldn't know how useful the end result would be for your applications.

Not the answer you're looking for? Browse other questions tagged or ask your own question.