ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
pba::ParallelBA Class Reference

#include <pba.h>

Inheritance diagram for pba::ParallelBA:

Public Types

enum  StatusT {
  STATUS_SUCCESS = 0 , STATUS_CAMERA_MISSING = 1 , STATUS_POINT_MISSING , STATUS_PROJECTION_MISSING ,
  STATUS_MEASURMENT_MISSING , STATUS_ALLOCATION_FAIL
}
 
enum  DeviceT {
  PBA_INVALID_DEVICE = -4 , PBA_CPU_DOUBLE = -3 , PBA_CPU_FLOAT = -2 , PBA_CUDA_DEVICE_DEFAULT = -1 ,
  PBA_CUDA_DEVICE0 = 0
}
 
enum  DistortionT { PBA_MEASUREMENT_DISTORTION = -1 , PBA_NO_DISTORTION = 0 , PBA_PROJECTION_DISTORTION = 1 }
 
enum  BundleModeT { BUNDLE_FULL = 0 , BUNDLE_ONLY_MOTION = 1 , BUNDLE_ONLY_STRUCTURE = 2 }
 

Public Member Functions

virtual void ParseParam (int narg, char **argv)
 
virtual void SetFixedIntrinsics (bool fixed)
 
virtual void EnableRadialDistortion (DistortionT type)
 
virtual void SetNextTimeBudget (int seconds)
 
virtual void ReserveStorage (size_t ncam, size_t npt, size_t nproj)
 
void SetFocalLengthFixed (bool fixed)
 
void ResetBundleStorage ()
 
virtual void SetCameraData (size_t ncam, CameraT *cams)
 
virtual void SetPointData (size_t npoint, Point3D *pts)
 
virtual void SetProjection (size_t nproj, const Point2D *imgpts, const int *point_idx, const int *cam_idx)
 
virtual void SetNextBundleMode (BundleModeT mode=BUNDLE_FULL)
 
virtual int RunBundleAdjustment ()
 
virtual float GetMeanSquaredError ()
 
virtual void AbortBundleAdjustment ()
 
virtual int GetCurrentIteration ()
 
 ParallelBA (DeviceT device=PBA_CUDA_DEVICE_DEFAULT, const int num_threads=-1)
 
void * operator new (size_t size)
 
virtual ~ParallelBA ()
 
virtual void SetFocalMask (const int *fmask, float weight=1.0f)
 

Detailed Description

Definition at line 54 of file pba.h.

Member Enumeration Documentation

◆ BundleModeT

Enumerator
BUNDLE_FULL 
BUNDLE_ONLY_MOTION 
BUNDLE_ONLY_STRUCTURE 

Definition at line 76 of file pba.h.

◆ DeviceT

Enumerator
PBA_INVALID_DEVICE 
PBA_CPU_DOUBLE 
PBA_CPU_FLOAT 
PBA_CUDA_DEVICE_DEFAULT 
PBA_CUDA_DEVICE0 

Definition at line 64 of file pba.h.

◆ DistortionT

Enumerator
PBA_MEASUREMENT_DISTORTION 
PBA_NO_DISTORTION 
PBA_PROJECTION_DISTORTION 

Definition at line 71 of file pba.h.

◆ StatusT

Enumerator
STATUS_SUCCESS 
STATUS_CAMERA_MISSING 
STATUS_POINT_MISSING 
STATUS_PROJECTION_MISSING 
STATUS_MEASURMENT_MISSING 
STATUS_ALLOCATION_FAIL 

Definition at line 56 of file pba.h.

Constructor & Destructor Documentation

◆ ParallelBA()

pba::ParallelBA::ParallelBA ( DeviceT  device = PBA_CUDA_DEVICE_DEFAULT,
const int  num_threads = -1 
)

◆ ~ParallelBA()

pba::ParallelBA::~ParallelBA ( )
virtual

Definition at line 55 of file pba.cpp.

Member Function Documentation

◆ AbortBundleAdjustment()

void pba::ParallelBA::AbortBundleAdjustment ( )
virtual

Reimplemented in pba::SparseBundleCU, and pba::SparseBundleCPU< Float >.

Definition at line 107 of file pba.cpp.

References AbortBundleAdjustment().

Referenced by AbortBundleAdjustment().

◆ EnableRadialDistortion()

void pba::ParallelBA::EnableRadialDistortion ( DistortionT  type)
virtual

Reimplemented in pba::SparseBundleCU, and pba::SparseBundleCPU< Float >.

Definition at line 73 of file pba.cpp.

References EnableRadialDistortion().

Referenced by EnableRadialDistortion().

◆ GetCurrentIteration()

