plateform stringclasses 1
value | repo_name stringlengths 13 113 | name stringlengths 3 74 | ext stringclasses 1
value | path stringlengths 12 229 | size int64 23 843k | source_encoding stringclasses 9
values | md5 stringlengths 32 32 | text stringlengths 23 843k |
|---|---|---|---|---|---|---|---|---|
github | kapibara/ToF-Calibration-master | do_initial_calib_intel.m | .m | ToF-Calibration-master/do_initial_calib_intel.m | 366 | utf_8 | 8affffc3f62e90d6b72c1b751c7a270c | %% initialize calibration
function do_initial_calib_intel(options)
global calib0 rfiles
%do corner-based calibration
do_initial_conf_calib(options.use_fixed_ini);
if(options.color_present)
do_initial_rgb_calib();
%relative transformation initialization
[calib0.cR,calib0.c... |
github | kapibara/ToF-Calibration-master | depth2world.m | .m | ToF-Calibration-master/depth2world.m | 444 | utf_8 | 8c9c32de5e8dcc4392b831ba14406e7c | %put depth to ToF camera frame
% d should be corrected depth!
function p3D = depth2world(p, d, calib)
%compute correction if included in the model
dc = correct_depth(p, d, calib);
if(isfield(calib,'ckc'))
pn = get_dpoint_direction(p(1,:),p(2,:),calib.cK,calib.ckc);
else
pn = ... |
github | kapibara/ToF-Calibration-master | do_select_images_Intel.m | .m | ToF-Calibration-master/do_select_images_Intel.m | 1,917 | utf_8 | 33f7f0af0026e254b3a93a4b6735467a | %do_select_images()
% UI function.
% Kinect calibration toolbox by DHC
function do_select_images_Intel(options)
global dataset_path rfiles rsize dfiles cfiles
fprintf('-------------------\n');
fprintf('Selecting images\n');
fprintf('-------------------\n');
s = sprintf('Path to image directory ([]=curre... |
github | kapibara/ToF-Calibration-master | do_select_planes_Intel.m | .m | ToF-Calibration-master/do_select_planes_Intel.m | 1,780 | utf_8 | 02a98372080464ef27b641f81fdde3fd | %do_select_planes()
% UI function.
% Kinect calibration toolbox by DHC
function do_select_planes_Intel()
%Input
global dataset_path dfiles
%Output
global depth_plane_poly depth_plane_mask
%width = 640;
%height = 480;
Id = imread([dataset_path '/' dfiles{1}]);
width = size(Id,2);
height = size(Id,1);
icount = length(... |
github | kapibara/ToF-Calibration-master | fit_depth_correction.m | .m | ToF-Calibration-master/fit_depth_correction.m | 625 | utf_8 | 1916fd619cc5f60686d6ebb40a2b079c |
function calib = fit_depth_correction(calib)
%remove the previous correction estimate
if(isfield(calib,'inputs'))
calib = rmfield(calib,'inputs');
end
%compute error accross images
[error,depthm,imxy] = compute_full_derror(calib);
d = sqrt(sum((imxy - repmat(calib.cK(1:2,3),1,size(imxy,2))).^2,1)); %distance to ... |
github | kapibara/ToF-Calibration-master | estimate_plane_to_plane.m | .m | ToF-Calibration-master/estimate_plane_to_plane.m | 934 | utf_8 | 01ea08c7bf9a9d290d11d239ea86f01d | %compute relativa transformation based on the set of planes, defined by
%rotations and translations;
function [R,t] = estimate_plane_to_plane(Rext1,text1,Rext2,text2)
good = find(cellfun(@(x) ~isempty(x),Rext1) & cellfun(@(x) ~isempty(x),Rext2));
planeN1 = zeros(3,2);
planed1 = zeros(1,length(good));
for i=... |
github | kapibara/ToF-Calibration-master | tight_subplot.m | .m | ToF-Calibration-master/tight_subplot.m | 3,378 | utf_8 | bf1958221cf96e7d926557e840f8ccba | % tight_subplot creates "subplot" axes with adjustable gaps and margins
%
% ha = tight_subplot(Nh, Nw, gap, marg_h, marg_w)
%
% in: Nh number of axes in hight (vertical direction)
% Nw number of axes in width (horizontaldirection)
% gap gaps between the axes in normalized units (0..... |
github | kapibara/ToF-Calibration-master | projectedGrid.m | .m | ToF-Calibration-master/projectedGrid.m | 538 | utf_8 | 0c4c21c496388f6ad53afb1b5517ed7d | %Function from Bouguet's camera calibration toolbox.
function [XX,H] = projectedGrid ( P1, P2, P3, P4 , nx, ny);
% new formalism using homographies
a00 = [P1;1];
a10 = [P2;1];
a11 = [P3;1];
a01 = [P4;1];
% Compute the planart collineation:
[H] = compute_collineation (a00, a10, a11, a01);
% Build th... |
github | kapibara/ToF-Calibration-master | rotationmat.m | .m | ToF-Calibration-master/rotationmat.m | 451 | utf_8 | 2c4c56198f06d5ae8c0d0586321bbe0c | % by Juho Kannala
%Vector form of rotation to matrix form (Rodriguez formula)
function R=rotationmat(t)
t=t(:);
phi=norm(t);
if 0
if phi==0
sincphi=1;
sc=0;
else
sc=(1-cos(phi))/(phi^2);
sincphi=sin(phi)/phi;
end
R=cos(phi)*eye(3)+sincphi*[0 -t(3) t(2); t(3) 0 -t(1); -t(2) t(1) 0]+sc*t*t';
end
if phi==0
R=... |
github | kapibara/ToF-Calibration-master | grid2world.m | .m | ToF-Calibration-master/grid2world.m | 397 | utf_8 | 64ce99e7d549df3ae0d7e5985dfb3059 | function grid = grid2world(i,calib)
global conf_grid_x;
grid = expandGrid(conf_grid_x{i});
grid = [conf_grid_x{i} grid];
grid = calib.cRext{i}*grid + repmat(calib.ctext{i},1,size(grid,2));
end
function grid = expandGrid(grid)
d = max(grid(2,:)); %size in first dimension
dt = [... |
github | kapibara/ToF-Calibration-master | calib_from_homographies.m | .m | ToF-Calibration-master/calib_from_homographies.m | 1,878 | utf_8 | 278c8dfc526fe49eee9bd29192ce90de | %[K,R,t]=calib_from_homographies(H)
%Computes calibration parameters using homographies
%Implemented directly from Zhang's '99 paper
% "Flexible Camera Calibration By Viewing a Plane From Unknown
% Orientations"
%
% H is a cell array of 3x3 homographies
% K is the [3x3] intrinsics matrix
% R is a cell array of ... |
github | kapibara/ToF-Calibration-master | compute_homography.m | .m | ToF-Calibration-master/compute_homography.m | 3,762 | utf_8 | d7d7c5929a992b96b5a1b7ed548d8b84 | %Function from Bouguet's camera calibration toolbox.
function [H,Hnorm,inv_Hnorm] = compute_homography(m,M);
%compute_homography
%
%[H,Hnorm,inv_Hnorm] = compute_homography(m,M)
%
%Computes the planar homography between the point coordinates on the plane (M) and the image
%point coordinates (m).
%
%INPUT: m:... |
github | kapibara/ToF-Calibration-master | gaussian_kern_reg.m | .m | ToF-Calibration-master/gaussian_kernel_reg/gaussian_kern_reg.m | 342 | utf_8 | bb5bfce77f5bd95ecef087bb70bf929c |
function ys=gaussian_kern_reg(xs,x,y,h)
% Gaussian kernel function
%K=sqdist(diag(1./h)*x,diag(1./h)*xs);
K = sqdistance(diag(1./h)*x, diag(1./h)*xs);
%K = slmetric_pw(diag(1./h)*x, diag(1./h)*xs, 'sqdist');
%K = sum((x-repmat(xs,1,size(x,2))).^2,1)'/h^2;
K= exp(-K/2);
% linear kernel regression
ys ... |
github | elt11jke/RealPred-Projekt-master | cvxsolve.m | .m | RealPred-Projekt-master/cvxgen/cvxsolve.m | 8,805 | utf_8 | b8d49bed8e2e84321cfd88c0edba85c7 | % Produced by CVXGEN, 2015-04-28 05:06:57 -0400.
% CVXGEN is Copyright (C) 2006-2012 Jacob Mattingley, jem@cvxgen.com.
% The code in this file is Copyright (C) 2006-2012 Jacob Mattingley.
% CVXGEN, or solvers produced by CVXGEN, cannot be used for commercial
% applications without prior written permission from Jacob Ma... |
github | elt11jke/RealPred-Projekt-master | change_opts.m | .m | RealPred-Projekt-master/QPgen_v0.0.2/change_opts.m | 7,028 | utf_8 | 35cc61abac67a8f8a1f073773a85ab57 | % -------------------------------------------------------
% [QP_reform,alg_data] = change_opts(QP_reform,alg_data,opts)
% - regenerate code with new options specified in opts
% -------------------------------------------------------
%
% INPUTS: QP_reform, alg_data, opts
%
% - QP_reform: output from run_code_gen or r... |
github | elt11jke/RealPred-Projekt-master | min_cond_nbr_ADMM.m | .m | RealPred-Projekt-master/QPgen_v0.0.2/min_cond_nbr_ADMM.m | 6,672 | utf_8 | ef8861eecedd5f36d9ac22dbc402a412 | % minimize condition number of M using ADMM
% if input M is symmetric and positive semi definite, then minimize
% condition number of M
% otherwise minimize condition number of M'M
function E = min_cond_nbr_ADMM(M,rel_tol)
% initially work with full matrices, then go to sparse!
% IMPLEMENT: SWITCH TO HANDLE SPAR... |
github | elt11jke/RealPred-Projekt-master | precond.m | .m | RealPred-Projekt-master/QPgen_v0.0.2/precond.m | 1,762 | utf_8 | 194184ddfa219a6626235faecc90d0b4 | % computes preconditioner and optimal parameter
function QP_reform = compute_preconditioner(QP_reform,opts)
fprintf('Computing preconditioner....');
% problem dimensions
n = length(QP_reform.H);
m = size(QP_reform.A,1);
p = size(QP_reform.C,1);
% select preconditioning technique (if not already chosen)
if... |
github | elt11jke/RealPred-Projekt-master | run_code_gen_MPC.m | .m | RealPred-Projekt-master/QPgen_v0.0.2/run_code_gen_MPC.m | 3,708 | utf_8 | 75f6f7fcf78b6bf34679f1d9e6c4c363 | % -------------------------------------------------------
% [QP_reform,alg_data] = run_code_gen_MPC(MPC,opts)
% Actions:
% - reformulates MPC problem in struct MPC to QP problem in struct QP
% - runs: run_code_gen(QP,opts)
% -------------------------------------------------------
% Generate C code to solve parametric... |
github | elt11jke/RealPred-Projekt-master | check_data.m | .m | RealPred-Projekt-master/QPgen_v0.0.2/check_data.m | 7,951 | utf_8 | a6400d1314c63e7013c4b0391db7ed7f | % Data check.
%
% We check,e.g., that:
% - all necessary data is provided
% - data dimensions are correct
% - sparse matrices are defined as sparse
% - dense matrices are defined as dense (threshold between sparse and
% dense is defined in sparsity_threshold)
% - that symmetric matrices are really symmetric
%... |
github | elt11jke/RealPred-Projekt-master | compute_preconditioner.m | .m | RealPred-Projekt-master/QPgen_v0.0.2/compute_preconditioner.m | 2,250 | utf_8 | 0727b7e7a1e9b490ae348b9131e340a0 | % computes preconditioner and optimal parameter
function [E,opts] = compute_preconditioner(QP_reform,opts)
% problem dimensions
n = length(QP_reform.H);
m = size(QP_reform.A,1);
p = size(QP_reform.C,1);
% if no preconditioning, return E=I
if isfield(opts,'precond') && isequal(opts.precond,'no')
E=speye(p);
... |
github | elt11jke/RealPred-Projekt-master | min_cond_nbr.m | .m | RealPred-Projekt-master/QPgen_v0.0.2/min_cond_nbr.m | 715 | utf_8 | a88163fac7b34c9397b9c888532a3113 | % minimize pseudo condition number of M
function E = min_cond_nbr(M)
% make symmetric and set dimension
p = length(M);
M = 1/2*(M+M');
% compute Q such that M = Q'Q
[V,D] = eig(full(M));
Ddiag = diag(D);
idx = find(abs(Ddiag) > 1e-8);
D = D(idx,idx);
V = V(:,idx);
Dsqrt = diag(sqrt(diag(D)));
Q = Dsqrt'*V';
v = le... |
github | elt11jke/RealPred-Projekt-master | nullspace.m | .m | RealPred-Projekt-master/QPgen_v0.0.2/nullspace.m | 831 | utf_8 | fd1f2ba965ad941c850cf695af0878ee | function N = nullspace(M,MPC)
% compute nullspace, either orthonormal nullspace of MPC-nullspace
if nargin < 2
% compute orthonormal nullspace
N = null(full(M));
elseif max(abs(eig(MPC.Adyn))) <= 1
n = size(MPC.Adyn,1);
m = size(MPC.Bdyn,2);
N1 = sparse(n*MPC.N,m*MPC.N);
N1_blk_col = zero... |
github | elt11jke/RealPred-Projekt-master | run_code_gen.m | .m | RealPred-Projekt-master/QPgen_v0.0.2/run_code_gen.m | 5,034 | utf_8 | c30c807764f33973ae5c2aeeae5273fe | % -------------------------------------------------------
% [QP_reform,alg_data] = run_code_gen(QP,opts)
% -------------------------------------------------------
% Generate C code to solve parametric QP:s of the form
%
% minimize 1/2 x'Hx + g'x + h(Cx)
% subject to Ax = b
%
% where:
% - H, C,... |
github | elt11jke/RealPred-Projekt-master | gen_data_file_heap.m | .m | RealPred-Projekt-master/QPgen_v0.0.2/gen_data_file_heap.m | 17,226 | utf_8 | f5df0ccab0fc63c53b4a062518bbc01f | % generates init data and free data files
function gen_data_file_heap(alg_data,opts)
% initialize file string
fid_init = fopen([opts.proj_name '_files/init_data.c'],'w');
fid_free = fopen([opts.proj_name '_files/free_data.c'],'w');
fid_data_struct = fopen([opts.proj_name '_files/data_struct.h'],'w');
% include func... |
github | elt11jke/RealPred-Projekt-master | MPC_to_QP.m | .m | RealPred-Projekt-master/QPgen_v0.0.2/MPC_to_QP.m | 4,041 | utf_8 | 246e8875e6b23e905721d8675beaa6a2 | % creates as QP problem from MPC problem data
function QP = MPC_to_QP(MPC)
% check MPC data
MPC = check_MPC_data(MPC);
% store data dimension and check compatibility
n = size(MPC.Q,1);
m = size(MPC.R,1);
px = size(MPC.Cx,1);
pu = size(MPC.Cu,1);
% store identity matrix in I
I = speye(n);
% create empty matrices th... |
github | SynCrystal/SynCrystal-master | SpectralClustering_est.m | .m | SynCrystal-master/Sketching/src/SpectralClustering_est.m | 2,673 | utf_8 | bc11eaeedae681bf902320fc5a11e473 | %--------------------------------------------------------------------------
% This function takes a NxN matrix CMat as adjacency of a graph and
% computes the segmentation of data from spectral clustering. It estimates
% the number of subspaces using eigengap heuristic
% CMat: NxN adjacency matrix
% K: number of large... |
github | SynCrystal/SynCrystal-master | varSSTns.m | .m | SynCrystal-master/VarSSTmethod/demo/varSSTns.m | 10,328 | utf_8 | f7cf5309d0e2acff030706cce3fd6816 | % This code uses the second method in "Crystal image analysis via 2D
% synchrosqueezed tranforms" to extract grain boundary and orientation.
% Based on this information, a variational optimization is applied to obtain
% results with more physical meaning. The variational model is detailed in
% "Combining 2D synchro... |
github | SynCrystal/SynCrystal-master | varSSTTwoStep.m | .m | SynCrystal-master/VarSSTmethod/demo/varSSTTwoStep.m | 10,547 | utf_8 | 448a08e113eb72fc833f4a10421abb26 | % In the first step, this code uses the first method in "Crystal image analysis via 2D
% synchrosqueezed tranforms" to extract grain boundary and orientation.
% Based on this information, this code applies the second method in
% the same paper to estimate crystal deformation and finer results of grain
% orientation... |
github | SynCrystal/SynCrystal-master | BregmanIter_FitL1Curl_PointGroup.m | .m | SynCrystal-master/VarSSTmethod/src/srcOptPart/BregmanIter_FitL1Curl_PointGroup.m | 8,752 | utf_8 | bb7a03562df266689b53c85ef88d06f8 | function [G,curlG] = BregmanIter_FitL1Curl_PointGroup( waveVecs, masses, stencil, R, G, weights, lambda, nt, GPUflag )
% function [G,curlG] = BregmanIter_FitL1Curl_PointGroup( waveVecs, masses, stencil, R, G, weights, lambda, nt, GPUflag )
% assumes grid spacing of 1
% assumes origin in top left corner
% x-coordinate p... |
github | SynCrystal/SynCrystal-master | projFixedCurl.m | .m | SynCrystal-master/VarSSTmethod/src/srcOptPart/projFixedCurl.m | 6,722 | utf_8 | 4f1a10eb9b6e4582eb49f2b60ae625b8 | function [projG,cache] = projFixedCurl( G, R, L, Curl, cache )
% G - 2D array of matrices, M x N x 2 x 2
% R - list of all point group elements (i.e. rotation matrices), 2 x 2 x H
% L - list of pixel pairs across which we use a nontrivial point group element, K x 4,
% row entries are row and column ... |
github | SynCrystal/SynCrystal-master | BregmanIter_FitL1Curl.m | .m | SynCrystal-master/VarSSTmethod/src/srcOptPart/BregmanIter_FitL1Curl.m | 5,681 | utf_8 | f624dbe13e6a7b90a6d5dab8e4f4884c | function [G,curlG] = BregmanIter_FitL1Curl( waveVecs, masses, stencil, G, weights, lambda, nt, GPUflag )
% function [G,curlG] = l1CurlBregman( waveVecs, masses, stencil, G, weights, lambda, nt1, GPUflag )
% assumes grid spacing of 1
% assumes origin in top left corner
% x-coordinate points right, y-coordinate down
% as... |
github | SynCrystal/SynCrystal-master | elasticDenoising.m | .m | SynCrystal-master/VarSSTmethod/src/srcOptPart/elasticDenoising.m | 2,631 | utf_8 | 191015bf509d2293a6a0f6fef6c74bef | function G = elasticDenoising( G0, mask, B, R, L, numIter )
% Minimizes the functional
% E[G]=\int_{\Omega\setminus D} (G-G_0)^2 + hyperelastic energy(G) dx
% under the constraint findCurl( G = \sum_{k=1}^K b_k \delta_{x_k}.
% Assumes periodic image pixel spacing 1.
% G0 - G_0 (m x n x 2 x 2)
% mask - characteristic ... |
github | SynCrystal/SynCrystal-master | brewermap.m | .m | SynCrystal-master/VarSSTmethod/src/srcOther/cbrewer/brewermap.m | 18,104 | utf_8 | ca2abae8d9185f98463490d03a6724bf | function [map,num,typ] = brewermap(N,scheme)
% The complete selection of ColorBrewer colorschemes (RGB colormaps).
%
% (c) 2014 Stephen Cobeldick
%
% ### Function ###
%
% Returns any RGB colormap from the ColorBrewer colorschemes, especially
% intended for mapping and plots with attractive, distinguishable colo... |
github | SynCrystal/SynCrystal-master | BM3DDEB.m | .m | SynCrystal-master/external/BM3D/BM3DDEB.m | 17,170 | utf_8 | 1ca4e4613bf8a4a204335f69e5b9a1ca | function [ISNR, y_hat_RWI] = BM3DDEB(experiment_number, test_image_name)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Copyright (c) 2008-2014 Tampere University of Technology. All rights reserved.
% This work should only be used for nonprofit purposes.
%
% AUTHORS:
% Kostadin Dabov... |
github | SynCrystal/SynCrystal-master | CBM3D.m | .m | SynCrystal-master/external/BM3D/CBM3D.m | 28,530 | utf_8 | 9a3e40b8b0f177169d223c8676892b13 | function [PSNR, yRGB_est] = CBM3D(yRGB, zRGB, sigma, profile, print_to_screen, colorspace)
%
% CBM3D is algorithm for attenuation of additive white Gaussian noise from
% color RGB images. This algorithm reproduces the results from the article:
%
% [1] K. Dabov, A. Foi, V. Katkovnik, and K. Egiazarian, "Color image
... |
github | SynCrystal/SynCrystal-master | BM3D.m | .m | SynCrystal-master/external/BM3D/BM3D.m | 22,746 | utf_8 | 1db07f61b119fa6ab501801453c24330 | function [PSNR, y_est] = BM3D(y, z, sigma, profile, print_to_screen)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% BM3D is an algorithm for attenuation of additive white Gaussian noise from
% grayscale images. This algorithm reproduces the results from the article:
%
% [1] K. Dab... |
github | SynCrystal/SynCrystal-master | freezeColors.m | .m | SynCrystal-master/external/BM3D/freezeColors/freezeColors.m | 9,815 | utf_8 | 2068d7a4f7a74d251e2519c4c5c1c171 | function freezeColors(varargin)
% freezeColors Lock colors of plot, enabling multiple colormaps per figure. (v2.3)
%
% Problem: There is only one colormap per figure. This function provides
% an easy solution when plots using different colomaps are desired
% in the same figure.
%
% freezeColors freeze... |
github | SynCrystal/SynCrystal-master | Demo_IDDBM3D.m | .m | SynCrystal-master/external/BM3D/IDDBM3D/Demo_IDDBM3D.m | 9,349 | utf_8 | 092ac706ce756d878d1d006a5698eb72 | function [isnr, y_hat] = Demo_IDDBM3D(experiment_number, test_image_name)
% ------------------------------------------------------------------------------------------
%
% Demo software for BM3D-frame based image deblurring
% Public release ver. 0.8 (beta) (June 03, 2011)
%
% -------------------... |
github | SynCrystal/SynCrystal-master | function_CreateLPAKernels.m | .m | SynCrystal-master/external/BM3D/BM3D-SAPCA/function_CreateLPAKernels.m | 5,192 | utf_8 | b5ac9173b2024d53c79babfd89c0aaf9 | % Creates LPA kernels cell array (function_CreateLPAKernels)
%
% Alessandro Foi - Tampere University of Technology - 2003-2005
% ---------------------------------------------------------------
%
% Builds kernels cell arrays kernels{direction,size}
% and kernels_higher_order{direction,s... |
github | SynCrystal/SynCrystal-master | function_Window2D.m | .m | SynCrystal-master/external/BM3D/BM3D-SAPCA/function_Window2D.m | 2,356 | utf_8 | d7eb1c5259345f71197ec8f94d93107c | % Returns a scalar/matrix weights (window function) for the LPA estimates
% function w=function_Window2D(X,Y,window,sig_wind, beta);
% X,Y scalar/matrix variables
% window - type of the window weight
% sig_wind - std scaling for the Gaussian ro-weight
% beta -parameter of the degree in the weights
%--------------... |
github | SynCrystal/SynCrystal-master | function_LPAKernelMatrixTheta.m | .m | SynCrystal-master/external/BM3D/BM3D-SAPCA/function_LPAKernelMatrixTheta.m | 6,420 | utf_8 | e4d4b5ab9a0cc7fe4e417116778164e7 | % Return the discrete kernels for LPA estimation and their degrees matrix
%
% function [G, G1, index_polynomials]=function_LPAKernelMatrixTheta(h2,h1,window_type,sig_wind,TYPE,theta, m)
%
%
% Outputs:
%
% G kernel for function estimation
% G1 kernels for function and derivative estimation
% G1(:,:,j), j... |
github | SynCrystal/SynCrystal-master | cswft1_ext.m | .m | SynCrystal-master/external/SynLab/Source/SS_WFT_1D/src/cswft1_ext.m | 1,098 | utf_8 | 748a153199c788110ba4377ab726c7b8 | function C = cswft1_ext(x,h,sigma)
% cswft1_ext - Derivertive of the 1D compactly supported windowed Fourier
% transform using Gaussian window with respect to location
%
% Inputs
% x a vector of size N
%
% Optional Inputs
% h h is the spacing of samples
% sigma width parameter... |
github | SynCrystal/SynCrystal-master | cswft1_fwd.m | .m | SynCrystal-master/external/SynLab/Source/SS_WFT_1D/src/cswft1_fwd.m | 986 | utf_8 | 738b231c8fc606c0a296abdfbdc00433 | function C = cswft1_fwd(x,h,sigma)
% cswft1_fwd compute the 1D compactly supported windowed Fourier transform using
% Gaussian window
%
% Inputs
% x a vector of size N
%
% Optional Inputs
% h h is the spacing of samples
% sigma width parameter of the Gaussian window
%
% Outputs
... |
github | SynCrystal/SynCrystal-master | g.m | .m | SynCrystal-master/external/SynLab/Source/SS_WP_3D/src/g.m | 847 | utf_8 | ca89e8bc97649ef1b68fa6ff1abe72d4 | function r = g(w)
% g.m - 'g' function Villemoes's construction
%
% Written by Lexing Ying and Laurent Demanet, 2006
r = zeros(size(w));
gd = w<5*pi/6 & w>-7*pi/6;
r(gd) = abs(sf(w(gd)-3*pi/2));
%----------------------------------------------------------------------
function r = sf(w)
r = zeros(size(w));
... |
github | SynCrystal/SynCrystal-master | g.m | .m | SynCrystal-master/external/SynLab/Source/SS_CT_2D/src/g.m | 847 | utf_8 | ca89e8bc97649ef1b68fa6ff1abe72d4 | function r = g(w)
% g.m - 'g' function Villemoes's construction
%
% Written by Lexing Ying and Laurent Demanet, 2006
r = zeros(size(w));
gd = w<5*pi/6 & w>-7*pi/6;
r(gd) = abs(sf(w(gd)-3*pi/2));
%----------------------------------------------------------------------
function r = sf(w)
r = zeros(size(w));
... |
github | SynCrystal/SynCrystal-master | cswft2_fwd.m | .m | SynCrystal-master/external/SynLab/Source/SS_WFT_2D/src/cswft2_fwd.m | 1,459 | utf_8 | f167a670db3b49726e573e0daaac5b56 | function C = cswft2_fwd(x,h,sigma)
% cswft2_fwd compute the compactly supported windowed Fourier transform using
% Gaussian window
%
% Inputs
% x sz1-by-sz2 matrix
%
% Optional Inputs
% h h(1) is the spacing of samples in the vertical direction in the image
% h(2) is the spa... |
github | SynCrystal/SynCrystal-master | cswft2_ext_2.m | .m | SynCrystal-master/external/SynLab/Source/SS_WFT_2D/src/cswft2_ext_2.m | 1,578 | utf_8 | f8ba2e3178cc30c0f372929513a47f05 | function C = cswft2_ext_2(x,h,sigma)
% cswft2_ext_2 - Derivertive of the compactly supported windowed Fourier
% transform using Gaussian window with respect to location in the second
% axis
%
% Inputs
% x sz1-by-sz2 matrix
%
% Optional Inputs
% h h(1) is the spacing of samples in the ver... |
github | SynCrystal/SynCrystal-master | cswft2_ext_1.m | .m | SynCrystal-master/external/SynLab/Source/SS_WFT_2D/src/cswft2_ext_1.m | 1,607 | utf_8 | 8b38158f9322ef3470c98e695afc5f80 | function C = cswft2_ext_1(x,h,sigma)
% cswft2_ext_1 - Derivertive of the compactly supported windowed Fourier
% transform using Gaussian window with respect to location in the first
% axis
%
% Inputs
% x sz1-by-sz2 matrix
%
% Optional Inputs
% h h(1) is the spacing of samples in the ve... |
github | SynCrystal/SynCrystal-master | syn_src.m | .m | SynCrystal-master/external/scatnet/compare/syn_src.m | 411 | utf_8 | d164f063842b92084f51591dc1314d52 |
function src = syn_src(directory)
if (nargin<1)
directory = './scatnet/data/crystal/'; % PUT DEFAULT DIRECTORY HERE
end
src = create_src(directory, @uiuc_extract_objects_fun);
end
function [objects, classes] = uiuc_extract_objects_fun(file)
objects.u1 = [1, 1];
objects.u2 = [64, 64];
path_str = fileparts(... |
github | SynCrystal/SynCrystal-master | srcfun.m | .m | SynCrystal-master/external/scatnet/compare/untility/srcfun.m | 595 | utf_8 | f928b61828148bd40c7c273af2b46415 | % SRCFUN Apply function to each filenames of a ScatNet-compatible src
%
% Usage
% cell_out = SRCFUN(fun, src);
function cell_out = srcfun(fun, src)
time_start = clock;
for k = 1:length(src.files)
db.indices{k} = k;
filename = src.files{k};
cell_out{k} = fun(filename);
tm0 = tic;
time_elapsed = etime(clo... |
github | SynCrystal/SynCrystal-master | uiuc_src.m | .m | SynCrystal-master/external/scatnet/compare/untility/uiuc_src.m | 694 | utf_8 | 2466f6d9ee67383171d19520031abcaa | % UIUC_SRC Creates a source for the UIUC Texture dataset
%
% Usage
% src = UIUC_SRC(directory)
%
% Input
% directory: The directory containing the UIUC Texture dataset.
%
% Output
% src: The UIUC source.
%
% Note
% The dataset is available at http://www-cvr.ai.uiuc.edu/ponce_grp/data/
function src = uiuc_src... |
github | SynCrystal/SynCrystal-master | kthtips_src.m | .m | SynCrystal-master/external/scatnet/compare/untility/kthtips_src.m | 770 | utf_8 | cee2a25acddf376aa655fdffd6bcde9a | % KTHTIPS_SRC Creates a source for the KTH TIPS Texture dataset
%
% Usage
% src = KTHTIPS_SRC(directory)
%
% Input
% directory: The directory containing the KTH TIPS Texture dataset.
%
% Output
% src: The KTH TIPS source.
%
% Note
% The dataset is available at http://www.nada.kth.se/cvap/databases/kth-tips/
f... |
github | SynCrystal/SynCrystal-master | umd_src.m | .m | SynCrystal-master/external/scatnet/compare/untility/umd_src.m | 580 | utf_8 | 4d20098a26826519d6baa7ac5130faae | % UMD_SRC Creates a source for the UMD Texture dataset
%
% Usage
% src = UMD_SRC(directory)
%
% Input
% directory: The directory containing the UMD Texture dataset.
%
% Output
% src: The UMD source.
%
function src = umd_src(directory)
if (nargin<1)
directory = './data/UMD/';
end
src = create_src(directo... |
github | SynCrystal/SynCrystal-master | rsds_classif2.m | .m | SynCrystal-master/external/scatnet/compare/untility/rsds_classif2.m | 1,311 | utf_8 | 2c9ef8b93cc427c8eedd8c4ff245fb2d | % rsds_classif : a function to reproduce classification experiments of paper
%
% ``Rotation, Scaling and Deformation Invariant Scattering
% for Texture Discrimination"
% Laurent Sifre, Stephane Mallat
% Proc. IEEE CVPR 2013 Portland, Oregon
%
function error = rsds_classif2(db, db_name, feature_name, grid_train... |
github | SynCrystal/SynCrystal-master | cellsrc2db.m | .m | SynCrystal-master/external/scatnet/compare/untility/cellsrc2db.m | 302 | utf_8 | a624426e71165bb63a4869b912b93ae7 | % CELLSRC2DB Constitute a database compatible with the ScatNet
% convention with a cell of one object per image and a src
%
% Usage
% db = cellsrc2db(cell, src);
function db = cellsrc2db(cell, src)
db.src = src;
db.features = cell2mat(cell);
for i = 1:numel(cell)
db.indices{i} = i;
end
end
|
github | SynCrystal/SynCrystal-master | cellfun_monitor.m | .m | SynCrystal-master/external/scatnet/compare/untility/cellfun_monitor.m | 926 | utf_8 | 55e4da313e14dc383e95f8f16cb344cc | % CELLFUN_MONITOR apply a function to each element of a cell array and monitor
% the estimated time left every second
%
% Usage
% cell_out = CELLFUN_MONITOR(fun, cell_in);
%
% Input
% fun (function_handle) : the function handle to be applied
% cell_in (cell) : the cell whose element will be applied fun to
%
% ... |
github | SynCrystal/SynCrystal-master | rsds_classif.m | .m | SynCrystal-master/external/scatnet/compare/untility/rsds_classif.m | 1,390 | utf_8 | f251eeabb5420272a2135d00a269ea9c | % rsds_classif : a function to reproduce classification experiments of paper
%
% ``Rotation, Scaling and Deformation Invariant Scattering
% for Texture Discrimination"
% Laurent Sifre, Stephane Mallat
% Proc. IEEE CVPR 2013 Portland, Oregon
%
function error = rsds_classif(db, db_name, feature_name, grid_train,... |
github | SynCrystal/SynCrystal-master | check_options_white_list.m | .m | SynCrystal-master/external/scatnet/scatnet/utils/check_options_white_list.m | 794 | utf_8 | 8a9a5b128254dc78332f85ad3e838df5 | % CHECK_OPTIONS_WHITE_LIST Check that all fields of a struct are valid
%
% Usage
% CHECK_OPTIONS_WHITE_LIST(options, white_list)
%
% Input
% options (struct): a structure with optional fields
% white_list (cell of string): containing the valid fields
%
% Ouput
% none
%
% Description
% Will crash with an ... |
github | SynCrystal/SynCrystal-master | sub_options.m | .m | SynCrystal-master/external/scatnet/scatnet/utils/sub_options.m | 700 | utf_8 | 62b5e164b4aa85e467c38ef68c864db9 | % SUB_OPTIONS Copy optional fields among a specified valid list
%
% Usage
% options2 = SUB_OPTIONS(options, field_list)
%
% Input
% options (struct): an input struct of field
% field_list (cell of string): the list of optional fields to copy
%
% Outpout
% options2 (struct): containing a copy of all field of o... |
github | SynCrystal/SynCrystal-master | imreadBW.m | .m | SynCrystal-master/external/scatnet/scatnet/utils/imreadBW.m | 469 | utf_8 | d3771e6ccfc10aed38a53e0c13fc50c8 | % function [f] = imreadBW (filename)
% This function reads any image, convert it in black and white and rescale
% it to range 0..1
function f = imreadBW (filename)
fcol= imread(filename);
%do it only if the image is in color
if numel(size(fcol))==3
fcold=double(fcol);
if (size(size(fcol),2)==3)
f=1/255*(0... |
github | SynCrystal/SynCrystal-master | fill_struct.m | .m | SynCrystal-master/external/scatnet/scatnet/utils/fill_struct.m | 797 | utf_8 | 5ac7c92aacc741e58e54014498ddba9b | % FILL_STRUCT Sets default values of a structure
%
% Usage
% s = FILL_STRUCT(s, field, value, ...)
%
% Input
% s (struct): Structure whose fields are to be set.
% field (char): The name of the field to set.
% value: The default value of the field.
%
% Output
% s (struct): The structure with the default v... |
github | SynCrystal/SynCrystal-master | func_output.m | .m | SynCrystal-master/external/scatnet/scatnet/utils/func_output.m | 843 | utf_8 | 94fe087d9f046dd522fd0f43e9f81177 | % FUNC_OUTPUT Extracts multiple outputs of a function
%
% Usage
% out = FUNC_OUTPUT(func, output_ind, ...)
%
% Input
% func (function handle): The function whose outputs are to be extracted.
% output_ind (int): The indices of the outputs.
%
% Output
% out: The desired output of func specified by output_ind.... |
github | SynCrystal/SynCrystal-master | rgb_fun.m | .m | SynCrystal-master/external/scatnet/scatnet/utils/rgb_fun.m | 404 | utf_8 | d52e9d6dc9576285a214c1c1814760b1 | %function feat = rgb_fun(filename, fun)
% apply function handler fun separately to all rgb channel of image located
% in filename
function feat = rgb_fun(filename, fun)
rgbx = imread(filename);
feat = [];
if (numel(size(rgbx)) == 3)
for c = 1:3
cx = single(squeeze(rgbx(:,:,c)));
feat = [feat, fun(cx)];
end... |
github | SynCrystal/SynCrystal-master | data_read.m | .m | SynCrystal-master/external/scatnet/scatnet/utils/data_read.m | 1,349 | utf_8 | 3ae1652f4c3512bd7054d6de9f9a08f6 | % DATA_READ Read data (audio, image) file
%
% Usage
% x = DATA_READ(filename, ...)
%
% Input
% filename (char): The file to read.
%
% Output
% x (numeric): The contents of the file. In the case of audio, this is a
% one-dimensional vector, while for images, it is a two-dimensional
% array.
%
% De... |
github | SynCrystal/SynCrystal-master | yuv_fun.m | .m | SynCrystal-master/external/scatnet/scatnet/utils/yuv_fun.m | 393 | utf_8 | 337e11a0baca2c6aca2c179c40105dc6 | %function feat = rgb_fun(filename, fun)
% apply function handler fun separately to all rgb channel of image located
% in filename
function feat = yuv_fun(filename, fun)
rgbx = imread(filename);
feat = [];
if (numel(size(rgbx)) ~= 3)
rgbx = repmat(rgbx,[1,1,3]);
end
yuvx = rgb2yuv(rgbx);
feat = [];
for c = 1:3
... |
github | SynCrystal/SynCrystal-master | upsample.m | .m | SynCrystal-master/external/scatnet/scatnet/utils/upsample.m | 627 | utf_8 | 76236130a4ff7ce61c66dc4f6f0a84cf | % UPSAMPLE Upsamples a signal using cubic spline interpolation
%
% Usage
% y = upsample(x, N)
%
% Input
% x (numeric): The signal to be upsampled.
% N (numeric): The number of points in the upsampled signal.
%
% Output
% y (numeric): The upsampled signal.
%
% Description
% The input signal x is interpola... |
github | SynCrystal/SynCrystal-master | sphere_read.m | .m | SynCrystal-master/external/scatnet/scatnet/utils/sphere_read.m | 2,885 | utf_8 | f0e867d0b90717029e0fe5da7ea9dade | % SPHERE_READ Read a NIST SPHERE audio file
%
% Usages
% [y, fs] = SPHERE_READ(filename, N)
%
% sz = SPHERE_READ(filename, 'size')
%
% Input
% filename (char): The name of the file to read.
% N (int, optional): The number of samples to read.
%
% Output
% y (numeric): The audio data in the file.
% fs (... |
github | SynCrystal/SynCrystal-master | orientation_avg_scat.m | .m | SynCrystal-master/external/scatnet/scatnet/scatutils/orientation_avg_scat.m | 2,113 | utf_8 | 13ab5a45bd1a5d3bb2a92472cd2e02ab | % ORIENTATION_AVG_SCAT Average 2d scattering along orientations
%
% Usage
% Sx_avg = orientation_avg_scat(Sx)
%
% Input
% Sx (cell): the output of 2d scattering
%
% Output
% Sx_avg (cell): the scattering averaged along its orientation parameter
%
% Description
% Order 1 coefficient are average along there uniqu... |
github | SynCrystal/SynCrystal-master | concatenate_freq.m | .m | SynCrystal-master/external/scatnet/scatnet/scatutils/concatenate_freq.m | 5,260 | utf_8 | 6682f5a32d005a0ecf5c883d72818872 | % CONCATENATE_FREQ Concatenates first frequencies into tables
%
% Usage
% Y = CONCATENATE_FREQ(X, fmt)
%
% Input
% X (struct or cell): The scattering layer to process, or a cell array of
% such scattering layers. Often S or U outputs of SCAT.
% fmt (char, optional): Either 'table' or 'cell'. Describes ho... |
github | SynCrystal/SynCrystal-master | scatfun_layer.m | .m | SynCrystal-master/external/scatnet/scatnet/scatutils/scatfun_layer.m | 283 | utf_8 | b5a9cb3ad774e5d315f509c45fea0c6d | % scatfun_layer : applies fun to all signal of a ScatNet layer
%
% Usage
% layer_out = scatfun_layer(fun, layer);
function layer_out = scatfun_layer(fun, layer)
layer_out = layer;
for p = 1:numel(layer.signal)
layer_out.signal{p} = fun(layer.signal{p});
end
end
|
github | SynCrystal/SynCrystal-master | aggregate_scat.m | .m | SynCrystal-master/external/scatnet/scatnet/scatutils/aggregate_scat.m | 1,810 | utf_8 | 0a83505d4722e34f26817d20c6286787 | % AGGREGATE_SCAT Aggregate successive frames of a scattering transform
%
% Usage
% S = AGGREGATE_SCAT(S, N)
%
% Input
% S: A scattering transform.
% N: The length of the window with which to aggregate.
%
% Output
% S: The scattering transform with successive frames within a window of
% length N aggreg... |
github | SynCrystal/SynCrystal-master | hanning_standalone.m | .m | SynCrystal-master/external/scatnet/scatnet/scatutils/hanning_standalone.m | 638 | utf_8 | 31e86db164e0c7539626918aaff90ded | % HANNING_STANDALONE Hanning window.
%
% Usage
% window = HANNING_STANDALONE(window_length)
%
% Input
% window_length (integer): length of the desired window.
%
% Output
% window (numeric): Hanning window vector
%
% Description
% This function generates a symmetric Hanning window of arbitrary
% length, n... |
github | SynCrystal/SynCrystal-master | scat_energy.m | .m | SynCrystal-master/external/scatnet/scatnet/scatutils/scat_energy.m | 901 | utf_8 | d7c7b6d8c21553722389cf41d2150ff5 | % SCAT_ENERGY Calculate scattering energy
%
% Usage
% energy = scat_energy(S, U)
%
% Input
% S (cell): The scattering transform.
% U (cell): The wavelet modulus coefficients (optional).
%
% Output
% energy (numeric): The energy of the scattering transform (the sum of the
% squares of the coefficients... |
github | SynCrystal/SynCrystal-master | renorm_scat.m | .m | SynCrystal-master/external/scatnet/scatnet/scatutils/renorm_scat.m | 944 | utf_8 | a10ce64595dae9be139acb5138ef59b0 | % RENORM_SCAT Renormalize a scattering coefficients by their parents
%
% Usage
% S = renorm_scat(S)
%
% Input
% S: A scattering transform.
%
% Output
% S: The scattering transform with second- and higher-order coefficients
% divided by their parent coefficients.
function X = renorm_scat(X, epsilon, min_... |
github | SynCrystal/SynCrystal-master | mean_renorm_scat.m | .m | SynCrystal-master/external/scatnet/scatnet/scatutils/mean_renorm_scat.m | 1,275 | utf_8 | d4a1652674b31db981cab3f447d15007 | % mean_renorm_scat: Renormalize scattering coefficients by the mean over
% coefficients with the same parent.
% Usage
% S = mean_renorm_scat(S)
% Input
% S: A scattering transform.
% Output
% S: The renormalized scattering transform.
function X = mean_renorm_scat(X,p)
if nargin < 2
p = 1;
end
for m ... |
github | SynCrystal/SynCrystal-master | renorm_wavelet_layer_factory_1d.m | .m | SynCrystal-master/external/scatnet/scatnet/scatutils/renorm_wavelet_layer_factory_1d.m | 931 | utf_8 | 642ef432d9c0f4736f45b355715aa7d0 | % wavelet_factory_1d: Create wavelet cascade from filters
% Usage
% [Wop, filters] = wavelet_factory_1d(N, filter_options, scat_options)
% Input
% N: The size of the signals to be transformed.
% filter_options: The filter options, same as for filter_bank.
% scat_options: General options to be passed to wave... |
github | SynCrystal/SynCrystal-master | map_meta.m | .m | SynCrystal-master/external/scatnet/scatnet/scatutils/map_meta.m | 1,375 | utf_8 | 27fe2061c686a829fa6521216791015b | % MAP_META Copy meta fields
%
% Usage
% to_meta = MAP_META(from_meta, from_ind, to_meta, to_ind, except)
%
% Input
% from_meta (struct): The meta structure to copy from.
% from_ind (int): The range of columns to copy from.
% to_meta (struct): The meta struture to copy to.
% to_ind (int): The range of col... |
github | SynCrystal/SynCrystal-master | log_scat.m | .m | SynCrystal-master/external/scatnet/scatnet/scatutils/log_scat.m | 1,351 | utf_8 | c71de1fa81e955ef25fe43338edd0978 | % LOG_SCAT Calculate the logarithm of a scattering transform.
%
% Usages
% S = LOG_SCAT(S)
%
% S = LOG_SCAT(S, epsilon)
%
% Input
% S (cell): A scattering transform.
% epsilon (real): An small constant added to each component of S in
% order to reduce contribution of noise (default 2^-20).
%
% Output
% ... |
github | SynCrystal/SynCrystal-master | average_scat.m | .m | SynCrystal-master/external/scatnet/scatnet/scatutils/average_scat.m | 2,088 | utf_8 | 2508620ce6a31c3344d4b24e5aa575fe | % AVERAGE_SCAT Average successive frames of a scattering transform
%
% Usage
% S = AVERAGE_SCAT(S, T, step, window_fun)
%
% Input
% S (cell): A scattering transform.
% T (int): The length of the window with which to average.
% step (int, optional): The stepping of the successive windows (default
% T... |
github | SynCrystal/SynCrystal-master | renorm_parent_3d.m | .m | SynCrystal-master/external/scatnet/scatnet/scatutils/renorm_parent_3d.m | 807 | utf_8 | 35278ce79b237997948600cc9d3c580b | % RENORM_PARENT_3D Renormalization for roto-translation scattering
%
% Usage
% Sx_rn = renorm_parent_3d(Sx)
%
% Input
% Sx (cell): output of roto-translation scattering
%
% Output
% Sx_rn (cell): the renormalized roto-translation scattering
%
% Description
% This function will renormalize every 2nd order node b... |
github | SynCrystal/SynCrystal-master | format_scat.m | .m | SynCrystal-master/external/scatnet/scatnet/scatutils/format_scat.m | 2,864 | utf_8 | 39f12f72ffb40603c18e0747fe178ad4 | % FORMAT_SCAT Formats a scattering representation
%
% Usages
% [out,meta] = FORMAT_SCAT(S)
%
% [out, meta] = FORMAT_SCAT(S, fmt)
%
% Input
% S (cell): The scattering representation to be formatted.
% fmt (string): The desired format. Can be either 'raw',
% 'order_table' or 'table' (default 'table').
%
... |
github | SynCrystal/SynCrystal-master | renorm_parent_2d.m | .m | SynCrystal-master/external/scatnet/scatnet/scatutils/renorm_parent_2d.m | 849 | utf_8 | 1cde7f38fae6ef282c204fa78701785f | % RENORM_PARENT_2D Renormalization for 2d scattering
%
% Usage
% Sx_rn = renorm_parent_2d(Sx)
%
% Input
% Sx (cell): output of 2d scattering
%
% Output
% Sx_rn (cell): the renormalized 2d scattering
%
% Description
% This function will renormalize every 2nd order node by its parent
% (hence his name renorm_... |
github | SynCrystal/SynCrystal-master | flatten_scat.m | .m | SynCrystal-master/external/scatnet/scatnet/scatutils/flatten_scat.m | 1,511 | utf_8 | 02b6e9178cec98d0fac7e1c7d24fe34c | % FLATTEN_SCAT Put scattering coefficients of all layers together
%
% Usage
% S = flatten_scat(S)
%
% Input
% S (cell): A scattering representation.
%
% Output
% S (cell): The same scattering representation, but flattened into one layer. As
% a result, meta fields from different orders are concatenated.
... |
github | SynCrystal/SynCrystal-master | renorm_low_pass_layer_1d.m | .m | SynCrystal-master/external/scatnet/scatnet/scatutils/renorm_low_pass_layer_1d.m | 389 | utf_8 | 77a298a0702801d9bac55727de26a97a |
function [A,Utilde] = renorm_low_pass_layer_1d(A, U, epsilon)
if nargin < 3
epsilon = 1e-6; % ~1e-6
end
Utilde = U;
for p = 1:length(U.signal)
sub_multiplier = 2^(U.meta.resolution(p)/2);
denom = interpft(A.signal{p},size(U.signal{p},1));
Utilde.signal{p... |
github | SynCrystal/SynCrystal-master | remove_margin.m | .m | SynCrystal-master/external/scatnet/scatnet/scatutils/remove_margin.m | 780 | utf_8 | 88f985c46e44940cf6ba70d81072b2dc | % remove_margin : remove margins along specified dimensions
%
% Input
% - x (numeric) : the array (up to 3d) for which to remove the margin
% - margins (margins) : the margins
%
% Output
% - x2 (numeric) : the array with removed margin
%
% Usage
% x2 = remove_margin(x, [0,0,1,1,1,1])
% will remove 1 e... |
github | SynCrystal/SynCrystal-master | scatfun.m | .m | SynCrystal-master/external/scatnet/scatnet/scatutils/scatfun.m | 213 | utf_8 | 59e39f8936754fccacb77770d1fa48ac | % scatfun: applies fun to all signal of a scattering
%
% Usage
% Sx_out = scatfun(fun, Sx);
function Sx_out = scatfun(fun, Sx)
for m = 1:numel(Sx)
Sx_out{m} = scatfun_layer(fun, Sx{m});
end
end
|
github | SynCrystal/SynCrystal-master | pad_signal.m | .m | SynCrystal-master/external/scatnet/scatnet/convolution/pad_signal.m | 3,439 | utf_8 | fa0ea782a05bb6d20bc9b5932e3383f5 | % PAD_SIGNAL Pad a signal
%
% Usage
% y = PAD_SIGNAL(x, Npad, boundary, center)
%
% Input
% x (numeric): The signal to be padded.
% Npad (numeric): The desired size of the padded output.
% boundary (string): The boundary condition of the signal, one of:
% 'symm': Symmetric boundary condition with hal... |
github | SynCrystal/SynCrystal-master | unpad_signal.m | .m | SynCrystal-master/external/scatnet/scatnet/convolution/unpad_signal.m | 2,018 | utf_8 | 9222a11a3db0e49b523c88221257cbdc | % UNPAD_SIGNAL Remove de padding from PAD_SIGNAL
%
% Usage
% x = UNPAD_SIGNAL(y, resolution, target_sz, center)
%
% Input
% y (numeric): The signal to be unpadded.
% resolution (int): The resolution of the signal (as a power of 2), with
% respect to the original, unpadded version.
% target_sz (numeri... |
github | SynCrystal/SynCrystal-master | conv_sub_2d.m | .m | SynCrystal-master/external/scatnet/scatnet/convolution/conv_sub_2d.m | 2,293 | utf_8 | 6aea3591de96780fd4770d7f2654a785 | % CONV_SUB_2D Two dimension convolution and downsampling
%
% Usage
% y_ds = conv_sub_2d(in, filter, ds, offset)
%
% Input
% in (numeric) : ! WARNING ! varies depending on the filter type used :
% for 'fourier_multires', in = 2d fourier transform of input signal
% for 'spatial_support', in = original i... |
github | SynCrystal/SynCrystal-master | conv_sub_1d.m | .m | SynCrystal-master/external/scatnet/scatnet/convolution/conv_sub_1d.m | 4,390 | utf_8 | 3fca26a3128ca5993b945df8f508a26c | % CONV_SUB_1D One-dimensional convolution and downsampling.
%
% Usage
% y_ds = CONV_SUB_1D(xf, filter, ds)
%
% Input
% xf (numeric): The Fourier transform of the signal to be convolved.
% filter (*numeric OR struct*): The analysis filter in the frequency
% domain. Either Fourier transform of the filter o... |
github | SynCrystal/SynCrystal-master | extract_block.m | .m | SynCrystal-master/external/scatnet/scatnet/convolution/extract_block.m | 1,390 | utf_8 | be3a9c30057d67f690dd5bd8e06284e5 | % EXTRACT_BLOCK extract sub block of a 2d matrix
%
% Usage
% x_block = EXTRACT_BLOCK(x, nb_block)
%
% Input
% x (numeric): the 2d input matrix
% nb_block (2x1 int): the vertical and horizontal number of block
%
% Output
% x_block (numeric): a 3d block matrix whos third dimension corresponds
% to block in... |
github | SynCrystal/SynCrystal-master | pad_size.m | .m | SynCrystal-master/external/scatnet/scatnet/convolution/pad_size.m | 1,023 | utf_8 | ba6f36fa3f36d46b4feddf9178cbce1f | % PAD_SIZE Compute the optimal size for padding
%
% Usage
% sz_padded = PAD_SIZE(sz, min_margin, max_ds)
%
% Input
% sz (int): The size of the original signal.
% min_margin (int): The minimum margin for padding.
% max_ds (int): The maximum downsampling factor.
%
% Output
% sz_padded (int): The minimum size of... |
github | SynCrystal/SynCrystal-master | srcfun.m | .m | SynCrystal-master/external/scatnet/scatnet/papers/RSDS/srcfun.m | 595 | utf_8 | f928b61828148bd40c7c273af2b46415 | % SRCFUN Apply function to each filenames of a ScatNet-compatible src
%
% Usage
% cell_out = SRCFUN(fun, src);
function cell_out = srcfun(fun, src)
time_start = clock;
for k = 1:length(src.files)
db.indices{k} = k;
filename = src.files{k};
cell_out{k} = fun(filename);
tm0 = tic;
time_elapsed = etime(clo... |
github | SynCrystal/SynCrystal-master | uiuc_src.m | .m | SynCrystal-master/external/scatnet/scatnet/papers/RSDS/uiuc_src.m | 694 | utf_8 | 2466f6d9ee67383171d19520031abcaa | % UIUC_SRC Creates a source for the UIUC Texture dataset
%
% Usage
% src = UIUC_SRC(directory)
%
% Input
% directory: The directory containing the UIUC Texture dataset.
%
% Output
% src: The UIUC source.
%
% Note
% The dataset is available at http://www-cvr.ai.uiuc.edu/ponce_grp/data/
function src = uiuc_src... |
github | SynCrystal/SynCrystal-master | kthtips_src.m | .m | SynCrystal-master/external/scatnet/scatnet/papers/RSDS/kthtips_src.m | 770 | utf_8 | cee2a25acddf376aa655fdffd6bcde9a | % KTHTIPS_SRC Creates a source for the KTH TIPS Texture dataset
%
% Usage
% src = KTHTIPS_SRC(directory)
%
% Input
% directory: The directory containing the KTH TIPS Texture dataset.
%
% Output
% src: The KTH TIPS source.
%
% Note
% The dataset is available at http://www.nada.kth.se/cvap/databases/kth-tips/
f... |
github | SynCrystal/SynCrystal-master | umd_src.m | .m | SynCrystal-master/external/scatnet/scatnet/papers/RSDS/umd_src.m | 580 | utf_8 | 4d20098a26826519d6baa7ac5130faae | % UMD_SRC Creates a source for the UMD Texture dataset
%
% Usage
% src = UMD_SRC(directory)
%
% Input
% directory: The directory containing the UMD Texture dataset.
%
% Output
% src: The UMD source.
%
function src = umd_src(directory)
if (nargin<1)
directory = './data/UMD/';
end
src = create_src(directo... |
github | SynCrystal/SynCrystal-master | rsds_classif2.m | .m | SynCrystal-master/external/scatnet/scatnet/papers/RSDS/rsds_classif2.m | 1,311 | utf_8 | 2c9ef8b93cc427c8eedd8c4ff245fb2d | % rsds_classif : a function to reproduce classification experiments of paper
%
% ``Rotation, Scaling and Deformation Invariant Scattering
% for Texture Discrimination"
% Laurent Sifre, Stephane Mallat
% Proc. IEEE CVPR 2013 Portland, Oregon
%
function error = rsds_classif2(db, db_name, feature_name, grid_train... |
github | SynCrystal/SynCrystal-master | cellsrc2db.m | .m | SynCrystal-master/external/scatnet/scatnet/papers/RSDS/cellsrc2db.m | 302 | utf_8 | a624426e71165bb63a4869b912b93ae7 | % CELLSRC2DB Constitute a database compatible with the ScatNet
% convention with a cell of one object per image and a src
%
% Usage
% db = cellsrc2db(cell, src);
function db = cellsrc2db(cell, src)
db.src = src;
db.features = cell2mat(cell);
for i = 1:numel(cell)
db.indices{i} = i;
end
end
|
github | SynCrystal/SynCrystal-master | cellfun_monitor.m | .m | SynCrystal-master/external/scatnet/scatnet/papers/RSDS/cellfun_monitor.m | 926 | utf_8 | 55e4da313e14dc383e95f8f16cb344cc | % CELLFUN_MONITOR apply a function to each element of a cell array and monitor
% the estimated time left every second
%
% Usage
% cell_out = CELLFUN_MONITOR(fun, cell_in);
%
% Input
% fun (function_handle) : the function handle to be applied
% cell_in (cell) : the cell whose element will be applied fun to
%
% ... |
github | SynCrystal/SynCrystal-master | rsds_classif.m | .m | SynCrystal-master/external/scatnet/scatnet/papers/RSDS/rsds_classif.m | 1,390 | utf_8 | f251eeabb5420272a2135d00a269ea9c | % rsds_classif : a function to reproduce classification experiments of paper
%
% ``Rotation, Scaling and Deformation Invariant Scattering
% for Texture Discrimination"
% Laurent Sifre, Stephane Mallat
% Proc. IEEE CVPR 2013 Portland, Oregon
%
function error = rsds_classif(db, db_name, feature_name, grid_train,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.