andyzeng / 3dmatch-toolbox

3DMatch - a 3D ConvNet-based local geometric descriptor for aligning 3D meshes and point clouds.
http://3dmatch.cs.princeton.edu/
BSD 2-Clause "Simplified" License
836 stars 189 forks source link

showTDF.m error #3

Closed happyfrank closed 7 years ago

happyfrank commented 7 years ago

I got this error when I run showTDF.m at matlab R2015b.

>> showTDF
bicycle000002
Error using pointCloud>validateAndParseInputs (line 775)
The value of 'Color' is invalid. Expected input to be one of these types:

uint8

Instead its type was double.

Error in pointCloud (line 126)
            [xyzPoints, C, nv] = validateAndParseInputs(varargin{:});

Error in showTDF (line 36)
pcshow(pointCloud(visPts,'color',colorPts));
andyzeng commented 7 years ago

Looks like the point cloud "color" parameter only takes uint8 in Matlab versions 2015b or earlier. Try replacing line 36 with pcshow(pointCloud(visPts,'color',uint8(round(colorPts.*255))));

happyfrank commented 7 years ago

Thanks, It works.

pvmilk commented 7 years ago

Will the toolbox work in the older Matlab? (e.g. 2014a). (Any specific reason it would depends on Matlab 2015b or higher)

andyzeng commented 7 years ago

Some parts of the visualization and evaluation tools in the toolbox depend on Matlab 2015a or higher for Matlab's 3D Point Cloud Processing Toolbox