Home | History | Annotate | Download | only in test

Lines Matching refs:flow

57     // binary file format for flow data specified here:
58 // http://vision.middlebury.edu/flow/data/
59 void writeOpticalFlowToFile(const Mat_<Point2f>& flow, const string& fileName)
66 file.write((const char*) &flow.cols, sizeof(int));
67 file.write((const char*) &flow.rows, sizeof(int));
69 for (int i = 0; i < flow.rows; ++i)
71 for (int j = 0; j < flow.cols; ++j)
73 const Point2f u = flow(i, j);
82 // binary file format for flow data specified here:
83 // http://vision.middlebury.edu/flow/data/
84 void readOpticalFlowFromFile(Mat_<Point2f>& flow, const string& fileName)
97 flow.create(size);
99 for (int i = 0; i < flow.rows; ++i)
101 for (int j = 0; j < flow.cols; ++j)
108 flow(i, j) = u;
155 Mat_<Point2f> flow;
158 tvl1->calc(frame1, frame2, flow);
161 writeOpticalFlowToFile(flow, gold_flow_path);
166 ASSERT_EQ(gold.rows, flow.rows);
167 ASSERT_EQ(gold.cols, flow.cols);
169 double err = calcRMSE(gold, flow);