我有一张输入图像,我从其中提取了一个机器人项目的圆圈,然后得到了这些圆圈内的平均 colored颜色 .这些圆圈可以是红色的,也可以是黄色的,就像我在木头上画的那样.我从这些圆圈中提取了平均 colored颜色 ,并将它们显示在这里以供调试.这不是输入图像,只是我想区分的红色或黄色或两者都不是的 colored颜色 列表.
I tried using cv2.inrange with a singular colour value converted to HSV to see if it was red or yellow but that was quite finnicky to adjust and I eventually decided to go for another option. I also tried converting the RGB values to LAB colours, and got the Euclidean Distance between that and the lab values of red and yellow to see which one is less. That also did not work as expected. I also tried various smaller ideas but all of them had some shortcoming one way or another also. Here are the colours I am trying to identify as red or yellow, the dull ones should be classified as neither:
对于如何区分这些 colored颜色 是红色还是黄色(或者如果它们都不是,那就忽略它们),你有什么 idea 吗?