icp icon indicating copy to clipboard operation
icp copied to clipboard

how do you get normal vectors in data/deformed.xyz?

Open zhchyang2004 opened this issue 7 years ago • 6 comments

Hi, it is found each normal vector length doe not equal to 1 and lengths are different from each other. It is assumed the normal vector starts at a special point instead of the origin [0,0,0]. I wonder how to get normal vectors.

Thanks!

zhchyang2004 avatar Apr 10 '19 06:04 zhchyang2004

Normal vector between two points can be derived somewhat like this: https://math.stackexchange.com/questions/12745/how-do-you-calculate-the-unit-vector-between-two-points

Normal vector to a plane can be found using: http://mathworld.wolfram.com/NormalVector.html

Normal to the planes of a model should be obtained from the model itself. Most model file formats (.obj, .ply etc.) comes with the per-plane normal data (although it is optional).

Does that answer your question? (If not, could you please clarify your question)

agnivsen avatar Apr 16 '19 11:04 agnivsen

Thanks for answer! But I am still quite curious about the mentioned normal vectors features. They seem very different from common cases, which means normal vector length equals to 1 and starts from (0,0,0).

zhchyang2004 avatar Apr 17 '19 08:04 zhchyang2004

The normal vectors used here are unit normal vectors. Hence their lengths are always equal to one. Normal vectors do not necessarily start from a point.

I do not understand how you infer that the normal vectors always starts from (0,0,0). Please explain more, if this has not already answered your question.

agnivsen avatar Apr 17 '19 09:04 agnivsen

When I use pcl_pointcloud function to calculate normal vectors, it gives out normal vectors starting from (0,0,0) and each length is 1. For sure, normal vectors can start at any point, e.g. the corresponding point, after removing them.

In this case, with this code, you can get distances from corresponding points to normal vector points. you can find the distances are different from each other. 'np.linalg.norm(dest_points_et_normal[:,:3]-dest_points_et_normal[:,3:],axis=1)'

When using pcl to watch the hare and its normal vectors from deformed.xyz, you can see the hare is far inside normal vector ending points. It also seems normal vector points forms a globe.

After a globe is fit with all normal vectors points, we can find following features: 1.the globe radius does not equal to 1 2.the distance from each normal vector point to the globe center does not equal to each other and are different greatly.

Above findings confuse me. Where does each normal vector start?

zhchyang2004 avatar Apr 18 '19 00:04 zhchyang2004

@zhchyang2004 sorry for the extremely late response, are you still looking for an answer to this question?

agnivsen avatar Jun 03 '20 21:06 agnivsen

@agnivsen Hello, although it has been one year later, I am still eager to get the answer.

zhchyang2004 avatar Jun 05 '20 01:06 zhchyang2004