gfacciol / mgm Goto Github PK
View Code? Open in Web Editor NEWMore Global Matching
License: GNU Affero General Public License v3.0
More Global Matching
License: GNU Affero General Public License v3.0
I am encountering a sporadic seg fault while running mgm_multi
on a pair of images: sometimes the command succeeds, and sometimes it stops with a seg fault.
The command is the following:
OMP_NUM_THREADS=1 mgm_multi -r -14 -R 12 -S 6 -s vfit -t census -O 16 u.tif v.tif out.tif
I have encountered this error while playing with different values for the flag -O
. It seems that the bug only occurs with -O 16
.
On a side note, when the command succeeds with -O 16
, the output image has a lot of ugly horizontal stripes, which it does not have with -O 8
. I can open a separate issue on the subject if you think it is necessary.
I am including the input images u.tif
and v.tif
in a zip.
absolute newbie on this subject and could not find any documentation on this topic. Can you shed some lights on this?
I've been trying to generate similar results from the paper, but have been unable to.
Running the example calls results in bad disparity images, and I'm not sure how to tune the parameters to fix them and have a disparity image that approximates the ground truth one, or the ones generated by the online demo.
I'm not sure what the issue is though, any help would be really appreciated!
I'm not sure where else to ask this question, so I'll do it in issues.
I'm currently in the midst of integrating your MGM algorithm as a possible stereo disparity matching algorithm for use with ROS. I'm doing this as part of some algorithm benchmarking tests I have to do, but also figured it might help get mgm some extra attention.
This will most likely result in a ROS library wrapper package with cleaned up code directories (the mass of source and header files now will be put into include, lib, src, etc. directories).
I will then proceed to write a ROS node for easy integration with stereo cameras, which will definitely be put in a separate repository.
Do let me know what you think,
Cheers!
Hello, MGM is a great algorithm. The result is a disparity map. How can I turn it into a depth map? I mean, do I need to use the formula Z=f*B/d? Do the disparity in the formula need to be scaled? I just started multi-view stereo, so I'm not sure.
Hi gfacciol
Thanks for providing your code. I am trying to implement the Matlab implementation and am getting error in MGM_wrapper.
runme
./mgm_o: /usr/local/MATLAB/R2016b/sys/os/glnxa64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by ./mgm_o)
Error using MGM_wrapper (line 104)
Cannot open file output.bin
Error in stereomatch_MGM (line 66)
dmap = MGM_wrapper(pcost, NDIR, P1, P2, MGM, VTYPE, w);
Error in runme (line 14)
[dmap,t] = stereomatch_MGM(L, R, dmax, DIR, P1, P2, MGM);
How is this output.bin created? Thank you
I am trying to do cmake + make
on branch multiscale
.
I do the following steps, at the root of the repository:
mkdir build
cd build
cmake ..
Which gives the following output:
-- The C compiler identification is AppleClang 10.0.0.10001044
-- The CXX compiler identification is AppleClang 10.0.0.10001044
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- No build type selected, default to Release
-- Found ZLIB: /usr/lib/libz.dylib (found version "1.2.11")
-- Found TIFF: /usr/local/lib/libtiff.dylib (found version "4.0.10")
-- Found JPEG: /usr/local/lib/libjpeg.dylib (found version "62")
-- Found PNG: /usr/local/lib/libpng.dylib (found version "1.5.30")
FLAGS: -O3 -std=c99 -funroll-loops -Wno-unused -DNDEBUG
/Users/guillaumelostis/Documents/Git/mgm/build/iio
/Users/guillaumelostis/Documents/Git/mgm/iio
-- Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)
-- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES)
-- Could NOT find OpenMP (missing: OpenMP_C_FOUND OpenMP_CXX_FOUND)
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/guillaumelostis/Documents/Git/mgm/build
Then, make
gives the following output:
Scanning dependencies of target IIOLIB
[ 4%] Building C object iio/CMakeFiles/IIOLIB.dir/iio.c.o
[ 9%] Linking C static library libIIOLIB.a
[ 9%] Built target IIOLIB
Scanning dependencies of target mgm
[ 13%] Building CXX object CMakeFiles/mgm.dir/main_mgm.cc.o
/Users/guillaumelostis/Documents/Git/mgm/main_mgm.cc:239:10: warning: add explicit braces to avoid dangling else [-Wdangling-else]
else
^
1 warning generated.
[ 18%] Building CXX object CMakeFiles/mgm.dir/mgm_multiscale.cc.o
[ 22%] Building CXX object CMakeFiles/mgm.dir/img.cc.o
[ 27%] Building CXX object CMakeFiles/mgm.dir/point.cc.o
[ 31%] Building CXX object CMakeFiles/mgm.dir/mgm_costvolume.cc.o
[ 36%] Building CXX object CMakeFiles/mgm.dir/mgm_core.cc.o
[ 40%] Building CXX object CMakeFiles/mgm.dir/census_tools.cc.o
[ 45%] Building C object CMakeFiles/mgm.dir/shear.c.o
/Users/guillaumelostis/Documents/Git/mgm/shear.c:10:10: fatal error: 'fftw3.h' file not found
#include <fftw3.h>
^~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/mgm.dir/shear.c.o] Error 1
make[1]: *** [CMakeFiles/mgm.dir/all] Error 2
make: *** [all] Error 2
However locate fftw3.h
shows me that I do have this file at /usr/local/include/fftw3.h
, which is on my PATH
.
If instead of this I do make
directly at the root of the repo, it works.
Hello,
I have a basic question: if I choose 7 as default window size for correlation, what is the maximum authorized disparity? I see in the doc it is -R 30: does it mean it is 30 pixels? In that case I don't understand because I have some displacements (for EW or NS) above 30 pixels, e.g 49...(my initial pixel size is 70 cm, and outputs from correlation are 50 cm)
Can someone help me address this issue,
Thanks a lot,
Shan
This is not really an issue, more like a question or a request.
I was personally wondering if somehow it could be possible / make sense, to allow someone to use MGM only for the cost volume optimization part ?
Say for example that I have a stereo algorithm that can perform steps 1 & 2 as defined by Scharstein & Szeliski taxonomy leaving me with a Cost Volume in memory ready to be optimized by a global matching algorithm like MGM for instance. Then it would be of great use to be able to plug your MGM optimization by giving my cost volume as input to your software.
I'm aware of the ctypes branch of MGM but unless I am mistaken I believe it aims at allowing someone to give both input images to MGM as numpy arrays ? Not to allow someone to give MGM a cost volume as numpy array right ?
Obviously I am not saying MGM should provide such a functionality, just wondering what you would think of it and how it could fit the roadmap you might have for MGM in the near future.
Thank you for the time you'll spend on this issue.
Hello Gabriele,
It seems that two consecutive executions of mgm @ac54122 are not producing the same results.
It is the same for mgm_multi @ac54122.
You can refer to the example given in the mgm_multi_ac54122.tar.gz attached. On this example, on two consecutive executions of mgm @ac54122, the following statistics were obtained on these two outputs difference : min=-0.33827555, max=0.72447157, mean=5.896214e-06, std=0.0023109724 (stats obtained on "rectified_disp1.tif - rectified_disp2.tif" also included in the tar.gz).
mgm @ac54122 and mgm_multi @ac54122 are the mgm and mgm_multi default versions of s2p since 29 Oct 2018, as agreed.
Could you please give me a feedback on this topic ?
Thanks,
Myriam
mgm_multi_ac54122.tar.gz
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.