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

#include <ConfigBA.h>

Inheritance diagram for pba::ConfigBA:

Classes

class  TimerBA
 

Public Member Functions

void ParseParam (int argc, char **argv)
 
const char * GetOutputParam ()
 
float GetInitialMSE ()
 
float GetFinalMSE ()
 
double GetBundleTiming (int timer=TIMER_OVERALL)
 
int GetIterationsLM ()
 
int GetIterationsCG ()
 
int GetCurrentDevice ()
 
int GetBundleReturnCode ()
 
int GetActiveDevice ()
 

Public Attributes

int __lm_max_iteration
 
int __cg_max_iteration
 
int __cg_min_iteration
 
int __cg_recalculate_freq
 
bool __accurate_gain_ratio
 
float __lm_delta_threshold
 
float __lm_gradient_threshold
 
float __lm_mse_threshold
 
float __lm_initial_damp
 
float __lm_minimum_damp
 
float __lm_maximum_damp
 
float __cg_norm_threshold
 
float __cg_norm_guard
 
int __pba_experimental
 
bool __cg_schur_complement
 
bool __lm_check_gradient
 
float __lm_damping_auto_switch
 
bool __lm_use_diagonal_damp
 
bool __fixed_intrinsics
 
int __use_radial_distortion
 
bool __reset_initial_distortion
 
int __verbose_level
 
bool __abort_flag
 
bool __verbose_cg_iteration
 
bool __verbose_function_time
 
bool __save_gradient_norm
 
bool __verbose_allocation
 
bool __verbose_sse
 
bool __jc_store_transpose
 
bool __no_jacobian_store
 
bool __jc_store_original
 
bool __jacobian_normalize
 
bool __focal_normalize
 
bool __depth_normalize
 
bool __depth_degeneracy_fix
 
float __data_normalize_median
 
float __depth_check_epsilon
 

Protected Types

enum  {
  TIMER_OVERALL = 0 , TIMER_OPTIMIZATION , TIMER_GPU_ALLOCATION , TIMER_GPU_UPLOAD ,
  TIMER_PREPROCESSING , TIMER_GPU_DOWNLOAD , TIMER_CG_ITERATION , TIMER_LM_ITERATION ,
  TIMER_FUNCTION_JJ , TIMER_FUNCTION_PJ , TIMER_FUNCTION_DD , TIMER_FUNCTION_JX ,
  TIMER_FUNCTION_JTE , TIMER_FUNCTION_BC , TIMER_FUNCTION_MP , TIMER_FUNCTION_UP ,
  TIMER_PROFILE_STEP , NUM_TIMER , FUNC_JX = 0 , FUNC_JX_ ,
  FUNC_JTEC_JCT , FUNC_JTEC_JCO , FUNC_JTEP , FUNC_JTE_ ,
  FUNC_JJ_JCO_JCT_JP , FUNC_JJ_JCO_JP , FUNC_JJ_JCT_JP , FUNC_JJ_JP ,
  FUNC_PJ , FUNC_BCC_JCT , FUNC_BCC_JCO , FUNC_BCP ,
  FUNC_MPC , FUNC_MPP , FUNC_VS , FUNC_VV ,
  NUM_FUNC
}
 

Protected Member Functions

 ConfigBA ()
 
void ResetTemporarySetting ()
 
void ResetBundleStatistics ()
 
void PrintBundleStatistics ()
 
void SaveBundleStatistics (int ncam, int npt, int nproj)
 
void BundleTimerStart (int timer)
 
void BundleTimerSwitch (int timer)
 
float BundleTimerGet (int timer)
 
void BundleTimerSwap (int timer1, int timer2)
 
float BundleTimerGetNow (int timer=TIMER_OPTIMIZATION)
 
void SaveBundleRecord (int iter, float res, float damping, float gn, float gi)
 
bool IsTimeBudgetAvailable ()
 
double MyClock ()
 

Protected Attributes

bool __multiply_jx_usenoj
 
int __selected_device
 
int __cpu_data_precision
 
int __bundle_time_budget
 
int __bundle_mode_next
 
int __bundle_current_mode
 
float __initial_mse
 
float __final_mse
 
float __final_mse_x
 
float __focal_scaling
 
float __depth_scaling
 
int __current_device
 
int __current_iteration
 
int __num_cg_iteration
 
int __num_lm_success
 
int __num_lm_iteration
 
int __num_projection_eval
 
int __num_jacobian_eval
 
int __num_camera_modified
 
int __num_point_behind
 
int __pba_return_code
 
