Optic flow. August 26, 2017

seen from France
seen from United Kingdom
seen from China

seen from Norway
seen from Croatia
seen from China
seen from Croatia
seen from United Kingdom
seen from United States

seen from United States

seen from Russia

seen from United States
seen from South Africa
seen from Norway
seen from United States
seen from Germany
seen from United Kingdom
seen from United States

seen from Tajikistan
seen from Netherlands
Optic flow. August 26, 2017
Getting the Flip32 flight controller talking with the PX4 Flow Cam Sensor (via Flip32 PX4Flow - YouTube)
Python OpenCV Optic Flow test with animated square translation. [FIXED]
square: 50 x 50px
canvas: 320 x 240px
Python Farneback settings:
flow = cv2.calcOpticalFlowFarneback(prv, nxt, 0.5, 4, 8, 2, 7, 1.5, cv2.OPTFLOW_FARNEBACK_GAUSSIAN)
Processing Farneback settings:
private double pyramidScale = 0.5; private int nLevels = 4; private int windowSize = 8; private int nIterations = 2; private int polyN = 7; private double polySigma = 1.5; private int runningFlags = Video.OPTFLOW_FARNEBACK_GAUSSIAN;
Python OpenCV Optic Flow test with animated square translation. [BUG]
square: 50 x 50px
canvas: 320 x 240px or (240,320) as opencv’s matrix would have it (rows,cols)
I was completely confused as to why the optic flow with the same settings as my Processing sketch, with the same version of OpenCV 2.4.7 would return such drastically different results. This looks more like cellular automata than it does a robust optic flow algorithm. And then it hit me. This is feedback, I am drawing the flow to the image I have instrumented to measure flow. The optic flow visualization is yielding a flow for the next frame and so on. The reason why I noticed, was because I changed the color of the flow, and the feedback became even stronger.
Processing OpenCV Optic Flow test with animated square rotation.
Testing measurement of Curl. All orange values on right side mean negative curl, in this case, confirming rotation clockwise. All green values on right side mean positive curl, in this case, confirming rotation counter clockwise.
canvas: 320 x 240px
Processing OpenCV Optic Flow test with animated square zoom.
Testing measurement of Divergence. All green values on right side mean positive divergence, which is zooming in or getting closer to an object. All orange values on right side mean negative divergence, or zooming out and getting farther from an object.
canvas: 320 x 240px
Processing OpenCV Optic Flow test with animated square.
square: 50 x 50px
canvas: 320 x 240px
Processing OpenCV Optic Flow test with animated circle.
circle: 50 x 50px
canvas: 320 x 240px