tag:www.mathworks.com,2005:/matlabcentral/fileexchange/feedMATLAB Central File Exchangeicon.pnglogo.pngMATLAB Central - File Exchange - category:"Mathematics" category:"Data Analysis"User-contributed code library2014-12-24T19:34:42-05:006611100tag:www.mathworks.com,2005:FileInfo/486102014-12-01T10:30:24Z2014-12-24T07:09:14ZWavelet Based Noise Robust Image SegmentationSegment image containing objects of various intensities and shapes in noisy inhomogenous background<p>This code is a part of our work "Wavelet Based Noise Robust Image Segmentation" . It contains the methods to extract out the darker or lighter objects of various intensities and shapes (including faint/ low intensity objects) from noisy or inhomogeneous background. This method can be used as general purpose bimodal segmentation method and can segment many real images much better than available state of the art general purpose methods.
<br />You may send the results on your image using this method at <a href="mailto:wavelet-and-image-processing@googlegroups.com">wavelet-and-image-processing@googlegroups.com</a> .</p>Ashutosh Kumar Upadhyayhttp://www.mathworks.com/matlabcentral/fileexchange/authors/502879MATLAB 7 (R14)Image Processing Toolbox1. Download "Toolbox Wavelets" by Gabriel Peyre from : http://www.mathworks.com/matlabcentral/fileexchange/5104-toolbox-wavelets'
2. Download litekmeans: http://www.mathworks.com/matlabcentral/fileexchange/24616-kmeans-clusteringfalsetag:www.mathworks.com,2005:FileInfo/421002013-06-05T18:50:49Z2014-12-22T10:20:46ZReadPhilipsScanPhysLog(filename, channels, skipprep)ReadPhilipsScanPhysLog.m reads Philips scanphyslog files, which are created by Philips MRI scanners.<p>This function can be used to load header information and data samples from Philips scanner logfiles. It can load all data available in the file, or only selected channels. In addition to the raw data, a special marker table will be returned which contains indexing information of all detected events in the marker channel.
<br />Examples:
<br />D = ReadPhilipsScanPhysLog('SCANPHYSLOG20110420142406.log');
<br />Reads all physiological channels and marker flags. The marker index
<br />information will automatically put into D.M and D.I.</p>
<p>D = ReadPhilipsScanPhysLog('SCANPHYSLOG20110420142406.log',{'v1','v2','resp'});
<br />Reads both artefact corrected VCG and respiration channels. The marker index
<br />information will automatically put into D.M and D.I.</p>
<p>D = ReadPhilipsScanPhysLog('SCANPHYSLOG20110420142406.log','none');
<br />Ignore channels, and only load markers (i.e. DATA.C==[])</p>
<p>[D H] = ReadPhilipsScanPhysLog('SCANPHYSLOG20110420142406.log');
<br />Also parses the header and stores info in H.</p>
<p>Use start/stop markers to extract epochs:</p>
<p> beginindex = D.M(find(D.M(:,1)==16),2);
<br /> endindex = D.M(find(D.M(:,1)==32),2);
<br /> epoch = D.C(beginindex:endindex,:);</p>
<p>However, the start marker is not properly synchronized with the onset of the
<br />first volume. As a workaround you could use the end-marker and real duration of
<br />the scan and calculate the start index yourself:</p>
<p> freq=500;
<br /> TR=2.3;
<br /> nrvolumes=200;
<br /> endindex = D.M(find(D.M(:,1)==16),2);
<br /> beginindex = endindex - nrvolumes * TR * freq;
<br /> epoch = logdata.C(beginindex:endindex,:);</p>
<p>Compatability
<br />Developed and tested with Matlab R2009a (7.8.0) - Windows 64-bit.
<br />bitand behaviour was changed in Version 7 (R14), so you might have
<br />compatibility issues with release before R14.
</p>Paul Groothttp://www.mathworks.com/matlabcentral/fileexchange/authors/66481MATLAB 7.8 (R2009a)MATLABfalsetag:www.mathworks.com,2005:FileInfo/470232014-06-21T11:40:25Z2014-12-21T07:01:40ZChebfunChebfun is an open-source package for numerical computation with functions to 15-digit accuracy<p>Chebfun is an open-source software system for numerical computing with functions. The mathematical basis is piecewise polynomial interpolation implemented with what we call “Chebyshev technology”. The foundations are described, with Chebfun examples, in the book Approximation Theory and Approximation Practice (L. N. Trefethen, SIAM 2013). Chebfun has extensive capabilities for dealing with linear and nonlinear differential and integral operators, and also includes continuous analogues of linear algebra notions like QR and singular value decomposition. The Chebfun2 extension works with functions of two variables defined on a rectangle in the x-y plane.</p>
<p>Most Chebfun commands are overloads of familiar MATLAB commands — for example sum(f) computes an integral, roots(f) finds zeros, and u = L\f solves a differential equation.</p>
<p>To get a sense of the breadth and power of Chebfun, a good place to start is by looking at our Examples (<a href="http://www.chebfun.org/examples/">http://www.chebfun.org/examples/</a>) or the introductory Guide (<a href="http://www.chebfun.org/docs/guide/">http://www.chebfun.org/docs/guide/</a>).</p>
<p>Please contact us with any questions/comments at <a href="mailto:help@chebfun.org">help@chebfun.org</a>.</p>Chebfun Teamhttp://www.mathworks.com/matlabcentral/fileexchange/authors/55471MATLAB 8.2 (R2013b)MATLAB23972falsetag:www.mathworks.com,2005:FileInfo/488182014-12-20T11:47:13Z2014-12-20T17:31:48ZPeak detection of a functionThis function detects the transition points (maxima and minima) in a function like y = f(x)<p>function [nmax,maxAt,maxValues,nmin,minAt,minValues] = peak(y,x,threshold,stepsize)
<br />This function detects the transition points (maxima and minima) of a function like y = f(x), where x is indpendent variable and y is dependent variable. If there is no clue about x, then use x = [], which is an empty vector, and if so, it automatically defines x = 1:length(y).</p>
<p>
<br />Optional input arguments: threshold is the thresholding applied to y, and stepsize is the step size for computation of slopes. The smaller the stepsize is, the more accurate result is. By default stepsize = abs(x(1)-x(2))/10.</p>
<p>Finally, it returns, nmax: the number of peaks in y; maxAt: the x values at which peaks occur; maxValues: the peak values of y; nmin: number of minima in y; minAt: the x values at which minima occur; and
<br />minValues: the minima of y; (all after thresholding, if any).</p>
<p>
<br />Examples 1: no threshodling
<br />x = -pi:pi/100:pi;
<br />y = sin(x)+cos(x.^2);
<br />[nmax,maxAt,maxValues,nmin,minAt,minValues] = peak(y,x)</p>
<p>
<br />Example 2: thresholding at 0
<br />x = -pi:pi/100:pi;
<br />y = sin(x)+cos(x.^2);
<br />[nmax,maxAt,maxValues,nmin,minAt,minValues] = peak(y,x,0)</p>Shoaibur Rahmanhttp://www.mathworks.com/matlabcentral/fileexchange/authors/533225MATLAB 8.4 (R2014b)falsetag:www.mathworks.com,2005:FileInfo/487702014-12-17T05:46:58Z2014-12-18T15:24:59ZMarginal distributions of a bivariate functionThis function computes the marginal distributions of each variable in a bivariate function.<p>function [fx, fy, MeanVar] = marginaldist(f,x,y,distributionType)</p>
<p>f is a bivariate function, which can be a normalized or unnormalized distribution function. x and y are the two independent variables of f. The variable values can be taken as either row or column vectors. fx and fy are the marginal distributions of x and y, respectively.
<br />distributionType defines whether the marginal distributions have to be computed on continuous or discrete domain. Default is continuous. The strings that can be assigned to distributionType as an input may include:
<br />(for continuous) 'Continuous','continuous','Con', or 'con'
<br />and (for discrete) 'Discrete','discrete','Dis', or 'dis'</p>
<p>MeanVar is optional. This is a vector output, whose elements are mean of fx, variance of fx, mean of fy, and variance of fy, respectively.</p>
<p>Define function f in a separate m-file. In the example below, we take a two-dimensional Gaussian function as our test function, whose m-file is saved as testFunction.m</p>
<p>function f = testFunction(x,y)
<br />sx = 2; sy = 0.5; mx = 2; my = -1; % s stands for variance, and m for mean
<br />f = 1/(2*pi*sx*sy)*exp(-(x-mx).^2/(2*sx^2)-(y-my).^2/(2*sy^2));</p>
<p>Example 1
<br />x = -10:0.1:10; y = -10:0.1:10;
<br />[fx, fy, MV] = marginaldist(@testFunction,x,y,'continuous');
<br />subplot(211), plot(x,fx), xlabel('x'), ylabel('f_x(x)')
<br />title('Marginal distribution of x','FontSize',12,'Color','r')
<br />subplot(212), plot(y,fy), xlabel('y'), ylabel('f_y(y)')
<br />title('Marginal distribution of y','FontSize',12,'Color','r')</p>
<p>Example 2
<br />x = -10:10; y = -10:10;
<br />[fx, fy] = marginaldist(@testFunction,x,y,'discrete');
<br />subplot(211), plot(x,fx), xlabel('x'), ylabel('f_x(x)')
<br />title('Marginal distribution of x','FontSize',12,'Color','r')
<br />subplot(212), plot(y,fy), xlabel('y'), ylabel('f_y(y)')
<br />title('Marginal distribution of y','FontSize',12,'Color','r')</p>Shoaibur Rahmanhttp://www.mathworks.com/matlabcentral/fileexchange/authors/533225MATLAB 8.4 (R2014b)MATLABfalsetag:www.mathworks.com,2005:FileInfo/487892014-12-18T15:09:45Z2014-12-18T15:09:45ZFast Third Order Cross-Cumulant calculationPerforms a fast third order cross cumulant calculation between the three vectors (x,y,z).<p>[Cxyz,Cxyz_std,scale,overlap] = cum3xyz(x,y,z, nsamp, overlap,window)
<br />Performs a fast third order cross cumulant calculation between the three vectors (x,y,z) by relying on matrix multiplication and content management, as opposed to nested for-loops.
<br />Inspired by the work in the Higher Order Spectral Analysis toolbox.</p>Brianhttp://www.mathworks.com/matlabcentral/fileexchange/authors/229370MATLAB 7.12 (R2011a)3013falsetag:www.mathworks.com,2005:FileInfo/487862014-12-18T12:00:25Z2014-12-18T12:00:25ZGreedy Algorithms and Greedy Analysis Pursuit for Non-linear sparse recoveryModifications to Greedy Algorithms and Greedy Analysis Pursuit(GAP) for non-Linear sparse Recovery.<p>First part of this work represents modifications in the existing OMP and COSAMP greedy algorithms so that they can effectively recover even in the Non linear sparse scenarios such as exponential and logarithmic. (contains minor changes to the work posted earlier)
<br />Second part of this work represents modifications to Analysis prior counter part of Greedy Algorithms that is Greedy Analysis Pursuit (GAP) so that they can effectively work for Non-linear sparse scenario. The signal is cosparse. Sparco toolbox is used: <a href="http://www.cs.ubc.ca/labs/scl/sparco/">http://www.cs.ubc.ca/labs/scl/sparco/</a></p>Kavya Guptahttp://www.mathworks.com/matlabcentral/fileexchange/authors/517338MATLAB 7.10 (R2010a)MATLABRequires the Sparco toolbox : http://www.cs.ubc.ca/labs/scl/sparco/falsetag:www.mathworks.com,2005:FileInfo/487822014-12-18T04:37:01Z2014-12-18T04:37:01ZMulti-exposure and Multi-focus Image Fusion in Gradient DomainAn algorithm for fusion of a stack of multi-exposure and multi-focus images<p>Multi-exposure and Multi-focus Image Fusion in Gradient Domain
<br />Sujoy Paul, Ioana S. Sevcenco and Panajotis Agathoklis
<br />This is an implementation of an algorithm for fusion of multi-exposure and multi-focus images in gradient domain, using a wavelet based method coupled with a Poisson Solver at each resolution to decrease the artifacts. This method is applicable for both color as well as gray scale images. Input is a stack of multi-exposure or multi-focus images and output is a single fused image. A brief description of this submission is provided in the ReadMe.pdf file. </p>
<p>This submission is based on the algorithm proposed in
<br />[1] S. Paul, I.S. Sevcenco, P. Agathoklis, "Multi-exposure and Multi-focus image fusion in gradient domain" (submitted for publication)</p>Sujoy Paulhttp://www.mathworks.com/matlabcentral/fileexchange/authors/492399MATLAB 8.1 (R2013a)MATLAB48066falsetag:www.mathworks.com,2005:FileInfo/71872005-03-18T10:42:49Z2014-12-15T20:10:35ZinpolygonsFinds points inside multiple polygons, holes possible.<p>Test whether point(s) are in polygon(s) in Matlab</p>Kelly Kearneyhttp://www.mathworks.com/matlabcentral/fileexchange/authors/287218MATLAB 7.0.1 (R14SP1)Mapping Toolboxfalsetag:www.mathworks.com,2005:FileInfo/406692013-03-07T16:05:08Z2014-12-04T20:15:35ZGraph Cut for image SegmentationThe code segments the grayscale image using graph cuts.<p>Running the Code:
<br />% Maximum Image size 128 by 128</p>
<p>I=imread('Lenna.jpg');
<br />pad=3;
<br />MAXVAL=255;
<br />[Ncut] = graphcuts(I,pad,MAXVAL)
<br />% function [Ncut] = graphcuts(I)
<br />% Input: I image
<br />% pad: spatial connectivity; eg. 3
<br />% MAXVAL: maximum image value
<br />% Output: Ncut: Binary map 0 or 1 corresponding to image segmentation</p>Amarjothttp://www.mathworks.com/matlabcentral/fileexchange/authors/323305MATLAB 7.6 (R2008a)Image Processing Toolboxfalse