{"library":"pyequilib","title":"pyequilib","description":"A Python library for equirectangular image processing with minimum dependencies. Current version 0.5.8 supports numpy and PyTorch tensors, providing transforms like equi2pers, pers2equi, equi2cube, cube2equi, and horizontal/vertical shift. Release cadence is irregular; last release Dec 2022.","language":"python","status":"active","last_verified":"Fri May 01","install":{"commands":["pip install pyequilib"],"cli":null},"imports":["from equilib import equi2pers","from equilib import Equi2Pers"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import numpy as np\nfrom equilib import equi2pers\n\n# Create a sample equirectangular image (height, width, channels)\nequi_img = np.random.rand(512, 1024, 3).astype(np.float32)\n\n# Parameters for perspective view\nh_fov = 90  # horizontal field of view in degrees\nv_fov = 60  # vertical field of view in degrees\nyaw = 0     # rotation around y-axis\npitch = 0   # rotation around x-axis\nroll = 0    # rotation around z-axis\nheight = 256\nwidth = 256\n\n# Generate perspective image\npers_img = equi2pers(\n    equi_img,\n    rots=[yaw, pitch, roll],  # in degrees\n    fovs=[h_fov, v_fov],      # in degrees\n    height=height,\n    width=width,\n)\nprint(pers_img.shape)  # (256, 256, 3)","lang":"python","description":"Converts an equirectangular image to a perspective (rectilinear) view. The rots and fovs are in degrees.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}