Put It Into Reverse: Image Color to Value
Wed, 06/21/2017 - 05:19 pm
Here is the problem I am busy singing (well not actually singing because for me that would be a very bad thing) the praises if IP with one of my clients and the request comes up. They do CFD simulations and often times the internal client says well what is the difference between the two cases. At this time they have images (bmp files) of the analysis which takes 24 hours to run and the exported data is many GB.
So the request was can you just subtract one image from the other? And yes you can with some caveats about using a float wave to preserve the negative numbers. In a proof of concept I converted the color bmp to grayscale and did the subtraction. What I really should do is convert the color of the pixel to an accurate value. For arguments sake let's assume that the color mapping is a rainbow and I know the values of minimum and maximum, say rainbow going from 0 to 50. What would be the methodology to read the pixel color and translate it back to a value within the range?