|
Blender V5.0
|
#include "intern/reconstruction.h"#include "intern/camera_intrinsics.h"#include "intern/tracks.h"#include "intern/utildefines.h"#include "libmv/logging/logging.h"#include "libmv/simple_pipeline/bundle.h"#include "libmv/simple_pipeline/initialize_reconstruction.h"#include "libmv/simple_pipeline/keyframe_selection.h"#include "libmv/simple_pipeline/modal_solver.h"#include "libmv/simple_pipeline/pipeline.h"#include "libmv/simple_pipeline/reconstruction_scale.h"#include "libmv/simple_pipeline/tracks.h"Go to the source code of this file.
Classes | |
| struct | libmv_Reconstruction |
| struct | EuclideanCamera |
| struct | EuclideanPoint |
| class | EuclideanReconstruction |
| class | ProgressUpdateCallback |
| class | Tracks |
Macros | |
| #define | SET_DISTORTION_FLAG_CHECKED(type, coefficient) |
| #define SET_DISTORTION_FLAG_CHECKED | ( | type, | |
| coefficient ) |
| void libmv::EuclideanBundle | ( | const Tracks & | tracks, |
| EuclideanReconstruction * | reconstruction ) |
Refine camera poses and 3D coordinates using bundle adjustment.
This routine adjusts all cameras and points in *reconstruction. This assumes a full observation for reconstructed tracks; this implies that if there is a reconstructed 3D point (a bundle) for a track, then all markers for that track will be included in the minimization. tracks should contain markers used in the initial reconstruction.
The cameras and bundles (3D points) are refined in-place.
Definition at line 650 of file bundle.cc.
Referenced by libmv_solveReconstruction().
| void libmv::EuclideanCompleteReconstruction | ( | const Tracks & | tracks, |
| EuclideanReconstruction * | reconstruction, | ||
| ProgressUpdateCallback * | update_callback = NULL ) |
Estimate camera poses and scene 3D coordinates for all frames and tracks.
This method should be used once there is an initial reconstruction in place, for example by reconstructing from two frames that have a sufficient baseline and number of tracks in common. This function iteratively triangulates points that are visible by cameras that have their pose estimated, then resections (i.e. estimates the pose) of cameras that are not estimated yet that can see triangulated points. This process is repeated until all points and cameras are estimated. Periodically, bundle adjustment is run to ensure a quality reconstruction.
tracks should contain markers used in the reconstruction. reconstruction should contain at least some 3D points or some estimated cameras. The minimum number of cameras is two (with no 3D points) and the minimum number of 3D points (with no estimated cameras) is 5.
Definition at line 345 of file intern/libmv/libmv/simple_pipeline/pipeline.cc.
Referenced by libmv_solveReconstruction().
| bool libmv::EuclideanReconstructTwoFrames | ( | const vector< Marker > & | markers, |
| EuclideanReconstruction * | reconstruction ) |
Initialize the reconstruction using two frames.
markers should contain all markers belonging to tracks visible in both frames. The pose estimation of the camera for these frames will be inserted into *reconstruction.
Definition at line 54 of file initialize_reconstruction.cc.
Referenced by libmv_solveReconstruction().
| double libmv::EuclideanReprojectionError | ( | const Tracks & | image_tracks, |
| const EuclideanReconstruction & | reconstruction, | ||
| const CameraIntrinsics & | intrinsics ) |
Definition at line 330 of file intern/libmv/libmv/simple_pipeline/pipeline.cc.
| void libmv::EuclideanScaleToUnity | ( | EuclideanReconstruction * | reconstruction | ) |
Scale euclidean reconstruction in a way variance of camera centers equals to one.
Definition at line 26 of file reconstruction_scale.cc.
Referenced by libmv_solveReconstruction().
| void libmv_reconstructionDestroy | ( | libmv_Reconstruction * | libmv_reconstruction | ) |
Definition at line 377 of file intern/reconstruction.cc.
References libmv_Reconstruction::intrinsics, and LIBMV_OBJECT_DELETE.
Referenced by BKE_tracking_reconstruction_context_free().
| libmv_CameraIntrinsics * libmv_reconstructionExtractIntrinsics | ( | libmv_Reconstruction * | libmv_reconstruction | ) |
Definition at line 516 of file intern/reconstruction.cc.
References libmv_Reconstruction::intrinsics.
Referenced by reconstruct_retrieve_libmv_intrinsics().
| int libmv_reconstructionIsValid | ( | libmv_Reconstruction * | libmv_reconstruction | ) |
Definition at line 373 of file intern/reconstruction.cc.
References libmv_Reconstruction::is_valid.
Referenced by BKE_tracking_reconstruction_finish().
| int libmv_reprojectionCameraForImage | ( | const libmv_Reconstruction * | libmv_reconstruction, |
| int | image, | ||
| double | mat[4][4] ) |
Definition at line 469 of file intern/reconstruction.cc.
References libmv::EuclideanReconstruction::CameraForImage(), l, libmv::EuclideanCamera::R, libmv_Reconstruction::reconstruction, and libmv::EuclideanCamera::t.
Referenced by reconstruct_retrieve_libmv_tracks().
| double libmv_reprojectionError | ( | const libmv_Reconstruction * | libmv_reconstruction | ) |
Definition at line 511 of file intern/reconstruction.cc.
References libmv_Reconstruction::error.
Referenced by BKE_tracking_reconstruction_solve().
| double libmv_reprojectionErrorForImage | ( | const libmv_Reconstruction * | libmv_reconstruction, |
| int | image ) |
Definition at line 433 of file intern/reconstruction.cc.
References libmv::EuclideanReconstruction::CameraForImage(), i, libmv_Reconstruction::intrinsics, libmv::Tracks::MarkersInImage(), libmv::EuclideanReconstruction::PointForTrack(), libmv_Reconstruction::reconstruction, sqrt, libmv_Reconstruction::tracks, libmv::Marker::x, and libmv::Marker::y.
Referenced by reconstruct_retrieve_libmv_tracks().
| double libmv_reprojectionErrorForTrack | ( | const libmv_Reconstruction * | libmv_reconstruction, |
| int | track ) |
Definition at line 398 of file intern/reconstruction.cc.
References libmv::EuclideanReconstruction::CameraForImage(), i, libmv_Reconstruction::intrinsics, libmv::Tracks::MarkersForTrack(), libmv::EuclideanReconstruction::PointForTrack(), libmv_Reconstruction::reconstruction, sqrt, libmv_Reconstruction::tracks, libmv::Marker::x, and libmv::Marker::y.
Referenced by reconstruct_retrieve_libmv_tracks().
| int libmv_reprojectionPointForTrack | ( | const libmv_Reconstruction * | libmv_reconstruction, |
| int | track, | ||
| double | pos[3] ) |
Definition at line 382 of file intern/reconstruction.cc.
References libmv::EuclideanReconstruction::PointForTrack(), pos, libmv_Reconstruction::reconstruction, and libmv::EuclideanPoint::X.
Referenced by reconstruct_retrieve_libmv_tracks().
| libmv_Reconstruction * libmv_solveModal | ( | const libmv_Tracks * | libmv_tracks, |
| const libmv_CameraIntrinsicsOptions * | libmv_camera_intrinsics_options, | ||
| const libmv_ReconstructionOptions * | libmv_reconstruction_options, | ||
| reconstruct_progress_update_cb | progress_update_callback, | ||
| void * | callback_customdata ) |
Definition at line 316 of file intern/reconstruction.cc.
References libmv::BUNDLE_NO_INTRINSICS, libmv::BUNDLE_NO_TRANSLATION, libmv_Reconstruction::intrinsics, libmv_Reconstruction::is_valid, libmv_cameraIntrinsicsCreateFromOptions(), LIBMV_OBJECT_NEW, libmv_Reconstruction::reconstruction, libmv_ReconstructionOptions::refine_intrinsics, and tracks.
Referenced by BKE_tracking_reconstruction_solve().
| libmv_Reconstruction * libmv_solveReconstruction | ( | const libmv_Tracks * | libmv_tracks, |
| const libmv_CameraIntrinsicsOptions * | libmv_camera_intrinsics_options, | ||
| libmv_ReconstructionOptions * | libmv_reconstruction_options, | ||
| reconstruct_progress_update_cb | progress_update_callback, | ||
| void * | callback_customdata ) |
Definition at line 220 of file intern/reconstruction.cc.
References libmv::BUNDLE_NO_CONSTRAINTS, EuclideanBundle(), EuclideanCompleteReconstruction(), EuclideanReconstructTwoFrames(), EuclideanScaleToUnity(), libmv_Reconstruction::intrinsics, libmv_Reconstruction::is_valid, libmv_ReconstructionOptions::keyframe1, libmv_ReconstructionOptions::keyframe2, LG, libmv_cameraIntrinsicsCreateFromOptions(), LIBMV_OBJECT_NEW, libmv::Tracks::MarkersForTracksInBothImages(), libmv_Reconstruction::reconstruction, libmv_ReconstructionOptions::refine_intrinsics, libmv_ReconstructionOptions::select_keyframes, and tracks.
Referenced by BKE_tracking_reconstruction_solve().