After a week of debugging I got the code to do what I wanted. I have successfully detected a bit stream in the chessboard marker image. I had to correct for a small error that I encountered las week that was related to the hard color values that I was using. I changed the code so that now I am using a dynamic color range. The range is created with known colors in known positions. With this range I can adjust to specific image characteristics.
After I killed the last bug in my code I went ahead and took pictures in different lighting setups. The algorithm correctly detected all the colors in the marker in all the pictures. I have to further test with outdoors lighting to see if it affects the algorithm at all. I’ll be doing this in the coming days.
There is still a lot to do to get this to work with our Biologists collaborators: 1. There needs to be a part of the application that creates the chessboard markers; 2. There needs to be a semi-decent GUI to initialize the picture analysis process; 3. The part of the application that takes care of differentiating the images does not exist; 4. We could code stuff in a more efficient way. Though these four things are currently lacking, they are the least of my worries. The algorithm that detects the marker works; the rest is icing on the cake.
You can get the code here. I currently do a very crappy job at describing how to use the code. This will also improve in the coming weeks. :)