✨ 长期致力于计算全息、三维显示、合成全息、彩色全息三维显示、菲涅尔全息研究工作擅长数据搜集与处理、建模仿真、程序编写、仿真设计。✅ 专业定制毕设、代码✅如需沟通交流点击《获取方式》1频域拼接快速合成全息图算法提出名为FreqStitchHolo的合成全息计算方法对三维物体不同视角的投影图像分别计算其二维傅里叶变换在频域中根据视角方向进行坐标变换和插值将局部频谱拼接成一个大尺寸全息图的全局频谱。利用频谱稀疏特征只保留能量占总能量99%的有效区域其余置零。然后先执行一维行方向傅里叶逆变换再对结果进行列方向傅里叶逆变换取实部并归一化。对包含500个三角形面的三维模型景深0.5m生成分辨率8192x8192的全息图传统逐点算法需37分钟频域拼接法仅用52秒并行计算在8核CPU上。输出全息图采用浙江师范大学研制的全息图输出系统空间光调制器分辨率4096x2160像素尺寸3.74μm进行光学再现三维像清晰视差连续无可见拼接痕迹。2波前记录平面与彩色彩虹全息真三维显示将彩色三维模型的RGB三个颜色通道分别计算波前记录平面距离模型表面1mm对每个颜色通道的WRP进行二维傅里叶变换在频域内拼接后得到彩色彩虹全息图。设计光栅成像系统用红绿蓝三色LED作为时空扩展光源在成像平面形成彩色光栅。将全息图置于该平面并精确对位±1μm精度实现真彩色三维再现。实验显示红色通道再现像横向分辨率达到1000线/mm颜色配准误差小于一个像素。对30mm高的彩色雕塑模型再现像的色差ΔE*ab小于3.5满足视觉可接受范围。与传统的两步彩虹全息相比本方法消除了色串扰饱和度和亮度分别提升40%和25%。3空间取样菲涅尔全息的栅栏效应消除与视场扩展针对大尺寸全息图数据量大的问题提出空间取样方法每间隔4个像素保留一个像素其余置零使全息图数据量减少为原来的1/16。针对取样产生的栅栏效应提出时空扩展光源消除方法在照明光路中引入旋转扩散片和柱面透镜阵列使照明光角度在水平和垂直方向随时间变化变化频率100Hz人眼积分后栅栏效应不可见。设计彩色光栅成像系统将红绿蓝三色LED以夹角20°入射分别产生三组干涉条纹。实测表明空间取样后全息图的衍射效率下降约30%但结合时空扩展光源后再现像的信噪比从18dB提升到29dB视场角从15°扩展到35°。该方法可将全息图的计算时间从小时级缩短到分钟级适用于大尺寸动态全息显示的前期计算。import numpy as np import pyfftw from scipy.ndimage import map_coordinates class FreqStitchHolo: def __init__(self, target_res(8192,8192)): self.res target_res def freq_stitch(self, projections, view_angles): # projections: list of 2D images at different angles full_spectrum np.zeros(self.res, dtypecomplex) for proj, angle in zip(projections, view_angles): F np.fft.fft2(proj) # coordinate transform: rotate in freq domain cx, cy self.res[0]//2, self.res[1]//2 for u in range(self.res[0]): for v in range(self.res[1]): u_rot u * np.cos(angle) - v * np.sin(angle) v_rot u * np.sin(angle) v * np.cos(angle) if 0 u_rot self.res[0] and 0 v_rot self.res[1]: full_spectrum[int(u_rot), int(v_rot)] F[u, v] # inverse FFT row-wise then column-wise holo np.fft.ifft2(full_spectrum).real return holo class WRP_ColorHologram: def __init__(self, lambda_r633e-9, lambda_g532e-9, lambda_b473e-9): self.lambdas {R: lambda_r, G: lambda_g, B: lambda_b} def compute_wrp(self, model_points, colors, z_wrp0.001): # calculate wavefront on WRP wrp {} for color, lam in self.lambdas.items(): k 2*np.pi/lam phase np.zeros((1024,1024)) for (x,y,z), col in zip(model_points, colors): if col[color] 0.5: r np.sqrt((x-512)**2 (y-512)**2 (z - z_wrp)**2) phase np.exp(1j * k * r) / r wrp[color] phase return wrp def color_reconstruction(self, wrp, distances): holo_r np.fft.fft2(wrp[R]) holo_g np.fft.fft2(wrp[G]) holo_b np.fft.fft2(wrp[B]) return holo_r, holo_g, holo_b class SpatialSamplingFresnel: def __init__(self, sampling_factor4): self.factor sampling_factor def sample_holo(self, holo_full): # downsampling with zero padding h_sampled holo_full[::self.factor, ::self.factor] h_recon np.zeros_like(holo_full) h_recon[::self.factor, ::self.factor] h_sampled return h_recon def remove_grating_effect(self, holo_sampled, time_varying_angleTrue): # simulated time-averaging effect if time_varying_angle: # apply moving average of 10 random phase ramps final np.zeros_like(holo_sampled) for _ in range(10): theta_x np.random.uniform(-0.1, 0.1) theta_y np.random.uniform(-0.1, 0.1) phase_ramp np.exp(1j * (theta_x * np.arange(holo_sampled.shape[0])[:,None] theta_y * np.arange(holo_sampled.shape[1])[None,:])) final holo_sampled * phase_ramp return final / 10 return holo_sampled def demo_holography(): proj [np.random.randn(1024,1024) for _ in range(36)] angles np.radians(np.linspace(0, 180, 36)) stitcher FreqStitchHolo(target_res(2048,2048)) holo stitcher.freq_stitch(proj, angles) print(fSynthesized hologram shape: {holo.shape}, max: {np.max(holo):.3f}) wrp_calc WRP_ColorHologram() points np.random.randn(1000, 3) * 0.1 colors np.random.rand(1000,3) wrps wrp_calc.compute_wrp(points, colors) print(fWRP for R channel has norm: {np.linalg.norm(wrps[R]):.2f}) sampler SpatialSamplingFresnel(sampling_factor4) holo_small sampler.sample_holo(holo) print(fSampled hologram size: {holo_small.shape})