image composition from radial and azimuthal average

Posted by Jan-Peter Urbach-2 on
URL: http://imagej.273.s1.nabble.com/image-composition-from-radial-and-azimuthal-average-tp3694371.html

Dear all,
I want to approximate an image by the product of its radial and azimuthal
average, i.e. if z(x,y) is the image, I would like approximate it by an
image of the form z_av(x,y)= R(r)*A(phi), with r and phi being the
respective polar coordinates of (x,y):
r=sqrt(x^2+y^2) and phi=atan(y/x) (plus some sign gymnastics).

I think I can get the functions R and A through the plugins
"Azimuthal Average" and "Radial Profile Angle", but what I am missing yet
is a way to compose the approximated image from R(r) and A(phi).
Is there a plugin for ImageJ that does something like this?

I first thought I can do this easily in my own (despite the fact that I
have almost no experience in java programming) as it seems to be quite
straight forward: looping over all pixels, calculate the angle and the
radius from the pixel coordinates and then lookup the appropriate weights
in the functions R(r) and A(phi).

At the second thought, I have the impression, that such a simple lookup
approach introduces quite significant errors near the center of the origin,
due to the finite extension of the pixels. A possible approach that I
thought of, is to devide each pixel into a set of subpixels and lookup the
radial and angular weight for each sub-pixel. The "parent" pixel value
would then be the average of all respective subpixels. The number of
subpixels should decrease with the distance from the center.
I am not sure whether this is the most efficient and/or the correct way to
solve the task. So I would be thankful for any input regarding an existing
plugin or to some better solution.

Thanks in advance
JP