This repository is a set of codes to convert a equirectangular panorama image into a normal perspective view.
- OpenCV 3.4
-
Put a input equirectangler image on the
data
directory -
Enter the following commands:
$ mkdir build && cd build $ cmake .. $ make $ ./Equirectangular2Perspective
-
Parameters:
// Output image dimension const int height = 720; const int width = 1080; // z-axis angle (0: forward, 180: backword) float theta = 180.0f; // y-axis angle (>0: upper, <0: lower) float phi = 0.0f; // FOV of the output perspective image float FOV = 120.0f; Equirec2Perspec equiParser; equiParser.setParams(inputImage, FOV, height, width); equiParser.equirectangular2perspective(inputImage, outputImage, theta, phi);