function stats = eval_recon(subName, accRatio, compThreshold, histBins, maxRange) %% EVAL_RECON - evaluate accuracy and completeness of a model % acc is distance d (in m) such that [accRatio]% of the reconstruction is within d of the ground truth mesh % comp is the percent of points on the GTM that are within [compThreshold] mm of the reconstruction accPath = sprintf('submissions/%s/%s-acc.ply',subName,subName); % distances to GT compPath = sprintf('submissions/%s/%s-comp.ply',subName,subName); % distances from GT stats.accRatio = accRatio; %0.9; stats.compThreshold = compThreshold; %0.1; % histBins = 10; %% read distances from CloudCompare pcls compPcl = ply_read(compPath); compDist = abs(compPcl.vertex.('scalar_C2M')); accPcl = ply_read(accPath); accDist = abs(accPcl.vertex.('scalar_C2C')); %% compute stats stats.acc = quantile(accDist,accRatio); stats.comp = mean(compDist