https://doi.org/10.5201/ipol.2014.98
Raw File
Tip revision: a774add2f966ff371462ab88d6efb6d525c7b7e4 authored by Software Heritage on 12 July 2013, 00:00:00 UTC
ipol: Deposit 1240 in collection ipol
Tip revision: a774add
README.txt
Implementation of Nonlocal Pansharpening Image Fusion (version 2)

Joan Duran, joan.duran@uib.es, Universitat de les Illes Balears (Spain)
Antoni Buades, toni.buades@uib.es, Universitat de les Illes Balears (Spain)
Bartomeu Coll, tomeu.coll@uib.es, Universitat de les Illes Balears (Spain)
Catalina Sbert, catalina.sbert@uib.es, Universitat de les Illes Balears (Spain)


# OVERVIEW

This C source code accompanies with Image Processing On Line (IPOL) article
"Implementation of Nonlocal Pansharpening Image Fusion" at 

    http://www.ipol.im/pub/art/2014/98/

This code is used by the online IPOL demo:

    http://demo.ipol.im/demo/98/

This program reads and writes PNG images, but can be easily adapted to any 
other file format. Only 8bit RGB PNG images are handled. 

Two programs are provided:

* 'pansharpening_ipol' simulates the pansharpening problem so that it provides
both the panchromatic and the low-resolution RGB images from the true
high-resolution RGB image. It also provides the initialization by using the IHS
transform and the extension of the low-resolution RGB image to the high
resolution by simple replication of a given sampling factor. After that, the
program solves the pansharpening problem by using the algorithm proposed
in [J. Duran, A. Buades, B. Coll, C. Sbert, "A Nonlocal Variational Model for 
Pansharpening Image Fusion, SIAM J. Imaging Sci., vol. 7(2), pp. 761-796, 2014].

* 'imdiff_ipol' visualizes the difference between two images in such a way that
the intensity range is linearly transformed from [-20, 20] to [0, 255] for
visualisation purposes. Values outside this range are saturated to 0 and 255, 
respectively. It also computes the Root Mean Squared Error (RMSE).

# USAGE

Usage: pansharpening_ipol truth.png pan.png spectral.png IHS.png
       pansharpened.png sampling

* truth.png        : true high-resolution RGB image.
* pan.png          : panchromatic grayscale image.
* spectral.png     : low-resolution RGB image.
* IHS.png          : initialized image by IHS.
* pansharpened.png : pansharpened image by nonlocal model [1].
* sampling         : sampling factor (2 or 4).

The following parameters are fixed in the main demo function:
* h              : filtering parameter of regularizing term.
* lmb            : trade-off parameter of panchromatic constraint.
* mu             : trade-off parameter of spectral constraint.
* std            : standard deviation of the Gaussian kernel used to simulate
                   the low-resolution multispectral image.
* num_iterations : maximum number of algorithm iterations.
* tol            : algorithm tolerance
* reswind        : half-size of the support zone used for searching
                   similarities among pixels in the image.
* compwind       : half-size of the comparison window used for computing
                   distances on the panchromatic.
* dt             : time-step parameter of the explicit scheme.
* alpha          : mixing coefficients that give the panchromatic image as a
                   linear combination of the spectral components.

Usage: imdiff_ipol image1.png image2.png difference.png

image1.png     : first image.
image2.png     : second image.
difference.png : difference image.

This program also provides on the screen the RMSE values.


#LICENSE

Files io_png.c and io_png.h are copyright Nicolas Limare. These files are
distributed under the BSD license conditions described in the corresponding
headers files.

All the other files are distributed under the terms of the LGPLv3 license.


# REQUIREMENTS

The code is written in ANSI C and C++, and should compile on any system with an
ANSI C/C++ compiler.

The libpng header and libraries are required on the system for compilation and
execution. 


# COMPILATION

Simply use the provided makefile, with the command 'make'.


# EXAMPLE

   truth=balloons.png
   samplingfactor=4

   # Simulate pansharpening problem and solve it using nonlocal algorithm
    
   ./pansharpening_ipol $truth pan.png spectral.png IHS.png pansharpened.png 
   $samplingfactor

   # Compute RMSE and image difference

   ./imdiff_ipol $truth IHS.png differenceIHS.png
   ./imdiff_ipol $truth pansharpened.png differenceNonlocal.png
back to top