Internal functions
These functions may or may not be exported. They are used internally.
BundleAdjustmentModels.readfile
— Functionreadfile(filename::String; T::Type=Float64)
Reads the .txt.bzip2
file specified in filename
and extracts data. Returns:
cam_indices
: Vector of camera indices (Int)pnt_indices
: Vector of point indices (Int)pt2d
: Observed 2D points (Vector{T})x0
: Combined vector of 3D points and camera parameters (Vector{T})ncams
: Number of cameras (Int)npnts
: Number of 3D points (Int)nobs
: Number of observations (Int)
Expected file structure:
- First line:
ncams npnts nobs
- Following
nobs
lines:cam_index point_index xcoord ycoord
- Camera parameters: 9 lines per camera
- 3D points: 3 lines per point
BundleAdjustmentModels.get_filename
— Functionget_filename(name::AbstractString)
Analyze the name
given to check if it matches one of the known names. Return the full name with "-pre.txt.bz2" extension.
BundleAdjustmentModels.get_group
— Functionget_group(name::AbstractString)
Get the group corresponding to the given name
of the problem.
BundleAdjustmentModels.ba_download_artifact
— Functionba_download_artifact(tree_hash::SHA1, tarball_url::String, tarball_hash::String;
verbose::Bool = false, io::IO=stderr)
Download/install an artifact into the artifact store. Returns true
on success. The modifications from the original functions are here to avoid unpacking the archive and avoid checking from official repository since these files are not official artifacts.
BundleAdjustmentModels.ba_ensure_artifact_installed
— Functionba_ensure_artifact_installed(filename::String, artifact_name::String, artifacts_toml::String;
platform::AbstractPlatform = HostPlatform(),
pkg_uuid::Union{Base.UUID,Nothing}=nothing,
verbose::Bool = false,
quiet_download::Bool = false,
io::IO=stderr)
Ensures an artifact is installed, downloading it via the download information stored in artifacts_toml
if necessary. Throws an error if unable to install. The modifications from the original functions are here to avoid unpacking the archive and avoid checking from official repository since these files are not official artifacts.
BundleAdjustmentModels.P1!
— FunctionFirst step in camera projection
BundleAdjustmentModels.P2!
— FunctionSecond step in camera projection
BundleAdjustmentModels.JP1!
— FunctionJacobian of the first step of the projection
BundleAdjustmentModels.JP3!
— FunctionJacobian of the third step of the projection
BundleAdjustmentModels.JP2!
— FunctionJacobian of the second step of the projection