how to do this with pandas.
why do you need to have different size per iteration of the inner loop for example? especially since the result of the median will be the same for each two consecutive runs (per i or j)
Algorithm is selecting nxn neighborhood for each index i and j , then replace [i, j] current value with median value obtained from nxn neighbour of particular index. And (i, j) index is always in center of nxn matrix , here n is represented using ksize.
Обсуждают сегодня