Skip to content

Commit e6e563e

Browse files
committed
classify/private/binaryTreeTrain1.cpp: minor fix that could potentially cause incorrect error computation (should not be triggered in practical cases). Thanks Tuan Dao
1 parent 612f9a0 commit e6e563e

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

classify/private/binaryTreeTrain1.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Piotr's Computer Vision Matlab Toolbox Version 3.24
2+
* Piotr's Computer Vision Matlab Toolbox Version NEW
33
* Copyright 2014 Piotr Dollar. [pdollar-at-gmail.com]
44
* Licensed under the Simplified BSD License [see external/bsd.txt]
55
*******************************************************************************/
@@ -49,7 +49,7 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
4949
M1 = (int) mxGetNumberOfElements(prhs[9]);
5050
}
5151

52-
// create outpu structure
52+
// create output structure
5353
plhs[0] = mxCreateNumericMatrix(1,F,mxSINGLE_CLASS,mxREAL);
5454
plhs[1] = mxCreateNumericMatrix(1,F,mxUINT8_CLASS,mxREAL);
5555
float *errs = (float*) mxGetData(plhs[0]);
@@ -61,7 +61,8 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
6161
#pragma omp parallel for num_threads(nThreads)
6262
#endif
6363
for( int f=0; f<F; f++ ) {
64-
float cdf0[256], cdf1[256], e0=1, e1=0, e; int thr;
64+
float cdf0[256], cdf1[256], e0, e1, e; int thr=0;
65+
if(prior<.5) { e0=prior; e1=1-prior; } else { e0=1-prior; e1=prior; }
6566
constructCdf(data0+N0*size_t(fids[f]),wts0,nBins,N0,M0,ord0,cdf0);
6667
constructCdf(data1+N1*size_t(fids[f]),wts1,nBins,N1,M1,ord1,cdf1);
6768
for( int i=0; i<nBins; i++) {

classify/private/binaryTreeTrain1.mexa64

100644100755
-40 Bytes
Binary file not shown.
3.98 KB
Binary file not shown.

external/history.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Version NEW
22
-acfSweeps.m: Added ACF parameter sweep code to toolbox
3-
-minor: opticalFlow, acfTrain
3+
-minor: opticalFlow, acfTrain, binaryTreeTrain1
44

55
Version 3.40 (01-Nov-2014)
66
-Added LDCF detector described in NIPS14 paper

0 commit comments

Comments
 (0)