holoviz-topics / imagen

ImaGen: Generic Python library for 0D, 1D and 2D pattern distributions
https://imagen.holoviz.org/
BSD 3-Clause "New" or "Revised" License
31 stars 16 forks source link

Convolve with size=0 should be identity #50

Open jbednar opened 7 years ago

jbednar commented 7 years ago

Right now, if the Convolve operator is put on the output_fn of a pattern, as the size of the kernel pattern tends towards zero, the resulting image becomes more and more like the original image. However, when it reaches zero, the result has division errors, instead of becoming identity. It might be necessary to make a special case, perhaps by checking if self.kernel in imagen.sheet_tf.Convolve is all zeros?