Extracting subframes from spherical frame

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Posts: 61
Joined: 2010-12-10T05:29:16-07:00
Authentication code: 8675308

Extracting subframes from spherical frame

Post by jumpjack » 2017-08-12T05:15:34-07:00

I have a 360° camera. I can view its images using an head mounted display, which shows a small portion of the whole image.
How can I use imagemagick to extract this portion, given looking direction and FOV?
Or should I use a different program?
I am on Windows 10.

User avatar
Posts: 23904
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Extracting subframes from spherical frame

Post by fmw42 » 2017-08-12T10:57:00-07:00

Is your 360 image a spherical panorama, a cylindrical panorama or a fisheye view? Can you post an example input image to some free hosting service and put the URL here? Do you have information about the viewing angles (top and bottom of the image) and fov for you camera? See some of my input examples at http://www.fmwconcepts.com/imagemagick/ ... /index.php or http://www.fmwconcepts.com/imagemagick/ ... /index.php regarding the type of information needed.

Perhaps what you need is http://www.fmwconcepts.com/imagemagick/ ... /index.php

Assuming it is a spherical panorama (latitude, longitude coordinates), then it is just a matter of converting the FOV to crop width and height and the direction to the offset to the center of the subsection from the look direction. What is your IM version? Can you post an example 360 images to some free hosting service and put the URL here, so we can test and explain further the computations.

Note that converting that subsection to a perspective view is harder and would need to be scripted.

I have a number of bash shell scripts that work with panoramas and fisheye views. But I have not done the subsection of the panorama to a perspective view. But I could work on that next week.

See my scripts at the link below.

Post Reply