# FbReconstruct2d

## PURPOSE

Use to see how much image information is preserved in filter outputs.

## SYNOPSIS

function I2 = FbReconstruct2d( I, FB, patch )

## DESCRIPTION

     Use to see how much image information is preserved in filter outputs.

     Reconstructs the orginal image from filter outputs (approximately). The
     filter output for a patch is given by IFR=F*P where F is the set of
     filters in matrix form, P is the patch and IFR is the filter responses at
     the center of the patch.  We want to recover P from IFR and F, this is
     underconstrained but a solution can be found using least squared.  Note
     that each recovered P will be 0 mean if no mean information is captured
     by the filter outputs.  Can apply to a single patch (interatctively
     specified), or the entire image (by keeping the central pixel from each
     patch).

     USAGE
      I2 = FbReconstruct2d( I, FB, patch )

     INPUTS
      I      - original image
      FB     - FB to apply and do reconstruction with
      patch  - reconstruct just patch or entire image

     OUTPUTS
      I2     - reconstructed image / patch

     EXAMPLE
      load trees; X=imresize(X,.5); load FbDoG.mat;
      I2 = FbReconstruct2d( X, FB, 0 );

     See also FBAPPLY2D

     Piotr's Image&Video Toolbox      Version 2.0
     Copyright 2012 Piotr Dollar.  [pdollar-at-caltech.edu]
     Please email me if you find bugs, or have suggestions or questions!
     Licensed under the Simplified BSD License [see external/bsd.txt]