Behind MR2D is MR, a set of software components developed by CEA (Saclay, France) and Nice Observatory. This project originated in astronomy, and involved the development of a range of innovative methods built around multiscale analysis. Multiresolution techniques have been developed in recent years, and furnish a powerful and insightful representation of the data. By means of multiresolution or multiscale analysis, an image can be decomposed into a set of images (or scales), each scale containing only structures of a given size. This data representation, associated with noise modeling, has been applied to very different applications such as data filtering, deconvolution, compression, object detection, and so on. Results are enhanced in all such processing because the multiresolution approach allows a better understanding of how the data values are distributed in an image, and how the signal can be separated from the noise.
Full documentation on MR is available as a PDF file at the address http://www.multiresolution.com Background references are: JL Starck, F Murtagh and A Bijaoui, Image and Data Analysis: The Multiscale Approach, Cambridge University Press, 1998; and JL Starck and F Murtagh, Astronomical Image and Data Analysis, Springer-Verlag, 2002. A large number of published articles are also available: see www.multiresolution.com for details.
The programs themselves are written in C++. They are provided as executables. All functionality is available for images of dimensions 256 x 256. Images of other dimensions are supported if a license file is available. The graphical user interface is not license-protected. So, at a minimum, you can at all times use it to carry out processing on any image of dimensions 256 x 256.
Various image formats are supported. We recommend to use FITS (Flexible Image Transport System) where possible, given that it caters for 32-bit (floating, 4 byte) pixel values. Information on this standard is to be found at various places on the Internet, for example, http://heasarc.gsfc.nasa.gov/docs/software/fitsio. Public domain image viewers are available such as xv, ds9, or SAOimage, available from the Smithsonian Astrophysical Observatory. Other public domain viewers, available on the Web, include FITSview from NRAO, and fv from GSFC. FITS files may contain several extensions, and each extension may contain an image. Here, we read only the first extension. Other formats that are supported are JPEG, GIF and PGM. An excellent publicly available image reading, writing and manipulation system is ImageMagick.org, supporting the conversion, editing and composing of images in any one of about 100 different formats.
If you wish to run MR programs in batch mode (for example, filtering, followed by edge detection, followed by format conversion) then the programs can be accessed independently of the MR2D graphical user interface. All programs can be run in a command prompt or DOS window. Typically a program has a set of options (with defaults in all cases), an input image file, an output image file. To see these options, just give the command name in the command prompt or DOS window.
When running a program in batch mode, the following could be of particular importance. All computations are carried out by default in memory. If the computer has not enough memory to run the program, a virtual memory mode is available allowing the use of disk instead of memory. A temporary file is created each time a large buffer needs to be allocated. This obviously increases the computation time, but allows large image manipulation (assuming enough disk space is available!). Virtual Memory (VM) can be activated by two options: "-z" and "-Z". All programs working with images accept these two options.
When a program is run with the "-z" option, the virtual memory is activated using the default parameters, which are the the minimum size buffer for activating the VM, and the directory where the temporary files are to be created. The minimum size is read from the environment variable CEA_VM_SIZE, and the default directory is read from the environment variable CEA_VM_DIR. If CEA_VM_SIZE and CEA_VM_DIR are not defined, the default minimum size is 4 MB, and the default directory is the current one, i.e. "." (where the program is executed).
When a program is run with the "-Z" option, virtual memory is activated and the user has to specify the minimum size and the directory for the temporary files.
Examples:
im_info image.fits
This gives information about an image without using the VM. The image is
loaded in memory.
im_info -z image.fits
Same, but using the VM and its default parameters. CEA_VM_SIZE and
CEA_VM_DIR are read, and if the image size is larger than the
value read from CEA_VM_SIZE (or 4 MB if the environment variable
is not defined), a temporary file a created.
im_info -Z 1:\tmp image.fits
Same, but the VM is activated using a minimum size of only 1 MB, and
the directory for storing the temporary file is "\tmp".
License Installation
Contact info@multiresolution.com to get a license. Other than the fact that
you are using a Windows PC and that you are using this software, you
will need to provide your PC identifier (see menu item under "File") and
the period of validity of your use of the software ("unlimited" or a
date). This will allow a 20-character key to be generated.
Under menu item "File"/"Register License", give your expiry date (or "unlimited") and the 20-character key. This allows your license file to be created.
The licensing works as follows.
A license file is created, called "cea_lic". This is a text file
(with no extension). This file is located in
the bin subdirectory where you installed the programs.
Sample Images
A range of sample images are provided, in different formats.
The galaxy image is of dimensions 256 x 256, and can be used without a
license. To find these images, use "Open" under pull-down menu, "File".
File Management
PC ID: Determine your computer's host identifier
(Program used: mrhost*)
The 3-character identifier is used to generate a license key (which is
used from the text file called cea_lic).
Create a Random Image (Program used: im_random)
The following random distributions are supported: Gaussian,
Poisson, Rayleigh, and Laplace.
Export Image As... (Program used: im_convert)
Supported formats: FITS, JPEG, GIF, PGM.
Extract Subimage (Program used: im_get)
Extract a subimage, for example in order to remove image borders.
Install License
You need to provide your PC identifier (see above) and the expiry
date (or "unlimited") to Multi Resolutions. You will be given a 20-character
key which must be entered, in conjunction with the expiry date. This sets
up the license file (located with the executable programs).
Image Statistics, Information and Entropy
Multiresolution Image Statistics (Program name: mr_info)
This provides statistical multiresolution information for an image
(min, max, sigma, mean, skewness and kurtosis at each scale). Various
multiresolution transforms are supported.
Additional options allow the significant coefficients to be analyzed,
and furnish:
the percentage of significant coefficients at each scale,
the number of maxima at each scale,
the number of structures detected at each scale,
and the size in pixels of the largest detected structure at each scale.
Image Statistics (Program used: im_info)
According to option the Shannon entropy, the Frieden entropy and
the Fisher information are also calculated. For Shannon entropy,
probabilities are determined from the image histogram (marginal
density). For Frieden entropy, probabilities are replaced by
normalized values. Fisher information involves the gradient
operator. Fisher information, and Shannon Entropy increase when
the data become more noisy or more complex, while Frieden entropy
decreases. A further option available under image statistics is
to determine the image's skewness and kurtosis values. Please
refer to the full MR documentation (PDF file) available at
http://www.multiresolution.com for exact definitions.
Signal Entropy Information (Program used: mw_entrop)
This program computes the information (entropy) and the signal information
of an image (N1-MSE approach). The program calculates and prints to
the screen the mean entropy and signal entropy per band.
Image Noise (Program used: mr_sigma)
Automatically estimate image noise.
Wavelet Transforms and Image Filtering
Wavelet Transforms and Filtering (Program used: mr_transform)
Many different wavelet and other multiresolution transforms are
available. There is a focus on redundant transforms, since these
are usually best if feature detection and interpretation is the
primary goal. The number of scales (default 4) is essentially limited
by the two-fold decrease in information content at each wavelet or
multiresolution scale.
Image generation: The user can specify a set of resolution scales to recombine into a new output image. If all scales are used, then the image is identical to the input image. A lower bound on the scales is therefore 1. An upper bound is the number of scales used. By avoiding low scales (1, 2, ...) it may be possible to avoid noise. By avoiding high scales (the highest in value, in particular, corresponding to the smooth image component in the wavelet or multiresolution decomposition) it may be possible to remove the background.
Redundant transforms supported through the graphical user interface are: linear wavelet transform: à trous algorithm, B-spline wavelet transform: à trous algorithm, wavelet transform in Fourier space, morphological median transform, and morphological minmax transform. A very large number of further wavelet transforms are available in batch mode (i.e. by using the command in a command prompt or DOS window).
Multiresolution Filtering (Program name: mr_filter)
Filtering in wavelet transform space, and rebuilding the cleaned up image.
A very wide range of wavelet and other multiresolution transforms is
supported. In addition, a wide range of noise models is supported. For
full details, the MR documetation should be consulted (available at
http://www.multiresolution.com).
Multiresoluton Entropy Filtering (Program name: mw_filter)
The program filters an image using the multiscale entropy method
(N2-MSE approach). An entropy measure is used to balance signal and
noise and, in this framework, noise is optimally determined and
removed.
Image Processing Operations
Image Contrast Enhancement (Program used: mr_contrast)
Histogram equalization and a range of other options based on
processing in wavelet transform space.
Image Thresholding (Program used: im_threshold)
Image Background Removal (Program used: mr_background)
This subtracts the background from an image. The
background is considered as being the last scale of the pyramidal
median transform. The number of scales is automatically calculated in order
to have the last scale with a size lower than or equal to 16 x
16 pixels.
Image Rotation (Program used: im_rot)
Image rotation is carried out relative to the center of the image; and
the output dimensions are the same as those of the input dimensions. It
is recommended to use this command on square images.
The following mathematical morphology operations are available. A number
of structuring elements are available as options (square, cross, circle).
Such operations can be used, e.g., to clean up artifacts in an image.
Grayscale Dilation (Program used: im_dilate)
Grayscale Erosion (Program used: im_erode)
Grayscale Opening (erosion followed by dilation; Program used: im_opening)
Grayscale Closing (dilation followed by erosion; Program used: im_closing)
Morphological skeleton (of a bi-level image; Program used: im_thin)
Edge Detection (Program used: im_edge)
The following edge detection algorithms are supported: Derivative of
Gaussian (DroG), pixel difference, separated pixel difference, Sobel,
Prewitt, Roberts, Frei Chen, Laplacian, Laplacian of Gaussian (LoG),
Prewitt compass gradient, Kirsch, Robinson.
Segmentation (Program used: segment)
Gaussian mixture model, fit to the image marginal. The Bayes
information criterion (BIC) is output to allow for choice of the best
number of segments. This is the first relative maximum, allowing for the
fact that the BIC values usually approach a plateau for increasing values
of number of segments.
Trouble Shooting