Fwd: Temporal Boxcar Filter?

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

Fwd: Temporal Boxcar Filter?

Jacob Keller-2
Is there a way to do boxcar smoothing of arbitrary size in the time
dimension?

JPK

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Temporal Boxcar Filter?

Saalfeld, Stephan
Hi Jacob,

you could reslice to map t into x or y, do the boxcar there and reslice
back.

If you're happy hacking a bit, you could also use my ImgLib2 port of
Unser and Sage's convenient ImageAccess

https://github.com/axtimwalde/ImgLib2Access

to simply do it in time:

https://github.com/axtimwalde/ImgLib2Access/blob/master/src/main/java/net/imglib2/imglib2access/Code.java#L113-L127

and if you want to be even fancier, you can convert your image into an
integral time series (just make each frame the sum of all previous
frames + itself (use higher precision type to store the numbers)), and
then do ultra-efficient box filters of arbitrary size exploiting that

$\sum_a^b = \sum_0^b - \sum_0^a$

Best,
Stephan



On Tue, 2015-11-17 at 22:33 -0500, Jacob Keller wrote:
> Is there a way to do boxcar smoothing of arbitrary size in the time
> dimension?
>
> JPK
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Temporal Boxcar Filter?

Jacob Keller-2
Thanks very much Stephan--these are excellent ideas!

Jacob

On Tue, Nov 17, 2015 at 11:01 PM, Saalfeld, Stephan <
[hidden email]> wrote:

> Hi Jacob,
>
> you could reslice to map t into x or y, do the boxcar there and reslice
> back.
>
> If you're happy hacking a bit, you could also use my ImgLib2 port of
> Unser and Sage's convenient ImageAccess
>
> https://github.com/axtimwalde/ImgLib2Access
>
> to simply do it in time:
>
>
> https://github.com/axtimwalde/ImgLib2Access/blob/master/src/main/java/net/imglib2/imglib2access/Code.java#L113-L127
>
> and if you want to be even fancier, you can convert your image into an
> integral time series (just make each frame the sum of all previous
> frames + itself (use higher precision type to store the numbers)), and
> then do ultra-efficient box filters of arbitrary size exploiting that
>
> $\sum_a^b = \sum_0^b - \sum_0^a$
>
> Best,
> Stephan
>
>
>
> On Tue, 2015-11-17 at 22:33 -0500, Jacob Keller wrote:
> > Is there a way to do boxcar smoothing of arbitrary size in the time
> > dimension?
> >
> > JPK
> >
> > --
> > ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

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