views:

23

answers:

1

Hi All,

Once again I come to the best for my pedestrian question. I'm building a small web app that would be vastly improved by the ability to recognize app icons. I've searched all over but haven't found anything that suits my needs.

Basic Experience:

  1. User uploads a screenshot

  2. We extract icons

  3. We return the name of the corresponding app

Here are a few points:

  1. All icons will be grabbed from a screenshot.

  2. All icons will be the same pixel width and height.

  3. All icons will be grabbed from the same location in the screenshot.

  4. All icons need to be matched against a library of icons (around 400 or so).

The app is built in rails so obviously anything with a ruby library is ideal, however, I'm willing to consider any alternate approaches.

Thanks in advance,

Harris

+1  A: 

If the size and location of the icons will always be consistent, here's an idea: For each icon in your library of icons get the color of a few sample pixels, maybe 8 or 10 of them. Always the same 8-10 pixel locations. Store those in your database. When a user uploads their screenshot, take samples of the pixels at the same locations. Then search your database for colors that match in the same places. Since the colors might not be an exact match due to compression or other factors you'll need to include a "fudge factor." This shouldn't be too difficult to implement with ImageMagick or any imaging library that lets you grab a pixel color from an image.

Jordan