LiangliangNan / PolyFit

Polygonal Surface Reconstruction from Point Clouds
https://3d.bk.tudelft.nl/liangliang/publications/2017/polyfit/polyfit.html
GNU General Public License v3.0
723 stars 121 forks source link

Some question about complexity term #27

Closed Yi-Hsuan-Su closed 4 years ago

Yi-Hsuan-Su commented 4 years ago

Hello I have seen there is a function call corner() at the complexity term on the paper , but when I trace back the code, I'm confusing where is the corner function's definition, because I just found the lambda inside the code. In another word, how do I know if an edge is sharp after selecting two face from the intersection edge.

image image

LiangliangNan commented 4 years ago

There are binary {0, 1} variables representing if an edge is sharp (two neighboring faces originating from two different planes) or not (two neighboring faces originating from the same initial plane), which will be determined by the optimization.

The objective->add_coefficient(var_idx, coeff_complexity); sums up this term that measures the total number of sharp edges multiplied by the coefficient "coeff_complexity".

Yi-Hsuan-Su commented 4 years ago

Thank you for answering my question. I have figured it out by your guided. One more question, why using actual number of points within a threshold distance in the plane instead of using the planar quality to measure the data fitting term?

LiangliangNan commented 4 years ago

Glad to hear that.

Real-world point clouds are usually noisy (especially for point clouds from photogrammetry) and a plane usually has a certain thickness. So it does not make sense to say that a point with a larger distance to the fitted plane contributes less. That is why we use the number of points - so all points with a distance threshold contribute equally to the reconstruction.

Yi-Hsuan-Su commented 4 years ago

Thank you for answering my question such detailly. I'm fully understand all the detail about your great work on polyfit program.