hidden point removal working in matlab

Feel free to ask any question here
Post Reply
Ingsayyad
Posts: 97
Joined: Fri Oct 25, 2013 9:17 am

hidden point removal working in matlab

Post 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.
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: hidden point removal working in matlab

Post 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.
Daniel, CloudCompare admin
Ingsayyad
Posts: 97
Joined: Fri Oct 25, 2013 9:17 am

Re: hidden point removal working in matlab

Post 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?
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: hidden point removal working in matlab

Post 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).
Daniel, CloudCompare admin
Ingsayyad
Posts: 97
Joined: Fri Oct 25, 2013 9:17 am

Re: hidden point removal working in matlab

Post 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.
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: hidden point removal working in matlab

Post 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...
Daniel, CloudCompare admin
Post Reply