int __recent_cg_status
 
int __profile_pba
 
bool __cpu_thread_profile
 
bool __debug_pba
 
bool __warmup_device
 
size_t __memory_usage
 
bool __matlab_format_stat
 
char * __stat_filename
 
const char * __driver_output
 
std::vector< float > __bundle_records
 
double __timer_record [NUM_TIMER]
 
int __num_cpu_thread_all
 
int __num_cpu_thread [NUM_FUNC]
 

Detailed Description

Definition at line 27 of file ConfigBA.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
TIMER_OVERALL 
TIMER_OPTIMIZATION 
TIMER_GPU_ALLOCATION 
TIMER_GPU_UPLOAD 
TIMER_PREPROCESSING 
TIMER_GPU_DOWNLOAD 
TIMER_CG_ITERATION 
TIMER_LM_ITERATION 
TIMER_FUNCTION_JJ 
TIMER_FUNCTION_PJ 
TIMER_FUNCTION_DD 
TIMER_FUNCTION_JX 
TIMER_FUNCTION_JTE 
TIMER_FUNCTION_BC 
TIMER_FUNCTION_MP 
TIMER_FUNCTION_UP 
TIMER_PROFILE_STEP 
NUM_TIMER 
FUNC_JX 
FUNC_JX_ 
FUNC_JTEC_JCT 
FUNC_JTEC_JCO 
FUNC_JTEP 
FUNC_JTE_ 
FUNC_JJ_JCO_JCT_JP 
FUNC_JJ_JCO_JP 
FUNC_JJ_JCT_JP 
FUNC_JJ_JP 
FUNC_PJ 
FUNC_BCC_JCT 
FUNC_BCC_JCO 
FUNC_BCP 
FUNC_MPC 
FUNC_MPP 
FUNC_VS 
FUNC_VV 
NUM_FUNC 

Definition at line 29 of file ConfigBA.h.

Constructor & Destructor Documentation

◆ ConfigBA()

Member Function Documentation

◆ BundleTimerGet()

float pba::ConfigBA::BundleTimerGet ( int  timer)
protected

Definition at line 316 of file ConfigBA.cpp.

References __timer_record.

Referenced by PrintBundleStatistics().

◆ BundleTimerGetNow()

◆ BundleTimerStart()

void pba::ConfigBA::BundleTimerStart ( int  timer)
protected

Definition at line 303 of file ConfigBA.cpp.

References __timer_record, and MyClock().

Referenced by pba::ConfigBA::TimerBA::TimerBA().

◆ BundleTimerSwap()

void pba::ConfigBA::BundleTimerSwap ( int  timer1,
int  timer2 
)
protected

Definition at line 311 of file ConfigBA.cpp.

References BundleTimerSwitch().

Referenced by pba::SparseBundleCU::TransferDataToGPU().

◆ BundleTimerSwitch()

void pba::ConfigBA::BundleTimerSwitch ( int  timer)
protected

◆ GetActiveDevice()

int pba::ConfigBA::GetActiveDevice ( )
inline

Definition at line 221 of file ConfigBA.h.

References __selected_device.

◆ GetBundleReturnCode()

int pba::ConfigBA::GetBundleReturnCode ( )
inline

Definition at line 220 of file ConfigBA.h.

References __pba_return_code.

◆ GetBundleTiming()

double pba::ConfigBA::GetBundleTiming ( int  timer = TIMER_OVERALL)
inline

Definition at line 214 of file ConfigBA.h.

References __timer_record.

◆ GetCurrentDevice()

int pba::ConfigBA::GetCurrentDevice ( )
inline

Definition at line 219 of file ConfigBA.h.

References __current_device.

◆ GetFinalMSE()

float pba::ConfigBA::GetFinalMSE ( )
inline

Definition at line 213 of file ConfigBA.h.

References __final_mse.

◆ GetInitialMSE()

float pba::ConfigBA::GetInitialMSE ( )
inline

Definition at line 212 of file ConfigBA.h.

References __initial_mse.

◆ GetIterationsCG()

int pba::ConfigBA::GetIterationsCG ( )
inline

Definition at line 218 of file ConfigBA.h.

References __num_cg_iteration.

◆ GetIterationsLM()

int pba::ConfigBA::GetIterationsLM ( )
inline

Definition at line 217 of file ConfigBA.h.

References __num_lm_iteration.

◆ GetOutputParam()

const char* pba::ConfigBA::GetOutputParam ( )
inline

Definition at line 211 of file ConfigBA.h.

References __driver_output.

