% This is a joint work of Dr. Jian Sun at Xi'an Jiaotong University with 
% Prof. Marshall Tappen at University of Central Florida.
% The codes are written by Jian Sun. If you use this code in your paper,
% please cite our paper: "Learning Non-Local Range Markov Random Field 
% for Image Restoration" published at IEEE CVPR 2011.

% This code is provided free of charge to the academic research 
% community for non-commercial research and educational purposes only.
% No other use is permitted. For information on the use of this for a 
% commercial purpose or by a commercial or for-profit entity, please 
% contact jiansun@mail.xjtu.edu.cn


This is a demo code to show the denoising performance of Non-locan range markov random field (NLR-MRF) models. The learned NLR-MRF models are included. For the technical details, please refer to the original paper.


Usage:
  
1. Please compile the C++ files: Convolution_Batch.cpp, Convolution_mirror_Batch.cpp, NLMatching.cpp
   by mex *.cpp in matlab before running the demo.
2. You can test the denoising algorithm using the demo codes in demo_deno.m.
3. The test images are from Berkeley Segmentation Database, please refer to 
	http://www.eecs.berkeley.edu/Research/Projects/CS/vision/bsds/
   for these images.