Really quickly: The separable convolution in DIPlib is based on the separable framework (documentation, (code)). The framework calls a *line function* for each line in the image. It will copy the line to a temporary buffer, and add pixels on either side (boundary extension) so that the line function doesn’t need to do anything special for the pixels close to the image edge. The output of the line function is then written directly to the output image. The line function for the separable convolution is pretty straight-forward (see the code, lines 133-225). The Gaussian smoothing filter is an even (symmetric) filter (2nd case), so we can make use of that evenness to save on some multiplications.

The framework is all new code, but it follows the concepts and ideas of the original DIPlib code. The line filter is slightly modified from the original code, the biggest difference is that the switch statement used to be within the loop over the pixels in the line, now there is one loop within each switch case.

Maybe I’ll write a more detailed description some day.

]]>Could you elaborate on the new implementation of the Gaussian Blur filter (Or basically the Separable Filter)?

It would be nice reading and learning about it.

]]>Honestly, I don’t remember why this difference, or who’s definition I was following when I wrote this post. But given that γ is a constant, you can set γ_{mine} = -1/γ_{theirs}, and get the same equation back.

I highly recommend that you write out the derivation for yourself, you’ll learn a lot from it, and you might discover typos in Kass’ paper or in my blog post. ðŸ™‚

]]>You’ve got: AXt + fx = (Xtâ€“Xt-1) / Î³.

But in the original paper in equation (17)

They’ve got: AXt + fx= -Î³(Xtâ€“Xt-1).

Could you please clarify me why the original paper have minus for the gamma value?

You need to install DIPimage: http://www.diplib.org/

]]>The matrix elements come from the two equations that are written just above it. The matrix elements at (0,0), (1,1), … (i,i) (i.e. the main diagonal) correspond to the component of the equation that multiplies *x*(*i*). The diagonals one to the right and left of the main diagonal correspond to the *x*(*i*+1) and *x*(*i*-1) components, etc.

Thanks for letting me know of the broken link. I’ve fixed it now, and uploaded the script here: http://www.crisluengo.net/wp-content/uploads/ccarea.m

]]>I am trying to understand how you computed the matrix A whose values are represented in the combinations of Î± and Î². For instance, how did you arrive at the A[0,0] value -2Î±-6Î²? I would highly appreciate your help. Thank you for your time!

]]>