Lines Matching refs:flow
87 static void drawOpticalFlow(const Mat_<Point2f>& flow, Mat& dst, float maxmotion = -1) in drawOpticalFlow() argument
89 dst.create(flow.size(), CV_8UC3); in drawOpticalFlow()
98 for (int y = 0; y < flow.rows; ++y) in drawOpticalFlow()
100 for (int x = 0; x < flow.cols; ++x) in drawOpticalFlow()
102 Point2f u = flow(y, x); in drawOpticalFlow()
112 for (int y = 0; y < flow.rows; ++y) in drawOpticalFlow()
114 for (int x = 0; x < flow.cols; ++x) in drawOpticalFlow()
116 Point2f u = flow(y, x); in drawOpticalFlow()
126 static void writeOpticalFlowToFile(const Mat_<Point2f>& flow, const string& fileName) in writeOpticalFlowToFile() argument
134 file.write((const char*) &flow.cols, sizeof(int)); in writeOpticalFlowToFile()
135 file.write((const char*) &flow.rows, sizeof(int)); in writeOpticalFlowToFile()
137 for (int i = 0; i < flow.rows; ++i) in writeOpticalFlowToFile()
139 for (int j = 0; j < flow.cols; ++j) in writeOpticalFlowToFile()
141 const Point2f u = flow(i, j); in writeOpticalFlowToFile()
177 Mat_<Point2f> flow; in main() local
181 tvl1->calc(frame0, frame1, flow); in main()
186 drawOpticalFlow(flow, out); in main()
189 writeOpticalFlowToFile(flow, argv[3]); in main()