GithubHelp home page GithubHelp logo

mhalber / fine-to-coarse-registration Goto Github PK

View Code? Open in Web Editor NEW
49.0 4.0 17.0 5.65 MB

Implementation of the Fine-To-Coarse Registration algorithm:

Home Page: http://scanregistration.cs.princeton.edu

License: MIT License

C++ 35.26% C 56.28% Shell 0.02% Makefile 0.67% HTML 1.22% Awk 0.01% Objective-C 1.02% MATLAB 4.42% M 0.01% CSS 0.27% Python 0.62% Clean 0.06% TeX 0.05% Roff 0.09%

fine-to-coarse-registration's Introduction

This repository is no longer maintained

Scan Registration

This is the code repository for the code for scan registration project, specifically the "Fine-to-Coarse Global Registration of RGB-D Scans". This repository contains four main parts:

  • fetregister - main application implementing algorithm described in "Fine-to-Coarse Global Registration of RGB-D Scans"
  • fetbenchmark - simple application for benchmarking results of registration algorithms (for data visit the project website).
  • gaps - general computer graphics library by Thomas Funkhouser
  • basics - visualization and utility helper library
  • sun3dsfm - modified version of code from Xiao et al.. For our purpose we only perform pairwise alignment.

Building

Provided that you have dependencies installed (see below), you should be able to simply type:

build.sh

This should build all libraries and programs and put them into bin/ folder. Moreover each of the fetregister, fetbenchmark and gaps folders contains a makefile, so they can be build separately by running:

make -C <folder_name>

You might need to edit those, if your dependencies are not installed in /usr/local/lib. Also note that by default the code builds in window-less mode. To enable visualization and window support in fetregister run:

make -C fetregister USE_WINDOW=1

This code has been tested on both MacOs (Sierra) and Linux (Springdatle Linux 7). We have not tested the code on Windows, however we expect compiling this code using Cygwin should not be hard.

Dependencies

  • glfw3 (windowing)
  • glew (opengl extension loading)

Running registration

For description on how to run registration algorithm, please go to fetregister.

Running benchmark

For description on how to run benchmark, please go to fetbenchmark.

Citing

If you use this code or benchmark, please cite our work:

@article{HalberF2C17,
  title     = {Fine-To-Coarse Global Registration of RGB-D Scans},
  author    = {Maciej Halber and Thomas Funkhouser},
  booktitle = {CVPR}, 
  year      = {2017} 
}

fine-to-coarse-registration's People

Contributors

mhalber avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

fine-to-coarse-registration's Issues

conf2fet spend long time

Hi,

  1. I want to use the offline reconstruction to produce the high quality 3d mesh. firstly, I used the conf2fet to generate the .fcb file. In my ubuntu18.04 with 8 Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz, it will take 30 minutes to process the 800 frames. used the parameters -load_every_kth_image 5 -min_feature_spacing m -0.05. So could you give your parameters to generate the .fcb file. Thank you!
  2. I use my online reconstruction method(for example bundlefusion/badslam) to generate the pairwise_matches.txt, Firstly, I want to know the pairwise_matches.txt information, Ti = m * Ti-1 and T is the camera to world(pw = T * pc)? and I set the sift valid pairs the constant value 200; Secondly, if I understand the pairwise_matches.txt correctly, I run the fetregister, it get the worsely results than online method, it will get the Iteration 0 done in 6.092374 sec. Current error -nan . Can you help me to solve this, Thankyou very much!

Best Wishes!

question about .fcb file

@mhalber
In the project website, all information introducing .fcb file is only the following sentence:
"Feature files (.fcb) are sets of preprocessed RGB-D frames put into a single file. We provide them for the ease of experimentation with our system. Our code also provides conf2fet program that is able to produce a fet file from a configuration file."
However, it is not enough for us to understand the fcb file. Could you provide more introduction about .fcn file? Thanks.

In addition, is there a way to display the extracted structure features, such as plane and Silhouette?

Segmentation fault (core dumped)

Hi, when i try to run ./fetregister fet/5_0.05.fcb hv_c3_1_fine_to_coarse.conf -v, then it always output segmentation fault such as
`Reading configuration file...
Done in 0.073 sec.

Frames = 1937(1937)

Correspondences = 347

Color Directory = (null)

Depth Directory = depth

Reading reconstruction file...
Done in 0.909 sec.

Shapes = 1937

Features = 2027671

Please provide pairwise matches in the configuration file.
Alignment with world took 0.508453 sec.
Alignment with world took 0.503259 sec.
Segmentation fault (core dumped)`
Is this mean the end of the registration or something wrong?
Thanks a lot for your reply!

error while compile project with make USE_WINDOW=1

Hi, When I compile use make -C fetregister USE_WINDOW=1.
g++ -O3 -g0 -std=c++11 -pthread -Wall -Wno-#warnings -Wno-sign-compare -I. -I/usr/include -I/usr/local/include -I../basics/third_party/imgui/ -I../basics/ -I../gaps/pkgs -DRN_USE_CSPARSE -DRN_USE_SPLM -DNDEBUG -DFETREGISTER_USE_WINDOW -c fetregister.cpp -o ../out/fetregister.o
In file included from ../basics/basics.h:70:0,
from common.h:45,
from fetregister.cpp:34:
/usr/local/include/GLFW/glfw3.h:159:28: fatal error: GL/glcorearb.h: cannot find the file or directory
#include <GL/glcorearb.h>
^
compilation terminated.
What is the problem? Thank you!

