向长波红外成像图注入非均匀噪声
1.效果图
左图:条纹噪声+沙点噪声
右图:仅含沙点噪声
2.python代码
def add_noise(img16, snr_sand, snr_stripe) -> np.ndarray:"""给 16bit 红外图像添加模拟噪声(包含沙粒噪声和条纹噪声),实现基于论文噪声模型的仿真。噪声模型:1. 沙粒噪声(V_k(i,j)):- 零均值高斯白噪声,方差由输入的 SNR_sand 计算。- 模拟红外探测器的瞬时随机读出噪声。2. 条纹噪声(B(i,j)):- 由列均值偏移 θ_j 和列内随机波动 ε_{i,j} 组成:B(i,j) = θ_j + ε_{i,j}- θ_j:每列的固定偏移,来自零均值高斯分布,方差 σ_θ² = (1/4)·σ_b²ε_{i,j}:列内像素的零均值高斯波动,方差 σ_b²- σ_b² 根据输入的 SNR_stripe 与图像信号方差计算。参数:img16: np.ndarray输入的 16bit 灰度图像(uint16)snr_sand: float沙粒噪声的信噪比 (dB)snr_stripe: float条纹噪声的信噪比 (dB)返回:noisy_img16: np.ndarray添加噪声后的 16bit 图像"""h, w = img16.shapeimg = img16.astype(np.float32)signal_var = img.var()# 生成沙点噪声sand_var = signal_var / (10 ** (snr_sand / 10))sand_noise = np.random.normal(0, np.sqrt(sand_var), img.shape)# 生成条纹噪声stripe_var = signal_var / (10 ** (snr_stripe / 10))theta_j = np.random.normal(0, np.sqrt(stripe_var / 4), size=w)theta_map = np.tile(theta_j, (h, 1)) # shape=(h,w)epsilon = np.random.normal(0, np.sqrt(stripe_var), size=(h, w))stripe_noise = theta_map + epsilon# 向原图注入噪声sand_img16 = np.clip(np.round(img + sand_noise + stripe_noise), 0, 65535).astype(np.uint16)return sand_img16
3.参考文献
- 陈凯, 孙德新, 刘银年. 长波红外系统三维噪声模型及其分析[J]. 红外技术, 2015, 37(8): 676-679.(北大中文核心)
- Song L, Huang H. Spatial and temporal adaptive nonuniformity correction for infrared focal plane arrays[J]. Optics Express, 2022, 30(25): 44681-44700.(中科院SCI2区)
- Dandan L, **ang D, Mengyang C, et al. Nonuniformity correction method of infrared detector based on statistical properties[J]. IEEE Photonics Journal, 2024, 16(2): 1-8.(中科院SCI3区)