Exclude source pixels from convolution if below threshold

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Exclude source pixels from convolution if below threshold

Neil Fazel
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