Posted by
Kenneth Sloan-2 on
Nov 21, 2020; 12:02am
URL: http://imagej.273.s1.nabble.com/FloatProcessor-convolve-tp5024215p5024218.html
Thank you for the prompt and useful replies.
It took me a long time to figure this out!
Wayne- perhaps it would be useful to have a FloatProcessor.convolve() with a "normalize" parameter?
Or, at least a warning in the documentation that the kernel is normalized by default.
Perhaps the warning is in there, somewhere - I failed to find it.
Ah...as I was typing this, John provided a snippet of the documentation..
A nitpicker might point out that the normalization doesn't happen in the way described when the sum of the kernel elements is zero! But, I'm not a nitpicker.
If I had my druthers, I suppose I would prefer that "convolve" simply did a convolution. For those who want normalized kernels, I suggest a "normalizeKernel()" function - something like:
=============================================
float[] normalizeKernel(float[] kernel);
=============================================
But, it may be that it is easier (now) to implement:
=============================================
convolve(float[] kernel, int kernelWidth, int kernelHeight, boolean normalize);
=============================================
--
Kenneth Sloan
[hidden email]
Vision is the art of seeing what is invisible to others.
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html