How to implement Retinex algorithm ?/



Dear All,

Right now i'm interested with retinex algorithm. I tried search in
internet.. get some paper about it.. but get problem how to implement
the algorithm in c++/basic.

The formula for retinex is :

fi(x,y) = log[Ii(x)] - log[Ii(x,y) * M(x,y)] ... * = convolution

M(x,y) = exp (-x^2/c^2)

I don't understand what is x,y there .. is that a pixel, or else.. or
what?

Can someone help to to write it in c++/basic.. with image size n x m.



Thanks for the attention.

.