« first day (2512 days earlier)      last day (708 days later) » 

1:51 AM
 
 
6 hours later…
8:14 AM
Question for the FFT wizards about how you'd implement something like this (SPECT related): Say you have a "depth-dependant" gaussian. So, a 1D Gaussian filter you want to apply to an image, but its std changes with the row number. Say that you can also "rotate" this Gaussian around the image, i.e. this also applies to some arbitrary angle (so its not anymore "row number" but some "distance from edge" that defines the width of the std).
how would you approach implementing in code such thing?
is there some FFT magic here I am missing, or do I need to do N FFTs??
 
8:35 AM
gauss filter as in smoothing stuff?
it sounds quite nonlinear
also does it have to be an "exact" gaussian or can you allow for some approximation stuff?
 
uhh probably approximate is good enough, but lets assume full gaussian for now.
the creation of these gaussians is not an issue, the filtering step is. I can't think of another way rather than filter N times
but maybe @LuisMendo or @CrisLuengo , our local FFT wizards have smarter ideas
@flawr its non linear if you do it "in one go" right?
there is no way around that
 
9:33 AM
@AnderBiguri if you don't do it on one go:)
 
if you don't do it in one go, you can spit the image into N rows, and just apply fft to that, right? so it is piecewise linear
 
yep you could say that
I was wondering how you're planning to do an angled 1d filtering.
 
yeah fair. Rotating the image, but thats ugly
 
I mean you can also apply the rotated kernel in the fourier space but that is quite ugly too
 
10:18 AM
@SardarUsama oh brother. Not a joke. Dynamic variable names on steroids
@AnderBiguri I'm not really an FFT person, but I would try 1. spelling out the usual Gaussian kernel DFT as a matrix operation (assuming that applies) then 2. doing a transform on the matrix elements of the kernel, and see if the result can be rewritten in a way that can make use of FFT machinery...
 
@AnderBiguri in the non-angled case: couldn't you also just stretch each row apply gauss of all the same size, then unstretch? It is probably even more inefficient though:)
 
yeah, its the same as applying a different gauss, you still need to do each row independently
I think I am just looking at a XY problem, just found the particular Y interesting to think about
 
 
2 hours later…
12:15 PM
@AnderBiguri If I understand correctly, the rotation and depth-dependence prevent you from using separable FFT's. Furthermore, because of depth-depence you can't even use convolution, right? Convolution would apply the same kernel in all rows / distances-from-edge
 
 
@LuisMendo yes indeed
@flawr hahahaha
well, this is an actual problem in SPECT, but the implementation itslef doenst need to happen in FFT
 
Slow Fourier Transform?!
 
12:53 PM
@flawr dem procrastinating in their fancy university buildings thinking themselves all chique and old ;)
 
hey, my stuff comes from a real problem. Its flawr who is always bringing Y problems!
 
he is saying my problems are not real ):
 
you admit to such!
 
but it hurts on a different level if someone else is saying it
 
hahaha
non-real problems are more fun anyway
you can stop at them when you understood how to solve them, instead of needing a complex implementation
 
1:01 PM
what's this "implementation" you speak of?
 
1:25 PM
hahaha
the thing that will kick me out of academia
 
@flawr no, you always produce complex stuff
 
1:45 PM
@AndrasDeak--СлаваУкраїні that's some dirty thing applied scientists apparently do - best to ignore it
@Adriaan you're the only one recognizing the complexity of my problems
 
flawr*i
 
 
1 hour later…
2:50 PM
@AnderBiguri That's not a convolution, so cannot be computed through FFT. You need to loop over the image, and at each pixel find your kernel, multiply it by the neighboring pixels, etc. This is not necessarily bad, a lot of filters are implemented that way.
Obviously DIPlib has an implementation for you: diplib.org/diplib-docs/…
 
makes sense yes.
hahah great, DIPlib always to the rescue!
 
(cringe, documentation text is poorly worded, will have to rewrite some of those sentences)
> params[0] is the angle of the orientation
If you have only a few different kernel shapes (a few different orientations, or a few different sizes) then you can apply those filters to the whole image, and in a second step select one result for each pixel. Could be much faster because the individual filters would then be separable and thus cheaper to compute.
Depends on the size of the kernels, and the number of different ones you need to apply.
 
yeah, but assuming the opposite in fact, that its a continous thing, that I can discretize to pixel size
 

« first day (2512 days earlier)      last day (708 days later) »