h3.m
来自「ESTIMATION OF AIRCRAFT TRAJECTORY FROM I」· M 代码 · 共 40 行
M
40 行
clc
delt = 0.1; % Temporal sample time of the generated sequence
num_frames= 64; % Number of frames generated
framesize = 64; % Frame size (frame is assumed square)
out = zeros(framesize,framesize,num_frames); % Initialize movie storage as a 3D Array
generatetarget;
generatebackground;
definedrift;
maxout = max(max(max(background)));
minout = min(min(min(background)));
generatevibs;
% Simulate the effect of background motion, target motion and jitter motion
% on the image seen by the tracker:
disp('Calculating...');
clf; drawnow;
backgrounddrift;
targetmotion;
minout = min(min(min(out)));
maxout = max(max(max(out)));
opticsblurredimage;
minout = min(min(min(out)));
maxout = max(max(max(out)));
image((out(:,:,1)-minout)*64/(maxout-minout));
% Generate a movie of the frames:
minout = min(min(min(out)));
maxout = max(max(max(out)));
title('Tracking of the Aircraft (Real Time)','Color','b','FontSize',14);
M = moviein(num_frames);
for j = 1:num_frames
image((out(:,:,j)-minout)*64/(maxout-minout))
drawnow
M(:,j) = getframe;
fprintf(1,'.');
if mod(j,16)==0
fprintf(1,' (%d)\n ',j);
end
end
movie(M);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?