Thanks a lot, Image Analyst for your code and information. It is very related to my current project: I need to process microscopy image (measured), which needs such background intensity correction, as well as some dust subtraction. I'm doing this by FFt processing of "blank" shot, its low frequency FFT component I use as illumination distribution, intensity, while
and as processed image, (processed) I use
processed = (measured - dust) / intensity
Result is much better than raw "measured" data.
About distortion compensation, it seems that I found a way how to realize it without pixel to pixel calculations: exchange it by column to column calculations after realization cart2pol transformation: each image radius will corresponds to its column. So for such transformation I only needs to shift and interpolate columns' data. Recently I saw in Answers image of cart2pol transformation, but lost reference. It could save me some coding time, but this is not crytical
I'm writing a letter to ML authorities. Thanks again for your help.