image composition from radial and azimuthal average

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

image composition from radial and azimuthal average

Jan-Peter Urbach-2
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
Reply | Threaded
Open this post in threaded view
|

Re: image composition from radial and azimuthal average

Michael Schmid
Hi Jan-Peter,

Concerning the radius, probably it would be enough to interpolate in  
the R(r) table. Then you can use R at the exact radius=sqrt(x^2+y^2).

For phi, you will probably have to average over some range  
corresponding to the (x,y) pixel at low r; at r=0 you should average  
over 360 degrees.
For large r, depending on the resolution of your A(phi) table, you  
may have to interpolate.

Michael
________________________________________________________________

On 28 Nov 2008, at 10:20, Jan-Peter Urbach wrote:

> 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