From b69854826898be24a48e77733f629240756073a3 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Fri, 6 Jul 2018 00:22:24 +0200 Subject: [PATCH] Visualize the flow consistently with .flo files (which have y = down). --- flow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flow.cpp b/flow.cpp index e59a481..205b24f 100644 --- a/flow.cpp +++ b/flow.cpp @@ -523,7 +523,7 @@ int main(void) float w = dense_flow[(yy * level_width + x) * 3 + 2]; du = (du / w) * level_width; - dv = (dv / w) * level_height; + dv = (-dv / w) * level_height; uint8_t r, g, b; flow2rgb(du, dv, &r, &g, &b); -- 2.39.2