OCL_PERF_TEST_P(SuperResolution_BTVL1 ,BTVL1, Combine(Values(szSmall64, szSmall128), Values(MatType(CV_8UC1), MatType(CV_8UC3)))) { Size_MatType_t params = GetParam(); const Size size = get<0>(params); const int type = get<1>(params); Mat frame(size, type); UMat dst(1, 1, 0); declare.in(frame, WARMUP_RNG); const int scale = 2; const int iterations = 50; const int temporalAreaRadius = 1; Ptr<DenseOpticalFlowExt> opticalFlow(new ZeroOpticalFlow); Ptr<SuperResolution> superRes = createSuperResolution_BTVL1(); superRes->set("scale", scale); superRes->set("iterations", iterations); superRes->set("temporalAreaRadius", temporalAreaRadius); superRes->set("opticalFlow", opticalFlow); superRes->setInput(makePtr<OneFrameSource_CPU>(frame)); // skip first frame superRes->nextFrame(dst); OCL_TEST_CYCLE_N(10) superRes->nextFrame(dst); SANITY_CHECK_NOTHING(); }
int main(int argc, char *argv[]){ int operate; cout << "What do you want to do? \t1. train \t2.test \t4. SVM model \t5.opticalFlow \t6.FourierTrain" << endl; cin >> operate; switch (operate) { case 1: train(); break; case 2: test(); break; case 3: YYTest(); break; case 4: SVMtest(); break; case 5: opticalFlow(); break; case 6: fourierTrain(); break; default: cout << "Error Operate!!! EXIT!!!" <<endl; break; } return 0; }