Smoothing 3D

1 개요

Moving Least Square(MLS) 방법을 사용하여 포인트 클라우드를 스무딩하는 알고리즘입니다.

f(u,v)=i+jdaijuivjf(u, v) = \sum_{i + j \leq d} a_{ij} u^i v^j

2 알고리즘 상세 설명

Source Object Result Object
Source Object Result Object
Fig. 원본 포인트 클라우드 및 스무딩 적용 결과

3 파라미터 설정

wi=exp(pip2h2)w_i = \exp\left( -\frac{\|p_i - p\|^2}{h^2} \right)

4 예제 코드

CSmoothing3D smoothing3D;

CFL3DObject floSource;
CFL3DObject floDestination;
floSource.Load(L"C:/Users/Public/Documents/FLImaging/ExampleImages/Smoothing3D/Smoothing3DExample.ply");
smoothing3D.SetSourceObject(floSource);
smoothing3D.SetDestinationObject(floDestination);

// Sigma 값 계수 설정
// 평균 거리 * Coefficient 값이 사용됩니다.
smoothing3D.SetAutoSigmaCoefficient(4.000000f);

// 탐색 이웃 수 설정
// 값이 클 수록 안정적인 결과를 얻을 수 있으나 성능이 하락합니다.
smoothing3D.SetNeighborCount(50);

smoothing3D.SetPolynomialOrder(3); // 다항식 차수 설정
TPoint3<float> tp3ViewPoint;
tp3ViewPoint.x = 0.000000f; 
tp3ViewPoint.y = 0.000000f;
tp3ViewPoint.z = 1.000000f;
smoothing3D.SetViewPoint(tp3ViewPoint);
smoothing3D.EnableIncludeNormalVector(true);
smoothing3D.Execute();


CSmoothing3D smoothing3D = new CSmoothing3D();

CFL3DObject floSource = new CFL3DObject();
CFL3DObject floDestination = new CFL3DObject();
floSource.Load("C:/Users/Public/Documents/FLImaging/ExampleImages/Smoothing3D/Smoothing3DExample.ply");
smoothing3D.SetSourceObject(ref floSource);
smoothing3D.SetDestinationObject(ref floDestination);

// Sigma 값 계수 설정
// 평균 거리 * Coefficient 값이 사용됩니다.
smoothing3D.SetAutoSigmaCoefficient(4.000000f);

// 탐색 이웃 수 설정
// 값이 클 수록 안정적인 결과를 얻을 수 있으나 성능이 하락합니다.
smoothing3D.SetNeighborCount(50);

smoothing3D.SetPolynomialOrder(3); // 다항식 차수 설정
TPoint3<float> tp3ViewPoint = new TPoint3<float>();
tp3ViewPoint.x = 0.000000f; 
tp3ViewPoint.y = 0.000000f;
tp3ViewPoint.z = 1.000000f;
smoothing3D.SetViewPoint(tp3ViewPoint);
smoothing3D.EnableIncludeNormalVector(false);
smoothing3D.Execute();

smoothing3D = CSmoothing3D()

floSource = CFL3DObject()
floDestination = CFL3DObject()
floSource.Load("C:/Users/Public/Documents/FLImaging/ExampleImages/Smoothing3D/Smoothing3DExample.ply")
smoothing3D.SetSourceObject(floSource)
smoothing3D.SetDestinationObject(floDestination)

# Sigma 값 계수 설정
# 평균 거리 * Coefficient 값이 사용됩니다.
smoothing3D.SetAutoSigmaCoefficient(4.000000)

# 탐색 이웃 수 설정
# 값이 클 수록 안정적인 결과를 얻을 수 있으나 성능이 하락합니다.
smoothing3D.SetNeighborCount(50)

smoothing3D.SetPolynomialOrder(3) # 다항식 차수 설정
tp3ViewPoint = TPoint3[Single]()
tp3ViewPoint.x = 0.000000 
tp3ViewPoint.y = 0.000000
tp3ViewPoint.z = 1.000000
smoothing3D.SetViewPoint(tp3ViewPoint)
smoothing3D.EnableIncludeNormalVector(False)
smoothing3D.Execute()