mirror of
https://github.com/opencv/opencv.git
synced 2025-06-12 20:42:53 +08:00
refactoring
This commit is contained in:
parent
c2a880d7c9
commit
bbe0f2cef5
@ -268,15 +268,6 @@ int main(int argc, const char* argv[])
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(is_sparse)
|
|
||||||
{
|
|
||||||
namedWindow("PyrLK [Sparse]", WINDOW_NORMAL);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
namedWindow("PyrLK [Dense] Flow Field", WINDOW_NORMAL);
|
|
||||||
}
|
|
||||||
|
|
||||||
cout << "Image size : " << frame0.cols << " x " << frame0.rows << endl;
|
cout << "Image size : " << frame0.cols << " x " << frame0.rows << endl;
|
||||||
cout << "Points count : " << points << endl;
|
cout << "Points count : " << points << endl;
|
||||||
|
|
||||||
@ -318,6 +309,7 @@ int main(int argc, const char* argv[])
|
|||||||
vector<uchar> status(d_status.cols);
|
vector<uchar> status(d_status.cols);
|
||||||
download(d_status, status);
|
download(d_status, status);
|
||||||
|
|
||||||
|
namedWindow("PyrLK [Sparse]", WINDOW_NORMAL);
|
||||||
drawArrows(frame0, prevPts, nextPts, status, Scalar(255, 0, 0));
|
drawArrows(frame0, prevPts, nextPts, status, Scalar(255, 0, 0));
|
||||||
imshow("PyrLK [Sparse]", frame0);
|
imshow("PyrLK [Sparse]", frame0);
|
||||||
}
|
}
|
||||||
@ -329,6 +321,7 @@ int main(int argc, const char* argv[])
|
|||||||
d_pyrLK_dense->calc(d_frame0Gray, d_frame1Gray, d_flow);
|
d_pyrLK_dense->calc(d_frame0Gray, d_frame1Gray, d_flow);
|
||||||
|
|
||||||
// Draw flows
|
// Draw flows
|
||||||
|
namedWindow("PyrLK [Dense] Flow Field", WINDOW_NORMAL);
|
||||||
showFlow("PyrLK [Dense] Flow Field", d_flow);
|
showFlow("PyrLK [Dense] Flow Field", d_flow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user