The file includes mexfunction code calling "Kinect for Windows SDK" to receive depth data and color image from Kinect and a Matlab code to reshape the information matries. Please see the Readme.txt for usage.
Reshapes an array like the MATLAB intrinsic reshape function. But reshape0 does not require that the total number of elements must remain the same. If the new array is larger, then it will be zero or blank padded. If the new array is smaller, then...
% RESHAPECAT(DIM,X,P) takes a M-by-N matrix X and returns breaks
% it down to several M-by-P or P-by-N matrices and concatenates
% them along the dimension DIM.
% In general, RESHAPECAT(DIM,X) returns a Concatenateed vector...
repToSize is an adaptation of repmat which requires only the final array size as the input. This removes the need to calculate the number of repetitions as well as handling for cases where a a fractional number of repetitions is required.
Create Flash movies in a quick and easy way, such as album, animation banner, navigation buttons/menu and etc. To make animations in Glanda, you can start from one of the built-in templates or from scratch. You can draw or import shapes, import...
RANDBLOCK - randomize blocks of a matrix
R = RANDBLOCK(M,S) randomizes the matrix M by dividing M into non-overlapping blocks of the size specified by S, and shuffling these blocks. M can be a N-D matrix.
The number of...
% Fast nearest, bi-linear and bi-cubic interpolation for image data
% Z = ba_interp2(F, X, Y, [method])
% where method is one off nearest, linear, or cubic.
% F is a WxHxD Image with...
This script generates artificial spatial data using a first order spatial autoregressive process (AR1)
The process is
X(i,j) = PHI*(X(i,j-1)+X(i,j+1)+X(i-1,j)+X(i+1,j) + error
To generate a 10x10, periodic spatial...
DIJKSTRA Calculate Minimum Costs and Paths using Dijkstra's Algorithm
[AorV] Either A or V where
A is a NxN adjacency matrix, where A(I,J) is nonzero if and only if an edge connects point I to point J
BLOCKMEAN - Fast mean of rectangular submatrices
The mean of V*W elements along the 1st and 2nd dimension is calculated. This is no running mean filter: The sizes of the 1st and 2nd dimension are reduced by the factors V and W.
function [optW, C, W] = sskernel(x,W,str)
% [optW, C, W] = sskernel(x,W,str)
% Function `sskernel' returns an optimal bandwidth (standard deviation)
% of the Gauss density function used in kernel density estimation.
The class ndSparse defined in this submission will give a lot of the functionality of N-dimensional sparse arrays for N possibly greater than 2. However, it should really be thought of as a way of starting with an ordinary MATLAB sparse matrix and...
CELL2VEC - Concatenate cell elements to a vector
The elements of arrays, which are elements of the input cell, are concatenated to a vector.
V = Cell2Vec(C)
C: Cell array of any size. Accepted classes: all numerical...
KPF_CB was completely rewritten to work with mouse clicks and for Matlab R2011b. Currently it does not work with other releases. I haven't really looked into why yet, so I have included the original 'KPF_CB' and renamed it 'Original_KPF_CB' for...
You can easily save and load a variety types of data as multi-frame TIFF format by using this.
Supported data types : uint8, uint16, uint32, int8, int16, int32, single
It does not support 'double' type and complex number.
Often I have to extract a subset of a two-dimensional array for further analysis. Usually I do this with logical indexing. But most often the problem with logical indexing is that I get a column vector which I then have to reshape or index into a...
Fast euclidian norm over N.th dimension of a DOUBLE array
Y = DNorm2(X, N)
X: Real DOUBLE array.
N: Dimension to operate on.
Y: Euclidian norm over N.th dimension: Y = sqrt(sum(X .* X, N)).
KMEANSK - mex implementation (compile by mex kmeansK.cpp
Also an equivalent MATLAB implementation is present in zip file
Performs K-means clustering given a list of feature vectors and k. The argument k indicates the number of...
When you use an analoginput object from the Data Acquisition Toolbox to capture data which which spans multiple triggers, the data from each trigger is separated by NaNs. This function strips out the NaNs and reshapes the data, adding one...
It could be useful to know the normal vectors of a surface. The function provided is able to take a 2.5D unrestricted triangulation (Delaunay or not) which define a 3D surface and computes the normal vectors of each cell. It is possible to compute...