You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
889 B
Matlab
31 lines
889 B
Matlab
clear all;
|
|
close all;
|
|
clc;
|
|
|
|
[ratio,MTF_static,MTF_defocus,MTF_zg,MTF_hp,MTF_plj,MTF_hot,MTF_gas,dp_push] = readinput_MTF();
|
|
|
|
% 获取当前文件的路径
|
|
currentFilePath = mfilename('fullpath');
|
|
|
|
% 从文件路径中提取所在文件夹的路径
|
|
[currentFolderPath, ~, ~] = fileparts(currentFilePath);
|
|
|
|
Pic_origin = imread('MTF_simulation_input.png');
|
|
% figure()
|
|
% imshow(Pic_origin)
|
|
|
|
[MTF_onorbit_all_Np, MTF_onorbit_all, Pic_blurred] = MTF_simulation(ratio,MTF_static,MTF_defocus,MTF_zg,MTF_hp,MTF_plj,MTF_hot,MTF_gas,dp_push,Pic_origin);
|
|
|
|
% figure()
|
|
% imshow(uint8(Pic_blurred))
|
|
|
|
name_str2 = 'MTF_simulation_output.png';
|
|
imwrite(uint8(Pic_blurred),name_str2);
|
|
|
|
%将MTF_onorbit_all_Np矩阵的值写入output_result(1).txt中
|
|
dlmwrite('output_result(1).txt',MTF_onorbit_all_Np,'delimiter',' ');
|
|
|
|
%将MTF_onorbit_all矩阵的值写入output_result(2).txt中
|
|
dlmwrite('output_result(2).txt',MTF_onorbit_all,'delimiter','\t');
|
|
|