Stereo Matching using Alpha-Expantion algorithm and Hieralchical graphcut


Overview


0.Environment
OS : Windows XP SP3
Compiler : g++ (GCC) 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)

1.Compile & Run
  1.Install OpenCV ver1.0.
  2.Get cv_cygwin.sh from here.
  3.Get the library of Maxflow Minimum cut algorithm from here.
  4.Get shell script for compilation from here.
  5.Exteract maxflow-v3.0.src.tar.gz and copy the extracted files to current directory.
  6.
  $ opencv.sh [sourcename.cpp]
  $ a.exe [imagefile]
  or
  $ opencv.sh [sourcename.cpp]
  $ a.exe [leftimagefile] [rightimagefile]
  for stereo.

Source files
alpha-expantion.cppalpha-expantion
hierarchical.cpphierarchical graph cut
alpha-expantion-stereo.cppalpha-expantion for stereo matching
hierarchical-stereo.cpphierarchical graph cut for stereo matching


2.Alpha-Expantion Algorithm
Lenna,Tiffany,Mandrill from SIDBA images.
Lenna Tiffany Mandrill
Lenna (512x512)
Tiffany (512x512)
Mandrill (512x512)

Result(gray-scaled)
Run time
119sec
91sec
133sec
Lenna Tiffany Mandrill

3.Hierarchical graphu cut

Run time
28sec
30sec
25sec
Lenna Tiffany Mandrill

4.Stereo matching
Rocks1 (ThirdSize) from middlebury.
Run time
254sec
17sec
alpha hierarchical-stereo