A simple color identifier for Raspberry Pi.
ReeeeeeeEeeeEeeeeed reeeeeeeeeeeeed blueeeeeeeeeeee white
- sudo apt-get install imagemagick fswebcam python-pip sox espeak
- sudo pip install colormath
-
fswebcam takes a picture
-
imagemagick divides the picture into 9 frames
-
imagemagick reduces each frame's colors to 8
-
from the 8 colors present in a frame, imagemagick picks the predominant one
-
colormath calculates which of the colors from a subset of 16 colors is the most similar to the main color's rgb values
-
espeak speaks the color of the central frame
-
if the color of the central frame is also present in the surrounding frames, sox slows down what is being spoken