亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? target_image_gen.m

?? target image program in zip file
?? M
字號:
function M = target_image_gen(target_velx,target_vely,target_velz)

%% Optical Sensor Image Generation
%
%This is just a edit of the demo provided by matlab.
%New features include target_velz and a function to simulate
%the targets aproach.
%Use: just put Vx, Vy and Vz and get a movie.
%Recomend using Vx = 1, Vy = 1, and Vz = 2.
%All credit goes to the MathWorks.
%
% Copyright 1990-2006 The MathWorks, Inc.
% $Revision: 1.10.2.4 $ $Date: 2006/12/20 08:32:52 $


%% Generating an Optical Sensor Image From Simulated Movement Data
%
% This script (aero_pointer_tracker.m) generates a movie with 64
% frames and a frame size of 64 by 64 pixels (at 10 frames
% per second).  The movie contains a simulation of a moving target
% that is moving through a structured background that is itself
% moving.  A jitter motion caused by random vibration is also
% generated (in a Simulink model called "aero_vibrati") and the jitter
% motion is added into the overall sensor motion. Finally, the image is
% blurred through a Gaussian optical point spread function.
% 
% Note: Changing delt here also requires a change in the parameters set-up
%       dialog box in the Simulink model "vibration".

delt = 0.1;      % Sample time of the generated sequence
num_frames= 64;  % Number of frames to generate
framesize = 64;  % Square frame size in pixels

out = zeros(framesize,framesize,num_frames);    % Initialize movie storage as a 3D Array


%% Generate a Target and Define Its Motion
%
% The first stage is to define the shape and motion of the target
% object.The shape chosen is a large plus sign, and the image
% is defined by a matrix representing the image intensity at
% each pixel position. The Target is defined to be travelling
% from centre to bottom right of the image.
% 

out = zeros(framesize,framesize,num_frames);    % Initialize movie storage as a 3D Array

%target_velx = 1;                 % target velcoity in x direction in pixels per second
%target_vely = 1;                 % target velocity in y direction in pixels per second
%target_velz = 2;                 % New feature<---------------------
target_x_initally = framesize/2; % the target is initially in the center of the frame in x
target_y_initally = framesize/2; % and in y
target_z_initally = 1;%New feature<----------------------

target = target_gen(5);%New feature<----------------------

figure(1);
colormap('gray');
image(target*32);
title('Target Image')


%% Build Background and Target Composite Image
%
% Generate a sinusoidally correlated background and give it a drift motion.
% Then, overlay the target onto the background image.
%

backsize = framesize+36;  % Make the background bigger than the frame so when it
                          % drifts there are new pixels available to drift into.
xygrid = (1:backsize)/backsize;
B=2*sin(2*pi*xygrid).^2'*cos(2*pi*xygrid).^2;

psd = fft2(B);
psd = real(psd.*conj(psd));

background = B + 0.5*randn(backsize);    % Add a specular gaussian white 
					 % sequence to the structure with 
					 % variance of 0.25  (sigma of 0.5).

xoff = 10;
yoff = 10;     % Sensor location is offset from the 0,0 of the background
driftx = 1;
drifty = 1;    % drift rate of the background in a and y directions pix/sec.

minout = min(min(min(background)));
maxout = max(max(max(background)));
figure(2);
colormap('gray');
image((background-minout)*64/(maxout-minout))
title('Background image with additive white specular noise')


