pythonopencvimagej

What does imagej - convolver - normalize kernel do?


The convolver process in imagej has the "normalize kernel" option. I'm curious about what the normalized kernel does and how it can be implemented in Python to cv2 filter2D.


Solution

  • From the ImageJ docs:

    Normalize Kernel causes each coefficient to be divided by the sum of the coefficients, preserving image brightness.

    In cv2.filter2D you can pass a kernel, if you want to normalize it (if not already), you just need to divide every entry by the sum of all entries in the kernel.