Page 1 of 1
hidden point removal working in matlab
Posted: Mon Nov 09, 2015 12:32 pm
by Ingsayyad
I 'm trying to understand :
How hidden point removal is working in CC.
Is it taking viewport info automatically from current view port or camera settings.
How can see what is written in viewport. Can I see its properties or export it as text.
Direct Visibility of Point Sets
http://www.wisdom.weizmann.ac.il/~ronen ... 20Sets.pdf
I need to implement it into matlab. I found
http://www.mathworks.com/matlabcentral/ ... tent/HPR.m
I believe by default setting 'level=7' is radius in function.
I tried same data in CC and matlab with same viewpoint but obviously different results( matlab neaaryl no removal of points).
I believe all depends on rotation angles. But I couldn't find any rotation angle parameter nether in paper nor in Matlab function.
Can you guide me. All i want to implement it in matlab.
Re: hidden point removal working in matlab
Posted: Mon Nov 09, 2015 1:16 pm
by daniel
The matlab code is the original HPR code (it has then been adapted into CC).
The parameter in CloudCompare (defaulted to 7) is an octree level. It is only used in CC because we added the possibility to decimate the cloud when computing the convex hull (to accelerate a lot the process with big clouds).
The original code doesn't rely on an octree and it uses all the points when computing the convex hull (i.e. you can't reasonable use it on more than a few hundreds of thousands of points). I think this explains partly why you don't get the same result
And in CC the 'radius' is defined as the distance to the farthest point to the camera center. I believe this is suggested in the original article.
Re: hidden point removal working in matlab
Posted: Mon Nov 09, 2015 2:26 pm
by Ingsayyad
The Matlab code requires radius. Can you give some example value. Camera station is just x, y, z??? keeping same camera station but rotation (changing angles) gives different results in CC. It also make sense. How can I do it in matlab.
parameters are points[n*3], camera[1*3] and radius e.g., 5m. I 'm just lost?
Re: hidden point removal working in matlab
Posted: Mon Nov 09, 2015 3:17 pm
by daniel
And in CC the 'radius' is defined as the distance to the farthest point to the camera center. I believe this is suggested in the original article.
Otherwise you only need to provide the camera center. Note that this is the camera center expressed
relatively to the object (this is why when you move the camera the result changes). In CC the 'camera center' displayed in the Camera Parameters dialog may not be expressed relatively to the object (as depending on the projection mode it's either the camera or the object that moves).
Once the camera position is right, you should switch to 'Viewer based perspective' (F4) and read the 'camera/eye' position in the dialog (then you can switch back to 'Object centered' perspective (F3) as it's more handy to position the camera).
Re: hidden point removal working in matlab
Posted: Wed Nov 11, 2015 9:58 am
by Ingsayyad
I cannot follow the camera parameters, especially X,Y,Z are different than the rotation center (what I chose). Are they X,Z,Y? I can't make screen shot of camera parameters by snipping tool. This window (camera parameters) closes automatically (pop-off) if I click on some thing else on my computer. How can I change its behavior.
Re: hidden point removal working in matlab
Posted: Wed Nov 11, 2015 10:44 am
by daniel
You could use the 'Print screen' button (then crop the result in 'Paint' for instance).
Otherwise the 'rotation center' is the position in space around which the objects move. The camera center is the position of the camera (eye) in 3D. Therefore it's not necessarily in the same position...