Perspective Transform 3D

1 개요

주어진 정점에 대하여 카메라의 위치와 방향을 바탕으로 투영변환을 하는 알고리즘.

2 알고리즘 상세 설명

Source Data Result Data
Source Data Result Data
입력 객체의 좌표를 주어진 카메라의 위치와 방향으로부터 바라본 좌표계로 변환하는 알고리즘입니다. 변환을 위해서는 원래 시점의 카메라 세팅을 추가로 가정해야 합니다. 카메라의 원래 방향은 z축에 평행하게 바라보는 것을 가정하며, 이는 옵션을 통해 z축의 음의 방향 또는 양의 방향으로 변경할 수 있습니다.

3 파라미터 설정 및 사용 방법

다음 함수들을 사용하여 카메라의 위치 및 방향을 지정합니다.

또한 다음 함수를 통해 z축의 증가 또는 감소 방향을 바라보는 방향으로 지정할 수 있습니다.

4 예제

CPerspectiveTransform3D alg;

CFL3DObject floSource;
floSource.Load(L"C:/Users/Public/Documents/FLImaging/ExampleImages/DistanceTransform3D/binary-vertex.ply");
CFL3DObject floDestination;
TPoint3<float> tpPosition(0.000000f, 0.000000f, 0.000000f);
TPoint3<float> tpDirection(0.000000f, 0.000000f, -1.000000f);
TPoint3<float> tpUpVector(0.000000f, 1.000000f, 0.000000f);
alg.SetPosition(tpPosition);
alg.SetDirection(tpDirection);
alg.SetUpVector(tpUpVector);
alg.SetDirectionType(CPerspectiveTransform3D::EDirectionType_Decrement);
alg.SetSourceObject(floSource);
alg.SetDestinationObject(floDestination);

alg.Execute();
CPerspectiveTransform3D alg = new CPerspectiveTransform3D();

CFL3DObject floSource = new CFL3DObject();
floSource.Load("C:/Users/Public/Documents/FLImaging/ExampleImages/DistanceTransform3D/binary-vertex.ply");
CFL3DObject floDestination = new CFL3DObject();
TPoint3<float> tpPosition = new TPoint3<float>(0.000000f, 0.000000f, 0.000000f);
TPoint3<float> tpDirection = new TPoint3<float>(0.000000f, 0.000000f, -1.000000f);
TPoint3<float> tpUpVector = new TPoint3<float>(0.000000f, 1.000000f, 0.000000f);
alg.SetPosition(tpPosition);
alg.SetDirection(tpDirection);
alg.SetUpVector(tpUpVector);
alg.SetDirectionType(CPerspectiveTransform3D.EDirectionType.Decrement);
alg.SetSourceObject(ref floSource);
alg.SetDestinationObject(ref floDestination);

alg.Execute();

alg = CPerspectiveTransform3D()

floSource = CFL3DObject()
floSource.Load("C:/Users/Public/Documents/FLImaging/ExampleImages/DistanceTransform3D/binary-vertex.ply")
floDestination = CFL3DObject()
tpPosition = TPoint3[Single](0.000000, 0.000000, 0.000000)
tpDirection = TPoint3[Single](0.000000, 0.000000, -1.000000)
tpUpVector = TPoint3[Single](0.000000, 1.000000, 0.000000)
alg.SetPosition(tpPosition)
alg.SetDirection(tpDirection)
alg.SetUpVector(tpUpVector)
alg.SetDirectionType(CPerspectiveTransform3D.EDirectionType.Decrement)
alg.SetSourceObject(floSource)
alg.SetDestinationObject(floDestination)

alg.Execute()