◆ IsTimeBudgetAvailable()

bool pba::ConfigBA::IsTimeBudgetAvailable ( )
protected

◆ MyClock()

double pba::ConfigBA::MyClock ( )
protected

Definition at line 284 of file ConfigBA.cpp.

References NULL.

Referenced by BundleTimerGetNow(), BundleTimerStart(), and BundleTimerSwitch().

◆ ParseParam()

◆ PrintBundleStatistics()

◆ ResetBundleStatistics()

◆ ResetTemporarySetting()

◆ SaveBundleRecord()

void pba::ConfigBA::SaveBundleRecord ( int  iter,
float  res,
float  damping,
float  gn,
float  gi 
)
protected

◆ SaveBundleStatistics()

Member Data Documentation

◆ __abort_flag

◆ __accurate_gain_ratio

bool pba::ConfigBA::__accurate_gain_ratio

◆ __bundle_current_mode

◆ __bundle_mode_next

◆ __bundle_records

std::vector<float> pba::ConfigBA::__bundle_records
protected

Definition at line 183 of file ConfigBA.h.

Referenced by ResetBundleStatistics(), SaveBundleRecord(), and SaveBundleStatistics().

◆ __bundle_time_budget

◆ __cg_max_iteration

◆ __cg_min_iteration

◆ __cg_norm_guard

float pba::ConfigBA::__cg_norm_guard

◆ __cg_norm_threshold

float pba::ConfigBA::__cg_norm_threshold

◆ __cg_recalculate_freq

int pba::ConfigBA::__cg_recalculate_freq

Definition at line 88 of file ConfigBA.h.

Referenced by ConfigBA(), ParseParam(), and pba::SparseBundleCU::SolveNormalEquationPCGB().

◆ __cg_schur_complement

bool pba::ConfigBA::__cg_schur_complement

◆ __cpu_data_precision

int pba::ConfigBA::__cpu_data_precision
protected

◆ __cpu_thread_profile

bool pba::ConfigBA::__cpu_thread_profile
protected

Definition at line 175 of file ConfigBA.h.

Referenced by ConfigBA(), and ParseParam().

◆ __current_device

int pba::ConfigBA::__current_device
protected

◆ __current_iteration

◆ __data_normalize_median

float pba::ConfigBA::__data_normalize_median

◆ __debug_pba

bool pba::ConfigBA::__debug_pba
protected

Definition at line 176 of file ConfigBA.h.

Referenced by ConfigBA(), and ParseParam().

◆ __depth_check_epsilon

float pba::ConfigBA::__depth_check_epsilon

Definition at line 145 of file ConfigBA.h.

Referenced by ConfigBA(), pba::SparseBundleCU::NormalizeDataD(), and ParseParam().

◆ __depth_degeneracy_fix

bool pba::ConfigBA::__depth_degeneracy_fix

◆ __depth_normalize

bool pba::ConfigBA::__depth_normalize

◆ __depth_scaling

float pba::ConfigBA::__depth_scaling
protected

◆ __driver_output

const char* pba::ConfigBA::__driver_output
protected

Definition at line 182 of file ConfigBA.h.

Referenced by ConfigBA(), GetOutputParam(), and ParseParam().

◆ __final_mse

float pba::ConfigBA::__final_mse
protected

◆ __final_mse_x

float pba::ConfigBA::__final_mse_x
protected

◆ __fixed_intrinsics

◆ __focal_normalize

◆ __focal_scaling

◆ __initial_mse

float pba::ConfigBA::__initial_mse
protected

◆ __jacobian_normalize

◆ __jc_store_original

◆ __jc_store_transpose

◆ __lm_check_gradient

bool pba::ConfigBA::__lm_check_gradient

◆ __lm_damping_auto_switch

float pba::ConfigBA::__lm_damping_auto_switch

◆ __lm_delta_threshold

float pba::ConfigBA::__lm_delta_threshold

Definition at line 93 of file ConfigBA.h.

Referenced by ConfigBA(), pba::SparseBundleCU::NonlinearOptimizeLM(), and ParseParam().

◆ __lm_gradient_threshold

float pba::ConfigBA::__lm_gradient_threshold

Definition at line 95 of file ConfigBA.h.

Referenced by ConfigBA(), pba::SparseBundleCU::NonlinearOptimizeLM(), and ParseParam().

◆ __lm_initial_damp

◆ __lm_max_iteration

int pba::ConfigBA::__lm_max_iteration

Definition at line 85 of file ConfigBA.h.

