Login  Register

Exclude source pixels from convolution if below threshold

Posted by Neil Fazel on Nov 06, 2013; 11:08pm
URL: http://imagej.273.s1.nabble.com/Exclude-source-pixels-from-convolution-if-below-threshold-tp5005482.html

Is there a way to exclude pixels when applying a 1-D convolution filter? I'm trying to get the convolution filter to apply a 19x1 kernel only to pixels which have a value above a threshold. The destination pixels would still be all pixels in the image; however, the source pixels below a threshold would be excluded from consideration when applying the kernel.

I had hoped that by setting the pixel value to NaN for the pixels that I would like to exclude, the convolution filter would ignore them and move on to the next pixel. But that didn't work.

If nothing else worked, I will do this in Java, but I thought maybe there's a smart way to do this.

Thanks,
Neil

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