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
salimoha/delta-Dogs-Lambda-master
print2eps.m
.m
delta-Dogs-Lambda-master/FilesToPath/tools/print2eps.m
6,118
utf_8
d51322b49255fd17900b2a402b760e8e
%PRINT2EPS Prints figures to eps with improved line styles % % Examples: % print2eps filename % print2eps(filename, fig_handle) % print2eps(filename, fig_handle, options) % % This function saves a figure as an eps file, with two improvements over % MATLAB's print command. First, it improves the line style, makin...
github
salimoha/delta-Dogs-Lambda-master
convex_bnd_project.m
.m
delta-Dogs-Lambda-master/FilesToPath/Search/convex_bnd_project.m
926
utf_8
a93cb369387a70688bb4b3796f07f736
function [xp,xc,R2,ii] = convex_bnd_project(x,xi,tri) % Find the convex boundary projection of the point x global n m cons out=0; for ii=1:size(tri,1) if (min(tri(ii,:))<n+2) [xc,R2]=circhyp(xi(:,tri(ii,:)), n); if norm(x-xc)< sqrt(R2) out=1; ...
github
salimoha/delta-Dogs-Lambda-master
quad_inter_paramterization.m
.m
delta-Dogs-Lambda-master/FilesToPath/Search/quad_inter_paramterization.m
1,441
utf_8
f3f86397a96ad96dff376d924b7499ed
function inter_par=quad_inter_paramterization(xi1,yi1) global n y0 xi yi w %keyboard [tt,ind]=min(yi1); xi=xi1; yi=yi1; xmin=xi(:,ind); xi(:,ind)=[]; xi=xi-repmat(xmin,1,size(xi,2)); ymin=tt; yi(ind)=[]; yi=yi-ymin; %keyboard f=zeros(n,1); A=eye(n); x0=[f;reshape(A,n^2,1)]; %keyboard % weights of the interpolation Tol=...
github
salimoha/delta-Dogs-Lambda-master
regressionparametarization.m
.m
delta-Dogs-Lambda-master/FilesToPath/Search/regressionparametarization.m
1,539
utf_8
a1fda62b2998e62d648262da3afb5a66
function [inter_par,yp]= regressionparametarization(xi,yi,sigma,inter_method) n=size(xi,1); N=size(xi,2); %while 1 if inter_method==1 % keyboard A = zeros(N,N); % calculate regular A matrix for polyharmonic spline for ii = 1 : 1 : N for jj = 1 : 1 : N A(ii,jj) = ((xi(:,ii) - xi(:,jj))' * (xi(:,ii)...
github
salimoha/delta-Dogs-Lambda-master
Linear_constrained_initilazation.m
.m
delta-Dogs-Lambda-master/FilesToPath/Search/Linear_constrained_initilazation.m
958
utf_8
7100f569f04d09e01bbfebe99dfa977b
function [xi,xic] = Linear_constrained_initilazation(Ain, bin) % Initialization of the linearly_cosntrained problem % Ain x \leq bin global n kappa kappa=1.5; % Find an initial interior point for L options=optimoptions('linprog','Display','off'); x1 = linprog([zeros(1,n) -1],[Ain ones(size(Ain,1),1); [zeros(2,n) [1...
github
salimoha/delta-Dogs-Lambda-master
feasible_point_finder.m
.m
delta-Dogs-Lambda-master/FilesToPath/Search/feasible_point_finder.m
988
utf_8
de1df4e3130efb26dcc2828244271283
function [x]=feasible_point_finder(x,H,f,e) % Calculate an initial feasible point for the feasible domain % minimize -\sum log(-x'H_ix- f'x_i- e_i) global m n for i=1:m e{i}=e{i}-0.1; end while 1 [M]=cost_fun(x,H,f,e); if (M==0) break end [dM]=grad_fun(x,H,f,e); [d2M]=hess_fun(x,H,f,e); d2M=d2M+0.01*eye(n); p=...
github
salimoha/delta-Dogs-Lambda-master
Adoptive_K_Search.m
.m
delta-Dogs-Lambda-master/FilesToPath/Search/Adoptive_K_Search.m
1,693
utf_8
3a33c3f3104c23ea4264fe5d280331c8
function [x y cse]=Adoptive_K_Search(x,inter_par,xc,R2) % Find the minimizer of the search function in a simplex global n Ain bin cc=0.01; rho=0.9; % parameters of backtracking % Initialize the point in the simplex %[xc,R2]=circhyp(xiT(:,tri(index,:)), n); iter=1; cse=2; y=cost(x,inter_par,xc, R2); while iter<3 % Cal...
github
salimoha/delta-Dogs-Lambda-master
tringulation_search_bound_constantK.m
.m
delta-Dogs-Lambda-master/FilesToPath/Search/tringulation_search_bound_constantK.m
1,411
utf_8
17915f235e824916ef37e0fc09351d11
function [xm ym] = tringulation_search_bound_constantK(inter_par,xi,K,ind_min) global n tri=delaunayn(xi.'); %keyboard % Search over the simplices for ii=1:size(tri,1) [xc,R2]=circhyp(xi(:,tri(ii,:)), n); x=xi(:,tri(ii,:))*ones(n+1,1)/(n+1); Sc(ii)=interpolate_val(x,inter_par)-K*(R2-norm(...
github
salimoha/delta-Dogs-Lambda-master
inter_min_conv.m
.m
delta-Dogs-Lambda-master/FilesToPath/Search/inter_min_conv.m
1,354
utf_8
c6ac69b65500e9515fd2f03a15b40907
function [x y]=inter_min_conv(x, inter_par) %find the minimizer of the interpolating function starting with x global n rho=0.9; % parameters of backtracking % start the search with method mu=1; iter=1; while iter<4 x_pre=x; iterr=1; while iterr<10 % Calculate the Newton direction y=cost(x,inter_par,mu); g=grad(x,...
github
salimoha/delta-Dogs-Lambda-master
actual_scaling_lincon.m
.m
delta-Dogs-Lambda-master/FilesToPath/Search/actual_scaling_lincon.m
884
utf_8
153ad2429dded43bc72d09803deafc78
function [A,B,s,r]=actual_scaling_lincon(A,B,ub,lb,a,b,n,neq) % find the real scaling factor A=[A; eye(n);-eye(n)]; B=[B; ub; -lb]; % Find all vertice of Ax \leq B, % and the nonredundent constraints [X,NRC]=vertexfind(A,B,a,b,n,neq); s=min(X.').'; s1=max(X.').'; r=s1-s; s=s(1:n-neq); r=r(1:n-neq); A=A(NRC,:); B=B(N...
github
salimoha/delta-Dogs-Lambda-master
Initial_point_finder.m
.m
delta-Dogs-Lambda-master/FilesToPath/Search/Initial_point_finder.m
1,102
utf_8
4644846ce21e52670a25f618daca6fa3
function [x]=Initial_point_finder(x,H,f,e) % calculate an initial interior point for the feasible domain % minimize -\sum log(-x'H_ix- f'x_i- e_i) global m n while 1 [M]=cost_fun(x,H,f,e); [dM]=grad_fun(x,H,f,e); [d2M]=hess_fun(x,H,f,e); p=-d2M\dM; %line search method for j=1:m alpha(j) = quadratic_prolongation(x,...
github
salimoha/delta-Dogs-Lambda-master
interpolateparametarization.m
.m
delta-Dogs-Lambda-master/FilesToPath/Search/interpolateparametarization.m
11,185
utf_8
2a942628fb0311d2986712e82e7f3298
function inter_par= interpolateparametarization(xi1,yi1,inter_method,interpolate_index) global xi yi y0 w xi=xi1; yi=yi1; n=size(xi,1); % keyboard % polyharmonic spline interpolation if inter_method==1 N = size(xi,2); A = zeros(N,N); for ii = 1 : 1 : N for jj = 1 : 1 : N A(ii,jj) = ((xi(:,ii) - xi(:,jj...
github
salimoha/delta-Dogs-Lambda-master
Adoptive_K_conv.m
.m
delta-Dogs-Lambda-master/FilesToPath/Search/Adoptive_K_conv.m
2,135
utf_8
432e4876f96e9c8f9a2164804f794fdb
function [x y cse]=Adoptive_K_conv(x,inter_par,xc,R2) % Find the minimizer of the search function in a simplex rho=0.9; % parameters of backtracking % Initialize the point in the simplex %[xc,R2]=circhyp(xiT(:,tri(index,:)), n); iter=1; mu=1; cse=2; x_pre=x; while iter<10 iterr=1; while iterr<10 y=cost(x,inter_par,xc...
github
salimoha/delta-Dogs-Lambda-master
lin_convex_bnd_project.m
.m
delta-Dogs-Lambda-master/FilesToPath/Search/lin_convex_bnd_project.m
610
utf_8
ce3e89635467b7fc8a38db30ab71e359
function [xp,xc,R2,ii] = lin_convex_bnd_project(x,xi,tri) % Find the convex boundary projection of the point x global n m Ain bin lincon=1; out=0; for ii=1:size(tri,1) if (min(tri(ii,:))<n+2) [xc,R2]=circhyp(xi(:,tri(ii,:)), n); if norm(x-xc)< sqrt(R2) ou...
github
cbaldassano/Event-Segmentation-master
forward_backward_log.m
.m
Event-Segmentation-master/forward_backward_log.m
2,102
utf_8
9c81dc43386d9b69a3f9fbb875905a5e
function [loggamma, LL] = forward_backward_log(logprob, Pi, EndPi, P) % Computes log p(event at time t = k), and log likelihood of fit % Runs modified forward-backward algorithm that allows for ending event % constraing (EndPi) % Inputs: % logprob: time by event matrix of log p(response t | event k) % Pi, End...
github
cbaldassano/Event-Segmentation-master
example.m
.m
Event-Segmentation-master/example.m
3,296
utf_8
e4f265baae048f1228055d6409240b4c
function example() % Example of event segmentation and finding corresponding events % Parameters for creating small simulated datasets V = 10; K = 10; T = 500; T2 = 300; % Generate the first dataset rng(1); eventMeans = randn(V,K); eventLabels = generate_event_labels(T, K, 0.1); simulData = generate_data...
github
stoneyang/caffe_ristretto-master
classification_demo.m
.m
caffe_ristretto-master/matlab/demo/classification_demo.m
5,412
utf_8
8f46deabe6cde287c4759f3bc8b7f819
function [scores, maxlabel] = classification_demo(im, use_gpu) % [scores, maxlabel] = classification_demo(im, use_gpu) % % Image classification demo using BVLC CaffeNet. % % IMPORTANT: before you run this demo, you should download BVLC CaffeNet % from Model Zoo (http://caffe.berkeleyvision.org/model_zoo.html) % % *****...
github
jjcharles/personalized_pose-master
train_rgb_model.m
.m
personalized_pose-master/+evaluator/train_rgb_model.m
8,273
utf_8
07f28ed0d7c614b174e04b73a49dc42b
%get lower arm likelihood values %leaves a hold out validation set to tune confidence values function [left_shape,right_shape] = train_rgb_model(opts,filename,folder,detections,fieldname,model_scale) visualise = false; frameids = detections.(fieldname).frameids; locs = detections.(fieldname).locs; total_frame...
github
jjcharles/personalized_pose-master
best_detections.m
.m
personalized_pose-master/+evaluator/best_detections.m
2,296
utf_8
98064cd152f918bf8b0b5b519694a667
%function to evaluate the joint detections and return those which we %believe to have high confidence %takes as input the detections struct, outputs a detections struct %with added fields for filtered detections function detections = best_detections(detections) %for each joint find best detections by thresho...
github
jjcharles/personalized_pose-master
sample_detections.m
.m
personalized_pose-master/+evaluator/sample_detections.m
1,551
utf_8
b4100b4c44540ca01f46994b14c31c4c
%resample detections so that there is a maximal coverage of locations %across each object/body_part type %normalises to head position function detections = sample_detections(detections,field_name,patch_width,num_samples_per_part) num_parts = size(detections.(field_name).locs,2); locs = []; fra...
github
jjcharles/personalized_pose-master
apply_hogrgb_model.m
.m
personalized_pose-master/+evaluator/apply_hogrgb_model.m
6,105
utf_8
290d47d47515a62ef1509d4d7b492a8f
%get lower arm likelihood values by using both a hog and an rgb model function [detections, removed, fixed] = apply_hogrgb_model(filename,folder,detections,fieldname,hogmodel, rgbmodel,model_scale) %detections - filtered detections %removed - ids of where old detections were removed visualise = false; frameids...
github
jjcharles/personalized_pose-master
remove_invalid_poses.m
.m
personalized_pose-master/+evaluator/remove_invalid_poses.m
6,483
utf_8
d6b016f4786a28cce3fcaabb910f57a4
%function to identify frames where the pose estimates are not valid, ie. %they have limb lengths greater than normal function detections = remove_invalid_poses(detections,field_name,current_detections) shoulder_to_shoulder = sqrt(sum( (current_detections.manual.locs(:,[6],:)-current_detections.manual.locs(:,[...
github
jjcharles/personalized_pose-master
foreground_background_eval.m
.m
personalized_pose-master/+evaluator/foreground_background_eval.m
3,375
utf_8
037cac9d0562700bb9bce1694220f27e
%function to remove joint detections based on foreground background %classification %allows input of seperate training and testing data function detections_test = foreground_background_eval(opts,filename,detections_train,detections_test,fieldname) frameids = detections_train.training.frameids; locs = detections_...
github
jjcharles/personalized_pose-master
train_hog_model.m
.m
personalized_pose-master/+evaluator/train_hog_model.m
9,367
utf_8
e292a7c8c7c94dd36352e318ccdc4c5b
%get lower arm likelihood values %uses jittered positive examples %trains the svms with a threshold by validating on hold out data function [left_shape,right_shape] = train_hog_model(opts,filename,folder,detections,fieldname,model_scale) visualise = false; frameids = detections.(fieldname).frameids; locs = de...
github
jjcharles/personalized_pose-master
get_hogrgb_models.m
.m
personalized_pose-master/+evaluator/get_hogrgb_models.m
1,188
utf_8
87551250d7c9fc8148df256a67efd2a1
%function which trains an svm evaluator for both hog and rgb features %it returns two different models one for hog and one for rgb %uses a hold out set of validation data to tune the svm thresholds function [hogmodel, rgbmodel] = get_hogrgb_models(opts,filename,folder,detections,fieldname,modelscale) %subsample...
github
jjcharles/personalized_pose-master
get_training_patches.m
.m
personalized_pose-master/+occlusion/get_training_patches.m
3,476
utf_8
ed390106f7ed601188b96818b6b6e0ab
%returns both hog and rgb patches with rotation augmentation function [hogpatches,rgbpatches, labels] = get_training_patches(opts,videofilename,frameids,locs) %GET_TRAINING_PATCHES_HOG gets patches of image for training an occlusion %detector %get size of hog patches dummypatch = single(round(rand(opts.occlusi...
github
jjcharles/personalized_pose-master
apply_forest_fast.m
.m
personalized_pose-master/+oforest/apply_forest_fast.m
14,275
utf_8
995485fe08cabb881e799022258ab021
%function to apply forest to a frame %interlaces the application of trees on every other pixel, this gives a %theoretical speed increase of x2 function [locs,dist,conf,leafids] = apply_forest_fast(omodel,frame,bbox,islocs_needed) %check for correct padding omodel.opts.model.windowwidth = max(omodel.opts.m...
github
jjcharles/personalized_pose-master
train_forest_cluster.m
.m
personalized_pose-master/+oforest/train_forest_cluster.m
395
utf_8
eea08e96ab3a71320219a3fc6a0874d5
%TRAIN_FOREST - trains a part detector classifier for object locations %implementation to run on cluster function tree = train_forest_cluster(opts,filenames,frame_ids,locs,treeid) fprintf('Training part detectors (%d images):...',numel(frame_ids)); rseed = treeid; tree = oforest.master_node_fast(op...
github
jjcharles/personalized_pose-master
load_images.m
.m
personalized_pose-master/+oforest/load_images.m
4,421
utf_8
d478eabb96ae1524ffd7af7c5263de2d
%function to load training images into memory function [images, labels, sample_idx,total_background, newpadding] = load_images(opts,filename_video, frame_ids, locs) %images - the training images pluse a few background unlabelled images %labels - this is actuall the body part locations %sample_idx - the sample index...
github
jjcharles/personalized_pose-master
apply_frame.m
.m
personalized_pose-master/+oforest/apply_frame.m
1,328
utf_8
ce1b1cef62df72921480a69d85c9e17f
%function to apply the general forest to a frame function [locs, dist, conf, leafids] = apply_frame(omodel,img,seg, patches, bbox, featuretype, testing_speed,filter_width) %bbox is the bounding box where the forest is applied if ~exist('filter_width','var') filter_width = 4; end switch...
github
jjcharles/personalized_pose-master
multiclass_thresh.m
.m
personalized_pose-master/+oforest/multiclass_thresh.m
1,929
utf_8
65dc0560d37695c231a07c7750228666
%MULTICLASS_THRESH - find multiclass threshold value for tree function [T, Gmax, window_index_left, window_index_right] = multiclass_thresh(opts,WI,data,feature,channel,func_type) window_index_left = []; window_index_right = []; Gmax = -inf; data_class = data.class(WI); num_samples = siz...
github
jjcharles/personalized_pose-master
augmentdata.m
.m
personalized_pose-master/+oforest/augmentdata.m
1,646
utf_8
d310820ce59d0fa08f7572f202df84e0
%augment the training data by adding in some rotations function [images,labels] = augmentdata(input_images,input_labels,rotations) images = repmat(uint8(0),[size(input_images,1),size(input_images,2),size(input_images,3),size(input_images,4)*(1+numel(rotations))]); labels = zeros(size(input_labels,1),size(i...
github
jjcharles/personalized_pose-master
apply_forest.m
.m
personalized_pose-master/+oforest/apply_forest.m
2,363
utf_8
b909fa0bb0ff788632a861a74ee33117
%function to apply forest to a frame function [locs,dist,conf,leafids] = apply_forest(omodel,frame,bbox,islocs_needed,filter_width) if ~exist('filter_width','var') filter_width = 8; end if ~exist('islocs_needed','var') islocs_needed = true; end %check for correct padd...
github
jjcharles/personalized_pose-master
sample_windows.m
.m
personalized_pose-master/+oforest/sample_windows.m
4,219
utf_8
1daea87e95419d0fc4f7677a31e3a6f1
%SAMPLE_WINDOWS - samples with windows from the loaded images function points = sample_windows(opts,labels,total_background) %initialise the points array numbackgroundextras = 100; patch = oforest.make_patch(opts.patchwidth); total_points = 0; for i = 1:size(labels,3) numspots = 0; ...
github
jjcharles/personalized_pose-master
get_smaller_sample.m
.m
personalized_pose-master/+oforest/get_smaller_sample.m
1,282
utf_8
5b1ce1be13d3d11219d50b5bb0564c82
%function to sample a uniform selection of windows across all classes function [WI_small,winid,norm_class_dist] = get_smaller_sample(WI,data,class_dist,maxsample) num_diff_classes = numel(class_dist); N = sum(class_dist); if N==0 class_dist = histc(data.class(WI),1:num_diff_classes); ...
github
jjcharles/personalized_pose-master
get_feature.m
.m
personalized_pose-master/+oforest/get_feature.m
1,455
utf_8
b92258ea9b0e8dfcad594254d2128351
%function to extract feature from images given data points and offset function feature = get_feature(opts,WI,data,images,channel,func_type,offset) func = oforest.func_pointer(func_type); data_img_index = double(data.img_index(WI)); data_x = double(data.x(WI)); data_y = double(data.y(WI)); ...
github
jjcharles/personalized_pose-master
master_node_fast.m
.m
personalized_pose-master/+oforest/master_node_fast.m
6,935
utf_8
a1aed67c4fc91935bfa814288698b716
%MASTER_NODE - builds multiclass decision tree. function [tree,model_opts] = master_node_fast(opts, filename_video, frame_ids, locs, random_seed) model_opts = opts.model; model_opts.bbox = opts.bbox; model_opts.imgwidth = opts.bbox(3) + 2*model_opts.padding; model_opts.imgheight =opts.bbox(4) + 2*m...
github
jjcharles/personalized_pose-master
make_patch.m
.m
personalized_pose-master/+oforest/make_patch.m
172
utf_8
f6792896dd107cb9fbd42233a689279b
%make a canonical joint patch function patch = make_patch(width) disc = strel('disk',width,0); [r,c] = find(disc.getnhood); patch = [c, r] - width - 1; end
github
jjcharles/personalized_pose-master
sample_node_data.m
.m
personalized_pose-master/+oforest/sample_node_data.m
2,132
utf_8
51c16741692b7e2d9477ed9da9bb0460
%SAMPLE_NODE_DATA - samples test functions and features for node function [feature, offset] = sample_node_data(opts,WI,data,images,channel,func_type,currentdepth) func = oforest.func_pointer(func_type); %decide what window width to use if exist('currentdepth','var') if isfield(opts,'wi...
github
jjcharles/personalized_pose-master
apply_video.m
.m
personalized_pose-master/+oforest/apply_video.m
1,241
utf_8
aa154c53b2ac949797fd8601dcd22348
%function to apply partdetector to video function [locs,confout,dist] = apply_video(omodel,videofilename,frameids,model_scale) orig_bbox = omodel.opts.bbox; if ~exist('model_scale','var') model_scale = 1; else omodel = oforest.scale_model(omodel,model_scale); end vidobj = VideoReader(videofilena...
github
jjcharles/personalized_pose-master
load_forest_from_folder.m
.m
personalized_pose-master/+oforest/load_forest_from_folder.m
1,195
utf_8
041b63dbcceae0b2a11a18684059ee1d
%function to load oforest from folder containing trees function model = load_forest_from_folder(folder) folder(folder=='\') = '/'; if folder(end)~='/'; folder = [folder '/']; end forestfile = sprintf('%sforest.mat',folder); model = struct(); if ~exist(forestfile,'file'); %get...
github
jjcharles/personalized_pose-master
func_pointer.m
.m
personalized_pose-master/+oforest/func_pointer.m
647
utf_8
f080d16ad700645bb3b2a1a589eeeab3
%provides a pointer to a function indexed by a number function fp = func_pointer(num) switch num case 1 fp = @unary; case 2 fp = @binary1; case 3 fp = @binary2; case 4 fp = @binary3; otherwise fp = @unary...
github
jjcharles/personalized_pose-master
tree2mat.m
.m
personalized_pose-master/+oforest/tree2mat.m
1,055
utf_8
aae794e8eb4b11bdd89498c348ea0bc2
%function to convert a ctree into matrix form function mat_tree = tree2mat(tree) numclasses = numel(tree(end).distribution); %preallocate memory mat_tree = zeros(11+numclasses,numel(tree)); for n = 1:numel(tree) if ~isempty(tree(n).left); mat_tree(1,n) = (tree(n).left-1)*19...
github
jjcharles/personalized_pose-master
scale_model.m
.m
personalized_pose-master/+oforest/scale_model.m
336
utf_8
ee4dbd04285fe725216c8bb83760708a
%function to scale test functions of model to work with different sized %images function model = scale_model(model,scale) for f =1:numel(model.forestmat) model.forestmat{f}(5:8,:) = floor(model.forestmat{f}(5:8,:)*scale); end model.opts.bbox(:) = floor(model.opts.bbox(:)*scale); model.opts.bbox(model.opt...
github
jjcharles/personalized_pose-master
get_face_torso_patches.m
.m
personalized_pose-master/+prep/get_face_torso_patches.m
3,171
utf_8
295caa9699778e06e91e70b235a9678a
%function to get the face and torso patches function videoToColor = get_face_torso_patches(opts,videofilename,model,filename,frameids) vidobj = VideoReader(videofilename); if ~exist('frameids','var'); frameids = 1:20:vidobj.NumberOfFrames; end videoToColor = []; frameids = fra...
github
jjcharles/personalized_pose-master
temporal_refinement.m
.m
personalized_pose-master/+flow/temporal_refinement.m
8,726
utf_8
0b8b056914ba3f98f5ac9ac3b1099bb0
%function to refine poses by comparing them against propergated %neighbouring frames function [refinedlocs,refinedframes,alllocs,allframeids,fromframeid,allflowq] = temporal_refinement(opts,filename,input_locs,input_frameids) visualise = false; refinedlocs = []; refinedframes = []; %open f...
github
jjcharles/personalized_pose-master
cluster_refinement_highres.m
.m
personalized_pose-master/+flow/cluster_refinement_highres.m
4,475
utf_8
6ceb20d7ba4d763549ea4eb65ebef196
%function to refine pose using dense siftflow WITHIN the cluster function [poses, from_frame_idx, flowquality, initial_frameids] = cluster_refinement_highres(part_clusters,initial_frameids,videofilename,apply_to_locs) %part_clusters are clustererd patches around body part detections %initial_frameids = initial sampl...
github
jjcharles/personalized_pose-master
align_locs.m
.m
personalized_pose-master/+flow/align_locs.m
2,241
utf_8
a61b6bf72a8c7a75919963ec354d8390
%function to propergate a single point through a set of matching frames function [locarray, energies, from_patch_idx] = align_locs(patches,initial_patch) %locarray is the array of joint locations relative to the patch centre %energies is the flow energy for each patch %from_frame_idx holds the patchidx from where t...
github
jjcharles/personalized_pose-master
combine_proposals.m
.m
personalized_pose-master/+flow/combine_proposals.m
9,637
utf_8
58e1fd6fa49ba37e1a9541a4a0f0267b
%function to combine proposals and formulate the statistics per frame %works using detection struct as input %provides a contribution field with all stats function detections = combine_proposals(detections,videofilename) visualise = true; if visualise && exist('videofilename','var') vidobj...
github
jjcharles/personalized_pose-master
get_backwards_flow.m
.m
personalized_pose-master/+flow/get_backwards_flow.m
1,255
utf_8
c08a806c4aad25c39f5f31184c7b261d
%function to produce flow backwards from flow going fowards using iterative fixed %point algorithm: flowback_nplus(x) = -flowforward(x+flowback_n(x)); %initialise flowback_zero = -flowforward; function reverse_flow = get_backwards_flow(flow) reverse_flow = zeros(size(flow)); [M,N,~,total_frames] = size(f...
github
jjcharles/personalized_pose-master
compress_flow_minmax.m
.m
personalized_pose-master/+flow/compress_flow_minmax.m
498
utf_8
85252f13aafbf47d9a28df6121c7665d
%function to read in flow file and compress function [flow_small, minmax] = compress_flow_minmax(filename) flow = flow.readFlowFile(filename); minmax = [max(max(flow(:,:,1))), min(min(flow(:,:,1)));... % channel 1 max(max(flow(:,:,2))), min(min(flow(:,:,2)))]; % channel 2 flow_small =...
github
jjcharles/personalized_pose-master
uncompress_flow_minmax.m
.m
personalized_pose-master/+flow/uncompress_flow_minmax.m
386
utf_8
d0dab4259676d4c79d8ac4c3b277cb59
%function to read in flow file and uncompress function flow_large = uncompress_flow_minmax(flow,minmax) xflow = bsxfun(@times,double(flow(:,:,1,:))/255,permute(minmax(1,1,:)-minmax(1,2,:),[1 2 4 3])) + minmax(1,2); yflow = bsxfun(@times,double(flow(:,:,2,:))/255,permute(minmax(2,1,:)-minmax(2,2,:),[1 2...
github
jjcharles/personalized_pose-master
body_part_clustering.m
.m
personalized_pose-master/+cluster/body_part_clustering.m
4,271
utf_8
6b00ef80fd182df892176a6d3ffb29fa
%function to cluster patches around body parts, based on known joint %locations function [part_clusters,detections] = body_part_clustering(opts,videofilename,omodel,detections,patchfilename,cache_folder) if ~exist('cache_folder','var') cache_folder = './cache/'; end if ~exist(cache_folder,'d...
github
jjcharles/personalized_pose-master
get_part_proposals_with_rot.m
.m
personalized_pose-master/+cluster/get_part_proposals_with_rot.m
8,928
utf_8
4e22804335f273ed421cc5383b058700
%function to extract patches from a video given proposed body part %locations and augments data with rotations function part_clusters = get_part_proposals_with_rot(opts,videofilename,detections,facepatches,patchwidth) visualise = false; if visualise figure end vidobj = Vide...
github
jjcharles/personalized_pose-master
get_part_proposals.m
.m
personalized_pose-master/+cluster/get_part_proposals.m
5,280
utf_8
adedd8947faa9ac4aec1fa4f76697adf
%function to extract patches from a video given proposed body part %locations function part_clusters = get_part_proposals(opts,videofilename,detections,facepatches,patchwidth) visualise = false; if visualise figure end vidobj = VideoReader(videofilename); numparts = si...
github
jjcharles/personalized_pose-master
label_assignment.m
.m
personalized_pose-master/+cluster/label_assignment.m
328
utf_8
f3ec60e75fba81fbcee3209dc88f3399
%function to determin cluster assignment given cluster centroids and input %vectors function [labels dist] = label_assignment(centroids, y) index = flann_build_index(centroids,struct('algorithm','kdtree','tree',16)); search_struct = struct('checks',128); [labels,dist] = flann_search(index,y,1,search_...
github
jjcharles/personalized_pose-master
exemplarsvm_cluster.m
.m
personalized_pose-master/+cluster/exemplarsvm_cluster.m
2,023
utf_8
81771229a233be685d3f032401a6be57
%function to perform exemplar svm clustering function [labels, dists] = exemplarsvm_cluster(centroids,data,labels) %thresh is a value between 0 and 1 which will discard data items if they %are not close to a centroid, higher the thresh, the tighter the control %data must be scaled between 0 and 1 data = sparse...
github
jjcharles/personalized_pose-master
load_system_options.m
.m
personalized_pose-master/system/load_system_options.m
1,556
utf_8
bdea367b9a72bcf05b16f1e3aae49da9
%function to load the correct options files function [opts,folder] = load_system_options(exp_name,videoname) switch lower(exp_name) case 'youtube' [opts,folder] = load_youtube_options(videoname); end function [opts,folder] = load_youtube_options(videoname) % part_detector_options; pa...
github
jjcharles/personalized_pose-master
waitforalljobs.m
.m
personalized_pose-master/system/waitforalljobs.m
372
utf_8
7cc3afb1a84920145ec5e7c72cf1eb76
%hangs for all jobs to finish function waitforalljobs(filename,maxjobs) joblist = dir(sprintf('%s*',filename.joblist)); fprintf('waiting for %s\n',filename.joblist(1:end-4)); while numel(joblist)<maxjobs pause(10) %get list of all running jobs joblist = dir(sprintf('%s*',fil...
github
jjcharles/personalized_pose-master
get_background_model.m
.m
personalized_pose-master/system/get_background_model.m
538
utf_8
8f257aeaebdf8bfbe0bbf5cdd8121f1d
%function to get foreground background segmentation from trained detector function get_background_model(opts,filename,folder,detections_filename,jobid) if ~exist(filename.patches,'file') if jobid == 1 %load a detector model = oforest.load_forest_from_folder(folder.detector); %loa...
github
jjcharles/personalized_pose-master
get_part_locs.m
.m
personalized_pose-master/system/get_part_locs.m
4,307
utf_8
8c5433477e858b91873835784c40b8bd
%function to return part locations splitting the job over multiple clusters function detections = get_part_locs(opts,filename,folder_detector,folder_cache,model_scale,jobid,maxjobs) %model_scale is the amount by which we wish to scale the image size so the %model runs faster when detecting proposals if mode...
github
jjcharles/personalized_pose-master
setjobcompletion.m
.m
personalized_pose-master/system/setjobcompletion.m
218
utf_8
fc9795df848ea3819502881744f1e37c
%function to set job completion tag function setjobcompletion(joblistfilename,jobid) jobfilename = sprintf('%s%04d.mat',joblistfilename,jobid); iscomplete = true; save(jobfilename,'iscomplete');
github
jjcharles/personalized_pose-master
match_body_parts.m
.m
personalized_pose-master/system/match_body_parts.m
799
utf_8
679203190929da7a06c5939a8153bcd7
%function to perform clustering function match_body_parts(opts,filename,folder_detector,cluster_folder,detections,maxjobs) if ~exist(sprintf('%s%04d.mat',filename.joblist,maxjobs),'file') %perform matching if ~exist(filename.unrefined_clusters,'file') && ~exist(filename.clusters,'file') ...
github
jjcharles/personalized_pose-master
setup_filenames.m
.m
personalized_pose-master/system/setup_filenames.m
1,015
utf_8
cc4482bc822931da2f1b4f48dee4d970
%new function to setup filenames function [filename,folder] = setup_filenames(folder, videoname, exp_name) switch lower(exp_name) case 'youtube' filename.video = sprintf('%s%s.mj2',folder.video,videoname); end if ~exist(filename.video,'file') filename.video = sprintf('%s%s.avi',folder.video,videoname)...
github
jjcharles/personalized_pose-master
waitforremainingjobs.m
.m
personalized_pose-master/system/waitforremainingjobs.m
376
utf_8
3c0275651892da30dd24f5214ba0f91d
%hangs for all jobs to finish function waitforremainingjobs(filename,maxjobs) joblist = dir(sprintf('%s*',filename.joblist)); fprintf('waiting for %s\n',filename.joblist(1:end-4)); while numel(joblist)<(maxjobs-1) pause(10) %get list of all running jobs joblist = dir(sprintf...
github
jjcharles/personalized_pose-master
get_clustered_manuals.m
.m
personalized_pose-master/system/get_clustered_manuals.m
3,624
utf_8
b1dc6fa1dc11f80c6df56bb619fc23f8
%function to form clustered manuals function detections = get_clustered_manuals(opts,filename,detections,feature_type,jobid,maxjobs) if jobid == 1 joblistfilename = sprintf('%s%04d.mat',filename.joblist,jobid); if ~exist(joblistfilename,'file') fprintf('Getting clustered manuals...\n'); ...
github
jjcharles/personalized_pose-master
train_lower_arm_evaluator.m
.m
personalized_pose-master/system/train_lower_arm_evaluator.m
843
utf_8
3391fbeb6457378aa15b90bc2ed40c61
%function to perform foreground background detection evaluation on the %cluster function train_lower_arm_evaluator(opts,filename,folder,fieldname,evaluator_id,jobid) %evaluator_id is a string which identifies the evaluation load(filename.detections); %runevaluation if jobid == 1 evaluator_folder = check_di...
github
jjcharles/personalized_pose-master
get_part_proposals_hpc.m
.m
personalized_pose-master/system/get_part_proposals_hpc.m
3,353
utf_8
211373f3a2cbbd520a40cac3cccf5213
%function to get part proposals on the cluster function part_clusters = get_part_proposals_hpc(opts,filename,detections,jobid,maxjobs,cache_folder) mainfilename = sprintf('%spartcluster.mat',cache_folder); if ~exist(mainfilename,'file') %split up jobs split = repmat(floor(numel(detections...
github
jjcharles/personalized_pose-master
setupwaiting.m
.m
personalized_pose-master/system/setupwaiting.m
289
utf_8
d674c7311d2557bf18db01fa96fc3ddd
%setup the file to perform job waiting function filename = setupwaiting(filename,folder,jobid,maxjobs,tag) foldername = sprintf('%s%s/',folder.cache,tag); if ~exist(foldername,'dir'); mkdir(foldername); end filename.joblist = sprintf('%sjoblist_%s.mat',foldername,tag);
github
jjcharles/personalized_pose-master
apply_siftflow.m
.m
personalized_pose-master/system/apply_siftflow.m
3,671
utf_8
38cd96eb6efd6502b6354cd8329777c8
%function to perform refinement on the cluster using siftflow function apply_siftflow(filename,folder,jobid,maxjobs,itr) %load detections load(filename.detections); if ~isfield(detections,'refinement') if ~exist(sprintf('%s%04d.mat',filename.joblist,jobid),'file') flow_folder = sprintf('%ssiftflow...
github
jjcharles/personalized_pose-master
update_initial_detections.m
.m
personalized_pose-master/system/update_initial_detections.m
3,446
utf_8
ec38d5c65018bfed305c70fb1da7ac9d
%function to update the manual detections with new ground truth function update_initial_detections(filename,olddetections,samplewidth,newfilename,jobid,maxjobs) if jobid == 1 if ~exist(newfilename,'file') detections.manual.frameids =[]; detections.manual.locs = []; detections.manual....
github
jjcharles/personalized_pose-master
f_b_evaluation_hpc.m
.m
personalized_pose-master/system/f_b_evaluation_hpc.m
4,128
utf_8
6935a18d5b8fb559469220fccde9ec2c
%function to perform foreground background detection evaluation on the %cluster. %uses svm trained lower arm evaluators where the thresholds were %learnt on a hold-out validation set - also runs over multiple jobs function f_b_evaluation_hpc(opts,filename,folder,fieldname,evaluator_id,jobid,maxjobs) %evaluator_id ...
github
jjcharles/personalized_pose-master
train_occlusion_detector.m
.m
personalized_pose-master/system/train_occlusion_detector.m
799
utf_8
35c27b830f18e7a67fb9140bd0be40a9
%function to train occlusion detector on HPC function train_occlusion_detector(opts,filename,folder,detections,fieldname,tag,jobid,maxjobs) folder.occlusiondetector = check_dir(sprintf('%socclusion_detectors',folder.model),true); filename.occlusiondetector = sprintf('%socclusion_detector_%s.mat',folder.occlusi...
github
jjcharles/personalized_pose-master
collect_optic_flow.m
.m
personalized_pose-master/system/collect_optic_flow.m
2,422
utf_8
273fe3ce1febb2952af677adabaabd7c
%function for producing dense optic flow video using DeepFlow function collect_optic_flow(videoname,exp_name) %setup filenames and folders [opts,folder] = load_system_options(exp_name,videoname); [filename,folder] = setup_filenames(folder, videoname, exp_name); %create matfile for optical flow output...
github
jjcharles/personalized_pose-master
get_training_detections_annotation.m
.m
personalized_pose-master/system/get_training_detections_annotation.m
1,130
utf_8
2797d20377e955ab4822e55cfb080c79
%function to form clustered manuals % uses a pose sampler rather than clustering patches %uses a tag to save the detections %allows for each tree to sample its own training data function detections = get_training_detections_annotation(folder,filename,detections,tag,jobid,maxjobs) temptrain_folder = check_dir(sprin...
github
jjcharles/personalized_pose-master
apply_occlusion_detection.m
.m
personalized_pose-master/system/apply_occlusion_detection.m
2,849
utf_8
321f98a1a5daab46f878a5bff24f6623
%function to apply the occlusion detector on the video (accross HPC nodes) function apply_occlusion_detection(opts,filename,folder,fieldname,tag,jobid,maxjobs) %load detections load(filename.detections); folder.occlusiondetector = check_dir(sprintf('%socclusion_detectors',folder.model),true); file...
github
jjcharles/personalized_pose-master
train_detector_tree.m
.m
personalized_pose-master/system/train_detector_tree.m
6,034
utf_8
7c965a7bfcbef22480eb25413f39a9b3
%function to train a part detector function train_detector_tree(opts, filename, folder, maxtreedepth, jobid, maxjobs, frameids, locs) savemaxjobs = maxjobs; if maxjobs == 1 jobidloop = 1:opts.partdetector.model.forest.numtrees; maxjobs = opts.partdetector.model.forest.numtrees; else %return if jobi...
github
jjcharles/personalized_pose-master
getpatch.m
.m
personalized_pose-master/methods/getpatch.m
614
utf_8
503c82a1f4dc508bf9e7ccfcb3691dea
%function to get patch from frame function [patch,bbox] = getpatch(pos,patchwidth,frame) %if pos out of bounds then bring back to min or max [M,N,~] = size(frame); if pos(1)>N; pos(1)=N; end; if pos(1)<1; pos(1)=1; end; if pos(2)>M; pos(2)=M; end; if pos(2)<1; pos(2)=1; end; framepadded = ...
github
jjcharles/personalized_pose-master
plot_skeleton.m
.m
personalized_pose-master/methods/plot_skeleton.m
3,829
utf_8
8030c3f09e2cf52ae586959e1780c914
%PLOT_SKELETON - plots skelton of signer on figure % handle = plot_skeleton(j,opts,handle) j is a 2x7 vector of joints, handle is a struct % handle.axis % handle.ula - upper left arm % handle.ura - % handle.lla - lower left arm % handle.lra % handle.joints(7) % % opts.clr = jet(7) = joints ...
github
jjcharles/personalized_pose-master
showHOG.m
.m
personalized_pose-master/methods/showHOG.m
1,374
utf_8
b004848cdd6833041bde8ba7f946cc71
% showHOG(w) % % Legacy HOG visualization function out = showHOG(w) w = w(:, :, 1:9) + w(:, :, 10:18) + w(:, :, 19:27); w = w / 3; w = repmat(w, [1 1 3]); w = padarray(w, [0 0 5], 'post'); % Make pictures of positive and negative weights bs = 20; pos = HOGpicture(w, bs); neg = HOGpicture(-w, bs); % Put pictures toge...
github
jjcharles/personalized_pose-master
getbestclusters.m
.m
personalized_pose-master/methods/getbestclusters.m
1,055
utf_8
e494b599e5f80f1bb29f1fd08c4c304d
%function to pick best covering of a set given a support window function [centroids, clusterids] = getbestclusters(data,windowsize) max_clusters = min(50,size(data,2)); centroids = []; clusterids = []; visualise = false; for k = 1:max_clusters isgood = true; [c,id] = vl_kmeans(double(data),k,'Init...
github
jjcharles/personalized_pose-master
check_dir.m
.m
personalized_pose-master/methods/check_dir.m
558
utf_8
5d5ce6a730bf9775cc5d16ec524ea467
%function to check and correct directory name function [directory_out,isthere] = check_dir(directory_in,iscreate) if ~exist('iscreate','var') iscreate = false; end directory_out = directory_in; directory_out(directory_out=='\') = '/'; %change to unix style if directory_out(...
github
jjcharles/personalized_pose-master
siftflow.m
.m
personalized_pose-master/methods/siftflow.m
1,026
utf_8
cffa6f461d48b84ec8e48fc3d94caaf7
%output flow field based on SIFT flow and energy function [flow, energy] = siftflow(im1,im2,mask) %mask is actually 2d x, y coordinates within the image space and not a %binary image %PARAMETERS cellsize=3; gridspacing=1; flow = zeros(size(im1,1),size(im1,2),2); %sift flow turned off!!! ...
github
jjcharles/personalized_pose-master
show_locs.m
.m
personalized_pose-master/methods/show_locs.m
1,540
utf_8
38f256f330c8cc521e7aa9d0a36a10bc
%function to visualise video and joint locations function show_locs(videofilename,imscale,frameids,locs,waittime) if ~exist('waittime','var'); waittime = 0; end videofolder = './videos/annotation/'; if ~exist(videofolder,'dir'); mkdir(videofolder); end vidobj = VideoRead...
github
jjcharles/personalized_pose-master
sample_uniformally.m
.m
personalized_pose-master/methods/sample_uniformally.m
2,263
utf_8
0b575a9c3638e16d62c2e9cde55776ef
%function to sample uniformally from a set of points from R^n using a %maximal coverage algorithm with window width as a parameter. I.e. it %covers the input set with the minimum number of cirular windows with %diameter given by 'window_width'. It then samples uniformally with %replacement from each covered region....
github
jjcharles/personalized_pose-master
train_svm_classifier.m
.m
personalized_pose-master/methods/train_svm_classifier.m
4,023
utf_8
bc45b34c564dce63f8cc7af21ee99708
%function to train and tune an svm classifier function [svmmodel, best_thresh] = train_svm_classifier(labels,data,required_sensitivity) labels = labels(:); %first get c value right trialc = 100./10.^[1:15]; c_score = zeros(1,numel(trialc)); for cc = 1:numel(trialc) %split data into ...
github
jjcharles/personalized_pose-master
show_skeleton.m
.m
personalized_pose-master/methods/show_skeleton.m
823
utf_8
ef67b1c242ee5c3a6809ffe4aff76666
%function to visualise video and joint locations function show_skeleton(videofilename,imscale,frameids,locs,secs) vidobj = VideoReader(videofilename); figure img = imresize(read(vidobj,frameids(1)),imscale); h_img = imagesc(img); axis image; hold on h_plot = plot_skeleton(zeros(2,size(locs,2...
github
jjcharles/personalized_pose-master
flann_search.m
.m
personalized_pose-master/methods/flann/flann_search.m
3,564
utf_8
a5a9b7cb6bc8b49d8f0f6c2737c17608
%Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. %Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. % %THE BSD LICENSE % %Redistribution and use in source and binary forms, with or without %modification, are permitted provided that the following conditions %are met: % ...
github
jjcharles/personalized_pose-master
draw.m
.m
personalized_pose-master/+pfilter/draw.m
1,130
utf_8
4aa8a3f143799559e3ce215a3605e6c9
%function to plot particles on img input function hndl = draw(particle,img,hndl) if nargin < 3 hndl{1} = gcf; hndl{2} = imagesc(img); axis image hold on else figure(hndl{1}); set(hndl{2},'cdata',img); end X = cat(1,partic...
github
jjcharles/personalized_pose-master
get_prediction.m
.m
personalized_pose-master/+pfilter/get_prediction.m
1,024
utf_8
739fe0f7a7048ba4956f6fe196a8a24a
%returns predictions from particles function [P, conf] = get_prediction(particle,img_size) x = cat(1,particle(:).x); y = cat(1,particle(:).y); x = round(x); y = round(y); bbox_in = [min(x),min(y),max(x)-min(x)+1,max(y)-min(y)+1]; x = x-bbox_in(1)+1; y = y-bbox_in(2)+1...
github
jjcharles/personalized_pose-master
resample.m
.m
personalized_pose-master/+pfilter/resample.m
850
utf_8
51e1bf972ee99750861de86b7724856d
%function to resample particles function particle = resample(particle,N,conf) %N is number to resample (optional) default is same number as number of %input particles %always need at least number of input particles so we resample more from %conf if nargin < 2 N = numel(particle); else ...
github
jjcharles/personalized_pose-master
quant_segcp.m
.m
personalized_pose-master/+features/quant_segcp.m
1,017
utf_8
8416e1917ddd05a41f07a1615ead964b
function feat = quant_segcp(opts,rgbimg,patches,seg) %load lookup table for quantisation [l_info.bin2clr, l_info.clr2bin] = colour2bin(); segcp_feat = features.segcp(opts,rgbimg,patches,seg); %quantise frame IMPORTANT bin_idx = l_info.clr2bin(segcp_feat+1); feat = uint8(l_info.bin2...
github
jjcharles/personalized_pose-master
rgb_attenuated.m
.m
personalized_pose-master/+features/rgb_attenuated.m
349
utf_8
6363e860f5ff6a1ff51b71a0cd58991a
%attenuated foreground function feat = rgb_attenuated(opts,rgbimg,patches) cpimg = features.cp(opts,rgbimg,patches); %get forground probability fp = sum(double(cpimg(:,:,1:2)),3)./sum(double(cpimg),3); %weight the rgbimg according to foreground feat = uint8(bsxfun(@times,...
github
jjcharles/personalized_pose-master
cp.m
.m
personalized_pose-master/+features/cp.m
2,703
utf_8
bb423da513e10f699736d5224e443e83
%computer segcp feature from input rgb and face and torso patches and %segmentation function [feat,colour_hist] = cp(opts,rgbimg,patches) if isfield(patches{1},'colourhist') colour_hist = patches{1}.colourhist; else ref.face = []; ref.torso = []; ref.back = []; ...
github
jjcharles/personalized_pose-master
weighted_hog.m
.m
personalized_pose-master/+features/weighted_hog.m
726
utf_8
517fa46d2c93bee66588e7c36400fde0
%function to create a posterior weighted HOG feature function [weighted_hog,minvalue,maxvalue] = weighted_hog(rgbimg,cpimg,cellsize) %get hog feature hog = features.hog(rgbimg,cellsize); hog = double(hog); %get forground probability cpd = cpimg; for i = 1:3; cpd(:,:,i) = medfilt2(cpimg(:,:...
github
jjcharles/personalized_pose-master
hog.m
.m
personalized_pose-master/+features/hog.m
116
utf_8
c629d98949074883c6d694d19c6d105c
%function to produce hog features function feat = hog(img,cellsize) feat = hogfeat(im2double(img),cellsize);
github
jjcharles/personalized_pose-master
segcp.m
.m
personalized_pose-master/+features/segcp.m
1,797
utf_8
8880caeb6462b72c3dc896aa162a8ef8
%computer segcp feature from input rgb and face and torso patches and %segmentation function feat = segcp(opts,rgbimg,patches,seg) seg = double(seg); ref.face = []; ref.torso = []; for template_id = 1:numel(patches) if (~isempty(patches{template_id}.face)) face = patche...
github
jjcharles/personalized_pose-master
hardsegcp.m
.m
personalized_pose-master/+features/hardsegcp.m
463
utf_8
ab34895cf24985322d818820509295a8
%computes hardsegcp feature from rgb input frame function feat = hardsegcp(opts, rgbimg, patches, seg, bbox) img = features.segcp(opts,rgbimg,patches,seg); disk = strel('disk',2); [~,channel_id] = max(img,[],3); seg_channel = imopen(channel_id==1,disk); dist = bwdist(seg_channel); ...
github
jjcharles/personalized_pose-master
img2can.m
.m
personalized_pose-master/+shape/img2can.m
1,127
utf_8
28231d521fc7edc57fbbd0f350c566f1
%function to extract rectangle from image provided with %-image %-anchor points on rectangle as percentage of rectangle height %-2x2d coordinates in the image %-input width of rectangle %-output width and height %Output is a canonicalised patch from the input image when converted to %colour_space either 'RGB' or...
github
spkrafft/trex-master
TREX.m
.m
trex-master/TREX.m
4,845
utf_8
00ce0259cc8d8f76d9414b04ead27abf
function varargout = TREX(varargin) % TREX MATLAB code for TREX.fig % TREX, by itself, creates a new TREX or raises the existing % singleton*. % % H = TREX returns the handle to a new TREX or the handle to % the existing singleton*. % % TREX('CALLBACK',hObject,eventData,h,...) calls the local %...