alicevision / Meshroom

3D Reconstruction Software
http://alicevision.org
Other
11.06k stars 1.08k forks source link

mov to image sequence metadata #2329

Open mirelloo opened 6 months ago

mirelloo commented 6 months ago

hello,

I'm using the camera track + photogrammetry pipeline to solve plate's 3D cameras. it s working great but I'm running into some precision issues which might be due to some lack of metadata. I'm using an iphone 13 to both take videos of the environment and the actual plate, then convert those MOV files to image sequences, but in the FFMPG conversion I'm losing critical metadata information about camera and lens so Meshroom is left with best guesses,

I'm looking to find a solution or workaround and my questions to the group are:

thank you for your help!

Stefano

skinkie commented 6 months ago

For a similar problem with DJI drone video's I have modified a python script that extracts GPS location from subtitles and creates annotated exif annoated image sequences out of them. I have then used it in COLMAP, because that stuff supports GPS priors. I think the ultimate problem here is that image sequences are proven technology and any other container format (while maybe technically superiour) requires special handling, which handled for the denormalised 'individual images' case. I think you can define the intrinsics manually.

FlachyJoe commented 6 months ago

ffmpeg seems able to copy the metadata: https://stackoverflow.com/questions/70261246/ffmpeg-metadata-copy-all

mirelloo commented 6 months ago

thank you for all the pointers.

@FlachyJoe I tryed using the -movflags use_metadata_tags in ffmpg flag but didn t work video to image for me.

@skinkie i think I can just plain override the intrinsics in the camera init node but wanted to see if adding the correct metadata I was going to fetch the correct info from the db rather than inserting those manually, and not being 100% sure if my calculations are correct.

I ll try and use exif tool to add these two flags maybe that all meshroom needs for the DB:

Make : Apple Camera Model Name : iPhone 13 mini

will keep you posted once I know more

cochetti commented 1 month ago

Agreed. I set the camera model in EXIF before handing the video over to KeyframeSelection in Adobe Lightroom. When the KeyframeSelection node was computed, it overwrote the camera model.

If you don't fill in the "model" field on the node, it is overwritten during KeyframeSelection. This is frustrating as it is easier to set it once on the videos ahead of time in a more comprehensive system like Lightroom