For my final degree project I need to color the pixels of an image depending on the final value when using an specific equation.
For instance, for each pixel I have extracted the PA, P1, P2 and P3 values.
Then I use an exponencial equation to calculate one value (probability) of each pixel just like: Prob=1/(1+exp(2.213.*PA+2.358.*P1-1.625.*P2-1.257.*P3+3.128));
Finnally, if the Prob value is higher than 0.351 I want that pixel to be in green while if it's lower in red (for example, the colors don't matter).
If someone know's how to do it would be a great help, thank you in advanced.