Jamie Cook
unread,Mar 8, 2009, 12:17:58 AM3/8/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Face Recognition Research Community, anju...@gmail.com
I just got an email from someone looking for how to work with the FRGC
2.0 Abs file format
"Can you help me read the range data i.e .abs file?I mean what toolbox
can I use to read abs file in MATLAB? Or is it so that MATLAB is very
slow when reading such a huge file (13MB) and we need C or C++ to do
that?"
I used the following matlab code to load these files
%ABSLOAD Read a UND database range image from file.
% [X,Y,Z,FL] = ABSLOAD(FILENAME) reads the range image in FILENAME
% into the variables X,Y,Z,FL.
% FILENAME is a string that specifies the name of the file
% to be openned
% X,Y,Z are matrices representing the 3D co-ords of each point
% FL is the flags vector specifying if a point is valid
function [x, y, z, fl] = absload(fname)
% open the file
fid = fopen(fname);
% read number of rows
r = fgetl(fid);
r = sscanf(r, '%d');
% read number of columns
c = fgetl(fid);
c = sscanf(c, '%d');
% read junk line
t = fgetl(fid); clear t;
% get flags
fl = fscanf(fid,'%d',[c r])';
% get x
x = fscanf(fid,'%f',[c r])';
% get y
y = fscanf(fid,'%f',[c r])';
% get z
z = fscanf(fid,'%f',[c r])';
% close the file
fclose(fid);
I hope this helps.
Jamie