Skip to content

Commit

Permalink
classify/private/binaryTreeTrain1.cpp: minor fix that could potential…
Browse files Browse the repository at this point in the history
…ly cause incorrect error computation (should not be triggered in practical cases). Thanks Tuan Dao
  • Loading branch information
pdollar committed Aug 15, 2015
1 parent 612f9a0 commit e6e563e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions classify/private/binaryTreeTrain1.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Piotr's Computer Vision Matlab Toolbox Version 3.24
* Piotr's Computer Vision Matlab Toolbox Version NEW
* Copyright 2014 Piotr Dollar. [pdollar-at-gmail.com]
* Licensed under the Simplified BSD License [see external/bsd.txt]
*******************************************************************************/
Expand Down Expand Up @@ -49,7 +49,7 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
M1 = (int) mxGetNumberOfElements(prhs[9]);
}

// create outpu structure
// create output structure
plhs[0] = mxCreateNumericMatrix(1,F,mxSINGLE_CLASS,mxREAL);
plhs[1] = mxCreateNumericMatrix(1,F,mxUINT8_CLASS,mxREAL);
float *errs = (float*) mxGetData(plhs[0]);
Expand All @@ -61,7 +61,8 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
#pragma omp parallel for num_threads(nThreads)
#endif
for( int f=0; f<F; f++ ) {
float cdf0[256], cdf1[256], e0=1, e1=0, e; int thr;
float cdf0[256], cdf1[256], e0, e1, e; int thr=0;
if(prior<.5) { e0=prior; e1=1-prior; } else { e0=1-prior; e1=prior; }
constructCdf(data0+N0*size_t(fids[f]),wts0,nBins,N0,M0,ord0,cdf0);
constructCdf(data1+N1*size_t(fids[f]),wts1,nBins,N1,M1,ord1,cdf1);
for( int i=0; i<nBins; i++) {
Expand Down
Binary file modified classify/private/binaryTreeTrain1.mexa64
100644 → 100755
Binary file not shown.
Binary file modified classify/private/binaryTreeTrain1.mexmaci64
Binary file not shown.
2 changes: 1 addition & 1 deletion external/history.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Version NEW
-acfSweeps.m: Added ACF parameter sweep code to toolbox
-minor: opticalFlow, acfTrain
-minor: opticalFlow, acfTrain, binaryTreeTrain1

Version 3.40 (01-Nov-2014)
-Added LDCF detector described in NIPS14 paper
Expand Down

0 comments on commit e6e563e

Please sign in to comment.