PixInsight Forum (historical)
Software Development => PCL and PJSR Development => Topic started by: kwiechen on 2014 August 11 12:59:46
-
I am trying to use Image.convolve() with LoG kernels to find local maxima. With Image.convolve(kernel matrix) out of range values are truncated, so the output is rather different from a matlab walktrough. Is there any documentation about the other parameters of Image.convolve() to use the filter response for positive and negative values?
Best regards,
Kai
-
+1. Had same problem when doing peak detection. Input, kernel, and output may all be outside 0 to 1. I would like a convolve option for this case that does no normalization, just a simple sum of the products.
Mike
-
Since Core version 1.8.1, use an optional parameter to call the Image.convolve() and Image.convolveSeparable() methods:
void Image.convolve( Array kernel[, int highPassMode=0] )
void Image.convolve( Matrix kernel[, int highPassMode=0] )
void Image.convolveSeparable( Array rowVector, Array colVector[, int highPassMode=0] )
void Image.convolveSeparable( Vector rowVector, Vector colVector[, int highPassMode=0] )
The highPassMode argument changes the way high-pass filtered images are manipulated after convolution. The following values are recognized:
0 : Truncate the convolved image to [0,1]. This is the default value.
1 : Rescale the convolved image to [0,1].
2 : Raw high-pass filter mode: Leave the convolved image unchanged.
This parameter is ignored for low-pass filters. Let me know if this is what you want.
-
I think Image.convolve wih "2 : Raw high-pass filter mode" should work together with LoG filtering to get something like a maximum map of an image.
Thank you very much!
Kai