wass icon indicating copy to clipboard operation
wass copied to clipboard

`pcread` not available pre R2015a

Open saltynexus opened this issue 7 years ago • 3 comments

Followed the instructions for a Windows download and failed to pass the test cases. Apparently pcread became available in R2015a. I have R2014, therefore the function call in "verify_meshes.m" is undefined. For the sake of other users out there facing this situation, an alternative should be presented.

All that being said, you'll get much more open source support if you use Python instead of Matlab. You basically have an open source project that requires a proprietary software license.

saltynexus avatar Sep 11 '17 03:09 saltynexus

Can you please review this solution

  1. Download and add this toolbox to your Matlab path
  2. Comment out the following lines in "verify_meshes.m"
%    ptgt = pcread( sprintf('%s/%06d_3d.ply',M3D_DIR, ii-1 ) );
%    meshgt = R * double(ptgt.Location') + repmat(T,1,size(ptgt.Location,1) );
%    % invert meshgt z
%    meshgt(3,:) = meshgt(3,:)*-1;
  1. Add these lines
    ptgt = pointCloud(sprintf('%s/%06d_3d.ply',M3D_DIR, ii-1 ), 'Attributes', {'r' 'g' 'b'},'HeaderLines',12);
    meshgt = R * double(ptgt.X') + repmat(T,1,size(ptgt.X,1) );
    % invert meshgt z
    meshgt(3,:) = meshgt(3,:)*-1;

saltynexus avatar Sep 11 '17 03:09 saltynexus

Hi saltynexus, thank you for your interest in our project.

The test cases have been written in Matlab simply because is the-facto standard for the scientific community working with this kind of software. Indeed, such test cases also offer an example on how to use our pipeline directly without the web interface (I've been asked many times about that). Please note that Matlab itself is not needed to run and use the pipeline. It was just used as a quick and simple tool to verify the correct functioning of the software.

I don't know if your solution fits our needs because it requires an external toolbox. Probably the best way to avoid the pcread is to save the ground truth data in some other format (perhaps matlab .mat directly). I'll think about that.

fbergama avatar Sep 11 '17 08:09 fbergama

I am very interested in your project. As for your comment, yes, I would recommend removing as many dependencies as you can. If pcread requires Matlab 2015a and saving the data to a .mat removes the 2015a dependency, then do it. There would be no need for an external toolbox (for those who have pre 2015a versions) and it would close this issue.

saltynexus avatar Sep 13 '17 06:09 saltynexus