![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include <SparseBundleCPU.h>


Public Types | |
| typedef avec< Float > | VectorF |
| typedef std::vector< int > | VectorI |
| typedef float | float_t |
Public Types inherited from pba::ParallelBA | |
| 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 | |
| SparseBundleCPU (const int num_threads) | |
| virtual void | AbortBundleAdjustment () |
| virtual int | GetCurrentIteration () |
| virtual void | SetNextTimeBudget (int seconds) |
| virtual void | SetNextBundleMode (BundleModeT mode) |
| virtual void | SetFixedIntrinsics (bool fixed) |
| virtual void | EnableRadialDistortion (DistortionT type) |
| virtual void | ParseParam (int narg, char **argv) |
| SparseBundleCPU () | |
| 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 | SetFocalMask (const int *fmask, float weight) |
| virtual float | GetMeanSquaredError () |
| virtual int | RunBundleAdjustment () |
Public Member Functions inherited from pba::ParallelBA | |
| virtual void | ReserveStorage (size_t ncam, size_t npt, size_t nproj) |
| void | SetFocalLengthFixed (bool fixed) |
| void | ResetBundleStorage () |
| ParallelBA (DeviceT device=PBA_CUDA_DEVICE_DEFAULT, const int num_threads=-1) | |
| void * | operator new (size_t size) |
| virtual | ~ParallelBA () |
Public Member Functions inherited from pba::ConfigBA | |
| 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 () |
Protected Member Functions | |
| bool | ProcessIndexCameraQ (std::vector< int > &qmap, std::vector< int > &qlist) |
| void | ProcessWeightCameraQ (std::vector< int > &cpnum, std::vector< int > &qmap, Float *qmapw, Float *qlistw) |
| int | ValidateInputData () |
| int | InitializeBundle () |
| int | GetParameterLength () |
| void | BundleAdjustment () |
| void | NormalizeData () |
| void | TransferDataToHost () |
| void | DenormalizeData () |
| void | NormalizeDataF () |
| void | NormalizeDataD () |
| bool | InitializeStorageForSFM () |
| bool | InitializeStorageForCG () |
| void | SaveBundleRecord (int iter, float res, float damping, float &g_norm, float &g_inf) |
| void | PrepareJacobianNormalization () |
| void | EvaluateJacobians () |
| void | ComputeJtE (VectorF &E, VectorF &JtE, int mode=0) |
| void | ComputeJX (VectorF &X, VectorF &JX, int mode=0) |
| void | ComputeDiagonal (VectorF &JJI) |
| void | ComputeBlockPC (float lambda, bool dampd) |
| void | ApplyBlockPC (VectorF &v, VectorF &pv, int mode=0) |
| float | UpdateCameraPoint (VectorF &dx, VectorF &cuImageTempProj) |
| float | EvaluateProjection (VectorF &cam, VectorF &point, VectorF &proj) |
| float | EvaluateProjectionX (VectorF &cam, VectorF &point, VectorF &proj) |
| float | SaveUpdatedSystem (float residual_reduction, float dx_sqnorm, float damping) |
| float | EvaluateDeltaNorm () |
| int | SolveNormalEquationPCGB (float lambda) |
| int | SolveNormalEquationPCGX (float lambda) |
| int | SolveNormalEquation (float lambda) |
| void | NonlinearOptimizeLM () |
| void | AdjustBundleAdjsutmentMode () |
| void | RunProfileSteps () |
| void | RunTestIterationLM (bool reduced) |
| void | DumpCooJacobian () |
Protected Member Functions inherited from pba::ConfigBA | |
| 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 () |
Definition at line 144 of file SparseBundleCPU.h.
| typedef float pba::SparseBundleCPU< Float >::float_t |
Definition at line 150 of file SparseBundleCPU.h.
| typedef avec<Float> pba::SparseBundleCPU< Float >::VectorF |
Definition at line 148 of file SparseBundleCPU.h.
| typedef std::vector<int> pba::SparseBundleCPU< Float >::VectorI |
Definition at line 149 of file SparseBundleCPU.h.
| pba::SparseBundleCPU< Float >::SparseBundleCPU | ( | const int | num_threads | ) |
Definition at line 2550 of file SparseBundleCPU.cpp.
References pba::ConfigBA::__cpu_data_precision, pba::ConfigBA::__multiply_jx_usenoj, pba::ProgramCPU::__num_cpu_cores, pba::ConfigBA::__num_cpu_thread, pba::ConfigBA::__verbose_level, pba::ConfigBA::FUNC_BCC_JCO, pba::ConfigBA::FUNC_BCC_JCT, pba::ConfigBA::FUNC_BCP, pba::ConfigBA::FUNC_JJ_JCO_JCT_JP, pba::ConfigBA::FUNC_JJ_JCO_JP, pba::ConfigBA::FUNC_JJ_JCT_JP, pba::ConfigBA::FUNC_JJ_JP, pba::ConfigBA::FUNC_JTE_, pba::ConfigBA::FUNC_JTEC_JCO, pba::ConfigBA::FUNC_JTEC_JCT, pba::ConfigBA::FUNC_JTEP, pba::ConfigBA::FUNC_JX, pba::ConfigBA::FUNC_JX_, pba::ConfigBA::FUNC_MPC, pba::ConfigBA::FUNC_MPP, pba::ConfigBA::FUNC_PJ, pba::ConfigBA::FUNC_VS, and pba::ConfigBA::FUNC_VV.
| pba::SparseBundleCPU< Float >::SparseBundleCPU | ( | ) |
|
inlinevirtual |
Reimplemented from pba::ParallelBA.
Definition at line 254 of file SparseBundleCPU.h.
References pba::ConfigBA::__abort_flag.
|
protected |
Definition at line 3885 of file SparseBundleCPU.cpp.
|
protected |
Definition at line 3202 of file SparseBundleCPU.cpp.
References pba::avec< Float >::begin(), and pba::ProgramCPU::MultiplyBlockConditioner().
|
protected |
Definition at line 2688 of file SparseBundleCPU.cpp.
|
protected |
Definition at line 3171 of file SparseBundleCPU.cpp.
References pba::ProgramCPU::ComputeDiagonalBlock(), and pba::ProgramCPU::ComputeDiagonalBlock_().
|
protected |
Definition at line 3211 of file SparseBundleCPU.cpp.
References pba::ProgramCPU::ComputeDiagonal().
|
protected |
Definition at line 3047 of file SparseBundleCPU.cpp.
References pba::avec< Float >::begin(), pba::ProgramCPU::ComputeJQtEC(), pba::ProgramCPU::ComputeJtE(), pba::ProgramCPU::ComputeJtE_(), pba::ProgramCPU::ComputeVXY(), and POINT_ALIGN.
|
protected |
Definition at line 3147 of file SparseBundleCPU.cpp.
References pba::avec< Float >::begin(), pba::ProgramCPU::ComputeJQX(), pba::ProgramCPU::ComputeJX(), pba::ProgramCPU::ComputeJX_(), and X.
|
protected |
Definition at line 3391 of file SparseBundleCPU.cpp.
|
protected |
Definition at line 3720 of file SparseBundleCPU.cpp.
References width.
|
inlinevirtual |
Reimplemented from pba::ParallelBA.
Definition at line 263 of file SparseBundleCPU.h.
References pba::ConfigBA::__use_radial_distortion, and type.
|
protected |
Definition at line 3895 of file SparseBundleCPU.cpp.
References pba::ProgramCPU::ComputeVectorNorm(), POINT_ALIGN, and pba::avec< Float >::set().
|
protected |
Definition at line 3015 of file SparseBundleCPU.cpp.
References pba::ProgramCPU::ComputeJacobian(), and NULL.
|
protected |
Definition at line 3117 of file SparseBundleCPU.cpp.
References pba::avec< Float >::begin(), pba::ProgramCPU::ComputeProjection(), pba::ProgramCPU::ComputeProjectionQ(), and pba::ProgramCPU::ComputeVectorNorm().
|
protected |
Definition at line 3132 of file SparseBundleCPU.cpp.
References pba::avec< Float >::begin(), pba::ProgramCPU::ComputeProjectionQ(), pba::ProgramCPU::ComputeProjectionX(), and pba::ProgramCPU::ComputeVectorNorm().
|
inlinevirtual |
Reimplemented from pba::ParallelBA.
Definition at line 255 of file SparseBundleCPU.h.
References pba::ConfigBA::__current_iteration.
|
virtual |
Reimplemented from pba::ParallelBA.
Definition at line 2644 of file SparseBundleCPU.cpp.
|
protected |
Definition at line 2683 of file SparseBundleCPU.cpp.
References POINT_ALIGN.
|
protected |
Definition at line 2671 of file SparseBundleCPU.cpp.
|
protected |
Definition at line 2963 of file SparseBundleCPU.cpp.
References ALLOCATE_OPTIONAL_DATA, and ALLOCATE_REQUIRED_DATA.
|
protected |
Definition at line 2742 of file SparseBundleCPU.cpp.
References ALLOCATE_OPTIONAL_DATA, ALLOCATE_REQUIRED_DATA, copy, and POINT_ALIGN.
|
protected |
Definition at line 3910 of file SparseBundleCPU.cpp.
References pba::ProgramCPU::ComputeJtE(), cloudViewer::utility::floor(), max(), pba::avec< Float >::size(), and pba::ProgramCPU::UpdateCameraPoint().
|
protected |
Definition at line 2710 of file SparseBundleCPU.cpp.
|
protected |
Definition at line 3286 of file SparseBundleCPU.cpp.
References pba::CameraT_< FT >::f, fabs(), pba::CameraT_< FT >::m, max(), min(), and pba::CameraT_< FT >::t.
|
protected |
Definition at line 3228 of file SparseBundleCPU.cpp.
References copy.
|
inlinevirtual |
Reimplemented from pba::ParallelBA.
Definition at line 266 of file SparseBundleCPU.h.
References pba::ConfigBA::ParseParam().
|
protected |
Definition at line 2992 of file SparseBundleCPU.cpp.
References pba::ProgramCPU::ComputeDiagonal(), pba::ProgramCPU::ComputeRSQRT(), pba::ProgramCPU::ComputeSQRT(), and pba::avec< Float >::swap().
|
protected |
Definition at line 2848 of file SparseBundleCPU.cpp.
|
protected |
Definition at line 2919 of file SparseBundleCPU.cpp.
|
virtual |
Reimplemented from pba::ParallelBA.
Definition at line 2650 of file SparseBundleCPU.cpp.
|
protected |
Definition at line 4193 of file SparseBundleCPU.cpp.
References pba::ProgramCPU::ComputeDiagonal(), pba::ProgramCPU::ComputeJtE(), pba::ProgramCPU::ComputeJX(), pba::ProgramCPU::ComputeSAXPY(), pba::ProgramCPU::ComputeSXYPZ(), pba::ProgramCPU::ComputeVectorDot(), pba::ProgramCPU::ComputeVectorNorm(), pba::ProgramCPU::ComputeVectorNormW(), max(), PROFILE, PROTILE, PROTILE2, PROXILE, pba::ProgramCPU::SetVectorZero(), and pba::ProgramCPU::UpdateCameraPoint().
|
protected |
Definition at line 3781 of file SparseBundleCPU.cpp.
References pba::ProgramCPU::ComputeJtE(), pba::ProgramCPU::ComputeJX(), pba::ProgramCPU::ComputeVectorDot(), pba::ProgramCPU::ComputeVectorNorm(), and pba::ProgramCPU::UpdateCameraPoint().
|
protected |
Definition at line 3105 of file SparseBundleCPU.cpp.
References pba::ProgramCPU::ComputeVectorMax(), pba::ProgramCPU::ComputeVectorNorm(), and pba::ConfigBA::SaveBundleRecord().
|
protected |
save the new motion/struture
Definition at line 3825 of file SparseBundleCPU.cpp.
References pba::ProgramCPU::ComputeJX(), pba::ProgramCPU::ComputeVectorDot(), pba::ProgramCPU::ComputeVectorNorm(), pba::ProgramCPU::ComputeVectorNormW(), POINT_ALIGN, and pba::avec< Float >::set().
|
virtual |
Reimplemented from pba::ParallelBA.
Definition at line 2614 of file SparseBundleCPU.cpp.
References NULL.
|
inlinevirtual |
Reimplemented from pba::ParallelBA.
Definition at line 262 of file SparseBundleCPU.h.
References pba::ConfigBA::__fixed_intrinsics.
|
virtual |
Reimplemented from pba::ParallelBA.
Definition at line 2622 of file SparseBundleCPU.cpp.
|
inlinevirtual |
Reimplemented from pba::ParallelBA.
Definition at line 259 of file SparseBundleCPU.h.
References pba::ConfigBA::__bundle_mode_next.
|
inlinevirtual |
Reimplemented from pba::ParallelBA.
Definition at line 256 of file SparseBundleCPU.h.
References pba::ConfigBA::__bundle_time_budget, and seconds.
|
virtual |
Reimplemented from pba::ParallelBA.
Definition at line 2628 of file SparseBundleCPU.cpp.
|
virtual |
Reimplemented from pba::ParallelBA.
Definition at line 2634 of file SparseBundleCPU.cpp.
|
protected |
Definition at line 3703 of file SparseBundleCPU.cpp.
|
protected |
Definition at line 3576 of file SparseBundleCPU.cpp.
References pba::ProgramCPU::ComputeJtE(), pba::ProgramCPU::ComputeJX(), pba::ProgramCPU::ComputeSAX(), pba::ProgramCPU::ComputeSAXPY(), pba::ProgramCPU::ComputeSXYPZ(), pba::ProgramCPU::ComputeVectorDot(), pba::ProgramCPU::ComputeVectorNorm(), pba::ProgramCPU::ComputeVectorNormW(), fabs(), and min().
|
protected |
Definition at line 3423 of file SparseBundleCPU.cpp.
References pba::ProgramCPU::ComputeJtE(), pba::ProgramCPU::ComputeJX(), pba::ProgramCPU::ComputeSAX(), pba::ProgramCPU::ComputeSAXPY(), pba::ProgramCPU::ComputeSXYPZ(), pba::ProgramCPU::ComputeVectorDot(), pba::ProgramCPU::ComputeVectorNorm(), pba::ProgramCPU::ComputeVectorNormW(), pba::avec< Float >::data(), fabs(), min(), and pba::avec< Float >::set().
|
protected |
Definition at line 2717 of file SparseBundleCPU.cpp.
References copy.
|
protected |
Definition at line 3796 of file SparseBundleCPU.cpp.
References pba::ProgramCPU::ComputeVXY(), POINT_ALIGN, and pba::ProgramCPU::UpdateCameraPoint().
|
protected |
Definition at line 2661 of file SparseBundleCPU.cpp.
References NULL.
|
protected |
Definition at line 156 of file SparseBundleCPU.h.
|
protected |
Definition at line 161 of file SparseBundleCPU.h.
|
protected |
Definition at line 185 of file SparseBundleCPU.h.
|
protected |
Definition at line 169 of file SparseBundleCPU.h.
|
protected |
Definition at line 170 of file SparseBundleCPU.h.
|
protected |
Definition at line 181 of file SparseBundleCPU.h.
|
protected |
Definition at line 182 of file SparseBundleCPU.h.
|
protected |
Definition at line 180 of file SparseBundleCPU.h.
|
protected |
Definition at line 201 of file SparseBundleCPU.h.
|
protected |
Definition at line 204 of file SparseBundleCPU.h.
|
protected |
Definition at line 202 of file SparseBundleCPU.h.
|
protected |
Definition at line 203 of file SparseBundleCPU.h.
|
protected |
Definition at line 174 of file SparseBundleCPU.h.
|
protected |
Definition at line 175 of file SparseBundleCPU.h.
|
protected |
Definition at line 177 of file SparseBundleCPU.h.
|
protected |
Definition at line 176 of file SparseBundleCPU.h.
|
protected |
Definition at line 173 of file SparseBundleCPU.h.
|
protected |
Definition at line 171 of file SparseBundleCPU.h.
|
protected |
Definition at line 172 of file SparseBundleCPU.h.
|
protected |
Definition at line 179 of file SparseBundleCPU.h.
|
protected |
Definition at line 178 of file SparseBundleCPU.h.
|
protected |
Definition at line 190 of file SparseBundleCPU.h.
|
protected |
LM normal equation.
Definition at line 189 of file SparseBundleCPU.h.
|
protected |
Definition at line 191 of file SparseBundleCPU.h.
|
protected |
Definition at line 193 of file SparseBundleCPU.h.
|
protected |
Definition at line 195 of file SparseBundleCPU.h.
|
protected |
Definition at line 186 of file SparseBundleCPU.h.
|
protected |
Definition at line 192 of file SparseBundleCPU.h.
|
protected |
Definition at line 194 of file SparseBundleCPU.h.
|
protected |
Definition at line 163 of file SparseBundleCPU.h.
|
protected |
Definition at line 160 of file SparseBundleCPU.h.
|
protected |
Definition at line 153 of file SparseBundleCPU.h.
|
protected |
Definition at line 155 of file SparseBundleCPU.h.
|
protected |
Definition at line 199 of file SparseBundleCPU.h.
|
protected |
Definition at line 154 of file SparseBundleCPU.h.
|
protected |
Definition at line 157 of file SparseBundleCPU.h.
|
protected |
Definition at line 162 of file SparseBundleCPU.h.
|
protected |
Definition at line 166 of file SparseBundleCPU.h.
|
protected |
Definition at line 200 of file SparseBundleCPU.h.