Video to 3D Model

I recently attended FOSS4G in Italy, a country filled with objects begging to be scanned for 3D models (e.g., the Colosseum and David)

My go-to 3D scanning app is Polycam, which has modes for continuous LiDAR collection or using individual photos. I often use the photogrammtery mode, as it creates nice models in a variety of conditions/distances. However, snapping ~50 images can be time consuming.

Is there a faster way to create nice 3D models? The answer is yes, and it's surprisingly easy.

Collect Video

Depending on the size of the object to be scanned (i.e. if the object is relatively small), collecting imagery in the form of a video can be a huge time saving. Simply record the object from a variety of angles. For example, I filmed this statue of Machiavelli by walking across the front of it:

Sample Video to Images

Send the video to your desktop. Most photogrammetry processing tools accept individual images as input, not video, so I sample the video at some time interval into a directory of images. In this case, I extract one video frame every second into a directory of JPEG files, using ffmpeg:

ffmpeg -i machiavelli.MOV -vf fps=1 images/out%d.jpg

Note: if you save the images to a folder named images, it will work nicely in the OpenDroneMap method below.

Method #1: OpenDroneMap

OpenDroneMap, most often marketed for use with top-down UAV imagery, makes it so easy, even for perspective/oblique imagery. The only dependency is docker. With docker installed, assuming your images are in /my/project/images, run:

docker run -ti --rm -v /my/project:/datasets/code opendronemap/odm --project-path /datasets

Once complete, if successful, there should be a variety of outputs within your project directory, one of which should be a textured OBJ file:

Method #2: Polycam Web App

The Polycam web app will also process a selection of images. I currently have a subscription to Polycam - I'm not entirely sure if photo upload is available in the free version. Once processed, the web app also allows easy sharing, like below:

That's it.

No doubt there are other methods for quickly collecting and processing video/images to 3D models. Let me know your favourite on Twitter!