jmccormac / pySceneNetRGBD

Scripts showing how to work with the SceneNetRGBD dataset
GNU General Public License v3.0
178 stars 46 forks source link

how do we generate optical flow from the dataset? #2

Closed tsaizhenling closed 7 years ago

jmccormac commented 7 years ago

Sorry for the late reply. The way that we calculated optical flow is to use the depth image and camera poses to calculate the 3D points associated with each pixel in world coordinates. We then calculate the instantaneous derivatives of those points projection into pixel space over time halfway through the shutter exposure trajectory (i.e. where the ground truth was taken).

I will shortly clean up and push a script that outputs a hsv image of optical flow from the calculated derivatives for a randomly selected trajectory.

jmccormac commented 7 years ago

The calculate_optical_flow.py script has now been added to the repo.

tsaizhenling commented 7 years ago

much appreciated!