Skip to content

Commit

Permalink
copy matlabPyrTools for a git submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
gregfreeman committed Apr 9, 2012
0 parents commit f2ec678
Show file tree
Hide file tree
Showing 284 changed files with 11,490 additions and 0 deletions.
478 changes: 478 additions & 0 deletions ChangeLog

Large diffs are not rendered by default.

109 changes: 109 additions & 0 deletions Contents.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
% matlabPyrTools: Image and Multi-scale Pyramid Tools
% Version: 1.4, December-2009.
% Created: Early Spring, 1996.
% Author: Eero Simoncelli, eero.simoncelli@nyu.edu
%
% See README file for brief description.
% See ChangeLog file for latest modifications.
% See TUTORIALS subdirectory for demonstrations.
% Type "help matlabPyrTools" to see this file as documentation.
% Type "help <command-name>" for documentation on individual commands.
% -----------------------------------------------------------------
% Synthetic Images (matrices):
% mkImpulse - Make an image containing an impulse.
% mkRamp - Make an image containing a ramp function.
% mkR - Make an image containing distance from the origin.
% mkAngle - Make an image containing angle about origin.
% mkDisc - Make an image containing a disk image.
% mkGaussian - Make an image containing a Gaussian function.
% mkZonePlate - Make an image containing a zone plate (cos(r^2)).
% mkAngularSine - Make an image containing an angular sine wave (pinwheel).
% mkSine - Make an image containing a sine grating.
% mkSquare - Make an image containing a square grating.
% mkFract - Make an image containing fractal (1/f) noise.
%
% Point Operations:
% clip - clip values to a range.
% pointOp - Lookup table (much faster than interp1) [MEX file]
% histo - Efficient histogram computation [MEX file]
% histoMatch - Modify matrix elements to match specified histogram stats.
%
% Convolution (first two are significantly faster):
% corrDn - Correlate & downsample with boundary-handling [MEX file]
% upConv - Upsample & convolve with boundary-handling [MEX file]
% blurDn - Blur and subsample a signal/image.
% upBlur - Upsample and blur a signal/image.
% blur - Multi-scale blurring, calls blurDn and then upBlur.
% cconv2 - Circular convolution.
% rconv2 - Convolution with reflected boundaries.
% zconv2 - Convolution assuming zeros beyond image boundaries.
%
% General pyramids:
% pyrLow - Access lowpass subband from (any type of) pyramid
% pyrBand - Access a subband from (any type of) pyramid
% setPyrBand - Insert an image into (any type of) pyramid as a subband
% pyrBandIndices - Returns indices for given band in a pyramid vector
% maxPyrHt - compute maximum number of scales in a pyramid
%
% Gaussian/Laplacian Pyramids:
% buildGpyr - Build a Gaussian pyramid of an input signal/image.
% buildLpyr - Build a Laplacian pyramid of an input signal/image.
% reconLpyr - Reconstruct (invert) the Laplacian pyramid transform.
%
% Separable orthonormal QMF/wavelet Pyramids:
% buildWpyr - Build a separable wavelet representation of an input signal/image.
% reconWpyr - Reconstruct (invert) the wavelet transform.
% wpyrBand - Extract a single band of the wavelet representation.
% wpyrLev - Extract (packed) subbands at a particular level
% wpyrHt - Number of levels (height) of a wavelet pyramid.
%
% Steerable Pyramids:
% buildSpyr - Build a steerable pyramid representation of an input image.
% reconSpyr - Reconstruct (invert) the steerable pyramid transform.
% buildSFpyr - Build a steerable pyramid representation in the Fourier domain.
% reconSFpyr - Reconstruct (invert) the (Fourier domain) steerable pyramid transform.
% spyrBand - Extract a single band from a steerable pyramid.
% spyrHigh - Highpass residual band.
% spyrLev - A whole level (i.e., all images at a given scale) of a steerable pyramid.
% spyrHt - Number of levels (height) of a steerable pyramid.
% spyrNumBands - Number of orientation bands in a steerable pyramid.
%
% Steerable filters / derivatives:
% imGradient - Compute gradient of image using directionally accurete filters.
% steer - Steer filters (or responses).
% steer2HarmMtx - Construct a matrix mapping direcional basis to angular harmonics.
%
% Filters:
% binomialFilter - returns a filter of binomial coefficients.
% namedFilter - some typical Laplacian/Wavelet pyramid filters
% spNFilters - Set of Nth order steerable pyramid filters.
% derivNFiltersS - Matched set of S-tap 1D derivatives, orders 0 to N.
%
% Display:
% showIm - Display a matrix (real or complex) as grayscale image(s).
% Displays dimensions, subsampling, and range of pixel values.
% showLpyr - Display a Laplacian pyramid.
% showWpyr - Display a separable wavelet pyramid.
% showSpyr - Display a steerable pyramid.
% lplot - "lollipop" plot.
% nextFig - Make next figure window current.
% pixelAxes - Make image display use an integer number of pixels
% per sample to avoid resampling artifacts.
%
% Statistics (for 2D Matrices):
% range2 - Min and max of image (matrix) [MEX file]
% mean2 - Sample mean of an image (matrix).
% var2 - Sample variance of an image (matrix).
% skew2 - Sample skew (3rd moment / variance^1.5) of an image (matrix).
% kurt2 - Sample kurtosis (4th moment / variance^2) of an image (matrix).
% entropy2 - Sample entropy of an image (matrix).
% imStats - Report sample statistics of an image, or pair of images.
%
% Miscellaneous:
% pgmRead - Load a "pgm" image into a MatLab matrix [try einstein.pgm,feynman.pgm]
% pgmWrite - Write a MatLab matrix to a "pgm" image file.
% shift - circular shift a 2D matrix by an arbitrary amount.
% vectify - pack matrix into column vector (i.e., function to compute mtx(:)).
% ifftshift - inverse of MatLab's FFTSHIFT (differs for odd-length dimensions)
% rcosFn - return a lookup table of a raised-cosine threshold fn.
% innerProd - Compute M'*M efficiently (i.e., do not copy) [MEX file]
1 change: 1 addition & 0 deletions MEX/-MacReadMe
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MacReadMeHow to compile a MEX file for Macintosh(Based on a similar note written by David Brainard and Denis Pelli to accompany the Psychophysics Toolbox.)A MEX file (short for "MATLAB extension") contains code that implements a new MATLAB function, allowing users to use the full power of the C language and the Macintosh hardware and operating system in implementing a new MATLAB function. This document explains how to produce a MEX file that is "fat" (i.e. will run as native code on both 68K and PowerPC Macs) and is compatible with both MATLAB 4 and 5.1) To produce a MATLAB MEX file with PowerPC code you must have the Metrowerks CodeWarrior C compiler (version 10 or better, abbreviated as CW below). To produce 68K code we still use the Symantec THINK C compiler (version from Symantec C++ 8 CD-ROM release 5), but we will soon be switching to Metrowerks CodeWarrior. (See note A below.)2) Place a copy of the MATLAB 4:Extern folder, supplied by Mathworks, on your compiler's search path. We suggest that you name the copy "MEX V4". (See notes B and C, below.) 3) Build any of the MEX files simply by opening its project file and asking your compiler to "Build Code Resource" (in THINK C) or to "Make" it (in CW). For each MEX file, e.g. histo.mex, there are two associated projects, e.g. histo.� for CW, and histo.�.4 for THINK C. To build a "fat" MEX, that runs native on both 68K and PowerPC, you should first compile in THINK C, and then in CW. (See note A, below.)Denis PelliApril 2, 1997NotesA) The Mathworks support only the THINK C compiler to make 68K MEX code for MATLAB version 4 and only the CW compiler to make PPC MEX files for MATLAB 4 and both 68K and PPC for MATLAB 5. This archive includes THINK and CW projects. To build a fat MEX file for MATLAB 4, first "make" the THINK C version (e.g. histo.�.4), producing a file with a .rsrc extension (e.g. histo.�.rsrc). This is the 68K MEX file. When you then "make" histo.�, the CW project incorporates the .rsrc file and generates a "fat" MEX file that will run native (i.e. fast) on both 68K and PowerPC. To make a 68K-only MEX file, simply rename, e.g., histo.�.rsrc to histo.mex after you make the THINK project, and set the file type and creator to match the other MEX files. THINK C is slow and hard to work with. Symantec hasn't significantly upgraded in it many years. There is an error in the math.h header (version from Symantec C++ 8 CD-ROM release 5). We fix that error by some tricky preprocessor defines and undefines in the THINK C Prefix in each of the THINK projects. B) The easiest way to put a folder on your compiler�s search path is simply to put the folder in the same folder as the compiler itself. If you want to use both CW and THINK C, then put the folder under CW, make an alias of it, and put the alias in THINK C's "Aliases" folder.C) Happily, MATLAB 5 is capable of running both V4 and V5 MEX files. Thus we are currently distributing sources that compile into V4 MEX files. The resulting MEX files run both under V4 and V5. In the future we will drop support for V4 and THINK C. (See note A above.)
Expand Down
Binary file added MEX/.nfs0000000000116fef00000004
Binary file not shown.
15 changes: 15 additions & 0 deletions MEX/compilePyrTools.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
% This is a script file for compiling the mex versions of the Steerable
% Pyramid Tools.
%
% Usage:>> compilePyrTools
%
% Tested for gcc and lcc.
%
% Rob Young, 9/08

mex upConv.c convolve.c wrap.c edges.c
mex corrDn.c convolve.c wrap.c edges.c
mex histo.c
%mex innerProd.c
mex pointOp.c
mex range2.c
Loading

0 comments on commit f2ec678

Please sign in to comment.