Internal functions

These functions may or may not be exported. They are used internally.

BundleAdjustmentModels.readfileFunction
readfile(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
source
BundleAdjustmentModels.get_filenameFunction
get_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.

source
BundleAdjustmentModels.ba_download_artifactFunction
ba_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.

source
BundleAdjustmentModels.ba_ensure_artifact_installedFunction
ba_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.

source