Skip to content

sfm: add ground control point constraints - #1307

Open
Rheinwalt wants to merge 1 commit into
cdcseacave:developfrom
Rheinwalt:feature/create-structure-gcp
Open

Rheinwalt wants to merge 1 commit into
cdcseacave:developfrom
Rheinwalt:feature/create-structure-gcp

Conversation

@Rheinwalt

Copy link
Copy Markdown

Add ground control point support to CreateStructure, including robust
alignment to surveyed coordinates and retained GCP constraints during bundle
adjustment.

Changes

  • import GCP coordinates, accuracies, and image observations from CSV
  • triangulate controls and estimate a robust similarity transform into the
    surveyed coordinate frame
  • retain only RANSAC-inlier controls as bundle-adjustment constraints
  • optimize latent GCP positions using image reprojection residuals and
    accuracy-weighted surveyed-coordinate priors
  • preserve GCPs through scene clustering and resection
  • keep the reconstruction tied to the GCP frame during final and resection BA
  • distinguish GCP alignment from GPS/ENU alignment
  • expose the workflow through CreateStructure and the Python bindings
  • add documentation and regression coverage

The new options are:

  • --import-gcp-csv
  • --align-gcp-threshold
  • --gcp-position-weight

The CSV columns are:

gcp_label,image_file_name,x,y,x_map,y_map,elev,x_map_acc,y_map_acc,elev_acc

Upstream integration

Current develop contains GPS alignment, known-pose reconstruction, and shared
final/resection BA infrastructure, but no SfM GCP model or GCP-constrained BA.
This implementation uses those current pipeline structures and gives successful
GCP alignment precedence over imported-pose and GPS alignment.

Real-world use

The workflow was developed and exercised on historical aerial photographs from
the HistoriX project, including the Casa Grande and Iceland datasets. The earlier
implementation was used end to end to reconstruct the scanned aerial images,
align the results with surveyed GCPs, and produce georeferenced sparse and dense
point clouds for comparison with the supplied reference DEMs. The implementation
in this PR ports that workflow to current develop and adds stricter handling of
RANSAC-rejected controls.

@cdcseacave

Copy link
Copy Markdown
Owner

Thank you for this great contribution. Right now the SfM pipeline is going through a major refactoring and new features are being added, so I'm not sure if it's best to merge this now or after I finish with the refactoring.

@Rheinwalt

Copy link
Copy Markdown
Author

Thanks, and no problem. I’m happy to rebase and adapt the PR once the new structure has settled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants