Commit 0c10ed26 authored by Yury Zemlyanskiy's avatar Yury Zemlyanskiy

Update to improve performance of SimpleFlow algorithm

+ Improve performance of calcOpticalFlowSingleScale method
+ Small refactoring

Current results:

IMAGE NAMES          RMSE
Beanbags
Dimetrodon           0.329428
DogDance
Grove2               0.550852
Grove3               1.464699
Hydrangea            0.523277
MiniCooper
RubberWhale          0.367246
Urban2               2.717003
Urban3               4.185070
Venus                0.775422
Walking

Time (for Urban3):
17.490248 sec
parent 7ad4c254
This diff is collapsed.
......@@ -51,6 +51,22 @@ using namespace std;
#define UNKNOWN_FLOW_THRESH 1e9
namespace cv {
/*
template<class T>
inline static T sqr(T t) {
return t*t;
}
static float dist(const Vec3b& p1, const Vec3b& p2) {
return sqr(p1[0] - p2[0]) +
sqr(p1[1] - p2[1]) +
sqr(p1[2] - p2[2]);
}
inline static float dist(const Vec2f& p1, const Vec2f& p2) {
return sqr(p1[0] - p2[0]) +
sqr(p1[1] - p2[1]);
}*/
inline static float dist(const Vec3b& p1, const Vec3b& p2) {
return (p1[0] - p2[0]) * (p1[0] - p2[0]) +
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment