06-06-2013, 02:45 PM
Implementation of BP for Early Vision
Implementation of BP.zip (Size: 269.76 KB / Downloads: 12)
This document briefly describes an implementation of the algorithms from
our paper Efficient Belief Propagation for Early Vision which appeared
in CVPR 2004.
Please email comments and bug reports to: pff[at]cs.uchicago.edu.
Usage
• Compile the programs by running “make”.
• Example usage of the restoration program:
– run “./noise penguin.pgm noisy.pgm 20” to create a noisy image.
– the noisy image is saved in “noisy.pgm”.
– run “./restore noisy.pgm result.pgm” to restore the noisy image.
– the restored image is saved in “result.pgm”.
• Example usage of the stereo program:
– run “./stereo tsukuba1.pgm tsukuba2.pgm result.pgm”.
– the disparity map is saved in “result.pgm
Parameters
The general framework for the problems we consider is as follows (see the
paper for details). Let P be the set of pixels in an image and L be a set of
labels. A labeling f assigns a label fp 2 L to each pixel p 2 P. The quality
of a labeling is given by an energy function:
where N are the edges in the four-connected image grid graph, V (fp, fq) is
the cost of assigning labels fp and fq to two neighboring pixels, and Dp(fp)
is the cost of assigning label fp to pixel p.
Image Restoration
For image restoration the labels are gray levels. The file “restore.cpp” im-
plements the image restoration algorithm using the following parameters for
the energy function: