开发者

create statistics on image (e.g. mostly used color...)

Sorry if the question is a bit vague but I'm new to gd. I'm wondering whether gd already has some built-in methods or whether PHP classes relying on gd exist that could present me with a bunch of statistics for a given image. I'm mostly interested in:

  1. Colors (nb of colors used, most used colors, even better if I can get a the name of dominant color tone)
  2. Shapes (whether the开发者_StackOverflow中文版 image -once background removed- is close to a square,circle,nb of basic shapes detected in image)


Colors count: http://www.php.net/manual/en/function.imagecolorstotal.php

Color of a given pixel: http://www.php.net/manual/en/function.imagecolorat.php

As for shapes, you'd need to scan the image and apply some smart algorithms to detect that. I'd say that's not quite easy.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