OpenDroneMap / ODM

A command line toolkit to generate maps, point clouds, 3D models and DEMs from drone, balloon or kite images. 📷

Home Page:https://opendronemap.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Video to image conversion GPS tagging stops working after a while

rawnsley opened this issue · comments

How did you install ODM? (Docker, installer, natively, ...)?

Running through Docker on MacOS

What is the problem?

Input is a video from a DJI drone where I have extracted the embedded SRT stream into companion file. The video conversion creates frames for the whole video correctly and adds GPS EXIF data for the first 39 frames, but then doesn't it for any more frames after that. This corresponds to frame 410 in the video and there is nothing obviously unusual at that point in the SRT file.

What should be the expected behavior?

All frames should be annotated with GPS EXIF data

How can we reproduce this?

Command line:

docker run -ti --rm -v /my/projects/datasets opendronemap/odm --project-path /datasets test3

Output:

[INFO]    Initializing ODM 3.5.1 - Mon May 27 07:09:37  2024
[INFO]    ==============
[INFO]    3d_tiles: False
[INFO]    align: None
[INFO]    auto_boundary: False
[INFO]    auto_boundary_distance: 0
[INFO]    bg_removal: False
[INFO]    boundary: {}
[INFO]    build_overviews: False
[INFO]    camera_lens: auto
[INFO]    cameras: {}
[INFO]    cog: False
[INFO]    copy_to: None
[INFO]    crop: 3
[INFO]    dem_decimation: 1
[INFO]    dem_euclidean_map: False
[INFO]    dem_gapfill_steps: 3
[INFO]    dem_resolution: 5
[INFO]    dsm: False
[INFO]    dtm: False
[INFO]    end_with: odm_postprocess
[INFO]    fast_orthophoto: False
[INFO]    feature_quality: high
[INFO]    feature_type: dspsift
[INFO]    force_gps: False
[INFO]    gcp: None
[INFO]    geo: None
[INFO]    gltf: False
[INFO]    gps_accuracy: 3
[INFO]    ignore_gsd: False
[INFO]    matcher_neighbors: 0
[INFO]    matcher_order: 0
[INFO]    matcher_type: flann
[INFO]    max_concurrency: 10
[INFO]    merge: all
[INFO]    mesh_octree_depth: 11
[INFO]    mesh_size: 200000
[INFO]    min_num_features: 10000
[INFO]    name: test3
[INFO]    no_gpu: False
[INFO]    optimize_disk_space: False
[INFO]    orthophoto_compression: DEFLATE
[INFO]    orthophoto_cutline: False
[INFO]    orthophoto_kmz: False
[INFO]    orthophoto_no_tiled: False
[INFO]    orthophoto_png: False
[INFO]    orthophoto_resolution: 5
[INFO]    pc_classify: False
[INFO]    pc_copc: False
[INFO]    pc_csv: False
[INFO]    pc_ept: False
[INFO]    pc_filter: 5
[INFO]    pc_las: False
[INFO]    pc_quality: medium
[INFO]    pc_rectify: False
[INFO]    pc_sample: 0
[INFO]    pc_skip_geometric: False
[INFO]    primary_band: auto
[INFO]    project_path: /datasets/test3
[INFO]    radiometric_calibration: none
[INFO]    rerun: None
[INFO]    rerun_all: False
[INFO]    rerun_from: None
[INFO]    rolling_shutter: False
[INFO]    rolling_shutter_readout: 0
[INFO]    sfm_algorithm: incremental
[INFO]    sfm_no_partial: False
[INFO]    skip_3dmodel: False
[INFO]    skip_band_alignment: False
[INFO]    skip_orthophoto: False
[INFO]    skip_report: False
[INFO]    sky_removal: False
[INFO]    sm_cluster: None
[INFO]    sm_no_align: False
[INFO]    smrf_scalar: 1.25
[INFO]    smrf_slope: 0.15
[INFO]    smrf_threshold: 0.5
[INFO]    smrf_window: 18.0
[INFO]    split: 999999
[INFO]    split_image_groups: None
[INFO]    split_overlap: 150
[INFO]    texturing_keep_unseen_faces: False
[INFO]    texturing_single_material: False
[INFO]    texturing_skip_global_seam_leveling: False
[INFO]    tiles: False
[INFO]    use_3dmesh: False
[INFO]    use_exif: False
[INFO]    use_fixed_camera_params: False
[INFO]    use_hybrid_bundle_adjustment: False
[INFO]    video_limit: 500
[INFO]    video_resolution: 4000
[INFO]    ==============
[INFO]    Running dataset stage
[INFO]    Loading dataset from: /datasets/test3/images
[INFO]    Found video files (1), extracting frames
[INFO]    Processing video: /datasets/test3/images/section.mp4
[INFO]    VideoInfo(total_frames=1799, frame_rate=29.97002997002997, basename='section')
[INFO]    Use pseudo start time: 2024-05-27 07:08:43.253903
[INFO]    Loading SRT file: /datasets/test3/images/section.srt
[INFO]    Preprocessing for black frame checker... this might take a bit
[INFO]    Preprocessing time: 15.10s
[INFO]    Calculated luminance_range_size is 255
[INFO]    Calculated luminance_minimum_value is 0
[INFO]    Calculated absolute_threshold is 76.5
[INFO]    Total processing time: 54.07s99/1799: 
[INFO]    Loading 120 images
[INFO]    Wrote images database: /datasets/test3/images.json
[INFO]    Found 120 usable images
[WARNING] GPS position not available for section_48_518.jpg
[WARNING] GPS position not available for section_83_1039.jpg
[WARNING] GPS position not available for section_44_462.jpg
[WARNING] GPS position not available for section_97_1093.jpg
[WARNING] GPS position not available for section_52_793.jpg
[WARNING] GPS position not available for section_64_963.jpg
[WARNING] GPS position not available for section_69_983.jpg
[WARNING] GPS position not available for section_54_924.jpg
...

Input files:

Thanks for posting test files @rawnsley !

I've made a partial improvement in #1765, but the real problem is your input data; the GPS values in your subtitle file stop updating around 0:13. We now set the GPS values to each image, but I doubt the results will be good. 🙏