简体   繁体   中英

How to differentiate two colours?

Bit of theoretical question. I'd like someone to explain me which colour space provides the best distances among similar looking colours? I am trying to make a humidity detection system using a normal RGB camera in dry fruits like almond and peanuts. I have tried RGB and HSV color space for EDA(please find the attachment). Currently I am unable to find a really big difference between the accepted and rejected model. It would be really a great help if someone can tell me what should I look for and also where. 在此输入图像描述 在此输入图像描述

The problem with this question is that you can't define "similar looking" without some metric value, and the metric value depends on the color space you choose.

That said, CIELab color space is said to is supposed to be created with the aim of similar looking colors having similar coordinates, and is frequently used in object recognition. haven't used it myself though, so no personal experience.

For starters I would recommend on treating the pixels associated with the dry fruits as 3D coordinates in the color space that you chose, and try to apply classification algorithm on these data points. Common algorithms that I can think of are linear discriminant analysis (LDA), Support Vector Machine (SVM) and Expectation Maximization (EM). All these algorithms belong to supervised learning class, as they require labeled data.

If you images are taken under different light conditions, a good choice for color space is one that separates the luminance value from the chromatic values, such as LUV.

Anyhow, it will be easier to answer this question if you provide example images.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM