In the image generated by scipy.signal.resample (right figure, top right) some intensity fluctuations are visible, whereas skimage.measure.block_reduce does not seem to give this behaviour. Using the argument func=np.mean gives more representable pixel values that do not depend on the block_size. Therefore the downsampling method should be changed to skimage.measure.block_reduce
Currently
scipy.signal.resample
is used for downsampling images (see https://github.com/rhoitink/simulatedmicroscopy/blob/main/simulatedmicroscopy/image.py#L320-L322), butskimage.measure.block_reduce
seems to give more accurate downsampling results:In the image generated by
scipy.signal.resample
(right figure, top right) some intensity fluctuations are visible, whereasskimage.measure.block_reduce
does not seem to give this behaviour. Using the argumentfunc=np.mean
gives more representable pixel values that do not depend on theblock_size
. Therefore the downsampling method should be changed toskimage.measure.block_reduce