.vbb格式轉換為txt格式(matlab實現),在此以Caltech Pedestrian Dataset資料集的annotations為例
%%
下載matlab的vbb工具庫
連結:https://pan.baidu.com/s/1GVvimekjNh4M_D4grM0Btw 提取碼:ymfn
%%
clc
clear all
addpath(genpath('自己存放code3.2.1資料夾的路徑\code3.2.1'));
vName='set00\V000';
A = vbb( 'vbbLoad', [dbInfo '/annotations/' vName] );
% 必須把 '/annotations/'放到*\code3.2.1\ data-USA資料夾下面
path = '.\vbb2txt';
fnm = [vName,'.txt'];
vName1='set00\';
if exist(vName1,'dir')==0
mkdir(vName1);
end
c=fopen([path '\' fnm],'w');
for i = 1:A.nFrame
iframe = A.objLists(1,i);
iframe_data = iframe{1,1};
n1length = length(iframe_data);
for j = 1:n1length
iframe_dataj = iframe_data(j);
if iframe_dataj.pos(1) ~= 0 %pos posv
fprintf(c,'%d %s %f %f %f %f \r\n', i, 'person', iframe_dataj.pos(1), iframe_dataj.pos(2), iframe_dataj.pos(3), iframe_dataj.pos(4));
end
end
end
fclose(c)
seq轉image(.jpg)請看 https://blog.csdn.net/zhuzizhong/article/details/84432889
參考:https://blog.csdn.net/yongjiankuang/article/details/79840229
https://blog.csdn.net/yongjiankuang/article/details/79840229?utm_source=blogxgwz2