int pba::ParallelBA::GetCurrentIteration ( )
virtual

Reimplemented in pba::SparseBundleCU, and pba::SparseBundleCPU< Float >.

Definition at line 104 of file pba.cpp.

References GetCurrentIteration().

Referenced by GetCurrentIteration().

◆ GetMeanSquaredError()

float pba::ParallelBA::GetMeanSquaredError ( )
virtual

Reimplemented in pba::SparseBundleCU, and pba::SparseBundleCPU< Float >.

Definition at line 100 of file pba.cpp.

References GetMeanSquaredError().

Referenced by GetMeanSquaredError().

◆ operator new()

void * pba::ParallelBA::operator new ( size_t  size)

Definition at line 119 of file pba.cpp.

References size.

◆ ParseParam()

void pba::ParallelBA::ParseParam ( int  narg,
char **  argv 
)
virtual

Reimplemented in pba::SparseBundleCU, and pba::SparseBundleCPU< Float >.

Definition at line 59 of file pba.cpp.

References ParseParam().

Referenced by ParseParam().

◆ ReserveStorage()

void pba::ParallelBA::ReserveStorage ( size_t  ncam,
size_t  npt,
size_t  nproj 
)
virtual

Reimplemented in pba::SparseBundleCU.

Definition at line 111 of file pba.cpp.

References ReserveStorage().

Referenced by ReserveStorage(), and ResetBundleStorage().

◆ ResetBundleStorage()

void pba::ParallelBA::ResetBundleStorage ( )
inline

Definition at line 101 of file pba.h.

References ReserveStorage().

◆ RunBundleAdjustment()

int pba::ParallelBA::RunBundleAdjustment ( )
virtual

Reimplemented in pba::SparseBundleCU, and pba::SparseBundleCPU< Float >.

Definition at line 96 of file pba.cpp.

References RunBundleAdjustment().

Referenced by RunBundleAdjustment().

◆ SetCameraData()

void pba::ParallelBA::SetCameraData ( size_t  ncam,
CameraT cams 
)
virtual

Reimplemented in pba::SparseBundleCU, and pba::SparseBundleCPU< Float >.

Definition at line 84 of file pba.cpp.

References SetCameraData().

Referenced by SetCameraData().

◆ SetFixedIntrinsics()

void pba::ParallelBA::SetFixedIntrinsics ( bool  fixed)
virtual

Reimplemented in pba::SparseBundleCU, and pba::SparseBundleCPU< Float >.

Definition at line 70 of file pba.cpp.

References SetFixedIntrinsics().

Referenced by SetFixedIntrinsics(), and SetFocalLengthFixed().

◆ SetFocalLengthFixed()

void pba::ParallelBA::SetFocalLengthFixed ( bool  fixed)
inline

Definition at line 100 of file pba.h.

References SetFixedIntrinsics().

◆ SetFocalMask()

void pba::ParallelBA::SetFocalMask ( const int *  fmask,
float  weight = 1.0f 
)
virtual

Reimplemented in pba::SparseBundleCU, and pba::SparseBundleCPU< Float >.

Definition at line 115 of file pba.cpp.

References SetFocalMask().

Referenced by SetFocalMask().

◆ SetNextBundleMode()

void pba::ParallelBA::SetNextBundleMode ( BundleModeT  mode = BUNDLE_FULL)
virtual

Reimplemented in pba::SparseBundleCU, and pba::SparseBundleCPU< Float >.

Definition at line 80 of file pba.cpp.

References SetNextBundleMode().

Referenced by SetNextBundleMode().

◆ SetNextTimeBudget()

void pba::ParallelBA::SetNextTimeBudget ( int  seconds)
virtual

Reimplemented in pba::SparseBundleCU, and pba::SparseBundleCPU< Float >.

Definition at line 76 of file pba.cpp.

References seconds, and SetNextTimeBudget().

Referenced by SetNextTimeBudget().

◆ SetPointData()

void pba::ParallelBA::SetPointData ( size_t  npoint,
Point3D pts 
)
virtual

Reimplemented in pba::SparseBundleCU, and pba::SparseBundleCPU< Float >.

Definition at line 88 of file pba.cpp.

References SetPointData().

Referenced by SetPointData().

◆ SetProjection()

void pba::ParallelBA::SetProjection ( size_t  nproj,
const Point2D imgpts,
const int *  point_idx,
const int *  cam_idx 
)
virtual

Reimplemented in pba::SparseBundleCU, and pba::SparseBundleCPU< Float >.

Definition at line 92 of file pba.cpp.

References SetProjection().

Referenced by SetProjection().


The documentation for this class was generated from the following files: