import math
import os
import numpy as np
from numpy import fft
import cv2
import matplotlib.pyplot as plt
plt.rcParams['font.sans-serif'] = ['SimHei']
plt.rcParams['axes.unicode_minus'] = False
def atmospheric_disturbances(img, c=0.001):
"""
modeling degradation fuction, math: $$H(u,v) = e^{-k(u^2 +v^2)^{\frac{5}{6}}}$$
param: img: input img
param: k:
"""
N, M = img.shape[:2]
u = np.arange(M)
v = np.arange(N)
u, v = np.meshgrid(u, v)
temp = (u - M// 2) ** 2 + (v - N // 2) ** 2
kernel = np.exp(-c * np.power(temp, 5 / 6))
return kernel
# 仿真运动模糊
def motion_process(image_size, motion_angle):
PSF = np.z
图像复原 大气模型
最新推荐文章于 2024-10-31 16:13:38 发布