To recognize a color, the lighting must be consistent, and an ROI (region of interest) often mapped. A live image may be matched against a reference image or a look up table, as RGB commonly. The math function can be relaxed to cover related colors in color-space. Alternatively, one might train or simply prompt a suitable GPT. Colorfilter/photo-detector and spectroscopy principles once served as well, and still find uses.
There's a recent post by out users showing exactly what you need:
https://www.hackster.io/mzandtheraspberrypi/robot-dog-sees-me-64e658
To recognize a color, the lighting must be consistent, and an ROI (region of interest) often mapped. A live image may be matched against a reference image or a look up table, as RGB commonly. The math function can be relaxed to cover related colors in color-space. Alternatively, one might train or simply prompt a suitable GPT. Colorfilter/photo-detector and spectroscopy principles once served as well, and still find uses.
Please refer to:
https://www.petoi.camp/forum/showcase/integrating-mu3-bittle-and-raspberrypi/dl-b16b4c45-7067-4521-9e6c-cc290fbd01a5?postId=65b061f06d5ee4001034d73c&origin=member_comments_page
https://www.hackster.io/mzandtheraspberrypi/robot-dog-sees-me-64e658