通道数不同会影响图像数据的 shape ,例如: (256, 256, 3) 、(256, 256) 很多人按照MATLAB的习惯,使用 np.random.randn 来生成高斯噪声,则需要根据通道数调整参数。 1 2 3 4 # RGB noise=sigma*np.random.randn(256,256,3) # GRAY noise=sigma*np.random.randn(256,256) 为了通用的处理,最好使用 n...
www.jb51.net/article/2411...htm 2024-5-9