获得最常出现的图像颜色 [英] Getting the most frequently appearing color of an image

查看:134
本文介绍了获得最常出现的图像颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在尝试为盲人开发T恤颜色分析项目。对于这个项目,我应该在图像中获得最常出现的颜色或原色调,以识别T恤的颜色。我从互联网上寻找解决方案,但我找不到合适的解决方案。我正在为我的项目使用Java。

I am currently trying to develop a project for t-shirt color analysis for blind people. For this project, I should get the most frequently appearing colors or primary color tones in images to identify the color of t-shirt. I looked for the solution from the internet but I couldn't find a proper solution yet. I am using Java for my project.

推荐答案

获取位图并浏览每个像素。记住每一个的颜色。然后做一些平均值 - 将近色调制成一个(粉红色,深橙色和红色只能变成红色)。然后比较每种基本颜色(彩虹的颜色)得到的计数。

Get a bitmap and go through each pixel. Remeber the color of each one. Then make some averages - make close colors into one( pink, deep orange and red can become only red). Then compare the counts you get for each of basic colors(colors of rainbows).

这篇关于获得最常出现的图像颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