eGene
August 9, 2019, 5:21pm
1
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
This is a quick repost of one of a blog entry which might interest people.
My Virtual Forest project is still running strong and generates tons of spherical images (currently ~50GB). However, the post on which the camera sits is not perfectly level. The Theta S camera normally compensates for this using an internal gyroscope which detects pitch and roll of the camera. Yet, when downloading images directly from the camera no adjustments are made and the pitch and roll data is merely recorded i…
If you want to quickly run a shell command on someplace like AWS, DigitalOcean or equivalent, you can use Python subprocess
Watermark Overlay and EXIF Extraction Tests
[image]
Live site . Image by @Juantonto of IKOMA360. Taken with Z1.
Overlay file used in this test .
Command Line Technique Using ImageMagick
create watermark mask at 40% transparency. Make the mask the same size as the original image 7168x3584
make a composite image with the watermark using ImageMagick.
Example
$ composite theta_logo.png toyo-hardrock.jpg new-image.jpg
Explanation
composite is the name of the ImageMagick command
theta_logo.…
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.
https://theta360.guide/thetamedia/#_crop
eGene
August 12, 2019, 3:51pm
3
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.
Example:
php, orientation, exif
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.
I’ll look at the four most popular open source 360 image viewers and give recommendations as to which is the best tool for your purposes.
A-Frame
Google VR View for the Web
React VR
Photo Sphere Viewer
A-Frame
A-Frame is the leading open source project for WebVR. What this means is that your project will work not only with web sites, but also on Vive, Rift, Daydream, GearVR, and mobile phones.
Pros
Backed by Mozilla
Active community
Works with VR headsets and VR controllers
Cons
in bet…
If you get a working solution, please post the results. It would be good to get more PHP information on this site.