%% Simulate the Tracker's Rotational Vibration
%
% Rotational vibration of the tracker is simulated using model aero_vibrati. 
% The data required to simulate the vibration of the tracker is generated 
% by running the Simulink model "aero_vibrati". 
%
% Run Simulink vibration model using sim command (Note -- if the delt is changed
% from 0.1 seconds, the Simulink model must be changed also to ensure that the
% sample time for the vibration match the sample time in this tracker image 
% model.
%
% The resulting random rotations are shown in Figure 1.
%

omega = 2*pi*5;       % The structural frequencies are 5, 10 and 15 Hz in the model.
zeta  = 0.01;         % Damping ratio for all modes

sim('aero_vibrati',[],simset('SrcWorkspace','current','DstWorkspace','current'));

vibx = vibdat(1:10:1000);               % The Simulink model "aero_vibrati"
                                        % generates the vibration data at
                                        % a sample time of 0.01 sec.
viby = vibdat(1001:10:2000);            % The output
                                        % is transferred to the MATLAB
                                        % workspace in array vibdat.
levarmx = 10;   % Rotational lever arm for vibration noise in x
levarmy = 10;   %  and in y.
figure(3);
subplot(211);
plot(0.01*(1:10:1000),vibx);grid;
title('Time history of the random Tracker rotations')
xlabel('Time');ylabel('x direction')

subplot(212);
plot(0.01*(1:10:1000),viby);grid;
xlabel('Time');ylabel('y direction')


%% Simulate the Motion Effects From the Background, Target, and Jitter
%  
% The frames that will make up the movie are now created and 
% stored in a multidimensional array (out).  Each frame has 
% the background and target at differing positions due to the
% target motion, background drift, and tracker vibration. The
% first frame of the movie will be shown in Figure 1.
% 

for t = 1:num_frames

  % Drift the Background at the rate driftx and difty
  % (in pixels/second) and add in the vibration:
  xshift = driftx*delt*t+levarmx*vibx(t,1);
  yshift = drifty*delt*t+levarmy*viby(t,1);

  % Interpolate the 2D image using the MATLAB function interp2:
  [xgrid, ygrid]   = meshgrid(1:backsize);
  [xindex, yindex] = meshgrid(xshift:1:xshift+backsize,yshift:1:yshift+backsize);
  outtemp = interp2(xgrid,ygrid,background,xindex,yindex);

  % Truncate the drifted image down from backsize to framesize:
  out(:,:,t) = outtemp(xoff:xoff+framesize-1,xoff:xoff+framesize-1);

  % Now let the target move also:
  tpixinx = floor(target_velx*delt*t);
  tpixiny = floor(target_vely*delt*t);  % Before interpolating extract the number of pixels moved
  txi = target_velx*delt*t - tpixinx;
  tyi = target_vely*delt*t - tpixiny;   % Interpolate on subpixels around the origin only
  [txgrid tygrid] = meshgrid(1:11);     % meshgrid here generates a matrix of grid elements
  [txi tyi] = meshgrid(txi+1:txi+11,tyi+1:tyi+11); % meshgrid generates 2 matrices with the x and y grids
  
  x = target_z_initally+target_velz*delt*t;%New feature<----------------------
  targetf = target_gen(x);%New feature<----------------------
  
  % Interpolate the intensity values first using interp2 -- a built in MATLAB command
  temp = interp2(txgrid,tygrid,targetf,txi,tyi);

  % Insert the target at the location determined by the initial offset, and the number of whole pixels moved
  tx = tpixinx + target_x_initally-1;
  ty = tpixiny + target_y_initally-1;
  out(tx:tx+6,ty:ty+6,t) = temp(9:-1:3,9:-1:3) + out(tx:tx+6,ty:ty+6,t);

end

minout = min(min(min(out)));
maxout = max(max(max(out)));
figure(4);
colormap('gray');
image((out(:,:,1)-minout) * 64/(maxout-minout));
title('First frame of combined target and background image.')

%% Pass the Images Through Optics -- Use a Gaussian "Aperture Function"
%
% This code segement can use a measured aperture function just as easily - simply
% replace the next five lines by "load measured_aperture" where measured_aperture
% is the measured function strored in ASCII and the data stored in the file
% measured_aperture.mat is a matlab .mat file that contains the matrix apfunction.
% (in MATLAB type "help load" for how to use load and look at the c and fortran code
% that shows hoew to read and write matlab .mat files).
%
% (Note: When the Point Spread Function is Gaussian, then so is the Aperture function)
%
% To simulate the effect of the tracker optics, each of the 
% movie frames is now blurred using a 2-D FFT (Fast Fourier 
% Transform).  The first frame of the resulting image is shown
% in Figure 1.
%  

x = 1:framesize;
y = 1:framesize;
sigma      = 120;
apfunction = exp(-(x-framesize/2).^2/(2*sigma))' * exp(-(y-framesize/2).^2/(2*sigma));
apfunction = fftshift(apfunction);      % Rotate so it conforms with FFT convention

for j = 1:num_frames
  out(:,:,j) = real(ifft2(apfunction.*fft2(out(:,:,j))));
end

minout = min(min(min(out)));
maxout = max(max(max(out)));
figure(5);
colormap('gray');
image((out(:,:,1)-minout)*64/(maxout-minout));
title('First frame of blurred image.')


%% Generate the MATLAB Movie and Play It Back
%
% Scale the movie frame so that is has 64 intensity values from the min
% to the max and then show the result as an image.  See MATLAB help
% for how the moviein and getframe work.
%

minout = min(min(min(out)));
maxout = max(max(max(out)));
figure(6);
colormap('gray')
M = moviein(num_frames);
for j = 1:num_frames
  image((out(:,:,j)-minout)*64/(maxout-minout))
  drawnow
  M(:,j) = getframe;
end
figure(6);
colormap('gray')
movie(M);

%% OPTIONAL:  Save the Movie in a .mat File
%
% You can optionally save the generated tracker movie in a mat file
% and also save the psd of the background for later use with the movie.
%
%   save trackerimage out
%   save psdback psd
%   save moviedat M

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
蜜臀av在线播放一区二区三区 | 亚洲国产日韩精品| 日韩国产欧美在线播放| 成人综合婷婷国产精品久久免费| 91亚洲精华国产精华精华液| 日韩欧美另类在线| 午夜欧美在线一二页| 成人激情av网| 久久免费看少妇高潮| 亚洲成人一区二区在线观看| 东方欧美亚洲色图在线| 欧美v国产在线一区二区三区| 亚洲一区二区黄色| 91蜜桃免费观看视频| 精品美女一区二区| 奇米影视7777精品一区二区| 欧洲av在线精品| 亚洲欧美一区二区不卡| 国产高清成人在线| 精品三级在线观看| 久久99精品久久久久婷婷| 欧美性受极品xxxx喷水| 亚洲男人电影天堂| 99精品国产99久久久久久白柏| 精品国产一区二区三区av性色| 亚洲福利视频一区二区| 欧美亚洲另类激情小说| 夜夜嗨av一区二区三区网页 | 在线免费观看视频一区| 国产精品高潮呻吟| 成人h动漫精品一区二区| 国产偷国产偷精品高清尤物| 国产一区二区三区香蕉| 精品精品国产高清a毛片牛牛| 全国精品久久少妇| 日韩午夜av电影| 捆绑调教一区二区三区| 欧美一区2区视频在线观看| 午夜精品aaa| 欧美一区二区三区不卡| 日韩**一区毛片| 日韩一区二区三区电影| 国产乱码一区二区三区| 中文字幕第一页久久| 91蜜桃免费观看视频| 亚洲777理论| 日韩三级中文字幕| 国产成人综合网| 国产精品久久久久久久久免费桃花 | 欧美一区二区视频在线观看2022| 日本sm残虐另类| 精品国产髙清在线看国产毛片| 国模冰冰炮一区二区| 国产精品乱码久久久久久| 色偷偷成人一区二区三区91 | 国产精品毛片高清在线完整版| 成人午夜电影小说| 一个色在线综合| 日韩午夜中文字幕| 成人永久看片免费视频天堂| 亚洲视频在线一区| 91精品国产综合久久福利| 国产精品一区在线观看你懂的| 国产精品三级av| 在线精品亚洲一区二区不卡| 麻豆精品国产传媒mv男同| 久久久久9999亚洲精品| 一本高清dvd不卡在线观看| 日韩 欧美一区二区三区| 中文字幕中文字幕一区二区| 欧美日韩卡一卡二| 国产成人久久精品77777最新版本| 一区二区三区在线免费播放| 日韩视频不卡中文| 91久久久免费一区二区| 国产在线精品免费| 亚洲电影视频在线| 国产精品色呦呦| 欧美一区二区精品在线| 99re亚洲国产精品| 狠狠色狠狠色合久久伊人| 亚洲色图.com| 久久久久一区二区三区四区| 欧美在线一区二区三区| 国产成人免费网站| 久久激情五月婷婷| 伊人色综合久久天天人手人婷| 精品国产乱码久久久久久免费| 91香蕉视频黄| 岛国精品在线播放| 极品美女销魂一区二区三区| 亚洲午夜电影网| 亚洲欧美激情插 | 丝袜脚交一区二区| **网站欧美大片在线观看| 日韩欧美高清在线| 欧美一区二区视频在线观看2020| 日本精品视频一区二区| 粉嫩13p一区二区三区| 韩国女主播一区| 六月丁香婷婷色狠狠久久| 亚洲国产精品自拍| 亚洲成av人片一区二区| 亚洲精品老司机| 一区二区三区鲁丝不卡| 亚洲视频在线观看一区| 欧美国产精品专区| 国产日产亚洲精品系列| 久久只精品国产| 久久精品欧美一区二区三区不卡| 精品少妇一区二区三区在线视频| 4438亚洲最大| 宅男在线国产精品| 欧美一级理论片| 欧美成人精品3d动漫h| 欧美一区二区女人| 日韩美女在线视频| 欧美mv日韩mv| 国产欧美一区二区精品秋霞影院 | 风间由美一区二区三区在线观看| 麻豆一区二区99久久久久| 日韩精品乱码免费| 久久精品久久99精品久久| 久久99久久久欧美国产| 国产福利不卡视频| 不卡视频在线观看| 在线免费观看不卡av| 欧美日韩大陆一区二区| 欧美一区二区美女| 久久久www成人免费无遮挡大片 | 午夜精品久久久久久久久久久 | 91小视频在线观看| 精品视频全国免费看| 欧美精品日韩一区| 2022国产精品视频| 国产精品久线在线观看| 亚洲在线免费播放| 免费看精品久久片| 成人av在线播放网站| 欧美影视一区在线| 精品奇米国产一区二区三区| 国产欧美一区二区精品性| 亚洲精品视频一区| 老司机精品视频线观看86| 丁香五精品蜜臀久久久久99网站| 在线一区二区三区四区五区| 欧美丰满一区二区免费视频| 久久欧美一区二区| 亚洲码国产岛国毛片在线| 亚洲福利视频导航| 成人中文字幕在线| 制服丝袜亚洲色图| 欧美激情艳妇裸体舞| 亚洲成人精品一区二区| 国产福利精品导航| 欧美乱熟臀69xxxxxx| 久久婷婷国产综合国色天香| 亚洲精品久久久久久国产精华液| 蜜桃一区二区三区在线| 不卡的av网站| 日韩欧美综合在线| 亚洲精品国产一区二区精华液| 男人的j进女人的j一区| 93久久精品日日躁夜夜躁欧美| 欧美疯狂做受xxxx富婆| 中文字幕在线不卡| 久久精品国产久精国产| 色婷婷av一区| 国产精品丝袜91| 麻豆精品一二三| 欧美日韩精品一区二区天天拍小说 | 国产日韩欧美亚洲| 免费人成网站在线观看欧美高清| 91在线观看高清| 国产日产精品一区| 久久精品99久久久| 337p亚洲精品色噜噜噜| 亚洲精品乱码久久久久久久久| 国产成人av影院| 精品国产露脸精彩对白 | 粉嫩蜜臀av国产精品网站| 3atv一区二区三区| 天天影视色香欲综合网老头| 色综合久久中文综合久久97| 国产欧美一区二区精品仙草咪| 蜜桃av噜噜一区| 91精品欧美福利在线观看| 一区二区三区中文在线| 色婷婷久久久久swag精品| 中文字幕av一区二区三区高| 国产一区激情在线| 久久色在线观看| 国产一区不卡精品| 国产欧美综合色| www.一区二区| 亚洲视频在线观看三级| 99久久伊人网影院| 亚洲日本免费电影| 91在线porny国产在线看| 亚洲丝袜美腿综合|