{
//------------------------------------interp-------------------------------------------
-LogPolar_Interp::LogPolar_Interp(int w, int h, Point2i center, int _R, double _ro0, int _interp, int full, int _S, int sp)
+LogPolar_Interp::LogPolar_Interp(int w, int h, Point2i center, int _R, double _ro0, int _interp, int full, int _s, int sp)
{
if ( (center.x!=w/2 || center.y!=h/2) && full==0) full=1;
interp=_interp;
- create_map(M, N, _R, _S, _ro0);
+ create_map(M, N, _R, _s, _ro0);
}
-void LogPolar_Interp::create_map(int _M, int _N, int _R, int _S, double _ro0)
+void LogPolar_Interp::create_map(int _M, int _n, int _R, int _s, double _ro0)
{
M=_M;
- N=_N;
+ N=_n;
R=_R;
- S=_S;
+ S=_s;
ro0=_ro0;
int jc=N/2-1, ic=M/2-1;
//------------------------------------overlapping----------------------------------
-LogPolar_Overlapping::LogPolar_Overlapping(int w, int h, Point2i center, int _R, double _ro0, int full, int _S, int sp)
+LogPolar_Overlapping::LogPolar_Overlapping(int w, int h, Point2i center, int _R, double _ro0, int full, int _s, int sp)
{
if ( (center.x!=w/2 || center.y!=h/2) && full==0) full=1;
S=(int) floor(2*CV_PI/(_a-1)+0.5);
}
- create_map(M, N, _R, _S, _ro0);
+ create_map(M, N, _R, _s, _ro0);
}
-void LogPolar_Overlapping::create_map(int _M, int _N, int _R, int _S, double _ro0)
+void LogPolar_Overlapping::create_map(int _M, int _n, int _R, int _s, double _ro0)
{
M=_M;
- N=_N;
+ N=_n;
R=_R;
- S=_S;
+ S=_s;
ro0=_ro0;
int jc=N/2-1, ic=M/2-1;
//----------------------------------------adjacent---------------------------------------
-LogPolar_Adjacent::LogPolar_Adjacent(int w, int h, Point2i center, int _R, double _ro0, double smin, int full, int _S, int sp)
+LogPolar_Adjacent::LogPolar_Adjacent(int w, int h, Point2i center, int _R, double _ro0, double smin, int full, int _s, int sp)
{
if ( (center.x!=w/2 || center.y!=h/2) && full==0) full=1;
S=(int) floor(2*CV_PI/(_a-1)+0.5);
}
- create_map(M, N, _R, _S, _ro0, smin);
+ create_map(M, N, _R, _s, _ro0, smin);
}
-void LogPolar_Adjacent::create_map(int _M, int _N, int _R, int _S, double _ro0, double smin)
+void LogPolar_Adjacent::create_map(int _M, int _n, int _R, int _s, double _ro0, double smin)
{
M=_M;
- N=_N;
+ N=_n;
R=_R;
- S=_S;
+ S=_s;
ro0=_ro0;
romax=min(M/2.0, N/2.0);
CvSVMKernel* _kernel, double* _alpha, CvSVMSolutionInfo& _si )
{
int i;
- double p = _kernel->params->p, _C = _kernel->params->C;
+ double p = _kernel->params->p, kernel_param_c = _kernel->params->C;
if( !create( _sample_count, _var_count, _samples, 0,
- _sample_count*2, 0, _C, _C, _storage, _kernel, &CvSVMSolver::get_row_svr,
+ _sample_count*2, 0, kernel_param_c, kernel_param_c, _storage, _kernel, &CvSVMSolver::get_row_svr,
&CvSVMSolver::select_working_set, &CvSVMSolver::calc_rho ))
return false;
CvSVMKernel* _kernel, double* _alpha, CvSVMSolutionInfo& _si )
{
int i;
- double _C = _kernel->params->C, sum;
+ double kernel_param_c = _kernel->params->C, sum;
if( !create( _sample_count, _var_count, _samples, 0,
_sample_count*2, 0, 1., 1., _storage, _kernel, &CvSVMSolver::get_row_svr,
y = (schar*)cvMemStorageAlloc( storage, sample_count*2*sizeof(y[0]) );
alpha = (double*)cvMemStorageAlloc( storage, alpha_count*sizeof(alpha[0]) );
- sum = _C * _kernel->params->nu * sample_count * 0.5;
+ sum = kernel_param_c * _kernel->params->nu * sample_count * 0.5;
for( i = 0; i < sample_count; i++ )
{
- alpha[i] = alpha[i + sample_count] = MIN(sum, _C);
+ alpha[i] = alpha[i + sample_count] = MIN(sum, kernel_param_c);
sum -= alpha[i];
b[i] = -_y[i];
// all steps are logarithmic and must be > 1
double degree_step = 10, g_step = 10, coef_step = 10, C_step = 10, nu_step = 10, p_step = 10;
- double gamma = 0, _C = 0, degree = 0, coef = 0, p = 0, nu = 0;
+ double gamma = 0, curr_c = 0, degree = 0, coef = 0, p = 0, nu = 0;
double best_degree = 0, best_gamma = 0, best_coef = 0, best_C = 0, best_nu = 0, best_p = 0;
float min_error = FLT_MAX, error;
}
int* cls_lbls = class_labels ? class_labels->data.i : 0;
- _C = C_grid.min_val;
+ curr_c = C_grid.min_val;
do
{
- params.C = _C;
+ params.C = curr_c;
gamma = gamma_grid.min_val;
do
{
best_degree = degree;
best_gamma = gamma;
best_coef = coef;
- best_C = _C;
+ best_C = curr_c;
best_nu = nu;
best_p = p;
}
gamma *= gamma_grid.step;
}
while( gamma < gamma_grid.max_val );
- _C *= C_grid.step;
+ curr_c *= C_grid.step;
}
- while( _C < C_grid.max_val );
+ while( curr_c < C_grid.max_val );
}
min_error /= (float) sample_count;