Programmatic flat-image frame extraction

Not necessarily theta-related, more like generic programming question. Is there a server-side solution to extract a frame from a 360 image? Say, I want frame at give position with given angle from a 360 image. Easy in JS, plenty of libs. Server-side seems a bit more tricky, looks like I need to port a JS code for that, but not sure, hence this question. Preferably PHP, but Python / Perl / Java / Node.JS is also ok.

Are you extracting a frame from a video or cropping a image?

If you’re extracting a frame from a video, you can use OpenCV.

If you’re trying to crop a section from an image, you can use normal image processing libraries such as Pillow on Python.

If you want to move the image around, you can try Povray

If you want to quickly run a shell command on someplace like AWS, DigitalOcean or equivalent, you can use Python subprocess

If you’re uploading a few hundred images to a server and you want to adjust the pitch and roll, you can use Koen’s bash script.

It’s also possible that batch processing with hugin might meet your requirements.

Thanks, that led me to plenty of python packages doing this job. For some reason there’s a lot written in Python, nothing in PHP.

You may be able to search for “PHP” and the concept, such as PHP exif image data.


You may be able to rotate the image with exif data and then zoom it in the 360 viewer.

On the thread below, there is a long list of 360 image viewers.

If you get a working solution, please post the results. It would be good to get more PHP information on this site.