Image shift

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

Image shift

Breukers, C (TNW)
Dear ImageJ'ers,

 

What would be the quickest (automized) way to determine a XY shift
between two images, which are displaced with a few pixels with respect
to eachother?

 

I have tried transforming the images to the frequency domain by
generating their FFT.

Subsequently I mulitplied these two FFT's and took the inverse of the
result.

Unfortunately I am not sure how to get the XY displacement as a result.

 

Kind regards,

Christian

---------------------------------------------------
Christian Breukers
Medical Cell Biophysics Group
Faculty of Science and Technology
University of Twente
The Netherlands
E.: [hidden email] <mailto:[hidden email]>  
I.: www.tnw.utwente.nl/mcb

---------------------------------------------------

 
Reply | Threaded
Open this post in threaded view
|

Re: Image shift

Michael Schmid
Hi Christian,

you can use Process>FFT>FD Math Correlate with 'do inverse transform'  
and find the maximum. This needs square images of size 2^n

Alternatively, you could search the web for "optical flow" and  
ImageJ. Well-programmed optical flow algorithms are faster than FFT  
in case of small displacements and have no 2^n restriction of the  
image size.

Michael
________________________________________________________________

On 22 Jun 2009, at 09:02, Christian Breukers wrote:

> Dear ImageJ'ers,
>
>
>
> What would be the quickest (automized) way to determine a XY shift
> between two images, which are displaced with a few pixels with respect
> to eachother?
>
>
>
> I have tried transforming the images to the frequency domain by
> generating their FFT.
>
> Subsequently I mulitplied these two FFT's and took the inverse of the
> result.
>
> Unfortunately I am not sure how to get the XY displacement as a  
> result.
>
>
>
> Kind regards,
>
> Christian
>
> ---------------------------------------------------
> Christian Breukers
> Medical Cell Biophysics Group
> Faculty of Science and Technology
> University of Twente
> The Netherlands
> E.: [hidden email] <mailto:[hidden email]>
> I.: www.tnw.utwente.nl/mcb
>
> ---------------------------------------------------
>
>
Reply | Threaded
Open this post in threaded view
|

Save and open interactive histogram?

John Oreopoulos
I am not sure if there is a method to do this already, but if not, I  
would like to request this as a future feature of ImageJ.
I would like to be able to save an image histogram and when it is  
opened again in ImageJ still be able to hover over various regions of  
the histogram and have the bin and bin count values reported like  
they are when the histogram is made the first time before saving.

John Oreopoulos
Reply | Threaded
Open this post in threaded view
|

Re: Save and open interactive histogram?

Gluender-3
John,

because histogram-data of grey-level images consists of two arrays
(values and counts) you store them as a text-file by clicking "save".
You may load this data-file from a macro that then displays the
histogram-plot, e.g. by calling

Plot.create( "Histogram", "Value", "Count", values, counts );
Plot.show();

The histogram-plot provides the numerical cursor coordinates, i.e.
value and count.

>I am not sure if there is a method to do this already, but if not, I
>would like to request this as a future feature of ImageJ.
>I would like to be able to save an image histogram and when it is
>opened again in ImageJ still be able to hover over various regions
>of the histogram and have the bin and bin count values reported like
>they are when the histogram is made the first time before saving.
>
>John Oreopoulos

Happy macro-coding!

HTH
--

                   Herbie

          ------------------------
          <http://www.gluender.de>