MCPcopy Create free account
hub / github.com/MetaSLAM/SphereVLAD / Pixel2LatLon

Function Pixel2LatLon

utils/equirectRotate/utils.py:24–34  ·  view source on GitHub ↗
(equirect)

Source from the content-addressed store, hash-verified

22
23
24def Pixel2LatLon(equirect):
25 # LatLon (H, W, (lat, lon))
26 h, w = equirect.shape
27
28 Lat = (0.5 - np.arange(0, h)/h) * np.pi
29 Lon = (np.arange(0, w) / w - 0.5) * 2 * np.pi
30
31 Lat = np.tile(Lat[:, np.newaxis], w)
32 Lon = np.tile(Lon, (h, 1))
33
34 return np.dstack((Lat, Lon))
35
36
37def LatLon2Sphere(LatLon):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected