dpyu7978 2010-06-26 17:11
浏览 190
已采纳

按相关性排序图像的算法

I'm developing a feature on a forum site that will allow to include a link and other type of content on a post (for clarifying the question or answer).

Related to the link feature implementation, I have several things to work on:

  1. Validate the URI entered (well formed, valid scheme, etc.)
  2. Validate that the remote resource exists
  3. Extract images from within the remote page
  4. Show to the user the set of images and let him choose one

Here comes the challenge. Previous to step 4, it would be great to sort this set of images in order of 'relevance'. I know that it's a goal quite ambiguous :-) but I can explain what I've gone through with the results given in step 4 and you will know why I'm dealing with this solution.

Many times, I get this kind of things into the set of images:

  • Images used for the layout of the page (tiny and useless)
  • Banners and ads
  • Pseudo-duplication of images (original and resized one)
  • Anarchical order of the set (logo on last position, etc.)

I decide to clean up this mess removing tiny images and sorting them by size, but I know that will be far away from a good solution.

Any ideas on that???

Thank you very much!

  • 写回答

2条回答 默认 最新

  • donglu1913 2010-06-26 20:31
    关注

    You could sort by saturation (which is a good indicator of how interesting an image might be), take a look at the question "Image Classification - Detecting Floor Plans" for a sample implementation.

    The hardest thing is separating image ads from regular images (since they are designed to look very interesting), to do this I suggest one or more of the following possible solutions:

    • ignore images that have standard dimensions of ads
    • query the page twice and ignore the images that change (ads tend to be dynamic)
    • ignore images hosted on external sites (watchout for CDNs!) or specific ad-serving URLs

    To overcome the problem of duplicated images in resolution you could resize them all to a very low resolution (like 8x8 or 4x4) and if two or more images are alike ignore the small(er) one(s).

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 MATLAB动图的问题
  • ¥15 求差集那个函数有问题,有无佬可以解决
  • ¥15 【提问】基于Invest的水源涵养
  • ¥20 微信网友居然可以通过vx号找到我绑的手机号
  • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
  • ¥15 解riccati方程组
  • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名