microsoft / HoloLensForCV

Sample code and documentation for using the Microsoft HoloLens for Computer Vision research
MIT License
472 stars 156 forks source link

Vectorized pgm2distance. #96

Closed bschoun closed 5 years ago

bschoun commented 5 years ago

The previous version of the pgm2distance function used nested for loops, and took ~0.5s to run on my laptop. By vectorizing this function, the run time is improved to ~0.00056s, almost a 1000x speedup. It's also shorter and easier to read.

ahojnnes commented 5 years ago

Great, thanks!