我想在具有不同 SNR 级别的原始图像中添加白噪声,但不知道该怎么做。
原始图像是(256, 128)
我正在使用acoustics
包添加噪声。
original = cv2.imread(path)
white = acoustics.generator.white(256*128).reshape(256, 128)
out = original + white*255
cv2.imwrite(path, out)
我的问题:
log10(mean(original)/ std(original + white*255))
算作 SNR 吗?(根据wiki)如果是这样,我可以只修改
*255
这个数字来修改 SNR 吗?如果不是,我如何计算 SNR 值?