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 | YANG-H/MATLABTools-master | convexpair2partialcuboidhyp.m | .m | MATLABTools-master/OrientationMaps/genobjhyp/convexpair2partialcuboidhyp.m | 9,890 | utf_8 | c0291d1664e5c0b535820bd0c1e43977 | function partcubhyp = convexpair2partialcuboidhyp(convexpair, boundingquad)
[r c v] = find(convexpair);
partcubhyp = [];
for i = 1:length(r)
bq1 = boundingquad(r(i));
bq2 = boundingquad(c(i));
conftype = v(i);
partcubhyp = [partcubhyp ...
convexpair2partialcuboidhyp_single(bq1, bq2, conftype)]... |
github | YANG-H/MATLABTools-master | building_cuboid_compat.m | .m | MATLABTools-master/OrientationMaps/evalhyp/building_cuboid_compat.m | 4,160 | utf_8 | 7d7211fee186d3b4cfb1b90b8f062a56 | function compat = building_cuboid_compat(buildinghyp, cuboidhyp, imgsize, vp, OMAP_FACTOR)
% buildinghyp: length==1 must be 1
% cuboidhyp: length>=1 can be many
num_cuboid = length(cuboidhyp);
num_building = length(buildinghyp);
compat = false(num_building, num_cuboid);
imgpoly = [1 1; imgsize(2) 1; imgsize(2) imgsi... |
github | YANG-H/MATLABTools-master | get_labelimg_frombox.m | .m | MATLABTools-master/OrientationMaps/evalhyp/get_labelimg_frombox.m | 4,992 | utf_8 | 335628aeb43b791cf62a3412398cf8b1 | function [orientlabel_img regionlabel_img] = get_labelimg_frombox(box, imgsize, vp, OMAP_FACTOR)
% orientlabel_img:
% 1 for floor and ceiling
% 2 for walls facing left/right
% 3 for walls facing front/back
%
% regionlabel_img:
% 1~length(box) for walls
% length(box)+1 for floor
% length(box)+2 for ceiling
%% resize wi... |
github | YANG-H/MATLABTools-master | cuboid_cuboid_compat.m | .m | MATLABTools-master/OrientationMaps/evalhyp/cuboid_cuboid_compat.m | 2,550 | utf_8 | e82d4363614d1a9a6d03559889e3caa5 | function [cubcompat closercub] = cuboid_cuboid_compat(cuboidhyp, imgsize, OMAP_FACTOR, vp)
% buildinghyp: length==1 must be 1
% cuboidhyp: length>=1 can be many
% cubcompat: cubcompat(i,j)==1 if cube i and j do not occupy same 3D space
% closercub: closercub(i,j)==1 if cube i is closer in 3D than cube j
num_cuboid = l... |
github | YANG-H/MATLABTools-master | orient_from_lines.m | .m | MATLABTools-master/OrientationMaps/orientmap/private/orient_from_lines.m | 4,144 | utf_8 | eb94d2696e114f5774488ea33d4752e2 | function [lineextimg c] = orient_from_lines(lines, vp, imgwidth, imgheight)
%%
ls = sample_line(lines);
linesamples = cat(1,ls(:).sample);
linesampleclass = cat(1,ls(:).lineclass);
%%
% lineextimg = cell(3,3);
% for i=1:9, lineextimg{i} = zeros(imgheight,imgwidth); end
lineextimg = cell(3,3,2);
for i=1:18, lineextim... |
github | YANG-H/MATLABTools-master | disp_cubes.m | .m | MATLABTools-master/OrientationMaps/display/disp_cubes.m | 1,456 | utf_8 | 57a75c0cbabd0ce609e8978ee4701e0e | function h = disp_cubes(cubes, img, mode)
% cubes = drop_thin_cuboids(cubes, vp);
if nargin<3
mode = 1;
end
if ~isempty(img)
figure; imshow(img); hold on;
end
h = [];
for i = 1:length(cubes)
h = [h disp_cube_2(cubes(i))];
if mode==3
pause; delete(h); h = [];
elseif mode==2
pause(... |
github | YANG-H/MATLABTools-master | vanish_from_minevidence.m | .m | MATLABTools-master/OrientationMaps/vanishingpoint/vanish_from_minevidence.m | 4,695 | utf_8 | 77ac18ddbcbdcfbe48e16bf7f59ace7f | function [vp f] = vanish_from_minevidence(lines, imgsize)
%
% find three orthogonal vanishing points by
% 1. findinhg vertical vp.
% 2. selecting one additional line.
% 3. pick the best f for the current triplet of vanishing points.
% 4. go to 2 and pick the best additional line.
%%
THRES_THETA = 10;
THRES_THETA_GUES... |
github | YANG-H/MATLABTools-master | extline.m | .m | MATLABTools-master/OrientationMaps/vanishingpoint/extline.m | 1,769 | utf_8 | 63c91611d1e20d6c9d2d597613c90a9c | function [p1ext p2ext degen] = extline(p1, p2, imgwidth, imgheight)
% p1: [x y]
% p2: [x y]
dir = p2 - p1;
% intersection with top
% p1(1) + alpha*dir(2) = 1
% int1 = p1 + alpha*dir
alpha = (1 - p1(2)) / dir(2);
intp{1} = p1 + alpha*dir;
intp{1}(2) = 1; % numerical precision issues....
intp{1} = intp{1}(:)'; % [2x1]
... |
github | YANG-H/MATLABTools-master | line_belongto_vp.m | .m | MATLABTools-master/OrientationMaps/vanishingpoint/private/line_belongto_vp.m | 689 | utf_8 | 0934f91cf60ea6f8aab23f45eeb5071f | function [lineclass angle] = line_belongto_vp(lines, vp, THRES_THETA)
% find lines that belong to the vanishing point
angle = zeros(1, length(lines));
for k = 1:length(lines)
angle(k) = anglebetween(lines(k),vp);
end
lineclass = angle < THRES_THETA;
%%
function theta = anglebetween(line, targetpoint)
% get angle... |
github | YANG-H/MATLABTools-master | mergeseg.m | .m | MATLABTools-master/OrientationMaps/lineseg/pkline/mergeseg.m | 5,736 | utf_8 | 928a1000e78c46c7a477b024c8934f85 | % MERGESEG - Line segment merging function.
%
% Usage: newseglist = mergeseg(seglist, angtol, linkrad)
%
% Arguments: seglist - an Nx4 array storing line segments in the form
% [x1 y1 x2 y2
% x1 y1 x2 y2
% . . . ] etc
%
% angtol - An... |
github | YANG-H/MATLABTools-master | maxlinedev.m | .m | MATLABTools-master/OrientationMaps/lineseg/pkline/maxlinedev.m | 2,315 | utf_8 | 4f16ae544e1bdc2cd9b02399857c0f14 | % MAXLINEDEV - Find max deviation from a line in an edge contour.
%
% Function finds the point of maximum deviation from a line joining the
% endpoints of an edge contour.
%
% Usage: [maxdev, index, D, totaldev] = maxlinedev(x,y)
%
% Arguments:
% x, y - arrays of x,y (col,row) indicies of connected pixels... |
github | YANG-H/MATLABTools-master | lineseg.m | .m | MATLABTools-master/OrientationMaps/lineseg/pkline/lineseg.m | 4,516 | utf_8 | 9903c89ebc5dfe37755af55e790f673e | % LINESEG - Form straight line segements from an edge list.
%
% Usage: [seglist, nedgelist] = lineseg(edgelist, tol, angtol, linkrad)
%
% Arguments: edgelist - Cell array of edgelists (row col) coords.
% tol - Maximum deviation from straight line before a
% segment is broken in ... |
github | YANG-H/MATLABTools-master | edgelink.m | .m | MATLABTools-master/OrientationMaps/lineseg/pkline/edgelink.m | 8,113 | utf_8 | 0b50dedfb975521f23318b4a236d113d | % EDGELINK - Link edge points in an image into lists
%
% Usage: [edgelist edgeim] = edgelink(im, minlength, location)
%
% Arguments: im - Binary edge image, it is assumed that edges
% have been thinned.
% minlength - Minimum edge length of interest
% location ... |
github | YANG-H/MATLABTools-master | msTest.m | .m | MATLABTools-master/GeometricContext/msTest.m | 2,806 | utf_8 | c787a1ceaab79287f3967cba5ecc3808 | function pg = msTest(imsegs, data, maps, labelclassifier, segclassifier, normalize)
% [vacc, hacc, vcm, hcm] = testMultipleSegmentationsCV2(imsegs, labdata, segdata, maps, vclassifier, hclassifier, sclassifier, ncv)
if ~exist('normalize', 'var') || isempty(normalize)
normalize = 1;
end
pg = cell(numel(imsegs),... |
github | YANG-H/MATLABTools-master | train_boosted_kde_2c.m | .m | MATLABTools-master/GeometricContext/boosting/train_boosted_kde_2c.m | 4,111 | utf_8 | c1985d62fd7ff3b62fc945d7e2c82fd4 | function density = train_boosted_kde_2c(data, labels, ranges, num_iter)
% Try to learn ln(P(x1, x2 | +)/P(x1, x2 | -), where + indicates that a pair of points,
% x, are in the same cluster and - indicates that the pair are in different
% clusters. Use boosting to estimate the parameters of the density in a
% naive str... |
github | YANG-H/MATLABTools-master | labelImageGeometry.m | .m | MATLABTools-master/GeometricContext/tools/misc/labelImageGeometry.m | 3,385 | utf_8 | 695427a5efea405f52a7273067f808ff | function imsegs = labelImageGeometry(im, imsegs)
% Label the superpixels of the image
segimage = double(imsegs.segimage);
nc = 7;
if max(size(segimage)>600)
rs = 600/max(size(segimage));
segimage = imresize(segimage, rs, 'nearest');
im = imresize(im, rs, 'nearest');
end
try
labels = imsegs.labels;
ca... |
github | YANG-H/MATLABTools-master | piecewise_linear_spline2.m | .m | MATLABTools-master/GeometricContext/tools/misc/piecewise_linear_spline2.m | 6,634 | utf_8 | 791866496cbe380e84a0664bfd3f4463 | function p = piecewise_linear_spline2(x, y, max_seg)
% performs piecewise linear spline for 2-d points x(1:npts) and
% y(1:ntps) when the number of segments is not known
% p - rows are parameters for each line:
% y = p(1)*x + p(2) for points with indices p(3) to p(4)
[x, ind] = sort(x);
y = y(ind);
npts = le... |
github | YANG-H/MATLABTools-master | piecewise_linear_spline.m | .m | MATLABTools-master/GeometricContext/tools/misc/piecewise_linear_spline.m | 3,335 | utf_8 | 89b142a28bec7c0b4e97ee031db8caf8 | function p = piecewise_linear_spline(x, y, max_seg)
% performs piecewise linear spline for 2-d points x(1:npts) and
% y(1:ntps) when the number of segments is not known
% p - rows are parameters for each line:
% y = p(1)*x + p(2) for points with indices p(3) to p(4)
[x, ind] = sort(x);
y = y(ind);
npts = len... |
github | YANG-H/MATLABTools-master | treetestw.m | .m | MATLABTools-master/GeometricContext/tools/weightedstats/treetestw.m | 11,926 | utf_8 | c962b14259cd0f2d21f8e3d0aa25e757 | function [cost,secost,ntnodes,bestlevel] = treetestw(Tree,TorCorR,X,Y,w,varargin)
%TREETEST Compute error rate for tree.
% COST = TREETEST(T,'resubstitution') computes the cost of the tree T
% using a resubstitution method. T is a decision tree as created by
% the TREEFIT function. The cost of the tree is the s... |
github | YANG-H/MATLABTools-master | ksdensityw.m | .m | MATLABTools-master/GeometricContext/tools/weightedstats/ksdensityw.m | 5,397 | utf_8 | 140dd42a35ba132a8c87760ccd7fb3a1 | function [f,x,u]=ksdensityw(y,w,varargin)
%KSDENSITY Compute density estimate
% [F,XI]=KSDENSITY(X) computes a probability density estimate of the sample
% in the vector X. F is the vector of density values evaluated at the
% points in XI. The estimate is based on a normal kernel function, using a
% window pa... |
github | YANG-H/MATLABTools-master | treefitw.m | .m | MATLABTools-master/GeometricContext/tools/weightedstats/treefitw.m | 18,499 | utf_8 | 8ab0ad0bf625371182e677ef0efdcf75 | function Tree=treefitw(X,y,w, equivsample, varargin)
%TREEFIT Fit a tree-based model for classification or regression.
% T = TREEFIT(X,Y) creates a decision tree T for predicting response Y
% as a function of predictors X. X is an N-by-M matrix of predictor
% values. Y is either a vector of N response values (f... |
github | YANG-H/MATLABTools-master | statsfminbx.m | .m | MATLABTools-master/GeometricContext/tools/weightedstats/private/statsfminbx.m | 36,458 | utf_8 | c578fea573fd473845905084832b4e7d | function[x,FVAL,LAMBDA,EXITFLAG,OUTPUT,GRAD,HESSIAN]=statsfminbx(funfcn,x,l,u,verb,options,defaultopt,...
computeLambda,initialf,initialGRAD,initialHESS,Hstr,varargin)
%SFMINBX Nonlinear minimization with box constraints.
%
% Locate a local minimizer to
%
% min { f(x) : l <= x <= u}.
%
% where f(x) ma... |
github | YANG-H/MATLABTools-master | addlogi.m | .m | MATLABTools-master/GeometricContext/tools/weightedstats/private/addlogi.m | 12,286 | utf_8 | d45455f1c05b3a9d6ac3ebdeb50c53a7 | function s = addlogi(s)
%ADDLOGI Add the logistic adistributions.
% Copyright 1993-2004 The MathWorks, Inc.
% $Revision: 1.1.6.9 $ $Date: 2004/01/24 09:35:06 $
j = length(s) + 1;
s(j).name = 'Logistic';
s(j).code = 'logistic';
s(j).pnames = {'mu' 'sigma'};
s(j).pdescription = {'location' 'scale'};
s(j).prequired... |
github | YANG-H/MATLABTools-master | addinvg.m | .m | MATLABTools-master/GeometricContext/tools/weightedstats/private/addinvg.m | 8,904 | utf_8 | c8e9fd070db8af95f85df6b2480b8e41 | function s = addinvg(s)
%ADDINVG Add the inverse Gaussian distribution.
% Copyright 1993-2004 The MathWorks, Inc.
% $Revision: 1.1.6.10 $ $Date: 2004/04/15 01:01:53 $
j = length(s) + 1;
s(j).name = 'Inverse Gaussian';
s(j).code = 'inversegaussian';
s(j).pnames = {'mu' 'lambda'};
s(j).pdescription = {'scale' 'sha... |
github | YANG-H/MATLABTools-master | dfgetdistributions.m | .m | MATLABTools-master/GeometricContext/tools/weightedstats/private/dfgetdistributions.m | 8,975 | utf_8 | 9f973c5bf13c0f1adf0bcae341aa566d | function [s,errid] = dfgetdistributions(distname,douser)
%DFGETDISTRIBUTIONS Get structure defining the distributions supported by dfittool
% $Revision: 1.1.6.8 $ $Date: 2004/01/24 09:35:36 $
% Copyright 2003-2004 The MathWorks, Inc.
errid = '';
% If a struct was passed in, store this for later use
if nargin>0 ... |
github | YANG-H/MATLABTools-master | dfsetdistributions.m | .m | MATLABTools-master/GeometricContext/tools/weightedstats/private/dfsetdistributions.m | 1,527 | utf_8 | 026a62bf16dfb7ef14dddb1d4b77dfa6 | function dfsetdistributions(dft,dists)
%DFSETDISTRIBUTIONS Set distribution information into the gui
% $Revision: 1.1.6.5 $ $Date: 2004/01/24 09:35:49 $
% Copyright 2003-2004 The MathWorks, Inc.
% Store for later use in M
dfgetset('alldistributions',dists);
% Set into the gui, placing nonparametric fit into sor... |
github | YANG-H/MATLABTools-master | dfsession.m | .m | MATLABTools-master/GeometricContext/tools/weightedstats/private/dfsession.m | 7,927 | utf_8 | 54fed362ef7733cf4ac0c3dd5777b386 | function ok=dfsession(action,fn)
%DFSESSION Clear, load, or save a Distribution Fitting session
% $Revision: 1.1.6.7 $ $Date: 2004/02/01 22:10:39 $
% Copyright 2003-2004 The MathWorks, Inc.
% Create a structure with version information
str.ftype = 'Distribution Fitting session'; % type of file
str.version = 1;... |
github | YANG-H/MATLABTools-master | export2wsdlg.m | .m | MATLABTools-master/GeometricContext/tools/weightedstats/private/export2wsdlg.m | 16,896 | utf_8 | 69eb6d711e16f71042d21882e0a10159 | function hDialog=export2wsdlg(checkboxLabels, defaultVariableNames, itemsToExport, varargin)
%EXPORT2WSDLG Exports variables to the workspace.
% EXPORT2WSDLG(CHECKBOXLABELS, DEFAULTVARIABLENAMES, ITEMSTOEXPORT) creates
% a dialog with a series of checkboxes and edit fields. CHECKBOXLABELS is a
% cell array of l... |
github | YANG-H/MATLABTools-master | statrobustfit.m | .m | MATLABTools-master/GeometricContext/tools/weightedstats/private/statrobustfit.m | 4,008 | utf_8 | 83f9e0c6d9b47e1a6aa48b7eeb8c4243 | function [b,stats] = statrobustfit(X,y,wfun,tune,wasnan,addconst)
%STATROBUSTFIT Calculation function for ROBUSTFIT
% Tom Lane 2-11-2000
% Copyright 1993-2002 The MathWorks, Inc.
% $Revision: 1.4 $ $Date: 2002/02/04 19:25:48 $
% Must check for valid function in this scope
c = class(wfun);
fnclass = class(@bisquare)... |
github | YANG-H/MATLABTools-master | dfgetuserdists.m | .m | MATLABTools-master/GeometricContext/tools/weightedstats/private/dfgetuserdists.m | 9,743 | utf_8 | f3e2ede226f6c60ee9d442835e6b45f5 | function [news,errid,errmsg,newrows]=dfgetuserdists(olds,userfun)
%GETUSERDISTS Get user-defined distributions for dfittool
% [NEWS,ERRID,ERRMSG,NEWROWS]=GETUSERDISTS(OLDS) appends user-defined
% distribution information to the existing distribution information
% in the structure OLDS and returns the combined inf... |
github | YANG-H/MATLABTools-master | dfaddparamfit.m | .m | MATLABTools-master/GeometricContext/tools/weightedstats/private/dfaddparamfit.m | 7,849 | utf_8 | 6b6e3650c370d58307f1776bed38372a | function hFit = dfaddparamfit(hFit, fitname, distname, dsname, fitframe, exclname, useestimated, fixedvals)
%DFADDPARAMFIT Add parametric fit in dfittool
% $Revision: 1.1.6.10 $ $Date: 2004/01/24 09:35:10 $
% Copyright 2003-2004 The MathWorks, Inc.
badfit = false; % badfit=true means fit failed or not attempt... |
github | YANG-H/MATLABTools-master | dfdocontext.m | .m | MATLABTools-master/GeometricContext/tools/weightedstats/private/dfdocontext.m | 7,544 | utf_8 | a29a9a8c6c98be459fb394071737bacd | function dfdocontext(varargin)
%DFDOCONTEXT Perform context menu actions for distribution fitting tool
% Copyright 2001-2004 The MathWorks, Inc.
% $Revision: 1.1.6.7 $ $Date: 2004/03/09 16:17:04 $
import com.mathworks.toolbox.stats.*;
% Special action to create context menus
if isequal(varargin{1},'create')
make... |
github | YANG-H/MATLABTools-master | dfupdateylim.m | .m | MATLABTools-master/GeometricContext/tools/weightedstats/private/dfupdateylim.m | 2,235 | utf_8 | f5761237221224280dc7e15ca23c0c11 | function dfupdateylim
%DFUPDATEYLIM Update the y axis min/max values
% $Revision: 1.1.6.4 $ $Date: 2004/01/24 09:36:04 $
% Copyright 2003-2004 The MathWorks, Inc.
dminmax = []; % to indicate y data limits
% Check y limits of all fits
fminmax = [];
fitdb = getfitdb;
ft = down(fitdb);
while(~is... |
github | YANG-H/MATLABTools-master | dfupdateallplots.m | .m | MATLABTools-master/GeometricContext/tools/weightedstats/private/dfupdateallplots.m | 1,446 | utf_8 | 68ae20d6b67e69513639acd1ec70ef14 | function dfupdateallplots(dods,dofit,force)
%DFUPDATEALLPLOTS Call update methods for all data sets and fits
% $Revision: 1.1.6.5 $ $Date: 2004/01/24 09:35:59 $
% Copyright 2003-2004 The MathWorks, Inc.
le = lasterr;
msg = '';
if nargin<3
force = false;
end
% Supply defaults if missing or if called as a list... |
github | YANG-H/MATLABTools-master | stdrinv.m | .m | MATLABTools-master/GeometricContext/tools/weightedstats/private/stdrinv.m | 2,425 | utf_8 | 59403e15503f9afe88589435d94f796d | function x = stdrinv(p, v, r)
%STDRINV Compute inverse c.d.f. for Studentized Range statistic
% STDRINV(P,V,R) is the inverse cumulative distribution function for
% the Studentized range statistic for R samples and V degrees of
% freedom, evaluated at P.
% Copyright 1993-2002 The MathWorks, Inc.
% $Revision... |
github | YANG-H/MATLABTools-master | mlecustom.m | .m | MATLABTools-master/GeometricContext/tools/weightedstats/private/mlecustom.m | 20,093 | utf_8 | 884ff6829a9477a1b11b0c89db63a7c9 | function [phat, pci] = mlecustom(data,varargin)
%MLE Maximum likelihood estimation for custom univariate distributions.
%
% See help for MLE.
% Copyright 1993-2004 The MathWorks, Inc.
% $Revision: 1.1.6.7 $ $Date: 2004/04/04 03:42:19 $
% Process any optional input arguments.
pnames = {'pdf' 'cdf' 'logpdf' 'log... |
github | YANG-H/MATLABTools-master | dfaxlimctrl.m | .m | MATLABTools-master/GeometricContext/tools/weightedstats/private/dfaxlimctrl.m | 11,374 | utf_8 | 0c50c1293a0421e9c3381b159a9fba2f | function dfaxlimctrl(dffig,onoff)
%DFAXLIMCTRL Turn on or off the controls for adjusting axis limits
% $Revision: 1.1.6.2 $ $Date: 2004/01/24 09:35:16 $
% Copyright 2001-2004 The MathWorks, Inc.
% Remove controls from figure if requested
if isequal(onoff,'off')
a = findall(dffig,'Tag','axlimctrl');
delete... |
github | YANG-H/MATLABTools-master | dfevaluateplot.m | .m | MATLABTools-master/GeometricContext/tools/weightedstats/private/dfevaluateplot.m | 6,222 | utf_8 | ded62d78883b919718b6e91b3039db4d | function dfevaluateplot(plotFun,dum)
%DFEVALUATEPLOT Plot data and evaluated fits for DFITTOOL
% $Revision: 1.1.6.3 $ $Date: 2004/01/24 09:35:33 $
% Copyright 1993-2004 The MathWorks, Inc.
plotfig = dfgetset('evaluateFigure');
% If no plotting selected, delete the existing figure if there is one
if ~plotFun % &... |
github | YANG-H/MATLABTools-master | addrice.m | .m | MATLABTools-master/GeometricContext/tools/weightedstats/private/addrice.m | 6,577 | utf_8 | 8642ad1e0c4dbafd4f96bfa8fae5ecf2 | function s = addrice(s)
%ADDRICE Add the Rician distribution.
% Copyright 1993-2004 The MathWorks, Inc.
% $Revision: 1.1.6.10 $ $Date: 2004/02/01 22:10:34 $
j = length(s) + 1;
s(j).name = 'Rician';
s(j).code = 'rician';
s(j).pnames = {'s' 'sigma'};
s(j).pdescription = {'noncentrality' 'scale'};
s(j).prequired = ... |
github | YANG-H/MATLABTools-master | dfupdatexlim.m | .m | MATLABTools-master/GeometricContext/tools/weightedstats/private/dfupdatexlim.m | 2,510 | utf_8 | 2896ee2fbcfd6a212e7926a8a5f7873b | function dfupdatexlim(newminmax,updateplots)
%DFUPDATEXLIM Update the stored x axis min/max values
% $Revision: 1.1.6.5 $ $Date: 2004/01/24 09:36:03 $
% Copyright 2003-2004 The MathWorks, Inc.
minmax = []; % to become new x limits
oldminmax = dfgetset('xminmax'); % previous limits
ftype = dfg... |
github | YANG-H/MATLABTools-master | addbisa.m | .m | MATLABTools-master/GeometricContext/tools/weightedstats/private/addbisa.m | 6,521 | utf_8 | 8abfd966c21c7a2505ca77f6a6a5b446 | function s = addbisa(s)
%ADDBISA Add the Birnbaum-Saunders distribution.
% Copyright 1993-2004 The MathWorks, Inc.
% $Revision: 1.1.6.8 $ $Date: 2004/01/24 09:35:04 $
j = length(s) + 1;
s(j).name = 'Birnbaum-Saunders';
s(j).code = 'birnbaumsaunders';
s(j).pnames = {'beta' 'gamma'};
s(j).pdescription = {'scale' '... |
github | YANG-H/MATLABTools-master | statctexact.m | .m | MATLABTools-master/GeometricContext/tools/weightedstats/private/statctexact.m | 8,490 | utf_8 | b468776545db437f44c77ddec1e78a3c | function pval=statctexact(x,wts,tstar,dispopt)
%STATCTEXACT Compute exact p-value for contingency table
% P=STATCTEXACT(X,WTS,T,DISPOPT) uses a network algorithm to compute
% the exact p-value P for a 2-by-K contingency table X. The test
% statistic T is the weighted sum of the elements in the first row.
% Se... |
github | YANG-H/MATLABTools-master | dfaddbuttons.m | .m | MATLABTools-master/GeometricContext/tools/weightedstats/private/dfaddbuttons.m | 6,442 | utf_8 | 2ff8d56af47a2c75c7e74bfcff2dc3d5 | function dfaddbuttons(dffig)
%DFADDBUTTONS Add buttons to the curve fitting plot figure window
% $Revision: 1.1.6.8 $ $Date: 2004/01/24 09:35:09 $
% Copyright 2003-2004 The MathWorks, Inc.
% Clear out any old stuff
h0 = findall(dffig,'Type','uicontrol','Style','pushbutton');
if ~isempty(h0), delete(h0); end
p0 =... |
github | YANG-H/MATLABTools-master | dfupdateppdists.m | .m | MATLABTools-master/GeometricContext/tools/weightedstats/private/dfupdateppdists.m | 3,087 | utf_8 | 0cc18da7156a500080c528bc531eb10f | function dfupdateppdists(dffig)
%DFUPDATEPPDISTS Update distribution list for probability plots
% $Revision: 1.1.6.5 $ $Date: 2004/01/24 09:36:02 $
% Copyright 2003-2004 The MathWorks, Inc.
if nargin<1 || isempty(dffig)
dffig = dfgetset('dffig');
end
% Get handle to control containing the distribution list
h... |
github | YANG-H/MATLABTools-master | addnaka.m | .m | MATLABTools-master/GeometricContext/tools/weightedstats/private/addnaka.m | 4,398 | utf_8 | 7e2b6a144e25ceacc9b853738b1cbac7 | function s = addnaka(s)
%ADDNAKA Add the Nakagami distribution.
% Copyright 1993-2004 The MathWorks, Inc.
% $Revision: 1.1.6.7 $ $Date: 2003/12/11 03:50:49 $
j = length(s) + 1;
s(j).name = 'Nakagami';
s(j).code = 'nakagami';
s(j).pnames = {'mu' 'omega'};
s(j).pdescription = {'shape' 'scale'};
s(j).prequired = [f... |
github | YANG-H/MATLABTools-master | dfgraphexclude.m | .m | MATLABTools-master/GeometricContext/tools/weightedstats/private/dfgraphexclude.m | 11,965 | utf_8 | ff8e69b2697cd9fd7e593aa8f323e7ab | function dfgraphexclude(dsname,xlo,xhi)
%DFGRAPHEXCLUDE Create graph for selecting (x,y) pairs to exclude
% DFGRAPHEXCLUDE(EXCLUDEPANEL,DSNAME,LOBND,UPBND) creates a graph
% tied to the Java exclusion panel EXCLUDEPANEL, for dataset DSNAME, with
% current lower and upper bounds LOBND and UPBND. It provides a gr... |
github | YANG-H/MATLABTools-master | statglmeval.m | .m | MATLABTools-master/GeometricContext/tools/weightedstats/private/statglmeval.m | 3,168 | utf_8 | 98ac5b2371c64f178386fc4edc80d77b | function retval=statglmeval(action,fn,varargin)
%STATGLMEVAL Evaluate or test link function in proper environment
% STATGLMEVAL('eval',FN,ARGS,...) evaluates the function FN in an
% environment in which certain functions such as LOGIT and
% D_LOGIT are defined. This allows the function FN to be either
% a use... |
github | YANG-H/MATLABTools-master | im2mis.m | .m | MATLABTools-master/GeometricContext/tools/weightedstats/private/im2mis.m | 5,031 | utf_8 | ed612a7fa662f25817b2742f636c83e8 | function mis = im2mis(varargin)
%IM2MIS Convert image to Java MemoryImageSource.
%
% MIS = IM2MIS(I) converts the intensity image I to a Java
% MemoryImageSource.
%
% MIS = IM2MIS(X,MAP) converts the indexed image X with colormap MAP to a
% Java MemoryImageSource.
%
% MIS = IM2MIS(RGB) converts the RGB image ... |
github | YANG-H/MATLABTools-master | dfcustomdist.m | .m | MATLABTools-master/GeometricContext/tools/weightedstats/private/dfcustomdist.m | 6,194 | utf_8 | 75dd6db6d545865f7218add1c516a353 | function dfcustomdist(ignore1,ignore2,action)
%DFCUSTOM Callbacks for menu items related to custom distributions
% $Revision: 1.1.6.3 $ $Date: 2004/02/01 22:10:36 $
% Copyright 2003-2004 The MathWorks, Inc.
fnpath = which('dfittooldists.m');
dft = com.mathworks.toolbox.stats.DistributionFitting.getDistributionFi... |
github | YANG-H/MATLABTools-master | addtls.m | .m | MATLABTools-master/GeometricContext/tools/weightedstats/private/addtls.m | 6,220 | utf_8 | a3e59b1843fd4a619b0af6ccf0515470 | function s = addtls(s)
%ADDTLS Add the t location-scale distribution.
% Copyright 1993-2004 The MathWorks, Inc.
% $Revision: 1.1.6.7 $ $Date: 2004/01/24 09:35:08 $
j = length(s) + 1;
s(j).name = 't location-scale';
s(j).code = 'tlocationscale';
s(j).pnames = {'mu' 'sigma' 'nu'};
s(j).pdescription = {'location' '... |
github | YANG-H/MATLABTools-master | dffig2m.m | .m | MATLABTools-master/GeometricContext/tools/weightedstats/private/dffig2m.m | 27,041 | utf_8 | 6271ee715d3cc8f2d3beb6502425fa8d | function dffig2m(dffig,outfilename)
%DFFIG2M Turn figure into an M file that can produce the figure
% $Revision: 1.1.6.12 $ $Date: 2004/03/22 23:55:33 $
% Copyright 2003-2004 The MathWorks, Inc.
dsdb = getdsdb;
fitdb = getfitdb;
if isempty(down(dsdb)) && isempty(down(fitdb))
emsg = 'Cannot save M file when no... |
github | YANG-H/MATLABTools-master | dfcreateplot.m | .m | MATLABTools-master/GeometricContext/tools/weightedstats/private/dfcreateplot.m | 4,044 | utf_8 | 5f3f14c9c9e3b02534f6c47f82f9d901 | function dffig = dfcreateplot
%DFCREATEPLOT Create plot window for DFITTOOL
% $Revision: 1.1.6.8 $ $Date: 2004/03/09 16:17:03 $
% Copyright 2003-2004 The MathWorks, Inc.
% Get some screen and figure position measurements
tempFigure=figure('visible','off','units','pixels',...
'Tag','Distribution... |
github | YANG-H/MATLABTools-master | dftoolinittemplate.m | .m | MATLABTools-master/GeometricContext/tools/weightedstats/private/dftoolinittemplate.m | 6,341 | utf_8 | 75c97e650face984cbf4f1aea9014bf4 | function s = dfittooldists
%DFITTOOLDISTS Initialize dfittool with custom distributions.
%
% S=DFITTOOLDISTS is called during the initialization of DFITTOOL to get
% any custom distributions you may want to define. This function should
% appear somewhere on your MATLAB path. You can edit it to define
% di... |
github | YANG-H/MATLABTools-master | dftips.m | .m | MATLABTools-master/GeometricContext/tools/weightedstats/private/dftips.m | 6,165 | utf_8 | 317736e5c3583d9f8170cb10bc0aafa4 | function dftips(varargin)
%DFTIPS Display data and fit tips for Distribution Fitting figure
%No input arguments are used here.
% $Revision: 1.1.6.4 $ $Date: 2004/01/24 09:35:52 $
% Copyright 2001-2004 The MathWorks, Inc.
dffig = gcbf;
if ~isequal(get(dffig,'SelectionType'),'normal')
return;
end
h = hittest... |
github | YANG-H/MATLABTools-master | APPestimateHorizon.m | .m | MATLABTools-master/GeometricContext/geom/APPestimateHorizon.m | 2,098 | utf_8 | 7dc9176b18a9dc7af8bd9500bce49219 | function y_h = APPestimateHorizon(lines)
% Estimates horizon position of image
% lines should be normalized according to size of image
% need to multiply output by mean(imsize(1:2)) to get pixel value
%
% Copyright(C) Derek Hoiem, Carnegie Mellon University, 2005
% Current Version: 1.0 09/30/2005
max_angle = pi/8;
%... |
github | YANG-H/MATLABTools-master | regressMajorityPercentage.m | .m | MATLABTools-master/GeometricContext/util/regressMajorityPercentage.m | 3,062 | utf_8 | 97f3c8ab7bf15cb94b2d6cb4ba171740 | function [coef, bias, variance] = regressMajorityPercentage(smaps, pv, ph, imsegs)
% estimate the percentage of a region occupied by the majority label, given
% some estimate of the superpixel label likelihoods
ndata = 0;
for f = 1:numel(smaps)
for m = 1:size(smaps{f}, 2)
ndata = ndata + max(smaps{f}(:, m)... |
github | YANG-H/MATLABTools-master | calibrateEdgeClassifier.m | .m | MATLABTools-master/GeometricContext/util/calibrateEdgeClassifier.m | 2,865 | utf_8 | d065d08ae24c40e6abad813dbc0cd384 | function [eparams, errors] = calibrateEdgeClassifier(efeatures, adjlist, imsegs, eclassifier, ncv)
% [eparams, errors] = calibrateEdgeClassifier(efeatures, adjlist, imsegs,
% eclassifier, ncv)
nimages = numel(imsegs);
for k = 1:ncv
testind = [(k-1)*nimages/ncv+1:k*nimages/ncv];
trainind = setdiff([1:nimage... |
github | YANG-H/MATLABTools-master | pg2prcurve.m | .m | MATLABTools-master/GeometricContext/util/pg2prcurve.m | 1,451 | utf_8 | 898cb28243b8b0af66d537c7f352232a | function [prv, prh] = pg2prcurve(pg, imsegs)
% For varying levels of confidence, compute roc curves (tp vs fp) for the
% vertical labels and the horizontal labels
% labels(num_im).{vert_labels(h, w), vert_conf(h, w), horz_labels(h, w),
% horz_conf(h, w)
[pv, ph] = splitpg(pg);
[y, c, w] = initData(pv, {imsegs(:).vert... |
github | YANG-H/MATLABTools-master | makeLMfilters.m | .m | MATLABTools-master/GeometricContext/textons/makeLMfilters.m | 1,924 | utf_8 | 3b72a66373a5ffc869a4e755de3d6b3d | function F=makeLMfilters
% Returns the LML filter bank of size 49x49x48 in F. To convolve an
% image I with the filter bank you can either use the matlab function
% conv2, i.e. responses(:,:,i)=conv2(I,F(:,:,i),'valid'), or use the
% Fourier transform.
SUP=19;%49; % Support of the largest filter (mus... |
github | YANG-H/MATLABTools-master | mcmcGenerateGoodSegments.m | .m | MATLABTools-master/GeometricContext/mcmc/mcmcGenerateGoodSegments.m | 5,455 | utf_8 | 8b20cbdf50a4fe3b6e62c8d0f030b6bf | function [features, labels, labelprobs, weights] = ...
mcmcGenerateGoodSegments(im, imsegs, vclassifierSP, hclassifierSP,eclassifier, ...
segclassifier, spdata, adjlist, edata)
% Computes the marginals of the geometry for the given input image
% spdata, adjlist, edata are optional inputs
niter = 2500;
feature... |
github | YANG-H/MATLABTools-master | mcmcTrainSegmentClassifier3.m | .m | MATLABTools-master/GeometricContext/mcmc/mcmcTrainSegmentClassifier3.m | 1,379 | utf_8 | e8273f424f264edbe15f18f2206e0a94 | function [vclassifier, hclassifier] = mcmcTrainSegmentClassifier3(features, vlabels, hlabels, vw, hw)
ntrees = 20;
nnodes = 16;
maxdata = 30000;
[vdata, vlab, vw] = formatData(features, vlabels, vw, maxdata);
[hdata, hlab, hw] = formatData(features, hlabels, hw, maxdata);
vnames = {'000', '090', 'sky'};
hnames = {... |
github | YANG-H/MATLABTools-master | testImagesSuperpixels.m | .m | MATLABTools-master/GeometricContext/mcmc/testImagesSuperpixels.m | 1,498 | utf_8 | ce7c0a569a25cdea608ea50117645bde | function [vacc, hacc, vcm, hcm] = testImagesSuperpixels(imsegs, vclassifierSP, hclassifierSP, spdata)
vacc = 0;
hacc = 0;
vtotal = 0;
htotal = 0;
vcm = zeros(3);
hcm = zeros(5);
for f = 1:numel(imsegs)
[pv, ph] = spClassify(spdata{f}, vclassifierSP, hclassifierSP);
[vmaxval, vmax] = max(pv, [], 2);
[h... |
github | YANG-H/MATLABTools-master | mcmcTrainSegmentRegressor.m | .m | MATLABTools-master/GeometricContext/mcmc/mcmcTrainSegmentRegressor.m | 2,342 | utf_8 | 6d360cd100adb7909b630835d58284e6 | function [vclassifier, hclassifier] = mcmcTrainSegmentRegressor(features, labelprobs, weights)
ntrees = 20;
nnodes = 8;
maxdata = 30000;
for f = 1:numel(labelprobs)
vprobs{f} = [labelprobs{f}(:, 1) sum(labelprobs{f}(:, 2:6), 2) labelprobs{f}(:, 7)];
ind = find(vprobs{f}(:, 2)~=0);
hprobs{f} = zeros(size(... |
github | YANG-H/MATLABTools-master | testSuperpixelCCImagesCV.m | .m | MATLABTools-master/GeometricContext/mcmc/testSuperpixelCCImagesCV.m | 1,939 | utf_8 | e6e9529a19aa033061a4632ff0c27f8e | function [vacc, hacc, vcm, hcm] = testSuperpixelCCImagesCV(imsegs, vclassifier, hclassifier, segdata, smap, ncv)
vacc = 0;
hacc = 0;
vtotal = 0;
htotal = 0;
vcm = zeros(3);
hcm = zeros(5);
nimages = numel(imsegs);
for f = 1:nimages
k = ceil(f / (nimages/ncv));
[pv, ph] = segClassify(segdata{f}, ... |
github | YANG-H/MATLABTools-master | mcmcTestImage.m | .m | MATLABTools-master/GeometricContext/mcmc/mcmcTestImage.m | 6,819 | utf_8 | 9e186e2858a7a38055e5e6ab3fd836a9 | function [pg, pgIter] = mcmcTestImage(im, imsegs, vclassifierSP, hclassifierSP, ...
eclassifier, vclassifier, hclassifier, segclassifier, niter, spdata, adjlist, edata)
% Computes the marginals of the geometry for the given input image
% spdata, adjlist, edata are optional inputs
DO_LABEL = 1;
grayim = rgb2gray(i... |
github | YANG-H/MATLABTools-master | mcmcTestImageSA.m | .m | MATLABTools-master/GeometricContext/mcmc/mcmcTestImageSA.m | 13,398 | utf_8 | 43ea6284c27104866d08d0580c9936fa | function [bestpg, bestmap, energyIter, bestsp] = mcmcTestImageSA(im, imsegs, vclassifierSP, hclassifierSP, ...
eclassifier, ecal, vclassifier, hclassifier, segclassifier, maxiter, spdata, adjlist, edata)
% Computes the marginals of the geometry for the given input image
% spdata, adjlist, edata are optional inputs
... |
github | YANG-H/MATLABTools-master | mcmcGetAllSegmentFeatures.m | .m | MATLABTools-master/GeometricContext/mcmc/mcmcGetAllSegmentFeatures.m | 965 | utf_8 | 73140ce0d6cd822fc60996d2b7e65f0d | function features = mcmcGetAllSegmentFeatures(imsegs, imdir, gtmaps, spfeatures, vclassifierSP, hclassifierSP)
for f = 1:numel(imsegs)
disp([num2str(f) ': ' imsegs(f).imname])
im = im2double(imread([imdir '/' imsegs(f).imname]));
%[pvSP, phSP] = spClassify(spfeatures{f}, vclassifierSP, hclassifierSP... |
github | YANG-H/MATLABTools-master | mcmcTrainSegmentationClassifier2.m | .m | MATLABTools-master/GeometricContext/mcmc/mcmcTrainSegmentationClassifier2.m | 1,498 | utf_8 | 3e4444600b954d773dc440c4d5607bde | function [segclassifier] = mcmcTrainSegmentClassifier2(features, labels, weights, maxdata, classparams)
if exist('classparams') && ~isempty(classparams)
nnodes = classparams(1);
ntrees = classparams(2);
stopval = classparams(3);
else
ntrees = 20;
nnodes = 8;
stopval = 0;
end
if ~exist('maxdata... |
github | YANG-H/MATLABTools-master | mcmcGetDisjointEdgeData.m | .m | MATLABTools-master/GeometricContext/mcmc/mcmcGetDisjointEdgeData.m | 3,554 | utf_8 | 2d4b72e0eb1307de4fa21040a2eb4912 | function [edata, adjlist, boundmap, perim] = mcmcGetDisjointEdgeData(imsegs, spdata, npertype, ignorelist)
% edata(nadj, nfeatures)
% edata feature descriptions:
% 01 - 03: abs diff mean rgb
% 04 - 06: abs diff hsv conversion
% 07 - 07: chi-squared hue histogram
% 08 - 08: chi-squared sat histogra... |
github | YANG-H/MATLABTools-master | generateMultipleSegmentations2.m | .m | MATLABTools-master/GeometricContext/mcmc/generateMultipleSegmentations2.m | 4,666 | utf_8 | 3e035a96ae0a5b2e16c3da9ff841349b | function smaps = generateMultipleSegmentations2(pE, adjlist, nsp, nsegall)
% 1) Randomly select superpixel s1, then randomly selects different superpixel
% s2 within same segment (if one exists); remove s1,s2 from s
% 2) Then, for randomly ordered i:
% if si is adjacent to s1, assign si to s1 with probability pE(s... |
github | YANG-H/MATLABTools-master | generateMultipleSegmentations.m | .m | MATLABTools-master/GeometricContext/mcmc/generateMultipleSegmentations.m | 3,623 | utf_8 | 0349df1f6b75cf21f34035323d4b1960 | function smaps = generateMultipleSegmentations(pE, adjlist, nsp, nsegall)
% 1) Randomly select superpixel s1, then randomly selects different superpixel
% s2 within same segment (if one exists); remove s1,s2 from s
% 2) Then, for randomly ordered i:
% if si is adjacent to s1, assign si to s1 with probability pE(si... |
github | YANG-H/MATLABTools-master | generateInitialSegments.m | .m | MATLABTools-master/GeometricContext/mcmc/generateInitialSegments.m | 3,423 | utf_8 | 443df99f371accc845896e51675b6dce | function [labdata, segdata, labels, weights, smap] = generateInitialSegments(imsegs, imdir, ...
adjlist, spdata, vclassifierSP, hclassifierSP, edata, eclassifier)
ngoodv = 0;
ngoodh = 0;
ntotalv = 0;
ntotalh = 0;
for f = 1:numel(imsegs)
disp([num2str(f) ': ' imsegs(f).imname])
im = im2dou... |
github | YANG-H/MATLABTools-master | mcmcTrainSegmentClassifier2_vonly.m | .m | MATLABTools-master/GeometricContext/mcmc/mcmcTrainSegmentClassifier2_vonly.m | 2,131 | utf_8 | 03438f3f343eea4b0b1f2bf10f2ef89a | function [vclassifier] = mcmcTrainSegmentClassifier2(features, labels, weights, maxdata, classparams)
if exist('classparams') && ~isempty(classparams)
nnodes = classparams(1);
ntrees = classparams(2);
stopval = classparams(3);
else
nnodes = 8;
ntrees = 20;
stopval = 0;
end
if ~exist('maxdata')... |
github | YANG-H/MATLABTools-master | mcmcGetSegmentFeatures.m | .m | MATLABTools-master/GeometricContext/mcmc/mcmcGetSegmentFeatures.m | 5,261 | utf_8 | 69a98839196c39099d8f9b1989f603ee | function features = mcmcGetSegmentFeatures(imsegs, spdata, imdata, smap, sinds, usedFeatures)
% features = mcmcGetSegmentFeatures(imsegs, spdata, imdata, smap, sinds)
%
% Input:
% im - the rgb image
% imsegs - superpixel structure
% spdata - superpixel features
% imdata - data computed once for each image
% s... |
github | YANG-H/MATLABTools-master | mcmcGetEdgeData.m | .m | MATLABTools-master/GeometricContext/mcmc/mcmcGetEdgeData.m | 2,631 | utf_8 | fcc4b77a151cf4b963d570498dd11ba7 | function [edata, adjlist, perim, boundmap] = mcmcGetEdgeData(imsegs, spdata)
% edata(nadj, nfeatures)
% edata feature descriptions:
% 01 - 03: abs diff mean rgb
% 04 - 06: abs diff hsv conversion
% 07 - 07: chi-squared hue histogram
% 08 - 08: chi-squared sat histogram
% 09 - 23: abs diff mea... |
github | YANG-H/MATLABTools-master | mcmcTrainEdgeClassifier.m | .m | MATLABTools-master/GeometricContext/mcmc/mcmcTrainEdgeClassifier.m | 1,055 | utf_8 | 877ab4a3c6843bf47331493b332d7127 | function eclassifier = mcmcTrainEdgeClassifier(efeatures, adjlist, imsegs)
ntrees = 20;
nnodes = 8;
ndata = 50000;
labels = {imsegs(:).labels};
% train {ground, vertical, sky} classifier
[edata, elab] = formatData(efeatures, adjlist, labels, ndata);
mean(elab==1)
eclassifier = train_boosted_dt_2c(edata, [], elab, nt... |
github | YANG-H/MATLABTools-master | mcmcGenerateRandomSegments3.m | .m | MATLABTools-master/GeometricContext/mcmc/mcmcGenerateRandomSegments3.m | 4,473 | utf_8 | ba052cbf21c720b17c3f6f57d7e3c923 | function [data, labels, imind] = mcmcGenerateRandomSegments3(imsegs, imdir, ...
adjlist, spdata, edata, vclassifierSP, hclassifierSP, eclassifier)
% Generate random segments for training good (1) vs. bad (-1) segments
% segment, where good segments consist entirely of one label
nimages = numel(im... |
github | YANG-H/MATLABTools-master | mcmcTestImageSA3.m | .m | MATLABTools-master/GeometricContext/mcmc/mcmcTestImageSA3.m | 11,834 | utf_8 | e7732a65afd62fca663335729b2bc17d | function [bestpg, bestmap, segs, segpg, pg2, firsten, bestenergy] = ...
mcmcTestImageSA3(im, imsegs, vclassifierSP, hclassifierSP, ...
eclassifier, ecal, vclassifier, hclassifier, segrt, ...
priors, maxiter, spdata, adjlist, edata)
% Computes the marginals of the geometry for the given input image
% spdata,... |
github | YANG-H/MATLABTools-master | mcmcTestImageSA2.m | .m | MATLABTools-master/GeometricContext/mcmc/mcmcTestImageSA2.m | 12,135 | utf_8 | 3bfbd8aeaa128bfa5f62316f09d8c06c | function [bestpg, bestmap, segs, segpg, pg2, energyIter, bestsp] = ...
mcmcTestImageSA2(im, imsegs, vclassifierSP, hclassifierSP, ...
eclassifier, ecal, vclassifier, hclassifier, segclassifier, ...
priors, maxiter, spdata, adjlist, edata)
% Computes the marginals of the geometry for the given input image
% ... |
github | YANG-H/MATLABTools-master | mcmcTestEdgeClassifier.m | .m | MATLABTools-master/GeometricContext/mcmc/mcmcTestEdgeClassifier.m | 1,770 | utf_8 | 6381c5797d83259d8dbeabc7ffa25bfb | function errors = mcmcTestEdgeClassifier(efeatures, adjlist, imsegs, eclassifier)
labels = {imsegs(:).labels};
[edata, elab] = formatData(efeatures, adjlist, labels);
econf = test_boosted_dt_mc(eclassifier, edata);
econf = 1 ./ (1+exp(-econf));
mean(elab)
eerror = mean((econf>0.5)~=elab);
econf2 = 1-abs(elab-econf)... |
github | YANG-H/MATLABTools-master | mcmcTestSuperpixelClassifier.m | .m | MATLABTools-master/GeometricContext/mcmc/mcmcTestSuperpixelClassifier.m | 5,126 | utf_8 | 0d00504cf7ddd5b0e4b6fb53c1ac7fca | function [errors, perrors] = ...
mcmcTestSuperpixelClassifier(spfeatures, imsegs, vclassifier, hclassifier)
spvlabels = {imsegs(:).vert_labels};
sphlabels = {imsegs(:).horz_labels};
% test vertical
[vdata, vlab, imind] = formatData(spfeatures, spvlabels);
vconf = test_boosted_dt_mc(vclassifier, vdata);
vconf = 1 ... |
github | YANG-H/MATLABTools-master | testImageBottomUp.m | .m | MATLABTools-master/GeometricContext/mcmc/testImageBottomUp.m | 4,294 | utf_8 | f48e8c221da67eda5127e9c89462f600 | function [pv, ph, smap, vacc, hacc] = testImageBottomUp(im, imsegs, vclassifierSP, hclassifierSP, ...
eclassifier, vclassifier, hclassifier, segclassifier, spdata, adjlist, edata)
% Initialize
nsp = imsegs.nseg;
grayim = rgb2gray(im);
if ~exist('spdata') || isempty(spdata)
spdata = mcmcGetSuperpixelData(im, ... |
github | YANG-H/MATLABTools-master | mcmcTrainSuperpixelClassifier.m | .m | MATLABTools-master/GeometricContext/mcmc/mcmcTrainSuperpixelClassifier.m | 1,345 | utf_8 | 16a34ce0da3868c28b1694ffa1fc87dc | function [vclassifier, hclassifier] = ...
mcmcTrainSuperpixelClassifier(spfeatures, imsegs)
ntrees = 25;
nnodes = 8;
ndata = 10000;
vnames = imsegs(1).vert_names;
hnames = imsegs(1).horz_names;
spvlabels = {imsegs(:).vert_labels};
sphlabels = {imsegs(:).horz_labels};
% train {ground, vertical, sky} classifier
[vd... |
github | YANG-H/MATLABTools-master | mcmcTrainSegmentClassifier2.m | .m | MATLABTools-master/GeometricContext/mcmc/mcmcTrainSegmentClassifier2.m | 2,193 | utf_8 | 8b6680b7722b2d0404a43b9332b38425 | function [vclassifier, hclassifier] = mcmcTrainSegmentClassifier2(features, labels, weights, maxdata, classparams)
if exist('classparams') && ~isempty(classparams)
nnodes = classparams(1);
ntrees = classparams(2);
stopval = classparams(3);
else
nnodes = 8;
ntrees = 20;
stopval = 0;
end
if ~exi... |
github | YANG-H/MATLABTools-master | mcmcTrainSegmentClassifier.m | .m | MATLABTools-master/GeometricContext/mcmc/mcmcTrainSegmentClassifier.m | 1,771 | utf_8 | 9956192beb947c8ae3296ff31884cd37 | function [vclassifier, hclassifier] = ...
mcmcTrainSegmentClassifier(imsegs, features, labels)
ntrees = 15;
nnodes = 8;
maxdata = 25000;
vlabels = labels;
hlabels = labels;
for f = 1:numel(labels)
vlabels{f} = 1*(labels{f}==1) + 2*((labels{f}>1) & (labels{f}<7)) + ...
3*(labels{f}==7);
hlabels{f}... |
github | YANG-H/MATLABTools-master | generateMultipleSegmentationsGC.m | .m | MATLABTools-master/GeometricContext/mcmc/generateMultipleSegmentationsGC.m | 4,352 | utf_8 | 24798315c652c021ce26f9bd25c85dcb | function smaps = generateMultipleSegmentationsGC(pE, adjlist, nsp, nsegall)
% smaps = generateMultipleSegmentationsGC(pE, adjlist, nsp, nsegall)
%
% Uses graph cuts to segment image, maximizing an approximation of log(pE)
% Different segments result from random superpixels initially being set to
% segments.
nmap... |
github | dnovichman/Firmware-master | ellipsoid_fit.m | .m | Firmware-master/Tools/Matlab/ellipsoid_fit.m | 6,102 | utf_8 | b8fff7152313707a347ab528f7fbce9b | % Copyright (c) 2009, Yury Petrov
% All rights reserved.
%
% Redistribution and use in source and binary forms, with or without
% modification, are permitted provided that the following conditions are
% met:
%
% * Redistributions of source code must retain the above copyright
% notice, this list of conditions... |
github | BhanuVerma/ComputerVision-master | get_positive_features.m | .m | ComputerVision-master/proj5/code/get_positive_features.m | 2,118 | utf_8 | ed83035ada42df607c732aa641191375 | % Starter code prepared by James Hays for CS 4476, Georgia Tech
% This function should return all positive training examples (faces) from
% 36x36 images in 'train_path_pos'. Each face should be converted into a
% HoG template according to 'feature_params'. For improved performance, try
% mirroring or warping the po... |
github | BhanuVerma/ComputerVision-master | visualize_detections_by_image_no_gt.m | .m | ComputerVision-master/proj5/code/visualize_detections_by_image_no_gt.m | 1,795 | utf_8 | dda7ccd8166fcf9b55155938adb04ab5 | %This function visualizes all detections in each test image
function visualize_detections_by_image_no_gt(bboxes, confidences, image_ids, test_scn_path)
% 'bboxes' is Nx4, N is the number of non-overlapping detections, and each
% row is [x_min, y_min, x_max, y_max]
% 'confidences' is the Nx1 (final cascade node) con... |
github | BhanuVerma/ComputerVision-master | visualize_detections_by_confidence.m | .m | ComputerVision-master/proj5/code/visualize_detections_by_confidence.m | 2,759 | utf_8 | d06e396b2a5dd4cee309e528de5e0636 | %This function visualizes detections in order of decreasing confidence, one
%at a time.
function visualize_detections_by_confidence(bboxes, confidences, image_ids, test_scn_path, label_path, onlytp)
% 'bboxes' is Nx4, N is the number of non-overlapping detections, and each
% row is [x_min, y_min, x_max, y_max]
% '... |
github | BhanuVerma/ComputerVision-master | run_detector.m | .m | ComputerVision-master/proj5/code/run_detector.m | 5,604 | utf_8 | 814e65c8dc4fb52e1e60d2eb0c30ddd5 | % Starter code prepared by James Hays for CS 4476, Georgia Tech
% This function returns detections on all of the images in a given path.
% You will want to use non-maximum suppression on your detections or your
% performance will be poor (the evaluation counts a duplicate detection as
% wrong). The non-maximum supp... |
github | BhanuVerma/ComputerVision-master | get_random_negative_features.m | .m | ComputerVision-master/proj5/code/get_random_negative_features.m | 2,706 | utf_8 | 817168353c7f76b5183785a933118b25 | % Starter code prepared by James Hays for CS 4476, Georgia Tech
% This function should return negative training examples (non-faces) from
% any images in 'non_face_scn_path'. Images should be converted to
% grayscale because the positive training data is only available in
% grayscale. For best performance, you shou... |
github | BhanuVerma/ComputerVision-master | visualize_detections_by_image.m | .m | ComputerVision-master/proj5/code/visualize_detections_by_image.m | 2,792 | utf_8 | 9733a1af2248894be49485f7ca1280b7 | %This function visualizes all detections in each test image
function visualize_detections_by_image(bboxes, confidences, image_ids, tp, fp, test_scn_path, label_path, onlytp)
% 'bboxes' is Nx4, N is the number of non-overlapping detections, and each
% row is [x_min, y_min, x_max, y_max]
% 'confidences' is the Nx1 (f... |
github | BhanuVerma/ComputerVision-master | get_features.m | .m | ComputerVision-master/proj2/code/get_features.m | 5,270 | utf_8 | 3c828e480a3f6fa3147996e95d25e031 | % Local Feature Stencil Code
% CS 4476 / 6476: Computer Vision, Georgia Tech
% Written by James Hays
% Returns a set of feature descriptors for a given set of interest points.
% 'image' can be grayscale or color, your choice.
% 'x' and 'y' are nx1 vectors of x and y coordinates of interest points.
% The local feat... |
github | BhanuVerma/ComputerVision-master | show_correspondence2.m | .m | ComputerVision-master/proj2/code/show_correspondence2.m | 1,618 | utf_8 | d754a0a7f9f2ca2960dfea8e0518a162 | % Automated Panorama Stitching stencil code
% CS 4476 / 6476: Computer Vision, Georgia Tech
% Written by Henry Hu <henryhu@gatech.edu> and James Hays
% Visualizes corresponding points between two images. Corresponding points
% will be matched by a line of random color.
% This function provides another method of visua... |
github | BhanuVerma/ComputerVision-master | show_correspondence.m | .m | ComputerVision-master/proj2/code/show_correspondence.m | 2,215 | utf_8 | 2d4943c5a3ff072fa99f194331ba8180 | % CS 4476 / 6476: Computer Vision, Georgia Tech
% Written by Henry Hu <henryhu@gatech.edu> and James Hays
% Visualizes corresponding points between two images. Corresponding points
% will have the same random color.
% You do not need to modify anything in this function, although you can if
% you want to.
function [ h... |
github | BhanuVerma/ComputerVision-master | get_interest_points.m | .m | ComputerVision-master/proj2/code/get_interest_points.m | 3,791 | utf_8 | 8ae22383e0fa3438850687ae10a6e43f | % Local Feature Stencil Code
% CS 4476 / 6476: Computer Vision, Georgia Tech
% Written by James Hays
% Returns a set of interest points for the input image
% 'image' can be grayscale or color, your choice.
% 'feature_width', in pixels, is the local feature width. It might be
% useful in this function in ord... |
github | BhanuVerma/ComputerVision-master | cheat_interest_points.m | .m | ComputerVision-master/proj2/code/cheat_interest_points.m | 1,111 | utf_8 | 9d93fe7e1b0c34e407f2e5d3528315bf | % Local Feature Stencil Code
% CS 4476 / 6476: Computer Vision, Georgia Tech
% Written by James Hays
% This function is provided for development and debugging but cannot be
% used in the final handin. It 'cheats' by generating interest points from
% known correspondences. It will only work for the three image pa... |
github | BhanuVerma/ComputerVision-master | show_ground_truth_corr.m | .m | ComputerVision-master/proj2/code/show_ground_truth_corr.m | 441 | utf_8 | 98f706af0be75ce44da3822986ef85b2 | % Local Feature Stencil Code
% CS 4476 / 6476: Computer Vision, Georgia Tech
% Written by James Hays
function show_ground_truth_corr()
image1 = imread('../data/Notre Dame/921919841_a30df938f2_o.jpg');
image2 = imread('../data/Notre Dame/4191453057_c86028ce1f_o.jpg');
corr_file = '../data/Notre Dame/92191984... |
github | BhanuVerma/ComputerVision-master | match_features.m | .m | ComputerVision-master/proj2/code/match_features.m | 1,855 | utf_8 | e0048fdf23d09cf8da895364acffb483 | % Local Feature Stencil Code
% CS 4476 / 6476: Computer Vision, Georgia Tech
% Written by James Hays
% 'features1' and 'features2' are the n x feature dimensionality features
% from the two images.
% If you want to include geometric verification in this stage, you can add
% the x and y locations of the featur... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.