Skip to content
This repository has been archived by the owner on Feb 25, 2019. It is now read-only.

Commit

Permalink
Replace ~ with dummy variables to be compatible to Matlab <R2009b.
Browse files Browse the repository at this point in the history
Tested, working on Ubuntu10.10 32bit, opencv 2.1, Matlab R2009a. 
Runs on octave 3.4. Picture sequence is shown, tracking (blue dots) unsuccessful, process interruption with keypress doesn't work, Tracking output mostly NaN.
  • Loading branch information
bilderbuchi committed Apr 14, 2011
1 parent 59fc591 commit 5f2b60d
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion tld/tldDetection.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
idx_dt = find(tld.tmp.conf > tld.model.num_trees*tld.model.thr_fern); % get indexes of bounding boxes that passed throu the Ensemble Classifier

if length(idx_dt) > 100 % speedup: if there are more than 100 detections, pict 100 of the most confident only
[~,sIdx] = sort(tld.tmp.conf(idx_dt),'descend');
[dummy8,sIdx] = sort(tld.tmp.conf(idx_dt),'descend');
idx_dt = idx_dt(sIdx(1:100));
end

Expand Down
2 changes: 1 addition & 1 deletion tld/tldExample.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
opt.source = tldInitSource(opt.source); % select data source, camera/directory

figure(2); set(2,'KeyPressFcn', @handleKey); % open figure for display of results
finish = 0; function handleKey(~,~), finish = 1; end % by pressing any key, the process will exit
finish = 0; function handleKey(dummy1,dummy2), finish = 1; end % by pressing any key, the process will exit

while 1
source = tldInitFirstFrame(tld,opt.source,opt.model.min_win); % get initial bounding box, return 'empty' if bounding box is too small
Expand Down
4 changes: 2 additions & 2 deletions tld/tldGeneratePositiveData.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
pEx = [];%zeros(prod(tld.patchsize),numWarps);

% Get closest bbox
[~,idxP] = max(overlap);
[dummy3,idxP] = max(overlap);
bbP0 = tld.grid(1:4,idxP);

% Get overlapping bboxes
idxP = find(overlap > 0.6);
if length(idxP) > p_par.num_closest
[~,sIdx] = sort(overlap(idxP),'descend');
[dummy4,sIdx] = sort(overlap(idxP),'descend');
idxP = idxP(sIdx(1:p_par.num_closest));
end
bbP = tld.grid(:,idxP);
Expand Down
2 changes: 1 addition & 1 deletion tld/tldLearning.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
% Check consistency -------------------------------------------------------

pPatt = tldGetPattern(img,bb,tld.model.patchsize); % get current patch
[pConf1,~,pIsin] = tldNN(pPatt,tld); % measure similarity to model
[pConf1,dummy9,pIsin] = tldNN(pPatt,tld); % measure similarity to model

if pConf1 < 0.5, disp('Fast change.'); tld.valid(I) = 0; return; end % too fast change of appearance
if var(pPatt) < tld.var, disp('Low variance.'); tld.valid(I) = 0; return; end % too low variance of the patch
Expand Down
2 changes: 1 addition & 1 deletion tld/tldNN.m
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

% set isin
if any(nccP > tld.model.ncc_thesame), isin(1,i) = 1; end % IF the query patch is highly correlated with any positive patch in the model THEN it is considered to be one of them
[~,isin(2,i)] = max(nccP); % get the index of the maximall correlated positive patch
[dummy6,isin(2,i)] = max(nccP); % get the index of the maximall correlated positive patch
if any(nccN > tld.model.ncc_thesame), isin(3,i) = 1; end % IF the query patch is highly correlated with any negative patch in the model THEN it is considered to be one of them

% measure Relative Similarity
Expand Down
2 changes: 1 addition & 1 deletion tld/tldTracking.m
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

% estimate confidence and validity
patchJ = tldGetPattern(tld.img{J},BB2,tld.model.patchsize); % sample patch in current image
[~,Conf] = tldNN(patchJ,tld); % estimate its Conservative Similarity (considering 50% of positive patches only)
[dummy7,Conf] = tldNN(patchJ,tld); % estimate its Conservative Similarity (considering 50% of positive patches only)

% Validity
Valid = tld.valid(I); % copy validity from previous frame
Expand Down
2 changes: 1 addition & 1 deletion tld/tldTrainNN.m
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
for k = 1:1 % Bootstrap
for i = 1:length(y)

[conf1,~,isin] = tldNN(x(:,i),tld); % measure Relative similarity
[conf1,dummy5,isin] = tldNN(x(:,i),tld); % measure Relative similarity

% Positive
if y(i) == 1 && conf1 <= tld.model.thr_nn % 0.65
Expand Down

0 comments on commit 5f2b60d

Please sign in to comment.