Referenced by ConfigBA(), pba::SparseBundleCU::NonlinearOptimizeLM(), and ParseParam().

◆ __lm_maximum_damp

float pba::ConfigBA::__lm_maximum_damp

Definition at line 100 of file ConfigBA.h.

Referenced by ConfigBA(), pba::SparseBundleCU::NonlinearOptimizeLM(), and ParseParam().

◆ __lm_minimum_damp

float pba::ConfigBA::__lm_minimum_damp

Definition at line 99 of file ConfigBA.h.

Referenced by ConfigBA(), pba::SparseBundleCU::NonlinearOptimizeLM(), and ParseParam().

◆ __lm_mse_threshold

float pba::ConfigBA::__lm_mse_threshold

Definition at line 96 of file ConfigBA.h.

Referenced by ConfigBA(), pba::SparseBundleCU::NonlinearOptimizeLM(), and ParseParam().

◆ __lm_use_diagonal_damp

◆ __matlab_format_stat

bool pba::ConfigBA::__matlab_format_stat
protected

Definition at line 180 of file ConfigBA.h.

Referenced by ConfigBA(), and SaveBundleStatistics().

◆ __memory_usage

size_t pba::ConfigBA::__memory_usage
protected

◆ __multiply_jx_usenoj

bool pba::ConfigBA::__multiply_jx_usenoj
protected

◆ __no_jacobian_store

◆ __num_camera_modified

int pba::ConfigBA::__num_camera_modified
protected

Definition at line 170 of file ConfigBA.h.

Referenced by pba::SparseBundleCU::NormalizeDataD(), and ResetBundleStatistics().

◆ __num_cg_iteration

◆ __num_cpu_thread

int pba::ConfigBA::__num_cpu_thread[NUM_FUNC]
protected

◆ __num_cpu_thread_all

int pba::ConfigBA::__num_cpu_thread_all
protected

Definition at line 185 of file ConfigBA.h.

Referenced by ConfigBA(), ParseParam(), and ResetBundleStatistics().

◆ __num_jacobian_eval

int pba::ConfigBA::__num_jacobian_eval
protected

Definition at line 169 of file ConfigBA.h.

Referenced by pba::SparseBundleCU::EvaluateJacobians(), and ResetBundleStatistics().

◆ __num_lm_iteration

int pba::ConfigBA::__num_lm_iteration
protected

◆ __num_lm_success

int pba::ConfigBA::__num_lm_success
protected

◆ __num_point_behind

int pba::ConfigBA::__num_point_behind
protected

Definition at line 171 of file ConfigBA.h.

Referenced by pba::SparseBundleCU::NormalizeDataD(), and ResetBundleStatistics().

◆ __num_projection_eval

int pba::ConfigBA::__num_projection_eval
protected

◆ __pba_experimental

int pba::ConfigBA::__pba_experimental

Definition at line 104 of file ConfigBA.h.

Referenced by ConfigBA(), and ParseParam().

◆ __pba_return_code

int pba::ConfigBA::__pba_return_code
protected

◆ __profile_pba

◆ __recent_cg_status

int pba::ConfigBA::__recent_cg_status
protected

◆ __reset_initial_distortion

bool pba::ConfigBA::__reset_initial_distortion

◆ __save_gradient_norm

bool pba::ConfigBA::__save_gradient_norm

◆ __selected_device

◆ __stat_filename

char* pba::ConfigBA::__stat_filename
protected

Definition at line 181 of file ConfigBA.h.

Referenced by ConfigBA(), ParseParam(), ResetTemporarySetting(), and SaveBundleStatistics().

◆ __timer_record

double pba::ConfigBA::__timer_record[NUM_TIMER]
protected

◆ __use_radial_distortion

◆ __verbose_allocation

bool pba::ConfigBA::__verbose_allocation

Definition at line 129 of file ConfigBA.h.

Referenced by ConfigBA(), and ParseParam().

◆ __verbose_cg_iteration

bool pba::ConfigBA::__verbose_cg_iteration

◆ __verbose_function_time

bool pba::ConfigBA::__verbose_function_time

Definition at line 126 of file ConfigBA.h.

Referenced by ConfigBA(), and ParseParam().

◆ __verbose_level

◆ __verbose_sse

bool pba::ConfigBA::__verbose_sse

Definition at line 131 of file ConfigBA.h.

Referenced by ConfigBA(), pba::SparseBundleCU::NonlinearOptimizeLM(), and ParseParam().

◆ __warmup_device

bool pba::ConfigBA::__warmup_device
protected

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