jmccormac / pySceneNetRGBD

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

When converting 2d pixel point to world coordinates, why is 0.5 added #37

Open NagabhushanSN95 opened 4 years ago

NagabhushanSN95 commented 4 years ago

In https://github.com/jmccormac/pySceneNetRGBD/blob/master/calculate_optical_flow.py#L22-L23, why is 0.5 being added to x and y?

ankurhanda commented 4 years ago

to make sure the ray passes through the center of the pixel and not the top-left corner.

NagabhushanSN95 commented 4 years ago

No here, x is in the range 0 to width i.e. 320. For x=319, adding 0.5 doesn't make it at the center, right?