mapillary / OpenSfM

Open source Structure-from-Motion pipeline
https://www.opensfm.org/
BSD 2-Clause "Simplified" License
3.34k stars 852 forks source link

Consecutive images #82

Closed ghost closed 7 years ago

ghost commented 8 years ago

Is there any function to process consecutive equirectangular images with loop closing? I am interested in large-scale reconstruction using an omnidirectional camera, however, it takes very long time to calculate matches between all frames.

paulinus commented 8 years ago

Assuming you have GPS position of the images on the EXIF, you can set the option matching_gps_neighbors to something like 4 to limit every image to be matched only to the closest 4 neighbors. This uses the GPS position to determine the neighbors.

Try adding the line

matching_gps_neighbors: 4             # Number of images to match selected
by GPS distance. Set to 0 to use no limit

to the config.yaml of your dataset.

On Thu, Jun 16, 2016 at 3:07 AM, dunny2016 notifications@github.com wrote:

Is there any function to process consecutive equirectangular images with loop closing? I am interested in large-scale reconstruction using an omnidirectional camera, however, it takes very long time to calculate matches between all frames.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mapillary/OpenSfM/issues/82, or mute the thread https://github.com/notifications/unsubscribe/AAzY4pdK0mghV2mN8c9UJVUp2IBA3g-8ks5qMKHBgaJpZM4I279j .

ghost commented 8 years ago

Thank you for your kind reply.

I don't have GPS position data. I extract sequential images from the omnidirectional video. Is there any function to match sequential images?

mapninja commented 7 years ago

I just want to bump this, because I'm interested in this, too. Perhaps if we wrote "faked" GPS data to the EXIF header?, but it seems like this should be a core setting, especially for screen grabs from video.

jer5 commented 7 years ago

This would be useful to us too. Images that have come from video have a natural sequence and it would be useful to use this to determine the neighbours instead of GPS position (which is not always available or valid).

I suggest the following three possibilities for passing the sequence number information in.

1) The sequence number could be generated from the exif attribute "Exif.Image.DateTimeOriginal".

2) The sequence number could be taken directly from the exif attribute "Exif.Image.ImageNumber".

3) The sequence number could be embedded within the image file name. E.g. "frame00001.jpg", "frame00002.jpg" etc. in a similar way to that which ffmpeg generates output image file names when given the output name "frame%05d.jpg".

paulinus commented 7 years ago

Since the merge above, you can specify the option matching_order_neighbors: 2 to match only images that are consecutive when sorted by image name.