pptk icon indicating copy to clipboard operation
pptk copied to clipboard

viewer as cloud player

Open rfsch opened this issue 6 years ago • 4 comments

Hi

is it possible to make the viewer play successive point cloud frames ?

Thanks

rfsch avatar Jun 18 '19 12:06 rfsch

+1

kentaroy47 avatar Aug 20 '19 01:08 kentaroy47

+1

chiricoiu avatar Oct 23 '19 10:10 chiricoiu

+1

chenxyyy avatar Jun 24 '20 09:06 chenxyyy

I got it to work by commenting the following lines in viewer.h (in void reply()):

qDebug() << "Viewer: received positions";

_points->loadPoints(positions);
// Comment the 3 following lines
//_camera = QtCamera(_points->getBox());
//_camera.setAspectRatio((float)width() / height());
//_floor_grid->setFloorLevel(_points->getFloor());
renderPoints();
renderPointsFine();
break;

I am not sure whether there are situations where it is necessary to reset the camera position after loading a new pointcloud. But this solution suits my use case.

After re-compiling, the following snippet will render a sequence of random pointclouds while maintaining the camera position:

import pptk
import numpy as np
import time

pointclouds = np.random.random([200, 1000, 3])

v = pptk.viewer(pointclouds[0])

for pc in pointclouds[1:]:
    time.sleep(0.1)
    v.load(pc)

(I share this as a workaround, not as a solution to the current issue)

tsucres avatar Oct 21 '20 15:10 tsucres