In my experience with image recognition algorithm making, I had the robot turn each pixel of the image into a rgb number and then if that number matched the color it is looking for, it called that pixel a 1. If the color did not match the color it was looking for it called that pixel a 0. In this way, it turned images into a series of 1's and 0's and then it compared that with the list of objects on file who were also in 1's and 0's form to see if the 1's and zeros within that image matched. If they did, he knew what object he was looking at. You can also set it to call it a match if it was within 95% of the desired 1's and 0's pattern it was looking form. This was a simple solution but enabled me to teach the robot to read, identify objects on screen, etc...