Using MATLAB2012A, vs2013 and 2013 compilers:
(1) resize.cc features.cc:
Implementing the ROUND function: Inline int round (float a) {return ((int) (A + 0.5f));
At the same time: #define Bzero (A, B) memset (A, 0, b)
Basic C + + programming Error:
Alphainfo *ofs = new Alphainfo[len]; C + + does not support array size definitions for variable types
............
delete []ofs;
OFS = NULL;
(2) fv_cache:sigaction//annotation fv_cache.cc all the relevant code;
FV_COMPILE.M:
% if ISPC
% error (' This code isn't supported on Windows. ');
% end//comments out of COMPILE.M corresponding statements similar processing
Model.h: #define INFINITY Int_max
obj_fun.cc:
Basic C + + error:
Double *hnrms2 = new Double[m.num_components];
..........
delete []hnrms2;
HNRMS2 = NULL;
Double *pc = new Double[m.num_components];
...................
delete []pc;
PC = NULL;
(3) Gdetect
bounded_dt.cc, Dt.cc:typedef int int32_t;
#define INFINITY Int_max
fconvsse.cc, fcon_var_dim_mt.cc:
The following modifications and comments are made in the gdetect_dp.m:
%if size (pyra.feat{level},3) = = 32
% faster SSE version (fconvsse.cc) that can only handle 32-dim features
% r = Fconv (Pyra.feat{level}, filters, 1, Length (filters));
% Else
% more general convolution code to handle Non-32-dim features
% e.g., the HOG-PCA features used by the Star-cascade
R = Fconv_var_dim (Pyra.feat{level}, filters, 1, Length (filters)); Call Fconv_var_dim.mex64 directly
% End
If fconvsse.cc is required, part of the change is as follows:
#include "Pthread.h"
#pragma comment (lib, "PthreadVC.lib")//Support Pthread line under Windows threading
....................
_m_empty (); Commented out, the function clearly registers
float *f = (float *) _aligned_malloc (dims[0]*dims[1]*num_features*sizeof (float), 16); _aligned_malloc for System APIs
(4) Star-cascade
cascade.cc: #define INFINITY Int_max
Cascade_compile.m
% if ISPC
% error (' This code isn't supported on Windows. '); Comment out, Judge platform type
% End
Timer.h:
#include <time.h>
#include <ctime>
#include <windows.h>
Define the timer structure body
Class Timer {
struct Timeval {
Long tv_sec;
Long tv_usec;
};
Defining Gettimeofday Functions
private:
&N Bsp int Gettimeofday ( struct Timeval *tp, void *tzp) {
&N Bsp time_t clock;
struct TM TM;
SYSTEMTIME Wtm;
Getlocaltime (&WTM);
Tm.tm_year = wtm.wyear-1900;
Tm.tm_mon = wtm.wmonth-1;
Tm.tm_mday = Wtm.wday;
Tm.tm_hour = Wtm.whour;
Tm.tm_min = Wtm.wminute;
Tm.tm_sec = Wtm.wsecond;
Tm. TM_ISDST =-1;
Clock = mktime (&TM);
Tp->tv_sec = clock;
tp->tv_usec = wtm.wmilliseconds * 1000;
return (0);
}
(5) Eval function:
Try
eval (mexcmd);
Catch E
End
(6) Utils
PROCID.M:
i = Strfind (d, ' \ ');
(7) COMPILE.M:
% if ISPC
% error (' This code isn't supported on Windows. ');
% End
Try///////////////////////////////////////
If Nargin < 3
% build feature vector cache code
Fv_compile (opt, verb);
% Build the Star-cascade code
Cascade_compile (opt, verb);
eval ([mexcmd ' features/resize.cc ']);
eval ([mexcmd ' features/features.cc ']);
eval ([mexcmd ' gdetect/dt.cc ']);
eval ([mexcmd ' gdetect/bounded_dt.cc ']);
eval ([mexcmd ' gdetect/get_detection_trees.cc ']);
eval ([mexcmd ' gdetect/compute_overlap.cc ']);
% convolution Routine
% use one of the following depending on your setup
% (0) is fastest, (2) is slowest
% 0) multithreaded convolution using SSE
%eval ([mexcmd ' gdetect/fconv.cc ']);
% 1) Multithreaded convolution
%eval ([mexcmd ' Gdetect/fconv_var_dim_mt.cc-o Fconv ']);
% 2) basic convolution, very compatible
% eval ([mexcmd ' gdetect/fconv_var_dim.cc ']);
% convolution routine that can handle feature dimenions other than 32
% 0) Multithreaded convolution
%eval ([mexcmd ' gdetect/fconv_var_dim_mt.cc ']);
% 1) single-threaded convolution
eval ([mexcmd ' gdetect/fconv_var_dim.cc ']);///////////////////////////////////////////////////////////////////// /single thread, non-SSE version
Else
eval ([Mexcmd ' mex_file]);
End
Catch e////////////////////////////////////////////////////////////////////////////////////////
Warning (e.identifier, ' dddd ');
End//////////////////////////////////////////////////////////////
(8) DEMO.M:
%compile;
(9) PASCAL.M
Diary (Conf.training.log ([CLS '-' timestamp])); Comment out, error
(a) VOC_CONFIG.M
Base_dir = ' F:/code ';
conf = CV (conf, ' Pascal.dev_kit ', [Conf.paths.base_dir '/vocdevkit/']); Note the configuration of these sentences, Vocdevkit path
(11) System crash problem:
Workaround: Change the Resize () function to the imresize () function
(12) The problem of features function parameter data mismatch
WORKAROUND: Recompile, run compile, know compile through
(13) There is a problem of finding the header file:
Solution: Change #include <sys/time.h> to #include <time.h>
(14) The fifth version of the model and other versions of the model gap is large, if you need to convert to the VS-identifiable file, recommend the use of the V version.
Reference Link: Address