One of the most useful things OpenCV has is YML file library. I canno't believe have easy to use they are. Before I learned this, I was making complicated algorithms and writing array of data like detected keypoints or descriptrs in "txt" file. But there is much simpler solution...

Basically one of the most interesting built in algorithms in OpenCV are feature detectors. In this tutorial I will cover only SURF algorithm, but be aware SURF and SIFT algorithm is not free, and shouldn't be used for commercial purposes only educational. Hopefully you will be able to modify the codefor other feature detectors as well (the free ones), like ORB, FAST, MSER, STAR, BRIEF etc.

Also, I think constantly balancing the LED intensities is problematic, because the absorbances of hemoglobin at different wavelengths should be different. I think balancing should happen once against a neutral background.