Coder Social home page Coder Social logo

srivathsanmurali / domsetlibrary Goto Github PK

View Code? Open in Web Editor NEW
14.0 4.0 7.0 140 KB

a library that clusters set of images with poses into clusters for easier mvs

License: Mozilla Public License 2.0

CMake 4.78% C++ 95.22%
geometry 3d-reconstruction clustering multi-view-geometry

domsetlibrary's Introduction

Dominant Set Clustering algorithm

Clustering camera poses generated by a SFM pipeline such as openMVG. The library gives a list of view clusters.

The library is sfm appliction agnostic. It requires view poses and sparse point positions. It uses affinity propogation to cluster poses.

This libary is an implementation of "Dominant set clustering" introduced by Maura, Massimo et al. at ETHZ Zurich Computer Vision Lab

Source

Mauro, Massimo, et al. "An integer linear programming model for view selection on overlapping camera clusters." 2014 2nd International Conference on 3D Vision. Vol. 1. IEEE, 2014.

Mauro, Massimo, et al. ["Overlapping camera clustering through dominant sets for scalable 3D reconstruction."] (http://www.vision.ee.ethz.ch/~rhayko/paper/bmvc2013_mauro_view_clustering.pdf) 2013 British Machine Vision Conference.

Terminology in our library

  • Point stores positional informations about the sparse point cloud from SFM.
  • Camera stores the intrinsic properties of distinct cameras used in the sytem.
  • View stores the extrinsic parameters of cameras poses (translation and rotation).

Usage

#include "domsetLibrary/types.h"
#include "domsetLibrary/domset.h"

#include <vector>

int main() {
  std::vector<nomoko::Point> points;
  // Fill points with sparse point cloud generated durign SFM.
  
  std::vector<nomoko::Camera> cameras;
  // Fill with camera parameters of the distinct cameras.
  
  std::vector<nomoko::Views> views;
  // Fill with poses of images.

  const size_t voxelGridSize = 15;
  nomoko::Domset domset(points, views, camera, voxelGridSize)

  // specify sizes of view clusters
  const size_t clusterSizeLowerBound = 10;
  const size_t clusterSizeUpperBound = 15;
  domset.clusterViews(clusterSizeLowerBound, clusterSizeUpperBound);

  std::vector<std::vector<size_t> > clusters;
  clusters = domset.getClusters();
}

ThirdParty Libraries

Examples

The clustering was tested on the fraumunster dataset from CVL ETHZ ([dataset] (https://people.ee.ethz.ch/~rhayko/paper/bmvc2013_mauro_view_clustering/pix/bmvc2013_view_clustering_fraumunster.zip)).

Output from OpenMVG

SFM Output The green points shows the calibrated camera poses.

Output from domset

Domset Output This image shows the output from our dominant set clustering implementation. The various camera view clusters are shown in different colours.

TODO

  • Leveraged Affinity Propogation for datasets for large number of camera views.
  • Overlaping of clustering in library not implemented.

Author

Srivathsan Murali (NomokoAG)

domsetlibrary's People

Contributors

cdcseacave avatar mdaiter avatar pmoulon avatar srivathsanmurali avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

domsetlibrary's Issues

Overlap constant

Implement a option have overlap in clusters for registration purposes.
+ When finding the center that the view is assigned to also find the next best center.
+ Assign certain number of overlap from the list of views that are in the secondary list for centers
New implementation does the following

  • Finds the borders for each cluster
  • Finds the closest cluster to each border view and adds them to it

TODO:

  • Clean up code
  • Test on other datasets
  • Border visualization to export PLY

A request from your reader.

I took my first step in scientific research focused on 3D reconstruction.recently I read your paper "An integer linear programming model for view selection on overlapping camera clusters" published in 2014. I think it is very interesting and your clear and compact declaration inspired me a lot.But I got some trouble when I try to implement algorithms about integer linear programming(ILP).

So could you please share your code about ILP if possible?I would be appreciated if you could help me.

Thank you for your consideration and I will be looking forward to your reply.

Leveraged affinity propogation to cluster views together.

For large sets of cameras, LAP samples samples from the full set of potential similarities and performs several rounds of affinity propagation, iteratively refining the sample. LAP delivers the same clustering results as AP yet provides a speedup for large dataset.

Difference compare to the paper

I read the implementation & the paper.
I found a difference in the way the voxelization is done.

  • In the paper they normalize the scene and then use a fixed size voxelization.
  • In your implementation you suppose the scene is in some given units.

I think their normalization way is preferred since it make the process coordinates system free.
We can compute the normalization factor (a scale) and them apply it to a copy of the SfM_Data scene simply by using

const double scale_factor = ...;
openMVG::geometry::Similarity3(geometry::Pose3(Mat3::Identity(), Vec3::Zero()), scale_factor);
openMVG::sfm::ApplySimilarity(sim, sfm_data);

Enforcing min/max cluster size constraints

Current implementation doesn't handle this properly.

  • clusters smaller than minClusterSize which don't have any other cluster near by are added just like that. This causes very small clusters.
  • clusters larger than maxClusterSize are divided into clusters of size maxClusterSize and the views that are in the last cluster can be less than minClusterSize.

Possible ideas: use iterative method to merge and break until it converges in proper sizes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.