Assertion error while running fetregister.exe

Hi, when I run fetregister.exe with the command "fetregister fet/5_0.05.fcb hv_c11_2_initial.conf -v", I get this error and running terminated:

"inital Done
Reading configuration file...
Done in 0.319 sec.

Frames = 875(875)

Correspondences = 360

Color Directory = image

Depth Directory = depth

Reading reconstruction file...
Done in 16.741 sec.

Shapes = 875

Features = 607581

Reading Done
Alignment with world took 2.076310 sec.
Alignment with world took 2.010047 sec.
initialize_optimization Done

Iteration 0
Weights -> CP: 1500.000000 ; Trajectory : 1000.000000 ; Inertia : 1.000000 ; Geometry: 1500.000000 ; Hierarchy : 1500.000000
Creating closest point correspondences
-- Segment Length: 3.000 / 15.014
-- Distance Threshold: 0.500 m
-- Angle Threshold: 0.500 rad(28.647890 deg)
Launching threads:
-- Launching thread 0
-- Thread 0 Finished! | Shapes 0 to 875 ( 875) | Created 43748 out of 43750 allocated correspondences.
-- Threads Finished!
GAPS FATAL ERROR. ABORTING:: No error
Assertion error correspondence->reconstruction == this->reconstruction at line 208 in file FETFeature.cpp"

My operating system is window10 with visual studio 2015, GTX960M. I run with debug and find that the line 1040 in file optimization.h is
"
seq_data->cp_corrs.push_back(new FETCorrespondence(NULL,
tsc.feature1,
tsc.feature2,
tsc.affinity,
COINCIDENT_RELATIONSHIP));
"
I am confused why passing the reconstruction with NULL and asserting while the reconstruction in line 33 in file FETCorrespondence.cpp and line 208 in FETFeature.cpp. Is it a bug or some thing else error with my running environment ?

What is the problem ? Thank you!

Could not create glfw window?

hi, when i try to run ./fetregister ../harvard_c11/fet/5_0.05.fcb ../harvard_c11/hv_c11_2_initial.conf -v
then output msg "Could not create glfw window Window not created, terminating!"
anyone can help me?Thanks a lot.

error while compile project

when I compile the project, I got the following error:

R3Mesh.cpp:(.text+0x9ca): undefined reference to glBegin' R3Mesh.cpp:(.text+0x9d7): undefined reference to glVertex3dv'
R3Mesh.cpp:(.text+0x9e4): undefined reference to glVertex3dv' ../gaps/lib/x86_64//libR3Shapes.a(R3Mesh.o): In function R3Mesh::DrawEdges() const':
R3Mesh.cpp:(.text+0x242d): undefined reference to glBegin' R3Mesh.cpp:(.text+0x243a): undefined reference to glVertex3dv'
R3Mesh.cpp:(.text+0x2447): undefined reference to glVertex3dv' R3Mesh.cpp:(.text+0x244c): undefined reference to glEnd'
../gaps/lib/x86_64//libR3Shapes.a(R3Mesh.o): In function R3Mesh::DrawEdgeIDs() const': R3Mesh.cpp:(.text+0x24a8): undefined reference to glDisable'
R3Mesh.cpp:(.text+0x24c5): undefined reference to glBegin' R3Mesh.cpp:(.text+0x24d2): undefined reference to glVertex3dv'
R3Mesh.cpp:(.text+0x24df): undefined reference to glVertex3dv' R3Mesh.cpp:(.text+0x24e4): undefined reference to glEnd'
R3Mesh.cpp:(.text+0x24f5): undefined reference to glColor3ub' ../gaps/lib/x86_64//libR3Shapes.a(R3Mesh.o): In function R3Mesh::DrawVertexIDs() const':
R3Mesh.cpp:(.text+0x2672): undefined reference to glDisable' R3Mesh.cpp:(.text+0x26d7): undefined reference to glColor3ub'
R3Mesh.cpp:(.text+0x2716): undefined reference to glEnable' ../gaps/lib/x86_64//libR3Shapes.a(R3Mesh.o): In function R3Mesh::DrawFaces() const':
R3Mesh.cpp:(.text+0x378d): undefined reference to glNormal3dv' R3Mesh.cpp:(.text+0x379a): undefined reference to glVertex3dv'
R3Mesh.cpp:(.text+0x37a7): undefined reference to glVertex3dv' R3Mesh.cpp:(.text+0x37b4): undefined reference to glVertex3dv'
R3Mesh.cpp:(.text+0x37b9): undefined reference to glEnd' R3Mesh.cpp:(.text+0x37e4): undefined reference to glBegin'
../gaps/lib/x86_64//libR3Shapes.a(R3Mesh.o): In function `R3Mesh::DrawFaceIDs() const':

the gaps project is successfully compiled.

How does this situation occurs?

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.