guglu/ppf-matching

Error in PPF3DDetector/trainModel

Opened this issue · 5 comments

HM102 commented

I am trying to test the algorithm on standard Stanford bunny.ply model. Both .ply files are the same, but one is rigidly transformed. I attached the models. The error I am getting:

Index exceeds array bounds.

Error in PPF3DDetector/trainModel (line 62)
            obj.modelDiameter = norm([rangeX(2)-rangeX(1) , rangeY(2)-rangeY(1) ,
            rangeZ(2)-rangeZ(1)]);

Error in test_detector (line 9)
dt=dt.trainModel(model);

data.zip

I can see a bunny in bunny.ply, but I can't see a bunny in bunny_Transformed.ply. May be you should check the data.

HM102 commented

I just opened both ply files in meshlab and CloudComapre. Data is fine.

guglu commented

Hi,
the main problem is that bunny_Transformed is saved in binary format (which is not supported by loadPLY function), please use ASCII format instead.
In the case of the original bunny model, there is also a problem that it doesn't contain normal vectors which are by default expected (they can be computed e.g in Meshlab).

Hello, can you explain the procedure for me?

I just opened both ply files in meshlab and CloudComapre. Data is fine.

Hello, can you explain the procedure for me?