UMat twiddles;
String buildOptions;
int thread_count;
- bool status;
int dft_size;
+ bool status;
public:
- OCL_FftPlan(int _size): dft_size(_size), status(true)
+ OCL_FftPlan(int _size) : dft_size(_size), status(true)
{
int min_radix;
std::vector<int> radixes, blocks;
#endif
+#ifdef _DEBUG
+#define CV_OclDbgAssert CV_DbgAssert
+#else
static bool isRaiseError()
{
static bool initialized = false;
}
return value;
}
-
-#ifdef _DEBUG
-#define CV_OclDbgAssert CV_DbgAssert
-#else
#define CV_OclDbgAssert(expr) do { if (isRaiseError()) { CV_Assert(expr); } else { (void)(expr); } } while ((void)0, 0)
#endif
{
static const double FREAK_SQRT2 = 1.4142135623731;
-static const double FREAK_INV_SQRT2 = 1.0 / FREAK_SQRT2;
static const double FREAK_LOG2 = 0.693147180559945;
static const int FREAK_NB_ORIENTATION = 256;
static const int FREAK_NB_POINTS = 43;
UMat templ = _templ.getUMat();
UMat result = _result.getUMat();
- Size tsize = templ.size();
if (cn==1)
{
break;
case GAUSSIAN:
- for( i = 0; i < n; j++ )
+ for( i = 0; i < n; i++ )
{
double* data = sums.ptr<double>(i);
for( j = 0; j < cols; j++ )
void getValues( int vi, InputArray _sidx, float* values ) const
{
Mat sidx = _sidx.getMat();
- int i, n, nsamples = getNSamples();
+ int i, n = sidx.checkVector(1, CV_32S), nsamples = getNSamples();
CV_Assert( 0 <= vi && vi < getNAllVars() );
- CV_Assert( (n = sidx.checkVector(1, CV_32S)) >= 0 );
+ CV_Assert( n >= 0 );
const int* s = n > 0 ? sidx.ptr<int>() : 0;
if( n == 0 )
n = nsamples;
{
CV_Assert(buf != 0 && 0 <= sidx && sidx < getNSamples());
Mat vidx = _vidx.getMat();
- int i, n, nvars = getNAllVars();
- CV_Assert( (n = vidx.checkVector(1, CV_32S)) >= 0 );
+ int i, n = vidx.checkVector(1, CV_32S), nvars = getNAllVars();
+ CV_Assert( n >= 0 );
const int* vptr = n > 0 ? vidx.ptr<int>() : 0;
if( n == 0 )
n = nvars;
_responses.convertTo(_yf, CV_32F);
bool ok =
- (svmType == ONE_CLASS ? Solver::solve_one_class( _samples, params.nu, kernel, _alpha, sinfo, termCrit ) :
+ svmType == ONE_CLASS ? Solver::solve_one_class( _samples, params.nu, kernel, _alpha, sinfo, termCrit ) :
svmType == EPS_SVR ? Solver::solve_eps_svr( _samples, _yf, params.p, params.C, kernel, _alpha, sinfo, termCrit ) :
- svmType == NU_SVR ? Solver::solve_nu_svr( _samples, _yf, params.nu, params.C, kernel, _alpha, sinfo, termCrit ) : false);
+ svmType == NU_SVR ? Solver::solve_nu_svr( _samples, _yf, params.nu, params.C, kernel, _alpha, sinfo, termCrit ) : false;
if( !ok )
return false;
const float maxRad=2;
const int NSN=5;//10;//20; //number of shapes per class
const int NP=100; //number of points sympliying the contour
-const float outlierWeight=0.1f;
-const int numOutliers=20;
const float CURRENT_MAX_ACCUR=95; //98% and 99% reached in several tests, 95 is fixed as minimum boundary
class CV_ShapeEMDTest : public cvtest::BaseTest
const float maxRad=2;
const int NSN=5;//10;//20; //number of shapes per class
const int NP=120; //number of points sympliying the contour
-const float outlierWeight=0.1f;
-const int numOutliers=20;
const float CURRENT_MAX_ACCUR=95; //99% and 100% reached in several tests, 95 is fixed as minimum boundary
class CV_ShapeTest : public cvtest::BaseTest
{
// first four bytes, should be the same in little endian
const float FLO_TAG_FLOAT = 202021.25f; // check for this when READING the file
- const char FLO_TAG_STRING[] = "PIEH"; // use this when WRITING the file
+#ifdef DUMP
// binary file format for flow data specified here:
// http://vision.middlebury.edu/flow/data/
void writeOpticalFlowToFile(const Mat_<Point2f>& flow, const string& fileName)
{
+ const char FLO_TAG_STRING[] = "PIEH"; // use this when WRITING the file
ofstream file(fileName.c_str(), ios_base::binary);
file << FLO_TAG_STRING;
}
}
}
+#endif
// binary file format for flow data specified here:
// http://vision.middlebury.edu/flow/data/
private:
IplImage* argbimage;
QTMovie* mMovie;
- unsigned char* imagedata;
NSString* path;
NSString* codec;