- Install homebrew
- In a terminal, run
brew install colmap ffmpegto install colmap and ffmpeg - From this page,
download brush for with the link for "brush-app-aarch64-apple-darwin.tar.xz"
- Double click it to extract it
- You should see a binary named
brushin the extracted folder
We are going for "clean models" and not cinematic quality. We want as little motion blur as possible.
Depending on your camera's sensor, keep it on 60fps (if it has a big sensor and the image is not noisy with it), or 30fps. Be sure to keep a tiny shutter speed, preferrably 1/250s or even lower. Play with the settings a bit. We don't want a noisy image (some noise is fine).
Shoot with H.265 (or H.264 if your camera doesn't support H.265 encoding). Drop to 8-bit color. Try not to use 10-bit color or "actual HDR" (multiple exposure HDR is fine). Capture in 1080p.
Lock your white balance, ideally with a grey card. White balance adjustment mid-footage will throw the SFM algorithm off.
Whatever settings Arham is using on his camera seem to work well. Try to replicate those.
We want to emulate a drone. Keep a stable height and go slow. (TBD)
We want to strike a balance between
- Enough frames for our "structure from motion" software to correlate objects.
- Not "too many" frames.
- Total number of frames based on the processing power and memory of your computer. We scale in a O(n^2), so double number of frames will require approximate quadruple the time to process.
We will tune this as we go. We want to start with 2 frames per second.
Create a folder to keep your work. Put your video in it with the name
video.mp4 (or video.mov if your camera uses a mov container).
In a terminal in the project folder, run
$ rm -rf images # delete any already existing images
$ mkdir -p images # create an images directory
$ ffmpeg -i video.mp4 -vf "fps=2" -q:v 2 images/frame_%04d.jpg # run ffmpeg to extract framesAfter this, you should have frames in the images directory.
This step will require some tuning based on the input.
In a terminal in the project directory, run
$ colmap guiThis will open colmap in a graphical window.
- Click
File > New Project - In the database field, press new. It should open a file picker.
- In the file picker, navigate to your project folder.
- Put
database.dbas the name
- In the images field, click select.
- Again, navigate to the project folder.
- Select the
imagesfolder with all your frames.
- Click Save.
- Click
File > Save Projectand save it in your project folder asproject.ini.
This step will extract unique features from frames.
- Click
Processing > Feature extraction. - In the camera model, use
OPENCV. For now, keep other parameters as-is. We will play with them later if the model turns out to be bad, or we keep looping while trying to extract / match the features. - Click
Extractand let it run. - After this is done, close the feature extraction dialog.
File > Save Project.
This will match features from other frames. This is one of the most time consuming things.
Processing > Feature matching. In this dialog, go to thesequentialtab.- Enable loop detection, and for now, keep other parameters as is. Keep an eye on the output log. If we end up looping, cancel it and playing with parameters here.
- Press
run. - After this is done, close the dialog.
File > Save Project.
Here, we'll try to construct a point cloud and triangulate the camera movement.
This will take a lot of time if we have bad footage.
Reconstruction > Start reconstruction.Reconstruction > Reconstruction optionsInit init_min_tri_angle 0.1 Init init_min_num_inliers 10 Triangulation tri_min_angle 0.01 Triangulation tri_ignore_two_view_tracks ☑️ checked Filter filter_min_tri_angle 0.01 Registration abs_pose_min_num_inliers 5 Registration abs_pose_min_inlier_ratio 0.01 General multiple_models 0 Bundle refine_focal_length ☐ unchecked Bundle refine_extra_params ☐ unchecked- Let it run. If the point cloud and camera path doesn't look good, we go play with reconstruction options.
File > Save ProjectFile > Export model as text. Save it in a new folder namedsparsein your project folder.
- Open
brush - In brush, click
directoryand open your project folder. - Brush will show a popup. Keep everything as-is. Default "iterations" are 30k which should be "enough" for most uses.
- Let brush run. You can see what's being created in its live preview window. You can interact with it.
- Now when you're happy with the result, expand the controls, click pause and then click export model. Save it in your project folder. Be sure to let it run for atleast 8000 iterations (see the stats window).
Open the SuperSplat Editor and open your model you exported from brush in it.