We could have used floating point but when we tried it out we were able to get it to read the tips of our fingers (at least very close to them) so we just left it with how it worked.
We get really good precision with almost no calibration so I’m thinking that maybe the problem is not the code itself but maybe the surface you intend to use (as I know you tried lcds). Now that I remember, you should be able to use irregular surfaces with your method as it seems to be the same as ours. I’ll get the code and post it later (not on this computer).
I also think that if the method is similar the only real difference could be the modifying of the values after calculating the difference. Since ofxOpenCv has its own ways of dealing with threshold we gave it what it needed to get the job done easily so this is the reason we process per pixel.
To me this seems to be more a signal processing problem than it is a programming one so we wrote it on paper and then in code really quickly.
Edit-> I also remember trying out the brightness/contrast function in openFrameworks which is supposed to work like the one in Photoshop. We never got it to work so we just processed every pixel ourselves to give it full contrast for every difference.