为什么在彩色图像上不能进行傅立叶变换(dft)?为什么只能在灰度图像上进行傅里叶变换?
我正在研究逆过滤,我试图编码它,我从网上找到了一些参考.每个人都考虑过光学传递功能,这在我所指的Gonzalez Book中无处可见.
% Inverse_Filter_Demo-
clc
clear all
close all
original_image=imread('cameraman.jpg'); %loading the original (un-blurred) image
original_image=double(original_image);
%The blur function (PSF- Point Spread Function) that will be added to the original image
PSF=fspecial('motion',20,45);
%Adding blur to the original image
degraded_image = imfilter(original_image,PSF,'circular','conv');
OTF= psf2otf(PSF,[size(degraded_image,1) size(degraded_image,2)]);%Getting OTF from PSF
Inverse_Filter=conj(OTF)./((abs(OTF)).^2); %The inverse filter
%Preforming Fourier Transform to the degraded image
FT_degraded_image=fftn(degraded_image);
%Preforming the restoration itself
restored_image=abs(ifftn(FT_degraded_image.*Inverse_Filter));
%Presenting the restoration results:
figure;
set(gca,'Fontsize',14);
colormap(gray);
imagesc(original_image,[0 255]);
truesize;
title('Original image');
figure;
set(gca,'Fontsize',14);
colormap(gray);
imagesc(degraded_image,[0 …Run Code Online (Sandbox Code Playgroud) 在"C"中的套接字编程中,如何找到连接到服务器的客户端的IP地址?服务器如何获取客户端的IP地址?