91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 2KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2021-06-03
  • 語言: Matlab
  • 標簽: matlab??

資源簡介

matlab圖片合成視頻

資源截圖

代碼片段和文件信息

function?[img_files]?=?load_video_info(video_path)
%[img_files?pos?target_sz?resize_image?ground_truth?...
% video_path]?=?load_video_info(video_path)
%LOAD_VIDEO_INFO
%???Loads?all?the?relevant?information?for?the?video?in?the?given?path:
%???the?list?of?image?files?(cell?array?of?strings)?initial?position
%???(1x2)?target?size?(1x2)?whether?to?resize?the?video?to?half
%???(boolean)?and?the?ground?truth?information?for?precision?calculations
%???(Nx2?for?N?frames).?The?ordering?of?coordinates?is?always?[y?x].
%
%???The?path?to?the?video?is?returned?since?it?may?change?if?the?images
%???are?located?in?a?sub-folder?(as?is?the?default?for?MILTrack‘s?videos).
%
%???Jo鉶?F.?Henriques?2012
%???http://www.isr.uc.pt/~henriques/

%%?load?ground?truth?from?text?file?(MILTrack‘s?format)
%? text_files?=?dir([video_path?‘*_gt.txt‘]);
%? assert(~isempty(text_files)?‘No?initial?position?and?ground?truth?(*_gt.txt)?to?load.‘)
%?
%? f?=?fopen([video_path?text_files(1).name]);
%? ground_truth?=?textscan(f?‘%f%f%f%f‘);??%[x?y?width?height]
%? ground_truth?=?cat(2?ground_truth{:});
%? fclose(f);

%%?set?initial?position?and?size
%? target_sz?=?[ground_truth(14)?ground_truth(13)];
%? pos?=?[ground_truth(12)?ground_truth(11)]?+?floor(target_sz/2);

%%?interpolate?missing?annotations?and?store?positions?instead?of?boxes
%? try
%? ground_truth?=?interp1(1?:?5?:?size(ground_truth1)?...
%? ground_truth(1:5:end:)?1:size(ground_truth1));
%? ground_truth?=?ground_truth(:[21])?+?ground_truth(:[43])?/?2;
%? catch??%#ok?wrong?format?or?we?just?don‘t?have?ground?truth?data.
%? ground_truth?=?[];
%? end

%%?list?all?frames.?first?try?MILTrack‘s?format?where?the?initial?and
%final?frame?numbers?are?stored?in?a?text?file.?if?it?doesn‘t?work
%try?to?load?all?png/jpg?files?in?the?folder.

text_files?=?dir([video_path?‘*_frames.txt‘]);
if?~isempty(text_files)
f?=?fopen([video_path?text_files(1).name]);
frames?=?textscan(f?‘%f%f‘);
fclose(f);

%see?if?they?are?in?the?‘imgs‘?subfolder?or?not
if?exist([video_path?num2str(frames{1}?‘imgs/img%05i.png‘)]?‘file‘)
video_path?=?[video_path?‘imgs/‘];
elseif?~exist([video_path?num2str(frames{1}?‘img%05i.png‘)]?‘file‘)
error(‘No?image?files?to?load.‘)
end

%list?the?files
img_files?=?num2str((frames{1}?:?frames{2})‘?‘img%05i.png‘);
img_files?=?cellstr(img_files);
else
%no?text?file?just?list?all?images
img_files?=?dir([video_path?‘*.png‘]);
if?isempty(img_files)
img_files?=?dir([video_path?‘*.jpg‘]);
assert(~isempty(img_files)?‘No?image?files?to?load.‘)
end
img_files?=?sort({img_files.name});
end


%%?if?the?target?is?too?large?use?a?lower?resolution?-?no?need?for?so
%much?detail
%? if?sqrt(prod(target_sz))?>=?100
%? pos?=?floor(pos?/?2);
%? target_sz?=?floor(target_sz?/?2);
%? resize_image?=?true;
%? else
%? resize_image?=?false;
%? end
end

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件???????3004??2014-03-20?14:26??loadImgSequenceInfo.m

?????文件????????780??2014-03-24?15:39??pic2video.m

-----------?---------??----------?-----??----

?????????????????3784????????????????????2


評論

共有 條評論