Color Recognization in mobile application

A mobile application for the color-blindness to recognize color

1.Summary

Software type: iOS application
Author: F
Time: 2016.12--2017.12

2.Main

The mobile application is aimed to recognize color in the camera of iOS devices for the color-blindness, including hypochromatopsia and achromatopsia.

Function

  1. The user clicks on the desired position in the screen and the application automatically recognizes the color of the area block centered on the touch point and feeds it back with text and speech.
  2. On the one hand, you can get pictures through a gallery or camera. On the other hand, you can click on the object directly in the camera interface for color recognition (instant camera mode).

3. Programming

Development Environment

  • Development tools: Xcode 8.3.2 iOS 10.1
  • Programming language: Swift3.0 C++ Objective-C
  • Others: OpenCV Library, C++, Swift Bridge Technology, Cocoapods

4.Algorithm

Color Recognization Algorithm: Using a combination of search color range tables and kNN

Details:

  • By studying the characteristics of the HSV color space, we found that when the light is bright, hue(H) is the main influence factor of the color. However, when the environment is gloomy or dark, value(V) is the main factor.
  • In particular, red has two divided ranges in hue because of the HSV conical model.
  • First, we determine whether the saturation and value are in the range of white, gray and black when recognizing the HSV values of the color point from iOS devices.


    标准颜色卡的色调、饱和度极坐标图
  • Second, we use the k Nearest Neighbor Algorithm. Calculate the distance from the pixel to be measured and the standard color HSV tables, and then get the nearest k standard colors. The color with the most number of color labels in the k neighbors is regarded as the color of the pixel.

5.Advantages

  1. This method solves the shortcomings of traditional color classification and the method's advantages:
  1. Precision, there is no need to divide the range of HSVs for each color, and to achieve accurate classification of more than 50 colors.
  1. In manual acquisition of a standard color HSV table, this method can achieve camera and standard color adjustments.

6.Software screenshot

主页

识别照片

即时相机

项目开源源代码:
http://github.com/J3069/ColorRecognization

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 7,486评论 0 10
  • 我愿你是个慌,从未出现南墙。 原来你走过的最短的路就是我们的路。 撕心裂肺不停的笑 心酸又有谁知道 无非就是世事难...
    小敏感阅读 335评论 0 0
  • 刚读大学的时候,寝室兄弟教我申请QQ号,我记得自己取了名字叫做“祖父蓝”。他不理解,觉得这是什么鬼。其实我是想到了...
    逗号commas阅读 1,469评论 55 25
  • 第一次喊您父亲, 漂泊离家两千里,内心充满着, 对未来的彷徨与忧惧, 我本该像幼时那样, 亲昵而又依赖地喊声爸爸。...
    初心尚存阅读 229评论 0 0