Login  Register

Re: Representing Phases and Doing Calculations with them in Images?

Posted by Michael Schmid on Oct 02, 2014; 5:15pm
URL: http://imagej.273.s1.nabble.com/Representing-Phases-and-Doing-Calculations-with-them-in-Images-tp5009868p5009871.html

Hi Jacob,

It is not really clear to me what you want: Filter the image with the phase?

Then, one way might be converting the phase to two channels, sin(phase) and cos(phase).
Then you can e.g. filter both the sin and cos channels, and use the atan2 function to recover the phase from the two filtered images.

Or do you just want to rotate the phase such that the 'typical' value is 0?
Then take the average over the sin(phase) and cos(phase) values, use atan2 on the result to get the 'typical phase', and subtract it from all phases. Thereafter loop through all pixels, subtract 2*pi from those above pi, and add 2*pi to those below -pi.

Michael
________________________________________________________________
On Oct 2, 2014, at 18:46, Rebecca Keller wrote:

> Dear ImageJ Community,
>
> I've recently come across an interesting issue: representing phases an
> image. I've got phase-images with ranges -pi to +pi radians, but the trick
> is how to make this continuous range into a linear one. I.e., although the
> phases (3.13 and -3.13) are actually very close in terms of phase, they are
> far arithmetically, whereas (0.1 and -0.1) are just as close in phase but
> are very close arithmetically. I am not sure how to combine the phases,
> then, with non-cyclic information, like amplitude.
>
> My goal here is to use the phases as a filter, presumably simply by
> multiplying by the corresponding amplitudes, but for this, the closeness in
> phase to some given value should be represented by the values in the image,
> perhaps with the set value being the maximum? I guess this is equivalent to
> rotating the phases, such that the preferred value is at the "top" of the
> circle? But I can't think how to do this mathematically in the images.
>
> All the best,
>
> Jacob Keller

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html